[U-Boot] [PATCH v2 07/12] sunxi: Add i2c support
Hans de Goede
hdegoede at redhat.com
Mon Jun 9 16:48:18 CEST 2014
Hi,
On 06/04/2014 06:34 AM, Heiko Schocher wrote:
> Hello Hans,
>
> Am 03.06.2014 21:41, schrieb Hans de Goede:
>> Add support for the i2c controller found on all Allwinner sunxi SoCs,
>> this is the same controller as found on the Marvell orion5x and kirkwood
>> SoC families, with a slightly different register layout, so this patch uses
>> the existing mvtwsi code.
>>
>> Signed-off-by: Hans de Goede<hdegoede at redhat.com>
>> Acked-by: Ian Campbell<ijc at hellion.org.uk>
>> ---
>> arch/arm/cpu/armv7/sunxi/board.c | 6 ++++++
>> arch/arm/include/asm/arch-sunxi/i2c.h | 15 +++++++++++++++
>> board/sunxi/board.c | 7 +++++++
>> drivers/i2c/Makefile | 1 +
>> drivers/i2c/mvtwsi.c | 18 ++++++++++++++++++
>> include/configs/sunxi-common.h | 9 +++++++++
>> 6 files changed, 56 insertions(+)
>> create mode 100644 arch/arm/include/asm/arch-sunxi/i2c.h
> [...]
>> diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
>> index 1d1c87d..2db083c 100644
>> --- a/include/configs/sunxi-common.h
>> +++ b/include/configs/sunxi-common.h
>> @@ -161,6 +161,15 @@
>> #undef CONFIG_CMD_NET
>> #undef CONFIG_CMD_NFS
>>
>> +/* I2C */
>> +#define CONFIG_SPL_I2C_SUPPORT
>> +/* No CONFIG_SYS_I2C as we use the non converted mvtwsi driver */
>> +#define CONFIG_HARD_I2C
>
> NACK. Goal is to get rid of HARD_I2C define ... please convert this
> driver to fit with CONFIG_SYS_I2C framework.
> A fast look in this driver, this should not to be to hard, as this
> driver does not support multi busses...
>
> A good example for porting a i2c driver with no multibus support is:
>
> commit 0bdffe71fddeaa46768a39305797e4512dee0f15
> Author: Heiko Schocher <hs at denx.de>
> Date: Fri Nov 8 07:30:53 2013 +0100
>
> i2c, zynq: convert zynq i2c driver to new multibus/multiadapter framework
Ok, one patch converting the mvtwsi driver to CONFIG_SYS_I2C coming up.
Note I've tested this on multiple sunxi boards / SoC generations, but
I don't have any kirkwood or orion5x boards, so I cannot guarantee that
this patch won't cause regressions there (I've compile tested the patch
with kirkwood and orion5x board configs).
Regards,
Hans
More information about the U-Boot
mailing list