Skip to contentSkip to conversation

dt-bindings: arm: qcom: Add Xiaomi Pad 6 (xiaomi-pipa)

PATCH Superseded Luka Panio 4 participants 9 messages Oct 22, 2023 – Oct 23, 2023

Subsystems (3)

v6 of 11 Superseded Latest is v11 →

lore
Share & tools
lore

Luka Panio

author
#0 lore raw

PATCH v6 1/2 dt-bindings: arm: qcom: Add Xiaomi Pad 6 (xiaomi-pipa)

Add a compatible for Xiaomi Pad 6.

---
v2:
Update commit message

v3:
Update commit message

v4:
Update commit message

v5:
Update commit message

v6:
Update commit message

---
 Documentation/devicetree/bindings/arm/qcom.yaml | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/arm/qcom.yaml +1 -0
index adbfaea32343..1bfae1b237d2 100644
@@ -965,6 +965,7 @@ properties:
               - sony,pdx203-generic
               - sony,pdx206-generic
               - xiaomi,elish
+              - xiaomi,pipa
           - const: qcom,sm8250
 
       - items:
Signature · 1 line
2.42.0
author
#1 lore raw

PATCH v6 2/2 arm64: dts: qcom: sm8250-xiaomi-pipa: Add initial device tree

Initial support for Xiaomi Pad 6 tablet, that have sm8250 soc.

---
v2:
Update commit message. Drop reserved gpio's as this device in reality do not have gpio, and pins are not protected.

v3:
Update commit message.

v4:
Update commit message.

v5:
Update commit message.

v6:
Update commit message.

---
 arch/arm64/boot/dts/qcom/Makefile             |   1 +
 .../boot/dts/qcom/sm8250-xiaomi-pipa.dts      | 625 ++++++++++++++++++
 2 files changed, 626 insertions(+)
 create mode 100644 arch/arm64/boot/dts/qcom/sm8250-xiaomi-pipa.dts
arch/arm64/boot/dts/qcom/Makefile +1 -0
index 2cca20563a1d..41ab333d1f81 100644
@@ -208,6 +208,7 @@ dtb-$(CONFIG_ARCH_QCOM)	+= sm8250-sony-xperia-edo-pdx203.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sm8250-sony-xperia-edo-pdx206.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sm8250-xiaomi-elish-boe.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sm8250-xiaomi-elish-csot.dtb
+dtb-$(CONFIG_ARCH_QCOM)	+= sm8250-xiaomi-pipa.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sm8350-hdk.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sm8350-microsoft-surface-duo2.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sm8350-mtp.dtb
arch/arm64/boot/dts/qcom/sm8250-xiaomi-pipa.dts new file +625 -0

625 lines not on this page · raw message

Signature · 1 line
2.42.0
#2 lore raw

Re: [PATCH v6 2/2] arm64: dts: qcom: sm8250-xiaomi-pipa: Add initial device tree

Quoted 43 lines · Luka Panio

Initial support for Xiaomi Pad 6 tablet, that have sm8250 soc.

---
v2:
Update commit message. Drop reserved gpio's as this device in reality do not have gpio, and pins are not protected.

v3:
Update commit message.

v4:
Update commit message.

v5:
Update commit message.

v6:
Update commit message.

---
 arch/arm64/boot/dts/qcom/Makefile             |   1 +
 .../boot/dts/qcom/sm8250-xiaomi-pipa.dts      | 625 ++++++++++++++++++
 2 files changed, 626 insertions(+)
 create mode 100644 arch/arm64/boot/dts/qcom/sm8250-xiaomi-pipa.dts
arch/arm64/boot/dts/qcom/Makefile +1 -0
index 2cca20563a1d..41ab333d1f81 100644
@@ -208,6 +208,7 @@ dtb-$(CONFIG_ARCH_QCOM)	+= sm8250-sony-xperia-edo-pdx203.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sm8250-sony-xperia-edo-pdx206.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sm8250-xiaomi-elish-boe.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sm8250-xiaomi-elish-csot.dtb
+dtb-$(CONFIG_ARCH_QCOM)	+= sm8250-xiaomi-pipa.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sm8350-hdk.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sm8350-microsoft-surface-duo2.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sm8350-mtp.dtb
arch/arm64/boot/dts/qcom/sm8250-xiaomi-pipa.dts new file +0 -0
new file mode 100644
index 000000000000..41eae1aaa2a8

arch/arm64/boot/dts/qcom/sm8250-xiaomi-pipa.dts line 1

Quoted 1 line
arch/arm64/boot/dts/qcom/sm8250-xiaomi-pipa.dts new file +1 -0
@@ -0,0 +1,625 @@
+// SPDX-License-Identifier: BSD-3-Clause

If there are no other copyrights here, why did you use BSD-3 license?

Quoted 21 lines
arch/arm64/boot/dts/qcom/sm8250-xiaomi-pipa.dts new file +21 -0
+/*
+ * Copyright (c) 2023 luka177 <[email protected]>
+ */
+
+/dts-v1/;
+
+#include <dt-bindings/arm/qcom,ids.h>
+#include <dt-bindings/phy/phy.h>
+#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
+#include "sm8250.dtsi"
+#include "pm8150.dtsi"
+#include "pm8150b.dtsi"
+#include "pm8150l.dtsi"
+#include "pm8009.dtsi"
+
+/*
+ * Delete following upstream (sm8250.dtsi) reserved
+ * memory mappings which are different on this device.
+ */
+/delete-node/ &adsp_mem;
+/delete-node/ &cdsp_secure_heap;

arch/arm64/boot/dts/qcom/sm8250-xiaomi-pipa.dts line 32

Quoted 10 lines
arch/arm64/boot/dts/qcom/sm8250-xiaomi-pipa.dts new file +10 -0
+/delete-node/ &slpi_mem;
+/delete-node/ &spss_mem;
+/delete-node/ &xbl_aop_mem;
+
+/ {
+
+	model = "Xiaomi Pad 6";
+	compatible = "xiaomi,pipa", "qcom,sm8250";
+
+	classis-type = "tablet";

chassis-type

It does not look like you tested the DTS against bindings. Please run make dtbs_check W=1 (see Documentation/devicetree/bindings/writing-schema.rst or
https://www.linaro.org/blog/tips-and-tricks-for-validating-devicetree-sources-with-the-devicetree-schema/
for instructions).

arch/arm64/boot/dts/qcom/sm8250-xiaomi-pipa.dts line 36

Quoted 4 lines
arch/arm64/boot/dts/qcom/sm8250-xiaomi-pipa.dts new file +4 -0
+
+	/* required for bootloader to select correct board */
+	qcom,msm-id = <QCOM_ID_SM8250 0x20001>; /* SM8250 v2.1 */
+	qcom,board-id = <0x34 0>;

0x34 or 34?

Quoted 5 lines
arch/arm64/boot/dts/qcom/sm8250-xiaomi-pipa.dts new file +5 -0
+
+	chosen {
+		#address-cells = <2>;
+		#size-cells = <2>;
+		ranges;

....

Quoted 4 lines
arch/arm64/boot/dts/qcom/sm8250-xiaomi-pipa.dts new file +4 -0
+
+&i2c13 {
+	clock-frequency = <400000>;
+	status = "okay";

arch/arm64/boot/dts/qcom/sm8250-xiaomi-pipa.dts line 538

Quoted 10 lines
arch/arm64/boot/dts/qcom/sm8250-xiaomi-pipa.dts new file +10 -0
+
+	fuel-gauge@55 {
+		compatible = "ti,bq27z561";
+		reg = <0x55>;
+		monitored-battery = <&battery_l>;
+	};
+};
+
+
+

Just one blank line

arch/arm64/boot/dts/qcom/sm8250-xiaomi-pipa.dts line 547

Quoted 9 lines

+&pcie0 {

arch/arm64/boot/dts/qcom/sm8250-xiaomi-pipa.dts new file +8 -0
+	status = "okay";
+};
+
+&pcie0_phy {
+	vdda-phy-supply = <&vreg_l5a_0p88>;
+	vdda-pll-supply = <&vreg_l9a_1p2>;
+	status = "okay";
+};

Best regards,
Krzysztof

author
#3 lore raw

Re: [PATCH v6 2/2] arm64: dts: qcom: sm8250-xiaomi-pipa: Add initial device tree

Quoted 1 line · Krzysztof Kozlowski

If there are no other copyrights here, why did you use BSD-3 license?

I am by no means a licensing expert, but as sm8250.dts did use BSD-3 and other device tree's (for example sm8250-xiaomi-elish-boe.dts) did use it, I thought I should do the same. Should I drop it?

Quoted 9 lines

chassis-type

It does not look like you tested the DTS against bindings. Please run make dtbs_check W=1 (see Documentation/devicetree/bindings/writing-schema.rst or
https://www.linaro.org/blog/tips-and-tricks-for-validating-devicetree-sources-with-the-devicetree-schema/
for instructions).

Thanks, will do.

Quoted 1 line

0x34 or 34?

Yes 0x24, should i tend to use decimal?
Thanks,
Luka

P.S. Sorry if you got duplicated email

#4 lore raw

Re: [PATCH v6 2/2] arm64: dts: qcom: sm8250-xiaomi-pipa: Add initial device tree

Quoted 7 lines · Luka Panio
Quoted 1 line · Krzysztof Kozlowski

If there are no other copyrights here, why did you use BSD-3 license?

I am by no means a licensing expert, but as sm8250.dts did use BSD-3 and other device tree's (for example sm8250-xiaomi-elish-boe.dts) did use it, I thought I should do the same. Should I drop it?

Did you base your work on these files? This would explain the license, but then please include original copyrights.

Quoted 10 lines
Quoted 10 lines

chassis-type

It does not look like you tested the DTS against bindings. Please run make dtbs_check W=1 (see Documentation/devicetree/bindings/writing-schema.rst or
https://www.linaro.org/blog/tips-and-tricks-for-validating-devicetree-sources-with-the-devicetree-schema/
for instructions).

Quoted 4 lines

Thanks, will do.

Quoted 1 line

0x34 or 34?

Yes 0x24, should i tend to use decimal?

Please do not trim the content that much. How can I know to what you refer here? What was in original code? 0x24?

Best regards,
Krzysztof

author
#5 lore raw

Re: [PATCH v6 2/2] arm64: dts: qcom: sm8250-xiaomi-pipa: Add initial device tree

Quoted 2 lines

Did you base your work on these files? This would explain the license, but then please include original copyrights.

No, but the sm8250.dtsi that I do include has that license. Same as all other sm8250 device's dts's so i thought mine should not be different?

Quoted 2 lines

Please do not trim the content that much. How can I know to what you refer here? What was in original code? 0x24?

Sorry, indeed I did mean 0x34, but I am not really sure what I can/should do about that, in the and only reason for it is to make bootloader happy, should i mention that as a comment?

Thanks,
Luka Panio

#6 lore raw

Re: [PATCH v6 2/2] arm64: dts: qcom: sm8250-xiaomi-pipa: Add initial device tree

Quoted 5 lines · Luka Panio
Quoted 2 lines

Did you base your work on these files? This would explain the license, but then please include original copyrights.

No, but the sm8250.dtsi that I do include has that license. Same as all other sm8250 device's dts's so i thought mine should not be different?

Including a file does not make your work derivative (at least usually), so either you based your work on existing file or you created a new file. If you created a new file, then I would propose to license this the same as we license bindings, so:
GPL-2.0-only OR BSD-2-Clause

Quoted 6 lines
Quoted 3 lines

Please do not trim the content that much. How can I know to what you refer here? What was in original code? 0x24?

Sorry, indeed I did mean 0x34, but I am not really sure what I can/should do about that, in the and only reason for it is to make bootloader happy, should i mention that as a comment?

No, I just wanted to be sure you used valid value. Few more boards use decimal 34.

Best regards,
Krzysztof

#7 lore raw

Re: [PATCH v6 2/2] arm64: dts: qcom: sm8250-xiaomi-pipa: Add initial device tree

In reply to Krzysztof Kozlowski

Hi!

Quoted 9 lines

arch/arm64/boot/dts/qcom/sm8250-xiaomi-pipa.dts line 1

Quoted 7 lines

Initial support for Xiaomi Pad 6 tablet, that have sm8250 soc.

+++ b/arch/arm64/boot/dts/qcom/sm8250-xiaomi-pipa.dts

arch/arm64/boot/dts/qcom/sm8250-xiaomi-pipa.dts new file +1 -0
@@ -0,0 +1,625 @@
+// SPDX-License-Identifier: BSD-3-Clause

If there are no other copyrights here, why did you use BSD-3 license?

We like BSD license for dts files. (But dual GPL or BSD is more common. Not that it matters).

Quoted 3 lines

arch/arm64/boot/dts/qcom/sm8250-xiaomi-pipa.dts line 4

Quoted 3 lines
arch/arm64/boot/dts/qcom/sm8250-xiaomi-pipa.dts new file +3 -0
+/*
+ * Copyright (c) 2023 luka177 <[email protected]>
+ */

This should have real name.
Pavel

Signature · 1 line
People of Russia, stop Putin before his war on Ukraine escalates.
Acked-by on v6 1/2
#8 lore raw
In reply to Luka Panio
Quoted 3 lines · Luka Panio

Add a compatible for Xiaomi Pad 6.

Thanks
Conor.

Quoted 35 lines

---
v2:
Update commit message

v3:
Update commit message

v4:
Update commit message

v5:
Update commit message

v6:
Update commit message

---
 Documentation/devicetree/bindings/arm/qcom.yaml | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/arm/qcom.yaml +1 -0
index adbfaea32343..1bfae1b237d2 100644
@@ -965,6 +965,7 @@ properties:
               - sony,pdx203-generic
               - sony,pdx206-generic
               - xiaomi,elish
+              - xiaomi,pipa
           - const: qcom,sm8250
 
       - items:
Signature · 1 line
2.42.0