devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 0/6] support oneplus-lemonade(p) devices
@ 2023-11-11 22:07 Nia Espera
  2023-11-11 22:07 ` [PATCH v4 1/6] dt-bindings: iio: adc: qcom: Add Qualcomm smb139x Nia Espera
                   ` (6 more replies)
  0 siblings, 7 replies; 15+ messages in thread
From: Nia Espera @ 2023-11-11 22:07 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Jonathan Cameron,
	Lars-Peter Clausen, Rob Herring, Conor Dooley, Kees Cook,
	Tony Luck, Guilherme G. Piccoli, Vinod Koul, Krzysztof Kozlowski,
	Krzysztof Kozlowski
  Cc: linux-arm-msm, linux-iio, devicetree, phone-devel, Rob,
	Clayton Craft, Caleb Connolly, Luca Weiss,
	~postmarketos/upstreaming, Nia Espera

Patch series adding support for oneplus-lemonade and oneplus-lemonadep
devices (OnePlus 9 & 9 Pro), along with a few needed fixups. Currently
working as of this series:

- USB OTG
- UFS
- Framebuffer display
- Touchscreen (for lemonade)
- Power & volume down keys
- Battery reading
- Modem, IPA, and remoteproc bringup

Signed-off-by: Nia Espera <nespera@igalia.com>
---
Changes in v4:
- Fixed up some small naming-related nits.
- Link to v3: https://lore.kernel.org/r/20231108-nia-sm8350-for-upstream-v3-0-18a024b5c74c@igalia.com

Changes in v3:
- Fixed up more incorrect devicetree properties.
- Properly enabled the fsa type-C mux.
- Added node for sm8350 PMIC glink.
- Patch name fixes.
- Link to v2: https://lore.kernel.org/r/20231018-nia-sm8350-for-upstream-v2-0-7b243126cb77@igalia.com

Changes in v2:
- Fixed up formatting/style.
- Removed unused pinctrl nodes.
- Removed unused properties.
- Moved ADC7 defines to vadc header.
- Edited copyright on lemonade dts and license on spmi header.
- Fixed up therm channels.
- Removed unnecessary hack w.r.t. timer node.
- Link to v1: https://lore.kernel.org/r/20231016-nia-sm8350-for-upstream-v1-0-bb557a0af2e9@igalia.com

---
Nia Espera (6):
      dt-bindings: iio: adc: qcom: Add Qualcomm smb139x
      arm64: dts: qcom: sm8350: Fix DMA0 address
      arm64: dts: qcom: pm8350k: Remove hanging whitespace
      arm64: dts: qcom: sm8350: Fix remoteproc interrupt type
      dt-bindings: arm: qcom: Add oneplus-lemonade(p)
      arm64: dts: qcom: sm8350-lemonade(p): New devices

 Documentation/devicetree/bindings/arm/qcom.yaml    |    2 +
 arch/arm64/boot/dts/qcom/Makefile                  |    2 +
 arch/arm64/boot/dts/qcom/pmk8350.dtsi              |    2 +-
 .../arm64/boot/dts/qcom/sm8350-oneplus-common.dtsi | 1086 ++++++++++++++++++++
 .../boot/dts/qcom/sm8350-oneplus-lemonade.dts      |   85 ++
 .../boot/dts/qcom/sm8350-oneplus-lemonadep.dts     |   20 +
 arch/arm64/boot/dts/qcom/sm8350.dtsi               |   12 +-
 include/dt-bindings/iio/qcom,spmi-adc7-smb139x.h   |   19 +
 include/dt-bindings/iio/qcom,spmi-vadc.h           |    3 +
 9 files changed, 1224 insertions(+), 7 deletions(-)
---
base-commit: ffc253263a1375a65fa6c9f62a893e9767fbebfa
change-id: 20231016-nia-sm8350-for-upstream-2f452366e421

Best regards,
-- 
Nia Espera <nespera@igalia.com>


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

* [PATCH v4 1/6] dt-bindings: iio: adc: qcom: Add Qualcomm smb139x
  2023-11-11 22:07 [PATCH v4 0/6] support oneplus-lemonade(p) devices Nia Espera
@ 2023-11-11 22:07 ` Nia Espera
  2023-11-25 20:42   ` Jonathan Cameron
  2023-11-25 20:48   ` Jonathan Cameron
  2023-11-11 22:07 ` [PATCH v4 2/6] arm64: dts: qcom: sm8350: Fix DMA0 address Nia Espera
                   ` (5 subsequent siblings)
  6 siblings, 2 replies; 15+ messages in thread
From: Nia Espera @ 2023-11-11 22:07 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Jonathan Cameron,
	Lars-Peter Clausen, Rob Herring, Conor Dooley, Kees Cook,
	Tony Luck, Guilherme G. Piccoli, Vinod Koul, Krzysztof Kozlowski,
	Krzysztof Kozlowski
  Cc: linux-arm-msm, linux-iio, devicetree, phone-devel, Rob,
	Clayton Craft, Caleb Connolly, Luca Weiss,
	~postmarketos/upstreaming, Nia Espera

Bindings for a charger controller chip found on sm8350

Signed-off-by: Nia Espera <nespera@igalia.com>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 include/dt-bindings/iio/qcom,spmi-adc7-smb139x.h | 19 +++++++++++++++++++
 include/dt-bindings/iio/qcom,spmi-vadc.h         |  3 +++
 2 files changed, 22 insertions(+)

diff --git a/include/dt-bindings/iio/qcom,spmi-adc7-smb139x.h b/include/dt-bindings/iio/qcom,spmi-adc7-smb139x.h
new file mode 100644
index 000000000000..c0680d1285cf
--- /dev/null
+++ b/include/dt-bindings/iio/qcom,spmi-adc7-smb139x.h
@@ -0,0 +1,19 @@
+/* SPDX-License-Identifier: GPL-2.0-only OR BSD-3-Clause */
+/*
+ * Copyright (c) 2020 The Linux Foundation. All rights reserved.
+ */
+
+#ifndef _DT_BINDINGS_QCOM_SPMI_VADC_SMB139X_H
+#define _DT_BINDINGS_QCOM_SPMI_VADC_SMB139X_H
+
+#include <dt-bindings/iio/qcom,spmi-vadc.h>
+
+#define SMB139x_1_ADC7_SMB_TEMP			(SMB139x_1_SID << 8 | ADC7_SMB_TEMP)
+#define SMB139x_1_ADC7_ICHG_SMB			(SMB139x_1_SID << 8 | ADC7_ICHG_SMB)
+#define SMB139x_1_ADC7_IIN_SMB			(SMB139x_1_SID << 8 | ADC7_IIN_SMB)
+
+#define SMB139x_2_ADC7_SMB_TEMP			(SMB139x_2_SID << 8 | ADC7_SMB_TEMP)
+#define SMB139x_2_ADC7_ICHG_SMB			(SMB139x_2_SID << 8 | ADC7_ICHG_SMB)
+#define SMB139x_2_ADC7_IIN_SMB			(SMB139x_2_SID << 8 | ADC7_IIN_SMB)
+
+#endif
diff --git a/include/dt-bindings/iio/qcom,spmi-vadc.h b/include/dt-bindings/iio/qcom,spmi-vadc.h
index 08adfe25964c..ef07ecd4d585 100644
--- a/include/dt-bindings/iio/qcom,spmi-vadc.h
+++ b/include/dt-bindings/iio/qcom,spmi-vadc.h
@@ -239,12 +239,15 @@
 #define ADC7_GPIO3				0x0c
 #define ADC7_GPIO4				0x0d
 
+#define ADC7_SMB_TEMP				0x06
 #define ADC7_CHG_TEMP				0x10
 #define ADC7_USB_IN_V_16			0x11
 #define ADC7_VDC_16				0x12
 #define ADC7_CC1_ID				0x13
 #define ADC7_VREF_BAT_THERM			0x15
 #define ADC7_IIN_FB				0x17
+#define ADC7_ICHG_SMB				0x18
+#define ADC7_IIN_SMB				0x19
 
 /* 30k pull-up1 */
 #define ADC7_AMUX_THM1_30K_PU			0x24

-- 
2.42.1


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

* [PATCH v4 2/6] arm64: dts: qcom: sm8350: Fix DMA0 address
  2023-11-11 22:07 [PATCH v4 0/6] support oneplus-lemonade(p) devices Nia Espera
  2023-11-11 22:07 ` [PATCH v4 1/6] dt-bindings: iio: adc: qcom: Add Qualcomm smb139x Nia Espera
@ 2023-11-11 22:07 ` Nia Espera
  2023-11-11 22:07 ` [PATCH v4 3/6] arm64: dts: qcom: pm8350k: Remove hanging whitespace Nia Espera
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 15+ messages in thread
From: Nia Espera @ 2023-11-11 22:07 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Jonathan Cameron,
	Lars-Peter Clausen, Rob Herring, Conor Dooley, Kees Cook,
	Tony Luck, Guilherme G. Piccoli, Vinod Koul, Krzysztof Kozlowski,
	Krzysztof Kozlowski
  Cc: linux-arm-msm, linux-iio, devicetree, phone-devel, Rob,
	Clayton Craft, Caleb Connolly, Luca Weiss,
	~postmarketos/upstreaming, Nia Espera

DMA0 node downstream is specified at 0x900000, so fix the typo. Without
this, enabling any i2c node using DMA0 causes a hang.

Fixes: bc08fbf49bc8 ("arm64: dts: qcom: sm8350: Define GPI DMA engines")
Fixes: 41d6bca799b3 ("arm64: dts: qcom: sm8350: correct DMA controller unit address")
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Nia Espera <nespera@igalia.com>
---
 arch/arm64/boot/dts/qcom/sm8350.dtsi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/sm8350.dtsi b/arch/arm64/boot/dts/qcom/sm8350.dtsi
index 00604bf7724f..6d12066389fa 100644
--- a/arch/arm64/boot/dts/qcom/sm8350.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8350.dtsi
@@ -918,9 +918,9 @@ spi19: spi@894000 {
 			};
 		};
 
-		gpi_dma0: dma-controller@9800000 {
+		gpi_dma0: dma-controller@900000 {
 			compatible = "qcom,sm8350-gpi-dma", "qcom,sm6350-gpi-dma";
-			reg = <0 0x09800000 0 0x60000>;
+			reg = <0 0x00900000 0 0x60000>;
 			interrupts = <GIC_SPI 244 IRQ_TYPE_LEVEL_HIGH>,
 				     <GIC_SPI 245 IRQ_TYPE_LEVEL_HIGH>,
 				     <GIC_SPI 246 IRQ_TYPE_LEVEL_HIGH>,

-- 
2.42.1


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

* [PATCH v4 3/6] arm64: dts: qcom: pm8350k: Remove hanging whitespace
  2023-11-11 22:07 [PATCH v4 0/6] support oneplus-lemonade(p) devices Nia Espera
  2023-11-11 22:07 ` [PATCH v4 1/6] dt-bindings: iio: adc: qcom: Add Qualcomm smb139x Nia Espera
  2023-11-11 22:07 ` [PATCH v4 2/6] arm64: dts: qcom: sm8350: Fix DMA0 address Nia Espera
@ 2023-11-11 22:07 ` Nia Espera
  2023-11-11 22:07 ` [PATCH v4 4/6] arm64: dts: qcom: sm8350: Fix remoteproc interrupt type Nia Espera
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 15+ messages in thread
From: Nia Espera @ 2023-11-11 22:07 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Jonathan Cameron,
	Lars-Peter Clausen, Rob Herring, Conor Dooley, Kees Cook,
	Tony Luck, Guilherme G. Piccoli, Vinod Koul, Krzysztof Kozlowski,
	Krzysztof Kozlowski
  Cc: linux-arm-msm, linux-iio, devicetree, phone-devel, Rob,
	Clayton Craft, Caleb Connolly, Luca Weiss,
	~postmarketos/upstreaming, Nia Espera

pmk8350 has a random tab character inserted, so remove it.

Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Nia Espera <nespera@igalia.com>
---
 arch/arm64/boot/dts/qcom/pmk8350.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/qcom/pmk8350.dtsi b/arch/arm64/boot/dts/qcom/pmk8350.dtsi
index 1eb74017062d..f0ed15458dd7 100644
--- a/arch/arm64/boot/dts/qcom/pmk8350.dtsi
+++ b/arch/arm64/boot/dts/qcom/pmk8350.dtsi
@@ -22,7 +22,7 @@ reboot-mode {
 		mode-bootloader = <0x02>;
 	};
 };
-	
+
 &spmi_bus {
 	pmk8350: pmic@PMK8350_SID {
 		compatible = "qcom,pmk8350", "qcom,spmi-pmic";

-- 
2.42.1


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

* [PATCH v4 4/6] arm64: dts: qcom: sm8350: Fix remoteproc interrupt type
  2023-11-11 22:07 [PATCH v4 0/6] support oneplus-lemonade(p) devices Nia Espera
                   ` (2 preceding siblings ...)
  2023-11-11 22:07 ` [PATCH v4 3/6] arm64: dts: qcom: pm8350k: Remove hanging whitespace Nia Espera
@ 2023-11-11 22:07 ` Nia Espera
  2023-11-16 15:17   ` Konrad Dybcio
  2023-11-11 22:07 ` [PATCH v4 5/6] dt-bindings: arm: qcom: Add oneplus-lemonade(p) Nia Espera
                   ` (2 subsequent siblings)
  6 siblings, 1 reply; 15+ messages in thread
From: Nia Espera @ 2023-11-11 22:07 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Jonathan Cameron,
	Lars-Peter Clausen, Rob Herring, Conor Dooley, Kees Cook,
	Tony Luck, Guilherme G. Piccoli, Vinod Koul, Krzysztof Kozlowski,
	Krzysztof Kozlowski
  Cc: linux-arm-msm, linux-iio, devicetree, phone-devel, Rob,
	Clayton Craft, Caleb Connolly, Luca Weiss,
	~postmarketos/upstreaming, Nia Espera

In a similar vein to
https://lore.kernel.org/lkml/20220530080842.37024-3-manivannan.sadhasivam@linaro.org/,
the remote processors on sm8350 fail to initialize with the 'correct'
(i.e., specified in downstream) IRQ type. Change this to EDGE_RISING.

Signed-off-by: Nia Espera <nespera@igalia.com>
---
 arch/arm64/boot/dts/qcom/sm8350.dtsi | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/sm8350.dtsi b/arch/arm64/boot/dts/qcom/sm8350.dtsi
index 6d12066389fa..7d5ea338a870 100644
--- a/arch/arm64/boot/dts/qcom/sm8350.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8350.dtsi
@@ -2020,7 +2020,7 @@ mpss: remoteproc@4080000 {
 			compatible = "qcom,sm8350-mpss-pas";
 			reg = <0x0 0x04080000 0x0 0x4040>;
 
-			interrupts-extended = <&intc GIC_SPI 264 IRQ_TYPE_LEVEL_HIGH>,
+			interrupts-extended = <&intc GIC_SPI 264 IRQ_TYPE_EDGE_RISING>,
 					      <&smp2p_modem_in 0 IRQ_TYPE_EDGE_RISING>,
 					      <&smp2p_modem_in 1 IRQ_TYPE_EDGE_RISING>,
 					      <&smp2p_modem_in 2 IRQ_TYPE_EDGE_RISING>,
@@ -2062,7 +2062,7 @@ slpi: remoteproc@5c00000 {
 			compatible = "qcom,sm8350-slpi-pas";
 			reg = <0 0x05c00000 0 0x4000>;
 
-			interrupts-extended = <&pdc 9 IRQ_TYPE_LEVEL_HIGH>,
+			interrupts-extended = <&pdc 9 IRQ_TYPE_EDGE_RISING>,
 					      <&smp2p_slpi_in 0 IRQ_TYPE_EDGE_RISING>,
 					      <&smp2p_slpi_in 1 IRQ_TYPE_EDGE_RISING>,
 					      <&smp2p_slpi_in 2 IRQ_TYPE_EDGE_RISING>,
@@ -3206,7 +3206,7 @@ adsp: remoteproc@17300000 {
 			compatible = "qcom,sm8350-adsp-pas";
 			reg = <0 0x17300000 0 0x100>;
 
-			interrupts-extended = <&pdc 6 IRQ_TYPE_LEVEL_HIGH>,
+			interrupts-extended = <&pdc 6 IRQ_TYPE_EDGE_RISING>,
 					      <&smp2p_adsp_in 0 IRQ_TYPE_EDGE_RISING>,
 					      <&smp2p_adsp_in 1 IRQ_TYPE_EDGE_RISING>,
 					      <&smp2p_adsp_in 2 IRQ_TYPE_EDGE_RISING>,
@@ -3511,7 +3511,7 @@ cdsp: remoteproc@98900000 {
 			compatible = "qcom,sm8350-cdsp-pas";
 			reg = <0 0x98900000 0 0x1400000>;
 
-			interrupts-extended = <&intc GIC_SPI 578 IRQ_TYPE_LEVEL_HIGH>,
+			interrupts-extended = <&intc GIC_SPI 578 IRQ_TYPE_EDGE_RISING>,
 					      <&smp2p_cdsp_in 0 IRQ_TYPE_EDGE_RISING>,
 					      <&smp2p_cdsp_in 1 IRQ_TYPE_EDGE_RISING>,
 					      <&smp2p_cdsp_in 2 IRQ_TYPE_EDGE_RISING>,

-- 
2.42.1


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

* [PATCH v4 5/6] dt-bindings: arm: qcom: Add oneplus-lemonade(p)
  2023-11-11 22:07 [PATCH v4 0/6] support oneplus-lemonade(p) devices Nia Espera
                   ` (3 preceding siblings ...)
  2023-11-11 22:07 ` [PATCH v4 4/6] arm64: dts: qcom: sm8350: Fix remoteproc interrupt type Nia Espera
@ 2023-11-11 22:07 ` Nia Espera
  2023-11-12  7:36   ` Krzysztof Kozlowski
  2023-11-11 22:07 ` [PATCH v4 6/6] arm64: dts: qcom: sm8350-lemonade(p): New devices Nia Espera
  2023-12-08  2:57 ` (subset) [PATCH v4 0/6] support oneplus-lemonade(p) devices Bjorn Andersson
  6 siblings, 1 reply; 15+ messages in thread
From: Nia Espera @ 2023-11-11 22:07 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Jonathan Cameron,
	Lars-Peter Clausen, Rob Herring, Conor Dooley, Kees Cook,
	Tony Luck, Guilherme G. Piccoli, Vinod Koul, Krzysztof Kozlowski,
	Krzysztof Kozlowski
  Cc: linux-arm-msm, linux-iio, devicetree, phone-devel, Rob,
	Clayton Craft, Caleb Connolly, Luca Weiss,
	~postmarketos/upstreaming, Nia Espera

Document the devicetree bindings for oneplus-lemonade and oneplus-lemonadep.

Signed-off-by: Nia Espera <nespera@igalia.com>
---
 Documentation/devicetree/bindings/arm/qcom.yaml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Documentation/devicetree/bindings/arm/qcom.yaml b/Documentation/devicetree/bindings/arm/qcom.yaml
index adbfaea32343..90820f54f59a 100644
--- a/Documentation/devicetree/bindings/arm/qcom.yaml
+++ b/Documentation/devicetree/bindings/arm/qcom.yaml
@@ -970,6 +970,8 @@ properties:
       - items:
           - enum:
               - microsoft,surface-duo2
+              - oneplus,lemonade
+              - oneplus,lemonadep
               - qcom,sm8350-hdk
               - qcom,sm8350-mtp
               - sony,pdx214-generic

-- 
2.42.1


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

* [PATCH v4 6/6] arm64: dts: qcom: sm8350-lemonade(p): New devices
  2023-11-11 22:07 [PATCH v4 0/6] support oneplus-lemonade(p) devices Nia Espera
                   ` (4 preceding siblings ...)
  2023-11-11 22:07 ` [PATCH v4 5/6] dt-bindings: arm: qcom: Add oneplus-lemonade(p) Nia Espera
@ 2023-11-11 22:07 ` Nia Espera
  2023-11-22 20:17   ` Konrad Dybcio
  2023-12-08  2:57 ` (subset) [PATCH v4 0/6] support oneplus-lemonade(p) devices Bjorn Andersson
  6 siblings, 1 reply; 15+ messages in thread
From: Nia Espera @ 2023-11-11 22:07 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Jonathan Cameron,
	Lars-Peter Clausen, Rob Herring, Conor Dooley, Kees Cook,
	Tony Luck, Guilherme G. Piccoli, Vinod Koul, Krzysztof Kozlowski,
	Krzysztof Kozlowski
  Cc: linux-arm-msm, linux-iio, devicetree, phone-devel, Rob,
	Clayton Craft, Caleb Connolly, Luca Weiss,
	~postmarketos/upstreaming, Nia Espera

Device tree files for OnePlus 9 and 9 Pro. Details of supported features
mentioned in the cover letter for this patch series, but for
accessibility also repeated here:

- USB OTG
- UFS
- Framebuffer display
- Touchscreen (for lemonade)
- Power & volume down keys
- Battery reading
- Modem, IPA, and remoteproc bringup

Steps to get booting:

- Wipe dtbo partition
- Flash vbmeta with disabled verity bit
- Flash kernel and initfs to boot partition with CLI args pd_ignore_unused
and clk_ignore_unused as v1 bootimg
- Flash rootfs to some other partition (probably super or userdata)

Reviewed-by: Caleb Connolly <caleb.connolly@linaro.org>
Signed-off-by: Nia Espera <nespera@igalia.com>
---
 arch/arm64/boot/dts/qcom/Makefile                  |    2 +
 .../arm64/boot/dts/qcom/sm8350-oneplus-common.dtsi | 1086 ++++++++++++++++++++
 .../boot/dts/qcom/sm8350-oneplus-lemonade.dts      |   85 ++
 .../boot/dts/qcom/sm8350-oneplus-lemonadep.dts     |   20 +
 4 files changed, 1193 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/Makefile b/arch/arm64/boot/dts/qcom/Makefile
index 2cca20563a1d..369ad4721b29 100644
--- a/arch/arm64/boot/dts/qcom/Makefile
+++ b/arch/arm64/boot/dts/qcom/Makefile
@@ -211,6 +211,8 @@ dtb-$(CONFIG_ARCH_QCOM)	+= sm8250-xiaomi-elish-csot.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sm8350-hdk.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sm8350-microsoft-surface-duo2.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sm8350-mtp.dtb
+dtb-$(CONFIG_ARCH_QCOM)	+= sm8350-oneplus-lemonade.dtb
+dtb-$(CONFIG_ARCH_QCOM)	+= sm8350-oneplus-lemonadep.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sm8350-sony-xperia-sagami-pdx214.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sm8350-sony-xperia-sagami-pdx215.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sm8450-hdk.dtb
diff --git a/arch/arm64/boot/dts/qcom/sm8350-oneplus-common.dtsi b/arch/arm64/boot/dts/qcom/sm8350-oneplus-common.dtsi
new file mode 100644
index 000000000000..942b58a142fd
--- /dev/null
+++ b/arch/arm64/boot/dts/qcom/sm8350-oneplus-common.dtsi
@@ -0,0 +1,1086 @@
+// SPDX-License-Identifier: BSD-3-Clause
+/*
+ * Copyright (c) 2023 Igalia S.L.
+ * Authors:
+ *	Nia Espera <nespera@igalia.com>
+ */
+
+#include <dt-bindings/iio/qcom,spmi-adc7-pm8350.h>
+#include <dt-bindings/iio/qcom,spmi-adc7-pm8350b.h>
+#define SMB139x_1_SID 0x0b
+#define SMB139x_2_SID 0x0c
+#include <dt-bindings/iio/qcom,spmi-adc7-smb139x.h>
+#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
+#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
+#include "sm8350.dtsi"
+#include "pm8350.dtsi"
+#include "pm8350b.dtsi"
+#include "pm8350c.dtsi"
+#include "pmk8350.dtsi"
+#include "pmr735a.dtsi"
+#include "pmr735b.dtsi"
+
+/ {
+	chassis-type = "handset";
+	interrupt-parent = <&intc>;
+
+	bat: battery {
+		compatible = "simple-battery";
+		device-chemistry = "lithium-ion";
+		voltage-min-design-microvolt = <3200000>;
+		energy-full-design-microwatt-hours = <15840000>;
+		charge-full-design-microamp-hours = <2225000>;
+	};
+
+	chosen {
+		#address-cells = <2>;
+		#size-cells = <2>;
+		ranges;
+
+		framebuffer: framebuffer@e4d00000 {
+			compatible = "simple-framebuffer";
+			reg = <0 0xe4d00000 0 0x2400000>;
+			width = <1080>;
+			height = <2412>;
+			stride = <(1080 * 4)>;
+			format = "a8r8g8b8";
+			/*
+			 * That's (going to be) a lot of clocks, but it's
+			 * necessary due to unused clk cleanup & no panel
+			 * driver yet.
+			 */
+			clocks = <&gcc GCC_DISP_HF_AXI_CLK>,
+				 <&gcc GCC_DISP_SF_AXI_CLK>;
+		};
+	};
+
+	gpio-keys {
+		compatible = "gpio-keys";
+
+		pinctrl-names = "default";
+		pinctrl-0 = <&vol_down_n>;
+
+		key-vol-up {
+			label = "Volume Up";
+			linux,code = <KEY_VOLUMEUP>;
+			gpios = <&pmk8350_gpios 6 GPIO_ACTIVE_LOW>;
+			debounce-interval = <15>;
+			linux,can-disable;
+			wakeup-source;
+		};
+	};
+
+	pmic-glink {
+		compatible = "qcom,sm8350-pmic-glink", "qcom,pmic-glink";
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		connector@0 {
+			compatible = "usb-c-connector";
+			reg = <0>;
+			power-role = "dual";
+			data-role = "dual";
+
+			ports {
+				#address-cells = <1>;
+				#size-cells = <0>;
+
+				port@0 {
+					reg = <0>;
+
+					pmic_glink_hs_in: endpoint {
+						remote-endpoint = <&usb_1_dwc3_hs>;
+					};
+				};
+
+				/* USB3 not working, so no port@1 */
+
+				port@2 {
+					reg = <2>;
+
+					pmic_glink_sbu: endpoint {
+						remote-endpoint = <&fsa4480_sbu_mux>;
+					};
+				};
+			};
+		};
+	};
+
+	display_panel_avdd: regulator-display {
+		compatible = "regulator-fixed";
+		regulator-name = "display_panel_avdd";
+		regulator-min-microvolt = <5500000>;
+		regulator-max-microvolt = <5500000>;
+		regulator-enable-ramp-delay = <233>;
+
+		enable-active-high;
+		regulator-boot-on;
+	};
+
+	vph_pwr: regulator-vph-pwr {
+		compatible = "regulator-fixed";
+		regulator-name = "vph_pwr";
+		regulator-min-microvolt = <3700000>;
+		regulator-max-microvolt = <3700000>;
+
+		regulator-always-on;
+		regulator-boot-on;
+	};
+};
+
+&adsp {
+	firmware-name = "qcom/sm8350/OnePlus/lemonade/adsp.mbn";
+	status = "okay";
+};
+
+&apps_rsc {
+	regulators-0 {
+		compatible = "qcom,pm8350-rpmh-regulators";
+		qcom,pmic-id = "b";
+
+		vdd-s1-supply = <&vph_pwr>;
+		vdd-s2-supply = <&vph_pwr>;
+		vdd-s3-supply = <&vph_pwr>;
+		vdd-s4-supply = <&vph_pwr>;
+		vdd-s5-supply = <&vph_pwr>;
+		vdd-s6-supply = <&vph_pwr>;
+		vdd-s7-supply = <&vph_pwr>;
+		vdd-s8-supply = <&vph_pwr>;
+		vdd-s9-supply = <&vph_pwr>;
+		vdd-s10-supply = <&vph_pwr>;
+		vdd-s11-supply = <&vph_pwr>;
+		vdd-s12-supply = <&vph_pwr>;
+
+		vdd-l1-l4-supply = <&pm8350_s11>;
+		vdd-l2-l7-supply = <&vreg_bob>;
+		vdd-l3-l5-supply = <&vreg_bob>;
+		vdd-l6-l9-l10-supply = <&pm8350_s11>;
+		vdd-l8-supply = <&pmr735a_s2>;
+
+		/*
+		 * ARC regulators:
+		 * S5 - mx.lvl
+		 * S6 - gfx.lvl
+		 * S9 - mxc.lvl
+		 */
+
+		pm8350_s10: smps10 {
+			regulator-name = "pm8350_s10";
+			regulator-min-microvolt = <1800000>;
+			regulator-max-microvolt = <1800000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		pm8350_s11: smps11 {
+			regulator-name = "pm8350_s11";
+			regulator-min-microvolt = <752000>;
+			regulator-max-microvolt = <1012000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		pm8350_s12: smps12 {
+			regulator-name = "pm8350_s12";
+			regulator-min-microvolt = <1224000>;
+			regulator-max-microvolt = <1360000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		pm8350_l1: ldo1 {
+			regulator-name = "pm8350_l1";
+			regulator-min-microvolt = <912000>;
+			regulator-max-microvolt = <920000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		pm8350_l2: ldo2 {
+			regulator-name = "pm8350_l2";
+			regulator-min-microvolt = <3072000>;
+			regulator-max-microvolt = <3072000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		pm8350_l3: ldo3 {
+			regulator-name = "pm8350_l3";
+			regulator-min-microvolt = <904000>;
+			regulator-max-microvolt = <904000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		/* L4 - lmx.lvl (ARC) */
+
+		pm8350_l5: ldo5 {
+			regulator-name = "pm8350_l5";
+			regulator-min-microvolt = <880000>;
+			regulator-max-microvolt = <888000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+			regulator-allow-set-load;
+			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
+						   RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		pm8350_l6: ldo6 {
+			regulator-name = "pm8350_l6";
+			regulator-min-microvolt = <1200000>;
+			regulator-max-microvolt = <1208000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+			regulator-allow-set-load;
+			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
+						   RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		pm8350_l7: ldo7 {
+			regulator-name = "pm8350_l7";
+			regulator-min-microvolt = <2400000>;
+			regulator-max-microvolt = <3008000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+			regulator-allow-set-load;
+			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
+						   RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		/* L8 - lcx.lvl (ARC) */
+
+		pm8350_l9: ldo9 {
+			regulator-name = "pm8350_l9";
+			regulator-min-microvolt = <1200000>;
+			regulator-max-microvolt = <1200000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+			regulator-allow-set-load;
+			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
+						   RPMH_REGULATOR_MODE_HPM>;
+		};
+	};
+
+	regulators-1 {
+		compatible = "qcom,pm8350c-rpmh-regulators";
+		qcom,pmic-id = "c";
+
+		vdd-s1-supply = <&vph_pwr>;
+		vdd-s2-supply = <&vph_pwr>;
+		vdd-s3-supply = <&vph_pwr>;
+		vdd-s4-supply = <&vph_pwr>;
+		vdd-s5-supply = <&vph_pwr>;
+		vdd-s6-supply = <&vph_pwr>;
+		vdd-s7-supply = <&vph_pwr>;
+		vdd-s8-supply = <&vph_pwr>;
+		vdd-s9-supply = <&vph_pwr>;
+		vdd-s10-supply = <&vph_pwr>;
+
+		vdd-l1-l12-supply = <&pm8350c_s1>;
+		vdd-l2-l8-supply = <&pm8350c_s1>;
+		vdd-l3-l4-l5-l7-l13-supply = <&vreg_bob>;
+		vdd-l6-l9-l11-supply = <&vreg_bob>;
+		vdd-l10-supply = <&pm8350_s12>;
+
+		vdd-bob-supply = <&vph_pwr>;
+
+		pm8350c_s1: smps1 {
+			regulator-name = "pm8350c_s1";
+			regulator-min-microvolt = <1800000>;
+			regulator-max-microvolt = <1952000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		/* S2 - ebi.lvl (ARC) */
+
+		pm8350c_s3: smps3 {
+			regulator-name = "pm8350c_s3";
+			regulator-min-microvolt = <300000>;
+			regulator-max-microvolt = <704000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		/*
+		 * ARC regulators:
+		 * S4 - mss.lvl
+		 * S6 - cx.lvl
+		 * S8 - mmcx.lvl
+		 */
+
+		pm8350c_s10: smps10 {
+			regulator-name = "pm8350c_s10";
+			regulator-min-microvolt = <1048000>;
+			regulator-max-microvolt = <1128000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		pm8350c_l1: ldo1 {
+			regulator-name = "pm8350c_l1";
+			regulator-min-microvolt = <1800000>;
+			regulator-max-microvolt = <1800000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		pm8350c_l2: ldo2 {
+			regulator-name = "pm8350c_l2";
+			regulator-min-microvolt = <1800000>;
+			regulator-max-microvolt = <1800000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		pm8350c_l3: ldo3 {
+			regulator-name = "pm8350c_l3";
+			regulator-min-microvolt = <3000000>;
+			regulator-max-microvolt = <3300000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		pm8350c_l4: ldo4 {
+			regulator-name = "pm8350c_l4";
+			regulator-min-microvolt = <1704000>;
+			regulator-max-microvolt = <3000000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		pm8350c_l5: ldo5 {
+			regulator-name = "pm8350c_l5";
+			regulator-min-microvolt = <1704000>;
+			regulator-max-microvolt = <3000000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		pm8350c_l6: ldo6 {
+			regulator-name = "pm8350c_l6";
+			regulator-min-microvolt = <1800000>;
+			regulator-max-microvolt = <2960000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		pm8350c_l7: ldo7 {
+			regulator-name = "pm8350c_l7";
+			regulator-min-microvolt = <3008000>;
+			regulator-max-microvolt = <3008000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		pm8350c_l8: ldo8 {
+			regulator-name = "pm8350c_l8";
+			regulator-min-microvolt = <1800000>;
+			regulator-max-microvolt = <1800000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		pm8350c_l9: ldo9 {
+			regulator-name = "pm8350c_l9";
+			regulator-min-microvolt = <2800000>;
+			regulator-max-microvolt = <3008000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		pm8350c_l10: ldo10 {
+			regulator-name = "pm8350c_l10";
+			regulator-min-microvolt = <1200000>;
+			regulator-max-microvolt = <1200000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		pm8350c_l11: ldo11 {
+			regulator-name = "pm8350c_l11";
+			regulator-min-microvolt = <2400000>;
+			regulator-max-microvolt = <3008000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		pm8350c_l12: ldo12 {
+			regulator-name = "pm8350c_l12";
+			regulator-min-microvolt = <1800000>;
+			regulator-max-microvolt = <2000000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		pm8350c_l13: ldo13 {
+			regulator-name = "pm8350c_l13";
+			regulator-min-microvolt = <3000000>;
+			regulator-max-microvolt = <3200000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		vreg_bob: bob {
+			regulator-name = "vreg_bob";
+			regulator-min-microvolt = <3400000>;
+			regulator-max-microvolt = <3960000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_AUTO>;
+		};
+	};
+
+	/* pm8350b has one regulator here; unused for now */
+
+	regulators-2 {
+		compatible = "qcom,pmr735a-rpmh-regulators";
+		qcom,pmic-id = "e";
+
+		vdd-s1-supply = <&vph_pwr>;
+		vdd-s2-supply = <&vph_pwr>;
+		vdd-s3-supply = <&vph_pwr>;
+
+		vdd-l1-l2-supply = <&pmr735a_s2>;
+		vdd-l3-supply = <&pmr735a_s1>;
+		vdd-l4-supply = <&pm8350c_s1>;
+		vdd-l5-l6-supply = <&pm8350c_s1>;
+		vdd-l7-bob-supply = <&vreg_bob>;
+
+		pmr735a_s1: smps1 {
+			regulator-name = "pmr735a_s1";
+			regulator-min-microvolt = <1200000>;
+			regulator-max-microvolt = <1280000>;
+		};
+
+		pmr735a_s2: smps2 {
+			regulator-name = "pmr735a_s2";
+			regulator-min-microvolt = <500000>;
+			regulator-max-microvolt = <976000>;
+		};
+
+		pmr735a_s3: smps3 {
+			regulator-name = "pmr735a_s3";
+			regulator-min-microvolt = <2208000>;
+			regulator-max-microvolt = <2352000>;
+		};
+
+		pmr735a_l1: ldo1 {
+			regulator-name = "pmr735a_l1";
+			regulator-min-microvolt = <912000>;
+			regulator-max-microvolt = <912000>;
+		};
+
+		pmr735a_l2: ldo2 {
+			regulator-name = "pmr735a_l2";
+			regulator-min-microvolt = <1200000>;
+			regulator-max-microvolt = <1200000>;
+		};
+
+		pmr735a_l3: ldo3 {
+			regulator-name = "pmr735a_l3";
+			regulator-min-microvolt = <1200000>;
+			regulator-max-microvolt = <1200000>;
+		};
+
+		pmr735a_l4: ldo4 {
+			regulator-name = "pmr735a_l4";
+			regulator-min-microvolt = <1776000>;
+			regulator-max-microvolt = <1872000>;
+		};
+
+		pmr735a_l5: ldo5 {
+			regulator-name = "pmr735a_l5";
+			regulator-min-microvolt = <800000>;
+			regulator-max-microvolt = <800000>;
+		};
+
+		pmr735a_l6: ldo6 {
+			regulator-name = "pmr735a_l6";
+			regulator-min-microvolt = <480000>;
+			regulator-max-microvolt = <904000>;
+		};
+
+		pmr735a_l7: ldo7 {
+			regulator-name = "pmr735a_l7";
+			regulator-min-microvolt = <2800000>;
+			regulator-max-microvolt = <2800000>;
+		};
+	};
+};
+
+&cdsp {
+	firmware-name = "qcom/sm8350/OnePlus/lemonade/cdsp.mbn";
+	status = "okay";
+};
+
+&i2c2 {
+	clock-frequency = <100000>;
+	status = "okay";
+
+	bq27541: fuel-gauge@55 {
+		compatible = "ti,bq27541";
+		reg = <0x55>;
+		monitored-battery = <&bat>;
+	};
+};
+
+&i2c4 {
+	clock-frequency = <400000>;
+	status = "okay";
+
+	/* Touchscreens: Syna TCM oncell or Samsung s6sy761 */
+};
+
+&i2c13 {
+	clock-frequency = <100000>;
+	status = "okay";
+
+	typec-mux@42 {
+		compatible = "fcs,fsa4480";
+		reg = <0x42>;
+
+		interrupts-extended = <&tlmm 2 IRQ_TYPE_LEVEL_LOW>;
+
+		vcc-supply = <&vreg_bob>;
+		mode-switch;
+		orientation-switch;
+
+		port {
+			fsa4480_sbu_mux: endpoint {
+				remote-endpoint = <&pmic_glink_sbu>;
+			};
+		};
+	};
+
+	/* Qualcomm PM8008i/PM8008j @ 8, 9, c, d */
+};
+
+&i2c15 {
+	clock-frequency = <400000>;
+	status = "okay";
+
+	/* sn-nci NFC controller @ 28 */
+};
+
+&gpi_dma0 {
+	status = "okay";
+};
+
+&gpi_dma1 {
+	status = "okay";
+};
+
+&gpi_dma2 {
+	status = "okay";
+};
+
+&ipa {
+	qcom,gsi-loader = "self";
+	memory-region = <&pil_ipa_fw_mem>;
+	firmware-name = "qcom/sm8350/OnePlus/lemonade/ipa_fws.mbn";
+	status = "okay";
+};
+
+&mpss {
+	firmware-name = "qcom/sm8350/OnePlus/lemonade/modem.mbn";
+	status = "okay";
+};
+
+&pcie0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pcie0_default_state>;
+
+	perst-gpios = <&tlmm 94 GPIO_ACTIVE_HIGH>;
+	wake-gpios = <&tlmm 96 GPIO_ACTIVE_HIGH>;
+
+	status = "okay";
+};
+
+&pcie0_phy {
+	vdda-phy-supply = <&pm8350_l5>;
+	vdda-pll-supply = <&pm8350_l6>;
+
+	status = "okay";
+};
+
+&pm8350_gpios {
+	gpio1_adc_default: gpio1-adc-default-state {
+		pins = "gpio1";
+		function = "normal";
+		bias-high-impedance;
+		bias-disable;
+	};
+
+	gpio3_adc_default: gpio3-adc-default-state {
+		pins = "gpio3";
+		function = "normal";
+		bias-high-impedance;
+		bias-disable;
+	};
+
+	vol_down_n: vol-down-n-state {
+		pins = "gpio6";
+		function = "normal";
+		power-source = <1>;
+		bias-pull-up;
+		input-enable;
+	};
+};
+
+&pmk8350_adc_tm {
+	status = "okay";
+
+	pm8350-msm-therm@0 {
+		reg = <0>;
+		io-channels = <&pmk8350_vadc PM8350_ADC7_AMUX_THM1_100K_PU(1)>;
+		qcom,ratiometric;
+		qcom,hw-settle-time-us = <200>;
+	};
+
+	pm8350-cam-flash-therm@1 {
+		reg = <1>;
+		io-channels = <&pmk8350_vadc PM8350_ADC7_AMUX_THM2_100K_PU(1)>;
+		qcom,ratiometric;
+		qcom,hw-settle-time-us = <200>;
+	};
+
+	pm8350-hot-pocket-therm@2 {
+		reg = <2>;
+		io-channels = <&pmk8350_vadc PM8350_ADC7_AMUX_THM3_100K_PU(1)>;
+		qcom,ratiometric;
+		qcom,hw-settle-time-us = <200>;
+	};
+
+	pm8350-wide-rfc-therm@3 {
+		reg = <3>;
+		io-channels = <&pmk8350_vadc PM8350_ADC7_AMUX_THM4_100K_PU(1)>;
+		qcom,ratiometric;
+		qcom,hw-settle-time-us = <200>;
+	};
+
+	pm8350-rear-tof-therm@4 {
+		reg = <4>;
+		io-channels = <&pmk8350_vadc PM8350_ADC7_AMUX_THM5_100K_PU(1)>;
+		qcom,ratiometric;
+		qcom,hw-settle-time-us = <200>;
+	};
+
+	pm8350b-usb-conn-therm@5 {
+		reg = <5>;
+		io-channels = <&pmk8350_vadc PM8350B_ADC7_AMUX_THM4_100K_PU>;
+		qcom,ratiometric;
+		qcom,hw-settle-time-us = <200>;
+	};
+
+	pm8350b-wl-chg-therm@6 {
+		reg = <6>;
+		io-channels = <&pmk8350_vadc PM8350B_ADC7_GPIO2_100K_PU>;
+		qcom,ratiometric;
+		qcom,hw-settle-time-us = <200>;
+	};
+};
+
+&pmk8350_rtc {
+	status = "okay";
+};
+
+&pmk8350_vadc {
+	pinctrl-names = "default";
+	pinctrl-0 = <&gpio1_adc_default>, <&gpio3_adc_default>;
+
+	/* pmk8350-ref-gnd */
+	channel@0 {
+		reg = <0x00>;
+		qcom,pre-scaling = <1 1>;
+		label = "pmk8350_ref_gnd";
+	};
+
+	/* pmk8350-vref-1p25 */
+	channel@1 {
+		reg = <0x01>;
+		qcom,pre-scaling = <1 1>;
+		label = "pmk8350_vref_1p25";
+	};
+
+	/* pmk8350-die-temp */
+	channel@3 {
+		reg = <0x03>;
+		qcom,pre-scaling = <1 1>;
+		label = "pmk8350_die_temp";
+	};
+
+	/* pm8350-ref-gnd */
+	channel@100 {
+		reg = <0x100>;
+		qcom,pre-scaling = <1 1>;
+		label = "pm8350_ref_gnd";
+	};
+
+	/*pm8350-vref-1p25*/
+	channel@101 {
+		reg = <0x101>;
+		qcom,pre-scaling = <1 1>;
+		label = "pm8350_vref_1p25";
+	};
+
+	/* pm8350-die-temp */
+	channel@103 {
+		reg = <0x103>;
+		qcom,pre-scaling = <1 1>;
+		label = "pm8350_die_temp";
+	};
+
+	/* gpio1-v */
+	channel@128 {
+		reg = <0x128>;
+		qcom,ratiometric;
+		qcom,hw-settle-time = <700>;
+		qcom,pre-scaling = <1 1>;
+		label = "gpio1_v";
+	};
+
+	/* gpio3-v */
+	channel@12b {
+		reg = <0x12b>;
+		qcom,ratiometric;
+		qcom,hw-settle-time = <700>;
+		qcom,pre-scaling = <1 1>;
+		label = "gpio3_v";
+	};
+
+	/* pm8350-msm-therm */
+	channel@144 {
+		reg = <PM8350_ADC7_AMUX_THM1_100K_PU(1)>;
+		qcom,ratiometric;
+		qcom,hw-settle-time = <200>;
+		qcom,pre-scaling = <1 1>;
+		label = "pm8350_msm_therm";
+	};
+
+	/* pm8350-cam-flash-therm */
+	channel@145 {
+		reg = <PM8350_ADC7_AMUX_THM2_100K_PU(1)>;
+		qcom,ratiometric;
+		qcom,hw-settle-time = <200>;
+		qcom,pre-scaling = <1 1>;
+		label = "pm8350_cam_flash_therm";
+	};
+
+	/* pm8350-hot-pocket-therm */
+	channel@146 {
+		reg = <PM8350_ADC7_AMUX_THM3_100K_PU(1)>;
+		qcom,ratiometric;
+		qcom,hw-settle-time = <200>;
+		qcom,pre-scaling = <1 1>;
+		label = "pm8350_hot_pocket_therm";
+	};
+
+	/* pm8350-wide-rfc-therm */
+	channel@147 {
+		reg = <PM8350_ADC7_AMUX_THM4_100K_PU(1)>;
+		qcom,ratiometric;
+		qcom,hw-settle-time = <200>;
+		qcom,pre-scaling = <1 1>;
+		label = "pm8350_wide_rfc_therm";
+	};
+
+	/* pm8350-rear-tof-therm */
+	channel@148 {
+		reg = <PM8350_ADC7_AMUX_THM5_100K_PU(1)>;
+		qcom,ratiometric;
+		qcom,hw-settle-time = <200>;
+		qcom,pre-scaling = <1 1>;
+		label = "pm8350_rear_tof_therm";
+	};
+
+	/* pm8350-vph-pwr */
+	channel@18e {
+		reg = <0x18e>;
+		qcom,pre-scaling = <1 3>;
+		label = "pm8350_vph_pwr";
+	};
+
+	/* pm8350b-ref-gnd */
+	channel@300 {
+		reg = <0x300>;
+		qcom,pre-scaling = <1 1>;
+		label = "pm8350b_ref_gnd";
+	};
+
+	/* pm8350b-vref-1p25 */
+	channel@301 {
+		reg = <0x301>;
+		qcom,pre-scaling = <1 1>;
+		label = "pm8350b_vref_1p25";
+	};
+
+	/* pm8350b-die-temp */
+	channel@303 {
+		reg = <0x303>;
+		qcom,pre-scaling = <1 1>;
+		label = "pm8350b_die_temp";
+	};
+
+	/* pm8350b-chg-temp */
+	channel@310 {
+		reg = <PM8350B_ADC7_CHG_TEMP>;
+		qcom,pre-scaling = <1 1>;
+		label = "pm8350b_chg_temp";
+	};
+
+	/* pm8350b-usb-conn-therm */
+	channel@347 {
+		reg = <PM8350B_ADC7_AMUX_THM4_100K_PU>;
+		qcom,ratiometric;
+		qcom,hw-settle-time = <200>;
+		qcom,pre-scaling = <1 1>;
+		label = "pm8350b_usb_conn_therm";
+	};
+
+	/* pm8350b-wl-chg-therm */
+	channel@34b {
+		reg = <PM8350B_ADC7_GPIO2_100K_PU>;
+		qcom,ratiometric;
+		qcom,hw-settle-time = <200>;
+		qcom,pre-scaling = <1 1>;
+		label = "pm8350b_wl_chg_therm";
+	};
+
+	/* pm8350b-vph-pwr */
+	channel@38e {
+		reg = <0x38e>;
+		qcom,pre-scaling = <1 3>;
+		label = "pm8350b_vph_pwr";
+	};
+
+	/* pm8350b-vbat-sns */
+	channel@38f {
+		reg = <0x38f>;
+		qcom,pre-scaling = <1 3>;
+		label = "pm8350b_vbat_sns";
+	};
+
+	/* pmr735a-ref-gnd */
+	channel@400 {
+		reg = <0x400>;
+		qcom,pre-scaling = <1 1>;
+		label = "pmr735a_ref_gnd";
+	};
+
+	/* pmr735a-vref-1p25 */
+	channel@401 {
+		reg = <0x401>;
+		qcom,pre-scaling = <1 1>;
+		label = "pmr735a_vref_1p25";
+	};
+
+	/* pmr735a-die-temp */
+	channel@403 {
+		reg = <0x403>;
+		qcom,pre-scaling = <1 1>;
+		label = "pmr735a_die_temp";
+	};
+
+	/* pmr735b-ref-gnd */
+	channel@500 {
+		reg = <0x500>;
+		qcom,pre-scaling = <1 1>;
+		label = "pmr735b_ref_gnd";
+	};
+
+	/* pmr735b-vref-1p25 */
+	channel@501 {
+		reg = <0x501>;
+		qcom,pre-scaling = <1 1>;
+		label = "pmr735b_vref_1p25";
+	};
+
+	/* pmr735b-die-temp */
+	channel@503 {
+		reg = <0x503>;
+		qcom,pre-scaling = <1 1>;
+		label = "pmr735b_die_temp";
+	};
+
+	/* smb139x-1-smb-temp */
+	channel@b06 {
+		reg = <SMB139x_1_ADC7_SMB_TEMP>;
+		qcom,pre-scaling = <1 1>;
+		label = "smb139x_1_smb_temp";
+	};
+
+	/* smb139x-2-smb-temp */
+	channel@c06 {
+		reg = <SMB139x_2_ADC7_SMB_TEMP>;
+		qcom,pre-scaling = <1 1>;
+		label = "smb139x_2_smb_temp";
+	};
+};
+
+&pon_pwrkey {
+	status = "okay";
+};
+
+&pon_resin {
+	linux,code = <KEY_VOLUMEUP>;
+	status = "okay";
+};
+
+&qupv3_id_0 {
+	status = "okay";
+};
+
+&qupv3_id_1 {
+	status = "okay";
+};
+
+&qupv3_id_2 {
+	status = "okay";
+};
+
+&reserved_memory {
+	bootloader-log@9fff7000 {
+		reg = <0 0x9fff7000 0 0x8000>;
+	};
+
+	framebuffer@e1000000 {
+		reg = <0 0xe4d00000 0 0x2400000>;
+		no-map;
+	};
+
+	ramoops: ramoops@E9700000 {
+		compatible = "ramoops";
+		reg = <0 0xe9700000 0 0x5b8000>;
+		record-size = <0x40000>;
+		console-size = <0x40000>;
+		ftrace-size = <0x200000>;
+		pmsg-size = <0x200000>;
+		ecc-size = <0>;
+	};
+
+	reserved@ea700000 {
+		reg = <0 0xea700000 0 0x800000>;
+	};
+};
+
+&removed_mem {
+	reg = <0 0xd8800000 0 0x8e00000>;
+};
+
+&slpi {
+	firmware-name = "qcom/sm8350/OnePlus/lemonade/slpi.mbn";
+	status = "okay";
+};
+
+&tlmm {
+	gpio-reserved-ranges = <52 8>;
+
+	pcie0_default_state: pcie0-default-state {
+		perst-pins {
+			pins = "gpio94";
+			function = "gpio";
+			drive-strength = <2>;
+			bias-pull-down;
+		};
+
+		clkreq-pins {
+			pins = "gpio95";
+			function = "pcie0_clkreqn";
+			drive-strength = <2>;
+			bias-pull-up;
+		};
+
+		wake-pins {
+			pins = "gpio96";
+			function = "gpio";
+			drive-strength = <2>;
+			bias-pull-up;
+		};
+
+		sleep-pins {
+			pins = "gpio95";
+			function = "gpio";
+			drive-strength = <2>;
+			bias-pull-up;
+		};
+	};
+
+	pcie1_default_state: pcie1-default-state {
+		perst-pins {
+			pins = "gpio97";
+			function = "gpio";
+			drive-strength = <2>;
+			bias-pull-down;
+		};
+
+		clkreq-pins {
+			pins = "gpio98";
+			function = "pcie1_clkreqn";
+			drive-strength = <2>;
+			bias-pull-up;
+		};
+
+		wake-pins {
+			pins = "gpio99";
+			function = "gpio";
+			drive-strength = <2>;
+			bias-pull-up;
+			/* wil6210_refclk_en_pin lives here also */
+		};
+	};
+
+	/* Modem-related pin common on both devices */
+	rf_cable_ant0_active: rf-cable-ant0-active-state {
+		pins = "gpio165";
+		function = "gpio";
+		drive-strength = <2>;
+		bias-pull-up;
+	};
+
+	tp_rst_active: tp-rst-active-state {
+		pins = "gpio22";
+		function = "gpio";
+		drive-strength = <8>;
+		bias-pull-up;
+	};
+
+	/* tp_rst_suspend pinctrl is different per device, don't specify here */
+
+	tp_irq_active: tp-irq-active-state {
+		pins = "gpio23";
+		function = "gpio";
+		drive-strength = <8>;
+		bias-disable;
+	};
+
+	tp_irq_suspend: tp-irq-suspend-state {
+		pins = "gpio23";
+		function = "gpio";
+		drive-strength = <2>;
+		bias-pull-down;
+	};
+};
+
+&ufs_mem_hc {
+	reset-gpios = <&tlmm 203 GPIO_ACTIVE_LOW>;
+
+	vcc-supply = <&pm8350_l7>;
+	vcc-max-microamp = <800000>;
+	vccq-supply = <&pm8350_l9>;
+	vccq-max-microamp = <900000>;
+
+	status = "okay";
+};
+
+&ufs_mem_phy {
+	vdda-phy-supply = <&pm8350_l5>;
+	vdda-pll-supply = <&pm8350_l6>;
+
+	status = "okay";
+};
+
+&usb_1 {
+	/*
+	 * Bug in interconnect driver breaks USB; RPMh is unable to power on
+	 * USB regulators without this.
+	 */
+	/delete-property/ interconnects;
+	/delete-property/ interconnect-names;
+
+	/* USB3 seems broken (though it's enabled downstream?) */
+	qcom,select-utmi-as-pipe-clk;
+
+	status = "okay";
+};
+
+&usb_1_dwc3 {
+	dr_mode = "otg";
+	maximum-speed = "high-speed";
+	phys = <&usb_1_hsphy>;
+	phy-names = "usb2-phy";
+};
+
+&usb_1_dwc3_hs {
+	remote-endpoint = <&pmic_glink_hs_in>;
+};
+
+&usb_1_hsphy {
+	vdda-pll-supply = <&pm8350_l5>;
+	vdda18-supply = <&pm8350c_l1>;
+	vdda33-supply = <&pm8350_l2>;
+
+	status = "okay";
+};
diff --git a/arch/arm64/boot/dts/qcom/sm8350-oneplus-lemonade.dts b/arch/arm64/boot/dts/qcom/sm8350-oneplus-lemonade.dts
new file mode 100644
index 000000000000..473f10d4fcf0
--- /dev/null
+++ b/arch/arm64/boot/dts/qcom/sm8350-oneplus-lemonade.dts
@@ -0,0 +1,85 @@
+// SPDX-License-Identifier: BSD-3-Clause
+/*
+ * Copyright (c) 2023 Igalia S.L.
+ * Authors:
+ *	Nia Espera <nespera@igalia.com>
+ */
+
+/dts-v1/;
+
+#include "sm8350-oneplus-common.dtsi"
+
+/ {
+	compatible = "oneplus,lemonade", "qcom,sm8350";
+	model = "OnePlus 9";
+};
+
+&i2c4 {
+	touchscreen@48 {
+		compatible = "samsung,s6sy761";
+		reg = <0x48>;
+		interrupts-extended = <&tlmm 23 IRQ_TYPE_LEVEL_LOW>;
+
+		avdd-supply = <&pm8350c_l13>;
+		vdd-supply = <&pm8350c_l8>;
+
+		pinctrl-names = "default", "sleep";
+		pinctrl-0 = <&tp_rst_active>, <&tp_irq_active>, <&tp_enable_2v8>;
+		pinctrl-1 = <&tp_rst_suspend>, <&tp_irq_suspend>;
+	};
+};
+
+&mpss {
+	pinctrl-names = "default";
+	pinctrl-0 = <&rf_cable_ant0_active>,
+		    <&rf_cable_ant1_active>,
+		    <&rf_cable_ant2_active>,
+		    <&rf_cable_ant3_active>,
+		    <&rf_cable_ant7_active>;
+};
+
+&tlmm {
+	/* Modem antenna pins exclusive to lemonade */
+	rf_cable_ant1_active: rf-cable-ant1-active-state {
+		pins = "gpio27";
+		function = "gpio";
+		drive-strength = <2>;
+		bias-pull-up;
+	};
+
+	rf_cable_ant2_active: rf-cable-ant2-active-state {
+		pins = "gpio92";
+		function = "gpio";
+		drive-strength = <2>;
+		bias-pull-up;
+	};
+
+	rf_cable_ant3_active: rf-cable-ant3-active-state {
+		pins = "gpio44";
+		function = "gpio";
+		drive-strength = <2>;
+		bias-pull-up;
+	};
+
+	rf_cable_ant7_active: rf-cable-ant7-active-state {
+		pins = "gpio155";
+		function = "gpio";
+		drive-strength = <2>;
+		bias-pull-up;
+	};
+
+	tp_rst_suspend: tp-rst-suspend-state {
+		pins = "gpio22";
+		function = "gpio";
+		drive-strength = <2>;
+		bias-pull-down;
+	};
+
+	tp_enable_2v8: tp-enable-2v8-state {
+		pins = "gpio74";
+		function = "gpio";
+		drive-strength = <8>;
+		bias-pull-up;
+		output-high;
+	};
+};
diff --git a/arch/arm64/boot/dts/qcom/sm8350-oneplus-lemonadep.dts b/arch/arm64/boot/dts/qcom/sm8350-oneplus-lemonadep.dts
new file mode 100644
index 000000000000..bc7e5654bd3d
--- /dev/null
+++ b/arch/arm64/boot/dts/qcom/sm8350-oneplus-lemonadep.dts
@@ -0,0 +1,20 @@
+// SPDX-License-Identifier: BSD-3-Clause
+/*
+ * Copyright (c) 2023 Igalia S.L.
+ * Authors:
+ *	Nia Espera <nespera@igalia.com>
+ */
+
+/dts-v1/;
+
+#include "sm8350-oneplus-common.dtsi"
+
+/ {
+	compatible = "oneplus,lemonadep", "qcom,sm8350";
+	model = "OnePlus 9 Pro";
+};
+
+&mpss {
+	pinctrl-names = "default";
+	pinctrl-0 = <&rf_cable_ant0_active>;
+};

-- 
2.42.1


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

* Re: [PATCH v4 5/6] dt-bindings: arm: qcom: Add oneplus-lemonade(p)
  2023-11-11 22:07 ` [PATCH v4 5/6] dt-bindings: arm: qcom: Add oneplus-lemonade(p) Nia Espera
@ 2023-11-12  7:36   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 15+ messages in thread
From: Krzysztof Kozlowski @ 2023-11-12  7:36 UTC (permalink / raw)
  To: Nia Espera, Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Jonathan Cameron, Lars-Peter Clausen, Rob Herring, Conor Dooley,
	Kees Cook, Tony Luck, Guilherme G. Piccoli, Vinod Koul,
	Krzysztof Kozlowski
  Cc: linux-arm-msm, linux-iio, devicetree, phone-devel, Rob,
	Clayton Craft, Caleb Connolly, Luca Weiss,
	~postmarketos/upstreaming

On 11/11/2023 23:07, Nia Espera wrote:
> Document the devicetree bindings for oneplus-lemonade and oneplus-lemonadep.
> 
> Signed-off-by: Nia Espera <nespera@igalia.com>
> ---


Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>


Best regards,
Krzysztof


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

* Re: [PATCH v4 4/6] arm64: dts: qcom: sm8350: Fix remoteproc interrupt type
  2023-11-11 22:07 ` [PATCH v4 4/6] arm64: dts: qcom: sm8350: Fix remoteproc interrupt type Nia Espera
@ 2023-11-16 15:17   ` Konrad Dybcio
  0 siblings, 0 replies; 15+ messages in thread
From: Konrad Dybcio @ 2023-11-16 15:17 UTC (permalink / raw)
  To: Nia Espera, Andy Gross, Bjorn Andersson, Jonathan Cameron,
	Lars-Peter Clausen, Rob Herring, Conor Dooley, Kees Cook,
	Tony Luck, Guilherme G. Piccoli, Vinod Koul, Krzysztof Kozlowski,
	Krzysztof Kozlowski
  Cc: linux-arm-msm, linux-iio, devicetree, phone-devel, Rob,
	Clayton Craft, Caleb Connolly, Luca Weiss,
	~postmarketos/upstreaming



On 11/11/23 23:07, Nia Espera wrote:
> In a similar vein to
> https://lore.kernel.org/lkml/20220530080842.37024-3-manivannan.sadhasivam@linaro.org/,
> the remote processors on sm8350 fail to initialize with the 'correct'
> (i.e., specified in downstream) IRQ type. Change this to EDGE_RISING.
> 
> Signed-off-by: Nia Espera <nespera@igalia.com>
> ---
Acked-by: Konrad Dybcio <konrad.dybcio@linaro.org>

Konrad

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

* Re: [PATCH v4 6/6] arm64: dts: qcom: sm8350-lemonade(p): New devices
  2023-11-11 22:07 ` [PATCH v4 6/6] arm64: dts: qcom: sm8350-lemonade(p): New devices Nia Espera
@ 2023-11-22 20:17   ` Konrad Dybcio
  2023-11-23 17:05     ` Nia Espera
  0 siblings, 1 reply; 15+ messages in thread
From: Konrad Dybcio @ 2023-11-22 20:17 UTC (permalink / raw)
  To: Nia Espera, Andy Gross, Bjorn Andersson, Jonathan Cameron,
	Lars-Peter Clausen, Rob Herring, Conor Dooley, Kees Cook,
	Tony Luck, Guilherme G. Piccoli, Vinod Koul, Krzysztof Kozlowski,
	Krzysztof Kozlowski
  Cc: linux-arm-msm, linux-iio, devicetree, phone-devel, Rob,
	Clayton Craft, Caleb Connolly, Luca Weiss,
	~postmarketos/upstreaming



On 11/11/23 23:07, Nia Espera wrote:
> Device tree files for OnePlus 9 and 9 Pro. Details of supported features
> mentioned in the cover letter for this patch series, but for
> accessibility also repeated here:
> 
> - USB OTG
> - UFS
> - Framebuffer display
> - Touchscreen (for lemonade)
> - Power & volume down keys
> - Battery reading
> - Modem, IPA, and remoteproc bringup
> 
> Steps to get booting:
> 
> - Wipe dtbo partition
> - Flash vbmeta with disabled verity bit
> - Flash kernel and initfs to boot partition with CLI args pd_ignore_unused
> and clk_ignore_unused as v1 bootimg
> - Flash rootfs to some other partition (probably super or userdata)
Thanks for including this info here

> +&pmk8350_vadc {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&gpio1_adc_default>, <&gpio3_adc_default>;
> +
> +	/* pmk8350-ref-gnd */
I fail to see the benefit in having this both here and in the label

> +	channel@0 {
> +		reg = <0x00>;
> +		qcom,pre-scaling = <1 1>;
> +		label = "pmk8350_ref_gnd";
> +	};
> +
[...]

> +&tlmm {
> +	gpio-reserved-ranges = <52 8>;
Would you know what these are connected to?

[...]

> +&mpss {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&rf_cable_ant0_active>;
patch-wide:

property-n
property-names

Konrad

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

* Re: [PATCH v4 6/6] arm64: dts: qcom: sm8350-lemonade(p): New devices
  2023-11-22 20:17   ` Konrad Dybcio
@ 2023-11-23 17:05     ` Nia Espera
  2023-11-25 11:44       ` Konrad Dybcio
  0 siblings, 1 reply; 15+ messages in thread
From: Nia Espera @ 2023-11-23 17:05 UTC (permalink / raw)
  To: Konrad Dybcio, Andy Gross, Bjorn Andersson, Jonathan Cameron,
	Lars-Peter Clausen, Rob Herring, Conor Dooley, Kees Cook,
	Tony Luck, Guilherme G. Piccoli, Vinod Koul, Krzysztof Kozlowski,
	Krzysztof Kozlowski
  Cc: linux-arm-msm, linux-iio, devicetree, phone-devel, Rob,
	Clayton Craft, Caleb Connolly, Luca Weiss,
	~postmarketos/upstreaming



On 11/22/23 21:17, Konrad Dybcio wrote:
> 
> 
> On 11/11/23 23:07, Nia Espera wrote:
>> Device tree files for OnePlus 9 and 9 Pro. Details of supported features
>> mentioned in the cover letter for this patch series, but for
>> accessibility also repeated here:
>>
>> - USB OTG
>> - UFS
>> - Framebuffer display
>> - Touchscreen (for lemonade)
>> - Power & volume down keys
>> - Battery reading
>> - Modem, IPA, and remoteproc bringup
>>
>> Steps to get booting:
>>
>> - Wipe dtbo partition
>> - Flash vbmeta with disabled verity bit
>> - Flash kernel and initfs to boot partition with CLI args 
>> pd_ignore_unused
>> and clk_ignore_unused as v1 bootimg
>> - Flash rootfs to some other partition (probably super or userdata)
> Thanks for including this info here
> 
>> +&pmk8350_vadc {
>> +    pinctrl-names = "default";
>> +    pinctrl-0 = <&gpio1_adc_default>, <&gpio3_adc_default>;
>> +
>> +    /* pmk8350-ref-gnd */
> I fail to see the benefit in having this both here and in the label

Oops, removed.

>> +    channel@0 {
>> +        reg = <0x00>;
>> +        qcom,pre-scaling = <1 1>;
>> +        label = "pmk8350_ref_gnd";
>> +    };
>> +
> [...]
> 
>> +&tlmm {
>> +    gpio-reserved-ranges = <52 8>;
> Would you know what these are connected to?
> 

Judging from the line names on the hdk dtsi, 4 seem to be connected to 
the fingerprint (FP_SPI_*) and the other 4 are NFC-related 
(NFC_ESE_SPI_*). I can clarify this with a comment if necessary.

> [...]
> 
>> +&mpss {
>> +    pinctrl-names = "default";
>> +    pinctrl-0 = <&rf_cable_ant0_active>;
> patch-wide:
> 
> property-n
> property-names
> 
> Konrad

Many thanks!

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

* Re: [PATCH v4 6/6] arm64: dts: qcom: sm8350-lemonade(p): New devices
  2023-11-23 17:05     ` Nia Espera
@ 2023-11-25 11:44       ` Konrad Dybcio
  0 siblings, 0 replies; 15+ messages in thread
From: Konrad Dybcio @ 2023-11-25 11:44 UTC (permalink / raw)
  To: Nia Espera, Andy Gross, Bjorn Andersson, Jonathan Cameron,
	Lars-Peter Clausen, Rob Herring, Conor Dooley, Kees Cook,
	Tony Luck, Guilherme G. Piccoli, Vinod Koul, Krzysztof Kozlowski,
	Krzysztof Kozlowski
  Cc: linux-arm-msm, linux-iio, devicetree, phone-devel, Rob,
	Clayton Craft, Caleb Connolly, Luca Weiss,
	~postmarketos/upstreaming

On 23.11.2023 18:05, Nia Espera wrote:
> 
> 
> On 11/22/23 21:17, Konrad Dybcio wrote:
>>
>>
>> On 11/11/23 23:07, Nia Espera wrote:
>>> Device tree files for OnePlus 9 and 9 Pro. Details of supported features
>>> mentioned in the cover letter for this patch series, but for
>>> accessibility also repeated here:
>>>
>>> - USB OTG
>>> - UFS
>>> - Framebuffer display
>>> - Touchscreen (for lemonade)
>>> - Power & volume down keys
>>> - Battery reading
>>> - Modem, IPA, and remoteproc bringup
>>>
>>> Steps to get booting:
>>>
>>> - Wipe dtbo partition
>>> - Flash vbmeta with disabled verity bit
>>> - Flash kernel and initfs to boot partition with CLI args pd_ignore_unused
>>> and clk_ignore_unused as v1 bootimg
>>> - Flash rootfs to some other partition (probably super or userdata)
>> Thanks for including this info here
>>
>>> +&pmk8350_vadc {
>>> +    pinctrl-names = "default";
>>> +    pinctrl-0 = <&gpio1_adc_default>, <&gpio3_adc_default>;
>>> +
>>> +    /* pmk8350-ref-gnd */
>> I fail to see the benefit in having this both here and in the label
> 
> Oops, removed.
> 
>>> +    channel@0 {
>>> +        reg = <0x00>;
>>> +        qcom,pre-scaling = <1 1>;
>>> +        label = "pmk8350_ref_gnd";
>>> +    };
>>> +
>> [...]
>>
>>> +&tlmm {
>>> +    gpio-reserved-ranges = <52 8>;
>> Would you know what these are connected to?
>>
> 
> Judging from the line names on the hdk dtsi, 4 seem to be connected to the fingerprint (FP_SPI_*) and the other 4 are NFC-related (NFC_ESE_SPI_*). I can clarify this with a comment if necessary.
Sounds very plausible, thanks!

Konrad

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

* Re: [PATCH v4 1/6] dt-bindings: iio: adc: qcom: Add Qualcomm smb139x
  2023-11-11 22:07 ` [PATCH v4 1/6] dt-bindings: iio: adc: qcom: Add Qualcomm smb139x Nia Espera
@ 2023-11-25 20:42   ` Jonathan Cameron
  2023-11-25 20:48   ` Jonathan Cameron
  1 sibling, 0 replies; 15+ messages in thread
From: Jonathan Cameron @ 2023-11-25 20:42 UTC (permalink / raw)
  To: Nia Espera
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio, Lars-Peter Clausen,
	Rob Herring, Conor Dooley, Kees Cook, Tony Luck,
	Guilherme G. Piccoli, Vinod Koul, Krzysztof Kozlowski,
	Krzysztof Kozlowski, linux-arm-msm, linux-iio, devicetree,
	phone-devel, Rob, Clayton Craft, Caleb Connolly, Luca Weiss,
	~postmarketos/upstreaming

On Sat, 11 Nov 2023 23:07:39 +0100
Nia Espera <nespera@igalia.com> wrote:

> Bindings for a charger controller chip found on sm8350
> 
> Signed-off-by: Nia Espera <nespera@igalia.com>
> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Hmm. this is going to clash badly with the header moves. I'll assume they
will both eventually go through the qcom tree unless someone tells me otherwise.

Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

> ---
>  include/dt-bindings/iio/qcom,spmi-adc7-smb139x.h | 19 +++++++++++++++++++
>  include/dt-bindings/iio/qcom,spmi-vadc.h         |  3 +++
>  2 files changed, 22 insertions(+)
> 
> diff --git a/include/dt-bindings/iio/qcom,spmi-adc7-smb139x.h b/include/dt-bindings/iio/qcom,spmi-adc7-smb139x.h
> new file mode 100644
> index 000000000000..c0680d1285cf
> --- /dev/null
> +++ b/include/dt-bindings/iio/qcom,spmi-adc7-smb139x.h
> @@ -0,0 +1,19 @@
> +/* SPDX-License-Identifier: GPL-2.0-only OR BSD-3-Clause */
> +/*
> + * Copyright (c) 2020 The Linux Foundation. All rights reserved.
> + */
> +
> +#ifndef _DT_BINDINGS_QCOM_SPMI_VADC_SMB139X_H
> +#define _DT_BINDINGS_QCOM_SPMI_VADC_SMB139X_H
> +
> +#include <dt-bindings/iio/qcom,spmi-vadc.h>
> +
> +#define SMB139x_1_ADC7_SMB_TEMP			(SMB139x_1_SID << 8 | ADC7_SMB_TEMP)
> +#define SMB139x_1_ADC7_ICHG_SMB			(SMB139x_1_SID << 8 | ADC7_ICHG_SMB)
> +#define SMB139x_1_ADC7_IIN_SMB			(SMB139x_1_SID << 8 | ADC7_IIN_SMB)
> +
> +#define SMB139x_2_ADC7_SMB_TEMP			(SMB139x_2_SID << 8 | ADC7_SMB_TEMP)
> +#define SMB139x_2_ADC7_ICHG_SMB			(SMB139x_2_SID << 8 | ADC7_ICHG_SMB)
> +#define SMB139x_2_ADC7_IIN_SMB			(SMB139x_2_SID << 8 | ADC7_IIN_SMB)
> +
> +#endif
> diff --git a/include/dt-bindings/iio/qcom,spmi-vadc.h b/include/dt-bindings/iio/qcom,spmi-vadc.h
> index 08adfe25964c..ef07ecd4d585 100644
> --- a/include/dt-bindings/iio/qcom,spmi-vadc.h
> +++ b/include/dt-bindings/iio/qcom,spmi-vadc.h
> @@ -239,12 +239,15 @@
>  #define ADC7_GPIO3				0x0c
>  #define ADC7_GPIO4				0x0d
>  
> +#define ADC7_SMB_TEMP				0x06
>  #define ADC7_CHG_TEMP				0x10
>  #define ADC7_USB_IN_V_16			0x11
>  #define ADC7_VDC_16				0x12
>  #define ADC7_CC1_ID				0x13
>  #define ADC7_VREF_BAT_THERM			0x15
>  #define ADC7_IIN_FB				0x17
> +#define ADC7_ICHG_SMB				0x18
> +#define ADC7_IIN_SMB				0x19
>  
>  /* 30k pull-up1 */
>  #define ADC7_AMUX_THM1_30K_PU			0x24
> 


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

* Re: [PATCH v4 1/6] dt-bindings: iio: adc: qcom: Add Qualcomm smb139x
  2023-11-11 22:07 ` [PATCH v4 1/6] dt-bindings: iio: adc: qcom: Add Qualcomm smb139x Nia Espera
  2023-11-25 20:42   ` Jonathan Cameron
@ 2023-11-25 20:48   ` Jonathan Cameron
  1 sibling, 0 replies; 15+ messages in thread
From: Jonathan Cameron @ 2023-11-25 20:48 UTC (permalink / raw)
  To: Nia Espera
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio, Lars-Peter Clausen,
	Rob Herring, Conor Dooley, Kees Cook, Tony Luck,
	Guilherme G. Piccoli, Vinod Koul, Krzysztof Kozlowski,
	Krzysztof Kozlowski, linux-arm-msm, linux-iio, devicetree,
	phone-devel, Rob, Clayton Craft, Caleb Connolly, Luca Weiss,
	~postmarketos/upstreaming

On Sat, 11 Nov 2023 23:07:39 +0100
Nia Espera <nespera@igalia.com> wrote:

> Bindings for a charger controller chip found on sm8350
> 
> Signed-off-by: Nia Espera <nespera@igalia.com>
> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> ---
>  include/dt-bindings/iio/qcom,spmi-adc7-smb139x.h | 19 +++++++++++++++++++
>  include/dt-bindings/iio/qcom,spmi-vadc.h         |  3 +++
>  2 files changed, 22 insertions(+)
> 
> diff --git a/include/dt-bindings/iio/qcom,spmi-adc7-smb139x.h b/include/dt-bindings/iio/qcom,spmi-adc7-smb139x.h
> new file mode 100644
> index 000000000000..c0680d1285cf
> --- /dev/null
> +++ b/include/dt-bindings/iio/qcom,spmi-adc7-smb139x.h
> @@ -0,0 +1,19 @@
> +/* SPDX-License-Identifier: GPL-2.0-only OR BSD-3-Clause */
> +/*
> + * Copyright (c) 2020 The Linux Foundation. All rights reserved.
> + */
> +
> +#ifndef _DT_BINDINGS_QCOM_SPMI_VADC_SMB139X_H
> +#define _DT_BINDINGS_QCOM_SPMI_VADC_SMB139X_H
> +
> +#include <dt-bindings/iio/qcom,spmi-vadc.h>
> +
> +#define SMB139x_1_ADC7_SMB_TEMP			(SMB139x_1_SID << 8 | ADC7_SMB_TEMP)
> +#define SMB139x_1_ADC7_ICHG_SMB			(SMB139x_1_SID << 8 | ADC7_ICHG_SMB)
> +#define SMB139x_1_ADC7_IIN_SMB			(SMB139x_1_SID << 8 | ADC7_IIN_SMB)
> +
> +#define SMB139x_2_ADC7_SMB_TEMP			(SMB139x_2_SID << 8 | ADC7_SMB_TEMP)
> +#define SMB139x_2_ADC7_ICHG_SMB			(SMB139x_2_SID << 8 | ADC7_ICHG_SMB)
> +#define SMB139x_2_ADC7_IIN_SMB			(SMB139x_2_SID << 8 | ADC7_IIN_SMB)
> +
> +#endif
> diff --git a/include/dt-bindings/iio/qcom,spmi-vadc.h b/include/dt-bindings/iio/qcom,spmi-vadc.h
> index 08adfe25964c..ef07ecd4d585 100644
> --- a/include/dt-bindings/iio/qcom,spmi-vadc.h
> +++ b/include/dt-bindings/iio/qcom,spmi-vadc.h
> @@ -239,12 +239,15 @@
>  #define ADC7_GPIO3				0x0c
>  #define ADC7_GPIO4				0x0d
>  
> +#define ADC7_SMB_TEMP				0x06
>  #define ADC7_CHG_TEMP				0x10
>  #define ADC7_USB_IN_V_16			0x11
>  #define ADC7_VDC_16				0x12
>  #define ADC7_CC1_ID				0x13
>  #define ADC7_VREF_BAT_THERM			0x15
>  #define ADC7_IIN_FB				0x17
> +#define ADC7_ICHG_SMB				0x18
> +#define ADC7_IIN_SMB				0x19
>  
>  /* 30k pull-up1 */
>  #define ADC7_AMUX_THM1_30K_PU			0x24
> 


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

* Re: (subset) [PATCH v4 0/6] support oneplus-lemonade(p) devices
  2023-11-11 22:07 [PATCH v4 0/6] support oneplus-lemonade(p) devices Nia Espera
                   ` (5 preceding siblings ...)
  2023-11-11 22:07 ` [PATCH v4 6/6] arm64: dts: qcom: sm8350-lemonade(p): New devices Nia Espera
@ 2023-12-08  2:57 ` Bjorn Andersson
  6 siblings, 0 replies; 15+ messages in thread
From: Bjorn Andersson @ 2023-12-08  2:57 UTC (permalink / raw)
  To: Andy Gross, Konrad Dybcio, Jonathan Cameron, Lars-Peter Clausen,
	Rob Herring, Conor Dooley, Kees Cook, Tony Luck,
	Guilherme G. Piccoli, Vinod Koul, Krzysztof Kozlowski,
	Krzysztof Kozlowski, Nia Espera
  Cc: linux-arm-msm, linux-iio, devicetree, phone-devel, Rob,
	Clayton Craft, Caleb Connolly, Luca Weiss,
	~postmarketos/upstreaming


On Sat, 11 Nov 2023 23:07:38 +0100, Nia Espera wrote:
> Patch series adding support for oneplus-lemonade and oneplus-lemonadep
> devices (OnePlus 9 & 9 Pro), along with a few needed fixups. Currently
> working as of this series:
> 
> - USB OTG
> - UFS
> - Framebuffer display
> - Touchscreen (for lemonade)
> - Power & volume down keys
> - Battery reading
> - Modem, IPA, and remoteproc bringup
> 
> [...]

Applied, thanks!

[1/6] dt-bindings: iio: adc: qcom: Add Qualcomm smb139x
      commit: 7bf421f44549cd0bca32bd0b4cf6e4cfe5b4f865
[2/6] arm64: dts: qcom: sm8350: Fix DMA0 address
      commit: 01a9e9eb6cdbce175ddea3cbe1163daed6d54344
[3/6] arm64: dts: qcom: pm8350k: Remove hanging whitespace
      commit: e70537717146b380e18f0c92669d968af4acb8a7
[4/6] arm64: dts: qcom: sm8350: Fix remoteproc interrupt type
      commit: 54ee322f845c7f25fbf6e43e11147b6cae8eff56

Best regards,
-- 
Bjorn Andersson <andersson@kernel.org>

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

end of thread, other threads:[~2023-12-08  2:53 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-11 22:07 [PATCH v4 0/6] support oneplus-lemonade(p) devices Nia Espera
2023-11-11 22:07 ` [PATCH v4 1/6] dt-bindings: iio: adc: qcom: Add Qualcomm smb139x Nia Espera
2023-11-25 20:42   ` Jonathan Cameron
2023-11-25 20:48   ` Jonathan Cameron
2023-11-11 22:07 ` [PATCH v4 2/6] arm64: dts: qcom: sm8350: Fix DMA0 address Nia Espera
2023-11-11 22:07 ` [PATCH v4 3/6] arm64: dts: qcom: pm8350k: Remove hanging whitespace Nia Espera
2023-11-11 22:07 ` [PATCH v4 4/6] arm64: dts: qcom: sm8350: Fix remoteproc interrupt type Nia Espera
2023-11-16 15:17   ` Konrad Dybcio
2023-11-11 22:07 ` [PATCH v4 5/6] dt-bindings: arm: qcom: Add oneplus-lemonade(p) Nia Espera
2023-11-12  7:36   ` Krzysztof Kozlowski
2023-11-11 22:07 ` [PATCH v4 6/6] arm64: dts: qcom: sm8350-lemonade(p): New devices Nia Espera
2023-11-22 20:17   ` Konrad Dybcio
2023-11-23 17:05     ` Nia Espera
2023-11-25 11:44       ` Konrad Dybcio
2023-12-08  2:57 ` (subset) [PATCH v4 0/6] support oneplus-lemonade(p) devices 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).