| 1 |
// SPDX-License-Identifier: GPL-2.0 |
| 2 |
/* |
| 3 |
* Copyright (c) 2017-2018 MediaTek Inc. |
| 4 |
* Author: Sean Wang <[email protected]> |
| 5 |
* |
| 6 |
*/ |
| 7 |
|
| 8 |
/dts-v1/; |
| 9 |
#include <dt-bindings/input/input.h> |
| 10 |
#include "mt7623a.dtsi" |
| 11 |
#include "mt6323.dtsi" |
| 12 |
|
| 13 |
/ { |
| 14 |
model = "MediaTek MT7623A with NAND reference board"; |
| 15 |
compatible = "mediatek,mt7623a-rfb-nand", "mediatek,mt7623"; |
| 16 |
|
| 17 |
aliases { |
| 18 |
serial2 = &uart2; |
| 19 |
}; |
| 20 |
|
| 21 |
chosen { |
| 22 |
stdout-path = "serial2:115200n8"; |
| 23 |
}; |
| 24 |
|
| 25 |
cpus { |
| 26 |
cpu@0 { |
| 27 |
proc-supply = <&mt6323_vproc_reg>; |
| 28 |
}; |
| 29 |
|
| 30 |
cpu@1 { |
| 31 |
proc-supply = <&mt6323_vproc_reg>; |
| 32 |
}; |
| 33 |
|
| 34 |
cpu@2 { |
| 35 |
proc-supply = <&mt6323_vproc_reg>; |
| 36 |
}; |
| 37 |
|
| 38 |
cpu@3 { |
| 39 |
proc-supply = <&mt6323_vproc_reg>; |
| 40 |
}; |
| 41 |
}; |
| 42 |
|
| 43 |
gpio-keys { |
| 44 |
compatible = "gpio-keys"; |
| 45 |
pinctrl-names = "default"; |
| 46 |
pinctrl-0 = <&key_pins_a>; |
| 47 |
|
| 48 |
button-factory { |
| 49 |
label = "factory"; |
| 50 |
linux,code = <BTN_0>; |
| 51 |
gpios = <&pio 256 GPIO_ACTIVE_LOW>; |
| 52 |
}; |
| 53 |
|
| 54 |
button-wps { |
| 55 |
label = "wps"; |
| 56 |
linux,code = <KEY_WPS_BUTTON>; |
| 57 |
gpios = <&pio 257 GPIO_ACTIVE_HIGH>; |
| 58 |
}; |
| 59 |
}; |
| 60 |
|
| 61 |
memory@80000000 { |
| 62 |
device_type = "memory"; |
| 63 |
reg = <0 0x80000000 0 0x20000000>; |
| 64 |
}; |
| 65 |
|
| 66 |
reg_1p8v: regulator-1p8v { |
| 67 |
compatible = "regulator-fixed"; |
| 68 |
regulator-name = "fixed-1.8V"; |
| 69 |
regulator-min-microvolt = <1800000>; |
| 70 |
regulator-max-microvolt = <1800000>; |
| 71 |
regulator-boot-on; |
| 72 |
regulator-always-on; |
| 73 |
}; |
| 74 |
|
| 75 |
reg_3p3v: regulator-3p3v { |
| 76 |
compatible = "regulator-fixed"; |
| 77 |
regulator-name = "fixed-3.3V"; |
| 78 |
regulator-min-microvolt = <3300000>; |
| 79 |
regulator-max-microvolt = <3300000>; |
| 80 |
regulator-boot-on; |
| 81 |
regulator-always-on; |
| 82 |
}; |
| 83 |
|
| 84 |
reg_5v: regulator-5v { |
| 85 |
compatible = "regulator-fixed"; |
| 86 |
regulator-name = "fixed-5V"; |
| 87 |
regulator-min-microvolt = <5000000>; |
| 88 |
regulator-max-microvolt = <5000000>; |
| 89 |
regulator-boot-on; |
| 90 |
regulator-always-on; |
| 91 |
}; |
| 92 |
|
| 93 |
sound { |
| 94 |
compatible = "mediatek,mt2701-wm8960-machine"; |
| 95 |
mediatek,platform = <&afe>; |
| 96 |
audio-routing = |
| 97 |
"Headphone", "HP_L", |
| 98 |
"Headphone", "HP_R", |
| 99 |
"LINPUT1", "AMIC", |
| 100 |
"RINPUT1", "AMIC"; |
| 101 |
mediatek,audio-codec = <&wm8960>; |
| 102 |
pinctrl-names = "default"; |
| 103 |
pinctrl-0 = <&i2s0_pins_a>; |
| 104 |
}; |
| 105 |
}; |
| 106 |
|
| 107 |
&bch { |
| 108 |
status = "okay"; |
| 109 |
}; |
| 110 |
|
| 111 |
&btif { |
| 112 |
status = "okay"; |
| 113 |
}; |
| 114 |
|
| 115 |
&crypto { |
| 116 |
status = "okay"; |
| 117 |
}; |
| 118 |
|
| 119 |
&switch0 { |
| 120 |
ports { |
| 121 |
port@0 { |
| 122 |
status = "okay"; |
| 123 |
label = "lan0"; |
| 124 |
}; |
| 125 |
|
| 126 |
port@1 { |
| 127 |
status = "okay"; |
| 128 |
label = "lan1"; |
| 129 |
}; |
| 130 |
|
| 131 |
port@2 { |
| 132 |
status = "okay"; |
| 133 |
label = "lan2"; |
| 134 |
}; |
| 135 |
|
| 136 |
port@3 { |
| 137 |
status = "okay"; |
| 138 |
label = "lan3"; |
| 139 |
}; |
| 140 |
|
| 141 |
port@4 { |
| 142 |
status = "okay"; |
| 143 |
label = "wan"; |
| 144 |
}; |
| 145 |
}; |
| 146 |
}; |
| 147 |
|
| 148 |
&i2c0 { |
| 149 |
pinctrl-names = "default"; |
| 150 |
pinctrl-0 = <&i2c0_pins_a>; |
| 151 |
status = "okay"; |
| 152 |
}; |
| 153 |
|
| 154 |
&i2c1 { |
| 155 |
pinctrl-names = "default"; |
| 156 |
pinctrl-0 = <&i2c1_pins_b>; |
| 157 |
status = "okay"; |
| 158 |
|
| 159 |
wm8960: wm8960@1a { |
| 160 |
compatible = "wlf,wm8960"; |
| 161 |
reg = <0x1a>; |
| 162 |
}; |
| 163 |
}; |
| 164 |
|
| 165 |
&i2c2 { |
| 166 |
pinctrl-names = "default"; |
| 167 |
pinctrl-0 = <&i2c2_pins_b>; |
| 168 |
status = "okay"; |
| 169 |
}; |
| 170 |
|
| 171 |
&mmc1 { |
| 172 |
pinctrl-names = "default", "state_uhs"; |
| 173 |
pinctrl-0 = <&mmc1_pins_default>; |
| 174 |
pinctrl-1 = <&mmc1_pins_uhs>; |
| 175 |
status = "okay"; |
| 176 |
bus-width = <4>; |
| 177 |
max-frequency = <50000000>; |
| 178 |
cap-sd-highspeed; |
| 179 |
cd-gpios = <&pio 261 GPIO_ACTIVE_LOW>; |
| 180 |
vmmc-supply = <®_3p3v>; |
| 181 |
vqmmc-supply = <®_3p3v>; |
| 182 |
}; |
| 183 |
|
| 184 |
&nandc { |
| 185 |
pinctrl-names = "default"; |
| 186 |
pinctrl-0 = <&nand_pins_default>; |
| 187 |
status = "okay"; |
| 188 |
|
| 189 |
nand@0 { |
| 190 |
reg = <0>; |
| 191 |
spare_per_sector = <64>; |
| 192 |
nand-ecc-mode = "hw"; |
| 193 |
nand-ecc-strength = <12>; |
| 194 |
nand-ecc-step-size = <1024>; |
| 195 |
|
| 196 |
partitions { |
| 197 |
compatible = "fixed-partitions"; |
| 198 |
#address-cells = <1>; |
| 199 |
#size-cells = <1>; |
| 200 |
|
| 201 |
partition@0 { |
| 202 |
label = "preloader"; |
| 203 |
reg = <0x0 0x40000>; |
| 204 |
}; |
| 205 |
|
| 206 |
partition@40000 { |
| 207 |
label = "uboot"; |
| 208 |
reg = <0x40000 0x80000>; |
| 209 |
}; |
| 210 |
|
| 211 |
partition@c0000 { |
| 212 |
label = "uboot-env"; |
| 213 |
reg = <0xC0000 0x40000>; |
| 214 |
}; |
| 215 |
|
| 216 |
partition@140000 { |
| 217 |
label = "bootimg"; |
| 218 |
reg = <0x140000 0x2000000>; |
| 219 |
}; |
| 220 |
|
| 221 |
partition@2140000 { |
| 222 |
label = "recovery"; |
| 223 |
reg = <0x2140000 0x2000000>; |
| 224 |
}; |
| 225 |
|
| 226 |
partition@4140000 { |
| 227 |
label = "rootfs"; |
| 228 |
reg = <0x4140000 0x1000000>; |
| 229 |
}; |
| 230 |
|
| 231 |
partition@5140000 { |
| 232 |
label = "usrdata"; |
| 233 |
reg = <0x5140000 0x1000000>; |
| 234 |
}; |
| 235 |
}; |
| 236 |
}; |
| 237 |
}; |
| 238 |
|
| 239 |
&pcie { |
| 240 |
pinctrl-names = "default"; |
| 241 |
pinctrl-0 = <&pcie_default>; |
| 242 |
status = "okay"; |
| 243 |
|
| 244 |
pcie@0,0 { |
| 245 |
status = "okay"; |
| 246 |
}; |
| 247 |
|
| 248 |
pcie@1,0 { |
| 249 |
status = "okay"; |
| 250 |
}; |
| 251 |
}; |
| 252 |
|
| 253 |
&pcie0_phy { |
| 254 |
status = "okay"; |
| 255 |
}; |
| 256 |
|
| 257 |
&pcie1_phy { |
| 258 |
status = "okay"; |
| 259 |
}; |
| 260 |
|
| 261 |
&pwm { |
| 262 |
pinctrl-names = "default"; |
| 263 |
pinctrl-0 = <&pwm_pins_a>; |
| 264 |
status = "okay"; |
| 265 |
}; |
| 266 |
|
| 267 |
&spi0 { |
| 268 |
pinctrl-names = "default"; |
| 269 |
pinctrl-0 = <&spi0_pins_a>; |
| 270 |
status = "okay"; |
| 271 |
}; |
| 272 |
|
| 273 |
&spi1 { |
| 274 |
pinctrl-names = "default"; |
| 275 |
pinctrl-0 = <&spi1_pins_a>; |
| 276 |
status = "okay"; |
| 277 |
}; |
| 278 |
|
| 279 |
&uart2 { |
| 280 |
pinctrl-names = "default"; |
| 281 |
pinctrl-0 = <&uart2_pins_b>; |
| 282 |
status = "okay"; |
| 283 |
}; |
| 284 |
|
| 285 |
&usb1 { |
| 286 |
vusb33-supply = <®_3p3v>; |
| 287 |
vbus-supply = <®_5v>; |
| 288 |
status = "okay"; |
| 289 |
}; |
| 290 |
|
| 291 |
&u3phy1 { |
| 292 |
status = "okay"; |
| 293 |
}; |