Просмотр исходного кода

generic: import rtl8261n patches from mediatek

RTL8261N is used on some Airoha and Realtek devices. Move the driver
from Mediatek to generic so it can be used everywhere.

Signed-off-by: Andrew LaMarche <[email protected]>
Link: https://github.com/openwrt/openwrt/pull/18163
Signed-off-by: Hauke Mehrtens <[email protected]>
Andrew LaMarche 9 месяцев назад
Родитель
Сommit
054b870196
26 измененных файлов с 13 добавлено и 15 удалено
  1. 1 0
      target/linux/generic/config-6.6
  2. 0 0
      target/linux/generic/files/drivers/net/phy/rtl8261n/Kconfig
  3. 0 0
      target/linux/generic/files/drivers/net/phy/rtl8261n/Makefile
  4. 0 0
      target/linux/generic/files/drivers/net/phy/rtl8261n/construct/conf_rtl8261n_c.c
  5. 0 0
      target/linux/generic/files/drivers/net/phy/rtl8261n/construct/conf_rtl8264b.c
  6. 0 0
      target/linux/generic/files/drivers/net/phy/rtl8261n/error.h
  7. 0 0
      target/linux/generic/files/drivers/net/phy/rtl8261n/phy_patch.c
  8. 0 0
      target/linux/generic/files/drivers/net/phy/rtl8261n/phy_patch.h
  9. 0 0
      target/linux/generic/files/drivers/net/phy/rtl8261n/phy_rtl826xb_patch.c
  10. 0 0
      target/linux/generic/files/drivers/net/phy/rtl8261n/phy_rtl826xb_patch.h
  11. 0 0
      target/linux/generic/files/drivers/net/phy/rtl8261n/rtk_osal.c
  12. 0 0
      target/linux/generic/files/drivers/net/phy/rtl8261n/rtk_osal.h
  13. 0 0
      target/linux/generic/files/drivers/net/phy/rtl8261n/rtk_phy.c
  14. 0 0
      target/linux/generic/files/drivers/net/phy/rtl8261n/rtk_phylib.c
  15. 0 0
      target/linux/generic/files/drivers/net/phy/rtl8261n/rtk_phylib.h
  16. 0 0
      target/linux/generic/files/drivers/net/phy/rtl8261n/rtk_phylib_def.h
  17. 0 0
      target/linux/generic/files/drivers/net/phy/rtl8261n/rtk_phylib_rtl826xb.c
  18. 0 0
      target/linux/generic/files/drivers/net/phy/rtl8261n/rtk_phylib_rtl826xb.h
  19. 0 0
      target/linux/generic/files/drivers/net/phy/rtl8261n/type.h
  20. 2 2
      target/linux/generic/hack-6.6/735-net-phy-realtek-rtl8261n.patch
  21. 0 1
      target/linux/mediatek/mt7622/config-6.6
  22. 0 1
      target/linux/mediatek/mt7623/config-6.6
  23. 0 1
      target/linux/mediatek/mt7629/config-6.6
  24. 3 3
      target/linux/mediatek/patches-6.6/500-gsw-rtl8367s-mt7622-support.patch
  25. 5 5
      target/linux/realtek/patches-6.6/720-add-rtl-phy.patch
  26. 2 2
      target/linux/siflower/patches-6.6/019-net-phy-add-support-for-Siflower-SF23P1211-SF23P1240.patch

+ 1 - 0
target/linux/generic/config-6.6

@@ -5147,6 +5147,7 @@ CONFIG_RTC_SYSTOHC_DEVICE="rtc0"
 # CONFIG_RTL8187 is not set
 # CONFIG_RTL8192E is not set
 # CONFIG_RTL8192U is not set
+# CONFIG_RTL8261N_PHY is not set
 # CONFIG_RTL8306_PHY is not set
 # CONFIG_RTL8366RB_PHY is not set
 # CONFIG_RTL8366S_PHY is not set

+ 0 - 0
target/linux/mediatek/files-6.6/drivers/net/phy/rtl8261n/Kconfig → target/linux/generic/files/drivers/net/phy/rtl8261n/Kconfig


+ 0 - 0
target/linux/mediatek/files-6.6/drivers/net/phy/rtl8261n/Makefile → target/linux/generic/files/drivers/net/phy/rtl8261n/Makefile


+ 0 - 0
target/linux/mediatek/files-6.6/drivers/net/phy/rtl8261n/construct/conf_rtl8261n_c.c → target/linux/generic/files/drivers/net/phy/rtl8261n/construct/conf_rtl8261n_c.c


+ 0 - 0
target/linux/mediatek/files-6.6/drivers/net/phy/rtl8261n/construct/conf_rtl8264b.c → target/linux/generic/files/drivers/net/phy/rtl8261n/construct/conf_rtl8264b.c


+ 0 - 0
target/linux/mediatek/files-6.6/drivers/net/phy/rtl8261n/error.h → target/linux/generic/files/drivers/net/phy/rtl8261n/error.h


+ 0 - 0
target/linux/mediatek/files-6.6/drivers/net/phy/rtl8261n/phy_patch.c → target/linux/generic/files/drivers/net/phy/rtl8261n/phy_patch.c


+ 0 - 0
target/linux/mediatek/files-6.6/drivers/net/phy/rtl8261n/phy_patch.h → target/linux/generic/files/drivers/net/phy/rtl8261n/phy_patch.h


+ 0 - 0
target/linux/mediatek/files-6.6/drivers/net/phy/rtl8261n/phy_rtl826xb_patch.c → target/linux/generic/files/drivers/net/phy/rtl8261n/phy_rtl826xb_patch.c


+ 0 - 0
target/linux/mediatek/files-6.6/drivers/net/phy/rtl8261n/phy_rtl826xb_patch.h → target/linux/generic/files/drivers/net/phy/rtl8261n/phy_rtl826xb_patch.h


+ 0 - 0
target/linux/mediatek/files-6.6/drivers/net/phy/rtl8261n/rtk_osal.c → target/linux/generic/files/drivers/net/phy/rtl8261n/rtk_osal.c


+ 0 - 0
target/linux/mediatek/files-6.6/drivers/net/phy/rtl8261n/rtk_osal.h → target/linux/generic/files/drivers/net/phy/rtl8261n/rtk_osal.h


+ 0 - 0
target/linux/mediatek/files-6.6/drivers/net/phy/rtl8261n/rtk_phy.c → target/linux/generic/files/drivers/net/phy/rtl8261n/rtk_phy.c


+ 0 - 0
target/linux/mediatek/files-6.6/drivers/net/phy/rtl8261n/rtk_phylib.c → target/linux/generic/files/drivers/net/phy/rtl8261n/rtk_phylib.c


+ 0 - 0
target/linux/mediatek/files-6.6/drivers/net/phy/rtl8261n/rtk_phylib.h → target/linux/generic/files/drivers/net/phy/rtl8261n/rtk_phylib.h


+ 0 - 0
target/linux/mediatek/files-6.6/drivers/net/phy/rtl8261n/rtk_phylib_def.h → target/linux/generic/files/drivers/net/phy/rtl8261n/rtk_phylib_def.h


+ 0 - 0
target/linux/mediatek/files-6.6/drivers/net/phy/rtl8261n/rtk_phylib_rtl826xb.c → target/linux/generic/files/drivers/net/phy/rtl8261n/rtk_phylib_rtl826xb.c


+ 0 - 0
target/linux/mediatek/files-6.6/drivers/net/phy/rtl8261n/rtk_phylib_rtl826xb.h → target/linux/generic/files/drivers/net/phy/rtl8261n/rtk_phylib_rtl826xb.h


+ 0 - 0
target/linux/mediatek/files-6.6/drivers/net/phy/rtl8261n/type.h → target/linux/generic/files/drivers/net/phy/rtl8261n/type.h


+ 2 - 2
target/linux/mediatek/patches-6.6/735-net-phy-realtek-rtl8261n.patch → target/linux/generic/hack-6.6/735-net-phy-realtek-rtl8261n.patch

@@ -1,6 +1,6 @@
 --- a/drivers/net/phy/Kconfig
 +++ b/drivers/net/phy/Kconfig
-@@ -396,6 +396,8 @@ config QSEMI_PHY
+@@ -406,6 +406,8 @@ config QSEMI_PHY
  
  source "drivers/net/phy/realtek/Kconfig"
  
@@ -18,4 +18,4 @@
 +obj-y				+= rtl8261n/
  obj-$(CONFIG_RENESAS_PHY)	+= uPD60620.o
  obj-$(CONFIG_ROCKCHIP_PHY)	+= rockchip.o
- obj-$(CONFIG_RTL8367S_GSW)	+= rtk/
+ obj-$(CONFIG_SMSC_PHY)		+= smsc.o

+ 0 - 1
target/linux/mediatek/mt7622/config-6.6

@@ -423,7 +423,6 @@ CONFIG_RPS=y
 CONFIG_RTC_CLASS=y
 CONFIG_RTC_DRV_MT7622=y
 CONFIG_RTC_I2C_AND_SPI=y
-# CONFIG_RTL8261N_PHY is not set
 CONFIG_RTL8367S_GSW=y
 CONFIG_RWSEM_SPIN_ON_OWNER=y
 CONFIG_SCHED_MC=y

+ 0 - 1
target/linux/mediatek/mt7623/config-6.6

@@ -528,7 +528,6 @@ CONFIG_RTC_CLASS=y
 # CONFIG_RTC_DRV_MT7622 is not set
 CONFIG_RTC_I2C_AND_SPI=y
 CONFIG_RTC_MC146818_LIB=y
-# CONFIG_RTL8261N_PHY is not set
 # CONFIG_RTL8367S_GSW is not set
 CONFIG_RWSEM_SPIN_ON_OWNER=y
 # CONFIG_SERIAL_8250_DMA is not set

+ 0 - 1
target/linux/mediatek/mt7629/config-6.6

@@ -299,7 +299,6 @@ CONFIG_REGMAP_MMIO=y
 CONFIG_RESET_CONTROLLER=y
 CONFIG_RFS_ACCEL=y
 CONFIG_RPS=y
-# CONFIG_RTL8261N_PHY is not set
 # CONFIG_RTL8367S_GSW is not set
 CONFIG_RWSEM_SPIN_ON_OWNER=y
 CONFIG_SCSI=y

+ 3 - 3
target/linux/mediatek/patches-6.6/500-gsw-rtl8367s-mt7622-support.patch

@@ -1,6 +1,6 @@
 --- a/drivers/net/phy/Kconfig
 +++ b/drivers/net/phy/Kconfig
-@@ -416,6 +416,12 @@ config ROCKCHIP_PHY
+@@ -418,6 +418,12 @@ config ROCKCHIP_PHY
  	help
  	  Currently supports the integrated Ethernet PHY.
  
@@ -15,8 +15,8 @@
  	select CRC16
 --- a/drivers/net/phy/Makefile
 +++ b/drivers/net/phy/Makefile
-@@ -102,6 +102,7 @@ obj-$(CONFIG_QSEMI_PHY)		+= qsemi.o
- obj-$(CONFIG_REALTEK_PHY)	+= realtek/
+@@ -103,6 +103,7 @@ obj-$(CONFIG_REALTEK_PHY)	+= realtek/
+ obj-y				+= rtl8261n/
  obj-$(CONFIG_RENESAS_PHY)	+= uPD60620.o
  obj-$(CONFIG_ROCKCHIP_PHY)	+= rockchip.o
 +obj-$(CONFIG_RTL8367S_GSW)	+= rtk/

+ 5 - 5
target/linux/realtek/patches-6.6/720-add-rtl-phy.patch

@@ -14,9 +14,9 @@ Submitted-by: Birger Koblitz <[email protected]>
 
 --- a/drivers/net/phy/Kconfig
 +++ b/drivers/net/phy/Kconfig
-@@ -407,6 +407,12 @@ config QSEMI_PHY
+@@ -409,6 +409,12 @@ source "drivers/net/phy/realtek/Kconfig"
  
- source "drivers/net/phy/realtek/Kconfig"
+ source "drivers/net/phy/rtl8261n/Kconfig"
  
 +config REALTEK_SOC_PHY
 +	tristate "Realtek SoC PHYs"
@@ -29,11 +29,11 @@ Submitted-by: Birger Koblitz <[email protected]>
  	help
 --- a/drivers/net/phy/Makefile
 +++ b/drivers/net/phy/Makefile
-@@ -100,6 +100,7 @@ obj-$(CONFIG_NXP_TJA11XX_PHY)	+= nxp-tja
- obj-y				+= qcom/
+@@ -101,6 +101,7 @@ obj-y				+= qcom/
  obj-$(CONFIG_QSEMI_PHY)		+= qsemi.o
  obj-$(CONFIG_REALTEK_PHY)	+= realtek/
-+obj-$(CONFIG_REALTEK_SOC_PHY)   += rtl83xx-phy.o
+ obj-y				+= rtl8261n/
++obj-$(CONFIG_REALTEK_SOC_PHY)	+= rtl83xx-phy.o
  obj-$(CONFIG_RENESAS_PHY)	+= uPD60620.o
  obj-$(CONFIG_ROCKCHIP_PHY)	+= rockchip.o
  obj-$(CONFIG_SMSC_PHY)		+= smsc.o

+ 2 - 2
target/linux/siflower/patches-6.6/019-net-phy-add-support-for-Siflower-SF23P1211-SF23P1240.patch

@@ -11,7 +11,7 @@ Signed-off-by: haoming.chen <[email protected]>
 
 --- a/drivers/net/phy/Kconfig
 +++ b/drivers/net/phy/Kconfig
-@@ -482,3 +482,8 @@ endif # PHYLIB
+@@ -484,3 +484,8 @@ endif # PHYLIB
  config MICREL_KS8995MA
  	tristate "Micrel KS8995MA 5-ports 10/100 managed Ethernet switch"
  	depends on SPI
@@ -22,7 +22,7 @@ Signed-off-by: haoming.chen <[email protected]>
 +	  Currently supports the SF1211F, SF1240 gigabit PHY.
 --- a/drivers/net/phy/Makefile
 +++ b/drivers/net/phy/Makefile
-@@ -107,3 +107,4 @@ obj-$(CONFIG_STE10XP)		+= ste10Xp.o
+@@ -108,3 +108,4 @@ obj-$(CONFIG_STE10XP)		+= ste10Xp.o
  obj-$(CONFIG_TERANETICS_PHY)	+= teranetics.o
  obj-$(CONFIG_VITESSE_PHY)	+= vitesse.o
  obj-$(CONFIG_XILINX_GMII2RGMII) += xilinx_gmii2rgmii.o