[U-Boot] [PATCH] arm: socfpga: Enable DM_I2C
Marek Vasut
marex at denx.de
Fri Mar 18 13:19:24 CET 2016
On 03/18/2016 01:16 PM, Stefan Roese wrote:
> On 18.03.2016 12:20, Marek Vasut wrote:
>> On 03/18/2016 08:55 AM, Stefan Roese wrote:
>>> The designware I2C driver now supports DM. So lets use it and enable
>>> DM_I2C for this platform per default.
>>>
>>> Signed-off-by: Stefan Roese <sr at denx.de>
>>> Cc: Marek Vasut <marex at denx.de>
>>> ---
>>> arch/arm/Kconfig | 1 +
>>> arch/arm/dts/socfpga.dtsi | 4 ++++
>>> include/configs/socfpga_common.h | 16 ----------------
>>> 3 files changed, 5 insertions(+), 16 deletions(-)
>>>
>>> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
>>> index e5f57ef..98c1f10 100644
>>> --- a/arch/arm/Kconfig
>>> +++ b/arch/arm/Kconfig
>>> @@ -516,6 +516,7 @@ config ARCH_SOCFPGA
>>> select DM
>>> select DM_SPI_FLASH
>>> select DM_SPI
>>> + select DM_I2C
>>>
>>> config TARGET_CM_T43
>>> bool "Support cm_t43"
>>> diff --git a/arch/arm/dts/socfpga.dtsi b/arch/arm/dts/socfpga.dtsi
>>> index 8588221..fe55722 100644
>>> --- a/arch/arm/dts/socfpga.dtsi
>>> +++ b/arch/arm/dts/socfpga.dtsi
>>> @@ -23,6 +23,10 @@
>>> spi0 = &qspi;
>>> spi1 = &spi0;
>>> spi2 = &spi1;
>>> + i2c0 = &i2c0;
>>> + i2c1 = &i2c1;
>>> + i2c2 = &i2c2;
>>> + i2c3 = &i2c3;
>>
>> Something tells me that you should be super-careful here, because some
>> socfpga boards actually do use i2c. But just adding the aliases here
>> without actually enabling the i2c via DT now will cause breakage.
>
> Right. But if the boards are also used in Linux and the dts is synced
> with the Linux one, then the I2C DT node should be enabled, right?
In theory, yes. I hope practice is in-line with theory here.
>> One way to solve it is to enable all four buses in socfpga-cyclone5.dtsi
>> but that's not something I find very appealing.
>
> I don't like it. In the Linux socpfga.dtsi the I2C DT nodes are also
> disabled per default. We should stay in sync here.
I agree with this.
>> The other is to keep the
>> patch this way and wait until someone complains his i2c is not working.
>>
>> What do you think ?
>
> Or we could move the aliases into the board specific dts files? I
> could start with the SR1500 board.
>
> What do you think?
The aliases are fine. It's the "status = "okay"" bit which I suspect
might be missing for some boards. But then, let's see if something
breaks, we should be able to find it before 2016.05 is out anyway.
--
Best regards,
Marek Vasut
More information about the U-Boot
mailing list