Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2622251pxb; Tue, 12 Oct 2021 10:05:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz5iyBCJ3d4HDX0vPHIVQXDFmKQ3wfFFc2Pv5kzzQZtfk0WbqE6BYW1A6exVkCb+NSr2LMo X-Received: by 2002:a05:6402:42cd:: with SMTP id i13mr1289365edc.396.1634058341195; Tue, 12 Oct 2021 10:05:41 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1634058341; cv=pass; d=google.com; s=arc-20160816; b=MLPFoHGyZsfhq/uP/Bya7YbAZJF5MVb8I/cR16sQ3zw4VmAmTeWB69CyqDqk83XZGq wtPGQJQzVeyTDi7ggtOEDHaIAoqLjHdhz3opzJxSuIVoqMJmtXLDt6oBmAjX972NNou7 acg+x6g6kmULK7tJ0lkJjtNKSdmEpwsO9wRRmDax+aJhUeQVhKCkuE/8VdIHfm/CyPrv KbuWGbHU6z6Wexc7sOaXSEQFnkBeZMBQRKsuBx7Lr+D/I23Es2Pb3nLCqm4m+8+i0nux 6orCxyq76DFrlbHyTgP9xePNw85eikw+rhW19Xs044fRPvu2RC5UB1PgbBCsvS7LHiF5 G6TQ== 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:references :cc:to:subject:from:dkim-signature; bh=mL5RxAldPnKoB5oqdujkjbOFv22ieq52kAtJzjTKuEo=; b=ttuhLEM4HE5NHQowEsfS3J2ZEdt7tM1p2vf/b4kk+6jU+l6/bLlwXiTOgass7bG1Gk QEpPIARVQxyLJFgPrsWzR+qmaPa1FdpO6ENU5gas3Psu2/qT6LIj/Wokec7S4OYNgPez ZzYRzYAVtdq130KJfFA3WCOhVrspTQ6pJZUwsLZl/gzqnNXbGSqTNTwmp4qp9WXNes0e 5GzPl+55r/5YczDFIXeq6nu+q+U6DJ3jl0/8P9YImXhJowtbBY02WtfThHBthNczwXmi +OZZQBpxOGk6H/wKvak5x7pxp+Kmi/c7m0WFdaNPgchi4BV03weUo5PSuM4oDBb1PAZU HHTg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@secospa.onmicrosoft.com header.s=selector2-secospa-onmicrosoft-com header.b=FzXm7zUu; 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 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=seco.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b8si12149820edf.397.2021.10.12.10.05.10; Tue, 12 Oct 2021 10:05:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@secospa.onmicrosoft.com header.s=selector2-secospa-onmicrosoft-com header.b=FzXm7zUu; 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 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=seco.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231946AbhJLRFN (ORCPT + 99 others); Tue, 12 Oct 2021 13:05:13 -0400 Received: from mail-eopbgr140055.outbound.protection.outlook.com ([40.107.14.55]:33767 "EHLO EUR01-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S232231AbhJLRDa (ORCPT ); Tue, 12 Oct 2021 13:03:30 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=g2te1MNKTKhtD9qwL3z8SSPoT9VktF3hmRBJyjAFUeK9b6c+JPFbxQADx5NqGonD0ThdY1ubhvzFhjTQSYPze6edBlgKEjCNgjRGAOb86PHNVDkrezWE3sJJsoBmHuPMidmv5u23daHHK2FCAo8SwWiHYKZjdnYIvuzzsiMTwLhQgnOzor+RliW55nAjSxpLQHJNPju4mC1lICPk1L9yeHLRrm6pJ/E4uWZyAYdiKM0itkjJqASsERZgYEa2iBFBWUMQ8rkoevOe/53KkhNHbx4qrryS2UBa51Ts5QVniLI5DYV83lVyljDpQw8FHGdMIHcDZtgkxGgKkimG73nbtQ== 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=mL5RxAldPnKoB5oqdujkjbOFv22ieq52kAtJzjTKuEo=; b=WYYSzX3Qo+Is4mSe9E9P7lhIt8HHhm42huC0o+jab0VkXY6bISGHagKNG/PiZ1P4JOTWvQsP39r1/RBn8O4QnMGGo7spdBMh4NDFSiN3BaJBCAqna69uaKtFyq5QTq/KQsFijaCAlz3GvJ85+yaRd01/RX6GawXrBsGxyf6ef3JhXirUwqlvf5TFGJVM62Q+qUkSIKSJKC9FRK+214lBFBD9n6hdTVLkjpBqmx/1DzUB4QWAupCA2LVHHZ8ouNbgEZ0nmwNMoSlXI+MAzHaPrcDgh5Ai7dnA/qGPtql1REOBD1XpXzfo004Se0+7zKHk5y3gfSe8QItUquby7JzzxA== 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=secospa.onmicrosoft.com; s=selector2-secospa-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=mL5RxAldPnKoB5oqdujkjbOFv22ieq52kAtJzjTKuEo=; b=FzXm7zUuDED3qXfVvCCIe/9kCUPiDq/1XgmolRh8IBZBKHPWQb0lKFjRgWb5r25Ws3ItDjynhH0XUQwi4yP04/lvXcley0QhCEQjFagWbi+ehneZEod/MesZ+ThlI6rVHED/Uril+TPjyXwkbpIqECyLHnHF9pRSqqMIA8YPNUg= Authentication-Results: vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=none action=none header.from=seco.com; Received: from DB7PR03MB4523.eurprd03.prod.outlook.com (2603:10a6:10:19::27) by DBBPR03MB6762.eurprd03.prod.outlook.com (2603:10a6:10:20b::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.22; Tue, 12 Oct 2021 17:01:26 +0000 Received: from DB7PR03MB4523.eurprd03.prod.outlook.com ([fe80::a9aa:f363:66e:fadf]) by DB7PR03MB4523.eurprd03.prod.outlook.com ([fe80::a9aa:f363:66e:fadf%6]) with mapi id 15.20.4587.026; Tue, 12 Oct 2021 17:01:26 +0000 From: Sean Anderson Subject: Re: [RFC net-next PATCH 01/16] dt-bindings: net: Add pcs property To: Rob Herring Cc: "Russell King (Oracle)" , netdev , "David S . Miller" , Jakub Kicinski , "linux-kernel@vger.kernel.org" , Andrew Lunn , Heiner Kallweit , devicetree@vger.kernel.org References: <20211004191527.1610759-1-sean.anderson@seco.com> <20211004191527.1610759-2-sean.anderson@seco.com> <2e5ebf4e-bc97-1b8b-02e2-fe455aa1c100@seco.com> Message-ID: Date: Tue, 12 Oct 2021 13:01:21 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-ClientProxiedBy: MN2PR15CA0062.namprd15.prod.outlook.com (2603:10b6:208:237::31) To DB7PR03MB4523.eurprd03.prod.outlook.com (2603:10a6:10:19::27) MIME-Version: 1.0 Received: from [172.27.1.65] (50.195.82.171) by MN2PR15CA0062.namprd15.prod.outlook.com (2603:10b6:208:237::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.14 via Frontend Transport; Tue, 12 Oct 2021 17:01:24 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: aea553fe-e996-43e5-4341-08d98da1ed6b X-MS-TrafficTypeDiagnostic: DBBPR03MB6762: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:9508; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: KbEtEbjGiCmmRsFFIBCMwV59UM6r3NAK0JGpc4CeykEW8+5q3mLmdY6Pkx1QneqW4Xi9PLXps7wpXZnRB6+xidFRYRewWvbqkOG/BM0CjUqo1jxzI6Rg+QlW0EEhR00zP3q+vBZCUzMp6dE3qa2TJFKU46GCAtpiicTU2qdBpeGJ0NtU4WKrZXe0492CM8PyaXY/MPeXBh9fy/KpmiT5RAeQBL6YBVCIzP7CDikKyHmOxrIc0A9uNMDfi7v2PFGZSn4Y2RjLuWXJJsDupvCL5Lkqc81F3sfrH/R/XndwnFiRiPjioBbkUYc7f9uPyQ6VfrnHoq4ZJFPhMwalKoIquWDcRm0p51PzG+v6hNC8U5RxxsTSWbjWL7bJxSV6DU3R7fVGnDAUrWizIWk5w3uoUZkFm7uPf0oEtB2Y50RREEGBYXQIwTYLMUZXJh+reyaIqaNaMMYAYgp7D2Wjc4xu9qFup7a8Z///T1zDAhBwM9Yu3RPCna4W+5qEH17A7Xr2+dfxP+C/RxYY/VPqzj4l3wZdW9rtX3mPztQ57pTSswrxNaLGCZ0/Cqdo6PPkOez4G4Y03QHFHPSpcx1rzbtlRBTXktRmYtSeeRU9Sl1sa2N8sFw/TEpv3ICwE//+v3tmt8vt1Rz6IF4gwRFgbtBszoewKDb9Skv1vcPCAZ+XlTtuSy4QIXBYXugcdyBJf3ngrb1zi8L9rOoNmKyvpnxrZVTvBOuyXA6wCFfaJvSTNOMw3lto+8+URIADdY+0EHkIWspj9vaMABCW9LvBfo/9qw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DB7PR03MB4523.eurprd03.prod.outlook.com;PTR:;CAT:NONE;SFS:(366004)(31696002)(86362001)(6666004)(2906002)(31686004)(83380400001)(38100700002)(38350700002)(6916009)(4326008)(44832011)(498600001)(52116002)(66556008)(8936002)(26005)(66946007)(8676002)(186003)(66476007)(2616005)(16576012)(5660300002)(36756003)(6486002)(54906003)(53546011)(956004)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?UU9zeGVmSysrcG5VRkI0MGYwTmMrVW4rRHZpODNMQWVWajdxd2RVWXk5b1Jn?= =?utf-8?B?MnBUNWtWbWtQcGE2akVqdzQ1VnltV0cxTlpDYXI3a3JHMW1HakRvUFl5VVBr?= =?utf-8?B?NHpPVHBDVHBaT1BaOXBGU21Uc0dwT2pQdWdjWTlxMGF2cU5qcU92Y3NkMkNL?= =?utf-8?B?Tml5Tm5RcHBlWkVqY1l1YnVIVlJFUGV1a2JtNkthYVNsckxmMS9sMzU2RCtv?= =?utf-8?B?ZjBiWVZPVGRRYVdEMWxjV0RDaXJNbTh6aER4TTdNeEJpRFZvOUkwQmc0eWxm?= =?utf-8?B?dm1FWE5YYjAyQkhqYVdMOUlYQVoxZjRxbWNwY3ZCb0RvdUNwc1VjYnJuSVlS?= =?utf-8?B?UDI4U3FZM3hRTmppb21YSE1HZVFpcUZTTmVTc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iRFd3elVSanptVmxPRGFWc1B4Tkp6WWFSbHJS?= =?utf-8?B?QWMzcG1saU01ZDlQWXpZN1dDSFFURWdvYUM2SWoxYmRuMURtR1A0S2hDR0xm?= =?utf-8?B?ZFluZzZDUzExRjNVdDNrbkZIVHpZeUtyZGdIOG5wYldETk5xa2g0c2M5MlZa?= =?utf-8?B?bGpqcFZNS0toWjdHVnpvMHhzN1pPc2RET1hCU3dnV04zajN6eXduNWFCdUhp?= =?utf-8?B?d0dXYkZ4ZmxvaDkyU2RPWFlOQUVQRVl5YTZhWnZtNndNcjI0SmVQY2twZnVQ?= =?utf-8?B?NDNaVndpUUhubUdwVWEybGlOelNZcEJ6dkZzOERkSHk5Z2c3cjA1Wk13NXNi?= =?utf-8?B?ZTBScTRzNkM2d1A3QTMvcUc1NXI3a3BxVDY1TWd1YTdEaytqVEszWHVCd0to?= =?utf-8?B?ejdHdllyWXpHSDM1MXAvZFFYRTdzcnBET29QQ1o2c3dtSmFMMjhRNWRIUDZs?= =?utf-8?Q?VRtWTz4Sgev/OkhxCqo82Vr7Yd+k2skMZA2Bch0?= X-OriginatorOrg: seco.com X-MS-Exchange-CrossTenant-Network-Message-Id: aea553fe-e996-43e5-4341-08d98da1ed6b X-MS-Exchange-CrossTenant-AuthSource: DB7PR03MB4523.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Oct 2021 17:01:26.2726 (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: gaLkQbao7Zor+dhD8ZhHD2+CLFLRJBlYaOuz533dX8nGADHQ0rkn086YpEB7zVkdO/uZwoj35Lh9PBPoD3SYuw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR03MB6762 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/12/21 12:44 PM, Rob Herring wrote: > On Tue, Oct 12, 2021 at 11:18 AM Sean Anderson wrote: >> >> Hi Rob, >> >> On 10/12/21 9:16 AM, Rob Herring wrote: >> > On Tue, Oct 05, 2021 at 10:39:36AM +0100, Russell King (Oracle) wrote: >> >> On Mon, Oct 04, 2021 at 03:15:12PM -0400, Sean Anderson wrote: >> >> > Add a property for associating PCS devices with ethernet controllers. >> >> > Because PCS has no generic analogue like PHY, I have left off the >> >> > -handle suffix. >> >> >> >> For PHYs, we used to have phy and phy-device as property names, but the >> >> modern name is "phy-handle". I think we should do the same here, so I >> >> would suggest using "pcs-handle". >> > >> > On 1G and up ethernet, we have 2 PHYs. There's the external (typically) >> > ethernet PHY which is what the above properties are for. Then there's >> > the on-chip serdes PHY similar to SATA, PCIe, etc. which includes the >> > PCS part. For this part, we should use the generic PHY binding. I think >> > we already have bindings doing that. >> >> In the 802.3 models, there are several components which convert between >> the MII (from the MAC) and the MDI (the physical protocol on the wire). >> These are the Physical Coding Sublayer (PCS), Physical Medium Attachment >> (PMA) sublayer, and Physical Medium Dependent (PMD) sublayer. The PMD >> converts between the physical layer signaling and the on-chip (or >> on-board) signalling. The PMA performs clock recovery and converts the >> serial data from the PMD into parallel data for the PCS. The PCS handles >> autonegotiation, CSMA/CD, and conversion to the apripriate MII for >> communicating with the MAC. >> >> In the above model, generic serdes devices generally correspond to the >> PMA/PMD sublayers. The PCS is generally a separate device, both >> on the hardware and software level. It provides an ethernet-specific >> layer on top of the more generic underlying encoding. For this reason, >> the PCS should be modeled as its own device, which may then contain a >> reference to the appropriate serdes. > > On the h/w I've worked on, PCS was an additional block instantiated > within the PHY, so it looked like one block to s/w. But that's been > almost 10 years ago now. Well, perhaps the line is not as clear as I made it seem above. The PCS/PMA/PMD separation is mostly a logical one, so different platforms divide up the work differently. In addition, the naming may not align with ethernet's idea of what a PCS or PMA is. For example, on the ZynqMP, the serdes (GTH) contains its own PCS and PMD (as shown on the datasheet). However, these blocks both correspond to the PMA layer from ethernet's POV. The ethernet PCS is a block controlled via registers within the MAC's address space. > If you do have 2 h/w blocks, one option is doing something like this: > > phys = <&pcs_phy>, <&sgmii_phy>; Generally, PCSs don't export the same interface as PHYs (see e.g. drivers/net/pcs and include/linux/phylink.h). IMO it would be an abuse of the phys property to use it for a PCS as well. > I'm okay with 'pcs-handle', but just want to make sure we're not using > it where 'phys' would work. > >> The above model describes physical layers such as 1000BASE-X or >> 10GBASE-X where the PCS/PMA/PMD is the last layer before the physical >> medium. In that case, the PCS could be modeled as a traditional PHY. >> However, when using (e.g.) SGMII, it is common for the "MDI" to be >> SGMII, and for another PHY to convert to 1000BASE-T. To model this >> correctly, the PCS/PMA/PMD layer must be considered independently from >> the PHY which will ultimately convert the MII to the MDI. >