mediatek: add support for CMCC XR30 and CMCC XR30 eMMC
Hardware specification: SoC: MediaTek MT7981B 2x A53 Flash: GIGADEVICE GD5F1GM7UExxG 128MB or 64GB eMMC RAM: DDR4 512MB Ethernet: 4x 10/100/1000 Mbps Switch: MediaTek MT7531AE WiFi: MediaTek MT7976C Button: Reset, Mesh Power: DC 12V 1.5A
This commit is contained in:
143
uboot-mtk-20220606/arch/arm/dts/mt7981-cmcc-xr30-emmc.dts
Normal file
143
uboot-mtk-20220606/arch/arm/dts/mt7981-cmcc-xr30-emmc.dts
Normal file
@@ -0,0 +1,143 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
|
||||
/dts-v1/;
|
||||
#include "mt7981.dtsi"
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/input/input.h>
|
||||
|
||||
/ {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
model = "mt7981-cmcc_xr30-emmc";
|
||||
compatible = "mediatek,mt7981", "mediatek,mt7981-rfb";
|
||||
|
||||
chosen {
|
||||
stdout-path = &uart0;
|
||||
tick-timer = &timer0;
|
||||
};
|
||||
|
||||
config {
|
||||
bootcmd = "mtkboardboot";
|
||||
blink_led = "red:system";
|
||||
system_led = "white:system";
|
||||
};
|
||||
|
||||
memory@40000000 {
|
||||
device_type = "memory";
|
||||
reg = <0x40000000 0x20000000>;
|
||||
};
|
||||
|
||||
gpio-keys {
|
||||
compatible = "gpio-keys";
|
||||
|
||||
reset-button {
|
||||
label = "reset";
|
||||
gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
mesh-button {
|
||||
label = "mesh";
|
||||
gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
led@0 {
|
||||
label = "red:system";
|
||||
gpios = <&gpio 35 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
led@1 {
|
||||
label = "white:system";
|
||||
gpios = <&gpio 34 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
reg_1p8v: regulator-1p8v {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "fixed-1.8V";
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
regulator-boot-on;
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
reg_3p3v: regulator-3p3v {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "fixed-3.3V";
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
regulator-boot-on;
|
||||
regulator-always-on;
|
||||
};
|
||||
};
|
||||
|
||||
ð {
|
||||
status = "okay";
|
||||
mediatek,gmac-id = <0>;
|
||||
phy-mode = "sgmii";
|
||||
mediatek,switch = "mt7531";
|
||||
reset-gpios = <&gpio 39 GPIO_ACTIVE_HIGH>;
|
||||
|
||||
fixed-link {
|
||||
speed = <1000>;
|
||||
full-duplex;
|
||||
};
|
||||
};
|
||||
|
||||
&mmc0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&mmc0_pins_default>;
|
||||
bus-width = <8>;
|
||||
max-frequency = <26000000>;
|
||||
cap-mmc-hw-reset;
|
||||
vmmc-supply = <®_3p3v>;
|
||||
vqmmc-supply = <®_1p8v>;
|
||||
non-removable;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pinctrl {
|
||||
spic_pins: spi1-pins-func-1 {
|
||||
mux {
|
||||
function = "spi";
|
||||
groups = "spi1_1";
|
||||
};
|
||||
};
|
||||
|
||||
mmc0_pins_default: mmc0default {
|
||||
mux {
|
||||
function = "flash";
|
||||
groups = "emmc_45";
|
||||
};
|
||||
conf-cmd-dat {
|
||||
pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO",
|
||||
"SPI0_CS", "SPI0_HOLD", "SPI0_WP",
|
||||
"SPI1_CLK", "SPI1_MOSI", "SPI1_MISO";
|
||||
input-enable;
|
||||
drive-strength = <MTK_DRIVE_4mA>;
|
||||
bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
|
||||
};
|
||||
conf-clk {
|
||||
pins = "SPI1_CS";
|
||||
drive-strength = <MTK_DRIVE_6mA>;
|
||||
bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
|
||||
};
|
||||
conf-rst {
|
||||
pins = "PWM0";
|
||||
drive-strength = <MTK_DRIVE_4mA>;
|
||||
bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&watchdog {
|
||||
status = "disabled";
|
||||
};
|
||||
115
uboot-mtk-20220606/arch/arm/dts/mt7981-cmcc-xr30.dts
Normal file
115
uboot-mtk-20220606/arch/arm/dts/mt7981-cmcc-xr30.dts
Normal file
@@ -0,0 +1,115 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
/dts-v1/;
|
||||
#include "mt7981.dtsi"
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
|
||||
/ {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
model = "mt7981-cmcc-xr30";
|
||||
compatible = "mediatek,mt7981", "mediatek,mt7981-rfb";
|
||||
|
||||
chosen {
|
||||
stdout-path = &uart0;
|
||||
tick-timer = &timer0;
|
||||
};
|
||||
|
||||
config {
|
||||
bootcmd = "mtkboardboot";
|
||||
blink_led = "red:system";
|
||||
system_led = "white:system";
|
||||
};
|
||||
|
||||
gpio-keys {
|
||||
compatible = "gpio-keys";
|
||||
|
||||
reset-button {
|
||||
label = "reset";
|
||||
gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
mesh-button {
|
||||
label = "mesh";
|
||||
gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
led@0 {
|
||||
label = "red:system";
|
||||
gpios = <&gpio 35 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
led@1 {
|
||||
label = "white:system";
|
||||
gpios = <&gpio 34 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
ð {
|
||||
status = "okay";
|
||||
mediatek,gmac-id = <0>;
|
||||
phy-mode = "sgmii";
|
||||
mediatek,switch = "mt7531";
|
||||
reset-gpios = <&gpio 39 GPIO_ACTIVE_HIGH>;
|
||||
|
||||
fixed-link {
|
||||
speed = <1000>;
|
||||
full-duplex;
|
||||
};
|
||||
};
|
||||
|
||||
&pinctrl {
|
||||
spi_flash_pins: spi0-pins-func-1 {
|
||||
mux {
|
||||
function = "flash";
|
||||
groups = "spi0", "spi0_wp_hold";
|
||||
};
|
||||
|
||||
conf-pu {
|
||||
pins = "SPI0_CS", "SPI0_HOLD", "SPI0_WP";
|
||||
drive-strength = <MTK_DRIVE_8mA>;
|
||||
bias-pull-up = <MTK_PUPD_SET_R1R0_11>;
|
||||
};
|
||||
|
||||
conf-pd {
|
||||
pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO";
|
||||
drive-strength = <MTK_DRIVE_8mA>;
|
||||
bias-pull-down = <MTK_PUPD_SET_R1R0_11>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&spi0 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&spi_flash_pins>;
|
||||
status = "okay";
|
||||
must_tx;
|
||||
enhance_timing;
|
||||
dma_ext;
|
||||
ipm_design;
|
||||
support_quad;
|
||||
tick_dly = <2>;
|
||||
sample_sel = <0>;
|
||||
|
||||
spi_nand@0 {
|
||||
compatible = "spi-nand";
|
||||
reg = <0>;
|
||||
spi-max-frequency = <52000000>;
|
||||
};
|
||||
};
|
||||
|
||||
&watchdog {
|
||||
status = "disabled";
|
||||
};
|
||||
94
uboot-mtk-20220606/configs/mt7981_cmcc_xr30-emmc_defconfig
Normal file
94
uboot-mtk-20220606/configs/mt7981_cmcc_xr30-emmc_defconfig
Normal file
@@ -0,0 +1,94 @@
|
||||
CONFIG_ARM=y
|
||||
CONFIG_POSITION_INDEPENDENT=y
|
||||
CONFIG_ARCH_MEDIATEK=y
|
||||
CONFIG_SYS_TEXT_BASE=0x41e00000
|
||||
CONFIG_SYS_MALLOC_F_LEN=0x4000
|
||||
CONFIG_NR_DRAM_BANKS=1
|
||||
CONFIG_ENV_SIZE=0x80000
|
||||
CONFIG_ENV_OFFSET=0x400000
|
||||
CONFIG_DEFAULT_DEVICE_TREE="mt7981-cmcc-xr30-emmc"
|
||||
CONFIG_TARGET_MT7981=y
|
||||
CONFIG_MEDIATEK_BOOTMENU=y
|
||||
CONFIG_MEDIATEK_BOOTMENU_DELAY=3
|
||||
CONFIG_MEDIATEK_LOAD_FROM_RAM=y
|
||||
CONFIG_MT7981_BOOTMENU_EMMC=y
|
||||
CONFIG_DEBUG_UART_BASE=0x11002000
|
||||
CONFIG_DEBUG_UART_CLOCK=40000000
|
||||
CONFIG_DEBUG_UART=y
|
||||
CONFIG_BOOTDELAY=3
|
||||
CONFIG_SYS_LOAD_ADDR=0x46000000
|
||||
CONFIG_FIT=y
|
||||
CONFIG_AUTOBOOT_MENU_SHOW=y
|
||||
CONFIG_AUTOBOOT_MENU_MTK_SHOW=y
|
||||
CONFIG_DEFAULT_FDT_FILE="mt7981-emmc-rfb"
|
||||
CONFIG_LOGLEVEL=7
|
||||
CONFIG_LOG=y
|
||||
CONFIG_SYS_PROMPT="MT7981> "
|
||||
CONFIG_CMD_MEMTEST=y
|
||||
CONFIG_CMD_TFTPPUT=y
|
||||
CONFIG_CMD_GPIO=y
|
||||
CONFIG_CMD_PWM=y
|
||||
CONFIG_CMD_GPT=y
|
||||
CONFIG_CMD_GPT_RENAME=y
|
||||
CONFIG_CMD_LSBLK=y
|
||||
CONFIG_CMD_MMC=y
|
||||
CONFIG_CMD_PART=y
|
||||
CONFIG_CMD_PCI=y
|
||||
CONFIG_CMD_READ=y
|
||||
CONFIG_CMD_PING=y
|
||||
CONFIG_CMD_SMC=y
|
||||
CONFIG_CMD_FAT=y
|
||||
CONFIG_CMD_FS_GENERIC=y
|
||||
# CONFIG_DOS_PARTITION is not set
|
||||
CONFIG_PARTITION_TYPE_GUID=y
|
||||
CONFIG_OF_EMBED=y
|
||||
CONFIG_ENV_OVERWRITE=y
|
||||
CONFIG_ENV_IS_IN_MMC=y
|
||||
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
|
||||
CONFIG_NET_RANDOM_ETHADDR=y
|
||||
CONFIG_NET_FORCE_IPADDR=y
|
||||
CONFIG_REGMAP=y
|
||||
CONFIG_SYSCON=y
|
||||
CONFIG_CLK=y
|
||||
CONFIG_SYS_I2C_MTK=y
|
||||
CONFIG_SUPPORT_EMMC_BOOT=y
|
||||
CONFIG_MMC_MTK=y
|
||||
CONFIG_PHY_FIXED=y
|
||||
CONFIG_DM_ETH=y
|
||||
CONFIG_MEDIATEK_ETH=y
|
||||
CONFIG_PCI=y
|
||||
CONFIG_PCIE_MEDIATEK=y
|
||||
CONFIG_PINCTRL=y
|
||||
CONFIG_PINCONF=y
|
||||
CONFIG_PINCTRL_MT7981=y
|
||||
CONFIG_POWER_DOMAIN=y
|
||||
CONFIG_MTK_POWER_DOMAIN=y
|
||||
CONFIG_DM_REGULATOR=y
|
||||
CONFIG_DM_REGULATOR_FIXED=y
|
||||
CONFIG_DM_PWM=y
|
||||
CONFIG_PWM_MTK=y
|
||||
CONFIG_RAM=y
|
||||
CONFIG_DM_SERIAL=y
|
||||
CONFIG_MTK_SERIAL=y
|
||||
CONFIG_FAT_WRITE=y
|
||||
CONFIG_SPI=y
|
||||
CONFIG_DM_SPI=y
|
||||
CONFIG_TIMER=y
|
||||
CONFIG_MTK_TIMER=y
|
||||
CONFIG_LZO=y
|
||||
CONFIG_HEXDUMP=y
|
||||
CONFIG_CMD_GL_BTN=y
|
||||
CONFIG_BUTTON=y
|
||||
CONFIG_BUTTON_GPIO=y
|
||||
CONFIG_LED=y
|
||||
CONFIG_LED_GPIO=y
|
||||
CONFIG_LED_BLINK=y
|
||||
CONFIG_POLLER=y
|
||||
CONFIG_ENV_VARS_UBOOT_CONFIG=y
|
||||
CONFIG_ENV_IMPORT_FDT=y
|
||||
CONFIG_CMD_LED_BLINK=y
|
||||
CONFIG_HUSH_PARSER=y
|
||||
CONFIG_ARP_TIMEOUT=1000
|
||||
CONFIG_NET_RETRY_COUNT=3
|
||||
CONFIG_WEBUI_FAILSAFE=y
|
||||
# CONFIG_EFI_LOADER is not set
|
||||
91
uboot-mtk-20220606/configs/mt7981_cmcc_xr30_defconfig
Normal file
91
uboot-mtk-20220606/configs/mt7981_cmcc_xr30_defconfig
Normal file
@@ -0,0 +1,91 @@
|
||||
CONFIG_ARM=y
|
||||
CONFIG_POSITION_INDEPENDENT=y
|
||||
CONFIG_ARCH_MEDIATEK=y
|
||||
CONFIG_SYS_TEXT_BASE=0x41e00000
|
||||
CONFIG_SYS_MALLOC_F_LEN=0x4000
|
||||
CONFIG_NR_DRAM_BANKS=1
|
||||
CONFIG_ENV_SIZE=0x80000
|
||||
CONFIG_ENV_OFFSET=0x100000
|
||||
CONFIG_DEFAULT_DEVICE_TREE="mt7981-cmcc-xr30"
|
||||
CONFIG_TARGET_MT7981=y
|
||||
CONFIG_ENABLE_NAND_NMBM=y
|
||||
CONFIG_MEDIATEK_BOOTMENU=y
|
||||
CONFIG_MEDIATEK_BOOTMENU_DELAY=3
|
||||
CONFIG_MEDIATEK_LOAD_FROM_RAM=y
|
||||
CONFIG_MT7981_BOOTMENU_UBI=y
|
||||
CONFIG_DEBUG_UART_BASE=0x11002000
|
||||
CONFIG_DEBUG_UART_CLOCK=40000000
|
||||
CONFIG_SYS_LOAD_ADDR=0x46000000
|
||||
CONFIG_DEBUG_UART=y
|
||||
CONFIG_BOOTDELAY=3
|
||||
CONFIG_AUTOBOOT_MENU_SHOW=y
|
||||
CONFIG_AUTOBOOT_MENU_MTK_SHOW=y
|
||||
CONFIG_DEFAULT_FDT_FILE="mt7981-spim-nand-rfb"
|
||||
CONFIG_LOGLEVEL=7
|
||||
CONFIG_LOG=y
|
||||
CONFIG_POLLER=y
|
||||
CONFIG_HUSH_PARSER=y
|
||||
CONFIG_SYS_PROMPT="MT7981> "
|
||||
# CONFIG_BOOTM_NETBSD is not set
|
||||
# CONFIG_BOOTM_PLAN9 is not set
|
||||
# CONFIG_BOOTM_RTEMS is not set
|
||||
# CONFIG_BOOTM_VXWORKS is not set
|
||||
CONFIG_CMD_MEMINFO=y
|
||||
# CONFIG_CMD_UNLZ4 is not set
|
||||
# CONFIG_CMD_UNZIP is not set
|
||||
# CONFIG_CMD_FLASH is not set
|
||||
CONFIG_CMD_GPIO=y
|
||||
CONFIG_CMD_GPIO_READ=y
|
||||
CONFIG_CMD_MTD=y
|
||||
# CONFIG_CMD_NAND_EXT is not set
|
||||
CONFIG_CMD_NMBM=y
|
||||
CONFIG_CMD_TFTPPUT=y
|
||||
# CONFIG_CMD_NFS is not set
|
||||
CONFIG_CMD_PING=y
|
||||
CONFIG_CMD_LED_BLINK=y
|
||||
CONFIG_CMD_SMC=y
|
||||
CONFIG_CMD_MTDPARTS=y
|
||||
CONFIG_MTDIDS_DEFAULT="nmbm0=nmbm0"
|
||||
CONFIG_MTDPARTS_DEFAULT="nmbm0:1024k(bl2),512k(u-boot-env),2048k(factory),2048k(fip),114M(ubi)"
|
||||
CONFIG_CMD_UBI=y
|
||||
CONFIG_CMD_GL_BTN=y
|
||||
CONFIG_CMD_SHOW_MTD_LAYOUT=y
|
||||
CONFIG_OF_EMBED=y
|
||||
CONFIG_ENV_OVERWRITE=y
|
||||
CONFIG_ENV_IS_IN_MTD=y
|
||||
CONFIG_ENV_MTD_NAME="nmbm0"
|
||||
CONFIG_ENV_SIZE_REDUND=0x80000
|
||||
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
|
||||
CONFIG_NET_RANDOM_ETHADDR=y
|
||||
CONFIG_NET_FORCE_IPADDR=y
|
||||
CONFIG_REGMAP=y
|
||||
CONFIG_SYSCON=y
|
||||
CONFIG_BUTTON=y
|
||||
CONFIG_BUTTON_GPIO=y
|
||||
CONFIG_CLK=y
|
||||
# CONFIG_I2C is not set
|
||||
# CONFIG_INPUT is not set
|
||||
CONFIG_LED=y
|
||||
CONFIG_LED_BLINK=y
|
||||
CONFIG_LED_GPIO=y
|
||||
# CONFIG_MMC is not set
|
||||
CONFIG_DM_MTD=y
|
||||
CONFIG_MTD_SPI_NAND=y
|
||||
CONFIG_PHY_FIXED=y
|
||||
CONFIG_DM_ETH=y
|
||||
CONFIG_MEDIATEK_ETH=y
|
||||
CONFIG_PINCTRL=y
|
||||
CONFIG_PINCONF=y
|
||||
CONFIG_PINCTRL_MT7981=y
|
||||
CONFIG_POWER_DOMAIN=y
|
||||
CONFIG_MTK_POWER_DOMAIN=y
|
||||
CONFIG_RAM=y
|
||||
CONFIG_DM_SERIAL=y
|
||||
CONFIG_MTK_SERIAL=y
|
||||
CONFIG_SPI=y
|
||||
CONFIG_DM_SPI=y
|
||||
CONFIG_MTK_SPIM=y
|
||||
CONFIG_TIMER=y
|
||||
CONFIG_MTK_TIMER=y
|
||||
CONFIG_HEXDUMP=y
|
||||
CONFIG_WEBUI_FAILSAFE=y
|
||||
Reference in New Issue
Block a user