0001 // SPDX-License-Identifier: GPL-2.0
0002 /*
0003 * Copyright (C) 2014 Claudio Leite <leitec@staticky.com>
0004 *
0005 */
0006
0007 /dts-v1/;
0008
0009 #include "kirkwood.dtsi"
0010 #include "kirkwood-6281.dtsi"
0011
0012 / {
0013 model = "D-Link DIR-665";
0014 compatible = "dlink,dir-665", "marvell,kirkwood-88f6281", "marvell,kirkwood";
0015
0016 memory {
0017 device_type = "memory";
0018 reg = <0x00000000 0x8000000>; /* 128 MB */
0019 };
0020
0021 chosen {
0022 bootargs = "console=ttyS0,115200n8 earlyprintk";
0023 stdout-path = &uart0;
0024 };
0025
0026 ocp@f1000000 {
0027 pinctrl: pin-controller@10000 {
0028 pinctrl-0 =< &pmx_led_usb
0029 &pmx_led_internet_blue
0030 &pmx_led_internet_amber
0031 &pmx_led_5g &pmx_led_status_blue
0032 &pmx_led_wps &pmx_led_status_amber
0033 &pmx_led_24g
0034 &pmx_btn_restart &pmx_btn_wps>;
0035 pinctrl-names = "default";
0036
0037 pmx_led_usb: pmx-led-usb {
0038 marvell,pins = "mpp12";
0039 marvell,function = "gpio";
0040 };
0041 pmx_led_internet_blue: pmx-led-internet-blue {
0042 marvell,pins = "mpp42";
0043 marvell,function = "gpio";
0044 };
0045 pmx_led_internet_amber: pmx-led-internet-amber {
0046 marvell,pins = "mpp43";
0047 marvell,function = "gpio";
0048 };
0049 pmx_led_5g: pmx-led-5g {
0050 marvell,pins = "mpp44";
0051 marvell,function = "gpio";
0052 };
0053 pmx_led_status_blue: pmx-led-status-blue {
0054 marvell,pins = "mpp45";
0055 marvell,function = "gpio";
0056 };
0057 pmx_led_wps: pmx-led-wps {
0058 marvell,pins = "mpp47";
0059 marvell,function = "gpio";
0060 };
0061 pmx_led_status_amber: pmx-led-status-amber {
0062 marvell,pins = "mpp48";
0063 marvell,function = "gpio";
0064 };
0065 pmx_led_24g: pmx-led-24g {
0066 marvell,pins = "mpp49";
0067 marvell,function = "gpio";
0068 };
0069 pmx_btn_restart: pmx-btn-restart {
0070 marvell,pins = "mpp28";
0071 marvell,function = "gpio";
0072 };
0073 pmx_btn_wps: pmx-btn-wps {
0074 marvell,pins = "mpp46";
0075 marvell,function = "gpio";
0076 };
0077 };
0078
0079 spi@10600 {
0080 status = "okay";
0081 flash@0 {
0082 #address-cells = <1>;
0083 #size-cells = <1>;
0084 compatible = "mxicy,mx25l12805d", "jedec,spi-nor";
0085 spi-max-frequency = <50000000>;
0086 reg = <0>;
0087
0088 partition@0 {
0089 label = "uboot";
0090 reg = <0x0 0x30000>;
0091 read-only;
0092 };
0093
0094 partition@30000 {
0095 label = "nvram";
0096 reg = <0x30000 0x10000>;
0097 read-only;
0098 };
0099
0100 partition@40000 {
0101 label = "kernel";
0102 reg = <0x40000 0x180000>;
0103 };
0104
0105 partition@1c0000 {
0106 label = "rootfs";
0107 reg = <0x1c0000 0xe00000>;
0108 };
0109
0110 cal_data: partition@fc0000 {
0111 label = "cal_data";
0112 reg = <0xfc0000 0x10000>;
0113 read-only;
0114 };
0115
0116 partition@fd0000 {
0117 label = "lang_pack";
0118 reg = <0xfd0000 0x30000>;
0119 read-only;
0120 };
0121 };
0122 };
0123
0124 serial@12000 {
0125 status = "okay";
0126 };
0127
0128 i2c@11000 {
0129 status = "okay";
0130 };
0131
0132 ehci@50000 {
0133 status = "okay";
0134 };
0135 };
0136
0137 gpio-leds {
0138 compatible = "gpio-leds";
0139
0140 blue-usb {
0141 label = "dir665:blue:usb";
0142 gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
0143 };
0144 blue-internet {
0145 /* Can only be turned on if the Internet
0146 * Ethernet port has Link
0147 */
0148 label = "dir665:blue:internet";
0149 gpios = <&gpio1 10 GPIO_ACTIVE_LOW>;
0150 };
0151 amber-internet {
0152 label = "dir665:amber:internet";
0153 gpios = <&gpio1 11 GPIO_ACTIVE_HIGH>;
0154 };
0155 blue-wifi5g {
0156 label = "dir665:blue:5g";
0157 gpios = <&gpio1 12 GPIO_ACTIVE_LOW>;
0158 };
0159 blue-status {
0160 label = "dir665:blue:status";
0161 gpios = <&gpio1 13 GPIO_ACTIVE_HIGH>;
0162 };
0163 blue-wps {
0164 label = "dir665:blue:wps";
0165 gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>;
0166 };
0167 amber-status {
0168 label = "dir665:amber:status";
0169 gpios = <&gpio1 16 GPIO_ACTIVE_HIGH>;
0170 };
0171 blue-24g {
0172 label = "dir665:blue:24g";
0173 gpios = <&gpio1 17 GPIO_ACTIVE_LOW>;
0174 };
0175 };
0176
0177 gpio-keys {
0178 compatible = "gpio-keys";
0179 #address-cells = <1>;
0180 #size-cells = <0>;
0181
0182 reset {
0183 label = "reset";
0184 linux,code = <KEY_RESTART>;
0185 gpios = <&gpio0 28 GPIO_ACTIVE_LOW>;
0186 };
0187 wps {
0188 label = "wps";
0189 linux,code = <KEY_WPS_BUTTON>;
0190 gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
0191 };
0192 };
0193 };
0194
0195 &mdio {
0196 status = "okay";
0197
0198 switch@0 {
0199 compatible = "marvell,mv88e6085";
0200 #address-cells = <1>;
0201 #size-cells = <0>;
0202 reg = <0>;
0203
0204 ports {
0205 #address-cells = <1>;
0206 #size-cells = <0>;
0207
0208 port@0 {
0209 reg = <0>;
0210 label = "lan4";
0211 };
0212
0213 port@1 {
0214 reg = <1>;
0215 label = "lan3";
0216 };
0217
0218 port@2 {
0219 reg = <2>;
0220 label = "lan2";
0221 };
0222
0223 port@3 {
0224 reg = <3>;
0225 label = "lan1";
0226 };
0227
0228 port@4 {
0229 reg = <4>;
0230 label = "wan";
0231 };
0232
0233 port@6 {
0234 reg = <6>;
0235 label = "cpu";
0236 ethernet = <ð0port>;
0237 fixed-link {
0238 speed = <1000>;
0239 full-duplex;
0240 };
0241 };
0242 };
0243 };
0244 };
0245
0246 /* eth0 is connected to a Marvell 88E6171 switch, without a PHY. So set
0247 * fixed speed and duplex. */
0248 ð0 {
0249 status = "okay";
0250
0251 ethernet0-port@0 {
0252 speed = <1000>;
0253 duplex = <1>;
0254 };
0255 };
0256
0257 /* eth1 is connected to the switch as well. However DSA only supports a
0258 * single CPU port. So leave this port disabled to avoid confusion. */
0259
0260 ð1 {
0261 status = "disabled";
0262 };
0263
0264 /* There is no battery on the boards, so the RTC does not keep time
0265 * when there is no power, making it useless. */
0266 &rtc {
0267 status = "disabled";
0268 };
0269
0270 &pciec {
0271 status = "okay";
0272 };
0273
0274 &pcie0 {
0275 status = "okay";
0276 };