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 | |
| 17 | memory { /* 128 MB */ |
| 18 | device_type = "memory"; |
| 19 | reg = <0x00000000 0x8000000>; |
| 20 | }; |
| 21 | |
| 22 | chosen { |
| 23 | bootargs = "console=ttyS0,19200n8"; |
| 24 | stdout-path = &uart0; |
| 25 | }; |
| 26 | |
| 27 | gpio_keys { |
| 28 | compatible = "gpio-keys"; |
| 29 | #address-cells = <1>; |
| 30 | #size-cells = <0>; |
| 31 | |
| 32 | button@29 { |
| 33 | debounce_interval = <50>; |
| 34 | wakeup-source; |
| 35 | linux,code = <KEY_SETUP>; |
| 36 | label = "Backup button"; |
Linus Walleij | f328c2e | 2017-07-05 16:59:33 +0200 | [diff] [blame] | 37 | /* Conflict with TVC */ |
Linus Walleij | fe7bf9d | 2017-01-21 13:26:58 +0100 | [diff] [blame] | 38 | gpios = <&gpio1 29 GPIO_ACTIVE_LOW>; |
| 39 | }; |
| 40 | button@31 { |
| 41 | debounce_interval = <50>; |
| 42 | wakeup-source; |
| 43 | linux,code = <KEY_RESTART>; |
| 44 | label = "Softreset button"; |
Linus Walleij | f328c2e | 2017-07-05 16:59:33 +0200 | [diff] [blame] | 45 | /* Conflict with TVC */ |
Linus Walleij | fe7bf9d | 2017-01-21 13:26:58 +0100 | [diff] [blame] | 46 | gpios = <&gpio1 31 GPIO_ACTIVE_LOW>; |
| 47 | }; |
| 48 | }; |
| 49 | |
| 50 | leds { |
| 51 | compatible = "gpio-leds"; |
| 52 | led@28 { |
| 53 | label = "nas4220b:orange:hdd"; |
Linus Walleij | f328c2e | 2017-07-05 16:59:33 +0200 | [diff] [blame] | 54 | /* Conflict with TVC */ |
Linus Walleij | fe7bf9d | 2017-01-21 13:26:58 +0100 | [diff] [blame] | 55 | gpios = <&gpio1 28 GPIO_ACTIVE_HIGH>; |
| 56 | default-state = "on"; |
| 57 | }; |
| 58 | led@30 { |
| 59 | label = "nas4220b:green:os"; |
Linus Walleij | f328c2e | 2017-07-05 16:59:33 +0200 | [diff] [blame] | 60 | /* Conflict with TVC */ |
Linus Walleij | fe7bf9d | 2017-01-21 13:26:58 +0100 | [diff] [blame] | 61 | gpios = <&gpio1 30 GPIO_ACTIVE_HIGH>; |
| 62 | default-state = "on"; |
| 63 | linux,default-trigger = "heartbeat"; |
| 64 | }; |
| 65 | }; |
| 66 | |
Linus Walleij | 66b2238 | 2017-11-19 10:46:16 +0100 | [diff] [blame] | 67 | mdio0: ethernet-phy { |
| 68 | compatible = "virtual,mdio-gpio"; |
| 69 | gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>, /* MDC */ |
| 70 | <&gpio0 21 GPIO_ACTIVE_HIGH>; /* MDIO */ |
| 71 | #address-cells = <1>; |
| 72 | #size-cells = <0>; |
| 73 | |
| 74 | phy0: ethernet-phy@1 { |
| 75 | reg = <1>; |
| 76 | device_type = "ethernet-phy"; |
| 77 | }; |
| 78 | }; |
| 79 | |
Linus Walleij | fe7bf9d | 2017-01-21 13:26:58 +0100 | [diff] [blame] | 80 | soc { |
| 81 | flash@30000000 { |
| 82 | status = "okay"; |
| 83 | /* 16MB of flash */ |
| 84 | reg = <0x30000000 0x01000000>; |
| 85 | |
| 86 | partition@0 { |
| 87 | label = "RedBoot"; |
| 88 | reg = <0x00000000 0x00020000>; |
| 89 | read-only; |
| 90 | }; |
| 91 | partition@20000 { |
| 92 | label = "Kernel"; |
| 93 | reg = <0x00020000 0x00300000>; |
| 94 | }; |
| 95 | partition@320000 { |
| 96 | label = "Ramdisk"; |
| 97 | reg = <0x00320000 0x00600000>; |
| 98 | }; |
| 99 | partition@920000 { |
| 100 | label = "Application"; |
| 101 | reg = <0x00920000 0x00600000>; |
| 102 | }; |
| 103 | partition@f20000 { |
| 104 | label = "VCTL"; |
| 105 | reg = <0x00f20000 0x00020000>; |
| 106 | read-only; |
| 107 | }; |
| 108 | partition@f40000 { |
| 109 | label = "CurConf"; |
| 110 | reg = <0x00f40000 0x000a0000>; |
| 111 | read-only; |
| 112 | }; |
| 113 | partition@fe0000 { |
| 114 | label = "FIS directory"; |
| 115 | reg = <0x00fe0000 0x00020000>; |
| 116 | read-only; |
| 117 | }; |
| 118 | }; |
Linus Walleij | 0d7a2c3 | 2017-03-20 23:39:26 +0100 | [diff] [blame] | 119 | |
Linus Walleij | f328c2e | 2017-07-05 16:59:33 +0200 | [diff] [blame] | 120 | syscon: syscon@40000000 { |
| 121 | pinctrl { |
| 122 | /* |
| 123 | * gpio1dgrp cover line 28-31 otherwise used |
| 124 | * by TVC. |
| 125 | */ |
| 126 | gpio1_default_pins: pinctrl-gpio1 { |
| 127 | mux { |
| 128 | function = "gpio1"; |
| 129 | groups = "gpio1dgrp"; |
| 130 | }; |
| 131 | }; |
Linus Walleij | 9522004 | 2017-11-19 11:04:23 +0100 | [diff] [blame^] | 132 | pinctrl-gmii { |
| 133 | mux { |
| 134 | function = "gmii"; |
| 135 | groups = "gmii_gmac0_grp"; |
| 136 | }; |
| 137 | /* Settings come from OpenWRT */ |
| 138 | conf0 { |
| 139 | pins = "R8 GMAC0 RXDV", "U11 GMAC1 RXDV"; |
| 140 | skew-delay = <0>; |
| 141 | }; |
| 142 | conf1 { |
| 143 | pins = "T8 GMAC0 RXC", "T11 GMAC1 RXC"; |
| 144 | skew-delay = <15>; |
| 145 | }; |
| 146 | conf2 { |
| 147 | pins = "P8 GMAC0 TXEN", "V11 GMAC1 TXEN"; |
| 148 | skew-delay = <7>; |
| 149 | }; |
| 150 | conf3 { |
| 151 | pins = "V7 GMAC0 TXC"; |
| 152 | skew-delay = <11>; |
| 153 | }; |
| 154 | conf4 { |
| 155 | pins = "P10 GMAC1 TXC"; |
| 156 | skew-delay = <10>; |
| 157 | }; |
| 158 | conf5 { |
| 159 | /* The data lines all have default skew */ |
| 160 | pins = "U8 GMAC0 RXD0", "V8 GMAC0 RXD1", |
| 161 | "P9 GMAC0 RXD2", "R9 GMAC0 RXD3", |
| 162 | "U7 GMAC0 TXD0", "T7 GMAC0 TXD1", |
| 163 | "R7 GMAC0 TXD2", "P7 GMAC0 TXD3", |
| 164 | "R11 GMAC1 RXD0", "P11 GMAC1 RXD1", |
| 165 | "V12 GMAC1 RXD2", "U12 GMAC1 RXD3", |
| 166 | "R10 GMAC1 TXD0", "T10 GMAC1 TXD1", |
| 167 | "U10 GMAC1 TXD2", "V10 GMAC1 TXD3"; |
| 168 | skew-delay = <7>; |
| 169 | }; |
| 170 | /* Set up drive strength on GMAC0 to 16 mA */ |
| 171 | conf6 { |
| 172 | groups = "gmii_gmac0_grp"; |
| 173 | drive-strength = <16>; |
| 174 | }; |
| 175 | }; |
Linus Walleij | f328c2e | 2017-07-05 16:59:33 +0200 | [diff] [blame] | 176 | }; |
| 177 | }; |
| 178 | |
Linus Walleij | 0d7a2c3 | 2017-03-20 23:39:26 +0100 | [diff] [blame] | 179 | sata: sata@46000000 { |
| 180 | cortina,gemini-ata-muxmode = <0>; |
| 181 | cortina,gemini-enable-sata-bridge; |
| 182 | status = "okay"; |
| 183 | }; |
| 184 | |
Linus Walleij | f328c2e | 2017-07-05 16:59:33 +0200 | [diff] [blame] | 185 | gpio1: gpio@4e000000 { |
| 186 | pinctrl-names = "default"; |
| 187 | pinctrl-0 = <&gpio1_default_pins>; |
| 188 | }; |
| 189 | |
Linus Walleij | 9522004 | 2017-11-19 11:04:23 +0100 | [diff] [blame^] | 190 | ethernet@60000000 { |
| 191 | status = "okay"; |
| 192 | |
| 193 | ethernet-port@0 { |
| 194 | phy-mode = "rgmii"; |
| 195 | phy-handle = <&phy0>; |
| 196 | }; |
| 197 | ethernet-port@1 { |
| 198 | /* Not used in this platform */ |
| 199 | }; |
| 200 | }; |
| 201 | |
Linus Walleij | 0d7a2c3 | 2017-03-20 23:39:26 +0100 | [diff] [blame] | 202 | ata@63000000 { |
| 203 | status = "okay"; |
| 204 | }; |
Linus Walleij | fe7bf9d | 2017-01-21 13:26:58 +0100 | [diff] [blame] | 205 | }; |
| 206 | }; |