From patchwork Fri Dec 29 16:11:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Jonker X-Patchwork-Id: 13506560 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 96BDFC47072 for ; Fri, 29 Dec 2023 16:12:29 +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:Cc:To:Subject:From:MIME-Version:Date: Message-ID:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=ajiHg4J3O3i0vZPqaCn7Ib5Doo6ZTWKoIi7t/Fi+V0s=; b=N/t83ENeUoR2tI FsxA7Jqrk8/5spW9umeROVwwxw+D6UfZh7I4R2TOzM69UujYPzG90FY4/FmAwTZeFPW7b8raiHHVW 8omj1R9heDGM7kxXtSO7zG2g1k0m2rLVrHh3Q8y5wFGRFpBHl0IZqHNArSB8bMnHSWcjlVKENDEkL QUWQ6uHPNLh9Nobqvy32zhMXt+C6R84s4bO4JC/h2poJDzC3motKH4n+EsI/HODN9Ge9956zR16Bu +9ua/3oeiBdyisyM2ra77iW7Y78V6Wnh9OltCtrhd+JXPhIvrE6BFu4T/sxklk9DKt/1aUIy+GJuN HbggMa7QwIg/JhNgndrw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rJFT0-001A5n-2o; Fri, 29 Dec 2023 16:12:10 +0000 Received: from mail-ed1-x535.google.com ([2a00:1450:4864:20::535]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rJFSx-001A3y-1K; Fri, 29 Dec 2023 16:12:09 +0000 Received: by mail-ed1-x535.google.com with SMTP id 4fb4d7f45d1cf-55372c1338bso7372666a12.2; Fri, 29 Dec 2023 08:12:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1703866319; x=1704471119; darn=lists.infradead.org; h=content-transfer-encoding:content-language:cc:to:subject:from :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=YghuGF2un/ZZxnFMyhWAtmWnspGiZfAjoU/WXmr+UHs=; b=cvamCPx7v98ELNsi10OVDZK3pgx63s6havutbIDy1FG/SjCsVUlSs+cllGYrnEhtb4 idDXTH5IW6aocXlcANftFGlRGKgCufWymuY08+mbWAJt5et4O+p8FwHHSVd+QBefIb5K XohvCjxww3ktcTYKtulqSijqpYm+StYG17qGFqHFJRNhG1auO4iqE6mGKub9jzKFvdR+ GK2/WlTK9MOAPH4ycr8oCGVGjpp5Pv5Iz7sTLbJGnzR5sUuTGIHp3AdepArNOyoJ8bZe xk4BZnAp1+y2arwngLKogscLy2FKyRtQDZjetSMiqIowozHCp5DUetaoIQ+DylOKugbU Hdug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703866319; x=1704471119; h=content-transfer-encoding:content-language:cc:to:subject:from :user-agent:mime-version:date:message-id:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=YghuGF2un/ZZxnFMyhWAtmWnspGiZfAjoU/WXmr+UHs=; b=Z3DVUs156ySaJQrJ7xPXXI95FUYJGh1mZURA3WADRELhL9GWakV7U9cjBRjh80Wrbj 40ggsDrbwtX00BXrWpV12YyEgPY5Efj72EZYASxjAbFVmCTl6cvXqCEI70G+2QV7KZWJ PCz3RLKZzenNSzuBUYU21ae2viwIxy7+oy+WGPnGESrg1zx+CW552gjgCuDDxjN2qt9m RBnevM4YYGwY+RJaviT+pIu75eIkOd+DujstFUnINXrUo4essHnduwdipQDXQ5AtF6Km nYsgc2Bg1enggqShxewykA3aJ3A411Q2CXNFtyVIJxznDUzXrf3tEVZuhd6Xn5JwgEdr zRSw== X-Gm-Message-State: AOJu0YwWPCwdBX+sqBu4J7f4ODh4WqCCZ0DuFqccq/racKZlMlxDli4P DnrP19tERgvxqqW3vPVM100= X-Google-Smtp-Source: AGHT+IFbw8fLN6HRHfvS0H7TQb761VLpKKwaXVrxZyVxP/ZjtXWG7x1XLSjCfKJ8kXqBm2QRvNxywQ== X-Received: by 2002:a17:906:1ecf:b0:a27:32aa:2dda with SMTP id m15-20020a1709061ecf00b00a2732aa2ddamr2543165ejj.96.1703866319512; Fri, 29 Dec 2023 08:11:59 -0800 (PST) Received: from [192.168.2.1] (81-204-249-205.fixed.kpn.net. [81.204.249.205]) by smtp.gmail.com with ESMTPSA id fv14-20020a170907508e00b00a269f8e8869sm8417096ejc.128.2023.12.29.08.11.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 29 Dec 2023 08:11:58 -0800 (PST) Message-ID: <26007385-81dc-9961-05d5-8b9a0969d0b6@gmail.com> Date: Fri, 29 Dec 2023 17:11:57 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 From: Johan Jonker Subject: [PATCH v4 1/2] ARM: dts: rockchip: add gpio-ranges property to gpio nodes To: heiko@sntech.de Cc: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, kever.yang@rock-chips.com, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231229_081207_539749_76E312DB X-CRM114-Status: GOOD ( 10.22 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org Add a gpio-ranges property to Rockchip gpio nodes similar to rk356x/rk3588 to be independent from aliases and probe order. Signed-off-by: Johan Jonker Reviewed-by: Kever Yang --- Changed V4: change number of pins for rk3066,rk3288 and rv1126 (Jonas) Changed V3: reword rebase to new rockchip directory remove unknown properties --- arch/arm/boot/dts/rockchip/rk3036.dtsi | 3 +++ arch/arm/boot/dts/rockchip/rk3066a.dtsi | 6 ++++++ arch/arm/boot/dts/rockchip/rk3128.dtsi | 4 ++++ arch/arm/boot/dts/rockchip/rk3188.dtsi | 4 ++++ arch/arm/boot/dts/rockchip/rk322x.dtsi | 4 ++++ arch/arm/boot/dts/rockchip/rk3288.dtsi | 9 +++++++++ arch/arm/boot/dts/rockchip/rv1108.dtsi | 4 ++++ arch/arm/boot/dts/rockchip/rv1126.dtsi | 5 +++++ 8 files changed, 39 insertions(+) -- 2.39.2 diff --git a/arch/arm/boot/dts/rockchip/rk3036.dtsi b/arch/arm/boot/dts/rockchip/rk3036.dtsi index 2b00109bea6a..6e5028b6dbfa 100644 --- a/arch/arm/boot/dts/rockchip/rk3036.dtsi +++ b/arch/arm/boot/dts/rockchip/rk3036.dtsi @@ -593,6 +593,7 @@ gpio0: gpio@2007c000 { clocks = <&cru PCLK_GPIO0>; gpio-controller; + gpio-ranges = <&pinctrl 0 0 32>; #gpio-cells = <2>; interrupt-controller; @@ -606,6 +607,7 @@ gpio1: gpio@20080000 { clocks = <&cru PCLK_GPIO1>; gpio-controller; + gpio-ranges = <&pinctrl 0 32 32>; #gpio-cells = <2>; interrupt-controller; @@ -619,6 +621,7 @@ gpio2: gpio@20084000 { clocks = <&cru PCLK_GPIO2>; gpio-controller; + gpio-ranges = <&pinctrl 0 64 32>; #gpio-cells = <2>; interrupt-controller; diff --git a/arch/arm/boot/dts/rockchip/rk3066a.dtsi b/arch/arm/boot/dts/rockchip/rk3066a.dtsi index 30139f21de64..9a8603b34fa2 100644 --- a/arch/arm/boot/dts/rockchip/rk3066a.dtsi +++ b/arch/arm/boot/dts/rockchip/rk3066a.dtsi @@ -285,6 +285,7 @@ gpio0: gpio@20034000 { clocks = <&cru PCLK_GPIO0>; gpio-controller; + gpio-ranges = <&pinctrl 0 0 32>; #gpio-cells = <2>; interrupt-controller; @@ -298,6 +299,7 @@ gpio1: gpio@2003c000 { clocks = <&cru PCLK_GPIO1>; gpio-controller; + gpio-ranges = <&pinctrl 0 32 32>; #gpio-cells = <2>; interrupt-controller; @@ -311,6 +313,7 @@ gpio2: gpio@2003e000 { clocks = <&cru PCLK_GPIO2>; gpio-controller; + gpio-ranges = <&pinctrl 0 64 32>; #gpio-cells = <2>; interrupt-controller; @@ -324,6 +327,7 @@ gpio3: gpio@20080000 { clocks = <&cru PCLK_GPIO3>; gpio-controller; + gpio-ranges = <&pinctrl 0 96 32>; #gpio-cells = <2>; interrupt-controller; @@ -337,6 +341,7 @@ gpio4: gpio@20084000 { clocks = <&cru PCLK_GPIO4>; gpio-controller; + gpio-ranges = <&pinctrl 0 128 32>; #gpio-cells = <2>; interrupt-controller; @@ -350,6 +355,7 @@ gpio6: gpio@2000a000 { clocks = <&cru PCLK_GPIO6>; gpio-controller; + gpio-ranges = <&pinctrl 0 192 16>; #gpio-cells = <2>; interrupt-controller; diff --git a/arch/arm/boot/dts/rockchip/rk3128.dtsi b/arch/arm/boot/dts/rockchip/rk3128.dtsi index e2264c40b924..d66fcf12032e 100644 --- a/arch/arm/boot/dts/rockchip/rk3128.dtsi +++ b/arch/arm/boot/dts/rockchip/rk3128.dtsi @@ -712,6 +712,7 @@ gpio0: gpio@2007c000 { interrupts = ; clocks = <&cru PCLK_GPIO0>; gpio-controller; + gpio-ranges = <&pinctrl 0 0 32>; #gpio-cells = <2>; interrupt-controller; #interrupt-cells = <2>; @@ -723,6 +724,7 @@ gpio1: gpio@20080000 { interrupts = ; clocks = <&cru PCLK_GPIO1>; gpio-controller; + gpio-ranges = <&pinctrl 0 32 32>; #gpio-cells = <2>; interrupt-controller; #interrupt-cells = <2>; @@ -734,6 +736,7 @@ gpio2: gpio@20084000 { interrupts = ; clocks = <&cru PCLK_GPIO2>; gpio-controller; + gpio-ranges = <&pinctrl 0 64 32>; #gpio-cells = <2>; interrupt-controller; #interrupt-cells = <2>; @@ -745,6 +748,7 @@ gpio3: gpio@20088000 { interrupts = ; clocks = <&cru PCLK_GPIO3>; gpio-controller; + gpio-ranges = <&pinctrl 0 96 32>; #gpio-cells = <2>; interrupt-controller; #interrupt-cells = <2>; diff --git a/arch/arm/boot/dts/rockchip/rk3188.dtsi b/arch/arm/boot/dts/rockchip/rk3188.dtsi index 44b54af0bbf9..6677e4a10e5d 100644 --- a/arch/arm/boot/dts/rockchip/rk3188.dtsi +++ b/arch/arm/boot/dts/rockchip/rk3188.dtsi @@ -231,6 +231,7 @@ gpio0: gpio@2000a000 { clocks = <&cru PCLK_GPIO0>; gpio-controller; + gpio-ranges = <&pinctrl 0 0 32>; #gpio-cells = <2>; interrupt-controller; @@ -244,6 +245,7 @@ gpio1: gpio@2003c000 { clocks = <&cru PCLK_GPIO1>; gpio-controller; + gpio-ranges = <&pinctrl 0 32 32>; #gpio-cells = <2>; interrupt-controller; @@ -257,6 +259,7 @@ gpio2: gpio@2003e000 { clocks = <&cru PCLK_GPIO2>; gpio-controller; + gpio-ranges = <&pinctrl 0 64 32>; #gpio-cells = <2>; interrupt-controller; @@ -270,6 +273,7 @@ gpio3: gpio@20080000 { clocks = <&cru PCLK_GPIO3>; gpio-controller; + gpio-ranges = <&pinctrl 0 96 32>; #gpio-cells = <2>; interrupt-controller; diff --git a/arch/arm/boot/dts/rockchip/rk322x.dtsi b/arch/arm/boot/dts/rockchip/rk322x.dtsi index 831561fc1814..0d4f9957b99b 100644 --- a/arch/arm/boot/dts/rockchip/rk322x.dtsi +++ b/arch/arm/boot/dts/rockchip/rk322x.dtsi @@ -959,6 +959,7 @@ gpio0: gpio@11110000 { clocks = <&cru PCLK_GPIO0>; gpio-controller; + gpio-ranges = <&pinctrl 0 0 32>; #gpio-cells = <2>; interrupt-controller; @@ -972,6 +973,7 @@ gpio1: gpio@11120000 { clocks = <&cru PCLK_GPIO1>; gpio-controller; + gpio-ranges = <&pinctrl 0 32 32>; #gpio-cells = <2>; interrupt-controller; @@ -985,6 +987,7 @@ gpio2: gpio@11130000 { clocks = <&cru PCLK_GPIO2>; gpio-controller; + gpio-ranges = <&pinctrl 0 64 32>; #gpio-cells = <2>; interrupt-controller; @@ -998,6 +1001,7 @@ gpio3: gpio@11140000 { clocks = <&cru PCLK_GPIO3>; gpio-controller; + gpio-ranges = <&pinctrl 0 96 32>; #gpio-cells = <2>; interrupt-controller; diff --git a/arch/arm/boot/dts/rockchip/rk3288.dtsi b/arch/arm/boot/dts/rockchip/rk3288.dtsi index ead343dc3df1..7116399461c8 100644 --- a/arch/arm/boot/dts/rockchip/rk3288.dtsi +++ b/arch/arm/boot/dts/rockchip/rk3288.dtsi @@ -1461,6 +1461,7 @@ gpio0: gpio@ff750000 { clocks = <&cru PCLK_GPIO0>; gpio-controller; + gpio-ranges = <&pinctrl 0 0 24>; #gpio-cells = <2>; interrupt-controller; @@ -1474,6 +1475,7 @@ gpio1: gpio@ff780000 { clocks = <&cru PCLK_GPIO1>; gpio-controller; + gpio-ranges = <&pinctrl 0 32 32>; #gpio-cells = <2>; interrupt-controller; @@ -1487,6 +1489,7 @@ gpio2: gpio@ff790000 { clocks = <&cru PCLK_GPIO2>; gpio-controller; + gpio-ranges = <&pinctrl 0 64 32>; #gpio-cells = <2>; interrupt-controller; @@ -1500,6 +1503,7 @@ gpio3: gpio@ff7a0000 { clocks = <&cru PCLK_GPIO3>; gpio-controller; + gpio-ranges = <&pinctrl 0 96 32>; #gpio-cells = <2>; interrupt-controller; @@ -1513,6 +1517,7 @@ gpio4: gpio@ff7b0000 { clocks = <&cru PCLK_GPIO4>; gpio-controller; + gpio-ranges = <&pinctrl 0 128 32>; #gpio-cells = <2>; interrupt-controller; @@ -1526,6 +1531,7 @@ gpio5: gpio@ff7c0000 { clocks = <&cru PCLK_GPIO5>; gpio-controller; + gpio-ranges = <&pinctrl 0 160 32>; #gpio-cells = <2>; interrupt-controller; @@ -1539,6 +1545,7 @@ gpio6: gpio@ff7d0000 { clocks = <&cru PCLK_GPIO6>; gpio-controller; + gpio-ranges = <&pinctrl 0 192 32>; #gpio-cells = <2>; interrupt-controller; @@ -1552,6 +1559,7 @@ gpio7: gpio@ff7e0000 { clocks = <&cru PCLK_GPIO7>; gpio-controller; + gpio-ranges = <&pinctrl 0 224 32>; #gpio-cells = <2>; interrupt-controller; @@ -1565,6 +1573,7 @@ gpio8: gpio@ff7f0000 { clocks = <&cru PCLK_GPIO8>; gpio-controller; + gpio-ranges = <&pinctrl 0 256 16>; #gpio-cells = <2>; interrupt-controller; diff --git a/arch/arm/boot/dts/rockchip/rv1108.dtsi b/arch/arm/boot/dts/rockchip/rv1108.dtsi index abf3006f0a84..d12b97ee7588 100644 --- a/arch/arm/boot/dts/rockchip/rv1108.dtsi +++ b/arch/arm/boot/dts/rockchip/rv1108.dtsi @@ -602,6 +602,7 @@ gpio0: gpio@20030000 { clocks = <&cru PCLK_GPIO0_PMU>; gpio-controller; + gpio-ranges = <&pinctrl 0 0 32>; #gpio-cells = <2>; interrupt-controller; @@ -615,6 +616,7 @@ gpio1: gpio@10310000 { clocks = <&cru PCLK_GPIO1>; gpio-controller; + gpio-ranges = <&pinctrl 0 32 32>; #gpio-cells = <2>; interrupt-controller; @@ -628,6 +630,7 @@ gpio2: gpio@10320000 { clocks = <&cru PCLK_GPIO2>; gpio-controller; + gpio-ranges = <&pinctrl 0 64 32>; #gpio-cells = <2>; interrupt-controller; @@ -641,6 +644,7 @@ gpio3: gpio@10330000 { clocks = <&cru PCLK_GPIO3>; gpio-controller; + gpio-ranges = <&pinctrl 0 96 32>; #gpio-cells = <2>; interrupt-controller; diff --git a/arch/arm/boot/dts/rockchip/rv1126.dtsi b/arch/arm/boot/dts/rockchip/rv1126.dtsi index bb603cae13df..cf58cca4f09e 100644 --- a/arch/arm/boot/dts/rockchip/rv1126.dtsi +++ b/arch/arm/boot/dts/rockchip/rv1126.dtsi @@ -569,6 +569,7 @@ gpio0: gpio@ff460000 { interrupts = ; clocks = <&pmucru PCLK_GPIO0>, <&pmucru DBCLK_GPIO0>; gpio-controller; + gpio-ranges = <&pinctrl 0 0 32>; #gpio-cells = <2>; interrupt-controller; #interrupt-cells = <2>; @@ -580,6 +581,7 @@ gpio1: gpio@ff620000 { interrupts = ; clocks = <&cru PCLK_GPIO1>, <&cru DBCLK_GPIO1>; gpio-controller; + gpio-ranges = <&pinctrl 0 32 32>; #gpio-cells = <2>; interrupt-controller; #interrupt-cells = <2>; @@ -591,6 +593,7 @@ gpio2: gpio@ff630000 { interrupts = ; clocks = <&cru PCLK_GPIO2>, <&cru DBCLK_GPIO2>; gpio-controller; + gpio-ranges = <&pinctrl 0 64 32>; #gpio-cells = <2>; interrupt-controller; #interrupt-cells = <2>; @@ -602,6 +605,7 @@ gpio3: gpio@ff640000 { interrupts = ; clocks = <&cru PCLK_GPIO3>, <&cru DBCLK_GPIO3>; gpio-controller; + gpio-ranges = <&pinctrl 0 96 32>; #gpio-cells = <2>; interrupt-controller; #interrupt-cells = <2>; @@ -613,6 +617,7 @@ gpio4: gpio@ff650000 { interrupts = ; clocks = <&cru PCLK_GPIO4>, <&cru DBCLK_GPIO4>; gpio-controller; + gpio-ranges = <&pinctrl 0 128 2>; #gpio-cells = <2>; interrupt-controller; #interrupt-cells = <2>; From patchwork Fri Dec 29 16:12:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Jonker X-Patchwork-Id: 13506563 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 0D983C47073 for ; Fri, 29 Dec 2023 16:13:14 +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:In-Reply-To:References:Cc:To:Subject: From:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=t8sKWYgFYlN5+LhGrlWI+cblGoNdKHfayQS5HwS2gxo=; b=jPN1SMppbn6NmL TkqLWgwyLvGD8EF1mNFTZdblxWeRRheTgJ5iK/V4Pnk/KscHATAG9IUnTsnISb3U6ZQMPyGHebg0+ S0jb3DO+hewPyUqN+C7e0cwGMEgsJU1Lh0oP8bwujddPVRTl+7j8Z5rRklJfEDaHKjrCXTQKY5HPV 2ybja6clAn4u6FsfF368V88/GW2nswEQgf0PIr3bQrH0QTTnCYToXAwfqYvqALSeIM/QuqF+93SXn VmTaSB8QPClVgeWh38D2VbdWQGXyxHtbCvbE02XYeVvqizFFaSi94HHIAcAKFz6+uYEFlumk2Qwkf Xc/qlKT9TkuzLEnD0t1w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rJFTp-001AGn-2k; Fri, 29 Dec 2023 16:13:01 +0000 Received: from mail-lf1-x129.google.com ([2a00:1450:4864:20::129]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rJFTm-001AFx-1N; Fri, 29 Dec 2023 16:13:00 +0000 Received: by mail-lf1-x129.google.com with SMTP id 2adb3069b0e04-50e7aed09adso4731373e87.0; Fri, 29 Dec 2023 08:12:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1703866374; x=1704471174; darn=lists.infradead.org; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:subject:from:user-agent:mime-version:date:message-id:from:to :cc:subject:date:message-id:reply-to; bh=uXclIxtXqPFsxy0XcvgnkjbTaVqZ7ItIisfYtSYDS1c=; b=it0+pN/iPdyCpRAX0h8LbkLNNovwYpIopPXLRSRpAsghU7zHQyb2sf/PDdY910mAO7 wRPSKeseh0GJf1d1lKtTh9EJadHi4SC2lEm4u/y1TCKRUkrhuvoZgKSqNCEsRj8vmMse 2EmljyYEIm9V38gNmDjx96BSnhC1j2H2XnTXA8LEDQTu2qHXmF0CndwvF6nKFDsqp1t5 9B/c0AMj5e3g1fZGdsdLRLVi/0fj/smvRN0HVyoMxR76m2SYdGfRhnbm/KVqxPXQ/5TQ EShnIWppxkZApVsdWoeGPGsHTMew88v1mj0/V+/9FVuhGcfLE+SsNrdc+Pl5OnM4euSw h+Vg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703866374; x=1704471174; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:subject:from:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=uXclIxtXqPFsxy0XcvgnkjbTaVqZ7ItIisfYtSYDS1c=; b=DtGuRR53mS/Pksu9fkxgOvp+ryzbEIywO/0659/fuTHATp53LurA1/1lnfkWbuz3tL O3IzB+yAqMhD4yzxFTvlLE1rQt1eUQGmvmjbYAzhDihYpHvEaGWgHjauiotVlG9XC69t vDB0W08NtpqIUfeS6mEJ74NuVLAAhr6acFi72DtzTSILhrRCHJuG6JncuL9L0wVSjsuc WgPyuDta0NDzI9JEC545+oB5RdB8SfNtpNXpa0am1cH/D8ITstCeLkGKD+jTxQ9Sjsdp 3VGG1B8eTLMixZSEVwTIM+xKR6XuDvevM2A6Pslec+ZevTA3HMNpBxNleUa8VYEus++Z Pixg== X-Gm-Message-State: AOJu0YzljilWR/GUPyEvRu9SGyyfegmSe9B9FKdN1NE5pb65tZTg4vLG I1H+OFcIgcExSpUqfDRJDFA55C+xeFk= X-Google-Smtp-Source: AGHT+IEoFACccC5y4WSZ4NEC++5o3kSgCsgwMu9rljl0dlfSrV72atbmVicDlHhumYF13mACQU7ZcA== X-Received: by 2002:a05:6512:3986:b0:50e:7f9d:18d8 with SMTP id j6-20020a056512398600b0050e7f9d18d8mr3277511lfu.85.1703866374196; Fri, 29 Dec 2023 08:12:54 -0800 (PST) Received: from [192.168.2.1] (81-204-249-205.fixed.kpn.net. [81.204.249.205]) by smtp.gmail.com with ESMTPSA id az15-20020a170907904f00b00a26aa734349sm7988188ejc.39.2023.12.29.08.12.53 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 29 Dec 2023 08:12:53 -0800 (PST) Message-ID: <18c8c89a-9962-40f0-814f-81e2c420c957@gmail.com> Date: Fri, 29 Dec 2023 17:12:52 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 From: Johan Jonker Subject: [PATCH v4 2/2] arm64: dts: rockchip: add gpio-ranges property to gpio nodes To: heiko@sntech.de Cc: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, kever.yang@rock-chips.com, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org References: <26007385-81dc-9961-05d5-8b9a0969d0b6@gmail.com> Content-Language: en-US In-Reply-To: <26007385-81dc-9961-05d5-8b9a0969d0b6@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231229_081258_466651_1D1F14C0 X-CRM114-Status: UNSURE ( 8.53 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org Add a gpio-ranges property to Rockchip gpio nodes similar to rk356x/rk3588 to be independent from aliases and probe order. Signed-off-by: Johan Jonker Reviewed-by: Kever Yang --- Changed V3: reword remove rk356x part --- arch/arm64/boot/dts/rockchip/px30.dtsi | 4 ++++ arch/arm64/boot/dts/rockchip/rk3308.dtsi | 5 +++++ arch/arm64/boot/dts/rockchip/rk3328.dtsi | 4 ++++ arch/arm64/boot/dts/rockchip/rk3368.dtsi | 4 ++++ arch/arm64/boot/dts/rockchip/rk3399.dtsi | 5 +++++ 5 files changed, 22 insertions(+) -- 2.39.2 diff --git a/arch/arm64/boot/dts/rockchip/px30.dtsi b/arch/arm64/boot/dts/rockchip/px30.dtsi index d0905515399b..27d045296388 100644 --- a/arch/arm64/boot/dts/rockchip/px30.dtsi +++ b/arch/arm64/boot/dts/rockchip/px30.dtsi @@ -1394,6 +1394,7 @@ gpio0: gpio@ff040000 { interrupts = ; clocks = <&pmucru PCLK_GPIO0_PMU>; gpio-controller; + gpio-ranges = <&pinctrl 0 0 32>; #gpio-cells = <2>; interrupt-controller; @@ -1406,6 +1407,7 @@ gpio1: gpio@ff250000 { interrupts = ; clocks = <&cru PCLK_GPIO1>; gpio-controller; + gpio-ranges = <&pinctrl 0 32 32>; #gpio-cells = <2>; interrupt-controller; @@ -1418,6 +1420,7 @@ gpio2: gpio@ff260000 { interrupts = ; clocks = <&cru PCLK_GPIO2>; gpio-controller; + gpio-ranges = <&pinctrl 0 64 32>; #gpio-cells = <2>; interrupt-controller; @@ -1430,6 +1433,7 @@ gpio3: gpio@ff270000 { interrupts = ; clocks = <&cru PCLK_GPIO3>; gpio-controller; + gpio-ranges = <&pinctrl 0 96 32>; #gpio-cells = <2>; interrupt-controller; diff --git a/arch/arm64/boot/dts/rockchip/rk3308.dtsi b/arch/arm64/boot/dts/rockchip/rk3308.dtsi index cfc0a87b5195..09fda512c101 100644 --- a/arch/arm64/boot/dts/rockchip/rk3308.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3308.dtsi @@ -804,6 +804,7 @@ gpio0: gpio@ff220000 { interrupts = ; clocks = <&cru PCLK_GPIO0>; gpio-controller; + gpio-ranges = <&pinctrl 0 0 32>; #gpio-cells = <2>; interrupt-controller; #interrupt-cells = <2>; @@ -815,6 +816,7 @@ gpio1: gpio@ff230000 { interrupts = ; clocks = <&cru PCLK_GPIO1>; gpio-controller; + gpio-ranges = <&pinctrl 0 32 32>; #gpio-cells = <2>; interrupt-controller; #interrupt-cells = <2>; @@ -826,6 +828,7 @@ gpio2: gpio@ff240000 { interrupts = ; clocks = <&cru PCLK_GPIO2>; gpio-controller; + gpio-ranges = <&pinctrl 0 64 32>; #gpio-cells = <2>; interrupt-controller; #interrupt-cells = <2>; @@ -837,6 +840,7 @@ gpio3: gpio@ff250000 { interrupts = ; clocks = <&cru PCLK_GPIO3>; gpio-controller; + gpio-ranges = <&pinctrl 0 96 32>; #gpio-cells = <2>; interrupt-controller; #interrupt-cells = <2>; @@ -848,6 +852,7 @@ gpio4: gpio@ff260000 { interrupts = ; clocks = <&cru PCLK_GPIO4>; gpio-controller; + gpio-ranges = <&pinctrl 0 128 32>; #gpio-cells = <2>; interrupt-controller; #interrupt-cells = <2>; diff --git a/arch/arm64/boot/dts/rockchip/rk3328.dtsi b/arch/arm64/boot/dts/rockchip/rk3328.dtsi index fb5dcf6e9327..2cead2e85c07 100644 --- a/arch/arm64/boot/dts/rockchip/rk3328.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3328.dtsi @@ -1058,6 +1058,7 @@ gpio0: gpio@ff210000 { clocks = <&cru PCLK_GPIO0>; gpio-controller; + gpio-ranges = <&pinctrl 0 0 32>; #gpio-cells = <2>; interrupt-controller; @@ -1071,6 +1072,7 @@ gpio1: gpio@ff220000 { clocks = <&cru PCLK_GPIO1>; gpio-controller; + gpio-ranges = <&pinctrl 0 32 32>; #gpio-cells = <2>; interrupt-controller; @@ -1084,6 +1086,7 @@ gpio2: gpio@ff230000 { clocks = <&cru PCLK_GPIO2>; gpio-controller; + gpio-ranges = <&pinctrl 0 64 32>; #gpio-cells = <2>; interrupt-controller; @@ -1097,6 +1100,7 @@ gpio3: gpio@ff240000 { clocks = <&cru PCLK_GPIO3>; gpio-controller; + gpio-ranges = <&pinctrl 0 96 32>; #gpio-cells = <2>; interrupt-controller; diff --git a/arch/arm64/boot/dts/rockchip/rk3368.dtsi b/arch/arm64/boot/dts/rockchip/rk3368.dtsi index 62af0cb94839..2a017c862263 100644 --- a/arch/arm64/boot/dts/rockchip/rk3368.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3368.dtsi @@ -987,6 +987,7 @@ gpio0: gpio@ff750000 { interrupts = ; gpio-controller; + gpio-ranges = <&pinctrl 0 0 32>; #gpio-cells = <0x2>; interrupt-controller; @@ -1000,6 +1001,7 @@ gpio1: gpio@ff780000 { interrupts = ; gpio-controller; + gpio-ranges = <&pinctrl 0 32 32>; #gpio-cells = <0x2>; interrupt-controller; @@ -1013,6 +1015,7 @@ gpio2: gpio@ff790000 { interrupts = ; gpio-controller; + gpio-ranges = <&pinctrl 0 64 32>; #gpio-cells = <0x2>; interrupt-controller; @@ -1026,6 +1029,7 @@ gpio3: gpio@ff7a0000 { interrupts = ; gpio-controller; + gpio-ranges = <&pinctrl 0 96 32>; #gpio-cells = <0x2>; interrupt-controller; diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi b/arch/arm64/boot/dts/rockchip/rk3399.dtsi index 6e12c5a920ca..206f7d54d4d0 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi @@ -2138,6 +2138,7 @@ gpio0: gpio@ff720000 { interrupts = ; gpio-controller; + gpio-ranges = <&pinctrl 0 0 32>; #gpio-cells = <0x2>; interrupt-controller; @@ -2151,6 +2152,7 @@ gpio1: gpio@ff730000 { interrupts = ; gpio-controller; + gpio-ranges = <&pinctrl 0 32 32>; #gpio-cells = <0x2>; interrupt-controller; @@ -2164,6 +2166,7 @@ gpio2: gpio@ff780000 { interrupts = ; gpio-controller; + gpio-ranges = <&pinctrl 0 64 32>; #gpio-cells = <0x2>; interrupt-controller; @@ -2177,6 +2180,7 @@ gpio3: gpio@ff788000 { interrupts = ; gpio-controller; + gpio-ranges = <&pinctrl 0 96 32>; #gpio-cells = <0x2>; interrupt-controller; @@ -2190,6 +2194,7 @@ gpio4: gpio@ff790000 { interrupts = ; gpio-controller; + gpio-ranges = <&pinctrl 0 128 32>; #gpio-cells = <0x2>; interrupt-controller;