1// SPDX-License-Identifier: GPL-2.0-or-later OR MIT 2 3#include "qcom-ipq4019.dtsi" 4#include <dt-bindings/gpio/gpio.h> 5#include <dt-bindings/input/input.h> 6#include <dt-bindings/soc/qcom,tcsr.h> 7 8/ { 9 model = "ASUS RT-AC58U"; 10 compatible = "asus,rt-ac58u"; 11 12 memory { 13 device_type = "memory"; 14 reg = <0x80000000 0x8000000>; 15 }; 16 17 aliases { 18 led-boot = &led_power; 19 led-failsafe = &led_power; 20 led-running = &led_power; 21 led-upgrade = &led_power; 22 serial0 = &blsp1_uart1; 23 }; 24 25 chosen { 26 bootargs-append = " ubi.mtd=UBI_DEV"; 27// stdout-path = "serial0:115200n8"; 28 stdout-path = "serial0"; 29 }; 30 31 soc { 32 rng@22000 { 33 status = "okay"; 34 }; 35 36 mdio@90000 { 37 status = "okay"; 38 }; 39 40 ess-psgmii@98000 { 41 status = "okay"; 42 }; 43 44 tcsr@1949000 { 45 compatible = "qcom,tcsr"; 46 reg = <0x1949000 0x100>; 47 qcom,wifi_glb_cfg = <TCSR_WIFI_GLB_CFG>; 48 }; 49 50 tcsr@194b000 { 51 compatible = "qcom,tcsr"; 52 reg = <0x194b000 0x100>; 53 qcom,usb-hsphy-mode-select = <TCSR_USB_HSPHY_HOST_MODE>; 54 }; 55 56 ess_tcsr@1953000 { 57 compatible = "qcom,tcsr"; 58 reg = <0x1953000 0x1000>; 59 qcom,ess-interface-select = <TCSR_ESS_PSGMII>; 60 }; 61 62 tcsr@1957000 { 63 compatible = "qcom,tcsr"; 64 reg = <0x1957000 0x100>; 65 qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>; 66 }; 67 68 usb3@8af8800 { 69 status = "okay"; 70 71 dwc3@8a00000 { 72 #address-cells = <1>; 73 #size-cells = <0>; 74 75 usb3_port1: port@1 { 76 reg = <1>; 77 #trigger-source-cells = <0>; 78 }; 79 80 usb3_port2: port@2 { 81 reg = <2>; 82 #trigger-source-cells = <0>; 83 }; 84 }; 85 }; 86 87 crypto@8e3a000 { 88 status = "okay"; 89 }; 90 91 watchdog@b017000 { 92 status = "okay"; 93 }; 94 95 ess-switch@c000000 { 96 status = "okay"; 97 }; 98 99 edma@c080000 { 100 status = "okay"; 101 }; 102 }; 103 104 keys { 105 compatible = "gpio-keys"; 106 107 reset { 108 label = "reset"; 109 gpios = <&tlmm 4 GPIO_ACTIVE_LOW>; 110 linux,code = <KEY_RESTART>; 111 }; 112 113 wps { 114 label = "wps"; 115 gpios = <&tlmm 63 GPIO_ACTIVE_LOW>; 116 linux,code = <KEY_WPS_BUTTON>; 117 }; 118 }; 119 120 leds { 121 compatible = "gpio-leds"; 122 123 led_power: status { 124 label = "blue:status"; 125 gpios = <&tlmm 3 GPIO_ACTIVE_HIGH>; 126 }; 127 128 wan { 129 label = "blue:wan"; 130 gpios = <&tlmm 1 GPIO_ACTIVE_HIGH>; 131 }; 132 133 wlan2G { 134 label = "blue:wlan2G"; 135 gpios = <&tlmm 58 GPIO_ACTIVE_HIGH>; 136 linux,default-trigger = "phy0tpt"; 137 }; 138 139 wlan5G { 140 label = "blue:wlan5G"; 141 gpios = <&tlmm 5 GPIO_ACTIVE_HIGH>; 142 linux,default-trigger = "phy1tpt"; 143 }; 144 145 usb { 146 label = "blue:usb"; 147 gpios = <&tlmm 0 GPIO_ACTIVE_HIGH>; 148 trigger-sources = <&usb3_port1>, <&usb3_port2>; 149 linux,default-trigger = "usbport"; 150 }; 151 152 lan { 153 label = "blue:lan"; 154 gpios = <&tlmm 2 GPIO_ACTIVE_HIGH>; 155 }; 156 }; 157}; 158 159&cryptobam { 160 status = "okay"; 161}; 162 163&blsp_dma { 164 status = "okay"; 165}; 166 167&tlmm { 168 serial_pins: serial_pinmux { 169 mux { 170 pins = "gpio60", "gpio61"; 171 function = "blsp_uart0"; 172 bias-disable; 173 }; 174 }; 175 176 spi_0_pins: spi_0_pinmux { 177 mux { 178 function = "blsp_spi0"; 179 pins = "gpio55", "gpio56", "gpio57"; 180 drive-strength = <12>; 181 bias-disable; 182 }; 183 184 mux_cs { 185 function = "gpio"; 186 pins = "gpio54", "gpio59"; 187 drive-strength = <2>; 188 bias-disable; 189 output-high; 190 }; 191 }; 192}; 193 194&blsp1_spi1 { /* BLSP1 QUP1 */ 195 pinctrl-0 = <&spi_0_pins>; 196 pinctrl-names = "default"; 197 status = "okay"; 198 cs-gpios = <&tlmm 54 GPIO_ACTIVE_HIGH>, 199 <&tlmm 59 GPIO_ACTIVE_HIGH>; 200 201 flash@0 { 202 /* 203 * U-boot looks for "n25q128a11" node, 204 * if we don't have it, it will spit out the following warning: 205 * "ipq: fdt fixup unable to find compatible node". 206 */ 207 compatible = "jedec,spi-nor"; 208 reg = <0>; 209 linux,modalias = "m25p80", "mx25l1606e", "n25q128a11"; 210 spi-max-frequency = <30000000>; 211 212 partitions { 213 compatible = "fixed-partitions"; 214 #address-cells = <1>; 215 #size-cells = <1>; 216 217 partition@0 { 218 label = "SBL1"; 219 reg = <0x00000000 0x00040000>; 220 read-only; 221 }; 222 partition@40000 { 223 label = "MIBIB"; 224 reg = <0x00040000 0x00020000>; 225 read-only; 226 }; 227 partition@60000 { 228 label = "QSEE"; 229 reg = <0x00060000 0x00060000>; 230 read-only; 231 }; 232 partition@c0000 { 233 label = "CDT"; 234 reg = <0x000c0000 0x00010000>; 235 read-only; 236 }; 237 partition@d0000 { 238 label = "DDRPARAMS"; 239 reg = <0x000d0000 0x00010000>; 240 read-only; 241 }; 242 partition@e0000 { 243 label = "APPSBLENV"; /* uboot env*/ 244 reg = <0x000e0000 0x00010000>; 245 read-only; 246 }; 247 partition@f0000 { 248 label = "APPSBL"; /* uboot */ 249 reg = <0x000f0000 0x00080000>; 250 read-only; 251 }; 252 partition@170000 { 253 label = "ART"; 254 reg = <0x00170000 0x00010000>; 255 read-only; 256 }; 257 /* 0x00180000 - 0x00200000 unused */ 258 }; 259 }; 260 261 spi-nand@1 { 262 compatible = "spi-nand"; 263 reg = <1>; 264 spi-max-frequency = <30000000>; 265 266 /* 267 * U-boot looks for "spinand,mt29f" node, 268 * if we don't have it, it will spit out the following warning: 269 * "ipq: fdt fixup unable to find compatible node". 270 */ 271 272 partitions { 273 compatible = "fixed-partitions"; 274 #address-cells = <1>; 275 #size-cells = <1>; 276 277 partition@0 { 278 /* 279 * TODO: change to label = "ubi" once we drop 4.14. 280 * also drop the bootargs-append and all the 281 * userspace CI_UBIPART="UBI_DEV" remains. 282 */ 283 label = "UBI_DEV"; 284 reg = <0x00000000 0x08000000>; 285 }; 286 }; 287 }; 288}; 289 290&blsp1_uart1 { 291 pinctrl-0 = <&serial_pins>; 292 pinctrl-names = "default"; 293 status = "okay"; 294}; 295 296&usb3_ss_phy { 297 status = "okay"; 298}; 299 300&usb3_hs_phy { 301 status = "okay"; 302}; 303 304&wifi0 { 305 status = "okay"; 306 qcom,ath10k-calibration-variant = "RT-AC58U"; 307}; 308 309&wifi1 { 310 status = "okay"; 311 qcom,ath10k-calibration-variant = "RT-AC58U"; 312}; 313