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 <[email protected]>
---
"[PATCH v4 0/2] pinctl: qcom: Add SM4450 pinctrl driver"
https://lore.kernel.org/linux-arm-msm/[email protected]/
v5 -> v6:
- remove link that depend on clock patch from cover letter
- remove patch which already mainline
v4 -> v5:
- separate reserved gpios setting from enable UART console patch
v3 -> v4:
- adjustment the sequence of property and property-names
- update 0 to 0x0 for reg params
- remove unrelated change
- separate SoC change and board change
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] v5: https://lore.kernel.org/linux-arm-msm/[email protected]
[2] v4: https://lore.kernel.org/linux-arm-msm/[email protected]
[3] v3: https://lore.kernel.org/linux-arm-msm/[email protected]
[4] v2: https://lore.kernel.org/linux-arm-msm/[email protected]
[4] v1: https://lore.kernel.org/linux-arm-msm/[email protected]
Ajit Pandey (1):
arm64: dts: qcom: sm4450: Add apps_rsc and cmd_db node
Tengfei Fan (5):
arm64: dts: qcom: sm4450: Add RPMH and Global clock
arm64: dts: qcom: add uart console support for SM4450
arm64: dts: qcom: sm4450-qrd: add QRD4450 uart support
arm64: dts: qcom: sm4450-qrd: mark QRD4450 reserved gpios
arm64: defconfig: enable clock controller and pinctrl
arch/arm64/boot/dts/qcom/sm4450-qrd.dts | 19 ++++-
arch/arm64/boot/dts/qcom/sm4450.dtsi | 107 ++++++++++++++++++++++++
arch/arm64/configs/defconfig | 2 +
3 files changed, 126 insertions(+), 2 deletions(-)
base-commit: c503e3eec382ac708ee7adf874add37b77c5d312
--
2.17.1
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 <[email protected]>
---
arch/arm64/boot/dts/qcom/sm4450.dtsi | 49 ++++++++++++++++++++++++++++
1 file changed, 49 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/sm4450.dtsi b/arch/arm64/boot/dts/qcom/sm4450.dtsi
index 5a8a54b0f6c1..3e7ae3bebbe0 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;
+ clocks = <&gcc GCC_QUPV3_WRAP_0_M_AHB_CLK>,
+ <&gcc GCC_QUPV3_WRAP_0_S_AHB_CLK>;
+ clock-names = "m-ahb", "s-ahb";
+ #address-cells = <2>;
+ #size-cells = <2>;
+ status = "disabled";
+
+ uart7: serial@a88000 {
+ compatible = "qcom,geni-debug-uart";
+ reg = <0x0 0x00a88000 0x0 0x4000>;
+ clocks = <&gcc GCC_QUPV3_WRAP1_S2_CLK>;
+ clock-names = "se";
+ interrupts = <GIC_SPI 355 IRQ_TYPE_LEVEL_HIGH>;
+ pinctrl-0 = <&qup_uart7_tx>, <&qup_uart7_rx>;
+ pinctrl-names = "default";
+ 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 = <0x0 0x0f100000 0x0 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 */
--
2.17.1
Add device node for RPMH and Global clock controller on Qualcomm
SM4450 platform.
Reviewed-by: Konrad Dybcio <[email protected]>
Signed-off-by: Ajit Pandey <[email protected]>
Signed-off-by: Tengfei Fan <[email protected]>
---
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 5e09880f4218..5a8a54b0f6c1 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>;
+ clocks = <&xo_board>;
+ clock-names = "xo";
+ };
};
};
--
2.17.1
Add uart support for QRD4450 for enable uart console.
Reviewed-by: Konrad Dybcio <[email protected]>
Signed-off-by: Tengfei Fan <[email protected]>
---
arch/arm64/boot/dts/qcom/sm4450-qrd.dts | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/sm4450-qrd.dts b/arch/arm64/boot/dts/qcom/sm4450-qrd.dts
index 00a1c81ca397..bb8c58fb4267 100644
--- a/arch/arm64/boot/dts/qcom/sm4450-qrd.dts
+++ b/arch/arm64/boot/dts/qcom/sm4450-qrd.dts
@@ -10,9 +10,19 @@
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";
+};
+
+&uart7 {
+ status = "okay";
+};
--
2.17.1
Some gpios are reserved for other subsystems, so mark these reserved
gpios.
Signed-off-by: Tengfei Fan <[email protected]>
---
arch/arm64/boot/dts/qcom/sm4450-qrd.dts | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/sm4450-qrd.dts b/arch/arm64/boot/dts/qcom/sm4450-qrd.dts
index bb8c58fb4267..e354bad57a9e 100644
--- a/arch/arm64/boot/dts/qcom/sm4450-qrd.dts
+++ b/arch/arm64/boot/dts/qcom/sm4450-qrd.dts
@@ -23,6 +23,11 @@
status = "okay";
};
+&tlmm {
+ /* Reserved for other subsystems */
+ gpio-reserved-ranges = <0 4>, <136 1>;
+};
+
&uart7 {
status = "okay";
};
--
2.17.1
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 <[email protected]>
---
arch/arm64/configs/defconfig | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
index b60aa1f89343..bfc898568884 100644
--- a/arch/arm64/configs/defconfig
+++ b/arch/arm64/configs/defconfig
@@ -599,6 +599,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_SM6115_LPASS_LPI=m
CONFIG_PINCTRL_SM6125=y
@@ -1257,6 +1258,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
From: Ajit Pandey <[email protected]>
Add apps_rsc node and cmd_db memory region for sm4450.
Reviewed-by: Konrad Dybcio <[email protected]>
Signed-off-by: Ajit Pandey <[email protected]>
Signed-off-by: Tengfei Fan <[email protected]>
---
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..5e09880f4218 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 = <0x0 0x17a00000 0x0 0x10000>,
+ <0x0 0x17a10000 0x0 0x10000>,
+ <0x0 0x17a20000 0x0 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
On 31/10/2023 08:50, Tengfei Fan wrote:
> 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.
>
Reviewed-by: Krzysztof Kozlowski <[email protected]>
Best regards,
Krzysztof
On 31.10.2023 08:50, 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 <[email protected]>
> ---
Reviewed-by: Konrad Dybcio <[email protected]>
Konrad
On 31.10.2023 08:50, Tengfei Fan wrote:
> Some gpios are reserved for other subsystems, so mark these reserved
> gpios.
>
> Signed-off-by: Tengfei Fan <[email protected]>
> ---
> arch/arm64/boot/dts/qcom/sm4450-qrd.dts | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/qcom/sm4450-qrd.dts b/arch/arm64/boot/dts/qcom/sm4450-qrd.dts
> index bb8c58fb4267..e354bad57a9e 100644
> --- a/arch/arm64/boot/dts/qcom/sm4450-qrd.dts
> +++ b/arch/arm64/boot/dts/qcom/sm4450-qrd.dts
> @@ -23,6 +23,11 @@
> status = "okay";
> };
>
> +&tlmm {
> + /* Reserved for other subsystems */
that much we can guess :D
it would be very appreciated if you could do e.g.
<0 4>, /* fingerprint scanner */
<136 1>; /* coffee machine trigger */
Konrad
在 11/18/2023 8:45 AM, Konrad Dybcio 写道:
> On 31.10.2023 08:50, Tengfei Fan wrote:
>> Some gpios are reserved for other subsystems, so mark these reserved
>> gpios.
>>
>> Signed-off-by: Tengfei Fan <[email protected]>
>> ---
>> arch/arm64/boot/dts/qcom/sm4450-qrd.dts | 5 +++++
>> 1 file changed, 5 insertions(+)
>>
>> diff --git a/arch/arm64/boot/dts/qcom/sm4450-qrd.dts b/arch/arm64/boot/dts/qcom/sm4450-qrd.dts
>> index bb8c58fb4267..e354bad57a9e 100644
>> --- a/arch/arm64/boot/dts/qcom/sm4450-qrd.dts
>> +++ b/arch/arm64/boot/dts/qcom/sm4450-qrd.dts
>> @@ -23,6 +23,11 @@
>> status = "okay";
>> };
>>
>> +&tlmm {
>> + /* Reserved for other subsystems */
> that much we can guess :D
>
> it would be very appreciated if you could do e.g.
>
> <0 4>, /* fingerprint scanner */
> <136 1>; /* coffee machine trigger */
>
> Konrad
Hi Konrad,
Thank you for reviewing this patch series, I will update new patch
series according to your suggestion.
--
Thx and BRs,
Tengfei Fan
在 11/27/2023 1:58 PM, Tengfei Fan 写道:
>
>
> 在 11/18/2023 8:45 AM, Konrad Dybcio 写道:
>> On 31.10.2023 08:50, Tengfei Fan wrote:
>>> Some gpios are reserved for other subsystems, so mark these reserved
>>> gpios.
>>>
>>> Signed-off-by: Tengfei Fan <[email protected]>
>>> ---
>>> arch/arm64/boot/dts/qcom/sm4450-qrd.dts | 5 +++++
>>> 1 file changed, 5 insertions(+)
>>>
>>> diff --git a/arch/arm64/boot/dts/qcom/sm4450-qrd.dts
>>> b/arch/arm64/boot/dts/qcom/sm4450-qrd.dts
>>> index bb8c58fb4267..e354bad57a9e 100644
>>> --- a/arch/arm64/boot/dts/qcom/sm4450-qrd.dts
>>> +++ b/arch/arm64/boot/dts/qcom/sm4450-qrd.dts
>>> @@ -23,6 +23,11 @@
>>> status = "okay";
>>> };
>>> +&tlmm {
>>> + /* Reserved for other subsystems */
>> that much we can guess :D
>>
>> it would be very appreciated if you could do e.g.
>>
>> <0 4>, /* fingerprint scanner */
>> <136 1>; /* coffee machine trigger */
>>
>> Konrad
> Hi Konrad,
> Thank you for reviewing this patch series, I will update new patch
> series according to your suggestion.
Hi Konrad,
Storage team discovered that gpio 136 was inaccessible due to the
pinctrl driver issue. So new version patch series will drop gpio 136
from this gpio-reserved-ranges node.
New version patch series:
https://lore.kernel.org/linux-arm-msm/[email protected]/
>
>
--
Thx and BRs,
Tengfei Fan