From patchwork Tue Jun 28 22:14:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Anderson X-Patchwork-Id: 12899111 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 E3C1AC433EF for ; Tue, 28 Jun 2022 22:58:03 +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=PpQSW8wbn169G2yRJ72j1vfEsJJxBSM5cq3QqC/MbFg=; b=E6INDMVUQeFNlD moD83NPlwky6NGasQGzlsSN3UN+CbuAEOyL3XIAJ82G7JdLB2ipKB1DRZUnkku87e1AXSClVOjpor G7/9BJbPJyBJWKnyJPkG20+ZsoQxbnZHNsnRo0blevzlSB2UhqRsRSlJGTjTnYrtLJafBBW969jUG HrdIQVNOAw7sxbtbRfwNqmh7+HxOzRF4Zrr1bdDXB33awMt7xfKry03Vlz9qcIYdy0he4kUFZvW8b yIyMSubcBMRHCUwC0i5m561EH15EROrxJ70043YdQrJ2heQMG9GS2d6ek1TFPaeP53UBa6loVqC3/ G3attDSDXX1cMon4xZmQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o6K88-008Y2A-RS; Tue, 28 Jun 2022 22:56:26 +0000 Received: from mail-eopbgr50060.outbound.protection.outlook.com ([40.107.5.60] helo=EUR03-VE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o6JUt-008N2v-F2; Tue, 28 Jun 2022 22:15:53 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XMjUJwwxabseaPhgrl3CrS4BJsmFEGlpuAZsV9X0Xzyonw+AU3NErdcjigwDb3V1l8JDM2lopjm94icvJjZmZvCh2JK3bjrbpKvpEt2ZOUij98HNz9TOUxLEqhmbCdJMhIdKm+bku80j5eF+YYQFDz3If7C4rkP1bzF3z6try5wHOArMOoJGadMmpuCnzxsZ6sNrX09aFeh6I/KnIoNraT5vmquJlT7/HuxYw0tx7iwlZmn+0uCS0PDLnnoZptuYV1PPpCOvHFPkmFd7HCFAdXkPtSWbe8ty+g4iRQVI1fTIlyqPjNGGmOjJoarGqo8KvOVlBATq8T3DS64D7DFS5g== 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=Mv/fBJyuMJHaKO9E0HqqZzxOLAFdk0n0PbulaXq1z+A=; b=FYKI7++UWZSmmaZGC83rH1yxiLhZgw46q/8JsFmAIeM96ItroZXngIxBSle3KEorIuEd7YCyqmvH6iGv6WgXgYZkSmdZQiTUEGlMEPL6nYpfNEMDTq3UGpLsTxpt44WKp3q78/dczTMD3yL3408OWZETtplFzdsj/FTsmmndTKtK6FEm1dUfGVVt+0UgBacNFANwE72uHVOX1J7XxdA/Seyy+LYLFi8Xbf7Vup46xMRLv8SaUT3/GAX8n2b1jGadLapsCqCD35dr8zfYsLkKFDvPVjkvug2u5BQGIubpX5tFBm/xOaV3a3pzioBPSZJRA9LW6sL7BAw8epyo5OdWug== 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=Mv/fBJyuMJHaKO9E0HqqZzxOLAFdk0n0PbulaXq1z+A=; b=DVAH7d1ZbK71g6FyYqnPcSFd+KtxDF+iHPsbWlO+08TOxEIdeFUyXFbwPapLh/Fq5xRMIW1puT4DMFyQJFXrt7ZS0e4JrKBIskbndThlmeM2xqZYAPgXWpFg1RqcbBc+q2l7nqQxxcf2LXzoDqr+OpTeMF30EDUjfAGIDNS8KZ/H9GSIJJvni5BdGVniAx2/usg5qP/OXzdb3Sp/bL/U+6vXVVVOd+n9xQ9TBmTjHqiZtwV9CfMlpk1DPjNrNn/D3cg6JWGROZG9SdbrLNu9EU2Nwu8wltgbmvEVH4nCtCYszPmmcU1Q+6Lw8yyR2oJjtnVHDAGOuhknd2+Upa+e9Q== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=seco.com; Received: from DB7PR03MB4972.eurprd03.prod.outlook.com (2603:10a6:10:7d::22) by DB7PR03MB3883.eurprd03.prod.outlook.com (2603:10a6:5:34::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5373.18; Tue, 28 Jun 2022 22:15:37 +0000 Received: from DB7PR03MB4972.eurprd03.prod.outlook.com ([fe80::757e:b75f:3449:45b1]) by DB7PR03MB4972.eurprd03.prod.outlook.com ([fe80::757e:b75f:3449:45b1%6]) with mapi id 15.20.5373.018; Tue, 28 Jun 2022 22:15:37 +0000 From: Sean Anderson To: "David S . Miller" , Jakub Kicinski , Madalin Bucur , netdev@vger.kernel.org Cc: Russell King , Paolo Abeni , linux-arm-kernel@lists.infradead.org, Eric Dumazet , linux-kernel@vger.kernel.org, Sean Anderson , Kishon Vijay Abraham I , Krzysztof Kozlowski , Li Yang , Rob Herring , Shawn Guo , Vinod Koul , devicetree@vger.kernel.org, linux-phy@lists.infradead.org Subject: [PATCH net-next v2 35/35] arm64: dts: ls1046ardb: Add serdes bindings Date: Tue, 28 Jun 2022 18:14:04 -0400 Message-Id: <20220628221404.1444200-36-sean.anderson@seco.com> X-Mailer: git-send-email 2.35.1.1320.gc452695387.dirty In-Reply-To: <20220628221404.1444200-1-sean.anderson@seco.com> References: <20220628221404.1444200-1-sean.anderson@seco.com> X-ClientProxiedBy: BL1P222CA0011.NAMP222.PROD.OUTLOOK.COM (2603:10b6:208:2c7::16) To DB7PR03MB4972.eurprd03.prod.outlook.com (2603:10a6:10:7d::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b05888fd-ea4c-4e44-7fb2-08da5953ada1 X-MS-TrafficTypeDiagnostic: DB7PR03MB3883:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: zxaEsr25ORtfqPXxTrJ8IClKEYl82Sl6YhJ1XjuyQgwsnfaJ5tNjhcqvhIzQ1NJiuFhqLf+bDYkC3nvka895EmQ731pfKKBts1zG3I8OJcdz/HMtAEe9QzAGiWPw+S7ytUDcJy0osd0X4q0Mt/ciu0yDUVnjLPrMxgu99GnQgx+c/elVrQLGStDk3I/dOspAwQxQlnffUCCasXP/dlr1XBLqj9Z/J9E1XgIomhv951Hwr56/mAm+aJGNoW1eEmfXnEx5y+aNcsHI6N0wFaH1McQsC6bhLS7wdF9zKD4MTQh2jM94zDXIqgK5DAEfJnfvHm2vuqoGcJg0ggPIWH/gVGYb8g3GpKqYNk7YyCtd3q9tU7rfs8AVxiGVfh9aLUa43huG+SS5LOeb5iBRxW9aUHnYQQy2k6qkgyjODHZvC1AzkSTBtYZFqdvpPAwRUL6ETvY5aFTn4IMEDijush1J817AkAIulutRUa4yeBaeBFe38g/uU0WWXjeTrsJMVqCkgQziowxnon9EnmZpvS44LDWUFM7z5+ky77dBDhJmKazhYRVn5vLT2GrRW/WQqFGmI2jKRlo9rsvJssKd20FAIMxHtqa5tkFb69dFA8hpTlloj3PGI4VtEwKyj0U1mY6FXDhmW9Urh4pGnpQlzdVp+TzI5AzCAXk4nniQEW9AOhNUhJYtD0eYISU0KV9nS31jYtG/GPdVYCLoYJWmUxpNY/cl/WfrYuv5mh7Hvg2HquJdccfWRXgPJhQ+tzJ83kiIz2tYxmdCgiMQtgFpYtV2Nb05bjGo7KwOBcQpHppj/Hw= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DB7PR03MB4972.eurprd03.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230016)(346002)(396003)(366004)(39850400004)(136003)(376002)(52116002)(6512007)(6506007)(8676002)(38100700002)(36756003)(66556008)(66946007)(38350700002)(66476007)(2906002)(26005)(1076003)(7416002)(86362001)(54906003)(41300700001)(83380400001)(2616005)(6486002)(110136005)(316002)(6666004)(186003)(4326008)(44832011)(5660300002)(478600001)(8936002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: kwdPNYd2TyQoT0btfaTdgu9Q/tdYdf70Z/x6Qb4STpHFxlXK0lSl0UGxKv/B6C8rS30aMmJxTdLOCuW+wjlkQZUhGlA+sJesg3uxLB/KN3BNvW8xpSSiMwiKpP5PvJzxiteDQMKVSlkppmFTTAP733GIEZU+/dDNfzGGwBrCfm/Xvqc1AZnFWyJ+mKTTmRE1uRsmI6HTcUGtqe4nvFu11yq5fcbiTNaZeZSj0RizGUOYgLhVsL/bB9hj6tO9Ltve3PsbWQbsWGHe0DEUndlVx2L0+nigNhx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8DSsDO0UGsakCyL2pMv/GIWIio0RU/928qLfENTz7osHy4sZJ9tpSPJrcGULCAZUafQhVqNRela2x2Ra2qCW+9C7DwWgSNCBcgLYVNl0GDG//UwdNq5N+R9lx90qitVIbgOspmO6y5U4Cen9qpxq00nGCiBE7f7UxQegY/UhStZP9TVK7ZSR/X5Zbjtf89ipEX51J909sgeg/wd6OqY3iy6buLZYJWlC93mlbSS2IDr2rDFBWeQ== X-OriginatorOrg: seco.com X-MS-Exchange-CrossTenant-Network-Message-Id: b05888fd-ea4c-4e44-7fb2-08da5953ada1 X-MS-Exchange-CrossTenant-AuthSource: DB7PR03MB4972.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Jun 2022 22:15:15.7171 (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: hVb7q+/nZEJ02O8dpo9Hhi8JshKxEhRizjnueMDtWBwElxRml/dpUCQEn0Ly9k4m9JqC8et33IRDgUFkAoY2XQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR03MB3883 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220628_151551_567800_68E3BDDF X-CRM114-Status: GOOD ( 15.13 ) 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 appropriate bindings for the macs which use the SerDes. The 156.25MHz fixed clock is a crystal. The 100MHz clocks (there are actually 3) come from a Renesas 6V49205B at address 69 on i2c0. There is no driver for this device (and as far as I know all you can do with the 100MHz clocks is gate them), so I have chosen to model it as a single fixed clock. Note: the SerDes1 lane numbering for the LS1046A is *reversed*. This means that Lane A (what the driver thinks is lane 0) uses pins SD1_TX3_P/N. Because this will break ethernet if the serdes is not enabled, enable the serdes driver by default on Layerscape. Signed-off-by: Sean Anderson --- Please let me know if there is a better/more specific config I can use here. (no changes since v1) .../boot/dts/freescale/fsl-ls1046a-rdb.dts | 34 +++++++++++++++++++ drivers/phy/freescale/Kconfig | 1 + 2 files changed, 35 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1046a-rdb.dts b/arch/arm64/boot/dts/freescale/fsl-ls1046a-rdb.dts index 7025aad8ae89..4f4dd0ed8c53 100644 --- a/arch/arm64/boot/dts/freescale/fsl-ls1046a-rdb.dts +++ b/arch/arm64/boot/dts/freescale/fsl-ls1046a-rdb.dts @@ -26,6 +26,32 @@ aliases { chosen { stdout-path = "serial0:115200n8"; }; + + clocks { + clk_100mhz: clock-100mhz { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <100000000>; + }; + + clk_156mhz: clock-156mhz { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <156250000>; + }; + }; +}; + +&serdes1 { + clocks = <&clk_100mhz>, <&clk_156mhz>; + clock-names = "ref0", "ref1"; + status = "okay"; +}; + +&serdes2 { + clocks = <&clk_100mhz>, <&clk_100mhz>; + clock-names = "ref0", "ref1"; + status = "okay"; }; &duart0 { @@ -140,21 +166,29 @@ ethernet@e6000 { ethernet@e8000 { phy-handle = <&sgmii_phy1>; phy-connection-type = "sgmii"; + phys = <&serdes1 1>; + phy-names = "serdes"; }; ethernet@ea000 { phy-handle = <&sgmii_phy2>; phy-connection-type = "sgmii"; + phys = <&serdes1 0>; + phy-names = "serdes"; }; ethernet@f0000 { /* 10GEC1 */ phy-handle = <&aqr106_phy>; phy-connection-type = "xgmii"; + phys = <&serdes1 3>; + phy-names = "serdes"; }; ethernet@f2000 { /* 10GEC2 */ fixed-link = <0 1 1000 0 0>; phy-connection-type = "xgmii"; + phys = <&serdes1 2>; + phy-names = "serdes"; }; mdio@fc000 { diff --git a/drivers/phy/freescale/Kconfig b/drivers/phy/freescale/Kconfig index 857b4d123515..c9f687384c13 100644 --- a/drivers/phy/freescale/Kconfig +++ b/drivers/phy/freescale/Kconfig @@ -43,6 +43,7 @@ config PHY_FSL_LYNX_10G tristate "Freescale Layerscale Lynx 10G SerDes support" select GENERIC_PHY select REGMAP_MMIO + default y if ARCH_LAYERSCAPE help This adds support for the Lynx "SerDes" devices found on various QorIQ SoCs. There may be up to four SerDes devices on each SoC, and each