* [PATCH v2 0/2] Introduce support for Xiaomi Mi 8
@ 2026-09-15 14:32 ` David Heidelberg via B4 Relay
0 siblings, 0 replies; 10+ messages in thread
From: David Heidelberg @ 2026-09-15 14:32 UTC (permalink / raw)
To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Kees Cook, Tony Luck, Guilherme G. Piccoli
Cc: linux-arm-msm, devicetree, linux-kernel, phone-devel,
David Heidelberg
Currently only Mi 8 itself is supported, but the
sdm845-xiaomi-dipper-common should ensure, that other family members
such as Mi 8 Pro, Mi 8 Explorer will be likely supported too without
much of additional work. These variants should differ only in the small
details (such as battery size, fingerprint sensor etc.).
Minimal viable support for xiaomi-dipper. Enough to get basic u-boot and
Linux functional. More improvements will follow.
The display and touchscreen support are work-in-progress, but waiting
for other bits to land.
Signed-off-by: David Heidelberg <david@ixit.cz>
---
Changes in v2:
- Deduplicate simplified xiaomi,dipper compatbile from the dt-binding.
- Reorder reserved-memory by address.
- vreg-s4a-1p8 -> regulator-vreg-s4a-1p8. (Konrad)
- adsp firmware moved to dipper variant (as I cannot test others)
(Konrad)
- Removed Bluetooth path comment. (Konrad)
- Link to v1: https://patch.msgid.link/20260809-dipper-v1-0-eb4d501e85df@ixit.cz
---
David Heidelberg (2):
dt-bindings: arm: qcom: Add Xiaomi Mi 8 family compatibles
arm64: dts: qcom: add Xiaomi Mi 8 (dipper)
Documentation/devicetree/bindings/arm/qcom.yaml | 9 +
arch/arm64/boot/dts/qcom/Makefile | 1 +
.../boot/dts/qcom/sdm845-xiaomi-dipper-common.dtsi | 607 +++++++++++++++++++++
arch/arm64/boot/dts/qcom/sdm845-xiaomi-dipper.dts | 36 ++
4 files changed, 653 insertions(+)
---
base-commit: 7079a12d7506b07fb53b54a664bfad5fa9b16d70
change-id: 20260720-dipper-8fd3f1e475bc
Best regards,
--
David Heidelberg <david@ixit.cz>
^ permalink raw reply [flat|nested] 10+ messages in thread* [PATCH v2 0/2] Introduce support for Xiaomi Mi 8 @ 2026-09-15 14:32 ` David Heidelberg via B4 Relay 0 siblings, 0 replies; 10+ messages in thread From: David Heidelberg via B4 Relay @ 2026-09-15 14:32 UTC (permalink / raw) To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Kees Cook, Tony Luck, Guilherme G. Piccoli Cc: linux-arm-msm, devicetree, linux-kernel, phone-devel, David Heidelberg Currently only Mi 8 itself is supported, but the sdm845-xiaomi-dipper-common should ensure, that other family members such as Mi 8 Pro, Mi 8 Explorer will be likely supported too without much of additional work. These variants should differ only in the small details (such as battery size, fingerprint sensor etc.). Minimal viable support for xiaomi-dipper. Enough to get basic u-boot and Linux functional. More improvements will follow. The display and touchscreen support are work-in-progress, but waiting for other bits to land. Signed-off-by: David Heidelberg <david@ixit.cz> --- Changes in v2: - Deduplicate simplified xiaomi,dipper compatbile from the dt-binding. - Reorder reserved-memory by address. - vreg-s4a-1p8 -> regulator-vreg-s4a-1p8. (Konrad) - adsp firmware moved to dipper variant (as I cannot test others) (Konrad) - Removed Bluetooth path comment. (Konrad) - Link to v1: https://patch.msgid.link/20260809-dipper-v1-0-eb4d501e85df@ixit.cz --- David Heidelberg (2): dt-bindings: arm: qcom: Add Xiaomi Mi 8 family compatibles arm64: dts: qcom: add Xiaomi Mi 8 (dipper) Documentation/devicetree/bindings/arm/qcom.yaml | 9 + arch/arm64/boot/dts/qcom/Makefile | 1 + .../boot/dts/qcom/sdm845-xiaomi-dipper-common.dtsi | 607 +++++++++++++++++++++ arch/arm64/boot/dts/qcom/sdm845-xiaomi-dipper.dts | 36 ++ 4 files changed, 653 insertions(+) --- base-commit: 7079a12d7506b07fb53b54a664bfad5fa9b16d70 change-id: 20260720-dipper-8fd3f1e475bc Best regards, -- David Heidelberg <david@ixit.cz> ^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v2 1/2] dt-bindings: arm: qcom: Add Xiaomi Mi 8 family compatibles 2026-09-15 14:32 ` David Heidelberg via B4 Relay @ 2026-09-15 14:32 ` David Heidelberg via B4 Relay -1 siblings, 0 replies; 10+ messages in thread From: David Heidelberg @ 2026-09-15 14:32 UTC (permalink / raw) To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Kees Cook, Tony Luck, Guilherme G. Piccoli Cc: linux-arm-msm, devicetree, linux-kernel, phone-devel, David Heidelberg This smartphone codenamed dipper is now supported by this series, variants such as ursa and equuleus just documented. Signed-off-by: David Heidelberg <david@ixit.cz> --- Documentation/devicetree/bindings/arm/qcom.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Documentation/devicetree/bindings/arm/qcom.yaml b/Documentation/devicetree/bindings/arm/qcom.yaml index ff8a35df7862d..c3491630e56d1 100644 --- a/Documentation/devicetree/bindings/arm/qcom.yaml +++ b/Documentation/devicetree/bindings/arm/qcom.yaml @@ -945,16 +945,25 @@ properties: - const: qcom,sdm670 - items: - enum: - google,bonito-tianma - const: google,bonito - const: qcom,sdm670 + - description: Xiaomi Mi 8 family + items: + - enum: + - xiaomi,dipper + - xiaomi,equuleus + - xiaomi,ursa + - const: xiaomi,dipper-common + - const: qcom,sdm845 + - description: Xiaomi Poco F1 items: - enum: - xiaomi,beryllium-ebbg - xiaomi,beryllium-tianma - const: xiaomi,beryllium - const: qcom,sdm845 -- 2.55.0 ^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH v2 1/2] dt-bindings: arm: qcom: Add Xiaomi Mi 8 family compatibles @ 2026-09-15 14:32 ` David Heidelberg via B4 Relay 0 siblings, 0 replies; 10+ messages in thread From: David Heidelberg via B4 Relay @ 2026-09-15 14:32 UTC (permalink / raw) To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Kees Cook, Tony Luck, Guilherme G. Piccoli Cc: linux-arm-msm, devicetree, linux-kernel, phone-devel, David Heidelberg From: David Heidelberg <david@ixit.cz> This smartphone codenamed dipper is now supported by this series, variants such as ursa and equuleus just documented. Signed-off-by: David Heidelberg <david@ixit.cz> --- Documentation/devicetree/bindings/arm/qcom.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Documentation/devicetree/bindings/arm/qcom.yaml b/Documentation/devicetree/bindings/arm/qcom.yaml index ff8a35df7862d..c3491630e56d1 100644 --- a/Documentation/devicetree/bindings/arm/qcom.yaml +++ b/Documentation/devicetree/bindings/arm/qcom.yaml @@ -945,16 +945,25 @@ properties: - const: qcom,sdm670 - items: - enum: - google,bonito-tianma - const: google,bonito - const: qcom,sdm670 + - description: Xiaomi Mi 8 family + items: + - enum: + - xiaomi,dipper + - xiaomi,equuleus + - xiaomi,ursa + - const: xiaomi,dipper-common + - const: qcom,sdm845 + - description: Xiaomi Poco F1 items: - enum: - xiaomi,beryllium-ebbg - xiaomi,beryllium-tianma - const: xiaomi,beryllium - const: qcom,sdm845 -- 2.55.0 ^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH v2 1/2] dt-bindings: arm: qcom: Add Xiaomi Mi 8 family compatibles 2026-09-15 14:32 ` David Heidelberg via B4 Relay (?) @ 2026-09-17 10:21 ` Krzysztof Kozlowski 2026-09-17 10:25 ` David Heidelberg -1 siblings, 1 reply; 10+ messages in thread From: Krzysztof Kozlowski @ 2026-09-17 10:21 UTC (permalink / raw) To: David Heidelberg Cc: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Kees Cook, Tony Luck, Guilherme G. Piccoli, linux-arm-msm, devicetree, linux-kernel, phone-devel On Tue, Sep 15, 2026 at 04:32:24PM +0200, David Heidelberg wrote: > + - description: Xiaomi Mi 8 family > + items: > + - enum: > + - xiaomi,dipper > + - xiaomi,equuleus > + - xiaomi,ursa > + - const: xiaomi,dipper-common We do not make "common" compatibles. git grep common -- Documentation/devicetree/bindings/arm/qcom.yaml See other examples how this can be named, even one below: > + - const: qcom,sdm845 > + > - description: Xiaomi Poco F1 > items: > - enum: > - xiaomi,beryllium-ebbg > - xiaomi,beryllium-tianma > - const: xiaomi,beryllium > - const: qcom,sdm845 Best regards, Krzysztof ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v2 1/2] dt-bindings: arm: qcom: Add Xiaomi Mi 8 family compatibles 2026-09-17 10:21 ` Krzysztof Kozlowski @ 2026-09-17 10:25 ` David Heidelberg 2026-09-18 8:40 ` Krzysztof Kozlowski 0 siblings, 1 reply; 10+ messages in thread From: David Heidelberg @ 2026-09-17 10:25 UTC (permalink / raw) To: Krzysztof Kozlowski Cc: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Kees Cook, Tony Luck, Guilherme G. Piccoli, linux-arm-msm, devicetree, linux-kernel, phone-devel On 17/09/2026 12:21, Krzysztof Kozlowski wrote: > On Tue, Sep 15, 2026 at 04:32:24PM +0200, David Heidelberg wrote: >> + - description: Xiaomi Mi 8 family >> + items: >> + - enum: >> + - xiaomi,dipper >> + - xiaomi,equuleus >> + - xiaomi,ursa >> + - const: xiaomi,dipper-common > > We do not make "common" compatibles. > git grep common -- Documentation/devicetree/bindings/arm/qcom.yaml TBH I have mental issue with calling it xiaomi,dipper-dipper All three devices are branded as own devices, just based on 99.9% same base. I'm not aware of any internal name which group these devices. I could call it like xiaomi,common, but there is the polaris and beryllium, which aren't "that common" with these three. Do you have idea what to do in this situation? David > > See other examples how this can be named, even one below: > >> + - const: qcom,sdm845 >> + >> - description: Xiaomi Poco F1 >> items: >> - enum: >> - xiaomi,beryllium-ebbg >> - xiaomi,beryllium-tianma >> - const: xiaomi,beryllium >> - const: qcom,sdm845 > > Best regards, > Krzysztof > ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v2 1/2] dt-bindings: arm: qcom: Add Xiaomi Mi 8 family compatibles 2026-09-17 10:25 ` David Heidelberg @ 2026-09-18 8:40 ` Krzysztof Kozlowski 0 siblings, 0 replies; 10+ messages in thread From: Krzysztof Kozlowski @ 2026-09-18 8:40 UTC (permalink / raw) To: David Heidelberg Cc: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Kees Cook, Tony Luck, Guilherme G. Piccoli, linux-arm-msm, devicetree, linux-kernel, phone-devel On 17/09/2026 12:25, David Heidelberg wrote: > On 17/09/2026 12:21, Krzysztof Kozlowski wrote: >> On Tue, Sep 15, 2026 at 04:32:24PM +0200, David Heidelberg wrote: >>> + - description: Xiaomi Mi 8 family >>> + items: >>> + - enum: >>> + - xiaomi,dipper >>> + - xiaomi,equuleus >>> + - xiaomi,ursa >>> + - const: xiaomi,dipper-common >> >> We do not make "common" compatibles. >> git grep common -- Documentation/devicetree/bindings/arm/qcom.yaml > > TBH I have mental issue with calling it xiaomi,dipper-dipper > > All three devices are branded as own devices, just based on 99.9% same base. > > I'm not aware of any internal name which group these devices. > > I could call it like xiaomi,common, but there is the polaris and beryllium, > which aren't "that common" with these three. > > Do you have idea what to do in this situation? Just don't use "common" or "generic" or anything close to it, because it confuses future contributors thinking "common" compatible is allowed. It's not. Except above, the actual names of compatibles are irrelevant, they just need to uniquely identify the device. Personally, I would not use nicknames at all for devices because they tell me nothing. Maybe they tell to you because you read internal source code, but not to me. And if you google for Xiaomi Dipper, you will find first forks of code, so again not source information but derivative. Only fifth result is gsmarena website, but weirdly it does not have even "dipper" text mentioned. So basically using such names is counter productive to me, confusing and bringing downstream - postmarketos or lineageos - practices to upstream. Basically downstream forks create some codename and you push it to the usptream. You can, but I don't find it useful. I would use proper model names, e.g. "xiaomi,mi-8" for final compatibles. Codename for family is fine, because simply there is no product which we could identify as common base... Best regards, Krzysztof ^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v2 2/2] arm64: dts: qcom: add Xiaomi Mi 8 (dipper) 2026-09-15 14:32 ` David Heidelberg via B4 Relay @ 2026-09-15 14:32 ` David Heidelberg via B4 Relay -1 siblings, 0 replies; 10+ messages in thread From: David Heidelberg @ 2026-09-15 14:32 UTC (permalink / raw) To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Kees Cook, Tony Luck, Guilherme G. Piccoli Cc: linux-arm-msm, devicetree, linux-kernel, phone-devel, David Heidelberg Initial submission for one member of the prime Xiaomi Mi 8 family. Mi 8 Pro (equuleus) and Mi 8 Explorer (ursa) are nearly identical. Known differences are battery capacity and fingerprint sensor placement. This submission includes basic abstraction for other developers to be able easily extend it to support other variants. What does work: framebuffer, USB, UFS, Bluetooth, Wi-Fi. Based on work of multiple people trying to bring the device in the past. Last attempt was done by Max Furman. Signed-off-by: David Heidelberg <david@ixit.cz> --- arch/arm64/boot/dts/qcom/Makefile | 1 + .../boot/dts/qcom/sdm845-xiaomi-dipper-common.dtsi | 607 +++++++++++++++++++++ arch/arm64/boot/dts/qcom/sdm845-xiaomi-dipper.dts | 36 ++ 3 files changed, 644 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/Makefile b/arch/arm64/boot/dts/qcom/Makefile index 1c86e7e98f55d..02793d00503e3 100644 --- a/arch/arm64/boot/dts/qcom/Makefile +++ b/arch/arm64/boot/dts/qcom/Makefile @@ -325,16 +325,17 @@ dtb-$(CONFIG_ARCH_QCOM) += sdm845-mtp.dtb dtb-$(CONFIG_ARCH_QCOM) += sdm845-oneplus-enchilada.dtb dtb-$(CONFIG_ARCH_QCOM) += sdm845-oneplus-fajita.dtb dtb-$(CONFIG_ARCH_QCOM) += sdm845-samsung-starqltechn.dtb dtb-$(CONFIG_ARCH_QCOM) += sdm845-sony-xperia-tama-akari.dtb dtb-$(CONFIG_ARCH_QCOM) += sdm845-sony-xperia-tama-akatsuki.dtb dtb-$(CONFIG_ARCH_QCOM) += sdm845-sony-xperia-tama-apollo.dtb dtb-$(CONFIG_ARCH_QCOM) += sdm845-xiaomi-beryllium-ebbg.dtb dtb-$(CONFIG_ARCH_QCOM) += sdm845-xiaomi-beryllium-tianma.dtb +dtb-$(CONFIG_ARCH_QCOM) += sdm845-xiaomi-dipper.dtb dtb-$(CONFIG_ARCH_QCOM) += sdm845-xiaomi-polaris.dtb dtb-$(CONFIG_ARCH_QCOM) += sdm845-shift-axolotl.dtb dtb-$(CONFIG_ARCH_QCOM) += sdm850-huawei-matebook-e-2019.dtb dtb-$(CONFIG_ARCH_QCOM) += sdm850-lenovo-yoga-c630.dtb dtb-$(CONFIG_ARCH_QCOM) += sdm850-samsung-w737.dtb dtb-$(CONFIG_ARCH_QCOM) += sdx75-idp.dtb dtb-$(CONFIG_ARCH_QCOM) += shikra-cqm-evk.dtb dtb-$(CONFIG_ARCH_QCOM) += shikra-cqs-evk.dtb diff --git a/arch/arm64/boot/dts/qcom/sdm845-xiaomi-dipper-common.dtsi b/arch/arm64/boot/dts/qcom/sdm845-xiaomi-dipper-common.dtsi new file mode 100644 index 0000000000000..eb4243e7f2c07 --- /dev/null +++ b/arch/arm64/boot/dts/qcom/sdm845-xiaomi-dipper-common.dtsi @@ -0,0 +1,607 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Xiaomi Mi 8 family common device tree source. + * Covers Mi 8 Explorer Edition (equuleus), Mi 8 (dipper), Mi 8 Pro (urza). + * + * Copyright David Heidelberg. + */ + +/dts-v1/; + +#include <dt-bindings/arm/qcom,ids.h> +#include <dt-bindings/firmware/qcom,scm.h> +#include <dt-bindings/gpio/gpio.h> +#include <dt-bindings/input/linux-event-codes.h> +#include <dt-bindings/interrupt-controller/irq.h> +#include <dt-bindings/phy/phy-qcom-qusb2.h> +#include <dt-bindings/regulator/qcom,rpmh-regulator.h> +#include "sdm845.dtsi" +#include "pm8998.dtsi" +#include "pmi8998.dtsi" + +/delete-node/ &adsp_mem; +/delete-node/ &cdsp_mem; +/delete-node/ &mba_region; +/delete-node/ &mpss_region; +/delete-node/ &rmtfs_mem; +/delete-node/ &slpi_mem; +/delete-node/ &spss_mem; +/delete-node/ &tz_mem; +/delete-node/ &venus_mem; +/delete-node/ &wlan_msa_mem; + +/ { + chassis-type = "handset"; + + qcom,msm-id = <QCOM_ID_SDM845 0x20001>; + + aliases { + serial0 = &uart9; + serial1 = &uart6; + }; + + chosen { + #address-cells = <2>; + #size-cells = <2>; + ranges; + + framebuffer { + compatible = "simple-framebuffer"; + memory-region = <&cont_splash_mem>; + + vci-supply = <&vreg_panel_vci>; + vddio-supply = <&vreg_panel_vddio>; + + width = <1080>; + height = <2248>; + stride = <(1080 * 4)>; + format = "a8r8g8b8"; + }; + }; + + gpio-keys { + compatible = "gpio-keys"; + autorepeat; + + pinctrl-0 = <&volume_up_gpio>; + pinctrl-names = "default"; + + key-volume-up { + label = "Volume Up"; + linux,code = <KEY_VOLUMEUP>; + gpios = <&pm8998_gpios 6 GPIO_ACTIVE_LOW>; + wakeup-source; + debounce-interval = <15>; + }; + }; + + vreg_panel_vci: regulator-panel-vci { + compatible = "regulator-fixed"; + regulator-name = "panel_vci_vreg"; + + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3000000>; + + gpio = <&tlmm 35 GPIO_ACTIVE_HIGH>; + enable-active-high; + startup-delay-us = <4000>; + regulator-boot-on; + }; + + vreg_panel_vddio: regulator-panel-vddio { + compatible = "regulator-fixed"; + regulator-name = "panel_vddio_vreg"; + + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + + gpio = <&tlmm 23 GPIO_ACTIVE_HIGH>; + enable-active-high; + startup-delay-us = <4000>; + regulator-boot-on; + }; + + vph_pwr: regulator-vph-pwr { + compatible = "regulator-fixed"; + regulator-name = "vph_pwr"; + + regulator-min-microvolt = <3700000>; + regulator-max-microvolt = <3700000>; + }; + + vreg_s4a_1p8: regulator-vreg-s4a-1p8 { + compatible = "regulator-fixed"; + regulator-name = "vreg_s4a_1p8"; + + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-always-on; + regulator-boot-on; + + vin-supply = <&vph_pwr>; + }; + + reserved-memory { + /* + * It seems like reserving the old rmtfs_mem region is + * also needed to prevent random crashes + */ + old-rmtfs@88f00000 { + reg = <0 0x88f00000 0 0x200000>; + no-map; + }; + + adsp_mem: adsp@8c500000 { + reg = <0 0x8c500000 0 0x1e00000>; + no-map; + }; + + wlan_msa_mem: wlan-msa@8e300000 { + reg = <0 0x8e300000 0 0x100000>; + no-map; + }; + + mpss_region: mpss@8e400000 { + reg = <0 0x8e400000 0 0x7800000>; + no-map; + }; + + venus_mem: venus@95c00000 { + reg = <0 0x95c00000 0 0x500000>; + no-map; + }; + + cdsp_mem: cdsp@96100000 { + reg = <0 0x96100000 0 0x800000>; + no-map; + }; + + mba_region: mba@96900000 { + reg = <0 0x96900000 0 0x200000>; + no-map; + }; + + slpi_mem: slpi@96b00000 { + reg = <0 0x96b00000 0 0x1400000>; + no-map; + }; + + spss_mem: spss@97f00000 { + reg = <0 0x97f00000 0 0x100000>; + no-map; + }; + + cont_splash_mem: splash@9d400000 { + reg = <0 0x9d400000 0 0x950000>; + no-map; + }; + + ramoops@b0000000 { + compatible = "ramoops"; + reg = <0 0xb0000000 0 0x00400000>; + record-size = <0x40000>; + console-size = <0x40000>; + ftrace-size = <0x40000>; + pmsg-size = <0x200000>; + }; + + rmtfs_mem: memory@f7300000 { + compatible = "qcom,rmtfs-mem"; + reg = <0 0xf7300000 0 0x202000>; + qcom,use-guard-pages; + no-map; + + qcom,client-id = <1>; + qcom,vmid = <QCOM_SCM_VMID_MSS_MSA>; + }; + }; + + wcn3990-pmu { + compatible = "qcom,wcn3990-pmu"; + + pinctrl-0 = <&sw_ctrl_default>; + pinctrl-names = "default"; + + vddio-supply = <&vreg_s4a_1p8>; + vddxo-supply = <&vreg_l7a_1p8>; + vddrf-supply = <&vreg_l17a_1p3>; + vddch0-supply = <&vreg_l25a_3p3>; + vddch1-supply = <&vreg_l23a_3p3>; + + swctrl-gpios = <&pm8998_gpios 3 GPIO_ACTIVE_HIGH>; + + regulators { + vreg_pmu_io: ldo0 { + regulator-name = "vreg_pmu_io"; + }; + + vreg_pmu_xo: ldo1 { + regulator-name = "vreg_pmu_xo"; + }; + + vreg_pmu_rf: ldo2 { + regulator-name = "vreg_pmu_rf"; + }; + + vreg_pmu_ch0: ldo3 { + regulator-name = "vreg_pmu_ch0"; + }; + + vreg_pmu_ch1: ldo4 { + regulator-name = "vreg_pmu_ch1"; + }; + }; + }; +}; + +&apps_rsc { + regulators-0 { + compatible = "qcom,pm8998-rpmh-regulators"; + qcom,pmic-id = "a"; + + vdd-s1-supply = <&vph_pwr>; + vdd-s2-supply = <&vph_pwr>; + vdd-s3-supply = <&vph_pwr>; + vdd-s4-supply = <&vph_pwr>; + vdd-s5-supply = <&vph_pwr>; + vdd-s6-supply = <&vph_pwr>; + vdd-s7-supply = <&vph_pwr>; + vdd-s8-supply = <&vph_pwr>; + vdd-s9-supply = <&vph_pwr>; + vdd-s10-supply = <&vph_pwr>; + vdd-s11-supply = <&vph_pwr>; + vdd-s12-supply = <&vph_pwr>; + vdd-s13-supply = <&vph_pwr>; + vdd-l1-l27-supply = <&vreg_s7a_1p025>; + vdd-l2-l8-l17-supply = <&vreg_s3a_1p35>; + vdd-l3-l11-supply = <&vreg_s7a_1p025>; + vdd-l4-l5-supply = <&vreg_s7a_1p025>; + vdd-l6-supply = <&vph_pwr>; + vdd-l7-l12-l14-l15-supply = <&vreg_s5a_2p04>; + vdd-l9-supply = <&vreg_bob>; + vdd-l10-l23-l25-supply = <&vreg_bob>; + vdd-l13-l19-l21-supply = <&vreg_bob>; + vdd-l16-l28-supply = <&vreg_bob>; + vdd-l18-l22-supply = <&vreg_bob>; + vdd-l20-l24-supply = <&vreg_bob>; + vdd-l26-supply = <&vreg_s3a_1p35>; + vin-lvs-1-2-supply = <&vreg_s4a_1p8>; + + vreg_s2a_1p125: smps2 { + regulator-min-microvolt = <1100000>; + regulator-max-microvolt = <1100000>; + }; + + vreg_s3a_1p35: smps3 { + regulator-min-microvolt = <1352000>; + regulator-max-microvolt = <1352000>; + }; + + vreg_s5a_2p04: smps5 { + regulator-min-microvolt = <1904000>; + regulator-max-microvolt = <2040000>; + }; + + vreg_s7a_1p025: smps7 { + regulator-min-microvolt = <900000>; + regulator-max-microvolt = <1028000>; + }; + + vreg_l1a_0p875: ldo1 { + regulator-min-microvolt = <880000>; + regulator-max-microvolt = <880000>; + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; + }; + + vreg_l2a_1p2: ldo2 { + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; + regulator-always-on; + }; + + vreg_l5a_0p8: ldo5 { + regulator-min-microvolt = <800000>; + regulator-max-microvolt = <800000>; + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; + }; + + vreg_l7a_1p8: ldo7 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; + }; + + vreg_l12a_1p8: ldo12 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; + }; + + vreg_l14a_1p8: ldo14 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; + regulator-boot-on; + regulator-always-on; + }; + + vreg_l17a_1p3: ldo17 { + regulator-min-microvolt = <1304000>; + regulator-max-microvolt = <1304000>; + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; + }; + + vreg_l20a_2p95: ldo20 { + regulator-min-microvolt = <2950000>; + regulator-max-microvolt = <2960000>; + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; + }; + + vreg_l22a_2p864: ldo22 { + regulator-min-microvolt = <2864000>; + regulator-max-microvolt = <2864000>; + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; + }; + + vreg_l23a_3p3: ldo23 { + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3312000>; + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; + }; + + vreg_l24a_3p075: ldo24 { + regulator-min-microvolt = <3088000>; + regulator-max-microvolt = <3088000>; + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; + }; + + vreg_l25a_3p3: ldo25 { + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3312000>; + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; + }; + + vreg_l26a_1p2: ldo26 { + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; + regulator-boot-on; + }; + + vreg_l28a_3p3: ldo28 { + regulator-min-microvolt = <2856000>; + regulator-max-microvolt = <3008000>; + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; + }; + + vreg_lvs1_1p8: lvs1 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + }; + }; + + regulators-1 { + compatible = "qcom,pmi8998-rpmh-regulators"; + qcom,pmic-id = "b"; + + vdd-bob-supply = <&vph_pwr>; + + vreg_bob: bob { + regulator-min-microvolt = <3312000>; + regulator-max-microvolt = <3600000>; + regulator-initial-mode = <RPMH_REGULATOR_MODE_AUTO>; + regulator-allow-bypass; + }; + }; +}; + +&dispcc { + /* Disable for now so simple-framebuffer continues working */ + status = "disabled"; +}; + +&gcc { + protected-clocks = <GCC_QSPI_CORE_CLK>, + <GCC_QSPI_CORE_CLK_SRC>, + <GCC_QSPI_CNOC_PERIPH_AHB_CLK>, + <GCC_LPASS_Q6_AXI_CLK>, + <GCC_LPASS_SWAY_CLK>; +}; + +&gpi_dma0 { + status = "okay"; +}; + +&gpi_dma1 { + status = "okay"; +}; + +&gpu { + status = "okay"; +}; + +&gpu_zap_shader { + firmware-name = "qcom/sdm845/Xiaomi/dipper/a630_zap.mbn"; +}; + +&ibb { + regulator-min-microvolt = <4600000>; + regulator-max-microvolt = <6000000>; + regulator-over-current-protection; + regulator-pull-down; + regulator-soft-start; +}; + +&ipa { + firmware-name = "qcom/sdm845/Xiaomi/dipper/ipa_fws.mbn"; + + status = "okay"; +}; + +&lab { + regulator-min-microvolt = <4600000>; + regulator-max-microvolt = <6000000>; + regulator-pull-down; + regulator-soft-start; +}; + +&mdss { + /* Disable for now so simple-framebuffer continues working */ + status = "disabled"; +}; + +&mss_pil { + firmware-name = "qcom/sdm845/Xiaomi/dipper/mba.mbn", + "qcom/sdm845/Xiaomi/dipper/modem.mbn"; + + status = "okay"; +}; + +&pmi8998_charger { + monitored-battery = <&battery>; + + status = "okay"; +}; + +&pm8998_gpios { + sw_ctrl_default: sw-ctrl-default-state { + pins = "gpio3"; + function = "normal"; + input-enable; + bias-pull-down; + }; + + volume_up_gpio: vol-up-active-state { + pins = "gpio6"; + function = "normal"; + input-enable; + bias-pull-up; + power-source = <0>; + }; +}; + +&pm8998_resin { + linux,code = <KEY_VOLUMEDOWN>; + + status = "okay"; +}; + +&qupv3_id_0 { + status = "okay"; +}; + +&qupv3_id_1 { + status = "okay"; +}; + +&qup_uart9_rx { + drive-strength = <2>; + bias-pull-up; +}; + +&qup_uart9_tx { + drive-strength = <2>; + bias-disable; +}; + +&i2c5 { + status = "okay"; + + /* tas2557 @4c */ +}; + +&i2c14 { + clock-frequency = <400000>; + + status = "okay"; + + /* stmfts5 @49 */ +}; + +&tlmm { + gpio-reserved-ranges = < 0 4>, /* SPI (Goodix Fingerprint) */ + <81 4>; /* SPI (Synaptics Fingerprint) */ +}; + +&ufs_mem_hc { + reset-gpios = <&tlmm 150 GPIO_ACTIVE_LOW>; + + vcc-supply = <&vreg_l20a_2p95>; + vcc-max-microamp = <600000>; + vccq2-supply = <&vreg_s4a_1p8>; + vccq2-max-microamp = <600000>; + + status = "okay"; + +}; + +&ufs_mem_phy { + vdda-phy-supply = <&vreg_l1a_0p875>; + vdda-pll-supply = <&vreg_l26a_1p2>; + + status = "okay"; +}; + +&usb_1 { + qcom,select-utmi-as-pipe-clk; + + status = "okay"; +}; + +&usb_1_dwc3 { + /* Until we have Type C hooked up we'll force this as peripheral. */ + dr_mode = "peripheral"; + + maximum-speed = "high-speed"; + phys = <&usb_1_hsphy>; + phy-names = "usb2-phy"; +}; + +&usb_1_hsphy { + vdd-supply = <&vreg_l1a_0p875>; + vdda-pll-supply = <&vreg_l12a_1p8>; + vdda-phy-dpdm-supply = <&vreg_l24a_3p075>; + + qcom,imp-res-offset-value = <8>; + qcom,hstx-trim-value = <QUSB2_V2_HSTX_TRIM_21_6_MA>; + qcom,preemphasis-level = <QUSB2_V2_PREEMPHASIS_5_PERCENT>; + qcom,preemphasis-width = <QUSB2_V2_PREEMPHASIS_WIDTH_HALF_BIT>; + + status = "okay"; +}; + +&uart6 { + pinctrl-0 = <&qup_uart6_4pin>; + + status = "okay"; + + bluetooth { + compatible = "qcom,wcn3990-bt"; + + firmware-name = "Xiaomi/dipper/crnv21.bin"; + + vddio-supply = <&vreg_pmu_io>; + vddxo-supply = <&vreg_pmu_xo>; + vddrf-supply = <&vreg_pmu_rf>; + vddch0-supply = <&vreg_pmu_ch0>; + + max-speed = <3200000>; + }; +}; + +&uart9 { + status = "okay"; +}; + +&wifi { + vdd-0.8-cx-mx-supply = <&vreg_l5a_0p8>; + vdd-1.8-xo-supply = <&vreg_pmu_xo>; + vdd-1.3-rfa-supply = <&vreg_pmu_rf>; + vdd-3.3-ch0-supply = <&vreg_pmu_ch0>; + vdd-3.3-ch1-supply = <&vreg_pmu_ch1>; + + qcom,snoc-host-cap-skip-quirk; + + status = "okay"; +}; diff --git a/arch/arm64/boot/dts/qcom/sdm845-xiaomi-dipper.dts b/arch/arm64/boot/dts/qcom/sdm845-xiaomi-dipper.dts new file mode 100644 index 0000000000000..bf45fe8fde80b --- /dev/null +++ b/arch/arm64/boot/dts/qcom/sdm845-xiaomi-dipper.dts @@ -0,0 +1,36 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Xiaomi Mi 8 (dipper). + * + * Copyright David Heidelberg. + */ + +/dts-v1/; + +#include "sdm845-xiaomi-dipper-common.dtsi" + +/ { + model = "Xiaomi Mi 8"; + compatible = "xiaomi,dipper", "xiaomi,dipper-common", "qcom,sdm845"; + + qcom,board-id = <55 0>; + + battery: battery { + compatible = "simple-battery"; + + charge-full-design-microamp-hours = <3400000>; + voltage-min-design-microvolt = <3400000>; + voltage-max-design-microvolt = <4400000>; + }; + +}; + +&adsp_pas { + firmware-name = "qcom/sdm845/Xiaomi/dipper/adsp.mbn"; + + status = "okay"; +}; + +&wifi { + qcom,calibration-variant = "Xiaomi_dipper"; +}; -- 2.55.0 ^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH v2 2/2] arm64: dts: qcom: add Xiaomi Mi 8 (dipper) @ 2026-09-15 14:32 ` David Heidelberg via B4 Relay 0 siblings, 0 replies; 10+ messages in thread From: David Heidelberg via B4 Relay @ 2026-09-15 14:32 UTC (permalink / raw) To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Kees Cook, Tony Luck, Guilherme G. Piccoli Cc: linux-arm-msm, devicetree, linux-kernel, phone-devel, David Heidelberg From: David Heidelberg <david@ixit.cz> Initial submission for one member of the prime Xiaomi Mi 8 family. Mi 8 Pro (equuleus) and Mi 8 Explorer (ursa) are nearly identical. Known differences are battery capacity and fingerprint sensor placement. This submission includes basic abstraction for other developers to be able easily extend it to support other variants. What does work: framebuffer, USB, UFS, Bluetooth, Wi-Fi. Based on work of multiple people trying to bring the device in the past. Last attempt was done by Max Furman. Signed-off-by: David Heidelberg <david@ixit.cz> --- arch/arm64/boot/dts/qcom/Makefile | 1 + .../boot/dts/qcom/sdm845-xiaomi-dipper-common.dtsi | 607 +++++++++++++++++++++ arch/arm64/boot/dts/qcom/sdm845-xiaomi-dipper.dts | 36 ++ 3 files changed, 644 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/Makefile b/arch/arm64/boot/dts/qcom/Makefile index 1c86e7e98f55d..02793d00503e3 100644 --- a/arch/arm64/boot/dts/qcom/Makefile +++ b/arch/arm64/boot/dts/qcom/Makefile @@ -325,16 +325,17 @@ dtb-$(CONFIG_ARCH_QCOM) += sdm845-mtp.dtb dtb-$(CONFIG_ARCH_QCOM) += sdm845-oneplus-enchilada.dtb dtb-$(CONFIG_ARCH_QCOM) += sdm845-oneplus-fajita.dtb dtb-$(CONFIG_ARCH_QCOM) += sdm845-samsung-starqltechn.dtb dtb-$(CONFIG_ARCH_QCOM) += sdm845-sony-xperia-tama-akari.dtb dtb-$(CONFIG_ARCH_QCOM) += sdm845-sony-xperia-tama-akatsuki.dtb dtb-$(CONFIG_ARCH_QCOM) += sdm845-sony-xperia-tama-apollo.dtb dtb-$(CONFIG_ARCH_QCOM) += sdm845-xiaomi-beryllium-ebbg.dtb dtb-$(CONFIG_ARCH_QCOM) += sdm845-xiaomi-beryllium-tianma.dtb +dtb-$(CONFIG_ARCH_QCOM) += sdm845-xiaomi-dipper.dtb dtb-$(CONFIG_ARCH_QCOM) += sdm845-xiaomi-polaris.dtb dtb-$(CONFIG_ARCH_QCOM) += sdm845-shift-axolotl.dtb dtb-$(CONFIG_ARCH_QCOM) += sdm850-huawei-matebook-e-2019.dtb dtb-$(CONFIG_ARCH_QCOM) += sdm850-lenovo-yoga-c630.dtb dtb-$(CONFIG_ARCH_QCOM) += sdm850-samsung-w737.dtb dtb-$(CONFIG_ARCH_QCOM) += sdx75-idp.dtb dtb-$(CONFIG_ARCH_QCOM) += shikra-cqm-evk.dtb dtb-$(CONFIG_ARCH_QCOM) += shikra-cqs-evk.dtb diff --git a/arch/arm64/boot/dts/qcom/sdm845-xiaomi-dipper-common.dtsi b/arch/arm64/boot/dts/qcom/sdm845-xiaomi-dipper-common.dtsi new file mode 100644 index 0000000000000..eb4243e7f2c07 --- /dev/null +++ b/arch/arm64/boot/dts/qcom/sdm845-xiaomi-dipper-common.dtsi @@ -0,0 +1,607 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Xiaomi Mi 8 family common device tree source. + * Covers Mi 8 Explorer Edition (equuleus), Mi 8 (dipper), Mi 8 Pro (urza). + * + * Copyright David Heidelberg. + */ + +/dts-v1/; + +#include <dt-bindings/arm/qcom,ids.h> +#include <dt-bindings/firmware/qcom,scm.h> +#include <dt-bindings/gpio/gpio.h> +#include <dt-bindings/input/linux-event-codes.h> +#include <dt-bindings/interrupt-controller/irq.h> +#include <dt-bindings/phy/phy-qcom-qusb2.h> +#include <dt-bindings/regulator/qcom,rpmh-regulator.h> +#include "sdm845.dtsi" +#include "pm8998.dtsi" +#include "pmi8998.dtsi" + +/delete-node/ &adsp_mem; +/delete-node/ &cdsp_mem; +/delete-node/ &mba_region; +/delete-node/ &mpss_region; +/delete-node/ &rmtfs_mem; +/delete-node/ &slpi_mem; +/delete-node/ &spss_mem; +/delete-node/ &tz_mem; +/delete-node/ &venus_mem; +/delete-node/ &wlan_msa_mem; + +/ { + chassis-type = "handset"; + + qcom,msm-id = <QCOM_ID_SDM845 0x20001>; + + aliases { + serial0 = &uart9; + serial1 = &uart6; + }; + + chosen { + #address-cells = <2>; + #size-cells = <2>; + ranges; + + framebuffer { + compatible = "simple-framebuffer"; + memory-region = <&cont_splash_mem>; + + vci-supply = <&vreg_panel_vci>; + vddio-supply = <&vreg_panel_vddio>; + + width = <1080>; + height = <2248>; + stride = <(1080 * 4)>; + format = "a8r8g8b8"; + }; + }; + + gpio-keys { + compatible = "gpio-keys"; + autorepeat; + + pinctrl-0 = <&volume_up_gpio>; + pinctrl-names = "default"; + + key-volume-up { + label = "Volume Up"; + linux,code = <KEY_VOLUMEUP>; + gpios = <&pm8998_gpios 6 GPIO_ACTIVE_LOW>; + wakeup-source; + debounce-interval = <15>; + }; + }; + + vreg_panel_vci: regulator-panel-vci { + compatible = "regulator-fixed"; + regulator-name = "panel_vci_vreg"; + + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3000000>; + + gpio = <&tlmm 35 GPIO_ACTIVE_HIGH>; + enable-active-high; + startup-delay-us = <4000>; + regulator-boot-on; + }; + + vreg_panel_vddio: regulator-panel-vddio { + compatible = "regulator-fixed"; + regulator-name = "panel_vddio_vreg"; + + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + + gpio = <&tlmm 23 GPIO_ACTIVE_HIGH>; + enable-active-high; + startup-delay-us = <4000>; + regulator-boot-on; + }; + + vph_pwr: regulator-vph-pwr { + compatible = "regulator-fixed"; + regulator-name = "vph_pwr"; + + regulator-min-microvolt = <3700000>; + regulator-max-microvolt = <3700000>; + }; + + vreg_s4a_1p8: regulator-vreg-s4a-1p8 { + compatible = "regulator-fixed"; + regulator-name = "vreg_s4a_1p8"; + + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-always-on; + regulator-boot-on; + + vin-supply = <&vph_pwr>; + }; + + reserved-memory { + /* + * It seems like reserving the old rmtfs_mem region is + * also needed to prevent random crashes + */ + old-rmtfs@88f00000 { + reg = <0 0x88f00000 0 0x200000>; + no-map; + }; + + adsp_mem: adsp@8c500000 { + reg = <0 0x8c500000 0 0x1e00000>; + no-map; + }; + + wlan_msa_mem: wlan-msa@8e300000 { + reg = <0 0x8e300000 0 0x100000>; + no-map; + }; + + mpss_region: mpss@8e400000 { + reg = <0 0x8e400000 0 0x7800000>; + no-map; + }; + + venus_mem: venus@95c00000 { + reg = <0 0x95c00000 0 0x500000>; + no-map; + }; + + cdsp_mem: cdsp@96100000 { + reg = <0 0x96100000 0 0x800000>; + no-map; + }; + + mba_region: mba@96900000 { + reg = <0 0x96900000 0 0x200000>; + no-map; + }; + + slpi_mem: slpi@96b00000 { + reg = <0 0x96b00000 0 0x1400000>; + no-map; + }; + + spss_mem: spss@97f00000 { + reg = <0 0x97f00000 0 0x100000>; + no-map; + }; + + cont_splash_mem: splash@9d400000 { + reg = <0 0x9d400000 0 0x950000>; + no-map; + }; + + ramoops@b0000000 { + compatible = "ramoops"; + reg = <0 0xb0000000 0 0x00400000>; + record-size = <0x40000>; + console-size = <0x40000>; + ftrace-size = <0x40000>; + pmsg-size = <0x200000>; + }; + + rmtfs_mem: memory@f7300000 { + compatible = "qcom,rmtfs-mem"; + reg = <0 0xf7300000 0 0x202000>; + qcom,use-guard-pages; + no-map; + + qcom,client-id = <1>; + qcom,vmid = <QCOM_SCM_VMID_MSS_MSA>; + }; + }; + + wcn3990-pmu { + compatible = "qcom,wcn3990-pmu"; + + pinctrl-0 = <&sw_ctrl_default>; + pinctrl-names = "default"; + + vddio-supply = <&vreg_s4a_1p8>; + vddxo-supply = <&vreg_l7a_1p8>; + vddrf-supply = <&vreg_l17a_1p3>; + vddch0-supply = <&vreg_l25a_3p3>; + vddch1-supply = <&vreg_l23a_3p3>; + + swctrl-gpios = <&pm8998_gpios 3 GPIO_ACTIVE_HIGH>; + + regulators { + vreg_pmu_io: ldo0 { + regulator-name = "vreg_pmu_io"; + }; + + vreg_pmu_xo: ldo1 { + regulator-name = "vreg_pmu_xo"; + }; + + vreg_pmu_rf: ldo2 { + regulator-name = "vreg_pmu_rf"; + }; + + vreg_pmu_ch0: ldo3 { + regulator-name = "vreg_pmu_ch0"; + }; + + vreg_pmu_ch1: ldo4 { + regulator-name = "vreg_pmu_ch1"; + }; + }; + }; +}; + +&apps_rsc { + regulators-0 { + compatible = "qcom,pm8998-rpmh-regulators"; + qcom,pmic-id = "a"; + + vdd-s1-supply = <&vph_pwr>; + vdd-s2-supply = <&vph_pwr>; + vdd-s3-supply = <&vph_pwr>; + vdd-s4-supply = <&vph_pwr>; + vdd-s5-supply = <&vph_pwr>; + vdd-s6-supply = <&vph_pwr>; + vdd-s7-supply = <&vph_pwr>; + vdd-s8-supply = <&vph_pwr>; + vdd-s9-supply = <&vph_pwr>; + vdd-s10-supply = <&vph_pwr>; + vdd-s11-supply = <&vph_pwr>; + vdd-s12-supply = <&vph_pwr>; + vdd-s13-supply = <&vph_pwr>; + vdd-l1-l27-supply = <&vreg_s7a_1p025>; + vdd-l2-l8-l17-supply = <&vreg_s3a_1p35>; + vdd-l3-l11-supply = <&vreg_s7a_1p025>; + vdd-l4-l5-supply = <&vreg_s7a_1p025>; + vdd-l6-supply = <&vph_pwr>; + vdd-l7-l12-l14-l15-supply = <&vreg_s5a_2p04>; + vdd-l9-supply = <&vreg_bob>; + vdd-l10-l23-l25-supply = <&vreg_bob>; + vdd-l13-l19-l21-supply = <&vreg_bob>; + vdd-l16-l28-supply = <&vreg_bob>; + vdd-l18-l22-supply = <&vreg_bob>; + vdd-l20-l24-supply = <&vreg_bob>; + vdd-l26-supply = <&vreg_s3a_1p35>; + vin-lvs-1-2-supply = <&vreg_s4a_1p8>; + + vreg_s2a_1p125: smps2 { + regulator-min-microvolt = <1100000>; + regulator-max-microvolt = <1100000>; + }; + + vreg_s3a_1p35: smps3 { + regulator-min-microvolt = <1352000>; + regulator-max-microvolt = <1352000>; + }; + + vreg_s5a_2p04: smps5 { + regulator-min-microvolt = <1904000>; + regulator-max-microvolt = <2040000>; + }; + + vreg_s7a_1p025: smps7 { + regulator-min-microvolt = <900000>; + regulator-max-microvolt = <1028000>; + }; + + vreg_l1a_0p875: ldo1 { + regulator-min-microvolt = <880000>; + regulator-max-microvolt = <880000>; + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; + }; + + vreg_l2a_1p2: ldo2 { + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; + regulator-always-on; + }; + + vreg_l5a_0p8: ldo5 { + regulator-min-microvolt = <800000>; + regulator-max-microvolt = <800000>; + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; + }; + + vreg_l7a_1p8: ldo7 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; + }; + + vreg_l12a_1p8: ldo12 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; + }; + + vreg_l14a_1p8: ldo14 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; + regulator-boot-on; + regulator-always-on; + }; + + vreg_l17a_1p3: ldo17 { + regulator-min-microvolt = <1304000>; + regulator-max-microvolt = <1304000>; + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; + }; + + vreg_l20a_2p95: ldo20 { + regulator-min-microvolt = <2950000>; + regulator-max-microvolt = <2960000>; + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; + }; + + vreg_l22a_2p864: ldo22 { + regulator-min-microvolt = <2864000>; + regulator-max-microvolt = <2864000>; + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; + }; + + vreg_l23a_3p3: ldo23 { + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3312000>; + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; + }; + + vreg_l24a_3p075: ldo24 { + regulator-min-microvolt = <3088000>; + regulator-max-microvolt = <3088000>; + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; + }; + + vreg_l25a_3p3: ldo25 { + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3312000>; + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; + }; + + vreg_l26a_1p2: ldo26 { + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; + regulator-boot-on; + }; + + vreg_l28a_3p3: ldo28 { + regulator-min-microvolt = <2856000>; + regulator-max-microvolt = <3008000>; + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; + }; + + vreg_lvs1_1p8: lvs1 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + }; + }; + + regulators-1 { + compatible = "qcom,pmi8998-rpmh-regulators"; + qcom,pmic-id = "b"; + + vdd-bob-supply = <&vph_pwr>; + + vreg_bob: bob { + regulator-min-microvolt = <3312000>; + regulator-max-microvolt = <3600000>; + regulator-initial-mode = <RPMH_REGULATOR_MODE_AUTO>; + regulator-allow-bypass; + }; + }; +}; + +&dispcc { + /* Disable for now so simple-framebuffer continues working */ + status = "disabled"; +}; + +&gcc { + protected-clocks = <GCC_QSPI_CORE_CLK>, + <GCC_QSPI_CORE_CLK_SRC>, + <GCC_QSPI_CNOC_PERIPH_AHB_CLK>, + <GCC_LPASS_Q6_AXI_CLK>, + <GCC_LPASS_SWAY_CLK>; +}; + +&gpi_dma0 { + status = "okay"; +}; + +&gpi_dma1 { + status = "okay"; +}; + +&gpu { + status = "okay"; +}; + +&gpu_zap_shader { + firmware-name = "qcom/sdm845/Xiaomi/dipper/a630_zap.mbn"; +}; + +&ibb { + regulator-min-microvolt = <4600000>; + regulator-max-microvolt = <6000000>; + regulator-over-current-protection; + regulator-pull-down; + regulator-soft-start; +}; + +&ipa { + firmware-name = "qcom/sdm845/Xiaomi/dipper/ipa_fws.mbn"; + + status = "okay"; +}; + +&lab { + regulator-min-microvolt = <4600000>; + regulator-max-microvolt = <6000000>; + regulator-pull-down; + regulator-soft-start; +}; + +&mdss { + /* Disable for now so simple-framebuffer continues working */ + status = "disabled"; +}; + +&mss_pil { + firmware-name = "qcom/sdm845/Xiaomi/dipper/mba.mbn", + "qcom/sdm845/Xiaomi/dipper/modem.mbn"; + + status = "okay"; +}; + +&pmi8998_charger { + monitored-battery = <&battery>; + + status = "okay"; +}; + +&pm8998_gpios { + sw_ctrl_default: sw-ctrl-default-state { + pins = "gpio3"; + function = "normal"; + input-enable; + bias-pull-down; + }; + + volume_up_gpio: vol-up-active-state { + pins = "gpio6"; + function = "normal"; + input-enable; + bias-pull-up; + power-source = <0>; + }; +}; + +&pm8998_resin { + linux,code = <KEY_VOLUMEDOWN>; + + status = "okay"; +}; + +&qupv3_id_0 { + status = "okay"; +}; + +&qupv3_id_1 { + status = "okay"; +}; + +&qup_uart9_rx { + drive-strength = <2>; + bias-pull-up; +}; + +&qup_uart9_tx { + drive-strength = <2>; + bias-disable; +}; + +&i2c5 { + status = "okay"; + + /* tas2557 @4c */ +}; + +&i2c14 { + clock-frequency = <400000>; + + status = "okay"; + + /* stmfts5 @49 */ +}; + +&tlmm { + gpio-reserved-ranges = < 0 4>, /* SPI (Goodix Fingerprint) */ + <81 4>; /* SPI (Synaptics Fingerprint) */ +}; + +&ufs_mem_hc { + reset-gpios = <&tlmm 150 GPIO_ACTIVE_LOW>; + + vcc-supply = <&vreg_l20a_2p95>; + vcc-max-microamp = <600000>; + vccq2-supply = <&vreg_s4a_1p8>; + vccq2-max-microamp = <600000>; + + status = "okay"; + +}; + +&ufs_mem_phy { + vdda-phy-supply = <&vreg_l1a_0p875>; + vdda-pll-supply = <&vreg_l26a_1p2>; + + status = "okay"; +}; + +&usb_1 { + qcom,select-utmi-as-pipe-clk; + + status = "okay"; +}; + +&usb_1_dwc3 { + /* Until we have Type C hooked up we'll force this as peripheral. */ + dr_mode = "peripheral"; + + maximum-speed = "high-speed"; + phys = <&usb_1_hsphy>; + phy-names = "usb2-phy"; +}; + +&usb_1_hsphy { + vdd-supply = <&vreg_l1a_0p875>; + vdda-pll-supply = <&vreg_l12a_1p8>; + vdda-phy-dpdm-supply = <&vreg_l24a_3p075>; + + qcom,imp-res-offset-value = <8>; + qcom,hstx-trim-value = <QUSB2_V2_HSTX_TRIM_21_6_MA>; + qcom,preemphasis-level = <QUSB2_V2_PREEMPHASIS_5_PERCENT>; + qcom,preemphasis-width = <QUSB2_V2_PREEMPHASIS_WIDTH_HALF_BIT>; + + status = "okay"; +}; + +&uart6 { + pinctrl-0 = <&qup_uart6_4pin>; + + status = "okay"; + + bluetooth { + compatible = "qcom,wcn3990-bt"; + + firmware-name = "Xiaomi/dipper/crnv21.bin"; + + vddio-supply = <&vreg_pmu_io>; + vddxo-supply = <&vreg_pmu_xo>; + vddrf-supply = <&vreg_pmu_rf>; + vddch0-supply = <&vreg_pmu_ch0>; + + max-speed = <3200000>; + }; +}; + +&uart9 { + status = "okay"; +}; + +&wifi { + vdd-0.8-cx-mx-supply = <&vreg_l5a_0p8>; + vdd-1.8-xo-supply = <&vreg_pmu_xo>; + vdd-1.3-rfa-supply = <&vreg_pmu_rf>; + vdd-3.3-ch0-supply = <&vreg_pmu_ch0>; + vdd-3.3-ch1-supply = <&vreg_pmu_ch1>; + + qcom,snoc-host-cap-skip-quirk; + + status = "okay"; +}; diff --git a/arch/arm64/boot/dts/qcom/sdm845-xiaomi-dipper.dts b/arch/arm64/boot/dts/qcom/sdm845-xiaomi-dipper.dts new file mode 100644 index 0000000000000..bf45fe8fde80b --- /dev/null +++ b/arch/arm64/boot/dts/qcom/sdm845-xiaomi-dipper.dts @@ -0,0 +1,36 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Xiaomi Mi 8 (dipper). + * + * Copyright David Heidelberg. + */ + +/dts-v1/; + +#include "sdm845-xiaomi-dipper-common.dtsi" + +/ { + model = "Xiaomi Mi 8"; + compatible = "xiaomi,dipper", "xiaomi,dipper-common", "qcom,sdm845"; + + qcom,board-id = <55 0>; + + battery: battery { + compatible = "simple-battery"; + + charge-full-design-microamp-hours = <3400000>; + voltage-min-design-microvolt = <3400000>; + voltage-max-design-microvolt = <4400000>; + }; + +}; + +&adsp_pas { + firmware-name = "qcom/sdm845/Xiaomi/dipper/adsp.mbn"; + + status = "okay"; +}; + +&wifi { + qcom,calibration-variant = "Xiaomi_dipper"; +}; -- 2.55.0 ^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH v2 2/2] arm64: dts: qcom: add Xiaomi Mi 8 (dipper) 2026-09-15 14:32 ` David Heidelberg via B4 Relay (?) @ 2026-09-15 14:45 ` sashiko-bot -1 siblings, 0 replies; 10+ messages in thread From: sashiko-bot @ 2026-09-15 14:45 UTC (permalink / raw) To: David Heidelberg; +Cc: devicetree, conor+dt, robh Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [High] arm64: dts: qcom: missing TrustZone reserved memory redefinition -- commit 02ae202c9e4a6dda959a1b0bd255a44620dacac8 Author: David Heidelberg <david@ixit.cz> arm64: dts: qcom: add Xiaomi Mi 8 (dipper) Initial submission for one member of the prime Xiaomi Mi 8 family. Mi 8 Pro (equuleus) and Mi 8 Explorer (ursa) are nearly identical. Known differences are battery capacity and fingerprint sensor placement. > diff --git a/arch/arm64/boot/dts/qcom/sdm845-xiaomi-dipper-common.dtsi b/arch/arm64/boot/dts/qcom/sdm845-xiaomi-dipper-common.dtsi > new file mode 100644 > index 0000000000000..eb4243e7f2c07 > --- /dev/null > +++ b/arch/arm64/boot/dts/qcom/sdm845-xiaomi-dipper-common.dtsi > @@ -0,0 +1,607 @@ [ ... ] > +/delete-node/ &slpi_mem; > +/delete-node/ &spss_mem; > +/delete-node/ &tz_mem; > +/delete-node/ &venus_mem; > +/delete-node/ &wlan_msa_mem; [ ... ] > + reserved-memory { > + /* > + * It seems like reserving the old rmtfs_mem region is > + * also needed to prevent random crashes > + */ > + old-rmtfs@88f00000 { > + reg = <0 0x88f00000 0 0x200000>; > + no-map; > + }; > + [Severity: High] Does this code accidentally leave TrustZone memory unreserved? By explicitly deleting the default tz_mem node with /delete-node/ &tz_mem; at the top of the file but failing to redefine it here in the reserved-memory block with device-specific sizes, Linux will map the TrustZone memory space as general-purpose System RAM. When the buddy allocator hands out pages from this unreserved TrustZone memory range, the system will experience random hard crashes (Synchronous Aborts or Secure Watchdog Bites/XPU violations) when the kernel allocates and accesses it. The workaround of reserving old-rmtfs at 0x88f00000 to mask random crashes appears to be a direct symptom of this missing reservation, since that memory region falls within the unreserved TrustZone space. > + adsp_mem: adsp@8c500000 { > + reg = <0 0x8c500000 0 0x1e00000>; > + no-map; > + }; -- Sashiko AI review · https://sashiko.dev/#/patchset/20260915-dipper-v2-0-cbade54919ee@ixit.cz?part=2 ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2026-09-18 8:40 UTC | newest] Thread overview: 10+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2026-09-15 14:32 [PATCH v2 0/2] Introduce support for Xiaomi Mi 8 David Heidelberg 2026-09-15 14:32 ` David Heidelberg via B4 Relay 2026-09-15 14:32 ` [PATCH v2 1/2] dt-bindings: arm: qcom: Add Xiaomi Mi 8 family compatibles David Heidelberg 2026-09-15 14:32 ` David Heidelberg via B4 Relay 2026-09-17 10:21 ` Krzysztof Kozlowski 2026-09-17 10:25 ` David Heidelberg 2026-09-18 8:40 ` Krzysztof Kozlowski 2026-09-15 14:32 ` [PATCH v2 2/2] arm64: dts: qcom: add Xiaomi Mi 8 (dipper) David Heidelberg 2026-09-15 14:32 ` David Heidelberg via B4 Relay 2026-09-15 14:45 ` sashiko-bot
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.