diff options
Diffstat (limited to 'board/compulab')
-rw-r--r-- | board/compulab/cl-som-imx7/cl-som-imx7.c | 4 | ||||
-rw-r--r-- | board/compulab/cl-som-imx7/spl.c | 6 | ||||
-rw-r--r-- | board/compulab/cm_fx6/cm_fx6.c | 2 | ||||
-rw-r--r-- | board/compulab/cm_fx6/spl.c | 4 | ||||
-rw-r--r-- | board/compulab/cm_t43/cm_t43.c | 2 | ||||
-rw-r--r-- | board/compulab/cm_t43/spl.c | 2 | ||||
-rw-r--r-- | board/compulab/common/Makefile | 2 | ||||
-rw-r--r-- | board/compulab/common/eeprom.c | 52 | ||||
-rw-r--r-- | board/compulab/common/eeprom.h | 2 | ||||
-rw-r--r-- | board/compulab/imx8mm-cl-iot-gate/Kconfig | 3 | ||||
-rw-r--r-- | board/compulab/imx8mm-cl-iot-gate/spl.c | 2 |
11 files changed, 17 insertions, 64 deletions
diff --git a/board/compulab/cl-som-imx7/cl-som-imx7.c b/board/compulab/cl-som-imx7/cl-som-imx7.c index 454c93a572..3ee1335218 100644 --- a/board/compulab/cl-som-imx7/cl-som-imx7.c +++ b/board/compulab/cl-som-imx7/cl-som-imx7.c @@ -267,7 +267,7 @@ int board_init(void) return 0; } -#ifdef CONFIG_POWER +#if CONFIG_IS_ENABLED(POWER_LEGACY) #define I2C_PMIC 0 int power_init_board(void) { @@ -293,7 +293,7 @@ int power_init_board(void) return 0; } -#endif /* CONFIG_POWER */ +#endif /* CONFIG_IS_ENABLED(POWER_LEGACY) */ /* * cl_som_imx7_setup_wdog() - watchdog configuration. diff --git a/board/compulab/cl-som-imx7/spl.c b/board/compulab/cl-som-imx7/spl.c index 9c7332b43b..5d4c4d39e7 100644 --- a/board/compulab/cl-som-imx7/spl.c +++ b/board/compulab/cl-som-imx7/spl.c @@ -157,15 +157,15 @@ static void cl_som_imx7_spl_dram_cfg(void) } } -#ifdef CONFIG_SPL_SPI_SUPPORT +#ifdef CONFIG_SPL_SPI static void cl_som_imx7_spl_spi_init(void) { cl_som_imx7_espi1_pads_set(); } -#else /* !CONFIG_SPL_SPI_SUPPORT */ +#else /* !CONFIG_SPL_SPI */ static void cl_som_imx7_spl_spi_init(void) {} -#endif /* CONFIG_SPL_SPI_SUPPORT */ +#endif /* CONFIG_SPL_SPI */ void board_init_f(ulong dummy) { diff --git a/board/compulab/cm_fx6/cm_fx6.c b/board/compulab/cm_fx6/cm_fx6.c index f29b08247e..c54bffdae4 100644 --- a/board/compulab/cm_fx6/cm_fx6.c +++ b/board/compulab/cm_fx6/cm_fx6.c @@ -720,10 +720,12 @@ int dram_init(void) return 0; } +#ifdef CONFIG_REVISION_TAG u32 get_board_rev(void) { return cl_eeprom_get_board_rev(CONFIG_SYS_I2C_EEPROM_BUS); } +#endif static struct mxc_serial_plat cm_fx6_mxc_serial_plat = { .reg = (struct mxc_uart *)UART4_BASE, diff --git a/board/compulab/cm_fx6/spl.c b/board/compulab/cm_fx6/spl.c index c3c816181f..079f196200 100644 --- a/board/compulab/cm_fx6/spl.c +++ b/board/compulab/cm_fx6/spl.c @@ -302,7 +302,7 @@ static void cm_fx6_setup_uart(void) enable_uart_clk(1); } -#ifdef CONFIG_SPL_SPI_SUPPORT +#ifdef CONFIG_SPL_SPI static void cm_fx6_setup_ecspi(void) { cm_fx6_set_ecspi_iomux(); @@ -350,7 +350,7 @@ void board_boot_order(u32 *spl_boot_list) } } -#ifdef CONFIG_SPL_MMC_SUPPORT +#ifdef CONFIG_SPL_MMC static struct fsl_esdhc_cfg usdhc_cfg = { .esdhc_base = USDHC3_BASE_ADDR, .max_bus_width = 4, diff --git a/board/compulab/cm_t43/cm_t43.c b/board/compulab/cm_t43/cm_t43.c index efdade155b..bcfe1bfaf6 100644 --- a/board/compulab/cm_t43/cm_t43.c +++ b/board/compulab/cm_t43/cm_t43.c @@ -48,7 +48,7 @@ int board_init(void) gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100; gpmc_init(); set_i2c_pin_mux(); - i2c_init(CONFIG_SYS_OMAP24_I2C_SPEED, CONFIG_SYS_OMAP24_I2C_SLAVE); + i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE); i2c_probe(TPS65218_CHIP_PM); return 0; diff --git a/board/compulab/cm_t43/spl.c b/board/compulab/cm_t43/spl.c index 016c63a509..9c6806c32f 100644 --- a/board/compulab/cm_t43/spl.c +++ b/board/compulab/cm_t43/spl.c @@ -106,7 +106,7 @@ const struct dpll_params *get_dpll_per_params(void) void scale_vcores(void) { set_i2c_pin_mux(); - i2c_init(CONFIG_SYS_OMAP24_I2C_SPEED, CONFIG_SYS_OMAP24_I2C_SLAVE); + i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE); if (i2c_probe(TPS65218_CHIP_PM)) return; diff --git a/board/compulab/common/Makefile b/board/compulab/common/Makefile index 842fb3b6a6..25dad49877 100644 --- a/board/compulab/common/Makefile +++ b/board/compulab/common/Makefile @@ -5,6 +5,6 @@ # Author: Igor Grinberg <grinberg@compulab.co.il> obj-y += common.o -obj-$(CONFIG_SYS_I2C_LEGACY) += eeprom.o +obj-$(CONFIG_$(SPL_)SYS_I2C_LEGACY) += eeprom.o obj-$(CONFIG_LCD) += omap3_display.o obj-$(CONFIG_SMC911X) += omap3_smc911x.o diff --git a/board/compulab/common/eeprom.c b/board/compulab/common/eeprom.c index b41c64d2a3..c4b257f851 100644 --- a/board/compulab/common/eeprom.c +++ b/board/compulab/common/eeprom.c @@ -15,15 +15,6 @@ #include <linux/kernel.h> #include "eeprom.h" -#ifndef CONFIG_SYS_I2C_EEPROM_ADDR -# define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 -# define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1 -#endif - -#ifndef CONFIG_SYS_I2C_EEPROM_BUS -#define CONFIG_SYS_I2C_EEPROM_BUS 0 -#endif - #define EEPROM_LAYOUT_VER_OFFSET 44 #define BOARD_SERIAL_OFFSET 20 #define BOARD_SERIAL_OFFSET_LEGACY 8 @@ -394,43 +385,8 @@ int eeprom_field_update_date(struct eeprom_field *field, char *value) #define LAYOUT_VERSION_VER2 3 #define LAYOUT_VERSION_VER3 4 -extern struct eeprom_field layout_unknown[1]; - #define DEFINE_PRINT_UPDATE(x) eeprom_field_print_##x, eeprom_field_update_##x -#ifdef CONFIG_CM_T3X -struct eeprom_field layout_legacy[5] = { - { "MAC address", 6, NULL, DEFINE_PRINT_UPDATE(mac) }, - { "Board Revision", 2, NULL, DEFINE_PRINT_UPDATE(bin) }, - { "Serial Number", 8, NULL, DEFINE_PRINT_UPDATE(bin) }, - { "Board Configuration", 64, NULL, DEFINE_PRINT_UPDATE(ascii) }, - { RESERVED_FIELDS, 176, NULL, eeprom_field_print_reserved, - eeprom_field_update_ascii }, -}; -#else -#define layout_legacy layout_unknown -#endif - -#if defined(CONFIG_CM_T3X) -struct eeprom_field layout_v1[12] = { - { "Major Revision", 2, NULL, DEFINE_PRINT_UPDATE(bin_ver) }, - { "Minor Revision", 2, NULL, DEFINE_PRINT_UPDATE(bin_ver) }, - { "1st MAC Address", 6, NULL, DEFINE_PRINT_UPDATE(mac) }, - { "2nd MAC Address", 6, NULL, DEFINE_PRINT_UPDATE(mac) }, - { "Production Date", 4, NULL, DEFINE_PRINT_UPDATE(date) }, - { "Serial Number", 12, NULL, DEFINE_PRINT_UPDATE(bin_rev) }, - { RESERVED_FIELDS, 96, NULL, DEFINE_PRINT_UPDATE(reserved) }, - { "Product Name", 16, NULL, DEFINE_PRINT_UPDATE(ascii) }, - { "Product Options #1", 16, NULL, DEFINE_PRINT_UPDATE(ascii) }, - { "Product Options #2", 16, NULL, DEFINE_PRINT_UPDATE(ascii) }, - { "Product Options #3", 16, NULL, DEFINE_PRINT_UPDATE(ascii) }, - { RESERVED_FIELDS, 64, NULL, eeprom_field_print_reserved, - eeprom_field_update_ascii }, -}; -#else -#define layout_v1 layout_unknown -#endif - struct eeprom_field layout_v2[15] = { { "Major Revision", 2, NULL, DEFINE_PRINT_UPDATE(bin_ver) }, { "Minor Revision", 2, NULL, DEFINE_PRINT_UPDATE(bin_ver) }, @@ -473,14 +429,6 @@ struct eeprom_field layout_v3[16] = { void eeprom_layout_assign(struct eeprom_layout *layout, int layout_version) { switch (layout->layout_version) { - case LAYOUT_VERSION_LEGACY: - layout->fields = layout_legacy; - layout->num_of_fields = ARRAY_SIZE(layout_legacy); - break; - case LAYOUT_VERSION_VER1: - layout->fields = layout_v1; - layout->num_of_fields = ARRAY_SIZE(layout_v1); - break; case LAYOUT_VERSION_VER2: layout->fields = layout_v2; layout->num_of_fields = ARRAY_SIZE(layout_v2); diff --git a/board/compulab/common/eeprom.h b/board/compulab/common/eeprom.h index 51c8acf3b8..9bd7604a99 100644 --- a/board/compulab/common/eeprom.h +++ b/board/compulab/common/eeprom.h @@ -10,7 +10,7 @@ #define _EEPROM_ #include <errno.h> -#ifdef CONFIG_SYS_I2C_LEGACY +#if CONFIG_IS_ENABLED(SYS_I2C_LEGACY) int cl_eeprom_read_mac_addr(uchar *buf, uint eeprom_bus); u32 cl_eeprom_get_board_rev(uint eeprom_bus); int cl_eeprom_get_product_name(uchar *buf, uint eeprom_bus); diff --git a/board/compulab/imx8mm-cl-iot-gate/Kconfig b/board/compulab/imx8mm-cl-iot-gate/Kconfig index 7f5c794bf5..30760cbf45 100644 --- a/board/compulab/imx8mm-cl-iot-gate/Kconfig +++ b/board/compulab/imx8mm-cl-iot-gate/Kconfig @@ -9,4 +9,7 @@ config SYS_VENDOR config SYS_CONFIG_NAME default "imx8mm-cl-iot-gate" +config IMX_CONFIG + default "board/compulab/imx8mm-cl-iot-gate/imximage-8mm-lpddr4.cfg" + endif diff --git a/board/compulab/imx8mm-cl-iot-gate/spl.c b/board/compulab/imx8mm-cl-iot-gate/spl.c index 8f592457d4..2dc62d6682 100644 --- a/board/compulab/imx8mm-cl-iot-gate/spl.c +++ b/board/compulab/imx8mm-cl-iot-gate/spl.c @@ -176,7 +176,7 @@ void board_init_f(ulong dummy) enable_tzc380(); - setup_i2c(1, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info1); + setup_i2c(1, 100000, 0x7f, &i2c_pad_info1); power_init_board(); |