From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=52.101.127.123 ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1796019637; b=zKclNLXIR/M+WCL0runbyjM0zVDkBotGigf2KXtk2Bghum/qyK9I24OSNP+sEFloQtII q6iRW2ZvXhUWSibxtdrlFMSbDiw+U4zRK9H0Yd4TEYaT8JTe2SrXhoF8ZYYAgslz8HPVs lONrTPkGxZ+hqIE1ceh6o1NyiHfydUSyZJs/F4GhxUUuStQYYMAVuUALDtkrKGN3WWW0o Jr2lg97r9au2Kq+O6PMSyK6AA5wPCGoxdW9EoBAegU5sqhuQKR37yKVyvU1cW73jko/Ya Ld4CX8d8/uwFAF/Baf0LTIBgMKK2SDf/qcVk57tsJwJ3iSqAucR0eY5ztiCkctpzHrw== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796019637; h=DMARC-Filter:Received:Received:X-MS-Exchange-Authentication-Results: Received-SPF:Received:Received:From:To:Cc:Subject:Date:Message-ID: X-Mailer:MIME-Version:Content-Transfer-Encoding: X-EOPAttributedMessage:X-MS-PublicTrafficType: X-MS-TrafficTypeDiagnostic:Content-Type: X-MS-Office365-Filtering-Correlation-Id:X-MS-Exchange-SenderADCheck: X-MS-Exchange-AntiSpam-Relay:X-Microsoft-Antispam: X-Microsoft-Antispam-Message-Info:X-Forefront-Antispam-Report: X-MS-Exchange-AntiSpam-MessageData-ChunkCount: X-MS-Exchange-AntiSpam-MessageData-0:X-OriginatorOrg: X-MS-Exchange-CrossTenant-OriginalArrivalTime: X-MS-Exchange-CrossTenant-Network-Message-Id: X-MS-Exchange-CrossTenant-Id: X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: X-MS-Exchange-CrossTenant-AuthSource:X-MS-Exchange-CrossTenant-AuthAs: X-MS-Exchange-CrossTenant-FromEntityHeader: X-MS-Exchange-Transport-CrossTenantHeadersStamped; bh=swaNJsBuC6hVLPCBAHNh2A8xpup6Un9yGwH3cPTlV3o=; b=QIWB8J9AeG82qmn1rW/dgVHtQFKdE3seu3dXReynGbbFXIXnPZx7kGD6UnO3qzRqa+xl hE06UbPBr6UptjY+fgD4YktK1jTriLk7ehRaa5wSELnmjRb52FDTdi6bXsqnXagSr48o/ WwidLBXZBtDKud24EJP6hPem/LuB5pujRmhEX55juIjTPeUflNSBfcZD79XoM4xDRTxlP GCq1mHkUjwLTgvZBVlUpj2FrDMp0F3AYy36Xk7o1M5inzcNhfn8aWSKZpwjbZfHVF1+Ak Q4+2JbWMC1R2gFVhnVQe5mQbo1bx3KPSKc+i0e/CjEC2nFA58wBHzl38p0YxTMN1NUw== ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=none header.from=cixtech.com; spf=pass smtp.mailfrom=cixtech.com; arc=pass header.oldest-pass=0 smtp.remote-ip=52.101.127.123 Received: from TYDPR03CU002.outbound.protection.outlook.com (mail-japaneastazon11023123.outbound.protection.outlook.com [52.101.127.123]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (secp384r1) server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E781B606A320; Mon, 30 Nov 2026 06:20:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org E781B606A320 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=cixtech.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=cixtech.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ZSks2mVsl1AN93LcOasRqod9liMv7O+Ah5OR7rmfGfuL3mbccjDRfx7L5T02KudTlARUl8NDJYN08l6VsOfagzaLMZ7F+q4yxf1Km3ouGXAW6nV+jH3DRot0jqW6bVqz5qt7vfdBbF5MTskkOcx5CzKfbSz71ZsTmtx77XtdK3YRV5DO/oDdck6irofLPev6F4hokpE5wDlN1f0KuPOUmtKEoDGMrZTZCAjapTGs4ciczM6iMTy/mlAWbHPLG+ZJoiEKV1xus1K0nE6rgsbQgf27/Dx2mqzoTyNlUXQLZRJeKLU2XLxFnWE7d6RpPETxySaE0+r5QCh5weakzB62zA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=swaNJsBuC6hVLPCBAHNh2A8xpup6Un9yGwH3cPTlV3o=; b=REePdcAyNikM1X/zlsEpoFox97SZ4kQ9IJGh4vaZmTAJyT8XjXjIv246ABLNguiDHn9Z/U/hM91yzs17bT6TolEkHYnS18hiqnDkFnjAdj8neCBUxijzy3Hii0WB3Rq9PVx7MLJdn1YeTpt5HmFr0odoxQIxvbmon0Gd6iz62LBe98O5KbI5yI2qiMWUr8IKcdQnoc59ERP7nXZHXsSFKytPnKVsmtv4cQIwX6EGJV2EpgH5eVDBLVB1G3XGQh8R7P8teD2td7SwHYH7nUyMuCZxNo8oLdwnLQg8D4/tOJRXHiukEoQVxOkVOdpRwe/2Jmgdiz1EinKSOlRutXH5pQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 222.71.101.198) smtp.rcpttodomain=cixtech.com smtp.mailfrom=cixtech.com; dmarc=bestguesspass action=none header.from=cixtech.com; dkim=none (message not signed); arc=none (0) Received: from SI1PR02CA0038.apcprd02.prod.outlook.com (2603:1096:4:1f6::15) by TYZPR06MB5322.apcprd06.prod.outlook.com (2603:1096:400:1f2::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.688.8; Mon, 30 Nov 2026 06:20:31 +0000 Received: from SG2PEPF000B66CE.apcprd03.prod.outlook.com (2603:1096:4:1f6:cafe::10) by SI1PR02CA0038.outlook.office365.com (2603:1096:4:1f6::15) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.662.12 via Frontend Transport; Mon, 30 Nov 2026 06:20:30 +0000 X-MS-Exchange-Authentication-Results: mx.microsoft.com 1; spf=pass (sender IP is 222.71.101.198) smtp.mailfrom=cixtech.com; dkim=none (message not signed) header.d=none;dmarc=bestguesspass action=none header.from=cixtech.com; Received-SPF: Pass (protection.outlook.com: domain of cixtech.com designates 222.71.101.198 as permitted sender) receiver=protection.outlook.com; client-ip=222.71.101.198; helo=smtprelay.cixcomputing.com; pr=C Received: from smtprelay.cixcomputing.com (222.71.101.198) by SG2PEPF000B66CE.mail.protection.outlook.com (10.167.240.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.688.5 via Frontend Transport; Mon, 30 Nov 2026 06:20:29 +0000 Received: from gary-System-Product-Name (unknown [172.16.66.27]) by smtprelay.cixcomputing.com (Postfix) with ESMTPSA id E7B8A427EFC0; Mon, 30 Nov 2026 14:20:28 +0800 (CST) From: Gary Yang To: Vinod Koul , Neil Armstrong , Manivannan Sadhasivam , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Fugang Duan Cc: Gary Yang , Luo Liu , CIX Linux Kernel Upstream Group , linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 0/2] phy: cix: add Sky1 USB/DP combo PHY support Date: Mon, 30 Nov 2026 14:20:26 +0800 Message-ID: <20261130062028.3366748-1-gary.yang@cixtech.com> X-Mailer: git-send-email 2.50.1 X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SG2PEPF000B66CE:EE_|TYZPR06MB5322:EE_ Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: acc26e09-23ff-432d-f220-08df4eaa0851 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|7416014|376014|82310400026|36860700016|1800799024|23010399003|6133799003|261009223027099003|18002099003|10067099003|56012099006|261102123227099003|261028144727099003|261026121527099003|261026140227099003|261021123027099003|261021121427099003|261022105027099003|261022113327099003|261022075727099003; X-Microsoft-Antispam-Message-Info: UAMHbEEARrHqNP9AWD6F/Svnea18B4jxqx4fqDcI74zaFCvLgo225OLPKXnZQJJ0rHMhneWzLtIKEeGJEUh/q+FKX6+112EtklZv9A/fyw1ZQNaeDNL5dt9EfcQBVcXtk3DY4CcWF44GaJifIuxmVDVRcjmSzinUwYgiBjp3ZEB/36QaFIa70aRCBstbXvIFZ/+5fD6dfySvwhygBWiOTvJnO9Y5NvxxxT9AkT9VuADaCIsklJWP4LX6e2jLUXkvZzjeaCAyTuCX4aYx16vWaAoysFD2EU3o4vyGkMDe/VbhgvP/4ngrdQ5OrP8lc2mwVZ0rJ4XmNXpj5FbZqn7y4a71tUa1Q7REcxlwl8qkmR7PDkcMqabdbFkJd3Z4fOsF0I40ijDg7JEuWqDrBQVkiJpERHF7dUTUAovvDgW7+8PtUR6ZLJKI7cD2s9uCUeTXKmEIuTw5Jk7cd5lhh2jPaTCxWwr+s3lY7aPPN6rZHFA90Pl6Il/2pPCJnvnyfAZO4dmsI2uEVlLs2mlwdLx9qr2TNcDRFbctE4m1zIDOujMu2FlCpJkjzK78R2xmvtdhT5Di7knJiUv0IqAlUUxDwPzQAfqnFgU1VPb2zfOzjXhk2zJ9s71PLDMNOH+1v9+MJ7bQtzcsspl1+rvH147AWNwPz7WMO7qNn02APKet/pQ= X-Forefront-Antispam-Report: CIP:222.71.101.198;CTRY:CN;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:smtprelay.cixcomputing.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(7416014)(376014)(82310400026)(36860700016)(1800799024)(23010399003)(6133799003)(261009223027099003)(18002099003)(10067099003)(56012099006)(261102123227099003)(261028144727099003)(261026121527099003)(261026140227099003)(261021123027099003)(261021121427099003)(261022105027099003)(261022113327099003)(261022075727099003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: E0VS5kMZ4UblrR+BTU5IVTz5qySueaXM7eW4ZJIKDQA5hlQLAsMmys6iKJPCpI80aQa1KXAvMYXhTSB1zW36ZZ8490nUX8LJz/GWmP/3Ip7gG34PzKhvBEE1H4foZZ/8r3Y3ilXEtlhbtO1L35BUtEZeMNZvsEQpS/2bNq+SudEKnTbr+ktGiKvy6XzxKQ+rR33W4J+idjHaHulmDHHKXWuMmLYZS7i8l8Sx7VJyajY8XKz8vBjg+ZakvKOLY1uJtye7psVxuL93FBs0j+ZKuBv9AD7GZa/zu4LEbUFqJDJ3SIk6XPM9yI5KrV2qKRwP1yMYI/vn9GJGZa4AR465sMjgVU676W2IB3ErTqRCXKeY9j3h2dv1fbOBZFYD93LViwV+BfYfxiih0G0qydCTpiOXd9ELpGvBvma9abHJPChR4utDp7Fiw/Z6OaeUAOSU X-OriginatorOrg: cixtech.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Nov 2026 06:20:29.8501 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: acc26e09-23ff-432d-f220-08df4eaa0851 X-MS-Exchange-CrossTenant-Id: 0409f77a-e53d-4d23-943e-ccade7cb4811 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=0409f77a-e53d-4d23-943e-ccade7cb4811;Ip=[222.71.101.198];Helo=[smtprelay.cixcomputing.com] X-MS-Exchange-CrossTenant-AuthSource: SG2PEPF000B66CE.apcprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYZPR06MB5322 This series adds support for the USB/DP combo PHY of the CIX Sky1 SoC. Each PHY instance drives one SuperSpeedPlus USB lane and up to four DisplayPort lanes of a USB Type-C port. The USB and the DP controller get their own PHY through the PHY_TYPE_USB3 and PHY_TYPE_DP cells. Plug orientation and the USB/DP mode decision are taken by the Type-C connector driver; the PHY consumes them through the Type-C switch and mux API. The USB and the DisplayPort controllers and the Type-C connector are not yet described in the CIX device trees. The graph links and the consumers will be added together with them. Patch 1 adds the binding and patch 2 the driver. The MAINTAINERS update is part of patch 2, so that patch 2 can be applied without patch 1. The SoC and board nodes are sent separately as a follow-up, since they go through the SoC tree. Patch 2 builds on Luo Liu's "Add Sky1 DisplayPort PHY support" series: https://lore.kernel.org/linux-phy/20261102030425.1957585-1-Luo.Liu@cixtech.com That series creates drivers/phy/cix/ together with the PHY_CIX_DP Kconfig symbol and the CIX SKY1 DISPLAYPORT PHY DRIVER MAINTAINERS entry. This series adds the PHY_CIX_USBDP symbol and the new binding, and renames the entry to CIX SKY1 PHY DRIVERS. It should be applied on top of Luo's series to avoid conflicts in drivers/phy/cix/{Kconfig,Makefile} and MAINTAINERS. Changes in v3: - Drop the inline keyword from the register access helpers, drop the udphy_write() wrapper and use writel() directly. - Return the actual clk_prepare_enable() error instead of initialising the return value to -EBUSY, and reflow the retry comment to use the full 80 columns. - Initialise the PHY mutex with devm_mutex_init(). Changes in v2: - Replace the hand-written regmap backend over the PHY registers with direct writel()/readl() access. - Take the DP link rate in Mb/s, as defined by struct phy_configure_opts_dp, and select the register table from the link configuration entry instead of repeating it per case. - Protect the PHY state with guard(mutex) and drop the goto-based unlock paths. - Use dev_err_probe() consistently in probe(). - Fix local variable ordering in probe() and sky1_udphy_init(), and drop the unused register read. - Lowercase hex constants, fix overlong lines, add the missing copyright header and a missing newline before return. - Move the driver out of ARM/CIX SOC SUPPORT into the CIX SKY1 PHY DRIVERS entry, and drop the commit message claim about the bootloader handing over an initialized port. - Validate the DP link rate before the PLL is touched, so that an unsupported rate no longer leaves PLL1 disabled. - Honour set_rate, set_lanes and set_voltages independently, and keep the negotiated lane count in the driver, so that a caller that only updates the voltage swing and pre-emphasis levels, as dw-dp does, works with an uninitialised lanes field. Validate all of the options before any of them is applied. - Program the TX voltage swing and pre-emphasis levels per lane instead of applying the settings of lane 0 to all lanes. - Add .init to the USB3 PHY ops and only touch the PHY registers while the PHY is powered. - Track the active and the requested mode separately and reprogram the PHY on the next power-on only when the alt mode or the plug orientation has changed, instead of enabling the APB clock a second time. - Reset the PHY when it is reprogrammed, and only reprogram it when the register table actually changes, so that an active USB link is left alone when the mode changes between USB and USB+DisplayPort. - Handle the deprecated DisplayPort pin assignment F as a USB+DP state, like the other Type-C mux drivers do. - Report the DisplayPort lane count only after the PHY has been powered on. - Ignore Type-C mux states of alt modes other than DisplayPort, which used to be mistaken for a DisplayPort state because the state numbers overlap. - Describe the two PHYs with #phy-cells = <1> instead of child nodes, reference the common USB switch binding, describe the Type-C graph connection, and drop the cix,default-conf property. - Keep the binding example limited to the PHY node and its graph ports, and drop the stubbed USB and DisplayPort consumers. Patch 1 is unchanged from v2. Gary Yang (2): dt-bindings: phy: add CIX Sky1 USB/DP combo PHY phy: cix: add Sky1 USB/DP combo PHY driver .../bindings/phy/cix,sky1-usbdp-phy.yaml | 150 ++ MAINTAINERS | 4 +- drivers/phy/cix/Kconfig | 16 + drivers/phy/cix/Makefile | 1 + drivers/phy/cix/phy-cix-usbdp.c | 1419 +++++++++++++++++ drivers/phy/cix/phy-cix-usbdp.h | 257 +++ 6 files changed, 1846 insertions(+), 1 deletion(-) create mode 100644 Documentation/devicetree/bindings/phy/cix,sky1-usbdp-phy.yaml create mode 100644 drivers/phy/cix/phy-cix-usbdp.c create mode 100644 drivers/phy/cix/phy-cix-usbdp.h -- 2.50.1