diff options
author | Jun Chen <jun.chen@vatics.com> | 2020-03-02 16:58:57 +0800 |
---|---|---|
committer | Heiko Schocher <hs@denx.de> | 2020-03-16 08:04:29 +0100 |
commit | 27d483bfa34c1695c2be230efc50c52d5a3d04e2 (patch) | |
tree | 27231bf8b1963510c58bb7466231db6c5f745fa6 /drivers/i2c/designware_i2c.c | |
parent | be26342314a6aacc1bb1e53ad00dfb4b836f0134 (diff) | |
download | u-boot-27d483bfa34c1695c2be230efc50c52d5a3d04e2.zip u-boot-27d483bfa34c1695c2be230efc50c52d5a3d04e2.tar.gz u-boot-27d483bfa34c1695c2be230efc50c52d5a3d04e2.tar.bz2 |
i2c: designware_i2c: add 'hs_hcnt' and 'hs_lcnt' for high speed
Add support for high speed if scl_sda_cfg exist.
Signed-off-by: Jun Chen <ptchentw@gmail.com>
Signed-off-by: Jun Chen <jun.chen@vatics.com>
Diffstat (limited to 'drivers/i2c/designware_i2c.c')
-rw-r--r-- | drivers/i2c/designware_i2c.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/i2c/designware_i2c.c b/drivers/i2c/designware_i2c.c index 74aef77..088a6f3 100644 --- a/drivers/i2c/designware_i2c.c +++ b/drivers/i2c/designware_i2c.c @@ -240,6 +240,9 @@ static int calc_bus_speed(struct dw_i2c *priv, int speed, ulong bus_clk, if (i2c_spd == IC_SPEED_MODE_STANDARD) { config->scl_hcnt = scl_sda_cfg->ss_hcnt; config->scl_lcnt = scl_sda_cfg->ss_lcnt; + } else if (i2c_spd == IC_SPEED_MODE_HIGH) { + config->scl_hcnt = scl_sda_cfg->hs_hcnt; + config->scl_lcnt = scl_sda_cfg->hs_lcnt; } else { config->scl_hcnt = scl_sda_cfg->fs_hcnt; config->scl_lcnt = scl_sda_cfg->fs_lcnt; |