summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQuentin Schulz <quentin.schulz@theobroma-systems.com>2022-11-16 17:10:50 +0100
committerQuentin Schulz <quentin.schulz@theobroma-systems.com>2023-02-02 10:49:32 +0100
commiteaeb1957428bdecf52a2b0d33d48054c049896ff (patch)
tree3dd793ab423094c07c2162c9f4b2878a989f56ed
parentf0f3dad2add696f4d8bd357b1155687d568ae88b (diff)
TSD: arm64: dts: rockchip: add support for Video Demo adapter on Haikou on Puma RK3399 SoM
This adds support for the Video Demo adapter for Haikou devkit with Puma RK3399 SoM. The Video Demo adapter is an adapter connected to the fake PCIe slot labeled "Video Connector" on the Haikou devkit. It has an Omnivision OV5675 camera sensor fitted with a DW9714 focus lens driver, as well as a Leadtek LTK050H3148W display fitted with a Goodix GT911 touchscreen. It also has a SW controllable blue LED and most of the lanes are routed through a GPIO expander connected over I2C. The display is using MIPI-DSI while the camera is using MIPI-CSI for their video streams. [TSD] more work needs to be done on the driver side to allow non-19.2MHz CSI MCLK before upstreaming this. Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
-rw-r--r--arch/arm64/boot/dts/rockchip/Makefile1
-rw-r--r--arch/arm64/boot/dts/rockchip/rk3399-puma-haikou-video-demo.dts238
2 files changed, 239 insertions, 0 deletions
diff --git a/arch/arm64/boot/dts/rockchip/Makefile b/arch/arm64/boot/dts/rockchip/Makefile
index ef79a672804a..26fe25c8db32 100644
--- a/arch/arm64/boot/dts/rockchip/Makefile
+++ b/arch/arm64/boot/dts/rockchip/Makefile
@@ -43,6 +43,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-nanopi-r4s.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-orangepi.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-pinebook-pro.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-puma-haikou.dtb
+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-puma-haikou-video-demo.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-roc-pc.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-roc-pc-mezzanine.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-roc-pc-plus.dtb
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-puma-haikou-video-demo.dts b/arch/arm64/boot/dts/rockchip/rk3399-puma-haikou-video-demo.dts
new file mode 100644
index 000000000000..4ea2bda4aeb8
--- /dev/null
+++ b/arch/arm64/boot/dts/rockchip/rk3399-puma-haikou-video-demo.dts
@@ -0,0 +1,238 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2022 Theobroma Systems Design und Consulting GmbH
+ */
+
+/dts-v1/;
+
+#include <dt-bindings/leds/common.h>
+
+#include "rk3399-puma-haikou.dts"
+
+/ {
+ model = "Theobroma Systems RK3399-Q7 SoM on Haikou devkit with Video Demo adapter";
+ compatible = "tsd,rk3399-puma-haikou-video-demo", "tsd,rk3399-puma-haikou", "rockchip,rk3399";
+
+ video-adapter-leds {
+ compatible = "gpio-leds";
+
+ video-adapter-led {
+ label = "video-adapter-led";
+ gpios = <&pca9670 7 GPIO_ACTIVE_HIGH>;
+ linux,default-trigger = "none";
+ color = <LED_COLOR_ID_BLUE>;
+ };
+ };
+
+ backlight: backlight {
+ compatible = "pwm-backlight";
+ power-supply = <&dc_12v>;
+ pwms = <&pwm0 0 25000 0>;
+ };
+
+ cam_afvdd_2v8: cam-afvdd-2v8-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "cam-afvdd-2v8";
+ gpio = <&pca9670 2 GPIO_ACTIVE_LOW>;
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <2800000>;
+ vin-supply = <&vcc2v8_video>;
+ };
+
+ cam_avdd_2v8: cam-avdd-2v8-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "cam-avdd-2v8";
+ gpio = <&pca9670 4 GPIO_ACTIVE_LOW>;
+ vin-supply = <&vcc2v8_video>;
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <2800000>;
+ };
+
+ cam_dovdd_1v8: cam-dovdd-1v8-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "cam-dovdd-1v8";
+ gpio = <&pca9670 3 GPIO_ACTIVE_LOW>;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ vin-supply = <&vcc1v8_video>;
+ };
+
+ cam_dvdd_1v2: cam-dvdd-1v2-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "cam-dvdd-1v2";
+ gpio = <&pca9670 5 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+ vin-supply = <&vcc3v3_baseboard>;
+ };
+
+ vcc1v8_video: vcc1v8-video-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc1v8-video";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ vin-supply = <&vcc3v3_baseboard>;
+ };
+
+ vcc2v8_video: vcc2v8-video-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc2v8-video";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <2800000>;
+ vin-supply = <&vcc3v3_baseboard>;
+ };
+};
+
+&cif_clkouta {
+ rockchip,io-domains = <&io_domains>;
+};
+
+/* PCA9670 is connected to the SoC through a level shifter, so the HW pull-up
+ * is not enough to keep the line high without SW help.
+ * FIXME: ideally done via a reset-gpios in the PCA9670 driver.
+ */
+&gpio4 {
+ pca9670-reset-hog {
+ gpio-hog;
+ gpios = <RK_PD6 GPIO_ACTIVE_HIGH>;
+ output-high;
+ line-name = "pca9670-reset";
+ };
+};
+
+&i2c1 {
+ /* OV5675, GT911, DW9714 are limited to 400KHz */
+ clock-frequency = <400000>;
+
+ focus: focus@c {
+ compatible = "dongwoon,dw9714";
+ reg = <0xc>;
+ vcc-supply = <&cam_afvdd_2v8>;
+ status = "okay";
+ };
+
+ touchscreen@14 {
+ compatible = "goodix,gt911";
+ reg = <0x14>;
+ interrupt-parent = <&gpio1>;
+ interrupts = <RK_PC7 IRQ_TYPE_LEVEL_LOW>;
+ irq-gpios = <&gpio1 RK_PC7 GPIO_ACTIVE_HIGH>;
+ reset-gpios = <&pca9670 1 GPIO_ACTIVE_HIGH>;
+ AVDD28-supply = <&vcc2v8_video>;
+ VDDIO-supply = <&vcc3v3_baseboard>;
+ pinctrl-0 = <&touch_int>;
+ pinctrl-names = "default";
+
+ goodix,calibration-data = [
+ 51 d0 02 00 05 05 35 00 01 0f 28 0f 5a 3c 03 00 00 00
+ 00 00 00 00 08 18 1a 1e 14 8b 2b 0c 2c 2e bb 0a 00 00
+ 01 01 03 2d 00 00 00 00 00 00 00 00 00 00 00 28 64 94
+ d5 02 08 00 00 04 80 2c 00 6d 34 00 5b 3f 00 4d 4c 00
+ 42 5b 00 42 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+ 00 00 00 00 02 04 06 08 0a 0c 0e 10 12 14 16 18 ff ff
+ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 26 24
+ 22 21 20 1f 1e 1d 1c 18 16 13 12 10 0f 0c 0a 08 06 04
+ 02 00 ff ff ff ff 00 00 00 00 00 00 00 00 00 00 00 00
+ 00 00 00 00 88 01
+ ];
+ };
+
+ pca9670: gpio@27 {
+ compatible = "nxp,pca9670";
+ reg = <0x27>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ };
+
+ camera@36 {
+ compatible = "ovti,ov5675";
+ reg = <0x36>;
+
+ clocks = <&cru SCLK_CIF_OUT>;
+ assigned-clocks = <&cru SCLK_CIF_OUT>;
+ assigned-clock-rates = <19200000>;
+ avdd-supply = <&cam_avdd_2v8>;
+ dvdd-supply = <&cam_dvdd_1v2>;
+ dovdd-supply = <&cam_dovdd_1v8>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&cif_clkouta>;
+ reset-gpios = <&pca9670 6 GPIO_ACTIVE_LOW>;
+
+ lens-focus = <&focus>;
+ status = "okay";
+
+ port {
+ cam_out: endpoint {
+ remote-endpoint = <&mipi_in_cam>;
+ data-lanes = <1 2>;
+ link-frequencies = /bits/ 64 <450000000>;
+ };
+ };
+ };
+};
+
+&isp1 {
+ status = "okay";
+
+ ports {
+ port@0 {
+ mipi_in_cam: endpoint@0 {
+ reg = <0>;
+ remote-endpoint = <&cam_out>;
+ data-lanes = <1 2>;
+ };
+ };
+ };
+};
+
+&isp1_mmu {
+ status = "okay";
+};
+
+&mipi_dsi {
+ status = "okay";
+
+ ports {
+ mipi_out: port@1 {
+ reg = <1>;
+
+ mipi_out_panel: endpoint {
+ remote-endpoint = <&mipi_in_panel>;
+ };
+ };
+ };
+
+ panel@0 {
+ compatible = "leadtek,ltk050h3148w";
+ reg = <0>;
+ backlight = <&backlight>;
+ iovcc-supply = <&vcc1v8_video>;
+ vci-supply = <&vcc2v8_video>;
+ reset-gpios = <&pca9670 0 GPIO_ACTIVE_LOW>;
+ status = "okay";
+
+ port {
+ mipi_in_panel: endpoint {
+ remote-endpoint = <&mipi_out_panel>;
+ };
+ };
+ };
+};
+
+&mipi_dsi1 {
+ status = "okay";
+};
+
+&pinctrl {
+ touch {
+ touch_int: touch-int {
+ rockchip,pins = <1 RK_PC7 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
+};