[PATCH 05/12] arm64: dts: Add I2C nodes for Hi3660

zhangfei zhangfei.gao at linaro.org
Tue May 23 19:34:09 PDT 2017


Hi, Jarkko

Would you mind give some suggestion?

On 2017年05月23日 20:48, Rob Herring wrote:
>
>>>> +                       compatible = "snps,designware-i2c";
>>> These should have an SoC specific compatible.
>> We directly use drivers/i2c/busses/i2c-designware-platdrv.c,
>> do we still an soc specific compatible?
> It's fine if the driver uses the snps compatible, but the dts should
> still have an SoC specific one.
>
>> Checked arch/arm64/boot/dts/amd/amd-seattle-soc.dtsi, and other examples,
>>
>> compatible = "snps,designware-i2c" is used.
> That was a mistake in the other platforms. We shouldn't continue repeating it.
>
> Rob

Rob suggest add something like "hisilicon,hi3660-dw-i2c" as well.
"The problem is dw-i2c does not give any clue as to what the 
configuration or version of the IP is.
Is that fully discoverable with version/capability registers? If not 
then you need a specific compatible.
Generally when we have not required them, it ends up being a problem 
later on."


While Documentation/devicetree/bindings/i2c/i2c-designware.txt
compatible : should be "snps,designware-i2c"

Besides, on Hikey960,
[    3.822353] dw_readl(dev, DW_IC_COMP_VERSION)=0x3132302a
[    3.827763] dw_readl(dev, DW_IC_COMP_TYPE)=0x44570140
Are these two registers enough to distinguish version etc?

Thanks




More information about the linux-arm-kernel mailing list