Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
commit
6929d12202
@ -1,2 +1,2 @@
|
||||
LINUX_VERSION-5.10 = .177
|
||||
LINUX_KERNEL_HASH-5.10.177 = 9f2261fea804112dcec8fa2dcc26e9c1388aa9cb7f86e5913beb00b9b5a15571
|
||||
LINUX_VERSION-5.10 = .178
|
||||
LINUX_KERNEL_HASH-5.10.178 = 1acfade3715e560f00fb30615d5471e24b3940b549381558787aee9734e7a8af
|
||||
|
||||
@ -42,6 +42,9 @@ xiaomi,redmi-router-ax6000-stock)
|
||||
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x20000"
|
||||
ubootenv_add_uci_sys_config "/dev/mtd2" "0x0" "0x10000" "0x20000"
|
||||
;;
|
||||
tplink,tl-xdr4288|\
|
||||
tplink,tl-xdr6086|\
|
||||
tplink,tl-xdr6088|\
|
||||
xiaomi,redmi-router-ax6000-ubootmod)
|
||||
. /lib/upgrade/nand.sh
|
||||
local envubi=$(nand_find_ubi ubi)
|
||||
|
||||
@ -237,6 +237,42 @@ define U-Boot/mt7986_bananapi_bpi-r3-nor
|
||||
FIP_COMPRESS:=1
|
||||
endef
|
||||
|
||||
define U-Boot/mt7986_tplink_tl-xdr4288
|
||||
NAME:=TP-LINK TL-XDR4288
|
||||
BUILD_SUBTARGET:=filogic
|
||||
BUILD_DEVICES:=tplink_tl-xdr4288
|
||||
UBOOT_CONFIG:=mt7986_tplink_tl-xdr4288
|
||||
UBOOT_IMAGE:=u-boot.fip
|
||||
BL2_BOOTDEV:=spim-nand
|
||||
BL2_SOC:=mt7986
|
||||
BL2_DDRTYPE:=ddr3
|
||||
DEPENDS:=+trusted-firmware-a-mt7986-spim-nand-ddr3
|
||||
endef
|
||||
|
||||
define U-Boot/mt7986_tplink_tl-xdr6086
|
||||
NAME:=TP-LINK TL-XDR6086
|
||||
BUILD_SUBTARGET:=filogic
|
||||
BUILD_DEVICES:=tplink_tl-xdr6086
|
||||
UBOOT_CONFIG:=mt7986_tplink_tl-xdr6086
|
||||
UBOOT_IMAGE:=u-boot.fip
|
||||
BL2_BOOTDEV:=spim-nand
|
||||
BL2_SOC:=mt7986
|
||||
BL2_DDRTYPE:=ddr3
|
||||
DEPENDS:=+trusted-firmware-a-mt7986-spim-nand-ddr3
|
||||
endef
|
||||
|
||||
define U-Boot/mt7986_tplink_tl-xdr6088
|
||||
NAME:=TP-LINK TL-XDR6088
|
||||
BUILD_SUBTARGET:=filogic
|
||||
BUILD_DEVICES:=tplink_tl-xdr6088
|
||||
UBOOT_CONFIG:=mt7986_tplink_tl-xdr6088
|
||||
UBOOT_IMAGE:=u-boot.fip
|
||||
BL2_BOOTDEV:=spim-nand
|
||||
BL2_SOC:=mt7986
|
||||
BL2_DDRTYPE:=ddr3
|
||||
DEPENDS:=+trusted-firmware-a-mt7986-spim-nand-ddr3
|
||||
endef
|
||||
|
||||
define U-Boot/mt7986_xiaomi_redmi-router-ax6000
|
||||
NAME:=Xiaomi Redmi AX6000
|
||||
BUILD_SUBTARGET:=filogic
|
||||
@ -269,6 +305,9 @@ UBOOT_TARGETS := \
|
||||
mt7986_bananapi_bpi-r3-sdmmc \
|
||||
mt7986_bananapi_bpi-r3-snand \
|
||||
mt7986_bananapi_bpi-r3-nor \
|
||||
mt7986_tplink_tl-xdr4288 \
|
||||
mt7986_tplink_tl-xdr6086 \
|
||||
mt7986_tplink_tl-xdr6088 \
|
||||
mt7986_xiaomi_redmi-router-ax6000 \
|
||||
mt7986_rfb
|
||||
|
||||
|
||||
929
package/boot/uboot-mediatek/patches/432-add-tplink-xdr608x.patch
Normal file
929
package/boot/uboot-mediatek/patches/432-add-tplink-xdr608x.patch
Normal file
@ -0,0 +1,929 @@
|
||||
--- /dev/null
|
||||
+++ b/configs/mt7986_tplink_tl-xdr4288_defconfig
|
||||
@@ -0,0 +1,182 @@
|
||||
+CONFIG_ARM=y
|
||||
+CONFIG_POSITION_INDEPENDENT=y
|
||||
+CONFIG_ARCH_MEDIATEK=y
|
||||
+CONFIG_TARGET_MT7986=y
|
||||
+CONFIG_TEXT_BASE=0x41e00000
|
||||
+CONFIG_SYS_MALLOC_F_LEN=0x4000
|
||||
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
|
||||
+CONFIG_NR_DRAM_BANKS=1
|
||||
+CONFIG_DEFAULT_DEVICE_TREE="mt7986a-tplink-tl-xdr608x"
|
||||
+CONFIG_DEFAULT_ENV_FILE="tplink_tl-xdr4288_env"
|
||||
+CONFIG_DEFAULT_FDT_FILE="mediatek/mt7986a-tplink-tl-xdr608x.dtb"
|
||||
+CONFIG_OF_LIBFDT_OVERLAY=y
|
||||
+CONFIG_DEBUG_UART_BASE=0x11002000
|
||||
+CONFIG_DEBUG_UART_CLOCK=40000000
|
||||
+CONFIG_DEBUG_UART=y
|
||||
+CONFIG_SYS_LOAD_ADDR=0x46000000
|
||||
+CONFIG_SMBIOS_PRODUCT_NAME=""
|
||||
+CONFIG_AUTOBOOT_KEYED=y
|
||||
+CONFIG_BOOTDELAY=30
|
||||
+CONFIG_AUTOBOOT_MENU_SHOW=y
|
||||
+CONFIG_CFB_CONSOLE_ANSI=y
|
||||
+CONFIG_BOARD_LATE_INIT=y
|
||||
+CONFIG_BUTTON=y
|
||||
+CONFIG_BUTTON_GPIO=y
|
||||
+CONFIG_GPIO_HOG=y
|
||||
+CONFIG_CMD_ENV_FLAGS=y
|
||||
+CONFIG_FIT=y
|
||||
+CONFIG_FIT_ENABLE_SHA256_SUPPORT=y
|
||||
+CONFIG_LED=y
|
||||
+CONFIG_LED_BLINK=y
|
||||
+CONFIG_LED_GPIO=y
|
||||
+CONFIG_LOGLEVEL=7
|
||||
+CONFIG_LOG=y
|
||||
+CONFIG_SYS_PROMPT="MT7986> "
|
||||
+CONFIG_CMD_BOOTMENU=y
|
||||
+CONFIG_CMD_BOOTP=y
|
||||
+CONFIG_CMD_BUTTON=y
|
||||
+CONFIG_CMD_CACHE=y
|
||||
+CONFIG_CMD_CDP=y
|
||||
+CONFIG_CMD_CPU=y
|
||||
+CONFIG_CMD_DHCP=y
|
||||
+CONFIG_CMD_DM=y
|
||||
+CONFIG_CMD_DNS=y
|
||||
+CONFIG_CMD_ECHO=y
|
||||
+CONFIG_CMD_ENV_READMEM=y
|
||||
+CONFIG_CMD_ERASEENV=y
|
||||
+CONFIG_CMD_EXT4=y
|
||||
+CONFIG_CMD_FAT=y
|
||||
+CONFIG_CMD_FDT=y
|
||||
+CONFIG_CMD_FS_GENERIC=y
|
||||
+CONFIG_CMD_FS_UUID=y
|
||||
+CONFIG_CMD_GPIO=y
|
||||
+CONFIG_CMD_GPT=y
|
||||
+CONFIG_CMD_HASH=y
|
||||
+CONFIG_CMD_ITEST=y
|
||||
+CONFIG_CMD_LED=y
|
||||
+CONFIG_CMD_LICENSE=y
|
||||
+CONFIG_CMD_LINK_LOCAL=y
|
||||
+# CONFIG_CMD_MBR is not set
|
||||
+CONFIG_CMD_PCI=y
|
||||
+CONFIG_CMD_PSTORE=y
|
||||
+CONFIG_CMD_PSTORE_MEM_ADDR=0x42ff0000
|
||||
+CONFIG_CMD_SF_TEST=y
|
||||
+CONFIG_CMD_PING=y
|
||||
+CONFIG_CMD_PXE=y
|
||||
+CONFIG_CMD_PWM=y
|
||||
+CONFIG_CMD_SMC=y
|
||||
+CONFIG_CMD_TFTPBOOT=y
|
||||
+CONFIG_CMD_TFTPSRV=y
|
||||
+CONFIG_CMD_UBI=y
|
||||
+CONFIG_CMD_UBI_RENAME=y
|
||||
+CONFIG_CMD_UBIFS=y
|
||||
+CONFIG_CMD_ASKENV=y
|
||||
+CONFIG_CMD_PART=y
|
||||
+CONFIG_CMD_RARP=y
|
||||
+CONFIG_CMD_SETEXPR=y
|
||||
+CONFIG_CMD_SLEEP=y
|
||||
+CONFIG_CMD_SNTP=y
|
||||
+CONFIG_CMD_SOURCE=y
|
||||
+CONFIG_CMD_STRINGS=y
|
||||
+CONFIG_CMD_USB=y
|
||||
+CONFIG_CMD_UUID=y
|
||||
+CONFIG_DISPLAY_CPUINFO=y
|
||||
+CONFIG_DM_MTD=y
|
||||
+CONFIG_DM_REGULATOR=y
|
||||
+CONFIG_DM_REGULATOR_FIXED=y
|
||||
+CONFIG_DM_REGULATOR_GPIO=y
|
||||
+CONFIG_DM_USB=y
|
||||
+CONFIG_DM_PWM=y
|
||||
+CONFIG_PWM_MTK=y
|
||||
+CONFIG_HUSH_PARSER=y
|
||||
+CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
|
||||
+CONFIG_SYS_RELOC_GD_ENV_ADDR=y
|
||||
+CONFIG_VERSION_VARIABLE=y
|
||||
+CONFIG_PARTITION_UUIDS=y
|
||||
+CONFIG_NETCONSOLE=y
|
||||
+CONFIG_REGMAP=y
|
||||
+CONFIG_SYSCON=y
|
||||
+CONFIG_CLK=y
|
||||
+CONFIG_DM_GPIO=y
|
||||
+CONFIG_DM_SCSI=y
|
||||
+CONFIG_AHCI=y
|
||||
+CONFIG_AHCI_PCI=y
|
||||
+CONFIG_SCSI_AHCI=y
|
||||
+CONFIG_SCSI=y
|
||||
+CONFIG_CMD_SCSI=y
|
||||
+CONFIG_PHY=y
|
||||
+CONFIG_PHY_MTK_TPHY=y
|
||||
+CONFIG_PHY_FIXED=y
|
||||
+CONFIG_MTK_AHCI=y
|
||||
+CONFIG_DM_ETH=y
|
||||
+CONFIG_MEDIATEK_ETH=y
|
||||
+CONFIG_PCI=y
|
||||
+# CONFIG_MMC is not set
|
||||
+# CONFIG_DM_MMC is not set
|
||||
+CONFIG_MTD=y
|
||||
+CONFIG_MTD_UBI_FASTMAP=y
|
||||
+CONFIG_DM_PCI=y
|
||||
+CONFIG_PCIE_MEDIATEK=y
|
||||
+CONFIG_PINCTRL=y
|
||||
+CONFIG_PINCONF=y
|
||||
+CONFIG_PINCTRL_MT7622=y
|
||||
+CONFIG_POWER_DOMAIN=y
|
||||
+CONFIG_PRE_CONSOLE_BUFFER=y
|
||||
+CONFIG_PRE_CON_BUF_ADDR=0x4007EF00
|
||||
+CONFIG_MTK_POWER_DOMAIN=y
|
||||
+CONFIG_RAM=y
|
||||
+CONFIG_DM_SERIAL=y
|
||||
+CONFIG_MTK_SERIAL=y
|
||||
+CONFIG_SPI=y
|
||||
+CONFIG_DM_SPI=y
|
||||
+CONFIG_MTK_SPI_NAND=y
|
||||
+CONFIG_MTK_SPI_NAND_MTD=y
|
||||
+CONFIG_SYSRESET_WATCHDOG=y
|
||||
+CONFIG_WDT_MTK=y
|
||||
+CONFIG_LZO=y
|
||||
+CONFIG_ZSTD=y
|
||||
+CONFIG_HEXDUMP=y
|
||||
+CONFIG_RANDOM_UUID=y
|
||||
+CONFIG_REGEX=y
|
||||
+CONFIG_USB=y
|
||||
+CONFIG_USB_HOST=y
|
||||
+CONFIG_USB_XHCI_HCD=y
|
||||
+CONFIG_USB_XHCI_MTK=y
|
||||
+CONFIG_USB_STORAGE=y
|
||||
+CONFIG_OF_EMBED=y
|
||||
+CONFIG_ENV_OVERWRITE=y
|
||||
+CONFIG_ENV_IS_IN_UBI=y
|
||||
+CONFIG_ENV_UBI_PART="ubi"
|
||||
+CONFIG_ENV_SIZE=0x1f000
|
||||
+CONFIG_ENV_SIZE_REDUND=0x1f000
|
||||
+CONFIG_ENV_UBI_VOLUME="ubootenv"
|
||||
+CONFIG_ENV_UBI_VOLUME_REDUND="ubootenv2"
|
||||
+CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
|
||||
+CONFIG_NET_RANDOM_ETHADDR=y
|
||||
+CONFIG_REGMAP=y
|
||||
+CONFIG_SYSCON=y
|
||||
+CONFIG_CLK=y
|
||||
+CONFIG_PHY_FIXED=y
|
||||
+CONFIG_DM_ETH=y
|
||||
+CONFIG_MEDIATEK_ETH=y
|
||||
+CONFIG_PINCTRL=y
|
||||
+CONFIG_PINCONF=y
|
||||
+CONFIG_PINCTRL_MT7986=y
|
||||
+CONFIG_POWER_DOMAIN=y
|
||||
+CONFIG_MTK_POWER_DOMAIN=y
|
||||
+CONFIG_DM_REGULATOR=y
|
||||
+CONFIG_DM_REGULATOR_FIXED=y
|
||||
+CONFIG_DM_SERIAL=y
|
||||
+CONFIG_MTK_SERIAL=y
|
||||
+CONFIG_HEXDUMP=y
|
||||
+CONFIG_USE_DEFAULT_ENV_FILE=y
|
||||
+CONFIG_MTD_SPI_NAND=y
|
||||
+CONFIG_MTK_SPIM=y
|
||||
+CONFIG_CMD_MTD=y
|
||||
+CONFIG_CMD_NAND=y
|
||||
+CONFIG_CMD_NAND_TRIMFFS=y
|
||||
+CONFIG_LMB_MAX_REGIONS=64
|
||||
+CONFIG_USE_IPADDR=y
|
||||
+CONFIG_IPADDR="192.168.1.1"
|
||||
+CONFIG_USE_SERVERIP=y
|
||||
+CONFIG_SERVERIP="192.168.1.254"
|
||||
--- /dev/null
|
||||
+++ b/configs/mt7986_tplink_tl-xdr6086_defconfig
|
||||
@@ -0,0 +1,182 @@
|
||||
+CONFIG_ARM=y
|
||||
+CONFIG_POSITION_INDEPENDENT=y
|
||||
+CONFIG_ARCH_MEDIATEK=y
|
||||
+CONFIG_TARGET_MT7986=y
|
||||
+CONFIG_TEXT_BASE=0x41e00000
|
||||
+CONFIG_SYS_MALLOC_F_LEN=0x4000
|
||||
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
|
||||
+CONFIG_NR_DRAM_BANKS=1
|
||||
+CONFIG_DEFAULT_DEVICE_TREE="mt7986a-tplink-tl-xdr608x"
|
||||
+CONFIG_DEFAULT_ENV_FILE="tplink_tl-xdr6086_env"
|
||||
+CONFIG_DEFAULT_FDT_FILE="mediatek/mt7986a-tplink-tl-xdr608x.dtb"
|
||||
+CONFIG_OF_LIBFDT_OVERLAY=y
|
||||
+CONFIG_DEBUG_UART_BASE=0x11002000
|
||||
+CONFIG_DEBUG_UART_CLOCK=40000000
|
||||
+CONFIG_DEBUG_UART=y
|
||||
+CONFIG_SYS_LOAD_ADDR=0x46000000
|
||||
+CONFIG_SMBIOS_PRODUCT_NAME=""
|
||||
+CONFIG_AUTOBOOT_KEYED=y
|
||||
+CONFIG_BOOTDELAY=30
|
||||
+CONFIG_AUTOBOOT_MENU_SHOW=y
|
||||
+CONFIG_CFB_CONSOLE_ANSI=y
|
||||
+CONFIG_BOARD_LATE_INIT=y
|
||||
+CONFIG_BUTTON=y
|
||||
+CONFIG_BUTTON_GPIO=y
|
||||
+CONFIG_GPIO_HOG=y
|
||||
+CONFIG_CMD_ENV_FLAGS=y
|
||||
+CONFIG_FIT=y
|
||||
+CONFIG_FIT_ENABLE_SHA256_SUPPORT=y
|
||||
+CONFIG_LED=y
|
||||
+CONFIG_LED_BLINK=y
|
||||
+CONFIG_LED_GPIO=y
|
||||
+CONFIG_LOGLEVEL=7
|
||||
+CONFIG_LOG=y
|
||||
+CONFIG_SYS_PROMPT="MT7986> "
|
||||
+CONFIG_CMD_BOOTMENU=y
|
||||
+CONFIG_CMD_BOOTP=y
|
||||
+CONFIG_CMD_BUTTON=y
|
||||
+CONFIG_CMD_CACHE=y
|
||||
+CONFIG_CMD_CDP=y
|
||||
+CONFIG_CMD_CPU=y
|
||||
+CONFIG_CMD_DHCP=y
|
||||
+CONFIG_CMD_DM=y
|
||||
+CONFIG_CMD_DNS=y
|
||||
+CONFIG_CMD_ECHO=y
|
||||
+CONFIG_CMD_ENV_READMEM=y
|
||||
+CONFIG_CMD_ERASEENV=y
|
||||
+CONFIG_CMD_EXT4=y
|
||||
+CONFIG_CMD_FAT=y
|
||||
+CONFIG_CMD_FDT=y
|
||||
+CONFIG_CMD_FS_GENERIC=y
|
||||
+CONFIG_CMD_FS_UUID=y
|
||||
+CONFIG_CMD_GPIO=y
|
||||
+CONFIG_CMD_GPT=y
|
||||
+CONFIG_CMD_HASH=y
|
||||
+CONFIG_CMD_ITEST=y
|
||||
+CONFIG_CMD_LED=y
|
||||
+CONFIG_CMD_LICENSE=y
|
||||
+CONFIG_CMD_LINK_LOCAL=y
|
||||
+# CONFIG_CMD_MBR is not set
|
||||
+CONFIG_CMD_PCI=y
|
||||
+CONFIG_CMD_PSTORE=y
|
||||
+CONFIG_CMD_PSTORE_MEM_ADDR=0x42ff0000
|
||||
+CONFIG_CMD_SF_TEST=y
|
||||
+CONFIG_CMD_PING=y
|
||||
+CONFIG_CMD_PXE=y
|
||||
+CONFIG_CMD_PWM=y
|
||||
+CONFIG_CMD_SMC=y
|
||||
+CONFIG_CMD_TFTPBOOT=y
|
||||
+CONFIG_CMD_TFTPSRV=y
|
||||
+CONFIG_CMD_UBI=y
|
||||
+CONFIG_CMD_UBI_RENAME=y
|
||||
+CONFIG_CMD_UBIFS=y
|
||||
+CONFIG_CMD_ASKENV=y
|
||||
+CONFIG_CMD_PART=y
|
||||
+CONFIG_CMD_RARP=y
|
||||
+CONFIG_CMD_SETEXPR=y
|
||||
+CONFIG_CMD_SLEEP=y
|
||||
+CONFIG_CMD_SNTP=y
|
||||
+CONFIG_CMD_SOURCE=y
|
||||
+CONFIG_CMD_STRINGS=y
|
||||
+CONFIG_CMD_USB=y
|
||||
+CONFIG_CMD_UUID=y
|
||||
+CONFIG_DISPLAY_CPUINFO=y
|
||||
+CONFIG_DM_MTD=y
|
||||
+CONFIG_DM_REGULATOR=y
|
||||
+CONFIG_DM_REGULATOR_FIXED=y
|
||||
+CONFIG_DM_REGULATOR_GPIO=y
|
||||
+CONFIG_DM_USB=y
|
||||
+CONFIG_DM_PWM=y
|
||||
+CONFIG_PWM_MTK=y
|
||||
+CONFIG_HUSH_PARSER=y
|
||||
+CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
|
||||
+CONFIG_SYS_RELOC_GD_ENV_ADDR=y
|
||||
+CONFIG_VERSION_VARIABLE=y
|
||||
+CONFIG_PARTITION_UUIDS=y
|
||||
+CONFIG_NETCONSOLE=y
|
||||
+CONFIG_REGMAP=y
|
||||
+CONFIG_SYSCON=y
|
||||
+CONFIG_CLK=y
|
||||
+CONFIG_DM_GPIO=y
|
||||
+CONFIG_DM_SCSI=y
|
||||
+CONFIG_AHCI=y
|
||||
+CONFIG_AHCI_PCI=y
|
||||
+CONFIG_SCSI_AHCI=y
|
||||
+CONFIG_SCSI=y
|
||||
+CONFIG_CMD_SCSI=y
|
||||
+CONFIG_PHY=y
|
||||
+CONFIG_PHY_MTK_TPHY=y
|
||||
+CONFIG_PHY_FIXED=y
|
||||
+CONFIG_MTK_AHCI=y
|
||||
+CONFIG_DM_ETH=y
|
||||
+CONFIG_MEDIATEK_ETH=y
|
||||
+CONFIG_PCI=y
|
||||
+# CONFIG_MMC is not set
|
||||
+# CONFIG_DM_MMC is not set
|
||||
+CONFIG_MTD=y
|
||||
+CONFIG_MTD_UBI_FASTMAP=y
|
||||
+CONFIG_DM_PCI=y
|
||||
+CONFIG_PCIE_MEDIATEK=y
|
||||
+CONFIG_PINCTRL=y
|
||||
+CONFIG_PINCONF=y
|
||||
+CONFIG_PINCTRL_MT7622=y
|
||||
+CONFIG_POWER_DOMAIN=y
|
||||
+CONFIG_PRE_CONSOLE_BUFFER=y
|
||||
+CONFIG_PRE_CON_BUF_ADDR=0x4007EF00
|
||||
+CONFIG_MTK_POWER_DOMAIN=y
|
||||
+CONFIG_RAM=y
|
||||
+CONFIG_DM_SERIAL=y
|
||||
+CONFIG_MTK_SERIAL=y
|
||||
+CONFIG_SPI=y
|
||||
+CONFIG_DM_SPI=y
|
||||
+CONFIG_MTK_SPI_NAND=y
|
||||
+CONFIG_MTK_SPI_NAND_MTD=y
|
||||
+CONFIG_SYSRESET_WATCHDOG=y
|
||||
+CONFIG_WDT_MTK=y
|
||||
+CONFIG_LZO=y
|
||||
+CONFIG_ZSTD=y
|
||||
+CONFIG_HEXDUMP=y
|
||||
+CONFIG_RANDOM_UUID=y
|
||||
+CONFIG_REGEX=y
|
||||
+CONFIG_USB=y
|
||||
+CONFIG_USB_HOST=y
|
||||
+CONFIG_USB_XHCI_HCD=y
|
||||
+CONFIG_USB_XHCI_MTK=y
|
||||
+CONFIG_USB_STORAGE=y
|
||||
+CONFIG_OF_EMBED=y
|
||||
+CONFIG_ENV_OVERWRITE=y
|
||||
+CONFIG_ENV_IS_IN_UBI=y
|
||||
+CONFIG_ENV_UBI_PART="ubi"
|
||||
+CONFIG_ENV_SIZE=0x1f000
|
||||
+CONFIG_ENV_SIZE_REDUND=0x1f000
|
||||
+CONFIG_ENV_UBI_VOLUME="ubootenv"
|
||||
+CONFIG_ENV_UBI_VOLUME_REDUND="ubootenv2"
|
||||
+CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
|
||||
+CONFIG_NET_RANDOM_ETHADDR=y
|
||||
+CONFIG_REGMAP=y
|
||||
+CONFIG_SYSCON=y
|
||||
+CONFIG_CLK=y
|
||||
+CONFIG_PHY_FIXED=y
|
||||
+CONFIG_DM_ETH=y
|
||||
+CONFIG_MEDIATEK_ETH=y
|
||||
+CONFIG_PINCTRL=y
|
||||
+CONFIG_PINCONF=y
|
||||
+CONFIG_PINCTRL_MT7986=y
|
||||
+CONFIG_POWER_DOMAIN=y
|
||||
+CONFIG_MTK_POWER_DOMAIN=y
|
||||
+CONFIG_DM_REGULATOR=y
|
||||
+CONFIG_DM_REGULATOR_FIXED=y
|
||||
+CONFIG_DM_SERIAL=y
|
||||
+CONFIG_MTK_SERIAL=y
|
||||
+CONFIG_HEXDUMP=y
|
||||
+CONFIG_USE_DEFAULT_ENV_FILE=y
|
||||
+CONFIG_MTD_SPI_NAND=y
|
||||
+CONFIG_MTK_SPIM=y
|
||||
+CONFIG_CMD_MTD=y
|
||||
+CONFIG_CMD_NAND=y
|
||||
+CONFIG_CMD_NAND_TRIMFFS=y
|
||||
+CONFIG_LMB_MAX_REGIONS=64
|
||||
+CONFIG_USE_IPADDR=y
|
||||
+CONFIG_IPADDR="192.168.1.1"
|
||||
+CONFIG_USE_SERVERIP=y
|
||||
+CONFIG_SERVERIP="192.168.1.254"
|
||||
--- /dev/null
|
||||
+++ b/configs/mt7986_tplink_tl-xdr6088_defconfig
|
||||
@@ -0,0 +1,182 @@
|
||||
+CONFIG_ARM=y
|
||||
+CONFIG_POSITION_INDEPENDENT=y
|
||||
+CONFIG_ARCH_MEDIATEK=y
|
||||
+CONFIG_TARGET_MT7986=y
|
||||
+CONFIG_TEXT_BASE=0x41e00000
|
||||
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
|
||||
+CONFIG_SYS_MALLOC_F_LEN=0x4000
|
||||
+CONFIG_NR_DRAM_BANKS=1
|
||||
+CONFIG_DEFAULT_DEVICE_TREE="mt7986a-tplink-tl-xdr608x"
|
||||
+CONFIG_DEFAULT_ENV_FILE="tplink_tl-xdr6088_env"
|
||||
+CONFIG_DEFAULT_FDT_FILE="mediatek/mt7986a-tplink-tl-xdr608x.dtb"
|
||||
+CONFIG_OF_LIBFDT_OVERLAY=y
|
||||
+CONFIG_DEBUG_UART_BASE=0x11002000
|
||||
+CONFIG_DEBUG_UART_CLOCK=40000000
|
||||
+CONFIG_DEBUG_UART=y
|
||||
+CONFIG_SYS_LOAD_ADDR=0x46000000
|
||||
+CONFIG_SMBIOS_PRODUCT_NAME=""
|
||||
+CONFIG_AUTOBOOT_KEYED=y
|
||||
+CONFIG_BOOTDELAY=30
|
||||
+CONFIG_AUTOBOOT_MENU_SHOW=y
|
||||
+CONFIG_CFB_CONSOLE_ANSI=y
|
||||
+CONFIG_BOARD_LATE_INIT=y
|
||||
+CONFIG_BUTTON=y
|
||||
+CONFIG_BUTTON_GPIO=y
|
||||
+CONFIG_GPIO_HOG=y
|
||||
+CONFIG_CMD_ENV_FLAGS=y
|
||||
+CONFIG_FIT=y
|
||||
+CONFIG_FIT_ENABLE_SHA256_SUPPORT=y
|
||||
+CONFIG_LED=y
|
||||
+CONFIG_LED_BLINK=y
|
||||
+CONFIG_LED_GPIO=y
|
||||
+CONFIG_LOGLEVEL=7
|
||||
+CONFIG_LOG=y
|
||||
+CONFIG_SYS_PROMPT="MT7986> "
|
||||
+CONFIG_CMD_BOOTMENU=y
|
||||
+CONFIG_CMD_BOOTP=y
|
||||
+CONFIG_CMD_BUTTON=y
|
||||
+CONFIG_CMD_CACHE=y
|
||||
+CONFIG_CMD_CDP=y
|
||||
+CONFIG_CMD_CPU=y
|
||||
+CONFIG_CMD_DHCP=y
|
||||
+CONFIG_CMD_DM=y
|
||||
+CONFIG_CMD_DNS=y
|
||||
+CONFIG_CMD_ECHO=y
|
||||
+CONFIG_CMD_ENV_READMEM=y
|
||||
+CONFIG_CMD_ERASEENV=y
|
||||
+CONFIG_CMD_EXT4=y
|
||||
+CONFIG_CMD_FAT=y
|
||||
+CONFIG_CMD_FDT=y
|
||||
+CONFIG_CMD_FS_GENERIC=y
|
||||
+CONFIG_CMD_FS_UUID=y
|
||||
+CONFIG_CMD_GPIO=y
|
||||
+CONFIG_CMD_GPT=y
|
||||
+CONFIG_CMD_HASH=y
|
||||
+CONFIG_CMD_ITEST=y
|
||||
+CONFIG_CMD_LED=y
|
||||
+CONFIG_CMD_LICENSE=y
|
||||
+CONFIG_CMD_LINK_LOCAL=y
|
||||
+# CONFIG_CMD_MBR is not set
|
||||
+CONFIG_CMD_PCI=y
|
||||
+CONFIG_CMD_PSTORE=y
|
||||
+CONFIG_CMD_PSTORE_MEM_ADDR=0x42ff0000
|
||||
+CONFIG_CMD_SF_TEST=y
|
||||
+CONFIG_CMD_PING=y
|
||||
+CONFIG_CMD_PXE=y
|
||||
+CONFIG_CMD_PWM=y
|
||||
+CONFIG_CMD_SMC=y
|
||||
+CONFIG_CMD_TFTPBOOT=y
|
||||
+CONFIG_CMD_TFTPSRV=y
|
||||
+CONFIG_CMD_UBI=y
|
||||
+CONFIG_CMD_UBI_RENAME=y
|
||||
+CONFIG_CMD_UBIFS=y
|
||||
+CONFIG_CMD_ASKENV=y
|
||||
+CONFIG_CMD_PART=y
|
||||
+CONFIG_CMD_RARP=y
|
||||
+CONFIG_CMD_SETEXPR=y
|
||||
+CONFIG_CMD_SLEEP=y
|
||||
+CONFIG_CMD_SNTP=y
|
||||
+CONFIG_CMD_SOURCE=y
|
||||
+CONFIG_CMD_STRINGS=y
|
||||
+CONFIG_CMD_USB=y
|
||||
+CONFIG_CMD_UUID=y
|
||||
+CONFIG_DISPLAY_CPUINFO=y
|
||||
+CONFIG_DM_MTD=y
|
||||
+CONFIG_DM_REGULATOR=y
|
||||
+CONFIG_DM_REGULATOR_FIXED=y
|
||||
+CONFIG_DM_REGULATOR_GPIO=y
|
||||
+CONFIG_DM_USB=y
|
||||
+CONFIG_DM_PWM=y
|
||||
+CONFIG_PWM_MTK=y
|
||||
+CONFIG_HUSH_PARSER=y
|
||||
+CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
|
||||
+CONFIG_SYS_RELOC_GD_ENV_ADDR=y
|
||||
+CONFIG_VERSION_VARIABLE=y
|
||||
+CONFIG_PARTITION_UUIDS=y
|
||||
+CONFIG_NETCONSOLE=y
|
||||
+CONFIG_REGMAP=y
|
||||
+CONFIG_SYSCON=y
|
||||
+CONFIG_CLK=y
|
||||
+CONFIG_DM_GPIO=y
|
||||
+CONFIG_DM_SCSI=y
|
||||
+CONFIG_AHCI=y
|
||||
+CONFIG_AHCI_PCI=y
|
||||
+CONFIG_SCSI_AHCI=y
|
||||
+CONFIG_SCSI=y
|
||||
+CONFIG_CMD_SCSI=y
|
||||
+CONFIG_PHY=y
|
||||
+CONFIG_PHY_MTK_TPHY=y
|
||||
+CONFIG_PHY_FIXED=y
|
||||
+CONFIG_MTK_AHCI=y
|
||||
+CONFIG_DM_ETH=y
|
||||
+CONFIG_MEDIATEK_ETH=y
|
||||
+CONFIG_PCI=y
|
||||
+# CONFIG_MMC is not set
|
||||
+# CONFIG_DM_MMC is not set
|
||||
+CONFIG_MTD=y
|
||||
+CONFIG_MTD_UBI_FASTMAP=y
|
||||
+CONFIG_DM_PCI=y
|
||||
+CONFIG_PCIE_MEDIATEK=y
|
||||
+CONFIG_PINCTRL=y
|
||||
+CONFIG_PINCONF=y
|
||||
+CONFIG_PINCTRL_MT7622=y
|
||||
+CONFIG_POWER_DOMAIN=y
|
||||
+CONFIG_PRE_CONSOLE_BUFFER=y
|
||||
+CONFIG_PRE_CON_BUF_ADDR=0x4007EF00
|
||||
+CONFIG_MTK_POWER_DOMAIN=y
|
||||
+CONFIG_RAM=y
|
||||
+CONFIG_DM_SERIAL=y
|
||||
+CONFIG_MTK_SERIAL=y
|
||||
+CONFIG_SPI=y
|
||||
+CONFIG_DM_SPI=y
|
||||
+CONFIG_MTK_SPI_NAND=y
|
||||
+CONFIG_MTK_SPI_NAND_MTD=y
|
||||
+CONFIG_SYSRESET_WATCHDOG=y
|
||||
+CONFIG_WDT_MTK=y
|
||||
+CONFIG_LZO=y
|
||||
+CONFIG_ZSTD=y
|
||||
+CONFIG_HEXDUMP=y
|
||||
+CONFIG_RANDOM_UUID=y
|
||||
+CONFIG_REGEX=y
|
||||
+CONFIG_USB=y
|
||||
+CONFIG_USB_HOST=y
|
||||
+CONFIG_USB_XHCI_HCD=y
|
||||
+CONFIG_USB_XHCI_MTK=y
|
||||
+CONFIG_USB_STORAGE=y
|
||||
+CONFIG_OF_EMBED=y
|
||||
+CONFIG_ENV_OVERWRITE=y
|
||||
+CONFIG_ENV_IS_IN_UBI=y
|
||||
+CONFIG_ENV_UBI_PART="ubi"
|
||||
+CONFIG_ENV_SIZE=0x1f000
|
||||
+CONFIG_ENV_SIZE_REDUND=0x1f000
|
||||
+CONFIG_ENV_UBI_VOLUME="ubootenv"
|
||||
+CONFIG_ENV_UBI_VOLUME_REDUND="ubootenv2"
|
||||
+CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
|
||||
+CONFIG_NET_RANDOM_ETHADDR=y
|
||||
+CONFIG_REGMAP=y
|
||||
+CONFIG_SYSCON=y
|
||||
+CONFIG_CLK=y
|
||||
+CONFIG_PHY_FIXED=y
|
||||
+CONFIG_DM_ETH=y
|
||||
+CONFIG_MEDIATEK_ETH=y
|
||||
+CONFIG_PINCTRL=y
|
||||
+CONFIG_PINCONF=y
|
||||
+CONFIG_PINCTRL_MT7986=y
|
||||
+CONFIG_POWER_DOMAIN=y
|
||||
+CONFIG_MTK_POWER_DOMAIN=y
|
||||
+CONFIG_DM_REGULATOR=y
|
||||
+CONFIG_DM_REGULATOR_FIXED=y
|
||||
+CONFIG_DM_SERIAL=y
|
||||
+CONFIG_MTK_SERIAL=y
|
||||
+CONFIG_HEXDUMP=y
|
||||
+CONFIG_USE_DEFAULT_ENV_FILE=y
|
||||
+CONFIG_MTD_SPI_NAND=y
|
||||
+CONFIG_MTK_SPIM=y
|
||||
+CONFIG_CMD_MTD=y
|
||||
+CONFIG_CMD_NAND=y
|
||||
+CONFIG_CMD_NAND_TRIMFFS=y
|
||||
+CONFIG_LMB_MAX_REGIONS=64
|
||||
+CONFIG_USE_IPADDR=y
|
||||
+CONFIG_IPADDR="192.168.1.1"
|
||||
+CONFIG_USE_SERVERIP=y
|
||||
+CONFIG_SERVERIP="192.168.1.254"
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/dts/mt7986a-tplink-tl-xdr608x.dts
|
||||
@@ -0,0 +1,191 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0
|
||||
+/*
|
||||
+ * Copyright (c) 2021 MediaTek Inc.
|
||||
+ * Author: Sam Shih <sam.shih@mediatek.com>
|
||||
+ */
|
||||
+
|
||||
+/dts-v1/;
|
||||
+#include "mt7986.dtsi"
|
||||
+#include <dt-bindings/gpio/gpio.h>
|
||||
+#include <dt-bindings/input/linux-event-codes.h>
|
||||
+
|
||||
+/ {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <1>;
|
||||
+ model = "TP-Link TL-XDR608x";
|
||||
+ compatible = "mediatek,mt7986", "mediatek,mt7986-rfb";
|
||||
+
|
||||
+ chosen {
|
||||
+ stdout-path = &uart0;
|
||||
+ tick-timer = &timer0;
|
||||
+ };
|
||||
+
|
||||
+ keys {
|
||||
+ compatible = "gpio-keys";
|
||||
+
|
||||
+ factory {
|
||||
+ label = "reset";
|
||||
+ linux,code = <KEY_RESTART>;
|
||||
+ gpios = <&gpio 9 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+
|
||||
+ wps {
|
||||
+ label = "wps";
|
||||
+ linux,code = <KEY_WPS_BUTTON>;
|
||||
+ gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+
|
||||
+ turbo {
|
||||
+ label = "turbo";
|
||||
+ linux,code = <BTN_1>;
|
||||
+ gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ leds {
|
||||
+ compatible = "gpio-leds";
|
||||
+
|
||||
+ status_red {
|
||||
+ label = "red:status";
|
||||
+ gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
|
||||
+ };
|
||||
+
|
||||
+ status_green {
|
||||
+ label = "green:status";
|
||||
+ gpios = <&gpio 8 GPIO_ACTIVE_HIGH>;
|
||||
+ };
|
||||
+
|
||||
+ turbo {
|
||||
+ label = "green:turbo";
|
||||
+ gpios = <&gpio 12 GPIO_ACTIVE_HIGH>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&uart0 {
|
||||
+ mediatek,force-highspeed;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&uart1 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&uart1_pins>;
|
||||
+ status = "disabled";
|
||||
+};
|
||||
+
|
||||
+ð {
|
||||
+ status = "okay";
|
||||
+ mediatek,gmac-id = <0>;
|
||||
+ phy-mode = "sgmii";
|
||||
+ mediatek,switch = "mt7531";
|
||||
+ reset-gpios = <&gpio 5 GPIO_ACTIVE_HIGH>;
|
||||
+
|
||||
+ fixed-link {
|
||||
+ speed = <1000>;
|
||||
+ full-duplex;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&pinctrl {
|
||||
+ spi_flash_pins: spi0-pins-func-1 {
|
||||
+ mux {
|
||||
+ function = "flash";
|
||||
+ groups = "spi0", "spi0_wp_hold";
|
||||
+ };
|
||||
+
|
||||
+ conf-pu {
|
||||
+ pins = "SPI2_CS", "SPI2_HOLD", "SPI2_WP";
|
||||
+ drive-strength = <MTK_DRIVE_8mA>;
|
||||
+ bias-pull-up = <MTK_PUPD_SET_R1R0_00>;
|
||||
+ };
|
||||
+
|
||||
+ conf-pd {
|
||||
+ pins = "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO";
|
||||
+ drive-strength = <MTK_DRIVE_8mA>;
|
||||
+ bias-pull-down = <MTK_PUPD_SET_R1R0_00>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ spic_pins: spi1-pins-func-1 {
|
||||
+ mux {
|
||||
+ function = "spi";
|
||||
+ groups = "spi1_2";
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ uart1_pins: spi1-pins-func-3 {
|
||||
+ mux {
|
||||
+ function = "uart";
|
||||
+ groups = "uart1_2";
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ pwm_pins: pwm0-pins-func-1 {
|
||||
+ mux {
|
||||
+ function = "pwm";
|
||||
+ groups = "pwm0";
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&pwm {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pwm_pins>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&spi0 {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&spi_flash_pins>;
|
||||
+ status = "okay";
|
||||
+ must_tx;
|
||||
+ enhance_timing;
|
||||
+ dma_ext;
|
||||
+ ipm_design;
|
||||
+ support_quad;
|
||||
+ tick_dly = <1>;
|
||||
+ sample_sel = <0>;
|
||||
+
|
||||
+ spi_nand@1 {
|
||||
+ compatible = "spi-nand";
|
||||
+ reg = <1>;
|
||||
+ spi-max-frequency = <52000000>;
|
||||
+
|
||||
+ partitions {
|
||||
+ compatible = "fixed-partitions";
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <1>;
|
||||
+
|
||||
+ partition@0 {
|
||||
+ label = "bl2";
|
||||
+ reg = <0x0 0x80000>;
|
||||
+ };
|
||||
+
|
||||
+ partition@100000 {
|
||||
+ label = "config";
|
||||
+ reg = <0x100000 0x60000>;
|
||||
+ };
|
||||
+
|
||||
+ partition@160000 {
|
||||
+ label = "factory";
|
||||
+ reg = <0x160000 0x60000>;
|
||||
+ };
|
||||
+
|
||||
+ partition@380000 {
|
||||
+ label = "fip";
|
||||
+ reg = <0x380000 0x200000>;
|
||||
+ };
|
||||
+
|
||||
+ partition@580000 {
|
||||
+ label = "ubi";
|
||||
+ reg = <0x580000 0x7800000>;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&watchdog {
|
||||
+ status = "disabled";
|
||||
+};
|
||||
--- /dev/null
|
||||
+++ b/tplink_tl-xdr4288_env
|
||||
@@ -0,0 +1,57 @@
|
||||
+ethaddr_factory=mtd read config 0x40080000 0x0 0x20000 && env readmem -b ethaddr 0x4008001c 0x6 ; setenv ethaddr_factory
|
||||
+ipaddr=192.168.1.1
|
||||
+serverip=192.168.1.254
|
||||
+loadaddr=0x46000000
|
||||
+console=earlycon=uart8250,mmio32,0x11002000 console=ttyS0
|
||||
+bootcmd=if pstore check ; then run boot_recovery ; else run boot_ubi ; fi
|
||||
+bootconf=config-1
|
||||
+bootdelay=0
|
||||
+bootfile=openwrt-mediatek-filogic-tplink_tl-xdr4288-initramfs-recovery.itb
|
||||
+bootfile_bl2=openwrt-mediatek-filogic-tplink_tl-xdr4288-preloader.bin
|
||||
+bootfile_fip=openwrt-mediatek-filogic-tplink_tl-xdr4288-bl31-uboot.fip
|
||||
+bootfile_upg=openwrt-mediatek-filogic-tplink_tl-xdr4288-squashfs-sysupgrade.itb
|
||||
+bootled_pwr=green:status
|
||||
+bootled_rec=red:status
|
||||
+bootmenu_confirm_return=askenv - Press ENTER to return to menu ; bootmenu 60
|
||||
+bootmenu_default=0
|
||||
+bootmenu_delay=0
|
||||
+bootmenu_title= [0;34m( ( ( [1;39mOpenWrt[0;34m ) ) )
|
||||
+bootmenu_0=Initialize environment.=run _firstboot
|
||||
+bootmenu_0d=Run default boot command.=run boot_default
|
||||
+bootmenu_1=Boot system via TFTP.=run boot_tftp ; run bootmenu_confirm_return
|
||||
+bootmenu_2=Boot production system from NAND.=run boot_production ; run bootmenu_confirm_return
|
||||
+bootmenu_3=Boot recovery system from NAND.=run boot_recovery ; run bootmenu_confirm_return
|
||||
+bootmenu_4=Load production system via TFTP then write to NAND.=setenv noboot 1 ; setenv replacevol 1 ; run boot_tftp_production ; setenv noboot ; setenv replacevol ; run bootmenu_confirm_return
|
||||
+bootmenu_5=Load recovery system via TFTP then write to NAND.=setenv noboot 1 ; setenv replacevol 1 ; run boot_tftp_recovery ; setenv noboot ; setenv replacevol ; run bootmenu_confirm_return
|
||||
+bootmenu_6=[31mLoad BL31+U-Boot FIP via TFTP then write to NAND.[0m=run boot_tftp_write_fip ; run bootmenu_confirm_return
|
||||
+bootmenu_7=[31mLoad BL2 preloader via TFTP then write to NAND.[0m=run boot_tftp_write_bl2 ; run bootmenu_confirm_return
|
||||
+bootmenu_8=Reboot.=reset
|
||||
+bootmenu_9=Reset all settings to factory defaults.=run reset_factory ; reset
|
||||
+boot_first=if button reset ; then led $bootled_rec on ; run boot_tftp_recovery ; setenv flag_recover 1 ; run boot_default ; fi ; bootmenu
|
||||
+boot_default=if env exists flag_recover ; then else run bootcmd ; fi ; run boot_recovery ; setenv replacevol 1 ; run boot_tftp_forever
|
||||
+boot_production=led $bootled_pwr on ; run ubi_read_production && bootm $loadaddr#$bootconf ; led $bootled_pwr off
|
||||
+boot_recovery=led $bootled_rec on ; run ubi_read_recovery && bootm $loadaddr#$bootconf ; led $bootled_rec off
|
||||
+boot_ubi=run boot_production ; run boot_recovery ; run boot_tftp_forever
|
||||
+boot_tftp_forever=led $bootled_rec on ; while true ; do run boot_tftp_recovery ; sleep 1 ; done
|
||||
+boot_tftp_production=tftpboot $loadaddr $bootfile_upg && env exists replacevol && iminfo $loadaddr && run ubi_write_production ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi
|
||||
+boot_tftp_recovery=tftpboot $loadaddr $bootfile && env exists replacevol && iminfo $loadaddr && run ubi_write_recovery ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi
|
||||
+boot_tftp=tftpboot $loadaddr $bootfile && bootm $loadaddr#$bootconf
|
||||
+boot_tftp_write_fip=tftpboot $loadaddr $bootfile_fip && run mtd_write_fip && run reset_factory
|
||||
+boot_tftp_write_bl2=tftpboot $loadaddr $bootfile_bl2 && run mtd_write_bl2
|
||||
+part_default=production
|
||||
+part_recovery=recovery
|
||||
+reset_factory=ubi part ubi ; mw $loadaddr 0x0 0x800 ; ubi write $loadaddr ubootenv 0x800 ; ubi write $loadaddr ubootenv2 0x800
|
||||
+mtd_write_fip=mtd erase fip && mtd write fip $loadaddr
|
||||
+mtd_write_bl2=mtd erase bl2 && mtd write bl2 $loadaddr
|
||||
+ubi_create_env=ubi check ubootenv || ubi create ubootenv 0x100000 dynamic 0 || run ubi_format ; ubi check ubootenv2 || ubi create ubootenv2 0x100000 dynamic 1 || run ubi_format
|
||||
+ubi_format=ubi detach ; mtd erase ubi && ubi part ubi ; reset
|
||||
+ubi_prepare_rootfs=if ubi check rootfs_data ; then else if env exists rootfs_data_max ; then ubi create rootfs_data $rootfs_data_max dynamic || ubi create rootfs_data - dynamic ; else ubi create rootfs_data - dynamic ; fi ; fi
|
||||
+ubi_read_production=ubi read $loadaddr fit && iminfo $loadaddr && run ubi_prepare_rootfs
|
||||
+ubi_read_recovery=ubi check recovery && ubi read $loadaddr recovery
|
||||
+ubi_remove_rootfs=ubi check rootfs_data && ubi remove rootfs_data
|
||||
+ubi_write_production=ubi check fit && ubi remove fit ; run ubi_remove_rootfs ; ubi create fit $filesize dynamic 2 && ubi write $loadaddr fit $filesize
|
||||
+ubi_write_recovery=ubi check recovery && ubi remove recovery ; run ubi_remove_rootfs ; ubi create recovery $filesize dynamic 3 && ubi write $loadaddr recovery $filesize
|
||||
+_init_env=setenv _init_env ; run ubi_create_env ; saveenv ; saveenv
|
||||
+_firstboot=setenv _firstboot ; run ethaddr_factory ; run _switch_to_menu ; run _init_env ; run boot_first
|
||||
+_switch_to_menu=setenv _switch_to_menu ; setenv bootdelay 3 ; setenv bootmenu_delay 3 ; setenv bootmenu_0 $bootmenu_0d ; setenv bootmenu_0d ; run _bootmenu_update_title
|
||||
+_bootmenu_update_title=setenv _bootmenu_update_title ; setenv bootmenu_title "$bootmenu_title [33m$ver[0m"
|
||||
--- /dev/null
|
||||
+++ b/tplink_tl-xdr6086_env
|
||||
@@ -0,0 +1,57 @@
|
||||
+ethaddr_factory=mtd read config 0x40080000 0x0 0x20000 && env readmem -b ethaddr 0x4008001c 0x6 ; setenv ethaddr_factory
|
||||
+ipaddr=192.168.1.1
|
||||
+serverip=192.168.1.254
|
||||
+loadaddr=0x46000000
|
||||
+console=earlycon=uart8250,mmio32,0x11002000 console=ttyS0
|
||||
+bootcmd=if pstore check ; then run boot_recovery ; else run boot_ubi ; fi
|
||||
+bootconf=config-1
|
||||
+bootdelay=0
|
||||
+bootfile=openwrt-mediatek-filogic-tplink_tl-xdr6086-initramfs-recovery.itb
|
||||
+bootfile_bl2=openwrt-mediatek-filogic-tplink_tl-xdr6086-preloader.bin
|
||||
+bootfile_fip=openwrt-mediatek-filogic-tplink_tl-xdr6086-bl31-uboot.fip
|
||||
+bootfile_upg=openwrt-mediatek-filogic-tplink_tl-xdr6086-squashfs-sysupgrade.itb
|
||||
+bootled_pwr=green:status
|
||||
+bootled_rec=red:status
|
||||
+bootmenu_confirm_return=askenv - Press ENTER to return to menu ; bootmenu 60
|
||||
+bootmenu_default=0
|
||||
+bootmenu_delay=0
|
||||
+bootmenu_title= [0;34m( ( ( [1;39mOpenWrt[0;34m ) ) )
|
||||
+bootmenu_0=Initialize environment.=run _firstboot
|
||||
+bootmenu_0d=Run default boot command.=run boot_default
|
||||
+bootmenu_1=Boot system via TFTP.=run boot_tftp ; run bootmenu_confirm_return
|
||||
+bootmenu_2=Boot production system from NAND.=run boot_production ; run bootmenu_confirm_return
|
||||
+bootmenu_3=Boot recovery system from NAND.=run boot_recovery ; run bootmenu_confirm_return
|
||||
+bootmenu_4=Load production system via TFTP then write to NAND.=setenv noboot 1 ; setenv replacevol 1 ; run boot_tftp_production ; setenv noboot ; setenv replacevol ; run bootmenu_confirm_return
|
||||
+bootmenu_5=Load recovery system via TFTP then write to NAND.=setenv noboot 1 ; setenv replacevol 1 ; run boot_tftp_recovery ; setenv noboot ; setenv replacevol ; run bootmenu_confirm_return
|
||||
+bootmenu_6=[31mLoad BL31+U-Boot FIP via TFTP then write to NAND.[0m=run boot_tftp_write_fip ; run bootmenu_confirm_return
|
||||
+bootmenu_7=[31mLoad BL2 preloader via TFTP then write to NAND.[0m=run boot_tftp_write_bl2 ; run bootmenu_confirm_return
|
||||
+bootmenu_8=Reboot.=reset
|
||||
+bootmenu_9=Reset all settings to factory defaults.=run reset_factory ; reset
|
||||
+boot_first=if button reset ; then led $bootled_rec on ; run boot_tftp_recovery ; setenv flag_recover 1 ; run boot_default ; fi ; bootmenu
|
||||
+boot_default=if env exists flag_recover ; then else run bootcmd ; fi ; run boot_recovery ; setenv replacevol 1 ; run boot_tftp_forever
|
||||
+boot_production=led $bootled_pwr on ; run ubi_read_production && bootm $loadaddr#$bootconf ; led $bootled_pwr off
|
||||
+boot_recovery=led $bootled_rec on ; run ubi_read_recovery && bootm $loadaddr#$bootconf ; led $bootled_rec off
|
||||
+boot_ubi=run boot_production ; run boot_recovery ; run boot_tftp_forever
|
||||
+boot_tftp_forever=led $bootled_rec on ; while true ; do run boot_tftp_recovery ; sleep 1 ; done
|
||||
+boot_tftp_production=tftpboot $loadaddr $bootfile_upg && env exists replacevol && iminfo $loadaddr && run ubi_write_production ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi
|
||||
+boot_tftp_recovery=tftpboot $loadaddr $bootfile && env exists replacevol && iminfo $loadaddr && run ubi_write_recovery ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi
|
||||
+boot_tftp=tftpboot $loadaddr $bootfile && bootm $loadaddr#$bootconf
|
||||
+boot_tftp_write_fip=tftpboot $loadaddr $bootfile_fip && run mtd_write_fip && run reset_factory
|
||||
+boot_tftp_write_bl2=tftpboot $loadaddr $bootfile_bl2 && run mtd_write_bl2
|
||||
+part_default=production
|
||||
+part_recovery=recovery
|
||||
+reset_factory=ubi part ubi ; mw $loadaddr 0x0 0x800 ; ubi write $loadaddr ubootenv 0x800 ; ubi write $loadaddr ubootenv2 0x800
|
||||
+mtd_write_fip=mtd erase fip && mtd write fip $loadaddr
|
||||
+mtd_write_bl2=mtd erase bl2 && mtd write bl2 $loadaddr
|
||||
+ubi_create_env=ubi check ubootenv || ubi create ubootenv 0x100000 dynamic 0 || run ubi_format ; ubi check ubootenv2 || ubi create ubootenv2 0x100000 dynamic 1 || run ubi_format
|
||||
+ubi_format=ubi detach ; mtd erase ubi && ubi part ubi ; reset
|
||||
+ubi_prepare_rootfs=if ubi check rootfs_data ; then else if env exists rootfs_data_max ; then ubi create rootfs_data $rootfs_data_max dynamic || ubi create rootfs_data - dynamic ; else ubi create rootfs_data - dynamic ; fi ; fi
|
||||
+ubi_read_production=ubi read $loadaddr fit && iminfo $loadaddr && run ubi_prepare_rootfs
|
||||
+ubi_read_recovery=ubi check recovery && ubi read $loadaddr recovery
|
||||
+ubi_remove_rootfs=ubi check rootfs_data && ubi remove rootfs_data
|
||||
+ubi_write_production=ubi check fit && ubi remove fit ; run ubi_remove_rootfs ; ubi create fit $filesize dynamic 2 && ubi write $loadaddr fit $filesize
|
||||
+ubi_write_recovery=ubi check recovery && ubi remove recovery ; run ubi_remove_rootfs ; ubi create recovery $filesize dynamic 3 && ubi write $loadaddr recovery $filesize
|
||||
+_init_env=setenv _init_env ; run ubi_create_env ; saveenv ; saveenv
|
||||
+_firstboot=setenv _firstboot ; run ethaddr_factory ; run _switch_to_menu ; run _init_env ; run boot_first
|
||||
+_switch_to_menu=setenv _switch_to_menu ; setenv bootdelay 3 ; setenv bootmenu_delay 3 ; setenv bootmenu_0 $bootmenu_0d ; setenv bootmenu_0d ; run _bootmenu_update_title
|
||||
+_bootmenu_update_title=setenv _bootmenu_update_title ; setenv bootmenu_title "$bootmenu_title [33m$ver[0m"
|
||||
--- /dev/null
|
||||
+++ b/tplink_tl-xdr6088_env
|
||||
@@ -0,0 +1,57 @@
|
||||
+ethaddr_factory=mtd read config 0x40080000 0x0 0x20000 && env readmem -b ethaddr 0x4008001c 0x6 ; setenv ethaddr_factory
|
||||
+ipaddr=192.168.1.1
|
||||
+serverip=192.168.1.254
|
||||
+loadaddr=0x46000000
|
||||
+console=earlycon=uart8250,mmio32,0x11002000 console=ttyS0
|
||||
+bootcmd=if pstore check ; then run boot_recovery ; else run boot_ubi ; fi
|
||||
+bootconf=config-1
|
||||
+bootdelay=0
|
||||
+bootfile=openwrt-mediatek-filogic-tplink_tl-xdr6088-initramfs-recovery.itb
|
||||
+bootfile_bl2=openwrt-mediatek-filogic-tplink_tl-xdr6088-preloader.bin
|
||||
+bootfile_fip=openwrt-mediatek-filogic-tplink_tl-xdr6088-bl31-uboot.fip
|
||||
+bootfile_upg=openwrt-mediatek-filogic-tplink_tl-xdr6088-squashfs-sysupgrade.itb
|
||||
+bootled_pwr=green:status
|
||||
+bootled_rec=red:status
|
||||
+bootmenu_confirm_return=askenv - Press ENTER to return to menu ; bootmenu 60
|
||||
+bootmenu_default=0
|
||||
+bootmenu_delay=0
|
||||
+bootmenu_title= [0;34m( ( ( [1;39mOpenWrt[0;34m ) ) )
|
||||
+bootmenu_0=Initialize environment.=run _firstboot
|
||||
+bootmenu_0d=Run default boot command.=run boot_default
|
||||
+bootmenu_1=Boot system via TFTP.=run boot_tftp ; run bootmenu_confirm_return
|
||||
+bootmenu_2=Boot production system from NAND.=run boot_production ; run bootmenu_confirm_return
|
||||
+bootmenu_3=Boot recovery system from NAND.=run boot_recovery ; run bootmenu_confirm_return
|
||||
+bootmenu_4=Load production system via TFTP then write to NAND.=setenv noboot 1 ; setenv replacevol 1 ; run boot_tftp_production ; setenv noboot ; setenv replacevol ; run bootmenu_confirm_return
|
||||
+bootmenu_5=Load recovery system via TFTP then write to NAND.=setenv noboot 1 ; setenv replacevol 1 ; run boot_tftp_recovery ; setenv noboot ; setenv replacevol ; run bootmenu_confirm_return
|
||||
+bootmenu_6=[31mLoad BL31+U-Boot FIP via TFTP then write to NAND.[0m=run boot_tftp_write_fip ; run bootmenu_confirm_return
|
||||
+bootmenu_7=[31mLoad BL2 preloader via TFTP then write to NAND.[0m=run boot_tftp_write_bl2 ; run bootmenu_confirm_return
|
||||
+bootmenu_8=Reboot.=reset
|
||||
+bootmenu_9=Reset all settings to factory defaults.=run reset_factory ; reset
|
||||
+boot_first=if button reset ; then led $bootled_rec on ; run boot_tftp_recovery ; setenv flag_recover 1 ; run boot_default ; fi ; bootmenu
|
||||
+boot_default=if env exists flag_recover ; then else run bootcmd ; fi ; run boot_recovery ; setenv replacevol 1 ; run boot_tftp_forever
|
||||
+boot_production=led $bootled_pwr on ; run ubi_read_production && bootm $loadaddr#$bootconf ; led $bootled_pwr off
|
||||
+boot_recovery=led $bootled_rec on ; run ubi_read_recovery && bootm $loadaddr#$bootconf ; led $bootled_rec off
|
||||
+boot_ubi=run boot_production ; run boot_recovery ; run boot_tftp_forever
|
||||
+boot_tftp_forever=led $bootled_rec on ; while true ; do run boot_tftp_recovery ; sleep 1 ; done
|
||||
+boot_tftp_production=tftpboot $loadaddr $bootfile_upg && env exists replacevol && iminfo $loadaddr && run ubi_write_production ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi
|
||||
+boot_tftp_recovery=tftpboot $loadaddr $bootfile && env exists replacevol && iminfo $loadaddr && run ubi_write_recovery ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi
|
||||
+boot_tftp=tftpboot $loadaddr $bootfile && bootm $loadaddr#$bootconf
|
||||
+boot_tftp_write_fip=tftpboot $loadaddr $bootfile_fip && run mtd_write_fip && run reset_factory
|
||||
+boot_tftp_write_bl2=tftpboot $loadaddr $bootfile_bl2 && run mtd_write_bl2
|
||||
+part_default=production
|
||||
+part_recovery=recovery
|
||||
+reset_factory=ubi part ubi ; mw $loadaddr 0x0 0x800 ; ubi write $loadaddr ubootenv 0x800 ; ubi write $loadaddr ubootenv2 0x800
|
||||
+mtd_write_fip=mtd erase fip && mtd write fip $loadaddr
|
||||
+mtd_write_bl2=mtd erase bl2 && mtd write bl2 $loadaddr
|
||||
+ubi_create_env=ubi check ubootenv || ubi create ubootenv 0x100000 dynamic 0 || run ubi_format ; ubi check ubootenv2 || ubi create ubootenv2 0x100000 dynamic 1 || run ubi_format
|
||||
+ubi_format=ubi detach ; mtd erase ubi && ubi part ubi ; reset
|
||||
+ubi_prepare_rootfs=if ubi check rootfs_data ; then else if env exists rootfs_data_max ; then ubi create rootfs_data $rootfs_data_max dynamic || ubi create rootfs_data - dynamic ; else ubi create rootfs_data - dynamic ; fi ; fi
|
||||
+ubi_read_production=ubi read $loadaddr fit && iminfo $loadaddr && run ubi_prepare_rootfs
|
||||
+ubi_read_recovery=ubi check recovery && ubi read $loadaddr recovery
|
||||
+ubi_remove_rootfs=ubi check rootfs_data && ubi remove rootfs_data
|
||||
+ubi_write_production=ubi check fit && ubi remove fit ; run ubi_remove_rootfs ; ubi create fit $filesize dynamic 2 && ubi write $loadaddr fit $filesize
|
||||
+ubi_write_recovery=ubi check recovery && ubi remove recovery ; run ubi_remove_rootfs ; ubi create recovery $filesize dynamic 3 && ubi write $loadaddr recovery $filesize
|
||||
+_init_env=setenv _init_env ; run ubi_create_env ; saveenv ; saveenv
|
||||
+_firstboot=setenv _firstboot ; run ethaddr_factory ; run _switch_to_menu ; run _init_env ; run boot_first
|
||||
+_switch_to_menu=setenv _switch_to_menu ; setenv bootdelay 3 ; setenv bootmenu_delay 3 ; setenv bootmenu_0 $bootmenu_0d ; setenv bootmenu_0d ; run _bootmenu_update_title
|
||||
+_bootmenu_update_title=setenv _bootmenu_update_title ; setenv bootmenu_title "$bootmenu_title [33m$ver[0m"
|
||||
@ -8,12 +8,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=libpcap
|
||||
PKG_VERSION:=1.10.3
|
||||
PKG_VERSION:=1.10.4
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://www.tcpdump.org/release/
|
||||
PKG_HASH:=2a8885c403516cf7b0933ed4b14d6caa30e02052489ebd414dc75ac52e7559e6
|
||||
PKG_HASH:=ed19a0383fad72e3ad435fd239d7cd80d64916b87269550159d20e47160ebe5f
|
||||
|
||||
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
|
||||
PKG_LICENSE:=BSD-3-Clause
|
||||
|
||||
@ -23,7 +23,7 @@ produce a noisy warning.
|
||||
xhci->quirks |= XHCI_RESET_ON_RESUME;
|
||||
--- a/drivers/usb/host/xhci.c
|
||||
+++ b/drivers/usb/host/xhci.c
|
||||
@@ -427,10 +427,14 @@ static int xhci_try_enable_msi(struct us
|
||||
@@ -431,10 +431,14 @@ static int xhci_try_enable_msi(struct us
|
||||
free_irq(hcd->irq, hcd);
|
||||
hcd->irq = 0;
|
||||
|
||||
|
||||
@ -49,7 +49,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
#ifdef CONFIG_MACB_USE_HWSTAMP
|
||||
--- a/drivers/net/ethernet/cadence/macb_main.c
|
||||
+++ b/drivers/net/ethernet/cadence/macb_main.c
|
||||
@@ -3824,15 +3824,15 @@ static int macb_init(struct platform_dev
|
||||
@@ -3828,15 +3828,15 @@ static int macb_init(struct platform_dev
|
||||
if (!(bp->caps & MACB_CAPS_USRIO_DISABLED)) {
|
||||
val = 0;
|
||||
if (phy_interface_mode_is_rgmii(bp->phy_interface))
|
||||
@ -69,7 +69,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
macb_or_gem_writel(bp, USRIO, val);
|
||||
}
|
||||
@@ -4350,6 +4350,13 @@ static int fu540_c000_init(struct platfo
|
||||
@@ -4354,6 +4354,13 @@ static int fu540_c000_init(struct platfo
|
||||
return macb_init(pdev);
|
||||
}
|
||||
|
||||
@ -83,7 +83,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
static const struct macb_config fu540_c000_config = {
|
||||
.caps = MACB_CAPS_GIGABIT_MODE_AVAILABLE | MACB_CAPS_JUMBO |
|
||||
MACB_CAPS_GEM_HAS_PTP,
|
||||
@@ -4357,12 +4364,14 @@ static const struct macb_config fu540_c0
|
||||
@@ -4361,12 +4368,14 @@ static const struct macb_config fu540_c0
|
||||
.clk_init = fu540_c000_clk_init,
|
||||
.init = fu540_c000_init,
|
||||
.jumbo_max_len = 10240,
|
||||
@ -98,7 +98,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
};
|
||||
|
||||
static const struct macb_config sama5d3macb_config = {
|
||||
@@ -4370,6 +4379,7 @@ static const struct macb_config sama5d3m
|
||||
@@ -4374,6 +4383,7 @@ static const struct macb_config sama5d3m
|
||||
| MACB_CAPS_USRIO_HAS_CLKEN | MACB_CAPS_USRIO_DEFAULT_IS_MII_GMII,
|
||||
.clk_init = macb_clk_init,
|
||||
.init = macb_init,
|
||||
@ -106,7 +106,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
};
|
||||
|
||||
static const struct macb_config pc302gem_config = {
|
||||
@@ -4377,6 +4387,7 @@ static const struct macb_config pc302gem
|
||||
@@ -4381,6 +4391,7 @@ static const struct macb_config pc302gem
|
||||
.dma_burst_length = 16,
|
||||
.clk_init = macb_clk_init,
|
||||
.init = macb_init,
|
||||
@ -114,7 +114,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
};
|
||||
|
||||
static const struct macb_config sama5d2_config = {
|
||||
@@ -4384,6 +4395,7 @@ static const struct macb_config sama5d2_
|
||||
@@ -4388,6 +4399,7 @@ static const struct macb_config sama5d2_
|
||||
.dma_burst_length = 16,
|
||||
.clk_init = macb_clk_init,
|
||||
.init = macb_init,
|
||||
@ -122,7 +122,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
};
|
||||
|
||||
static const struct macb_config sama5d3_config = {
|
||||
@@ -4393,6 +4405,7 @@ static const struct macb_config sama5d3_
|
||||
@@ -4397,6 +4409,7 @@ static const struct macb_config sama5d3_
|
||||
.clk_init = macb_clk_init,
|
||||
.init = macb_init,
|
||||
.jumbo_max_len = 10240,
|
||||
@ -130,7 +130,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
};
|
||||
|
||||
static const struct macb_config sama5d4_config = {
|
||||
@@ -4400,18 +4413,21 @@ static const struct macb_config sama5d4_
|
||||
@@ -4404,18 +4417,21 @@ static const struct macb_config sama5d4_
|
||||
.dma_burst_length = 4,
|
||||
.clk_init = macb_clk_init,
|
||||
.init = macb_init,
|
||||
@ -152,7 +152,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
};
|
||||
|
||||
static const struct macb_config zynqmp_config = {
|
||||
@@ -4422,6 +4438,7 @@ static const struct macb_config zynqmp_c
|
||||
@@ -4426,6 +4442,7 @@ static const struct macb_config zynqmp_c
|
||||
.clk_init = macb_clk_init,
|
||||
.init = macb_init,
|
||||
.jumbo_max_len = 10240,
|
||||
@ -160,7 +160,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
};
|
||||
|
||||
static const struct macb_config zynq_config = {
|
||||
@@ -4430,6 +4447,7 @@ static const struct macb_config zynq_con
|
||||
@@ -4434,6 +4451,7 @@ static const struct macb_config zynq_con
|
||||
.dma_burst_length = 16,
|
||||
.clk_init = macb_clk_init,
|
||||
.init = macb_init,
|
||||
@ -168,7 +168,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
};
|
||||
|
||||
static const struct of_device_id macb_dt_ids[] = {
|
||||
@@ -4550,6 +4568,8 @@ static int macb_probe(struct platform_de
|
||||
@@ -4554,6 +4572,8 @@ static int macb_probe(struct platform_de
|
||||
bp->wol |= MACB_WOL_HAS_MAGIC_PACKET;
|
||||
device_set_wakeup_capable(&pdev->dev, bp->wol & MACB_WOL_HAS_MAGIC_PACKET);
|
||||
|
||||
|
||||
@ -14,7 +14,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
--- a/drivers/net/ethernet/cadence/macb_main.c
|
||||
+++ b/drivers/net/ethernet/cadence/macb_main.c
|
||||
@@ -3599,6 +3599,20 @@ static void macb_probe_queues(void __iom
|
||||
@@ -3603,6 +3603,20 @@ static void macb_probe_queues(void __iom
|
||||
*num_queues = hweight32(*queue_mask);
|
||||
}
|
||||
|
||||
@ -35,7 +35,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
static int macb_clk_init(struct platform_device *pdev, struct clk **pclk,
|
||||
struct clk **hclk, struct clk **tx_clk,
|
||||
struct clk **rx_clk, struct clk **tsu_clk)
|
||||
@@ -4661,11 +4675,7 @@ err_out_free_netdev:
|
||||
@@ -4665,11 +4679,7 @@ err_out_free_netdev:
|
||||
free_netdev(dev);
|
||||
|
||||
err_disable_clocks:
|
||||
@ -48,7 +48,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
pm_runtime_disable(&pdev->dev);
|
||||
pm_runtime_set_suspended(&pdev->dev);
|
||||
pm_runtime_dont_use_autosuspend(&pdev->dev);
|
||||
@@ -4690,11 +4700,8 @@ static int macb_remove(struct platform_d
|
||||
@@ -4694,11 +4704,8 @@ static int macb_remove(struct platform_d
|
||||
pm_runtime_disable(&pdev->dev);
|
||||
pm_runtime_dont_use_autosuspend(&pdev->dev);
|
||||
if (!pm_runtime_suspended(&pdev->dev)) {
|
||||
@ -62,7 +62,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
pm_runtime_set_suspended(&pdev->dev);
|
||||
}
|
||||
phylink_destroy(bp->phylink);
|
||||
@@ -4873,13 +4880,10 @@ static int __maybe_unused macb_runtime_s
|
||||
@@ -4877,13 +4884,10 @@ static int __maybe_unused macb_runtime_s
|
||||
struct net_device *netdev = dev_get_drvdata(dev);
|
||||
struct macb *bp = netdev_priv(netdev);
|
||||
|
||||
|
||||
@ -14,7 +14,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
--- a/drivers/net/ethernet/cadence/macb_main.c
|
||||
+++ b/drivers/net/ethernet/cadence/macb_main.c
|
||||
@@ -4331,8 +4331,10 @@ static int fu540_c000_clk_init(struct pl
|
||||
@@ -4335,8 +4335,10 @@ static int fu540_c000_clk_init(struct pl
|
||||
return err;
|
||||
|
||||
mgmt = devm_kzalloc(&pdev->dev, sizeof(*mgmt), GFP_KERNEL);
|
||||
@ -27,7 +27,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
init.name = "sifive-gemgxl-mgmt";
|
||||
init.ops = &fu540_c000_ops;
|
||||
@@ -4343,16 +4345,26 @@ static int fu540_c000_clk_init(struct pl
|
||||
@@ -4347,16 +4349,26 @@ static int fu540_c000_clk_init(struct pl
|
||||
mgmt->hw.init = &init;
|
||||
|
||||
*tx_clk = devm_clk_register(&pdev->dev, &mgmt->hw);
|
||||
|
||||
@ -14,7 +14,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
--- a/drivers/net/ethernet/cadence/macb_main.c
|
||||
+++ b/drivers/net/ethernet/cadence/macb_main.c
|
||||
@@ -4383,6 +4383,14 @@ static const struct macb_usrio_config ma
|
||||
@@ -4387,6 +4387,14 @@ static const struct macb_usrio_config ma
|
||||
.refclk = MACB_BIT(CLKEN),
|
||||
};
|
||||
|
||||
@ -29,7 +29,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
static const struct macb_config fu540_c000_config = {
|
||||
.caps = MACB_CAPS_GIGABIT_MODE_AVAILABLE | MACB_CAPS_JUMBO |
|
||||
MACB_CAPS_GEM_HAS_PTP,
|
||||
@@ -4476,6 +4484,14 @@ static const struct macb_config zynq_con
|
||||
@@ -4480,6 +4488,14 @@ static const struct macb_config zynq_con
|
||||
.usrio = &macb_default_usrio,
|
||||
};
|
||||
|
||||
@ -44,7 +44,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
static const struct of_device_id macb_dt_ids[] = {
|
||||
{ .compatible = "cdns,at32ap7000-macb" },
|
||||
{ .compatible = "cdns,at91sam9260-macb", .data = &at91sam9260_config },
|
||||
@@ -4493,6 +4509,7 @@ static const struct of_device_id macb_dt
|
||||
@@ -4497,6 +4513,7 @@ static const struct of_device_id macb_dt
|
||||
{ .compatible = "cdns,zynqmp-gem", .data = &zynqmp_config},
|
||||
{ .compatible = "cdns,zynq-gem", .data = &zynq_config },
|
||||
{ .compatible = "sifive,fu540-c000-gem", .data = &fu540_c000_config },
|
||||
|
||||
@ -14,7 +14,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
--- a/drivers/net/ethernet/cadence/macb_main.c
|
||||
+++ b/drivers/net/ethernet/cadence/macb_main.c
|
||||
@@ -4492,6 +4492,14 @@ static const struct macb_config sama7g5_
|
||||
@@ -4496,6 +4496,14 @@ static const struct macb_config sama7g5_
|
||||
.usrio = &sama7g5_usrio,
|
||||
};
|
||||
|
||||
@ -29,7 +29,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
static const struct of_device_id macb_dt_ids[] = {
|
||||
{ .compatible = "cdns,at32ap7000-macb" },
|
||||
{ .compatible = "cdns,at91sam9260-macb", .data = &at91sam9260_config },
|
||||
@@ -4510,6 +4518,7 @@ static const struct of_device_id macb_dt
|
||||
@@ -4514,6 +4522,7 @@ static const struct of_device_id macb_dt
|
||||
{ .compatible = "cdns,zynq-gem", .data = &zynq_config },
|
||||
{ .compatible = "sifive,fu540-c000-gem", .data = &fu540_c000_config },
|
||||
{ .compatible = "microchip,sama7g5-gem", .data = &sama7g5_gem_config },
|
||||
|
||||
@ -20,7 +20,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
--- a/drivers/net/ethernet/cadence/macb_main.c
|
||||
+++ b/drivers/net/ethernet/cadence/macb_main.c
|
||||
@@ -3861,6 +3861,13 @@ static int macb_init(struct platform_dev
|
||||
@@ -3865,6 +3865,13 @@ static int macb_init(struct platform_dev
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -34,7 +34,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
#if defined(CONFIG_OF)
|
||||
/* 1518 rounded up */
|
||||
#define AT91ETHER_MAX_RBUFF_SZ 0x600
|
||||
@@ -4376,13 +4383,6 @@ static int fu540_c000_init(struct platfo
|
||||
@@ -4380,13 +4387,6 @@ static int fu540_c000_init(struct platfo
|
||||
return macb_init(pdev);
|
||||
}
|
||||
|
||||
@ -48,7 +48,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
static const struct macb_usrio_config sama7g5_usrio = {
|
||||
.mii = 0,
|
||||
.rmii = 1,
|
||||
@@ -4531,6 +4531,7 @@ static const struct macb_config default_
|
||||
@@ -4535,6 +4535,7 @@ static const struct macb_config default_
|
||||
.dma_burst_length = 16,
|
||||
.clk_init = macb_clk_init,
|
||||
.init = macb_init,
|
||||
|
||||
@ -40,7 +40,7 @@ it on BCM4708 family.
|
||||
/* called during probe() after chip reset completes */
|
||||
--- a/drivers/usb/host/xhci.c
|
||||
+++ b/drivers/usb/host/xhci.c
|
||||
@@ -158,6 +158,49 @@ int xhci_start(struct xhci_hcd *xhci)
|
||||
@@ -159,6 +159,49 @@ int xhci_start(struct xhci_hcd *xhci)
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -90,7 +90,7 @@ it on BCM4708 family.
|
||||
/*
|
||||
* Reset a halted HC.
|
||||
*
|
||||
@@ -608,10 +651,20 @@ static int xhci_init(struct usb_hcd *hcd
|
||||
@@ -612,10 +655,20 @@ static int xhci_init(struct usb_hcd *hcd
|
||||
|
||||
static int xhci_run_finished(struct xhci_hcd *xhci)
|
||||
{
|
||||
@ -114,7 +114,7 @@ it on BCM4708 family.
|
||||
xhci->shared_hcd->state = HC_STATE_RUNNING;
|
||||
xhci->cmd_ring_state = CMD_RING_STATE_RUNNING;
|
||||
|
||||
@@ -621,6 +674,10 @@ static int xhci_run_finished(struct xhci
|
||||
@@ -625,6 +678,10 @@ static int xhci_run_finished(struct xhci
|
||||
xhci_dbg_trace(xhci, trace_xhci_dbg_init,
|
||||
"Finished xhci_run for USB3 roothub");
|
||||
return 0;
|
||||
|
||||
@ -1,69 +0,0 @@
|
||||
From 1e020e1b96afdecd20680b5b5be2a6ffc3d27628 Mon Sep 17 00:00:00 2001
|
||||
From: Zhihao Cheng <chengzhihao1@huawei.com>
|
||||
Date: Mon, 6 Mar 2023 09:33:08 +0800
|
||||
Subject: [PATCH] ubi: Fix failure attaching when vid_hdr offset equals to
|
||||
(sub)page size
|
||||
|
||||
Following process will make ubi attaching failed since commit
|
||||
1b42b1a36fc946 ("ubi: ensure that VID header offset ... size"):
|
||||
|
||||
ID="0xec,0xa1,0x00,0x15" # 128M 128KB 2KB
|
||||
modprobe nandsim id_bytes=$ID
|
||||
flash_eraseall /dev/mtd0
|
||||
modprobe ubi mtd="0,2048" # set vid_hdr offset as 2048 (one page)
|
||||
(dmesg):
|
||||
ubi0 error: ubi_attach_mtd_dev [ubi]: VID header offset 2048 too large.
|
||||
UBI error: cannot attach mtd0
|
||||
UBI error: cannot initialize UBI, error -22
|
||||
|
||||
Rework original solution, the key point is making sure
|
||||
'vid_hdr_shift + UBI_VID_HDR_SIZE < ubi->vid_hdr_alsize',
|
||||
so we should check vid_hdr_shift rather not vid_hdr_offset.
|
||||
Then, ubi still support (sub)page aligined VID header offset.
|
||||
|
||||
Fixes: 1b42b1a36fc946 ("ubi: ensure that VID header offset ... size")
|
||||
Signed-off-by: Zhihao Cheng <chengzhihao1@huawei.com>
|
||||
Tested-by: Nicolas Schichan <nschichan@freebox.fr>
|
||||
Tested-by: Miquel Raynal <miquel.raynal@bootlin.com> # v5.10, v4.19
|
||||
Signed-off-by: Richard Weinberger <richard@nod.at>
|
||||
---
|
||||
drivers/mtd/ubi/build.c | 21 +++++++++++++++------
|
||||
1 file changed, 15 insertions(+), 6 deletions(-)
|
||||
|
||||
--- a/drivers/mtd/ubi/build.c
|
||||
+++ b/drivers/mtd/ubi/build.c
|
||||
@@ -665,12 +665,6 @@ static int io_init(struct ubi_device *ub
|
||||
ubi->ec_hdr_alsize = ALIGN(UBI_EC_HDR_SIZE, ubi->hdrs_min_io_size);
|
||||
ubi->vid_hdr_alsize = ALIGN(UBI_VID_HDR_SIZE, ubi->hdrs_min_io_size);
|
||||
|
||||
- if (ubi->vid_hdr_offset && ((ubi->vid_hdr_offset + UBI_VID_HDR_SIZE) >
|
||||
- ubi->vid_hdr_alsize)) {
|
||||
- ubi_err(ubi, "VID header offset %d too large.", ubi->vid_hdr_offset);
|
||||
- return -EINVAL;
|
||||
- }
|
||||
-
|
||||
dbg_gen("min_io_size %d", ubi->min_io_size);
|
||||
dbg_gen("max_write_size %d", ubi->max_write_size);
|
||||
dbg_gen("hdrs_min_io_size %d", ubi->hdrs_min_io_size);
|
||||
@@ -688,6 +682,21 @@ static int io_init(struct ubi_device *ub
|
||||
ubi->vid_hdr_aloffset;
|
||||
}
|
||||
|
||||
+ /*
|
||||
+ * Memory allocation for VID header is ubi->vid_hdr_alsize
|
||||
+ * which is described in comments in io.c.
|
||||
+ * Make sure VID header shift + UBI_VID_HDR_SIZE not exceeds
|
||||
+ * ubi->vid_hdr_alsize, so that all vid header operations
|
||||
+ * won't access memory out of bounds.
|
||||
+ */
|
||||
+ if ((ubi->vid_hdr_shift + UBI_VID_HDR_SIZE) > ubi->vid_hdr_alsize) {
|
||||
+ ubi_err(ubi, "Invalid VID header offset %d, VID header shift(%d)"
|
||||
+ " + VID header size(%zu) > VID header aligned size(%d).",
|
||||
+ ubi->vid_hdr_offset, ubi->vid_hdr_shift,
|
||||
+ UBI_VID_HDR_SIZE, ubi->vid_hdr_alsize);
|
||||
+ return -EINVAL;
|
||||
+ }
|
||||
+
|
||||
/* Similar for the data offset */
|
||||
ubi->leb_start = ubi->vid_hdr_offset + UBI_VID_HDR_SIZE;
|
||||
ubi->leb_start = ALIGN(ubi->leb_start, ubi->min_io_size);
|
||||
@ -423,7 +423,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
if (bgmac->irq < 0)
|
||||
--- a/drivers/net/ethernet/cadence/macb_main.c
|
||||
+++ b/drivers/net/ethernet/cadence/macb_main.c
|
||||
@@ -4480,7 +4480,6 @@ static int macb_probe(struct platform_de
|
||||
@@ -4484,7 +4484,6 @@ static int macb_probe(struct platform_de
|
||||
struct net_device *dev;
|
||||
struct resource *regs;
|
||||
void __iomem *mem;
|
||||
@ -431,7 +431,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
struct macb *bp;
|
||||
int err, val;
|
||||
|
||||
@@ -4593,15 +4592,11 @@ static int macb_probe(struct platform_de
|
||||
@@ -4597,15 +4596,11 @@ static int macb_probe(struct platform_de
|
||||
if (bp->caps & MACB_CAPS_NEEDS_RSTONUBR)
|
||||
bp->rx_intr_mask |= MACB_BIT(RXUBR);
|
||||
|
||||
@ -1360,7 +1360,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
int irq;
|
||||
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
|
||||
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
|
||||
@@ -5015,7 +5015,7 @@ int stmmac_dvr_probe(struct device *devi
|
||||
@@ -5019,7 +5019,7 @@ int stmmac_dvr_probe(struct device *devi
|
||||
priv->wol_irq = res->wol_irq;
|
||||
priv->lpi_irq = res->lpi_irq;
|
||||
|
||||
|
||||
@ -88,7 +88,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
--- a/init/Kconfig
|
||||
+++ b/init/Kconfig
|
||||
@@ -2352,6 +2352,13 @@ config UNUSED_KSYMS_WHITELIST
|
||||
@@ -2364,6 +2364,13 @@ config UNUSED_KSYMS_WHITELIST
|
||||
one per line. The path can be absolute, or relative to the kernel
|
||||
source tree.
|
||||
|
||||
|
||||
@ -12,7 +12,7 @@ Submitted-by: Rosen Penev <rosenp@gmail.com>
|
||||
|
||||
--- a/init/Kconfig
|
||||
+++ b/init/Kconfig
|
||||
@@ -2384,7 +2384,7 @@ config PADATA
|
||||
@@ -2396,7 +2396,7 @@ config PADATA
|
||||
bool
|
||||
|
||||
config ASN1
|
||||
|
||||
@ -178,7 +178,7 @@ Submitted-by: Daniel Golle <daniel@makrotopia.org>
|
||||
__le64 signature;
|
||||
--- a/drivers/mtd/mtdblock.c
|
||||
+++ b/drivers/mtd/mtdblock.c
|
||||
@@ -334,7 +334,11 @@ static void mtdblock_remove_dev(struct m
|
||||
@@ -338,7 +338,11 @@ static void mtdblock_remove_dev(struct m
|
||||
static struct mtd_blktrans_ops mtdblock_tr = {
|
||||
.name = "mtdblock",
|
||||
.major = MTD_BLOCK_MAJOR,
|
||||
|
||||
@ -13,7 +13,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
--- a/init/Kconfig
|
||||
+++ b/init/Kconfig
|
||||
@@ -1389,6 +1389,17 @@ config SYSCTL_ARCH_UNALIGN_ALLOW
|
||||
@@ -1401,6 +1401,17 @@ config SYSCTL_ARCH_UNALIGN_ALLOW
|
||||
the unaligned access emulation.
|
||||
see arch/parisc/kernel/unaligned.c for reference
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
|
||||
|
||||
--- a/init/Kconfig
|
||||
+++ b/init/Kconfig
|
||||
@@ -1805,6 +1805,15 @@ config EMBEDDED
|
||||
@@ -1817,6 +1817,15 @@ config EMBEDDED
|
||||
an embedded system so certain expert options are available
|
||||
for configuration.
|
||||
|
||||
|
||||
@ -39,7 +39,7 @@ Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
|
||||
#define RTL8366RB_POWER_SAVE 0x15
|
||||
#define RTL8366RB_POWER_SAVE_ON BIT(12)
|
||||
|
||||
@@ -841,6 +850,43 @@ static irqreturn_t rtl9000a_handle_inter
|
||||
@@ -841,6 +850,48 @@ static irqreturn_t rtl9000a_handle_inter
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
||||
@ -48,8 +48,13 @@ Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
|
||||
+ u16 option_mode;
|
||||
+
|
||||
+ switch (phydev->interface) {
|
||||
+ case PHY_INTERFACE_MODE_SGMII:
|
||||
+ case PHY_INTERFACE_MODE_2500BASEX:
|
||||
+ if (!phydev->is_c45) {
|
||||
+ option_mode = RTL8221B_SERDES_OPTION_MODE_2500BASEX;
|
||||
+ break;
|
||||
+ }
|
||||
+ fallthrough;
|
||||
+ case PHY_INTERFACE_MODE_SGMII:
|
||||
+ option_mode = RTL8221B_SERDES_OPTION_MODE_2500BASEX_SGMII;
|
||||
+ break;
|
||||
+ default:
|
||||
@ -57,24 +62,24 @@ Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
|
||||
+ }
|
||||
+
|
||||
+ phy_write_mmd(phydev, RTL8221B_MMD_SERDES_CTRL,
|
||||
+ 0x75f3, 0);
|
||||
+ 0x75f3, 0);
|
||||
+
|
||||
+ phy_modify_mmd_changed(phydev, RTL8221B_MMD_SERDES_CTRL,
|
||||
+ RTL8221B_SERDES_OPTION,
|
||||
+ RTL8221B_SERDES_OPTION_MODE_MASK, option_mode);
|
||||
+ switch (option_mode) {
|
||||
+ case RTL8221B_SERDES_OPTION_MODE_2500BASEX_SGMII:
|
||||
+ case RTL8221B_SERDES_OPTION_MODE_2500BASEX:
|
||||
+ phy_write_mmd(phydev, RTL8221B_MMD_SERDES_CTRL, 0x6a04, 0x0503);
|
||||
+ phy_write_mmd(phydev, RTL8221B_MMD_SERDES_CTRL, 0x6f10, 0xd455);
|
||||
+ phy_write_mmd(phydev, RTL8221B_MMD_SERDES_CTRL, 0x6f11, 0x8020);
|
||||
+ break;
|
||||
+ case RTL8221B_SERDES_OPTION_MODE_HISGMII_SGMII:
|
||||
+ case RTL8221B_SERDES_OPTION_MODE_HISGMII:
|
||||
+ phy_write_mmd(phydev, RTL8221B_MMD_SERDES_CTRL, 0x6a04, 0x0503);
|
||||
+ phy_write_mmd(phydev, RTL8221B_MMD_SERDES_CTRL, 0x6f10, 0xd433);
|
||||
+ phy_write_mmd(phydev, RTL8221B_MMD_SERDES_CTRL, 0x6f11, 0x8020);
|
||||
+ break;
|
||||
+ case RTL8221B_SERDES_OPTION_MODE_2500BASEX_SGMII:
|
||||
+ case RTL8221B_SERDES_OPTION_MODE_2500BASEX:
|
||||
+ phy_write_mmd(phydev, RTL8221B_MMD_SERDES_CTRL, 0x6a04, 0x0503);
|
||||
+ phy_write_mmd(phydev, RTL8221B_MMD_SERDES_CTRL, 0x6f10, 0xd455);
|
||||
+ phy_write_mmd(phydev, RTL8221B_MMD_SERDES_CTRL, 0x6f11, 0x8020);
|
||||
+ break;
|
||||
+ case RTL8221B_SERDES_OPTION_MODE_HISGMII_SGMII:
|
||||
+ case RTL8221B_SERDES_OPTION_MODE_HISGMII:
|
||||
+ phy_write_mmd(phydev, RTL8221B_MMD_SERDES_CTRL, 0x6a04, 0x0503);
|
||||
+ phy_write_mmd(phydev, RTL8221B_MMD_SERDES_CTRL, 0x6f10, 0xd433);
|
||||
+ phy_write_mmd(phydev, RTL8221B_MMD_SERDES_CTRL, 0x6f11, 0x8020);
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
@ -83,19 +88,19 @@ Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
|
||||
static struct phy_driver realtek_drvs[] = {
|
||||
{
|
||||
PHY_ID_MATCH_EXACT(0x00008201),
|
||||
@@ -981,6 +1027,7 @@ static struct phy_driver realtek_drvs[]
|
||||
@@ -981,6 +1032,7 @@ static struct phy_driver realtek_drvs[]
|
||||
PHY_ID_MATCH_EXACT(0x001cc849),
|
||||
.name = "RTL8221B-VB-CG 2.5Gbps PHY",
|
||||
.get_features = rtl822x_get_features,
|
||||
+ .config_init = rtl8221b_config_init,
|
||||
+ .config_init = rtl8221b_config_init,
|
||||
.config_aneg = rtl822x_config_aneg,
|
||||
.read_status = rtl822x_read_status,
|
||||
.suspend = genphy_suspend,
|
||||
@@ -992,6 +1039,7 @@ static struct phy_driver realtek_drvs[]
|
||||
@@ -992,6 +1044,7 @@ static struct phy_driver realtek_drvs[]
|
||||
.name = "RTL8221B-VM-CG 2.5Gbps PHY",
|
||||
.get_features = rtl822x_get_features,
|
||||
.config_aneg = rtl822x_config_aneg,
|
||||
+ .config_init = rtl8221b_config_init,
|
||||
+ .config_init = rtl8221b_config_init,
|
||||
.read_status = rtl822x_read_status,
|
||||
.suspend = genphy_suspend,
|
||||
.resume = rtlgen_resume,
|
||||
|
||||
@ -52,7 +52,7 @@ Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
|
||||
return ret;
|
||||
|
||||
- return rtlgen_get_speed(phydev);
|
||||
+ if (phydev->link)
|
||||
+ if (phydev->is_c45 && phydev->link)
|
||||
+ rtl822x_update_interface(phydev);
|
||||
+
|
||||
+ return 0;
|
||||
|
||||
@ -15,7 +15,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||
|
||||
--- a/drivers/net/phy/realtek.c
|
||||
+++ b/drivers/net/phy/realtek.c
|
||||
@@ -1013,6 +1013,7 @@ static struct phy_driver realtek_drvs[]
|
||||
@@ -1018,6 +1018,7 @@ static struct phy_driver realtek_drvs[]
|
||||
.write_page = rtl821x_write_page,
|
||||
.read_mmd = rtl822x_read_mmd,
|
||||
.write_mmd = rtl822x_write_mmd,
|
||||
@ -23,7 +23,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||
}, {
|
||||
PHY_ID_MATCH_EXACT(0x001cc840),
|
||||
.name = "RTL8226B_RTL8221B 2.5Gbps PHY",
|
||||
@@ -1025,6 +1026,7 @@ static struct phy_driver realtek_drvs[]
|
||||
@@ -1030,6 +1031,7 @@ static struct phy_driver realtek_drvs[]
|
||||
.write_page = rtl821x_write_page,
|
||||
.read_mmd = rtl822x_read_mmd,
|
||||
.write_mmd = rtl822x_write_mmd,
|
||||
@ -31,7 +31,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||
}, {
|
||||
PHY_ID_MATCH_EXACT(0x001cc838),
|
||||
.name = "RTL8226-CG 2.5Gbps PHY",
|
||||
@@ -1035,6 +1037,7 @@ static struct phy_driver realtek_drvs[]
|
||||
@@ -1040,6 +1042,7 @@ static struct phy_driver realtek_drvs[]
|
||||
.resume = rtlgen_resume,
|
||||
.read_page = rtl821x_read_page,
|
||||
.write_page = rtl821x_write_page,
|
||||
@ -39,7 +39,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||
}, {
|
||||
PHY_ID_MATCH_EXACT(0x001cc848),
|
||||
.name = "RTL8226B-CG_RTL8221B-CG 2.5Gbps PHY",
|
||||
@@ -1045,6 +1048,7 @@ static struct phy_driver realtek_drvs[]
|
||||
@@ -1050,6 +1053,7 @@ static struct phy_driver realtek_drvs[]
|
||||
.resume = rtlgen_resume,
|
||||
.read_page = rtl821x_read_page,
|
||||
.write_page = rtl821x_write_page,
|
||||
@ -47,7 +47,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||
}, {
|
||||
PHY_ID_MATCH_EXACT(0x001cc849),
|
||||
.name = "RTL8221B-VB-CG 2.5Gbps PHY",
|
||||
@@ -1056,6 +1060,7 @@ static struct phy_driver realtek_drvs[]
|
||||
@@ -1061,6 +1065,7 @@ static struct phy_driver realtek_drvs[]
|
||||
.resume = rtlgen_resume,
|
||||
.read_page = rtl821x_read_page,
|
||||
.write_page = rtl821x_write_page,
|
||||
@ -55,7 +55,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||
}, {
|
||||
PHY_ID_MATCH_EXACT(0x001cc84a),
|
||||
.name = "RTL8221B-VM-CG 2.5Gbps PHY",
|
||||
@@ -1067,6 +1072,7 @@ static struct phy_driver realtek_drvs[]
|
||||
@@ -1072,6 +1077,7 @@ static struct phy_driver realtek_drvs[]
|
||||
.resume = rtlgen_resume,
|
||||
.read_page = rtl821x_read_page,
|
||||
.write_page = rtl821x_write_page,
|
||||
|
||||
@ -26,17 +26,17 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||
+ int val;
|
||||
|
||||
switch (phydev->interface) {
|
||||
case PHY_INTERFACE_MODE_SGMII:
|
||||
@@ -906,6 +907,13 @@ static int rtl8221b_config_init(struct p
|
||||
break;
|
||||
case PHY_INTERFACE_MODE_2500BASEX:
|
||||
@@ -911,6 +912,13 @@ static int rtl8221b_config_init(struct p
|
||||
break;
|
||||
}
|
||||
|
||||
+ /* Disable SGMII AN */
|
||||
+ phy_write_mmd(phydev, RTL8221B_MMD_SERDES_CTRL, 0x7588, 0x2);
|
||||
+ phy_write_mmd(phydev, RTL8221B_MMD_SERDES_CTRL, 0x7589, 0x71d0);
|
||||
+ phy_write_mmd(phydev, RTL8221B_MMD_SERDES_CTRL, 0x7587, 0x3);
|
||||
+ phy_read_mmd_poll_timeout(phydev, RTL8221B_MMD_SERDES_CTRL, 0x7587, val,
|
||||
+ !(val & BIT(0)), 500, 100000, false);
|
||||
+ phy_read_mmd_poll_timeout(phydev, RTL8221B_MMD_SERDES_CTRL, 0x7587,
|
||||
+ val, !(val & BIT(0)), 500, 100000, false);
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -0,0 +1,27 @@
|
||||
From 934cdd67e7cf71f97a2a8aea2892e540af47dcdf Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Golle <daniel@makrotopia.org>
|
||||
Date: Sat, 22 Apr 2023 01:21:14 +0100
|
||||
Subject: [PATCH 1/3] net: phy: realtek: use phy_read_paged instead of open
|
||||
coding
|
||||
|
||||
Instead of open coding a paged read, use the phy_read_paged function
|
||||
in rtlgen_supports_2_5gbps.
|
||||
|
||||
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||
---
|
||||
drivers/net/phy/realtek.c | 4 +---
|
||||
1 file changed, 1 insertion(+), 3 deletions(-)
|
||||
|
||||
--- a/drivers/net/phy/realtek.c
|
||||
+++ b/drivers/net/phy/realtek.c
|
||||
@@ -727,9 +727,7 @@ static bool rtlgen_supports_2_5gbps(stru
|
||||
{
|
||||
int val;
|
||||
|
||||
- phy_write(phydev, RTL821x_PAGE_SELECT, 0xa61);
|
||||
- val = phy_read(phydev, 0x13);
|
||||
- phy_write(phydev, RTL821x_PAGE_SELECT, 0);
|
||||
+ val = phy_read_paged(phydev, 0xa61, 0x13);
|
||||
|
||||
return val >= 0 && val & RTL_SUPPORTS_2500FULL;
|
||||
}
|
||||
@ -0,0 +1,60 @@
|
||||
From 92c8b9d558160d94b981dd8a2b9c47657627ffdc Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Golle <daniel@makrotopia.org>
|
||||
Date: Sat, 22 Apr 2023 01:23:08 +0100
|
||||
Subject: [PATCH 2/3] net: phy: realtek: use inline functions for 10GbE
|
||||
advertisement
|
||||
|
||||
Use existing generic inline functions to encode local advertisement
|
||||
of 10GbE link modes as well as to decode link-partner advertisement.
|
||||
|
||||
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||
---
|
||||
drivers/net/phy/realtek.c | 22 +++++-----------------
|
||||
1 file changed, 5 insertions(+), 17 deletions(-)
|
||||
|
||||
--- a/drivers/net/phy/realtek.c
|
||||
+++ b/drivers/net/phy/realtek.c
|
||||
@@ -68,10 +68,6 @@
|
||||
#define RTL_SUPPORTS_5000FULL BIT(14)
|
||||
#define RTL_SUPPORTS_2500FULL BIT(13)
|
||||
#define RTL_SUPPORTS_10000FULL BIT(0)
|
||||
-#define RTL_ADV_2500FULL BIT(7)
|
||||
-#define RTL_LPADV_10000FULL BIT(11)
|
||||
-#define RTL_LPADV_5000FULL BIT(6)
|
||||
-#define RTL_LPADV_2500FULL BIT(5)
|
||||
|
||||
#define RTL9000A_GINMR 0x14
|
||||
#define RTL9000A_GINMR_LINK_STATUS BIT(4)
|
||||
@@ -661,14 +657,11 @@ static int rtl822x_config_aneg(struct ph
|
||||
int ret = 0;
|
||||
|
||||
if (phydev->autoneg == AUTONEG_ENABLE) {
|
||||
- u16 adv2500 = 0;
|
||||
-
|
||||
- if (linkmode_test_bit(ETHTOOL_LINK_MODE_2500baseT_Full_BIT,
|
||||
- phydev->advertising))
|
||||
- adv2500 = RTL_ADV_2500FULL;
|
||||
-
|
||||
ret = phy_modify_paged_changed(phydev, 0xa5d, 0x12,
|
||||
- RTL_ADV_2500FULL, adv2500);
|
||||
+ MDIO_AN_10GBT_CTRL_ADV10G |
|
||||
+ MDIO_AN_10GBT_CTRL_ADV5G |
|
||||
+ MDIO_AN_10GBT_CTRL_ADV2_5G,
|
||||
+ linkmode_adv_to_mii_10gbt_adv_t(phydev->advertising));
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
}
|
||||
@@ -705,12 +698,7 @@ static int rtl822x_read_status(struct ph
|
||||
if (lpadv < 0)
|
||||
return lpadv;
|
||||
|
||||
- linkmode_mod_bit(ETHTOOL_LINK_MODE_10000baseT_Full_BIT,
|
||||
- phydev->lp_advertising, lpadv & RTL_LPADV_10000FULL);
|
||||
- linkmode_mod_bit(ETHTOOL_LINK_MODE_5000baseT_Full_BIT,
|
||||
- phydev->lp_advertising, lpadv & RTL_LPADV_5000FULL);
|
||||
- linkmode_mod_bit(ETHTOOL_LINK_MODE_2500baseT_Full_BIT,
|
||||
- phydev->lp_advertising, lpadv & RTL_LPADV_2500FULL);
|
||||
+ mii_10gbt_stat_mod_linkmode_lpa_t(phydev->lp_advertising, lpadv);
|
||||
}
|
||||
|
||||
ret = rtlgen_read_status(phydev);
|
||||
@ -0,0 +1,28 @@
|
||||
From 929bb4d3cfbc7878326c0771a01a636d49c54b40 Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Golle <daniel@makrotopia.org>
|
||||
Date: Sat, 22 Apr 2023 01:25:39 +0100
|
||||
Subject: [PATCH 3/3] net: phy: realtek: check validity of 10GbE link-partner
|
||||
advertisement
|
||||
|
||||
Only use link-partner advertisement bits for 10GbE modes if they are
|
||||
actually valid. Check LOCALOK and REMOTEOK bits and clear 10GbE modes
|
||||
unless both of them are set.
|
||||
|
||||
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||
---
|
||||
drivers/net/phy/realtek.c | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
--- a/drivers/net/phy/realtek.c
|
||||
+++ b/drivers/net/phy/realtek.c
|
||||
@@ -698,6 +698,10 @@ static int rtl822x_read_status(struct ph
|
||||
if (lpadv < 0)
|
||||
return lpadv;
|
||||
|
||||
+ if (!(lpadv & MDIO_AN_10GBT_STAT_REMOK) ||
|
||||
+ !(lpadv & MDIO_AN_10GBT_STAT_LOCOK))
|
||||
+ lpadv = 0;
|
||||
+
|
||||
mii_10gbt_stat_mod_linkmode_lpa_t(phydev->lp_advertising, lpadv);
|
||||
}
|
||||
|
||||
@ -0,0 +1,100 @@
|
||||
From 9155098547fb1172d4fa536f3f6bc9d42f59d08c Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Golle <daniel@makrotopia.org>
|
||||
Date: Sat, 22 Apr 2023 03:26:01 +0100
|
||||
Subject: [PATCH] net: phy: realtek: setup ALDPS on RTL822x
|
||||
|
||||
Setup Link Down Power Saving Mode according the DTS property
|
||||
just like for RTL821x 1GE PHYs.
|
||||
|
||||
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||
---
|
||||
drivers/net/phy/realtek.c | 11 +++++++++++
|
||||
1 file changed, 11 insertions(+)
|
||||
|
||||
--- a/drivers/net/phy/realtek.c
|
||||
+++ b/drivers/net/phy/realtek.c
|
||||
@@ -62,6 +62,10 @@
|
||||
#define RTL8221B_SERDES_OPTION_MODE_2500BASEX 2
|
||||
#define RTL8221B_SERDES_OPTION_MODE_HISGMII 3
|
||||
|
||||
+#define RTL8221B_PHYCR1 0xa430
|
||||
+#define RTL8221B_PHYCR1_ALDPS_EN BIT(2)
|
||||
+#define RTL8221B_PHYCR1_ALDPS_XTAL_OFF_EN BIT(12)
|
||||
+
|
||||
#define RTL8366RB_POWER_SAVE 0x15
|
||||
#define RTL8366RB_POWER_SAVE_ON BIT(12)
|
||||
|
||||
@@ -736,6 +740,25 @@ static int rtl8226_match_phy_device(stru
|
||||
rtlgen_supports_2_5gbps(phydev);
|
||||
}
|
||||
|
||||
+static int rtl822x_probe(struct phy_device *phydev)
|
||||
+{
|
||||
+ struct device *dev = &phydev->mdio.dev;
|
||||
+ int val;
|
||||
+
|
||||
+ val = phy_read_mmd(phydev, RTL8221B_MMD_SERDES_CTRL, RTL8221B_PHYCR1);
|
||||
+ if (val < 0)
|
||||
+ return val;
|
||||
+
|
||||
+ if (of_property_read_bool(dev->of_node, "realtek,aldps-enable"))
|
||||
+ val |= RTL8221B_PHYCR1_ALDPS_EN | RTL8221B_PHYCR1_ALDPS_XTAL_OFF_EN;
|
||||
+ else
|
||||
+ val &= ~(RTL8221B_PHYCR1_ALDPS_EN | RTL8221B_PHYCR1_ALDPS_XTAL_OFF_EN);
|
||||
+
|
||||
+ phy_write_mmd(phydev, RTL8221B_MMD_SERDES_CTRL, RTL8221B_PHYCR1, val);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
static int rtlgen_resume(struct phy_device *phydev)
|
||||
{
|
||||
int ret = genphy_resume(phydev);
|
||||
@@ -1009,6 +1032,7 @@ static struct phy_driver realtek_drvs[]
|
||||
.match_phy_device = rtl8226_match_phy_device,
|
||||
.get_features = rtl822x_get_features,
|
||||
.config_aneg = rtl822x_config_aneg,
|
||||
+ .probe = rtl822x_probe,
|
||||
.read_status = rtl822x_read_status,
|
||||
.suspend = genphy_suspend,
|
||||
.resume = rtlgen_resume,
|
||||
@@ -1022,6 +1046,7 @@ static struct phy_driver realtek_drvs[]
|
||||
.name = "RTL8226B_RTL8221B 2.5Gbps PHY",
|
||||
.get_features = rtl822x_get_features,
|
||||
.config_aneg = rtl822x_config_aneg,
|
||||
+ .probe = rtl822x_probe,
|
||||
.read_status = rtl822x_read_status,
|
||||
.suspend = genphy_suspend,
|
||||
.resume = rtlgen_resume,
|
||||
@@ -1035,6 +1060,7 @@ static struct phy_driver realtek_drvs[]
|
||||
.name = "RTL8226-CG 2.5Gbps PHY",
|
||||
.get_features = rtl822x_get_features,
|
||||
.config_aneg = rtl822x_config_aneg,
|
||||
+ .probe = rtl822x_probe,
|
||||
.read_status = rtl822x_read_status,
|
||||
.suspend = genphy_suspend,
|
||||
.resume = rtlgen_resume,
|
||||
@@ -1046,6 +1072,7 @@ static struct phy_driver realtek_drvs[]
|
||||
.name = "RTL8226B-CG_RTL8221B-CG 2.5Gbps PHY",
|
||||
.get_features = rtl822x_get_features,
|
||||
.config_aneg = rtl822x_config_aneg,
|
||||
+ .probe = rtl822x_probe,
|
||||
.read_status = rtl822x_read_status,
|
||||
.suspend = genphy_suspend,
|
||||
.resume = rtlgen_resume,
|
||||
@@ -1058,6 +1085,7 @@ static struct phy_driver realtek_drvs[]
|
||||
.get_features = rtl822x_get_features,
|
||||
.config_init = rtl8221b_config_init,
|
||||
.config_aneg = rtl822x_config_aneg,
|
||||
+ .probe = rtl822x_probe,
|
||||
.read_status = rtl822x_read_status,
|
||||
.suspend = genphy_suspend,
|
||||
.resume = rtlgen_resume,
|
||||
@@ -1070,6 +1098,7 @@ static struct phy_driver realtek_drvs[]
|
||||
.get_features = rtl822x_get_features,
|
||||
.config_aneg = rtl822x_config_aneg,
|
||||
.config_init = rtl8221b_config_init,
|
||||
+ .probe = rtl822x_probe,
|
||||
.read_status = rtl822x_read_status,
|
||||
.suspend = genphy_suspend,
|
||||
.resume = rtlgen_resume,
|
||||
@ -29,7 +29,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
|
||||
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
|
||||
@@ -5048,6 +5048,10 @@ int stmmac_dvr_probe(struct device *devi
|
||||
@@ -5052,6 +5052,10 @@ int stmmac_dvr_probe(struct device *devi
|
||||
reset_control_reset(priv->plat->stmmac_rst);
|
||||
}
|
||||
|
||||
@ -40,7 +40,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
/* Init MAC and get the capabilities */
|
||||
ret = stmmac_hw_init(priv);
|
||||
if (ret)
|
||||
@@ -5262,6 +5266,7 @@ int stmmac_dvr_remove(struct device *dev
|
||||
@@ -5266,6 +5270,7 @@ int stmmac_dvr_remove(struct device *dev
|
||||
phylink_destroy(priv->phylink);
|
||||
if (priv->plat->stmmac_rst)
|
||||
reset_control_assert(priv->plat->stmmac_rst);
|
||||
|
||||
258
target/linux/mediatek/dts/mt7986a-tplink-tl-xdr-common.dtsi
Normal file
258
target/linux/mediatek/dts/mt7986a-tplink-tl-xdr-common.dtsi
Normal file
@ -0,0 +1,258 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/input/input.h>
|
||||
|
||||
#include "mt7986a.dtsi"
|
||||
|
||||
/ {
|
||||
aliases {
|
||||
serial0 = &uart0;
|
||||
label-mac-device = &gmac0;
|
||||
led-boot = &led_status_green;
|
||||
led-failsafe = &led_status_red;
|
||||
led-running = &led_status_green;
|
||||
led-upgrade = &led_status_red;
|
||||
};
|
||||
|
||||
chosen {
|
||||
stdout-path = "serial0:115200n8";
|
||||
};
|
||||
|
||||
memory {
|
||||
reg = <0 0x40000000 0 0x20000000>;
|
||||
};
|
||||
|
||||
reg_3p3v: regulator-3p3v {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "fixed-3.3V";
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
regulator-boot-on;
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
reg_5v: regulator-5v {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "fixed-5V";
|
||||
regulator-min-microvolt = <5000000>;
|
||||
regulator-max-microvolt = <5000000>;
|
||||
regulator-boot-on;
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
keys {
|
||||
compatible = "gpio-keys";
|
||||
|
||||
reset {
|
||||
label = "reset";
|
||||
linux,code = <KEY_RESTART>;
|
||||
gpios = <&pio 9 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
wps {
|
||||
label = "wps";
|
||||
linux,code = <KEY_WPS_BUTTON>;
|
||||
gpios = <&pio 10 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
turbo {
|
||||
label = "turbo";
|
||||
linux,code = <BTN_1>;
|
||||
gpios = <&pio 11 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
led_status_red: status_red {
|
||||
label = "red:status";
|
||||
gpios = <&pio 7 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
led_status_green: status_green {
|
||||
label = "green:status";
|
||||
gpios = <&pio 8 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
turbo {
|
||||
label = "green:turbo";
|
||||
gpios = <&pio 12 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
ð {
|
||||
status = "okay";
|
||||
|
||||
gmac0: mac@0 {
|
||||
compatible = "mediatek,eth-mac";
|
||||
reg = <0>;
|
||||
phy-mode = "2500base-x";
|
||||
|
||||
nvmem-cells = <&macaddr_config_1c>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
|
||||
fixed-link {
|
||||
speed = <2500>;
|
||||
full-duplex;
|
||||
pause;
|
||||
};
|
||||
};
|
||||
|
||||
gmac1: mac@1 {
|
||||
compatible = "mediatek,eth-mac";
|
||||
reg = <1>;
|
||||
phy-handle = <&phy7>;
|
||||
phy-mode = "2500base-x";
|
||||
|
||||
nvmem-cells = <&macaddr_config_1c>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
mac-address-increment = <1>;
|
||||
};
|
||||
|
||||
mdio: mdio-bus {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
};
|
||||
};
|
||||
|
||||
&mdio {
|
||||
phy5: ethernet-phy@5 {
|
||||
compatible = "ethernet-phy-ieee802.3-c45";
|
||||
reg = <5>;
|
||||
reset-assert-us = <100000>;
|
||||
reset-deassert-us = <100000>;
|
||||
reset-gpios = <&pio 13 GPIO_ACTIVE_LOW>;
|
||||
realtek,aldps-enable;
|
||||
};
|
||||
|
||||
phy7: ethernet-phy@7 {
|
||||
compatible = "ethernet-phy-ieee802.3-c45";
|
||||
reg = <7>;
|
||||
reset-assert-us = <100000>;
|
||||
reset-deassert-us = <100000>;
|
||||
reset-gpios = <&pio 17 GPIO_ACTIVE_LOW>;
|
||||
realtek,aldps-enable;
|
||||
};
|
||||
|
||||
switch: switch@31 {
|
||||
compatible = "mediatek,mt7531";
|
||||
reg = <31>;
|
||||
reset-gpios = <&pio 5 GPIO_ACTIVE_HIGH>;
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <1>;
|
||||
interrupt-parent = <&pio>;
|
||||
interrupts = <66 IRQ_TYPE_LEVEL_HIGH>;
|
||||
};
|
||||
};
|
||||
|
||||
&spi0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&spi_flash_pins>;
|
||||
status = "okay";
|
||||
|
||||
flash@0 {
|
||||
compatible = "spi-nand";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
reg = <0>;
|
||||
|
||||
spi-max-frequency = <20000000>;
|
||||
spi-tx-buswidth = <4>;
|
||||
spi-rx-buswidth = <4>;
|
||||
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
partition@0 {
|
||||
label = "bl2";
|
||||
reg = <0x000000 0x0100000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
config: partition@100000 {
|
||||
label = "config";
|
||||
reg = <0x100000 0x0060000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
factory: partition@160000 {
|
||||
label = "factory";
|
||||
reg = <0x160000 0x0060000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@1c0000 {
|
||||
label = "reserved";
|
||||
reg = <0x1c0000 0x01c0000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@380000 {
|
||||
label = "fip";
|
||||
reg = <0x380000 0x0200000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@580000 {
|
||||
label = "ubi";
|
||||
reg = <0x580000 0x7800000>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&pio {
|
||||
spi_flash_pins: spi-flash-pins-33-to-38 {
|
||||
mux {
|
||||
function = "spi";
|
||||
groups = "spi0", "spi0_wp_hold";
|
||||
};
|
||||
conf-pu {
|
||||
pins = "SPI2_CS", "SPI2_HOLD", "SPI2_WP";
|
||||
drive-strength = <8>;
|
||||
mediatek,pull-up-adv = <0>; /* bias-disable */
|
||||
};
|
||||
conf-pd {
|
||||
pins = "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO";
|
||||
drive-strength = <8>;
|
||||
mediatek,pull-down-adv = <0>; /* bias-disable */
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&ssusb {
|
||||
vusb33-supply = <®_3p3v>;
|
||||
vbus-supply = <®_5v>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb_phy {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&wmac {
|
||||
mediatek,mtd-eeprom = <&factory 0x0>;
|
||||
nvmem-cells = <&macaddr_config_1c>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
mac-address-increment = <2>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&config {
|
||||
compatible = "nvmem-cells";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
macaddr_config_1c: macaddr@1c {
|
||||
reg = <0x1c 0x6>;
|
||||
};
|
||||
};
|
||||
79
target/linux/mediatek/dts/mt7986a-tplink-tl-xdr4288.dts
Normal file
79
target/linux/mediatek/dts/mt7986a-tplink-tl-xdr4288.dts
Normal file
@ -0,0 +1,79 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
|
||||
/dts-v1/;
|
||||
#include "mt7986a-tplink-tl-xdr-common.dtsi"
|
||||
|
||||
/ {
|
||||
model = "TP-Link TL-XDR4288";
|
||||
compatible = "tplink,tl-xdr4288", "mediatek,mt7986a";
|
||||
};
|
||||
|
||||
&switch {
|
||||
ports {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
port@0 {
|
||||
reg = <0>;
|
||||
label = "lan1";
|
||||
};
|
||||
|
||||
port@1 {
|
||||
reg = <1>;
|
||||
label = "lan2";
|
||||
};
|
||||
|
||||
port@2 {
|
||||
reg = <2>;
|
||||
label = "lan3";
|
||||
};
|
||||
|
||||
port@3 {
|
||||
reg = <3>;
|
||||
label = "lan4";
|
||||
};
|
||||
|
||||
port@5 {
|
||||
reg = <5>;
|
||||
label = "lan5";
|
||||
phy-handle = <&phy5>;
|
||||
phy-mode = "2500base-x";
|
||||
};
|
||||
|
||||
port@6 {
|
||||
reg = <6>;
|
||||
ethernet = <&gmac0>;
|
||||
phy-mode = "2500base-x";
|
||||
|
||||
fixed-link {
|
||||
speed = <2500>;
|
||||
full-duplex;
|
||||
pause;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&pio {
|
||||
wf_dbdc_pins: wf-dbdc-pins {
|
||||
mux {
|
||||
function = "wifi";
|
||||
groups = "wf_dbdc";
|
||||
};
|
||||
conf {
|
||||
pins = "WF0_HB1", "WF0_HB2", "WF0_HB3", "WF0_HB4",
|
||||
"WF0_HB0", "WF0_HB0_B", "WF0_HB5", "WF0_HB6",
|
||||
"WF0_HB7", "WF0_HB8", "WF0_HB9", "WF0_HB10",
|
||||
"WF0_TOP_CLK", "WF0_TOP_DATA", "WF1_HB1",
|
||||
"WF1_HB2", "WF1_HB3", "WF1_HB4", "WF1_HB0",
|
||||
"WF1_HB5", "WF1_HB6", "WF1_HB7", "WF1_HB8",
|
||||
"WF1_TOP_CLK", "WF1_TOP_DATA";
|
||||
drive-strength = <4>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&wmac {
|
||||
pinctrl-names = "dbdc";
|
||||
pinctrl-0 = <&wf_dbdc_pins>;
|
||||
};
|
||||
64
target/linux/mediatek/dts/mt7986a-tplink-tl-xdr6086.dts
Normal file
64
target/linux/mediatek/dts/mt7986a-tplink-tl-xdr6086.dts
Normal file
@ -0,0 +1,64 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
|
||||
/dts-v1/;
|
||||
#include "mt7986a-tplink-tl-xdr-common.dtsi"
|
||||
|
||||
/ {
|
||||
model = "TP-Link TL-XDR6086";
|
||||
compatible = "tplink,tl-xdr6086", "mediatek,mt7986a";
|
||||
};
|
||||
|
||||
&switch {
|
||||
ports {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
port@0 {
|
||||
reg = <0>;
|
||||
label = "lan1";
|
||||
};
|
||||
|
||||
port@5 {
|
||||
reg = <5>;
|
||||
label = "lan2";
|
||||
phy-handle = <&phy5>;
|
||||
phy-mode = "2500base-x";
|
||||
};
|
||||
|
||||
port@6 {
|
||||
reg = <6>;
|
||||
ethernet = <&gmac0>;
|
||||
phy-mode = "2500base-x";
|
||||
|
||||
fixed-link {
|
||||
speed = <2500>;
|
||||
full-duplex;
|
||||
pause;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&pio {
|
||||
wf_2g_5g_pins: wf_2g_5g-pins {
|
||||
mux {
|
||||
function = "wifi";
|
||||
groups = "wf_2g", "wf_5g";
|
||||
};
|
||||
conf {
|
||||
pins = "WF0_HB1", "WF0_HB2", "WF0_HB3", "WF0_HB4",
|
||||
"WF0_HB0", "WF0_HB0_B", "WF0_HB5", "WF0_HB6",
|
||||
"WF0_HB7", "WF0_HB8", "WF0_HB9", "WF0_HB10",
|
||||
"WF0_TOP_CLK", "WF0_TOP_DATA", "WF1_HB1",
|
||||
"WF1_HB2", "WF1_HB3", "WF1_HB4", "WF1_HB0",
|
||||
"WF1_HB5", "WF1_HB6", "WF1_HB7", "WF1_HB8",
|
||||
"WF1_TOP_CLK", "WF1_TOP_DATA";
|
||||
drive-strength = <4>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&wmac {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&wf_2g_5g_pins>;
|
||||
};
|
||||
79
target/linux/mediatek/dts/mt7986a-tplink-tl-xdr6088.dts
Normal file
79
target/linux/mediatek/dts/mt7986a-tplink-tl-xdr6088.dts
Normal file
@ -0,0 +1,79 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
|
||||
/dts-v1/;
|
||||
#include "mt7986a-tplink-tl-xdr-common.dtsi"
|
||||
|
||||
/ {
|
||||
model = "TP-Link TL-XDR6088";
|
||||
compatible = "tplink,tl-xdr6088", "mediatek,mt7986a";
|
||||
};
|
||||
|
||||
&switch {
|
||||
ports {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
port@0 {
|
||||
reg = <0>;
|
||||
label = "lan1";
|
||||
};
|
||||
|
||||
port@1 {
|
||||
reg = <1>;
|
||||
label = "lan2";
|
||||
};
|
||||
|
||||
port@2 {
|
||||
reg = <2>;
|
||||
label = "lan3";
|
||||
};
|
||||
|
||||
port@3 {
|
||||
reg = <3>;
|
||||
label = "lan4";
|
||||
};
|
||||
|
||||
port@5 {
|
||||
reg = <5>;
|
||||
label = "lan5";
|
||||
phy-handle = <&phy5>;
|
||||
phy-mode = "2500base-x";
|
||||
};
|
||||
|
||||
port@6 {
|
||||
reg = <6>;
|
||||
ethernet = <&gmac0>;
|
||||
phy-mode = "2500base-x";
|
||||
|
||||
fixed-link {
|
||||
speed = <2500>;
|
||||
full-duplex;
|
||||
pause;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&pio {
|
||||
wf_2g_5g_pins: wf_2g_5g-pins {
|
||||
mux {
|
||||
function = "wifi";
|
||||
groups = "wf_2g", "wf_5g";
|
||||
};
|
||||
conf {
|
||||
pins = "WF0_HB1", "WF0_HB2", "WF0_HB3", "WF0_HB4",
|
||||
"WF0_HB0", "WF0_HB0_B", "WF0_HB5", "WF0_HB6",
|
||||
"WF0_HB7", "WF0_HB8", "WF0_HB9", "WF0_HB10",
|
||||
"WF0_TOP_CLK", "WF0_TOP_DATA", "WF1_HB1",
|
||||
"WF1_HB2", "WF1_HB3", "WF1_HB4", "WF1_HB0",
|
||||
"WF1_HB5", "WF1_HB6", "WF1_HB7", "WF1_HB8",
|
||||
"WF1_TOP_CLK", "WF1_TOP_DATA";
|
||||
drive-strength = <4>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&wmac {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&wf_2g_5g_pins>;
|
||||
};
|
||||
@ -20,6 +20,13 @@ mediatek_setup_interfaces()
|
||||
mediatek,mt7986b-rfb)
|
||||
ucidef_set_interfaces_lan_wan "lan0 lan1 lan2 lan3" eth1
|
||||
;;
|
||||
tplink,tl-xdr4288|\
|
||||
tplink,tl-xdr6088)
|
||||
ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4 lan5" eth1
|
||||
;;
|
||||
tplink,tl-xdr6086)
|
||||
ucidef_set_interfaces_lan_wan "lan1 lan2" eth1
|
||||
;;
|
||||
xiaomi,redmi-router-ax6000|\
|
||||
xiaomi,redmi-router-ax6000-stock|\
|
||||
xiaomi,redmi-router-ax6000-ubootmod)
|
||||
|
||||
@ -24,4 +24,9 @@ case "$board" in
|
||||
[ "$PHYNBR" = "0" ] && macaddr_unsetbit $addr 6 > /sys${DEVPATH}/macaddress
|
||||
[ "$PHYNBR" = "1" ] && macaddr_setbit $addr 6 > /sys${DEVPATH}/macaddress
|
||||
;;
|
||||
tplink,tl-xdr4288|\
|
||||
tplink,tl-xdr6086|\
|
||||
tplink,tl-xdr6088)
|
||||
[ "$PHYNBR" = "0" ] && get_mac_label > /sys${DEVPATH}/macaddress
|
||||
;;
|
||||
esac
|
||||
|
||||
@ -67,15 +67,18 @@ platform_do_upgrade() {
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
tplink,tl-xdr4288|\
|
||||
tplink,tl-xdr6086|\
|
||||
tplink,tl-xdr6088|\
|
||||
xiaomi,redmi-router-ax6000-ubootmod)
|
||||
CI_KERNPART="fit"
|
||||
nand_do_upgrade "$1"
|
||||
;;
|
||||
xiaomi,redmi-router-ax6000-stock)
|
||||
CI_KERN_UBIPART=ubi_kernel
|
||||
CI_ROOT_UBIPART=ubi
|
||||
nand_do_upgrade "$1"
|
||||
;;
|
||||
xiaomi,redmi-router-ax6000-ubootmod)
|
||||
CI_KERNPART="fit"
|
||||
nand_do_upgrade "$1"
|
||||
;;
|
||||
*)
|
||||
nand_do_upgrade "$1"
|
||||
;;
|
||||
|
||||
@ -141,6 +141,50 @@ define Device/mediatek_mt7986b-rfb
|
||||
endef
|
||||
TARGET_DEVICES += mediatek_mt7986b-rfb
|
||||
|
||||
define Device/tplink_tl-xdr-common
|
||||
DEVICE_VENDOR := TP-Link
|
||||
DEVICE_DTS_DIR := ../dts
|
||||
UBINIZE_OPTS := -E 5
|
||||
BLOCKSIZE := 128k
|
||||
PAGESIZE := 2048
|
||||
KERNEL_IN_UBI := 1
|
||||
UBOOTENV_IN_UBI := 1
|
||||
IMAGES := sysupgrade.itb
|
||||
KERNEL_INITRAMFS_SUFFIX := -recovery.itb
|
||||
KERNEL := kernel-bin | gzip
|
||||
KERNEL_INITRAMFS := kernel-bin | lzma | \
|
||||
fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb with-initrd | pad-to 64k
|
||||
IMAGE/sysupgrade.itb := append-kernel | \
|
||||
fit gzip $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb external-static-with-rootfs | append-metadata
|
||||
DEVICE_PACKAGES := kmod-usb3 kmod-mt7986-firmware mt7986-wo-firmware
|
||||
ARTIFACTS := preloader.bin bl31-uboot.fip
|
||||
ARTIFACT/preloader.bin := bl2 spim-nand-ddr3
|
||||
endef
|
||||
|
||||
define Device/tplink_tl-xdr4288
|
||||
DEVICE_MODEL := TL-XDR4288
|
||||
DEVICE_DTS := mt7986a-tplink-tl-xdr4288
|
||||
ARTIFACT/bl31-uboot.fip := bl31-uboot tplink_tl-xdr4288
|
||||
$(call Device/tplink_tl-xdr-common)
|
||||
endef
|
||||
TARGET_DEVICES += tplink_tl-xdr4288
|
||||
|
||||
define Device/tplink_tl-xdr6086
|
||||
DEVICE_MODEL := TL-XDR6086
|
||||
DEVICE_DTS := mt7986a-tplink-tl-xdr6086
|
||||
ARTIFACT/bl31-uboot.fip := bl31-uboot tplink_tl-xdr6086
|
||||
$(call Device/tplink_tl-xdr-common)
|
||||
endef
|
||||
TARGET_DEVICES += tplink_tl-xdr6086
|
||||
|
||||
define Device/tplink_tl-xdr6088
|
||||
DEVICE_MODEL := TL-XDR6088
|
||||
DEVICE_DTS := mt7986a-tplink-tl-xdr6088
|
||||
ARTIFACT/bl31-uboot.fip := bl31-uboot tplink_tl-xdr6088
|
||||
$(call Device/tplink_tl-xdr-common)
|
||||
endef
|
||||
TARGET_DEVICES += tplink_tl-xdr6088
|
||||
|
||||
define Device/xiaomi_redmi-router-ax6000
|
||||
DEVICE_VENDOR := Xiaomi
|
||||
DEVICE_MODEL := Redmi Router AX6000
|
||||
|
||||
@ -10,7 +10,7 @@ Signed-off-by: Antoine Tenart <antoine.tenart@bootlin.com>
|
||||
|
||||
--- a/drivers/net/phy/sfp.c
|
||||
+++ b/drivers/net/phy/sfp.c
|
||||
@@ -1966,6 +1966,13 @@ static void sfp_sm_module(struct sfp *sf
|
||||
@@ -1968,6 +1968,13 @@ static void sfp_sm_module(struct sfp *sf
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@ -10,7 +10,7 @@ Signed-off-by: Antoine Tenart <antoine.tenart@bootlin.com>
|
||||
|
||||
--- a/drivers/net/phy/sfp.c
|
||||
+++ b/drivers/net/phy/sfp.c
|
||||
@@ -413,32 +413,72 @@ static int sfp_i2c_write(struct sfp *sfp
|
||||
@@ -419,32 +419,72 @@ static int sfp_i2c_write(struct sfp *sfp
|
||||
return ret == ARRAY_SIZE(msgs) ? len : 0;
|
||||
}
|
||||
|
||||
|
||||
@ -7,11 +7,11 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=isl
|
||||
PKG_VERSION:=0.25
|
||||
PKG_VERSION:=0.26
|
||||
|
||||
PKG_SOURCE_URL:=https://libisl.sourceforge.io/
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||
PKG_HASH:=be7b210647ccadf90a2f0b000fca11a4d40546374a850db67adb32fad4b230d9
|
||||
PKG_HASH:=a0b5cb06d24f9fa9e77b55fabbe9a3c94a336190345c2555f9915bb38e976504
|
||||
|
||||
HOST_BUILD_PARALLEL:=1
|
||||
|
||||
|
||||
@ -8,8 +8,8 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=libressl
|
||||
PKG_VERSION:=3.7.1
|
||||
PKG_HASH:=98086961a2b8b657ed0fea3056fb2db14294b6bfa193c15a5236a0a35c843ded
|
||||
PKG_VERSION:=3.7.2
|
||||
PKG_HASH:=b06aa538fefc9c6b33c4db4931a09a5f52d9d2357219afcbff7d93fe12ebf6f7
|
||||
|
||||
PKG_CPE_ID:=cpe:/a:openbsd:libressl
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user