Merge branch 'work.afs' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
[sfrench/cifs-2.6.git] / arch / arm / boot / dts / at91-nattis-2-natte-2.dts
1 // SPDX-License-Identifier: GPL-2.0+
2 /*
3  * at91-nattis-2-natte-2.dts - Device Tree file for the Linea/Nattis board
4  *
5  * Copyright (C) 2017 Axentia Technologies AB
6  *
7  * Author: Peter Rosin <peda@axentia.se>
8  */
9 /dts-v1/;
10 #include "at91-linea.dtsi"
11 #include "sama5d3_lcd.dtsi"
12 #include "at91-natte.dtsi"
13
14 / {
15         model = "Axentia Linea-Nattis v2 Natte v2";
16         compatible = "axentia,nattis-2", "axentia,natte-2", "axentia,linea",
17                      "atmel,sama5d31", "atmel,sama5d3", "atmel,sama5";
18
19         gpio-keys {
20                 compatible = "gpio-keys";
21
22                 wakeup {
23                         label = "Wakeup";
24                         linux,code = <10>;
25                         gpio-key,wakeup;
26                         gpios = <&pioB 27 GPIO_ACTIVE_LOW>;
27                 };
28         };
29
30         panel_reg: panel-regulator {
31                 compatible = "regulator-fixed";
32                 regulator-name = "panel-VCC";
33                 regulator-min-microvolt = <3300000>;
34                 regulator-max-microvolt = <3300000>;
35         };
36
37         bl_reg: backlight-regulator {
38                 compatible = "regulator-fixed";
39                 regulator-name = "panel-VDD";
40                 regulator-min-microvolt = <12000000>;
41                 regulator-max-microvolt = <12000000>;
42         };
43
44         panel_bl: backlight {
45                 compatible = "pwm-backlight";
46                 pwms = <&hlcdc_pwm 0 100000 0>;
47
48                 brightness-levels = < 0  1  2  3  4  5  6  7  8  9
49                                      10 11 12 13 14 15 16 17 18 19
50                                      20 21 22 23 24 25 26 27 28 29
51                                      30 31 32 33 34 35 36 37 38 39
52                                      40 41 42 43 44 45 46 47 48 49
53                                      50 51 52 53 54 55 56 57 58 59
54                                      60 61 62 63 64 65 66 67 68 69
55                                      70 71 72 73 74 75 76 77 78 79
56                                      80 81 82 83 84 85 86 87 88 89
57                                      90 91 92 93 94 95 96 97 98 99
58                                     100>;
59                 default-brightness-level = <40>;
60
61                 power-supply = <&bl_reg>;
62                 enable-gpios = <&pioA 20 GPIO_ACTIVE_HIGH>;
63         };
64
65         panel: panel {
66                 compatible = "sharp,lq150x1lg11", "panel-lvds";
67
68                 backlight = <&panel_bl>;
69                 power-supply = <&panel_reg>;
70
71                 width-mm = <304>;
72                 height-mm = <228>;
73
74                 data-mapping = "jeida-18";
75
76                 panel-timing {
77                         // 1024x768 @ 60Hz (typical)
78                         clock-frequency = <50000000 65000000 80000000>;
79                         hactive = <1024>;
80                         vactive = <768>;
81                         hfront-porch = <48 88 88>;
82                         hback-porch = <96 168 168>;
83                         hsync-len = <32 64 64>;
84                         vsync-len = <3 13 74>;
85                         vfront-porch = <3 13 74>;
86                         vback-porch = <3 12 74>;
87                 };
88
89                 port {
90                         panel_input: endpoint {
91                                 remote-endpoint = <&lvds_encoder_output>;
92                         };
93                 };
94         };
95
96         lvds-encoder {
97                 compatible = "ti,ds90c185", "lvds-encoder";
98
99                 pinctrl-names = "default";
100                 pinctrl-0 = <&pinctrl_lvds_prlud0 &pinctrl_lvds_hipow0>;
101
102                 ports {
103                         #address-cells = <1>;
104                         #size-cells = <0>;
105
106                         port@0 {
107                                 reg = <0>;
108
109                                 lvds_encoder_input: endpoint {
110                                         remote-endpoint = <&hlcdc_output>;
111                                 };
112                         };
113
114                         port@1 {
115                                 reg = <1>;
116
117                                 lvds_encoder_output: endpoint {
118                                         remote-endpoint = <&panel_input>;
119                                 };
120                         };
121                 };
122         };
123
124         sound {
125                 compatible = "simple-audio-card";
126
127                 simple-audio-card,name = "nattis-tfa9879";
128                 simple-audio-card,format = "i2s";
129                 simple-audio-card,bitclock-master = <&cpu_dai>;
130                 simple-audio-card,frame-master = <&cpu_dai>;
131                 simple-audio-card,widgets = "Line", "Line Out Jack";
132                 simple-audio-card,routing = "Line Out Jack", "LINEOUT";
133
134                 cpu_dai: simple-audio-card,cpu {
135                         sound-dai = <&ssc0>;
136                 };
137
138                 simple-audio-card,codec {
139                         sound-dai = <&amp>;
140                 };
141         };
142 };
143
144 &pinctrl {
145         nattis {
146                 pinctrl_usba_vbus: usba_vbus {
147                         atmel,pins = <AT91_PIOD 28 AT91_PERIPH_GPIO
148                                       AT91_PINCTRL_DEGLITCH>;
149                 };
150
151                 pinctrl_mmc0_cd: mmc0_cd {
152                         atmel,pins = <AT91_PIOD  5 AT91_PERIPH_GPIO
153                                       AT91_PINCTRL_PULL_UP_DEGLITCH>;
154                 };
155
156                 pinctrl_lvds_prlud0: lvds_prlud0 {
157                         atmel,pins = <AT91_PIOA 21 AT91_PERIPH_GPIO
158                                       (AT91_PINCTRL_OUTPUT |
159                                        AT91_PINCTRL_OUTPUT_VAL(0))>;
160                 };
161
162                 pinctrl_lvds_hipow0: lvds_hipow0 {
163                         atmel,pins = <AT91_PIOA 23 AT91_PERIPH_GPIO
164                                       (AT91_PINCTRL_OUTPUT |
165                                        AT91_PINCTRL_OUTPUT_VAL(0))>;
166                 };
167         };
168 };
169
170 &watchdog {
171         status = "okay";
172 };
173
174 &i2c0 {
175         status = "okay";
176
177         clock-frequency = <100000>;
178
179         temp@18 {
180                 compatible = "nxp,se97b", "jedec,jc-42.4-temp";
181                 reg = <0x18>;
182                 smbus-timeout-disable;
183         };
184
185         eeprom@50 {
186                 compatible = "nxp,se97b", "atmel,24c02";
187                 reg = <0x50>;
188                 pagesize = <16>;
189         };
190
191         amp: amplifier@6c {
192                  compatible = "nxp,tfa9879";
193                  reg = <0x6c>;
194                  #sound-dai-cells = <0>;
195         };
196 };
197
198 &ssc0 {
199         status = "okay";
200
201         atmel,clk-from-rk-pin;
202         #sound-dai-cells = <0>;
203 };
204
205 &hlcdc {
206         status = "okay";
207
208         hlcdc-display-controller {
209                 pinctrl-names = "default";
210                 pinctrl-0 = <&pinctrl_lcd_base &pinctrl_lcd_rgb565>;
211
212                 port@0 {
213                         hlcdc_output: endpoint {
214                                 remote-endpoint = <&lvds_encoder_input>;
215                                 bus-width = <16>;
216                         };
217                 };
218         };
219 };
220
221 &mmc0 {
222         status = "okay";
223
224         pinctrl-0 = <&pinctrl_mmc0_clk_cmd_dat0
225                      &pinctrl_mmc0_dat1_3
226                      &pinctrl_mmc0_cd>;
227
228         slot@0 {
229                 reg = <0>;
230                 bus-width = <4>;
231                 cd-gpios = <&pioD 5 GPIO_ACTIVE_HIGH>;
232                 cd-inverted;
233         };
234 };
235
236 &usart0 {
237         status = "okay";
238
239         pinctrl-names = "default";
240         pinctrl-0 = <&pinctrl_usart0>;
241         atmel,use-dma-rx;
242 };
243
244 &nand {
245         partitions {
246                 compatible = "fixed-partitions";
247                 #address-cells = <1>;
248                 #size-cells = <1>;
249
250                 at91bootstrap@0 {
251                         label = "at91bootstrap";
252                         reg = <0x0 0x40000>;
253                 };
254
255                 barebox@40000 {
256                         label = "barebox";
257                         reg = <0x40000 0x60000>;
258                 };
259
260                 bareboxenv@c0000 {
261                         label = "bareboxenv";
262                         reg = <0xc0000 0x40000>;
263                 };
264
265                 bareboxenv2@100000 {
266                         label = "bareboxenv2";
267                         reg = <0x100000 0x40000>;
268                 };
269
270                 oftree@180000 {
271                         label = "oftree";
272                         reg = <0x180000 0x20000>;
273                 };
274
275                 kernel@200000 {
276                         label = "kernel";
277                         reg = <0x200000 0x500000>;
278                 };
279
280                 rootfs@800000 {
281                         label = "rootfs";
282                         reg = <0x800000 0x1f800000>;
283                 };
284         };
285 };
286
287 &dbgu {
288         status = "okay";
289
290         atmel,use-dma-rx;
291 };
292
293 &usb0 {
294         status = "okay";
295
296         atmel,vbus-gpio = <&pioD 28 GPIO_ACTIVE_HIGH>;
297         pinctrl-names = "default";
298         pinctrl-0 = <&pinctrl_usba_vbus>;
299 };