From patchwork Wed Oct 16 10:07:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lorenzo Bianconi X-Patchwork-Id: 13838114 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 9908ED1AD3B for ; Wed, 16 Oct 2024 10:15:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=zQfi/Ym0EvngqU8sTTgHJck96VNl1eaim3pbZZOp7ak=; b=CC+WIha57FW7wIzLZ+uzHntgms CcV3varxbwx/LslZm/rIBLMHWINYlwZ/u16pGVqKFC100hV66WzvoZOjIWnUSi22AuWqGtICjdYys jVHkat922h8K3dRCM8VlrklNNiIsDF2rdRzegxhrRXydD99AjqCoBVhMKIGRFeDbH2EBeARoiRj7B jSAQvlBAd1XwRqQ3AjAO70HtTkN0CfRu42xqXbZL3J+bBxw+T/7l1EU6qtEuuiUkaIyeOjjXcf1is gfVTbPeIEUGo5B6/5N7wjddRvoFF5lYualNCTlxf24aLQuMPLSlJ5bKh+XEQKLfat+/5YlwrKoSyB DTJcjQVA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t1149-0000000BORU-2BJa; Wed, 16 Oct 2024 10:15:41 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t10x8-0000000BN18-2TPv; Wed, 16 Oct 2024 10:08:28 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id A07675C5AC0; Wed, 16 Oct 2024 10:08:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6F573C4CEC5; Wed, 16 Oct 2024 10:08:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1729073305; bh=gkmBN15VmJ7XhF8wlo5CJPi8/ZAowgy4Brqo0iLFSVY=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=So7ochwnQg+bCQGI3nGcumfQYT9J0NVQZqSyssNSjgOUidMRjDwf+Avlyhv/q/NDL jv+wLGmUZMDVoR1d2MawUDMDNRljAInbVXx4AZ47pmQQRyyoRLEKv+ud6GStP19qC3 ETkw8QwkxamtegTXQUss9w2dxfdLGxr/7ruwUABZMvb8ukXYweikDMlvtvg1swZ0dw nMg261H/jIoHSjMWhWOhBQfcpvo9DV/C1pWXifzLkoidITnVp7q5EoYuzLeS/OrFcP 53ZVr9epEmrTyAM5Px+PE8y/KsH02i5mE0jYhCSa9GXcBekQClv16B0YgUmIHK8rCb jIo4HHhLS9b7A== From: Lorenzo Bianconi Date: Wed, 16 Oct 2024 12:07:32 +0200 Subject: [PATCH v7 4/6] dt-bindings: mfd: Add support for Airoha EN7581 GPIO System Controller MIME-Version: 1.0 Message-Id: <20241016-en7581-pinctrl-v7-4-4ff611f263a7@kernel.org> References: <20241016-en7581-pinctrl-v7-0-4ff611f263a7@kernel.org> In-Reply-To: <20241016-en7581-pinctrl-v7-0-4ff611f263a7@kernel.org> To: Lorenzo Bianconi , Linus Walleij , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Sean Wang , Matthias Brugger , AngeloGioacchino Del Regno , Lee Jones , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= Cc: linux-mediatek@lists.infradead.org, linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, upstream@airoha.com, benjamin.larsson@genexis.eu, ansuelsmth@gmail.com, linux-pwm@vger.kernel.org X-Mailer: b4 0.14.2 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241016_030826_758071_284B5736 X-CRM114-Status: GOOD ( 11.88 ) X-BeenThere: linux-mediatek@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-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org From: Christian Marangi Add support for Airoha EN7581 GPIO System Controller which provide a register map for controlling the GPIO, pinctrl and PWM of the SoC via dedicated pinctrl and pwm child nodes. Signed-off-by: Christian Marangi Reviewed-by: Linus Walleij Reviewed-by: Rob Herring (Arm) Co-developed-by: Lorenzo Bianconi Signed-off-by: Lorenzo Bianconi Reviewed-by: AngeloGioacchino Del Regno --- .../bindings/mfd/airoha,en7581-gpio-sysctl.yaml | 90 ++++++++++++++++++++++ 1 file changed, 90 insertions(+) diff --git a/Documentation/devicetree/bindings/mfd/airoha,en7581-gpio-sysctl.yaml b/Documentation/devicetree/bindings/mfd/airoha,en7581-gpio-sysctl.yaml new file mode 100644 index 0000000000000000000000000000000000000000..4a81ed82ef34dc2b99594098584cc77f67f276c8 --- /dev/null +++ b/Documentation/devicetree/bindings/mfd/airoha,en7581-gpio-sysctl.yaml @@ -0,0 +1,90 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mfd/airoha,en7581-gpio-sysctl.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Airoha EN7581 GPIO System Controller + +maintainers: + - Christian Marangi + - Lorenzo Bianconi + +description: + Airoha EN7581 SoC GPIO system controller which provided a register map + for controlling the GPIO, pins and PWM of the SoC. + +properties: + compatible: + items: + - const: airoha,en7581-gpio-sysctl + - const: syscon + - const: simple-mfd + + reg: + maxItems: 1 + + pinctrl: + type: object + $ref: /schemas/pinctrl/airoha,en7581-pinctrl.yaml + description: + Child node definition for EN7581 Pin controller + + pwm: + type: object + $ref: /schemas/pwm/airoha,en7581-pwm.yaml + description: + Child node definition for EN7581 PWM controller + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + #include + + system-controller@1fbf0200 { + compatible = "airoha,en7581-gpio-sysctl", "syscon", "simple-mfd"; + reg = <0x1fbf0200 0xc0>; + + pinctrl { + compatible = "airoha,en7581-pinctrl"; + + interrupt-parent = <&gic>; + interrupts = ; + + gpio-controller; + #gpio-cells = <2>; + + interrupt-controller; + #interrupt-cells = <2>; + + mmc-pins { + mux { + function = "emmc"; + groups = "emmc"; + }; + }; + + mdio-pins { + mux { + function = "mdio"; + groups = "mdio"; + }; + + conf { + pins = "gpio2"; + output-enable; + }; + }; + }; + + pwm { + compatible = "airoha,en7581-pwm"; + + #pwm-cells = <3>; + }; + };