[U-Boot] [PATCH v2 1/7] ARM: zynq: Convert Syzygy to DM_I2C

Michal Simek michal.simek at xilinx.com
Tue Feb 5 09:55:38 UTC 2019


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 at 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



More information about the U-Boot mailing list