Received: by 2002:a05:7412:2a91:b0:fc:a2b0:25d7 with SMTP id u17csp34886rdh; Tue, 13 Feb 2024 08:36:52 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWceQPOP6aJxMdTNL/MzSpFv0wPbg4fO57MpmX5wPGHQZnFlj8lK8IHb3kPD9U8oLCeLD0DwDxvIGH3TdxmczNk6e0jWh4Rp9A/zx676Q== X-Google-Smtp-Source: AGHT+IEf9OhCq0Jv+tOli/9z2yTPGjGDLSF0zEWROBK29r3Yj748/J6aDAU866N5mUUpr6+c1tMf X-Received: by 2002:a17:907:1759:b0:a3d:1c54:91b2 with SMTP id lf25-20020a170907175900b00a3d1c5491b2mr937488ejc.18.1707842212329; Tue, 13 Feb 2024 08:36:52 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707842212; cv=pass; d=google.com; s=arc-20160816; b=fC1b9eJBNjRkoewbf6Mtc/feKZDo+Xes+kZCssjKlpNkkCzL/bcs60WxasdhmHLeSp sMttMajARQyRQdqjU1o8Y3+V3fyrHGGlruU5BYSEZRjmjuGD/IMZObkqxE2r+Vy63YoU ums3JMn7lo7o7fHfS2mYrIL1PtYiRt+8fs+WSwgEJEo4hrEzU5M6JUFfL5i6rIt7nmpJ g/4i2R5HG0yvmU86Io7YbOMuYQJezlt9/VxK7cuB5j3KvBq5pveVbkYj3UY2l/qFVD8X csa56YTMfIUxNSERhfpz4g8RmurAQ1R7GGjoI9E3vaygXyQtDOm5qmYjgHl/AFxT9yrr /B5A== 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=nvc77WCnRV4sDvDJm8rB2oR+ANfdjFRQlh8Lp6UbZbY=; fh=rM2FpV4JFZMt4KSN1ylmaOuq6kJul98dngbbCuEbnJ4=; b=Wd/d2SuzF8tCoCDJxNwTwawSM450HMaO0iQR/Qb3fKN4t4CMKERffWqtQu2jtusWDP YHpn5tE3vPIZ7jK9+E2GCrqqlMSHcoxmKoN8tH2s1zFgoZcQ28+aSaXNwFEVMEnnoplm 4/Hx8Wc8cRpYoXo38HWpE3iICvNPtWvGH0GLRMupkiRm3RuHa1ZE479yLTfUwpbj1X7s LtnCReAWm5i56qdnVsbVWMIj3WevKFfPVrMSsmW/XT2X94OHgWJLRQuEMFyaLBwC1fxD fdD6bMM7DHYxMTl5xW8tuP0l+T24dnY6+xDCNyhb/igzQMwqX9yWf1J+VrZR2QKhB3oX Ul0Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=XgNaV36o; 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-63900-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-63900-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; AJvYcCU5TuMdSkJ7XZ4J+Tv4aEt3fUZSThFmVhzD4Rx2EEidEm8f35zcE5/PZBZ/E+sKv7ISlkgB+lXLYVEQ7iIByqVMPfA6ss/wv5e/8B+Hlg== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id ck12-20020a170906c44c00b00a3773bde933si1347965ejb.501.2024.02.13.08.36.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Feb 2024 08:36:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-63900-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=XgNaV36o; 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-63900-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-63900-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 46CFB1F25058 for ; Tue, 13 Feb 2024 16:36:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 51C015FDD1; Tue, 13 Feb 2024 16:36:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="XgNaV36o" 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 240481D6A5; 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=ljWoyGwLgWygUoCOJarRcWLjwSqwtcVmNtko7bVe6jwruqMt/Zkse9HjDbRJ/0izg5Fv+BCsCZtoy4L6svRbRs+qqlhOKE0IlmkWBVSeOrwv/t7kk/uyqwLcvwiNjyCOCxD6jGHO8XNVYWttnTp66Qm8qB1CGQQL1EQR3bLhGnY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707842176; c=relaxed/simple; bh=yuTb4jTuPyK9zd2erSEPdlQNmlWtp4FbFwTZNwaDxN8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=TTNTXA96rkE/EeBmgsJ7ZJZPnNKGSdBqg+YABprrKUwMWw+HfFXMYlk3o1nSUjJwllAzWNtrrIU0xBsbjIrdkLQ4DBC1D1Z0vXA3OidPAwwR+2iY+gB80QAC8prpm/BEka4MVYp3MVo3s4/9zbVF/zFKCpGG89MmBwNElW/k3Nw= 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=XgNaV36o; 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=yuTb4jTuPyK9zd2erSEPdlQNmlWtp4FbFwTZNwaDxN8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XgNaV36oFN6QVdrz4MFhcnNMjpUv5SRVujrj+NlZg/mMYsZbyqaPg6WymMA1ydebe eWNf5JFgYsQAsNTBMkxFhX1CdBGYJkVCA7cQTkMx8I6be5C0mt4IjyQNqFPeyBvgin Vs2Edx1n4CIcQFYOfcqQycYJJ+cfngSfvhpHKHI5bMXNcR/ONSRgvCI4Kj7TwIrDsM bqI5zu+HNfkJfMxBhfnAYhK/ar3W8QT72MyUpPcqSxrsZU4YGAPRARnEVp7uav41uI dXr9RA3KZXw/8pAvE1EH722KlzX+Z5dX+pVmu498jLQPy1YPPUXYBfIliz2Gs33AKU sSIFq8Yqq/utA== 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 5A7013782073; Tue, 13 Feb 2024 16:36:11 +0000 (UTC) Received: by jupiter.universe (Postfix, from userid 1000) id F38AF4800D1; 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 03/12] dt-bindings: phy: add rockchip usbdp combo phy document Date: Tue, 13 Feb 2024 17:32:37 +0100 Message-ID: <20240213163609.44930-4-sebastian.reichel@collabora.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240213163609.44930-1-sebastian.reichel@collabora.com> References: <20240213163609.44930-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 Content-Transfer-Encoding: 8bit Add device tree binding document for Rockchip USBDP Combo PHY with Samsung IP block. Co-developed-by: Frank Wang Signed-off-by: Frank Wang Signed-off-by: Sebastian Reichel --- .../bindings/phy/phy-rockchip-usbdp.yaml | 169 ++++++++++++++++++ 1 file changed, 169 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..4ac1825144d7 --- /dev/null +++ b/Documentation/devicetree/bindings/phy/phy-rockchip-usbdp.yaml @@ -0,0 +1,169 @@ +# 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 + + 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 + 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 lane map by DisplayPort Alt mode, this property is not need. + + 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 + + dp-port: + type: object + additionalProperties: false + + properties: + "#phy-cells": + const: 0 + + required: + - "#phy-cells" + + usb3-port: + type: object + additionalProperties: false + + properties: + "#phy-cells": + const: 0 + + required: + - "#phy-cells" + + 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 + - dp-port + - usb3-port + +additionalProperties: false + +examples: + - | + #include + #include + + usbdp_phy0: phy@fed80000 { + compatible = "rockchip,rk3588-usbdp-phy"; + reg = <0xfed80000 0x10000>; + 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>; + + usbdp_phy0_dp: dp-port { + #phy-cells = <0>; + }; + + usbdp_phy0_u3: usb3-port { + #phy-cells = <0>; + }; + }; -- 2.43.0