1724ba675SRob Herring// SPDX-License-Identifier: GPL-2.0 2724ba675SRob Herring/* 3724ba675SRob Herring * Copyright (C) 2014 Claudio Leite <leitec@staticky.com> 4724ba675SRob Herring * 5724ba675SRob Herring */ 6724ba675SRob Herring 7724ba675SRob Herring/dts-v1/; 8724ba675SRob Herring 9724ba675SRob Herring#include "kirkwood.dtsi" 10724ba675SRob Herring#include "kirkwood-6281.dtsi" 11724ba675SRob Herring 12724ba675SRob Herring/ { 13724ba675SRob Herring model = "D-Link DIR-665"; 14724ba675SRob Herring compatible = "dlink,dir-665", "marvell,kirkwood-88f6281", "marvell,kirkwood"; 15724ba675SRob Herring 16724ba675SRob Herring memory { 17724ba675SRob Herring device_type = "memory"; 18724ba675SRob Herring reg = <0x00000000 0x8000000>; /* 128 MB */ 19724ba675SRob Herring }; 20724ba675SRob Herring 21724ba675SRob Herring chosen { 22724ba675SRob Herring bootargs = "console=ttyS0,115200n8 earlyprintk"; 23724ba675SRob Herring stdout-path = &uart0; 24724ba675SRob Herring }; 25724ba675SRob Herring 26724ba675SRob Herring ocp@f1000000 { 27724ba675SRob Herring pinctrl: pin-controller@10000 { 28724ba675SRob Herring pinctrl-0 =< &pmx_led_usb 29724ba675SRob Herring &pmx_led_internet_blue 30724ba675SRob Herring &pmx_led_internet_amber 31724ba675SRob Herring &pmx_led_5g &pmx_led_status_blue 32724ba675SRob Herring &pmx_led_wps &pmx_led_status_amber 33724ba675SRob Herring &pmx_led_24g 34724ba675SRob Herring &pmx_btn_restart &pmx_btn_wps>; 35724ba675SRob Herring pinctrl-names = "default"; 36724ba675SRob Herring 37724ba675SRob Herring pmx_led_usb: pmx-led-usb { 38724ba675SRob Herring marvell,pins = "mpp12"; 39724ba675SRob Herring marvell,function = "gpio"; 40724ba675SRob Herring }; 41724ba675SRob Herring pmx_led_internet_blue: pmx-led-internet-blue { 42724ba675SRob Herring marvell,pins = "mpp42"; 43724ba675SRob Herring marvell,function = "gpio"; 44724ba675SRob Herring }; 45724ba675SRob Herring pmx_led_internet_amber: pmx-led-internet-amber { 46724ba675SRob Herring marvell,pins = "mpp43"; 47724ba675SRob Herring marvell,function = "gpio"; 48724ba675SRob Herring }; 49724ba675SRob Herring pmx_led_5g: pmx-led-5g { 50724ba675SRob Herring marvell,pins = "mpp44"; 51724ba675SRob Herring marvell,function = "gpio"; 52724ba675SRob Herring }; 53724ba675SRob Herring pmx_led_status_blue: pmx-led-status-blue { 54724ba675SRob Herring marvell,pins = "mpp45"; 55724ba675SRob Herring marvell,function = "gpio"; 56724ba675SRob Herring }; 57724ba675SRob Herring pmx_led_wps: pmx-led-wps { 58724ba675SRob Herring marvell,pins = "mpp47"; 59724ba675SRob Herring marvell,function = "gpio"; 60724ba675SRob Herring }; 61724ba675SRob Herring pmx_led_status_amber: pmx-led-status-amber { 62724ba675SRob Herring marvell,pins = "mpp48"; 63724ba675SRob Herring marvell,function = "gpio"; 64724ba675SRob Herring }; 65724ba675SRob Herring pmx_led_24g: pmx-led-24g { 66724ba675SRob Herring marvell,pins = "mpp49"; 67724ba675SRob Herring marvell,function = "gpio"; 68724ba675SRob Herring }; 69724ba675SRob Herring pmx_btn_restart: pmx-btn-restart { 70724ba675SRob Herring marvell,pins = "mpp28"; 71724ba675SRob Herring marvell,function = "gpio"; 72724ba675SRob Herring }; 73724ba675SRob Herring pmx_btn_wps: pmx-btn-wps { 74724ba675SRob Herring marvell,pins = "mpp46"; 75724ba675SRob Herring marvell,function = "gpio"; 76724ba675SRob Herring }; 77724ba675SRob Herring }; 78724ba675SRob Herring 79724ba675SRob Herring spi@10600 { 80724ba675SRob Herring status = "okay"; 81724ba675SRob Herring flash@0 { 82724ba675SRob Herring #address-cells = <1>; 83724ba675SRob Herring #size-cells = <1>; 84724ba675SRob Herring compatible = "mxicy,mx25l12805d", "jedec,spi-nor"; 85724ba675SRob Herring spi-max-frequency = <50000000>; 86724ba675SRob Herring reg = <0>; 87724ba675SRob Herring 88724ba675SRob Herring partition@0 { 89724ba675SRob Herring label = "uboot"; 90724ba675SRob Herring reg = <0x0 0x30000>; 91724ba675SRob Herring read-only; 92724ba675SRob Herring }; 93724ba675SRob Herring 94724ba675SRob Herring partition@30000 { 95724ba675SRob Herring label = "nvram"; 96724ba675SRob Herring reg = <0x30000 0x10000>; 97724ba675SRob Herring read-only; 98724ba675SRob Herring }; 99724ba675SRob Herring 100724ba675SRob Herring partition@40000 { 101724ba675SRob Herring label = "kernel"; 102724ba675SRob Herring reg = <0x40000 0x180000>; 103724ba675SRob Herring }; 104724ba675SRob Herring 105724ba675SRob Herring partition@1c0000 { 106724ba675SRob Herring label = "rootfs"; 107724ba675SRob Herring reg = <0x1c0000 0xe00000>; 108724ba675SRob Herring }; 109724ba675SRob Herring 110724ba675SRob Herring cal_data: partition@fc0000 { 111724ba675SRob Herring label = "cal_data"; 112724ba675SRob Herring reg = <0xfc0000 0x10000>; 113724ba675SRob Herring read-only; 114724ba675SRob Herring }; 115724ba675SRob Herring 116724ba675SRob Herring partition@fd0000 { 117724ba675SRob Herring label = "lang_pack"; 118724ba675SRob Herring reg = <0xfd0000 0x30000>; 119724ba675SRob Herring read-only; 120724ba675SRob Herring }; 121724ba675SRob Herring }; 122724ba675SRob Herring }; 123724ba675SRob Herring 124724ba675SRob Herring serial@12000 { 125724ba675SRob Herring status = "okay"; 126724ba675SRob Herring }; 127724ba675SRob Herring 128724ba675SRob Herring i2c@11000 { 129724ba675SRob Herring status = "okay"; 130724ba675SRob Herring }; 131724ba675SRob Herring 132724ba675SRob Herring ehci@50000 { 133724ba675SRob Herring status = "okay"; 134724ba675SRob Herring }; 135724ba675SRob Herring }; 136724ba675SRob Herring 137724ba675SRob Herring gpio-leds { 138724ba675SRob Herring compatible = "gpio-leds"; 139724ba675SRob Herring 140*9d0120b7SKrzysztof Kozlowski led-blue-usb { 141724ba675SRob Herring label = "dir665:blue:usb"; 142724ba675SRob Herring gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>; 143724ba675SRob Herring }; 144*9d0120b7SKrzysztof Kozlowski led-blue-internet { 145724ba675SRob Herring /* Can only be turned on if the Internet 146724ba675SRob Herring * Ethernet port has Link 147724ba675SRob Herring */ 148724ba675SRob Herring label = "dir665:blue:internet"; 149724ba675SRob Herring gpios = <&gpio1 10 GPIO_ACTIVE_LOW>; 150724ba675SRob Herring }; 151*9d0120b7SKrzysztof Kozlowski led-amber-internet { 152724ba675SRob Herring label = "dir665:amber:internet"; 153724ba675SRob Herring gpios = <&gpio1 11 GPIO_ACTIVE_HIGH>; 154724ba675SRob Herring }; 155*9d0120b7SKrzysztof Kozlowski led-blue-wifi5g { 156724ba675SRob Herring label = "dir665:blue:5g"; 157724ba675SRob Herring gpios = <&gpio1 12 GPIO_ACTIVE_LOW>; 158724ba675SRob Herring }; 159*9d0120b7SKrzysztof Kozlowski led-blue-status { 160724ba675SRob Herring label = "dir665:blue:status"; 161724ba675SRob Herring gpios = <&gpio1 13 GPIO_ACTIVE_HIGH>; 162724ba675SRob Herring }; 163*9d0120b7SKrzysztof Kozlowski led-blue-wps { 164724ba675SRob Herring label = "dir665:blue:wps"; 165724ba675SRob Herring gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>; 166724ba675SRob Herring }; 167*9d0120b7SKrzysztof Kozlowski led-amber-status { 168724ba675SRob Herring label = "dir665:amber:status"; 169724ba675SRob Herring gpios = <&gpio1 16 GPIO_ACTIVE_HIGH>; 170724ba675SRob Herring }; 171*9d0120b7SKrzysztof Kozlowski led-blue-24g { 172724ba675SRob Herring label = "dir665:blue:24g"; 173724ba675SRob Herring gpios = <&gpio1 17 GPIO_ACTIVE_LOW>; 174724ba675SRob Herring }; 175724ba675SRob Herring }; 176724ba675SRob Herring 177724ba675SRob Herring gpio-keys { 178724ba675SRob Herring compatible = "gpio-keys"; 179724ba675SRob Herring 180b98a9191SKrzysztof Kozlowski button-reset { 181724ba675SRob Herring label = "reset"; 182724ba675SRob Herring linux,code = <KEY_RESTART>; 183724ba675SRob Herring gpios = <&gpio0 28 GPIO_ACTIVE_LOW>; 184724ba675SRob Herring }; 185b98a9191SKrzysztof Kozlowski button-wps { 186724ba675SRob Herring label = "wps"; 187724ba675SRob Herring linux,code = <KEY_WPS_BUTTON>; 188724ba675SRob Herring gpios = <&gpio1 14 GPIO_ACTIVE_LOW>; 189724ba675SRob Herring }; 190724ba675SRob Herring }; 191724ba675SRob Herring}; 192724ba675SRob Herring 193724ba675SRob Herring&mdio { 194724ba675SRob Herring status = "okay"; 195724ba675SRob Herring 196724ba675SRob Herring switch@0 { 197724ba675SRob Herring compatible = "marvell,mv88e6085"; 198724ba675SRob Herring #address-cells = <1>; 199724ba675SRob Herring #size-cells = <0>; 200724ba675SRob Herring reg = <0>; 201724ba675SRob Herring 202724ba675SRob Herring ports { 203724ba675SRob Herring #address-cells = <1>; 204724ba675SRob Herring #size-cells = <0>; 205724ba675SRob Herring 206724ba675SRob Herring port@0 { 207724ba675SRob Herring reg = <0>; 208724ba675SRob Herring label = "lan4"; 209724ba675SRob Herring }; 210724ba675SRob Herring 211724ba675SRob Herring port@1 { 212724ba675SRob Herring reg = <1>; 213724ba675SRob Herring label = "lan3"; 214724ba675SRob Herring }; 215724ba675SRob Herring 216724ba675SRob Herring port@2 { 217724ba675SRob Herring reg = <2>; 218724ba675SRob Herring label = "lan2"; 219724ba675SRob Herring }; 220724ba675SRob Herring 221724ba675SRob Herring port@3 { 222724ba675SRob Herring reg = <3>; 223724ba675SRob Herring label = "lan1"; 224724ba675SRob Herring }; 225724ba675SRob Herring 226724ba675SRob Herring port@4 { 227724ba675SRob Herring reg = <4>; 228724ba675SRob Herring label = "wan"; 229724ba675SRob Herring }; 230724ba675SRob Herring 231724ba675SRob Herring port@6 { 232724ba675SRob Herring reg = <6>; 233724ba675SRob Herring phy-mode = "rgmii-id"; 234724ba675SRob Herring ethernet = <ð0port>; 235724ba675SRob Herring fixed-link { 236724ba675SRob Herring speed = <1000>; 237724ba675SRob Herring full-duplex; 238724ba675SRob Herring }; 239724ba675SRob Herring }; 240724ba675SRob Herring }; 241724ba675SRob Herring }; 242724ba675SRob Herring}; 243724ba675SRob Herring 244724ba675SRob Herring/* eth0 is connected to a Marvell 88E6171 switch, without a PHY. So set 245724ba675SRob Herring * fixed speed and duplex. */ 246724ba675SRob Herringð0 { 247724ba675SRob Herring status = "okay"; 248724ba675SRob Herring 249724ba675SRob Herring ethernet0-port@0 { 250724ba675SRob Herring speed = <1000>; 251724ba675SRob Herring duplex = <1>; 252724ba675SRob Herring phy-mode = "rgmii"; 253724ba675SRob Herring }; 254724ba675SRob Herring}; 255724ba675SRob Herring 256724ba675SRob Herring/* eth1 is connected to the switch as well. However DSA only supports a 257724ba675SRob Herring * single CPU port. So leave this port disabled to avoid confusion. */ 258724ba675SRob Herring 259724ba675SRob Herringð1 { 260724ba675SRob Herring status = "disabled"; 261724ba675SRob Herring}; 262724ba675SRob Herring 263724ba675SRob Herring/* There is no battery on the boards, so the RTC does not keep time 264724ba675SRob Herring * when there is no power, making it useless. */ 265724ba675SRob Herring&rtc { 266724ba675SRob Herring status = "disabled"; 267724ba675SRob Herring}; 268724ba675SRob Herring 269724ba675SRob Herring&pciec { 270724ba675SRob Herring status = "okay"; 271724ba675SRob Herring}; 272724ba675SRob Herring 273724ba675SRob Herring&pcie0 { 274724ba675SRob Herring status = "okay"; 275724ba675SRob Herring}; 276