mbox series

[0/4] Turris Omnia MCU driver

Message ID 20230823161012.6986-1-kabel@kernel.org (mailing list archive)
Headers show
Series Turris Omnia MCU driver | expand

Message

Marek BehĂșn Aug. 23, 2023, 4:10 p.m. UTC
Hello Arnd, Gregory,

this series adds support for the MCU provided features on Turris Omnia:
- board poweroff and wakeup (via rtcwake),
- MCU watchdog,
- GPIOs and interrupts.

The first two parts are simple enough.

The GPIOs and interrupts part is a little bit more complicated because
boards with newer MCU firmware support new interrupt reading API, but
I wanted to also add support for older MCU firmwares, for users who do
not use our system and won't get automatic upgrade to newer version.

There are 4 patches:
- 1st adds device-tree binding,
- 2nd adds the driver proper,
- 3rd and 4th add nodes to Omnia's device tree.

The driver is added to the drivers/platform/cznic directory.

Gregory, could you give ack/review for the device-tree patches so that
they can be merged with the series if everything else is ok?

Marek

Marek BehĂșn (4):
  dt-bindings: arm: add cznic,turris-omnia-mcu binding
  platform/cznic: Add support for Turris Omnia MCU
  ARM: dts: turris-omnia: Add MCU system-controller node
  ARM: dts: turris-omnia: Add GPIO key node for front button

 .../sysfs-bus-i2c-devices-turris-omnia-mcu    |  77 ++
 .../bindings/arm/cznic,turris-omnia-mcu.yaml  |  72 ++
 MAINTAINERS                                   |   4 +
 .../dts/marvell/armada-385-turris-omnia.dts   |  37 +-
 drivers/platform/Kconfig                      |   2 +
 drivers/platform/Makefile                     |   1 +
 drivers/platform/cznic/Kconfig                |  48 +
 drivers/platform/cznic/Makefile               |   7 +
 .../platform/cznic/turris-omnia-mcu-base.c    | 275 +++++
 .../platform/cznic/turris-omnia-mcu-gpio.c    | 967 ++++++++++++++++++
 .../cznic/turris-omnia-mcu-sys-off-wakeup.c   | 245 +++++
 .../cznic/turris-omnia-mcu-watchdog.c         | 126 +++
 drivers/platform/cznic/turris-omnia-mcu.h     | 161 +++
 include/linux/turris-omnia-mcu-interface.h    | 194 ++++
 14 files changed, 2215 insertions(+), 1 deletion(-)
 create mode 100644 Documentation/ABI/testing/sysfs-bus-i2c-devices-turris-omnia-mcu
 create mode 100644 Documentation/devicetree/bindings/arm/cznic,turris-omnia-mcu.yaml
 create mode 100644 drivers/platform/cznic/Kconfig
 create mode 100644 drivers/platform/cznic/Makefile
 create mode 100644 drivers/platform/cznic/turris-omnia-mcu-base.c
 create mode 100644 drivers/platform/cznic/turris-omnia-mcu-gpio.c
 create mode 100644 drivers/platform/cznic/turris-omnia-mcu-sys-off-wakeup.c
 create mode 100644 drivers/platform/cznic/turris-omnia-mcu-watchdog.c
 create mode 100644 drivers/platform/cznic/turris-omnia-mcu.h
 create mode 100644 include/linux/turris-omnia-mcu-interface.h