* [PATCH net-next v6 0/3] Add Cortina Systems CS7542 MDIO controller support
@ 2026-12-05 14:36 Fil Dunsky via B4 Relay
2026-12-05 14:37 ` [PATCH net-next v6 1/3] dt-bindings: net: Add Cortina CS7542 MDIO controller Fil Dunsky via B4 Relay
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Fil Dunsky via B4 Relay @ 2026-12-05 14:36 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: Willem de Bruijn, netdev, devicetree, linux-kernel, Sashiko
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.
Since v4, the driver 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. This version excludes the generic
clock-frequency property because the driver retains the firmware divisor.
The exact prescaler 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 v6:
- Give the scheduler a 6 to 20 us delay window between MDIO polls.
Keep the initial register read and the 10 ms timeout.
- Verify immediate completion, normal completion and timeout using the
Linux polling macros. Build the ARM driver built-in and for OpenWrt
as a module.
- Link to the report: https://lore.kernel.org/all/sashiko-outbox-251027@kernel.org/
- Reject clock-frequency in the binding while keeping firmware-set MDC.
Validate the Almond+ DTB and reject one with clock-frequency added.
- Link to the binding review: https://lore.kernel.org/all/179644615714.3146.7992850630581806957@kernel.org/
- Link to v5: https://patch.msgid.link/20261204-b4-cs7542-mdio-v5-0-c9b9b51bf58d@gmail.com
Changes in v5:
- Rebase onto current net-next after the HiSilicon FEMAC MDIO driver
was removed (Willem de Bruijn).
- Pick up Rob Herring's Reviewed-by on the unchanged binding.
- Link to v4: https://patch.msgid.link/20261127-b4-cs7542-mdio-v4-0-0e37fc0c47d5@gmail.com
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/
---
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 | 55 +++++++++
MAINTAINERS | 7 ++
drivers/net/mdio/Kconfig | 12 ++
drivers/net/mdio/Makefile | 1 +
drivers/net/mdio/mdio-cs75xx.c | 128 +++++++++++++++++++++
5 files changed, 203 insertions(+)
---
base-commit: aea6deaf6b3c8a204242a4ca1fdb26e8e74de5fc
change-id: 20261123-b4-cs7542-mdio-ec44e757e824
Best regards,
--
Fil Dunsky <filipp.dunsky@gmail.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH net-next v6 1/3] dt-bindings: net: Add Cortina CS7542 MDIO controller
2026-12-05 14:36 [PATCH net-next v6 0/3] Add Cortina Systems CS7542 MDIO controller support Fil Dunsky via B4 Relay
@ 2026-12-05 14:37 ` Fil Dunsky via B4 Relay
2026-12-06 14:37 ` sashiko-bot
2026-12-05 14:37 ` [PATCH net-next v6 2/3] net: mdio: Add Cortina CS7542 bus controller Fil Dunsky via B4 Relay
2026-12-05 14:37 ` [PATCH net-next v6 3/3] MAINTAINERS: Add Cortina CS7542 MDIO controller entry Fil Dunsky via B4 Relay
2 siblings, 1 reply; 6+ messages in thread
From: Fil Dunsky via B4 Relay @ 2026-12-05 14:37 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: Willem de Bruijn, netdev, devicetree, linux-kernel, Sashiko
From: Fil Dunsky <filipp.dunsky@gmail.com>
Describe the Clause 22 controller, its MDC prescaler and the devices
on its management bus. The driver preserves firmware-assigned MDC,
so exclude the common clock-frequency property.
Reported-by: Sashiko <sashiko-bot@kernel.org>
Link: https://lore.kernel.org/all/179644615714.3146.7992850630581806957@kernel.org/
Signed-off-by: Fil Dunsky <filipp.dunsky@gmail.com>
---
.../bindings/net/cortina,cs7542-mdio.yaml | 55 ++++++++++++++++++++++
1 file changed, 55 insertions(+)
diff --git a/Documentation/devicetree/bindings/net/cortina,cs7542-mdio.yaml b/Documentation/devicetree/bindings/net/cortina,cs7542-mdio.yaml
new file mode 100644
index 000000000..a20d10a5c
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/cortina,cs7542-mdio.yaml
@@ -0,0 +1,55 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/net/cortina,cs7542-mdio.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Cortina Systems CS7542 MDIO controller
+
+maintainers:
+ - Fil Dunsky <filipp.dunsky@gmail.com>
+
+description:
+ Clause 22 MDIO controller with a programmable 16-bit MDC prescaler.
+ Firmware configures the prescaler before the operating system starts.
+
+allOf:
+ - $ref: mdio.yaml#
+
+properties:
+ compatible:
+ const: cortina,cs7542-mdio
+
+ reg:
+ maxItems: 1
+
+ clocks:
+ maxItems: 1
+ description: APB input clock
+
+ clock-frequency: false
+
+ suppress-preamble: false
+
+required:
+ - compatible
+ - reg
+ - clocks
+ - "#address-cells"
+ - "#size-cells"
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ mdio@f00700a0 {
+ compatible = "cortina,cs7542-mdio";
+ reg = <0xf00700a0 0x14>;
+ clocks = <&apb_clk>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ ethernet-phy@0 {
+ reg = <0>;
+ };
+ };
--
2.53.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH net-next v6 2/3] net: mdio: Add Cortina CS7542 bus controller
2026-12-05 14:36 [PATCH net-next v6 0/3] Add Cortina Systems CS7542 MDIO controller support Fil Dunsky via B4 Relay
2026-12-05 14:37 ` [PATCH net-next v6 1/3] dt-bindings: net: Add Cortina CS7542 MDIO controller Fil Dunsky via B4 Relay
@ 2026-12-05 14:37 ` Fil Dunsky via B4 Relay
2026-12-06 14:37 ` sashiko-bot
2026-12-05 14:37 ` [PATCH net-next v6 3/3] MAINTAINERS: Add Cortina CS7542 MDIO controller entry Fil Dunsky via B4 Relay
2 siblings, 1 reply; 6+ messages in thread
From: Fil Dunsky via B4 Relay @ 2026-12-05 14:37 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: Willem de Bruijn, netdev, devicetree, linux-kernel, Sashiko
From: Fil Dunsky <filipp.dunsky@gmail.com>
Support Clause 22 reads and writes through the CS7542 management
interface. Retain the firmware-configured prescaler and unrelated
configuration bits while enabling manual operation.
Use sleepable polling for the bounded wait in the MDIO bus callbacks.
Report timeout errors directly without tracking a pending transaction.
Use managed bus allocation and registration to cover probe failures
and removal.
Acquire and enable the required APB input before accessing registers,
and retain it for the lifetime of the registered bus. Managed bus teardown
runs before the managed clock is disabled. The firmware MDC prescaler is
preserved; no clock-rate or divisor programming is introduced.
Allow a 6 to 20 us timer window between register checks instead of
requesting usleep_range(1, 1). The first check remains immediate
and the transaction timeout remains 10 ms.
Reported-by: Sashiko <sashiko-bot@kernel.org>
Link: https://lore.kernel.org/all/sashiko-outbox-251027@kernel.org/
Signed-off-by: Fil Dunsky <filipp.dunsky@gmail.com>
---
drivers/net/mdio/Kconfig | 12 ++++
drivers/net/mdio/Makefile | 1 +
drivers/net/mdio/mdio-cs75xx.c | 128 +++++++++++++++++++++++++++++++++++++++++
3 files changed, 141 insertions(+)
diff --git a/drivers/net/mdio/Kconfig b/drivers/net/mdio/Kconfig
index 6f272fae4..3fd35d6be 100644
--- a/drivers/net/mdio/Kconfig
+++ b/drivers/net/mdio/Kconfig
@@ -87,6 +87,18 @@ config MDIO_BCM_UNIMAC
config MDIO_CAVIUM
tristate
+config MDIO_CS75XX
+ tristate "Cortina Systems CS7542 MDIO controller"
+ depends on OF_MDIO && HAS_IOMEM
+ help
+ Support Clause 22 PHY register access through the CS7542 MDIO
+ controller, retaining the prescaler configured by platform firmware.
+ Transactions use bounded polling.
+ Device Tree describes the PHYs sharing this management bus.
+
+ To compile this driver as a module, choose M here: the module
+ will be called mdio-cs75xx.
+
config MDIO_GPIO
tristate "GPIO lib-based bitbanged MDIO buses"
depends on MDIO_BITBANG
diff --git a/drivers/net/mdio/Makefile b/drivers/net/mdio/Makefile
index e02c66a02..3680c781c 100644
--- a/drivers/net/mdio/Makefile
+++ b/drivers/net/mdio/Makefile
@@ -11,6 +11,7 @@ obj-$(CONFIG_MDIO_BCM_IPROC) += mdio-bcm-iproc.o
obj-$(CONFIG_MDIO_BCM_UNIMAC) += mdio-bcm-unimac.o
obj-$(CONFIG_MDIO_BITBANG) += mdio-bitbang.o
obj-$(CONFIG_MDIO_CAVIUM) += mdio-cavium.o
+obj-$(CONFIG_MDIO_CS75XX) += mdio-cs75xx.o
obj-$(CONFIG_MDIO_GPIO) += mdio-gpio.o
obj-$(CONFIG_MDIO_I2C) += mdio-i2c.o
obj-$(CONFIG_MDIO_IPQ4019) += mdio-ipq4019.o
diff --git a/drivers/net/mdio/mdio-cs75xx.c b/drivers/net/mdio/mdio-cs75xx.c
new file mode 100644
index 000000000..48d755bb7
--- /dev/null
+++ b/drivers/net/mdio/mdio-cs75xx.c
@@ -0,0 +1,128 @@
+// SPDX-License-Identifier: GPL-2.0
+#include <linux/bitfield.h>
+#include <linux/bits.h>
+#include <linux/clk.h>
+#include <linux/io.h>
+#include <linux/iopoll.h>
+#include <linux/module.h>
+#include <linux/of.h>
+#include <linux/of_mdio.h>
+#include <linux/phy.h>
+#include <linux/platform_device.h>
+
+#define PER_MDIO_CFG 0x00
+#define MDIO_CFG_MANUAL BIT(0)
+#define PER_MDIO_ADDR 0x04
+#define MDIO_ADDR_PHY GENMASK(4, 0)
+#define MDIO_ADDR_REG GENMASK(12, 8)
+#define MDIO_ADDR_READ BIT(15)
+#define PER_MDIO_WRDATA 0x08
+#define PER_MDIO_RDDATA 0x0c
+#define PER_MDIO_CTRL 0x10
+#define MDIO_CTRL_DONE BIT(0)
+#define MDIO_CTRL_START BIT(7)
+
+#define CS75XX_MDIO_POLL_US 20
+#define CS75XX_MDIO_TIMEOUT_US 10000
+
+struct cs75xx_mdio {
+ void __iomem *base;
+};
+
+static int cs75xx_mdio_wait(struct cs75xx_mdio *priv)
+{
+ u32 val;
+ int ret;
+
+ ret = readl_poll_timeout(priv->base + PER_MDIO_CTRL, val,
+ val & MDIO_CTRL_DONE, CS75XX_MDIO_POLL_US,
+ CS75XX_MDIO_TIMEOUT_US);
+ if (!ret)
+ writel(MDIO_CTRL_DONE, priv->base + PER_MDIO_CTRL);
+ return ret;
+}
+
+static int cs75xx_mdio_read(struct mii_bus *bus, int phy, int reg)
+{
+ struct cs75xx_mdio *priv = bus->priv;
+ int ret;
+
+ writel(MDIO_CTRL_DONE, priv->base + PER_MDIO_CTRL);
+ writel(MDIO_ADDR_READ | FIELD_PREP(MDIO_ADDR_REG, reg) |
+ FIELD_PREP(MDIO_ADDR_PHY, phy), priv->base + PER_MDIO_ADDR);
+ writel(MDIO_CTRL_START, priv->base + PER_MDIO_CTRL);
+ ret = cs75xx_mdio_wait(priv);
+ if (ret)
+ return ret;
+ return readl(priv->base + PER_MDIO_RDDATA) & 0xffff;
+}
+
+static int cs75xx_mdio_write(struct mii_bus *bus, int phy, int reg, u16 val)
+{
+ struct cs75xx_mdio *priv = bus->priv;
+
+ writel(MDIO_CTRL_DONE, priv->base + PER_MDIO_CTRL);
+ writel(FIELD_PREP(MDIO_ADDR_REG, reg) | FIELD_PREP(MDIO_ADDR_PHY, phy),
+ priv->base + PER_MDIO_ADDR);
+ writel(val, priv->base + PER_MDIO_WRDATA);
+ writel(MDIO_CTRL_START, priv->base + PER_MDIO_CTRL);
+ return cs75xx_mdio_wait(priv);
+}
+
+static int cs75xx_mdio_probe(struct platform_device *pdev)
+{
+ struct device *dev = &pdev->dev;
+ struct cs75xx_mdio *priv;
+ struct mii_bus *bus;
+ struct clk *clk;
+ u32 cfg;
+
+ bus = devm_mdiobus_alloc_size(dev, sizeof(*priv));
+ if (!bus)
+ return -ENOMEM;
+
+ priv = bus->priv;
+ priv->base = devm_platform_ioremap_resource(pdev, 0);
+ if (IS_ERR(priv->base))
+ return PTR_ERR(priv->base);
+
+ clk = devm_clk_get_enabled(dev, NULL);
+ if (IS_ERR(clk))
+ return dev_err_probe(dev, PTR_ERR(clk),
+ "failed to enable APB clock\n");
+
+ /*
+ * Select software-initiated accesses instead of automatic PHY polling.
+ * Read-modify-write preserves the firmware MDC prescaler in bits 31:16.
+ */
+ cfg = readl(priv->base + PER_MDIO_CFG);
+ cfg |= MDIO_CFG_MANUAL;
+ writel(cfg, priv->base + PER_MDIO_CFG);
+ writel(MDIO_CTRL_DONE, priv->base + PER_MDIO_CTRL);
+
+ bus->name = "cs75xx-mdio";
+ bus->read = cs75xx_mdio_read;
+ bus->write = cs75xx_mdio_write;
+ bus->parent = dev;
+ snprintf(bus->id, MII_BUS_ID_SIZE, "%s", dev_name(dev));
+
+ return devm_of_mdiobus_register(dev, bus, dev->of_node);
+}
+
+static const struct of_device_id cs75xx_mdio_of_match[] = {
+ { .compatible = "cortina,cs7542-mdio" },
+ { }
+};
+MODULE_DEVICE_TABLE(of, cs75xx_mdio_of_match);
+
+static struct platform_driver cs75xx_mdio_driver = {
+ .probe = cs75xx_mdio_probe,
+ .driver = {
+ .name = "cs75xx-mdio",
+ .of_match_table = cs75xx_mdio_of_match,
+ },
+};
+module_platform_driver(cs75xx_mdio_driver);
+
+MODULE_DESCRIPTION("Cortina CS75xx MDIO bus driver");
+MODULE_LICENSE("GPL");
--
2.53.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH net-next v6 3/3] MAINTAINERS: Add Cortina CS7542 MDIO controller entry
2026-12-05 14:36 [PATCH net-next v6 0/3] Add Cortina Systems CS7542 MDIO controller support Fil Dunsky via B4 Relay
2026-12-05 14:37 ` [PATCH net-next v6 1/3] dt-bindings: net: Add Cortina CS7542 MDIO controller Fil Dunsky via B4 Relay
2026-12-05 14:37 ` [PATCH net-next v6 2/3] net: mdio: Add Cortina CS7542 bus controller Fil Dunsky via B4 Relay
@ 2026-12-05 14:37 ` Fil Dunsky via B4 Relay
2 siblings, 0 replies; 6+ messages in thread
From: Fil Dunsky via B4 Relay @ 2026-12-05 14:37 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: Willem de Bruijn, netdev, devicetree, linux-kernel
From: Fil Dunsky <filipp.dunsky@gmail.com>
List the binding and driver under the author maintaining the Almond+
platform support, together with the appropriate subsystem mailing list.
Signed-off-by: Fil Dunsky <filipp.dunsky@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
---
MAINTAINERS | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index 9336fa93c..ec5053dc5 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -6933,6 +6933,13 @@ S: Maintained
F: Documentation/hwmon/corsair-psu.rst
F: drivers/hwmon/corsair-psu.c
+CORTINA SYSTEMS CS7542 MDIO CONTROLLER
+M: Fil Dunsky <filipp.dunsky@gmail.com>
+L: netdev@vger.kernel.org
+S: Maintained
+F: Documentation/devicetree/bindings/net/cortina,cs7542-mdio.yaml
+F: drivers/net/mdio/mdio-cs75xx.c
+
COUNTER SUBSYSTEM
M: William Breathitt Gray <wbg@kernel.org>
L: linux-iio@vger.kernel.org
--
2.53.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH net-next v6 1/3] dt-bindings: net: Add Cortina CS7542 MDIO controller
2026-12-05 14:37 ` [PATCH net-next v6 1/3] dt-bindings: net: Add Cortina CS7542 MDIO controller Fil Dunsky via B4 Relay
@ 2026-12-06 14:37 ` sashiko-bot
0 siblings, 0 replies; 6+ messages in thread
From: sashiko-bot @ 2026-12-06 14:37 UTC (permalink / raw)
To: Fil Dunsky; +Cc: devicetree, robh, conor+dt
Thank you for your contribution! Sashiko AI review found 2 potential
issues to consider:
- [Medium] dt-bindings: net: cs7542-mdio forbids clock-frequency due to
driver policy
- [Low] dt-bindings: net: cs7542-mdio omits rationale for
suppress-preamble: false
--
commit 76df9f9f1b70bc3241483a27959a3fff9aff9f19
Author: Fil Dunsky <filipp.dunsky@gmail.com>
dt-bindings: net: Add Cortina CS7542 MDIO controller
This commit adds the Device Tree binding schema for the Cortina Systems
CS7542 Clause 22 MDIO controller.
Link: https://lore.kernel.org/all/179644615714.3146.7992850630581806957@kernel.org/
> diff --git a/Documentation/devicetree/bindings/net/cortina,cs7542-mdio.yaml b/Documentation/devicetree/bindings/net/cortina,cs7542-mdio.yaml
> new file mode 100644
> index 0000000000000..a20d10a5c2c7d
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/net/cortina,cs7542-mdio.yaml
[ ... ]
> +description:
> + Clause 22 MDIO controller with a programmable 16-bit MDC prescaler.
> + Firmware configures the prescaler before the operating system starts.
[ ... ]
> + clock-frequency: false
[Severity: Medium]
Should this binding forbid clock-frequency and encode firmware startup
behavior in description?
The controller has a programmable 16-bit MDC prescaler, and the commit
message excludes clock-frequency only because the driver preserves
firmware-assigned MDC. Per writing-bindings.rst, bindings should
describe the hardware rather than current OS or driver behavior.
Forbidding clock-frequency causes dtbs_check to reject valid board DTS
files that specify an MDC frequency. Since clock-frequency is already
optional in mdio.yaml, dropping clock-frequency: false and the firmware
startup sentence keeps the binding complete without requiring it in DTS.
> +
> + suppress-preamble: false
[Severity: Low]
Does the CS7542 hardware lack preamble suppression, or is
suppress-preamble: false also a driver limitation?
Neither the commit message nor the binding description explains why
suppress-preamble is forbidden. If the hardware cannot suppress the
preamble, documenting that constraint would clarify why it is disallowed;
otherwise, suppress-preamble: false should be dropped.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261205-b4-cs7542-mdio-v6-0-228e312ff14b@gmail.com?part=1
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH net-next v6 2/3] net: mdio: Add Cortina CS7542 bus controller
2026-12-05 14:37 ` [PATCH net-next v6 2/3] net: mdio: Add Cortina CS7542 bus controller Fil Dunsky via B4 Relay
@ 2026-12-06 14:37 ` sashiko-bot
0 siblings, 0 replies; 6+ messages in thread
From: sashiko-bot @ 2026-12-06 14:37 UTC (permalink / raw)
To: Fil Dunsky; +Cc: devicetree, robh, conor+dt
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] net: mdio: incremental revision notes and review-bot tag in
commit message
--
commit 379ac427eb9577dfa713c4d1c08ac4ee36e7a682
Author: Fil Dunsky <filipp.dunsky@gmail.com>
> net: mdio: Add Cortina CS7542 bus controller
>
> Support Clause 22 reads and writes through the CS7542 management
> interface. Retain the firmware-configured prescaler and unrelated
> configuration bits while enabling manual operation.
>
> Use sleepable polling for the bounded wait in the MDIO bus callbacks.
> Report timeout errors directly without tracking a pending transaction.
> Use managed bus allocation and registration to cover probe failures
> and removal.
>
> Acquire and enable the required APB input before accessing registers,
> and retain it for the lifetime of the registered bus. Managed bus teardown
> runs before the managed clock is disabled. The firmware MDC prescaler is
> preserved; no clock-rate or divisor programming is introduced.
>
> Allow a 6 to 20 us timer window between register checks instead of
> requesting usleep_range(1, 1). The first check remains immediate
> and the transaction timeout remains 10 ms.
>
> Reported-by: Sashiko <sashiko-bot@kernel.org>
> Link: https://lore.kernel.org/all/sashiko-outbox-251027@kernel.org/
> Signed-off-by: Fil Dunsky <filipp.dunsky@gmail.com>
[Severity: Low]
Should this commit message be rewritten to describe the new driver
standalone?
Because mdio-cs75xx.c is a new driver, delta notes against earlier unmerged
revisions (such as replacing usleep_range(1, 1) with a 6 to 20 us window,
or not tracking a pending transaction) belong below the --- tearoff line
rather than in the permanent commit log.
Similarly, the Reported-by: and Link: trailers point to review feedback on
an earlier unmerged revision rather than an upstream bug report, and can
be dropped from the commit message.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261205-b4-cs7542-mdio-v6-0-228e312ff14b@gmail.com?part=2
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2026-12-06 14:37 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-05 14:36 [PATCH net-next v6 0/3] Add Cortina Systems CS7542 MDIO controller support Fil Dunsky via B4 Relay
2026-12-05 14:37 ` [PATCH net-next v6 1/3] dt-bindings: net: Add Cortina CS7542 MDIO controller Fil Dunsky via B4 Relay
2026-12-06 14:37 ` sashiko-bot
2026-12-05 14:37 ` [PATCH net-next v6 2/3] net: mdio: Add Cortina CS7542 bus controller Fil Dunsky via B4 Relay
2026-12-06 14:37 ` sashiko-bot
2026-12-05 14:37 ` [PATCH net-next v6 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