1f126890aSEmmanuel Vadot// SPDX-License-Identifier: ISC 2f126890aSEmmanuel Vadot/* 3f126890aSEmmanuel Vadot * Device Tree file for D-Link DSM-G600 revision A based on IXP420 4f126890aSEmmanuel Vadot * NOTE: revision B of this device uses PowerPC and is NOT supported by 5f126890aSEmmanuel Vadot * this device tree. 6f126890aSEmmanuel Vadot * 7f126890aSEmmanuel Vadot * Inspired by the boardfile by Rod Whitby, Tower Technologies, Alessandro Zummo 8f126890aSEmmanuel Vadot * and Michael Westerhof. 9f126890aSEmmanuel Vadot */ 10f126890aSEmmanuel Vadot 11f126890aSEmmanuel Vadot/dts-v1/; 12f126890aSEmmanuel Vadot 13f126890aSEmmanuel Vadot#include "intel-ixp42x.dtsi" 14f126890aSEmmanuel Vadot#include <dt-bindings/input/input.h> 15f126890aSEmmanuel Vadot 16f126890aSEmmanuel Vadot/ { 17f126890aSEmmanuel Vadot model = "D-Link DSM-G600 rev A"; 18f126890aSEmmanuel Vadot compatible = "dlink,dsm-g600-a", "intel,ixp42x"; 19f126890aSEmmanuel Vadot #address-cells = <1>; 20f126890aSEmmanuel Vadot #size-cells = <1>; 21f126890aSEmmanuel Vadot 22f126890aSEmmanuel Vadot memory@0 { 23f126890aSEmmanuel Vadot /* 64 MB SDRAM */ 24f126890aSEmmanuel Vadot device_type = "memory"; 25f126890aSEmmanuel Vadot reg = <0x00000000 0x4000000>; 26f126890aSEmmanuel Vadot }; 27f126890aSEmmanuel Vadot 28f126890aSEmmanuel Vadot chosen { 29f126890aSEmmanuel Vadot bootargs = "console=ttyS0,115200n8 root=/dev/sda1 rw rootwait"; 30f126890aSEmmanuel Vadot stdout-path = "uart0:115200n8"; 31f126890aSEmmanuel Vadot }; 32f126890aSEmmanuel Vadot 33f126890aSEmmanuel Vadot aliases { 34f126890aSEmmanuel Vadot serial0 = &uart0; 35f126890aSEmmanuel Vadot }; 36f126890aSEmmanuel Vadot 37f126890aSEmmanuel Vadot leds { 38f126890aSEmmanuel Vadot compatible = "gpio-leds"; 39f126890aSEmmanuel Vadot led-power { 40f126890aSEmmanuel Vadot label = "dsmg600:green:power"; 41f126890aSEmmanuel Vadot gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>; 42f126890aSEmmanuel Vadot default-state = "on"; 43f126890aSEmmanuel Vadot linux,default-trigger = "heartbeat"; 44f126890aSEmmanuel Vadot }; 45f126890aSEmmanuel Vadot led-wlan { 46f126890aSEmmanuel Vadot label = "dsmg600:green:wlan"; 47f126890aSEmmanuel Vadot /* CHECKME: flagged as active low in the old board file */ 48f126890aSEmmanuel Vadot gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; 49f126890aSEmmanuel Vadot default-state = "on"; 50f126890aSEmmanuel Vadot /* We don't have WLAN trigger in the kernel (yet) */ 51f126890aSEmmanuel Vadot linux,default-trigger = "netdev"; 52f126890aSEmmanuel Vadot }; 53f126890aSEmmanuel Vadot }; 54f126890aSEmmanuel Vadot 55f126890aSEmmanuel Vadot gpio_keys { 56f126890aSEmmanuel Vadot compatible = "gpio-keys"; 57f126890aSEmmanuel Vadot 58f126890aSEmmanuel Vadot button-reset { 59f126890aSEmmanuel Vadot wakeup-source; 60*84943d6fSEmmanuel Vadot linux,code = <KEY_RESTART>; 61f126890aSEmmanuel Vadot label = "reset"; 62f126890aSEmmanuel Vadot gpios = <&gpio0 3 GPIO_ACTIVE_LOW>; 63f126890aSEmmanuel Vadot }; 64f126890aSEmmanuel Vadot }; 65f126890aSEmmanuel Vadot 66f126890aSEmmanuel Vadot gpio_keys_polled { 67f126890aSEmmanuel Vadot compatible = "gpio-keys-polled"; 68f126890aSEmmanuel Vadot 69f126890aSEmmanuel Vadot /* 70f126890aSEmmanuel Vadot * According to the board file this key cannot handle interrupts and 71f126890aSEmmanuel Vadot * need to be polled. Investigate if this is really the case or if 72f126890aSEmmanuel Vadot * this can be moved adjacent to the ordinary gpio-keys above. 73f126890aSEmmanuel Vadot */ 74f126890aSEmmanuel Vadot button-power { 75f126890aSEmmanuel Vadot wakeup-source; 76f126890aSEmmanuel Vadot linux,code = <KEY_POWER>; 77f126890aSEmmanuel Vadot label = "power"; 78f126890aSEmmanuel Vadot gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>; 79f126890aSEmmanuel Vadot }; 80f126890aSEmmanuel Vadot }; 81f126890aSEmmanuel Vadot 82f126890aSEmmanuel Vadot i2c { 83f126890aSEmmanuel Vadot compatible = "i2c-gpio"; 84f126890aSEmmanuel Vadot sda-gpios = <&gpio0 5 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>; 85f126890aSEmmanuel Vadot scl-gpios = <&gpio0 4 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>; 86f126890aSEmmanuel Vadot #address-cells = <1>; 87f126890aSEmmanuel Vadot #size-cells = <0>; 88f126890aSEmmanuel Vadot 89f126890aSEmmanuel Vadot rtc@51 { 90f126890aSEmmanuel Vadot compatible = "nxp,pcf8563"; 91f126890aSEmmanuel Vadot reg = <0x51>; 92f126890aSEmmanuel Vadot }; 93f126890aSEmmanuel Vadot }; 94f126890aSEmmanuel Vadot 95f126890aSEmmanuel Vadot gpio-poweroff { 96f126890aSEmmanuel Vadot compatible = "gpio-poweroff"; 97f126890aSEmmanuel Vadot gpios = <&gpio0 2 GPIO_ACTIVE_HIGH>; 98f126890aSEmmanuel Vadot timeout-ms = <5000>; 99f126890aSEmmanuel Vadot }; 100f126890aSEmmanuel Vadot 101f126890aSEmmanuel Vadot soc { 102f126890aSEmmanuel Vadot bus@c4000000 { 103f126890aSEmmanuel Vadot /* The first 16MB region at CS0 on the expansion bus */ 104f126890aSEmmanuel Vadot flash@0,0 { 105f126890aSEmmanuel Vadot compatible = "intel,ixp4xx-flash", "cfi-flash"; 106f126890aSEmmanuel Vadot bank-width = <2>; 107f126890aSEmmanuel Vadot /* 108f126890aSEmmanuel Vadot * 16 MB of Flash in 128 0x20000 sized blocks 109f126890aSEmmanuel Vadot * mapped in at CS0. 110f126890aSEmmanuel Vadot */ 111f126890aSEmmanuel Vadot reg = <0 0x00000000 0x1000000>; 112f126890aSEmmanuel Vadot 113f126890aSEmmanuel Vadot partitions { 114f126890aSEmmanuel Vadot compatible = "redboot-fis"; 115f126890aSEmmanuel Vadot /* 116f126890aSEmmanuel Vadot * A boot log says the directory is at 0xfe0000 117f126890aSEmmanuel Vadot * 0x7f * 0x20000 = 0xfe0000 118f126890aSEmmanuel Vadot */ 119f126890aSEmmanuel Vadot fis-index-block = <0x7f>; 120f126890aSEmmanuel Vadot }; 121f126890aSEmmanuel Vadot }; 122f126890aSEmmanuel Vadot }; 123f126890aSEmmanuel Vadot 124f126890aSEmmanuel Vadot pci@c0000000 { 125f126890aSEmmanuel Vadot status = "okay"; 126f126890aSEmmanuel Vadot 127f126890aSEmmanuel Vadot /* 128f126890aSEmmanuel Vadot * Taken from DSM-G600 PCI boardfile (dsmg600-pci.c) 129f126890aSEmmanuel Vadot * We have slots (IDSEL) 1, 2, 3, 4 and pins 1, 2 and 3. 130f126890aSEmmanuel Vadot * Only slot 3 have three IRQs. 131f126890aSEmmanuel Vadot */ 132f126890aSEmmanuel Vadot #interrupt-cells = <1>; 133f126890aSEmmanuel Vadot interrupt-map-mask = <0xf800 0 0 7>; 134f126890aSEmmanuel Vadot interrupt-map = 135f126890aSEmmanuel Vadot /* IDSEL 1 */ 136f126890aSEmmanuel Vadot <0x0800 0 0 1 &gpio0 7 IRQ_TYPE_LEVEL_LOW>, /* INT E on slot 1 is irq 7 */ 137f126890aSEmmanuel Vadot /* IDSEL 2 */ 138f126890aSEmmanuel Vadot <0x1000 0 0 1 &gpio0 11 IRQ_TYPE_LEVEL_LOW>, /* INT A on slot 2 is irq 11 */ 139f126890aSEmmanuel Vadot /* IDSEL 3 */ 140f126890aSEmmanuel Vadot <0x1800 0 0 1 &gpio0 10 IRQ_TYPE_LEVEL_LOW>, /* INT B on slot 3 is irq 10 */ 141f126890aSEmmanuel Vadot <0x1800 0 0 2 &gpio0 9 IRQ_TYPE_LEVEL_LOW>, /* INT C on slot 3 is irq 9 */ 142f126890aSEmmanuel Vadot <0x1800 0 0 3 &gpio0 8 IRQ_TYPE_LEVEL_LOW>, /* INT D on slot 3 is irq 8 */ 143f126890aSEmmanuel Vadot /* IDSEL 4 */ 144f126890aSEmmanuel Vadot <0x2000 0 0 3 &gpio0 6 IRQ_TYPE_LEVEL_LOW>; /* INT F on slot 4 is irq 6 */ 145f126890aSEmmanuel Vadot }; 146f126890aSEmmanuel Vadot }; 147f126890aSEmmanuel Vadot}; 148