1f126890aSEmmanuel Vadot// SPDX-License-Identifier: ISC 2f126890aSEmmanuel Vadot/* 3f126890aSEmmanuel Vadot * Device Tree file for Linksys NSLU2 4f126890aSEmmanuel Vadot */ 5f126890aSEmmanuel Vadot 6f126890aSEmmanuel Vadot/dts-v1/; 7f126890aSEmmanuel Vadot 8f126890aSEmmanuel Vadot#include "intel-ixp42x.dtsi" 9f126890aSEmmanuel Vadot#include <dt-bindings/input/input.h> 10f126890aSEmmanuel Vadot 11f126890aSEmmanuel Vadot/ { 12f126890aSEmmanuel Vadot model = "Linksys NSLU2 (Network Storage Link for USB 2.0 Disk Drives)"; 13f126890aSEmmanuel Vadot compatible = "linksys,nslu2", "intel,ixp42x"; 14f126890aSEmmanuel Vadot #address-cells = <1>; 15f126890aSEmmanuel Vadot #size-cells = <1>; 16f126890aSEmmanuel Vadot 17f126890aSEmmanuel Vadot memory@0 { 18f126890aSEmmanuel Vadot /* 32 MB SDRAM */ 19f126890aSEmmanuel Vadot device_type = "memory"; 20f126890aSEmmanuel Vadot reg = <0x00000000 0x2000000>; 21f126890aSEmmanuel Vadot }; 22f126890aSEmmanuel Vadot 23f126890aSEmmanuel Vadot chosen { 24f126890aSEmmanuel Vadot bootargs = "console=ttyS0,115200n8 root=/dev/mtdblock2 rw rootfstype=squashfs,jffs2 rootwait"; 25f126890aSEmmanuel Vadot stdout-path = "uart0:115200n8"; 26f126890aSEmmanuel Vadot }; 27f126890aSEmmanuel Vadot 28f126890aSEmmanuel Vadot aliases { 29f126890aSEmmanuel Vadot serial0 = &uart0; 30f126890aSEmmanuel Vadot }; 31f126890aSEmmanuel Vadot 32f126890aSEmmanuel Vadot leds { 33f126890aSEmmanuel Vadot compatible = "gpio-leds"; 34f126890aSEmmanuel Vadot led-status { 35f126890aSEmmanuel Vadot label = "nslu2:red:status"; 36f126890aSEmmanuel Vadot gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>; 37f126890aSEmmanuel Vadot default-state = "on"; 38f126890aSEmmanuel Vadot linux,default-trigger = "heartbeat"; 39f126890aSEmmanuel Vadot }; 40f126890aSEmmanuel Vadot led-ready { 41f126890aSEmmanuel Vadot label = "nslu2:green:ready"; 42f126890aSEmmanuel Vadot gpios = <&gpio0 1 GPIO_ACTIVE_HIGH>; 43f126890aSEmmanuel Vadot default-state = "on"; 44f126890aSEmmanuel Vadot }; 45f126890aSEmmanuel Vadot led-disk-1 { 46f126890aSEmmanuel Vadot label = "nslu2:green:disk-1"; 47f126890aSEmmanuel Vadot gpios = <&gpio0 3 GPIO_ACTIVE_LOW>; 48f126890aSEmmanuel Vadot default-state = "off"; 49f126890aSEmmanuel Vadot }; 50f126890aSEmmanuel Vadot led-disk-2 { 51f126890aSEmmanuel Vadot label = "nslu2:green:disk-2"; 52f126890aSEmmanuel Vadot gpios = <&gpio0 2 GPIO_ACTIVE_LOW>; 53f126890aSEmmanuel Vadot default-state = "off"; 54f126890aSEmmanuel Vadot }; 55f126890aSEmmanuel Vadot }; 56f126890aSEmmanuel Vadot 57f126890aSEmmanuel Vadot gpio_keys { 58f126890aSEmmanuel Vadot compatible = "gpio-keys"; 59f126890aSEmmanuel Vadot 60f126890aSEmmanuel Vadot button-power { 61f126890aSEmmanuel Vadot wakeup-source; 62f126890aSEmmanuel Vadot linux,code = <KEY_POWER>; 63f126890aSEmmanuel Vadot label = "power"; 64f126890aSEmmanuel Vadot gpios = <&gpio0 5 GPIO_ACTIVE_HIGH>; 65f126890aSEmmanuel Vadot }; 66f126890aSEmmanuel Vadot button-reset { 67f126890aSEmmanuel Vadot wakeup-source; 68*84943d6fSEmmanuel Vadot linux,code = <KEY_RESTART>; 69f126890aSEmmanuel Vadot label = "reset"; 70f126890aSEmmanuel Vadot gpios = <&gpio0 12 GPIO_ACTIVE_LOW>; 71f126890aSEmmanuel Vadot }; 72f126890aSEmmanuel Vadot }; 73f126890aSEmmanuel Vadot 74f126890aSEmmanuel Vadot i2c { 75f126890aSEmmanuel Vadot compatible = "i2c-gpio"; 76f126890aSEmmanuel Vadot sda-gpios = <&gpio0 7 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>; 77f126890aSEmmanuel Vadot scl-gpios = <&gpio0 6 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>; 78f126890aSEmmanuel Vadot #address-cells = <1>; 79f126890aSEmmanuel Vadot #size-cells = <0>; 80f126890aSEmmanuel Vadot 81f126890aSEmmanuel Vadot rtc@6f { 82f126890aSEmmanuel Vadot compatible = "xicor,x1205"; 83f126890aSEmmanuel Vadot reg = <0x6f>; 84f126890aSEmmanuel Vadot }; 85f126890aSEmmanuel Vadot }; 86f126890aSEmmanuel Vadot 87f126890aSEmmanuel Vadot gpio-poweroff { 88f126890aSEmmanuel Vadot compatible = "gpio-poweroff"; 89f126890aSEmmanuel Vadot gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>; 90f126890aSEmmanuel Vadot timeout-ms = <5000>; 91f126890aSEmmanuel Vadot }; 92f126890aSEmmanuel Vadot 93f126890aSEmmanuel Vadot gpio-beeper { 94f126890aSEmmanuel Vadot compatible = "gpio-beeper"; 95f126890aSEmmanuel Vadot gpios = <&gpio0 4 GPIO_ACTIVE_HIGH>; 96f126890aSEmmanuel Vadot }; 97f126890aSEmmanuel Vadot 98f126890aSEmmanuel Vadot soc { 99f126890aSEmmanuel Vadot bus@c4000000 { 100f126890aSEmmanuel Vadot /* The first 16MB region at CS0 on the expansion bus */ 101f126890aSEmmanuel Vadot flash@0,0 { 102f126890aSEmmanuel Vadot compatible = "intel,ixp4xx-flash", "cfi-flash"; 103f126890aSEmmanuel Vadot bank-width = <2>; 104*84943d6fSEmmanuel Vadot /* Enable writes on the expansion bus */ 105*84943d6fSEmmanuel Vadot intel,ixp4xx-eb-write-enable = <1>; 106f126890aSEmmanuel Vadot /* 107f126890aSEmmanuel Vadot * 8 MB of Flash in 0x20000 byte blocks 108f126890aSEmmanuel Vadot * mapped in at CS0. 109f126890aSEmmanuel Vadot */ 110f126890aSEmmanuel Vadot reg = <0 0x00000000 0x800000>; 111f126890aSEmmanuel Vadot 112f126890aSEmmanuel Vadot partitions { 113f126890aSEmmanuel Vadot compatible = "redboot-fis"; 114f126890aSEmmanuel Vadot /* Eraseblock at 0x7e0000 */ 115f126890aSEmmanuel Vadot fis-index-block = <0x3f>; 116f126890aSEmmanuel Vadot }; 117f126890aSEmmanuel Vadot }; 118f126890aSEmmanuel Vadot }; 119f126890aSEmmanuel Vadot 120f126890aSEmmanuel Vadot pci@c0000000 { 121f126890aSEmmanuel Vadot status = "okay"; 122f126890aSEmmanuel Vadot 123f126890aSEmmanuel Vadot /* 124f126890aSEmmanuel Vadot * Taken from NSLU2 PCI boardfile, INT A, B, C swizzled D constant 125f126890aSEmmanuel Vadot * We have slots (IDSEL) 1, 2 and 3. 126f126890aSEmmanuel Vadot */ 127f126890aSEmmanuel Vadot #interrupt-cells = <1>; 128f126890aSEmmanuel Vadot interrupt-map-mask = <0xf800 0 0 7>; 129f126890aSEmmanuel Vadot interrupt-map = 130f126890aSEmmanuel Vadot /* IDSEL 1 */ 131f126890aSEmmanuel Vadot <0x0800 0 0 1 &gpio0 11 IRQ_TYPE_LEVEL_LOW>, /* INT A on slot 1 is irq 11 */ 132f126890aSEmmanuel Vadot <0x0800 0 0 2 &gpio0 10 IRQ_TYPE_LEVEL_LOW>, /* INT B on slot 1 is irq 10 */ 133f126890aSEmmanuel Vadot <0x0800 0 0 3 &gpio0 9 IRQ_TYPE_LEVEL_LOW>, /* INT C on slot 1 is irq 9 */ 134f126890aSEmmanuel Vadot <0x0800 0 0 4 &gpio0 8 IRQ_TYPE_LEVEL_LOW>, /* INT D on slot 1 is irq 8 */ 135f126890aSEmmanuel Vadot /* IDSEL 2 */ 136f126890aSEmmanuel Vadot <0x1000 0 0 1 &gpio0 10 IRQ_TYPE_LEVEL_LOW>, /* INT A on slot 2 is irq 10 */ 137f126890aSEmmanuel Vadot <0x1000 0 0 2 &gpio0 9 IRQ_TYPE_LEVEL_LOW>, /* INT B on slot 2 is irq 9 */ 138f126890aSEmmanuel Vadot <0x1000 0 0 3 &gpio0 11 IRQ_TYPE_LEVEL_LOW>, /* INT C on slot 2 is irq 11 */ 139f126890aSEmmanuel Vadot <0x1000 0 0 4 &gpio0 8 IRQ_TYPE_LEVEL_LOW>, /* INT D on slot 2 is irq 8 */ 140f126890aSEmmanuel Vadot /* IDSEL 3 */ 141f126890aSEmmanuel Vadot <0x1800 0 0 1 &gpio0 9 IRQ_TYPE_LEVEL_LOW>, /* INT A on slot 3 is irq 9 */ 142f126890aSEmmanuel Vadot <0x1800 0 0 2 &gpio0 11 IRQ_TYPE_LEVEL_LOW>, /* INT B on slot 3 is irq 11 */ 143f126890aSEmmanuel Vadot <0x1800 0 0 3 &gpio0 10 IRQ_TYPE_LEVEL_LOW>, /* INT C on slot 3 is irq 10 */ 144f126890aSEmmanuel Vadot <0x1800 0 0 4 &gpio0 8 IRQ_TYPE_LEVEL_LOW>; /* INT D on slot 3 is irq 8 */ 145f126890aSEmmanuel Vadot }; 146f126890aSEmmanuel Vadot 147f126890aSEmmanuel Vadot ethernet@c8009000 { 148f126890aSEmmanuel Vadot status = "okay"; 149f126890aSEmmanuel Vadot queue-rx = <&qmgr 3>; 150f126890aSEmmanuel Vadot queue-txready = <&qmgr 20>; 151f126890aSEmmanuel Vadot phy-mode = "rgmii"; 152f126890aSEmmanuel Vadot phy-handle = <&phy1>; 153f126890aSEmmanuel Vadot 154f126890aSEmmanuel Vadot mdio { 155f126890aSEmmanuel Vadot #address-cells = <1>; 156f126890aSEmmanuel Vadot #size-cells = <0>; 157f126890aSEmmanuel Vadot 158f126890aSEmmanuel Vadot phy1: ethernet-phy@1 { 159f126890aSEmmanuel Vadot reg = <1>; 160f126890aSEmmanuel Vadot }; 161f126890aSEmmanuel Vadot }; 162f126890aSEmmanuel Vadot }; 163f126890aSEmmanuel Vadot }; 164f126890aSEmmanuel Vadot}; 165