From patchwork Wed Feb 14 11:45:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cristian Ciocaltea X-Patchwork-Id: 20367 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:bc8a:b0:106:860b:bbdd with SMTP id dn10csp1151582dyb; Wed, 14 Feb 2024 03:47:10 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXs0/Z8DJ1sLuKXpDyxAzUR1wp+m3acOfQeobuMTLsQ9qjzOmTAktZKnEc3zAPCUiwYvh0EB5BAjdCxzU78gGOtd8qO8Q== X-Google-Smtp-Source: AGHT+IGy1U20rnqpv1llw1eUhRjw7mz+oUEubQLLOO6f/h/c7IXbRFzX/WgvXKU/wfH68F7kpUuM X-Received: by 2002:a25:e0d5:0:b0:dcc:9e88:b15 with SMTP id x204-20020a25e0d5000000b00dcc9e880b15mr1998608ybg.41.1707911230725; Wed, 14 Feb 2024 03:47:10 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707911230; cv=pass; d=google.com; s=arc-20160816; b=L2t1LOPvZniuUpBe4jGzMZ6GKhLkuuRmo6Tr7xHKNQRdtuGaFiKt/ufGeeYTlsC4dt kkVMU+VKM7/gLWKSePDam3DIDpKnTS2BX0KwFpe412LKv2kuL46BMnqod3DJ3dP55h5b uL7urFsCDvtTz9CKc3pTp9vcYNGjhNSYkthjYD1MPaK4nVRzvG6B3U/ZTk/cjcN13W39 FdWxCxq3OoAD+vm3xZunZW8CXHIZ4REt1DRqx6gCmsat1eDmhlA0GzJwMZgweVTsaZFI ll5AJiZ92w0YWN6TRrs35Gv+jqPPk7BUaVD5h/7KayY58Ai1mt563J4o+DgRKgXA/U+Z L6LQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:from :dkim-signature; bh=wk/yvac68KApX3QCxVFNWDnL3uuzD5WQyNBDkyO4nBU=; fh=/yDyQXzWi0pvVAecjGfqCqj3acCqL3UW/0BkHRC0XUc=; b=FCRZFheE4FJePMH0tEvwweFs826FEi4S7gt47J62Sv7bWnrmefoBsjYLGbGcqUPBp7 p+p23nXlzj6fk2iLisDqVl24gnyNC6E4F2Icb2JXtIcKXso6rgO6cy97MWLE7wM7gG9k JUYpzHdlFndHdz/W3m5HT7T3fbh+OyFE+szbWrObyyrCIQnbgysOE5T2VtoKaOphvo8X 2unX/8s0jc+rMzyxAtWLA0sKHCpMe0OOd9bL+3AjTKO7M2vzG1R2lBDL0YxMI1dubd/W k0Q+C3CqOCbc99iua6wZiaIydwozAuLgb043Fiurptt95ICpzWey9o158nlAMjkGTtgO 6BfQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=YA70RvpR; 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-65157-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-65157-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com X-Forwarded-Encrypted: i=2; AJvYcCWbSeUM/CmQrV7ZtZBkbXyFx2rh/v70mtdeNuQo2tYD/7U+K0kI7JBUfQyOy6T8BC87+/tcoxYQN1jmI43mno1I29VE6w== Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id f11-20020ac859cb000000b0042a990ecee2si5594560qtf.479.2024.02.14.03.47.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Feb 2024 03:47:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-65157-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=YA70RvpR; 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-65157-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-65157-ouuuleilei=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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 839A91C225C2 for ; Wed, 14 Feb 2024 11:47:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 374371B95C; Wed, 14 Feb 2024 11:46:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="YA70RvpR" 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 D60A218EB9; Wed, 14 Feb 2024 11:46:39 +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=1707911201; cv=none; b=sVvVOdqYqJ3CXK4E1nSVCbxLpEIR57zvXJ7lO2bcLRCqAtArisd1ul44JVcqwK+9PLpZFkmwyP4MzrcOzs3xN1DkKB5IfraBCr/u0nsMXKI4VWuhwjbfWf9mbBPrSpg8hkJgq+h+ekhw25p3vFIPi2L3Cm/l0AHSz70umv2FyIo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707911201; c=relaxed/simple; bh=jvl3Y+wH/gfbOOMoVy7joBUO4CawoZUoJ7kw1HD0z/U=; h=From:Subject:Date:Message-Id:MIME-Version:Content-Type:To:Cc; b=MNwOpVzrFYaXM+bfhLsrCY1wMZit4b/lAELclDX7cTvGt81t7TtAPs/8uyZE6wisqvuKJqL4tmdUVB6gcyHcbQWE8yhq2Eh/AenlYUf9qS9SUBRU/rC+pFK931U1spV4PzcriFTA0mBfXrvnCziTPjyRNXsjPjjDAaxQJF9n2fk= 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=YA70RvpR; 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=1707911198; bh=jvl3Y+wH/gfbOOMoVy7joBUO4CawoZUoJ7kw1HD0z/U=; h=From:Subject:Date:To:Cc:From; b=YA70RvpRZSuQsZE/wvgVmxVw45f0rXLs1tzxXs8bLKLUP9AAeBHDmszfK4g7Z9rzM pH6rRBh3vkUoWFAlaD6C0kde9ObclosTzemb+pih8zB2DTRmYucPsoABSUiZZRb+k2 7fMkq/pk01jgSz2yyrwPzaxAbvFbAYGutm4b5VpNCaDYqygBOMrhPCyGuw2nifwT9s ymoZZi+WYj0afGQzgYIQfgcauusscL0U6I9Sw3UDsXy4nDj1nby0dZ63kmeVLOx5kX wXd/yjUWOlJILX0Loah1ucl3ufmj5z5TFF6CC5z+clt+x7LLH2YzsANmoVgnvhT7kJ SXoYHO42DCx8g== Received: from localhost (cola.collaboradmins.com [195.201.22.229]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: cristicc) by madrid.collaboradmins.com (Postfix) with ESMTPSA id BF758378045F; Wed, 14 Feb 2024 11:46:37 +0000 (UTC) From: Cristian Ciocaltea Subject: [PATCH v4 0/2] Add support for RK3588 HDMI/eDP Combo PHY Date: Wed, 14 Feb 2024 13:45:35 +0200 Message-Id: <20240214-phy-hdptx-v4-0-e7974f46c1a7@collabora.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-B4-Tracking: v=1; b=H4sIAN+nzGUC/6WPQY7CMAxFr4KyxpWdhpKy4h5oFiYxJFJpqrSqQ Kh3n5TNVKPZzfLL/z3bbzVKjjKq0+6tssxxjKkvwex3ygXu7wLRl6w0aoOkLQzhBcEP0xMst5a vDXqyokp/yHKLz4/r8lXyLacHTCELbwzUUltbbCrCGjUZIHA5jlPkvnIxOe4m4bNLXcfXlLly6 bG6Q6mk/PqcOdO64R++9bhZ/0g0HjZvzRoQ+EgHtGQcmuNfdL2hSW/putDaeWksOl/mv+llWb4 Bo3cFUXUBAAA= To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Heiko Stuebner , Johan Jonker , Sebastian Reichel , Sascha Hauer , Andy Yan , Vinod Koul , Kishon Vijay Abraham I , Philipp Zabel , Algea Cao Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org, kernel@collabora.com, Krzysztof Kozlowski X-Mailer: b4 0.13-dev-a684c X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790874726607302232 X-GMAIL-MSGID: 1790874726607302232 Add driver and bindings to add initial support the Rockchip HDMI/eDP TX Combo PHY found on RK3588 SoC. The PHY is based on a Samsung IP block and supports HDMI 2.1 TMDS, FRL and eDP links. Please note that currently only the TMDS related functionality has been implemented. This has been tested on Radxa ROCK 5B and Rockchip EVB1 boards. Changes in v4: - Used consistent naming by replacing hdptx_*/rockchip_* with rk_hdptx_* (Johan) - Link to v3: https://lore.kernel.org/r/20240212-phy-hdptx-v3-0-2cde680cd024@collabora.com Changes in v3: - Collected R-b & T-b tags from Heiko - Converted all *_REG() args to lowercase (Vinod) - Dropped unnecessary register read/write wrappers (Vinod) - Added rate overflow check in hdptx_phy_clk_pll_calc() (Luis) - Link to v2: https://lore.kernel.org/r/20240205-phy-hdptx-v2-0-a7150814c047@collabora.com Changes in v2: - Rebased series onto next-20240129 - Removed patch 'dt-bindings: soc: rockchip: Add rk3588 hdptxphy syscon' already applied by Heiko - For consistency with SoC TRM, replaced all references to DP with eDP - Updated PHY schema per Krzysztof's review; also collected his R-b tag - Dropped FRL, EARC and 10-bit color depth functionality until the HDMI configuration options become available in PHY API - Squashed lots of regmap_write operations via regmap_multi_reg_write (Sebastian) - Introduced parametrized {CMN|SB|LNTOP|LANE}_REG() macros to replace the long list of register defines - Optimized handling of the config arrays by using ARRAY_SIZE() (Sascha) - Link to v1: https://lore.kernel.org/r/20240119193806.1030214-1-cristian.ciocaltea@collabora.com --- Cristian Ciocaltea (2): dt-bindings: phy: Add Rockchip HDMI/eDP Combo PHY schema phy: rockchip: Add Samsung HDMI/eDP Combo PHY driver .../bindings/phy/rockchip,rk3588-hdptx-phy.yaml | 91 ++ drivers/phy/rockchip/Kconfig | 8 + drivers/phy/rockchip/Makefile | 1 + drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c | 1028 ++++++++++++++++++++ 4 files changed, 1128 insertions(+) --- base-commit: 596764183be8ebb13352b281a442a1f1151c9b06 change-id: 20240128-phy-hdptx-8a98ab60d18e