From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=100.103.45.18 ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1796356676; b=cLKSK3D8HCh9l0LtnKRpy0JkY8Ge/iaDTa7Ci9eotfyqOiu5cHrW9ZJApvC8mVvMVLM0 S+jubN92Sagcz7QEFennLttt/eMWvrJMlrst4GQPDHRXqOzjuYHBqD0naNoE+weJK5sj0 3cgg7K3mombXGEn+4QuBk5UEBW86c+FsulybpJ4R8fpTBkf+WOlI2MXsL0bjaa55Hsx1j 31V2jwFTuMxdsf7r/0yPeZgjjXa7e0GRpXQDac6ATqVs1FZYg8xop5AN0Gmt7Cz/fTHSN hJ2t8aiGdm2d7GDGoJ9Pqww/ib7LTkMVERG0qZL2G5gRhUAkOtqJ4jK8Ty3WCkiPoOw== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796356676; h=Received:DKIM-Signature:Received:From:Subject:Date:Message-Id: MIME-Version:Content-Type:Content-Transfer-Encoding:X-B4-Tracking: X-Change-ID:To:Cc:X-Mailer:X-Developer-Signature:X-Developer-Key: X-Endpoint-Received:X-Original-From:Reply-To; bh=rK7qgWhsbLAr6RBbn2nFSRmczsyRO5xZS16ops8wGMM=; b=crTec36NG6+eE9XgtjMehO0omlyyMcTpLuM3eqL1Ah13SjlwJi7sP72OEY2D8/P/CLhT e90awXp67hSW2db3ARnKRpYdYqSgnvcXn/22x3n/u6bu6bSz4vatXsFUfu1HmToGDgbJJ xpDZg7GZWsVMsQUuQuwdgk6+v1jz2A/g+TpLdn8zthjXc8iWe82vYCNxHuny6No3RBlx1 lHai9ex6EGWcQor/0BvOjGgeEe2zH/GhY9kssgvx53+/oaze0NaP5N9YhBwS+MrVX3z/J 3/JO9T3dphS6da0Hkgdh/roaPiS5OWwWpKVcFSlOA0qmCsxH1oxEx4Cf/BXHaivp3rg== ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=PLX9i7zy; arc=pass header.oldest-pass=0 smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 35238606A334; Fri, 4 Dec 2026 03:57:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=PLX9i7zy Authentication-Results: smtp.kernel.org; arc=none smtp.remote-ip=100.80.115.77 ARC-Seal: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256; cv=none; t=1796356676; b=G0xZJ/YR2rvDpPVXauHhARSdpuJjw413XLhSED/K4UJwEPD9HoHXdS3UumxnTaNLoDMO 1Ay3IO9Z945neWobl0n5yf/T3iaO/STr5b/uIH5tCQLI+GqdKqT7OQkopBbSG+8MfC7Iz BEYEbgoUg7iP76KLwftFMwoYGzQbc8bEH31M0sbZf7wnT9bQux2PSB3n/FF86+fq9rYq0 er1qeNE4U7atkkwDGwr0BtGHzkemJSBpR6WE1wTLQAp57eDROb50WZ3LdXJjGhMSBFgp4 sviBq5IfGkica0AKaQduPbl07g2Z7OEXuDBIgOhFqjTeKa2VNfoV1uoDXV8Jfzq5iWw== ARC-Message-Signature: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256; c=relaxed/relaxed; t=1796356676; h=DKIM-Signature:Received:From:Subject:Date:Message-Id:MIME-Version: Content-Type:Content-Transfer-Encoding:X-B4-Tracking:X-Change-ID:To: Cc:X-Mailer:X-Developer-Signature:X-Developer-Key:X-Endpoint-Received: X-Original-From:Reply-To; bh=rK7qgWhsbLAr6RBbn2nFSRmczsyRO5xZS16ops8wGMM=; b=Gt1mG4twPTJKQwDFCtzFE8Yl/m/4UU0WwHtT1/07rB2UohrOl00CiWB8Hw9AWuin62HS afMHWiIESaibq8rwSK5kovH+lxEH30rZemEh/6FOaqIYiHKfVlHpu5OrHj2Mtmedyr/aY JYjd32JHro7jcZaLgsMsgM4wVuMKCf9fgXHvSRpFHCYS9qcueeuFw8h3D52X40yuMThdS pVoSmqMw/DeRWAEN5iRRzPKcSWgqxqxmrKWCJ1E0PWU5E7gJrxx9/762Y2GynGCavuDAr G4h5pee0/Xwx9D4iXw/Za1Q8GD3jckGnYe/HX7fLSqOYhIDskPsY/rxGHNv/lzVTAIQ== ARC-Authentication-Results: i=1; smtp.kernel.org; arc=none smtp.remote-ip=100.80.115.77 Received: from lkml.kernel.org (nexus.subspace.kernel.org [100.80.115.77]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.kernel.org (Postfix) with ESMTPS id C97651F000C2; Fri, 4 Dec 2026 03:57:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796356675; bh=rK7qgWhsbLAr6RBbn2nFSRmczsyRO5xZS16ops8wGMM=; h=From:Subject:Date:To:Cc:Reply-To; b=PLX9i7zyWGxQlf5d6jwqEGBFVtlEjuJcxMhZ/iZyU70ZcvIQqId1PM76q64ODSsbw 1Bam1p4HxJGUwYD8CudRBrv/KgYDUEJ2zeTae3fdDS63FUY/cEbRQah5Krx9CcLC5p AZ/43pOvuT/d48a9WaKXQxQV0rBxoTjQt+DpT4igM8o+LvSAy5LuYER61G75VnzyP3 qsu6iSGn8GVIa8LIZ3lmDaiWBreeX5tGBOQlMW6nfzNNBSNwyObYc6Ytuui4uGvBNZ o5vnrk3519pGwr0pkEyBd3+2xn4oAtGLjU1qzvuVks6Tme9bNuravdUZo129rbvanH K1g22023owOIw== Received: from nexus.subspace.kernel.org (localhost [IPv6:::1]) by lkml.kernel.org (Postfix) with ESMTP id 2603F4D8D8; Fri, 4 Dec 2026 03:57:54 +0000 (UTC) From: Fil Dunsky via B4 Relay Subject: [PATCH net-next v5 0/3] Add Cortina Systems CS7542 MDIO controller support Date: Fri, 04 Dec 2026 06:57:52 +0300 Message-Id: <20261204-b4-cs7542-mdio-v5-0-c9b9b51bf58d@gmail.com> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIAAAAAAAC/33OwW7CMAwG4FdBOROU2E5SOO09EIc2cSHT2k5Nq YpQ3520uzDQdvxlf799F4n7yEkcNnfR8xhT7NoczHYj/KVszyxjyFmAAqs1oKxI+uQMgWxC7CR 7InbGcQEkMvruuY7TWngULQ+y5WkQp59Julaf7Ielb9m9xDR0/W29PepV/HVm1FJJCzaoUjFWF D7OTRm/dr5r1vIR/ueQOSqyhgvUhcFXjs/cvnFcuHG4L1WNAOaV0zN3b5wyz2+72itPLvzi8zw /AJuw1oeFAQAA X-Change-ID: 20261123-b4-cs7542-mdio-ec44e757e824 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@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org X-Mailer: b4 0.16.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1796356673; l=3718; i=filipp.dunsky@gmail.com; s=20260930; h=from:subject:message-id; bh=Q8jahtYKm899mhB6hiCbkCkXHLRhCiKXsnKNBCYd0nc=; b=Lxm/o6gISEkjCV6kjuhjC95c8A9T3MINblgqsiMQuMWbC/M7X5r2GfkhW71lRFTCg3ChyFbAn 1l+2Qv/8TqlBNvtByIlpfye6FaQ2DvDll7iTABUAxiR9qStjXVz6cSc X-Developer-Key: i=filipp.dunsky@gmail.com; a=ed25519; pk=JAYP8e2rJ54DHOmhNtXud8rl1igAaAXoOHxtJmVXI1g= X-Endpoint-Received: by B4 Relay for filipp.dunsky@gmail.com/20260930 with auth_id=1085 X-Original-From: Fil Dunsky Reply-To: filipp.dunsky@gmail.com 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 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 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 | 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: aea6deaf6b3c8a204242a4ca1fdb26e8e74de5fc change-id: 20261123-b4-cs7542-mdio-ec44e757e824 Best regards, -- Fil Dunsky