diff options
author | Jiawen Wu <jiawenwu@trustnetic.com> | 2023-06-05 04:52:04 +0200 |
---|---|---|
committer | Wolfram Sang <wsa@kernel.org> | 2023-06-05 11:30:28 +0200 |
commit | 2f8d1ed793453b9f7a832c96d699bf3dca176280 (patch) | |
tree | 858a8bd34afea7214aaa91019ee2e94157358a38 /drivers/i2c/busses/i2c-designware-core.h | |
parent | i2c: tegra: allow VI support to be compiled out (diff) | |
download | linux-2f8d1ed793453b9f7a832c96d699bf3dca176280.tar.xz linux-2f8d1ed793453b9f7a832c96d699bf3dca176280.zip |
i2c: designware: Add driver support for Wangxun 10Gb NIC
Wangxun 10Gb ethernet chip is connected to Designware I2C, to communicate
with SFP.
Introduce the property "wx,i2c-snps-model" to match device data for Wangxun
in software node case. Since IO resource was mapped on the ethernet driver,
add a model quirk to get regmap from parent device.
The exists IP limitations are dealt as workarounds:
- IP does not support interrupt mode, it works on polling mode.
- Additionally set FIFO depth address the chip issue.
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
Reviewed-by: Piotr Raczynski <piotr.raczynski@intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
Diffstat (limited to 'drivers/i2c/busses/i2c-designware-core.h')
-rw-r--r-- | drivers/i2c/busses/i2c-designware-core.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/i2c/busses/i2c-designware-core.h b/drivers/i2c/busses/i2c-designware-core.h index c5d87aae39c6..782532c20bd1 100644 --- a/drivers/i2c/busses/i2c-designware-core.h +++ b/drivers/i2c/busses/i2c-designware-core.h @@ -303,6 +303,7 @@ struct dw_i2c_dev { #define MODEL_MSCC_OCELOT BIT(8) #define MODEL_BAIKAL_BT1 BIT(9) #define MODEL_AMD_NAVI_GPU BIT(10) +#define MODEL_WANGXUN_SP BIT(11) #define MODEL_MASK GENMASK(11, 8) /* @@ -312,6 +313,9 @@ struct dw_i2c_dev { #define AMD_UCSI_INTR_REG 0x474 #define AMD_UCSI_INTR_EN 0xd +#define TXGBE_TX_FIFO_DEPTH 4 +#define TXGBE_RX_FIFO_DEPTH 0 + struct i2c_dw_semaphore_callbacks { int (*probe)(struct dw_i2c_dev *dev); void (*remove)(struct dw_i2c_dev *dev); |