Received: by 2002:a05:7412:2a91:b0:fc:a2b0:25d7 with SMTP id u17csp42963rdh; Tue, 13 Feb 2024 08:53:04 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVOkT8F5i/NoliNkncVNK9tzG+s+X4MrYw4fAZum4pDNN2O3B0LskriAHPcIXgPvEu4eD3632gvrLv0zXW5COh+FBRQwaVA5/a0Sgcuyg== X-Google-Smtp-Source: AGHT+IG8X/F3YNHPeGRMPJtclFhJGhHrYREzNqIaliSW25xHdOcj4vljZSrrWEo15AwSwJQyo2zE X-Received: by 2002:a17:90a:c7d5:b0:297:18f7:ef59 with SMTP id gf21-20020a17090ac7d500b0029718f7ef59mr41532pjb.28.1707843183646; Tue, 13 Feb 2024 08:53:03 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707843183; cv=pass; d=google.com; s=arc-20160816; b=cgVWBG30sI9E07tpamqKN6nsXHa57mIy4hCAlekxbmNRFlKQHxV601HXxb13pnS7mp IuUO2JT2erToRiy9GklNlUoe5KyodINylazf0nqZS2OdONQWIRn6oPVDNE35hRnmQKc1 mJCniVsefbSax3JxDE7KVqIB5mx+KgsW2JeglCUlI1xCT8RYVWJ8ATU6+c+kkAC3c9tO pDcv2YtqlFLDG52Xwa/8YKd8K5WBcBI0fEc3OqAytmyR+t5Y80H3Ns4pV8m6+U4uqoEp X9WbpSD8azR0SHePILAzrYpLT74VgKh6oiChQdVieST/gReFlNcLxSYSGgSO2uqdeQ2T Nl9w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=fQvbEwjRlumYhKgSgC9mFFW4jmVMg/D71wX/6hWOWGQ=; fh=NwL57MgoXU+gYwaPCrUY1+GhiLVQnc7f++X5JACZKL8=; b=k6WzHodDjegO+MEhDmlRk+rDxln7SF61qXlbdngfEGAT9hV60V5YCz/gCASVSI1Cn5 zXSGumCE4lTcbVVVmXmxuVOJJEuOzillwdx3Wf8GaY8CLY7vTME+xHI7iemdz20UOeas tHcOyhNWzYNJso8Ux3XZNnxFX3b3XvguDjXFQyGHOJKXJDPS0mr6g9bPqf6+HIFlcXLS amezYoYn1smDJ4L0uoUSXJC6ttjkwSIbu6WXf/9N7/fVgxBI1ivWopb9uB6Mh6qID6Ew RNtXkEGizk9YM5pQkidfl/VQFji/vvPHIlzKULtTU61p4m+1c+hwnxy4/2OwmxzfTHns XZXg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=BLSffZfU; arc=pass (i=1 spf=pass spfdomain=collabora.com dkim=pass dkdomain=collabora.com dmarc=pass fromdomain=collabora.com); spf=pass (google.com: domain of linux-kernel+bounces-63899-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-63899-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com X-Forwarded-Encrypted: i=2; AJvYcCWMc+pLR+3ngTem+OgB6zXpYxPHM5RIlnr+0L9GXZcGQ3iJhNFSndoWhbHYXJZNpwKZIdZaeNAhmIEAXACoRehn5DU/a5KJ2BwgfsX0VQ== Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id lx1-20020a17090b4b0100b00295e3413670si2333440pjb.131.2024.02.13.08.53.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Feb 2024 08:53:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-63899-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=BLSffZfU; arc=pass (i=1 spf=pass spfdomain=collabora.com dkim=pass dkdomain=collabora.com dmarc=pass fromdomain=collabora.com); spf=pass (google.com: domain of linux-kernel+bounces-63899-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-63899-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 6F65FB2527E for ; Tue, 13 Feb 2024 16:36:41 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DEB8F5FDB5; Tue, 13 Feb 2024 16:36:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="BLSffZfU" Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2401C182C5; Tue, 13 Feb 2024 16:36:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.235.227.194 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707842176; cv=none; b=O7LsrfCtQZ1kcgYbpkWSYoVXcD7SIE83ZNb3V564eVhBmFW/pW+ukmJRKE/bpgn4tHaJ6xZNIwKZt79sWI3Vh37odhrapo2kVn/31FY7mlLk9uFsg4BU6hgCqNlJz9MiDcTx5ptsgYoFQzI18GiuQkXdkJKKN5m6Laz0p724Lts= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707842176; c=relaxed/simple; bh=tTsD+mIweRSyvF3kzqeplej243uAAw1oTRST1KUyAAM=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=njiP/R1/SwdQgtcchPLfjhwijwhLp85CrjleLuWq6eRK2y74Z51FVjc/k65BdXVs+uXKT5dAFCOXFqgPJC+Wt7roP/wgny0c1bCJykE/wiga0L69VIuGZ7PG3iG9pLkxlmHsELCAoNTEQ5twRelIhtGV2vaOZhDQRYuA+XmBojQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=BLSffZfU; arc=none smtp.client-ip=46.235.227.194 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1707842171; bh=tTsD+mIweRSyvF3kzqeplej243uAAw1oTRST1KUyAAM=; h=From:To:Cc:Subject:Date:From; b=BLSffZfUMwr5EAZR9bLqh9WTEEwDcB1Ls7ivzoKaHDerfIirHx75fG5uCvV2JPAyA P4XfijvVIefyrhRXzMG0sAveluchRmBSOk03uFu6WmTP3adQg+SJLnY6t1waEgTbos tQ0/QAMf8Eqx1VFGCYAuxrieWWgQUgz2rBvBqlLMyjwXsECIfo4BsTzJ6QW4xOGm3p hjxga92jzqn7w4GMMmEc44qfX6H1g8wtttM1lR0S0lyc/0DqeBOag7ke4q6wqtn+Xl b1f7LDSD1hpLK1dSf0dVfRwaGt7kcVLNe0eW017WgBZ/4ZLAE7oFsonN7DpduIIgiz kQTZeF8z7dbew== Received: from jupiter.universe (cola.collaboradmins.com [195.201.22.229]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: sre) by madrid.collaboradmins.com (Postfix) with ESMTPSA id 55BF83781123; Tue, 13 Feb 2024 16:36:11 +0000 (UTC) Received: by jupiter.universe (Postfix, from userid 1000) id EE76E4800CE; Tue, 13 Feb 2024 17:36:10 +0100 (CET) From: Sebastian Reichel To: Heiko Stuebner , Vinod Koul , Kishon Vijay Abraham I , linux-rockchip@lists.infradead.org, linux-phy@lists.infradead.org Cc: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Frank Wang , Kever Yang , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Sebastian Reichel , kernel@collabora.com Subject: [PATCH v2 00/12] RK3588 USBDP support Date: Tue, 13 Feb 2024 17:32:34 +0100 Message-ID: <20240213163609.44930-1-sebastian.reichel@collabora.com> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Hi, This adds Rockchip RK3588 USBDP PHY support, which is used for two of the three USB3 controllers in the RK3588 (the third one uses a different PHY, which is already supported). The USBDP PHY offers USB3 dual-role and DisplayPort. The driver and bindings being upstreamed contains the DP parts, but only USB3 has been tested by me (upstream does not yet have a DRM DP bridge driver for this platform). What has been tested by me: - USB3 Type A ports on Rock 5A, Rock 5B, EVB1 - USB Type C port on EVB1 in Host mode I did not yet include a patch to enable the Type-C from the Rock 5B, since that requires enabling proper support for the fusb302. Since the system is usually supplied via USB-C and without any battery backup, this easily results in system reset when the power-delivery negotiation happens. As this issue is independent from the USBDP PHY, I skipped enabling that port on Rock 5B for now. You can find a branch with these patches here: https://gitlab.collabora.com/hardware-enablement/rockchip-3588/linux/-/commits/rk3588-usbdp The binding updates introduces one DT warning, for vo1 grf, which is already upstream and does not describe its clock. Fixing that requires this series, which adds the necessary clock ID for vo1: https://lore.kernel.org/linux-rockchip/20240126182919.48402-1-sebastian.reichel@collabora.com/T/#mbc27d87270f7f182fb85bf1ceaf03b902688cbb8 Changes since PATCHv1: * https://lore.kernel.org/all/20240209181831.104687-1-sebastian.reichel@collabora.com/ * VO GRF DT binding: Collect Acked-by from Conor Dooley * USB3 syscon DT binding: Collect Acked-by from Conor Dooley * USBDP PHY DT binding: fix spelling * USBDP PHY DT binding: add maxItems: 1 to gpios * USBDP PHY driver: use rk_udphy_ prefix everywhere * USBDP PHY DT addition: fix nodenames and property order * USBDP PHY DT addition: fix position of the GRF nodes * add new patches fixing existing USB2 PHY nodenames/property order Not changed: * rockchip,dp-lane-mux: Why "mux" and not "map"? - This is about muxing DP lanes vs USB3 lanes. I kept mux instead of map, since that's used downstream and there does not seem to be a good reason to diverge? -- Sebastian Sebastian Reichel (12): dt-bindings: soc: rockchip: add clock to RK3588 VO grf dt-bindings: soc: rockchip: add rk3588 USB3 syscon dt-bindings: phy: add rockchip usbdp combo phy document phy: rockchip: add usbdp combo phy driver arm64: defconfig: enable Rockchip Samsung USBDP PHY arm64: dts: rockchip: Fix usb2phy nodename for rk3588 arm64: dts: rockchip: reorder usb2phy properties for rk3588 arm64: dts: rockchip: add USBDP phys on rk3588 arm64: dts: rockchip: add USB3 DRD controllers on rk3588 arm64: dts: rockchip: add USB3 to rk3588-evb1 arm64: dts: rockchip: add upper USB3 port to rock-5a arm64: dts: rockchip: add lower USB3 port to rock-5b .../bindings/phy/phy-rockchip-usbdp.yaml | 169 ++ .../devicetree/bindings/soc/rockchip/grf.yaml | 21 + .../boot/dts/rockchip/rk3588-evb1-v10.dts | 151 ++ .../boot/dts/rockchip/rk3588-rock-5b.dts | 21 + arch/arm64/boot/dts/rockchip/rk3588.dtsi | 81 + .../boot/dts/rockchip/rk3588s-rock-5a.dts | 22 + arch/arm64/boot/dts/rockchip/rk3588s.dtsi | 114 +- arch/arm64/configs/defconfig | 1 + drivers/phy/rockchip/Kconfig | 12 + drivers/phy/rockchip/Makefile | 1 + drivers/phy/rockchip/phy-rockchip-usbdp.c | 1639 +++++++++++++++++ 11 files changed, 2222 insertions(+), 10 deletions(-) create mode 100644 Documentation/devicetree/bindings/phy/phy-rockchip-usbdp.yaml create mode 100644 drivers/phy/rockchip/phy-rockchip-usbdp.c -- 2.43.0