1*724ba675SRob Herring// SPDX-License-Identifier: GPL-2.0 2*724ba675SRob Herring/* 3*724ba675SRob Herring * Copyright (C) 2014 Claudio Leite <leitec@staticky.com> 4*724ba675SRob Herring * 5*724ba675SRob Herring */ 6*724ba675SRob Herring 7*724ba675SRob Herring/dts-v1/; 8*724ba675SRob Herring 9*724ba675SRob Herring#include "kirkwood.dtsi" 10*724ba675SRob Herring#include "kirkwood-6281.dtsi" 11*724ba675SRob Herring 12*724ba675SRob Herring/ { 13*724ba675SRob Herring model = "D-Link DIR-665"; 14*724ba675SRob Herring compatible = "dlink,dir-665", "marvell,kirkwood-88f6281", "marvell,kirkwood"; 15*724ba675SRob Herring 16*724ba675SRob Herring memory { 17*724ba675SRob Herring device_type = "memory"; 18*724ba675SRob Herring reg = <0x00000000 0x8000000>; /* 128 MB */ 19*724ba675SRob Herring }; 20*724ba675SRob Herring 21*724ba675SRob Herring chosen { 22*724ba675SRob Herring bootargs = "console=ttyS0,115200n8 earlyprintk"; 23*724ba675SRob Herring stdout-path = &uart0; 24*724ba675SRob Herring }; 25*724ba675SRob Herring 26*724ba675SRob Herring ocp@f1000000 { 27*724ba675SRob Herring pinctrl: pin-controller@10000 { 28*724ba675SRob Herring pinctrl-0 =< &pmx_led_usb 29*724ba675SRob Herring &pmx_led_internet_blue 30*724ba675SRob Herring &pmx_led_internet_amber 31*724ba675SRob Herring &pmx_led_5g &pmx_led_status_blue 32*724ba675SRob Herring &pmx_led_wps &pmx_led_status_amber 33*724ba675SRob Herring &pmx_led_24g 34*724ba675SRob Herring &pmx_btn_restart &pmx_btn_wps>; 35*724ba675SRob Herring pinctrl-names = "default"; 36*724ba675SRob Herring 37*724ba675SRob Herring pmx_led_usb: pmx-led-usb { 38*724ba675SRob Herring marvell,pins = "mpp12"; 39*724ba675SRob Herring marvell,function = "gpio"; 40*724ba675SRob Herring }; 41*724ba675SRob Herring pmx_led_internet_blue: pmx-led-internet-blue { 42*724ba675SRob Herring marvell,pins = "mpp42"; 43*724ba675SRob Herring marvell,function = "gpio"; 44*724ba675SRob Herring }; 45*724ba675SRob Herring pmx_led_internet_amber: pmx-led-internet-amber { 46*724ba675SRob Herring marvell,pins = "mpp43"; 47*724ba675SRob Herring marvell,function = "gpio"; 48*724ba675SRob Herring }; 49*724ba675SRob Herring pmx_led_5g: pmx-led-5g { 50*724ba675SRob Herring marvell,pins = "mpp44"; 51*724ba675SRob Herring marvell,function = "gpio"; 52*724ba675SRob Herring }; 53*724ba675SRob Herring pmx_led_status_blue: pmx-led-status-blue { 54*724ba675SRob Herring marvell,pins = "mpp45"; 55*724ba675SRob Herring marvell,function = "gpio"; 56*724ba675SRob Herring }; 57*724ba675SRob Herring pmx_led_wps: pmx-led-wps { 58*724ba675SRob Herring marvell,pins = "mpp47"; 59*724ba675SRob Herring marvell,function = "gpio"; 60*724ba675SRob Herring }; 61*724ba675SRob Herring pmx_led_status_amber: pmx-led-status-amber { 62*724ba675SRob Herring marvell,pins = "mpp48"; 63*724ba675SRob Herring marvell,function = "gpio"; 64*724ba675SRob Herring }; 65*724ba675SRob Herring pmx_led_24g: pmx-led-24g { 66*724ba675SRob Herring marvell,pins = "mpp49"; 67*724ba675SRob Herring marvell,function = "gpio"; 68*724ba675SRob Herring }; 69*724ba675SRob Herring pmx_btn_restart: pmx-btn-restart { 70*724ba675SRob Herring marvell,pins = "mpp28"; 71*724ba675SRob Herring marvell,function = "gpio"; 72*724ba675SRob Herring }; 73*724ba675SRob Herring pmx_btn_wps: pmx-btn-wps { 74*724ba675SRob Herring marvell,pins = "mpp46"; 75*724ba675SRob Herring marvell,function = "gpio"; 76*724ba675SRob Herring }; 77*724ba675SRob Herring }; 78*724ba675SRob Herring 79*724ba675SRob Herring spi@10600 { 80*724ba675SRob Herring status = "okay"; 81*724ba675SRob Herring flash@0 { 82*724ba675SRob Herring #address-cells = <1>; 83*724ba675SRob Herring #size-cells = <1>; 84*724ba675SRob Herring compatible = "mxicy,mx25l12805d", "jedec,spi-nor"; 85*724ba675SRob Herring spi-max-frequency = <50000000>; 86*724ba675SRob Herring reg = <0>; 87*724ba675SRob Herring 88*724ba675SRob Herring partition@0 { 89*724ba675SRob Herring label = "uboot"; 90*724ba675SRob Herring reg = <0x0 0x30000>; 91*724ba675SRob Herring read-only; 92*724ba675SRob Herring }; 93*724ba675SRob Herring 94*724ba675SRob Herring partition@30000 { 95*724ba675SRob Herring label = "nvram"; 96*724ba675SRob Herring reg = <0x30000 0x10000>; 97*724ba675SRob Herring read-only; 98*724ba675SRob Herring }; 99*724ba675SRob Herring 100*724ba675SRob Herring partition@40000 { 101*724ba675SRob Herring label = "kernel"; 102*724ba675SRob Herring reg = <0x40000 0x180000>; 103*724ba675SRob Herring }; 104*724ba675SRob Herring 105*724ba675SRob Herring partition@1c0000 { 106*724ba675SRob Herring label = "rootfs"; 107*724ba675SRob Herring reg = <0x1c0000 0xe00000>; 108*724ba675SRob Herring }; 109*724ba675SRob Herring 110*724ba675SRob Herring cal_data: partition@fc0000 { 111*724ba675SRob Herring label = "cal_data"; 112*724ba675SRob Herring reg = <0xfc0000 0x10000>; 113*724ba675SRob Herring read-only; 114*724ba675SRob Herring }; 115*724ba675SRob Herring 116*724ba675SRob Herring partition@fd0000 { 117*724ba675SRob Herring label = "lang_pack"; 118*724ba675SRob Herring reg = <0xfd0000 0x30000>; 119*724ba675SRob Herring read-only; 120*724ba675SRob Herring }; 121*724ba675SRob Herring }; 122*724ba675SRob Herring }; 123*724ba675SRob Herring 124*724ba675SRob Herring serial@12000 { 125*724ba675SRob Herring status = "okay"; 126*724ba675SRob Herring }; 127*724ba675SRob Herring 128*724ba675SRob Herring i2c@11000 { 129*724ba675SRob Herring status = "okay"; 130*724ba675SRob Herring }; 131*724ba675SRob Herring 132*724ba675SRob Herring ehci@50000 { 133*724ba675SRob Herring status = "okay"; 134*724ba675SRob Herring }; 135*724ba675SRob Herring }; 136*724ba675SRob Herring 137*724ba675SRob Herring gpio-leds { 138*724ba675SRob Herring compatible = "gpio-leds"; 139*724ba675SRob Herring 140*724ba675SRob Herring blue-usb { 141*724ba675SRob Herring label = "dir665:blue:usb"; 142*724ba675SRob Herring gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>; 143*724ba675SRob Herring }; 144*724ba675SRob Herring blue-internet { 145*724ba675SRob Herring /* Can only be turned on if the Internet 146*724ba675SRob Herring * Ethernet port has Link 147*724ba675SRob Herring */ 148*724ba675SRob Herring label = "dir665:blue:internet"; 149*724ba675SRob Herring gpios = <&gpio1 10 GPIO_ACTIVE_LOW>; 150*724ba675SRob Herring }; 151*724ba675SRob Herring amber-internet { 152*724ba675SRob Herring label = "dir665:amber:internet"; 153*724ba675SRob Herring gpios = <&gpio1 11 GPIO_ACTIVE_HIGH>; 154*724ba675SRob Herring }; 155*724ba675SRob Herring blue-wifi5g { 156*724ba675SRob Herring label = "dir665:blue:5g"; 157*724ba675SRob Herring gpios = <&gpio1 12 GPIO_ACTIVE_LOW>; 158*724ba675SRob Herring }; 159*724ba675SRob Herring blue-status { 160*724ba675SRob Herring label = "dir665:blue:status"; 161*724ba675SRob Herring gpios = <&gpio1 13 GPIO_ACTIVE_HIGH>; 162*724ba675SRob Herring }; 163*724ba675SRob Herring blue-wps { 164*724ba675SRob Herring label = "dir665:blue:wps"; 165*724ba675SRob Herring gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>; 166*724ba675SRob Herring }; 167*724ba675SRob Herring amber-status { 168*724ba675SRob Herring label = "dir665:amber:status"; 169*724ba675SRob Herring gpios = <&gpio1 16 GPIO_ACTIVE_HIGH>; 170*724ba675SRob Herring }; 171*724ba675SRob Herring blue-24g { 172*724ba675SRob Herring label = "dir665:blue:24g"; 173*724ba675SRob Herring gpios = <&gpio1 17 GPIO_ACTIVE_LOW>; 174*724ba675SRob Herring }; 175*724ba675SRob Herring }; 176*724ba675SRob Herring 177*724ba675SRob Herring gpio-keys { 178*724ba675SRob Herring compatible = "gpio-keys"; 179*724ba675SRob Herring #address-cells = <1>; 180*724ba675SRob Herring #size-cells = <0>; 181*724ba675SRob Herring 182*724ba675SRob Herring reset { 183*724ba675SRob Herring label = "reset"; 184*724ba675SRob Herring linux,code = <KEY_RESTART>; 185*724ba675SRob Herring gpios = <&gpio0 28 GPIO_ACTIVE_LOW>; 186*724ba675SRob Herring }; 187*724ba675SRob Herring wps { 188*724ba675SRob Herring label = "wps"; 189*724ba675SRob Herring linux,code = <KEY_WPS_BUTTON>; 190*724ba675SRob Herring gpios = <&gpio1 14 GPIO_ACTIVE_LOW>; 191*724ba675SRob Herring }; 192*724ba675SRob Herring }; 193*724ba675SRob Herring}; 194*724ba675SRob Herring 195*724ba675SRob Herring&mdio { 196*724ba675SRob Herring status = "okay"; 197*724ba675SRob Herring 198*724ba675SRob Herring switch@0 { 199*724ba675SRob Herring compatible = "marvell,mv88e6085"; 200*724ba675SRob Herring #address-cells = <1>; 201*724ba675SRob Herring #size-cells = <0>; 202*724ba675SRob Herring reg = <0>; 203*724ba675SRob Herring 204*724ba675SRob Herring ports { 205*724ba675SRob Herring #address-cells = <1>; 206*724ba675SRob Herring #size-cells = <0>; 207*724ba675SRob Herring 208*724ba675SRob Herring port@0 { 209*724ba675SRob Herring reg = <0>; 210*724ba675SRob Herring label = "lan4"; 211*724ba675SRob Herring }; 212*724ba675SRob Herring 213*724ba675SRob Herring port@1 { 214*724ba675SRob Herring reg = <1>; 215*724ba675SRob Herring label = "lan3"; 216*724ba675SRob Herring }; 217*724ba675SRob Herring 218*724ba675SRob Herring port@2 { 219*724ba675SRob Herring reg = <2>; 220*724ba675SRob Herring label = "lan2"; 221*724ba675SRob Herring }; 222*724ba675SRob Herring 223*724ba675SRob Herring port@3 { 224*724ba675SRob Herring reg = <3>; 225*724ba675SRob Herring label = "lan1"; 226*724ba675SRob Herring }; 227*724ba675SRob Herring 228*724ba675SRob Herring port@4 { 229*724ba675SRob Herring reg = <4>; 230*724ba675SRob Herring label = "wan"; 231*724ba675SRob Herring }; 232*724ba675SRob Herring 233*724ba675SRob Herring port@6 { 234*724ba675SRob Herring reg = <6>; 235*724ba675SRob Herring phy-mode = "rgmii-id"; 236*724ba675SRob Herring ethernet = <ð0port>; 237*724ba675SRob Herring fixed-link { 238*724ba675SRob Herring speed = <1000>; 239*724ba675SRob Herring full-duplex; 240*724ba675SRob Herring }; 241*724ba675SRob Herring }; 242*724ba675SRob Herring }; 243*724ba675SRob Herring }; 244*724ba675SRob Herring}; 245*724ba675SRob Herring 246*724ba675SRob Herring/* eth0 is connected to a Marvell 88E6171 switch, without a PHY. So set 247*724ba675SRob Herring * fixed speed and duplex. */ 248*724ba675SRob Herringð0 { 249*724ba675SRob Herring status = "okay"; 250*724ba675SRob Herring 251*724ba675SRob Herring ethernet0-port@0 { 252*724ba675SRob Herring speed = <1000>; 253*724ba675SRob Herring duplex = <1>; 254*724ba675SRob Herring phy-mode = "rgmii"; 255*724ba675SRob Herring }; 256*724ba675SRob Herring}; 257*724ba675SRob Herring 258*724ba675SRob Herring/* eth1 is connected to the switch as well. However DSA only supports a 259*724ba675SRob Herring * single CPU port. So leave this port disabled to avoid confusion. */ 260*724ba675SRob Herring 261*724ba675SRob Herringð1 { 262*724ba675SRob Herring status = "disabled"; 263*724ba675SRob Herring}; 264*724ba675SRob Herring 265*724ba675SRob Herring/* There is no battery on the boards, so the RTC does not keep time 266*724ba675SRob Herring * when there is no power, making it useless. */ 267*724ba675SRob Herring&rtc { 268*724ba675SRob Herring status = "disabled"; 269*724ba675SRob Herring}; 270*724ba675SRob Herring 271*724ba675SRob Herring&pciec { 272*724ba675SRob Herring status = "okay"; 273*724ba675SRob Herring}; 274*724ba675SRob Herring 275*724ba675SRob Herring&pcie0 { 276*724ba675SRob Herring status = "okay"; 277*724ba675SRob Herring}; 278