Thread (6 messages) flat view 6 messages, 2 authors, 2d ago

Re: [RFC PATCH net-next v2] net: pcs: airoha: add support for Airoha AN7583 SoC

From: Christian Marangi <ansuelsmth@gmail.com>
Date: 2026-09-25 12:18:39
Also in: lkml

On Fri, Sep 25, 2026 at 02:07:52PM +0200, Andrew Lunn wrote:
quoted
+static void an7583_pcs_setup_scu_pcie(struct airoha_pcs_priv *priv,
+				      int index, phy_interface_t interface)
+{
+	u32 xsi_sel;
+
+	if (priv->phy)
+		return;
+
+	switch (interface) {
+	case PHY_INTERFACE_MODE_USXGMII:
+	case PHY_INTERFACE_MODE_10GBASER:
+	default:
+		xsi_sel = AIROHA_SCU_PCIE_XSI1_USXGMII;
+	}
+
+	regmap_update_bits(priv->scu, AIROHA_SCU_SSTR,
+			   AIROHA_SCU_PCIE_XSI1_SEL,
+			   xsi_sel);
I suspect the AI will be here soon. xsi_sel is initially a random
stack value. IF interface is something else, you use that random value
with regmap_update_bits().
Doesn't default address that case? Anyway PCS for PCIe here is quite
special...

It does support 2500BASE-X or 10G/USXGMII, but 2500base-x is handled by the
USB serdes and 10g is handled by the PCIe serdes and this is internally
handled by the SCU reg.

This is modelled by the presence of the PHY in DT.
- no PHY -> 10g
- PHY -> 2500base-x and configuration done by the USB PHY
 
quoted
 static const struct of_device_id airoha_pcs_of_table[] = {
 	{ .compatible = "airoha,an7581-pcs-eth", .data = &an7581_pcs_eth },
 	{ .compatible = "airoha,an7581-pcs-pon", .data = &an7581_pcs_pon },
 	{ .compatible = "airoha,an7581-pcs-pcie", .data = &an7581_pcs_pcie },
 	{ .compatible = "airoha,an7581-pcs-usb", .data = &an7581_pcs_usb },
+	{ .compatible = "airoha,an7583-pcs-eth", .data = &an7583_pcs_eth },
+	{ .compatible = "airoha,an7583-pcs-pon", .data = &an7583_pcs_pon },
+	{ .compatible = "airoha,an7583-pcs-pcie", .data = &an7583_pcs_pcie },
+	{ .compatible = "airoha,an7583-pcs-usb", .data = &an7583_pcs_usb },
Device tree binding update to list these new compatibles?
Yes since the AN7581 is still to be merged, I just posted the driver for
reference for anyone that is currently using AN7583 and the updated schema
will come when it will go out of RFC.
	Andrew
-- 
	Ansuel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help