1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
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"
11 backlight: backlight {
12 compatible = "pwm-backlight";
13 power-supply = <&vcc_sys>;
14 pwms = <&pwm4 0 25000 0>;
18 compatible = "simple-battery";
19 charge-full-design-microamp-hours = <3472000>;
20 charge-term-current-microamp = <300000>;
21 constant-charge-current-max-microamp = <2000000>;
22 constant-charge-voltage-max-microvolt = <4200000>;
23 factory-internal-resistance-micro-ohms = <117000>;
24 voltage-max-design-microvolt = <4172000>;
25 voltage-min-design-microvolt = <3400000>;
27 ocv-capacity-celsius = <20>;
28 ocv-capacity-table-0 = <4172000 100>, <4054000 95>, <3984000 90>, <3926000 85>,
29 <3874000 80>, <3826000 75>, <3783000 70>, <3746000 65>,
30 <3714000 60>, <3683000 55>, <3650000 50>, <3628000 45>,
31 <3612000 40>, <3600000 35>, <3587000 30>, <3571000 25>,
32 <3552000 20>, <3525000 15>, <3492000 10>, <3446000 5>,
36 /* Channels reversed for both headphones and speakers. */
38 compatible = "simple-audio-card";
39 pinctrl-0 = <&hp_det>;
40 pinctrl-names = "default";
41 simple-audio-card,name = "rk817_ext";
42 simple-audio-card,aux-devs = <&spk_amp>;
43 simple-audio-card,format = "i2s";
44 simple-audio-card,hp-det-gpio = <&gpio4 RK_PC6 GPIO_ACTIVE_HIGH>;
45 simple-audio-card,mclk-fs = <256>;
46 simple-audio-card,widgets =
47 "Microphone", "Mic Jack",
48 "Headphone", "Headphones",
49 "Speaker", "Internal Speakers";
50 simple-audio-card,routing =
54 "Internal Speakers", "Speaker Amp OUTL",
55 "Internal Speakers", "Speaker Amp OUTR",
56 "Speaker Amp INL", "HPOL",
57 "Speaker Amp INR", "HPOR";
58 simple-audio-card,pin-switches = "Internal Speakers";
60 simple-audio-card,codec {
64 simple-audio-card,cpu {
65 sound-dai = <&i2s1_8ch>;
69 spk_amp: audio-amplifier {
70 compatible = "simple-audio-amplifier";
71 enable-gpios = <&gpio4 RK_PC2 GPIO_ACTIVE_HIGH>;
72 pinctrl-0 = <&spk_amp_enable_h>;
73 pinctrl-names = "default";
74 sound-name-prefix = "Speaker Amp";
79 assigned-clocks = <&pmucru CLK_RTC_32K>, <&cru PLL_GPLL>,
80 <&pmucru PLL_PPLL>, <&cru PLL_VPLL>;
81 assigned-clock-rates = <32768>, <1200000000>,
82 <200000000>, <128000000>;
97 dsi0_in_vp1: endpoint {
98 remote-endpoint = <&vp1_out_dsi0>;
104 mipi_out_panel: endpoint {
105 remote-endpoint = <&mipi_in_panel>;
111 compatible = "anbernic,rg-arc-panel", "sitronix,st7701";
113 backlight = <&backlight>;
114 IOVCC-supply = <&vcc3v3_lcd0_n>;
115 pinctrl-names = "default";
116 pinctrl-0 = <&lcd_rst>;
117 reset-gpios = <&gpio4 RK_PA0 GPIO_ACTIVE_HIGH>;
119 VCC-supply = <&vcc3v3_lcd0_n>;
122 mipi_in_panel: endpoint {
123 remote-endpoint = <&mipi_out_panel>;
130 * Device uses a non-standard six button layout for a gamepad with X,
131 * Y, and Z on the top row of buttons and A, B, and C under the bottom
136 gpios = <&gpio3 RK_PC3 GPIO_ACTIVE_LOW>;
138 linux,code = <BTN_A>;
142 gpios = <&gpio3 RK_PC2 GPIO_ACTIVE_LOW>;
144 linux,code = <BTN_B>;
148 gpios = <&gpio3 RK_PA2 GPIO_ACTIVE_LOW>;
150 linux,code = <BTN_C>;
154 gpios = <&gpio3 RK_PA6 GPIO_ACTIVE_LOW>;
156 linux,code = <BTN_DPAD_LEFT>;
160 gpios = <&gpio3 RK_PB4 GPIO_ACTIVE_LOW>;
162 linux,code = <BTN_TR>;
166 gpios = <&gpio3 RK_PB3 GPIO_ACTIVE_LOW>;
168 linux,code = <BTN_TR2>;
172 gpios = <&gpio3 RK_PA5 GPIO_ACTIVE_LOW>;
173 label = "DPAD-RIGHT";
174 linux,code = <BTN_DPAD_RIGHT>;
178 gpios = <&gpio3 RK_PC0 GPIO_ACTIVE_LOW>;
180 linux,code = <BTN_X>;
184 gpios = <&gpio3 RK_PC1 GPIO_ACTIVE_LOW>;
186 linux,code = <BTN_Y>;
190 gpios = <&gpio3 RK_PA1 GPIO_ACTIVE_LOW>;
192 linux,code = <BTN_Z>;
198 spk_amp_enable_h: spk-amp-enable-h {
200 <4 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>;
207 <4 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>;
214 <4 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>;
224 rk817_charger: charger {
225 monitored-battery = <&battery>;
226 rockchip,resistor-sense-micro-ohms = <10000>;
227 rockchip,sleep-enter-current-microamp = <300000>;
228 rockchip,sleep-filter-current-microamp = <100000>;
233 vp1_out_dsi0: endpoint@ROCKCHIP_VOP2_EP_MIPI0 {
234 reg = <ROCKCHIP_VOP2_EP_MIPI0>;
235 remote-endpoint = <&dsi0_in_vp1>;