developer | cd6a138 | 2022-01-11 15:45:19 +0800 | [diff] [blame^] | 1 | /dts-v1/; |
| 2 | #include "mt7986b.dtsi" |
| 3 | #include "mt7986b-pinctrl.dtsi" |
| 4 | / { |
| 5 | model = "MediaTek MT7986b RFB"; |
| 6 | compatible = "mediatek,mt7986b-2500wan-sd-rfb"; |
| 7 | chosen { |
| 8 | bootargs = "console=ttyS0,115200n1 loglevel=8 \ |
| 9 | earlycon=uart8250,mmio32,0x11002000 \ |
| 10 | root=PARTLABEL=rootfs rootwait rootfstype=squashfs,f2fs"; |
| 11 | }; |
| 12 | |
| 13 | memory { |
| 14 | reg = <0 0x40000000 0 0x10000000>; |
| 15 | }; |
| 16 | |
| 17 | reg_3p3v: regulator-3p3v { |
| 18 | compatible = "regulator-fixed"; |
| 19 | regulator-name = "fixed-3.3V"; |
| 20 | regulator-min-microvolt = <3300000>; |
| 21 | regulator-max-microvolt = <3300000>; |
| 22 | regulator-boot-on; |
| 23 | regulator-always-on; |
| 24 | }; |
| 25 | }; |
| 26 | |
| 27 | &uart0 { |
| 28 | status = "okay"; |
| 29 | }; |
| 30 | |
| 31 | /* Warning: pins shared with &snand */ |
| 32 | &uart1 { |
| 33 | pinctrl-names = "default"; |
| 34 | pinctrl-0 = <&uart1_pins>; |
| 35 | status = "disabled"; |
| 36 | }; |
| 37 | |
| 38 | /* Warning: pins shared with &spi1 */ |
| 39 | &uart2 { |
| 40 | pinctrl-names = "default"; |
| 41 | pinctrl-0 = <&uart2_pins>; |
| 42 | status = "disabled"; |
| 43 | }; |
| 44 | |
| 45 | &i2c0 { |
| 46 | pinctrl-names = "default"; |
| 47 | pinctrl-0 = <&i2c_pins>; |
| 48 | status = "okay"; |
| 49 | }; |
| 50 | |
| 51 | &watchdog { |
| 52 | status = "okay"; |
| 53 | }; |
| 54 | |
| 55 | ð { |
| 56 | status = "okay"; |
| 57 | |
| 58 | gmac0: mac@0 { |
| 59 | compatible = "mediatek,eth-mac"; |
| 60 | reg = <0>; |
| 61 | phy-mode = "2500base-x"; |
| 62 | |
| 63 | fixed-link { |
| 64 | speed = <2500>; |
| 65 | full-duplex; |
| 66 | pause; |
| 67 | }; |
| 68 | }; |
| 69 | |
| 70 | gmac1: mac@1 { |
| 71 | compatible = "mediatek,eth-mac"; |
| 72 | reg = <1>; |
| 73 | phy-mode = "2500base-x"; |
| 74 | |
| 75 | fixed-link { |
| 76 | speed = <2500>; |
| 77 | full-duplex; |
| 78 | pause; |
| 79 | }; |
| 80 | }; |
| 81 | |
| 82 | mdio: mdio-bus { |
| 83 | #address-cells = <1>; |
| 84 | #size-cells = <0>; |
| 85 | |
| 86 | phy5: phy@5 { |
| 87 | compatible = "ethernet-phy-id67c9.de0a"; |
| 88 | reg = <5>; |
| 89 | reset-gpios = <&pio 6 1>; |
| 90 | reset-deassert-us = <20000>; |
| 91 | phy-mode = "2500base-x"; |
| 92 | }; |
| 93 | |
| 94 | phy6: phy@6 { |
| 95 | compatible = "ethernet-phy-id67c9.de0a"; |
| 96 | reg = <6>; |
| 97 | phy-mode = "2500base-x"; |
| 98 | }; |
| 99 | |
| 100 | switch@0 { |
| 101 | compatible = "mediatek,mt7531"; |
| 102 | reg = <31>; |
| 103 | reset-gpios = <&pio 5 0>; |
| 104 | |
| 105 | ports { |
| 106 | #address-cells = <1>; |
| 107 | #size-cells = <0>; |
| 108 | |
| 109 | port@0 { |
| 110 | reg = <0>; |
| 111 | label = "lan0"; |
| 112 | }; |
| 113 | |
| 114 | port@1 { |
| 115 | reg = <1>; |
| 116 | label = "lan1"; |
| 117 | }; |
| 118 | |
| 119 | port@2 { |
| 120 | reg = <2>; |
| 121 | label = "lan2"; |
| 122 | }; |
| 123 | |
| 124 | port@3 { |
| 125 | reg = <3>; |
| 126 | label = "lan3"; |
| 127 | }; |
| 128 | |
| 129 | port@4 { |
| 130 | reg = <4>; |
| 131 | label = "lan4"; |
| 132 | }; |
| 133 | |
| 134 | port@5 { |
| 135 | reg = <5>; |
| 136 | label = "lan5"; |
| 137 | phy-mode = "2500base-x"; |
| 138 | |
| 139 | fixed-link { |
| 140 | speed = <2500>; |
| 141 | full-duplex; |
| 142 | pause; |
| 143 | }; |
| 144 | }; |
| 145 | |
| 146 | port@6 { |
| 147 | reg = <6>; |
| 148 | label = "cpu"; |
| 149 | ethernet = <&gmac0>; |
| 150 | phy-mode = "2500base-x"; |
| 151 | |
| 152 | fixed-link { |
| 153 | speed = <2500>; |
| 154 | full-duplex; |
| 155 | pause; |
| 156 | }; |
| 157 | }; |
| 158 | }; |
| 159 | }; |
| 160 | }; |
| 161 | }; |
| 162 | |
| 163 | &hnat { |
| 164 | mtketh-wan = "eth1"; |
| 165 | mtketh-lan = "lan"; |
| 166 | mtketh-max-gmac = <2>; |
| 167 | status = "okay"; |
| 168 | }; |
| 169 | |
| 170 | &mmc0 { |
| 171 | pinctrl-names = "default", "state_uhs"; |
| 172 | pinctrl-0 = <&mmc0_pins_default>; |
| 173 | pinctrl-1 = <&mmc0_pins_uhs>; |
| 174 | bus-width = <4>; |
| 175 | max-frequency = <52000000>; |
| 176 | cap-sd-highspeed; |
| 177 | vmmc-supply = <®_3p3v>; |
| 178 | vqmmc-supply = <®_3p3v>; |
| 179 | status = "okay"; |
| 180 | }; |
| 181 | |
| 182 | &pio { |
| 183 | mmc0_pins_default: mmc0-pins-22-to-32-default { |
| 184 | mux { |
| 185 | function = "flash"; |
| 186 | groups = "emmc_45"; |
| 187 | }; |
| 188 | |
| 189 | conf-cmd-dat { |
| 190 | pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO", |
| 191 | "SPI0_CS", "SPI0_HOLD", "SPI0_WP", |
| 192 | "SPI1_CLK", "SPI1_MOSI", "SPI1_MISO"; |
| 193 | input-enable; |
| 194 | drive-strength = <MTK_DRIVE_4mA>; |
| 195 | mediatek,pull-up-adv = <1>; /* pull-up 10K */ |
| 196 | }; |
| 197 | |
| 198 | conf-clk { |
| 199 | pins = "SPI1_CS"; |
| 200 | drive-strength = <MTK_DRIVE_6mA>; |
| 201 | mediatek,pull-down-adv = <2>; /* pull-down 50K */ |
| 202 | }; |
| 203 | |
| 204 | conf-rst { |
| 205 | pins = "PWM1"; |
| 206 | drive-strength = <MTK_DRIVE_4mA>; |
| 207 | mediatek,pull-up-adv = <1>; /* pull-up 10K */ |
| 208 | }; |
| 209 | }; |
| 210 | |
| 211 | mmc0_pins_uhs: mmc0-pins-22-to-32-uhs { |
| 212 | mux { |
| 213 | function = "flash"; |
| 214 | groups = "emmc_45"; |
| 215 | }; |
| 216 | |
| 217 | conf-cmd-dat { |
| 218 | pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO", |
| 219 | "SPI0_CS", "SPI0_HOLD", "SPI0_WP", |
| 220 | "SPI1_CLK", "SPI1_MOSI", "SPI1_MISO"; |
| 221 | input-enable; |
| 222 | drive-strength = <MTK_DRIVE_4mA>; |
| 223 | mediatek,pull-up-adv = <1>; /* pull-up 10K */ |
| 224 | }; |
| 225 | |
| 226 | conf-clk { |
| 227 | pins = "SPI1_CS"; |
| 228 | drive-strength = <MTK_DRIVE_6mA>; |
| 229 | mediatek,pull-down-adv = <2>; /* pull-down 50K */ |
| 230 | }; |
| 231 | |
| 232 | conf-rst { |
| 233 | pins = "PWM1"; |
| 234 | drive-strength = <MTK_DRIVE_4mA>; |
| 235 | mediatek,pull-up-adv = <1>; /* pull-up 10K */ |
| 236 | }; |
| 237 | }; |
| 238 | |
| 239 | wf_2g_5g_pins: wf_2g_5g-pins { |
| 240 | mux { |
| 241 | function = "wifi"; |
| 242 | groups = "wf_2g", "wf_5g"; |
| 243 | }; |
| 244 | conf { |
| 245 | pins = "WF0_HB1", "WF0_HB2", "WF0_HB3", "WF0_HB4", |
| 246 | "WF0_HB0", "WF0_HB0_B", "WF0_HB5", "WF0_HB6", |
| 247 | "WF0_HB7", "WF0_HB8", "WF0_HB9", "WF0_HB10", |
| 248 | "WF0_TOP_CLK", "WF0_TOP_DATA", "WF1_HB1", |
| 249 | "WF1_HB2", "WF1_HB3", "WF1_HB4", "WF1_HB0", |
| 250 | "WF1_HB5", "WF1_HB6", "WF1_HB7", "WF1_HB8", |
| 251 | "WF1_TOP_CLK", "WF1_TOP_DATA"; |
| 252 | drive-strength = <MTK_DRIVE_4mA>; |
| 253 | }; |
| 254 | }; |
| 255 | |
| 256 | wf_dbdc_pins: wf_dbdc-pins { |
| 257 | mux { |
| 258 | function = "wifi"; |
| 259 | groups = "wf_dbdc"; |
| 260 | }; |
| 261 | conf { |
| 262 | pins = "WF0_HB1", "WF0_HB2", "WF0_HB3", "WF0_HB4", |
| 263 | "WF0_HB0", "WF0_HB0_B", "WF0_HB5", "WF0_HB6", |
| 264 | "WF0_HB7", "WF0_HB8", "WF0_HB9", "WF0_HB10", |
| 265 | "WF0_TOP_CLK", "WF0_TOP_DATA", "WF1_HB1", |
| 266 | "WF1_HB2", "WF1_HB3", "WF1_HB4", "WF1_HB0", |
| 267 | "WF1_HB5", "WF1_HB6", "WF1_HB7", "WF1_HB8", |
| 268 | "WF1_TOP_CLK", "WF1_TOP_DATA"; |
| 269 | drive-strength = <MTK_DRIVE_4mA>; |
| 270 | }; |
| 271 | }; |
| 272 | }; |