* [PATCH 0/3] arm64: dts: qcom: sc8280xp: add audio support
@ 2022-11-15 17:02 Srinivas Kandagatla
2022-11-15 17:02 ` [PATCH 1/3] arm64: dts: qcom: sc8280xp/sa8540p: add gpr node Srinivas Kandagatla
` (2 more replies)
0 siblings, 3 replies; 13+ messages in thread
From: Srinivas Kandagatla @ 2022-11-15 17:02 UTC (permalink / raw)
To: agross, andersson
Cc: konrad.dybcio, robh+dt, krzysztof.kozlowski+dt, linux-arm-msm,
devicetree, linux-kernel, Srinivas Kandagatla
This patchset adds audio support for sc8280xp Lenovo x13s.
Support for Headset Playback/Capture, Speaker Playback and DMIC is
tested.
A prebuit ASoC topology file available at
https://git.linaro.org/people/srinivas.kandagatla/audioreach-topology.git/tree/prebuilt/SC8280XP-LENOVO-X13S-tplg.bin
Thanks,
Srini
Srinivas Kandagatla (3):
arm64: dts: qcom: sc8280xp/sa8540p: add gpr node
arm64: dts: qcom: sc8280xp/sa8540p: add SoundWire and LPASS
arm64: dts: qcom: sc8280xp: Add soundcard support
.../qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 213 ++++++++++
arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 364 ++++++++++++++++++
2 files changed, 577 insertions(+)
--
2.25.1
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH 1/3] arm64: dts: qcom: sc8280xp/sa8540p: add gpr node
2022-11-15 17:02 [PATCH 0/3] arm64: dts: qcom: sc8280xp: add audio support Srinivas Kandagatla
@ 2022-11-15 17:02 ` Srinivas Kandagatla
2022-11-16 8:06 ` Krzysztof Kozlowski
2022-11-16 11:03 ` Johan Hovold
2022-11-15 17:02 ` [PATCH 2/3] arm64: dts: qcom: sc8280xp/sa8540p: add SoundWire and LPASS Srinivas Kandagatla
2022-11-15 17:02 ` [PATCH 3/3] arm64: dts: qcom: sc8280xp: Add soundcard support Srinivas Kandagatla
2 siblings, 2 replies; 13+ messages in thread
From: Srinivas Kandagatla @ 2022-11-15 17:02 UTC (permalink / raw)
To: agross, andersson
Cc: konrad.dybcio, robh+dt, krzysztof.kozlowski+dt, linux-arm-msm,
devicetree, linux-kernel, Srinivas Kandagatla
Add GPR node along with APM(Audio Process Manager) and PRM(Proxy
resource Manager) audio services.
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 40 ++++++++++++++++++++++++++
1 file changed, 40 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
index c32bcded2aef..e3cdd8bccb0c 100644
--- a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
@@ -12,6 +12,7 @@
#include <dt-bindings/power/qcom-rpmpd.h>
#include <dt-bindings/soc/qcom,rpmh-rsc.h>
#include <dt-bindings/thermal/thermal.h>
+#include <dt-bindings/soc/qcom,gpr.h>
/ {
interrupt-parent = <&intc>;
@@ -1152,6 +1153,45 @@ IPCC_MPROC_SIGNAL_GLINK_QMP
label = "lpass";
qcom,remote-pid = <2>;
+
+ gpr {
+ compatible = "qcom,gpr";
+ qcom,glink-channels = "adsp_apps";
+ qcom,domain = <GPR_DOMAIN_ID_ADSP>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ qcom,intents = <512 20>;
+
+ q6apm: q6apm {
+ reg = <GPR_APM_MODULE_IID>;
+ compatible = "qcom,q6apm";
+ #sound-dai-cells = <0>;
+ qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd";
+ q6apmdai: dais {
+ compatible = "qcom,q6apm-dais";
+ #sound-dai-cells = <1>;
+ iommus = <&apps_smmu 0x0c01 0x0>;
+ };
+
+ q6apmbedai: bedais {
+ compatible = "qcom,q6apm-lpass-dais";
+ #sound-dai-cells = <1>;
+ };
+ };
+
+ q6prm: q6prm {
+ reg = <GPR_PRM_MODULE_IID>;
+ compatible = "qcom,q6prm";
+ #clock-cells = <2>;
+ qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd";
+ q6prmcc: cc {
+ compatible = "qcom,q6prm-lpass-clocks";
+ #clock-cells = <2>;
+ };
+ };
+
+ };
+
};
};
--
2.25.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 2/3] arm64: dts: qcom: sc8280xp/sa8540p: add SoundWire and LPASS
2022-11-15 17:02 [PATCH 0/3] arm64: dts: qcom: sc8280xp: add audio support Srinivas Kandagatla
2022-11-15 17:02 ` [PATCH 1/3] arm64: dts: qcom: sc8280xp/sa8540p: add gpr node Srinivas Kandagatla
@ 2022-11-15 17:02 ` Srinivas Kandagatla
2022-11-15 17:45 ` Konrad Dybcio
2022-11-16 8:10 ` Krzysztof Kozlowski
2022-11-15 17:02 ` [PATCH 3/3] arm64: dts: qcom: sc8280xp: Add soundcard support Srinivas Kandagatla
2 siblings, 2 replies; 13+ messages in thread
From: Srinivas Kandagatla @ 2022-11-15 17:02 UTC (permalink / raw)
To: agross, andersson
Cc: konrad.dybcio, robh+dt, krzysztof.kozlowski+dt, linux-arm-msm,
devicetree, linux-kernel, Srinivas Kandagatla
Add LPASS Codecs along with SoundWire controller for TX, RX, WSA and VA macros
along with LPASS LPI pinctrl node.
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 324 +++++++++++++++++++++++++
1 file changed, 324 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
index e3cdd8bccb0c..a87d58bee1e0 100644
--- a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
@@ -11,6 +11,7 @@
#include <dt-bindings/mailbox/qcom-ipcc.h>
#include <dt-bindings/power/qcom-rpmpd.h>
#include <dt-bindings/soc/qcom,rpmh-rsc.h>
+#include <dt-bindings/sound/qcom,q6afe.h>
#include <dt-bindings/thermal/thermal.h>
#include <dt-bindings/soc/qcom,gpr.h>
@@ -1115,6 +1116,9 @@ usb_2_ssphy1: phy@88f1e00 {
};
};
+ sound: sound {
+ };
+
remoteproc_adsp: remoteproc@3000000 {
compatible = "qcom,sc8280xp-adsp-pas";
reg = <0 0x03000000 0 0x100>;
@@ -1195,6 +1199,326 @@ q6prmcc: cc {
};
};
+ rxmacro: rxmacro@3200000 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&rx_swr_active>;
+ compatible = "qcom,sc8280xp-lpass-rx-macro";
+ reg = <0 0x3200000 0 0x1000>;
+ clocks = <&q6prmcc LPASS_CLK_ID_RX_CORE_TX_MCLK LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
+ <&q6prmcc LPASS_CLK_ID_RX_CORE_TX_2X_MCLK LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
+ <&q6prmcc LPASS_HW_MACRO_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
+ <&q6prmcc LPASS_HW_DCODEC_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
+ <&vamacro>;
+
+ clock-names = "mclk", "npl", "macro", "dcodec", "fsgen";
+
+ assigned-clocks = <&q6prmcc LPASS_CLK_ID_RX_CORE_TX_MCLK LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
+ <&q6prmcc LPASS_CLK_ID_RX_CORE_TX_2X_MCLK LPASS_CLK_ATTRIBUTE_COUPLE_NO>;
+ assigned-clock-rates = <19200000>, <19200000>;
+
+ #clock-cells = <0>;
+ clock-frequency = <19200000>;
+ clock-output-names = "mclk";
+ #sound-dai-cells = <1>;
+ };
+
+ /* RX */
+ swr1: soundwire-controller@3210000 {
+ reg = <0 0x3210000 0 0x2000>;
+ compatible = "qcom,soundwire-v1.6.0";
+ interrupts = <GIC_SPI 155 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&rxmacro>;
+ clock-names = "iface";
+ label = "RX";
+ qcom,din-ports = <0>;
+ qcom,dout-ports = <5>;
+
+ qcom,ports-sinterval-low = /bits/ 8 <0x03 0x1F 0x1F 0x07 0x00>;
+ qcom,ports-offset1 = /bits/ 8 <0x00 0x00 0x0B 0x01 0x00>;
+ qcom,ports-offset2 = /bits/ 8 <0x00 0x00 0x0B 0x00 0x00>;
+ qcom,ports-hstart = /bits/ 8 <0xFF 0x03 0xFF 0xFF 0xFF>;
+ qcom,ports-hstop = /bits/ 8 <0xFF 0x06 0xFF 0xFF 0xFF>;
+ qcom,ports-word-length = /bits/ 8 <0x01 0x07 0x04 0xFF 0xFF>;
+ qcom,ports-block-pack-mode = /bits/ 8 <0xFF 0x00 0x01 0xFF 0xFF>;
+ qcom,ports-lane-control = /bits/ 8 <0x01 0x00 0x00 0x00 0x00>;
+ qcom,ports-block-group-count = /bits/ 8 <0xFF 0xFF 0xFF 0xFF 0x00>;
+ #sound-dai-cells = <1>;
+ #address-cells = <2>;
+ #size-cells = <0>;
+ };
+
+ txmacro: txmacro@3220000 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&tx_swr_active>;
+ compatible = "qcom,sc8280xp-lpass-tx-macro";
+ reg = <0 0x3220000 0 0x1000>;
+ clocks = <&q6prmcc LPASS_CLK_ID_TX_CORE_MCLK LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
+ <&q6prmcc LPASS_CLK_ID_TX_CORE_NPL_MCLK LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
+ <&q6prmcc LPASS_HW_MACRO_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
+ <&q6prmcc LPASS_HW_DCODEC_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
+ <&vamacro>;
+
+ clock-names = "mclk", "npl", "macro", "dcodec", "fsgen";
+ assigned-clocks = <&q6prmcc LPASS_CLK_ID_TX_CORE_MCLK LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
+ <&q6prmcc LPASS_CLK_ID_TX_CORE_NPL_MCLK LPASS_CLK_ATTRIBUTE_COUPLE_NO>;
+ assigned-clock-rates = <19200000>, <19200000>;
+
+ #clock-cells = <0>;
+ clock-frequency = <19200000>;
+ clock-output-names = "mclk";
+ #address-cells = <2>;
+ #size-cells = <2>;
+ #sound-dai-cells = <1>;
+ };
+
+ /* TX */
+ swr2: soundwire-controller@3330000 {
+ reg = <0 0x3330000 0 0x2000>;
+ compatible = "qcom,soundwire-v1.6.0";
+ interrupts-extended = <&intc GIC_SPI 959 IRQ_TYPE_LEVEL_HIGH>,
+ <&intc GIC_SPI 520 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "core", "wake";
+
+ clocks = <&vamacro>;
+ clock-names = "iface";
+ label = "TX";
+
+ qcom,din-ports = <4>;
+ qcom,dout-ports = <0>;
+ qcom,ports-sinterval-low = /bits/ 8 <0x01 0x03 0x03 0x03>;
+ qcom,ports-offset1 = /bits/ 8 <0x01 0x00 0x02 0x01>;
+ qcom,ports-offset2 = /bits/ 8 <0x00 0x00 0x00 0x00>;
+ qcom,ports-block-pack-mode = /bits/ 8 <0xFF 0xFF 0xFF 0xFF>;
+ qcom,ports-hstart = /bits/ 8 <0xFF 0xFF 0xFF 0xFF>;
+ qcom,ports-hstop = /bits/ 8 <0xFF 0xFF 0xFF 0xFF>;
+ qcom,ports-word-length = /bits/ 8 <0xFF 0x00 0xFF 0xFF>;
+ qcom,ports-block-group-count = /bits/ 8 <0xFF 0xFF 0xFF 0xFF>;
+ qcom,ports-lane-control = /bits/ 8 <0x00 0x01 0x00 0x00>;
+ qcom,port-offset = <1>;
+ #sound-dai-cells = <1>;
+ #address-cells = <2>;
+ #size-cells = <0>;
+ };
+
+ wsamacro: codec@3240000 {
+ compatible = "qcom,sc8280xp-lpass-wsa-macro";
+ reg = <0 0x03240000 0 0x1000>;
+ clocks = <&q6prmcc LPASS_CLK_ID_WSA_CORE_TX_MCLK LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
+ <&q6prmcc LPASS_CLK_ID_WSA_CORE_TX_2X_MCLK LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
+ <&q6prmcc LPASS_HW_MACRO_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
+ <&q6prmcc LPASS_HW_DCODEC_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
+ <&vamacro>;
+ clock-names = "mclk", "npl", "macro", "dcodec", "fsgen";
+
+ assigned-clocks = <&q6prmcc LPASS_CLK_ID_WSA_CORE_TX_MCLK LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
+ <&q6prmcc LPASS_CLK_ID_WSA_CORE_TX_2X_MCLK LPASS_CLK_ATTRIBUTE_COUPLE_NO>;
+ assigned-clock-rates = <19200000>, <19200000>;
+
+ #clock-cells = <0>;
+ clock-frequency = <19200000>;
+ clock-output-names = "mclk";
+ #sound-dai-cells = <1>;
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&wsa_swr_active>;
+ };
+
+ /* WSA */
+ swr0: soundwire-controller@3250000 {
+ reg = <0 0x03250000 0 0x2000>;
+ compatible = "qcom,soundwire-v1.6.0";
+ interrupts = <GIC_SPI 170 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&wsamacro>;
+ clock-names = "iface";
+
+ qcom,din-ports = <2>;
+ qcom,dout-ports = <6>;
+
+ qcom,ports-sinterval-low = /bits/ 8 <0x07 0x1f 0x3f 0x07 0x1f 0x3f 0x0f 0x0f>;
+ qcom,ports-offset1 = /bits/ 8 <0x01 0x02 0x0c 0x06 0x12 0x0d 0x07 0x0a>;
+ qcom,ports-offset2 = /bits/ 8 <0xFF 0x00 0x1f 0xff 0x00 0x1f 0x00 0x00>;
+ qcom,ports-hstart = /bits/ 8 <0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF>;
+ qcom,ports-hstop = /bits/ 8 <0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF>;
+ qcom,ports-word-length = /bits/ 8 <0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF>;
+ qcom,ports-block-pack-mode = /bits/ 8 <0xFF 0xFF 0x01 0xFF 0xFF 0x01 0xFF 0xFF>;
+ qcom,ports-block-group-count = /bits/ 8 <0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF>;
+ qcom,ports-lane-control = /bits/ 8 <0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF>;
+ qcom,port-offset = <1>;
+ #sound-dai-cells = <1>;
+ #address-cells = <2>;
+ #size-cells = <0>;
+ };
+
+ vamacro: codec@3370000 {
+ compatible = "qcom,sc8280xp-lpass-va-macro";
+ reg = <0 0x03370000 0 0x1000>;
+ clocks = <&q6prmcc LPASS_CLK_ID_TX_CORE_MCLK LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
+ <&q6prmcc LPASS_CLK_ID_TX_CORE_NPL_MCLK LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
+ <&q6prmcc LPASS_HW_MACRO_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
+ <&q6prmcc LPASS_HW_DCODEC_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>;
+
+ clock-names = "mclk", "npl", "macro", "dcodec";
+ assigned-clocks = <&q6prmcc LPASS_CLK_ID_TX_CORE_MCLK LPASS_CLK_ATTRIBUTE_COUPLE_NO>;
+ assigned-clock-rates = <19200000>;
+
+ #clock-cells = <0>;
+ clock-frequency = <19200000>;
+ clock-output-names = "fsgen";
+ #sound-dai-cells = <1>;
+ };
+
+ lpass_tlmm: pinctrl@33c0000 {
+ compatible = "qcom,sc8280xp-lpass-lpi-pinctrl";
+ reg = <0 0x33c0000 0x0 0x20000>,
+ <0 0x3550000 0x0 0x10000>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ gpio-ranges = <&lpass_tlmm 0 0 18>;
+
+ clocks = <&q6prmcc LPASS_HW_MACRO_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
+ <&q6prmcc LPASS_HW_DCODEC_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>;
+ clock-names = "core", "audio";
+
+ wsa_swr_active: wsa-swr-active-pins {
+ clk {
+ pins = "gpio10";
+ function = "wsa_swr_clk";
+ drive-strength = <2>;
+ slew-rate = <1>;
+ bias-disable;
+ };
+
+ data {
+ pins = "gpio11";
+ function = "wsa_swr_data";
+ drive-strength = <2>;
+ slew-rate = <1>;
+ bias-bus-hold;
+
+ };
+ };
+
+ tx_swr_active: tx_swr-active-pins {
+ clk {
+ pins = "gpio0";
+ function = "swr_tx_clk";
+ drive-strength = <2>;
+ slew-rate = <1>;
+ bias-disable;
+ };
+
+ data {
+ pins = "gpio1", "gpio2";
+ function = "swr_tx_data";
+ drive-strength = <2>;
+ slew-rate = <1>;
+ bias-bus-hold;
+ };
+ };
+
+ rx_swr_active: rx_swr-active-pins {
+ clk {
+ pins = "gpio3";
+ function = "swr_rx_clk";
+ drive-strength = <2>;
+ slew-rate = <1>;
+ bias-disable;
+ };
+
+ data {
+ pins = "gpio4", "gpio5";
+ function = "swr_rx_data";
+ drive-strength = <2>;
+ slew-rate = <1>;
+ bias-bus-hold;
+ };
+ };
+
+ wsa2_swr_active: wsa2-swr-active-pins {
+ clk {
+ pins = "gpio15";
+ function = "wsa2_swr_clk";
+ drive-strength = <2>;
+ slew-rate = <1>;
+ bias-disable;
+ };
+
+ data {
+ pins = "gpio16";
+ function = "wsa2_swr_data";
+ drive-strength = <2>;
+ slew-rate = <1>;
+ bias-bus-hold;
+ };
+ };
+
+ dmic01_active: dmic01-active-pins {
+ clk {
+ pins = "gpio6";
+ function = "dmic1_clk";
+ drive-strength = <8>;
+ output-high;
+ };
+ data {
+ pins = "gpio7";
+ function = "dmic1_data";
+ drive-strength = <8>;
+ input-enable;
+ };
+ };
+
+ dmic01_sleep: dmic01-sleep-pins {
+ clk {
+ pins = "gpio6";
+ function = "dmic1_clk";
+ drive-strength = <2>;
+ bias-disable;
+ output-low;
+ };
+
+ data {
+ pins = "gpio7";
+ function = "dmic1_data";
+ drive-strength = <2>;
+ pull-down;
+ input-enable;
+ };
+ };
+
+ dmic02_active: dmic02-active-pins {
+ clk {
+ pins = "gpio8";
+ function = "dmic2_clk";
+ drive-strength = <8>;
+ output-high;
+ };
+ data {
+ pins = "gpio9";
+ function = "dmic2_data";
+ drive-strength = <8>;
+ input-enable;
+ };
+ };
+
+ dmic02_sleep: dmic02-sleep-pins {
+ clk {
+ pins = "gpio8";
+ function = "dmic2_clk";
+ drive-strength = <2>;
+ bias-disable;
+ output-low;
+ };
+
+ data {
+ pins = "gpio9";
+ function = "dmic2_data";
+ drive-strength = <2>;
+ pull-down;
+ input-enable;
+ };
+ };
+ };
+
usb_0_qmpphy: phy-wrapper@88ec000 {
compatible = "qcom,sc8280xp-qmp-usb43dp-phy";
reg = <0 0x088ec000 0 0x1e4>,
--
2.25.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 3/3] arm64: dts: qcom: sc8280xp: Add soundcard support
2022-11-15 17:02 [PATCH 0/3] arm64: dts: qcom: sc8280xp: add audio support Srinivas Kandagatla
2022-11-15 17:02 ` [PATCH 1/3] arm64: dts: qcom: sc8280xp/sa8540p: add gpr node Srinivas Kandagatla
2022-11-15 17:02 ` [PATCH 2/3] arm64: dts: qcom: sc8280xp/sa8540p: add SoundWire and LPASS Srinivas Kandagatla
@ 2022-11-15 17:02 ` Srinivas Kandagatla
2022-11-15 17:48 ` Konrad Dybcio
` (2 more replies)
2 siblings, 3 replies; 13+ messages in thread
From: Srinivas Kandagatla @ 2022-11-15 17:02 UTC (permalink / raw)
To: agross, andersson
Cc: konrad.dybcio, robh+dt, krzysztof.kozlowski+dt, linux-arm-msm,
devicetree, linux-kernel, Srinivas Kandagatla
Add support for SoundCard on X13s. This patch adds support for Headset
Playback, record and 2 DMICs on the Panel along with the regulators
required for powering up the LPASS codecs.
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
.../qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 213 ++++++++++++++++++
1 file changed, 213 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
index b2b744bb8a53..99c3021e8149 100644
--- a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
+++ b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
@@ -58,6 +58,16 @@ vreg_misc_3p3: regulator-misc-3p3 {
regulator-boot-on;
regulator-always-on;
};
+
+ vph_pwr: vph-pwr-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "VPH_VCC3R9";
+ regulator-min-microvolt = <3900000>;
+ regulator-max-microvolt = <3900000>;
+
+ regulator-always-on;
+ regulator-boot-on;
+ };
};
&apps_rsc {
@@ -67,6 +77,13 @@ pmc8280-1-rpmh-regulators {
vdd-l3-l5-supply = <&vreg_s11b>;
+ vreg_s10b: smps10 {
+ regulator-name = "vreg_s10b";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
vreg_s11b: smps11 {
regulator-name = "vreg_s11b";
regulator-min-microvolt = <1272000>;
@@ -74,6 +91,13 @@ vreg_s11b: smps11 {
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
+ vreg_s12b: smps12 {
+ regulator-name = "vreg_s12b";
+ regulator-min-microvolt = <984000>;
+ regulator-max-microvolt = <984000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
vreg_l3b: ldo3 {
regulator-name = "vreg_l3b";
regulator-min-microvolt = <1200000>;
@@ -102,6 +126,7 @@ vreg_l6b: ldo6 {
pmc8280c-rpmh-regulators {
compatible = "qcom,pm8350c-rpmh-regulators";
qcom,pmic-id = "c";
+ vdd-bob-supply = <&vph_pwr>;
vreg_l1c: ldo1 {
regulator-name = "vreg_l1c";
@@ -123,6 +148,13 @@ vreg_l13c: ldo13 {
regulator-max-microvolt = <3072000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
+
+ vreg_bob: bob {
+ regulator-name = "vreg_bob";
+ regulator-min-microvolt = <3008000>;
+ regulator-max-microvolt = <3960000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_AUTO>;
+ };
};
pmc8280-2-rpmh-regulators {
@@ -268,6 +300,80 @@ &remoteproc_nsp0 {
status = "okay";
};
+&sound {
+ compatible = "qcom,sc8280xp-sndcard";
+ model = "SC8280XP-LENOVO-X13S";
+ audio-routing =
+ "SpkrLeft IN", "WSA_SPK1 OUT",
+ "SpkrRight IN", "WSA_SPK2 OUT",
+ "IN1_HPHL", "HPHL_OUT",
+ "IN2_HPHR", "HPHR_OUT",
+ "AMIC2", "MIC BIAS2",
+ "VA DMIC0", "MIC BIAS1",
+ "VA DMIC1", "MIC BIAS1",
+ "VA DMIC2", "MIC BIAS3",
+ "TX DMIC0", "MIC BIAS1",
+ "TX DMIC1", "MIC BIAS2",
+ "TX DMIC2", "MIC BIAS3",
+ "TX SWR_ADC1", "ADC2_OUTPUT";
+
+ wcd-playback-dai-link {
+ link-name = "WCD Playback";
+ cpu {
+ sound-dai = <&q6apmbedai RX_CODEC_DMA_RX_0>;
+ };
+ codec {
+ sound-dai = <&wcd938x 0>, <&swr1 0>, <&rxmacro 0>;
+ };
+ platform {
+ sound-dai = <&q6apm>;
+ };
+ };
+
+ wcd-capture-dai-link {
+ link-name = "WCD Capture";
+ cpu {
+ sound-dai = <&q6apmbedai TX_CODEC_DMA_TX_3>;
+ };
+
+ codec {
+ sound-dai = <&wcd938x 1>, <&swr2 0>, <&txmacro 0>;
+ };
+ platform {
+ sound-dai = <&q6apm>;
+ };
+ };
+
+ wsa-dai-link {
+ link-name = "WSA Playback";
+ cpu {
+ sound-dai = <&q6apmbedai WSA_CODEC_DMA_RX_0>;
+ };
+
+ codec {
+ sound-dai = <&left_spkr>, <&right_spkr>, <&swr0 0>, <&wsamacro 0>;
+ };
+ platform {
+ sound-dai = <&q6apm>;
+ };
+ };
+
+ va-dai-link {
+ link-name = "VA Capture";
+ cpu {
+ sound-dai = <&q6apmbedai TX_CODEC_DMA_TX_3>;
+ };
+
+ platform {
+ sound-dai = <&q6apm>;
+ };
+
+ codec {
+ sound-dai = <&vamacro 0>;
+ };
+ };
+};
+
&usb_0 {
status = "okay";
};
@@ -346,9 +452,96 @@ edp_bl_pwm: edp-bl-pwm-state {
};
};
+&soc {
+ wcd938x: codec {
+ compatible = "qcom,wcd9380-codec";
+ #sound-dai-cells = <1>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&wcd_default>;
+ reset-gpios = <&tlmm 106 0>;
+
+ vdd-buck-supply = <&vreg_s10b>;
+ vdd-rxtx-supply = <&vreg_s10b>;
+ vdd-io-supply = <&vreg_s10b>;
+ vdd-mic-bias-supply = <&vreg_bob>;
+ qcom,micbias1-microvolt = <1800000>;
+ qcom,micbias2-microvolt = <1800000>;
+ qcom,micbias3-microvolt = <1800000>;
+ qcom,micbias4-microvolt = <1800000>;
+ qcom,mbhc-buttons-vthreshold-microvolt = <75000 150000 237000 500000 500000 500000 500000 500000>;
+ qcom,mbhc-headset-vthreshold-microvolt = <1700000>;
+ qcom,mbhc-headphone-vthreshold-microvolt = <50000>;
+ qcom,rx-device = <&wcd_rx>;
+ qcom,tx-device = <&wcd_tx>;
+ };
+};
+
+&swr0 {
+ left_spkr: wsa8830-left@0,1 {
+ compatible = "sdw10217020200";
+ pinctrl-names = "default";
+ pinctrl-0 = <&spkr_1_sd_n_active>;
+ powerdown-gpios = <&tlmm 178 GPIO_ACTIVE_HIGH>;
+ reg = <0 1>;
+ #thermal-sensor-cells = <0>;
+ sound-name-prefix = "SpkrLeft";
+ #sound-dai-cells = <0>;
+ vdd-supply = <&vreg_s10b>;
+ };
+
+ right_spkr: wsa8830-right@0,2{
+ pinctrl-names = "default";
+ pinctrl-0 = <&spkr_2_sd_n_active>;
+ powerdown-gpios = <&tlmm 179 GPIO_ACTIVE_HIGH>;
+ compatible = "sdw10217020200";
+ reg = <0 2>;
+ #thermal-sensor-cells = <0>;
+ sound-name-prefix = "SpkrRight";
+ #sound-dai-cells = <0>;
+ vdd-supply = <&vreg_s10b>;
+ };
+};
+
+
+&swr1 {
+ status = "okay";
+
+ wcd_rx: wcd9380-rx@0,4 {
+ compatible = "sdw20217010d00";
+ reg = <0 4>;
+ qcom,rx-port-mapping = <1 2 3 4 5 6>;
+
+ };
+};
+
+&swr2 {
+ status = "okay";
+
+ wcd_tx: wcd9380-tx@0,3 {
+ compatible = "sdw20217010d00";
+ reg = <0 3>;
+ qcom,tx-port-mapping = <1 1 2 3>;
+ };
+};
+
+&vamacro {
+ pinctrl-0 = <&dmic01_active>, <&dmic02_active>;
+ pinctrl-names = "default";
+ vdd-micb-supply = <&vreg_s10b>;
+ qcom,dmic-sample-rate = <600000>;
+};
+
&tlmm {
gpio-reserved-ranges = <70 2>, <74 6>, <83 4>, <125 2>, <128 2>, <154 7>;
+ wcd_default: wcd-default-state {
+ reset {
+ pins = "gpio106";
+ function = "gpio";
+ bias-disable;
+ };
+ };
+
kybd_default: kybd-default-state {
disable {
pins = "gpio102";
@@ -383,6 +576,26 @@ qup2_i2c5_default: qup2-i2c5-default-state {
drive-strength = <16>;
};
+ spkr_1_sd_n_active: spkr_1_sd_n_active {
+ perst-n {
+ pins = "gpio178";
+ function = "gpio";
+ drive-strength = <16>;
+ bias-disable;
+ output-high;
+ };
+ };
+
+ spkr_2_sd_n_active: spkr_2_sd_n_active {
+ perst-n {
+ pins = "gpio179";
+ function = "gpio";
+ drive-strength = <16>;
+ bias-disable;
+ output-high;
+ };
+ };
+
tpad_default: tpad-default-state {
int-n {
pins = "gpio182";
--
2.25.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [PATCH 2/3] arm64: dts: qcom: sc8280xp/sa8540p: add SoundWire and LPASS
2022-11-15 17:02 ` [PATCH 2/3] arm64: dts: qcom: sc8280xp/sa8540p: add SoundWire and LPASS Srinivas Kandagatla
@ 2022-11-15 17:45 ` Konrad Dybcio
2022-11-16 8:10 ` Krzysztof Kozlowski
1 sibling, 0 replies; 13+ messages in thread
From: Konrad Dybcio @ 2022-11-15 17:45 UTC (permalink / raw)
To: Srinivas Kandagatla, agross, andersson
Cc: robh+dt, krzysztof.kozlowski+dt, linux-arm-msm, devicetree, linux-kernel
On 15/11/2022 18:02, Srinivas Kandagatla wrote:
> Add LPASS Codecs along with SoundWire controller for TX, RX, WSA and VA macros
> along with LPASS LPI pinctrl node.
>
> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> ---
> arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 324 +++++++++++++++++++++++++
> 1 file changed, 324 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
> index e3cdd8bccb0c..a87d58bee1e0 100644
> --- a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
> @@ -11,6 +11,7 @@
> #include <dt-bindings/mailbox/qcom-ipcc.h>
> #include <dt-bindings/power/qcom-rpmpd.h>
> #include <dt-bindings/soc/qcom,rpmh-rsc.h>
> +#include <dt-bindings/sound/qcom,q6afe.h>
> #include <dt-bindings/thermal/thermal.h>
> #include <dt-bindings/soc/qcom,gpr.h>
>
> @@ -1115,6 +1116,9 @@ usb_2_ssphy1: phy@88f1e00 {
> };
> };
>
> + sound: sound {
> + };
> +
> remoteproc_adsp: remoteproc@3000000 {
> compatible = "qcom,sc8280xp-adsp-pas";
> reg = <0 0x03000000 0 0x100>;
> @@ -1195,6 +1199,326 @@ q6prmcc: cc {
> };
> };
>
> + rxmacro: rxmacro@3200000 {
> + pinctrl-names = "default";
> + pinctrl-0 = <&rx_swr_active>;
> + compatible = "qcom,sc8280xp-lpass-rx-macro";
Hi!
Please make compatible and reg go first, pinctrl cango after
assigned-clock-rates. Applies to all cases.
> + reg = <0 0x3200000 0 0x1000>;
Please pad the address field to 8 hex digits. Applies to all cases.
> + clocks = <&q6prmcc LPASS_CLK_ID_RX_CORE_TX_MCLK LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
> + <&q6prmcc LPASS_CLK_ID_RX_CORE_TX_2X_MCLK LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
> + <&q6prmcc LPASS_HW_MACRO_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
> + <&q6prmcc LPASS_HW_DCODEC_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
> + <&vamacro>;
> +
> + clock-names = "mclk", "npl", "macro", "dcodec", "fsgen";
> +
> + assigned-clocks = <&q6prmcc LPASS_CLK_ID_RX_CORE_TX_MCLK LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
> + <&q6prmcc LPASS_CLK_ID_RX_CORE_TX_2X_MCLK LPASS_CLK_ATTRIBUTE_COUPLE_NO>;
> + assigned-clock-rates = <19200000>, <19200000>;
> +
> + #clock-cells = <0>;
> + clock-frequency = <19200000>;
> + clock-output-names = "mclk";
> + #sound-dai-cells = <1>;
> + };
> +
> + /* RX */
> + swr1: soundwire-controller@3210000 {
> + reg = <0 0x3210000 0 0x2000>;
> + compatible = "qcom,soundwire-v1.6.0";
> + interrupts = <GIC_SPI 155 IRQ_TYPE_LEVEL_HIGH>;
> + clocks = <&rxmacro>;
> + clock-names = "iface";
> + label = "RX";
> + qcom,din-ports = <0>;
> + qcom,dout-ports = <5>;
> +
> + qcom,ports-sinterval-low = /bits/ 8 <0x03 0x1F 0x1F 0x07 0x00>;
Please use lowercase hex throughout dt.
> + qcom,ports-offset1 = /bits/ 8 <0x00 0x00 0x0B 0x01 0x00>;
> + qcom,ports-offset2 = /bits/ 8 <0x00 0x00 0x0B 0x00 0x00>;
> + qcom,ports-hstart = /bits/ 8 <0xFF 0x03 0xFF 0xFF 0xFF>;
> + qcom,ports-hstop = /bits/ 8 <0xFF 0x06 0xFF 0xFF 0xFF>;
> + qcom,ports-word-length = /bits/ 8 <0x01 0x07 0x04 0xFF 0xFF>;
> + qcom,ports-block-pack-mode = /bits/ 8 <0xFF 0x00 0x01 0xFF 0xFF>;
> + qcom,ports-lane-control = /bits/ 8 <0x01 0x00 0x00 0x00 0x00>;
> + qcom,ports-block-group-count = /bits/ 8 <0xFF 0xFF 0xFF 0xFF 0x00>;
> + #sound-dai-cells = <1>;
> + #address-cells = <2>;
> + #size-cells = <0>;
> + };
> +
> + txmacro: txmacro@3220000 {
> + pinctrl-names = "default";
> + pinctrl-0 = <&tx_swr_active>;
> + compatible = "qcom,sc8280xp-lpass-tx-macro";
> + reg = <0 0x3220000 0 0x1000>;
> + clocks = <&q6prmcc LPASS_CLK_ID_TX_CORE_MCLK LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
> + <&q6prmcc LPASS_CLK_ID_TX_CORE_NPL_MCLK LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
> + <&q6prmcc LPASS_HW_MACRO_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
> + <&q6prmcc LPASS_HW_DCODEC_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
> + <&vamacro>;
> +
> + clock-names = "mclk", "npl", "macro", "dcodec", "fsgen";
> + assigned-clocks = <&q6prmcc LPASS_CLK_ID_TX_CORE_MCLK LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
> + <&q6prmcc LPASS_CLK_ID_TX_CORE_NPL_MCLK LPASS_CLK_ATTRIBUTE_COUPLE_NO>;
> + assigned-clock-rates = <19200000>, <19200000>;
> +
> + #clock-cells = <0>;
> + clock-frequency = <19200000>;
> + clock-output-names = "mclk";
> + #address-cells = <2>;
> + #size-cells = <2>;
> + #sound-dai-cells = <1>;
> + };
> +
> + /* TX */
> + swr2: soundwire-controller@3330000 {
> + reg = <0 0x3330000 0 0x2000>;
> + compatible = "qcom,soundwire-v1.6.0";
> + interrupts-extended = <&intc GIC_SPI 959 IRQ_TYPE_LEVEL_HIGH>,
> + <&intc GIC_SPI 520 IRQ_TYPE_LEVEL_HIGH>;
> + interrupt-names = "core", "wake";
> +
> + clocks = <&vamacro>;
> + clock-names = "iface";
> + label = "TX";
> +
> + qcom,din-ports = <4>;
> + qcom,dout-ports = <0>;
> + qcom,ports-sinterval-low = /bits/ 8 <0x01 0x03 0x03 0x03>;
> + qcom,ports-offset1 = /bits/ 8 <0x01 0x00 0x02 0x01>;
> + qcom,ports-offset2 = /bits/ 8 <0x00 0x00 0x00 0x00>;
> + qcom,ports-block-pack-mode = /bits/ 8 <0xFF 0xFF 0xFF 0xFF>;
> + qcom,ports-hstart = /bits/ 8 <0xFF 0xFF 0xFF 0xFF>;
> + qcom,ports-hstop = /bits/ 8 <0xFF 0xFF 0xFF 0xFF>;
> + qcom,ports-word-length = /bits/ 8 <0xFF 0x00 0xFF 0xFF>;
> + qcom,ports-block-group-count = /bits/ 8 <0xFF 0xFF 0xFF 0xFF>;
> + qcom,ports-lane-control = /bits/ 8 <0x00 0x01 0x00 0x00>;
> + qcom,port-offset = <1>;
> + #sound-dai-cells = <1>;
> + #address-cells = <2>;
> + #size-cells = <0>;
> + };
> +
> + wsamacro: codec@3240000 {
> + compatible = "qcom,sc8280xp-lpass-wsa-macro";
> + reg = <0 0x03240000 0 0x1000>;
> + clocks = <&q6prmcc LPASS_CLK_ID_WSA_CORE_TX_MCLK LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
> + <&q6prmcc LPASS_CLK_ID_WSA_CORE_TX_2X_MCLK LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
> + <&q6prmcc LPASS_HW_MACRO_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
> + <&q6prmcc LPASS_HW_DCODEC_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
> + <&vamacro>;
> + clock-names = "mclk", "npl", "macro", "dcodec", "fsgen";
> +
> + assigned-clocks = <&q6prmcc LPASS_CLK_ID_WSA_CORE_TX_MCLK LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
> + <&q6prmcc LPASS_CLK_ID_WSA_CORE_TX_2X_MCLK LPASS_CLK_ATTRIBUTE_COUPLE_NO>;
> + assigned-clock-rates = <19200000>, <19200000>;
> +
> + #clock-cells = <0>;
> + clock-frequency = <19200000>;
> + clock-output-names = "mclk";
> + #sound-dai-cells = <1>;
> +
> + pinctrl-names = "default";
> + pinctrl-0 = <&wsa_swr_active>;
> + };
> +
> + /* WSA */
> + swr0: soundwire-controller@3250000 {
> + reg = <0 0x03250000 0 0x2000>;
> + compatible = "qcom,soundwire-v1.6.0";
> + interrupts = <GIC_SPI 170 IRQ_TYPE_LEVEL_HIGH>;
> + clocks = <&wsamacro>;
> + clock-names = "iface";
> +
> + qcom,din-ports = <2>;
> + qcom,dout-ports = <6>;
> +
> + qcom,ports-sinterval-low = /bits/ 8 <0x07 0x1f 0x3f 0x07 0x1f 0x3f 0x0f 0x0f>;
> + qcom,ports-offset1 = /bits/ 8 <0x01 0x02 0x0c 0x06 0x12 0x0d 0x07 0x0a>;
> + qcom,ports-offset2 = /bits/ 8 <0xFF 0x00 0x1f 0xff 0x00 0x1f 0x00 0x00>;
> + qcom,ports-hstart = /bits/ 8 <0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF>;
> + qcom,ports-hstop = /bits/ 8 <0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF>;
> + qcom,ports-word-length = /bits/ 8 <0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF>;
> + qcom,ports-block-pack-mode = /bits/ 8 <0xFF 0xFF 0x01 0xFF 0xFF 0x01 0xFF 0xFF>;
> + qcom,ports-block-group-count = /bits/ 8 <0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF>;
> + qcom,ports-lane-control = /bits/ 8 <0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF>;
> + qcom,port-offset = <1>;
> + #sound-dai-cells = <1>;
> + #address-cells = <2>;
> + #size-cells = <0>;
> + };
> +
> + vamacro: codec@3370000 {
> + compatible = "qcom,sc8280xp-lpass-va-macro";
> + reg = <0 0x03370000 0 0x1000>;
> + clocks = <&q6prmcc LPASS_CLK_ID_TX_CORE_MCLK LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
> + <&q6prmcc LPASS_CLK_ID_TX_CORE_NPL_MCLK LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
> + <&q6prmcc LPASS_HW_MACRO_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
> + <&q6prmcc LPASS_HW_DCODEC_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>;
> +
> + clock-names = "mclk", "npl", "macro", "dcodec";
> + assigned-clocks = <&q6prmcc LPASS_CLK_ID_TX_CORE_MCLK LPASS_CLK_ATTRIBUTE_COUPLE_NO>;
> + assigned-clock-rates = <19200000>;
> +
> + #clock-cells = <0>;
> + clock-frequency = <19200000>;
> + clock-output-names = "fsgen";
> + #sound-dai-cells = <1>;
> + };
> +
> + lpass_tlmm: pinctrl@33c0000 {
> + compatible = "qcom,sc8280xp-lpass-lpi-pinctrl";
> + reg = <0 0x33c0000 0x0 0x20000>,
> + <0 0x3550000 0x0 0x10000>;
> + gpio-controller;
> + #gpio-cells = <2>;
> + gpio-ranges = <&lpass_tlmm 0 0 18>;
> +
> + clocks = <&q6prmcc LPASS_HW_MACRO_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
> + <&q6prmcc LPASS_HW_DCODEC_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>;
> + clock-names = "core", "audio";
> +
> + wsa_swr_active: wsa-swr-active-pins {
This will not pass dtbs_check. The top-level node names need to end in
-state, whereas their children's (if there are any) need to end in -pins.
See the example in
Documentation/devicetree/bindings/pinctrl/qcom,sc8280xp-lpass-lpi-pinctrl.yaml.
Also, please sort them somehow. If they all concern contiguous GPIO
blocks, maybe sorting by GPIO number would make sense?
> + clk {
> + pins = "gpio10";
> + function = "wsa_swr_clk";
> + drive-strength = <2>;
> + slew-rate = <1>;
> + bias-disable;
> + };
> +
> + data {
> + pins = "gpio11";
> + function = "wsa_swr_data";
> + drive-strength = <2>;
> + slew-rate = <1>;
> + bias-bus-hold;
> +
> + };
> + };
> +
> + tx_swr_active: tx_swr-active-pins {
No underscores in node names.
> + clk {
> + pins = "gpio0";
> + function = "swr_tx_clk";
> + drive-strength = <2>;
> + slew-rate = <1>;
> + bias-disable;
> + };
> +
> + data {
> + pins = "gpio1", "gpio2";
> + function = "swr_tx_data";
> + drive-strength = <2>;
> + slew-rate = <1>;
> + bias-bus-hold;
> + };
> + };
> +
> + rx_swr_active: rx_swr-active-pins {
> + clk {
> + pins = "gpio3";
> + function = "swr_rx_clk";
> + drive-strength = <2>;
> + slew-rate = <1>;
> + bias-disable;
> + };
> +
> + data {
> + pins = "gpio4", "gpio5";
> + function = "swr_rx_data";
> + drive-strength = <2>;
> + slew-rate = <1>;
> + bias-bus-hold;
> + };
> + };
> +
> + wsa2_swr_active: wsa2-swr-active-pins {
> + clk {
> + pins = "gpio15";
> + function = "wsa2_swr_clk";
> + drive-strength = <2>;
> + slew-rate = <1>;
> + bias-disable;
> + };
> +
> + data {
> + pins = "gpio16";
> + function = "wsa2_swr_data";
> + drive-strength = <2>;
> + slew-rate = <1>;
> + bias-bus-hold;
> + };
> + };
> +
> + dmic01_active: dmic01-active-pins {
> + clk {
> + pins = "gpio6";
> + function = "dmic1_clk";
> + drive-strength = <8>;
> + output-high;
> + };
> + data {
> + pins = "gpio7";
> + function = "dmic1_data";
> + drive-strength = <8>;
> + input-enable;
> + };
> + };
> +
> + dmic01_sleep: dmic01-sleep-pins {
> + clk {
> + pins = "gpio6";
> + function = "dmic1_clk";
> + drive-strength = <2>;
> + bias-disable;
> + output-low;
> + };
> +
> + data {
> + pins = "gpio7";
> + function = "dmic1_data";
> + drive-strength = <2>;
> + pull-down;
bias-pull-down?
> + input-enable;
> + };
> + };
> +
> + dmic02_active: dmic02-active-pins {
> + clk {
> + pins = "gpio8";
> + function = "dmic2_clk";
> + drive-strength = <8>;
> + output-high;
> + };
> + data {
> + pins = "gpio9";
> + function = "dmic2_data";
> + drive-strength = <8>;
> + input-enable;
> + };
> + };
> +
> + dmic02_sleep: dmic02-sleep-pins {
> + clk {
> + pins = "gpio8";
> + function = "dmic2_clk";
> + drive-strength = <2>;
> + bias-disable;
> + output-low;
> + };
> +
> + data {
> + pins = "gpio9";
> + function = "dmic2_data";
> + drive-strength = <2>;
> + pull-down;
bias-pull-down?
Konrad
> + input-enable;
> + };
> + };
> + };
> +
> usb_0_qmpphy: phy-wrapper@88ec000 {
> compatible = "qcom,sc8280xp-qmp-usb43dp-phy";
> reg = <0 0x088ec000 0 0x1e4>,
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 3/3] arm64: dts: qcom: sc8280xp: Add soundcard support
2022-11-15 17:02 ` [PATCH 3/3] arm64: dts: qcom: sc8280xp: Add soundcard support Srinivas Kandagatla
@ 2022-11-15 17:48 ` Konrad Dybcio
2022-11-16 8:13 ` Krzysztof Kozlowski
2022-11-16 11:09 ` Johan Hovold
2 siblings, 0 replies; 13+ messages in thread
From: Konrad Dybcio @ 2022-11-15 17:48 UTC (permalink / raw)
To: Srinivas Kandagatla, agross, andersson
Cc: robh+dt, krzysztof.kozlowski+dt, linux-arm-msm, devicetree, linux-kernel
On 15/11/2022 18:02, Srinivas Kandagatla wrote:
> Add support for SoundCard on X13s. This patch adds support for Headset
> Playback, record and 2 DMICs on the Panel along with the regulators
> required for powering up the LPASS codecs.
>
> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> ---
> .../qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 213 ++++++++++++++++++
> 1 file changed, 213 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
> index b2b744bb8a53..99c3021e8149 100644
> --- a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
> +++ b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
> @@ -58,6 +58,16 @@ vreg_misc_3p3: regulator-misc-3p3 {
> regulator-boot-on;
> regulator-always-on;
> };
> +
> + vph_pwr: vph-pwr-regulator {
> + compatible = "regulator-fixed";
> + regulator-name = "VPH_VCC3R9";
> + regulator-min-microvolt = <3900000>;
> + regulator-max-microvolt = <3900000>;
> +
> + regulator-always-on;
> + regulator-boot-on;
> + };
> };
>
> &apps_rsc {
> @@ -67,6 +77,13 @@ pmc8280-1-rpmh-regulators {
>
> vdd-l3-l5-supply = <&vreg_s11b>;
>
> + vreg_s10b: smps10 {
> + regulator-name = "vreg_s10b";
> + regulator-min-microvolt = <1800000>;
> + regulator-max-microvolt = <1800000>;
> + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> + };
> +
> vreg_s11b: smps11 {
> regulator-name = "vreg_s11b";
> regulator-min-microvolt = <1272000>;
> @@ -74,6 +91,13 @@ vreg_s11b: smps11 {
> regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> };
>
> + vreg_s12b: smps12 {
> + regulator-name = "vreg_s12b";
> + regulator-min-microvolt = <984000>;
> + regulator-max-microvolt = <984000>;
> + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> + };
> +
> vreg_l3b: ldo3 {
> regulator-name = "vreg_l3b";
> regulator-min-microvolt = <1200000>;
> @@ -102,6 +126,7 @@ vreg_l6b: ldo6 {
> pmc8280c-rpmh-regulators {
> compatible = "qcom,pm8350c-rpmh-regulators";
> qcom,pmic-id = "c";
> + vdd-bob-supply = <&vph_pwr>;
>
> vreg_l1c: ldo1 {
> regulator-name = "vreg_l1c";
> @@ -123,6 +148,13 @@ vreg_l13c: ldo13 {
> regulator-max-microvolt = <3072000>;
> regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> };
> +
> + vreg_bob: bob {
> + regulator-name = "vreg_bob";
> + regulator-min-microvolt = <3008000>;
> + regulator-max-microvolt = <3960000>;
> + regulator-initial-mode = <RPMH_REGULATOR_MODE_AUTO>;
> + };
> };
>
> pmc8280-2-rpmh-regulators {
> @@ -268,6 +300,80 @@ &remoteproc_nsp0 {
> status = "okay";
> };
>
> +&sound {
> + compatible = "qcom,sc8280xp-sndcard";
> + model = "SC8280XP-LENOVO-X13S";
> + audio-routing =
> + "SpkrLeft IN", "WSA_SPK1 OUT",
> + "SpkrRight IN", "WSA_SPK2 OUT",
> + "IN1_HPHL", "HPHL_OUT",
> + "IN2_HPHR", "HPHR_OUT",
> + "AMIC2", "MIC BIAS2",
> + "VA DMIC0", "MIC BIAS1",
> + "VA DMIC1", "MIC BIAS1",
> + "VA DMIC2", "MIC BIAS3",
> + "TX DMIC0", "MIC BIAS1",
> + "TX DMIC1", "MIC BIAS2",
> + "TX DMIC2", "MIC BIAS3",
> + "TX SWR_ADC1", "ADC2_OUTPUT";
> +
> + wcd-playback-dai-link {
> + link-name = "WCD Playback";
> + cpu {
> + sound-dai = <&q6apmbedai RX_CODEC_DMA_RX_0>;
> + };
> + codec {
> + sound-dai = <&wcd938x 0>, <&swr1 0>, <&rxmacro 0>;
> + };
> + platform {
> + sound-dai = <&q6apm>;
> + };
> + };
> +
> + wcd-capture-dai-link {
> + link-name = "WCD Capture";
> + cpu {
> + sound-dai = <&q6apmbedai TX_CODEC_DMA_TX_3>;
> + };
> +
> + codec {
> + sound-dai = <&wcd938x 1>, <&swr2 0>, <&txmacro 0>;
> + };
> + platform {
> + sound-dai = <&q6apm>;
> + };
> + };
> +
> + wsa-dai-link {
> + link-name = "WSA Playback";
> + cpu {
> + sound-dai = <&q6apmbedai WSA_CODEC_DMA_RX_0>;
> + };
> +
> + codec {
> + sound-dai = <&left_spkr>, <&right_spkr>, <&swr0 0>, <&wsamacro 0>;
> + };
> + platform {
> + sound-dai = <&q6apm>;
> + };
> + };
> +
> + va-dai-link {
> + link-name = "VA Capture";
> + cpu {
> + sound-dai = <&q6apmbedai TX_CODEC_DMA_TX_3>;
> + };
> +
> + platform {
> + sound-dai = <&q6apm>;
> + };
> +
> + codec {
> + sound-dai = <&vamacro 0>;
> + };
> + };
> +};
> +
> &usb_0 {
> status = "okay";
> };
> @@ -346,9 +452,96 @@ edp_bl_pwm: edp-bl-pwm-state {
> };
> };
>
> +&soc {
> + wcd938x: codec {
> + compatible = "qcom,wcd9380-codec";
> + #sound-dai-cells = <1>;
> + pinctrl-names = "default";
> + pinctrl-0 = <&wcd_default>;
> + reset-gpios = <&tlmm 106 0>;
> +
> + vdd-buck-supply = <&vreg_s10b>;
> + vdd-rxtx-supply = <&vreg_s10b>;
> + vdd-io-supply = <&vreg_s10b>;
> + vdd-mic-bias-supply = <&vreg_bob>;
> + qcom,micbias1-microvolt = <1800000>;
> + qcom,micbias2-microvolt = <1800000>;
> + qcom,micbias3-microvolt = <1800000>;
> + qcom,micbias4-microvolt = <1800000>;
> + qcom,mbhc-buttons-vthreshold-microvolt = <75000 150000 237000 500000 500000 500000 500000 500000>;
> + qcom,mbhc-headset-vthreshold-microvolt = <1700000>;
> + qcom,mbhc-headphone-vthreshold-microvolt = <50000>;
> + qcom,rx-device = <&wcd_rx>;
> + qcom,tx-device = <&wcd_tx>;
> + };
> +};
> +
> +&swr0 {
> + left_spkr: wsa8830-left@0,1 {
> + compatible = "sdw10217020200";
> + pinctrl-names = "default";
> + pinctrl-0 = <&spkr_1_sd_n_active>;
> + powerdown-gpios = <&tlmm 178 GPIO_ACTIVE_HIGH>;
> + reg = <0 1>;
> + #thermal-sensor-cells = <0>;
> + sound-name-prefix = "SpkrLeft";
> + #sound-dai-cells = <0>;
> + vdd-supply = <&vreg_s10b>;
> + };
> +
> + right_spkr: wsa8830-right@0,2{
> + pinctrl-names = "default";
> + pinctrl-0 = <&spkr_2_sd_n_active>;
> + powerdown-gpios = <&tlmm 179 GPIO_ACTIVE_HIGH>;
> + compatible = "sdw10217020200";
You ordered the properties in a different manner in a node right before
this one, even though they are almost identical. Please keep them
coherent and put compatible® at the top.
Konrad
> + reg = <0 2>;
> + #thermal-sensor-cells = <0>;
> + sound-name-prefix = "SpkrRight";
> + #sound-dai-cells = <0>;
> + vdd-supply = <&vreg_s10b>;
> + };
> +};
> +
> +
> +&swr1 {
> + status = "okay";
> +
> + wcd_rx: wcd9380-rx@0,4 {
> + compatible = "sdw20217010d00";
> + reg = <0 4>;
> + qcom,rx-port-mapping = <1 2 3 4 5 6>;
> +
> + };
> +};
> +
> +&swr2 {
> + status = "okay";
> +
> + wcd_tx: wcd9380-tx@0,3 {
> + compatible = "sdw20217010d00";
> + reg = <0 3>;
> + qcom,tx-port-mapping = <1 1 2 3>;
> + };
> +};
> +
> +&vamacro {
> + pinctrl-0 = <&dmic01_active>, <&dmic02_active>;
> + pinctrl-names = "default";
> + vdd-micb-supply = <&vreg_s10b>;
> + qcom,dmic-sample-rate = <600000>;
> +};
> +
> &tlmm {
> gpio-reserved-ranges = <70 2>, <74 6>, <83 4>, <125 2>, <128 2>, <154 7>;
>
> + wcd_default: wcd-default-state {
> + reset {
> + pins = "gpio106";
> + function = "gpio";
> + bias-disable;
> + };
> + };
> +
> kybd_default: kybd-default-state {
> disable {
> pins = "gpio102";
> @@ -383,6 +576,26 @@ qup2_i2c5_default: qup2-i2c5-default-state {
> drive-strength = <16>;
> };
>
> + spkr_1_sd_n_active: spkr_1_sd_n_active {
> + perst-n {
> + pins = "gpio178";
> + function = "gpio";
> + drive-strength = <16>;
> + bias-disable;
> + output-high;
> + };
> + };
> +
> + spkr_2_sd_n_active: spkr_2_sd_n_active {
> + perst-n {
> + pins = "gpio179";
> + function = "gpio";
> + drive-strength = <16>;
> + bias-disable;
> + output-high;
> + };
> + };
> +
> tpad_default: tpad-default-state {
> int-n {
> pins = "gpio182";
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 1/3] arm64: dts: qcom: sc8280xp/sa8540p: add gpr node
2022-11-15 17:02 ` [PATCH 1/3] arm64: dts: qcom: sc8280xp/sa8540p: add gpr node Srinivas Kandagatla
@ 2022-11-16 8:06 ` Krzysztof Kozlowski
2022-11-19 16:36 ` Srinivas Kandagatla
2022-11-16 11:03 ` Johan Hovold
1 sibling, 1 reply; 13+ messages in thread
From: Krzysztof Kozlowski @ 2022-11-16 8:06 UTC (permalink / raw)
To: Srinivas Kandagatla, agross, andersson
Cc: konrad.dybcio, robh+dt, krzysztof.kozlowski+dt, linux-arm-msm,
devicetree, linux-kernel
On 15/11/2022 18:02, Srinivas Kandagatla wrote:
> Add GPR node along with APM(Audio Process Manager) and PRM(Proxy
> resource Manager) audio services.
>
> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> ---
> arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 40 ++++++++++++++++++++++++++
> 1 file changed, 40 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
> index c32bcded2aef..e3cdd8bccb0c 100644
> --- a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
> @@ -12,6 +12,7 @@
> #include <dt-bindings/power/qcom-rpmpd.h>
> #include <dt-bindings/soc/qcom,rpmh-rsc.h>
> #include <dt-bindings/thermal/thermal.h>
> +#include <dt-bindings/soc/qcom,gpr.h>
>
> / {
> interrupt-parent = <&intc>;
> @@ -1152,6 +1153,45 @@ IPCC_MPROC_SIGNAL_GLINK_QMP
>
> label = "lpass";
> qcom,remote-pid = <2>;
> +
> + gpr {
> + compatible = "qcom,gpr";
> + qcom,glink-channels = "adsp_apps";
> + qcom,domain = <GPR_DOMAIN_ID_ADSP>;
> + #address-cells = <1>;
> + #size-cells = <0>;
> + qcom,intents = <512 20>;
> +
> + q6apm: q6apm {
> + reg = <GPR_APM_MODULE_IID>;
> + compatible = "qcom,q6apm";
> + #sound-dai-cells = <0>;
> + qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd";
> + q6apmdai: dais {
> + compatible = "qcom,q6apm-dais";
> + #sound-dai-cells = <1>;
DAI cells are not allowed by binding, so either drop it or update binding.
> + iommus = <&apps_smmu 0x0c01 0x0>;
> + };
> +
> + q6apmbedai: bedais {
> + compatible = "qcom,q6apm-lpass-dais";
> + #sound-dai-cells = <1>;
> + };
> + };
> +
> + q6prm: q6prm {
> + reg = <GPR_PRM_MODULE_IID>;
> + compatible = "qcom,q6prm";
> + #clock-cells = <2>;
Not allowed by binding.
> + qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd";
> + q6prmcc: cc {
This should be "clock-controller".
> + compatible = "qcom,q6prm-lpass-clocks";
> + #clock-cells = <2>;
> + };
> + };
> +
Drop empty line
> + };
> +
Ditto
> };
> };
>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 2/3] arm64: dts: qcom: sc8280xp/sa8540p: add SoundWire and LPASS
2022-11-15 17:02 ` [PATCH 2/3] arm64: dts: qcom: sc8280xp/sa8540p: add SoundWire and LPASS Srinivas Kandagatla
2022-11-15 17:45 ` Konrad Dybcio
@ 2022-11-16 8:10 ` Krzysztof Kozlowski
2022-11-16 10:40 ` Krzysztof Kozlowski
1 sibling, 1 reply; 13+ messages in thread
From: Krzysztof Kozlowski @ 2022-11-16 8:10 UTC (permalink / raw)
To: Srinivas Kandagatla, agross, andersson
Cc: konrad.dybcio, robh+dt, krzysztof.kozlowski+dt, linux-arm-msm,
devicetree, linux-kernel
On 15/11/2022 18:02, Srinivas Kandagatla wrote:
> Add LPASS Codecs along with SoundWire controller for TX, RX, WSA and VA macros
> along with LPASS LPI pinctrl node.
>
> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> ---
> arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 324 +++++++++++++++++++++++++
> 1 file changed, 324 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
> index e3cdd8bccb0c..a87d58bee1e0 100644
> --- a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
> @@ -11,6 +11,7 @@
> #include <dt-bindings/mailbox/qcom-ipcc.h>
> #include <dt-bindings/power/qcom-rpmpd.h>
> #include <dt-bindings/soc/qcom,rpmh-rsc.h>
> +#include <dt-bindings/sound/qcom,q6afe.h>
> #include <dt-bindings/thermal/thermal.h>
> #include <dt-bindings/soc/qcom,gpr.h>
>
> @@ -1115,6 +1116,9 @@ usb_2_ssphy1: phy@88f1e00 {
> };
> };
>
> + sound: sound {
> + };
sound node is not part of SoC.
> +
> remoteproc_adsp: remoteproc@3000000 {
> compatible = "qcom,sc8280xp-adsp-pas";
> reg = <0 0x03000000 0 0x100>;
> @@ -1195,6 +1199,326 @@ q6prmcc: cc {
> };
> };
>
> + rxmacro: rxmacro@3200000 {
> + pinctrl-names = "default";
> + pinctrl-0 = <&rx_swr_active>;
> + compatible = "qcom,sc8280xp-lpass-rx-macro";
> + reg = <0 0x3200000 0 0x1000>;
> + clocks = <&q6prmcc LPASS_CLK_ID_RX_CORE_TX_MCLK LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
> + <&q6prmcc LPASS_CLK_ID_RX_CORE_TX_2X_MCLK LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
> + <&q6prmcc LPASS_HW_MACRO_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
> + <&q6prmcc LPASS_HW_DCODEC_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
> + <&vamacro>;
> +
> + clock-names = "mclk", "npl", "macro", "dcodec", "fsgen";
> +
> + assigned-clocks = <&q6prmcc LPASS_CLK_ID_RX_CORE_TX_MCLK LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
> + <&q6prmcc LPASS_CLK_ID_RX_CORE_TX_2X_MCLK LPASS_CLK_ATTRIBUTE_COUPLE_NO>;
> + assigned-clock-rates = <19200000>, <19200000>;
> +
> + #clock-cells = <0>;
> + clock-frequency = <19200000>;
> + clock-output-names = "mclk";
> + #sound-dai-cells = <1>;
> + };
> +
> + /* RX */
> + swr1: soundwire-controller@3210000 {
> + reg = <0 0x3210000 0 0x2000>;
> + compatible = "qcom,soundwire-v1.6.0";
> + interrupts = <GIC_SPI 155 IRQ_TYPE_LEVEL_HIGH>;
> + clocks = <&rxmacro>;
> + clock-names = "iface";
> + label = "RX";
> + qcom,din-ports = <0>;
> + qcom,dout-ports = <5>;
> +
> + qcom,ports-sinterval-low = /bits/ 8 <0x03 0x1F 0x1F 0x07 0x00>;
> + qcom,ports-offset1 = /bits/ 8 <0x00 0x00 0x0B 0x01 0x00>;
> + qcom,ports-offset2 = /bits/ 8 <0x00 0x00 0x0B 0x00 0x00>;
> + qcom,ports-hstart = /bits/ 8 <0xFF 0x03 0xFF 0xFF 0xFF>;
> + qcom,ports-hstop = /bits/ 8 <0xFF 0x06 0xFF 0xFF 0xFF>;
> + qcom,ports-word-length = /bits/ 8 <0x01 0x07 0x04 0xFF 0xFF>;
> + qcom,ports-block-pack-mode = /bits/ 8 <0xFF 0x00 0x01 0xFF 0xFF>;
> + qcom,ports-lane-control = /bits/ 8 <0x01 0x00 0x00 0x00 0x00>;
> + qcom,ports-block-group-count = /bits/ 8 <0xFF 0xFF 0xFF 0xFF 0x00>;
> + #sound-dai-cells = <1>;
> + #address-cells = <2>;
> + #size-cells = <0>;
> + };
> +
> + txmacro: txmacro@3220000 {
> + pinctrl-names = "default";
> + pinctrl-0 = <&tx_swr_active>;
> + compatible = "qcom,sc8280xp-lpass-tx-macro";
> + reg = <0 0x3220000 0 0x1000>;
> + clocks = <&q6prmcc LPASS_CLK_ID_TX_CORE_MCLK LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
> + <&q6prmcc LPASS_CLK_ID_TX_CORE_NPL_MCLK LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
Align the opening <
> + <&q6prmcc LPASS_HW_MACRO_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
> + <&q6prmcc LPASS_HW_DCODEC_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
> + <&vamacro>;
> +
> + clock-names = "mclk", "npl", "macro", "dcodec", "fsgen";
> + assigned-clocks = <&q6prmcc LPASS_CLK_ID_TX_CORE_MCLK LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
> + <&q6prmcc LPASS_CLK_ID_TX_CORE_NPL_MCLK LPASS_CLK_ATTRIBUTE_COUPLE_NO>;
> + assigned-clock-rates = <19200000>, <19200000>;
> +
> + #clock-cells = <0>;
> + clock-frequency = <19200000>;
> + clock-output-names = "mclk";
> + #address-cells = <2>;
> + #size-cells = <2>;
> + #sound-dai-cells = <1>;
> + };
> +
> + /* TX */
> + swr2: soundwire-controller@3330000 {
> + reg = <0 0x3330000 0 0x2000>;
> + compatible = "qcom,soundwire-v1.6.0";
> + interrupts-extended = <&intc GIC_SPI 959 IRQ_TYPE_LEVEL_HIGH>,
> + <&intc GIC_SPI 520 IRQ_TYPE_LEVEL_HIGH>;
> + interrupt-names = "core", "wake";
> +
> + clocks = <&vamacro>;
> + clock-names = "iface";
> + label = "TX";
> +
> + qcom,din-ports = <4>;
> + qcom,dout-ports = <0>;
> + qcom,ports-sinterval-low = /bits/ 8 <0x01 0x03 0x03 0x03>;
> + qcom,ports-offset1 = /bits/ 8 <0x01 0x00 0x02 0x01>;
> + qcom,ports-offset2 = /bits/ 8 <0x00 0x00 0x00 0x00>;
> + qcom,ports-block-pack-mode = /bits/ 8 <0xFF 0xFF 0xFF 0xFF>;
> + qcom,ports-hstart = /bits/ 8 <0xFF 0xFF 0xFF 0xFF>;
> + qcom,ports-hstop = /bits/ 8 <0xFF 0xFF 0xFF 0xFF>;
> + qcom,ports-word-length = /bits/ 8 <0xFF 0x00 0xFF 0xFF>;
> + qcom,ports-block-group-count = /bits/ 8 <0xFF 0xFF 0xFF 0xFF>;
> + qcom,ports-lane-control = /bits/ 8 <0x00 0x01 0x00 0x00>;
> + qcom,port-offset = <1>;
> + #sound-dai-cells = <1>;
> + #address-cells = <2>;
> + #size-cells = <0>;
> + };
> +
> + wsamacro: codec@3240000 {
Order nodes by unit address.
> + compatible = "qcom,sc8280xp-lpass-wsa-macro";
> + reg = <0 0x03240000 0 0x1000>;
> + clocks = <&q6prmcc LPASS_CLK_ID_WSA_CORE_TX_MCLK LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
> + <&q6prmcc LPASS_CLK_ID_WSA_CORE_TX_2X_MCLK LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
> + <&q6prmcc LPASS_HW_MACRO_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
> + <&q6prmcc LPASS_HW_DCODEC_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
> + <&vamacro>;
> + clock-names = "mclk", "npl", "macro", "dcodec", "fsgen";
> +
> + assigned-clocks = <&q6prmcc LPASS_CLK_ID_WSA_CORE_TX_MCLK LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
> + <&q6prmcc LPASS_CLK_ID_WSA_CORE_TX_2X_MCLK LPASS_CLK_ATTRIBUTE_COUPLE_NO>;
> + assigned-clock-rates = <19200000>, <19200000>;
> +
> + #clock-cells = <0>;
> + clock-frequency = <19200000>;
> + clock-output-names = "mclk";
> + #sound-dai-cells = <1>;
> +
> + pinctrl-names = "default";
> + pinctrl-0 = <&wsa_swr_active>;
> + };
> +
> + /* WSA */
> + swr0: soundwire-controller@3250000 {
> + reg = <0 0x03250000 0 0x2000>;
> + compatible = "qcom,soundwire-v1.6.0";
> + interrupts = <GIC_SPI 170 IRQ_TYPE_LEVEL_HIGH>;
> + clocks = <&wsamacro>;
> + clock-names = "iface";
> +
> + qcom,din-ports = <2>;
> + qcom,dout-ports = <6>;
> +
> + qcom,ports-sinterval-low = /bits/ 8 <0x07 0x1f 0x3f 0x07 0x1f 0x3f 0x0f 0x0f>;
> + qcom,ports-offset1 = /bits/ 8 <0x01 0x02 0x0c 0x06 0x12 0x0d 0x07 0x0a>;
> + qcom,ports-offset2 = /bits/ 8 <0xFF 0x00 0x1f 0xff 0x00 0x1f 0x00 0x00>;
> + qcom,ports-hstart = /bits/ 8 <0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF>;
> + qcom,ports-hstop = /bits/ 8 <0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF>;
> + qcom,ports-word-length = /bits/ 8 <0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF>;
> + qcom,ports-block-pack-mode = /bits/ 8 <0xFF 0xFF 0x01 0xFF 0xFF 0x01 0xFF 0xFF>;
> + qcom,ports-block-group-count = /bits/ 8 <0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF>;
> + qcom,ports-lane-control = /bits/ 8 <0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF>;
> + qcom,port-offset = <1>;
> + #sound-dai-cells = <1>;
> + #address-cells = <2>;
> + #size-cells = <0>;
> + };
> +
> + vamacro: codec@3370000 {
> + compatible = "qcom,sc8280xp-lpass-va-macro";
> + reg = <0 0x03370000 0 0x1000>;
> + clocks = <&q6prmcc LPASS_CLK_ID_TX_CORE_MCLK LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
> + <&q6prmcc LPASS_CLK_ID_TX_CORE_NPL_MCLK LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
> + <&q6prmcc LPASS_HW_MACRO_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
> + <&q6prmcc LPASS_HW_DCODEC_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>;
> +
> + clock-names = "mclk", "npl", "macro", "dcodec";
> + assigned-clocks = <&q6prmcc LPASS_CLK_ID_TX_CORE_MCLK LPASS_CLK_ATTRIBUTE_COUPLE_NO>;
> + assigned-clock-rates = <19200000>;
> +
> + #clock-cells = <0>;
> + clock-frequency = <19200000>;
> + clock-output-names = "fsgen";
> + #sound-dai-cells = <1>;
> + };
> +
> + lpass_tlmm: pinctrl@33c0000 {
> + compatible = "qcom,sc8280xp-lpass-lpi-pinctrl";
> + reg = <0 0x33c0000 0x0 0x20000>,
> + <0 0x3550000 0x0 0x10000>;
> + gpio-controller;
> + #gpio-cells = <2>;
> + gpio-ranges = <&lpass_tlmm 0 0 18>;
> +
> + clocks = <&q6prmcc LPASS_HW_MACRO_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
> + <&q6prmcc LPASS_HW_DCODEC_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>;
> + clock-names = "core", "audio";
> +
> + wsa_swr_active: wsa-swr-active-pins {
There is no way this passes bindings test. state suffix.
> + clk {
pins suffix
> + pins = "gpio10";
> + function = "wsa_swr_clk";
> + drive-strength = <2>;
> + slew-rate = <1>;
> + bias-disable;
> + };
> +
> + data {
> + pins = "gpio11";
> + function = "wsa_swr_data";
> + drive-strength = <2>;
> + slew-rate = <1>;
> + bias-bus-hold;
> +
> + };
> + };
> +
> + tx_swr_active: tx_swr-active-pins {
> + clk {
> + pins = "gpio0";
> + function = "swr_tx_clk";
> + drive-strength = <2>;
> + slew-rate = <1>;
> + bias-disable;
> + };
> +
> + data {
> + pins = "gpio1", "gpio2";
> + function = "swr_tx_data";
> + drive-strength = <2>;
> + slew-rate = <1>;
> + bias-bus-hold;
> + };
> + };
> +
> + rx_swr_active: rx_swr-active-pins {
> + clk {
> + pins = "gpio3";
> + function = "swr_rx_clk";
> + drive-strength = <2>;
> + slew-rate = <1>;
> + bias-disable;
> + };
> +
> + data {
> + pins = "gpio4", "gpio5";
> + function = "swr_rx_data";
> + drive-strength = <2>;
> + slew-rate = <1>;
> + bias-bus-hold;
> + };
> + };
> +
> + wsa2_swr_active: wsa2-swr-active-pins {
> + clk {
> + pins = "gpio15";
> + function = "wsa2_swr_clk";
> + drive-strength = <2>;
> + slew-rate = <1>;
> + bias-disable;
> + };
> +
> + data {
> + pins = "gpio16";
> + function = "wsa2_swr_data";
> + drive-strength = <2>;
> + slew-rate = <1>;
> + bias-bus-hold;
> + };
> + };
> +
> + dmic01_active: dmic01-active-pins {
> + clk {
> + pins = "gpio6";
> + function = "dmic1_clk";
> + drive-strength = <8>;
> + output-high;
> + };
Blank line
> + data {
> + pins = "gpio7";
> + function = "dmic1_data";
> + drive-strength = <8>;
> + input-enable;
> + };
> + };
> +
> + dmic01_sleep: dmic01-sleep-pins {
> + clk {
> + pins = "gpio6";
> + function = "dmic1_clk";
> + drive-strength = <2>;
> + bias-disable;
> + output-low;
> + };
> +
> + data {
> + pins = "gpio7";
> + function = "dmic1_data";
> + drive-strength = <2>;
> + pull-down;
> + input-enable;
> + };
> + };
> +
> + dmic02_active: dmic02-active-pins {
> + clk {
> + pins = "gpio8";
> + function = "dmic2_clk";
> + drive-strength = <8>;
> + output-high;
> + };
Blank line
> + data {
> + pins = "gpio9";
> + function = "dmic2_data";
> + drive-strength = <8>;
> + input-enable;
> + };
> + };
> +
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 3/3] arm64: dts: qcom: sc8280xp: Add soundcard support
2022-11-15 17:02 ` [PATCH 3/3] arm64: dts: qcom: sc8280xp: Add soundcard support Srinivas Kandagatla
2022-11-15 17:48 ` Konrad Dybcio
@ 2022-11-16 8:13 ` Krzysztof Kozlowski
2022-11-16 11:09 ` Johan Hovold
2 siblings, 0 replies; 13+ messages in thread
From: Krzysztof Kozlowski @ 2022-11-16 8:13 UTC (permalink / raw)
To: Srinivas Kandagatla, agross, andersson
Cc: konrad.dybcio, robh+dt, krzysztof.kozlowski+dt, linux-arm-msm,
devicetree, linux-kernel
On 15/11/2022 18:02, Srinivas Kandagatla wrote:
> Add support for SoundCard on X13s. This patch adds support for Headset
> Playback, record and 2 DMICs on the Panel along with the regulators
> required for powering up the LPASS codecs.
>
> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> ---
> .../qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 213 ++++++++++++++++++
> 1 file changed, 213 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
> index b2b744bb8a53..99c3021e8149 100644
> --- a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
> +++ b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
> @@ -58,6 +58,16 @@ vreg_misc_3p3: regulator-misc-3p3 {
> regulator-boot-on;
> regulator-always-on;
> };
> +
> + vph_pwr: vph-pwr-regulator {
> + compatible = "regulator-fixed";
> + regulator-name = "VPH_VCC3R9";
> + regulator-min-microvolt = <3900000>;
> + regulator-max-microvolt = <3900000>;
> +
> + regulator-always-on;
> + regulator-boot-on;
> + };
> };
>
> &apps_rsc {
> @@ -67,6 +77,13 @@ pmc8280-1-rpmh-regulators {
>
> vdd-l3-l5-supply = <&vreg_s11b>;
>
> + vreg_s10b: smps10 {
> + regulator-name = "vreg_s10b";
> + regulator-min-microvolt = <1800000>;
> + regulator-max-microvolt = <1800000>;
> + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> + };
> +
> vreg_s11b: smps11 {
> regulator-name = "vreg_s11b";
> regulator-min-microvolt = <1272000>;
> @@ -74,6 +91,13 @@ vreg_s11b: smps11 {
> regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> };
>
> + vreg_s12b: smps12 {
> + regulator-name = "vreg_s12b";
> + regulator-min-microvolt = <984000>;
> + regulator-max-microvolt = <984000>;
> + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> + };
> +
> vreg_l3b: ldo3 {
> regulator-name = "vreg_l3b";
> regulator-min-microvolt = <1200000>;
> @@ -102,6 +126,7 @@ vreg_l6b: ldo6 {
> pmc8280c-rpmh-regulators {
> compatible = "qcom,pm8350c-rpmh-regulators";
> qcom,pmic-id = "c";
> + vdd-bob-supply = <&vph_pwr>;
>
> vreg_l1c: ldo1 {
> regulator-name = "vreg_l1c";
> @@ -123,6 +148,13 @@ vreg_l13c: ldo13 {
> regulator-max-microvolt = <3072000>;
> regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> };
> +
> + vreg_bob: bob {
> + regulator-name = "vreg_bob";
> + regulator-min-microvolt = <3008000>;
> + regulator-max-microvolt = <3960000>;
> + regulator-initial-mode = <RPMH_REGULATOR_MODE_AUTO>;
> + };
> };
>
> pmc8280-2-rpmh-regulators {
> @@ -268,6 +300,80 @@ &remoteproc_nsp0 {
> status = "okay";
> };
>
> +&sound {
> + compatible = "qcom,sc8280xp-sndcard";
> + model = "SC8280XP-LENOVO-X13S";
> + audio-routing =
> + "SpkrLeft IN", "WSA_SPK1 OUT",
> + "SpkrRight IN", "WSA_SPK2 OUT",
> + "IN1_HPHL", "HPHL_OUT",
> + "IN2_HPHR", "HPHR_OUT",
> + "AMIC2", "MIC BIAS2",
> + "VA DMIC0", "MIC BIAS1",
> + "VA DMIC1", "MIC BIAS1",
> + "VA DMIC2", "MIC BIAS3",
> + "TX DMIC0", "MIC BIAS1",
> + "TX DMIC1", "MIC BIAS2",
> + "TX DMIC2", "MIC BIAS3",
> + "TX SWR_ADC1", "ADC2_OUTPUT";
> +
> + wcd-playback-dai-link {
> + link-name = "WCD Playback";
> + cpu {
> + sound-dai = <&q6apmbedai RX_CODEC_DMA_RX_0>;
Drop double-space
> + };
Blank line
> + codec {
> + sound-dai = <&wcd938x 0>, <&swr1 0>, <&rxmacro 0>;
> + };
Blank line
> + platform {
> + sound-dai = <&q6apm>;
> + };
> + };
Wrong indentation.
> +
> + wcd-capture-dai-link {
> + link-name = "WCD Capture";
> + cpu {
> + sound-dai = <&q6apmbedai TX_CODEC_DMA_TX_3>;
Drop double-space
> + };
> +
> + codec {
> + sound-dai = <&wcd938x 1>, <&swr2 0>, <&txmacro 0>;
> + };
Blank line
> + platform {
> + sound-dai = <&q6apm>;
> + };
> + };
> +
> + wsa-dai-link {
> + link-name = "WSA Playback";
> + cpu {
> + sound-dai = <&q6apmbedai WSA_CODEC_DMA_RX_0>;
> + };
> +
> + codec {
> + sound-dai = <&left_spkr>, <&right_spkr>, <&swr0 0>, <&wsamacro 0>;
> + };
Blank line
> + platform {
> + sound-dai = <&q6apm>;
> + };
> + };
> +
> + va-dai-link {
> + link-name = "VA Capture";
> + cpu {
> + sound-dai = <&q6apmbedai TX_CODEC_DMA_TX_3>;
> + };
> +
> + platform {
> + sound-dai = <&q6apm>;
> + };
> +
> + codec {
> + sound-dai = <&vamacro 0>;
> + };
> + };
> +};
> +
> &usb_0 {
> status = "okay";
> };
> @@ -346,9 +452,96 @@ edp_bl_pwm: edp-bl-pwm-state {
> };
> };
>
> +&soc {
> + wcd938x: codec {
> + compatible = "qcom,wcd9380-codec";
> + #sound-dai-cells = <1>;
> + pinctrl-names = "default";
> + pinctrl-0 = <&wcd_default>;
> + reset-gpios = <&tlmm 106 0>;
Use GPIO flags. This also has to be changed to ACTIVE LOW actually:
https://lore.kernel.org/all/20221116053817.2929810-11-dmitry.torokhov@gmail.com/
> +
> + vdd-buck-supply = <&vreg_s10b>;
> + vdd-rxtx-supply = <&vreg_s10b>;
> + vdd-io-supply = <&vreg_s10b>;
> + vdd-mic-bias-supply = <&vreg_bob>;
> + qcom,micbias1-microvolt = <1800000>;
> + qcom,micbias2-microvolt = <1800000>;
> + qcom,micbias3-microvolt = <1800000>;
> + qcom,micbias4-microvolt = <1800000>;
> + qcom,mbhc-buttons-vthreshold-microvolt = <75000 150000 237000 500000 500000 500000 500000 500000>;
> + qcom,mbhc-headset-vthreshold-microvolt = <1700000>;
> + qcom,mbhc-headphone-vthreshold-microvolt = <50000>;
> + qcom,rx-device = <&wcd_rx>;
> + qcom,tx-device = <&wcd_tx>;
> + };
> +};
> +
> +&swr0 {
> + left_spkr: wsa8830-left@0,1 {
> + compatible = "sdw10217020200";
> + pinctrl-names = "default";
> + pinctrl-0 = <&spkr_1_sd_n_active>;
> + powerdown-gpios = <&tlmm 178 GPIO_ACTIVE_HIGH>;
ACTIVE_LOW
> + reg = <0 1>;
reg is always second property
> + #thermal-sensor-cells = <0>;
> + sound-name-prefix = "SpkrLeft";
> + #sound-dai-cells = <0>;
> + vdd-supply = <&vreg_s10b>;
> + };
> +
> + right_spkr: wsa8830-right@0,2{
> + pinctrl-names = "default";
> + pinctrl-0 = <&spkr_2_sd_n_active>;
> + powerdown-gpios = <&tlmm 179 GPIO_ACTIVE_HIGH>;
ACTIVE_LOW
> + compatible = "sdw10217020200";
> + reg = <0 2>;
> + #thermal-sensor-cells = <0>;
> + sound-name-prefix = "SpkrRight";
> + #sound-dai-cells = <0>;
> + vdd-supply = <&vreg_s10b>;
> + };
> +};
> +
> +
> +&swr1 {
> + status = "okay";
> +
> + wcd_rx: wcd9380-rx@0,4 {
> + compatible = "sdw20217010d00";
> + reg = <0 4>;
> + qcom,rx-port-mapping = <1 2 3 4 5 6>;
Does not look like you tested the DTS against bindings. Please run `make
dtbs_check` (see Documentation/devicetree/bindings/writing-schema.rst
for instructions).
> +
> + };
> +};
> +
> +&swr2 {
> + status = "okay";
> +
> + wcd_tx: wcd9380-tx@0,3 {
> + compatible = "sdw20217010d00";
> + reg = <0 3>;
> + qcom,tx-port-mapping = <1 1 2 3>;
> + };
> +};
> +
> +&vamacro {
> + pinctrl-0 = <&dmic01_active>, <&dmic02_active>;
> + pinctrl-names = "default";
> + vdd-micb-supply = <&vreg_s10b>;
> + qcom,dmic-sample-rate = <600000>;
> +};
> +
> &tlmm {
> gpio-reserved-ranges = <70 2>, <74 6>, <83 4>, <125 2>, <128 2>, <154 7>;
>
> + wcd_default: wcd-default-state {
> + reset {
Does not look like you tested the DTS against bindings. Please run `make
dtbs_check` (see Documentation/devicetree/bindings/writing-schema.rst
for instructions).
> + pins = "gpio106";
> + function = "gpio";
> + bias-disable;
> + };
> + };
> +
> kybd_default: kybd-default-state {
> disable {
> pins = "gpio102";
> @@ -383,6 +576,26 @@ qup2_i2c5_default: qup2-i2c5-default-state {
> drive-strength = <16>;
> };
>
> + spkr_1_sd_n_active: spkr_1_sd_n_active {
No underscores, missing state suffix.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 2/3] arm64: dts: qcom: sc8280xp/sa8540p: add SoundWire and LPASS
2022-11-16 8:10 ` Krzysztof Kozlowski
@ 2022-11-16 10:40 ` Krzysztof Kozlowski
0 siblings, 0 replies; 13+ messages in thread
From: Krzysztof Kozlowski @ 2022-11-16 10:40 UTC (permalink / raw)
To: Srinivas Kandagatla, agross, andersson
Cc: konrad.dybcio, robh+dt, krzysztof.kozlowski+dt, linux-arm-msm,
devicetree, linux-kernel
On 16/11/2022 09:10, Krzysztof Kozlowski wrote:
> On 15/11/2022 18:02, Srinivas Kandagatla wrote:
>> Add LPASS Codecs along with SoundWire controller for TX, RX, WSA and VA macros
>> along with LPASS LPI pinctrl node.
>>
>> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
>> ---
>> arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 324 +++++++++++++++++++++++++
>> 1 file changed, 324 insertions(+)
>>
>> diff --git a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
>> index e3cdd8bccb0c..a87d58bee1e0 100644
>> --- a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
>> +++ b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
>> @@ -11,6 +11,7 @@
>> #include <dt-bindings/mailbox/qcom-ipcc.h>
>> #include <dt-bindings/power/qcom-rpmpd.h>
>> #include <dt-bindings/soc/qcom,rpmh-rsc.h>
>> +#include <dt-bindings/sound/qcom,q6afe.h>
>> #include <dt-bindings/thermal/thermal.h>
>> #include <dt-bindings/soc/qcom,gpr.h>
>>
>> @@ -1115,6 +1116,9 @@ usb_2_ssphy1: phy@88f1e00 {
>> };
>> };
>>
>> + sound: sound {
>> + };
>
> sound node is not part of SoC.
>
To clarify - I meant to put it outside of soc node.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 1/3] arm64: dts: qcom: sc8280xp/sa8540p: add gpr node
2022-11-15 17:02 ` [PATCH 1/3] arm64: dts: qcom: sc8280xp/sa8540p: add gpr node Srinivas Kandagatla
2022-11-16 8:06 ` Krzysztof Kozlowski
@ 2022-11-16 11:03 ` Johan Hovold
1 sibling, 0 replies; 13+ messages in thread
From: Johan Hovold @ 2022-11-16 11:03 UTC (permalink / raw)
To: Srinivas Kandagatla
Cc: agross, andersson, konrad.dybcio, robh+dt,
krzysztof.kozlowski+dt, linux-arm-msm, devicetree, linux-kernel
On Tue, Nov 15, 2022 at 05:02:40PM +0000, Srinivas Kandagatla wrote:
> Add GPR node along with APM(Audio Process Manager) and PRM(Proxy
Perhaps spell out GPR as well.
> resource Manager) audio services.
>
> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> ---
> arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 40 ++++++++++++++++++++++++++
> 1 file changed, 40 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
> index c32bcded2aef..e3cdd8bccb0c 100644
> --- a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
> @@ -12,6 +12,7 @@
> #include <dt-bindings/power/qcom-rpmpd.h>
> #include <dt-bindings/soc/qcom,rpmh-rsc.h>
> #include <dt-bindings/thermal/thermal.h>
> +#include <dt-bindings/soc/qcom,gpr.h>
Please keep the include directives sorted.
>
> / {
> interrupt-parent = <&intc>;
> @@ -1152,6 +1153,45 @@ IPCC_MPROC_SIGNAL_GLINK_QMP
>
> label = "lpass";
> qcom,remote-pid = <2>;
> +
> + gpr {
> + compatible = "qcom,gpr";
> + qcom,glink-channels = "adsp_apps";
> + qcom,domain = <GPR_DOMAIN_ID_ADSP>;
> + #address-cells = <1>;
> + #size-cells = <0>;
I'd move the address and size cells properties above the vendor ones.
> + qcom,intents = <512 20>;
> +
> + q6apm: q6apm {
> + reg = <GPR_APM_MODULE_IID>;
> + compatible = "qcom,q6apm";
Please move compatible before reg throughout.
> + #sound-dai-cells = <0>;
> + qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd";
> + q6apmdai: dais {
> + compatible = "qcom,q6apm-dais";
> + #sound-dai-cells = <1>;
> + iommus = <&apps_smmu 0x0c01 0x0>;
> + };
> +
> + q6apmbedai: bedais {
> + compatible = "qcom,q6apm-lpass-dais";
> + #sound-dai-cells = <1>;
> + };
> + };
> +
> + q6prm: q6prm {
> + reg = <GPR_PRM_MODULE_IID>;
> + compatible = "qcom,q6prm";
> + #clock-cells = <2>;
> + qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd";
> + q6prmcc: cc {
> + compatible = "qcom,q6prm-lpass-clocks";
> + #clock-cells = <2>;
> + };
> + };
> +
Stray new line.
> + };
> +
Same here.
> };
> };
Johan
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 3/3] arm64: dts: qcom: sc8280xp: Add soundcard support
2022-11-15 17:02 ` [PATCH 3/3] arm64: dts: qcom: sc8280xp: Add soundcard support Srinivas Kandagatla
2022-11-15 17:48 ` Konrad Dybcio
2022-11-16 8:13 ` Krzysztof Kozlowski
@ 2022-11-16 11:09 ` Johan Hovold
2 siblings, 0 replies; 13+ messages in thread
From: Johan Hovold @ 2022-11-16 11:09 UTC (permalink / raw)
To: Srinivas Kandagatla
Cc: agross, andersson, konrad.dybcio, robh+dt,
krzysztof.kozlowski+dt, linux-arm-msm, devicetree, linux-kernel
On Tue, Nov 15, 2022 at 05:02:42PM +0000, Srinivas Kandagatla wrote:
> Add support for SoundCard on X13s. This patch adds support for Headset
> Playback, record and 2 DMICs on the Panel along with the regulators
> required for powering up the LPASS codecs.
>
> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> ---
> .../qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 213 ++++++++++++++++++
> 1 file changed, 213 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
> index b2b744bb8a53..99c3021e8149 100644
> --- a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
> +++ b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
> @@ -58,6 +58,16 @@ vreg_misc_3p3: regulator-misc-3p3 {
> regulator-boot-on;
> regulator-always-on;
> };
> +
> + vph_pwr: vph-pwr-regulator {
Use "regulator-" as a name prefix, and add "vreg_" as label prefix for
consistency:
vreg_vph_pwr: regulator-vph-pwr {
> + compatible = "regulator-fixed";
> + regulator-name = "VPH_VCC3R9";
> + regulator-min-microvolt = <3900000>;
> + regulator-max-microvolt = <3900000>;
> +
> + regulator-always-on;
> + regulator-boot-on;
> + };
> };
Johan
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 1/3] arm64: dts: qcom: sc8280xp/sa8540p: add gpr node
2022-11-16 8:06 ` Krzysztof Kozlowski
@ 2022-11-19 16:36 ` Srinivas Kandagatla
0 siblings, 0 replies; 13+ messages in thread
From: Srinivas Kandagatla @ 2022-11-19 16:36 UTC (permalink / raw)
To: Krzysztof Kozlowski, agross, andersson
Cc: konrad.dybcio, robh+dt, krzysztof.kozlowski+dt, linux-arm-msm,
devicetree, linux-kernel
On 16/11/2022 08:06, Krzysztof Kozlowski wrote:
> On 15/11/2022 18:02, Srinivas Kandagatla wrote:
>> Add GPR node along with APM(Audio Process Manager) and PRM(Proxy
>> resource Manager) audio services.
>>
>> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
>> ---
>> arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 40 ++++++++++++++++++++++++++
>> 1 file changed, 40 insertions(+)
>>
>> diff --git a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
>> index c32bcded2aef..e3cdd8bccb0c 100644
>> --- a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
>> +++ b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
>> @@ -12,6 +12,7 @@
>> #include <dt-bindings/power/qcom-rpmpd.h>
>> #include <dt-bindings/soc/qcom,rpmh-rsc.h>
>> #include <dt-bindings/thermal/thermal.h>
>> +#include <dt-bindings/soc/qcom,gpr.h>
>>
>> / {
>> interrupt-parent = <&intc>;
>> @@ -1152,6 +1153,45 @@ IPCC_MPROC_SIGNAL_GLINK_QMP
>>
>> label = "lpass";
>> qcom,remote-pid = <2>;
>> +
>> + gpr {
>> + compatible = "qcom,gpr";
>> + qcom,glink-channels = "adsp_apps";
>> + qcom,domain = <GPR_DOMAIN_ID_ADSP>;
>> + #address-cells = <1>;
>> + #size-cells = <0>;
>> + qcom,intents = <512 20>;
>> +
>> + q6apm: q6apm {
>> + reg = <GPR_APM_MODULE_IID>;
>> + compatible = "qcom,q6apm";
>> + #sound-dai-cells = <0>;
>> + qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd";
>> + q6apmdai: dais {
>> + compatible = "qcom,q6apm-dais";
>> + #sound-dai-cells = <1>;
>
> DAI cells are not allowed by binding, so either drop it or update binding.
Thanks Krzystof, Konrad and Johan for reviewing.
I agree with all of the comments and they are fixed now.
it will be part of v2.
--srini
>
>> + iommus = <&apps_smmu 0x0c01 0x0>;
>> + };
>> +
>> + q6apmbedai: bedais {
>> + compatible = "qcom,q6apm-lpass-dais";
>> + #sound-dai-cells = <1>;
>> + };
>> + };
>> +
>> + q6prm: q6prm {
>> + reg = <GPR_PRM_MODULE_IID>;
>> + compatible = "qcom,q6prm";
>> + #clock-cells = <2>;
>
> Not allowed by binding.
>
>> + qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd";
>> + q6prmcc: cc {
>
> This should be "clock-controller".
>
>> + compatible = "qcom,q6prm-lpass-clocks";
>> + #clock-cells = <2>;
>> + };
>> + };
>> +
>
> Drop empty line
>
>> + };
>> +
>
> Ditto
>
>> };
>> };
>>
>
> Best regards,
> Krzysztof
>
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2022-11-19 16:36 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-15 17:02 [PATCH 0/3] arm64: dts: qcom: sc8280xp: add audio support Srinivas Kandagatla
2022-11-15 17:02 ` [PATCH 1/3] arm64: dts: qcom: sc8280xp/sa8540p: add gpr node Srinivas Kandagatla
2022-11-16 8:06 ` Krzysztof Kozlowski
2022-11-19 16:36 ` Srinivas Kandagatla
2022-11-16 11:03 ` Johan Hovold
2022-11-15 17:02 ` [PATCH 2/3] arm64: dts: qcom: sc8280xp/sa8540p: add SoundWire and LPASS Srinivas Kandagatla
2022-11-15 17:45 ` Konrad Dybcio
2022-11-16 8:10 ` Krzysztof Kozlowski
2022-11-16 10:40 ` Krzysztof Kozlowski
2022-11-15 17:02 ` [PATCH 3/3] arm64: dts: qcom: sc8280xp: Add soundcard support Srinivas Kandagatla
2022-11-15 17:48 ` Konrad Dybcio
2022-11-16 8:13 ` Krzysztof Kozlowski
2022-11-16 11:09 ` Johan Hovold
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.