Skip to contentSkip to conversation

add device Xiaomi Mi 6 (codename sagit) and board binding

PATCH Superseded Dzmitry Sankouski 2 participants 7 messages Nov 2, 2022 – Nov 10, 2022

Subsystems (3)

v11 of 12 Superseded Latest is v12 →

lore
Share & tools
lore
#0 lore raw

v11 cover add device Xiaomi Mi 6 (codename sagit) and board binding

Add initial support for Xiaomi Mi 6 phone (codename sagit)

Dzmitry Sankouski (2):
dt-bindings: arm: add xiaomi,sagit board based on msm8998 chip
arm64: dts: qcom: sagit: add initial device tree for sagit

 .../devicetree/bindings/arm/qcom.yaml         |   1 +
 arch/arm64/boot/dts/qcom/Makefile             |   1 +
 .../boot/dts/qcom/msm8998-xiaomi-sagit.dts    | 711 ++++++++++++++++++
 arch/arm64/boot/dts/qcom/pm8998.dtsi          |   8 +
 4 files changed, 721 insertions(+)
 create mode 100644 arch/arm64/boot/dts/qcom/msm8998-xiaomi-sagit.dts
Signature · 1 line
2.30.2
#1 lore raw

PATCH v11 1/2 dt-bindings: arm: add xiaomi,sagit board based on msm8998 chip

Add xiaomi,sagit board (Xiaomi Mi 6) binding.

---
Changes for v2:none
Changes for v3:
- remove unused 'sagit' compatible line
Changes for v4: none
Changes for v5: none
Changes for v6: Start with capital letter and finish with full-stop Changes for v7: none
Changes for v8: none
Changes for v9: add Acked-by tag
Changes for v10: none
Changes for v11: rebase on v6.1-rc3

 Documentation/devicetree/bindings/arm/qcom.yaml | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/arm/qcom.yaml +1 -0
index 1b5ac6b02bc5..1e619cdc63ef 100644
@@ -242,6 +242,7 @@ properties:
               - sony,xperia-lilac
               - sony,xperia-maple
               - sony,xperia-poplar
+              - xiaomi,sagit
           - const: qcom,msm8998
 
       - items:
Signature · 1 line
2.30.2
#2 lore raw

PATCH v11 2/2 arm64: dts: qcom: sagit: add initial device tree for sagit

In reply to Dzmitry Sankouski

New device support - Xiaomi Mi6 phone

What works:
- storage
- usb
- power regulators

---
Changes for v2:
- remove memory nodes before redefining
- add board compatible to schema
- remove board msm-id, add chassis type
- remove common dtsi
- move resin to pm8998 dtsi file
- dts formatting
- unsupported properties removed
- add copyright
- rebase on latest master(6.0.0-rc6)
Changes for v3:
- regulators nodes renamed to match pattern 'regulators-[01]'
- duplicate cci1-default node deleted
- add state suffix to '.*(active|suspend|default)' pinctrl
- rebase on latest master(6.0.0)
Changes for v4:
- fix dts compilation errors(rename pinctrl label usages) Changes for v5:
- use pm8005_regulators label
Changes for v6:
- add state suffix to all pinctrl
- move status nodes to last position
- disable resin node by default
- move the debounce param to pm8998.dtsi file
- place this patch after dt-binding patch
Changes for v7:
- fix Properties must precede subnodes dts compilation error Changes for v8:
- enable resin node
- rename nodes in reserved memory to comply with 'memory@.*' pattern Changes for v9: none
Changes for v10:
- reorder resin node content
- reorder reserved memory nodes
- increase reserved memory for adsp to comply with vendor kernel
- new line in blsp1_uart3 node
Changes for v11:
- rebase on v6.1-rc3
- add missing regulator to qusb2phy node

 arch/arm64/boot/dts/qcom/Makefile             |   1 +
 .../boot/dts/qcom/msm8998-xiaomi-sagit.dts    | 711 ++++++++++++++++++
 arch/arm64/boot/dts/qcom/pm8998.dtsi          |   8 +
 3 files changed, 720 insertions(+)
 create mode 100644 arch/arm64/boot/dts/qcom/msm8998-xiaomi-sagit.dts
arch/arm64/boot/dts/qcom/Makefile +1 -0
index d7669a7cee9f..660edacbb7ee 100644
@@ -49,6 +49,7 @@ dtb-$(CONFIG_ARCH_QCOM)	+= msm8998-oneplus-dumpling.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8998-sony-xperia-yoshino-lilac.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8998-sony-xperia-yoshino-maple.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8998-sony-xperia-yoshino-poplar.dtb
+dtb-$(CONFIG_ARCH_QCOM)	+= msm8998-xiaomi-sagit.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= qcs404-evb-1000.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= qcs404-evb-4000.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= qrb5165-rb5.dtb
arch/arm64/boot/dts/qcom/msm8998-xiaomi-sagit.dts new file +711 -0

711 lines not on this page · raw message

arch/arm64/boot/dts/qcom/pm8998.dtsi +8 -0
index d09f2954b6f9..fabee4b71677 100644
@@ -52,6 +52,14 @@ pm8998_pwrkey: pwrkey {
 				bias-pull-up;
 				linux,code = <KEY_POWER>;
 			};
+
+			pm8998_resin: resin {
+				compatible = "qcom,pm8941-resin";
+				interrupts = <GIC_SPI 0x8 1 IRQ_TYPE_EDGE_BOTH>;
+				debounce = <15625>;
+				bias-pull-up;
+				status = "disabled";
+			};
 		};
 
 		pm8998_temp: temp-alarm@2400 {
Signature · 1 line
2.30.2
#3 lore raw

Re: [PATCH v11 2/2] arm64: dts: qcom: sagit: add initial device tree for sagit

Quoted 9 lines · Dzmitry Sankouski

New device support - Xiaomi Mi6 phone

What works:
- storage
- usb
- power regulators

---

(...)

Quoted 12 lines
arch/arm64/boot/dts/qcom/msm8998-xiaomi-sagit.dts new file +12 -0
+
+&blsp1_i2c5_sleep {
+	/delete-property/ bias-pull-up;
+	bias-disable;
+};
+
+&blsp1_uart3 {
+	status = "okay";
+
+	bluetooth {
+		compatible = "qcom,wcn3990-bt";
+

arch/arm64/boot/dts/qcom/msm8998-xiaomi-sagit.dts line 241

Quoted 10 lines
arch/arm64/boot/dts/qcom/msm8998-xiaomi-sagit.dts new file +10 -0
+		vddio-supply = <&vreg_s4a_1p8>;
+		vddxo-supply = <&vreg_l7a_1p8>;
+		vddrf-supply = <&vreg_l17a_1p3>;
+		vddch0-supply = <&vreg_l25a_3p3>;
+		max-speed = <3200000>;
+	};
+};
+
+&blsp1_uart3_on {
+	rx {

This is a friendly reminder during the review process.

It seems my previous comments were not fully addressed. Maybe my feedback got lost between the quotes, maybe you just forgot to apply it. Please go back to the previous discussion and either implement all requested changes or keep discussing them.

Thank you.

6.1-rc3 is not a proper rebase... You *must* include maintainers' entries. This *must* align with stuff has Bjorn. Also I expect it passes dtbs_check on stuff in the next.

Best regards,
Krzysztof

#4 lore raw

Re: [PATCH v11 2/2] arm64: dts: qcom: sagit: add initial device tree for sagit

Is the master branch of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
proper rebase?
Or do I need to search and apply device tree doc patches somehow before running dtbs_check?
I rebased on linux-next/master, and my dts is ok.

A lot of warnings for msm8998.dtsi, though. I think it should be fixed in a separate patch series.

ср, 2 нояб. 2022 г. в 22:20, Krzysztof Kozlowski
<[email protected]>:

Quoted 53 lines · Dzmitry Sankouski
Quoted 9 lines

New device support - Xiaomi Mi6 phone

What works:
- storage
- usb
- power regulators

---

(...)

Quoted 12 lines
arch/arm64/boot/dts/qcom/msm8998-xiaomi-sagit.dts new file +12 -0
+
+&blsp1_i2c5_sleep {
+     /delete-property/ bias-pull-up;
+     bias-disable;
+};
+
+&blsp1_uart3 {
+     status = "okay";
+
+     bluetooth {
+             compatible = "qcom,wcn3990-bt";
+

arch/arm64/boot/dts/qcom/msm8998-xiaomi-sagit.dts line 241

Quoted 10 lines
arch/arm64/boot/dts/qcom/msm8998-xiaomi-sagit.dts new file +10 -0
+             vddio-supply = <&vreg_s4a_1p8>;
+             vddxo-supply = <&vreg_l7a_1p8>;
+             vddrf-supply = <&vreg_l17a_1p3>;
+             vddch0-supply = <&vreg_l25a_3p3>;
+             max-speed = <3200000>;
+     };
+};
+
+&blsp1_uart3_on {
+     rx {

This is a friendly reminder during the review process.

It seems my previous comments were not fully addressed. Maybe my feedback got lost between the quotes, maybe you just forgot to apply it. Please go back to the previous discussion and either implement all requested changes or keep discussing them.

Thank you.

6.1-rc3 is not a proper rebase... You *must* include maintainers' entries. This *must* align with stuff has Bjorn. Also I expect it passes dtbs_check on stuff in the next.

Best regards,
Krzysztof

#5 lore raw

Re: [PATCH v11 2/2] arm64: dts: qcom: sagit: add initial device tree for sagit

Quoted 3 lines · Dzmitry Sankouski

Is the master branch of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
proper rebase?

Yes, next/master is ok.

Quoted 6 lines

Or do I need to search and apply device tree doc patches somehow before running dtbs_check?
I rebased on linux-next/master, and my dts is ok.

A lot of warnings for msm8998.dtsi, though. I think it should be fixed in a separate patch series.

Your DTS is not OK and it introduces wrong pinctrl entry, which I commented under. It also does not pass test, as I said:

DTC_CHK arch/arm64/boot/dts/qcom/msm8998-xiaomi-sagit.dtb
/home/krzk/dev/linux/linux/out/arch/arm64/boot/dts/qcom/msm8998-xiaomi-sagit.dtb:
pinctrl@3400000: blsp1-uart3-on-state: 'oneOf' conditional failed, one must be fixed:
'function' is a required property
'pins' is a required property
'cts', 'cts-pins', 'rfr-pins', 'rx', 'rx-pins', 'tx-pins' do not match
any of the regexes: 'pinctrl-[0-9]+'

	'cts', 'rx' do not match any of the regexes: '-pins$', 'pinctrl-[0-9]+'
	From schema:

/home/krzk/dev/linux/linux/Documentation/devicetree/bindings/pinctrl/qcom,msm8998-pinctrl.yaml make[1]: Leaving directory '/home/krzk/dev/linux/linux/out'

Best regards,
Krzysztof

#6 lore raw

Re: [PATCH v11 2/2] arm64: dts: qcom: sagit: add initial device tree for sagit

пн, 7 нояб. 2022 г. в 17:33, Krzysztof Kozlowski
<[email protected]>:

Quoted 2 lines · Dzmitry Sankouski

(...)

Quoted 5 lines
Quoted 2 lines

A lot of warnings for msm8998.dtsi, though. I think it should be fixed in a separate patch series.

Your DTS is not OK and it introduces wrong pinctrl entry, which I commented under. It also does not pass test, as I said:

My bad, I'll fix that

Quoted 1 line

(...)

Quoted 1 line