Serdes #8

Open
opened 2025-11-27 02:58:14 +00:00 by Sirherobrine23 · 7 comments
Owner
  • Only xPON?

xsi@1fa60000 {
compatible = "econet,ecnt-xsi";
reg = <0x1fa60000 0x300>, //hsgmii ae
<0x1fa70000 0x300>, //hsgmii pcie0
<0x1fa71000 0x300>, //hsgmii pcie1
<0x1fa80000 0x300>; //hsgmii usb
};

pon_hsgmii: pon_hsgmii@1fa65000 {
compatible = "econet,ecnt-pon_hsgmii";
reg = <0x1fa65100 0x4a0>, //PCS mode1 range
<0x1fa65a00 0x1ac>, //PCS mode2 range
<0x1fa65e00 0x64>, //AN range
<0x1fa66000 0xdc>; //rate adaption range
interrupts = <GIC_SPI 66 IRQ_TYPE_LEVEL_HIGH>; // pon_hsgmii INT 50+16
};
sgmii_p0: sgmii_p0@1fa72000 {
compatible = "econet,ecnt-sgmii";
reg = <0x1fa72100 0x4a0>, //PCS mode1 range
<0x1fa72a00 0x160>, //PCS mode2 range
<0x1fa72000 0x64>, //AN range
<0x1fa72600 0xdc>, //rate adaption range
<0x1fa72c00 0x3b0>; //phya
interrupts = <GIC_SPI 151 IRQ_TYPE_LEVEL_HIGH>; // pc0_hsgmii INT 135+16
int_name = "sgmii_pcie0";
int_id = <0>;
};
sgmii_p1: sgmii_p1@1fa77000 {
compatible = "econet,ecnt-sgmii";
reg = <0x1fa77100 0x4a0>, //PCS mode1 range
<0x1fa77a00 0x160>, //PCS mode2 range
<0x1fa77000 0x64>, //AN range
<0x1fa77600 0xdc>, //rate adaption range
<0x1fa77c00 0x3b0>; //phya
interrupts = <GIC_SPI 152 IRQ_TYPE_LEVEL_HIGH>; // pc1_hsgmii INT 136+16
int_name = "sgmii_pcie1";
int_id = <1>;
};
sgmii_u0: sgmii_u0@1fa81000 {
compatible = "econet,ecnt-sgmii";
reg = <0x1fa81100 0x4a0>, //PCS mode1 range
<0x1fa81a00 0x160>, //PCS mode2 range
<0x1fa81000 0x64>, //AN range
<0x1fa81600 0xdc>, //rate adaption range
<0x1fa81c00 0x3b0>; //phya
interrupts = <GIC_SPI 153 IRQ_TYPE_LEVEL_HIGH>; // usb_hsgmii INT 137+16
int_name = "sgmii_usb0";
int_id = <2>;
};

- Only xPON? --- - https://sirherobrine23.com.br/tplink_gpl/tplink-xx530v_v1/src/commit/0932f2c9b3e2f753d161f147e60fc59c0866a9ee/sdk/en7529/linux-ecnt/arch/arm/mach-econet/sgmii - https://sirherobrine23.com.br/tplink_gpl/tplink-xx530v_v1/src/commit/0932f2c9b3e2f753d161f147e60fc59c0866a9ee/sdk/en7529/linux-ecnt/arch/arm/mach-econet/ecnt_xsi.c https://sirherobrine23.com.br/tplink_gpl/tplink-xx530v_v1/src/commit/0932f2c9b3e2f753d161f147e60fc59c0866a9ee/sdk/en7529/linux-ecnt/arch/arm/boot/dts/en7523.dts#L298-L304 https://sirherobrine23.com.br/tplink_gpl/tplink-xx530v_v1/src/commit/0932f2c9b3e2f753d161f147e60fc59c0866a9ee/sdk/en7529/linux-ecnt/arch/arm/boot/dts/en7523.dts#L433-L473
Sirherobrine23 added the
Status
Need More Info
2
Priority
Low
4
labels 2025-11-27 02:58:14 +00:00
Sirherobrine23 added this to the (deleted) project 2025-11-27 02:58:14 +00:00
Sirherobrine23 added a new dependency 2025-11-27 02:58:29 +00:00
Author
Owner

I found these values ​​for the en7523 on dts, value to multi_sgmii, xfi_ana, xfi_pma i not found in dts or not "compatible" with en7523, now search in sdk code if exists

	pon_pcs: pcs@1fa08000 {
		compatible = "airoha,en7523-pcs-pon";
		reg = <0x1fa60000 0x300>,
					<0x1fa65e00 0x64>,
					<0x1fa65a00 0x1ac>,
					<0x1fa65100 0x4a0>,
					<0x1fa66000 0xdc>,;
		reg-names = "xfi_mac",
								"hsgmii_an",
								"hsgmii_pcs",
								"usxgmii",
								"hsgmii_rate_adp";

		resets = <&scu EN7523_XPON_MAC_RST>,
						 <&scu EN7523_XPON_PHY_RST>;
		reset-names = "mac", "phy";

		airoha,scu = <&scu>;
	};

	eth_pcs: pcs@1fa09000 {
		compatible = "airoha,en7523-pcs-eth";
		reg = <0x1fa80000 0x300>,
					<0x1fa81000 0x64>,
					<0x1fa81a00 0x160>,
					<0x1fa81100 0x338>,
					<0x1fa81600 0xdc>,
					<0x1fa81c00 0x3b0>;
		reg-names = "xfi_mac",
								"hsgmii_an",
								"hsgmii_pcs",
								"usxgmii",
								"hsgmii_rate_adp",
								"hsgmii_phya";

		resets = <&scu EN7523_XSI_MAC_RST>,
						 <&scu EN7523_XSI_PHY_RST>;
		reset-names = "mac", "phy";

		airoha,scu = <&scu>;
	};
I found these values ​​for the en7523 on dts, value to `multi_sgmii`, `xfi_ana`, `xfi_pma` i not found in dts or not "compatible" with en7523, now search in sdk code if exists ```dts pon_pcs: pcs@1fa08000 { compatible = "airoha,en7523-pcs-pon"; reg = <0x1fa60000 0x300>, <0x1fa65e00 0x64>, <0x1fa65a00 0x1ac>, <0x1fa65100 0x4a0>, <0x1fa66000 0xdc>,; reg-names = "xfi_mac", "hsgmii_an", "hsgmii_pcs", "usxgmii", "hsgmii_rate_adp"; resets = <&scu EN7523_XPON_MAC_RST>, <&scu EN7523_XPON_PHY_RST>; reset-names = "mac", "phy"; airoha,scu = <&scu>; }; eth_pcs: pcs@1fa09000 { compatible = "airoha,en7523-pcs-eth"; reg = <0x1fa80000 0x300>, <0x1fa81000 0x64>, <0x1fa81a00 0x160>, <0x1fa81100 0x338>, <0x1fa81600 0xdc>, <0x1fa81c00 0x3b0>; reg-names = "xfi_mac", "hsgmii_an", "hsgmii_pcs", "usxgmii", "hsgmii_rate_adp", "hsgmii_phya"; resets = <&scu EN7523_XSI_MAC_RST>, <&scu EN7523_XSI_PHY_RST>; reset-names = "mac", "phy"; airoha,scu = <&scu>; }; ```
Owner

For the record the serdes needs to toggle some muxes to work.

For the record the serdes needs to toggle some muxes to work.
Owner

And the pon serdes is different compared to the other 3 serdes instances (usb-serdes, wifi1-serdes and wifi2-serdes).

And the pon serdes is different compared to the other 3 serdes instances (usb-serdes, wifi1-serdes and wifi2-serdes).
Owner

These are the XSI MACs, no real driver needed. But during development it can be used for checking rx and tx counters.

	reg = <0x1fa60000 0x300>,	  //hsgmii ae
	      <0x1fa70000 0x300>,   //hsgmii pcie0
	      <0x1fa71000 0x300>,	  //hsgmii pcie1
	      <0x1fa80000 0x300>;	  //hsgmii usb
These are the XSI MACs, no real driver needed. But during development it can be used for checking rx and tx counters. reg = <0x1fa60000 0x300>, //hsgmii ae <0x1fa70000 0x300>, //hsgmii pcie0 <0x1fa71000 0x300>, //hsgmii pcie1 <0x1fa80000 0x300>; //hsgmii usb
Owner

sgmii_p0 and sgmii_p1 and sgmii_pu are the serdes instances. The board I have is using sgmii_pu together with a phy.

sgmii_p0 and sgmii_p1 and sgmii_pu are the serdes instances. The board I have is using sgmii_pu together with a phy.
Author
Owner

I'm going to update this driver so I can test it, I'm going to migrate some things to the kernel so I can test it, I recently rewrote it to use regmap and now I'm going to update some things

01cd397c91/sgmii

I'm going to update this driver so I can test it, I'm going to migrate some things to the kernel so I can test it, I recently rewrote it to use regmap and now I'm going to update some things https://sirherobrine23.com.br/airoha_en7523/sgmii_patched/src/commit/01cd397c911a6bd7128374eed2afce90b087a7db/sgmii
Owner

I think the dts should be reordered like this:

eth_pcs: pcs@1fa09000 {
	compatible = "airoha,en7523-pcs-sgmii", "airoha,en7523-pcs-eth";
	reg =	<0x1fa81000 0x64>,
				<0x1fa81100 0x338>,
				<0x1fa81600 0xdc>,
				<0x1fa81a00 0x160>,
				<0x1fa81c00 0x3b0>;
	reg-names = "hsgmii_an",
		    "hsgmii_phya";
		    "hsgmii_rate_adp", 
		    "hsgmii_pcs",
		    "hsgmii_qphy_csr",

	resets = <&scu EN7523_XSI_PHY_RST>;
	reset-names = "phy";

	interrupts = <GIC_SPI 153 IRQ_TYPE_LEVEL_HIGH>;	// usb_hsgmii INT 137+16

	airoha,scu = <&scu>;
};
I think the dts should be reordered like this: eth_pcs: pcs@1fa09000 { compatible = "airoha,en7523-pcs-sgmii", "airoha,en7523-pcs-eth"; reg = <0x1fa81000 0x64>, <0x1fa81100 0x338>, <0x1fa81600 0xdc>, <0x1fa81a00 0x160>, <0x1fa81c00 0x3b0>; reg-names = "hsgmii_an", "hsgmii_phya"; "hsgmii_rate_adp", "hsgmii_pcs", "hsgmii_qphy_csr", resets = <&scu EN7523_XSI_PHY_RST>; reset-names = "phy"; interrupts = <GIC_SPI 153 IRQ_TYPE_LEVEL_HIGH>; // usb_hsgmii INT 137+16 airoha,scu = <&scu>; };
Sirherobrine23 added this to the Ethernet milestone 2025-12-08 17:48:26 +00:00
Sign in to join this conversation.
2 Participants
Notifications
Due Date
No due date set.
Blocks Depends on
#2 Ethernet
airoha_en7523/kernel
Reference: airoha_en7523/kernel#8