From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D2B273594A for ; Fri, 23 Jan 2026 12:01:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.42 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769169690; cv=none; b=XUJY1+Moj337phhGD/9Wu9qDsUBUGnYgYCmYHb2n0QRAI85cHd7ZvPczj15EF/3JFzgP3an1bA5IQZQTaP3jyVz0wFZdrPAxi+v3JlHuTbR/Ul/mEcgIe8NcnXivf66P3CSLeQLO/KhGoj+U/bAc3ACrsIdwVBLxAGzW8+LA/K8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769169690; c=relaxed/simple; bh=EifM3JqyoqVdIYaT0+68FZEg2TzSn0f7GV0JfA73XTk=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=A30G8leISUJYTpj7A3xBjtttjALwqB9DOCt9HWAWG/641rzh07MPt5RNaLohy95qWuO+uq4CcdtN3teQjN27IhwFZLDmByIFZht4ZrIp1yxCGHuxyvzybPsVo6T3I7aU91yqdbsdKrW4vo9yibYjl5YVsjJl8Y5uA9ZzaOwwM+0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=JDqFlzVg; arc=none smtp.client-ip=209.85.128.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="JDqFlzVg" Received: by mail-wm1-f42.google.com with SMTP id 5b1f17b1804b1-4801c1ad878so21718485e9.1 for ; Fri, 23 Jan 2026 04:01:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1769169687; x=1769774487; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=iq6qtRr1VN9uZEEh7QyzjJgtaD86rVZ5JvpyoMwbVI4=; b=JDqFlzVgyN+rgmX1NMuZppt493pjKeJHQuQ2iI5oc5tdR61sUu+FrP3lYQbdCP2+a2 1Ay49iQ2j41DSHD/5l26Y8NvlHAwUULXmqrB8Lvy1iRiKlKsemBGteciTkH0Qgp2LQyp oFRIKcYg9VXckXs9f0nXXEDYHVRweTZ8js6BKEX8S0QnKbVQaikyOQgYZXTppOnJp0/F fN3n2xRGoJAwqqok1+YXTKDDDYu11Xl7gYyGUe77hDo/YVbNEZFIqvOuUilxuM4wOlMH HibZp5qxKzkqG2WCKvpUeZib7UVivd9je1aE2u1fueZCzLdOrGMZmqXd7SQspy5t1sJW XdtA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769169687; x=1769774487; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=iq6qtRr1VN9uZEEh7QyzjJgtaD86rVZ5JvpyoMwbVI4=; b=TF7mAwaR+0E0oKkTsRCnUasl2b+jkAhLr4ggdMgp9Qh1c84+RPuFt2k0jXvZ6K93SR Gda3yCM7dYwI0XpeXsXhYWVwwROgTGGHab54nhTqbqcLCLjNItQ3KN5GzRp+ucwbem9u XH+kA57U9N0bbGTJQ8pjt7ZuBLO5rX/9f+Tt/j/4aiMfec6J/ISsJFzfp8JcBJQDN23q snEyk2RaaHmowVdwUueMaMi9GJiUpDI4D4VkLLTh2sJNQtSVkGu9fBMEPHlcDJhhLzA1 3gLoN/eHM5AD72IjzldXZCvN8CxMBF+PfK105C0AsKOh0zi1hQ2MIj+OpM523xwnYzWJ kkKA== X-Forwarded-Encrypted: i=1; AJvYcCWMjzSOmUwftJubKD7Mz3fJbRUbBBHFKcAJE6/STYnYt+4j3zupxILvdC1LPyYURs/fphK4qAGY8X4QIwU=@vger.kernel.org X-Gm-Message-State: AOJu0YwZnve9iFXb7YjMN1lmjqiE6h2a5FKl7ul+lWfBkOIEx7uBeO3c hDAZ+jfBvvWYinFtIgYDXycYDn2fgKRI+xRQDuukEtKUv0BW9884vfY8 X-Gm-Gg: AZuq6aIg+QxpeYMLiTHaXT+IopIU8qGXAHkYhSTatVh3vSPWrchJWyxZmBsr5HKYJT4 OAyB4kyMAqW8ajU88ukDT52q715Yy6o07yec9JZ9mAz1nEpVc+moZDfqVBu4gicgEbCn+GZrhYo lPrgyjsLOTz8opnAaQrRa96470Ikbi0aZAzLHMKZbCQhPEv0grRrAL+zjkwGqPnu3m0CcmfMZRN 2fxUmOHFd+MfKqXky5rvWUVO78iDimiWasz9TDenR5IKnSJGo41ciZcmP/b9g1CO+Ppk7X1o+vu XKY+oi0pw/IJ4c0YCR8fgtUcRm6/3g2dE+S1ZB/bKvRkFlaZBhjQjEkfQSLTAxWY2LaZi4SY55A FP/GmQUNgJgCC4+PNEdrGb8sNzyCqZ+JV8aGgToHhOMwv3cWqyngs0+gw9hLJMP0Ixxw/qC/Qib bTHZLDk77rsHFgSCHf0it/dN11gQDPr4BGD9PwPDBu X-Received: by 2002:a05:600c:548d:b0:480:1c53:208b with SMTP id 5b1f17b1804b1-4804c9cf3c0mr47143415e9.36.1769169686399; Fri, 23 Jan 2026 04:01:26 -0800 (PST) Received: from Ansuel-XPS24 (93-34-88-81.ip49.fastwebnet.it. [93.34.88.81]) by smtp.googlemail.com with ESMTPSA id 5b1f17b1804b1-4804d603ac9sm21575135e9.4.2026.01.23.04.01.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Jan 2026 04:01:25 -0800 (PST) From: Christian Marangi To: Christian Marangi , Andrew Lunn , Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [net-next PATCH v2 0/3] net: phy: as21xxx: toggle In Band feature support Date: Fri, 23 Jan 2026 13:00:28 +0100 Message-ID: <20260123120117.10883-1-ansuelsmth@gmail.com> X-Mailer: git-send-email 2.51.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit This is a new variant of the previous submitted patch adding a similar feature. Old Aeonsemi Firmware permitted only to enable or disable In Band support and it couldn't be disabled after (or there wasn't a way to detect the current state of it) As suggested by Russell this was bad Implementation. Some talk with Aeonsemi permitted to release a new firmware with correct implementation. This series adds support for this if new firmware (1.9.1+) is used. On the new firmware, 2 new IPC command are introduced to GET the current state of DPC RA (Rate Adaption) or SET it. (DPC RA is effectively In Band mode) It was verified on the same scenario and can confirm it works as expected. (Airoha AN7581/AN7583 with and without In Band mode) (If PCS is set to In Band and PHY isn't then no connection, so it's easy to verify correct functionality of this) The new firmware is currently submitted to linux-firmware awaiting it to be merged. For old firmware to save on compatibility we still enable In Band by default (this is what the current driver do) This was discovered to be needed in some scenario as is effectively the most compatible featureset. On a BananaPi R4 Pro, one of the 2 AS21xxx PHY is connected to one of the Switch port and such switch supports only In Band when set to USXGMII (assuming the Switch expect an SFP module to be attached where in absence of i2c or MDIO line In Band is always required) Changes v2: - Rework to new firmware version IPC command - Add DBG IPC command - Store FW major/minor version Christian Marangi (3): net: phy: as21xxx: save firmware version major/minor version net: phy: as21xxx: add support for DBG command net: phy: as21xxx: fill in inband caps and better handle inband drivers/net/phy/as21xxx.c | 316 +++++++++++++++++++++++++++++++++----- 1 file changed, 280 insertions(+), 36 deletions(-) -- 2.51.0