developer | 24455dd | 2021-10-28 10:55:41 +0800 | [diff] [blame] | 1 | /dts-v1/; |
| 2 | #include "mt7981.dtsi" |
| 3 | / { |
| 4 | model = "MediaTek MT7981 RFB"; |
| 5 | compatible = "mediatek,mt7981-spim-snand-rfb"; |
| 6 | chosen { |
| 7 | bootargs = "console=ttyS0,115200n1 loglevel=8 \ |
| 8 | earlycon=uart8250,mmio32,0x11002000"; |
| 9 | }; |
| 10 | |
| 11 | memory { |
| 12 | // fpga ddr2: 128MB*2 |
| 13 | reg = <0 0x40000000 0 0x10000000>; |
| 14 | }; |
| 15 | |
| 16 | nmbm_spim_nand { |
| 17 | compatible = "generic,nmbm"; |
| 18 | |
| 19 | #address-cells = <1>; |
| 20 | #size-cells = <1>; |
| 21 | |
| 22 | lower-mtd-device = <&spi_nand>; |
| 23 | forced-create; |
| 24 | |
| 25 | partitions { |
| 26 | compatible = "fixed-partitions"; |
| 27 | #address-cells = <1>; |
| 28 | #size-cells = <1>; |
| 29 | |
| 30 | partition@0 { |
| 31 | label = "BL2"; |
| 32 | reg = <0x00000 0x0100000>; |
| 33 | read-only; |
| 34 | }; |
| 35 | |
| 36 | partition@100000 { |
| 37 | label = "u-boot-env"; |
| 38 | reg = <0x0100000 0x0080000>; |
| 39 | }; |
| 40 | |
| 41 | partition@180000 { |
| 42 | label = "Factory"; |
| 43 | reg = <0x180000 0x0200000>; |
| 44 | }; |
| 45 | |
| 46 | partition@380000 { |
| 47 | label = "FIP"; |
| 48 | reg = <0x380000 0x0200000>; |
| 49 | }; |
| 50 | |
| 51 | partition@580000 { |
| 52 | label = "ubi"; |
| 53 | reg = <0x580000 0x4000000>; |
| 54 | }; |
| 55 | }; |
| 56 | }; |
developer | e3c7cd1 | 2021-11-30 14:49:26 +0800 | [diff] [blame] | 57 | |
| 58 | sound { |
| 59 | compatible = "mediatek,mt79xx-si3218x-machine"; |
| 60 | mediatek,platform = <&afe>; |
| 61 | mediatek,ext-codec = <&proslic_spi>; |
| 62 | status = "okay"; |
| 63 | }; |
| 64 | }; |
| 65 | |
| 66 | &afe { |
| 67 | pinctrl-names = "default"; |
| 68 | pinctrl-0 = <&pcm_pins>; |
| 69 | status = "okay"; |
| 70 | }; |
| 71 | |
| 72 | &i2c0 { |
| 73 | pinctrl-names = "default"; |
| 74 | pinctrl-0 = <&i2c_pins>; |
| 75 | status = "okay"; |
| 76 | |
| 77 | wm8960: wm8960@1a { |
| 78 | compatible = "wlf,wm8960"; |
| 79 | reg = <0x1a>; |
| 80 | }; |
developer | 24455dd | 2021-10-28 10:55:41 +0800 | [diff] [blame] | 81 | }; |
| 82 | |
| 83 | &uart0 { |
| 84 | status = "okay"; |
| 85 | }; |
| 86 | |
| 87 | &watchdog { |
| 88 | status = "okay"; |
| 89 | }; |
| 90 | |
| 91 | ð { |
| 92 | status = "okay"; |
| 93 | |
| 94 | gmac0: mac@0 { |
| 95 | compatible = "mediatek,eth-mac"; |
| 96 | reg = <0>; |
| 97 | phy-mode = "2500base-x"; |
| 98 | |
| 99 | fixed-link { |
| 100 | speed = <2500>; |
| 101 | full-duplex; |
| 102 | pause; |
| 103 | }; |
| 104 | }; |
| 105 | |
| 106 | gmac1: mac@1 { |
| 107 | compatible = "mediatek,eth-mac"; |
| 108 | reg = <1>; |
| 109 | phy-mode = "gmii"; |
| 110 | phy-handle = <&phy0>; |
| 111 | }; |
| 112 | |
| 113 | mdio: mdio-bus { |
| 114 | #address-cells = <1>; |
| 115 | #size-cells = <0>; |
| 116 | |
| 117 | phy0: ethernet-phy@0 { |
developer | a7de8be | 2021-11-15 21:14:31 +0800 | [diff] [blame] | 118 | compatible = "ethernet-phy-id03a2.9461"; |
developer | 24455dd | 2021-10-28 10:55:41 +0800 | [diff] [blame] | 119 | reg = <0>; |
developer | a7de8be | 2021-11-15 21:14:31 +0800 | [diff] [blame] | 120 | phy-mode = "gmii"; |
developer | a7de8be | 2021-11-15 21:14:31 +0800 | [diff] [blame] | 121 | nvmem-cells = <&phy_calibration>; |
| 122 | nvmem-cell-names = "phy-cal-data"; |
developer | 24455dd | 2021-10-28 10:55:41 +0800 | [diff] [blame] | 123 | }; |
| 124 | |
| 125 | switch@0 { |
| 126 | compatible = "mediatek,mt7531"; |
| 127 | reg = <31>; |
| 128 | reset-gpios = <&pio 39 0>; |
| 129 | |
| 130 | ports { |
| 131 | #address-cells = <1>; |
| 132 | #size-cells = <0>; |
| 133 | |
| 134 | port@0 { |
| 135 | reg = <0>; |
| 136 | label = "lan1"; |
| 137 | }; |
| 138 | |
| 139 | port@1 { |
| 140 | reg = <1>; |
| 141 | label = "lan2"; |
| 142 | }; |
| 143 | |
| 144 | port@2 { |
| 145 | reg = <2>; |
| 146 | label = "lan3"; |
| 147 | }; |
| 148 | |
| 149 | port@3 { |
| 150 | reg = <3>; |
| 151 | label = "lan4"; |
| 152 | }; |
| 153 | |
| 154 | port@6 { |
| 155 | reg = <6>; |
| 156 | label = "cpu"; |
| 157 | ethernet = <&gmac0>; |
| 158 | phy-mode = "2500base-x"; |
| 159 | |
| 160 | fixed-link { |
| 161 | speed = <2500>; |
| 162 | full-duplex; |
| 163 | pause; |
| 164 | }; |
| 165 | }; |
| 166 | }; |
| 167 | }; |
| 168 | }; |
| 169 | }; |
| 170 | |
| 171 | &hnat { |
| 172 | mtketh-wan = "eth1"; |
| 173 | mtketh-lan = "lan"; |
| 174 | mtketh-max-gmac = <2>; |
| 175 | status = "okay"; |
| 176 | }; |
| 177 | |
| 178 | &spi0 { |
| 179 | pinctrl-names = "default"; |
| 180 | pinctrl-0 = <&spi0_flash_pins>; |
| 181 | status = "okay"; |
| 182 | spi_nand: spi_nand@0 { |
| 183 | #address-cells = <1>; |
| 184 | #size-cells = <1>; |
| 185 | compatible = "spi-nand"; |
| 186 | reg = <0>; |
| 187 | spi-max-frequency = <52000000>; |
| 188 | spi-tx-buswidth = <4>; |
| 189 | spi-rx-buswidth = <4>; |
| 190 | }; |
| 191 | }; |
| 192 | |
| 193 | &spi1 { |
| 194 | pinctrl-names = "default"; |
| 195 | pinctrl-0 = <&spic_pins>; |
developer | e3c7cd1 | 2021-11-30 14:49:26 +0800 | [diff] [blame] | 196 | status = "okay"; |
| 197 | |
| 198 | proslic_spi: proslic_spi@0 { |
| 199 | compatible = "silabs,proslic_spi"; |
| 200 | reg = <0>; |
| 201 | spi-max-frequency = <10000000>; |
| 202 | spi-cpha = <1>; |
| 203 | spi-cpol = <1>; |
| 204 | channel_count = <1>; |
| 205 | debug_level = <4>; /* 1 = TRC, 2 = DBG, 4 = ERR */ |
| 206 | reset_gpio = <&pio 15 0>; |
| 207 | ig,enable-spi = <1>; /* 1: Enable, 0: Disable */ |
| 208 | }; |
developer | 24455dd | 2021-10-28 10:55:41 +0800 | [diff] [blame] | 209 | }; |
| 210 | |
| 211 | &pio { |
| 212 | |
| 213 | i2c_pins: i2c-pins-g0 { |
| 214 | mux { |
| 215 | function = "i2c"; |
| 216 | groups = "i2c0_0"; |
| 217 | }; |
| 218 | }; |
| 219 | |
| 220 | pcm_pins: pcm-pins-g0 { |
| 221 | mux { |
| 222 | function = "pcm"; |
| 223 | groups = "pcm"; |
| 224 | }; |
| 225 | }; |
| 226 | |
| 227 | pwm0_pin: pwm0-pin-g0 { |
| 228 | mux { |
| 229 | function = "pwm"; |
| 230 | groups = "pwm0_0"; |
| 231 | }; |
| 232 | }; |
| 233 | |
| 234 | pwm1_pin: pwm1-pin-g0 { |
| 235 | mux { |
| 236 | function = "pwm"; |
| 237 | groups = "pwm1_0"; |
| 238 | }; |
| 239 | }; |
| 240 | |
| 241 | pwm2_pin: pwm2-pin { |
| 242 | mux { |
| 243 | function = "pwm"; |
| 244 | groups = "pwm2"; |
| 245 | }; |
| 246 | }; |
| 247 | |
| 248 | spi0_flash_pins: spi0-pins { |
| 249 | mux { |
| 250 | function = "spi"; |
| 251 | groups = "spi0", "spi0_wp_hold"; |
| 252 | }; |
| 253 | }; |
| 254 | |
| 255 | spic_pins: spi1-pins { |
| 256 | mux { |
| 257 | function = "spi"; |
| 258 | groups = "spi1_1"; |
| 259 | }; |
| 260 | }; |
| 261 | |
| 262 | uart1_pins: uart1-pins-g1 { |
| 263 | mux { |
| 264 | function = "uart"; |
| 265 | groups = "uart1_1"; |
| 266 | }; |
| 267 | }; |
| 268 | |
| 269 | uart2_pins: uart2-pins-g1 { |
| 270 | mux { |
| 271 | function = "uart"; |
| 272 | groups = "uart2_1"; |
| 273 | }; |
| 274 | }; |
| 275 | }; |
| 276 | |
| 277 | &xhci { |
| 278 | mediatek,u3p-dis-msk = <0x0>; |
| 279 | phys = <&u2port0 PHY_TYPE_USB2>, |
| 280 | <&u3port0 PHY_TYPE_USB3>; |
| 281 | status = "okay"; |
| 282 | }; |