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 140724ba675SRob Herring blue-usb { 141724ba675SRob Herring label = "dir665:blue:usb"; 142724ba675SRob Herring gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>; 143724ba675SRob Herring }; 144724ba675SRob Herring 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 }; 151724ba675SRob Herring amber-internet { 152724ba675SRob Herring label = "dir665:amber:internet"; 153724ba675SRob Herring gpios = <&gpio1 11 GPIO_ACTIVE_HIGH>; 154724ba675SRob Herring }; 155724ba675SRob Herring blue-wifi5g { 156724ba675SRob Herring label = "dir665:blue:5g"; 157724ba675SRob Herring gpios = <&gpio1 12 GPIO_ACTIVE_LOW>; 158724ba675SRob Herring }; 159724ba675SRob Herring blue-status { 160724ba675SRob Herring label = "dir665:blue:status"; 161724ba675SRob Herring gpios = <&gpio1 13 GPIO_ACTIVE_HIGH>; 162724ba675SRob Herring }; 163724ba675SRob Herring blue-wps { 164724ba675SRob Herring label = "dir665:blue:wps"; 165724ba675SRob Herring gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>; 166724ba675SRob Herring }; 167724ba675SRob Herring amber-status { 168724ba675SRob Herring label = "dir665:amber:status"; 169724ba675SRob Herring gpios = <&gpio1 16 GPIO_ACTIVE_HIGH>; 170724ba675SRob Herring }; 171724ba675SRob Herring 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 #address-cells = <1>; 180724ba675SRob Herring #size-cells = <0>; 181724ba675SRob Herring 182*b98a9191SKrzysztof Kozlowski button-reset { 183724ba675SRob Herring label = "reset"; 184724ba675SRob Herring linux,code = <KEY_RESTART>; 185724ba675SRob Herring gpios = <&gpio0 28 GPIO_ACTIVE_LOW>; 186724ba675SRob Herring }; 187*b98a9191SKrzysztof Kozlowski button-wps { 188724ba675SRob Herring label = "wps"; 189724ba675SRob Herring linux,code = <KEY_WPS_BUTTON>; 190724ba675SRob Herring gpios = <&gpio1 14 GPIO_ACTIVE_LOW>; 191724ba675SRob Herring }; 192724ba675SRob Herring }; 193724ba675SRob Herring}; 194724ba675SRob Herring 195724ba675SRob Herring&mdio { 196724ba675SRob Herring status = "okay"; 197724ba675SRob Herring 198724ba675SRob Herring switch@0 { 199724ba675SRob Herring compatible = "marvell,mv88e6085"; 200724ba675SRob Herring #address-cells = <1>; 201724ba675SRob Herring #size-cells = <0>; 202724ba675SRob Herring reg = <0>; 203724ba675SRob Herring 204724ba675SRob Herring ports { 205724ba675SRob Herring #address-cells = <1>; 206724ba675SRob Herring #size-cells = <0>; 207724ba675SRob Herring 208724ba675SRob Herring port@0 { 209724ba675SRob Herring reg = <0>; 210724ba675SRob Herring label = "lan4"; 211724ba675SRob Herring }; 212724ba675SRob Herring 213724ba675SRob Herring port@1 { 214724ba675SRob Herring reg = <1>; 215724ba675SRob Herring label = "lan3"; 216724ba675SRob Herring }; 217724ba675SRob Herring 218724ba675SRob Herring port@2 { 219724ba675SRob Herring reg = <2>; 220724ba675SRob Herring label = "lan2"; 221724ba675SRob Herring }; 222724ba675SRob Herring 223724ba675SRob Herring port@3 { 224724ba675SRob Herring reg = <3>; 225724ba675SRob Herring label = "lan1"; 226724ba675SRob Herring }; 227724ba675SRob Herring 228724ba675SRob Herring port@4 { 229724ba675SRob Herring reg = <4>; 230724ba675SRob Herring label = "wan"; 231724ba675SRob Herring }; 232724ba675SRob Herring 233724ba675SRob Herring port@6 { 234724ba675SRob Herring reg = <6>; 235724ba675SRob Herring phy-mode = "rgmii-id"; 236724ba675SRob Herring ethernet = <ð0port>; 237724ba675SRob Herring fixed-link { 238724ba675SRob Herring speed = <1000>; 239724ba675SRob Herring full-duplex; 240724ba675SRob Herring }; 241724ba675SRob Herring }; 242724ba675SRob Herring }; 243724ba675SRob Herring }; 244724ba675SRob Herring}; 245724ba675SRob Herring 246724ba675SRob Herring/* eth0 is connected to a Marvell 88E6171 switch, without a PHY. So set 247724ba675SRob Herring * fixed speed and duplex. */ 248724ba675SRob Herringð0 { 249724ba675SRob Herring status = "okay"; 250724ba675SRob Herring 251724ba675SRob Herring ethernet0-port@0 { 252724ba675SRob Herring speed = <1000>; 253724ba675SRob Herring duplex = <1>; 254724ba675SRob Herring phy-mode = "rgmii"; 255724ba675SRob Herring }; 256724ba675SRob Herring}; 257724ba675SRob Herring 258724ba675SRob Herring/* eth1 is connected to the switch as well. However DSA only supports a 259724ba675SRob Herring * single CPU port. So leave this port disabled to avoid confusion. */ 260724ba675SRob Herring 261724ba675SRob Herringð1 { 262724ba675SRob Herring status = "disabled"; 263724ba675SRob Herring}; 264724ba675SRob Herring 265724ba675SRob Herring/* There is no battery on the boards, so the RTC does not keep time 266724ba675SRob Herring * when there is no power, making it useless. */ 267724ba675SRob Herring&rtc { 268724ba675SRob Herring status = "disabled"; 269724ba675SRob Herring}; 270724ba675SRob Herring 271724ba675SRob Herring&pciec { 272724ba675SRob Herring status = "okay"; 273724ba675SRob Herring}; 274724ba675SRob Herring 275724ba675SRob Herring&pcie0 { 276724ba675SRob Herring status = "okay"; 277724ba675SRob Herring}; 278