From patchwork Mon Oct 24 07:41:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wayne Chang X-Patchwork-Id: 618027 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 7A800C3A59D for ; Mon, 24 Oct 2022 07:41:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229887AbiJXHlr (ORCPT ); Mon, 24 Oct 2022 03:41:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36880 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229876AbiJXHlq (ORCPT ); Mon, 24 Oct 2022 03:41:46 -0400 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2057.outbound.protection.outlook.com [40.107.92.57]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DFADA4DB3A; Mon, 24 Oct 2022 00:41:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=i1Z216VIyCEofwZvlx60um84XKGBmQF6fj3vKCfjeDJ81Bsv5WqSIUgR/5udkAQKULNWFwtYLXBYqUWkAQnB6cMGhzsPRhSscwhw0yFhmIFPm5qUF3D1KpuBkPjQOSzKsKcqqveeAf6L9IZerswsblFys0s98JAAMjahZnKc9DMtU2voeb4mkpPvm14GEm2VFAOL5YpuNqEIFBFuHKsVF0ndIwipIFHCtkvzQgtsXX4Scgi9nOjmt5+9iq8hdjqeAw/yQLw7ACF8XaRDktGcra85MYk2M4vmg7psfvcdnzjV9eABSPKa0AaH5JbYf87WCUDjJh3yZ2vzqeHgnwDXlw== 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=AsNPU/uubDs9c633fg7AEEMQp528akvzjKlxpYqO1Iw=; b=GHwWxOSS3pn9bCxLeK1xQV6j+kv4K/SxZivAUIHv9t7EnazxOgqQiO6FeIjuc9yyAJELjeIcAbhg2eD+zw4wdixztWeUjAahchBbgE08n4M5IDc4u3zirxRtNa1capp62wro0oJXV4PHKeThrJQYY51fQpQu9kVIianS3W8NlXGgNR9gJKEDRE7PONcj1sJO7QEzM72QqRKKMfo0crXAl6YAZuHydFtEo+2fEkRGx7hMvnhJJdoHuXsWIByaVXiV4sWsgHgecvTJNlsSdQquYQRUSp5UjxYl0Nyc26feYFmj/fJC5tNLrvKgISd1XiC7+fHanlZINiX3JO4CPQa+kA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.118.232) 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=AsNPU/uubDs9c633fg7AEEMQp528akvzjKlxpYqO1Iw=; b=MDktFzVodno8U67mNkI2luGIDlMK4bSo0OjXVJj7YoWytLgr75how9yVbDVtC7+sTkIGrzpQEvvjZ5WmwU1bUyQRtavEyGtdnXwYyyMHSGatTWV0ei4r14MyUrLSAeb0HVLlBXQIzoI4aEuhQc8TW2a5LhiAft/doDLkD7bPwl7yDipUp/z3aG1En7qygY1mJMFYlh3XBOZH81zMng2Osmu3QJl9xg7ZuquckrrzIsEz8qmTUWRUXC0vCYFnWFo7Yg0H6NnIoMucTl1zXDZ6jU5Qp5jI58lQxqRjuEJlztIN9a6KbTkEJCUrnvwwzuw1jKLO41BwBVmkUse1HX/ORg== Received: from BN8PR04CA0015.namprd04.prod.outlook.com (2603:10b6:408:70::28) by CH0PR12MB5188.namprd12.prod.outlook.com (2603:10b6:610:bb::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.23; Mon, 24 Oct 2022 07:41:42 +0000 Received: from BN8NAM11FT087.eop-nam11.prod.protection.outlook.com (2603:10b6:408:70:cafe::1d) by BN8PR04CA0015.outlook.office365.com (2603:10b6:408:70::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.27 via Frontend Transport; Mon, 24 Oct 2022 07:41:42 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.118.232) 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.118.232 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.118.232; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.118.232) by BN8NAM11FT087.mail.protection.outlook.com (10.13.177.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.16 via Frontend Transport; Mon, 24 Oct 2022 07:41:42 +0000 Received: from drhqmail202.nvidia.com (10.126.190.181) by mail.nvidia.com (10.127.129.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.26; Mon, 24 Oct 2022 00:41:41 -0700 Received: from drhqmail203.nvidia.com (10.126.190.182) by drhqmail202.nvidia.com (10.126.190.181) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.29; Mon, 24 Oct 2022 00:41:41 -0700 Received: from waynec-Precision-5760.nvidia.com (10.127.8.13) by mail.nvidia.com (10.126.190.182) with Microsoft SMTP Server id 15.2.986.29 via Frontend Transport; Mon, 24 Oct 2022 00:41:38 -0700 From: Wayne Chang To: , , , , , , , , , , , , , CC: , , , , , , , Subject: [PATCH 01/11] dt-bindings: usb: tegra-xudc: Add Tegra234 XUSB controller support Date: Mon, 24 Oct 2022 15:41:18 +0800 Message-ID: <20221024074128.1113554-2-waynec@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221024074128.1113554-1-waynec@nvidia.com> References: <20221024074128.1113554-1-waynec@nvidia.com> MIME-Version: 1.0 X-NVConfidentiality: public X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN8NAM11FT087:EE_|CH0PR12MB5188:EE_ X-MS-Office365-Filtering-Correlation-Id: af504a6a-3b1e-445b-01a4-08dab59331c0 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: LTLaK/+CcAjqyJ7ie2xLEA7UObewNBdtUd5BprpUDUttz6692+HUqIK2aU81QGmuNcyKEGugxzjA6zvDsPXnVm7w3QjRuwzyRZcIUxBR4IQYsHvVXXYll60N/7KsBgkYusVKwqcuvX++MG19kIxwt39Q69pOISajKF4u0BUthilQvQczSTzK7X2RcGYq6GLDMRNd4q657YlknlnKaG6NGBPvPVs8nh6iNJFvAfDl3HSwXHhP+sA0fOYwZWb1sIaAhl1vVysXaZKu/jVHugWwCDModFH7+PmCEzL6Xb3tciMn2d7bAaywG4PhhB1G60Y6HBdStyc/QM+zj6xdul05vGKlM81662wbYvIc5byR/MEE3bDNIdwUV1Zcrhyn/ckzBcVxFFFheA+OhRaWdEq1CaTd/Q8mWik5gnD13HC26HInwcoT0c29VHlAqjAC6TqWSobGXpGpnQlMrbXutkCdNCPfdUWbwpvS5YEq3GN1k1KLPw+KUnNis8sdD9Qo34xGzikdkqmcdIeuoxsXNf5IYJDdpCgdUisx+m1t3KVHOhFOd8U//C4zvP3EW0BcybvfAqKS1pJUm2F3lCNbBJM7zoIE8PsXH6FRSCOOi+uQbo4CkfJusiALLF91NAeAHxkrPYv1zHSh9FsZVz2VMDu+3TUShP/W/TTdm2UA3cr5Y4K06vey28g1946pNiTrwOa2iv2M4bO2TJKs9nt+eRGinu6uB7+Z7OnZqu84KUfgh0XIumDRZAEMvO1lcj+1NsBhgn/rBxmrw4u8GNsFf+1KBIWPffqTPNbuzmpSwJcuiiw= X-Forefront-Antispam-Report: CIP:216.228.118.232; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc7edge1.nvidia.com; CAT:NONE; SFS:(13230022)(4636009)(39860400002)(346002)(376002)(136003)(396003)(451199015)(36840700001)(46966006)(40470700004)(83380400001)(478600001)(8676002)(70586007)(70206006)(40460700003)(4326008)(7696005)(426003)(47076005)(6636002)(356005)(7636003)(921005)(5660300002)(2616005)(82310400005)(2906002)(40480700001)(82740400003)(8936002)(86362001)(36860700001)(336012)(54906003)(41300700001)(26005)(110136005)(7416002)(316002)(36756003)(1076003)(186003)(6666004); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Oct 2022 07:41:42.3958 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: af504a6a-3b1e-445b-01a4-08dab59331c0 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.118.232]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT087.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH0PR12MB5188 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 --- .../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..517fb692f199 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 + anyOf: + - const: usb2-0 + - const: usb2-1 + - const: usb2-2 + - const: usb2-3 + - const: usb3-0 + - const: usb3-1 + - const: usb3-2 + - const: 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 Oct 24 07:41:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wayne Chang X-Patchwork-Id: 618461 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 A30C5C38A2D for ; Mon, 24 Oct 2022 07:42:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229940AbiJXHl5 (ORCPT ); Mon, 24 Oct 2022 03:41:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37166 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229915AbiJXHlz (ORCPT ); Mon, 24 Oct 2022 03:41:55 -0400 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2047.outbound.protection.outlook.com [40.107.243.47]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EA6955BC8A; Mon, 24 Oct 2022 00:41:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZpkZyDrvMCihDsBNx8fU5BPDkrpOcVH5v+W5nyOyD27CUNLDWMJvR+7BFE3t2Z/bBTvocg0epSTyY9QzRvZLFHQfg3a9DFajNT31oLYpcyzoHszYF+lgjoob4fEBNoFh9oSMQTBo+AKAdK4gqVyzkz2G0PrnrOxdTE6QVMkkvZNWtu3O4CWQseVlfybbFS+I8tGmAqCa17GNvQPjTebm2Tm8e4oDEYH3VIeTU7qfiCpfwt+/XeeiYSsIPr4HI0vHsUaUn7mpV1onUFqY8lqOt/mMGAkbkAo2/eTcOjHz8TbE2OEKUPPjSucGM1h9BD5YpTv7TG2MzsOzhLjPsiwyGg== 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=S5qquIuupNl7ZliE5kSBRHSY//1lm/47aCgcaZGAkzo=; b=mfI8TgKdn69al75CRG06NmJ3Jocyz6krt2CQc9lziRdEzU40hKy5NvcDHtt/XcA1zxHLELz3K8y/oE+vjQeJzoUAu7xLwZxu7JEQGq4yuDyjcRYwz5IkiQDbp/T70WeRSYw+BWqvPcORDt5tvoXjGD7PlhuNvNYlpCPWZDpxHcvTy58B6pMLKG4km9nvtyoSUCOhjxzcJtuYHlqnQpaf7kYBWuIVPIzhatXNCl0JDo7Y02wX7wyvvIMZXKgKTIn9lxHBsnoxPVDmORpTKxqVPXvBgDhaVnirP2KIwi2mG62oIrJLml711NdthVlSwtaE24EOefu+dDc/UiIfEvXNMg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.118.233) 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=S5qquIuupNl7ZliE5kSBRHSY//1lm/47aCgcaZGAkzo=; b=ibKie/gu+cq5Q4IS1p6sqfR2xp9XHFRF/Kw48+5NhBeL2NZ0KK3GGG3MPMX7bYbhD2At8XebnD00SdZ4Qhm76dkPh89KykMnqh4eWJA/9cfDtnNoNM6n4Ou40NCmOmUhuIpXeVAB5bvHEQt+t62OBSZaLjRKdimCz5caLdoqt6V3+xf1snTMJ+rdyn4Jy/2m4rlD4UXl1aXCtRhcyGiS1f89kITKMJ38DgA4uNRg+qJFoMPr7g+kVi1M35Y9ZTT81UalJB9zLid00bRm4U3xGgksyt3ksJF04nu6RpMM916hdi3RBBD+/jox1bOHAWlR2ecS5TrXIrfaWbGWQ3DN+A== Received: from DM6PR03CA0098.namprd03.prod.outlook.com (2603:10b6:5:333::31) by DM4PR12MB7671.namprd12.prod.outlook.com (2603:10b6:8:104::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.29; Mon, 24 Oct 2022 07:41:45 +0000 Received: from DM6NAM11FT096.eop-nam11.prod.protection.outlook.com (2603:10b6:5:333:cafe::16) by DM6PR03CA0098.outlook.office365.com (2603:10b6:5:333::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.27 via Frontend Transport; Mon, 24 Oct 2022 07:41:45 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.118.233) 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.118.233 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.118.233; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.118.233) by DM6NAM11FT096.mail.protection.outlook.com (10.13.173.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.16 via Frontend Transport; Mon, 24 Oct 2022 07:41:45 +0000 Received: from drhqmail202.nvidia.com (10.126.190.181) by mail.nvidia.com (10.127.129.6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.26; Mon, 24 Oct 2022 00:41:45 -0700 Received: from drhqmail203.nvidia.com (10.126.190.182) by drhqmail202.nvidia.com (10.126.190.181) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.29; Mon, 24 Oct 2022 00:41:44 -0700 Received: from waynec-Precision-5760.nvidia.com (10.127.8.13) by mail.nvidia.com (10.126.190.182) with Microsoft SMTP Server id 15.2.986.29 via Frontend Transport; Mon, 24 Oct 2022 00:41:41 -0700 From: Wayne Chang To: , , , , , , , , , , , , , CC: , , , , , , , Subject: [PATCH 02/11] dt-bindings: usb: Add NVIDIA Tegra XUSB host controller binding Date: Mon, 24 Oct 2022 15:41:19 +0800 Message-ID: <20221024074128.1113554-3-waynec@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221024074128.1113554-1-waynec@nvidia.com> References: <20221024074128.1113554-1-waynec@nvidia.com> MIME-Version: 1.0 X-NVConfidentiality: public X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6NAM11FT096:EE_|DM4PR12MB7671:EE_ X-MS-Office365-Filtering-Correlation-Id: cc1604bd-489e-4d03-4e0c-08dab593338b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Rg2RqxvjGu8yoMh/rKN8UOwG7vb3j3BnRoRQwjxTk1xh7LWM1RHpmHJwSsPL5l2DUJHgaOlvTMmYru2hF8zuDH1xqiEAN4qiNwjr9E5eQ70PUygP/ygQ9RnOZCo0N+lfd4NOW/arbOFigdpHwQeKHYoM9yw5f/Fo2jttN1tfxzRiG5p8JcoIfshz/uNE4bQXVyXHShrocJf2cGMATcm4ocrHdtcdSiZHEBVvNDL0VcsSpSXQZagxwM4DjbMNrHdBeVhZQHMJtX96NPY2IyArSzf+XC9nHJeE5ab4fyBECP5kwzQ+j1ddb5NMhzFpjynxfVPgfayzEDqHjadFfARFPPA6c/dTJ2XwnjZpLK9vVMWORfQx8cSTSgFlTk3Jd/pSPZ3ttwBJFrYc12ycfyVqoM5lap3rVCEsvYOl6Sxk9GjVv1TBSXdVyzz0eBrgrfvBuAc4gB0xW2tOQ5I8wNvii0yc+F3e9E2hovc0aMuFyfsVVqpNrsF5xiDOelpS6qLGYy04zVO0fWxfs3Ra5KpUMCHbzOc1FO5UpzcjkV30xn1AoQWZC4XDkiw0zJOsP/7G05noLEG5vnjq8/a378MDrzfSyTzdltdJofZq/LOMr2Wg1wVNxjEgWxmwHgGRc5ieUdK7FFqS9YMh39AW26t7jjYQ9BfjAjzdqBjip2M4SfRXRc6cVgQBz/iAPWkZj/3ewjajqKKNuWV0NNfbhEWrimuZfzW0W8hxVBQV9QZwc9c9qLaEty8IMpMGS1pXIV17/S1A75a+LkwuTKKVy8FTH9uLZxmAwClP9HSFajnjITYuU0wv0mbGoblSX/kGEyYNj1qbqlQk+dRhlvL67i8rrSSs4yX0xXT+lYg37KPk8n84D9nENaWVtZrkfiHI9bPK X-Forefront-Antispam-Report: CIP:216.228.118.233; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc7edge2.nvidia.com; CAT:NONE; SFS:(13230022)(4636009)(136003)(376002)(396003)(346002)(39860400002)(451199015)(40470700004)(36840700001)(46966006)(186003)(316002)(426003)(83380400001)(6666004)(47076005)(110136005)(54906003)(86362001)(5660300002)(6636002)(8936002)(70206006)(36756003)(8676002)(7696005)(2616005)(41300700001)(4326008)(70586007)(7416002)(40460700003)(26005)(1076003)(40480700001)(336012)(2906002)(82310400005)(478600001)(356005)(82740400003)(7636003)(921005)(36860700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Oct 2022 07:41:45.4371 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: cc1604bd-489e-4d03-4e0c-08dab593338b X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.118.233]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT096.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB7671 Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org Add device-tree binding documentation for the XUSB host controller present on Tegra194 and Tegra234 SoC. This controller supports the USB 3.1 specification. Signed-off-by: Wayne Chang --- .../bindings/usb/nvidia,tegra-xhci.yaml | 213 ++++++++++++++++++ 1 file changed, 213 insertions(+) create mode 100644 Documentation/devicetree/bindings/usb/nvidia,tegra-xhci.yaml diff --git a/Documentation/devicetree/bindings/usb/nvidia,tegra-xhci.yaml b/Documentation/devicetree/bindings/usb/nvidia,tegra-xhci.yaml new file mode 100644 index 000000000000..d261a419a04f --- /dev/null +++ b/Documentation/devicetree/bindings/usb/nvidia,tegra-xhci.yaml @@ -0,0 +1,213 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: "http://devicetree.org/schemas/usb/nvidia,tegra-xhci.yaml#" +$schema: "http://devicetree.org/meta-schemas/core.yaml#" + +title: Device tree binding for NVIDIA Tegra XUSB host controller + +description: + The Tegra XHCI controller supports both USB 2.0 HighSpeed/FullSpeed and + USB 3.1 SuperSpeed protocols. + +maintainers: + - Wayne Chang + +properties: + compatible: + items: + - enum: + - nvidia,tegra194-xusb # For Tegra194 + - nvidia,tegra234-xusb # For Tegra234 + + reg: + minItems: 2 + items: + - description: XUSB host controller registers + - description: XUSB host PCI Config registers + - description: XUSB host bar2 registers + + reg-names: + minItems: 2 + items: + - const: hcd + - const: fpci + - const: bar2 + + interrupts: + items: + - description: Must contain the XUSB host interrupt. + - description: Must contain the XUSB mbox interrupt. + + clocks: + items: + - description: Clock to enable core XUSB host clock. + - description: Clock to enable XUSB falcon clock. + - description: Clock to enable XUSB super speed clock. + - description: Clock to enable XUSB super speed dev clock. + - description: Clock to enable XUSB high speed dev clock. + - description: Clock to enable XUSB full speed dev clock. + - description: Clock to enable XUSB UTMI PLL clock. + - description: Clock to enable core XUSB dev clock. + - description: Clock to enable XUSB PLLE clock. + + 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: memory read client + - description: memory write client + + interconnect-names: + items: + - const: dma-mem # read + - const: write + + iommus: + maxItems: 1 + + power-domains: + items: + - description: XUSBC(host) power-domain + - description: XUSBA(superspeed) power-domain + + power-domain-names: + items: + - const: xusb_host + - const: xusb_ss + + 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 XUDC controller. + + 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: + anyOf: + - const: usb2-0 + - const: usb2-1 + - const: usb2-2 + - const: usb2-3 + - const: usb3-0 + - const: usb3-1 + - const: usb3-2 + - const: usb3-3 + + dma-coherent: + type: boolean + +required: + - compatible + - reg + - reg-names + - interrupts + - clocks + - clock-names + - power-domains + - power-domain-names + - nvidia,xusb-padctl + - phys + - phy-names + +allOf: + - if: + properties: + compatible: + contains: + enum: + - nvidia,tegra194-xusb + then: + properties: + reg: + minItems: 2 + reg-names: + minItems: 2 + clocks: + minItems: 9 + clock-names: + minItems: 9 + + - if: + properties: + compatible: + contains: + enum: + - nvidia,tegra234-xusb + then: + properties: + reg: + minItems: 3 + reg-names: + minItems: 3 + clocks: + minItems: 9 + clock-names: + minItems: 9 + +additionalProperties: 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 Oct 24 07:41:20 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wayne Chang X-Patchwork-Id: 618026 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 48F16FA3741 for ; Mon, 24 Oct 2022 07:42:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229950AbiJXHmR (ORCPT ); Mon, 24 Oct 2022 03:42:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37218 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229954AbiJXHmJ (ORCPT ); Mon, 24 Oct 2022 03:42:09 -0400 Received: from NAM02-BN1-obe.outbound.protection.outlook.com (mail-bn1nam07on2043.outbound.protection.outlook.com [40.107.212.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C082860E85; Mon, 24 Oct 2022 00:42:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=F4jcqlz9NFoyEMjER9YqEYaAljRMsfz5qvv1Bcy9rLMNxpoKng8J/i9c1zd36/3A0jRuWb/MEG6Maz71gLQLiBqqlckhEN1eIMI29Hsa03AQa3YgwxsOYLal3ke55IgPu+bx9Jc4VtCfIUnLgruk1t+vFLAv5HysTKO+hrVTkaj0JNr2oCsb76bHD9a1UcrP+YjtW9dOQYR61Y1VWL0548LG02G5tPyIIlPy9XPFA7uQ9TldtLYVVZA16cj4Gmy9addhJe9Q2JVoODfq5VE8o2Rmuuk0u1xF81FmFw78551Irb8AHSdviHeXnX0s3s5qi6H8wamITshBy1MhH5hZ7w== 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=3P5MLT2jVkkm4pUw4ihlcN391Lg9Qk+F6RA2HSmM1Jo=; b=AWbdUr5hQ2zlCdLWByyy+VFArTuv0ABgOFemgSu1oGSFewokqLkKkMOTdqHF3QqVcn05XY16SdonryYCBYJ3h0W6RdjXTDc4nJD5PgyYMDY96VqSXZ9MDF8RnkSQ9/2dYkMR6vUDFmaRkYoCRIpTORbRY07GNvLhcPNohLs/iETGNgULyWJCUFaScUMMfS3yQGwR1QKydJG5h1nXETmNh9R1vd9pWFcsZcwvirGUrrQ2+pEWBPmz4p3rGW5X+EtVKmi5NHHXmrFhhIAie3QpoCiksLsCwC7xac/HM9fIth8DVtwnG+jPDY6ye8iUHtbXR/AuP/rXt/7XxzRQh8iiGQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.118.233) 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=3P5MLT2jVkkm4pUw4ihlcN391Lg9Qk+F6RA2HSmM1Jo=; b=a9zM8bm6DDIsIoi6j8t4xWS0ahlIxy+IPnp6tj5w3w96TZAlYnNhQAbcs9UUL8GGf+w6SwA4QayjhYxvMir6SdheoCL7WoNFI1oTZf82P11pLUoIA63Cg5K8JxnhGl/aouLjRf2njIgCWUoteP5V+7VxXg48ii4Kzs7HGn8xpGfoEU4KVAGtHDthCfSJlS0g3BiLoF9CeFFyRfV/NilXvRKbizjej6mPw3qBM0LmznpauLs0HGP46LmTujwMOzvL6iph5D0AribCmowyO2fIJbeOyJZNKWBeKEjAiQV3kXLrGWCkwnIshwPEO8qLZZzHPE9++jI920VBNTgN7T6WmQ== Received: from DS7PR05CA0011.namprd05.prod.outlook.com (2603:10b6:5:3b9::16) by DS0PR12MB7654.namprd12.prod.outlook.com (2603:10b6:8:11d::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.21; Mon, 24 Oct 2022 07:42:01 +0000 Received: from DM6NAM11FT041.eop-nam11.prod.protection.outlook.com (2603:10b6:5:3b9:cafe::1f) by DS7PR05CA0011.outlook.office365.com (2603:10b6:5:3b9::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5769.8 via Frontend Transport; Mon, 24 Oct 2022 07:42:01 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.118.233) 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.118.233 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.118.233; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.118.233) by DM6NAM11FT041.mail.protection.outlook.com (10.13.172.98) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.16 via Frontend Transport; Mon, 24 Oct 2022 07:42:01 +0000 Received: from drhqmail203.nvidia.com (10.126.190.182) by mail.nvidia.com (10.127.129.6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.26; Mon, 24 Oct 2022 00:41:49 -0700 Received: from drhqmail203.nvidia.com (10.126.190.182) by drhqmail203.nvidia.com (10.126.190.182) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.29; Mon, 24 Oct 2022 00:41:48 -0700 Received: from waynec-Precision-5760.nvidia.com (10.127.8.13) by mail.nvidia.com (10.126.190.182) with Microsoft SMTP Server id 15.2.986.29 via Frontend Transport; Mon, 24 Oct 2022 00:41:45 -0700 From: Wayne Chang To: , , , , , , , , , , , , , CC: , , , , , , , Subject: [PATCH 03/11] dt-bindings: usb: Add binding for Cypress cypd4226 I2C driver Date: Mon, 24 Oct 2022 15:41:20 +0800 Message-ID: <20221024074128.1113554-4-waynec@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221024074128.1113554-1-waynec@nvidia.com> References: <20221024074128.1113554-1-waynec@nvidia.com> MIME-Version: 1.0 X-NVConfidentiality: public X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6NAM11FT041:EE_|DS0PR12MB7654:EE_ X-MS-Office365-Filtering-Correlation-Id: 98d1f769-0bd6-4fc5-c54a-08dab5933d3c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: sDQWNEgNzwdYkHssKr66W94mQHGJvVUukUXiY3yUlhY6+yj5H3RBPp+9rrt2V9APcNg/Awsvogm+KgbeXXvkSDzjOH/6P8JkTSs5x+SUwXwztQjbRKSKCRCCUizTq+4Gaf6aBWv13ploluu2/D4gd3TUI65Z1HFv2KITffLcTNlzXmIfRI17PbsucgcLN+68Bv+ZdgvjYQIXqugI88/3ekVfLGtABQsNwDlzSZ/+1r7MiX7j3LMy2lwWEjs3fDxnrDdK8gYxvoP2G8UORMLybViY930BjbdvoQ3sH8WfEIl3EQHZVYYTAcKm5tghCrnH+YA8SIToat/HqNjD8W6UpZcbIS3tQ8kCJZDddeS7bE35uFqeI/9alP8NcfcIxxfSYhJ6uU7itjtWpld/Z29CHLsfZqCI/kP07d0XyvJ/PQjPDMxNNIFxSqsw2qY9/NAk4wvbPmXjk6P8xo7wlTTe97301rcF3BSuzRQzbGY+z7hG62rzOeCfX77HgIco8j5io1Y70nn6OYH9hyWiUaJDizip+8KmyZW8VmMlQqhiL3YyJru8XKGJw4F9WMv4wucat4sKeB7JTWwK/pbKzvN2N/TjEA0SvQrk6McUHsN8a8yhCFsQoLj/55/lrivNQCKdy9YHMFs+Deu9ufGnZx3RaJ9eO1dfI6tX41L43B0MlzFN/XapOTLGbFG+r0FjOJaUcw/sYakPbwIViB79e31EXZqLuQdHCobM4u7ABxq3VytAGFEFC6CgDwxGyKpo+Rn8H27ZoLPGgEX3mBVZaTXmg0DdRmiSjUDKUusEcshNRAZ81Gz3pwiMUCUQsamJytx1B0T2pcoVGwJTo9gknqfRitbfQhO1i1w1p0qWnthiAc+rEdhqgHubgjdHDUYnIhi+ X-Forefront-Antispam-Report: CIP:216.228.118.233; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc7edge2.nvidia.com; CAT:NONE; SFS:(13230022)(4636009)(39860400002)(396003)(376002)(136003)(346002)(451199015)(40470700004)(36840700001)(46966006)(36756003)(36860700001)(86362001)(2906002)(82740400003)(336012)(40460700003)(2616005)(47076005)(1076003)(186003)(356005)(7636003)(426003)(921005)(6666004)(7696005)(26005)(966005)(316002)(110136005)(5660300002)(70586007)(54906003)(40480700001)(6636002)(41300700001)(8676002)(70206006)(4326008)(82310400005)(7416002)(8936002)(478600001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Oct 2022 07:42:01.7153 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 98d1f769-0bd6-4fc5-c54a-08dab5933d3c X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.118.233]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT041.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR12MB7654 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 --- .../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..5ac28ab4e7a1 --- /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: + maxItems: 1 + + cypress,firmware-build: + enum: + - nv + - gn + description: | + the name of the CCGx firmware built for product series. + should be set one of following: + - "nv" for the RTX product series + - "gn" for the Jetson product series + +patternProperties: + '^connector@[0-9a-f]+$': + $ref: /schemas/connector/usb-connector.yaml# + properties: + reg: + maxItems: 1 + +required: + - compatible + - reg + - interrupts + +additionalProperties: true + +examples: + - | + #include + #include + i2c { + #address-cells = <1>; + #size-cells = <0>; + #interrupt-cells = <2>; + + ucsi_ccg: ucsi_ccg@8 { + compatible = "cypress,cypd4226"; + interrupt-parent = <&gpio_aon>; + interrupts = ; + reg = <0x08>; + cypress,firmware-build = "gn"; + status = "okay"; + #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 Oct 24 07:41:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wayne Chang X-Patchwork-Id: 618022 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 EFE29C38A2D for ; Mon, 24 Oct 2022 07:44:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230076AbiJXHoa (ORCPT ); Mon, 24 Oct 2022 03:44:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38018 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230259AbiJXHoA (ORCPT ); Mon, 24 Oct 2022 03:44:00 -0400 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2053.outbound.protection.outlook.com [40.107.220.53]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 44656625E0; Mon, 24 Oct 2022 00:43:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QRAIDRrL9hhp6gCeQWUjvnLMvBLYMDq5j4gduxIHR1mdWTq/0xePoEBNGcxsswx2F6vlAQkXWvl3ZFnR2Lmv+hj7eQZXSLAARe9361vo42Z5b1KGmTe/0fMB0GPSHuNBeleEvzTll0+TG+vhA3IcQjHfusdxBBJ0S8rh/AC0TW04n/Z5IL/9WPnaPqv6ItP3jRmyQQ04rf8NM2SnUKzI3bTpHiGKbtBkHgnD9qm3xgoAifm/WawoyEfjyY0vRd6MexohqyK2OoGro3GFMf/m6fAnimja5yUFUbLOsD/+vD42LWYuNg7sYMWsSdfGw94xxN0dysS2cCySJOUEkMfj7A== 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=AhSz5jILqnukDwOGOPi+0uJTqbDtoYlWacteSGGHesE=; b=LlAI0fqMT7evrpieEK8O/ACuI8roaz95jRGcuQbaf2N53PT7qOQqXXQ2nlIRtmgEZrX9MHPtPe2fde5xFPb0HoVnLZIqgThTJ4LRFw0T9UhGlQ0Q2ZPEvPni1D6WhGbAOzrm8k8qI4anUcxczdH6a1y+Ono6GoxIWiM8i1Sf5tlok5qYB+LIOR7wfTbtzZ2VnqPxYCaUNZo6Igirz9YZ1fozg0H/S3KHH1OuZ40GdS3G+03P0u0+uDUuap6uY/0EAdZTF34JPozfLRi9ul1sxNTduoiIXmcJvBN84QkvsbuuceON3W5iHDEn+aKZunc8rDmJ6LUCbcHyIwdQflR5vQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.118.232) 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=AhSz5jILqnukDwOGOPi+0uJTqbDtoYlWacteSGGHesE=; b=RRaik/uVQJeH0M9HnleC4TbK8Opp98VqWyDGakID6Pr8HTQ9SQvoBMpGn6Ef5Z3X4sDl/MgS6zMPHakHFpLC8NfvXHVj+a3DgmBwRBXZ/vcvcfNztgHlxtqj1XO+Rx3cB5JVJxAmjVowfbayChHG3IkiaFle6IdKSJTbKxIjI8XsuQYn140nC5TfnN//5BsZ5hMQ5vqQWq28vbfkZqf2Uv5CZlUChv1M5V87k9+AY/aXmKY45LvOPne/YkPOXeq9oZntyJtiP6P0w7FKLuUY2IcHREqbDOj0lAg8As5JrWng3WJnGBya6j0MUei/k5cGicDUPGzUVjag78u31NT8jA== Received: from BN0PR07CA0024.namprd07.prod.outlook.com (2603:10b6:408:141::33) by MN2PR12MB4223.namprd12.prod.outlook.com (2603:10b6:208:1d3::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.23; Mon, 24 Oct 2022 07:42:08 +0000 Received: from BN8NAM11FT055.eop-nam11.prod.protection.outlook.com (2603:10b6:408:141:cafe::c6) by BN0PR07CA0024.outlook.office365.com (2603:10b6:408:141::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.23 via Frontend Transport; Mon, 24 Oct 2022 07:42:08 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.118.232) 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.118.232 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.118.232; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.118.232) by BN8NAM11FT055.mail.protection.outlook.com (10.13.177.62) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.16 via Frontend Transport; Mon, 24 Oct 2022 07:42:07 +0000 Received: from drhqmail203.nvidia.com (10.126.190.182) by mail.nvidia.com (10.127.129.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.26; Mon, 24 Oct 2022 00:41:52 -0700 Received: from drhqmail203.nvidia.com (10.126.190.182) by drhqmail203.nvidia.com (10.126.190.182) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.29; Mon, 24 Oct 2022 00:41:52 -0700 Received: from waynec-Precision-5760.nvidia.com (10.127.8.13) by mail.nvidia.com (10.126.190.182) with Microsoft SMTP Server id 15.2.986.29 via Frontend Transport; Mon, 24 Oct 2022 00:41:49 -0700 From: Wayne Chang To: , , , , , , , , , , , , , CC: , , , , , , , Subject: [PATCH 04/11] arm64: tegra: Enable XUSB host and device on Jetson AGX Orin Date: Mon, 24 Oct 2022 15:41:21 +0800 Message-ID: <20221024074128.1113554-5-waynec@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221024074128.1113554-1-waynec@nvidia.com> References: <20221024074128.1113554-1-waynec@nvidia.com> MIME-Version: 1.0 X-NVConfidentiality: public X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN8NAM11FT055:EE_|MN2PR12MB4223:EE_ X-MS-Office365-Filtering-Correlation-Id: 2cc9531a-2032-4b9b-9702-08dab59340d5 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: oMs3i0TzDcnR8fOI+wBZQvraq8z1ExXeOpPqb9cLDFly8aI/xwyi4dYhioF947W+jgFPiesojdYM3XraL7nSsX56gw/rifupashy3ClSigRkaTx8gRztktIWiE/VA93kDjzCrLXuvjHn6SXc84MObQrzGNvpx7TNBSI7xDHbXs7STeRQ1qm0DEhWnQ6osAYpCH9p266NUYMdcAZtML3ZgdOAYR0z3OL7pB9jesfe9MFX+xOsmzfl0kCWki/QyFEkT6ewJRjiPDm1dOGhd+xo3I0jxeGDJ8VoKdebKzfdPm2zxiPZkSx4NHGPVaVPVoxolWFVnkrHn9YBYyXkAFGL2wCpK1usUnOuRgoQnRqaYWvSMjQP6yMGf5o0Ee//0hJz9Kwqko1p5loHYdIZw5Op62c3Dm66/ejY2Yl1nR6bSFOw7eOAmMAy7FXywMaq4tQP3Y6N5XpqQs1Y51FCPU91ySj9B2akdYYRuJ6+SRVaoRCzAKoeV6N0GizLbk/eqm//zeekxqIzbW9godj4PAs5C4Musi7tSGcT8YDTY8097OH7nx/6vbKMWXIQ+m08S18meYB3MDH5xF78dzsb4a+/roo5K9Y95faHi/7GmpYkfgn2I1LYOUID726z0ScvyBJLCf6zS3mmYnUf4l/HZNO1pYKxH2LjdwEcY8k17DoC1p5aOmDrE2qySe+/mySfuwYlvI+Dlf3XCDgD043YCpVLOfo6ZSLFC/igyLAKeVAnKLPmK/vV9NNIcE665TPH/j8xSMFyGIHH15rnt2DxxzRaNmvnqkn1ToPhFTRAxbTLp4k= X-Forefront-Antispam-Report: CIP:216.228.118.232; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc7edge1.nvidia.com; CAT:NONE; SFS:(13230022)(4636009)(376002)(396003)(136003)(346002)(39860400002)(451199015)(36840700001)(40470700004)(46966006)(478600001)(36860700001)(336012)(2616005)(82310400005)(186003)(1076003)(54906003)(86362001)(8936002)(26005)(83380400001)(40480700001)(426003)(36756003)(47076005)(82740400003)(110136005)(6636002)(41300700001)(70206006)(921005)(70586007)(7696005)(7636003)(356005)(5660300002)(6666004)(2906002)(40460700003)(7416002)(4326008)(8676002)(316002); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Oct 2022 07:42:07.7031 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2cc9531a-2032-4b9b-9702-08dab59340d5 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.118.232]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT055.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB4223 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 --- .../boot/dts/nvidia/tegra234-p3701-0000.dtsi | 48 +++++ .../nvidia/tegra234-p3737-0000+p3701-0000.dts | 184 ++++++++++++++++++ arch/arm64/boot/dts/nvidia/tegra234.dtsi | 170 ++++++++++++++++ 3 files changed, 402 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..b4630280bb32 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,190 @@ 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: ucsi_ccg@8 { + compatible = "cypress,cypd4226"; + cypress,firmware-build = "gn"; + interrupt-parent = <&gpio>; + interrupts = ; + reg = <0x08>; + status = "okay"; + #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>; + #address-cells = <1>; + #size-cells = <0>; + hs_ucsi_ccg_p0: endpoint { + remote-endpoint = <&hs_typec_p0>; + }; + }; + port@1 { + reg = <1>; + #address-cells = <1>; + #size-cells = <0>; + 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>; + #address-cells = <1>; + #size-cells = <0>; + hs_ucsi_ccg_p1: endpoint { + remote-endpoint = <&hs_typec_p1>; + }; + }; + port@1 { + reg = <1>; + #address-cells = <1>; + #size-cells = <0>; + 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 Oct 24 07:41:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wayne Chang X-Patchwork-Id: 618460 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 5130EC38A2D for ; Mon, 24 Oct 2022 07:42:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230025AbiJXHme (ORCPT ); Mon, 24 Oct 2022 03:42:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37774 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229983AbiJXHmT (ORCPT ); Mon, 24 Oct 2022 03:42:19 -0400 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2045.outbound.protection.outlook.com [40.107.94.45]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0741E61120; Mon, 24 Oct 2022 00:42:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Q1WF0XshzKCeiQvrpat2zcO3mLCaO3kfy6dlM1Rt+lMykx1JFk7GrZQzTFuiGw0rD0lZeo7QMiDTRXHZxJJRVhQbAKHb/Eph+3r5o/5n53//ovfJxZoNdjU1fVhceDEzqg2DR4X8DLOElu0uwT9cgCjDE20vdFZlz1n9VC+VuzHRbb+UsyjouWPXzdMHn2ZZ/uGL2UUDEac3Z2DXXwvuZ2ft4BZOH/OyGLsWM5c1AaRKhQ9uE1Cm3iIg3wJUZITJQNWAllwd4NGeifgAQvSt/+MMz78phmcgZjd1gA2M62go3fMRmFNipX4Vb4UpuhjMr8tRX3u7tmIlHWCRkBXVxQ== 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=2ZADKEKyb7ZRoK05ik5EAXlgC6ZETnTBJHfJ2wKnbNQ=; b=kkMSNuXCpn1ywCGMz9DPU7JrQaDMjt4ngduekozx7ZeM8Us2+tOyP1/pnq3ybrPQjLgaLKDtcplv0xZmywWlLyZBa3lKFzocN8B/As5jdU6scSlcJdU8c+jGrVb6nJzyegLPCCFABdunnuiQYFthNc0xgX7JzvqQhJbVU/5vomYWknA38Sfrzs3b6d6xcgGDmSofd9sRzcc7dg3ZlSD02QKolBzgwot1xJA8KXCbxpKflFTfA94BXpnwHipn0wr8Lf/VLZLlEImbRiXlJ5TfAxr60PMnBCTV19bcZABQGaBNAHb+6rfQTMa1TMg4LrQjHKEgF35NtZjXqTBtREnfMg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.118.233) 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=2ZADKEKyb7ZRoK05ik5EAXlgC6ZETnTBJHfJ2wKnbNQ=; b=WkWHXd91mVVWcCHyW+AlBAw0BrBTvpKA25Zuh5aBKzWxfBvejfRl7SN5Y084jngSrlPSFivc4aKqavtvA/lvdZqG4yy+vgRVGrURVwqZgQIW+46SQwjlrfSVC5kYY2PL5YqmhfF2cFacW7LAY96yyF4lWs4EIaXzhlR3exr2yuA/Wc8RA/KnAga5pJ0Vm/M8XlxKyl2PqXbZ9Yzfs44YbgN9sJehI45M/j2nmzq6svlLOGLKUE9atgBV63RiUF0MukkixqdN4N2D2uFiS7c+rE2+Zmmej2DXc84Ve3xc1wsAvTaSgtUKR5q4joON/iHH3VSDZu9rqfabPrUv2+Wzqg== Received: from DS7PR05CA0001.namprd05.prod.outlook.com (2603:10b6:5:3b9::6) by LV2PR12MB5822.namprd12.prod.outlook.com (2603:10b6:408:179::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.29; Mon, 24 Oct 2022 07:42:06 +0000 Received: from DM6NAM11FT041.eop-nam11.prod.protection.outlook.com (2603:10b6:5:3b9:cafe::37) by DS7PR05CA0001.outlook.office365.com (2603:10b6:5:3b9::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5769.8 via Frontend Transport; Mon, 24 Oct 2022 07:42:06 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.118.233) 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.118.233 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.118.233; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.118.233) by DM6NAM11FT041.mail.protection.outlook.com (10.13.172.98) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.16 via Frontend Transport; Mon, 24 Oct 2022 07:42:06 +0000 Received: from drhqmail202.nvidia.com (10.126.190.181) by mail.nvidia.com (10.127.129.6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.26; Mon, 24 Oct 2022 00:41:56 -0700 Received: from drhqmail203.nvidia.com (10.126.190.182) by drhqmail202.nvidia.com (10.126.190.181) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.29; Mon, 24 Oct 2022 00:41:55 -0700 Received: from waynec-Precision-5760.nvidia.com (10.127.8.13) by mail.nvidia.com (10.126.190.182) with Microsoft SMTP Server id 15.2.986.29 via Frontend Transport; Mon, 24 Oct 2022 00:41:52 -0700 From: Wayne Chang To: , , , , , , , , , , , , , CC: , , , , , , , Subject: [PATCH 05/11] usb: typec: ucsi_ccg: Add OF support Date: Mon, 24 Oct 2022 15:41:22 +0800 Message-ID: <20221024074128.1113554-6-waynec@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221024074128.1113554-1-waynec@nvidia.com> References: <20221024074128.1113554-1-waynec@nvidia.com> MIME-Version: 1.0 X-NVConfidentiality: public X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6NAM11FT041:EE_|LV2PR12MB5822:EE_ X-MS-Office365-Filtering-Correlation-Id: df9f90be-f8b8-40bc-7594-08dab5933fdf X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: u/KFS+WBNTkE4Ut33q5VMEVgR81wuoLN7FqrBYG3Ot5J3iXI2tiV6nYkz0GLmyNy60rrqfGwsZYwN/N2fOdDSYU5p8eoKDjsdVk78uC+BqzSd6nP5NtXqVxSQQhiu/r8hTmQyhjWZHFFj464/QK9Ez6vXJSneWDaSf3G0dJuNDYMRXkbTgFWFOI/Fa+MeuFbZfF6DRaYX/XwR96PepzSdt8FJhSLuBa6Gvo0Y61bi7bBmf1iuVm7ek0M2wQwKEK47Rd9J8j73Xzm6zBSr+oUjJ86Zcp3dDPXHFtyZZJhnaCgHtPz7QUnggFv4ET4cWP+Obyvj2pJqpFx10XQAU2xfVJ8WsKPloi2GZYOnUqmiUZ8L4NotP/VCGjXw2w6IhUMA6PIWWHCvQ8/bz2GByAdcyaE+Duswua+o+n7hCJU0IDHfqvwpvJtGcZFeg9zkZtyF3i62/YBn4LPkGMqY4vn5Ow+3jVrPsgYTobzuAijv7npAc8lGLwNnegBucejWOqH1Q7qo0Ney0Mrql455iHXdDSilA4nArWFojwwrF3J2l3pijiB7KMq41JlW+NRBfZsFzho2cXPf7yyhdFNte8MFhhx8MML7bWrEc3ZTyX2qs7q08eCut+J8AxpDcqpxAuMAw0/GuWE/Bbkp2H/Y7rRujSfApDmYtCEGWcIxi9oxVDfVjVFEw/mx36cbs5aO59oB9cn9yatf2hivjrfjGLhkQlSQf3Vsj4DWcsr0iS0ltKdhbpJcZw9L5aRua6Bmr3Kwh2ctBIq12BCNEuYlaYbsUt+qf6x4CC1ps6LGcC93mo= X-Forefront-Antispam-Report: CIP:216.228.118.233; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc7edge2.nvidia.com; CAT:NONE; SFS:(13230022)(4636009)(136003)(346002)(39860400002)(396003)(376002)(451199015)(36840700001)(46966006)(40470700004)(8936002)(2616005)(54906003)(40460700003)(186003)(7696005)(36860700001)(426003)(47076005)(26005)(6666004)(40480700001)(7416002)(1076003)(6636002)(5660300002)(82310400005)(316002)(70586007)(110136005)(70206006)(41300700001)(478600001)(8676002)(4326008)(83380400001)(336012)(2906002)(921005)(36756003)(82740400003)(86362001)(7636003)(356005); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Oct 2022 07:42:06.1213 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: df9f90be-f8b8-40bc-7594-08dab5933fdf X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.118.233]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT041.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV2PR12MB5822 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 --- 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 Oct 24 07:41:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wayne Chang X-Patchwork-Id: 618025 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 16C41FA373D for ; Mon, 24 Oct 2022 07:42:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230033AbiJXHmf (ORCPT ); Mon, 24 Oct 2022 03:42:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37798 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229959AbiJXHmU (ORCPT ); Mon, 24 Oct 2022 03:42:20 -0400 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2042.outbound.protection.outlook.com [40.107.243.42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8AB886112B; Mon, 24 Oct 2022 00:42:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SV7Om4jbultOKD7fEKquOjJi3ae5XF9KHS6rLnavHHZAITfzZQJ05B5iP7jbQcooQ9oVDZVVLnIihgPbq/WcWcWfgqfPoU0CumOHOau2K1j7EmgtZi+CgmHjSBEqiTg/HLyPt83Xm6wrTBciWQYgqXWfFTrP4OmEpXfLQ50ZaE+lGv+Iot8Ap3p4tauRAMbsaxGkfUD3TpaIIlEwxJY7TLVAvdTxFXn7Ic8W5gg94BHrWvr9hBEoP10zYqEF7rZtSa/VgnNgtj/mQAMPE0pNDXb/uhCWF+PYUBQJznNbAanWvYSlZDFYTvsjB0OJ0sk5H04Kg1lmbC8MYmEfo35iWg== 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=+rwtb7/RpN/I5cxrexV0M2/iXpnfSaH0+kSxcLazcdY=; b=hmtxNecDrb3zIQLJWwTQVq894KfEtRkr9GnS4Eo0yLO4/vFNjhc+p6nzWz3txLUGhBeqrI8x0lbarqClgV7IEKLHTWlLQXIUYJOTUGpxsygMfPRRBPKjgUyi73Wwaw95wY57Pv/cl1e/QDwUn86WkLoCvmmml873PYdIjx3qLBr7+5M0P5a8JC/ZaMFMwud0I8u5C/WWtM8yLineqP+JdIkl4ST99BRbogPYqJ0lMmDrttW7Hc+xPl1oRY/1MjzUUn5wrOxcOutleWl2rSPSf35iJRLwTx8A48+2CpvQlPpLS/arvGkrmxPz/Z3tHNl3xPGjtCdqhXQogyYvT3npgw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.118.233) 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=+rwtb7/RpN/I5cxrexV0M2/iXpnfSaH0+kSxcLazcdY=; b=ExOFtQoWPFlBhIViIavReGQpDn77vXSIMvYDLCPsXJDERC2A6fXcrHYaO8LeEdReN6Rx1KyDwLl0NLZDe7U7b7vgqpKGbTS4joBJPCiVqqi5YFP62BP0VpTqgvdcAE/LqZp5Z+/iowbxNR8UyE+H4E2wY4uteca0FfaiigUEwZMx43fwK+6LTq0UMGu0ildEaBLJjOytp+vvmDk8gbPA2DJLau+tthmnWp5YO/KUqHknSYvGpIawWRH1wjFj1MrA7rm8KTPbM5g6pmL6xGkMM0K+Eo5Hv3HWyLzgSmM/uaH/AkaTVwYrcmC4lSSWlWdCyU4S8BK/Vum9lVzdfs17vw== Received: from DS7PR05CA0021.namprd05.prod.outlook.com (2603:10b6:5:3b9::26) by SN7PR12MB6863.namprd12.prod.outlook.com (2603:10b6:806:264::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.30; Mon, 24 Oct 2022 07:42:08 +0000 Received: from DM6NAM11FT041.eop-nam11.prod.protection.outlook.com (2603:10b6:5:3b9:cafe::ef) by DS7PR05CA0021.outlook.office365.com (2603:10b6:5:3b9::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5769.8 via Frontend Transport; Mon, 24 Oct 2022 07:42:08 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.118.233) 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.118.233 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.118.233; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.118.233) by DM6NAM11FT041.mail.protection.outlook.com (10.13.172.98) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.16 via Frontend Transport; Mon, 24 Oct 2022 07:42:08 +0000 Received: from drhqmail202.nvidia.com (10.126.190.181) by mail.nvidia.com (10.127.129.6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.26; Mon, 24 Oct 2022 00:41:59 -0700 Received: from drhqmail203.nvidia.com (10.126.190.182) by drhqmail202.nvidia.com (10.126.190.181) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.29; Mon, 24 Oct 2022 00:41:59 -0700 Received: from waynec-Precision-5760.nvidia.com (10.127.8.13) by mail.nvidia.com (10.126.190.182) with Microsoft SMTP Server id 15.2.986.29 via Frontend Transport; Mon, 24 Oct 2022 00:41:56 -0700 From: Wayne Chang To: , , , , , , , , , , , , , CC: , , , , , , , Subject: [PATCH 06/11] usb: typec: ucsi_ccg: Replace ccgx to well-known regex Date: Mon, 24 Oct 2022 15:41:23 +0800 Message-ID: <20221024074128.1113554-7-waynec@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221024074128.1113554-1-waynec@nvidia.com> References: <20221024074128.1113554-1-waynec@nvidia.com> MIME-Version: 1.0 X-NVConfidentiality: public X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6NAM11FT041:EE_|SN7PR12MB6863:EE_ X-MS-Office365-Filtering-Correlation-Id: 02e7cddf-5bf6-4740-c1b5-08dab5934155 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ShXVEtxBYSmttw8hbFJUDuJ0CMdxyoy5ap+Ctk+ZM+zvj/0zxYEPZBCP9q1l4tJqN/4T9SaJ2W9Au/+5tqcflnJbLi9tJYhk+fEswXL0JwdmBMoJRw3f1o5gsBIrNZfBIJFnM8peJSod55QqGXFp5Fj+ya+iweNTlE9xXOjZkB0cWgHK2atQPvQ4zbiopZ2r/7ZcBKU//sLXidU5XJzmuKOD7ew5fAVPD+8+EYR4Thl6FwWSWLGVPHrtSXYB8p27PmWUj9wcBGErwkwe0fh6HdfpxEas582j4upHZIrYAoM24utkO+obS3P9yk0gIbC3CJS39jmgF6Xl3o4knFISqvsfXrQLul+vOadSYGTv2oiBKKzWFMwNOuED6sql1waBdx4IpghqtHIZpXcepSjzUEGEnwODSincKKyHr6lgIqw070gLsTc7HtHpXrXT9N2ZAEIHshFNX68Z34hu024yqWgh5F9mP7/ZXXxyS3oirMP9f83Ufw0J5pf4oGlBOX4O+ToiXTwqFymX2s2qw/xV1uo6NQEODSrY4f/uR0zUzs4YxNDPL9fpO7U9FgP4CcPA5JPDvspABMvLIjk2aSKczlhz84CUZ7fjkQQ0BSpArInHmcQjpcnUNQUGhSHu9Buegrtl06u+LT1g665dYHkZX5JxeFwHJixew0hXSPqVf+fMADuGfi2Wfb1elkWV4PJylM+lVWNo6zxLQ77MydcWJ4382hqvTyrZ67AIg8v5j2FqCa93xYcgKNAn6GBm0nPoyL5ECiiaiPw4WGDMVk0iwUK/XBknh0uHf0z9ttBjHzE= X-Forefront-Antispam-Report: CIP:216.228.118.233; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc7edge2.nvidia.com; CAT:NONE; SFS:(13230022)(4636009)(376002)(39860400002)(136003)(346002)(396003)(451199015)(40470700004)(46966006)(36840700001)(7416002)(40460700003)(186003)(7636003)(41300700001)(26005)(4744005)(6666004)(2616005)(47076005)(336012)(82310400005)(86362001)(8936002)(1076003)(2906002)(4326008)(478600001)(5660300002)(40480700001)(316002)(82740400003)(36756003)(54906003)(7696005)(110136005)(36860700001)(426003)(8676002)(70586007)(356005)(83380400001)(6636002)(70206006)(921005); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Oct 2022 07:42:08.5118 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 02e7cddf-5bf6-4740-c1b5-08dab5934155 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.118.233]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT041.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR12MB6863 Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org ccgx is refer to the cypress cypd4226 typec controller. Replace ccgx to well-known regex "cypress". Signed-off-by: Wayne Chang --- drivers/usb/typec/ucsi/ucsi_ccg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/typec/ucsi/ucsi_ccg.c b/drivers/usb/typec/ucsi/ucsi_ccg.c index 139707a2f3d6..5d3099e6eb77 100644 --- a/drivers/usb/typec/ucsi/ucsi_ccg.c +++ b/drivers/usb/typec/ucsi/ucsi_ccg.c @@ -1358,7 +1358,7 @@ 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", + status = device_property_read_u16(dev, "cypress,firmware-build", &uc->fw_build); if (status) dev_err(uc->dev, "failed to get FW build information\n"); From patchwork Mon Oct 24 07:41:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wayne Chang X-Patchwork-Id: 618459 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 E098CC3A59D for ; Mon, 24 Oct 2022 07:42:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230040AbiJXHmg (ORCPT ); Mon, 24 Oct 2022 03:42:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37796 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229961AbiJXHmU (ORCPT ); Mon, 24 Oct 2022 03:42:20 -0400 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2058.outbound.protection.outlook.com [40.107.93.58]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 69E6460EA1; Mon, 24 Oct 2022 00:42:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VXt552mDWxAU7NCkMZyfwVTVFMC7WEIXYK1ImOkdw9u+OSsZdgb6RGek3x0iXn1j60HisMytygPcBQ7+wpL+QHoXwz2tbJbsU/FgNHpeV4xsiahxxHcKTmd5LCfRuxp499+fs+hIUcSJl6zA25WvPtNH0Yh3phb+otYwUzgebjr2Gpc4RAoW0ZiPwwICDysrncNULVp1e2+A3nTB5knfscIeSp0FqO8TOcr/44+Q2bg6CjJK27xif5lc5f2oiO1L0Rjb2DU/FZ96rRI6wDYXzSf1vxaNZ4T6MDUCt81AMNDP7Cu76+eIjeG+n2J9mIKqniSN8l5tVOanf+BonZgBQg== 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=TcBLF/mq2RZ/H9uP6zpacL5O9ahpQcoGYxQCfS4Y3W0=; b=DjtJ8w9+1Qn6VG/KaOsBYG47PTGxrs/HTJfLBKa+wgcGNH+AqU5/zA8p6nT5/QkVxYDeMLLmylfEzPgElTB75dTurDkNx2jfPAYFElAL5XaosrcR6dUaPInzfKY+A3M/mRVqcyT2oR4Vy7chcXGdSlhkF8b0Bgm5/xscbgVB6SwBPfi6+NYomE+i5wziAKf46YImYe5mFeQNTbHt7ZkyrQfbcgp4DGYi3A0P3jZJ+GkSNF0z8xAOQuG9vT8uR4wiQCbGzhoO/FYwfsh5jRi9PD8RTQnV8+uvJA1/FsIdVlO8AFuZ15NhZgsi5M3hN8GCih4ys2Fp7A1YN9iewNvKpQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.118.233) 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=TcBLF/mq2RZ/H9uP6zpacL5O9ahpQcoGYxQCfS4Y3W0=; b=Vuy472l7svX9No3w1Hoj/mPjmwvmFPk994IfQ7cEr5lYr7lAmkfdXBdf2uqom1kUH4s01f0KtF7UB5BOPcLP9vNJyhGj6gw6nAsYRbxSAFA3cPbJF5s2bc/qmMY3T3L1ZI8H2NAdPp3yGG5QMIkxcnDhE1gkZEWXmZdxKdECxHToxVNezUN5ozuWsEXAt1lzFzG5ETXL/O7Eo5V7P/gsh2mIhTVDBmuA8BSp1Iaee6m2J+JM5jG+CqH817pgLvIMmXRlLU5/q3BjmzXp6pxUcK4KZBAisB9WovGg9UGxPiXA8wMICj7IX7If8f4SkcHWz/jaXd3hiRRXRStYghi8ng== Received: from DS7PR03CA0163.namprd03.prod.outlook.com (2603:10b6:5:3b2::18) by CH2PR12MB4199.namprd12.prod.outlook.com (2603:10b6:610:a7::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.28; Mon, 24 Oct 2022 07:42:10 +0000 Received: from DM6NAM11FT087.eop-nam11.prod.protection.outlook.com (2603:10b6:5:3b2:cafe::50) by DS7PR03CA0163.outlook.office365.com (2603:10b6:5:3b2::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.26 via Frontend Transport; Mon, 24 Oct 2022 07:42:10 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.118.233) 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.118.233 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.118.233; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.118.233) by DM6NAM11FT087.mail.protection.outlook.com (10.13.172.150) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.16 via Frontend Transport; Mon, 24 Oct 2022 07:42:10 +0000 Received: from drhqmail203.nvidia.com (10.126.190.182) by mail.nvidia.com (10.127.129.6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.26; Mon, 24 Oct 2022 00:42:03 -0700 Received: from drhqmail203.nvidia.com (10.126.190.182) by drhqmail203.nvidia.com (10.126.190.182) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.29; Mon, 24 Oct 2022 00:42:02 -0700 Received: from waynec-Precision-5760.nvidia.com (10.127.8.13) by mail.nvidia.com (10.126.190.182) with Microsoft SMTP Server id 15.2.986.29 via Frontend Transport; Mon, 24 Oct 2022 00:41:59 -0700 From: Wayne Chang To: , , , , , , , , , , , , , CC: , , , , , , , Subject: [PATCH 07/11] i2c: nvidia-gpu: Replace ccgx to well-known regex Date: Mon, 24 Oct 2022 15:41:24 +0800 Message-ID: <20221024074128.1113554-8-waynec@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221024074128.1113554-1-waynec@nvidia.com> References: <20221024074128.1113554-1-waynec@nvidia.com> MIME-Version: 1.0 X-NVConfidentiality: public X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6NAM11FT087:EE_|CH2PR12MB4199:EE_ X-MS-Office365-Filtering-Correlation-Id: 821a76a5-297f-4167-afd3-08dab593422d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: awsvsxhX3GX0baoJMZfFpPwrQe0P3DTdUEESirzhPYV8PnxkUoSIVEWT6a+3eEYXQ7YU6KpWbOAcFI/Yog0mLJ2QmulK6GFjjXRdO6/YWkABf57DlnPC4rv7h0p0dxQF20y6tU4Clvyd3BPCQXRd5Tuyei+jY6iXyZuhoswwzpkvHaYQUdfrLrT/m3OnKA05/nwU5njEErPzkRfRIJhLvZBABUutkbbcYvLzbDt5H19NhXXUp14qkuemgWo2z9gzffjekMkBTsqEGUI2jovG480Mp5cHBOxnSHolyyFA+8QOZnRv1QcOjjnQ+pAJJhsg53gbqvGQc0K0lQnlHAeRygwHTP0ydNJWPxrbHqbSm10Gj0aq6TWDy3XpB1dj/nO2qTHiDswz/dN0hFreyGojRZQ9P1ttLuFsN6YAEgraEwKHZ92RmEisI6lUqb6UM9MxDEXoyfRj9TG3SLO+tgRSkXugjKlGDasPssuuFRs04oiHLpiKCLDjWbYJkTTUy/hKi/HCEqsj/33/+nnBod5UDwR0C59rcBEXPUNCNlWeWgW5olBoqpy7rN+B4xpI8hk1Ea0GtfFQZCZ8mKNaWoir3RRLzO2SIukWzQ+OJiMq3kDAD52VcCImVwwXrXHItwKq7xTzfqAFw7Os6riEKRXIs8tRMmSEFEKqSRNhmwTaGNKLyfyJ9qNYTt+LItHm15EpUTXzfMRLUA8usR1mxdI+lxQ/fnL3IaT10nLtJzMwaObOAeqJ+b9Kqe54VFyZ8PVfALpKhPPb0yUkhoslvfn8qYoQAbChKee+n9odnx1fTok= X-Forefront-Antispam-Report: CIP:216.228.118.233; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc7edge2.nvidia.com; CAT:NONE; SFS:(13230022)(4636009)(346002)(136003)(376002)(396003)(39860400002)(451199015)(46966006)(36840700001)(40470700004)(6666004)(2616005)(26005)(7696005)(1076003)(36860700001)(426003)(47076005)(336012)(186003)(83380400001)(4744005)(2906002)(7416002)(40480700001)(40460700003)(82310400005)(6636002)(54906003)(110136005)(316002)(478600001)(41300700001)(5660300002)(8936002)(70206006)(70586007)(4326008)(8676002)(86362001)(36756003)(82740400003)(921005)(7636003)(356005); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Oct 2022 07:42:10.0050 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 821a76a5-297f-4167-afd3-08dab593422d X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.118.233]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT087.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR12MB4199 Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org ccgx is refer to the cypress cypd4226 typec controller. Replace ccgx to well-known regex "cypress". Signed-off-by: Wayne Chang --- drivers/i2c/busses/i2c-nvidia-gpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/i2c/busses/i2c-nvidia-gpu.c b/drivers/i2c/busses/i2c-nvidia-gpu.c index 12e330cd7635..0934f8ad7f49 100644 --- a/drivers/i2c/busses/i2c-nvidia-gpu.c +++ b/drivers/i2c/busses/i2c-nvidia-gpu.c @@ -260,7 +260,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_U16("cypress,firmware-build", ('n' << 8) | 'v'), { } }; From patchwork Mon Oct 24 07:41:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wayne Chang X-Patchwork-Id: 618023 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 1B64CFA3746 for ; Mon, 24 Oct 2022 07:43:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230172AbiJXHnG (ORCPT ); Mon, 24 Oct 2022 03:43:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37886 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230052AbiJXHmi (ORCPT ); Mon, 24 Oct 2022 03:42:38 -0400 Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1anam02on2062b.outbound.protection.outlook.com [IPv6:2a01:111:f400:7ea9::62b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 094746110D; Mon, 24 Oct 2022 00:42:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mP3KAewv2aAKy6JXcPGctyR/gTuxq39jWwCnOV7RO8jlCS4nPvbybT9yUraDKhcowAQPyE7IJAyp8lfpSCeARwFYxrR4UcTBK7p2HxSj0AJBFt4GZP8M6Ry6ZODxbrbz99fvNlUgR93Z+q+PaXUslUVWgui7FmkXZ8ZTFhKLOEDQp+syPzfIvxYjrIF0vKyl61zR15nyVE7N6DISn31fzvnKwyGcl4o87uoFE+Y9unF6ABl65gfUOCP+XsxTxI0TNs/w0sCAM6mUgOTwQ8stC6lL4eTTsjBVDRLzlNCj05uRuCOR1IqNNs+7daG3s1vcvmxIFV1D5PYzscUcoD0CxQ== 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=UD6OlE4UhvJktg5lu6zNVkPtW2S5bf69ggfnIUC33Zs=; b=I1MZThcAlTU9SUzIT2SFIcuGbadhNzK2istOc8E4GBZG+4RlymbB7qAy3KOV/K8zVimJTytxCkxWFeofHm89O3CUdTN7t7jGkkn40wxCSXsbbWk/zv7of0yuU/CW5mXgEQA8UY4hEirVEc5XFfeu9jWX9wWqilUIyZQWgTpnuWWr70RGcYpBLM2NvkQ8WLrBOg/nLCixJ8tDu5f9kLqn/s9UZm5XL3ZQ5LVMg4S0igx+4QM90mxmi85amvCgRHvQX38qSMe5u8uu+/xei8U3sQv5B+drH0G1IWUNe2ueVk1uK2s7DrtHMVE4TXve9SfE0ilf3rjMIBCMIETAHzHowg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.118.232) 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=UD6OlE4UhvJktg5lu6zNVkPtW2S5bf69ggfnIUC33Zs=; b=YELKBu+Kj+BhcDqRM8UhiYsrcMT1I688Xi9zeps5D/+A2p3L5ZX2rshmUHxQnQbOmtAqi6vcbgUYtDS+1D7fRyO5H4/wbUaLXoeZ16qUIKpCd6m/hRCO5bu7k5wu2xCguFubW/TY9Pz2KmehG9vkYdT2EzToc0d4e2ya01TtSuwtd41yd+0VGnA1C3DrTwNmoB9k9j0OzEq4eOD7RcTIWnNuryAjrLmD+uJCPz4HdmzyVZo4957E1m9e1jG4BpPQqAVzslb8FvLuaPDYQuf8q1BMxoD5kHeXw0iYPKd8+zTTfcfzKwMfmuVeMl8vMvPWJE80b2ZZFagwAaimbn/f0Q== Received: from BN0PR07CA0024.namprd07.prod.outlook.com (2603:10b6:408:141::33) by BY5PR12MB4131.namprd12.prod.outlook.com (2603:10b6:a03:212::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.23; Mon, 24 Oct 2022 07:42:21 +0000 Received: from BN8NAM11FT072.eop-nam11.prod.protection.outlook.com (2603:10b6:408:141:cafe::5e) by BN0PR07CA0024.outlook.office365.com (2603:10b6:408:141::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.23 via Frontend Transport; Mon, 24 Oct 2022 07:42:21 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.118.232) 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.118.232 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.118.232; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.118.232) by BN8NAM11FT072.mail.protection.outlook.com (10.13.176.165) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.16 via Frontend Transport; Mon, 24 Oct 2022 07:42:20 +0000 Received: from drhqmail203.nvidia.com (10.126.190.182) by mail.nvidia.com (10.127.129.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.26; Mon, 24 Oct 2022 00:42:06 -0700 Received: from drhqmail203.nvidia.com (10.126.190.182) by drhqmail203.nvidia.com (10.126.190.182) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.29; Mon, 24 Oct 2022 00:42:06 -0700 Received: from waynec-Precision-5760.nvidia.com (10.127.8.13) by mail.nvidia.com (10.126.190.182) with Microsoft SMTP Server id 15.2.986.29 via Frontend Transport; Mon, 24 Oct 2022 00:42:03 -0700 From: Wayne Chang To: , , , , , , , , , , , , , CC: , , , , , , , Subject: [PATCH 08/11] phy: tegra: xusb: Disable trk clk when not using Date: Mon, 24 Oct 2022 15:41:25 +0800 Message-ID: <20221024074128.1113554-9-waynec@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221024074128.1113554-1-waynec@nvidia.com> References: <20221024074128.1113554-1-waynec@nvidia.com> MIME-Version: 1.0 X-NVConfidentiality: public X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN8NAM11FT072:EE_|BY5PR12MB4131:EE_ X-MS-Office365-Filtering-Correlation-Id: 855dc428-fa93-43d2-dc96-08dab5934897 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ASfFp+QFYC7IKUX6CfH+Ge6bN7obcRYYg11RmgdFsOTJrtV2HjTBELvV9hKK5z1yMltFFFZkgZG9SpBAcAEIUNQlgRs/jcG3flo3Nz7ZXmQ0vYF/2ifz9WeEmv+7ubA+MXKcyDqmI1RAi7uBgxJGlBZ2Oq7lxrcb8sNgOwu9fGWorN4Gl/qKEdjhA+JMJF10zstEc13ZaoEzZAbQ22KQicOBIOUIpKirbMV1HGXWaT0Eoyzl5g+/wMKy7ps5I1x+4J1767P7YE17tUEj1Li9rfz0IKvvAADTUZoQj38Pv069+dRHnVl80X3BDOC4D0ILSZiyzBmIGIQTo7Hu7hurbQX54rNO76W8wSYDLpyWMFGWAXVvIoF0qc51ZLJg8nhTF4svUub54TAroCz7LuxYvJR3agL0DsKXKtxViVaDDoyfFIt+R4xShZ16kH7zewW/Mtuy+DLo+yzhnQQ4Rgh6Edy8j2WnKm3ipkKW9T3LZRPiC03AphRXh/Q6RlvG0R19hhRZfNb5V9T0QBK/UCdOf2isRnRxGe7n7lBmv8Ln0iB0U2TUUH3EReqbwmhUdxevk4aAXg3Nl9GSJ0do3XbBv4EE3wT6MrNn5t7GSgZzE+IMEBlGa7UbRu6p/X552I4aaMtdjs7kyplvsTt1OeOC1cEsTqbzrTdGIDxtUCBRx03i3X391gKbIqdjmVO3OMd+x4zjNtv2G0tTx/FdwaNwnDEzX3JoWxcLXIlLZvxHqWPlpb+chLMMxFno1I74j3vnkwRdEBDWz4rFwqH4UlSZmy/kURFvgyZ2GxY3Tq2Twxs= X-Forefront-Antispam-Report: CIP:216.228.118.232; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc7edge1.nvidia.com; CAT:NONE; SFS:(13230022)(4636009)(396003)(136003)(376002)(346002)(39860400002)(451199015)(46966006)(40470700004)(36840700001)(82310400005)(40480700001)(2906002)(8936002)(82740400003)(47076005)(426003)(5660300002)(6636002)(7636003)(356005)(921005)(2616005)(7416002)(41300700001)(110136005)(54906003)(26005)(316002)(6666004)(36756003)(186003)(1076003)(36860700001)(86362001)(336012)(83380400001)(7696005)(478600001)(70206006)(70586007)(8676002)(4326008)(40460700003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Oct 2022 07:42:20.7203 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 855dc428-fa93-43d2-dc96-08dab5934897 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.118.232]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT072.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR12MB4131 Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org The change fixes an issue that the pad tracking is a one-time calibration for Tegra186 and Tegra194. We should disable the clk when it is done. The 100us delay is for HW recording the calibration value. Signed-off-by: Wayne Chang --- 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 Oct 24 07:41:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wayne Chang X-Patchwork-Id: 618458 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 A819AFA3741 for ; Mon, 24 Oct 2022 07:43:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230149AbiJXHnE (ORCPT ); Mon, 24 Oct 2022 03:43:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37776 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229981AbiJXHme (ORCPT ); Mon, 24 Oct 2022 03:42:34 -0400 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 8D88E4DB3A; Mon, 24 Oct 2022 00:42:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=H+mA+FVDRGnCBlSwMQFJriTXpEzpn6qJBNjkwBpWu+QkuX2evWYGcsxd3c56+eI/ZJhhV9/FtfC/124/k3KlrDaSQl9BnYIfV7ZB+p4Y0qZMtti61vxNmVlwOcBnjY3AXt05YMasSKzjFSHgK9WefiVlOCiFWCa8HUWXu0uN0aLVChjSawIkta9Nt3vD7VNmgk89sHZAvFh5TChunV8d0/bR///2WxE3+AYRAq0e3PL6TleqSVTyVf4bylNuwo3oq6/zl4ZFeLF2Unj4Tr6LkKLxhOnaR5izO2bbBn/7sPA8GNzRmRqgrQp+3ulc0qsUM/lmctRHNmvZWcc8FADPtg== 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=r8cf9GVdx5sRqGXNt6fGcCPxZa/EL1AS2tqtVZPD/co=; b=EafJK0POdPXsbNj1riEV3i5OTGmqACgFLSMG+CC5urPuejgpAYZYBqrbXwaIvCLeZr3wS+l2q0TZ++CaWwOsq3WOTCr5byZuPDRpiMFgQfj7xSBUSAIV8cnjIopehnzvXow0aJOLuyV8eGf2G5W8+mP8Yts9lcSMo2IP5un0/VpexhAe1/ACpSZ/0n7q1Vh04JXu/U5niB9SG7RN7mxRZnz8WZQDeem7FOl4HSLgD9iiBdrGdPwqTlvBLdoZ70BvzaFfMcpaT7ibQD38iI9jHOPqf9rLL0z+lQ7w++1+7HBlsCI6GH8nP8hhbzzqntmaybOOOVIaLQjmCYIBTS39bQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.118.233) 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=r8cf9GVdx5sRqGXNt6fGcCPxZa/EL1AS2tqtVZPD/co=; b=LeDNpRKJdG/WCZOIRFR7+YzwJNedQOxS/zkbONLmWyqkOSB4G4ehowMS69NCobL8cl2Gc99Xm3ydtnCue4JX2ubNmR8c0TmM9jvStNJPqmjyLJurjj4pEbQsO3Wthdr0mzZ1koHwLo03op8kteFCf83tocanwdo8VcwTx/UG/WuFikn8D9EhNPLlZax96AYMHOGUB4qk0FI39tYBwDkn0ZZc9c27h7pijomz6e6I7Sd2hxGGSnno9WRXjjAJeH5FwxL7s/cbvcz6+8UcNEroFBl03ZxCOd6Y7Qhay9Q9cvD9TfMGaj5N6usWBmNq5MruPjRq/s/rxZrfSPtO0YHdTg== Received: from DS7PR03CA0237.namprd03.prod.outlook.com (2603:10b6:5:3ba::32) by CH2PR12MB5020.namprd12.prod.outlook.com (2603:10b6:610:65::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.22; Mon, 24 Oct 2022 07:42:22 +0000 Received: from DM6NAM11FT015.eop-nam11.prod.protection.outlook.com (2603:10b6:5:3ba:cafe::78) by DS7PR03CA0237.outlook.office365.com (2603:10b6:5:3ba::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.27 via Frontend Transport; Mon, 24 Oct 2022 07:42:21 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.118.233) 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.118.233 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.118.233; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.118.233) by DM6NAM11FT015.mail.protection.outlook.com (10.13.172.133) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.16 via Frontend Transport; Mon, 24 Oct 2022 07:42:21 +0000 Received: from drhqmail203.nvidia.com (10.126.190.182) by mail.nvidia.com (10.127.129.6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.26; Mon, 24 Oct 2022 00:42:10 -0700 Received: from drhqmail203.nvidia.com (10.126.190.182) by drhqmail203.nvidia.com (10.126.190.182) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.29; Mon, 24 Oct 2022 00:42:09 -0700 Received: from waynec-Precision-5760.nvidia.com (10.127.8.13) by mail.nvidia.com (10.126.190.182) with Microsoft SMTP Server id 15.2.986.29 via Frontend Transport; Mon, 24 Oct 2022 00:42:06 -0700 From: Wayne Chang To: , , , , , , , , , , , , , CC: , , , , , , , Subject: [PATCH 09/11] phy: tegra: xusb: Add Tegra234 support Date: Mon, 24 Oct 2022 15:41:26 +0800 Message-ID: <20221024074128.1113554-10-waynec@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221024074128.1113554-1-waynec@nvidia.com> References: <20221024074128.1113554-1-waynec@nvidia.com> MIME-Version: 1.0 X-NVConfidentiality: public X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6NAM11FT015:EE_|CH2PR12MB5020:EE_ X-MS-Office365-Filtering-Correlation-Id: bf6e61b6-4eb1-48e9-2657-08dab5934920 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: NVLixrIzIppHSasxMK9iD8GLgNcrzZP7v2V/aYF9yNuYzQK5YZQsg68z7oX2XDo0nRAcPTSBlK2VOTNtAs5bXcsSVE/cQmjKo2HZM+Cr3sAkuZnRn/njipBIg+61gDSE4FixFviTnR8F4r5B1uuw1SzqRnGlj39NDNQlaV5loxTLG/SclZkPAEJgBhbeSgz7JWezvrao0MqNaTY/6/3KxkDviegF/B9X9j8hqt42mxyGpzGNPTDhkyO0cAdeROK8U4gDpVCk/Ym1SVWjJTBCFCrIUAe7hZ6yvnPgAyV5nTRBXtcqtArEFoHF0v+pOf6Wt/+WnBhC2T5xpOjaE2EoHozzcGfSjrambDVAYPWI9N8Bp3XWdnDJ03iHzH3kWgzYpRtBkoaPcLXHPzl4rMHAKSkbQOX5kylunWCh4uIDXE+EyXfUIhwRDCiyiHfnuKs39HBTTAyaWfSqBuUR/CI4ekU6kwPgEtzGOHidUKPqAlutGDGKsJu4XeYcZKZqUk6GW+qkFkbTNbK8OSUEt1972VjLtHd7JkGUYBWoGaUa1z7VFg9k6FPTvArI92zEMIpqMICmnHYB1Q7XIqQYRUXfBuf3m8dkViLKNMQK56cGyW3cslZXmVBGQRpE54GpFtzU2yzCTBN9iExMWOwzSuF5KAC1VMslZH6/1ZIRiu0+ZiiQzF0FpvyZ6YsEnVf5Nt51a3fwdsdtyNFpP8XhOLHtRTOkBlst2qerEMuB2u2C+75ByF7kkoAIWB1ldOyB4m+npjtneH1rQwuFzEcqxNXUlxZzZOtN8pxeBNQflO++5EA= X-Forefront-Antispam-Report: CIP:216.228.118.233; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc7edge2.nvidia.com; CAT:NONE; SFS:(13230022)(4636009)(376002)(136003)(396003)(346002)(39860400002)(451199015)(36840700001)(40470700004)(46966006)(47076005)(426003)(186003)(1076003)(336012)(40480700001)(6666004)(2906002)(86362001)(356005)(921005)(7636003)(36756003)(40460700003)(82740400003)(82310400005)(83380400001)(7696005)(26005)(4326008)(36860700001)(2616005)(316002)(8676002)(478600001)(6636002)(41300700001)(110136005)(70586007)(5660300002)(7416002)(8936002)(54906003)(70206006); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Oct 2022 07:42:21.6604 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: bf6e61b6-4eb1-48e9-2657-08dab5934920 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.118.233]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT015.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR12MB5020 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 --- drivers/phy/tegra/Makefile | 1 + drivers/phy/tegra/xusb-tegra186.c | 65 +++++++++++++++++++++++++++++-- drivers/phy/tegra/xusb.c | 6 +++ drivers/phy/tegra/xusb.h | 23 +++++++++++ 4 files changed, 92 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..cc02cea65a21 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,32 @@ 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 +665,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 +1595,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 +1652,31 @@ const struct tegra_xusb_padctl_soc tegra194_xusb_padctl_soc = { .supply_names = tegra194_xusb_padctl_supply_names, .num_supplies = ARRAY_SIZE(tegra194_xusb_padctl_supply_names), .supports_gen2 = true, + .poll_trk_completed = true, }; EXPORT_SYMBOL_GPL(tegra194_xusb_padctl_soc); + +const struct tegra_xusb_padctl_soc tegra234_xusb_padctl_soc = { + .num_pads = ARRAY_SIZE(tegra194_pads), + .pads = tegra194_pads, + .ports = { + .usb2 = { + .ops = &tegra186_usb2_port_ops, + .count = 4, + }, + .usb3 = { + .ops = &tegra186_usb3_port_ops, + .count = 4, + }, + }, + .ops = &tegra186_xusb_padctl_ops, + .supply_names = tegra194_xusb_padctl_supply_names, + .num_supplies = ARRAY_SIZE(tegra194_xusb_padctl_supply_names), + .supports_gen2 = true, + .poll_trk_completed = true, + .trk_hw_mode = true, +}; +EXPORT_SYMBOL_GPL(tegra234_xusb_padctl_soc); #endif MODULE_AUTHOR("JC Kuo "); diff --git a/drivers/phy/tegra/xusb.c b/drivers/phy/tegra/xusb.c index 95091876c422..23d179b1a5b5 100644 --- a/drivers/phy/tegra/xusb.c +++ b/drivers/phy/tegra/xusb.c @@ -71,6 +71,12 @@ static const struct of_device_id tegra_xusb_padctl_of_match[] = { .compatible = "nvidia,tegra194-xusb-padctl", .data = &tegra194_xusb_padctl_soc, }, +#endif +#if defined(CONFIG_ARCH_TEGRA_234_SOC) + { + .compatible = "nvidia,tegra234-xusb-padctl", + .data = &tegra234_xusb_padctl_soc, + }, #endif { } }; diff --git a/drivers/phy/tegra/xusb.h b/drivers/phy/tegra/xusb.h index 8cfbbdbd6e0c..ec0b5b023ad1 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,23 @@ 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_atomic(padctl->regs + offset, regval, + (regval & mask) == val, 1, us); + dev_dbg(padctl->dev, "%08lx poll > %08x\n", offset, regval); + 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 +511,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 Oct 24 07:41:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wayne Chang X-Patchwork-Id: 618024 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 3C05EC38A2D for ; Mon, 24 Oct 2022 07:43:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230133AbiJXHnD (ORCPT ); Mon, 24 Oct 2022 03:43:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37774 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229978AbiJXHme (ORCPT ); Mon, 24 Oct 2022 03:42:34 -0400 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2044.outbound.protection.outlook.com [40.107.243.44]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1C2976113D; Mon, 24 Oct 2022 00:42:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eLYcaTXAzMRO7Z1HvZe8iAZHLOw28TxjLWeUnf59GowhAfUweUdv4LdYYdc4Sootf6JABMqiA2mYdCb9p58kDAgDEcNRB+gAfuYz7AbdTfX4ttLYUOWSh9srEDsuJrbf4rcETQZSkHhvrQTwwE9FsgK2WTHcMYs3P9eMUt3JYfrwtOqqoYMaAfshhk3wMojysicwdDGu7oaRPsyR5V3BI2TVHdSib9AWer+JUvvsX3HpMRMhLsTLCGA0iAzR4Kl4FA+uTqha15FPmsxn7JDbPgZYtzcS6s/8wNMV8S5yPt/1rdS/tKq7kJYqYxO/PyxHelw28iWVKkUn2vahfoRObA== 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=GjkOC3u7gOxdWhfRjzfmFY7J20b23gqg5A/g36/PlNo=; b=itj+BrDU7yo4hHI5W0FIPwOEsWDlbeuFIxR/GHzK4ri9eEpxp1f2GunyS5Hr8nKRKR8tABudW7q/gSn/sUPEcmpftOdAqNOmE1LgNDm5AN7DhGxQw0vf1JDaPgVv6yjpgbF2k6NlPD8VBzdoQ4raefkO1VHBq1V2Eiqup2kXTrypGVk9gQ1wxAi3dFDvPu9oaj0KfRoLKtGXHEWfM7ozDd44yiBro6rbOKKIxAA3hbSvIaq1GZvpp5NHF41Od2KL3yAcDGryP16Lu7fcGJQUNT0Wkrv3hwGDWi0mLprXK7XZKohRt71gtX4tGLaBBaLbQc1Owbgyv7g4WoUYW6vQjg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.118.233) 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=GjkOC3u7gOxdWhfRjzfmFY7J20b23gqg5A/g36/PlNo=; b=nRuiVbgZBpBX1wIXc7KUVA5NzSouOYS+X795IHf0xXeEVUzFlS8HsfPsvSicf2oP0GZgKF/dcaaBBljFZxRqo8mlWvkBA/chQS2X/egha2roDJYLgp4iP+DtLI9zE9vYTWvyNpHD97Jzzqw7wucsgzH5Er/5sb3PPyBOu86ePm4viSnyD7GGGv6iOD4cnVGJjLzdm81O4KX/RkbJ7yA2Yr1jHzoReLxBv/kKfNZUYU0AMVhJihxbiehBq0sFYj5gujhTnu6KsSJjcFAdbBkrg5ymwTyTWs+56stUHfhphfEtCJSsYrHTb0iRNSODipcrcv/pVU1R1gKfDgF7jv5UIQ== Received: from DS7PR03CA0234.namprd03.prod.outlook.com (2603:10b6:5:3ba::29) by CY8PR12MB7660.namprd12.prod.outlook.com (2603:10b6:930:84::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.34; Mon, 24 Oct 2022 07:42:23 +0000 Received: from DM6NAM11FT015.eop-nam11.prod.protection.outlook.com (2603:10b6:5:3ba:cafe::d1) by DS7PR03CA0234.outlook.office365.com (2603:10b6:5:3ba::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.26 via Frontend Transport; Mon, 24 Oct 2022 07:42:23 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.118.233) 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.118.233 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.118.233; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.118.233) by DM6NAM11FT015.mail.protection.outlook.com (10.13.172.133) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.16 via Frontend Transport; Mon, 24 Oct 2022 07:42:23 +0000 Received: from drhqmail202.nvidia.com (10.126.190.181) by mail.nvidia.com (10.127.129.6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.26; Mon, 24 Oct 2022 00:42:14 -0700 Received: from drhqmail203.nvidia.com (10.126.190.182) by drhqmail202.nvidia.com (10.126.190.181) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.29; Mon, 24 Oct 2022 00:42:13 -0700 Received: from waynec-Precision-5760.nvidia.com (10.127.8.13) by mail.nvidia.com (10.126.190.182) with Microsoft SMTP Server id 15.2.986.29 via Frontend Transport; Mon, 24 Oct 2022 00:42:10 -0700 From: Wayne Chang To: , , , , , , , , , , , , , CC: , , , , , , , Subject: [PATCH 10/11] usb: host: xhci-tegra: Add Tegra234 XHCI support Date: Mon, 24 Oct 2022 15:41:27 +0800 Message-ID: <20221024074128.1113554-11-waynec@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221024074128.1113554-1-waynec@nvidia.com> References: <20221024074128.1113554-1-waynec@nvidia.com> MIME-Version: 1.0 X-NVConfidentiality: public X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6NAM11FT015:EE_|CY8PR12MB7660:EE_ X-MS-Office365-Filtering-Correlation-Id: 9dafc26c-4ba8-4add-7b7c-08dab59349fb X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ds2WlqMIfMQaeEZa/obxTxNLWfToujyF+i00BNUcOrTh/D+ASqLDkdZOOk87Jc0nNEz87Hn+Y0DUdjJk9asYhpO+XpEOsyVIKb80Y1B9nlkB6X2GZ6sWArM4Mk4HUxCS5c9aUr4qKDyDT/f+FeUscrmkFlrNXj/Vem9DVtUwpH5ATvixv8VH6tbAANsJ+YD78GqVlEp8HDK8Le8Xx+XxksMBe54zvQrOjqJw+TqxoAQdLOFiUfewzZdX33ZI363BfWY+NRhobhozbpbauNeXZWqG1tDo9aXfXkqcx+KFdZuhKBZZRNGdTUnHCtwi69KXuiGj4WXAr8AJO1IgMm/1kpWqiH5wHdXI1/Cv1BGP5mKsKVDdCiML9ixr9ABWJtBvDBJpNgGmAPl0qiWuiKFzOvkOfbsI19Uno9EpsqNp9IDwl1nJYhpxcE4NjEgCgQzdEKl1ti7yNR2EUzX9x7+m41ReM8/WfS/MysN8UsgTT2ZP0XNYshNp/MWRAAr7dRgJG09AAOMdM4IfPLlyKgrNrX+p0vJ3nWKOBxsORyXVjI9RAPSw3GiOCymNfw1GC2p8QGETINl+TpQkVe3RXwgHJyOupcQgzNgaB3/lRI1yVHFftsF/v7BVjPpfTyyN9xDTLhw3ByBzWtex7OoiPhiFag1zviBS9ooC2boUUkNz4JPYeuKt7BYuTdIR+b/Lzr+hhaH7flTGVfNfAs5IDu8IvJObIULrBQzKwfHzgtzZa/scxfkn9UNVkh6br244q/TyD7lYSfr80YFm9BLEd8Y0KtTDAjEtRNc/ucrWW7I5e+o= X-Forefront-Antispam-Report: CIP:216.228.118.233; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc7edge2.nvidia.com; CAT:NONE; SFS:(13230022)(4636009)(376002)(346002)(136003)(39860400002)(396003)(451199015)(36840700001)(46966006)(40470700004)(41300700001)(7416002)(6636002)(921005)(36756003)(30864003)(316002)(54906003)(6666004)(110136005)(70586007)(70206006)(4326008)(8936002)(36860700001)(47076005)(5660300002)(7696005)(7636003)(82740400003)(1076003)(426003)(40480700001)(186003)(2616005)(8676002)(82310400005)(356005)(336012)(86362001)(83380400001)(478600001)(2906002)(26005)(40460700003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Oct 2022 07:42:23.0978 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9dafc26c-4ba8-4add-7b7c-08dab59349fb X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.118.233]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT015.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY8PR12MB7660 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. The new soc variables has_ifr indicates the chip with IFR FW loading support. IFR registers would be configured in MB1, and FW loading will be triggered in MB2. Signed-off-by: Sing-Han Chen Co-developed-by: Wayne Chang Signed-off-by: Wayne Chang --- drivers/usb/host/xhci-tegra.c | 277 +++++++++++++++++++++++++++++----- 1 file changed, 237 insertions(+), 40 deletions(-) diff --git a/drivers/usb/host/xhci-tegra.c b/drivers/usb/host/xhci-tegra.c index bdb776553826..86036eeece43 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,7 @@ struct tegra_xusb_context_soc { } fpci; }; +struct tegra_xusb_soc_ops; struct tegra_xusb_soc { const char *firmware; const char * const *supply_names; @@ -205,11 +230,15 @@ struct tegra_xusb_soc { } ports; struct tegra_xusb_mbox_regs mbox; + struct tegra_xusb_soc_ops *ops; bool scale_ss_clock; bool has_ipfs; bool lpm_support; bool otg_reset_sspi; + + bool has_bar2; + bool has_ifr; }; struct tegra_xusb_context { @@ -230,6 +259,8 @@ struct tegra_xusb { void __iomem *ipfs_base; void __iomem *fpci_base; + void __iomem *bar2_base; + resource_size_t bar2_start; const struct tegra_xusb_soc *soc; @@ -276,6 +307,17 @@ struct tegra_xusb { struct tegra_xusb_context context; }; +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); +}; + static struct hc_driver __read_mostly tegra_xhci_hc_driver; static inline u32 fpci_readl(struct tegra_xusb *tegra, unsigned int offset) @@ -300,7 +342,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) +{ + 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) +{ + 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 +378,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 +388,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 +539,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) { + struct tegra_xusb_soc_ops *ops = tegra->soc->ops; bool wait_for_idle = false; u32 value; @@ -459,15 +548,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 +566,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 +584,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 +596,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; + 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 +754,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; + struct tegra_xusb_soc_ops *ops = tegra->soc->ops; struct tegra_xusb_mbox_msg msg; u32 value; @@ -672,16 +763,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 +800,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->soc->has_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 +981,36 @@ static int tegra_xusb_request_firmware(struct tegra_xusb *tegra) return 0; } +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 val; + + cap_regs = tegra->regs; + op_regs = tegra->regs + HC_LENGTH(readl(&cap_regs->hc_capbase)); + + ret = readl_poll_timeout(&op_regs->status, val, !(val & 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(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,26 +1083,43 @@ 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; - do { - value = readl(&op->status); - if ((value & STS_CNR) == 0) - break; + timestamp = le32_to_cpu(header->fwimg_created_time); - usleep_range(1000, 2000); - } while (time_is_after_jiffies(timeout)); + dev_info(dev, "Firmware timestamp: %ptTs UTC\n", ×tamp); + + return 0; +} - 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); +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; + + 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; + + 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; } @@ -1403,7 +1535,7 @@ static int tegra_xusb_probe(struct platform_device *pdev) struct of_phandle_args args; struct tegra_xusb *tegra; struct device_node *np; - struct resource *regs; + struct resource *res, *regs; struct xhci_hcd *xhci; unsigned int i, j, k; struct phy *phy; @@ -1435,6 +1567,11 @@ 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, &res); + if (IS_ERR(tegra->bar2_base)) + return PTR_ERR(tegra->bar2_base); + tegra->bar2_start = res->start; } tegra->xhci_irq = platform_get_irq(pdev, 0); @@ -1651,10 +1788,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->has_ifr) { + 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); @@ -1663,7 +1803,10 @@ static int tegra_xusb_probe(struct platform_device *pdev) tegra_xusb_config(tegra); - err = tegra_xusb_load_firmware(tegra); + if (tegra->soc->has_ifr) + err = tegra_xusb_init_ifr_firmware(tegra); + else + err = tegra_xusb_load_firmware(tegra); if (err < 0) { dev_err(&pdev->dev, "failed to load firmware: %d\n", err); goto powergate; @@ -2070,7 +2213,10 @@ static int tegra_xusb_exit_elpg(struct tegra_xusb *tegra, bool runtime) tegra_xusb_config(tegra); tegra_xusb_restore_context(tegra); - err = tegra_xusb_load_firmware(tegra); + if (tegra->soc->has_ifr) + err = tegra_xusb_init_ifr_firmware(tegra); + else + err = tegra_xusb_load_firmware(tegra); if (err < 0) { dev_err(tegra->dev, "failed to load firmware: %d\n", err); goto disable_phy; @@ -2271,6 +2417,13 @@ static const struct tegra_xusb_context_soc tegra124_xusb_context = { }, }; +static 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,59 @@ 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 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 = { + .firmware = "nvidia/tegra234/xusb.bin", + .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, + .has_ifr = true, +}; +MODULE_FIRMWARE("nvidia/tegra234/xusb.bin"); + 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 Oct 24 07:41:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wayne Chang X-Patchwork-Id: 618457 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 346A5FA374A for ; Mon, 24 Oct 2022 07:43:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230177AbiJXHnH (ORCPT ); Mon, 24 Oct 2022 03:43:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37658 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230054AbiJXHmi (ORCPT ); Mon, 24 Oct 2022 03:42:38 -0400 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2042.outbound.protection.outlook.com [40.107.92.42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0B31461700; Mon, 24 Oct 2022 00:42:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jNAJBZifmR9BLnoCB8yyFLALe97mzzzvgeCR1ABCnJVbbDby64fpdVbiTJ83c8hYxkHSNQo/pb5Xwh0KWP9+xQe+9l2BBkrSedFSLnZVK3nmxWwwyV6jE/sC+8pTxdUICxt+TvazNj2lX4/PTL0G9kwi1PbnVrQ5wbOqM8kCnGHjXtpsl3g086D80IMFzRZ8KnCIHfxi+xYEC6D89wtkh7lJXymCsfxHeQpJkKkYuTKRLC6L9lWDVJrP9e5k1taAI9VB1uwdL+/ZpwIlxSYztUOHc05vroI6b+710CTceR1qtB4cnuTWJDK379hbNZb8AK5a5+Lbm+QdLW7LhbmCEQ== 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=MmefAIhrteff9c3Bo+vulsVniD52WdYw8g7cuioIiWQ=; b=fOrhd3hAi8KRDt2JVBX8ZmS45B8N4q9oAhFo3cEjoWbGhr0m8p/jn/PIWZ2Lu/Rd1qNjsuwe0cQGNFFQyAA3MLVXrX3hDGvQ1r0ltiEn8sPi6wQsSUDGHjsz4PfJKkUvm3dKWHY9fDNvx9zqofxGn+ZvsBc5y3Q4rwBu1BJePm48mGvtuzAB6xgvP3BCQtSGbP1XtwsxVy6tedVDHvqjT3Qix5GRMqabhTCJs3ECMjMW0+DV0xyX825BkMP8im0cAysF4NKqpKjw5YExA2ZRm/CATP0BbWW3AcU0/3XCnzH+3zUDkv5g0W1E0nvFOQrMmpMe4RclYbBuwkeqLhMq8g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.118.233) 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=MmefAIhrteff9c3Bo+vulsVniD52WdYw8g7cuioIiWQ=; b=C41rC9TBKfCSLvyhIuZiM2ci6vh8B/VH6jL9V6otefSyFVkMQv30XHzEstedNNWVkdyKt7WKjhdwl0gH/eZx32uapj9IiIlE6Me3Pxk1QmGBftm5JAbBPeWjpSxn+Swg4tfwRD3PgYL+S4U45jjaViu0FnnRznKq29dQvPsMJiHSp+wYWUpBE6VCSuHgsSjEIyMzC8LT9Pm4JW/GO69G0uOu07XVUxshsKZKpE0XBGjY5fMtJMdQOmNINK6vIOSuJhX1bkuAKTkRarK0VKFUvz1MTVktPuwOwLK/1r4acx66QpU/2kdQLryaxxcHCc/cSp7o828vTpy4M+R6+vqoXw== Received: from DS7PR03CA0179.namprd03.prod.outlook.com (2603:10b6:5:3b2::34) by BN9PR12MB5241.namprd12.prod.outlook.com (2603:10b6:408:11e::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.25; Mon, 24 Oct 2022 07:42:24 +0000 Received: from DM6NAM11FT087.eop-nam11.prod.protection.outlook.com (2603:10b6:5:3b2:cafe::3d) by DS7PR03CA0179.outlook.office365.com (2603:10b6:5:3b2::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.25 via Frontend Transport; Mon, 24 Oct 2022 07:42:24 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.118.233) 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.118.233 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.118.233; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.118.233) by DM6NAM11FT087.mail.protection.outlook.com (10.13.172.150) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.16 via Frontend Transport; Mon, 24 Oct 2022 07:42:24 +0000 Received: from drhqmail203.nvidia.com (10.126.190.182) by mail.nvidia.com (10.127.129.6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.26; Mon, 24 Oct 2022 00:42:17 -0700 Received: from drhqmail203.nvidia.com (10.126.190.182) by drhqmail203.nvidia.com (10.126.190.182) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.29; Mon, 24 Oct 2022 00:42:17 -0700 Received: from waynec-Precision-5760.nvidia.com (10.127.8.13) by mail.nvidia.com (10.126.190.182) with Microsoft SMTP Server id 15.2.986.29 via Frontend Transport; Mon, 24 Oct 2022 00:42:14 -0700 From: Wayne Chang To: , , , , , , , , , , , , , CC: , , , , , , , Subject: [PATCH 11/11] usb: gadget: tegra-xudc: Add Tegra234 support Date: Mon, 24 Oct 2022 15:41:28 +0800 Message-ID: <20221024074128.1113554-12-waynec@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221024074128.1113554-1-waynec@nvidia.com> References: <20221024074128.1113554-1-waynec@nvidia.com> MIME-Version: 1.0 X-NVConfidentiality: public X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6NAM11FT087:EE_|BN9PR12MB5241:EE_ X-MS-Office365-Filtering-Correlation-Id: 233c5e8a-88cf-4bd0-8d27-08dab5934a8a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: w8quLJfurdqFxvamYy9X7bgGY3AHcUf3BuiXSIJjVCdTrVvFZuEGz3LfwAkeG1FiOf4d8w/mVU6h7rl1NOaa0NrkjCXRqKmxa7eOCit4niQzjO/c/pZFTiXF6/6KKL/xTtHVRbF0mJUJkgborAZ4yiIQeRmoXs90NwbP25ISABRjTE/gwbkpC500VuLRALXXG3qzV8RN0ZCLdOoL0zHHeWiFGSHVQVcQjweWIIPEpkBeljvHtlytL+7m9PSfZFLIcRS6r8/NRoJja/jyB1M/zOnLMKSDFCkCz1ae52Trp6RWaF2vyB9W4v/YWvz3QmToAw/CmKXQlsR0MXhtztlbhkmgd44gdj25L5W5bP3+lgQ+M0XPf+ewaoWMrzaUv9/4aR/ruwCoNvh9rTvIwrhPfL8K+FnsUxjRQIDb0yJ6uo/iH5j9WpCZ0oFO9wqEVloXQO0ZOmz6Ii4o9rnHnl/vTClxVcv4EqTuwssS+hA8l+lBqJq8jLo6Y6lk/bAkB+czpGrAQM/DkXfJ+Z//ui3/2tTUgeaI0e4vdWZb1ADcVfi8dLslD/JB8OG13lrPMdVkVKzqjeeVq1klY846MoKY9FC6si15o/6CeQ7vjVzWwtrtbHUQRFTn1zhQYIwZ0rOafJ97tJDlmqPVbfnmEDN4u3tSNGEu96hNCAfqDjVZ3xKO2hWuOP4YU/VWjGtss3xqrClVi2UUXogZwzR0cey+lrLJrHLeRWZsW5m/6hea4o/9wqsWJYxEqKdpxW5gI2AwIdys8jUnk5byLAH46fh4NIM9ORmTNol4uDBrQB8ION4= X-Forefront-Antispam-Report: CIP:216.228.118.233; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc7edge2.nvidia.com; CAT:NONE; SFS:(13230022)(4636009)(346002)(396003)(376002)(136003)(39860400002)(451199015)(40470700004)(36840700001)(46966006)(2616005)(40480700001)(2906002)(36756003)(6636002)(1076003)(54906003)(36860700001)(110136005)(336012)(316002)(41300700001)(8936002)(7416002)(70206006)(70586007)(6666004)(921005)(82740400003)(5660300002)(8676002)(86362001)(4326008)(26005)(426003)(478600001)(40460700003)(82310400005)(7696005)(7636003)(186003)(47076005)(356005)(83380400001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Oct 2022 07:42:24.0354 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 233c5e8a-88cf-4bd0-8d27-08dab5934a8a X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.118.233]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT087.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN9PR12MB5241 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 --- 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);