184943d6fSEmmanuel Vadot// SPDX-License-Identifier: ISC 284943d6fSEmmanuel Vadot/* 384943d6fSEmmanuel Vadot * Device Tree file for the USRobotics USR8200 firewall 484943d6fSEmmanuel Vadot * VPN and NAS. Based on know-how from Peter Denison. 584943d6fSEmmanuel Vadot * 684943d6fSEmmanuel Vadot * This machine is based on IXP422, the USR internal codename 784943d6fSEmmanuel Vadot * is "Jeeves". 884943d6fSEmmanuel Vadot */ 984943d6fSEmmanuel Vadot 1084943d6fSEmmanuel Vadot/dts-v1/; 1184943d6fSEmmanuel Vadot 1284943d6fSEmmanuel Vadot#include "intel-ixp42x.dtsi" 1384943d6fSEmmanuel Vadot#include <dt-bindings/input/input.h> 1484943d6fSEmmanuel Vadot 1584943d6fSEmmanuel Vadot/ { 1684943d6fSEmmanuel Vadot model = "USRobotics USR8200"; 1784943d6fSEmmanuel Vadot compatible = "usr,usr8200", "intel,ixp42x"; 1884943d6fSEmmanuel Vadot #address-cells = <1>; 1984943d6fSEmmanuel Vadot #size-cells = <1>; 2084943d6fSEmmanuel Vadot 2184943d6fSEmmanuel Vadot memory@0 { 2284943d6fSEmmanuel Vadot device_type = "memory"; 2384943d6fSEmmanuel Vadot reg = <0x00000000 0x4000000>; 2484943d6fSEmmanuel Vadot }; 2584943d6fSEmmanuel Vadot 2684943d6fSEmmanuel Vadot chosen { 2784943d6fSEmmanuel Vadot bootargs = "console=ttyS0,115200n8"; 2884943d6fSEmmanuel Vadot stdout-path = "uart1:115200n8"; 2984943d6fSEmmanuel Vadot }; 3084943d6fSEmmanuel Vadot 3184943d6fSEmmanuel Vadot aliases { 3284943d6fSEmmanuel Vadot /* These are switched around */ 3384943d6fSEmmanuel Vadot serial0 = &uart1; 3484943d6fSEmmanuel Vadot serial1 = &uart0; 3584943d6fSEmmanuel Vadot }; 3684943d6fSEmmanuel Vadot 3784943d6fSEmmanuel Vadot leds { 3884943d6fSEmmanuel Vadot compatible = "gpio-leds"; 3984943d6fSEmmanuel Vadot ieee1394_led: led-1394 { 4084943d6fSEmmanuel Vadot label = "usr8200:green:1394"; 4184943d6fSEmmanuel Vadot gpios = <&gpio0 0 GPIO_ACTIVE_LOW>; 4284943d6fSEmmanuel Vadot default-state = "off"; 4384943d6fSEmmanuel Vadot }; 4484943d6fSEmmanuel Vadot usb1_led: led-usb1 { 4584943d6fSEmmanuel Vadot label = "usr8200:green:usb1"; 4684943d6fSEmmanuel Vadot gpios = <&gpio0 1 GPIO_ACTIVE_LOW>; 4784943d6fSEmmanuel Vadot default-state = "off"; 4884943d6fSEmmanuel Vadot }; 4984943d6fSEmmanuel Vadot usb2_led: led-usb2 { 5084943d6fSEmmanuel Vadot label = "usr8200:green:usb2"; 5184943d6fSEmmanuel Vadot gpios = <&gpio0 2 GPIO_ACTIVE_LOW>; 5284943d6fSEmmanuel Vadot default-state = "off"; 5384943d6fSEmmanuel Vadot }; 5484943d6fSEmmanuel Vadot wireless_led: led-wireless { 5584943d6fSEmmanuel Vadot /* 5684943d6fSEmmanuel Vadot * This LED is mounted inside the case but cannot be 5784943d6fSEmmanuel Vadot * seen from the outside: probably USR planned at one 5884943d6fSEmmanuel Vadot * point for the device to have a wireless card, then 5984943d6fSEmmanuel Vadot * changed their mind and didn't mount it, leaving the 6084943d6fSEmmanuel Vadot * LED in place. 6184943d6fSEmmanuel Vadot */ 6284943d6fSEmmanuel Vadot label = "usr8200:green:wireless"; 6384943d6fSEmmanuel Vadot gpios = <&gpio0 3 GPIO_ACTIVE_LOW>; 6484943d6fSEmmanuel Vadot default-state = "off"; 6584943d6fSEmmanuel Vadot }; 6684943d6fSEmmanuel Vadot pwr_led: led-pwr { 6784943d6fSEmmanuel Vadot label = "usr8200:green:pwr"; 6884943d6fSEmmanuel Vadot gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>; 6984943d6fSEmmanuel Vadot default-state = "on"; 7084943d6fSEmmanuel Vadot linux,default-trigger = "heartbeat"; 7184943d6fSEmmanuel Vadot }; 7284943d6fSEmmanuel Vadot }; 7384943d6fSEmmanuel Vadot 7484943d6fSEmmanuel Vadot gpio_keys { 7584943d6fSEmmanuel Vadot compatible = "gpio-keys"; 7684943d6fSEmmanuel Vadot 7784943d6fSEmmanuel Vadot button-reset { 7884943d6fSEmmanuel Vadot wakeup-source; 7984943d6fSEmmanuel Vadot linux,code = <KEY_RESTART>; 8084943d6fSEmmanuel Vadot label = "reset"; 8184943d6fSEmmanuel Vadot gpios = <&gpio0 12 GPIO_ACTIVE_LOW>; 8284943d6fSEmmanuel Vadot }; 8384943d6fSEmmanuel Vadot }; 8484943d6fSEmmanuel Vadot 8584943d6fSEmmanuel Vadot soc { 8684943d6fSEmmanuel Vadot bus@c4000000 { 8784943d6fSEmmanuel Vadot flash@0,0 { 8884943d6fSEmmanuel Vadot compatible = "intel,ixp4xx-flash", "cfi-flash"; 8984943d6fSEmmanuel Vadot bank-width = <2>; 9084943d6fSEmmanuel Vadot /* Enable writes on the expansion bus */ 9184943d6fSEmmanuel Vadot intel,ixp4xx-eb-write-enable = <1>; 9284943d6fSEmmanuel Vadot /* 16 MB of Flash mapped in at CS0 */ 9384943d6fSEmmanuel Vadot reg = <0 0x00000000 0x1000000>; 9484943d6fSEmmanuel Vadot 9584943d6fSEmmanuel Vadot partitions { 9684943d6fSEmmanuel Vadot compatible = "redboot-fis"; 9784943d6fSEmmanuel Vadot /* Eraseblock at 0x0fe0000 */ 9884943d6fSEmmanuel Vadot fis-index-block = <0x7f>; 9984943d6fSEmmanuel Vadot }; 10084943d6fSEmmanuel Vadot }; 10184943d6fSEmmanuel Vadot rtc@2,0 { 10284943d6fSEmmanuel Vadot /* EPSON RTC7301 DG DIL-capsule */ 10384943d6fSEmmanuel Vadot compatible = "epson,rtc7301dg"; 10484943d6fSEmmanuel Vadot /* 10584943d6fSEmmanuel Vadot * These timing settings were found in the boardfile patch: 10684943d6fSEmmanuel Vadot * IXP4XX_EXP_CS2 = 0x3fff000 | IXP4XX_EXP_BUS_SIZE(0) | IXP4XX_EXP_BUS_WR_EN | 10784943d6fSEmmanuel Vadot * IXP4XX_EXP_BUS_CS_EN | IXP4XX_EXP_BUS_BYTE_EN; 10884943d6fSEmmanuel Vadot */ 10984943d6fSEmmanuel Vadot intel,ixp4xx-eb-t1 = <0>; // no cycles extra address phase 11084943d6fSEmmanuel Vadot intel,ixp4xx-eb-t2 = <0>; // no cycles extra setup phase 11184943d6fSEmmanuel Vadot intel,ixp4xx-eb-t3 = <15>; // 15 cycles extra strobe phase 11284943d6fSEmmanuel Vadot intel,ixp4xx-eb-t4 = <3>; // 3 cycles extra hold phase 11384943d6fSEmmanuel Vadot intel,ixp4xx-eb-t5 = <15>; // 15 cycles extra recovery phase 11484943d6fSEmmanuel Vadot intel,ixp4xx-eb-cycle-type = <0>; // Intel cycle 11584943d6fSEmmanuel Vadot intel,ixp4xx-eb-byte-access-on-halfword = <0>; 11684943d6fSEmmanuel Vadot intel,ixp4xx-eb-mux-address-and-data = <0>; 11784943d6fSEmmanuel Vadot intel,ixp4xx-eb-ahb-split-transfers = <0>; 11884943d6fSEmmanuel Vadot intel,ixp4xx-eb-write-enable = <1>; 11984943d6fSEmmanuel Vadot intel,ixp4xx-eb-byte-access = <1>; 12084943d6fSEmmanuel Vadot /* 512 bytes at CS2 */ 12184943d6fSEmmanuel Vadot reg = <2 0x00000000 0x0000200>; 12284943d6fSEmmanuel Vadot reg-io-width = <1>; 12384943d6fSEmmanuel Vadot native-endian; 12484943d6fSEmmanuel Vadot /* FIXME: try to check if there is an IRQ for the RTC? */ 12584943d6fSEmmanuel Vadot }; 12684943d6fSEmmanuel Vadot }; 12784943d6fSEmmanuel Vadot 12884943d6fSEmmanuel Vadot pci@c0000000 { 12984943d6fSEmmanuel Vadot status = "okay"; 13084943d6fSEmmanuel Vadot 13184943d6fSEmmanuel Vadot /* 13284943d6fSEmmanuel Vadot * Taken from USR8200 boardfile from OpenWrt 13384943d6fSEmmanuel Vadot * 13484943d6fSEmmanuel Vadot * We have 3 slots (IDSEL) with partly swizzled IRQs on slot 16. 13584943d6fSEmmanuel Vadot * We assume the same IRQ for all pins on the remaining slots, that 13684943d6fSEmmanuel Vadot * is what the boardfile was doing. 13784943d6fSEmmanuel Vadot */ 13884943d6fSEmmanuel Vadot #interrupt-cells = <1>; 13984943d6fSEmmanuel Vadot interrupt-map-mask = <0xf800 0 0 7>; 14084943d6fSEmmanuel Vadot interrupt-map = 14184943d6fSEmmanuel Vadot /* IDSEL 14 used for "Wireless" in the board file */ 14284943d6fSEmmanuel Vadot <0x7000 0 0 1 &gpio0 7 IRQ_TYPE_LEVEL_LOW>, /* INT A on slot 14 is irq 7 */ 14384943d6fSEmmanuel Vadot /* IDSEL 15 used for VIA VT6307 IEEE 1394 Firewire */ 14484943d6fSEmmanuel Vadot <0x7800 0 0 1 &gpio0 8 IRQ_TYPE_LEVEL_LOW>, /* INT A on slot 15 is irq 8 */ 14584943d6fSEmmanuel Vadot /* IDSEL 16 used for VIA VT6202 USB 2.0 4+1 */ 14684943d6fSEmmanuel Vadot <0x8000 0 0 1 &gpio0 11 IRQ_TYPE_LEVEL_LOW>, /* INT A on slot 16 is irq 11 */ 14784943d6fSEmmanuel Vadot <0x8000 0 0 2 &gpio0 10 IRQ_TYPE_LEVEL_LOW>, /* INT B on slot 16 is irq 10 */ 14884943d6fSEmmanuel Vadot <0x8000 0 0 3 &gpio0 9 IRQ_TYPE_LEVEL_LOW>; /* INT C on slot 16 is irq 9 */ 14984943d6fSEmmanuel Vadot }; 15084943d6fSEmmanuel Vadot 15184943d6fSEmmanuel Vadot gpio@c8004000 { 15284943d6fSEmmanuel Vadot /* Enable clock out on GPIO 15 */ 15384943d6fSEmmanuel Vadot intel,ixp4xx-gpio15-clkout; 15484943d6fSEmmanuel Vadot }; 15584943d6fSEmmanuel Vadot 15684943d6fSEmmanuel Vadot /* EthB WAN */ 15784943d6fSEmmanuel Vadot ethernet@c8009000 { 15884943d6fSEmmanuel Vadot status = "okay"; 15984943d6fSEmmanuel Vadot queue-rx = <&qmgr 3>; 16084943d6fSEmmanuel Vadot queue-txready = <&qmgr 20>; 16184943d6fSEmmanuel Vadot phy-mode = "rgmii"; 16284943d6fSEmmanuel Vadot phy-handle = <&phy9>; 16384943d6fSEmmanuel Vadot 16484943d6fSEmmanuel Vadot mdio { 16584943d6fSEmmanuel Vadot #address-cells = <1>; 16684943d6fSEmmanuel Vadot #size-cells = <0>; 16784943d6fSEmmanuel Vadot 168*8d13bc63SEmmanuel Vadot /* 169*8d13bc63SEmmanuel Vadot * PHY 0..4 are internal to the MV88E6060 switch but appear 170*8d13bc63SEmmanuel Vadot * as independent devices. 171*8d13bc63SEmmanuel Vadot */ 172*8d13bc63SEmmanuel Vadot phy0: ethernet-phy@0 { 173*8d13bc63SEmmanuel Vadot reg = <0>; 174*8d13bc63SEmmanuel Vadot }; 175*8d13bc63SEmmanuel Vadot phy1: ethernet-phy@1 { 176*8d13bc63SEmmanuel Vadot reg = <1>; 177*8d13bc63SEmmanuel Vadot }; 178*8d13bc63SEmmanuel Vadot phy2: ethernet-phy@2 { 179*8d13bc63SEmmanuel Vadot reg = <2>; 180*8d13bc63SEmmanuel Vadot }; 181*8d13bc63SEmmanuel Vadot phy3: ethernet-phy@3 { 182*8d13bc63SEmmanuel Vadot reg = <3>; 183*8d13bc63SEmmanuel Vadot }; 184*8d13bc63SEmmanuel Vadot 185*8d13bc63SEmmanuel Vadot /* Altima AMI101L used by the WAN port */ 18684943d6fSEmmanuel Vadot phy9: ethernet-phy@9 { 18784943d6fSEmmanuel Vadot reg = <9>; 18884943d6fSEmmanuel Vadot }; 18984943d6fSEmmanuel Vadot 19084943d6fSEmmanuel Vadot /* The switch uses MDIO addresses 16 thru 31 */ 19184943d6fSEmmanuel Vadot switch@16 { 19284943d6fSEmmanuel Vadot compatible = "marvell,mv88e6060"; 19384943d6fSEmmanuel Vadot reg = <16>; 19484943d6fSEmmanuel Vadot 19584943d6fSEmmanuel Vadot ports { 19684943d6fSEmmanuel Vadot #address-cells = <1>; 19784943d6fSEmmanuel Vadot #size-cells = <0>; 19884943d6fSEmmanuel Vadot 19984943d6fSEmmanuel Vadot port@0 { 20084943d6fSEmmanuel Vadot reg = <0>; 20184943d6fSEmmanuel Vadot label = "lan1"; 202*8d13bc63SEmmanuel Vadot phy-handle = <&phy0>; 20384943d6fSEmmanuel Vadot }; 20484943d6fSEmmanuel Vadot 20584943d6fSEmmanuel Vadot port@1 { 20684943d6fSEmmanuel Vadot reg = <1>; 20784943d6fSEmmanuel Vadot label = "lan2"; 208*8d13bc63SEmmanuel Vadot phy-handle = <&phy1>; 20984943d6fSEmmanuel Vadot }; 21084943d6fSEmmanuel Vadot 21184943d6fSEmmanuel Vadot port@2 { 21284943d6fSEmmanuel Vadot reg = <2>; 21384943d6fSEmmanuel Vadot label = "lan3"; 214*8d13bc63SEmmanuel Vadot phy-handle = <&phy2>; 21584943d6fSEmmanuel Vadot }; 21684943d6fSEmmanuel Vadot 21784943d6fSEmmanuel Vadot port@3 { 21884943d6fSEmmanuel Vadot reg = <3>; 21984943d6fSEmmanuel Vadot label = "lan4"; 220*8d13bc63SEmmanuel Vadot phy-handle = <&phy3>; 22184943d6fSEmmanuel Vadot }; 22284943d6fSEmmanuel Vadot 22384943d6fSEmmanuel Vadot port@5 { 22484943d6fSEmmanuel Vadot /* Port 5 is the CPU port according to the MV88E6060 datasheet */ 22584943d6fSEmmanuel Vadot reg = <5>; 22684943d6fSEmmanuel Vadot phy-mode = "rgmii-id"; 22784943d6fSEmmanuel Vadot ethernet = <ðc>; 22884943d6fSEmmanuel Vadot label = "cpu"; 22984943d6fSEmmanuel Vadot fixed-link { 23084943d6fSEmmanuel Vadot speed = <100>; 23184943d6fSEmmanuel Vadot full-duplex; 23284943d6fSEmmanuel Vadot }; 23384943d6fSEmmanuel Vadot }; 23484943d6fSEmmanuel Vadot }; 23584943d6fSEmmanuel Vadot }; 23684943d6fSEmmanuel Vadot }; 23784943d6fSEmmanuel Vadot }; 23884943d6fSEmmanuel Vadot 23984943d6fSEmmanuel Vadot /* EthC LAN connected to the Marvell DSA Switch */ 24084943d6fSEmmanuel Vadot ethc: ethernet@c800a000 { 24184943d6fSEmmanuel Vadot status = "okay"; 24284943d6fSEmmanuel Vadot queue-rx = <&qmgr 4>; 24384943d6fSEmmanuel Vadot queue-txready = <&qmgr 21>; 24484943d6fSEmmanuel Vadot phy-mode = "rgmii"; 24584943d6fSEmmanuel Vadot fixed-link { 24684943d6fSEmmanuel Vadot speed = <100>; 24784943d6fSEmmanuel Vadot full-duplex; 24884943d6fSEmmanuel Vadot }; 24984943d6fSEmmanuel Vadot }; 25084943d6fSEmmanuel Vadot }; 25184943d6fSEmmanuel Vadot}; 252