xref: /linux/arch/arm64/boot/dts/rockchip/rk3399-nanopc-t4-hd702e.dtso (revision 0fc8f6200d2313278fbf4539bbab74677c685531)
1// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2/*
3 * FriendlyElec HD702E LCD on NanoPC-T4 board
4 */
5
6/dts-v1/;
7/plugin/;
8
9#include <dt-bindings/gpio/gpio.h>
10#include <dt-bindings/interrupt-controller/irq.h>
11#include <dt-bindings/pinctrl/rockchip.h>
12
13&{/} {
14	vdd_3_3v: regulator-vdd_3_3v {
15		compatible = "regulator-fixed";
16		regulator-always-on;
17		regulator-boot-on;
18		regulator-min-microvolt = <3300000>;
19		regulator-max-microvolt = <3300000>;
20		regulator-name = "vdd_3.3v";
21		vin-supply = <&vcc12v0_sys>;
22	};
23
24	backlight: backlight {
25		compatible = "pwm-backlight";
26		pwms = <&pwm0 0 25000 0>;
27		enable-gpios = <&gpio4 RK_PD5 GPIO_ACTIVE_HIGH>;
28		brightness-levels = <0 255>;
29		default-brightness-level = <200>;
30		num-interpolated-steps = <255>;
31		pinctrl-0 = <&bl_en>;
32		pinctrl-names = "default";
33	};
34};
35
36&edp {
37	force-hpd;
38	status = "okay";
39
40	aux-bus {
41		panel {
42			compatible = "friendlyarm,hd702e";
43			backlight = <&backlight>;
44			no-hpd;
45			power-supply = <&vdd_3_3v>;
46
47			port {
48				panel_in_edp: endpoint {
49					remote-endpoint = <&edp_out_panel>;
50				};
51			};
52		};
53	};
54};
55
56&edp_out {
57	edp_out_panel: endpoint {
58		remote-endpoint = <&panel_in_edp>;
59	};
60};
61
62&i2c4 {
63	#address-cells = <1>;
64	#size-cells = <0>;
65
66	touchscreen@5d {
67		compatible = "goodix,gt9271";
68		reg = <0x5d>;
69		interrupt-parent = <&gpio1>;
70		interrupts = <RK_PC4 IRQ_TYPE_EDGE_FALLING>;
71		irq-gpios = <&gpio1 RK_PC4 GPIO_ACTIVE_HIGH>;
72		reset-gpios = <&gpio1 RK_PB5 GPIO_ACTIVE_HIGH>;
73		pinctrl-0 = <&touch_int &touch_rst>;
74		pinctrl-names = "default";
75		AVDD28-supply = <&vdd_3_3v>;
76		VDDIO-supply = <&vdd_3_3v>;
77	};
78};
79
80&pinctrl {
81	backlight {
82		bl_en: bl-en {
83			rockchip,pins = <4 RK_PD5 RK_FUNC_GPIO &pcfg_pull_none>;
84		};
85	};
86
87	touchscreen {
88		touch_int: touch-int {
89			rockchip,pins = <1 RK_PC4 RK_FUNC_GPIO &pcfg_pull_none>;
90		};
91
92		touch_rst: touch-rst {
93			rockchip,pins = <1 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
94		};
95	};
96};
97