1/* 2 * kirkwood-viper.dts - Device Tree file for Linksys viper (E4200v2 / EA4500) 3 * 4 * (c) 2013 Jonas Gorski <jogo@openwrt.org> 5 * (c) 2013 Deutsche Telekom Innovation Laboratories 6 * (c) 2014 Luka Perkov <luka@openwrt.org> 7 * (c) 2014 Randy C. Will <randall.will@gmail.com> 8 * 9 * This file is licensed under the terms of the GNU General Public 10 * License version 2. This program is licensed "as is" without any 11 * warranty of any kind, whether express or implied. 12 */ 13 14/dts-v1/; 15 16#include "kirkwood.dtsi" 17#include "kirkwood-6282.dtsi" 18 19/ { 20 model = "Linksys Viper (E4200v2 / EA4500)"; 21 compatible = "linksys,viper", "marvell,kirkwood-88f6282", "marvell,kirkwood"; 22 23 memory { 24 device_type = "memory"; 25 reg = <0x00000000 0x8000000>; 26 }; 27 28 aliases { 29 serial0 = &uart0; 30 }; 31 32 chosen { 33 stdout-path = "serial0:115200n8"; 34 }; 35 36 gpio_keys { 37 compatible = "gpio-keys"; 38 #address-cells = <1>; 39 #size-cells = <0>; 40 pinctrl-0 = < &pmx_btn_wps &pmx_btn_reset >; 41 pinctrl-names = "default"; 42 43 wps { 44 label = "WPS Button"; 45 linux,code = <KEY_WPS_BUTTON>; 46 gpios = <&gpio1 15 GPIO_ACTIVE_LOW>; 47 }; 48 49 reset { 50 label = "Reset Button"; 51 linux,code = <KEY_RESTART>; 52 gpios = <&gpio1 16 GPIO_ACTIVE_LOW>; 53 }; 54 }; 55 56 gpio-leds { 57 compatible = "gpio-leds"; 58 pinctrl-0 = < &pmx_led_white_health &pmx_led_white_pulse >; 59 pinctrl-names = "default"; 60 61 white-health { 62 label = "viper:white:health"; 63 gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>; 64 }; 65 66 white-pulse { 67 label = "viper:white:pulse"; 68 gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>; 69 }; 70 }; 71 72 dsa { 73 status = "disabled"; 74 75 compatible = "marvell,dsa"; 76 #address-cells = <2>; 77 #size-cells = <0>; 78 79 dsa,ethernet = <ð0port>; 80 dsa,mii-bus = <&mdio>; 81 82 switch@16,0 { 83 #address-cells = <1>; 84 #size-cells = <0>; 85 reg = <16 0>; /* MDIO address 16, switch 0 in tree */ 86 87 port@0 { 88 reg = <0>; 89 label = "ethernet1"; 90 }; 91 92 port@1 { 93 reg = <1>; 94 label = "ethernet2"; 95 }; 96 97 port@2 { 98 reg = <2>; 99 label = "ethernet3"; 100 }; 101 102 port@3 { 103 reg = <3>; 104 label = "ethernet4"; 105 }; 106 107 port@4 { 108 reg = <4>; 109 label = "internet"; 110 }; 111 112 port@5 { 113 reg = <5>; 114 label = "cpu"; 115 }; 116 }; 117 }; 118}; 119 120&pinctrl { 121 pmx_led_white_health: pmx-led-white-health { 122 marvell,pins = "mpp7"; 123 marvell,function = "gpo"; 124 }; 125 pmx_led_white_pulse: pmx-led-white-pulse { 126 marvell,pins = "mpp14"; 127 marvell,function = "gpio"; 128 }; 129 pmx_btn_wps: pmx-btn-wps { 130 marvell,pins = "mpp47"; 131 marvell,function = "gpio"; 132 }; 133 pmx_btn_reset: pmx-btn-reset { 134 marvell,pins = "mpp48"; 135 marvell,function = "gpio"; 136 }; 137}; 138 139&nand { 140 status = "okay"; 141 pinctrl-0 = <&pmx_nand>; 142 pinctrl-names = "default"; 143 144 partitions { 145 compatible = "fixed-partitions"; 146 #address-cells = <1>; 147 #size-cells = <1>; 148 149 partition@0 { 150 label = "u-boot"; 151 reg = <0x0 0x80000>; 152 read-only; 153 }; 154 155 partition@80000 { 156 label = "u_env"; 157 reg = <0x80000 0x20000>; 158 }; 159 160 partition@A0000 { 161 label = "s_env"; 162 reg = <0xA0000 0x20000>; 163 }; 164 165 partition@200000 { 166 label = "kernel"; 167 reg = <0x200000 0x2A0000>; 168 }; 169 170 partition@4A0000 { 171 label = "rootfs"; 172 reg = <0x4A0000 0x1760000>; 173 }; 174 175 partition@1C00000 { 176 label = "alt_kernel"; 177 reg = <0x1C00000 0x2A0000>; 178 }; 179 180 partition@1EA0000 { 181 label = "alt_rootfs"; 182 reg = <0x1EA0000 0x1760000>; 183 }; 184 185 partition@3600000 { 186 label = "syscfg"; 187 reg = <0x3600000 0x4A00000>; 188 }; 189 190 partition@C0000 { 191 label = "unused"; 192 reg = <0xC0000 0x140000>; 193 }; 194 195 }; 196}; 197 198&pciec { 199 status = "okay"; 200}; 201 202&pcie0 { 203 status = "okay"; 204}; 205 206&pcie1 { 207 status = "okay"; 208}; 209 210&mdio { 211 status = "okay"; 212 213 switch@10 { 214 compatible = "marvell,mv88e6085"; 215 #address-cells = <1>; 216 #size-cells = <0>; 217 reg = <16>; 218 219 ports { 220 #address-cells = <1>; 221 #size-cells = <0>; 222 223 port@0 { 224 reg = <0>; 225 label = "ethernet1"; 226 }; 227 228 port@1 { 229 reg = <1>; 230 label = "ethernet2"; 231 }; 232 233 port@2 { 234 reg = <2>; 235 label = "ethernet3"; 236 }; 237 238 port@3 { 239 reg = <3>; 240 label = "ethernet4"; 241 }; 242 243 port@4 { 244 reg = <4>; 245 label = "internet"; 246 }; 247 248 port@5 { 249 reg = <5>; 250 label = "cpu"; 251 ethernet = <ð0port>; 252 fixed-link { 253 speed = <1000>; 254 full-duplex; 255 }; 256 }; 257 }; 258 }; 259}; 260 261&uart0 { 262 status = "okay"; 263}; 264 265/* eth0 is connected to a Marvell 88E6171 switch, without a PHY. So set 266 * fixed speed and duplex. 267 */ 268ð0 { 269 status = "okay"; 270 ethernet0-port@0 { 271 speed = <1000>; 272 duplex = <1>; 273 }; 274}; 275 276/* eth1 is connected to the switch at port 6. However DSA only supports a 277 * single CPU port. So leave this port disabled to avoid confusion. 278 */ 279ð1 { 280 status = "disabled"; 281}; 282 283/* There is no battery on the board, so the RTC does not keep 284 * time when there is no power, making it useless. 285 */ 286&rtc { 287 status = "disabled"; 288}; 289 290