linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] arm64: dts: qcom: Introduce Oneplus Pad Pro
@ 2025-05-20 16:42 Pengyu Luo
  2025-05-20 16:42 ` [PATCH 1/2] dt-bindings: arm: qcom: Add Oneplus Pad Pro (caihong) Pengyu Luo
  2025-05-20 16:42 ` [PATCH 2/2] arm64: dts: qcom: sm8650: Add support for " Pengyu Luo
  0 siblings, 2 replies; 16+ messages in thread
From: Pengyu Luo @ 2025-05-20 16:42 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel, Pengyu Luo

The OnePlus Pad Pro is an Android tablet based on the Qualcomm SM8650
platform. Its device codename is "caihong". These patches adds an
initial devicetree for basic functionality.

Pengyu Luo (2):
  dt-bindings: arm: qcom: Add Oneplus Pad Pro (caihong)
  arm64: dts: qcom: sm8650: Add support for Oneplus Pad Pro (caihong)

 .../devicetree/bindings/arm/qcom.yaml         |   1 +
 .../boot/dts/qcom/sm8650-oneplus-caihong.dts  | 960 ++++++++++++++++++
 2 files changed, 961 insertions(+)
 create mode 100644 arch/arm64/boot/dts/qcom/sm8650-oneplus-caihong.dts

-- 
2.49.0


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

* [PATCH 1/2] dt-bindings: arm: qcom: Add Oneplus Pad Pro (caihong)
  2025-05-20 16:42 [PATCH 0/2] arm64: dts: qcom: Introduce Oneplus Pad Pro Pengyu Luo
@ 2025-05-20 16:42 ` Pengyu Luo
  2025-05-21  9:58   ` Krzysztof Kozlowski
  2025-05-20 16:42 ` [PATCH 2/2] arm64: dts: qcom: sm8650: Add support for " Pengyu Luo
  1 sibling, 1 reply; 16+ messages in thread
From: Pengyu Luo @ 2025-05-20 16:42 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel, Pengyu Luo

The OnePlus Pad Pro is an Android tablet based on the Qualcomm SM8650
platform. Its device codename is "caihong".

Signed-off-by: Pengyu Luo <mitltlatltl@gmail.com>
---
 Documentation/devicetree/bindings/arm/qcom.yaml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/arm/qcom.yaml b/Documentation/devicetree/bindings/arm/qcom.yaml
index 56f78f0f38..f00eb43065 100644
--- a/Documentation/devicetree/bindings/arm/qcom.yaml
+++ b/Documentation/devicetree/bindings/arm/qcom.yaml
@@ -1111,6 +1111,7 @@ properties:
 
       - items:
           - enum:
+              - oneplus,caihong
               - qcom,sm8650-hdk
               - qcom,sm8650-mtp
               - qcom,sm8650-qrd
-- 
2.49.0


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

* [PATCH 2/2] arm64: dts: qcom: sm8650: Add support for Oneplus Pad Pro (caihong)
  2025-05-20 16:42 [PATCH 0/2] arm64: dts: qcom: Introduce Oneplus Pad Pro Pengyu Luo
  2025-05-20 16:42 ` [PATCH 1/2] dt-bindings: arm: qcom: Add Oneplus Pad Pro (caihong) Pengyu Luo
@ 2025-05-20 16:42 ` Pengyu Luo
  2025-05-20 21:54   ` Konrad Dybcio
  2025-05-21 12:49   ` neil.armstrong
  1 sibling, 2 replies; 16+ messages in thread
From: Pengyu Luo @ 2025-05-20 16:42 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel, Pengyu Luo

The OnePlus Pad Pro is an Android tablet based on the Qualcomm SM8650
platform. Its device codename is "caihong". This patch adds an initial
devicetree for basic functionality.

Currently working components include:
- Backlight
- Bluetooth
- Battery charging (up to 5v 0.5a) & reporting via pmic-glink (There
are many unknown notifications)
- Display panel ([1])
- Keyboard (via BT)
- Power key & volume keys
- Touchscreen & stylus ([2])
- USB Type-c port
- UFS storage
- Wi-Fi

The following components are currently non-functional:
- Audio
- Cameras
- Charging pump (dual sc8547)
- Keyboard (via pogo pin)
- Stylus wireless charger (cps8601)
- UCSI over GLINK (PPM init fails)

[1]: The panel is a dual-DSI, dual-DSC display that requires setting
     'slice_per_pkt = 2' in the DPU configuration. The panel driver
     will be submitted separately later.
[2]: Touchscreen/stylus driver available at:
     https://github.com/OnePlusOSS/android_kernel_modules_and_devicetree_oneplus_sm8650/blob/oneplus/sm8650_v_15.0.0_pad_pro/vendor/oplus/kernel/touchpanel/oplus_touchscreen_v2/Novatek/NT36532_noflash/nvt_drivers_nt36532_noflash.c
     The downstream driver has been ported and tested locally, but
     requires cleanup, it may be submitted separately later.

To test this device tree, follow these minimal steps:

1. Build the kernel. Ensure that all `compatible` strings used in
this device tree (or any included dtsi files) have corresponding
drivers enabled in the kernel configuration.

2. Creating boot image

Merge the kernel and device tree blob:

cat arch/arm64/boot/Image.gz arch/arm64/boot/dts/qcom/sm8650-oneplus-\
caihong.dtb > kernel-dtb

Then create a boot.img:

mkbootimg \
--base 0x00000000 \
--kernel_offset 0x00008000 \
--ramdisk_offset 0x01000000 \
--second_offset 0x00f00000 \
--tags_offset 0x00000100 \
--pagesize 4096 \
--header_version 4 \
--kernel kernel-dtb \
--ramdisk some_ramdisk \
--cmdline "some comeline" \
-o mainline-boot.img

3. Flashing the boot image

fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img
fastboot erase dtbo
fastboot flash boot mainline-boot.img

See also https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=39c5963

Signed-off-by: Pengyu Luo <mitltlatltl@gmail.com>
---
 .../boot/dts/qcom/sm8650-oneplus-caihong.dts  | 960 ++++++++++++++++++
 1 file changed, 960 insertions(+)
 create mode 100644 arch/arm64/boot/dts/qcom/sm8650-oneplus-caihong.dts

diff --git a/arch/arm64/boot/dts/qcom/sm8650-oneplus-caihong.dts b/arch/arm64/boot/dts/qcom/sm8650-oneplus-caihong.dts
new file mode 100644
index 0000000000..93aed47e10
--- /dev/null
+++ b/arch/arm64/boot/dts/qcom/sm8650-oneplus-caihong.dts
@@ -0,0 +1,960 @@
+// SPDX-License-Identifier: BSD-3-Clause
+/*
+ * Based on Qualcomm Reference Device DeviceTree
+ *
+ * Copyright (c) 2023, Linaro Limited
+ * Copyright (c) 2025, Pengyu Luo <mitltlatltl@gmail.com>
+ */
+
+/dts-v1/;
+
+#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
+#include "sm8650.dtsi"
+#include "pm8550.dtsi"
+#include "pm8550b.dtsi"
+#define PMK8550VE_SID 8
+#include "pm8550ve.dtsi"
+#include "pm8550vs.dtsi"
+#include "pmk8550.dtsi"
+
+/delete-node/ &adspslpi_mem;
+/delete-node/ &hwfence_shbuf;
+
+/* No Modem */
+/delete-node/ &mpss_mem;
+/delete-node/ &q6_mpss_dtb_mem;
+/delete-node/ &mpss_dsm_mem;
+/delete-node/ &mpss_dsm_mem_2;
+/delete-node/ &qlink_logging_mem;
+/delete-node/ &remoteproc_mpss;
+
+/* Unused now, and reusable, taking 144 MiB back */
+/delete-node/ &trust_ui_vm_mem;
+/delete-node/ &oem_vm_mem;
+/delete-node/ &qdss_mem;
+
+/ {
+	model = "Oneplus Pad Pro";
+	compatible = "oneplus,caihong", "qcom,sm8650";
+	chassis-type = "tablet";
+
+	aliases {
+		serial0 = &uart14;
+	};
+
+	bl_avdd_5p9: bl-avdd-regulator {
+		compatible = "regulator-fixed";
+		regulator-name = "bl_avdd_5p9";
+		regulator-min-microvolt = <5900000>;
+		regulator-max-microvolt = <5900000>;
+		gpio = <&tlmm 90 GPIO_ACTIVE_HIGH>;
+		enable-active-high;
+	};
+
+	bl_avee_5p9: bl-avee-regulator {
+		compatible = "regulator-fixed";
+		regulator-name = "bl_avee_5p9";
+		regulator-min-microvolt = <5900000>;
+		regulator-max-microvolt = <5900000>;
+		gpio = <&tlmm 91 GPIO_ACTIVE_HIGH>;
+		enable-active-high;
+	};
+
+	gpio-keys {
+		compatible = "gpio-keys";
+
+		pinctrl-0 = <&volume_up_n>;
+		pinctrl-names = "default";
+
+		key-volume-up {
+			label = "Volume Up";
+			linux,code = <KEY_VOLUMEDOWN>;
+			gpios = <&pm8550_gpios 6 GPIO_ACTIVE_LOW>;
+			debounce-interval = <15>;
+			linux,can-disable;
+			wakeup-source;
+		};
+	};
+
+	pmic-glink {
+		compatible = "qcom,sm8650-pmic-glink",
+			     "qcom,sm8550-pmic-glink",
+			     "qcom,pmic-glink";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		orientation-gpios = <&tlmm 29 GPIO_ACTIVE_HIGH>;
+
+		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>;
+					};
+				};
+
+				port@1 {
+					reg = <1>;
+
+					pmic_glink_ss_in: endpoint {
+						remote-endpoint = <&usb_dp_qmpphy_out>;
+					};
+				};
+			};
+		};
+	};
+
+	reserved-memory {
+		adspslpi_mem: adspslpi@9df00000 {
+			reg = <0 0x9df00000 0 0x5280000>;
+			no-map;
+		};
+
+		hwfence_shbuf: hwfence-shbuf@d4e23000 {
+			reg = <0 0xd4e23000 0 0x2dd000>;
+			no-map;
+		};
+
+		/*
+		 * This memory region is required to initialize the backlight
+		 * and display for bootloader. Normally, this region is not
+		 * needed. However, due to limitations in the current mainline
+		 * KTZ8866 driver, dual backlight ICs cannot be properly
+		 * initialized.
+		 *
+		 * A workaround involving secondary registration was proposed,
+		 * but rejected by reviewers. This reserved region is kept as
+		 * a temporary solution until a proper initialization method
+		 * that satisfies upstream requirements is found.
+		 */
+		splash_region {
+			reg = <0 0xd5100000 0 0x2b00000>;
+			no-map;
+		};
+	};
+
+	/* No Modem */
+	smp2p-modem {
+		status = "disabled";
+	};
+
+	vph_pwr: vph-pwr-regulator {
+		compatible = "regulator-fixed";
+
+		regulator-name = "vph_pwr";
+		regulator-min-microvolt = <3700000>;
+		regulator-max-microvolt = <3700000>;
+
+		regulator-always-on;
+		regulator-boot-on;
+	};
+
+	wcn7850-pmu {
+		compatible = "qcom,wcn7850-pmu";
+
+		pinctrl-names = "default";
+		pinctrl-0 = <&wlan_en>, <&bt_default>;
+
+		wlan-enable-gpios = <&tlmm 16 GPIO_ACTIVE_HIGH>;
+		bt-enable-gpios = <&tlmm 17 GPIO_ACTIVE_HIGH>;
+
+		vdd-supply = <&vreg_s4i_0p85>;
+		vddio-supply = <&vreg_l15b_1p8>;
+		vddio1p2-supply = <&vreg_l3c_1p2>;
+		vddaon-supply = <&vreg_s2c_0p8>;
+		vdddig-supply = <&vreg_s3c_0p9>;
+		vddrfa1p2-supply = <&vreg_s1c_1p2>;
+		vddrfa1p8-supply = <&vreg_s6c_1p8>;
+
+		clocks = <&rpmhcc RPMH_RF_CLK1>;
+
+		regulators {
+			vreg_pmu_rfa_cmn: ldo0 {
+				regulator-name = "vreg_pmu_rfa_cmn";
+			};
+
+			vreg_pmu_aon_0p59: ldo1 {
+				regulator-name = "vreg_pmu_aon_0p59";
+			};
+
+			vreg_pmu_wlcx_0p8: ldo2 {
+				regulator-name = "vreg_pmu_wlcx_0p8";
+			};
+
+			vreg_pmu_wlmx_0p85: ldo3 {
+				regulator-name = "vreg_pmu_wlmx_0p85";
+			};
+
+			vreg_pmu_btcmx_0p85: ldo4 {
+				regulator-name = "vreg_pmu_btcmx_0p85";
+			};
+
+			vreg_pmu_rfa_0p8: ldo5 {
+				regulator-name = "vreg_pmu_rfa_0p8";
+			};
+
+			vreg_pmu_rfa_1p2: ldo6 {
+				regulator-name = "vreg_pmu_rfa_1p2";
+			};
+
+			vreg_pmu_rfa_1p8: ldo7 {
+				regulator-name = "vreg_pmu_rfa_1p8";
+			};
+
+			vreg_pmu_pcie_0p9: ldo8 {
+				regulator-name = "vreg_pmu_pcie_0p9";
+			};
+
+			vreg_pmu_pcie_1p8: ldo9 {
+				regulator-name = "vreg_pmu_pcie_1p8";
+			};
+		};
+	};
+};
+
+&apps_rsc {
+	regulators-0 {
+		compatible = "qcom,pm8550-rpmh-regulators";
+
+		vdd-bob1-supply = <&vph_pwr>;
+		vdd-bob2-supply = <&vph_pwr>;
+		vdd-l2-l13-l14-supply = <&vreg_bob1>;
+		vdd-l3-supply = <&vreg_s1c_1p2>;
+		vdd-l5-l16-supply = <&vreg_bob1>;
+		vdd-l6-l7-supply = <&vreg_bob1>;
+		vdd-l8-l9-supply = <&vreg_bob1>;
+		vdd-l11-supply = <&vreg_s1c_1p2>;
+		vdd-l12-supply = <&vreg_s6c_1p8>;
+		vdd-l15-supply = <&vreg_s6c_1p8>;
+		vdd-l17-supply = <&vreg_bob2>;
+
+		qcom,pmic-id = "b";
+
+		vreg_bob1: bob1 {
+			regulator-name = "vreg_bob1";
+			regulator-min-microvolt = <3296000>;
+			regulator-max-microvolt = <3960000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		vreg_bob2: bob2 {
+			regulator-name = "vreg_bob2";
+			regulator-min-microvolt = <2720000>;
+			regulator-max-microvolt = <3008000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		vreg_l2b_3p0: ldo2 {
+			regulator-name = "vreg_l2b_3p0";
+			regulator-min-microvolt = <3008000>;
+			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>;
+		};
+
+		vreg_l4b_1p8: ldo4 {
+			regulator-name = "vreg_l4b_1p8";
+			regulator-min-microvolt = <1800000>;
+			regulator-max-microvolt = <1800000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+			regulator-allow-set-load;
+			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
+						   RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		vreg_l5b_3p1: ldo5 {
+			regulator-name = "vreg_l5b_3p1";
+			regulator-min-microvolt = <3104000>;
+			regulator-max-microvolt = <3104000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+			regulator-allow-set-load;
+			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
+						   RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		vreg_l9b_2p8: ldo9 {
+			regulator-name = "vreg_l9b_2p8";
+			regulator-min-microvolt = <2800000>;
+			regulator-max-microvolt = <2800000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+			regulator-allow-set-load;
+			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
+						   RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		vreg_l10b_1p8: ldo10 {
+			regulator-name = "vreg_l10b_1p8";
+			regulator-min-microvolt = <1800000>;
+			regulator-max-microvolt = <1800000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+			regulator-allow-set-load;
+			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
+						   RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		vreg_l12b_1p8: ldo12 {
+			regulator-name = "vreg_l12b_1p8";
+			regulator-min-microvolt = <1800000>;
+			regulator-max-microvolt = <1800000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+			regulator-allow-set-load;
+			regulator-always-on;
+			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
+						   RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		vreg_l15b_1p8: ldo15 {
+			regulator-name = "vreg_l15b_1p8";
+			regulator-min-microvolt = <1800000>;
+			regulator-max-microvolt = <1800000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+			regulator-allow-set-load;
+			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
+						   RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		vreg_l16b_2p8: ldo16 {
+			regulator-name = "vreg_l16b_2p8";
+			regulator-min-microvolt = <2800000>;
+			regulator-max-microvolt = <2800000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+			regulator-allow-set-load;
+			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
+						   RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		vreg_l17b_2p5: ldo17 {
+			regulator-name = "vreg_l17b_2p5";
+			regulator-min-microvolt = <2504000>;
+			regulator-max-microvolt = <2504000>;
+			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,pm8550vs-rpmh-regulators";
+
+		vdd-l1-supply = <&vreg_s1c_1p2>;
+		vdd-l2-supply = <&vreg_s1c_1p2>;
+		vdd-l3-supply = <&vreg_s1c_1p2>;
+		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>;
+
+		qcom,pmic-id = "c";
+
+		vreg_s1c_1p2: smps1 {
+			regulator-name = "vreg_s1c_1p2";
+			regulator-min-microvolt = <1256000>;
+			regulator-max-microvolt = <1348000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		vreg_s2c_0p8: smps2 {
+			regulator-name = "vreg_s2c_0p8";
+			regulator-min-microvolt = <852000>;
+			regulator-max-microvolt = <1036000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		vreg_s3c_0p9: smps3 {
+			regulator-name = "vreg_s3c_0p9";
+			regulator-min-microvolt = <976000>;
+			regulator-max-microvolt = <1064000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		vreg_s4c_1p2: smps4 {
+			regulator-name = "vreg_s4c_1p2";
+			regulator-min-microvolt = <1224000>;
+			regulator-max-microvolt = <1280000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		vreg_s5c_0p7: smps5 {
+			regulator-name = "vreg_s5c_0p7";
+			regulator-min-microvolt = <752000>;
+			regulator-max-microvolt = <900000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		vreg_s6c_1p8: smps6 {
+			regulator-name = "vreg_s6c_1p8";
+			regulator-min-microvolt = <1856000>;
+			regulator-max-microvolt = <2000000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		vreg_l1c_1p2: ldo1 {
+			regulator-name = "vreg_l1c_1p2";
+			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>;
+		};
+
+		vreg_l3c_1p2: ldo3 {
+			regulator-name = "vreg_l3c_1p2";
+			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-2 {
+		compatible = "qcom,pm8550vs-rpmh-regulators";
+
+		vdd-l1-supply = <&vreg_s3c_0p9>;
+
+		qcom,pmic-id = "d";
+
+		vreg_l1d_0p88: ldo1 {
+			regulator-name = "vreg_l1d_0p88";
+			regulator-min-microvolt = <912000>;
+			regulator-max-microvolt = <920000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+			regulator-allow-set-load;
+			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
+						   RPMH_REGULATOR_MODE_HPM>;
+		};
+	};
+
+	regulators-3 {
+		compatible = "qcom,pm8550vs-rpmh-regulators";
+
+		vdd-l3-supply = <&vreg_s3c_0p9>;
+
+		qcom,pmic-id = "e";
+
+		vreg_l3e_0p9: ldo3 {
+			regulator-name = "vreg_l3e_0p9";
+			regulator-min-microvolt = <880000>;
+			regulator-max-microvolt = <920000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+			regulator-allow-set-load;
+			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
+						   RPMH_REGULATOR_MODE_HPM>;
+		};
+	};
+
+	regulators-4 {
+		compatible = "qcom,pm8550vs-rpmh-regulators";
+
+		vdd-l1-supply = <&vreg_s3c_0p9>;
+		vdd-l3-supply = <&vreg_s3c_0p9>;
+
+		qcom,pmic-id = "g";
+
+		vreg_l1g_0p91: ldo1 {
+			regulator-name = "vreg_l1g_0p91";
+			regulator-min-microvolt = <912000>;
+			regulator-max-microvolt = <920000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+			regulator-allow-set-load;
+			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
+						   RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		vreg_l2g_1p2: ldo2 {
+			regulator-name = "vreg_l2g_1p2";
+			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>;
+		};
+
+		vreg_l3g_0p91: ldo3 {
+			regulator-name = "vreg_l3g_0p91";
+			regulator-min-microvolt = <880000>;
+			regulator-max-microvolt = <912000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+			regulator-allow-set-load;
+			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
+						   RPMH_REGULATOR_MODE_HPM>;
+		};
+	};
+
+	regulators-5 {
+		compatible = "qcom,pm8550ve-rpmh-regulators";
+
+		vdd-l1-supply = <&vreg_s3c_0p9>;
+		vdd-l2-supply = <&vreg_s3c_0p9>;
+		vdd-l3-supply = <&vreg_s1c_1p2>;
+		vdd-s4-supply = <&vph_pwr>;
+
+		qcom,pmic-id = "i";
+
+		vreg_s4i_0p85: smps4 {
+			regulator-name = "vreg_s4i_0p85";
+			regulator-min-microvolt = <852000>;
+			regulator-max-microvolt = <1004000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		vreg_l1i_0p88: ldo1 {
+			regulator-name = "vreg_l1i_0p88";
+			regulator-min-microvolt = <880000>;
+			regulator-max-microvolt = <912000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+			regulator-allow-set-load;
+			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
+						   RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		vreg_l2i_0p88: ldo2 {
+			regulator-name = "vreg_l2i_0p88";
+			regulator-min-microvolt = <880000>;
+			regulator-max-microvolt = <912000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+			regulator-allow-set-load;
+			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
+						   RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		vreg_l3i_1p2: ldo3 {
+			regulator-name = "vreg_l3i_0p91";
+			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>;
+		};
+	};
+};
+
+&gpi_dma1 {
+	status = "okay";
+};
+
+&gpi_dma2 {
+	status = "okay";
+};
+
+&i2c_master_hub_0 {
+	status = "okay";
+};
+
+&i2c_hub_0 {
+	clock-frequency = <400000>;
+
+	status = "okay";
+
+	/* sc8547-charger-secondary@6F */
+};
+
+&i2c_hub_2 {
+	clock-frequency = <400000>;
+
+	status = "okay";
+
+	/* sc8547-charger-primary@6F */
+};
+
+&i2c_hub_3 {
+	status = "okay";
+
+	/* pencil-wireless-charger-cps8601@41 */
+};
+
+&i2c_hub_4 {
+	clock-frequency = <400000>;
+
+	status = "okay";
+
+	/* awinic,aw88261_smartpa @34,35,37 */
+};
+
+&i2c_hub_7 {
+	clock-frequency = <400000>;
+
+	status = "okay";
+
+	/* awinic,aw88261_smartpa @34,35,37 */
+};
+
+&i2c2 {
+	status = "okay";
+
+	/* secondary kinetic,ktz8866@11 */
+};
+
+&i2c6 {
+	status = "okay";
+
+	/* For now, this will only control half region (4/8) of panel */
+	backlight: backlight@11 {
+		compatible = "kinetic,ktz8866";
+		reg = <0x11>;
+		enable-gpios = <&tlmm 89 GPIO_ACTIVE_HIGH>;
+		vddpos-supply = <&bl_avdd_5p9>;
+		vddneg-supply = <&bl_avee_5p9>;
+		current-num-sinks = <4>;
+	};
+};
+
+&gpu {
+	status = "okay";
+
+	zap-shader {
+		firmware-name = "qcom/sm8650/Oneplus/caihong/gen70900_zap.mbn";
+	};
+};
+
+&mdss {
+	status = "okay";
+};
+
+&mdss_dsi0 {
+	vdda-supply = <&vreg_l3i_1p2>;
+
+	qcom,dual-dsi-mode;
+	qcom,master-dsi;
+	qcom,sync-dual-dsi;
+
+	status = "disabled";
+
+	panel: panel@0 {
+		/* Add compatible string until panel driver is upstreamed. */
+		reg = <0>;
+
+		reset-gpios = <&tlmm 133 GPIO_ACTIVE_LOW>;
+
+		vddio-supply = <&vreg_l12b_1p8>;
+
+		pinctrl-0 = <&disp_reset_n_active>, <&mdp_vsync_active>,
+			    <&mdp_vsync1_active>, <&mdp_dynamic_vsync_active>;
+		pinctrl-1 = <&disp_reset_n_suspend>, <&mdp_vsync_suspend>,
+			    <&mdp_vsync1_suspend>, <&mdp_dynamic_vsync_suspend>;
+		pinctrl-names = "default", "sleep";
+
+		ports {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			port@0 {
+				reg = <0>;
+
+				panel_in_0: endpoint {
+					remote-endpoint = <&mdss_dsi0_out>;
+				};
+			};
+
+			port@1 {
+				reg = <1>;
+
+				panel_in_1: endpoint {
+					remote-endpoint = <&mdss_dsi1_out>;
+				};
+			};
+		};
+	};
+};
+
+&mdss_dsi0_out {
+	remote-endpoint = <&panel_in_0>;
+	data-lanes = <0 1 2 3>;
+};
+
+&mdss_dsi0_phy {
+	vdds-supply = <&vreg_l1i_0p88>;
+
+	status = "okay";
+};
+
+&mdss_dsi1 {
+	vdda-supply = <&vreg_l3i_1p2>;
+
+	qcom,dual-dsi-mode;
+	qcom,sync-dual-dsi;
+
+	status = "disabled";
+
+	/* DSI1 is slave, so use DSI0 clocks */
+	assigned-clock-parents = <&mdss_dsi0_phy DSI_BYTE_PLL_CLK>,
+				 <&mdss_dsi0_phy DSI_PIXEL_PLL_CLK>;
+};
+
+&mdss_dsi1_out {
+	remote-endpoint = <&panel_in_1>;
+	data-lanes = <0 1 2 3>;
+};
+
+&mdss_dsi1_phy {
+	vdds-supply = <&vreg_l1i_0p88>;
+
+	status = "okay";
+};
+
+&mdss_dp0 {
+	status = "okay";
+};
+
+&mdss_dp0_out {
+	data-lanes = <0 1>;
+};
+
+&pcie0 {
+	wake-gpios = <&tlmm 96 GPIO_ACTIVE_HIGH>;
+	perst-gpios = <&tlmm 94 GPIO_ACTIVE_LOW>;
+
+	pinctrl-0 = <&pcie0_default_state>;
+	pinctrl-names = "default";
+
+	status = "okay";
+};
+
+&pcieport0 {
+	wifi@0 {
+		compatible = "pci17cb,1107";
+		reg = <0x10000 0x0 0x0 0x0 0x0>;
+
+		vddrfacmn-supply = <&vreg_pmu_rfa_cmn>;
+		vddaon-supply = <&vreg_pmu_aon_0p59>;
+		vddwlcx-supply = <&vreg_pmu_wlcx_0p8>;
+		vddwlmx-supply = <&vreg_pmu_wlmx_0p85>;
+		vddrfa0p8-supply = <&vreg_pmu_rfa_0p8>;
+		vddrfa1p2-supply = <&vreg_pmu_rfa_1p2>;
+		vddrfa1p8-supply = <&vreg_pmu_rfa_1p8>;
+		vddpcie0p9-supply = <&vreg_pmu_pcie_0p9>;
+		vddpcie1p8-supply = <&vreg_pmu_pcie_1p8>;
+	};
+};
+
+&pcie0_phy {
+	vdda-phy-supply = <&vreg_l1i_0p88>;
+	vdda-pll-supply = <&vreg_l3i_1p2>;
+
+	status = "okay";
+};
+
+&pm8550_gpios {
+	volume_up_n: volume-up-n-state {
+		pins = "gpio6";
+		function = "normal";
+		bias-pull-up;
+		input-enable;
+		power-source = <1>;
+	};
+};
+
+&pm8550b_eusb2_repeater {
+	vdd18-supply = <&vreg_l15b_1p8>;
+	vdd3-supply = <&vreg_l5b_3p1>;
+};
+
+&pon_pwrkey {
+	status = "okay";
+};
+
+&pon_resin {
+	linux,code = <KEY_VOLUMEUP>;
+
+	status = "okay";
+};
+
+&qupv3_id_0 {
+	status = "okay";
+};
+
+&qupv3_id_1 {
+	status = "okay";
+};
+
+&remoteproc_adsp {
+	firmware-name = "qcom/sm8650/Oneplus/caihong/adsp.mbn",
+			"qcom/sm8650/Oneplus/caihong/adsp_dtb.mbn";
+
+	status = "okay";
+};
+
+&remoteproc_cdsp {
+	firmware-name = "qcom/sm8650/Oneplus/caihong/cdsp.mbn",
+			"qcom/sm8650/Oneplus/caihong/cdsp_dtb.mbn";
+
+	status = "okay";
+};
+
+&sleep_clk {
+	clock-frequency = <32000>;
+};
+
+&tlmm {
+	gpio-reserved-ranges = <36 4>, <74 1>;
+
+	bt_default: bt-default-state {
+		bt-en-pins {
+			pins = "gpio17";
+			function = "gpio";
+			drive-strength = <16>;
+			bias-disable;
+		};
+
+		sw-ctrl-pins {
+			pins = "gpio18";
+			function = "gpio";
+			bias-pull-down;
+		};
+	};
+
+	disp_reset_n_active: disp-reset-n-active-state {
+		pins = "gpio133";
+		function = "gpio";
+		drive-strength = <8>;
+		bias-disable;
+	};
+
+	disp_reset_n_suspend: disp-reset-n-suspend-state {
+		pins = "gpio133";
+		function = "gpio";
+		drive-strength = <2>;
+		bias-pull-down;
+	};
+
+	mdp_dynamic_vsync_active: mdp-dynamic-vsync-active-state {
+		pins = "gpio85";
+		function = "gpio";
+		drive-strength = <2>;
+		bias-pull-down;
+	};
+
+	mdp_dynamic_vsync_suspend: mdp-dynamic-vsync-suspend-state {
+		pins = "gpio85";
+		function = "gpio";
+		drive-strength = <2>;
+		bias-pull-down;
+	};
+
+	mdp_vsync_active: mdp-vsync-active-state {
+		pins = "gpio86";
+		function = "mdp_vsync";
+		drive-strength = <2>;
+		bias-pull-down;
+	};
+
+	mdp_vsync_suspend: mdp-vsync-suspend-state {
+		pins = "gpio86";
+		function = "mdp_vsync";
+		drive-strength = <2>;
+		bias-pull-down;
+	};
+
+	mdp_vsync1_active: mdp-vsync1-active-state {
+		pins = "gpio87";
+		function = "mdp_vsync";
+		drive-strength = <2>;
+		bias-pull-down;
+	};
+
+	mdp_vsync1_suspend: mdp-vsync1-suspend-state {
+		pins = "gpio87";
+		function = "mdp_vsync";
+		drive-strength = <2>;
+		bias-pull-down;
+	};
+
+	wlan_en: wlan-en-state {
+		pins = "gpio16";
+		function = "gpio";
+		drive-strength = <8>;
+		bias-pull-down;
+	};
+};
+
+&uart14 {
+	status = "okay";
+
+	bluetooth {
+		compatible = "qcom,wcn7850-bt";
+
+		vddrfacmn-supply = <&vreg_pmu_rfa_cmn>;
+		vddaon-supply = <&vreg_pmu_aon_0p59>;
+		vddwlcx-supply = <&vreg_pmu_wlcx_0p8>;
+		vddwlmx-supply = <&vreg_pmu_wlmx_0p85>;
+		vddrfa0p8-supply = <&vreg_pmu_rfa_0p8>;
+		vddrfa1p2-supply = <&vreg_pmu_rfa_1p2>;
+		vddrfa1p8-supply = <&vreg_pmu_rfa_1p8>;
+
+		max-speed = <3200000>;
+	};
+};
+
+&ufs_mem_hc {
+	reset-gpios = <&tlmm 210 GPIO_ACTIVE_LOW>;
+
+	vcc-supply = <&vreg_l17b_2p5>;
+	vcc-max-microamp = <1300000>;
+	vccq-supply = <&vreg_l1c_1p2>;
+	vccq-max-microamp = <1200000>;
+
+	status = "okay";
+};
+
+&ufs_mem_phy {
+	vdda-phy-supply = <&vreg_l1d_0p88>;
+	vdda-pll-supply = <&vreg_l3i_1p2>;
+
+	status = "okay";
+};
+
+&usb_1 {
+	status = "okay";
+};
+
+&usb_1_dwc3 {
+	dr_mode = "otg";
+	usb-role-switch;
+};
+
+&usb_1_dwc3_hs {
+	remote-endpoint = <&pmic_glink_hs_in>;
+};
+
+&usb_1_hsphy {
+	vdd-supply = <&vreg_l1i_0p88>;
+	vdda12-supply = <&vreg_l3i_1p2>;
+
+	phys = <&pm8550b_eusb2_repeater>;
+
+	status = "okay";
+};
+
+&usb_dp_qmpphy {
+	vdda-phy-supply = <&vreg_l3i_1p2>;
+	vdda-pll-supply = <&vreg_l3g_0p91>;
+
+	status = "okay";
+};
+
+&usb_dp_qmpphy_out {
+	remote-endpoint = <&pmic_glink_ss_in>;
+};
+
+&xo_board {
+	clock-frequency = <76800000>;
+};
-- 
2.49.0


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

* Re: [PATCH 2/2] arm64: dts: qcom: sm8650: Add support for Oneplus Pad Pro (caihong)
  2025-05-20 16:42 ` [PATCH 2/2] arm64: dts: qcom: sm8650: Add support for " Pengyu Luo
@ 2025-05-20 21:54   ` Konrad Dybcio
  2025-05-21  8:37     ` Pengyu Luo
  2025-05-21 12:49   ` neil.armstrong
  1 sibling, 1 reply; 16+ messages in thread
From: Konrad Dybcio @ 2025-05-20 21:54 UTC (permalink / raw)
  To: Pengyu Luo, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel

On 5/20/25 6:42 PM, Pengyu Luo wrote:
> The OnePlus Pad Pro is an Android tablet based on the Qualcomm SM8650
> platform. Its device codename is "caihong". This patch adds an initial
> devicetree for basic functionality.
> 
> Currently working components include:
> - Backlight
> - Bluetooth
> - Battery charging (up to 5v 0.5a) & reporting via pmic-glink (There
> are many unknown notifications)
> - Display panel ([1])
> - Keyboard (via BT)
> - Power key & volume keys
> - Touchscreen & stylus ([2])
> - USB Type-c port
> - UFS storage
> - Wi-Fi
> 
> The following components are currently non-functional:
> - Audio
> - Cameras
> - Charging pump (dual sc8547)
> - Keyboard (via pogo pin)
> - Stylus wireless charger (cps8601)
> - UCSI over GLINK (PPM init fails)
> 
> [1]: The panel is a dual-DSI, dual-DSC display that requires setting
>      'slice_per_pkt = 2' in the DPU configuration. The panel driver
>      will be submitted separately later.
> [2]: Touchscreen/stylus driver available at:
>      https://github.com/OnePlusOSS/android_kernel_modules_and_devicetree_oneplus_sm8650/blob/oneplus/sm8650_v_15.0.0_pad_pro/vendor/oplus/kernel/touchpanel/oplus_touchscreen_v2/Novatek/NT36532_noflash/nvt_drivers_nt36532_noflash.c
>      The downstream driver has been ported and tested locally, but
>      requires cleanup, it may be submitted separately later.

I have a Lenovo Tab P11 with a nt36523w (-23, not -32) for which I have once
poked at the driver for.. I see the driver you posted mentions -23 as well,
please keep me in the loop if you're going to upstream it

[...]

> +		/*
> +		 * This memory region is required to initialize the backlight
> +		 * and display for bootloader. Normally, this region is not
> +		 * needed. However, due to limitations in the current mainline
> +		 * KTZ8866 driver, dual backlight ICs cannot be properly
> +		 * initialized.
> +		 *
> +		 * A workaround involving secondary registration was proposed,
> +		 * but rejected by reviewers. This reserved region is kept as
> +		 * a temporary solution until a proper initialization method
> +		 * that satisfies upstream requirements is found.
> +		 */
> +		splash_region {
> +			reg = <0 0xd5100000 0 0x2b00000>;
> +			no-map;
> +		};

I assume this means "if the bootloader sees /reserved-memory/splash_region,
it keeps the display online" - let's not do that, as underscores are not
allowed in node names (kernel coding style, not dt syntax)

> +	};
> +
> +	/* No Modem */
> +	smp2p-modem {
> +		status = "disabled";
> +	};

There shouldn't be any harm in keeping this node enabled

[...]

> +
> +	vph_pwr: vph-pwr-regulator {
> +		compatible = "regulator-fixed";
> +
> +		regulator-name = "vph_pwr";
> +		regulator-min-microvolt = <3700000>;
> +		regulator-max-microvolt = <3700000>;
> +
> +		regulator-always-on;
> +		regulator-boot-on;
> +	};
> +
> +	wcn7850-pmu {
> +		compatible = "qcom,wcn7850-pmu";
> +
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&wlan_en>, <&bt_default>;

property-n
property-names

please

[...]

> +&i2c_hub_0 {
> +	clock-frequency = <400000>;
> +
> +	status = "okay";
> +
> +	/* sc8547-charger-secondary@6F */
> +};
> +
> +&i2c_hub_2 {
> +	clock-frequency = <400000>;
> +
> +	status = "okay";
> +
> +	/* sc8547-charger-primary@6F */
> +};
> +
> +&i2c_hub_3 {
> +	status = "okay";
> +
> +	/* pencil-wireless-charger-cps8601@41 */
> +};
> +
> +&i2c_hub_4 {
> +	clock-frequency = <400000>;
> +
> +	status = "okay";
> +
> +	/* awinic,aw88261_smartpa @34,35,37 */

We have drivers for these!

sound/soc/codecs/aw88261.c

> +};
> +
> +&i2c_hub_7 {
> +	clock-frequency = <400000>;
> +
> +	status = "okay";
> +
> +	/* awinic,aw88261_smartpa @34,35,37 */
> +};
> +
> +&i2c2 {
> +	status = "okay";
> +
> +	/* secondary kinetic,ktz8866@11 */

You can describe it, the driver sets some nonzero default brightness

Konrad

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

* Re: [PATCH 2/2] arm64: dts: qcom: sm8650: Add support for Oneplus Pad Pro (caihong)
  2025-05-20 21:54   ` Konrad Dybcio
@ 2025-05-21  8:37     ` Pengyu Luo
  2025-05-21 12:43       ` neil.armstrong
  2025-05-22 15:05       ` Konrad Dybcio
  0 siblings, 2 replies; 16+ messages in thread
From: Pengyu Luo @ 2025-05-21  8:37 UTC (permalink / raw)
  To: konrad.dybcio
  Cc: andersson, conor+dt, devicetree, konradybcio, krzk+dt,
	linux-arm-msm, linux-kernel, mitltlatltl, robh

On Wed, May 21, 2025 at 5:54 AM Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> wrote:
> On 5/20/25 6:42 PM, Pengyu Luo wrote:
> > The OnePlus Pad Pro is an Android tablet based on the Qualcomm SM8650
> > platform. Its device codename is "caihong". This patch adds an initial
> > devicetree for basic functionality.
> >
> > Currently working components include:
> > - Backlight
> > - Bluetooth
> > - Battery charging (up to 5v 0.5a) & reporting via pmic-glink (There
> > are many unknown notifications)
> > - Display panel ([1])
> > - Keyboard (via BT)
> > - Power key & volume keys
> > - Touchscreen & stylus ([2])
> > - USB Type-c port
> > - UFS storage
> > - Wi-Fi
> >
> > The following components are currently non-functional:
> > - Audio
> > - Cameras
> > - Charging pump (dual sc8547)
> > - Keyboard (via pogo pin)
> > - Stylus wireless charger (cps8601)
> > - UCSI over GLINK (PPM init fails)
> >
> > [1]: The panel is a dual-DSI, dual-DSC display that requires setting
> >      'slice_per_pkt = 2' in the DPU configuration. The panel driver
> >      will be submitted separately later.
> > [2]: Touchscreen/stylus driver available at:
> >      https://github.com/OnePlusOSS/android_kernel_modules_and_devicetree_oneplus_sm8650/blob/oneplus/sm8650_v_15.0.0_pad_pro/vendor/oplus/kernel/touchpanel/oplus_touchscreen_v2/Novatek/NT36532_noflash/nvt_drivers_nt36532_noflash.c
> >      The downstream driver has been ported and tested locally, but
> >      requires cleanup, it may be submitted separately later.
>
> I have a Lenovo Tab P11 with a nt36523w (-23, not -32) for which I have once
> poked at the driver for.. I see the driver you posted mentions -23 as well,
> please keep me in the loop if you're going to upstream it
>

I see. Actually, they share the most part of nt36xxx, but with
different memory maps. See
https://github.com/MiCode/Xiaomi_Kernel_OpenSource/blob/elish-r-oss/drivers/input/touchscreen/nt36xxx/nt36xxx_mem_map.h

> [...]
>
> > +             /*
> > +              * This memory region is required to initialize the backlight
> > +              * and display for bootloader. Normally, this region is not
> > +              * needed. However, due to limitations in the current mainline
> > +              * KTZ8866 driver, dual backlight ICs cannot be properly
> > +              * initialized.
> > +              *
> > +              * A workaround involving secondary registration was proposed,
> > +              * but rejected by reviewers. This reserved region is kept as
> > +              * a temporary solution until a proper initialization method
> > +              * that satisfies upstream requirements is found.
> > +              */
> > +             splash_region {
> > +                     reg = <0 0xd5100000 0 0x2b00000>;
> > +                     no-map;
> > +             };
>
> I assume this means "if the bootloader sees /reserved-memory/splash_region,
> it keeps the display online" - let's not do that, as underscores are not
> allowed in node names (kernel coding style, not dt syntax)
>

Right, without it, BL won't initialize backlight and display. We need
it to initialize backlight here since mainline ktz8866 won't program
partial registers properly. If there is no other workaround, I will
remove it to keep kernel coding style.

> > +     };
> > +
> > +     /* No Modem */
> > +     smp2p-modem {
> > +             status = "disabled";
> > +     };
>
> There shouldn't be any harm in keeping this node enabled
>

Ack

> [...]
>
> > +
> > +     vph_pwr: vph-pwr-regulator {
> > +             compatible = "regulator-fixed";
> > +
> > +             regulator-name = "vph_pwr";
> > +             regulator-min-microvolt = <3700000>;
> > +             regulator-max-microvolt = <3700000>;
> > +
> > +             regulator-always-on;
> > +             regulator-boot-on;
> > +     };
> > +
> > +     wcn7850-pmu {
> > +             compatible = "qcom,wcn7850-pmu";
> > +
> > +             pinctrl-names = "default";
> > +             pinctrl-0 = <&wlan_en>, <&bt_default>;
>
> property-n
> property-names
>
> please
>

Ack

> [...]
>
> > +&i2c_hub_0 {
> > +     clock-frequency = <400000>;
> > +
> > +     status = "okay";
> > +
> > +     /* sc8547-charger-secondary@6F */
> > +};
> > +
> > +&i2c_hub_2 {
> > +     clock-frequency = <400000>;
> > +
> > +     status = "okay";
> > +
> > +     /* sc8547-charger-primary@6F */
> > +};
> > +
> > +&i2c_hub_3 {
> > +     status = "okay";
> > +
> > +     /* pencil-wireless-charger-cps8601@41 */
> > +};
> > +
> > +&i2c_hub_4 {
> > +     clock-frequency = <400000>;
> > +
> > +     status = "okay";
> > +
> > +     /* awinic,aw88261_smartpa @34,35,37 */
>
> We have drivers for these!
>
> sound/soc/codecs/aw88261.c
>

I noticed that. But I have not looked into the sound yet. I may add
the nodes after test. BTW the mainline one is quite simple compared
to the downstream, doubting if it is really working
https://github.com/OnePlusOSS/android_kernel_modules_and_devicetree_oneplus_sm8650/tree/oneplus/sm8650_v_15.0.0_pad_pro/vendor/oplus/kernel/audio/codecs/aw882xx

> > +};
> > +
> > +&i2c_hub_7 {
> > +     clock-frequency = <400000>;
> > +
> > +     status = "okay";
> > +
> > +     /* awinic,aw88261_smartpa @34,35,37 */
> > +};
> > +
> > +&i2c2 {
> > +     status = "okay";
> > +
> > +     /* secondary kinetic,ktz8866@11 */
>
> You can describe it, the driver sets some nonzero default brightness
>

But the backlight framework won't index them, which causes sysfs
collision when the second instance is registering.

Best wishes,
Pengyu

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

* Re: [PATCH 1/2] dt-bindings: arm: qcom: Add Oneplus Pad Pro (caihong)
  2025-05-20 16:42 ` [PATCH 1/2] dt-bindings: arm: qcom: Add Oneplus Pad Pro (caihong) Pengyu Luo
@ 2025-05-21  9:58   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 16+ messages in thread
From: Krzysztof Kozlowski @ 2025-05-21  9:58 UTC (permalink / raw)
  To: Pengyu Luo
  Cc: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, linux-arm-msm, devicetree, linux-kernel

On Wed, May 21, 2025 at 12:42:07AM GMT, Pengyu Luo wrote:
> The OnePlus Pad Pro is an Android tablet based on the Qualcomm SM8650
> platform. Its device codename is "caihong".
> 
> Signed-off-by: Pengyu Luo <mitltlatltl@gmail.com>
> ---
>  Documentation/devicetree/bindings/arm/qcom.yaml | 1 +
>  1 file changed, 1 insertion(+)

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

Best regards,
Krzysztof


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

* Re: [PATCH 2/2] arm64: dts: qcom: sm8650: Add support for Oneplus Pad Pro (caihong)
  2025-05-21  8:37     ` Pengyu Luo
@ 2025-05-21 12:43       ` neil.armstrong
  2025-05-22 10:05         ` Pengyu Luo
  2025-05-22 15:05       ` Konrad Dybcio
  1 sibling, 1 reply; 16+ messages in thread
From: neil.armstrong @ 2025-05-21 12:43 UTC (permalink / raw)
  To: Pengyu Luo, konrad.dybcio
  Cc: andersson, conor+dt, devicetree, konradybcio, krzk+dt,
	linux-arm-msm, linux-kernel, robh

On 21/05/2025 10:37, Pengyu Luo wrote:
> On Wed, May 21, 2025 at 5:54 AM Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> wrote:
>> On 5/20/25 6:42 PM, Pengyu Luo wrote:
>>> The OnePlus Pad Pro is an Android tablet based on the Qualcomm SM8650
>>> platform. Its device codename is "caihong". This patch adds an initial
>>> devicetree for basic functionality.
>>>
>>> Currently working components include:
>>> - Backlight
>>> - Bluetooth
>>> - Battery charging (up to 5v 0.5a) & reporting via pmic-glink (There
>>> are many unknown notifications)
>>> - Display panel ([1])
>>> - Keyboard (via BT)
>>> - Power key & volume keys
>>> - Touchscreen & stylus ([2])
>>> - USB Type-c port
>>> - UFS storage
>>> - Wi-Fi
>>>
>>> The following components are currently non-functional:
>>> - Audio
>>> - Cameras
>>> - Charging pump (dual sc8547)
>>> - Keyboard (via pogo pin)
>>> - Stylus wireless charger (cps8601)
>>> - UCSI over GLINK (PPM init fails)
>>>
>>> [1]: The panel is a dual-DSI, dual-DSC display that requires setting
>>>       'slice_per_pkt = 2' in the DPU configuration. The panel driver
>>>       will be submitted separately later.
>>> [2]: Touchscreen/stylus driver available at:
>>>       https://github.com/OnePlusOSS/android_kernel_modules_and_devicetree_oneplus_sm8650/blob/oneplus/sm8650_v_15.0.0_pad_pro/vendor/oplus/kernel/touchpanel/oplus_touchscreen_v2/Novatek/NT36532_noflash/nvt_drivers_nt36532_noflash.c
>>>       The downstream driver has been ported and tested locally, but
>>>       requires cleanup, it may be submitted separately later.
>>
>> I have a Lenovo Tab P11 with a nt36523w (-23, not -32) for which I have once
>> poked at the driver for.. I see the driver you posted mentions -23 as well,
>> please keep me in the loop if you're going to upstream it
>>
> 
> I see. Actually, they share the most part of nt36xxx, but with
> different memory maps. See
> https://github.com/MiCode/Xiaomi_Kernel_OpenSource/blob/elish-r-oss/drivers/input/touchscreen/nt36xxx/nt36xxx_mem_map.h
> 
>> [...]
>>
>>> +             /*
>>> +              * This memory region is required to initialize the backlight
>>> +              * and display for bootloader. Normally, this region is not
>>> +              * needed. However, due to limitations in the current mainline
>>> +              * KTZ8866 driver, dual backlight ICs cannot be properly
>>> +              * initialized.
>>> +              *
>>> +              * A workaround involving secondary registration was proposed,
>>> +              * but rejected by reviewers. This reserved region is kept as
>>> +              * a temporary solution until a proper initialization method
>>> +              * that satisfies upstream requirements is found.
>>> +              */
>>> +             splash_region {
>>> +                     reg = <0 0xd5100000 0 0x2b00000>;
>>> +                     no-map;
>>> +             };
>>
>> I assume this means "if the bootloader sees /reserved-memory/splash_region,
>> it keeps the display online" - let's not do that, as underscores are not
>> allowed in node names (kernel coding style, not dt syntax)
>>
> 
> Right, without it, BL won't initialize backlight and display. We need
> it to initialize backlight here since mainline ktz8866 won't program
> partial registers properly. If there is no other workaround, I will
> remove it to keep kernel coding style.

Can't you add a simple-framebuffer for v1 and drop all the DSI stuff until
you figured out the backlight and upstreamed the panel driver ?

Neil

> 
>>> +     };
>>> +
>>> +     /* No Modem */
>>> +     smp2p-modem {
>>> +             status = "disabled";
>>> +     };
>>
>> There shouldn't be any harm in keeping this node enabled
>>
> 
> Ack
> 
>> [...]
>>
>>> +
>>> +     vph_pwr: vph-pwr-regulator {
>>> +             compatible = "regulator-fixed";
>>> +
>>> +             regulator-name = "vph_pwr";
>>> +             regulator-min-microvolt = <3700000>;
>>> +             regulator-max-microvolt = <3700000>;
>>> +
>>> +             regulator-always-on;
>>> +             regulator-boot-on;
>>> +     };
>>> +
>>> +     wcn7850-pmu {
>>> +             compatible = "qcom,wcn7850-pmu";
>>> +
>>> +             pinctrl-names = "default";
>>> +             pinctrl-0 = <&wlan_en>, <&bt_default>;
>>
>> property-n
>> property-names
>>
>> please
>>
> 
> Ack
> 
>> [...]
>>
>>> +&i2c_hub_0 {
>>> +     clock-frequency = <400000>;
>>> +
>>> +     status = "okay";
>>> +
>>> +     /* sc8547-charger-secondary@6F */
>>> +};
>>> +
>>> +&i2c_hub_2 {
>>> +     clock-frequency = <400000>;
>>> +
>>> +     status = "okay";
>>> +
>>> +     /* sc8547-charger-primary@6F */
>>> +};
>>> +
>>> +&i2c_hub_3 {
>>> +     status = "okay";
>>> +
>>> +     /* pencil-wireless-charger-cps8601@41 */
>>> +};
>>> +
>>> +&i2c_hub_4 {
>>> +     clock-frequency = <400000>;
>>> +
>>> +     status = "okay";
>>> +
>>> +     /* awinic,aw88261_smartpa @34,35,37 */
>>
>> We have drivers for these!
>>
>> sound/soc/codecs/aw88261.c
>>
> 
> I noticed that. But I have not looked into the sound yet. I may add
> the nodes after test. BTW the mainline one is quite simple compared
> to the downstream, doubting if it is really working
> https://github.com/OnePlusOSS/android_kernel_modules_and_devicetree_oneplus_sm8650/tree/oneplus/sm8650_v_15.0.0_pad_pro/vendor/oplus/kernel/audio/codecs/aw882xx
> 
>>> +};
>>> +
>>> +&i2c_hub_7 {
>>> +     clock-frequency = <400000>;
>>> +
>>> +     status = "okay";
>>> +
>>> +     /* awinic,aw88261_smartpa @34,35,37 */
>>> +};
>>> +
>>> +&i2c2 {
>>> +     status = "okay";
>>> +
>>> +     /* secondary kinetic,ktz8866@11 */
>>
>> You can describe it, the driver sets some nonzero default brightness
>>
> 
> But the backlight framework won't index them, which causes sysfs
> collision when the second instance is registering.
> 
> Best wishes,
> Pengyu
> 


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

* Re: [PATCH 2/2] arm64: dts: qcom: sm8650: Add support for Oneplus Pad Pro (caihong)
  2025-05-20 16:42 ` [PATCH 2/2] arm64: dts: qcom: sm8650: Add support for " Pengyu Luo
  2025-05-20 21:54   ` Konrad Dybcio
@ 2025-05-21 12:49   ` neil.armstrong
  2025-05-22 10:05     ` Pengyu Luo
  1 sibling, 1 reply; 16+ messages in thread
From: neil.armstrong @ 2025-05-21 12:49 UTC (permalink / raw)
  To: Pengyu Luo, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel

Hi,

On 20/05/2025 18:42, Pengyu Luo wrote:
> The OnePlus Pad Pro is an Android tablet based on the Qualcomm SM8650
> platform. Its device codename is "caihong". This patch adds an initial
> devicetree for basic functionality.
> 
> Currently working components include:
> - Backlight
> - Bluetooth
> - Battery charging (up to 5v 0.5a) & reporting via pmic-glink (There
> are many unknown notifications)
> - Display panel ([1])
> - Keyboard (via BT)
> - Power key & volume keys
> - Touchscreen & stylus ([2])
> - USB Type-c port
> - UFS storage
> - Wi-Fi
> 
> The following components are currently non-functional:
> - Audio
> - Cameras
> - Charging pump (dual sc8547)
> - Keyboard (via pogo pin)
> - Stylus wireless charger (cps8601)
> - UCSI over GLINK (PPM init fails)

Are you sure the QMP PHY and the dwc3 probes ? if one is missing, UCSI PPM init will timeout because it doesn't find the connectors muxes & otg devices.

> 
> [1]: The panel is a dual-DSI, dual-DSC display that requires setting
>       'slice_per_pkt = 2' in the DPU configuration. The panel driver
>       will be submitted separately later.
> [2]: Touchscreen/stylus driver available at:
>       https://github.com/OnePlusOSS/android_kernel_modules_and_devicetree_oneplus_sm8650/blob/oneplus/sm8650_v_15.0.0_pad_pro/vendor/oplus/kernel/touchpanel/oplus_touchscreen_v2/Novatek/NT36532_noflash/nvt_drivers_nt36532_noflash.c
>       The downstream driver has been ported and tested locally, but
>       requires cleanup, it may be submitted separately later.
> 
> To test this device tree, follow these minimal steps:
> 
> 1. Build the kernel. Ensure that all `compatible` strings used in
> this device tree (or any included dtsi files) have corresponding
> drivers enabled in the kernel configuration.
> 
> 2. Creating boot image
> 
> Merge the kernel and device tree blob:
> 
> cat arch/arm64/boot/Image.gz arch/arm64/boot/dts/qcom/sm8650-oneplus-\
> caihong.dtb > kernel-dtb
> 
> Then create a boot.img:
> 
> mkbootimg \
> --base 0x00000000 \
> --kernel_offset 0x00008000 \
> --ramdisk_offset 0x01000000 \
> --second_offset 0x00f00000 \
> --tags_offset 0x00000100 \
> --pagesize 4096 \
> --header_version 4 \
> --kernel kernel-dtb \
> --ramdisk some_ramdisk \
> --cmdline "some comeline" \
> -o mainline-boot.img

Isn't image version 2 working ?

> 
> 3. Flashing the boot image
> 
> fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img
> fastboot erase dtbo
> fastboot flash boot mainline-boot.img
> 
> See also https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=39c5963
> 
> Signed-off-by: Pengyu Luo <mitltlatltl@gmail.com>
> ---
>   .../boot/dts/qcom/sm8650-oneplus-caihong.dts  | 960 ++++++++++++++++++
>   1 file changed, 960 insertions(+)
>   create mode 100644 arch/arm64/boot/dts/qcom/sm8650-oneplus-caihong.dts
> 
> diff --git a/arch/arm64/boot/dts/qcom/sm8650-oneplus-caihong.dts b/arch/arm64/boot/dts/qcom/sm8650-oneplus-caihong.dts
> new file mode 100644
> index 0000000000..93aed47e10
> --- /dev/null
> +++ b/arch/arm64/boot/dts/qcom/sm8650-oneplus-caihong.dts
> @@ -0,0 +1,960 @@
> +// SPDX-License-Identifier: BSD-3-Clause
> +/*
> + * Based on Qualcomm Reference Device DeviceTree
> + *
> + * Copyright (c) 2023, Linaro Limited
> + * Copyright (c) 2025, Pengyu Luo <mitltlatltl@gmail.com>
> + */
> +
> +/dts-v1/;
> +
> +#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
> +#include "sm8650.dtsi"
> +#include "pm8550.dtsi"
> +#include "pm8550b.dtsi"
> +#define PMK8550VE_SID 8
> +#include "pm8550ve.dtsi"
> +#include "pm8550vs.dtsi"
> +#include "pmk8550.dtsi"
> +
> +/delete-node/ &adspslpi_mem;
> +/delete-node/ &hwfence_shbuf;
> +
> +/* No Modem */
> +/delete-node/ &mpss_mem;
> +/delete-node/ &q6_mpss_dtb_mem;
> +/delete-node/ &mpss_dsm_mem;
> +/delete-node/ &mpss_dsm_mem_2;
> +/delete-node/ &qlink_logging_mem;
> +/delete-node/ &remoteproc_mpss;
> +
> +/* Unused now, and reusable, taking 144 MiB back */
> +/delete-node/ &trust_ui_vm_mem;
> +/delete-node/ &oem_vm_mem;
> +/delete-node/ &qdss_mem;

Are you sure QTEE won't use this ?

> +
> +/ {
> +	model = "Oneplus Pad Pro";
> +	compatible = "oneplus,caihong", "qcom,sm8650";
> +	chassis-type = "tablet";
> +
> +	aliases {
> +		serial0 = &uart14;
> +	};
> +
> +	bl_avdd_5p9: bl-avdd-regulator {
> +		compatible = "regulator-fixed";
> +		regulator-name = "bl_avdd_5p9";
> +		regulator-min-microvolt = <5900000>;
> +		regulator-max-microvolt = <5900000>;
> +		gpio = <&tlmm 90 GPIO_ACTIVE_HIGH>;
> +		enable-active-high;
> +	};
> +
> +	bl_avee_5p9: bl-avee-regulator {
> +		compatible = "regulator-fixed";
> +		regulator-name = "bl_avee_5p9";
> +		regulator-min-microvolt = <5900000>;
> +		regulator-max-microvolt = <5900000>;
> +		gpio = <&tlmm 91 GPIO_ACTIVE_HIGH>;
> +		enable-active-high;
> +	};
> +
> +	gpio-keys {
> +		compatible = "gpio-keys";
> +
> +		pinctrl-0 = <&volume_up_n>;
> +		pinctrl-names = "default";
> +
> +		key-volume-up {
> +			label = "Volume Up";
> +			linux,code = <KEY_VOLUMEDOWN>;
> +			gpios = <&pm8550_gpios 6 GPIO_ACTIVE_LOW>;
> +			debounce-interval = <15>;
> +			linux,can-disable;
> +			wakeup-source;
> +		};
> +	};
> +
> +	pmic-glink {
> +		compatible = "qcom,sm8650-pmic-glink",
> +			     "qcom,sm8550-pmic-glink",
> +			     "qcom,pmic-glink";
> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +		orientation-gpios = <&tlmm 29 GPIO_ACTIVE_HIGH>;
> +
> +		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>;
> +					};
> +				};
> +
> +				port@1 {
> +					reg = <1>;
> +
> +					pmic_glink_ss_in: endpoint {
> +						remote-endpoint = <&usb_dp_qmpphy_out>;
> +					};
> +				};

No Altmode display ? no SBU mux nor redrivers ?

> +			};
> +		};
> +	};
> +
> +	reserved-memory {
> +		adspslpi_mem: adspslpi@9df00000 {
> +			reg = <0 0x9df00000 0 0x5280000>;
> +			no-map;
> +		};
> +
> +		hwfence_shbuf: hwfence-shbuf@d4e23000 {
> +			reg = <0 0xd4e23000 0 0x2dd000>;
> +			no-map;
> +		};
> +
> +		/*
> +		 * This memory region is required to initialize the backlight
> +		 * and display for bootloader. Normally, this region is not
> +		 * needed. However, due to limitations in the current mainline
> +		 * KTZ8866 driver, dual backlight ICs cannot be properly
> +		 * initialized.
> +		 *
> +		 * A workaround involving secondary registration was proposed,
> +		 * but rejected by reviewers. This reserved region is kept as
> +		 * a temporary solution until a proper initialization method
> +		 * that satisfies upstream requirements is found.
> +		 */
> +		splash_region {
> +			reg = <0 0xd5100000 0 0x2b00000>;
> +			no-map;
> +		};
> +	};
> +
> +	/* No Modem */
> +	smp2p-modem {
> +		status = "disabled";
> +	};
> +
> +	vph_pwr: vph-pwr-regulator {
> +		compatible = "regulator-fixed";
> +
> +		regulator-name = "vph_pwr";
> +		regulator-min-microvolt = <3700000>;
> +		regulator-max-microvolt = <3700000>;
> +
> +		regulator-always-on;
> +		regulator-boot-on;
> +	};
> +
> +	wcn7850-pmu {
> +		compatible = "qcom,wcn7850-pmu";
> +
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&wlan_en>, <&bt_default>;
> +
> +		wlan-enable-gpios = <&tlmm 16 GPIO_ACTIVE_HIGH>;
> +		bt-enable-gpios = <&tlmm 17 GPIO_ACTIVE_HIGH>;
> +
> +		vdd-supply = <&vreg_s4i_0p85>;
> +		vddio-supply = <&vreg_l15b_1p8>;
> +		vddio1p2-supply = <&vreg_l3c_1p2>;
> +		vddaon-supply = <&vreg_s2c_0p8>;
> +		vdddig-supply = <&vreg_s3c_0p9>;
> +		vddrfa1p2-supply = <&vreg_s1c_1p2>;
> +		vddrfa1p8-supply = <&vreg_s6c_1p8>;
> +
> +		clocks = <&rpmhcc RPMH_RF_CLK1>;
> +
> +		regulators {
> +			vreg_pmu_rfa_cmn: ldo0 {
> +				regulator-name = "vreg_pmu_rfa_cmn";
> +			};
> +
> +			vreg_pmu_aon_0p59: ldo1 {
> +				regulator-name = "vreg_pmu_aon_0p59";
> +			};
> +
> +			vreg_pmu_wlcx_0p8: ldo2 {
> +				regulator-name = "vreg_pmu_wlcx_0p8";
> +			};
> +
> +			vreg_pmu_wlmx_0p85: ldo3 {
> +				regulator-name = "vreg_pmu_wlmx_0p85";
> +			};
> +
> +			vreg_pmu_btcmx_0p85: ldo4 {
> +				regulator-name = "vreg_pmu_btcmx_0p85";
> +			};
> +
> +			vreg_pmu_rfa_0p8: ldo5 {
> +				regulator-name = "vreg_pmu_rfa_0p8";
> +			};
> +
> +			vreg_pmu_rfa_1p2: ldo6 {
> +				regulator-name = "vreg_pmu_rfa_1p2";
> +			};
> +
> +			vreg_pmu_rfa_1p8: ldo7 {
> +				regulator-name = "vreg_pmu_rfa_1p8";
> +			};
> +
> +			vreg_pmu_pcie_0p9: ldo8 {
> +				regulator-name = "vreg_pmu_pcie_0p9";
> +			};
> +
> +			vreg_pmu_pcie_1p8: ldo9 {
> +				regulator-name = "vreg_pmu_pcie_1p8";
> +			};
> +		};
> +	};
> +};
> +
> +&apps_rsc {
> +	regulators-0 {
> +		compatible = "qcom,pm8550-rpmh-regulators";
> +
> +		vdd-bob1-supply = <&vph_pwr>;
> +		vdd-bob2-supply = <&vph_pwr>;
> +		vdd-l2-l13-l14-supply = <&vreg_bob1>;
> +		vdd-l3-supply = <&vreg_s1c_1p2>;
> +		vdd-l5-l16-supply = <&vreg_bob1>;
> +		vdd-l6-l7-supply = <&vreg_bob1>;
> +		vdd-l8-l9-supply = <&vreg_bob1>;
> +		vdd-l11-supply = <&vreg_s1c_1p2>;
> +		vdd-l12-supply = <&vreg_s6c_1p8>;
> +		vdd-l15-supply = <&vreg_s6c_1p8>;
> +		vdd-l17-supply = <&vreg_bob2>;
> +
> +		qcom,pmic-id = "b";
> +
> +		vreg_bob1: bob1 {
> +			regulator-name = "vreg_bob1";
> +			regulator-min-microvolt = <3296000>;
> +			regulator-max-microvolt = <3960000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> +		};
> +
> +		vreg_bob2: bob2 {
> +			regulator-name = "vreg_bob2";
> +			regulator-min-microvolt = <2720000>;
> +			regulator-max-microvolt = <3008000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> +		};
> +
> +		vreg_l2b_3p0: ldo2 {
> +			regulator-name = "vreg_l2b_3p0";
> +			regulator-min-microvolt = <3008000>;
> +			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>;
> +		};
> +
> +		vreg_l4b_1p8: ldo4 {
> +			regulator-name = "vreg_l4b_1p8";
> +			regulator-min-microvolt = <1800000>;
> +			regulator-max-microvolt = <1800000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> +			regulator-allow-set-load;
> +			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
> +						   RPMH_REGULATOR_MODE_HPM>;
> +		};
> +
> +		vreg_l5b_3p1: ldo5 {
> +			regulator-name = "vreg_l5b_3p1";
> +			regulator-min-microvolt = <3104000>;
> +			regulator-max-microvolt = <3104000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> +			regulator-allow-set-load;
> +			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
> +						   RPMH_REGULATOR_MODE_HPM>;
> +		};
> +
> +		vreg_l9b_2p8: ldo9 {
> +			regulator-name = "vreg_l9b_2p8";
> +			regulator-min-microvolt = <2800000>;
> +			regulator-max-microvolt = <2800000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> +			regulator-allow-set-load;
> +			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
> +						   RPMH_REGULATOR_MODE_HPM>;
> +		};
> +
> +		vreg_l10b_1p8: ldo10 {
> +			regulator-name = "vreg_l10b_1p8";
> +			regulator-min-microvolt = <1800000>;
> +			regulator-max-microvolt = <1800000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> +			regulator-allow-set-load;
> +			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
> +						   RPMH_REGULATOR_MODE_HPM>;
> +		};
> +
> +		vreg_l12b_1p8: ldo12 {
> +			regulator-name = "vreg_l12b_1p8";
> +			regulator-min-microvolt = <1800000>;
> +			regulator-max-microvolt = <1800000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> +			regulator-allow-set-load;
> +			regulator-always-on;
> +			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
> +						   RPMH_REGULATOR_MODE_HPM>;
> +		};
> +
> +		vreg_l15b_1p8: ldo15 {
> +			regulator-name = "vreg_l15b_1p8";
> +			regulator-min-microvolt = <1800000>;
> +			regulator-max-microvolt = <1800000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> +			regulator-allow-set-load;
> +			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
> +						   RPMH_REGULATOR_MODE_HPM>;
> +		};
> +
> +		vreg_l16b_2p8: ldo16 {
> +			regulator-name = "vreg_l16b_2p8";
> +			regulator-min-microvolt = <2800000>;
> +			regulator-max-microvolt = <2800000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> +			regulator-allow-set-load;
> +			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
> +						   RPMH_REGULATOR_MODE_HPM>;
> +		};
> +
> +		vreg_l17b_2p5: ldo17 {
> +			regulator-name = "vreg_l17b_2p5";
> +			regulator-min-microvolt = <2504000>;
> +			regulator-max-microvolt = <2504000>;
> +			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,pm8550vs-rpmh-regulators";
> +
> +		vdd-l1-supply = <&vreg_s1c_1p2>;
> +		vdd-l2-supply = <&vreg_s1c_1p2>;
> +		vdd-l3-supply = <&vreg_s1c_1p2>;
> +		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>;
> +
> +		qcom,pmic-id = "c";
> +
> +		vreg_s1c_1p2: smps1 {
> +			regulator-name = "vreg_s1c_1p2";
> +			regulator-min-microvolt = <1256000>;
> +			regulator-max-microvolt = <1348000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> +		};
> +
> +		vreg_s2c_0p8: smps2 {
> +			regulator-name = "vreg_s2c_0p8";
> +			regulator-min-microvolt = <852000>;
> +			regulator-max-microvolt = <1036000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> +		};
> +
> +		vreg_s3c_0p9: smps3 {
> +			regulator-name = "vreg_s3c_0p9";
> +			regulator-min-microvolt = <976000>;
> +			regulator-max-microvolt = <1064000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> +		};
> +
> +		vreg_s4c_1p2: smps4 {
> +			regulator-name = "vreg_s4c_1p2";
> +			regulator-min-microvolt = <1224000>;
> +			regulator-max-microvolt = <1280000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> +		};
> +
> +		vreg_s5c_0p7: smps5 {
> +			regulator-name = "vreg_s5c_0p7";
> +			regulator-min-microvolt = <752000>;
> +			regulator-max-microvolt = <900000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> +		};
> +
> +		vreg_s6c_1p8: smps6 {
> +			regulator-name = "vreg_s6c_1p8";
> +			regulator-min-microvolt = <1856000>;
> +			regulator-max-microvolt = <2000000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> +		};
> +
> +		vreg_l1c_1p2: ldo1 {
> +			regulator-name = "vreg_l1c_1p2";
> +			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>;
> +		};
> +
> +		vreg_l3c_1p2: ldo3 {
> +			regulator-name = "vreg_l3c_1p2";
> +			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-2 {
> +		compatible = "qcom,pm8550vs-rpmh-regulators";
> +
> +		vdd-l1-supply = <&vreg_s3c_0p9>;
> +
> +		qcom,pmic-id = "d";
> +
> +		vreg_l1d_0p88: ldo1 {
> +			regulator-name = "vreg_l1d_0p88";
> +			regulator-min-microvolt = <912000>;
> +			regulator-max-microvolt = <920000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> +			regulator-allow-set-load;
> +			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
> +						   RPMH_REGULATOR_MODE_HPM>;
> +		};
> +	};
> +
> +	regulators-3 {
> +		compatible = "qcom,pm8550vs-rpmh-regulators";
> +
> +		vdd-l3-supply = <&vreg_s3c_0p9>;
> +
> +		qcom,pmic-id = "e";
> +
> +		vreg_l3e_0p9: ldo3 {
> +			regulator-name = "vreg_l3e_0p9";
> +			regulator-min-microvolt = <880000>;
> +			regulator-max-microvolt = <920000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> +			regulator-allow-set-load;
> +			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
> +						   RPMH_REGULATOR_MODE_HPM>;
> +		};
> +	};
> +
> +	regulators-4 {
> +		compatible = "qcom,pm8550vs-rpmh-regulators";
> +
> +		vdd-l1-supply = <&vreg_s3c_0p9>;
> +		vdd-l3-supply = <&vreg_s3c_0p9>;
> +
> +		qcom,pmic-id = "g";
> +
> +		vreg_l1g_0p91: ldo1 {
> +			regulator-name = "vreg_l1g_0p91";
> +			regulator-min-microvolt = <912000>;
> +			regulator-max-microvolt = <920000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> +			regulator-allow-set-load;
> +			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
> +						   RPMH_REGULATOR_MODE_HPM>;
> +		};
> +
> +		vreg_l2g_1p2: ldo2 {
> +			regulator-name = "vreg_l2g_1p2";
> +			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>;
> +		};
> +
> +		vreg_l3g_0p91: ldo3 {
> +			regulator-name = "vreg_l3g_0p91";
> +			regulator-min-microvolt = <880000>;
> +			regulator-max-microvolt = <912000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> +			regulator-allow-set-load;
> +			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
> +						   RPMH_REGULATOR_MODE_HPM>;
> +		};
> +	};
> +
> +	regulators-5 {
> +		compatible = "qcom,pm8550ve-rpmh-regulators";
> +
> +		vdd-l1-supply = <&vreg_s3c_0p9>;
> +		vdd-l2-supply = <&vreg_s3c_0p9>;
> +		vdd-l3-supply = <&vreg_s1c_1p2>;
> +		vdd-s4-supply = <&vph_pwr>;
> +
> +		qcom,pmic-id = "i";
> +
> +		vreg_s4i_0p85: smps4 {
> +			regulator-name = "vreg_s4i_0p85";
> +			regulator-min-microvolt = <852000>;
> +			regulator-max-microvolt = <1004000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> +		};
> +
> +		vreg_l1i_0p88: ldo1 {
> +			regulator-name = "vreg_l1i_0p88";
> +			regulator-min-microvolt = <880000>;
> +			regulator-max-microvolt = <912000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> +			regulator-allow-set-load;
> +			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
> +						   RPMH_REGULATOR_MODE_HPM>;
> +		};
> +
> +		vreg_l2i_0p88: ldo2 {
> +			regulator-name = "vreg_l2i_0p88";
> +			regulator-min-microvolt = <880000>;
> +			regulator-max-microvolt = <912000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> +			regulator-allow-set-load;
> +			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
> +						   RPMH_REGULATOR_MODE_HPM>;
> +		};
> +
> +		vreg_l3i_1p2: ldo3 {
> +			regulator-name = "vreg_l3i_0p91";
> +			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>;
> +		};
> +	};
> +};
> +
> +&gpi_dma1 {
> +	status = "okay";
> +};
> +
> +&gpi_dma2 {
> +	status = "okay";
> +};
> +
> +&i2c_master_hub_0 {
> +	status = "okay";
> +};
> +
> +&i2c_hub_0 {
> +	clock-frequency = <400000>;
> +
> +	status = "okay";
> +
> +	/* sc8547-charger-secondary@6F */
> +};
> +
> +&i2c_hub_2 {
> +	clock-frequency = <400000>;
> +
> +	status = "okay";
> +
> +	/* sc8547-charger-primary@6F */
> +};
> +
> +&i2c_hub_3 {
> +	status = "okay";
> +
> +	/* pencil-wireless-charger-cps8601@41 */
> +};
> +
> +&i2c_hub_4 {
> +	clock-frequency = <400000>;
> +
> +	status = "okay";
> +
> +	/* awinic,aw88261_smartpa @34,35,37 */
> +};
> +
> +&i2c_hub_7 {
> +	clock-frequency = <400000>;
> +
> +	status = "okay";
> +
> +	/* awinic,aw88261_smartpa @34,35,37 */
> +};
> +
> +&i2c2 {
> +	status = "okay";
> +
> +	/* secondary kinetic,ktz8866@11 */
> +};
> +
> +&i2c6 {
> +	status = "okay";
> +
> +	/* For now, this will only control half region (4/8) of panel */
> +	backlight: backlight@11 {
> +		compatible = "kinetic,ktz8866";
> +		reg = <0x11>;
> +		enable-gpios = <&tlmm 89 GPIO_ACTIVE_HIGH>;
> +		vddpos-supply = <&bl_avdd_5p9>;
> +		vddneg-supply = <&bl_avee_5p9>;
> +		current-num-sinks = <4>;
> +	};
> +};
> +
> +&gpu {
> +	status = "okay";
> +
> +	zap-shader {
> +		firmware-name = "qcom/sm8650/Oneplus/caihong/gen70900_zap.mbn";
> +	};
> +};
> +
> +&mdss {
> +	status = "okay";
> +};
> +
> +&mdss_dsi0 {
> +	vdda-supply = <&vreg_l3i_1p2>;
> +
> +	qcom,dual-dsi-mode;
> +	qcom,master-dsi;
> +	qcom,sync-dual-dsi;
> +
> +	status = "disabled";
> +
> +	panel: panel@0 {
> +		/* Add compatible string until panel driver is upstreamed. */
> +		reg = <0>;
> +
> +		reset-gpios = <&tlmm 133 GPIO_ACTIVE_LOW>;
> +
> +		vddio-supply = <&vreg_l12b_1p8>;
> +
> +		pinctrl-0 = <&disp_reset_n_active>, <&mdp_vsync_active>,
> +			    <&mdp_vsync1_active>, <&mdp_dynamic_vsync_active>;
> +		pinctrl-1 = <&disp_reset_n_suspend>, <&mdp_vsync_suspend>,
> +			    <&mdp_vsync1_suspend>, <&mdp_dynamic_vsync_suspend>;
> +		pinctrl-names = "default", "sleep";
> +
> +		ports {
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +
> +			port@0 {
> +				reg = <0>;
> +
> +				panel_in_0: endpoint {
> +					remote-endpoint = <&mdss_dsi0_out>;
> +				};
> +			};
> +
> +			port@1 {
> +				reg = <1>;
> +
> +				panel_in_1: endpoint {
> +					remote-endpoint = <&mdss_dsi1_out>;
> +				};
> +			};
> +		};
> +	};
> +};
> +
> +&mdss_dsi0_out {
> +	remote-endpoint = <&panel_in_0>;
> +	data-lanes = <0 1 2 3>;
> +};
> +
> +&mdss_dsi0_phy {
> +	vdds-supply = <&vreg_l1i_0p88>;
> +
> +	status = "okay";
> +};
> +
> +&mdss_dsi1 {
> +	vdda-supply = <&vreg_l3i_1p2>;
> +
> +	qcom,dual-dsi-mode;
> +	qcom,sync-dual-dsi;
> +
> +	status = "disabled";
> +
> +	/* DSI1 is slave, so use DSI0 clocks */
> +	assigned-clock-parents = <&mdss_dsi0_phy DSI_BYTE_PLL_CLK>,
> +				 <&mdss_dsi0_phy DSI_PIXEL_PLL_CLK>;
> +};
> +
> +&mdss_dsi1_out {
> +	remote-endpoint = <&panel_in_1>;
> +	data-lanes = <0 1 2 3>;
> +};
> +
> +&mdss_dsi1_phy {
> +	vdds-supply = <&vreg_l1i_0p88>;
> +
> +	status = "okay";
> +};
> +
> +&mdss_dp0 {
> +	status = "okay";
> +};
> +
> +&mdss_dp0_out {
> +	data-lanes = <0 1>;
> +};
> +
> +&pcie0 {
> +	wake-gpios = <&tlmm 96 GPIO_ACTIVE_HIGH>;
> +	perst-gpios = <&tlmm 94 GPIO_ACTIVE_LOW>;
> +
> +	pinctrl-0 = <&pcie0_default_state>;
> +	pinctrl-names = "default";
> +
> +	status = "okay";
> +};
> +
> +&pcieport0 {
> +	wifi@0 {
> +		compatible = "pci17cb,1107";
> +		reg = <0x10000 0x0 0x0 0x0 0x0>;
> +
> +		vddrfacmn-supply = <&vreg_pmu_rfa_cmn>;
> +		vddaon-supply = <&vreg_pmu_aon_0p59>;
> +		vddwlcx-supply = <&vreg_pmu_wlcx_0p8>;
> +		vddwlmx-supply = <&vreg_pmu_wlmx_0p85>;
> +		vddrfa0p8-supply = <&vreg_pmu_rfa_0p8>;
> +		vddrfa1p2-supply = <&vreg_pmu_rfa_1p2>;
> +		vddrfa1p8-supply = <&vreg_pmu_rfa_1p8>;
> +		vddpcie0p9-supply = <&vreg_pmu_pcie_0p9>;
> +		vddpcie1p8-supply = <&vreg_pmu_pcie_1p8>;
> +	};
> +};
> +
> +&pcie0_phy {
> +	vdda-phy-supply = <&vreg_l1i_0p88>;
> +	vdda-pll-supply = <&vreg_l3i_1p2>;
> +
> +	status = "okay";
> +};
> +
> +&pm8550_gpios {
> +	volume_up_n: volume-up-n-state {
> +		pins = "gpio6";
> +		function = "normal";
> +		bias-pull-up;
> +		input-enable;
> +		power-source = <1>;
> +	};
> +};
> +
> +&pm8550b_eusb2_repeater {
> +	vdd18-supply = <&vreg_l15b_1p8>;
> +	vdd3-supply = <&vreg_l5b_3p1>;
> +};
> +
> +&pon_pwrkey {
> +	status = "okay";
> +};
> +
> +&pon_resin {
> +	linux,code = <KEY_VOLUMEUP>;
> +
> +	status = "okay";
> +};
> +
> +&qupv3_id_0 {
> +	status = "okay";
> +};
> +
> +&qupv3_id_1 {
> +	status = "okay";
> +};
> +
> +&remoteproc_adsp {
> +	firmware-name = "qcom/sm8650/Oneplus/caihong/adsp.mbn",
> +			"qcom/sm8650/Oneplus/caihong/adsp_dtb.mbn";
> +
> +	status = "okay";
> +};
> +
> +&remoteproc_cdsp {
> +	firmware-name = "qcom/sm8650/Oneplus/caihong/cdsp.mbn",
> +			"qcom/sm8650/Oneplus/caihong/cdsp_dtb.mbn";
> +
> +	status = "okay";
> +};
> +
> +&sleep_clk {
> +	clock-frequency = <32000>;
> +};
> +
> +&tlmm {
> +	gpio-reserved-ranges = <36 4>, <74 1>;
> +
> +	bt_default: bt-default-state {
> +		bt-en-pins {
> +			pins = "gpio17";
> +			function = "gpio";
> +			drive-strength = <16>;
> +			bias-disable;
> +		};
> +
> +		sw-ctrl-pins {
> +			pins = "gpio18";
> +			function = "gpio";
> +			bias-pull-down;
> +		};
> +	};
> +
> +	disp_reset_n_active: disp-reset-n-active-state {
> +		pins = "gpio133";
> +		function = "gpio";
> +		drive-strength = <8>;
> +		bias-disable;
> +	};
> +
> +	disp_reset_n_suspend: disp-reset-n-suspend-state {
> +		pins = "gpio133";
> +		function = "gpio";
> +		drive-strength = <2>;
> +		bias-pull-down;
> +	};
> +
> +	mdp_dynamic_vsync_active: mdp-dynamic-vsync-active-state {
> +		pins = "gpio85";
> +		function = "gpio";
> +		drive-strength = <2>;
> +		bias-pull-down;
> +	};
> +
> +	mdp_dynamic_vsync_suspend: mdp-dynamic-vsync-suspend-state {
> +		pins = "gpio85";
> +		function = "gpio";
> +		drive-strength = <2>;
> +		bias-pull-down;
> +	};
> +
> +	mdp_vsync_active: mdp-vsync-active-state {
> +		pins = "gpio86";
> +		function = "mdp_vsync";
> +		drive-strength = <2>;
> +		bias-pull-down;
> +	};
> +
> +	mdp_vsync_suspend: mdp-vsync-suspend-state {
> +		pins = "gpio86";
> +		function = "mdp_vsync";
> +		drive-strength = <2>;
> +		bias-pull-down;
> +	};
> +
> +	mdp_vsync1_active: mdp-vsync1-active-state {
> +		pins = "gpio87";
> +		function = "mdp_vsync";
> +		drive-strength = <2>;
> +		bias-pull-down;
> +	};
> +
> +	mdp_vsync1_suspend: mdp-vsync1-suspend-state {
> +		pins = "gpio87";
> +		function = "mdp_vsync";
> +		drive-strength = <2>;
> +		bias-pull-down;
> +	};
> +
> +	wlan_en: wlan-en-state {
> +		pins = "gpio16";
> +		function = "gpio";
> +		drive-strength = <8>;
> +		bias-pull-down;
> +	};
> +};
> +
> +&uart14 {
> +	status = "okay";
> +
> +	bluetooth {
> +		compatible = "qcom,wcn7850-bt";
> +
> +		vddrfacmn-supply = <&vreg_pmu_rfa_cmn>;
> +		vddaon-supply = <&vreg_pmu_aon_0p59>;
> +		vddwlcx-supply = <&vreg_pmu_wlcx_0p8>;
> +		vddwlmx-supply = <&vreg_pmu_wlmx_0p85>;
> +		vddrfa0p8-supply = <&vreg_pmu_rfa_0p8>;
> +		vddrfa1p2-supply = <&vreg_pmu_rfa_1p2>;
> +		vddrfa1p8-supply = <&vreg_pmu_rfa_1p8>;
> +
> +		max-speed = <3200000>;
> +	};
> +};
> +
> +&ufs_mem_hc {
> +	reset-gpios = <&tlmm 210 GPIO_ACTIVE_LOW>;
> +
> +	vcc-supply = <&vreg_l17b_2p5>;
> +	vcc-max-microamp = <1300000>;
> +	vccq-supply = <&vreg_l1c_1p2>;
> +	vccq-max-microamp = <1200000>;
> +
> +	status = "okay";
> +};
> +
> +&ufs_mem_phy {
> +	vdda-phy-supply = <&vreg_l1d_0p88>;
> +	vdda-pll-supply = <&vreg_l3i_1p2>;
> +
> +	status = "okay";
> +};
> +
> +&usb_1 {
> +	status = "okay";
> +};
> +
> +&usb_1_dwc3 {
> +	dr_mode = "otg";
> +	usb-role-switch;
> +};
> +
> +&usb_1_dwc3_hs {
> +	remote-endpoint = <&pmic_glink_hs_in>;
> +};
> +
> +&usb_1_hsphy {
> +	vdd-supply = <&vreg_l1i_0p88>;
> +	vdda12-supply = <&vreg_l3i_1p2>;
> +
> +	phys = <&pm8550b_eusb2_repeater>;
> +
> +	status = "okay";
> +};
> +
> +&usb_dp_qmpphy {
> +	vdda-phy-supply = <&vreg_l3i_1p2>;
> +	vdda-pll-supply = <&vreg_l3g_0p91>;
> +
> +	status = "okay";
> +};
> +
> +&usb_dp_qmpphy_out {
> +	remote-endpoint = <&pmic_glink_ss_in>;
> +};
> +
> +&xo_board {
> +	clock-frequency = <76800000>;
> +};

Thanks,
Neil

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

* Re: [PATCH 2/2] arm64: dts: qcom: sm8650: Add support for Oneplus Pad Pro (caihong)
  2025-05-21 12:43       ` neil.armstrong
@ 2025-05-22 10:05         ` Pengyu Luo
  2025-05-26  7:53           ` neil.armstrong
  0 siblings, 1 reply; 16+ messages in thread
From: Pengyu Luo @ 2025-05-22 10:05 UTC (permalink / raw)
  To: neil.armstrong
  Cc: andersson, conor+dt, devicetree, konrad.dybcio, konradybcio,
	krzk+dt, linux-arm-msm, linux-kernel, mitltlatltl, robh

On Wed, May 21, 2025 at 8:43 PM <neil.armstrong@linaro.org> wrote:
> On 21/05/2025 10:37, Pengyu Luo wrote:
> > On Wed, May 21, 2025 at 5:54 AM Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> wrote:
> >> On 5/20/25 6:42 PM, Pengyu Luo wrote:
> >>> The OnePlus Pad Pro is an Android tablet based on the Qualcomm SM8650
> >>> platform. Its device codename is "caihong". This patch adds an initial
> >>> devicetree for basic functionality.
> >>>
> >>> Currently working components include:
> >>> - Backlight
> >>> - Bluetooth
> >>> - Battery charging (up to 5v 0.5a) & reporting via pmic-glink (There
> >>> are many unknown notifications)
> >>> - Display panel ([1])
> >>> - Keyboard (via BT)
> >>> - Power key & volume keys
> >>> - Touchscreen & stylus ([2])
> >>> - USB Type-c port
> >>> - UFS storage
> >>> - Wi-Fi
> >>>
> >>> The following components are currently non-functional:
> >>> - Audio
> >>> - Cameras
> >>> - Charging pump (dual sc8547)
> >>> - Keyboard (via pogo pin)
> >>> - Stylus wireless charger (cps8601)
> >>> - UCSI over GLINK (PPM init fails)
> >>>
> >>> [1]: The panel is a dual-DSI, dual-DSC display that requires setting
> >>>       'slice_per_pkt = 2' in the DPU configuration. The panel driver
> >>>       will be submitted separately later.
> >>> [2]: Touchscreen/stylus driver available at:
> >>>       https://github.com/OnePlusOSS/android_kernel_modules_and_devicetree_oneplus_sm8650/blob/oneplus/sm8650_v_15.0.0_pad_pro/vendor/oplus/kernel/touchpanel/oplus_touchscreen_v2/Novatek/NT36532_noflash/nvt_drivers_nt36532_noflash.c
> >>>       The downstream driver has been ported and tested locally, but
> >>>       requires cleanup, it may be submitted separately later.
> >>
> >> I have a Lenovo Tab P11 with a nt36523w (-23, not -32) for which I have once
> >> poked at the driver for.. I see the driver you posted mentions -23 as well,
> >> please keep me in the loop if you're going to upstream it
> >>
> >
> > I see. Actually, they share the most part of nt36xxx, but with
> > different memory maps. See
> > https://github.com/MiCode/Xiaomi_Kernel_OpenSource/blob/elish-r-oss/drivers/input/touchscreen/nt36xxx/nt36xxx_mem_map.h
> >
> >> [...]
> >>
> >>> +             /*
> >>> +              * This memory region is required to initialize the backlight
> >>> +              * and display for bootloader. Normally, this region is not
> >>> +              * needed. However, due to limitations in the current mainline
> >>> +              * KTZ8866 driver, dual backlight ICs cannot be properly
> >>> +              * initialized.
> >>> +              *
> >>> +              * A workaround involving secondary registration was proposed,
> >>> +              * but rejected by reviewers. This reserved region is kept as
> >>> +              * a temporary solution until a proper initialization method
> >>> +              * that satisfies upstream requirements is found.
> >>> +              */
> >>> +             splash_region {
> >>> +                     reg = <0 0xd5100000 0 0x2b00000>;
> >>> +                     no-map;
> >>> +             };
> >>
> >> I assume this means "if the bootloader sees /reserved-memory/splash_region,
> >> it keeps the display online" - let's not do that, as underscores are not
> >> allowed in node names (kernel coding style, not dt syntax)
> >>
> >
> > Right, without it, BL won't initialize backlight and display. We need
> > it to initialize backlight here since mainline ktz8866 won't program
> > partial registers properly. If there is no other workaround, I will
> > remove it to keep kernel coding style.
>
> Can't you add a simple-framebuffer for v1 and drop all the DSI stuff until
> you figured out the backlight and upstreamed the panel driver ?
>

I am thinking about it. But still, if backlight can't be properly
programmed, simple-framebuffer won't help.

Best wishes,
Pengyu

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

* Re: [PATCH 2/2] arm64: dts: qcom: sm8650: Add support for Oneplus Pad Pro (caihong)
  2025-05-21 12:49   ` neil.armstrong
@ 2025-05-22 10:05     ` Pengyu Luo
  2025-05-26  7:56       ` neil.armstrong
  0 siblings, 1 reply; 16+ messages in thread
From: Pengyu Luo @ 2025-05-22 10:05 UTC (permalink / raw)
  To: neil.armstrong
  Cc: andersson, conor+dt, devicetree, konradybcio, krzk+dt,
	linux-arm-msm, linux-kernel, mitltlatltl, robh

On Wed, May 21, 2025 at 8:49 PM <neil.armstrong@linaro.org> wrote:
>
> Hi,
>
> On 20/05/2025 18:42, Pengyu Luo wrote:
> > The OnePlus Pad Pro is an Android tablet based on the Qualcomm SM8650
> > platform. Its device codename is "caihong". This patch adds an initial
> > devicetree for basic functionality.
> >
> > Currently working components include:
> > - Backlight
> > - Bluetooth
> > - Battery charging (up to 5v 0.5a) & reporting via pmic-glink (There
> > are many unknown notifications)
> > - Display panel ([1])
> > - Keyboard (via BT)
> > - Power key & volume keys
> > - Touchscreen & stylus ([2])
> > - USB Type-c port
> > - UFS storage
> > - Wi-Fi
> >
> > The following components are currently non-functional:
> > - Audio
> > - Cameras
> > - Charging pump (dual sc8547)
> > - Keyboard (via pogo pin)
> > - Stylus wireless charger (cps8601)
> > - UCSI over GLINK (PPM init fails)
>
> Are you sure the QMP PHY and the dwc3 probes ? if one is missing, UCSI PPM init will timeout because it doesn't find the connectors muxes & otg devices.
>

I am pretty sure.
ucsi_glink.pmic_glink_ucsi pmic_glink.ucsi.0: PPM init failed, stop trying

> >
> > [1]: The panel is a dual-DSI, dual-DSC display that requires setting
> >       'slice_per_pkt = 2' in the DPU configuration. The panel driver
> >       will be submitted separately later.
> > [2]: Touchscreen/stylus driver available at:
> >       https://github.com/OnePlusOSS/android_kernel_modules_and_devicetree_oneplus_sm8650/blob/oneplus/sm8650_v_15.0.0_pad_pro/vendor/oplus/kernel/touchpanel/oplus_touchscreen_v2/Novatek/NT36532_noflash/nvt_drivers_nt36532_noflash.c
> >       The downstream driver has been ported and tested locally, but
> >       requires cleanup, it may be submitted separately later.
> >
> > To test this device tree, follow these minimal steps:
> >
> > 1. Build the kernel. Ensure that all `compatible` strings used in
> > this device tree (or any included dtsi files) have corresponding
> > drivers enabled in the kernel configuration.
> >
> > 2. Creating boot image
> >
> > Merge the kernel and device tree blob:
> >
> > cat arch/arm64/boot/Image.gz arch/arm64/boot/dts/qcom/sm8650-oneplus-\
> > caihong.dtb > kernel-dtb
> >
> > Then create a boot.img:
> >
> > mkbootimg \
> > --base 0x00000000 \
> > --kernel_offset 0x00008000 \
> > --ramdisk_offset 0x01000000 \
> > --second_offset 0x00f00000 \
> > --tags_offset 0x00000100 \
> > --pagesize 4096 \
> > --header_version 4 \
> > --kernel kernel-dtb \
> > --ramdisk some_ramdisk \
> > --cmdline "some comeline" \
> > -o mainline-boot.img
>
> Isn't image version 2 working ?
>

Yes, '--header_version 2' works, I followed the version of stock boot
image. If there is a rule to follow?

> >
> > 3. Flashing the boot image
> >
> > fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img
> > fastboot erase dtbo
> > fastboot flash boot mainline-boot.img
> >
> > See also https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=39c5963
> >
> > Signed-off-by: Pengyu Luo <mitltlatltl@gmail.com>
> > ---
> >   .../boot/dts/qcom/sm8650-oneplus-caihong.dts  | 960 ++++++++++++++++++
> >   1 file changed, 960 insertions(+)
> >   create mode 100644 arch/arm64/boot/dts/qcom/sm8650-oneplus-caihong.dts
> >
> > diff --git a/arch/arm64/boot/dts/qcom/sm8650-oneplus-caihong.dts b/arch/arm64/boot/dts/qcom/sm8650-oneplus-caihong.dts
> > new file mode 100644
> > index 0000000000..93aed47e10
> > --- /dev/null
> > +++ b/arch/arm64/boot/dts/qcom/sm8650-oneplus-caihong.dts
> > @@ -0,0 +1,960 @@
> > +// SPDX-License-Identifier: BSD-3-Clause
> > +/*
> > + * Based on Qualcomm Reference Device DeviceTree
> > + *
> > + * Copyright (c) 2023, Linaro Limited
> > + * Copyright (c) 2025, Pengyu Luo <mitltlatltl@gmail.com>
> > + */
> > +
> > +/dts-v1/;
> > +
> > +#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
> > +#include "sm8650.dtsi"
> > +#include "pm8550.dtsi"
> > +#include "pm8550b.dtsi"
> > +#define PMK8550VE_SID 8
> > +#include "pm8550ve.dtsi"
> > +#include "pm8550vs.dtsi"
> > +#include "pmk8550.dtsi"
> > +
> > +/delete-node/ &adspslpi_mem;
> > +/delete-node/ &hwfence_shbuf;
> > +
> > +/* No Modem */
> > +/delete-node/ &mpss_mem;
> > +/delete-node/ &q6_mpss_dtb_mem;
> > +/delete-node/ &mpss_dsm_mem;
> > +/delete-node/ &mpss_dsm_mem_2;
> > +/delete-node/ &qlink_logging_mem;
> > +/delete-node/ &remoteproc_mpss;
> > +
> > +/* Unused now, and reusable, taking 144 MiB back */
> > +/delete-node/ &trust_ui_vm_mem;
> > +/delete-node/ &oem_vm_mem;
> > +/delete-node/ &qdss_mem;
>
> Are you sure QTEE won't use this ?
>

I am not sure, but these two VM nodes are never referred by any device
in the downstream DT. QDSS and coresight things are unnecessary on the
retail devices.

> > +
> > +/ {
> > +     model = "Oneplus Pad Pro";
> > +     compatible = "oneplus,caihong", "qcom,sm8650";
> > +     chassis-type = "tablet";
> > +
> > +     aliases {
> > +             serial0 = &uart14;
> > +     };
> > +
> > +     bl_avdd_5p9: bl-avdd-regulator {
> > +             compatible = "regulator-fixed";
> > +             regulator-name = "bl_avdd_5p9";
> > +             regulator-min-microvolt = <5900000>;
> > +             regulator-max-microvolt = <5900000>;
> > +             gpio = <&tlmm 90 GPIO_ACTIVE_HIGH>;
> > +             enable-active-high;
> > +     };
> > +
> > +     bl_avee_5p9: bl-avee-regulator {
> > +             compatible = "regulator-fixed";
> > +             regulator-name = "bl_avee_5p9";
> > +             regulator-min-microvolt = <5900000>;
> > +             regulator-max-microvolt = <5900000>;
> > +             gpio = <&tlmm 91 GPIO_ACTIVE_HIGH>;
> > +             enable-active-high;
> > +     };
> > +
> > +     gpio-keys {
> > +             compatible = "gpio-keys";
> > +
> > +             pinctrl-0 = <&volume_up_n>;
> > +             pinctrl-names = "default";
> > +
> > +             key-volume-up {
> > +                     label = "Volume Up";
> > +                     linux,code = <KEY_VOLUMEDOWN>;
> > +                     gpios = <&pm8550_gpios 6 GPIO_ACTIVE_LOW>;
> > +                     debounce-interval = <15>;
> > +                     linux,can-disable;
> > +                     wakeup-source;
> > +             };
> > +     };
> > +
> > +     pmic-glink {
> > +             compatible = "qcom,sm8650-pmic-glink",
> > +                          "qcom,sm8550-pmic-glink",
> > +                          "qcom,pmic-glink";
> > +             #address-cells = <1>;
> > +             #size-cells = <0>;
> > +             orientation-gpios = <&tlmm 29 GPIO_ACTIVE_HIGH>;
> > +
> > +             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>;
> > +                                     };
> > +                             };
> > +
> > +                             port@1 {
> > +                                     reg = <1>;
> > +
> > +                                     pmic_glink_ss_in: endpoint {
> > +                                             remote-endpoint = <&usb_dp_qmpphy_out>;
> > +                                     };
> > +                             };
>
> No Altmode display ? no SBU mux nor redrivers ?
>

There should be a wcd939x_i2c@e, it will be added after I figure out
sound things. Actually, I added it locally, it does not work. Since
its name is wcd939x, it made me feel it is for usb dac handling only.
I never checked it carefully. But you mentioned this, I just checked
downstream bindings, it says

QTI WCD9395 Device

This device is used for switching orientation of USB-C analog
and for display. It uses I2C communication to set the registers
to configure the switches inside the WCD9395 chip to change
orientation and also to set SBU1/SBU2 connections of USB-C.

Thanks. I will check it again.

Best wishes,
Pengyu

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

* Re: [PATCH 2/2] arm64: dts: qcom: sm8650: Add support for Oneplus Pad Pro (caihong)
  2025-05-21  8:37     ` Pengyu Luo
  2025-05-21 12:43       ` neil.armstrong
@ 2025-05-22 15:05       ` Konrad Dybcio
  2025-05-25 10:51         ` Pengyu Luo
  1 sibling, 1 reply; 16+ messages in thread
From: Konrad Dybcio @ 2025-05-22 15:05 UTC (permalink / raw)
  To: Pengyu Luo, konrad.dybcio
  Cc: andersson, conor+dt, devicetree, konradybcio, krzk+dt,
	linux-arm-msm, linux-kernel, robh

On 5/21/25 10:37 AM, Pengyu Luo wrote:
> On Wed, May 21, 2025 at 5:54 AM Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> wrote:
>> On 5/20/25 6:42 PM, Pengyu Luo wrote:
>>> The OnePlus Pad Pro is an Android tablet based on the Qualcomm SM8650
>>> platform. Its device codename is "caihong". This patch adds an initial
>>> devicetree for basic functionality.

[...]

>>> +&i2c2 {
>>> +     status = "okay";
>>> +
>>> +     /* secondary kinetic,ktz8866@11 */
>>
>> You can describe it, the driver sets some nonzero default brightness
>>
> 
> But the backlight framework won't index them, which causes sysfs
> collision when the second instance is registering.

Have you talked to the backlight maintainers? This shouldn't be too
complex to figure out

Konrad

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

* Re: [PATCH 2/2] arm64: dts: qcom: sm8650: Add support for Oneplus Pad Pro (caihong)
  2025-05-22 15:05       ` Konrad Dybcio
@ 2025-05-25 10:51         ` Pengyu Luo
  2025-05-27 11:11           ` Konrad Dybcio
  0 siblings, 1 reply; 16+ messages in thread
From: Pengyu Luo @ 2025-05-25 10:51 UTC (permalink / raw)
  To: konrad.dybcio
  Cc: andersson, conor+dt, devicetree, konradybcio, krzk+dt,
	linux-arm-msm, linux-kernel, mitltlatltl, robh

On Thu, May 22, 2025 at 11:05 PM Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> wrote:
> On 5/21/25 10:37 AM, Pengyu Luo wrote:
> > On Wed, May 21, 2025 at 5:54 AM Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> wrote:
> >> On 5/20/25 6:42 PM, Pengyu Luo wrote:
> >>> The OnePlus Pad Pro is an Android tablet based on the Qualcomm SM8650
> >>> platform. Its device codename is "caihong". This patch adds an initial
> >>> devicetree for basic functionality.
>
> [...]
>
> >>> +&i2c2 {
> >>> +     status = "okay";
> >>> +
> >>> +     /* secondary kinetic,ktz8866@11 */
> >>
> >> You can describe it, the driver sets some nonzero default brightness
> >>
> >
> > But the backlight framework won't index them, which causes sysfs
> > collision when the second instance is registering.
>
> Have you talked to the backlight maintainers? This shouldn't be too
> complex to figure out

Last time I tried to touch ktz8866 source, the reviewer advised me to
add an backlight API to register the secondary devie. Since I am still
working on the other parts when I am free, it remains unresolved. Now
that you reminded me, then I tried to do it.

https://lore.kernel.org/linux-fbdev/20250525104022.1326997-1-mitltlatltl@gmail.com/

Best wishes,
Pengyu

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

* Re: [PATCH 2/2] arm64: dts: qcom: sm8650: Add support for Oneplus Pad Pro (caihong)
  2025-05-22 10:05         ` Pengyu Luo
@ 2025-05-26  7:53           ` neil.armstrong
  0 siblings, 0 replies; 16+ messages in thread
From: neil.armstrong @ 2025-05-26  7:53 UTC (permalink / raw)
  To: Pengyu Luo
  Cc: andersson, conor+dt, devicetree, konrad.dybcio, konradybcio,
	krzk+dt, linux-arm-msm, linux-kernel, robh

On 22/05/2025 12:05, Pengyu Luo wrote:
> On Wed, May 21, 2025 at 8:43 PM <neil.armstrong@linaro.org> wrote:
>> On 21/05/2025 10:37, Pengyu Luo wrote:
>>> On Wed, May 21, 2025 at 5:54 AM Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> wrote:
>>>> On 5/20/25 6:42 PM, Pengyu Luo wrote:
>>>>> The OnePlus Pad Pro is an Android tablet based on the Qualcomm SM8650
>>>>> platform. Its device codename is "caihong". This patch adds an initial
>>>>> devicetree for basic functionality.
>>>>>
>>>>> Currently working components include:
>>>>> - Backlight
>>>>> - Bluetooth
>>>>> - Battery charging (up to 5v 0.5a) & reporting via pmic-glink (There
>>>>> are many unknown notifications)
>>>>> - Display panel ([1])
>>>>> - Keyboard (via BT)
>>>>> - Power key & volume keys
>>>>> - Touchscreen & stylus ([2])
>>>>> - USB Type-c port
>>>>> - UFS storage
>>>>> - Wi-Fi
>>>>>
>>>>> The following components are currently non-functional:
>>>>> - Audio
>>>>> - Cameras
>>>>> - Charging pump (dual sc8547)
>>>>> - Keyboard (via pogo pin)
>>>>> - Stylus wireless charger (cps8601)
>>>>> - UCSI over GLINK (PPM init fails)
>>>>>
>>>>> [1]: The panel is a dual-DSI, dual-DSC display that requires setting
>>>>>        'slice_per_pkt = 2' in the DPU configuration. The panel driver
>>>>>        will be submitted separately later.
>>>>> [2]: Touchscreen/stylus driver available at:
>>>>>        https://github.com/OnePlusOSS/android_kernel_modules_and_devicetree_oneplus_sm8650/blob/oneplus/sm8650_v_15.0.0_pad_pro/vendor/oplus/kernel/touchpanel/oplus_touchscreen_v2/Novatek/NT36532_noflash/nvt_drivers_nt36532_noflash.c
>>>>>        The downstream driver has been ported and tested locally, but
>>>>>        requires cleanup, it may be submitted separately later.
>>>>
>>>> I have a Lenovo Tab P11 with a nt36523w (-23, not -32) for which I have once
>>>> poked at the driver for.. I see the driver you posted mentions -23 as well,
>>>> please keep me in the loop if you're going to upstream it
>>>>
>>>
>>> I see. Actually, they share the most part of nt36xxx, but with
>>> different memory maps. See
>>> https://github.com/MiCode/Xiaomi_Kernel_OpenSource/blob/elish-r-oss/drivers/input/touchscreen/nt36xxx/nt36xxx_mem_map.h
>>>
>>>> [...]
>>>>
>>>>> +             /*
>>>>> +              * This memory region is required to initialize the backlight
>>>>> +              * and display for bootloader. Normally, this region is not
>>>>> +              * needed. However, due to limitations in the current mainline
>>>>> +              * KTZ8866 driver, dual backlight ICs cannot be properly
>>>>> +              * initialized.
>>>>> +              *
>>>>> +              * A workaround involving secondary registration was proposed,
>>>>> +              * but rejected by reviewers. This reserved region is kept as
>>>>> +              * a temporary solution until a proper initialization method
>>>>> +              * that satisfies upstream requirements is found.
>>>>> +              */
>>>>> +             splash_region {
>>>>> +                     reg = <0 0xd5100000 0 0x2b00000>;
>>>>> +                     no-map;
>>>>> +             };
>>>>
>>>> I assume this means "if the bootloader sees /reserved-memory/splash_region,
>>>> it keeps the display online" - let's not do that, as underscores are not
>>>> allowed in node names (kernel coding style, not dt syntax)
>>>>
>>>
>>> Right, without it, BL won't initialize backlight and display. We need
>>> it to initialize backlight here since mainline ktz8866 won't program
>>> partial registers properly. If there is no other workaround, I will
>>> remove it to keep kernel coding style.
>>
>> Can't you add a simple-framebuffer for v1 and drop all the DSI stuff until
>> you figured out the backlight and upstreamed the panel driver ?
>>
> 
> I am thinking about it. But still, if backlight can't be properly
> programmed, simple-framebuffer won't help.

Sure but with this version you have simply have no display at all,
so just drop the backlight + dsi stuff for initial patchset, then
when you figured out the backlight and the panel driver update the DT.

Neil

> 
> Best wishes,
> Pengyu


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

* Re: [PATCH 2/2] arm64: dts: qcom: sm8650: Add support for Oneplus Pad Pro (caihong)
  2025-05-22 10:05     ` Pengyu Luo
@ 2025-05-26  7:56       ` neil.armstrong
  0 siblings, 0 replies; 16+ messages in thread
From: neil.armstrong @ 2025-05-26  7:56 UTC (permalink / raw)
  To: Pengyu Luo
  Cc: andersson, conor+dt, devicetree, konradybcio, krzk+dt,
	linux-arm-msm, linux-kernel, robh

On 22/05/2025 12:05, Pengyu Luo wrote:
> On Wed, May 21, 2025 at 8:49 PM <neil.armstrong@linaro.org> wrote:
>>
>> Hi,
>>
>> On 20/05/2025 18:42, Pengyu Luo wrote:
>>> The OnePlus Pad Pro is an Android tablet based on the Qualcomm SM8650
>>> platform. Its device codename is "caihong". This patch adds an initial
>>> devicetree for basic functionality.
>>>
>>> Currently working components include:
>>> - Backlight
>>> - Bluetooth
>>> - Battery charging (up to 5v 0.5a) & reporting via pmic-glink (There
>>> are many unknown notifications)
>>> - Display panel ([1])
>>> - Keyboard (via BT)
>>> - Power key & volume keys
>>> - Touchscreen & stylus ([2])
>>> - USB Type-c port
>>> - UFS storage
>>> - Wi-Fi
>>>
>>> The following components are currently non-functional:
>>> - Audio
>>> - Cameras
>>> - Charging pump (dual sc8547)
>>> - Keyboard (via pogo pin)
>>> - Stylus wireless charger (cps8601)
>>> - UCSI over GLINK (PPM init fails)
>>
>> Are you sure the QMP PHY and the dwc3 probes ? if one is missing, UCSI PPM init will timeout because it doesn't find the connectors muxes & otg devices.
>>
> 
> I am pretty sure.
> ucsi_glink.pmic_glink_ucsi pmic_glink.ucsi.0: PPM init failed, stop trying
> 
>>>
>>> [1]: The panel is a dual-DSI, dual-DSC display that requires setting
>>>        'slice_per_pkt = 2' in the DPU configuration. The panel driver
>>>        will be submitted separately later.
>>> [2]: Touchscreen/stylus driver available at:
>>>        https://github.com/OnePlusOSS/android_kernel_modules_and_devicetree_oneplus_sm8650/blob/oneplus/sm8650_v_15.0.0_pad_pro/vendor/oplus/kernel/touchpanel/oplus_touchscreen_v2/Novatek/NT36532_noflash/nvt_drivers_nt36532_noflash.c
>>>        The downstream driver has been ported and tested locally, but
>>>        requires cleanup, it may be submitted separately later.
>>>
>>> To test this device tree, follow these minimal steps:
>>>
>>> 1. Build the kernel. Ensure that all `compatible` strings used in
>>> this device tree (or any included dtsi files) have corresponding
>>> drivers enabled in the kernel configuration.
>>>
>>> 2. Creating boot image
>>>
>>> Merge the kernel and device tree blob:
>>>
>>> cat arch/arm64/boot/Image.gz arch/arm64/boot/dts/qcom/sm8650-oneplus-\
>>> caihong.dtb > kernel-dtb
>>>
>>> Then create a boot.img:
>>>
>>> mkbootimg \
>>> --base 0x00000000 \
>>> --kernel_offset 0x00008000 \
>>> --ramdisk_offset 0x01000000 \
>>> --second_offset 0x00f00000 \
>>> --tags_offset 0x00000100 \
>>> --pagesize 4096 \
>>> --header_version 4 \
>>> --kernel kernel-dtb \
>>> --ramdisk some_ramdisk \
>>> --cmdline "some comeline" \
>>> -o mainline-boot.img
>>
>> Isn't image version 2 working ?
>>
> 
> Yes, '--header_version 2' works, I followed the version of stock boot
> image. If there is a rule to follow?
> 
>>>
>>> 3. Flashing the boot image
>>>
>>> fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img
>>> fastboot erase dtbo
>>> fastboot flash boot mainline-boot.img
>>>
>>> See also https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=39c5963
>>>
>>> Signed-off-by: Pengyu Luo <mitltlatltl@gmail.com>
>>> ---
>>>    .../boot/dts/qcom/sm8650-oneplus-caihong.dts  | 960 ++++++++++++++++++
>>>    1 file changed, 960 insertions(+)
>>>    create mode 100644 arch/arm64/boot/dts/qcom/sm8650-oneplus-caihong.dts
>>>
>>> diff --git a/arch/arm64/boot/dts/qcom/sm8650-oneplus-caihong.dts b/arch/arm64/boot/dts/qcom/sm8650-oneplus-caihong.dts
>>> new file mode 100644
>>> index 0000000000..93aed47e10
>>> --- /dev/null
>>> +++ b/arch/arm64/boot/dts/qcom/sm8650-oneplus-caihong.dts
>>> @@ -0,0 +1,960 @@
>>> +// SPDX-License-Identifier: BSD-3-Clause
>>> +/*
>>> + * Based on Qualcomm Reference Device DeviceTree
>>> + *
>>> + * Copyright (c) 2023, Linaro Limited
>>> + * Copyright (c) 2025, Pengyu Luo <mitltlatltl@gmail.com>
>>> + */
>>> +
>>> +/dts-v1/;
>>> +
>>> +#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
>>> +#include "sm8650.dtsi"
>>> +#include "pm8550.dtsi"
>>> +#include "pm8550b.dtsi"
>>> +#define PMK8550VE_SID 8
>>> +#include "pm8550ve.dtsi"
>>> +#include "pm8550vs.dtsi"
>>> +#include "pmk8550.dtsi"
>>> +
>>> +/delete-node/ &adspslpi_mem;
>>> +/delete-node/ &hwfence_shbuf;
>>> +
>>> +/* No Modem */
>>> +/delete-node/ &mpss_mem;
>>> +/delete-node/ &q6_mpss_dtb_mem;
>>> +/delete-node/ &mpss_dsm_mem;
>>> +/delete-node/ &mpss_dsm_mem_2;
>>> +/delete-node/ &qlink_logging_mem;
>>> +/delete-node/ &remoteproc_mpss;
>>> +
>>> +/* Unused now, and reusable, taking 144 MiB back */
>>> +/delete-node/ &trust_ui_vm_mem;
>>> +/delete-node/ &oem_vm_mem;
>>> +/delete-node/ &qdss_mem;
>>
>> Are you sure QTEE won't use this ?
>>
> 
> I am not sure, but these two VM nodes are never referred by any device
> in the downstream DT. QDSS and coresight things are unnecessary on the
> retail devices.
> 
>>> +
>>> +/ {
>>> +     model = "Oneplus Pad Pro";
>>> +     compatible = "oneplus,caihong", "qcom,sm8650";
>>> +     chassis-type = "tablet";
>>> +
>>> +     aliases {
>>> +             serial0 = &uart14;
>>> +     };
>>> +
>>> +     bl_avdd_5p9: bl-avdd-regulator {
>>> +             compatible = "regulator-fixed";
>>> +             regulator-name = "bl_avdd_5p9";
>>> +             regulator-min-microvolt = <5900000>;
>>> +             regulator-max-microvolt = <5900000>;
>>> +             gpio = <&tlmm 90 GPIO_ACTIVE_HIGH>;
>>> +             enable-active-high;
>>> +     };
>>> +
>>> +     bl_avee_5p9: bl-avee-regulator {
>>> +             compatible = "regulator-fixed";
>>> +             regulator-name = "bl_avee_5p9";
>>> +             regulator-min-microvolt = <5900000>;
>>> +             regulator-max-microvolt = <5900000>;
>>> +             gpio = <&tlmm 91 GPIO_ACTIVE_HIGH>;
>>> +             enable-active-high;
>>> +     };
>>> +
>>> +     gpio-keys {
>>> +             compatible = "gpio-keys";
>>> +
>>> +             pinctrl-0 = <&volume_up_n>;
>>> +             pinctrl-names = "default";
>>> +
>>> +             key-volume-up {
>>> +                     label = "Volume Up";
>>> +                     linux,code = <KEY_VOLUMEDOWN>;
>>> +                     gpios = <&pm8550_gpios 6 GPIO_ACTIVE_LOW>;
>>> +                     debounce-interval = <15>;
>>> +                     linux,can-disable;
>>> +                     wakeup-source;
>>> +             };
>>> +     };
>>> +
>>> +     pmic-glink {
>>> +             compatible = "qcom,sm8650-pmic-glink",
>>> +                          "qcom,sm8550-pmic-glink",
>>> +                          "qcom,pmic-glink";
>>> +             #address-cells = <1>;
>>> +             #size-cells = <0>;
>>> +             orientation-gpios = <&tlmm 29 GPIO_ACTIVE_HIGH>;
>>> +
>>> +             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>;
>>> +                                     };
>>> +                             };
>>> +
>>> +                             port@1 {
>>> +                                     reg = <1>;
>>> +
>>> +                                     pmic_glink_ss_in: endpoint {
>>> +                                             remote-endpoint = <&usb_dp_qmpphy_out>;
>>> +                                     };
>>> +                             };
>>
>> No Altmode display ? no SBU mux nor redrivers ?
>>
> 
> There should be a wcd939x_i2c@e, it will be added after I figure out
> sound things. Actually, I added it locally, it does not work. Since
> its name is wcd939x, it made me feel it is for usb dac handling only.
> I never checked it carefully. But you mentioned this, I just checked
> downstream bindings, it says
> 
> QTI WCD9395 Device
> 
> This device is used for switching orientation of USB-C analog
> and for display. It uses I2C communication to set the registers
> to configure the switches inside the WCD9395 chip to change
> orientation and also to set SBU1/SBU2 connections of USB-C.

The WCD9395 has 2 independent functions on the same die, one
as a codec and the other one as an SBU mux for Altmode and audio
headset. They are representd as 2 devices since they have 2
separate communication ports (one is i2c, and the other is via soundwire)

Neil

> 
> Thanks. I will check it again.
> 
> Best wishes,
> Pengyu
> 


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

* Re: [PATCH 2/2] arm64: dts: qcom: sm8650: Add support for Oneplus Pad Pro (caihong)
  2025-05-25 10:51         ` Pengyu Luo
@ 2025-05-27 11:11           ` Konrad Dybcio
  2025-06-02 13:44             ` Pengyu Luo
  0 siblings, 1 reply; 16+ messages in thread
From: Konrad Dybcio @ 2025-05-27 11:11 UTC (permalink / raw)
  To: Pengyu Luo, konrad.dybcio
  Cc: andersson, conor+dt, devicetree, konradybcio, krzk+dt,
	linux-arm-msm, linux-kernel, robh

On 5/25/25 12:51 PM, Pengyu Luo wrote:
> On Thu, May 22, 2025 at 11:05 PM Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> wrote:
>> On 5/21/25 10:37 AM, Pengyu Luo wrote:
>>> On Wed, May 21, 2025 at 5:54 AM Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> wrote:
>>>> On 5/20/25 6:42 PM, Pengyu Luo wrote:
>>>>> The OnePlus Pad Pro is an Android tablet based on the Qualcomm SM8650
>>>>> platform. Its device codename is "caihong". This patch adds an initial
>>>>> devicetree for basic functionality.
>>
>> [...]
>>
>>>>> +&i2c2 {
>>>>> +     status = "okay";
>>>>> +
>>>>> +     /* secondary kinetic,ktz8866@11 */
>>>>
>>>> You can describe it, the driver sets some nonzero default brightness
>>>>
>>>
>>> But the backlight framework won't index them, which causes sysfs
>>> collision when the second instance is registering.
>>
>> Have you talked to the backlight maintainers? This shouldn't be too
>> complex to figure out
> 
> Last time I tried to touch ktz8866 source, the reviewer advised me to
> add an backlight API to register the secondary devie. Since I am still
> working on the other parts when I am free, it remains unresolved. Now
> that you reminded me, then I tried to do it.
> 
> https://lore.kernel.org/linux-fbdev/20250525104022.1326997-1-mitltlatltl@gmail.com/

I think this should be made more generic, so that devices with e.g.
quad backlight can be easily accommodated for too.. Perhaps you could
do something like PLATFORM_DEVID_AUTO with incrementing suffixes and
make `backlight = <&foo>;` on the panel accept an array of devices
that would be controlled together

Konrad

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

* Re: [PATCH 2/2] arm64: dts: qcom: sm8650: Add support for Oneplus Pad Pro (caihong)
  2025-05-27 11:11           ` Konrad Dybcio
@ 2025-06-02 13:44             ` Pengyu Luo
  0 siblings, 0 replies; 16+ messages in thread
From: Pengyu Luo @ 2025-06-02 13:44 UTC (permalink / raw)
  To: konrad.dybcio
  Cc: andersson, conor+dt, devicetree, konradybcio, krzk+dt,
	linux-arm-msm, linux-kernel, mitltlatltl, robh

On Tue, May 27, 2025 at 7:11 PM Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> wrote:
> On 5/25/25 12:51 PM, Pengyu Luo wrote:
> > On Thu, May 22, 2025 at 11:05 PM Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> wrote:
> >> On 5/21/25 10:37 AM, Pengyu Luo wrote:
> >>> On Wed, May 21, 2025 at 5:54 AM Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> wrote:
> >>>> On 5/20/25 6:42 PM, Pengyu Luo wrote:
> >>>>> The OnePlus Pad Pro is an Android tablet based on the Qualcomm SM8650
> >>>>> platform. Its device codename is "caihong". This patch adds an initial
> >>>>> devicetree for basic functionality.
> >>
> >> [...]
> >>
> >>>>> +&i2c2 {
> >>>>> +     status = "okay";
> >>>>> +
> >>>>> +     /* secondary kinetic,ktz8866@11 */
> >>>>
> >>>> You can describe it, the driver sets some nonzero default brightness
> >>>>
> >>>
> >>> But the backlight framework won't index them, which causes sysfs
> >>> collision when the second instance is registering.
> >>
> >> Have you talked to the backlight maintainers? This shouldn't be too
> >> complex to figure out
> >
> > Last time I tried to touch ktz8866 source, the reviewer advised me to
> > add an backlight API to register the secondary devie. Since I am still
> > working on the other parts when I am free, it remains unresolved. Now
> > that you reminded me, then I tried to do it.
> >
> > https://lore.kernel.org/linux-fbdev/20250525104022.1326997-1-mitltlatltl@gmail.com/
>
> I think this should be made more generic, so that devices with e.g.
> quad backlight can be easily accommodated for too.. Perhaps you could
> do something like PLATFORM_DEVID_AUTO with incrementing suffixes and

Agree, thanks.

> make `backlight = <&foo>;` on the panel accept an array of devices
> that would be controlled together

In this way, we keep them independent, but we control every backlight
in drm_panel. The questions are the systemd and distribution(sorry, I
am just a junior, I use them). Generally, the systemd will create
serivce for every backlight sysfs. I encountered that they saved
different backlight values, even if I set the same value manually.
As for distribution, it seems that only half backlight is controlled.
I encountered that only half backlight got dimmed.

Best wishes,
Pengyu

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

end of thread, other threads:[~2025-06-02 13:44 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-20 16:42 [PATCH 0/2] arm64: dts: qcom: Introduce Oneplus Pad Pro Pengyu Luo
2025-05-20 16:42 ` [PATCH 1/2] dt-bindings: arm: qcom: Add Oneplus Pad Pro (caihong) Pengyu Luo
2025-05-21  9:58   ` Krzysztof Kozlowski
2025-05-20 16:42 ` [PATCH 2/2] arm64: dts: qcom: sm8650: Add support for " Pengyu Luo
2025-05-20 21:54   ` Konrad Dybcio
2025-05-21  8:37     ` Pengyu Luo
2025-05-21 12:43       ` neil.armstrong
2025-05-22 10:05         ` Pengyu Luo
2025-05-26  7:53           ` neil.armstrong
2025-05-22 15:05       ` Konrad Dybcio
2025-05-25 10:51         ` Pengyu Luo
2025-05-27 11:11           ` Konrad Dybcio
2025-06-02 13:44             ` Pengyu Luo
2025-05-21 12:49   ` neil.armstrong
2025-05-22 10:05     ` Pengyu Luo
2025-05-26  7:56       ` neil.armstrong

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).