From 2ff450edd46cc91539fc5992deccebc89569e8f2 Mon Sep 17 00:00:00 2001 From: logicog Date: Sat, 11 Oct 2025 11:29:28 +0200 Subject: [PATCH] Add generic PHY definitions file for C45 PHYs --- phy.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 phy.h diff --git a/phy.h b/phy.h new file mode 100644 index 0000000..3918415 --- /dev/null +++ b/phy.h @@ -0,0 +1,26 @@ +#ifndef _PHY_H_ +#define _PHY_H_ + +/* + * The RTL8272/RTL8273 appear to comprise an RTL8224 PHY + * which in turn is a 4x RTL8221B PHY + * These phys are all Clause 45 + * The defines below are taken from the RTL8221B datasheet + */ + +/* + * Define PHY pages + */ +#define PHY_MMD_AN 7 +#define PHY_MMD_CTRL 31 + + +/* + * Define registers in Auto-Negotiation page + */ +#define PHY_ANEG_CTRL 0x00 +#define PHY_EEE_ADV 0x3c +#define PHY_EEE_ABILITY 0x3d +#define PHY_EEE_ADV2 0x3e + +#endif