From patchwork Tue Jun 7 11:46:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krishna Yarlagadda X-Patchwork-Id: 12871829 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A2D8FC433EF for ; Tue, 7 Jun 2022 11:47:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242067AbiFGLrZ (ORCPT ); Tue, 7 Jun 2022 07:47:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54016 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243092AbiFGLrQ (ORCPT ); Tue, 7 Jun 2022 07:47:16 -0400 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2040.outbound.protection.outlook.com [40.107.223.40]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 154F1D71; Tue, 7 Jun 2022 04:47:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ndc7tJQ7xFuuaSb6PKSeWwiWQd7s5CI6xw90swwjYnVheEeUd96949SHnIQx4kl6QVJa3KlAl59s/tExkitLz6Hja4uiQG3y45Xwjf7wfjmSqQCS0MVILqSB/zc/s1GT6GTPDyI7R6yz4fYoQZG2PfxCbycTOx9E+8QV8JN5l8xtyXBQG6mdS9zVdTCVMIPG0ujmyJF4bQnjXjZoFJlKRSCk7YCZ3McwesG3ob71iFnb7/1Xwg0g/wth0gZz6E4GtWCLXHO5ShyzjfhtGF0GHQ6bYfbwc86u2CXmmp3s2JOV5T1dXC0yx+D96oKwPssBpmiEw75Rt4aYcgm0Ww5clw== 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=NXTvF4/l4s6vx+lH9WNjmD5knlHh4tPSJUy3kHPskl0=; b=arrDIzAVIWatIewgsJ74lS8535QvHtaW5uFClNVvSv4taSlTEbK3YTvA3a11FWZj06f2/nXUGiYcMUNzLFHoYSAu5fF/2VcEOb/Ez2RFOYutk36+iy3rvqF1xRb+0PtdcGmiZOvJ80FTVEjzasl7FYQIejn0EItFhzAgGE3JasKRe58embVl/Lp8qFQqi0kSWRsJJnvcy7a+wm1dZBDZOMmRv+sqXdQWjAMlZlJRl16OP755Z6n6bbZa2tC+2kxi68veefI+hY7JVVwXM9HN9opqaxKSrBpW7fidPaJ9Bs41cu6LS9q9CMuH7UWYhFFWpb2Rm41HQ4qlzQiQTUAksQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.238) smtp.rcpttodomain=kernel.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject 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=NXTvF4/l4s6vx+lH9WNjmD5knlHh4tPSJUy3kHPskl0=; b=OFdeXa269mXbCbe7N+UgWPawy7opFvB8dfOypPyoMsY82Ll/n6bkrrCRFbysJBZIQY30wAxrVNJYnG6cXU74rc3uQRlbm3UNXkQfMmoaVdzxxxAiNmDEW72uGO0jYVxz69OR0V3rfMPxXW8Pgt1JteGkRO3GDGQxqHDAst48q6JCtb40pKvlfKYkZYgoWrrWzYifrBaaP03hwgarToVntFyGPQDFb0I6fl/OBC5D59jtrrdTThyR7UE22TixshJf+qUin4gS7453oPM2lK2TL5Nz1RTTC2UwvFB+0Q2l0ViDqyxeEL3+K5+xtH9yVrU7dhLUs/7k0btMC/+CtDihHA== Received: from DM3PR03CA0015.namprd03.prod.outlook.com (2603:10b6:0:50::25) by MW3PR12MB4555.namprd12.prod.outlook.com (2603:10b6:303:59::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5314.13; Tue, 7 Jun 2022 11:47:12 +0000 Received: from DM6NAM11FT049.eop-nam11.prod.protection.outlook.com (2603:10b6:0:50:cafe::db) by DM3PR03CA0015.outlook.office365.com (2603:10b6:0:50::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5314.13 via Frontend Transport; Tue, 7 Jun 2022 11:47:12 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.238) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 12.22.5.238 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.238; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (12.22.5.238) by DM6NAM11FT049.mail.protection.outlook.com (10.13.172.188) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.5314.12 via Frontend Transport; Tue, 7 Jun 2022 11:47:12 +0000 Received: from drhqmail201.nvidia.com (10.126.190.180) by DRHQMAIL105.nvidia.com (10.27.9.14) with Microsoft SMTP Server (TLS) id 15.0.1497.32; Tue, 7 Jun 2022 11:47:11 +0000 Received: from drhqmail201.nvidia.com (10.126.190.180) by drhqmail201.nvidia.com (10.126.190.180) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Tue, 7 Jun 2022 04:47:10 -0700 Received: from BUILDSERVER-IO-L4T.nvidia.com (10.127.8.14) by mail.nvidia.com (10.126.190.180) with Microsoft SMTP Server id 15.2.986.22 via Frontend Transport; Tue, 7 Jun 2022 04:47:07 -0700 From: Krishna Yarlagadda To: , , , , , , CC: , , , , "Krishna Yarlagadda" Subject: [Patch V3 1/3] spi: tegra210-quad: Multi-cs support Date: Tue, 7 Jun 2022 17:16:57 +0530 Message-ID: <20220607114659.54314-2-kyarlagadda@nvidia.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220607114659.54314-1-kyarlagadda@nvidia.com> References: <20220607114659.54314-1-kyarlagadda@nvidia.com> X-NVConfidentiality: public MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: fbdb6315-2af2-44e1-7083-08da487b75f3 X-MS-TrafficTypeDiagnostic: MW3PR12MB4555:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: yUUsrRBoYuDrWsZwLJxjFXKaf5fgPLjKoHpQewJZoag7IZQwQZJAjtkKuiIn1/U3sAJEpLxwqYdPovZdzqDAFU+zH0Ymx3/soISLE1Zj2WNSdF/r7AVe36nurLpD74sRpFq/pjMibj90ZzRDj9MPFXer3sBI6OxwUHkXZwUcUfYfZ+uO26qq6aUiopSJ2Ji6zMM1E7rZLedoVxIQPVKZovJ1OWyFNf3C9bI5huDZ21ebaj0o2b7Y7OzKu7N3a5+0Ke2+o35s/KRTszqNk22tBC/5cl8t4uoCFtWepccuK2OSYws8w56CK6VY1zCtxicFvXcdbmxHYqcxMFURzktDLoX2fZ40QKKlZTa0BJtX477DmYrMsN/KGe7RH/pLOkhTmBgUzz2dlLV6H67Vi2pJ3FOrRrlcasfdIuq3V1/nYnJWWOGgIMaUbYzfo5VyTc6YffPor//wQFzO2dfMY/MXhGMy36nh9KCJnTYZ962UuYLoAfKZcWFwuvLP6krU6XYV7vs1C2TbN9a5Qu1C8l4PJLD6AMMjiqAfirTJ7F1mMDBggxSQksvF/QDyXr4D+bcBZVyhheWM8SFy8U5CzphXSZAFE+AJ/crmsawMQ4mP83Jxew6KKFgA4IRluqNhQYp+25JWfZH7cY/bJekWYVhQAsApYuOQ+5PDgx7/qQ3B+BsThjvIVPDbGQkupsp3QM+1nCwQnk5UyydeIhtIao3ejg== X-Forefront-Antispam-Report: CIP:12.22.5.238;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:InfoNoRecords;CAT:NONE;SFS:(13230001)(4636009)(40470700004)(36840700001)(46966006)(82310400005)(81166007)(36860700001)(86362001)(7696005)(356005)(8936002)(6666004)(2906002)(40460700003)(508600001)(83380400001)(5660300002)(1076003)(26005)(426003)(47076005)(2616005)(107886003)(70206006)(70586007)(316002)(110136005)(186003)(54906003)(8676002)(4326008)(336012)(36756003)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jun 2022 11:47:12.2162 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: fbdb6315-2af2-44e1-7083-08da487b75f3 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[12.22.5.238];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT049.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW3PR12MB4555 Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org Tegra Grace and later chips can support upto 4 chip select lines for QUAD SPI. Added new compatible for Tegra Grace. Signed-off-by: Krishna Yarlagadda --- drivers/spi/spi-tegra210-quad.c | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/drivers/spi/spi-tegra210-quad.c b/drivers/spi/spi-tegra210-quad.c index 66f647f32876..c89592b21ffc 100644 --- a/drivers/spi/spi-tegra210-quad.c +++ b/drivers/spi/spi-tegra210-quad.c @@ -37,6 +37,16 @@ #define QSPI_RX_EN BIT(12) #define QSPI_CS_SW_VAL BIT(20) #define QSPI_CS_SW_HW BIT(21) + +#define QSPI_CS_POL_INACTIVE(n) (1 << (22 + (n))) +#define QSPI_CS_POL_INACTIVE_MASK (0xF << 22) +#define QSPI_CS_SEL_0 (0 << 26) +#define QSPI_CS_SEL_1 (1 << 26) +#define QSPI_CS_SEL_2 (2 << 26) +#define QSPI_CS_SEL_3 (3 << 26) +#define QSPI_CS_SEL_MASK (3 << 26) +#define QSPI_CS_SEL(x) (((x) & 0x3) << 26) + #define QSPI_CONTROL_MODE_0 (0 << 28) #define QSPI_CONTROL_MODE_3 (3 << 28) #define QSPI_CONTROL_MODE_MASK (3 << 28) @@ -154,6 +164,7 @@ struct tegra_qspi_soc_data { bool has_dma; bool cmb_xfer_capable; + unsigned int cs_count; }; struct tegra_qspi_client_data { @@ -812,6 +823,7 @@ static u32 tegra_qspi_setup_transfer_one(struct spi_device *spi, struct spi_tran tegra_qspi_mask_clear_irq(tqspi); command1 = tqspi->def_command1_reg; + command1 |= QSPI_CS_SEL(spi->chip_select); command1 |= QSPI_BIT_LENGTH(bits_per_word - 1); command1 &= ~QSPI_CONTROL_MODE_MASK; @@ -941,10 +953,11 @@ static int tegra_qspi_setup(struct spi_device *spi) /* keep default cs state to inactive */ val = tqspi->def_command1_reg; + val |= QSPI_CS_SEL(spi->chip_select); if (spi->mode & SPI_CS_HIGH) - val &= ~QSPI_CS_SW_VAL; + val &= ~QSPI_CS_POL_INACTIVE(spi->chip_select); else - val |= QSPI_CS_SW_VAL; + val |= QSPI_CS_POL_INACTIVE(spi->chip_select); tqspi->def_command1_reg = val; tegra_qspi_writel(tqspi, tqspi->def_command1_reg, QSPI_COMMAND1); @@ -1425,16 +1438,25 @@ static irqreturn_t tegra_qspi_isr_thread(int irq, void *context_data) static struct tegra_qspi_soc_data tegra210_qspi_soc_data = { .has_dma = true, .cmb_xfer_capable = false, + .cs_count = 1, }; static struct tegra_qspi_soc_data tegra186_qspi_soc_data = { .has_dma = true, .cmb_xfer_capable = true, + .cs_count = 1, }; static struct tegra_qspi_soc_data tegra234_qspi_soc_data = { .has_dma = false, .cmb_xfer_capable = true, + .cs_count = 1, +}; + +static struct tegra_qspi_soc_data tegra241_qspi_soc_data = { + .has_dma = false, + .cmb_xfer_capable = true, + .cs_count = 4, }; static const struct of_device_id tegra_qspi_of_match[] = { @@ -1450,6 +1472,9 @@ static const struct of_device_id tegra_qspi_of_match[] = { }, { .compatible = "nvidia,tegra234-qspi", .data = &tegra234_qspi_soc_data, + }, { + .compatible = "nvidia,tegra241-qspi", + .data = &tegra241_qspi_soc_data, }, {} }; @@ -1467,6 +1492,9 @@ static const struct acpi_device_id tegra_qspi_acpi_match[] = { }, { .id = "NVDA1413", .driver_data = (kernel_ulong_t)&tegra234_qspi_soc_data, + }, { + .id = "NVDA1513", + .driver_data = (kernel_ulong_t)&tegra241_qspi_soc_data, }, {} }; @@ -1506,6 +1534,7 @@ static int tegra_qspi_probe(struct platform_device *pdev) spin_lock_init(&tqspi->lock); tqspi->soc_data = device_get_match_data(&pdev->dev); + master->num_chipselect = tqspi->soc_data->cs_count; r = platform_get_resource(pdev, IORESOURCE_MEM, 0); tqspi->base = devm_ioremap_resource(&pdev->dev, r); if (IS_ERR(tqspi->base)) From patchwork Tue Jun 7 11:46:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krishna Yarlagadda X-Patchwork-Id: 12871830 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 94DB4C43334 for ; Tue, 7 Jun 2022 11:47:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243134AbiFGLrb (ORCPT ); Tue, 7 Jun 2022 07:47:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54346 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243100AbiFGLrT (ORCPT ); Tue, 7 Jun 2022 07:47:19 -0400 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2057.outbound.protection.outlook.com [40.107.92.57]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A7F9110F5; Tue, 7 Jun 2022 04:47:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iEmPIqcJ9CgUZ51lxiheF7hcRtQeBoCjP+31Qj/k/0QxcjSdV78qNADFqgFjwvJ38MhZSA4zEF6uvVdkVu8TKlwzCNP2Xm9R1nnUgkxwsjp9BXFGGrfPZXZg517XTgAJSldweKWicWbjF/uy1JZ7dNLEGp0/F487JVRtBLTxvnBhAWQHhpDyxkwgsQn64kkCz2LsbOC44xi2AdlHmkrKBhZkNY87IPDDVjlg9tm6XVb1z7qhaEylxS9TXNLPQ2dGVLbjPw0f+qJd9Vgzd5R6ItUC0ntF15Ekx89zJ41FBb4lSw0eFmEWGiv60olwoACBErxwU43XffC36iVkzVZRFg== 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=Td+9tEcH+dtpGWGs5tJDzJMA9ZxCvzhaeEN5GiVi1Q0=; b=PUnB20CVYMlkHD0kLqC0Gue8ufUPMwdmaEi1xke/wP7foQQ4uVBoyz8NA7Kpq4oBXG3p8bFN3ZdesRrhQiGhLNB7cPDkwa6MAABT2aX+XEMnyqAU7MDXloBndY5sZkH0/vdX2/Gk9Fy7dcu9e+ATgeIiukM1pLEzZ1tb8w86b+HESnv1RovU6rqzDDxALpPPyXRY8agD82rLmmJ+HkDdPj8b8pfqyWUGG4etvzhJFwwKV4fCSU7LVJurvFkU14qPGjLfaokkY36ZMNoftu+Jc0qduRxtbmlkvLAo8mjcagcQFKBAfyP43zZHW/eDZeXjuXNGuZetEOaW3u1BCkoRqA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.234) smtp.rcpttodomain=kernel.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject 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=Td+9tEcH+dtpGWGs5tJDzJMA9ZxCvzhaeEN5GiVi1Q0=; b=SZMrKSwYP2X60dKcb7XAsslg1/FIIX+J6a1KyNxfJ0HNkWu/hPVlykK8fHeM3YbOGImonxVDp8QLLZz9KJbDPVdDYdr6SzG2izEAdgklQ0x/V/QlJzhAHVZ2MU6dHdigckRpOZmxgmz+rboh1ao0dzzy8nKXJbz9blqEuOwC8XKoYMUaWav1ZP7Ar31PxGFTljho79mctpDWIdbjM3Yui6DxhjvPGhwiuvsc2yFnjUc3/0xxFWton3NXgGV9f6/6beER9Sw+48FgJ+fSUhqUb2/fbh3Vlq6EqeIRzdH3EX5ldrOwAsW406xUPHfjeDwIenXo3F2lCEc5I5Qr7FECzg== Received: from DM5PR11CA0012.namprd11.prod.outlook.com (2603:10b6:3:115::22) by CY5PR12MB6324.namprd12.prod.outlook.com (2603:10b6:930:f::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5314.19; Tue, 7 Jun 2022 11:47:16 +0000 Received: from DM6NAM11FT014.eop-nam11.prod.protection.outlook.com (2603:10b6:3:115:cafe::1c) by DM5PR11CA0012.outlook.office365.com (2603:10b6:3:115::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5314.12 via Frontend Transport; Tue, 7 Jun 2022 11:47:16 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.234) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 12.22.5.234 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.234; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (12.22.5.234) by DM6NAM11FT014.mail.protection.outlook.com (10.13.173.132) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.5314.12 via Frontend Transport; Tue, 7 Jun 2022 11:47:15 +0000 Received: from drhqmail201.nvidia.com (10.126.190.180) by DRHQMAIL101.nvidia.com (10.27.9.10) with Microsoft SMTP Server (TLS) id 15.0.1497.32; Tue, 7 Jun 2022 11:47:15 +0000 Received: from drhqmail201.nvidia.com (10.126.190.180) by drhqmail201.nvidia.com (10.126.190.180) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Tue, 7 Jun 2022 04:47:13 -0700 Received: from BUILDSERVER-IO-L4T.nvidia.com (10.127.8.14) by mail.nvidia.com (10.126.190.180) with Microsoft SMTP Server id 15.2.986.22 via Frontend Transport; Tue, 7 Jun 2022 04:47:10 -0700 From: Krishna Yarlagadda To: , , , , , , CC: , , , , "Krishna Yarlagadda" Subject: [Patch V3 2/3] spi: dt-bindings: split peripheral prods Date: Tue, 7 Jun 2022 17:16:58 +0530 Message-ID: <20220607114659.54314-3-kyarlagadda@nvidia.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220607114659.54314-1-kyarlagadda@nvidia.com> References: <20220607114659.54314-1-kyarlagadda@nvidia.com> X-NVConfidentiality: public MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 733c68e8-fb13-47c9-dd82-08da487b780c X-MS-TrafficTypeDiagnostic: CY5PR12MB6324:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: NGphVrhtCPz8/g6XzPzIwrqyQLpxZ67ddhDGH3dSJSDs9Y0mMhb3XDJkr6ew+EdnuwsGRSbwCn7ZzqF7SW15Z7KfRv3OLQx+w1UHeVgwgetwxiKCiaZogD5VpOY82AYPxaFanneBGq+Ce2AUNEC+9y4N22tpsP72D7j0g9/sgaIrqnDkLyZwFjYEQ5eb19ssbFcoOy2jBy+ytqpA1J3IAbbpDIr/QJqJa9cB2K5smVR0gUGRtjAcnSB6et6FJBhGKjLZ8uUz7pNUiwilphsvvYPMAiGsuK4SVmify4ouYtDVdFXW31S7EFAQIKx2FOx3Z9jFig2wVZh/TqdgQ5yhBfJhsHy8iOR8Pfvtqc1yVavecZuBx6bMSEKMufC+QuFUr9na0wLGOVQvqc28VR1VgVdhSHAAKsJ/a7WmdTo3QS1MypMg4MVq8rBRaACZIlCWKIKwvJLXgBugzdCGfnddL+ZYbuVzEVQNr/QmsgMjCWVTJszdYv5oa5DorWst3c5vcQI+eLHYRZleIRhvm82cVyYj2CrfSJP1pFNnVkpe9PduI1tczguW/pIvTbfEaNpbJoJsMORVv8c3xIC/0/Z7wD0vjILSab1kVhGSu9fWCQUTMlm4RFqWea5/Ftl4Dib8DoMLBcQcwAzGmYq+OwfSIjVbh6Jf3b7moEDR9zGrHuZT6OHHxUQXntxohfI9TZ/OHbM1MS+11FfmPX4c7CE3dNLPzo+gZKhxDhqD0aTCgNeLq6IVsjx9S8HQGAn5wIuEanVezNuowlxOLbfyvIudg2uE/KS77LV3vcQiuChDjwl5Ap5BDvo4RNlEm9sniWcxqbKeg/1OGiDl6A+as7daqQ== X-Forefront-Antispam-Report: CIP:12.22.5.234;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:InfoNoRecords;CAT:NONE;SFS:(13230001)(4636009)(46966006)(40470700004)(36840700001)(54906003)(110136005)(26005)(2616005)(70206006)(70586007)(81166007)(1076003)(82310400005)(36756003)(107886003)(4326008)(8676002)(7696005)(86362001)(83380400001)(40460700003)(36860700001)(5660300002)(508600001)(426003)(356005)(966005)(8936002)(316002)(2906002)(6666004)(186003)(47076005)(336012)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jun 2022 11:47:15.7382 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 733c68e8-fb13-47c9-dd82-08da487b780c X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[12.22.5.234];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT014.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY5PR12MB6324 Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org Move peripheral properties for Tegra QSPI controller to nvidia,tegra210-quad-peripheral-props.yaml and add reference to spi-peripheral-props.yaml file. Signed-off-by: Krishna Yarlagadda Reviewed-by: Rob Herring --- ...nvidia,tegra210-quad-peripheral-props.yaml | 33 +++++++++++++++++++ .../bindings/spi/nvidia,tegra210-quad.yaml | 21 ------------ .../bindings/spi/spi-peripheral-props.yaml | 1 + 3 files changed, 34 insertions(+), 21 deletions(-) create mode 100644 Documentation/devicetree/bindings/spi/nvidia,tegra210-quad-peripheral-props.yaml diff --git a/Documentation/devicetree/bindings/spi/nvidia,tegra210-quad-peripheral-props.yaml b/Documentation/devicetree/bindings/spi/nvidia,tegra210-quad-peripheral-props.yaml new file mode 100644 index 000000000000..24e0c2181d25 --- /dev/null +++ b/Documentation/devicetree/bindings/spi/nvidia,tegra210-quad-peripheral-props.yaml @@ -0,0 +1,33 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/spi/nvidia,tegra210-quad-peripheral-props.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Peripheral properties for Tegra Quad SPI Controller + +maintainers: + - Thierry Reding + - Jonathan Hunter + +properties: + nvidia,tx-clk-tap-delay: + description: + Delays the clock going out to device with this tap value. + Tap value varies based on platform design trace lengths from Tegra + QSPI to corresponding slave device. + $ref: /schemas/types.yaml#/definitions/uint32 + minimum: 0 + maximum: 31 + + nvidia,rx-clk-tap-delay: + description: + Delays the clock coming in from the device with this tap value. + Tap value varies based on platform design trace lengths from Tegra + QSPI to corresponding slave device. + $ref: /schemas/types.yaml#/definitions/uint32 + minimum: 0 + maximum: 255 + +unevaluatedProperties: true + diff --git a/Documentation/devicetree/bindings/spi/nvidia,tegra210-quad.yaml b/Documentation/devicetree/bindings/spi/nvidia,tegra210-quad.yaml index 0296edd1de22..e79f0b2560a4 100644 --- a/Documentation/devicetree/bindings/spi/nvidia,tegra210-quad.yaml +++ b/Documentation/devicetree/bindings/spi/nvidia,tegra210-quad.yaml @@ -57,27 +57,6 @@ patternProperties: spi-tx-bus-width: enum: [1, 2, 4] - nvidia,tx-clk-tap-delay: - description: - Delays the clock going out to device with this tap value. - Tap value varies based on platform design trace lengths from Tegra - QSPI to corresponding slave device. - $ref: /schemas/types.yaml#/definitions/uint32 - minimum: 0 - maximum: 31 - - nvidia,rx-clk-tap-delay: - description: - Delays the clock coming in from the device with this tap value. - Tap value varies based on platform design trace lengths from Tegra - QSPI to corresponding slave device. - $ref: /schemas/types.yaml#/definitions/uint32 - minimum: 0 - maximum: 255 - - required: - - reg - required: - compatible - reg diff --git a/Documentation/devicetree/bindings/spi/spi-peripheral-props.yaml b/Documentation/devicetree/bindings/spi/spi-peripheral-props.yaml index 5e32928c4fc3..cf589d17b0f5 100644 --- a/Documentation/devicetree/bindings/spi/spi-peripheral-props.yaml +++ b/Documentation/devicetree/bindings/spi/spi-peripheral-props.yaml @@ -112,5 +112,6 @@ properties: allOf: - $ref: cdns,qspi-nor-peripheral-props.yaml# - $ref: samsung,spi-peripheral-props.yaml# + - $ref: nvidia,tegra210-quad-peripheral-props.yaml# additionalProperties: true From patchwork Tue Jun 7 11:46:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krishna Yarlagadda X-Patchwork-Id: 12871831 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9DB6BC433EF for ; Tue, 7 Jun 2022 11:47:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243130AbiFGLrn (ORCPT ); Tue, 7 Jun 2022 07:47:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54772 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243117AbiFGLrY (ORCPT ); Tue, 7 Jun 2022 07:47:24 -0400 Received: from NAM04-DM6-obe.outbound.protection.outlook.com (mail-dm6nam04on2057.outbound.protection.outlook.com [40.107.102.57]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 83555A45C; Tue, 7 Jun 2022 04:47:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=M22G7jbJUj+LFrX8bSGD8X1L0am1ZHHtALlPaZmdFJn/i2JJKNYCsgezGPTJvgFepHomVsbDPuW0CRuNM80GRGuNANEC5jvaUeQBN9HAkpo2T0Vt/h83IiKBTDEPT+MxX/X05fxP76fgzTaVewuva5/2groP7iJwy/xHbDtRDHRAONbX3JBdTfiKZsWc781DHp0JFO9LLIP5JN/c8pRxikZukH7+EbHI8isYnmw6XSNoBAla173D9NUC/EBv4+c9RlTv9QxFWkB7CDzA0GnU34SBnN70ulz5jkyeVY9nklVEwqKhFB42BCFpBhZGC1Xf+sC4cNheBOURxOHDrdS7Ng== 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=JX5NrfXoF10D+Fk2qYDmPDN7LKEQCsru83G+1gNbV7A=; b=ltHnpzrvwJ5uAICmUN0AdwLEAIK1zdy4MUQqdVOaXTdTB61MkwO4pXuDWKvtfgiACNE82WdlV7tMozYXS9fAwrSY8IPHopevNr/FaIRb11z/sIagbuMhZvASFUoZFE1h7vjU4m2jSpfj4zk6U1DH5MJRpgth0GvPFyJMjHALVWWEVQyBd6Tvat8Bt0akJYMktgaIorUBz0TYClBMC6C0Ifvrdyp8gKEsk+EOwDWbuanBYxuP98+sMugbd/oNJU8ROKV3BGPbKG1zxF0+RVenaFzyjZNVua7/U1ms9HNPvVkEwu8QvyomECXt1+iBP8elqAgY4QxcEXBV+EdISM2m8A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.234) smtp.rcpttodomain=kernel.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject 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=JX5NrfXoF10D+Fk2qYDmPDN7LKEQCsru83G+1gNbV7A=; b=Cnk05Ll0ZSI90P1vuA44Ug94TdulVNT0pq0cG/G+azIxqDH9cP+CsVkhXTUzyGNe0VqxM96sV0GP2CeU28euZ13dhTreJfxOGLQk2ttsM45lYH33sGWkbW6I7ki+lvvLlvO5FH/zsSRKjyxx2gll+5vuQTnS6eagVfbiztyEhnzjQtvRPxema2b9YIDnD0n7esCCXAsGT6zSwuxANtaFhWHg6jSXPEYiJPiAFmgWJzDLqdzrfe2wGLMSc6lzHp3qYdHU3SJHYD7jgRapHmQt5CJ9n8j4LXRdbAcOfVqgGAg6lTmFoo/FMUhqclamiDuBnMoIZqq2EJBCURSJmYFW5Q== Received: from DM5PR07CA0127.namprd07.prod.outlook.com (2603:10b6:3:13e::17) by CY4PR12MB1207.namprd12.prod.outlook.com (2603:10b6:903:39::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5314.13; Tue, 7 Jun 2022 11:47:19 +0000 Received: from DM6NAM11FT042.eop-nam11.prod.protection.outlook.com (2603:10b6:3:13e:cafe::7b) by DM5PR07CA0127.outlook.office365.com (2603:10b6:3:13e::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5293.13 via Frontend Transport; Tue, 7 Jun 2022 11:47:19 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.234) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 12.22.5.234 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.234; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (12.22.5.234) by DM6NAM11FT042.mail.protection.outlook.com (10.13.173.165) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.5314.12 via Frontend Transport; Tue, 7 Jun 2022 11:47:18 +0000 Received: from drhqmail202.nvidia.com (10.126.190.181) by DRHQMAIL101.nvidia.com (10.27.9.10) with Microsoft SMTP Server (TLS) id 15.0.1497.32; Tue, 7 Jun 2022 11:47:18 +0000 Received: from drhqmail201.nvidia.com (10.126.190.180) by drhqmail202.nvidia.com (10.126.190.181) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Tue, 7 Jun 2022 04:47:17 -0700 Received: from BUILDSERVER-IO-L4T.nvidia.com (10.127.8.14) by mail.nvidia.com (10.126.190.180) with Microsoft SMTP Server id 15.2.986.22 via Frontend Transport; Tue, 7 Jun 2022 04:47:14 -0700 From: Krishna Yarlagadda To: , , , , , , CC: , , , , "Krishna Yarlagadda" Subject: [Patch V3 3/3] spi: dt-bindings: Add compatible for Tegra241 QSPI Date: Tue, 7 Jun 2022 17:16:59 +0530 Message-ID: <20220607114659.54314-4-kyarlagadda@nvidia.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220607114659.54314-1-kyarlagadda@nvidia.com> References: <20220607114659.54314-1-kyarlagadda@nvidia.com> X-NVConfidentiality: public MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 33381336-fc82-483c-9203-08da487b79e4 X-MS-TrafficTypeDiagnostic: CY4PR12MB1207:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ZStOi4ATHrC2Q6YbkwDtP75V3mPEwG/On6IFyjPBnEjouak2/1uTERGL3lxz92OlF2xHfba6u0mbntOoiEEbP+9A/42HR+WJBvbg36bp8ZjQW3Zey//6irnxYQfc1EYdw5hp4p6pB8mO4YUaImxSvGlHWmTTp7kWwzZwPLERX6Rb6D9cvIrScbzxOqGsGL5SadvSZHL6QKHGh2ynzm8jyQ4kp+M6uiUrKaFgjxJj1lf+lbTL5tRP3KQCSr1sJVShazqWzsdP5oGgcTK4GNtGSbxsVwuOFkRDdZAaAB/aCt8c2XbdpP/gzxOkMIXlsQbZoH2Vb8IB06SJWzNXqsLsjBvEekp4HDxkYAC53Sqpl5Q7w2fo1+hgn9/P0YJLbR6UCPzvrEjdhuezkywGIDkzPzSNm/S+uBP2WLBgwQA+1/onopqfYp8aAcpBoC0QF1qXiTxK35wRZLc63aZhX5WBirIJ1AkoCrMsWOopZ+ZntHTXYRZ1KF9jcPGfS6NpWonmBddz+Ta7G4KrZDNuRujXwhWwq22VcxMFOyKpMgV1R/MrZ3HsnqyLsBbzBK2knHVmKQH84olRWOvcjNlpNg3yjg+6m4bOy6QOd1IvEfTf7l6rg0OoHFC5R6vnMY4r4vBvNNXbCO271usa8FP6shcmEUgfM2Yuj4T7xsXKrjPo8vWrAv7S4cL6MWaPaplKkrnSbQrNccuxmtACCD64PeZqBQ== X-Forefront-Antispam-Report: CIP:12.22.5.234;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:InfoNoRecords;CAT:NONE;SFS:(13230001)(4636009)(46966006)(40470700004)(36840700001)(70206006)(4326008)(70586007)(8676002)(4744005)(508600001)(86362001)(81166007)(2906002)(6666004)(7696005)(8936002)(316002)(36860700001)(26005)(356005)(5660300002)(186003)(426003)(82310400005)(336012)(47076005)(107886003)(110136005)(2616005)(1076003)(54906003)(40460700003)(36756003)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jun 2022 11:47:18.8296 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 33381336-fc82-483c-9203-08da487b79e4 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[12.22.5.234];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT042.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR12MB1207 Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org Add new compatible for Tegra241 QSPI controller which has multiple chip select lines. Signed-off-by: Krishna Yarlagadda Acked-by: Rob Herring --- Documentation/devicetree/bindings/spi/nvidia,tegra210-quad.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/spi/nvidia,tegra210-quad.yaml b/Documentation/devicetree/bindings/spi/nvidia,tegra210-quad.yaml index e79f0b2560a4..6b733e5c1163 100644 --- a/Documentation/devicetree/bindings/spi/nvidia,tegra210-quad.yaml +++ b/Documentation/devicetree/bindings/spi/nvidia,tegra210-quad.yaml @@ -20,6 +20,7 @@ properties: - nvidia,tegra186-qspi - nvidia,tegra194-qspi - nvidia,tegra234-qspi + - nvidia,tegra241-qspi reg: maxItems: 1