From c774207f48585544664bd9675c14a7812ecce348 Mon Sep 17 00:00:00 2001 From: Adam Ford Date: Sun, 17 Sep 2017 20:43:48 -0500 Subject: [PATCH] ARM: da850-evm: Enable DM_I2C With DM now enabled with the device tree pulled from Linux, we can enable DM_I2C in U-Boot. Reviewed-by: Jagan Teki Signed-off-by: Adam Ford [trini: Add DM_I2C_COMPAT to da850_am18xxevm to fix warning] Signed-off-by: Tom Rini --- arch/arm/dts/da850-evm-u-boot.dtsi | 1 + configs/da850_am18xxevm_defconfig | 3 ++- configs/da850evm_defconfig | 3 ++- configs/da850evm_direct_nor_defconfig | 3 ++- include/configs/da850evm.h | 5 ++--- 5 files changed, 9 insertions(+), 6 deletions(-) diff --git a/arch/arm/dts/da850-evm-u-boot.dtsi b/arch/arm/dts/da850-evm-u-boot.dtsi index 5cca47d866..5cc5a81f6f 100644 --- a/arch/arm/dts/da850-evm-u-boot.dtsi +++ b/arch/arm/dts/da850-evm-u-boot.dtsi @@ -13,6 +13,7 @@ }; aliases { + i2c0 = &i2c0; spi0 = &spi1; }; }; diff --git a/configs/da850_am18xxevm_defconfig b/configs/da850_am18xxevm_defconfig index 832c9ceb07..0c60fef098 100644 --- a/configs/da850_am18xxevm_defconfig +++ b/configs/da850_am18xxevm_defconfig @@ -25,7 +25,6 @@ CONFIG_CRC32_VERIFY=y # CONFIG_CMD_FLASH is not set # CONFIG_CMD_GPIO is not set # CONFIG_CMD_GPT is not set -# CONFIG_CMD_I2C is not set # CONFIG_CMD_PART is not set # CONFIG_CMD_SETEXPR is not set # CONFIG_CMD_TIME is not set @@ -35,6 +34,8 @@ CONFIG_CMD_DIAG=y CONFIG_OF_CONTROL=y CONFIG_ENV_IS_IN_SPI_FLASH=y CONFIG_DM=y +CONFIG_DM_I2C=y +CONFIG_DM_I2C_COMPAT=y CONFIG_DM_SPI_FLASH=y CONFIG_SPI_FLASH=y CONFIG_SPI_FLASH_STMICRO=y diff --git a/configs/da850evm_defconfig b/configs/da850evm_defconfig index 80160eff07..d6eb4a5ba2 100644 --- a/configs/da850evm_defconfig +++ b/configs/da850evm_defconfig @@ -24,7 +24,6 @@ CONFIG_CRC32_VERIFY=y # CONFIG_CMD_FLASH is not set # CONFIG_CMD_GPIO is not set # CONFIG_CMD_GPT is not set -# CONFIG_CMD_I2C is not set # CONFIG_CMD_PART is not set # CONFIG_CMD_SETEXPR is not set # CONFIG_CMD_TIME is not set @@ -35,6 +34,8 @@ CONFIG_CMD_DIAG=y CONFIG_OF_CONTROL=y CONFIG_ENV_IS_IN_SPI_FLASH=y CONFIG_DM=y +CONFIG_DM_I2C=y +CONFIG_DM_I2C_COMPAT=y CONFIG_DM_SPI_FLASH=y CONFIG_SPI_FLASH=y CONFIG_SPI_FLASH_STMICRO=y diff --git a/configs/da850evm_direct_nor_defconfig b/configs/da850evm_direct_nor_defconfig index 8f8bad0756..3c8e7ad15a 100644 --- a/configs/da850evm_direct_nor_defconfig +++ b/configs/da850evm_direct_nor_defconfig @@ -19,7 +19,6 @@ CONFIG_CRC32_VERIFY=y # CONFIG_CMD_EEPROM is not set # CONFIG_CMD_GPIO is not set # CONFIG_CMD_GPT is not set -# CONFIG_CMD_I2C is not set # CONFIG_CMD_MMC is not set # CONFIG_CMD_PART is not set # CONFIG_CMD_SPI is not set @@ -33,6 +32,8 @@ CONFIG_CMD_DIAG=y CONFIG_OF_CONTROL=y CONFIG_ENV_IS_IN_FLASH=y CONFIG_DM=y +CONFIG_DM_I2C=y +CONFIG_DM_I2C_COMPAT=y # CONFIG_MMC is not set CONFIG_MTD_NOR_FLASH=y CONFIG_DM_SPI_FLASH=y diff --git a/include/configs/da850evm.h b/include/configs/da850evm.h index 0bdf0cb134..821b1fe534 100644 --- a/include/configs/da850evm.h +++ b/include/configs/da850evm.h @@ -167,11 +167,10 @@ /* * I2C Configuration */ -#define CONFIG_SYS_I2C +#ifndef CONFIG_SPL_BUILD #define CONFIG_SYS_I2C_DAVINCI -#define CONFIG_SYS_DAVINCI_I2C_SPEED 25000 -#define CONFIG_SYS_DAVINCI_I2C_SLAVE 10 /* Bogus, master-only in U-Boot */ #define CONFIG_SYS_I2C_EXPANDER_ADDR 0x20 +#endif /* * Flash & Environment