From 8aaae8a57ce2aaf87b330290640d53cfd4e0c5a2 Mon Sep 17 00:00:00 2001 From: Alvin Xie Date: Fri, 13 Oct 2023 10:11:36 +0800 Subject: [PATCH] split rock 3a and rock 3b rpi 7inch touchscreen The control pins of rock 3a and rock 3b vcc mipi are different. --- .../arm64/boot/dts/rockchip/overlays/Makefile | 3 +- .../rock-3a-raspberrypi-7inch-touchscreen.dts | 135 ++++++++++++++++++ ...rock-3b-raspberrypi-7inch-touchscreen.dts} | 2 +- 3 files changed, 138 insertions(+), 2 deletions(-) create mode 100644 arch/arm64/boot/dts/rockchip/overlays/rock-3a-raspberrypi-7inch-touchscreen.dts rename arch/arm64/boot/dts/rockchip/overlays/{rock-3ab-raspberrypi-7inch-touchscreen.dts => rock-3b-raspberrypi-7inch-touchscreen.dts} (97%) diff --git a/arch/arm64/boot/dts/rockchip/overlays/Makefile b/arch/arm64/boot/dts/rockchip/overlays/Makefile index f392a63a..52296a8b 100644 --- a/arch/arm64/boot/dts/rockchip/overlays/Makefile +++ b/arch/arm64/boot/dts/rockchip/overlays/Makefile @@ -163,14 +163,15 @@ dtb-$(CONFIG_CLK_RK3568) += \ rock-3a-sata1.dtbo \ rock-3a-sata2.dtbo \ rock-3a-v12-radxa-25w-poe.dtbo \ + rock-3a-raspberrypi-7inch-touchscreen.dtbo \ rock-3ab-okdo-5mp-camera.dtbo \ - rock-3ab-raspberrypi-7inch-touchscreen.dtbo \ rock-3ab-rpi-camera-v1p3-ov5647.dtbo \ rock-3ab-rpi-camera-v2-imx219.dtbo \ rock-3b-enable-hdmicec.dtbo \ rock-3b-hdmi-and-sharp-lq133t1jw01-edp-lcd.dtbo \ rock-3b-radxa-5inch-touchscreen.dtbo \ rock-3b-radxa-25w-poe.dtbo \ + rock-3b-raspberrypi-7inch-touchscreen.dtbo \ rock-3c-okdo-5mp-camera.dtbo \ rock-3c-radxa-5inch-touchscreen.dtbo \ rock-3c-radxa-25w-poe.dtbo \ diff --git a/arch/arm64/boot/dts/rockchip/overlays/rock-3a-raspberrypi-7inch-touchscreen.dts b/arch/arm64/boot/dts/rockchip/overlays/rock-3a-raspberrypi-7inch-touchscreen.dts new file mode 100644 index 00000000..7c6abbb0 --- /dev/null +++ b/arch/arm64/boot/dts/rockchip/overlays/rock-3a-raspberrypi-7inch-touchscreen.dts @@ -0,0 +1,135 @@ +/dts-v1/; +/plugin/; + +#include +#include + +/ { + metadata { + title = "Enable Raspberry Pi 7-inch Touchscreen"; + compatible = "radxa,rock-3a"; + category = "display"; + exclusive = "dsi1"; + description = "Enable Raspberry Pi 7-inch Touchscreen."; + }; + + fragment@0 { + target-path = "/"; + + __overlay__ { + vcc_mipi: vcc-mipi { + status = "okay"; + compatible = "regulator-fixed"; + regulator-name = "vcc_mipi"; + regulator-boot-on; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + enable-active-high; + regulator-always-on; + gpio = <&gpio3 RK_PC0 GPIO_ACTIVE_HIGH>; + }; + }; + }; + + fragment@1 { + target = <&dsi1>; + + __overlay__ { + status = "okay"; + #address-cells = <1>; + #size-cells = <0>; + + dsi1_panel: dsi-panel@0 { + compatible = "raspits,tc358762"; + reg = <0x0>; + status = "okay"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + panel_in_dsi1: endpoint { + remote-endpoint = <&dsi1_out_panel>; + }; + }; + }; + }; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@1 { + reg = <1>; + #address-cells = <1>; + #size-cells = <0>; + + dsi1_out_panel: endpoint@0 { + reg = <0>; + remote-endpoint = <&panel_in_dsi1>; + }; + }; + }; + }; + }; + + fragment@2 { + target = <&i2c3>; + + __overlay__ { + status = "okay"; + pinctrl-0 = <&i2c3m1_xfer>; + #address-cells = <1>; + #size-cells = <0>; + + rockpi_ft5406: rockpi_ft5406@38 { + compatible = "rockpi_ft5406"; + reg = <0x38>; + }; + + chipone_icn8952: chipone_icn8952@30 { + compatible = "chipone_icn8505"; + reg = <0x30>; + }; + + rockpi_mcu: rockpi-mcu@45 { + compatible = "rockpi_mcu"; + reg = <0x45>; + }; + }; + }; + + fragment@3 { + target = <&dsi1_in_vp0>; + + __overlay__ { + status = "disabled"; + }; + }; + + fragment@4 { + target = <&dsi1_in_vp1>; + + __overlay__ { + status = "okay"; + }; + }; + + fragment@5 { + target = <&route_dsi1>; + + __overlay__ { + status = "okay"; + }; + }; + + fragment@6 { + target = <&video_phy1>; + + __overlay__ { + status = "okay"; + }; + }; +}; diff --git a/arch/arm64/boot/dts/rockchip/overlays/rock-3ab-raspberrypi-7inch-touchscreen.dts b/arch/arm64/boot/dts/rockchip/overlays/rock-3b-raspberrypi-7inch-touchscreen.dts similarity index 97% rename from arch/arm64/boot/dts/rockchip/overlays/rock-3ab-raspberrypi-7inch-touchscreen.dts rename to arch/arm64/boot/dts/rockchip/overlays/rock-3b-raspberrypi-7inch-touchscreen.dts index 55c6f21c..70ffceb9 100644 --- a/arch/arm64/boot/dts/rockchip/overlays/rock-3ab-raspberrypi-7inch-touchscreen.dts +++ b/arch/arm64/boot/dts/rockchip/overlays/rock-3b-raspberrypi-7inch-touchscreen.dts @@ -7,7 +7,7 @@ / { metadata { title = "Enable Raspberry Pi 7-inch Touchscreen"; - compatible = "radxa,rock-3a", "radxa,rock-3b"; + compatible = "radxa,rock-3b"; category = "display"; exclusive = "dsi1"; description = "Enable Raspberry Pi 7-inch Touchscreen.";