From patchwork Thu Jan 19 11:17:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jon Hunter X-Patchwork-Id: 644382 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 0F537C004D4 for ; Thu, 19 Jan 2023 11:18:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230189AbjASLSR (ORCPT ); Thu, 19 Jan 2023 06:18:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58764 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230125AbjASLSP (ORCPT ); Thu, 19 Jan 2023 06:18:15 -0500 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2075.outbound.protection.outlook.com [40.107.94.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5C17264DA1; Thu, 19 Jan 2023 03:18:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fRtj7dzWbT4uQnP8MIjQKh4xB2HW5qfIpn21ojQl6brjK2LBxxMmLEI6WNRFkrcTSEk3ui5e6FJENuv6XC5wMU0baPV+MP5oV/skCXOjL1r2o2wz0D+P8+sYO92oueuk1a5GDvQ6yzR1m/w/mVefjZWCllfr9wvTIV5yFWz4C6h2FCSpRtc6cj9NhKZU+ZoGkB7x2SAa298lOLlxoLnJlNKPHC8/PgJDVn1EvYRM2bYMvQIpwDj7Q/BpFtyTVBslamPfZbzD2s945qyAPjhWOUw7tO5CauOxFM4exEYywuGm3WHqhxD+i1Hm+8YQb93HCO/9ysjmXzjcwmuA6u7GVA== 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=zLvPUqJ6dpucCPyjMFiIuIipinXHm/UXkny6KCqxp3o=; b=jhYLpbKvBSGx57wo3tST7KrhexSbfxZalfVOx4uNkom+6PPYVQvaO3ierTlcYGhyw+paZiD6KVxEyU4YbknDccGoaoacS1UQBydGQ8AjRma+T21qSQrnWSBBKXn45Vpup0+D6hkpcApj0+a09c/gYGLl3NVjbBsMgRsc824btk4OQ0UKhTteVtBke3lCJwMUyg40ojRQQJrXCoFn19LFSWW+EtOeRElwZKXoIOxYWKfY9Rlty+2ax5AfTL6AB7cIZS++145rKmEWy/RaN4Rhl//hP6oOt+D6OsFsxIOnyNbdPfa/u6P/dU711Oi+a9xYniu8cyoDAToAivGgHq8Iag== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=linux.intel.com 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=zLvPUqJ6dpucCPyjMFiIuIipinXHm/UXkny6KCqxp3o=; b=K8mJnZ3ID1c9SgaRzzB4eZ2mPsPbhUNE9mCZTmfjKprHIy3+T3Xa13vlDxCFYhI589Mhsa7PqBIJYoHPsFY0PsO+MvJLf+28u3t7dRqqE/d3XGGMwqBVcpCL3q8LZCDFpT0RHQL0yC6HD7LC9He1JiSPBZvXyCKT3SutgwSgKAnwvKyV1vZa+agPdej8iw/D0fN8klGJ6yn8hhLYGXfLUl/6hC8onxZm9keASncXnPzqSTv8cN5SQwk1ZIujJe9QGl2c4qHIXM1INTJyNaObJk9CwHvuuX5dl8uWsGEAVEZ0/tEas1S4P1GYOWIvUfe2hLaV2P89J0YlTt4iGdBjWw== Received: from DM6PR12CA0025.namprd12.prod.outlook.com (2603:10b6:5:1c0::38) by PH7PR12MB5950.namprd12.prod.outlook.com (2603:10b6:510:1d9::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5986.23; Thu, 19 Jan 2023 11:18:12 +0000 Received: from DS1PEPF0000E637.namprd02.prod.outlook.com (2603:10b6:5:1c0:cafe::23) by DM6PR12CA0025.outlook.office365.com (2603:10b6:5:1c0::38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.26 via Frontend Transport; Thu, 19 Jan 2023 11:18:12 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by DS1PEPF0000E637.mail.protection.outlook.com (10.167.17.69) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.11 via Frontend Transport; Thu, 19 Jan 2023 11:18:11 +0000 Received: from rnnvmail204.nvidia.com (10.129.68.6) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.36; Thu, 19 Jan 2023 03:18:00 -0800 Received: from rnnvmail205.nvidia.com (10.129.68.10) by rnnvmail204.nvidia.com (10.129.68.6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.36; Thu, 19 Jan 2023 03:18:00 -0800 Received: from moonraker.nvidia.com (10.127.8.13) by mail.nvidia.com (10.129.68.10) with Microsoft SMTP Server id 15.2.986.36 via Frontend Transport; Thu, 19 Jan 2023 03:17:57 -0800 From: Jon Hunter To: Heikki Krogerus , Greg Kroah-Hartman , Rob Herring , "Krzysztof Kozlowski" , Thierry Reding CC: , , , Wayne Chang , Jon Hunter Subject: [PATCH V5 3/6] usb: typec: ucsi_ccg: Add OF support Date: Thu, 19 Jan 2023 11:17:38 +0000 Message-ID: <20230119111741.33901-4-jonathanh@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230119111741.33901-1-jonathanh@nvidia.com> References: <20230119111741.33901-1-jonathanh@nvidia.com> MIME-Version: 1.0 X-NVConfidentiality: public X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS1PEPF0000E637:EE_|PH7PR12MB5950:EE_ X-MS-Office365-Filtering-Correlation-Id: a29a2d19-f5fe-4123-7cda-08dafa0ed9f7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: z894Cg+OOuDAdY0ZturhOUIDODuMGUBiRwhXyWuMYpc/Y1P/VZzwEvkxKbX2MlD6W2HJcN6TfVdaUGAkCypmXbc266JIBgqLX26OabtGhJ/QUHetlMZXxzmqopYa5hppLL0hsnYe+mqR+L9s3UmLFN1C2JhI6DB5Q3jJhNrQcLMTPchbC5ZEliYZtm59+Nb9gBNw2lAYTHGLEcn67KEgVilAS0xDousy+N+nJq8JFCmiZmWOhScNebxVLKYKHGV/Ug+3Q9S1q9nfsSjB7jv3KE51iwfOEIsAfooa/mPVgWhG5tAtu0GAWyl9+z8srjZvyK3u++Hrc9LkVctihlGqcWjK6M+PS+qiewP9YPDRJNBkM2Z3cywXc4LJ9kvvqamuTm04VwFAYzPvjpHiqX2+F77Zi9fpU7R5VXmfdNpB6iTN7dWZze1hWOjt6iqlW15L79Q+FpxbujsWfDEbeRL6FqXmTeFQB/+QANEm+PdB+5i6/wzua5v16mb8EV5EuhIQu29cNmAcTyf+ylHky22zK11g+vIlta+oFbFGa67SUPtkToNSiwljnpPVzwmWlOQbaBQMfj5MENE5kBrt3DgdWUhkUzpiHtzBZGVblwAiVi+czaGTCOpjQr6LFqkQGqtxfCTpzo+R0oVTkxrcJPRnc+IW0s2EqK3T1oBEjfsh7CIJ0ygcztgrBeN0800zgALPFeNvTZm+PdhjHgTbmZtxdA== X-Forefront-Antispam-Report: CIP:216.228.117.160; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge1.nvidia.com; CAT:NONE; SFS:(13230022)(4636009)(136003)(346002)(396003)(376002)(39860400002)(451199015)(36840700001)(46966006)(40470700004)(82740400003)(83380400001)(7636003)(316002)(356005)(86362001)(8936002)(2906002)(4326008)(36860700001)(70586007)(5660300002)(70206006)(8676002)(41300700001)(82310400005)(40480700001)(426003)(107886003)(2616005)(186003)(47076005)(26005)(1076003)(336012)(54906003)(6666004)(7696005)(40460700003)(110136005)(478600001)(36756003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jan 2023 11:18:11.8145 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a29a2d19-f5fe-4123-7cda-08dafa0ed9f7 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.160]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DS1PEPF0000E637.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB5950 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Wayne Chang Add device-tree support for the Cypress CCG UCSI driver. The device-tree binding for the Cypress CCG device uses the standard device-tree 'firmware-name' string property to indicate the firmware build that is used. For ACPI a 16-bit property named 'ccgx,firmware-build' is used and if this is not found fall back to the 'firmware-name' property. Signed-off-by: Wayne Chang Co-developed-by: Jon Hunter Signed-off-by: Jon Hunter --- V4 -> V5: add support for 'firmware-name' V1 -> V4: nothing has changed drivers/usb/typec/ucsi/ucsi_ccg.c | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/drivers/usb/typec/ucsi/ucsi_ccg.c b/drivers/usb/typec/ucsi/ucsi_ccg.c index 46441f1477f2..889a831e251d 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); @@ -1342,6 +1342,7 @@ static int ucsi_ccg_probe(struct i2c_client *client) { struct device *dev = &client->dev; struct ucsi_ccg *uc; + const char *fw_name; int status; uc = devm_kzalloc(dev, sizeof(*uc), GFP_KERNEL); @@ -1359,7 +1360,18 @@ static int ucsi_ccg_probe(struct i2c_client *client) /* Only fail FW flashing when FW build information is not provided */ status = device_property_read_u16(dev, "ccgx,firmware-build", &uc->fw_build); - if (status) + if (status) { + status = device_property_read_string(dev, "firmware-name", + &fw_name); + if (!status) { + if (!strcmp(fw_name, "nvidia,jetson-agx-xavier")) + uc->fw_build = CCG_FW_BUILD_NVIDIA_TEGRA; + else if (!strcmp(fw_name, "nvidia,gpu")) + uc->fw_build = CCG_FW_BUILD_NVIDIA; + } + } + + if (!uc->fw_build) dev_err(uc->dev, "failed to get FW build information\n"); /* reset ccg device and initialize ucsi */ @@ -1426,6 +1438,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}, {} @@ -1480,6 +1498,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_new = ucsi_ccg_probe, .remove = ucsi_ccg_remove, From patchwork Thu Jan 19 11:17:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jon Hunter X-Patchwork-Id: 644381 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 AA9B3C6379F for ; Thu, 19 Jan 2023 11:18:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229882AbjASLSV (ORCPT ); Thu, 19 Jan 2023 06:18:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58816 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229459AbjASLSQ (ORCPT ); Thu, 19 Jan 2023 06:18:16 -0500 Received: from NAM02-BN1-obe.outbound.protection.outlook.com (mail-bn1nam02on2086.outbound.protection.outlook.com [40.107.212.86]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D19876FFA7; Thu, 19 Jan 2023 03:18:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=M1cuWPSIVa0ruOT23ERLS+Dk0EyfhqcaU4OPyS2IJ+8XeqkF/s6SnIIcmS/vv/wVlWY+EonJ4BUN/QK4JS3Tm218r/+yaXfYIRmpRJaqrKZM7IpzpQJa5t57DTwl3Hxddy5/lORBHuvnoCCPcNKUN4sDfR7opsAq+ncZxACVkizi+aInBZU/AITfex1xMYXO+Xxy/e1RoBHaczUJwkqtm0ZXvXB794u0m7jPnuemV7Az9+Cjwi+fCdQv76b8wvKt9uUNLV/TAdnQW3HmqnFyuNREQxnHV2dNtpDmi0n//p4IT6jLiDh/tujYrI4bGdNGTUYlbuVmXA0uHayR/tVwMA== 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=D/NawScKYp4/SMypnRWuYjLbfu7LDY71IjBnr6J9xKo=; b=aVFK9lZrQBeMlGDc741C3rWRobb6cMQpN9/7t7zh9UBbTMcvAt4G5yOnzk92TUEeDtu7jzBcU6gK8USz+bwNzDN+QlTY5MaEVB8tEOnAE33+vaEsH/C7SWZ+nU4bWykmplkczhF/cs+1IMmtfZwB+vlUA8wHhm+uJGSbHxhUUVusTtIL+Y6ui9z1Fjtl+GZPuA8dW0x2dDq3uteLfxMIN5GqyLpetzf6GqYYZA7+7BY1+4ws5CI9ujE0wFunSxovcpNJiac/qsr2Z043+nkIc2vXfOrNQuANDRKnailGpXRopls3j47pKvqLwp7UApgM/kP4tRGhrdLa4kC7mMQBUQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=linux.intel.com 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=D/NawScKYp4/SMypnRWuYjLbfu7LDY71IjBnr6J9xKo=; b=J7YUNJDVpohrHEkAkoJW0CLXIUo6UMwX0qbv92X57+yxuREEZhLKCsV1EKsXeEJT0QwWVOyzuGV6fE3xN2MXH0L9RkObQD7jXw4zd7uKb1hwWt0voXe+tyeZPTtYfsPmPZUfOPtT6ihOgm5gQDOtOV6tSI8YE3Jc97omaP7M7sCCA4e6aKoo+Tprw02cevqY0TuURv/CLKDyR7GC+xTY1T9oqV2WvO8HAc8lI9NlMZqJgAHDvICo2jwPDLj0yWbTgSJGfTLFgfVLlp6VWx5xfIPJK1Gdc1VKrtfWH7yssl6pgp5u0K0SdSEAn6zfTSnzhqZjsv84y9/3Zk1YMeU1HA== Received: from DS7PR07CA0003.namprd07.prod.outlook.com (2603:10b6:5:3af::11) by DM6PR12MB4403.namprd12.prod.outlook.com (2603:10b6:5:2ab::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.13; Thu, 19 Jan 2023 11:18:14 +0000 Received: from DS1PEPF0000E636.namprd02.prod.outlook.com (2603:10b6:5:3af:cafe::d) by DS7PR07CA0003.outlook.office365.com (2603:10b6:5:3af::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.24 via Frontend Transport; Thu, 19 Jan 2023 11:18:14 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by DS1PEPF0000E636.mail.protection.outlook.com (10.167.17.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.11 via Frontend Transport; Thu, 19 Jan 2023 11:18:14 +0000 Received: from rnnvmail204.nvidia.com (10.129.68.6) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.36; Thu, 19 Jan 2023 03:18:03 -0800 Received: from rnnvmail205.nvidia.com (10.129.68.10) by rnnvmail204.nvidia.com (10.129.68.6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.36; Thu, 19 Jan 2023 03:18:02 -0800 Received: from moonraker.nvidia.com (10.127.8.13) by mail.nvidia.com (10.129.68.10) with Microsoft SMTP Server id 15.2.986.36 via Frontend Transport; Thu, 19 Jan 2023 03:18:00 -0800 From: Jon Hunter To: Heikki Krogerus , Greg Kroah-Hartman , Rob Herring , "Krzysztof Kozlowski" , Thierry Reding CC: , , , Wayne Chang , Jon Hunter Subject: [PATCH V5 4/6] i2c: nvidia-gpu: Remove ccgx,firmware-build property Date: Thu, 19 Jan 2023 11:17:39 +0000 Message-ID: <20230119111741.33901-5-jonathanh@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230119111741.33901-1-jonathanh@nvidia.com> References: <20230119111741.33901-1-jonathanh@nvidia.com> MIME-Version: 1.0 X-NVConfidentiality: public X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS1PEPF0000E636:EE_|DM6PR12MB4403:EE_ X-MS-Office365-Filtering-Correlation-Id: f5b73c0c-dd12-44e4-b745-08dafa0edb4d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: fVCoTSwbeJhvk6pfj1TRSfQAM9MKelBxeQ7fqT+rFjhVHMK5HKHAEpgGKmgXNuvr17OzvxK/cDCJKZPXq+TbHw0OsuIOazgB1S2og+P1uJvUY+z9NhjUfNGss4J7JpG6YkXN9C2eh1oKqfL4E7QeDHQi/OPw60UHezCFr+3dUThxIVFAkPk351O/7VMT9TUChxv6TtTef5Wo3ey0Bml+ZyJuxlJJl3p/kS3BYRZ87MDQ0j0uZo0r8BsMtJlE8siikSEsMFh1teQBTspK4enpDgYmQLeJV3hwuH551mV/MPQlzQZMKsVVJYOa4x4iqVkMFfzwxlgtCz5jdvNIV0ozQ5LZhAcm0jLEiK0v7+F/neeeQoaUmJ9Dt9Ki2w8gOrDP8Wh/wIbFw+cGPpR7JOk1KCBRv1lc1cEHMUMAQI9had0MSh3txC5STEcmw9ZF747BSfymjN7nZyszhYwmTAlfznCo0wk4uckvIaz1/R0yvz0MuJOxoxzaXiSxE0oDX15q9zmdJLwPJJD/3wrlWDK97DikEYZtQMBnJoATCwLD9HfU+JrKj4ZebX058Pgi42pPEPv/EbzSJtE3RZCM2MS9rtrk+XihfPowOtuIM0I1w3R+2k7WlnfYkUtkJxaWdoIgx1GhD5KF59LIRwA3DnBjV7NjreaxI4DbuAt8FEV8bLlWOJTHcRnACc0LZ2mquFeRhHJOgyFCveA8Z3hhdqJzoQ== X-Forefront-Antispam-Report: CIP:216.228.117.160; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge1.nvidia.com; CAT:NONE; SFS:(13230022)(4636009)(136003)(376002)(346002)(396003)(39860400002)(451199015)(40470700004)(36840700001)(46966006)(36860700001)(2906002)(82740400003)(7636003)(356005)(40460700003)(36756003)(426003)(47076005)(40480700001)(316002)(54906003)(82310400005)(2616005)(336012)(7696005)(110136005)(1076003)(86362001)(70206006)(41300700001)(4326008)(70586007)(8676002)(5660300002)(107886003)(8936002)(26005)(83380400001)(478600001)(6666004)(186003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jan 2023 11:18:14.0573 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f5b73c0c-dd12-44e4-b745-08dafa0edb4d X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.160]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DS1PEPF0000E636.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB4403 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Wayne Chang Now the Cypress CCG driver has been updated to support the 'firmware-name' property to align with device-tree, remove the 'ccgx,firmware-build' property as this is no longer needed. Signed-off-by: Wayne Chang Signed-off-by: Jon Hunter --- V5: Added this patch from V3 drivers/i2c/busses/i2c-nvidia-gpu.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/i2c/busses/i2c-nvidia-gpu.c b/drivers/i2c/busses/i2c-nvidia-gpu.c index 6d81ea530a83..a8b99e7f6262 100644 --- a/drivers/i2c/busses/i2c-nvidia-gpu.c +++ b/drivers/i2c/busses/i2c-nvidia-gpu.c @@ -259,8 +259,7 @@ static const struct pci_device_id gpu_i2c_ids[] = { MODULE_DEVICE_TABLE(pci, gpu_i2c_ids); static const struct property_entry ccgx_props[] = { - /* Use FW built for NVIDIA (nv) only */ - PROPERTY_ENTRY_U16("ccgx,firmware-build", ('n' << 8) | 'v'), + /* Use FW built for NVIDIA GPU only */ PROPERTY_ENTRY_STRING("firmware-name", "nvidia,gpu"), { } }; From patchwork Thu Jan 19 11:17:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jon Hunter X-Patchwork-Id: 644380 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 5975BC004D4 for ; Thu, 19 Jan 2023 11:18:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230251AbjASLSg (ORCPT ); Thu, 19 Jan 2023 06:18:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58884 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230054AbjASLSb (ORCPT ); Thu, 19 Jan 2023 06:18:31 -0500 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2063.outbound.protection.outlook.com [40.107.237.63]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BE562717BF; Thu, 19 Jan 2023 03:18:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Pux6cAfUFNjJWdx8PURYzk/td8GVVpVZvEAKBXYVGEMn1djZeJSOgiQAjSqWy0Q+5txCSx6Use9jVCrxXuDn3RHLbeLcu12rN0dghAwpYFa7toorT1uhDxXl2gjh6sobeHf33kqZcslGb7zEQq13H4gsr6x27zI1kEAPrHrK9lOMkJK9TcaiVM0s3WZftEZH1jsq+kCZh2YAM78QgLBwVOqmnNTS+jwZwS0hkVfi4mXK0sld5JsuTm9vlDSL8NS1rNi6m2sJwQj09Uf4ThFrTapJ1afd99umjgYWu/NjisNUQjtHu5Rdls10IqWCnZnj7hzb2dVF4/CNQ3q3QlFH8g== 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=XOa4Hrd0m6WE/V7pPGGtZPravUu1oemhysnaPzxV+iY=; b=bVfKjPcSmS1PddNls1VDiTNa1W6mIUhvOhMbiRfyxq5zTza5rK+/44vsvnnquddom5P9zl/t1umh31zyPCsoC7iJPK6goTRiHw4W43mkx8CRe0d9cNTVV0CY3Ddka6q12CjZ/BbUL/DNoXM/RMbscANRozgtM+8kO6WPHORJUAlrlsOyMqTEgz+qnyNuqsvGckq42Z4qPTGxOxjzZd+k4dZDl0SaaVKmsUZKaVdi7GRPvsprixLDOHqz5g2jyn9zDyJJEixoXtDkK9wS2+gNLBPckZE5ecQYoOwp4SVr0YjVJbH8iz1Vi1mN+7qON8Xk90XIw9JI+v3E3RzNSUjIdg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=linux.intel.com 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=XOa4Hrd0m6WE/V7pPGGtZPravUu1oemhysnaPzxV+iY=; b=mySIHqOzHZ+3edDiAe0vO4fa2mQOxvTsouhSpmcA53toZ+fThI1PHzYT/jBqoHQsbh7QVS3OzlRd9C0t3vDx/G/4Pl2y13bGvcjNvo1JyKFXCRr2g6lsblXFd1SdPQVbKjtbPDMFev53dd2+uWTv60Pp2JogYdEW+gh4yDWFZ37at9+URRpZCMIDv7uloo4B53p7o6I4wQhIIIJTQhuoKuVhlbV4+KlD/dt3gtzEL9sVndrLaOcsc06u0MQ0Auk3egH3hKKKZFfCu6WGhEpGP2jr7vf4fAhuUx0Zhz/b7NCqZGVN71B5JpaPJaMeg3tH8RH4maOyYr7yLtYlwdbuRA== Received: from DS7PR06CA0013.namprd06.prod.outlook.com (2603:10b6:8:2a::13) by PH7PR12MB6933.namprd12.prod.outlook.com (2603:10b6:510:1b7::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5986.23; Thu, 19 Jan 2023 11:18:17 +0000 Received: from DM6NAM11FT065.eop-nam11.prod.protection.outlook.com (2603:10b6:8:2a:cafe::10) by DS7PR06CA0013.outlook.office365.com (2603:10b6:8:2a::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.25 via Frontend Transport; Thu, 19 Jan 2023 11:18:16 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by DM6NAM11FT065.mail.protection.outlook.com (10.13.172.109) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.13 via Frontend Transport; Thu, 19 Jan 2023 11:18:16 +0000 Received: from rnnvmail202.nvidia.com (10.129.68.7) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.36; Thu, 19 Jan 2023 03:18:05 -0800 Received: from rnnvmail205.nvidia.com (10.129.68.10) by rnnvmail202.nvidia.com (10.129.68.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.36; Thu, 19 Jan 2023 03:18:05 -0800 Received: from moonraker.nvidia.com (10.127.8.13) by mail.nvidia.com (10.129.68.10) with Microsoft SMTP Server id 15.2.986.36 via Frontend Transport; Thu, 19 Jan 2023 03:18:03 -0800 From: Jon Hunter To: Heikki Krogerus , Greg Kroah-Hartman , Rob Herring , "Krzysztof Kozlowski" , Thierry Reding CC: , , , Wayne Chang , Jon Hunter Subject: [PATCH V5 5/6] usb: typec: ucsi_ccg: Remove ccgx,firmware-build property Date: Thu, 19 Jan 2023 11:17:40 +0000 Message-ID: <20230119111741.33901-6-jonathanh@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230119111741.33901-1-jonathanh@nvidia.com> References: <20230119111741.33901-1-jonathanh@nvidia.com> MIME-Version: 1.0 X-NVConfidentiality: public X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6NAM11FT065:EE_|PH7PR12MB6933:EE_ X-MS-Office365-Filtering-Correlation-Id: e964f827-04fb-4ec9-e983-08dafa0edc92 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +Lmmb1M2Y2rHPB9lPAQbKVr+sqBWPSna8AdXg5aV6N81TMaCn8F3DhEVH6OZFMiEKMHTKjmUFDOjJ2M7SfToMXdedzxPRESXlE6q43T4W//NTxDBGyMnpB+Xs2IF+OqzsLo7rR/pixhi7Il7lhWHXeTHYYfDP2wO6hzFOjmJtQCsemWUxNOdX6tLUIIOeJNUmF5zjxXK2uxXzrNq0GagqnolZe33gtxE4zHXKhPwd6hCigL9SaY4Hlw5nzHmldRPIVEDv3+/1AQ3U4/Av7oYSnQfghK4eCrw8IGAfZVhmGXf1WKtjI2Gy9y6MxqerBMK2hf3Eus/8abKLDdFRD1RMFK/BLp6i+6GMSGbT/KGE9FCi5BxrVY1mWxLLJuudSK8pmV2M5DglDVfpGhIDRp1rWy/OSSRQOotf2JeLaDYsO7zXlEcUN086p0egWTNsFAYN0lebgDMDsMKFAz78yA9PrAKr8a58OgP5qTFDOboh/oobz5js4BOLJJ9zkIflIODRUPRLcKp3rn4AdP/JbaKM5WPXCrG9xIfxi0i1IAHaztkM3wkUD1hyn9lCYJ5FkSZLa4fp6f1zIVKZHHG/CsCHxvNv1JCR64IrD6Er9bkQgKxyWB3RQkVy335I2R/Wi67F2A3+MkxhzYYJ20sGvLJR/Bmn1DyDdO6Lm3xyuivK2xiU5MA5OHq9HQHLRSN3GAvIjx7+GPkqPJ9yslBYOxUmw== X-Forefront-Antispam-Report: CIP:216.228.117.161; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge2.nvidia.com; CAT:NONE; SFS:(13230022)(4636009)(136003)(376002)(346002)(396003)(39860400002)(451199015)(36840700001)(40470700004)(46966006)(36860700001)(82740400003)(83380400001)(7636003)(356005)(4326008)(2906002)(5660300002)(70206006)(8936002)(8676002)(70586007)(41300700001)(40480700001)(186003)(26005)(336012)(47076005)(1076003)(2616005)(426003)(40460700003)(6666004)(107886003)(7696005)(54906003)(110136005)(316002)(86362001)(82310400005)(478600001)(36756003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jan 2023 11:18:16.2042 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e964f827-04fb-4ec9-e983-08dafa0edc92 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.161]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT065.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB6933 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Wayne Chang Remove the property 'ccgx,firmware-build' now we have migrated devices to using the 'firmware-name' property. Signed-off-by: Wayne Chang Co-developed-by: Jon Hunter Signed-off-by: Jon Hunter --- V5: Added this patch from V3 drivers/usb/typec/ucsi/ucsi_ccg.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/drivers/usb/typec/ucsi/ucsi_ccg.c b/drivers/usb/typec/ucsi/ucsi_ccg.c index 889a831e251d..0f18b32df8e6 100644 --- a/drivers/usb/typec/ucsi/ucsi_ccg.c +++ b/drivers/usb/typec/ucsi/ucsi_ccg.c @@ -1358,16 +1358,13 @@ static int ucsi_ccg_probe(struct i2c_client *client) INIT_WORK(&uc->pm_work, ccg_pm_workaround_work); /* Only fail FW flashing when FW build information is not provided */ - status = device_property_read_u16(dev, "ccgx,firmware-build", - &uc->fw_build); - if (status) { - status = device_property_read_string(dev, "firmware-name", - &fw_name); - if (!status) { - if (!strcmp(fw_name, "nvidia,jetson-agx-xavier")) - uc->fw_build = CCG_FW_BUILD_NVIDIA_TEGRA; - else if (!strcmp(fw_name, "nvidia,gpu")) - uc->fw_build = CCG_FW_BUILD_NVIDIA; + status = device_property_read_string(dev, "firmware-name", + &fw_name); + if (!status) { + if (!strcmp(fw_name, "nvidia,jetson-agx-xavier")) + uc->fw_build = CCG_FW_BUILD_NVIDIA_TEGRA; + else if (!strcmp(fw_name, "nvidia,gpu")) + uc->fw_build = CCG_FW_BUILD_NVIDIA; } }