Linux-Devicetree Archive mirror
 help / color / mirror / Atom feed
From: "Marek Behún" <kabel@kernel.org>
To: "Gregory CLEMENT" <gregory.clement@bootlin.com>,
	"Arnd Bergmann" <arnd@arndb.de>,
	soc@kernel.org, arm@kernel.org,
	"Andy Shevchenko" <andy@kernel.org>,
	"Hans de Goede" <hdegoede@redhat.com>,
	"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
	"Alessandro Zummo" <a.zummo@towertech.it>,
	"Alexandre Belloni" <alexandre.belloni@bootlin.com>,
	"Bartosz Golaszewski" <brgl@bgdev.pl>,
	"Christophe JAILLET" <christophe.jaillet@wanadoo.fr>,
	"Dan Carpenter" <dan.carpenter@linaro.org>,
	devicetree@vger.kernel.org,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Guenter Roeck" <linux@roeck-us.net>,
	"Herbert Xu" <herbert@gondor.apana.org.au>,
	"Krzysztof Kozlowski" <krzysztof.kozlowski+dt@linaro.org>,
	"Linus Walleij" <linus.walleij@linaro.org>,
	linux-crypto@vger.kernel.org, linux-gpio@vger.kernel.org,
	linux-rtc@vger.kernel.org, linux-watchdog@vger.kernel.org,
	"Olivia Mackall" <olivia@selenic.com>,
	"Rob Herring" <robh+dt@kernel.org>,
	"Wim Van Sebroeck" <wim@linux-watchdog.org>
Cc: "Marek Behún" <kabel@kernel.org>, "Andrew Lunn" <andrew@lunn.ch>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Rob Herring" <robh@kernel.org>,
	"Sebastian Hesselbarth" <sebastian.hesselbarth@gmail.com>,
	"Uwe Kleine-König" <uwe@kleine-koenig.org>
Subject: [PATCH v9 0/9] Turris Omnia MCU driver
Date: Wed,  8 May 2024 12:31:09 +0200	[thread overview]
Message-ID: <20240508103118.23345-1-kabel@kernel.org> (raw)

Hello Andy, Hans, Ilpo, Arnd, Gregory, and others,

this is v9 of the series adding Turris Omnia MCU driver.

This series still depends on the immutable branch between LEDs and
locking, introducing devm_mutex_init(), see the PR
  https://lore.kernel.org/linux-leds/20240412084616.GR2399047@google.com/

See also cover letters for v1, v2, v3, v4, v5, v6, v7 and v8:
  https://patchwork.kernel.org/project/linux-soc/cover/20230823161012.6986-1-kabel@kernel.org/
  https://patchwork.kernel.org/project/linux-soc/cover/20230919103815.16818-1-kabel@kernel.org/
  https://patchwork.kernel.org/project/linux-soc/cover/20231023143130.11602-1-kabel@kernel.org/
  https://patchwork.kernel.org/project/linux-soc/cover/20231026161803.16750-1-kabel@kernel.org/
  https://patchwork.kernel.org/project/linux-soc/cover/20240323164359.21642-1-kabel@kernel.org/
  https://patchwork.kernel.org/project/linux-soc/cover/20240418121116.22184-1-kabel@kernel.org/
  https://patchwork.kernel.org/project/linux-soc/cover/20240424173809.7214-1-kabel@kernel.org/
  https://patchwork.kernel.org/project/linux-soc/cover/20240430115111.3453-1-kabel@kernel.org/

Changes since v8:
- removed the MACH_ARMADA_38X || COMPILE_TEST dependency for the
  CZNIC_PLATFORMS Kconfig option in the Kconfig file, as suggested
  by Andy (patch 2)
- fixed the issues in the global header turris-omnia-mcu-interface.h
  pointed out by Andy and Ilpo: added the "OMNIA_" prefix to all
  enumerator entries, added trailing commas, converted to use
  FIELD_PREP_CONST() (patches 2-7)
- added comment why we can't use ether_addr_copy(), as requested by
  Andy (patch 2)
- rewritten the error message for when the MCU does not support
  reporting features, requested by Andy (patch 2)
- changed how the nul-byte is assigned to the end of bin2hex() result,
  requested by Andy (patch 2)
- made the omnia_cmd_write_read() function final in patch 2, instead of
  updating it in subsequent patches, requested by Andy
- in order to be more consistent, changed the omnia_cmd_read_u8() and
  omnia_cmd_read_u16() functions to return zero on success and the read
  value is passed into a pointer, and then added a new function
  omnia_cmd_read_u32(), as requested by Ilpo (he did not like the
  inconsistency in omnia_mcu_read_features(), where the
  omnia_cmd_read_u16() hid the le16_to_cpu() call, but then we did an
  explicit call to le32_to_cpu() when reading 32-bit features) (patch 2)
- some other minor tweaks (changed the version type from u8[] to char[],
  changed len type from size_t to unsigned int in omnia_cmd_write())
  (patches 2 & 3)
- dropped the "gpio%u." prefix from GPIO line names, Andy pointed out
  why this is wrong (patch 3)
- decoupled GPIOs information struct definition and assignment and put
  filling macros before the assignment, requested by Andy (patch 3)
- moved return value check into the guarded scope, suggested by Andy
  (patch 3)
- put some assignments into the definition lines, suggested by Andy
  (patch 3)
- fixed some typos (patches 2 & 3)
- refactored the reply length computation into a new function
  omnia_compute_reply_length(), as requested by Andy (patch 3)

Marek Behún (9):
  dt-bindings: firmware: 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
  platform: cznic: turris-omnia-mcu: Add support for MCU provided TRNG
  platform: cznic: turris-omnia-mcu: Add support for digital message
    signing via debugfs
  ARM: dts: turris-omnia: Add MCU system-controller node
  ARM: dts: turris-omnia: Add GPIO key node for front button

 .../ABI/testing/debugfs-turris-omnia-mcu      |   13 +
 .../sysfs-bus-i2c-devices-turris-omnia-mcu    |  126 ++
 .../firmware/cznic,turris-omnia-mcu.yaml      |   86 ++
 MAINTAINERS                                   |    5 +
 .../dts/marvell/armada-385-turris-omnia.dts   |   35 +-
 drivers/platform/Kconfig                      |    2 +
 drivers/platform/Makefile                     |    1 +
 drivers/platform/cznic/Kconfig                |   50 +
 drivers/platform/cznic/Makefile               |    9 +
 .../platform/cznic/turris-omnia-mcu-base.c    |  451 +++++++
 .../platform/cznic/turris-omnia-mcu-debugfs.c |  207 ++++
 .../platform/cznic/turris-omnia-mcu-gpio.c    | 1040 +++++++++++++++++
 .../cznic/turris-omnia-mcu-sys-off-wakeup.c   |  258 ++++
 .../platform/cznic/turris-omnia-mcu-trng.c    |  103 ++
 .../cznic/turris-omnia-mcu-watchdog.c         |  127 ++
 drivers/platform/cznic/turris-omnia-mcu.h     |  210 ++++
 include/linux/turris-omnia-mcu-interface.h    |  249 ++++
 17 files changed, 2971 insertions(+), 1 deletion(-)
 create mode 100644 Documentation/ABI/testing/debugfs-turris-omnia-mcu
 create mode 100644 Documentation/ABI/testing/sysfs-bus-i2c-devices-turris-omnia-mcu
 create mode 100644 Documentation/devicetree/bindings/firmware/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-debugfs.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-trng.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.43.2


             reply	other threads:[~2024-05-08 10:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-08 10:31 Marek Behún [this message]
2024-05-08 10:31 ` [PATCH v9 1/9] dt-bindings: firmware: add cznic,turris-omnia-mcu binding Marek Behún
2024-05-08 10:31 ` [PATCH v9 8/9] ARM: dts: turris-omnia: Add MCU system-controller node Marek Behún
2024-05-08 10:31 ` [PATCH v9 9/9] ARM: dts: turris-omnia: Add GPIO key node for front button Marek Behún
2024-05-08 11:17 ` [PATCH v9 0/9] Turris Omnia MCU driver Andy Shevchenko
2024-05-08 17:50   ` Marek Behún

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240508103118.23345-1-kabel@kernel.org \
    --to=kabel@kernel.org \
    --cc=a.zummo@towertech.it \
    --cc=alexandre.belloni@bootlin.com \
    --cc=andrew@lunn.ch \
    --cc=andy@kernel.org \
    --cc=arm@kernel.org \
    --cc=arnd@arndb.de \
    --cc=brgl@bgdev.pl \
    --cc=christophe.jaillet@wanadoo.fr \
    --cc=conor+dt@kernel.org \
    --cc=dan.carpenter@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=gregory.clement@bootlin.com \
    --cc=hdegoede@redhat.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=krzk+dt@kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-rtc@vger.kernel.org \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=olivia@selenic.com \
    --cc=robh+dt@kernel.org \
    --cc=robh@kernel.org \
    --cc=sebastian.hesselbarth@gmail.com \
    --cc=soc@kernel.org \
    --cc=uwe@kleine-koenig.org \
    --cc=wim@linux-watchdog.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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 read-only IMAP folder(s) and NNTP newsgroup(s).