Skip to contentSkip to conversation

arm64: dts: qcom: Introduce Oneplus Pad Pro

PATCH In review Pengyu Luo 4 participants 16 messages May 20, 2025 – Jun 2, 2025

Subsystems (3)
lore
Share & tools
lore

Pengyu Luo

author
#0 lore raw

cover arm64: dts: qcom: Introduce Oneplus Pad Pro

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
Signature · 1 line
2.49.0
author
#1 lore raw

PATCH 1/2 dt-bindings: arm: qcom: Add Oneplus Pad Pro (caihong)

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

---
 Documentation/devicetree/bindings/arm/qcom.yaml | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/arm/qcom.yaml +1 -0
index 56f78f0f38..f00eb43065 100644
@@ -1111,6 +1111,7 @@ properties:
 
       - items:
           - enum:
+              - oneplus,caihong
               - qcom,sm8650-hdk
               - qcom,sm8650-mtp
               - qcom,sm8650-qrd
Signature · 1 line
2.49.0
author
#3 lore raw

PATCH 2/2 arm64: dts: qcom: sm8650: Add support for Oneplus Pad Pro (caihong)

In reply to 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

---
 .../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
arch/arm64/boot/dts/qcom/sm8650-oneplus-caihong.dts new file +960 -0
new file mode 100644
index 0000000000..93aed47e10
@@ -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 <[email protected]>
+ */
+
+/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>;
+};
Signature · 1 line
2.49.0
#4 lore raw

Re: [PATCH 2/2] arm64: dts: qcom: sm8650: Add support for Oneplus Pad Pro (caihong)

Quoted 25 lines · 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)

Quoted 7 lines

[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

[...]

Quoted 6 lines
arch/arm64/boot/dts/qcom/sm8650-oneplus-caihong.dts new file +6 -0
+		/*
+		 * 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.

arch/arm64/boot/dts/qcom/sm8650-oneplus-caihong.dts line 143

Quoted 10 lines
arch/arm64/boot/dts/qcom/sm8650-oneplus-caihong.dts new file +10 -0
+		 *
+		 * 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)

arch/arm64/boot/dts/qcom/sm8650-oneplus-caihong.dts line 149

Quoted 6 lines
arch/arm64/boot/dts/qcom/sm8650-oneplus-caihong.dts new file +6 -0
+	};
+
+	/* No Modem */
+	smp2p-modem {
+		status = "disabled";
+	};

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

[...]

Quoted 7 lines
arch/arm64/boot/dts/qcom/sm8650-oneplus-caihong.dts new file +7 -0
+
+	vph_pwr: vph-pwr-regulator {
+		compatible = "regulator-fixed";
+
+		regulator-name = "vph_pwr";
+		regulator-min-microvolt = <3700000>;
+		regulator-max-microvolt = <3700000>;

arch/arm64/boot/dts/qcom/sm8650-oneplus-caihong.dts line 166

Quoted 10 lines
arch/arm64/boot/dts/qcom/sm8650-oneplus-caihong.dts new file +10 -0
+
+		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

[...]

Quoted 18 lines

+&i2c_hub_0 {

arch/arm64/boot/dts/qcom/sm8650-oneplus-caihong.dts new file +17 -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";

arch/arm64/boot/dts/qcom/sm8650-oneplus-caihong.dts line 590

Quoted 10 lines
arch/arm64/boot/dts/qcom/sm8650-oneplus-caihong.dts new file +10 -0
+
+	/* 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

Quoted 4 lines
arch/arm64/boot/dts/qcom/sm8650-oneplus-caihong.dts new file +4 -0
+};
+
+&i2c_hub_7 {
+	clock-frequency = <400000>;

arch/arm64/boot/dts/qcom/sm8650-oneplus-caihong.dts line 604

Quoted 10 lines
arch/arm64/boot/dts/qcom/sm8650-oneplus-caihong.dts new file +10 -0
+
+	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

author
#5 lore raw

Re: [PATCH 2/2] arm64: dts: qcom: sm8650: Add support for Oneplus Pad Pro (caihong)

Quoted 34 lines · Konrad Dybcio
Quoted 25 lines · 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)

Quoted 7 lines

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

Quoted 4 lines

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

Quoted 19 lines

[...]

Quoted 6 lines
arch/arm64/boot/dts/qcom/sm8650-oneplus-caihong.dts new file +6 -0
+             /*
+              * 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.

arch/arm64/boot/dts/qcom/sm8650-oneplus-caihong.dts line 143

Quoted 10 lines
arch/arm64/boot/dts/qcom/sm8650-oneplus-caihong.dts new file +10 -0
+              *
+              * 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;
+             };
Quoted 4 lines

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.

Quoted 9 lines

arch/arm64/boot/dts/qcom/sm8650-oneplus-caihong.dts line 149

Quoted 6 lines
arch/arm64/boot/dts/qcom/sm8650-oneplus-caihong.dts new file +6 -0
+     };
+
+     /* No Modem */
+     smp2p-modem {
+             status = "disabled";
+     };

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

Ack

Quoted 23 lines

[...]

Quoted 7 lines
arch/arm64/boot/dts/qcom/sm8650-oneplus-caihong.dts new file +7 -0
+
+     vph_pwr: vph-pwr-regulator {
+             compatible = "regulator-fixed";
+
+             regulator-name = "vph_pwr";
+             regulator-min-microvolt = <3700000>;
+             regulator-max-microvolt = <3700000>;

arch/arm64/boot/dts/qcom/sm8650-oneplus-caihong.dts line 166

Quoted 10 lines
arch/arm64/boot/dts/qcom/sm8650-oneplus-caihong.dts new file +10 -0
+
+             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

Quoted 2 lines

please

Ack

Quoted 33 lines

[...]

Quoted 18 lines

+&i2c_hub_0 {

arch/arm64/boot/dts/qcom/sm8650-oneplus-caihong.dts new file +17 -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";

arch/arm64/boot/dts/qcom/sm8650-oneplus-caihong.dts line 590

Quoted 10 lines
arch/arm64/boot/dts/qcom/sm8650-oneplus-caihong.dts new file +10 -0
+
+     /* pencil-wireless-charger-cps8601@41 */
+};
+
+&i2c_hub_4 {
+     clock-frequency = <400000>;
+
+     status = "okay";
+
+     /* awinic,aw88261_smartpa @34,35,37 */

We have drivers for these!

Quoted 2 lines

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

Quoted 8 lines
Quoted 8 lines
arch/arm64/boot/dts/qcom/sm8650-oneplus-caihong.dts new file +8 -0
+};
+
+&i2c_hub_7 {
+     clock-frequency = <400000>;
+
+     status = "okay";
+
+     /* awinic,aw88261_smartpa @34,35,37 */
Quoted 9 lines

arch/arm64/boot/dts/qcom/sm8650-oneplus-caihong.dts line 604

Quoted 6 lines
arch/arm64/boot/dts/qcom/sm8650-oneplus-caihong.dts new file +6 -0
+};
+
+&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

#6 lore raw

Re: [PATCH 2/2] arm64: dts: qcom: sm8650: Add support for Oneplus Pad Pro (caihong)

Quoted 68 lines · Pengyu Luo
Quoted 34 lines · Konrad Dybcio
Quoted 25 lines · 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)

Quoted 7 lines

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

Quoted 4 lines

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

Quoted 19 lines

[...]

Quoted 6 lines
arch/arm64/boot/dts/qcom/sm8650-oneplus-caihong.dts new file +6 -0
+             /*
+              * 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.

arch/arm64/boot/dts/qcom/sm8650-oneplus-caihong.dts line 143

Quoted 10 lines
arch/arm64/boot/dts/qcom/sm8650-oneplus-caihong.dts new file +10 -0
+              *
+              * 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;
+             };
Quoted 4 lines

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)

Quoted 4 lines

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

Quoted 106 lines
Quoted 10 lines

arch/arm64/boot/dts/qcom/sm8650-oneplus-caihong.dts line 149

Quoted 7 lines
arch/arm64/boot/dts/qcom/sm8650-oneplus-caihong.dts new file +6 -0
+     };
+
+     /* No Modem */
+     smp2p-modem {
+             status = "disabled";
+     };

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

Ack

Quoted 23 lines

[...]

Quoted 7 lines
arch/arm64/boot/dts/qcom/sm8650-oneplus-caihong.dts new file +7 -0
+
+     vph_pwr: vph-pwr-regulator {
+             compatible = "regulator-fixed";
+
+             regulator-name = "vph_pwr";
+             regulator-min-microvolt = <3700000>;
+             regulator-max-microvolt = <3700000>;

arch/arm64/boot/dts/qcom/sm8650-oneplus-caihong.dts line 166

Quoted 10 lines
arch/arm64/boot/dts/qcom/sm8650-oneplus-caihong.dts new file +10 -0
+
+             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

Quoted 2 lines

please

Ack

Quoted 33 lines

[...]

Quoted 18 lines

+&i2c_hub_0 {

arch/arm64/boot/dts/qcom/sm8650-oneplus-caihong.dts new file +17 -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";

arch/arm64/boot/dts/qcom/sm8650-oneplus-caihong.dts line 590

Quoted 10 lines
arch/arm64/boot/dts/qcom/sm8650-oneplus-caihong.dts new file +10 -0
+
+     /* pencil-wireless-charger-cps8601@41 */
+};
+
+&i2c_hub_4 {
+     clock-frequency = <400000>;
+
+     status = "okay";
+
+     /* awinic,aw88261_smartpa @34,35,37 */

We have drivers for these!

Quoted 2 lines

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

Quoted 8 lines
Quoted 8 lines
arch/arm64/boot/dts/qcom/sm8650-oneplus-caihong.dts new file +8 -0
+};
+
+&i2c_hub_7 {
+     clock-frequency = <400000>;
+
+     status = "okay";
+
+     /* awinic,aw88261_smartpa @34,35,37 */
Quoted 9 lines

arch/arm64/boot/dts/qcom/sm8650-oneplus-caihong.dts line 604

Quoted 6 lines
arch/arm64/boot/dts/qcom/sm8650-oneplus-caihong.dts new file +6 -0
+};
+
+&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

author
#7 lore raw

Re: [PATCH 2/2] arm64: dts: qcom: sm8650: Add support for Oneplus Pad Pro (caihong)

Quoted 69 lines · On Wed, May 21, 2025 at 8:43 PM <[email protected]> wrote:
Quoted 68 lines · Pengyu Luo
Quoted 34 lines · Konrad Dybcio
Quoted 25 lines · 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)

Quoted 7 lines

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

Quoted 4 lines

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

Quoted 23 lines

[...]

Quoted 6 lines
arch/arm64/boot/dts/qcom/sm8650-oneplus-caihong.dts new file +6 -0
+             /*
+              * 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.

arch/arm64/boot/dts/qcom/sm8650-oneplus-caihong.dts line 143

Quoted 10 lines
arch/arm64/boot/dts/qcom/sm8650-oneplus-caihong.dts new file +10 -0
+              *
+              * 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)

Quoted 8 lines
Quoted 4 lines

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

#8 lore raw

Re: [PATCH 2/2] arm64: dts: qcom: sm8650: Add support for Oneplus Pad Pro (caihong)

Quoted 75 lines · Pengyu Luo
Quoted 74 lines · On Wed, May 21, 2025 at 8:43 PM <[email protected]> wrote:
Quoted 72 lines · Pengyu Luo
Quoted 34 lines · Konrad Dybcio
Quoted 25 lines · 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)

Quoted 7 lines

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

Quoted 4 lines

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

Quoted 19 lines

[...]

Quoted 6 lines
arch/arm64/boot/dts/qcom/sm8650-oneplus-caihong.dts new file +6 -0
+             /*
+              * 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.

arch/arm64/boot/dts/qcom/sm8650-oneplus-caihong.dts line 143

Quoted 10 lines
arch/arm64/boot/dts/qcom/sm8650-oneplus-caihong.dts new file +10 -0
+              *
+              * 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;
+             };
Quoted 4 lines

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.

Quoted 6 lines
Quoted 3 lines

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

Quoted 3 lines

Best wishes,
Pengyu

#9 lore raw

Re: [PATCH 2/2] arm64: dts: qcom: sm8650: Add support for Oneplus Pad Pro (caihong)

In reply to Pengyu Luo
Quoted 5 lines · Pengyu Luo
Quoted 4 lines · Konrad Dybcio
Quoted 3 lines · 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.

[...]

Quoted 10 lines
Quoted 7 lines

arch/arm64/boot/dts/qcom/sm8650-oneplus-caihong.dts line 604

Quoted 4 lines

+&i2c2 {

arch/arm64/boot/dts/qcom/sm8650-oneplus-caihong.dts new file +3 -0
+     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

author
#10 lore raw

Re: [PATCH 2/2] arm64: dts: qcom: sm8650: Add support for Oneplus Pad Pro (caihong)

Quoted 14 lines · Konrad Dybcio
Quoted 5 lines · Pengyu Luo
Quoted 4 lines · Konrad Dybcio
Quoted 3 lines · 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.

[...]

Quoted 5 lines
Quoted 5 lines
Quoted 4 lines

+&i2c2 {

arch/arm64/boot/dts/qcom/sm8650-oneplus-caihong.dts new file +3 -0
+     status = "okay";
+
+     /* secondary kinetic,ktz8866@11 */
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

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/[email protected]/

Best wishes,
Pengyu

#11 lore raw

Re: [PATCH 2/2] arm64: dts: qcom: sm8650: Add support for Oneplus Pad Pro (caihong)

Quoted 24 lines · Pengyu Luo
Quoted 14 lines · Konrad Dybcio
Quoted 5 lines · Pengyu Luo
Quoted 4 lines · Konrad Dybcio
Quoted 3 lines · 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.

[...]

Quoted 5 lines
Quoted 5 lines
Quoted 4 lines

+&i2c2 {

arch/arm64/boot/dts/qcom/sm8650-oneplus-caihong.dts new file +3 -0
+     status = "okay";
+
+     /* secondary kinetic,ktz8866@11 */
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

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

Quoted 6 lines

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/[email protected]/

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

author
#12 lore raw

Re: [PATCH 2/2] arm64: dts: qcom: sm8650: Add support for Oneplus Pad Pro (caihong)

Quoted 30 lines · Konrad Dybcio
Quoted 29 lines · Pengyu Luo
Quoted 14 lines · Konrad Dybcio
Quoted 5 lines · Pengyu Luo
Quoted 4 lines · Konrad Dybcio
Quoted 3 lines · 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.

[...]

Quoted 5 lines
Quoted 5 lines
Quoted 4 lines

+&i2c2 {

arch/arm64/boot/dts/qcom/sm8650-oneplus-caihong.dts new file +3 -0
+     status = "okay";
+
+     /* secondary kinetic,ktz8866@11 */
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

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.

Quoted 5 lines
Quoted 1 line

https://lore.kernel.org/linux-fbdev/[email protected]/

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.

Quoted 2 lines

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

#13 lore raw

Re: [PATCH 2/2] arm64: dts: qcom: sm8650: Add support for Oneplus Pad Pro (caihong)

In reply to Pengyu Luo

Hi,

Quoted 17 lines · 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

Quoted 7 lines

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.

Quoted 24 lines

[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:

Quoted 12 lines

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 ?

Quoted 45 lines

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

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

arch/arm64/boot/dts/qcom/sm8650-oneplus-caihong.dts new file +24 -0
new file mode 100644
index 0000000000..93aed47e10
@@ -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 <[email protected]>
+ */
+
+/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;

arch/arm64/boot/dts/qcom/sm8650-oneplus-caihong.dts line 34

Quoted 10 lines
arch/arm64/boot/dts/qcom/sm8650-oneplus-caihong.dts new file +10 -0
+/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 ?

Quoted 68 lines
arch/arm64/boot/dts/qcom/sm8650-oneplus-caihong.dts new file +68 -0
+
+/ {
+	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>;

arch/arm64/boot/dts/qcom/sm8650-oneplus-caihong.dts line 112

Quoted 10 lines
arch/arm64/boot/dts/qcom/sm8650-oneplus-caihong.dts new file +10 -0
+					};
+				};
+
+				port@1 {
+					reg = <1>;
+
+					pmic_glink_ss_in: endpoint {
+						remote-endpoint = <&usb_dp_qmpphy_out>;
+					};
+				};

No Altmode display ? no SBU mux nor redrivers ?

Quoted 838 lines
arch/arm64/boot/dts/qcom/sm8650-oneplus-caihong.dts new file +838 -0
+			};
+		};
+	};
+
+	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>;
+

arch/arm64/boot/dts/qcom/sm8650-oneplus-caihong.dts line 960

Quoted 10 lines
arch/arm64/boot/dts/qcom/sm8650-oneplus-caihong.dts new file +10 -0
+	status = "okay";
+};
+
+&usb_dp_qmpphy_out {
+	remote-endpoint = <&pmic_glink_ss_in>;
+};
+
+&xo_board {
+	clock-frequency = <76800000>;
+};

Thanks,
Neil

author
#14 lore raw

Re: [PATCH 2/2] arm64: dts: qcom: sm8650: Add support for Oneplus Pad Pro (caihong)

Quoted 29 lines · On Wed, May 21, 2025 at 8:49 PM <[email protected]> wrote:

Hi,

Quoted 17 lines · 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

Quoted 7 lines

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)

Quoted 2 lines

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

Quoted 37 lines
Quoted 24 lines

[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:

Quoted 12 lines

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

Quoted 2 lines

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?

Quoted 49 lines
Quoted 49 lines

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

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

arch/arm64/boot/dts/qcom/sm8650-oneplus-caihong.dts new file +28 -0
new file mode 100644
index 0000000000..93aed47e10
@@ -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 <[email protected]>
+ */
+
+/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;
Quoted 9 lines

arch/arm64/boot/dts/qcom/sm8650-oneplus-caihong.dts line 34

Quoted 6 lines
arch/arm64/boot/dts/qcom/sm8650-oneplus-caihong.dts new file +6 -0
+/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.

Quoted 72 lines
Quoted 72 lines
arch/arm64/boot/dts/qcom/sm8650-oneplus-caihong.dts new file +72 -0
+
+/ {
+     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 {
Quoted 9 lines

arch/arm64/boot/dts/qcom/sm8650-oneplus-caihong.dts line 112

Quoted 6 lines
arch/arm64/boot/dts/qcom/sm8650-oneplus-caihong.dts new file +6 -0
+                                     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

#15 lore raw

Re: [PATCH 2/2] arm64: dts: qcom: sm8650: Add support for Oneplus Pad Pro (caihong)

Quoted 230 lines · Pengyu Luo
Quoted 29 lines · On Wed, May 21, 2025 at 8:49 PM <[email protected]> wrote:

Hi,

Quoted 17 lines · 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

Quoted 7 lines

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)

Quoted 2 lines

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

Quoted 37 lines
Quoted 24 lines

[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:

Quoted 12 lines

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

Quoted 2 lines

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?

Quoted 49 lines
Quoted 49 lines

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

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

arch/arm64/boot/dts/qcom/sm8650-oneplus-caihong.dts new file +28 -0
new file mode 100644
index 0000000000..93aed47e10
@@ -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 <[email protected]>
+ */
+
+/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;
Quoted 9 lines

arch/arm64/boot/dts/qcom/sm8650-oneplus-caihong.dts line 34

Quoted 6 lines
arch/arm64/boot/dts/qcom/sm8650-oneplus-caihong.dts new file +6 -0
+/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.

Quoted 72 lines
Quoted 72 lines
arch/arm64/boot/dts/qcom/sm8650-oneplus-caihong.dts new file +72 -0
+
+/ {
+     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 {
Quoted 9 lines

arch/arm64/boot/dts/qcom/sm8650-oneplus-caihong.dts line 112

Quoted 6 lines
arch/arm64/boot/dts/qcom/sm8650-oneplus-caihong.dts new file +6 -0
+                                     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

Quoted 6 lines

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

Quoted 6 lines

Thanks. I will check it again.

Best wishes,
Pengyu