Received: by 2002:ab2:6d45:0:b0:1fb:d597:ff75 with SMTP id d5csp407654lqr; Wed, 5 Jun 2024 09:20:08 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVcjwkW/BEv18TLxwRX+fOyZ2E0iKY5lFa64XbstSNK4fBpe/TBmL6Ti0eKjAZpTlHrPiX16qogIbUzHTYYtaAQ9pmJHVhlLSPX2Oxv/g== X-Google-Smtp-Source: AGHT+IHtMVLvSRsUyRGnwoxRUVCHdThndHr+WM81KjvkRN97Om0yj71svJ4dSF5uOK7Jv2fQtNvB X-Received: by 2002:ac2:5df7:0:b0:529:b569:9381 with SMTP id 2adb3069b0e04-52bab50b650mr1665905e87.69.1717604408012; Wed, 05 Jun 2024 09:20:08 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717604407; cv=pass; d=google.com; s=arc-20160816; b=ck2yJh65rzgZzGBnwjE9WfdvgEWshjZV20MAASIJvmjQWRsXR8LpufVHaDVmodjrP4 vQMQ2lUtvhcwr6+rnV1Qyy31TgbYkVSj26ZHQ4MiFvYKZNld68d2m5dTIlYZMr/otr82 I7MU6MBg+ItpHhnZj+5ok2PlcZLqzVvzoJw6Hv6ARbMUtdVYYoYT/r7RYBHtPDkBv7Qg 9KaauMgvbXj1Y2V5mUmqBDHN6SR8CSlb2Odi2sPdyrGjZyJ+a13jf+hmQc1CjWU4rEWI Sw319vqjgEM8VP0I6EPlYBjkXwCCFOE7pDhk7l4ojFr40zqL5A8CTFf8aQbmHsAnLWg7 WNjQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=Ybo3VB0ZUFwUjaqyus/xTnRt4lmeL2QEk7zbE7saRz4=; fh=toUlVWsiJGByqdp56r+zgCxi+nxWWC/9PnBQLGDDKts=; b=IoeXzSceRIa0baMoR2Wcd/9AtQmWJ5Ck2pN35GpmLuFnJbB1fqbmJ2ma8qvMX/oY8O DIrsjrQ0CGqnRNw9CPv7DWAZLTL4zSh4KixHoRh4gXM6jnICBS64vbdGt9PmcRpadXKs /5ngduOd9zgGDMjNHunsh4VX41ZPG0TVQkOdBUCjPDEZvG6DEoOcRfaYSaZGC6f+XE24 xeZ6/RMCTORsY9YQysexK3htOceWEkESNFYSj0a+Q1/KHfVz2QRyjaRIb8L9kIcjtBn/ F7XEOP7NKLIjtaE0SsU5PacYLE+ZqYcLu92nvOhm0zgtL3OSH2Z8XdIlC+4dOmroWBa3 wv2w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=fail header.i=@kernel.org header.s=k20201202 header.b=UnfPkxKL; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-crypto+bounces-4756-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-crypto+bounces-4756-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-57a31cca63csi6169772a12.667.2024.06.05.09.20.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jun 2024 09:20:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto+bounces-4756-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=fail header.i=@kernel.org header.s=k20201202 header.b=UnfPkxKL; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-crypto+bounces-4756-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-crypto+bounces-4756-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id A33141F258D5 for ; Wed, 5 Jun 2024 16:19:07 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D751F14E2FD; Wed, 5 Jun 2024 16:19:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="UnfPkxKL" X-Original-To: linux-crypto@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8489219D899; Wed, 5 Jun 2024 16:19:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717604340; cv=none; b=O3OSWMxWF+Z00eEodE8I8eaVjJSHrMqkns4P1dI9xW5jt8ExLEV39XPfwJNl+imCUFI4O1DdBP/GLe7YF5Y9lERwKFPkjigmYq3d3EA/91vP2hH4YkbGwUrmrb2Zonps9objBMvLJWsswPPug0YsMBRkKdumVjZgh/1trLQl/kE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717604340; c=relaxed/simple; bh=d9PcXS9wR/nOoRRiAvG4FkxSp+KRRqjONneR9KkC3gY=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=aSEu/MeLlNTa+NYPTnCg7e4+uZaquZYcHfNmpfRGtgbYZCfVoBYCXXbeTHJOBuSbP+vLHaWwgj7E0dc4/X1MW159hdSwH0LqdXNxWxNz6H54eTytmQarzs/nYcjonazDN3Mo/sWcBNVgcLfZfKmdUx4XWqk5xewfaGX27FsR1Uc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=UnfPkxKL; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id C0872C2BD11; Wed, 5 Jun 2024 16:18:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1717604340; bh=d9PcXS9wR/nOoRRiAvG4FkxSp+KRRqjONneR9KkC3gY=; h=From:List-Id:To:Cc:Subject:Date:From; b=UnfPkxKL5Zr114qlcR5Qchkr1sVs3mTtZA1h+LiiqqglR+r5G67w3jb813oqy1PMj PZC9FxMypkWYFe85OrGvVRfF7Tsz1NKf3JDdYzF6bg01Gm22gdJGDpLauEaUaXqkD0 WUruC42a12kVefgrUZmqyzfFsSHFOSRQLj22KsSl2QKTrpGQ/vvLPNoUeFx7Jruwqx IpytmlCwOQ20wHNIVEZpooEGd5c2BtX1XqOtSd3ptBO5H/IeaLT09xOnEbWljz77ca TTKBiD5AOl4DWmH7hbExhmhgjOMuqd3Ng1mL9Lvh5rkcCgkD41LNnTBluEI0j63q9P xlsq43aWf1o/g== From: =?UTF-8?q?Marek=20Beh=C3=BAn?= To: Gregory CLEMENT , Arnd Bergmann , soc@kernel.org, arm@kernel.org, Andy Shevchenko , Hans de Goede , =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= , Alessandro Zummo , Alexandre Belloni , Bartosz Golaszewski , Christophe JAILLET , Dan Carpenter , devicetree@vger.kernel.org, Greg Kroah-Hartman , Guenter Roeck , Krzysztof Kozlowski , Linus Walleij , linux-crypto@vger.kernel.org, linux-gpio@vger.kernel.org, linux-rtc@vger.kernel.org, linux-watchdog@vger.kernel.org, Olivia Mackall , Rob Herring , Wim Van Sebroeck Cc: =?UTF-8?q?Marek=20Beh=C3=BAn?= , Andrew Lunn , Conor Dooley , Krzysztof Kozlowski , Rob Herring , Sebastian Hesselbarth , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= Subject: [PATCH v11 0/8] Turris Omnia MCU driver Date: Wed, 5 Jun 2024 18:18:43 +0200 Message-ID: <20240605161851.13911-1-kabel@kernel.org> X-Mailer: git-send-email 2.44.2 Precedence: bulk X-Mailing-List: linux-crypto@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Hello Andy, Hans, Ilpo, Arnd, Gregory, and others, this is v11 of the series adding Turris Omnia MCU driver. Changes since v10: - dropped patch 7 from v10 ("Add support for digital message signing via debugfs"). This must be done via different kernel API (should be doable via keyctl), but this requires more work which I currently don't have, unfortunately - in patch 3 where I introduce support for MCU connected GPIOs changed u32 types to unsigned long where it made sense, in order to be able to use __assign_bit(), __set_bit(), test_bit(). This was suggested by Andy. - in patch 3 deduplicated code in omnia_gpio_get_multiple() - moved the "fixing" in patch 3 of functions introduced in patch 2 to patch 2, this was a rebasing error in v10 - changed date to September 2024 and KernelVersion to 6.11 in Documentation/ABI/testing/sysfs-bus-i2c-devices-turris-omnia-mcu Links to previous cover letters (v1 to v10): 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/ https://patchwork.kernel.org/project/linux-soc/cover/20240508103118.23345-1-kabel@kernel.org/ https://patchwork.kernel.org/project/linux-soc/cover/20240510101819.13551-1-kabel@kernel.org/ Marek BehĂșn (8): 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 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 | 113 ++ .../firmware/cznic,turris-omnia-mcu.yaml | 86 ++ MAINTAINERS | 4 + .../dts/marvell/armada-385-turris-omnia.dts | 35 +- drivers/platform/Kconfig | 2 + drivers/platform/Makefile | 1 + drivers/platform/cznic/Kconfig | 48 + drivers/platform/cznic/Makefile | 8 + .../platform/cznic/turris-omnia-mcu-base.c | 407 +++++++ .../platform/cznic/turris-omnia-mcu-gpio.c | 1071 +++++++++++++++++ .../cznic/turris-omnia-mcu-sys-off-wakeup.c | 257 ++++ .../platform/cznic/turris-omnia-mcu-trng.c | 103 ++ .../cznic/turris-omnia-mcu-watchdog.c | 128 ++ drivers/platform/cznic/turris-omnia-mcu.h | 194 +++ include/linux/turris-omnia-mcu-interface.h | 249 ++++ 15 files changed, 2705 insertions(+), 1 deletion(-) 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-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.44.2