Skip to contentSkip to conversation

add device Xiaomi Mi 6 sagit and board binding

PATCH Superseded Dzmitry Sankouski 2 participants 6 messages Sep 28, 2022 – Oct 3, 2022 1 message not in the archive

Subsystems (3)

v2 of 12 Superseded Latest is v12 →

lore
Share & tools
lore
#0 lore raw

v2 cover add device Xiaomi Mi 6 sagit and board binding

To: [email protected]
CC: Andy Gross <[email protected]> (maintainer:ARM/QUALCOMM SUPPORT)
CC: Bjorn Andersson <[email protected]> (maintainer:ARM/QUALCOMM SUPPORT)
CC: Konrad Dybcio <[email protected]> (reviewer:ARM/QUALCOMM SUPPORT)
CC: Rob Herring <[email protected]> (maintainer:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS)
CC: Krzysztof Kozlowski <[email protected]> (maintainer:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS)
CC: [email protected] (open list:ARM/QUALCOMM SUPPORT)
CC: [email protected] (open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS)

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

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

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

New device support - Xiaomi Mi6 phone

What works:
- storage
- usb
- power regulators

TO: [email protected] (open list)
CC: Andy Gross <[email protected]> (maintainer:ARM/QUALCOMM SUPPORT)
CC: Bjorn Andersson <[email protected]> (maintainer:ARM/QUALCOMM SUPPORT)
CC: Konrad Dybcio <[email protected]> (reviewer:ARM/QUALCOMM SUPPORT)
CC: Rob Herring <[email protected]> (maintainer:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS)
CC: Krzysztof Kozlowski <[email protected]> (maintainer:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS)
CC: [email protected] (open list:ARM/QUALCOMM SUPPORT)
CC: [email protected] (open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS)
---
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

 arch/arm64/boot/dts/qcom/Makefile             |   1 +
 .../boot/dts/qcom/msm8998-xiaomi-sagit.dts    | 682 ++++++++++++++++++
 arch/arm64/boot/dts/qcom/pm8998.dtsi          |   6 +
 3 files changed, 689 insertions(+)
 create mode 100644 arch/arm64/boot/dts/qcom/msm8998-xiaomi-sagit.dts
arch/arm64/boot/dts/qcom/Makefile +1 -0
index 1d86a33de528..0460aabf1b59 100644
@@ -46,6 +46,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 +682 -0

682 lines not on this page · raw message

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

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

Quoted 8 lines · Dzmitry Sankouski

New device support - Xiaomi Mi6 phone

What works:
- storage
- usb
- power regulators

Please use scripts/get_maintainers.pl to get a list of necessary people and lists to CC. It might happen, that command when run on an older kernel, gives you outdated entries. Therefore please be sure you base your patches on recent Linux kernel.

You cc wrong addreses...

Quoted 8 lines

TO: [email protected] (open list)
CC: Andy Gross <[email protected]> (maintainer:ARM/QUALCOMM SUPPORT)
CC: Bjorn Andersson <[email protected]> (maintainer:ARM/QUALCOMM SUPPORT)
CC: Konrad Dybcio <[email protected]> (reviewer:ARM/QUALCOMM SUPPORT)
CC: Rob Herring <[email protected]> (maintainer:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS)
CC: Krzysztof Kozlowski <[email protected]> (maintainer:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS)
CC: [email protected] (open list:ARM/QUALCOMM SUPPORT)
CC: [email protected] (open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS)

This does not belong to the patch.

Quoted 240 lines

---
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

 arch/arm64/boot/dts/qcom/Makefile             |   1 +
 .../boot/dts/qcom/msm8998-xiaomi-sagit.dts    | 682 ++++++++++++++++++
 arch/arm64/boot/dts/qcom/pm8998.dtsi          |   6 +
 3 files changed, 689 insertions(+)
 create mode 100644 arch/arm64/boot/dts/qcom/msm8998-xiaomi-sagit.dts
arch/arm64/boot/dts/qcom/Makefile +1 -0
index 1d86a33de528..0460aabf1b59 100644
@@ -46,6 +46,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 +204 -0
new file mode 100644
index 000000000000..0cd56eff5b89
@@ -0,0 +1,682 @@
+// SPDX-License-Identifier: BSD-3-Clause
+/*
+ * Xiaomi Mi 6 (sagit) device tree source based on msm8998-mtp.dtsi
+ *
+ * Copyright (c) 2022, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2022, Degdag Mohamed <[email protected]>
+ * Copyright (c) 2022, Dzmitry Sankouski <[email protected]>
+ */
+
+/dts-v1/;
+
+#include "msm8998.dtsi"
+#include "pm8005.dtsi"
+#include "pm8998.dtsi"
+#include "pmi8998.dtsi"
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
+#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
+
+/*
+ * Delete following upstream (msm8998.dtsi) reserved
+ * memory mappings which are different in this device.
+ */
+/delete-node/ &mpss_mem;
+/delete-node/ &venus_mem;
+/delete-node/ &mba_mem;
+/delete-node/ &slpi_mem;
+/delete-node/ &ipa_fw_mem;
+/delete-node/ &ipa_gsi_mem;
+/delete-node/ &gpu_mem;
+/delete-node/ &wlan_msa_mem;
+
+/ {
+	model = "Xiaomi Mi 6";
+	compatible = "xiaomi,sagit", "qcom,msm8998";
+	chassis-type = "handset";
+	/* Required for bootloader to select correct board */
+	qcom,board-id = <30 0>;
+
+	reserved-memory {
+		/*
+		 * The following memory regions on downstream are "dynamically allocated"
+		 * but given the same addresses every time. Hard code them as these addresses
+		 * are where the Xiaomi signed firmware expects them to be.
+		 */
+		ipa_fws_region: ipa@f7800000 {
+			compatible = "shared-dma-pool";
+			reg = <0x0 0xf7800000 0x0 0x5000>;
+			no-map;
+		};
+
+		zap_shader_region: gpu@f7900000 {
+			compatible = "shared-dma-pool";
+			reg = <0x0 0xf7900000 0x0 0x2000>;
+			no-map;
+		};
+
+		mpss_mem: memory@8d000000 {
+			reg = <0x0 0x8d000000 0x0 0x7000000>;
+			no-map;
+		};
+
+		venus_mem: memory@94000000 {
+			reg = <0x0 0x94000000 0x0 0x500000>;
+			no-map;
+		};
+
+		mba_mem: memory@94500000 {
+			reg = <0x0 0x94500000 0x0 0x200000>;
+			no-map;
+		};
+
+		slpi_mem: memory@94700000 {
+			reg = <0x0 0x94700000 0x0 0x10000>;
+			no-map;
+		};
+
+		ipa_fw_mem: memory@95600000 {
+			reg = <0x0 0x95600000 0x0 0x10000>;
+			no-map;
+		};
+
+		ipa_gsi_mem: memory@95610000 {
+			reg = <0x0 0x95610000 0x0 0x5000>;
+			no-map;
+		};
+
+		gpu_mem: memory@95615000 {
+			reg = <0x0 0x95615000 0x0 0x100000>;
+			no-map;
+		};
+
+		wlan_msa_mem: memory@95715000 {
+			reg = <0x0 0x95715000 0x0 0x100000>;
+			no-map;
+		};
+	};
+
+	gpio-keys {
+		compatible = "gpio-keys";
+		label = "Volume buttons";
+		autorepeat;
+
+		pinctrl-names = "default";
+		pinctrl-0 = <&vol_up_key_default>;
+
+		key-vol-up {
+			label = "Volume up";
+			gpios = <&pm8998_gpio 6 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_VOLUMEUP>;
+			debounce-interval = <15>;
+			wakeup-source;
+		};
+	};
+
+	gpio-hall-sensor {
+		compatible = "gpio-keys";
+		label = "Hall effect sensor";
+
+		pinctrl-names = "default";
+		pinctrl-0 = <&hall_sensor_default>;
+
+		event-hall-sensor {
+			label = "Hall Effect Sensor";
+			gpios = <&tlmm 124 GPIO_ACTIVE_LOW>;
+			linux,input-type = <EV_SW>;
+			linux,code = <SW_LID>;
+			linux,can-disable;
+			wakeup-source;
+		};
+	};
+
+	vph_pwr: vph-pwr-regulator {
+		compatible = "regulator-fixed";
+		regulator-name = "vph_pwr";
+		regulator-min-microvolt = <3700000>;
+		regulator-max-microvolt = <3700000>;
+		regulator-always-on;
+		regulator-boot-on;
+	};
+
+	disp_vddts_vreg: disp-vddts-regulator {
+		compatible = "regulator-fixed";
+		regulator-name = "disp-vddts-regulator";
+		gpio = <&tlmm 50 GPIO_ACTIVE_HIGH>;
+		enable-active-high;
+		regulator-boot-on;
+	};
+};
+
+&blsp1_i2c5 {
+	pinctrl-names = "default", "sleep";
+	status = "okay";
+
+	touchscreen@20 {
+		compatible = "syna,rmi4-i2c";
+		reg = <0x20>;
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		interrupt-parent = <&tlmm>;
+		interrupts = <125 IRQ_TYPE_EDGE_FALLING>;
+
+		pinctrl-names = "default", "sleep";
+		pinctrl-0 = <&ts_active>;
+		pinctrl-1 = <&ts_int_suspend &ts_reset_suspend>;
+
+		vdd-supply = <&disp_vddts_vreg>;
+		vio-supply = <&vreg_l6a_1p8>;
+
+		syna,reset-delay-ms = <20>;
+		syna,startup-delay-ms = <20>;
+
+		rmi4-f01@1 {
+			reg = <0x01>;
+			syna,nosleep-mode = <1>;
+		};
+
+		rmi4-f12@12 {
+			reg = <0x12>;
+			touchscreen-x-mm = <64>;
+			touchscreen-y-mm = <114>;
+			syna,sensor-type = <1>;
+			syna,rezero-wait-ms = <20>;
+		};
+
+		rmi4-f1a@1a {
+			reg = <0x1a>;
+			syna,codes = <KEY_BACK KEY_APPSELECT>;
+		};
+	};
+};
+
+&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 214

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 {

Missing suffix pins

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

Quoted 11 lines
arch/arm64/boot/dts/qcom/msm8998-xiaomi-sagit.dts new file +11 -0
+		/delete-property/ bias-disable;
+		/*
+		 * Configure a pull-up on 46 (RX). This is needed to
+		 * avoid garbage data when the TX pin of the Bluetooth
+		 * module is in tri-state (module powered off or not
+		 * driving the signal yet).
+		 */
+		bias-pull-up;
+	};
+
+	cts {

Missing suffix pins

Quoted 5 lines
arch/arm64/boot/dts/qcom/msm8998-xiaomi-sagit.dts new file +5 -0
+		/delete-property/ bias-disable;
+		/*
+		 * Configure a pull-down on 47 (CTS) to match the pull
+		 * of the Bluetooth module.
+		 */

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

Quoted 10 lines
arch/arm64/boot/dts/qcom/msm8998-xiaomi-sagit.dts new file +10 -0
+		bias-pull-down;
+	};
+};
+
+&blsp2_uart1 {
+	status = "okay";
+};
+
+&pm8005_lsid1 {
+	pm8005-regulators {

This is just "regulators", right?

Quoted 30 lines
arch/arm64/boot/dts/qcom/msm8998-xiaomi-sagit.dts new file +30 -0
+		compatible = "qcom,pm8005-regulators";
+
+		vdd_s1-supply = <&vph_pwr>;
+
+		pm8005_s1: s1 { /* VDD_GFX supply */
+			regulator-min-microvolt = <524000>;
+			regulator-max-microvolt = <1100000>;
+			regulator-enable-ramp-delay = <500>;
+
+			/* hack until we rig up the gpu consumer */
+			regulator-always-on;
+		};
+	};
+};
+
+&pm8998_gpio {
+	vol_up_key_default: vol-up-key-default-state {
+		pins = "gpio6";
+		function = "normal";
+		bias-pull-up;
+		input-enable;
+		qcom,drive-strength = <PMIC_GPIO_STRENGTH_NO>;
+	};
+
+	audio_mclk_pin: audio-mclk-pin-active-state {
+		pins = "gpio13";
+		function = "func2";
+		power-source = <0>;
+	};
+};

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

Quoted 10 lines
arch/arm64/boot/dts/qcom/msm8998-xiaomi-sagit.dts new file +10 -0
+
+&qusb2phy {
+	status = "okay";
+
+	vdda-pll-supply = <&vreg_l12a_1p8>;
+	vdda-phy-dpdm-supply = <&vreg_l24a_3p075>;
+};
+
+&rpm_requests {
+	pm8998-regulators {

This is for sure now regulators (and since you have two: regulators-0).

Quoted 181 lines
arch/arm64/boot/dts/qcom/msm8998-xiaomi-sagit.dts new file +181 -0
+		compatible = "qcom,rpm-pm8998-regulators";
+
+		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 = <&vreg_s5a_2p04>;
+		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>;
+		vdd_lvs1_lvs2-supply = <&vreg_s4a_1p8>;
+
+		vreg_s3a_1p35: s3 {
+			regulator-min-microvolt = <1352000>;
+			regulator-max-microvolt = <1352000>;
+		};
+
+		vreg_s4a_1p8: s4 {
+			regulator-min-microvolt = <1800000>;
+			regulator-max-microvolt = <1800000>;
+			regulator-allow-set-load;
+		};
+
+		vreg_s5a_2p04: s5 {
+			regulator-min-microvolt = <1904000>;
+			regulator-max-microvolt = <2040000>;
+		};
+
+		vreg_s7a_1p025: s7 {
+			regulator-min-microvolt = <900000>;
+			regulator-max-microvolt = <1028000>;
+		};
+
+		vreg_l1a_0p875: l1 {
+			regulator-min-microvolt = <880000>;
+			regulator-max-microvolt = <880000>;
+		};
+
+		vreg_l2a_1p2: l2 {
+			regulator-min-microvolt = <1200000>;
+			regulator-max-microvolt = <1200000>;
+		};
+
+		vreg_l3a_1p0: l3 {
+			regulator-min-microvolt = <1000000>;
+			regulator-max-microvolt = <1000000>;
+		};
+
+		vreg_l5a_0p8: l5 {
+			regulator-min-microvolt = <800000>;
+			regulator-max-microvolt = <800000>;
+		};
+
+		vreg_l6a_1p8: l6 {
+			regulator-min-microvolt = <1800000>;
+			regulator-max-microvolt = <1800000>;
+		};
+
+		vreg_l7a_1p8: l7 {
+			regulator-min-microvolt = <1800000>;
+			regulator-max-microvolt = <1800000>;
+		};
+
+		vreg_l8a_1p2: l8 {
+			regulator-min-microvolt = <1200000>;
+			regulator-max-microvolt = <1200000>;
+		};
+
+		vreg_l9a_1p8: l9 {
+			regulator-min-microvolt = <1808000>;
+			regulator-max-microvolt = <2960000>;
+		};
+
+		vreg_l10a_1p8: l10 {
+			regulator-min-microvolt = <1808000>;
+			regulator-max-microvolt = <2960000>;
+		};
+
+		vreg_l11a_1p0: l11 {
+			regulator-min-microvolt = <1000000>;
+			regulator-max-microvolt = <1000000>;
+		};
+
+		vreg_l12a_1p8: l12 {
+			regulator-min-microvolt = <1800000>;
+			regulator-max-microvolt = <1800000>;
+		};
+
+		vreg_l13a_2p95: l13 {
+			regulator-min-microvolt = <1808000>;
+			regulator-max-microvolt = <2960000>;
+		};
+
+		vreg_l14a_1p8: l14 {
+			regulator-min-microvolt = <1800000>;
+			regulator-max-microvolt = <1800000>;
+		};
+
+		vreg_l15a_1p8: l15 {
+			regulator-min-microvolt = <1800000>;
+			regulator-max-microvolt = <1800000>;
+		};
+
+		vreg_l16a_2p7: l16 {
+			regulator-min-microvolt = <2704000>;
+			regulator-max-microvolt = <2704000>;
+		};
+
+		vreg_l17a_1p3: l17 {
+			regulator-min-microvolt = <1304000>;
+			regulator-max-microvolt = <1304000>;
+		};
+
+		vreg_l18a_2p7: l18 {
+			regulator-min-microvolt = <2704000>;
+			regulator-max-microvolt = <2704000>;
+		};
+
+		vreg_l19a_3p0: l19 {
+			regulator-min-microvolt = <3008000>;
+			regulator-max-microvolt = <3008000>;
+		};
+
+		vreg_l20a_2p95: l20 {
+			regulator-min-microvolt = <2960000>;
+			regulator-max-microvolt = <2960000>;
+			regulator-allow-set-load;
+		};
+
+		vreg_l21a_2p95: l21 {
+			regulator-min-microvolt = <2960000>;
+			regulator-max-microvolt = <2960000>;
+			regulator-system-load = <800000>;
+			regulator-allow-set-load;
+		};
+
+		vreg_l22a_2p85: l22 {
+			regulator-min-microvolt = <2864000>;
+			regulator-max-microvolt = <2864000>;
+		};
+
+		vreg_l23a_3p3: l23 {
+			regulator-min-microvolt = <3312000>;
+			regulator-max-microvolt = <3312000>;
+		};
+
+		vreg_l24a_3p075: l24 {
+			regulator-min-microvolt = <3088000>;
+			regulator-max-microvolt = <3088000>;
+		};
+
+		vreg_l25a_3p3: l25 {
+			regulator-min-microvolt = <3104000>;
+			regulator-max-microvolt = <3312000>;
+		};
+
+		vreg_l26a_1p2: l26 {
+			regulator-min-microvolt = <1200000>;
+			regulator-max-microvolt = <1200000>;
+			regulator-allow-set-load;
+		};
+
+		vreg_l28_3p0: l28 {

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

Quoted 10 lines
arch/arm64/boot/dts/qcom/msm8998-xiaomi-sagit.dts new file +10 -0
+			regulator-min-microvolt = <3008000>;
+			regulator-max-microvolt = <3008000>;
+		};
+
+		vreg_lvs1a_1p8: lvs1 { };
+
+		vreg_lvs2a_1p8: lvs2 { };
+	};
+
+	pmi8998-regulators {

regulators-1

Quoted 5 lines
arch/arm64/boot/dts/qcom/msm8998-xiaomi-sagit.dts new file +5 -0
+		compatible = "qcom,rpm-pmi8998-regulators";
+
+		vdd_bob-supply = <&vph_pwr>;
+
+		vreg_bob: bob {

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

Quoted 10 lines
arch/arm64/boot/dts/qcom/msm8998-xiaomi-sagit.dts new file +10 -0
+			regulator-min-microvolt = <3312000>;
+			regulator-max-microvolt = <3600000>;
+		};
+	};
+};
+
+&tlmm {
+	gpio-reserved-ranges = <0 4>, <81 4>;
+
+	cci1_default: cci1-default {

Missing suffix state. The same in all other places.

Quoted 6 lines
arch/arm64/boot/dts/qcom/msm8998-xiaomi-sagit.dts new file +6 -0
+		pins = "gpio18", "gpio19";
+		function = "cci_i2c";
+		bias-disable;
+		drive-strength = <2>;
+	};
+

(...)

Quoted 13 lines
arch/arm64/boot/dts/qcom/msm8998-xiaomi-sagit.dts new file +8 -0
+
+&wifi {
+	status = "okay";
+	vdd-0.8-cx-mx-supply = <&vreg_l5a_0p8>;
+	vdd-1.8-xo-supply = <&vreg_l7a_1p8>;
+	vdd-1.3-rfa-supply = <&vreg_l17a_1p3>;
+	vdd-3.3-ch0-supply = <&vreg_l25a_3p3>;
+};
arch/arm64/boot/dts/qcom/pm8998.dtsi +0 -0
index d09f2954b6f9..4551af463081 100644

arch/arm64/boot/dts/qcom/pm8998.dtsi pm8998_pwrkey: pwrkey { · line 56

Quoted 5 lines
arch/arm64/boot/dts/qcom/pm8998.dtsi +2 -0
@@ -52,6 +52,12 @@ pm8998_pwrkey: pwrkey {
 				bias-pull-up;
 				linux,code = <KEY_POWER>;
 			};
+
+			pm8998_resin: resin {

Missing suffix state

arch/arm64/boot/dts/qcom/pm8998.dtsi pm8998_pwrkey: pwrkey { · line 63

Quoted 7 lines
arch/arm64/boot/dts/qcom/pm8998.dtsi +4 -0
+				compatible = "qcom,pm8941-resin";
+				bias-pull-up;
+				interrupts = <GIC_SPI 0x8 1 IRQ_TYPE_EDGE_BOTH>;
+			};
 		};
 
 		pm8998_temp: temp-alarm@2400 {

Best regards,
Krzysztof

A message that is not in the archive (sent off-list or not yet received): CABTCjFBWrgTzjugjuJRPykAGtp65AF7JKY6eemzt=zn42udH1w@mail.gmail.com

#4 lore raw

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

Quoted 17 lines · Dzmitry Sankouski
Quoted 8 lines
Quoted 8 lines
arch/arm64/boot/dts/qcom/msm8998-xiaomi-sagit.dts new file +8 -0
+
+     bluetooth {
+             compatible = "qcom,wcn3990-bt";
+
+             vddio-supply = <&vreg_s4a_1p8>;
+             vddxo-supply = <&vreg_l7a_1p8>;
+             vddrf-supply = <&vreg_l17a_1p3>;
+             vddch0-supply = <&vreg_l25a_3p3>;
Quoted 9 lines

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

Quoted 6 lines
arch/arm64/boot/dts/qcom/msm8998-xiaomi-sagit.dts new file +6 -0
+             max-speed = <3200000>;
+     };
+};
+
+&blsp1_uart3_on {
+     rx {

Missing suffix pins

Quoted 5 lines

'rx' pin should be renamed with the corresponding pin in msm8998.dtsi file, since we're overriding the pin here, and rename 'rx' pins in other msm8998-based dts. Is that what you mean?
What are the possible suffix names? AFAIU, it can be either 'active' or 'suspend', right?

Trim the replies. It takes time to scroll through unrelated context.

If you override node form msm8998.dtsi, then it is fine.

Otherwise it would be suffix "pins", as I wrote.

Quoted 14 lines
Quoted 14 lines
Quoted 13 lines
arch/arm64/boot/dts/qcom/msm8998-xiaomi-sagit.dts new file +11 -0
+             /delete-property/ bias-disable;
+             /*
+              * Configure a pull-up on 46 (RX). This is needed to
+              * avoid garbage data when the TX pin of the Bluetooth
+              * module is in tri-state (module powered off or not
+              * driving the signal yet).
+              */
+             bias-pull-up;
+     };
+
+     cts {
Quoted 1 line
Quoted 1 line

Missing suffix pins

This also can be skipped, since it is override.

Quoted 62 lines
Quoted 53 lines
Quoted 6 lines
arch/arm64/boot/dts/qcom/msm8998-xiaomi-sagit.dts new file +5 -0
+             /delete-property/ bias-disable;
+             /*
+              * Configure a pull-down on 47 (CTS) to match the pull
+              * of the Bluetooth module.
+              */

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

Quoted 10 lines
arch/arm64/boot/dts/qcom/msm8998-xiaomi-sagit.dts new file +10 -0
+             bias-pull-down;
+     };
+};
+
+&blsp2_uart1 {
+     status = "okay";
+};
+
+&pm8005_lsid1 {
+     pm8005-regulators {

This is just "regulators", right?

Quoted 34 lines
arch/arm64/boot/dts/qcom/msm8998-xiaomi-sagit.dts new file +34 -0
+             compatible = "qcom,pm8005-regulators";
+
+             vdd_s1-supply = <&vph_pwr>;
+
+             pm8005_s1: s1 { /* VDD_GFX supply */
+                     regulator-min-microvolt = <524000>;
+                     regulator-max-microvolt = <1100000>;
+                     regulator-enable-ramp-delay = <500>;
+
+                     /* hack until we rig up the gpu consumer */
+                     regulator-always-on;
+             };
+     };
+};
+
+&pm8998_gpio {
+     vol_up_key_default: vol-up-key-default-state {
+             pins = "gpio6";
+             function = "normal";
+             bias-pull-up;
+             input-enable;
+             qcom,drive-strength = <PMIC_GPIO_STRENGTH_NO>;
+     };
+
+     audio_mclk_pin: audio-mclk-pin-active-state {
+             pins = "gpio13";
+             function = "func2";
+             power-source = <0>;
+     };
+};
+
+&qusb2phy {
+     status = "okay";
+
Quoted 9 lines

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

Quoted 6 lines
arch/arm64/boot/dts/qcom/msm8998-xiaomi-sagit.dts new file +6 -0
+     vdda-pll-supply = <&vreg_l12a_1p8>;
+     vdda-phy-dpdm-supply = <&vreg_l24a_3p075>;
+};
+
+&rpm_requests {
+     pm8998-regulators {

This is for sure now regulators (and since you have two: regulators-0).

Quoted 4 lines

There's no 'regulators-0' occurrences in 6.0.0-rc6 kernel, i.e. it's a new convention. Why do we need this new convention? I mean, other msm8998 boards regulators are named by driver name, and changing that seems like rename refactoring.

Do you see "pm8998-regulators" supported? If not, then how it is "rename refactoring"?

https://lore.kernel.org/all/[email protected]/

Quoted 233 lines
Quoted 233 lines
Quoted 183 lines
arch/arm64/boot/dts/qcom/msm8998-xiaomi-sagit.dts new file +181 -0
+             compatible = "qcom,rpm-pm8998-regulators";
+
+             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 = <&vreg_s5a_2p04>;
+             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>;
+             vdd_lvs1_lvs2-supply = <&vreg_s4a_1p8>;
+
+             vreg_s3a_1p35: s3 {
+                     regulator-min-microvolt = <1352000>;
+                     regulator-max-microvolt = <1352000>;
+             };
+
+             vreg_s4a_1p8: s4 {
+                     regulator-min-microvolt = <1800000>;
+                     regulator-max-microvolt = <1800000>;
+                     regulator-allow-set-load;
+             };
+
+             vreg_s5a_2p04: s5 {
+                     regulator-min-microvolt = <1904000>;
+                     regulator-max-microvolt = <2040000>;
+             };
+
+             vreg_s7a_1p025: s7 {
+                     regulator-min-microvolt = <900000>;
+                     regulator-max-microvolt = <1028000>;
+             };
+
+             vreg_l1a_0p875: l1 {
+                     regulator-min-microvolt = <880000>;
+                     regulator-max-microvolt = <880000>;
+             };
+
+             vreg_l2a_1p2: l2 {
+                     regulator-min-microvolt = <1200000>;
+                     regulator-max-microvolt = <1200000>;
+             };
+
+             vreg_l3a_1p0: l3 {
+                     regulator-min-microvolt = <1000000>;
+                     regulator-max-microvolt = <1000000>;
+             };
+
+             vreg_l5a_0p8: l5 {
+                     regulator-min-microvolt = <800000>;
+                     regulator-max-microvolt = <800000>;
+             };
+
+             vreg_l6a_1p8: l6 {
+                     regulator-min-microvolt = <1800000>;
+                     regulator-max-microvolt = <1800000>;
+             };
+
+             vreg_l7a_1p8: l7 {
+                     regulator-min-microvolt = <1800000>;
+                     regulator-max-microvolt = <1800000>;
+             };
+
+             vreg_l8a_1p2: l8 {
+                     regulator-min-microvolt = <1200000>;
+                     regulator-max-microvolt = <1200000>;
+             };
+
+             vreg_l9a_1p8: l9 {
+                     regulator-min-microvolt = <1808000>;
+                     regulator-max-microvolt = <2960000>;
+             };
+
+             vreg_l10a_1p8: l10 {
+                     regulator-min-microvolt = <1808000>;
+                     regulator-max-microvolt = <2960000>;
+             };
+
+             vreg_l11a_1p0: l11 {
+                     regulator-min-microvolt = <1000000>;
+                     regulator-max-microvolt = <1000000>;
+             };
+
+             vreg_l12a_1p8: l12 {
+                     regulator-min-microvolt = <1800000>;
+                     regulator-max-microvolt = <1800000>;
+             };
+
+             vreg_l13a_2p95: l13 {
+                     regulator-min-microvolt = <1808000>;
+                     regulator-max-microvolt = <2960000>;
+             };
+
+             vreg_l14a_1p8: l14 {
+                     regulator-min-microvolt = <1800000>;
+                     regulator-max-microvolt = <1800000>;
+             };
+
+             vreg_l15a_1p8: l15 {
+                     regulator-min-microvolt = <1800000>;
+                     regulator-max-microvolt = <1800000>;
+             };
+
+             vreg_l16a_2p7: l16 {
+                     regulator-min-microvolt = <2704000>;
+                     regulator-max-microvolt = <2704000>;
+             };
+
+             vreg_l17a_1p3: l17 {
+                     regulator-min-microvolt = <1304000>;
+                     regulator-max-microvolt = <1304000>;
+             };
+
+             vreg_l18a_2p7: l18 {
+                     regulator-min-microvolt = <2704000>;
+                     regulator-max-microvolt = <2704000>;
+             };
+
+             vreg_l19a_3p0: l19 {
+                     regulator-min-microvolt = <3008000>;
+                     regulator-max-microvolt = <3008000>;
+             };
+
+             vreg_l20a_2p95: l20 {
+                     regulator-min-microvolt = <2960000>;
+                     regulator-max-microvolt = <2960000>;
+                     regulator-allow-set-load;
+             };
+
+             vreg_l21a_2p95: l21 {
+                     regulator-min-microvolt = <2960000>;
+                     regulator-max-microvolt = <2960000>;
+                     regulator-system-load = <800000>;
+                     regulator-allow-set-load;
+             };
+
+             vreg_l22a_2p85: l22 {
+                     regulator-min-microvolt = <2864000>;
+                     regulator-max-microvolt = <2864000>;
+             };
+
+             vreg_l23a_3p3: l23 {
+                     regulator-min-microvolt = <3312000>;
+                     regulator-max-microvolt = <3312000>;
+             };
+
+             vreg_l24a_3p075: l24 {
+                     regulator-min-microvolt = <3088000>;
+                     regulator-max-microvolt = <3088000>;
+             };
+
+             vreg_l25a_3p3: l25 {
+                     regulator-min-microvolt = <3104000>;
+                     regulator-max-microvolt = <3312000>;
+             };
+
+             vreg_l26a_1p2: l26 {
+                     regulator-min-microvolt = <1200000>;
+                     regulator-max-microvolt = <1200000>;
+                     regulator-allow-set-load;
+             };
+
+             vreg_l28_3p0: l28 {

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

Quoted 10 lines
arch/arm64/boot/dts/qcom/msm8998-xiaomi-sagit.dts new file +10 -0
+                     regulator-min-microvolt = <3008000>;
+                     regulator-max-microvolt = <3008000>;
+             };
+
+             vreg_lvs1a_1p8: lvs1 { };
+
+             vreg_lvs2a_1p8: lvs2 { };
+     };
+
+     pmi8998-regulators {

regulators-1

Quoted 5 lines
arch/arm64/boot/dts/qcom/msm8998-xiaomi-sagit.dts new file +5 -0
+             compatible = "qcom,rpm-pmi8998-regulators";
+
+             vdd_bob-supply = <&vph_pwr>;
+
+             vreg_bob: bob {

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

Quoted 10 lines
arch/arm64/boot/dts/qcom/msm8998-xiaomi-sagit.dts new file +10 -0
+                     regulator-min-microvolt = <3312000>;
+                     regulator-max-microvolt = <3600000>;
+             };
+     };
+};
+
+&tlmm {
+     gpio-reserved-ranges = <0 4>, <81 4>;
+
+     cci1_default: cci1-default {

Missing suffix state. The same in all other places.

Quoted 6 lines
arch/arm64/boot/dts/qcom/msm8998-xiaomi-sagit.dts new file +6 -0
+             pins = "gpio18", "gpio19";
+             function = "cci_i2c";
+             bias-disable;
+             drive-strength = <2>;
+     };
+

(...)

Review

Quoted 9 lines
arch/arm64/boot/dts/qcom/msm8998-xiaomi-sagit.dts new file +8 -0
+
+&wifi {
+     status = "okay";
+     vdd-0.8-cx-mx-supply = <&vreg_l5a_0p8>;
+     vdd-1.8-xo-supply = <&vreg_l7a_1p8>;
+     vdd-1.3-rfa-supply = <&vreg_l17a_1p3>;
+     vdd-3.3-ch0-supply = <&vreg_l25a_3p3>;
+};
(quoted diff) +0 -0

b/arch/arm64/boot/dts/qcom/pm8998.dtsi

Quoted 11 lines
Quoted 11 lines

arch/arm64/boot/dts/qcom/pm8998.dtsi pm8998_pwrkey: pwrkey { · line 56

Quoted 9 lines

index d09f2954b6f9..4551af463081 100644

arch/arm64/boot/dts/qcom/pm8998.dtsi +2 -0
@@ -52,6 +52,12 @@ pm8998_pwrkey: pwrkey {
                              bias-pull-up;
                              linux,code = <KEY_POWER>;
                      };
+
+                     pm8998_resin: resin {

Missing suffix state

This comment is probably wrong - it's resin, not pin control.

Quoted 5 lines
Quoted 5 lines

arch/arm64/boot/dts/qcom/pm8998.dtsi pm8998_pwrkey: pwrkey {

Quoted 4 lines
arch/arm64/boot/dts/qcom/pm8998.dtsi +3 -0
+                             compatible = "qcom,pm8941-resin";
+                             bias-pull-up;
+                             interrupts = <GIC_SPI 0x8 1

IRQ_TYPE_EDGE_BOTH>;

Best regards,
Krzysztof

#5 lore raw

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

In reply to Dzmitry Sankouski

To: [email protected]
CC: Andy Gross <[email protected]> (maintainer:ARM/QUALCOMM SUPPORT)
CC: Bjorn Andersson <[email protected]> (maintainer:ARM/QUALCOMM SUPPORT)
CC: Konrad Dybcio <[email protected]> (reviewer:ARM/QUALCOMM SUPPORT)
CC: Rob Herring <[email protected]> (maintainer:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS)
CC: Krzysztof Kozlowski <[email protected]> (maintainer:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS)
CC: [email protected] (open list:ARM/QUALCOMM SUPPORT)
CC: [email protected] (open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS)

---
 Documentation/devicetree/bindings/arm/qcom.yaml | 2 ++
 1 file changed, 2 insertions(+)
Documentation/devicetree/bindings/arm/qcom.yaml +2 -0
index fb1d00bcc847..00e51d22aeb1 100644
@@ -76,6 +76,7 @@ description: |
         mtp
         qrd
         sbc
+        sagit
 
   The 'soc_version' and 'board_version' elements take the form of v<Major>.<Minor>
   where the minor number may be omitted when it's zero, i.e.  v1.0 is the same
@@ -239,6 +240,7 @@ properties:
               - sony,xperia-lilac
               - sony,xperia-maple
               - sony,xperia-poplar
+              - xiaomi,sagit
           - const: qcom,msm8998
 
       - items:
Signature · 1 line
2.30.2
#6 lore raw

Re: [PATCH v2 2/2] dt-bindings: arm: add xiaomi,sagit board based on msm8998 chip

On 28/09/2022 12:33, Dzmitry Sankouski wrote:

Missing commit msg.

Quoted 9 lines

To: [email protected]
CC: Andy Gross <[email protected]> (maintainer:ARM/QUALCOMM SUPPORT)
CC: Bjorn Andersson <[email protected]> (maintainer:ARM/QUALCOMM SUPPORT)
CC: Konrad Dybcio <[email protected]> (reviewer:ARM/QUALCOMM SUPPORT)
CC: Rob Herring <[email protected]> (maintainer:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS)
CC: Krzysztof Kozlowski <[email protected]> (maintainer:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS)
CC: [email protected] (open list:ARM/QUALCOMM SUPPORT)
CC: [email protected] (open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS)

None of these go to commit msg. Remove leaving only your SoB.

Quoted 10 lines
---
 Documentation/devicetree/bindings/arm/qcom.yaml | 2 ++
 1 file changed, 2 insertions(+)
Documentation/devicetree/bindings/arm/qcom.yaml +0 -0
index fb1d00bcc847..00e51d22aeb1 100644

Documentation/devicetree/bindings/arm/qcom.yaml description: | · line 79

Quoted 4 lines
Documentation/devicetree/bindings/arm/qcom.yaml +1 -0
@@ -76,6 +76,7 @@ description: |
         mtp
         qrd
         sbc
+        sagit

You do not use this way of compatibles, so don't extend it.

Documentation/devicetree/bindings/arm/qcom.yaml properties: · line 246

Quoted 11 lines
Documentation/devicetree/bindings/arm/qcom.yaml +1 -0
   The 'soc_version' and 'board_version' elements take the form of v<Major>.<Minor>
   where the minor number may be omitted when it's zero, i.e.  v1.0 is the same
@@ -239,6 +240,7 @@ properties:
               - sony,xperia-lilac
               - sony,xperia-maple
               - sony,xperia-poplar
+              - xiaomi,sagit
           - const: qcom,msm8998
 
       - items:

Best regards,
Krzysztof