All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/32] pinctrl/arm64: qcom: continued - fix Qualcomm TLMM pinctrl schema warnings
@ 2022-09-24  8:04 Krzysztof Kozlowski
  2022-09-24  8:04 ` [PATCH 01/32] arm64: dts: qcom: ipq6018-cp01-c1: correct blspi1 pins Krzysztof Kozlowski
                   ` (32 more replies)
  0 siblings, 33 replies; 46+ messages in thread
From: Krzysztof Kozlowski @ 2022-09-24  8:04 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Linus Walleij,
	Rob Herring, Krzysztof Kozlowski, Sricharan R, Stephan Gerhold,
	Shawn Guo, Vinod Koul, krishna Lanka, Sivaprakash Murugesan,
	linux-arm-msm, linux-gpio, devicetree, linux-kernel
  Cc: Krzysztof Kozlowski

Hi,

Overview
========
This is the third patchset around Qualcomm pinctrl in recent days:
1. First round of TLMM fixes: merged
2. LPASS fixes: https://lore.kernel.org/linux-devicetree/20220922195651.345369-1-krzysztof.kozlowski@linaro.org/T/#t
3. Second round of TLMM fixes: THIS PATCHSET

Dependencies
============
1. No dependencies.
2. dt-bindings are independent of DTS patches.

Best regards,
Krzysztof

Krzysztof Kozlowski (32):
  arm64: dts: qcom: ipq6018-cp01-c1: correct blspi1 pins
  arm64: dts: qcom: ipq6018: align TLMM pin configuration with DT schema
  ARM: dts: qcom: sdx55: add gpio-ranges to TLMM pinctrl
  ARM: dts: qcom: sdx55: align TLMM pin configuration with DT schema
  ARM: dts: qcom: msm8226: align TLMM pin configuration with DT schema
  ARM: dts: qcom: msm8974: align TLMM pin configuration with DT schema
  dt-bindings: pinctrl: qcom,ipq6018: add qpic_pad function
  dt-bindings: pinctrl: qcom,ipq6018: increase number of pins in pinmux
  dt-bindings: pinctrl: qcom,ipq6018: fix matching pin config
  dt-bindings: pinctrl: qcom,ipq6018: do not require function on
    non-GPIOs
  dt-bindings: pinctrl: qcom,ipq6018: fix indentation in example
  dt-bindings: pinctrl: qcom,msm8226: fix matching pin config
  dt-bindings: pinctrl: qcom,msm8226: do not require function on
    non-GPIOs
  dt-bindings: pinctrl: qcom,msm8226: add functions and input-enable
  dt-bindings: pinctrl: qcom,msm8226: fix indentation in example
  dt-bindings: pinctrl: qcom,msm8909-tlmm: fix matching pin config
  dt-bindings: pinctrl: qcom,msm8909-tlmm: do not require function on
    non-GPIOs
  dt-bindings: pinctrl: qcom,msm8909-tlmm: fix indentation in example
  dt-bindings: pinctrl: qcom,msm8953: fix matching pin config
  dt-bindings: pinctrl: qcom,msm8953: do not require function on
    non-GPIOs
  dt-bindings: pinctrl: qcom,msm8953: fix indentation in example
  dt-bindings: pinctrl: qcom,mdm9607: do not require function on
    non-GPIOs
  dt-bindings: pinctrl: qcom,mdm9607: fix indentation in example
  dt-bindings: pinctrl: qcom,qcm2290: fix matching pin config
  dt-bindings: pinctrl: qcom,qcm2290: do not require function on
    non-GPIOs
  dt-bindings: pinctrl: qcom,sdx55: fix matching pin config
  dt-bindings: pinctrl: qcom,sdx55: do not require function on non-GPIOs
  dt-bindings: pinctrl: qcom,sdx55: fix indentation in example
  dt-bindings: pinctrl: qcom,sdx65: fix matching pin config
  dt-bindings: pinctrl: qcom,sdx65: do not require function on non-GPIOs
  dt-bindings: pinctrl: qcom,sc7280: fix matching pin config
  dt-bindings: pinctrl: qcom,sc8280xp: fix indentation in example
    (remaining piece)

 .../pinctrl/qcom,ipq6018-pinctrl.yaml         | 67 ++++++++++-------
 .../pinctrl/qcom,mdm9607-pinctrl.yaml         | 34 +++++----
 .../pinctrl/qcom,msm8226-pinctrl.yaml         | 70 ++++++++++-------
 .../bindings/pinctrl/qcom,msm8909-tlmm.yaml   | 75 +++++++++++--------
 .../pinctrl/qcom,msm8953-pinctrl.yaml         | 58 ++++++++------
 .../pinctrl/qcom,qcm2290-pinctrl.yaml         | 20 +++--
 .../bindings/pinctrl/qcom,sc7280-pinctrl.yaml | 14 +++-
 .../pinctrl/qcom,sc8280xp-pinctrl.yaml        |  4 +-
 .../bindings/pinctrl/qcom,sdx55-pinctrl.yaml  | 58 ++++++++------
 .../bindings/pinctrl/qcom,sdx65-pinctrl.yaml  | 20 +++--
 arch/arm/boot/dts/qcom-apq8026-lg-lenok.dts   |  6 +-
 arch/arm/boot/dts/qcom-msm8226.dtsi           | 24 +++---
 .../qcom-msm8974-lge-nexus5-hammerhead.dts    | 30 ++++----
 .../boot/dts/qcom-sdx55-telit-fn980-tlb.dts   | 45 ++++-------
 arch/arm/boot/dts/qcom-sdx55.dtsi             |  1 +
 arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dts  |  8 +-
 arch/arm64/boot/dts/qcom/ipq6018.dtsi         |  4 +-
 17 files changed, 316 insertions(+), 222 deletions(-)

-- 
2.34.1


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

* [PATCH 01/32] arm64: dts: qcom: ipq6018-cp01-c1: correct blspi1 pins
  2022-09-24  8:04 [PATCH 00/32] pinctrl/arm64: qcom: continued - fix Qualcomm TLMM pinctrl schema warnings Krzysztof Kozlowski
@ 2022-09-24  8:04 ` Krzysztof Kozlowski
  2022-09-24  8:04 ` [PATCH 02/32] arm64: dts: qcom: ipq6018: align TLMM pin configuration with DT schema Krzysztof Kozlowski
                   ` (31 subsequent siblings)
  32 siblings, 0 replies; 46+ messages in thread
From: Krzysztof Kozlowski @ 2022-09-24  8:04 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Linus Walleij,
	Rob Herring, Krzysztof Kozlowski, Sricharan R, Stephan Gerhold,
	Shawn Guo, Vinod Koul, krishna Lanka, Sivaprakash Murugesan,
	linux-arm-msm, linux-gpio, devicetree, linux-kernel
  Cc: Krzysztof Kozlowski

When BLSPI1 (originally SPI0, later renamed in commit f82c48d46852
("arm64: dts: qcom: ipq6018: correct QUP peripheral labels")) was added,
the device node lacked respective pin configuration assignment.   It
used also blsp0_spi function but that was probably the same mistake as
naming it SPI0.

Fixes: 5bf635621245 ("arm64: dts: ipq6018: Add a few device nodes")
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dts | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dts b/arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dts
index 1ba2eca33c7b..afc2dc79767d 100644
--- a/arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dts
+++ b/arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dts
@@ -37,6 +37,8 @@ &blsp1_i2c3 {
 
 &blsp1_spi1 {
 	cs-select = <0>;
+	pinctrl-0 = <&spi_0_pins>;
+	pinctrl-names = "default";
 	status = "okay";
 
 	flash@0 {
@@ -57,7 +59,7 @@ i2c_1_pins: i2c-1-pins {
 
 	spi_0_pins: spi-0-pins {
 		pins = "gpio38", "gpio39", "gpio40", "gpio41";
-		function = "blsp0_spi";
+		function = "blsp1_spi";
 		drive-strength = <8>;
 		bias-pull-down;
 	};
-- 
2.34.1


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

* [PATCH 02/32] arm64: dts: qcom: ipq6018: align TLMM pin configuration with DT schema
  2022-09-24  8:04 [PATCH 00/32] pinctrl/arm64: qcom: continued - fix Qualcomm TLMM pinctrl schema warnings Krzysztof Kozlowski
  2022-09-24  8:04 ` [PATCH 01/32] arm64: dts: qcom: ipq6018-cp01-c1: correct blspi1 pins Krzysztof Kozlowski
@ 2022-09-24  8:04 ` Krzysztof Kozlowski
  2022-09-24  8:04 ` [PATCH 03/32] ARM: dts: qcom: sdx55: add gpio-ranges to TLMM pinctrl Krzysztof Kozlowski
                   ` (30 subsequent siblings)
  32 siblings, 0 replies; 46+ messages in thread
From: Krzysztof Kozlowski @ 2022-09-24  8:04 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Linus Walleij,
	Rob Herring, Krzysztof Kozlowski, Sricharan R, Stephan Gerhold,
	Shawn Guo, Vinod Koul, krishna Lanka, Sivaprakash Murugesan,
	linux-arm-msm, linux-gpio, devicetree, linux-kernel
  Cc: Krzysztof Kozlowski

DT schema expects TLMM pin configuration nodes to be named with
'-state' suffix and their optional children with '-pins' suffix.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dts | 4 ++--
 arch/arm64/boot/dts/qcom/ipq6018.dtsi        | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dts b/arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dts
index afc2dc79767d..e1fe7d598580 100644
--- a/arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dts
+++ b/arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dts
@@ -51,13 +51,13 @@ flash@0 {
 };
 
 &tlmm {
-	i2c_1_pins: i2c-1-pins {
+	i2c_1_pins: i2c-1-state {
 		pins = "gpio42", "gpio43";
 		function = "blsp2_i2c";
 		drive-strength = <8>;
 	};
 
-	spi_0_pins: spi-0-pins {
+	spi_0_pins: spi-0-state {
 		pins = "gpio38", "gpio39", "gpio40", "gpio41";
 		function = "blsp1_spi";
 		drive-strength = <8>;
diff --git a/arch/arm64/boot/dts/qcom/ipq6018.dtsi b/arch/arm64/boot/dts/qcom/ipq6018.dtsi
index a7c7ca980a71..9b9f778090e1 100644
--- a/arch/arm64/boot/dts/qcom/ipq6018.dtsi
+++ b/arch/arm64/boot/dts/qcom/ipq6018.dtsi
@@ -218,14 +218,14 @@ tlmm: pinctrl@1000000 {
 			interrupt-controller;
 			#interrupt-cells = <2>;
 
-			serial_3_pins: serial3-pinmux {
+			serial_3_pins: serial3-state {
 				pins = "gpio44", "gpio45";
 				function = "blsp2_uart";
 				drive-strength = <8>;
 				bias-pull-down;
 			};
 
-			qpic_pins: qpic-pins {
+			qpic_pins: qpic-state {
 				pins = "gpio1", "gpio3", "gpio4",
 					"gpio5", "gpio6", "gpio7",
 					"gpio8", "gpio10", "gpio11",
-- 
2.34.1


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

* [PATCH 03/32] ARM: dts: qcom: sdx55: add gpio-ranges to TLMM pinctrl
  2022-09-24  8:04 [PATCH 00/32] pinctrl/arm64: qcom: continued - fix Qualcomm TLMM pinctrl schema warnings Krzysztof Kozlowski
  2022-09-24  8:04 ` [PATCH 01/32] arm64: dts: qcom: ipq6018-cp01-c1: correct blspi1 pins Krzysztof Kozlowski
  2022-09-24  8:04 ` [PATCH 02/32] arm64: dts: qcom: ipq6018: align TLMM pin configuration with DT schema Krzysztof Kozlowski
@ 2022-09-24  8:04 ` Krzysztof Kozlowski
  2022-09-24  8:04 ` [PATCH 04/32] ARM: dts: qcom: sdx55: align TLMM pin configuration with DT schema Krzysztof Kozlowski
                   ` (29 subsequent siblings)
  32 siblings, 0 replies; 46+ messages in thread
From: Krzysztof Kozlowski @ 2022-09-24  8:04 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Linus Walleij,
	Rob Herring, Krzysztof Kozlowski, Sricharan R, Stephan Gerhold,
	Shawn Guo, Vinod Koul, krishna Lanka, Sivaprakash Murugesan,
	linux-arm-msm, linux-gpio, devicetree, linux-kernel
  Cc: Krzysztof Kozlowski

Add required gpio-ranges property to TLMM pinctrl node:

  qcom-sdx55-mtp.dtb: pinctrl@f100000: 'gpio-ranges' is a required property

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 arch/arm/boot/dts/qcom-sdx55.dtsi | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/boot/dts/qcom-sdx55.dtsi b/arch/arm/boot/dts/qcom-sdx55.dtsi
index c72540223fa9..f1c0dab40992 100644
--- a/arch/arm/boot/dts/qcom-sdx55.dtsi
+++ b/arch/arm/boot/dts/qcom-sdx55.dtsi
@@ -559,6 +559,7 @@ tlmm: pinctrl@f100000 {
 			#gpio-cells = <2>;
 			interrupt-controller;
 			#interrupt-cells = <2>;
+			gpio-ranges = <&tlmm 0 0 109>;
 		};
 
 		sram@1468f000 {
-- 
2.34.1


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

* [PATCH 04/32] ARM: dts: qcom: sdx55: align TLMM pin configuration with DT schema
  2022-09-24  8:04 [PATCH 00/32] pinctrl/arm64: qcom: continued - fix Qualcomm TLMM pinctrl schema warnings Krzysztof Kozlowski
                   ` (2 preceding siblings ...)
  2022-09-24  8:04 ` [PATCH 03/32] ARM: dts: qcom: sdx55: add gpio-ranges to TLMM pinctrl Krzysztof Kozlowski
@ 2022-09-24  8:04 ` Krzysztof Kozlowski
  2022-09-24  8:04 ` [PATCH 05/32] ARM: dts: qcom: msm8226: " Krzysztof Kozlowski
                   ` (28 subsequent siblings)
  32 siblings, 0 replies; 46+ messages in thread
From: Krzysztof Kozlowski @ 2022-09-24  8:04 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Linus Walleij,
	Rob Herring, Krzysztof Kozlowski, Sricharan R, Stephan Gerhold,
	Shawn Guo, Vinod Koul, krishna Lanka, Sivaprakash Murugesan,
	linux-arm-msm, linux-gpio, devicetree, linux-kernel
  Cc: Krzysztof Kozlowski

DT schema expects TLMM pin configuration nodes to be named with
'-state' suffix and their optional children with '-pins' suffix.  Schema
also requires 'function' property, so two nodes for the same gpio (mux
and config) should be merged into one.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 .../boot/dts/qcom-sdx55-telit-fn980-tlb.dts   | 45 +++++++------------
 1 file changed, 15 insertions(+), 30 deletions(-)

diff --git a/arch/arm/boot/dts/qcom-sdx55-telit-fn980-tlb.dts b/arch/arm/boot/dts/qcom-sdx55-telit-fn980-tlb.dts
index a4fa468a095f..ac8b4626ae9a 100644
--- a/arch/arm/boot/dts/qcom-sdx55-telit-fn980-tlb.dts
+++ b/arch/arm/boot/dts/qcom-sdx55-telit-fn980-tlb.dts
@@ -282,40 +282,25 @@ &remoteproc_mpss {
 };
 
 &tlmm {
-	pcie_ep_clkreq_default: pcie_ep_clkreq_default {
-		mux {
-			pins = "gpio56";
-			function = "pcie_clkreq";
-		};
-		config {
-			pins = "gpio56";
-			drive-strength = <2>;
-			bias-disable;
-		};
+	pcie_ep_clkreq_default: pcie-ep-clkreq-default-state {
+		pins = "gpio56";
+		function = "pcie_clkreq";
+		drive-strength = <2>;
+		bias-disable;
 	};
 
-	pcie_ep_perst_default: pcie_ep_perst_default {
-		mux {
-			pins = "gpio57";
-			function = "gpio";
-		};
-		config {
-			pins = "gpio57";
-			drive-strength = <2>;
-			bias-pull-down;
-		};
+	pcie_ep_perst_default: pcie-ep-perst-default-state {
+		pins = "gpio57";
+		function = "gpio";
+		drive-strength = <2>;
+		bias-pull-down;
 	};
 
-	pcie_ep_wake_default: pcie_ep_wake_default {
-		mux {
-			pins = "gpio53";
-			function = "gpio";
-		};
-		config {
-			pins = "gpio53";
-			drive-strength = <2>;
-			bias-disable;
-		};
+	pcie_ep_wake_default: pcie-ep-wake-default-state {
+		pins = "gpio53";
+		function = "gpio";
+		drive-strength = <2>;
+		bias-disable;
 	};
 };
 
-- 
2.34.1


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

* [PATCH 05/32] ARM: dts: qcom: msm8226: align TLMM pin configuration with DT schema
  2022-09-24  8:04 [PATCH 00/32] pinctrl/arm64: qcom: continued - fix Qualcomm TLMM pinctrl schema warnings Krzysztof Kozlowski
                   ` (3 preceding siblings ...)
  2022-09-24  8:04 ` [PATCH 04/32] ARM: dts: qcom: sdx55: align TLMM pin configuration with DT schema Krzysztof Kozlowski
@ 2022-09-24  8:04 ` Krzysztof Kozlowski
  2022-09-24  8:04 ` [PATCH 06/32] ARM: dts: qcom: msm8974: " Krzysztof Kozlowski
                   ` (27 subsequent siblings)
  32 siblings, 0 replies; 46+ messages in thread
From: Krzysztof Kozlowski @ 2022-09-24  8:04 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Linus Walleij,
	Rob Herring, Krzysztof Kozlowski, Sricharan R, Stephan Gerhold,
	Shawn Guo, Vinod Koul, krishna Lanka, Sivaprakash Murugesan,
	linux-arm-msm, linux-gpio, devicetree, linux-kernel
  Cc: Krzysztof Kozlowski

DT schema expects TLMM pin configuration nodes to be named with
'-state' suffix and their optional children with '-pins' suffix.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 arch/arm/boot/dts/qcom-apq8026-lg-lenok.dts |  6 +++---
 arch/arm/boot/dts/qcom-msm8226.dtsi         | 24 ++++++++++-----------
 2 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/arch/arm/boot/dts/qcom-apq8026-lg-lenok.dts b/arch/arm/boot/dts/qcom-apq8026-lg-lenok.dts
index 193569f0ca5f..02bef5870526 100644
--- a/arch/arm/boot/dts/qcom-apq8026-lg-lenok.dts
+++ b/arch/arm/boot/dts/qcom-apq8026-lg-lenok.dts
@@ -299,8 +299,8 @@ bluetooth_default_state: bluetooth-default-state {
 		input-enable;
 	};
 
-	touch_pins: touch {
-		irq {
+	touch_pins: touch-state {
+		irq-pins {
 			pins = "gpio17";
 			function = "gpio";
 
@@ -309,7 +309,7 @@ irq {
 			input-enable;
 		};
 
-		reset {
+		reset-pins {
 			pins = "gpio16";
 			function = "gpio";
 
diff --git a/arch/arm/boot/dts/qcom-msm8226.dtsi b/arch/arm/boot/dts/qcom-msm8226.dtsi
index cf2d56929428..3b6e746a4af9 100644
--- a/arch/arm/boot/dts/qcom-msm8226.dtsi
+++ b/arch/arm/boot/dts/qcom-msm8226.dtsi
@@ -354,35 +354,35 @@ tlmm: pinctrl@fd510000 {
 			#interrupt-cells = <2>;
 			interrupts = <GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH>;
 
-			blsp1_i2c1_pins: blsp1-i2c1 {
+			blsp1_i2c1_pins: blsp1-i2c1-state {
 				pins = "gpio2", "gpio3";
 				function = "blsp_i2c1";
 				drive-strength = <2>;
 				bias-disable;
 			};
 
-			blsp1_i2c2_pins: blsp1-i2c2 {
+			blsp1_i2c2_pins: blsp1-i2c2-state {
 				pins = "gpio6", "gpio7";
 				function = "blsp_i2c2";
 				drive-strength = <2>;
 				bias-disable;
 			};
 
-			blsp1_i2c3_pins: blsp1-i2c3 {
+			blsp1_i2c3_pins: blsp1-i2c3-state {
 				pins = "gpio10", "gpio11";
 				function = "blsp_i2c3";
 				drive-strength = <2>;
 				bias-disable;
 			};
 
-			blsp1_i2c4_pins: blsp1-i2c4 {
+			blsp1_i2c4_pins: blsp1-i2c4-state {
 				pins = "gpio14", "gpio15";
 				function = "blsp_i2c4";
 				drive-strength = <2>;
 				bias-disable;
 			};
 
-			blsp1_i2c5_pins: blsp1-i2c5 {
+			blsp1_i2c5_pins: blsp1-i2c5-state {
 				pins = "gpio18", "gpio19";
 				function = "blsp_i2c5";
 				drive-strength = <2>;
@@ -390,13 +390,13 @@ blsp1_i2c5_pins: blsp1-i2c5 {
 			};
 
 			sdhc1_default_state: sdhc1-default-state {
-				clk {
+				clk-pins {
 					pins = "sdc1_clk";
 					drive-strength = <10>;
 					bias-disable;
 				};
 
-				cmd-data {
+				cmd-data-pins {
 					pins = "sdc1_cmd", "sdc1_data";
 					drive-strength = <10>;
 					bias-pull-up;
@@ -404,13 +404,13 @@ cmd-data {
 			};
 
 			sdhc2_default_state: sdhc2-default-state {
-				clk {
+				clk-pins {
 					pins = "sdc2_clk";
 					drive-strength = <10>;
 					bias-disable;
 				};
 
-				cmd-data {
+				cmd-data-pins {
 					pins = "sdc2_cmd", "sdc2_data";
 					drive-strength = <10>;
 					bias-pull-up;
@@ -418,21 +418,21 @@ cmd-data {
 			};
 
 			sdhc3_default_state: sdhc3-default-state {
-				clk {
+				clk-pins {
 					pins = "gpio44";
 					function = "sdc3";
 					drive-strength = <8>;
 					bias-disable;
 				};
 
-				cmd {
+				cmd-pins {
 					pins = "gpio43";
 					function = "sdc3";
 					drive-strength = <8>;
 					bias-pull-up;
 				};
 
-				data {
+				data-pins {
 					pins = "gpio39", "gpio40", "gpio41", "gpio42";
 					function = "sdc3";
 					drive-strength = <8>;
-- 
2.34.1


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

* [PATCH 06/32] ARM: dts: qcom: msm8974: align TLMM pin configuration with DT schema
  2022-09-24  8:04 [PATCH 00/32] pinctrl/arm64: qcom: continued - fix Qualcomm TLMM pinctrl schema warnings Krzysztof Kozlowski
                   ` (4 preceding siblings ...)
  2022-09-24  8:04 ` [PATCH 05/32] ARM: dts: qcom: msm8226: " Krzysztof Kozlowski
@ 2022-09-24  8:04 ` Krzysztof Kozlowski
  2022-09-24  8:04 ` [PATCH 07/32] dt-bindings: pinctrl: qcom,ipq6018: add qpic_pad function Krzysztof Kozlowski
                   ` (26 subsequent siblings)
  32 siblings, 0 replies; 46+ messages in thread
From: Krzysztof Kozlowski @ 2022-09-24  8:04 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Linus Walleij,
	Rob Herring, Krzysztof Kozlowski, Sricharan R, Stephan Gerhold,
	Shawn Guo, Vinod Koul, krishna Lanka, Sivaprakash Murugesan,
	linux-arm-msm, linux-gpio, devicetree, linux-kernel
  Cc: Krzysztof Kozlowski

DT schema expects TLMM pin configuration nodes to be named with
'-state' suffix and their optional children with '-pins' suffix.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 .../qcom-msm8974-lge-nexus5-hammerhead.dts    | 30 +++++++++----------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dts b/arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dts
index 6daceaa87802..8138f37233aa 100644
--- a/arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dts
+++ b/arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dts
@@ -573,43 +573,43 @@ bcrmf@1 {
 };
 
 &tlmm {
-	sdc1_on: sdc1-on {
-		clk {
+	sdc1_on: sdc1-on-state {
+		clk-pins {
 			pins = "sdc1_clk";
 			drive-strength = <16>;
 			bias-disable;
 		};
 
-		cmd-data {
+		cmd-data-pins {
 			pins = "sdc1_cmd", "sdc1_data";
 			drive-strength = <10>;
 			bias-pull-up;
 		};
 	};
 
-	sdc2_on: sdc2-on {
-		clk {
+	sdc2_on: sdc2-on-state {
+		clk-pins {
 			pins = "sdc2_clk";
 			drive-strength = <6>;
 			bias-disable;
 		};
 
-		cmd-data {
+		cmd-data-pins {
 			pins = "sdc2_cmd", "sdc2_data";
 			drive-strength = <6>;
 			bias-pull-up;
 		};
 	};
 
-	mpu6515_pin: mpu6515 {
+	mpu6515_pin: mpu6515-state {
 		pins = "gpio73";
 		function = "gpio";
 		bias-disable;
 		input-enable;
 	};
 
-	touch_pin: touch {
-		int {
+	touch_pin: touch-state {
+		int-pins {
 			pins = "gpio5";
 			function = "gpio";
 
@@ -618,7 +618,7 @@ int {
 			input-enable;
 		};
 
-		reset {
+		reset-pins {
 			pins = "gpio8";
 			function = "gpio";
 
@@ -627,25 +627,25 @@ reset {
 		};
 	};
 
-	panel_pin: panel {
+	panel_pin: panel-state {
 		pins = "gpio12";
 		function = "mdp_vsync";
 		drive-strength = <2>;
 		bias-disable;
 	};
 
-	bt_pin: bt {
-		hostwake {
+	bt_pin: bt-state {
+		hostwake-pins {
 			pins = "gpio42";
 			function = "gpio";
 		};
 
-		devwake {
+		devwake-pins {
 			pins = "gpio62";
 			function = "gpio";
 		};
 
-		shutdown {
+		shutdown-pins {
 			pins = "gpio41";
 			function = "gpio";
 		};
-- 
2.34.1


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

* [PATCH 07/32] dt-bindings: pinctrl: qcom,ipq6018: add qpic_pad function
  2022-09-24  8:04 [PATCH 00/32] pinctrl/arm64: qcom: continued - fix Qualcomm TLMM pinctrl schema warnings Krzysztof Kozlowski
                   ` (5 preceding siblings ...)
  2022-09-24  8:04 ` [PATCH 06/32] ARM: dts: qcom: msm8974: " Krzysztof Kozlowski
@ 2022-09-24  8:04 ` Krzysztof Kozlowski
  2022-09-24  8:04 ` [PATCH 08/32] dt-bindings: pinctrl: qcom,ipq6018: increase number of pins in pinmux Krzysztof Kozlowski
                   ` (25 subsequent siblings)
  32 siblings, 0 replies; 46+ messages in thread
From: Krzysztof Kozlowski @ 2022-09-24  8:04 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Linus Walleij,
	Rob Herring, Krzysztof Kozlowski, Sricharan R, Stephan Gerhold,
	Shawn Guo, Vinod Koul, krishna Lanka, Sivaprakash Murugesan,
	linux-arm-msm, linux-gpio, devicetree, linux-kernel
  Cc: Krzysztof Kozlowski

The IPQ6018 pinctrl driver supports qpic_pad and DTS already uses it:

  'qpic_pad' is not one of ['adsp_ext', 'alsp_int', 'atest_bbrx0', ...

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 .../devicetree/bindings/pinctrl/qcom,ipq6018-pinctrl.yaml   | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/Documentation/devicetree/bindings/pinctrl/qcom,ipq6018-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/qcom,ipq6018-pinctrl.yaml
index 931e5c190ead..1f7a5f285404 100644
--- a/Documentation/devicetree/bindings/pinctrl/qcom,ipq6018-pinctrl.yaml
+++ b/Documentation/devicetree/bindings/pinctrl/qcom,ipq6018-pinctrl.yaml
@@ -92,9 +92,9 @@ patternProperties:
                 qdss_ctitrig_in_b0, qdss_ctitrig_in_b1, qdss_ctitrig_out_a0,
                 qdss_ctitrig_out_a1, qdss_ctitrig_out_b0, qdss_ctitrig_out_b1,
                 qdss_traceclk_a, qdss_traceclk_b, qdss_tracectl_a, qdss_tracectl_b,
-                qdss_tracedata_a, qdss_tracedata_b, reset_n, sd_card, sd_write,
-                sec_mi2s, smb_int, ssbi_wtr0, ssbi_wtr1, uim1, uim2, uim3,
-                uim_batt, wcss_bt, wcss_fm, wcss_wlan, webcam1_rst ]
+                qdss_tracedata_a, qdss_tracedata_b, qpic_pad, reset_n, sd_card,
+                sd_write, sec_mi2s, smb_int, ssbi_wtr0, ssbi_wtr1, uim1, uim2,
+                uim3, uim_batt, wcss_bt, wcss_fm, wcss_wlan, webcam1_rst ]
 
       drive-strength:
         enum: [2, 4, 6, 8, 10, 12, 14, 16]
-- 
2.34.1


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

* [PATCH 08/32] dt-bindings: pinctrl: qcom,ipq6018: increase number of pins in pinmux
  2022-09-24  8:04 [PATCH 00/32] pinctrl/arm64: qcom: continued - fix Qualcomm TLMM pinctrl schema warnings Krzysztof Kozlowski
                   ` (6 preceding siblings ...)
  2022-09-24  8:04 ` [PATCH 07/32] dt-bindings: pinctrl: qcom,ipq6018: add qpic_pad function Krzysztof Kozlowski
@ 2022-09-24  8:04 ` Krzysztof Kozlowski
  2022-09-24  8:04 ` [PATCH 09/32] dt-bindings: pinctrl: qcom,ipq6018: fix matching pin config Krzysztof Kozlowski
                   ` (24 subsequent siblings)
  32 siblings, 0 replies; 46+ messages in thread
From: Krzysztof Kozlowski @ 2022-09-24  8:04 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Linus Walleij,
	Rob Herring, Krzysztof Kozlowski, Sricharan R, Stephan Gerhold,
	Shawn Guo, Vinod Koul, krishna Lanka, Sivaprakash Murugesan,
	linux-arm-msm, linux-gpio, devicetree, linux-kernel
  Cc: Krzysztof Kozlowski

One pinxmux node can have more than 4 pins to configure:

  ['gpio1', 'gpio3', 'gpio4', 'gpio5', 'gpio6', 'gpio7', 'gpio8', 'gpio10', 'gpio11', 'gpio12', 'gpio13', 'gpio14', 'gpio15', 'gpio17'] is too long

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 .../devicetree/bindings/pinctrl/qcom,ipq6018-pinctrl.yaml       | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/pinctrl/qcom,ipq6018-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/qcom,ipq6018-pinctrl.yaml
index 1f7a5f285404..9c6958a9cfe4 100644
--- a/Documentation/devicetree/bindings/pinctrl/qcom,ipq6018-pinctrl.yaml
+++ b/Documentation/devicetree/bindings/pinctrl/qcom,ipq6018-pinctrl.yaml
@@ -63,7 +63,7 @@ patternProperties:
                       sdc2_data, qdsd_cmd, qdsd_data0, qdsd_data1, qdsd_data2,
                       qdsd_data3 ]
         minItems: 1
-        maxItems: 4
+        maxItems: 16
 
       function:
         description:
-- 
2.34.1


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

* [PATCH 09/32] dt-bindings: pinctrl: qcom,ipq6018: fix matching pin config
  2022-09-24  8:04 [PATCH 00/32] pinctrl/arm64: qcom: continued - fix Qualcomm TLMM pinctrl schema warnings Krzysztof Kozlowski
                   ` (7 preceding siblings ...)
  2022-09-24  8:04 ` [PATCH 08/32] dt-bindings: pinctrl: qcom,ipq6018: increase number of pins in pinmux Krzysztof Kozlowski
@ 2022-09-24  8:04 ` Krzysztof Kozlowski
  2022-09-24  8:04 ` [PATCH 10/32] dt-bindings: pinctrl: qcom,ipq6018: do not require function on non-GPIOs Krzysztof Kozlowski
                   ` (23 subsequent siblings)
  32 siblings, 0 replies; 46+ messages in thread
From: Krzysztof Kozlowski @ 2022-09-24  8:04 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Linus Walleij,
	Rob Herring, Krzysztof Kozlowski, Sricharan R, Stephan Gerhold,
	Shawn Guo, Vinod Koul, krishna Lanka, Sivaprakash Murugesan,
	linux-arm-msm, linux-gpio, devicetree, linux-kernel
  Cc: Krzysztof Kozlowski

The TLMM pin controller follows generic pin-controller bindings, so
should have subnodes with '-state' and '-pins'.  Otherwise the subnodes
(level one and two) are not properly matched.  This method also unifies
the bindings with other Qualcomm TLMM and LPASS pinctrl bindings.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 .../bindings/pinctrl/qcom,ipq6018-pinctrl.yaml    | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/Documentation/devicetree/bindings/pinctrl/qcom,ipq6018-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/qcom,ipq6018-pinctrl.yaml
index 9c6958a9cfe4..e7f3106ccd39 100644
--- a/Documentation/devicetree/bindings/pinctrl/qcom,ipq6018-pinctrl.yaml
+++ b/Documentation/devicetree/bindings/pinctrl/qcom,ipq6018-pinctrl.yaml
@@ -42,10 +42,17 @@ properties:
   gpio-ranges:
     maxItems: 1
 
-#PIN CONFIGURATION NODES
 patternProperties:
-  '-pinmux$':
-    type: object
+  "-state$":
+    oneOf:
+      - $ref: "#/$defs/qcom-ipq6018-tlmm-state"
+      - patternProperties:
+          "-pins$":
+            $ref: "#/$defs/qcom-ipq6018-tlmm-state"
+        additionalProperties: false
+
+$defs:
+  qcom-ipq6018-tlmm-state:
     description:
       Pinctrl node's client devices use subnodes for desired pin configuration.
       Client device subnodes use below standard properties.
@@ -146,7 +153,7 @@ examples:
               #gpio-cells = <2>;
               gpio-ranges = <&tlmm 0 0 80>;
 
-              serial3-pinmux {
+              serial3-state {
                       pins = "gpio44", "gpio45";
                       function = "blsp2_uart";
                       drive-strength = <8>;
-- 
2.34.1


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

* [PATCH 10/32] dt-bindings: pinctrl: qcom,ipq6018: do not require function on non-GPIOs
  2022-09-24  8:04 [PATCH 00/32] pinctrl/arm64: qcom: continued - fix Qualcomm TLMM pinctrl schema warnings Krzysztof Kozlowski
                   ` (8 preceding siblings ...)
  2022-09-24  8:04 ` [PATCH 09/32] dt-bindings: pinctrl: qcom,ipq6018: fix matching pin config Krzysztof Kozlowski
@ 2022-09-24  8:04 ` Krzysztof Kozlowski
  2022-09-26 23:13   ` Rob Herring
  2022-09-24  8:04 ` [PATCH 11/32] dt-bindings: pinctrl: qcom,ipq6018: fix indentation in example Krzysztof Kozlowski
                   ` (22 subsequent siblings)
  32 siblings, 1 reply; 46+ messages in thread
From: Krzysztof Kozlowski @ 2022-09-24  8:04 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Linus Walleij,
	Rob Herring, Krzysztof Kozlowski, Sricharan R, Stephan Gerhold,
	Shawn Guo, Vinod Koul, krishna Lanka, Sivaprakash Murugesan,
	linux-arm-msm, linux-gpio, devicetree, linux-kernel
  Cc: Krzysztof Kozlowski

Certain pins, like SDcard related, do not have functions and such should
not be required.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 .../bindings/pinctrl/qcom,ipq6018-pinctrl.yaml       | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/pinctrl/qcom,ipq6018-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/qcom,ipq6018-pinctrl.yaml
index e7f3106ccd39..2026fdac9fa8 100644
--- a/Documentation/devicetree/bindings/pinctrl/qcom,ipq6018-pinctrl.yaml
+++ b/Documentation/devicetree/bindings/pinctrl/qcom,ipq6018-pinctrl.yaml
@@ -56,7 +56,6 @@ $defs:
     description:
       Pinctrl node's client devices use subnodes for desired pin configuration.
       Client device subnodes use below standard properties.
-    $ref: "/schemas/pinctrl/pincfg-node.yaml"
 
     properties:
       pins:
@@ -121,7 +120,16 @@ $defs:
 
     required:
       - pins
-      - function
+
+    allOf:
+      - $ref: /schemas/pinctrl/pincfg-node.yaml
+      - if:
+          properties:
+            pins:
+              pattern: "^gpio([1-9]|[1-7][0-9]|80)$"
+        then:
+          required:
+            - function
 
     additionalProperties: false
 
-- 
2.34.1


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

* [PATCH 11/32] dt-bindings: pinctrl: qcom,ipq6018: fix indentation in example
  2022-09-24  8:04 [PATCH 00/32] pinctrl/arm64: qcom: continued - fix Qualcomm TLMM pinctrl schema warnings Krzysztof Kozlowski
                   ` (9 preceding siblings ...)
  2022-09-24  8:04 ` [PATCH 10/32] dt-bindings: pinctrl: qcom,ipq6018: do not require function on non-GPIOs Krzysztof Kozlowski
@ 2022-09-24  8:04 ` Krzysztof Kozlowski
  2022-09-24  8:04 ` [PATCH 12/32] dt-bindings: pinctrl: qcom,msm8226: fix matching pin config Krzysztof Kozlowski
                   ` (21 subsequent siblings)
  32 siblings, 0 replies; 46+ messages in thread
From: Krzysztof Kozlowski @ 2022-09-24  8:04 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Linus Walleij,
	Rob Herring, Krzysztof Kozlowski, Sricharan R, Stephan Gerhold,
	Shawn Guo, Vinod Koul, krishna Lanka, Sivaprakash Murugesan,
	linux-arm-msm, linux-gpio, devicetree, linux-kernel
  Cc: Krzysztof Kozlowski

Bindings example should be indented with 4-spaces.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 .../pinctrl/qcom,ipq6018-pinctrl.yaml         | 34 +++++++++----------
 1 file changed, 17 insertions(+), 17 deletions(-)

diff --git a/Documentation/devicetree/bindings/pinctrl/qcom,ipq6018-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/qcom,ipq6018-pinctrl.yaml
index 2026fdac9fa8..075d014b2ec5 100644
--- a/Documentation/devicetree/bindings/pinctrl/qcom,ipq6018-pinctrl.yaml
+++ b/Documentation/devicetree/bindings/pinctrl/qcom,ipq6018-pinctrl.yaml
@@ -150,21 +150,21 @@ additionalProperties: false
 
 examples:
   - |
-        #include <dt-bindings/interrupt-controller/arm-gic.h>
-        tlmm: pinctrl@1000000 {
-              compatible = "qcom,ipq6018-pinctrl";
-              reg = <0x01000000 0x300000>;
-              interrupts = <GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH>;
-              interrupt-controller;
-              #interrupt-cells = <2>;
-              gpio-controller;
-              #gpio-cells = <2>;
-              gpio-ranges = <&tlmm 0 0 80>;
-
-              serial3-state {
-                      pins = "gpio44", "gpio45";
-                      function = "blsp2_uart";
-                      drive-strength = <8>;
-                      bias-pull-down;
-              };
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
+    tlmm: pinctrl@1000000 {
+        compatible = "qcom,ipq6018-pinctrl";
+        reg = <0x01000000 0x300000>;
+        interrupts = <GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH>;
+        interrupt-controller;
+        #interrupt-cells = <2>;
+        gpio-controller;
+        #gpio-cells = <2>;
+        gpio-ranges = <&tlmm 0 0 80>;
+
+        serial3-state {
+            pins = "gpio44", "gpio45";
+            function = "blsp2_uart";
+            drive-strength = <8>;
+            bias-pull-down;
         };
+    };
-- 
2.34.1


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

* [PATCH 12/32] dt-bindings: pinctrl: qcom,msm8226: fix matching pin config
  2022-09-24  8:04 [PATCH 00/32] pinctrl/arm64: qcom: continued - fix Qualcomm TLMM pinctrl schema warnings Krzysztof Kozlowski
                   ` (10 preceding siblings ...)
  2022-09-24  8:04 ` [PATCH 11/32] dt-bindings: pinctrl: qcom,ipq6018: fix indentation in example Krzysztof Kozlowski
@ 2022-09-24  8:04 ` Krzysztof Kozlowski
  2022-09-24  8:04 ` [PATCH 13/32] dt-bindings: pinctrl: qcom,msm8226: do not require function on non-GPIOs Krzysztof Kozlowski
                   ` (20 subsequent siblings)
  32 siblings, 0 replies; 46+ messages in thread
From: Krzysztof Kozlowski @ 2022-09-24  8:04 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Linus Walleij,
	Rob Herring, Krzysztof Kozlowski, Sricharan R, Stephan Gerhold,
	Shawn Guo, Vinod Koul, krishna Lanka, Sivaprakash Murugesan,
	linux-arm-msm, linux-gpio, devicetree, linux-kernel
  Cc: Krzysztof Kozlowski

The TLMM pin controller follows generic pin-controller bindings, so
should have subnodes with '-state' and '-pins'.  Otherwise the subnodes
(level one and two) are not properly matched.  This method also unifies
the bindings with other Qualcomm TLMM and LPASS pinctrl bindings.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 .../bindings/pinctrl/qcom,msm8226-pinctrl.yaml     | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/Documentation/devicetree/bindings/pinctrl/qcom,msm8226-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/qcom,msm8226-pinctrl.yaml
index ab4a2b4cfda2..ecb90c77f666 100644
--- a/Documentation/devicetree/bindings/pinctrl/qcom,msm8226-pinctrl.yaml
+++ b/Documentation/devicetree/bindings/pinctrl/qcom,msm8226-pinctrl.yaml
@@ -45,9 +45,17 @@ properties:
   gpio-reserved-ranges:
     maxItems: 1
 
-#PIN CONFIGURATION NODES
 patternProperties:
-  '-pins$':
+  "-state$":
+    oneOf:
+      - $ref: "#/$defs/qcom-msm8226-tlmm-state"
+      - patternProperties:
+          "-pins$":
+            $ref: "#/$defs/qcom-msm8226-tlmm-state"
+        additionalProperties: false
+
+$defs:
+  qcom-msm8226-tlmm-state:
     type: object
     description:
       Pinctrl node's client devices use subnodes for desired pin configuration.
@@ -126,7 +134,7 @@ examples:
                 #interrupt-cells = <2>;
                 interrupts = <GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH>;
 
-                serial-pins {
+                serial-state {
                         pins = "gpio8", "gpio9";
                         function = "blsp_uart3";
                         drive-strength = <8>;
-- 
2.34.1


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

* [PATCH 13/32] dt-bindings: pinctrl: qcom,msm8226: do not require function on non-GPIOs
  2022-09-24  8:04 [PATCH 00/32] pinctrl/arm64: qcom: continued - fix Qualcomm TLMM pinctrl schema warnings Krzysztof Kozlowski
                   ` (11 preceding siblings ...)
  2022-09-24  8:04 ` [PATCH 12/32] dt-bindings: pinctrl: qcom,msm8226: fix matching pin config Krzysztof Kozlowski
@ 2022-09-24  8:04 ` Krzysztof Kozlowski
  2022-09-26 23:13   ` Rob Herring
  2022-09-24  8:04 ` [PATCH 14/32] dt-bindings: pinctrl: qcom,msm8226: add functions and input-enable Krzysztof Kozlowski
                   ` (19 subsequent siblings)
  32 siblings, 1 reply; 46+ messages in thread
From: Krzysztof Kozlowski @ 2022-09-24  8:04 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Linus Walleij,
	Rob Herring, Krzysztof Kozlowski, Sricharan R, Stephan Gerhold,
	Shawn Guo, Vinod Koul, krishna Lanka, Sivaprakash Murugesan,
	linux-arm-msm, linux-gpio, devicetree, linux-kernel
  Cc: Krzysztof Kozlowski

Certain pins, like SDcard related, do not have functions and such should
not be required.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 .../bindings/pinctrl/qcom,msm8226-pinctrl.yaml       | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/pinctrl/qcom,msm8226-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/qcom,msm8226-pinctrl.yaml
index ecb90c77f666..f1d9696a1fe7 100644
--- a/Documentation/devicetree/bindings/pinctrl/qcom,msm8226-pinctrl.yaml
+++ b/Documentation/devicetree/bindings/pinctrl/qcom,msm8226-pinctrl.yaml
@@ -60,7 +60,6 @@ $defs:
     description:
       Pinctrl node's client devices use subnodes for desired pin configuration.
       Client device subnodes use below standard properties.
-    $ref: "/schemas/pinctrl/pincfg-node.yaml"
 
     properties:
       pins:
@@ -101,7 +100,16 @@ $defs:
 
     required:
       - pins
-      - function
+
+    allOf:
+      - $ref: /schemas/pinctrl/pincfg-node.yaml
+      - if:
+          properties:
+            pins:
+              pattern: "^gpio([0-9]|[1-9][0-9]|1[0-1][0-6])$"
+        then:
+          required:
+            - function
 
     additionalProperties: false
 
-- 
2.34.1


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

* [PATCH 14/32] dt-bindings: pinctrl: qcom,msm8226: add functions and input-enable
  2022-09-24  8:04 [PATCH 00/32] pinctrl/arm64: qcom: continued - fix Qualcomm TLMM pinctrl schema warnings Krzysztof Kozlowski
                   ` (12 preceding siblings ...)
  2022-09-24  8:04 ` [PATCH 13/32] dt-bindings: pinctrl: qcom,msm8226: do not require function on non-GPIOs Krzysztof Kozlowski
@ 2022-09-24  8:04 ` Krzysztof Kozlowski
  2022-09-24  8:04 ` [PATCH 15/32] dt-bindings: pinctrl: qcom,msm8226: fix indentation in example Krzysztof Kozlowski
                   ` (18 subsequent siblings)
  32 siblings, 0 replies; 46+ messages in thread
From: Krzysztof Kozlowski @ 2022-09-24  8:04 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Linus Walleij,
	Rob Herring, Krzysztof Kozlowski, Sricharan R, Stephan Gerhold,
	Shawn Guo, Vinod Koul, krishna Lanka, Sivaprakash Murugesan,
	linux-arm-msm, linux-gpio, devicetree, linux-kernel
  Cc: Krzysztof Kozlowski

The MSM8226 pinctrl driver supports input-enable, blsp_i2c4, blsp_uart4
and sdc3 functions and DTS already uses it:

  qcom-msm8226-samsung-s3ve3g.dtb: pinctrl@fd510000: 'blsp1-i2c1', 'blsp1-i2c2', 'blsp1-i2c3', 'blsp1-i2c4', 'blsp1-i2c5' ...
  qcom-apq8026-lg-lenok.dtb: pinctrl@fd510000: touch-state: 'oneOf' conditional failed, one must be fixed:
    'input-enable' does not match any of the regexes: 'pinctrl-[0-9]+'

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 .../bindings/pinctrl/qcom,msm8226-pinctrl.yaml         | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/Documentation/devicetree/bindings/pinctrl/qcom,msm8226-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/qcom,msm8226-pinctrl.yaml
index f1d9696a1fe7..e665ae7ffe3c 100644
--- a/Documentation/devicetree/bindings/pinctrl/qcom,msm8226-pinctrl.yaml
+++ b/Documentation/devicetree/bindings/pinctrl/qcom,msm8226-pinctrl.yaml
@@ -78,9 +78,10 @@ $defs:
           Specify the alternative function to be configured for the specified
           pins. Functions are only valid for gpio pins.
         enum: [ gpio, cci_i2c0, blsp_uim1, blsp_uim2, blsp_uim3, blsp_uim5,
-                blsp_i2c1, blsp_i2c2, blsp_i2c3, blsp_i2c5, blsp_spi1,
+                blsp_i2c1, blsp_i2c2, blsp_i2c3, blsp_i2c4, blsp_i2c5, blsp_spi1,
                 blsp_spi2, blsp_spi3, blsp_spi5, blsp_uart1, blsp_uart2,
-                blsp_uart3, blsp_uart5, cam_mclk0, cam_mclk1, wlan ]
+                blsp_uart3, blsp_uart4, blsp_uart5, cam_mclk0, cam_mclk1, sdc3,
+                wlan ]
 
       drive-strength:
         enum: [2, 4, 6, 8, 10, 12, 14, 16]
@@ -89,13 +90,10 @@ $defs:
           Selects the drive strength for the specified pins, in mA.
 
       bias-pull-down: true
-
       bias-pull-up: true
-
       bias-disable: true
-
+      input-enable: true
       output-high: true
-
       output-low: true
 
     required:
-- 
2.34.1


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

* [PATCH 15/32] dt-bindings: pinctrl: qcom,msm8226: fix indentation in example
  2022-09-24  8:04 [PATCH 00/32] pinctrl/arm64: qcom: continued - fix Qualcomm TLMM pinctrl schema warnings Krzysztof Kozlowski
                   ` (13 preceding siblings ...)
  2022-09-24  8:04 ` [PATCH 14/32] dt-bindings: pinctrl: qcom,msm8226: add functions and input-enable Krzysztof Kozlowski
@ 2022-09-24  8:04 ` Krzysztof Kozlowski
  2022-09-24  8:04 ` [PATCH 16/32] dt-bindings: pinctrl: qcom,msm8909-tlmm: fix matching pin config Krzysztof Kozlowski
                   ` (17 subsequent siblings)
  32 siblings, 0 replies; 46+ messages in thread
From: Krzysztof Kozlowski @ 2022-09-24  8:04 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Linus Walleij,
	Rob Herring, Krzysztof Kozlowski, Sricharan R, Stephan Gerhold,
	Shawn Guo, Vinod Koul, krishna Lanka, Sivaprakash Murugesan,
	linux-arm-msm, linux-gpio, devicetree, linux-kernel
  Cc: Krzysztof Kozlowski

Bindings example should be indented with 4-spaces.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 .../pinctrl/qcom,msm8226-pinctrl.yaml         | 36 +++++++++----------
 1 file changed, 18 insertions(+), 18 deletions(-)

diff --git a/Documentation/devicetree/bindings/pinctrl/qcom,msm8226-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/qcom,msm8226-pinctrl.yaml
index e665ae7ffe3c..61200fe7a748 100644
--- a/Documentation/devicetree/bindings/pinctrl/qcom,msm8226-pinctrl.yaml
+++ b/Documentation/devicetree/bindings/pinctrl/qcom,msm8226-pinctrl.yaml
@@ -128,22 +128,22 @@ additionalProperties: false
 
 examples:
   - |
-        #include <dt-bindings/interrupt-controller/arm-gic.h>
-        msmgpio: pinctrl@fd510000 {
-                compatible = "qcom,msm8226-pinctrl";
-                reg = <0xfd510000 0x4000>;
-
-                gpio-controller;
-                #gpio-cells = <2>;
-                gpio-ranges = <&msmgpio 0 0 117>;
-                interrupt-controller;
-                #interrupt-cells = <2>;
-                interrupts = <GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH>;
-
-                serial-state {
-                        pins = "gpio8", "gpio9";
-                        function = "blsp_uart3";
-                        drive-strength = <8>;
-                        bias-disable;
-                };
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
+    msmgpio: pinctrl@fd510000 {
+        compatible = "qcom,msm8226-pinctrl";
+        reg = <0xfd510000 0x4000>;
+
+        gpio-controller;
+        #gpio-cells = <2>;
+        gpio-ranges = <&msmgpio 0 0 117>;
+        interrupt-controller;
+        #interrupt-cells = <2>;
+        interrupts = <GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH>;
+
+        serial-state {
+            pins = "gpio8", "gpio9";
+            function = "blsp_uart3";
+            drive-strength = <8>;
+            bias-disable;
         };
+    };
-- 
2.34.1


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

* [PATCH 16/32] dt-bindings: pinctrl: qcom,msm8909-tlmm: fix matching pin config
  2022-09-24  8:04 [PATCH 00/32] pinctrl/arm64: qcom: continued - fix Qualcomm TLMM pinctrl schema warnings Krzysztof Kozlowski
                   ` (14 preceding siblings ...)
  2022-09-24  8:04 ` [PATCH 15/32] dt-bindings: pinctrl: qcom,msm8226: fix indentation in example Krzysztof Kozlowski
@ 2022-09-24  8:04 ` Krzysztof Kozlowski
  2022-09-24  8:04 ` [PATCH 17/32] dt-bindings: pinctrl: qcom,msm8909-tlmm: do not require function on non-GPIOs Krzysztof Kozlowski
                   ` (16 subsequent siblings)
  32 siblings, 0 replies; 46+ messages in thread
From: Krzysztof Kozlowski @ 2022-09-24  8:04 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Linus Walleij,
	Rob Herring, Krzysztof Kozlowski, Sricharan R, Stephan Gerhold,
	Shawn Guo, Vinod Koul, krishna Lanka, Sivaprakash Murugesan,
	linux-arm-msm, linux-gpio, devicetree, linux-kernel
  Cc: Krzysztof Kozlowski

The TLMM pin controller follows generic pin-controller bindings, so
should have subnodes with '-state' and '-pins'.  Otherwise the subnodes
(level one and two) are not properly matched.  This method also unifies
the bindings with other Qualcomm TLMM and LPASS pinctrl bindings.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 .../devicetree/bindings/pinctrl/qcom,msm8909-tlmm.yaml     | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/Documentation/devicetree/bindings/pinctrl/qcom,msm8909-tlmm.yaml b/Documentation/devicetree/bindings/pinctrl/qcom,msm8909-tlmm.yaml
index e03530091478..b1735918fa90 100644
--- a/Documentation/devicetree/bindings/pinctrl/qcom,msm8909-tlmm.yaml
+++ b/Documentation/devicetree/bindings/pinctrl/qcom,msm8909-tlmm.yaml
@@ -43,8 +43,9 @@ patternProperties:
     oneOf:
       - $ref: "#/$defs/qcom-msm8909-tlmm-state"
       - patternProperties:
-          ".*":
+          "-pins$":
             $ref: "#/$defs/qcom-msm8909-tlmm-state"
+        additionalProperties: false
 
 $defs:
   qcom-msm8909-tlmm-state:
@@ -136,13 +137,13 @@ examples:
                 };
 
                 uart-w-subnodes-state {
-                        rx {
+                        rx-pins {
                                 pins = "gpio4";
                                 function = "blsp_uart1";
                                 bias-pull-up;
                         };
 
-                        tx {
+                        tx-pins {
                                 pins = "gpio5";
                                 function = "blsp_uart1";
                                 bias-disable;
-- 
2.34.1


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

* [PATCH 17/32] dt-bindings: pinctrl: qcom,msm8909-tlmm: do not require function on non-GPIOs
  2022-09-24  8:04 [PATCH 00/32] pinctrl/arm64: qcom: continued - fix Qualcomm TLMM pinctrl schema warnings Krzysztof Kozlowski
                   ` (15 preceding siblings ...)
  2022-09-24  8:04 ` [PATCH 16/32] dt-bindings: pinctrl: qcom,msm8909-tlmm: fix matching pin config Krzysztof Kozlowski
@ 2022-09-24  8:04 ` Krzysztof Kozlowski
  2022-09-25 14:00   ` Stephan Gerhold
  2022-09-24  8:04 ` [PATCH 18/32] dt-bindings: pinctrl: qcom,msm8909-tlmm: fix indentation in example Krzysztof Kozlowski
                   ` (15 subsequent siblings)
  32 siblings, 1 reply; 46+ messages in thread
From: Krzysztof Kozlowski @ 2022-09-24  8:04 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Linus Walleij,
	Rob Herring, Krzysztof Kozlowski, Sricharan R, Stephan Gerhold,
	Shawn Guo, Vinod Koul, krishna Lanka, Sivaprakash Murugesan,
	linux-arm-msm, linux-gpio, devicetree, linux-kernel
  Cc: Krzysztof Kozlowski

Certain pins, like SDcard related, do not have functions and such should
not be required.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 .../bindings/pinctrl/qcom,msm8909-tlmm.yaml          | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/pinctrl/qcom,msm8909-tlmm.yaml b/Documentation/devicetree/bindings/pinctrl/qcom,msm8909-tlmm.yaml
index b1735918fa90..e4332e628698 100644
--- a/Documentation/devicetree/bindings/pinctrl/qcom,msm8909-tlmm.yaml
+++ b/Documentation/devicetree/bindings/pinctrl/qcom,msm8909-tlmm.yaml
@@ -53,7 +53,6 @@ $defs:
     description:
       Pinctrl node's client devices use subnodes for desired pin configuration.
       Client device subnodes use below standard properties.
-    $ref: "qcom,tlmm-common.yaml#/$defs/qcom-tlmm-state"
 
     properties:
       pins:
@@ -113,7 +112,16 @@ $defs:
 
     required:
       - pins
-      - function
+
+    allOf:
+      - $ref: "qcom,tlmm-common.yaml#/$defs/qcom-tlmm-state"
+      - if:
+          properties:
+            pins:
+              pattern: "^gpio([0-9]|[1-9][0-9]|10[0-9]|11[0-7])$"
+        then:
+          required:
+            - function
 
     additionalProperties: false
 
-- 
2.34.1


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

* [PATCH 18/32] dt-bindings: pinctrl: qcom,msm8909-tlmm: fix indentation in example
  2022-09-24  8:04 [PATCH 00/32] pinctrl/arm64: qcom: continued - fix Qualcomm TLMM pinctrl schema warnings Krzysztof Kozlowski
                   ` (16 preceding siblings ...)
  2022-09-24  8:04 ` [PATCH 17/32] dt-bindings: pinctrl: qcom,msm8909-tlmm: do not require function on non-GPIOs Krzysztof Kozlowski
@ 2022-09-24  8:04 ` Krzysztof Kozlowski
  2022-09-24  8:04 ` [PATCH 19/32] dt-bindings: pinctrl: qcom,msm8953: fix matching pin config Krzysztof Kozlowski
                   ` (14 subsequent siblings)
  32 siblings, 0 replies; 46+ messages in thread
From: Krzysztof Kozlowski @ 2022-09-24  8:04 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Linus Walleij,
	Rob Herring, Krzysztof Kozlowski, Sricharan R, Stephan Gerhold,
	Shawn Guo, Vinod Koul, krishna Lanka, Sivaprakash Murugesan,
	linux-arm-msm, linux-gpio, devicetree, linux-kernel
  Cc: Krzysztof Kozlowski

Bindings example should be indented with 4-spaces.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 .../bindings/pinctrl/qcom,msm8909-tlmm.yaml   | 60 +++++++++----------
 1 file changed, 30 insertions(+), 30 deletions(-)

diff --git a/Documentation/devicetree/bindings/pinctrl/qcom,msm8909-tlmm.yaml b/Documentation/devicetree/bindings/pinctrl/qcom,msm8909-tlmm.yaml
index e4332e628698..a49e91c6e31e 100644
--- a/Documentation/devicetree/bindings/pinctrl/qcom,msm8909-tlmm.yaml
+++ b/Documentation/devicetree/bindings/pinctrl/qcom,msm8909-tlmm.yaml
@@ -127,35 +127,35 @@ $defs:
 
 examples:
   - |
-        #include <dt-bindings/interrupt-controller/arm-gic.h>
-
-        pinctrl@1000000 {
-                compatible = "qcom,msm8909-tlmm";
-                reg = <0x1000000 0x300000>;
-                interrupts = <GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH>;
-                gpio-controller;
-                #gpio-cells = <2>;
-                gpio-ranges = <&tlmm 0 0 117>;
-                interrupt-controller;
-                #interrupt-cells = <2>;
-
-                gpio-wo-subnode-state {
-                        pins = "gpio1";
-                        function = "gpio";
-                };
-
-                uart-w-subnodes-state {
-                        rx-pins {
-                                pins = "gpio4";
-                                function = "blsp_uart1";
-                                bias-pull-up;
-                        };
-
-                        tx-pins {
-                                pins = "gpio5";
-                                function = "blsp_uart1";
-                                bias-disable;
-                        };
-                };
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
+
+    pinctrl@1000000 {
+        compatible = "qcom,msm8909-tlmm";
+        reg = <0x1000000 0x300000>;
+        interrupts = <GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH>;
+        gpio-controller;
+        #gpio-cells = <2>;
+        gpio-ranges = <&tlmm 0 0 117>;
+        interrupt-controller;
+        #interrupt-cells = <2>;
+
+        gpio-wo-subnode-state {
+            pins = "gpio1";
+            function = "gpio";
         };
+
+        uart-w-subnodes-state {
+            rx-pins {
+                pins = "gpio4";
+                function = "blsp_uart1";
+                bias-pull-up;
+            };
+
+            tx-pins {
+                pins = "gpio5";
+                function = "blsp_uart1";
+                bias-disable;
+            };
+        };
+    };
 ...
-- 
2.34.1


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

* [PATCH 19/32] dt-bindings: pinctrl: qcom,msm8953: fix matching pin config
  2022-09-24  8:04 [PATCH 00/32] pinctrl/arm64: qcom: continued - fix Qualcomm TLMM pinctrl schema warnings Krzysztof Kozlowski
                   ` (17 preceding siblings ...)
  2022-09-24  8:04 ` [PATCH 18/32] dt-bindings: pinctrl: qcom,msm8909-tlmm: fix indentation in example Krzysztof Kozlowski
@ 2022-09-24  8:04 ` Krzysztof Kozlowski
  2022-09-24  8:04 ` [PATCH 20/32] dt-bindings: pinctrl: qcom,msm8953: do not require function on non-GPIOs Krzysztof Kozlowski
                   ` (13 subsequent siblings)
  32 siblings, 0 replies; 46+ messages in thread
From: Krzysztof Kozlowski @ 2022-09-24  8:04 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Linus Walleij,
	Rob Herring, Krzysztof Kozlowski, Sricharan R, Stephan Gerhold,
	Shawn Guo, Vinod Koul, krishna Lanka, Sivaprakash Murugesan,
	linux-arm-msm, linux-gpio, devicetree, linux-kernel
  Cc: Krzysztof Kozlowski

The TLMM pin controller follows generic pin-controller bindings, so
should have subnodes with '-state' and '-pins'.  Otherwise the subnodes
(level one and two) are not properly matched.  This method also unifies
the bindings with other Qualcomm TLMM and LPASS pinctrl bindings.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 .../bindings/pinctrl/qcom,msm8953-pinctrl.yaml     | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/Documentation/devicetree/bindings/pinctrl/qcom,msm8953-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/qcom,msm8953-pinctrl.yaml
index d4da558cde54..c162796ab604 100644
--- a/Documentation/devicetree/bindings/pinctrl/qcom,msm8953-pinctrl.yaml
+++ b/Documentation/devicetree/bindings/pinctrl/qcom,msm8953-pinctrl.yaml
@@ -44,9 +44,17 @@ properties:
   gpio-ranges:
     maxItems: 1
 
-#PIN CONFIGURATION NODES
 patternProperties:
-  '-pins$':
+  "-state$":
+    oneOf:
+      - $ref: "#/$defs/qcom-msm8953-tlmm-state"
+      - patternProperties:
+          "-pins$":
+            $ref: "#/$defs/qcom-msm8953-tlmm-state"
+        additionalProperties: false
+
+$defs:
+  qcom-msm8953-tlmm-state:
     type: object
     description:
       Pinctrl node's client devices use subnodes for desired pin configuration.
@@ -163,7 +171,7 @@ examples:
               #gpio-cells = <2>;
               gpio-ranges = <&tlmm 0 0 142>;
 
-              serial_default: serial-pins {
+              serial_default: serial-state {
                     pins = "gpio4", "gpio5";
                     function = "blsp_uart2";
                     drive-strength = <2>;
-- 
2.34.1


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

* [PATCH 20/32] dt-bindings: pinctrl: qcom,msm8953: do not require function on non-GPIOs
  2022-09-24  8:04 [PATCH 00/32] pinctrl/arm64: qcom: continued - fix Qualcomm TLMM pinctrl schema warnings Krzysztof Kozlowski
                   ` (18 preceding siblings ...)
  2022-09-24  8:04 ` [PATCH 19/32] dt-bindings: pinctrl: qcom,msm8953: fix matching pin config Krzysztof Kozlowski
@ 2022-09-24  8:04 ` Krzysztof Kozlowski
  2022-09-26 23:14   ` Rob Herring
  2022-09-24  8:04 ` [PATCH 21/32] dt-bindings: pinctrl: qcom,msm8953: fix indentation in example Krzysztof Kozlowski
                   ` (12 subsequent siblings)
  32 siblings, 1 reply; 46+ messages in thread
From: Krzysztof Kozlowski @ 2022-09-24  8:04 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Linus Walleij,
	Rob Herring, Krzysztof Kozlowski, Sricharan R, Stephan Gerhold,
	Shawn Guo, Vinod Koul, krishna Lanka, Sivaprakash Murugesan,
	linux-arm-msm, linux-gpio, devicetree, linux-kernel
  Cc: Krzysztof Kozlowski

Certain pins, like SDcard related, do not have functions and such should
not be required.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 .../bindings/pinctrl/qcom,msm8953-pinctrl.yaml       | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/pinctrl/qcom,msm8953-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/qcom,msm8953-pinctrl.yaml
index c162796ab604..67d3d90839ad 100644
--- a/Documentation/devicetree/bindings/pinctrl/qcom,msm8953-pinctrl.yaml
+++ b/Documentation/devicetree/bindings/pinctrl/qcom,msm8953-pinctrl.yaml
@@ -59,7 +59,6 @@ $defs:
     description:
       Pinctrl node's client devices use subnodes for desired pin configuration.
       Client device subnodes use below standard properties.
-    $ref: "/schemas/pinctrl/pincfg-node.yaml"
 
     properties:
       pins:
@@ -139,7 +138,16 @@ $defs:
 
     required:
       - pins
-      - function
+
+    allOf:
+      - $ref: /schemas/pinctrl/pincfg-node.yaml
+      - if:
+          properties:
+            pins:
+              pattern: "^gpio([0-9]|[1-9][0-9]|1[0-7][0-9])$"
+        then:
+          required:
+            - function
 
     additionalProperties: false
 
-- 
2.34.1


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

* [PATCH 21/32] dt-bindings: pinctrl: qcom,msm8953: fix indentation in example
  2022-09-24  8:04 [PATCH 00/32] pinctrl/arm64: qcom: continued - fix Qualcomm TLMM pinctrl schema warnings Krzysztof Kozlowski
                   ` (19 preceding siblings ...)
  2022-09-24  8:04 ` [PATCH 20/32] dt-bindings: pinctrl: qcom,msm8953: do not require function on non-GPIOs Krzysztof Kozlowski
@ 2022-09-24  8:04 ` Krzysztof Kozlowski
  2022-09-24  8:04 ` [PATCH 22/32] dt-bindings: pinctrl: qcom,mdm9607: do not require function on non-GPIOs Krzysztof Kozlowski
                   ` (11 subsequent siblings)
  32 siblings, 0 replies; 46+ messages in thread
From: Krzysztof Kozlowski @ 2022-09-24  8:04 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Linus Walleij,
	Rob Herring, Krzysztof Kozlowski, Sricharan R, Stephan Gerhold,
	Shawn Guo, Vinod Koul, krishna Lanka, Sivaprakash Murugesan,
	linux-arm-msm, linux-gpio, devicetree, linux-kernel
  Cc: Krzysztof Kozlowski

Bindings example should be indented with 4-spaces.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 .../pinctrl/qcom,msm8953-pinctrl.yaml         | 34 +++++++++----------
 1 file changed, 17 insertions(+), 17 deletions(-)

diff --git a/Documentation/devicetree/bindings/pinctrl/qcom,msm8953-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/qcom,msm8953-pinctrl.yaml
index 67d3d90839ad..3e3fcfc0261d 100644
--- a/Documentation/devicetree/bindings/pinctrl/qcom,msm8953-pinctrl.yaml
+++ b/Documentation/devicetree/bindings/pinctrl/qcom,msm8953-pinctrl.yaml
@@ -168,21 +168,21 @@ additionalProperties: false
 
 examples:
   - |
-        #include <dt-bindings/interrupt-controller/arm-gic.h>
-        tlmm: pinctrl@1000000 {
-              compatible = "qcom,msm8953-pinctrl";
-              reg = <0x01000000 0x300000>;
-              interrupts = <GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH>;
-              interrupt-controller;
-              #interrupt-cells = <2>;
-              gpio-controller;
-              #gpio-cells = <2>;
-              gpio-ranges = <&tlmm 0 0 142>;
-
-              serial_default: serial-state {
-                    pins = "gpio4", "gpio5";
-                    function = "blsp_uart2";
-                    drive-strength = <2>;
-                    bias-disable;
-              };
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
+    tlmm: pinctrl@1000000 {
+        compatible = "qcom,msm8953-pinctrl";
+        reg = <0x01000000 0x300000>;
+        interrupts = <GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH>;
+        interrupt-controller;
+        #interrupt-cells = <2>;
+        gpio-controller;
+        #gpio-cells = <2>;
+        gpio-ranges = <&tlmm 0 0 142>;
+
+        serial_default: serial-state {
+            pins = "gpio4", "gpio5";
+            function = "blsp_uart2";
+            drive-strength = <2>;
+            bias-disable;
         };
+    };
-- 
2.34.1


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

* [PATCH 22/32] dt-bindings: pinctrl: qcom,mdm9607: do not require function on non-GPIOs
  2022-09-24  8:04 [PATCH 00/32] pinctrl/arm64: qcom: continued - fix Qualcomm TLMM pinctrl schema warnings Krzysztof Kozlowski
                   ` (20 preceding siblings ...)
  2022-09-24  8:04 ` [PATCH 21/32] dt-bindings: pinctrl: qcom,msm8953: fix indentation in example Krzysztof Kozlowski
@ 2022-09-24  8:04 ` Krzysztof Kozlowski
  2022-09-24  8:04 ` [PATCH 23/32] dt-bindings: pinctrl: qcom,mdm9607: fix indentation in example Krzysztof Kozlowski
                   ` (10 subsequent siblings)
  32 siblings, 0 replies; 46+ messages in thread
From: Krzysztof Kozlowski @ 2022-09-24  8:04 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Linus Walleij,
	Rob Herring, Krzysztof Kozlowski, Sricharan R, Stephan Gerhold,
	Shawn Guo, Vinod Koul, krishna Lanka, Sivaprakash Murugesan,
	linux-arm-msm, linux-gpio, devicetree, linux-kernel
  Cc: Krzysztof Kozlowski

Certain pins, like SDcard related, do not have functions and such should
not be required.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 .../bindings/pinctrl/qcom,mdm9607-pinctrl.yaml       | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/pinctrl/qcom,mdm9607-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/qcom,mdm9607-pinctrl.yaml
index f7bd4be1739e..ef22090fd6d6 100644
--- a/Documentation/devicetree/bindings/pinctrl/qcom,mdm9607-pinctrl.yaml
+++ b/Documentation/devicetree/bindings/pinctrl/qcom,mdm9607-pinctrl.yaml
@@ -53,7 +53,6 @@ patternProperties:
     description:
       Pinctrl node's client devices use subnodes for desired pin configuration.
       Client device subnodes use below standard properties.
-    $ref: "qcom,tlmm-common.yaml#/$defs/qcom-tlmm-state"
 
     properties:
       pins:
@@ -115,7 +114,16 @@ patternProperties:
 
     required:
       - pins
-      - function
+
+    allOf:
+      - $ref: "qcom,tlmm-common.yaml#/$defs/qcom-tlmm-state"
+      - if:
+          properties:
+            pins:
+              pattern: "^gpio([1-9]|[1-7][0-9]|80)$"
+        then:
+          required:
+            - function
 
     additionalProperties: false
 
-- 
2.34.1


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

* [PATCH 23/32] dt-bindings: pinctrl: qcom,mdm9607: fix indentation in example
  2022-09-24  8:04 [PATCH 00/32] pinctrl/arm64: qcom: continued - fix Qualcomm TLMM pinctrl schema warnings Krzysztof Kozlowski
                   ` (21 preceding siblings ...)
  2022-09-24  8:04 ` [PATCH 22/32] dt-bindings: pinctrl: qcom,mdm9607: do not require function on non-GPIOs Krzysztof Kozlowski
@ 2022-09-24  8:04 ` Krzysztof Kozlowski
  2022-09-24  8:04 ` [PATCH 24/32] dt-bindings: pinctrl: qcom,qcm2290: fix matching pin config Krzysztof Kozlowski
                   ` (9 subsequent siblings)
  32 siblings, 0 replies; 46+ messages in thread
From: Krzysztof Kozlowski @ 2022-09-24  8:04 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Linus Walleij,
	Rob Herring, Krzysztof Kozlowski, Sricharan R, Stephan Gerhold,
	Shawn Guo, Vinod Koul, krishna Lanka, Sivaprakash Murugesan,
	linux-arm-msm, linux-gpio, devicetree, linux-kernel
  Cc: Krzysztof Kozlowski

Bindings example should be indented with 4-spaces.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 .../pinctrl/qcom,mdm9607-pinctrl.yaml         | 22 +++++++++----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/Documentation/devicetree/bindings/pinctrl/qcom,mdm9607-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/qcom,mdm9607-pinctrl.yaml
index ef22090fd6d6..3757d6841085 100644
--- a/Documentation/devicetree/bindings/pinctrl/qcom,mdm9607-pinctrl.yaml
+++ b/Documentation/devicetree/bindings/pinctrl/qcom,mdm9607-pinctrl.yaml
@@ -129,14 +129,14 @@ patternProperties:
 
 examples:
   - |
-        #include <dt-bindings/interrupt-controller/arm-gic.h>
-        tlmm: pinctrl@1000000 {
-          compatible = "qcom,mdm9607-tlmm";
-          reg = <0x01000000 0x300000>;
-          interrupts = <GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH>;
-          gpio-controller;
-          gpio-ranges = <&msmgpio 0 0 80>;
-          #gpio-cells = <2>;
-          interrupt-controller;
-          #interrupt-cells = <2>;
-        };
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
+    tlmm: pinctrl@1000000 {
+        compatible = "qcom,mdm9607-tlmm";
+        reg = <0x01000000 0x300000>;
+        interrupts = <GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH>;
+        gpio-controller;
+        gpio-ranges = <&msmgpio 0 0 80>;
+        #gpio-cells = <2>;
+        interrupt-controller;
+        #interrupt-cells = <2>;
+    };
-- 
2.34.1


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

* [PATCH 24/32] dt-bindings: pinctrl: qcom,qcm2290: fix matching pin config
  2022-09-24  8:04 [PATCH 00/32] pinctrl/arm64: qcom: continued - fix Qualcomm TLMM pinctrl schema warnings Krzysztof Kozlowski
                   ` (22 preceding siblings ...)
  2022-09-24  8:04 ` [PATCH 23/32] dt-bindings: pinctrl: qcom,mdm9607: fix indentation in example Krzysztof Kozlowski
@ 2022-09-24  8:04 ` Krzysztof Kozlowski
  2022-09-24  8:04 ` [PATCH 25/32] dt-bindings: pinctrl: qcom,qcm2290: do not require function on non-GPIOs Krzysztof Kozlowski
                   ` (8 subsequent siblings)
  32 siblings, 0 replies; 46+ messages in thread
From: Krzysztof Kozlowski @ 2022-09-24  8:04 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Linus Walleij,
	Rob Herring, Krzysztof Kozlowski, Sricharan R, Stephan Gerhold,
	Shawn Guo, Vinod Koul, krishna Lanka, Sivaprakash Murugesan,
	linux-arm-msm, linux-gpio, devicetree, linux-kernel
  Cc: Krzysztof Kozlowski

The TLMM pin controller follows generic pin-controller bindings, so
should have subnodes with '-state' and '-pins'.  Otherwise the subnodes
(level one and two) are not properly matched.  This method also unifies
the bindings with other Qualcomm TLMM and LPASS pinctrl bindings.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 .../bindings/pinctrl/qcom,qcm2290-pinctrl.yaml           | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/Documentation/devicetree/bindings/pinctrl/qcom,qcm2290-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/qcom,qcm2290-pinctrl.yaml
index 3f4f1c0360b5..5324b61eb4f7 100644
--- a/Documentation/devicetree/bindings/pinctrl/qcom,qcm2290-pinctrl.yaml
+++ b/Documentation/devicetree/bindings/pinctrl/qcom,qcm2290-pinctrl.yaml
@@ -50,8 +50,9 @@ patternProperties:
     oneOf:
       - $ref: "#/$defs/qcom-qcm2290-tlmm-state"
       - patternProperties:
-          ".*":
+          "-pins$":
             $ref: "#/$defs/qcom-qcm2290-tlmm-state"
+        additionalProperties: false
 
 '$defs':
   qcom-qcm2290-tlmm-state:
@@ -146,19 +147,19 @@ examples:
         gpio-ranges = <&tlmm 0 0 127>;
 
         sdc2_on_state: sdc2-on-state {
-            clk {
+            clk-pins {
                 pins = "sdc2_clk";
                 bias-disable;
                 drive-strength = <16>;
             };
 
-            cmd {
+            cmd-pins {
                 pins = "sdc2_cmd";
                 bias-pull-up;
                 drive-strength = <10>;
             };
 
-            data {
+            data-pins {
                 pins = "sdc2_data";
                 bias-pull-up;
                 drive-strength = <10>;
-- 
2.34.1


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

* [PATCH 25/32] dt-bindings: pinctrl: qcom,qcm2290: do not require function on non-GPIOs
  2022-09-24  8:04 [PATCH 00/32] pinctrl/arm64: qcom: continued - fix Qualcomm TLMM pinctrl schema warnings Krzysztof Kozlowski
                   ` (23 preceding siblings ...)
  2022-09-24  8:04 ` [PATCH 24/32] dt-bindings: pinctrl: qcom,qcm2290: fix matching pin config Krzysztof Kozlowski
@ 2022-09-24  8:04 ` Krzysztof Kozlowski
  2022-09-26 23:15   ` Rob Herring
                     ` (2 more replies)
  2022-09-24  8:04 ` [PATCH 26/32] dt-bindings: pinctrl: qcom,sdx55: fix matching pin config Krzysztof Kozlowski
                   ` (7 subsequent siblings)
  32 siblings, 3 replies; 46+ messages in thread
From: Krzysztof Kozlowski @ 2022-09-24  8:04 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Linus Walleij,
	Rob Herring, Krzysztof Kozlowski, Sricharan R, Stephan Gerhold,
	Shawn Guo, Vinod Koul, krishna Lanka, Sivaprakash Murugesan,
	linux-arm-msm, linux-gpio, devicetree, linux-kernel
  Cc: Krzysztof Kozlowski

Certain pins, like SDcard related, do not have functions and such should
not be required.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 .../bindings/pinctrl/qcom,qcm2290-pinctrl.yaml        | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/pinctrl/qcom,qcm2290-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/qcom,qcm2290-pinctrl.yaml
index 5324b61eb4f7..89453cb60c12 100644
--- a/Documentation/devicetree/bindings/pinctrl/qcom,qcm2290-pinctrl.yaml
+++ b/Documentation/devicetree/bindings/pinctrl/qcom,qcm2290-pinctrl.yaml
@@ -60,7 +60,6 @@ patternProperties:
     description:
       Pinctrl node's client devices use subnodes for desired pin configuration.
       Client device subnodes use below standard properties.
-    $ref: "qcom,tlmm-common.yaml#/$defs/qcom-tlmm-state"
 
     properties:
       pins:
@@ -116,6 +115,16 @@ patternProperties:
     required:
       - pins
 
+    allOf:
+      - $ref: "qcom,tlmm-common.yaml#/$defs/qcom-tlmm-state"
+      - if:
+          properties:
+            pins:
+              pattern: "^gpio([0-9]|[1-9][0-9]|1[0-1][0-9]|12[0-6])$"
+        then:
+          required:
+            - function
+
     additionalProperties: false
 
 allOf:
-- 
2.34.1


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

* [PATCH 26/32] dt-bindings: pinctrl: qcom,sdx55: fix matching pin config
  2022-09-24  8:04 [PATCH 00/32] pinctrl/arm64: qcom: continued - fix Qualcomm TLMM pinctrl schema warnings Krzysztof Kozlowski
                   ` (24 preceding siblings ...)
  2022-09-24  8:04 ` [PATCH 25/32] dt-bindings: pinctrl: qcom,qcm2290: do not require function on non-GPIOs Krzysztof Kozlowski
@ 2022-09-24  8:04 ` Krzysztof Kozlowski
  2022-09-24  8:04 ` [PATCH 27/32] dt-bindings: pinctrl: qcom,sdx55: do not require function on non-GPIOs Krzysztof Kozlowski
                   ` (6 subsequent siblings)
  32 siblings, 0 replies; 46+ messages in thread
From: Krzysztof Kozlowski @ 2022-09-24  8:04 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Linus Walleij,
	Rob Herring, Krzysztof Kozlowski, Sricharan R, Stephan Gerhold,
	Shawn Guo, Vinod Koul, krishna Lanka, Sivaprakash Murugesan,
	linux-arm-msm, linux-gpio, devicetree, linux-kernel
  Cc: Krzysztof Kozlowski

The TLMM pin controller follows generic pin-controller bindings, so
should have subnodes with '-state' and '-pins'.  Otherwise the subnodes
(level one and two) are not properly matched.

  qcom-sdx55-telit-fn980-tlb.dtb: pinctrl@f100000: 'pcie_ep_clkreq_default', 'pcie_ep_perst_default', 'pcie_ep_wake_default' do not match any of the regexes: '-pins$', 'pinctrl-[0-9]+'

This method also unifies the bindings with other Qualcomm TLMM and LPASS
pinctrl bindings.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 .../bindings/pinctrl/qcom,sdx55-pinctrl.yaml       | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/Documentation/devicetree/bindings/pinctrl/qcom,sdx55-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/qcom,sdx55-pinctrl.yaml
index a38090b14aab..fff57abf4fbc 100644
--- a/Documentation/devicetree/bindings/pinctrl/qcom,sdx55-pinctrl.yaml
+++ b/Documentation/devicetree/bindings/pinctrl/qcom,sdx55-pinctrl.yaml
@@ -45,9 +45,17 @@ properties:
   gpio-reserved-ranges:
     maxItems: 1
 
-#PIN CONFIGURATION NODES
 patternProperties:
-  '-pins$':
+  "-state$":
+    oneOf:
+      - $ref: "#/$defs/qcom-sdx55-tlmm-state"
+      - patternProperties:
+          "-pins$":
+            $ref: "#/$defs/qcom-sdx55-tlmm-state"
+        additionalProperties: false
+
+$defs:
+  qcom-sdx55-tlmm-state:
     type: object
     description:
       Pinctrl node's client devices use subnodes for desired pin configuration.
@@ -146,7 +154,7 @@ examples:
                 #interrupt-cells = <2>;
                 interrupts = <GIC_SPI 212 IRQ_TYPE_LEVEL_HIGH>;
 
-                serial-pins {
+                serial-state {
                         pins = "gpio8", "gpio9";
                         function = "blsp_uart3";
                         drive-strength = <8>;
-- 
2.34.1


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

* [PATCH 27/32] dt-bindings: pinctrl: qcom,sdx55: do not require function on non-GPIOs
  2022-09-24  8:04 [PATCH 00/32] pinctrl/arm64: qcom: continued - fix Qualcomm TLMM pinctrl schema warnings Krzysztof Kozlowski
                   ` (25 preceding siblings ...)
  2022-09-24  8:04 ` [PATCH 26/32] dt-bindings: pinctrl: qcom,sdx55: fix matching pin config Krzysztof Kozlowski
@ 2022-09-24  8:04 ` Krzysztof Kozlowski
  2022-09-26 23:15   ` Rob Herring
  2022-09-24  8:04 ` [PATCH 28/32] dt-bindings: pinctrl: qcom,sdx55: fix indentation in example Krzysztof Kozlowski
                   ` (5 subsequent siblings)
  32 siblings, 1 reply; 46+ messages in thread
From: Krzysztof Kozlowski @ 2022-09-24  8:04 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Linus Walleij,
	Rob Herring, Krzysztof Kozlowski, Sricharan R, Stephan Gerhold,
	Shawn Guo, Vinod Koul, krishna Lanka, Sivaprakash Murugesan,
	linux-arm-msm, linux-gpio, devicetree, linux-kernel
  Cc: Krzysztof Kozlowski

Certain pins, like SDcard related, do not have functions and such should
not be required.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 .../bindings/pinctrl/qcom,sdx55-pinctrl.yaml         | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/pinctrl/qcom,sdx55-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/qcom,sdx55-pinctrl.yaml
index fff57abf4fbc..006aeec7794f 100644
--- a/Documentation/devicetree/bindings/pinctrl/qcom,sdx55-pinctrl.yaml
+++ b/Documentation/devicetree/bindings/pinctrl/qcom,sdx55-pinctrl.yaml
@@ -60,7 +60,6 @@ $defs:
     description:
       Pinctrl node's client devices use subnodes for desired pin configuration.
       Client device subnodes use below standard properties.
-    $ref: "/schemas/pinctrl/pincfg-node.yaml"
 
     properties:
       pins:
@@ -122,7 +121,16 @@ $defs:
 
     required:
       - pins
-      - function
+
+    allOf:
+      - $ref: /schemas/pinctrl/pincfg-node.yaml
+      - if:
+          properties:
+            pins:
+              pattern: "^gpio([0-9]|[1-9][0-9]|1[0-1][0-6])$"
+        then:
+          required:
+            - function
 
     additionalProperties: false
 
-- 
2.34.1


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

* [PATCH 28/32] dt-bindings: pinctrl: qcom,sdx55: fix indentation in example
  2022-09-24  8:04 [PATCH 00/32] pinctrl/arm64: qcom: continued - fix Qualcomm TLMM pinctrl schema warnings Krzysztof Kozlowski
                   ` (26 preceding siblings ...)
  2022-09-24  8:04 ` [PATCH 27/32] dt-bindings: pinctrl: qcom,sdx55: do not require function on non-GPIOs Krzysztof Kozlowski
@ 2022-09-24  8:04 ` Krzysztof Kozlowski
  2022-09-24  8:04 ` [PATCH 29/32] dt-bindings: pinctrl: qcom,sdx65: fix matching pin config Krzysztof Kozlowski
                   ` (4 subsequent siblings)
  32 siblings, 0 replies; 46+ messages in thread
From: Krzysztof Kozlowski @ 2022-09-24  8:04 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Linus Walleij,
	Rob Herring, Krzysztof Kozlowski, Sricharan R, Stephan Gerhold,
	Shawn Guo, Vinod Koul, krishna Lanka, Sivaprakash Murugesan,
	linux-arm-msm, linux-gpio, devicetree, linux-kernel
  Cc: Krzysztof Kozlowski

Bindings example should be indented with 4-spaces.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 .../bindings/pinctrl/qcom,sdx55-pinctrl.yaml  | 34 +++++++++----------
 1 file changed, 17 insertions(+), 17 deletions(-)

diff --git a/Documentation/devicetree/bindings/pinctrl/qcom,sdx55-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/qcom,sdx55-pinctrl.yaml
index 006aeec7794f..e381769e42ae 100644
--- a/Documentation/devicetree/bindings/pinctrl/qcom,sdx55-pinctrl.yaml
+++ b/Documentation/devicetree/bindings/pinctrl/qcom,sdx55-pinctrl.yaml
@@ -151,23 +151,23 @@ additionalProperties: false
 
 examples:
   - |
-        #include <dt-bindings/interrupt-controller/arm-gic.h>
-        tlmm: pinctrl@1f00000 {
-                compatible = "qcom,sdx55-pinctrl";
-                reg = <0x0f100000 0x300000>;
-                gpio-controller;
-                #gpio-cells = <2>;
-                gpio-ranges = <&tlmm 0 0 108>;
-                interrupt-controller;
-                #interrupt-cells = <2>;
-                interrupts = <GIC_SPI 212 IRQ_TYPE_LEVEL_HIGH>;
-
-                serial-state {
-                        pins = "gpio8", "gpio9";
-                        function = "blsp_uart3";
-                        drive-strength = <8>;
-                        bias-disable;
-                };
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
+    tlmm: pinctrl@1f00000 {
+        compatible = "qcom,sdx55-pinctrl";
+        reg = <0x0f100000 0x300000>;
+        gpio-controller;
+        #gpio-cells = <2>;
+        gpio-ranges = <&tlmm 0 0 108>;
+        interrupt-controller;
+        #interrupt-cells = <2>;
+        interrupts = <GIC_SPI 212 IRQ_TYPE_LEVEL_HIGH>;
+
+        serial-state {
+            pins = "gpio8", "gpio9";
+            function = "blsp_uart3";
+            drive-strength = <8>;
+            bias-disable;
         };
+    };
 
 ...
-- 
2.34.1


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

* [PATCH 29/32] dt-bindings: pinctrl: qcom,sdx65: fix matching pin config
  2022-09-24  8:04 [PATCH 00/32] pinctrl/arm64: qcom: continued - fix Qualcomm TLMM pinctrl schema warnings Krzysztof Kozlowski
                   ` (27 preceding siblings ...)
  2022-09-24  8:04 ` [PATCH 28/32] dt-bindings: pinctrl: qcom,sdx55: fix indentation in example Krzysztof Kozlowski
@ 2022-09-24  8:04 ` Krzysztof Kozlowski
  2022-09-24  8:04 ` [PATCH 30/32] dt-bindings: pinctrl: qcom,sdx65: do not require function on non-GPIOs Krzysztof Kozlowski
                   ` (3 subsequent siblings)
  32 siblings, 0 replies; 46+ messages in thread
From: Krzysztof Kozlowski @ 2022-09-24  8:04 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Linus Walleij,
	Rob Herring, Krzysztof Kozlowski, Sricharan R, Stephan Gerhold,
	Shawn Guo, Vinod Koul, krishna Lanka, Sivaprakash Murugesan,
	linux-arm-msm, linux-gpio, devicetree, linux-kernel
  Cc: Krzysztof Kozlowski

The TLMM pin controller follows generic pin-controller bindings, so
should have subnodes with '-state' and '-pins'.  Otherwise the subnodes
(level one and two) are not properly matched.  This method also unifies
the bindings with other Qualcomm TLMM and LPASS pinctrl bindings.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 .../devicetree/bindings/pinctrl/qcom,sdx65-pinctrl.yaml   | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/Documentation/devicetree/bindings/pinctrl/qcom,sdx65-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/qcom,sdx65-pinctrl.yaml
index cdfcf29dffee..0f796f1f0104 100644
--- a/Documentation/devicetree/bindings/pinctrl/qcom,sdx65-pinctrl.yaml
+++ b/Documentation/devicetree/bindings/pinctrl/qcom,sdx65-pinctrl.yaml
@@ -49,8 +49,10 @@ patternProperties:
     oneOf:
       - $ref: "#/$defs/qcom-sdx65-tlmm-state"
       - patternProperties:
-          ".*":
+          "-pins$":
             $ref: "#/$defs/qcom-sdx65-tlmm-state"
+        additionalProperties: false
+
 '$defs':
   qcom-sdx65-tlmm-state:
     type: object
@@ -175,13 +177,13 @@ examples:
         };
 
         uart-w-subnodes-state {
-            rx {
+            rx-pins {
                 pins = "gpio4";
                 function = "blsp_uart1";
                 bias-pull-up;
             };
 
-            tx {
+            tx-pins {
                 pins = "gpio5";
                 function = "blsp_uart1";
                 bias-disable;
-- 
2.34.1


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

* [PATCH 30/32] dt-bindings: pinctrl: qcom,sdx65: do not require function on non-GPIOs
  2022-09-24  8:04 [PATCH 00/32] pinctrl/arm64: qcom: continued - fix Qualcomm TLMM pinctrl schema warnings Krzysztof Kozlowski
                   ` (28 preceding siblings ...)
  2022-09-24  8:04 ` [PATCH 29/32] dt-bindings: pinctrl: qcom,sdx65: fix matching pin config Krzysztof Kozlowski
@ 2022-09-24  8:04 ` Krzysztof Kozlowski
  2022-09-26 23:15   ` Rob Herring
  2022-09-24  8:04 ` [PATCH 31/32] dt-bindings: pinctrl: qcom,sc7280: fix matching pin config Krzysztof Kozlowski
                   ` (2 subsequent siblings)
  32 siblings, 1 reply; 46+ messages in thread
From: Krzysztof Kozlowski @ 2022-09-24  8:04 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Linus Walleij,
	Rob Herring, Krzysztof Kozlowski, Sricharan R, Stephan Gerhold,
	Shawn Guo, Vinod Koul, krishna Lanka, Sivaprakash Murugesan,
	linux-arm-msm, linux-gpio, devicetree, linux-kernel
  Cc: Krzysztof Kozlowski

Certain pins, like SDcard related, do not have functions and such should
not be required.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 .../bindings/pinctrl/qcom,sdx65-pinctrl.yaml         | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/pinctrl/qcom,sdx65-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/qcom,sdx65-pinctrl.yaml
index 0f796f1f0104..a45dc81cfb98 100644
--- a/Documentation/devicetree/bindings/pinctrl/qcom,sdx65-pinctrl.yaml
+++ b/Documentation/devicetree/bindings/pinctrl/qcom,sdx65-pinctrl.yaml
@@ -59,7 +59,6 @@ patternProperties:
     description:
       Pinctrl node's client devices use subnodes for desired pin configuration.
       Client device subnodes use below standard properties.
-    $ref: "qcom,tlmm-common.yaml#/$defs/qcom-tlmm-state"
 
     properties:
       pins:
@@ -142,7 +141,16 @@ patternProperties:
 
     required:
       - pins
-      - function
+
+    allOf:
+      - $ref: "qcom,tlmm-common.yaml#/$defs/qcom-tlmm-state"
+      - if:
+          properties:
+            pins:
+              pattern: "^gpio([0-9]|[1-9][0-9]|10[0-7])$"
+        then:
+          required:
+            - function
 
     additionalProperties: false
 
-- 
2.34.1


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

* [PATCH 31/32] dt-bindings: pinctrl: qcom,sc7280: fix matching pin config
  2022-09-24  8:04 [PATCH 00/32] pinctrl/arm64: qcom: continued - fix Qualcomm TLMM pinctrl schema warnings Krzysztof Kozlowski
                   ` (29 preceding siblings ...)
  2022-09-24  8:04 ` [PATCH 30/32] dt-bindings: pinctrl: qcom,sdx65: do not require function on non-GPIOs Krzysztof Kozlowski
@ 2022-09-24  8:04 ` Krzysztof Kozlowski
  2022-09-24  8:04 ` [PATCH 32/32] dt-bindings: pinctrl: qcom,sc8280xp: fix indentation in example (remaining piece) Krzysztof Kozlowski
  2022-10-03 22:01 ` [PATCH 00/32] pinctrl/arm64: qcom: continued - fix Qualcomm TLMM pinctrl schema warnings Linus Walleij
  32 siblings, 0 replies; 46+ messages in thread
From: Krzysztof Kozlowski @ 2022-09-24  8:04 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Linus Walleij,
	Rob Herring, Krzysztof Kozlowski, Sricharan R, Stephan Gerhold,
	Shawn Guo, Vinod Koul, krishna Lanka, Sivaprakash Murugesan,
	linux-arm-msm, linux-gpio, devicetree, linux-kernel
  Cc: Krzysztof Kozlowski

The TLMM pin controller follows generic pin-controller bindings, so
should have subnodes with '-state' and '-pins'.  Otherwise the subnodes
(level one and two) are not properly matched.  This method also unifies
the bindings with other Qualcomm TLMM and LPASS pinctrl bindings.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 .../bindings/pinctrl/qcom,sc7280-pinctrl.yaml      | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/Documentation/devicetree/bindings/pinctrl/qcom,sc7280-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/qcom,sc7280-pinctrl.yaml
index ad3496784678..4606ca980dc4 100644
--- a/Documentation/devicetree/bindings/pinctrl/qcom,sc7280-pinctrl.yaml
+++ b/Documentation/devicetree/bindings/pinctrl/qcom,sc7280-pinctrl.yaml
@@ -47,9 +47,17 @@ properties:
 
   wakeup-parent: true
 
-#PIN CONFIGURATION NODES
 patternProperties:
-  '-pins$':
+  "-state$":
+    oneOf:
+      - $ref: "#/$defs/qcom-sc7280-tlmm-state"
+      - patternProperties:
+          "-pins$":
+            $ref: "#/$defs/qcom-sc7280-tlmm-state"
+        additionalProperties: false
+
+$defs:
+  qcom-sc7280-tlmm-state:
     type: object
     description:
       Pinctrl node's client devices use subnodes for desired pin configuration.
@@ -162,7 +170,7 @@ examples:
         gpio-ranges = <&tlmm 0 0 175>;
         wakeup-parent = <&pdc>;
 
-        qup_uart5_default: qup-uart5-pins {
+        qup_uart5_default: qup-uart5-state {
             pins = "gpio46", "gpio47";
             function = "qup13";
             drive-strength = <2>;
-- 
2.34.1


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

* [PATCH 32/32] dt-bindings: pinctrl: qcom,sc8280xp: fix indentation in example (remaining piece)
  2022-09-24  8:04 [PATCH 00/32] pinctrl/arm64: qcom: continued - fix Qualcomm TLMM pinctrl schema warnings Krzysztof Kozlowski
                   ` (30 preceding siblings ...)
  2022-09-24  8:04 ` [PATCH 31/32] dt-bindings: pinctrl: qcom,sc7280: fix matching pin config Krzysztof Kozlowski
@ 2022-09-24  8:04 ` Krzysztof Kozlowski
  2022-10-03 22:01 ` [PATCH 00/32] pinctrl/arm64: qcom: continued - fix Qualcomm TLMM pinctrl schema warnings Linus Walleij
  32 siblings, 0 replies; 46+ messages in thread
From: Krzysztof Kozlowski @ 2022-09-24  8:04 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Linus Walleij,
	Rob Herring, Krzysztof Kozlowski, Sricharan R, Stephan Gerhold,
	Shawn Guo, Vinod Koul, krishna Lanka, Sivaprakash Murugesan,
	linux-arm-msm, linux-gpio, devicetree, linux-kernel
  Cc: Krzysztof Kozlowski

Bindings example should be indented with 4-spaces.  Previous adjustment
missefd one spot.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 .../devicetree/bindings/pinctrl/qcom,sc8280xp-pinctrl.yaml    | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/pinctrl/qcom,sc8280xp-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/qcom,sc8280xp-pinctrl.yaml
index b9ab130cd558..0b251caaebf2 100644
--- a/Documentation/devicetree/bindings/pinctrl/qcom,sc8280xp-pinctrl.yaml
+++ b/Documentation/devicetree/bindings/pinctrl/qcom,sc8280xp-pinctrl.yaml
@@ -139,8 +139,8 @@ examples:
         gpio-ranges = <&tlmm 0 0 230>;
 
         gpio-wo-subnode-state {
-                pins = "gpio1";
-                function = "gpio";
+            pins = "gpio1";
+            function = "gpio";
         };
 
         uart-w-subnodes-state {
-- 
2.34.1


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

* Re: [PATCH 17/32] dt-bindings: pinctrl: qcom,msm8909-tlmm: do not require function on non-GPIOs
  2022-09-24  8:04 ` [PATCH 17/32] dt-bindings: pinctrl: qcom,msm8909-tlmm: do not require function on non-GPIOs Krzysztof Kozlowski
@ 2022-09-25 14:00   ` Stephan Gerhold
  2022-09-26  6:48     ` Krzysztof Kozlowski
  0 siblings, 1 reply; 46+ messages in thread
From: Stephan Gerhold @ 2022-09-25 14:00 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio, Linus Walleij,
	Rob Herring, Krzysztof Kozlowski, Sricharan R, Shawn Guo,
	Vinod Koul, krishna Lanka, Sivaprakash Murugesan, linux-arm-msm,
	linux-gpio, devicetree, linux-kernel

Hi Krzysztof,

On Sat, Sep 24, 2022 at 10:04:44AM +0200, Krzysztof Kozlowski wrote:
> Certain pins, like SDcard related, do not have functions and such should
> not be required.
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Thanks a lot for all your effort to clean this up!

> ---
>  .../bindings/pinctrl/qcom,msm8909-tlmm.yaml          | 12 ++++++++++--
>  1 file changed, 10 insertions(+), 2 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/pinctrl/qcom,msm8909-tlmm.yaml b/Documentation/devicetree/bindings/pinctrl/qcom,msm8909-tlmm.yaml
> index b1735918fa90..e4332e628698 100644
> --- a/Documentation/devicetree/bindings/pinctrl/qcom,msm8909-tlmm.yaml
> +++ b/Documentation/devicetree/bindings/pinctrl/qcom,msm8909-tlmm.yaml
> @@ -53,7 +53,6 @@ $defs:
>      description:
>        Pinctrl node's client devices use subnodes for desired pin configuration.
>        Client device subnodes use below standard properties.
> -    $ref: "qcom,tlmm-common.yaml#/$defs/qcom-tlmm-state"
>  
>      properties:
>        pins:
> @@ -113,7 +112,16 @@ $defs:
>  
>      required:
>        - pins
> -      - function
> +
> +    allOf:
> +      - $ref: "qcom,tlmm-common.yaml#/$defs/qcom-tlmm-state"
> +      - if:
> +          properties:
> +            pins:
> +              pattern: "^gpio([0-9]|[1-9][0-9]|10[0-9]|11[0-7])$"
> +        then:
> +          required:
> +            - function
>  

Is it possible to place this into qcom,tlmm-common.yaml? If the pattern
is only used to make "function" required for GPIOs, then it should not
matter if it matches just the prefix ("^gpio") or the exact set of
allowed GPIO numbers. The definition of the "pins" property will already
take care of validating those.

Or are there some Qcom SoCs where a GPIO without "function" is valid?

Thanks,
Stephan

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

* Re: [PATCH 17/32] dt-bindings: pinctrl: qcom,msm8909-tlmm: do not require function on non-GPIOs
  2022-09-25 14:00   ` Stephan Gerhold
@ 2022-09-26  6:48     ` Krzysztof Kozlowski
  0 siblings, 0 replies; 46+ messages in thread
From: Krzysztof Kozlowski @ 2022-09-26  6:48 UTC (permalink / raw)
  To: Stephan Gerhold
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio, Linus Walleij,
	Rob Herring, Krzysztof Kozlowski, Sricharan R, Shawn Guo,
	Vinod Koul, krishna Lanka, Sivaprakash Murugesan, linux-arm-msm,
	linux-gpio, devicetree, linux-kernel

On 25/09/2022 16:00, Stephan Gerhold wrote:
>> +    allOf:
>> +      - $ref: "qcom,tlmm-common.yaml#/$defs/qcom-tlmm-state"
>> +      - if:
>> +          properties:
>> +            pins:
>> +              pattern: "^gpio([0-9]|[1-9][0-9]|10[0-9]|11[0-7])$"
>> +        then:
>> +          required:
>> +            - function
>>  
> 
> Is it possible to place this into qcom,tlmm-common.yaml? If the pattern
> is only used to make "function" required for GPIOs, then it should not
> matter if it matches just the prefix ("^gpio") or the exact set of
> allowed GPIO numbers. The definition of the "pins" property will already
> take care of validating those.

Hm, very good idea.

> 
> Or are there some Qcom SoCs where a GPIO without "function" is valid?

Quick look at drivers says there is no such case. I can try adding it to
common schema and look for errors.


Best regards,
Krzysztof


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

* Re: [PATCH 10/32] dt-bindings: pinctrl: qcom,ipq6018: do not require function on non-GPIOs
  2022-09-24  8:04 ` [PATCH 10/32] dt-bindings: pinctrl: qcom,ipq6018: do not require function on non-GPIOs Krzysztof Kozlowski
@ 2022-09-26 23:13   ` Rob Herring
  0 siblings, 0 replies; 46+ messages in thread
From: Rob Herring @ 2022-09-26 23:13 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Vinod Koul, Konrad Dybcio, Krzysztof Kozlowski, krishna Lanka,
	Andy Gross, Shawn Guo, linux-arm-msm, devicetree, Rob Herring,
	Linus Walleij, Sricharan R, linux-kernel, Stephan Gerhold,
	linux-gpio, Sivaprakash Murugesan, Bjorn Andersson

On Sat, 24 Sep 2022 10:04:37 +0200, Krzysztof Kozlowski wrote:
> Certain pins, like SDcard related, do not have functions and such should
> not be required.
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---
>  .../bindings/pinctrl/qcom,ipq6018-pinctrl.yaml       | 12 ++++++++++--
>  1 file changed, 10 insertions(+), 2 deletions(-)
> 

Reviewed-by: Rob Herring <robh@kernel.org>

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

* Re: [PATCH 13/32] dt-bindings: pinctrl: qcom,msm8226: do not require function on non-GPIOs
  2022-09-24  8:04 ` [PATCH 13/32] dt-bindings: pinctrl: qcom,msm8226: do not require function on non-GPIOs Krzysztof Kozlowski
@ 2022-09-26 23:13   ` Rob Herring
  0 siblings, 0 replies; 46+ messages in thread
From: Rob Herring @ 2022-09-26 23:13 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: linux-kernel, Konrad Dybcio, linux-gpio, devicetree, Sricharan R,
	Krzysztof Kozlowski, Shawn Guo, Bjorn Andersson, Linus Walleij,
	Vinod Koul, Sivaprakash Murugesan, Rob Herring, Andy Gross,
	krishna Lanka, linux-arm-msm, Stephan Gerhold

On Sat, 24 Sep 2022 10:04:40 +0200, Krzysztof Kozlowski wrote:
> Certain pins, like SDcard related, do not have functions and such should
> not be required.
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---
>  .../bindings/pinctrl/qcom,msm8226-pinctrl.yaml       | 12 ++++++++++--
>  1 file changed, 10 insertions(+), 2 deletions(-)
> 

Reviewed-by: Rob Herring <robh@kernel.org>

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

* Re: [PATCH 20/32] dt-bindings: pinctrl: qcom,msm8953: do not require function on non-GPIOs
  2022-09-24  8:04 ` [PATCH 20/32] dt-bindings: pinctrl: qcom,msm8953: do not require function on non-GPIOs Krzysztof Kozlowski
@ 2022-09-26 23:14   ` Rob Herring
  0 siblings, 0 replies; 46+ messages in thread
From: Rob Herring @ 2022-09-26 23:14 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Rob Herring, Shawn Guo, Andy Gross, linux-kernel, Konrad Dybcio,
	Sivaprakash Murugesan, Krzysztof Kozlowski, Stephan Gerhold,
	devicetree, krishna Lanka, Sricharan R, Linus Walleij,
	linux-gpio, Bjorn Andersson, Vinod Koul, linux-arm-msm

On Sat, 24 Sep 2022 10:04:47 +0200, Krzysztof Kozlowski wrote:
> Certain pins, like SDcard related, do not have functions and such should
> not be required.
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---
>  .../bindings/pinctrl/qcom,msm8953-pinctrl.yaml       | 12 ++++++++++--
>  1 file changed, 10 insertions(+), 2 deletions(-)
> 

Reviewed-by: Rob Herring <robh@kernel.org>

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

* Re: [PATCH 25/32] dt-bindings: pinctrl: qcom,qcm2290: do not require function on non-GPIOs
  2022-09-24  8:04 ` [PATCH 25/32] dt-bindings: pinctrl: qcom,qcm2290: do not require function on non-GPIOs Krzysztof Kozlowski
@ 2022-09-26 23:15   ` Rob Herring
  2022-09-27 11:38     ` Krzysztof Kozlowski
  2022-09-26 23:15   ` Rob Herring
  2022-09-27 11:42   ` Dmitry Baryshkov
  2 siblings, 1 reply; 46+ messages in thread
From: Rob Herring @ 2022-09-26 23:15 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio, Linus Walleij,
	Krzysztof Kozlowski, Sricharan R, Stephan Gerhold, Shawn Guo,
	Vinod Koul, krishna Lanka, Sivaprakash Murugesan, linux-arm-msm,
	linux-gpio, devicetree, linux-kernel

On Sat, Sep 24, 2022 at 10:04:52AM +0200, Krzysztof Kozlowski wrote:
> Certain pins, like SDcard related, do not have functions and such should
> not be required.
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---
>  .../bindings/pinctrl/qcom,qcm2290-pinctrl.yaml        | 11 ++++++++++-
>  1 file changed, 10 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/pinctrl/qcom,qcm2290-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/qcom,qcm2290-pinctrl.yaml
> index 5324b61eb4f7..89453cb60c12 100644
> --- a/Documentation/devicetree/bindings/pinctrl/qcom,qcm2290-pinctrl.yaml
> +++ b/Documentation/devicetree/bindings/pinctrl/qcom,qcm2290-pinctrl.yaml
> @@ -60,7 +60,6 @@ patternProperties:
>      description:
>        Pinctrl node's client devices use subnodes for desired pin configuration.
>        Client device subnodes use below standard properties.
> -    $ref: "qcom,tlmm-common.yaml#/$defs/qcom-tlmm-state"
>  
>      properties:
>        pins:
> @@ -116,6 +115,16 @@ patternProperties:
>      required:
>        - pins
>  
> +    allOf:
> +      - $ref: "qcom,tlmm-common.yaml#/$defs/qcom-tlmm-state"

You can drop the quotes here.

> +      - if:
> +          properties:
> +            pins:
> +              pattern: "^gpio([0-9]|[1-9][0-9]|1[0-1][0-9]|12[0-6])$"
> +        then:
> +          required:
> +            - function
> +
>      additionalProperties: false
>  
>  allOf:
> -- 
> 2.34.1
> 
> 

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

* Re: [PATCH 25/32] dt-bindings: pinctrl: qcom,qcm2290: do not require function on non-GPIOs
  2022-09-24  8:04 ` [PATCH 25/32] dt-bindings: pinctrl: qcom,qcm2290: do not require function on non-GPIOs Krzysztof Kozlowski
  2022-09-26 23:15   ` Rob Herring
@ 2022-09-26 23:15   ` Rob Herring
  2022-09-27 11:42   ` Dmitry Baryshkov
  2 siblings, 0 replies; 46+ messages in thread
From: Rob Herring @ 2022-09-26 23:15 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Krzysztof Kozlowski, Andy Gross, Bjorn Andersson, Konrad Dybcio,
	krishna Lanka, Stephan Gerhold, Linus Walleij, linux-kernel,
	linux-arm-msm, Sivaprakash Murugesan, linux-gpio, Rob Herring,
	Shawn Guo, devicetree, Vinod Koul, Sricharan R

On Sat, 24 Sep 2022 10:04:52 +0200, Krzysztof Kozlowski wrote:
> Certain pins, like SDcard related, do not have functions and such should
> not be required.
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---
>  .../bindings/pinctrl/qcom,qcm2290-pinctrl.yaml        | 11 ++++++++++-
>  1 file changed, 10 insertions(+), 1 deletion(-)
> 

Reviewed-by: Rob Herring <robh@kernel.org>

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

* Re: [PATCH 27/32] dt-bindings: pinctrl: qcom,sdx55: do not require function on non-GPIOs
  2022-09-24  8:04 ` [PATCH 27/32] dt-bindings: pinctrl: qcom,sdx55: do not require function on non-GPIOs Krzysztof Kozlowski
@ 2022-09-26 23:15   ` Rob Herring
  0 siblings, 0 replies; 46+ messages in thread
From: Rob Herring @ 2022-09-26 23:15 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Bjorn Andersson, Sricharan R, Stephan Gerhold, Andy Gross,
	Krzysztof Kozlowski, Shawn Guo, linux-gpio, devicetree,
	linux-arm-msm, Vinod Koul, linux-kernel, krishna Lanka,
	Linus Walleij, Konrad Dybcio, Rob Herring, Sivaprakash Murugesan

On Sat, 24 Sep 2022 10:04:54 +0200, Krzysztof Kozlowski wrote:
> Certain pins, like SDcard related, do not have functions and such should
> not be required.
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---
>  .../bindings/pinctrl/qcom,sdx55-pinctrl.yaml         | 12 ++++++++++--
>  1 file changed, 10 insertions(+), 2 deletions(-)
> 

Reviewed-by: Rob Herring <robh@kernel.org>

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

* Re: [PATCH 30/32] dt-bindings: pinctrl: qcom,sdx65: do not require function on non-GPIOs
  2022-09-24  8:04 ` [PATCH 30/32] dt-bindings: pinctrl: qcom,sdx65: do not require function on non-GPIOs Krzysztof Kozlowski
@ 2022-09-26 23:15   ` Rob Herring
  0 siblings, 0 replies; 46+ messages in thread
From: Rob Herring @ 2022-09-26 23:15 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Shawn Guo, Bjorn Andersson, Linus Walleij, Krzysztof Kozlowski,
	Konrad Dybcio, Rob Herring, devicetree, Sricharan R, Vinod Koul,
	linux-kernel, Andy Gross, krishna Lanka, Sivaprakash Murugesan,
	Stephan Gerhold, linux-arm-msm, linux-gpio

On Sat, 24 Sep 2022 10:04:57 +0200, Krzysztof Kozlowski wrote:
> Certain pins, like SDcard related, do not have functions and such should
> not be required.
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---
>  .../bindings/pinctrl/qcom,sdx65-pinctrl.yaml         | 12 ++++++++++--
>  1 file changed, 10 insertions(+), 2 deletions(-)
> 

Reviewed-by: Rob Herring <robh@kernel.org>

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

* Re: [PATCH 25/32] dt-bindings: pinctrl: qcom,qcm2290: do not require function on non-GPIOs
  2022-09-26 23:15   ` Rob Herring
@ 2022-09-27 11:38     ` Krzysztof Kozlowski
  0 siblings, 0 replies; 46+ messages in thread
From: Krzysztof Kozlowski @ 2022-09-27 11:38 UTC (permalink / raw)
  To: Rob Herring
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio, Linus Walleij,
	Krzysztof Kozlowski, Sricharan R, Stephan Gerhold, Shawn Guo,
	Vinod Koul, krishna Lanka, Sivaprakash Murugesan, linux-arm-msm,
	linux-gpio, devicetree, linux-kernel

On 27/09/2022 01:15, Rob Herring wrote:
>>      properties:
>>        pins:
>> @@ -116,6 +115,16 @@ patternProperties:
>>      required:
>>        - pins
>>  
>> +    allOf:
>> +      - $ref: "qcom,tlmm-common.yaml#/$defs/qcom-tlmm-state"
> 
> You can drop the quotes here.
> 

Ack.

Best regards,
Krzysztof


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

* Re: [PATCH 25/32] dt-bindings: pinctrl: qcom,qcm2290: do not require function on non-GPIOs
  2022-09-24  8:04 ` [PATCH 25/32] dt-bindings: pinctrl: qcom,qcm2290: do not require function on non-GPIOs Krzysztof Kozlowski
  2022-09-26 23:15   ` Rob Herring
  2022-09-26 23:15   ` Rob Herring
@ 2022-09-27 11:42   ` Dmitry Baryshkov
  2022-09-27 13:57     ` Krzysztof Kozlowski
  2 siblings, 1 reply; 46+ messages in thread
From: Dmitry Baryshkov @ 2022-09-27 11:42 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio, Linus Walleij,
	Rob Herring, Krzysztof Kozlowski, Sricharan R, Stephan Gerhold,
	Shawn Guo, Vinod Koul, krishna Lanka, Sivaprakash Murugesan,
	linux-arm-msm, linux-gpio, devicetree, linux-kernel

On Sat, 24 Sept 2022 at 11:07, Krzysztof Kozlowski
<krzysztof.kozlowski@linaro.org> wrote:
>
> Certain pins, like SDcard related, do not have functions and such should
> not be required.
>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---
>  .../bindings/pinctrl/qcom,qcm2290-pinctrl.yaml        | 11 ++++++++++-
>  1 file changed, 10 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/devicetree/bindings/pinctrl/qcom,qcm2290-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/qcom,qcm2290-pinctrl.yaml
> index 5324b61eb4f7..89453cb60c12 100644
> --- a/Documentation/devicetree/bindings/pinctrl/qcom,qcm2290-pinctrl.yaml
> +++ b/Documentation/devicetree/bindings/pinctrl/qcom,qcm2290-pinctrl.yaml
> @@ -60,7 +60,6 @@ patternProperties:
>      description:
>        Pinctrl node's client devices use subnodes for desired pin configuration.
>        Client device subnodes use below standard properties.
> -    $ref: "qcom,tlmm-common.yaml#/$defs/qcom-tlmm-state"
>
>      properties:
>        pins:
> @@ -116,6 +115,16 @@ patternProperties:
>      required:
>        - pins
>
> +    allOf:

Nit: I think you can drop allOf here and move the $ref up a few lines.

> +      - $ref: "qcom,tlmm-common.yaml#/$defs/qcom-tlmm-state"
> +      - if:
> +          properties:
> +            pins:
> +              pattern: "^gpio([0-9]|[1-9][0-9]|1[0-1][0-9]|12[0-6])$"
> +        then:
> +          required:
> +            - function
> +
>      additionalProperties: false
>
>  allOf:
> --
> 2.34.1
>


-- 
With best wishes
Dmitry

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

* Re: [PATCH 25/32] dt-bindings: pinctrl: qcom,qcm2290: do not require function on non-GPIOs
  2022-09-27 11:42   ` Dmitry Baryshkov
@ 2022-09-27 13:57     ` Krzysztof Kozlowski
  0 siblings, 0 replies; 46+ messages in thread
From: Krzysztof Kozlowski @ 2022-09-27 13:57 UTC (permalink / raw)
  To: Dmitry Baryshkov
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio, Linus Walleij,
	Rob Herring, Krzysztof Kozlowski, Sricharan R, Stephan Gerhold,
	Shawn Guo, Vinod Koul, krishna Lanka, Sivaprakash Murugesan,
	linux-arm-msm, linux-gpio, devicetree, linux-kernel

On 27/09/2022 13:42, Dmitry Baryshkov wrote:
> On Sat, 24 Sept 2022 at 11:07, Krzysztof Kozlowski
> <krzysztof.kozlowski@linaro.org> wrote:
>>
>> Certain pins, like SDcard related, do not have functions and such should
>> not be required.
>>
>> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>> ---
>>  .../bindings/pinctrl/qcom,qcm2290-pinctrl.yaml        | 11 ++++++++++-
>>  1 file changed, 10 insertions(+), 1 deletion(-)
>>
>> diff --git a/Documentation/devicetree/bindings/pinctrl/qcom,qcm2290-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/qcom,qcm2290-pinctrl.yaml
>> index 5324b61eb4f7..89453cb60c12 100644
>> --- a/Documentation/devicetree/bindings/pinctrl/qcom,qcm2290-pinctrl.yaml
>> +++ b/Documentation/devicetree/bindings/pinctrl/qcom,qcm2290-pinctrl.yaml
>> @@ -60,7 +60,6 @@ patternProperties:
>>      description:
>>        Pinctrl node's client devices use subnodes for desired pin configuration.
>>        Client device subnodes use below standard properties.
>> -    $ref: "qcom,tlmm-common.yaml#/$defs/qcom-tlmm-state"
>>
>>      properties:
>>        pins:
>> @@ -116,6 +115,16 @@ patternProperties:
>>      required:
>>        - pins
>>
>> +    allOf:
> 
> Nit: I think you can drop allOf here and move the $ref up a few lines.
> 

It's anyway different in v2 - there is no if:then.

Best regards,
Krzysztof


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

* Re: [PATCH 00/32] pinctrl/arm64: qcom: continued - fix Qualcomm TLMM pinctrl schema warnings
  2022-09-24  8:04 [PATCH 00/32] pinctrl/arm64: qcom: continued - fix Qualcomm TLMM pinctrl schema warnings Krzysztof Kozlowski
                   ` (31 preceding siblings ...)
  2022-09-24  8:04 ` [PATCH 32/32] dt-bindings: pinctrl: qcom,sc8280xp: fix indentation in example (remaining piece) Krzysztof Kozlowski
@ 2022-10-03 22:01 ` Linus Walleij
  32 siblings, 0 replies; 46+ messages in thread
From: Linus Walleij @ 2022-10-03 22:01 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, Sricharan R, Stephan Gerhold, Shawn Guo,
	Vinod Koul, krishna Lanka, Sivaprakash Murugesan, linux-arm-msm,
	linux-gpio, devicetree, linux-kernel

On Sat, Sep 24, 2022 at 10:05 AM Krzysztof Kozlowski
<krzysztof.kozlowski@linaro.org> wrote:

> This is the third patchset around Qualcomm pinctrl in recent days:
> 1. First round of TLMM fixes: merged
> 2. LPASS fixes: https://lore.kernel.org/linux-devicetree/20220922195651.345369-1-krzysztof.kozlowski@linaro.org/T/#t
> 3. Second round of TLMM fixes: THIS PATCHSET

Same thing with TLMM as LPASS! Stack up the bindings, send me pull
requests, because I trust you.

Yours,
Linus Walleij

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

end of thread, other threads:[~2022-10-03 22:02 UTC | newest]

Thread overview: 46+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-24  8:04 [PATCH 00/32] pinctrl/arm64: qcom: continued - fix Qualcomm TLMM pinctrl schema warnings Krzysztof Kozlowski
2022-09-24  8:04 ` [PATCH 01/32] arm64: dts: qcom: ipq6018-cp01-c1: correct blspi1 pins Krzysztof Kozlowski
2022-09-24  8:04 ` [PATCH 02/32] arm64: dts: qcom: ipq6018: align TLMM pin configuration with DT schema Krzysztof Kozlowski
2022-09-24  8:04 ` [PATCH 03/32] ARM: dts: qcom: sdx55: add gpio-ranges to TLMM pinctrl Krzysztof Kozlowski
2022-09-24  8:04 ` [PATCH 04/32] ARM: dts: qcom: sdx55: align TLMM pin configuration with DT schema Krzysztof Kozlowski
2022-09-24  8:04 ` [PATCH 05/32] ARM: dts: qcom: msm8226: " Krzysztof Kozlowski
2022-09-24  8:04 ` [PATCH 06/32] ARM: dts: qcom: msm8974: " Krzysztof Kozlowski
2022-09-24  8:04 ` [PATCH 07/32] dt-bindings: pinctrl: qcom,ipq6018: add qpic_pad function Krzysztof Kozlowski
2022-09-24  8:04 ` [PATCH 08/32] dt-bindings: pinctrl: qcom,ipq6018: increase number of pins in pinmux Krzysztof Kozlowski
2022-09-24  8:04 ` [PATCH 09/32] dt-bindings: pinctrl: qcom,ipq6018: fix matching pin config Krzysztof Kozlowski
2022-09-24  8:04 ` [PATCH 10/32] dt-bindings: pinctrl: qcom,ipq6018: do not require function on non-GPIOs Krzysztof Kozlowski
2022-09-26 23:13   ` Rob Herring
2022-09-24  8:04 ` [PATCH 11/32] dt-bindings: pinctrl: qcom,ipq6018: fix indentation in example Krzysztof Kozlowski
2022-09-24  8:04 ` [PATCH 12/32] dt-bindings: pinctrl: qcom,msm8226: fix matching pin config Krzysztof Kozlowski
2022-09-24  8:04 ` [PATCH 13/32] dt-bindings: pinctrl: qcom,msm8226: do not require function on non-GPIOs Krzysztof Kozlowski
2022-09-26 23:13   ` Rob Herring
2022-09-24  8:04 ` [PATCH 14/32] dt-bindings: pinctrl: qcom,msm8226: add functions and input-enable Krzysztof Kozlowski
2022-09-24  8:04 ` [PATCH 15/32] dt-bindings: pinctrl: qcom,msm8226: fix indentation in example Krzysztof Kozlowski
2022-09-24  8:04 ` [PATCH 16/32] dt-bindings: pinctrl: qcom,msm8909-tlmm: fix matching pin config Krzysztof Kozlowski
2022-09-24  8:04 ` [PATCH 17/32] dt-bindings: pinctrl: qcom,msm8909-tlmm: do not require function on non-GPIOs Krzysztof Kozlowski
2022-09-25 14:00   ` Stephan Gerhold
2022-09-26  6:48     ` Krzysztof Kozlowski
2022-09-24  8:04 ` [PATCH 18/32] dt-bindings: pinctrl: qcom,msm8909-tlmm: fix indentation in example Krzysztof Kozlowski
2022-09-24  8:04 ` [PATCH 19/32] dt-bindings: pinctrl: qcom,msm8953: fix matching pin config Krzysztof Kozlowski
2022-09-24  8:04 ` [PATCH 20/32] dt-bindings: pinctrl: qcom,msm8953: do not require function on non-GPIOs Krzysztof Kozlowski
2022-09-26 23:14   ` Rob Herring
2022-09-24  8:04 ` [PATCH 21/32] dt-bindings: pinctrl: qcom,msm8953: fix indentation in example Krzysztof Kozlowski
2022-09-24  8:04 ` [PATCH 22/32] dt-bindings: pinctrl: qcom,mdm9607: do not require function on non-GPIOs Krzysztof Kozlowski
2022-09-24  8:04 ` [PATCH 23/32] dt-bindings: pinctrl: qcom,mdm9607: fix indentation in example Krzysztof Kozlowski
2022-09-24  8:04 ` [PATCH 24/32] dt-bindings: pinctrl: qcom,qcm2290: fix matching pin config Krzysztof Kozlowski
2022-09-24  8:04 ` [PATCH 25/32] dt-bindings: pinctrl: qcom,qcm2290: do not require function on non-GPIOs Krzysztof Kozlowski
2022-09-26 23:15   ` Rob Herring
2022-09-27 11:38     ` Krzysztof Kozlowski
2022-09-26 23:15   ` Rob Herring
2022-09-27 11:42   ` Dmitry Baryshkov
2022-09-27 13:57     ` Krzysztof Kozlowski
2022-09-24  8:04 ` [PATCH 26/32] dt-bindings: pinctrl: qcom,sdx55: fix matching pin config Krzysztof Kozlowski
2022-09-24  8:04 ` [PATCH 27/32] dt-bindings: pinctrl: qcom,sdx55: do not require function on non-GPIOs Krzysztof Kozlowski
2022-09-26 23:15   ` Rob Herring
2022-09-24  8:04 ` [PATCH 28/32] dt-bindings: pinctrl: qcom,sdx55: fix indentation in example Krzysztof Kozlowski
2022-09-24  8:04 ` [PATCH 29/32] dt-bindings: pinctrl: qcom,sdx65: fix matching pin config Krzysztof Kozlowski
2022-09-24  8:04 ` [PATCH 30/32] dt-bindings: pinctrl: qcom,sdx65: do not require function on non-GPIOs Krzysztof Kozlowski
2022-09-26 23:15   ` Rob Herring
2022-09-24  8:04 ` [PATCH 31/32] dt-bindings: pinctrl: qcom,sc7280: fix matching pin config Krzysztof Kozlowski
2022-09-24  8:04 ` [PATCH 32/32] dt-bindings: pinctrl: qcom,sc8280xp: fix indentation in example (remaining piece) Krzysztof Kozlowski
2022-10-03 22:01 ` [PATCH 00/32] pinctrl/arm64: qcom: continued - fix Qualcomm TLMM pinctrl schema warnings Linus Walleij

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.