Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp1869944lqz; Mon, 1 Apr 2024 23:03:01 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUw0rhnYq6JvZGEQRBgSOGGjr8sXhcwfbKjSzk8J8iAAnyXA2FG9rP65cwcrp5mqb3tVOjf2BUcvnT0D6kChWs9+DQk0VgQe/3MbJvfdQ== X-Google-Smtp-Source: AGHT+IGTIfd7QMOyjorkAtu+smIjyMBK+t5+GJcjoX04pA1Cg+3hywlrmHDSmV/rHIel2GiLWwoj X-Received: by 2002:a0c:ff2a:0:b0:699:55c:f7c8 with SMTP id x10-20020a0cff2a000000b00699055cf7c8mr4874893qvt.42.1712037780927; Mon, 01 Apr 2024 23:03:00 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712037780; cv=pass; d=google.com; s=arc-20160816; b=ftzFeyBBkpRqZ/k0xz/1eqoEV6QtSGnXX5rNn+loo7zj67Vr/cLVNAF4h/pIZ91Y3b yt+76OdD4VG2PDs51JW/1IWd1xGw8y2d6FTv6aimA4f7Dh/g4Mr5CZ+KLPK4Fku6xFOz 2pX349/AT05ThOGplmgHXfhWFk8sO92f1tcQVfANiHthEttB1qGZaiNa5wkTj0odbZkk xtABMDNtCFYC70fhkuK8cmeXkmBcZMwKX/shwaWDE2xY6uGdTbi2C9OBiNC2XZlqsBHA 99r+C6FcS6C3r4Pb6YtHVvdmXQehYjjHJbfjFosLyh+ZvzIiMYBbHxn2fOlZY876wGF7 r5UA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-id:precedence:references :in-reply-to:message-id:date:subject:cc:to:from; bh=lwRDki9m3laj8PzV7yU4qELnBzPdJJCe843j5pKrMNM=; fh=f0IJh2nY2PEiBs3fUmoZGFQnSVwrhlQcN7KvB9FDrFo=; b=NCNplf1i1bmXxxf9h5UtIaIEH6U8BrO71URVxlfNT1L14jLkWQtESnbR+HxID+WtV7 XgREDH6bbU3+8AU+u1NAHeYpheBbKh7SQ8v0WO09tAKbuGRcULlMRSnvVKAcpGBNgrqg 4d1Hyp1XQtKqhpXI0OKcKUR14q66Xi2rpt/C1o5Bs7jNfT2z4NxxzPLvQKgG9EIz5bK8 5oOYGTErupSooaW1h03FXZ9xUeMm3O8tN05CZR8nEpk2FWfGCZmxqF4zgfsbXLcHFGaQ ZxwhXl4BzxcGmHVOPY97sepxhPH2CzT4R7+wcreGKmZPbcwq1d/mNuiwzxjd/ZUTI+Fx YwuA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of linux-kernel+bounces-127418-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-127418-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id kj4-20020a056214528400b006986ca20eebsi1287755qvb.303.2024.04.01.23.03.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Apr 2024 23:03:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-127418-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of linux-kernel+bounces-127418-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-127418-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.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 8D2871C20CE5 for ; Tue, 2 Apr 2024 06:03:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4758222EF5; Tue, 2 Apr 2024 06:02:22 +0000 (UTC) Received: from inva021.nxp.com (inva021.nxp.com [92.121.34.21]) (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 D74421CF87; Tue, 2 Apr 2024 06:02:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=92.121.34.21 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712037741; cv=none; b=N6GwhrUi32qe770VufqHI4YnUKAsK+RDm0NxaHSIiyDmpND349Zu7GYwEwVGf1HG6Fi+YCvgdebWDlITqpgBJkrpdSjUda6CSrMdFxyhxngYZ0M2Q/t3aG6Iq8fm5PDXVU6DV7DoR3uID+8kANtNmGN0k1tLP8VACPDFiR7AblY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712037741; c=relaxed/simple; bh=nVPYjKYXArkRwaKZg4uThAz/JxGxrkKNpdNxBtYbP4Q=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=Agvz/Ypa5U+IiKEzB9QJMHpmCBvgWZTKT47YZzbD2DvyFuWfa6sE/f+JUsJxqgfjvua5xpc3GOCnNz07kZ6tsClKWWyIF2iryulWXqRf2tevmjlRwlB95haIQCbEbziYFowj0DCYJ/iI5iPpVUVarCoggl7ixuq4vSS254EvP3M= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; arc=none smtp.client-ip=92.121.34.21 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 408B12011F9; Tue, 2 Apr 2024 08:02:18 +0200 (CEST) Received: from aprdc01srsp001v.ap-rdc01.nxp.com (aprdc01srsp001v.ap-rdc01.nxp.com [165.114.16.16]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id AD38A201CA7; Tue, 2 Apr 2024 08:02:17 +0200 (CEST) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by aprdc01srsp001v.ap-rdc01.nxp.com (Postfix) with ESMTP id C69E5183AD14; Tue, 2 Apr 2024 14:02:15 +0800 (+08) From: Richard Zhu To: vkoul@kernel.org, kishon@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, frank.li@nxp.com, conor+dt@kernel.org Cc: hongxing.zhu@nxp.com, linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kernel@pengutronix.de, imx@lists.linux.dev Subject: [PATCH v2 2/3] dt-bindings: phy: Add i.MX8Q HSIO SerDes PHY binding Date: Tue, 2 Apr 2024 13:45:03 +0800 Message-Id: <1712036704-21064-3-git-send-email-hongxing.zhu@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1712036704-21064-1-git-send-email-hongxing.zhu@nxp.com> References: <1712036704-21064-1-git-send-email-hongxing.zhu@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Add i.MX8QM and i.MX8QXP HSIO SerDes PHY binding. - Use the controller ID to specify which controller is binded to the PHY. - Introduce one HSIO configuration, mandatory required to set "PCIE_AB_SELECT" and "PHY_X1_EPCS_SEL" during the initialization. Signed-off-by: Richard Zhu --- .../bindings/phy/fsl,imx8q-hsio.yaml | 143 ++++++++++++++++++ 1 file changed, 143 insertions(+) create mode 100644 Documentation/devicetree/bindings/phy/fsl,imx8q-hsio.yaml diff --git a/Documentation/devicetree/bindings/phy/fsl,imx8q-hsio.yaml b/Documentation/devicetree/bindings/phy/fsl,imx8q-hsio.yaml new file mode 100644 index 000000000000..506551d4d94a --- /dev/null +++ b/Documentation/devicetree/bindings/phy/fsl,imx8q-hsio.yaml @@ -0,0 +1,143 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/phy/fsl,imx8q-hsio.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale i.MX8Q SoC series HSIO SERDES PHY + +maintainers: + - Richard Zhu + +properties: + compatible: + enum: + - fsl,imx8qxp-serdes + - fsl,imx8qm-serdes + reg: + minItems: 4 + maxItems: 4 + + "#phy-cells": + const: 3 + description: | + The first number defines the ID of the PHY contained in the HSIO macro. + The second defines controller ID binded to the PHY. The third defines the + HSIO configuratons refer to the different use cases. They are defined in + dt-bindings/phy/phy-imx8-pcie.h + + reg-names: + items: + - const: reg + - const: phy + - const: ctrl + - const: misc + + clocks: + minItems: 5 + maxItems: 14 + + clock-names: + minItems: 5 + maxItems: 14 + + fsl,refclk-pad-mode: + description: | + Specifies the mode of the refclk pad used. It can be UNUSED(PHY + refclock is derived from SoC internal source), INPUT(PHY refclock + is provided externally via the refclk pad) or OUTPUT(PHY refclock + is derived from SoC internal source and provided on the refclk pad). + Refer include/dt-bindings/phy/phy-imx8-pcie.h for the constants + to be used. + $ref: /schemas/types.yaml#/definitions/uint32 + enum: [ 0, 1, 2 ] + + power-domains: + description: | + i.MX8Q HSIO SerDes power domains. i.MX8QXP has one SerDes power domains. + And i.MX8QM has two. + minItems: 1 + maxItems: 2 + +required: + - compatible + - reg + - "#phy-cells" + - clocks + - clock-names + - fsl,refclk-pad-mode + +allOf: + - if: + properties: + compatible: + contains: + enum: + - fsl,imx8qxp-serdes + then: + properties: + clock-names: + items: + - const: apb_pclk0 + - const: pclk0 + - const: phy0_crr + - const: ctl0_crr + - const: misc_crr + power-domains: + minItems: 1 + + - if: + properties: + compatible: + contains: + enum: + - fsl,imx8qm-serdes + then: + properties: + clock-names: + items: + - const: pclk0 + - const: pclk1 + - const: apb_pclk0 + - const: apb_pclk1 + - const: pclk2 + - const: epcs_tx + - const: epcs_rx + - const: apb_pclk2 + - const: phy0_crr + - const: phy1_crr + - const: ctl0_crr + - const: ctl1_crr + - const: ctl2_crr + - const: misc_crr + power-domains: + minItems: 2 + +additionalProperties: false + +examples: + - | + #include + #include + #include + #include + + serdes: phy@5f1a0000 { + compatible = "fsl,imx8qxp-serdes"; + reg = <0x5f1a0000 0x10000>, + <0x5f120000 0x10000>, + <0x5f140000 0x10000>, + <0x5f160000 0x10000>; + reg-names = "reg", "phy", "ctrl", "misc"; + clocks = <&phyx1_lpcg IMX_LPCG_CLK_0>, + <&phyx1_lpcg IMX_LPCG_CLK_4>, + <&phyx1_crr1_lpcg IMX_LPCG_CLK_4>, + <&pcieb_crr3_lpcg IMX_LPCG_CLK_4>, + <&misc_crr5_lpcg IMX_LPCG_CLK_4>; + clock-names = "apb_pclk0", "pclk0", "phy0_crr", "ctl0_crr", + "misc_crr"; + power-domains = <&pd IMX_SC_R_SERDES_1>; + #phy-cells = <3>; + status = "disabled"; + }; +... -- 2.37.1