From patchwork Tue Oct 22 23:20:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lorenzo Bianconi X-Patchwork-Id: 13846271 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 C6B67D2CDF6 for ; Tue, 22 Oct 2024 23:30:22 +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=wdqI0ZWw5gN+1i3VZd9rkRuykNKofRY+f1Ev5MQYoFg=; b=QWxuWe9cxd0DSGtGJlCNFgMIER NcIF8QEt8Qwn8QuIrQoJdT8bkOQXVTb4yoJmcRidIHVRxpeIxtYJHlhBhYMk3rjwHkVmW4RQgIayb itp609sKL5+lNVa15yFWvy//X5Gu2E+/iVohBu1Sn8kfWI1Ftf3WEGFbTdmgF7z04bwZVCjkBeK5Q A6naAtQeWzHxnL2UybH8fDaAqHY287xXkUTxntxnpIdStG/QLMXkZR7QbMmOm1mQqrp1HSsbq6suI whzYUyszQGkEAiGvbGHAtZEWn+kPg++LfH2i7WrSGqWciFlIty15TStN0C9q/L2D22J/G+WICdqBa 5Tlu/0zQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t3OKL-0000000CRJS-054k; Tue, 22 Oct 2024 23:30:13 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t3OBq-0000000CQII-11eM; Tue, 22 Oct 2024 23:21:28 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 2F4735C5CB2; Tue, 22 Oct 2024 23:21:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 76259C4CECD; Tue, 22 Oct 2024 23:21:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1729639285; bh=zrSswidO56FtbeNZMQXSi7aPMw7zkb3G9ZpSYil9sWg=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=XwZprQ8BQxuVJaz23vHBsdUmw02Wkzq7Q+K3wTE+To7B4joiP/gAgoj3mTH2JKeS5 RDNnwEpdwmZ/sb31mthmiLHqukSAca89oKvUZPuzYeER0UuEX4e0NJ15qXbZw4xW6V L3R3PWTAC4EQG/YAnW4b1kiutJiKy2IkPDd4wtI0QMSJIzBq/p0FhGs1N0rM0ZkW68 UknJanFroIjRQLrEt51pyXr6sYPvT64O+cGxjSUkGXWytsZC5av8/1HHDHBWVd8Aud WUrBkYM2LRmQFGIaXtbyKZDNJj5OMkHHbTcmy5GAdWyJx8rwOfoTIeSWifZItMCUi6 mRi8CY+3uyiUg== From: Lorenzo Bianconi Date: Wed, 23 Oct 2024 01:20:04 +0200 Subject: [PATCH v9 4/6] dt-bindings: mfd: Add support for Airoha EN7581 GPIO System Controller MIME-Version: 1.0 Message-Id: <20241023-en7581-pinctrl-v9-4-afb0cbcab0ec@kernel.org> References: <20241023-en7581-pinctrl-v9-0-afb0cbcab0ec@kernel.org> In-Reply-To: <20241023-en7581-pinctrl-v9-0-afb0cbcab0ec@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-20241022_162126_415333_120E62B3 X-CRM114-Status: GOOD ( 11.63 ) 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 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) Reviewed-by: AngeloGioacchino Del Regno Co-developed-by: Lorenzo Bianconi Signed-off-by: Lorenzo Bianconi --- .../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>; + }; + };