All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/6] arm64: dts: qcom: sound cleanups
@ 2023-01-03 10:31 Johan Hovold
  2023-01-03 10:31 ` [PATCH v2 1/6] arm64: dts: qcom: sc8280xp: disable sound nodes Johan Hovold
                   ` (6 more replies)
  0 siblings, 7 replies; 12+ messages in thread
From: Johan Hovold @ 2023-01-03 10:31 UTC (permalink / raw)
  To: Bjorn Andersson
  Cc: Andy Gross, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Srinivas Kandagatla, linux-arm-msm, devicetree, linux-kernel,
	Johan Hovold

This series clean up the sc8280xp sound nodes somewhat, for example, by
making sure the nodes are disabled by default in the SoC dtsi.

Included are also two related cleanups for sm8450-hdk and sm8250.

Note that sound on the X13s is currently broken and depends on
out-of-tree hacks to even probe:

[   10.719830] qcom-apm gprsvc:service:2:1: CMD timeout for [1001021] opcode
[   10.762206] q6apm-dai 3000000.remoteproc:glink-edge:gpr:service@1:dais: Adding to iommu group 19
[   10.857910] qcom-prm gprsvc:service:2:2: DSP returned error[100100f] 1
[   10.858386] rx_macro: probe of 3200000.rxmacro failed with error -22
[   10.975745] qcom-soundwire 3250000.soundwire-controller: Qualcomm Soundwire controller v1.6.0 Registered
[   10.981406] wsa883x-codec sdw:0:0217:0202:00:1: WSA883X Version 1_1, Variant: WSA8835_V2
[   10.986440] wsa883x-codec sdw:0:0217:0202:00:2: WSA883X Version 1_1, Variant: WSA8835_V2
[   11.086238] qcom-soundwire 3330000.soundwire-controller: Qualcomm Soundwire controller v1.6.0 Registered
[   11.087322] qcom-soundwire 3330000.soundwire-controller: qcom_swrm_irq_handler: SWR bus clsh detected
[   14.342332] qcom-soundwire 3330000.soundwire-controller: swrm_wait_for_rd_fifo_avail err read underflow
[   14.342464] soundwire sdw-master-1: trf on Slave 1 failed:-5 read addr 41 count 1
[   14.342503] wcd9380-codec sdw:0:0217:010d:00:3: SDW_SCP_INTMASK1 write failed:-5
[   14.342536] wcd9380-codec sdw:0:0217:010d:00:3: Slave 1 initialization failed: -5
[   14.346734] qcom-soundwire 3330000.soundwire-controller: qcom_swrm_irq_handler: SWR bus clsh detected
[   17.727488] wcd9380-codec sdw:0:0217:010d:00:3: Slave 1 state check1: UNATTACHED, status was 1
[   17.839483] qcom-soundwire 3330000.soundwire-controller: qcom_swrm_irq_handler: SWR bus clsh detected
[   17.896325] qcom-soundwire 3330000.soundwire-controller: swrm_wait_for_frame_gen_enabled: link status not disconnected
[   17.896374] qcom-soundwire 3330000.soundwire-controller: link failed to connect
[   20.962617] platform 3210000.soundwire-controller: deferred probe pending

The out-of-tree patches I had seen that looked related to speaker
protection had been merged for 6.2-rc1 so hopefully the above log spew
is the only downside of keeping these nodes enabled for now.

Johan


Changes in v2
 - keep the sound nodes on x13s enabled despite the missing driver
   support -- hopefully Srini and Krzysztof can get this sorted before
   6.3 is released (Krzysztof)
 - moves the x13 vamacro node (new patch)
 - clean up the sm8450-hdk wcd938x node somewhat when moving it (Konrad)
 - rebase on sm8250 patch which had already moved the wcd938x node
   (Krzysztof)

Johan Hovold (6):
  arm64: dts: qcom: sc8280xp: disable sound nodes
  arm64: dts: qcom: sc8280xp-x13s: move vamacro node
  arm64: dts: qcom: sc8280xp: clean up tx-macro node
  arm64: dts: qcom: sc8280xp-x13s: move wcd938x codec node
  arm64: dts: qcom: sm8450-hdk: move wcd938x codec node
  arm64: dts: qcom: sm8250: clean up wcd938x codec node

 .../qcom/sc8280xp-lenovo-thinkpad-x13s.dts    | 78 ++++++++++++-------
 arch/arm64/boot/dts/qcom/sc8280xp.dtsi        | 18 ++++-
 arch/arm64/boot/dts/qcom/sm8250-mtp.dts       | 16 ++--
 arch/arm64/boot/dts/qcom/sm8450-hdk.dts       | 53 +++++++------
 4 files changed, 103 insertions(+), 62 deletions(-)

-- 
2.37.4


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH v2 1/6] arm64: dts: qcom: sc8280xp: disable sound nodes
  2023-01-03 10:31 [PATCH v2 0/6] arm64: dts: qcom: sound cleanups Johan Hovold
@ 2023-01-03 10:31 ` Johan Hovold
  2023-01-03 10:31 ` [PATCH v2 2/6] arm64: dts: qcom: sc8280xp-x13s: move vamacro node Johan Hovold
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 12+ messages in thread
From: Johan Hovold @ 2023-01-03 10:31 UTC (permalink / raw)
  To: Bjorn Andersson
  Cc: Andy Gross, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Srinivas Kandagatla, linux-arm-msm, devicetree, linux-kernel,
	Johan Hovold

The sound nodes in the SoC dtsi should be disabled by default.

Note that the lpass-tlmm and macro blocks depend on having the board dts
enable the adsp and specifying an appropriate firmware to enable the
q6prm clock controller.

Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 .../qcom/sc8280xp-lenovo-thinkpad-x13s.dts    | 20 +++++++++++++++++++
 arch/arm64/boot/dts/qcom/sc8280xp.dtsi        | 16 +++++++++++++++
 2 files changed, 36 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 0201c6776746..f30ede5839b2 100644
--- a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
+++ b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
@@ -628,6 +628,10 @@ &remoteproc_nsp0 {
 	status = "okay";
 };
 
+&rxmacro {
+	status = "okay";
+};
+
 &soc {
 	wcd938x: codec {
 		compatible = "qcom,wcd9380-codec";
@@ -731,6 +735,8 @@ codec {
 };
 
 &swr0 {
+	status = "okay";
+
 	left_spkr: wsa8830-left@0,1 {
 		compatible = "sdw10217020200";
 		reg = <0 1>;
@@ -776,11 +782,17 @@ wcd_tx: wcd9380-tx@0,3 {
 	};
 };
 
+&txmacro {
+	status = "okay";
+};
+
 &vamacro {
 	pinctrl-0 = <&dmic01_default>, <&dmic02_default>;
 	pinctrl-names = "default";
 	vdd-micb-supply = <&vreg_s10b>;
 	qcom,dmic-sample-rate = <600000>;
+
+	status = "okay";
 };
 
 &usb_0 {
@@ -831,12 +843,20 @@ &usb_1_qmpphy {
 	status = "okay";
 };
 
+&wsamacro {
+	status = "okay";
+};
+
 &xo_board_clk {
 	clock-frequency = <38400000>;
 };
 
 /* PINCTRL */
 
+&lpass_tlmm {
+	status = "okay";
+};
+
 &pmc8280_1_gpios {
 	edp_bl_en: edp-bl-en-state {
 		pins = "gpio8";
diff --git a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
index ed1e2bee86ee..c1ce2d7b3675 100644
--- a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
@@ -1733,6 +1733,8 @@ rxmacro: rxmacro@3200000 {
 
 			pinctrl-names = "default";
 			pinctrl-0 = <&rx_swr_default>;
+
+			status = "disabled";
 		};
 
 		/* RX */
@@ -1760,6 +1762,8 @@ swr1: soundwire-controller@3210000 {
 			#sound-dai-cells = <1>;
 			#address-cells = <2>;
 			#size-cells = <0>;
+
+			status = "disabled";
 		};
 
 		txmacro: txmacro@3220000 {
@@ -1783,6 +1787,8 @@ txmacro: txmacro@3220000 {
 			#address-cells = <2>;
 			#size-cells = <2>;
 			#sound-dai-cells = <1>;
+
+			status = "disabled";
 		};
 
 		wsamacro: codec@3240000 {
@@ -1804,6 +1810,8 @@ wsamacro: codec@3240000 {
 
 			pinctrl-names = "default";
 			pinctrl-0 = <&wsa_swr_default>;
+
+			status = "disabled";
 		};
 
 		/* WSA */
@@ -1830,6 +1838,8 @@ swr0: soundwire-controller@3250000 {
 			#sound-dai-cells = <1>;
 			#address-cells = <2>;
 			#size-cells = <0>;
+
+			status = "disabled";
 		};
 
 		/* TX */
@@ -1858,6 +1868,8 @@ swr2: soundwire-controller@3330000 {
 			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>;
+
+			status = "disabled";
 		};
 
 		vamacro: codec@3370000 {
@@ -1874,6 +1886,8 @@ vamacro: codec@3370000 {
 			#clock-cells = <0>;
 			clock-output-names = "fsgen";
 			#sound-dai-cells = <1>;
+
+			status = "disabled";
 		};
 
 		lpass_tlmm: pinctrl@33c0000 {
@@ -1888,6 +1902,8 @@ lpass_tlmm: pinctrl@33c0000 {
 				 <&q6prmcc LPASS_HW_DCODEC_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>;
 			clock-names = "core", "audio";
 
+			status = "disabled";
+
 			tx_swr_default: tx-swr-default-state {
 				clk-pins {
 					pins = "gpio0";
-- 
2.37.4


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH v2 2/6] arm64: dts: qcom: sc8280xp-x13s: move vamacro node
  2023-01-03 10:31 [PATCH v2 0/6] arm64: dts: qcom: sound cleanups Johan Hovold
  2023-01-03 10:31 ` [PATCH v2 1/6] arm64: dts: qcom: sc8280xp: disable sound nodes Johan Hovold
@ 2023-01-03 10:31 ` Johan Hovold
  2023-01-03 13:35   ` Konrad Dybcio
  2023-01-03 10:31 ` [PATCH v2 3/6] arm64: dts: qcom: sc8280xp: clean up tx-macro node Johan Hovold
                   ` (4 subsequent siblings)
  6 siblings, 1 reply; 12+ messages in thread
From: Johan Hovold @ 2023-01-03 10:31 UTC (permalink / raw)
  To: Bjorn Andersson
  Cc: Andy Gross, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Srinivas Kandagatla, linux-arm-msm, devicetree, linux-kernel,
	Johan Hovold

Move the vamacro node to restore the alphabetical sort order.

While at it, add some newline separators to improve readability.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 .../qcom/sc8280xp-lenovo-thinkpad-x13s.dts    | 20 ++++++++++---------
 1 file changed, 11 insertions(+), 9 deletions(-)

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 f30ede5839b2..cc67a80758af 100644
--- a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
+++ b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
@@ -786,15 +786,6 @@ &txmacro {
 	status = "okay";
 };
 
-&vamacro {
-	pinctrl-0 = <&dmic01_default>, <&dmic02_default>;
-	pinctrl-names = "default";
-	vdd-micb-supply = <&vreg_s10b>;
-	qcom,dmic-sample-rate = <600000>;
-
-	status = "okay";
-};
-
 &usb_0 {
 	status = "okay";
 };
@@ -843,6 +834,17 @@ &usb_1_qmpphy {
 	status = "okay";
 };
 
+&vamacro {
+	pinctrl-0 = <&dmic01_default>, <&dmic02_default>;
+	pinctrl-names = "default";
+
+	vdd-micb-supply = <&vreg_s10b>;
+
+	qcom,dmic-sample-rate = <600000>;
+
+	status = "okay";
+};
+
 &wsamacro {
 	status = "okay";
 };
-- 
2.37.4


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH v2 3/6] arm64: dts: qcom: sc8280xp: clean up tx-macro node
  2023-01-03 10:31 [PATCH v2 0/6] arm64: dts: qcom: sound cleanups Johan Hovold
  2023-01-03 10:31 ` [PATCH v2 1/6] arm64: dts: qcom: sc8280xp: disable sound nodes Johan Hovold
  2023-01-03 10:31 ` [PATCH v2 2/6] arm64: dts: qcom: sc8280xp-x13s: move vamacro node Johan Hovold
@ 2023-01-03 10:31 ` Johan Hovold
  2023-01-03 10:31 ` [PATCH v2 4/6] arm64: dts: qcom: sc8280xp-x13s: move wcd938x codec node Johan Hovold
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 12+ messages in thread
From: Johan Hovold @ 2023-01-03 10:31 UTC (permalink / raw)
  To: Bjorn Andersson
  Cc: Andy Gross, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Srinivas Kandagatla, linux-arm-msm, devicetree, linux-kernel,
	Johan Hovold

Drop the bogus address and size-cells properties from the tx-macro node,
which do not have any child nodes.

Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 2 --
 1 file changed, 2 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
index c1ce2d7b3675..11e3d560c627 100644
--- a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
@@ -1784,8 +1784,6 @@ txmacro: txmacro@3220000 {
 			clock-output-names = "mclk";
 
 			#clock-cells = <0>;
-			#address-cells = <2>;
-			#size-cells = <2>;
 			#sound-dai-cells = <1>;
 
 			status = "disabled";
-- 
2.37.4


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH v2 4/6] arm64: dts: qcom: sc8280xp-x13s: move wcd938x codec node
  2023-01-03 10:31 [PATCH v2 0/6] arm64: dts: qcom: sound cleanups Johan Hovold
                   ` (2 preceding siblings ...)
  2023-01-03 10:31 ` [PATCH v2 3/6] arm64: dts: qcom: sc8280xp: clean up tx-macro node Johan Hovold
@ 2023-01-03 10:31 ` Johan Hovold
  2023-01-03 10:31 ` [PATCH v2 5/6] arm64: dts: qcom: sm8450-hdk: " Johan Hovold
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 12+ messages in thread
From: Johan Hovold @ 2023-01-03 10:31 UTC (permalink / raw)
  To: Bjorn Andersson
  Cc: Andy Gross, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Srinivas Kandagatla, linux-arm-msm, devicetree, linux-kernel,
	Johan Hovold

The wcd938x codec is not a memory-mapped device and does not belong
under the soc node.

Move the node to the root node to avoid DT validation failures.

While at it, clean up the node somewhat by adding newline separators,
reordering properties and renaming it 'audio-codec'.

Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 .../qcom/sc8280xp-lenovo-thinkpad-x13s.dts    | 50 ++++++++++---------
 1 file changed, 26 insertions(+), 24 deletions(-)

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 cc67a80758af..23c1ca44ec11 100644
--- a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
+++ b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
@@ -21,6 +21,32 @@ / {
 	model = "Lenovo ThinkPad X13s";
 	compatible = "lenovo,thinkpad-x13s", "qcom,sc8280xp";
 
+	wcd938x: audio-codec {
+		compatible = "qcom,wcd9380-codec";
+
+		pinctrl-names = "default";
+		pinctrl-0 = <&wcd_default>;
+
+		reset-gpios = <&tlmm 106 GPIO_ACTIVE_LOW>;
+
+		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>;
+
+		#sound-dai-cells = <1>;
+	};
+
 	backlight {
 		compatible = "pwm-backlight";
 		pwms = <&pmc8280c_lpg 3 1000000>;
@@ -632,30 +658,6 @@ &rxmacro {
 	status = "okay";
 };
 
-&soc {
-	wcd938x: codec {
-		compatible = "qcom,wcd9380-codec";
-		pinctrl-names = "default";
-		pinctrl-0 = <&wcd_default>;
-		reset-gpios = <&tlmm 106 GPIO_ACTIVE_LOW>;
-		#sound-dai-cells = <1>;
-
-		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>;
-	};
-};
-
 &sound {
 	compatible = "qcom,sc8280xp-sndcard";
 	model = "SC8280XP-LENOVO-X13S";
-- 
2.37.4


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH v2 5/6] arm64: dts: qcom: sm8450-hdk: move wcd938x codec node
  2023-01-03 10:31 [PATCH v2 0/6] arm64: dts: qcom: sound cleanups Johan Hovold
                   ` (3 preceding siblings ...)
  2023-01-03 10:31 ` [PATCH v2 4/6] arm64: dts: qcom: sc8280xp-x13s: move wcd938x codec node Johan Hovold
@ 2023-01-03 10:31 ` Johan Hovold
  2023-01-03 10:36   ` Johan Hovold
  2023-01-03 13:36   ` Konrad Dybcio
  2023-01-03 10:31 ` [PATCH v2 6/6] arm64: dts: qcom: sm8250: clean up " Johan Hovold
  2023-01-18 22:50 ` [PATCH v2 0/6] arm64: dts: qcom: sound cleanups Bjorn Andersson
  6 siblings, 2 replies; 12+ messages in thread
From: Johan Hovold @ 2023-01-03 10:31 UTC (permalink / raw)
  To: Bjorn Andersson
  Cc: Andy Gross, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Srinivas Kandagatla, linux-arm-msm, devicetree, linux-kernel,
	Johan Hovold

The wcd938x codec is not a memory-mapped device and does not belong
under the soc node.

Move the node to the root node to avoid DT validation failures.

While at it, clean up the node somewhat by reordering properties and
renaming it 'audio-codec'.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 arch/arm64/boot/dts/qcom/sm8450-hdk.dts | 53 ++++++++++++-------------
 1 file changed, 26 insertions(+), 27 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/sm8450-hdk.dts b/arch/arm64/boot/dts/qcom/sm8450-hdk.dts
index 4de3e1f1c39c..8ac7265d8c10 100644
--- a/arch/arm64/boot/dts/qcom/sm8450-hdk.dts
+++ b/arch/arm64/boot/dts/qcom/sm8450-hdk.dts
@@ -17,6 +17,32 @@ aliases {
 		serial0 = &uart7;
 	};
 
+	wcd938x: audio-codec {
+		compatible = "qcom,wcd9380-codec";
+
+		pinctrl-names = "default";
+		pinctrl-0 = <&wcd_default>;
+
+		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>;
+
+		reset-gpios = <&tlmm 43 GPIO_ACTIVE_LOW>;
+
+		vdd-buck-supply = <&vreg_s10b_1p8>;
+		vdd-rxtx-supply = <&vreg_s10b_1p8>;
+		vdd-io-supply = <&vreg_s10b_1p8>;
+		vdd-mic-bias-supply = <&vreg_bob>;
+
+		#sound-dai-cells = <1>;
+	};
+
 	chosen {
 		stdout-path = "serial0:115200n8";
 	};
@@ -407,33 +433,6 @@ &sdhc_2 {
 	status = "okay";
 };
 
-&soc {
-	wcd938x: codec {
-		compatible = "qcom,wcd9380-codec";
-
-		pinctrl-names = "default";
-		pinctrl-0 = <&wcd_default>;
-
-		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>;
-
-		reset-gpios = <&tlmm 43 GPIO_ACTIVE_LOW>;
-		#sound-dai-cells = <1>;
-
-		vdd-buck-supply = <&vreg_s10b_1p8>;
-		vdd-rxtx-supply = <&vreg_s10b_1p8>;
-		vdd-io-supply = <&vreg_s10b_1p8>;
-		vdd-mic-bias-supply = <&vreg_bob>;
-	};
-};
-
 &sound {
 	compatible = "qcom,sm8450-sndcard";
 	model = "SM8450-HDK";
-- 
2.37.4


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH v2 6/6] arm64: dts: qcom: sm8250: clean up wcd938x codec node
  2023-01-03 10:31 [PATCH v2 0/6] arm64: dts: qcom: sound cleanups Johan Hovold
                   ` (4 preceding siblings ...)
  2023-01-03 10:31 ` [PATCH v2 5/6] arm64: dts: qcom: sm8450-hdk: " Johan Hovold
@ 2023-01-03 10:31 ` Johan Hovold
  2023-01-03 13:37   ` Konrad Dybcio
  2023-01-18 22:50 ` [PATCH v2 0/6] arm64: dts: qcom: sound cleanups Bjorn Andersson
  6 siblings, 1 reply; 12+ messages in thread
From: Johan Hovold @ 2023-01-03 10:31 UTC (permalink / raw)
  To: Bjorn Andersson
  Cc: Andy Gross, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Srinivas Kandagatla, linux-arm-msm, devicetree, linux-kernel,
	Johan Hovold

Clean up the wcd938x codec node somewhat by adding newline separators,
reordering properties and renaming it 'audio-codec'.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 arch/arm64/boot/dts/qcom/sm8250-mtp.dts | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/sm8250-mtp.dts b/arch/arm64/boot/dts/qcom/sm8250-mtp.dts
index b741b7da1afc..0991b34a8e49 100644
--- a/arch/arm64/boot/dts/qcom/sm8250-mtp.dts
+++ b/arch/arm64/boot/dts/qcom/sm8250-mtp.dts
@@ -23,18 +23,16 @@ aliases {
 		serial0 = &uart12;
 	};
 
-	chosen {
-		stdout-path = "serial0:115200n8";
-	};
-
-	wcd938x: codec {
+	wcd938x: audio-codec {
 		compatible = "qcom,wcd9380-codec";
-		#sound-dai-cells = <1>;
+
 		reset-gpios = <&tlmm 32 GPIO_ACTIVE_LOW>;
+
 		vdd-buck-supply = <&vreg_s4a_1p8>;
 		vdd-rxtx-supply = <&vreg_s4a_1p8>;
 		vdd-io-supply = <&vreg_s4a_1p8>;
 		vdd-mic-bias-supply = <&vreg_bob>;
+
 		qcom,micbias1-microvolt = <1800000>;
 		qcom,micbias2-microvolt = <1800000>;
 		qcom,micbias3-microvolt = <1800000>;
@@ -44,6 +42,12 @@ wcd938x: codec {
 		qcom,mbhc-headphone-vthreshold-microvolt = <50000>;
 		qcom,rx-device = <&wcd_rx>;
 		qcom,tx-device = <&wcd_tx>;
+
+		#sound-dai-cells = <1>;
+	};
+
+	chosen {
+		stdout-path = "serial0:115200n8";
 	};
 
 	thermal-zones {
-- 
2.37.4


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PATCH v2 5/6] arm64: dts: qcom: sm8450-hdk: move wcd938x codec node
  2023-01-03 10:31 ` [PATCH v2 5/6] arm64: dts: qcom: sm8450-hdk: " Johan Hovold
@ 2023-01-03 10:36   ` Johan Hovold
  2023-01-03 13:36   ` Konrad Dybcio
  1 sibling, 0 replies; 12+ messages in thread
From: Johan Hovold @ 2023-01-03 10:36 UTC (permalink / raw)
  To: Johan Hovold
  Cc: Bjorn Andersson, Andy Gross, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, Srinivas Kandagatla, linux-arm-msm,
	devicetree, linux-kernel

On Tue, Jan 03, 2023 at 11:31:40AM +0100, Johan Hovold wrote:
> The wcd938x codec is not a memory-mapped device and does not belong
> under the soc node.
> 
> Move the node to the root node to avoid DT validation failures.
> 
> While at it, clean up the node somewhat by reordering properties and
> renaming it 'audio-codec'.
> 
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> ---
>  arch/arm64/boot/dts/qcom/sm8450-hdk.dts | 53 ++++++++++++-------------
>  1 file changed, 26 insertions(+), 27 deletions(-)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sm8450-hdk.dts b/arch/arm64/boot/dts/qcom/sm8450-hdk.dts
> index 4de3e1f1c39c..8ac7265d8c10 100644
> --- a/arch/arm64/boot/dts/qcom/sm8450-hdk.dts
> +++ b/arch/arm64/boot/dts/qcom/sm8450-hdk.dts
> @@ -17,6 +17,32 @@ aliases {
>  		serial0 = &uart7;
>  	};
>  
> +	wcd938x: audio-codec {
> +		compatible = "qcom,wcd9380-codec";
> +
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&wcd_default>;
> +
> +		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>;

Bah, apparently I forgot to move the vendor properties after the
supplies as I had intended. Probably not worth resending the series
over.

> +
> +		reset-gpios = <&tlmm 43 GPIO_ACTIVE_LOW>;
> +
> +		vdd-buck-supply = <&vreg_s10b_1p8>;
> +		vdd-rxtx-supply = <&vreg_s10b_1p8>;
> +		vdd-io-supply = <&vreg_s10b_1p8>;
> +		vdd-mic-bias-supply = <&vreg_bob>;
> +
> +		#sound-dai-cells = <1>;
> +	};

Johan

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v2 2/6] arm64: dts: qcom: sc8280xp-x13s: move vamacro node
  2023-01-03 10:31 ` [PATCH v2 2/6] arm64: dts: qcom: sc8280xp-x13s: move vamacro node Johan Hovold
@ 2023-01-03 13:35   ` Konrad Dybcio
  0 siblings, 0 replies; 12+ messages in thread
From: Konrad Dybcio @ 2023-01-03 13:35 UTC (permalink / raw)
  To: Johan Hovold, Bjorn Andersson
  Cc: Andy Gross, Rob Herring, Krzysztof Kozlowski,
	Srinivas Kandagatla, linux-arm-msm, devicetree, linux-kernel



On 3.01.2023 11:31, Johan Hovold wrote:
> Move the vamacro node to restore the alphabetical sort order.
> 
> While at it, add some newline separators to improve readability.
> 
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>

Konrad
>  .../qcom/sc8280xp-lenovo-thinkpad-x13s.dts    | 20 ++++++++++---------
>  1 file changed, 11 insertions(+), 9 deletions(-)
> 
> 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 f30ede5839b2..cc67a80758af 100644
> --- a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
> +++ b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
> @@ -786,15 +786,6 @@ &txmacro {
>  	status = "okay";
>  };
>  
> -&vamacro {
> -	pinctrl-0 = <&dmic01_default>, <&dmic02_default>;
> -	pinctrl-names = "default";
> -	vdd-micb-supply = <&vreg_s10b>;
> -	qcom,dmic-sample-rate = <600000>;
> -
> -	status = "okay";
> -};
> -
>  &usb_0 {
>  	status = "okay";
>  };
> @@ -843,6 +834,17 @@ &usb_1_qmpphy {
>  	status = "okay";
>  };
>  
> +&vamacro {
> +	pinctrl-0 = <&dmic01_default>, <&dmic02_default>;
> +	pinctrl-names = "default";
> +
> +	vdd-micb-supply = <&vreg_s10b>;
> +
> +	qcom,dmic-sample-rate = <600000>;
> +
> +	status = "okay";
> +};
> +
>  &wsamacro {
>  	status = "okay";
>  };

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v2 5/6] arm64: dts: qcom: sm8450-hdk: move wcd938x codec node
  2023-01-03 10:31 ` [PATCH v2 5/6] arm64: dts: qcom: sm8450-hdk: " Johan Hovold
  2023-01-03 10:36   ` Johan Hovold
@ 2023-01-03 13:36   ` Konrad Dybcio
  1 sibling, 0 replies; 12+ messages in thread
From: Konrad Dybcio @ 2023-01-03 13:36 UTC (permalink / raw)
  To: Johan Hovold, Bjorn Andersson
  Cc: Andy Gross, Rob Herring, Krzysztof Kozlowski,
	Srinivas Kandagatla, linux-arm-msm, devicetree, linux-kernel



On 3.01.2023 11:31, Johan Hovold wrote:
> The wcd938x codec is not a memory-mapped device and does not belong
> under the soc node.
> 
> Move the node to the root node to avoid DT validation failures.
> 
> While at it, clean up the node somewhat by reordering properties and
> renaming it 'audio-codec'.
> 
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>

Konrad
>  arch/arm64/boot/dts/qcom/sm8450-hdk.dts | 53 ++++++++++++-------------
>  1 file changed, 26 insertions(+), 27 deletions(-)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sm8450-hdk.dts b/arch/arm64/boot/dts/qcom/sm8450-hdk.dts
> index 4de3e1f1c39c..8ac7265d8c10 100644
> --- a/arch/arm64/boot/dts/qcom/sm8450-hdk.dts
> +++ b/arch/arm64/boot/dts/qcom/sm8450-hdk.dts
> @@ -17,6 +17,32 @@ aliases {
>  		serial0 = &uart7;
>  	};
>  
> +	wcd938x: audio-codec {
> +		compatible = "qcom,wcd9380-codec";
> +
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&wcd_default>;
> +
> +		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>;
> +
> +		reset-gpios = <&tlmm 43 GPIO_ACTIVE_LOW>;
> +
> +		vdd-buck-supply = <&vreg_s10b_1p8>;
> +		vdd-rxtx-supply = <&vreg_s10b_1p8>;
> +		vdd-io-supply = <&vreg_s10b_1p8>;
> +		vdd-mic-bias-supply = <&vreg_bob>;
> +
> +		#sound-dai-cells = <1>;
> +	};
> +
>  	chosen {
>  		stdout-path = "serial0:115200n8";
>  	};
> @@ -407,33 +433,6 @@ &sdhc_2 {
>  	status = "okay";
>  };
>  
> -&soc {
> -	wcd938x: codec {
> -		compatible = "qcom,wcd9380-codec";
> -
> -		pinctrl-names = "default";
> -		pinctrl-0 = <&wcd_default>;
> -
> -		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>;
> -
> -		reset-gpios = <&tlmm 43 GPIO_ACTIVE_LOW>;
> -		#sound-dai-cells = <1>;
> -
> -		vdd-buck-supply = <&vreg_s10b_1p8>;
> -		vdd-rxtx-supply = <&vreg_s10b_1p8>;
> -		vdd-io-supply = <&vreg_s10b_1p8>;
> -		vdd-mic-bias-supply = <&vreg_bob>;
> -	};
> -};
> -
>  &sound {
>  	compatible = "qcom,sm8450-sndcard";
>  	model = "SM8450-HDK";

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v2 6/6] arm64: dts: qcom: sm8250: clean up wcd938x codec node
  2023-01-03 10:31 ` [PATCH v2 6/6] arm64: dts: qcom: sm8250: clean up " Johan Hovold
@ 2023-01-03 13:37   ` Konrad Dybcio
  0 siblings, 0 replies; 12+ messages in thread
From: Konrad Dybcio @ 2023-01-03 13:37 UTC (permalink / raw)
  To: Johan Hovold, Bjorn Andersson
  Cc: Andy Gross, Rob Herring, Krzysztof Kozlowski,
	Srinivas Kandagatla, linux-arm-msm, devicetree, linux-kernel



On 3.01.2023 11:31, Johan Hovold wrote:
> Clean up the wcd938x codec node somewhat by adding newline separators,
> reordering properties and renaming it 'audio-codec'.
> 
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>

Konrad
>  arch/arm64/boot/dts/qcom/sm8250-mtp.dts | 16 ++++++++++------
>  1 file changed, 10 insertions(+), 6 deletions(-)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sm8250-mtp.dts b/arch/arm64/boot/dts/qcom/sm8250-mtp.dts
> index b741b7da1afc..0991b34a8e49 100644
> --- a/arch/arm64/boot/dts/qcom/sm8250-mtp.dts
> +++ b/arch/arm64/boot/dts/qcom/sm8250-mtp.dts
> @@ -23,18 +23,16 @@ aliases {
>  		serial0 = &uart12;
>  	};
>  
> -	chosen {
> -		stdout-path = "serial0:115200n8";
> -	};
> -
> -	wcd938x: codec {
> +	wcd938x: audio-codec {
>  		compatible = "qcom,wcd9380-codec";
> -		#sound-dai-cells = <1>;
> +
>  		reset-gpios = <&tlmm 32 GPIO_ACTIVE_LOW>;
> +
>  		vdd-buck-supply = <&vreg_s4a_1p8>;
>  		vdd-rxtx-supply = <&vreg_s4a_1p8>;
>  		vdd-io-supply = <&vreg_s4a_1p8>;
>  		vdd-mic-bias-supply = <&vreg_bob>;
> +
>  		qcom,micbias1-microvolt = <1800000>;
>  		qcom,micbias2-microvolt = <1800000>;
>  		qcom,micbias3-microvolt = <1800000>;
> @@ -44,6 +42,12 @@ wcd938x: codec {
>  		qcom,mbhc-headphone-vthreshold-microvolt = <50000>;
>  		qcom,rx-device = <&wcd_rx>;
>  		qcom,tx-device = <&wcd_tx>;
> +
> +		#sound-dai-cells = <1>;
> +	};
> +
> +	chosen {
> +		stdout-path = "serial0:115200n8";
>  	};
>  
>  	thermal-zones {

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v2 0/6] arm64: dts: qcom: sound cleanups
  2023-01-03 10:31 [PATCH v2 0/6] arm64: dts: qcom: sound cleanups Johan Hovold
                   ` (5 preceding siblings ...)
  2023-01-03 10:31 ` [PATCH v2 6/6] arm64: dts: qcom: sm8250: clean up " Johan Hovold
@ 2023-01-18 22:50 ` Bjorn Andersson
  6 siblings, 0 replies; 12+ messages in thread
From: Bjorn Andersson @ 2023-01-18 22:50 UTC (permalink / raw)
  To: johan+linaro
  Cc: konrad.dybcio, srinivas.kandagatla, robh+dt, devicetree,
	linux-arm-msm, krzysztof.kozlowski+dt, linux-kernel, agross

On Tue, 3 Jan 2023 11:31:35 +0100, Johan Hovold wrote:
> This series clean up the sc8280xp sound nodes somewhat, for example, by
> making sure the nodes are disabled by default in the SoC dtsi.
> 
> Included are also two related cleanups for sm8450-hdk and sm8250.
> 
> Note that sound on the X13s is currently broken and depends on
> out-of-tree hacks to even probe:
> 
> [...]

Applied, thanks!

[1/6] arm64: dts: qcom: sc8280xp: disable sound nodes
      commit: 6ded5ed60984104a1a3560e02422941c25da686c
[2/6] arm64: dts: qcom: sc8280xp-x13s: move vamacro node
      commit: acf906140790837d235567c93207fde6ac8e1e64
[3/6] arm64: dts: qcom: sc8280xp: clean up tx-macro node
      (no commit info)
[4/6] arm64: dts: qcom: sc8280xp-x13s: move wcd938x codec node
      commit: fdc6a0b272c5f91bfb4dcd8c0d7757d8dc0abef4
[5/6] arm64: dts: qcom: sm8450-hdk: move wcd938x codec node
      commit: 306380dc93c5a305a009f7d210da0995e3babceb
[6/6] arm64: dts: qcom: sm8250: clean up wcd938x codec node
      commit: 74d6ed033d47200d18204e3935b201f385476271

Best regards,
-- 
Bjorn Andersson <andersson@kernel.org>

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2023-01-18 22:50 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-03 10:31 [PATCH v2 0/6] arm64: dts: qcom: sound cleanups Johan Hovold
2023-01-03 10:31 ` [PATCH v2 1/6] arm64: dts: qcom: sc8280xp: disable sound nodes Johan Hovold
2023-01-03 10:31 ` [PATCH v2 2/6] arm64: dts: qcom: sc8280xp-x13s: move vamacro node Johan Hovold
2023-01-03 13:35   ` Konrad Dybcio
2023-01-03 10:31 ` [PATCH v2 3/6] arm64: dts: qcom: sc8280xp: clean up tx-macro node Johan Hovold
2023-01-03 10:31 ` [PATCH v2 4/6] arm64: dts: qcom: sc8280xp-x13s: move wcd938x codec node Johan Hovold
2023-01-03 10:31 ` [PATCH v2 5/6] arm64: dts: qcom: sm8450-hdk: " Johan Hovold
2023-01-03 10:36   ` Johan Hovold
2023-01-03 13:36   ` Konrad Dybcio
2023-01-03 10:31 ` [PATCH v2 6/6] arm64: dts: qcom: sm8250: clean up " Johan Hovold
2023-01-03 13:37   ` Konrad Dybcio
2023-01-18 22:50 ` [PATCH v2 0/6] arm64: dts: qcom: sound cleanups Bjorn Andersson

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.