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"
12 compatible = "anbernic,rg503", "rockchip,rk3566";
21 compatible = "simple-battery";
22 charge-full-design-microamp-hours = <3472000>;
23 charge-term-current-microamp = <300000>;
24 constant-charge-current-max-microamp = <2000000>;
25 constant-charge-voltage-max-microvolt = <4200000>;
26 factory-internal-resistance-micro-ohms = <117000>;
27 voltage-max-design-microvolt = <4172000>;
28 voltage-min-design-microvolt = <3400000>;
30 ocv-capacity-celsius = <20>;
31 ocv-capacity-table-0 = <4172000 100>, <4054000 95>, <3984000 90>, <3926000 85>,
32 <3874000 80>, <3826000 75>, <3783000 70>, <3746000 65>,
33 <3714000 60>, <3683000 55>, <3650000 50>, <3628000 45>,
34 <3612000 40>, <3600000 35>, <3587000 30>, <3571000 25>,
35 <3552000 20>, <3525000 15>, <3492000 10>, <3446000 5>,
40 compatible = "spi-gpio";
41 pinctrl-names = "default";
42 pinctrl-0 = <&spi_pins>;
46 sck-gpios = <&gpio4 RK_PB3 GPIO_ACTIVE_HIGH>;
47 mosi-gpios = <&gpio4 RK_PB0 GPIO_ACTIVE_HIGH>;
48 cs-gpios = <&gpio4 RK_PA7 GPIO_ACTIVE_HIGH>;
49 num-chipselects = <0>;
52 compatible = "samsung,ams495qa01";
54 pinctrl-names = "default";
55 pinctrl-0 = <&lcd_reset>;
56 reset-gpios = <&gpio4 RK_PA0 GPIO_ACTIVE_LOW>;
57 vdd-supply = <&vcc_3v3>;
60 mipi_in_panel: endpoint {
61 remote-endpoint = <&mipi_out_panel>;
67 /* Channels reversed for both headphones and speakers. */
69 compatible = "simple-audio-card";
70 simple-audio-card,name = "rk817_ext";
71 simple-audio-card,aux-devs = <&spk_amp>;
72 simple-audio-card,format = "i2s";
73 simple-audio-card,hp-det-gpio = <&gpio4 RK_PC6 GPIO_ACTIVE_HIGH>;
74 simple-audio-card,mclk-fs = <256>;
75 simple-audio-card,widgets =
76 "Microphone", "Mic Jack",
77 "Headphone", "Headphones",
78 "Speaker", "Internal Speakers";
79 simple-audio-card,routing =
83 "Internal Speakers", "Speaker Amp OUTL",
84 "Internal Speakers", "Speaker Amp OUTR",
85 "Speaker Amp INL", "HPOL",
86 "Speaker Amp INR", "HPOR";
87 simple-audio-card,pin-switches = "Internal Speakers";
89 simple-audio-card,codec {
93 simple-audio-card,cpu {
94 sound-dai = <&i2s1_8ch>;
98 spk_amp: audio-amplifier {
99 compatible = "simple-audio-amplifier";
100 enable-gpios = <&gpio4 RK_PC2 GPIO_ACTIVE_HIGH>;
101 pinctrl-0 = <&spk_amp_enable_h>;
102 pinctrl-names = "default";
103 sound-name-prefix = "Speaker Amp";
108 assigned-clocks = <&pmucru CLK_RTC_32K>, <&cru PLL_GPLL>,
109 <&pmucru PLL_PPLL>, <&cru PLL_VPLL>;
110 assigned-clock-rates = <32768>, <1200000000>,
111 <200000000>, <500000000>;
125 dsi0_in_vp1: endpoint {
126 remote-endpoint = <&vp1_out_dsi0>;
133 mipi_out_panel: endpoint {
134 remote-endpoint = <&mipi_in_panel>;
142 gpios = <&gpio3 RK_PC1 GPIO_ACTIVE_LOW>;
144 linux,code = <BTN_EAST>;
148 gpios = <&gpio3 RK_PA5 GPIO_ACTIVE_LOW>;
150 linux,code = <BTN_DPAD_LEFT>;
154 gpios = <&gpio3 RK_PA6 GPIO_ACTIVE_LOW>;
155 label = "DPAD-RIGHT";
156 linux,code = <BTN_DPAD_RIGHT>;
160 gpios = <&gpio3 RK_PB3 GPIO_ACTIVE_LOW>;
162 linux,code = <BTN_TR>;
166 gpios = <&gpio3 RK_PB4 GPIO_ACTIVE_LOW>;
168 linux,code = <BTN_TR2>;
172 gpios = <&gpio3 RK_PA6 GPIO_ACTIVE_LOW>;
173 label = "DPAD-RIGHT";
174 linux,code = <BTN_DPAD_RIGHT>;
178 gpios = <&gpio3 RK_PC2 GPIO_ACTIVE_LOW>;
180 linux,code = <BTN_WEST>;
186 spk_amp_enable_h: spk-amp-enable-h {
188 <4 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>;
193 lcd_reset: lcd-reset {
195 <4 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>;
202 <4 RK_PA7 RK_FUNC_GPIO &pcfg_pull_none>,
203 <4 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>,
204 <4 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
210 rk817_charger: charger {
211 monitored-battery = <&battery>;
212 rockchip,resistor-sense-micro-ohms = <10000>;
213 rockchip,sleep-enter-current-microamp = <300000>;
214 rockchip,sleep-filter-current-microamp = <100000>;
219 vp1_out_dsi0: endpoint@ROCKCHIP_VOP2_EP_MIPI0 {
220 reg = <ROCKCHIP_VOP2_EP_MIPI0>;
221 remote-endpoint = <&dsi0_in_vp1>;