From patchwork Fri Nov 11 10:14:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wayne Chang X-Patchwork-Id: 13040069 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 0E147C43219 for ; Fri, 11 Nov 2022 10:16:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233600AbiKKKQF (ORCPT ); Fri, 11 Nov 2022 05:16:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52616 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233468AbiKKKQC (ORCPT ); Fri, 11 Nov 2022 05:16:02 -0500 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2044.outbound.protection.outlook.com [40.107.94.44]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AA79667100; Fri, 11 Nov 2022 02:15:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kf1286Yrv/al95PJt0mMMYhj/2OgCAi2+GH/Yy4jQxATiS33bZmqW3+pJFyBdKMhdUvtYFi53qw80c7BOmZkcvbGs1GUsDUTpkM5Buw52+0yjxxmzwzFfZ8ivwUxYl6NMivnzYmRhZxNlafFel+v4Mx1jv7GqHfHMAkYbvO1jW+MVJZV/cy18jJgc2Blbl6e/faVadN/TCugoDK2+t0G/eNbvUrLeHuAq2U9Py23dN50A6/CC1xGDUHBcZoprLhSp8v+3W0V+O14Sxt8agjsHnVLayu04JykPZQ4VFrq+LEfvKnh1tE87Lp3QubvhpVF4P/YydJhNPP53myxBLDOtg== 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=j8dpUG1wROtwJ+ymMrT9Iew8vZ5ehFJIhhAiDRG/w4k=; b=jVSjnFhH2zMmBypV+R7b8kDAZaSp1smETu5ofFTU5bd+/E87AHu6MQeUdzwpRbINh2AxuyQT1u4urwqkhLPp1epTdlo9Xyaajk8gKCwGMWWNaH4ii2tDspu69t2c2/qM3ZBnrjDCa1LQ9M551xGd3oivz4FPJdt6SJrJd6yAR47gJN2jeeeMVBYbYALjMQ/WqgL0UT37lrf4+RZIvISqxksbwhJ0zO9umQYKj+u5ElZak/Gj4QyBwzo+QtJUI9+VEhuzZIDaq00Z1fnz0ChXAiHDlm/1PwzALYw7aMDUkbWXjqLEzpFIjgNCrX1Z3Wn+Chp+dNU2FtSzTIK2bAZwXg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=linuxfoundation.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=j8dpUG1wROtwJ+ymMrT9Iew8vZ5ehFJIhhAiDRG/w4k=; b=a5zoyorzyZf4/VRIQ1sRQk1utSVsS6ZBHFJfE7eQRLO9YqH00T28lq4xk2Sifu4EFAKnmrkiE70YGCEBJ63M47sJ1jI2Z2XOhCbnNjlDzZ2359IJkJ/Xek4OOBcn903AEPCHd3dk7a3G4b9msSWiAe1hRSEEdkKK3y4XT4FuEu27abGA/YUVaH+MUeFcGdjskUAVHg0bh8bOmD3kFrb8NSWkatm7E7AOGA002VxyMAlw6cxmaArnp4ASSW6iYObWnCy747zPM5SQF9w/RCIGrrIBH5jBS2/ayu0PeHbyKzpnNvBQSCjEr154nW0YjpRQxBkLSZz+QgLNHaj6pLlumA== Received: from DS7PR03CA0160.namprd03.prod.outlook.com (2603:10b6:5:3b2::15) by SN7PR12MB6689.namprd12.prod.outlook.com (2603:10b6:806:273::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5813.13; Fri, 11 Nov 2022 10:15:55 +0000 Received: from CY4PEPF0000B8EE.namprd05.prod.outlook.com (2603:10b6:5:3b2:cafe::f0) by DS7PR03CA0160.outlook.office365.com (2603:10b6:5:3b2::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5813.14 via Frontend Transport; Fri, 11 Nov 2022 10:15:55 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) 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 216.228.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by CY4PEPF0000B8EE.mail.protection.outlook.com (10.167.241.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5813.11 via Frontend Transport; Fri, 11 Nov 2022 10:15:55 +0000 Received: from rnnvmail202.nvidia.com (10.129.68.7) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.26; Fri, 11 Nov 2022 02:15:45 -0800 Received: from rnnvmail202.nvidia.com (10.129.68.7) by rnnvmail202.nvidia.com (10.129.68.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.36; Fri, 11 Nov 2022 02:15:45 -0800 Received: from waynec-Precision-5760.nvidia.com (10.127.8.13) by mail.nvidia.com (10.129.68.7) with Microsoft SMTP Server id 15.2.986.36 via Frontend Transport; Fri, 11 Nov 2022 02:15:41 -0800 From: Wayne Chang To: , , , , , , , , , , , , CC: , , , , , , , Subject: [PATCH v2 01/13] dt-bindings: usb: tegra-xudc: Add Tegra234 XUSB controller support Date: Fri, 11 Nov 2022 18:14:57 +0800 Message-ID: <20221111101509.999589-2-waynec@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221111101509.999589-1-waynec@nvidia.com> References: <20221111101509.999589-1-waynec@nvidia.com> MIME-Version: 1.0 X-NVConfidentiality: public X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000B8EE:EE_|SN7PR12MB6689:EE_ X-MS-Office365-Filtering-Correlation-Id: 7149c9ee-abe1-44ea-6469-08dac3cdb85b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: xfN+Wn4ywFaGycVq1sHjBf+wcCBx5CRp9hia0olwqKzAvgquRbtrVbcAjqxcctq1Yt3wv3g8fulTQ1tSv4brJCdtKW6RSpb5604jpAIth0Yq1ZRTPv4syal8qagtdPoUlfl22qVd3lCVEjVLHyAbGq+QTQUBWVJOt3oPSwkNdyWgR6BY2aeYm7PPL4gurC7L6Nnz3kPktR14tRPr7g+7czI9SjJT926D/7yfBgw2bcnNxLcdj3wIF6hAKLSPs5hZnyq+LpP1xX1OX4dSRlIufONFR9w7wJWSARAPjClYAlIskIK34HVA4hMvmhEz1PZddQNQA0LVBwKr3Pvw079C0dTKAzRKMIH3XAktQxDzcAi/IV86rK/BPXVFTQXN0upGHNwLKX58+OBO9wSi30WlUm12UYHagjf4Lc437fL6eJacq/CQAbbClAGyERlGw/p+av7AuTy5KcBfBxGOXpTQYrwKacJyEPl3HVUaaoO4HRaZChCaJRi5VoOLYh48w46E4N3sygV/DcpdDvMmXrXrDa4Hsz6wuRbNqE+YUFoMuNn99jdIpVdmgvLSYAdxD/gIOaroiEavWZAoqYFnAuIufFf2Rz1+xXW7Dzj0Z6g6eZs1Y4LztN4Jh/k8nKKpCROqNou49SZmIBgFoi5Siqd9AKhy/YcjV1sJandcRlxgOpZoSmhfd0bL8Wo+J2aOUIsd//0BsrIxCzpJLBd4mppq9UsPelQfhRTXhOdw33sLGhURTbB1mGl0ITKLlJijmd2rPDVymHJWhI55bBSxTAk7C+AhyTEdwhdNXsgFGhq0Qf4= X-Forefront-Antispam-Report: CIP:216.228.117.161;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc6edge2.nvidia.com;CAT:NONE;SFS:(13230022)(4636009)(396003)(39860400002)(346002)(376002)(136003)(451199015)(36840700001)(40470700004)(46966006)(7416002)(921005)(8936002)(41300700001)(8676002)(70586007)(36756003)(70206006)(4326008)(2906002)(5660300002)(426003)(86362001)(47076005)(478600001)(40460700003)(336012)(40480700001)(83380400001)(6666004)(26005)(7696005)(1076003)(356005)(7636003)(316002)(82740400003)(2616005)(186003)(110136005)(6636002)(54906003)(36860700001)(82310400005);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Nov 2022 10:15:55.3493 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7149c9ee-abe1-44ea-6469-08dac3cdb85b X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.117.161];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CY4PEPF0000B8EE.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR12MB6689 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Extend the Tegra XUSB controller device tree binding with Tegra234 support. Signed-off-by: Wayne Chang --- V1 -> V2:address the issue on phy-names property .../bindings/usb/nvidia,tegra-xudc.yaml | 24 ++++++++++++------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/Documentation/devicetree/bindings/usb/nvidia,tegra-xudc.yaml b/Documentation/devicetree/bindings/usb/nvidia,tegra-xudc.yaml index fd6e7c81426e..52488a731c4e 100644 --- a/Documentation/devicetree/bindings/usb/nvidia,tegra-xudc.yaml +++ b/Documentation/devicetree/bindings/usb/nvidia,tegra-xudc.yaml @@ -22,6 +22,7 @@ properties: - nvidia,tegra210-xudc # For Tegra210 - nvidia,tegra186-xudc # For Tegra186 - nvidia,tegra194-xudc # For Tegra194 + - nvidia,tegra234-xudc # For Tegra234 reg: minItems: 2 @@ -90,21 +91,27 @@ properties: phys: minItems: 1 + maxItems: 8 description: Must contain an entry for each entry in phy-names. See ../phy/phy-bindings.txt for details. phy-names: minItems: 1 + maxItems: 8 items: - - const: usb2-0 - - const: usb2-1 - - const: usb2-2 - - const: usb2-3 - - const: usb3-0 - - const: usb3-1 - - const: usb3-2 - - const: usb3-3 + enum: + - usb2-0 + - usb2-1 + - usb2-2 + - usb2-3 + - usb3-0 + - usb3-1 + - usb3-2 + - usb3-3 + + dma-coherent: + type: boolean avddio-usb-supply: description: PCIe/USB3 analog logic power supply. Must supply 1.05 V. @@ -153,6 +160,7 @@ allOf: enum: - nvidia,tegra186-xudc - nvidia,tegra194-xudc + - nvidia,tegra234-xudc then: properties: reg: From patchwork Fri Nov 11 10:14:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wayne Chang X-Patchwork-Id: 13040070 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 5750BC4167E for ; Fri, 11 Nov 2022 10:16:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233590AbiKKKQG (ORCPT ); Fri, 11 Nov 2022 05:16:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52740 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233587AbiKKKQC (ORCPT ); Fri, 11 Nov 2022 05:16:02 -0500 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2060.outbound.protection.outlook.com [40.107.244.60]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5BA3410B8; Fri, 11 Nov 2022 02:15:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QcAlaSSizgkWe4aVFnwQuWV2pZGSIqNYOgSZBQ2294G6hkpHE9L35wpManXXrYa/x6skG4XchS1HUbNkpMq5i6bhFBhdH5BAv4fXAsotHPTz/7NwGepp0pCAXfytyukEqB0USn6AElxX/El6jyJEzKiegT4cRktAZRhrc3vXqG2MW87TN1IG/VMJaGbES8lWF0RlbHH0XbkFMSOTmPoA2xf/7AIoSX9Y1+qltxrQimymU5qc5zzGrGNpmceO12uK4CsdhvC45XlhdeC/ifz1IYIEJN8kwIVgG2pkzAZEnv19wz8XGDpVzUp9I/AkYiTjZSji1lKootHUjWbMkLGYeQ== 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=vs/S4cWkFvBdXcr1u/3YfmRTM0i3TVOlY3uRjy0sRLI=; b=MTItGxsqwLk1Mea2XwJSY+mhvyfHlsjGMFS15Jmug6FDzVOFp16ws7LC/eMvX/Ocag33hkaYvsskiamDxumDRDrfOWFKfwxy2eb0tfzWDnxnIXxRyQSa1c+eZoQ0Hhvtg5L+X3xYhbMqj70C3s8b+Z9a+ekR2aDA1BLrNG2nIC8EaM1syudSl5jv6tiD4icr+hq5M5Dol/UTXc0NGx748tG7FBVSbznbM4JEp51ldLMoAOVwVYJcdvxjaItPJXoNiZgpoQ6hgt0wDnN6+MAHM50ua48q570Xe9FsjF+o6fXNRJBZbYc4hENwmxeTG9BIkIr+9hEPQKMnapTE+SmqJQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=linuxfoundation.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=vs/S4cWkFvBdXcr1u/3YfmRTM0i3TVOlY3uRjy0sRLI=; b=iQ1Bv2767QOKtfVaHqs0F67xJwIVaxbqQuhr6VlrHAfftiq7pA2fSbfVLhOO26v5qFB3W1MMqMmJGxmiFoY15HLYhwqbx5o7jvX4HqCdDako6WJX3pyUyq38nNvu8nv/2BfzY2O0L3az/3/uO1ah6HooxQRwM3MOiJwrCjyLQw+WobAtMzQVBY8srnQXlocP78fz4+sRDIWjiDUucb2V/0+hiasykf6GTPVkRyig2vQ0Pw8MUpc6w+fhuN7UOIXwSZ5KmBul765hHR+DVPc9376AZPvnajjIQ8HEsEtqtGz5DOnqMR2F50DXHevPpLv97uEifn5FE1otEc/yolAqHQ== Received: from DS7PR03CA0166.namprd03.prod.outlook.com (2603:10b6:5:3b2::21) by IA1PR12MB7541.namprd12.prod.outlook.com (2603:10b6:208:42f::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5791.27; Fri, 11 Nov 2022 10:15:57 +0000 Received: from CY4PEPF0000B8EE.namprd05.prod.outlook.com (2603:10b6:5:3b2:cafe::80) by DS7PR03CA0166.outlook.office365.com (2603:10b6:5:3b2::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5813.14 via Frontend Transport; Fri, 11 Nov 2022 10:15:57 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) 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 216.228.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by CY4PEPF0000B8EE.mail.protection.outlook.com (10.167.241.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5813.11 via Frontend Transport; Fri, 11 Nov 2022 10:15:57 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.26; Fri, 11 Nov 2022 02:15:50 -0800 Received: from rnnvmail202.nvidia.com (10.129.68.7) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.36; Fri, 11 Nov 2022 02:15:49 -0800 Received: from waynec-Precision-5760.nvidia.com (10.127.8.13) by mail.nvidia.com (10.129.68.7) with Microsoft SMTP Server id 15.2.986.36 via Frontend Transport; Fri, 11 Nov 2022 02:15:45 -0800 From: Wayne Chang To: , , , , , , , , , , , , CC: , , , , , , , Subject: [PATCH v2 02/13] dt-bindings: usb: Add NVIDIA Tegra234 XUSB host controller binding Date: Fri, 11 Nov 2022 18:14:58 +0800 Message-ID: <20221111101509.999589-3-waynec@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221111101509.999589-1-waynec@nvidia.com> References: <20221111101509.999589-1-waynec@nvidia.com> MIME-Version: 1.0 X-NVConfidentiality: public X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000B8EE:EE_|IA1PR12MB7541:EE_ X-MS-Office365-Filtering-Correlation-Id: 0602a273-8069-4a4a-b90e-08dac3cdb993 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: lU4479cudM7SEBGkm09xFzp2rd39TkHFCamJavm8ZWoMNir8o/hvY/cP3AvhYAOexk/S4CF3EJrBDabgf21yxtDw51L4ylBAAFCW/o+DuFdFO5b87063X1pMCpU6B0hVMP5GzZiov8GgXfuvDywmwN0LecpNjokV6G9H0A57p5dnXuhEO6xRxCALaL9jDaLXu8KnQADH4U7YWZ1VNtIQEfCVuYn5fWX5qjYV8pNaHUaZXJvnnXkIRr8ckJqIYVcLzBVvcC7QgXxY68GH9+y/Ma9YozY0bA+3HSpUKAPonOAqxErpOlFCP3pdChve91S6zIU88fx/cCxBm5VF5pFA8Q/oe/JwjZCNnNGNOaeoR5omewEyPt/vEGE2X4R+itzO4e/AkkUTRnwPtNwDxTweGlSPdlsSYgpF/+bfDkWlb1d/K95fc30pdPw2QYyc7U1H/Oc4YLXNydvxOfF4ss3dCxlRdDVurkxLT0lAYg74yWjOhP3MiRhcATkkv9sNdu5lHPw7LszPYYC5mGhPEm5nyb9Z6Wyytm0GSC0K30UJWuSNRSZkV3iKTKLVCfX5oY/cMREcJb9o/kPfu/g8veUObnky3a+uEoQafgk3WMppG4UsIcRjdvYim5UZSaL00eutDl4Gvch8DpU6TvjggYtQ2nd7v14YRHqADOSZG/EpIilCQJwj0mI8/NvlARMgua1SoW5R0QT8eKJB52/xXYJE9S8G673PnNz68Bue3jXspUbZEUWHnn5Eakx2/u4VDNC7YquIcwom5p53f5VlzHWGhY0SWXi5pqTvFQ9vwNghHxWhZrxqz5RBKaSWWImbyyhAZR7byk9URqU0QeicfP7kJyxsGEn7ffGDO0AqEfS/RPIMTBbhtlwUqlxkl8WlHjRajPS2s82Sj7+RYqdpjdbZG3Enq61i+S2PraLNkwkYwd0= X-Forefront-Antispam-Report: CIP:216.228.117.161;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc6edge2.nvidia.com;CAT:NONE;SFS:(13230022)(4636009)(136003)(346002)(39860400002)(396003)(376002)(451199015)(36840700001)(40470700004)(46966006)(426003)(336012)(1076003)(40480700001)(186003)(6666004)(2616005)(356005)(2906002)(4326008)(47076005)(36860700001)(83380400001)(70586007)(110136005)(966005)(70206006)(41300700001)(921005)(26005)(7636003)(5660300002)(8936002)(54906003)(86362001)(82740400003)(8676002)(6636002)(7416002)(40460700003)(7696005)(316002)(478600001)(36756003)(82310400005);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Nov 2022 10:15:57.3962 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0602a273-8069-4a4a-b90e-08dac3cdb993 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.117.161];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CY4PEPF0000B8EE.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR12MB7541 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Add device-tree binding documentation for the XUSB host controller present on Tegra234 SoC. This controller supports the USB 3.1 specification. Signed-off-by: Wayne Chang --- V1 -> V2: new change for adding nvidia,tegra234-xusb.yaml .../bindings/usb/nvidia,tegra234-xusb.yaml | 159 ++++++++++++++++++ 1 file changed, 159 insertions(+) create mode 100644 Documentation/devicetree/bindings/usb/nvidia,tegra234-xusb.yaml diff --git a/Documentation/devicetree/bindings/usb/nvidia,tegra234-xusb.yaml b/Documentation/devicetree/bindings/usb/nvidia,tegra234-xusb.yaml new file mode 100644 index 000000000000..d78ee88ed208 --- /dev/null +++ b/Documentation/devicetree/bindings/usb/nvidia,tegra234-xusb.yaml @@ -0,0 +1,159 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/usb/nvidia,tegra234-xusb.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: NVIDIA Tegra234 xHCI controller + +maintainers: + - Thierry Reding + - Jon Hunter + +description: The Tegra xHCI controller supports both USB2 and USB3 interfaces + exposed by the Tegra XUSB pad controller. + +properties: + compatible: + const: nvidia,tegra234-xusb + + reg: + items: + - description: base and length of the xHCI host registers + - description: base and length of the XUSB FPCI registers + - description: base and length of the XUSB bar2 registers + + reg-names: + items: + - const: hcd + - const: fpci + - const: bar2 + + interrupts: + items: + - description: xHCI host interrupt + - description: mailbox interrupt + + clocks: + items: + - description: XUSB host clock + - description: XUSB Falcon source clock + - description: XUSB SuperSpeed clock + - description: XUSB SuperSpeed source clock + - description: XUSB HighSpeed clock source + - description: XUSB FullSpeed clock source + - description: USB PLL + - description: reference clock + - description: I/O PLL + + clock-names: + items: + - const: xusb_host + - const: xusb_falcon_src + - const: xusb_ss + - const: xusb_ss_src + - const: xusb_hs_src + - const: xusb_fs_src + - const: pll_u_480m + - const: clk_m + - const: pll_e + + interconnects: + items: + - description: read client + - description: write client + + interconnect-names: + items: + - const: dma-mem # read + - const: write + + iommus: + maxItems: 1 + + nvidia,xusb-padctl: + $ref: /schemas/types.yaml#/definitions/phandle + description: phandle to the XUSB pad controller that is used to configure + the USB pads used by the XHCI controller + + phys: + minItems: 1 + maxItems: 8 + + phy-names: + minItems: 1 + maxItems: 8 + items: + enum: + - usb2-0 + - usb2-1 + - usb2-2 + - usb2-3 + - usb3-0 + - usb3-1 + - usb3-2 + - usb3-3 + + power-domains: + items: + - description: XUSBC power domain + - description: XUSBA power domain + + power-domain-names: + items: + - const: xusb_host + - const: xusb_ss + + dma-coherent: + type: boolean + +allOf: + - $ref: usb-xhci.yaml + +unevaluatedProperties: false + +examples: + - | + #include + #include + #include + #include + #include + usb@3610000 { + compatible = "nvidia,tegra234-xusb"; + reg = <0x03610000 0x40000>, + <0x03600000 0x10000>, + <0x03650000 0x10000>; + reg-names = "hcd", "fpci", "bar2"; + + interrupts = , + ; + + clocks = <&bpmp TEGRA234_CLK_XUSB_CORE_HOST>, + <&bpmp TEGRA234_CLK_XUSB_FALCON>, + <&bpmp TEGRA234_CLK_XUSB_CORE_SS>, + <&bpmp TEGRA234_CLK_XUSB_SS>, + <&bpmp TEGRA234_CLK_CLK_M>, + <&bpmp TEGRA234_CLK_XUSB_FS>, + <&bpmp TEGRA234_CLK_UTMIP_PLL>, + <&bpmp TEGRA234_CLK_CLK_M>, + <&bpmp TEGRA234_CLK_PLLE>; + clock-names = "xusb_host", "xusb_falcon_src", + "xusb_ss", "xusb_ss_src", "xusb_hs_src", + "xusb_fs_src", "pll_u_480m", "clk_m", + "pll_e"; + interconnects = <&mc TEGRA234_MEMORY_CLIENT_XUSB_HOSTR &emc>, + <&mc TEGRA234_MEMORY_CLIENT_XUSB_HOSTW &emc>; + interconnect-names = "dma-mem", "write"; + iommus = <&smmu_niso1 TEGRA234_SID_XUSB_HOST>; + + power-domains = <&bpmp TEGRA234_POWER_DOMAIN_XUSBC>, + <&bpmp TEGRA234_POWER_DOMAIN_XUSBA>; + power-domain-names = "xusb_host", "xusb_ss"; + + nvidia,xusb-padctl = <&xusb_padctl>; + + phys = <&pad_lanes_usb2_0>; + phy-names = "usb2-0"; + + }; From patchwork Fri Nov 11 10:14:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wayne Chang X-Patchwork-Id: 13040072 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 ED680C4167B for ; Fri, 11 Nov 2022 10:16:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233612AbiKKKQZ (ORCPT ); Fri, 11 Nov 2022 05:16:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53006 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233577AbiKKKQN (ORCPT ); Fri, 11 Nov 2022 05:16:13 -0500 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2089.outbound.protection.outlook.com [40.107.94.89]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 61A0367125; Fri, 11 Nov 2022 02:16:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TwKtjGMUdalmHpdx0hq2ijVaTOc3yleJ/ff4Ofgw+j+I82Mpge/vbud7fTpcw0cVbRRBqTmrzGgWfIyD0+dLKNtK0hszMCZ3ZuLsr6s6NLbICbXMYGaU0IxeuOnmlw1Z1XnLwxUpxZsJzlnze0jzKSn9RyvP8lHX7bO9tMF6kf9oQYkGhXJjXVp0OR4lk7OiMBoxFXLLRf7oeEiWpStrUjWE1hXnkSJgXrbjTbwQ72KiqisIcGW/MVdN8ixCSHIZZmX6PGTEv4PAq0ZDV51MGOmXUfh8GRhnQPYziuP1+EvSy27B46W+nrDGe70s0CstShE6VXMamW1ToZEnpI7J1w== 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=UE+pAt+PFeQpx0TGAzlqAkYYvI78kM/x+OtLKXiESHo=; b=N+0WCklmY1ygDwwNMsuYisjPQzSjkTvtAm0tAxm1NlWZOWZQ/ip5rX2CpYf25aLFXlMocDAE6mLHM+OD7gtV0pynL+tlH59IffAT8oU9CY6t99Iyvl59fT+T5Pl9BaTZ0W2nE2judsUEwpT6m9stfeJ1xIWTC/qRLuoKdLLUQQLx/d80AEPXpU5L7sLKtvzgssFuHRMCUhTSCG15uulgS+4yHdyVzoOz0zlKii3wgJefU4Pp61oCziIFgs4+0UrlYjIXo0UCp5vWftXguagqZMKM4CuqXB1Uw9LqKejEEAqx1jx9BHjbCEvFISPfkodAlYDf1mvRQPy1GA3sUXcz2Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=linuxfoundation.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=UE+pAt+PFeQpx0TGAzlqAkYYvI78kM/x+OtLKXiESHo=; b=qzrIrJQ4bPlZwe+wmNZAlgch0jZzloSl2vRcfnnn3pD1vjUHGYzGzCKI/n1UL1JAoSUJ7I4oOpu0jWjiR4WDEB0wWYCJWEArUqKOkWb5rpDkKlXQwE54nuyIh6lyCoa5VHucpaagtxuH7e+agIuPT/iB4MK3XdHznlPzSeaTy4r7UAWashecMu2Sj45z1QTqn/jdX5Dt1+9nUpsZ8QlFJdv+jurSGj7wLfP/Ol6wt1AjRi9eGZ+kFf7oyYJefXygO2mJBzDy9GgrWmBXrWR1R8Da6nGP73OoBjV52XT0pQfHPQzzMWvsLCh4olRIlaJlc5xo7v3xQg9vgiCXgwJcBw== Received: from MN2PR14CA0005.namprd14.prod.outlook.com (2603:10b6:208:23e::10) by MW4PR12MB7141.namprd12.prod.outlook.com (2603:10b6:303:213::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5813.13; Fri, 11 Nov 2022 10:16:10 +0000 Received: from BL02EPF0000EE3D.namprd05.prod.outlook.com (2603:10b6:208:23e:cafe::74) by MN2PR14CA0005.outlook.office365.com (2603:10b6:208:23e::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5813.14 via Frontend Transport; Fri, 11 Nov 2022 10:16:10 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) 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 216.228.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by BL02EPF0000EE3D.mail.protection.outlook.com (10.167.241.134) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5813.11 via Frontend Transport; Fri, 11 Nov 2022 10:16:10 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.26; Fri, 11 Nov 2022 02:15:54 -0800 Received: from rnnvmail202.nvidia.com (10.129.68.7) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.36; Fri, 11 Nov 2022 02:15:54 -0800 Received: from waynec-Precision-5760.nvidia.com (10.127.8.13) by mail.nvidia.com (10.129.68.7) with Microsoft SMTP Server id 15.2.986.36 via Frontend Transport; Fri, 11 Nov 2022 02:15:50 -0800 From: Wayne Chang To: , , , , , , , , , , , , CC: , , , , , , , Subject: [PATCH v2 03/13] dt-bindings: usb: Add binding for Cypress cypd4226 I2C driver Date: Fri, 11 Nov 2022 18:14:59 +0800 Message-ID: <20221111101509.999589-4-waynec@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221111101509.999589-1-waynec@nvidia.com> References: <20221111101509.999589-1-waynec@nvidia.com> MIME-Version: 1.0 X-NVConfidentiality: public X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL02EPF0000EE3D:EE_|MW4PR12MB7141:EE_ X-MS-Office365-Filtering-Correlation-Id: 2b539402-91c1-439a-18e1-08dac3cdc11e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: MmnHmnxFFYH5ogxUksV+3w0QvK9PEgdvAhYorvhxCA6skZwHZk+VGeuT1fU6Rbu/B8BiRO5drk44b20QBFOdnH6rQbrPPkCUalpYlzBpJ43pmEMT17Au4Fs5tph9/cBPnAq6bB0jb9q6csuXKI343QCAXgvY6qRwTWgrjPXLXokhQFVTve1q5PZ9eQlq7mnD3WFU9fN1iJkaK3mYB7jHGFCrFWvowmNWfojtCH5ohE8V9It2fPgx+ut0i7JpcrcQA53OeI4kkLno4L6shV7chhueVm8lbrjY22UuxAjqjjNPV0LnCRMQKwt9eCYXxc4JyuypJvSKlMVTMdXsoAHPAiGoZuzi/BLX5A1DeQfEEhpPQ+1JZYHYMUO5rBOTesaV2k2FhFurpvQV1uE6ya/5ocZtFca7kGBZuIkt/0hH+wTRXeQbqDZpeEdQ0WWV5v6fomdnV4FmY8h/FunXiv+lCywMePXLXSinx2P+78JVjfGz31LXXvkCN93gYqj355AXUeaiSRFhGUUWmKU/0B04HFk9V2xWaz43ykyoRcYQzUi2SBJGCtVEr6CN4iWmX9lZx/Olsz18+L4i+WliWRcUkOsCVINQR6mPXQ/tH0JorPknl7VhmyYOzzTprDRD00WNGf+y6hO3D0+uqfzXEKLLczGUGYJYOQzl+PPUfHVY7Z/nYgRNweHuTY2Btofow2rxBiDMxVYEH3tKyrpQC9kHjo0m3HW04G4FMACh8K/dpWlsTtmNt70jcbx+9MX0hVNGtxlrMUui+GoBkDBmH+ZJct/gMrVsHywbTE4vqSc6O1WgMUcKKgwVIzoD2n+fZRmsgNvSUUcKh7147PyW/IB2dn/w7wVQ0kWZYEIuESnrv78TxTFeuBsic6MBkdLdf4XCSBN4sj1iPyqxSzy8HntZ0bOIZAklA2j6MCl3Z61Rjn4= X-Forefront-Antispam-Report: CIP:216.228.117.160;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc6edge1.nvidia.com;CAT:NONE;SFS:(13230022)(4636009)(396003)(376002)(346002)(136003)(39860400002)(451199015)(46966006)(40470700004)(36840700001)(36860700001)(7696005)(86362001)(47076005)(426003)(40460700003)(2906002)(36756003)(26005)(40480700001)(82740400003)(82310400005)(41300700001)(8676002)(1076003)(966005)(186003)(2616005)(7636003)(478600001)(70586007)(5660300002)(356005)(4326008)(7416002)(54906003)(6636002)(110136005)(8936002)(70206006)(921005)(336012)(316002);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Nov 2022 10:16:10.0159 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2b539402-91c1-439a-18e1-08dac3cdc11e X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.117.160];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BL02EPF0000EE3D.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR12MB7141 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org add device-tree binding documentation for Cypress cypd4226 type-C controller's I2C interface. It is a standard I2C slave with GPIO input as IRQ interface. Signed-off-by: Wayne Chang --- V1 -> V2:Based on the review comments. Fix some addressed issues on description, interrupts, cypress,firmware-build, connector, and additionalProperties properties. And also remove the status in the example. .../bindings/usb/cypress,cypd4226.yaml | 86 +++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 Documentation/devicetree/bindings/usb/cypress,cypd4226.yaml diff --git a/Documentation/devicetree/bindings/usb/cypress,cypd4226.yaml b/Documentation/devicetree/bindings/usb/cypress,cypd4226.yaml new file mode 100644 index 000000000000..70db97e0ad31 --- /dev/null +++ b/Documentation/devicetree/bindings/usb/cypress,cypd4226.yaml @@ -0,0 +1,86 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/usb/cypress,cypd4226.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Cypress cypd4226 UCSI I2C Type-C Controller + +maintainers: + - Wayne Chang + +description: + The Cypress cypd4226 UCSI I2C type-C controller is a I2C interface type-C + controller. + +properties: + compatible: + const: cypress,cypd4226 + + '#address-cells': + const: 1 + + '#size-cells': + const: 0 + + reg: + const: 0x08 + + interrupts: + items: + - description: cypd4226 I2C interrupt + + cypress,firmware-build: + enum: + - nvidia,gpu + - nvidia,jetson-agx-xavier + description: | + the name of the CCGx firmware built for product series. + should be set one of following: + - "nvidia,gpu" for the NVIDIA RTX product series + - "nvidia,jetson-agx-xavier" for the NVIDIA Jetson product series + +patternProperties: + '^connector@[0-1]+$': + $ref: /schemas/connector/usb-connector.yaml# + properties: + reg: + maxItems: 1 + +unevaluatedProperties: false + +required: + - compatible + - reg + - interrupts + +examples: + - | + #include + #include + i2c { + #address-cells = <1>; + #size-cells = <0>; + #interrupt-cells = <2>; + + ucsi-ccg@8 { + compatible = "cypress,cypd4226"; + interrupt-parent = <&gpio_aon>; + interrupts = ; + reg = <0x08>; + cypress,firmware-build = "nvidia,jetson-agx-xavier"; + #address-cells = <1>; + #size-cells = <0>; + ccg_typec_con0: connector@0 { + compatible = "usb-c-connector"; + reg = <0>; + label = "USB-C"; + data-role = "dual"; + port { + ucsi_ccg_p0: endpoint { + remote-endpoint = <&usb_role_switch0>; + }; + }; + }; + }; + }; From patchwork Fri Nov 11 10:15:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wayne Chang X-Patchwork-Id: 13040071 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 96B9AC43219 for ; Fri, 11 Nov 2022 10:16:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233689AbiKKKQV (ORCPT ); Fri, 11 Nov 2022 05:16:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52740 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233468AbiKKKQL (ORCPT ); Fri, 11 Nov 2022 05:16:11 -0500 Received: from NAM04-MW2-obe.outbound.protection.outlook.com (mail-mw2nam04on2045.outbound.protection.outlook.com [40.107.101.45]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 36AB8748CE; Fri, 11 Nov 2022 02:16:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZeRIhn3knE6aweMvJe6rFWK4y9fkY0+FjNQg3Y2kxoi+IYqQDX0SIfR8438wFe5B8c4TgRlOxkqjh5YWNm/m2rgpSwt3B3rshrmASRaIukxTfDG/p/dQJ2a0dTAc3fwEGMvZH2HpqdRx7tLDHGPPplKdDu8z+ruJPxQOFs0hswuphmiEFi1Av6thgBKNZFBHnn/d73lFdd3jc5sqEEfWjX6lTTVa4AkrSEn7yfziBM1KmKNP8R7ZRk6x0Dcc3TsmaZ4SUso35ZbCXat9Xfj6q1QaUk5F1Y/douTLGUwYlx2VovsKUhuTgVNkLrurZjfXWA3RuThfLkdR/xxWKcxv9A== 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=bccZqGIdVeolneIXbEyHaMM9yMo+LF4Ai8UTW1oRA9k=; b=Lgue1MOgOiaID9VvkFDYcOlToOvR7beROQ5Pry0U/YIbox0S9D2CQ7ZXXmGfJn1UZR/t4vVyudd1x/l4hnbIS9I7vKTcjKFUmR8aCi06QtRNMDZ4a9SsOzDwcDnyFsthgCqC7zYovkzRDw6n1Ppem3yuO4CDOGkCqaa+0TEJ0GFwTb8HGpmOMaHHJAV9mwjbLB5XCIV+61LZFTuIKtIoca1h/U+l2FYDqNnb7SVLRH7+jgUX16/XHhvaBfTYm+guRkaKMjh+DRtXK0gawEoBQm7v/MEwDBTFQ8TudzMmj9kHqzBckfipu4sk6q1/peGEzayv7OZakFwYjVm21wCfcg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=linuxfoundation.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=bccZqGIdVeolneIXbEyHaMM9yMo+LF4Ai8UTW1oRA9k=; b=LL5vSKP2Wgc9D2RDs0QlBW923knhqW0+4cz05rhI6XUFRuhy4+DJx63SkAObrogVMglz4lio8z/C6IV6tLY1Tv3kzLdNPeAb2SEgeC7JLfEq4VawOw/jnNM2BwcRF8xgU0T/R2tDhtPUVYBgvLyHeCLim9HC7bnZmPJd5vNBGFz0v3HNWBy+8CL13JOsqqYG3p0I5eVkT+taUh1/L9bZNwRBzZZecN+/8IjH7XUVz+J7um95TVVR8jX/Xa2N0Z4itX1uvXCUygkft+iLu7XW1LVTFD8HBiL46FqY6vmnUip1MPbQRMh6IpdEQwprt9tUJbLUh22EGsVjkiAOv27RzA== Received: from CY8PR22CA0001.namprd22.prod.outlook.com (2603:10b6:930:45::6) by SJ1PR12MB6050.namprd12.prod.outlook.com (2603:10b6:a03:48b::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5791.27; Fri, 11 Nov 2022 10:16:08 +0000 Received: from CY4PEPF0000B8EA.namprd05.prod.outlook.com (2603:10b6:930:45:cafe::9c) by CY8PR22CA0001.outlook.office365.com (2603:10b6:930:45::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5813.13 via Frontend Transport; Fri, 11 Nov 2022 10:16:08 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) 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 216.228.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by CY4PEPF0000B8EA.mail.protection.outlook.com (10.167.241.6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5813.11 via Frontend Transport; Fri, 11 Nov 2022 10:16:08 +0000 Received: from rnnvmail202.nvidia.com (10.129.68.7) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.26; Fri, 11 Nov 2022 02:15:58 -0800 Received: from rnnvmail202.nvidia.com (10.129.68.7) by rnnvmail202.nvidia.com (10.129.68.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.36; Fri, 11 Nov 2022 02:15:58 -0800 Received: from waynec-Precision-5760.nvidia.com (10.127.8.13) by mail.nvidia.com (10.129.68.7) with Microsoft SMTP Server id 15.2.986.36 via Frontend Transport; Fri, 11 Nov 2022 02:15:54 -0800 From: Wayne Chang To: , , , , , , , , , , , , CC: , , , , , , , Subject: [PATCH v2 04/13] arm64: tegra: Enable XUSB host and device on Jetson AGX Orin Date: Fri, 11 Nov 2022 18:15:00 +0800 Message-ID: <20221111101509.999589-5-waynec@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221111101509.999589-1-waynec@nvidia.com> References: <20221111101509.999589-1-waynec@nvidia.com> MIME-Version: 1.0 X-NVConfidentiality: public X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000B8EA:EE_|SJ1PR12MB6050:EE_ X-MS-Office365-Filtering-Correlation-Id: 065eee53-733f-4f40-22cd-08dac3cdc000 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: BpdpVJL3czoT+FF3D1fB5TmzBHQ8Rnmo5f4Mo8numEEckrdpJWs/SQH0OMz3bZK81vBuEmVZmxEWY2tKmY/m1IeLBja+R8Dg4ZFkSDK87E13turj8Refro2cdqmtJ8zmN1wOqJDfiNanZ+iG/YR0QCQOF7IneL2wvtzuxHrKkEfgwTvqEDxerOsL8yiJJlnLeOnsZQf2sgugke/6SMQNp59LS+bKjMkzGN9ZOwX+w+buleXLk87JAFVNsd5s/Z+MRxZxHLqWyNyxAawHJitqMezj9gml2P1dHzZOOfc+sD1etqbfZ8vatcETfC5Cm2b9vcWf221aKH7PYZMtCPu4DgUGdOxh/QRnl17YqE7iw5JWgYwoPa0boXhYT2Rzu+DMqGpi/aJ4dFKHRsZoXYC6L1mwad8v6J/6R2UveQrDDeNDACKSmfGy9svN9oLArQRJNjkjrNVXJ9rQTU+DeP4QOTSC5bveMQRgTVesLhAEJVtnw112YqDVSH2IoxWdCTQegDv//rJZxfKu0QXHYldheSoNgjuuLGHliUulF7FRHu61gV+9TSem8EV+hMt+YayfHRVyThwde/DHWCPhgbnn+PrWRup182vBOGJeYJAIz/p/q0xQj/+/VaVyYyhqdxdaouWUTBdNvHt1xRjCKFWX+FK1Tp0dcsVPS/XT7SQNkaSVBJo3tQ6nniX3/Eur54OF/A17qKzkq2PpBEUyplFiyc/U6OXV6Pq3uHr3mY+Rp1fodqJp7LnK3aGk/XcqyUeGLW99X+cxDCMmbHiYfFYgA8IZuhQd/2N+CfSG4SYcXuY= X-Forefront-Antispam-Report: CIP:216.228.117.161;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc6edge2.nvidia.com;CAT:NONE;SFS:(13230022)(4636009)(376002)(396003)(346002)(136003)(39860400002)(451199015)(36840700001)(46966006)(40470700004)(2616005)(6666004)(478600001)(26005)(40480700001)(7696005)(426003)(1076003)(8676002)(4326008)(47076005)(5660300002)(6636002)(316002)(70586007)(7416002)(41300700001)(54906003)(110136005)(8936002)(36756003)(186003)(40460700003)(83380400001)(36860700001)(921005)(86362001)(2906002)(70206006)(356005)(7636003)(82740400003)(336012)(82310400005);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Nov 2022 10:16:08.1886 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 065eee53-733f-4f40-22cd-08dac3cdc000 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.117.161];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CY4PEPF0000B8EA.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ1PR12MB6050 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org This commit enables XUSB host, device, and pad controller on Jetson AGX Orin. Signed-off-by: Wayne Chang --- V1 -> V2:removed the redundant cells and status in ucsi-ccg. Using dash instead of underscore in the ucsi-ccg node name. Using representive name in cypress,firmware-build property. .../boot/dts/nvidia/tegra234-p3701-0000.dtsi | 48 +++++ .../nvidia/tegra234-p3737-0000+p3701-0000.dts | 175 ++++++++++++++++++ arch/arm64/boot/dts/nvidia/tegra234.dtsi | 170 +++++++++++++++++ 3 files changed, 393 insertions(+) diff --git a/arch/arm64/boot/dts/nvidia/tegra234-p3701-0000.dtsi b/arch/arm64/boot/dts/nvidia/tegra234-p3701-0000.dtsi index 9e4d72cfa69f..8acef87a5398 100644 --- a/arch/arm64/boot/dts/nvidia/tegra234-p3701-0000.dtsi +++ b/arch/arm64/boot/dts/nvidia/tegra234-p3701-0000.dtsi @@ -61,6 +61,29 @@ mmc@3460000 { non-removable; }; + padctl@3520000 { + vclamp-usb-supply = <&vdd_ao_1v8>; + avdd-usb-supply = <&vdd_ao_3v3>; + + ports { + usb2-0 { + vbus-supply = <&vdd_5v0_sys>; + }; + + usb2-1 { + vbus-supply = <&vdd_5v0_sys>; + }; + + usb2-2 { + vbus-supply = <&vdd_5v0_sys>; + }; + + usb2-3 { + vbus-supply = <&vdd_5v0_sys>; + }; + }; + }; + rtc@c2a0000 { status = "okay"; }; @@ -69,4 +92,29 @@ pmc@c360000 { nvidia,invert-interrupt; }; }; + + vdd_5v0_sys: regulator@0 { + compatible = "regulator-fixed"; + regulator-name = "VIN_SYS_5V0"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + regulator-always-on; + regulator-boot-on; + }; + + vdd_ao_1v8: regulator@1 { + compatible = "regulator-fixed"; + regulator-name = "vdd-AO-1v8"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-always-on; + }; + + vdd_ao_3v3: regulator@2 { + compatible = "regulator-fixed"; + regulator-name = "vdd-AO-3v3"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + }; }; diff --git a/arch/arm64/boot/dts/nvidia/tegra234-p3737-0000+p3701-0000.dts b/arch/arm64/boot/dts/nvidia/tegra234-p3737-0000+p3701-0000.dts index 57ab75328814..58baedbd0f93 100644 --- a/arch/arm64/boot/dts/nvidia/tegra234-p3737-0000+p3701-0000.dts +++ b/arch/arm64/boot/dts/nvidia/tegra234-p3737-0000+p3701-0000.dts @@ -2011,6 +2011,181 @@ hda@3510000 { nvidia,model = "NVIDIA Jetson AGX Orin HDA"; status = "okay"; }; + + padctl@3520000 { + status = "okay"; + + pads { + usb2 { + lanes { + usb2-0 { + status = "okay"; + }; + + usb2-1 { + status = "okay"; + }; + + usb2-2 { + status = "okay"; + }; + + usb2-3 { + status = "okay"; + }; + }; + }; + + usb3 { + lanes { + usb3-0 { + status = "okay"; + }; + + usb3-1 { + status = "okay"; + }; + + usb3-2 { + status = "okay"; + }; + }; + }; + }; + + ports { + usb2-0 { + mode = "otg"; + usb-role-switch; + status = "okay"; + port { + hs_typec_p1: endpoint { + remote-endpoint = <&hs_ucsi_ccg_p1>; + }; + }; + }; + + usb2-1 { + mode = "host"; + status = "okay"; + port { + hs_typec_p0: endpoint { + remote-endpoint = <&hs_ucsi_ccg_p0>; + }; + }; + }; + + usb2-2 { + mode = "host"; + status = "okay"; + }; + + usb2-3 { + mode = "host"; + status = "okay"; + }; + + usb3-0 { + nvidia,usb2-companion = <1>; + status = "okay"; + port { + ss_typec_p0: endpoint { + remote-endpoint = <&ss_ucsi_ccg_p0>; + }; + }; + }; + + usb3-1 { + nvidia,usb2-companion = <0>; + status = "okay"; + port { + ss_typec_p1: endpoint { + remote-endpoint = <&ss_ucsi_ccg_p1>; + }; + }; + }; + + usb3-2 { + nvidia,usb2-companion = <3>; + status = "okay"; + }; + }; + }; + + usb@3550000 { + status = "okay"; + + phys = <&{/bus@0/padctl@3520000/pads/usb2/lanes/usb2-0}>, + <&{/bus@0/padctl@3520000/pads/usb3/lanes/usb3-1}>; + phy-names = "usb2-0", "usb3-1"; + }; + + usb@3610000 { + status = "okay"; + + phys = <&{/bus@0/padctl@3520000/pads/usb2/lanes/usb2-0}>, + <&{/bus@0/padctl@3520000/pads/usb2/lanes/usb2-1}>, + <&{/bus@0/padctl@3520000/pads/usb2/lanes/usb2-2}>, + <&{/bus@0/padctl@3520000/pads/usb2/lanes/usb2-3}>, + <&{/bus@0/padctl@3520000/pads/usb3/lanes/usb3-0}>, + <&{/bus@0/padctl@3520000/pads/usb3/lanes/usb3-1}>, + <&{/bus@0/padctl@3520000/pads/usb3/lanes/usb3-2}>; + phy-names = "usb2-0", "usb2-1", "usb2-2", "usb2-3", + "usb3-0", "usb3-1", "usb3-2"; + }; + + i2c@c240000 { + status = "okay"; + ucsi-ccg@8 { + compatible = "cypress,cypd4226"; + cypress,firmware-build = "nvidia,jetson-agx-xavier"; + interrupt-parent = <&gpio>; + interrupts = ; + reg = <0x08>; + #address-cells = <1>; + #size-cells = <0>; + ccg_typec_con0: connector@0 { + compatible = "usb-c-connector"; + reg = <0>; + label = "USB-C"; + data-role = "host"; + #address-cells = <1>; + #size-cells = <0>; + port@0 { + reg = <0>; + hs_ucsi_ccg_p0: endpoint { + remote-endpoint = <&hs_typec_p0>; + }; + }; + port@1 { + reg = <1>; + ss_ucsi_ccg_p0: endpoint { + remote-endpoint = <&ss_typec_p0>; + }; + }; + }; + ccg_typec_con1: connector@1 { + compatible = "usb-c-connector"; + reg = <1>; + label = "USB-C"; + data-role = "dual"; + #address-cells = <1>; + #size-cells = <0>; + port@0 { + reg = <0>; + hs_ucsi_ccg_p1: endpoint { + remote-endpoint = <&hs_typec_p1>; + }; + }; + port@1 { + reg = <1>; + ss_ucsi_ccg_p1: endpoint { + remote-endpoint = <&ss_typec_p1>; + }; + }; + }; + }; + }; }; chosen { diff --git a/arch/arm64/boot/dts/nvidia/tegra234.dtsi b/arch/arm64/boot/dts/nvidia/tegra234.dtsi index 0170bfa8a467..27635d459e4c 100644 --- a/arch/arm64/boot/dts/nvidia/tegra234.dtsi +++ b/arch/arm64/boot/dts/nvidia/tegra234.dtsi @@ -942,6 +942,174 @@ hda@3510000 { status = "disabled"; }; + xusb_padctl: padctl@3520000 { + compatible = "nvidia,tegra234-xusb-padctl"; + reg = <0x03520000 0x20000>, + <0x03540000 0x10000>; + reg-names = "padctl", "ao"; + interrupts = ; + + resets = <&bpmp TEGRA234_RESET_XUSB_PADCTL>; + reset-names = "padctl"; + + status = "disabled"; + + pads { + usb2 { + clocks = <&bpmp TEGRA234_CLK_USB2_TRK>; + clock-names = "trk"; + + lanes { + usb2-0 { + nvidia,function = "xusb"; + status = "disabled"; + #phy-cells = <0>; + }; + + usb2-1 { + nvidia,function = "xusb"; + status = "disabled"; + #phy-cells = <0>; + }; + + usb2-2 { + nvidia,function = "xusb"; + status = "disabled"; + #phy-cells = <0>; + }; + + usb2-3 { + nvidia,function = "xusb"; + status = "disabled"; + #phy-cells = <0>; + }; + }; + }; + + usb3 { + lanes { + usb3-0 { + nvidia,function = "xusb"; + status = "disabled"; + #phy-cells = <0>; + }; + + usb3-1 { + nvidia,function = "xusb"; + status = "disabled"; + #phy-cells = <0>; + }; + + usb3-2 { + nvidia,function = "xusb"; + status = "disabled"; + #phy-cells = <0>; + }; + + usb3-3 { + nvidia,function = "xusb"; + status = "disabled"; + #phy-cells = <0>; + }; + }; + }; + }; + + ports { + usb2-0 { + status = "disabled"; + }; + + usb2-1 { + status = "disabled"; + }; + + usb2-2 { + status = "disabled"; + }; + + usb2-3 { + status = "disabled"; + }; + + usb3-0 { + status = "disabled"; + }; + + usb3-1 { + status = "disabled"; + }; + + usb3-2 { + status = "disabled"; + }; + + usb3-3 { + status = "disabled"; + }; + }; + }; + + usb@3550000 { + compatible = "nvidia,tegra234-xudc"; + reg = <0x03550000 0x8000>, + <0x03558000 0x8000>; + reg-names = "base", "fpci"; + interrupts = ; + clocks = <&bpmp TEGRA234_CLK_XUSB_CORE_DEV>, + <&bpmp TEGRA234_CLK_XUSB_CORE_SS>, + <&bpmp TEGRA234_CLK_XUSB_SS>, + <&bpmp TEGRA234_CLK_XUSB_FS>; + clock-names = "dev", "ss", "ss_src", "fs_src"; + interconnects = <&mc TEGRA234_MEMORY_CLIENT_XUSB_DEVR &emc>, + <&mc TEGRA234_MEMORY_CLIENT_XUSB_DEVW &emc>; + interconnect-names = "dma-mem", "write"; + iommus = <&smmu_niso1 TEGRA234_SID_XUSB_DEV>; + power-domains = <&bpmp TEGRA234_POWER_DOMAIN_XUSBB>, + <&bpmp TEGRA234_POWER_DOMAIN_XUSBA>; + power-domain-names = "dev", "ss"; + nvidia,xusb-padctl = <&xusb_padctl>; + dma-coherent; + status = "disabled"; + }; + + usb@3610000 { + compatible = "nvidia,tegra234-xusb"; + reg = <0x03610000 0x40000>, + <0x03600000 0x10000>, + <0x03650000 0x10000>; + reg-names = "hcd", "fpci", "bar2"; + + interrupts = , + ; + + clocks = <&bpmp TEGRA234_CLK_XUSB_CORE_HOST>, + <&bpmp TEGRA234_CLK_XUSB_FALCON>, + <&bpmp TEGRA234_CLK_XUSB_CORE_SS>, + <&bpmp TEGRA234_CLK_XUSB_SS>, + <&bpmp TEGRA234_CLK_CLK_M>, + <&bpmp TEGRA234_CLK_XUSB_FS>, + <&bpmp TEGRA234_CLK_UTMIP_PLL>, + <&bpmp TEGRA234_CLK_CLK_M>, + <&bpmp TEGRA234_CLK_PLLE>; + clock-names = "xusb_host", "xusb_falcon_src", + "xusb_ss", "xusb_ss_src", "xusb_hs_src", + "xusb_fs_src", "pll_u_480m", "clk_m", + "pll_e"; + interconnects = <&mc TEGRA234_MEMORY_CLIENT_XUSB_HOSTR &emc>, + <&mc TEGRA234_MEMORY_CLIENT_XUSB_HOSTW &emc>; + interconnect-names = "dma-mem", "write"; + iommus = <&smmu_niso1 TEGRA234_SID_XUSB_HOST>; + + power-domains = <&bpmp TEGRA234_POWER_DOMAIN_XUSBC>, + <&bpmp TEGRA234_POWER_DOMAIN_XUSBA>; + power-domain-names = "xusb_host", "xusb_ss"; + + nvidia,xusb-padctl = <&xusb_padctl>; + dma-coherent; + status = "disabled"; + }; + fuse@3810000 { compatible = "nvidia,tegra234-efuse"; reg = <0x03810000 0x10000>; @@ -1470,6 +1638,8 @@ gen2_i2c: i2c@c240000 { compatible = "nvidia,tegra194-i2c"; reg = <0xc240000 0x100>; interrupts = ; + #address-cells = <1>; + #size-cells = <0>; status = "disabled"; clock-frequency = <100000>; clocks = <&bpmp TEGRA234_CLK_I2C2 From patchwork Fri Nov 11 10:15:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wayne Chang X-Patchwork-Id: 13040087 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 476DEC43219 for ; Fri, 11 Nov 2022 10:16:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233709AbiKKKQu (ORCPT ); Fri, 11 Nov 2022 05:16:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53632 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233626AbiKKKQl (ORCPT ); Fri, 11 Nov 2022 05:16:41 -0500 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2087.outbound.protection.outlook.com [40.107.92.87]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 66F5BEE35; Fri, 11 Nov 2022 02:16:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gJMoExpW3R6kOPZkjEtxtI+or8hOe9J1snGMDhGLvpuems0D4OJSjMpDWmZ4W+42Z31MSHwk4EssS0eF3lWx7jecYgILoeKxYf8adALbZhKNCKa4eRRJftGU7sRTVj0h75R1UIa5dNbSyGk8MQGb4jKfdf6NPhobrbk5rdpm2A4u0cuG13eTlMbJAb/+4iy0JEJhROO6jcFF92DHR6NRUYvNZImTb+3oPysoc7oy5Sy3jTbhbFExXclsgY5XSXoRkbkDN2SodgA6pCXm93GNw6ZbzBr6XTJS/VjqnyYREEjtMV9WrI2vh1WQOtrODRx8EjS59CWb7hyY/P5i7Cjmnw== 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=T1WFLBMcmJiMRny9OFkUHtiXOo6DomxM14rfPSsEmTQ=; b=Mo1FaN74mTqGXcUGvJqhxRah0J7XNTDA5Nl0lOXzrmVKhu6Iups9GMf+g6gAkrstQbCEPbaPkdZIYZqNImvxvxlEVmwKKluTl0EBCeMCV1zYUg11erddRbalBEA6sKwuKNsbJ8CMSEn08gy3ada+e4/FxT3EceLpPW5/HU+sj+QvpdSumj9UqIWAWZNN2zD8z1/cKHkMV9rAwxSdbENeDDYbAY3+2Vid0K36w/LUg5462U73HOybCq9FiViw3iO4fTfOg6maKHXJYU6hRIvnyRMcQeV21protrS6MM8Fkf88BkzpFjou/N3U3AgMHjx9Z7Ccf8I0sZl0kBmCj/T4zw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=linuxfoundation.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=T1WFLBMcmJiMRny9OFkUHtiXOo6DomxM14rfPSsEmTQ=; b=uZqkiZUArWp7ZcV86gBVbI2AdWUpiyn9k6D7M95Ew5oLA7CAUMl6y5j/pJlPvJxe8TwAQW9h8HCMYvHkJTdOgEjDqrl1qJvWOwSWgAPcQ/CxcmVBUaql51L++39kpHdZ+Q2WKXH5rb2+hubYbXwnqqp4E8uvKbleuCHOxb1mwSy6yglP4ASQO4AOw0a6/TZawreKK60oWjgsYWAb3olBWzU+4nMSEqEFQgl0ouNRuwSlZeVz+i1zbjt9AQ/kNyL0aTrEDhWSzeH47XyizPAGKR0Qc+vy0yf0+TCEu+FXltk/OXtag9qMwSraCyNCU4iAAqBGgNlsgUD4nuf09PPN7Q== Received: from MN2PR14CA0018.namprd14.prod.outlook.com (2603:10b6:208:23e::23) by DS7PR12MB6288.namprd12.prod.outlook.com (2603:10b6:8:93::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5791.25; Fri, 11 Nov 2022 10:16:23 +0000 Received: from BL02EPF0000EE3D.namprd05.prod.outlook.com (2603:10b6:208:23e:cafe::cf) by MN2PR14CA0018.outlook.office365.com (2603:10b6:208:23e::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5813.13 via Frontend Transport; Fri, 11 Nov 2022 10:16:23 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) 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 216.228.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by BL02EPF0000EE3D.mail.protection.outlook.com (10.167.241.134) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5813.11 via Frontend Transport; Fri, 11 Nov 2022 10:16:22 +0000 Received: from rnnvmail204.nvidia.com (10.129.68.6) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.26; Fri, 11 Nov 2022 02:16:03 -0800 Received: from rnnvmail202.nvidia.com (10.129.68.7) by rnnvmail204.nvidia.com (10.129.68.6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.36; Fri, 11 Nov 2022 02:16:02 -0800 Received: from waynec-Precision-5760.nvidia.com (10.127.8.13) by mail.nvidia.com (10.129.68.7) with Microsoft SMTP Server id 15.2.986.36 via Frontend Transport; Fri, 11 Nov 2022 02:15:58 -0800 From: Wayne Chang To: , , , , , , , , , , , , CC: , , , , , , , Subject: [PATCH v2 05/13] usb: typec: ucsi_ccg: Add OF support Date: Fri, 11 Nov 2022 18:15:01 +0800 Message-ID: <20221111101509.999589-6-waynec@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221111101509.999589-1-waynec@nvidia.com> References: <20221111101509.999589-1-waynec@nvidia.com> MIME-Version: 1.0 X-NVConfidentiality: public X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL02EPF0000EE3D:EE_|DS7PR12MB6288:EE_ X-MS-Office365-Filtering-Correlation-Id: d7ce9eaa-4e77-420c-c73d-08dac3cdc8be X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: zWYWlXWM6JIOL4qmA4r+OO7bzN2vIh+76ie88yS7KdDQg94SJBW00xVf5uFbd2nZNGmZt1gzVbdVm52N2uCqzfTihtb1JvxSajKshQfEcU5qqkD9sFs/NpeXSQtqUPer3oQFuec8MxqutqttPjIe4G4g6T8v22eaVZlL7YdhnDHCAb/PmCeAclHaIXdMHCiEDCeO9W095fYHJOidk3TJWSK+CKiszUOrN4d7CJGA9CT7DtzRhhSsVzbn1SGrI3qKheLzZ8mDDlj3qEYwoPlULaLBP3FGcNzadDwwa8FAg7dtC6U6gqOlJgc5BErC0Za0QSR7VxB18BHF+FcAnU3d1O1pBbDSqta/sKgJvW2mdOmYKQ1uV0IWipVFzWd8O36lzL+pKCRL1I0rIIG4mTko1BrjgsDgeysRX421rtQcI17rd7H8F0hOLunRT5KBnEwek4H1I9Xlc/Pi/brjS/lbJVYkJ0Lo1NFwG35jNx++qyVcZ6e1CTUnfkP27mjQgNsPteFzGIHNn2YEzdyTrxl50OIhOqJS303smDPHkiYT8FIEODsA80HESArFUz+wQuQhilKa8K05/4l4CJR8kHBA+lkkAjPYUQ/z9cfAyDDzovGq+Jjq5UtxnTTZQdFLsQ+GOKzzqDsbeei8KWGHgTGLzB+1XHj2GBc4qexRctNz+yf3VkG6CqPort0RFT79TekUpBuOivhOvvr2knaKnS3EqoZwvftOlTwsxHKX0qxKSgPIfVGarcfPYvg+yNmrWYUweeO91ng+DNSE+G6KUUSOtR+fN2tZ3Lzdz5wGSirVlmY= X-Forefront-Antispam-Report: CIP:216.228.117.160;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc6edge1.nvidia.com;CAT:NONE;SFS:(13230022)(4636009)(136003)(346002)(376002)(39860400002)(396003)(451199015)(36840700001)(46966006)(40470700004)(40480700001)(36756003)(478600001)(26005)(2616005)(921005)(8936002)(82310400005)(82740400003)(36860700001)(86362001)(356005)(7416002)(4326008)(70586007)(186003)(426003)(47076005)(7696005)(7636003)(8676002)(336012)(41300700001)(1076003)(40460700003)(6666004)(70206006)(6636002)(2906002)(110136005)(54906003)(5660300002)(83380400001)(316002);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Nov 2022 10:16:22.8129 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d7ce9eaa-4e77-420c-c73d-08dac3cdc8be X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.117.160];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BL02EPF0000EE3D.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR12MB6288 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org The change enables the device tree infrastructure support. Signed-off-by: Wayne Chang --- V1 -> V2: nothing has changed drivers/usb/typec/ucsi/ucsi_ccg.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/usb/typec/ucsi/ucsi_ccg.c b/drivers/usb/typec/ucsi/ucsi_ccg.c index 835f1c4372ba..139707a2f3d6 100644 --- a/drivers/usb/typec/ucsi/ucsi_ccg.c +++ b/drivers/usb/typec/ucsi/ucsi_ccg.c @@ -643,7 +643,7 @@ static int ccg_request_irq(struct ucsi_ccg *uc) { unsigned long flags = IRQF_ONESHOT; - if (!has_acpi_companion(uc->dev)) + if (!dev_fwnode(uc->dev)) flags |= IRQF_TRIGGER_HIGH; return request_threaded_irq(uc->irq, NULL, ccg_irq_handler, flags, dev_name(uc->dev), uc); @@ -1427,6 +1427,12 @@ static void ucsi_ccg_remove(struct i2c_client *client) free_irq(uc->irq, uc); } +static const struct of_device_id ucsi_ccg_of_match_table[] = { + { .compatible = "cypress,cypd4226", }, + { /* sentinel */ } +}; +MODULE_DEVICE_TABLE(of, ucsi_ccg_of_match_table); + static const struct i2c_device_id ucsi_ccg_device_id[] = { {"ccgx-ucsi", 0}, {} @@ -1481,6 +1487,7 @@ static struct i2c_driver ucsi_ccg_driver = { .pm = &ucsi_ccg_pm, .dev_groups = ucsi_ccg_groups, .acpi_match_table = amd_i2c_ucsi_match, + .of_match_table = ucsi_ccg_of_match_table, }, .probe = ucsi_ccg_probe, .remove = ucsi_ccg_remove, From patchwork Fri Nov 11 10:15:02 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wayne Chang X-Patchwork-Id: 13040090 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 CBD44C4332F for ; Fri, 11 Nov 2022 10:17:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233878AbiKKKRH (ORCPT ); Fri, 11 Nov 2022 05:17:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53056 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233651AbiKKKQn (ORCPT ); Fri, 11 Nov 2022 05:16:43 -0500 Received: from NAM04-MW2-obe.outbound.protection.outlook.com (mail-mw2nam04on2049.outbound.protection.outlook.com [40.107.101.49]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 835C98546F; Fri, 11 Nov 2022 02:16:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=W1o5fHCNsE3iS4ODctrN+7ulFtRfWbR+HZyRSk6VmXuiuxNkPuSZFIBm544FTS8L7RIxCqrJcEuACiaCVj4kzwC1KhSa1gTcrA3fIcT0hrzdys22fclgnfSh6NvLb+LaIpaVPl2irNiUs+KbCrr0tXPARO/jRrgzG7FszloYiDNXrE/xjuFacvfBPpKAIXG5xjMfJ1oKWsAyQ4epdlbs9W3M+Tz8N5CIqfqyYfou6+tVo/49abE11IJOGEj6kWNEEVZEMQBQpJetxWV44Gslv2PUyBhPgf8FCryx4loB0no/fXvShicjfP9/4F3z88ndSgyNX2z6/yWxE1NjqmR9KQ== 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=f65T2XoEhiUfwf8HgFImqiGxkWSY66pNhbk64UYq/og=; b=jZhZ/9cL6rKlKn1vIKQAYgJamqFErPrvq60gHK2zXx5nQBHyMoC5NIb03i8abm6yx0G579qPof4gvPKV6BPzUwPVyv5duqvoPbQ4D4bU2CznIpMjbJsFh+T3iun8DddI4Jjj0xCKEkvdp0eYtxjU2yihuqvDgnZmpGFqhQ+ayQuU4lAHysPNGhZMzmV3Vnwhv41snXd3Qkn0e2N0iAZfKsL5gbgswVP2iKaghyjA8odZE1V/nVrYlRTztzuD7G5OFt0oeoAlzy2GT3+8EmZyHO+QqtXRNZOQ7vwExL1Y+dnZQbKVvDEzxcgKaXsGTQjGtgyZ/ly8zJXSjVpkXLJoWA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=linuxfoundation.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=f65T2XoEhiUfwf8HgFImqiGxkWSY66pNhbk64UYq/og=; b=Z7JJhMqVFtWBSieWqorjCrSOfIYks1JlOWlWDu1yuO5+tGapn7QxIdweLMEFTMAzKzJTgWsEPwA98SY1/1DujG0KgEn035dzUs5I7ta5pC20JYlRQjzdo0rGkiLKjEHNsd7oU5pXnD1HLQENMZ4UlimcgmniGbbLTcpqXlq9JFhrBuazOeZck9xoR9HQJpV7vRvDd3XSC7DEfbn0yrM1VKsGc8U89itTNWmeonxNSmFrPdh3S/eRlGSzZZOceXHB88cIgDeHImhBiSsMUnEfIlexZWOyDNIkkWbpU0R+mjx6iS9vquY6yk2QdCdkfgyzaUWbZ9KtcBH2RwGDOvS40w== Received: from BN8PR03CA0009.namprd03.prod.outlook.com (2603:10b6:408:94::22) by SJ0PR12MB6902.namprd12.prod.outlook.com (2603:10b6:a03:484::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5791.25; Fri, 11 Nov 2022 10:16:27 +0000 Received: from BL02EPF0000EE3C.namprd05.prod.outlook.com (2603:10b6:408:94:cafe::15) by BN8PR03CA0009.outlook.office365.com (2603:10b6:408:94::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5791.27 via Frontend Transport; Fri, 11 Nov 2022 10:16:26 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) 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 216.228.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by BL02EPF0000EE3C.mail.protection.outlook.com (10.167.241.132) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5813.11 via Frontend Transport; Fri, 11 Nov 2022 10:16:26 +0000 Received: from rnnvmail204.nvidia.com (10.129.68.6) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.26; Fri, 11 Nov 2022 02:16:07 -0800 Received: from rnnvmail202.nvidia.com (10.129.68.7) by rnnvmail204.nvidia.com (10.129.68.6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.36; Fri, 11 Nov 2022 02:16:07 -0800 Received: from waynec-Precision-5760.nvidia.com (10.127.8.13) by mail.nvidia.com (10.129.68.7) with Microsoft SMTP Server id 15.2.986.36 via Frontend Transport; Fri, 11 Nov 2022 02:16:03 -0800 From: Wayne Chang To: , , , , , , , , , , , , CC: , , , , , , , Subject: [PATCH v2 06/13] usb: typec: ucsi_ccg: Add cypress,firmware-build as a well-known regex Date: Fri, 11 Nov 2022 18:15:02 +0800 Message-ID: <20221111101509.999589-7-waynec@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221111101509.999589-1-waynec@nvidia.com> References: <20221111101509.999589-1-waynec@nvidia.com> MIME-Version: 1.0 X-NVConfidentiality: public X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL02EPF0000EE3C:EE_|SJ0PR12MB6902:EE_ X-MS-Office365-Filtering-Correlation-Id: b2d4e769-e181-45e0-1789-08dac3cdcb1b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: YcmATPPuOP97y6bp+9I6FMmlt0CyewazvOdRogrJwvXS3bmVyKW7apoFB7c/1x3GMy+vWVu8LgQctTgOl1WWuhFRqaAgoUSQPOWbmD6Zf3qcFAniXsnfHxymp8Y73LkyJTXns1G1DOjlRYvdPu23ihZUCIvRB/xqysokt60E0RyrhHBi4WMtgZ9XEmVzQZN1Wu9Pjae0X7oGzgKT4XZqHdK4lAjZDHl9t+Ai6zBSrPAjcYqQvGkRWaT0mxBXUiZyvGnKpOpxsgizH0Noe8R9p8Wc88ZOdW7LpyyMC4PEIEA3Tg7H2noqd7HVI6vBPYeDfrwcQQOYFl44oz7FNZUStMhRXkH6xVFhFhEdKBriI9m1Y+BgtuX+GAWn46FiI8l4OtgnW2zs1PRve4zqFf3+a180MyA4vIdUpTMzmpQICxX0OvzF19U/GvdOFQzFwjAW9biikqt48J7RwRX6EyvNioyT2LmkAQc7osWz23WikPJS/Eh5rbHSR2mbyP4SIwYDiJNiBOR/QjEp61aAHoqp2jxYevGhPhXZTqTlti5v2ja6ouM4ablUPPGBoLe94kmLvZcH8LJK1aHGwE7J5gJElLLv289WfnSYNzabD88aD0Bo87wlpxsjyvOSxs5AoWY2Px+ReJ+lv4oYFHONpet8vCuj7E0EejYRwmdyZMd93/oKAzFCjaQGFK038Jh+1gDPJsIrrkKRjLxyG6LFXQL79bw3YCDdBXloInFpQYDiwAWi4YMRGNMggUNIwHG4fA/adnJW2MDi86z3O0kmbrolsNS+MnIKBKKIfA9WAvhoDcQ= X-Forefront-Antispam-Report: CIP:216.228.117.160;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc6edge1.nvidia.com;CAT:NONE;SFS:(13230022)(4636009)(39860400002)(136003)(376002)(346002)(396003)(451199015)(36840700001)(40470700004)(46966006)(2906002)(478600001)(7636003)(356005)(36756003)(7696005)(336012)(54906003)(70206006)(316002)(6636002)(110136005)(426003)(47076005)(86362001)(186003)(4326008)(40460700003)(8676002)(70586007)(1076003)(82310400005)(921005)(40480700001)(41300700001)(2616005)(8936002)(5660300002)(36860700001)(26005)(82740400003)(7416002);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Nov 2022 10:16:26.7733 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b2d4e769-e181-45e0-1789-08dac3cdcb1b X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.117.160];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BL02EPF0000EE3C.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR12MB6902 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org ccgx is refer to the cypress cypd4226 typec controller. add cypress,firmware-build as a well-known regex. 16-bit value is not sufficient for descriptiva names. Using string instead of u16 to make it more descriptive. Signed-off-by: Wayne Chang --- V1 -> V2:New change added for adding cypress,firmware-build drivers/usb/typec/ucsi/ucsi_ccg.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/usb/typec/ucsi/ucsi_ccg.c b/drivers/usb/typec/ucsi/ucsi_ccg.c index 139707a2f3d6..e412a457bbfc 100644 --- a/drivers/usb/typec/ucsi/ucsi_ccg.c +++ b/drivers/usb/typec/ucsi/ucsi_ccg.c @@ -1343,6 +1343,7 @@ static int ucsi_ccg_probe(struct i2c_client *client, { struct device *dev = &client->dev; struct ucsi_ccg *uc; + const char *of_fw_build; int status; uc = devm_kzalloc(dev, sizeof(*uc), GFP_KERNEL); @@ -1363,6 +1364,17 @@ static int ucsi_ccg_probe(struct i2c_client *client, if (status) dev_err(uc->dev, "failed to get FW build information\n"); + status = device_property_read_string(dev, "cypress,firmware-build", + &of_fw_build); + if (!status) { + if (!strcmp(of_fw_build, "nvidia,jetson-agx-xavier")) + uc->fw_build = CCG_FW_BUILD_NVIDIA_TEGRA; + else if (!strcmp(of_fw_build, "nvidia,gpu")) + uc->fw_build = CCG_FW_BUILD_NVIDIA; + } else { + dev_err(uc->dev, "failed to get FW build information\n"); + } + /* reset ccg device and initialize ucsi */ status = ucsi_ccg_init(uc); if (status < 0) { From patchwork Fri Nov 11 10:15:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wayne Chang X-Patchwork-Id: 13040088 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 8F366C4167B for ; Fri, 11 Nov 2022 10:17:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233778AbiKKKQy (ORCPT ); Fri, 11 Nov 2022 05:16:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52996 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233737AbiKKKQm (ORCPT ); Fri, 11 Nov 2022 05:16:42 -0500 Received: from NAM04-BN8-obe.outbound.protection.outlook.com (mail-bn8nam04on2044.outbound.protection.outlook.com [40.107.100.44]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2347683B94; Fri, 11 Nov 2022 02:16:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=niQ8xp4nylo0tYR3YusqOV5aXQX6z9ryWqmDFIpWWmNlepZI8szoLpslDzBOL9z1sgvTPgRrA1g+0xpXmAwImEWzyLzGlK41eLeZjv2WpzKC7x9krnZC+gYn2HAcHtlq+3v6A7ZAS+yWKj090dTdOwTkM01W7AYaznuLhZYjrZ0/d3T/hNkqKWXwbhDdhewXGPKIYOwi7An8Y7ECpcc0Scboe1kHMn/V+AVSirxxMr0bSMfCFAWzM2kTr84eXgBXGjsu5bB7K/0z530Bb6gq2Jwatk3ugA4NyFoIw8PVuii8t6rfJuPd5TxBSki/bvKMa2DJwnZY3H2k1tmpkO5M/g== 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=RoOtlFxOTztopXclAbiCCC5OWKvXUyqImo9xMJ1Tn0I=; b=RbnjIU+KOJWEshbIpyL9124aQxBx4e0Y2nrBtj6EnTHZ2hNLXEeXwAfVF/Uegb++8XgANXyqIQZK3tPRQVlwHa6dKFR0mDDkT+FSGhd7BniZ+312tIBjE/EfPneX5EBiwrdKWCn5OOjhlhkacRvwUIlOzUYg7GOAXkguOC1Fqo1Wa4FAPgMEZ2CmvgUqx4rUWLwL0UIjHg2PFKSF0FsLOfrHmwefeEcvEyTDIcTgfSj9SFRkLBJ89eLkiEqmkSyS+lWj/9ikz5ePk162xrjt9f5fEmUMDywUjugvRG7R3X4vnosaGeqfH34nbZ9hMBqbgy7m1+CdCZ1v7TtZLk7OFA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=linuxfoundation.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=RoOtlFxOTztopXclAbiCCC5OWKvXUyqImo9xMJ1Tn0I=; b=QMaXrSmZLc++lOZaBR2EPz1Au29Qyldb828JDbFpd4kQO8p4NKlBeYihx8WSls8lNza8o05+bE6/PugylsCkpFzKez5Xw/j1aYFU8BoCpxyKA3gFS6HDpIy6xFQSdRj72z6O8CLwQbWfm61t7YdP4YUR007cx3OcvoPl6X2AJJOKfEBB1BWHVcOgBRe56ydweUw0VdJTg3dnnxixV7G7AjlCm4zRvYv+jTx5F7CxQMxE8jfUEFLakcc7u5pv0bc8N5g82pcgHa5Yk83V0u1HxnWZs6FnAuq3B+30t9PXa6dgyu7oJHKA2siJnobT4+k4K5jhMSPzSz5ZXFsEBh3PUA== Received: from DS7PR03CA0166.namprd03.prod.outlook.com (2603:10b6:5:3b2::21) by IA0PR12MB7508.namprd12.prod.outlook.com (2603:10b6:208:440::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5813.13; Fri, 11 Nov 2022 10:16:23 +0000 Received: from CY4PEPF0000B8EE.namprd05.prod.outlook.com (2603:10b6:5:3b2:cafe::a2) by DS7PR03CA0166.outlook.office365.com (2603:10b6:5:3b2::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5813.14 via Frontend Transport; Fri, 11 Nov 2022 10:16:23 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) 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 216.228.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by CY4PEPF0000B8EE.mail.protection.outlook.com (10.167.241.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5813.11 via Frontend Transport; Fri, 11 Nov 2022 10:16:23 +0000 Received: from rnnvmail204.nvidia.com (10.129.68.6) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.26; Fri, 11 Nov 2022 02:16:11 -0800 Received: from rnnvmail202.nvidia.com (10.129.68.7) by rnnvmail204.nvidia.com (10.129.68.6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.36; Fri, 11 Nov 2022 02:16:11 -0800 Received: from waynec-Precision-5760.nvidia.com (10.127.8.13) by mail.nvidia.com (10.129.68.7) with Microsoft SMTP Server id 15.2.986.36 via Frontend Transport; Fri, 11 Nov 2022 02:16:07 -0800 From: Wayne Chang To: , , , , , , , , , , , , CC: , , , , , , , Subject: [PATCH v2 07/13] i2c: nvidia-gpu: Add cypress,firmware-build as a well-known regex Date: Fri, 11 Nov 2022 18:15:03 +0800 Message-ID: <20221111101509.999589-8-waynec@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221111101509.999589-1-waynec@nvidia.com> References: <20221111101509.999589-1-waynec@nvidia.com> MIME-Version: 1.0 X-NVConfidentiality: public X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000B8EE:EE_|IA0PR12MB7508:EE_ X-MS-Office365-Filtering-Correlation-Id: 15d6c6a5-dc93-46aa-cf65-08dac3cdc92a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: S4BgHZW5cNk4WgdOCBalwlaLnZTyevvwTzKG5HbQttWq3aKPqeJUmnj0gYr6JoFtl0lL1RzqdSNZuOqlJHGgj41yAGwbM9untTM40N8suHS5rOY5VLWhPSsbOTNCBRw47jLbMNVaarxsluDgcwE4w3fG3w7hJLwmcLeiLyIT4J4mbNttv61RcgdJsfcOzssHM9y/2ayNirTYHCvwB8/v1k1YjbG/eQt10kk/WR8zWB3SUBriQ0veicLpm3ou9ldFKRxNax2oIt6jjoiLOa/urUUHcEwcVKuaPe7bxAfa8vy/2sRSennsA5/rWya0kBNd3hOJR5j0Q7Rea4yEHuU3hmipJ9MYFMn6fZ6rgdXgt/r4ttHxlH8Awudt4vnm/Ea586+sYhuOxiYV96K1EyhcZqIwgcsljhmr4KIO91FLmMTZa8mxMIFbtzCnKI8ZMNErPMB26ftDqeJy22/DX7AviTDT9vlJhuZHaWyBf8hqu+XVSBmfGeEWE/d/teu9ArXg/j8yshFXnQvTpVM7yr6+nDdIk0IcEFgsqPuDR9rfm30J9CFz0T5E7KM1hlJ+pge/Lzh1JtPHRkclAwdyzqkkclaizoRc6sKU/efwZ2QQTfajfL26yah7Gb1lxHj2eU32Jd/3gcA0/v/PBBHhlA9S1RUEvHUSpHUQc2ENSNTL+EPLFDcXG0+xM2EJMtIzlE3jJ4+2hAvO8TgKGL5dhtDCdlwk7hGCwoyPL/qMfgneiuE1ElX5pP5efsgOjQIAroDKP/u0PUjRkawdHY/AXTxd25Xtrg7Y2sZ6b5cY8XLBtYw= X-Forefront-Antispam-Report: CIP:216.228.117.161;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc6edge2.nvidia.com;CAT:NONE;SFS:(13230022)(4636009)(346002)(39860400002)(136003)(376002)(396003)(451199015)(36840700001)(40470700004)(46966006)(54906003)(6636002)(110136005)(7696005)(356005)(316002)(7636003)(36860700001)(4744005)(426003)(40480700001)(2906002)(47076005)(5660300002)(186003)(4326008)(2616005)(8936002)(70206006)(336012)(1076003)(40460700003)(7416002)(70586007)(8676002)(26005)(921005)(36756003)(41300700001)(478600001)(82310400005)(82740400003)(86362001)(6666004);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Nov 2022 10:16:23.5678 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 15d6c6a5-dc93-46aa-cf65-08dac3cdc92a X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.117.161];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CY4PEPF0000B8EE.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA0PR12MB7508 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org ccgx is refer to the cypress cypd4226 typec controller. add cypress,firmware-build as a well-known regex. 16-bit value is not sufficient for descriptiva names. Using string instead of u16 to make it more descriptive. Signed-off-by: Wayne Chang --- V1 -> V2:New change for adding cypress,firmware-build drivers/i2c/busses/i2c-nvidia-gpu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/i2c/busses/i2c-nvidia-gpu.c b/drivers/i2c/busses/i2c-nvidia-gpu.c index 12e330cd7635..9b2e13bd44db 100644 --- a/drivers/i2c/busses/i2c-nvidia-gpu.c +++ b/drivers/i2c/busses/i2c-nvidia-gpu.c @@ -261,6 +261,7 @@ MODULE_DEVICE_TABLE(pci, gpu_i2c_ids); static const struct property_entry ccgx_props[] = { /* Use FW built for NVIDIA (nv) only */ PROPERTY_ENTRY_U16("ccgx,firmware-build", ('n' << 8) | 'v'), + PROPERTY_ENTRY_STRING("cypress,firmware-build", "nvidia,gpu"), { } }; From patchwork Fri Nov 11 10:15:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wayne Chang X-Patchwork-Id: 13040089 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 745E8C4321E for ; Fri, 11 Nov 2022 10:17:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233868AbiKKKRF (ORCPT ); Fri, 11 Nov 2022 05:17:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53004 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233653AbiKKKQn (ORCPT ); Fri, 11 Nov 2022 05:16:43 -0500 Received: from NAM04-DM6-obe.outbound.protection.outlook.com (mail-dm6nam04on2083.outbound.protection.outlook.com [40.107.102.83]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 65E758545F; Fri, 11 Nov 2022 02:16:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=F6128LnrpZ0jcHUhK8lwyvZnwQ6JoEt8xve86GRWnZCnkCEKI++SlFNCVOOscgyrqqodcW1NorKO8/BD2A4hUKPOo5knH0DPcY3OhIJX0ztnhsMTOHeQ6jiuJdKJxsFSKlDZOGLJTdrQ788tqDudjAC52B8KIhQvbyfMFNnWvzXFOQzbASnXxyCS62kXOAb3SsP+2Lpr4HTrG8ERNPSjFWdoj6TwPGXEo04iFEflkrTAC8xcU2IoQbjjXZtP+1GSBG+RhX7XsdKTn6jbZ7E+D+wTksK9B0a/VViWypdq6NE08BHirmYlG82wvyVr0QrrD3FgYuRDhdyfz6kTVM/VLg== 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=dyuhJf4hA5+wa/Xch0Rgl1g/1ZFnBQlyo1ICvJDb4yw=; b=DCeh8TX3NDlR9MsbrW7ATzOyTqIo+llLQfP/hKHpP3zv+KMMEVL2hqoRUCR2r9w9lONZKAeycq08FY+SKp7CCfwzJFZJcP7hA0qCbzZ2KM0ZuPnNwga76IH4UZgk8uRkBUJvXjePYQEN1audnW5SUFIbA7Nrnqu+fR8UcM29Zb2U+yl4VMHGimXwi+WSwoTQViRVU5aSmA9tQ5HnX39Ny3yvevrfIHMp0rFn5yW6DF7/BoMEA672u9oEW4Aio4mh/ge0PHtdNSFTvtGogr0hUlxfPliUKuvetoBmrPM+RIWEXibQxcPHbBg0GpB7M215S/6F1nZnaZWugOX9mG1Sjw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=linuxfoundation.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=dyuhJf4hA5+wa/Xch0Rgl1g/1ZFnBQlyo1ICvJDb4yw=; b=OFccsrSvxSKJkh4M+VwAVWVSIMz2gPAoJl3iSVs7T+FxZgQCLGcR6xUbSiN2U58vJjY2qvtvzAPcAqSARfq684A/qGSFUpo3v4zktPlbg/8mto+saezAYmQseuJZUL9hR7vPt80GOQcQyxuWdvXSfw4WbtNjSyflFqLds79gNUURws4FnAslozPnZAme4CjHfiE5OodxupcGaCy16iXcYSG04c4Zobzj/SQRVp38Jo7U7FLUK7ARY46T9O4hu7FPljeCPOFKjeVWu+gR3CypM5RoPcRfpKz/N5bPIFjIcF9SBCRajisGSephoQ5ZQvLkE0hR9164yB/rQ4McmVkZlw== Received: from CY5PR19CA0089.namprd19.prod.outlook.com (2603:10b6:930:83::14) by SA1PR12MB7442.namprd12.prod.outlook.com (2603:10b6:806:2b5::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5813.13; Fri, 11 Nov 2022 10:16:29 +0000 Received: from CY4PEPF0000B8ED.namprd05.prod.outlook.com (2603:10b6:930:83:cafe::98) by CY5PR19CA0089.outlook.office365.com (2603:10b6:930:83::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5813.13 via Frontend Transport; Fri, 11 Nov 2022 10:16:29 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) 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 216.228.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by CY4PEPF0000B8ED.mail.protection.outlook.com (10.167.241.9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5813.11 via Frontend Transport; Fri, 11 Nov 2022 10:16:29 +0000 Received: from rnnvmail204.nvidia.com (10.129.68.6) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.26; Fri, 11 Nov 2022 02:16:15 -0800 Received: from rnnvmail202.nvidia.com (10.129.68.7) by rnnvmail204.nvidia.com (10.129.68.6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.36; Fri, 11 Nov 2022 02:16:15 -0800 Received: from waynec-Precision-5760.nvidia.com (10.127.8.13) by mail.nvidia.com (10.129.68.7) with Microsoft SMTP Server id 15.2.986.36 via Frontend Transport; Fri, 11 Nov 2022 02:16:11 -0800 From: Wayne Chang To: , , , , , , , , , , , , CC: , , , , , , , Subject: [PATCH v2 08/13] usb: typec: ucsi_ccg: Remove ccgx,firmware-build property Date: Fri, 11 Nov 2022 18:15:04 +0800 Message-ID: <20221111101509.999589-9-waynec@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221111101509.999589-1-waynec@nvidia.com> References: <20221111101509.999589-1-waynec@nvidia.com> MIME-Version: 1.0 X-NVConfidentiality: public X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000B8ED:EE_|SA1PR12MB7442:EE_ X-MS-Office365-Filtering-Correlation-Id: d3cda19a-faf6-4d65-5df3-08dac3cdcca2 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 4XSH5eV/lFp3vLzyq9DmOq6PygFB8tUcXr15f63cOyowQ/gSBnJzFPOK52W5YF/HlIED0OrNSDPA5N8wvgGKxUDQtpK2420tkCfydVFsmy2pM5vtopTUcXujMi9C+jZuO+cYG4U9be9GcE8EoQJ2zRESMujNQc/rmkTO+rgrmC1H1M8ToWOQK+dD2m/txP4G85Qj/9qKwBPnqhq8EER6bCILcQZCcTo8PByaH3i2yJfd2/al0gWE/KWeL93Zl5TKgFvZUx7EnX/IaHgaN99O3wx39KRVy8qooipmDMHqntv96qS7rWWakWbjicFVZ2iqqgfswLSciOGuUL1HaU4sy6dgPwBybXhhHRZLB7srAwG9GWsXHX5I1J8UrdD1SAh33lXLrfjJt0VYu/NFpwBQHZqbNAqL3wafAVzD7aDB3dDfW1X1eMm4EPcGuWMtSU5rZ/0+DowSCBkDB+wscZiJW6tVK0mFZQXrNzhHqXLW/mpoBaexBHclt7v88vtgD9N/gDQGKtcuXB63XDSY7XN63JfHakTPI6RzjCx9UvdlYoO30ukTnlhGy2Y1iL2Tjh6r4hkGP5pcmqQw+l5wvI9Pfy2iTsq+awwL/wz9Z4GvkvzWGtzkMzMz134Gatik10dTLIbxR/4l0RhaUpLFDgnKBRvNmMiuU9nXz0o7jKbvsM2j5cAMa7/nZ0gBZvei+cC6qlxopXniaFs8iTev4MLFSINF4KU/NDR3m39N4PGp5svymzPNF21kbgLmrK86azeElH8XO6VndIcHJ0+eAsjSN3APw9Jzrrtqvx84k2Wn/bA= X-Forefront-Antispam-Report: CIP:216.228.117.161;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc6edge2.nvidia.com;CAT:NONE;SFS:(13230022)(4636009)(376002)(39860400002)(136003)(396003)(346002)(451199015)(40470700004)(36840700001)(46966006)(83380400001)(8936002)(5660300002)(70206006)(70586007)(41300700001)(8676002)(7416002)(4744005)(82740400003)(4326008)(7696005)(6666004)(26005)(40480700001)(356005)(7636003)(1076003)(2616005)(921005)(47076005)(86362001)(36860700001)(2906002)(40460700003)(478600001)(36756003)(336012)(316002)(186003)(6636002)(54906003)(82310400005)(426003)(110136005);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Nov 2022 10:16:29.3688 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d3cda19a-faf6-4d65-5df3-08dac3cdcca2 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.117.161];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CY4PEPF0000B8ED.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR12MB7442 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Remove the property ccgx,firmware-build as we have added well-known regex cypress,firmware-build. Signed-off-by: Wayne Chang --- V1 -> V2:nothing has changed drivers/usb/typec/ucsi/ucsi_ccg.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/drivers/usb/typec/ucsi/ucsi_ccg.c b/drivers/usb/typec/ucsi/ucsi_ccg.c index e412a457bbfc..eab3012e1b01 100644 --- a/drivers/usb/typec/ucsi/ucsi_ccg.c +++ b/drivers/usb/typec/ucsi/ucsi_ccg.c @@ -1359,11 +1359,6 @@ static int ucsi_ccg_probe(struct i2c_client *client, INIT_WORK(&uc->pm_work, ccg_pm_workaround_work); /* Only fail FW flashing when FW build information is not provided */ - status = device_property_read_u16(dev, "ccgx,firmware-build", - &uc->fw_build); - if (status) - dev_err(uc->dev, "failed to get FW build information\n"); - status = device_property_read_string(dev, "cypress,firmware-build", &of_fw_build); if (!status) { From patchwork Fri Nov 11 10:15:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wayne Chang X-Patchwork-Id: 13040092 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 6E90AC38A02 for ; Fri, 11 Nov 2022 10:17:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233887AbiKKKRL (ORCPT ); Fri, 11 Nov 2022 05:17:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53348 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233577AbiKKKQq (ORCPT ); Fri, 11 Nov 2022 05:16:46 -0500 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2042.outbound.protection.outlook.com [40.107.220.42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6E174862F7; Fri, 11 Nov 2022 02:16:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aod0ZopEarpsx0LXvAML7hu9nb/vIooFNEBwXP9hRKdVyzDuqZFbHQTWmonWMvRk+cIzfhKtu5sSoXTQNWYJwBKMiFvCQ3vxgFMPCTi6UGTw1v9njg842hwf/2n9v849tapvXYYsCc65F4l5ybqNBpgkayON7SW89e3jfznqFY59zzgSF5aKt7beezSx/kWLQ9SMqqVkSbthvpPvSj31vkg/2LBu6UcDMWWaC2S7HfsOqf+DfclPQLNf/3btqheLFqF3by2qebSHQ+zJbTat31+9YgJohP0lgyOkNufso4IfhscH32q9ywhaoUXHWEVL4D03mDqnoYddPd5RIfSppA== 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=5Dq4DR6bfOpMwbvWEHPF6B2z8xaLv7LRMxg0PuSwa04=; b=Q6vDWPcEPO2mVg6GsQpfEI9kDIDrq0OKWiw4DeYI5Ius/nREwom0fYvR5ibpsl1jsPleUx9A0UmpPKPnjyj/yc0qt6AVx9FOei/2/p8SxH8lGGev1W3C/uWJT1+HUvDqxxHkvCAyD0W0FT3cNZD4J0oVCU2T/uc/ZfEd+nf8dqAuO6pAktp/HMTD0dDsvzX0xdkq3btdYjsW7Bu7pIy2hnj3uhLwCP15+G37T/nRgk9qhJ7/E4k8VND3BX5p2bvpIph091FB6jAx1IMcpeXeQkpYuGjLhiE8Ax4MWKUQ/b6CywL4/J+oOVR1o0azxbxuQ07L1QQPTZP6o6iCiOiqlQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=linuxfoundation.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=5Dq4DR6bfOpMwbvWEHPF6B2z8xaLv7LRMxg0PuSwa04=; b=gG+PtxwrRdcNHLHLXrK6o0tUMEqkgbTJABVLwViLTTl2H2PoyHv2VdmFNmw51GmE/LITGQc9Dr1WuSeTbPuN9oobyNcSvb+aU/vu8/h+qO7s6suHq5BYx8Is53XUg3K2yevrrij2xf45NnSlshug39TnqxANhM1GiZSpM0y8Ee2h97bfZMMEhySuvqQ1k+i9KTHqslFg4tH2e/lYmaJpkrPW2b4soalFfR0TDtXx7iba8eHMoRMl3oCzqQmLFd5zokhoJMTxhr0cSCuKUVUzOSdv+EVK1ic5QZ6J8BUbL4658F+fgDdKCEHhrIfZHTz/yhrwxaH84mP516J3Pj6t1A== Received: from MN2PR14CA0004.namprd14.prod.outlook.com (2603:10b6:208:23e::9) by LV2PR12MB5797.namprd12.prod.outlook.com (2603:10b6:408:17b::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5813.13; Fri, 11 Nov 2022 10:16:35 +0000 Received: from BL02EPF0000EE3D.namprd05.prod.outlook.com (2603:10b6:208:23e:cafe::11) by MN2PR14CA0004.outlook.office365.com (2603:10b6:208:23e::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5813.14 via Frontend Transport; Fri, 11 Nov 2022 10:16:35 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) 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 216.228.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by BL02EPF0000EE3D.mail.protection.outlook.com (10.167.241.134) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5813.11 via Frontend Transport; Fri, 11 Nov 2022 10:16:35 +0000 Received: from rnnvmail204.nvidia.com (10.129.68.6) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.26; Fri, 11 Nov 2022 02:16:20 -0800 Received: from rnnvmail202.nvidia.com (10.129.68.7) by rnnvmail204.nvidia.com (10.129.68.6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.36; Fri, 11 Nov 2022 02:16:19 -0800 Received: from waynec-Precision-5760.nvidia.com (10.127.8.13) by mail.nvidia.com (10.129.68.7) with Microsoft SMTP Server id 15.2.986.36 via Frontend Transport; Fri, 11 Nov 2022 02:16:16 -0800 From: Wayne Chang To: , , , , , , , , , , , , CC: , , , , , , , Subject: [PATCH v2 09/13] i2c: nvidia-gpu: Remove ccgx,firmware-build property Date: Fri, 11 Nov 2022 18:15:05 +0800 Message-ID: <20221111101509.999589-10-waynec@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221111101509.999589-1-waynec@nvidia.com> References: <20221111101509.999589-1-waynec@nvidia.com> MIME-Version: 1.0 X-NVConfidentiality: public X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL02EPF0000EE3D:EE_|LV2PR12MB5797:EE_ X-MS-Office365-Filtering-Correlation-Id: 1e4e0a94-9151-4f2e-4e34-08dac3cdd058 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: EgZ0llBjlhOVUwc4swIorlHy75X+6Q5y2vE7g4tKqcdJOY2lhjnx4ZYXdaiqbqkJLMaKvJAxQiC86bWYzA8uj5rVd/kaHxpwq+MphQXbADThmCXziSrNNiJJTZK8pLNhQ5xR0z2u0AqE08VQSFEeyKkbQok52hBBB02VsF97/bRYlw64w1KXObP/+P95dN9Kva6jcbrpNr2gY/ifLwxnnT88ANux30q+BnMoVFsjyeQYQtgWvAvq7x8nM1G4wIenugXYyIbNcKMSa5WXpz5du97f0THv1L66Nri/DVH5hNAVliOL14ecyZFBgh67i2vpaB9XAPEUx5XA1IAgDa4+w42ZxrsEe9HPaehaPZEZ87DOeMbm6Oql8oRlpblDvBWXYPeuQDraa8zoDEpQGUjiXwXGRK34BTNz2xWjNoYY8vd9TXVGD9VMQdTX4pXFddQWTDEzAEE85mupb4mKjX/NzaGWE00wkDkTnZ3DY3sbak7vlp+jpSHujj8iSHtqdzxoYUo6HgDdSfcAEmWmyq4Vl1OMUMr/pkIYgofaUbbUMqRs17AqHjpFZXNS3d4tsPeSMVYq8tKmD5tbSBrUboeHkgkBYwTMgw3PDHTjQVxQ6y424eaj8MNrnI9PIJiZQvQzMru0A27GCmh1TFaYoMWJJ2+ciEmjjju3DA9inv4rzZh+JctUVJjwFwtgN2jlRAWlnPxhvEV2WGpnYItN+xUbyjs5K7k/gVdbdDMHjnQxNgczv+LJReivzEKpcNjLgO3egsOc5FKsvbcKryT/h/opcgLDDvegcu2KuazeUkuX7HQ= X-Forefront-Antispam-Report: CIP:216.228.117.160;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc6edge1.nvidia.com;CAT:NONE;SFS:(13230022)(4636009)(136003)(39860400002)(376002)(396003)(346002)(451199015)(40470700004)(46966006)(36840700001)(82310400005)(316002)(110136005)(54906003)(6636002)(2616005)(1076003)(41300700001)(47076005)(36860700001)(7416002)(186003)(26005)(5660300002)(40480700001)(40460700003)(426003)(86362001)(2906002)(4744005)(4326008)(7696005)(336012)(36756003)(70206006)(70586007)(8676002)(8936002)(921005)(478600001)(356005)(7636003)(82740400003)(83380400001)(6666004);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Nov 2022 10:16:35.5631 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1e4e0a94-9151-4f2e-4e34-08dac3cdd058 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.117.160];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BL02EPF0000EE3D.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV2PR12MB5797 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Remove the property ccgx,firmware-build as we have added well-known regex cypress,firmware-build. Signed-off-by: Wayne Chang --- V1 -> V2:New added for bisectablility drivers/i2c/busses/i2c-nvidia-gpu.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/i2c/busses/i2c-nvidia-gpu.c b/drivers/i2c/busses/i2c-nvidia-gpu.c index 9b2e13bd44db..092d4d52098c 100644 --- a/drivers/i2c/busses/i2c-nvidia-gpu.c +++ b/drivers/i2c/busses/i2c-nvidia-gpu.c @@ -259,8 +259,7 @@ static const struct pci_device_id gpu_i2c_ids[] = { MODULE_DEVICE_TABLE(pci, gpu_i2c_ids); static const struct property_entry ccgx_props[] = { - /* Use FW built for NVIDIA (nv) only */ - PROPERTY_ENTRY_U16("ccgx,firmware-build", ('n' << 8) | 'v'), + /* Use FW built for NVIDIA GPU only */ PROPERTY_ENTRY_STRING("cypress,firmware-build", "nvidia,gpu"), { } }; From patchwork Fri Nov 11 10:15:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wayne Chang X-Patchwork-Id: 13040091 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 56DF1C38A2B for ; Fri, 11 Nov 2022 10:17:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233882AbiKKKRJ (ORCPT ); Fri, 11 Nov 2022 05:17:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53738 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233628AbiKKKQq (ORCPT ); Fri, 11 Nov 2022 05:16:46 -0500 Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1anam02on2085.outbound.protection.outlook.com [40.107.96.85]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 793FB862DF; Fri, 11 Nov 2022 02:16:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WugFNU1muLn7Qj5LtfBKyTxfPkocgxHLw6jU/IbnBdLK5evyQ0BTbi+5Ft2W9LKgPdKqz8514sWwoiPUeUx/qyQ/SPP2HtoUuIutq4fP6Tw+yBzi/XG8iWXYt1ZweaD2SDqshjV+7c4rXUq35HN6ZRbEwNGXzqy3pjwNry45PStUdRdgE2JUA/17RKn5+SbMPTU1kl/cYpIuj81rRRm1HueGAPDx69dT3pI+Ivzss3J/XsxmZssCOErGZrYk2qgzNjDi2LMKSR2b4GE8GVmCpJSRpAEBcipIinJhSB9w06BORyRyt2/v+Y1ZKRej6I7a8fV5uR0IXHCDetTZOY7y4g== 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=jVUquMvFCJAcgb8SUkNRtqEUj4zJ27FyVryF/sm5yPk=; b=bC6xTeFqSiyyuYiwayMlh+pT9uPlfDtVBZKEuc31mgg5+Nce3WV4QLwSYJ55qrXKjkPDu12h+zZbcyhCGcYmtpf0Lj9aKH57weV/bDJZflbbYEiCquveTNm6rVnP9yWqD/wNJ/rU/fKQlZIR0xyETf3572pp67oISg9Oj2fQDzD4SuCkOI6DHN5rfmFdzMzEaTr1jkOKm6YSGYyBZCVmpUcXp02O0gxs756W1AIkLs6mq8DgoE5lJeysQu6ohoFsUW4rxt3+kWfJJGam+51H4mfDrKZY/8IlNvP1Pb+DGMupDm6jGvdLGjrhOlNAC1f9b1MisPwKg7MGkYBZpcmlHg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=linuxfoundation.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=jVUquMvFCJAcgb8SUkNRtqEUj4zJ27FyVryF/sm5yPk=; b=QeuHHhZ/hgA1G/XjLvMF8AJvsn1wfGbhTo733z45BeWTMcjn4QuahTHaMmSMIKc0n6Cx9DRThvN/chT9Lc9iBboZ10OQYEKZhE+dpUhJUzpO+Dx/YLAxCUikej9iIXHf/kVRnxRYiyv4E8WUaxE4UP2cZzjkkhXFSvQ8dON9K+a3ZDNUsIi2Bnx/oFaReWulQnFkBOaauKHIVE8R0NYTZaqectGwjLeHADv23aGyQqheq8Klw91a0X3cIca89Zb10zG0RgtX5jnIOWHpaYjthIUMOe7OQyejMQ/o5RwJznJZhdMP2MQWlm1ORXyoCu6ucAbTWxQNaMnRSEO0SXL9aA== Received: from DS7PR03CA0166.namprd03.prod.outlook.com (2603:10b6:5:3b2::21) by DM6PR12MB4561.namprd12.prod.outlook.com (2603:10b6:5:2ac::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5813.13; Fri, 11 Nov 2022 10:16:34 +0000 Received: from CY4PEPF0000B8EE.namprd05.prod.outlook.com (2603:10b6:5:3b2:cafe::79) by DS7PR03CA0166.outlook.office365.com (2603:10b6:5:3b2::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5813.14 via Frontend Transport; Fri, 11 Nov 2022 10:16:34 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) 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 216.228.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by CY4PEPF0000B8EE.mail.protection.outlook.com (10.167.241.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5813.11 via Frontend Transport; Fri, 11 Nov 2022 10:16:34 +0000 Received: from rnnvmail202.nvidia.com (10.129.68.7) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.26; Fri, 11 Nov 2022 02:16:24 -0800 Received: from rnnvmail202.nvidia.com (10.129.68.7) by rnnvmail202.nvidia.com (10.129.68.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.36; Fri, 11 Nov 2022 02:16:24 -0800 Received: from waynec-Precision-5760.nvidia.com (10.127.8.13) by mail.nvidia.com (10.129.68.7) with Microsoft SMTP Server id 15.2.986.36 via Frontend Transport; Fri, 11 Nov 2022 02:16:20 -0800 From: Wayne Chang To: , , , , , , , , , , , , CC: , , , , , , , Subject: [PATCH v2 10/13] phy: tegra: xusb: Disable trk clk when not in use Date: Fri, 11 Nov 2022 18:15:06 +0800 Message-ID: <20221111101509.999589-11-waynec@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221111101509.999589-1-waynec@nvidia.com> References: <20221111101509.999589-1-waynec@nvidia.com> MIME-Version: 1.0 X-NVConfidentiality: public X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000B8EE:EE_|DM6PR12MB4561:EE_ X-MS-Office365-Filtering-Correlation-Id: 33f6c85a-10b9-469f-6a59-08dac3cdcfc0 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 32IBemloahe/BFF10UhKuCJuhT8ZWtgKaGzmuGw1JdxyBIGMGcCo4PrSBDbJuA/SY/G38rK8HC9PvkpfoBkDhFHo4IbP4qaljnYI3iAF3Wn08oCSQmXTwTaZO379C8tomtR/hC+o6n114LuzyXiJZEnmvKsitB1ru/rVKNxFq8YzfoRZp8m+VIYPHMKpWxVJeriYO6+YxJcWysvF/u2Fsj6oDgDfhJUALpTogZlO1/B/DyFAC6RiKPkaTVTHr8KrN+mbyEqQKMvWaP5EukTdG7c3TfWZuFRQeT0Xl8gvIlO2kxMYD0fPfZxgluQRJqWuj1ltvbnCTqECDM0hqtCOGN5fxUXqO60F3ChvClEXaQE4ismB5N5lZJdjq2Vs2sNtOqCioXTzOLVPs831vGRestcgSeACNjwMtydRAMtrMVo2YapGZHhlMmkq/kxo9RmqqRTwITqakOGpelC79C/ofQ4siinSpnRiV9p6k0JwosmYmWXJgwOsC60xjmhnITbSxi9QBX4vqX5q3u/ziGrUeV5bZ6A14TQbOylbFc0BXJ15qXJZpO6yHAwqqf4i7NrwfDhHC0cN/nex0/MPBhC/BFKb+kClRcQAC1Z6dWuIQcUHyfeDyOyqYf1uqDF/9e4S+qJJUZ5v9A0wXG4A06fixbblSjZSEBUMnmXSOJIcjtcH3HwxwSbGJc6yLFQbhwcfMhIeSn2jwjGQ+MpAjLgc9BsX6fI7lPMIBzLoCSr5u3ZT8os144nH4PtIVNQQMZIzfKXI04SsZNbYule7dGFP8lq6X8aqdnzlAF9zb+F8wbQ= X-Forefront-Antispam-Report: CIP:216.228.117.161;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc6edge2.nvidia.com;CAT:NONE;SFS:(13230022)(4636009)(396003)(376002)(39860400002)(346002)(136003)(451199015)(40470700004)(36840700001)(46966006)(426003)(2616005)(26005)(4326008)(47076005)(40460700003)(8676002)(70586007)(70206006)(2906002)(6666004)(8936002)(36756003)(86362001)(5660300002)(41300700001)(316002)(7416002)(336012)(356005)(1076003)(186003)(7696005)(478600001)(7636003)(40480700001)(82310400005)(921005)(82740400003)(6636002)(54906003)(83380400001)(110136005)(36860700001);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Nov 2022 10:16:34.5989 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 33f6c85a-10b9-469f-6a59-08dac3cdcfc0 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.117.161];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CY4PEPF0000B8EE.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB4561 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Pad tracking is a one-time calibration for Tegra186 and Tegra194. Clk should be disabled after calibration. Disable clk after calibration. While at it add 100us delay for HW recording the calibration value. Signed-off-by: Wayne Chang --- V1 -> V2: update the commit message. drivers/phy/tegra/xusb-tegra186.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/phy/tegra/xusb-tegra186.c b/drivers/phy/tegra/xusb-tegra186.c index 0996ede63387..f121b4ffbbfd 100644 --- a/drivers/phy/tegra/xusb-tegra186.c +++ b/drivers/phy/tegra/xusb-tegra186.c @@ -609,6 +609,10 @@ static void tegra186_utmi_bias_pad_power_on(struct tegra_xusb_padctl *padctl) value &= ~USB2_PD_TRK; padctl_writel(padctl, value, XUSB_PADCTL_USB2_BIAS_PAD_CTL1); + udelay(100); + + clk_disable_unprepare(priv->usb2_trk_clk); + mutex_unlock(&padctl->lock); } @@ -633,8 +637,6 @@ static void tegra186_utmi_bias_pad_power_off(struct tegra_xusb_padctl *padctl) value |= USB2_PD_TRK; padctl_writel(padctl, value, XUSB_PADCTL_USB2_BIAS_PAD_CTL1); - clk_disable_unprepare(priv->usb2_trk_clk); - mutex_unlock(&padctl->lock); } From patchwork Fri Nov 11 10:15:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wayne Chang X-Patchwork-Id: 13040093 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 E34E3C4321E for ; Fri, 11 Nov 2022 10:17:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233158AbiKKKRN (ORCPT ); Fri, 11 Nov 2022 05:17:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53548 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233446AbiKKKQt (ORCPT ); Fri, 11 Nov 2022 05:16:49 -0500 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2055.outbound.protection.outlook.com [40.107.94.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2891E87B2E; Fri, 11 Nov 2022 02:16:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TBSpZu2EVS3jh5L+pcYGfAn+O9QP+9Dptl4KiMgPoOIKhb8OIKKy4WhNAQKomneWm64lH3iPdwAh4MdZC6EAEmqw66vJHY1vvbZG5o8MVGiznY3ZAxm8+iqPm7kXkRhZFwxb85SEfIXvBEKIe27WHMrlEigo+6jRTFKW77R9LnGFU3Imz4u/VF/SIWYDd7/9wBLemIHwGQOq26/ugLbZuIJ1YZD9sd/RXs0bgPmFp0333PqwftbH1U4UwQ/fMIPOm7GB9RvwEl1FJMqppR9P+H5JZfpFeOeAez0ESHWQpwzCEVgU92jbLnFXpeu8zo0VDFAcHc+mjTpCV3WMfD717A== 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=1AF7aVigZwouxWVql2MnK0MSpcIZN0ezQ3PFXN5glmg=; b=Dx4YWxiyY5joANrVFLu/9Tf2ZCex6Ce/hboXGUoecyotnWwlOYGddBMDFyvQ/9erPpUysQPTxSEkqK7jiXGa1YX0NWpYG4UbkKrj1BmiUkTmvPa6Jgf8q751X5YVeV+Xs92WBXOiW5hxeLZax+R7WfWKH8kY9MpjyiA6uh9yyZdKbwvou/06F6u0HF3Ngwxqv+f7I4XKHhUphZXIHOndyKPZnrKo1P3xIWb6kdjlDtjiXaeFX0KqUDxXLTInZURF+r2+akYqMZ9ZmhkKV2QjFFRhySPUOt/3aUdhY3PsIuN2d9Qx9fXnpiz9VAehGNcidN5MqrxF3LCJ5pKXnB012Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=linuxfoundation.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=1AF7aVigZwouxWVql2MnK0MSpcIZN0ezQ3PFXN5glmg=; b=rtb6k3/0hPJDfRjFp8koF9yNGSZLylTENY3XymxDPhm3JKmfpOd+kiVVKB2vgOsrLde975FxmzCTGlIGUlWOYxWivUf9VZhkVuFh+rG4EOP1FVi45chND9fWEmYeyipZd1DhKD+rcSOW5PY6LGQ6kbXjPX/gOVWF2QO7qKs9dNZN8a1NlQmLm9s2VvXh8a4rFvG1t+eOO3O5t7Ri6JGVsqyviVg3Rdmcc69QvY3jlLhW3o1f8l5dawblaVKXcKwg4bHaDQ0AcRuRdo7p1qJ18Quo839kS2P8UlhY1NSoczegH/EXgjscSOC3owhu51RWWyh2aqY5sOO4crzALa3BNA== Received: from DS7PR03CA0175.namprd03.prod.outlook.com (2603:10b6:5:3b2::30) by BN9PR12MB5195.namprd12.prod.outlook.com (2603:10b6:408:11c::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5813.14; Fri, 11 Nov 2022 10:16:39 +0000 Received: from CY4PEPF0000B8EE.namprd05.prod.outlook.com (2603:10b6:5:3b2:cafe::16) by DS7PR03CA0175.outlook.office365.com (2603:10b6:5:3b2::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5813.14 via Frontend Transport; Fri, 11 Nov 2022 10:16:39 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) 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 216.228.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by CY4PEPF0000B8EE.mail.protection.outlook.com (10.167.241.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5813.11 via Frontend Transport; Fri, 11 Nov 2022 10:16:38 +0000 Received: from rnnvmail204.nvidia.com (10.129.68.6) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.26; Fri, 11 Nov 2022 02:16:28 -0800 Received: from rnnvmail202.nvidia.com (10.129.68.7) by rnnvmail204.nvidia.com (10.129.68.6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.36; Fri, 11 Nov 2022 02:16:28 -0800 Received: from waynec-Precision-5760.nvidia.com (10.127.8.13) by mail.nvidia.com (10.129.68.7) with Microsoft SMTP Server id 15.2.986.36 via Frontend Transport; Fri, 11 Nov 2022 02:16:24 -0800 From: Wayne Chang To: , , , , , , , , , , , , CC: , , , , , , , Subject: [PATCH v2 11/13] phy: tegra: xusb: Add Tegra234 support Date: Fri, 11 Nov 2022 18:15:07 +0800 Message-ID: <20221111101509.999589-12-waynec@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221111101509.999589-1-waynec@nvidia.com> References: <20221111101509.999589-1-waynec@nvidia.com> MIME-Version: 1.0 X-NVConfidentiality: public X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000B8EE:EE_|BN9PR12MB5195:EE_ X-MS-Office365-Filtering-Correlation-Id: 2913a553-fb5e-4d59-106b-08dac3cdd250 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: tzIY1k/QRafb/SWgvE/3uxI+Zb4C6PlOTgX6L7t8rnqlZy8Ag1xRtB0Zbparcp3Tz6Ig7I502UWKFinkegILustdTUpQQ/NZwZrJa8fziPxN8lDeqjAh7KvV4oiUHTMUjvZtG4qYBh+c1eD2aph3MSKID6pBzB/3a4En/hXoYApDau2QfmhIKid2oBkuoxTmn0SRy4vjHifOFAIGfeiYuDCv6+Frnxuox4NT5lMV+lwVh4AyWNXVNFpmBlDj6JhGt58Y+b1ifOhZSnPljlKYJuiECC/eFw+ogrczUyCltZFRxuGhb8vmDldciqfCPSMjsQmRhP6fQbJJxh4A4mqcVauhO9G8qhZXXtz9afniDdDRjY8iEQIzQr/fpugf+bjQQHAobG1IumfL/Z71H0M/DBZDB+I9pJ+c/A3OlZHj8eP4LUiE+HcSqf4Ub1R+L+vwb/FR73rSctmwvoTNmcc/caIKKi6MWSB5X52HzN3afA1mOJ6kwdoXaV26C8h+vUrmygcuq/lsK7GEbnMcPVLOi86P1W9hR3F+WxkkBlBKMljRDOSzhwVGADm/aVZgymgZGxd/Dg1W/sDNmlcJ4KWvBOkaJv2bkPRS14m6nLDETjOnT9VJLwjFakkH+12G1BdY7fy2fAJd9RZfuOQjuWdSMf1+EBqoWbN6ic/nMHz4ed1jn9ENW4oO0uWbyEwYWE0i0lRLOnvKeJZqalyh0+Gj2YFvnup2j9gsmYrffqNmw95PKmM/21q9cOh6C9dHv0w7X0oo5Zgbgu0bLoxRYfghPe3c2JR7EFGXEzix48fysW8= X-Forefront-Antispam-Report: CIP:216.228.117.161;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc6edge2.nvidia.com;CAT:NONE;SFS:(13230022)(4636009)(396003)(136003)(39860400002)(346002)(376002)(451199015)(36840700001)(40470700004)(46966006)(4326008)(478600001)(70206006)(70586007)(26005)(86362001)(83380400001)(6666004)(41300700001)(426003)(82310400005)(8676002)(2906002)(47076005)(6636002)(36860700001)(8936002)(82740400003)(316002)(186003)(2616005)(54906003)(7696005)(921005)(1076003)(356005)(7636003)(40480700001)(336012)(110136005)(36756003)(7416002)(5660300002)(40460700003);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Nov 2022 10:16:38.9114 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2913a553-fb5e-4d59-106b-08dac3cdd250 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.117.161];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CY4PEPF0000B8EE.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN9PR12MB5195 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org From: Sing-Han Chen Add support for the XUSB pad controller found on Tegra234 SoCs. It is mostly similar to the same IP found on Tegra194, because most of the Tegra234 XUSB PADCTL registers definition and programming sequence are the same as Tegra194, Tegra234 XUSB PADCTL can share the same driver with Tegra186 and Tegra194 XUSB PADCTL. Introduce a new feature, USB2 HW tracking, for Tegra234. The feature is to enable HW periodical PAD tracking which measure and capture the electric parameters of USB2.0 PAD. Signed-off-by: Sing-Han Chen Co-developed-by: Wayne Chang Signed-off-by: Wayne Chang --- V1 -> V2:remove atomic and the helper in padctl_readl_poll func. drivers/phy/tegra/Makefile | 1 + drivers/phy/tegra/xusb-tegra186.c | 64 +++++++++++++++++++++++++++++-- drivers/phy/tegra/xusb.c | 6 +++ drivers/phy/tegra/xusb.h | 22 +++++++++++ 4 files changed, 90 insertions(+), 3 deletions(-) diff --git a/drivers/phy/tegra/Makefile b/drivers/phy/tegra/Makefile index 89b84067cb4c..eeeea72de117 100644 --- a/drivers/phy/tegra/Makefile +++ b/drivers/phy/tegra/Makefile @@ -7,4 +7,5 @@ phy-tegra-xusb-$(CONFIG_ARCH_TEGRA_132_SOC) += xusb-tegra124.o phy-tegra-xusb-$(CONFIG_ARCH_TEGRA_210_SOC) += xusb-tegra210.o phy-tegra-xusb-$(CONFIG_ARCH_TEGRA_186_SOC) += xusb-tegra186.o phy-tegra-xusb-$(CONFIG_ARCH_TEGRA_194_SOC) += xusb-tegra186.o +phy-tegra-xusb-$(CONFIG_ARCH_TEGRA_234_SOC) += xusb-tegra186.o obj-$(CONFIG_PHY_TEGRA194_P2U) += phy-tegra194-p2u.o diff --git a/drivers/phy/tegra/xusb-tegra186.c b/drivers/phy/tegra/xusb-tegra186.c index f121b4ffbbfd..5ae3cea19c84 100644 --- a/drivers/phy/tegra/xusb-tegra186.c +++ b/drivers/phy/tegra/xusb-tegra186.c @@ -89,6 +89,11 @@ #define USB2_TRK_START_TIMER(x) (((x) & 0x7f) << 12) #define USB2_TRK_DONE_RESET_TIMER(x) (((x) & 0x7f) << 19) #define USB2_PD_TRK BIT(26) +#define USB2_TRK_COMPLETED BIT(31) + +#define XUSB_PADCTL_USB2_BIAS_PAD_CTL2 0x28c +#define USB2_TRK_HW_MODE BIT(0) +#define CYA_TRK_CODE_UPDATE_ON_IDLE BIT(31) #define XUSB_PADCTL_HSIC_PADX_CTL0(x) (0x300 + (x) * 0x20) #define HSIC_PD_TX_DATA0 BIT(1) @@ -609,9 +614,31 @@ static void tegra186_utmi_bias_pad_power_on(struct tegra_xusb_padctl *padctl) value &= ~USB2_PD_TRK; padctl_writel(padctl, value, XUSB_PADCTL_USB2_BIAS_PAD_CTL1); - udelay(100); + if (padctl->soc->poll_trk_completed) { + err = padctl_readl_poll(padctl, XUSB_PADCTL_USB2_BIAS_PAD_CTL1, + USB2_TRK_COMPLETED, USB2_TRK_COMPLETED, 100); + if (err) { + /* The failure with polling on trk complete will not + * cause the failure of powering on the bias pad. + */ + dev_warn(dev, "failed to poll USB2 trk completed: %d\n", err); + } - clk_disable_unprepare(priv->usb2_trk_clk); + value = padctl_readl(padctl, XUSB_PADCTL_USB2_BIAS_PAD_CTL1); + value |= USB2_TRK_COMPLETED; + padctl_writel(padctl, value, XUSB_PADCTL_USB2_BIAS_PAD_CTL1); + } else { + udelay(100); + } + + if (padctl->soc->trk_hw_mode) { + value = padctl_readl(padctl, XUSB_PADCTL_USB2_BIAS_PAD_CTL2); + value |= USB2_TRK_HW_MODE; + value &= ~CYA_TRK_CODE_UPDATE_ON_IDLE; + padctl_writel(padctl, value, XUSB_PADCTL_USB2_BIAS_PAD_CTL2); + } else { + clk_disable_unprepare(priv->usb2_trk_clk); + } mutex_unlock(&padctl->lock); } @@ -637,6 +664,13 @@ static void tegra186_utmi_bias_pad_power_off(struct tegra_xusb_padctl *padctl) value |= USB2_PD_TRK; padctl_writel(padctl, value, XUSB_PADCTL_USB2_BIAS_PAD_CTL1); + if (padctl->soc->trk_hw_mode) { + value = padctl_readl(padctl, XUSB_PADCTL_USB2_BIAS_PAD_CTL2); + value &= ~USB2_TRK_HW_MODE; + padctl_writel(padctl, value, XUSB_PADCTL_USB2_BIAS_PAD_CTL2); + clk_disable_unprepare(priv->usb2_trk_clk); + } + mutex_unlock(&padctl->lock); } @@ -1560,7 +1594,8 @@ const struct tegra_xusb_padctl_soc tegra186_xusb_padctl_soc = { EXPORT_SYMBOL_GPL(tegra186_xusb_padctl_soc); #endif -#if IS_ENABLED(CONFIG_ARCH_TEGRA_194_SOC) +#if IS_ENABLED(CONFIG_ARCH_TEGRA_194_SOC) || \ + IS_ENABLED(CONFIG_ARCH_TEGRA_234_SOC) static const char * const tegra194_xusb_padctl_supply_names[] = { "avdd-usb", "vclamp-usb", @@ -1616,8 +1651,31 @@ const struct tegra_xusb_padctl_soc tegra194_xusb_padctl_soc = { .supply_names = tegra194_xusb_padctl_supply_names, .num_supplies = ARRAY_SIZE(tegra194_xusb_padctl_supply_names), .supports_gen2 = true, + .poll_trk_completed = true, }; EXPORT_SYMBOL_GPL(tegra194_xusb_padctl_soc); + +const struct tegra_xusb_padctl_soc tegra234_xusb_padctl_soc = { + .num_pads = ARRAY_SIZE(tegra194_pads), + .pads = tegra194_pads, + .ports = { + .usb2 = { + .ops = &tegra186_usb2_port_ops, + .count = 4, + }, + .usb3 = { + .ops = &tegra186_usb3_port_ops, + .count = 4, + }, + }, + .ops = &tegra186_xusb_padctl_ops, + .supply_names = tegra194_xusb_padctl_supply_names, + .num_supplies = ARRAY_SIZE(tegra194_xusb_padctl_supply_names), + .supports_gen2 = true, + .poll_trk_completed = true, + .trk_hw_mode = true, +}; +EXPORT_SYMBOL_GPL(tegra234_xusb_padctl_soc); #endif MODULE_AUTHOR("JC Kuo "); diff --git a/drivers/phy/tegra/xusb.c b/drivers/phy/tegra/xusb.c index 95091876c422..23d179b1a5b5 100644 --- a/drivers/phy/tegra/xusb.c +++ b/drivers/phy/tegra/xusb.c @@ -71,6 +71,12 @@ static const struct of_device_id tegra_xusb_padctl_of_match[] = { .compatible = "nvidia,tegra194-xusb-padctl", .data = &tegra194_xusb_padctl_soc, }, +#endif +#if defined(CONFIG_ARCH_TEGRA_234_SOC) + { + .compatible = "nvidia,tegra234-xusb-padctl", + .data = &tegra234_xusb_padctl_soc, + }, #endif { } }; diff --git a/drivers/phy/tegra/xusb.h b/drivers/phy/tegra/xusb.h index 8cfbbdbd6e0c..a21826c730d7 100644 --- a/drivers/phy/tegra/xusb.h +++ b/drivers/phy/tegra/xusb.h @@ -8,6 +8,7 @@ #define __PHY_TEGRA_XUSB_H #include +#include #include #include @@ -433,6 +434,8 @@ struct tegra_xusb_padctl_soc { unsigned int num_supplies; bool supports_gen2; bool need_fake_usb3_port; + bool poll_trk_completed; + bool trk_hw_mode; }; struct tegra_xusb_padctl { @@ -475,6 +478,22 @@ static inline u32 padctl_readl(struct tegra_xusb_padctl *padctl, return value; } +static inline u32 padctl_readl_poll(struct tegra_xusb_padctl *padctl, + unsigned long offset, u32 val, u32 mask, int us) +{ + u32 regval; + int err; + + err = readl_poll_timeout(padctl->regs + offset, regval, + (regval & mask) == val, 1, us); + if (err) { + dev_err(padctl->dev, "%08lx poll timeout > %08x\n", offset, + regval); + } + + return err; +} + struct tegra_xusb_lane *tegra_xusb_find_lane(struct tegra_xusb_padctl *padctl, const char *name, unsigned int index); @@ -491,5 +510,8 @@ extern const struct tegra_xusb_padctl_soc tegra186_xusb_padctl_soc; #if defined(CONFIG_ARCH_TEGRA_194_SOC) extern const struct tegra_xusb_padctl_soc tegra194_xusb_padctl_soc; #endif +#if defined(CONFIG_ARCH_TEGRA_234_SOC) +extern const struct tegra_xusb_padctl_soc tegra234_xusb_padctl_soc; +#endif #endif /* __PHY_TEGRA_XUSB_H */ From patchwork Fri Nov 11 10:15:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wayne Chang X-Patchwork-Id: 13040094 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 29013C433FE for ; Fri, 11 Nov 2022 10:17:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233582AbiKKKRP (ORCPT ); Fri, 11 Nov 2022 05:17:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53902 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233825AbiKKKQ7 (ORCPT ); Fri, 11 Nov 2022 05:16:59 -0500 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2041.outbound.protection.outlook.com [40.107.236.41]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8DD1B6829D; Fri, 11 Nov 2022 02:16:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=J2cdJUoJL9cGEfgnrxHzlX3+1zwUY3UIe3FP5F8WX9/gRuZslliceDv1cdje1tQRhWAFwMt+hyPLU/+PR/5s47TA565mAULZH/vh3aAf+HjT9Kiv8bKn+6DAatx6k9bsTL9+jDE1NxZp1UEMHgSLHeMW4Neh5CaqXpFFk2ORq72PKLYQTlH0RBI2+vMzfbL64FBBFHd6PEHE0Lt+hqgoP6ZCMAFjTlfBy/aLLjkkf05qgeOv8v5/a5S8Q3eOwbEXFHYMzcFsnwGM9MbrD9qZBNVuvUJ8rC1+ciXVIKdRrAM4mfrW1q8LngUzhl1+r6bwpAKBhzc75k2EaS8Zvcr9kA== 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=R/BM3Gb/NufbESyfLqjlRaEMDcCHlkycuONYHyeE4L4=; b=KG3kNjQhKJu5bVnRBPx8EM5OsobbNbz7z78NHnjM6UXGtnNaSHBgUGTQ44Mw23RAJXPPO19hModIoc/kGyH+Gxc+MF0+zFDhBWwZDLq4SnpNaue6MTdBVimi1NMlO4+6Hr9OO1WSI8exTzxGeQ3WNTDq+ihZbShF+MtDMMtG9oe+8swx+oIFR+7zX7ElBhbHCNut/jTzz01N0HUc69BuOsLnfeoLSceXPP1CwgFqdPQUmkgM9wEQ3jCZS7KGFHse82elbNAGB+s6JyJm3UrnNmZSc/aVXusRVMzY05Tr93ybxJJVwD17br0r6EkWmf2YAoXvlLgJy7CGFrsVLsm2NQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=linuxfoundation.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=R/BM3Gb/NufbESyfLqjlRaEMDcCHlkycuONYHyeE4L4=; b=c6SSDjcKArLgawoQ5WVD1BDjOhf4jFBNYFN0GQdWwmuKKh7EnDjHMWc2mXOjVE1N9c2xwuK5SigcOg7RaSkIxYhRJ4Ued+g1DZiGYumaUCoADAG0mm/d/4xGcANbjosPrc4RMKYek+SKtm1MWqN6PyaAJOkeFKEyl7icUpTPIHSJ8aaeGPAuXPzPcxLgMCUaPY7TM0b9+fmZ4OUDqZDfISHU65mdpIx6sVAm0Ji14FSsbwU7I3L8Gd2Ru7EHboPBIBzLdM7A/8TTEIP7vWbjuHg2vKe42wXeIFOByQD8neb8fufJSFq2ESsA2jMeJOcjXUxGm4XM701xuz18JJDDlQ== Received: from MN2PR14CA0005.namprd14.prod.outlook.com (2603:10b6:208:23e::10) by MN2PR12MB4471.namprd12.prod.outlook.com (2603:10b6:208:26f::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5813.13; Fri, 11 Nov 2022 10:16:50 +0000 Received: from BL02EPF0000EE3D.namprd05.prod.outlook.com (2603:10b6:208:23e:cafe::42) by MN2PR14CA0005.outlook.office365.com (2603:10b6:208:23e::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5813.14 via Frontend Transport; Fri, 11 Nov 2022 10:16:50 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) 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 216.228.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by BL02EPF0000EE3D.mail.protection.outlook.com (10.167.241.134) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5813.11 via Frontend Transport; Fri, 11 Nov 2022 10:16:50 +0000 Received: from rnnvmail202.nvidia.com (10.129.68.7) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.26; Fri, 11 Nov 2022 02:16:32 -0800 Received: from rnnvmail202.nvidia.com (10.129.68.7) by rnnvmail202.nvidia.com (10.129.68.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.36; Fri, 11 Nov 2022 02:16:32 -0800 Received: from waynec-Precision-5760.nvidia.com (10.127.8.13) by mail.nvidia.com (10.129.68.7) with Microsoft SMTP Server id 15.2.986.36 via Frontend Transport; Fri, 11 Nov 2022 02:16:28 -0800 From: Wayne Chang To: , , , , , , , , , , , , CC: , , , , , , , Subject: [PATCH v2 12/13] usb: host: xhci-tegra: Add Tegra234 XHCI support Date: Fri, 11 Nov 2022 18:15:08 +0800 Message-ID: <20221111101509.999589-13-waynec@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221111101509.999589-1-waynec@nvidia.com> References: <20221111101509.999589-1-waynec@nvidia.com> MIME-Version: 1.0 X-NVConfidentiality: public X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL02EPF0000EE3D:EE_|MN2PR12MB4471:EE_ X-MS-Office365-Filtering-Correlation-Id: fede80a5-347b-4f3b-03b3-08dac3cdd923 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 58Gv026AnskoUl+5ZL7vmI8QbLx4WhdcoN1ik6CT8gj62skDusATsHbcFgLlgISFe42zM03b6t43nC1fXy7OH9IeZFkFnQuPozJdIor0eOPA2OjzPkOa8Hb9Kcpm8pP79Bkx0wBWIaAJu+vp0ZeE33P42NbjN6WYSABnStf8k3uw/ThJNIxvZPhYbypF10uGCwMVYSNhomuydWFPg/MTNVI0xCLba6l43nhBaOBInbyo+zPR+5QVLuvHfjuqdFNICg3EGfvuwGBDnspR2y50ZwgY7nv9efT8gqS7PxsP0tj0icN5s1B477k4OIJ3Qj+wAtuMxezFPUCCyySphuVnaKQzs2N8kpxQcbFlFqlZP5fYfzQkIsdWpvxmXAfktxp3lWSjn8SSit4wpsH/fGpBkNj93wk6xKy9izN1RMr1U21Npphsyy/u6JFZCAPOEu6+wFKtladZzm4R2zM5PgmvHeTIuXTZkLXz4YSxqXlEdMVM1r1V1INTDlAH81dP85KCNJ95HH1eJPyZgONzbsbh5gG0nY300X6IFjpIGIZcgvQoYWK0De9nltYBCLgM91hkn5eey5HiLJkYfn1mQ25TNQkZRFW/WLf9fhfCquaclAtVZxx8bRSE5wgjQAGjHhXeYPae/vk5AQCulXRJClTq+++BL87xJdeGUjS3n4Z0/q6jVAdy/9nAu4MR0B6GqIcjJzafZms6epJEIj3MmJn7hSuRfY3kF5awKQAPNQ4HHrjD3rn3mX3BGMQzdyVhoMxEoa/tM7Kr43bsgEH4yZ/QewyeUHD5rVQIgRLLRbrdpnk= X-Forefront-Antispam-Report: CIP:216.228.117.160;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc6edge1.nvidia.com;CAT:NONE;SFS:(13230022)(4636009)(376002)(346002)(396003)(39860400002)(136003)(451199015)(46966006)(40470700004)(36840700001)(36756003)(36860700001)(316002)(356005)(86362001)(921005)(40460700003)(82740400003)(2906002)(41300700001)(4326008)(8676002)(7696005)(7416002)(40480700001)(6636002)(70586007)(54906003)(5660300002)(82310400005)(8936002)(30864003)(1076003)(70206006)(336012)(186003)(110136005)(83380400001)(2616005)(426003)(47076005)(7636003)(26005)(478600001)(6666004);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Nov 2022 10:16:50.2977 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: fede80a5-347b-4f3b-03b3-08dac3cdd923 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.117.160];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BL02EPF0000EE3D.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB4471 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org From: Sing-Han Chen This change adds Tegra234 XUSB host mode controller support. In Tegra234, some of the registers have moved to bar2 space. The new soc variable has_bar2 indicates the chip with bar2 area. This patch adds new reg helper to let the driver reuse the same code for those chips with bar2 support. Signed-off-by: Sing-Han Chen Co-developed-by: Wayne Chang Signed-off-by: Wayne Chang --- V1 -> V2:fix some issues on coding style extract tegra_xusb_load_firmware function refine has_bar2 and remove has_ifr/firmware on Tegra234 drivers/usb/host/xhci-tegra.c | 270 +++++++++++++++++++++++++++++----- 1 file changed, 232 insertions(+), 38 deletions(-) diff --git a/drivers/usb/host/xhci-tegra.c b/drivers/usb/host/xhci-tegra.c index bdb776553826..b2f07eae2c93 100644 --- a/drivers/usb/host/xhci-tegra.c +++ b/drivers/usb/host/xhci-tegra.c @@ -44,6 +44,9 @@ #define XUSB_CFG_4 0x010 #define XUSB_BASE_ADDR_SHIFT 15 #define XUSB_BASE_ADDR_MASK 0x1ffff +#define XUSB_CFG_7 0x01c +#define XUSB_BASE2_ADDR_SHIFT 16 +#define XUSB_BASE2_ADDR_MASK 0xffff #define XUSB_CFG_16 0x040 #define XUSB_CFG_24 0x060 #define XUSB_CFG_AXI_CFG 0x0f8 @@ -75,6 +78,20 @@ #define MBOX_SMI_INTR_FW_HANG BIT(1) #define MBOX_SMI_INTR_EN BIT(3) +/* BAR2 registers */ +#define XUSB_BAR2_ARU_MBOX_CMD 0x004 +#define XUSB_BAR2_ARU_MBOX_DATA_IN 0x008 +#define XUSB_BAR2_ARU_MBOX_DATA_OUT 0x00c +#define XUSB_BAR2_ARU_MBOX_OWNER 0x010 +#define XUSB_BAR2_ARU_SMI_INTR 0x014 +#define XUSB_BAR2_ARU_SMI_ARU_FW_SCRATCH_DATA0 0x01c +#define XUSB_BAR2_ARU_IFRDMA_CFG0 0x0e0 +#define XUSB_BAR2_ARU_IFRDMA_CFG1 0x0e4 +#define XUSB_BAR2_ARU_IFRDMA_STREAMID_FIELD 0x0e8 +#define XUSB_BAR2_ARU_C11_CSBRANGE 0x9c +#define XUSB_BAR2_ARU_FW_SCRATCH 0x1000 +#define XUSB_BAR2_CSB_BASE_ADDR 0x2000 + /* IPFS registers */ #define IPFS_XUSB_HOST_MSI_BAR_SZ_0 0x0c0 #define IPFS_XUSB_HOST_MSI_AXI_BAR_ST_0 0x0c4 @@ -111,6 +128,9 @@ #define IMFILLRNG1_TAG_HI_SHIFT 16 #define XUSB_FALC_IMFILLCTL 0x158 +/* CSB ARU registers */ +#define XUSB_CSB_ARU_SCRATCH0 0x100100 + /* MP CSB registers */ #define XUSB_CSB_MP_ILOAD_ATTR 0x101a00 #define XUSB_CSB_MP_ILOAD_BASE_LO 0x101a04 @@ -131,6 +151,9 @@ #define IMEM_BLOCK_SIZE 256 +#define FW_IOCTL_TYPE_SHIFT 24 +#define FW_IOCTL_CFGTBL_READ 17 + struct tegra_xusb_fw_header { __le32 boot_loadaddr_in_imem; __le32 boot_codedfi_offset; @@ -175,6 +198,7 @@ struct tegra_xusb_mbox_regs { u16 data_in; u16 data_out; u16 owner; + u16 smi_intr; }; struct tegra_xusb_context_soc { @@ -189,6 +213,18 @@ struct tegra_xusb_context_soc { } fpci; }; +struct tegra_xusb; +struct tegra_xusb_soc_ops { + u32 (*mbox_reg_readl)(struct tegra_xusb *tegra, + unsigned int offset); + void (*mbox_reg_writel)(struct tegra_xusb *tegra, + u32 value, unsigned int offset); + u32 (*csb_reg_readl)(struct tegra_xusb *tegra, + unsigned int offset); + void (*csb_reg_writel)(struct tegra_xusb *tegra, + u32 value, unsigned int offset); +}; + struct tegra_xusb_soc { const char *firmware; const char * const *supply_names; @@ -205,11 +241,14 @@ struct tegra_xusb_soc { } ports; struct tegra_xusb_mbox_regs mbox; + const struct tegra_xusb_soc_ops *ops; bool scale_ss_clock; bool has_ipfs; bool lpm_support; bool otg_reset_sspi; + + bool has_bar2; }; struct tegra_xusb_context { @@ -230,6 +269,8 @@ struct tegra_xusb { void __iomem *ipfs_base; void __iomem *fpci_base; + void __iomem *bar2_base; + struct resource *bar2; const struct tegra_xusb_soc *soc; @@ -300,7 +341,33 @@ static inline void ipfs_writel(struct tegra_xusb *tegra, u32 value, writel(value, tegra->ipfs_base + offset); } +static inline u32 bar2_readl(struct tegra_xusb *tegra, unsigned int offset) +{ + return readl(tegra->bar2_base + offset); +} + +static inline void bar2_writel(struct tegra_xusb *tegra, u32 value, + unsigned int offset) +{ + writel(value, tegra->bar2_base + offset); +} + static u32 csb_readl(struct tegra_xusb *tegra, unsigned int offset) +{ + const struct tegra_xusb_soc_ops *ops = tegra->soc->ops; + + return ops->csb_reg_readl(tegra, offset); +} + +static void csb_writel(struct tegra_xusb *tegra, u32 value, + unsigned int offset) +{ + const struct tegra_xusb_soc_ops *ops = tegra->soc->ops; + + ops->csb_reg_writel(tegra, value, offset); +} + +static u32 fpci_csb_readl(struct tegra_xusb *tegra, unsigned int offset) { u32 page = CSB_PAGE_SELECT(offset); u32 ofs = CSB_PAGE_OFFSET(offset); @@ -310,7 +377,7 @@ static u32 csb_readl(struct tegra_xusb *tegra, unsigned int offset) return fpci_readl(tegra, XUSB_CFG_CSB_BASE_ADDR + ofs); } -static void csb_writel(struct tegra_xusb *tegra, u32 value, +static void fpci_csb_writel(struct tegra_xusb *tegra, u32 value, unsigned int offset) { u32 page = CSB_PAGE_SELECT(offset); @@ -320,6 +387,26 @@ static void csb_writel(struct tegra_xusb *tegra, u32 value, fpci_writel(tegra, value, XUSB_CFG_CSB_BASE_ADDR + ofs); } +static u32 bar2_csb_readl(struct tegra_xusb *tegra, unsigned int offset) +{ + u32 page = CSB_PAGE_SELECT(offset); + u32 ofs = CSB_PAGE_OFFSET(offset); + + bar2_writel(tegra, page, XUSB_BAR2_ARU_C11_CSBRANGE); + + return bar2_readl(tegra, XUSB_BAR2_CSB_BASE_ADDR + ofs); +} + +static void bar2_csb_writel(struct tegra_xusb *tegra, u32 value, + unsigned int offset) +{ + u32 page = CSB_PAGE_SELECT(offset); + u32 ofs = CSB_PAGE_OFFSET(offset); + + bar2_writel(tegra, page, XUSB_BAR2_ARU_C11_CSBRANGE); + bar2_writel(tegra, value, XUSB_BAR2_CSB_BASE_ADDR + ofs); +} + static int tegra_xusb_set_ss_clk(struct tegra_xusb *tegra, unsigned long rate) { @@ -451,6 +538,7 @@ static bool tegra_xusb_mbox_cmd_requires_ack(enum tegra_xusb_mbox_cmd cmd) static int tegra_xusb_mbox_send(struct tegra_xusb *tegra, const struct tegra_xusb_mbox_msg *msg) { + const struct tegra_xusb_soc_ops *ops = tegra->soc->ops; bool wait_for_idle = false; u32 value; @@ -459,15 +547,15 @@ static int tegra_xusb_mbox_send(struct tegra_xusb *tegra, * ACK/NAK messages. */ if (!(msg->cmd == MBOX_CMD_ACK || msg->cmd == MBOX_CMD_NAK)) { - value = fpci_readl(tegra, tegra->soc->mbox.owner); + value = ops->mbox_reg_readl(tegra, tegra->soc->mbox.owner); if (value != MBOX_OWNER_NONE) { dev_err(tegra->dev, "mailbox is busy\n"); return -EBUSY; } - fpci_writel(tegra, MBOX_OWNER_SW, tegra->soc->mbox.owner); + ops->mbox_reg_writel(tegra, MBOX_OWNER_SW, tegra->soc->mbox.owner); - value = fpci_readl(tegra, tegra->soc->mbox.owner); + value = ops->mbox_reg_readl(tegra, tegra->soc->mbox.owner); if (value != MBOX_OWNER_SW) { dev_err(tegra->dev, "failed to acquire mailbox\n"); return -EBUSY; @@ -477,17 +565,17 @@ static int tegra_xusb_mbox_send(struct tegra_xusb *tegra, } value = tegra_xusb_mbox_pack(msg); - fpci_writel(tegra, value, tegra->soc->mbox.data_in); + ops->mbox_reg_writel(tegra, value, tegra->soc->mbox.data_in); - value = fpci_readl(tegra, tegra->soc->mbox.cmd); + value = ops->mbox_reg_readl(tegra, tegra->soc->mbox.cmd); value |= MBOX_INT_EN | MBOX_DEST_FALC; - fpci_writel(tegra, value, tegra->soc->mbox.cmd); + ops->mbox_reg_writel(tegra, value, tegra->soc->mbox.cmd); if (wait_for_idle) { unsigned long timeout = jiffies + msecs_to_jiffies(250); while (time_before(jiffies, timeout)) { - value = fpci_readl(tegra, tegra->soc->mbox.owner); + value = ops->mbox_reg_readl(tegra, tegra->soc->mbox.owner); if (value == MBOX_OWNER_NONE) break; @@ -495,7 +583,7 @@ static int tegra_xusb_mbox_send(struct tegra_xusb *tegra, } if (time_after(jiffies, timeout)) - value = fpci_readl(tegra, tegra->soc->mbox.owner); + value = ops->mbox_reg_readl(tegra, tegra->soc->mbox.owner); if (value != MBOX_OWNER_NONE) return -ETIMEDOUT; @@ -507,11 +595,12 @@ static int tegra_xusb_mbox_send(struct tegra_xusb *tegra, static irqreturn_t tegra_xusb_mbox_irq(int irq, void *data) { struct tegra_xusb *tegra = data; + const struct tegra_xusb_soc_ops *ops = tegra->soc->ops; u32 value; /* clear mailbox interrupts */ - value = fpci_readl(tegra, XUSB_CFG_ARU_SMI_INTR); - fpci_writel(tegra, value, XUSB_CFG_ARU_SMI_INTR); + value = ops->mbox_reg_readl(tegra, tegra->soc->mbox.smi_intr); + ops->mbox_reg_writel(tegra, value, tegra->soc->mbox.smi_intr); if (value & MBOX_SMI_INTR_FW_HANG) dev_err(tegra->dev, "controller firmware hang\n"); @@ -664,6 +753,7 @@ static void tegra_xusb_mbox_handle(struct tegra_xusb *tegra, static irqreturn_t tegra_xusb_mbox_thread(int irq, void *data) { struct tegra_xusb *tegra = data; + const struct tegra_xusb_soc_ops *ops = tegra->soc->ops; struct tegra_xusb_mbox_msg msg; u32 value; @@ -672,16 +762,16 @@ static irqreturn_t tegra_xusb_mbox_thread(int irq, void *data) if (pm_runtime_suspended(tegra->dev) || tegra->suspended) goto out; - value = fpci_readl(tegra, tegra->soc->mbox.data_out); + value = ops->mbox_reg_readl(tegra, tegra->soc->mbox.data_out); tegra_xusb_mbox_unpack(&msg, value); - value = fpci_readl(tegra, tegra->soc->mbox.cmd); + value = ops->mbox_reg_readl(tegra, tegra->soc->mbox.cmd); value &= ~MBOX_DEST_SMI; - fpci_writel(tegra, value, tegra->soc->mbox.cmd); + ops->mbox_reg_writel(tegra, value, tegra->soc->mbox.cmd); /* clear mailbox owner if no ACK/NAK is required */ if (!tegra_xusb_mbox_cmd_requires_ack(msg.cmd)) - fpci_writel(tegra, MBOX_OWNER_NONE, tegra->soc->mbox.owner); + ops->mbox_reg_writel(tegra, MBOX_OWNER_NONE, tegra->soc->mbox.owner); tegra_xusb_mbox_handle(tegra, &msg); @@ -709,6 +799,15 @@ static void tegra_xusb_config(struct tegra_xusb *tegra) value |= regs & (XUSB_BASE_ADDR_MASK << XUSB_BASE_ADDR_SHIFT); fpci_writel(tegra, value, XUSB_CFG_4); + /* Program BAR2 space */ + if (tegra->bar2) { + value = fpci_readl(tegra, XUSB_CFG_7); + value &= ~(XUSB_BASE2_ADDR_MASK << XUSB_BASE2_ADDR_SHIFT); + value |= tegra->bar2->start & + (XUSB_BASE2_ADDR_MASK << XUSB_BASE2_ADDR_SHIFT); + fpci_writel(tegra, value, XUSB_CFG_7); + } + usleep_range(100, 200); /* Enable bus master */ @@ -881,21 +980,36 @@ static int tegra_xusb_request_firmware(struct tegra_xusb *tegra) return 0; } -static int tegra_xusb_load_firmware(struct tegra_xusb *tegra) +static int tegra_xusb_wait_for_falcon(struct tegra_xusb *tegra) +{ + struct xhci_cap_regs __iomem *cap_regs; + struct xhci_op_regs __iomem *op_regs; + int ret; + u32 value; + + cap_regs = tegra->regs; + op_regs = tegra->regs + HC_LENGTH(readl(&cap_regs->hc_capbase)); + + ret = readl_poll_timeout(&op_regs->status, value, !(value & STS_CNR), 1000, 200000); + + if (ret) + dev_err(tegra->dev, "XHCI Controller not ready. Falcon state: 0x%x\n", + csb_readl(tegra, XUSB_FALC_CPUCTL)); + + return ret; +} + +static int tegra_xusb_load_firmware_rom(struct tegra_xusb *tegra) { unsigned int code_tag_blocks, code_size_blocks, code_blocks; - struct xhci_cap_regs __iomem *cap = tegra->regs; struct tegra_xusb_fw_header *header; struct device *dev = tegra->dev; - struct xhci_op_regs __iomem *op; - unsigned long timeout; time64_t timestamp; u64 address; u32 value; int err; header = (struct tegra_xusb_fw_header *)tegra->fw.virt; - op = tegra->regs + HC_LENGTH(readl(&cap->hc_capbase)); if (csb_readl(tegra, XUSB_CSB_MP_ILOAD_BASE_LO) != 0) { dev_info(dev, "Firmware already loaded, Falcon state %#x\n", @@ -968,30 +1082,55 @@ static int tegra_xusb_load_firmware(struct tegra_xusb *tegra) /* Boot Falcon CPU and wait for USBSTS_CNR to get cleared. */ csb_writel(tegra, CPUCTL_STARTCPU, XUSB_FALC_CPUCTL); - timeout = jiffies + msecs_to_jiffies(200); + if (tegra_xusb_wait_for_falcon(tegra)) + return -EIO; + + timestamp = le32_to_cpu(header->fwimg_created_time); - do { - value = readl(&op->status); - if ((value & STS_CNR) == 0) - break; + dev_info(dev, "Firmware timestamp: %ptTs UTC\n", ×tamp); + + return 0; +} + +static u32 tegra_xusb_read_firmware_header(struct tegra_xusb *tegra, u32 offset) +{ + /* + * We only accept reading the firmware config table + * The offset should not exceed the fw header structure + */ + if (offset >= sizeof(struct tegra_xusb_fw_header)) + return 0; - usleep_range(1000, 2000); - } while (time_is_after_jiffies(timeout)); + bar2_writel(tegra, (FW_IOCTL_CFGTBL_READ << FW_IOCTL_TYPE_SHIFT) | offset, + XUSB_BAR2_ARU_FW_SCRATCH); + return bar2_readl(tegra, XUSB_BAR2_ARU_SMI_ARU_FW_SCRATCH_DATA0); +} + +static int tegra_xusb_init_ifr_firmware(struct tegra_xusb *tegra) +{ + time64_t timestamp; - value = readl(&op->status); - if (value & STS_CNR) { - value = csb_readl(tegra, XUSB_FALC_CPUCTL); - dev_err(dev, "XHCI controller not read: %#010x\n", value); + if (tegra_xusb_wait_for_falcon(tegra)) return -EIO; - } - timestamp = le32_to_cpu(header->fwimg_created_time); +#define offsetof_32(X, Y) ((u8)(offsetof(X, Y) / sizeof(__le32))) + timestamp = tegra_xusb_read_firmware_header(tegra, + offsetof_32(struct tegra_xusb_fw_header, + fwimg_created_time) << 2); - dev_info(dev, "Firmware timestamp: %ptTs UTC\n", ×tamp); + dev_info(tegra->dev, "Firmware timestamp: %ptTs UTC\n", ×tamp); return 0; } +static int tegra_xusb_load_firmware(struct tegra_xusb *tegra) +{ + if (!tegra->soc->firmware) + return tegra_xusb_init_ifr_firmware(tegra); + else + return tegra_xusb_load_firmware_rom(tegra); +} + static void tegra_xusb_powerdomain_remove(struct device *dev, struct tegra_xusb *tegra) { @@ -1435,6 +1574,10 @@ static int tegra_xusb_probe(struct platform_device *pdev) tegra->ipfs_base = devm_platform_ioremap_resource(pdev, 2); if (IS_ERR(tegra->ipfs_base)) return PTR_ERR(tegra->ipfs_base); + } else if (tegra->soc->has_bar2) { + tegra->bar2_base = devm_platform_get_and_ioremap_resource(pdev, 2, &tegra->bar2); + if (IS_ERR(tegra->bar2_base)) + return PTR_ERR(tegra->bar2_base); } tegra->xhci_irq = platform_get_irq(pdev, 0); @@ -1651,10 +1794,13 @@ static int tegra_xusb_probe(struct platform_device *pdev) goto disable_phy; } - err = tegra_xusb_request_firmware(tegra); - if (err < 0) { - dev_err(&pdev->dev, "failed to request firmware: %d\n", err); - goto disable_phy; + if (tegra->soc->firmware) { + err = tegra_xusb_request_firmware(tegra); + if (err < 0) { + dev_err(&pdev->dev, + "failed to request firmware: %d\n", err); + goto disable_phy; + } } err = tegra_xusb_unpowergate_partitions(tegra); @@ -2271,6 +2417,13 @@ static const struct tegra_xusb_context_soc tegra124_xusb_context = { }, }; +static const struct tegra_xusb_soc_ops tegra124_ops = { + .mbox_reg_readl = &fpci_readl, + .mbox_reg_writel = &fpci_writel, + .csb_reg_readl = &fpci_csb_readl, + .csb_reg_writel = &fpci_csb_writel, +}; + static const struct tegra_xusb_soc tegra124_soc = { .firmware = "nvidia/tegra124/xusb.bin", .supply_names = tegra124_supply_names, @@ -2286,11 +2439,13 @@ static const struct tegra_xusb_soc tegra124_soc = { .scale_ss_clock = true, .has_ipfs = true, .otg_reset_sspi = false, + .ops = &tegra124_ops, .mbox = { .cmd = 0xe4, .data_in = 0xe8, .data_out = 0xec, .owner = 0xf0, + .smi_intr = XUSB_CFG_ARU_SMI_INTR, }, }; MODULE_FIRMWARE("nvidia/tegra124/xusb.bin"); @@ -2322,11 +2477,13 @@ static const struct tegra_xusb_soc tegra210_soc = { .scale_ss_clock = false, .has_ipfs = true, .otg_reset_sspi = true, + .ops = &tegra124_ops, .mbox = { .cmd = 0xe4, .data_in = 0xe8, .data_out = 0xec, .owner = 0xf0, + .smi_intr = XUSB_CFG_ARU_SMI_INTR, }, }; MODULE_FIRMWARE("nvidia/tegra210/xusb.bin"); @@ -2363,11 +2520,13 @@ static const struct tegra_xusb_soc tegra186_soc = { .scale_ss_clock = false, .has_ipfs = false, .otg_reset_sspi = false, + .ops = &tegra124_ops, .mbox = { .cmd = 0xe4, .data_in = 0xe8, .data_out = 0xec, .owner = 0xf0, + .smi_intr = XUSB_CFG_ARU_SMI_INTR, }, .lpm_support = true, }; @@ -2394,21 +2553,56 @@ static const struct tegra_xusb_soc tegra194_soc = { .scale_ss_clock = false, .has_ipfs = false, .otg_reset_sspi = false, + .ops = &tegra124_ops, .mbox = { .cmd = 0x68, .data_in = 0x6c, .data_out = 0x70, .owner = 0x74, + .smi_intr = XUSB_CFG_ARU_SMI_INTR, }, .lpm_support = true, }; MODULE_FIRMWARE("nvidia/tegra194/xusb.bin"); +static const struct tegra_xusb_soc_ops tegra234_ops = { + .mbox_reg_readl = &bar2_readl, + .mbox_reg_writel = &bar2_writel, + .csb_reg_readl = &bar2_csb_readl, + .csb_reg_writel = &bar2_csb_writel, +}; + +static const struct tegra_xusb_soc tegra234_soc = { + .supply_names = tegra194_supply_names, + .num_supplies = ARRAY_SIZE(tegra194_supply_names), + .phy_types = tegra194_phy_types, + .num_types = ARRAY_SIZE(tegra194_phy_types), + .context = &tegra186_xusb_context, + .ports = { + .usb3 = { .offset = 0, .count = 4, }, + .usb2 = { .offset = 4, .count = 4, }, + }, + .scale_ss_clock = false, + .has_ipfs = false, + .otg_reset_sspi = false, + .ops = &tegra234_ops, + .mbox = { + .cmd = XUSB_BAR2_ARU_MBOX_CMD, + .data_in = XUSB_BAR2_ARU_MBOX_DATA_IN, + .data_out = XUSB_BAR2_ARU_MBOX_DATA_OUT, + .owner = XUSB_BAR2_ARU_MBOX_OWNER, + .smi_intr = XUSB_BAR2_ARU_SMI_INTR, + }, + .lpm_support = true, + .has_bar2 = true, +}; + static const struct of_device_id tegra_xusb_of_match[] = { { .compatible = "nvidia,tegra124-xusb", .data = &tegra124_soc }, { .compatible = "nvidia,tegra210-xusb", .data = &tegra210_soc }, { .compatible = "nvidia,tegra186-xusb", .data = &tegra186_soc }, { .compatible = "nvidia,tegra194-xusb", .data = &tegra194_soc }, + { .compatible = "nvidia,tegra234-xusb", .data = &tegra234_soc }, { }, }; MODULE_DEVICE_TABLE(of, tegra_xusb_of_match); From patchwork Fri Nov 11 10:15:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wayne Chang X-Patchwork-Id: 13040095 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 7BBCDC433FE for ; Fri, 11 Nov 2022 10:17:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233628AbiKKKRU (ORCPT ); Fri, 11 Nov 2022 05:17:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53892 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233822AbiKKKQ7 (ORCPT ); Fri, 11 Nov 2022 05:16:59 -0500 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2051.outbound.protection.outlook.com [40.107.92.51]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0850D742F5; Fri, 11 Nov 2022 02:16:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=V6OCI14v7wX6IcdhfiqBvevRc0vDEpe7C8UhS4Qqhcwd2Jun5xm5l/AKaZifVz+YcIvaSN23OVL86Z1678ttYA4ZrGmCpBafPquzzkpbrZwUeOTXiebYUV/MH+ncjmHAZnbOMdL+jB5B69fP0aOJjOS9PRcGL+q6bj0VWxETWseAv4AF6MgAQ9rtsFBJFXyYRLEtKUNyGFl5EvmlNMgX/lOkaeCCCbpQAN71gZdOb9S24p978A6ykqTlyOsHbR+CpICxyAwQDa07dr/WMeqPmwUj1lkZZSPf3DhQmbszLxB7AJDDnPVAcrmOKo7REUt9W3fkEHOebMqiV8hrL54R0w== 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=UJargNSXfW7QRE1/1dEp9jA9DYhmUchTKoXMao3tsQU=; b=VK+ZVTmYbXL7ay3aJQeAiUFSTFR/l1JP6/QD0VVpqN9zKnPZpwa0v2PtY5YMfIXHN1nkBt4Y3t8huLSfLKl00+fKmnze6B2zguEhMviwYb4F4eqUZJaIrgSdp7wDYMWBiOxMmxI6drjOq5dUuZ1vcahuMjiQ3aJjbUS8iNkIcGd3xc8Z+7iHohnJ3HpEi5tEL8Vs9yp8JXI3hoswkSNby2Nt/H1f9YYQC0PFbIaUtoJx+d8mzvKo4Yv4twnkjKoMx6BIo+1rH6X5udzY5jZeklWg2EjrO5SGCa0k3tZ0yE/WqMbgJd3euy/nDwHmIbm+Xd13GUZPrlQlS7BTdGbR3g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=linuxfoundation.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=UJargNSXfW7QRE1/1dEp9jA9DYhmUchTKoXMao3tsQU=; b=MeRo+KZqOHgUbMPVYjzf2oZp0FtbhzcK5SMM2Q+5k1TsveputBGI5ZjbLUp1GlZJZmzd4R+CTmFJ6oZHXAwRb2Y0ZZHAt333Kaa+9T5NlF/F7RNbuERDz4xvRgG0YLRx7rppbFT6IMxmUSPXjtk02+EWzXlr96z9ypHUUZ7Efm/6tckgVYqkykpHxoB3Ry4TZGWF7GgFupA1PqEDVjmiHB6VTXWmD/8EJsBeBP+tsDcFmiiSnOWU5A+VrwNz9wA9iOcxkMDfDONLoKuobbHc5bZnpw0fDvfjt9GpJ+tbRj1+QKCZhXbLSOr6j+Q6gOFwHZ9XgBYTqEJBPxC8xbW9Wg== Received: from MN2PR12CA0011.namprd12.prod.outlook.com (2603:10b6:208:a8::24) by BL1PR12MB5125.namprd12.prod.outlook.com (2603:10b6:208:309::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5813.13; Fri, 11 Nov 2022 10:16:52 +0000 Received: from BL02EPF0000EE3E.namprd05.prod.outlook.com (2603:10b6:208:a8:cafe::a7) by MN2PR12CA0011.outlook.office365.com (2603:10b6:208:a8::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5791.27 via Frontend Transport; Fri, 11 Nov 2022 10:16:52 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) 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 216.228.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by BL02EPF0000EE3E.mail.protection.outlook.com (10.167.241.135) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5813.11 via Frontend Transport; Fri, 11 Nov 2022 10:16:51 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.26; Fri, 11 Nov 2022 02:16:37 -0800 Received: from rnnvmail202.nvidia.com (10.129.68.7) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.36; Fri, 11 Nov 2022 02:16:37 -0800 Received: from waynec-Precision-5760.nvidia.com (10.127.8.13) by mail.nvidia.com (10.129.68.7) with Microsoft SMTP Server id 15.2.986.36 via Frontend Transport; Fri, 11 Nov 2022 02:16:33 -0800 From: Wayne Chang To: , , , , , , , , , , , , CC: , , , , , , , Subject: [PATCH v2 13/13] usb: gadget: tegra-xudc: Add Tegra234 support Date: Fri, 11 Nov 2022 18:15:09 +0800 Message-ID: <20221111101509.999589-14-waynec@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221111101509.999589-1-waynec@nvidia.com> References: <20221111101509.999589-1-waynec@nvidia.com> MIME-Version: 1.0 X-NVConfidentiality: public X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL02EPF0000EE3E:EE_|BL1PR12MB5125:EE_ X-MS-Office365-Filtering-Correlation-Id: c8527019-35b7-4fd4-4b2f-08dac3cdda0c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: x2aO9h5yqQF6bx/8L1lHqDc7OMlcJmtF8ffPsFwNjovHToZ55qKlHRFx/2UjniZB5ny4HvOJ4zkwT9E9nURPdHL+SpclwY3LIWlDlPqdwxq2u6WRi307cb/Xkl26O8DRSaUykSbMAplNP1xHsgr7hZ4dhbJ+gADIr9wKVp32k+PwBsgn8fVWoJ2kmnxU7yM5H4wW7xYt424kXiw7lXFD8o/X/SkFy8xzGlolFQjXo/3USiwnUNK62+UNBER1xCgiXjLCILiWJJ5rjebtOgKm816erOvP10Ua0uD4fdxoRW2g8VsDYEKWVlxALQNIg9Y9UO4jEvO1hh+kNMbBoXpOKj/kmpMwBcFOtZfravtQ7BSEBjP/0I+e7V6wbp6bxRJ1LW4XozHMamNwTgaN1Cffg1xu9R97JLiPySel5hPbDRqZs0qGG//2cp+D/kAVzfz7fyoSk4kxlcj6VaMQS+qMoUAn0RCBT0BGCIRb+t7dPhmUvLbBvjNSGo9B1h9uZozSPRtacvIJTYBI+Uy1KLKesbMfUirNdcLCcQ6t5mGhJUBdoPyiKCGI6F9v7O3wiyI/QCZMigOaxPSHl/iq55y4oPd5MWQDUH+QkKnnZJUM5wM2JDQE8UoFcnS5PFWapaMmCnhdLccTBEs1iwsWJKcYGze/PAECZxsM15r7TZmMc564FvkIieJUSVyG/pb69FVubcypV7Zyy2ZB1QbOinBrePRUyk84Wxf/1qIMRwOa8gVKN6njIxdnyALaTZNtsf5I+gat4HKXsfQ7hpv2p8WyH1uKJLTAjmBzGVW36zEk7bU= X-Forefront-Antispam-Report: CIP:216.228.117.160;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc6edge1.nvidia.com;CAT:NONE;SFS:(13230022)(4636009)(376002)(396003)(346002)(39860400002)(136003)(451199015)(46966006)(40470700004)(36840700001)(26005)(7696005)(2616005)(82310400005)(478600001)(6666004)(40480700001)(921005)(40460700003)(82740400003)(356005)(7636003)(86362001)(83380400001)(336012)(186003)(1076003)(47076005)(426003)(36756003)(36860700001)(8936002)(5660300002)(41300700001)(2906002)(7416002)(316002)(6636002)(54906003)(110136005)(4326008)(70586007)(70206006)(8676002);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Nov 2022 10:16:51.8422 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c8527019-35b7-4fd4-4b2f-08dac3cdda0c X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.117.160];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BL02EPF0000EE3E.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL1PR12MB5125 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org From: Sing-Han Chen This commit adds support for XUSB device mode controller support on Tegra234 SoC. This is very similar to the existing Tegra194 XUDC. Signed-off-by: Sing-Han Chen Signed-off-by: Wayne Chang --- V1 -> V2:Nothing has changed drivers/usb/gadget/udc/tegra-xudc.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/drivers/usb/gadget/udc/tegra-xudc.c b/drivers/usb/gadget/udc/tegra-xudc.c index 76919d7570d2..ff697190469b 100644 --- a/drivers/usb/gadget/udc/tegra-xudc.c +++ b/drivers/usb/gadget/udc/tegra-xudc.c @@ -3660,6 +3660,19 @@ static struct tegra_xudc_soc tegra194_xudc_soc_data = { .has_ipfs = false, }; +static struct tegra_xudc_soc tegra234_xudc_soc_data = { + .clock_names = tegra186_xudc_clock_names, + .num_clks = ARRAY_SIZE(tegra186_xudc_clock_names), + .num_phys = 4, + .u1_enable = true, + .u2_enable = true, + .lpm_enable = true, + .invalid_seq_num = false, + .pls_quirk = false, + .port_reset_quirk = false, + .has_ipfs = false, +}; + static const struct of_device_id tegra_xudc_of_match[] = { { .compatible = "nvidia,tegra210-xudc", @@ -3673,6 +3686,10 @@ static const struct of_device_id tegra_xudc_of_match[] = { .compatible = "nvidia,tegra194-xudc", .data = &tegra194_xudc_soc_data }, + { + .compatible = "nvidia,tegra234-xudc", + .data = &tegra234_xudc_soc_data + }, { } }; MODULE_DEVICE_TABLE(of, tegra_xudc_of_match);