From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexander Kochetkov Date: Tue, 27 Feb 2018 00:48:29 +0300 Subject: [U-Boot] [PATCH v2] rockchip: i2c: enable new I2C controller for rk3066 and rk3188 In-Reply-To: <2C13E36B-BB13-4885-B8D1-C8E5FF683F02@theobroma-systems.com> References: <1519666974-26508-1-git-send-email-al.kochet@gmail.com> <2C13E36B-BB13-4885-B8D1-C8E5FF683F02@theobroma-systems.com> Message-ID: <92597331-B176-4C2F-A33D-AD8695827479@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit To: u-boot@lists.denx.de > 26 февр. 2018 г., в 23:26, Dr. Philipp Tomsich написал(а): > > 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.