From nobody Sun Feb 8 11:51:08 2026 Received: from smtpout-04.galae.net (smtpout-04.galae.net [185.171.202.116]) (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 6D7F82FF673; Fri, 12 Dec 2025 07:41:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.171.202.116 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765525291; cv=none; b=aEsSrv3k86NXz/BDvdGgUpUJWFTco2twiIjFShimNkVOCI8uwMdh/uUiCze1v2VDH0PvMUyBS9NenSDtPj3Fbp6aiEYNHBlqS1umMr6ZcEgumC0NZrP1fT4bBRxp4x3KyfI/0v4NfdC2OnuMkQ/q4yTk/NJk/wClzu2Ds3H9cJ0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765525291; c=relaxed/simple; bh=ssoKqAJydkLqEM9LwAMNOgbfeaJFPtH349QgOepIwjM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=bG0XOknGtdISabCccT05rKIRQW2Qt1kmdDfhS/JOwI1CCKxlPjl3PlQ0Qd9wBjs+jpMqK70t2Atl/4W76BRTvXEEZAzxHvVKMXhkgauFLdqIiUfCo9mJv9cItQvVe2rAOy/8zz5u/+Tx4S6Nd3hSU9MmVkGXrndlzBq0BADVq2U= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=XoB4TOmM; arc=none smtp.client-ip=185.171.202.116 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="XoB4TOmM" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-04.galae.net (Postfix) with ESMTPS id 3BABCC1935E; Fri, 12 Dec 2025 07:41:03 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 4F3E6606DF; Fri, 12 Dec 2025 07:41:27 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 1FD6B103C8DFE; Fri, 12 Dec 2025 08:41:23 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1765525286; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=OrhNSUsjIx1QGpYWb8RuZ4zqeIOHKUbiBsb47ZYien8=; b=XoB4TOmMp08zl6JyVc6yaE6CVztfuiRxe6c9k7zhuHZInTGEX0tLS6H5EjX8COZ/TvlXCF 9vi04R24axPv7R+TgT4iy4NrVDhvpdxUBw0qZ9X92u6oo99wwkMmmm3ZNT1bMKCBHWABp5 pBcNceIjVJ9FcZpS0fU+UkwXswrrvlTcIbkxOq/cIfLwHw0rqqSf56OeISRrKdO+SnvxCP 5tx8D/QMLCLlFS0OkSertnTIXQLyLcZ1jp4JVmA7B/bN5LlIa4sEkcLmClImbcGVjRbODc wSVZGoS5fE1i+2sg86M4vbRJ5TBlsB0A0Mi2dSFwGHWG8uJAubVPC78Z9aAXiA== From: "Thomas Perrot (Schneider Electric)" Date: Fri, 12 Dec 2025 08:41:04 +0100 Subject: [PATCH 1/8] dt-bindings: vendor-prefixes: Add AAEON vendor prefix Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251212-dev-b4-aaeon-mcu-driver-v1-1-6bd65bc8ef12@bootlin.com> References: <20251212-dev-b4-aaeon-mcu-driver-v1-0-6bd65bc8ef12@bootlin.com> In-Reply-To: <20251212-dev-b4-aaeon-mcu-driver-v1-0-6bd65bc8ef12@bootlin.com> To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Linus Walleij , Bartosz Golaszewski , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , =?utf-8?q?J=C3=A9r=C3=A9mie_Dautheribes?= , Wim Van Sebroeck , Guenter Roeck , Lee Jones Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-watchdog@vger.kernel.org, "Thomas Perrot (Schneider Electric)" , Thomas Petazzoni X-Mailer: b4 0.14.2 X-Last-TLS-Session-Version: TLSv1.3 Add the AAEON vendor prefix to support the AAEON SRG-IMX8PL MCU driver devicetree bindings. Signed-off-by: Thomas Perrot (Schneider Electric) Acked-by: Krzysztof Kozlowski --- Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Docum= entation/devicetree/bindings/vendor-prefixes.yaml index c7591b2aec2a74560a4f687fe7a2070ca21b0752..0f84ee93b3a8473719ee92f8c04= 6e350c4a20825 100644 --- a/Documentation/devicetree/bindings/vendor-prefixes.yaml +++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml @@ -32,6 +32,8 @@ patternProperties: description: 8devices, UAB "^9tripod,.*": description: Shenzhen 9Tripod Innovation and Development CO., LTD. + "^aaeon,.*": + description: AAEON "^abb,.*": description: ABB "^abilis,.*": --=20 2.52.0 From nobody Sun Feb 8 11:51:08 2026 Received: from smtpout-02.galae.net (smtpout-02.galae.net [185.246.84.56]) (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 A8DF630F538; Fri, 12 Dec 2025 07:41:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.246.84.56 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765525293; cv=none; b=Qxj6Y0TBlcqMNFOt766E94kP9OcV/SGJ+jgH9G3VYmig2NVgxmrmpmkRYWttGp94jxQyp1Q+/ZF079+fw6rUBGr/zPdDEkBcQzO2lr2cxdAVZvfssPJGEChkOCw9AekcUZZWcAORHngz1idb9SNFZPKNXF4+yqeCkruoTrn3/7Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765525293; c=relaxed/simple; bh=FIIMYAEVN5l4cUQpvtH4/p59boAQjkVDmxDdAVxEwDg=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=QNa8+7o3zfYwm38CLWXpyspRcQKxVzTBUIuSzPGPkDn8FqQ4ycM4jxXASgPhikeCU7QrQuBoJNtl2q4jx/RdVauMT7ZIf3YxRHmXGr8QbekHu10RHiAeJZ9odJ7RrWr435+KrEsbvIvROjP8tcCPG6QKnXNjhYWRhm/9xq8bAM4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=uAi5Xxef; arc=none smtp.client-ip=185.246.84.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="uAi5Xxef" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-02.galae.net (Postfix) with ESMTPS id 0A2671A211D; Fri, 12 Dec 2025 07:41:30 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id D305A606DF; Fri, 12 Dec 2025 07:41:29 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id BDBD6103C8DFF; Fri, 12 Dec 2025 08:41:26 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1765525288; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=ezHaG49ifLrG8L8qfzPELOpOD4DZDpPJpVprvXJHmRw=; b=uAi5XxefYNgnNq+TWibxsdUF2UesQTOsVqW2gubwawMkbAuuPScMMEVLXiQmW7RXhFx9AX 2MRPyqxSEFQUMJSwH+lSqCn3S7cnM0uy2VpCcwXZoK2ncLVK8QKbQcKYts+ktJjLfsYRO8 //OXcZraR9+5QRKSLbhEAZmQzcTeejGykxI5e1ZCOEzNx7Xz7v9mJZ2rGvo6znQcAwLiFH Zr1q9x0xhigRth1yEqs1HRFujjFgdLOMU/HBTk2Utr+SqIJoRan8y/5UtD5Fh0DMCMrM5i FmzJUN9stiwRnt23jBuq47ySPfcaG8AVYV0HtPFkTOuSfdGMvykZiAPBnAUoIQ== From: "Thomas Perrot (Schneider Electric)" Date: Fri, 12 Dec 2025 08:41:05 +0100 Subject: [PATCH 2/8] dt-bindings: gpio: Add AAEON embedded controller GPIO binding Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251212-dev-b4-aaeon-mcu-driver-v1-2-6bd65bc8ef12@bootlin.com> References: <20251212-dev-b4-aaeon-mcu-driver-v1-0-6bd65bc8ef12@bootlin.com> In-Reply-To: <20251212-dev-b4-aaeon-mcu-driver-v1-0-6bd65bc8ef12@bootlin.com> To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Linus Walleij , Bartosz Golaszewski , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , =?utf-8?q?J=C3=A9r=C3=A9mie_Dautheribes?= , Wim Van Sebroeck , Guenter Roeck , Lee Jones Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-watchdog@vger.kernel.org, "Thomas Perrot (Schneider Electric)" , Thomas Petazzoni X-Mailer: b4 0.14.2 X-Last-TLS-Session-Version: TLSv1.3 Add device tree binding documentation for the GPIO controller functionality provided by the AAEON embedded controller. This controller provides 7 GPOs and 12 GPIOs for a total of 19 GPIO lines. The GPIO controller is defined as a child node of the AAEON MCU device. Signed-off-by: Thomas Perrot (Schneider Electric) --- .../bindings/gpio/aaeon,srg-imx8pl-gpio.yaml | 54 ++++++++++++++++++= ++++ 1 file changed, 54 insertions(+) diff --git a/Documentation/devicetree/bindings/gpio/aaeon,srg-imx8pl-gpio.y= aml b/Documentation/devicetree/bindings/gpio/aaeon,srg-imx8pl-gpio.yaml new file mode 100644 index 0000000000000000000000000000000000000000..8040dc0a36ee5650488520c2218= f09fd08cdf64a --- /dev/null +++ b/Documentation/devicetree/bindings/gpio/aaeon,srg-imx8pl-gpio.yaml @@ -0,0 +1,54 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/gpio/aaeon,srg-imx8pl-gpio.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: AAEON Embedded Controller GPIO + +maintainers: + - J=C3=A9r=C3=A9mie Dautheribes + - Thomas Perrot + +description: | + GPIO controller functionality provided by the AAEON embedded controller. + This controller provides 7 GPOs and 12 GPIOs. + + The GPIO controller is a sub-device of the AAEON MCU and must be defined + as a child node of the MCU device. + +properties: + compatible: + const: aaeon,srg-imx8pl-gpio + + gpio-controller: true + + "#gpio-cells": + const: 2 + description: | + The first cell is the GPIO number (0-6 for GPOs, 7-18 for + general-purpose GPIOs). + The second cell is the GPIO flags as defined in + . + + ngpios: + description: | + Total number of GPIOs available (GPOs + GPIOs). + This should be 19 (7 GPOs + 12 GPIOs). + const: 19 + +required: + - compatible + - gpio-controller + - "#gpio-cells" + +additionalProperties: false + +examples: + - | + gpio { + compatible =3D "aaeon,srg-imx8pl-gpio"; + gpio-controller; + #gpio-cells =3D <2>; + ngpios =3D <19>; + }; --=20 2.52.0 From nobody Sun Feb 8 11:51:08 2026 Received: from smtpout-03.galae.net (smtpout-03.galae.net [185.246.85.4]) (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 CFEF02E03E4; Fri, 12 Dec 2025 07:41:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.246.85.4 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765525295; cv=none; b=UO4byPLGHABqaaGpQOQDQOE//drxBYX+spjyH2IuoK7GeDfFroZKu1nezftMsWVOB0sB6ryVJSKghlcRvA4NcsEKiQZwA8IIL0Ev/mcVB0SGNCPt6FHwDUQDIqncZVpWpmcVCISdycOHl8nEMshKBhaiH0ehsO2ZiOcTOGL7OF4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765525295; c=relaxed/simple; bh=BSmAnzV4B6s6gqsxe7AXAr9CaPdItinYcag7ge3M574=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=lffwmsgPhhdtwnSgYaQcIRjd9TUD3CPhRFeW29P/v3RIVE/8eykPg8droCnSed2X/cCoO5Dub23zMUAKe5BroDxKUWB1U2XZDahMjNZQRSM56nVwfepN2JRAlXvTHsIgKHi4G/sBc4n833BMVmqPt+REJtggr+8OHV0+cWrR4ws= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=s9BvrZnm; arc=none smtp.client-ip=185.246.85.4 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="s9BvrZnm" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-03.galae.net (Postfix) with ESMTPS id 704034E41BA7; Fri, 12 Dec 2025 07:41:32 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 32DF3606DF; Fri, 12 Dec 2025 07:41:32 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 459DE103C8DF7; Fri, 12 Dec 2025 08:41:29 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1765525291; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=3KTFJp4GBF6e0UyvSTrCDMZ0n3vB42aRXVc/F+Pp15I=; b=s9BvrZnmkucinAOhUQlG3YtEU1bPxzm06ijVoRb8g/UHd5hkEttd7aK8ZtN7CzGm/EflFs zDVXsGoL0EhKNJfRqoXaxgsmilZMKgM7k94ohDxneVy/XGPxZZrcAm17e0XUNv8SDK9rUF PbmBn79blgND/mf8eLtfNnbB6QJDMDe5VI9lxEJRqDkq+UgiVkLtoIj3llj1cv3HhajH0B 7u26nTxrrfxtdNYVzWYnWey+88h1tHpqBMIzeK5aGHH1GGijrpWiegQNJMv2pSIWgrNOkz sN9QlklFkjMnxFV4SD3w00vLG8DcnWqfdimINjsAC7IIbCD3aK7jpEfwHNCltA== From: "Thomas Perrot (Schneider Electric)" Date: Fri, 12 Dec 2025 08:41:06 +0100 Subject: [PATCH 3/8] dt-bindings: watchdog: Add AAEON embedded controller watchdog binding Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251212-dev-b4-aaeon-mcu-driver-v1-3-6bd65bc8ef12@bootlin.com> References: <20251212-dev-b4-aaeon-mcu-driver-v1-0-6bd65bc8ef12@bootlin.com> In-Reply-To: <20251212-dev-b4-aaeon-mcu-driver-v1-0-6bd65bc8ef12@bootlin.com> To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Linus Walleij , Bartosz Golaszewski , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , =?utf-8?q?J=C3=A9r=C3=A9mie_Dautheribes?= , Wim Van Sebroeck , Guenter Roeck , Lee Jones Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-watchdog@vger.kernel.org, "Thomas Perrot (Schneider Electric)" , Thomas Petazzoni X-Mailer: b4 0.14.2 X-Last-TLS-Session-Version: TLSv1.3 Add device tree binding documentation for the watchdog timer functionality provided by the AAEON embedded controller. The watchdog has a maximum hardware heartbeat of 25 seconds and supports a timeout of up to 240 seconds through automatic pinging. The watchdog is defined as a child node of the AAEON MCU device. Signed-off-by: Thomas Perrot (Schneider Electric) --- .../bindings/watchdog/aaeon,srg-imx8pl-wdt.yaml | 38 ++++++++++++++++++= ++++ 1 file changed, 38 insertions(+) diff --git a/Documentation/devicetree/bindings/watchdog/aaeon,srg-imx8pl-wd= t.yaml b/Documentation/devicetree/bindings/watchdog/aaeon,srg-imx8pl-wdt.ya= ml new file mode 100644 index 0000000000000000000000000000000000000000..d19a2f4fd38826ff4d1ce6b0b7f= 12e8b6879445f --- /dev/null +++ b/Documentation/devicetree/bindings/watchdog/aaeon,srg-imx8pl-wdt.yaml @@ -0,0 +1,38 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/watchdog/aaeon,srg-imx8pl-wdt.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: AAEON Embedded Controller Watchdog Timer + +maintainers: + - J=C3=A9r=C3=A9mie Dautheribes + - Thomas Perrot + +description: | + Watchdog timer functionality provided by the AAEON embedded controller. + The watchdog has a fixed maximum hardware heartbeat of 25 seconds and su= pports + a timeout of 240 seconds through automatic pinging. The timeout is not + programmable and cannot be changed via device tree properties. + + The watchdog is a sub-device of the AAEON MCU and must be defined as a + child node of the MCU device. + +allOf: + - $ref: watchdog.yaml# + +properties: + compatible: + const: aaeon,srg-imx8pl-wdt + +required: + - compatible + +additionalProperties: false + +examples: + - | + watchdog { + compatible =3D "aaeon,srg-imx8pl-wdt"; + }; --=20 2.52.0 From nobody Sun Feb 8 11:51:08 2026 Received: from smtpout-04.galae.net (smtpout-04.galae.net [185.171.202.116]) (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 57AF030C363 for ; Fri, 12 Dec 2025 07:41:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.171.202.116 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765525299; cv=none; b=AhdthywwTEj1As7lRzrke1y3kiv2OtFMlwEw2il77y+OHMm7Ki8vzncTpfg7N6Kw/GBe8il1CJ0cduxMlkRFRmvHQaRh7BJzhQfzcdxllPhJuazSbV4tvbgpWPiZyRoDH31efXZD7z461QHt3b68js5sX9DVXd+rejGzZKqmo0w= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765525299; c=relaxed/simple; bh=swJSdzTLYW1MSyK+Z4b5H7xLrxOgjAgmC67dBUDOSU0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=i0+eZpFWDPlkQt2FgV29tom16CnYAKWn/f+k6hJ6ZKSBwi3nexDcz8A2zkEpp1ygPr7coy1oCdmwMy5FjCPs9yCheCEeA6mVzR+oazsZbys9Gfbxu02j5M8moiLiQSnKzEpt7GVmji93rQmvp/w1BXwhHhQVqU2dIqYiFhtgLAY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=N1SpqbfJ; arc=none smtp.client-ip=185.171.202.116 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="N1SpqbfJ" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-04.galae.net (Postfix) with ESMTPS id 21506C1935F; Fri, 12 Dec 2025 07:41:12 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 34F83606DF; Fri, 12 Dec 2025 07:41:36 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 96E3A103C8DFE; Fri, 12 Dec 2025 08:41:31 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1765525294; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=f9ATSBSJrLX8nV2+0kSB8PwCrrIZNBcN7n8C9TFO+74=; b=N1SpqbfJqH9rsWcVwaflVJSleFEYs6Xym6KfGgEHgHrQ5GxUR184FTUwe+3/cxlB6/VtsK wDBPZXEsXubevWDRWECkNOiuCKpDBv3lmpSwBYt11koSNec6RGZhnoZKEPSftpDt9q8Ktm OrkeSrvIJzQFD8UJgwK/sH3foLbVytFELFWOfH8q2WncWG0K3nW5LuYV7Nni1/o+HE3nJ7 VzdBu5faN4O+hXYtfm1xiZppO2vdhzWheSVOmCyw4dz7xFnSdO7CMHusugmnQyrjqA5wuM um6T61ZXy/X72NC/h7t0QVHl5+VN7JNCRO7xIPDiCo+Pi2qX9y66+OXkafoh+A== From: "Thomas Perrot (Schneider Electric)" Date: Fri, 12 Dec 2025 08:41:07 +0100 Subject: [PATCH 4/8] dt-bindings: mfd: Add AAEON embedded controller binding Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251212-dev-b4-aaeon-mcu-driver-v1-4-6bd65bc8ef12@bootlin.com> References: <20251212-dev-b4-aaeon-mcu-driver-v1-0-6bd65bc8ef12@bootlin.com> In-Reply-To: <20251212-dev-b4-aaeon-mcu-driver-v1-0-6bd65bc8ef12@bootlin.com> To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Linus Walleij , Bartosz Golaszewski , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , =?utf-8?q?J=C3=A9r=C3=A9mie_Dautheribes?= , Wim Van Sebroeck , Guenter Roeck , Lee Jones Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-watchdog@vger.kernel.org, "Thomas Perrot (Schneider Electric)" , Thomas Petazzoni X-Mailer: b4 0.14.2 X-Last-TLS-Session-Version: TLSv1.3 Add device tree binding documentation for the AAEON embedded controller (MCU). This microcontroller is found on AAEON embedded boards and provides system features such as GPIO control, watchdog timer, and LED management. The MCU is connected via I2C and acts as a multi-function device with GPIO and watchdog as child nodes. Signed-off-by: Thomas Perrot (Schneider Electric) --- .../bindings/mfd/aaeon,srg-imx8pl-mcu.yaml | 58 ++++++++++++++++++= ++++ 1 file changed, 58 insertions(+) diff --git a/Documentation/devicetree/bindings/mfd/aaeon,srg-imx8pl-mcu.yam= l b/Documentation/devicetree/bindings/mfd/aaeon,srg-imx8pl-mcu.yaml new file mode 100644 index 0000000000000000000000000000000000000000..680d06a7e7cb3754bdfc67a1b8c= 484811eba55d1 --- /dev/null +++ b/Documentation/devicetree/bindings/mfd/aaeon,srg-imx8pl-mcu.yaml @@ -0,0 +1,58 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mfd/aaeon,srg-imx8pl-mcu.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: AAEON Embedded Controller + +maintainers: + - J=C3=A9r=C3=A9mie Dautheribes + - Thomas Perrot + +description: | + AAEON embeds a microcontroller on their embedded boards providing system + features such as GPIO control, watchdog timer, and LED management. + The MCU is connected via I2C bus. + +properties: + compatible: + const: aaeon,srg-imx8pl-mcu + + reg: + maxItems: 1 + + gpio: + $ref: /schemas/gpio/aaeon,srg-imx8pl-gpio.yaml + + watchdog: + $ref: /schemas/watchdog/aaeon,srg-imx8pl-wdt.yaml + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + i2c { + #address-cells =3D <1>; + #size-cells =3D <0>; + + aaeon_mcu: embedded-controller@62 { + compatible =3D "aaeon,srg-imx8pl-mcu"; + reg =3D <0x62>; + + gpio { + compatible =3D "aaeon,srg-imx8pl-gpio"; + gpio-controller; + #gpio-cells =3D <2>; + ngpios =3D <19>; + }; + + watchdog { + compatible =3D "aaeon,srg-imx8pl-wdt"; + }; + }; + }; --=20 2.52.0 From nobody Sun Feb 8 11:51:08 2026 Received: from smtpout-03.galae.net (smtpout-03.galae.net [185.246.85.4]) (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 556E930F800 for ; Fri, 12 Dec 2025 07:41:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.246.85.4 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765525303; cv=none; b=DxP0oK1XbmiYorYUhfmQhHhZIj9cTBkG7GhaC9xVJ9m6v6l+iEyhKaGeCBUNHFfx0hyWWb7PTmXX7/EcPaQd4S1lDASnW1L+oM91VAiF6rfkY8F8wlNdr+wg8j98Z4cEZdLMPXwRhDgW8x2u+d2qHTz5KrVvHjMJo6ipUqYIZu0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765525303; c=relaxed/simple; bh=kzMjpRoNRvNM13UE8jRaCUX4YJ0EeOt/CPmFHXYqlbw=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=TUQXApvEtc1Ht9rCnL3osp2ihSCljXG81AYa1zlY/g7qwpelc4har0kzbkMlZzbvm6TX71mHPLEd9ow+x5rhFvxPHzjVQQeoEHImCyn2x0AXSm9Ms5fO9EoSEiLQN44kNEEFIGutXEo9bdldZ5jP22nLZLlgr4bGuZCOyEa/VYg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=HQ98dWE4; arc=none smtp.client-ip=185.246.85.4 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="HQ98dWE4" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-03.galae.net (Postfix) with ESMTPS id 116E44E41BA4; Fri, 12 Dec 2025 07:41:40 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id D5058606DF; Fri, 12 Dec 2025 07:41:39 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id CCFE8103C8E01; Fri, 12 Dec 2025 08:41:35 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1765525298; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=HT68qZcuBxNkEdRr7/FSUYs50B01L2Hb2flNlXHqNHA=; b=HQ98dWE4p9UxM9xEMuZKdz0nFBad1e5a3dvVR8RFihv7TsCVgw/FcVU/ErEkjlp1KXRHav TkO9KliLxT9V1JaiRfVGmfYp5hwRdiOsBy7NZQk59G/DjUieMsBWkj/zEpcxw5z3W3QXzR jZpIvzPPBNCObr5TF4s3bk1tW7gd83UqS+hNI0QOe84NhOBwgqbWlDtyPl1k2fMghy5z3v yf7MsfOyVr9lKAhEzbWxBYwmWeW6/aE3QlfSGPuLihB1Vq3MRAsphMyIZVxCKMCjWM4vTh JS5LiZz+p85pKb+wOL/dVS4iSHN9qHFTSEHTW103quWInqwDtbNeQSnWtNJP6g== From: "Thomas Perrot (Schneider Electric)" Date: Fri, 12 Dec 2025 08:41:08 +0100 Subject: [PATCH 5/8] mfd: aaeon: Add SRG-IMX8PL MCU driver Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251212-dev-b4-aaeon-mcu-driver-v1-5-6bd65bc8ef12@bootlin.com> References: <20251212-dev-b4-aaeon-mcu-driver-v1-0-6bd65bc8ef12@bootlin.com> In-Reply-To: <20251212-dev-b4-aaeon-mcu-driver-v1-0-6bd65bc8ef12@bootlin.com> To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Linus Walleij , Bartosz Golaszewski , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , =?utf-8?q?J=C3=A9r=C3=A9mie_Dautheribes?= , Wim Van Sebroeck , Guenter Roeck , Lee Jones Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-watchdog@vger.kernel.org, "Thomas Perrot (Schneider Electric)" , Thomas Petazzoni X-Mailer: b4 0.14.2 X-Last-TLS-Session-Version: TLSv1.3 Add Multi-Function Device (MFD) driver for the Aaeon SRG-IMX8PL embedded controller. This driver provides the core I2C communication interface and registers child devices (GPIO and watchdog controllers). The MCU firmware version is queried during probe and logged for diagnostic purposes. All I2C transactions are serialized using a mutex to ensure proper communication with the microcontroller. Co-developed-by: J=C3=A9r=C3=A9mie Dautheribes (Schneider Electric) Signed-off-by: J=C3=A9r=C3=A9mie Dautheribes (Schneider Electric) Signed-off-by: Thomas Perrot (Schneider Electric) --- drivers/mfd/Kconfig | 10 ++++ drivers/mfd/aaeon-mcu.c | 133 ++++++++++++++++++++++++++++++++++++++= ++++ include/linux/mfd/aaeon-mcu.h | 30 ++++++++++ 3 files changed, 173 insertions(+) diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig index aace5766b38aa5e46e32a8a7b42eea238159fbcf..9195115c7bcd619439cb9ff71d7= 0e46629291867 100644 --- a/drivers/mfd/Kconfig +++ b/drivers/mfd/Kconfig @@ -1574,6 +1574,16 @@ config AB8500_CORE the irq_chip parts for handling the Mixed Signal chip events. This chip embeds various other multimedia functionalities as well. =20 +config MFD_AAEON_MCU + tristate "Aaeon SRG-IMX8PL MCU Driver" + depends on I2C + select MFD_CORE + help + Select this option to enable support for the Aaeon SRG-IMX8PL + onboard microcontroller (MCU). This driver provides the core + functionality to communicate with the MCU over I2C. The MCU + provides various sub-devices including GPIO and watchdog controllers. + config MFD_DB8500_PRCMU bool "ST-Ericsson DB8500 Power Reset Control Management Unit" depends on UX500_SOC_DB8500 diff --git a/drivers/mfd/aaeon-mcu.c b/drivers/mfd/aaeon-mcu.c new file mode 100644 index 0000000000000000000000000000000000000000..472d44d5e8627f4680601559954= 2753a5bda4526 --- /dev/null +++ b/drivers/mfd/aaeon-mcu.c @@ -0,0 +1,133 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* + * Aaeon MCU MFD driver + * + * Copyright (C) 2025 Bootlin + * Author: J=C3=A9r=C3=A9mie Dautheribes + * Author: Thomas Perrot + */ + +#include +#include +#include +#include + +#define AAEON_MCU_GET_FW_VERSION 0x76 + +static struct mfd_cell aaeon_mcu_devs[] =3D { + { + .name =3D "aaeon-mcu-wdt", + .of_compatible =3D "aaeon,srg-imx8pl-wdt", + }, + { + .name =3D "aaeon-mcu-gpio", + .of_compatible =3D "aaeon,srg-imx8pl-gpio", + }, +}; + +static int aaeon_mcu_print_fw_version(struct i2c_client *client) +{ + u8 cmd[3], version[2]; + int ret; + + /* Major version number */ + cmd[0] =3D AAEON_MCU_GET_FW_VERSION; + cmd[1] =3D 0x00; + cmd[2] =3D 0x00; + + ret =3D aaeon_mcu_i2c_xfer(client, cmd, 3, &version[0], 1); + if (ret < 0) + return ret; + + /* Minor version number */ + cmd[0] =3D AAEON_MCU_GET_FW_VERSION; + cmd[1] =3D 0x01; + /* cmd[2] =3D 0x00; */ + + ret =3D aaeon_mcu_i2c_xfer(client, cmd, 3, &version[1], 1); + if (ret < 0) + return ret; + + dev_info(&client->dev, "firmware version: v%d.%d\n", + version[0], version[1]); + + return 0; +} + +static int aaeon_mcu_probe(struct i2c_client *client) +{ + struct aaeon_mcu_dev *mcu; + int ret; + + mcu =3D devm_kzalloc(&client->dev, sizeof(*mcu), GFP_KERNEL); + if (!mcu) + return -ENOMEM; + + i2c_set_clientdata(client, mcu); + mcu->dev =3D &client->dev; + mcu->i2c_client =3D client; + mutex_init(&mcu->i2c_lock); + + ret =3D aaeon_mcu_print_fw_version(client); + if (ret) { + dev_err(&client->dev, "unable to read firmware version\n"); + return ret; + } + + return devm_mfd_add_devices(mcu->dev, PLATFORM_DEVID_NONE, aaeon_mcu_devs, + ARRAY_SIZE(aaeon_mcu_devs), NULL, 0, NULL); +} + +int aaeon_mcu_i2c_xfer(struct i2c_client *client, + const u8 *cmd, int cmd_len, + u8 *rsp, int rsp_len) +{ + struct aaeon_mcu_dev *mcu =3D i2c_get_clientdata(client); + int ret; + + mutex_lock(&mcu->i2c_lock); + + ret =3D i2c_master_send(client, cmd, cmd_len); + if (ret < 0) + goto unlock; + + ret =3D i2c_master_recv(client, rsp, rsp_len); + if (ret < 0) + goto unlock; + + if (ret !=3D rsp_len) { + dev_err(&client->dev, + "i2c recv count error (expected: %d, actual: %d)\n", + rsp_len, ret); + ret =3D -EIO; + goto unlock; + } + + ret =3D 0; + +unlock: + mutex_unlock(&mcu->i2c_lock); + return ret; +} +EXPORT_SYMBOL_GPL(aaeon_mcu_i2c_xfer); + +static const struct of_device_id aaeon_mcu_of_match[] =3D { + { .compatible =3D "aaeon,srg-imx8pl-mcu" }, + {}, +}; + +MODULE_DEVICE_TABLE(of, aaeon_mcu_of_match); + +static struct i2c_driver aaeon_mcu_driver =3D { + .driver =3D { + .name =3D "aaeon_mcu", + .of_match_table =3D aaeon_mcu_of_match, + }, + .probe =3D aaeon_mcu_probe, +}; + +module_i2c_driver(aaeon_mcu_driver); + +MODULE_DESCRIPTION("Aaeon MCU MFD Driver"); +MODULE_AUTHOR("J=C3=A9r=C3=A9mie Dautheribes"); +MODULE_LICENSE("GPL"); diff --git a/include/linux/mfd/aaeon-mcu.h b/include/linux/mfd/aaeon-mcu.h new file mode 100644 index 0000000000000000000000000000000000000000..89632cb46bc6c9518755dc43afb= 87faa94acb6f5 --- /dev/null +++ b/include/linux/mfd/aaeon-mcu.h @@ -0,0 +1,30 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +/* + * Aaeon MCU driver definitions + * + * Copyright (C) 2025 Bootlin + * Author: J=C3=A9r=C3=A9mie Dautheribes + * Author: Thomas Perrot + */ + +#ifndef __LINUX_MFD_AAEON_MCU_H +#define __LINUX_MFD_AAEON_MCU_H + +/** + * struct aaeon_mcu_dev - Internal representation of the Aaeon MCU + * @dev: Pointer to kernel device structure + * @i2c_client: Pointer to the Aaeon MCU I2C client + * @i2c_lock: Mutex to serialize I2C bus access + */ + +struct aaeon_mcu_dev { + struct device *dev; + struct i2c_client *i2c_client; + struct mutex i2c_lock; +}; + +int aaeon_mcu_i2c_xfer(struct i2c_client *client, + const u8 *cmd, int cmd_len, + u8 *rsp, int rsp_len); + +#endif /* __LINUX_MFD_AAEON_MCU_H */ --=20 2.52.0 From nobody Sun Feb 8 11:51:08 2026 Received: from smtpout-02.galae.net (smtpout-02.galae.net [185.246.84.56]) (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 A1A1D27702E; Fri, 12 Dec 2025 07:41:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.246.84.56 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765525306; cv=none; b=nt0q38vXTUHSCFDwiS05XGH9g1Ood14ch+y/HEAHOzwEjFGwnZss8SdcFG0SitUXEVaDJz3WrhwyeLZNM2J7pYDofbOGzrbSmnXwMIDui0C1EAdGDwEkG+yZILX7Dl/8aHME1rjRfzChrwkHQkWX9a4aY73o21MAQgnk21K9448= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765525306; c=relaxed/simple; bh=i3zTcCzEU6Vzk86JnNO3jHITPGIesEvuD/kTcsFtm1A=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=atuIJTqMYtpwSfA3V7zj79AC7lYJbn/SrXOufPS2MzrpFSQALpO+Nd2OvwcsoBsmfpvD7m5IMrYeNWryn6BryrIgu9OlP6LW2aEarzsFmejO0axfdPXoevYkKHmizI81McOWaGWrnxFpm6+4G/bFyVJwsXCO4SNawei+KEFI8UI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=DVEEAQR1; arc=none smtp.client-ip=185.246.84.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="DVEEAQR1" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-02.galae.net (Postfix) with ESMTPS id 58D631A211B; Fri, 12 Dec 2025 07:41:42 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 234D7606DF; Fri, 12 Dec 2025 07:41:42 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 51A3D103C8E03; Fri, 12 Dec 2025 08:41:39 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1765525301; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=/t/Lqv4AoGZ5V51nn2T+1fBK6i6gggmvBiRF4umYo00=; b=DVEEAQR1oHaaVBR+IHsfJSALEfbcFTpE9FwMZfE3NqM0ndNM/wYoVfcqtwQtoyLzf7ycwM //mN87k26/qTTnZJ3GpVqkZ5Vwigp8wng2URY+a1R1suPhbqIZXyTuFFwdjoKxyzf4pOmq NPWsxwI7NxKaAU8DlMInLUm7DHRAs72jfDIAAM+x+JI8h8IrIQFpRCD46zaKPXYGt6ja9R V2R6LUUm+719+kjX97ar7DfuRnc5fmdzA/WD+U+0C8Q9IkDZgBX2cwf3w2ePEZqEmUAg/G J062vQaUgHpYZmdghCs69ytufcfDNKcJ5jzNSuh+9s3GISwqpfVQ3Ekp1OrDuQ== From: "Thomas Perrot (Schneider Electric)" Date: Fri, 12 Dec 2025 08:41:09 +0100 Subject: [PATCH 6/8] gpio: aaeon: Add GPIO driver for SRG-IMX8PL MCU Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251212-dev-b4-aaeon-mcu-driver-v1-6-6bd65bc8ef12@bootlin.com> References: <20251212-dev-b4-aaeon-mcu-driver-v1-0-6bd65bc8ef12@bootlin.com> In-Reply-To: <20251212-dev-b4-aaeon-mcu-driver-v1-0-6bd65bc8ef12@bootlin.com> To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Linus Walleij , Bartosz Golaszewski , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , =?utf-8?q?J=C3=A9r=C3=A9mie_Dautheribes?= , Wim Van Sebroeck , Guenter Roeck , Lee Jones Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-watchdog@vger.kernel.org, "Thomas Perrot (Schneider Electric)" , Thomas Petazzoni X-Mailer: b4 0.14.2 X-Last-TLS-Session-Version: TLSv1.3 Add GPIO driver for the Aaeon SRG-IMX8PL embedded controller. This driver supports 7 GPO (General Purpose Output) pins and 12 GPIO pins that can be configured as inputs or outputs. The driver implements proper state management for GPO pins (which are output-only) and full direction control for GPIO pins. During probe, all pins are reset to a known state (GPOs low, GPIOs as inputs) to prevent undefined behavior across system reboots, as the MCU does not reset GPIO states on soft reboot. Co-developed-by: J=C3=A9r=C3=A9mie Dautheribes (Schneider Electric) Signed-off-by: J=C3=A9r=C3=A9mie Dautheribes (Schneider Electric) Signed-off-by: Thomas Perrot (Schneider Electric) --- drivers/gpio/Kconfig | 10 ++ drivers/gpio/Makefile | 1 + drivers/gpio/gpio-aaeon-mcu.c | 248 ++++++++++++++++++++++++++++++++++++++= ++++ 3 files changed, 259 insertions(+) diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig index c74da29253e810b51540684b1186e8f274066b69..7e0f675b664fa25243fc2802edc= 3380572c94c41 100644 --- a/drivers/gpio/Kconfig +++ b/drivers/gpio/Kconfig @@ -157,6 +157,16 @@ config GPIO_74XX_MMIO 8 bits: 74244 (Input), 74273 (Output) 16 bits: 741624 (Input), 7416374 (Output) =20 +config GPIO_AAEON_MCU + tristate "Aaeon MCU GPIO support" + depends on MFD_AAEON_MCU && OF_GPIO + select GPIO_GENERIC + help + Select this option to enable GPIO support for the Aaeon SRG-IMX8PL + onboard MCU. This driver provides access to GPIO pins and GPO + (General Purpose Output) pins controlled by the microcontroller. + The driver handles both input and output configuration. + config GPIO_ALTERA tristate "Altera GPIO" select GPIOLIB_IRQCHIP diff --git a/drivers/gpio/Makefile b/drivers/gpio/Makefile index 2421a8fd3733e0b06c2581262aaa9cd629f66c7d..1ba6318bc558743fbe5910966c2= c8fc3f792efe9 100644 --- a/drivers/gpio/Makefile +++ b/drivers/gpio/Makefile @@ -29,6 +29,7 @@ obj-$(CONFIG_GPIO_104_IDI_48) +=3D gpio-104-idi-48.o obj-$(CONFIG_GPIO_104_IDIO_16) +=3D gpio-104-idio-16.o obj-$(CONFIG_GPIO_74X164) +=3D gpio-74x164.o obj-$(CONFIG_GPIO_74XX_MMIO) +=3D gpio-74xx-mmio.o +obj-$(CONFIG_GPIO_AAEON_MCU) +=3D gpio-aaeon-mcu.o obj-$(CONFIG_GPIO_ADNP) +=3D gpio-adnp.o obj-$(CONFIG_GPIO_ADP5520) +=3D gpio-adp5520.o obj-$(CONFIG_GPIO_ADP5585) +=3D gpio-adp5585.o diff --git a/drivers/gpio/gpio-aaeon-mcu.c b/drivers/gpio/gpio-aaeon-mcu.c new file mode 100644 index 0000000000000000000000000000000000000000..cebd17d1877147b987ea673b081= 334c8062f5fc0 --- /dev/null +++ b/drivers/gpio/gpio-aaeon-mcu.c @@ -0,0 +1,248 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* + * Aaeon MCU GPIO driver + * + * Copyright (C) 2025 Bootlin + * Author: J=C3=A9r=C3=A9mie Dautheribes + * Author: Thomas Perrot + */ + +#include +#include +#include +#include +#include + +#define AAEON_MCU_CONFIG_GPIO_INPUT 0x69 +#define AAEON_MCU_CONFIG_GPIO_OUTPUT 0x6F +#define AAEON_MCU_READ_GPIO 0x72 +#define AAEON_MCU_WRITE_GPIO 0x77 + +#define AAEON_MCU_CONTROL_GPO 0x6C + +#define MAX_GPIOS 12 +#define MAX_GPOS 7 + +struct aaeon_mcu_gpio { + struct gpio_chip gc; + struct aaeon_mcu_dev *mfd; + DECLARE_BITMAP(dir_in, MAX_GPOS + MAX_GPIOS); + DECLARE_BITMAP(gpo_state, MAX_GPOS); +}; + +static int aaeon_mcu_gpio_config_input_cmd(struct aaeon_mcu_gpio *data, + unsigned int offset) +{ + u8 cmd[3], rsp; + + cmd[0] =3D AAEON_MCU_CONFIG_GPIO_INPUT; + cmd[1] =3D offset - 7; + cmd[2] =3D 0x00; + + return aaeon_mcu_i2c_xfer(data->mfd->i2c_client, cmd, 3, &rsp, 1); +} + +static int aaeon_mcu_gpio_direction_input(struct gpio_chip *gc, unsigned i= nt offset) +{ + struct aaeon_mcu_gpio *data =3D gpiochip_get_data(gc); + int ret; + + if (offset < MAX_GPOS) { + dev_err(gc->parent, "GPIO offset (%d) must be an output GPO\n", offset); + return -EOPNOTSUPP; + } + + ret =3D aaeon_mcu_gpio_config_input_cmd(data, offset); + if (ret < 0) + return ret; + + set_bit(offset, data->dir_in); + + return 0; +} + +static int aaeon_mcu_gpio_config_output_cmd(struct aaeon_mcu_gpio *data, + unsigned int offset, + int value) +{ + u8 cmd[3], rsp; + int ret; + + cmd[0] =3D AAEON_MCU_CONFIG_GPIO_OUTPUT; + cmd[1] =3D offset - 7; + cmd[2] =3D 0x00; + + ret =3D aaeon_mcu_i2c_xfer(data->mfd->i2c_client, cmd, 3, &rsp, 1); + if (ret < 0) + return ret; + + cmd[0] =3D AAEON_MCU_WRITE_GPIO; + /* cmd[1] =3D offset - 7; */ + cmd[2] =3D !!value; + + return aaeon_mcu_i2c_xfer(data->mfd->i2c_client, cmd, 3, &rsp, 1); +} + +static int aaeon_mcu_gpio_direction_output(struct gpio_chip *gc, unsigned = int offset, int value) +{ + struct aaeon_mcu_gpio *data =3D gpiochip_get_data(gc); + int ret; + + if (offset < MAX_GPOS) + return 0; + + ret =3D aaeon_mcu_gpio_config_output_cmd(data, offset, value); + if (ret < 0) + return ret; + + clear_bit(offset, data->dir_in); + + return 0; +} + +static int aaeon_mcu_gpio_get_direction(struct gpio_chip *gc, unsigned int= offset) +{ + struct aaeon_mcu_gpio *data =3D gpiochip_get_data(gc); + + return test_bit(offset, data->dir_in) ? + GPIO_LINE_DIRECTION_IN : GPIO_LINE_DIRECTION_OUT; +} + +static int aaeon_mcu_gpio_get(struct gpio_chip *gc, unsigned int offset) +{ + struct aaeon_mcu_gpio *data =3D gpiochip_get_data(gc); + u8 cmd[3], rsp; + int ret; + + if (offset < MAX_GPOS) + return test_bit(offset, data->gpo_state); + + cmd[0] =3D AAEON_MCU_READ_GPIO; + cmd[1] =3D offset - 7; + cmd[2] =3D 0x00; + + ret =3D aaeon_mcu_i2c_xfer(data->mfd->i2c_client, cmd, 3, &rsp, 1); + if (ret < 0) + return ret; + + return rsp; +} + +static int aaeon_mcu_gpo_set_cmd(struct aaeon_mcu_gpio *data, unsigned int= offset, int value) +{ + u8 cmd[3], rsp; + + cmd[0] =3D AAEON_MCU_CONTROL_GPO; + cmd[1] =3D offset + 1; + cmd[2] =3D !!value; + + return aaeon_mcu_i2c_xfer(data->mfd->i2c_client, cmd, 3, &rsp, 1); +} + +static int aaeon_mcu_gpio_set_cmd(struct aaeon_mcu_gpio *data, unsigned in= t offset, int value) +{ + u8 cmd[3], rsp; + + cmd[0] =3D AAEON_MCU_WRITE_GPIO; + cmd[1] =3D offset - 7; + cmd[2] =3D !!value; + + return aaeon_mcu_i2c_xfer(data->mfd->i2c_client, cmd, 3, &rsp, 1); +} + +static int aaeon_mcu_gpio_set(struct gpio_chip *gc, unsigned int offset, + int value) +{ + struct aaeon_mcu_gpio *data =3D gpiochip_get_data(gc); + + if (offset < MAX_GPOS) { + if (aaeon_mcu_gpo_set_cmd(data, offset, value) =3D=3D 0) + assign_bit(offset, data->gpo_state, value); + } else { + return aaeon_mcu_gpio_set_cmd(data, offset, value); + } + return 0; +} + +static const struct gpio_chip aaeon_mcu_chip =3D { + .label =3D "gpio-aaeon-mcu", + .owner =3D THIS_MODULE, + .get_direction =3D aaeon_mcu_gpio_get_direction, + .direction_input =3D aaeon_mcu_gpio_direction_input, + .direction_output =3D aaeon_mcu_gpio_direction_output, + .get =3D aaeon_mcu_gpio_get, + .set =3D aaeon_mcu_gpio_set, + .base =3D -1, + .ngpio =3D MAX_GPOS + MAX_GPIOS, + .can_sleep =3D true, +}; + +static void aaeon_mcu_gpio_reset(struct aaeon_mcu_gpio *data, struct devic= e *dev) +{ + unsigned int i; + int ret; + + /* Reset all GPOs */ + for (i =3D 0; i < MAX_GPOS; i++) { + ret =3D aaeon_mcu_gpo_set_cmd(data, i, 0); + if (ret < 0) + dev_warn(dev, "Failed to reset GPO %u state: %d\n", i, ret); + clear_bit(i, data->dir_in); + } + + /* Reset all GPIOs */ + for (i =3D MAX_GPOS; i < MAX_GPOS + MAX_GPIOS; i++) { + ret =3D aaeon_mcu_gpio_config_input_cmd(data, i); + if (ret < 0) + dev_warn(dev, "Failed to reset GPIO %u state: %d\n", i, ret); + set_bit(i, data->dir_in); + } +} + +static int aaeon_mcu_gpio_probe(struct platform_device *pdev) +{ + struct aaeon_mcu_dev *mfd =3D dev_get_drvdata(pdev->dev.parent); + struct aaeon_mcu_gpio *data; + + data =3D devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL); + if (!data) + return -ENOMEM; + + data->mfd =3D mfd; + data->gc =3D aaeon_mcu_chip; + data->gc.parent =3D &pdev->dev; + + /* + * Reset all GPIO states to a known configuration. The MCU does not + * reset GPIO state on soft reboot, only on power cycle (hard reboot). + * Without this reset, GPIOs would retain their previous state across + * reboots, which could lead to unexpected behavior. + */ + aaeon_mcu_gpio_reset(data, &pdev->dev); + + platform_set_drvdata(pdev, data); + + return devm_gpiochip_add_data(&pdev->dev, &data->gc, + data); +} + +static const struct of_device_id aaeon_mcu_gpio_of_match[] =3D { + { .compatible =3D "aaeon,srg-imx8pl-gpio" }, + {}, +}; + +MODULE_DEVICE_TABLE(of, aaeon_mcu_gpio_of_match); + +static struct platform_driver aaeon_mcu_gpio_driver =3D { + .driver =3D { + .name =3D "aaeon-mcu-gpio", + .of_match_table =3D aaeon_mcu_gpio_of_match, + }, + .probe =3D aaeon_mcu_gpio_probe, +}; + +module_platform_driver(aaeon_mcu_gpio_driver); + +MODULE_DESCRIPTION("GPIO interface for Aaeon MCU"); +MODULE_AUTHOR("J=C3=A9r=C3=A9mie Dautherbes "); +MODULE_LICENSE("GPL"); --=20 2.52.0 From nobody Sun Feb 8 11:51:08 2026 Received: from smtpout-02.galae.net (smtpout-02.galae.net [185.246.84.56]) (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 EF66A30F7F2 for ; Fri, 12 Dec 2025 07:41:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.246.84.56 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765525309; cv=none; b=W3XPaYomX+gANtGe0BVlwKRV2GPMvqFd02QqxNrU8nKHGVkPAXVhvNHzDumK5ArsjBNX9Pahqip3USVC2XW93q7/blRcTW9exBwMUlz61QncXXuH441Xfg/amufp/aiPftS9D8KFdWAEgbChUEmwJFHRkowje3HNEZ8Q8lQOCsM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765525309; c=relaxed/simple; bh=1FO0vDmfLJqQKiHmGAgOSN9nU4jTazUFB/kRKdWuYYk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=rQOR5H01wSDDFW36PAU7qcK+0GN4fPLLoiDi9kZa/8tq28SzX/X018wmbG7iIrRDLZttUFX+So9fwExlME88SZ2BuVxS9oGsuIpG6xl7WmU4mINf5I7XIHGDjpWabeE4uh3ZtnbJf7s7zDNlNJvxXKrZo6v0VV9yCe/8mrZUfdI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=qzX9Dgpx; arc=none smtp.client-ip=185.246.84.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="qzX9Dgpx" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-02.galae.net (Postfix) with ESMTPS id BF33A1A211D; Fri, 12 Dec 2025 07:41:45 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 93B6D606DF; Fri, 12 Dec 2025 07:41:45 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id CECE7103C8E00; Fri, 12 Dec 2025 08:41:41 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1765525304; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=+9Em5K0Ir5txl5u3tp5x5rRGq90NhxyTh074LTwA5hs=; b=qzX9Dgpx22AICPdAxi7xRAGfWx3RGKwfQRw9DxzdCqwVzm7sM1EmOHBCvR/kMVPuYLIFLL Ad7cbIPeV3sDJ0HCxrFvs3ksnTqu3SDSVw/sVWNodTkKvj6gVwxT4zpBYDZlngyVkbxBL7 oBrI5nCI8+hChxa6UjfNDQQuuWMifmQdGWlTz1XhbY9ML0j0RV1/RM2RANCXaDi+05z1Ul nZaL43wsDFEqYvJ4/ToZ2S3Jd0oiSxrVpIUCK55QAKRqu3diCrHD298TDqxF894BmIR629 A9bEu3pghkoPewK48qpRuwPeSwRkuZyYFDK+JnwGhZzXH5bOsFzeAghTZ+6eEA== From: "Thomas Perrot (Schneider Electric)" Date: Fri, 12 Dec 2025 08:41:10 +0100 Subject: [PATCH 7/8] watchdog: aaeon: Add watchdog driver for SRG-IMX8PL MCU Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251212-dev-b4-aaeon-mcu-driver-v1-7-6bd65bc8ef12@bootlin.com> References: <20251212-dev-b4-aaeon-mcu-driver-v1-0-6bd65bc8ef12@bootlin.com> In-Reply-To: <20251212-dev-b4-aaeon-mcu-driver-v1-0-6bd65bc8ef12@bootlin.com> To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Linus Walleij , Bartosz Golaszewski , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , =?utf-8?q?J=C3=A9r=C3=A9mie_Dautheribes?= , Wim Van Sebroeck , Guenter Roeck , Lee Jones Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-watchdog@vger.kernel.org, "Thomas Perrot (Schneider Electric)" , Thomas Petazzoni X-Mailer: b4 0.14.2 X-Last-TLS-Session-Version: TLSv1.3 Add watchdog driver for the Aaeon SRG-IMX8PL embedded controller. This driver provides system monitoring and recovery capabilities through the MCU's watchdog timer. The watchdog supports start, stop, and ping operations with a maximum hardware heartbeat of 25 seconds and a default timeout of 240 seconds. The driver assumes the watchdog is already running at probe time, as the MCU typically enables it by default. Co-developed-by: J=C3=A9r=C3=A9mie Dautheribes (Schneider Electric) Signed-off-by: J=C3=A9r=C3=A9mie Dautheribes (Schneider Electric) Signed-off-by: Thomas Perrot (Schneider Electric) --- drivers/watchdog/Kconfig | 10 +++ drivers/watchdog/Makefile | 1 + drivers/watchdog/aaeon_mcu_wdt.c | 140 +++++++++++++++++++++++++++++++++++= ++++ 3 files changed, 151 insertions(+) diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig index d3b9df7d466b0b7215ee87b3040811d44ee53d2a..1bd4a7bee303e5e2508f540dc2c= 16e9e19ed18b0 100644 --- a/drivers/watchdog/Kconfig +++ b/drivers/watchdog/Kconfig @@ -168,6 +168,16 @@ config SOFT_WATCHDOG_PRETIMEOUT watchdog. Be aware that governors might affect the watchdog because it is purely software, e.g. the panic governor will stall it! =20 +config AAEON_MCU_WATCHDOG + tristate "Aaeon MCU Watchdog" + depends on MFD_AAEON_MCU + select WATCHDOG_CORE + help + Select this option to enable watchdog timer support for the Aaeon + SRG-IMX8PL onboard microcontroller (MCU). This driver provides + watchdog functionality through the MCU, allowing system monitoring + and automatic recovery from system hangs. + config BD957XMUF_WATCHDOG tristate "ROHM BD9576MUF and BD9573MUF PMIC Watchdog" depends on MFD_ROHM_BD957XMUF diff --git a/drivers/watchdog/Makefile b/drivers/watchdog/Makefile index ba52099b125398a32f80dad23317e223cc4af028..2deec425d3eafb6b208e061fda9= f216f4baa8ecc 100644 --- a/drivers/watchdog/Makefile +++ b/drivers/watchdog/Makefile @@ -37,6 +37,7 @@ obj-$(CONFIG_USBPCWATCHDOG) +=3D pcwd_usb.o # ALPHA Architecture =20 # ARM Architecture +obj-$(CONFIG_AAEON_MCU_WATCHDOG) +=3D aaeon_mcu_wdt.o obj-$(CONFIG_ARM_SP805_WATCHDOG) +=3D sp805_wdt.o obj-$(CONFIG_ARM_SBSA_WATCHDOG) +=3D sbsa_gwdt.o obj-$(CONFIG_ARMADA_37XX_WATCHDOG) +=3D armada_37xx_wdt.o diff --git a/drivers/watchdog/aaeon_mcu_wdt.c b/drivers/watchdog/aaeon_mcu_= wdt.c new file mode 100644 index 0000000000000000000000000000000000000000..8413ea3bce99585d989cf13e449= 4e8daff2d9e4c --- /dev/null +++ b/drivers/watchdog/aaeon_mcu_wdt.c @@ -0,0 +1,140 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* + * Aaeon MCU Watchdog driver + * + * Copyright (C) 2025 Bootlin + * Author: J=C3=A9r=C3=A9mie Dautheribes + * Author: Thomas Perrot + */ + +#include +#include +#include +#include +#include + +#define AAEON_MCU_CONTROL_WDT 0x63 +#define AAEON_MCU_PING_WDT 0x73 + +#define AAEON_MCU_WDT_TIMEOUT 240 +#define AAEON_MCU_WDT_HEARTBEAT_MS 25000 + +struct aaeon_mcu_wdt { + struct watchdog_device wdt; + struct aaeon_mcu_dev *mfd; +}; + +static int aaeon_mcu_wdt_start_cmd(struct aaeon_mcu_wdt *data) +{ + u8 cmd[3], rsp; + + cmd[0] =3D AAEON_MCU_CONTROL_WDT; + cmd[1] =3D 0x01; + cmd[2] =3D 0x00; + + return aaeon_mcu_i2c_xfer(data->mfd->i2c_client, cmd, 3, &rsp, 1); +} + +static int aaeon_mcu_wdt_start(struct watchdog_device *wdt) +{ + struct aaeon_mcu_wdt *data =3D watchdog_get_drvdata(wdt); + + return aaeon_mcu_wdt_start_cmd(data); +} + +static int aaeon_mcu_wdt_stop_cmd(struct aaeon_mcu_wdt *data) +{ + u8 cmd[3], rsp; + + cmd[0] =3D AAEON_MCU_CONTROL_WDT; + cmd[1] =3D 0x00; + cmd[2] =3D 0x00; + + return aaeon_mcu_i2c_xfer(data->mfd->i2c_client, cmd, 3, &rsp, 1); +} + +static int aaeon_mcu_wdt_stop(struct watchdog_device *wdt) +{ + struct aaeon_mcu_wdt *data =3D watchdog_get_drvdata(wdt); + + return aaeon_mcu_wdt_stop_cmd(data); +} + +static int aaeon_mcu_wdt_ping_cmd(struct aaeon_mcu_wdt *data) +{ + u8 cmd[3], rsp; + + cmd[0] =3D AAEON_MCU_PING_WDT; + cmd[1] =3D 0x00; + cmd[2] =3D 0x00; + + return aaeon_mcu_i2c_xfer(data->mfd->i2c_client, cmd, 3, &rsp, 1); +} + +static int aaeon_mcu_wdt_ping(struct watchdog_device *wdt) +{ + struct aaeon_mcu_wdt *data =3D watchdog_get_drvdata(wdt); + + return aaeon_mcu_wdt_ping_cmd(data); +} + +static const struct watchdog_info aaeon_mcu_wdt_info =3D { + .identity =3D "Aaeon MCU Watchdog", + .options =3D WDIOF_KEEPALIVEPING +}; + +static const struct watchdog_ops aaeon_mcu_wdt_ops =3D { + .owner =3D THIS_MODULE, + .start =3D aaeon_mcu_wdt_start, + .stop =3D aaeon_mcu_wdt_stop, + .ping =3D aaeon_mcu_wdt_ping, +}; + +static int aaeon_mcu_wdt_probe(struct platform_device *pdev) +{ + struct device *dev =3D &pdev->dev; + struct aaeon_mcu_dev *mcu =3D dev_get_drvdata(dev->parent); + struct watchdog_device *wdt; + struct aaeon_mcu_wdt *data; + + data =3D devm_kzalloc(dev, sizeof(*data), GFP_KERNEL); + if (!data) + return -ENOMEM; + + data->mfd =3D mcu; + + wdt =3D &data->wdt; + wdt->parent =3D dev; + + wdt->info =3D &aaeon_mcu_wdt_info; + wdt->ops =3D &aaeon_mcu_wdt_ops; + wdt->max_hw_heartbeat_ms =3D AAEON_MCU_WDT_HEARTBEAT_MS; + watchdog_init_timeout(wdt, AAEON_MCU_WDT_TIMEOUT, dev); + + watchdog_set_drvdata(wdt, data); + platform_set_drvdata(pdev, data); + set_bit(WDOG_HW_RUNNING, &wdt->status); + + return devm_watchdog_register_device(dev, wdt); +} + +static const struct of_device_id aaeon_mcu_wdt_of_match[] =3D { + { .compatible =3D "aaeon,srg-imx8pl-wdt" }, + {}, +}; + +MODULE_DEVICE_TABLE(of, aaeon_mcu_wdt_of_match); + +static struct platform_driver aaeon_mcu_wdt_driver =3D { + .driver =3D { + .name =3D "aaeon-mcu-wdt", + .of_match_table =3D aaeon_mcu_wdt_of_match, + }, + .probe =3D aaeon_mcu_wdt_probe, +}; + +module_platform_driver(aaeon_mcu_wdt_driver); + +MODULE_DESCRIPTION("Aaeon MCU Watchdog Driver"); +MODULE_AUTHOR("J=C3=A9r=C3=A9mie Dautheribes"); +MODULE_LICENSE("GPL"); --=20 2.52.0 From nobody Sun Feb 8 11:51:08 2026 Received: from smtpout-02.galae.net (smtpout-02.galae.net [185.246.84.56]) (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 9BEF421D59B for ; Fri, 12 Dec 2025 07:41:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.246.84.56 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765525311; cv=none; b=HHVlO80Mvs9VMva9xU3xoYDI0sXgaqqm0exDu6A1s2+yqNT3jqRk7OPOuCG651ea2rmRzKew6kEdujfD+ixmHe3Yh/ntNyizHKB/E3txQGBL8MDWotyGn1rqpyMNcNjBmGJT5g3/my8zwPa8FIOnSKPouMSgqeMYGBRUFLIj6v8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765525311; c=relaxed/simple; bh=uPdRllvdToXHPTW+cCNzaHikV2UDXgHOJaOHIt6dbh0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=eY0n+c6TMhrAyunwd18F5WzeW1YEKhqc6FU7QhEZL1bU1mQSA3w61wwfsBbZTtYNLfZAvjMoj7VmfZSAqqwGfRKNl4YYN9vPwHuikHJ3dCabhJymu+PLFGhedDS8tHgWr106Dg+APz+u52DwunJ3Qv06efNJzqESaOcH9MtBStk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=k+piAqcj; arc=none smtp.client-ip=185.246.84.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="k+piAqcj" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-02.galae.net (Postfix) with ESMTPS id 69B231A211B; Fri, 12 Dec 2025 07:41:48 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 38EDD606DF; Fri, 12 Dec 2025 07:41:48 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id CD040103C8E02; Fri, 12 Dec 2025 08:41:44 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1765525307; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=F9puDF0qsf7d+cFofikh+YMcfLgLR89soFFQ1eEsTxk=; b=k+piAqcjXVqixAW9nA4n4GOhvuTBd+kxGQgFiyNcasMQ3hFs0bdzvH7I85URKQLVK4f26W RuSJTmfANA4JnjhBmHZT6m4O26LTyjwsHzz58eQqGIK89AoNFQAhn2qroK7epPNHGwkt6Q Zz+3xFuiV4yMG3BGDTmbdaTrBpw6vd6wgmb7VuvR3gudBwOG1cEmBkZtqy4amBde7gz7VQ XDhRJFwqduwSD/5PwYiXP2aofHagKD0dwfnukoCeifueospPJG4b0Ssz5KkSpLaYvX9qy4 eyTPXcaoZ2+SjaElFEycVWoVVAkLfz+1IeV026Ammjp+hQT07h1IjxNXYncQlg== From: "Thomas Perrot (Schneider Electric)" Date: Fri, 12 Dec 2025 08:41:11 +0100 Subject: [PATCH 8/8] MAINTAINERS: Add entry for AAEON SRG-IMX8PL MCU driver Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251212-dev-b4-aaeon-mcu-driver-v1-8-6bd65bc8ef12@bootlin.com> References: <20251212-dev-b4-aaeon-mcu-driver-v1-0-6bd65bc8ef12@bootlin.com> In-Reply-To: <20251212-dev-b4-aaeon-mcu-driver-v1-0-6bd65bc8ef12@bootlin.com> To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Linus Walleij , Bartosz Golaszewski , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , =?utf-8?q?J=C3=A9r=C3=A9mie_Dautheribes?= , Wim Van Sebroeck , Guenter Roeck , Lee Jones Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-watchdog@vger.kernel.org, "Thomas Perrot (Schneider Electric)" , Thomas Petazzoni X-Mailer: b4 0.14.2 X-Last-TLS-Session-Version: TLSv1.3 Add maintainer entry for the Aaeon SRG-IMX8PL MCU MFD driver and its sub-device drivers (GPIO and watchdog). Signed-off-by: Thomas Perrot (Schneider Electric) --- MAINTAINERS | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index c9e416ba74c64e90629c0b7d7941f879c9ac589e..13a4eced229acd970b9e5de864a= 441f28fa2aa91 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -186,6 +186,15 @@ W: http://www.adaptec.com/ F: Documentation/scsi/aacraid.rst F: drivers/scsi/aacraid/ =20 +AAEON SRG-IMX8PL CONTROLLER MFD DRIVER +M: Thomas Perrot +R: J=C3=A9r=C3=A9mie Dautheribes +S: Maintained +F: drivers/gpio/gpio-aaeon-mcu.c +F: drivers/mfd/aaeon-mcu.c +F: drivers/watchdog/aaeon_mcu_wdt.c +F: include/linux/mfd/aaeon-mcu.h + AAEON UPBOARD FPGA MFD DRIVER M: Thomas Richard S: Maintained --=20 2.52.0