Greg Kroah-Hartman | b244131 | 2017-11-01 15:07:57 +0100 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0 |
Linus Walleij | fe7bf9d | 2017-01-21 13:26:58 +0100 | [diff] [blame] | 2 | /* |
| 3 | * Device Tree file for the Gemini-based Raidsonic NAS IB-4220-B |
| 4 | */ |
| 5 | |
| 6 | /dts-v1/; |
| 7 | |
| 8 | #include "gemini.dtsi" |
| 9 | #include <dt-bindings/input/input.h> |
| 10 | |
| 11 | / { |
| 12 | model = "Raidsonic NAS IB-4220-B"; |
| 13 | compatible = "raidsonic,ib-4220-b", "cortina,gemini"; |
| 14 | #address-cells = <1>; |
| 15 | #size-cells = <1>; |
| 16 | |
Linus Walleij | e7c8815 | 2018-05-06 15:39:00 +0200 | [diff] [blame] | 17 | memory@0 { /* 128 MB */ |
Linus Walleij | fe7bf9d | 2017-01-21 13:26:58 +0100 | [diff] [blame] | 18 | device_type = "memory"; |
| 19 | reg = <0x00000000 0x8000000>; |
| 20 | }; |
| 21 | |
| 22 | chosen { |
Linus Walleij | e8547e1 | 2019-07-12 22:59:39 +0200 | [diff] [blame] | 23 | bootargs = "console=ttyS0,19200n8 root=/dev/mtdblock3 rw rootfstype=squashfs,jffs2 rootwait"; |
Linus Walleij | fe7bf9d | 2017-01-21 13:26:58 +0100 | [diff] [blame] | 24 | stdout-path = &uart0; |
| 25 | }; |
| 26 | |
| 27 | gpio_keys { |
| 28 | compatible = "gpio-keys"; |
Linus Walleij | fe7bf9d | 2017-01-21 13:26:58 +0100 | [diff] [blame] | 29 | |
Linus Walleij | e7c8815 | 2018-05-06 15:39:00 +0200 | [diff] [blame] | 30 | button-setup { |
Linus Walleij | f18fd0f | 2018-08-26 12:45:05 +0200 | [diff] [blame] | 31 | debounce-interval = <100>; |
Linus Walleij | fe7bf9d | 2017-01-21 13:26:58 +0100 | [diff] [blame] | 32 | wakeup-source; |
| 33 | linux,code = <KEY_SETUP>; |
| 34 | label = "Backup button"; |
Linus Walleij | f328c2e | 2017-07-05 16:59:33 +0200 | [diff] [blame] | 35 | /* Conflict with TVC */ |
Linus Walleij | fe7bf9d | 2017-01-21 13:26:58 +0100 | [diff] [blame] | 36 | gpios = <&gpio1 29 GPIO_ACTIVE_LOW>; |
| 37 | }; |
Linus Walleij | e7c8815 | 2018-05-06 15:39:00 +0200 | [diff] [blame] | 38 | button-restart { |
Linus Walleij | f18fd0f | 2018-08-26 12:45:05 +0200 | [diff] [blame] | 39 | debounce-interval = <100>; |
Linus Walleij | fe7bf9d | 2017-01-21 13:26:58 +0100 | [diff] [blame] | 40 | wakeup-source; |
| 41 | linux,code = <KEY_RESTART>; |
| 42 | label = "Softreset button"; |
Linus Walleij | f328c2e | 2017-07-05 16:59:33 +0200 | [diff] [blame] | 43 | /* Conflict with TVC */ |
Linus Walleij | fe7bf9d | 2017-01-21 13:26:58 +0100 | [diff] [blame] | 44 | gpios = <&gpio1 31 GPIO_ACTIVE_LOW>; |
| 45 | }; |
| 46 | }; |
| 47 | |
| 48 | leds { |
| 49 | compatible = "gpio-leds"; |
Linus Walleij | e7c8815 | 2018-05-06 15:39:00 +0200 | [diff] [blame] | 50 | led-orange-hdd { |
Linus Walleij | fe7bf9d | 2017-01-21 13:26:58 +0100 | [diff] [blame] | 51 | label = "nas4220b:orange:hdd"; |
Linus Walleij | f328c2e | 2017-07-05 16:59:33 +0200 | [diff] [blame] | 52 | /* Conflict with TVC */ |
Linus Walleij | fe7bf9d | 2017-01-21 13:26:58 +0100 | [diff] [blame] | 53 | gpios = <&gpio1 28 GPIO_ACTIVE_HIGH>; |
| 54 | default-state = "on"; |
| 55 | }; |
Linus Walleij | e7c8815 | 2018-05-06 15:39:00 +0200 | [diff] [blame] | 56 | led-green-os { |
Linus Walleij | fe7bf9d | 2017-01-21 13:26:58 +0100 | [diff] [blame] | 57 | label = "nas4220b:green:os"; |
Linus Walleij | f328c2e | 2017-07-05 16:59:33 +0200 | [diff] [blame] | 58 | /* Conflict with TVC */ |
Linus Walleij | fe7bf9d | 2017-01-21 13:26:58 +0100 | [diff] [blame] | 59 | gpios = <&gpio1 30 GPIO_ACTIVE_HIGH>; |
| 60 | default-state = "on"; |
| 61 | linux,default-trigger = "heartbeat"; |
| 62 | }; |
| 63 | }; |
| 64 | |
Linus Walleij | 66b2238 | 2017-11-19 10:46:16 +0100 | [diff] [blame] | 65 | mdio0: ethernet-phy { |
| 66 | compatible = "virtual,mdio-gpio"; |
| 67 | gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>, /* MDC */ |
| 68 | <&gpio0 21 GPIO_ACTIVE_HIGH>; /* MDIO */ |
| 69 | #address-cells = <1>; |
| 70 | #size-cells = <0>; |
| 71 | |
| 72 | phy0: ethernet-phy@1 { |
| 73 | reg = <1>; |
| 74 | device_type = "ethernet-phy"; |
| 75 | }; |
| 76 | }; |
| 77 | |
Linus Walleij | fe7bf9d | 2017-01-21 13:26:58 +0100 | [diff] [blame] | 78 | soc { |
| 79 | flash@30000000 { |
| 80 | status = "okay"; |
| 81 | /* 16MB of flash */ |
| 82 | reg = <0x30000000 0x01000000>; |
| 83 | |
Linus Walleij | b5a923f | 2019-07-12 22:57:11 +0200 | [diff] [blame] | 84 | partitions { |
| 85 | compatible = "redboot-fis"; |
| 86 | /* Eraseblock at 0xfe0000 */ |
| 87 | fis-index-block = <0x1fc>; |
Linus Walleij | fe7bf9d | 2017-01-21 13:26:58 +0100 | [diff] [blame] | 88 | }; |
| 89 | }; |
Linus Walleij | 0d7a2c3 | 2017-03-20 23:39:26 +0100 | [diff] [blame] | 90 | |
Linus Walleij | f328c2e | 2017-07-05 16:59:33 +0200 | [diff] [blame] | 91 | syscon: syscon@40000000 { |
| 92 | pinctrl { |
| 93 | /* |
| 94 | * gpio1dgrp cover line 28-31 otherwise used |
| 95 | * by TVC. |
| 96 | */ |
| 97 | gpio1_default_pins: pinctrl-gpio1 { |
| 98 | mux { |
| 99 | function = "gpio1"; |
| 100 | groups = "gpio1dgrp"; |
| 101 | }; |
| 102 | }; |
Linus Walleij | 9522004 | 2017-11-19 11:04:23 +0100 | [diff] [blame] | 103 | pinctrl-gmii { |
| 104 | mux { |
| 105 | function = "gmii"; |
| 106 | groups = "gmii_gmac0_grp"; |
| 107 | }; |
Linus Walleij | 1c3bc8f | 2018-04-17 10:53:11 +0200 | [diff] [blame] | 108 | /* Settings come from OpenWRT, pins on SL3516 */ |
Linus Walleij | 9522004 | 2017-11-19 11:04:23 +0100 | [diff] [blame] | 109 | conf0 { |
Linus Walleij | 1c3bc8f | 2018-04-17 10:53:11 +0200 | [diff] [blame] | 110 | pins = "V8 GMAC0 RXDV", "T10 GMAC1 RXDV"; |
Linus Walleij | 9522004 | 2017-11-19 11:04:23 +0100 | [diff] [blame] | 111 | skew-delay = <0>; |
| 112 | }; |
| 113 | conf1 { |
Linus Walleij | 1c3bc8f | 2018-04-17 10:53:11 +0200 | [diff] [blame] | 114 | pins = "Y7 GMAC0 RXC", "Y11 GMAC1 RXC"; |
Linus Walleij | 9522004 | 2017-11-19 11:04:23 +0100 | [diff] [blame] | 115 | skew-delay = <15>; |
| 116 | }; |
| 117 | conf2 { |
Linus Walleij | 1c3bc8f | 2018-04-17 10:53:11 +0200 | [diff] [blame] | 118 | pins = "T8 GMAC0 TXEN", "W11 GMAC1 TXEN"; |
Linus Walleij | 9522004 | 2017-11-19 11:04:23 +0100 | [diff] [blame] | 119 | skew-delay = <7>; |
| 120 | }; |
| 121 | conf3 { |
Linus Walleij | 1c3bc8f | 2018-04-17 10:53:11 +0200 | [diff] [blame] | 122 | pins = "U8 GMAC0 TXC"; |
Linus Walleij | 9522004 | 2017-11-19 11:04:23 +0100 | [diff] [blame] | 123 | skew-delay = <11>; |
| 124 | }; |
| 125 | conf4 { |
Linus Walleij | 1c3bc8f | 2018-04-17 10:53:11 +0200 | [diff] [blame] | 126 | pins = "V11 GMAC1 TXC"; |
Linus Walleij | 9522004 | 2017-11-19 11:04:23 +0100 | [diff] [blame] | 127 | skew-delay = <10>; |
| 128 | }; |
| 129 | conf5 { |
| 130 | /* The data lines all have default skew */ |
Linus Walleij | 1c3bc8f | 2018-04-17 10:53:11 +0200 | [diff] [blame] | 131 | pins = "W8 GMAC0 RXD0", "V9 GMAC0 RXD1", |
| 132 | "Y8 GMAC0 RXD2", "U9 GMAC0 RXD3", |
| 133 | "T7 GMAC0 TXD0", "U6 GMAC0 TXD1", |
| 134 | "V7 GMAC0 TXD2", "U7 GMAC0 TXD3", |
| 135 | "Y12 GMAC1 RXD0", "V12 GMAC1 RXD1", |
| 136 | "T11 GMAC1 RXD2", "W12 GMAC1 RXD3", |
| 137 | "U10 GMAC1 TXD0", "Y10 GMAC1 TXD1", |
| 138 | "W10 GMAC1 TXD2", "T9 GMAC1 TXD3"; |
Linus Walleij | 9522004 | 2017-11-19 11:04:23 +0100 | [diff] [blame] | 139 | skew-delay = <7>; |
| 140 | }; |
| 141 | /* Set up drive strength on GMAC0 to 16 mA */ |
| 142 | conf6 { |
| 143 | groups = "gmii_gmac0_grp"; |
| 144 | drive-strength = <16>; |
| 145 | }; |
| 146 | }; |
Linus Walleij | f328c2e | 2017-07-05 16:59:33 +0200 | [diff] [blame] | 147 | }; |
| 148 | }; |
| 149 | |
Linus Walleij | 0d7a2c3 | 2017-03-20 23:39:26 +0100 | [diff] [blame] | 150 | sata: sata@46000000 { |
| 151 | cortina,gemini-ata-muxmode = <0>; |
| 152 | cortina,gemini-enable-sata-bridge; |
| 153 | status = "okay"; |
| 154 | }; |
| 155 | |
Linus Walleij | f328c2e | 2017-07-05 16:59:33 +0200 | [diff] [blame] | 156 | gpio1: gpio@4e000000 { |
| 157 | pinctrl-names = "default"; |
| 158 | pinctrl-0 = <&gpio1_default_pins>; |
| 159 | }; |
| 160 | |
Linus Walleij | 9522004 | 2017-11-19 11:04:23 +0100 | [diff] [blame] | 161 | ethernet@60000000 { |
| 162 | status = "okay"; |
| 163 | |
| 164 | ethernet-port@0 { |
| 165 | phy-mode = "rgmii"; |
| 166 | phy-handle = <&phy0>; |
| 167 | }; |
| 168 | ethernet-port@1 { |
| 169 | /* Not used in this platform */ |
| 170 | }; |
| 171 | }; |
| 172 | |
Linus Walleij | 67ac654 | 2019-12-31 18:14:28 +0100 | [diff] [blame] | 173 | ide@63000000 { |
Linus Walleij | 0d7a2c3 | 2017-03-20 23:39:26 +0100 | [diff] [blame] | 174 | status = "okay"; |
| 175 | }; |
Linus Walleij | 56cb2d8 | 2018-05-05 16:38:52 +0200 | [diff] [blame] | 176 | |
Linus Walleij | 67ac654 | 2019-12-31 18:14:28 +0100 | [diff] [blame] | 177 | ide@63400000 { |
Linus Walleij | 56cb2d8 | 2018-05-05 16:38:52 +0200 | [diff] [blame] | 178 | status = "okay"; |
| 179 | }; |
Linus Walleij | d6d0cef | 2017-04-21 20:50:22 +0200 | [diff] [blame] | 180 | |
| 181 | usb@68000000 { |
| 182 | status = "okay"; |
| 183 | }; |
| 184 | |
| 185 | usb@69000000 { |
| 186 | status = "okay"; |
| 187 | }; |
Linus Walleij | fe7bf9d | 2017-01-21 13:26:58 +0100 | [diff] [blame] | 188 | }; |
| 189 | }; |