Commit graph

9 commits

Author SHA1 Message Date
Tim Lin 159fa4888b ITE: drivers/i2c: Channel C/i2c2 cannot use FIFO mode
Sometimes, channel C may write wrong register to the target device.
This issue occurs when FIFO2 is enabled on channel C. The problem
arises because FIFO2 is shared between channel B and channel C.
FIFO2 will be disabled when data access is completed, at which point
FIFO2 is set to the default configuration for channel B.
The byte counter of FIFO2 may be affected by channel B. There is a
chance that channel C may encounter wrong register being written due
to the FIFO2 byte counter wrong write after channel B's write operation.

The current workaround is that channel C cannot use FIFO mode.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2023-08-04 10:45:48 +02:00
Fabio Baltieri eb0a524972 yamllint: indentation: fix dts/bindings/
Fix the YAML files indentation for files in dts/bindings/.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-01-04 14:23:53 +01:00
Chris Friedt 83bea9a796 dts: bindings: clean up redundant required false attributes
DTS property attributes are (by default) not required.

Explicitly specifying `required: false` is redundant.
Perhaps a warning to that effect would be useful.

Signed-off-by: Chris Friedt <cfriedt@meta.com>
2022-11-20 13:12:44 -05:00
Tim Lin 3474ba919f ITE: drivers/i2c: FIFO2 can be selected to support channel of B or C
FIFO2 can be selected to support channel of B or C by dtsi.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2022-09-22 14:58:42 +00:00
Tim Lin f2c42663b4 ITE: drivers/i2c: I2C driver divided into two compatibles
As mentioned in #42882, the I2C of IT8XXX2 is designed for two different
IP blocks, so this PR divides this I2C driver into two compatibles.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2022-03-17 15:53:34 -05:00
Tim Lin 6a1262198a ITE: drivers/i2c: it8xxx2: move pinctrls macro to soc_dt.h
This PR will change accessing the related pinctrl macro from soc_dt.h
And the pinctrl of SCL and SDA were got from pinctrl-0 and pinctrl-1,
respectively. Change it to get from pinctrl-0 only.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2021-08-17 17:51:17 -04:00
Tim Lin abe27c5bca ITE: driver/i2c: add I2C recovery function
Use GPIO output high and low to simulate I2C start and stop
conditions to restore i2c to normal.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2021-07-14 07:32:16 -04:00
Tim Lin 8fdcc11d6b ITE: drivers/i2c: create pinmux phandle to the I2C driver node
Create the pinmux phandle to the I2C driver node in the
devicetree. When the pinmux_pin_set function in
i2c_it8xxx2_init can refer to the setting of this phandle.
It is more flexible to use.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2021-07-14 07:32:16 -04:00
Tim Lin 981166eb8e drivers/i2c: add i2c driver on it8xxx2 platform
This commit is about the it8xxx2 i2c master driver which
includes six SMBus channels. The enhanced channel i2c3,
i2c4, i2c5 are controller which are designed to support
the I2C protocol.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2021-01-15 11:22:57 -05:00