[U-Boot] [PATCH] rockchip: i2c: enable I2C inside GRF for rk3066 and rk3188

Alexander Kochetkov al.kochet at gmail.com
Mon Feb 26 11:06:47 UTC 2018


> 26 февр. 2018 г., в 12:43, Dr. Philipp Tomsich <philipp.tomsich at theobroma-systems.com> написал(а):
> 
> However, the GRF drivers first need to be cleaned up (i.e. the enums for the
> IOMUX definitions need to move into the pinctrl drivers), so only the structure
> definitions remain in the GRF drivers.
> 
> Some of this has happened lately for some of the more recent chips, but there
> hasn’t been a larger effort to do it:
> e.g. commit 301fff4e574d373a139dd47aceabc5b4259873da for the RK3328
> 
> It would be great if you’d pick this task up for the 3036 and 3188.

I'll do that.

One more note. grf_rk3188.h also contain GRF_SOC_CON bit definitions.
They also have to renamed for consistency and to avoid conflicts.
For example, RKI2C0_SEL_SHIFT to RK3188_RKI2C0_SEL_SHIFT.

grf_rk3036.h doesn’t contain GRF_SOC_CON bit definition at all.
And I don’t have rk3036 based board. I can find TRM for rk3036 and
make definitions, but I can’t be shoure they will be valid. But 
RKI2Cx_SEL_SHIFT is the same for both chips.

> From your description this sounds like a (secondary) reset-bit for the i2c controller.
> With a *-u-boot.dtsi, you could even model the GRF-offset and the bit-number via
> the device tree.  The only drawback from this is that resets are (not yet) automatically
> processed when probing the device in the driver model core implementation.

Actually it is impossible to reset I2C using that pin. So it is not reset logically.
And DT should be consistent between linux and u-boot, so adding reset node to
u-boot DT also require to add DT node to linux.

I think, It’s better to hide that thing inside driver and forget about it.

Regards,
Alexander.



More information about the U-Boot mailing list