Skip to contentSkip to conversation

pm8994 / msm8992/4 DT updates

PATCH In review Konrad Dybcio 4 participants 24 messages Oct 5, 2020 – Nov 11, 2020

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

cover pm8994 / msm8992/4 DT updates

This series brings support for:

(These ones depend on the patch [1])

- USB on some (think without fancy USB hw) 8992/4 boards

- SDHCI2 on msm8992/4

(These ones should be GTG without the patch)

- VADC/temp alarm+thermal zones on pm8994

- RMI4 touchscreen on Lumia 950

- Lumia 950 XL DTS

And converts spmi-gpio on pm8994 to use gpio-ranges.

[1] https://patchwork.kernel.org/patch/11816733/

Konrad Dybcio (11):
arm64: dts: qcom: pm8994: Add VADC node
arm64: dts: qcom: pm8994: Add temperature alarm node
arm64: dts: qcom: pm8994: Add thermal-zones for temp alarm
arm64: dts: qcom: pm8994: Fix up spmi-gpio node
arm64: dts: qcom: msm8992: Add support for SDHCI2
arm64: dts: qcom: msm8994: Add SDHCI2 node
arm64: dts: qcom: msm8992: Add BLSP_I2C1 support
arm64: dts: qcom: talkman: Add Synaptics RMI4 touchscreen
arm64: dts: qcom: msm8994: Add USB support
arm64: dts: qcom: msm8992: Add USB support
arm64: dts: qcom: Add support for Microsoft Lumia 950 XL (Cityman)

 arch/arm64/boot/dts/qcom/Makefile             |   1 +
 .../dts/qcom/msm8992-msft-lumia-talkman.dts   |  28 ++++
 arch/arm64/boot/dts/qcom/msm8992.dtsi         | 120 ++++++++++++++++++
 .../dts/qcom/msm8994-msft-lumia-cityman.dts   |  73 +++++++++++
 arch/arm64/boot/dts/qcom/msm8994.dtsi         |  90 +++++++++++++
 arch/arm64/boot/dts/qcom/pm8994.dtsi          |  96 ++++++++++----
 6 files changed, 384 insertions(+), 24 deletions(-)
 create mode 100644 arch/arm64/boot/dts/qcom/msm8994-msft-lumia-cityman.dts
Signature · 1 line
2.28.0
#1 lore raw

PATCH 1/11 arm64: dts: qcom: pm8994: Add VADC node

Add VADC note and some of its channels to allow
for voltage/temperature reading.

---
 arch/arm64/boot/dts/qcom/pm8994.dtsi | 36 +++++++++++++++++++++++++++-
 1 file changed, 35 insertions(+), 1 deletion(-)
arch/arm64/boot/dts/qcom/pm8994.dtsi +35 -1
index 7e4f777746cb..ea2a3d53f859 100644
@@ -1,7 +1,8 @@
 // SPDX-License-Identifier: GPL-2.0
+#include <dt-bindings/iio/qcom,spmi-vadc.h>
+#include <dt-bindings/input/linux-event-codes.h>
 #include <dt-bindings/interrupt-controller/irq.h>
 #include <dt-bindings/spmi/spmi.h>
-#include <dt-bindings/input/linux-event-codes.h>
 
 &spmi_bus {
 
@@ -35,6 +36,39 @@ pwrkey {
 
 		};
 
+		pm8994_vadc: adc@3100 {
+			compatible = "qcom,spmi-vadc";
+			reg = <0x3100>;
+			interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			#io-channel-cells = <1>;
+
+			adc-chan@7 {
+				reg = <VADC_VSYS>;
+				qcom,pre-scaling = <1 3>;
+				label = "vph_pwr";
+			};
+			adc-chan@8 {
+				reg = <VADC_DIE_TEMP>;
+				label = "die_temp";
+			};
+			adc-chan@9 {
+				reg = <VADC_REF_625MV>;
+				label = "ref_625mv";
+			};
+			adc-chan@a {
+				reg = <VADC_REF_1250MV>;
+				label = "ref_1250mv";
+			};
+			adc-chan@e {
+				reg = <VADC_GND_REF>;
+			};
+			adc-chan@f {
+				reg = <VADC_VDD_VADC>;
+			};
+		};
+
 		pm8994_gpios: gpios@c000 {
 			compatible = "qcom,pm8994-gpio";
 			reg = <0xc000>;
Signature · 1 line
2.28.0
#2 lore raw

PATCH 2/11 arm64: dts: qcom: pm8994: Add temperature alarm node

In reply to Konrad Dybcio
---
 arch/arm64/boot/dts/qcom/pm8994.dtsi | 9 +++++++++
 1 file changed, 9 insertions(+)
arch/arm64/boot/dts/qcom/pm8994.dtsi +9 -0
index ea2a3d53f859..7825208b0d8b 100644
@@ -36,6 +36,15 @@ pwrkey {
 
 		};
 
+		pm8994_temp: temp-alarm@2400 {
+			compatible = "qcom,spmi-temp-alarm";
+			reg = <0x2400>;
+			interrupts = <0x0 0x24 0x0 IRQ_TYPE_EDGE_RISING>;
+			io-channels = <&pm8994_vadc VADC_DIE_TEMP>;
+			io-channel-names = "thermal";
+			#thermal-sensor-cells = <0>;
+		};
+
 		pm8994_vadc: adc@3100 {
 			compatible = "qcom,spmi-vadc";
 			reg = <0x3100>;
Signature · 1 line
2.28.0
#3 lore raw

PATCH 3/11 arm64: dts: qcom: pm8994: Add thermal-zones for temp alarm

In reply to Konrad Dybcio

This will shut down the platform in case the PMIC overheats.

---
 arch/arm64/boot/dts/qcom/pm8994.dtsi | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)
arch/arm64/boot/dts/qcom/pm8994.dtsi +24 -0
index 7825208b0d8b..9ab5657f7d23 100644
@@ -4,6 +4,30 @@
 #include <dt-bindings/interrupt-controller/irq.h>
 #include <dt-bindings/spmi/spmi.h>
 
+/ {
+	thermal-zones {
+		pm8994 {
+			polling-delay-passive = <250>;
+			polling-delay = <1000>;
+
+			thermal-sensors = <&pm8994_temp>;
+
+			trips {
+				pm8994_alert0: pm8994-alert0 {
+					temperature = <95000>;
+					hysteresis = <2000>;
+					type = "passive";
+				};
+				pm8994_crit: pm8994-crit {
+					temperature = <125000>;
+					hysteresis = <2000>;
+					type = "critical";
+				};
+			};
+		};
+	};
+};
+
 &spmi_bus {
 
 	pmic@0 {
Signature · 1 line
2.28.0
#4 lore raw

Re: [PATCH 03/11] arm64: dts: qcom: pm8994: Add thermal-zones for temp alarm

Quoted 19 lines · Konrad Dybcio

This will shut down the platform in case the PMIC overheats.

---
 arch/arm64/boot/dts/qcom/pm8994.dtsi | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)
arch/arm64/boot/dts/qcom/pm8994.dtsi +4 -0
index 7825208b0d8b..9ab5657f7d23 100644
@@ -4,6 +4,30 @@
 #include <dt-bindings/interrupt-controller/irq.h>
 #include <dt-bindings/spmi/spmi.h>
 
+/ {
+	thermal-zones {
+		pm8994 {
+			polling-delay-passive = <250>;

arch/arm64/boot/dts/qcom/pm8994.dtsi line 20

Quoted 10 lines
arch/arm64/boot/dts/qcom/pm8994.dtsi +10 -0
+			polling-delay = <1000>;
+
+			thermal-sensors = <&pm8994_temp>;
+
+			trips {
+				pm8994_alert0: pm8994-alert0 {
+					temperature = <95000>;
+					hysteresis = <2000>;
+					type = "passive";
+				};

Don't you want to add a 'hot' trip point, so userspace can get the notification and have an opportunity to do some action like unplugging some CPU before a wild shutdown happens ?

Quoted 14 lines
arch/arm64/boot/dts/qcom/pm8994.dtsi +10 -0
+				pm8994_crit: pm8994-crit {
+					temperature = <125000>;
+					hysteresis = <2000>;
+					type = "critical";
+				};
+			};
+		};
+	};
+};
+
 &spmi_bus {
 
 	pmic@0 {
Signature · 5 lines
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
#5 lore raw

Re: [PATCH 03/11] arm64: dts: qcom: pm8994: Add thermal-zones for temp alarm

Quoted 3 lines

Don't you want to add a 'hot' trip point, so userspace can get the notification and have an opportunity to do some action like unplugging some CPU before a wild shutdown happens ?

PM8998 doesn't do that and so I followed.

Anyway, msm8992/4 will never have all CPUs online at once, unless it's put in a freezer, so unplugging isn't much of an argument :D

If you want though, I can resend this patch AND add a hot point to pm8998.

Konrad

#6 lore raw

Re: [PATCH 03/11] arm64: dts: qcom: pm8994: Add thermal-zones for temp alarm

Quoted 8 lines · Konrad Dybcio
Quoted 3 lines

Don't you want to add a 'hot' trip point, so userspace can get the notification and have an opportunity to do some action like unplugging some CPU before a wild shutdown happens ?

PM8998 doesn't do that and so I followed.

Anyway, msm8992/4 will never have all CPUs online at once, unless it's put in a freezer, so unplugging isn't much of an argument :D

What do you mean by they are not "online at once" ?

Quoted 1 line

If you want though, I can resend this patch AND add a hot point to pm8998.

It is just a suggestion, it is up to you and the SoC maintainer.

Signature · 5 lines
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
#7 lore raw

Re: [PATCH 03/11] arm64: dts: qcom: pm8994: Add thermal-zones for temp alarm

Quoted 1 line

What do you mean by they are not "online at once" ?

msm8992/4 are infamous for their thermal issues. Manufacturers have been known for straight up disabling some cores or tuning the kernel in such a way that some cores get disabled due to the thermal constraints.

Konrad

#8 lore raw

Re: [PATCH 03/11] arm64: dts: qcom: pm8994: Add thermal-zones for temp alarm

Quoted 6 lines · Konrad Dybcio
Quoted 1 line

What do you mean by they are not "online at once" ?

msm8992/4 are infamous for their thermal issues. Manufacturers have been known for straight up disabling some cores or tuning the kernel in such a way that some cores get disabled due to the thermal constraints.

Thanks for the clarification.
I was imagining some kind of hardware feature :)

Signature · 5 lines
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
#9 lore raw

PATCH 4/11 arm64: dts: qcom: pm8994: Fix up spmi-gpio node

In reply to Konrad Dybcio

Add a common compatible and switch to gpio-ranges.

---
 arch/arm64/boot/dts/qcom/pm8994.dtsi | 27 ++++-----------------------
 1 file changed, 4 insertions(+), 23 deletions(-)
arch/arm64/boot/dts/qcom/pm8994.dtsi +4 -23
index 9ab5657f7d23..5ffdf37d8e31 100644
@@ -103,32 +103,13 @@ adc-chan@f {
 		};
 
 		pm8994_gpios: gpios@c000 {
-			compatible = "qcom,pm8994-gpio";
+			compatible = "qcom,pm8994-gpio", "qcom,spmi-gpio";
 			reg = <0xc000>;
 			gpio-controller;
+			gpio-ranges = <&pm8994_gpios 0 0 22>;
 			#gpio-cells = <2>;
-			interrupts = <0 0xc0 0 IRQ_TYPE_NONE>,
-				     <0 0xc1 0 IRQ_TYPE_NONE>,
-				     <0 0xc2 0 IRQ_TYPE_NONE>,
-				     <0 0xc3 0 IRQ_TYPE_NONE>,
-				     <0 0xc4 0 IRQ_TYPE_NONE>,
-				     <0 0xc5 0 IRQ_TYPE_NONE>,
-				     <0 0xc6 0 IRQ_TYPE_NONE>,
-				     <0 0xc7 0 IRQ_TYPE_NONE>,
-				     <0 0xc8 0 IRQ_TYPE_NONE>,
-				     <0 0xc9 0 IRQ_TYPE_NONE>,
-				     <0 0xca 0 IRQ_TYPE_NONE>,
-				     <0 0xcb 0 IRQ_TYPE_NONE>,
-				     <0 0xcc 0 IRQ_TYPE_NONE>,
-				     <0 0xcd 0 IRQ_TYPE_NONE>,
-				     <0 0xce 0 IRQ_TYPE_NONE>,
-				     <0 0xcf 0 IRQ_TYPE_NONE>,
-				     <0 0xd0 0 IRQ_TYPE_NONE>,
-				     <0 0xd1 0 IRQ_TYPE_NONE>,
-				     <0 0xd2 0 IRQ_TYPE_NONE>,
-				     <0 0xd3 0 IRQ_TYPE_NONE>,
-				     <0 0xd4 0 IRQ_TYPE_NONE>,
-				     <0 0xd5 0 IRQ_TYPE_NONE>;
+			interrupt-controller;
+			#interrupt-cells = <2>;
 		};
 
 		pm8994_mpps: mpps@a000 {
Signature · 1 line
2.28.0
#10 lore raw

PATCH 5/11 arm64: dts: qcom: msm8992: Add support for SDHCI2

In reply to Konrad Dybcio

This will let us use SD cards on our devices.

---
 arch/arm64/boot/dts/qcom/msm8992.dtsi | 59 +++++++++++++++++++++++++++
 1 file changed, 59 insertions(+)
arch/arm64/boot/dts/qcom/msm8992.dtsi +59 -0
index 8626b3a50eda..6242c56a2bfa 100644
@@ -269,6 +269,29 @@ sdhc_1: sdhci@f9824900 {
 			status = "disabled";
 		};
 
+		sdhc_2: sdhci@f98a4900 {
+			compatible = "qcom,sdhci-msm-v4";
+			reg = <0xf98a4900 0x11c>, <0xf98a4000 0x800>;
+			reg-names = "hc_mem", "core_mem";
+
+			interrupts = <GIC_SPI 125 IRQ_TYPE_LEVEL_HIGH>,
+				<GIC_SPI 221 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-names = "hc_irq", "pwr_irq";
+
+			clocks = <&gcc GCC_SDCC2_APPS_CLK>,
+				<&gcc GCC_SDCC2_AHB_CLK>,
+				<&xo_board>;
+			clock-names = "core", "iface", "xo";
+
+			pinctrl-names = "default", "sleep";
+			pinctrl-0 = <&sdc2_clk_on &sdc2_cmd_on &sdc2_data_on>;
+			pinctrl-1 = <&sdc2_clk_off &sdc2_cmd_off &sdc2_data_off>;
+
+			cd-gpios = <&tlmm 100 0>;
+			bus-width = <4>;
+			status = "disabled";
+		};
+
 		blsp1_uart2: serial@f991e000 {
 			compatible = "qcom,msm-uartdm-v1.4", "qcom,msm-uartdm";
 			reg = <0xf991e000 0x1000>;
@@ -573,6 +596,42 @@ i2c13_sleep: i2c13-sleep {
 				drive-strength = <2>;
 				bias-disable;
 			};
+
+			sdc2_clk_on: sdc2-clk-on {
+				pins = "sdc2_clk";
+				bias-disable;
+				drive-strength = <16>;
+			};
+
+			sdc2_clk_off: sdc2-clk-off {
+				pins = "sdc2_clk";
+				bias-disable;
+				drive-strength = <2>;
+			};
+
+			sdc2_cmd_on: sdc2-cmd-on {
+				pins = "sdc2_cmd";
+				bias-pull-up;
+				drive-strength = <10>;
+			};
+
+			sdc2_cmd_off: sdc2-cmd-off {
+				pins = "sdc2_cmd";
+				bias-pull-up;
+				drive-strength = <2>;
+			};
+
+			sdc2_data_on: sdc2-data-on {
+				pins = "sdc2_data";
+				bias-pull-up;
+				drive-strength = <10>;
+			};
+
+			sdc2_data_off: sdc2-data-off {
+				pins = "sdc2_data";
+				bias-pull-up;
+				drive-strength = <2>;
+			};
 		};
 	};
 
Signature · 1 line
2.28.0
#11 lore raw

Re: [PATCH 05/11] arm64: dts: qcom: msm8992: Add support for SDHCI2

Thank you for the patch! Yet something to improve:

Hi Konrad,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on robh/for-next]
[also build test ERROR on v5.9-rc8 next-20201002]
[If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Konrad-Dybcio/pm8994-msm8992-4-DT-updates/20201006-003302
base:   https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
config: arm64-allyesconfig (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.3.0

reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/3d0d6d93b04f8cd064e594520ccc9c361fa8c949
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Konrad-Dybcio/pm8994-msm8992-4-DT-updates/20201006-003302 git checkout 3d0d6d93b04f8cd064e594520ccc9c361fa8c949
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm64

If you fix the issue, kindly add following tag as appropriate

All errors (new ones prefixed by >>):

>> Error: arch/arm64/boot/dts/qcom/msm8992.dtsi:282.11-12 syntax error

FATAL ERROR: Unable to parse input tree

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

#12 lore raw

Re: [PATCH 05/11] arm64: dts: qcom: msm8992: Add support for SDHCI2

Please note that the bot is correct (this patch does not build if applied on its own), but I mentioned its dependence on a clk patch in the cover letter.

Konrad

#13 lore raw

PATCH 6/11 arm64: dts: qcom: msm8994: Add SDHCI2 node

In reply to Konrad Dybcio

Add SDHCI2 to enable use of uSD cards on msm8994.

---
 arch/arm64/boot/dts/qcom/msm8994.dtsi | 59 +++++++++++++++++++++++++++
 1 file changed, 59 insertions(+)
arch/arm64/boot/dts/qcom/msm8994.dtsi +59 -0
index 6707f898607f..65089d7670f6 100644
@@ -305,6 +305,29 @@ sdhc1: sdhci@f9824900 {
 			status = "disabled";
 		};
 
+		sdhc2: sdhci@f98a4900 {
+			compatible = "qcom,sdhci-msm-v4";
+			reg = <0xf98a4900 0x11c>, <0xf98a4000 0x800>;
+			reg-names = "hc_mem", "core_mem";
+
+			interrupts = <GIC_SPI 125 IRQ_TYPE_LEVEL_HIGH>,
+				<GIC_SPI 221 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-names = "hc_irq", "pwr_irq";
+
+			clocks = <&gcc GCC_SDCC2_APPS_CLK>,
+				<&gcc GCC_SDCC2_AHB_CLK>,
+				<&xo_board>;
+			clock-names = "core", "iface", "xo";
+
+			pinctrl-names = "default", "sleep";
+			pinctrl-0 = <&sdc2_clk_on &sdc2_cmd_on &sdc2_data_on>;
+			pinctrl-1 = <&sdc2_clk_off &sdc2_cmd_off &sdc2_data_off>;
+
+			cd-gpios = <&tlmm 100 0>;
+			bus-width = <4>;
+			status = "disabled";
+		};
+
 		blsp1_dma: dma@f9904000 {
 			compatible = "qcom,bam-v1.7.0";
 			reg = <0xf9904000 0x19000>;
@@ -683,6 +706,42 @@ sdc1_rclk_off: rclk-off {
 				pins = "sdc1_rclk";
 				bias-pull-down;
 			};
+
+			sdc2_clk_on: sdc2-clk-on {
+				pins = "sdc2_clk";
+				bias-disable;
+				drive-strength = <10>;
+			};
+
+			sdc2_clk_off: sdc2-clk-off {
+				pins = "sdc2_clk";
+				bias-disable;
+				drive-strength = <2>;
+			};
+
+			sdc2_cmd_on: sdc2-cmd-on {
+				pins = "sdc2_cmd";
+				bias-pull-up;
+				drive-strength = <10>;
+			};
+
+			sdc2_cmd_off: sdc2-cmd-off {
+				pins = "sdc2_cmd";
+				bias-pull-up;
+				drive-strength = <2>;
+			};
+
+			sdc2_data_on: sdc2-data-on {
+				pins = "sdc2_data";
+				bias-pull-up;
+				drive-strength = <10>;
+			};
+
+			sdc2_data_off: sdc2-data-off {
+				pins = "sdc2_data";
+				bias-pull-up;
+				drive-strength = <2>;
+			};
 		};
 	};
 
Signature · 1 line
2.28.0
#14 lore raw

Re: [PATCH 06/11] arm64: dts: qcom: msm8994: Add SDHCI2 node

Thank you for the patch! Yet something to improve:

Hi Konrad,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on robh/for-next]
[also build test ERROR on v5.9-rc8 next-20201002]
[If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Konrad-Dybcio/pm8994-msm8992-4-DT-updates/20201006-003302
base:   https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
config: arm64-allyesconfig (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.3.0

reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/f1e07023641595ed0891e7ac88c23ac0110ac02a
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Konrad-Dybcio/pm8994-msm8992-4-DT-updates/20201006-003302 git checkout f1e07023641595ed0891e7ac88c23ac0110ac02a
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm64

If you fix the issue, kindly add following tag as appropriate

All errors (new ones prefixed by >>):

>> Error: arch/arm64/boot/dts/qcom/msm8994.dtsi:318.11-12 syntax error

FATAL ERROR: Unable to parse input tree

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

#15 lore raw

Re: [PATCH 06/11] arm64: dts: qcom: msm8994: Add SDHCI2 node

Please note that the bot is correct (this patch does not build if applied on its own), but I mentioned its dependence on a clk patch in the cover letter.

Konrad

#16 lore raw

PATCH 7/11 arm64: dts: qcom: msm8992: Add BLSP_I2C1 support

In reply to Konrad Dybcio

This will be required to support touchscreen on Lumia devices.

---
 arch/arm64/boot/dts/qcom/msm8992.dtsi | 30 +++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)
arch/arm64/boot/dts/qcom/msm8992.dtsi +30 -0
index 6242c56a2bfa..81426577f2bd 100644
@@ -305,6 +305,22 @@ blsp1_uart2: serial@f991e000 {
 			status = "disabled";
 		};
 
+		blsp_i2c1: i2c@f9923000 {
+			compatible = "qcom,i2c-qup-v2.2.1";
+			reg = <0xf9923000 0x500>;
+			interrupts = <GIC_SPI 95 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&gcc GCC_BLSP1_AHB_CLK>,
+						<&gcc GCC_BLSP1_QUP1_I2C_APPS_CLK>;
+			clock-names = "iface", "core";
+			clock-frequency = <400000>;
+			pinctrl-names = "default", "sleep";
+			pinctrl-0 = <&i2c1_default>;
+			pinctrl-1 = <&i2c1_sleep>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
 		blsp_i2c2: i2c@f9924000 {
 			compatible = "qcom,i2c-qup-v2.2.1";
 			reg = <0xf9924000 0x500>;
@@ -525,6 +541,20 @@ sdc1_rclk_off: rclk-off {
 				bias-pull-down;
 			};
 
+			i2c1_default: i2c1-default {
+				function = "blsp_i2c1";
+				pins = "gpio2", "gpio3";
+				drive-strength = <2>;
+				bias-disable;
+			};
+
+			i2c1_sleep: i2c1-sleep {
+				function = "gpio";
+				pins = "gpio2", "gpio3";
+				drive-strength = <2>;
+				bias-disable;
+			};
+
 			i2c2_default: i2c2-default {
 				function = "blsp_i2c2";
 				pins = "gpio6", "gpio7";
Signature · 1 line
2.28.0
#17 lore raw

PATCH 8/11 arm64: dts: qcom: talkman: Add Synaptics RMI4 touchscreen

In reply to Konrad Dybcio

This adds touchscreen capabilities to the Lumia 950.

---
 .../dts/qcom/msm8992-msft-lumia-talkman.dts   | 28 +++++++++++++++++++
 1 file changed, 28 insertions(+)
arch/arm64/boot/dts/qcom/msm8992-msft-lumia-talkman.dts +28 -0
index 3cc01f02219d..c337a86a5c77 100644
@@ -32,6 +32,34 @@ chosen {
 	};
 };
 
+&blsp_i2c1 {
+	status = "okay";
+
+	rmi4-i2c-dev@4b {
+		compatible = "syna,rmi4-i2c";
+		reg = <0x4b>;
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		interrupt-parent = <&tlmm>;
+		interrupts = <77 IRQ_TYPE_EDGE_FALLING>;
+
+		rmi4-f01@1 {
+			reg = <0x01>;
+			syna,nosleep-mode = <1>;
+		};
+
+		rmi4-f12@12 {
+			reg = <0x12>;
+			syna,sensor-type = <1>;
+			syna,clip-x-low = <0>;
+			syna,clip-x-high = <1440>;
+			syna,clip-y-low = <0>;
+			syna,clip-y-high = <2560>;
+		};
+	};
+};
+
 &sdhc_1 {
 	status = "okay";
 
Signature · 1 line
2.28.0
#18 lore raw

PATCH 9/11 arm64: dts: qcom: msm8994: Add USB support

In reply to Konrad Dybcio

This is a very basic dwc3 configuration (no PHYs yet), but it works.

---
 arch/arm64/boot/dts/qcom/msm8994.dtsi | 31 +++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)
arch/arm64/boot/dts/qcom/msm8994.dtsi +31 -0
index 65089d7670f6..8612a11c3584 100644
@@ -282,6 +282,37 @@ frame@f9028000 {
 			};
 		};
 
+		usb3: usb@f92f8800 {
+			compatible = "qcom,msm8996-dwc3", "qcom,dwc3";
+			reg = <0xf92f8800 0x400>;
+			#address-cells = <1>;
+			#size-cells = <1>;
+			ranges;
+
+			clocks = <&gcc GCC_USB30_MASTER_CLK>,
+				 <&gcc GCC_SYS_NOC_USB3_AXI_CLK>,
+				 <&gcc GCC_USB30_SLEEP_CLK>,
+				 <&gcc GCC_USB30_MOCK_UTMI_CLK>;
+			clock-names = "core", "iface", "sleep", "mock_utmi", "ref", "xo";
+
+			assigned-clocks = <&gcc GCC_USB30_MOCK_UTMI_CLK>,
+					  <&gcc GCC_USB30_MASTER_CLK>;
+			assigned-clock-rates = <19200000>, <120000000>;
+
+			power-domains = <&gcc USB30_GDSC>;
+			qcom,select-utmi-as-pipe-clk;
+
+			dwc3@f9200000 {
+				compatible = "snps,dwc3";
+				reg = <0xf9200000 0xcc00>;
+				interrupts = <0 131 IRQ_TYPE_LEVEL_HIGH>;
+				snps,dis_u2_susphy_quirk;
+				snps,dis_enblslpm_quirk;
+				maximum-speed = "high-speed";
+				dr_mode = "peripheral";
+			};
+		};
+
 		sdhc1: sdhci@f9824900 {
 			compatible = "qcom,sdhci-msm-v4";
 			reg = <0xf9824900 0x1a0>, <0xf9824000 0x800>;
Signature · 1 line
2.28.0
#19 lore raw

PATCH 10/11 arm64: dts: qcom: msm8992: Add USB support

In reply to Konrad Dybcio

This is a very basic dwc3 configuration (no PHYs yet), but it works.

---
 arch/arm64/boot/dts/qcom/msm8992.dtsi | 31 +++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)
arch/arm64/boot/dts/qcom/msm8992.dtsi +31 -0
index 81426577f2bd..0c422af47917 100644
@@ -242,6 +242,37 @@ frame@f9028000 {
 			};
 		};
 
+		usb3: usb@f92f8800 {
+			compatible = "qcom,msm8996-dwc3", "qcom,dwc3";
+			reg = <0xf92f8800 0x400>;
+			#address-cells = <1>;
+			#size-cells = <1>;
+			ranges;
+
+			clocks = <&gcc GCC_USB30_MASTER_CLK>,
+				 <&gcc GCC_SYS_NOC_USB3_AXI_CLK>,
+				 <&gcc GCC_USB30_SLEEP_CLK>,
+				 <&gcc GCC_USB30_MOCK_UTMI_CLK>;
+			clock-names = "core", "iface", "sleep", "mock_utmi", "ref", "xo";
+
+			assigned-clocks = <&gcc GCC_USB30_MOCK_UTMI_CLK>,
+					  <&gcc GCC_USB30_MASTER_CLK>;
+			assigned-clock-rates = <19200000>, <120000000>;
+
+			power-domains = <&gcc USB30_GDSC>;
+			qcom,select-utmi-as-pipe-clk;
+
+			dwc3@f9200000 {
+				compatible = "snps,dwc3";
+				reg = <0xf9200000 0xcc00>;
+				interrupts = <0 131 IRQ_TYPE_LEVEL_HIGH>;
+				snps,dis_u2_susphy_quirk;
+				snps,dis_enblslpm_quirk;
+				maximum-speed = "high-speed";
+				dr_mode = "peripheral";
+			};
+		};
+
 		sdhc_1: sdhci@f9824900 {
 			compatible = "qcom,sdhci-msm-v4";
 			reg = <0xf9824900 0x1a0>, <0xf9824000 0x800>;
Signature · 1 line
2.28.0
#20 lore raw

PATCH 11/11 arm64: dts: qcom: Add support for Microsoft Lumia 950 XL (Cityman)

In reply to Konrad Dybcio

Add device tree support for Microsoft Lumia 950 XL smartphone. It is based on the msm8994 chipset and is able to boot Linux using a custom EDK2 implementation. EL2 core startup is possible with spin-table, but for now, we'll stick with PSCI.

The board currently supports:
* Screen console via EFIFB
* SDHCI
* I2C
* UART
* PSCI core bringup

---
 arch/arm64/boot/dts/qcom/Makefile             |  1 +
 .../dts/qcom/msm8994-msft-lumia-cityman.dts   | 73 +++++++++++++++++++
 2 files changed, 74 insertions(+)
 create mode 100644 arch/arm64/boot/dts/qcom/msm8994-msft-lumia-cityman.dts
arch/arm64/boot/dts/qcom/Makefile +1 -0
index fb4631f898fd..030d9648fb11 100644
@@ -12,6 +12,7 @@ dtb-$(CONFIG_ARCH_QCOM)	+= msm8992-bullhead-rev-101.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8992-msft-lumia-talkman.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8992-xiaomi-libra.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8994-angler-rev-101.dtb
+dtb-$(CONFIG_ARCH_QCOM)	+= msm8994-msft-lumia-cityman.dts
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8994-sony-xperia-kitakami-sumire.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8996-mtp.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8998-asus-novago-tp370ql.dtb
arch/arm64/boot/dts/qcom/msm8994-msft-lumia-cityman.dts new file +73 -0

73 lines not on this page · raw message

Signature · 1 line
2.28.0
#21 lore raw

Re: [PATCH 11/11] arm64: dts: qcom: Add support for Microsoft Lumia 950 XL (Cityman)

Quoted 1 line

+dtb-$(CONFIG_ARCH_QCOM) += msm8994-msft-lumia-cityman.dts

I made a typo and instead of .dtb I wrote .dts here. Could that be fixed when applying so that I don't have to spam you guys with 11 more mails?

Konrad

#22 lore raw

Re: [PATCH 11/11] arm64: dts: qcom: Add support for Microsoft Lumia 950 XL (Cityman)

Quoted 6 lines · Konrad Dybcio
Quoted 1 line

+dtb-$(CONFIG_ARCH_QCOM) += msm8994-msft-lumia-cityman.dts

I made a typo and instead of .dtb I wrote .dts here. Could that be fixed when applying so that I don't have to spam you guys with 11 more mails?

Thanks for letting me know, I fixed this up and applied the series for 5.11.

Regards,
Bjorn