From patchwork Tue Mar 26 00:49:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 13603218 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5659CC54E58 for ; Tue, 26 Mar 2024 00:49:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=mg4/fWEbAyTLhWIjy03vXbRqof5bJzw8DZzUZEfXXUc=; b=kLGphFMAs57y90 y0/XprZZcddyz96FJtcopEfWZfwU5arqqztXoCeR7k2lYYGer7vwK5a0ruIrkAiJMn2xdewNsjZES e5KmvuGPBU8SRsnM7gSnkuf6BZG9QQa2disKmDdti2wGFF3omiu4gmwMSOPZyAvUNp87tG1ueDTS/ YXJctvTEWk3iVRoJXWsY5dO3iZ1HrZxEpGjBYcBEUh7WcSibCI3vOkz/e/vVBB2dehZ2cHEprVA6c Bix/FmsjccBLi4oz9JA0Ow0EARv+vfXdzlutEvcjE4sfhSPiA1QVqXg3KSVNkQ+cFYgmcfkqZxCAJ H55AsR2eEQPkmvafKRig==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rov0O-00000002Xvh-19IX; Tue, 26 Mar 2024 00:49:32 +0000 Received: from perceval.ideasonboard.com ([213.167.242.64]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rov08-00000002XrY-2BY6; Tue, 26 Mar 2024 00:49:18 +0000 Received: from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi [81.175.209.231]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 1FA9FE0C; Tue, 26 Mar 2024 01:48:44 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1711414124; bh=ZEBOqBaWZq4XTNWGxVaYz12/UskACok8TQyXVE9Od1A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fc2yGcbJSQ6S4hPIs9KL5LRd/6tOZQVqt/V4CXUGu9h4sOMft8FdZnM1SxpRNpNJR NDnHEFq8Wi9I2nYNeTn1dY8oirfQiHjBHxDp1PFgoBDv21ueD7NfNrfBD++J3fG+AS z5brBJqnBWC0EbYzmAQHDs0FktZA2PwE+bgmuRLU= From: Laurent Pinchart To: devicetree@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-gpio@vger.kernel.org Cc: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Florian Fainelli , Broadcom internal kernel review list , Ray Jui , Scott Branden , Linus Walleij , Bartosz Golaszewski , Eric Anholt , Stefan Wahren Subject: [PATCH 2/2] dt-bindings: arm: bcm: raspberrypi,bcm2835-firmware: Add gpio child node Date: Tue, 26 Mar 2024 02:49:02 +0200 Message-ID: <20240326004902.17054-3-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240326004902.17054-1-laurent.pinchart@ideasonboard.com> References: <20240326004902.17054-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240325_174916_735742_1BE22F03 X-CRM114-Status: GOOD ( 14.09 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Unlike the other child nodes of the raspberrypi,bcm2835-firmware device, the gpio child is documented in a legacy text-based binding in gpio/raspberrypi,firmware-gpio.txt. This causes DT validation failures: arch/arm64/boot/dts/broadcom/bcm2711-rpi-4-b.dtb: 'gpio' does not match any of the regexes: 'pinctrl-[0-9]+' from schema $id: http://devicetree.org/schemas/arm/bcm/raspberrypi,bcm2835-firmware.yaml# Convert the binding to YAML and move it to raspberrypi,bcm2835-firmware.yaml. Signed-off-by: Laurent Pinchart Reviewed-by: Krzysztof Kozlowski --- .../arm/bcm/raspberrypi,bcm2835-firmware.yaml | 29 ++++++++++++++++++ .../gpio/raspberrypi,firmware-gpio.txt | 30 ------------------- 2 files changed, 29 insertions(+), 30 deletions(-) delete mode 100644 Documentation/devicetree/bindings/gpio/raspberrypi,firmware-gpio.txt diff --git a/Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835-firmware.yaml b/Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835-firmware.yaml index dc38f2be7ad6..999e1bc49539 100644 --- a/Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835-firmware.yaml +++ b/Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835-firmware.yaml @@ -54,6 +54,29 @@ properties: - compatible - "#clock-cells" + gpio: + type: object + additionalProperties: false + + properties: + compatible: + const: raspberrypi,firmware-gpio + + gpio-controller: true + + "#gpio-cells": + const: 2 + description: + The first cell is the pin number, and the second cell is used to + specify the gpio polarity (GPIO_ACTIVE_HIGH or GPIO_ACTIVE_LOW). + + gpio-line-names: true + + required: + - compatible + - gpio-controller + - "#gpio-cells" + reset: type: object additionalProperties: false @@ -112,6 +135,12 @@ examples: #clock-cells = <1>; }; + expgpio: gpio { + compatible = "raspberrypi,firmware-gpio"; + gpio-controller; + #gpio-cells = <2>; + }; + reset: reset { compatible = "raspberrypi,firmware-reset"; #reset-cells = <1>; diff --git a/Documentation/devicetree/bindings/gpio/raspberrypi,firmware-gpio.txt b/Documentation/devicetree/bindings/gpio/raspberrypi,firmware-gpio.txt deleted file mode 100644 index ce97265e23ba..000000000000 --- a/Documentation/devicetree/bindings/gpio/raspberrypi,firmware-gpio.txt +++ /dev/null @@ -1,30 +0,0 @@ -Raspberry Pi GPIO expander - -The Raspberry Pi 3 GPIO expander is controlled by the VC4 firmware. The -firmware exposes a mailbox interface that allows the ARM core to control the -GPIO lines on the expander. - -The Raspberry Pi GPIO expander node must be a child node of the Raspberry Pi -firmware node. - -Required properties: - -- compatible : Should be "raspberrypi,firmware-gpio" -- gpio-controller : Marks the device node as a gpio controller -- #gpio-cells : Should be two. The first cell is the pin number, and - the second cell is used to specify the gpio polarity: - 0 = active high - 1 = active low - -Example: - -firmware: firmware-rpi { - compatible = "raspberrypi,bcm2835-firmware"; - mboxes = <&mailbox>; - - expgpio: gpio { - compatible = "raspberrypi,firmware-gpio"; - gpio-controller; - #gpio-cells = <2>; - }; -};