[U-Boot] [PATCH v2] rockchip: i2c: enable new I2C controller for rk3066 and rk3188

Alexander Kochetkov al.kochet at gmail.com
Mon Feb 26 21:48:29 UTC 2018


> 26 февр. 2018 г., в 23:26, Dr. Philipp Tomsich <philipp.tomsich at theobroma-systems.com> написал(а):
> 
> I wonder if this is really necessary (or if there’s something going wrong in the
> device framework)…  The way I always understood our device framework was
> that if there’s a pinctrl associated with the DTS node, then it should get processed
> automatically during probing.

RKI2C0_SEL, RKI2C1_SEL and so on bits get updated by pinctrl_rk3188_i2c_config()
(drivers/pinctrl/rockchip/pinctrl_rk3188.c). The function is called by rk3188_pinctrl_request()
(rk3188 pinmux request method implementation) and by rk3188_pinctrl_set_state_simple()
(rk3188 pinmux set_state_simple implementation).

If CONFIG_PINCTRL_FULL is enabled, than pinctrl_select_state_full() will be used
by framework code to setup pinmux. It read pin description from DT and setup pins
using rk3188_pinctrl_set_state() (set_state implementation). rk3188_pinctrl_set_state()
doesn't update soc_con1 register.

If CONFIG_PINCTRL_FULL is not enabled, then pinctrl_select_state_simple() will be
used instead by framework code to setup pinmux. It do rk3188_pinctrl_set_state_simple()
request to pinmux driver which in turn calls pinctrl_rk3188_i2c_config().

In my code I do call to pinctrl_rk3188_i2c_config() using rk3188_pinctrl_request().

Regards,
Alexander.



More information about the U-Boot mailing list