lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230529-msm8916-pinctrl-v1-4-11f540b51c93@gerhold.net>
Date:   Tue, 30 May 2023 09:15:25 +0200
From:   Stephan Gerhold <stephan@...hold.net>
To:     Bjorn Andersson <andersson@...nel.org>
Cc:     Andy Gross <agross@...nel.org>,
        Konrad Dybcio <konrad.dybcio@...aro.org>,
        linux-arm-msm@...r.kernel.org, devicetree@...r.kernel.org,
        linux-kernel@...r.kernel.org,
        Bryan O'Donoghue <bryan.odonoghue@...aro.org>,
        Srinivas Kandagatla <srinivas.kandagatla@...aro.org>,
        Stephan Gerhold <stephan@...hold.net>
Subject: [PATCH 4/6] arm64: dts: qcom: msm8916/39: Cleanup audio pinctrl

The audio pinctrl in MSM8916/MSM8939 is very similar but still has
subtle differences, e.g. &cdc_pdm_lines_act on MSM8916 vs
&cdc_pdm_lines_default on MSM8939.

Make this consistent and use the chance to cleanup all of the audio
pinctrl: Drop unneeded outer nodes and replace the names taken over
from the vendor kernel with more clear ones that are similar to the
actual pinctrl function.

Cc: Srinivas Kandagatla <srinivas.kandagatla@...aro.org>
Signed-off-by: Stephan Gerhold <stephan@...hold.net>
---
 arch/arm64/boot/dts/qcom/apq8016-sbc.dts       |   4 +-
 arch/arm64/boot/dts/qcom/apq8039-t2.dts        |   4 +-
 arch/arm64/boot/dts/qcom/msm8916-huawei-g7.dts |   4 +-
 arch/arm64/boot/dts/qcom/msm8916-pins.dtsi     | 135 ++++++++++++-------------
 arch/arm64/boot/dts/qcom/msm8939.dtsi          | 133 ++++++++++++------------
 5 files changed, 133 insertions(+), 147 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/apq8016-sbc.dts b/arch/arm64/boot/dts/qcom/apq8016-sbc.dts
index dad7586712da..f3d65a606194 100644
--- a/arch/arm64/boot/dts/qcom/apq8016-sbc.dts
+++ b/arch/arm64/boot/dts/qcom/apq8016-sbc.dts
@@ -385,8 +385,8 @@ &sdhc_2 {
 &sound {
 	status = "okay";
 
-	pinctrl-0 = <&cdc_pdm_lines_act &ext_sec_tlmm_lines_act>;
-	pinctrl-1 = <&cdc_pdm_lines_sus &ext_sec_tlmm_lines_sus>;
+	pinctrl-0 = <&cdc_pdm_default &sec_mi2s_default>;
+	pinctrl-1 = <&cdc_pdm_sleep &sec_mi2s_sleep>;
 	pinctrl-names = "default", "sleep";
 	model = "DB410c";
 	audio-routing =
diff --git a/arch/arm64/boot/dts/qcom/apq8039-t2.dts b/arch/arm64/boot/dts/qcom/apq8039-t2.dts
index 107795bf7e5c..2a39216ceef5 100644
--- a/arch/arm64/boot/dts/qcom/apq8039-t2.dts
+++ b/arch/arm64/boot/dts/qcom/apq8039-t2.dts
@@ -260,8 +260,8 @@ &sound {
 	model = "apq8039-square-sndcard";
 	audio-routing = "AMIC2", "MIC BIAS Internal2";
 	pinctrl-names = "default", "sleep";
-	pinctrl-0 = <&cdc_pdm_lines_default>;
-	pinctrl-1 = <&cdc_pdm_lines_sleep>;
+	pinctrl-0 = <&cdc_pdm_default>;
+	pinctrl-1 = <&cdc_pdm_sleep>;
 
 	internal-codec-playback-dai-link {
 		link-name = "WCD";
diff --git a/arch/arm64/boot/dts/qcom/msm8916-huawei-g7.dts b/arch/arm64/boot/dts/qcom/msm8916-huawei-g7.dts
index abd409f10cfe..4239c8fda11b 100644
--- a/arch/arm64/boot/dts/qcom/msm8916-huawei-g7.dts
+++ b/arch/arm64/boot/dts/qcom/msm8916-huawei-g7.dts
@@ -295,8 +295,8 @@ &sound {
 		"AMIC3", "MIC BIAS External1";
 
 	pinctrl-names = "default", "sleep";
-	pinctrl-0 = <&cdc_pdm_lines_act>;
-	pinctrl-1 = <&cdc_pdm_lines_sus>;
+	pinctrl-0 = <&cdc_pdm_default>;
+	pinctrl-1 = <&cdc_pdm_sleep>;
 
 	primary-dai-link {
 		link-name = "WCD";
diff --git a/arch/arm64/boot/dts/qcom/msm8916-pins.dtsi b/arch/arm64/boot/dts/qcom/msm8916-pins.dtsi
index cbf0f3d311af..2cfaed37cb59 100644
--- a/arch/arm64/boot/dts/qcom/msm8916-pins.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8916-pins.dtsi
@@ -374,95 +374,89 @@ data-pins {
 		};
 	};
 
-	cdc-pdm-lines-state {
-		cdc_pdm_lines_act: pdm-lines-on-pins {
-			pins = "gpio63", "gpio64", "gpio65", "gpio66",
-			       "gpio67", "gpio68";
-			function = "cdc_pdm0";
+	cdc_pdm_default: cdc-pdm-default-state {
+		pins = "gpio63", "gpio64", "gpio65", "gpio66",
+		       "gpio67", "gpio68";
+		function = "cdc_pdm0";
 
-			drive-strength = <8>;
-			bias-disable;
-		};
-		cdc_pdm_lines_sus: pdm-lines-off-pins {
-			pins = "gpio63", "gpio64", "gpio65", "gpio66",
-			       "gpio67", "gpio68";
-			function = "cdc_pdm0";
+		drive-strength = <8>;
+		bias-disable;
+	};
 
-			drive-strength = <2>;
-			bias-pull-down;
-		};
+	cdc_pdm_sleep: cdc-pdm-sleep-state {
+		pins = "gpio63", "gpio64", "gpio65", "gpio66",
+		       "gpio67", "gpio68";
+		function = "cdc_pdm0";
+
+		drive-strength = <2>;
+		bias-pull-down;
 	};
 
-	ext-pri-tlmm-lines-state {
-		ext_pri_tlmm_lines_act: ext-pa-on-pins {
-			pins = "gpio113", "gpio114", "gpio115", "gpio116";
-			function = "pri_mi2s";
+	pri_mi2s_default: mi2s-pri-default-state {
+		pins = "gpio113", "gpio114", "gpio115", "gpio116";
+		function = "pri_mi2s";
 
-			drive-strength = <8>;
-			bias-disable;
-		};
-		ext_pri_tlmm_lines_sus: ext-pa-off-pins {
-			pins = "gpio113", "gpio114", "gpio115", "gpio116";
-			function = "pri_mi2s";
+		drive-strength = <8>;
+		bias-disable;
+	};
 
-			drive-strength = <2>;
-			bias-disable;
-		};
+	pri_mi2s_sleep: mi2s-pri-sleep-state {
+		pins = "gpio113", "gpio114", "gpio115", "gpio116";
+		function = "pri_mi2s";
+
+		drive-strength = <2>;
+		bias-disable;
 	};
 
-	ext-pri-ws-line-state {
-		ext_pri_ws_act: ext-pa-on-pins {
-			pins = "gpio110";
-			function = "pri_mi2s_ws";
+	pri_mi2s_ws_default: mi2s-pri-ws-default-state {
+		pins = "gpio110";
+		function = "pri_mi2s_ws";
 
-			drive-strength = <8>;
-			bias-disable;
-		};
-		ext_pri_ws_sus: ext-pa-off-pins {
-			pins = "gpio110";
-			function = "pri_mi2s_ws";
+		drive-strength = <8>;
+		bias-disable;
+	};
 
-			drive-strength = <2>;
-			bias-disable;
-		};
+	pri_mi2s_ws_sleep: mi2s-pri-ws-sleep-state {
+		pins = "gpio110";
+		function = "pri_mi2s_ws";
+
+		drive-strength = <2>;
+		bias-disable;
 	};
 
-	ext-mclk-tlmm-lines-state {
-		ext_mclk_tlmm_lines_act: mclk-lines-on-pins {
-			pins = "gpio116";
-			function = "pri_mi2s";
+	pri_mi2s_mclk_default: mi2s-pri-mclk-default-state {
+		pins = "gpio116";
+		function = "pri_mi2s";
 
-			drive-strength = <8>;
-			bias-disable;
-		};
-		ext_mclk_tlmm_lines_sus: mclk-lines-off-pins {
-			pins = "gpio116";
-			function = "pri_mi2s";
+		drive-strength = <8>;
+		bias-disable;
+	};
 
-			drive-strength = <2>;
-			bias-disable;
-		};
+	pri_mi2s_mclk_sleep: mi2s-pri-mclk-sleep-state {
+		pins = "gpio116";
+		function = "pri_mi2s";
+
+		drive-strength = <2>;
+		bias-disable;
 	};
 
-	/* secondary Mi2S */
-	ext-sec-tlmm-lines-state {
-		ext_sec_tlmm_lines_act: tlmm-lines-on-pins {
-			pins = "gpio112", "gpio117", "gpio118", "gpio119";
-			function = "sec_mi2s";
+	sec_mi2s_default: mi2s-sec-default-state {
+		pins = "gpio112", "gpio117", "gpio118", "gpio119";
+		function = "sec_mi2s";
 
-			drive-strength = <8>;
-			bias-disable;
-		};
-		ext_sec_tlmm_lines_sus: tlmm-lines-off-pins {
-			pins = "gpio112", "gpio117", "gpio118", "gpio119";
-			function = "sec_mi2s";
+		drive-strength = <8>;
+		bias-disable;
+	};
 
-			drive-strength = <2>;
-			bias-disable;
-		};
+	sec_mi2s_sleep: mi2s-sec-sleep-state {
+		pins = "gpio112", "gpio117", "gpio118", "gpio119";
+		function = "sec_mi2s";
+
+		drive-strength = <2>;
+		bias-disable;
 	};
 
-	cdc_dmic_lines_act: cdc-dmic-lines-on-state {
+	cdc_dmic_default: cdc-dmic-default-state {
 		clk-pins {
 			pins = "gpio0";
 			function = "dmic0_clk";
@@ -476,7 +470,8 @@ data-pins {
 			drive-strength = <8>;
 		};
 	};
-	cdc_dmic_lines_sus: cdc-dmic-lines-off-state {
+
+	cdc_dmic_sleep: cdc-dmic-sleep-state {
 		clk-pins {
 			pins = "gpio0";
 			function = "dmic0_clk";
diff --git a/arch/arm64/boot/dts/qcom/msm8939.dtsi b/arch/arm64/boot/dts/qcom/msm8939.dtsi
index 1f79444bc250..de5f8681d18d 100644
--- a/arch/arm64/boot/dts/qcom/msm8939.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8939.dtsi
@@ -969,23 +969,7 @@ cci0_default: cci0-default-state {
 				bias-disable;
 			};
 
-			cdc_pdm_lines_default: pdm-lines-default-state {
-				pins = "gpio63", "gpio64", "gpio65", "gpio66",
-				       "gpio67", "gpio68";
-				function = "cdc_pdm0";
-				drive-strength = <8>;
-				bias-disable;
-			};
-
-			cdc_pdm_lines_sleep: pdm-lines-suspend-state {
-				pins = "gpio63", "gpio64", "gpio65", "gpio66",
-				       "gpio67", "gpio68";
-				function = "cdc_pdm0";
-				drive-strength = <2>;
-				bias-pull-down;
-			};
-
-			cdc_dmic_lines_act: cdc-dmic-lines-on-state {
+			cdc_dmic_default: cdc-dmic-default-state {
 				clk-pins {
 					pins = "gpio0";
 					function = "dmic0_clk";
@@ -999,7 +983,7 @@ data-pins {
 				};
 			};
 
-			cdc_dmic_lines_sus: cdc-dmic-lines-off-state {
+			cdc_dmic_sleep: cdc-dmic-sleep-state {
 				clk-pins {
 					pins = "gpio0";
 					function = "dmic0_clk";
@@ -1015,69 +999,76 @@ data-pins {
 				};
 			};
 
-			ext-mclk-tlmm-lines-state {
-				ext_mclk_tlmm_lines_act: mclk-lines-on-pins {
-					pins = "gpio116";
-					function = "pri_mi2s";
-					drive-strength = <8>;
-					bias-disable;
-				};
+			cdc_pdm_default: cdc-pdm-default-state {
+				pins = "gpio63", "gpio64", "gpio65", "gpio66",
+				       "gpio67", "gpio68";
+				function = "cdc_pdm0";
+				drive-strength = <8>;
+				bias-disable;
+			};
 
-				ext_mclk_tlmm_lines_sus: mclk-lines-off-pins {
-					pins = "gpio116";
-					function = "pri_mi2s";
-					drive-strength = <2>;
-					bias-disable;
-				};
+			cdc_pdm_sleep: cdc-pdm-sleep-state {
+				pins = "gpio63", "gpio64", "gpio65", "gpio66",
+				       "gpio67", "gpio68";
+				function = "cdc_pdm0";
+				drive-strength = <2>;
+				bias-pull-down;
 			};
 
-			ext-pri-tlmm-lines-state {
-				ext_pri_tlmm_lines_act: ext-pa-on-pins {
-					pins = "gpio113", "gpio114", "gpio115", "gpio116";
-					function = "pri_mi2s";
-					drive-strength = <8>;
-					bias-disable;
-				};
+			pri_mi2s_default: mi2s-pri-default-state {
+				pins = "gpio113", "gpio114", "gpio115", "gpio116";
+				function = "pri_mi2s";
+				drive-strength = <8>;
+				bias-disable;
+			};
 
-				ext_pri_tlmm_lines_sus: ext-pa-off-pins {
-					pins = "gpio113", "gpio114", "gpio115", "gpio116";
-					function = "pri_mi2s";
-					drive-strength = <2>;
-					bias-disable;
-				};
+			pri_mi2s_sleep: mi2s-pri-sleep-state {
+				pins = "gpio113", "gpio114", "gpio115", "gpio116";
+				function = "pri_mi2s";
+				drive-strength = <2>;
+				bias-disable;
 			};
 
-			ext-pri-ws-line-state {
-				ext_pri_ws_act: ext-pa-on-pins {
-					pins = "gpio110";
-					function = "pri_mi2s_ws";
-					drive-strength = <8>;
-					bias-disable;
-				};
+			pri_mi2s_mclk_default: mi2s-pri-mclk-default-state {
+				pins = "gpio116";
+				function = "pri_mi2s";
+				drive-strength = <8>;
+				bias-disable;
+			};
 
-				ext_pri_ws_sus: ext-pa-off-pins {
-					pins = "gpio110";
-					function = "pri_mi2s_ws";
-					drive-strength = <2>;
-					bias-disable;
-				};
+			pri_mi2s_mclk_sleep: mi2s-pri-mclk-sleep-state {
+				pins = "gpio116";
+				function = "pri_mi2s";
+				drive-strength = <2>;
+				bias-disable;
 			};
 
-			/* secondary Mi2S */
-			ext-sec-tlmm-lines-state {
-				ext_sec_tlmm_lines_act: tlmm-lines-on-pins {
-					pins = "gpio112", "gpio117", "gpio118", "gpio119";
-					function = "sec_mi2s";
-					drive-strength = <8>;
-					bias-disable;
-				};
+			pri_mi2s_ws_default: mi2s-pri-ws-default-state {
+				pins = "gpio110";
+				function = "pri_mi2s_ws";
+				drive-strength = <8>;
+				bias-disable;
+			};
 
-				ext_sec_tlmm_lines_sus: tlmm-lines-off-pins {
-					pins = "gpio112", "gpio117", "gpio118", "gpio119";
-					function = "sec_mi2s";
-					drive-strength = <2>;
-					bias-disable;
-				};
+			pri_mi2s_ws_sleep: mi2s-pri-ws-sleep-state {
+				pins = "gpio110";
+				function = "pri_mi2s_ws";
+				drive-strength = <2>;
+				bias-disable;
+			};
+
+			sec_mi2s_default: mi2s-sec-default-state {
+				pins = "gpio112", "gpio117", "gpio118", "gpio119";
+				function = "sec_mi2s";
+				drive-strength = <8>;
+				bias-disable;
+			};
+
+			sec_mi2s_sleep: mi2s-sec-sleep-state {
+				pins = "gpio112", "gpio117", "gpio118", "gpio119";
+				function = "sec_mi2s";
+				drive-strength = <2>;
+				bias-disable;
 			};
 
 			sdc1_default: sdc1-default-state {

-- 
2.40.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ