From patchwork Wed Oct 18 23:18:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Inochi Amaoto X-Patchwork-Id: 155229 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2010:b0:403:3b70:6f57 with SMTP id fe16csp53585vqb; Wed, 18 Oct 2023 16:21:47 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGPLo1po+yk9JLK0R7P2NhcgmD6hxQSBMRi4lzyE+bvTUIrc8GQzdmcskWpmS1K7jtHiD2m X-Received: by 2002:a17:902:e54e:b0:1c9:ea6e:5a63 with SMTP id n14-20020a170902e54e00b001c9ea6e5a63mr914568plf.32.1697671306832; Wed, 18 Oct 2023 16:21:46 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1697671306; cv=pass; d=google.com; s=arc-20160816; b=NA7LO86qBTebB5hZx0GuP0Mamd0xXJ7Nttgyvw5BsHBvqff7XZdyNKj7LcycuNbssf ka50LgVkWDdOEYH43hamNNarEo8dwjsAgzJOhfJsdJIglPvHph/jNl1BJkFH0BH2Xikx najCk6hNc25UTKB6toWDqgGy8LizpR4HUnP34LcKTLQok97TDlIMZeGKwTzDT27hhkmf 8Yb2+gye2HZ0oqLK2wwqTeGmchld6hSfrVPKp/5Q78G6XGztgvkVp1G3UBH6rAEAstDO BQvrc1pQLteQ0isNVyRoWScjkQhjyQ0BS3dAqo2Sb3uwm6x8e4CUm8dj4WD57HjVGRHS XxkA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=gx7xPx26Mq3kzCKC4EipZZimta+A0D9rZ+GtCJMX9+Y=; fh=k0ZhnQDWbR8aX1NxwznNpu9uJT5LbP5g1V9LYeN3JBU=; b=HCHBgdsOsVJhoDJY+yDSnsPQayr7+5vG6T2e/8ZQDIdB513yk6eBPUr19X+9H2k6hl Q4UgeFcX6OIatIJ95KOmZ5d0KGn3E2OJC67UEerT+TWz+pQaEHy2nwlUgWuofK33yn/Z zkwlzTPqOZOsUYsx4ziiaOEuqqW6C8ZRALXi1MPgTiqV+sbRv9IVoXS9rzxVNL/cl8W7 N9ffbfjroZLE0cD5jA//tYEAl/puPRLqMk6hWIiZz+gEGwK3/16zzBLwR8RR0ZxIXfXP pNhRWl5wqUodWxipSOigmstj6OxWLDjjZnxPpBiFvxd7H2r0hnu3mY+oN8639GMmE7YK XNFA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@outlook.com header.s=selector1 header.b=OR+34IjU; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=outlook.com Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id l5-20020a170903120500b001c1e1fe16c7si1014237plh.236.2023.10.18.16.21.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 16:21:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@outlook.com header.s=selector1 header.b=OR+34IjU; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=outlook.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id B64738030B45; Wed, 18 Oct 2023 16:21:30 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235180AbjJRXVQ (ORCPT + 24 others); Wed, 18 Oct 2023 19:21:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35658 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232791AbjJRXU5 (ORCPT ); Wed, 18 Oct 2023 19:20:57 -0400 Received: from NAM02-BN1-obe.outbound.protection.outlook.com (mail-bn1nam02olkn2017.outbound.protection.outlook.com [40.92.15.17]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 064BF1BC8; Wed, 18 Oct 2023 16:20:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gYMoLMjJGbtKFkO5pNhiZZ3TXQ9u1hQbnGQAe53wPn/yqe+f2dekUmHsJdT/92naRKNRfYaIS5086FOBDZzTgOGM0QVAhnBawwzSkZSe8D6tqG5x3bEb01U5MCJUJvW6+4TiWwkH+6Auy8XPx5n5fS7b26q6BmTQp3gM8ulU+JxJ7GBOAk2HeO8DKjpvhrwEn+yfh/ZfPFKykze7Iumh0qS/m7bd4W8foUNvpjj/gll5TsF6OBWSicJf4aTWC40OdDZTkDd4YqyGCK5gH0khc9NPlcwmQ/ZyCAQ/ewVXxigIdEWF0/A5BSV64SQu6ORAvEzKC5oypPjeM4D5dYuh3A== 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=gx7xPx26Mq3kzCKC4EipZZimta+A0D9rZ+GtCJMX9+Y=; b=Jg0ur88DpKnmRgrSWNJa8qhp9G1iK14hz49DjPIxpnIqTnT50+IiZw8DyoLPOa+4TY5RATbY09Ua8+hC1BDkor9bdVwcEHraFtkqCCuOUHk/PbSkVHmyo64ph3VYKT2FHmPpZx0PsqKsG4PEHcPwWxa8QeKeUKfeBARqpDMdcveQ3Qk7RC/fggMJOVhruF9dPZZn/VDBXuSmBEseldaRo0RRTjHb5DVnvu2a/PEwY0VJ3UHh4XjbVgdSwwFs12XbXaVILPjTdDyikAHxtME3q04s/Imxx/aXtuIfj/FeuVPC+z9REPVp8I1InCSLdtycjnkJJ/niCnlXJAcQYxeuhQ== 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=gx7xPx26Mq3kzCKC4EipZZimta+A0D9rZ+GtCJMX9+Y=; b=OR+34IjUi7DPS8oVcUTsXo8RRQJ2Sp5R7kQRHpnDnrrxVBwm8H/kTnYIhZi82VI+9dTZNGe+3G2qzL/nnimaKRhxz3Re9MbDaoG78sfN7hQmnKn0VL+5r2DS2By70dLBw7wKnL+WaBaDxxOcNUndTUi5MvkcwX1hUd0shR3MqHxWLeQWDkui7r4UTSIZ/mAW77kaMCdk/WeCU7+TsdLx6ywPn9n+pHGmJm7f0cddpFDLYEcOApA8ULD2hNtJy7FQYlC9b4Qtc5haXONM2kkN2kYSyLrEGEFY4RusPJxkeFyMM/QbiIzk+zu2Y9I1rQ7s+e7pD7/q82SthOmg6GjknQ== Received: from IA1PR20MB4953.namprd20.prod.outlook.com (2603:10b6:208:3af::19) by DM4PR20MB5087.namprd20.prod.outlook.com (2603:10b6:8:8d::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6886.37; Wed, 18 Oct 2023 23:18:59 +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.6907.021; Wed, 18 Oct 2023 23:18:59 +0000 From: Inochi Amaoto To: Chao Wei , Chen Wang , Conor Dooley , Rob Herring , Krzysztof Kozlowski , Paul Walmsley , Palmer Dabbelt , Albert Ou Cc: Jisheng Zhang , Inochi Amaoto , linux-riscv@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v4 5/7] riscv: dts: sophgo: cv18xx: Add gpio devices Date: Thu, 19 Oct 2023 07:18:52 +0800 Message-ID: X-Mailer: git-send-email 2.42.0 In-Reply-To: References: X-TMN: [1kAHMdmURBWU7OSQ4ZAsgKBfRyQE5mQrOjdo8EJ+bVw=] X-ClientProxiedBy: SJ0PR05CA0163.namprd05.prod.outlook.com (2603:10b6:a03:339::18) To IA1PR20MB4953.namprd20.prod.outlook.com (2603:10b6:208:3af::19) X-Microsoft-Original-Message-ID: <20231018231855.28472-5-inochiama@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: IA1PR20MB4953:EE_|DM4PR20MB5087:EE_ X-MS-Office365-Filtering-Correlation-Id: abcc7655-2e7a-4f16-715f-08dbd0309ba7 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 4yNbOwi3/eo0kFARmvAnQwHnK1OUzI1N0yRSAT9FZc0Gc8Ca/2J/85SZOem4m3UvBZ4hJVDotLV6FkjP0njLd0Em5mg6xK64VXgGMDabV6Wow8W930ir6paVTT76Jul/0DdhQere4sf9SRHGTJYq2z4sU+NJd6NKFxlAKg+UcnpeffJJfz/aO249SeWDL59sQP3JZDyG4s7UU7yQPIirDw4hLToUMWJAy+9fQSUuVYdT2rvGjmzj4C7tySbDafSVBvHFsa3bs/dirLcmjqyRknF3rsOBVBX+CMoWc27o0fj51mxIUw5v6derwsKUwR8Az0Ph3rE7dUJdmvQpi1gCnFnU7GVV0E9/afRW6pjDEwrbYlSWPBMmJtf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JhraOE1Bqp3zuzEEAhCBUhk/kdpa74DzbvlERWlZazZyhP9hRox5lMMy53y3TcVoSv/D807JxqkPUbujuGtXSq9lpphHJ7ghFGwDLE1mZUHWGzXKBUgXy0nCaRJqwOxerXzS5Txu1vpPIqOJBCbwMdVY2nWLxIdXm8K4xZJOcwkZ0Jyv59KX5z3HpaFe/cLIiC5Ak8hA/xcaWoNSjYDwB4EAVrdN9vSRKU3Vqm0aWezFHJDOn4dySojiy/A7An332tKobojlpqjOp+aCvsHT2YCszBddAOzOTNPxZXAvKe+cSIhogXztMcEZcn5VLi9Yb4V0k+0eBMhLMSc+oiAo2pfg2pOA6XNlizZ+UsWBTR0ZVUaMc/F5mnyu7BCxpJsFc9dziE9zSap9ct2gl5+uoMjPyyuAIJI5ECZtAZuY3viRqOBdqeMjr6E2+P5lxRM9eG8D2piiEuKgb83lKaE+i15dluq9h0Kj8= X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: abcc7655-2e7a-4f16-715f-08dbd0309ba7 X-MS-Exchange-CrossTenant-AuthSource: IA1PR20MB4953.namprd20.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Oct 2023 23:18:59.3592 (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: DM4PR20MB5087 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 18 Oct 2023 16:21:30 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780137388589340681 X-GMAIL-MSGID: 1780137388589340681 Add common GPIO devices for the CV180x and CV181x soc. Signed-off-by: Inochi Amaoto Reviewed-by: Jisheng Zhang Acked-by: Chen Wang --- arch/riscv/boot/dts/sophgo/cv18xx.dtsi | 73 ++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) -- 2.42.0 diff --git a/arch/riscv/boot/dts/sophgo/cv18xx.dtsi b/arch/riscv/boot/dts/sophgo/cv18xx.dtsi index 55d4bc84faa0..d415cc758def 100644 --- a/arch/riscv/boot/dts/sophgo/cv18xx.dtsi +++ b/arch/riscv/boot/dts/sophgo/cv18xx.dtsi @@ -1,6 +1,7 @@ // SPDX-License-Identifier: (GPL-2.0 OR MIT) /* * Copyright (C) 2023 Jisheng Zhang + * Copyright (C) 2023 Inochi Amaoto */ #include @@ -53,6 +54,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>;