From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.154.123]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 67EFA2F39B4; Wed, 8 Apr 2026 13:19:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=68.232.154.123 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775654351; cv=none; b=UFN2ecXIJ/RYBpRSh9p2d68jdVvG0oaLW1ppmasDpm+c4fBbf+vVX8pIeHBGyxH1SdAcopaPzjTtJvtknmlHDv0dLj6Vtpmpf5hhIpvGWNvWQKRWy6RCLU93ueuhRADnIrLr2PuNWT0h7sURh6UtEy51SVa5DdmoWVurMbM4iKA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775654351; c=relaxed/simple; bh=MbCR5O3U09Lmz1CqFkKC2UX874A225qIG27/kgiNCRA=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=raHujzmY4EneQiRE7AN+XE0CJbyyWzrzwI/TiIJsBk/AAf1OlzWXZvFj6+oDim44TmrOTA1o8aDAMsXI5FEWyKFnCXa9BpjDlKkuWBcrqZbEvuGHrdIW4w8LJZEaVTj6rKCktbmuh5j8KAH0JWWaZG5txv/w2OAVtMV3/UuQQLU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=microchip.com; spf=pass smtp.mailfrom=microchip.com; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b=kv+BuSgW; arc=none smtp.client-ip=68.232.154.123 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=microchip.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=microchip.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b="kv+BuSgW" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1775654350; x=1807190350; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=MbCR5O3U09Lmz1CqFkKC2UX874A225qIG27/kgiNCRA=; b=kv+BuSgWV/xZrcGO6TgxuUfhcVb5Z7zrRh1PlJgNO6gMkHOmdhFdHYhJ Oj3NusHoPPYwdc8qqhY8CQ1jv7B4ri3vIPtNG6FA3NBdPjSKkGz873GuR m82ZYw+FCerBmFrxrhOk6gWD3JfycMBy5mI9D3UQt8vnfH9YPmG0FEHnc t2Eu3iFPjRE04rAlJTHnS/D9DkqPqgRkP3YqhjqzsF7MnqHhgdx4yjH9C 9YLKrqMyT941uwv9wB9eQZKkl6cIa9A09z0S5ePm/YAcGRbyQjLEAmeNn 6B7uuW31jAHvc5TecUgv20FgHgm995dus3dZwkYrNdeummOrduj3mpkkj A==; X-CSE-ConnectionGUID: T3ddjfqzSe6g7V8tvrMVFg== X-CSE-MsgGUID: kFnD8QtdSuWi48O4qJ2s6w== X-IronPort-AV: E=Sophos;i="6.23,167,1770620400"; d="scan'208";a="55070709" X-Amp-Result: SKIPPED(no attachment in message) Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa4.microchip.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 08 Apr 2026 06:19:04 -0700 Received: from chn-vm-ex01.mchp-main.com (10.10.85.143) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.58; Wed, 8 Apr 2026 06:18:44 -0700 Received: from bby-cbu-swbuild03.eng.microchip.com (10.10.85.11) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server id 15.1.2507.58 via Frontend Transport; Wed, 8 Apr 2026 06:18:43 -0700 From: Charles Perry To: CC: , Charles Perry , Andrew Lunn , "David S. Miller" , Eric Dumazet , "Jakub Kicinski" , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Heiner Kallweit , Russell King , Subject: [PATCH net-next v5 0/3] Add support for PIC64-HPSC/HX MDIO controller Date: Wed, 8 Apr 2026 06:18:13 -0700 Message-ID: <20260408131821.1145334-1-charles.perry@microchip.com> X-Mailer: git-send-email 2.47.3 Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain Hello, This series adds a driver for the two MDIO controllers of PIC64-HPSC/HX. The hardware supports C22 and C45 but only C22 is implemented for now. This MDIO hardware is based on a Microsemi design supported in Linux by mdio-mscc-miim.c. However, The register interface is completely different with pic64hpsc, hence the need for a separate driver. The documentation recommends an input clock of 156.25MHz and a prescaler of 39, which yields an MDIO clock of 1.95MHz. This was tested on Microchip HB1301 evalkit which has a VSC8574 and a VSC8541. I've tested with bus frequencies of 0.6, 1.95 and 2.5 MHz. This series also adds a PHY write barrier when disabling PHY interrupts as discussed in [1]. Thanks, Charles [1]: https://lore.kernel.org/all/acvUqDgepCIScs8M@shell.armlinux.org.uk/ Changes in v5: - 1/3: Collect Conor's Acked-by - 1/3: Remove the "|" in "description: |" (Rob) - 1/3: Don't mention how many instances of the MDIO controller there are (Rob) - 1/3: Hex addresses are now in lowercase (Rob) - 1/3: Drop the phy DT label in the example (Rob) - 3/3: Support MDIO controllers that only support C45 (Russell, Andrew) Changes in v4: - 2/3: return FIELD_GET() directly instead of using "ret" (Russell) - 3/3: Add the PHY barrier patch (Russell, Andrew) Changes in v3: - 2/2: Add a MAINTAINERS entry (Jakub) Changes in v2: - 1/2: Make "clocks" and "interrupts" required (Andrew) - 1/2: Add a default value to "clock-frequency" (Andrew) - 2/2: Remove #define for unused registers (Maxime) - 2/2: Add "c22" to clause 22 read/write ops (Maxime) - 2/2: Remove the call to platform_set_drvdata() (Andrew) - 2/2: Make the clock mandatory (Andrew) - 2/2: Use 2.5MHz if no clock-frequency was specified (Andrew) - 2/2: Change the error message for bad clock-frequency (Andrew) - 2/2: Fix a use without initialization on bus_freq (Andrew) CC: Andrew Lunn CC: "David S. Miller" CC: Eric Dumazet CC: Jakub Kicinski CC: Paolo Abeni CC: Rob Herring CC: Krzysztof Kozlowski CC: Conor Dooley CC: Heiner Kallweit CC: Russell King CC: netdev@vger.kernel.org CC: devicetree@vger.kernel.org Charles Perry (3): dt-bindings: net: document Microchip PIC64-HPSC/HX MDIO controller net: mdio: add a driver for PIC64-HPSC/HX MDIO controller net: phy: add a PHY write barrier when disabling interrupts .../net/microchip,pic64hpsc-mdio.yaml | 68 +++++++ MAINTAINERS | 6 + drivers/net/mdio/Kconfig | 7 + drivers/net/mdio/Makefile | 1 + drivers/net/mdio/mdio-pic64hpsc.c | 190 ++++++++++++++++++ drivers/net/phy/phy.c | 25 ++- 6 files changed, 296 insertions(+), 1 deletion(-) create mode 100644 Documentation/devicetree/bindings/net/microchip,pic64hpsc-mdio.yaml create mode 100644 drivers/net/mdio/mdio-pic64hpsc.c -- 2.47.3