* [PATCH v2 0/7] Turris Omnia MCU driver
@ 2023-09-19 10:38 Marek Behún
2023-09-19 10:38 ` [PATCH v2 1/7] dt-bindings: arm: add cznic,turris-omnia-mcu binding Marek Behún
0 siblings, 1 reply; 3+ messages in thread
From: Marek Behún @ 2023-09-19 10:38 UTC (permalink / raw)
To: Gregory CLEMENT, Arnd Bergmann, soc, arm, Alessandro Zummo,
Alexandre Belloni, Andy Shevchenko, Bartosz Golaszewski,
devicetree, Guenter Roeck, Krzysztof Kozlowski, Linus Walleij,
linux-gpio, linux-rtc, linux-watchdog, Rob Herring,
Wim Van Sebroeck
Cc: Marek Behún
Hello Arnd, Gregorgy and others,
this is v2 of series adding support for Turris Omnia MCU. See the cover
letter from v1:
https://patchwork.kernel.org/project/linux-soc/cover/20230823161012.6986-1-kabel@kernel.org/
I am also sending this to specific subsystem maintainers as requested by
Krzysztof.
Changes since v1:
- incorporated small changes requested by Krzysztof Kozlowski
- in order to make reviewing simpler, I split the second patch, which
implements the MCU driver, into four incremental patches:
- patch 2/7 adds basic driver skeleton
- patch 3/7 adds GPIO support
- patch 4/7 adds board poweroff and wakeup support
- patch 5/7 adds MCU watchdog support
Marek
Marek Behún (7):
dt-bindings: arm: add cznic,turris-omnia-mcu binding
platform: cznic: Add preliminary support for Turris Omnia MCU
platform: cznic: turris-omnia-mcu: Add support for MCU connected GPIOs
platform: cznic: turris-omnia-mcu: Add support for poweroff and wakeup
platform: cznic: turris-omnia-mcu: Add support for MCU watchdog
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 | 67 ++
MAINTAINERS | 4 +
.../dts/marvell/armada-385-turris-omnia.dts | 35 +-
drivers/platform/Kconfig | 2 +
drivers/platform/Makefile | 1 +
drivers/platform/cznic/Kconfig | 47 +
drivers/platform/cznic/Makefile | 7 +
.../platform/cznic/turris-omnia-mcu-base.c | 273 +++++
.../platform/cznic/turris-omnia-mcu-gpio.c | 971 ++++++++++++++++++
.../cznic/turris-omnia-mcu-sys-off-wakeup.c | 245 +++++
.../cznic/turris-omnia-mcu-watchdog.c | 126 +++
drivers/platform/cznic/turris-omnia-mcu.h | 164 +++
include/linux/turris-omnia-mcu-interface.h | 194 ++++
14 files changed, 2212 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
--
2.41.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH v2 1/7] dt-bindings: arm: add cznic,turris-omnia-mcu binding
2023-09-19 10:38 [PATCH v2 0/7] Turris Omnia MCU driver Marek Behún
@ 2023-09-19 10:38 ` Marek Behún
2023-09-20 12:37 ` Krzysztof Kozlowski
0 siblings, 1 reply; 3+ messages in thread
From: Marek Behún @ 2023-09-19 10:38 UTC (permalink / raw)
To: Gregory CLEMENT, Arnd Bergmann, soc, arm, Rob Herring,
Krzysztof Kozlowski, devicetree
Cc: Marek Behún
Add binding for cznic,turris-omnia-mcu, the device-tree node
representing the system-controller features provided by the MCU on the
Turris Omnia router.
Signed-off-by: Marek Behún <kabel@kernel.org>
---
.../bindings/arm/cznic,turris-omnia-mcu.yaml | 67 +++++++++++++++++++
MAINTAINERS | 1 +
2 files changed, 68 insertions(+)
create mode 100644 Documentation/devicetree/bindings/arm/cznic,turris-omnia-mcu.yaml
diff --git a/Documentation/devicetree/bindings/arm/cznic,turris-omnia-mcu.yaml b/Documentation/devicetree/bindings/arm/cznic,turris-omnia-mcu.yaml
new file mode 100644
index 000000000000..ea1fd0117bb8
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/cznic,turris-omnia-mcu.yaml
@@ -0,0 +1,67 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/arm/cznic,turris-omnia-mcu.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: CZ.NIC's Turris Omnia MCU
+
+maintainers:
+ - Marek Behún <kabel@kernel.org>
+
+description:
+ The MCU on Turris Omnia acts as a system controller providing additional
+ GPIOs, interrupts, watchdog, system power off and wakeup configuration.
+
+properties:
+ compatible:
+ const: cznic,turris-omnia-mcu
+
+ reg:
+ description: MCU I2C slave address
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ interrupt-controller: true
+
+ '#interrupt-cells':
+ const: 2
+
+ gpio-controller: true
+
+ '#gpio-cells':
+ const: 2
+
+required:
+ - compatible
+ - reg
+ - interrupts
+ - interrupt-controller
+ - gpio-controller
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/irq.h>
+
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ system-controller@2a {
+ compatible = "cznic,turris-omnia-mcu";
+ reg = <0x2a>;
+
+ interrupt-parent = <&gpio1>;
+ interrupts = <11 IRQ_TYPE_NONE>;
+
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+ };
diff --git a/MAINTAINERS b/MAINTAINERS
index bf0f54c24f81..0a4d7d6ed63a 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -2091,6 +2091,7 @@ W: https://www.turris.cz/
F: Documentation/ABI/testing/debugfs-moxtet
F: Documentation/ABI/testing/sysfs-bus-moxtet-devices
F: Documentation/ABI/testing/sysfs-firmware-turris-mox-rwtm
+F: Documentation/devicetree/bindings/arm/cznic,turris-omnia-mcu.yaml
F: Documentation/devicetree/bindings/bus/moxtet.txt
F: Documentation/devicetree/bindings/firmware/cznic,turris-mox-rwtm.txt
F: Documentation/devicetree/bindings/gpio/gpio-moxtet.txt
--
2.41.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2 1/7] dt-bindings: arm: add cznic,turris-omnia-mcu binding
2023-09-19 10:38 ` [PATCH v2 1/7] dt-bindings: arm: add cznic,turris-omnia-mcu binding Marek Behún
@ 2023-09-20 12:37 ` Krzysztof Kozlowski
0 siblings, 0 replies; 3+ messages in thread
From: Krzysztof Kozlowski @ 2023-09-20 12:37 UTC (permalink / raw)
To: Marek Behún, Gregory CLEMENT, Arnd Bergmann, soc, arm,
Rob Herring, Krzysztof Kozlowski, devicetree
On 19/09/2023 12:38, Marek Behún wrote:
> Add binding for cznic,turris-omnia-mcu, the device-tree node
> representing the system-controller features provided by the MCU on the
> Turris Omnia router.
>
> Signed-off-by: Marek Behún <kabel@kernel.org>
> ---
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-09-20 12:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-19 10:38 [PATCH v2 0/7] Turris Omnia MCU driver Marek Behún
2023-09-19 10:38 ` [PATCH v2 1/7] dt-bindings: arm: add cznic,turris-omnia-mcu binding Marek Behún
2023-09-20 12:37 ` Krzysztof Kozlowski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).