From patchwork Thu Mar 27 09:26:35 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xianwei Zhao X-Patchwork-Id: 14030909 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 6D261C3600C for ; Thu, 27 Mar 2025 09:30:17 +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:Reply-To:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References: Message-Id:MIME-Version:Subject:Date:From:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=8ZGN6IoF8QCch56PG03Zow9OnoTzXXrO7+sCsI6prhc=; b=E51hM9P7mjkBKN ODYa/W6S4lcK7Y8Cc9NLyNTXZt+zzDpl24yk9XZ0T0IetJrIDARqw4DMz5kBpX3VMPUxp2VfslsAS vk2a1JOVmXXApzGlD1tIEyuLrSdQkkG6tXD0KJ9zzLgLuGTSsrnYY5A6KcmKi1Qkd8r1eBh5na4WL 7M2WT9esljk5pdClx3mna34lj9OuHEzX994a2V/fdY66YJIJ36g8L8tHgzUUDtR5UbbmohUhwr3dB ZsJ8FcaQo6DfQ5A3G1iKRm26wn+JgLJr+c11FDjZ3KffHyqPIukUFXFURqyIgD2l/aSM4hnMFfdW0 Iize6E9brp5sb7ZJaObA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.1 #2 (Red Hat Linux)) id 1txjYz-0000000AZeh-0VbL; Thu, 27 Mar 2025 09:30:13 +0000 Received: from nyc.source.kernel.org ([147.75.193.91]) by bombadil.infradead.org with esmtps (Exim 4.98.1 #2 (Red Hat Linux)) id 1txjVX-0000000AZAl-15cB; Thu, 27 Mar 2025 09:26:41 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id 2562DA41D83; Thu, 27 Mar 2025 09:21:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPS id 934ADC4CEEA; Thu, 27 Mar 2025 09:26:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1743067597; bh=8Ex/Jr8diQ1IbTbGBwunvR8qirt4YXrZ6QekMoJwqYM=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=LwqAx+UFVtSRdaxDke/l+hloA54FxureH7JeUEX5UpfByUqHG5JBGktFKkic5u47b EzDaeYewZ/aYfzX2WpuGpHnVcP81O/GadIglwMeKbugvFd5HU474B8wR8i3qRHUsvv XaDXqbLnpt9198w2/lVzFYxTWcGQx2pnaO8um4io72ZnxARQN7oNdZ7qYRwFDeAViB CkZKQAUEVx10l/4gVpUxY9GWs2SU+sB7+t1JpgE2uGzzuSOn352CXzW6RSFUixtyny ztzQzqHpSJscgAxJKUv4iFcozIz7wP8zM9jyQti3ENH8DANmV/0hrVH0wQRrkFqlKr 6qQ82VWELPinw== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 75C11C3600C; Thu, 27 Mar 2025 09:26:37 +0000 (UTC) Date: Thu, 27 Mar 2025 17:26:35 +0800 Subject: [PATCH 1/2] dt-bindings: pinctl: amlogic,pinctrl-a4: Add compatible string for A5 MIME-Version: 1.0 Message-Id: <20250327-a5-pinctrl-v1-1-49320349c463@amlogic.com> References: <20250327-a5-pinctrl-v1-0-49320349c463@amlogic.com> In-Reply-To: <20250327-a5-pinctrl-v1-0-49320349c463@amlogic.com> To: Linus Walleij , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl Cc: linux-amlogic@lists.infradead.org, linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Xianwei Zhao X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=ed25519-sha256; t=1743067595; l=1027; i=xianwei.zhao@amlogic.com; s=20231208; h=from:subject:message-id; bh=e5E9HFKA/8VjQVYFNbNKCkIxF4wUBI+C617RgTKcAFA=; b=pfftSA0ow6ohkIHTU+RWjU9yarMrpHvElbzsyk2KJTNSA9+b8jmLlFm29TCzBbghYrNou4Tb2 v9QUnNPCRC3DmidQRzDZVEGIb+eTMSyJmT+46B5tBYSl8VXShJGvkKa X-Developer-Key: i=xianwei.zhao@amlogic.com; a=ed25519; pk=o4fDH8ZXL6xQg5h17eNzRljf6pwZHWWjqcOSsj3dW24= X-Endpoint-Received: by B4 Relay for xianwei.zhao@amlogic.com/20231208 with auth_id=107 X-Original-From: Xianwei Zhao X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250327_022639_373692_66AF533B X-CRM114-Status: UNSURE ( 8.75 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: xianwei.zhao@amlogic.com Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org From: Xianwei Zhao From: Xianwei Zhao Amlogic A5 SoCs uses the same pintrl controller as A4 SoCs. There is no need for an extra compatible line in the driver, but add A5 compatible line for documentation. Signed-off-by: Xianwei Zhao Acked-by: Conor Dooley --- .../devicetree/bindings/pinctrl/amlogic,pinctrl-a4.yaml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/pinctrl/amlogic,pinctrl-a4.yaml b/Documentation/devicetree/bindings/pinctrl/amlogic,pinctrl-a4.yaml index 8eb50cad61d5..a94f4dfb9a7f 100644 --- a/Documentation/devicetree/bindings/pinctrl/amlogic,pinctrl-a4.yaml +++ b/Documentation/devicetree/bindings/pinctrl/amlogic,pinctrl-a4.yaml @@ -14,8 +14,13 @@ allOf: properties: compatible: - const: amlogic,pinctrl-a4 - + oneOf: + - enum: + - amlogic,pinctrl-a4 + - items: + - enum: + - amlogic,pinctrl-a5 + - const: amlogic,pinctrl-a4 "#address-cells": const: 2 From patchwork Thu Mar 27 09:26:36 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xianwei Zhao X-Patchwork-Id: 14030877 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 72EBAC3600B for ; Thu, 27 Mar 2025 09:26:46 +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:Reply-To:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References: Message-Id:MIME-Version:Subject:Date:From:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=SuXguIkq8IAp2/8O48Ems1NbEVF8VLAcJHxm1DhByFc=; b=RMrURwr5+PUxfC mTf+vc+6NCbevoLH3uCHzhaObfPyWNBWPBMtaf+kQU270mDtfsAB4ahpJeZaYOdmqQYgpjpenQ3TA Wm4uWvfdj2ovmGnCK7EfmKnfh9BYF0kmmX/yveP9XLyTx19HzSa9MtcQuXOxg92E/efoaIlzzTeWW 7bZLyjJnZG9MPXXZ1dyLxfCJUJy/6wLYTenNr6Z4f6pnKmnY8cXEtya3wp9QXHe+g1Uk2jNKDWZBK 78QFcQQRJxknmrSb6Cb58BHFYvzFxMnthrzPS98JDZ1ktHsPyHA8DFqEYnWoBci/M3ggO8Lcj5zGm GPtitnpcK3+6GxPoJ2NQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.1 #2 (Red Hat Linux)) id 1txjVZ-0000000AZBt-43uw; Thu, 27 Mar 2025 09:26:41 +0000 Received: from sea.source.kernel.org ([2600:3c0a:e001:78e:0:1991:8:25]) by bombadil.infradead.org with esmtps (Exim 4.98.1 #2 (Red Hat Linux)) id 1txjVX-0000000AZAj-0d4T; Thu, 27 Mar 2025 09:26:40 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sea.source.kernel.org (Postfix) with ESMTP id 8809244A1D; Thu, 27 Mar 2025 09:26:37 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPS id 9FEE0C4CEE8; Thu, 27 Mar 2025 09:26:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1743067597; bh=cYPE4hxj2E/+XBZrJpUbI6pIfd/alhO++G3MPN6trQY=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=KIvaULifV+wNNdCEg0rADuuV03aLDbFJt2xFhV+hQy+PlpBujaLjMZEsQETNbgdrs vYN7V3YJgCb089cg76MTE+GAOcL/XS/fQfmWJZEmdLvtq8MB2F0eXOlezyb4lvn2o4 u33iqe0WXMiYP6UF8iEQH7xlXe2TSv8db52uSsiL8ncISf78boipVxgZOjL5dsq4yR /vIqgPbDY15O7A6S0GZDNrRXCD2Q72IOumgHLvbzCu9ivgMZDuilihifOT/4K+5TVO pipwKiL2R9dukUop3CzcXUANyYAqlsqggPh1mfQ/BhubCnZGyXvHVxlDafC+dw7EM8 DYxFMa+7tvomQ== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 84491C36012; Thu, 27 Mar 2025 09:26:37 +0000 (UTC) Date: Thu, 27 Mar 2025 17:26:36 +0800 Subject: [PATCH 2/2] dts: arm64: amlogic: add a5 pinctrl node MIME-Version: 1.0 Message-Id: <20250327-a5-pinctrl-v1-2-49320349c463@amlogic.com> References: <20250327-a5-pinctrl-v1-0-49320349c463@amlogic.com> In-Reply-To: <20250327-a5-pinctrl-v1-0-49320349c463@amlogic.com> To: Linus Walleij , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl Cc: linux-amlogic@lists.infradead.org, linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Xianwei Zhao X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=ed25519-sha256; t=1743067595; l=3211; i=xianwei.zhao@amlogic.com; s=20231208; h=from:subject:message-id; bh=zTXCd3mjrQB2UAQ+DUxS9Et3VYgrEbPO04Lv0RVd3Dc=; b=uLPxQhdvFA9JdqryhrPPHciK/D+98xm4FI8UAUBwfEwXpyZasZzFKunrWC9/x5mVLhU/vxfP4 NoPpdyD8GfNBHqqLHLl/1XB6tVlZwAIYxK++H6ID02hl+ZCBuq+e21R X-Developer-Key: i=xianwei.zhao@amlogic.com; a=ed25519; pk=o4fDH8ZXL6xQg5h17eNzRljf6pwZHWWjqcOSsj3dW24= X-Endpoint-Received: by B4 Relay for xianwei.zhao@amlogic.com/20231208 with auth_id=107 X-Original-From: Xianwei Zhao X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250327_022639_239726_5A29EB5B X-CRM114-Status: UNSURE ( 8.87 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: xianwei.zhao@amlogic.com Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org From: Xianwei Zhao From: Xianwei Zhao Add pinctrl device to support Amlogic A5. Signed-off-by: Xianwei Zhao --- arch/arm64/boot/dts/amlogic/amlogic-a5.dtsi | 90 +++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) diff --git a/arch/arm64/boot/dts/amlogic/amlogic-a5.dtsi b/arch/arm64/boot/dts/amlogic/amlogic-a5.dtsi index 32ed1776891b..844302db2133 100644 --- a/arch/arm64/boot/dts/amlogic/amlogic-a5.dtsi +++ b/arch/arm64/boot/dts/amlogic/amlogic-a5.dtsi @@ -4,6 +4,7 @@ */ #include "amlogic-a4-common.dtsi" +#include #include / { cpus { @@ -50,6 +51,95 @@ pwrc: power-controller { }; &apb { + periphs_pinctrl: pinctrl@4000 { + compatible = "amlogic,pinctrl-a5", + "amlogic,pinctrl-a4"; + #address-cells = <2>; + #size-cells = <2>; + ranges = <0x0 0x0 0x0 0x4000 0x0 0x300>; + + gpioz: gpio@c0 { + reg = <0x0 0xc0 0x0 0x40>, + <0x0 0x18 0x0 0x8>; + reg-names = "gpio", "mux"; + gpio-controller; + #gpio-cells = <2>; + gpio-ranges = <&periphs_pinctrl 0 (AMLOGIC_GPIO_Z<<8) 16>; + }; + + gpiox: gpio@100 { + reg = <0x0 0x100 0x0 0x40>, + <0x0 0xc 0x0 0xc>; + reg-names = "gpio", "mux"; + gpio-controller; + #gpio-cells = <2>; + gpio-ranges = <&periphs_pinctrl 0 (AMLOGIC_GPIO_X<<8) 20>; + }; + + gpiot: gpio@140 { + reg = <0x0 0x140 0x0 0x40>, + <0x0 0x2c 0x0 0x8>; + reg-names = "gpio", "mux"; + gpio-controller; + #gpio-cells = <2>; + gpio-ranges = <&periphs_pinctrl 0 (AMLOGIC_GPIO_T<<8) 14>; + }; + + gpiod: gpio@180 { + reg = <0x0 0x180 0x0 0x40>, + <0x0 0x40 0x0 0x8>; + reg-names = "gpio", "mux"; + gpio-controller; + #gpio-cells = <2>; + gpio-ranges = <&periphs_pinctrl 0 (AMLOGIC_GPIO_D<<8) 16>; + }; + + gpioe: gpio@1c0 { + reg = <0x0 0x1c0 0x0 0x40>, + <0x0 0x48 0x0 0x4>; + reg-names = "gpio", "mux"; + gpio-controller; + #gpio-cells = <2>; + gpio-ranges = <&periphs_pinctrl 0 (AMLOGIC_GPIO_E<<8) 2>; + }; + + gpioc: gpio@200 { + reg = <0x0 0x200 0x0 0x40>, + <0x0 0x24 0x0 0x8>; + reg-names = "gpio", "mux"; + gpio-controller; + #gpio-cells = <2>; + gpio-ranges = <&periphs_pinctrl 0 (AMLOGIC_GPIO_C<<8) 11>; + }; + + gpiob: gpio@240 { + reg = <0x0 0x240 0x0 0x40>, + <0x0 0x0 0x0 0x8>; + reg-names = "gpio", "mux"; + gpio-controller; + #gpio-cells = <2>; + gpio-ranges = <&periphs_pinctrl 0 (AMLOGIC_GPIO_B<<8) 14>; + }; + + gpioh: gpio@280 { + reg = <0x0 0x280 0x0 0x40>, + <0x0 0x4c 0x0 0x4>; + reg-names = "gpio", "mux"; + gpio-controller; + #gpio-cells = <2>; + gpio-ranges = <&periphs_pinctrl 0 (AMLOGIC_GPIO_H<<8) 5>; + }; + + gpio_test_n: gpio@2c0 { + reg = <0x0 0x2c0 0x0 0x40>, + <0x0 0x3c 0x0 0x4>; + reg-names = "gpio", "mux"; + gpio-controller; + #gpio-cells = <2>; + gpio-ranges = <&periphs_pinctrl 0 (AMLOGIC_GPIO_TEST_N<<8) 1>; + }; + }; + gpio_intc: interrupt-controller@4080 { compatible = "amlogic,a5-gpio-intc", "amlogic,meson-gpio-intc";