* [PATCH 0/7] arm64: dts: qcom: add support for Xiaomi SDM636/SDM660 devices
@ 2026-01-20 18:00 Gianluca Boiano
2026-01-20 18:00 ` [PATCH 1/7] dt-bindings: arm: qcom: add " Gianluca Boiano
` (7 more replies)
0 siblings, 8 replies; 28+ messages in thread
From: Gianluca Boiano @ 2026-01-20 18:00 UTC (permalink / raw)
To: linux-arm-msm, devicetree
Cc: andersson, konradybcio, krzk+dt, conor+dt, robh, david,
Gianluca Boiano
This series adds device tree support for several Xiaomi smartphones based on
Qualcomm SDM636 and SDM660 SoCs:
- Xiaomi Redmi Note 6 Pro (tulip) - SDM636
- Xiaomi Redmi Note 5 Pro (whyred) - SDM636
- Xiaomi Mi A2 (jasmine) - SDM660
- Xiaomi Mi 8 Lite (platina) - SDM660
It also refactors the existing Xiaomi Redmi Note 7 (lavender) device tree to
use a new common include file, reducing code duplication across the family.
All devices support:
- Booting to a framebuffer console
- USB in peripheral mode
- Battery monitoring and charging
- WiFi and Bluetooth (wcn3990)
Some devices additionally support:
- Hall effect sensor (tulip, whyred, platina)
- Touchscreen (whyred, jasmine, platina)
- Status LED (tulip, whyred)
- SD card (tulip, whyred, lavender)
Tested on tulip.
Gianluca Boiano (7):
dt-bindings: arm: qcom: add Xiaomi SDM636/SDM660 devices
arm64: dts: qcom: sdm660: add common Xiaomi SDM636/SDM660 include file
arm64: dts: qcom: sdm660-xiaomi-lavender: fix regulator and SD
settings
arm64: dts: qcom: add device tree for Xiaomi Redmi Note 6 Pro (tulip)
arm64: dts: qcom: add device tree for Xiaomi Redmi Note 5 Pro (whyred)
arm64: dts: qcom: add device tree for Xiaomi Mi A2 (jasmine)
arm64: dts: qcom: add device tree for Xiaomi Mi 8 Lite (platina)
.../devicetree/bindings/arm/qcom.yaml | 4 +
arch/arm64/boot/dts/qcom/Makefile | 4 +
.../boot/dts/qcom/sdm636-xiaomi-tulip.dts | 333 ++++++++++++++++
.../boot/dts/qcom/sdm636-xiaomi-whyred.dts | 374 ++++++++++++++++++
.../boot/dts/qcom/sdm660-xiaomi-common.dtsi | 214 ++++++++++
.../boot/dts/qcom/sdm660-xiaomi-jasmine.dts | 333 ++++++++++++++++
.../boot/dts/qcom/sdm660-xiaomi-lavender.dts | 144 +------
.../boot/dts/qcom/sdm660-xiaomi-platina.dts | 364 +++++++++++++++++
8 files changed, 1634 insertions(+), 136 deletions(-)
create mode 100644 arch/arm64/boot/dts/qcom/sdm636-xiaomi-tulip.dts
create mode 100644 arch/arm64/boot/dts/qcom/sdm636-xiaomi-whyred.dts
create mode 100644 arch/arm64/boot/dts/qcom/sdm660-xiaomi-common.dtsi
create mode 100644 arch/arm64/boot/dts/qcom/sdm660-xiaomi-jasmine.dts
create mode 100644 arch/arm64/boot/dts/qcom/sdm660-xiaomi-platina.dts
base-commit: 24d479d26b25bce5faea3ddd9fa8f3a6c3129ea7
--
2.52.0
^ permalink raw reply [flat|nested] 28+ messages in thread
* [PATCH 1/7] dt-bindings: arm: qcom: add Xiaomi SDM636/SDM660 devices
2026-01-20 18:00 [PATCH 0/7] arm64: dts: qcom: add support for Xiaomi SDM636/SDM660 devices Gianluca Boiano
@ 2026-01-20 18:00 ` Gianluca Boiano
2026-01-21 8:14 ` Krzysztof Kozlowski
2026-01-20 18:00 ` [PATCH 2/7] arm64: dts: qcom: sdm660: add common Xiaomi SDM636/SDM660 include file Gianluca Boiano
` (6 subsequent siblings)
7 siblings, 1 reply; 28+ messages in thread
From: Gianluca Boiano @ 2026-01-20 18:00 UTC (permalink / raw)
To: linux-arm-msm, devicetree
Cc: andersson, konradybcio, krzk+dt, conor+dt, robh, david,
Gianluca Boiano
Add device tree bindings for:
- Xiaomi Redmi Note 6 Pro (tulip) - SDM636
- Xiaomi Redmi Note 5 Pro (whyred) - SDM636
- Xiaomi Mi A2 (jasmine) - SDM660
- Xiaomi Mi 8 Lite (platina) - SDM660
These are Android-based smartphones that can boot mainline Linux
with simple-framebuffer and USB support.
Signed-off-by: Gianluca Boiano <morf3089@gmail.com>
---
Documentation/devicetree/bindings/arm/qcom.yaml | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/Documentation/devicetree/bindings/arm/qcom.yaml b/Documentation/devicetree/bindings/arm/qcom.yaml
index d84bd3bca201..87562ec0b170 100644
--- a/Documentation/devicetree/bindings/arm/qcom.yaml
+++ b/Documentation/devicetree/bindings/arm/qcom.yaml
@@ -819,11 +819,15 @@ properties:
- items:
- enum:
- sony,mermaid-row
+ - xiaomi,tulip
+ - xiaomi,whyred
- const: qcom,sdm636
- items:
- enum:
+ - xiaomi,jasmine
- xiaomi,lavender
+ - xiaomi,platina
- const: qcom,sdm660
- items:
--
2.52.0
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH 2/7] arm64: dts: qcom: sdm660: add common Xiaomi SDM636/SDM660 include file
2026-01-20 18:00 [PATCH 0/7] arm64: dts: qcom: add support for Xiaomi SDM636/SDM660 devices Gianluca Boiano
2026-01-20 18:00 ` [PATCH 1/7] dt-bindings: arm: qcom: add " Gianluca Boiano
@ 2026-01-20 18:00 ` Gianluca Boiano
2026-01-21 12:35 ` Konrad Dybcio
2026-01-20 18:00 ` [PATCH 3/7] arm64: dts: qcom: sdm660-xiaomi-lavender: fix regulator and SD settings Gianluca Boiano
` (5 subsequent siblings)
7 siblings, 1 reply; 28+ messages in thread
From: Gianluca Boiano @ 2026-01-20 18:00 UTC (permalink / raw)
To: linux-arm-msm, devicetree
Cc: andersson, konradybcio, krzk+dt, conor+dt, robh, david,
Gianluca Boiano
Create a shared device tree include file for Xiaomi smartphones and tablets
based on Qualcomm SDM636/SDM660 SoCs. This reduces code duplication when
adding new Xiaomi devices and ensures consistent configuration across the
family.
The common dtsi includes:
- PM660/PM660L PMIC configuration with volume/power buttons
- Serial console (blsp1_uart2, blsp2_uart1)
- Hall effect sensor (disabled by default)
- USB (qusb2phy0, usb3) in peripheral mode
- SD card (sdhc_2) pinctrl and supplies
- eMMC (sdhc_1) with HS400 support
- Backlight (pm660l_wled)
- Framebuffer memory reservation
- WiFi (wcn3990)
- Bluetooth (wcn3990)
Also refactor sdm660-xiaomi-lavender.dts to use the new common include,
removing duplicated code.
Signed-off-by: Gianluca Boiano <morf3089@gmail.com>
---
.../boot/dts/qcom/sdm660-xiaomi-common.dtsi | 214 ++++++++++++++++++
.../boot/dts/qcom/sdm660-xiaomi-lavender.dts | 144 +-----------
2 files changed, 219 insertions(+), 139 deletions(-)
create mode 100644 arch/arm64/boot/dts/qcom/sdm660-xiaomi-common.dtsi
diff --git a/arch/arm64/boot/dts/qcom/sdm660-xiaomi-common.dtsi b/arch/arm64/boot/dts/qcom/sdm660-xiaomi-common.dtsi
new file mode 100644
index 000000000000..37ce675089fb
--- /dev/null
+++ b/arch/arm64/boot/dts/qcom/sdm660-xiaomi-common.dtsi
@@ -0,0 +1,214 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * Common devicetree for Xiaomi SDM636/SDM660 devices
+ *
+ * Copyright (c) 2020, Alexey Minnekhanov <alexey.min@gmail.com>
+ * Copyright (c) 2022, Gianluca Boiano <morf3089@gmail.com>
+ */
+
+#include "pm660.dtsi"
+#include "pm660l.dtsi"
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/input/gpio-keys.h>
+#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
+
+/ {
+ aliases {
+ serial0 = &blsp1_uart2;
+ serial1 = &blsp2_uart1;
+ };
+
+ chosen {
+ #address-cells = <2>;
+ #size-cells = <2>;
+ ranges;
+
+ stdout-path = "serial0:115200n8";
+
+ framebuffer0: framebuffer@9d400000 {
+ compatible = "simple-framebuffer";
+ memory-region = <&framebuffer_mem>;
+ /*
+ * width/height/stride to be overridden
+ * by individual device dts
+ */
+ format = "a8r8g8b8";
+
+ status = "disabled";
+ };
+ };
+
+ gpio-keys {
+ compatible = "gpio-keys";
+
+ pinctrl-0 = <&vol_up_default>;
+ pinctrl-names = "default";
+
+ key-volup {
+ label = "Volume Up";
+ gpios = <&pm660l_gpios 7 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_VOLUMEUP>;
+ debounce-interval = <15>;
+ };
+ };
+
+ gpio_hall_sensor: gpio-hall-sensor {
+ compatible = "gpio-keys";
+
+ pinctrl-0 = <&gpio_hall_sensor_default>;
+ pinctrl-names = "default";
+
+ status = "disabled";
+
+ event-hall {
+ label = "Hall Effect Sensor";
+ gpios = <&tlmm 75 GPIO_ACTIVE_LOW>;
+ linux,input-type = <EV_SW>;
+ linux,code = <SW_LID>;
+ linux,can-disable;
+ wakeup-source;
+ };
+ };
+
+ reserved-memory {
+ #address-cells = <2>;
+ #size-cells = <2>;
+ ranges;
+
+ framebuffer_mem: memory@9d400000 {
+ reg = <0x0 0x9d400000 0x0 0x2400000>;
+ no-map;
+ };
+ };
+
+ 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;
+ };
+
+};
+
+&blsp1_uart2 {
+ status = "okay";
+};
+
+&blsp2_uart1 {
+ status = "okay";
+
+ bluetooth {
+ compatible = "qcom,wcn3990-bt";
+ vddxo-supply = <&vreg_l9a_1p8>;
+ vddrf-supply = <&vreg_l6a_1p3>;
+ vddch0-supply = <&vreg_l19a_3p3>;
+ vddio-supply = <&vreg_l13a_1p8>;
+ max-speed = <3200000>;
+ };
+};
+
+&pm660l_gpios {
+ vol_up_default: vol-up-default-state {
+ pins = "gpio7";
+ function = PMIC_GPIO_FUNC_NORMAL;
+ bias-pull-up;
+ input-enable;
+ qcom,drive-strength = <PMIC_GPIO_STRENGTH_NO>;
+ };
+};
+
+&pm660l_wled {
+ qcom,switching-freq = <800>;
+ qcom,current-limit-microamp = <20000>;
+ qcom,num-strings = <2>;
+};
+
+&pon_pwrkey {
+ status = "okay";
+};
+
+&pon_resin {
+ linux,code = <KEY_VOLUMEDOWN>;
+
+ status = "okay";
+};
+
+&qusb2phy0 {
+ vdd-supply = <&vreg_l1b_0p925>;
+ vdda-pll-supply = <&vreg_l10a_1p8>;
+ vdda-phy-dpdm-supply = <&vreg_l7b_3p125>;
+
+ status = "okay";
+};
+
+&sdc2_state_off {
+ sd-cd-pins {
+ pins = "gpio54";
+ function = "gpio";
+ bias-disable;
+ drive-strength = <2>;
+ };
+};
+
+&sdc2_state_on {
+ sd-cd-pins {
+ pins = "gpio54";
+ function = "gpio";
+ bias-pull-up;
+ drive-strength = <2>;
+ };
+};
+
+&sdhc_1 {
+ supports-cqe;
+
+ mmc-hs200-1_8v;
+ mmc-hs400-1_8v;
+ mmc-hs400-enhanced-strobe;
+
+ vmmc-supply = <&vreg_l4b_2p95>;
+ vqmmc-supply = <&vreg_l8a_1p8>;
+
+ status = "okay";
+};
+
+&sdhc_2 {
+ cd-gpios = <&tlmm 54 GPIO_ACTIVE_HIGH>;
+
+ vmmc-supply = <&vreg_l5b_2p95>;
+ vqmmc-supply = <&vreg_l2b_2p95>;
+};
+
+&tlmm {
+ gpio_hall_sensor_default: gpio-hall-sensor-default-state {
+ pins = "gpio75";
+ function = "gpio";
+ drive-strength = <6>;
+ bias-pull-up;
+ };
+};
+
+&usb3 {
+ qcom,select-utmi-as-pipe-clk;
+
+ status = "okay";
+};
+
+&usb3_dwc3 {
+ maximum-speed = "high-speed";
+ phys = <&qusb2phy0>;
+ phy-names = "usb2-phy";
+ dr_mode = "peripheral";
+};
+
+&wifi {
+ vdd-0.8-cx-mx-supply = <&vreg_l5a_0p848>;
+ vdd-1.8-xo-supply = <&vreg_l9a_1p8>;
+ vdd-1.3-rfa-supply = <&vreg_l6a_1p3>;
+ vdd-3.3-ch0-supply = <&vreg_l19a_3p3>;
+
+ status = "okay";
+};
diff --git a/arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts b/arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts
index a9926ad6c6f9..6467cb4dfd16 100644
--- a/arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts
+++ b/arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts
@@ -7,58 +7,13 @@
/dts-v1/;
#include "sdm660.dtsi"
-#include "pm660.dtsi"
-#include "pm660l.dtsi"
-#include <dt-bindings/input/input.h>
-#include <dt-bindings/input/gpio-keys.h>
+#include "sdm660-xiaomi-common.dtsi"
/ {
model = "Xiaomi Redmi Note 7";
compatible = "xiaomi,lavender", "qcom,sdm660";
chassis-type = "handset";
- aliases {
- serial0 = &blsp1_uart2;
- };
-
- chosen {
- #address-cells = <2>;
- #size-cells = <2>;
- ranges;
-
- stdout-path = "serial0:115200n8";
-
- framebuffer0: framebuffer@9d400000 {
- compatible = "simple-framebuffer";
- reg = <0 0x9d400000 0 (1080 * 2340 * 4)>;
- width = <1080>;
- height = <2340>;
- stride = <(1080 * 4)>;
- format = "a8r8g8b8";
- };
- };
-
- 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;
- };
-
- gpio-keys {
- compatible = "gpio-keys";
-
- key-volup {
- label = "Volume Up";
- gpios = <&pm660l_gpios 7 GPIO_ACTIVE_LOW>;
- linux,code = <KEY_VOLUMEUP>;
- debounce-interval = <15>;
- };
- };
-
reserved-memory {
#address-cells = <2>;
#size-cells = <2>;
@@ -78,37 +33,14 @@ framebuffer_mem: memory@9d400000 {
no-map;
};
};
-
- /*
- * Until we hook up type-c detection, we
- * have to stick with this. But it works.
- */
- extcon_usb: extcon-usb {
- compatible = "linux,extcon-usb-gpio";
- id-gpios = <&tlmm 58 GPIO_ACTIVE_HIGH>;
- };
-};
-
-&blsp1_uart2 {
- status = "okay";
};
-&pon_pwrkey {
- status = "okay";
-};
+&framebuffer0 {
+ width = <1080>;
+ height = <2340>;
+ stride = <(1080 * 4)>;
-&pon_resin {
status = "okay";
-
- linux,code = <KEY_VOLUMEDOWN>;
-};
-
-&qusb2phy0 {
- status = "okay";
-
- vdd-supply = <&vreg_l1b_0p925>;
- vdda-pll-supply = <&vreg_l10a_1p8>;
- vdda-phy-dpdm-supply = <&vreg_l7b_3p125>;
};
&rpm_requests {
@@ -363,69 +295,3 @@ vreg_l19a_3p3: l19 {
};
};
};
-
-&pm660l_wled {
- status = "okay";
-
- qcom,switching-freq = <800>;
- qcom,current-limit-microamp = <20000>;
- qcom,num-strings = <2>;
-};
-
-&sdc2_state_on {
- sd-cd-pins {
- pins = "gpio54";
- function = "gpio";
- bias-pull-up;
- drive-strength = <2>;
- };
-};
-
-&sdc2_state_off {
- sd-cd-pins {
- pins = "gpio54";
- function = "gpio";
- bias-disable;
- drive-strength = <2>;
- };
-};
-
-&sdhc_1 {
- status = "okay";
- supports-cqe;
-
- mmc-hs200-1_8v;
- mmc-hs400-1_8v;
- mmc-hs400-enhanced-strobe;
-
- vmmc-supply = <&vreg_l4b_2p95>;
- vqmmc-supply = <&vreg_l8a_1p8>;
-};
-
-&sdhc_2 {
- status = "okay";
-
- cd-gpios = <&tlmm 54 GPIO_ACTIVE_HIGH>;
-
- vmmc-supply = <&vreg_l5b_2p95>;
- vqmmc-supply = <&vreg_l2b_2p95>;
-};
-
-&tlmm {
- gpio-reserved-ranges = <8 4>;
-};
-
-&usb3 {
- qcom,select-utmi-as-pipe-clk;
-
- status = "okay";
-};
-
-&usb3_dwc3 {
- maximum-speed = "high-speed";
- phys = <&qusb2phy0>;
- phy-names = "usb2-phy";
-
- dr_mode = "peripheral";
- extcon = <&extcon_usb>;
-};
--
2.52.0
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH 3/7] arm64: dts: qcom: sdm660-xiaomi-lavender: fix regulator and SD settings
2026-01-20 18:00 [PATCH 0/7] arm64: dts: qcom: add support for Xiaomi SDM636/SDM660 devices Gianluca Boiano
2026-01-20 18:00 ` [PATCH 1/7] dt-bindings: arm: qcom: add " Gianluca Boiano
2026-01-20 18:00 ` [PATCH 2/7] arm64: dts: qcom: sdm660: add common Xiaomi SDM636/SDM660 include file Gianluca Boiano
@ 2026-01-20 18:00 ` Gianluca Boiano
2026-01-21 11:27 ` Konrad Dybcio
2026-01-21 12:36 ` Konrad Dybcio
2026-01-20 18:00 ` [PATCH 4/7] arm64: dts: qcom: add device tree for Xiaomi Redmi Note 6 Pro (tulip) Gianluca Boiano
` (4 subsequent siblings)
7 siblings, 2 replies; 28+ messages in thread
From: Gianluca Boiano @ 2026-01-20 18:00 UTC (permalink / raw)
To: linux-arm-msm, devicetree
Cc: andersson, konradybcio, krzk+dt, conor+dt, robh, david,
Gianluca Boiano
Fix regulator configurations to ensure stable operation:
- vreg_l2b_2p95: Increase max voltage from 2696mV to 3100mV to support
proper SD card voltage signaling
- vreg_l3b_3p3: Add regulator-always-on to keep the regulator enabled
during boot
- vreg_l10a_1p8: Add regulator-system-load of 14000uA for proper USB PHY
PLL operation
Also enable the SD card controller (sdhc_2) which was left disabled.
Signed-off-by: Gianluca Boiano <morf3089@gmail.com>
---
arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts b/arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts
index 6467cb4dfd16..9a6dda47941c 100644
--- a/arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts
+++ b/arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts
@@ -82,7 +82,7 @@ vreg_l1b_0p925: l1 {
/* SDHCI 3.3V signal doesn't seem to be supported. */
vreg_l2b_2p95: l2 {
regulator-min-microvolt = <1648000>;
- regulator-max-microvolt = <2696000>;
+ regulator-max-microvolt = <3100000>;
regulator-enable-ramp-delay = <250>;
regulator-allow-set-load;
};
@@ -92,6 +92,7 @@ vreg_l3b_3p3: l3 {
regulator-max-microvolt = <3300000>;
regulator-enable-ramp-delay = <250>;
regulator-allow-set-load;
+ regulator-always-on;
};
vreg_l4b_2p95: l4 {
@@ -239,6 +240,7 @@ vreg_l10a_1p8: l10 {
regulator-max-microvolt = <1950000>;
regulator-enable-ramp-delay = <250>;
regulator-allow-set-load;
+ regulator-system-load = <14000>;
};
vreg_l11a_1p8: l11 {
@@ -295,3 +297,7 @@ vreg_l19a_3p3: l19 {
};
};
};
+
+&sdhc_2 {
+ status = "okay";
+};
--
2.52.0
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH 4/7] arm64: dts: qcom: add device tree for Xiaomi Redmi Note 6 Pro (tulip)
2026-01-20 18:00 [PATCH 0/7] arm64: dts: qcom: add support for Xiaomi SDM636/SDM660 devices Gianluca Boiano
` (2 preceding siblings ...)
2026-01-20 18:00 ` [PATCH 3/7] arm64: dts: qcom: sdm660-xiaomi-lavender: fix regulator and SD settings Gianluca Boiano
@ 2026-01-20 18:00 ` Gianluca Boiano
2026-01-21 12:42 ` Konrad Dybcio
2026-01-20 18:00 ` [PATCH 5/7] arm64: dts: qcom: add device tree for Xiaomi Redmi Note 5 Pro (whyred) Gianluca Boiano
` (3 subsequent siblings)
7 siblings, 1 reply; 28+ messages in thread
From: Gianluca Boiano @ 2026-01-20 18:00 UTC (permalink / raw)
To: linux-arm-msm, devicetree
Cc: andersson, konradybcio, krzk+dt, conor+dt, robh, david,
Gianluca Boiano
Add initial device tree support for the Xiaomi Redmi Note 6 Pro
(codename: tulip), a smartphone based on Qualcomm SDM636 SoC with
4GB RAM and a 6.26" 1080x2280 display.
This enables:
- Booting to a framebuffer console
- USB support
- Hall effect sensor
- Battery monitoring
- Charging (pm660_charger)
- Status LED (pm660l_lpg)
Signed-off-by: Gianluca Boiano <morf3089@gmail.com>
---
arch/arm64/boot/dts/qcom/Makefile | 1 +
.../boot/dts/qcom/sdm636-xiaomi-tulip.dts | 333 ++++++++++++++++++
2 files changed, 334 insertions(+)
create mode 100644 arch/arm64/boot/dts/qcom/sdm636-xiaomi-tulip.dts
diff --git a/arch/arm64/boot/dts/qcom/Makefile b/arch/arm64/boot/dts/qcom/Makefile
index 6f34d5ed331c..6168d204ca91 100644
--- a/arch/arm64/boot/dts/qcom/Makefile
+++ b/arch/arm64/boot/dts/qcom/Makefile
@@ -243,6 +243,7 @@ dtb-$(CONFIG_ARCH_QCOM) += sdm630-sony-xperia-nile-voyager.dtb
dtb-$(CONFIG_ARCH_QCOM) += sdm632-fairphone-fp3.dtb
dtb-$(CONFIG_ARCH_QCOM) += sdm632-motorola-ocean.dtb
dtb-$(CONFIG_ARCH_QCOM) += sdm636-sony-xperia-ganges-mermaid.dtb
+dtb-$(CONFIG_ARCH_QCOM) += sdm636-xiaomi-tulip.dtb
dtb-$(CONFIG_ARCH_QCOM) += sdm660-xiaomi-lavender.dtb
dtb-$(CONFIG_ARCH_QCOM) += sdm670-google-sargo.dtb
dtb-$(CONFIG_ARCH_QCOM) += sdm845-db845c.dtb
diff --git a/arch/arm64/boot/dts/qcom/sdm636-xiaomi-tulip.dts b/arch/arm64/boot/dts/qcom/sdm636-xiaomi-tulip.dts
new file mode 100644
index 000000000000..44ffc1e31401
--- /dev/null
+++ b/arch/arm64/boot/dts/qcom/sdm636-xiaomi-tulip.dts
@@ -0,0 +1,333 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * Copyright (c) 2022, Gianluca Boiano <morf3089@gmail.com>
+ */
+
+/dts-v1/;
+
+#include "sdm636.dtsi"
+#include "sdm660-xiaomi-common.dtsi"
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/leds/common.h>
+
+/ {
+ model = "Xiaomi Redmi Note 6 Pro";
+ compatible = "xiaomi,tulip", "qcom,sdm636";
+ chassis-type = "handset";
+
+ battery: battery {
+ compatible = "simple-battery";
+ charge-full-design-microamp-hours = <4000000>;
+ voltage-min-design-microvolt = <3400000>;
+ voltage-max-design-microvolt = <4408000>;
+ };
+
+ reserved-memory {
+ ramoops@a0000000 {
+ compatible = "ramoops";
+ reg = <0x0 0xa0000000 0x0 0x400000>;
+ console-size = <0x20000>;
+ record-size = <0x20000>;
+ ftrace-size = <0x0>;
+ pmsg-size = <0x20000>;
+ };
+ };
+};
+
+&framebuffer0 {
+ width = <1080>;
+ height = <2280>;
+ stride = <(1080 * 4)>;
+
+ status = "okay";
+};
+
+&gpio_hall_sensor {
+ status = "okay";
+};
+
+&pm660_charger {
+ monitored-battery = <&battery>;
+
+ status = "okay";
+};
+
+&pm660l_lpg {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ qcom,power-source = <1>;
+
+ status = "okay";
+
+ led@3 {
+ reg = <3>;
+ color = <LED_COLOR_ID_WHITE>;
+ function = LED_FUNCTION_STATUS;
+ };
+};
+
+&pm660l_wled {
+ status = "okay";
+};
+
+&rpm_requests {
+ regulators-0 {
+ compatible = "qcom,rpm-pm660l-regulators";
+
+ vdd_s1-supply = <&vph_pwr>;
+ vdd_s2-supply = <&vph_pwr>;
+ vdd_s3_s4-supply = <&vph_pwr>;
+ vdd_s5-supply = <&vph_pwr>;
+ vdd_s6-supply = <&vph_pwr>;
+
+ vdd_l1_l9_l10-supply = <&vreg_s2b_1p05>;
+ vdd_l2-supply = <&vreg_bob>;
+ vdd_l3_l5_l7_l8-supply = <&vreg_bob>;
+ vdd_l4_l6-supply = <&vreg_bob>;
+ vdd_bob-supply = <&vph_pwr>;
+
+ vreg_s1b_1p125: s1 {
+ regulator-min-microvolt = <1125000>;
+ regulator-max-microvolt = <1125000>;
+ regulator-enable-ramp-delay = <200>;
+ };
+
+ vreg_s2b_1p05: s2 {
+ regulator-min-microvolt = <1050000>;
+ regulator-max-microvolt = <1050000>;
+ regulator-enable-ramp-delay = <200>;
+ };
+
+ /* LDOs */
+ vreg_l1b_0p925: l1 {
+ regulator-min-microvolt = <800000>;
+ regulator-max-microvolt = <925000>;
+ regulator-enable-ramp-delay = <250>;
+ regulator-allow-set-load;
+ };
+
+ /* SDHCI 3.3V signal doesn't seem to be supported. */
+ vreg_l2b_2p95: l2 {
+ regulator-min-microvolt = <1648000>;
+ regulator-max-microvolt = <3100000>;
+ regulator-enable-ramp-delay = <250>;
+ regulator-allow-set-load;
+ };
+
+ vreg_l3b_3p3: l3 {
+ regulator-min-microvolt = <1710000>;
+ regulator-max-microvolt = <3600000>;
+ regulator-enable-ramp-delay = <250>;
+ regulator-allow-set-load;
+ regulator-always-on;
+ };
+
+ vreg_l4b_2p95: l4 {
+ regulator-min-microvolt = <1700000>;
+ regulator-max-microvolt = <2950000>;
+ regulator-enable-ramp-delay = <250>;
+
+ regulator-min-microamp = <200>;
+ regulator-max-microamp = <600000>;
+ regulator-system-load = <570000>;
+ regulator-allow-set-load;
+ };
+
+ /*
+ * Downstream specifies a range of 1721-3600mV,
+ * but the only assigned consumers are SDHCI2 VMMC
+ * and Coresight QPDI that both request pinned 2.95V.
+ * Tighten the range to 1.8-3.328 (closest to 3.3) to
+ * make the mmc driver happy.
+ */
+ vreg_l5b_2p95: l5 {
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <3328000>;
+ regulator-enable-ramp-delay = <250>;
+ regulator-allow-set-load;
+ };
+
+ vreg_l7b_3p125: l7 {
+ regulator-min-microvolt = <2700000>;
+ regulator-max-microvolt = <3125000>;
+ regulator-enable-ramp-delay = <250>;
+ };
+
+ vreg_l8b_3p3: l8 {
+ regulator-min-microvolt = <3200000>;
+ regulator-max-microvolt = <3400000>;
+ regulator-enable-ramp-delay = <250>;
+ };
+
+ vreg_bob: bob {
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3600000>;
+ regulator-enable-ramp-delay = <500>;
+ };
+ };
+
+ regulators-1 {
+ compatible = "qcom,rpm-pm660-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_l1_l6_l7-supply = <&vreg_s5a_1p35>;
+ vdd_l2_l3-supply = <&vreg_s2b_1p05>;
+ vdd_l5-supply = <&vreg_s2b_1p05>;
+ vdd_l8_l9_l10_l11_l12_l13_l14-supply = <&vreg_s4a_2p04>;
+ vdd_l15_l16_l17_l18_l19-supply = <&vreg_bob>;
+
+ /*
+ * S1A (FTAPC0), S2A (FTAPC1), S3A (HFAPC1) are managed
+ * by the Core Power Reduction hardened (CPRh) and the
+ * Operating State Manager (OSM) HW automatically.
+ */
+
+ vreg_s4a_2p04: s4 {
+ regulator-min-microvolt = <1805000>;
+ regulator-max-microvolt = <2040000>;
+ regulator-enable-ramp-delay = <200>;
+ regulator-always-on;
+ };
+
+ vreg_s5a_1p35: s5 {
+ regulator-min-microvolt = <1224000>;
+ regulator-max-microvolt = <1350000>;
+ regulator-enable-ramp-delay = <200>;
+ };
+
+ vreg_s6a_0p87: s6 {
+ regulator-min-microvolt = <504000>;
+ regulator-max-microvolt = <992000>;
+ regulator-enable-ramp-delay = <150>;
+ };
+
+ /* LDOs */
+ vreg_l1a_1p225: l1 {
+ regulator-min-microvolt = <1150000>;
+ regulator-max-microvolt = <1250000>;
+ regulator-enable-ramp-delay = <250>;
+ regulator-allow-set-load;
+ };
+
+ vreg_l2a_1p0: l2 {
+ regulator-min-microvolt = <950000>;
+ regulator-max-microvolt = <1010000>;
+ regulator-enable-ramp-delay = <250>;
+ };
+
+ vreg_l3a_1p0: l3 {
+ regulator-min-microvolt = <950000>;
+ regulator-max-microvolt = <1010000>;
+ regulator-enable-ramp-delay = <250>;
+ };
+
+ vreg_l5a_0p848: l5 {
+ regulator-min-microvolt = <525000>;
+ regulator-max-microvolt = <950000>;
+ regulator-enable-ramp-delay = <250>;
+ };
+
+ vreg_l6a_1p3: l6 {
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1370000>;
+ regulator-allow-set-load;
+ regulator-enable-ramp-delay = <250>;
+ };
+
+ vreg_l7a_1p2: l7 {
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+ regulator-enable-ramp-delay = <250>;
+ };
+
+ vreg_l8a_1p8: l8 {
+ regulator-min-microvolt = <1750000>;
+ regulator-max-microvolt = <1900000>;
+ regulator-enable-ramp-delay = <250>;
+ regulator-system-load = <325000>;
+ regulator-allow-set-load;
+ };
+
+ vreg_l9a_1p8: l9 {
+ regulator-min-microvolt = <1750000>;
+ regulator-max-microvolt = <1900000>;
+ regulator-enable-ramp-delay = <250>;
+ regulator-allow-set-load;
+ };
+
+ vreg_l10a_1p8: l10 {
+ regulator-min-microvolt = <1780000>;
+ regulator-max-microvolt = <1950000>;
+ regulator-enable-ramp-delay = <250>;
+ regulator-allow-set-load;
+ regulator-system-load = <14000>;
+ };
+
+ vreg_l11a_1p8: l11 {
+ regulator-min-microvolt = <1780000>;
+ regulator-max-microvolt = <1950000>;
+ regulator-enable-ramp-delay = <250>;
+ };
+
+ vreg_l12a_1p8: l12 {
+ regulator-min-microvolt = <1780000>;
+ regulator-max-microvolt = <1950000>;
+ regulator-enable-ramp-delay = <250>;
+ };
+
+ /* This gives power to the LPDDR4: never turn it off! */
+ vreg_l13a_1p8: l13 {
+ regulator-min-microvolt = <1780000>;
+ regulator-max-microvolt = <1950000>;
+ regulator-enable-ramp-delay = <250>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ vreg_l14a_1p8: l14 {
+ regulator-min-microvolt = <1710000>;
+ regulator-max-microvolt = <1900000>;
+ regulator-enable-ramp-delay = <250>;
+ };
+
+ vreg_l15a_1p8: l15 {
+ regulator-min-microvolt = <1650000>;
+ regulator-max-microvolt = <2950000>;
+ regulator-enable-ramp-delay = <250>;
+ };
+
+ vreg_l16a_2p7: l16 {
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <2800000>;
+ regulator-enable-ramp-delay = <250>;
+ regulator-always-on;
+ };
+
+ vreg_l17a_1p8: l17 {
+ regulator-min-microvolt = <1650000>;
+ regulator-max-microvolt = <2950000>;
+ regulator-enable-ramp-delay = <250>;
+ };
+
+ vreg_l19a_3p3: l19 {
+ regulator-min-microvolt = <3200000>;
+ regulator-max-microvolt = <3400000>;
+ regulator-enable-ramp-delay = <250>;
+ regulator-allow-set-load;
+ };
+ };
+};
+
+&sdhc_2 {
+ status = "okay";
+};
+
+&tlmm {
+ gpio-reserved-ranges = <8 4>; /* Fingerprint SPI */
+};
--
2.52.0
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH 5/7] arm64: dts: qcom: add device tree for Xiaomi Redmi Note 5 Pro (whyred)
2026-01-20 18:00 [PATCH 0/7] arm64: dts: qcom: add support for Xiaomi SDM636/SDM660 devices Gianluca Boiano
` (3 preceding siblings ...)
2026-01-20 18:00 ` [PATCH 4/7] arm64: dts: qcom: add device tree for Xiaomi Redmi Note 6 Pro (tulip) Gianluca Boiano
@ 2026-01-20 18:00 ` Gianluca Boiano
2026-01-20 18:00 ` [PATCH 6/7] arm64: dts: qcom: add device tree for Xiaomi Mi A2 (jasmine) Gianluca Boiano
` (2 subsequent siblings)
7 siblings, 0 replies; 28+ messages in thread
From: Gianluca Boiano @ 2026-01-20 18:00 UTC (permalink / raw)
To: linux-arm-msm, devicetree
Cc: andersson, konradybcio, krzk+dt, conor+dt, robh, david,
Gianluca Boiano, Mathesh Velayudan, Alexey Minnekhanov
Add initial device tree support for the Xiaomi Redmi Note 5 Pro
(codename: whyred), a smartphone based on Qualcomm SDM636 SoC with
4/6GB RAM and a 5.99" 1080x2160 display.
This enables:
- Booting to a framebuffer console
- USB support
- Hall effect sensor
- Touchscreen (Synaptics RMI4)
- Battery monitoring
- Charging (pm660_charger)
- Status LED (pm660l_lpg)
Co-developed-by: Mathesh Velayudan <123v.mathesh@gmail.com>
Signed-off-by: Mathesh Velayudan <123v.mathesh@gmail.com>
Co-developed-by: Alexey Minnekhanov <alexeymin@postmarketos.org>
Signed-off-by: Alexey Minnekhanov <alexeymin@postmarketos.org>
Signed-off-by: Gianluca Boiano <morf3089@gmail.com>
---
arch/arm64/boot/dts/qcom/Makefile | 1 +
.../boot/dts/qcom/sdm636-xiaomi-whyred.dts | 374 ++++++++++++++++++
2 files changed, 375 insertions(+)
create mode 100644 arch/arm64/boot/dts/qcom/sdm636-xiaomi-whyred.dts
diff --git a/arch/arm64/boot/dts/qcom/Makefile b/arch/arm64/boot/dts/qcom/Makefile
index 6168d204ca91..a1cf067fdfeb 100644
--- a/arch/arm64/boot/dts/qcom/Makefile
+++ b/arch/arm64/boot/dts/qcom/Makefile
@@ -244,6 +244,7 @@ dtb-$(CONFIG_ARCH_QCOM) += sdm632-fairphone-fp3.dtb
dtb-$(CONFIG_ARCH_QCOM) += sdm632-motorola-ocean.dtb
dtb-$(CONFIG_ARCH_QCOM) += sdm636-sony-xperia-ganges-mermaid.dtb
dtb-$(CONFIG_ARCH_QCOM) += sdm636-xiaomi-tulip.dtb
+dtb-$(CONFIG_ARCH_QCOM) += sdm636-xiaomi-whyred.dtb
dtb-$(CONFIG_ARCH_QCOM) += sdm660-xiaomi-lavender.dtb
dtb-$(CONFIG_ARCH_QCOM) += sdm670-google-sargo.dtb
dtb-$(CONFIG_ARCH_QCOM) += sdm845-db845c.dtb
diff --git a/arch/arm64/boot/dts/qcom/sdm636-xiaomi-whyred.dts b/arch/arm64/boot/dts/qcom/sdm636-xiaomi-whyred.dts
new file mode 100644
index 000000000000..153c8481c658
--- /dev/null
+++ b/arch/arm64/boot/dts/qcom/sdm636-xiaomi-whyred.dts
@@ -0,0 +1,374 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * Copyright (c) 2025, Mathesh Velayudan <123v.mathesh@gmail.com>
+ * Copyright (c) 2025, Alexey Minnekhanov <alexeymin@postmarketos.org>
+ */
+
+/dts-v1/;
+
+#include "sdm636.dtsi"
+#include "sdm660-xiaomi-common.dtsi"
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/leds/common.h>
+
+/ {
+ model = "Xiaomi Redmi Note 5 Pro";
+ compatible = "xiaomi,whyred", "qcom,sdm636";
+ chassis-type = "handset";
+
+ battery: battery {
+ compatible = "simple-battery";
+ charge-full-design-microamp-hours = <4000000>;
+ voltage-min-design-microvolt = <3400000>;
+ voltage-max-design-microvolt = <4408000>;
+ };
+
+ reserved-memory {
+ ramoops@a0000000 {
+ compatible = "ramoops";
+ reg = <0x0 0xa0000000 0x0 0x400000>;
+ console-size = <0x20000>;
+ record-size = <0x20000>;
+ ftrace-size = <0x0>;
+ pmsg-size = <0x20000>;
+ };
+ };
+};
+
+&blsp_i2c1 {
+ status = "okay";
+
+ /* Synaptics E753 */
+ touchscreen@20 {
+ compatible = "syna,rmi4-i2c";
+ reg = <0x20>;
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+ interrupts-extended = <&tlmm 67 IRQ_TYPE_EDGE_FALLING>;
+
+ pinctrl-0 = <&ts_active>;
+ pinctrl-names = "default";
+
+ vio-supply = <&vreg_l11a_1p8>;
+
+ syna,reset-delay-ms = <220>;
+ syna,startup-delay-ms = <600>;
+
+ rmi4-f01@1 {
+ reg = <0x01>;
+ syna,nosleep-mode = <1>;
+ };
+
+ rmi4-f11@11 {
+ reg = <0x11>;
+ syna,sensor-type = <1>;
+ };
+ };
+};
+
+&framebuffer0 {
+ width = <1080>;
+ height = <2160>;
+ stride = <(1080 * 4)>;
+
+ status = "okay";
+};
+
+&gpio_hall_sensor {
+ status = "okay";
+};
+
+&pm660_charger {
+ monitored-battery = <&battery>;
+
+ status = "okay";
+};
+
+&pm660l_lpg {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ qcom,power-source = <1>;
+
+ status = "okay";
+
+ led@3 {
+ reg = <3>;
+ color = <LED_COLOR_ID_WHITE>;
+ function = LED_FUNCTION_STATUS;
+ };
+};
+
+&pm660l_wled {
+ status = "okay";
+};
+
+&rpm_requests {
+ regulators-0 {
+ compatible = "qcom,rpm-pm660l-regulators";
+
+ vdd_s1-supply = <&vph_pwr>;
+ vdd_s2-supply = <&vph_pwr>;
+ vdd_s3_s4-supply = <&vph_pwr>;
+ vdd_s5-supply = <&vph_pwr>;
+ vdd_s6-supply = <&vph_pwr>;
+
+ vdd_l1_l9_l10-supply = <&vreg_s2b_1p05>;
+ vdd_l2-supply = <&vreg_bob>;
+ vdd_l3_l5_l7_l8-supply = <&vreg_bob>;
+ vdd_l4_l6-supply = <&vreg_bob>;
+ vdd_bob-supply = <&vph_pwr>;
+
+ vreg_s1b_1p125: s1 {
+ regulator-min-microvolt = <1125000>;
+ regulator-max-microvolt = <1125000>;
+ regulator-enable-ramp-delay = <200>;
+ };
+
+ vreg_s2b_1p05: s2 {
+ regulator-min-microvolt = <1050000>;
+ regulator-max-microvolt = <1050000>;
+ regulator-enable-ramp-delay = <200>;
+ };
+
+ /* LDOs */
+ vreg_l1b_0p925: l1 {
+ regulator-min-microvolt = <800000>;
+ regulator-max-microvolt = <925000>;
+ regulator-enable-ramp-delay = <250>;
+ regulator-allow-set-load;
+ };
+
+ /* SDHCI 3.3V signal doesn't seem to be supported. */
+ vreg_l2b_2p95: l2 {
+ regulator-min-microvolt = <1648000>;
+ regulator-max-microvolt = <3100000>;
+ regulator-enable-ramp-delay = <250>;
+ regulator-allow-set-load;
+ };
+
+ vreg_l3b_3p3: l3 {
+ regulator-min-microvolt = <1710000>;
+ regulator-max-microvolt = <3600000>;
+ regulator-enable-ramp-delay = <250>;
+ regulator-allow-set-load;
+ regulator-always-on;
+ };
+
+ vreg_l4b_2p95: l4 {
+ regulator-min-microvolt = <1700000>;
+ regulator-max-microvolt = <2950000>;
+ regulator-enable-ramp-delay = <250>;
+
+ regulator-min-microamp = <200>;
+ regulator-max-microamp = <600000>;
+ regulator-system-load = <570000>;
+ regulator-allow-set-load;
+ };
+
+ /*
+ * Downstream specifies a range of 1721-3600mV,
+ * but the only assigned consumers are SDHCI2 VMMC
+ * and Coresight QPDI that both request pinned 2.95V.
+ * Tighten the range to 1.8-3.328 (closest to 3.3) to
+ * make the mmc driver happy.
+ */
+ vreg_l5b_2p95: l5 {
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <3328000>;
+ regulator-enable-ramp-delay = <250>;
+ regulator-allow-set-load;
+ regulator-system-load = <800000>;
+ };
+
+ vreg_l7b_3p125: l7 {
+ regulator-min-microvolt = <2700000>;
+ regulator-max-microvolt = <3125000>;
+ regulator-enable-ramp-delay = <250>;
+ };
+
+ vreg_l8b_3p3: l8 {
+ regulator-min-microvolt = <3200000>;
+ regulator-max-microvolt = <3400000>;
+ regulator-enable-ramp-delay = <250>;
+ };
+
+ vreg_bob: bob {
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3600000>;
+ regulator-enable-ramp-delay = <500>;
+ };
+ };
+
+ regulators-1 {
+ compatible = "qcom,rpm-pm660-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_l1_l6_l7-supply = <&vreg_s5a_1p35>;
+ vdd_l2_l3-supply = <&vreg_s2b_1p05>;
+ vdd_l5-supply = <&vreg_s2b_1p05>;
+ vdd_l8_l9_l10_l11_l12_l13_l14-supply = <&vreg_s4a_2p04>;
+ vdd_l15_l16_l17_l18_l19-supply = <&vreg_bob>;
+
+ /*
+ * S1A (FTAPC0), S2A (FTAPC1), S3A (HFAPC1) are managed
+ * by the Core Power Reduction hardened (CPRh) and the
+ * Operating State Manager (OSM) HW automatically.
+ */
+
+ vreg_s4a_2p04: s4 {
+ regulator-min-microvolt = <1805000>;
+ regulator-max-microvolt = <2040000>;
+ regulator-enable-ramp-delay = <200>;
+ regulator-always-on;
+ };
+
+ vreg_s5a_1p35: s5 {
+ regulator-min-microvolt = <1224000>;
+ regulator-max-microvolt = <1350000>;
+ regulator-enable-ramp-delay = <200>;
+ };
+
+ vreg_s6a_0p87: s6 {
+ regulator-min-microvolt = <504000>;
+ regulator-max-microvolt = <992000>;
+ regulator-enable-ramp-delay = <150>;
+ };
+
+ /* LDOs */
+ vreg_l1a_1p225: l1 {
+ regulator-min-microvolt = <1150000>;
+ regulator-max-microvolt = <1250000>;
+ regulator-enable-ramp-delay = <250>;
+ regulator-allow-set-load;
+ };
+
+ vreg_l2a_1p0: l2 {
+ regulator-min-microvolt = <950000>;
+ regulator-max-microvolt = <1010000>;
+ regulator-enable-ramp-delay = <250>;
+ };
+
+ vreg_l3a_1p0: l3 {
+ regulator-min-microvolt = <950000>;
+ regulator-max-microvolt = <1010000>;
+ regulator-enable-ramp-delay = <250>;
+ };
+
+ vreg_l5a_0p848: l5 {
+ regulator-min-microvolt = <525000>;
+ regulator-max-microvolt = <950000>;
+ regulator-enable-ramp-delay = <250>;
+ };
+
+ vreg_l6a_1p3: l6 {
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1370000>;
+ regulator-allow-set-load;
+ regulator-enable-ramp-delay = <250>;
+ };
+
+ vreg_l7a_1p2: l7 {
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+ regulator-enable-ramp-delay = <250>;
+ };
+
+ vreg_l8a_1p8: l8 {
+ regulator-min-microvolt = <1750000>;
+ regulator-max-microvolt = <1900000>;
+ regulator-enable-ramp-delay = <250>;
+ regulator-system-load = <325000>;
+ regulator-allow-set-load;
+ };
+
+ vreg_l9a_1p8: l9 {
+ regulator-min-microvolt = <1750000>;
+ regulator-max-microvolt = <1900000>;
+ regulator-enable-ramp-delay = <250>;
+ regulator-allow-set-load;
+ };
+
+ vreg_l10a_1p8: l10 {
+ regulator-min-microvolt = <1780000>;
+ regulator-max-microvolt = <1950000>;
+ regulator-enable-ramp-delay = <250>;
+ regulator-allow-set-load;
+ regulator-system-load = <14000>;
+ };
+
+ vreg_l11a_1p8: l11 {
+ regulator-min-microvolt = <1780000>;
+ regulator-max-microvolt = <1950000>;
+ regulator-enable-ramp-delay = <250>;
+ };
+
+ vreg_l12a_1p8: l12 {
+ regulator-min-microvolt = <1780000>;
+ regulator-max-microvolt = <1950000>;
+ regulator-enable-ramp-delay = <250>;
+ };
+
+ /* This gives power to the LPDDR4: never turn it off! */
+ vreg_l13a_1p8: l13 {
+ regulator-min-microvolt = <1780000>;
+ regulator-max-microvolt = <1950000>;
+ regulator-enable-ramp-delay = <250>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ vreg_l14a_1p8: l14 {
+ regulator-min-microvolt = <1710000>;
+ regulator-max-microvolt = <1900000>;
+ regulator-enable-ramp-delay = <250>;
+ };
+
+ vreg_l15a_1p8: l15 {
+ regulator-min-microvolt = <1650000>;
+ regulator-max-microvolt = <2950000>;
+ regulator-enable-ramp-delay = <250>;
+ };
+
+ vreg_l16a_2p7: l16 {
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <2800000>;
+ regulator-enable-ramp-delay = <250>;
+ regulator-always-on;
+ };
+
+ vreg_l17a_1p8: l17 {
+ regulator-min-microvolt = <1650000>;
+ regulator-max-microvolt = <2950000>;
+ regulator-enable-ramp-delay = <250>;
+ };
+
+ vreg_l19a_3p3: l19 {
+ regulator-min-microvolt = <3200000>;
+ regulator-max-microvolt = <3400000>;
+ regulator-enable-ramp-delay = <250>;
+ regulator-allow-set-load;
+ };
+ };
+};
+
+&sdhc_2 {
+ status = "okay";
+};
+
+&tlmm {
+ gpio-reserved-ranges = <8 4>; /* Fingerprint SPI */
+
+ ts_active: ts-active-state {
+ pins = "gpio66", "gpio67";
+ function = "gpio";
+ drive-strength = <10>;
+ bias-pull-up;
+ };
+};
--
2.52.0
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH 6/7] arm64: dts: qcom: add device tree for Xiaomi Mi A2 (jasmine)
2026-01-20 18:00 [PATCH 0/7] arm64: dts: qcom: add support for Xiaomi SDM636/SDM660 devices Gianluca Boiano
` (4 preceding siblings ...)
2026-01-20 18:00 ` [PATCH 5/7] arm64: dts: qcom: add device tree for Xiaomi Redmi Note 5 Pro (whyred) Gianluca Boiano
@ 2026-01-20 18:00 ` Gianluca Boiano
2026-01-20 18:00 ` [PATCH 7/7] arm64: dts: qcom: add device tree for Xiaomi Mi 8 Lite (platina) Gianluca Boiano
2026-01-21 21:02 ` [PATCH 0/7] arm64: dts: qcom: Add Xiaomi SDM636/SDM660 devices Gianluca Boiano
7 siblings, 0 replies; 28+ messages in thread
From: Gianluca Boiano @ 2026-01-20 18:00 UTC (permalink / raw)
To: linux-arm-msm, devicetree
Cc: andersson, konradybcio, krzk+dt, conor+dt, robh, david,
Gianluca Boiano, Joe Mason
Add initial device tree support for the Xiaomi Mi A2
(codename: jasmine), a smartphone based on Qualcomm SDM660 SoC with
4/6GB RAM and a 5.99" 1080x2160 display.
This enables:
- Booting to a framebuffer console
- USB support
- Touchscreen (Novatek NT36672A)
- Battery monitoring
- Charging (pm660_charger)
Co-developed-by: Joe Mason <buddyjojo06@outlook.com>
Signed-off-by: Joe Mason <buddyjojo06@outlook.com>
Signed-off-by: Gianluca Boiano <morf3089@gmail.com>
---
arch/arm64/boot/dts/qcom/Makefile | 1 +
.../boot/dts/qcom/sdm660-xiaomi-jasmine.dts | 333 ++++++++++++++++++
2 files changed, 334 insertions(+)
create mode 100644 arch/arm64/boot/dts/qcom/sdm660-xiaomi-jasmine.dts
diff --git a/arch/arm64/boot/dts/qcom/Makefile b/arch/arm64/boot/dts/qcom/Makefile
index a1cf067fdfeb..8f7b66bee6be 100644
--- a/arch/arm64/boot/dts/qcom/Makefile
+++ b/arch/arm64/boot/dts/qcom/Makefile
@@ -245,6 +245,7 @@ dtb-$(CONFIG_ARCH_QCOM) += sdm632-motorola-ocean.dtb
dtb-$(CONFIG_ARCH_QCOM) += sdm636-sony-xperia-ganges-mermaid.dtb
dtb-$(CONFIG_ARCH_QCOM) += sdm636-xiaomi-tulip.dtb
dtb-$(CONFIG_ARCH_QCOM) += sdm636-xiaomi-whyred.dtb
+dtb-$(CONFIG_ARCH_QCOM) += sdm660-xiaomi-jasmine.dtb
dtb-$(CONFIG_ARCH_QCOM) += sdm660-xiaomi-lavender.dtb
dtb-$(CONFIG_ARCH_QCOM) += sdm670-google-sargo.dtb
dtb-$(CONFIG_ARCH_QCOM) += sdm845-db845c.dtb
diff --git a/arch/arm64/boot/dts/qcom/sdm660-xiaomi-jasmine.dts b/arch/arm64/boot/dts/qcom/sdm660-xiaomi-jasmine.dts
new file mode 100644
index 000000000000..784a6c41be6d
--- /dev/null
+++ b/arch/arm64/boot/dts/qcom/sdm660-xiaomi-jasmine.dts
@@ -0,0 +1,333 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * Copyright (c) 2022, Joe Mason <buddyjojo06@outlook.com>
+ */
+
+/dts-v1/;
+
+#include "sdm660.dtsi"
+#include "sdm660-xiaomi-common.dtsi"
+
+/ {
+ model = "Xiaomi Mi A2";
+ compatible = "xiaomi,jasmine", "qcom,sdm660";
+ chassis-type = "handset";
+
+ battery: battery {
+ compatible = "simple-battery";
+ charge-full-design-microamp-hours = <3000000>;
+ voltage-min-design-microvolt = <3400000>;
+ voltage-max-design-microvolt = <4400000>;
+ };
+
+ reserved-memory {
+ ramoops@a0000000 {
+ compatible = "ramoops";
+ reg = <0x0 0xa0000000 0x0 0x400000>;
+ console-size = <0x20000>;
+ record-size = <0x20000>;
+ ftrace-size = <0x0>;
+ pmsg-size = <0x20000>;
+ };
+ };
+};
+
+&blsp_i2c1 {
+ status = "okay";
+
+ touchscreen@1 {
+ compatible = "novatek,nt36672a-ts";
+ reg = <0x1>;
+ iovcc-supply = <&vreg_l11a_1p8>;
+ interrupts-extended = <&tlmm 67 IRQ_TYPE_EDGE_RISING>;
+ pinctrl-0 = <&ts_active>;
+ pinctrl-names = "default";
+ reset-gpios = <&tlmm 66 GPIO_ACTIVE_LOW>;
+ touchscreen-size-x = <1080>;
+ touchscreen-size-y = <2160>;
+ };
+};
+
+&framebuffer0 {
+ width = <1080>;
+ height = <2160>;
+ stride = <(1080 * 4)>;
+
+ status = "okay";
+};
+
+&pm660_charger {
+ monitored-battery = <&battery>;
+
+ status = "okay";
+};
+
+&pm660l_wled {
+ status = "okay";
+};
+
+&rpm_requests {
+ regulators-0 {
+ compatible = "qcom,rpm-pm660l-regulators";
+
+ vdd_s1-supply = <&vph_pwr>;
+ vdd_s2-supply = <&vph_pwr>;
+ vdd_s3_s4-supply = <&vph_pwr>;
+ vdd_s5-supply = <&vph_pwr>;
+ vdd_s6-supply = <&vph_pwr>;
+
+ vdd_l1_l9_l10-supply = <&vreg_s2b_1p05>;
+ vdd_l2-supply = <&vreg_bob>;
+ vdd_l3_l5_l7_l8-supply = <&vreg_bob>;
+ vdd_l4_l6-supply = <&vreg_bob>;
+ vdd_bob-supply = <&vph_pwr>;
+
+ vreg_s1b_1p125: s1 {
+ regulator-min-microvolt = <1125000>;
+ regulator-max-microvolt = <1125000>;
+ regulator-enable-ramp-delay = <200>;
+ };
+
+ vreg_s2b_1p05: s2 {
+ regulator-min-microvolt = <1050000>;
+ regulator-max-microvolt = <1050000>;
+ regulator-enable-ramp-delay = <200>;
+ };
+
+ /* LDOs */
+ vreg_l1b_0p925: l1 {
+ regulator-min-microvolt = <800000>;
+ regulator-max-microvolt = <925000>;
+ regulator-enable-ramp-delay = <250>;
+ regulator-allow-set-load;
+ };
+
+ /* SDHCI 3.3V signal doesn't seem to be supported. */
+ vreg_l2b_2p95: l2 {
+ regulator-min-microvolt = <1648000>;
+ regulator-max-microvolt = <2696000>;
+ regulator-enable-ramp-delay = <250>;
+ regulator-allow-set-load;
+ };
+
+ vreg_l3b_3p3: l3 {
+ regulator-min-microvolt = <1700000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-enable-ramp-delay = <250>;
+ regulator-allow-set-load;
+ regulator-always-on;
+ };
+
+ vreg_l4b_2p95: l4 {
+ regulator-min-microvolt = <2944000>;
+ regulator-max-microvolt = <2952000>;
+ regulator-enable-ramp-delay = <250>;
+
+ regulator-min-microamp = <200>;
+ regulator-max-microamp = <600000>;
+ regulator-system-load = <570000>;
+ regulator-allow-set-load;
+ };
+
+ /*
+ * Downstream specifies a range of 1721-3600mV,
+ * but the only assigned consumers are SDHCI2 VMMC
+ * and Coresight QPDI that both request pinned 2.95V.
+ * Tighten the range to 1.8-3.328 (closest to 3.3) to
+ * make the mmc driver happy.
+ */
+ vreg_l5b_2p95: l5 {
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <3328000>;
+ regulator-enable-ramp-delay = <250>;
+ regulator-allow-set-load;
+ regulator-system-load = <800000>;
+ };
+
+ vreg_l7b_3p125: l7 {
+ regulator-min-microvolt = <2700000>;
+ regulator-max-microvolt = <3125000>;
+ regulator-enable-ramp-delay = <250>;
+ };
+
+ vreg_l8b_3p3: l8 {
+ regulator-min-microvolt = <3200000>;
+ regulator-max-microvolt = <3400000>;
+ regulator-enable-ramp-delay = <250>;
+ };
+
+ vreg_bob: bob {
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3600000>;
+ regulator-enable-ramp-delay = <500>;
+ };
+ };
+
+ regulators-1 {
+ compatible = "qcom,rpm-pm660-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_l1_l6_l7-supply = <&vreg_s5a_1p35>;
+ vdd_l2_l3-supply = <&vreg_s2b_1p05>;
+ vdd_l5-supply = <&vreg_s2b_1p05>;
+ vdd_l8_l9_l10_l11_l12_l13_l14-supply = <&vreg_s4a_2p04>;
+ vdd_l15_l16_l17_l18_l19-supply = <&vreg_bob>;
+
+ /*
+ * S1A (FTAPC0), S2A (FTAPC1), S3A (HFAPC1) are managed
+ * by the Core Power Reduction hardened (CPRh) and the
+ * Operating State Manager (OSM) HW automatically.
+ */
+
+ vreg_s4a_2p04: s4 {
+ regulator-min-microvolt = <1805000>;
+ regulator-max-microvolt = <2040000>;
+ regulator-enable-ramp-delay = <200>;
+ regulator-always-on;
+ };
+
+ vreg_s5a_1p35: s5 {
+ regulator-min-microvolt = <1224000>;
+ regulator-max-microvolt = <1350000>;
+ regulator-enable-ramp-delay = <200>;
+ };
+
+ vreg_s6a_0p87: s6 {
+ regulator-min-microvolt = <504000>;
+ regulator-max-microvolt = <992000>;
+ regulator-enable-ramp-delay = <150>;
+ };
+
+ /* LDOs */
+ vreg_l1a_1p225: l1 {
+ regulator-min-microvolt = <1150000>;
+ regulator-max-microvolt = <1250000>;
+ regulator-enable-ramp-delay = <250>;
+ regulator-allow-set-load;
+ };
+
+ vreg_l2a_1p0: l2 {
+ regulator-min-microvolt = <950000>;
+ regulator-max-microvolt = <1010000>;
+ regulator-enable-ramp-delay = <250>;
+ };
+
+ vreg_l3a_1p0: l3 {
+ regulator-min-microvolt = <950000>;
+ regulator-max-microvolt = <1010000>;
+ regulator-enable-ramp-delay = <250>;
+ };
+
+ vreg_l5a_0p848: l5 {
+ regulator-min-microvolt = <525000>;
+ regulator-max-microvolt = <950000>;
+ regulator-enable-ramp-delay = <250>;
+ };
+
+ vreg_l6a_1p3: l6 {
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1370000>;
+ regulator-allow-set-load;
+ regulator-enable-ramp-delay = <250>;
+ };
+
+ vreg_l7a_1p2: l7 {
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+ regulator-enable-ramp-delay = <250>;
+ };
+
+ vreg_l8a_1p8: l8 {
+ regulator-min-microvolt = <1750000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-enable-ramp-delay = <250>;
+ regulator-system-load = <325000>;
+ regulator-allow-set-load;
+ };
+
+ vreg_l9a_1p8: l9 {
+ regulator-min-microvolt = <1750000>;
+ regulator-max-microvolt = <1900000>;
+ regulator-enable-ramp-delay = <250>;
+ regulator-allow-set-load;
+ };
+
+ vreg_l10a_1p8: l10 {
+ regulator-min-microvolt = <1780000>;
+ regulator-max-microvolt = <1950000>;
+ regulator-enable-ramp-delay = <250>;
+ regulator-allow-set-load;
+ regulator-system-load = <14000>;
+ };
+
+ vreg_l11a_1p8: l11 {
+ regulator-min-microvolt = <1780000>;
+ regulator-max-microvolt = <1950000>;
+ regulator-enable-ramp-delay = <250>;
+ };
+
+ vreg_l12a_1p8: l12 {
+ regulator-min-microvolt = <1780000>;
+ regulator-max-microvolt = <1950000>;
+ regulator-enable-ramp-delay = <250>;
+ };
+
+ /* This gives power to the LPDDR4: never turn it off! */
+ vreg_l13a_1p8: l13 {
+ regulator-min-microvolt = <1780000>;
+ regulator-max-microvolt = <1950000>;
+ regulator-enable-ramp-delay = <250>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ vreg_l14a_1p8: l14 {
+ regulator-min-microvolt = <1710000>;
+ regulator-max-microvolt = <1900000>;
+ regulator-enable-ramp-delay = <250>;
+ };
+
+ vreg_l15a_1p8: l15 {
+ regulator-min-microvolt = <1650000>;
+ regulator-max-microvolt = <2950000>;
+ regulator-enable-ramp-delay = <250>;
+ };
+
+ vreg_l16a_2p7: l16 {
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <2800000>;
+ regulator-enable-ramp-delay = <250>;
+ regulator-always-on;
+ };
+
+ vreg_l17a_1p8: l17 {
+ regulator-min-microvolt = <1648000>;
+ regulator-max-microvolt = <2952000>;
+ regulator-enable-ramp-delay = <250>;
+ };
+
+ vreg_l19a_3p3: l19 {
+ regulator-min-microvolt = <3312000>;
+ regulator-max-microvolt = <3400000>;
+ regulator-enable-ramp-delay = <250>;
+ regulator-allow-set-load;
+ };
+ };
+};
+
+&tlmm {
+ gpio-reserved-ranges = <8 4>; /* Fingerprint SPI */
+
+ ts_active: ts-active-state {
+ pins = "gpio66", "gpio67";
+ function = "gpio";
+ drive-strength = <8>;
+ bias-pull-up;
+ };
+};
--
2.52.0
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH 7/7] arm64: dts: qcom: add device tree for Xiaomi Mi 8 Lite (platina)
2026-01-20 18:00 [PATCH 0/7] arm64: dts: qcom: add support for Xiaomi SDM636/SDM660 devices Gianluca Boiano
` (5 preceding siblings ...)
2026-01-20 18:00 ` [PATCH 6/7] arm64: dts: qcom: add device tree for Xiaomi Mi A2 (jasmine) Gianluca Boiano
@ 2026-01-20 18:00 ` Gianluca Boiano
2026-01-21 21:02 ` [PATCH 0/7] arm64: dts: qcom: Add Xiaomi SDM636/SDM660 devices Gianluca Boiano
7 siblings, 0 replies; 28+ messages in thread
From: Gianluca Boiano @ 2026-01-20 18:00 UTC (permalink / raw)
To: linux-arm-msm, devicetree
Cc: andersson, konradybcio, krzk+dt, conor+dt, robh, david,
Gianluca Boiano, AngeloGioacchino Del Regno, Molly Sophia
Add initial device tree support for the Xiaomi Mi 8 Lite
(codename: platina), a smartphone based on Qualcomm SDM660 SoC with
4/6GB RAM and a 6.26" 1080x2280 display.
This enables:
- Booting to a framebuffer console
- USB support
- Hall effect sensor
- Touchscreen (Novatek NT36672A)
- Battery monitoring
- Charging (pm660_charger)
Co-developed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@somainline.org>
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@somainline.org>
Co-developed-by: Molly Sophia <mollysophia379@gmail.com>
Signed-off-by: Molly Sophia <mollysophia379@gmail.com>
Signed-off-by: Gianluca Boiano <morf3089@gmail.com>
---
arch/arm64/boot/dts/qcom/Makefile | 1 +
.../boot/dts/qcom/sdm660-xiaomi-platina.dts | 364 ++++++++++++++++++
2 files changed, 365 insertions(+)
create mode 100644 arch/arm64/boot/dts/qcom/sdm660-xiaomi-platina.dts
diff --git a/arch/arm64/boot/dts/qcom/Makefile b/arch/arm64/boot/dts/qcom/Makefile
index 8f7b66bee6be..d76e955b4144 100644
--- a/arch/arm64/boot/dts/qcom/Makefile
+++ b/arch/arm64/boot/dts/qcom/Makefile
@@ -247,6 +247,7 @@ dtb-$(CONFIG_ARCH_QCOM) += sdm636-xiaomi-tulip.dtb
dtb-$(CONFIG_ARCH_QCOM) += sdm636-xiaomi-whyred.dtb
dtb-$(CONFIG_ARCH_QCOM) += sdm660-xiaomi-jasmine.dtb
dtb-$(CONFIG_ARCH_QCOM) += sdm660-xiaomi-lavender.dtb
+dtb-$(CONFIG_ARCH_QCOM) += sdm660-xiaomi-platina.dtb
dtb-$(CONFIG_ARCH_QCOM) += sdm670-google-sargo.dtb
dtb-$(CONFIG_ARCH_QCOM) += sdm845-db845c.dtb
diff --git a/arch/arm64/boot/dts/qcom/sdm660-xiaomi-platina.dts b/arch/arm64/boot/dts/qcom/sdm660-xiaomi-platina.dts
new file mode 100644
index 000000000000..c8ebe2405ee0
--- /dev/null
+++ b/arch/arm64/boot/dts/qcom/sdm660-xiaomi-platina.dts
@@ -0,0 +1,364 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * Copyright (c) 2021, AngeloGioacchino Del Regno
+ * <angelogioacchino.delregno@somainline.org>
+ * Copyright (c) 2022, Molly Sophia <mollysophia379@gmail.com>
+ */
+
+/dts-v1/;
+
+#include "sdm660.dtsi"
+#include "sdm660-xiaomi-common.dtsi"
+#include <dt-bindings/gpio/gpio.h>
+
+/ {
+ model = "Xiaomi Mi 8 Lite";
+ compatible = "xiaomi,platina", "qcom,sdm660";
+ chassis-type = "handset";
+
+ battery: battery {
+ compatible = "simple-battery";
+ charge-full-design-microamp-hours = <3350000>;
+ voltage-min-design-microvolt = <3400000>;
+ voltage-max-design-microvolt = <4400000>;
+ };
+
+ reserved-memory {
+ ramoops@ffc00000 {
+ compatible = "ramoops";
+ reg = <0x0 0xffc00000 0x0 0x100000>;
+ record-size = <0x10000>;
+ console-size = <0x60000>;
+ ftrace-size = <0x10000>;
+ pmsg-size = <0x20000>;
+ ecc-size = <16>;
+ };
+ };
+};
+
+&blsp_i2c4 {
+ status = "okay";
+
+ touchscreen@1 {
+ compatible = "novatek,nt36672a-ts";
+ reg = <0x1>;
+ iovcc-supply = <&vreg_l11a_1p8>;
+ interrupts-extended = <&tlmm 67 IRQ_TYPE_EDGE_RISING>;
+ pinctrl-0 = <&ts_active>;
+ pinctrl-names = "default";
+ reset-gpios = <&tlmm 66 GPIO_ACTIVE_LOW>;
+ touchscreen-size-x = <1080>;
+ touchscreen-size-y = <2280>;
+ };
+};
+
+&framebuffer0 {
+ width = <1080>;
+ height = <2280>;
+ stride = <(1080 * 4)>;
+
+ status = "okay";
+};
+
+&gpio_hall_sensor {
+ status = "okay";
+};
+
+&pm660_charger {
+ monitored-battery = <&battery>;
+
+ status = "okay";
+};
+
+&pm660l_wled {
+ status = "okay";
+};
+
+&rpm_requests {
+ regulators-0 {
+ compatible = "qcom,rpm-pm660l-regulators";
+
+ vdd_s1-supply = <&vph_pwr>;
+ vdd_s2-supply = <&vph_pwr>;
+ vdd_s3_s4-supply = <&vph_pwr>;
+ vdd_s5-supply = <&vph_pwr>;
+ vdd_s6-supply = <&vph_pwr>;
+
+ vdd_l1_l9_l10-supply = <&vreg_s2b_1p05>;
+ vdd_l2-supply = <&vreg_bob>;
+ vdd_l3_l5_l7_l8-supply = <&vreg_bob>;
+ vdd_l4_l6-supply = <&vreg_bob>;
+ vdd_bob-supply = <&vph_pwr>;
+
+ vreg_s1b_1p125: s1 {
+ regulator-min-microvolt = <1125000>;
+ regulator-max-microvolt = <1125000>;
+ regulator-enable-ramp-delay = <200>;
+ };
+
+ vreg_s2b_1p05: s2 {
+ regulator-min-microvolt = <1050000>;
+ regulator-max-microvolt = <1050000>;
+ regulator-enable-ramp-delay = <200>;
+ };
+
+ /* LDOs */
+ vreg_l1b_0p925: l1 {
+ regulator-min-microvolt = <920000>;
+ regulator-max-microvolt = <928000>;
+ regulator-enable-ramp-delay = <250>;
+ regulator-allow-set-load;
+ };
+
+ vreg_l2b_2p95: l2 {
+ /*
+ * This regulator supports 1.648 - 3.104V on this board
+ * but we set a max voltage of anything less than 2.7V
+ * to satisfy a condition in sdhci.c that will disable
+ * 3.3V SDHCI signaling, which happens to be not really
+ * supported on this platform.
+ */
+ regulator-min-microvolt = <1648000>;
+ regulator-max-microvolt = <2696000>;
+ regulator-enable-ramp-delay = <250>;
+ regulator-allow-set-load;
+ };
+
+ vreg_l3b_3p3: l3 {
+ regulator-min-microvolt = <3296000>;
+ regulator-max-microvolt = <3312000>;
+ regulator-enable-ramp-delay = <250>;
+ regulator-min-microamp = <200>;
+ regulator-max-microamp = <600000>;
+ regulator-system-load = <100000>;
+ regulator-allow-set-load;
+ };
+
+ vreg_l4b_2p95: l4 {
+ regulator-min-microvolt = <2944000>;
+ regulator-max-microvolt = <2952000>;
+ regulator-enable-ramp-delay = <250>;
+
+ regulator-min-microamp = <200>;
+ regulator-max-microamp = <600000>;
+ regulator-system-load = <570000>;
+ regulator-allow-set-load;
+ };
+
+ /*
+ * Downstream specifies a range of 1721-3600mV,
+ * but the only assigned consumers are SDHCI2 VMMC
+ * and Coresight QPDI that both request pinned 2.95V.
+ * Tighten the range to 1.8-3.328 (closest to 3.3) to
+ * make the mmc driver happy.
+ */
+ vreg_l5b_2p95: l5 {
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <3328000>;
+ regulator-enable-ramp-delay = <250>;
+ regulator-allow-set-load;
+ regulator-system-load = <800000>;
+ };
+
+ vreg_l7b_3p125: l7 {
+ regulator-min-microvolt = <2704000>;
+ regulator-max-microvolt = <3128000>;
+ regulator-enable-ramp-delay = <250>;
+ };
+
+ vreg_l8b_3p3: l8 {
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <3400000>;
+ regulator-enable-ramp-delay = <250>;
+ };
+
+ vreg_bob: bob {
+ regulator-min-microvolt = <3304000>;
+ regulator-max-microvolt = <3624000>;
+ regulator-enable-ramp-delay = <500>;
+ };
+ };
+
+ regulators-1 {
+ compatible = "qcom,rpm-pm660-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_l1_l6_l7-supply = <&vreg_s5a_1p35>;
+ vdd_l2_l3-supply = <&vreg_s2b_1p05>;
+ vdd_l5-supply = <&vreg_s2b_1p05>;
+ vdd_l8_l9_l10_l11_l12_l13_l14-supply = <&vreg_s4a_2p04>;
+ vdd_l15_l16_l17_l18_l19-supply = <&vreg_bob>;
+
+ /*
+ * S1A (FTAPC0), S2A (FTAPC1), S3A (HFAPC1) are managed
+ * by the Core Power Reduction hardened (CPRh) and the
+ * Operating State Manager (OSM) HW automatically.
+ */
+
+ vreg_s4a_2p04: s4 {
+ regulator-min-microvolt = <2040000>;
+ regulator-max-microvolt = <2040000>;
+ regulator-enable-ramp-delay = <200>;
+ regulator-always-on;
+ };
+
+ vreg_s5a_1p35: s5 {
+ regulator-min-microvolt = <1224000>;
+ regulator-max-microvolt = <1350000>;
+ regulator-enable-ramp-delay = <200>;
+ };
+
+ vreg_s6a_0p87: s6 {
+ regulator-min-microvolt = <504000>;
+ regulator-max-microvolt = <992000>;
+ regulator-enable-ramp-delay = <150>;
+ };
+
+ /* LDOs */
+ vreg_l1a_1p225: l1 {
+ regulator-min-microvolt = <1226000>;
+ regulator-max-microvolt = <1250000>;
+ regulator-enable-ramp-delay = <250>;
+ regulator-allow-set-load;
+ };
+
+ vreg_l2a_1p0: l2 {
+ regulator-min-microvolt = <944000>;
+ regulator-max-microvolt = <1008000>;
+ regulator-enable-ramp-delay = <250>;
+ };
+
+ vreg_l3a_1p0: l3 {
+ regulator-min-microvolt = <944000>;
+ regulator-max-microvolt = <1008000>;
+ regulator-enable-ramp-delay = <250>;
+ };
+
+ vreg_l5a_0p848: l5 {
+ regulator-min-microvolt = <800000>;
+ regulator-max-microvolt = <952000>;
+ regulator-enable-ramp-delay = <250>;
+ };
+
+ vreg_l6a_1p3: l6 {
+ regulator-min-microvolt = <1304000>;
+ regulator-max-microvolt = <1368000>;
+ regulator-allow-set-load;
+ regulator-enable-ramp-delay = <250>;
+ };
+
+ vreg_l7a_1p2: l7 {
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+ regulator-enable-ramp-delay = <250>;
+ };
+
+ vreg_l8a_1p8: l8 {
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-enable-ramp-delay = <250>;
+ regulator-system-load = <325000>;
+ regulator-allow-set-load;
+ };
+
+ vreg_l9a_1p8: l9 {
+ regulator-min-microvolt = <1804000>;
+ regulator-max-microvolt = <1896000>;
+ regulator-enable-ramp-delay = <250>;
+ regulator-allow-set-load;
+ };
+
+ vreg_l10a_1p8: l10 {
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1944000>;
+ regulator-enable-ramp-delay = <250>;
+ regulator-allow-set-load;
+ regulator-system-load = <14000>;
+ };
+
+ vreg_l11a_1p8: l11 {
+ regulator-min-microvolt = <1784000>;
+ regulator-max-microvolt = <1944000>;
+ regulator-enable-ramp-delay = <250>;
+ };
+
+ vreg_l12a_1p8: l12 {
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1944000>;
+ regulator-enable-ramp-delay = <250>;
+ };
+
+ /* This gives power to the LPDDR4: never turn it off! */
+ vreg_l13a_1p8: l13 {
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1944000>;
+ regulator-enable-ramp-delay = <250>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ vreg_l14a_1p8: l14 {
+ regulator-min-microvolt = <1710000>;
+ regulator-max-microvolt = <1952000>;
+ regulator-enable-ramp-delay = <250>;
+ };
+
+ vreg_l15a_1p8: l15 {
+ regulator-min-microvolt = <1648000>;
+ regulator-max-microvolt = <2952000>;
+ regulator-enable-ramp-delay = <250>;
+ };
+
+ vreg_l16a_2p7: l16 {
+ regulator-min-microvolt = <2704000>;
+ regulator-max-microvolt = <2712000>;
+ regulator-enable-ramp-delay = <250>;
+ };
+
+ vreg_l17a_1p8: l17 {
+ regulator-min-microvolt = <1648000>;
+ regulator-max-microvolt = <2952000>;
+ regulator-enable-ramp-delay = <250>;
+ };
+
+ vreg_l19a_3p3: l19 {
+ regulator-min-microvolt = <3312000>;
+ regulator-max-microvolt = <3328000>;
+ regulator-enable-ramp-delay = <250>;
+ regulator-allow-set-load;
+ };
+ };
+};
+
+/*
+ * Override sdhc_1 from common: platina uses mmc-ddr-1_8v instead of mmc-hs200-1_8v
+ */
+&sdhc_1 {
+ /delete-property/ mmc-hs200-1_8v;
+ mmc-ddr-1_8v;
+};
+
+&tlmm {
+ gpio-reserved-ranges = <8 4>; /* Fingerprint SPI */
+
+ /* Override common pinctrl for platina-specific settings */
+ gpio_hall_sensor_default: gpio-hall-sensor-default-state {
+ pins = "gpio75";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-disable;
+ };
+
+ ts_active: ts-active-state {
+ pins = "gpio66", "gpio67";
+ function = "gpio";
+ drive-strength = <8>;
+ bias-pull-up;
+ };
+};
--
2.52.0
^ permalink raw reply related [flat|nested] 28+ messages in thread
* Re: [PATCH 1/7] dt-bindings: arm: qcom: add Xiaomi SDM636/SDM660 devices
2026-01-20 18:00 ` [PATCH 1/7] dt-bindings: arm: qcom: add " Gianluca Boiano
@ 2026-01-21 8:14 ` Krzysztof Kozlowski
0 siblings, 0 replies; 28+ messages in thread
From: Krzysztof Kozlowski @ 2026-01-21 8:14 UTC (permalink / raw)
To: Gianluca Boiano
Cc: linux-arm-msm, devicetree, andersson, konradybcio, krzk+dt,
conor+dt, robh, david
On Tue, Jan 20, 2026 at 07:00:46PM +0100, Gianluca Boiano wrote:
> Add device tree bindings for:
> - Xiaomi Redmi Note 6 Pro (tulip) - SDM636
> - Xiaomi Redmi Note 5 Pro (whyred) - SDM636
> - Xiaomi Mi A2 (jasmine) - SDM660
> - Xiaomi Mi 8 Lite (platina) - SDM660
>
> These are Android-based smartphones that can boot mainline Linux
> with simple-framebuffer and USB support.
>
> Signed-off-by: Gianluca Boiano <morf3089@gmail.com>
> ---
> Documentation/devicetree/bindings/arm/qcom.yaml | 4 ++++
> 1 file changed, 4 insertions(+)
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH 3/7] arm64: dts: qcom: sdm660-xiaomi-lavender: fix regulator and SD settings
2026-01-20 18:00 ` [PATCH 3/7] arm64: dts: qcom: sdm660-xiaomi-lavender: fix regulator and SD settings Gianluca Boiano
@ 2026-01-21 11:27 ` Konrad Dybcio
2026-01-21 20:30 ` Gianluca Boiano
2026-01-22 16:44 ` Alexey Minnekhanov
2026-01-21 12:36 ` Konrad Dybcio
1 sibling, 2 replies; 28+ messages in thread
From: Konrad Dybcio @ 2026-01-21 11:27 UTC (permalink / raw)
To: Gianluca Boiano, linux-arm-msm, devicetree
Cc: andersson, konradybcio, krzk+dt, conor+dt, robh, david
On 1/20/26 7:00 PM, Gianluca Boiano wrote:
> Fix regulator configurations to ensure stable operation:
> - vreg_l2b_2p95: Increase max voltage from 2696mV to 3100mV to support
> proper SD card voltage signaling
This makes sense
> - vreg_l3b_3p3: Add regulator-always-on to keep the regulator enabled
> during boot
This may make sense, but you're not explaining the reason behind it so
we can't know
> - vreg_l10a_1p8: Add regulator-system-load of 14000uA for proper USB PHY
> PLL operation
The driver needs to be fixed instead, as it should perform a
regulator_set_load()
Konrad
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH 2/7] arm64: dts: qcom: sdm660: add common Xiaomi SDM636/SDM660 include file
2026-01-20 18:00 ` [PATCH 2/7] arm64: dts: qcom: sdm660: add common Xiaomi SDM636/SDM660 include file Gianluca Boiano
@ 2026-01-21 12:35 ` Konrad Dybcio
2026-01-21 20:30 ` Gianluca Boiano
0 siblings, 1 reply; 28+ messages in thread
From: Konrad Dybcio @ 2026-01-21 12:35 UTC (permalink / raw)
To: Gianluca Boiano, linux-arm-msm, devicetree
Cc: andersson, krzk+dt, conor+dt, robh, david
On 1/20/26 7:00 PM, Gianluca Boiano wrote:
> Create a shared device tree include file for Xiaomi smartphones and tablets
> based on Qualcomm SDM636/SDM660 SoCs. This reduces code duplication when
> adding new Xiaomi devices and ensures consistent configuration across the
> family.
>
> The common dtsi includes:
> - PM660/PM660L PMIC configuration with volume/power buttons
> - Serial console (blsp1_uart2, blsp2_uart1)
> - Hall effect sensor (disabled by default)
> - USB (qusb2phy0, usb3) in peripheral mode
> - SD card (sdhc_2) pinctrl and supplies
> - eMMC (sdhc_1) with HS400 support
> - Backlight (pm660l_wled)
> - Framebuffer memory reservation
> - WiFi (wcn3990)
> - Bluetooth (wcn3990)
>
> Also refactor sdm660-xiaomi-lavender.dts to use the new common include,
> removing duplicated code.
>
> Signed-off-by: Gianluca Boiano <morf3089@gmail.com>
> ---
> .../boot/dts/qcom/sdm660-xiaomi-common.dtsi | 214 ++++++++++++++++++
> .../boot/dts/qcom/sdm660-xiaomi-lavender.dts | 144 +-----------
Try adding this to your gitconfig:
[diff]
renameLimit = 999999
algorithm = histogram
renames = copies
> 2 files changed, 219 insertions(+), 139 deletions(-)
> create mode 100644 arch/arm64/boot/dts/qcom/sdm660-xiaomi-common.dtsi
>
> diff --git a/arch/arm64/boot/dts/qcom/sdm660-xiaomi-common.dtsi b/arch/arm64/boot/dts/qcom/sdm660-xiaomi-common.dtsi
> new file mode 100644
> index 000000000000..37ce675089fb
> --- /dev/null
> +++ b/arch/arm64/boot/dts/qcom/sdm660-xiaomi-common.dtsi
> @@ -0,0 +1,214 @@
> +// SPDX-License-Identifier: GPL-2.0-only
> +/*
> + * Common devicetree for Xiaomi SDM636/SDM660 devices
> + *
> + * Copyright (c) 2020, Alexey Minnekhanov <alexey.min@gmail.com>
> + * Copyright (c) 2022, Gianluca Boiano <morf3089@gmail.com>
At this point in the series, I'm not sure your copyright is valid
since you're just shuffling code around. The year is odd too.
I noticed that Dang's copyright from the lavender dtsi is missing too
Konrad
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH 3/7] arm64: dts: qcom: sdm660-xiaomi-lavender: fix regulator and SD settings
2026-01-20 18:00 ` [PATCH 3/7] arm64: dts: qcom: sdm660-xiaomi-lavender: fix regulator and SD settings Gianluca Boiano
2026-01-21 11:27 ` Konrad Dybcio
@ 2026-01-21 12:36 ` Konrad Dybcio
1 sibling, 0 replies; 28+ messages in thread
From: Konrad Dybcio @ 2026-01-21 12:36 UTC (permalink / raw)
To: Gianluca Boiano, linux-arm-msm, devicetree
Cc: andersson, konradybcio, krzk+dt, conor+dt, robh, david
On 1/20/26 7:00 PM, Gianluca Boiano wrote:
> Fix regulator configurations to ensure stable operation:
> - vreg_l2b_2p95: Increase max voltage from 2696mV to 3100mV to support
> proper SD card voltage signaling
> - vreg_l3b_3p3: Add regulator-always-on to keep the regulator enabled
> during boot
> - vreg_l10a_1p8: Add regulator-system-load of 14000uA for proper USB PHY
> PLL operation
>
> Also enable the SD card controller (sdhc_2) which was left disabled.
I see the new -common.dtsi configures the cd-gpio and regulators, but
doesn't enable it globally. Should it be done there?
Konrad
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH 4/7] arm64: dts: qcom: add device tree for Xiaomi Redmi Note 6 Pro (tulip)
2026-01-20 18:00 ` [PATCH 4/7] arm64: dts: qcom: add device tree for Xiaomi Redmi Note 6 Pro (tulip) Gianluca Boiano
@ 2026-01-21 12:42 ` Konrad Dybcio
2026-01-21 20:30 ` Gianluca Boiano
2026-01-22 17:12 ` Alexey Minnekhanov
0 siblings, 2 replies; 28+ messages in thread
From: Konrad Dybcio @ 2026-01-21 12:42 UTC (permalink / raw)
To: Gianluca Boiano, linux-arm-msm, devicetree
Cc: andersson, konradybcio, krzk+dt, conor+dt, robh, david
On 1/20/26 7:00 PM, Gianluca Boiano wrote:
> Add initial device tree support for the Xiaomi Redmi Note 6 Pro
> (codename: tulip), a smartphone based on Qualcomm SDM636 SoC with
> 4GB RAM and a 6.26" 1080x2280 display.
>
> This enables:
> - Booting to a framebuffer console
> - USB support
> - Hall effect sensor
> - Battery monitoring
> - Charging (pm660_charger)
> - Status LED (pm660l_lpg)
>
> Signed-off-by: Gianluca Boiano <morf3089@gmail.com>
> ---
[...]
> + reserved-memory {
> + ramoops@a0000000 {
> + compatible = "ramoops";
> + reg = <0x0 0xa0000000 0x0 0x400000>;
This is almost the same as all others, excluding platina
If you think it's beneficial for your "ecosystem" (with e.g. a recovery
or major custom ROM kernel), you can unify these definitions since it's
all configurable anyway
> + console-size = <0x20000>;
> + record-size = <0x20000>;
> + ftrace-size = <0x0>;
> + pmsg-size = <0x20000>;
> + };
> + };
> +};
> +
> +&framebuffer0 {
> + width = <1080>;
> + height = <2280>;
> + stride = <(1080 * 4)>;
> +
> + status = "okay";
> +};
> +
> +&gpio_hall_sensor {
> + status = "okay";
> +};
Seems like all of the devices except A2 use this definition, maybe flip
it around
> +
> +&pm660_charger {
> + monitored-battery = <&battery>;
> +
> + status = "okay";
> +};
This is present on all of them
[...]
> +&pm660l_wled {
> + status = "okay";
> +};
This seems to as well
> +
> +&rpm_requests {
> + regulators-0 {
> + compatible = "qcom,rpm-pm660l-regulators";
> +
> + vdd_s1-supply = <&vph_pwr>;
> + vdd_s2-supply = <&vph_pwr>;
> + vdd_s3_s4-supply = <&vph_pwr>;
> + vdd_s5-supply = <&vph_pwr>;
> + vdd_s6-supply = <&vph_pwr>;
> +
> + vdd_l1_l9_l10-supply = <&vreg_s2b_1p05>;
> + vdd_l2-supply = <&vreg_bob>;
> + vdd_l3_l5_l7_l8-supply = <&vreg_bob>;
> + vdd_l4_l6-supply = <&vreg_bob>;
> + vdd_bob-supply = <&vph_pwr>;
> +
> + vreg_s1b_1p125: s1 {
Please diff the regulator settings, they're likely mostly common
[...]
> +&sdhc_2 {
> + status = "okay";
> +};
> +
> +&tlmm {
> + gpio-reserved-ranges = <8 4>; /* Fingerprint SPI */
> +};
This setting is common to all of them too
Konrad
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH 2/7] arm64: dts: qcom: sdm660: add common Xiaomi SDM636/SDM660 include file
2026-01-21 12:35 ` Konrad Dybcio
@ 2026-01-21 20:30 ` Gianluca Boiano
0 siblings, 0 replies; 28+ messages in thread
From: Gianluca Boiano @ 2026-01-21 20:30 UTC (permalink / raw)
To: konrad.dybcio; +Cc: linux-arm-msm, devicetree
On Tue, Jan 21, 2026, Konrad Dybcio wrote:
> Copyright year "2022" is odd for refactored code
> Missing copyright attribution from Dang
You're right, I'll fix the copyright header in v2:
Copyright (c) 2020, Alexey Minnekhanov <alexey.min@gmail.com>
Copyright (c) 2021, Dang Huynh <danct12@riseup.net>
Copyright (c) 2026, Gianluca Boiano <morf3089@gmail.com>
Gianluca
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH 3/7] arm64: dts: qcom: sdm660-xiaomi-lavender: fix regulator and SD settings
2026-01-21 11:27 ` Konrad Dybcio
@ 2026-01-21 20:30 ` Gianluca Boiano
2026-01-22 11:40 ` Konrad Dybcio
2026-01-22 16:44 ` Alexey Minnekhanov
1 sibling, 1 reply; 28+ messages in thread
From: Gianluca Boiano @ 2026-01-21 20:30 UTC (permalink / raw)
To: konrad.dybcio; +Cc: linux-arm-msm, devicetree
On Tue, Jan 21, 2026, Konrad Dybcio wrote:
> Why regulator-always-on for l3b?
This regulator powers the touchscreen. Without always-on, display
initialization fails during boot. This matches downstream behavior.
I can add a comment explaining this if preferred.
> Why isn't sdhc_2 enabled globally in common?
jasmine and platina don't have SD card slots, so enabling sdhc_2 globally
would be incorrect. Only tulip, whyred, and lavender have SD card support.
Gianluca
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH 4/7] arm64: dts: qcom: add device tree for Xiaomi Redmi Note 6 Pro (tulip)
2026-01-21 12:42 ` Konrad Dybcio
@ 2026-01-21 20:30 ` Gianluca Boiano
2026-01-22 17:12 ` Alexey Minnekhanov
1 sibling, 0 replies; 28+ messages in thread
From: Gianluca Boiano @ 2026-01-21 20:30 UTC (permalink / raw)
To: konrad.dybcio; +Cc: linux-arm-msm, devicetree
On Tue, Jan 21, 2026, Konrad Dybcio wrote:
> Consolidate ramoops, hall sensor, pm660_charger, pm660l_wled, regulators
Good suggestions. For v2 I will:
1. Move ramoops to common with default configuration
2. Enable hall sensor by default in common, disable in devices without it
3. Move pm660_charger and pm660l_wled enable to common
4. Move common gpio-reserved-ranges to common dtsi
5. Compare and consolidate regulator settings where identical
sdhc_2 status must remain per-device since jasmine/platina lack SD slots.
Thanks for the review!
Gianluca
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH 0/7] arm64: dts: qcom: Add Xiaomi SDM636/SDM660 devices
2026-01-20 18:00 [PATCH 0/7] arm64: dts: qcom: add support for Xiaomi SDM636/SDM660 devices Gianluca Boiano
` (6 preceding siblings ...)
2026-01-20 18:00 ` [PATCH 7/7] arm64: dts: qcom: add device tree for Xiaomi Mi 8 Lite (platina) Gianluca Boiano
@ 2026-01-21 21:02 ` Gianluca Boiano
7 siblings, 0 replies; 28+ messages in thread
From: Gianluca Boiano @ 2026-01-21 21:02 UTC (permalink / raw)
To: linux-arm-msm; +Cc: devicetree, konrad.dybcio, krzysztof.kozlowski, alexey.min
Thanks everyone for the reviews!
v2 is in progress addressing:
- Konrad's consolidation suggestions (ramoops, hall sensor, pm660_charger,
pm660l_wled, gpio-reserved-ranges moved to common dtsi)
- Fixed copyright attribution in common dtsi
- Added Co-developed-by for Alexey Minnekhanov's lavender regulator work
- Added comments explaining l3b regulator-always-on (touchscreen power)
Will send v2 after allowing time for any additional feedback on v1.
Gianluca
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH 3/7] arm64: dts: qcom: sdm660-xiaomi-lavender: fix regulator and SD settings
2026-01-21 20:30 ` Gianluca Boiano
@ 2026-01-22 11:40 ` Konrad Dybcio
2026-01-22 16:34 ` Alexey Minnekhanov
0 siblings, 1 reply; 28+ messages in thread
From: Konrad Dybcio @ 2026-01-22 11:40 UTC (permalink / raw)
To: Gianluca Boiano; +Cc: linux-arm-msm, devicetree
On 1/21/26 9:30 PM, Gianluca Boiano wrote:
> On Tue, Jan 21, 2026, Konrad Dybcio wrote:
>> Why regulator-always-on for l3b?
>
> This regulator powers the touchscreen. Without always-on, display
> initialization fails during boot. This matches downstream behavior.
> I can add a comment explaining this if preferred.
Is there a chance it simply needs to be power sequenced in a specific
order vs the display itself? (seed drm_panel_add_follower())
>> Why isn't sdhc_2 enabled globally in common?
>
> jasmine and platina don't have SD card slots, so enabling sdhc_2 globally
> would be incorrect. Only tulip, whyred, and lavender have SD card support.
I overlooked that, thanks
Konrad
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH 3/7] arm64: dts: qcom: sdm660-xiaomi-lavender: fix regulator and SD settings
2026-01-22 11:40 ` Konrad Dybcio
@ 2026-01-22 16:34 ` Alexey Minnekhanov
2026-01-22 20:47 ` Konrad Dybcio
0 siblings, 1 reply; 28+ messages in thread
From: Alexey Minnekhanov @ 2026-01-22 16:34 UTC (permalink / raw)
To: Konrad Dybcio, Gianluca Boiano; +Cc: linux-arm-msm, devicetree
On 22.01.2026 14:40, Konrad Dybcio wrote:
> On 1/21/26 9:30 PM, Gianluca Boiano wrote:
>> On Tue, Jan 21, 2026, Konrad Dybcio wrote:
>>> Why regulator-always-on for l3b?
>>
>> This regulator powers the touchscreen. Without always-on, display
>> initialization fails during boot. This matches downstream behavior.
>> I can add a comment explaining this if preferred.
>
> Is there a chance it simply needs to be power sequenced in a specific
> order vs the display itself? (seed drm_panel_add_follower())
>
According to my schematics for e.g lavender, vreg_l3b_3p3 does not power
anything directly controlled by HLOS (Linux), it seems to be connected
to p-sensor only, and goes to bottom board.
The change is done by vendor (Xiaomi) and as far as I remember is there
for every xiaomi-sdm660 device [1].
I'm guessing source for this change is [2] and this patch lacks my
sign-off and explanation.
Does this work now as is without reordering vreg_bob to the top of the
regulators list though? It did not work in this form previously.
[1]
https://github.com/MiCode/Xiaomi_Kernel_OpenSource/commit/b16ba644a26986cc4cc3cf526eb497b9fa91a043
[2]
https://github.com/sdm660-mainline/linux/commit/d54c8cfe3d76fa309b7e71fce1973176bdc095dd
--
Regards,
Alexey Minnekhanov
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH 3/7] arm64: dts: qcom: sdm660-xiaomi-lavender: fix regulator and SD settings
2026-01-21 11:27 ` Konrad Dybcio
2026-01-21 20:30 ` Gianluca Boiano
@ 2026-01-22 16:44 ` Alexey Minnekhanov
2026-01-23 9:26 ` Konrad Dybcio
1 sibling, 1 reply; 28+ messages in thread
From: Alexey Minnekhanov @ 2026-01-22 16:44 UTC (permalink / raw)
To: Konrad Dybcio, Gianluca Boiano, linux-arm-msm, devicetree
Cc: andersson, konradybcio, krzk+dt, conor+dt, robh, david
On 21.01.2026 14:27, Konrad Dybcio wrote:
> On 1/20/26 7:00 PM, Gianluca Boiano wrote:
>> Fix regulator configurations to ensure stable operation:
>> - vreg_l10a_1p8: Add regulator-system-load of 14000uA for proper USB PHY
>> PLL operation
>
> The driver needs to be fixed instead, as it should perform a
> regulator_set_load()
Also change done by me in [1] with more detailed explanation:
Since the commit f05ab10 ("arm64: dts: qcom: sdm660-lavender:
Add missing USB phy supply") previously untouched by Linux regulator
l10a is now used, but it exposed a bug from initial porting: when
booting with USB cable inserted, or booting without cable and
inserting it later, board reboots.
Downstream vendor device tree has this:
rpm-regulator-ldoa10 {
status = "okay";
pm660_l10: regulator-l10 {
proxy-supply = <&pm660_l10>;
qcom,proxy-consumer-enable;
qcom,proxy-consumer-current = <14000>;
regulator-min-microvolt = <1780000>;
regulator-max-microvolt = <1950000>;
status = "okay";
};
};
IIRC this qcom,proxy-consumer stuff is adding fake device that uses this
regulator, but does nothing else except requesting specified voltage or
current (in this case), until "real consumer" probes or something like
that. The same can be achieved by simply adding regulator-system-load,
and device stops rebooting when USB cable is inserted.
This is also needed for all xiaomi-sdm660 boards, but not e.g on
sdm630-sony ones.
I'm thinking maybe it is better to have regulators in sdm660-xiaomi-
common.dtsi after all. The setup is mostly the same for them.
[1]
https://github.com/sdm660-mainline/linux/commit/7121e17ee284bb6026c25d3f643fd020fa959877
--
Regards,
Alexey Minnekhanov
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH 4/7] arm64: dts: qcom: add device tree for Xiaomi Redmi Note 6 Pro (tulip)
2026-01-21 12:42 ` Konrad Dybcio
2026-01-21 20:30 ` Gianluca Boiano
@ 2026-01-22 17:12 ` Alexey Minnekhanov
2026-01-22 20:45 ` Konrad Dybcio
1 sibling, 1 reply; 28+ messages in thread
From: Alexey Minnekhanov @ 2026-01-22 17:12 UTC (permalink / raw)
To: Konrad Dybcio, Gianluca Boiano, linux-arm-msm, devicetree
Cc: andersson, konradybcio, krzk+dt, conor+dt, robh, david
On 21.01.2026 15:42, Konrad Dybcio wrote:
> On 1/20/26 7:00 PM, Gianluca Boiano wrote:
>> Add initial device tree support for the Xiaomi Redmi Note 6 Pro
>> (codename: tulip), a smartphone based on Qualcomm SDM636 SoC with
>> 4GB RAM and a 6.26" 1080x2280 display.
>>
>> This enables:
>> - Booting to a framebuffer console
>> - USB support
>> - Hall effect sensor
>> - Battery monitoring
>> - Charging (pm660_charger)
>> - Status LED (pm660l_lpg)
>>
>> Signed-off-by: Gianluca Boiano <morf3089@gmail.com>
>> ---
>> +&pm660l_wled {
>> + status = "okay";
>> +};
>
> This seems to as well
There is a tablet named Mi PAD 4 (xiaomi-clover) which is not
included in this series, but it uses separate backlight driver
and does not use WLED.
>> +
>> +&rpm_requests {
>> + regulators-0 {
>> + compatible = "qcom,rpm-pm660l-regulators";
>> +
>> + vdd_s1-supply = <&vph_pwr>;
>> + vdd_s2-supply = <&vph_pwr>;
>> + vdd_s3_s4-supply = <&vph_pwr>;
>> + vdd_s5-supply = <&vph_pwr>;
>> + vdd_s6-supply = <&vph_pwr>;
>> +
>> + vdd_l1_l9_l10-supply = <&vreg_s2b_1p05>;
>> + vdd_l2-supply = <&vreg_bob>;
>> + vdd_l3_l5_l7_l8-supply = <&vreg_bob>;
>> + vdd_l4_l6-supply = <&vreg_bob>;
>> + vdd_bob-supply = <&vph_pwr>;
>> +
>> + vreg_s1b_1p125: s1 {
>
> Please diff the regulator settings, they're likely mostly common
>
It should be doable IMO.
>> +
>> +&tlmm {
>> + gpio-reserved-ranges = <8 4>; /* Fingerprint SPI */
>> +};
>
> This setting is common to all of them too
Once again clover is exception here, all 3 variants of clover
are using
gpio-reserved-ranges = <0 4>;
I think it might be better to leave this setting to board files?
--
Regards,
Alexey Minnekhanov
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH 4/7] arm64: dts: qcom: add device tree for Xiaomi Redmi Note 6 Pro (tulip)
2026-01-22 17:12 ` Alexey Minnekhanov
@ 2026-01-22 20:45 ` Konrad Dybcio
0 siblings, 0 replies; 28+ messages in thread
From: Konrad Dybcio @ 2026-01-22 20:45 UTC (permalink / raw)
To: Alexey Minnekhanov, Gianluca Boiano, linux-arm-msm, devicetree
Cc: andersson, konradybcio, krzk+dt, conor+dt, robh, david
On 1/22/26 6:12 PM, Alexey Minnekhanov wrote:
> On 21.01.2026 15:42, Konrad Dybcio wrote:
>> On 1/20/26 7:00 PM, Gianluca Boiano wrote:
>>> Add initial device tree support for the Xiaomi Redmi Note 6 Pro
>>> (codename: tulip), a smartphone based on Qualcomm SDM636 SoC with
>>> 4GB RAM and a 6.26" 1080x2280 display.
>>>
>>> This enables:
>>> - Booting to a framebuffer console
>>> - USB support
>>> - Hall effect sensor
>>> - Battery monitoring
>>> - Charging (pm660_charger)
>>> - Status LED (pm660l_lpg)
>>>
>>> Signed-off-by: Gianluca Boiano <morf3089@gmail.com>
>>> ---
[...]
> Once again clover is exception here, all 3 variants of clover
> are using
>
> gpio-reserved-ranges = <0 4>;
>
> I think it might be better to leave this setting to board files?
Sure
Konrad
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH 3/7] arm64: dts: qcom: sdm660-xiaomi-lavender: fix regulator and SD settings
2026-01-22 16:34 ` Alexey Minnekhanov
@ 2026-01-22 20:47 ` Konrad Dybcio
0 siblings, 0 replies; 28+ messages in thread
From: Konrad Dybcio @ 2026-01-22 20:47 UTC (permalink / raw)
To: Alexey Minnekhanov, Gianluca Boiano; +Cc: linux-arm-msm, devicetree
On 1/22/26 5:34 PM, Alexey Minnekhanov wrote:
> On 22.01.2026 14:40, Konrad Dybcio wrote:
>> On 1/21/26 9:30 PM, Gianluca Boiano wrote:
>>> On Tue, Jan 21, 2026, Konrad Dybcio wrote:
>>>> Why regulator-always-on for l3b?
>>>
>>> This regulator powers the touchscreen. Without always-on, display
>>> initialization fails during boot. This matches downstream behavior.
>>> I can add a comment explaining this if preferred.
>>
>> Is there a chance it simply needs to be power sequenced in a specific
>> order vs the display itself? (seed drm_panel_add_follower())
>>
>
> According to my schematics for e.g lavender, vreg_l3b_3p3 does not power
> anything directly controlled by HLOS (Linux), it seems to be connected
> to p-sensor only, and goes to bottom board.
>
> The change is done by vendor (Xiaomi) and as far as I remember is there
> for every xiaomi-sdm660 device [1].
I wouldn't be too surprised, e.g. sdm845-samsung-starqtlechn has a
fake supply hooked up to slpi, as it likely powers some sensors which
are governed by it
Konrad
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH 3/7] arm64: dts: qcom: sdm660-xiaomi-lavender: fix regulator and SD settings
2026-01-22 16:44 ` Alexey Minnekhanov
@ 2026-01-23 9:26 ` Konrad Dybcio
2026-01-23 20:11 ` Alexey Minnekhanov
0 siblings, 1 reply; 28+ messages in thread
From: Konrad Dybcio @ 2026-01-23 9:26 UTC (permalink / raw)
To: Alexey Minnekhanov, Gianluca Boiano, linux-arm-msm, devicetree,
Dmitry Baryshkov
Cc: andersson, konradybcio, krzk+dt, conor+dt, robh, david
On 1/22/26 5:44 PM, Alexey Minnekhanov wrote:
> On 21.01.2026 14:27, Konrad Dybcio wrote:
>> On 1/20/26 7:00 PM, Gianluca Boiano wrote:
>>> Fix regulator configurations to ensure stable operation:
>>> - vreg_l10a_1p8: Add regulator-system-load of 14000uA for proper USB PHY
>>> PLL operation
>>
>> The driver needs to be fixed instead, as it should perform a
>> regulator_set_load()
>
>
> Also change done by me in [1] with more detailed explanation:
>
> Since the commit f05ab10 ("arm64: dts: qcom: sdm660-lavender:
> Add missing USB phy supply") previously untouched by Linux regulator
> l10a is now used, but it exposed a bug from initial porting: when
> booting with USB cable inserted, or booting without cable and
> inserting it later, board reboots.
FYI this shouldn't be required with the upstream driver, I don't think
the core calls .set_load(0) and RPM isn't notified of a current
requirement change unless that happens (qcom_smd-regulator.c)
In the power grid, I see (current values representing the peak):
-- USB2
VDDA (3.1 V - vdda-phy-dpdm-supply) - 60mA
VDDA (1.8 V - vdda-pll-supply) - 30mA
VDD (?) - 11.4 mA
VDDA_DVDD (?) - 35 mA
-- USB3
VDDA (1.8 V) - 14 mA
VDDA_CORE - 68.6 mA
+Dmitry poked at 660 in the past
Konrad
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH 3/7] arm64: dts: qcom: sdm660-xiaomi-lavender: fix regulator and SD settings
2026-01-23 9:26 ` Konrad Dybcio
@ 2026-01-23 20:11 ` Alexey Minnekhanov
2026-01-25 11:10 ` Dmitry Baryshkov
0 siblings, 1 reply; 28+ messages in thread
From: Alexey Minnekhanov @ 2026-01-23 20:11 UTC (permalink / raw)
To: Konrad Dybcio, Gianluca Boiano, linux-arm-msm, devicetree,
Dmitry Baryshkov
Cc: andersson, konradybcio, krzk+dt, conor+dt, robh, david
On 23.01.2026 12:26, Konrad Dybcio wrote:
> On 1/22/26 5:44 PM, Alexey Minnekhanov wrote:
>> On 21.01.2026 14:27, Konrad Dybcio wrote:
>>> On 1/20/26 7:00 PM, Gianluca Boiano wrote:
>>>> Fix regulator configurations to ensure stable operation:
>>>> - vreg_l10a_1p8: Add regulator-system-load of 14000uA for proper USB PHY
>>>> PLL operation
>>>
>>> The driver needs to be fixed instead, as it should perform a
>>> regulator_set_load()
>>
>>
>> Also change done by me in [1] with more detailed explanation:
>>
>> Since the commit f05ab10 ("arm64: dts: qcom: sdm660-lavender:
>> Add missing USB phy supply") previously untouched by Linux regulator
>> l10a is now used, but it exposed a bug from initial porting: when
>> booting with USB cable inserted, or booting without cable and
>> inserting it later, board reboots.
>
> FYI this shouldn't be required with the upstream driver, I don't think
> the core calls .set_load(0) and RPM isn't notified of a current
> requirement change unless that happens (qcom_smd-regulator.c)
>
> In the power grid, I see (current values representing the peak):
>
> -- USB2
> VDDA (3.1 V - vdda-phy-dpdm-supply) - 60mA
> VDDA (1.8 V - vdda-pll-supply) - 30mA
>
> VDD (?) - 11.4 mA
> VDDA_DVDD (?) - 35 mA
>
> -- USB3
> VDDA (1.8 V) - 14 mA
> VDDA_CORE - 68.6 mA
>
> +Dmitry poked at 660 in the past
>
> Konrad
>
This is not needed e.g on sdm630-sony-nile-pioneer, it's booting fine
without system-load with USB cable inserted. Maybe IFC board doesn't
require this too. Seems to be xiaomi specific thing again?
Alternative is to not touch L10A regulator (comment out vdda-pll-supply
from qusb2phy0 node and face the "phy@c012000: 'vdda-pll-supply' is a
required property" dtbs-check error again. Which we don't want to do of
course. And schematics say that vreg_l10a_1p8 is connected to at least:
VDD_USB1_HS_1P8, VDD_USB2_HS_1P8, QFPROM_PRG, VDDA_APC1_CS_1P8,
VDD_PLL2_1, VDD_PLL2_2.
--
Regards,
Alexey Minnekhanov
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH 3/7] arm64: dts: qcom: sdm660-xiaomi-lavender: fix regulator and SD settings
2026-01-23 20:11 ` Alexey Minnekhanov
@ 2026-01-25 11:10 ` Dmitry Baryshkov
2026-01-28 13:24 ` Konrad Dybcio
0 siblings, 1 reply; 28+ messages in thread
From: Dmitry Baryshkov @ 2026-01-25 11:10 UTC (permalink / raw)
To: Alexey Minnekhanov
Cc: Konrad Dybcio, Gianluca Boiano, linux-arm-msm, devicetree,
andersson, konradybcio, krzk+dt, conor+dt, robh, david
On Fri, Jan 23, 2026 at 11:11:50PM +0300, Alexey Minnekhanov wrote:
> On 23.01.2026 12:26, Konrad Dybcio wrote:
> > On 1/22/26 5:44 PM, Alexey Minnekhanov wrote:
> > > On 21.01.2026 14:27, Konrad Dybcio wrote:
> > > > On 1/20/26 7:00 PM, Gianluca Boiano wrote:
> > > > > Fix regulator configurations to ensure stable operation:
> > > > > - vreg_l10a_1p8: Add regulator-system-load of 14000uA for proper USB PHY
> > > > > PLL operation
> > > >
> > > > The driver needs to be fixed instead, as it should perform a
> > > > regulator_set_load()
> > >
> > >
> > > Also change done by me in [1] with more detailed explanation:
> > >
> > > Since the commit f05ab10 ("arm64: dts: qcom: sdm660-lavender:
> > > Add missing USB phy supply") previously untouched by Linux regulator
> > > l10a is now used, but it exposed a bug from initial porting: when
> > > booting with USB cable inserted, or booting without cable and
> > > inserting it later, board reboots.
> >
> > FYI this shouldn't be required with the upstream driver, I don't think
> > the core calls .set_load(0) and RPM isn't notified of a current
> > requirement change unless that happens (qcom_smd-regulator.c)
> >
> > In the power grid, I see (current values representing the peak):
> >
> > -- USB2
> > VDDA (3.1 V - vdda-phy-dpdm-supply) - 60mA
> > VDDA (1.8 V - vdda-pll-supply) - 30mA
> >
> > VDD (?) - 11.4 mA
> > VDDA_DVDD (?) - 35 mA
> >
> > -- USB3
> > VDDA (1.8 V) - 14 mA
> > VDDA_CORE - 68.6 mA
> >
> > +Dmitry poked at 660 in the past
> >
> > Konrad
> >
>
> This is not needed e.g on sdm630-sony-nile-pioneer, it's booting fine
> without system-load with USB cable inserted. Maybe IFC board doesn't
> require this too. Seems to be xiaomi specific thing again?
>
> Alternative is to not touch L10A regulator (comment out vdda-pll-supply
> from qusb2phy0 node and face the "phy@c012000: 'vdda-pll-supply' is a
> required property" dtbs-check error again. Which we don't want to do of
> course. And schematics say that vreg_l10a_1p8 is connected to at least:
> VDD_USB1_HS_1P8, VDD_USB2_HS_1P8, QFPROM_PRG, VDDA_APC1_CS_1P8, VDD_PLL2_1,
> VDD_PLL2_2.
It might be that there is an issue because of it being used for APC1
too. I don't observe any issues on my IFC6560 board (where it is also
connected to APC1).
I'd suggest adding a dummy fixed regulator node as L10A and documenting
that it is not to be touched by Linux on this device). We do this for
some other "system" regulators on other devices.
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH 3/7] arm64: dts: qcom: sdm660-xiaomi-lavender: fix regulator and SD settings
2026-01-25 11:10 ` Dmitry Baryshkov
@ 2026-01-28 13:24 ` Konrad Dybcio
2026-01-28 13:52 ` Dmitry Baryshkov
0 siblings, 1 reply; 28+ messages in thread
From: Konrad Dybcio @ 2026-01-28 13:24 UTC (permalink / raw)
To: Dmitry Baryshkov, Alexey Minnekhanov
Cc: Gianluca Boiano, linux-arm-msm, devicetree, andersson,
konradybcio, krzk+dt, conor+dt, robh, david
On 1/25/26 12:10 PM, Dmitry Baryshkov wrote:
> On Fri, Jan 23, 2026 at 11:11:50PM +0300, Alexey Minnekhanov wrote:
>> On 23.01.2026 12:26, Konrad Dybcio wrote:
>>> On 1/22/26 5:44 PM, Alexey Minnekhanov wrote:
>>>> On 21.01.2026 14:27, Konrad Dybcio wrote:
>>>>> On 1/20/26 7:00 PM, Gianluca Boiano wrote:
>>>>>> Fix regulator configurations to ensure stable operation:
>>>>>> - vreg_l10a_1p8: Add regulator-system-load of 14000uA for proper USB PHY
>>>>>> PLL operation
>>>>>
>>>>> The driver needs to be fixed instead, as it should perform a
>>>>> regulator_set_load()
>>>>
>>>>
>>>> Also change done by me in [1] with more detailed explanation:
>>>>
>>>> Since the commit f05ab10 ("arm64: dts: qcom: sdm660-lavender:
>>>> Add missing USB phy supply") previously untouched by Linux regulator
>>>> l10a is now used, but it exposed a bug from initial porting: when
>>>> booting with USB cable inserted, or booting without cable and
>>>> inserting it later, board reboots.
>>>
>>> FYI this shouldn't be required with the upstream driver, I don't think
>>> the core calls .set_load(0) and RPM isn't notified of a current
>>> requirement change unless that happens (qcom_smd-regulator.c)
>>>
>>> In the power grid, I see (current values representing the peak):
>>>
>>> -- USB2
>>> VDDA (3.1 V - vdda-phy-dpdm-supply) - 60mA
>>> VDDA (1.8 V - vdda-pll-supply) - 30mA
>>>
>>> VDD (?) - 11.4 mA
>>> VDDA_DVDD (?) - 35 mA
>>>
>>> -- USB3
>>> VDDA (1.8 V) - 14 mA
>>> VDDA_CORE - 68.6 mA
>>>
>>> +Dmitry poked at 660 in the past
>>>
>>> Konrad
>>>
>>
>> This is not needed e.g on sdm630-sony-nile-pioneer, it's booting fine
>> without system-load with USB cable inserted. Maybe IFC board doesn't
>> require this too. Seems to be xiaomi specific thing again?
>>
>> Alternative is to not touch L10A regulator (comment out vdda-pll-supply
>> from qusb2phy0 node and face the "phy@c012000: 'vdda-pll-supply' is a
>> required property" dtbs-check error again. Which we don't want to do of
>> course. And schematics say that vreg_l10a_1p8 is connected to at least:
>> VDD_USB1_HS_1P8, VDD_USB2_HS_1P8, QFPROM_PRG, VDDA_APC1_CS_1P8, VDD_PLL2_1,
>> VDD_PLL2_2.
>
> It might be that there is an issue because of it being used for APC1
> too. I don't observe any issues on my IFC6560 board (where it is also
> connected to APC1).
Wait, what? The same line going to external ports and the CPU supply!?
> I'd suggest adding a dummy fixed regulator node as L10A and documenting
> that it is not to be touched by Linux on this device). We do this for
> some other "system" regulators on other devices.
I think that system-load may be fitting, but it needs a comment
Konrad
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH 3/7] arm64: dts: qcom: sdm660-xiaomi-lavender: fix regulator and SD settings
2026-01-28 13:24 ` Konrad Dybcio
@ 2026-01-28 13:52 ` Dmitry Baryshkov
0 siblings, 0 replies; 28+ messages in thread
From: Dmitry Baryshkov @ 2026-01-28 13:52 UTC (permalink / raw)
To: Konrad Dybcio
Cc: Alexey Minnekhanov, Gianluca Boiano, linux-arm-msm, devicetree,
andersson, konradybcio, krzk+dt, conor+dt, robh, david
On Wed, 28 Jan 2026 at 15:24, Konrad Dybcio
<konrad.dybcio@oss.qualcomm.com> wrote:
>
> On 1/25/26 12:10 PM, Dmitry Baryshkov wrote:
> > On Fri, Jan 23, 2026 at 11:11:50PM +0300, Alexey Minnekhanov wrote:
> >> On 23.01.2026 12:26, Konrad Dybcio wrote:
> >>> On 1/22/26 5:44 PM, Alexey Minnekhanov wrote:
> >>>> On 21.01.2026 14:27, Konrad Dybcio wrote:
> >>>>> On 1/20/26 7:00 PM, Gianluca Boiano wrote:
> >>>>>> Fix regulator configurations to ensure stable operation:
> >>>>>> - vreg_l10a_1p8: Add regulator-system-load of 14000uA for proper USB PHY
> >>>>>> PLL operation
> >>>>>
> >>>>> The driver needs to be fixed instead, as it should perform a
> >>>>> regulator_set_load()
> >>>>
> >>>>
> >>>> Also change done by me in [1] with more detailed explanation:
> >>>>
> >>>> Since the commit f05ab10 ("arm64: dts: qcom: sdm660-lavender:
> >>>> Add missing USB phy supply") previously untouched by Linux regulator
> >>>> l10a is now used, but it exposed a bug from initial porting: when
> >>>> booting with USB cable inserted, or booting without cable and
> >>>> inserting it later, board reboots.
> >>>
> >>> FYI this shouldn't be required with the upstream driver, I don't think
> >>> the core calls .set_load(0) and RPM isn't notified of a current
> >>> requirement change unless that happens (qcom_smd-regulator.c)
> >>>
> >>> In the power grid, I see (current values representing the peak):
> >>>
> >>> -- USB2
> >>> VDDA (3.1 V - vdda-phy-dpdm-supply) - 60mA
> >>> VDDA (1.8 V - vdda-pll-supply) - 30mA
> >>>
> >>> VDD (?) - 11.4 mA
> >>> VDDA_DVDD (?) - 35 mA
> >>>
> >>> -- USB3
> >>> VDDA (1.8 V) - 14 mA
> >>> VDDA_CORE - 68.6 mA
> >>>
> >>> +Dmitry poked at 660 in the past
> >>>
> >>> Konrad
> >>>
> >>
> >> This is not needed e.g on sdm630-sony-nile-pioneer, it's booting fine
> >> without system-load with USB cable inserted. Maybe IFC board doesn't
> >> require this too. Seems to be xiaomi specific thing again?
> >>
> >> Alternative is to not touch L10A regulator (comment out vdda-pll-supply
> >> from qusb2phy0 node and face the "phy@c012000: 'vdda-pll-supply' is a
> >> required property" dtbs-check error again. Which we don't want to do of
> >> course. And schematics say that vreg_l10a_1p8 is connected to at least:
> >> VDD_USB1_HS_1P8, VDD_USB2_HS_1P8, QFPROM_PRG, VDDA_APC1_CS_1P8, VDD_PLL2_1,
> >> VDD_PLL2_2.
> >
> > It might be that there is an issue because of it being used for APC1
> > too. I don't observe any issues on my IFC6560 board (where it is also
> > connected to APC1).
>
> Wait, what? The same line going to external ports and the CPU supply!?
Yes
>
> > I'd suggest adding a dummy fixed regulator node as L10A and documenting
> > that it is not to be touched by Linux on this device). We do this for
> > some other "system" regulators on other devices.
>
> I think that system-load may be fitting, but it needs a comment
I assume, it might be RPM killing access to the system regulator.
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 28+ messages in thread
end of thread, other threads:[~2026-01-28 13:52 UTC | newest]
Thread overview: 28+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-20 18:00 [PATCH 0/7] arm64: dts: qcom: add support for Xiaomi SDM636/SDM660 devices Gianluca Boiano
2026-01-20 18:00 ` [PATCH 1/7] dt-bindings: arm: qcom: add " Gianluca Boiano
2026-01-21 8:14 ` Krzysztof Kozlowski
2026-01-20 18:00 ` [PATCH 2/7] arm64: dts: qcom: sdm660: add common Xiaomi SDM636/SDM660 include file Gianluca Boiano
2026-01-21 12:35 ` Konrad Dybcio
2026-01-21 20:30 ` Gianluca Boiano
2026-01-20 18:00 ` [PATCH 3/7] arm64: dts: qcom: sdm660-xiaomi-lavender: fix regulator and SD settings Gianluca Boiano
2026-01-21 11:27 ` Konrad Dybcio
2026-01-21 20:30 ` Gianluca Boiano
2026-01-22 11:40 ` Konrad Dybcio
2026-01-22 16:34 ` Alexey Minnekhanov
2026-01-22 20:47 ` Konrad Dybcio
2026-01-22 16:44 ` Alexey Minnekhanov
2026-01-23 9:26 ` Konrad Dybcio
2026-01-23 20:11 ` Alexey Minnekhanov
2026-01-25 11:10 ` Dmitry Baryshkov
2026-01-28 13:24 ` Konrad Dybcio
2026-01-28 13:52 ` Dmitry Baryshkov
2026-01-21 12:36 ` Konrad Dybcio
2026-01-20 18:00 ` [PATCH 4/7] arm64: dts: qcom: add device tree for Xiaomi Redmi Note 6 Pro (tulip) Gianluca Boiano
2026-01-21 12:42 ` Konrad Dybcio
2026-01-21 20:30 ` Gianluca Boiano
2026-01-22 17:12 ` Alexey Minnekhanov
2026-01-22 20:45 ` Konrad Dybcio
2026-01-20 18:00 ` [PATCH 5/7] arm64: dts: qcom: add device tree for Xiaomi Redmi Note 5 Pro (whyred) Gianluca Boiano
2026-01-20 18:00 ` [PATCH 6/7] arm64: dts: qcom: add device tree for Xiaomi Mi A2 (jasmine) Gianluca Boiano
2026-01-20 18:00 ` [PATCH 7/7] arm64: dts: qcom: add device tree for Xiaomi Mi 8 Lite (platina) Gianluca Boiano
2026-01-21 21:02 ` [PATCH 0/7] arm64: dts: qcom: Add Xiaomi SDM636/SDM660 devices Gianluca Boiano
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox