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