linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/8] Improve support for Xiaomi Redmi Note 7
@ 2021-11-11  3:16 Dang Huynh
  2021-11-11  3:16 ` [PATCH v3 1/8] arm64: dts: qcom: sdm630: Assign numbers to eMMC and SD Dang Huynh
                   ` (9 more replies)
  0 siblings, 10 replies; 17+ messages in thread
From: Dang Huynh @ 2021-11-11  3:16 UTC (permalink / raw)
  To: Dang Huynh
  Cc: Andy Gross, Bjorn Andersson, Rob Herring, linux-arm-msm,
	devicetree, linux-kernel, Alexey Min, Caleb Connolly,
	Martin Botka, Konrad Dybcio

This series expand the Redmi Note 7 device port to support:
 + Regulators
 + Volume keys
 + eMMC and SD card slot
 + Framebuffer display
 + USB

Changes in v2:
 - Dropped linux,input-type from volume up as 1 is set by default.
 - Dropped gpio-key,wakeup as it's a legacy property name and is
not relevant for a volume button.
 - Rename label cont_splash_mem to framebuffer_mem and change node
name to memory.

Changes in v3:
 - Add voltage range for vph_pwr
 - Move RESIN to PM660 and make PON keys disabled by default 
 - Addressed review comments from Konrad
 - Make Alexey Min the author of the USB patch as he came up with
the patch first on downstream. 

Alexey Min (1):
  arm64: dts: qcom: sdm660-xiaomi-lavender: Add USB

Dang Huynh (7):
  arm64: dts: qcom: sdm630: Assign numbers to eMMC and SD
  arm64: dts: qcom: sdm630-pm660: Move RESIN to pm660 dtsi
  arm64: dts: qcom: sdm660-xiaomi-lavender: Add RPM and fixed regulators
  arm64: dts: qcom: sdm660-xiaomi-lavender: Add PWRKEY and RESIN
  arm64: dts: qcom: sdm660-xiaomi-lavender: Add volume up button
  arm64: dts: qcom: sdm660-xiaomi-lavender: Add eMMC and SD
  arm64: dts: qcom: sdm660-xiaomi-lavender: Enable Simple Framebuffer

 arch/arm64/boot/dts/qcom/pm660.dtsi           |  12 +-
 .../dts/qcom/sdm630-sony-xperia-nile.dtsi     |  16 +-
 arch/arm64/boot/dts/qcom/sdm630.dtsi          |   5 +
 .../boot/dts/qcom/sdm660-xiaomi-lavender.dts  | 383 ++++++++++++++++++
 4 files changed, 407 insertions(+), 9 deletions(-)

-- 
2.33.1


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH v3 1/8] arm64: dts: qcom: sdm630: Assign numbers to eMMC and SD
  2021-11-11  3:16 [PATCH v3 0/8] Improve support for Xiaomi Redmi Note 7 Dang Huynh
@ 2021-11-11  3:16 ` Dang Huynh
  2021-11-11  3:16 ` [PATCH v3 2/8] arm64: dts: qcom: sdm630-pm660: Move RESIN to pm660 dtsi Dang Huynh
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 17+ messages in thread
From: Dang Huynh @ 2021-11-11  3:16 UTC (permalink / raw)
  To: Dang Huynh
  Cc: Andy Gross, Bjorn Andersson, Rob Herring, linux-arm-msm,
	devicetree, linux-kernel, Alexey Min, Caleb Connolly,
	Martin Botka, Konrad Dybcio

This makes eMMC/SD device number consistent.

Reviewed-by: Martin Botka <martin.botka@somainline.org>
Signed-off-by: Dang Huynh <danct12@riseup.net>
---
 arch/arm64/boot/dts/qcom/sdm630.dtsi | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sdm630.dtsi b/arch/arm64/boot/dts/qcom/sdm630.dtsi
index 3e0165bb61c5..b75bb87ed290 100644
--- a/arch/arm64/boot/dts/qcom/sdm630.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm630.dtsi
@@ -19,6 +19,11 @@ / {
 	#address-cells = <2>;
 	#size-cells = <2>;
 
+	aliases {
+		mmc1 = &sdhc_1;
+		mmc2 = &sdhc_2;
+	};
+
 	chosen { };
 
 	clocks {
-- 
2.33.1


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH v3 2/8] arm64: dts: qcom: sdm630-pm660: Move RESIN to pm660 dtsi
  2021-11-11  3:16 [PATCH v3 0/8] Improve support for Xiaomi Redmi Note 7 Dang Huynh
  2021-11-11  3:16 ` [PATCH v3 1/8] arm64: dts: qcom: sdm630: Assign numbers to eMMC and SD Dang Huynh
@ 2021-11-11  3:16 ` Dang Huynh
  2021-11-11 21:16   ` Konrad Dybcio
  2021-11-11  3:16 ` [PATCH v3 3/8] arm64: dts: qcom: sdm660-xiaomi-lavender: Add RPM and fixed regulators Dang Huynh
                   ` (7 subsequent siblings)
  9 siblings, 1 reply; 17+ messages in thread
From: Dang Huynh @ 2021-11-11  3:16 UTC (permalink / raw)
  To: Dang Huynh
  Cc: Andy Gross, Bjorn Andersson, Rob Herring, linux-arm-msm,
	devicetree, linux-kernel, Alexey Min, Caleb Connolly,
	Martin Botka, Konrad Dybcio

It's not worth duplicating the same node over and over again,
so let's keep the common bits in the pm660 DTSI, making only
changing the status and keycode necessary.

Also, disable RESIN/PWR by default just in case if there are
devices that doesn't use them.

Signed-off-by: Dang Huynh <danct12@riseup.net>
---
 arch/arm64/boot/dts/qcom/pm660.dtsi              | 12 +++++++++++-
 .../boot/dts/qcom/sdm630-sony-xperia-nile.dtsi   | 16 ++++++++--------
 2 files changed, 19 insertions(+), 9 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/pm660.dtsi b/arch/arm64/boot/dts/qcom/pm660.dtsi
index d0ef8a1675e2..c482663aad56 100644
--- a/arch/arm64/boot/dts/qcom/pm660.dtsi
+++ b/arch/arm64/boot/dts/qcom/pm660.dtsi
@@ -54,14 +54,24 @@ pon: pon@800 {
 			mode-bootloader = <0x2>;
 			mode-recovery = <0x1>;
 
-			pwrkey {
+			pon_pwrkey: pwrkey {
 				compatible = "qcom,pm8941-pwrkey";
 				interrupts = <0x0 0x8 0 IRQ_TYPE_EDGE_BOTH>;
 				debounce = <15625>;
 				bias-pull-up;
 				linux,code = <KEY_POWER>;
+
+				status = "disabled";
 			};
 
+			pon_resin: resin {
+				compatible = "qcom,pm8941-resin";
+				interrupts = <0x0 0x8 1 IRQ_TYPE_EDGE_BOTH>;
+				debounce = <15625>;
+				bias-pull-up;
+
+				status = "disabled";
+			};
 		};
 
 		pm660_temp: temp-alarm@2400 {
diff --git a/arch/arm64/boot/dts/qcom/sdm630-sony-xperia-nile.dtsi b/arch/arm64/boot/dts/qcom/sdm630-sony-xperia-nile.dtsi
index 11d0a8c1cf35..e90c9ec84675 100644
--- a/arch/arm64/boot/dts/qcom/sdm630-sony-xperia-nile.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm630-sony-xperia-nile.dtsi
@@ -215,14 +215,14 @@ &blsp2_uart1 {
 	/* HCI Bluetooth */
 };
 
-&pon {
-	volup {
-		compatible = "qcom,pm8941-resin";
-		interrupts = <0x0 0x8 1 IRQ_TYPE_EDGE_BOTH>;
-		debounce = <15625>;
-		bias-pull-up;
-		linux,code = <KEY_VOLUMEUP>;
-	};
+&pon_pwrkey {
+	status = "okay";
+};
+
+&pon_resin {
+	status = "okay";
+
+	linux,code = <KEY_VOLUMEUP>;
 };
 
 &qusb2phy {
-- 
2.33.1


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH v3 3/8] arm64: dts: qcom: sdm660-xiaomi-lavender: Add RPM and fixed regulators
  2021-11-11  3:16 [PATCH v3 0/8] Improve support for Xiaomi Redmi Note 7 Dang Huynh
  2021-11-11  3:16 ` [PATCH v3 1/8] arm64: dts: qcom: sdm630: Assign numbers to eMMC and SD Dang Huynh
  2021-11-11  3:16 ` [PATCH v3 2/8] arm64: dts: qcom: sdm630-pm660: Move RESIN to pm660 dtsi Dang Huynh
@ 2021-11-11  3:16 ` Dang Huynh
  2021-11-11 21:33   ` Konrad Dybcio
  2021-11-11  3:16 ` [PATCH v3 4/8] arm64: dts: qcom: sdm660-xiaomi-lavender: Add PWRKEY and RESIN Dang Huynh
                   ` (6 subsequent siblings)
  9 siblings, 1 reply; 17+ messages in thread
From: Dang Huynh @ 2021-11-11  3:16 UTC (permalink / raw)
  To: Dang Huynh
  Cc: Andy Gross, Bjorn Andersson, Rob Herring, linux-arm-msm,
	devicetree, linux-kernel, Alexey Min, Caleb Connolly,
	Martin Botka, Konrad Dybcio

Add most of the RPM PM660/PM660L regulators and the fixed ones,
defining the common electrical part of this platform.

Reviewed-by: Caleb Connolly <caleb@connolly.tech>
Reviewed-by: Konrad Dybcio <konradybcio@gmail.com>
Signed-off-by: Dang Huynh <danct12@riseup.net>
---
 .../boot/dts/qcom/sdm660-xiaomi-lavender.dts  | 296 ++++++++++++++++++
 1 file changed, 296 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts b/arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts
index 1edc53fd6941..a6e3062dd520 100644
--- a/arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts
+++ b/arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts
@@ -1,11 +1,14 @@
 // SPDX-License-Identifier: GPL-2.0-only
 /*
  * Copyright (c) 2020, Alexey Minnekhanov <alexey.min@gmail.com>
+ * Copyright (c) 2021, Dang Huynh <danct12@riseup.net>
  */
 
 /dts-v1/;
 
 #include "sdm660.dtsi"
+#include "pm660.dtsi"
+#include "pm660l.dtsi"
 
 / {
 	model = "Xiaomi Redmi Note 7";
@@ -20,6 +23,16 @@ chosen {
 		stdout-path = "serial0:115200n8";
 	};
 
+	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;
+	};
+
 	reserved-memory {
 		#address-cells = <2>;
 		#size-cells = <2>;
@@ -40,6 +53,289 @@ &blsp1_uart2 {
 	status = "okay";
 };
 
+&rpm_requests {
+	pm660l-regulators {
+		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>;
+			regulator-ramp-delay = <0>;
+		};
+
+		vreg_s2b_1p05: s2 {
+			regulator-min-microvolt = <1050000>;
+			regulator-max-microvolt = <1050000>;
+			regulator-enable-ramp-delay = <200>;
+			regulator-ramp-delay = <0>;
+		};
+
+		/* LDOs */
+		vreg_l1b_0p925: l1 {
+			regulator-min-microvolt = <800000>;
+			regulator-max-microvolt = <925000>;
+			regulator-enable-ramp-delay = <250>;
+			regulator-ramp-delay = <0>;
+			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-ramp-delay = <0>;
+			regulator-allow-set-load;
+		};
+
+		vreg_l3b_3p3: l3 {
+			regulator-min-microvolt = <1700000>;
+			regulator-max-microvolt = <3300000>;
+			regulator-enable-ramp-delay = <250>;
+			regulator-ramp-delay = <0>;
+			regulator-allow-set-load;
+		};
+
+		vreg_l4b_2p95: l4 {
+			regulator-min-microvolt = <2944000>;
+			regulator-max-microvolt = <2952000>;
+			regulator-enable-ramp-delay = <250>;
+			regulator-ramp-delay = <0>;
+
+			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-ramp-delay = <0>;
+			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>;
+			regulator-ramp-delay = <0>;
+		};
+
+		vreg_l8b_3p3: l8 {
+			regulator-min-microvolt = <3200000>;
+			regulator-max-microvolt = <3400000>;
+			regulator-enable-ramp-delay = <250>;
+			regulator-ramp-delay = <0>;
+		};
+
+		vreg_bob: bob {
+			regulator-min-microvolt = <3300000>;
+			regulator-max-microvolt = <3600000>;
+			regulator-enable-ramp-delay = <500>;
+			regulator-ramp-delay = <0>;
+		};
+	};
+
+	pm660-regulators {
+		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-ramp-delay = <0>;
+			regulator-always-on;
+		};
+
+		vreg_s5a_1p35: s5 {
+			regulator-min-microvolt = <1224000>;
+			regulator-max-microvolt = <1350000>;
+			regulator-enable-ramp-delay = <200>;
+			regulator-ramp-delay = <0>;
+		};
+
+		vreg_s6a_0p87: s6 {
+			regulator-min-microvolt = <504000>;
+			regulator-max-microvolt = <992000>;
+			regulator-enable-ramp-delay = <150>;
+			regulator-ramp-delay = <0>;
+		};
+
+		/* LDOs */
+		vreg_l1a_1p225: l1 {
+			regulator-min-microvolt = <1150000>;
+			regulator-max-microvolt = <1250000>;
+			regulator-enable-ramp-delay = <250>;
+			regulator-ramp-delay = <0>;
+			regulator-allow-set-load;
+		};
+
+		vreg_l2a_1p0: l2 {
+			regulator-min-microvolt = <950000>;
+			regulator-max-microvolt = <1010000>;
+			regulator-enable-ramp-delay = <250>;
+			regulator-ramp-delay = <0>;
+		};
+
+		vreg_l3a_1p0: l3 {
+			regulator-min-microvolt = <950000>;
+			regulator-max-microvolt = <1010000>;
+			regulator-enable-ramp-delay = <250>;
+			regulator-ramp-delay = <0>;
+		};
+
+		vreg_l5a_0p848: l5 {
+			regulator-min-microvolt = <525000>;
+			regulator-max-microvolt = <950000>;
+			regulator-enable-ramp-delay = <250>;
+			regulator-ramp-delay = <0>;
+		};
+
+		vreg_l6a_1p3: l6 {
+			regulator-min-microvolt = <1200000>;
+			regulator-max-microvolt = <1370000>;
+			regulator-allow-set-load;
+			regulator-enable-ramp-delay = <250>;
+			regulator-ramp-delay = <0>;
+		};
+
+		vreg_l7a_1p2: l7 {
+			regulator-min-microvolt = <1200000>;
+			regulator-max-microvolt = <1200000>;
+			regulator-enable-ramp-delay = <250>;
+			regulator-ramp-delay = <0>;
+		};
+
+		vreg_l8a_1p8: l8 {
+			regulator-min-microvolt = <1750000>;
+			regulator-max-microvolt = <1800000>;
+			regulator-enable-ramp-delay = <250>;
+			regulator-ramp-delay = <0>;
+			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-ramp-delay = <0>;
+			regulator-allow-set-load;
+		};
+
+		vreg_l10a_1p8: l10 {
+			regulator-min-microvolt = <1780000>;
+			regulator-max-microvolt = <1950000>;
+			regulator-enable-ramp-delay = <250>;
+			regulator-ramp-delay = <0>;
+			regulator-allow-set-load;
+		};
+
+		vreg_l11a_1p8: l11 {
+			regulator-min-microvolt = <1780000>;
+			regulator-max-microvolt = <1950000>;
+			regulator-enable-ramp-delay = <250>;
+			regulator-ramp-delay = <0>;
+		};
+
+		vreg_l12a_1p8: l12 {
+			regulator-min-microvolt = <1780000>;
+			regulator-max-microvolt = <1950000>;
+			regulator-enable-ramp-delay = <250>;
+			regulator-ramp-delay = <0>;
+		};
+
+		/* 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-ramp-delay = <0>;
+			regulator-boot-on;
+			regulator-always-on;
+		};
+
+		vreg_l14a_1p8: l14 {
+			regulator-min-microvolt = <1710000>;
+			regulator-max-microvolt = <1900000>;
+			regulator-enable-ramp-delay = <250>;
+			regulator-ramp-delay = <0>;
+		};
+
+		vreg_l15a_1p8: l15 {
+			regulator-min-microvolt = <1650000>;
+			regulator-max-microvolt = <2950000>;
+			regulator-enable-ramp-delay = <250>;
+			regulator-ramp-delay = <0>;
+		};
+
+		vreg_l16a_2p7: l16 {
+			regulator-min-microvolt = <2800000>;
+			regulator-max-microvolt = <2800000>;
+			regulator-enable-ramp-delay = <250>;
+			regulator-ramp-delay = <0>;
+			regulator-always-on;
+		};
+
+		vreg_l17a_1p8: l17 {
+			regulator-min-microvolt = <1648000>;
+			regulator-max-microvolt = <2952000>;
+			regulator-enable-ramp-delay = <250>;
+			regulator-ramp-delay = <0>;
+		};
+
+		vreg_l19a_3p3: l19 {
+			regulator-min-microvolt = <3312000>;
+			regulator-max-microvolt = <3400000>;
+			regulator-enable-ramp-delay = <250>;
+			regulator-ramp-delay = <0>;
+			regulator-allow-set-load;
+		};
+	};
+};
+
 &tlmm {
 	gpio-reserved-ranges = <8 4>;
 };
-- 
2.33.1


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH v3 4/8] arm64: dts: qcom: sdm660-xiaomi-lavender: Add PWRKEY and RESIN
  2021-11-11  3:16 [PATCH v3 0/8] Improve support for Xiaomi Redmi Note 7 Dang Huynh
                   ` (2 preceding siblings ...)
  2021-11-11  3:16 ` [PATCH v3 3/8] arm64: dts: qcom: sdm660-xiaomi-lavender: Add RPM and fixed regulators Dang Huynh
@ 2021-11-11  3:16 ` Dang Huynh
  2021-11-11 21:34   ` Konrad Dybcio
  2021-11-11  3:16 ` [PATCH v3 5/8] arm64: dts: qcom: sdm660-xiaomi-lavender: Add volume up button Dang Huynh
                   ` (5 subsequent siblings)
  9 siblings, 1 reply; 17+ messages in thread
From: Dang Huynh @ 2021-11-11  3:16 UTC (permalink / raw)
  To: Dang Huynh
  Cc: Andy Gross, Bjorn Andersson, Rob Herring, linux-arm-msm,
	devicetree, linux-kernel, Alexey Min, Caleb Connolly,
	Martin Botka, Konrad Dybcio

This enables the volume down key as well as the power button.

Reviewed-by: Caleb Connolly <caleb@connolly.tech>
Reviewed-by: Martin Botka <martin.botka@somainline.org>
Reviewed-by: Konrad Dybcio <konradybcio@gmail.com>
Signed-off-by: Dang Huynh <danct12@riseup.net>
---
 arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts b/arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts
index a6e3062dd520..729b71407c36 100644
--- a/arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts
+++ b/arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts
@@ -53,6 +53,16 @@ &blsp1_uart2 {
 	status = "okay";
 };
 
+&pon_pwrkey {
+	status = "okay";
+};
+
+&pon_resin {
+	status = "okay";
+
+	linux,code = <KEY_VOLUMEDOWN>;
+};
+
 &rpm_requests {
 	pm660l-regulators {
 		compatible = "qcom,rpm-pm660l-regulators";
-- 
2.33.1


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH v3 5/8] arm64: dts: qcom: sdm660-xiaomi-lavender: Add volume up button
  2021-11-11  3:16 [PATCH v3 0/8] Improve support for Xiaomi Redmi Note 7 Dang Huynh
                   ` (3 preceding siblings ...)
  2021-11-11  3:16 ` [PATCH v3 4/8] arm64: dts: qcom: sdm660-xiaomi-lavender: Add PWRKEY and RESIN Dang Huynh
@ 2021-11-11  3:16 ` Dang Huynh
  2021-11-11 21:36   ` Konrad Dybcio
  2021-11-11  3:16 ` [PATCH v3 6/8] arm64: dts: qcom: sdm660-xiaomi-lavender: Add eMMC and SD Dang Huynh
                   ` (4 subsequent siblings)
  9 siblings, 1 reply; 17+ messages in thread
From: Dang Huynh @ 2021-11-11  3:16 UTC (permalink / raw)
  To: Dang Huynh
  Cc: Andy Gross, Bjorn Andersson, Rob Herring, linux-arm-msm,
	devicetree, linux-kernel, Alexey Min, Caleb Connolly,
	Martin Botka, Konrad Dybcio

This enables the volume up key.

Reviewed-by: Caleb Connolly <caleb@connolly.tech>
Reviewed-by: Martin Botka <martin.botka@somainline.org>
Reviewed-by: Konrad Dybcio <konradybcio@gmail.com>
Signed-off-by: Dang Huynh <danct12@riseup.net>
---
 .../boot/dts/qcom/sdm660-xiaomi-lavender.dts      | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts b/arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts
index 729b71407c36..456562cb6028 100644
--- a/arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts
+++ b/arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts
@@ -9,6 +9,9 @@
 #include "sdm660.dtsi"
 #include "pm660.dtsi"
 #include "pm660l.dtsi"
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/input/gpio-keys.h>
 
 / {
 	model = "Xiaomi Redmi Note 7";
@@ -33,6 +36,18 @@ vph_pwr: vph-pwr-regulator {
 		regulator-boot-on;
 	};
 
+	gpio-keys {
+		compatible = "gpio-keys";
+		input-name = "gpio-keys";
+
+		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>;
-- 
2.33.1


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH v3 6/8] arm64: dts: qcom: sdm660-xiaomi-lavender: Add eMMC and SD
  2021-11-11  3:16 [PATCH v3 0/8] Improve support for Xiaomi Redmi Note 7 Dang Huynh
                   ` (4 preceding siblings ...)
  2021-11-11  3:16 ` [PATCH v3 5/8] arm64: dts: qcom: sdm660-xiaomi-lavender: Add volume up button Dang Huynh
@ 2021-11-11  3:16 ` Dang Huynh
  2021-11-11  3:16 ` [PATCH v3 7/8] arm64: dts: qcom: sdm660-xiaomi-lavender: Enable Simple Framebuffer Dang Huynh
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 17+ messages in thread
From: Dang Huynh @ 2021-11-11  3:16 UTC (permalink / raw)
  To: Dang Huynh
  Cc: Andy Gross, Bjorn Andersson, Rob Herring, linux-arm-msm,
	devicetree, linux-kernel, Alexey Min, Caleb Connolly,
	Martin Botka, Konrad Dybcio

This commit enable the SD card slot and internal MMC.

Reviewed-by: Caleb Connolly <caleb@connolly.tech>
Signed-off-by: Dang Huynh <danct12@riseup.net>
---
 .../boot/dts/qcom/sdm660-xiaomi-lavender.dts  | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts b/arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts
index 456562cb6028..8de3e111f427 100644
--- a/arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts
+++ b/arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts
@@ -361,6 +361,25 @@ vreg_l19a_3p3: l19 {
 	};
 };
 
+&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";
+
+	vmmc-supply = <&vreg_l5b_2p95>;
+	vqmmc-supply = <&vreg_l2b_2p95>;
+};
+
 &tlmm {
 	gpio-reserved-ranges = <8 4>;
 };
-- 
2.33.1


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH v3 7/8] arm64: dts: qcom: sdm660-xiaomi-lavender: Enable Simple Framebuffer
  2021-11-11  3:16 [PATCH v3 0/8] Improve support for Xiaomi Redmi Note 7 Dang Huynh
                   ` (5 preceding siblings ...)
  2021-11-11  3:16 ` [PATCH v3 6/8] arm64: dts: qcom: sdm660-xiaomi-lavender: Add eMMC and SD Dang Huynh
@ 2021-11-11  3:16 ` Dang Huynh
  2021-11-11 21:38   ` Konrad Dybcio
  2021-11-11  3:16 ` [PATCH v3 8/8] arm64: dts: qcom: sdm660-xiaomi-lavender: Add USB Dang Huynh
                   ` (2 subsequent siblings)
  9 siblings, 1 reply; 17+ messages in thread
From: Dang Huynh @ 2021-11-11  3:16 UTC (permalink / raw)
  To: Dang Huynh
  Cc: Andy Gross, Bjorn Andersson, Rob Herring, linux-arm-msm,
	devicetree, linux-kernel, Alexey Min, Caleb Connolly,
	Martin Botka, Konrad Dybcio

This lets the user sees the framebuffer console.

Reviewed-by: Caleb Connolly <caleb@connolly.tech>
Reviewed-by: Martin Botka <martin.botka@somainline.org>
Reviewed-by: Konrad Dybcio <konradybcio@gmail.com>
Signed-off-by: Dang Huynh <danct12@riseup.net>
---
 .../boot/dts/qcom/sdm660-xiaomi-lavender.dts   | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts b/arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts
index 8de3e111f427..712392545c2e 100644
--- a/arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts
+++ b/arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts
@@ -23,7 +23,20 @@ aliases {
 	};
 
 	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 {
@@ -61,6 +74,11 @@ ramoops@a0000000 {
 			ftrace-size = <0x0>;
 			pmsg-size = <0x20000>;
 		};
+
+		framebuffer_mem: memory@9d400000 {
+			reg = <0x0 0x9d400000 0x0 0x23ff000>;
+			no-map;
+		};
 	};
 };
 
-- 
2.33.1


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH v3 8/8] arm64: dts: qcom: sdm660-xiaomi-lavender: Add USB
  2021-11-11  3:16 [PATCH v3 0/8] Improve support for Xiaomi Redmi Note 7 Dang Huynh
                   ` (6 preceding siblings ...)
  2021-11-11  3:16 ` [PATCH v3 7/8] arm64: dts: qcom: sdm660-xiaomi-lavender: Enable Simple Framebuffer Dang Huynh
@ 2021-11-11  3:16 ` Dang Huynh
  2021-11-11 21:40   ` Konrad Dybcio
  2021-11-11  9:42 ` [PATCH v3 0/8] Improve support for Xiaomi Redmi Note 7 Marijn Suijten
  2021-11-18 20:30 ` Bjorn Andersson
  9 siblings, 1 reply; 17+ messages in thread
From: Dang Huynh @ 2021-11-11  3:16 UTC (permalink / raw)
  To: Dang Huynh
  Cc: Andy Gross, Bjorn Andersson, Rob Herring, linux-arm-msm,
	devicetree, linux-kernel, Alexey Min, Caleb Connolly,
	Martin Botka, Konrad Dybcio

From: Alexey Min <alexey.min@gmail.com>

Enable and configure DWC3 and QUSB2 PHY to enable USB
functionality on the Redmi Note 7.

Signed-off-by: Alexey Min <alexey.min@gmail.com>
Co-developed-by: Dang Huynh <danct12@riseup.net>
Signed-off-by: Dang Huynh <danct12@riseup.net>
---
 .../boot/dts/qcom/sdm660-xiaomi-lavender.dts  | 25 +++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts b/arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts
index 712392545c2e..bf7f334b0b5c 100644
--- a/arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts
+++ b/arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts
@@ -80,6 +80,15 @@ 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-gpio = <&tlmm 58 GPIO_ACTIVE_HIGH>;
+	};
 };
 
 &blsp1_uart2 {
@@ -96,6 +105,13 @@ &pon_resin {
 	linux,code = <KEY_VOLUMEDOWN>;
 };
 
+&qusb2phy {
+	status = "okay";
+
+	vdd-supply = <&vreg_l1b_0p925>;
+	vdda-phy-dpdm-supply = <&vreg_l7b_3p125>;
+};
+
 &rpm_requests {
 	pm660l-regulators {
 		compatible = "qcom,rpm-pm660l-regulators";
@@ -401,3 +417,12 @@ &sdhc_2 {
 &tlmm {
 	gpio-reserved-ranges = <8 4>;
 };
+
+&usb3 {
+	status = "okay";
+};
+
+&usb3_dwc3 {
+	dr_mode = "peripheral";
+	extcon = <&extcon_usb>;
+};
-- 
2.33.1


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* Re: [PATCH v3 0/8] Improve support for Xiaomi Redmi Note 7
  2021-11-11  3:16 [PATCH v3 0/8] Improve support for Xiaomi Redmi Note 7 Dang Huynh
                   ` (7 preceding siblings ...)
  2021-11-11  3:16 ` [PATCH v3 8/8] arm64: dts: qcom: sdm660-xiaomi-lavender: Add USB Dang Huynh
@ 2021-11-11  9:42 ` Marijn Suijten
  2021-11-18 20:30 ` Bjorn Andersson
  9 siblings, 0 replies; 17+ messages in thread
From: Marijn Suijten @ 2021-11-11  9:42 UTC (permalink / raw)
  To: Dang Huynh
  Cc: Andy Gross, Bjorn Andersson, Rob Herring, linux-arm-msm,
	devicetree, linux-kernel, Alexey Min, Caleb Connolly,
	Martin Botka, Konrad Dybcio

Hi Dang,

On 2021-11-11 10:16:27, Dang Huynh wrote:
> This series expand the Redmi Note 7 device port to support:
>  + Regulators
>  + Volume keys
>  + eMMC and SD card slot
>  + Framebuffer display
>  + USB
> 
> Changes in v2:
>  - Dropped linux,input-type from volume up as 1 is set by default.
>  - Dropped gpio-key,wakeup as it's a legacy property name and is
> not relevant for a volume button.
>  - Rename label cont_splash_mem to framebuffer_mem and change node
> name to memory.
> 
> Changes in v3:
>  - Add voltage range for vph_pwr
>  - Move RESIN to PM660 and make PON keys disabled by default 
>  - Addressed review comments from Konrad

A bit of a formality: keep in mind that you cannot add Reviewed-by: to
patches unless explicitly given by the reviewer.  They do not represent
that a person has at some point given you a review on the patch; rather
they indicate that the reviewer in question has checked and agreed with
the changes.

In other words, after Konrad has reviewed your patches you should resend
a fixed version without his Reviewed-by:.  He'll reply with this line
once he has seen and acknowledged the resulting changes (or otherwise
reply with more requests for changes).  The maintainer picks these up
when applying the patchset to the tree, but you should pick them up
yourself if/when resending a new version.

Finally, this is a bit tricky but you should technically drop every
Reviewed-by: whenever a patch is changed in a followup patchset, leaving
it up to the reviewers to acknowledge that they are also okay with the
updated patch.

- Marijn

>  - Make Alexey Min the author of the USB patch as he came up with
> the patch first on downstream. 
> 
> Alexey Min (1):
>   arm64: dts: qcom: sdm660-xiaomi-lavender: Add USB
> 
> Dang Huynh (7):
>   arm64: dts: qcom: sdm630: Assign numbers to eMMC and SD
>   arm64: dts: qcom: sdm630-pm660: Move RESIN to pm660 dtsi
>   arm64: dts: qcom: sdm660-xiaomi-lavender: Add RPM and fixed regulators
>   arm64: dts: qcom: sdm660-xiaomi-lavender: Add PWRKEY and RESIN
>   arm64: dts: qcom: sdm660-xiaomi-lavender: Add volume up button
>   arm64: dts: qcom: sdm660-xiaomi-lavender: Add eMMC and SD
>   arm64: dts: qcom: sdm660-xiaomi-lavender: Enable Simple Framebuffer
> 
>  arch/arm64/boot/dts/qcom/pm660.dtsi           |  12 +-
>  .../dts/qcom/sdm630-sony-xperia-nile.dtsi     |  16 +-
>  arch/arm64/boot/dts/qcom/sdm630.dtsi          |   5 +
>  .../boot/dts/qcom/sdm660-xiaomi-lavender.dts  | 383 ++++++++++++++++++
>  4 files changed, 407 insertions(+), 9 deletions(-)
> 
> -- 
> 2.33.1
> 

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH v3 2/8] arm64: dts: qcom: sdm630-pm660: Move RESIN to pm660 dtsi
  2021-11-11  3:16 ` [PATCH v3 2/8] arm64: dts: qcom: sdm630-pm660: Move RESIN to pm660 dtsi Dang Huynh
@ 2021-11-11 21:16   ` Konrad Dybcio
  0 siblings, 0 replies; 17+ messages in thread
From: Konrad Dybcio @ 2021-11-11 21:16 UTC (permalink / raw)
  To: Dang Huynh
  Cc: Andy Gross, Bjorn Andersson, Rob Herring, linux-arm-msm,
	devicetree, linux-kernel, Alexey Min, Caleb Connolly,
	Martin Botka

Reviewed-by: Konrad Dybcio <konrad.dybcio@somainline.org>

Konrad

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH v3 3/8] arm64: dts: qcom: sdm660-xiaomi-lavender: Add RPM and fixed regulators
  2021-11-11  3:16 ` [PATCH v3 3/8] arm64: dts: qcom: sdm660-xiaomi-lavender: Add RPM and fixed regulators Dang Huynh
@ 2021-11-11 21:33   ` Konrad Dybcio
  0 siblings, 0 replies; 17+ messages in thread
From: Konrad Dybcio @ 2021-11-11 21:33 UTC (permalink / raw)
  To: Dang Huynh
  Cc: Andy Gross, Bjorn Andersson, Rob Herring, linux-arm-msm,
	devicetree, linux-kernel, Alexey Min, Caleb Connolly,
	Martin Botka



On 11.11.2021 04:16, Dang Huynh wrote:
> Subject:
> [PATCH v3 3/8] arm64: dts: qcom: sdm660-xiaomi-lavender: Add RPM and fixed regulators
> From:
> Dang Huynh <danct12@riseup.net>
> Date:
> 11.11.2021, 04:16
> 
> To:
> Dang Huynh <danct12@riseup.net>
> CC:
> Andy Gross <agross@kernel.org>, Bjorn Andersson <bjorn.andersson@linaro.org>, Rob Herring <robh+dt@kernel.org>, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Alexey Min <alexey.min@gmail.com>, Caleb Connolly <caleb@connolly.tech>, Martin Botka <martin.botka@somainline.org>, Konrad Dybcio <konradybcio@gmail.com>
> 
> 
> Add most of the RPM PM660/PM660L regulators and the fixed ones,
> defining the common electrical part of this platform.
> 
> Reviewed-by: Caleb Connolly <caleb@connolly.tech>
> Reviewed-by: Konrad Dybcio <konradybcio@gmail.com>
As explained by Marijn in an email in this thread, please drop this line, as I did not approve the patch,
and definitely not from that email :P


> +
> +		vreg_s1b_1p125: s1 {
> +			regulator-min-microvolt = <1125000>;
> +			regulator-max-microvolt = <1125000>;
> +			regulator-enable-ramp-delay = <200>;
> +			regulator-ramp-delay = <0>;
I don't think setting a ramp delay of 0 does anything, this goes for every instance of this in the patch.


Konrad

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH v3 4/8] arm64: dts: qcom: sdm660-xiaomi-lavender: Add PWRKEY and RESIN
  2021-11-11  3:16 ` [PATCH v3 4/8] arm64: dts: qcom: sdm660-xiaomi-lavender: Add PWRKEY and RESIN Dang Huynh
@ 2021-11-11 21:34   ` Konrad Dybcio
  0 siblings, 0 replies; 17+ messages in thread
From: Konrad Dybcio @ 2021-11-11 21:34 UTC (permalink / raw)
  To: Dang Huynh
  Cc: Andy Gross, Bjorn Andersson, Rob Herring, linux-arm-msm,
	devicetree, linux-kernel, Alexey Min, Caleb Connolly,
	Martin Botka



On 11.11.2021 04:16, Dang Huynh wrote:
> This enables the volume down key as well as the power button.
> 
> Reviewed-by: Caleb Connolly <caleb@connolly.tech>
> Reviewed-by: Martin Botka <martin.botka@somainline.org>
> Reviewed-by: Konrad Dybcio <konradybcio@gmail.com>
Drop.

> Signed-off-by: Dang Huynh <danct12@riseup.net>
> ---
>  arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts | 10 ++++++++++
>  1 file changed, 10 insertions(+)

Reviewed-by: Konrad Dybcio <konrad.dybcio@somainline.org>

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH v3 5/8] arm64: dts: qcom: sdm660-xiaomi-lavender: Add volume up button
  2021-11-11  3:16 ` [PATCH v3 5/8] arm64: dts: qcom: sdm660-xiaomi-lavender: Add volume up button Dang Huynh
@ 2021-11-11 21:36   ` Konrad Dybcio
  0 siblings, 0 replies; 17+ messages in thread
From: Konrad Dybcio @ 2021-11-11 21:36 UTC (permalink / raw)
  To: Dang Huynh
  Cc: Andy Gross, Bjorn Andersson, Rob Herring, linux-arm-msm,
	devicetree, linux-kernel, Alexey Min, Caleb Connolly,
	Martin Botka



On 11.11.2021 04:16, Dang Huynh wrote:
> This enables the volume up key.
> 
> Reviewed-by: Caleb Connolly <caleb@connolly.tech>
> Reviewed-by: Martin Botka <martin.botka@somainline.org>
> Reviewed-by: Konrad Dybcio <konradybcio@gmail.com>
Drop.

> Signed-off-by: Dang Huynh <danct12@riseup.net>
> ---
>  .../boot/dts/qcom/sdm660-xiaomi-lavender.dts      | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts b/arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts
> index 729b71407c36..456562cb6028 100644
> --- a/arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts
> +++ b/arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts
> @@ -9,6 +9,9 @@
>  #include "sdm660.dtsi"
>  #include "pm660.dtsi"
>  #include "pm660l.dtsi"
> +#include <dt-bindings/gpio/gpio.h>
gpio.h can safely be moved to the SoC DTSI.

Konrad

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH v3 7/8] arm64: dts: qcom: sdm660-xiaomi-lavender: Enable Simple Framebuffer
  2021-11-11  3:16 ` [PATCH v3 7/8] arm64: dts: qcom: sdm660-xiaomi-lavender: Enable Simple Framebuffer Dang Huynh
@ 2021-11-11 21:38   ` Konrad Dybcio
  0 siblings, 0 replies; 17+ messages in thread
From: Konrad Dybcio @ 2021-11-11 21:38 UTC (permalink / raw)
  To: Dang Huynh
  Cc: Andy Gross, Bjorn Andersson, Rob Herring, linux-arm-msm,
	devicetree, linux-kernel, Alexey Min, Caleb Connolly,
	Martin Botka



On 11.11.2021 04:16, Dang Huynh wrote:
> This lets the user sees the framebuffer console.
> 
> Reviewed-by: Caleb Connolly <caleb@connolly.tech>
> Reviewed-by: Martin Botka <martin.botka@somainline.org>
> Reviewed-by: Konrad Dybcio <konradybcio@gmail.com>
Drop.

> Signed-off-by: Dang Huynh <danct12@riseup.net>
> ---
>  .../boot/dts/qcom/sdm660-xiaomi-lavender.dts   | 18 ++++++++++++++++++
>  1 file changed, 18 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts b/arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts
> index 8de3e111f427..712392545c2e 100644
> --- a/arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts
> +++ b/arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts
> @@ -23,7 +23,20 @@ aliases {
>  	};
>  
>  	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 {
> @@ -61,6 +74,11 @@ ramoops@a0000000 {
>  			ftrace-size = <0x0>;
>  			pmsg-size = <0x20000>;
>  		};
> +
> +		framebuffer_mem: memory@9d400000 {
> +			reg = <0x0 0x9d400000 0x0 0x23ff000>;
> +			no-map;
> +		};
>  	};
>  };
>  

Reviewed-by: Konrad Dybcio <konrad.dybcio@somainline.org>

Konrad

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH v3 8/8] arm64: dts: qcom: sdm660-xiaomi-lavender: Add USB
  2021-11-11  3:16 ` [PATCH v3 8/8] arm64: dts: qcom: sdm660-xiaomi-lavender: Add USB Dang Huynh
@ 2021-11-11 21:40   ` Konrad Dybcio
  0 siblings, 0 replies; 17+ messages in thread
From: Konrad Dybcio @ 2021-11-11 21:40 UTC (permalink / raw)
  To: Dang Huynh
  Cc: Andy Gross, Bjorn Andersson, Rob Herring, linux-arm-msm,
	devicetree, linux-kernel, Alexey Min, Caleb Connolly,
	Martin Botka



On 11.11.2021 04:16, Dang Huynh wrote:
> From: Alexey Min <alexey.min@gmail.com>
> 
> Enable and configure DWC3 and QUSB2 PHY to enable USB
> functionality on the Redmi Note 7.
> 
> Signed-off-by: Alexey Min <alexey.min@gmail.com>
> Co-developed-by: Dang Huynh <danct12@riseup.net>
> Signed-off-by: Dang Huynh <danct12@riseup.net>
> ---
>  .../boot/dts/qcom/sdm660-xiaomi-lavender.dts  | 25 +++++++++++++++++++
>  1 file changed, 25 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts b/arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts
> index 712392545c2e..bf7f334b0b5c 100644
> --- a/arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts
> +++ b/arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts
> @@ -80,6 +80,15 @@ 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-gpio = <&tlmm 58 GPIO_ACTIVE_HIGH>;
> +	};
>  };
>  
>  &blsp1_uart2 {
> @@ -96,6 +105,13 @@ &pon_resin {
>  	linux,code = <KEY_VOLUMEDOWN>;
>  };
>  
> +&qusb2phy {
> +	status = "okay";
> +
> +	vdd-supply = <&vreg_l1b_0p925>;
> +	vdda-phy-dpdm-supply = <&vreg_l7b_3p125>;
> +};
> +
>  &rpm_requests {
>  	pm660l-regulators {
>  		compatible = "qcom,rpm-pm660l-regulators";
> @@ -401,3 +417,12 @@ &sdhc_2 {
>  &tlmm {
>  	gpio-reserved-ranges = <8 4>;
>  };
> +
> +&usb3 {
> +	status = "okay";
> +};
> +
> +&usb3_dwc3 {
> +	dr_mode = "peripheral";
> +	extcon = <&extcon_usb>;
> +};

Reviewed-by: Konrad Dybcio <konrad.dybcio@somainline.org>

On a side note, I wonder if any of the more interesting USB-C lanes (say DP out or USB3 [at least for host mode])
are connected on this device..

Konrad

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH v3 0/8] Improve support for Xiaomi Redmi Note 7
  2021-11-11  3:16 [PATCH v3 0/8] Improve support for Xiaomi Redmi Note 7 Dang Huynh
                   ` (8 preceding siblings ...)
  2021-11-11  9:42 ` [PATCH v3 0/8] Improve support for Xiaomi Redmi Note 7 Marijn Suijten
@ 2021-11-18 20:30 ` Bjorn Andersson
  9 siblings, 0 replies; 17+ messages in thread
From: Bjorn Andersson @ 2021-11-18 20:30 UTC (permalink / raw)
  To: Dang Huynh
  Cc: Andy Gross, Rob Herring, linux-arm-msm, devicetree, linux-kernel,
	Alexey Min, Caleb Connolly, Martin Botka, Konrad Dybcio

On Wed 10 Nov 21:16 CST 2021, Dang Huynh wrote:

> This series expand the Redmi Note 7 device port to support:
>  + Regulators
>  + Volume keys
>  + eMMC and SD card slot
>  + Framebuffer display
>  + USB
> 

Thanks for the patches Dang, I think they look good and would like to
merge them.

Could you please submit an updated version with the one gpio.h inclusion
pointed out by Konrad moved and fix up the Reviewed-by pointed out my
Martin?

Thanks,
Bjorn

> Changes in v2:
>  - Dropped linux,input-type from volume up as 1 is set by default.
>  - Dropped gpio-key,wakeup as it's a legacy property name and is
> not relevant for a volume button.
>  - Rename label cont_splash_mem to framebuffer_mem and change node
> name to memory.
> 
> Changes in v3:
>  - Add voltage range for vph_pwr
>  - Move RESIN to PM660 and make PON keys disabled by default 
>  - Addressed review comments from Konrad
>  - Make Alexey Min the author of the USB patch as he came up with
> the patch first on downstream. 
> 
> Alexey Min (1):
>   arm64: dts: qcom: sdm660-xiaomi-lavender: Add USB
> 
> Dang Huynh (7):
>   arm64: dts: qcom: sdm630: Assign numbers to eMMC and SD
>   arm64: dts: qcom: sdm630-pm660: Move RESIN to pm660 dtsi
>   arm64: dts: qcom: sdm660-xiaomi-lavender: Add RPM and fixed regulators
>   arm64: dts: qcom: sdm660-xiaomi-lavender: Add PWRKEY and RESIN
>   arm64: dts: qcom: sdm660-xiaomi-lavender: Add volume up button
>   arm64: dts: qcom: sdm660-xiaomi-lavender: Add eMMC and SD
>   arm64: dts: qcom: sdm660-xiaomi-lavender: Enable Simple Framebuffer
> 
>  arch/arm64/boot/dts/qcom/pm660.dtsi           |  12 +-
>  .../dts/qcom/sdm630-sony-xperia-nile.dtsi     |  16 +-
>  arch/arm64/boot/dts/qcom/sdm630.dtsi          |   5 +
>  .../boot/dts/qcom/sdm660-xiaomi-lavender.dts  | 383 ++++++++++++++++++
>  4 files changed, 407 insertions(+), 9 deletions(-)
> 
> -- 
> 2.33.1
> 

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2021-11-18 20:30 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-11  3:16 [PATCH v3 0/8] Improve support for Xiaomi Redmi Note 7 Dang Huynh
2021-11-11  3:16 ` [PATCH v3 1/8] arm64: dts: qcom: sdm630: Assign numbers to eMMC and SD Dang Huynh
2021-11-11  3:16 ` [PATCH v3 2/8] arm64: dts: qcom: sdm630-pm660: Move RESIN to pm660 dtsi Dang Huynh
2021-11-11 21:16   ` Konrad Dybcio
2021-11-11  3:16 ` [PATCH v3 3/8] arm64: dts: qcom: sdm660-xiaomi-lavender: Add RPM and fixed regulators Dang Huynh
2021-11-11 21:33   ` Konrad Dybcio
2021-11-11  3:16 ` [PATCH v3 4/8] arm64: dts: qcom: sdm660-xiaomi-lavender: Add PWRKEY and RESIN Dang Huynh
2021-11-11 21:34   ` Konrad Dybcio
2021-11-11  3:16 ` [PATCH v3 5/8] arm64: dts: qcom: sdm660-xiaomi-lavender: Add volume up button Dang Huynh
2021-11-11 21:36   ` Konrad Dybcio
2021-11-11  3:16 ` [PATCH v3 6/8] arm64: dts: qcom: sdm660-xiaomi-lavender: Add eMMC and SD Dang Huynh
2021-11-11  3:16 ` [PATCH v3 7/8] arm64: dts: qcom: sdm660-xiaomi-lavender: Enable Simple Framebuffer Dang Huynh
2021-11-11 21:38   ` Konrad Dybcio
2021-11-11  3:16 ` [PATCH v3 8/8] arm64: dts: qcom: sdm660-xiaomi-lavender: Add USB Dang Huynh
2021-11-11 21:40   ` Konrad Dybcio
2021-11-11  9:42 ` [PATCH v3 0/8] Improve support for Xiaomi Redmi Note 7 Marijn Suijten
2021-11-18 20:30 ` Bjorn Andersson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).