From patchwork Sun Sep 15 02:40:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Drew Fustini X-Patchwork-Id: 13804641 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 62382C35FE0 for ; Sun, 15 Sep 2024 02:43:28 +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:In-Reply-To:References:Message-Id :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=fxsKd4DDvFoYWwyRWCzZaHhqtvL3A5QInwThbek+DKU=; b=wOv/dQ+O8zwRq3 4//JoZwN/iaV9/OW4bzSud9aGG8tS34Xqpvcyi5xpkJ41R3HNBfuw0+/CQTrpSgIag3sJtVmBt45e TTg2fPNGtiM9MOW6iWq1U5/VdgvlyzxkFYCCtY3+YrZzA2y280TemJYajcazDIfA4MmrkxFYOCrJP BjBxJunxLSKLLp54u+IB2inOuv5oLYpjeg7fokLOqjJwDfPnzWjRUlcxVbA518rcIbHk391gGMXhI 4g7dN6rJNGp1yqCCWsSbchkrb+XW0ftGW85nwdzFxiTY99qpLisB1eRAQ+necVPNcIOdj86N+fND5 rTh+5QFhxmLl1mDg5j6w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1spfER-00000001W4z-2SrW; Sun, 15 Sep 2024 02:43:23 +0000 Received: from mail-yw1-x112a.google.com ([2607:f8b0:4864:20::112a]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1spfEO-00000001W3c-3Hah for linux-riscv@lists.infradead.org; Sun, 15 Sep 2024 02:43:22 +0000 Received: by mail-yw1-x112a.google.com with SMTP id 00721157ae682-6dbc5db8a31so18916627b3.1 for ; Sat, 14 Sep 2024 19:43:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tenstorrent.com; s=google; t=1726368200; x=1726973000; darn=lists.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=UGO1yLxxHEIvNc6iD6daAleZYqe3CnKG4fr/mNU2r2w=; b=OyYB42Wj5cVfoB2g/WT8FiLIQxWDJu0zLT8g6P41giS25NMCy3GgzIAUKrX4qg5LVE OAgMafkN0dWifCnRzt3r6frFAC8nCZfuJC3rLQg6IXAEAM/L50slUAOHK1UWFfyUUMtI Hd2Gaj9u7zDiPtLNjT59djCSBzZ1erHWCvJAj+cuAhZn9NK/hRHGNemgxmzva51uLPAJ XEQuuMHjx4qDE1iDOVkYxbIzBvuJ6iS72AbElN8GL75tHfEuMWLWK5MyywkoW0YZfLHq v1+916KRvJSVBveR/iCXSbsbVtZVdGUOiiiBV92erj4/MzUozkqN7szjwyPKIB4T8wqG zNDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726368200; x=1726973000; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=UGO1yLxxHEIvNc6iD6daAleZYqe3CnKG4fr/mNU2r2w=; b=BrYZWIvFmdNAjxGzoCtT+6yHDrtaaDcq5N0loxrPjrO3Hx9aCRO587SBaHK1HXvhwP k3++oKPVzO9fASnn37iYYS79JEt3tN7e8AHRkUmwI4E7+Pff2dLGiO3SQPW7bvHsk15+ RDJbfXAZlsVceEljWqc1h+8h5YJ45Ad8W/7JLo2Bxo7qih2wvA3+/S4h/wh3KRZKpogy i7cdfZZGxv8lhj8JtqjLn9oTm7yfEoQqY27OIT6+BMV8jI2IledhFzEUVeBxZou2bFbK KP2eE5kX0Y5Lj7cDfDmx207OGFmf6mfAR71JF3+N6VW5CoMSqt2IvG6T+GqVJ1AgNjea aP1w== X-Gm-Message-State: AOJu0YwR/xlghKw2Ciz8febE3vpHXPhrthKqKco7nLAFbTLoE4QM2SZz dz1mnWtiXAtPvEhJmqudNJgICLSiE6YxkAj7+TQq9uUiiLTibAWEoxCzZKd6tYI= X-Google-Smtp-Source: AGHT+IFGuzqRRflj1wW8TL6ghlooIpa8AqTakhwqJ97GzykE6j3xTKcFT699JZ9Wxh8k6Q7914FFfA== X-Received: by 2002:a05:690c:688c:b0:62f:60db:326 with SMTP id 00721157ae682-6db95430797mr140601537b3.20.1726368199814; Sat, 14 Sep 2024 19:43:19 -0700 (PDT) Received: from [127.0.1.1] ([216.139.163.245]) by smtp.gmail.com with ESMTPSA id 00721157ae682-6dbe2e0d924sm4129097b3.41.2024.09.14.19.43.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 14 Sep 2024 19:43:19 -0700 (PDT) From: Drew Fustini Date: Sat, 14 Sep 2024 19:40:53 -0700 Subject: [PATCH v2 5/8] riscv: dts: thead: Adjust TH1520 GPIO labels MIME-Version: 1.0 Message-Id: <20240914-th1520-pinctrl-v2-5-3ba67dde882c@tenstorrent.com> References: <20240914-th1520-pinctrl-v2-0-3ba67dde882c@tenstorrent.com> In-Reply-To: <20240914-th1520-pinctrl-v2-0-3ba67dde882c@tenstorrent.com> To: Drew Fustini , Guo Ren , Fu Wei , Linus Walleij , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Emil Renner Berthing , Thomas Bonnefille , Paul Walmsley , Palmer Dabbelt , Albert Ou Cc: linux-riscv@lists.infradead.org, linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Drew Fustini X-Mailer: b4 0.14.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240914_194320_877296_4F14ADFE X-CRM114-Status: UNSURE ( 9.88 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-riscv@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-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org From: Emil Renner Berthing Adjust labels for the TH1520 GPIO controllers such that GPIOs can be referenced by the names used by the documentation. Eg. GPIO0_X -> <&gpio0 X Y> GPIO1_X -> <&gpio1 X Y> GPIO2_X -> <&gpio2 X Y> GPIO3_X -> <&gpio3 X Y> GPIO4_X -> <&gpio4 X Y> AOGPIO_X -> <&aogpio X Y> Remove labels for the parent GPIO devices that shouldn't need to be referenced. Tested-by: Thomas Bonnefille Signed-off-by: Emil Renner Berthing Signed-off-by: Drew Fustini --- arch/riscv/boot/dts/thead/th1520-beaglev-ahead.dts | 2 ++ arch/riscv/boot/dts/thead/th1520-lichee-pi-4a.dts | 2 ++ arch/riscv/boot/dts/thead/th1520.dtsi | 24 +++++++++++----------- 3 files changed, 16 insertions(+), 12 deletions(-) diff --git a/arch/riscv/boot/dts/thead/th1520-beaglev-ahead.dts b/arch/riscv/boot/dts/thead/th1520-beaglev-ahead.dts index be85e3aee56e..c48f6fd6387b 100644 --- a/arch/riscv/boot/dts/thead/th1520-beaglev-ahead.dts +++ b/arch/riscv/boot/dts/thead/th1520-beaglev-ahead.dts @@ -17,6 +17,8 @@ aliases { gpio1 = &gpio1; gpio2 = &gpio2; gpio3 = &gpio3; + gpio4 = &gpio4; + gpio5 = &aogpio; serial0 = &uart0; serial1 = &uart1; serial2 = &uart2; diff --git a/arch/riscv/boot/dts/thead/th1520-lichee-pi-4a.dts b/arch/riscv/boot/dts/thead/th1520-lichee-pi-4a.dts index 9a3884a73e13..0ae2c20d5641 100644 --- a/arch/riscv/boot/dts/thead/th1520-lichee-pi-4a.dts +++ b/arch/riscv/boot/dts/thead/th1520-lichee-pi-4a.dts @@ -14,6 +14,8 @@ aliases { gpio1 = &gpio1; gpio2 = &gpio2; gpio3 = &gpio3; + gpio4 = &gpio4; + gpio5 = &aogpio; serial0 = &uart0; serial1 = &uart1; serial2 = &uart2; diff --git a/arch/riscv/boot/dts/thead/th1520.dtsi b/arch/riscv/boot/dts/thead/th1520.dtsi index f9e339d3472d..497a982554b2 100644 --- a/arch/riscv/boot/dts/thead/th1520.dtsi +++ b/arch/riscv/boot/dts/thead/th1520.dtsi @@ -327,13 +327,13 @@ uart3: serial@ffe7f04000 { status = "disabled"; }; - gpio2: gpio@ffe7f34000 { + gpio@ffe7f34000 { compatible = "snps,dw-apb-gpio"; reg = <0xff 0xe7f34000 0x0 0x1000>; #address-cells = <1>; #size-cells = <0>; - portc: gpio-controller@0 { + gpio2: gpio-controller@0 { compatible = "snps,dw-apb-gpio-port"; gpio-controller; #gpio-cells = <2>; @@ -346,13 +346,13 @@ portc: gpio-controller@0 { }; }; - gpio3: gpio@ffe7f38000 { + gpio@ffe7f38000 { compatible = "snps,dw-apb-gpio"; reg = <0xff 0xe7f38000 0x0 0x1000>; #address-cells = <1>; #size-cells = <0>; - portd: gpio-controller@0 { + gpio3: gpio-controller@0 { compatible = "snps,dw-apb-gpio-port"; gpio-controller; #gpio-cells = <2>; @@ -372,13 +372,13 @@ padctrl1_apsys: pinctrl@ffe7f3c000 { thead,pad-group = <2>; }; - gpio0: gpio@ffec005000 { + gpio@ffec005000 { compatible = "snps,dw-apb-gpio"; reg = <0xff 0xec005000 0x0 0x1000>; #address-cells = <1>; #size-cells = <0>; - porta: gpio-controller@0 { + gpio0: gpio-controller@0 { compatible = "snps,dw-apb-gpio-port"; gpio-controller; #gpio-cells = <2>; @@ -391,13 +391,13 @@ porta: gpio-controller@0 { }; }; - gpio1: gpio@ffec006000 { + gpio@ffec006000 { compatible = "snps,dw-apb-gpio"; reg = <0xff 0xec006000 0x0 0x1000>; #address-cells = <1>; #size-cells = <0>; - portb: gpio-controller@0 { + gpio1: gpio-controller@0 { compatible = "snps,dw-apb-gpio-port"; gpio-controller; #gpio-cells = <2>; @@ -535,13 +535,13 @@ timer7: timer@ffffc3303c { status = "disabled"; }; - ao_gpio0: gpio@fffff41000 { + gpio@fffff41000 { compatible = "snps,dw-apb-gpio"; reg = <0xff 0xfff41000 0x0 0x1000>; #address-cells = <1>; #size-cells = <0>; - porte: gpio-controller@0 { + aogpio: gpio-controller@0 { compatible = "snps,dw-apb-gpio-port"; gpio-controller; #gpio-cells = <2>; @@ -561,13 +561,13 @@ padctrl_aosys: pinctrl@fffff4a000 { clocks = <&aonsys_clk>; }; - ao_gpio1: gpio@fffff52000 { + gpio@fffff52000 { compatible = "snps,dw-apb-gpio"; reg = <0xff 0xfff52000 0x0 0x1000>; #address-cells = <1>; #size-cells = <0>; - portf: gpio-controller@0 { + gpio4: gpio-controller@0 { compatible = "snps,dw-apb-gpio-port"; gpio-controller; #gpio-cells = <2>;