From patchwork Thu Oct 21 12:30:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Prathamesh Shete X-Patchwork-Id: 1544359 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=Nvidia.com header.i=@Nvidia.com header.a=rsa-sha256 header.s=selector2 header.b=udiACvuE; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=linux-tegra-owner@vger.kernel.org; receiver=) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by bilbo.ozlabs.org (Postfix) with ESMTP id 4HZmzR1Mnmz9sRR for ; Thu, 21 Oct 2021 23:30:43 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231559AbhJUMcz (ORCPT ); Thu, 21 Oct 2021 08:32:55 -0400 Received: from mail-bn8nam12on2047.outbound.protection.outlook.com ([40.107.237.47]:65238 "EHLO NAM12-BN8-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S230231AbhJUMcs (ORCPT ); Thu, 21 Oct 2021 08:32:48 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RvnDfXZdTJdPwygMyg84D5JBuI5WrxHtnEf1uCPfAVzGKTDbTuGq/H/mvDzfeCxeFoHbSiKJK5vR7Cjom6ENBwLp55RKmmTHZuGLuPYDktO5zm2dWTtPiT7Sfb9TxSSX0+9QGWfmRevBG1G8IxTqrBXxm0/FX1VjrJ2FFtZM2R0+uIMM69E642qRckkecVWL+/c24eVArTmzMa5l1O9nuud6FcI2BdeqAYpj/kOCALCEfZZwovbY7JnZI6UU4azh/EndMHN5sZjy4Wr5WMpfdVpm1CH9XXz3wZvm/rPAzlXa4Iy6udqZPi460pnvnilgNyJWueE2hbnqOIm73ky+gA== 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=7VVd9I5MzFSB5L6x/zPzgdk+ZRUlZH43zbMdpegbcyc=; b=BrdvjwDIr7LRy+otqVPiF9Gj1dgl1bUf8c2cXLLXxHYWiuV2F+wlgEQkksbbxQOLw8RztEjv5ZDzYfwwcrxu6ghwY7pI/2Gn4wOb0yrJX10BmF3yjVfCiNWd1CbJ0ZAqQM4YCFsQlXuvOh4dv2qVxCWzmlyBMBp9D+PorH8f8dWt9J6RI9ldZ1t7jmPBuYPOiPxu5aN5GeBQ+/i9CC/PACSDUv2tw24ob0SERmX4pnNMoL+xrWvk6VmIdyChpvKsNNP0XU9vqWcOj2JAFNXS7ZfxpjpzoaPENhptmIPooRUhtTPSn+cREGsCdWp+CTLHt4oubejK0DLoNnifMjOK0A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=baylibre.com smtp.mailfrom=nvidia.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=7VVd9I5MzFSB5L6x/zPzgdk+ZRUlZH43zbMdpegbcyc=; b=udiACvuE7agtg/RTrP5r7aP/5u1C1mBv3pGhyacTUwDtGsr4RozvG+ocZbqTnWpjcPg1/GyVJ0AoP40iK2PyhRYLsQFBB4HlN1oruG4FIyVlFcxNJBdt+UDi60hBLAbLGG893xRQeP59tyndc5Th6MFNnqeOBA+AU/GHymmrdsSSEPI2GYHVTa+DgGjJTPBlEuJ7swPoi/ifB5wfd7xoflkMn5nhWSkC4j/IByqWLSsZINexKc39+vGvVOmHndXZ0bRbtOAww1dXkb+cnVlxtREjWd03DRj2WEF7dMirWL+lEhU/PBWKoGKl75HKehkNN5jKzHdGJN7vAo9H3G4mDw== Received: from BN6PR12CA0029.namprd12.prod.outlook.com (2603:10b6:405:70::15) by CH2PR12MB3975.namprd12.prod.outlook.com (2603:10b6:610:2f::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4628.16; Thu, 21 Oct 2021 12:30:30 +0000 Received: from BN8NAM11FT003.eop-nam11.prod.protection.outlook.com (2603:10b6:405:70:cafe::c0) by BN6PR12CA0029.outlook.office365.com (2603:10b6:405:70::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4628.15 via Frontend Transport; Thu, 21 Oct 2021 12:30:30 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) smtp.mailfrom=nvidia.com; baylibre.com; dkim=none (message not signed) header.d=none;baylibre.com; dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.112.34 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.34; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.34) by BN8NAM11FT003.mail.protection.outlook.com (10.13.177.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4628.16 via Frontend Transport; Thu, 21 Oct 2021 12:30:29 +0000 Received: from HQMAIL105.nvidia.com (172.20.187.12) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Thu, 21 Oct 2021 12:30:27 +0000 Received: from HQMAIL109.nvidia.com (172.20.187.15) by HQMAIL105.nvidia.com (172.20.187.12) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Thu, 21 Oct 2021 12:30:26 +0000 Received: from pshete-ubuntu.nvidia.com (172.20.187.6) by mail.nvidia.com (172.20.187.15) with Microsoft SMTP Server id 15.0.1497.18 via Frontend Transport; Thu, 21 Oct 2021 05:30:24 -0700 From: Prathamesh Shete To: , , , , , , CC: , Subject: [PATCH 1/2] dt-bindings: tegra186-gpio: Add Tegra234 ports Date: Thu, 21 Oct 2021 18:00:20 +0530 Message-ID: <20211021123021.9602-1-pshete@nvidia.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 6b530077-9d41-408b-0389-08d9948e91be X-MS-TrafficTypeDiagnostic: CH2PR12MB3975: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4125; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: LnsnnbyZBrOp/oWGNn3ShgEQlaFLFC0Ybw4SkxDr79r64B0eKzbfdQ29hYWcHdvW5/GDgkfD8PGj6YJNwE9mq1HmgAjOTmgJ4p9UqxcUC4fubls4eDuLEIKsYOt6GGjBRJ3kxsMQ1i9ax+PP2/o/uQH2d16yh1+Ji7Yvjafiur3n8+b/xTJQbumG1rv4NNYA86FfAeeuGBb7gKZRCsDPKowqF8Na1P3f1WyRxYwvwdTw4DRVHzdNJTDpKthCbMuxwbHcAyUWX15nhb0jGUyZ9bNHIO1cDTkHX+eUQccTq92NrpgWZTOQ7kCHLEoXwLyI5f+uVRpIrO+yofsDNJXOyEpBOzZQOVnNr+NTB5VWCoV6hYiZeVxnL16566NgU26LHDPzjAPJ4BJ2NqU0LRGC619uAIkWvN1JOncPWeQfSwNtFWrUm2iUZJX6wea5EHhmZ90S2xsu5af7w/KFxIpz5F8EYhrNTp8OCZo8F89nMBSCSjMJDMR3w00hKY6S1EIbF+fcU9rS3nBdy6+T6zTZCzTOcG8v906aj946hyz77BJmYgETezCa/BSisDWbeOUL8DmyPHutiJJ4G+rXEO6PEC4VzPcF8HFhE0oIYJli/Te3c0i4OfidVha8YVRe/7rAlu0em2hk6/nbvzAaDeJk33AlJO6miA+L8A0U5VumAJj2RwOgW7IOPyM/fcxKtioJA4agyvc8wiV/GrNhVmvtdg== X-Forefront-Antispam-Report: CIP:216.228.112.34;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:schybrid03.nvidia.com;CAT:NONE;SFS:(4636009)(36840700001)(46966006)(5660300002)(316002)(8676002)(356005)(7696005)(70206006)(47076005)(336012)(186003)(36860700001)(26005)(4326008)(110136005)(86362001)(6666004)(2906002)(107886003)(8936002)(70586007)(36756003)(82310400003)(54906003)(426003)(508600001)(2616005)(7636003)(1076003);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Oct 2021 12:30:29.9362 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6b530077-9d41-408b-0389-08d9948e91be X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.112.34];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT003.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR12MB3975 Precedence: bulk List-ID: X-Mailing-List: linux-tegra@vger.kernel.org Add Tegra234 GPIO ports in dt-bindings. Signed-off-by: Prathamesh Shete --- include/dt-bindings/gpio/tegra234-gpio.h | 59 ++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 include/dt-bindings/gpio/tegra234-gpio.h diff --git a/include/dt-bindings/gpio/tegra234-gpio.h b/include/dt-bindings/gpio/tegra234-gpio.h new file mode 100644 index 000000000000..0f59afabfe80 --- /dev/null +++ b/include/dt-bindings/gpio/tegra234-gpio.h @@ -0,0 +1,59 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved. */ + +/* + * This header provides constants for binding nvidia,tegra234-gpio*. + * + * The first cell in Tegra's GPIO specifier is the GPIO ID. The macros below + * provide names for this. + * + * The second cell contains standard flag values specified in gpio.h. + */ + +#ifndef _DT_BINDINGS_GPIO_TEGRA234_GPIO_H +#define _DT_BINDINGS_GPIO_TEGRA234_GPIO_H + +#include + +/* GPIOs implemented by main GPIO controller */ +#define TEGRA234_MAIN_GPIO_PORT_A 0 +#define TEGRA234_MAIN_GPIO_PORT_B 1 +#define TEGRA234_MAIN_GPIO_PORT_C 2 +#define TEGRA234_MAIN_GPIO_PORT_D 3 +#define TEGRA234_MAIN_GPIO_PORT_E 4 +#define TEGRA234_MAIN_GPIO_PORT_F 5 +#define TEGRA234_MAIN_GPIO_PORT_G 6 +#define TEGRA234_MAIN_GPIO_PORT_H 7 +#define TEGRA234_MAIN_GPIO_PORT_I 8 +#define TEGRA234_MAIN_GPIO_PORT_J 9 +#define TEGRA234_MAIN_GPIO_PORT_K 10 +#define TEGRA234_MAIN_GPIO_PORT_L 11 +#define TEGRA234_MAIN_GPIO_PORT_M 12 +#define TEGRA234_MAIN_GPIO_PORT_N 13 +#define TEGRA234_MAIN_GPIO_PORT_P 14 +#define TEGRA234_MAIN_GPIO_PORT_Q 15 +#define TEGRA234_MAIN_GPIO_PORT_R 16 +#define TEGRA234_MAIN_GPIO_PORT_X 17 +#define TEGRA234_MAIN_GPIO_PORT_Y 18 +#define TEGRA234_MAIN_GPIO_PORT_Z 19 +#define TEGRA234_MAIN_GPIO_PORT_AC 20 +#define TEGRA234_MAIN_GPIO_PORT_AD 21 +#define TEGRA234_MAIN_GPIO_PORT_AE 22 +#define TEGRA234_MAIN_GPIO_PORT_AF 23 +#define TEGRA234_MAIN_GPIO_PORT_AG 24 + +#define TEGRA234_MAIN_GPIO(port, offset) \ + ((TEGRA234_MAIN_GPIO_PORT_##port * 8) + offset) + +/* GPIOs implemented by AON GPIO controller */ +#define TEGRA234_AON_GPIO_PORT_AA 0 +#define TEGRA234_AON_GPIO_PORT_BB 1 +#define TEGRA234_AON_GPIO_PORT_CC 2 +#define TEGRA234_AON_GPIO_PORT_DD 3 +#define TEGRA234_AON_GPIO_PORT_EE 4 +#define TEGRA234_AON_GPIO_PORT_GG 5 + +#define TEGRA234_AON_GPIO(port, offset) \ + ((TEGRA234_AON_GPIO_PORT_##port * 8) + offset) + +#endif From patchwork Thu Oct 21 12:30:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Prathamesh Shete X-Patchwork-Id: 1544361 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=Nvidia.com header.i=@Nvidia.com header.a=rsa-sha256 header.s=selector2 header.b=D/6u0Tkh; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=linux-tegra-owner@vger.kernel.org; receiver=) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by bilbo.ozlabs.org (Postfix) with ESMTP id 4HZn0X0RSgz9sRR for ; Thu, 21 Oct 2021 23:31:40 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231628AbhJUMdy (ORCPT ); Thu, 21 Oct 2021 08:33:54 -0400 Received: from mail-dm6nam12on2085.outbound.protection.outlook.com ([40.107.243.85]:3274 "EHLO NAM12-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S230190AbhJUMdx (ORCPT ); Thu, 21 Oct 2021 08:33:53 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jUJabTsB10HZlPdRTXgu6TFBi9cWiLMJTdl1oJsC1/GBUFn+ZWTGgmj8p7iNwoQ0Bd8ZxE0Dl7hzTOEN5QxqWgmfhQvSCL1PbZiq7+Zm72Zim46XBeBCUNfQrlVj2cZ4fpkCBAKgKIjp0EECmYxaq1nyVZmZHTlkLuBx2xoRK48qVVEZ6bcwu6C9To8IAGay9SXPZZ60Sa7NGuAcbVr3cem/m3Y8zIDXGpG7X5BOwybvK5OXDTn3IV17GGQbDeWcBLIcMxKBe858ppsehJH/AuAcGhtWQptYhc0IfMHjC+fjj0OIk7hqwFLyGSLTXPXgRCcDIPYp7ezS0k7msYeEoA== 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=AcX3ENn/ezgXNW98CnfVxoGsM/4inTlt+JZl780Hzmk=; b=WoTVK6xB5w2jJr8MTqcool5YAMxt0fJCRL0Jqj1UcTMzZPMgEeORiOjJyP7OhHdVQIH3qEWfLMaoeTncokgzxC1vBZJD/11E1BGVy3SSYoSabtupQybvAR6do5VWUAXIKRkmw/8tfoKy6Im8T9Xat4Mk+x/3amTwPCoYiJUzXYTnJP+xKi24B2707nSwzbXQ7GRUNWhvDNPxxG+1vFX4f8j2J0YlF4yX14NoNryfjK0VKXWUWd47/0h9dsi/duLFcgrE6ttZIPM/aSJRzJsTXZVSn1oDfYF4XCu3hiHonp8iVJL+vSqW/rA1wqu+9WGOmbPriY/eWsGZNfhicXsr8w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.32) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=nvidia.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=AcX3ENn/ezgXNW98CnfVxoGsM/4inTlt+JZl780Hzmk=; b=D/6u0Tkhdm/MfNFZB0Gou6gQd8xWAuCCGOzP3Qhul4JC8gEnDDTj4FQMcjqdrWnKJqx44zW4mwRSru7QEc5p6vDYIkZAzTqLF1nGnt/bNv+Y3t3YWAD/BafIvVFhEdAo2hPE2NGXQNjIP3R/BTajEc6aLv4am29h0C2MgvBDRQnElxdpzz5toOMkipJa3rt/G1Br7/+jk/KwN4y+T+VG9h0nnBMrrGZAbgNAftf2rr8Srn0hVQ9IM/U/XeQ/qRAqnPccilwZeDQn0muKn2R1if7IvxelUoKJfVK3EFeYTA/xm5vLe+/DtLOJ0jZk2KKYeKU/46vejVt2nm9IEaT2sg== Received: from DM5PR21CA0039.namprd21.prod.outlook.com (2603:10b6:3:ed::25) by MWHPR1201MB2542.namprd12.prod.outlook.com (2603:10b6:300:e8::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.18; Thu, 21 Oct 2021 12:31:35 +0000 Received: from DM6NAM11FT019.eop-nam11.prod.protection.outlook.com (2603:10b6:3:ed:cafe::eb) by DM5PR21CA0039.outlook.office365.com (2603:10b6:3:ed::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4649.1 via Frontend Transport; Thu, 21 Oct 2021 12:31:35 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.32) smtp.mailfrom=nvidia.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.112.32 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.32; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.32) by DM6NAM11FT019.mail.protection.outlook.com (10.13.172.172) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4628.16 via Frontend Transport; Thu, 21 Oct 2021 12:31:32 +0000 Received: from HQMAIL109.nvidia.com (172.20.187.15) by HQMAIL109.nvidia.com (172.20.187.15) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Thu, 21 Oct 2021 05:31:19 -0700 Received: from pshete-ubuntu.nvidia.com (172.20.187.6) by mail.nvidia.com (172.20.187.15) with Microsoft SMTP Server id 15.0.1497.18 via Frontend Transport; Thu, 21 Oct 2021 05:31:17 -0700 From: Prathamesh Shete To: , , , , , , CC: , Subject: [PATCH 2/2] gpio: tegra186: Add support for Tegra234 gpio Date: Thu, 21 Oct 2021 18:00:21 +0530 Message-ID: <20211021123021.9602-2-pshete@nvidia.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20211021123021.9602-1-pshete@nvidia.com> References: <20211021123021.9602-1-pshete@nvidia.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 6514bc4e-2812-41eb-78ce-08d9948eb725 X-MS-TrafficTypeDiagnostic: MWHPR1201MB2542: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2803; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 4dZVnkrF/aO6kjgScWsojD5wrl8VL4MxzbaEiUezJQitvtMZICLSf+vGuYqvl3aqPMXDDAW23zU7Dl97OridEd9imXpmUxuSR2Avj1Ov77hWgiPifLx/n5PJexpEv9ShglQd4WGMpFIjg61hF2oEPcQDOhFopG6yO/zPOvsxi/TlP58E8vKXfcK1it/2M4JT4geGar9OcSibJo9m45vqfbrt9a4EVbidsZ3w66R1uCe5wt/GBqDF2Gn8TByX7FYjudNDxo1Um528d0fkqj9wHU98dXMolEH9CWeDWBj7f9ety9oH5lu9VrDvBnXuaNYCUZMxH3GYqT52Wwl4kUkF+xFkPhnOMWtu0AFjLaJvFlEYMutGLewMuk35V4h/CLBbtW7uxZU+RLpqbRSyanjN5e3gbekOo6gpUb+zdHTrv3M73r4TOFc6sKlmTqFb92RPGdhlH34znO3oC8XtdgPK8Nwh8pclGprX8yAulOBBvI8o1fcDriL7qVCJRK+altjc4jUMM9VbzBtBY0fYfpJ3ZkIbx0qfYext1fzJPmW1UeSwSUcgXE+FZ17T9Cbdp+50t8UEpJgH24XiRbk9U6aJPiFjzazr5uYwZUDiitfa4Zuirc4xeA7z5QI3nFOKhBsUTsIdgwciR3fh7q5PYlVuldFzOVRXUw7H+gP/o3A1UrBSEY9PlMU/NpFtm93d1t1LC94gLUFl8x39BJ9UCmir1A== X-Forefront-Antispam-Report: CIP:216.228.112.32;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:schybrid01.nvidia.com;CAT:NONE;SFS:(4636009)(36840700001)(46966006)(5660300002)(2616005)(7636003)(110136005)(7696005)(336012)(54906003)(36860700001)(83380400001)(186003)(4326008)(70206006)(107886003)(426003)(70586007)(8936002)(86362001)(47076005)(508600001)(2906002)(1076003)(36756003)(316002)(82310400003)(356005)(26005)(8676002)(6666004);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Oct 2021 12:31:32.7439 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6514bc4e-2812-41eb-78ce-08d9948eb725 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.112.32];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT019.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR1201MB2542 Precedence: bulk List-ID: X-Mailing-List: linux-tegra@vger.kernel.org Add support for the Tegra234 GPIO bank configuration. Signed-off-by: Prathamesh Shete --- drivers/gpio/gpio-tegra186.c | 74 ++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) diff --git a/drivers/gpio/gpio-tegra186.c b/drivers/gpio/gpio-tegra186.c index d38980b9923a..edcc91b35e1e 100644 --- a/drivers/gpio/gpio-tegra186.c +++ b/drivers/gpio/gpio-tegra186.c @@ -14,6 +14,7 @@ #include #include +#include /* security registers */ #define TEGRA186_GPIO_CTL_SCR 0x0c @@ -877,6 +878,73 @@ static const struct tegra_gpio_soc tegra194_aon_soc = { .instance = 1, }; +#define TEGRA234_MAIN_GPIO_PORT(_name, _bank, _port, _pins) \ + [TEGRA234_MAIN_GPIO_PORT_##_name] = { \ + .name = #_name, \ + .bank = _bank, \ + .port = _port, \ + .pins = _pins, \ + } + +static const struct tegra_gpio_port tegra234_main_ports[] = { + TEGRA234_MAIN_GPIO_PORT(A, 0, 0, 8), + TEGRA234_MAIN_GPIO_PORT(B, 0, 3, 1), + TEGRA234_MAIN_GPIO_PORT(C, 5, 1, 8), + TEGRA234_MAIN_GPIO_PORT(D, 5, 2, 4), + TEGRA234_MAIN_GPIO_PORT(E, 5, 3, 8), + TEGRA234_MAIN_GPIO_PORT(F, 5, 4, 6), + TEGRA234_MAIN_GPIO_PORT(G, 4, 0, 8), + TEGRA234_MAIN_GPIO_PORT(H, 4, 1, 8), + TEGRA234_MAIN_GPIO_PORT(I, 4, 2, 7), + TEGRA234_MAIN_GPIO_PORT(J, 5, 0, 6), + TEGRA234_MAIN_GPIO_PORT(K, 3, 0, 8), + TEGRA234_MAIN_GPIO_PORT(L, 3, 1, 4), + TEGRA234_MAIN_GPIO_PORT(M, 2, 0, 8), + TEGRA234_MAIN_GPIO_PORT(N, 2, 1, 8), + TEGRA234_MAIN_GPIO_PORT(P, 2, 2, 8), + TEGRA234_MAIN_GPIO_PORT(Q, 2, 3, 8), + TEGRA234_MAIN_GPIO_PORT(R, 2, 4, 6), + TEGRA234_MAIN_GPIO_PORT(X, 1, 0, 8), + TEGRA234_MAIN_GPIO_PORT(Y, 1, 1, 8), + TEGRA234_MAIN_GPIO_PORT(Z, 1, 2, 8), + TEGRA234_MAIN_GPIO_PORT(AC, 0, 1, 8), + TEGRA234_MAIN_GPIO_PORT(AD, 0, 2, 4), + TEGRA234_MAIN_GPIO_PORT(AE, 3, 3, 2), + TEGRA234_MAIN_GPIO_PORT(AF, 3, 4, 4), + TEGRA234_MAIN_GPIO_PORT(AG, 3, 2, 8) +}; + +static const struct tegra_gpio_soc tegra234_main_soc = { + .num_ports = ARRAY_SIZE(tegra234_main_ports), + .ports = tegra234_main_ports, + .name = "tegra234-gpio", + .instance = 0, +}; + +#define TEGRA234_AON_GPIO_PORT(_name, _bank, _port, _pins) \ + [TEGRA234_AON_GPIO_PORT_##_name] = { \ + .name = #_name, \ + .bank = _bank, \ + .port = _port, \ + .pins = _pins, \ + } + +static const struct tegra_gpio_port tegra234_aon_ports[] = { + TEGRA234_AON_GPIO_PORT(AA, 0, 4, 8), + TEGRA234_AON_GPIO_PORT(BB, 0, 5, 4), + TEGRA234_AON_GPIO_PORT(CC, 0, 2, 8), + TEGRA234_AON_GPIO_PORT(DD, 0, 3, 3), + TEGRA234_AON_GPIO_PORT(EE, 0, 0, 8), + TEGRA234_AON_GPIO_PORT(GG, 0, 1, 1) +}; + +static const struct tegra_gpio_soc tegra234_aon_soc = { + .num_ports = ARRAY_SIZE(tegra234_aon_ports), + .ports = tegra234_aon_ports, + .name = "tegra234-gpio-aon", + .instance = 1, +}; + static const struct of_device_id tegra186_gpio_of_match[] = { { .compatible = "nvidia,tegra186-gpio", @@ -890,6 +958,12 @@ static const struct of_device_id tegra186_gpio_of_match[] = { }, { .compatible = "nvidia,tegra194-gpio-aon", .data = &tegra194_aon_soc + }, { + .compatible = "nvidia,tegra234-gpio", + .data = &tegra234_main_soc + }, { + .compatible = "nvidia,tegra234-gpio-aon", + .data = &tegra234_aon_soc }, { /* sentinel */ }