0001 // SPDX-License-Identifier: ISC
0002 /*
0003 * Device Tree file for D-Link DSM-G600 revision A based on IXP420
0004 * NOTE: revision B of this device uses PowerPC and is NOT supported by
0005 * this device tree.
0006 *
0007 * Inspired by the boardfile by Rod Whitby, Tower Technologies, Alessandro Zummo
0008 * and Michael Westerhof.
0009 */
0010
0011 /dts-v1/;
0012
0013 #include "intel-ixp42x.dtsi"
0014 #include <dt-bindings/input/input.h>
0015
0016 / {
0017 model = "D-Link DSM-G600 rev A";
0018 compatible = "dlink,dsm-g600-a", "intel,ixp42x";
0019 #address-cells = <1>;
0020 #size-cells = <1>;
0021
0022 memory@0 {
0023 /* 64 MB SDRAM */
0024 device_type = "memory";
0025 reg = <0x00000000 0x4000000>;
0026 };
0027
0028 chosen {
0029 bootargs = "console=ttyS0,115200n8 root=/dev/sda1 rw rootwait";
0030 stdout-path = "uart0:115200n8";
0031 };
0032
0033 aliases {
0034 serial0 = &uart0;
0035 };
0036
0037 leds {
0038 compatible = "gpio-leds";
0039 led-power {
0040 label = "dsmg600:green:power";
0041 gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>;
0042 default-state = "on";
0043 linux,default-trigger = "heartbeat";
0044 };
0045 led-wlan {
0046 label = "dsmg600:green:wlan";
0047 /* CHECKME: flagged as active low in the old board file */
0048 gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
0049 default-state = "on";
0050 /* We don't have WLAN trigger in the kernel (yet) */
0051 linux,default-trigger = "netdev";
0052 };
0053 };
0054
0055 gpio_keys {
0056 compatible = "gpio-keys";
0057
0058 button-reset {
0059 wakeup-source;
0060 linux,code = <KEY_ESC>;
0061 label = "reset";
0062 gpios = <&gpio0 3 GPIO_ACTIVE_LOW>;
0063 };
0064 };
0065
0066 gpio_keys_polled {
0067 compatible = "gpio-keys-polled";
0068
0069 /*
0070 * According to the board file this key cannot handle interrupts and
0071 * need to be polled. Investigate if this is really the case or if
0072 * this can be moved adjacent to the ordinary gpio-keys above.
0073 */
0074 button-power {
0075 wakeup-source;
0076 linux,code = <KEY_POWER>;
0077 label = "power";
0078 gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>;
0079 };
0080 };
0081
0082 i2c {
0083 compatible = "i2c-gpio";
0084 sda-gpios = <&gpio0 5 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
0085 scl-gpios = <&gpio0 4 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
0086 #address-cells = <1>;
0087 #size-cells = <0>;
0088
0089 rtc@51 {
0090 compatible = "nxp,pcf8563";
0091 reg = <0x51>;
0092 };
0093 };
0094
0095 gpio-poweroff {
0096 compatible = "gpio-poweroff";
0097 gpios = <&gpio0 2 GPIO_ACTIVE_HIGH>;
0098 timeout-ms = <5000>;
0099 };
0100
0101 soc {
0102 bus@c4000000 {
0103 /* The first 16MB region at CS0 on the expansion bus */
0104 flash@0,0 {
0105 compatible = "intel,ixp4xx-flash", "cfi-flash";
0106 bank-width = <2>;
0107 /*
0108 * 16 MB of Flash in 128 0x20000 sized blocks
0109 * mapped in at CS0.
0110 */
0111 reg = <0 0x00000000 0x1000000>;
0112
0113 partitions {
0114 compatible = "redboot-fis";
0115 /*
0116 * A boot log says the directory is at 0xfe0000
0117 * 0x7f * 0x20000 = 0xfe0000
0118 */
0119 fis-index-block = <0x7f>;
0120 };
0121 };
0122 };
0123
0124 pci@c0000000 {
0125 status = "ok";
0126
0127 /*
0128 * Taken from DSM-G600 PCI boardfile (dsmg600-pci.c)
0129 * We have slots (IDSEL) 1, 2, 3, 4 and pins 1, 2 and 3.
0130 * Only slot 3 have three IRQs.
0131 */
0132 #interrupt-cells = <1>;
0133 interrupt-map-mask = <0xf800 0 0 7>;
0134 interrupt-map =
0135 /* IDSEL 1 */
0136 <0x0800 0 0 1 &gpio0 7 IRQ_TYPE_LEVEL_LOW>, /* INT E on slot 1 is irq 7 */
0137 /* IDSEL 2 */
0138 <0x1000 0 0 1 &gpio0 11 IRQ_TYPE_LEVEL_LOW>, /* INT A on slot 2 is irq 11 */
0139 /* IDSEL 3 */
0140 <0x1800 0 0 1 &gpio0 10 IRQ_TYPE_LEVEL_LOW>, /* INT B on slot 3 is irq 10 */
0141 <0x1800 0 0 2 &gpio0 9 IRQ_TYPE_LEVEL_LOW>, /* INT C on slot 3 is irq 9 */
0142 <0x1800 0 0 3 &gpio0 8 IRQ_TYPE_LEVEL_LOW>, /* INT D on slot 3 is irq 8 */
0143 /* IDSEL 4 */
0144 <0x2000 0 0 3 &gpio0 6 IRQ_TYPE_LEVEL_LOW>; /* INT F on slot 4 is irq 6 */
0145 };
0146 };
0147 };