Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp230572lqd; Tue, 23 Apr 2024 23:43:18 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUOthrRIAPE5SCaGF4/u2W9Rdc08UvmYCbNLthZhzecb7++FO6xwIg+J3oJAzRoIXCdd6Glc3avsKi8fMqxLEJsmC9AHsth4FzyqptJ+w== X-Google-Smtp-Source: AGHT+IG4OVw2SL5jqKeCH8kTaYrhMP3RqKGzYKPs+uehCTuxW+/qpsiEX3Q5HZaF5A7eTRgY1ZG8 X-Received: by 2002:a17:90b:3589:b0:2af:3a82:53c6 with SMTP id mm9-20020a17090b358900b002af3a8253c6mr759991pjb.10.1713940998530; Tue, 23 Apr 2024 23:43:18 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713940998; cv=pass; d=google.com; s=arc-20160816; b=TWSF9XgwtwbPIvA5kKj9GaazfJcwShT8ImZTCWS+e98FCsBq0uzNdE2s5cRL/5swgw chF/caI18Bbe1kmFVsLgjdZYyaffrZzye2DR3xjpLiZZSFKH0j4V0NrIeSs6my99d37P GwjSl4tBUAU2c1LVGRITbAMQYqjL23Pwka4I9GVyhMhXzjfItkDS66U+h/XGJrL3BYRR nm5vKKOuRYk71SlbmywRbJ1BURwfRXpYBOnqOwTGwZmlPpc9+EEbICm8xM+U0SWSg8Li qSrwbPgx0RtD6iARdIZABLxVOfTdj31NN6paWyt3lwFsc+thPgzGVkbEj7F6yVBSRfS7 MJsw== 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=BUQ6pAwuExCWeFhplT3DCyMPDO4LGnNEvZCmSFnFk50=; fh=6JNnxDfEnr7o579DMPRTsQZxS8rnesbXYQmdjTKdPbk=; b=lYSncLmnYutDqXGpSXKQiTepq+LGh+EUJokyEwt3QVKhVEkpIz6Q5PUEC61aXV+XY0 Ei773CWUiOHAgOQm+nGSTU2zgp6IQJgNYFdhFR+2LdZlkzm+/bRbRNW/mkOxyePjSUMX 7DNRzSfS/W47bYZFP7SMvjfnrpJaJgcNXHbNuZlU/d/aiMMn+7j25TdM0ojvhEqOdyhW joyEDWT6vohKxYWmODG1zXSN5E3nVNTIHOO2gXHGU5UO6ipdL37jVSexIyMt/8+IkBqV oTW7AzZaG7HqegzWZlMweS9R7ul8bSzLTDy4AYZHZVrc7je2KD3N2d6l5xd6PbiLLtnR 8fNg==; 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-156396-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-156396-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id r4-20020a17090aa08400b002a52c3e0c84si10853168pjp.53.2024.04.23.23.43.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Apr 2024 23:43:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-156396-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; 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-156396-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-156396-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 4954128645F for ; Wed, 24 Apr 2024 06:42:41 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 432A515957A; Wed, 24 Apr 2024 06:39:57 +0000 (UTC) Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) (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 073C015956A; Wed, 24 Apr 2024 06:39:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=92.121.34.13 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713940796; cv=none; b=nea4eq3mSBhBwcCoL3DYhx7PvHZ2366mfeJoWnH4z/fcSTUqKYl4LtPx5HAx4nn0rZdynhgrtLy1m6XFanIwlBEm73RJZ3D4wJ/cGkcBkr7feECnmP5f31e9mzbhJLTwGr2qeAQpliaRMTkF5K/y3rldxvhfWgWBtXyygQjTFbQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713940796; c=relaxed/simple; bh=PsiqgtWQuNzt1KHICBa1BiR+9zW5KcuF+wQRum5qQK0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=YSTLaV3u8IPecZWVzvazj/CvV3Ri3bVbTHkFwpkF4/u0byVTePBmF8H3bigrd1nkbh8bSsuyFkVL3Qh5gws8DeZIq/msMmkuZ048H0ykttXm/ElHgpi1gsv3RQhPP4/d8civKIc3atk90OUMug3RYtqCjqoDQunQrG4Q9Q5TOko= 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.13 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 inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 8DCFC1A2312; Wed, 24 Apr 2024 08:39:47 +0200 (CEST) Received: from aprdc01srsp001v.ap-rdc01.nxp.com (aprdc01srsp001v.ap-rdc01.nxp.com [165.114.16.16]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 6F6B91A1E98; Wed, 24 Apr 2024 08:39:44 +0200 (CEST) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by aprdc01srsp001v.ap-rdc01.nxp.com (Postfix) with ESMTP id 057F2181D0FE; Wed, 24 Apr 2024 14:39:41 +0800 (+08) From: Richard Zhu To: conor@kernel.org, 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 v3 2/3] dt-bindings: phy: Add i.MX8Q HSIO SerDes PHY binding Date: Wed, 24 Apr 2024 14:21:22 +0800 Message-Id: <1713939683-15328-3-git-send-email-hongxing.zhu@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1713939683-15328-1-git-send-email-hongxing.zhu@nxp.com> References: <1713939683-15328-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. Introduce one HSIO configuration 'fsl,hsio-cfg', which need be set at initialization according to board design. Signed-off-by: Richard Zhu --- .../bindings/phy/fsl,imx8qm-hsio.yaml | 146 ++++++++++++++++++ 1 file changed, 146 insertions(+) create mode 100644 Documentation/devicetree/bindings/phy/fsl,imx8qm-hsio.yaml diff --git a/Documentation/devicetree/bindings/phy/fsl,imx8qm-hsio.yaml b/Documentation/devicetree/bindings/phy/fsl,imx8qm-hsio.yaml new file mode 100644 index 000000000000..3e2824d1616c --- /dev/null +++ b/Documentation/devicetree/bindings/phy/fsl,imx8qm-hsio.yaml @@ -0,0 +1,146 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/phy/fsl,imx8qm-hsio.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale i.MX8QM SoC series HSIO SERDES PHY + +maintainers: + - Richard Zhu + +properties: + compatible: + enum: + - fsl,imx8qm-hsio + - fsl,imx8qxp-hsio + reg: + minItems: 4 + maxItems: 4 + + "#phy-cells": + const: 3 + description: + The first defines the type of the PHY refer to the include phy.h. + The second defines controller index. + The third defines the lane mask of the lane ID, indicated which + lane is used by the PHY. They are defined as HSIO_LAN* 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,hsio-cfg: + description: Refer macro HSIO_CFG* include/dt-bindings/phy/phy-imx8-pcie.h. + $ref: /schemas/types.yaml#/definitions/uint32 + + 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 + default: IMX8_PCIE_REFCLK_PAD_OUTPUT + + power-domains: + minItems: 1 + maxItems: 2 + +required: + - compatible + - reg + - reg-names + - "#phy-cells" + - clocks + - clock-names + - fsl,hsio-cfg + +allOf: + - if: + properties: + compatible: + contains: + enum: + - fsl,imx8qxp-hsio + then: + properties: + clock-names: + items: + - const: pclk0 + - const: apb_pclk0 + - const: phy0_crr + - const: ctl0_crr + - const: misc_crr + power-domains: + minItems: 1 + + - if: + properties: + compatible: + contains: + enum: + - fsl,imx8qm-hsio + 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 + + phy@5f1a0000 { + compatible = "fsl,imx8qxp-hsio"; + 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 = "pclk0", "apb_pclk0", "phy0_crr", "ctl0_crr", "misc_crr"; + power-domains = <&pd IMX_SC_R_SERDES_1>; + #phy-cells = <3>; + fsl,hsio-cfg = ; + fsl,refclk-pad-mode = ; + }; +... -- 2.37.1