From 94b7100c4071ec0060d56faf2bd475898b5082d1 Mon Sep 17 00:00:00 2001 From: Michal Simek Date: Mon, 29 Feb 2016 14:18:08 +0100 Subject: [PATCH] ARM64: zynqmp: Remove incorrect 24c08 DT description 24c08 contains four 256B blocks which are addresses by last two bits. Linux at24 driver automatically detects number of addresses based on this algorithm. num_addresses = DIV_ROUND_UP(chip.byte_len, (chip.flags & AT24_FLAG_ADDR16) ? 65536 : 256); for 24c08 it is 4 addresses where driver create one regular device and 3 dummy devices. These dummy devices were causing problem when kernel tries to create another eeprom device on already allocated addresses which were in collision with dummy devices. Error log: [ 3.124001] i2c i2c-6: Failed to register i2c client 24c08 at 0x55 (-16) [ 3.124005] i2c i2c-6: of_i2c: Failure registering /amba/i2c@ff030000/i2cswitch@74/i2c@0/eeprom@55 [ 3.124012] i2c i2c-6: Failed to register i2c client 24c08 at 0x56 (-16) [ 3.124015] i2c i2c-6: of_i2c: Failure registering /amba/i2c@ff030000/i2cswitch@74/i2c@0/eeprom@56 [ 3.124022] i2c i2c-6: Failed to register i2c client 24c08 at 0x57 (-16) [ 3.124025] i2c i2c-6: of_i2c: Failure registering /amba/i2c@ff030000/i2cswitch@74/i2c@0/eeprom@57 This patch removes incorrect eeprom devices which were detect via U-Boot but it is same device with 4 blocks on 4 different addresses. Signed-off-by: Michal Simek --- arch/arm/dts/zynqmp-zcu102.dts | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/arch/arm/dts/zynqmp-zcu102.dts b/arch/arm/dts/zynqmp-zcu102.dts index a794ae24151..084408ced55 100644 --- a/arch/arm/dts/zynqmp-zcu102.dts +++ b/arch/arm/dts/zynqmp-zcu102.dts @@ -383,26 +383,18 @@ drivers/hwmon/pmbus/Makefile:11:obj-$(CONFIG_SENSORS_MAX20751) += max20751.o #address-cells = <1>; #size-cells = <0>; reg = <0>; - /* IIC_EEPROM */ + /* + * IIC_EEPROM 1kB memory which uses 256B blocks + * where every block has different address. + * 0 - 256B address 0x54 + * 256B - 512B address 0x55 + * 512B - 768B address 0x56 + * 768B - 1024B address 0x57 + */ eeprom@54 { /* u23 */ compatible = "at,24c08"; reg = <0x54>; }; - - eeprom@55 { /* u-boot detection */ - compatible = "at,24c08"; - reg = <0x55>; - }; - - eeprom@56 { /* u-boot detection */ - compatible = "at,24c08"; - reg = <0x56>; - }; - - eeprom@57 { /* u-boot detection */ - compatible = "at,24c08"; - reg = <0x57>; - }; }; i2c@1 { /* i2c mw 74 0 2 */ #address-cells = <1>; -- 2.47.3