Skip to contentSkip to conversation

xiaomi pad 5 support

PATCH In review Lobanokivan11 2 participants 2 messages Apr 3 – Apr 4

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xiaomi pad 5 support

---
 board/qualcomm/xiaomi-nabu.env                |   11 +
 configs/xiaomi-nabu_defconfig                 |    6 +
 dts/upstream/src/arm64/qcom/pm8150.dtsi       |   10 +-
 dts/upstream/src/arm64/qcom/pm8150b.dtsi      |    8 +
 .../src/arm64/qcom/sm8150-oneplus-common.dtsi |  545 ++++++++
 .../arm64/qcom/sm8150-oneplus-guacamole.dts   |   70 +
 .../src/arm64/qcom/sm8150-oneplus-hotdogb.dts |   65 +
 .../src/arm64/qcom/sm8150-wcd9340.dtsi        |   86 ++
 .../src/arm64/qcom/sm8150-xiaomi-cepheus.dts  |  575 ++++++++
 .../src/arm64/qcom/sm8150-xiaomi-nabu.dts     | 1175 +++++++++++++++++
 dts/upstream/src/arm64/qcom/sm8150.dtsi       |  102 ++
 11 files changed, 2652 insertions(+), 1 deletion(-)
 create mode 100644 board/qualcomm/xiaomi-nabu.env
 create mode 100644 configs/xiaomi-nabu_defconfig
 create mode 100644 dts/upstream/src/arm64/qcom/sm8150-oneplus-common.dtsi
 create mode 100644 dts/upstream/src/arm64/qcom/sm8150-oneplus-guacamole.dts
 create mode 100644 dts/upstream/src/arm64/qcom/sm8150-oneplus-hotdogb.dts
 create mode 100644 dts/upstream/src/arm64/qcom/sm8150-wcd9340.dtsi
 create mode 100644 dts/upstream/src/arm64/qcom/sm8150-xiaomi-cepheus.dts
 create mode 100644 dts/upstream/src/arm64/qcom/sm8150-xiaomi-nabu.dts
board/qualcomm/xiaomi-nabu.env new file +11 -0
new file mode 100644
index 00000000000..ffa49ea9885
@@ -0,0 +1,11 @@
+stdin=serial,button-kbd
+stdout=serial,vidconsole
+stderr=serial,vidconsole
+preboot=scsi scan; bootefi bootmgr
+fastboot=fastboot -l $fastboot_addr_r usb 0
+do_boot=bootefi bootmgr
+bootmenu_0=Boot first available device=run do_boot
+bootmenu_1=Enable fastboot mode=run fastboot
+bootmenu_2=Reset device=reset
+menucmd=bootmenu
+bootcmd=run do_boot
configs/xiaomi-nabu_defconfig new file +6 -0
new file mode 100644
index 00000000000..9554b6b88e8
@@ -0,0 +1,6 @@
+# Configuration for building U-Boot for Xiaomi Pad 5
+
+#include "qcom_defconfig"
+
+CONFIG_DEFAULT_DEVICE_TREE="qcom/sm8150-xiaomi-nabu"
+CONFIG_DEFAULT_ENV_FILE="board/qualcomm/xiaomi-nabu.env"
dts/upstream/src/arm64/qcom/pm8150.dtsi +9 -1
index d2568686a09..c3411b308e3 100644
@@ -116,13 +116,21 @@
 			status = "disabled";
 		};
 
-		rtc@6000 {
+		pm8150_rtc: rtc@6000 {
 			compatible = "qcom,pm8941-rtc";
 			reg = <0x6000>, <0x6100>;
 			reg-names = "rtc", "alarm";
 			interrupts = <0x0 0x61 0x1 IRQ_TYPE_NONE>;
 		};
 
+		pm8150_sdam_2: sdam@b100 {
+			compatible = "qcom,spmi-sdam";
+			reg = <0xb100>;
+			#address-cells = <1>;
+			#size-cells = <1>;
+			status = "disabled";
+		};
+
 		pm8150_gpios: gpio@c000 {
 			compatible = "qcom,pm8150-gpio", "qcom,spmi-gpio";
 			reg = <0xc000>;
dts/upstream/src/arm64/qcom/pm8150b.dtsi +8 -0
index 3f7b0b6a1d1..97361a586be 100644
@@ -150,6 +150,14 @@
 			status = "disabled";
 		};
 
+		pm8150b_fg: fuel-gauge@4000 {
+			compatible = "qcom,pm8150b-fg";
+			reg = <0x4000>;
+			interrupts = <0x2 0x40 0x3 IRQ_TYPE_EDGE_RISING>;
+			interrupt-names = "soc-delta";
+			status = "disabled";
+		};
+
 		pm8150b_gpios: gpio@c000 {
 			compatible = "qcom,pm8150b-gpio", "qcom,spmi-gpio";
 			reg = <0xc000>;
dts/upstream/src/arm64/qcom/sm8150-oneplus-common.dtsi new file +544 -0

544 lines not on this page · raw message

+};

dts/upstream/src/arm64/qcom/sm8150-oneplus-guacamole.dts new file +69 -0

69 lines not on this page · raw message

+};

dts/upstream/src/arm64/qcom/sm8150-oneplus-hotdogb.dts new file +64 -0

64 lines not on this page · raw message

+};

dts/upstream/src/arm64/qcom/sm8150-wcd9340.dtsi new file +86 -0

86 lines not on this page · raw message

dts/upstream/src/arm64/qcom/sm8150-xiaomi-cepheus.dts new file +575 -0

575 lines not on this page · raw message

dts/upstream/src/arm64/qcom/sm8150-xiaomi-nabu.dts new file +1174 -0

1,174 lines not on this page · raw message

dts/upstream/src/arm64/qcom/sm8150.dtsi +102 -0

151 lines not on this page · raw message

Signature · 1 line
2.53.0
#1 lore raw
Quoted 5 lines · On Fri, Apr 03, 2026 at 07:01:26PM +0300, Lobanokivan11 wrote:
---
 board/qualcomm/xiaomi-nabu.env                |   11 +
 configs/xiaomi-nabu_defconfig                 |    6 +
 dts/upstream/src/arm64/qcom/pm8150.dtsi       |   10 +-
 dts/upstream/src/arm64/qcom/pm8150b.dtsi      |    8 +

Devicetree (and bindings) in dts/ are pulled from devicetree upstream[1] (i.e., Linux kernel), and you shouldn't directly modify files in it. If you need a commit in dts upstream that hasn't synchronized into U-Boot yet, tools/update-subtree.sh might be used for cherry-picking one commit once it has landed in Linux master.

However, I don't see such changes to pm8150(b).dtsi in Linux 7.0-rc6, so you might want to push the changes to Linux upstream first.

Quoted 8 lines
 .../src/arm64/qcom/sm8150-oneplus-common.dtsi |  545 ++++++++
 .../arm64/qcom/sm8150-oneplus-guacamole.dts   |   70 +
 .../src/arm64/qcom/sm8150-oneplus-hotdogb.dts |   65 +
 .../src/arm64/qcom/sm8150-wcd9340.dtsi        |   86 ++
 .../src/arm64/qcom/sm8150-xiaomi-cepheus.dts  |  575 ++++++++
 .../src/arm64/qcom/sm8150-xiaomi-nabu.dts     | 1175 +++++++++++++++++
 dts/upstream/src/arm64/qcom/sm8150.dtsi       |  102 ++
 11 files changed, 2652 insertions(+), 1 deletion(-)
Quoted 8 lines
 create mode 100644 board/qualcomm/xiaomi-nabu.env
 create mode 100644 configs/xiaomi-nabu_defconfig
 create mode 100644 dts/upstream/src/arm64/qcom/sm8150-oneplus-common.dtsi
 create mode 100644 dts/upstream/src/arm64/qcom/sm8150-oneplus-guacamole.dts
 create mode 100644 dts/upstream/src/arm64/qcom/sm8150-oneplus-hotdogb.dts
 create mode 100644 dts/upstream/src/arm64/qcom/sm8150-wcd9340.dtsi
 create mode 100644 dts/upstream/src/arm64/qcom/sm8150-xiaomi-cepheus.dts
 create mode 100644 dts/upstream/src/arm64/qcom/sm8150-xiaomi-nabu.dts

What's the relationship between Xiaomi Pad 5 and "oneplus-guacamole/hotdogb"? The latter doesn't seem to match subject of the patch, which is "xiaomi pad 5 support". You probably want to have a separate commit for the non-xiaomi stuff.

And, for the same reason as above, you should neither create files in dts/ manually. I don't think these devicetrees have been in upstream, either. An alternative is to put them in arch/arm/dts instead, but it'll still be nice to have them upstreamed first.

...

Quoted 5 lines
dts/upstream/src/arm64/qcom/pm8150.dtsi +0 -0
index d2568686a09..c3411b308e3 100644

dts/upstream/src/arm64/qcom/pm8150.dtsi line 124

Quoted 10 lines
dts/upstream/src/arm64/qcom/pm8150.dtsi +1 -1
@@ -116,13 +116,21 @@
 			status = "disabled";
 		};
 
-		rtc@6000 {
+		pm8150_rtc: rtc@6000 {
 			compatible = "qcom,pm8941-rtc";
 			reg = <0x6000>, <0x6100>;
 			reg-names = "rtc", "alarm";
 			interrupts = <0x0 0x61 0x1 IRQ_TYPE_NONE>;
 		};

It's possible to refer a devicetree node by using its full path, which may help if you decide not to upstream changes in pm8150.dtsi first.

dts/upstream/src/arm64/qcom/pm8150.dtsi line 136

Quoted 11 lines
dts/upstream/src/arm64/qcom/pm8150.dtsi +8 -0
+		pm8150_sdam_2: sdam@b100 {
+			compatible = "qcom,spmi-sdam";
+			reg = <0xb100>;
+			#address-cells = <1>;
+			#size-cells = <1>;
+			status = "disabled";
+		};
+
 		pm8150_gpios: gpio@c000 {
 			compatible = "qcom,pm8150-gpio", "qcom,spmi-gpio";
 			reg = <0xc000>;

Regards,
Yao Zi

[1]: https://git.kernel.org/pub/scm/linux/kernel/git/devicetree/devicetree-rebasing.git