History log of /openbsd-current/sys/dev/fdt/sxitwi.c
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.14 24-Oct-2021 mpi

Constify struct cfattach.

ok visa@ a long time ago, ok patrick@


Revision tags: OPENBSD_6_9_BASE OPENBSD_7_0_BASE
# 1.13 11-Mar-2021 patrick

Make sure to skip attaching disabled I2C devices. This can happen on
hardware which include a common parent block in their device trees and
only enable the components that were actually implemented, as seen on
e.g. the NanoPi R4S.


# 1.12 08-Oct-2020 patrick

Register sxitwi(4) in the I2C framework.

ok kettenis@


Revision tags: OPENBSD_6_5_BASE OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE
# 1.11 04-Dec-2018 kettenis

Unify messaged printed when we can't estiblish an interrupt.

Pointed out by Artturi Alm.


Revision tags: OPENBSD_6_4_BASE
# 1.10 06-Aug-2018 patrick

Give the FDT interrupt API a more generic naming by replacing the
arm_intr_* prefix with fdt_intr_*.

ok kettenis@


# 1.9 24-Jul-2018 kettenis

Add support for the i2c controller on the Marvell ARMADA 7K/8K SoC as well.

ok patrick@


# 1.8 24-Jul-2018 patrick

The I2C controller on the Allwinner hardware is actually a modified
Marvell controller. The difference is essentially register offsets
and a clock divider calculation based on a power of two. Also this
particular hardware needs a delay after sending a stop and before
reading the status register since apparently the data doesn't
propagate fast enough. This makes sxitwi(4) work on the Marvell
Armada 38x.

ok kettenis@


Revision tags: OPENBSD_6_3_BASE
# 1.7 06-Jan-2018 kettenis

Set the proper bus clock rate based on the "clock-frequency" property and
the rate of the parent clock. If the "clock-frequency" property isn't
present, use the default standard mode clock of 100kHz.


# 1.6 05-Jan-2018 kettenis

Remove unnecessary delays. There is no reason to wait after each and every
read or write to aregister. There is also no reason to wait after
transmitting a STOP since the controller will wait until the bus is free
when transmitting the next START. Based on a diff by Stephen Graf.

Also remove the interrupt code; it doesn't work on the newer variants of
the device. The functionality will be put back in a future commit.

ok patrick@


# 1.5 30-Dec-2017 kettenis

Somewhow I botched rev 1.3, which has a = where a |= is needed. Fix this.


# 1.4 28-Dec-2017 tom

Remove duplicate includes from sxitwi(4)

From Artturi Alm


# 1.3 13-Nov-2017 kettenis

Add support for the i2c controller variant found on the Allwinner A31 and
above and enable the driver on arm64.

From Artturi Alm. Tested by Stephen Graf.


Revision tags: OPENBSD_6_2_BASE
# 1.2 13-Sep-2017 patrick

Add missing pipe in sxitwi(4)'s match code to actually make
it a logical OR intead of a binary OR.

From Artturi Alm


# 1.1 23-Jul-2017 kettenis

Add sxitwi(4), a driver for the (i2c compatible) two-wire bus found on
several Allwinner SoCs. From Artturi Alm, based on code from NetBSD.

Also add axppmic(4), a driver for the AXP209 i2c PMIC, which provides
power down support. Written by Artturi Alm.


# 1.13 11-Mar-2021 patrick

Make sure to skip attaching disabled I2C devices. This can happen on
hardware which include a common parent block in their device trees and
only enable the components that were actually implemented, as seen on
e.g. the NanoPi R4S.


# 1.12 08-Oct-2020 patrick

Register sxitwi(4) in the I2C framework.

ok kettenis@


Revision tags: OPENBSD_6_5_BASE OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE
# 1.11 04-Dec-2018 kettenis

Unify messaged printed when we can't estiblish an interrupt.

Pointed out by Artturi Alm.


Revision tags: OPENBSD_6_4_BASE
# 1.10 06-Aug-2018 patrick

Give the FDT interrupt API a more generic naming by replacing the
arm_intr_* prefix with fdt_intr_*.

ok kettenis@


# 1.9 24-Jul-2018 kettenis

Add support for the i2c controller on the Marvell ARMADA 7K/8K SoC as well.

ok patrick@


# 1.8 24-Jul-2018 patrick

The I2C controller on the Allwinner hardware is actually a modified
Marvell controller. The difference is essentially register offsets
and a clock divider calculation based on a power of two. Also this
particular hardware needs a delay after sending a stop and before
reading the status register since apparently the data doesn't
propagate fast enough. This makes sxitwi(4) work on the Marvell
Armada 38x.

ok kettenis@


Revision tags: OPENBSD_6_3_BASE
# 1.7 06-Jan-2018 kettenis

Set the proper bus clock rate based on the "clock-frequency" property and
the rate of the parent clock. If the "clock-frequency" property isn't
present, use the default standard mode clock of 100kHz.


# 1.6 05-Jan-2018 kettenis

Remove unnecessary delays. There is no reason to wait after each and every
read or write to aregister. There is also no reason to wait after
transmitting a STOP since the controller will wait until the bus is free
when transmitting the next START. Based on a diff by Stephen Graf.

Also remove the interrupt code; it doesn't work on the newer variants of
the device. The functionality will be put back in a future commit.

ok patrick@


# 1.5 30-Dec-2017 kettenis

Somewhow I botched rev 1.3, which has a = where a |= is needed. Fix this.


# 1.4 28-Dec-2017 tom

Remove duplicate includes from sxitwi(4)

From Artturi Alm


# 1.3 13-Nov-2017 kettenis

Add support for the i2c controller variant found on the Allwinner A31 and
above and enable the driver on arm64.

From Artturi Alm. Tested by Stephen Graf.


Revision tags: OPENBSD_6_2_BASE
# 1.2 13-Sep-2017 patrick

Add missing pipe in sxitwi(4)'s match code to actually make
it a logical OR intead of a binary OR.

From Artturi Alm


# 1.1 23-Jul-2017 kettenis

Add sxitwi(4), a driver for the (i2c compatible) two-wire bus found on
several Allwinner SoCs. From Artturi Alm, based on code from NetBSD.

Also add axppmic(4), a driver for the AXP209 i2c PMIC, which provides
power down support. Written by Artturi Alm.


# 1.12 08-Oct-2020 patrick

Register sxitwi(4) in the I2C framework.

ok kettenis@


Revision tags: OPENBSD_6_5_BASE OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE
# 1.11 04-Dec-2018 kettenis

Unify messaged printed when we can't estiblish an interrupt.

Pointed out by Artturi Alm.


Revision tags: OPENBSD_6_4_BASE
# 1.10 06-Aug-2018 patrick

Give the FDT interrupt API a more generic naming by replacing the
arm_intr_* prefix with fdt_intr_*.

ok kettenis@


# 1.9 24-Jul-2018 kettenis

Add support for the i2c controller on the Marvell ARMADA 7K/8K SoC as well.

ok patrick@


# 1.8 24-Jul-2018 patrick

The I2C controller on the Allwinner hardware is actually a modified
Marvell controller. The difference is essentially register offsets
and a clock divider calculation based on a power of two. Also this
particular hardware needs a delay after sending a stop and before
reading the status register since apparently the data doesn't
propagate fast enough. This makes sxitwi(4) work on the Marvell
Armada 38x.

ok kettenis@


Revision tags: OPENBSD_6_3_BASE
# 1.7 06-Jan-2018 kettenis

Set the proper bus clock rate based on the "clock-frequency" property and
the rate of the parent clock. If the "clock-frequency" property isn't
present, use the default standard mode clock of 100kHz.


# 1.6 05-Jan-2018 kettenis

Remove unnecessary delays. There is no reason to wait after each and every
read or write to aregister. There is also no reason to wait after
transmitting a STOP since the controller will wait until the bus is free
when transmitting the next START. Based on a diff by Stephen Graf.

Also remove the interrupt code; it doesn't work on the newer variants of
the device. The functionality will be put back in a future commit.

ok patrick@


# 1.5 30-Dec-2017 kettenis

Somewhow I botched rev 1.3, which has a = where a |= is needed. Fix this.


# 1.4 28-Dec-2017 tom

Remove duplicate includes from sxitwi(4)

From Artturi Alm


# 1.3 13-Nov-2017 kettenis

Add support for the i2c controller variant found on the Allwinner A31 and
above and enable the driver on arm64.

From Artturi Alm. Tested by Stephen Graf.


Revision tags: OPENBSD_6_2_BASE
# 1.2 13-Sep-2017 patrick

Add missing pipe in sxitwi(4)'s match code to actually make
it a logical OR intead of a binary OR.

From Artturi Alm


# 1.1 23-Jul-2017 kettenis

Add sxitwi(4), a driver for the (i2c compatible) two-wire bus found on
several Allwinner SoCs. From Artturi Alm, based on code from NetBSD.

Also add axppmic(4), a driver for the AXP209 i2c PMIC, which provides
power down support. Written by Artturi Alm.


# 1.11 04-Dec-2018 kettenis

Unify messaged printed when we can't estiblish an interrupt.

Pointed out by Artturi Alm.


Revision tags: OPENBSD_6_4_BASE
# 1.10 06-Aug-2018 patrick

Give the FDT interrupt API a more generic naming by replacing the
arm_intr_* prefix with fdt_intr_*.

ok kettenis@


# 1.9 24-Jul-2018 kettenis

Add support for the i2c controller on the Marvell ARMADA 7K/8K SoC as well.

ok patrick@


# 1.8 24-Jul-2018 patrick

The I2C controller on the Allwinner hardware is actually a modified
Marvell controller. The difference is essentially register offsets
and a clock divider calculation based on a power of two. Also this
particular hardware needs a delay after sending a stop and before
reading the status register since apparently the data doesn't
propagate fast enough. This makes sxitwi(4) work on the Marvell
Armada 38x.

ok kettenis@


Revision tags: OPENBSD_6_3_BASE
# 1.7 06-Jan-2018 kettenis

Set the proper bus clock rate based on the "clock-frequency" property and
the rate of the parent clock. If the "clock-frequency" property isn't
present, use the default standard mode clock of 100kHz.


# 1.6 05-Jan-2018 kettenis

Remove unnecessary delays. There is no reason to wait after each and every
read or write to aregister. There is also no reason to wait after
transmitting a STOP since the controller will wait until the bus is free
when transmitting the next START. Based on a diff by Stephen Graf.

Also remove the interrupt code; it doesn't work on the newer variants of
the device. The functionality will be put back in a future commit.

ok patrick@


# 1.5 30-Dec-2017 kettenis

Somewhow I botched rev 1.3, which has a = where a |= is needed. Fix this.


# 1.4 28-Dec-2017 tom

Remove duplicate includes from sxitwi(4)

From Artturi Alm


# 1.3 13-Nov-2017 kettenis

Add support for the i2c controller variant found on the Allwinner A31 and
above and enable the driver on arm64.

From Artturi Alm. Tested by Stephen Graf.


Revision tags: OPENBSD_6_2_BASE
# 1.2 13-Sep-2017 patrick

Add missing pipe in sxitwi(4)'s match code to actually make
it a logical OR intead of a binary OR.

From Artturi Alm


# 1.1 23-Jul-2017 kettenis

Add sxitwi(4), a driver for the (i2c compatible) two-wire bus found on
several Allwinner SoCs. From Artturi Alm, based on code from NetBSD.

Also add axppmic(4), a driver for the AXP209 i2c PMIC, which provides
power down support. Written by Artturi Alm.


# 1.10 06-Aug-2018 patrick

Give the FDT interrupt API a more generic naming by replacing the
arm_intr_* prefix with fdt_intr_*.

ok kettenis@


# 1.9 24-Jul-2018 kettenis

Add support for the i2c controller on the Marvell ARMADA 7K/8K SoC as well.

ok patrick@


# 1.8 24-Jul-2018 patrick

The I2C controller on the Allwinner hardware is actually a modified
Marvell controller. The difference is essentially register offsets
and a clock divider calculation based on a power of two. Also this
particular hardware needs a delay after sending a stop and before
reading the status register since apparently the data doesn't
propagate fast enough. This makes sxitwi(4) work on the Marvell
Armada 38x.

ok kettenis@


Revision tags: OPENBSD_6_3_BASE
# 1.7 06-Jan-2018 kettenis

Set the proper bus clock rate based on the "clock-frequency" property and
the rate of the parent clock. If the "clock-frequency" property isn't
present, use the default standard mode clock of 100kHz.


# 1.6 05-Jan-2018 kettenis

Remove unnecessary delays. There is no reason to wait after each and every
read or write to aregister. There is also no reason to wait after
transmitting a STOP since the controller will wait until the bus is free
when transmitting the next START. Based on a diff by Stephen Graf.

Also remove the interrupt code; it doesn't work on the newer variants of
the device. The functionality will be put back in a future commit.

ok patrick@


# 1.5 30-Dec-2017 kettenis

Somewhow I botched rev 1.3, which has a = where a |= is needed. Fix this.


# 1.4 28-Dec-2017 tom

Remove duplicate includes from sxitwi(4)

From Artturi Alm


# 1.3 13-Nov-2017 kettenis

Add support for the i2c controller variant found on the Allwinner A31 and
above and enable the driver on arm64.

From Artturi Alm. Tested by Stephen Graf.


Revision tags: OPENBSD_6_2_BASE
# 1.2 13-Sep-2017 patrick

Add missing pipe in sxitwi(4)'s match code to actually make
it a logical OR intead of a binary OR.

From Artturi Alm


# 1.1 23-Jul-2017 kettenis

Add sxitwi(4), a driver for the (i2c compatible) two-wire bus found on
several Allwinner SoCs. From Artturi Alm, based on code from NetBSD.

Also add axppmic(4), a driver for the AXP209 i2c PMIC, which provides
power down support. Written by Artturi Alm.


# 1.7 06-Jan-2018 kettenis

Set the proper bus clock rate based on the "clock-frequency" property and
the rate of the parent clock. If the "clock-frequency" property isn't
present, use the default standard mode clock of 100kHz.


# 1.6 05-Jan-2018 kettenis

Remove unnecessary delays. There is no reason to wait after each and every
read or write to aregister. There is also no reason to wait after
transmitting a STOP since the controller will wait until the bus is free
when transmitting the next START. Based on a diff by Stephen Graf.

Also remove the interrupt code; it doesn't work on the newer variants of
the device. The functionality will be put back in a future commit.

ok patrick@


# 1.5 30-Dec-2017 kettenis

Somewhow I botched rev 1.3, which has a = where a |= is needed. Fix this.


# 1.4 28-Dec-2017 tom

Remove duplicate includes from sxitwi(4)

From Artturi Alm


# 1.3 13-Nov-2017 kettenis

Add support for the i2c controller variant found on the Allwinner A31 and
above and enable the driver on arm64.

From Artturi Alm. Tested by Stephen Graf.


Revision tags: OPENBSD_6_2_BASE
# 1.2 13-Sep-2017 patrick

Add missing pipe in sxitwi(4)'s match code to actually make
it a logical OR intead of a binary OR.

From Artturi Alm


# 1.1 23-Jul-2017 kettenis

Add sxitwi(4), a driver for the (i2c compatible) two-wire bus found on
several Allwinner SoCs. From Artturi Alm, based on code from NetBSD.

Also add axppmic(4), a driver for the AXP209 i2c PMIC, which provides
power down support. Written by Artturi Alm.