devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3] arm64: dts: ipq5018: Correct uart1_pins pinconf
@ 2023-09-01 14:10 Ziyang Huang
  2023-09-01 15:04 ` Bryan O'Donoghue
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Ziyang Huang @ 2023-09-01 14:10 UTC (permalink / raw)
  To: agross
  Cc: andersson, konrad.dybcio, robh+dt, krzysztof.kozlowski+dt,
	conor+dt, quic_gokulsri, quic_srichara, quic_varada,
	linux-arm-msm, devicetree, linux-kernel, Ziyang Huang

In pinctrl, the pinconfigs for uart are named "blspX_uartY".
  X is the UART ID. Starts from 1.
    1-6 are in BLSP Block 1.
    7-12 are in BLSP Block 2.
  Y is the index of mux config. Starts from 0.

In dts, the serials are also named "blspX_uartY", but with different logic.
  X is the BLSP Block ID. Starts from 1.
  Y is the uart id inside block.
    In "ipq6018.dtsi" and "ipq8074.dtsi", it starts from 1.
    But in "ipq5332.dtsi" and "ipq9574.dtsi", it starts from 0.

+-----------------+-----------------+-------------+-----------------+
|     Block ID    | ID inside Block |  dts name   | pinconfig name  |
| (Starts from 1) | (Starts from 1) |             |                 |
+-----------------+-----------------+-------------+-----------------+
|        1        |        1        | blsp1_uart1 |   blsp0_uartY   |
|        1        |        2        | blsp1_uart2 |   blsp1_uartY   |
|        1        |        6        | blsp1_uart6 |   blsp5_uartY   |
|        2        |        1        | blsp2_uart1 |   blsp6_uartY   |
|        2        |        6        | blsp2_uart6 |   blsp12_uartY  |
+-----------------+-----------------+-------------+-----------------+

In "ipq5018.dts", "blsp1_uart1" (dts name) is the first serial (confimed
by the address), So its pinconfig should be "blsp0_uart0" (pinconfig name,
use GPIO 20 and 21) or "blsp0_uart1" (pinconfig name, use GPIO 28 and 29).

Fixes: 570006756a16 ("arm64: dts: Add ipq5018 SoC and rdp432-c2 board support")
Signed-off-by: Ziyang Huang <hzyitc@outlook.com>
---
Changes since v1:
- Use corrent name in From

Changes since v2:
- Define 2 pinconfs for uart1 in ipq5018.dtsi
- rdp432-c2 use uart1_pins_a

 arch/arm64/boot/dts/qcom/ipq5018-rdp432-c2.dts |  2 +-
 arch/arm64/boot/dts/qcom/ipq5018.dtsi          | 15 +++++++++++----
 2 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/ipq5018-rdp432-c2.dts b/arch/arm64/boot/dts/qcom/ipq5018-rdp432-c2.dts
index e636a1cb9b77..e83d1863e89c 100644
--- a/arch/arm64/boot/dts/qcom/ipq5018-rdp432-c2.dts
+++ b/arch/arm64/boot/dts/qcom/ipq5018-rdp432-c2.dts
@@ -23,7 +23,7 @@ chosen {
 };
 
 &blsp1_uart1 {
-	pinctrl-0 = <&uart1_pins>;
+	pinctrl-0 = <&uart1_pins_a>;
 	pinctrl-names = "default";
 	status = "okay";
 };
diff --git a/arch/arm64/boot/dts/qcom/ipq5018.dtsi b/arch/arm64/boot/dts/qcom/ipq5018.dtsi
index 9f13d2dcdfd5..50b4a2bd6fd3 100644
--- a/arch/arm64/boot/dts/qcom/ipq5018.dtsi
+++ b/arch/arm64/boot/dts/qcom/ipq5018.dtsi
@@ -103,11 +103,18 @@ tlmm: pinctrl@1000000 {
 			interrupt-controller;
 			#interrupt-cells = <2>;
 
-			uart1_pins: uart1-state {
-				pins = "gpio31", "gpio32", "gpio33", "gpio34";
-				function = "blsp1_uart1";
+			uart1_pins_a: uart1@0 {
+				pins = "gpio20", "gpio21";
+				function = "blsp0_uart0";
 				drive-strength = <8>;
-				bias-pull-down;
+				bias-disabled;
+			};
+
+			uart1_pins_b: uart1@1 {
+				pins = "gpio28", "gpio29";
+				function = "blsp0_uart1";
+				drive-strength = <8>;
+				bias-disabled;
 			};
 		};
 
-- 
2.40.1


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

end of thread, other threads:[~2023-09-13  0:39 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-01 14:10 [PATCH v3] arm64: dts: ipq5018: Correct uart1_pins pinconf Ziyang Huang
2023-09-01 15:04 ` Bryan O'Donoghue
2023-09-03 13:02   ` Ziyang Huang
2023-09-04  0:57     ` Bryan O'Donoghue
2023-09-05 11:19       ` Sricharan Ramabadhran
2023-09-13  0:39       ` Ziyang Huang
2023-09-02 12:22 ` Konrad Dybcio
2023-09-03 13:11   ` Ziyang Huang
2023-09-03 17:15 ` Krzysztof Kozlowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).