Add initial support for SM7125 and Xiaomi SM7125 platform
Subsystems (5)
v2 cover Add initial support for SM7125 and Xiaomi SM7125 platform
This series introduces support for the Qualcomm SM7125 SoC and the Xiaomi SM7125 platform.
---
Changes in v2:
- Allow qcom,board-id and qcom,msm-id properties
- Use QCOM_SCM_VMID_MSS_MSA definition
- Change initial regulator modes from LPM to HPM
- Move status to the bottom of nodes
- Fix up PM6150 interrupts
- Move clk patch to beginning of series
- Fix up copyright
- Take ownership of all commits with permission
- Link to v1: https://lore.kernel.org/all/[email protected]/
---
David Wronek (7):
clk: qcom: gcc-sc7180: Fix up gcc_sdcc2_apps_clk_src
dt-bindings: arm: qcom,ids: Add SoC ID for SM7125
dt-bindings: arm: qcom: Document SM7125 and xiaomi,joyeuse board
soc: qcom: socinfo: Add SoC ID for SM7125
arm64: dts: qcom: pm6150: Add resin and rtc nodes
arm64: dts: qcom: Add SM7125 device tree
arm64: dts: qcom: Add support for the Xiaomi SM7125 platform
.../devicetree/bindings/arm/qcom.yaml | 7 + arch/arm64/boot/dts/qcom/Makefile | 1 + arch/arm64/boot/dts/qcom/pm6150.dtsi | 15 + .../boot/dts/qcom/sm7125-xiaomi-joyeuse.dts | 16 + .../boot/dts/qcom/sm7125-xiaomi-miatoll.dtsi | 419 ++++++++++++++++++ arch/arm64/boot/dts/qcom/sm7125.dtsi | 16 + drivers/clk/qcom/gcc-sc7180.c | 1 + drivers/soc/qcom/socinfo.c | 1 + include/dt-bindings/arm/qcom,ids.h | 1 + 9 files changed, 477 insertions(+) create mode 100644 arch/arm64/boot/dts/qcom/sm7125-xiaomi-joyeuse.dts create mode 100644 arch/arm64/boot/dts/qcom/sm7125-xiaomi-miatoll.dtsi create mode 100644 arch/arm64/boot/dts/qcom/sm7125.dtsi
Signature · 1 line
2.41.0
PATCH v2 1/7 clk: qcom: gcc-sc7180: Fix up gcc_sdcc2_apps_clk_src
Set .flags = CLK_OPS_PARENT_ENABLE to fix "gcc_sdcc2_apps_clk_src: rcg didn't update its configuration" error.
--- drivers/clk/qcom/gcc-sc7180.c | 1 + 1 file changed, 1 insertion(+)
drivers/clk/qcom/gcc-sc7180.c +1 -0
@@ -651,6 +651,7 @@ static struct clk_rcg2 gcc_sdcc2_apps_clk_src = { .name = "gcc_sdcc2_apps_clk_src", .parent_data = gcc_parent_data_5, .num_parents = ARRAY_SIZE(gcc_parent_data_5), + .flags = CLK_OPS_PARENT_ENABLE, .ops = &clk_rcg2_floor_ops, }, };
Signature · 1 line
2.41.0
PATCH v2 2/7 dt-bindings: arm: qcom,ids: Add SoC ID for SM7125
In reply to David WronekAdd the SoC ID for Qualcomm SM7125.
--- include/dt-bindings/arm/qcom,ids.h | 1 + 1 file changed, 1 insertion(+)
include/dt-bindings/arm/qcom,ids.h +1 -0
@@ -215,6 +215,7 @@#define QCOM_ID_SDA429W 437#define QCOM_ID_SM8350 439#define QCOM_ID_QCM2290 441 +#define QCOM_ID_SM7125 443#define QCOM_ID_SM6115 444#define QCOM_ID_IPQ5010 446#define QCOM_ID_IPQ5018 447
Signature · 1 line
2.41.0
Re: [PATCH v2 2/7] dt-bindings: arm: qcom,ids: Add SoC ID for SM7125
Quoted 4 lines · David Wronek
Add the SoC ID for Qualcomm SM7125.
Signed-off-by David Wronek <[email protected]>---
Best regards,
Krzysztof
PATCH v2 3/7 dt-bindings: arm: qcom: Document SM7125 and xiaomi,joyeuse board
In reply to David WronekDocument the xiaomi,joyeuse board based on the Qualcomm SM7125 SoC.
--- Documentation/devicetree/bindings/arm/qcom.yaml | 7 +++++++ 1 file changed, 7 insertions(+)
Documentation/devicetree/bindings/arm/qcom.yaml +7 -0
@@ -77,6 +77,7 @@ description: | sm6125 sm6350 sm6375 + sm7125 sm7225 sm8150 sm8250
@@ -929,6 +930,11 @@ properties: - sony,pdx225 - const: qcom,sm6375 + - items: + - enum: + - xiaomi,joyeuse + - const: qcom,sm7125 + - items: - enum: - fairphone,fp4
@@ -1072,6 +1078,7 @@ allOf: - qcom,sm6115 - qcom,sm6125 - qcom,sm6350 + - qcom,sm7125 - qcom,sm7225 - qcom,sm8150 - qcom,sm8250
Signature · 1 line
2.41.0
PATCH v2 4/7 soc: qcom: socinfo: Add SoC ID for SM7125
In reply to David WronekAdd the SoC ID entry for Qualcomm SM7125.
--- drivers/soc/qcom/socinfo.c | 1 + 1 file changed, 1 insertion(+)
drivers/soc/qcom/socinfo.c +1 -0
@@ -371,6 +371,7 @@ static const struct soc_id soc_id[] = { { qcom_board_id(SDA429W) }, { qcom_board_id(SM8350) }, { qcom_board_id(QCM2290) }, + { qcom_board_id(SM7125) }, { qcom_board_id(SM6115) }, { qcom_board_id(IPQ5010) }, { qcom_board_id(IPQ5018) },
Signature · 1 line
2.41.0
Re: [PATCH v2 4/7] soc: qcom: socinfo: Add SoC ID for SM7125
Quoted 5 lines · David Wronek
Add the SoC ID entry for Qualcomm SM7125.
Signed-off-by David Wronek <[email protected]>--- drivers/soc/qcom/socinfo.c | 1 +
Best regards,
Krzysztof
PATCH v2 5/7 arm64: dts: qcom: pm6150: Add resin and rtc nodes
In reply to David WronekAdd support for the RTC which is the same as on other PMICs and add the resin child node to the PM6150 PON device and disable it by default.
--- arch/arm64/boot/dts/qcom/pm6150.dtsi | 15 +++++++++++++++ 1 file changed, 15 insertions(+)
arch/arm64/boot/dts/qcom/pm6150.dtsi +15 -0
@@ -53,6 +53,14 @@ pm6150_pwrkey: pwrkey { bias-pull-up; linux,code = <KEY_POWER>; }; + + pm6150_resin: resin { + compatible = "qcom,pm8941-resin"; + interrupts = <0x0 0x8 1 IRQ_TYPE_EDGE_BOTH>; + debounce = <15625>; + bias-pull-up; + status = "disabled"; + }; }; pm6150_temp: temp-alarm@2400 {
@@ -88,6 +96,13 @@ pm6150_adc_tm: adc-tm@3500 { status = "disabled"; }; + rtc@6000 { + compatible = "qcom,pm8941-rtc"; + reg = <0x6000>, <0x6100>; + reg-names = "rtc", "alarm"; + interrupts = <0x0 0x61 0x1 IRQ_TYPE_EDGE_RISING>; + }; + pm6150_gpios: gpio@c000 { compatible = "qcom,pm6150-gpio", "qcom,spmi-gpio"; reg = <0xc000>;
Signature · 1 line
2.41.0
Re: [PATCH v2 5/7] arm64: dts: qcom: pm6150: Add resin and rtc nodes
David Wronek писал(а) 06.07.2023 17:40:
Quoted 4 lines
Add support for the RTC which is the same as on other PMICs and add the resin child node to the PM6150 PON device and disable it by default.
Signed-off-by David Wronek <[email protected]>
Actually... (+CC CROS watchers) Doug, this would enable a somewhat dubious RTC for trogdor devices. On qcom firmware the rtc is forever write-protected but you run TF-A so maybe it's more cooperative and you can add "allow-set-time" prop for trogdor, in case qtiseclib doesn't mess with it? Or, alternatively, disable this rtc for trogdor completely so it doesn't cause trouble?
In any case, on the WoA firmware and with userspace offset handling, this works beautifully, so:
Thanks!
Quoted 37 lines
--- arch/arm64/boot/dts/qcom/pm6150.dtsi | 15 +++++++++++++++ 1 file changed, 15 insertions(+)arch/arm64/boot/dts/qcom/pm6150.dtsi +15
-0@@ -53,6 +53,14 @@ pm6150_pwrkey: pwrkey { bias-pull-up; linux,code = <KEY_POWER>; }; + + pm6150_resin: resin { + compatible = "qcom,pm8941-resin"; + interrupts = <0x0 0x8 1 IRQ_TYPE_EDGE_BOTH>; + debounce = <15625>; + bias-pull-up; + status = "disabled"; + }; }; pm6150_temp: temp-alarm@2400 {@@ -88,6 +96,13 @@ pm6150_adc_tm: adc-tm@3500 { status = "disabled"; }; + rtc@6000 { + compatible = "qcom,pm8941-rtc"; + reg = <0x6000>, <0x6100>; + reg-names = "rtc", "alarm"; + interrupts = <0x0 0x61 0x1 IRQ_TYPE_EDGE_RISING>; + }; + pm6150_gpios: gpio@c000 { compatible = "qcom,pm6150-gpio", "qcom,spmi-gpio"; reg = <0xc000>;
PATCH v2 6/7 arm64: dts: qcom: Add SM7125 device tree
In reply to David WronekThe Snapdragon 720G (sm7125) is software-wise very similar to the Snapdragon 7c with minor differences in clock speeds and as added here, it uses the Kryo 465 instead of Kryo 468.
--- arch/arm64/boot/dts/qcom/sm7125.dtsi | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 arch/arm64/boot/dts/qcom/sm7125.dtsi
arch/arm64/boot/dts/qcom/sm7125.dtsi new file +16 -0
@@ -0,0 +1,16 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (c) 2021, The Linux Foundation. All rights reserved. + */ + +#include "sc7180.dtsi" + +/* SM7125 uses Kryo 465 instead of Kryo 468 */ +&CPU0 { compatible = "qcom,kryo465"; }; +&CPU1 { compatible = "qcom,kryo465"; }; +&CPU2 { compatible = "qcom,kryo465"; }; +&CPU3 { compatible = "qcom,kryo465"; }; +&CPU4 { compatible = "qcom,kryo465"; }; +&CPU5 { compatible = "qcom,kryo465"; }; +&CPU6 { compatible = "qcom,kryo465"; }; +&CPU7 { compatible = "qcom,kryo465"; };
Signature · 1 line
2.41.0
Re: [PATCH v2 6/7] arm64: dts: qcom: Add SM7125 device tree
Quoted 6 lines · David Wronek
The Snapdragon 720G (sm7125) is software-wise very similar to the Snapdragon 7c with minor differences in clock speeds and as added here, it uses the Kryo 465 instead of Kryo 468.
Signed-off-by David Wronek <[email protected]>---
Can you please paste the output of dmesg | grep "secondary processor"?
That would let us determine the unique identifier of the cores.
Konrad
Quoted 26 lines
arch/arm64/boot/dts/qcom/sm7125.dtsi | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 arch/arm64/boot/dts/qcom/sm7125.dtsiarch/arm64/boot/dts/qcom/sm7125.dtsi new file +16
-0@@ -0,0 +1,16 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (c) 2021, The Linux Foundation. All rights reserved. + */ + +#include "sc7180.dtsi" + +/* SM7125 uses Kryo 465 instead of Kryo 468 */ +&CPU0 { compatible = "qcom,kryo465"; }; +&CPU1 { compatible = "qcom,kryo465"; }; +&CPU2 { compatible = "qcom,kryo465"; }; +&CPU3 { compatible = "qcom,kryo465"; }; +&CPU4 { compatible = "qcom,kryo465"; }; +&CPU5 { compatible = "qcom,kryo465"; }; +&CPU6 { compatible = "qcom,kryo465"; }; +&CPU7 { compatible = "qcom,kryo465"; };
Re: [PATCH v2 6/7] arm64: dts: qcom: Add SM7125 device tree
Quoted 5 lines · Konrad Dybcio
Quoted 4 lines · David Wronek
The Snapdragon 720G (sm7125) is software-wise very similar to the Snapdragon 7c with minor differences in clock speeds and as added here, it uses the Kryo 465 instead of Kryo 468.
Quoted 7 lines
Quoted 2 lines
Signed-off-by David Wronek <[email protected]>---
Can you please paste the output of
dmesg | grep "secondary processor"?That would let us determine the unique identifier of the cores.
Konrad
I get this output with the command:
[ 0.005884] CPU1: Booted secondary processor 0x0000000100 [0x51df805e] [ 0.007191] CPU2: Booted secondary processor 0x0000000200 [0x51df805e] [ 0.008559] CPU3: Booted secondary processor 0x0000000300 [0x51df805e] [ 0.010046] CPU4: Booted secondary processor 0x0000000400 [0x51df805e] [ 0.011639] CPU5: Booted secondary processor 0x0000000500 [0x51df805e] [ 0.014424] CPU6: Booted secondary processor 0x0000000600 [0x51ff804f] [ 0.016421] CPU7: Booted secondary processor 0x0000000700 [0x51ff804f]
Sincerely,
David
Quoted 26 lines
Quoted 26 lines
arch/arm64/boot/dts/qcom/sm7125.dtsi | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 arch/arm64/boot/dts/qcom/sm7125.dtsiarch/arm64/boot/dts/qcom/sm7125.dtsi new file +16
-0@@ -0,0 +1,16 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (c) 2021, The Linux Foundation. All rights reserved. + */ + +#include "sc7180.dtsi" + +/* SM7125 uses Kryo 465 instead of Kryo 468 */ +&CPU0 { compatible = "qcom,kryo465"; }; +&CPU1 { compatible = "qcom,kryo465"; }; +&CPU2 { compatible = "qcom,kryo465"; }; +&CPU3 { compatible = "qcom,kryo465"; }; +&CPU4 { compatible = "qcom,kryo465"; }; +&CPU5 { compatible = "qcom,kryo465"; }; +&CPU6 { compatible = "qcom,kryo465"; }; +&CPU7 { compatible = "qcom,kryo465"; };
Re: [PATCH v2 6/7] arm64: dts: qcom: Add SM7125 device tree
Quoted 13 lines · David Wronek
Quoted 5 lines · Konrad Dybcio
Quoted 4 lines · David Wronek
The Snapdragon 720G (sm7125) is software-wise very similar to the Snapdragon 7c with minor differences in clock speeds and as added here, it uses the Kryo 465 instead of Kryo 468.
Quoted 7 lines
Quoted 2 lines
Signed-off-by David Wronek <[email protected]>---
Can you please paste the output of
dmesg | grep "secondary processor"?That would let us determine the unique identifier of the cores.
Konrad
Quoted 8 lines
I get this output with the command:
[ 0.005884] CPU1: Booted secondary processor 0x0000000100 [0x51df805e] [ 0.007191] CPU2: Booted secondary processor 0x0000000200 [0x51df805e] [ 0.008559] CPU3: Booted secondary processor 0x0000000300 [0x51df805e] [ 0.010046] CPU4: Booted secondary processor 0x0000000400 [0x51df805e] [ 0.011639] CPU5: Booted secondary processor 0x0000000500 [0x51df805e] [ 0.014424] CPU6: Booted secondary processor 0x0000000600 [0x51ff804f] [ 0.016421] CPU7: Booted secondary processor 0x0000000700 [0x51ff804f]
Hm okay so they are indeed Qualcomm-branded cores.. Sometimes they use the ARM ones and still call it Kryo
btw the implementer id of 0x51 is the ascii code of 'Q', nice quirk
Konrad
Quoted 29 lines
Sincerely,
DavidQuoted 26 lines
Quoted 26 lines
arch/arm64/boot/dts/qcom/sm7125.dtsi | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 arch/arm64/boot/dts/qcom/sm7125.dtsiarch/arm64/boot/dts/qcom/sm7125.dtsi new file +16
-0@@ -0,0 +1,16 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (c) 2021, The Linux Foundation. All rights reserved. + */ + +#include "sc7180.dtsi" + +/* SM7125 uses Kryo 465 instead of Kryo 468 */ +&CPU0 { compatible = "qcom,kryo465"; }; +&CPU1 { compatible = "qcom,kryo465"; }; +&CPU2 { compatible = "qcom,kryo465"; }; +&CPU3 { compatible = "qcom,kryo465"; }; +&CPU4 { compatible = "qcom,kryo465"; }; +&CPU5 { compatible = "qcom,kryo465"; }; +&CPU6 { compatible = "qcom,kryo465"; }; +&CPU7 { compatible = "qcom,kryo465"; };
PATCH v2 7/7 arm64: dts: qcom: Add support for the Xiaomi SM7125 platform
In reply to David WronekThere are 6 Xiaomi smartphones with the SM7125 SoC:
- POCO M2 Pro (gram)
- Redmi Note 9S (curtana)
- Redmi Note 9 Pro (Global, joyeuse)
- Redmi Note 9 Pro (India, curtana)
- Redmi Note 9 Pro Max (excalibur)
- Redmi Note 10 Lite (curtana)
These devices share a common board design (a.k.a miatoll) with only a few differences. Add support for the common board, as well as support for the global Redmi Note 9 Pro.
--- arch/arm64/boot/dts/qcom/Makefile | 1 + .../boot/dts/qcom/sm7125-xiaomi-joyeuse.dts | 16 + .../boot/dts/qcom/sm7125-xiaomi-miatoll.dtsi | 419 ++++++++++++++++++ 3 files changed, 436 insertions(+) create mode 100644 arch/arm64/boot/dts/qcom/sm7125-xiaomi-joyeuse.dts create mode 100644 arch/arm64/boot/dts/qcom/sm7125-xiaomi-miatoll.dtsi
arch/arm64/boot/dts/qcom/Makefile +1 -0
@@ -192,6 +192,7 @@ dtb-$(CONFIG_ARCH_QCOM) += sm6125-sony-xperia-seine-pdx201.dtb dtb-$(CONFIG_ARCH_QCOM) += sm6125-xiaomi-laurel-sprout.dtb dtb-$(CONFIG_ARCH_QCOM) += sm6350-sony-xperia-lena-pdx213.dtb dtb-$(CONFIG_ARCH_QCOM) += sm6375-sony-xperia-murray-pdx225.dtb +dtb-$(CONFIG_ARCH_QCOM) += sm7125-xiaomi-joyeuse.dtb dtb-$(CONFIG_ARCH_QCOM) += sm7225-fairphone-fp4.dtb dtb-$(CONFIG_ARCH_QCOM) += sm8150-hdk.dtb dtb-$(CONFIG_ARCH_QCOM) += sm8150-microsoft-surface-duo.dtb
arch/arm64/boot/dts/qcom/sm7125-xiaomi-joyeuse.dts new file +16 -0
@@ -0,0 +1,16 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (c) 2021, The Linux Foundation. All rights reserved. + */ + +/dts-v1/; + +#include "sm7125-xiaomi-miatoll.dtsi" + +/ { + model = "Xiaomi Redmi Note 9 Pro (Global)"; + compatible = "xiaomi,joyeuse", "qcom,sm7125"; + + /* required for bootloader to select correct board */ + qcom,board-id = <0x50022 1>; +};
arch/arm64/boot/dts/qcom/sm7125-xiaomi-miatoll.dtsi new file +419 -0
419 lines not on this page · raw message
Signature · 1 line
2.41.0