| Joachim Eastwood | 56bd377 | 2015-05-12 00:00:51 +0200 | [diff] [blame] | 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 |  | 
| Joachim Eastwood | 95dafb2 | 2015-04-02 05:55:32 +0200 | [diff] [blame] | 18 | #include "dt-bindings/input/input.h" | 
 | 19 | #include "dt-bindings/gpio/gpio.h" | 
 | 20 |  | 
| Joachim Eastwood | 56bd377 | 2015-05-12 00:00:51 +0200 | [diff] [blame] | 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 | 	}; | 
| Joachim Eastwood | bfd0b49 | 2015-04-02 05:54:29 +0200 | [diff] [blame] | 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 | 	}; | 
| Joachim Eastwood | 95dafb2 | 2015-04-02 05:55:32 +0200 | [diff] [blame] | 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 | 	}; | 
| Joachim Eastwood | 56bd377 | 2015-05-12 00:00:51 +0200 | [diff] [blame] | 88 | }; | 
 | 89 |  | 
| Joachim Eastwood | c97a63c | 2015-04-02 05:51:20 +0200 | [diff] [blame] | 90 | &pinctrl { | 
| Joachim Eastwood | 7de98f2 | 2015-04-02 05:56:57 +0200 | [diff] [blame] | 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 |  | 
| Joachim Eastwood | 95dafb2 | 2015-04-02 05:55:32 +0200 | [diff] [blame] | 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 |  | 
| Joachim Eastwood | bfd0b49 | 2015-04-02 05:54:29 +0200 | [diff] [blame] | 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 |  | 
| Joachim Eastwood | c97a63c | 2015-04-02 05:51:20 +0200 | [diff] [blame] | 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 | 	}; | 
| Joachim Eastwood | 930a43e | 2015-05-29 23:09:52 +0200 | [diff] [blame] | 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 | 	}; | 
| Joachim Eastwood | fd0cb23 | 2015-07-31 00:24:22 +0200 | [diff] [blame^] | 224 |  | 
 | 225 | 	usb0_pins: usb0-pins { | 
 | 226 | 		usb0_pwr_enable { | 
 | 227 | 			pins = "p2_3"; | 
 | 228 | 			function = "usb0"; | 
 | 229 | 		}; | 
 | 230 |  | 
 | 231 | 		usb0_pwr_fault { | 
 | 232 | 			pins = "p8_0"; | 
 | 233 | 			function = "usb0"; | 
 | 234 | 			bias-disable; | 
 | 235 | 			input-enable; | 
 | 236 | 		}; | 
 | 237 | 	}; | 
| Joachim Eastwood | c97a63c | 2015-04-02 05:51:20 +0200 | [diff] [blame] | 238 | }; | 
 | 239 |  | 
| Joachim Eastwood | 7de98f2 | 2015-04-02 05:56:57 +0200 | [diff] [blame] | 240 | &enet_tx_clk { | 
 | 241 | 	clock-frequency = <50000000>; | 
 | 242 | }; | 
 | 243 |  | 
 | 244 | &mac { | 
 | 245 | 	status = "okay"; | 
 | 246 | 	phy-mode = "rmii"; | 
 | 247 | 	pinctrl-names = "default"; | 
 | 248 | 	pinctrl-0 = <&enet_rmii_pins>; | 
 | 249 | }; | 
 | 250 |  | 
| Joachim Eastwood | bfd0b49 | 2015-04-02 05:54:29 +0200 | [diff] [blame] | 251 | &mmcsd { | 
 | 252 | 	status = "okay"; | 
 | 253 | 	bus-width = <4>; | 
 | 254 | 	vmmc-supply = <&vmmc>; | 
 | 255 | 	pinctrl-names = "default"; | 
 | 256 | 	pinctrl-0 = <&sdmmc_pins>; | 
 | 257 | }; | 
 | 258 |  | 
| Joachim Eastwood | 56bd377 | 2015-05-12 00:00:51 +0200 | [diff] [blame] | 259 | &uart0 { | 
 | 260 | 	status = "okay"; | 
| Joachim Eastwood | c97a63c | 2015-04-02 05:51:20 +0200 | [diff] [blame] | 261 | 	pinctrl-names = "default"; | 
 | 262 | 	pinctrl-0 = <&uart0_pins>; | 
| Joachim Eastwood | 56bd377 | 2015-05-12 00:00:51 +0200 | [diff] [blame] | 263 | }; | 
| Joachim Eastwood | 930a43e | 2015-05-29 23:09:52 +0200 | [diff] [blame] | 264 |  | 
 | 265 | &uart3 { | 
 | 266 | 	status = "okay"; | 
 | 267 | 	pinctrl-names = "default"; | 
 | 268 | 	pinctrl-0 = <&uart3_pins>; | 
 | 269 | }; | 
| Joachim Eastwood | fd0cb23 | 2015-07-31 00:24:22 +0200 | [diff] [blame^] | 270 |  | 
 | 271 | &usb0 { | 
 | 272 | 	status = "okay"; | 
 | 273 | 	pinctrl-names = "default"; | 
 | 274 | 	pinctrl-0 = <&usb0_pins>; | 
 | 275 | }; |