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