| 1 |
// SPDX-License-Identifier: (GPL-2.0-or-later OR MIT) |
| 2 |
|
| 3 |
/dts-v1/; |
| 4 |
#include <dt-bindings/gpio/gpio.h> |
| 5 |
#include <dt-bindings/input/input.h> |
| 6 |
#include "armada-372x.dtsi" |
| 7 |
|
| 8 |
/ { |
| 9 |
model = "GL.iNet GL-MV1000"; |
| 10 |
compatible = "glinet,gl-mv1000", "marvell,armada3720", "marvell,armada3710"; |
| 11 |
|
| 12 |
aliases { |
| 13 |
led-boot = &led_power; |
| 14 |
led-failsafe = &led_power; |
| 15 |
led-running = &led_power; |
| 16 |
led-upgrade = &led_power; |
| 17 |
}; |
| 18 |
|
| 19 |
chosen { |
| 20 |
stdout-path = "serial0:115200n8"; |
| 21 |
}; |
| 22 |
|
| 23 |
memory@0 { |
| 24 |
device_type = "memory"; |
| 25 |
reg = <0x00000000 0x00000000 0x00000000 0x20000000>; |
| 26 |
}; |
| 27 |
|
| 28 |
vcc_sd_reg1: regulator { |
| 29 |
compatible = "regulator-fixed"; |
| 30 |
regulator-name = "vcc_sd1"; |
| 31 |
regulator-min-microvolt = <3300000>; |
| 32 |
regulator-max-microvolt = <3300000>; |
| 33 |
regulator-boot-on; |
| 34 |
}; |
| 35 |
|
| 36 |
keys { |
| 37 |
compatible = "gpio-keys"; |
| 38 |
|
| 39 |
button-reset { |
| 40 |
label = "reset"; |
| 41 |
linux,code = <KEY_RESTART>; |
| 42 |
gpios = <&gpionb 14 GPIO_ACTIVE_LOW>; |
| 43 |
}; |
| 44 |
|
| 45 |
switch { |
| 46 |
label = "switch"; |
| 47 |
linux,code = <BTN_0>; |
| 48 |
gpios = <&gpiosb 22 GPIO_ACTIVE_LOW>; |
| 49 |
}; |
| 50 |
}; |
| 51 |
|
| 52 |
leds { |
| 53 |
compatible = "gpio-leds"; |
| 54 |
|
| 55 |
led-vpn { |
| 56 |
label = "green:vpn"; |
| 57 |
gpios = <&gpionb 11 GPIO_ACTIVE_LOW>; |
| 58 |
}; |
| 59 |
|
| 60 |
led-wan { |
| 61 |
label = "green:wan"; |
| 62 |
gpios = <&gpionb 12 GPIO_ACTIVE_LOW>; |
| 63 |
}; |
| 64 |
|
| 65 |
led_power: led-power { |
| 66 |
label = "green:power"; |
| 67 |
gpios = <&gpionb 13 GPIO_ACTIVE_LOW>; |
| 68 |
default-state = "on"; |
| 69 |
}; |
| 70 |
}; |
| 71 |
}; |
| 72 |
|
| 73 |
&spi0 { |
| 74 |
status = "okay"; |
| 75 |
|
| 76 |
flash@0 { |
| 77 |
reg = <0>; |
| 78 |
compatible = "jedec,spi-nor"; |
| 79 |
spi-max-frequency = <104000000>; |
| 80 |
m25p,fast-read; |
| 81 |
partitions { |
| 82 |
compatible = "fixed-partitions"; |
| 83 |
#address-cells = <1>; |
| 84 |
#size-cells = <1>; |
| 85 |
|
| 86 |
partition@0 { |
| 87 |
label = "firmware"; |
| 88 |
reg = <0 0xf0000>; |
| 89 |
}; |
| 90 |
|
| 91 |
partition@f0000 { |
| 92 |
label = "u-boot-env"; |
| 93 |
reg = <0xf0000 0x8000>; |
| 94 |
}; |
| 95 |
|
| 96 |
factory: partition@f8000 { |
| 97 |
label = "factory"; |
| 98 |
reg = <0xf8000 0x8000>; |
| 99 |
read-only; |
| 100 |
}; |
| 101 |
|
| 102 |
partition@100000 { |
| 103 |
label = "dtb"; |
| 104 |
reg = <0x100000 0x10000>; |
| 105 |
read-only; |
| 106 |
}; |
| 107 |
|
| 108 |
partition@110000 { |
| 109 |
label = "rescue"; |
| 110 |
reg = <0x110000 0x1000000>; |
| 111 |
}; |
| 112 |
}; |
| 113 |
}; |
| 114 |
}; |
| 115 |
|
| 116 |
&sdhci1 { |
| 117 |
wp-inverted; |
| 118 |
bus-width = <4>; |
| 119 |
cd-gpios = <&gpionb 17 GPIO_ACTIVE_LOW>; |
| 120 |
marvell,pad-type = "sd"; |
| 121 |
no-1-8-v; |
| 122 |
vqmmc-supply = <&vcc_sd_reg1>; |
| 123 |
status = "okay"; |
| 124 |
}; |
| 125 |
|
| 126 |
&sdhci0 { |
| 127 |
bus-width = <8>; |
| 128 |
mmc-ddr-1_8v; |
| 129 |
mmc-hs400-1_8v; |
| 130 |
non-removable; |
| 131 |
no-sd; |
| 132 |
no-sdio; |
| 133 |
marvell,pad-type = "fixed-1-8v"; |
| 134 |
status = "okay"; |
| 135 |
}; |
| 136 |
|
| 137 |
&usb3 { |
| 138 |
status = "okay"; |
| 139 |
}; |
| 140 |
|
| 141 |
&usb2 { |
| 142 |
status = "okay"; |
| 143 |
}; |
| 144 |
|
| 145 |
&uart0 { |
| 146 |
status = "okay"; |
| 147 |
}; |
| 148 |
|
| 149 |
&mdio { |
| 150 |
switch0: ethernet-switch@1 { |
| 151 |
compatible = "marvell,mv88e6085"; |
| 152 |
reg = <1>; |
| 153 |
|
| 154 |
dsa,member = <0 0>; |
| 155 |
|
| 156 |
ports: ethernet-ports { |
| 157 |
#address-cells = <1>; |
| 158 |
#size-cells = <0>; |
| 159 |
|
| 160 |
ethernet-port@0 { |
| 161 |
reg = <0>; |
| 162 |
label = "cpu"; |
| 163 |
ethernet = <ð0>; |
| 164 |
}; |
| 165 |
|
| 166 |
ethernet-port@1 { |
| 167 |
reg = <1>; |
| 168 |
label = "wan"; |
| 169 |
phy-handle = <&switch0phy0>; |
| 170 |
}; |
| 171 |
|
| 172 |
ethernet-port@2 { |
| 173 |
reg = <2>; |
| 174 |
label = "lan0"; |
| 175 |
phy-handle = <&switch0phy1>; |
| 176 |
|
| 177 |
nvmem-cells = <&macaddr_factory_6>; |
| 178 |
nvmem-cell-names = "mac-address"; |
| 179 |
}; |
| 180 |
|
| 181 |
ethernet-port@3 { |
| 182 |
reg = <3>; |
| 183 |
label = "lan1"; |
| 184 |
phy-handle = <&switch0phy2>; |
| 185 |
|
| 186 |
nvmem-cells = <&macaddr_factory_6>; |
| 187 |
nvmem-cell-names = "mac-address"; |
| 188 |
}; |
| 189 |
}; |
| 190 |
|
| 191 |
mdio { |
| 192 |
#address-cells = <1>; |
| 193 |
#size-cells = <0>; |
| 194 |
|
| 195 |
switch0phy0: ethernet-phy@11 { |
| 196 |
reg = <0x11>; |
| 197 |
}; |
| 198 |
switch0phy1: ethernet-phy@12 { |
| 199 |
reg = <0x12>; |
| 200 |
}; |
| 201 |
switch0phy2: ethernet-phy@13 { |
| 202 |
reg = <0x13>; |
| 203 |
}; |
| 204 |
}; |
| 205 |
}; |
| 206 |
}; |
| 207 |
|
| 208 |
ð0 { |
| 209 |
nvmem-cells = <&macaddr_factory_0>; |
| 210 |
nvmem-cell-names = "mac-address"; |
| 211 |
phy-mode = "rgmii-id"; |
| 212 |
status = "okay"; |
| 213 |
|
| 214 |
fixed-link { |
| 215 |
speed = <1000>; |
| 216 |
full-duplex; |
| 217 |
}; |
| 218 |
}; |
| 219 |
|
| 220 |
&factory { |
| 221 |
compatible = "nvmem-cells"; |
| 222 |
#address-cells = <1>; |
| 223 |
#size-cells = <1>; |
| 224 |
|
| 225 |
macaddr_factory_0: macaddr@0 { |
| 226 |
reg = <0x0 0x6>; |
| 227 |
}; |
| 228 |
|
| 229 |
macaddr_factory_6: macaddr@6 { |
| 230 |
reg = <0x6 0x6>; |
| 231 |
}; |
| 232 |
}; |