Merge tag 'qcom-dt-for-4.3' of git://codeaurora.org/quic/kernel/agross-msm into next/dt
[cascardo/linux.git] / arch / arm / boot / dts / lpc4357-ea4357-devkit.dts
1 /*
2  * Embedded Artist LPC4357 Developer's Kit
3  *
4  * Copyright 2015 Joachim Eastwood <manabian@gmail.com>
5  *
6  * This code is released using a dual license strategy: BSD/GPL
7  * You can choose the licence that better fits your requirements.
8  *
9  * Released under the terms of 3-clause BSD License
10  * Released under the terms of GNU General Public License Version 2.0
11  *
12  */
13 /dts-v1/;
14
15 #include "lpc18xx.dtsi"
16 #include "lpc4357.dtsi"
17
18 #include "dt-bindings/input/input.h"
19 #include "dt-bindings/gpio/gpio.h"
20
21 / {
22         model = "Embedded Artists' LPC4357 Developer's Kit";
23         compatible = "ea,lpc4357-developers-kit", "nxp,lpc4357", "nxp,lpc4350";
24
25         aliases {
26                 serial0 = &uart0;
27                 serial1 = &uart1;
28                 serial2 = &uart2;
29                 serial3 = &uart3;
30         };
31
32         chosen {
33                 stdout-path = &uart0;
34         };
35
36         memory {
37                 device_type = "memory";
38                 reg = <0x28000000 0x2000000>; /* 32 MB */
39         };
40
41         /* vmmc is controlled by sdmmc host internally */
42         vmmc: vmmc_fixed {
43                 compatible = "regulator-fixed";
44                 regulator-name = "vmmc-supply";
45                 regulator-min-microvolt = <3300000>;
46                 regulator-max-microvolt = <3300000>;
47         };
48
49         gpio_joystick {
50                 compatible = "gpio-keys-polled";
51                 pinctrl-names = "default";
52                 pinctrl-0 = <&gpio_joystick_pins>;
53                 #address-cells = <1>;
54                 #size-cells = <0>;
55                 poll-interval = <100>;
56                 autorepeat;
57
58                 button@0 {
59                         label = "joy_enter";
60                         linux,code = <KEY_ENTER>;
61                         gpios = <&gpio LPC_GPIO(4,8) GPIO_ACTIVE_LOW>;
62                 };
63
64                 button@1 {
65                         label = "joy_left";
66                         linux,code = <KEY_LEFT>;
67                         gpios = <&gpio LPC_GPIO(4,9) GPIO_ACTIVE_LOW>;
68                 };
69
70                 button@2 {
71                         label = "joy_up";
72                         linux,code = <KEY_UP>;
73                         gpios = <&gpio LPC_GPIO(4,10) GPIO_ACTIVE_LOW>;
74                 };
75
76                 button@3 {
77                         label = "joy_right";
78                         linux,code = <KEY_RIGHT>;
79                         gpios = <&gpio LPC_GPIO(4,12) GPIO_ACTIVE_LOW>;
80                 };
81
82                 button@4 {
83                         label = "joy_down";
84                         linux,code = <KEY_DOWN>;
85                         gpios = <&gpio LPC_GPIO(4,13) GPIO_ACTIVE_LOW>;
86                 };
87         };
88 };
89
90 &pinctrl {
91         enet_rmii_pins: enet-rmii-pins {
92                 enet_rmii_rxd_cfg {
93                         pins = "p1_15", "p0_0";
94                         function = "enet";
95                         slew-rate = <1>;
96                         bias-disable;
97                         input-enable;
98                         input-schmitt-disable;
99                 };
100
101                 enet_rmii_txd_cfg {
102                         pins = "p1_18", "p1_20";
103                         function = "enet";
104                         slew-rate = <1>;
105                         bias-disable;
106                         input-enable;
107                         input-schmitt-disable;
108                 };
109
110                 enet_rmii_rx_dv_cfg {
111                         pins = "p1_16";
112                         function = "enet";
113                         bias-disable;
114                         input-enable;
115                         input-schmitt-disable;
116                 };
117
118                 enet_rmii_tx_en_cfg {
119                         pins = "p0_1";
120                         function = "enet";
121                         bias-disable;
122                         input-enable;
123                         input-schmitt-disable;
124                 };
125
126                 enet_ref_clk_cfg {
127                         pins = "p1_19";
128                         function = "enet";
129                         slew-rate = <1>;
130                         bias-disable;
131                         input-enable;
132                         input-schmitt-disable;
133                 };
134
135                 enet_mdio_cfg {
136                         pins = "p1_17";
137                         function = "enet";
138                         bias-disable;
139                         input-enable;
140                         input-schmitt-disable;
141                 };
142
143                 enet_mdc_cfg {
144                         pins = "pc_1";
145                         function = "enet";
146                         slew-rate = <1>;
147                         bias-disable;
148                         input-enable;
149                         input-schmitt-disable;
150                 };
151         };
152
153         gpio_joystick_pins: gpio-joystick-pins {
154                 gpio_joystick_cfg {
155                         pins =  "p9_0", "p9_1", "pa_1", "pa_2", "pa_3";
156                         function = "gpio";
157                         input-enable;
158                         bias-disable;
159                 };
160         };
161
162         sdmmc_pins: sdmmc-pins {
163                 sdmmc_clk_cfg {
164                         pins = "pc_0";
165                         function = "sdmmc";
166                         slew-rate = <1>;
167                         bias-pull-down;
168                 };
169
170                 sdmmc_cmd_dat0_3_cfg {
171                         pins = "pc_4", "pc_5", "pc_6", "pc_7", "pc_10";
172                         function = "sdmmc";
173                         slew-rate = <1>;
174                         bias-disable;
175                         input-enable;
176                         input-schmitt-disable;
177                 };
178
179                 sdmmc_cd_cfg {
180                         pins = "pc_8";
181                         function = "sdmmc";
182                         bias-pull-down;
183                         input-enable;
184                 };
185
186                 sdmmc_pow_cfg {
187                         pins = "pc_9";
188                         function = "sdmmc";
189                         bias-pull-down;
190                 };
191         };
192
193         uart0_pins: uart0-pins {
194                 uart0_rx_cfg {
195                         pins = "pf_11";
196                         function = "uart0";
197                         input-schmitt-disable;
198                         bias-disable;
199                         input-enable;
200                 };
201
202                 uart0_tx_cfg {
203                         pins = "pf_10";
204                         function = "uart0";
205                         bias-pull-down;
206                 };
207         };
208
209         uart3_pins: uart3-pins {
210                 uart3_rx_cfg {
211                         pins = "p2_4";
212                         function = "uart3";
213                         input-schmitt-disable;
214                         bias-disable;
215                         input-enable;
216                 };
217
218                 uart3_tx_cfg {
219                         pins = "p9_3";
220                         function = "uart3";
221                         bias-pull-down;
222                 };
223         };
224 };
225
226 &enet_tx_clk {
227         clock-frequency = <50000000>;
228 };
229
230 &mac {
231         status = "okay";
232         phy-mode = "rmii";
233         pinctrl-names = "default";
234         pinctrl-0 = <&enet_rmii_pins>;
235 };
236
237 &mmcsd {
238         status = "okay";
239         bus-width = <4>;
240         vmmc-supply = <&vmmc>;
241         pinctrl-names = "default";
242         pinctrl-0 = <&sdmmc_pins>;
243 };
244
245 &uart0 {
246         status = "okay";
247         pinctrl-names = "default";
248         pinctrl-0 = <&uart0_pins>;
249 };
250
251 &uart3 {
252         status = "okay";
253         pinctrl-names = "default";
254         pinctrl-0 = <&uart3_pins>;
255 };