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: 735906 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 E69ED1946D for ; Wed, 18 Oct 2023 23:20:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=outlook.com header.i=@outlook.com header.b="OR+34IjU" 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> 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_|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+Ucnp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JlBKXkpPuDfEyVTmyFHECJJMVKN4I9cMy/8aA9DzWPWHxihnYepp4W/Ck524A+2b7BmqnymN+FangrRiLTSYqwH1xapW4clGgW55IvOgv8nWGTH9cr0YeVU+/wZYG3nPPNiks2wb4n2srTITHJTUo7TSOXOtlwOZ1vH0XfO/+6EVfLyuOdMw1YxiIfm7s+lYd1rQYb1wfdJhraOE1Bqp3zuzEEAhCBUhk/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 Add common GPIO devices for the CV180x and CV181x soc. Signed-off-by: Inochi Amaoto Reviewed-by: Jisheng Zhang --- 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>;