0001 // SPDX-License-Identifier: GPL-2.0-only
0002 // Copyright (C) 2016 Jamie Lentin <jm@lentin.co.uk>
0003
0004 /dts-v1/;
0005
0006 #include <dt-bindings/gpio/gpio.h>
0007 #include <dt-bindings/input/input.h>
0008 #include "orion5x-mv88f5181.dtsi"
0009
0010 / {
0011 model = "Netgear WNR854-t";
0012 compatible = "netgear,wnr854t", "marvell,orion5x-88f5181",
0013 "marvell,orion5x";
0014 aliases {
0015 serial0 = &uart0;
0016 };
0017
0018 memory {
0019 device_type = "memory";
0020 reg = <0x00000000 0x2000000>; /* 32 MB */
0021 };
0022
0023 chosen {
0024 stdout-path = "serial0:115200n8";
0025 };
0026
0027 soc {
0028 ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000>,
0029 <MBUS_ID(0x09, 0x00) 0 0xf2200000 0x800>,
0030 <MBUS_ID(0x01, 0x0f) 0 0xf4000000 0x800000>;
0031 };
0032
0033 gpio-keys {
0034 compatible = "gpio-keys";
0035 pinctrl-0 = <&pmx_reset_button>;
0036 pinctrl-names = "default";
0037
0038 reset {
0039 label = "Reset Button";
0040 linux,code = <KEY_RESTART>;
0041 gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
0042 };
0043 };
0044
0045 gpio-leds {
0046 compatible = "gpio-leds";
0047 pinctrl-0 = <&pmx_power_led &pmx_power_led_blink &pmx_wan_led>;
0048 pinctrl-names = "default";
0049
0050 led@0 {
0051 label = "wnr854t:green:power";
0052 gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
0053 };
0054
0055 led@1 {
0056 label = "wnr854t:blink:power";
0057 gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
0058 };
0059
0060 led@2 {
0061 label = "wnr854t:green:wan";
0062 gpios = <&gpio0 3 GPIO_ACTIVE_LOW>;
0063 };
0064 };
0065 };
0066
0067 &devbus_bootcs {
0068 status = "okay";
0069
0070 devbus,keep-config;
0071
0072 flash@0 {
0073 compatible = "cfi-flash";
0074 reg = <0 0x800000>;
0075 bank-width = <2>;
0076
0077 partitions {
0078 compatible = "fixed-partitions";
0079 #address-cells = <1>;
0080 #size-cells = <1>;
0081
0082 partition@0 {
0083 label = "kernel";
0084 reg = <0x0 0x100000>;
0085 };
0086
0087 partition@100000 {
0088 label = "rootfs";
0089 reg = <0x100000 0x660000>;
0090 };
0091
0092 partition@760000 {
0093 label = "uboot_env";
0094 reg = <0x760000 0x20000>;
0095 };
0096
0097 partition@780000 {
0098 label = "uboot";
0099 reg = <0x780000 0x80000>;
0100 read-only;
0101 };
0102 };
0103 };
0104 };
0105
0106 &mdio {
0107 status = "okay";
0108
0109 switch: switch@0 {
0110 compatible = "marvell,mv88e6085";
0111 #address-cells = <1>;
0112 #size-cells = <0>;
0113 reg = <0>;
0114 dsa,member = <0 0>;
0115
0116 ports {
0117 #address-cells = <1>;
0118 #size-cells = <0>;
0119
0120 port@0 {
0121 reg = <0>;
0122 label = "lan3";
0123 phy-handle = <&lan3phy>;
0124 };
0125
0126 port@1 {
0127 reg = <1>;
0128 label = "lan4";
0129 phy-handle = <&lan4phy>;
0130 };
0131
0132 port@2 {
0133 reg = <2>;
0134 label = "wan";
0135 phy-handle = <&wanphy>;
0136 };
0137
0138 port@3 {
0139 reg = <3>;
0140 label = "cpu";
0141 ethernet = <ðport>;
0142 };
0143
0144 port@5 {
0145 reg = <5>;
0146 label = "lan1";
0147 phy-handle = <&lan1phy>;
0148 };
0149
0150 port@7 {
0151 reg = <7>;
0152 label = "lan2";
0153 phy-handle = <&lan2phy>;
0154 };
0155 };
0156
0157 mdio {
0158 #address-cells = <1>;
0159 #size-cells = <0>;
0160
0161 lan3phy: ethernet-phy@0 {
0162 /* Marvell 88E1121R (port 1) */
0163 compatible = "ethernet-phy-id0141.0cb0",
0164 "ethernet-phy-ieee802.3-c22";
0165 reg = <0>;
0166 marvell,reg-init = <3 16 0 0x1777 3 17 0 0x15>;
0167 };
0168
0169 lan4phy: ethernet-phy@1 {
0170 /* Marvell 88E1121R (port 2) */
0171 compatible = "ethernet-phy-id0141.0cb0",
0172 "ethernet-phy-ieee802.3-c22";
0173 reg = <1>;
0174 marvell,reg-init = <3 16 0 0x1777 3 17 0 0x15>;
0175 };
0176
0177 wanphy: ethernet-phy@2 {
0178 /* Marvell 88E1121R (port 1) */
0179 compatible = "ethernet-phy-id0141.0cb0",
0180 "ethernet-phy-ieee802.3-c22";
0181 reg = <2>;
0182 marvell,reg-init = <3 16 0 0x1777 3 17 0 0x15>;
0183 };
0184
0185 lan1phy: ethernet-phy@5 {
0186 /* Marvell 88E1112 */
0187 compatible = "ethernet-phy-id0141.0cb0",
0188 "ethernet-phy-ieee802.3-c22";
0189 reg = <5>;
0190 marvell,reg-init = <3 16 0 0x1777 3 17 0 0x15>;
0191 };
0192
0193 lan2phy: ethernet-phy@7 {
0194 /* Marvell 88E1112 */
0195 compatible = "ethernet-phy-id0141.0cb0",
0196 "ethernet-phy-ieee802.3-c22";
0197 reg = <7>;
0198 marvell,reg-init = <3 16 0 0x1777 3 17 0 0x15>;
0199 };
0200 };
0201 };
0202 };
0203
0204 ð {
0205 status = "okay";
0206
0207 ethernet-port@0 {
0208 /* Hardwired to DSA switch */
0209 speed = <1000>;
0210 duplex = <1>;
0211 };
0212 };
0213
0214 &pinctrl {
0215 pinctrl-0 = <&pmx_pci_gpios>;
0216 pinctrl-names = "default";
0217
0218 pmx_power_led: pmx-power-led {
0219 marvell,pins = "mpp0";
0220 marvell,function = "gpio";
0221 };
0222
0223 pmx_reset_button: pmx-reset-button {
0224 marvell,pins = "mpp1";
0225 marvell,function = "gpio";
0226 };
0227
0228 pmx_power_led_blink: pmx-power-led-blink {
0229 marvell,pins = "mpp2";
0230 marvell,function = "gpio";
0231 };
0232
0233 pmx_wan_led: pmx-wan-led {
0234 marvell,pins = "mpp3";
0235 marvell,function = "gpio";
0236 };
0237
0238 pmx_pci_gpios: pmx-pci-gpios {
0239 marvell,pins = "mpp4";
0240 marvell,function = "gpio";
0241 };
0242 };
0243
0244 &uart0 {
0245 /* Pin 1: Tx, Pin 7: Rx, Pin 8: Gnd */
0246 status = "okay";
0247 };