18bab661aSEmmanuel Vadot// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
28bab661aSEmmanuel Vadot
38bab661aSEmmanuel Vadot/dts-v1/;
48bab661aSEmmanuel Vadot
58bab661aSEmmanuel Vadot#include <dt-bindings/gpio/gpio.h>
68bab661aSEmmanuel Vadot#include <dt-bindings/input/linux-event-codes.h>
78bab661aSEmmanuel Vadot#include <dt-bindings/pinctrl/rockchip.h>
88bab661aSEmmanuel Vadot#include "rk3566-anbernic-rgxx3.dtsi"
98bab661aSEmmanuel Vadot
108bab661aSEmmanuel Vadot/ {
118bab661aSEmmanuel Vadot	backlight: backlight {
128bab661aSEmmanuel Vadot		compatible = "pwm-backlight";
138bab661aSEmmanuel Vadot		power-supply = <&vcc_sys>;
148bab661aSEmmanuel Vadot		pwms = <&pwm4 0 25000 0>;
158bab661aSEmmanuel Vadot	};
168bab661aSEmmanuel Vadot};
178bab661aSEmmanuel Vadot
188bab661aSEmmanuel Vadot&cru {
19cb7aa33aSEmmanuel Vadot	assigned-clocks = <&pmucru CLK_RTC_32K>, <&cru PLL_GPLL>,
20cb7aa33aSEmmanuel Vadot			  <&pmucru PLL_PPLL>, <&cru PLL_VPLL>;
21cb7aa33aSEmmanuel Vadot	assigned-clock-rates = <32768>, <1200000000>,
22cb7aa33aSEmmanuel Vadot			       <200000000>, <241500000>;
238bab661aSEmmanuel Vadot};
248bab661aSEmmanuel Vadot
25*fac71e4eSEmmanuel Vadot&dsi_dphy0 {
26*fac71e4eSEmmanuel Vadot	status = "okay";
27*fac71e4eSEmmanuel Vadot};
28*fac71e4eSEmmanuel Vadot
29*fac71e4eSEmmanuel Vadot&dsi0 {
30*fac71e4eSEmmanuel Vadot	status = "okay";
31*fac71e4eSEmmanuel Vadot	#address-cells = <1>;
32*fac71e4eSEmmanuel Vadot	#size-cells = <0>;
33*fac71e4eSEmmanuel Vadot
34*fac71e4eSEmmanuel Vadot	ports {
35*fac71e4eSEmmanuel Vadot		dsi0_in: port@0 {
36*fac71e4eSEmmanuel Vadot			reg = <0>;
37*fac71e4eSEmmanuel Vadot			dsi0_in_vp1: endpoint {
38*fac71e4eSEmmanuel Vadot				remote-endpoint = <&vp1_out_dsi0>;
39*fac71e4eSEmmanuel Vadot			};
40*fac71e4eSEmmanuel Vadot		};
41*fac71e4eSEmmanuel Vadot
42*fac71e4eSEmmanuel Vadot		dsi0_out: port@1 {
43*fac71e4eSEmmanuel Vadot			reg = <1>;
44*fac71e4eSEmmanuel Vadot			mipi_out_panel: endpoint {
45*fac71e4eSEmmanuel Vadot				remote-endpoint = <&mipi_in_panel>;
46*fac71e4eSEmmanuel Vadot			};
47*fac71e4eSEmmanuel Vadot		};
48*fac71e4eSEmmanuel Vadot	};
49*fac71e4eSEmmanuel Vadot
50*fac71e4eSEmmanuel Vadot	panel: panel@0 {
51*fac71e4eSEmmanuel Vadot		compatible = "anbernic,rg353p-panel", "newvision,nv3051d";
52*fac71e4eSEmmanuel Vadot		reg = <0>;
53*fac71e4eSEmmanuel Vadot		backlight = <&backlight>;
54*fac71e4eSEmmanuel Vadot		pinctrl-names = "default";
55*fac71e4eSEmmanuel Vadot		pinctrl-0 = <&lcd_rst>;
56*fac71e4eSEmmanuel Vadot		reset-gpios = <&gpio4 RK_PA0 GPIO_ACTIVE_LOW>;
57*fac71e4eSEmmanuel Vadot		vdd-supply = <&vcc3v3_lcd0_n>;
58*fac71e4eSEmmanuel Vadot
59*fac71e4eSEmmanuel Vadot		port {
60*fac71e4eSEmmanuel Vadot			mipi_in_panel: endpoint {
61*fac71e4eSEmmanuel Vadot				remote-endpoint = <&mipi_out_panel>;
62*fac71e4eSEmmanuel Vadot			};
63*fac71e4eSEmmanuel Vadot		};
64*fac71e4eSEmmanuel Vadot	};
65*fac71e4eSEmmanuel Vadot};
66*fac71e4eSEmmanuel Vadot
678bab661aSEmmanuel Vadot&gpio_keys_control {
688bab661aSEmmanuel Vadot	button-a {
698bab661aSEmmanuel Vadot		gpios = <&gpio3 RK_PC2 GPIO_ACTIVE_LOW>;
708bab661aSEmmanuel Vadot		label = "EAST";
718bab661aSEmmanuel Vadot		linux,code = <BTN_EAST>;
728bab661aSEmmanuel Vadot	};
738bab661aSEmmanuel Vadot
748bab661aSEmmanuel Vadot	button-left {
758bab661aSEmmanuel Vadot		gpios = <&gpio3 RK_PA6 GPIO_ACTIVE_LOW>;
768bab661aSEmmanuel Vadot		label = "DPAD-LEFT";
778bab661aSEmmanuel Vadot		linux,code = <BTN_DPAD_LEFT>;
788bab661aSEmmanuel Vadot	};
798bab661aSEmmanuel Vadot
808bab661aSEmmanuel Vadot	button-right {
818bab661aSEmmanuel Vadot		gpios = <&gpio3 RK_PA5 GPIO_ACTIVE_LOW>;
828bab661aSEmmanuel Vadot		label = "DPAD-RIGHT";
838bab661aSEmmanuel Vadot		linux,code = <BTN_DPAD_RIGHT>;
848bab661aSEmmanuel Vadot	};
858bab661aSEmmanuel Vadot
868bab661aSEmmanuel Vadot	button-y {
878bab661aSEmmanuel Vadot		gpios = <&gpio3 RK_PC1 GPIO_ACTIVE_LOW>;
888bab661aSEmmanuel Vadot		label = "WEST";
898bab661aSEmmanuel Vadot		linux,code = <BTN_WEST>;
908bab661aSEmmanuel Vadot	};
918bab661aSEmmanuel Vadot};
928bab661aSEmmanuel Vadot
938bab661aSEmmanuel Vadot&i2c0 {
948bab661aSEmmanuel Vadot	/* This hardware is physically present but unused. */
958bab661aSEmmanuel Vadot	power-monitor@62 {
968bab661aSEmmanuel Vadot		compatible = "cellwise,cw2015";
978bab661aSEmmanuel Vadot		reg = <0x62>;
988bab661aSEmmanuel Vadot		status = "disabled";
998bab661aSEmmanuel Vadot	};
1008bab661aSEmmanuel Vadot};
1018bab661aSEmmanuel Vadot
102*fac71e4eSEmmanuel Vadot&pinctrl {
103*fac71e4eSEmmanuel Vadot	gpio-lcd {
104*fac71e4eSEmmanuel Vadot		lcd_rst: lcd-rst {
105*fac71e4eSEmmanuel Vadot			rockchip,pins =
106*fac71e4eSEmmanuel Vadot				<4 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>;
107*fac71e4eSEmmanuel Vadot		};
108*fac71e4eSEmmanuel Vadot	};
109*fac71e4eSEmmanuel Vadot};
110*fac71e4eSEmmanuel Vadot
1118bab661aSEmmanuel Vadot&pwm4 {
1128bab661aSEmmanuel Vadot	status = "okay";
1138bab661aSEmmanuel Vadot};
114*fac71e4eSEmmanuel Vadot
115*fac71e4eSEmmanuel Vadot&vp1 {
116*fac71e4eSEmmanuel Vadot	vp1_out_dsi0: endpoint@ROCKCHIP_VOP2_EP_MIPI0 {
117*fac71e4eSEmmanuel Vadot		reg = <ROCKCHIP_VOP2_EP_MIPI0>;
118*fac71e4eSEmmanuel Vadot		remote-endpoint = <&dsi0_in_vp1>;
119*fac71e4eSEmmanuel Vadot	};
120*fac71e4eSEmmanuel Vadot};
121