Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp1424660iog; Sat, 18 Jun 2022 09:04:22 -0700 (PDT) X-Google-Smtp-Source: AGRyM1ue8UtBj24QxiWReE1dFRjXMPkOFlXU5Ms67tI9HEl36s4EdS4OveQeiy6L2ywiyWWZJowt X-Received: by 2002:a05:6a00:1487:b0:525:13b1:5271 with SMTP id v7-20020a056a00148700b0052513b15271mr2292589pfu.84.1655568262620; Sat, 18 Jun 2022 09:04:22 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1655568262; cv=pass; d=google.com; s=arc-20160816; b=W14prrGpCXITAVJdSOlePYHrzFCG/s6U2yy5ijgMW030RU1bVrZV/CG1d+WKPYWt11 lsruaTF5nRzoZ9F+z6puQ4JVAqaUSO7EDabynVrb5/3jXPgrT6w1HLSaMJ1Wb83hqSiQ 2SZBMaGsbRZDQBPZFYRSfnD8v3WE+WpYAGiDerF8NTHYa07trxHJnNP6gjEgQ0Z3ua5K qE0w4Se3u6PAaVIBDKteT7SNEfo1Labbrg9UItQ74Qunni3vmFcu2c3N1nLi21prBsro h4DmxT8VWrJ+59+8UbOgMbb9TiwKcYbbiXDCnNajhQWO5acnNNHiCJ5hTL4z3PtXQxJn THEA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-language:in-reply-to:user-agent:date:message-id:from :references:cc:to:subject:dkim-signature; bh=6ZfsB1mYcVzGu7E833qw5u/x2zjd793LtQXnRGKpGlo=; b=gKwF3GFPOwN8fOVMdf7PDSLHhGKgOE85LiXQ2NMEVMXD0CrxD3RctBEGf34R0hu0IW Rp7Ju6iNeikZj4EbWqHlbIdxWqdO1LJDFCJn9XaKAF/aWAeLr/MWM9DGE8ShhQmDwedC r+k8X7ifDkGVCqD0mm+rEBv81X1c1fLGYyPWCOOrRiYk4Kp9hQVY9M+uSVYUtT7h934N 5l68VuUYWhO/7KXRartvtff0Ixxk3VeEOZ6KOnNMQ7C1vSXG+113rlN+l17wQmKimZdQ oWNcKBvM2z5/bmPWH6xX7XOH2wHtGvt6CATFtDuRhtcgEbjrG0aLHZWlf2kYz75GixBE I6Pw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@seco.com header.s=selector1 header.b=aIzTBuRh; arc=pass (i=1 spf=pass spfdomain=seco.com dkim=pass dkdomain=seco.com dmarc=pass fromdomain=seco.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=seco.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d2-20020a056a00244200b0051c3dcbe8ffsi10133358pfj.373.2022.06.18.09.04.01; Sat, 18 Jun 2022 09:04:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@seco.com header.s=selector1 header.b=aIzTBuRh; arc=pass (i=1 spf=pass spfdomain=seco.com dkim=pass dkdomain=seco.com dmarc=pass fromdomain=seco.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=seco.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236061AbiFRPxD (ORCPT + 99 others); Sat, 18 Jun 2022 11:53:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55392 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229449AbiFRPw6 (ORCPT ); Sat, 18 Jun 2022 11:52:58 -0400 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2068.outbound.protection.outlook.com [40.107.20.68]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 39934B95; Sat, 18 Jun 2022 08:52:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BBSWo/9rSkjHXjr6N6jIgj3+FGQ2vSrzgrVPqa1UoEMtsQ6hcxD/mimkZ6wkt+12kmci156wWLRmIjXtHw96yFd5+90Nf6r8HG02MPm0OUzj7qAwiztFvaxxZgRb9OFfIN7LcWqmAsyZ1G6Im0Ttf99Zr3fMjapmp3K8GtoHmdh0BWhTttQk8rbFap7+UGp9uiWIgyBcEo1w3W97nWROFRL0nHgsK9H0kZ/yWXK42qDvvrmP0rAelGUarhpeFF27x3L8VYoS1tho+2WqrV90W8Zm9j/SUgALQymrW237r0fTEH1vhJi/QR6vKBPuZ5/O0D+b2veKzGhemvMDCuh7EQ== 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=6ZfsB1mYcVzGu7E833qw5u/x2zjd793LtQXnRGKpGlo=; b=Zh1P+nMfwjeVww2MffZdFAdU7YEP/kwQ20PeY+6LKy/KGewiTj5ORGzQ/HOap0g1lPo5hP6OgptfKL5+Bz32TPjwHeidJQu6h3xl7d5mfbQim2/MngOiWBMfGtFhGkjBPfeEX5NuZpzXIhvP6wLvAWSC5wg9BIh8sq3E36txCot/RVGRNd0+xiW3TWTGhbb1XB14+j7nxgFcjMqRDWSxz3qgN70hjaZ6R5dFY8Z9OvrWM4A72SdbVfhezA/STYZyMPa0ss2x41eF1clotDW5oA0Tmk/1lBh8BUd9gccCtJ+/Wc/cmzmDt5deUMYDOCGI+SOUN5q9pr6/diBViSiMZA== 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=6ZfsB1mYcVzGu7E833qw5u/x2zjd793LtQXnRGKpGlo=; b=aIzTBuRhy/LRR1+S7mSHDX9T0V/DBoX1DlR8JPTvUmXGIdlqW/B0fgD8vLzjjs56yItOpsw4DE0FNZr6AuckgrPaWy7TKKKNOCXyciMZPwx7YhStCwvvSi8ONp2lt0t+WSuBEyj6T4ZMOy0UYJ6xEfXhJ21HvMNmlnkkb5FzcErKWDM3cplAaHEnsEoG+7Io1m7+VKis5dlEoa7xUvPixdMon4zjXL/Y4N6cCkdF4uUjzI5nNALuwZgZP+hRZYmUrq3RedpQnCGa27q3RlQ3qYoTJ4vrG9ZzsFjIy1N1h214B6OgQNzRoDW0hwZJxl5r6S7+iRXaYmQ5IQRJUIFpYg== 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 DB7PR03MB4601.eurprd03.prod.outlook.com (2603:10a6:10:16::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5353.18; Sat, 18 Jun 2022 15:52:53 +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.5353.018; Sat, 18 Jun 2022 15:52:53 +0000 Subject: Re: [PATCH net-next 03/28] phy: fsl: Add QorIQ SerDes driver To: Ioana Ciornei , "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 , Jonathan Corbet , Kishon Vijay Abraham I , Krzysztof Kozlowski , Rob Herring , Vinod Koul , "devicetree@vger.kernel.org" , "linux-phy@lists.infradead.org" References: <20220617203312.3799646-1-sean.anderson@seco.com> <20220617203312.3799646-4-sean.anderson@seco.com> From: Sean Anderson Message-ID: Date: Sat, 18 Jun 2022 11:52:48 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: BL1PR13CA0114.namprd13.prod.outlook.com (2603:10b6:208:2b9::29) 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: 785755df-a736-4ada-50cf-08da51429a7c X-MS-TrafficTypeDiagnostic: DB7PR03MB4601: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: eA5TczEJfRy0J9xcdkxums9M9xLI9U1RoUEXgOdss/zgfydMa1MYgB4pDfNAGgv7QeQ0XKug3EbFVUsEqbZLD6yRclt5uytzU8lMZQZBdaFNJToS8rAW/VBgXnA338bZ/UOrLYhj8LMSACdE/HJSuqQ7tVTEG5u9N4i17NaLLfXYX/tmCmnA8s0dYYhY8+xYf/z8kagd5P8vYaitUN73JwUSDRgBhLqp4ziBTstzBcE+EsHPiC+HFHmuz+5CRSQ8HV1a3ooukRmflsFviXAeSoT+pRYyQymGqZDJFszRoMFCwf8wXJ8JpRVuFXe9ioeXmbtqHLnlgIPQXdKMaLUkwNjdw0gtYtwYjEZdoF1PYAMvJGXwnHhKnZx8yI21YPMJNuFUDoh0t+JXU0eY4POQ8kbR7mvS+6gZUDmdaE2EnhnI4xydkq2OpZnki1uHJWyHGT3Jrh9+osNjMSAN7TOiJNKLdODPpYrMZuYtQpF832UmiCXzLdFsh58msxmYc7ZTuefd7IT0I6j3VpcURivINMh0u9XUJ54w4PGIGGW+OzTHPEhJqyHrh1UXP6/b4+AO8a+Mh3a6+QLX80vF23XzeeiZ/tNbKOi9KEe8eirhNT74RfqoestckjBC9oV6OOz8dblTCl9wu6zXChNRT/M/AKQNzvI+urMJPpGVOMUleJWRbI41lgv8lav35myi/TLtsbxnZfKOmhioSXlO+UssnRNhC2+wKT5BxxuQBGUhPUYepDmzXECQkpga8tBXq54wpawLGSYfpXeJxC4fmxFiXA== 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)(366004)(6512007)(26005)(66556008)(4326008)(316002)(31696002)(110136005)(53546011)(66476007)(52116002)(86362001)(2906002)(6666004)(6506007)(66946007)(54906003)(8676002)(8936002)(36756003)(31686004)(7416002)(38350700002)(5660300002)(38100700002)(6486002)(44832011)(2616005)(83380400001)(186003)(498600001)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?WjZzWnMyWnFWM2VXcjc4VGh2MGliWGtQdEtBcHRRaHorczgxMVhyOUIyaERh?= =?utf-8?B?RnFHUTJqMzV0bmU5aTVBRmZtTCsveE1hL0JBdklSZDRaYTFmSmVGZHJDNzVj?= =?utf-8?B?dGRIZGo1dmZXVVFFQllVTWo2VGxVSkNJM0cwV1lZMVZHRTFMR0lsWERlcDVo?= =?utf-8?B?bGJDblpjY0xrYzBaOVBlOWJLK2ZjcUVFKzI0OUYraGtmS1ZpM2grclVCTS9E?= =?utf-8?B?eFdWYUdzOFZuRVU2ZUJsdEdKdWdQcmx3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B?dEFEa05tQ0FNczNQcnYyR25Kb0M3NnBSTmduRGg5S1drU2F0d0pEcTBaRStP?= =?utf-8?B?OTJ5cDRsbVpCMGRHQ2RDcHE0Wk1lZHBCR3hPTERKRFZsYk5aaVhUbDJueDZp?= =?utf-8?B?ZUtRZ3lsV1Rrc0laTFhXREJLU2hYV2czdU1nZEZ0T3R1MUFqekpUWGNvbUlM?= =?utf-8?B?L3VrNk0xTGUweHdtU1d5WElVSVdvZjVFQzVoY3JMSFN5MEJwempFV0xmZmFl?= =?utf-8?B?OVpBV3V6aFhYVGRIeVdkcVgzZysyL1p2RmlWVE4zZFB2WlpIQ0NWeXFSUTB0?= =?utf-8?Q?Z65Us7guRQSrjg2Y=3D?= X-OriginatorOrg: seco.com X-MS-Exchange-CrossTenant-Network-Message-Id: 785755df-a736-4ada-50cf-08da51429a7c X-MS-Exchange-CrossTenant-AuthSource: DB7PR03MB4972.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Jun 2022 15:52:53.2094 (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: 9YGSnVqdy2kB+H6Wolx14fqNueeBpC9jxzrqeDcinV1q8WfrTmEkrs62gNR+Jp/nn3W2SeFmvksG5D263B8E9g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR03MB4601 X-Spam-Status: No, score=-3.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Ioana, On 6/18/22 8:39 AM, Ioana Ciornei wrote: >>> Subject: [PATCH net-next 03/28] phy: fsl: Add QorIQ SerDes driver >>> >=20 > Sorry for the previous HTML formatted email... >=20 >> >> Hi Sean, >> >> I am very much interested in giving this driver a go on other SoCs as we= ll >> but at the moment I am in vacation until mid next week. Please let me know your results. I have documented how to add support for additional SoCs, so hopefully it should be fairly straightforward. >>> This adds support for the "SerDes" devices found on various NXP QorIQ S= oCs. >>> There may be up to four SerDes devices on each SoC, each supporting up = to >>> eight lanes. Protocol support for each SerDes is highly heterogeneous, = with >>> each SoC typically having a totally different selection of supported >>> protocols for each lane. Additionally, the SerDes devices on each SoC a= lso >>> have differing support. One SerDes will typically support Ethernet on m= ost >>> lanes, while the other will typically support PCIe on most lanes. >>> >>> There is wide hardware support for this SerDes. I have not done extensi= ve >>> digging, but it seems to be used on almost every QorIQ device, includin= g >>> the AMP and Layerscape series. Because each SoC typically has specific >>> instructions and exceptions for its SerDes, I have limited the initial >>> scope of this module to just the LS1046A. Additionally, I have only add= ed >>> support for Ethernet protocols. There is not a great need for dynamic >>> reconfiguration for other protocols (SATA and PCIe handle rate changes = in >>> hardware), so support for them may never be added.> >>> Nevertheless, I have tried to provide an obvious path for adding suppor= t >>> for other SoCs as well as other protocols. SATA just needs support for >>> configuring LNmSSCR0. PCIe may need to configure the equalization >>> registers. It also uses multiple lanes. I have tried to write the drive= r >>> with multi-lane support in mind, so there should not need to be any lar= ge >>> changes. Although there are 6 protocols supported, I have only tested S= GMII >>> and XFI. The rest have been implemented as described in the datasheet. >>> >>> The PLLs are modeled as clocks proper. This lets us take advantage of t= he >>> existing clock infrastructure. I have not given the same treatment to t= he >>> lane "clocks" (dividers) because they need to be programmed in-concert = with >>> the rest of the lane settings. One tricky thing is that the VCO (pll) r= ate >>> exceeds 2^32 (maxing out at around 5GHz). This will be a problem on 32-= bit >>> platforms, since clock rates are stored as unsigned longs. To work arou= nd >>> this, the pll clock rate is generally treated in units of kHz.> >>> The PLLs are configured rather interestingly. Instead of the usual dire= ct >>> programming of the appropriate divisors, the input and output clock rat= es >>> are selected directly. Generally, the only restriction is that the inpu= t >>> and output must be integer multiples of each other. This suggests some = kind >>> of internal look-up table. The datasheets generally list out the suppor= ted >>> combinations explicitly, and not all input/output combinations are >>> documented. I'm not sure if this is due to lack of support, or due to a= n >>> oversight. If this becomes an issue, then some combinations can be >>> blacklisted (or whitelisted). This may also be necessary for other SoCs >>> which have more stringent clock requirements. >> >> >> I didn't get a change to go through the driver like I would like, but ar= e you >> changing the PLL's rate at runtime? Yes. >> Do you take into consideration that a PLL might still be used by a PCIe = or SATA >> lane (which is not described in the DTS) and deny its rate reconfigurati= on >> if this happens? Yes. When the device is probed, we go through the PCCRs and reserve any lane whi= ch is in use for a protocol we don't support (PCIe, SATA). We also get both PLL's ra= tes exclusively and mark them as enabled. >> I am asking this because when I added support for the Lynx 28G SerDes bl= ock what >> I did in order to support rate change depending of the plugged SFP modul= e was >> just to change the PLL used by the lane, not the PLL rate itself. >> This is because I was afraid of causing more harm then needed for all th= e >> non-Ethernet lanes. Yes. Since There is not much need for dynamic reconfiguration for other pro= tocols, I suspect that non-ethernet support will not be added soon (or perhaps ever= ). >>> >>> The general API call list for this PHY is documented under the driver-a= pi >>> docs. I think this is rather standard, except that most driverts config= ure >>> the mode (protocol) at xlate-time. Unlike some other phys where e.g. PC= Ie >>> x4 will use 4 separate phys all configured for PCIe, this driver uses o= ne >>> phy configured to use 4 lanes. This is because while the individual lan= es >>> may be configured individually, the protocol selection acts on all lane= s at >>> once. Additionally, the order which lanes should be configured in is >>> specified by the datasheet. =C2=A0To coordinate this, lanes are reserve= d in >>> phy_init, and released in phy_exit. >>> >>> When getting a phy, if a phy already exists for those lanes, it is reus= ed. >>> This is to make things like QSGMII work. Four MACs will all want to ens= ure >>> that the lane is configured properly, and we need to ensure they can al= l >>> call phy_init, etc. There is refcounting for phy_init and phy_power_on,= so >>> the phy will only be powered on once. However, there is no refcounting = for >>> phy_set_mode. A "rogue" MAC could set the mode to something non-QSGMII = and >>> break the other MACs. Perhaps there is an opportunity for future >>> enhancement here. >>> >>> This driver was written with reference to the LS1046A reference manual. >>> However, it was informed by reference manuals for all processors with >>> MEMACs, especially the T4240 (which appears to have a "maxed-out" >>> configuration). >>> >>> Signed-off-by: Sean Anderson >>> --- >>> This appears to be the same underlying hardware as the Lynx 28G phy >>> added in 8f73b37cf3fb ("phy: add support for the Layerscape SerDes >>> 28G"). >> >> The SerDes block used on L1046A (and a lot of other SoCs) is not the sam= e >> one as the Lynx 28G that I submitted. The Lynx 28G block is only include= d >> on the LX2160A SoC and its variants. OK. I looked over it quickly and it seemed to share many of the same regist= ers. >> The SerDes block that you are adding a driver for is the Lynx 10G SerDes= , >> which is why I would suggest renaming it to phy-fsl-lynx-10g.c. Ah, thanks. Is this documented anywhere? --Sean