Add initial support for SM7125 and Xiaomi SM7125 platform
Subsystems (5)
cover Add initial support for SM7125 and Xiaomi SM7125 platform
This series introduces support for the Qualcomm SM7125 and the Xiaomi SM7125 platform.
David Wronek (3):
dt-bindings: arm: qcom: Document SM7125 and xiaomi,joyeuse board
arm64: dts: qcom: pm6150: Add resin and rtc nodes
arm64: dts: qcom: Add support for the Xiaomi SM7125 platform
map220v (4):
dt-bindings: arm: qcom,ids: Add SoC ID for SM7125
soc: qcom: socinfo: Add SoC ID for SM7125
clk: qcom: gcc-sc7180: Fix up gcc_sdcc2_apps_clk_src
arm64: dts: qcom: Add SM7125 device tree
.../devicetree/bindings/arm/qcom.yaml | 6 + 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 | 420 ++++++++++++++++++ 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 1/7 dt-bindings: arm: qcom,ids: Add SoC ID for SM7125
From: map220v <[email protected]>
Add 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 1/7] dt-bindings: arm: qcom,ids: Add SoC ID for SM7125
Quoted 5 lines · David Wronek
From: map220v <[email protected]>
Add the SoC ID for Qualcomm SM7125.
Signed-off-by map220v <[email protected]>
We accept known identities, but this looks like a nickname/pseudonym. Are you sure you got such SoB from map220v?
None of the commits here:
https://github.com/map220v/sm7125-mainline/commits/a72q-6.0
have signed-off-by. Did you add it by yourself?
Best regards,
Krzysztof
Re: [PATCH 1/7] dt-bindings: arm: qcom,ids: Add SoC ID for SM7125
Quoted 11 lines · Krzysztof Kozlowski
Quoted 5 lines · David Wronek
From: map220v <[email protected]>
Add the SoC ID for Qualcomm SM7125.
Signed-off-by map220v <[email protected]>We accept known identities, but this looks like a nickname/pseudonym. Are you sure you got such SoB from map220v?
Quoted 7 lines
None of the commits here:
https://github.com/map220v/sm7125-mainline/commits/a72q-6.0
have signed-off-by. Did you add it by yourself?Best regards,
Krzysztof
(Please ignore my E-Mail from before, I forgot to click "reply all")
I have asked map220v for permission to add their Signed-off-by to the commits and this is the one they gave me. Is the nickname a problem?
Sincerely,
David
Re: [PATCH 1/7] dt-bindings: arm: qcom,ids: Add SoC ID for SM7125
Quoted 17 lines · David Wronek
Quoted 15 lines · Krzysztof Kozlowski
Quoted 5 lines · David Wronek
From: map220v <[email protected]>
Add the SoC ID for Qualcomm SM7125.
Signed-off-by map220v <[email protected]>We accept known identities, but this looks like a nickname/pseudonym. Are you sure you got such SoB from map220v?
None of the commits here:
https://github.com/map220v/sm7125-mainline/commits/a72q-6.0
have signed-off-by. Did you add it by yourself?
Quoted 7 lines
Quoted 3 lines
Best regards,
Krzysztof(Please ignore my E-Mail from before, I forgot to click "reply all")
I have asked map220v for permission to add their Signed-off-by to the commits and this is the one they gave me. Is the nickname a problem?
Yes, because it looks anonymous. We need known identity. Just take the ownership of the patches...
Best regards,
Krzysztof
PATCH 2/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 | 6 ++++++ 1 file changed, 6 insertions(+)
Documentation/devicetree/bindings/arm/qcom.yaml +6 -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
Signature · 1 line
2.41.0
Re: [PATCH 2/7] dt-bindings: arm: qcom: Document SM7125 and xiaomi,joyeuse board
Quoted 3 lines · David Wronek
Document the xiaomi,joyeuse board based on the Qualcomm SM7125 SoC.
Signed-off-by David Wronek <[email protected]>
---
This is an automated instruction, just in case, because many review tags are being ignored. If you do not know the process, here is a short explanation:
Please add Acked-by/Reviewed-by/Tested-by tags when posting new versions, under or above your Signed-off-by tag. Tools like b4 can help here. However, there's no need to repost patches *only* to add the tags. The upstream maintainer will do that for acks received on the version they apply.
https://elixir.bootlin.com/linux/v5.17/source/Documentation/process/submitting-patches.rst#L540
Best regards,
Krzysztof
PATCH 3/7 soc: qcom: socinfo: Add SoC ID for SM7125
In reply to David WronekFrom: map220v <[email protected]>
Add 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
PATCH 4/7 clk: qcom: gcc-sc7180: Fix up gcc_sdcc2_apps_clk_src
In reply to David WronekFrom: map220v <[email protected]>
Add the PARENT_ENABLE flag to prevent the clock from getting stuck at boot.
--- 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
Re: [PATCH 4/7] clk: qcom: gcc-sc7180: Fix up gcc_sdcc2_apps_clk_src
Quoted 17 lines · David Wronek
From: map220v <[email protected]>
Add the
PARENT_ENABLEflag to prevent the clock from getting stuck at boot.Fixes 17269568f726 ("clk: qcom: Add Global Clock controller (GCC) driver for SC7180")Signed-off-by map220v <[email protected]>Signed-off-by David Wronek <[email protected]>--- drivers/clk/qcom/gcc-sc7180.c | 1 + 1 file changed, 1 insertion(+)drivers/clk/qcom/gcc-sc7180.c +0
-0
drivers/clk/qcom/gcc-sc7180.c static struct clk_rcg2 gcc_sdcc2_apps_clk_src = { · line 654
Quoted 4 lines
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,
Could you please share what Stuck warnings are you observing?
Quoted 3 lines
drivers/clk/qcom/gcc-sc7180.c +0
-0.ops = &clk_rcg2_floor_ops, }, };
Signature · 2 lines
Thanks & Regards, Taniya Das.
Re: [PATCH 4/7] clk: qcom: gcc-sc7180: Fix up gcc_sdcc2_apps_clk_src
Quoted 15 lines · Taniya Das
Quoted 12 lines · David Wronek
From: map220v <[email protected]>
Add the
PARENT_ENABLEflag to prevent the clock from getting stuck at boot.Fixes 17269568f726 ("clk: qcom: Add Global Clock controller (GCC) driver for SC7180")Signed-off-by map220v <[email protected]>Signed-off-by David Wronek <[email protected]>---
drivers/clk/qcom/gcc-sc7180.c| 1 +1 file changed, 1 insertion(+)
Quoted 11 lines
drivers/clk/qcom/gcc-sc7180.c static struct clk_rcg2 gcc_sdcc2_apps_clk_src = { · line 654
Quoted 9 lines
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,Could you please share what Stuck warnings are you observing?
My educated guess would be that the max frequency uses GPLL7, which is either not enabled by default, or is shut down by unused clk cleanup down the pipe.
Konrad
Quoted 5 lines
Quoted 4 lines
drivers/clk/qcom/gcc-sc7180.c +0
-0.ops = &clk_rcg2_floor_ops, }, };
Re: [PATCH 4/7] clk: qcom: gcc-sc7180: Fix up gcc_sdcc2_apps_clk_src
In reply to Taniya DasQuoted 28 lines · Taniya Das
Quoted 17 lines · David Wronek
From: map220v <[email protected]>
Add the
PARENT_ENABLEflag to prevent the clock from getting stuck at boot.Fixes 17269568f726 ("clk: qcom: Add Global Clock controller (GCC) driver for SC7180")Signed-off-by map220v <[email protected]>Signed-off-by David Wronek <[email protected]>--- drivers/clk/qcom/gcc-sc7180.c | 1 + 1 file changed, 1 insertion(+)drivers/clk/qcom/gcc-sc7180.c +0
-0drivers/clk/qcom/gcc-sc7180.c static struct clk_rcg2 gcc_sdcc2_apps_clk_src = { · line 654
Quoted 4 lines
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,Could you please share what Stuck warnings are you observing?
Quoted 7 lines
drivers/clk/qcom/gcc-sc7180.c static struct clk_rcg2 gcc_sdcc2_apps_clk_src = { · line 657
Quoted 3 lines
drivers/clk/qcom/gcc-sc7180.c +0
-0.ops = &clk_rcg2_floor_ops, }, };--
Thanks & Regards,
Taniya Das.
Without this patch I get the following warning:
[ 0.316057] gcc_sdcc2_apps_clk_src: rcg didn't update its configuration. [ 0.316081] WARNING: CPU: 4 PID: 75 at drivers/clk/qcom/clk-rcg2.c:133 update_config+0xcc/0xdc [ 0.316226] Modules linked in: [ 0.316265] CPU: 4 PID: 75 Comm: kworker/u16:2 Not tainted 6.4.0-next-20230704-sm7125 #51 [ 0.316337] Hardware name: Xiaomi Redmi Note 9 Pro (Global) (DT) [ 0.316394] Workqueue: events_unbound async_run_entry_fn [ 0.316453] pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) [ 0.316517] pc : update_config+0xcc/0xdc [ 0.316560] lr : update_config+0xcc/0xdc [ 0.316602] sp : ffff80008088b8e0 [ 0.316636] x29: ffff80008088b8e0 x28: 0000000000000000 x27: ffffa9c34c571d00 [ 0.316708] x26: ffffa9c34c333db0 x25: ffff60d440b5ec10 x24: ffff80008088bb18 [ 0.316778] x23: ffff60d441704900 x22: 0000000005f5e100 x21: ffffa9c34c5dc548 [ 0.316849] x20: ffffa9c34cc739b8 x19: 0000000000000000 x18: fffffffffffe5f18 [ 0.316918] x17: 0000000000000014 x16: 0000000000000020 x15: 0000000000000048 [ 0.316988] x14: fffffffffffe5f60 x13: ffffa9c34cb5e928 x12: 00000000000003f9 [ 0.317058] x11: 0000000000000153 x10: ffffa9c34cbb88f0 x9 : ffffa9c34cb5e928 [ 0.317128] x8 : 00000000ffffefff x7 : ffffa9c34cbb6928 x6 : 0000000000000153 [ 0.317197] x5 : 0000000000000000 x4 : 40000000fffff153 x3 : 0000000000000000 [ 0.317266] x2 : 0000000000000000 x1 : 0000000000000000 x0 : ffff60d440284880 [ 0.317336] Call trace: [ 0.317365] update_config+0xcc/0xdc [ 0.317407] clk_rcg2_configure+0xb0/0xb8 [ 0.317451] clk_rcg2_set_floor_rate_and_parent+0x2c/0x44 [ 0.317506] clk_change_rate+0x7c/0x294 [ 0.317551] clk_core_set_rate_nolock+0x168/0x274 [ 0.317601] clk_set_rate+0x38/0x14c [ 0.317641] _opp_config_clk_single+0x30/0xa8 [ 0.317687] _set_opp+0x258/0x468 [ 0.317726] dev_pm_opp_set_rate+0x180/0x268 [ 0.317770] sdhci_msm_probe+0x360/0xb4c [ 0.317815] platform_probe+0x68/0xc4 [ 0.317859] really_probe+0x148/0x2b0 [ 0.317900] __driver_probe_device+0x78/0x12c [ 0.317947] driver_probe_device+0x3c/0x15c [ 0.317994] __device_attach_driver+0xb8/0x134 [ 0.318040] bus_for_each_drv+0x84/0xe0 [ 0.318082] __device_attach_async_helper+0xac/0xd0 [ 0.318132] async_run_entry_fn+0x34/0xe0 [ 0.318177] process_one_work+0x1c0/0x334 [ 0.318221] worker_thread+0x68/0x428 [ 0.318260] kthread+0x110/0x114 [ 0.318300] ret_from_fork+0x10/0x20
Sincerely,
David
Re: [PATCH 4/7] clk: qcom: gcc-sc7180: Fix up gcc_sdcc2_apps_clk_src
In reply to David WronekQuoted 4 lines · David Wronek
From: map220v <[email protected]>
Add the
PARENT_ENABLEflag to prevent the clock from getting stuck at boot.
What does it mean that "clock getting stuck at boot"? How a clock can stuck?
Quoted 3 lines
Fixes 17269568f726 ("clk: qcom: Add Global Clock controller (GCC) driver for SC7180")Signed-off-by map220v <[email protected]>
Same concerns as for other patches with this. Look:
https://github.com/map220v/sm7125-mainline/commit/e754e5725cb596049df2437d7c857e4d232e87fb
No SoB.
Quoted 1 line
Signed-off-by David Wronek <[email protected]>
Fixes must be either first in series or better sent separately. There is no reason for them to be in this patchset in the first place, because they are not related.
Best regards,
Krzysztof
PATCH 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 = <GIC_SPI 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_NONE>; + }; + pm6150_gpios: gpio@c000 { compatible = "qcom,pm6150-gpio", "qcom,spmi-gpio"; reg = <0xc000>;
Signature · 1 line
2.41.0
Re: [PATCH 5/7] arm64: dts: qcom: pm6150: Add resin and rtc nodes
Quoted 13 lines · David Wronek
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]>--- arch/arm64/boot/dts/qcom/pm6150.dtsi | 15 +++++++++++++++ 1 file changed, 15 insertions(+)arch/arm64/boot/dts/qcom/pm6150.dtsi +0
-0
arch/arm64/boot/dts/qcom/pm6150.dtsi pm6150_pwrkey: pwrkey { · line 59
Quoted 7 lines
arch/arm64/boot/dts/qcom/pm6150.dtsi +4
-0@@ -53,6 +53,14 @@ pm6150_pwrkey: pwrkey { bias-pull-up; linux,code = <KEY_POWER>; }; + + pm6150_resin: resin { + compatible = "qcom,pm8941-resin"; + interrupts = <GIC_SPI 0x8 1 IRQ_TYPE_EDGE_BOTH>;
0x0 (GIC_SPI is a property of the ARM GIC, SPMI uses the interrupts field in a rather hacky and specific way)
[...]
arch/arm64/boot/dts/qcom/pm6150.dtsi pm6150_adc_tm: adc-tm@3500 { · line 103
Quoted 5 lines
arch/arm64/boot/dts/qcom/pm6150.dtsi +5
-0+ rtc@6000 { + compatible = "qcom,pm8941-rtc"; + reg = <0x6000>, <0x6100>; + reg-names = "rtc", "alarm"; + interrupts = <0x0 0x61 0x1 IRQ_TYPE_NONE>;
IRQ_TYPE_EDGE_RISING
Konrad
Quoted 5 lines
arch/arm64/boot/dts/qcom/pm6150.dtsi +2
-0+ }; + pm6150_gpios: gpio@c000 { compatible = "qcom,pm6150-gpio", "qcom,spmi-gpio"; reg = <0xc000>;
PATCH 6/7 arm64: dts: qcom: Add SM7125 device tree
In reply to David WronekFrom: map220v <[email protected]>
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.
--- 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) 2023, map220v <[email protected]> + */ + +#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 6/7] arm64: dts: qcom: Add SM7125 device tree
Quoted 19 lines · David Wronek
From: map220v <[email protected]>
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 map220v <[email protected]>Signed-off-by David Wronek <[email protected]>--- 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 +0
-0
arch/arm64/boot/dts/qcom/sm7125.dtsi line 3
Quoted 3 lines
arch/arm64/boot/dts/qcom/sm7125.dtsi new file +3
-0@@ -0,0 +1,16 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (c) 2023, map220v <[email protected]>
Really? No "* Copyright (c) 2021, The Linux Foundation. All rights reserved."?
Was there originally, so I wonder...
https://github.com/map220v/sm7125-mainline/commit/e436882505300b41361c18bbd8516db543f7f07c
Best regards,
Krzysztof
PATCH 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 | 420 ++++++++++++++++++ 3 files changed, 437 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) 2023, David Wronek <[email protected]> + */ + +/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 +420 -0
420 lines not on this page · raw message
Signature · 1 line
2.41.0
Re: [PATCH 7/7] arm64: dts: qcom: Add support for the Xiaomi SM7125 platform
Quoted 45 lines · David Wronek
There 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.
Signed-off-by David Wronek <[email protected]>--- arch/arm64/boot/dts/qcom/Makefile | 1 + .../boot/dts/qcom/sm7125-xiaomi-joyeuse.dts | 16 + .../boot/dts/qcom/sm7125-xiaomi-miatoll.dtsi | 420 ++++++++++++++++++ 3 files changed, 437 insertions(+) create mode 100644 arch/arm64/boot/dts/qcom/sm7125-xiaomi-joyeuse.dts create mode 100644 arch/arm64/boot/dts/qcom/sm7125-xiaomi-miatoll.dtsiarch/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.dtbarch/arm64/boot/dts/qcom/sm7125-xiaomi-joyeuse.dts new file +5
-0@@ -0,0 +1,16 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (c) 2023, David Wronek <[email protected]> + */ +
arch/arm64/boot/dts/qcom/sm7125-xiaomi-joyeuse.dts line 15
Quoted 10 lines
arch/arm64/boot/dts/qcom/sm7125-xiaomi-joyeuse.dts new file +10
-0+/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>;
I think you need to amend some list in bindings to allow qcom,abcd-id properties
[...]
arch/arm64/boot/dts/qcom/sm7125-xiaomi-joyeuse.dts
Quoted 7 lines
arch/arm64/boot/dts/qcom/sm7125-xiaomi-joyeuse.dts new file +7
-0+ rmtfs_mem: memory@fa601000 { + compatible = "qcom,rmtfs-mem"; + reg = <0x0 0xfa601000 0x0 0x200000>; + no-map; + + qcom,client-id = <1>; + qcom,vmid = <15>;
QCOM_SCM_VMID_MSS_MSA
from
include/dt-bindings/firmware/qcom,scm.h
Quoted 18 lines
arch/arm64/boot/dts/qcom/sm7125-xiaomi-joyeuse.dts new file +18
-0+ }; + }; +}; + +&apps_rsc { + regulators-0 { + compatible = "qcom,pm6150-rpmh-regulators"; + qcom,pmic-id = "a"; + + vreg_s1a_1p1: smps1 { + regulator-min-microvolt = <1128000>; + regulator-max-microvolt = <1128000>; + }; + + vreg_s4a_1p0: smps4 { + regulator-min-microvolt = <824000>; + regulator-max-microvolt = <1120000>; + };
arch/arm64/boot/dts/qcom/sm7125-xiaomi-joyeuse.dts
Quoted 10 lines
arch/arm64/boot/dts/qcom/sm7125-xiaomi-joyeuse.dts new file +10
-0+ + vreg_s5a_2p0: smps5 { + regulator-min-microvolt = <1744000>; + regulator-max-microvolt = <2040000>; + }; + + vreg_l1a_1p2: ldo1 { + regulator-min-microvolt = <1178000>; + regulator-max-microvolt = <1256000>; + regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
You want HPM, LPM is not guaranteed to give you the desired voltages.
[...]
arch/arm64/boot/dts/qcom/sm7125-xiaomi-joyeuse.dts
Quoted 2 lines
+&sdhc_2 {
arch/arm64/boot/dts/qcom/sm7125-xiaomi-joyeuse.dts new file +1
-0+ status = "okay";
Status last, everywhere
Konrad
Quoted 91 lines
arch/arm64/boot/dts/qcom/sm7125-xiaomi-joyeuse.dts new file +91
-0+ + pinctrl-names = "default","sleep"; + pinctrl-0 = <&sdc2_on>; + pinctrl-1 = <&sdc2_off>; + vmmc-supply = <&vreg_l9c_2p9>; + vqmmc-supply = <&vreg_l6c_3p0>; + + cd-gpios = <&tlmm 69 GPIO_ACTIVE_HIGH>; +}; + +&tlmm { + gpio-reserved-ranges = <0 4>, <34 4>, <59 4>; + + sdc2_on: sdc2-on-state { + clk-pins { + pins = "sdc2_clk"; + bias-disable; + drive-strength = <16>; + }; + + cmd-pins { + pins = "sdc2_cmd"; + bias-pull-up; + drive-strength = <10>; + }; + + data-pins { + pins = "sdc2_data"; + bias-pull-up; + drive-strength = <10>; + }; + + sd-cd-pins { + pins = "gpio69"; + function = "gpio"; + bias-pull-up; + drive-strength = <2>; + }; + }; + + sdc2_off: sdc2-off-state { + clk-pins { + pins = "sdc2_clk"; + bias-disable; + drive-strength = <2>; + }; + + cmd-pins { + pins = "sdc2_cmd"; + bias-pull-up; + drive-strength = <2>; + }; + + data-pins { + pins = "sdc2_data"; + bias-pull-up; + drive-strength = <2>; + }; + + sd-cd-pins { + pins = "gpio69"; + function = "gpio"; + bias-pull-up; + drive-strength = <2>; + }; + }; +}; + +&usb_1 { + qcom,select-utmi-as-pipe-clk; + status = "okay"; +}; + +&usb_1_dwc3 { + maximum-speed = "high-speed"; + dr_mode = "peripheral"; + status = "okay"; +}; + +&usb_1_hsphy { + vdd-supply = <&vreg_l4a_0p88>; + vdda-pll-supply = <&vreg_l11a_1p8>; + vdda-phy-dpdm-supply = <&vreg_l17a_3p1>; + status = "okay"; +}; + +&usb_1_qmpphy { + status = "okay"; + vdda-phy-supply = <&vreg_l4a_0p88>; + vdda-pll-supply = <&vreg_l3c_1p23>; +};
Re: [PATCH 7/7] arm64: dts: qcom: Add support for the Xiaomi SM7125 platform
In reply to David WronekQuoted 40 lines · David Wronek
There 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.
Signed-off-by David Wronek <[email protected]>--- arch/arm64/boot/dts/qcom/Makefile | 1 + .../boot/dts/qcom/sm7125-xiaomi-joyeuse.dts | 16 + .../boot/dts/qcom/sm7125-xiaomi-miatoll.dtsi | 420 ++++++++++++++++++ 3 files changed, 437 insertions(+) create mode 100644 arch/arm64/boot/dts/qcom/sm7125-xiaomi-joyeuse.dts create mode 100644 arch/arm64/boot/dts/qcom/sm7125-xiaomi-miatoll.dtsiarch/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.dtbarch/arm64/boot/dts/qcom/sm7125-xiaomi-joyeuse.dts new file +0
-0
arch/arm64/boot/dts/qcom/sm7125-xiaomi-joyeuse.dts line 3
Quoted 3 lines
arch/arm64/boot/dts/qcom/sm7125-xiaomi-joyeuse.dts new file +3
-0@@ -0,0 +1,16 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (c) 2023, David Wronek <[email protected]>
I have some doubts that result looking exactly like other file is done not as derivative work. Please retain original copyrights.
Best regards,
Krzysztof