realtek: add internal and external SDS/PHYs of RTL9300 devices
[openwrt/openwrt.git] / target / linux / realtek / files-5.4 / drivers / net / phy / rtl83xx-phy.h
index 7af35a358314cdcf81f2227048e6aeceb858f5c8..031ec8a0e91c2c71851656ffdc697b402115c36d 100644 (file)
@@ -28,13 +28,33 @@ struct __attribute__ ((__packed__)) fw_header {
 #define PHY_ID_RTL8214C                0x001cc942
 #define PHY_ID_RTL8214FC       0x001cc981
 #define PHY_ID_RTL8218B_E      0x001cc981
+#define PHY_ID_RTL8218D                0x001cc983
 #define PHY_ID_RTL8218B_I      0x001cca40
+#define PHY_ID_RTL8226         0x001cc838
 #define PHY_ID_RTL8390_GENERIC 0x001ccab0
 #define PHY_ID_RTL8393_I       0x001c8393
+#define PHY_ID_RTL9300_I       0x70d03106
 
-#define RTL839X_SDS12_13_XSG0                  (0xB800)
+// PHY MMD devices
+#define MMD_AN         7
+#define MMD_VEND2      31
 
+/* Registers of the internal Serdes of the 8380 */
 #define RTL838X_SDS_MODE_SEL                   (0x0028)
 #define RTL838X_SDS_CFG_REG                    (0x0034)
 #define RTL838X_INT_MODE_CTRL                  (0x005c)
 #define RTL838X_DMY_REG31                      (0x3b28)
+
+#define RTL8380_SDS4_FIB_REG0                  (0xF800)
+#define RTL838X_SDS4_REG28                     (0xef80)
+#define RTL838X_SDS4_DUMMY0                    (0xef8c)
+#define RTL838X_SDS5_EXT_REG6                  (0xf18c)
+#define RTL838X_SDS4_FIB_REG0                  (RTL838X_SDS4_REG28 + 0x880)
+#define RTL838X_SDS5_FIB_REG0                  (RTL838X_SDS4_REG28 + 0x980)
+
+/* Registers of the internal SerDes of the RTL8390 */
+#define RTL839X_SDS12_13_XSG0                  (0xB800)
+
+/* Registers of the internal Serdes of the 9300 */
+#define RTL930X_SDS_INDACS_CMD                 (0x03B0)
+#define RTL930X_SDS_INDACS_DATA                        (0x03B4)