Merge tag 'usb-5.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
[linux/fpc-iii.git] / arch / mips / boot / dts / ingenic / rs90.dts
blob4eb1edbfc155a6d226b1833746fdc994aa42863e
1 // SPDX-License-Identifier: GPL-2.0
2 /dts-v1/;
4 #include "jz4725b.dtsi"
6 #include <dt-bindings/gpio/gpio.h>
7 #include <dt-bindings/iio/adc/ingenic,adc.h>
8 #include <dt-bindings/input/linux-event-codes.h>
10 / {
11         compatible = "ylm,rs90", "ingenic,jz4725b";
12         model = "RS-90";
14         memory {
15                 device_type = "memory";
16                 reg = <0x0 0x2000000>;
17         };
19         vcc: regulator {
20                 compatible = "regulator-fixed";
22                 regulator-name = "vcc";
23                 regulaor-min-microvolt = <3300000>;
24                 regulaor-max-microvolt = <3300000>;
25                 regulator-always-on;
26         };
28         backlight: backlight {
29                 compatible = "pwm-backlight";
30                 pwms = <&pwm 3 40000 0>;
32                 brightness-levels = <0 16 32 48 64 80 112 144 192 255>;
33                 default-brightness-level = <8>;
35                 pinctrl-names = "default";
36                 pinctrl-0 = <&pins_pwm3>;
38                 power-supply = <&vcc>;
39         };
41         keys@0 {
42                 compatible = "gpio-keys";
43                 #address-cells = <1>;
44                 #size-cells = <0>;
46                 key@0 {
47                         label = "D-pad up";
48                         linux,code = <KEY_UP>;
49                         gpios = <&gpc 10 GPIO_ACTIVE_LOW>;
50                 };
52                 key@1 {
53                         label = "D-pad down";
54                         linux,code = <KEY_DOWN>;
55                         gpios = <&gpc 11 GPIO_ACTIVE_LOW>;
56                 };
58                 key@2 {
59                         label = "D-pad left";
60                         linux,code = <KEY_LEFT>;
61                         gpios = <&gpb 31 GPIO_ACTIVE_LOW>;
62                 };
64                 key@3 {
65                         label = "D-pad right";
66                         linux,code = <KEY_RIGHT>;
67                         gpios = <&gpd 21 GPIO_ACTIVE_LOW>;
68                 };
70                 key@4 {
71                         label = "Button A";
72                         linux,code = <KEY_LEFTCTRL>;
73                         gpios = <&gpc 31 GPIO_ACTIVE_LOW>;
74                 };
76                 key@5 {
77                         label = "Button B";
78                         linux,code = <KEY_LEFTALT>;
79                         gpios = <&gpc 30 GPIO_ACTIVE_LOW>;
80                 };
82                 key@6 {
83                         label = "Right shoulder button";
84                         linux,code = <KEY_BACKSPACE>;
85                         gpios = <&gpc 12 GPIO_ACTIVE_LOW>;
86                         debounce-interval = <10>;
87                 };
89                 key@7 {
90                         label = "Start button";
91                         linux,code = <KEY_ENTER>;
92                         gpios = <&gpd 17 GPIO_ACTIVE_LOW>;
93                 };
94         };
96         keys@1 {
97                 compatible = "adc-keys";
98                 io-channels = <&adc INGENIC_ADC_AUX>;
99                 io-channel-names = "buttons";
100                 keyup-threshold-microvolt = <1400000>;
101                 poll-interval = <30>;
103                 key@0 {
104                         label = "Left shoulder button";
105                         linux,code = <KEY_TAB>;
106                         press-threshold-microvolt = <800000>;
107                 };
109                 key@1 {
110                         label = "Select button";
111                         linux,code = <KEY_ESC>;
112                         press-threshold-microvolt = <1100000>;
113                 };
114         };
116         amp: analog-amplifier {
117                 compatible = "simple-audio-amplifier";
118                 enable-gpios = <&gpc 15 GPIO_ACTIVE_HIGH>;
120                 VCC-supply = <&vcc>;
121         };
123         sound {
124                 compatible = "simple-audio-card";
126                 simple-audio-card,name = "rs90-audio";
127                 simple-audio-card,format = "i2s";
129                 simple-audio-card,widgets =
130                         "Speaker", "Speaker",
131                         "Headphone", "Headphones";
132                 simple-audio-card,routing =
133                         "INL", "LHPOUT",
134                         "INR", "RHPOUT",
135                         "Headphones", "LHPOUT",
136                         "Headphones", "RHPOUT",
137                         "Speaker", "OUTL",
138                         "Speaker", "OUTR";
139                 simple-audio-card,pin-switches = "Speaker";
141                 simple-audio-card,hp-det-gpio = <&gpd 16 GPIO_ACTIVE_LOW>;
142                 simple-audio-card,aux-devs = <&amp>;
144                 simple-audio-card,bitclock-master = <&dai_codec>;
145                 simple-audio-card,frame-master = <&dai_codec>;
147                 dai_cpu: simple-audio-card,cpu {
148                         sound-dai = <&aic>;
149                 };
151                 dai_codec: simple-audio-card,codec {
152                         sound-dai = <&codec>;
153                 };
155         };
157         usb_phy: usb-phy {
158                 compatible = "usb-nop-xceiv";
159                 #phy-cells = <0>;
161                 clocks = <&cgu JZ4725B_CLK_UDC_PHY>;
162                 clock-names = "main_clk";
163                 vcc-supply = <&vcc>;
164         };
166         panel {
167                 compatible = "sharp,ls020b1dd01d";
169                 backlight = <&backlight>;
170                 power-supply = <&vcc>;
172                 port {
173                         panel_input: endpoint {
174                                 remote-endpoint = <&panel_output>;
175                         };
176                 };
177         };
180 &ext {
181         clock-frequency = <12000000>;
184 &rtc_dev {
185         system-power-controller;
188 &udc {
189         phys = <&usb_phy>;
192 &pinctrl {
193         pins_mmc1: mmc1 {
194                 function = "mmc1";
195                 groups = "mmc1-1bit";
196         };
198         pins_nemc: nemc {
199                 function = "nand";
200                 groups = "nand-cs1", "nand-cle-ale", "nand-fre-fwe";
201         };
203         pins_pwm3: pwm3 {
204                 function = "pwm3";
205                 groups = "pwm3";
206                 bias-disable;
207         };
209         pins_lcd: lcd {
210                 function = "lcd";
211                 groups = "lcd-8bit", "lcd-16bit", "lcd-special";
212         };
215 &mmc0 {
216         status = "disabled";
219 &mmc1 {
220         bus-width = <1>;
221         max-frequency = <48000000>;
223         pinctrl-names = "default";
224         pinctrl-0 = <&pins_mmc1>;
226         cd-gpios = <&gpc 20 GPIO_ACTIVE_LOW>;
229 &uart {
230         /*
231          * The pins for RX/TX are used for the right shoulder button and
232          * backlight PWM.
233          */
234         status = "disabled";
237 &nemc {
238         nandc: nand-controller@1 {
239                 compatible = "ingenic,jz4725b-nand";
240                 reg = <1 0 0x4000000>;
242                 #address-cells = <1>;
243                 #size-cells = <0>;
245                 ecc-engine = <&bch>;
247                 ingenic,nemc-tAS = <10>;
248                 ingenic,nemc-tAH = <5>;
249                 ingenic,nemc-tBP = <10>;
250                 ingenic,nemc-tAW = <15>;
251                 ingenic,nemc-tSTRV = <100>;
253                 pinctrl-names = "default";
254                 pinctrl-0 = <&pins_nemc>;
256                 rb-gpios = <&gpc 27 GPIO_ACTIVE_HIGH>;
258                 nand@1 {
259                         reg = <1>;
261                         nand-ecc-step-size = <512>;
262                         nand-ecc-strength = <8>;
263                         nand-ecc-mode = "hw";
264                         nand-is-boot-medium;
265                         nand-on-flash-bbt;
267                         partitions {
268                                 compatible = "fixed-partitions";
269                                 #address-cells = <1>;
270                                 #size-cells = <1>;
272                                 partition@0 {
273                                         label = "bootloader";
274                                         reg = <0x0 0x20000>;
275                                 };
277                                 partition@20000 {
278                                         label = "system";
279                                         reg = <0x20000 0x0>;
280                                 };
281                         };
282                 };
283         };
286 &cgu {
287         /* Use 32kHz oscillator as the parent of the RTC clock */
288         assigned-clocks = <&cgu JZ4725B_CLK_RTC>;
289         assigned-clock-parents = <&cgu JZ4725B_CLK_OSC32K>;
292 &tcu {
293         /*
294          * 750 kHz for the system timer and clocksource, and use RTC as the
295          * parent for the watchdog clock.
296          */
297         assigned-clocks = <&tcu TCU_CLK_TIMER0>, <&tcu TCU_CLK_TIMER1>, <&tcu TCU_CLK_WDT>;
298         assigned-clock-parents = <0>, <0>, <&cgu JZ4725B_CLK_RTC>;
299         assigned-clock-rates = <750000>, <750000>;
302 &lcd {
303         pinctrl-names = "default";
304         pinctrl-0 = <&pins_lcd>;
307 &lcd_ports {
308         port@0 {
309                 reg = <0>;
311                 panel_output: endpoint {
312                         remote-endpoint = <&panel_input>;
313                 };
314         };