1/* 2 * at91-sama5d4ek.dts - Device Tree file for SAMA5D4 Evaluation Kit 3 * 4 * Copyright (C) 2014 Atmel, 5 * 2014 Nicolas Ferre <nicolas.ferre@atmel.com> 6 * 7 * This file is dual-licensed: you can use it either under the terms 8 * of the GPL or the X11 license, at your option. Note that this dual 9 * licensing only applies to this file, and not this project as a 10 * whole. 11 * 12 * a) This file is free software; you can redistribute it and/or 13 * modify it under the terms of the GNU General Public License as 14 * published by the Free Software Foundation; either version 2 of the 15 * License, or (at your option) any later version. 16 * 17 * This file is distributed in the hope that it will be useful, 18 * but WITHOUT ANY WARRANTY; without even the implied warranty of 19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 * GNU General Public License for more details. 21 * 22 * Or, alternatively, 23 * 24 * b) Permission is hereby granted, free of charge, to any person 25 * obtaining a copy of this software and associated documentation 26 * files (the "Software"), to deal in the Software without 27 * restriction, including without limitation the rights to use, 28 * copy, modify, merge, publish, distribute, sublicense, and/or 29 * sell copies of the Software, and to permit persons to whom the 30 * Software is furnished to do so, subject to the following 31 * conditions: 32 * 33 * The above copyright notice and this permission notice shall be 34 * included in all copies or substantial portions of the Software. 35 * 36 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 37 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 38 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 39 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 40 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 41 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 42 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 43 * OTHER DEALINGS IN THE SOFTWARE. 44 */ 45/dts-v1/; 46#include "sama5d4.dtsi" 47 48/ { 49 model = "Atmel SAMA5D4-EK"; 50 compatible = "atmel,sama5d4ek", "atmel,sama5d4", "atmel,sama5"; 51 52 aliases { 53 spi0 = &spi0; 54 }; 55 56 chosen { 57 u-boot,dm-pre-reloc; 58 stdout-path = &usart3; 59 }; 60 61 62 memory { 63 reg = <0x20000000 0x20000000>; 64 }; 65 66 clocks { 67 slow_xtal { 68 clock-frequency = <32768>; 69 }; 70 71 main_xtal { 72 clock-frequency = <12000000>; 73 }; 74 }; 75 76 ahb { 77 apb { 78 hlcdc: hlcdc@f0000000 { 79 atmel,vl-bpix = <4>; 80 atmel,output-mode = <18>; 81 atmel,guard-time = <1>; 82 pinctrl-names = "default"; 83 pinctrl-0 = <&pinctrl_lcd_base &pinctrl_lcd_pwm &pinctrl_lcd_rgb666>; 84 status = "okay"; 85 u-boot,dm-pre-reloc; 86 87 display-timings { 88 u-boot,dm-pre-reloc; 89 800x480 { 90 clock-frequency = <33260000>; 91 hactive = <800>; 92 vactive = <480>; 93 hsync-len = <5>; 94 hfront-porch = <128>; 95 hback-porch = <0>; 96 vfront-porch = <23>; 97 vback-porch = <22>; 98 vsync-len = <5>; 99 u-boot,dm-pre-reloc; 100 }; 101 }; 102 }; 103 104 adc0: adc@fc034000 { 105 pinctrl-names = "default"; 106 pinctrl-0 = < 107 /* external trigger conflicts with USBA_VBUS */ 108 &pinctrl_adc0_ad0 109 &pinctrl_adc0_ad1 110 &pinctrl_adc0_ad2 111 &pinctrl_adc0_ad3 112 &pinctrl_adc0_ad4 113 >; 114 /* The vref depends on JP22 of EK. If connect 1-2 then use 3.3V. connect 2-3 use 3.0V */ 115 atmel,adc-vref = <3300>; 116 /*atmel,adc-ts-wires = <4>;*/ /* Set up ADC touch screen */ 117 status = "okay"; /* Enable ADC IIO support */ 118 }; 119 120 mmc0: mmc@f8000000 { 121 pinctrl-names = "default"; 122 pinctrl-0 = <&pinctrl_mmc0_clk_cmd_dat0 &pinctrl_mmc0_dat1_3 &pinctrl_mmc0_cd>; 123 slot@0 { 124 reg = <0>; 125 bus-width = <4>; 126 cd-gpios = <&pioE 5 0>; 127 }; 128 }; 129 130 ssc0: ssc@f8008000 { 131 status = "okay"; 132 }; 133 134 spi0: spi@f8010000 { 135 u-boot,dm-pre-reloc; 136 cs-gpios = <&pioC 3 0>, <0>, <0>, <0>; 137 status = "okay"; 138 spi_flash@0 { 139 u-boot,dm-pre-reloc; 140 compatible = "spi-flash"; 141 spi-max-frequency = <50000000>; 142 reg = <0>; 143 }; 144 }; 145 146 i2c0: i2c@f8014000 { 147 status = "okay"; 148 149 wm8904: codec@1a { 150 compatible = "wlf,wm8904"; 151 reg = <0x1a>; 152 clocks = <&pck2>; 153 clock-names = "mclk"; 154 }; 155 156 qt1070:keyboard@1b { 157 compatible = "qt1070"; 158 reg = <0x1b>; 159 interrupt-parent = <&pioE>; 160 interrupts = <25 0x0>; 161 pinctrl-names = "default"; 162 pinctrl-0 = <&pinctrl_qt1070_irq>; 163 wakeup-source; 164 }; 165 166 atmel_mxt_ts@4c { 167 compatible = "atmel,atmel_mxt_ts"; 168 reg = <0x4c>; 169 interrupt-parent = <&pioE>; 170 interrupts = <24 0x0>; 171 pinctrl-names = "default"; 172 pinctrl-0 = <&pinctrl_mxt_ts>; 173 }; 174 }; 175 176 macb0: ethernet@f8020000 { 177 pinctrl-0 = <&pinctrl_macb0_rmii &pinctrl_macb0_phy_irq>; 178 phy-mode = "rmii"; 179 status = "okay"; 180 181 ethernet-phy@1 { 182 reg = <0x1>; 183 interrupt-parent = <&pioE>; 184 interrupts = <1 IRQ_TYPE_LEVEL_LOW>; 185 }; 186 }; 187 188 mmc1: mmc@fc000000 { 189 u-boot,dm-pre-reloc; 190 pinctrl-names = "default"; 191 pinctrl-0 = <&pinctrl_mmc1_clk_cmd_dat0 &pinctrl_mmc1_dat1_3 &pinctrl_mmc1_cd>; 192 status = "okay"; 193 slot@0 { 194 reg = <0>; 195 bus-width = <4>; 196 cd-gpios = <&pioE 6 0>; 197 }; 198 }; 199 200 usart2: serial@fc008000 { 201 status = "okay"; 202 }; 203 204 usart3: serial@fc00c000 { 205 u-boot,dm-pre-reloc; 206 status = "okay"; 207 }; 208 209 usart4: serial@fc010000 { 210 status = "okay"; 211 }; 212 213 watchdog@fc068640 { 214 status = "okay"; 215 }; 216 217 pinctrl@fc06a000 { 218 board { 219 u-boot,dm-pre-reloc; 220 pinctrl_macb0_phy_irq: macb0_phy_irq { 221 atmel,pins = 222 <AT91_PIOE 1 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>; 223 }; 224 pinctrl_mmc0_cd: mmc0_cd { 225 atmel,pins = 226 <AT91_PIOE 5 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>; 227 }; 228 pinctrl_mmc1_cd: mmc1_cd { 229 u-boot,dm-pre-reloc; 230 atmel,pins = 231 <AT91_PIOE 6 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>; 232 }; 233 pinctrl_pck2_as_audio_mck: pck2_as_audio_mck { 234 atmel,pins = 235 <AT91_PIOB 10 AT91_PERIPH_B AT91_PINCTRL_NONE>; 236 }; 237 pinctrl_usba_vbus: usba_vbus { 238 atmel,pins = 239 <AT91_PIOE 31 AT91_PERIPH_GPIO AT91_PINCTRL_DEGLITCH>; 240 }; 241 pinctrl_key_gpio: key_gpio_0 { 242 atmel,pins = 243 <AT91_PIOE 13 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>; /* PE13 gpio */ 244 }; 245 pinctrl_qt1070_irq: qt1070_irq { 246 atmel,pins = 247 <AT91_PIOE 25 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>; 248 }; 249 pinctrl_mxt_ts: mxt_irq { 250 atmel,pins = 251 <AT91_PIOE 24 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>; 252 }; 253 }; 254 }; 255 }; 256 257 usb0: gadget@00400000 { 258 atmel,vbus-gpio = <&pioE 31 GPIO_ACTIVE_HIGH>; 259 pinctrl-names = "default"; 260 pinctrl-0 = <&pinctrl_usba_vbus>; 261 status = "okay"; 262 }; 263 264 usb1: ohci@00500000 { 265 num-ports = <3>; 266 atmel,vbus-gpio = <0 /* &pioE 10 GPIO_ACTIVE_LOW */ 267 &pioE 11 GPIO_ACTIVE_LOW 268 &pioE 12 GPIO_ACTIVE_LOW 269 >; 270 status = "okay"; 271 }; 272 273 usb2: ehci@00600000 { 274 status = "okay"; 275 }; 276 277 nand0: nand@80000000 { 278 nand-bus-width = <8>; 279 nand-ecc-mode = "hw"; 280 nand-on-flash-bbt; 281 atmel,has-pmecc; 282 status = "okay"; 283 284 at91bootstrap@0 { 285 label = "at91bootstrap"; 286 reg = <0x0 0x40000>; 287 }; 288 289 bootloader@40000 { 290 label = "bootloader"; 291 reg = <0x40000 0x80000>; 292 }; 293 294 bootloaderenv@c0000 { 295 label = "bootloader env"; 296 reg = <0xc0000 0xc0000>; 297 }; 298 299 dtb@180000 { 300 label = "device tree"; 301 reg = <0x180000 0x80000>; 302 }; 303 304 kernel@200000 { 305 label = "kernel"; 306 reg = <0x200000 0x600000>; 307 }; 308 309 rootfs@800000 { 310 label = "rootfs"; 311 reg = <0x800000 0x0f800000>; 312 }; 313 }; 314 }; 315 316 gpio_keys { 317 compatible = "gpio-keys"; 318 319 pinctrl-names = "default"; 320 pinctrl-0 = <&pinctrl_key_gpio>; 321 322 pb_user1 { 323 label = "pb_user1"; 324 gpios = <&pioE 13 GPIO_ACTIVE_HIGH>; 325 linux,code = <0x100>; 326 wakeup-source; 327 }; 328 }; 329 330 leds { 331 compatible = "gpio-leds"; 332 status = "okay"; 333 334 d8 { 335 label = "d8"; 336 /* PE28, conflicts with usart4 rts pin */ 337 gpios = <&pioE 28 GPIO_ACTIVE_LOW>; 338 }; 339 340 d9 { 341 label = "d9"; 342 gpios = <&pioE 9 GPIO_ACTIVE_HIGH>; 343 }; 344 345 d10 { 346 label = "d10"; 347 gpios = <&pioE 8 GPIO_ACTIVE_LOW>; 348 linux,default-trigger = "heartbeat"; 349 }; 350 }; 351 352 sound { 353 compatible = "atmel,asoc-wm8904"; 354 pinctrl-names = "default"; 355 pinctrl-0 = <&pinctrl_pck2_as_audio_mck>; 356 357 atmel,model = "wm8904 @ SAMA5D4EK"; 358 atmel,audio-routing = 359 "Headphone Jack", "HPOUTL", 360 "Headphone Jack", "HPOUTR", 361 "IN1L", "Line In Jack", 362 "IN1R", "Line In Jack"; 363 364 atmel,ssc-controller = <&ssc0>; 365 atmel,audio-codec = <&wm8904>; 366 }; 367}; 368