From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E5C31C433EF for ; Tue, 10 May 2022 08:46:48 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 79C0C8427B; Tue, 10 May 2022 10:46:40 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1652172401; bh=YVZZKp3XpaI3aQI+eG/JCEXWS2C3LqTaaCskx6NeqeQ=; h=Subject:To:Cc:References:From:Date:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Reply-To:From; b=WZqAl5yux8G3Os6zBd2fZZkQlPxzx+NkNSTb2e3ZdEcbZ2NzOgcQKg9OSXscl1WfQ NFQ5USQCLD7Hl2gCMlZV6e3AqjROZK2noiv20B4m9H+qjhlL7PyS5ff46hCJOfPAm1 IX8YzDEpF0+qG1BvS7j8DQ1bZb+dpYSoh/a6Qz+G6XI0y/KM7lmJepQx1FDWSQckb8 DXQMpBYW/UMFUM1cQHV04jqh4VoIZsBJPxApGMXzFmFIilNqMrEWoSpmAgUa/0W5zR gt67iU7++Ug9RX+ynJgPAI3eQNYoIc0wyDcP6MueR6ddFmJk+tSqa5yot9f8tn22vN ZoZkWsfCJ6/vA== Received: from [192.168.1.107] (87-97-104-197.pool.digikabel.hu [87.97.104.197]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: hs@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id D0D5F84277; Tue, 10 May 2022 10:46:17 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1652172379; bh=YVZZKp3XpaI3aQI+eG/JCEXWS2C3LqTaaCskx6NeqeQ=; h=Reply-To:Subject:To:Cc:References:From:Date:In-Reply-To:From; b=r0YW/zRQpYH112jrp4xPOovehLJeNEhslOW5af4c1PjygHfEAGBt8W+TChoVTQByk wDWdqdMiJZOEOT9P0G5WK9Pzw73GCRCNBb/qnjl135d/ZYetnpazEdI7iq/m91OPsR k77W8kd3JqdBPKhdkpd454JqfsVWV+Uur7sXWXdiu97VFiLb5MSU6LTOKbEBeIRz84 hAxNtHtwNwsZRqouUbdZ5lSg88RA6C6CcauZOPLY2+maPX5GHxgjQLdJcwH0UWUiCL mvtx5JCrKmxZ9Tt8hYm6X3fqondT4T7LLJtDhDBHYUDoDr+60bAlGnFzBX+dbSIuNk F4US1D3pxLWFA== Subject: Re: [PATCH 1/2] misc: i2c_eeprom: add support for microchip 24aa025e48 To: Eugen.Hristev@microchip.com, michael@walle.cc Cc: rasmus.villemoes@prevas.dk, u-boot@lists.denx.de References: <20220429142212.233933-1-eugen.hristev@microchip.com> <20220502092425.2429380-1-michael@walle.cc> <5986757f-97a3-3f63-088a-c53cbe098a9e@microchip.com> From: Heiko Schocher Message-ID: <67aaeadf-c785-95b1-8771-b328aca781fe@denx.de> Date: Tue, 10 May 2022 10:46:27 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: <5986757f-97a3-3f63-088a-c53cbe098a9e@microchip.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: hs@denx.de Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean Hello Eugen, On 10.05.22 09:44, Eugen.Hristev@microchip.com wrote: > On 5/2/22 12:24 PM, Michael Walle wrote: >>> 24aa025e48 is a variant of 24aa02e48 that has a page size of 16 bytes. >>> >>> Signed-off-by: Eugen Hristev >>> --- >>> drivers/misc/i2c_eeprom.c | 8 ++++++++ >>> 1 file changed, 8 insertions(+) >>> >>> diff --git a/drivers/misc/i2c_eeprom.c b/drivers/misc/i2c_eeprom.c >>> index 89a450d0f8..265c1d0591 100644 >>> --- a/drivers/misc/i2c_eeprom.c >>> +++ b/drivers/misc/i2c_eeprom.c >>> @@ -176,6 +176,13 @@ static const struct i2c_eeprom_drv_data mc24aa02e48_data = { >>> .offset_len = 1, >>> }; >>> >>> +static const struct i2c_eeprom_drv_data mc24aa025e48_data = { >>> + .size = 256, >>> + .pagesize = 16, >>> + .addr_offset_mask = 0, >>> + .offset_len = 1, >>> +}; >>> + >>> static const struct i2c_eeprom_drv_data atmel24c01a_data = { >>> .size = 128, >>> .pagesize = 8, >>> @@ -264,6 +271,7 @@ static const struct i2c_eeprom_drv_data atmel24c512_data = { >>> static const struct udevice_id i2c_eeprom_std_ids[] = { >>> { .compatible = "i2c-eeprom", (ulong)&eeprom_data }, >>> { .compatible = "microchip,24aa02e48", (ulong)&mc24aa02e48_data }, >>> + { .compatible = "microchip,24aa025e48", (ulong)&mc24aa025e48_data }, >> >> As far as I can see, this is not a documented compatible string in the >> device tree bindings, which means u-boot is diverting again from its linux >> counterpart. (The same goes for the 24aa02e48). > > Hello Michael, > > I know. But I thought it was the best way rather than reusing one > existing compatible and forcing the page size. I can do that if you feel > it's better. > > I have to check how Linux is handling this eeprom as it's using the > at24c32 compatible which is incorrect. It may be that the at24c32 > compatible with additional properties makes the driver behaving as if > it's a mc23aa025e48 . Which is not really right... (as the idea above) > > Heiko, your thoughts ? Best would be to find out, what linux do. I think, you should have the same problem with linux? So I think, best would be to introduce this 2 compatible strings also in linux and add of course the correct settings for "24aa025e48". 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@denx.de