Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp948611rwd; Sat, 20 May 2023 09:30:53 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ43CXSrx0oG4fgLj+AQD96Ivm/107ogudeslMZiDM9hKD4sV3grtDnwz/C8OjNvSbV4roHZ X-Received: by 2002:a05:6a00:134c:b0:648:64fe:b14b with SMTP id k12-20020a056a00134c00b0064864feb14bmr9508810pfu.32.1684600252900; Sat, 20 May 2023 09:30:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684600252; cv=none; d=google.com; s=arc-20160816; b=rzYaqKn0D31OcQKPn1TYbXBWyqBk3tJZy2hDw7aXIa0KlPcde0UyMDdpmgfQFImR4q R8xQP+ggqtjAEByFaLCfS+XjQ9X/cQvfHdvlwQ8zAwgFZTWQZ4z0aqb7HmisdPlxaGZd brRbUJOzaQqPa27rvF7km3NYXzP7DYaEjev+wM92kwqGcL9EKQesAxoBxA9doG4EST7L /CwJWWGBHJo1nHz+ucbthVWAhGXizWGUw+kMODk3NYia3Z33au8kGc3P3EKy9WjJ0qyT 2jTGfEk0y6hLxcGLK7WA94SWUBiLikdu8UTTdrCYQR7H9tqFOa/hGD9PG27CgtLpEwTt 2GqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=rU05vFYLbThrSTkWUhLR/WyQSnjTPyH0S/9MByEIHYI=; b=AxHvHm3yTuotCLhbayvjBCKb/NTkD2VW3ofSODiOtoRHAVlMZpiO0Jo5/1a0d2TQKy tW9k2LRZqHSe4pvi6ixHjYhPyFoNG5ql2nsKEqcVg+Y0K3CD4xZT65T4AdVJvHffmAs1 vgjFW9SbOEm3mmt5j/249S0zysjugV+tzg2OE14mIvzutPDyEDjvnmIU8ZSrK2aHKWHB 9v5By1HBCmDQePcYQ4W2cmmx2NmOjfD2JTTEC0m8rkbMiyCfRA4Gef82+37mCWp6zYOS US0b6i+uq7OuuXB37x0ulxy09hF4AQQFRP774iy6gYvFUALbxnlrpVHifcrDx77qJO8v 8HGQ== ARC-Authentication-Results: i=1; mx.google.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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v17-20020aa799d1000000b0063b7b02424fsi1739844pfi.250.2023.05.20.09.30.40; Sat, 20 May 2023 09:30:52 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231845AbjETQH2 (ORCPT + 99 others); Sat, 20 May 2023 12:07:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41310 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231240AbjETQH0 (ORCPT ); Sat, 20 May 2023 12:07:26 -0400 Received: from smtp.missinglinkelectronics.com (smtp.missinglinkelectronics.com [162.55.135.183]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E89FB10A for ; Sat, 20 May 2023 09:07:24 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by smtp.missinglinkelectronics.com (Postfix) with ESMTP id 3F7BA20661; Sat, 20 May 2023 18:07:23 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at missinglinkelectronics.com Received: from smtp.missinglinkelectronics.com ([127.0.0.1]) by localhost (mail.missinglinkelectronics.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id KEUQHyrAvODV; Sat, 20 May 2023 18:07:23 +0200 (CEST) Received: from humpen-bionic2.mle (p578c5bfe.dip0.t-ipconnect.de [87.140.91.254]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: david) by smtp.missinglinkelectronics.com (Postfix) with ESMTPSA id 8923E2021B; Sat, 20 May 2023 18:07:22 +0200 (CEST) From: David Epping To: Andrew Lunn , Heiner Kallweit , Russell King , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, UNGLinuxDriver@microchip.com, David Epping Subject: [PATCH net 0/3] net: phy: mscc: support VSC8501 Date: Sat, 20 May 2023 18:06:00 +0200 Message-Id: <20230520160603.32458-1-david.epping@missinglinkelectronics.com> X-Mailer: git-send-email 2.17.1 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 Hello, this series of patches adds support for the VSC8501 Ethernet PHY and fixes support for the VSC8502 PHY in RGMII mode (see below for discussion). The first patch simply adds the VSC8502 to the MODULE_DEVICE_TABLE, where I guess it was unintentionally missing. I have no hardware to test my change. The second patch adds the VSC8501 PHY with exactly the same driver implementation as the existing VSC8502. Note that for at least RGMII mode this patch is not sufficient to operate the PHY, but likely the existing code was not sufficient for VSC8502, either. The third patch fixes RGMII mode operation for the VSC8501 (I have tested this on hardware) and very likely also the VSC8502, which share the same description of relevant registers in the datasheet. https://ww1.microchip.com/downloads/aemDocuments/documents/UNG/ProductDocuments/DataSheets/VSC8501-03_Datasheet_60001741A.PDF https://ww1.microchip.com/downloads/aemDocuments/documents/UNG/ProductDocuments/DataSheets/VSC8502-03_Datasheet_60001742B.pdf Table 4-42 "RGMII CONTROL, ADDRESS 20E2 (0X14)" Bit 11 for each of them. By default the RX_CLK is disabled in both PHYs. This results in no received packets being handed to the MAC. The patch enables this clock. Since I can only test RGMII mode, and the register is called RGMII, my patch is limited to the RGMII mode. However, according to Microchip support (case number 01268776) this applies to all modes using the RX_CLK (which is all modes?). Since the VSC8502 shares the same description, this would however mean the existing code for VSC8502 could have never worked. Is that possible? Has someone used VSC8502 successfully? Other PHYs sharing the same basic code, like VSC8530/31/40/41 don't have the clock disabled and the bit 11 is reserved for them. Hence the check for PHY ID. Should the uncertainty about GMII and MII modes be a source code comment? Or in the commit message? Or not mentioned at all? Thanks for your feedback, David David Epping (3): net: phy: mscc: add VSC8502 to MODULE_DEVICE_TABLE net: phy: mscc: add support for VSC8501 net: phy: mscc: enable VSC8501/2 RGMII RX clock drivers/net/phy/mscc/mscc.h | 2 ++ drivers/net/phy/mscc/mscc_main.c | 50 ++++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) -- 2.17.1