From patchwork Fri Jun 17 20:32:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Anderson X-Patchwork-Id: 12885989 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2D1FBC43334 for ; Fri, 17 Jun 2022 20:35:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Mzt7QTr4sXncPfwp3WDQmJRYHOz/TN7DL9CEbwLzKy4=; b=dendCmoR9E3iy9 uIMKizB1NPJwXlQNrGYeNcQxJ3I0aOnQGlH64sTtBbRcDSRUvUUMHgnBabPbS8k1Ay5VXYXbQcRD8 R7HjEPif4clwiD/4gqEER2dg2P3o9UDY+EmICcnqnGuTZNo04On1HL0sfoBgJXFyoK3vmcmhOgWCC 50w1jsXmk09yt1ZfzK/rUWHWO8Ag9NhcT2AvIO3QAIYj9tr2QJhhwgll2mqvEviprCyw6dljz8v97 IGOclp3uTPQNGv/G66KJe3lFPw8m+LAvk6HFc+gZGpht+FXeauig4eKXXouzbN63yE3jxzmwh7xKV 90LHKNZnoOFx5llreV/Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o2IfF-008xLT-KV; Fri, 17 Jun 2022 20:33:57 +0000 Received: from mail-am6eur05on20610.outbound.protection.outlook.com ([2a01:111:f400:7e1b::610] helo=EUR05-AM6-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o2If4-008xGJ-95; Fri, 17 Jun 2022 20:33:47 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aE6EUyUoIiz4ef7e47Wk6uKMQEDxLp+PwnyG8y7925grTx3MkAskygB9YloLxcIwk/6/OJ50KbPpT/aU6M1wQjXsIck6H3KGeAt/JtSDabUXx6MFCd3Vm+TEFARE2Z5Luin2EDl9ptu2YSvr0SPVgtchK/WgSI/y4XvC46eCBrQt3iAhF/SYAScS+AKKdy/X3sZyJOURYfq/AXP5/pEI+oPTlGultIV1bGXrdMjXxTK12VrNj+/QRwQiAdAxnXNtfE5wWnYbVgJm8E9j2YKrI0TsqqOAyFD0ggayIJmjlxD+9S1TPwYPl2eh10jmSzwanXAPoYa1WQHGSOZleJFyVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=I9glw3505ujB7LUV7Xvsdgo9XaznzsVSm8YHPcXI1rA=; b=GJv/CMXYatwSob/4hGH+q5wZgKsRMt+Q4e4Nkt2WFHzzREkFOnUsv2rKbDYz3ZxbuzmOlqj1tF88WRhSD9nQf/x3+UHv3XV+MMlRDpPWnauajbTOcZJR9dkY77XOasrMFg1a3mLWY8ZkxFhl/WqCRPuXMXtRFng8XebqWn/osK1EkfMddRl418WkD6iLv6EkW/uAXBS/TECr81YPvuhFBoeE4q+BwHX36rz9CPgeAbKgk/JJZRsU4qlYMKTtk9cWc/MMIlTgvn5SW+VYk3gf/aA0++IhTCHjkkZ+LAjnfyRoJANacbG4x84gDGGRkA581dP6Wa6YDoMPKEFGfYSFfA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=seco.com; dmarc=pass action=none header.from=seco.com; dkim=pass header.d=seco.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=seco.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=I9glw3505ujB7LUV7Xvsdgo9XaznzsVSm8YHPcXI1rA=; b=ohAfKwWTYxKU0rxVrkV5eAA3g09sw+LFpY4MSwW7/8RaLDsVbnLwjkT/nt+fjE8ZNvcXZ99H1UXPk5xgNwcPm7FFtHtLCpf7XyxRdZ4g2KYreOBsXA739Ku6bflsc4BOMbx+gVCC0+teazhdTKql9eA1MfcKnN0PTl2f2waJzDFDohyozCpIAumJxmUjehvQbw8HAO89MTxxglHPEW2TGIJOQjRvCPwXKBboqgVb9z3jdkb7739xaQNNr6LPixYDX4CdDfUJl+z4vxzN0jtCGXm/NTayuZCMRFZN4tFNTYKS6yd8nzGfldSzOsM/cJ4l1aCOPsE3tr8CZ+j7KGBEog== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=seco.com; Received: from VI1PR03MB4973.eurprd03.prod.outlook.com (2603:10a6:803:c5::12) by DBAPR03MB6438.eurprd03.prod.outlook.com (2603:10a6:10:19f::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5353.16; Fri, 17 Jun 2022 20:33:36 +0000 Received: from VI1PR03MB4973.eurprd03.prod.outlook.com ([fe80::d18f:e481:f1fa:3e8d]) by VI1PR03MB4973.eurprd03.prod.outlook.com ([fe80::d18f:e481:f1fa:3e8d%7]) with mapi id 15.20.5353.016; Fri, 17 Jun 2022 20:33:36 +0000 From: Sean Anderson To: "David S . Miller" , Jakub Kicinski , Madalin Bucur , netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Paolo Abeni , Russell King , Eric Dumazet , Sean Anderson , Kishon Vijay Abraham I , Krzysztof Kozlowski , Rob Herring , Vinod Koul , devicetree@vger.kernel.org, linux-phy@lists.infradead.org Subject: [PATCH net-next 01/28] dt-bindings: phy: Add QorIQ SerDes binding Date: Fri, 17 Jun 2022 16:32:45 -0400 Message-Id: <20220617203312.3799646-2-sean.anderson@seco.com> X-Mailer: git-send-email 2.35.1.1320.gc452695387.dirty In-Reply-To: <20220617203312.3799646-1-sean.anderson@seco.com> References: <20220617203312.3799646-1-sean.anderson@seco.com> X-ClientProxiedBy: BL1PR13CA0384.namprd13.prod.outlook.com (2603:10b6:208:2c0::29) To VI1PR03MB4973.eurprd03.prod.outlook.com (2603:10a6:803:c5::12) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 4d3710a1-781e-4353-a8c8-08da50a0a761 X-MS-TrafficTypeDiagnostic: DBAPR03MB6438:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: vIbNy8/kBJTo9a7giHXX0tvji/1Ysgr3qmHIBtohuAwASzKtXzf+0NZGagaJjC+YGn706FcEAN7rAo3nFtI49OZhzI+hsymNcAXpyPyadJ5AoC3ACTI1rGAy7ugsb+1Sw6Yj5GFOY9QV5YZNT1pwC/eF+2d9C/cVM713ZeH6IeHO99smWiIZ5mm1OXxsfMW/rHbF8h4oHCwsHof5JBV2bcw4yhElMmV64of9JZg9Gs3x7zRQ8BLSXL1gitN25YhDtHXsXgPlYcLdwXNMoc5mMeazXeyGW35YTxbOnRQgQ6sVziSexRy3hKtjntHM/A8AtgXe2hzu/WRrOn/DvPhu6nubxRtyrGG06yVXWyHPubZHhL+djbLiGTggBiZMFm/yDg95ayuMVDNBSn0aQ1PtcT7V5kB0GT8xahUDFyNsve8T5cZyPxYkboAAXn4sTP3wrR6qTRhAbOUreaer9Kmhug3uppHiLkLz9FCIlCoO4MJPXN0nxvA2A4MfACiW5aVjujjZGCRP3y//QcDauiZm2ZmQcdHQVYgri3ZSWH33bZeXjbsI2LgjsfoYFHvZhtpt6j76P7ZASqxLPgj7K8yTKSrqpu52HJeavEHJ2dHv4a8HasLyHv7xQ327DqYTWDKZeh8mP7uFDXMXpN1QcydISGWHbxJDQGJAMtWARLaXi0eWaGZUPaZToOC8RXk/4oI9ejkaUH79GmJfJhE0+sl9UXrk5YaBeC4Qh93nFCiTRsFyOyvhMhfQTAS9ZkZ71+anM8u+8bDBPzYtn9YpGmOnGVRPwM0FFCRYKw1gK58o4os= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR03MB4973.eurprd03.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230016)(366004)(44832011)(38350700002)(86362001)(7416002)(38100700002)(186003)(2616005)(5660300002)(6512007)(966005)(6486002)(52116002)(2906002)(6506007)(110136005)(8936002)(54906003)(498600001)(316002)(1076003)(66946007)(6666004)(36756003)(8676002)(26005)(83380400001)(4326008)(66556008)(66476007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: J57FmXDSS69Z5aLJd+TlMO6Rur22TeZdB2qXYnyIpt8kQLuu6PZMxXx6YJ4OKg2SvGHrt5NkTudWS2mYTACt8YOlUdVD5MdfbRoZmFDKHykxwHIpX5Fs+XvegKWywvo5lDrC6Z83ykpPQWU5b60yynmpBwCNw4jHBdzOC5sVH+JCxx/smSNdSvtwc5SD/kDfBfPQhO5iIwp8l3O1AfPgSxBBm8YeUg21vGWbzE2Tw4dAIsSB1pYsWqiVSpZ0mENVX7mNJ+065q147z67oUe2EgU9mZaPrealy62kf2J1L73ypOLClfLu9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GnPVuqY8KiPw+xjLPKSo9MTZxe1Qq37Lb7C+Al8Qm5cEEGqWdBDsDLnZ/y/Om8GTcSfc3Dv7ptwZuLdvwMkEc30nXbzaFOwdmEzoVMXeDbfl/AVaKvDWNsDCPRqs9MBaEv7hW5QD4cDSZh+yTltCclZC4nK1dnFRRRzAvBATrt+Fj+v/xErF7WD/hunqgbGDJEtliMXgXIiWQTQ0q1G6ZHVGY4CONt6t+EbN0hbR28UQPRltIO/PzQPAQECkdxKpiryu6K2qSOHKoxyfwtAOLucsCLCuma26JJgWQdXOdQIcTWa+ygGHTrmTdmhEtlXxjWL1jkZNQNzeu6KVTDc6QJzYY79k82L+GN6y2PE8DLKgjwP5ZFblRESRtXFN8V2Y= X-OriginatorOrg: seco.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4d3710a1-781e-4353-a8c8-08da50a0a761 X-MS-Exchange-CrossTenant-AuthSource: VI1PR03MB4973.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jun 2022 20:33:36.1718 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: bebe97c3-6438-442e-ade3-ff17aa50e733 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: N3zJE5wkTr16go0/puSO+QpRsOP+IUlq+uDpPAVqR07b0JV50TQ4ai+kSMzzwM5nMzqGF8Bu7RrEMICh/0PxDA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBAPR03MB6438 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220617_133346_347228_B1965D88 X-CRM114-Status: GOOD ( 20.45 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This adds a binding for the SerDes module found on QorIQ processors. The phy reference has two cells, one for the first lane and one for the last. This should allow for good support of multi-lane protocols when (if) they are added. There is no protocol option, because the driver is designed to be able to completely reconfigure lanes at runtime. Generally, the phy consumer can select the appropriate protocol using set_mode. For the most part there is only one protocol controller (consumer) per lane/protocol combination. The exception to this is the B4860 processor, which has some lanes which can be connected to multiple MACs. For that processor, I anticipate the easiest way to resolve this will be to add an additional cell with a "protocol controller instance" property. Each serdes has a unique set of supported protocols (and lanes). The support matrix is stored in the driver and is selected based on the compatible string. It is anticipated that a new compatible string will need to be added for each serdes on each SoC that drivers support is added for. There are two PLLs, each of which can be used as the master clock for each lane. Each PLL has its own reference. For the moment they are required, because it simplifies the driver implementation. Absent reference clocks can be modeled by a fixed-clock with a rate of 0. Signed-off-by: Sean Anderson --- .../bindings/phy/fsl,qoriq-serdes.yaml | 78 +++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 Documentation/devicetree/bindings/phy/fsl,qoriq-serdes.yaml diff --git a/Documentation/devicetree/bindings/phy/fsl,qoriq-serdes.yaml b/Documentation/devicetree/bindings/phy/fsl,qoriq-serdes.yaml new file mode 100644 index 000000000000..4b9c1fcdab10 --- /dev/null +++ b/Documentation/devicetree/bindings/phy/fsl,qoriq-serdes.yaml @@ -0,0 +1,78 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/phy/fsl,qoriq-serdes.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: NXP QorIQ SerDes Device Tree Bindings + +maintainers: + - Sean Anderson + +description: | + This binding describes the SerDes devices found in NXP's QorIQ line of + processors. The SerDes provides up to eight lanes. Each lane may be + configured individually, or may be combined with adjacent lanes for a + multi-lane protocol. The SerDes supports a variety of protocols, including up + to 10G Ethernet, PCIe, SATA, and others. The specific protocols supported for + each lane depend on the particular SoC. + +properties: + "#phy-cells": + const: 2 + description: | + The cells contain the following arguments. + + - description: | + The first lane in the group. Lanes are numbered based on the register + offsets, not the I/O ports. This corresponds to the letter-based + ("Lane A") naming scheme, and not the number-based ("Lane 0") naming + scheme. On most SoCs, "Lane A" is "Lane 0", but not always. + minimum: 0 + maximum: 7 + - description: | + Last lane. For single-lane protocols, this should be the same as the + first lane. + minimum: 0 + maximum: 7 + + compatible: + enum: + - fsl,ls1046a-serdes-1 + - fsl,ls1046a-serdes-2 + + clocks: + minItems: 2 + maxItems: 2 + description: | + Clock for each PLL reference clock input. + + clock-names: + minItems: 2 + maxItems: 2 + items: + pattern: "^ref[0-1]$" + + reg: + maxItems: 1 + +required: + - "#phy-cells" + - compatible + - clocks + - clock-names + - reg + +additionalProperties: false + +examples: + - | + serdes1: phy@1ea0000 { + #phy-cells = <2>; + compatible = "fsl,ls1046a-serdes-1"; + reg = <0x0 0x1ea0000 0x0 0x2000>; + clocks = <&clk_100mhz>, <&clk_156mhz>; + clock-names = "ref0", "ref1"; + }; + +...