From patchwork Mon Nov 14 12:40:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wayne Chang X-Patchwork-Id: 624978 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 98F50C4167B for ; Mon, 14 Nov 2022 12:41:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237205AbiKNMlX (ORCPT ); Mon, 14 Nov 2022 07:41:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58686 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237199AbiKNMlW (ORCPT ); Mon, 14 Nov 2022 07:41:22 -0500 Received: from NAM04-MW2-obe.outbound.protection.outlook.com (mail-mw2nam04on2073.outbound.protection.outlook.com [40.107.101.73]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B3FB5E0DA; Mon, 14 Nov 2022 04:41:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JosmnGJiM4taEfkFf7cGsAery5Ftm81TZ/Py8yOeTxFtaIJ1HU9u6FWHaOtIPMJxpKex18GnXc0NRAp2kUo8KzjyY+7FhO/0G7aUa1BUKsY1hkNLy2a4o8yUV0NAHTlxH4SGYrjnHplwfNtWPPpGD79kClihPgXxaIIGigaH0/l5NretZsXRkbPJFAwxScl2orKtrEZsgo4QExRdqxLsNVw4RFEaGbqCsJUJKjTXuTg0ZIlmQuvx8GgqR053AGnOltJqB0gH3x0xEnQ5L1SfiLYl6Aj9ET750Y8Z1prnYWoJ85k3e+uHZ5cK3UrGx5cIAeTexmRCo+HjR/r6d0epSw== 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=wC7PggcLQ/knU3i8uFHc/uypunC1K/38YYFaYv/y4/Y=; b=QPZHwMJvRntIrMR8H/A0M/af4yMy1hUpC4tRbBKPpRUMG33/D37JrVX/qvSO0y1sp8c8ajMZnnpSuXKAgcwPvRN1XUxS1fJOZ0VdRwDQk7V3i0m385C/XHw4ZAp2u62j78jiWQbCcmKC2dQD6x9gjdlC1MOPetprdxagqUYpXDjOdWkdATlMUDW+aQQW8hu07DiQ3l4Tb+v51WjoDJyiB7sBAWJjc9NjvRIimGoYOcQh/TysOBweNchukNEKOxfBmIqsfYEnPLw15EJRcFZegWdEkrVUjLBhQdpIo9Fq5Ds1vZCQQkxePV/Pj1O+Sv6IpaMaTJe+MfUGExkE5gRhTQ== 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=wC7PggcLQ/knU3i8uFHc/uypunC1K/38YYFaYv/y4/Y=; b=khx0cSANUOKzg48/C+XHRFLKFNSeyHTzBuyICOPSk2RmiHfryhDe5MJx3D7ozEgqP9RDJkXG3zCwpv60DZ7JGwbkv87e9o1f089/v3zy+6ASlDYyzjbbsCACFBOF+wjcUgQxDSxrbLDKJ8bo7pYmZ1NqT1EBWLTuvyBCc7cwph0YXCIvDi+Gpy5Sx6Kqb8EpT/x8DKGbKtyMxpJaVDSdVPciL1RG5E5rzRdTrHJxRSXAHQh/oOOW8g48V2XsiD4D6hm0/Rv+/6QkDqi0K9pfABx/pju1CX6V18Jgs3PdccG4EoGFj6aL3gxoxHiFJPQs/X+uYYuppuoSC+JbR+0dcg== Received: from BN9PR03CA0268.namprd03.prod.outlook.com (2603:10b6:408:ff::33) by CO6PR12MB5489.namprd12.prod.outlook.com (2603:10b6:303:139::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5813.17; Mon, 14 Nov 2022 12:41:20 +0000 Received: from BL02EPF0000EE3C.namprd05.prod.outlook.com (2603:10b6:408:ff:cafe::62) by BN9PR03CA0268.outlook.office365.com (2603:10b6:408:ff::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5813.17 via Frontend Transport; Mon, 14 Nov 2022 12:41:19 +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; Mon, 14 Nov 2022 12:41:19 +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.36; Mon, 14 Nov 2022 04:41:03 -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; Mon, 14 Nov 2022 04:41:03 -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; Mon, 14 Nov 2022 04:40:59 -0800 From: Wayne Chang To: , , , , , , , , , , , , CC: , , , , , , , Subject: [PATCH v3 01/13] dt-bindings: usb: tegra-xudc: Add Tegra234 XUSB controller support Date: Mon, 14 Nov 2022 20:40:41 +0800 Message-ID: <20221114124053.1873316-2-waynec@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221114124053.1873316-1-waynec@nvidia.com> References: <20221114124053.1873316-1-waynec@nvidia.com> MIME-Version: 1.0 X-NVConfidentiality: public X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL02EPF0000EE3C:EE_|CO6PR12MB5489:EE_ X-MS-Office365-Filtering-Correlation-Id: dc2c948a-6194-4881-2447-08dac63d87b7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: KeJMJ5cqXbGUuUS3f6OCOK5aGtMg+yIoTV1CtO9tIe9fUbXKyVHnQR7gmULcOIwiwRMSaogd6eQRkDgQwsCEWYCiAWRXkmM7l/5nl3lbR1EBTVuW33o8/sH36oeAE8u0G5AdkQJYTqclMHyikuWvjCiR1sjoSFSpqEwjFfNeuFKjrfWzUyRNOTxKtuCzjdt4mrhvqCEAymadAdCagbDoqC/Zbx7IcLrBC9jBS3akI1Ye8mXprBBCDl6tH1qGrDdWazo16LeOE4DsFcU156P1oqwlUqARW2pAGeL+eFGJ7/20CFv4eIwoSBavqDtv17R2Ej9k02MN5BQBmJREEDeJgZwWiwnjQylWDQ+2xGgG//0fFJkxYfvrL19AMw87K+Btz376c4dGuRTNTix+lU1Zk6PhWhMIVqVrWgB9fDBt4Mwy6RwVR0WcRnXT7sNqVjN+8yBV7gfNoB3qdj/lrFHZR+srd5RjP9n+Jm78ijvChzYhEvJBiE03SwxQwrw1FdL7ocPR6l+m/WT5c9qfjFru2lums8nHjAhf+42m3Wrb8MPhKOR6Bq/88JkjhzEdhW2xOX1/B6cZFw6tN9wP5D815trp85ZqGSDxAviCFQKmL7NlF+S6/qpoPnNOrQXvqMqINJd8qqos6eVICTZzYMn9gFiWozJYmKML1v2w5Jq1ijaCPnYqgHmW9FoRPjNS9N8WC0bPwzmb7HwC9Fl3UHUgVjwisU87Y+98WjPrVqf4o7YBYAeFZY/XV6nT0byUjJQWZ0CdxzwNZw2Al3kNaWVn6O2B2HJqIv8g9FZUt2PMt6o= 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)(346002)(376002)(39860400002)(136003)(451199015)(46966006)(36840700001)(40470700004)(70206006)(2906002)(7416002)(70586007)(5660300002)(8936002)(8676002)(4326008)(41300700001)(478600001)(6666004)(82310400005)(36756003)(2616005)(7636003)(356005)(1076003)(47076005)(83380400001)(26005)(7696005)(426003)(6636002)(336012)(110136005)(186003)(54906003)(316002)(36860700001)(82740400003)(921005)(40480700001)(40460700003)(86362001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Nov 2022 12:41:19.6546 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: dc2c948a-6194-4881-2447-08dac63d87b7 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: CO6PR12MB5489 Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org Extend the Tegra XUSB controller device tree binding with Tegra234 support. Signed-off-by: Wayne Chang Reviewed-by: Jon Hunter --- V2 -> V3:nothing has changed 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 Mon Nov 14 12:40:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wayne Chang X-Patchwork-Id: 624671 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 1C149C4332F for ; Mon, 14 Nov 2022 12:41:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237220AbiKNMl0 (ORCPT ); Mon, 14 Nov 2022 07:41:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58730 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237212AbiKNMlY (ORCPT ); Mon, 14 Nov 2022 07:41:24 -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 B8C29E0DA; Mon, 14 Nov 2022 04:41:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CsQXLvU0diBDA+agxqeSel4hUL2BVFli1FWwcAfkb5iooPkstEbYfRqPWAt+IiN5+CpUXIS6vSuCUwbg2B5W3YJGtMSwaJfWAZ2Kfxyw9c3VUkIU23K6HCqKiPk+8mt4Fj7aC3NOgjLGCqXAmyyhOTZd40vJesrYs3RU8jQgYOvrpbhRpNe9/bOrFVvntjc/wrldF/MNOCwUOQM4BBkFWc3+egK/hNq3QrnSNAKnex+tymcLi/9bFTYW37MPAm6nWD0BYYd2jkkaWB9FSD7Ky1yIW+64BFzO8BrorSOp3ORQ+EE93h8Taj2JMdXU8U6/tn43IwaSaMliglY+JU5ZBg== 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=i14052cemxdsNgWt/KEXP2FfebpooznZIeQjObVBvFc=; b=h+Ky+f6Je56U5gRzKHszmr+zdoIRU6SBogz1g2kOODeIl7WOuBRC7aewS2xmiAQoIxR4ReFyZxNsU7eTzUq6gpb/SJeSVsiNw1u0y+Z4ti2CCNntvNFASzEjj31zY6zj0lhzG/lkvQNCN83cXsdkIXDtV+erUDY/rPf2ytQnsxdI+vpcqysxBnW2bcvWv9+8qUhYARIKfF1FwCiSEzMJ80wb4RlSTS1pOUReCMZFS4aKKM5vKRFcqqncCnsj9fpjQ66aVhAG4VnG+F44fH/6poq3D54lcGER2TUUiUPvMjML1nxT/E3r+Y4WarCvwjY9xJuHLshF+BxluVJKwbCOWw== 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=i14052cemxdsNgWt/KEXP2FfebpooznZIeQjObVBvFc=; b=e2WDxOrVrdTnTEtEoaHhk3YpI//qXVTlopbgXy5qNNYQXm0zFCTyyPVAvqWQ6QbWGWgzU1UsDCVrc1/AFEQIC79jLpuI0wUUyAZ22+wMT6awfEEutc4ipKwGsWZ7Iy94pQWwSJCdrmce868qrii+GwJgb9lRixRm7c7K7BMcdsjt47lbcdJt5QMjruUpo9vPLdCurS8laZavvcny3I64eab85YSKikuxDpPZSCAeiaslwTwYAOcTUzdcmkGziProwfBVKXOpz743u4SWgOcsXRSe04HnRUwA8AUZ6WkIScwVX5k+hqs/7cwepCZ+z8fAhKp2ILGKfIZ898Ybw+N2HQ== Received: from BN9P222CA0020.NAMP222.PROD.OUTLOOK.COM (2603:10b6:408:10c::25) by BL0PR12MB4898.namprd12.prod.outlook.com (2603:10b6:208:1c7::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5813.16; Mon, 14 Nov 2022 12:41:22 +0000 Received: from BL02EPF0000EE3D.namprd05.prod.outlook.com (2603:10b6:408:10c:cafe::ff) by BN9P222CA0020.outlook.office365.com (2603:10b6:408:10c::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5813.17 via Frontend Transport; Mon, 14 Nov 2022 12:41:22 +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; Mon, 14 Nov 2022 12:41:21 +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.36; Mon, 14 Nov 2022 04:41: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; Mon, 14 Nov 2022 04:41: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; Mon, 14 Nov 2022 04:41:03 -0800 From: Wayne Chang To: , , , , , , , , , , , , CC: , , , , , , , Subject: [PATCH v3 02/13] dt-bindings: usb: Add NVIDIA Tegra234 XUSB host controller binding Date: Mon, 14 Nov 2022 20:40:42 +0800 Message-ID: <20221114124053.1873316-3-waynec@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221114124053.1873316-1-waynec@nvidia.com> References: <20221114124053.1873316-1-waynec@nvidia.com> MIME-Version: 1.0 X-NVConfidentiality: public X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL02EPF0000EE3D:EE_|BL0PR12MB4898:EE_ X-MS-Office365-Filtering-Correlation-Id: f1e6182d-4c2f-425b-2017-08dac63d88f4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: XTBY/wz16qjyW3JpyjnYwpjJ1XkNcTQj05+ncnQ2HkAgu5k1nkcO/3TOUOKCPPgdNu1xyUl7Wuf0O3/RH9nN3dRj/HXRM1Goowa5mwamGdOV3esiqfGw46NiXv2RByswpmausZ9AKzlcuQElzQLKsjQQtoFuwLT1haRSH9PycREkaplAV6wLb0axG+8vrXiVf+KGs7RP/K4p7PvSQYSSgnRm0rQUP8PQvket0YWTyNY/gn0sfeYj011gp1ru2uVmaJnDg1EqpTrZz2wpSmtrfj8iEgd0nFwP+FMOFVgBG+VYqcz9Cj57CBvoYfG/PgTqcvxCsIYbLXez/fvSNB74qAWvu1gnNUQ8hoQWiJUrxUyz3Qh3Mvm/9Sd2uoccYcH4Pcu5CjI7mMGiLp9F3wH+/ETW1kN2jGGmjC2mLbebJ/S1nai1CwGC+SS7LUvDEf6MuQ3ul9a47Q+t2TBCQL1futSBY48nz7x1TTUaL9sFYOyAK5HFB5lmtkOwlpvUUPyX7HjWXlwbS7Z1ikbHc8qL5YXkKLtpvXAAU2v3me5Foh5w5cN6dh9/OYDVyc548eMPUXAWuP1r9fxLcKXJ7D0VQOV8C5Mo4IvMf74MrbVaEFIjDL+OTDmiQFr2+/e0YvJQ2LIsx5f4kjpVr85AlrYQenDC47VvZR470Y1i0iAHKMRxqAehhxv25NgifQvgk0f4yApAoHImC4L2TQxRy+XUC5FQAYUqNN/vnytN3lNJgTGXtZPj8uGSW6HoxlJbtBAz3x1RvLuxoD7G7cORTaPMuVcoi3W1Exs/8sUOWsBM/GkXQDuXu5KZ9/+09dmhAvTL+bOnn2xUXzWB4GRgOCYcuYciryqOvWdlPIZ+93ExX+GjdWslbJhSBJCba/rA09/y3IJIwWX0fZC1J1aByQFuymX+p2cezxPrvsp5ds02Xoc= 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)(346002)(136003)(396003)(376002)(451199015)(46966006)(40470700004)(36840700001)(966005)(478600001)(54906003)(110136005)(6636002)(426003)(316002)(336012)(186003)(2616005)(1076003)(6666004)(47076005)(7696005)(26005)(5660300002)(41300700001)(8936002)(4326008)(83380400001)(7416002)(8676002)(36860700001)(2906002)(70206006)(70586007)(82740400003)(36756003)(921005)(7636003)(356005)(82310400005)(40460700003)(86362001)(40480700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Nov 2022 12:41:21.7476 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f1e6182d-4c2f-425b-2017-08dac63d88f4 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: BL0PR12MB4898 Precedence: bulk List-ID: X-Mailing-List: linux-i2c@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 Reviewed-by: Jon Hunter --- depends on the following change https://lore.kernel.org/all/20221003125141.123759-1-jonathanh@nvidia.com/ V2 -> V3:nothing has changed but added the dependency here 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 Mon Nov 14 12:40:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wayne Chang X-Patchwork-Id: 624977 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 76461C4167B for ; Mon, 14 Nov 2022 12:41:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237222AbiKNMl1 (ORCPT ); Mon, 14 Nov 2022 07:41:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58754 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237218AbiKNMl0 (ORCPT ); Mon, 14 Nov 2022 07:41:26 -0500 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2087.outbound.protection.outlook.com [40.107.93.87]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1EDE023140; Mon, 14 Nov 2022 04:41:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oGAErK/GDitDEwHFkrLCsAyTjWK1zAsO/a410R1L38EUfIt5DqrVkCRW0T47QSyq/rDOq2tC0hlgv7hWsLmYp19TTwPL0iEenpCr/jqhGCKTP1Bxx9vrdPwPQrvyDigl4SL2u4es9cTmFT1D1NIrxC5o153o9qAsQgMkvNse12srPVjZNbWodAKZe+CE2AdTfATKbrUPcNhZQzd6jLNpKc/VKUzw+Z12HyetsVlf6xCXKhC6/cHjbVnsYAw6n8uKZtYrICgg1ZWY7fu1XIoxqSd5ZpKO3tbEuEDzmGnu7S5FaAFnOD8LWw0pjgtFaWEfu7l1lW3WnERIFW7iZINfjQ== 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=+vykaUhl38ejpm5d1sfh9J2G0Cl6HfQXATGaa/oT8ZA=; b=RuPGP7HTc61Pour7+gVs4JVsWRBre0i9AHZ+g5FPd45QfGpTjvG6fv4FaN8nWlU5RY4tES3mMZH9TFfhEM4WG9gcnMT8OvFzJRHHrea8MtXHavn7Njbt4TqxON5/LFBiY8v1Rah3ULqlgUtILReYutOpfuE+3QYhKmUFqF3Un3mHwQnHFXglUq3wgqc+ztLk04BmD+hPwF6BIilfVJFSXiz/Jo4AZBiZwBfd2JPy9QuG1V+MgQk/C84zJpA39xnUWczx0MjqDYkCWtMm/4Ll8wHtzalR4Y3zGbBT4i8KC50KipuGv/SXsmUuJ6/bI4q1E8ZkLI4o9BLKqDEe3m7jGg== 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=+vykaUhl38ejpm5d1sfh9J2G0Cl6HfQXATGaa/oT8ZA=; b=iTFwTDGQy0sFgzK7uabTOAmC8An24YI1HLc9SlFj9JLyb4zQM+jLOsKQHk72j7moyeQVob2Y7eCPyNpN1zX9McmA65KjoIbpE906yHQNvqUrEgjokYVz28wYSvGTwXdBkODcMi+lvGPQlWYQi7zlgRch3GnvI7iz4PDIOmlj/1PK6TfgNh6NGANHU9Ny6vmF6FLHHV45Xr2xVHGY3K/UbwK4wxY6O1+BSWOefPXdWCkp6O/q2EwQAKFpPtSR7q7gk4l4hlY9loSNFA9hfK2aVl1RlWHjw4i9Gx1L0XCrzwAgDdahHECuC8dIfMKzw3aW0Or+LgmwZbSh30dWloeNLg== Received: from BN9P222CA0026.NAMP222.PROD.OUTLOOK.COM (2603:10b6:408:10c::31) by DS7PR12MB5888.namprd12.prod.outlook.com (2603:10b6:8:7b::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5813.17; Mon, 14 Nov 2022 12:41:23 +0000 Received: from BL02EPF0000EE3D.namprd05.prod.outlook.com (2603:10b6:408:10c:cafe::a7) by BN9P222CA0026.outlook.office365.com (2603:10b6:408:10c::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5813.17 via Frontend Transport; Mon, 14 Nov 2022 12:41: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; Mon, 14 Nov 2022 12:41:23 +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.36; Mon, 14 Nov 2022 04:41:11 -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; Mon, 14 Nov 2022 04:41: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; Mon, 14 Nov 2022 04:41:07 -0800 From: Wayne Chang To: , , , , , , , , , , , , CC: , , , , , , , Subject: [PATCH v3 03/13] dt-bindings: usb: Add binding for Cypress cypd4226 I2C driver Date: Mon, 14 Nov 2022 20:40:43 +0800 Message-ID: <20221114124053.1873316-4-waynec@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221114124053.1873316-1-waynec@nvidia.com> References: <20221114124053.1873316-1-waynec@nvidia.com> MIME-Version: 1.0 X-NVConfidentiality: public X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL02EPF0000EE3D:EE_|DS7PR12MB5888:EE_ X-MS-Office365-Filtering-Correlation-Id: 63dbec14-5f6f-4264-4f1d-08dac63d89e7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: h2aHIYeSr82JKFR2mIxIudRYoomxjKJJIMPstNOyi1nv16xbJsW2DnJ1HvEzSaj5ASG8sFlYaIjeoEICvdyzN6RK/thRNz2CxGNHoYcQs5keDMp6OqfcIr/+B4owZK57LB6NW8nvbmUcDg6OwvWD6oSHqeUMV0DPSYSl8vb9gxZDKlxpF4roDjvmYoeP4mjQj4AixYcFi4X0nICGXpjfAGXIeeFM2HWWjjGuHs07RBTZriktBHELXbIYtUxTsxsXFzXPPPk/F4MtR9maM7yK1RM9z3Y3r00Ryc7a/iN5rCwh3EKEHv/ubeknpGJsT38XgztCsCIH9ov0EZcBII+SmVhLfmcQDzr+yg0AU8ZRT9kI2Tli1ia/2xNlXZl/XHyxl2D6NSo8s7gz597OYcgvrYLfK/wMMnC89TIN663pVjDxZB5GzS2jvhHpA0/SmGm2B9zxzEbh0LP0XvUwTjoIRISZCYqpFQpc684Fgrqi5No3A0gRAnIbfcHY2YLW+ALvcNE4XZd9AkhzqoZSk6+KuO5+g7aSfRNJuHy+LAfjqNeFmAa4i9AyIbGSRVeyLSvBg+sxiGMUIqxLiqtvUBLOAaApsJ51XeMuG/YLoXDFDs/eA05co75fFLwqiosljiiOm1JmNmCOgbkVLk1RyKJtKdz8gLRNPSdBy2U+MlbFmkJ5zSuuNGEGBZtL3g/OqHEYDBck30CpRrnojIOrXoGE3rrEci1DahnB51dt4gijRZ41W24UpZiJ5X6RD2OCm3xFdbPFr+wZu5/U51DlfgMeqM6wPYwpwZqSio0UL3wJrPK9L9sWb9XgVk+K0Z8qcAMQqc2BHqd6GL8V+/y1tIcwmVDliyhv7Bv0bWy97EWaLJAuKSQ8H90kOqkxr+htJcdhNm0Zjp4K4EfRSqdRdSjwCzqzmkQgWPrd2k5J6i4qi58= 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)(39860400002)(136003)(346002)(451199015)(46966006)(40470700004)(36840700001)(26005)(41300700001)(6666004)(7696005)(478600001)(4326008)(110136005)(6636002)(316002)(54906003)(8676002)(70586007)(70206006)(36860700001)(40460700003)(7636003)(356005)(921005)(82740400003)(47076005)(2616005)(336012)(1076003)(186003)(426003)(40480700001)(83380400001)(86362001)(36756003)(2906002)(7416002)(8936002)(966005)(5660300002)(82310400005); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Nov 2022 12:41:23.3414 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 63dbec14-5f6f-4264-4f1d-08dac63d89e7 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: DS7PR12MB5888 Precedence: bulk List-ID: X-Mailing-List: linux-i2c@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 Reviewed-by: Jon Hunter --- V2 -> V3:fix additionalProperties warning on new schema 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..854fe2f9181c --- /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 + +required: + - compatible + - reg + - interrupts + +additionalProperties: false + +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 Mon Nov 14 12:40:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wayne Chang X-Patchwork-Id: 624670 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 2ECC0C433FE for ; Mon, 14 Nov 2022 12:41:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237240AbiKNMlm (ORCPT ); Mon, 14 Nov 2022 07:41:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59090 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237225AbiKNMlh (ORCPT ); Mon, 14 Nov 2022 07:41:37 -0500 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2063.outbound.protection.outlook.com [40.107.244.63]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9BF46E0DA; Mon, 14 Nov 2022 04:41:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QvUuM41t1NuGO5DRjSPZhExEoi9z3WBC6jAwqbqP+2U0yizsJZRKJHcC4arlz3Xjoi0bKHrAqqSNn0J10s4aYamHVYULBEsyYtrFtdCLk2pIpFurm/kQGYYScAfEwJ7Lu/0a5bEivw6YwPrDLB9CCxIxEekKIhyQkPugZfRVMzGL9sbAmci5dt/JWRr7bqxdITXtQYwZTMXcCGWNxy0Ln2nYs6mU7x6ycY85UpKwdn5cC5JuzvHguLYYVrs+kbyFEh0FdnQ8HgR2CiXsPoRGXurlWy1qrNh1qW7YqwBxT4LLVZmJOtd9YGMZNGM5NMyMg5P6UsrqCYS+2aSXRTdpog== 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=nMdjjkyZ2lB7ieL1w7mC7cKeuUb3L+LXejfMAZo4Fyk=; b=j8cZBRn9PGP6OaN/IXIDOHPIMz8MLmg/iyC+yTj+wOLTRkSI7O1PEz6BD5qYIzR938SavpE3NKU4NkfrsmNW50lAXTR9QaDBQRWluzLxaR99Fe2Pu7+GMyYFkWHx/V4x5L1GgWG+IGlLg1j6Gexdw5yCF5vGbcUvADIHfHexc1feU602kmV7d3eHhvk4uZ76gkZav5qIQ2Rj6pl5OwmEymblV1Frl0oXHmvhEw+vEPTro00DVi4aGF+d3aHnrcuaYRNkeuXUh6GWWiKecu1S+P0MYoSvvH53ZzSVMfqDnFt0XhwMP2vnHXRPCTTlKExJQJs/G8nQBW6sgmHBaycnVA== 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=nMdjjkyZ2lB7ieL1w7mC7cKeuUb3L+LXejfMAZo4Fyk=; b=BYE5Xg+l7Hn9VtgfCXI2TQObElmeJIM57IU4r8hFCY11N6U8Y/0bXBj6F0gYVsL5ukhSPT93triajw3ypXDWIF5EXICqTEHQupolfGWCGl7bnHEi41pgsdOmFFw0FaeLCl/HwGKQvPoMNFo877TdQLgIeJZxHNOMR06Ch3zDq1y6SQoKSS/7dnrHPfugZtz3vWFFXig/gLX2L3b57JXjGI8aB7bRolVFgVPzc5JU7gO/DOE8ZZ/wAPRsCJj9DZDEmcllZsCQRmzvhaoIevcd71Y7lnh88WxXYYXoaemCrFh+dPG1Y20aIPVJ9Cr2bZXXMw1xbpRoG6n/Qx0Z8OMQ2w== Received: from BN9P222CA0009.NAMP222.PROD.OUTLOOK.COM (2603:10b6:408:10c::14) by PH7PR12MB5877.namprd12.prod.outlook.com (2603:10b6:510:1d5::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5813.17; Mon, 14 Nov 2022 12:41:27 +0000 Received: from BL02EPF0000EE3D.namprd05.prod.outlook.com (2603:10b6:408:10c:cafe::88) by BN9P222CA0009.outlook.office365.com (2603:10b6:408:10c::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5813.17 via Frontend Transport; Mon, 14 Nov 2022 12:41:27 +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; Mon, 14 Nov 2022 12:41:27 +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.36; Mon, 14 Nov 2022 04:41:15 -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; Mon, 14 Nov 2022 04:41: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; Mon, 14 Nov 2022 04:41:11 -0800 From: Wayne Chang To: , , , , , , , , , , , , CC: , , , , , , , Subject: [PATCH v3 04/13] arm64: tegra: Enable XUSB host and device on Jetson AGX Orin Date: Mon, 14 Nov 2022 20:40:44 +0800 Message-ID: <20221114124053.1873316-5-waynec@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221114124053.1873316-1-waynec@nvidia.com> References: <20221114124053.1873316-1-waynec@nvidia.com> MIME-Version: 1.0 X-NVConfidentiality: public X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL02EPF0000EE3D:EE_|PH7PR12MB5877:EE_ X-MS-Office365-Filtering-Correlation-Id: 65f2d97a-21d0-45ff-eb85-08dac63d8c25 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 1WcV0NcwdOWk/31owNUi0NlQLPNRHUh8KYjzSXUhmwJi/aDjlH8ujyusXMm4u7ErdEoVCelv2jIJVfxn4C/A1Bb3dedcYMpqaARZsvEVOFOJKrKxtN6FPRpUadzG56/y0LycOONdU7DqKLWqtEz22b/XpNAb1kV7cxYiS8S4uLLWvqshysxfVpnwIrS6ZtnTJzdTd/rBuK2gJ47h6eaWb4twFVyaVSrPBnB3j5qro3eHULRgPHGbwiHrX804Oh+hgA0aXntYmI/1WBp//FEqksLlz9f96RuC1JdN6HALLe4f01zdPt5NqNUk1LBBiPb15vrQLDuqFmqNao06E+kp3r7akI4rkGXX4gCcmLxdC4MIc4FIWMs6HXUW2MJvD6Abrgns7SrRPe0fJcCH7ceammVNHsSLPsuVmeZkgsKKFi8vd8kB1WGFWCNprk/ZOOIIfDMchcnbEradte1zu2IF2KSyo3NB2OuPpfBuGRZ2jpYndjLXESzq2ywVIVQIEMCDu7WqTn9GBzNCAjAvu9yX/RWRWqXlwTl6bOFVxvxitXU6fI+QDE1OE9KcVjvB0B+bUHY/a0jjq0aHzi8/JVY88k/feOTgrlhkbsN5uHH/ldI5fzR2OLLk1dhdXh2IVooPL5YxVv2VL2F6UV21MeX72uB3FHjjSV/SGR5hrmTnQN91T/QeAtnVm9Yq7OgXXY4kXp3JHhDxcwaBD/Ev9YyqvNb0I6yp/2OzSVfWr9DwGGtf40HoC2sTyZfWDJs6Z98KvLa7fOzwn2wQe2aLP1XiLdW8kk2QRcQ7scDNb+KmqcZyURiNtCDYxN5tjGaHgBFrHf0sDARPv3h38aRagdB02glM3ihWlQsVKdwZvaKsjlETZRykXAqkcWdR2qCTkH38 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)(396003)(376002)(39860400002)(451199015)(46966006)(36840700001)(40470700004)(82740400003)(82310400005)(36860700001)(7636003)(921005)(356005)(86362001)(41300700001)(83380400001)(5660300002)(40480700001)(966005)(478600001)(7416002)(6666004)(8936002)(316002)(70206006)(70586007)(8676002)(4326008)(54906003)(6636002)(110136005)(336012)(1076003)(47076005)(186003)(2616005)(426003)(40460700003)(7696005)(2906002)(26005)(36756003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Nov 2022 12:41:27.1070 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 65f2d97a-21d0-45ff-eb85-08dac63d8c25 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: PH7PR12MB5877 Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org This commit enables XUSB host, device, and pad controller on Jetson AGX Orin. Signed-off-by: Wayne Chang Reviewed-by: Jon Hunter --- depends on the following change https://lore.kernel.org/all/20221003125141.123759-1-jonathanh@nvidia.com/ V2 -> V3:nothing has changed but added the dependency here 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 Mon Nov 14 12:40:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wayne Chang X-Patchwork-Id: 624976 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 2CACAC43217 for ; Mon, 14 Nov 2022 12:42:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237244AbiKNMmF (ORCPT ); Mon, 14 Nov 2022 07:42:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59226 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237285AbiKNMl6 (ORCPT ); Mon, 14 Nov 2022 07:41:58 -0500 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2076.outbound.protection.outlook.com [40.107.92.76]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DF1A324F11; Mon, 14 Nov 2022 04:41:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TbG4vcI6+fYQLS8llk0Lr8SN92oUdJLLJWcdJ0KEDWOpzEZYeqYq1gPWtzZN/KGm18EnrP0XBW5QsmNLrCTmuSQ0X942HdM5caeZcSIUvtWzkNjgf6GNHwquxfz6V8aMBjNXbGa9lceX9b8TXm/zKTZr6J8KxZjYRDeQqpvK1og4r7Xgu3do+dQ0P2SIuOCbuLteZVfhlwmLOMYUhOFxCZypsZK1CYVEKKbguO12NMY3HNfpfEVkm7dlEc5KKtwKNaldTnDFbM7aAjIiXFtFScjsiulSdpUY331EkL23OYJx/GQ4ks1eesE2N7eEZlTrhCDg0bdV5qdvp9AlVcOcHg== 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=407wchOupEBkulV3GatXbklaGC8/7vbFfaXacf3duDU=; b=Mk6hGPI9+evcNxXA30eiNExmbO4ELBafGUZuwiS85U+bbmoEjDNGCQRYe1U0bhXK6vYZ5K7wKTzukl4vGgI/28OQGkTx4TKko2/datY7l82AbAK1JLWpiX58b/KUBvlSPEi/CAaX+7Nj6nA5kqaGTwRWuDyWcQ+6ekPBpIdG9h5iGXAOcsxsk1Vk//c+ckFP3O8RrhpStAf017sSAmdVK4ce/ofMcZEjbX0h3rjc4WhTjxhC/fZww9uPISYns3XJQ1tC2W3qJoycnbAHVE3AGJ757KFQ8bHjQFnVl3qhlz1l6rIIWQY1Qx012sVzUlaLdI2/DWjbkgM1IvlPaIwUmA== 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=407wchOupEBkulV3GatXbklaGC8/7vbFfaXacf3duDU=; b=L4PdkH4B2r+6UVwLXNncjLcKIeZlRLZcP/CZvlslgZd1S6W4aHcIp7g/0CqGza+/8X3flyo1Jg0WvgDU9z4UkLgk7tKC09aUmYZ4xWVVhredfo/2gh6dPVR9HrEEBUObNrIaWqpBJxoKGKN1/aW6wJ4VX7qA6fGMXMmDQHJ7xQbrPBFesMcC8t+G7pG74cEkAhLSEhE2svmErXnNn8TikxmqOkw+D0rP1xumLUIAsb1IOLyUhcrL35KlrLwwbqc8kl7JTGrMRQgctZfIFquzPGkvdhXIx6YHtQTGIXTXtz811ogFMfWj5KUYamGY22hIuirvDJdWezklXw7x+zOQfw== Received: from BN0PR04CA0172.namprd04.prod.outlook.com (2603:10b6:408:eb::27) by SA1PR12MB6920.namprd12.prod.outlook.com (2603:10b6:806:258::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5813.17; Mon, 14 Nov 2022 12:41:36 +0000 Received: from BL02EPF0000EE3F.namprd05.prod.outlook.com (2603:10b6:408:eb:cafe::f6) by BN0PR04CA0172.outlook.office365.com (2603:10b6:408:eb::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5813.17 via Frontend Transport; Mon, 14 Nov 2022 12:41:36 +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 BL02EPF0000EE3F.mail.protection.outlook.com (10.167.241.133) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5813.11 via Frontend Transport; Mon, 14 Nov 2022 12:41:36 +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.36; Mon, 14 Nov 2022 04:41:19 -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; Mon, 14 Nov 2022 04:41: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; Mon, 14 Nov 2022 04:41:15 -0800 From: Wayne Chang To: , , , , , , , , , , , , CC: , , , , , , , Subject: [PATCH v3 05/13] usb: typec: ucsi_ccg: Add OF support Date: Mon, 14 Nov 2022 20:40:45 +0800 Message-ID: <20221114124053.1873316-6-waynec@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221114124053.1873316-1-waynec@nvidia.com> References: <20221114124053.1873316-1-waynec@nvidia.com> MIME-Version: 1.0 X-NVConfidentiality: public X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL02EPF0000EE3F:EE_|SA1PR12MB6920:EE_ X-MS-Office365-Filtering-Correlation-Id: ba8b65a6-aa94-40f7-aaf9-08dac63d91ac X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: RkJMMQV9R8e20RM95irTHLb1SjvNfRnR1/DuJF72/prszFhbBH8oQceKhnTtcOu7F/3VW9zunY8qWlt+yklkyUkFcJ5XakMSsyE/98iWw/aWYflMsPz7PoEbMq93Rc+wEKXSfiZxaxLRK913NQ0THGYhiPQncsgKTzeuh8vt7rpSpAiu4yBvd4KK+zNDyy8ND2dnn44j8vnYAoUTp5F3LKF2GTFvAOWYNx+TnlD56CLcnaaqMs4YkcSTmau/bqL2/EFLnNqeOKQMTcwIoPo/8d/ithMTLONzvr0xddWzM4YFfrOm0bjmtP4wKURmnLKtOFsB68s8pptm76Cg1knRB2/pM8M5eAMUnvJnRh1h5lEVTiwq7hGL27qf5+EoODtFqZN+krh5KTbF2dnt6WYzNHDRLF6BJoOV2XOIV21VjWwfGG/gE2/goES46Kmj1JGVEfnqN9HFiUXhEFZWchqqAGbyJ2wKMUa+4je5iXtlTJIk6MYdodkd7+ch18FiQZvhhjimqx1eBulkMskcHbQK7Rbt96CWIf1SWVSHRsikKyAJg6PflAZ9iRXCzWW76F4ap4BcveDxm0kU4Uui50rN7YEkz38aJoCAYo8YHzA1s/l/NfmY0hhX7FtVCTJ/ZkQrEMktWTB+XUWV2uqHEovewhtPypavVnGe2R8OdEGcTBb79fGqz+cc7Yx/krHJaCO8elZQ7jlRNVxK02fltPsJKbpodLDhRR020yquFygm7aRbHL+F48/ECchWo9WCKQ6gqa+yKIM3NxU204OPNAQRSNjPnspf0hrFjn8cb6gvw6U= 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)(40470700004)(46966006)(36840700001)(5660300002)(36756003)(82310400005)(7416002)(2906002)(8936002)(70206006)(4326008)(8676002)(70586007)(41300700001)(110136005)(36860700001)(478600001)(316002)(6636002)(54906003)(7696005)(26005)(6666004)(40480700001)(426003)(2616005)(186003)(336012)(83380400001)(86362001)(1076003)(356005)(7636003)(40460700003)(921005)(47076005)(82740400003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Nov 2022 12:41:36.3632 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ba8b65a6-aa94-40f7-aaf9-08dac63d91ac 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: BL02EPF0000EE3F.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR12MB6920 Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org The change enables the device tree infrastructure support. Signed-off-by: Wayne Chang Reviewed-by: Jon Hunter Reviewed-by: Heikki Krogerus --- V2 -> V3:nothing has changed 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 Mon Nov 14 12:40:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wayne Chang X-Patchwork-Id: 624669 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 49B87C43217 for ; Mon, 14 Nov 2022 12:42:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237301AbiKNMmK (ORCPT ); Mon, 14 Nov 2022 07:42:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59096 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237308AbiKNMmA (ORCPT ); Mon, 14 Nov 2022 07:42:00 -0500 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2089.outbound.protection.outlook.com [40.107.93.89]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2B7B124974; Mon, 14 Nov 2022 04:41:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BzL8DT03RmQq7SxXm3I50or0bYPEGRNs9NCFpXpgIEvG0uMkC5rf5JOzsnnNsV1Ud3TxvE3NZtC8QM4mGkOSj5f3VVhe26uEXY6X6o8oo9FxcubYSN7wN6DKmESsw3PgCWm8LtrX9nkQxF16gID/EdLP4mry670NvtGdTlOZm6qKRrIuP6lqy1wGBjJE1sq79tWrGe2mZRJF6H6cv25TZbLFrA9aEhI1jvzQc0omwGWhJh7lUZT0c3dC3qZBuyLk6m3Rm/yceX5PL99IBvQ9cOS/Et3bZ755O2G8xFYfKugDicfhX2ZcKHYTbpV4UdEqalD0dv+EVuRV3nfUm+uOog== 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=Ac1hb7hGb+UtR5QAdzlK1+7+gx/JKPQdn3ZjopLB0Cs=; b=N9LWCHkbadt01Gb0qxBX3qGKV9CvrE/yes0Ky5gu51hUmYP4gX1bjpfuv1VJuHTfNIS3VpO43yhK/3gpVUrGa03SVZINzkCf2BqpLp6a3VFJYMD+TnFT/isrJ9xkC3yZ4kgK6Ie3RlcphPa15PRntCt955BJwm6h67NgYVp6LpfRe0OwmgakMBZTeI410x9zv4JgnI2a0vkHVxIzTD9rzilMiNSl+WAQaHWjmqp/fH+m/fFK8JinVfiZ5ni8hZ4Md+mpj0PqINQyRu9+teGNy4vVFGFgdHTslvKGM96vJaLeI8YTSf5nKc5178XEVSLWsThbDjq7zx002GnASGoFVg== 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=Ac1hb7hGb+UtR5QAdzlK1+7+gx/JKPQdn3ZjopLB0Cs=; b=hzvg4RyyZ5lSy1ufAnG6im1eNwdncOiojfYRHZ5gKXSnSDugSUaOXlY2LiIDMiiYeO7pOx+tXLiI54H6VooTyO9n/pS5aEHDdZB1MFqjXsC7JEc7rEJBCceTWc8d9Gje435C+cAlSGSHXSHShf3XzfhfWfg+otvHUTG6AN+ye86+I/aXJAoMH/rq9bdx1+fZ8Na8rkb7d0aB+FxISZ0xptlUBut1pZVNG3RlNX/Ftt79eystWmpoj+8WMKSwrGo+LFp9lcA21c4Aly8njn1GwvwaJKboHzBBzOBPjuPT5APgCqcjQLqyQEQKJ2L1xdGuApavMyV/begeVoF1hIP9uw== Received: from BN9P222CA0009.NAMP222.PROD.OUTLOOK.COM (2603:10b6:408:10c::14) by DS0PR12MB6654.namprd12.prod.outlook.com (2603:10b6:8:d1::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5813.17; Mon, 14 Nov 2022 12:41:41 +0000 Received: from BL02EPF0000EE3D.namprd05.prod.outlook.com (2603:10b6:408:10c:cafe::81) by BN9P222CA0009.outlook.office365.com (2603:10b6:408:10c::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5813.17 via Frontend Transport; Mon, 14 Nov 2022 12:41:41 +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; Mon, 14 Nov 2022 12:41:41 +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.36; Mon, 14 Nov 2022 04:41:24 -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; Mon, 14 Nov 2022 04:41:23 -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; Mon, 14 Nov 2022 04:41:19 -0800 From: Wayne Chang To: , , , , , , , , , , , , CC: , , , , , , , Subject: [PATCH v3 06/13] usb: typec: ucsi_ccg: Add cypress, firmware-build as a well-known regex Date: Mon, 14 Nov 2022 20:40:46 +0800 Message-ID: <20221114124053.1873316-7-waynec@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221114124053.1873316-1-waynec@nvidia.com> References: <20221114124053.1873316-1-waynec@nvidia.com> MIME-Version: 1.0 X-NVConfidentiality: public X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL02EPF0000EE3D:EE_|DS0PR12MB6654:EE_ X-MS-Office365-Filtering-Correlation-Id: d1011cee-8303-4bbd-2b0c-08dac63d949d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: YqNcFH87D9wXyUd1Vg6ck9k9N4wRjJ2T5Ld40AThEHNIIDjE6oBv5PL8phdE6A2/KKt5yL0pV2XYQhhupX/UUM9A7x3r86nnBklyyJ99931yYoraSs0Vd3JOCaBeTKyoU4kouoqqHfdO0W6VPv8d8EN6zK41WGexwlArOsHzkqZuvbpKYclVUKiQn8vQCePzMYIjl4dz+azNaGjGpeeV47tSgplidyUV5MDpuQ5dwES6pVNypNp5a4s9Qgp1IWyNAxEv1MJDhUx4KVVDk970Zo4neENg0L+YVJVI3BdytXYfWx9nFyTDer4Vi3Wtc+duUB3b+BH6yHaM1E74DSRNdRzxMJk0K91ww8GirmKiVjzB0ETgX+XQZR8GmySLmJIcQYvOOMOm5hlnxhXMsdzBIKRz/zlbO3JoUOlzU8bPt6fw6oeXAUH23xinyzgARjiTDrhTkls/rpaauHix7Ragar98DtOhQLFavzJu5Pcqd/Ud1lVG8FU7dNzu0+QZxNquFkjNSwvKtrD3e8YwO3/7o2CPtj2SKHTbhGIPdK5NdfIfZuYzXn7wbRwK0/npkOTxQNIbZshZLWpxnZOgvBO6VcDXSTNVB/sf6TTFKUol4awoTQnF0qai4OGwUgV92zfzrUS6CGTxQNZk8fl/6ejtCiaq0NXiv0MZc6M8fxc33WNAxWCD9PAly6bvMQD8gLcPtlFeiQVP183eqCNfXSexNIS5Np69E/J7HtP3D4R+JW6h8yi4YjseW7QeFopD0vs4qjKi8zNRRX96ygQWuMXzOiashRmnB7CW3mhRz2FqBbE= 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)(346002)(396003)(376002)(451199015)(40470700004)(36840700001)(46966006)(7636003)(36756003)(356005)(82740400003)(921005)(478600001)(40480700001)(86362001)(82310400005)(426003)(36860700001)(40460700003)(47076005)(2616005)(7696005)(26005)(2906002)(6666004)(5660300002)(8936002)(7416002)(8676002)(6636002)(316002)(336012)(110136005)(1076003)(186003)(41300700001)(54906003)(70206006)(4326008)(70586007); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Nov 2022 12:41:41.3104 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d1011cee-8303-4bbd-2b0c-08dac63d949d 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: DS0PR12MB6654 Precedence: bulk List-ID: X-Mailing-List: linux-i2c@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 Reviewed-by: Jon Hunter --- V2 -> V3:nothing has changed 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 Mon Nov 14 12:40:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wayne Chang X-Patchwork-Id: 624975 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 C64FCC4321E for ; Mon, 14 Nov 2022 12:42:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237330AbiKNMmV (ORCPT ); Mon, 14 Nov 2022 07:42:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59558 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237251AbiKNMmG (ORCPT ); Mon, 14 Nov 2022 07:42:06 -0500 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2057.outbound.protection.outlook.com [40.107.220.57]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 489A024972; Mon, 14 Nov 2022 04:41:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nDPOHgKvb+wZRNKqN43SVvlrqvPR1JJLT6hf8NcJJVaV+SqfxBDwuRBPWQEK8Fzh4iBVkTm3lM1yLqUSh21ZYEDw2H7RKehlyUfmBPF7qy1om/bGvweCxGg2C2HRedlg0I4U7cTTxrdRx4f8wkM62i0Kkz64Otp76PXTnmaFSWhAXrIlMb5Xzz63xvZvXlOxzbtBDh71BlkdCf9HIBR7UguYEM8Z+UbntQzVjmsrXFTEadO54wWd8s+t6J81BaTuWfUoybmEKNF+E+c7boC8FmyHk4jvCASV7IRVH+M7RsCM0WshoedraFLCaEOQz6hIhKQ+db+iZO5/1vjlA1l2PA== 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=YxyILnYsxSrvc4JMWMISHSXMJhOzUx5t+QeDFOk1jvc=; b=PAQMCPQr/GKan9/5XmiqE101NgkyqKiyr4ajnS7FfSKwz+oA6IyvvUr8qoYwZuvDPkYay+xeb6gOrbqzXmvUZeRx7SV4ovTu5H1JGXfGXtkLMTwzmbxzVcaLFJrNgpkfx4H/qN6C2l27AzzQ3r53GKFZCfv7rhlM0eo2z5UcoeMrrGEqwl9IJn0/jwhxJseW9xcSeCwb5oROmjasOoVr+aTpDr0dlQdjrbAAwbnxCBZDlEzvHRm3G9KAtzxmbXhIfz3Pg2BMZc1C2B1LIZ/RaonJu1T8VmU1yaLJjPYqf2khHeyUO0tOUH85hjNmcNb1iq5kqDoXsFQk1+E8Vnm71A== 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=YxyILnYsxSrvc4JMWMISHSXMJhOzUx5t+QeDFOk1jvc=; b=on6CoHd2r53BNR3kGIQK34ncrqgEpHT4zRWnYvuxnC7UcI7J1HvID6ZqmJ4RMT5DFPScO3nSVTc0J4FQkRSzbrJEPUkXZCvtsJnRNgXWDXmVtYCVlkE8y+GJTdxnwLo0kcJIsNgF/+pgupAL4m8EAfrLRm1KwRzCb4oa6MHex4gS4du6nff6Rl2kp9s6yP/rmAhXThXT7E5m+97mP0cUgplZOsj65nGR+kxRnmnZsSAKx22YoFJWeWFZjsG39YJOYuewp9XtLOpv7BqbqK2tI58WWGwAAD29AkSG86MqmO8iaDHm8ccyH2W0yl/BMZYXvf47X2PC2F+YoSy5fI+JYw== Received: from MN2PR11CA0017.namprd11.prod.outlook.com (2603:10b6:208:23b::22) by BY5PR12MB4035.namprd12.prod.outlook.com (2603:10b6:a03:206::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5813.17; Mon, 14 Nov 2022 12:41:44 +0000 Received: from BL02EPF0000EE3D.namprd05.prod.outlook.com (2603:10b6:208:23b:cafe::33) by MN2PR11CA0017.outlook.office365.com (2603:10b6:208:23b::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5813.17 via Frontend Transport; Mon, 14 Nov 2022 12:41:43 +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; Mon, 14 Nov 2022 12:41:43 +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.36; Mon, 14 Nov 2022 04:41:28 -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; Mon, 14 Nov 2022 04:41:27 -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; Mon, 14 Nov 2022 04:41:24 -0800 From: Wayne Chang To: , , , , , , , , , , , , CC: , , , , , , , Subject: [PATCH v3 07/13] i2c: nvidia-gpu: Add cypress,firmware-build as a well-known regex Date: Mon, 14 Nov 2022 20:40:47 +0800 Message-ID: <20221114124053.1873316-8-waynec@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221114124053.1873316-1-waynec@nvidia.com> References: <20221114124053.1873316-1-waynec@nvidia.com> MIME-Version: 1.0 X-NVConfidentiality: public X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL02EPF0000EE3D:EE_|BY5PR12MB4035:EE_ X-MS-Office365-Filtering-Correlation-Id: 2b31956d-f942-481a-e02c-08dac63d9615 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: re7hmNyyxm0JN1+LIeHNKGjyBESl0nXr+hh3B+HULFsJjd4/u52OLCeseoG4HVynmLps5bWZKEjY+rLI2nhpMR07M1tX5zm4R9YNSDa1466ZvD4KiZXO9wkG9tnG1q7noP5XxFGNi9Ul1WdP3g1GU+twJggrpR1WMhI+veMP0ad8QeCeXMt4ldfxvgoXdu0UEk8HeRsxYpQhu7TZLdypRwhfni/Zw/tnE01HTOXsQ9L3zYzuEYvnyTVYRHKZnha1idGKlkYVSjLgpVbiJHWEc9urXQF66Fsc5MYACW6CyoeSF1ZhyugASFKBEScw0gHjn7q4bI9afBeAocYrCFXapaHxQkZm5K7XXfCH5gRkq1rXrWYnogC1A619qAOqb8FiOfEVplnhbeRbE5FxtnOTl0QnDnqCZd3B4mlVFtzxKKAoQtQ9uiKBfA0w1pco58b3LjGaFxaSXO50/gR5O7W1fsNdKysl8o0W6GWD4u5ynswRAX8T1yptXFqa3qlN01Pz2frGaznw4fpvwikm7kfTbuR+egXSnpO0fP633wC4SDkhd33zYwq3sc2M+0jI0YIdmei9c5BJE2CzHaMHhszd2uPBCj/9v2KwaCqvur7KDsMLWknBxxS5B3qmc6RCRX//7zDwjIGJw8sVly8veWMtGJyhfxVtmqFCeboofMb8lC0zJY1m+KEpxEU1VKhPJpfOQmYSdbe2Y8E9AHoy2LKwlCWAjnLcXyvhvEX5bcB/WMopfa7sprwdy9n5N9f9lgaMHBDzp8BCRE55e5bhul2UTVbtWpVHdBWB6dVHmT2DNFg= 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)(136003)(39860400002)(396003)(346002)(451199015)(36840700001)(40470700004)(46966006)(6666004)(921005)(478600001)(54906003)(6636002)(7696005)(110136005)(316002)(70206006)(70586007)(336012)(8676002)(7416002)(1076003)(5660300002)(186003)(4326008)(26005)(41300700001)(36756003)(8936002)(40480700001)(2616005)(4744005)(40460700003)(82310400005)(356005)(7636003)(2906002)(426003)(47076005)(36860700001)(82740400003)(86362001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Nov 2022 12:41:43.7636 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2b31956d-f942-481a-e02c-08dac63d9615 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: BY5PR12MB4035 Precedence: bulk List-ID: X-Mailing-List: linux-i2c@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 Reviewed-by: Jon Hunter Acked-by: Wolfram Sang --- V2 -> V3:nothing has changed 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 Mon Nov 14 12:40:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wayne Chang X-Patchwork-Id: 624668 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 09AA8C4332F for ; Mon, 14 Nov 2022 12:42:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237251AbiKNMmY (ORCPT ); Mon, 14 Nov 2022 07:42:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59100 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237276AbiKNMmJ (ORCPT ); Mon, 14 Nov 2022 07:42:09 -0500 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2051.outbound.protection.outlook.com [40.107.243.51]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 14DBB24BE4; Mon, 14 Nov 2022 04:41:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aWRtIPNYQc3SJZ/9CupoDUW2Kv1d3K48DjwxeLqrxfu8R9a6HQvE/CnfXJO5B/3mUzMHa86rxPYgQErmi7JNx/VKikSLXx47KlyoQRKUpWetLldEWRpSLNRXkRDMkdZdgcIWmLzdagVqwYp13uSmjkSUCDDTGJ4Z1zQwIZvMlo6Qz51qdAEnieEdM0d8wIDXCa7SlZNcdScQlKGJ6/ejT6tnFwyx95sslqOzT9oNlmH66fMPYojCtuXx6UnSDEYC0kJzU6TxXwgVd9vd9OCBonNL5DKqPtgK2xf4DeebRbypAdTxHNNXwQGHISGXUYdt596bzmlr7BRoE4x9w3xn3w== 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=Mkg31uWIczzVSL0IZ9K9htk3BSJGDLuIyYuIp/rMne8=; b=NC8liv9P3fXllsrBLDItGZ6m/TlvhC9wrliXBv/vslMJXvkNNkEFqwLuKTBGMpKwKKaJOWtxSBMw+iuZbm7gmdiYoNdiS3R88rjk9os0q4MaMNorn6mM7i3s8GvttpDCV2mtARFZkRESnj1fA5BRgfUcVZapojBHbr5yEVfJ82K0HpSk4MW3jGEXPrfqlZdLSsoamOqHtck8boacSNBt9FvHuqpvkk3ggVy+EIKDvcBibqYToWBvGBI88amP/MOG/beuoOWNghsV1FzShNs6YOEjHD5JrleYVBM/h8rPd6rwmZW9nyq711IELXKYH1UHsv47+D2i1Y26kN6Nzov4vg== 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=Mkg31uWIczzVSL0IZ9K9htk3BSJGDLuIyYuIp/rMne8=; b=uom3uuplX3zE0gAX7ZoQVZR4ME4JApRGZufU6qiWNyNzZER7P3BG1RHanOInumVuYo6+/qKPX7IkxOk96jFSINpXo6g5xoOfvXOifHpTJI0JO6tYefXWqlnxHGtL24FqTnNvx3VXMIo2xFTG1PWHCg5H29ecFvg7DGk6JpG1sKZBca+vYmWKhQ+rsEUXyyOykw/0x2hLMklV6p2TbfheRITbHkAPy/Ca6b2hl9Ogt6CoN1tLyovZcsTesAzxqxz0pDaQM3eepMc+pIKuoC+oSxm6mqEQ4LylpIEls7EM64TQLBN6vpV4giDLKnaDlCVN5soSZkw3TRTAuFzPMrkquQ== Received: from MN2PR11CA0027.namprd11.prod.outlook.com (2603:10b6:208:23b::32) by IA1PR12MB6233.namprd12.prod.outlook.com (2603:10b6:208:3e7::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5813.17; Mon, 14 Nov 2022 12:41:46 +0000 Received: from BL02EPF0000EE3D.namprd05.prod.outlook.com (2603:10b6:208:23b:cafe::c1) by MN2PR11CA0027.outlook.office365.com (2603:10b6:208:23b::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5813.17 via Frontend Transport; Mon, 14 Nov 2022 12:41:46 +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; Mon, 14 Nov 2022 12:41:46 +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.36; Mon, 14 Nov 2022 04:41:32 -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; Mon, 14 Nov 2022 04:41:31 -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; Mon, 14 Nov 2022 04:41:28 -0800 From: Wayne Chang To: , , , , , , , , , , , , CC: , , , , , , , Subject: [PATCH v3 08/13] usb: typec: ucsi_ccg: Remove ccgx,firmware-build property Date: Mon, 14 Nov 2022 20:40:48 +0800 Message-ID: <20221114124053.1873316-9-waynec@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221114124053.1873316-1-waynec@nvidia.com> References: <20221114124053.1873316-1-waynec@nvidia.com> MIME-Version: 1.0 X-NVConfidentiality: public X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL02EPF0000EE3D:EE_|IA1PR12MB6233:EE_ X-MS-Office365-Filtering-Correlation-Id: 8cab6a70-c72f-4954-80fe-08dac63d979a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: cxyhOrw8A/c+p+li8J3fdIGKM6AQ+ibhhKIVAQ2pvVpGJad8sgzfRYlKoJ0pSKPXNiEcwqrFx06+S8SKLEOkXs/FR+0rgbJKnfjoB0zStNIVLV6bulBOOPkwz4Cd9jbRwnxLsMgKazxAvs8NAYMsQPv9Q1eHDHwL3oCGAhB2MM23YG3QDWqY9Yz3QlsJRfZca/1DvAu4p1DUjuudyUKO1AFGvFBjxH5owpKQbv0gjN783G1A3ywSS1V0kPvs1bTTD3D5b4u5eK2zwJy7Gln1jdpfVN97RzwbeBXgzJFC4Tc5Bd5pWyOBlun3ZCSaNGZaeT1GYXL2Ylz0jXSbnbrVjRipBoFPELz+CFnE8ityyozsYD9nT5l356+z7t709lKfxFPKuE1Cvwyh47dVwWGM/Zn0wB+kljMhQ1ridW6lrgBYM9fA7usBShJjATiDRpx1taJcKA5yr2NrE7p/bgkwajJWXgRlI9Rx2Lem7tjuUfoMmaPUwAADd6Uqj+I0nYr+D1vPizDv2M9aMVsV4OxbvJ0dlC+2XH0JXjepIPXsuzIL96Cj7lD2dvCCPRgC6Qv0UDzAE7Y/7IxD8Og0pYk4YXaqO7tDzP3GyYby+OLnMiFW0sPmjPcMyiPAi1iittxY5zAUynolArXB1n3oRkHC2ZWkhtfuf2b9GWL0HiUjjZMQfNAACXRHS7bVrV2k/bp5EdyrXBCy4YlUhRqzuf4KYKMJvcwxcWcPqwOVInoiGriUD/PKOmBIOR2i+oR1O6zuec+xY+DJ/bugabPTDtx7aJ0joo2LE9a7dnWP4H1oTlI= 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)(396003)(346002)(136003)(376002)(451199015)(36840700001)(40470700004)(46966006)(4744005)(2616005)(356005)(7636003)(8936002)(82310400005)(478600001)(7696005)(6666004)(6636002)(54906003)(110136005)(2906002)(40460700003)(316002)(40480700001)(36756003)(41300700001)(921005)(70206006)(4326008)(70586007)(86362001)(5660300002)(1076003)(186003)(7416002)(8676002)(82740400003)(26005)(83380400001)(336012)(47076005)(36860700001)(426003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Nov 2022 12:41:46.3261 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8cab6a70-c72f-4954-80fe-08dac63d979a 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: IA1PR12MB6233 Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org Remove the property ccgx,firmware-build as we have added well-known regex cypress,firmware-build. Signed-off-by: Wayne Chang Reviewed-by: Jon Hunter --- V2 -> V3:nothing has changed 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 Mon Nov 14 12:40:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wayne Chang X-Patchwork-Id: 624974 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 05E11C4167B for ; Mon, 14 Nov 2022 12:42:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237364AbiKNMmZ (ORCPT ); Mon, 14 Nov 2022 07:42:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59230 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237284AbiKNMmJ (ORCPT ); Mon, 14 Nov 2022 07:42:09 -0500 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2064.outbound.protection.outlook.com [40.107.223.64]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3FC2D24BCF; Mon, 14 Nov 2022 04:41:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VSkp8C+ZMnhaep94sSCS3iQzoFQdaE5IodFc1yYkqprYDVUx1l0imjtnX/M5XAfwi2xgAz9cWtNaX5fVkZUy7B9K8iN9BuvQ8qj0eGdaq6fPCwK9DJEOqrMyDbGy6026lxvDbtE/Y+iefN+dDjc3V6H6f9J6Ko84APhdETVphz8GlmGzNd9TSf+3LpLlXuNWU+qmRWOCLjz54/XWUzSuzAwIeyxZ5kFCXSBMHCbxeWAe8O7Z2XDCdQ1M+z+JPydF5Bwl7Bi81e/82/zvEIhYpeMLTL3Yx6MFC9uvOihS/kQo+1GIJ1vew1tN4mE20wrWqa5qtOadWOML64ylHdyvKg== 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=NsWrOSe/SMOlTl6vvAtIpgAN/lbrhrVEDUZ18tNcblw=; b=HL0/rXXPpXXsn0K2W/FVQzCsFSXcWOo1vWfyubMf/QX6FCiTe2u/eN54I3ocdbV3Ftf55C80jrr7BCU2/dt0CMFkLIqazGgtvU4OdpaSFtPzNQieHnWGfQOLIbqb/VHCUU7Pe9eLac1q9GrKPuxqqFLW29v6BGqRt1MRIEho9Uu662KTCfB4Pk7S85cyKXl68/53d0MXPc39H1pZ+p9VRIQMS3dpXUdgQf05uhtFtU0Ayc9OpZCX5CbqY/Siida0GxKKKrLX05Tcmj8b1UkB+BW7Qkq3R46VSNm9dJsnLXHhYNVGhE/VPTuPRZBI0btqbcUY2ugrdfx5a0YNX0vn2g== 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=NsWrOSe/SMOlTl6vvAtIpgAN/lbrhrVEDUZ18tNcblw=; b=eY3kzhTJgY4IJai55PfG3nQA1oBLcfYuNFXK8UF37/ln3ktY/3gAcyaem5kpnz7HsyUSW9tnx0Z/jomk8EHGxvhqubDaCJ1jpqStkx3CqxfwFdGK4xAq0ukakulcC3sFox3A3VZeCXdOMg/I83ZmrYfSeaCjirrZeIBfXFuH06ScJwRmJ2TpH85VWXGZ6bTpBA6HBKtRMBBrwYNsEywRRmP/nHQrKjLfynR1Apa7X0O3lGlbsPGNrq+u5XO8e3fjeB/3TH8ZfHeKWhqRxKMzHvb4/gDL3uRhlFP06OIvQXR7vRGxjTYJ0B7+0iJyPUO+lgVxuJ2rH5neogPVL9alKQ== Received: from MN2PR11CA0016.namprd11.prod.outlook.com (2603:10b6:208:23b::21) by SA0PR12MB4592.namprd12.prod.outlook.com (2603:10b6:806:9b::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5813.17; Mon, 14 Nov 2022 12:41:50 +0000 Received: from BL02EPF0000EE3D.namprd05.prod.outlook.com (2603:10b6:208:23b:cafe::32) by MN2PR11CA0016.outlook.office365.com (2603:10b6:208:23b::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5813.17 via Frontend Transport; Mon, 14 Nov 2022 12:41: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; Mon, 14 Nov 2022 12:41:50 +0000 Received: from rnnvmail203.nvidia.com (10.129.68.9) 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.36; Mon, 14 Nov 2022 04:41:36 -0800 Received: from rnnvmail202.nvidia.com (10.129.68.7) by rnnvmail203.nvidia.com (10.129.68.9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.36; Mon, 14 Nov 2022 04:41:35 -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; Mon, 14 Nov 2022 04:41:32 -0800 From: Wayne Chang To: , , , , , , , , , , , , CC: , , , , , , , Subject: [PATCH v3 09/13] i2c: nvidia-gpu: Remove ccgx, firmware-build property Date: Mon, 14 Nov 2022 20:40:49 +0800 Message-ID: <20221114124053.1873316-10-waynec@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221114124053.1873316-1-waynec@nvidia.com> References: <20221114124053.1873316-1-waynec@nvidia.com> MIME-Version: 1.0 X-NVConfidentiality: public X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL02EPF0000EE3D:EE_|SA0PR12MB4592:EE_ X-MS-Office365-Filtering-Correlation-Id: 600bf050-b26b-42d6-18c5-08dac63d99f8 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 3N8muepydJfeiIMnNQLlQGJiTtXNIQQx3v0/F3DfzSGqNSDFUZnqp62iXeXYyZkYDeWDDIoYizWbWuYhH4wqdrRVHLG4YpdZ7Xp015VzqeDf2fm/kuCggh93eR5RHz+IAYpHB7hphLERjNkyAEJvCCZI/1PDwIj+1AoeZDiYTalHLs2KY1MDaRlruGL6MxFy1x1KapSHeFKDNSv0C+Z26xz2ysohYloe7daL/BfZBWCk8wd0h2LiQnYf/8gjKYLOEnHbnpkLv5kuYObFIbXqGtU/8OlpyTK1i6UbuNWyJ7hmCIsZ+ZYE9NEehRUFKIsoTIkVFNzBkbD6XURNWEyeNmoXkzMO9oe2BUH/Opjg+mtNIexGK8xpLAeK01kVdfDZB4+nEkRe5GKBx4cG4pXol1xsXlrEyZmjwPv0r4t05qbdJzuPtg0bQueOp2aLthqUgEj8qYXbe/R/JXoM8jcRsM9ECK84dPICCKFCBDxHZ4UktyF40yOvemzqHRdKf7KP1yGRuxaU44LbhU5HiEqpd13G1wbVgi6ZlvbXfKkAkiCybN6QCgDOv4xItSJ46Hiieg6O+AS0wWQYe3LgHU3By9dwE+mSYE3db5W3b2tpWLKZD6UMGJCy/RB/nhQKLudMnrZnpi2N7C4YN2g0GU+uuMuMD5HJFvhsbsuPd5sPPnF+3otLQkyKGDXX9k7qnelsyMfST97VahaTV3ppAr4lRNZVae/7U8YZ6+G/g95mFqHkhjNEYC/0r3wdXLFIBYNInpM/lTvqQaDOGyKW853+sddMZDYYMO96Xat72ow7wsg= 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)(136003)(346002)(39860400002)(396003)(451199015)(46966006)(36840700001)(40470700004)(2906002)(7696005)(2616005)(316002)(6636002)(54906003)(70206006)(4326008)(8676002)(41300700001)(83380400001)(40460700003)(36756003)(70586007)(336012)(26005)(5660300002)(7416002)(1076003)(426003)(8936002)(47076005)(186003)(82310400005)(4744005)(356005)(110136005)(82740400003)(86362001)(478600001)(36860700001)(6666004)(921005)(40480700001)(7636003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Nov 2022 12:41:50.2793 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 600bf050-b26b-42d6-18c5-08dac63d99f8 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: SA0PR12MB4592 Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org Remove the property ccgx,firmware-build as we have added well-known regex cypress,firmware-build. Signed-off-by: Wayne Chang Reviewed-by: Jon Hunter Acked-by: Wolfram Sang --- V2 -> V3:nothing has changed 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 Mon Nov 14 12:40:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wayne Chang X-Patchwork-Id: 624667 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 1195AC4321E for ; Mon, 14 Nov 2022 12:42:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237379AbiKNMm2 (ORCPT ); Mon, 14 Nov 2022 07:42:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59098 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237145AbiKNMmM (ORCPT ); Mon, 14 Nov 2022 07:42:12 -0500 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2058.outbound.protection.outlook.com [40.107.94.58]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 24650252B5; Mon, 14 Nov 2022 04:41:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Copy/L1/+uzgZQ0OY7EQFcCobfDY5iwL7SfKa2P+DtEEdhn1A8AIW22sX99s8KcLkhwJHRrcGc+x7rYAIsdt9stQo6C3A086uljYzuC5zYcFPEqmZlnod0GdRVpUHkcab8d78zfbELc0PKAbyxUVghdHsyhgoE/T7BmH1dNqQc237BkCqyaeWHm5/zWbIpgms11y98hKGPPTvtDShygWPE9gLYccLryIiqJXo2mfz083blSslVr0M3sgOQkHYf08kDy2jlELLTP1AgDZhW725bmDbBsKPXVqtdFGpbKGk4uRhVHKFjSG12JRBHPLmVvvzhDvM/FvhLFzXsgmLmFJNg== 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=ROCVdifGaQFd2ky2Z1uEdzRwoK7/v6Qh9sUb1kBotLw=; b=I7T8pe/M6yt4SN3trofR9dmELuKAqt4LEmkxj9AcfGP6ERGglBXTWV6fwm2AOgb3CgfjmVAN+/wy6isycrbm/tJQbR0yJ6eYIBSMxFL3GuKjrRQp7XLM7r0J2KHgV5TBnSYZLFdLA6iou/gVSHkXLFlmCBVDMn4tzsKoCz+NgFTTojLW4J4btPOd1mYHSDIzrfIrFEAObPcFd8qVLmYxTZEMPCgbBzj94Kl1JZWflQG4TBVX/I7lT1rEY+6NpBDbX6L7OPtvLPxbvJEmVchAfrlhE1Bw+aPHJ1vnX+3M+YkN9qGMXFfFICee/JxrlvcJSTh/KDMqY5Sib9ZA2cizpQ== 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=ROCVdifGaQFd2ky2Z1uEdzRwoK7/v6Qh9sUb1kBotLw=; b=uBOvnGV7NT04SP/wrYoRPFCmfT7trKMMU4Ua+E2cNBT76x06RyOayMGgsHGqjl89wCYK7m+tIYlrTMUZNogOZY3KczXhDnz4ukvqUO1gEAMHRGEd56j2BYILRkiK5td5iyLb80M9e7whRrsI2XWnxauTw3Z5y6S5nmK6qHN0tV3rjHHT02lawfVh0kfQRKYd9C4RoLWdAwur86CFM8GrtrSCrsgKfguMjCUVN27u8j0XM5gmIP7E0uoAb9LgSxgHu6TfPNhhwzq2sfq3iYv08/GcI29g7sR4vNVCO+LkUv/5XrcAYuT1xkq4zLQlXKvBZqvItBAqnHPPa2LWp4x49Q== Received: from MN2PR11CA0007.namprd11.prod.outlook.com (2603:10b6:208:23b::12) by DS0PR12MB7678.namprd12.prod.outlook.com (2603:10b6:8:135::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5813.17; Mon, 14 Nov 2022 12:41:54 +0000 Received: from BL02EPF0000EE3D.namprd05.prod.outlook.com (2603:10b6:208:23b:cafe::e7) by MN2PR11CA0007.outlook.office365.com (2603:10b6:208:23b::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5813.17 via Frontend Transport; Mon, 14 Nov 2022 12:41:54 +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; Mon, 14 Nov 2022 12:41:54 +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.36; Mon, 14 Nov 2022 04:41:40 -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; Mon, 14 Nov 2022 04:41:39 -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; Mon, 14 Nov 2022 04:41:36 -0800 From: Wayne Chang To: , , , , , , , , , , , , CC: , , , , , , , Subject: [PATCH v3 10/13] phy: tegra: xusb: Disable trk clk when not in use Date: Mon, 14 Nov 2022 20:40:50 +0800 Message-ID: <20221114124053.1873316-11-waynec@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221114124053.1873316-1-waynec@nvidia.com> References: <20221114124053.1873316-1-waynec@nvidia.com> MIME-Version: 1.0 X-NVConfidentiality: public X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL02EPF0000EE3D:EE_|DS0PR12MB7678:EE_ X-MS-Office365-Filtering-Correlation-Id: 66033cac-1e55-43a9-75b1-08dac63d9c5a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 6BTWMIzI1lHJ3B1URJBm+6yHu6gjetw2tYjBJfITcVcO8aiKfRJcou9W+DKx2vCh1qxgqXBkFeuPy4ywUbPi7bBORB4LnjugB+xInCOUivB5+VMHEfQbH9A3uL7khOgU4741pAdk0euLcBj6IFRjnA9CAFW6yClxbhd4BLKvfSIqj2XXunF6wB7o4zzVS1XRcNG266wp/1Gxvfzp9MFZX1wiseO1OYwmDq4zO53GJJuGfveHr6kS/NOPk4lKY2pGcj0Xkjt+04HVX09RV0MuW0PJrCGTELtlfbo0LgL6T5PAUFZg5XJFCgW8VJL5G1fjI+46yiL8M1Gc3eU0goAytnEnEwp46ZHfEaJyyOfa0qhLeZvNiunB3V3nDiH0sC8FfTzTk0lXv57cH6yRn2jZpCI/tGEWuX0mY5FSQNAg39YQJLGNcWl6j58IUoDHkMHGoMTMNucRQFezje6NtpVDA5wiVETFiigBVb4Q6jBtM4QBbbKyxzW4uxajRnTWHlSrQAfm//74bONQjez+wLq4uiScp3m5H1acMUoBo8ipHzC05WEQGfbljsLSIPwCPc/6XiXQlW40sdsEv0iBLHNq1DiRMp5Dwl84Ti9aJM25hXOYH6z/DGO3C2p7eLyy71WhlizHj/zQAAiMn+haUF/KIN1RivVMZyVEtTkzR5NyO6Ga/fhOWCiZ4MPRppHrI2PZ2GTFMYqk0XEGK5sUV6r2lVWakaw3TWgec8EXplq5COiifopTd17kSequaHm+y2HYY0Z35CXdfK1KcUZQZLageYh6jR/vR61TEk/G3oNU9DE= 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)(346002)(39860400002)(136003)(376002)(451199015)(36840700001)(40470700004)(46966006)(83380400001)(1076003)(426003)(336012)(2616005)(47076005)(186003)(82740400003)(356005)(7636003)(36860700001)(2906002)(7416002)(8936002)(921005)(40460700003)(40480700001)(82310400005)(478600001)(26005)(6666004)(7696005)(5660300002)(8676002)(41300700001)(70586007)(70206006)(4326008)(316002)(6636002)(54906003)(110136005)(36756003)(86362001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Nov 2022 12:41:54.2637 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 66033cac-1e55-43a9-75b1-08dac63d9c5a 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: DS0PR12MB7678 Precedence: bulk List-ID: X-Mailing-List: linux-i2c@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 Reviewed-by: Jon Hunter --- V2 -> V3:nothing has changed 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 Mon Nov 14 12:40:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wayne Chang X-Patchwork-Id: 624973 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 660B2C43219 for ; Mon, 14 Nov 2022 12:42:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237329AbiKNMm5 (ORCPT ); Mon, 14 Nov 2022 07:42:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59314 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237338AbiKNMmV (ORCPT ); Mon, 14 Nov 2022 07:42:21 -0500 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2065.outbound.protection.outlook.com [40.107.243.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EB65424F0D; Mon, 14 Nov 2022 04:42:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Qwx+sPvmKY3JjnE3sS2hRvbTXmkmBbRCRqLHIucGTkcYA2s3NJEm835MV4OXnHSktYBHbsZlduIVlUn9M5FRtuo/O8/nrmgGldJtZz8l/ZcsJH5dKoqFDC7yN+WZfa1s74axQJldO0U9JjLgoeqzV54QbUElKjIvt+YXWvNQwWfrk9HoNBnK842ye0dt0UzcM3U3LBqwp++FQ+FgCciRASYXi2wWY2vmQ5JVWoEkj3FBUWKxy2EMMd5zUdkF/mjq66oGi0sB+qLozv31v3J1MldkAPO3xmGQP//fY1L3+Idj3U4eJrvcXIM9Gh1n9AxYEg7mc7VXes2Up3591dYEHQ== 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=6N4XpGeSdgX/4ipKYz8AkBEyx7Sm9kgi0aqvp7CBZSg=; b=SFiTiQafllPXj3YMpLrR16LLO9Igf0tkuokyS0TOWUNJW+yuY4nzkTpbVYNXyjtWjH/65fIjnzCNGwZ071P3Y6Q+w32wnlDLwtjH9K0WrqiBbHHQVL610ZxVblK3BrDuTrBMX1jyW37FLVViZ5Qyb6YUvYO68lT5cyq5xZ8mjnU5mdZBOjnUPq59xsAHmAHKnUsZP/rnlHaTfNR9/9wynGJyDHost1sugW4NnvpbFlCA9Ul8AqKc6y5QVSWVAsVa4uQDAMn2VniIiK204n5f2iB8JZqZRG+OhS7NVmLB9e3aysLH2zrOJz3T9bMl/S2QdFTOl1sT5Kt63x6s3wczAw== 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=6N4XpGeSdgX/4ipKYz8AkBEyx7Sm9kgi0aqvp7CBZSg=; b=uYt28TkZgSqUPM9dUaCDDkRgE3I3RURZzayxgWstY3ja/wCfYNh3XCjt1m93RoTPwcyxBH3jUOsdXlzzsrxa38r3srX7O5JVl9Hm/LOFVWYQFaEt3LWM77tM74hFF7PAJwcipzDegkfX4toqh59xOOc7uI4A5hibqHM+nKjY0cPIuVPg9HIpih8gFv24ghyXoSOpfdCrpMWLKC8IYcTvluULUAOw1z1eIJ/ZyzbT7bt2AzmVv6QnFPLsP8ZGe3DMgFm+4iMTFZsHhGZImhD2kA7VuJHjVZge2XDXcRB/NaXYypNKtC/7Zulm48z1TjUnXNEKhC80DCqqfBONSnZkkQ== Received: from MN2PR11CA0022.namprd11.prod.outlook.com (2603:10b6:208:23b::27) by MW4PR12MB7216.namprd12.prod.outlook.com (2603:10b6:303:226::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5791.26; Mon, 14 Nov 2022 12:42:05 +0000 Received: from BL02EPF0000EE3D.namprd05.prod.outlook.com (2603:10b6:208:23b:cafe::80) by MN2PR11CA0022.outlook.office365.com (2603:10b6:208:23b::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5813.17 via Frontend Transport; Mon, 14 Nov 2022 12:42:04 +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; Mon, 14 Nov 2022 12:42:04 +0000 Received: from rnnvmail203.nvidia.com (10.129.68.9) 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.36; Mon, 14 Nov 2022 04:41:44 -0800 Received: from rnnvmail202.nvidia.com (10.129.68.7) by rnnvmail203.nvidia.com (10.129.68.9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.36; Mon, 14 Nov 2022 04:41:43 -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; Mon, 14 Nov 2022 04:41:40 -0800 From: Wayne Chang To: , , , , , , , , , , , , CC: , , , , , , , Subject: [PATCH v3 11/13] phy: tegra: xusb: Add Tegra234 support Date: Mon, 14 Nov 2022 20:40:51 +0800 Message-ID: <20221114124053.1873316-12-waynec@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221114124053.1873316-1-waynec@nvidia.com> References: <20221114124053.1873316-1-waynec@nvidia.com> MIME-Version: 1.0 X-NVConfidentiality: public X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL02EPF0000EE3D:EE_|MW4PR12MB7216:EE_ X-MS-Office365-Filtering-Correlation-Id: 9f13f8eb-e823-4809-e6ea-08dac63da278 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 7UQFSbuRXIYY8FmXaplgLSl0bF9yJbRCs/uF2zctMFbCRCyCi1iizWacYUrhKTAmNCglmKjDP+Ho3lMscFu96kaXJ7dYTXMCbOtdHjfYUou3WiV2KkJdbDbLibNtadbqUX4q9n26FAtgQBe8mos+Me/nekwEUwrA01cocRS3U0gngMgJ1LlU0LO4bTzmIdHbqLdf8r+/02r6H6i/hSJjmiZx1DsvaUPN0TvoJcEtyjqpLjk0blgfF0Y234fQeMcj3bUExGkrstT8jWln6o3Os1EOt72YcJ3XubILZ2XwvqAJmqi7h3lMd0OsXfoOlm7yMyEUNJ6+29RTFw99Q1LPp4qA3Rz5QQCf0XlqqxdcXKfwtuefh8eMQohnHcvK3/uC+ireS4ObeE9WkVP2iFzxfxg2WNc65zRYMzQzj03GzbuOHAVLJqASgf1eR/p3VxFPQk5h1FKTUdpS8y/rvwD9Gd8XUsFBE3jYPTMubiTAPAIW9EKEjAgAd31+++M5zJinO6MoiC1JQXLVEG8+ra+Dyqx3+HtIXVL1I1dr8F7vrNcjHTKhdLSTgvOXmk1g6ZN8DWcfIe/nOeV5L8QZnb/9jDt2+IZF83tgzmeN9//LC68ChaNf7X1Gjv4/P2fqoIle2WEVeC7eZLY/w3BdZViHHWiHGV4eo6Ie8FoHXKmu++YSY1cI1A46bg/KmusGExD/9Y+ad9SnjdyEyrZ2ymBOSFvXEAkr9A6Hx35tPSIUrqFAbCycbRXYIm42qZPUQ2wuOWkI9BnAp5cXz/BbO1hkGqwebavW3d4thccU9s1788E= 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)(396003)(346002)(136003)(376002)(451199015)(46966006)(40470700004)(36840700001)(336012)(82310400005)(41300700001)(7416002)(40480700001)(40460700003)(26005)(70586007)(921005)(8676002)(4326008)(36756003)(70206006)(1076003)(478600001)(6636002)(186003)(7696005)(54906003)(110136005)(7636003)(82740400003)(83380400001)(86362001)(2616005)(8936002)(6666004)(316002)(5660300002)(356005)(426003)(2906002)(36860700001)(47076005); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Nov 2022 12:42:04.5608 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9f13f8eb-e823-4809-e6ea-08dac63da278 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: MW4PR12MB7216 Precedence: bulk List-ID: X-Mailing-List: linux-i2c@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 Reviewed-by: Jon Hunter --- V2 -> V3:nothing has changed 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 dce45fbbd699..c2f160628552 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 Mon Nov 14 12:40:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wayne Chang X-Patchwork-Id: 624972 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 42713C4321E for ; Mon, 14 Nov 2022 12:43:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237288AbiKNMnC (ORCPT ); Mon, 14 Nov 2022 07:43:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59230 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237359AbiKNMmY (ORCPT ); Mon, 14 Nov 2022 07:42:24 -0500 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2084.outbound.protection.outlook.com [40.107.237.84]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0736624974; Mon, 14 Nov 2022 04:42:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lNJm/Fu30v7qsZPMFlhjCUV2gFFQ5fJz14lKlxxjEuxCPC4tkzDx/tcd+9XgPa7QN2Gm6L2Cay8m1kJFGGCqH5JTaCzzpZ2juw3zeoDq4p3B+A6W69QVxel6yHRNtYmKh7UOpycvjvGFfgSgYSe9eIPY+f8u8mfZOfZXnSDnGr64cjWYqwrQd7pHW1hfzlhlJUYHxtmuNJwwt3Ug8oATikSovw/w6AmtKTJv61FsFD6DIlv5vfPtnC26yr8qYQiNmwUKq+NKqAnRWnbbDjETT7xH6ex3yr3CmLV/ZG+IVAhFGBavJ0bbB/dz6Bcey4vJ7VBE90xGsKDnwQJ4sfigow== 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=OhXYkb2fHAoOwnfIiR3VYugHraiFFbPneMvZpJiQaAs=; b=SRaxDA4H47zxYaPmG0xez1QryrZzp82gGMp1IUpNuYGH8WUDnZLeHMxsnSaDrpLvae3wSvi7OkKJ+9scETl4XwGV3djWb4bpgMUC1qQrVkb3VJF1HcBiAe+GtLIAiYE4YvBhSn2Cu4+DygHlahZyezPoWP9WrCA6wkHOVQiPDw8+lKvmHnezjeGe4lpIy1137cO2JXWlTdkjURWWWepjuKuCJASryR1g5pFE29N57Dqb6NdzLvObyDpGcqd+J5cCvt0fO7Dzqb3V0XqfNdZtEsQLj4StAP6HvP21LJCeKQP31KIQl/xDDvo005VcfGzX/OoAc9vIRqUJCtiWF9KhYQ== 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=OhXYkb2fHAoOwnfIiR3VYugHraiFFbPneMvZpJiQaAs=; b=acCLI1XxFmGi/JzqPOPAuzZOT/rTdxi6MPXk1MrTqFgU7fGta1kSD9t2B9uI6hnqhBIFVhCm8kwLMLj7QHJSDBCATWLjn2d/y6DzKL73iCvdA5riM+EqcYruTUqVolel58Z91fFq+Vhn7cNpyuaOaURfmyzgu/+50xlnx9t816h/O6rXcu+zj1cacWiGgwJ4ah1Q3ZNyGflAt4dAv99ty3qmOzwvP4Pv2/f/zN8f7CjGauB+zsr9twe+V0GGcWJ/WinWv/mjF3Dv+VQpBzagDcjgL0jTxuh97N6qUqcuFClOd/6J4WHQNxlmMHC/hhoSLb1fzSfC0GvmnYHG6UIY5Q== Received: from BL0PR0102CA0012.prod.exchangelabs.com (2603:10b6:207:18::25) by MW4PR12MB7117.namprd12.prod.outlook.com (2603:10b6:303:221::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5813.17; Mon, 14 Nov 2022 12:42:06 +0000 Received: from BL02EPF0000EE3E.namprd05.prod.outlook.com (2603:10b6:207:18:cafe::ca) by BL0PR0102CA0012.outlook.office365.com (2603:10b6:207:18::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5791.22 via Frontend Transport; Mon, 14 Nov 2022 12:42:06 +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; Mon, 14 Nov 2022 12:42:05 +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.36; Mon, 14 Nov 2022 04:41:48 -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; Mon, 14 Nov 2022 04:41:47 -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; Mon, 14 Nov 2022 04:41:44 -0800 From: Wayne Chang To: , , , , , , , , , , , , CC: , , , , , , , Subject: [PATCH v3 12/13] usb: host: xhci-tegra: Add Tegra234 XHCI support Date: Mon, 14 Nov 2022 20:40:52 +0800 Message-ID: <20221114124053.1873316-13-waynec@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221114124053.1873316-1-waynec@nvidia.com> References: <20221114124053.1873316-1-waynec@nvidia.com> MIME-Version: 1.0 X-NVConfidentiality: public X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL02EPF0000EE3E:EE_|MW4PR12MB7117:EE_ X-MS-Office365-Filtering-Correlation-Id: 24a35276-6d18-49f5-3c69-08dac63da34d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 8XUJXP16zTUvCjFqAU+g/6XsUCY/z4L/XCt91J5EvgdnH6W+quMigMK/Qnbj5Zdy4sW1+S+s+L7gGk7hmYay3BSD4sgS9RrEjLUzPyeP1mMZXOE9E0SzaittjaU083peCYUWlNJtdY7PnEJFACvbr64YHvkNEFVJI3V3jTjjaHLQT2/8rRSMkVpvKF5Xi61Mh7ZQO7M1AGN6rol18CHmooJzX5tsMYDm0YfyXQhKSqBWLBb/tpIj2u7E8HbeZVXgZ8PyJswBHheCmdqClNcAArsgNAPI16n/JbtM3Jyf6fceILhyktVhtbc7ptPG0kVXoOCQAA0/zjb3dPdBysQjz5TizK8WQ+uM49mYUDw0/S6IGAsNXu5GGgJzJE48dyMpULrOHS7ljZLYKoaBYO4f0gcNA01yD1KgPBH8UfkWqwMrupU1+eD3XqBvKgZ5ET9UaMKtpTnP1Hlf49zjifgMc0+xmVYDU4OWloVgMjBp6otPn4kjQ4Z/CGv/S18n9rNXznViyi2do7npJy2dAS4hwTDk6vYgGhj5pKl9ZCfxNWotLxVxTDCTdKM5XPUd3YXRV6B5FpLStYwVNvW70WUNtBWSQ/7m6GWRthouV/7g4yl0K9r3TN7uzPoy9Y03hRW7ER0OzMUnZvEVzfuxNxeXskIDjAF3oEZA+/EWLCM3c1T7p4KFJKOBuqRzfm2ClXvc3/Sw9nvj5G7ucPokqUnYX1SKsl4LB3byfI18KYbBQvQB1Fab10Fz/+9HDcf/lRevlCQ9Ho+RualTm92lw2iJie58iBBuXewEXPSTRxqKauk= 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)(346002)(136003)(39860400002)(376002)(451199015)(36840700001)(46966006)(40470700004)(86362001)(2906002)(6666004)(478600001)(26005)(7696005)(5660300002)(41300700001)(30864003)(40480700001)(82310400005)(36860700001)(70206006)(4326008)(2616005)(1076003)(70586007)(186003)(8676002)(47076005)(336012)(82740400003)(110136005)(40460700003)(7636003)(356005)(921005)(426003)(7416002)(83380400001)(8936002)(6636002)(54906003)(316002)(36756003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Nov 2022 12:42:05.9524 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 24a35276-6d18-49f5-3c69-08dac63da34d 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: MW4PR12MB7117 Precedence: bulk List-ID: X-Mailing-List: linux-i2c@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 --- V2 -> V3:nothing has changed 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 Mon Nov 14 12:40:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wayne Chang X-Patchwork-Id: 624666 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 2EFCCC4167B for ; Mon, 14 Nov 2022 12:43:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237415AbiKNMnE (ORCPT ); Mon, 14 Nov 2022 07:43:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59804 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237292AbiKNMm1 (ORCPT ); Mon, 14 Nov 2022 07:42:27 -0500 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2071.outbound.protection.outlook.com [40.107.92.71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 494EE24952; Mon, 14 Nov 2022 04:42:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ClIf+5Jg0zQSDa5VM1T1pzH/KwtlL1zQob4A0IX2CiHK30aJqqVMkQvhbfkB7+aA7cjTtZ20WJgCu8QsMhKgonBxV47ZjnMhIFk2YSAhf7T5gqKkj2zXssmdkziYEY0QQFcjg54h/BKy06IP6Sr3dR7wuWpv6qY+4EdkHOX26V7+BuXhH1OVl0O+M1jMZG/NKKrOgIPLSR9dtS2fYgoqVHkYDIp/EZpJCmMGqp5HTS5EzfrC5qPMfEDlQfIITR5QDZYSGK7JwulH+hgDCKl9LZSOTaN/lPpNYDOfEREZhkoxB36Bfy00aPAdEETGcWfkIMtYepaepLv93jo1OHkG2A== 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=alGllIUxVCAyQT7pMkRn5F0uzSIWAe8dw9UAm+AiqSQ=; b=B9LY6y/HT+s4RV0uYXCZTT//5QZcmgIg2P05wK6KGcNh0XcUrt60fHU8ev4uJEHM9bn2vOc1XvGMvWzYVtevrNR7fmRvKORS5TX4BunOx1iL2wsFUlMzMIQLTpZBQ7sbcJJUaY4nyFiE/0R6jC3fDTtT8hKgUbNzoypBeXkjZL2vt8C3an9UW7oyIQyZ3UAJ0kqRAP1Ng/F0NDnpvpFL0zrRK4tE6geDtATABj/P8nT9UrmwQKemLkxTUabZOVg5M5ps44BQR30+B4a33UkOljb/jD+X/ZnbZkvGVKKMujM+t0QYHAzDMRqgkAv1mYkzd97gTNWvYNQegzOVy9gN7w== 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=alGllIUxVCAyQT7pMkRn5F0uzSIWAe8dw9UAm+AiqSQ=; b=PWzdlmcI0mbTF4ZiDkN7k+yjT8Y8oTmORoyWuDUkpRFPZGD0OpF7xYOKg2bbN4FIlWSKOdNjxfNEOJNpLxDVvXaN9h5Mf8yu0UZ3Fnezo5xEn/5GMTnMlubfn2oCoYAaoBe8LSRdD9to2+Sg2C/sDTyVALTBPFrGSDbP3t21LTfaDYqs59qZuoBmMsJAacNLRq8WPwewPFL0WEujK9qdx1oqnLT5z0V6gK+cXn4g9BUc1jbK5JTfvNYjQqzAL6YU/GO/Hay/evC10boVo5EIRhoYy+Uc0RD2MpMSPNKE+/ZJXOxTBwbNZs9d+oKmWBhvB1KeZB+bBRDpAAyIA/U3qw== Received: from MN2PR11CA0005.namprd11.prod.outlook.com (2603:10b6:208:23b::10) by BY5PR12MB4164.namprd12.prod.outlook.com (2603:10b6:a03:207::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5813.17; Mon, 14 Nov 2022 12:42:08 +0000 Received: from BL02EPF0000EE3D.namprd05.prod.outlook.com (2603:10b6:208:23b:cafe::f6) by MN2PR11CA0005.outlook.office365.com (2603:10b6:208:23b::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5813.17 via Frontend Transport; Mon, 14 Nov 2022 12:42:08 +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; Mon, 14 Nov 2022 12:42:07 +0000 Received: from rnnvmail203.nvidia.com (10.129.68.9) 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.36; Mon, 14 Nov 2022 04:41:52 -0800 Received: from rnnvmail202.nvidia.com (10.129.68.7) by rnnvmail203.nvidia.com (10.129.68.9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.36; Mon, 14 Nov 2022 04:41:52 -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; Mon, 14 Nov 2022 04:41:48 -0800 From: Wayne Chang To: , , , , , , , , , , , , CC: , , , , , , , Subject: [PATCH v3 13/13] usb: gadget: tegra-xudc: Add Tegra234 support Date: Mon, 14 Nov 2022 20:40:53 +0800 Message-ID: <20221114124053.1873316-14-waynec@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221114124053.1873316-1-waynec@nvidia.com> References: <20221114124053.1873316-1-waynec@nvidia.com> MIME-Version: 1.0 X-NVConfidentiality: public X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL02EPF0000EE3D:EE_|BY5PR12MB4164:EE_ X-MS-Office365-Filtering-Correlation-Id: 3853e061-fd6a-46a1-f77a-08dac63da46f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: lmcYhGj63TEWo3DnFEqv90vcVuSx9AGl1WzIVW/9vT6+xjokKX2nkaV1UxOeiNXTIxFO9RHHNqPAIAKjf4WY8E6mDoRqKIUaj/S/Wng7P1sA4cnOF4pT/cFz7mHqqOClKJ6CEgGd94bHmV0QGCitv3LbeyxKjWT49f5FZihqZolE1XxTeCqgZ9c3q4BU5fYz1exWVAxG54xTllnIc9fZNWjRqSsFWci66Fvqp2HTiSMWCzLs15caSpexFBSBRasEKMLH6Wk/TTH3FJjPvV4FwRgSk1SCZWqOZIqO9kb5YvWAfwAla278LSttLHaaUPUfcKDG2mAUsBTUtS8CB1Sk4xelDoXjXB2mq2kZJVk27x2TIsveXcH4TKP85gXK7jnZb/PvDWpvt+s4PZDbOnl21KpaQjr2uFJ4HsXtgOYPlKFpGaoQDgRXSdaitu2Cm7KLD6yXkEm9m0LZ9Hq9g3HKYaPhdIfKVLNcEb5gz0HCw2ANNV+ygIfQXHdqBDaeT05q7zS8fCelg06JT8mvN1vu5F1a+ohvRpMSsX/Isy6XTvLq1/FBGwwHdqpqTv1sdsPCudBawroZKQMMv6bQZgNlZI2DwzbeX0Af8Q+O1Ah4Lz2LnfDN1iJ1leMisrTHCW0fYHGp07c0zn9Rwyba4MQLLBtGSiS7GDZh+wiHLDEHmGHrpmtrzuEN7VLMbKQF5OCt0JwlZ+SCPqMR7o4lz5FYCfpuLRmIBLt0MtqhOFGTuqX06ye6gWpppbD5t5b4YwSwRnI07iX/BGqiQI07BxAw1pqa8wXoSKA0DhbI1QN0mPw= 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)(39860400002)(396003)(376002)(451199015)(40470700004)(46966006)(36840700001)(40480700001)(36756003)(8936002)(86362001)(7696005)(336012)(921005)(82740400003)(356005)(7636003)(40460700003)(2616005)(7416002)(2906002)(41300700001)(426003)(47076005)(36860700001)(83380400001)(5660300002)(82310400005)(26005)(186003)(1076003)(6666004)(8676002)(54906003)(478600001)(4326008)(70586007)(6636002)(110136005)(316002)(70206006); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Nov 2022 12:42:07.8264 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3853e061-fd6a-46a1-f77a-08dac63da46f 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: BY5PR12MB4164 Precedence: bulk List-ID: X-Mailing-List: linux-i2c@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 Reviewed-by: Jon Hunter --- V2 -> V3:nothing has changed 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);