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: 731171 Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C5898156EF for ; Mon, 9 Oct 2023 11:28:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=outlook.com header.i=@outlook.com header.b="uryEQvWm" Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02olkn2037.outbound.protection.outlook.com [40.92.44.37]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 683BF199; Mon, 9 Oct 2023 04:28:37 -0700 (PDT) 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> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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/Y7dFL9fWhbgN7nlWXZ65ip7vHWZugFB7eIO4CY8qZ9CbUEkXc0VyWfhVCku8eP3OUZDUH8Qb308v8Vj9LQTT20F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wfxonQzc2cjQfOhTxDyz8PTQfmEinCJl2syuaDJIqAY2NEcn2LvN/CJXXteAyNpU/oNYZAfIL/fwXTo1eh71YxRutvQ2qtXAJZzwwqc76RVpMxbAZs1GAVujCaJgmL1D8X5N8VFDSRf4wZB3pVd42YmItBTiiFnFBMdGrgfJUXx7WC2m+J39tFDOv5fDFEhNdeq108nCAZ7lPx0nJc5vLQtP+okp+RwmMAVolYgF1fc3oyrEHF5ua0YvcXhAt7ZtToNUAwPd22D/G58Scxg6DnGqri0+rZWkwVYYjdYPOEhHjuDeNoZiasOWPfw/OajF6EGp3N+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-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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>;