0001 // SPDX-License-Identifier: (GPL-2.0 OR MIT)
0002 /*
0003 * Device Tree file for the Linksys WRT1900AC (Mamba).
0004 *
0005 * Note: this board is shipped with a new generation boot loader that
0006 * remaps internal registers at 0xf1000000. Therefore, if earlyprintk
0007 * is used, the CONFIG_DEBUG_MVEBU_UART0_ALTERNATE option should be
0008 * used.
0009 *
0010 * Copyright (C) 2014 Imre Kaloz <kaloz@openwrt.org>
0011 *
0012 * Based on armada-xp-axpwifiap.dts:
0013 *
0014 * Copyright (C) 2013 Marvell
0015 *
0016 * Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
0017 */
0018
0019 /dts-v1/;
0020 #include <dt-bindings/gpio/gpio.h>
0021 #include <dt-bindings/input/input.h>
0022 #include "armada-xp-mv78230.dtsi"
0023
0024 / {
0025 model = "Linksys WRT1900AC";
0026 compatible = "linksys,mamba", "marvell,armadaxp-mv78230",
0027 "marvell,armadaxp", "marvell,armada-370-xp";
0028
0029 chosen {
0030 bootargs = "console=ttyS0,115200";
0031 stdout-path = &uart0;
0032 };
0033
0034 memory@0 {
0035 device_type = "memory";
0036 reg = <0x00000000 0x00000000 0x00000000 0x10000000>; /* 256MB */
0037 };
0038
0039 soc {
0040 ranges = <MBUS_ID(0xf0, 0x01) 0 0 0xf1000000 0x100000
0041 MBUS_ID(0x01, 0x1d) 0 0 0xfff00000 0x100000
0042 MBUS_ID(0x09, 0x09) 0 0 0xf1100000 0x10000
0043 MBUS_ID(0x09, 0x05) 0 0 0xf1110000 0x10000
0044 MBUS_ID(0x0c, 0x04) 0 0 0xf1200000 0x100000>;
0045
0046 internal-regs {
0047
0048 rtc@10300 {
0049 /* No crystal connected to the internal RTC */
0050 status = "disabled";
0051 };
0052
0053 /* J10: VCC, NC, RX, NC, TX, GND */
0054 serial@12000 {
0055 status = "okay";
0056 };
0057
0058 sata@a0000 {
0059 nr-ports = <1>;
0060 status = "okay";
0061 };
0062
0063 ethernet@70000 {
0064 pinctrl-0 = <&ge0_rgmii_pins>;
0065 pinctrl-names = "default";
0066 status = "okay";
0067 phy-mode = "rgmii-id";
0068 buffer-manager = <&bm>;
0069 bm,pool-long = <0>;
0070 bm,pool-short = <1>;
0071 fixed-link {
0072 speed = <1000>;
0073 full-duplex;
0074 };
0075 };
0076
0077 ethernet@74000 {
0078 pinctrl-0 = <&ge1_rgmii_pins>;
0079 pinctrl-names = "default";
0080 status = "okay";
0081 phy-mode = "rgmii-id";
0082 buffer-manager = <&bm>;
0083 bm,pool-long = <2>;
0084 bm,pool-short = <3>;
0085 fixed-link {
0086 speed = <1000>;
0087 full-duplex;
0088 };
0089 };
0090
0091 /* USB part of the eSATA/USB 2.0 port */
0092 usb@50000 {
0093 status = "okay";
0094 };
0095
0096 i2c@11000 {
0097 status = "okay";
0098 clock-frequency = <100000>;
0099
0100 tmp421@4c {
0101 compatible = "ti,tmp421";
0102 reg = <0x4c>;
0103 };
0104
0105 tlc59116@68 {
0106 #address-cells = <1>;
0107 #size-cells = <0>;
0108 #gpio-cells = <2>;
0109 compatible = "ti,tlc59116";
0110 reg = <0x68>;
0111
0112 wan_amber@0 {
0113 label = "mamba:amber:wan";
0114 reg = <0x0>;
0115 };
0116
0117 wan_white@1 {
0118 label = "mamba:white:wan";
0119 reg = <0x1>;
0120 };
0121
0122 wlan_2g@2 {
0123 label = "mamba:white:wlan_2g";
0124 reg = <0x2>;
0125 };
0126
0127 wlan_5g@3 {
0128 label = "mamba:white:wlan_5g";
0129 reg = <0x3>;
0130 };
0131
0132 esata@4 {
0133 label = "mamba:white:esata";
0134 reg = <0x4>;
0135 linux,default-trigger = "disk-activity";
0136 };
0137
0138 usb2@5 {
0139 label = "mamba:white:usb2";
0140 reg = <0x5>;
0141 };
0142
0143 usb3_1@6 {
0144 label = "mamba:white:usb3_1";
0145 reg = <0x6>;
0146 };
0147
0148 usb3_2@7 {
0149 label = "mamba:white:usb3_2";
0150 reg = <0x7>;
0151 };
0152
0153 wps_white@8 {
0154 label = "mamba:white:wps";
0155 reg = <0x8>;
0156 };
0157
0158 wps_amber@9 {
0159 label = "mamba:amber:wps";
0160 reg = <0x9>;
0161 };
0162 };
0163 };
0164
0165 bm@c8000 {
0166 status = "okay";
0167 };
0168 };
0169
0170 bm-bppi {
0171 status = "okay";
0172 };
0173 };
0174
0175 gpio-keys {
0176 compatible = "gpio-keys";
0177 pinctrl-0 = <&keys_pin>;
0178 pinctrl-names = "default";
0179
0180 button-wps {
0181 label = "WPS";
0182 linux,code = <KEY_WPS_BUTTON>;
0183 gpios = <&gpio1 0 GPIO_ACTIVE_LOW>;
0184 };
0185
0186 button-reset {
0187 label = "Factory Reset Button";
0188 linux,code = <KEY_RESTART>;
0189 gpios = <&gpio1 1 GPIO_ACTIVE_LOW>;
0190 };
0191 };
0192
0193 gpio-leds {
0194 compatible = "gpio-leds";
0195 pinctrl-0 = <&power_led_pin>;
0196 pinctrl-names = "default";
0197
0198 power {
0199 label = "mamba:white:power";
0200 gpios = <&gpio1 8 GPIO_ACTIVE_HIGH>;
0201 default-state = "on";
0202 };
0203 };
0204
0205 pwm_fan {
0206 /* SUNON HA4010V4-0000-C99 */
0207
0208 compatible = "pwm-fan";
0209 pwms = <&gpio0 24 4000>;
0210 };
0211 };
0212
0213 &pciec {
0214 status = "okay";
0215
0216 /* Etron EJ168 USB 3.0 controller */
0217 pcie@1,0 {
0218 /* Port 0, Lane 0 */
0219 status = "okay";
0220 };
0221
0222 /* First mini-PCIe port */
0223 pcie@2,0 {
0224 /* Port 0, Lane 1 */
0225 status = "okay";
0226 };
0227
0228 /* Second mini-PCIe port */
0229 pcie@3,0 {
0230 /* Port 0, Lane 3 */
0231 status = "okay";
0232 };
0233 };
0234
0235 &pinctrl {
0236
0237 keys_pin: keys-pin {
0238 marvell,pins = "mpp32", "mpp33";
0239 marvell,function = "gpio";
0240 };
0241
0242 power_led_pin: power-led-pin {
0243 marvell,pins = "mpp40";
0244 marvell,function = "gpio";
0245 };
0246
0247 gpio_fan_pin: gpio-fan-pin {
0248 marvell,pins = "mpp24";
0249 marvell,function = "gpio";
0250 };
0251 };
0252
0253 &spi0 {
0254 status = "okay";
0255
0256 flash@0 {
0257 #address-cells = <1>;
0258 #size-cells = <1>;
0259 compatible = "everspin,mr25h256";
0260 reg = <0>; /* Chip select 0 */
0261 spi-max-frequency = <40000000>;
0262 };
0263 };
0264
0265 &mdio {
0266 status = "okay";
0267
0268 switch@0 {
0269 compatible = "marvell,mv88e6085";
0270 #address-cells = <1>;
0271 #size-cells = <0>;
0272 reg = <0>;
0273
0274 ports {
0275 #address-cells = <1>;
0276 #size-cells = <0>;
0277
0278 port@0 {
0279 reg = <0>;
0280 label = "lan4";
0281 };
0282
0283 port@1 {
0284 reg = <1>;
0285 label = "lan3";
0286 };
0287
0288 port@2 {
0289 reg = <2>;
0290 label = "lan2";
0291 };
0292
0293 port@3 {
0294 reg = <3>;
0295 label = "lan1";
0296 };
0297
0298 port@4 {
0299 reg = <4>;
0300 label = "internet";
0301 };
0302
0303 port@5 {
0304 reg = <5>;
0305 label = "cpu";
0306 ethernet = <ð0>;
0307 fixed-link {
0308 speed = <1000>;
0309 full-duplex;
0310 };
0311 };
0312 };
0313 };
0314 };
0315
0316 &nand_controller {
0317 status = "okay";
0318
0319 nand@0 {
0320 reg = <0>;
0321 label = "pxa3xx_nand-0";
0322 nand-rb = <0>;
0323 marvell,nand-keep-config;
0324 nand-on-flash-bbt;
0325 nand-ecc-strength = <4>;
0326 nand-ecc-step-size = <512>;
0327
0328 partitions {
0329 compatible = "fixed-partitions";
0330 #address-cells = <1>;
0331 #size-cells = <1>;
0332
0333 partition@0 {
0334 label = "u-boot";
0335 reg = <0x0000000 0x100000>; /* 1MB */
0336 read-only;
0337 };
0338
0339 partition@100000 {
0340 label = "u_env";
0341 reg = <0x100000 0x40000>; /* 256KB */
0342 };
0343
0344 partition@140000 {
0345 label = "s_env";
0346 reg = <0x140000 0x40000>; /* 256KB */
0347 };
0348
0349 partition@900000 {
0350 label = "devinfo";
0351 reg = <0x900000 0x100000>; /* 1MB */
0352 read-only;
0353 };
0354
0355 /* kernel1 overlaps with rootfs1 by design */
0356 partition@a00000 {
0357 label = "kernel1";
0358 reg = <0xa00000 0x2800000>; /* 40MB */
0359 };
0360
0361 partition@d00000 {
0362 label = "rootfs1";
0363 reg = <0xd00000 0x2500000>; /* 37MB */
0364 };
0365
0366 /* kernel2 overlaps with rootfs2 by design */
0367 partition@3200000 {
0368 label = "kernel2";
0369 reg = <0x3200000 0x2800000>; /* 40MB */
0370 };
0371
0372 partition@3500000 {
0373 label = "rootfs2";
0374 reg = <0x3500000 0x2500000>; /* 37MB */
0375 };
0376
0377 /*
0378 * 38MB, last MB is for the BBT, not writable
0379 */
0380 partition@5a00000 {
0381 label = "syscfg";
0382 reg = <0x5a00000 0x2600000>;
0383 };
0384
0385 /*
0386 * Unused area between "s_env" and "devinfo".
0387 * Moved here because otherwise the renumbered
0388 * partitions would break the bootloader
0389 * supplied bootargs
0390 */
0391 partition@180000 {
0392 label = "unused_area";
0393 reg = <0x180000 0x780000>; /* 7.5MB */
0394 };
0395 };
0396 };
0397 };