diff --git a/arch/arm/cpu/armv7/mx6/Kconfig b/arch/arm/cpu/armv7/mx6/Kconfig index 24c7e372da..2a5c71ccc0 100644 --- a/arch/arm/cpu/armv7/mx6/Kconfig +++ b/arch/arm/cpu/armv7/mx6/Kconfig @@ -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" diff --git a/board/i2som/i2s_6ull_14x14/Kconfig b/board/i2som/i2s_6ull_14x14/Kconfig index 7772f58788..1dd938ec9c 100644 --- a/board/i2som/i2s_6ull_14x14/Kconfig +++ b/board/i2som/i2s_6ull_14x14/Kconfig @@ -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 diff --git a/board/i2som/i2s_6ull_14x14/i2s_6ull_14x14.c b/board/i2som/i2s_6ull_14x14/i2s_6ull_14x14.c index 437ae30bb3..40101fb54e 100644 --- a/board/i2som/i2s_6ull_14x14/i2s_6ull_14x14.c +++ b/board/i2som/i2s_6ull_14x14/i2s_6ull_14x14.c @@ -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); diff --git a/configs/i2som_gw102_emmc_defconfig b/configs/i2som_gw102_emmc_defconfig new file mode 100644 index 0000000000..ee00a7c7cc --- /dev/null +++ b/configs/i2som_gw102_emmc_defconfig @@ -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 diff --git a/include/configs/i2som_6ull_14x14.h b/include/configs/i2som_6ull_14x14.h index ce605b4622..89936bcd8e 100644 --- a/include/configs/i2som_6ull_14x14.h +++ b/include/configs/i2som_6ull_14x14.h @@ -11,6 +11,8 @@ #include "i2s6ull_common.h" +#define CONFIG_HW_WATCHDOG + /* uncomment for PLUGIN mode support */ /* #define CONFIG_USE_PLUGIN */