developer | cc8110b | 2024-08-19 13:53:34 +0800 | [diff] [blame^] | 1 | diff --git a/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts b/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts |
| 2 | index eec9ec1..84df1ca 100644 |
developer | f11ee16 | 2022-04-12 11:17:45 +0800 | [diff] [blame] | 3 | --- a/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts |
| 4 | +++ b/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts |
| 5 | @@ -53,6 +53,13 @@ |
| 6 | }; |
| 7 | }; |
| 8 | |
| 9 | + gsw: gsw@0 { |
| 10 | + compatible = "mediatek,mt753x"; |
| 11 | + mediatek,ethsys = <ðsys>; |
| 12 | + #address-cells = <1>; |
| 13 | + #size-cells = <0>; |
| 14 | + }; |
| 15 | + |
| 16 | leds { |
| 17 | compatible = "gpio-leds"; |
| 18 | |
developer | cc8110b | 2024-08-19 13:53:34 +0800 | [diff] [blame^] | 19 | @@ -147,6 +154,36 @@ |
developer | f11ee16 | 2022-04-12 11:17:45 +0800 | [diff] [blame] | 20 | }; |
| 21 | }; |
| 22 | |
| 23 | +&gsw { |
| 24 | + mediatek,mdio = <&mdio>; |
| 25 | + mediatek,portmap = "wllll"; |
| 26 | + mediatek,mdio_master_pinmux = <0>; |
| 27 | + reset-gpios = <&pio 54 0>; |
| 28 | + interrupt-parent = <&pio>; |
| 29 | + interrupts = <53 IRQ_TYPE_LEVEL_HIGH>; |
| 30 | + status = "okay"; |
| 31 | + |
| 32 | + port5: port@5 { |
| 33 | + compatible = "mediatek,mt753x-port"; |
| 34 | + reg = <5>; |
| 35 | + phy-mode = "rgmii"; |
| 36 | + fixed-link { |
| 37 | + speed = <1000>; |
| 38 | + full-duplex; |
| 39 | + }; |
| 40 | + }; |
| 41 | + |
| 42 | + port6: port@6 { |
| 43 | + compatible = "mediatek,mt753x-port"; |
| 44 | + reg = <6>; |
| 45 | + phy-mode = "sgmii"; |
| 46 | + fixed-link { |
| 47 | + speed = <2500>; |
| 48 | + full-duplex; |
| 49 | + }; |
| 50 | + }; |
| 51 | +}; |
| 52 | + |
| 53 | &i2c1 { |
| 54 | pinctrl-names = "default"; |
| 55 | pinctrl-0 = <&i2c1_pins>; |
developer | cc8110b | 2024-08-19 13:53:34 +0800 | [diff] [blame^] | 56 | diff --git a/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts b/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts |
| 57 | index ee57fcc..0fc2dcb 100644 |
developer | f11ee16 | 2022-04-12 11:17:45 +0800 | [diff] [blame] | 58 | --- a/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts |
| 59 | +++ b/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts |
| 60 | @@ -1,7 +1,6 @@ |
| 61 | /* |
| 62 | - * Copyright (c) 2017 MediaTek Inc. |
| 63 | - * Author: Ming Huang <ming.huang@mediatek.com> |
| 64 | - * Sean Wang <sean.wang@mediatek.com> |
| 65 | + * Copyright (c) 2018 MediaTek Inc. |
| 66 | + * Author: Ryder Lee <ryder.lee@mediatek.com> |
| 67 | * |
| 68 | * SPDX-License-Identifier: (GPL-2.0 OR MIT) |
| 69 | */ |
| 70 | @@ -14,7 +13,7 @@ |
| 71 | #include "mt6380.dtsi" |
| 72 | |
| 73 | / { |
| 74 | - model = "MediaTek MT7622 RFB1 board"; |
| 75 | + model = "MT7622_MT7531 RFB"; |
| 76 | compatible = "mediatek,mt7622-rfb1", "mediatek,mt7622"; |
| 77 | |
| 78 | aliases { |
| 79 | @@ -23,7 +22,7 @@ |
| 80 | |
| 81 | chosen { |
| 82 | stdout-path = "serial0:115200n8"; |
| 83 | - bootargs = "earlycon=uart8250,mmio32,0x11002000 swiotlb=512"; |
| 84 | + bootargs = "earlycon=uart8250,mmio32,0x11002000 console=ttyS0,115200n1 swiotlb=512"; |
| 85 | }; |
| 86 | |
| 87 | cpus { |
developer | cc8110b | 2024-08-19 13:53:34 +0800 | [diff] [blame^] | 88 | @@ -40,23 +39,36 @@ |
developer | f11ee16 | 2022-04-12 11:17:45 +0800 | [diff] [blame] | 89 | |
| 90 | gpio-keys { |
| 91 | compatible = "gpio-keys"; |
| 92 | - poll-interval = <100>; |
| 93 | |
| 94 | factory { |
| 95 | label = "factory"; |
| 96 | linux,code = <BTN_0>; |
| 97 | - gpios = <&pio 0 0>; |
| 98 | + gpios = <&pio 0 GPIO_ACTIVE_LOW>; |
| 99 | }; |
| 100 | |
| 101 | wps { |
| 102 | label = "wps"; |
| 103 | linux,code = <KEY_WPS_BUTTON>; |
| 104 | - gpios = <&pio 102 0>; |
| 105 | + gpios = <&pio 102 GPIO_ACTIVE_LOW>; |
developer | 1afdd34 | 2024-04-08 14:04:38 +0800 | [diff] [blame] | 106 | }; |
| 107 | }; |
| 108 | |
developer | f11ee16 | 2022-04-12 11:17:45 +0800 | [diff] [blame] | 109 | + leds { |
| 110 | + compatible = "gpio-leds"; |
| 111 | + |
| 112 | + green { |
| 113 | + label = "bpi-r64:pio:green"; |
| 114 | + gpios = <&pio 89 GPIO_ACTIVE_HIGH>; |
| 115 | + }; |
| 116 | + |
| 117 | + red { |
| 118 | + label = "bpi-r64:pio:red"; |
| 119 | + gpios = <&pio 88 GPIO_ACTIVE_HIGH>; |
developer | 1afdd34 | 2024-04-08 14:04:38 +0800 | [diff] [blame] | 120 | + }; |
| 121 | + }; |
developer | cc8110b | 2024-08-19 13:53:34 +0800 | [diff] [blame^] | 122 | + |
developer | 1afdd34 | 2024-04-08 14:04:38 +0800 | [diff] [blame] | 123 | memory@40000000 { |
developer | f11ee16 | 2022-04-12 11:17:45 +0800 | [diff] [blame] | 124 | - reg = <0 0x40000000 0 0x20000000>; |
| 125 | + reg = <0 0x40000000 0 0x40000000>; |
developer | cc8110b | 2024-08-19 13:53:34 +0800 | [diff] [blame^] | 126 | device_type = "memory"; |
developer | f11ee16 | 2022-04-12 11:17:45 +0800 | [diff] [blame] | 127 | }; |
| 128 | |
developer | cc8110b | 2024-08-19 13:53:34 +0800 | [diff] [blame^] | 129 | @@ -102,24 +114,83 @@ |
developer | f11ee16 | 2022-04-12 11:17:45 +0800 | [diff] [blame] | 130 | }; |
| 131 | |
| 132 | ð { |
| 133 | - pinctrl-names = "default"; |
| 134 | - pinctrl-0 = <ð_pins>; |
| 135 | status = "okay"; |
| 136 | + gmac0: mac@0 { |
| 137 | + compatible = "mediatek,eth-mac"; |
| 138 | + reg = <0>; |
| 139 | + phy-mode = "2500base-x"; |
| 140 | + |
| 141 | + fixed-link { |
| 142 | + speed = <2500>; |
| 143 | + full-duplex; |
| 144 | + pause; |
| 145 | + }; |
| 146 | + }; |
| 147 | |
| 148 | gmac1: mac@1 { |
| 149 | compatible = "mediatek,eth-mac"; |
| 150 | reg = <1>; |
| 151 | - phy-handle = <&phy5>; |
| 152 | + phy-mode = "rgmii"; |
| 153 | + |
| 154 | + fixed-link { |
| 155 | + speed = <1000>; |
| 156 | + full-duplex; |
| 157 | + pause; |
| 158 | + }; |
| 159 | }; |
| 160 | |
| 161 | - mdio-bus { |
| 162 | + mdio: mdio-bus { |
| 163 | #address-cells = <1>; |
| 164 | #size-cells = <0>; |
| 165 | |
| 166 | - phy5: ethernet-phy@5 { |
| 167 | - reg = <5>; |
| 168 | - phy-mode = "sgmii"; |
developer | cc8110b | 2024-08-19 13:53:34 +0800 | [diff] [blame^] | 169 | - }; |
developer | f11ee16 | 2022-04-12 11:17:45 +0800 | [diff] [blame] | 170 | + switch@0 { |
| 171 | + compatible = "mediatek,mt7531"; |
| 172 | + reg = <0>; |
| 173 | + reset-gpios = <&pio 54 0>; |
| 174 | + |
| 175 | + ports { |
| 176 | + #address-cells = <1>; |
| 177 | + #size-cells = <0>; |
| 178 | + |
| 179 | + port@0 { |
| 180 | + reg = <0>; |
| 181 | + label = "lan1"; |
| 182 | + }; |
| 183 | + |
| 184 | + port@1 { |
| 185 | + reg = <1>; |
| 186 | + label = "lan2"; |
| 187 | + }; |
| 188 | + |
| 189 | + port@2 { |
| 190 | + reg = <2>; |
| 191 | + label = "lan3"; |
| 192 | + }; |
| 193 | + |
| 194 | + port@3 { |
| 195 | + reg = <3>; |
| 196 | + label = "lan4"; |
| 197 | + }; |
| 198 | + |
| 199 | + port@4 { |
| 200 | + reg = <4>; |
| 201 | + label = "wan"; |
| 202 | + }; |
| 203 | + |
| 204 | + port@6 { |
| 205 | + reg = <6>; |
| 206 | + label = "cpu"; |
| 207 | + ethernet = <&gmac0>; |
| 208 | + phy-mode = "2500base-x"; |
| 209 | + |
| 210 | + fixed-link { |
| 211 | + speed = <2500>; |
| 212 | + full-duplex; |
| 213 | + pause; |
| 214 | + }; |
| 215 | + }; |
| 216 | + }; |
developer | cc8110b | 2024-08-19 13:53:34 +0800 | [diff] [blame^] | 217 | + }; |
developer | f11ee16 | 2022-04-12 11:17:45 +0800 | [diff] [blame] | 218 | }; |
| 219 | }; |
developer | f11ee16 | 2022-04-12 11:17:45 +0800 | [diff] [blame] | 220 | |
developer | cc8110b | 2024-08-19 13:53:34 +0800 | [diff] [blame^] | 221 | @@ -195,6 +266,15 @@ |
developer | f11ee16 | 2022-04-12 11:17:45 +0800 | [diff] [blame] | 222 | }; |
| 223 | |
| 224 | &pio { |
| 225 | + /* Attention: GPIO 90 is used to switch between PCIe@1,0 and |
| 226 | + * SATA functions. i.e. output-high: PCIe, output-low: SATA |
| 227 | + */ |
| 228 | + asm_sel { |
| 229 | + gpio-hog; |
| 230 | + gpios = <90 GPIO_ACTIVE_HIGH>; |
| 231 | + output-high; |
| 232 | + }; |
| 233 | + |
| 234 | /* eMMC is shared pin with parallel NAND */ |
| 235 | emmc_pins_default: emmc-pins-default { |
| 236 | mux { |
developer | cc8110b | 2024-08-19 13:53:34 +0800 | [diff] [blame^] | 237 | @@ -461,11 +541,11 @@ |
developer | f11ee16 | 2022-04-12 11:17:45 +0800 | [diff] [blame] | 238 | }; |
| 239 | |
| 240 | &sata { |
| 241 | - status = "okay"; |
| 242 | + status = "disable"; |
| 243 | }; |
| 244 | |
| 245 | &sata_phy { |
| 246 | - status = "okay"; |
| 247 | + status = "disable"; |
| 248 | }; |
| 249 | |
| 250 | &spi0 { |