Introduce support for Xiaomi Mi 8
cover Introduce support for Xiaomi Mi 8
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.
---
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 | 10 + arch/arm64/boot/dts/qcom/Makefile | 1 + .../boot/dts/qcom/sdm845-xiaomi-dipper-common.dtsi | 623 +++++++++++++++++++++ arch/arm64/boot/dts/qcom/sdm845-xiaomi-dipper.dts | 30 + 4 files changed, 664 insertions(+)
---
base-commit: 95d6a9ccef99117115e41e9adb271243bd5e985b
change-id: 20260720-dipper-8fd3f1e475bc
Best regards,
Signature · 1 line
David Heidelberg <[email protected]>
PATCH 1/2 dt-bindings: arm: qcom: Add Xiaomi Mi 8 family compatibles
This smartphone codenamed dipper is now supported by this series, variants such as ursa and equuleus just documented.
--- Documentation/devicetree/bindings/arm/qcom.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+)
Documentation/devicetree/bindings/arm/qcom.yaml +10 -0
@@ -944,16 +944,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
@@ -970,16 +979,17 @@ properties: - qcom,sdm845-mtp - shift,axolotl - samsung,starqltechn - samsung,w737 - sony,akari-row - sony,akatsuki-row - sony,apollo-row - thundercomm,db845c + - xiaomi,dipper - xiaomi,polaris - const: qcom,sdm845 - items: - enum: - qcom,shikra-cqm-evk - const: qcom,shikra-cqm-som - const: qcom,shikra
Signature · 1 line
2.55.0
[email protected]
AI reviewRe: [PATCH 1/2] dt-bindings: arm: qcom: Add Xiaomi Mi 8 family compatibles
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Medium] The compatible string `xiaomi,dipper` is added to two mutually exclusive schema blocks with…
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The compatible string xiaomi,dipper is added to two mutually exclusive schema blocks with conflicting constraints, allowing incomplete compatible lists to silently pass validation. --
--- Patch [1]: [PATCH 1/2] dt-bindings: arm: qcom: Add Xiaomi Mi 8 family compatibles --- commit 303d802416f225c92da471f33c7f3f2a3dcb2b9c
Author: David Heidelberg <[email protected]>
dt-bindings: arm: qcom: Add Xiaomi Mi 8 family compatibles
This commit adds device tree binding compatibles for the Xiaomi Mi 8 smartphone family, codenamed dipper, and documents variants such as ursa and equuleus.
Quoted 17 lines
Documentation/devicetree/bindings/arm/qcom.yaml +9
-0@@ -950,6 +950,15 @@ properties: - 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 +
[ ... ]
Documentation/devicetree/bindings/arm/qcom.yaml properties: · line 990
Quoted 7 lines
Documentation/devicetree/bindings/arm/qcom.yaml +1
-0@@ -976,6 +985,7 @@ properties: - sony,akatsuki-row - sony,apollo-row - thundercomm,db845c + - xiaomi,dipper - xiaomi,polaris - const: qcom,sdm845
[Severity: Medium]
Was xiaomi,dipper mistakenly added to this 2-element block as well?
Since xiaomi,dipper is already defined in the 3-element Xiaomi Mi 8 family block above, adding it here introduces a regression in schema validation. A device tree using an incomplete compatible array like ["xiaomi,dipper", "qcom,sdm845"] will pass schema validation by matching this block, completely bypassing the requirement for the "xiaomi,dipper-common" fallback string.
Would removing it from this generic list ensure the intermediate fallback is properly enforced for the dipper board?
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
Re: [PATCH 1/2] dt-bindings: arm: qcom: Add Xiaomi Mi 8 family compatibles
Quoted 32 lines · On 09/08/2026 18:56, [email protected] wrote:
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The compatible stringxiaomi,dipperis added to two mutually exclusive schema blocks with conflicting constraints, allowing incomplete compatible lists to silently pass validation. ----- Patch [1]: [PATCH 1/2] dt-bindings: arm: qcom: Add Xiaomi Mi 8 family compatibles --- commit
303d802416f225c92da471f33c7f3f2a3dcb2b9c
Author: David Heidelberg <[email protected]>
dt-bindings: arm: qcom: Add Xiaomi Mi 8 family compatiblesThis commit adds device tree binding compatibles for the Xiaomi Mi 8 smartphone family, codenamed dipper, and documents variants such as ursa and equuleus.
Quoted 17 lines
Documentation/devicetree/bindings/arm/qcom.yaml +9
-0@@ -950,6 +950,15 @@ properties: - 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 +[ ... ]
Quoted 10 lines
Documentation/devicetree/bindings/arm/qcom.yaml properties: · line 990
Quoted 7 lines
Documentation/devicetree/bindings/arm/qcom.yaml +1
-0@@ -976,6 +985,7 @@ properties: - sony,akatsuki-row - sony,apollo-row - thundercomm,db845c + - xiaomi,dipper - xiaomi,polaris - const: qcom,sdm845[Severity: Medium]
Was xiaomi,dipper mistakenly added to this 2-element block as well?
Yeah, forgot to remove simplified entry.
Will be addressed in the v2.
PATCH 2/2 arm64: dts: qcom: add Xiaomi Mi 8 (dipper)
In reply to David HeidelbergInitial 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.
--- arch/arm64/boot/dts/qcom/Makefile | 1 + .../boot/dts/qcom/sdm845-xiaomi-dipper-common.dtsi | 623 +++++++++++++++++++++ arch/arm64/boot/dts/qcom/sdm845-xiaomi-dipper.dts | 30 + 3 files changed, 654 insertions(+)
arch/arm64/boot/dts/qcom/Makefile +1 -0
@@ -324,16 +324,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
arch/arm64/boot/dts/qcom/sdm845-xiaomi-dipper-common.dtsi new file +623 -0
623 lines not on this page · raw message
arch/arm64/boot/dts/qcom/sdm845-xiaomi-dipper.dts new file +30 -0
@@ -0,0 +1,30 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Xiaomi Mi 8 (dipper). + * + * Copyright David Heidelberg. All rights reserved. + */ + +/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>; + }; + +}; + +&wifi { + qcom,calibration-variant = "Xiaomi_dipper"; +};
Signature · 1 line
2.55.0
Re: [PATCH 2/2] arm64: dts: qcom: add Xiaomi Mi 8 (dipper)
Quoted 7 lines · On 8/9/26 6:48 PM, David Heidelberg via B4 Relay wrote:
From: David Heidelberg <[email protected]>
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.
I had one of those. IIRC the Pro had a 3d IR scanner (vide face id) whereas the base one had a normal IR cam
[...]
arch/arm64/boot/dts/qcom/sdm845-xiaomi-dipper-common.dtsi line 105
Quoted 2 lines
arch/arm64/boot/dts/qcom/sdm845-xiaomi-dipper-common.dtsi new file +2
-0+ reserved-memory { + adsp_mem: memory@8c500000 {
adsp@ etc. and drop labels where unused
[...]
arch/arm64/boot/dts/qcom/sdm845-xiaomi-dipper-common.dtsi line 182
Quoted 8 lines
arch/arm64/boot/dts/qcom/sdm845-xiaomi-dipper-common.dtsi new file +8
-0+ linux,cma { + compatible = "shared-dma-pool"; + alloc-ranges = <0 0x00000000 0 0xffffffff>; + reusable; + alignment = <0 0x400000>; + size = <0 0x2c00000>; + linux,cma-default; + };
Is this necessary?
arch/arm64/boot/dts/qcom/sdm845-xiaomi-dipper-common.dtsi line 185
Quoted 3 lines
arch/arm64/boot/dts/qcom/sdm845-xiaomi-dipper-common.dtsi new file +3
-0+ }; + + vph_pwr: regulator-vph-pwr {
This is out of order
[...]
arch/arm64/boot/dts/qcom/sdm845-xiaomi-dipper-common.dtsi line 244
Quoted 2 lines
+&adsp_pas {
arch/arm64/boot/dts/qcom/sdm845-xiaomi-dipper-common.dtsi new file +1
-0+ firmware-name = "qcom/sdm845/Xiaomi/dipper/adsp.mbn";
Would you know whether the FWs are common across the SKUs?
And more importantly, regulator settings? FWIW it's easiest to compare compiled DTBs (or even better, ones pulled from sysfs on a running system)
[...]
arch/arm64/boot/dts/qcom/sdm845-xiaomi-dipper-common.dtsi line 535
Quoted 2 lines
+&tlmm {
arch/arm64/boot/dts/qcom/sdm845-xiaomi-dipper-common.dtsi new file +1
-0+ gpio-reserved-ranges = < 0 4>, /* SPI (Goodix Fingerprint) */
odd space after <
arch/arm64/boot/dts/qcom/sdm845-xiaomi-dipper-common.dtsi line 536
Quoted 1 line
arch/arm64/boot/dts/qcom/sdm845-xiaomi-dipper-common.dtsi new file +1
-0+ <81 4>; /* SPI (Synaptics Fingerprint) */
No NFC eSE reservation?
[...]
arch/arm64/boot/dts/qcom/sdm845-xiaomi-dipper-common.dtsi line 565
Quoted 2 lines
+&usb_1_dwc3 {
arch/arm64/boot/dts/qcom/sdm845-xiaomi-dipper-common.dtsi new file +1
-0+ /* Until we have Type C hooked up we'll force this as peripheral. */
Should be fairly trivial on 845, no?
arch/arm64/boot/dts/qcom/sdm845-xiaomi-dipper-common.dtsi line 570
Quoted 5 lines
arch/arm64/boot/dts/qcom/sdm845-xiaomi-dipper-common.dtsi new file +5
-0+ dr_mode = "peripheral"; + + maximum-speed = "high-speed"; + phys = <&usb_1_hsphy>; + phy-names = "usb2-phy";
No SS?
[...]
arch/arm64/boot/dts/qcom/sdm845-xiaomi-dipper-common.dtsi line 597
Quoted 7 lines
arch/arm64/boot/dts/qcom/sdm845-xiaomi-dipper-common.dtsi new file +7
-0+ bluetooth { + compatible = "qcom,wcn3990-bt"; + + /* + * This path is relative to the qca/ + * subdir under lib/firmware. + */
Let's drop this comment, not very useful
Konrad
Re: [PATCH 2/2] arm64: dts: qcom: add Xiaomi Mi 8 (dipper)
Quoted 38 lines · Konrad Dybcio
Quoted 7 lines · On 8/9/26 6:48 PM, David Heidelberg via B4 Relay wrote:
From: David Heidelberg <[email protected]>
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.
I had one of those. IIRC the Pro had a 3d IR scanner (vide face id) whereas the base one had a normal IR cam
[...]
arch/arm64/boot/dts/qcom/sdm845-xiaomi-dipper-common.dtsi line 105
Quoted 2 lines
arch/arm64/boot/dts/qcom/sdm845-xiaomi-dipper-common.dtsi new file +2
-0+ reserved-memory { + adsp_mem: memory@8c500000 {adsp@ etc. and drop labels where unused
[...]
arch/arm64/boot/dts/qcom/sdm845-xiaomi-dipper-common.dtsi line 182
Quoted 8 lines
arch/arm64/boot/dts/qcom/sdm845-xiaomi-dipper-common.dtsi new file +8
-0+ linux,cma { + compatible = "shared-dma-pool"; + alloc-ranges = <0 0x00000000 0 0xffffffff>; + reusable; + alignment = <0 0x400000>; + size = <0 0x2c00000>; + linux,cma-default; + };Is this necessary?
arch/arm64/boot/dts/qcom/sdm845-xiaomi-dipper-common.dtsi line 185
Quoted 3 lines
arch/arm64/boot/dts/qcom/sdm845-xiaomi-dipper-common.dtsi new file +3
-0+ }; + + vph_pwr: regulator-vph-pwr {This is out of order
Quoted 7 lines
[...]
arch/arm64/boot/dts/qcom/sdm845-xiaomi-dipper-common.dtsi line 244
Quoted 2 lines
+&adsp_pas {
arch/arm64/boot/dts/qcom/sdm845-xiaomi-dipper-common.dtsi new file +1
-0+ firmware-name = "qcom/sdm845/Xiaomi/dipper/adsp.mbn";Would you know whether the FWs are common across the SKUs?
I don't, I have only one device (the dipper) available.
I'll see if I quickly figure out, if not, as no-one else having Mi8 family volunteer to test, I would move it to dipper specific for now and can be moved to common later.
Quoted 11 lines
And more importantly, regulator settings? FWIW it's easiest to compare compiled DTBs (or even better, ones pulled from sysfs on a running system)
[...]
arch/arm64/boot/dts/qcom/sdm845-xiaomi-dipper-common.dtsi line 535
Quoted 2 lines
+&tlmm {
arch/arm64/boot/dts/qcom/sdm845-xiaomi-dipper-common.dtsi new file +1
-0+ gpio-reserved-ranges = < 0 4>, /* SPI (Goodix Fingerprint) */odd space after <
I call it alignment, but sure :)>
Quoted 3 lines
arch/arm64/boot/dts/qcom/sdm845-xiaomi-dipper-common.dtsi line 536
Quoted 1 line
arch/arm64/boot/dts/qcom/sdm845-xiaomi-dipper-common.dtsi new file +1
-0+ <81 4>; /* SPI (Synaptics Fingerprint) */No NFC eSE reservation?
It seems that vendor used different combinations of Goodix / Synaptics across these ranges. Not even depending on the model. Same model can have different wiring, but always honoring position 0:4, 81:4 as far goes my understanding. >
Quoted 7 lines
[...]
arch/arm64/boot/dts/qcom/sdm845-xiaomi-dipper-common.dtsi line 565
Quoted 2 lines
+&usb_1_dwc3 {
arch/arm64/boot/dts/qcom/sdm845-xiaomi-dipper-common.dtsi new file +1
-0+ /* Until we have Type C hooked up we'll force this as peripheral. */Should be fairly trivial on 845, no?
Quoted 7 lines
arch/arm64/boot/dts/qcom/sdm845-xiaomi-dipper-common.dtsi line 570
Quoted 5 lines
arch/arm64/boot/dts/qcom/sdm845-xiaomi-dipper-common.dtsi new file +5
-0+ dr_mode = "peripheral"; + + maximum-speed = "high-speed"; + phys = <&usb_1_hsphy>; + phy-names = "usb2-phy";No SS?
Haven't thought about it, for now my goal is upstream basic telnet/ssh + FB. Then display and touch - e.g. minimal u-boot and kernel development features and then bring the rest.
Quoted 12 lines
[...]
arch/arm64/boot/dts/qcom/sdm845-xiaomi-dipper-common.dtsi line 597
Quoted 7 lines
arch/arm64/boot/dts/qcom/sdm845-xiaomi-dipper-common.dtsi new file +7
-0+ bluetooth { + compatible = "qcom,wcn3990-bt"; + + /* + * This path is relative to the qca/ + * subdir under lib/firmware. + */Let's drop this comment, not very useful
Sure.
Then I'll also drop these from whole sdm845 in follow-up commit.
I'll address also the rest of the comments in the next version :)
Thanks for the review
David>
Quoted 1 line
Konrad
Re: [PATCH 2/2] arm64: dts: qcom: add Xiaomi Mi 8 (dipper)
Quoted 9 lines · David Heidelberg
Quoted 8 lines · Konrad Dybcio
Quoted 7 lines · On 8/9/26 6:48 PM, David Heidelberg via B4 Relay wrote:
From: David Heidelberg <[email protected]>
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.
[...]
Quoted 3 lines
Quoted 1 line
No SS?
Haven't thought about it, for now my goal is upstream basic telnet/ssh + FB. Then display and touch - e.g. minimal u-boot and kernel development features and then bring the rest.
If you have an actually-superspeed cable, the link speed in fastboot should tell you the truth, or alternatively you can try plugging it into a DP dock on downstream
Konrad
Re: [PATCH 2/2] arm64: dts: qcom: add Xiaomi Mi 8 (dipper)
Quoted 13 lines · Konrad Dybcio
Quoted 9 lines · David Heidelberg
Quoted 8 lines · Konrad Dybcio
Quoted 7 lines · On 8/9/26 6:48 PM, David Heidelberg via B4 Relay wrote:
From: David Heidelberg <[email protected]>
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.
[...]
Quoted 7 lines
Quoted 3 lines
Quoted 1 line
No SS?
Haven't thought about it, for now my goal is upstream basic telnet/ssh + FB. Then display and touch - e.g. minimal u-boot and kernel development features and then bring the rest.
If you have an actually-superspeed cable, the link speed in fastboot should tell you the truth, or alternatively you can try plugging it into a DP dock on downstream
Ok verified, it has only USB 2.0 (spec, downstream DT)
Quoted 2 lines
Konrad
Re: [PATCH 2/2] arm64: dts: qcom: add Xiaomi Mi 8 (dipper)
In reply to Konrad DybcioQuoted 12 lines · Konrad Dybcio
Quoted 7 lines · On 8/9/26 6:48 PM, David Heidelberg via B4 Relay wrote:
From: David Heidelberg <[email protected]>
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.
I had one of those. IIRC the Pro had a 3d IR scanner (vide face id) whereas the base one had a normal IR cam
Quoted 7 lines
[...]
arch/arm64/boot/dts/qcom/sdm845-xiaomi-dipper-common.dtsi line 105
Quoted 2 lines
arch/arm64/boot/dts/qcom/sdm845-xiaomi-dipper-common.dtsi new file +2
-0+ reserved-memory { + adsp_mem: memory@8c500000 {adsp@ etc. and drop labels where unused
I'll replace the node names, but as these labels are replacement for existing sdm845 labels, used within the sdm845. As we remove these nodes in the begging of the file, this would break dependencies.
David
[...]
Re: [PATCH 2/2] arm64: dts: qcom: add Xiaomi Mi 8 (dipper)
In reply to David HeidelbergQuoted 7 lines · On 8/9/26 6:48 PM, David Heidelberg via B4 Relay wrote:
From: David Heidelberg <[email protected]>
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.
[...]
arch/arm64/boot/dts/qcom/sdm845-xiaomi-dipper-common.dtsi line 36
Quoted 4 lines
arch/arm64/boot/dts/qcom/sdm845-xiaomi-dipper-common.dtsi new file +4
-0+/ { + chassis-type = "handset"; + + qcom,msm-id = <QCOM_ID_SDM845 0x20001>;
Is this necessary to boot?
Konrad