From patchwork Mon Oct 9 11:26:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Inochi Amaoto X-Patchwork-Id: 13413429 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 A7ED7E95A91 for ; Mon, 9 Oct 2023 11:27:25 +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:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=J2KfYJjDywdZZNbDmiUxKAhKTgNT3h1P8KEGiHab7VY=; b=XzGZYm53ypTaUU qSb3KhP0JyrHOldDwHVRRbjoemceFCG7BQ0mDELZS7UC7+xp/iA1Hf9Alut7HYJTmBs7h8W02MmIO 1zdpo2OEHyhZ4axVZQmo4h8acbn6xenawW6KGqEj99CRQRfZvYMYLs+YHteI/2Az1ggzQm6mNzd2l S3Xol0tM3W/JnCaLtHysFC8Uf7EHm3o8hpokD/bloNm5wGrOvD1iHXstmPpSf4rGCNIO6xqdv0ZHU /NqE9eeTX5xOYZhJDf8K6huWeaj7iM2aFy70fLIP+pyqmPzJ5SC44AaF+9OjHMMJe1fLpJpuNFtNV rZ8xaDdLVBMpJXt2D+3Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qpoPx-00ASMQ-1I; Mon, 09 Oct 2023 11:27:21 +0000 Received: from mail-sn1nam02olkn20813.outbound.protection.outlook.com ([2a01:111:f400:7ea9::813] helo=NAM02-SN1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qpoPu-00ASJY-0Q for linux-riscv@lists.infradead.org; Mon, 09 Oct 2023 11:27:19 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZsRHfGRaPm5Sf3OxsfdrQR2ZtzXrYgN4+0odumAwb1d7Nn5mB0HTQpTimHSeE+jsZFIeZAxRRNbJhF0qeiDjYXbUR9xXapVFGxPlMertjwgNdZgUhGf2hxx6Zj5sjQlhXG9tuIaFTShdUBM/i4gfqZfnV3BT4vET6seuBERbmpwHPIMnLvo56xXby1CkOg/cf8VD0Ur+ujeNWJ48sPqNNAu2V4V4JHR7jIwHVxPtpRvbIjw5KDhDa8pCaeaf5hGUJ+G4n9xK4IYJG2XoY41kOfPCW/aiPh8KqdXfOfXISslRMbtA0Qc5bv3l0jEUK9SBG3v2iey4bqZkhj11Xnzv9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ucz+d9gDsMTwGi+uxivR/JBx1T+GhMhp13qikmWoRj4=; b=bD+2WqzXmqwlKkdaxRQhRm8vlVf8iUOh+kTUu5FzeX4grx65ztibpP/kL8V26lZSEgLQDY0CNgmIQrvXG0nDC1/fwujZbgk940eFi1BMviQIvadkfPsZS8Yy6kkTXI2ApdUqtBTg0ST74wNaGDkVOMNR2OFt7X556HHXdYQvO2lYA0R7s2QhhtTkbcA7L4/sWvQZjanqKuTGsen2z3QZmAw0Gy3kii5Tzf7DoR0R/jYPTCY3VIV7lC/Rb+w2XScCx5gKvPXkwu8UhSXQsFVeYdqXfnWUzbzmVQwYOiTm1inM+XWBnFFqF3IgXWlDGtXYhkBiT68HQlZWBd7eeeebuA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ucz+d9gDsMTwGi+uxivR/JBx1T+GhMhp13qikmWoRj4=; b=uryEQvWm3R8yURG42FSwfyUcXNdK2CE+lzUWfGPjjv0iM7IJc9CuC8QGATFwR43cSGjcxx4HhoszhPtaYZJmuHG7c1MWkeEkjTDS6BcPOxzhukK4ZSekVaXuFZKYMbn9Z0KhiraYeFo0t10rwcNrfSXwg5y5ffn3bDo6q1vO1Zi/y5zasJHlYej9MTdeOlgiEQ1mrSHKJiw6Ga5LSD2r/4uXU9MCI104u7k7EcS91UOSck2GMUgFHwOP6ILy02If9CiD6D9znpN8hTKIzpFo1Cm+sPF3BONgHxOsnqj7nKDOIZert4h5PNe8n7vwUkzaejaYA0BW/4upzLVstjoJFg== Received: from IA1PR20MB4953.namprd20.prod.outlook.com (2603:10b6:208:3af::19) by PH0PR20MB6129.namprd20.prod.outlook.com (2603:10b6:510:2a2::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6838.37; Mon, 9 Oct 2023 11:27:06 +0000 Received: from IA1PR20MB4953.namprd20.prod.outlook.com ([fe80::d050:882f:a8a7:8263]) by IA1PR20MB4953.namprd20.prod.outlook.com ([fe80::d050:882f:a8a7:8263%5]) with mapi id 15.20.6838.040; Mon, 9 Oct 2023 11:27:06 +0000 From: Inochi Amaoto To: Chao Wei , Chen Wang , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Paul Walmsley , Palmer Dabbelt , Albert Ou Cc: Jisheng Zhang , Inochi Amaoto , devicetree@vger.kernel.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 5/7] riscv: dts: sophgo: cv180x: Add gpio devices Date: Mon, 9 Oct 2023 19:26:36 +0800 Message-ID: X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231009112642.477337-1-inochiama@outlook.com> References: <20231009112642.477337-1-inochiama@outlook.com> X-TMN: [tPm0zs4VWjxp+saMIN06wsE9nTn86uqj44WaOcvipoI=] X-ClientProxiedBy: TYCP301CA0049.JPNP301.PROD.OUTLOOK.COM (2603:1096:400:384::13) To IA1PR20MB4953.namprd20.prod.outlook.com (2603:10b6:208:3af::19) X-Microsoft-Original-Message-ID: <20231009112642.477337-5-inochiama@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: IA1PR20MB4953:EE_|PH0PR20MB6129:EE_ X-MS-Office365-Filtering-Correlation-Id: e4d9619c-0f29-4cc5-fe55-08dbc8baaa6e X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: jWq43NEudJFQkhn1vebhZymzW0pjfU3CIpsK8BgsudqRhO/Y7dFL9fWhbgN7nlWXZ65ip7vHWZugFB7eIO4CY8qZ9CbUEkXc0VyWfhVCku8eP3OUZDUH8Qb308v8Vj9LQTT20FT7IUiAB+jhqvXVZx67WxB0NigRzuzyOH1d3n50CiDaV2KK53L+dayf4rF6dHXLp3d+m9FcGQdsbG8ZGbe/nPgAU2olnZlirCG2zeteP8R3Yg5wjmccUuAhH86RU1rRsx+99jia59E5Gz7jRmv1ajVhzpOdXN8ScDokmT27QtX+6W9Z8Jotfz6oVoXoG6+pjP5AdtG7E4Zew+LcjvPCOFvUxXxy2+SW2XTmxl4L0GxIx8MIfE/8Krl1KYFNEYBpq/MOwCiu+o4IAl20Yki85JbvuJTeuhf/Obm8TYwJXLusM/iEbhXBw7Smt5gnsX8oeJghOy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Av9ntvkPVRvmEFWr/03vhyDil/3EnFnSbuDCzkzzAuyUIKlWra8yQliThF4EieG/RQKXaRffdXk6RfqkqroqiE5PzOXxIfcKzgIylTFwbaUPEe42gNLKymYaSvqnqoqr6RdOkewGX23Ve3EfiYTPSiHwPqizhon9zBu9ibDKzctbz8tqEnkHa4g8hoDYolGaxDJkx4OXPsO55+rHM8C9oO1JdcrJnNMr6AY+SuijUyKvxAAnkGquNDYAadCmkc+fORNLz34LQLGeZBBvCa4ZgnA5S8wV3plBCPXVvupDipH3SrrFDSnU2C8FL57UQzVsxGbgwkyyu48Mb2gjCcJ/pEkJKA3oEOEmjZA8LqeDYRn4v6XmxJ+WMMbcVGR3BO4UFdwCz/j2PRlaCJSUIrzfH3c8GFmJVkFwPuIPgJqVelkZC+zBU= X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: e4d9619c-0f29-4cc5-fe55-08dbc8baaa6e X-MS-Exchange-CrossTenant-AuthSource: IA1PR20MB4953.namprd20.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Oct 2023 11:27:06.6970 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR20MB6129 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231009_042718_172374_4A17008A X-CRM114-Status: UNSURE ( 7.22 ) 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 Add common GPIO devices for the CV180x and CV181x soc. Signed-off-by: Inochi Amaoto Acked-by: Chen Wang --- arch/riscv/boot/dts/sophgo/cv180x.dtsi | 72 ++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) -- 2.42.0 diff --git a/arch/riscv/boot/dts/sophgo/cv180x.dtsi b/arch/riscv/boot/dts/sophgo/cv180x.dtsi index ffaf51724c98..64ffb23d3626 100644 --- a/arch/riscv/boot/dts/sophgo/cv180x.dtsi +++ b/arch/riscv/boot/dts/sophgo/cv180x.dtsi @@ -53,6 +53,78 @@ soc { dma-noncoherent; ranges; + gpio0: gpio@3020000 { + compatible = "snps,dw-apb-gpio"; + reg = <0x3020000 0x1000>; + #address-cells = <1>; + #size-cells = <0>; + + porta: gpio-controller@0 { + compatible = "snps,dw-apb-gpio-port"; + gpio-controller; + #gpio-cells = <2>; + ngpios = <32>; + reg = <0>; + interrupt-controller; + #interrupt-cells = <2>; + interrupts = <60 IRQ_TYPE_LEVEL_HIGH>; + }; + }; + + gpio1: gpio@3021000 { + compatible = "snps,dw-apb-gpio"; + reg = <0x3021000 0x1000>; + #address-cells = <1>; + #size-cells = <0>; + + portb: gpio-controller@0 { + compatible = "snps,dw-apb-gpio-port"; + gpio-controller; + #gpio-cells = <2>; + ngpios = <32>; + reg = <0>; + interrupt-controller; + #interrupt-cells = <2>; + interrupts = <61 IRQ_TYPE_LEVEL_HIGH>; + }; + }; + + gpio2: gpio@3022000 { + compatible = "snps,dw-apb-gpio"; + reg = <0x3022000 0x1000>; + #address-cells = <1>; + #size-cells = <0>; + + portc: gpio-controller@0 { + compatible = "snps,dw-apb-gpio-port"; + gpio-controller; + #gpio-cells = <2>; + ngpios = <32>; + reg = <0>; + interrupt-controller; + #interrupt-cells = <2>; + interrupts = <62 IRQ_TYPE_LEVEL_HIGH>; + }; + }; + + gpio3: gpio@3023000 { + compatible = "snps,dw-apb-gpio"; + reg = <0x3023000 0x1000>; + #address-cells = <1>; + #size-cells = <0>; + + portd: gpio-controller@0 { + compatible = "snps,dw-apb-gpio-port"; + gpio-controller; + #gpio-cells = <2>; + ngpios = <32>; + reg = <0>; + interrupt-controller; + #interrupt-cells = <2>; + interrupts = <63 IRQ_TYPE_LEVEL_HIGH>; + }; + }; + uart0: serial@4140000 { compatible = "snps,dw-apb-uart"; reg = <0x04140000 0x100>;