Wenyou Yang | 1e315a3 | 2017-04-18 13:49:38 +0800 | [diff] [blame] | 1 | /* |
| 2 | * at91sam9rlek.dts - Device Tree file for Atmel at91sam9rl reference board |
| 3 | * |
| 4 | * Copyright (C) 2014 Alexandre Belloni <alexandre.belloni@free-electrons.com> |
| 5 | * |
| 6 | * Licensed under GPLv2 only |
| 7 | */ |
| 8 | /dts-v1/; |
| 9 | #include "at91sam9rl.dtsi" |
| 10 | |
| 11 | / { |
| 12 | model = "Atmel at91sam9rlek"; |
| 13 | compatible = "atmel,at91sam9rlek", "atmel,at91sam9rl", "atmel,at91sam9"; |
| 14 | |
| 15 | chosen { |
| 16 | bootargs = "rootfstype=ubifs root=ubi0:rootfs ubi.mtd=5 rw"; |
| 17 | stdout-path = "serial0:115200n8"; |
| 18 | u-boot,dm-pre-reloc; |
| 19 | }; |
| 20 | |
| 21 | memory { |
| 22 | reg = <0x20000000 0x4000000>; |
| 23 | }; |
| 24 | |
| 25 | clocks { |
| 26 | slow_xtal { |
| 27 | clock-frequency = <32768>; |
| 28 | }; |
| 29 | |
| 30 | main_xtal { |
| 31 | clock-frequency = <12000000>; |
| 32 | }; |
| 33 | }; |
| 34 | |
| 35 | ahb { |
| 36 | fb0: fb@00500000 { |
| 37 | display = <&display0>; |
| 38 | status = "okay"; |
| 39 | |
| 40 | display0: display { |
| 41 | bits-per-pixel = <16>; |
| 42 | atmel,lcdcon-backlight; |
| 43 | atmel,dmacon = <0x1>; |
| 44 | atmel,lcdcon2 = <0x80008002>; |
| 45 | atmel,guard-time = <1>; |
| 46 | atmel,lcd-wiring-mode = "RGB"; |
| 47 | |
| 48 | display-timings { |
| 49 | native-mode = <&timing0>; |
| 50 | timing0: timing0 { |
| 51 | clock-frequency = <4965000>; |
| 52 | hactive = <240>; |
| 53 | vactive = <320>; |
| 54 | hback-porch = <1>; |
| 55 | hfront-porch = <33>; |
| 56 | vback-porch = <1>; |
| 57 | vfront-porch = <0>; |
| 58 | hsync-len = <5>; |
| 59 | vsync-len = <1>; |
| 60 | hsync-active = <1>; |
| 61 | vsync-active = <1>; |
| 62 | }; |
| 63 | }; |
| 64 | }; |
| 65 | }; |
| 66 | |
| 67 | nand0: nand@40000000 { |
| 68 | nand-bus-width = <8>; |
| 69 | nand-ecc-mode = "soft"; |
| 70 | nand-on-flash-bbt = <1>; |
| 71 | status = "okay"; |
| 72 | |
| 73 | at91bootstrap@0 { |
| 74 | label = "at91bootstrap"; |
| 75 | reg = <0x0 0x40000>; |
| 76 | }; |
| 77 | |
| 78 | bootloader@40000 { |
| 79 | label = "bootloader"; |
| 80 | reg = <0x40000 0x80000>; |
| 81 | }; |
| 82 | |
| 83 | bootloaderenv@c0000 { |
| 84 | label = "bootloader env"; |
| 85 | reg = <0xc0000 0xc0000>; |
| 86 | }; |
| 87 | |
| 88 | dtb@180000 { |
| 89 | label = "device tree"; |
| 90 | reg = <0x180000 0x80000>; |
| 91 | }; |
| 92 | |
| 93 | kernel@200000 { |
| 94 | label = "kernel"; |
| 95 | reg = <0x200000 0x600000>; |
| 96 | }; |
| 97 | |
| 98 | rootfs@800000 { |
| 99 | label = "rootfs"; |
| 100 | reg = <0x800000 0x0f800000>; |
| 101 | }; |
| 102 | }; |
| 103 | |
| 104 | apb { |
| 105 | mmc0: mmc@fffa4000 { |
| 106 | pinctrl-0 = < |
| 107 | &pinctrl_board_mmc0 |
| 108 | &pinctrl_mmc0_clk |
| 109 | &pinctrl_mmc0_slot0_cmd_dat0 |
| 110 | &pinctrl_mmc0_slot0_dat1_3>; |
| 111 | status = "okay"; |
| 112 | slot@0 { |
| 113 | reg = <0>; |
| 114 | bus-width = <4>; |
| 115 | cd-gpios = <&pioA 15 GPIO_ACTIVE_HIGH>; |
| 116 | }; |
| 117 | }; |
| 118 | |
| 119 | usart0: serial@fffb0000 { |
| 120 | pinctrl-0 = < |
| 121 | &pinctrl_usart0 |
| 122 | &pinctrl_usart0_rts |
| 123 | &pinctrl_usart0_cts>; |
| 124 | status = "okay"; |
| 125 | }; |
| 126 | |
| 127 | adc0: adc@fffd0000 { |
| 128 | pinctrl-names = "default"; |
| 129 | pinctrl-0 = < |
| 130 | &pinctrl_adc0_ad0 |
| 131 | &pinctrl_adc0_ad1 |
| 132 | &pinctrl_adc0_ad2 |
| 133 | &pinctrl_adc0_ad3 |
| 134 | &pinctrl_adc0_ad4 |
| 135 | &pinctrl_adc0_ad5 |
| 136 | &pinctrl_adc0_adtrg>; |
| 137 | atmel,adc-ts-wires = <4>; |
| 138 | status = "okay"; |
| 139 | }; |
| 140 | |
| 141 | usb0: gadget@fffd4000 { |
| 142 | atmel,vbus-gpio = <&pioA 8 GPIO_ACTIVE_HIGH>; |
| 143 | status = "okay"; |
| 144 | }; |
| 145 | |
| 146 | spi0: spi@fffcc000 { |
| 147 | status = "okay"; |
| 148 | cs-gpios = <&pioA 28 0>, <0>, <0>, <0>; |
| 149 | mtd_dataflash@0 { |
| 150 | compatible = "atmel,at45", "atmel,dataflash"; |
| 151 | spi-max-frequency = <15000000>; |
| 152 | reg = <0>; |
| 153 | }; |
| 154 | }; |
| 155 | |
| 156 | pwm0: pwm@fffc8000 { |
| 157 | status = "okay"; |
| 158 | |
| 159 | pinctrl-names = "default"; |
| 160 | pinctrl-0 = <&pinctrl_pwm0_pwm1_2>, |
| 161 | <&pinctrl_pwm0_pwm2_2>; |
| 162 | }; |
| 163 | |
| 164 | dbgu: serial@fffff200 { |
| 165 | u-boot,dm-pre-reloc; |
| 166 | status = "okay"; |
| 167 | }; |
| 168 | |
| 169 | pinctrl@fffff400 { |
| 170 | mmc0 { |
| 171 | pinctrl_board_mmc0: mmc0-board { |
| 172 | atmel,pins = |
| 173 | <AT91_PIOA 15 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>; |
| 174 | }; |
| 175 | }; |
| 176 | }; |
| 177 | |
| 178 | watchdog@fffffd40 { |
| 179 | status = "okay"; |
| 180 | }; |
| 181 | |
| 182 | rtc@fffffe00 { |
| 183 | status = "okay"; |
| 184 | }; |
| 185 | }; |
| 186 | }; |
| 187 | |
| 188 | pwmleds { |
| 189 | compatible = "pwm-leds"; |
| 190 | |
| 191 | ds1 { |
| 192 | label = "ds1"; |
| 193 | pwms = <&pwm0 1 5000 PWM_POLARITY_INVERTED>; |
| 194 | max-brightness = <255>; |
| 195 | }; |
| 196 | |
| 197 | ds2 { |
| 198 | label = "ds2"; |
| 199 | pwms = <&pwm0 2 5000 PWM_POLARITY_INVERTED>; |
| 200 | max-brightness = <255>; |
| 201 | }; |
| 202 | }; |
| 203 | |
| 204 | leds { |
| 205 | compatible = "gpio-leds"; |
| 206 | |
| 207 | ds3 { |
| 208 | label = "ds3"; |
| 209 | gpios = <&pioD 14 GPIO_ACTIVE_HIGH>; |
| 210 | linux,default-trigger = "heartbeat"; |
| 211 | }; |
| 212 | }; |
| 213 | |
| 214 | gpio_keys { |
| 215 | compatible = "gpio-keys"; |
| 216 | |
| 217 | right_click { |
| 218 | label = "right_click"; |
| 219 | gpios = <&pioB 0 GPIO_ACTIVE_LOW>; |
| 220 | linux,code = <273>; |
| 221 | wakeup-source; |
| 222 | }; |
| 223 | |
| 224 | left_click { |
| 225 | label = "left_click"; |
| 226 | gpios = <&pioB 1 GPIO_ACTIVE_LOW>; |
| 227 | linux,code = <272>; |
| 228 | wakeup-source; |
| 229 | }; |
| 230 | }; |
| 231 | |
| 232 | i2c-gpio-0 { |
| 233 | status = "okay"; |
| 234 | }; |
| 235 | |
| 236 | i2c-gpio-1 { |
| 237 | status = "okay"; |
| 238 | }; |
| 239 | }; |