Skip to content

Commit

Permalink
Merge pull request #34 from 1715173329/jdc
Browse files Browse the repository at this point in the history
mt7986: add JDCloud RE-CP-03 support
  • Loading branch information
hanwckf authored Dec 10, 2023
2 parents 16fd483 + 2a510d3 commit 674a97a
Show file tree
Hide file tree
Showing 6 changed files with 486 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
CONFIG_PLAT_MT7986=y
CONFIG_TARGET_FIP_NO_SEC_BOOT=y
CONFIG_FLASH_DEVICE_EMMC=y
CONFIG_DRAM_DDR4=y
144 changes: 144 additions & 0 deletions uboot-mtk-20220606/arch/arm/dts/mt7986a-jdcloud_re-cp-03.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
// SPDX-License-Identifier: GPL-2.0-or-later

/dts-v1/;
#include <dt-bindings/input/linux-event-codes.h>
#include "mt7986.dtsi"
#include <dt-bindings/gpio/gpio.h>

/ {
#address-cells = <1>;
#size-cells = <1>;
model = "mt7986-jdcloud_re-cp-03";
compatible = "mediatek,mt7986", "mediatek,mt7986-rfb";

chosen {
stdout-path = &uart0;
tick-timer = &timer0;
};

config {
bootcmd = "mtkboardboot";
blink_led = "blue:status";
system_led = "red:status";
};

gpio-keys {
compatible = "gpio-keys";

button-mesh {
label = "mesh";
gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
};

button-reset {
label = "reset";
gpios = <&gpio 9 GPIO_ACTIVE_LOW>;
};
};

gpio-leds {
compatible = "gpio-leds";

led-0 {
label = "blue:status";
gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
};

red_led: led-1 {
label = "red:status";
gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
};

green_led: led-2 {
label = "green:status";
gpios = <&gpio 12 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;
};
};

&eth {
status = "okay";
mediatek,gmac-id = <0>;
phy-mode = "sgmii";
mediatek,switch = "mt7531";
reset-gpios = <&gpio 5 GPIO_ACTIVE_HIGH>;

fixed-link {
speed = <1000>;
full-duplex;
};
};

&mmc0 {
bus-width = <8>;
cap-mmc-highspeed;
cap-mmc-hw-reset;
max-frequency = <200000000>;
non-removable;
pinctrl-names = "default";
pinctrl-0 = <&mmc0_pins_default>;
vmmc-supply = <&reg_3p3v>;
vqmmc-supply = <&reg_1p8v>;
status = "okay";
};

&pinctrl {
mmc0_pins_default: mmc0default {
mux {
function = "flash";
groups = "emmc_51";
};

conf-cmd-dat {
pins = "EMMC_DATA_0", "EMMC_DATA_1", "EMMC_DATA_2",
"EMMC_DATA_3", "EMMC_DATA_4", "EMMC_DATA_5",
"EMMC_DATA_6", "EMMC_DATA_7", "EMMC_CMD";
input-enable;
drive-strength = <MTK_DRIVE_4mA>;
bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
};

conf-clk {
pins = "EMMC_CK";
drive-strength = <MTK_DRIVE_6mA>;
bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
};

conf-dsl {
pins = "EMMC_DSL";
bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
};

conf-rst {
pins = "EMMC_RSTB";
drive-strength = <MTK_DRIVE_4mA>;
bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
};
};
};

&uart0 {
status = "okay";
};

&watchdog {
status = "disabled";
};
84 changes: 84 additions & 0 deletions uboot-mtk-20220606/configs/mt7986_jdcloud_re-cp-03_defconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
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=0x40000
CONFIG_DEFAULT_DEVICE_TREE="mt7986a-jdcloud_re-cp-03"
CONFIG_TARGET_MT7986=y
CONFIG_MEDIATEK_BOOTMENU=y
CONFIG_MEDIATEK_BOOTMENU_DELAY=3
CONFIG_MT7986_BOOTMENU_EMMC=y
CONFIG_DEBUG_UART_BASE=0x11002000
CONFIG_DEBUG_UART_CLOCK=40000000
CONFIG_SYS_LOAD_ADDR=0x46000000
CONFIG_DEBUG_UART=y
CONFIG_ENV_VARS_UBOOT_CONFIG=y
CONFIG_AUTOBOOT_MENU_SHOW=y
CONFIG_AUTOBOOT_MENU_MTK_SHOW=y
CONFIG_DEFAULT_FDT_FILE="mt7986a-rfb"
CONFIG_LOGLEVEL=7
CONFIG_LOG=y
CONFIG_POLLER=y
CONFIG_HUSH_PARSER=y
CONFIG_SYS_PROMPT="MT7986> "
# 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_ELF is not set
CONFIG_CMD_DM=y
CONFIG_CMD_GPIO=y
CONFIG_CMD_GPIO_READ=y
CONFIG_CMD_GPT=y
CONFIG_CMD_GPT_RENAME=y
CONFIG_CMD_LSBLK=y
CONFIG_CMD_MMC=y
CONFIG_CMD_PART=y
CONFIG_CMD_READ=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_FAT=y
CONFIG_CMD_FS_GENERIC=y
CONFIG_CMD_GL_BTN=y
CONFIG_PARTITION_TYPE_GUID=y
CONFIG_ENV_OVERWRITE=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
CONFIG_ENV_IMPORT_FDT=y
CONFIG_ARP_TIMEOUT=1000
CONFIG_NET_RETRY_COUNT=3
CONFIG_NET_RANDOM_ETHADDR=y
CONFIG_REGMAP=y
CONFIG_SYSCON=y
CONFIG_BUTTON=y
CONFIG_BUTTON_GPIO=y
CONFIG_CLK=y
# CONFIG_I2C is not set
CONFIG_LED=y
CONFIG_LED_BLINK=y
CONFIG_LED_GPIO=y
CONFIG_SUPPORT_EMMC_BOOT=y
CONFIG_MMC_HS200_SUPPORT=y
CONFIG_MMC_MTK=y
CONFIG_PHY_FIXED=y
CONFIG_DM_ETH=y
CONFIG_MEDIATEK_ETH=y
CONFIG_PINCTRL=y
CONFIG_PINCONF=y
CONFIG_PINCTRL_MT7986=y
CONFIG_POWER_DOMAIN=y
CONFIG_MTK_POWER_DOMAIN=y
CONFIG_DM_REGULATOR=y
CONFIG_DM_REGULATOR_FIXED=y
CONFIG_DM_SERIAL=y
CONFIG_MTK_SERIAL=y
CONFIG_FAT_WRITE=y
CONFIG_HEXDUMP=y
# CONFIG_EFI_LOADER is not set
CONFIG_WEBUI_FAILSAFE=y
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@
regulator-boot-on;
regulator-always-on;
};

bl2_verify {
bl2_compatible = "emmc";
};
};

&eth {
Expand Down
Loading

0 comments on commit 674a97a

Please sign in to comment.