Skip to contentSkip to conversation

Add support for the Xiaomi MSM8996 platform

PATCH New Yassine Oudjana 1 participant 5 messages Sep 1, 2021

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

cover Add support for the Xiaomi MSM8996 platform

This series adds support for the Xiaomi MSM8996 platform, which includes 5 devices:

- Mi 5 (gemini): MSM8996 + PMI8994
- Mi Note 2 (scorpio): MSM8996 Pro + PMI8996
- Mi 5s (capricorn): MSM8996 Pro + PMI8996
- Mi Mix (lithium): MSM8996 Pro + PMI8996
- Mi 5s Plus (natrium): MSM8996 Pro + PMI8996

These devices share a common board design with only a few differences.
Out of these 5 devices, this series adds initial support for the Mi Note 2 and the Mi 5. Adding support for the remaining 3 would only require adding a DTS for each, while accounting for hardware differences such as different panels.

Raffaele Tranquillini (1):
arm64: dts: qcom: msm8996: xiaomi-gemini: Add support for Xiaomi Mi 5

Yassine Oudjana (3):
arm64: dts: qcom: db820c: Move blsp1_uart2 pin states to msm8996.dtsi
arm64: dts: qcom: msm8996: Add blsp2_i2c3
arm64: dts: qcom: Add support for the Xiaomi MSM8996 platform

 arch/arm64/boot/dts/qcom/Makefile             |   2 +
 arch/arm64/boot/dts/qcom/apq8096-db820c.dtsi  |  29 -
 .../boot/dts/qcom/msm8996-xiaomi-common.dtsi  | 673 ++++++++++++++++++
 .../boot/dts/qcom/msm8996-xiaomi-gemini.dts   | 431 +++++++++++
 .../boot/dts/qcom/msm8996-xiaomi-scorpio.dts  | 431 +++++++++++
 arch/arm64/boot/dts/qcom/msm8996.dtsi         |  49 ++
 6 files changed, 1586 insertions(+), 29 deletions(-)
 create mode 100644 arch/arm64/boot/dts/qcom/msm8996-xiaomi-common.dtsi
 create mode 100644 arch/arm64/boot/dts/qcom/msm8996-xiaomi-gemini.dts
 create mode 100644 arch/arm64/boot/dts/qcom/msm8996-xiaomi-scorpio.dts
Signature · 1 line
2.33.0
#1 lore raw

PATCH 1/4 arm64: dts: qcom: db820c: Move blsp1_uart2 pin states to msm8996.dtsi

Move blsp1_uart2_default and blsp1_uart2_sleep to the SoC device tree to avoid duplicating them in other device trees.

---
 arch/arm64/boot/dts/qcom/apq8096-db820c.dtsi | 29 --------------------
 arch/arm64/boot/dts/qcom/msm8996.dtsi        | 17 ++++++++++++
 2 files changed, 17 insertions(+), 29 deletions(-)
arch/arm64/boot/dts/qcom/apq8096-db820c.dtsi +0 -29
index 51e17094d7b1..eca428ab2517 100644
@@ -148,9 +148,6 @@ &blsp1_spi1 {
 &blsp1_uart2 {
 	label = "BT-UART";
 	status = "okay";
-	pinctrl-names = "default", "sleep";
-	pinctrl-0 = <&blsp1_uart2_default>;
-	pinctrl-1 = <&blsp1_uart2_sleep>;
 
 	bluetooth {
 		compatible = "qcom,qca6174-bt";
@@ -437,32 +434,6 @@ config {
 		};
 	};
 
-	blsp1_uart2_default: blsp1_uart2_default {
-		mux {
-			pins = "gpio41", "gpio42", "gpio43", "gpio44";
-			function = "blsp_uart2";
-		};
-
-		config {
-			pins = "gpio41", "gpio42", "gpio43", "gpio44";
-			drive-strength = <16>;
-			bias-disable;
-		};
-	};
-
-	blsp1_uart2_sleep: blsp1_uart2_sleep {
-		mux {
-			pins = "gpio41", "gpio42", "gpio43", "gpio44";
-			function = "gpio";
-		};
-
-		config {
-			pins = "gpio41", "gpio42", "gpio43", "gpio44";
-			drive-strength = <2>;
-			bias-disable;
-		};
-	};
-
 	hdmi_hpd_active: hdmi_hpd_active {
 		mux {
 			pins = "gpio34";
arch/arm64/boot/dts/qcom/msm8996.dtsi +17 -0
index 52df22ab3f6a..23c3435ab888 100644
@@ -1211,6 +1211,20 @@ wake {
 				};
 			};
 
+			blsp1_uart2_default: blsp1-uart2-default {
+				pins = "gpio41", "gpio42", "gpio43", "gpio44";
+				function = "blsp_uart2";
+				drive-strength = <16>;
+				bias-disable;
+			};
+
+			blsp1_uart2_sleep: blsp1-uart2-sleep {
+				pins = "gpio41", "gpio42", "gpio43", "gpio44";
+				function = "gpio";
+				drive-strength = <2>;
+				bias-disable;
+			};
+
 			blsp1_i2c3_default: blsp1-i2c2-default {
 				pins = "gpio47", "gpio48";
 				function = "blsp_i2c3";
@@ -2704,6 +2718,9 @@ blsp1_uart2: serial@7570000 {
 			clocks = <&gcc GCC_BLSP1_UART2_APPS_CLK>,
 				 <&gcc GCC_BLSP1_AHB_CLK>;
 			clock-names = "core", "iface";
+			pinctrl-names = "default", "sleep";
+			pinctrl-0 = <&blsp1_uart2_default>;
+			pinctrl-1 = <&blsp1_uart2_sleep>;
 			dmas = <&blsp1_dma 2>, <&blsp1_dma 3>;
 			dma-names = "tx", "rx";
 			status = "disabled";
Signature · 1 line
2.33.0
#2 lore raw

PATCH 2/4 arm64: dts: qcom: msm8996: Add blsp2_i2c3

In reply to Yassine Oudjana

Add a node for blsp2_i2c3 which is used for type-C port control chips and speaker codecs on some devices.

---
 arch/arm64/boot/dts/qcom/msm8996.dtsi | 32 +++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)
arch/arm64/boot/dts/qcom/msm8996.dtsi +32 -0
index 23c3435ab888..1f4eca018183 100644
@@ -1253,6 +1253,20 @@ blsp2_uart3_4pins_sleep: blsp2-uart2-4pins-sleep {
 				bias-disable;
 			};
 
+			blsp2_i2c3_default: blsp2-i2c3 {
+				pins = "gpio51", "gpio52";
+				function = "blsp_i2c9";
+				drive-strength = <16>;
+				bias-disable;
+			};
+
+			blsp2_i2c3_sleep: blsp2-i2c3-sleep {
+				pins = "gpio51", "gpio52";
+				function = "gpio";
+				drive-strength = <2>;
+				bias-disable;
+			};
+
 			wcd_intr_default: wcd-intr-default{
 				pins = "gpio54";
 				function = "gpio";
@@ -2825,6 +2839,24 @@ blsp2_i2c2: i2c@75b6000 {
 			status = "disabled";
 		};
 
+		blsp2_i2c3: i2c@75b7000 {
+			compatible = "qcom,i2c-qup-v2.2.1";
+			reg = <0x075b7000 0x1000>;
+			interrupts = <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&gcc GCC_BLSP2_AHB_CLK>,
+				<&gcc GCC_BLSP2_QUP3_I2C_APPS_CLK>;
+			clock-names = "iface", "core";
+			clock-frequency = <400000>;
+			pinctrl-names = "default", "sleep";
+			pinctrl-0 = <&blsp2_i2c3_default>;
+			pinctrl-1 = <&blsp2_i2c3_sleep>;
+			dmas = <&blsp2_dma 16>, <&blsp2_dma 17>;
+			dma-names = "tx", "rx";
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
 		blsp2_i2c5: i2c@75b9000 {
 			compatible = "qcom,i2c-qup-v2.2.1";
 			reg = <0x75b9000 0x1000>;
Signature · 1 line
2.33.0
#3 lore raw

PATCH 3/4 arm64: dts: qcom: Add support for the Xiaomi MSM8996 platform

In reply to Yassine Oudjana

There are 5 Xiaomi devices with the MSM8996 SoC:

- Mi 5 (gemini): MSM8996 + PMI8994
- Mi Note 2 (scorpio): MSM8996 Pro + PMI8996
- Mi 5s (capricorn): MSM8996 Pro + PMI8996
- Mi Mix (lithium): MSM8996 Pro + PMI8996
- Mi 5s Plus (natrium): MSM8996 Pro + PMI8996

These devices share a common board design with only a few differences. Add support for the common board, as well as support for the Mi Note 2.

---
 arch/arm64/boot/dts/qcom/Makefile             |   1 +
 .../boot/dts/qcom/msm8996-xiaomi-common.dtsi  | 673 ++++++++++++++++++
 .../boot/dts/qcom/msm8996-xiaomi-scorpio.dts  | 431 +++++++++++
 3 files changed, 1105 insertions(+)
 create mode 100644 arch/arm64/boot/dts/qcom/msm8996-xiaomi-common.dtsi
 create mode 100644 arch/arm64/boot/dts/qcom/msm8996-xiaomi-scorpio.dts
arch/arm64/boot/dts/qcom/Makefile +1 -0
index 70516508be56..7e33d492bf26 100644
@@ -33,6 +33,7 @@ dtb-$(CONFIG_ARCH_QCOM)	+= msm8996-pmi8996-sony-xperia-tone-keyaki.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8996-sony-xperia-tone-dora.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8996-sony-xperia-tone-kagura.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8996-sony-xperia-tone-keyaki.dtb
+dtb-$(CONFIG_ARCH_QCOM)	+= msm8996-xiaomi-scorpio.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8998-asus-novago-tp370ql.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8998-hp-envy-x2.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8998-lenovo-miix-630.dtb
arch/arm64/boot/dts/qcom/msm8996-xiaomi-common.dtsi new file +673 -0

673 lines not on this page · raw message

arch/arm64/boot/dts/qcom/msm8996-xiaomi-scorpio.dts new file +431 -0

431 lines not on this page · raw message

Signature · 1 line
2.33.0
#4 lore raw

PATCH 4/4 arm64: dts: qcom: msm8996: xiaomi-gemini: Add support for Xiaomi Mi 5

In reply to Yassine Oudjana

From: Raffaele Tranquillini <[email protected]>

Add a device tree for Xiaomi Mi 5 (gemini).

---
 arch/arm64/boot/dts/qcom/Makefile             |   1 +
 .../boot/dts/qcom/msm8996-xiaomi-gemini.dts   | 431 ++++++++++++++++++
 2 files changed, 432 insertions(+)
 create mode 100644 arch/arm64/boot/dts/qcom/msm8996-xiaomi-gemini.dts
arch/arm64/boot/dts/qcom/Makefile +1 -0
index 7e33d492bf26..2c252844356c 100644
@@ -33,6 +33,7 @@ dtb-$(CONFIG_ARCH_QCOM)	+= msm8996-pmi8996-sony-xperia-tone-keyaki.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8996-sony-xperia-tone-dora.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8996-sony-xperia-tone-kagura.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8996-sony-xperia-tone-keyaki.dtb
+dtb-$(CONFIG_ARCH_QCOM)	+= msm8996-xiaomi-gemini.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8996-xiaomi-scorpio.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8998-asus-novago-tp370ql.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8998-hp-envy-x2.dtb
arch/arm64/boot/dts/qcom/msm8996-xiaomi-gemini.dts new file +431 -0

431 lines not on this page · raw message

Signature · 1 line
2.33.0