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. 7 #include <dt-bindings/pinctrl/rockchip.h> 8 #include "rk3566-anbernic-rgxx3.dtsi" 9 10 / { 11 backlight: backlight { 12 compatible = "pwm-backlight"; 13 power-supply = <&vcc_sys>; 14 pwms = <&pwm4 0 25000 0>; 15 }; 16 17 battery: battery { 18 compatible = "simple-battery"; 19 charge-full-design-microamp-ho 20 charge-term-current-microamp = 21 constant-charge-current-max-mi 22 constant-charge-voltage-max-mi 23 factory-internal-resistance-mi 24 voltage-max-design-microvolt = 25 voltage-min-design-microvolt = 26 27 ocv-capacity-celsius = <20>; 28 ocv-capacity-table-0 = <41720 29 <38740 30 <37140 31 <36120 32 <35520 33 <34000 34 }; 35 36 /* Channels reversed for both headphon 37 sound { 38 compatible = "simple-audio-car 39 pinctrl-0 = <&hp_det>; 40 pinctrl-names = "default"; 41 simple-audio-card,name = "rk81 42 simple-audio-card,aux-devs = < 43 simple-audio-card,format = "i2 44 simple-audio-card,hp-det-gpio 45 simple-audio-card,mclk-fs = <2 46 simple-audio-card,widgets = 47 "Microphone", "Mic Jac 48 "Headphone", "Headphon 49 "Speaker", "Internal S 50 simple-audio-card,routing = 51 "MICL", "Mic Jack", 52 "Headphones", "HPOL", 53 "Headphones", "HPOR", 54 "Internal Speakers", " 55 "Internal Speakers", " 56 "Speaker Amp INL", "HP 57 "Speaker Amp INR", "HP 58 simple-audio-card,pin-switches 59 60 simple-audio-card,codec { 61 sound-dai = <&rk817>; 62 }; 63 64 simple-audio-card,cpu { 65 sound-dai = <&i2s1_8ch 66 }; 67 }; 68 69 spk_amp: audio-amplifier { 70 compatible = "simple-audio-amp 71 enable-gpios = <&gpio4 RK_PC2 72 pinctrl-0 = <&spk_amp_enable_h 73 pinctrl-names = "default"; 74 sound-name-prefix = "Speaker A 75 }; 76 }; 77 78 &cru { 79 assigned-clocks = <&pmucru CLK_RTC_32K 80 <&pmucru PLL_PPLL>, 81 assigned-clock-rates = <32768>, <12000 82 <200000000>, <1 83 }; 84 85 &dsi_dphy0 { 86 status = "okay"; 87 }; 88 89 &dsi0 { 90 status = "okay"; 91 #address-cells = <1>; 92 #size-cells = <0>; 93 94 ports { 95 dsi0_in: port@0 { 96 reg = <0>; 97 dsi0_in_vp1: endpoint 98 remote-endpoin 99 }; 100 }; 101 102 dsi0_out: port@1 { 103 reg = <1>; 104 mipi_out_panel: endpoi 105 remote-endpoin 106 }; 107 }; 108 }; 109 110 panel: panel@0 { 111 compatible = "anbernic,rg-arc- 112 reg = <0>; 113 backlight = <&backlight>; 114 IOVCC-supply = <&vcc3v3_lcd0_n 115 pinctrl-names = "default"; 116 pinctrl-0 = <&lcd_rst>; 117 reset-gpios = <&gpio4 RK_PA0 G 118 rotation = <90>; 119 VCC-supply = <&vcc3v3_lcd0_n>; 120 121 port { 122 mipi_in_panel: endpoin 123 remote-endpoin 124 }; 125 }; 126 }; 127 }; 128 129 /* 130 * Device uses a non-standard six button layou 131 * Y, and Z on the top row of buttons and A, B 132 * row. 133 */ 134 &gpio_keys_control { 135 button-a { 136 gpios = <&gpio3 RK_PC3 GPIO_AC 137 label = "A"; 138 linux,code = <BTN_A>; 139 }; 140 141 button-b { 142 gpios = <&gpio3 RK_PC2 GPIO_AC 143 label = "B"; 144 linux,code = <BTN_B>; 145 }; 146 147 button-c { 148 gpios = <&gpio3 RK_PA2 GPIO_AC 149 label = "C"; 150 linux,code = <BTN_C>; 151 }; 152 153 button-left { 154 gpios = <&gpio3 RK_PA6 GPIO_AC 155 label = "DPAD-LEFT"; 156 linux,code = <BTN_DPAD_LEFT>; 157 }; 158 159 button-r1 { 160 gpios = <&gpio3 RK_PB4 GPIO_AC 161 label = "TR"; 162 linux,code = <BTN_TR>; 163 }; 164 165 button-r2 { 166 gpios = <&gpio3 RK_PB3 GPIO_AC 167 label = "TR2"; 168 linux,code = <BTN_TR2>; 169 }; 170 171 button-right { 172 gpios = <&gpio3 RK_PA5 GPIO_AC 173 label = "DPAD-RIGHT"; 174 linux,code = <BTN_DPAD_RIGHT>; 175 }; 176 177 button-x { 178 gpios = <&gpio3 RK_PC0 GPIO_AC 179 label = "X"; 180 linux,code = <BTN_X>; 181 }; 182 183 button-y { 184 gpios = <&gpio3 RK_PC1 GPIO_AC 185 label = "Y"; 186 linux,code = <BTN_Y>; 187 }; 188 189 button-z { 190 gpios = <&gpio3 RK_PA1 GPIO_AC 191 label = "Z"; 192 linux,code = <BTN_Z>; 193 }; 194 }; 195 196 &pinctrl { 197 audio-amplifier { 198 spk_amp_enable_h: spk-amp-enab 199 rockchip,pins = 200 <4 RK_PC2 RK_F 201 }; 202 }; 203 204 gpio-lcd { 205 lcd_rst: lcd-rst { 206 rockchip,pins = 207 <4 RK_PA0 RK_F 208 }; 209 }; 210 211 headphone { 212 hp_det: hp-det { 213 rockchip,pins = 214 <4 RK_PC6 RK_F 215 }; 216 }; 217 }; 218 219 &pwm4 { 220 status = "okay"; 221 }; 222 223 &rk817 { 224 rk817_charger: charger { 225 monitored-battery = <&battery> 226 rockchip,resistor-sense-micro- 227 rockchip,sleep-enter-current-m 228 rockchip,sleep-filter-current- 229 }; 230 }; 231 232 &vp1 { 233 vp1_out_dsi0: endpoint@ROCKCHIP_VOP2_E 234 reg = <ROCKCHIP_VOP2_EP_MIPI0> 235 remote-endpoint = <&dsi0_in_vp 236 }; 237 };
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.