devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/5] soc: qcom: Add uart console support for SM4450
@ 2023-09-20  6:54 Tengfei Fan
  2023-09-20  6:54 ` [PATCH v3 1/5] dt-bindings: interrupt-controller: qcom,pdc: document qcom,sm4450-pdc Tengfei Fan
                   ` (4 more replies)
  0 siblings, 5 replies; 13+ messages in thread
From: Tengfei Fan @ 2023-09-20  6:54 UTC (permalink / raw)
  To: agross, andersson, konrad.dybcio, tglx, maz, robh+dt,
	krzysztof.kozlowski+dt, conor+dt, catalin.marinas, will
  Cc: geert+renesas, arnd, neil.armstrong, nfraprado, rafal, peng.fan,
	linux-arm-msm, linux-kernel, devicetree, linux-arm-kernel,
	quic_tsoni, quic_shashim, quic_kaushalk, quic_tdas, quic_tingweiz,
	quic_aiquny, quic_ajipan, kernel, Tengfei Fan

This series add base description of UART, TLMM, RPMHCC, GCC and RPMh PD
nodes which helps SM4450 boot to shell with console on boards with this
SoC.

Signed-off-by: Tengfei Fan <quic_tengfan@quicinc.com>
---
This patch series depends on below patch series:
"[PATCH v2 0/4] clk: qcom: Add support for GCC and RPMHCC on SM4450"
https://lore.kernel.org/linux-arm-msm/20230909123431.1725728-1-quic_ajipan@quicinc.com/
"[PATCH v3 0/2] pinctl: qcom: Add SM4450 pinctrl driver"
https://lore.kernel.org/linux-arm-msm/20230920064739.12562-1-quic_tengfan@quicinc.com/

v2 -> v3:
  - fix dtbs_check warning
  - remove interconnect, iommu, scm and tcsr related code
  - rearrangement dt node
  - remove smmu, scm and tcsr related documentation update
  - enable CONFIG_SM_GCC_4450 in defconfig related patch

v1 -> v2:
  - setting "qcom,rpmh-rsc" compatible to the first property
  - keep order by unit address
  - move tlmm node into soc node
  - update arm,smmu.yaml
  - add enable pinctrl and interconnect defconfig patches
  - remove blank line
  - redo dtbs_check check

previous discussion here:
[1] v2: https://lore.kernel.org/linux-arm-msm/20230915021509.25773-1-quic_tengfan@quicinc.com
[2] v2: https://lore.kernel.org/linux-arm-msm/20230908065847.28382-1-quic_tengfan@quicinc.com

Ajit Pandey (1):
  arm64: dts: qcom: sm4450: Add apps_rsc and cmd_db node

Tengfei Fan (4):
  dt-bindings: interrupt-controller: qcom,pdc: document qcom,sm4450-pdc
  arm64: dts: qcom: sm4450: Add RPMH and Global clock
  arm64: dts: qcom: add uart console support for SM4450
  arm64: defconfig: enable clock controller and pinctrl for SM4450

 .../interrupt-controller/qcom,pdc.yaml        |   1 +
 arch/arm64/boot/dts/qcom/sm4450-qrd.dts       |  18 ++-
 arch/arm64/boot/dts/qcom/sm4450.dtsi          | 106 ++++++++++++++++++
 arch/arm64/configs/defconfig                  |   2 +
 4 files changed, 125 insertions(+), 2 deletions(-)


base-commit: dfa449a58323de195773cf928d99db4130702bf7
-- 
2.17.1


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

* [PATCH v3 1/5] dt-bindings: interrupt-controller: qcom,pdc: document qcom,sm4450-pdc
  2023-09-20  6:54 [PATCH v3 0/5] soc: qcom: Add uart console support for SM4450 Tengfei Fan
@ 2023-09-20  6:54 ` Tengfei Fan
  2023-09-20  6:54 ` [PATCH v3 2/5] arm64: dts: qcom: sm4450: Add apps_rsc and cmd_db node Tengfei Fan
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 13+ messages in thread
From: Tengfei Fan @ 2023-09-20  6:54 UTC (permalink / raw)
  To: agross, andersson, konrad.dybcio, tglx, maz, robh+dt,
	krzysztof.kozlowski+dt, conor+dt, catalin.marinas, will
  Cc: geert+renesas, arnd, neil.armstrong, nfraprado, rafal, peng.fan,
	linux-arm-msm, linux-kernel, devicetree, linux-arm-kernel,
	quic_tsoni, quic_shashim, quic_kaushalk, quic_tdas, quic_tingweiz,
	quic_aiquny, quic_ajipan, kernel, Tengfei Fan

Add SM4450 PDC, which will used in SM4450 DTS.

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Tengfei Fan <quic_tengfan@quicinc.com>
---
 .../devicetree/bindings/interrupt-controller/qcom,pdc.yaml       | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/interrupt-controller/qcom,pdc.yaml b/Documentation/devicetree/bindings/interrupt-controller/qcom,pdc.yaml
index 4847b04be1a1..86d61896f591 100644
--- a/Documentation/devicetree/bindings/interrupt-controller/qcom,pdc.yaml
+++ b/Documentation/devicetree/bindings/interrupt-controller/qcom,pdc.yaml
@@ -35,6 +35,7 @@ properties:
           - qcom,sdm845-pdc
           - qcom,sdx55-pdc
           - qcom,sdx65-pdc
+          - qcom,sm4450-pdc
           - qcom,sm6350-pdc
           - qcom,sm8150-pdc
           - qcom,sm8250-pdc
-- 
2.17.1


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

* [PATCH v3 2/5] arm64: dts: qcom: sm4450: Add apps_rsc and cmd_db node
  2023-09-20  6:54 [PATCH v3 0/5] soc: qcom: Add uart console support for SM4450 Tengfei Fan
  2023-09-20  6:54 ` [PATCH v3 1/5] dt-bindings: interrupt-controller: qcom,pdc: document qcom,sm4450-pdc Tengfei Fan
@ 2023-09-20  6:54 ` Tengfei Fan
  2023-09-20 10:14   ` Konrad Dybcio
  2023-09-20  6:54 ` [PATCH v3 3/5] arm64: dts: qcom: sm4450: Add RPMH and Global clock Tengfei Fan
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 13+ messages in thread
From: Tengfei Fan @ 2023-09-20  6:54 UTC (permalink / raw)
  To: agross, andersson, konrad.dybcio, tglx, maz, robh+dt,
	krzysztof.kozlowski+dt, conor+dt, catalin.marinas, will
  Cc: geert+renesas, arnd, neil.armstrong, nfraprado, rafal, peng.fan,
	linux-arm-msm, linux-kernel, devicetree, linux-arm-kernel,
	quic_tsoni, quic_shashim, quic_kaushalk, quic_tdas, quic_tingweiz,
	quic_aiquny, quic_ajipan, kernel, Tengfei Fan

From: Ajit Pandey <quic_ajipan@quicinc.com>

Add apps_rsc node and cmd_db memory region for sm4450.

Signed-off-by: Ajit Pandey <quic_ajipan@quicinc.com>
Signed-off-by: Tengfei Fan <quic_tengfan@quicinc.com>
---
 arch/arm64/boot/dts/qcom/sm4450.dtsi | 35 ++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sm4450.dtsi b/arch/arm64/boot/dts/qcom/sm4450.dtsi
index c4e5b33f5169..3d9d3b5e9510 100644
--- a/arch/arm64/boot/dts/qcom/sm4450.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm4450.dtsi
@@ -5,6 +5,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/soc/qcom,rpmh-rsc.h>
 
 / {
 	interrupt-parent = <&intc>;
@@ -328,6 +329,18 @@
 		};
 	};
 
+	reserved_memory: reserved-memory {
+		#address-cells = <2>;
+		#size-cells = <2>;
+		ranges;
+
+		aop_cmd_db_mem: cmd-db@80860000 {
+			compatible = "qcom,cmd-db";
+			reg = <0x0 0x80860000 0x0 0x20000>;
+			no-map;
+		};
+	};
+
 	soc: soc@0 {
 		#address-cells = <2>;
 		#size-cells = <2>;
@@ -419,6 +432,28 @@
 				status = "disabled";
 			};
 		};
+
+		apps_rsc: rsc@17a00000 {
+			compatible = "qcom,rpmh-rsc";
+			reg = <0 0x17a00000 0 0x10000>,
+			      <0 0x17a10000 0 0x10000>,
+			      <0 0x17a20000 0 0x10000>;
+			reg-names = "drv-0", "drv-1", "drv-2";
+			interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>;
+			label = "apps_rsc";
+			qcom,tcs-offset = <0xd00>;
+			qcom,drv-id = <2>;
+			qcom,tcs-config = <ACTIVE_TCS    2>, <SLEEP_TCS     3>,
+					  <WAKE_TCS      3>, <CONTROL_TCS   0>;
+			power-domains = <&CLUSTER_PD>;
+
+			apps_bcm_voter: bcm-voter {
+				compatible = "qcom,bcm-voter";
+			};
+		};
+
 	};
 
 	timer {
-- 
2.17.1


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

* [PATCH v3 3/5] arm64: dts: qcom: sm4450: Add RPMH and Global clock
  2023-09-20  6:54 [PATCH v3 0/5] soc: qcom: Add uart console support for SM4450 Tengfei Fan
  2023-09-20  6:54 ` [PATCH v3 1/5] dt-bindings: interrupt-controller: qcom,pdc: document qcom,sm4450-pdc Tengfei Fan
  2023-09-20  6:54 ` [PATCH v3 2/5] arm64: dts: qcom: sm4450: Add apps_rsc and cmd_db node Tengfei Fan
@ 2023-09-20  6:54 ` Tengfei Fan
  2023-09-20 10:00   ` Konrad Dybcio
  2023-09-20  6:54 ` [PATCH v3 4/5] arm64: dts: qcom: add uart console support for SM4450 Tengfei Fan
  2023-09-20  6:54 ` [PATCH v3 5/5] arm64: defconfig: enable clock controller and pinctrl " Tengfei Fan
  4 siblings, 1 reply; 13+ messages in thread
From: Tengfei Fan @ 2023-09-20  6:54 UTC (permalink / raw)
  To: agross, andersson, konrad.dybcio, tglx, maz, robh+dt,
	krzysztof.kozlowski+dt, conor+dt, catalin.marinas, will
  Cc: geert+renesas, arnd, neil.armstrong, nfraprado, rafal, peng.fan,
	linux-arm-msm, linux-kernel, devicetree, linux-arm-kernel,
	quic_tsoni, quic_shashim, quic_kaushalk, quic_tdas, quic_tingweiz,
	quic_aiquny, quic_ajipan, kernel, Tengfei Fan

Add device node for RPMH and Global clock controller on Qualcomm
SM4450 platform.

Signed-off-by: Ajit Pandey <quic_ajipan@quicinc.com>
Signed-off-by: Tengfei Fan <quic_tengfan@quicinc.com>
---
 arch/arm64/boot/dts/qcom/sm4450.dtsi | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sm4450.dtsi b/arch/arm64/boot/dts/qcom/sm4450.dtsi
index 3d9d3b5e9510..c27f17a41699 100644
--- a/arch/arm64/boot/dts/qcom/sm4450.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm4450.dtsi
@@ -3,6 +3,8 @@
  * Copyright (c) 2023, Qualcomm Innovation Center, Inc. All rights reserved.
  */
 
+#include <dt-bindings/clock/qcom,rpmh.h>
+#include <dt-bindings/clock/qcom,sm4450-gcc.h>
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/interrupt-controller/arm-gic.h>
 #include <dt-bindings/soc/qcom,rpmh-rsc.h>
@@ -348,6 +350,20 @@
 		dma-ranges = <0 0 0 0 0x10 0>;
 		compatible = "simple-bus";
 
+		gcc: clock-controller@100000 {
+			compatible = "qcom,sm4450-gcc";
+			reg = <0x0 0x00100000 0x0 0x1f4200>;
+			#clock-cells = <1>;
+			#reset-cells = <1>;
+			#power-domain-cells = <1>;
+			clocks = <&rpmhcc RPMH_CXO_CLK>,
+				 <&sleep_clk>,
+				 <0>,
+				 <0>,
+				 <0>,
+				 <0>;
+		};
+
 		tcsr_mutex: hwlock@1f40000 {
 			compatible = "qcom,tcsr-mutex";
 			reg = <0x0 0x01f40000 0x0 0x40000>;
@@ -452,6 +468,13 @@
 			apps_bcm_voter: bcm-voter {
 				compatible = "qcom,bcm-voter";
 			};
+
+			rpmhcc: clock-controller {
+				compatible = "qcom,sm4450-rpmh-clk";
+				#clock-cells = <1>;
+				clock-names = "xo";
+				clocks = <&xo_board>;
+			};
 		};
 
 	};
-- 
2.17.1


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

* [PATCH v3 4/5] arm64: dts: qcom: add uart console support for SM4450
  2023-09-20  6:54 [PATCH v3 0/5] soc: qcom: Add uart console support for SM4450 Tengfei Fan
                   ` (2 preceding siblings ...)
  2023-09-20  6:54 ` [PATCH v3 3/5] arm64: dts: qcom: sm4450: Add RPMH and Global clock Tengfei Fan
@ 2023-09-20  6:54 ` Tengfei Fan
  2023-09-20 10:03   ` Konrad Dybcio
  2023-09-20  6:54 ` [PATCH v3 5/5] arm64: defconfig: enable clock controller and pinctrl " Tengfei Fan
  4 siblings, 1 reply; 13+ messages in thread
From: Tengfei Fan @ 2023-09-20  6:54 UTC (permalink / raw)
  To: agross, andersson, konrad.dybcio, tglx, maz, robh+dt,
	krzysztof.kozlowski+dt, conor+dt, catalin.marinas, will
  Cc: geert+renesas, arnd, neil.armstrong, nfraprado, rafal, peng.fan,
	linux-arm-msm, linux-kernel, devicetree, linux-arm-kernel,
	quic_tsoni, quic_shashim, quic_kaushalk, quic_tdas, quic_tingweiz,
	quic_aiquny, quic_ajipan, kernel, Tengfei Fan

Add base description of UART and TLMM nodes which helps SM4450
boot to shell with console on boards with this SoC.

Signed-off-by: Tengfei Fan <quic_tengfan@quicinc.com>
---
 arch/arm64/boot/dts/qcom/sm4450-qrd.dts | 18 ++++++++-
 arch/arm64/boot/dts/qcom/sm4450.dtsi    | 50 ++++++++++++++++++++++++-
 2 files changed, 65 insertions(+), 3 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/sm4450-qrd.dts b/arch/arm64/boot/dts/qcom/sm4450-qrd.dts
index 00a1c81ca397..0f253a2ba170 100644
--- a/arch/arm64/boot/dts/qcom/sm4450-qrd.dts
+++ b/arch/arm64/boot/dts/qcom/sm4450-qrd.dts
@@ -10,9 +10,23 @@
 	model = "Qualcomm Technologies, Inc. SM4450 QRD";
 	compatible = "qcom,sm4450-qrd", "qcom,sm4450";
 
-	aliases { };
+	aliases {
+		serial0 = &uart7;
+	};
 
 	chosen {
-		bootargs = "console=hvc0";
+		stdout-path = "serial0:115200n8";
 	};
 };
+
+&qupv3_id_0 {
+	status = "okay";
+};
+
+&tlmm {
+	gpio-reserved-ranges = <0 4>, <136 1>;
+};
+
+&uart7 {
+	status = "okay";
+};
diff --git a/arch/arm64/boot/dts/qcom/sm4450.dtsi b/arch/arm64/boot/dts/qcom/sm4450.dtsi
index c27f17a41699..727d6f7cf220 100644
--- a/arch/arm64/boot/dts/qcom/sm4450.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm4450.dtsi
@@ -364,6 +364,29 @@
 				 <0>;
 		};
 
+		qupv3_id_0: geniqup@ac0000 {
+			compatible = "qcom,geni-se-qup";
+			reg = <0x0 0x00ac0000 0x0 0x2000>;
+			ranges;
+			clock-names = "m-ahb", "s-ahb";
+			clocks = <&gcc GCC_QUPV3_WRAP_0_M_AHB_CLK>,
+				 <&gcc GCC_QUPV3_WRAP_0_S_AHB_CLK>;
+			#address-cells = <2>;
+			#size-cells = <2>;
+			status = "disabled";
+
+			uart7: serial@a88000 {
+				compatible = "qcom,geni-debug-uart";
+				reg = <0 0x00a88000 0 0x4000>;
+				clock-names = "se";
+				clocks = <&gcc GCC_QUPV3_WRAP1_S2_CLK>;
+				interrupts = <GIC_SPI 355 IRQ_TYPE_LEVEL_HIGH>;
+				pinctrl-names = "default";
+				pinctrl-0 = <&qup_uart7_tx>, <&qup_uart7_rx>;
+				status = "disabled";
+			};
+		};
+
 		tcsr_mutex: hwlock@1f40000 {
 			compatible = "qcom,tcsr-mutex";
 			reg = <0x0 0x01f40000 0x0 0x40000>;
@@ -380,6 +403,32 @@
 			interrupt-controller;
 		};
 
+		tlmm: pinctrl@f100000 {
+			compatible = "qcom,sm4450-tlmm";
+			reg = <0 0x0f100000 0 0x300000>;
+			interrupts = <GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH>;
+			gpio-controller;
+			#gpio-cells = <2>;
+			interrupt-controller;
+			#interrupt-cells = <2>;
+			gpio-ranges = <&tlmm 0 0 137>;
+			wakeup-parent = <&pdc>;
+
+			qup_uart7_rx: qup-uart7-rx-state {
+				pins = "gpio23";
+				function = "qup1_se2_l2";
+				drive-strength = <2>;
+				bias-disable;
+			};
+
+			qup_uart7_tx: qup-uart7-tx-state {
+				pins = "gpio22";
+				function = "qup1_se2_l2";
+				drive-strength = <2>;
+				bias-disable;
+			};
+		};
+
 		intc: interrupt-controller@17200000 {
 			compatible = "arm,gic-v3";
 			reg = <0x0 0x17200000 0x0 0x10000>,     /* GICD */
@@ -476,7 +525,6 @@
 				clocks = <&xo_board>;
 			};
 		};
-
 	};
 
 	timer {
-- 
2.17.1


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

* [PATCH v3 5/5] arm64: defconfig: enable clock controller and pinctrl for SM4450
  2023-09-20  6:54 [PATCH v3 0/5] soc: qcom: Add uart console support for SM4450 Tengfei Fan
                   ` (3 preceding siblings ...)
  2023-09-20  6:54 ` [PATCH v3 4/5] arm64: dts: qcom: add uart console support for SM4450 Tengfei Fan
@ 2023-09-20  6:54 ` Tengfei Fan
  4 siblings, 0 replies; 13+ messages in thread
From: Tengfei Fan @ 2023-09-20  6:54 UTC (permalink / raw)
  To: agross, andersson, konrad.dybcio, tglx, maz, robh+dt,
	krzysztof.kozlowski+dt, conor+dt, catalin.marinas, will
  Cc: geert+renesas, arnd, neil.armstrong, nfraprado, rafal, peng.fan,
	linux-arm-msm, linux-kernel, devicetree, linux-arm-kernel,
	quic_tsoni, quic_shashim, quic_kaushalk, quic_tdas, quic_tingweiz,
	quic_aiquny, quic_ajipan, kernel, Tengfei Fan

Enable global clock controller and pinctrl for support the Qualcomm
SM4450 platform to boot to UART console.

The serial engine depends on some global clock controller and pinctrl, but
as the serial console driver is only available as built-in, so the global
clock controller and pinctrl also needs be built-in for the UART device to
probe and register the console.

Signed-off-by: Tengfei Fan <quic_tengfan@quicinc.com>
---
 arch/arm64/configs/defconfig | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
index 77c63c24b3a0..5bc9e9e94cf6 100644
--- a/arch/arm64/configs/defconfig
+++ b/arch/arm64/configs/defconfig
@@ -598,6 +598,7 @@ CONFIG_PINCTRL_SC8280XP=y
 CONFIG_PINCTRL_SDM660=y
 CONFIG_PINCTRL_SDM670=y
 CONFIG_PINCTRL_SDM845=y
+CONFIG_PINCTRL_SM4450=y
 CONFIG_PINCTRL_SM6115=y
 CONFIG_PINCTRL_SM6125=y
 CONFIG_PINCTRL_SM6350=y
@@ -1242,6 +1243,7 @@ CONFIG_SM_DISPCC_6115=m
 CONFIG_SM_DISPCC_8250=y
 CONFIG_SM_DISPCC_8450=m
 CONFIG_SM_DISPCC_8550=m
+CONFIG_SM_GCC_4450=y
 CONFIG_SM_GCC_6115=y
 CONFIG_SM_GCC_8350=y
 CONFIG_SM_GCC_8450=y
-- 
2.17.1


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

* Re: [PATCH v3 3/5] arm64: dts: qcom: sm4450: Add RPMH and Global clock
  2023-09-20  6:54 ` [PATCH v3 3/5] arm64: dts: qcom: sm4450: Add RPMH and Global clock Tengfei Fan
@ 2023-09-20 10:00   ` Konrad Dybcio
  2023-09-22  1:27     ` Tengfei Fan
  2023-09-22  5:51     ` Tengfei Fan
  0 siblings, 2 replies; 13+ messages in thread
From: Konrad Dybcio @ 2023-09-20 10:00 UTC (permalink / raw)
  To: Tengfei Fan, agross, andersson, tglx, maz, robh+dt,
	krzysztof.kozlowski+dt, conor+dt, catalin.marinas, will
  Cc: geert+renesas, arnd, neil.armstrong, nfraprado, rafal, peng.fan,
	linux-arm-msm, linux-kernel, devicetree, linux-arm-kernel,
	quic_tsoni, quic_shashim, quic_kaushalk, quic_tdas, quic_tingweiz,
	quic_aiquny, quic_ajipan, kernel



On 9/20/23 08:54, Tengfei Fan wrote:
> Add device node for RPMH and Global clock controller on Qualcomm
> SM4450 platform.
> 
> Signed-off-by: Ajit Pandey <quic_ajipan@quicinc.com>
> Signed-off-by: Tengfei Fan <quic_tengfan@quicinc.com>
> ---
>   arch/arm64/boot/dts/qcom/sm4450.dtsi | 23 +++++++++++++++++++++++
>   1 file changed, 23 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sm4450.dtsi b/arch/arm64/boot/dts/qcom/sm4450.dtsi
> index 3d9d3b5e9510..c27f17a41699 100644
> --- a/arch/arm64/boot/dts/qcom/sm4450.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sm4450.dtsi
> @@ -3,6 +3,8 @@
>    * Copyright (c) 2023, Qualcomm Innovation Center, Inc. All rights reserved.
>    */
>   
> +#include <dt-bindings/clock/qcom,rpmh.h>
> +#include <dt-bindings/clock/qcom,sm4450-gcc.h>
These should be sorted alphabetically.

[...]

> +			rpmhcc: clock-controller {
> +				compatible = "qcom,sm4450-rpmh-clk";
> +				#clock-cells = <1>;
> +				clock-names = "xo";
> +				clocks = <&xo_board>;
property
property-names

Konrad

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

* Re: [PATCH v3 4/5] arm64: dts: qcom: add uart console support for SM4450
  2023-09-20  6:54 ` [PATCH v3 4/5] arm64: dts: qcom: add uart console support for SM4450 Tengfei Fan
@ 2023-09-20 10:03   ` Konrad Dybcio
  2023-09-22  2:36     ` Tengfei Fan
  0 siblings, 1 reply; 13+ messages in thread
From: Konrad Dybcio @ 2023-09-20 10:03 UTC (permalink / raw)
  To: Tengfei Fan, agross, andersson, tglx, maz, robh+dt,
	krzysztof.kozlowski+dt, conor+dt, catalin.marinas, will
  Cc: geert+renesas, arnd, neil.armstrong, nfraprado, rafal, peng.fan,
	linux-arm-msm, linux-kernel, devicetree, linux-arm-kernel,
	quic_tsoni, quic_shashim, quic_kaushalk, quic_tdas, quic_tingweiz,
	quic_aiquny, quic_ajipan, kernel



On 9/20/23 08:54, Tengfei Fan wrote:
> Add base description of UART and TLMM nodes which helps SM4450
> boot to shell with console on boards with this SoC.
> 
> Signed-off-by: Tengfei Fan <quic_tengfan@quicinc.com>
> ---
The SoC change must be separate from the board change.

[...]

Please leave a comment explaining what these GPIOs are
used for.
> +&tlmm {
> +	gpio-reserved-ranges = <0 4>, <136 1>;
> +};

[...]

> +		qupv3_id_0: geniqup@ac0000 {
> +			compatible = "qcom,geni-se-qup";
> +			reg = <0x0 0x00ac0000 0x0 0x2000>;
> +			ranges;
> +			clock-names = "m-ahb", "s-ahb";
> +			clocks = <&gcc GCC_QUPV3_WRAP_0_M_AHB_CLK>,
> +				 <&gcc GCC_QUPV3_WRAP_0_S_AHB_CLK>;
property
property-names

[...]

> +
> +			uart7: serial@a88000 {
> +				compatible = "qcom,geni-debug-uart";
> +				reg = <0 0x00a88000 0 0x4000>;
Use 0x0 consistently.

> +				clock-names = "se";
> +				clocks = <&gcc GCC_QUPV3_WRAP1_S2_CLK>;
property
property-names

> +				interrupts = <GIC_SPI 355 IRQ_TYPE_LEVEL_HIGH>;
> +				pinctrl-names = "default";
> +				pinctrl-0 = <&qup_uart7_tx>, <&qup_uart7_rx>;
ditto

[...]

> +			compatible = "qcom,sm4450-tlmm";
> +			reg = <0 0x0f100000 0 0x300000>;
Use 0x0 consistently

> +			interrupts = <GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH>;
> +			gpio-controller;
> +			#gpio-cells = <2>;
> +			interrupt-controller;
> +			#interrupt-cells = <2>;
> +			gpio-ranges = <&tlmm 0 0 137>;
> +			wakeup-parent = <&pdc>;
> +
> +			qup_uart7_rx: qup-uart7-rx-state {
> +				pins = "gpio23";
> +				function = "qup1_se2_l2";
> +				drive-strength = <2>;
> +				bias-disable;
> +			};
> +
> +			qup_uart7_tx: qup-uart7-tx-state {
> +				pins = "gpio22";
> +				function = "qup1_se2_l2";
> +				drive-strength = <2>;
> +				bias-disable;
> +			};
> +		};
> +
>   		intc: interrupt-controller@17200000 {
>   			compatible = "arm,gic-v3";
>   			reg = <0x0 0x17200000 0x0 0x10000>,     /* GICD */
> @@ -476,7 +525,6 @@
>   				clocks = <&xo_board>;
>   			};
>   		};
> -
Totally unrelated change, fix the patch introducing it instead.

Konrad

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

* Re: [PATCH v3 2/5] arm64: dts: qcom: sm4450: Add apps_rsc and cmd_db node
  2023-09-20  6:54 ` [PATCH v3 2/5] arm64: dts: qcom: sm4450: Add apps_rsc and cmd_db node Tengfei Fan
@ 2023-09-20 10:14   ` Konrad Dybcio
  2023-09-22  1:24     ` Tengfei Fan
  0 siblings, 1 reply; 13+ messages in thread
From: Konrad Dybcio @ 2023-09-20 10:14 UTC (permalink / raw)
  To: Tengfei Fan, agross, andersson, tglx, maz, robh+dt,
	krzysztof.kozlowski+dt, conor+dt, catalin.marinas, will
  Cc: geert+renesas, arnd, neil.armstrong, nfraprado, rafal, peng.fan,
	linux-arm-msm, linux-kernel, devicetree, linux-arm-kernel,
	quic_tsoni, quic_shashim, quic_kaushalk, quic_tdas, quic_tingweiz,
	quic_aiquny, quic_ajipan, kernel



On 9/20/23 08:54, Tengfei Fan wrote:
> From: Ajit Pandey <quic_ajipan@quicinc.com>
> 
> Add apps_rsc node and cmd_db memory region for sm4450.
> 
> Signed-off-by: Ajit Pandey <quic_ajipan@quicinc.com>
> Signed-off-by: Tengfei Fan <quic_tengfan@quicinc.com>
> ---
>   arch/arm64/boot/dts/qcom/sm4450.dtsi | 35 ++++++++++++++++++++++++++++
>   1 file changed, 35 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sm4450.dtsi b/arch/arm64/boot/dts/qcom/sm4450.dtsi
> index c4e5b33f5169..3d9d3b5e9510 100644
> --- a/arch/arm64/boot/dts/qcom/sm4450.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sm4450.dtsi
> @@ -5,6 +5,7 @@
>   
>   #include <dt-bindings/gpio/gpio.h>
>   #include <dt-bindings/interrupt-controller/arm-gic.h>
> +#include <dt-bindings/soc/qcom,rpmh-rsc.h>
>   
>   / {
>   	interrupt-parent = <&intc>;
> @@ -328,6 +329,18 @@
>   		};
>   	};
>   
> +	reserved_memory: reserved-memory {
> +		#address-cells = <2>;
> +		#size-cells = <2>;
> +		ranges;
> +
> +		aop_cmd_db_mem: cmd-db@80860000 {
> +			compatible = "qcom,cmd-db";
> +			reg = <0x0 0x80860000 0x0 0x20000>;
> +			no-map;
> +		};
> +	};
> +
>   	soc: soc@0 {
>   		#address-cells = <2>;
>   		#size-cells = <2>;
> @@ -419,6 +432,28 @@
>   				status = "disabled";
>   			};
>   		};
> +
> +		apps_rsc: rsc@17a00000 {
> +			compatible = "qcom,rpmh-rsc";
> +			reg = <0 0x17a00000 0 0x10000>,
> +			      <0 0x17a10000 0 0x10000>,
> +			      <0 0x17a20000 0 0x10000>;
0x0 for consistency

> +			reg-names = "drv-0", "drv-1", "drv-2";
> +			interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>,
> +				     <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>,
> +				     <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>;
> +			label = "apps_rsc";
> +			qcom,tcs-offset = <0xd00>;
> +			qcom,drv-id = <2>;
> +			qcom,tcs-config = <ACTIVE_TCS    2>, <SLEEP_TCS     3>,
> +					  <WAKE_TCS      3>, <CONTROL_TCS   0>;
You haven't addressed Bjorn's comment about the number of
CONTROL_TCSes, are you sure 0 is correct?

Konrad

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

* Re: [PATCH v3 2/5] arm64: dts: qcom: sm4450: Add apps_rsc and cmd_db node
  2023-09-20 10:14   ` Konrad Dybcio
@ 2023-09-22  1:24     ` Tengfei Fan
  0 siblings, 0 replies; 13+ messages in thread
From: Tengfei Fan @ 2023-09-22  1:24 UTC (permalink / raw)
  To: Konrad Dybcio, agross, andersson, tglx, maz, robh+dt,
	krzysztof.kozlowski+dt, conor+dt, catalin.marinas, will
  Cc: geert+renesas, arnd, neil.armstrong, nfraprado, rafal, peng.fan,
	linux-arm-msm, linux-kernel, devicetree, linux-arm-kernel,
	quic_tsoni, quic_shashim, quic_kaushalk, quic_tdas, quic_tingweiz,
	quic_aiquny, quic_ajipan, kernel



在 9/20/2023 6:14 PM, Konrad Dybcio 写道:
> 
> 
> On 9/20/23 08:54, Tengfei Fan wrote:
>> From: Ajit Pandey <quic_ajipan@quicinc.com>
>>
>> Add apps_rsc node and cmd_db memory region for sm4450.
>>
>> Signed-off-by: Ajit Pandey <quic_ajipan@quicinc.com>
>> Signed-off-by: Tengfei Fan <quic_tengfan@quicinc.com>
>> ---
>>   arch/arm64/boot/dts/qcom/sm4450.dtsi | 35 ++++++++++++++++++++++++++++
>>   1 file changed, 35 insertions(+)
>>
>> diff --git a/arch/arm64/boot/dts/qcom/sm4450.dtsi 
>> b/arch/arm64/boot/dts/qcom/sm4450.dtsi
>> index c4e5b33f5169..3d9d3b5e9510 100644
>> --- a/arch/arm64/boot/dts/qcom/sm4450.dtsi
>> +++ b/arch/arm64/boot/dts/qcom/sm4450.dtsi
>> @@ -5,6 +5,7 @@
>>   #include <dt-bindings/gpio/gpio.h>
>>   #include <dt-bindings/interrupt-controller/arm-gic.h>
>> +#include <dt-bindings/soc/qcom,rpmh-rsc.h>
>>   / {
>>       interrupt-parent = <&intc>;
>> @@ -328,6 +329,18 @@
>>           };
>>       };
>> +    reserved_memory: reserved-memory {
>> +        #address-cells = <2>;
>> +        #size-cells = <2>;
>> +        ranges;
>> +
>> +        aop_cmd_db_mem: cmd-db@80860000 {
>> +            compatible = "qcom,cmd-db";
>> +            reg = <0x0 0x80860000 0x0 0x20000>;
>> +            no-map;
>> +        };
>> +    };
>> +
>>       soc: soc@0 {
>>           #address-cells = <2>;
>>           #size-cells = <2>;
>> @@ -419,6 +432,28 @@
>>                   status = "disabled";
>>               };
>>           };
>> +
>> +        apps_rsc: rsc@17a00000 {
>> +            compatible = "qcom,rpmh-rsc";
>> +            reg = <0 0x17a00000 0 0x10000>,
>> +                  <0 0x17a10000 0 0x10000>,
>> +                  <0 0x17a20000 0 0x10000>;
> 0x0 for consistency
Hi Konrad,
Yes, I will update "0" to "0x0" for consistency.
> 
>> +            reg-names = "drv-0", "drv-1", "drv-2";
>> +            interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>,
>> +                     <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>,
>> +                     <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>;
>> +            label = "apps_rsc";
>> +            qcom,tcs-offset = <0xd00>;
>> +            qcom,drv-id = <2>;
>> +            qcom,tcs-config = <ACTIVE_TCS    2>, <SLEEP_TCS     3>,
>> +                      <WAKE_TCS      3>, <CONTROL_TCS   0>;
> You haven't addressed Bjorn's comment about the number of
> CONTROL_TCSes, are you sure 0 is correct?
> 
> Konrad
I got confirm from internal power team, setting CONTROL_TCS with 0 is 
correct.


-- 
Thx and BRs,
Tengfei Fan

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

* Re: [PATCH v3 3/5] arm64: dts: qcom: sm4450: Add RPMH and Global clock
  2023-09-20 10:00   ` Konrad Dybcio
@ 2023-09-22  1:27     ` Tengfei Fan
  2023-09-22  5:51     ` Tengfei Fan
  1 sibling, 0 replies; 13+ messages in thread
From: Tengfei Fan @ 2023-09-22  1:27 UTC (permalink / raw)
  To: Konrad Dybcio, agross, andersson, tglx, maz, robh+dt,
	krzysztof.kozlowski+dt, conor+dt, catalin.marinas, will
  Cc: geert+renesas, arnd, neil.armstrong, nfraprado, rafal, peng.fan,
	linux-arm-msm, linux-kernel, devicetree, linux-arm-kernel,
	quic_tsoni, quic_shashim, quic_kaushalk, quic_tdas, quic_tingweiz,
	quic_aiquny, quic_ajipan, kernel



在 9/20/2023 6:00 PM, Konrad Dybcio 写道:
> 
> 
> On 9/20/23 08:54, Tengfei Fan wrote:
>> Add device node for RPMH and Global clock controller on Qualcomm
>> SM4450 platform.
>>
>> Signed-off-by: Ajit Pandey <quic_ajipan@quicinc.com>
>> Signed-off-by: Tengfei Fan <quic_tengfan@quicinc.com>
>> ---
>>   arch/arm64/boot/dts/qcom/sm4450.dtsi | 23 +++++++++++++++++++++++
>>   1 file changed, 23 insertions(+)
>>
>> diff --git a/arch/arm64/boot/dts/qcom/sm4450.dtsi 
>> b/arch/arm64/boot/dts/qcom/sm4450.dtsi
>> index 3d9d3b5e9510..c27f17a41699 100644
>> --- a/arch/arm64/boot/dts/qcom/sm4450.dtsi
>> +++ b/arch/arm64/boot/dts/qcom/sm4450.dtsi
>> @@ -3,6 +3,8 @@
>>    * Copyright (c) 2023, Qualcomm Innovation Center, Inc. All rights 
>> reserved.
>>    */
>> +#include <dt-bindings/clock/qcom,rpmh.h>
>> +#include <dt-bindings/clock/qcom,sm4450-gcc.h>
> These should be sorted alphabetically.Yes, I will sort these alphabetically.
> 
> [...]
> 
>> +            rpmhcc: clock-controller {
>> +                compatible = "qcom,sm4450-rpmh-clk";
>> +                #clock-cells = <1>;
>> +                clock-names = "xo";
>> +                clocks = <&xo_board>;
> property
> property-names
> 
> Konrad
Hi Konrad,
Sure, I will adjust these noeds.

-- 
Thx and BRs,
Tengfei Fan

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

* Re: [PATCH v3 4/5] arm64: dts: qcom: add uart console support for SM4450
  2023-09-20 10:03   ` Konrad Dybcio
@ 2023-09-22  2:36     ` Tengfei Fan
  0 siblings, 0 replies; 13+ messages in thread
From: Tengfei Fan @ 2023-09-22  2:36 UTC (permalink / raw)
  To: Konrad Dybcio, agross, andersson, tglx, maz, robh+dt,
	krzysztof.kozlowski+dt, conor+dt, catalin.marinas, will
  Cc: geert+renesas, arnd, neil.armstrong, nfraprado, rafal, peng.fan,
	linux-arm-msm, linux-kernel, devicetree, linux-arm-kernel,
	quic_tsoni, quic_shashim, quic_kaushalk, quic_tdas, quic_tingweiz,
	quic_aiquny, quic_ajipan, kernel



在 9/20/2023 6:03 PM, Konrad Dybcio 写道:
> 
> 
> On 9/20/23 08:54, Tengfei Fan wrote:
>> Add base description of UART and TLMM nodes which helps SM4450
>> boot to shell with console on boards with this SoC.
>>
>> Signed-off-by: Tengfei Fan <quic_tengfan@quicinc.com>
>> ---
> The SoC change must be separate from the board change.
> 
> [...]
> 
> Please leave a comment explaining what these GPIOs are
> used for.
I checked these gpio setting, the gpio0 ~ gpio3 are for NFC eSE SPI, 
gpio136 is for LPI Debug.
>> +&tlmm {
>> +    gpio-reserved-ranges = <0 4>, <136 1>;
>> +};
> 
> [...]
> 
>> +        qupv3_id_0: geniqup@ac0000 {
>> +            compatible = "qcom,geni-se-qup";
>> +            reg = <0x0 0x00ac0000 0x0 0x2000>;
>> +            ranges;
>> +            clock-names = "m-ahb", "s-ahb";
>> +            clocks = <&gcc GCC_QUPV3_WRAP_0_M_AHB_CLK>,
>> +                 <&gcc GCC_QUPV3_WRAP_0_S_AHB_CLK>;
> property
> property-names
I will adjust these nodes.
> 
> [...]
> 
>> +
>> +            uart7: serial@a88000 {
>> +                compatible = "qcom,geni-debug-uart";
>> +                reg = <0 0x00a88000 0 0x4000>;
> Use 0x0 consistently.
I will update this for using "0x0" instead of "0".
> 
>> +                clock-names = "se";
>> +                clocks = <&gcc GCC_QUPV3_WRAP1_S2_CLK>;
> property
> property-names
I will adjust these nodes.
> 
>> +                interrupts = <GIC_SPI 355 IRQ_TYPE_LEVEL_HIGH>;
>> +                pinctrl-names = "default";
>> +                pinctrl-0 = <&qup_uart7_tx>, <&qup_uart7_rx>;
> ditto
I will adjust these nodes.
> 
> [...]
> 
>> +            compatible = "qcom,sm4450-tlmm";
>> +            reg = <0 0x0f100000 0 0x300000>;
> Use 0x0 consistently
I will update this for using "0x0" instead of "0"
> 
>> +            interrupts = <GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH>;
>> +            gpio-controller;
>> +            #gpio-cells = <2>;
>> +            interrupt-controller;
>> +            #interrupt-cells = <2>;
>> +            gpio-ranges = <&tlmm 0 0 137>;
>> +            wakeup-parent = <&pdc>;
>> +
>> +            qup_uart7_rx: qup-uart7-rx-state {
>> +                pins = "gpio23";
>> +                function = "qup1_se2_l2";
>> +                drive-strength = <2>;
>> +                bias-disable;
>> +            };
>> +
>> +            qup_uart7_tx: qup-uart7-tx-state {
>> +                pins = "gpio22";
>> +                function = "qup1_se2_l2";
>> +                drive-strength = <2>;
>> +                bias-disable;
>> +            };
>> +        };
>> +
>>           intc: interrupt-controller@17200000 {
>>               compatible = "arm,gic-v3";
>>               reg = <0x0 0x17200000 0x0 0x10000>,     /* GICD */
>> @@ -476,7 +525,6 @@
>>                   clocks = <&xo_board>;
>>               };
>>           };
>> -
> Totally unrelated change, fix the patch introducing it instead.
> 
> Konrad
Hi Konrad,
I will remove this rnrelated change.

-- 
Thx and BRs,
Tengfei Fan

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

* Re: [PATCH v3 3/5] arm64: dts: qcom: sm4450: Add RPMH and Global clock
  2023-09-20 10:00   ` Konrad Dybcio
  2023-09-22  1:27     ` Tengfei Fan
@ 2023-09-22  5:51     ` Tengfei Fan
  1 sibling, 0 replies; 13+ messages in thread
From: Tengfei Fan @ 2023-09-22  5:51 UTC (permalink / raw)
  To: Konrad Dybcio, agross, andersson, tglx, maz, robh+dt,
	krzysztof.kozlowski+dt, conor+dt, catalin.marinas, will
  Cc: geert+renesas, arnd, neil.armstrong, nfraprado, rafal, peng.fan,
	linux-arm-msm, linux-kernel, devicetree, linux-arm-kernel,
	quic_tsoni, quic_shashim, quic_kaushalk, quic_tdas, quic_tingweiz,
	quic_aiquny, quic_ajipan, kernel



在 9/20/2023 6:00 PM, Konrad Dybcio 写道:
> 
> 
> On 9/20/23 08:54, Tengfei Fan wrote:
>> Add device node for RPMH and Global clock controller on Qualcomm
>> SM4450 platform.
>>
>> Signed-off-by: Ajit Pandey <quic_ajipan@quicinc.com>
>> Signed-off-by: Tengfei Fan <quic_tengfan@quicinc.com>
>> ---
>>   arch/arm64/boot/dts/qcom/sm4450.dtsi | 23 +++++++++++++++++++++++
>>   1 file changed, 23 insertions(+)
>>
>> diff --git a/arch/arm64/boot/dts/qcom/sm4450.dtsi 
>> b/arch/arm64/boot/dts/qcom/sm4450.dtsi
>> index 3d9d3b5e9510..c27f17a41699 100644
>> --- a/arch/arm64/boot/dts/qcom/sm4450.dtsi
>> +++ b/arch/arm64/boot/dts/qcom/sm4450.dtsi
>> @@ -3,6 +3,8 @@
>>    * Copyright (c) 2023, Qualcomm Innovation Center, Inc. All rights 
>> reserved.
>>    */
>> +#include <dt-bindings/clock/qcom,rpmh.h>
>> +#include <dt-bindings/clock/qcom,sm4450-gcc.h>
> These should be sorted alphabetically.
> 
Hi Konrad,
I think these included header files already were sorted alphabetically(r 
-> s), so there are unnecessary for adjust them again, right?
> [...]
> 
>> +            rpmhcc: clock-controller {
>> +                compatible = "qcom,sm4450-rpmh-clk";
>> +                #clock-cells = <1>;
>> +                clock-names = "xo";
>> +                clocks = <&xo_board>;
> property
> property-names
> 
> Konrad

-- 
Thx and BRs,
Tengfei Fan

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

end of thread, other threads:[~2023-09-22  5:52 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-20  6:54 [PATCH v3 0/5] soc: qcom: Add uart console support for SM4450 Tengfei Fan
2023-09-20  6:54 ` [PATCH v3 1/5] dt-bindings: interrupt-controller: qcom,pdc: document qcom,sm4450-pdc Tengfei Fan
2023-09-20  6:54 ` [PATCH v3 2/5] arm64: dts: qcom: sm4450: Add apps_rsc and cmd_db node Tengfei Fan
2023-09-20 10:14   ` Konrad Dybcio
2023-09-22  1:24     ` Tengfei Fan
2023-09-20  6:54 ` [PATCH v3 3/5] arm64: dts: qcom: sm4450: Add RPMH and Global clock Tengfei Fan
2023-09-20 10:00   ` Konrad Dybcio
2023-09-22  1:27     ` Tengfei Fan
2023-09-22  5:51     ` Tengfei Fan
2023-09-20  6:54 ` [PATCH v3 4/5] arm64: dts: qcom: add uart console support for SM4450 Tengfei Fan
2023-09-20 10:03   ` Konrad Dybcio
2023-09-22  2:36     ` Tengfei Fan
2023-09-20  6:54 ` [PATCH v3 5/5] arm64: defconfig: enable clock controller and pinctrl " Tengfei Fan

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).