Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp388891rwe; Fri, 26 Aug 2022 06:59:42 -0700 (PDT) X-Google-Smtp-Source: AA6agR7l0ZIfXK/F9R2gpVA7RcXlxeUox2z+RHvn28Ose1khpZuNDl6BXdXwxuYoKVWllIXAfOum X-Received: by 2002:a17:907:60c7:b0:731:17e4:7fcc with SMTP id hv7-20020a17090760c700b0073117e47fccmr5524806ejc.73.1661522381812; Fri, 26 Aug 2022 06:59:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661522381; cv=none; d=google.com; s=arc-20160816; b=PX6C0Pb3XSzzm04tFQS3VQZkPySHyanHdzRYlOQuxew3h2r5eCmRoOTmw9sglOOTTe TSoDcHl8x1NMaXxQw39M20DZDuxxEEsZH2ZtXC9fuujeiMgGggpXawpf60GPpEHLzab8 2JVHLLSRjURNqsJip1MhAeriocODiAOpQG1m3+ZUV5aSgm82QzK5X10+uCM2LRQ3MIWD x0adHdjGFtJGs79nbfAKNT8qkKIE2uN82nDfVK9X1YPK7WwHSxPDLbATOc6PXBfdZwlJ +6cfWhzH8bz4dphg5GHRIgi4bOz4I5Efy3IAkOPoHLVehXj0Vnb7Agoeqc8PL4JWhOHc naZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=YIEtOKyE2S1rP4xNAtZiRn4s6t1T6XAkiZfnPLjfWu4=; b=oKRY/24vloHlQjyJ5t3wtNb11uKX9DuP1F3h5b1VVo1OzDd42nxUwhg4qRzWqrZ/wt gNPQq9zoAqexBHDMI2d9C9DBdhD/+QnoRxKK+U1wVR3xErTcbfTdHG7ZAaRbeqIzXCZ2 R/IgwJvVNFXfbG7n9L9I+C1id0i1JEjcSypJLuVArKZXryNQcGZ7UmzAaCNovzRPAzDd o+uQ4SjwpCo4yCmgQUU+bMkpY1yplRVtgtg8XIgfl23jlvpf9EJddnWHPxK/rdxuEKDo XOFzCOsRpmUYDewtDdpusss1G3GaAupuvt6vA9LNrDBecUE6gOrZ1vGp/4BZXEUxG8R6 Z1IA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b="UvEUK/zY"; 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=bootlin.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y12-20020a056402270c00b00445dc9e0dbbsi1521605edd.425.2022.08.26.06.59.16; Fri, 26 Aug 2022 06:59:41 -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=@bootlin.com header.s=gm1 header.b="UvEUK/zY"; 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=bootlin.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344123AbiHZNzC (ORCPT + 99 others); Fri, 26 Aug 2022 09:55:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56756 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230139AbiHZNzA (ORCPT ); Fri, 26 Aug 2022 09:55:00 -0400 Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::221]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 74AE1275FC; Fri, 26 Aug 2022 06:54:57 -0700 (PDT) Received: (Authenticated sender: maxime.chevallier@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id 176AA240008; Fri, 26 Aug 2022 13:54:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1661522096; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=YIEtOKyE2S1rP4xNAtZiRn4s6t1T6XAkiZfnPLjfWu4=; b=UvEUK/zYB+YqlMCN5VJVtpW+6MXVn731QA2TuZ+0RYWYpkd6AtzbfFxttccnrUxbr2cKyl 4h06ix7+3+DOzZVAk2E0RZSFsOh4gMzS97l4Q8lo81xF+/n6J9G76uLcJzx9pubyS+g7vG 6FhG7bgAJBkvFvRZ9P1FkvzQvq2fnX+SLLjW2dNSlCoprHXl01YJURpNM1p8YcHwWqe1/O 8Iu0VMcsG5lwA7yZe/6x2O2XTnwHmeCWf8xqDwW2DNMVzR4/R7J1Xa31dPhMxV/ZCOrRf0 6+FVan+2xUqP/DP8+tY7udWW3jjCD6rFVUrUmuUKHIB9AJ29U+c32FVCsicCuQ== From: Maxime Chevallier To: davem@davemloft.net, Rob Herring Cc: Maxime Chevallier , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, thomas.petazzoni@bootlin.com, Andrew Lunn , Jakub Kicinski , Eric Dumazet , Paolo Abeni , Florian Fainelli , Heiner Kallweit , Russell King , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org Subject: [PATCH net-next 0/5] net: altera: tse: phylink conversion Date: Fri, 26 Aug 2022 15:54:46 +0200 Message-Id: <20220826135451.526756-1-maxime.chevallier@bootlin.com> X-Mailer: git-send-email 2.37.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE, 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 This series is a rework of a previous series [1], and as Russell stated, it needed work :) The Altera TSE can be built with a SGMII/1000BaseX PCS, allowing to use SFP ports with this MAC, which is the end goal of adding phylink support and a proper PCS driver. The PCS itself can either be mapped in the MAC's register space, in that case, it's accessed through 32 bits registers, with the higher 16 bits always 0. Alternatively, it can sit on its own register space, exposing 16 bits registers, some of which ressemble the standard PHY registers. To tackle that rework, several things needs updating, starting by the DT binding, since we add support for a new register range for the PCS. Hence, the first patch of the series is a conversion to YAML of the existing binding. Then, patch 2 does a bit of simple cleanup to the TSE driver, using nice reverse xmas tree definitions. Patch 3 adds the actual PCS driver, as a standalone driver. Some future series will then reuse that PCS driver from the dwmac-socfpga driver, which implements support for this exact PCS too, allowing to share the code nicely. Patch 4 is then a phylink conversion of the altera_tse driver, to use this new PCS driver. Finally, patch 5 updates the newly converted DT binding to support the pcs register range. This series contains bits and pieces for this conversion, please tell me if you want me to send it as individual patches. Thanks, Maxime [1] : https://lore.kernel.org/netdev/20220823140517.3091239-1-maxime.chevallier@bootlin.com/ Maxime Chevallier (5): dt-bindings: net: Convert Altera TSE bindings to yaml net: altera: tse: cosmetic change to use reverse xmas tree ordering net: pcs: add new PCS driver for altera TSE PCS net: altera: tse: convert to phylink dt-bindings: net: altera: tse: add an optional pcs register range .../devicetree/bindings/net/altera_tse.txt | 113 ----- .../devicetree/bindings/net/altr,tse.yaml | 162 +++++++ MAINTAINERS | 7 + arch/arm/boot/dts/Makefile | 3 +- drivers/net/ethernet/altera/Kconfig | 2 + drivers/net/ethernet/altera/altera_tse.h | 19 +- .../net/ethernet/altera/altera_tse_ethtool.c | 22 +- drivers/net/ethernet/altera/altera_tse_main.c | 453 +++++------------- drivers/net/pcs/Kconfig | 6 + drivers/net/pcs/Makefile | 1 + drivers/net/pcs/pcs-altera-tse.c | 162 +++++++ include/linux/pcs-altera-tse.h | 17 + 12 files changed, 519 insertions(+), 448 deletions(-) delete mode 100644 Documentation/devicetree/bindings/net/altera_tse.txt create mode 100644 Documentation/devicetree/bindings/net/altr,tse.yaml create mode 100644 drivers/net/pcs/pcs-altera-tse.c create mode 100644 include/linux/pcs-altera-tse.h -- 2.37.2