1// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2
3/dts-v1/;
4
5#include <dt-bindings/gpio/gpio.h>
6#include <dt-bindings/input/linux-event-codes.h>
7#include <dt-bindings/pinctrl/rockchip.h>
8#include "rk3566-anbernic-rgxx3.dtsi"
9
10/ {
11	model = "RG353P";
12	compatible = "anbernic,rg353p", "rockchip,rk3566";
13
14	aliases {
15		mmc0 = &sdhci;
16		mmc1 = &sdmmc0;
17		mmc2 = &sdmmc1;
18		mmc3 = &sdmmc2;
19	};
20
21	backlight: backlight {
22		compatible = "pwm-backlight";
23		power-supply = <&vcc_sys>;
24		pwms = <&pwm4 0 25000 0>;
25	};
26};
27
28&gpio_keys_control {
29	button-a {
30		gpios = <&gpio3 RK_PC2 GPIO_ACTIVE_LOW>;
31		label = "EAST";
32		linux,code = <BTN_EAST>;
33	};
34
35	button-left {
36		gpios = <&gpio3 RK_PA6 GPIO_ACTIVE_LOW>;
37		label = "DPAD-LEFT";
38		linux,code = <BTN_DPAD_LEFT>;
39	};
40
41	button-r1 {
42		gpios = <&gpio3 RK_PB4 GPIO_ACTIVE_LOW>;
43		label = "TR";
44		linux,code = <BTN_TR>;
45	};
46
47	button-r2 {
48		gpios = <&gpio3 RK_PB3 GPIO_ACTIVE_LOW>;
49		label = "TR2";
50		linux,code = <BTN_TR2>;
51	};
52
53	button-right {
54		gpios = <&gpio3 RK_PA5 GPIO_ACTIVE_LOW>;
55		label = "DPAD-RIGHT";
56		linux,code = <BTN_DPAD_RIGHT>;
57	};
58
59	button-y {
60		gpios = <&gpio3 RK_PC1 GPIO_ACTIVE_LOW>;
61		label = "WEST";
62		linux,code = <BTN_WEST>;
63	};
64};
65
66&i2c0 {
67	/* This hardware is physically present but unused. */
68	power-monitor@62 {
69		compatible = "cellwise,cw2015";
70		reg = <0x62>;
71		status = "disabled";
72	};
73};
74
75&i2c2 {
76	pintctrl-names = "default";
77	pinctrl-0 = <&i2c2m1_xfer>;
78	status = "okay";
79};
80
81&pwm4 {
82	status = "okay";
83};
84
85&sdhci {
86	pinctrl-0 = <&emmc_bus8>, <&emmc_clk>, <&emmc_cmd>, <&emmc_datastrobe>, <&emmc_rstnout>;
87	pinctrl-names = "default";
88	bus-width = <8>;
89	mmc-hs200-1_8v;
90	non-removable;
91	vmmc-supply = <&vcc_3v3>;
92	vqmmc-supply = <&vcc_1v8>;
93	status = "okay";
94};
95