HYLEE
February 23, 2018, 6:44am
1
Hi.
I want to reset I2C1.
But I2C1 reset register writing was generating serror(system error).
I2C1 reset register(CLK_RST_CONTROLLER_RST_DEV_I2C1_0) reading was ok.
Referring to uboot source code, It seems to be reset indirectly through bpmp.
How can I set directly reset register ?
hello HYLEE,
there’s 3rdparty i2c tools for you to access the register.
please have a try.
thanks
HYLEE
March 14, 2018, 2:46pm
3
Thank you for reply.
I am porting new rtos.
So, I can’t use 3rdparty i2c tools.
I want to configurate clock and reset registers on system booting state.
How can I set directly reset clock and reset registers?
hello HYLEE,
please try to set register directly via kernel functions,
please refer to below, thanks
sources/kernel/kernel-4.4/drivers/i2c/i2c-core.c
/**
* i2c_smbus_write_byte - SMBus "send byte" protocol
* @client: Handle to slave device
* @value: Byte to be sent
*
* This executes the SMBus "send byte" protocol, returning negative errno
* else zero on success.
*/
s32 i2c_smbus_write_byte(const struct i2c_client *client, u8 value)
{
return i2c_smbus_xfer(client->adapter, client->addr, client->flags,
I2C_SMBUS_WRITE, value, I2C_SMBUS_BYTE, NULL);
}