All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v2 0/7] arm/arm64: i2c platform cleanup
@ 2019-02-05  9:55 Michal Simek
  2019-02-05  9:55 ` [U-Boot] [PATCH v2 1/7] ARM: zynq: Convert Syzygy to DM_I2C Michal Simek
                   ` (6 more replies)
  0 siblings, 7 replies; 15+ messages in thread
From: Michal Simek @ 2019-02-05  9:55 UTC (permalink / raw)
  To: u-boot

Hi,

sending this v2 as follow up series based on
https://lists.denx.de/pipermail/u-boot/2019-January/357172.html
which converts all platform to DM_I2C and removes old driver.

Thanks,
Michal

Changes in v2:
- Extract Syzygy from Topic
- Add eeprom to i2c - needs to be checked by Syzygy team if this is
  correct
- Add dependency

Michal Simek (7):
  ARM: zynq: Convert Syzygy to DM_I2C
  ARM: zynq: Convert dlc20 and zc70x board to DM_I2C
  ARM: zynq: Remove addresses for i2c controllers
  arm64: zynqmp: Switch all platfroms to DM_I2C
  arm64: zynqmp: Remove addresses for i2c controllers
  i2c: Remove ancient zynq_i2c driver
  xilinx: common: Remove !DM_i2C code for reading mac from eeprom

 README                                        |   5 -
 arch/arm/dts/zynq-syzygy-hub.dts              |   6 +
 arch/arm/dts/zynqmp-zcu102-revA.dts           |   1 +
 arch/arm/dts/zynqmp-zcu104-revC.dts           |   1 +
 arch/arm/dts/zynqmp-zcu106-revA.dts           |   1 +
 arch/arm/dts/zynqmp-zcu111-revA.dts           |   1 +
 arch/arm/mach-zynq/include/mach/hardware.h    |   2 -
 arch/arm/mach-zynqmp/include/mach/hardware.h  |   3 -
 board/xilinx/common/board.c                   |  19 --
 configs/avnet_ultra96_rev1_defconfig          |   6 +-
 configs/syzygy_hub_defconfig                  |   5 +-
 configs/xilinx_zynqmp_zcu100_revC_defconfig   |   6 +-
 configs/xilinx_zynqmp_zcu102_rev1_0_defconfig |  12 +-
 configs/xilinx_zynqmp_zcu102_revA_defconfig   |  13 +-
 configs/xilinx_zynqmp_zcu102_revB_defconfig   |  13 +-
 configs/xilinx_zynqmp_zcu104_revA_defconfig   |  11 +-
 configs/xilinx_zynqmp_zcu104_revC_defconfig   |  11 +-
 configs/xilinx_zynqmp_zcu106_revA_defconfig   |  12 +-
 configs/xilinx_zynqmp_zcu111_revA_defconfig   |  12 +-
 configs/zynq_dlc20_rev1_0_defconfig           |   9 +-
 configs/zynq_zc702_defconfig                  |  10 +-
 configs/zynq_zc706_defconfig                  |  10 +-
 configs/zynq_zybo_defconfig                   |   1 -
 drivers/i2c/Kconfig                           |  33 ---
 drivers/i2c/Makefile                          |   1 -
 drivers/i2c/zynq_i2c.c                        | 313 --------------------------
 drivers/misc/Kconfig                          |   1 +
 include/configs/syzygy_hub.h                  |   4 -
 include/configs/xilinx_zynqmp.h               |   5 -
 include/configs/xilinx_zynqmp_zcu100.h        |  15 --
 include/configs/xilinx_zynqmp_zcu102.h        |  29 ---
 include/configs/xilinx_zynqmp_zcu104.h        |  17 --
 include/configs/xilinx_zynqmp_zcu104_revC.h   |   3 -
 include/configs/xilinx_zynqmp_zcu106.h        |  28 ---
 include/configs/xilinx_zynqmp_zcu111.h        |  31 ---
 include/configs/zynq-common.h                 |  14 --
 include/configs/zynq_zc70x.h                  |  16 --
 37 files changed, 90 insertions(+), 590 deletions(-)
 delete mode 100644 drivers/i2c/zynq_i2c.c
 delete mode 100644 include/configs/zynq_zc70x.h

-- 
1.9.1

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [U-Boot] [PATCH v2 1/7] ARM: zynq: Convert Syzygy to DM_I2C
  2019-02-05  9:55 [U-Boot] [PATCH v2 0/7] arm/arm64: i2c platform cleanup Michal Simek
@ 2019-02-05  9:55 ` Michal Simek
  2019-02-07  6:56   ` Heiko Schocher
  2019-02-05  9:55 ` [U-Boot] [PATCH v2 2/7] ARM: zynq: Convert dlc20 and zc70x board " Michal Simek
                   ` (5 subsequent siblings)
  6 siblings, 1 reply; 15+ messages in thread
From: Michal Simek @ 2019-02-05  9:55 UTC (permalink / raw)
  To: u-boot

Boards have only one controller enabled that's why move to DM_I2C is
easy.
Add also i2c alias for not to be shown as i2c bus -1 because alias
doesn't exist.
Config file points to MAC stored in eeprom but it is not listed that's
why I have added 24c08 part.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---

Changes in v2:
- Extract Syzygy from Topic
- Add eeprom to i2c - needs to be checked by Syzygy team if this is
  correct

 arch/arm/dts/zynq-syzygy-hub.dts | 6 ++++++
 configs/syzygy_hub_defconfig     | 5 ++---
 include/configs/syzygy_hub.h     | 4 ----
 3 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/arch/arm/dts/zynq-syzygy-hub.dts b/arch/arm/dts/zynq-syzygy-hub.dts
index a30d667146d1..55f8e8a2da43 100644
--- a/arch/arm/dts/zynq-syzygy-hub.dts
+++ b/arch/arm/dts/zynq-syzygy-hub.dts
@@ -16,6 +16,7 @@
 		ethernet0 = &gem0;
 		serial0 = &uart0;
 		mmc0 = &sdhci0;
+		i2c0 = &i2c1;
 	};
 
 	memory at 0 {
@@ -26,6 +27,7 @@
 	chosen {
 		bootargs = "";
 		stdout-path = "serial0:115200n8";
+		xlnx,eeprom = &eeprom;
 	};
 
 	usb_phy0: phy0 {
@@ -52,6 +54,10 @@
 
 &i2c1 {
 	status = "okay";
+	eeprom: eeprom at 57 {
+		compatible = "atmel,24c08"; /* not sure if this is correct */
+		reg = <0x57>;
+	};
 };
 
 &sdhci0 {
diff --git a/configs/syzygy_hub_defconfig b/configs/syzygy_hub_defconfig
index 9dec341b0415..131f8f16607b 100644
--- a/configs/syzygy_hub_defconfig
+++ b/configs/syzygy_hub_defconfig
@@ -16,7 +16,6 @@ CONFIG_IMAGE_FORMAT_LEGACY=y
 CONFIG_SPL_STACK_R=y
 CONFIG_SPL_OS_BOOT=y
 CONFIG_SYS_PROMPT="Zynq> "
-CONFIG_CMD_EEPROM=y
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_FPGA_LOADBP=y
 CONFIG_CMD_FPGA_LOADFS=y
@@ -35,8 +34,8 @@ CONFIG_SPL_DM_SEQ_ALIAS=y
 CONFIG_FPGA_XILINX=y
 CONFIG_FPGA_ZYNQPL=y
 CONFIG_DM_GPIO=y
-CONFIG_SYS_I2C_ZYNQ=y
-CONFIG_ZYNQ_I2C1=y
+CONFIG_DM_I2C=y
+CONFIG_SYS_I2C_CADENCE=y
 CONFIG_ZYNQ_GEM_I2C_MAC_OFFSET=0xFA
 CONFIG_MMC_SDHCI=y
 CONFIG_MMC_SDHCI_ZYNQ=y
diff --git a/include/configs/syzygy_hub.h b/include/configs/syzygy_hub.h
index 75036977d486..e31b77c0c0b7 100644
--- a/include/configs/syzygy_hub.h
+++ b/include/configs/syzygy_hub.h
@@ -10,10 +10,6 @@
 #ifndef __CONFIG_SYZYGY_HUB_H
 #define __CONFIG_SYZYGY_HUB_H
 
-#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1
-#define CONFIG_ZYNQ_GEM_EEPROM_ADDR    0x57
-#define CONFIG_ZYNQ_EEPROM_BUS		0
-
 #define CONFIG_EXTRA_ENV_SETTINGS       \
 	"fit_image=fit.itb\0"		\
 	"bitstream_image=download.bit\0"    \
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [U-Boot] [PATCH v2 2/7] ARM: zynq: Convert dlc20 and zc70x board to DM_I2C
  2019-02-05  9:55 [U-Boot] [PATCH v2 0/7] arm/arm64: i2c platform cleanup Michal Simek
  2019-02-05  9:55 ` [U-Boot] [PATCH v2 1/7] ARM: zynq: Convert Syzygy to DM_I2C Michal Simek
@ 2019-02-05  9:55 ` Michal Simek
  2019-02-07  6:56   ` Heiko Schocher
  2019-02-05  9:55 ` [U-Boot] [PATCH v2 3/7] ARM: zynq: Remove addresses for i2c controllers Michal Simek
                   ` (4 subsequent siblings)
  6 siblings, 1 reply; 15+ messages in thread
From: Michal Simek @ 2019-02-05  9:55 UTC (permalink / raw)
  To: u-boot

All these board have also eeprom enabled that's why it is also enabled
via defconfig.
There is also no need to have zc70x specific config file that's why also
remove it.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---

Changes in v2: None

 configs/zynq_dlc20_rev1_0_defconfig |  9 ++++++---
 configs/zynq_zc702_defconfig        | 10 ++++++----
 configs/zynq_zc706_defconfig        | 10 ++++++----
 include/configs/zynq-common.h       | 14 --------------
 include/configs/zynq_zc70x.h        | 16 ----------------
 5 files changed, 18 insertions(+), 41 deletions(-)
 delete mode 100644 include/configs/zynq_zc70x.h

diff --git a/configs/zynq_dlc20_rev1_0_defconfig b/configs/zynq_dlc20_rev1_0_defconfig
index 65850b3c31f7..07101e53a67b 100644
--- a/configs/zynq_dlc20_rev1_0_defconfig
+++ b/configs/zynq_dlc20_rev1_0_defconfig
@@ -18,7 +18,6 @@ CONFIG_SPL_OS_BOOT=y
 CONFIG_SPL_SPI_LOAD=y
 CONFIG_SYS_PROMPT="Zynq> "
 CONFIG_CMD_THOR_DOWNLOAD=y
-CONFIG_CMD_EEPROM=y
 CONFIG_CMD_DFU=y
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_FPGA_LOADBP=y
@@ -43,8 +42,12 @@ CONFIG_DFU_RAM=y
 CONFIG_FPGA_XILINX=y
 CONFIG_FPGA_ZYNQPL=y
 CONFIG_DM_GPIO=y
-CONFIG_SYS_I2C_ZYNQ=y
-CONFIG_ZYNQ_I2C0=y
+CONFIG_DM_I2C=y
+CONFIG_SYS_I2C_CADENCE=y
+CONFIG_MISC=y
+CONFIG_I2C_EEPROM=y
+CONFIG_SYS_I2C_EEPROM_ADDR=0x0
+CONFIG_SYS_I2C_EEPROM_ADDR_OVERFLOW=0x0
 CONFIG_MMC_SDHCI=y
 CONFIG_MMC_SDHCI_ZYNQ=y
 CONFIG_SPI_FLASH=y
diff --git a/configs/zynq_zc702_defconfig b/configs/zynq_zc702_defconfig
index 6bdf352fa885..c713e8f353c6 100644
--- a/configs/zynq_zc702_defconfig
+++ b/configs/zynq_zc702_defconfig
@@ -1,5 +1,4 @@
 CONFIG_ARM=y
-CONFIG_SYS_CONFIG_NAME="zynq_zc70x"
 CONFIG_ARCH_ZYNQ=y
 CONFIG_SYS_TEXT_BASE=0x4000000
 CONFIG_SPL=y
@@ -18,7 +17,6 @@ CONFIG_SPL_OS_BOOT=y
 CONFIG_SPL_SPI_LOAD=y
 CONFIG_SYS_PROMPT="Zynq> "
 CONFIG_CMD_THOR_DOWNLOAD=y
-CONFIG_CMD_EEPROM=y
 CONFIG_CMD_MEMTEST=y
 CONFIG_CMD_DFU=y
 # CONFIG_CMD_FLASH is not set
@@ -44,10 +42,14 @@ CONFIG_DFU_RAM=y
 CONFIG_FPGA_XILINX=y
 CONFIG_FPGA_ZYNQPL=y
 CONFIG_DM_GPIO=y
-CONFIG_SYS_I2C_ZYNQ=y
-CONFIG_ZYNQ_I2C0=y
+CONFIG_DM_I2C=y
+CONFIG_SYS_I2C_CADENCE=y
 CONFIG_LED=y
 CONFIG_LED_GPIO=y
+CONFIG_MISC=y
+CONFIG_I2C_EEPROM=y
+CONFIG_SYS_I2C_EEPROM_ADDR=0x0
+CONFIG_SYS_I2C_EEPROM_ADDR_OVERFLOW=0x0
 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 5536af8cf425..b8fc657a80c2 100644
--- a/configs/zynq_zc706_defconfig
+++ b/configs/zynq_zc706_defconfig
@@ -1,5 +1,4 @@
 CONFIG_ARM=y
-CONFIG_SYS_CONFIG_NAME="zynq_zc70x"
 CONFIG_ARCH_ZYNQ=y
 CONFIG_SYS_TEXT_BASE=0x4000000
 CONFIG_SPL=y
@@ -21,7 +20,6 @@ CONFIG_SPL_OS_BOOT=y
 CONFIG_SPL_SPI_LOAD=y
 CONFIG_SYS_PROMPT="Zynq> "
 CONFIG_CMD_THOR_DOWNLOAD=y
-CONFIG_CMD_EEPROM=y
 CONFIG_CMD_DFU=y
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_FPGA_LOADBP=y
@@ -46,8 +44,12 @@ CONFIG_DFU_RAM=y
 CONFIG_FPGA_XILINX=y
 CONFIG_FPGA_ZYNQPL=y
 CONFIG_DM_GPIO=y
-CONFIG_SYS_I2C_ZYNQ=y
-CONFIG_ZYNQ_I2C0=y
+CONFIG_DM_I2C=y
+CONFIG_SYS_I2C_CADENCE=y
+CONFIG_MISC=y
+CONFIG_I2C_EEPROM=y
+CONFIG_SYS_I2C_EEPROM_ADDR=0x0
+CONFIG_SYS_I2C_EEPROM_ADDR_OVERFLOW=0x0
 CONFIG_MMC_SDHCI=y
 CONFIG_MMC_SDHCI_ZYNQ=y
 CONFIG_SPI_FLASH=y
diff --git a/include/configs/zynq-common.h b/include/configs/zynq-common.h
index 3d6dbf6ea82b..a285fcdece73 100644
--- a/include/configs/zynq-common.h
+++ b/include/configs/zynq-common.h
@@ -102,20 +102,6 @@
 # define DFU_ALT_INFO
 #endif
 
-/* I2C */
-#if defined(CONFIG_SYS_I2C_ZYNQ)
-# define CONFIG_SYS_I2C
-#endif
-
-/* EEPROM */
-#ifdef CONFIG_ZYNQ_EEPROM
-# define CONFIG_SYS_I2C_EEPROM_ADDR_LEN		1
-# define CONFIG_SYS_I2C_EEPROM_ADDR		0x54
-# define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS	4
-# define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS	5
-# define CONFIG_SYS_EEPROM_SIZE			1024 /* Bytes */
-#endif
-
 /* Allow to overwrite serial and ethaddr */
 #define CONFIG_ENV_OVERWRITE
 
diff --git a/include/configs/zynq_zc70x.h b/include/configs/zynq_zc70x.h
deleted file mode 100644
index b5a28dab878f..000000000000
--- a/include/configs/zynq_zc70x.h
+++ /dev/null
@@ -1,16 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0+ */
-/*
- * (C) Copyright 2013 Xilinx, Inc.
- *
- * Configuration settings for the Xilinx Zynq ZC702 and ZC706 boards
- * See zynq-common.h for Zynq common configs
- */
-
-#ifndef __CONFIG_ZYNQ_ZC70X_H
-#define __CONFIG_ZYNQ_ZC70X_H
-
-#define CONFIG_ZYNQ_EEPROM
-
-#include <configs/zynq-common.h>
-
-#endif /* __CONFIG_ZYNQ_ZC70X_H */
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [U-Boot] [PATCH v2 3/7] ARM: zynq: Remove addresses for i2c controllers
  2019-02-05  9:55 [U-Boot] [PATCH v2 0/7] arm/arm64: i2c platform cleanup Michal Simek
  2019-02-05  9:55 ` [U-Boot] [PATCH v2 1/7] ARM: zynq: Convert Syzygy to DM_I2C Michal Simek
  2019-02-05  9:55 ` [U-Boot] [PATCH v2 2/7] ARM: zynq: Convert dlc20 and zc70x board " Michal Simek
@ 2019-02-05  9:55 ` Michal Simek
  2019-02-07  6:57   ` Heiko Schocher
  2019-02-05  9:55 ` [U-Boot] [PATCH v2 4/7] arm64: zynqmp: Switch all platfroms to DM_I2C Michal Simek
                   ` (3 subsequent siblings)
  6 siblings, 1 reply; 15+ messages in thread
From: Michal Simek @ 2019-02-05  9:55 UTC (permalink / raw)
  To: u-boot

All platforms have been converted to DM that's why there is no reason to
keep addresses in headers. They are all read from DT now.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---

Changes in v2: None

 arch/arm/mach-zynq/include/mach/hardware.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/arch/arm/mach-zynq/include/mach/hardware.h b/arch/arm/mach-zynq/include/mach/hardware.h
index 58b6f95395a4..5412ed682797 100644
--- a/arch/arm/mach-zynq/include/mach/hardware.h
+++ b/arch/arm/mach-zynq/include/mach/hardware.h
@@ -9,8 +9,6 @@
 #define ZYNQ_SYS_CTRL_BASEADDR		0xF8000000
 #define ZYNQ_DEV_CFG_APB_BASEADDR	0xF8007000
 #define ZYNQ_SCU_BASEADDR		0xF8F00000
-#define ZYNQ_I2C_BASEADDR0		0xE0004000
-#define ZYNQ_I2C_BASEADDR1		0xE0005000
 #define ZYNQ_QSPI_BASEADDR		0xE000D000
 #define ZYNQ_SMC_BASEADDR		0xE000E000
 #define ZYNQ_NAND_BASEADDR		0xE1000000
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [U-Boot] [PATCH v2 4/7] arm64: zynqmp: Switch all platfroms to DM_I2C
  2019-02-05  9:55 [U-Boot] [PATCH v2 0/7] arm/arm64: i2c platform cleanup Michal Simek
                   ` (2 preceding siblings ...)
  2019-02-05  9:55 ` [U-Boot] [PATCH v2 3/7] ARM: zynq: Remove addresses for i2c controllers Michal Simek
@ 2019-02-05  9:55 ` Michal Simek
  2019-02-07  6:58   ` Heiko Schocher
  2019-02-05  9:55 ` [U-Boot] [PATCH v2 5/7] arm64: zynqmp: Remove addresses for i2c controllers Michal Simek
                   ` (2 subsequent siblings)
  6 siblings, 1 reply; 15+ messages in thread
From: Michal Simek @ 2019-02-05  9:55 UTC (permalink / raw)
  To: u-boot

CONFIG_PCA953X is not needed because of PCA953X is integrated in gpio
subsystem already. That's why also remove CMD_PCA953X which is only for
this driver.

zcu102/zcu104-revC/zcu106/zcu111 contain links to eeprom which stores MAC address.

DM_I2C is not enabled for the whole SoC because it increase size for
mini configurations and there is no I2C symbol present to setup
dependencies.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---

Changes in v2: None

 arch/arm/dts/zynqmp-zcu102-revA.dts           |  1 +
 arch/arm/dts/zynqmp-zcu104-revC.dts           |  1 +
 arch/arm/dts/zynqmp-zcu106-revA.dts           |  1 +
 arch/arm/dts/zynqmp-zcu111-revA.dts           |  1 +
 configs/avnet_ultra96_rev1_defconfig          |  6 ++++--
 configs/xilinx_zynqmp_zcu100_revC_defconfig   |  6 ++++--
 configs/xilinx_zynqmp_zcu102_rev1_0_defconfig | 12 ++++++-----
 configs/xilinx_zynqmp_zcu102_revA_defconfig   | 13 ++++++-----
 configs/xilinx_zynqmp_zcu102_revB_defconfig   | 13 ++++++-----
 configs/xilinx_zynqmp_zcu104_revA_defconfig   | 11 ++++++----
 configs/xilinx_zynqmp_zcu104_revC_defconfig   | 11 ++++++----
 configs/xilinx_zynqmp_zcu106_revA_defconfig   | 12 ++++++-----
 configs/xilinx_zynqmp_zcu111_revA_defconfig   | 12 ++++++-----
 include/configs/xilinx_zynqmp.h               |  5 -----
 include/configs/xilinx_zynqmp_zcu100.h        | 15 -------------
 include/configs/xilinx_zynqmp_zcu102.h        | 29 -------------------------
 include/configs/xilinx_zynqmp_zcu104.h        | 17 ---------------
 include/configs/xilinx_zynqmp_zcu104_revC.h   |  3 ---
 include/configs/xilinx_zynqmp_zcu106.h        | 28 ------------------------
 include/configs/xilinx_zynqmp_zcu111.h        | 31 ---------------------------
 20 files changed, 63 insertions(+), 165 deletions(-)

diff --git a/arch/arm/dts/zynqmp-zcu102-revA.dts b/arch/arm/dts/zynqmp-zcu102-revA.dts
index 05be919f6f9b..1b28d331ff5e 100644
--- a/arch/arm/dts/zynqmp-zcu102-revA.dts
+++ b/arch/arm/dts/zynqmp-zcu102-revA.dts
@@ -36,6 +36,7 @@
 	chosen {
 		bootargs = "earlycon";
 		stdout-path = "serial0:115200n8";
+		xlnx,eeprom = &eeprom;
 	};
 
 	memory at 0 {
diff --git a/arch/arm/dts/zynqmp-zcu104-revC.dts b/arch/arm/dts/zynqmp-zcu104-revC.dts
index becc6a0fe1ef..623d2c96cda4 100644
--- a/arch/arm/dts/zynqmp-zcu104-revC.dts
+++ b/arch/arm/dts/zynqmp-zcu104-revC.dts
@@ -34,6 +34,7 @@
 	chosen {
 		bootargs = "earlycon";
 		stdout-path = "serial0:115200n8";
+		xlnx,eeprom = &eeprom;
 	};
 
 	memory at 0 {
diff --git a/arch/arm/dts/zynqmp-zcu106-revA.dts b/arch/arm/dts/zynqmp-zcu106-revA.dts
index 7735e9d2c8b3..3d5c99ad628c 100644
--- a/arch/arm/dts/zynqmp-zcu106-revA.dts
+++ b/arch/arm/dts/zynqmp-zcu106-revA.dts
@@ -36,6 +36,7 @@
 	chosen {
 		bootargs = "earlycon";
 		stdout-path = "serial0:115200n8";
+		xlnx,eeprom = &eeprom;
 	};
 
 	memory at 0 {
diff --git a/arch/arm/dts/zynqmp-zcu111-revA.dts b/arch/arm/dts/zynqmp-zcu111-revA.dts
index 172e6cc2ca06..f7d6fe0073b2 100644
--- a/arch/arm/dts/zynqmp-zcu111-revA.dts
+++ b/arch/arm/dts/zynqmp-zcu111-revA.dts
@@ -35,6 +35,7 @@
 	chosen {
 		bootargs = "earlycon";
 		stdout-path = "serial0:115200n8";
+		xlnx,eeprom = &eeprom;
 	};
 
 	memory at 0 {
diff --git a/configs/avnet_ultra96_rev1_defconfig b/configs/avnet_ultra96_rev1_defconfig
index 896de78b34e4..e0055a07f1a4 100644
--- a/configs/avnet_ultra96_rev1_defconfig
+++ b/configs/avnet_ultra96_rev1_defconfig
@@ -49,8 +49,10 @@ CONFIG_FPGA_XILINX=y
 CONFIG_FPGA_ZYNQMPPL=y
 CONFIG_DM_GPIO=y
 CONFIG_XILINX_GPIO=y
-CONFIG_SYS_I2C_ZYNQ=y
-CONFIG_ZYNQ_I2C1=y
+CONFIG_DM_I2C=y
+CONFIG_SYS_I2C_CADENCE=y
+CONFIG_I2C_MUX=y
+CONFIG_I2C_MUX_PCA954x=y
 CONFIG_LED=y
 CONFIG_LED_GPIO=y
 CONFIG_MISC=y
diff --git a/configs/xilinx_zynqmp_zcu100_revC_defconfig b/configs/xilinx_zynqmp_zcu100_revC_defconfig
index ca96b9ee2aa3..ae573f9f164f 100644
--- a/configs/xilinx_zynqmp_zcu100_revC_defconfig
+++ b/configs/xilinx_zynqmp_zcu100_revC_defconfig
@@ -49,8 +49,10 @@ CONFIG_FPGA_XILINX=y
 CONFIG_FPGA_ZYNQMPPL=y
 CONFIG_DM_GPIO=y
 CONFIG_XILINX_GPIO=y
-CONFIG_SYS_I2C_ZYNQ=y
-CONFIG_ZYNQ_I2C1=y
+CONFIG_DM_I2C=y
+CONFIG_SYS_I2C_CADENCE=y
+CONFIG_I2C_MUX=y
+CONFIG_I2C_MUX_PCA954x=y
 CONFIG_LED=y
 CONFIG_LED_GPIO=y
 CONFIG_MISC=y
diff --git a/configs/xilinx_zynqmp_zcu102_rev1_0_defconfig b/configs/xilinx_zynqmp_zcu102_rev1_0_defconfig
index 30d3147a7a8b..5035e58ef93e 100644
--- a/configs/xilinx_zynqmp_zcu102_rev1_0_defconfig
+++ b/configs/xilinx_zynqmp_zcu102_rev1_0_defconfig
@@ -23,7 +23,6 @@ CONFIG_SPL_RAM_DEVICE=y
 CONFIG_SPL_ATF=y
 CONFIG_SYS_PROMPT="ZynqMP> "
 CONFIG_CMD_THOR_DOWNLOAD=y
-CONFIG_CMD_EEPROM=y
 CONFIG_CMD_MEMTEST=y
 CONFIG_SYS_ALT_MEMTEST=y
 CONFIG_CMD_CLK=y
@@ -60,15 +59,18 @@ CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
 CONFIG_FPGA_XILINX=y
 CONFIG_FPGA_ZYNQMPPL=y
 CONFIG_DM_GPIO=y
-CONFIG_CMD_PCA953X=y
 CONFIG_XILINX_GPIO=y
-CONFIG_SYS_I2C_ZYNQ=y
-CONFIG_ZYNQ_I2C0=y
-CONFIG_ZYNQ_I2C1=y
+CONFIG_DM_I2C=y
+CONFIG_SYS_I2C_CADENCE=y
+CONFIG_I2C_MUX=y
+CONFIG_I2C_MUX_PCA954x=y
 CONFIG_LED=y
 CONFIG_LED_GPIO=y
 CONFIG_MISC=y
+CONFIG_I2C_EEPROM=y
 CONFIG_ZYNQ_GEM_I2C_MAC_OFFSET=0x20
+CONFIG_SYS_I2C_EEPROM_ADDR=0x0
+CONFIG_SYS_I2C_EEPROM_ADDR_OVERFLOW=0x0
 CONFIG_MMC_IO_VOLTAGE=y
 CONFIG_MMC_UHS_SUPPORT=y
 CONFIG_MMC_SDHCI=y
diff --git a/configs/xilinx_zynqmp_zcu102_revA_defconfig b/configs/xilinx_zynqmp_zcu102_revA_defconfig
index bada5e117317..49dc574b3d05 100644
--- a/configs/xilinx_zynqmp_zcu102_revA_defconfig
+++ b/configs/xilinx_zynqmp_zcu102_revA_defconfig
@@ -23,7 +23,6 @@ CONFIG_SPL_RAM_DEVICE=y
 CONFIG_SPL_ATF=y
 CONFIG_SYS_PROMPT="ZynqMP> "
 CONFIG_CMD_THOR_DOWNLOAD=y
-CONFIG_CMD_EEPROM=y
 CONFIG_CMD_MEMTEST=y
 CONFIG_SYS_ALT_MEMTEST=y
 CONFIG_CMD_CLK=y
@@ -60,15 +59,19 @@ CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
 CONFIG_FPGA_XILINX=y
 CONFIG_FPGA_ZYNQMPPL=y
 CONFIG_DM_GPIO=y
-CONFIG_CMD_PCA953X=y
 CONFIG_XILINX_GPIO=y
-CONFIG_SYS_I2C_ZYNQ=y
-CONFIG_ZYNQ_I2C0=y
-CONFIG_ZYNQ_I2C1=y
+CONFIG_DM_PCA953X=y
+CONFIG_DM_I2C=y
+CONFIG_SYS_I2C_CADENCE=y
+CONFIG_I2C_MUX=y
+CONFIG_I2C_MUX_PCA954x=y
 CONFIG_LED=y
 CONFIG_LED_GPIO=y
 CONFIG_MISC=y
+CONFIG_I2C_EEPROM=y
 CONFIG_ZYNQ_GEM_I2C_MAC_OFFSET=0x20
+CONFIG_SYS_I2C_EEPROM_ADDR=0x0
+CONFIG_SYS_I2C_EEPROM_ADDR_OVERFLOW=0x0
 CONFIG_MMC_SDHCI=y
 CONFIG_MMC_SDHCI_ZYNQ=y
 CONFIG_SPI_FLASH=y
diff --git a/configs/xilinx_zynqmp_zcu102_revB_defconfig b/configs/xilinx_zynqmp_zcu102_revB_defconfig
index 3c4ac01b220c..5d461fbb4368 100644
--- a/configs/xilinx_zynqmp_zcu102_revB_defconfig
+++ b/configs/xilinx_zynqmp_zcu102_revB_defconfig
@@ -23,7 +23,6 @@ CONFIG_SPL_RAM_DEVICE=y
 CONFIG_SPL_ATF=y
 CONFIG_SYS_PROMPT="ZynqMP> "
 CONFIG_CMD_THOR_DOWNLOAD=y
-CONFIG_CMD_EEPROM=y
 CONFIG_CMD_MEMTEST=y
 CONFIG_SYS_ALT_MEMTEST=y
 CONFIG_CMD_CLK=y
@@ -60,15 +59,19 @@ CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
 CONFIG_FPGA_XILINX=y
 CONFIG_FPGA_ZYNQMPPL=y
 CONFIG_DM_GPIO=y
-CONFIG_CMD_PCA953X=y
 CONFIG_XILINX_GPIO=y
-CONFIG_SYS_I2C_ZYNQ=y
-CONFIG_ZYNQ_I2C0=y
-CONFIG_ZYNQ_I2C1=y
+CONFIG_DM_PCA953X=y
+CONFIG_DM_I2C=y
+CONFIG_SYS_I2C_CADENCE=y
+CONFIG_I2C_MUX=y
+CONFIG_I2C_MUX_PCA954x=y
 CONFIG_LED=y
 CONFIG_LED_GPIO=y
 CONFIG_MISC=y
+CONFIG_I2C_EEPROM=y
 CONFIG_ZYNQ_GEM_I2C_MAC_OFFSET=0x20
+CONFIG_SYS_I2C_EEPROM_ADDR=0x0
+CONFIG_SYS_I2C_EEPROM_ADDR_OVERFLOW=0x0
 CONFIG_MMC_SDHCI=y
 CONFIG_MMC_SDHCI_ZYNQ=y
 CONFIG_SPI_FLASH=y
diff --git a/configs/xilinx_zynqmp_zcu104_revA_defconfig b/configs/xilinx_zynqmp_zcu104_revA_defconfig
index 90fd431df3dd..cfdc17fa988d 100644
--- a/configs/xilinx_zynqmp_zcu104_revA_defconfig
+++ b/configs/xilinx_zynqmp_zcu104_revA_defconfig
@@ -19,7 +19,6 @@ CONFIG_SPL_RAM_SUPPORT=y
 CONFIG_SPL_RAM_DEVICE=y
 CONFIG_SPL_ATF=y
 CONFIG_SYS_PROMPT="ZynqMP> "
-CONFIG_CMD_EEPROM=y
 CONFIG_CMD_MEMTEST=y
 CONFIG_CMD_CLK=y
 CONFIG_CMD_DFU=y
@@ -50,10 +49,14 @@ CONFIG_DFU_RAM=y
 CONFIG_FPGA_XILINX=y
 CONFIG_FPGA_ZYNQMPPL=y
 CONFIG_DM_GPIO=y
-CONFIG_CMD_PCA953X=y
-CONFIG_SYS_I2C_ZYNQ=y
-CONFIG_ZYNQ_I2C1=y
+CONFIG_DM_I2C=y
+CONFIG_SYS_I2C_CADENCE=y
+CONFIG_I2C_MUX=y
+CONFIG_I2C_MUX_PCA954x=y
 CONFIG_MISC=y
+CONFIG_I2C_EEPROM=y
+CONFIG_SYS_I2C_EEPROM_ADDR=0x0
+CONFIG_SYS_I2C_EEPROM_ADDR_OVERFLOW=0x0
 CONFIG_MMC_SDHCI=y
 CONFIG_MMC_SDHCI_ZYNQ=y
 CONFIG_SPI_FLASH=y
diff --git a/configs/xilinx_zynqmp_zcu104_revC_defconfig b/configs/xilinx_zynqmp_zcu104_revC_defconfig
index eb30e2398f2c..33bb1183ff61 100644
--- a/configs/xilinx_zynqmp_zcu104_revC_defconfig
+++ b/configs/xilinx_zynqmp_zcu104_revC_defconfig
@@ -19,7 +19,6 @@ CONFIG_SPL_RAM_SUPPORT=y
 CONFIG_SPL_RAM_DEVICE=y
 CONFIG_SPL_ATF=y
 CONFIG_SYS_PROMPT="ZynqMP> "
-CONFIG_CMD_EEPROM=y
 CONFIG_CMD_MEMTEST=y
 CONFIG_CMD_CLK=y
 CONFIG_CMD_DFU=y
@@ -50,11 +49,15 @@ CONFIG_DFU_RAM=y
 CONFIG_FPGA_XILINX=y
 CONFIG_FPGA_ZYNQMPPL=y
 CONFIG_DM_GPIO=y
-CONFIG_CMD_PCA953X=y
-CONFIG_SYS_I2C_ZYNQ=y
-CONFIG_ZYNQ_I2C1=y
+CONFIG_DM_I2C=y
+CONFIG_SYS_I2C_CADENCE=y
+CONFIG_I2C_MUX=y
+CONFIG_I2C_MUX_PCA954x=y
 CONFIG_MISC=y
+CONFIG_I2C_EEPROM=y
 CONFIG_ZYNQ_GEM_I2C_MAC_OFFSET=0x20
+CONFIG_SYS_I2C_EEPROM_ADDR=0x0
+CONFIG_SYS_I2C_EEPROM_ADDR_OVERFLOW=0x0
 CONFIG_MMC_SDHCI=y
 CONFIG_MMC_SDHCI_ZYNQ=y
 CONFIG_SPI_FLASH=y
diff --git a/configs/xilinx_zynqmp_zcu106_revA_defconfig b/configs/xilinx_zynqmp_zcu106_revA_defconfig
index 9e8eb5f483a2..93629526aff1 100644
--- a/configs/xilinx_zynqmp_zcu106_revA_defconfig
+++ b/configs/xilinx_zynqmp_zcu106_revA_defconfig
@@ -22,7 +22,6 @@ CONFIG_SPL_RAM_DEVICE=y
 CONFIG_SPL_ATF=y
 CONFIG_SYS_PROMPT="ZynqMP> "
 CONFIG_CMD_THOR_DOWNLOAD=y
-CONFIG_CMD_EEPROM=y
 CONFIG_CMD_MEMTEST=y
 CONFIG_CMD_CLK=y
 CONFIG_CMD_DFU=y
@@ -57,14 +56,17 @@ CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
 CONFIG_FPGA_XILINX=y
 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_DM_I2C=y
+CONFIG_SYS_I2C_CADENCE=y
+CONFIG_I2C_MUX=y
+CONFIG_I2C_MUX_PCA954x=y
 CONFIG_LED=y
 CONFIG_LED_GPIO=y
 CONFIG_MISC=y
+CONFIG_I2C_EEPROM=y
 CONFIG_ZYNQ_GEM_I2C_MAC_OFFSET=0x20
+CONFIG_SYS_I2C_EEPROM_ADDR=0x0
+CONFIG_SYS_I2C_EEPROM_ADDR_OVERFLOW=0x0
 CONFIG_MMC_SDHCI=y
 CONFIG_MMC_SDHCI_ZYNQ=y
 CONFIG_SPI_FLASH=y
diff --git a/configs/xilinx_zynqmp_zcu111_revA_defconfig b/configs/xilinx_zynqmp_zcu111_revA_defconfig
index b8e96042da0a..d0f959827bf6 100644
--- a/configs/xilinx_zynqmp_zcu111_revA_defconfig
+++ b/configs/xilinx_zynqmp_zcu111_revA_defconfig
@@ -19,7 +19,6 @@ CONFIG_SPL_RAM_SUPPORT=y
 CONFIG_SPL_RAM_DEVICE=y
 CONFIG_SPL_ATF=y
 CONFIG_SYS_PROMPT="ZynqMP> "
-CONFIG_CMD_EEPROM=y
 CONFIG_CMD_MEMTEST=y
 CONFIG_CMD_CLK=y
 CONFIG_CMD_DFU=y
@@ -49,14 +48,17 @@ CONFIG_DFU_RAM=y
 CONFIG_FPGA_XILINX=y
 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_DM_I2C=y
+CONFIG_SYS_I2C_CADENCE=y
+CONFIG_I2C_MUX=y
+CONFIG_I2C_MUX_PCA954x=y
 CONFIG_LED=y
 CONFIG_LED_GPIO=y
 CONFIG_MISC=y
+CONFIG_I2C_EEPROM=y
 CONFIG_ZYNQ_GEM_I2C_MAC_OFFSET=0x20
+CONFIG_SYS_I2C_EEPROM_ADDR=0x0
+CONFIG_SYS_I2C_EEPROM_ADDR_OVERFLOW=0x0
 CONFIG_MMC_SDHCI=y
 CONFIG_MMC_SDHCI_ZYNQ=y
 CONFIG_SPI_FLASH=y
diff --git a/include/configs/xilinx_zynqmp.h b/include/configs/xilinx_zynqmp.h
index 8ad71a09d762..999dc8ac4a5c 100644
--- a/include/configs/xilinx_zynqmp.h
+++ b/include/configs/xilinx_zynqmp.h
@@ -108,11 +108,6 @@
 # define PHY_ANEG_TIMEOUT       20000
 #endif
 
-/* I2C */
-#if defined(CONFIG_SYS_I2C_ZYNQ)
-# define CONFIG_SYS_I2C
-#endif
-
 /* EEPROM */
 #ifdef CONFIG_ZYNQMP_EEPROM
 # define CONFIG_SYS_I2C_EEPROM_ADDR_LEN		2
diff --git a/include/configs/xilinx_zynqmp_zcu100.h b/include/configs/xilinx_zynqmp_zcu100.h
index 5ad9e1be5af9..409dcb2651d7 100644
--- a/include/configs/xilinx_zynqmp_zcu100.h
+++ b/include/configs/xilinx_zynqmp_zcu100.h
@@ -9,21 +9,6 @@
 #ifndef __CONFIG_ZYNQMP_ZCU100_H
 #define __CONFIG_ZYNQMP_ZCU100_H
 
-/* FIXME Will go away soon */
-#define CONFIG_SYS_I2C_MAX_HOPS		1
-#define CONFIG_SYS_NUM_I2C_BUSES	9
-#define CONFIG_SYS_I2C_BUSES	{ \
-				{0, {I2C_NULL_HOP} }, \
-				{0, {{I2C_MUX_PCA9548, 0x75, 0} } }, \
-				{0, {{I2C_MUX_PCA9548, 0x75, 1} } }, \
-				{0, {{I2C_MUX_PCA9548, 0x75, 2} } }, \
-				{0, {{I2C_MUX_PCA9548, 0x75, 3} } }, \
-				{0, {{I2C_MUX_PCA9548, 0x75, 4} } }, \
-				{0, {{I2C_MUX_PCA9548, 0x75, 5} } }, \
-				{0, {{I2C_MUX_PCA9548, 0x75, 6} } }, \
-				{0, {{I2C_MUX_PCA9548, 0x75, 7} } }, \
-				}
-
 #include <configs/xilinx_zynqmp.h>
 
 #endif /* __CONFIG_ZYNQMP_ZCU100_H */
diff --git a/include/configs/xilinx_zynqmp_zcu102.h b/include/configs/xilinx_zynqmp_zcu102.h
index ad6bc3d1bf11..f1504784fdd6 100644
--- a/include/configs/xilinx_zynqmp_zcu102.h
+++ b/include/configs/xilinx_zynqmp_zcu102.h
@@ -10,35 +10,6 @@
 #define __CONFIG_ZYNQMP_ZCU102_H
 
 #define CONFIG_ZYNQ_SDHCI1
-#define CONFIG_SYS_I2C_MAX_HOPS		1
-#define CONFIG_SYS_NUM_I2C_BUSES	18
-#define CONFIG_SYS_I2C_BUSES	{ \
-				{0, {I2C_NULL_HOP} }, \
-				{0, {{I2C_MUX_PCA9544, 0x75, 0} } }, \
-				{0, {{I2C_MUX_PCA9544, 0x75, 1} } }, \
-				{0, {{I2C_MUX_PCA9544, 0x75, 2} } }, \
-				{1, {I2C_NULL_HOP} }, \
-				{1, {{I2C_MUX_PCA9548, 0x74, 0} } }, \
-				{1, {{I2C_MUX_PCA9548, 0x74, 1} } }, \
-				{1, {{I2C_MUX_PCA9548, 0x74, 2} } }, \
-				{1, {{I2C_MUX_PCA9548, 0x74, 3} } }, \
-				{1, {{I2C_MUX_PCA9548, 0x74, 4} } }, \
-				{1, {{I2C_MUX_PCA9548, 0x75, 0} } }, \
-				{1, {{I2C_MUX_PCA9548, 0x75, 1} } }, \
-				{1, {{I2C_MUX_PCA9548, 0x75, 2} } }, \
-				{1, {{I2C_MUX_PCA9548, 0x75, 3} } }, \
-				{1, {{I2C_MUX_PCA9548, 0x75, 4} } }, \
-				{1, {{I2C_MUX_PCA9548, 0x75, 5} } }, \
-				{1, {{I2C_MUX_PCA9548, 0x75, 6} } }, \
-				{1, {{I2C_MUX_PCA9548, 0x75, 7} } }, \
-				}
-
-#define CONFIG_PCA953X
-
-#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN	1
-#define CONFIG_ZYNQ_EEPROM_BUS		5
-#define CONFIG_ZYNQ_GEM_EEPROM_ADDR	0x54
-
 #define CONFIG_SPD_EEPROM
 #define CONFIG_DDR_SPD
 
diff --git a/include/configs/xilinx_zynqmp_zcu104.h b/include/configs/xilinx_zynqmp_zcu104.h
index 7e3b9ad7058b..9d40955d5d36 100644
--- a/include/configs/xilinx_zynqmp_zcu104.h
+++ b/include/configs/xilinx_zynqmp_zcu104.h
@@ -10,23 +10,6 @@
 #define __CONFIG_ZYNQMP_ZCU104_H
 
 #define CONFIG_ZYNQ_SDHCI1
-#define CONFIG_SYS_I2C_MAX_HOPS		1
-#define CONFIG_SYS_NUM_I2C_BUSES	9
-#define CONFIG_SYS_I2C_BUSES	{ \
-				{0, {I2C_NULL_HOP} }, \
-				{0, {{I2C_MUX_PCA9548, 0x74, 0} } }, \
-				{0, {{I2C_MUX_PCA9548, 0x74, 1} } }, \
-				{0, {{I2C_MUX_PCA9548, 0x74, 2} } }, \
-				{0, {{I2C_MUX_PCA9548, 0x74, 3} } }, \
-				{0, {{I2C_MUX_PCA9548, 0x74, 4} } }, \
-				{0, {{I2C_MUX_PCA9548, 0x74, 5} } }, \
-				{0, {{I2C_MUX_PCA9548, 0x74, 6} } }, \
-				{0, {{I2C_MUX_PCA9548, 0x74, 7} } }, \
-				}
-
-#define CONFIG_PCA953X
-
-#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN	1
 
 #include <configs/xilinx_zynqmp.h>
 
diff --git a/include/configs/xilinx_zynqmp_zcu104_revC.h b/include/configs/xilinx_zynqmp_zcu104_revC.h
index 8b3ae36d0f32..e3059a921e65 100644
--- a/include/configs/xilinx_zynqmp_zcu104_revC.h
+++ b/include/configs/xilinx_zynqmp_zcu104_revC.h
@@ -11,7 +11,4 @@
 
 #include <configs/xilinx_zynqmp_zcu104.h>
 
-#define CONFIG_ZYNQ_GEM_EEPROM_ADDR 0x54
-#define CONFIG_ZYNQ_EEPROM_BUS 1
-
 #endif /* __CONFIG_ZYNQMP_ZCU104_REVC_H */
diff --git a/include/configs/xilinx_zynqmp_zcu106.h b/include/configs/xilinx_zynqmp_zcu106.h
index cc2d145ddd94..dc2efc7e059a 100644
--- a/include/configs/xilinx_zynqmp_zcu106.h
+++ b/include/configs/xilinx_zynqmp_zcu106.h
@@ -10,34 +10,6 @@
 #define __CONFIG_ZYNQMP_ZCU106_H
 
 #define CONFIG_ZYNQ_SDHCI1
-#define CONFIG_SYS_I2C_MAX_HOPS		1
-#define CONFIG_SYS_NUM_I2C_BUSES	18
-#define CONFIG_SYS_I2C_BUSES	{ \
-				{0, {I2C_NULL_HOP} }, \
-				{0, {{I2C_MUX_PCA9544, 0x75, 0} } }, \
-				{0, {{I2C_MUX_PCA9544, 0x75, 1} } }, \
-				{0, {{I2C_MUX_PCA9544, 0x75, 2} } }, \
-				{1, {I2C_NULL_HOP} }, \
-				{1, {{I2C_MUX_PCA9548, 0x74, 0} } }, \
-				{1, {{I2C_MUX_PCA9548, 0x74, 1} } }, \
-				{1, {{I2C_MUX_PCA9548, 0x74, 2} } }, \
-				{1, {{I2C_MUX_PCA9548, 0x74, 3} } }, \
-				{1, {{I2C_MUX_PCA9548, 0x74, 4} } }, \
-				{1, {{I2C_MUX_PCA9548, 0x75, 0} } }, \
-				{1, {{I2C_MUX_PCA9548, 0x75, 1} } }, \
-				{1, {{I2C_MUX_PCA9548, 0x75, 2} } }, \
-				{1, {{I2C_MUX_PCA9548, 0x75, 3} } }, \
-				{1, {{I2C_MUX_PCA9548, 0x75, 4} } }, \
-				{1, {{I2C_MUX_PCA9548, 0x75, 5} } }, \
-				{1, {{I2C_MUX_PCA9548, 0x75, 6} } }, \
-				{1, {{I2C_MUX_PCA9548, 0x75, 7} } }, \
-				}
-
-#define CONFIG_PCA953X
-
-#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN	1
-#define CONFIG_ZYNQ_EEPROM_BUS		5
-#define CONFIG_ZYNQ_GEM_EEPROM_ADDR	0x54
 
 #include <configs/xilinx_zynqmp.h>
 
diff --git a/include/configs/xilinx_zynqmp_zcu111.h b/include/configs/xilinx_zynqmp_zcu111.h
index 8f8cb4f08707..dea5e4a4d413 100644
--- a/include/configs/xilinx_zynqmp_zcu111.h
+++ b/include/configs/xilinx_zynqmp_zcu111.h
@@ -10,37 +10,6 @@
 #define __CONFIG_ZYNQMP_ZCU111_H
 
 #define CONFIG_ZYNQ_SDHCI1
-#define CONFIG_SYS_I2C_MAX_HOPS		1
-#define CONFIG_SYS_NUM_I2C_BUSES	21
-#define CONFIG_SYS_I2C_BUSES	{ \
-				{0, {I2C_NULL_HOP} }, \
-				{0, {{I2C_MUX_PCA9544, 0x75, 0} } }, \
-				{0, {{I2C_MUX_PCA9544, 0x75, 1} } }, \
-				{0, {{I2C_MUX_PCA9544, 0x75, 2} } }, \
-				{0, {{I2C_MUX_PCA9544, 0x75, 3} } }, \
-				{1, {I2C_NULL_HOP} }, \
-				{1, {{I2C_MUX_PCA9548, 0x74, 0} } }, \
-				{1, {{I2C_MUX_PCA9548, 0x74, 1} } }, \
-				{1, {{I2C_MUX_PCA9548, 0x74, 2} } }, \
-				{1, {{I2C_MUX_PCA9548, 0x74, 3} } }, \
-				{1, {{I2C_MUX_PCA9548, 0x74, 4} } }, \
-				{1, {{I2C_MUX_PCA9548, 0x74, 5} } }, \
-				{1, {{I2C_MUX_PCA9548, 0x74, 6} } }, \
-				{1, {{I2C_MUX_PCA9548, 0x75, 0} } }, \
-				{1, {{I2C_MUX_PCA9548, 0x75, 1} } }, \
-				{1, {{I2C_MUX_PCA9548, 0x75, 2} } }, \
-				{1, {{I2C_MUX_PCA9548, 0x75, 3} } }, \
-				{1, {{I2C_MUX_PCA9548, 0x75, 4} } }, \
-				{1, {{I2C_MUX_PCA9548, 0x75, 5} } }, \
-				{1, {{I2C_MUX_PCA9548, 0x75, 6} } }, \
-				{1, {{I2C_MUX_PCA9548, 0x75, 7} } }, \
-				}
-
-#define CONFIG_PCA953X
-
-#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN	1
-#define CONFIG_ZYNQ_EEPROM_BUS		5
-#define CONFIG_ZYNQ_GEM_EEPROM_ADDR	0x54
 
 #include <configs/xilinx_zynqmp.h>
 
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [U-Boot] [PATCH v2 5/7] arm64: zynqmp: Remove addresses for i2c controllers
  2019-02-05  9:55 [U-Boot] [PATCH v2 0/7] arm/arm64: i2c platform cleanup Michal Simek
                   ` (3 preceding siblings ...)
  2019-02-05  9:55 ` [U-Boot] [PATCH v2 4/7] arm64: zynqmp: Switch all platfroms to DM_I2C Michal Simek
@ 2019-02-05  9:55 ` Michal Simek
  2019-02-07  6:59   ` Heiko Schocher
  2019-02-05  9:55 ` [U-Boot] [PATCH v2 6/7] i2c: Remove ancient zynq_i2c driver Michal Simek
  2019-02-05  9:55 ` [U-Boot] [PATCH v2 7/7] xilinx: common: Remove !DM_i2C code for reading mac from eeprom Michal Simek
  6 siblings, 1 reply; 15+ messages in thread
From: Michal Simek @ 2019-02-05  9:55 UTC (permalink / raw)
  To: u-boot

All platforms have been converted to DM that's why there is no reason to
keep addresses in headers. They are all read from DT now.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---

Changes in v2: None

 arch/arm/mach-zynqmp/include/mach/hardware.h | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/arch/arm/mach-zynqmp/include/mach/hardware.h b/arch/arm/mach-zynqmp/include/mach/hardware.h
index efb4bba4b8c2..a0d776166d02 100644
--- a/arch/arm/mach-zynqmp/include/mach/hardware.h
+++ b/arch/arm/mach-zynqmp/include/mach/hardware.h
@@ -7,9 +7,6 @@
 #ifndef _ASM_ARCH_HARDWARE_H
 #define _ASM_ARCH_HARDWARE_H
 
-#define ZYNQ_I2C_BASEADDR0	0xFF020000
-#define ZYNQ_I2C_BASEADDR1	0xFF030000
-
 #define ARASAN_NAND_BASEADDR	0xFF100000
 
 #define ZYNQMP_TCM_BASE_ADDR	0xFFE00000
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [U-Boot] [PATCH v2 6/7] i2c: Remove ancient zynq_i2c driver
  2019-02-05  9:55 [U-Boot] [PATCH v2 0/7] arm/arm64: i2c platform cleanup Michal Simek
                   ` (4 preceding siblings ...)
  2019-02-05  9:55 ` [U-Boot] [PATCH v2 5/7] arm64: zynqmp: Remove addresses for i2c controllers Michal Simek
@ 2019-02-05  9:55 ` Michal Simek
  2019-02-07  7:02   ` Heiko Schocher
  2019-02-05  9:55 ` [U-Boot] [PATCH v2 7/7] xilinx: common: Remove !DM_i2C code for reading mac from eeprom Michal Simek
  6 siblings, 1 reply; 15+ messages in thread
From: Michal Simek @ 2019-02-05  9:55 UTC (permalink / raw)
  To: u-boot

This driver is replaced by drivers/i2c/i2c-cdns.c DM based driver.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---

Changes in v2: None

 README                 |   5 -
 drivers/i2c/Kconfig    |  33 ------
 drivers/i2c/Makefile   |   1 -
 drivers/i2c/zynq_i2c.c | 313 -------------------------------------------------
 4 files changed, 352 deletions(-)
 delete mode 100644 drivers/i2c/zynq_i2c.c

diff --git a/README b/README
index b81500f6afdd..128734134b6b 100644
--- a/README
+++ b/README
@@ -1696,11 +1696,6 @@ The following options need to be configured:
 		  - CONFIG_SYS_OMAP24_I2C_SPEED4 speed channel 4
 		  - CONFIG_SYS_OMAP24_I2C_SLAVE4 slave addr channel 4
 
-		- drivers/i2c/zynq_i2c.c
-		  - activate this driver with CONFIG_SYS_I2C_ZYNQ
-		  - set CONFIG_SYS_I2C_ZYNQ_SPEED for speed setting
-		  - set CONFIG_SYS_I2C_ZYNQ_SLAVE for slave addr
-
 		- drivers/i2c/s3c24x0_i2c.c:
 		  - activate this driver with CONFIG_SYS_I2C_S3C24X0
 		  - This driver adds i2c buses (11 for Exynos5250, Exynos5420
diff --git a/drivers/i2c/Kconfig b/drivers/i2c/Kconfig
index d83afe4dc6e8..b6bc678091de 100644
--- a/drivers/i2c/Kconfig
+++ b/drivers/i2c/Kconfig
@@ -456,39 +456,6 @@ config SYS_I2C_XILINX_XIIC
 	help
 	  Support for Xilinx AXI I2C controller.
 
-config SYS_I2C_ZYNQ
-	bool "Xilinx I2C driver"
-	depends on ARCH_ZYNQMP || ARCH_ZYNQ
-	depends on !DM_I2C
-	help
-	  Support for Xilinx I2C controller.
-
-config SYS_I2C_ZYNQ_SLAVE
-	hex "Set slave addr"
-	depends on SYS_I2C_ZYNQ
-	default 0
-	help
-	  Set CONFIG_SYS_I2C_ZYNQ_SLAVE for slave addr.
-
-config SYS_I2C_ZYNQ_SPEED
-	int "Set I2C speed"
-	depends on SYS_I2C_ZYNQ
-	default 100000
-	help
-	  Set CONFIG_SYS_I2C_ZYNQ_SPEED for speed setting.
-
-config ZYNQ_I2C0
-	bool "Xilinx I2C0 controller"
-	depends on SYS_I2C_ZYNQ
-	help
-	  Enable Xilinx I2C0 controller.
-
-config ZYNQ_I2C1
-	bool "Xilinx I2C1 controller"
-	depends on SYS_I2C_ZYNQ
-	help
-	  Enable Xilinx I2C1 controller.
-
 config SYS_I2C_IHS
         bool "gdsys IHS I2C driver"
         depends on DM_I2C
diff --git a/drivers/i2c/Makefile b/drivers/i2c/Makefile
index ec2d1964c32e..dc40055efb31 100644
--- a/drivers/i2c/Makefile
+++ b/drivers/i2c/Makefile
@@ -38,7 +38,6 @@ obj-$(CONFIG_SYS_I2C_UNIPHIER) += i2c-uniphier.o
 obj-$(CONFIG_SYS_I2C_UNIPHIER_F) += i2c-uniphier-f.o
 obj-$(CONFIG_SYS_I2C_VERSATILE) += i2c-versatile.o
 obj-$(CONFIG_SYS_I2C_XILINX_XIIC) += xilinx_xiic.o
-obj-$(CONFIG_SYS_I2C_ZYNQ) += zynq_i2c.o
 obj-$(CONFIG_TEGRA186_BPMP_I2C) += tegra186_bpmp_i2c.o
 
 obj-$(CONFIG_I2C_MUX) += muxes/
diff --git a/drivers/i2c/zynq_i2c.c b/drivers/i2c/zynq_i2c.c
deleted file mode 100644
index da25067c21fd..000000000000
--- a/drivers/i2c/zynq_i2c.c
+++ /dev/null
@@ -1,313 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0+
-/*
- * Driver for the Zynq-7000 PS I2C controller
- * IP from Cadence (ID T-CS-PE-0007-100, Version R1p10f2)
- *
- * Author: Joe Hershberger <joe.hershberger@ni.com>
- * Copyright (c) 2012 Joe Hershberger.
- *
- * Copyright (c) 2012-2013 Xilinx, Michal Simek
- *
- * NOTE: This driver should be converted to driver model before June 2017.
- * Please see doc/driver-model/i2c-howto.txt for instructions.
- */
-
-#include <common.h>
-#include <asm/io.h>
-#include <i2c.h>
-#include <linux/errno.h>
-#include <asm/arch/hardware.h>
-
-/* i2c register set */
-struct zynq_i2c_registers {
-	u32 control;
-	u32 status;
-	u32 address;
-	u32 data;
-	u32 interrupt_status;
-	u32 transfer_size;
-	u32 slave_mon_pause;
-	u32 time_out;
-	u32 interrupt_mask;
-	u32 interrupt_enable;
-	u32 interrupt_disable;
-};
-
-/* Control register fields */
-#define ZYNQ_I2C_CONTROL_RW		0x00000001
-#define ZYNQ_I2C_CONTROL_MS		0x00000002
-#define ZYNQ_I2C_CONTROL_NEA		0x00000004
-#define ZYNQ_I2C_CONTROL_ACKEN		0x00000008
-#define ZYNQ_I2C_CONTROL_HOLD		0x00000010
-#define ZYNQ_I2C_CONTROL_SLVMON		0x00000020
-#define ZYNQ_I2C_CONTROL_CLR_FIFO	0x00000040
-#define ZYNQ_I2C_CONTROL_DIV_B_SHIFT	8
-#define ZYNQ_I2C_CONTROL_DIV_B_MASK	0x00003F00
-#define ZYNQ_I2C_CONTROL_DIV_A_SHIFT	14
-#define ZYNQ_I2C_CONTROL_DIV_A_MASK	0x0000C000
-
-/* Status register values */
-#define ZYNQ_I2C_STATUS_RXDV	0x00000020
-#define ZYNQ_I2C_STATUS_TXDV	0x00000040
-#define ZYNQ_I2C_STATUS_RXOVF	0x00000080
-#define ZYNQ_I2C_STATUS_BA	0x00000100
-
-/* Interrupt register fields */
-#define ZYNQ_I2C_INTERRUPT_COMP		0x00000001
-#define ZYNQ_I2C_INTERRUPT_DATA		0x00000002
-#define ZYNQ_I2C_INTERRUPT_NACK		0x00000004
-#define ZYNQ_I2C_INTERRUPT_TO		0x00000008
-#define ZYNQ_I2C_INTERRUPT_SLVRDY	0x00000010
-#define ZYNQ_I2C_INTERRUPT_RXOVF	0x00000020
-#define ZYNQ_I2C_INTERRUPT_TXOVF	0x00000040
-#define ZYNQ_I2C_INTERRUPT_RXUNF	0x00000080
-#define ZYNQ_I2C_INTERRUPT_ARBLOST	0x00000200
-
-#define ZYNQ_I2C_FIFO_DEPTH		16
-#define ZYNQ_I2C_TRANSFERT_SIZE_MAX	255 /* Controller transfer limit */
-
-static struct zynq_i2c_registers *i2c_select(struct i2c_adapter *adap)
-{
-	return adap->hwadapnr ?
-		/* Zynq PS I2C1 */
-		(struct zynq_i2c_registers *)ZYNQ_I2C_BASEADDR1 :
-		/* Zynq PS I2C0 */
-		(struct zynq_i2c_registers *)ZYNQ_I2C_BASEADDR0;
-}
-
-/* I2C init called by cmd_i2c when doing 'i2c reset'. */
-static void zynq_i2c_init(struct i2c_adapter *adap, int requested_speed,
-			  int slaveadd)
-{
-	struct zynq_i2c_registers *zynq_i2c = i2c_select(adap);
-
-	/* 111MHz / ( (3 * 17) * 22 ) = ~100KHz */
-	writel((16 << ZYNQ_I2C_CONTROL_DIV_B_SHIFT) |
-		(2 << ZYNQ_I2C_CONTROL_DIV_A_SHIFT), &zynq_i2c->control);
-
-	/* Enable master mode, ack, and 7-bit addressing */
-	setbits_le32(&zynq_i2c->control, ZYNQ_I2C_CONTROL_MS |
-		ZYNQ_I2C_CONTROL_ACKEN | ZYNQ_I2C_CONTROL_NEA);
-}
-
-#ifdef DEBUG
-static void zynq_i2c_debug_status(struct zynq_i2c_registers *zynq_i2c)
-{
-	int int_status;
-	int status;
-	int_status = readl(&zynq_i2c->interrupt_status);
-
-	status = readl(&zynq_i2c->status);
-	if (int_status || status) {
-		debug("Status: ");
-		if (int_status & ZYNQ_I2C_INTERRUPT_COMP)
-			debug("COMP ");
-		if (int_status & ZYNQ_I2C_INTERRUPT_DATA)
-			debug("DATA ");
-		if (int_status & ZYNQ_I2C_INTERRUPT_NACK)
-			debug("NACK ");
-		if (int_status & ZYNQ_I2C_INTERRUPT_TO)
-			debug("TO ");
-		if (int_status & ZYNQ_I2C_INTERRUPT_SLVRDY)
-			debug("SLVRDY ");
-		if (int_status & ZYNQ_I2C_INTERRUPT_RXOVF)
-			debug("RXOVF ");
-		if (int_status & ZYNQ_I2C_INTERRUPT_TXOVF)
-			debug("TXOVF ");
-		if (int_status & ZYNQ_I2C_INTERRUPT_RXUNF)
-			debug("RXUNF ");
-		if (int_status & ZYNQ_I2C_INTERRUPT_ARBLOST)
-			debug("ARBLOST ");
-		if (status & ZYNQ_I2C_STATUS_RXDV)
-			debug("RXDV ");
-		if (status & ZYNQ_I2C_STATUS_TXDV)
-			debug("TXDV ");
-		if (status & ZYNQ_I2C_STATUS_RXOVF)
-			debug("RXOVF ");
-		if (status & ZYNQ_I2C_STATUS_BA)
-			debug("BA ");
-		debug("TS%d ", readl(&zynq_i2c->transfer_size));
-		debug("\n");
-	}
-}
-#endif
-
-/* Wait for an interrupt */
-static u32 zynq_i2c_wait(struct zynq_i2c_registers *zynq_i2c, u32 mask)
-{
-	int timeout, int_status;
-
-	for (timeout = 0; timeout < 100; timeout++) {
-		udelay(100);
-		int_status = readl(&zynq_i2c->interrupt_status);
-		if (int_status & mask)
-			break;
-	}
-#ifdef DEBUG
-	zynq_i2c_debug_status(zynq_i2c);
-#endif
-	/* Clear interrupt status flags */
-	writel(int_status & mask, &zynq_i2c->interrupt_status);
-
-	return int_status & mask;
-}
-
-/*
- * I2C probe called by cmd_i2c when doing 'i2c probe'.
- * Begin read, nak data byte, end.
- */
-static int zynq_i2c_probe(struct i2c_adapter *adap, u8 dev)
-{
-	struct zynq_i2c_registers *zynq_i2c = i2c_select(adap);
-
-	/* Attempt to read a byte */
-	setbits_le32(&zynq_i2c->control, ZYNQ_I2C_CONTROL_CLR_FIFO |
-		ZYNQ_I2C_CONTROL_RW);
-	clrbits_le32(&zynq_i2c->control, ZYNQ_I2C_CONTROL_HOLD);
-	writel(0xFF, &zynq_i2c->interrupt_status);
-	writel(dev, &zynq_i2c->address);
-	writel(1, &zynq_i2c->transfer_size);
-
-	return (zynq_i2c_wait(zynq_i2c, ZYNQ_I2C_INTERRUPT_COMP |
-		ZYNQ_I2C_INTERRUPT_NACK) &
-		ZYNQ_I2C_INTERRUPT_COMP) ? 0 : -ETIMEDOUT;
-}
-
-/*
- * I2C read called by cmd_i2c when doing 'i2c read' and by cmd_eeprom.c
- * Begin write, send address byte(s), begin read, receive data bytes, end.
- */
-static int zynq_i2c_read(struct i2c_adapter *adap, u8 dev, uint addr,
-			 int alen, u8 *data, int length)
-{
-	u32 status;
-	u32 i = 0;
-	u8 *cur_data = data;
-	struct zynq_i2c_registers *zynq_i2c = i2c_select(adap);
-
-	/* Check the hardware can handle the requested bytes */
-	if ((length < 0) || (length > ZYNQ_I2C_TRANSFERT_SIZE_MAX))
-		return -EINVAL;
-
-	/* Write the register address */
-	setbits_le32(&zynq_i2c->control, ZYNQ_I2C_CONTROL_CLR_FIFO |
-		ZYNQ_I2C_CONTROL_HOLD);
-	/*
-	 * Temporarily disable restart (by clearing hold)
-	 * It doesn't seem to work.
-	 */
-	clrbits_le32(&zynq_i2c->control, ZYNQ_I2C_CONTROL_HOLD);
-	writel(0xFF, &zynq_i2c->interrupt_status);
-	if (alen) {
-		clrbits_le32(&zynq_i2c->control, ZYNQ_I2C_CONTROL_RW);
-		writel(dev, &zynq_i2c->address);
-		while (alen--)
-			writel(addr >> (8 * alen), &zynq_i2c->data);
-
-		/* Wait for the address to be sent */
-		if (!zynq_i2c_wait(zynq_i2c, ZYNQ_I2C_INTERRUPT_COMP)) {
-			/* Release the bus */
-			clrbits_le32(&zynq_i2c->control, ZYNQ_I2C_CONTROL_HOLD);
-			return -ETIMEDOUT;
-		}
-		debug("Device acked address\n");
-	}
-
-	setbits_le32(&zynq_i2c->control, ZYNQ_I2C_CONTROL_CLR_FIFO |
-		ZYNQ_I2C_CONTROL_RW);
-	/* Start reading data */
-	writel(dev, &zynq_i2c->address);
-	writel(length, &zynq_i2c->transfer_size);
-
-	/* Wait for data */
-	do {
-		status = zynq_i2c_wait(zynq_i2c, ZYNQ_I2C_INTERRUPT_COMP |
-			ZYNQ_I2C_INTERRUPT_DATA);
-		if (!status) {
-			/* Release the bus */
-			clrbits_le32(&zynq_i2c->control, ZYNQ_I2C_CONTROL_HOLD);
-			return -ETIMEDOUT;
-		}
-		debug("Read %d bytes\n",
-		      length - readl(&zynq_i2c->transfer_size));
-		for (; i < length - readl(&zynq_i2c->transfer_size); i++)
-			*(cur_data++) = readl(&zynq_i2c->data);
-	} while (readl(&zynq_i2c->transfer_size) != 0);
-	/* All done... release the bus */
-	clrbits_le32(&zynq_i2c->control, ZYNQ_I2C_CONTROL_HOLD);
-
-#ifdef DEBUG
-	zynq_i2c_debug_status(zynq_i2c);
-#endif
-	return 0;
-}
-
-/*
- * I2C write called by cmd_i2c when doing 'i2c write' and by cmd_eeprom.c
- * Begin write, send address byte(s), send data bytes, end.
- */
-static int zynq_i2c_write(struct i2c_adapter *adap, u8 dev, uint addr,
-			  int alen, u8 *data, int length)
-{
-	u8 *cur_data = data;
-	struct zynq_i2c_registers *zynq_i2c = i2c_select(adap);
-
-	/* Write the register address */
-	setbits_le32(&zynq_i2c->control, ZYNQ_I2C_CONTROL_CLR_FIFO |
-		ZYNQ_I2C_CONTROL_HOLD);
-	clrbits_le32(&zynq_i2c->control, ZYNQ_I2C_CONTROL_RW);
-	writel(0xFF, &zynq_i2c->interrupt_status);
-	writel(dev, &zynq_i2c->address);
-	if (alen) {
-		while (alen--)
-			writel(addr >> (8 * alen), &zynq_i2c->data);
-		/* Start the tranfer */
-		if (!zynq_i2c_wait(zynq_i2c, ZYNQ_I2C_INTERRUPT_COMP)) {
-			/* Release the bus */
-			clrbits_le32(&zynq_i2c->control, ZYNQ_I2C_CONTROL_HOLD);
-			return -ETIMEDOUT;
-		}
-		debug("Device acked address\n");
-	}
-
-	while (length--) {
-		writel(*(cur_data++), &zynq_i2c->data);
-		if (readl(&zynq_i2c->transfer_size) == ZYNQ_I2C_FIFO_DEPTH) {
-			if (!zynq_i2c_wait(zynq_i2c, ZYNQ_I2C_INTERRUPT_COMP)) {
-				/* Release the bus */
-				clrbits_le32(&zynq_i2c->control,
-					     ZYNQ_I2C_CONTROL_HOLD);
-				return -ETIMEDOUT;
-			}
-		}
-	}
-
-	/* All done... release the bus */
-	clrbits_le32(&zynq_i2c->control, ZYNQ_I2C_CONTROL_HOLD);
-	/* Wait for the address and data to be sent */
-	if (!zynq_i2c_wait(zynq_i2c, ZYNQ_I2C_INTERRUPT_COMP))
-		return -ETIMEDOUT;
-	return 0;
-}
-
-static unsigned int zynq_i2c_set_bus_speed(struct i2c_adapter *adap,
-			unsigned int speed)
-{
-	if (speed != 1000000)
-		return -EINVAL;
-
-	return 0;
-}
-
-#ifdef CONFIG_ZYNQ_I2C0
-U_BOOT_I2C_ADAP_COMPLETE(zynq_0, zynq_i2c_init, zynq_i2c_probe, zynq_i2c_read,
-			 zynq_i2c_write, zynq_i2c_set_bus_speed,
-			 CONFIG_SYS_I2C_ZYNQ_SPEED, CONFIG_SYS_I2C_ZYNQ_SLAVE,
-			 0)
-#endif
-#ifdef CONFIG_ZYNQ_I2C1
-U_BOOT_I2C_ADAP_COMPLETE(zynq_1, zynq_i2c_init, zynq_i2c_probe, zynq_i2c_read,
-			 zynq_i2c_write, zynq_i2c_set_bus_speed,
-			 CONFIG_SYS_I2C_ZYNQ_SPEED, CONFIG_SYS_I2C_ZYNQ_SLAVE,
-			 1)
-#endif
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [U-Boot] [PATCH v2 7/7] xilinx: common: Remove !DM_i2C code for reading mac from eeprom
  2019-02-05  9:55 [U-Boot] [PATCH v2 0/7] arm/arm64: i2c platform cleanup Michal Simek
                   ` (5 preceding siblings ...)
  2019-02-05  9:55 ` [U-Boot] [PATCH v2 6/7] i2c: Remove ancient zynq_i2c driver Michal Simek
@ 2019-02-05  9:55 ` Michal Simek
  2019-02-07  7:03   ` Heiko Schocher
  6 siblings, 1 reply; 15+ messages in thread
From: Michal Simek @ 2019-02-05  9:55 UTC (permalink / raw)
  To: u-boot

All platforms are converted to DM_I2C that's why there is no reason to
keep this code here.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---

Changes in v2:
- Add dependency

 board/xilinx/common/board.c | 19 -------------------
 configs/zynq_zybo_defconfig |  1 -
 drivers/misc/Kconfig        |  1 +
 3 files changed, 1 insertion(+), 20 deletions(-)

diff --git a/board/xilinx/common/board.c b/board/xilinx/common/board.c
index b14f530c72c5..7e6340bad6d4 100644
--- a/board/xilinx/common/board.c
+++ b/board/xilinx/common/board.c
@@ -8,24 +8,6 @@
 #include <dm/uclass.h>
 #include <i2c.h>
 
-#if !defined(CONFIG_DM_I2C)
-int zynq_board_read_rom_ethaddr(unsigned char *ethaddr)
-{
-#if defined(CONFIG_ZYNQ_GEM_EEPROM_ADDR) && \
-    defined(CONFIG_ZYNQ_GEM_I2C_MAC_OFFSET) && \
-    defined(CONFIG_ZYNQ_EEPROM_BUS)
-	i2c_set_bus_num(CONFIG_ZYNQ_EEPROM_BUS);
-
-	if (eeprom_read(CONFIG_ZYNQ_GEM_EEPROM_ADDR,
-			CONFIG_ZYNQ_GEM_I2C_MAC_OFFSET,
-			ethaddr, 6))
-		printf("I2C EEPROM MAC address read failed\n");
-#endif
-
-	return 0;
-}
-
-#else
 int zynq_board_read_rom_ethaddr(unsigned char *ethaddr)
 {
 	int ret = -EINVAL;
@@ -54,4 +36,3 @@ int zynq_board_read_rom_ethaddr(unsigned char *ethaddr)
 
 	return ret;
 }
-#endif
diff --git a/configs/zynq_zybo_defconfig b/configs/zynq_zybo_defconfig
index 64b635bfd68b..4ba329cd92bd 100644
--- a/configs/zynq_zybo_defconfig
+++ b/configs/zynq_zybo_defconfig
@@ -39,7 +39,6 @@ CONFIG_DFU_RAM=y
 CONFIG_FPGA_XILINX=y
 CONFIG_FPGA_ZYNQPL=y
 CONFIG_DM_GPIO=y
-CONFIG_ZYNQ_GEM_I2C_MAC_OFFSET=0xFA
 CONFIG_MMC_SDHCI=y
 CONFIG_MMC_SDHCI_ZYNQ=y
 CONFIG_SPI_FLASH=y
diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig
index 704c8dd1955f..d6e677fba847 100644
--- a/drivers/misc/Kconfig
+++ b/drivers/misc/Kconfig
@@ -245,6 +245,7 @@ config SPL_I2C_EEPROM
 config ZYNQ_GEM_I2C_MAC_OFFSET
 	hex "Set the I2C MAC offset"
 	default 0x0
+	depends on DM_I2C
 	help
 	  Set the MAC offset for i2C.
 
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [U-Boot] [PATCH v2 1/7] ARM: zynq: Convert Syzygy to DM_I2C
  2019-02-05  9:55 ` [U-Boot] [PATCH v2 1/7] ARM: zynq: Convert Syzygy to DM_I2C Michal Simek
@ 2019-02-07  6:56   ` Heiko Schocher
  0 siblings, 0 replies; 15+ messages in thread
From: Heiko Schocher @ 2019-02-07  6:56 UTC (permalink / raw)
  To: u-boot

Hello Michal,

Am 05.02.2019 um 10:55 schrieb Michal Simek:
> Boards have only one controller enabled that's why move to DM_I2C is
> easy.
> Add also i2c alias for not to be shown as i2c bus -1 because alias
> doesn't exist.
> Config file points to MAC stored in eeprom but it is not listed that's
> why I have added 24c08 part.
> 
> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
> ---
> 
> Changes in v2:
> - Extract Syzygy from Topic
> - Add eeprom to i2c - needs to be checked by Syzygy team if this is
>    correct
> 
>   arch/arm/dts/zynq-syzygy-hub.dts | 6 ++++++
>   configs/syzygy_hub_defconfig     | 5 ++---
>   include/configs/syzygy_hub.h     | 4 ----
>   3 files changed, 8 insertions(+), 7 deletions(-)

Reviewed-by: Heiko Schocher <hs@denx.de>

bye,
Heiko
-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-52   Fax: +49-8142-66989-80   Email: hs at denx.de

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [U-Boot] [PATCH v2 2/7] ARM: zynq: Convert dlc20 and zc70x board to DM_I2C
  2019-02-05  9:55 ` [U-Boot] [PATCH v2 2/7] ARM: zynq: Convert dlc20 and zc70x board " Michal Simek
@ 2019-02-07  6:56   ` Heiko Schocher
  0 siblings, 0 replies; 15+ messages in thread
From: Heiko Schocher @ 2019-02-07  6:56 UTC (permalink / raw)
  To: u-boot

Hello Michal,

Am 05.02.2019 um 10:55 schrieb Michal Simek:
> All these board have also eeprom enabled that's why it is also enabled
> via defconfig.
> There is also no need to have zc70x specific config file that's why also
> remove it.
> 
> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
> ---
> 
> Changes in v2: None
> 
>   configs/zynq_dlc20_rev1_0_defconfig |  9 ++++++---
>   configs/zynq_zc702_defconfig        | 10 ++++++----
>   configs/zynq_zc706_defconfig        | 10 ++++++----
>   include/configs/zynq-common.h       | 14 --------------
>   include/configs/zynq_zc70x.h        | 16 ----------------
>   5 files changed, 18 insertions(+), 41 deletions(-)
>   delete mode 100644 include/configs/zynq_zc70x.h

Reviewed-by: Heiko Schocher <hs@denx.de>

bye,
Heiko
-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-52   Fax: +49-8142-66989-80   Email: hs at denx.de

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [U-Boot] [PATCH v2 3/7] ARM: zynq: Remove addresses for i2c controllers
  2019-02-05  9:55 ` [U-Boot] [PATCH v2 3/7] ARM: zynq: Remove addresses for i2c controllers Michal Simek
@ 2019-02-07  6:57   ` Heiko Schocher
  0 siblings, 0 replies; 15+ messages in thread
From: Heiko Schocher @ 2019-02-07  6:57 UTC (permalink / raw)
  To: u-boot

Hello Michal,

Am 05.02.2019 um 10:55 schrieb Michal Simek:
> All platforms have been converted to DM that's why there is no reason to
> keep addresses in headers. They are all read from DT now.
> 
> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
> ---
> 
> Changes in v2: None
> 
>   arch/arm/mach-zynq/include/mach/hardware.h | 2 --
>   1 file changed, 2 deletions(-)
> 

Reviewed-by: Heiko Schocher <hs@denx.de>

bye,
Heiko

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-52   Fax: +49-8142-66989-80   Email: hs at denx.de

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [U-Boot] [PATCH v2 4/7] arm64: zynqmp: Switch all platfroms to DM_I2C
  2019-02-05  9:55 ` [U-Boot] [PATCH v2 4/7] arm64: zynqmp: Switch all platfroms to DM_I2C Michal Simek
@ 2019-02-07  6:58   ` Heiko Schocher
  0 siblings, 0 replies; 15+ messages in thread
From: Heiko Schocher @ 2019-02-07  6:58 UTC (permalink / raw)
  To: u-boot

Hello Michal,

Am 05.02.2019 um 10:55 schrieb Michal Simek:
> CONFIG_PCA953X is not needed because of PCA953X is integrated in gpio
> subsystem already. That's why also remove CMD_PCA953X which is only for
> this driver.
> 
> zcu102/zcu104-revC/zcu106/zcu111 contain links to eeprom which stores MAC address.
> 
> DM_I2C is not enabled for the whole SoC because it increase size for
> mini configurations and there is no I2C symbol present to setup
> dependencies.
> 
> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
> ---
> 
> Changes in v2: None
> 
>   arch/arm/dts/zynqmp-zcu102-revA.dts           |  1 +
>   arch/arm/dts/zynqmp-zcu104-revC.dts           |  1 +
>   arch/arm/dts/zynqmp-zcu106-revA.dts           |  1 +
>   arch/arm/dts/zynqmp-zcu111-revA.dts           |  1 +
>   configs/avnet_ultra96_rev1_defconfig          |  6 ++++--
>   configs/xilinx_zynqmp_zcu100_revC_defconfig   |  6 ++++--
>   configs/xilinx_zynqmp_zcu102_rev1_0_defconfig | 12 ++++++-----
>   configs/xilinx_zynqmp_zcu102_revA_defconfig   | 13 ++++++-----
>   configs/xilinx_zynqmp_zcu102_revB_defconfig   | 13 ++++++-----
>   configs/xilinx_zynqmp_zcu104_revA_defconfig   | 11 ++++++----
>   configs/xilinx_zynqmp_zcu104_revC_defconfig   | 11 ++++++----
>   configs/xilinx_zynqmp_zcu106_revA_defconfig   | 12 ++++++-----
>   configs/xilinx_zynqmp_zcu111_revA_defconfig   | 12 ++++++-----
>   include/configs/xilinx_zynqmp.h               |  5 -----
>   include/configs/xilinx_zynqmp_zcu100.h        | 15 -------------
>   include/configs/xilinx_zynqmp_zcu102.h        | 29 -------------------------
>   include/configs/xilinx_zynqmp_zcu104.h        | 17 ---------------
>   include/configs/xilinx_zynqmp_zcu104_revC.h   |  3 ---
>   include/configs/xilinx_zynqmp_zcu106.h        | 28 ------------------------
>   include/configs/xilinx_zynqmp_zcu111.h        | 31 ---------------------------
>   20 files changed, 63 insertions(+), 165 deletions(-)

Reviewed-by: Heiko Schocher <hs@denx.de>

bye,
Heiko

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-52   Fax: +49-8142-66989-80   Email: hs at denx.de

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [U-Boot] [PATCH v2 5/7] arm64: zynqmp: Remove addresses for i2c controllers
  2019-02-05  9:55 ` [U-Boot] [PATCH v2 5/7] arm64: zynqmp: Remove addresses for i2c controllers Michal Simek
@ 2019-02-07  6:59   ` Heiko Schocher
  0 siblings, 0 replies; 15+ messages in thread
From: Heiko Schocher @ 2019-02-07  6:59 UTC (permalink / raw)
  To: u-boot

Hello Michal,

Am 05.02.2019 um 10:55 schrieb Michal Simek:
> All platforms have been converted to DM that's why there is no reason to
> keep addresses in headers. They are all read from DT now.
> 
> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
> ---
> 
> Changes in v2: None
> 
>   arch/arm/mach-zynqmp/include/mach/hardware.h | 3 ---
>   1 file changed, 3 deletions(-)
Reviewed-by: Heiko Schocher <hs@denx.de>

bye,
Heiko

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-52   Fax: +49-8142-66989-80   Email: hs at denx.de

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [U-Boot] [PATCH v2 6/7] i2c: Remove ancient zynq_i2c driver
  2019-02-05  9:55 ` [U-Boot] [PATCH v2 6/7] i2c: Remove ancient zynq_i2c driver Michal Simek
@ 2019-02-07  7:02   ` Heiko Schocher
  0 siblings, 0 replies; 15+ messages in thread
From: Heiko Schocher @ 2019-02-07  7:02 UTC (permalink / raw)
  To: u-boot

Hello Michal,

Am 05.02.2019 um 10:55 schrieb Michal Simek:
> This driver is replaced by drivers/i2c/i2c-cdns.c DM based driver.
> 
> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
> ---
> 
> Changes in v2: None
> 
>   README                 |   5 -
>   drivers/i2c/Kconfig    |  33 ------
>   drivers/i2c/Makefile   |   1 -
>   drivers/i2c/zynq_i2c.c | 313 -------------------------------------------------
>   4 files changed, 352 deletions(-)
>   delete mode 100644 drivers/i2c/zynq_i2c.c

Acked-by: Heiko Schocher <hs@denx.de>

Hmm.. this patchseries depends on
[1] https://lists.denx.de/pipermail/u-boot/2019-January/357172.html

which is in my ToDo list ... but I want to wait there for Simons
review ... so may it takes some time until [1] goes into mainline.

bye,
Heiko
-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-52   Fax: +49-8142-66989-80   Email: hs at denx.de

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [U-Boot] [PATCH v2 7/7] xilinx: common: Remove !DM_i2C code for reading mac from eeprom
  2019-02-05  9:55 ` [U-Boot] [PATCH v2 7/7] xilinx: common: Remove !DM_i2C code for reading mac from eeprom Michal Simek
@ 2019-02-07  7:03   ` Heiko Schocher
  0 siblings, 0 replies; 15+ messages in thread
From: Heiko Schocher @ 2019-02-07  7:03 UTC (permalink / raw)
  To: u-boot

Hello Michal,

Am 05.02.2019 um 10:55 schrieb Michal Simek:
> All platforms are converted to DM_I2C that's why there is no reason to
> keep this code here.
> 
> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
> ---
> 
> Changes in v2:
> - Add dependency
> 
>   board/xilinx/common/board.c | 19 -------------------
>   configs/zynq_zybo_defconfig |  1 -
>   drivers/misc/Kconfig        |  1 +
>   3 files changed, 1 insertion(+), 20 deletions(-)

Reviewed-by: Heiko Schocher <hs@denx.de>

bye,
Heiko

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-52   Fax: +49-8142-66989-80   Email: hs at denx.de

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2019-02-07  7:03 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-05  9:55 [U-Boot] [PATCH v2 0/7] arm/arm64: i2c platform cleanup Michal Simek
2019-02-05  9:55 ` [U-Boot] [PATCH v2 1/7] ARM: zynq: Convert Syzygy to DM_I2C Michal Simek
2019-02-07  6:56   ` Heiko Schocher
2019-02-05  9:55 ` [U-Boot] [PATCH v2 2/7] ARM: zynq: Convert dlc20 and zc70x board " Michal Simek
2019-02-07  6:56   ` Heiko Schocher
2019-02-05  9:55 ` [U-Boot] [PATCH v2 3/7] ARM: zynq: Remove addresses for i2c controllers Michal Simek
2019-02-07  6:57   ` Heiko Schocher
2019-02-05  9:55 ` [U-Boot] [PATCH v2 4/7] arm64: zynqmp: Switch all platfroms to DM_I2C Michal Simek
2019-02-07  6:58   ` Heiko Schocher
2019-02-05  9:55 ` [U-Boot] [PATCH v2 5/7] arm64: zynqmp: Remove addresses for i2c controllers Michal Simek
2019-02-07  6:59   ` Heiko Schocher
2019-02-05  9:55 ` [U-Boot] [PATCH v2 6/7] i2c: Remove ancient zynq_i2c driver Michal Simek
2019-02-07  7:02   ` Heiko Schocher
2019-02-05  9:55 ` [U-Boot] [PATCH v2 7/7] xilinx: common: Remove !DM_i2C code for reading mac from eeprom Michal Simek
2019-02-07  7:03   ` Heiko Schocher

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.