developer | fd40db2 | 2021-04-29 10:08:25 +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 | fd40db2 | 2021-04-29 10:08:25 +0800 | [diff] [blame] | 5 | / { |
| 6 | model = "MediaTek MT7986b RFB"; |
developer | 3395eb4 | 2021-06-15 16:01:34 +0800 | [diff] [blame] | 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 | fd40db2 | 2021-04-29 10:08:25 +0800 | [diff] [blame] | 16 | }; |
developer | 298705c | 2021-06-05 18:48:19 +0800 | [diff] [blame] | 17 | |
developer | 565bacb | 2021-09-28 21:26:32 +0800 | [diff] [blame] | 18 | &uart0 { |
developer | d45e432 | 2021-06-17 10:41:47 +0800 | [diff] [blame] | 19 | status = "okay"; |
developer | 565bacb | 2021-09-28 21:26:32 +0800 | [diff] [blame] | 20 | }; |
developer | 5b91be7 | 2021-09-27 14:03:07 +0800 | [diff] [blame] | 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>; |
| 26 | status = "disabled"; |
| 27 | }; |
| 28 | |
| 29 | /* Warning: pins shared with &spi1 */ |
| 30 | &uart2 { |
| 31 | pinctrl-names = "default"; |
| 32 | pinctrl-0 = <&uart2_pins>; |
| 33 | status = "disabled"; |
| 34 | }; |
| 35 | |
| 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"; |
| 53 | |
| 54 | fixed-link { |
| 55 | speed = <2500>; |
| 56 | full-duplex; |
| 57 | pause; |
| 58 | }; |
| 59 | }; |
| 60 | |
| 61 | gmac1: mac@1 { |
| 62 | compatible = "mediatek,eth-mac"; |
| 63 | reg = <1>; |
| 64 | phy-mode = "2500base-x"; |
| 65 | |
| 66 | fixed-link { |
| 67 | speed = <2500>; |
| 68 | full-duplex; |
| 69 | pause; |
| 70 | }; |
| 71 | }; |
| 72 | |
| 73 | mdio: mdio-bus { |
| 74 | #address-cells = <1>; |
| 75 | #size-cells = <0>; |
| 76 | |
| 77 | phy5: phy@5 { |
| 78 | compatible = "ethernet-phy-id67c9.de0a"; |
| 79 | reg = <5>; |
| 80 | reset-gpios = <&pio 6 1>; |
developer | 8c5a08b | 2022-05-06 09:10:38 +0800 | [diff] [blame] | 81 | reset-assert-us = <600>; |
developer | 565bacb | 2021-09-28 21:26:32 +0800 | [diff] [blame] | 82 | reset-deassert-us = <20000>; |
| 83 | phy-mode = "2500base-x"; |
| 84 | }; |
| 85 | |
| 86 | phy6: phy@6 { |
| 87 | compatible = "ethernet-phy-id67c9.de0a"; |
| 88 | reg = <6>; |
| 89 | phy-mode = "2500base-x"; |
| 90 | }; |
| 91 | |
| 92 | switch@0 { |
| 93 | compatible = "mediatek,mt7531"; |
| 94 | reg = <31>; |
| 95 | reset-gpios = <&pio 5 0>; |
| 96 | |
| 97 | ports { |
| 98 | #address-cells = <1>; |
| 99 | #size-cells = <0>; |
| 100 | |
| 101 | port@0 { |
| 102 | reg = <0>; |
| 103 | label = "lan0"; |
| 104 | }; |
| 105 | |
| 106 | port@1 { |
| 107 | reg = <1>; |
| 108 | label = "lan1"; |
| 109 | }; |
| 110 | |
| 111 | port@2 { |
| 112 | reg = <2>; |
| 113 | label = "lan2"; |
| 114 | }; |
| 115 | |
| 116 | port@3 { |
| 117 | reg = <3>; |
| 118 | label = "lan3"; |
| 119 | }; |
| 120 | |
| 121 | port@6 { |
| 122 | reg = <6>; |
| 123 | label = "cpu"; |
| 124 | ethernet = <&gmac0>; |
| 125 | phy-mode = "2500base-x"; |
| 126 | |
| 127 | fixed-link { |
| 128 | speed = <2500>; |
| 129 | full-duplex; |
| 130 | pause; |
| 131 | }; |
| 132 | }; |
developer | 5b91be7 | 2021-09-27 14:03:07 +0800 | [diff] [blame] | 133 | }; |
| 134 | }; |
| 135 | }; |
| 136 | }; |
| 137 | |
developer | 565bacb | 2021-09-28 21:26:32 +0800 | [diff] [blame] | 138 | &hnat { |
| 139 | mtketh-wan = "eth1"; |
| 140 | mtketh-lan = "lan"; |
| 141 | mtketh-max-gmac = <2>; |
| 142 | status = "okay"; |
developer | 5b91be7 | 2021-09-27 14:03:07 +0800 | [diff] [blame] | 143 | }; |
| 144 | |
developer | 565bacb | 2021-09-28 21:26:32 +0800 | [diff] [blame] | 145 | &spi0 { |
| 146 | pinctrl-names = "default"; |
| 147 | pinctrl-0 = <&spi_flash_pins>; |
| 148 | cs-gpios = <0>, <0>; |
| 149 | status = "okay"; |
| 150 | |
| 151 | spi_nor@0 { |
| 152 | #address-cells = <1>; |
| 153 | #size-cells = <1>; |
| 154 | compatible = "jedec,spi-nor"; |
| 155 | reg = <0>; |
developer | b9b1ffc | 2021-12-16 14:19:08 +0800 | [diff] [blame] | 156 | spi-max-frequency = <52000000>; |
developer | 5fb8060 | 2023-05-02 18:54:53 +0800 | [diff] [blame] | 157 | spi-tx-bus-width = <4>; |
| 158 | spi-rx-bus-width = <4>; |
developer | 565bacb | 2021-09-28 21:26:32 +0800 | [diff] [blame] | 159 | }; |
| 160 | }; |
| 161 | |
| 162 | /* Warning: pins shared with &uart2 */ |
| 163 | &spi1 { |
| 164 | pinctrl-names = "default"; |
| 165 | pinctrl-0 = <&spic_pins>; |
| 166 | status = "okay"; |
| 167 | }; |
| 168 | |
| 169 | &wbsys { |
| 170 | mediatek,mtd-eeprom = <&factory 0x0000>; |
| 171 | status = "okay"; |
| 172 | }; |
| 173 | |
| 174 | &pio { |
| 175 | spi_flash_pins: spi-flash-pins-33-to-38 { |
| 176 | mux { |
| 177 | function = "flash"; |
| 178 | groups = "spi0", "spi0_wp_hold"; |
| 179 | }; |
| 180 | conf-pu { |
| 181 | pins = "SPI2_CS", "SPI2_HOLD", "SPI2_WP"; |
| 182 | drive-strength = <MTK_DRIVE_8mA>; |
developer | b5a819c | 2022-05-16 19:16:07 +0800 | [diff] [blame] | 183 | bias-pull-up = <MTK_PUPD_SET_R1R0_11>; |
developer | 565bacb | 2021-09-28 21:26:32 +0800 | [diff] [blame] | 184 | }; |
| 185 | conf-pd { |
| 186 | pins = "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO"; |
| 187 | drive-strength = <MTK_DRIVE_8mA>; |
developer | b5a819c | 2022-05-16 19:16:07 +0800 | [diff] [blame] | 188 | bias-pull-down = <MTK_PUPD_SET_R1R0_11>; |
developer | 565bacb | 2021-09-28 21:26:32 +0800 | [diff] [blame] | 189 | }; |
| 190 | |
| 191 | }; |
developer | 298705c | 2021-06-05 18:48:19 +0800 | [diff] [blame] | 192 | }; |