Lines Matching refs:i2c_base_addr
95 uintptr_t i2c_base_addr; member
134 uint8_t ctrl = sys_read8(cfg->i2c_base_addr + CORE_I2C_CTRL); in mss_i2c_configure()
138 sys_write8((ctrl | PCLK_DIV_960), cfg->i2c_base_addr + CORE_I2C_CTRL); in mss_i2c_configure()
141 sys_write8((ctrl | PCLK_DIV_256), cfg->i2c_base_addr + CORE_I2C_CTRL); in mss_i2c_configure()
168 uint8_t ctrl = sys_read8(cfg->i2c_base_addr + CORE_I2C_CTRL); in mss_i2c_read()
177 sys_write8((ctrl | CTRL_STA), cfg->i2c_base_addr + CORE_I2C_CTRL); in mss_i2c_read()
187 uint8_t ctrl = sys_read8(cfg->i2c_base_addr + CORE_I2C_CTRL); in mss_i2c_write()
206 sys_write8((ctrl | CTRL_STA), cfg->i2c_base_addr + CORE_I2C_CTRL); in mss_i2c_write()
210 sys_write8((ctrl & ~CTRL_SI), cfg->i2c_base_addr + CORE_I2C_CTRL); in mss_i2c_write()
246 uint8_t ctrl = sys_read8(cfg->i2c_base_addr + CORE_I2C_CTRL); in mss_i2c_reset()
248 sys_write8((ctrl & ~CTRL_ENS1), cfg->i2c_base_addr + CORE_I2C_CTRL); in mss_i2c_reset()
250 ctrl = sys_read8(cfg->i2c_base_addr + CORE_I2C_CTRL); in mss_i2c_reset()
252 sys_write8((ctrl | CTRL_ENS1), cfg->i2c_base_addr + CORE_I2C_CTRL); in mss_i2c_reset()
261 uint8_t ctrl = sys_read8(cfg->i2c_base_addr + CORE_I2C_CTRL); in mss_i2c_irq_handler()
263 uint8_t status = sys_read8(cfg->i2c_base_addr + CORE_I2C_STATUS); in mss_i2c_irq_handler()
270 sys_write8((ctrl & ~CTRL_STA), cfg->i2c_base_addr + CORE_I2C_CTRL); in mss_i2c_irq_handler()
272 sys_write8(data->target_addr | data->dir, cfg->i2c_base_addr + CORE_I2C_DATA); in mss_i2c_irq_handler()
281 sys_write8((ctrl | CTRL_STA), cfg->i2c_base_addr + CORE_I2C_CTRL); in mss_i2c_irq_handler()
288 cfg->i2c_base_addr + CORE_I2C_DATA); in mss_i2c_irq_handler()
294 sys_write8((ctrl | CTRL_STA), cfg->i2c_base_addr + CORE_I2C_CTRL); in mss_i2c_irq_handler()
302 sys_write8((ctrl | CTRL_STO), cfg->i2c_base_addr + CORE_I2C_CTRL); in mss_i2c_irq_handler()
310 sys_write8((ctrl | CTRL_STO), cfg->i2c_base_addr + CORE_I2C_CTRL); in mss_i2c_irq_handler()
316 sys_write8((ctrl | CTRL_AA), cfg->i2c_base_addr + CORE_I2C_CTRL); in mss_i2c_irq_handler()
319 sys_write8((ctrl & ~CTRL_AA), cfg->i2c_base_addr + CORE_I2C_CTRL); in mss_i2c_irq_handler()
322 sys_write8((ctrl | CTRL_AA | CTRL_STO), cfg->i2c_base_addr + CORE_I2C_CTRL); in mss_i2c_irq_handler()
329 sys_read8(cfg->i2c_base_addr + CORE_I2C_DATA); in mss_i2c_irq_handler()
335 sys_write8((ctrl & ~CTRL_AA), cfg->i2c_base_addr + CORE_I2C_CTRL); in mss_i2c_irq_handler()
343 sys_read8(cfg->i2c_base_addr + CORE_I2C_DATA); in mss_i2c_irq_handler()
349 sys_write8((ctrl | CTRL_STO), cfg->i2c_base_addr + CORE_I2C_CTRL); in mss_i2c_irq_handler()
359 ctrl = sys_read8(cfg->i2c_base_addr + CORE_I2C_CTRL); in mss_i2c_irq_handler()
361 sys_write8((ctrl & ~CTRL_SI), cfg->i2c_base_addr + CORE_I2C_CTRL); in mss_i2c_irq_handler()
380 .i2c_base_addr = DT_INST_REG_ADDR(n), \