mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH net-next v4 0/3] Add Cortina Systems CS7542 MDIO controller support
@ 2026-11-27 10:14 Fil Dunsky via B4 Relay
  2026-11-27 10:14 ` [PATCH net-next v4 1/3] dt-bindings: net: Add Cortina CS7542 MDIO controller Fil Dunsky via B4 Relay
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Fil Dunsky via B4 Relay @ 2026-11-27 10:14 UTC (permalink / raw)
  To: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, Andrew Lunn,
	Heiner Kallweit, Russell King, Andrew Lunn
  Cc: netdev, devicetree, linux-kernel

Add the CS7542 Clause 22 MDIO controller with bounded, sleepable polling.
The driver is independent of the pending platform series and COMPILE_TEST.
It retains the firmware MDC prescaler while enabling software-initiated
transactions.

This revision acquires and enables the APB input required by the binding
before the first register access. The managed clock remains enabled until
the managed MDIO bus is unregistered. Clock lookup or enable failures,
including probe deferral, return before touching registers. No clock-rate
or MDC-divisor programming is added.

The APB source was established previously on Almond+ by changing APB from
150 to 100 MHz while AXI stayed at 150 MHz and comparing MDIO transaction
timing. The binding describes that source and allows clock-frequency from
mdio.yaml; the exact prescaler divisor encoding remains unestablished.

Validation for v4:
- The actual probe passes 10 allocation, map, clock, registration and
  cleanup-order cases with GCC/Clang ASan/UBSan. The pre-fix probe reproduces
  an MMIO access without an enabled clock under the same helpers.
- Native ARM driver=y object and exact Linux 6.18 driver=m module compile
  with W=1 and KCFLAGS=-Werror; existing configurations are unchanged.
- A read-only consumer probe on the running Almond+ obtained and enabled
  cs7542-apb at 150 MHz. MDIO CFG stayed 00200001; all references were dropped,
  the same OpenWrt boot continued and its watchdog/settings were preserved.
  This exercises the consumer/provider path, not a full live bus reprobe.

Earlier v2/v3 full independent builds, binding checks and RAM PHY read/write
results remain recorded. The transaction logic and firmware prescaler are
unchanged here; the old hardware matrix was not repeated.

---
Changes in v4:
- Enable the required APB input before accessing MDIO registers and keep it
  enabled through bus teardown.
- Clarify MANUAL transaction selection and preservation of the firmware
  MDC prescaler.
- Link to v3: https://lore.kernel.org/all/20261126-b4-cs7542-mdio-v3-0-35739a0f3225@gmail.com/

Changes in v3:
- Use sleepable polling in the MDIO bus callbacks.
- Describe the experimentally established APB input and allow the inherited
  optional clock-frequency property.
- Remove the unused private mii_bus pointer.
- Link to v2: https://lore.kernel.org/all/20261123-b4-cs7542-mdio-v2-0-30465e831853@gmail.com/

Changes in v2:
- Drop pending-frame state after Andrew Lunn's review.
- Sort Kconfig/Makefile entries and retain Andrew's Reviewed-by on the
  MAINTAINERS patch only.
- Link to v1: https://lore.kernel.org/all/20261123-b4-cs7542-mdio-v1-0-626d0a0e3b4d@gmail.com/

To: Fil Dunsky <filipp.dunsky@gmail.com>
To: Andrew Lunn <andrew+netdev@lunn.ch>
To: "David S. Miller" <davem@davemloft.net>
To: Eric Dumazet <edumazet@kernel.org>
To: Jakub Kicinski <kuba@kernel.org>
To: Paolo Abeni <pabeni@redhat.com>
To: Rob Herring <robh@kernel.org>
To: Krzysztof Kozlowski <krzk+dt@kernel.org>
To: Conor Dooley <conor+dt@kernel.org>
To: Andrew Lunn <andrew@lunn.ch>
To: Heiner Kallweit <hkallweit1@gmail.com>
To: Russell King <linux@armlinux.org.uk>
Cc: netdev@vger.kernel.org
Cc: devicetree@vger.kernel.org
Cc: linux-kernel@vger.kernel.org

---
Fil Dunsky (3):
      dt-bindings: net: Add Cortina CS7542 MDIO controller
      net: mdio: Add Cortina CS7542 bus controller
      MAINTAINERS: Add Cortina CS7542 MDIO controller entry

 .../bindings/net/cortina,cs7542-mdio.yaml          |  52 +++++++++
 MAINTAINERS                                        |   7 ++
 drivers/net/mdio/Kconfig                           |  12 ++
 drivers/net/mdio/Makefile                          |   1 +
 drivers/net/mdio/mdio-cs75xx.c                     | 126 +++++++++++++++++++++
 5 files changed, 198 insertions(+)
---
base-commit: b6a9fa34ce4187cb69d3c588a4bbffc31ce5db8f
change-id: 20261123-b4-cs7542-mdio-ec44e757e824

Best regards,
--  
Fil Dunsky <filipp.dunsky@gmail.com>



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-11-27 10:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-27 10:14 [PATCH net-next v4 0/3] Add Cortina Systems CS7542 MDIO controller support Fil Dunsky via B4 Relay
2026-11-27 10:14 ` [PATCH net-next v4 1/3] dt-bindings: net: Add Cortina CS7542 MDIO controller Fil Dunsky via B4 Relay
2026-11-27 10:14 ` [PATCH net-next v4 2/3] net: mdio: Add Cortina CS7542 bus controller Fil Dunsky via B4 Relay
2026-11-27 10:14 ` [PATCH net-next v4 3/3] MAINTAINERS: Add Cortina CS7542 MDIO controller entry Fil Dunsky via B4 Relay

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®