-
Notifications
You must be signed in to change notification settings - Fork 19.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mediatek: add support for BananaPi BPI-R4 board
Hardware -------- SOC: MediaTek MT7988A (4x Cortex-A73) RAM: 4 GiB DDR4 Flash: 128 MiB Winbond SPI-NAND MMC: 8 GiB eMMC *or* microSD (cannot be used both) ETH: 4x 1GE (1x WAN, 3x LAN) 2x SFP+ (10G, 5G, 2.5G, 1G) USB: on-board USB 3.2 4-port hub 1x USB 3.2 port (type A connector) 1x M.2 for 4G/5G modem 2x mPCIe for additional modems WiFi: optional MediaTek MT7996 Wi-Fi 7 module (using 2x PCIe gen3 x2 on the mPCIe slots and 12V power) Installation ------------ 1. Decompress and write the sdcard image to a micro SD card and use that to boot the R4 (both dip switches in upper position). 2. Use the bootloader menu accessible via the serial console to install to SPI-NAND. 3. Switch to boot from SPI-NAND and install to eMMC. Signed-off-by: Daniel Golle <[email protected]>
- Loading branch information
Showing
15 changed files
with
767 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
62 changes: 62 additions & 0 deletions
62
...t/linux/mediatek/files-6.1/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4-emmc.dtso
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
// SPDX-License-Identifier: (GPL-2.0 OR MIT) | ||
/* | ||
* Copyright (C) 2021 MediaTek Inc. | ||
* Author: Frank Wunderlich <[email protected]> | ||
*/ | ||
|
||
/dts-v1/; | ||
/plugin/; | ||
|
||
/ { | ||
compatible = "bananapi,bpi-r4", "mediatek,mt7988a"; | ||
|
||
fragment@0 { | ||
target-path = "/soc/mmc@11230000"; | ||
__overlay__ { | ||
pinctrl-names = "default", "state_uhs"; | ||
pinctrl-0 = <&mmc0_pins_emmc_51>; | ||
pinctrl-1 = <&mmc0_pins_emmc_51>; | ||
bus-width = <8>; | ||
max-frequency = <200000000>; | ||
cap-mmc-highspeed; | ||
mmc-hs200-1_8v; | ||
mmc-hs400-1_8v; | ||
hs400-ds-delay = <0x12814>; | ||
vqmmc-supply = <®_1p8v>; | ||
vmmc-supply = <®_3p3v>; | ||
non-removable; | ||
no-sd; | ||
no-sdio; | ||
status = "okay"; | ||
#address-cells = <1>; | ||
#size-cells = <0>; | ||
|
||
card@0 { | ||
compatible = "mmc-card"; | ||
reg = <0>; | ||
|
||
block { | ||
compatible = "block-device"; | ||
partitions { | ||
block-partition-env { | ||
partname = "ubootenv"; | ||
nvmem-layout { | ||
compatible = "u-boot,env-layout"; | ||
}; | ||
}; | ||
emmc_rootfs: block-partition-production { | ||
partname = "production"; | ||
}; | ||
}; | ||
}; | ||
}; | ||
}; | ||
}; | ||
|
||
fragment@2 { | ||
target-path = "/chosen"; | ||
__overlay__ { | ||
rootdisk-emmc = <&emmc_rootfs>; | ||
}; | ||
}; | ||
}; |
25 changes: 25 additions & 0 deletions
25
target/linux/mediatek/files-6.1/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4-poe.dts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// SPDX-License-Identifier: (GPL-2.0 OR MIT) | ||
/* | ||
* Copyright (C) 2022 MediaTek Inc. | ||
* Author: Sam.Shih <[email protected]> | ||
*/ | ||
|
||
#include "mt7988a-bananapi-bpi-r4.dts" | ||
|
||
/ { | ||
model = "Bananapi BPI-R4 2.5GE PoE"; | ||
compatible = "bananapi,bpi-r4-poe", | ||
"mediatek,mt7988a"; | ||
}; | ||
|
||
&gmac1 { | ||
phy-mode = "internal"; | ||
phy-connection-type = "internal"; | ||
phy = <&int_2p5g_phy>; | ||
status = "okay"; | ||
}; | ||
|
||
&int_2p5g_phy { | ||
pinctrl-names = "i2p5gbe-led"; | ||
pinctrl-0 = <&i2p5gbe_led0_pins>; | ||
}; |
19 changes: 19 additions & 0 deletions
19
...et/linux/mediatek/files-6.1/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4-rtc.dtso
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// SPDX-License-Identifier: (GPL-2.0 OR MIT) | ||
/* | ||
* Copyright (C) 2023 | ||
* Author: Daniel Golle <[email protected]> | ||
*/ | ||
|
||
/dts-v1/; | ||
/plugin/; | ||
|
||
/ { | ||
compatible = "bananapi,bpi-r4", "mediatek,mt7988a"; | ||
|
||
fragment@0 { | ||
target = <&pcf8563>; | ||
__overlay__ { | ||
status = "okay"; | ||
}; | ||
}; | ||
}; |
60 changes: 60 additions & 0 deletions
60
target/linux/mediatek/files-6.1/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4-sd.dtso
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
// SPDX-License-Identifier: (GPL-2.0 OR MIT) | ||
/* | ||
* Copyright (C) 2023 MediaTek Inc. | ||
* Author: Frank Wunderlich <[email protected]> | ||
*/ | ||
|
||
/dts-v1/; | ||
/plugin/; | ||
|
||
#include <dt-bindings/gpio/gpio.h> | ||
|
||
/ { | ||
compatible = "bananapi,bpi-r4", "mediatek,mt7988a"; | ||
|
||
fragment@1 { | ||
target-path = "/soc/mmc@11230000"; | ||
__overlay__ { | ||
pinctrl-names = "default", "state_uhs"; | ||
pinctrl-0 = <&mmc0_pins_sdcard>; | ||
pinctrl-1 = <&mmc0_pins_sdcard>; | ||
cd-gpios = <&pio 12 GPIO_ACTIVE_LOW>; | ||
bus-width = <4>; | ||
max-frequency = <52000000>; | ||
cap-sd-highspeed; | ||
vmmc-supply = <®_3p3v>; | ||
vqmmc-supply = <®_3p3v>; | ||
no-mmc; | ||
status = "okay"; | ||
#address-cells = <1>; | ||
#size-cells = <0>; | ||
|
||
card@0 { | ||
compatible = "mmc-card"; | ||
reg = <0>; | ||
|
||
block { | ||
compatible = "block-device"; | ||
partitions { | ||
block-partition-env { | ||
partname = "ubootenv"; | ||
nvmem-layout { | ||
compatible = "u-boot,env-layout"; | ||
}; | ||
}; | ||
sd_rootfs: block-partition-production { | ||
partname = "production"; | ||
}; | ||
}; | ||
}; | ||
}; | ||
}; | ||
}; | ||
|
||
fragment@2 { | ||
target-path = "/chosen"; | ||
__overlay__ { | ||
rootdisk-sd = <&sd_rootfs>; | ||
}; | ||
}; | ||
}; |
99 changes: 99 additions & 0 deletions
99
...mediatek/files-6.1/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4-wifi-mt7996a.dtso
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
// SPDX-License-Identifier: (GPL-2.0 OR MIT) | ||
/dts-v1/; | ||
/plugin/; | ||
|
||
#include <dt-bindings/gpio/gpio.h> | ||
|
||
/ { | ||
compatible = "bananapi,bpi-r4", "mediatek,mt7988a"; | ||
|
||
fragment@0 { | ||
target-path = "/"; | ||
__overlay__ { | ||
wifi_12v: regulator-wifi-12v { | ||
compatible = "regulator-fixed"; | ||
regulator-name = "wifi"; | ||
regulator-min-microvolt = <12000000>; | ||
regulator-max-microvolt = <12000000>; | ||
gpio = <&pio 4 GPIO_ACTIVE_HIGH>; | ||
enable-active-high; | ||
regulator-always-on; | ||
}; | ||
}; | ||
}; | ||
|
||
fragment@1 { | ||
target = <&i2c_wifi>; | ||
__overlay__ { | ||
// 5G WIFI MAC Address EEPROM | ||
wifi_eeprom@51 { | ||
compatible = "atmel,24c02"; | ||
reg = <0x51>; | ||
address-bits = <8>; | ||
page-size = <8>; | ||
size = <256>; | ||
|
||
nvmem-layout { | ||
compatible = "fixed-layout"; | ||
#address-cells = <1>; | ||
#size-cells = <1>; | ||
|
||
macaddr_5g: macaddr@0 { | ||
reg = <0x0 0x6>; | ||
}; | ||
}; | ||
}; | ||
|
||
// 6G WIFI MAC Address EEPROM | ||
wifi_eeprom@52 { | ||
compatible = "atmel,24c02"; | ||
reg = <0x52>; | ||
address-bits = <8>; | ||
page-size = <8>; | ||
size = <256>; | ||
|
||
nvmem-layout { | ||
compatible = "fixed-layout"; | ||
#address-cells = <1>; | ||
#size-cells = <1>; | ||
|
||
macaddr_6g: macaddr@0 { | ||
reg = <0x0 0x6>; | ||
}; | ||
}; | ||
}; | ||
}; | ||
}; | ||
|
||
fragment@2 { | ||
target = <&pcie0>; | ||
__overlay__ { | ||
pcie@0,0 { | ||
reg = <0x0000 0 0 0 0>; | ||
|
||
wifi@0,0 { | ||
compatible = "mediatek,mt76"; | ||
reg = <0x0000 0 0 0 0>; | ||
nvmem-cell-names = "mac-address"; | ||
nvmem-cells = <&macaddr_5g>; | ||
}; | ||
}; | ||
}; | ||
}; | ||
|
||
fragment@3 { | ||
target = <&pcie1>; | ||
__overlay__ { | ||
pcie@0,0 { | ||
reg = <0x0000 0 0 0 0>; | ||
|
||
wifi@0,0 { | ||
compatible = "mediatek,mt76"; | ||
reg = <0x0000 0 0 0 0>; | ||
nvmem-cell-names = "mac-address"; | ||
nvmem-cells = <&macaddr_6g>; | ||
}; | ||
}; | ||
}; | ||
}; | ||
}; |
Oops, something went wrong.