developer | 691e73f | 2021-06-28 19:41:35 +0800 | [diff] [blame] | 1 | /dts-v1/; |
developer | 565bacb | 2021-09-28 21:26:32 +0800 | [diff] [blame] | 2 | #include "mt7986b.dtsi" |
| 3 | #include "mt7986b-pinctrl.dtsi" |
| 4 | #include "mt7986-spim-nor-partition.dtsi" |
developer | 691e73f | 2021-06-28 19:41:35 +0800 | [diff] [blame] | 5 | / { |
| 6 | model = "MediaTek MT7986b RFB"; |
| 7 | compatible = "mediatek,mt7986b-nor-rfb"; |
developer | 565bacb | 2021-09-28 21:26:32 +0800 | [diff] [blame] | 8 | chosen { |
| 9 | bootargs = "console=ttyS0,115200n1 loglevel=8 \ |
| 10 | earlycon=uart8250,mmio32,0x11002000"; |
| 11 | }; |
| 12 | |
| 13 | memory { |
| 14 | reg = <0 0x40000000 0 0x10000000>; |
| 15 | }; |
developer | 691e73f | 2021-06-28 19:41:35 +0800 | [diff] [blame] | 16 | }; |
| 17 | |
developer | 565bacb | 2021-09-28 21:26:32 +0800 | [diff] [blame] | 18 | &uart0 { |
developer | 691e73f | 2021-06-28 19:41:35 +0800 | [diff] [blame] | 19 | status = "okay"; |
developer | 5b91be7 | 2021-09-27 14:03:07 +0800 | [diff] [blame] | 20 | }; |
| 21 | |
developer | 565bacb | 2021-09-28 21:26:32 +0800 | [diff] [blame] | 22 | /* Warning: pins shared with &snand */ |
| 23 | &uart1 { |
| 24 | pinctrl-names = "default"; |
| 25 | pinctrl-0 = <&uart1_pins>; |
developer | 5b91be7 | 2021-09-27 14:03:07 +0800 | [diff] [blame] | 26 | status = "disabled"; |
| 27 | }; |
| 28 | |
developer | 565bacb | 2021-09-28 21:26:32 +0800 | [diff] [blame] | 29 | /* Warning: pins shared with &spi1 */ |
| 30 | &uart2 { |
| 31 | pinctrl-names = "default"; |
| 32 | pinctrl-0 = <&uart2_pins>; |
developer | 5b91be7 | 2021-09-27 14:03:07 +0800 | [diff] [blame] | 33 | status = "disabled"; |
developer | 691e73f | 2021-06-28 19:41:35 +0800 | [diff] [blame] | 34 | }; |
| 35 | |
developer | 565bacb | 2021-09-28 21:26:32 +0800 | [diff] [blame] | 36 | &i2c0 { |
| 37 | pinctrl-names = "default"; |
| 38 | pinctrl-0 = <&i2c_pins>; |
| 39 | status = "okay"; |
| 40 | }; |
| 41 | |
| 42 | &watchdog { |
| 43 | status = "okay"; |
| 44 | }; |
| 45 | |
| 46 | ð { |
| 47 | status = "okay"; |
| 48 | |
| 49 | gmac0: mac@0 { |
| 50 | compatible = "mediatek,eth-mac"; |
| 51 | reg = <0>; |
| 52 | phy-mode = "2500base-x"; |
developer | f0a1e45 | 2022-08-15 12:06:11 +0800 | [diff] [blame] | 53 | phy-handle = <&phy5>; |
developer | 565bacb | 2021-09-28 21:26:32 +0800 | [diff] [blame] | 54 | }; |
| 55 | |
| 56 | gmac1: mac@1 { |
| 57 | compatible = "mediatek,eth-mac"; |
| 58 | reg = <1>; |
| 59 | phy-mode = "2500base-x"; |
developer | f0a1e45 | 2022-08-15 12:06:11 +0800 | [diff] [blame] | 60 | phy-handle = <&phy6>; |
developer | 565bacb | 2021-09-28 21:26:32 +0800 | [diff] [blame] | 61 | }; |
| 62 | |
| 63 | mdio: mdio-bus { |
| 64 | #address-cells = <1>; |
| 65 | #size-cells = <0>; |
| 66 | |
developer | f0a1e45 | 2022-08-15 12:06:11 +0800 | [diff] [blame] | 67 | reset-gpios = <&pio 6 1>; |
| 68 | reset-delay-us = <600>; |
| 69 | |
developer | 565bacb | 2021-09-28 21:26:32 +0800 | [diff] [blame] | 70 | phy5: phy@5 { |
developer | f0a1e45 | 2022-08-15 12:06:11 +0800 | [diff] [blame] | 71 | compatible = "ethernet-phy-ieee802.3-c45"; |
developer | 565bacb | 2021-09-28 21:26:32 +0800 | [diff] [blame] | 72 | reg = <5>; |
developer | 565bacb | 2021-09-28 21:26:32 +0800 | [diff] [blame] | 73 | }; |
| 74 | |
| 75 | phy6: phy@6 { |
developer | f0a1e45 | 2022-08-15 12:06:11 +0800 | [diff] [blame] | 76 | compatible = "ethernet-phy-ieee802.3-c45"; |
developer | 565bacb | 2021-09-28 21:26:32 +0800 | [diff] [blame] | 77 | reg = <6>; |
developer | 565bacb | 2021-09-28 21:26:32 +0800 | [diff] [blame] | 78 | }; |
| 79 | |
| 80 | switch@0 { |
| 81 | compatible = "mediatek,mt7531"; |
| 82 | reg = <31>; |
| 83 | reset-gpios = <&pio 5 0>; |
| 84 | |
| 85 | ports { |
| 86 | #address-cells = <1>; |
| 87 | #size-cells = <0>; |
developer | 691e73f | 2021-06-28 19:41:35 +0800 | [diff] [blame] | 88 | |
developer | 565bacb | 2021-09-28 21:26:32 +0800 | [diff] [blame] | 89 | port@0 { |
| 90 | reg = <0>; |
| 91 | label = "lan0"; |
| 92 | }; |
| 93 | |
| 94 | port@1 { |
| 95 | reg = <1>; |
| 96 | label = "lan1"; |
| 97 | }; |
| 98 | |
| 99 | port@2 { |
| 100 | reg = <2>; |
| 101 | label = "lan2"; |
| 102 | }; |
| 103 | |
| 104 | port@3 { |
| 105 | reg = <3>; |
| 106 | label = "lan3"; |
| 107 | }; |
| 108 | |
| 109 | port@4 { |
| 110 | reg = <4>; |
| 111 | label = "lan4"; |
| 112 | }; |
developer | 691e73f | 2021-06-28 19:41:35 +0800 | [diff] [blame] | 113 | |
developer | 565bacb | 2021-09-28 21:26:32 +0800 | [diff] [blame] | 114 | port@5 { |
| 115 | reg = <5>; |
| 116 | label = "lan5"; |
| 117 | phy-mode = "2500base-x"; |
| 118 | |
| 119 | fixed-link { |
| 120 | speed = <2500>; |
| 121 | full-duplex; |
| 122 | pause; |
| 123 | }; |
| 124 | }; |
| 125 | |
| 126 | port@6 { |
| 127 | reg = <6>; |
| 128 | label = "cpu"; |
| 129 | ethernet = <&gmac0>; |
| 130 | phy-mode = "2500base-x"; |
| 131 | |
| 132 | fixed-link { |
| 133 | speed = <2500>; |
| 134 | full-duplex; |
| 135 | pause; |
| 136 | }; |
developer | 691e73f | 2021-06-28 19:41:35 +0800 | [diff] [blame] | 137 | }; |
| 138 | }; |
| 139 | }; |
developer | 565bacb | 2021-09-28 21:26:32 +0800 | [diff] [blame] | 140 | }; |
| 141 | }; |
| 142 | |
| 143 | &hnat { |
| 144 | mtketh-wan = "eth1"; |
| 145 | mtketh-lan = "lan"; |
| 146 | mtketh-max-gmac = <2>; |
| 147 | status = "okay"; |
| 148 | }; |
| 149 | |
| 150 | &spi0 { |
| 151 | pinctrl-names = "default"; |
| 152 | pinctrl-0 = <&spi_flash_pins>; |
| 153 | cs-gpios = <0>, <0>; |
| 154 | status = "okay"; |
| 155 | |
| 156 | spi_nor@0 { |
| 157 | #address-cells = <1>; |
| 158 | #size-cells = <1>; |
| 159 | compatible = "jedec,spi-nor"; |
| 160 | reg = <0>; |
developer | b9b1ffc | 2021-12-16 14:19:08 +0800 | [diff] [blame] | 161 | spi-max-frequency = <52000000>; |
developer | 565bacb | 2021-09-28 21:26:32 +0800 | [diff] [blame] | 162 | spi-tx-buswidth = <4>; |
| 163 | spi-rx-buswidth = <4>; |
| 164 | }; |
| 165 | }; |
| 166 | |
| 167 | /* Warning: pins shared with &uart2 */ |
| 168 | &spi1 { |
| 169 | pinctrl-names = "default"; |
| 170 | pinctrl-0 = <&spic_pins>; |
| 171 | status = "okay"; |
| 172 | }; |
| 173 | |
| 174 | &wbsys { |
| 175 | mediatek,mtd-eeprom = <&factory 0x0000>; |
| 176 | status = "okay"; |
| 177 | }; |
| 178 | |
| 179 | &pio { |
| 180 | spi_flash_pins: spi-flash-pins-33-to-38 { |
| 181 | mux { |
| 182 | function = "flash"; |
| 183 | groups = "spi0", "spi0_wp_hold"; |
| 184 | }; |
| 185 | conf-pu { |
| 186 | pins = "SPI2_CS", "SPI2_HOLD", "SPI2_WP"; |
| 187 | drive-strength = <MTK_DRIVE_8mA>; |
developer | b5a819c | 2022-05-16 19:16:07 +0800 | [diff] [blame] | 188 | bias-pull-up = <MTK_PUPD_SET_R1R0_11>; |
developer | 565bacb | 2021-09-28 21:26:32 +0800 | [diff] [blame] | 189 | }; |
| 190 | conf-pd { |
| 191 | pins = "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO"; |
| 192 | drive-strength = <MTK_DRIVE_8mA>; |
developer | b5a819c | 2022-05-16 19:16:07 +0800 | [diff] [blame] | 193 | bias-pull-down = <MTK_PUPD_SET_R1R0_11>; |
developer | 565bacb | 2021-09-28 21:26:32 +0800 | [diff] [blame] | 194 | }; |
| 195 | |
developer | 691e73f | 2021-06-28 19:41:35 +0800 | [diff] [blame] | 196 | }; |
| 197 | }; |