board: add GW102 board

This commit is contained in:
2024-11-29 11:31:18 +08:00
parent f39fadeb21
commit ed132ee5f9
5 changed files with 73 additions and 1 deletions

View File

@ -200,6 +200,12 @@ config TARGET_I2SOM_IMX6UL_14X14
select DM
select DM_THERMAL
config TARGET_I2SOM_GW102
bool "Support i2SOM GW102 gateway"
select MX6ULL
select DM
select DM_THERMAL
config TARGET_SECOMX6
bool "secomx6 boards"

View File

@ -10,3 +10,16 @@ config SYS_CONFIG_NAME
default "i2som_6ull_14x14"
endif
if TARGET_I2SOM_GW102
config SYS_BOARD
default "i2s_6ull_14x14"
config SYS_VENDOR
default "i2som"
config SYS_CONFIG_NAME
default "i2som_6ull_14x14"
endif

View File

@ -829,11 +829,49 @@ struct display_info_t const displays[] = {{
size_t display_count = ARRAY_SIZE(displays);
#endif
#ifdef CONFIG_TARGET_I2SOM_IMX6ULL_14X14
static iomux_v3_cfg_t const wifi_pads[] = {
MX6_PAD_CSI_DATA01__GPIO4_IO22 | MUX_PAD_CTRL(NO_PAD_CTRL),
MX6_PAD_CSI_DATA03__GPIO4_IO24 | MUX_PAD_CTRL(NO_PAD_CTRL),
};
#endif
#ifdef CONFIG_TARGET_I2SOM_GW102
static iomux_v3_cfg_t const gw102_wifi_pads[] = {
MX6_PAD_SNVS_TAMPER7__GPIO5_IO07 | MUX_PAD_CTRL(NO_PAD_CTRL),
};
static iomux_v3_cfg_t const wdt_pads[] = {
// WDI
MX6_PAD_SNVS_TAMPER1__GPIO5_IO01 | MUX_PAD_CTRL(NO_PAD_CTRL),
// WD_EN
MX6_PAD_CSI_DATA03__GPIO4_IO24 | MUX_PAD_CTRL(NO_PAD_CTRL),
};
void hw_watchdog_reset(void)
{
//gpio_direction_output(IMX_GPIO_NR(5,1), 1);
gpio_direction_output(IMX_GPIO_NR(4,24), 0);
gpio_direction_output(IMX_GPIO_NR(4,24), 1);
}
void board_gw102(void)
{
/* WiFi WIFI_PWR_EN, active High */
imx_iomux_v3_setup_multiple_pads(gw102_wifi_pads, ARRAY_SIZE(gw102_wifi_pads));
gpio_direction_output(IMX_GPIO_NR(5, 7) , 1);
// init watchdog pins
imx_iomux_v3_setup_multiple_pads(wdt_pads, ARRAY_SIZE(wdt_pads));
gpio_direction_output(IMX_GPIO_NR(5,1), 0);
}
#endif
int board_early_init_f(void)
{
setup_iomux_uart();
@ -845,13 +883,18 @@ int board_init(void)
{
/* Address of boot parameters */
gd->bd->bi_boot_params = PHYS_SDRAM + 0x100;
#ifdef CONFIG_TARGET_I2SOM_IMX6ULL_14X14
/* WiFi WL_EN, active High */
imx_iomux_v3_setup_multiple_pads(wifi_pads, ARRAY_SIZE(wifi_pads));
gpio_direction_output(IMX_GPIO_NR(4, 22) , 1);
/* WiFi PWR_EN, active Low */
gpio_direction_output(IMX_GPIO_NR(4, 24) , 0);
#endif
#ifdef CONFIG_TARGET_I2SOM_GW102
board_gw102();
#endif
#ifdef CONFIG_SYS_I2C_MXC
setup_i2c(0, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info1);

View File

@ -0,0 +1,8 @@
CONFIG_ARM=y
CONFIG_ARCH_MX6=y
CONFIG_TARGET_I2SOM_GW102=y
CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/i2som/i2s_6ull_14x14/imximage.cfg,SYS_BOOT_EMMC,DDR_SIZE=512"
CONFIG_AUTOBOOT_KEYED=y
CONFIG_AUTOBOOT_PROMPT=""
CONFIG_AUTOBOOT_DELAY_STR="db"
CONFIG_CMD_GPIO=y

View File

@ -11,6 +11,8 @@
#include "i2s6ull_common.h"
#define CONFIG_HW_WATCHDOG
/* uncomment for PLUGIN mode support */
/* #define CONFIG_USE_PLUGIN */