Add initial support for SM7125 and Xiaomi SM7125 platform
v5 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]/
Changes in v3:
- Disable pm6150 rtc by default
- Fix wrong pm8150l PMIC in joyeuse dts
- Link to v2: https://lore.kernel.org/all/[email protected]/
Changes in v4:
- Fix key-vol-down node name
- Link to v3: https://lore.kernel.org/all/[email protected]/
Changes in v5:
- Rename common dtsi to sm7125-xiaomi-common
- Link to v4: https://lore.kernel.org/all/[email protected]/
---
David Wronek (4):
dt-bindings: arm: qcom: Document SM7125 and xiaomi,joyeuse board
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 | 16 + .../boot/dts/qcom/sm7125-xiaomi-common.dtsi | 423 ++++++++++++++++++ .../boot/dts/qcom/sm7125-xiaomi-joyeuse.dts | 16 + arch/arm64/boot/dts/qcom/sm7125.dtsi | 16 + 6 files changed, 479 insertions(+) create mode 100644 arch/arm64/boot/dts/qcom/sm7125-xiaomi-common.dtsi create mode 100644 arch/arm64/boot/dts/qcom/sm7125-xiaomi-joyeuse.dts create mode 100644 arch/arm64/boot/dts/qcom/sm7125.dtsi
Signature · 1 line
2.42.0
PATCH v5 1/4 dt-bindings: arm: qcom: Document SM7125 and xiaomi,joyeuse board
Document 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
@@ -79,6 +79,7 @@ description: | sm6125 sm6350 sm6375 + sm7125 sm7225 sm8150 sm8250
@@ -943,6 +944,11 @@ properties: - sony,pdx225 - const: qcom,sm6375 + - items: + - enum: + - xiaomi,joyeuse + - const: qcom,sm7125 + - items: - enum: - fairphone,fp4
@@ -1086,6 +1092,7 @@ allOf: - qcom,sm6115 - qcom,sm6125 - qcom,sm6350 + - qcom,sm7125 - qcom,sm7225 - qcom,sm8150 - qcom,sm8250
Signature · 1 line
2.42.0
PATCH v5 2/4 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, both disabled by default.
--- arch/arm64/boot/dts/qcom/pm6150.dtsi | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)
arch/arm64/boot/dts/qcom/pm6150.dtsi +16 -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,14 @@ pm6150_adc_tm: adc-tm@3500 { status = "disabled"; }; + pm6150_rtc: rtc@6000 { + compatible = "qcom,pm8941-rtc"; + reg = <0x6000>, <0x6100>; + reg-names = "rtc", "alarm"; + interrupts = <0x0 0x61 0x1 IRQ_TYPE_EDGE_RISING>; + status = "disabled"; + }; + pm6150_gpios: gpio@c000 { compatible = "qcom,pm6150-gpio", "qcom,spmi-gpio"; reg = <0xc000>;
Signature · 1 line
2.42.0
PATCH v5 3/4 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.42.0
Re: [PATCH v5 3/4] arm64: dts: qcom: Add SM7125 device tree
Quoted 24 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]>Reviewed-by Konrad Dybcio <[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 +6
-0@@ -0,0 +1,16 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (c) 2021, The Linux Foundation. All rights reserved. + */ + +#include "sc7180.dtsi"
arch/arm64/boot/dts/qcom/sm7125.dtsi line 16
Quoted 10 lines
arch/arm64/boot/dts/qcom/sm7125.dtsi new file +10
-0+ +/* 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"; };
This compatible is not documented. Please add it.
Rob
PATCH v5 4/4 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-common.dtsi | 423 ++++++++++++++++++ .../boot/dts/qcom/sm7125-xiaomi-joyeuse.dts | 16 + 3 files changed, 440 insertions(+) create mode 100644 arch/arm64/boot/dts/qcom/sm7125-xiaomi-common.dtsi create mode 100644 arch/arm64/boot/dts/qcom/sm7125-xiaomi-joyeuse.dts
arch/arm64/boot/dts/qcom/Makefile +1 -0
@@ -196,6 +196,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-common.dtsi new file +423 -0
423 lines not on this page · raw message
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-common.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>; +};
Signature · 1 line
2.42.0
Quoted 5 lines · David Wronek
This series introduces support for the Qualcomm SM7125 SoC and the Xiaomi SM7125 platform.
Signed-off-by David Wronek <[email protected]>---
Would your device boot if you:
- removed qcom,board-id and qcom,msm-id
- created the image like this:
mkbootimg \
--kernel arch/arm64/boot/Image.gz \
--dtb arch/arm64/boot/dts/qcom/blahblah.dtb \
--ramdisk blah.img \
--pagesize 4096 \
--base 0x0 \
--kernel_offset 0x8000 \
--ramdisk_offset 0x1000000 \
--tags_offset 0x100 \
--cmdline "foobarbaz" \
--dtb_offset 0x1f00000 \
--header_version 2 \
-o boot.img
?
Konrad
Quoted 26 lines · Konrad Dybcio
Quoted 5 lines · David Wronek
This series introduces support for the Qualcomm SM7125 SoC and the Xiaomi SM7125 platform.
Signed-off-by David Wronek <[email protected]>---
Would your device boot if you:
- removed qcom,board-id and qcom,msm-id
- created the image like this:mkbootimg \
--kernelarch/arm64/boot/Image.gz\
--dtbarch/arm64/boot/dts/qcom/blahblah.dtb\
--ramdisk blah.img \
--pagesize 4096 \
--base0x0\
--kernel_offset0x8000\
--ramdisk_offset0x1000000\
--tags_offset0x100\
--cmdline "foobarbaz" \
--dtb_offset0x1f00000\
--header_version 2 \
-o boot.img
Quoted 3 lines
?
Konrad
Seems like my device needs those properties, it does not boot without msm-id and board-id and the command you sent.
Sincerely,
David
Quoted 4 lines · David Wronek
This series introduces support for the Qualcomm SM7125 SoC and the Xiaomi SM7125 platform.
Applied, thanks!
[1/4] dt-bindings: arm: qcom: Document SM7125 and xiaomi,joyeuse board
commit: 9b4adf37fdc0ca8cd1d14b4160e2f04b63df98e6
[2/4] arm64: dts: qcom: pm6150: Add resin and rtc nodes
commit: ec053ec90c245a4efc8dda87d9207de0adf0040e
[3/4] arm64: dts: qcom: Add SM7125 device tree
commit: 72fbf05149bd451e7222c2ed1e3823972f19df9c
[4/4] arm64: dts: qcom: Add support for the Xiaomi SM7125 platform
commit: 7d65d4b7d70fb9560ce9baaf4219fb24646bd578Best regards,
Signature · 1 line
Bjorn Andersson <[email protected]>