From patchwork Fri Feb 16 17:01:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Reichel X-Patchwork-Id: 202252 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:c619:b0:108:e6aa:91d0 with SMTP id hn25csp652961dyb; Fri, 16 Feb 2024 09:07:38 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWasSOOtiKwcrCs5gpaWmu3Li0/eeeH7qFcTw6RSdu4qpPWFRYhDJGMGyxYIxctdJFTk4UecHpdemVKSPAv40LXOQrX1A== X-Google-Smtp-Source: AGHT+IEW/zxHYTy9vrNDgE309bRrb0NR06iRi1yHni703ibUXp5YYEMZRodifAX/nOQWRK4Rzw9L X-Received: by 2002:a05:620a:4489:b0:785:a0fd:26c with SMTP id x9-20020a05620a448900b00785a0fd026cmr9226161qkp.36.1708103257910; Fri, 16 Feb 2024 09:07:37 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708103257; cv=pass; d=google.com; s=arc-20160816; b=UQwmMl32YCI6juhzFhrFPK8jXHztFqrl5mEvPFEcBDJEeU7LY68dZhN7JDB7+13DNb kmQudjlbxavmCUy1fe3v/iUAG3CcKSy91z8I6ntFjkCM4qPW7CLuEDgSmtLvQLzOJEo8 HA5QodrTY0Y/VT9lMf+X7QCUB6dT8OAFhcxWafualZXByWYvc0DYXTJZ8fi5ro1fuLsa pq7brDw4aiwZ6ilzzOg7WGr+wSuXFoswYYUzs2RIESn60W+bJY6fufeD4j/rlhdW2sD7 60hYkyqLFcxf2KSxMjGV4BrUlNypIhd0vrwY8XWdyGRpLDsyK/kuhIRcDMmbtOYTyNzx Chxg== 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:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=ULqGq3uFWB+v6e9BAuj5hmlwRU4PHC6ZqEwZRlC2xPw=; fh=ShfbxFZLBWNoKhTPbu6AB8X17BvaQyErEvtQ9cg6zSM=; b=0lAuQD2q6DaTAxOv1/DeJkUMcn08bVFRBfrR2aaYwL51TFopdy3jlaThe9RpBAHIOF jUXfP8g8H6DFTq82FhYjOS7FJsdeRyhU7vf00cboUr+oQJ2jAF1CYosL6k2bWOfhgfdE vARwatLyBffWk2TzLcnZrGET2rfIMrph8mFwhwBujBRzKi/Ir65rd0Zvk/iT4TZiC1Ar xMLSYRBWOd1+Hzx6h8VC2zvsOZRdIKEgj+Xh91rL4hu64EMSl7g5R7ha5ViktHM6Kwwx tT7yQkbTg8O7bysz96489U9HVrQxxrU+qr5tvb/4yvjVRoPZGDO1GPwmE99lWmbDoB/K Sdug==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=P9ZW1yQq; 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-69019-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-69019-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id pq9-20020a05620a84c900b007873fc3b686si355586qkn.736.2024.02.16.09.07.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Feb 2024 09:07:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-69019-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=P9ZW1yQq; 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-69019-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-69019-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 E94831C2353F for ; Fri, 16 Feb 2024 17:07:17 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9A2671350E5; Fri, 16 Feb 2024 17:05:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="P9ZW1yQq" 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 EDD4512FB31; Fri, 16 Feb 2024 17:05:20 +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=1708103122; cv=none; b=tVo16tK6FeeEEXK62Sqq5tkVVyNFDxort1ytqnxjZGO59nxIOtZQ5wlBTvy9VDOtRhe7laYbmTsI8opzwVF6qpC/fPBqWcN4KIGLCLuDZRbjT+td1KR9TCUbHwtq15Jc4jd95AE+pKi5dfvrSgGka6TVGqwT3xZ1GVkfjdt7n+c= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708103122; c=relaxed/simple; bh=+QN3wDaP88zwhEsmG1eAumWr78ePlqFlD4QYYDrJfgI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ZpnWx3uYhllR66F5QD0HLJsXzdRSbF3U75ucEONgi5c6YNJCiWnWbibjWiwQWUYn27wc4YIDXx2RAMhl+x8UW03H4Z1+n/gtpJsc8gmxDZdxogs7/uIcG2EavF+aJwPV7YDzyzaaBav34YEayu1N4QVHkGLaYpielEveQnrdcGY= 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=P9ZW1yQq; 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=1708103117; bh=+QN3wDaP88zwhEsmG1eAumWr78ePlqFlD4QYYDrJfgI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=P9ZW1yQqTgIBhaL6p6GcgHo8GbKoBnEhcevwIpmf0QOy9wodqaZaGmtjSXNSfIXqh IxviuI6SV7PgugOFpcwcl1APn4F5f9SgXW6EycNVlma8L4GUipbISQGNtuS7I9jKUK B+Z+oofSOxB3erQpBBXj7IpCSlCy5jarCE+11/ONJdRYwJUhNhdr9ojo5sXhe2eqn7 rrD0+NgNH0kwXcI64wWs+y3s/3g+BmjZEaQTFZ0aqkLgbKAtpT9VnVxsnxR44ihvel CyZaTxzSc2HbIT6f6kmNGE78nK/wzggjPpF62P+RTp7ZHSVaYaellGXwtWI8sQou5p f+YZv0eL/8hBg== 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 43E323782084; Fri, 16 Feb 2024 17:05:17 +0000 (UTC) Received: by jupiter.universe (Postfix, from userid 1000) id D10554800CA; Fri, 16 Feb 2024 18:05:16 +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, Conor Dooley Subject: [PATCH v3 01/10] dt-bindings: phy: add rockchip usbdp combo phy document Date: Fri, 16 Feb 2024 18:01:16 +0100 Message-ID: <20240216170514.75200-2-sebastian.reichel@collabora.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240216170514.75200-1-sebastian.reichel@collabora.com> References: <20240216170514.75200-1-sebastian.reichel@collabora.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791076081916735575 X-GMAIL-MSGID: 1791076081916735575 Add device tree binding document for Rockchip USBDP Combo PHY with Samsung IP block. Co-developed-by: Frank Wang Signed-off-by: Frank Wang Reviewed-by: Conor Dooley Signed-off-by: Sebastian Reichel Reviewed-by: Heiko Stuebner --- .../bindings/phy/phy-rockchip-usbdp.yaml | 148 ++++++++++++++++++ 1 file changed, 148 insertions(+) create mode 100644 Documentation/devicetree/bindings/phy/phy-rockchip-usbdp.yaml diff --git a/Documentation/devicetree/bindings/phy/phy-rockchip-usbdp.yaml b/Documentation/devicetree/bindings/phy/phy-rockchip-usbdp.yaml new file mode 100644 index 000000000000..1f1f8863b80d --- /dev/null +++ b/Documentation/devicetree/bindings/phy/phy-rockchip-usbdp.yaml @@ -0,0 +1,148 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/phy/phy-rockchip-usbdp.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Rockchip USBDP Combo PHY with Samsung IP block + +maintainers: + - Frank Wang + - Zhang Yubing + +properties: + compatible: + enum: + - rockchip,rk3588-usbdp-phy + + reg: + maxItems: 1 + + "#phy-cells": + description: | + Cell allows setting the type of the PHY. Possible values are: + - PHY_TYPE_USB3 + - PHY_TYPE_DP + const: 1 + + clocks: + maxItems: 4 + + clock-names: + items: + - const: refclk + - const: immortal + - const: pclk + - const: utmi + + resets: + maxItems: 5 + + reset-names: + items: + - const: init + - const: cmn + - const: lane + - const: pcs_apb + - const: pma_apb + + rockchip,dp-lane-mux: + $ref: /schemas/types.yaml#/definitions/uint32-array + minItems: 2 + maxItems: 4 + items: + maximum: 3 + description: + An array of physical Type-C lanes indexes. Position of an entry + determines the DisplayPort (DP) lane index, while the value of an entry + indicates physical Type-C lane. The supported DP lanes number are 2 or 4. + e.g. for 2 lanes DP lanes map, we could have "rockchip,dp-lane-mux = <2, + 3>;", assuming DP lane0 on Type-C phy lane2, DP lane1 on Type-C phy + lane3. For 4 lanes DP lanes map, we could have "rockchip,dp-lane-mux = + <0, 1, 2, 3>;", assuming DP lane0 on Type-C phy lane0, DP lane1 on Type-C + phy lane1, DP lane2 on Type-C phy lane2, DP lane3 on Type-C phy lane3. If + DP lanes are mapped by DisplayPort Alt mode, this property is not needed. + + rockchip,u2phy-grf: + $ref: /schemas/types.yaml#/definitions/phandle + description: + Phandle to the syscon managing the 'usb2 phy general register files'. + + rockchip,usb-grf: + $ref: /schemas/types.yaml#/definitions/phandle + description: + Phandle to the syscon managing the 'usb general register files'. + + rockchip,usbdpphy-grf: + $ref: /schemas/types.yaml#/definitions/phandle + description: + Phandle to the syscon managing the 'usbdp phy general register files'. + + rockchip,vo-grf: + $ref: /schemas/types.yaml#/definitions/phandle + description: + Phandle to the syscon managing the 'video output general register files'. + When select the DP lane mapping will request its phandle. + + sbu1-dc-gpios: + description: + GPIO connected to the SBU1 line of the USB-C connector via a big resistor + (~100K) to apply a DC offset for signalling the connector orientation. + maxItems: 1 + + sbu2-dc-gpios: + description: + GPIO connected to the SBU2 line of the USB-C connector via a big resistor + (~100K) to apply a DC offset for signalling the connector orientation. + maxItems: 1 + + orientation-switch: + description: Flag the port as possible handler of orientation switching + type: boolean + + mode-switch: + description: Flag the port as possible handler of altmode switching + type: boolean + + port: + $ref: /schemas/graph.yaml#/properties/port + description: + A port node to link the PHY to a TypeC controller for the purpose of + handling orientation switching. + +required: + - compatible + - reg + - clocks + - clock-names + - resets + - reset-names + - "#phy-cells" + +additionalProperties: false + +examples: + - | + #include + #include + + usbdp_phy0: phy@fed80000 { + compatible = "rockchip,rk3588-usbdp-phy"; + reg = <0xfed80000 0x10000>; + #phy-cells = <1>; + clocks = <&cru CLK_USBDPPHY_MIPIDCPPHY_REF>, + <&cru CLK_USBDP_PHY0_IMMORTAL>, + <&cru PCLK_USBDPPHY0>, + <&u2phy0>; + clock-names = "refclk", "immortal", "pclk", "utmi"; + resets = <&cru SRST_USBDP_COMBO_PHY0_INIT>, + <&cru SRST_USBDP_COMBO_PHY0_CMN>, + <&cru SRST_USBDP_COMBO_PHY0_LANE>, + <&cru SRST_USBDP_COMBO_PHY0_PCS>, + <&cru SRST_P_USBDPPHY0>; + reset-names = "init", "cmn", "lane", "pcs_apb", "pma_apb"; + rockchip,u2phy-grf = <&usb2phy0_grf>; + rockchip,usb-grf = <&usb_grf>; + rockchip,usbdpphy-grf = <&usbdpphy0_grf>; + rockchip,vo-grf = <&vo0_grf>; + };