[U-Boot] [UBOOT PATCH 6/6] i2c: Added kconfig support for CONFIG_ZYNQ_I2C0 and CONFIG_ZYNQ_I2C1

Michal Simek michal.simek at xilinx.com
Mon Feb 26 10:20:08 UTC 2018


On 16.2.2018 14:37, Vipul Kumar wrote:
> This patch added Kconfig support for CONFIG_ZYNQ_I2C0 and
> CONFIG_ZYNQ_I2C1 and enabled it in respective defconfig.
> 
> Signed-off-by: Vipul Kumar <vipulk at xilinx.com>
> Signed-off-by: Siva Durga Prasad Paladugu <sivadur at xilinx.com>
> ---
>  configs/syzygy_hub_defconfig                  |  1 +
>  configs/topic_miami_defconfig                 |  2 ++
>  configs/topic_miamilite_defconfig             |  2 ++
>  configs/topic_miamiplus_defconfig             |  2 ++
>  configs/xilinx_zynqmp_zcu102_rev1_0_defconfig |  2 ++
>  configs/xilinx_zynqmp_zcu102_revA_defconfig   |  2 ++
>  configs/xilinx_zynqmp_zcu102_revB_defconfig   |  2 ++
>  configs/zynq_zc702_defconfig                  |  1 +
>  configs/zynq_zc706_defconfig                  |  1 +
>  configs/zynq_zybo_defconfig                   |  2 ++
>  drivers/i2c/Kconfig                           | 10 ++++++++++
>  include/configs/syzygy_hub.h                  |  1 -
>  include/configs/topic_miami.h                 |  2 --
>  include/configs/xilinx_zynqmp_zcu102.h        |  2 --
>  include/configs/zynq_zc70x.h                  |  1 -
>  include/configs/zynq_zybo.h                   |  2 --
>  16 files changed, 27 insertions(+), 8 deletions(-)
> 
> diff --git a/configs/syzygy_hub_defconfig b/configs/syzygy_hub_defconfig
> index 8454a19..78815cc 100644
> --- a/configs/syzygy_hub_defconfig
> +++ b/configs/syzygy_hub_defconfig
> @@ -35,6 +35,7 @@ CONFIG_SPL_DM_SEQ_ALIAS=y
>  CONFIG_FPGA_XILINX=y
>  CONFIG_DM_GPIO=y
>  CONFIG_SYS_I2C_ZYNQ=y
> +CONFIG_ZYNQ_I2C1=y
>  CONFIG_ZYNQ_GEM_I2C_MAC_OFFSET=0xFA
>  CONFIG_MMC_SDHCI=y
>  CONFIG_MMC_SDHCI_ZYNQ=y
> diff --git a/configs/topic_miami_defconfig b/configs/topic_miami_defconfig
> index bd8eff7..d18d5ae 100644
> --- a/configs/topic_miami_defconfig
> +++ b/configs/topic_miami_defconfig
> @@ -32,6 +32,8 @@ CONFIG_DFU_RAM=y
>  CONFIG_FPGA_XILINX=y
>  CONFIG_DM_GPIO=y
>  CONFIG_SYS_I2C_ZYNQ=y
> +CONFIG_ZYNQ_I2C0=y
> +CONFIG_ZYNQ_I2C1=y
>  CONFIG_MMC_SDHCI=y
>  CONFIG_MMC_SDHCI_ZYNQ=y
>  CONFIG_SPI_FLASH=y
> diff --git a/configs/topic_miamilite_defconfig b/configs/topic_miamilite_defconfig
> index dcf8f47..3a3c47a 100644
> --- a/configs/topic_miamilite_defconfig
> +++ b/configs/topic_miamilite_defconfig
> @@ -32,6 +32,8 @@ CONFIG_DFU_RAM=y
>  CONFIG_FPGA_XILINX=y
>  CONFIG_DM_GPIO=y
>  CONFIG_SYS_I2C_ZYNQ=y
> +CONFIG_ZYNQ_I2C0=y
> +CONFIG_ZYNQ_I2C1=y
>  CONFIG_MMC_SDHCI=y
>  CONFIG_MMC_SDHCI_ZYNQ=y
>  CONFIG_SPI_FLASH=y
> diff --git a/configs/topic_miamiplus_defconfig b/configs/topic_miamiplus_defconfig
> index 4f771f0..8363838 100644
> --- a/configs/topic_miamiplus_defconfig
> +++ b/configs/topic_miamiplus_defconfig
> @@ -30,6 +30,8 @@ CONFIG_DFU_RAM=y
>  CONFIG_FPGA_XILINX=y
>  CONFIG_DM_GPIO=y
>  CONFIG_SYS_I2C_ZYNQ=y
> +CONFIG_ZYNQ_I2C0=y
> +CONFIG_ZYNQ_I2C1=y
>  CONFIG_MMC_SDHCI=y
>  CONFIG_MMC_SDHCI_ZYNQ=y
>  CONFIG_SPI_FLASH=y
> diff --git a/configs/xilinx_zynqmp_zcu102_rev1_0_defconfig b/configs/xilinx_zynqmp_zcu102_rev1_0_defconfig
> index 02cd710..1df5b0b 100644
> --- a/configs/xilinx_zynqmp_zcu102_rev1_0_defconfig
> +++ b/configs/xilinx_zynqmp_zcu102_rev1_0_defconfig
> @@ -54,6 +54,8 @@ CONFIG_FPGA_ZYNQMPPL=y
>  CONFIG_DM_GPIO=y
>  CONFIG_CMD_PCA953X=y
>  CONFIG_SYS_I2C_ZYNQ=y
> +CONFIG_ZYNQ_I2C0=y
> +CONFIG_ZYNQ_I2C1=y
>  CONFIG_MISC=y
>  CONFIG_ZYNQ_GEM_I2C_MAC_OFFSET=0x20
>  CONFIG_DM_MMC=y
> diff --git a/configs/xilinx_zynqmp_zcu102_revA_defconfig b/configs/xilinx_zynqmp_zcu102_revA_defconfig
> index 9176e8e..c8a8362 100644
> --- a/configs/xilinx_zynqmp_zcu102_revA_defconfig
> +++ b/configs/xilinx_zynqmp_zcu102_revA_defconfig
> @@ -54,6 +54,8 @@ CONFIG_FPGA_ZYNQMPPL=y
>  CONFIG_DM_GPIO=y
>  CONFIG_CMD_PCA953X=y
>  CONFIG_SYS_I2C_ZYNQ=y
> +CONFIG_ZYNQ_I2C0=y
> +CONFIG_ZYNQ_I2C1=y
>  CONFIG_MISC=y
>  CONFIG_ZYNQ_GEM_I2C_MAC_OFFSET=0x20
>  CONFIG_DM_MMC=y
> diff --git a/configs/xilinx_zynqmp_zcu102_revB_defconfig b/configs/xilinx_zynqmp_zcu102_revB_defconfig
> index 3c2a865..8f85b5f 100644
> --- a/configs/xilinx_zynqmp_zcu102_revB_defconfig
> +++ b/configs/xilinx_zynqmp_zcu102_revB_defconfig
> @@ -54,6 +54,8 @@ CONFIG_FPGA_ZYNQMPPL=y
>  CONFIG_DM_GPIO=y
>  CONFIG_CMD_PCA953X=y
>  CONFIG_SYS_I2C_ZYNQ=y
> +CONFIG_ZYNQ_I2C0=y
> +CONFIG_ZYNQ_I2C1=y
>  CONFIG_MISC=y
>  CONFIG_ZYNQ_GEM_I2C_MAC_OFFSET=0x20
>  CONFIG_DM_MMC=y
> diff --git a/configs/zynq_zc702_defconfig b/configs/zynq_zc702_defconfig
> index b20744a..7783467 100644
> --- a/configs/zynq_zc702_defconfig
> +++ b/configs/zynq_zc702_defconfig
> @@ -41,6 +41,7 @@ CONFIG_DFU_RAM=y
>  CONFIG_FPGA_XILINX=y
>  CONFIG_DM_GPIO=y
>  CONFIG_SYS_I2C_ZYNQ=y
> +CONFIG_ZYNQ_I2C0=y
>  CONFIG_MMC_SDHCI=y
>  CONFIG_MMC_SDHCI_ZYNQ=y
>  CONFIG_SPI_FLASH=y
> diff --git a/configs/zynq_zc706_defconfig b/configs/zynq_zc706_defconfig
> index 882150f..4d15ab3 100644
> --- a/configs/zynq_zc706_defconfig
> +++ b/configs/zynq_zc706_defconfig
> @@ -41,6 +41,7 @@ CONFIG_DFU_RAM=y
>  CONFIG_FPGA_XILINX=y
>  CONFIG_DM_GPIO=y
>  CONFIG_SYS_I2C_ZYNQ=y
> +CONFIG_ZYNQ_I2C0=y
>  CONFIG_MMC_SDHCI=y
>  CONFIG_MMC_SDHCI_ZYNQ=y
>  CONFIG_SPI_FLASH=y
> diff --git a/configs/zynq_zybo_defconfig b/configs/zynq_zybo_defconfig
> index dab98d8..bdd2c60 100644
> --- a/configs/zynq_zybo_defconfig
> +++ b/configs/zynq_zybo_defconfig
> @@ -40,6 +40,8 @@ CONFIG_DFU_RAM=y
>  CONFIG_FPGA_XILINX=y
>  CONFIG_DM_GPIO=y
>  CONFIG_SYS_I2C_ZYNQ=y
> +CONFIG_ZYNQ_I2C0=y
> +CONFIG_ZYNQ_I2C1=y
>  CONFIG_ZYNQ_GEM_I2C_MAC_OFFSET=0xFA
>  CONFIG_MMC_SDHCI=y
>  CONFIG_MMC_SDHCI_ZYNQ=y
> diff --git a/drivers/i2c/Kconfig b/drivers/i2c/Kconfig
> index dc2ffd1..946b8ae 100644
> --- a/drivers/i2c/Kconfig
> +++ b/drivers/i2c/Kconfig
> @@ -288,6 +288,16 @@ config SYS_I2C_ZYNQ_SPEED
>  	help
>  	  Set CONFIG_SYS_I2C_ZYNQ_SPEED for speed setting.
>  
> +config ZYNQ_I2C0
> +	bool "Xilinx I2C0 controller"
> +	help
> +	  Enable Xilinx I2C0 controller.
> +
> +config ZYNQ_I2C1
> +	bool "Xilinx I2C1 controller"
> +	help
> +	  Enable Xilinx I2C1 controller.

Both depends on SYS_I2C_ZYNQ. I have added this dependency and applied.

M

> +
>  config SYS_I2C_IHS
>          bool "gdsys IHS I2C driver"
>          depends on DM_I2C
> diff --git a/include/configs/syzygy_hub.h b/include/configs/syzygy_hub.h
> index 19e201f..73c9189 100644
> --- a/include/configs/syzygy_hub.h
> +++ b/include/configs/syzygy_hub.h
> @@ -11,7 +11,6 @@
>  #ifndef __CONFIG_SYZYGY_HUB_H
>  #define __CONFIG_SYZYGY_HUB_H
>  
> -#define CONFIG_ZYNQ_I2C1
>  #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1
>  #define CONFIG_ZYNQ_GEM_EEPROM_ADDR    0x57
>  
> diff --git a/include/configs/topic_miami.h b/include/configs/topic_miami.h
> index 400a7fc..0dfdafb 100644
> --- a/include/configs/topic_miami.h
> +++ b/include/configs/topic_miami.h
> @@ -10,8 +10,6 @@
>  #ifndef __CONFIG_TOPIC_MIAMI_H
>  #define __CONFIG_TOPIC_MIAMI_H
>  
> -#define CONFIG_ZYNQ_I2C0
> -#define CONFIG_ZYNQ_I2C1
>  
>  /* Speed up boot time by ignoring the environment which we never used */
>  
> diff --git a/include/configs/xilinx_zynqmp_zcu102.h b/include/configs/xilinx_zynqmp_zcu102.h
> index 0095f61..27d9d6a 100644
> --- a/include/configs/xilinx_zynqmp_zcu102.h
> +++ b/include/configs/xilinx_zynqmp_zcu102.h
> @@ -11,8 +11,6 @@
>  #define __CONFIG_ZYNQMP_ZCU102_H
>  
>  #define CONFIG_ZYNQ_SDHCI1
> -#define CONFIG_ZYNQ_I2C0
> -#define CONFIG_ZYNQ_I2C1
>  #define CONFIG_SYS_I2C_MAX_HOPS		1
>  #define CONFIG_SYS_NUM_I2C_BUSES	18
>  #define CONFIG_SYS_I2C_BUSES	{ \
> diff --git a/include/configs/zynq_zc70x.h b/include/configs/zynq_zc70x.h
> index fc46fec..720f953 100644
> --- a/include/configs/zynq_zc70x.h
> +++ b/include/configs/zynq_zc70x.h
> @@ -10,7 +10,6 @@
>  #ifndef __CONFIG_ZYNQ_ZC70X_H
>  #define __CONFIG_ZYNQ_ZC70X_H
>  
> -#define CONFIG_ZYNQ_I2C0
>  #define CONFIG_ZYNQ_EEPROM
>  
>  #include <configs/zynq-common.h>
> diff --git a/include/configs/zynq_zybo.h b/include/configs/zynq_zybo.h
> index a589c92..8f4e088 100644
> --- a/include/configs/zynq_zybo.h
> +++ b/include/configs/zynq_zybo.h
> @@ -11,8 +11,6 @@
>  #ifndef __CONFIG_ZYNQ_ZYBO_H
>  #define __CONFIG_ZYNQ_ZYBO_H
>  
> -#define CONFIG_ZYNQ_I2C0
> -#define CONFIG_ZYNQ_I2C1
>  #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN	1
>  #define CONFIG_ZYNQ_GEM_EEPROM_ADDR	0x50
>  #define CONFIG_DISPLAY
> 



More information about the U-Boot mailing list