Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

i2c: mediatek: add i2c compatible for MT8188

Add i2c compatible for MT8188 and added mt_i2c_regs_v3[], since
MT8188 i2c OFFSET_SLAVE_ADDR register changed from 0x04 to 0x94.

Signed-off-by: Kewei Xu <kewei.xu@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Qii Wang <qii.wang@mediatek.com>
Signed-off-by: Wolfram Sang <wsa@kernel.org>

authored by

Kewei Xu and committed by
Wolfram Sang
1b48006e 3a8b5429

+43
+43
drivers/i2c/busses/i2c-mt65xx.c
··· 229 229 [OFFSET_DCM_EN] = 0xf88, 230 230 }; 231 231 232 + static const u16 mt_i2c_regs_v3[] = { 233 + [OFFSET_DATA_PORT] = 0x0, 234 + [OFFSET_INTR_MASK] = 0x8, 235 + [OFFSET_INTR_STAT] = 0xc, 236 + [OFFSET_CONTROL] = 0x10, 237 + [OFFSET_TRANSFER_LEN] = 0x14, 238 + [OFFSET_TRANSAC_LEN] = 0x18, 239 + [OFFSET_DELAY_LEN] = 0x1c, 240 + [OFFSET_TIMING] = 0x20, 241 + [OFFSET_START] = 0x24, 242 + [OFFSET_EXT_CONF] = 0x28, 243 + [OFFSET_LTIMING] = 0x2c, 244 + [OFFSET_HS] = 0x30, 245 + [OFFSET_IO_CONFIG] = 0x34, 246 + [OFFSET_FIFO_ADDR_CLR] = 0x38, 247 + [OFFSET_SDA_TIMING] = 0x3c, 248 + [OFFSET_TRANSFER_LEN_AUX] = 0x44, 249 + [OFFSET_CLOCK_DIV] = 0x48, 250 + [OFFSET_SOFTRESET] = 0x50, 251 + [OFFSET_MULTI_DMA] = 0x8c, 252 + [OFFSET_SCL_MIS_COMP_POINT] = 0x90, 253 + [OFFSET_SLAVE_ADDR] = 0x94, 254 + [OFFSET_DEBUGSTAT] = 0xe4, 255 + [OFFSET_DEBUGCTRL] = 0xe8, 256 + [OFFSET_FIFO_STAT] = 0xf4, 257 + [OFFSET_FIFO_THRESH] = 0xf8, 258 + [OFFSET_DCM_EN] = 0xf88, 259 + }; 260 + 232 261 struct mtk_i2c_compatible { 233 262 const struct i2c_adapter_quirks *quirks; 234 263 const u16 *regs; ··· 471 442 .max_dma_support = 36, 472 443 }; 473 444 445 + static const struct mtk_i2c_compatible mt8188_compat = { 446 + .regs = mt_i2c_regs_v3, 447 + .pmic_i2c = 0, 448 + .dcm = 0, 449 + .auto_restart = 1, 450 + .aux_len_reg = 1, 451 + .timing_adjust = 1, 452 + .dma_sync = 0, 453 + .ltiming_adjust = 1, 454 + .apdma_sync = 1, 455 + .max_dma_support = 36, 456 + }; 457 + 474 458 static const struct mtk_i2c_compatible mt8192_compat = { 475 459 .quirks = &mt8183_i2c_quirks, 476 460 .regs = mt_i2c_regs_v2, ··· 507 465 { .compatible = "mediatek,mt8173-i2c", .data = &mt8173_compat }, 508 466 { .compatible = "mediatek,mt8183-i2c", .data = &mt8183_compat }, 509 467 { .compatible = "mediatek,mt8186-i2c", .data = &mt8186_compat }, 468 + { .compatible = "mediatek,mt8188-i2c", .data = &mt8188_compat }, 510 469 { .compatible = "mediatek,mt8192-i2c", .data = &mt8192_compat }, 511 470 {} 512 471 };