diff options
author | Jun Chen <jun.chen@vatics.com> | 2020-03-02 16:58:55 +0800 |
---|---|---|
committer | Heiko Schocher <hs@denx.de> | 2020-03-16 08:04:09 +0100 |
commit | 565e328b959b58c181fdec33b2e161ada90dd521 (patch) | |
tree | b46626db87850386a3d6a572d5882c96ee91ae10 /drivers/i2c/designware_i2c.h | |
parent | 70c894f85e9e116b8f215f522ed96b60ac60f201 (diff) |
i2c: designware_i2c: check is high speed possible support
To read IC_COMP_PARAM_1[3:2] to check is high speed possible,
and fall back to fast mode if not.
Signed-off-by: Jun Chen <ptchentw@gmail.com>
Signed-off-by: Jun Chen <jun.chen@vatics.com>
Diffstat (limited to 'drivers/i2c/designware_i2c.h')
-rw-r--r-- | drivers/i2c/designware_i2c.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/i2c/designware_i2c.h b/drivers/i2c/designware_i2c.h index 61a882cb65..23f311b61c 100644 --- a/drivers/i2c/designware_i2c.h +++ b/drivers/i2c/designware_i2c.h @@ -138,6 +138,9 @@ struct i2c_regs { #define IC_STATUS_TFNF 0x0002 #define IC_STATUS_ACT 0x0001 +#define DW_IC_COMP_PARAM_1_SPEED_MODE_HIGH (BIT(2) | BIT(3)) +#define DW_IC_COMP_PARAM_1_SPEED_MODE_MASK (BIT(2) | BIT(3)) + /** * struct dw_scl_sda_cfg - I2C timing configuration * |