diff --git a/include/image-commands.mk b/include/image-commands.mk index 64534f6848..fdaaadcde7 100644 --- a/include/image-commands.mk +++ b/include/image-commands.mk @@ -432,6 +432,8 @@ define Build/netgear-encrypted-factory --output-file $@ \ --model $(NETGEAR_ENC_MODEL) \ --region $(NETGEAR_ENC_REGION) \ + $(if $(NETGEAR_ENC_HW_ID_LIST),--hw-id-list "$(NETGEAR_ENC_HW_ID_LIST)") \ + $(if $(NETGEAR_ENC_MODEL_LIST),--model-list "$(NETGEAR_ENC_MODEL_LIST)") \ --version V1.0.0.0.$(shell cat $(VERSION_DIST)| sed -e 's/[[:space:]]/-/g').$(firstword $(subst -, ,$(REVISION))) \ --encryption-block-size 0x20000 \ --openssl-bin "$(STAGING_DIR_HOST)/bin/openssl" \ diff --git a/include/kernel-5.15 b/include/kernel-5.15 index aa4541d277..ac48a2e8b1 100644 --- a/include/kernel-5.15 +++ b/include/kernel-5.15 @@ -1,2 +1,2 @@ -LINUX_VERSION-5.15 = .118 -LINUX_KERNEL_HASH-5.15.118 = 4e6bf4dadb04d5d11d1d4cc37c0eabcf33bc333b7dd3dc2143c3099a823eb5b3 +LINUX_VERSION-5.15 = .119 +LINUX_KERNEL_HASH-5.15.119 = 7aa5a0fd3520947e5599e811d28acdc30e36446c016c7dcee3793e6d1cbecfcf diff --git a/package/boot/uboot-envtools/files/layerscape b/package/boot/uboot-envtools/files/layerscape index bc7dcf24f9..acc5a073ad 100644 --- a/package/boot/uboot-envtools/files/layerscape +++ b/package/boot/uboot-envtools/files/layerscape @@ -12,10 +12,6 @@ touch /etc/config/ubootenv board=$(board_name) case "$board" in - traverse,ls1043v|\ - traverse,ls1043s) - ubootenv_add_uci_config "/dev/mtd1" "0x40000" "0x2000" "0x20000" - ;; traverse,ten64) ubootenv_add_uci_config "/dev/mtd3" "0x0000" "0x80000" "0x80000" ;; diff --git a/package/boot/uboot-envtools/files/mediatek_filogic b/package/boot/uboot-envtools/files/mediatek_filogic index e67d3634d8..f53da65ef0 100644 --- a/package/boot/uboot-envtools/files/mediatek_filogic +++ b/package/boot/uboot-envtools/files/mediatek_filogic @@ -57,6 +57,7 @@ xiaomi,redmi-router-ax6000-stock) ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x20000" ubootenv_add_uci_sys_config "/dev/mtd2" "0x0" "0x10000" "0x20000" ;; +h3c,magic-nx30-pro|\ qihoo,360t7|\ tplink,tl-xdr4288|\ tplink,tl-xdr6086|\ diff --git a/package/boot/uboot-envtools/files/mediatek_mt7629 b/package/boot/uboot-envtools/files/mediatek_mt7629 index a5aa2b58a6..313fb6a448 100644 --- a/package/boot/uboot-envtools/files/mediatek_mt7629 +++ b/package/boot/uboot-envtools/files/mediatek_mt7629 @@ -12,7 +12,8 @@ touch /etc/config/ubootenv board=$(board_name) case "$board" in -iptime,a6004mx) +iptime,a6004mx|\ +netgear,ex6250-v2) ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" ;; esac diff --git a/package/boot/uboot-envtools/files/ramips b/package/boot/uboot-envtools/files/ramips index b23a76e27e..9a808cb722 100644 --- a/package/boot/uboot-envtools/files/ramips +++ b/package/boot/uboot-envtools/files/ramips @@ -45,6 +45,13 @@ etisalat,s3|\ rostelecom,rt-sf-1) ubootenv_add_uci_config "/dev/mtd0" "0x80000" "0x1000" "0x20000" ;; +beeline,smartbox-pro|\ +tplink,ec330-g5u-v1|\ +wifire,s1500-nbn) + idx="$(find_mtd_index u-boot-env)" + [ -n "$idx" ] && \ + ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x1000" "0x20000" + ;; buffalo,wsr-1166dhp|\ buffalo,wsr-600dhp|\ kroks,kndrt31r16|\ @@ -66,6 +73,7 @@ h3c,tx1806|\ jcg,q20|\ jcg,q20-pb-boot|\ linksys,e7350|\ +netgear,eax12|\ netgear,wax202|\ zyxel,wsm20) ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000" @@ -98,11 +106,6 @@ snr,cpe-w4n-mt) [ -n "$idx" ] && \ ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x1000" "0x1000" ;; -tplink,ec330-g5u-v1) - idx="$(find_mtd_index u-boot-env)" - [ -n "$idx" ] && \ - ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x1000" "0x20000" - ;; xiaomi,mi-router-3g-v2|\ xiaomi,mi-router-4a-gigabit|\ xiaomi,miwifi-3c) diff --git a/package/boot/uboot-mediatek/Makefile b/package/boot/uboot-mediatek/Makefile index 8ea05b9159..33fd7e086e 100644 --- a/package/boot/uboot-mediatek/Makefile +++ b/package/boot/uboot-mediatek/Makefile @@ -176,6 +176,18 @@ define U-Boot/mt7629_rfb UBOOT_CONFIG:=mt7629_rfb endef +define U-Boot/mt7981_h3c_magic-nx30-pro + NAME:=H3C Magic NX30 Pro + BUILD_SUBTARGET:=filogic + BUILD_DEVICES:=h3c_magic-nx30-pro + UBOOT_CONFIG:=mt7981_h3c_magic-nx30-pro + UBOOT_IMAGE:=u-boot.fip + BL2_BOOTDEV:=spim-nand + BL2_SOC:=mt7981 + BL2_DDRTYPE:=ddr3 + DEPENDS:=+trusted-firmware-a-mt7981-spim-nand-ddr3 +endef + define U-Boot/mt7981_qihoo_360t7 NAME:=Qihoo 360T7 BUILD_SUBTARGET:=filogic @@ -313,6 +325,7 @@ UBOOT_TARGETS := \ mt7628_rfb \ ravpower_rp-wd009 \ mt7629_rfb \ + mt7981_h3c_magic-nx30-pro \ mt7981_qihoo_360t7 \ mt7986_bananapi_bpi-r3-emmc \ mt7986_bananapi_bpi-r3-sdmmc \ diff --git a/package/boot/uboot-mediatek/patches/435-add-h3c_magic-nx30-pro.patch b/package/boot/uboot-mediatek/patches/435-add-h3c_magic-nx30-pro.patch new file mode 100644 index 0000000000..e7d1ce764c --- /dev/null +++ b/package/boot/uboot-mediatek/patches/435-add-h3c_magic-nx30-pro.patch @@ -0,0 +1,440 @@ +--- /dev/null ++++ b/configs/mt7981_h3c_magic-nx30-pro_defconfig +@@ -0,0 +1,175 @@ ++CONFIG_ARM=y ++CONFIG_POSITION_INDEPENDENT=y ++CONFIG_ARCH_MEDIATEK=y ++CONFIG_TARGET_MT7981=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="mt7981_h3c_magic-nx30-pro" ++CONFIG_DEFAULT_ENV_FILE="h3c_magic-nx30-pro_env" ++CONFIG_DEFAULT_FDT_FILE="mediatek/mt7981_h3c_magic-nx30-pro.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="MT7981> " ++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_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_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_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_MT7981=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/mt7981_h3c_magic-nx30-pro.dts +@@ -0,0 +1,200 @@ ++// SPDX-License-Identifier: GPL-2.0 ++/* ++ * Copyright (c) 2022 MediaTek Inc. ++ * Author: Sam Shih ++ */ ++ ++/dts-v1/; ++#include "mt7981.dtsi" ++#include ++#include ++ ++/ { ++ #address-cells = <1>; ++ #size-cells = <1>; ++ model = "H3C Magic NX30 Pro"; ++ compatible = "mediatek,mt7981", "mediatek,mt7981-rfb"; ++ ++ chosen { ++ stdout-path = &uart0; ++ tick-timer = &timer0; ++ }; ++ ++ keys { ++ compatible = "gpio-keys"; ++ ++ factory { ++ label = "reset"; ++ linux,code = ; ++ gpios = <&gpio 1 GPIO_ACTIVE_LOW>; ++ }; ++ ++ wps { ++ label = "wps"; ++ linux,code = ; ++ gpios = <&gpio 0 GPIO_ACTIVE_LOW>; ++ }; ++ }; ++ ++ leds { ++ compatible = "gpio-leds"; ++ ++ status_red { ++ label = "red:status"; ++ gpios = <&gpio 4 GPIO_ACTIVE_LOW>; ++ }; ++ ++ status_green { ++ label = "green:status"; ++ gpios = <&gpio 5 GPIO_ACTIVE_LOW>; ++ }; ++ }; ++}; ++ ++&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 39 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 = "SPI0_CS", "SPI0_HOLD", "SPI0_WP"; ++ drive-strength = ; ++ bias-pull-up = ; ++ }; ++ ++ conf-pd { ++ pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO"; ++ drive-strength = ; ++ bias-pull-down = ; ++ }; ++ }; ++ ++ spic_pins: spi1-pins-func-1 { ++ mux { ++ function = "spi"; ++ groups = "spi1_1"; ++ }; ++ }; ++ ++ uart1_pins: spi1-pins-func-3 { ++ mux { ++ function = "uart"; ++ groups = "uart1_2"; ++ }; ++ }; ++ ++ pwm_pins: pwm0-pins-func-1 { ++ mux { ++ function = "pwm"; ++ groups = "pwm0_1", "pwm1_0"; ++ }; ++ }; ++}; ++ ++&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 = <2>; ++ sample_sel = <0>; ++ ++ spi_nand@0 { ++ compatible = "spi-nand"; ++ reg = <0>; ++ spi-max-frequency = <52000000>; ++ ++ partitions { ++ compatible = "fixed-partitions"; ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ++ partition@0 { ++ label = "bl2"; ++ reg = <0x0000000 0x0100000>; ++ }; ++ ++ partition@100000 { ++ label = "orig-env"; ++ reg = <0x0100000 0x0080000>; ++ }; ++ ++ partition@180000 { ++ label = "factory"; ++ reg = <0x0180000 0x0200000>; ++ }; ++ ++ partition@380000 { ++ label = "fip"; ++ reg = <0x0380000 0x0200000>; ++ }; ++ ++ partition@580000 { ++ label = "ubi"; ++ reg = <0x0580000 0x4000000>; ++ }; ++ ++ partition@4580000 { ++ label = "pdt_data"; ++ reg = <0x4580000 0x0600000>; ++ }; ++ ++ partition@4b80000 { ++ label = "pdt_data_1"; ++ reg = <0x4b80000 0x0600000>; ++ }; ++ ++ partition@5180000 { ++ label = "exp"; ++ reg = <0x5180000 0x0100000>; ++ }; ++ ++ partition@5280000 { ++ label = "plugin"; ++ reg = <0x5280000 0x2580000>; ++ }; ++ }; ++ }; ++}; ++ ++&watchdog { ++ status = "disabled"; ++}; +--- /dev/null ++++ b/h3c_magic-nx30-pro_env +@@ -0,0 +1,56 @@ ++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-h3c_magic-nx30-pro-initramfs-recovery.itb ++bootfile_bl2=openwrt-mediatek-filogic-h3c_magic-nx30-pro-preloader.bin ++bootfile_fip=openwrt-mediatek-filogic-h3c_magic-nx30-pro-bl31-uboot.fip ++bootfile_upg=openwrt-mediatek-filogic-h3c_magic-nx30-pro-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= ( ( ( OpenWrt ) ) ) ++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=Load BL31+U-Boot FIP via TFTP then write to NAND.=run boot_tftp_write_fip ; run bootmenu_confirm_return ++bootmenu_7=Load BL2 preloader via TFTP then write to NAND.=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 _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 $ver" diff --git a/package/boot/uboot-mxs/Makefile b/package/boot/uboot-mxs/Makefile index 6ae767f677..afd73e191b 100644 --- a/package/boot/uboot-mxs/Makefile +++ b/package/boot/uboot-mxs/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk PKG_VERSION:=2020.04 -PKG_RELEASE:=5 +PKG_RELEASE:=6 PKG_HASH:=fe732aaf037d9cc3c0909bad8362af366ae964bbdac6913a34081ff4ad565372 @@ -27,10 +27,12 @@ endef define U-Boot/mx23_olinuxino NAME:=Olinuxino i.MX233 + BUILD_DEVICES:=olinuxino_maxi olinuxino_micro endef define U-Boot/duckbill NAME:=I2SE Duckbill + BUILD_DEVICES:=i2se_duckbill endef UBOOT_TARGETS := \ @@ -40,8 +42,12 @@ UBOOT_TARGETS := \ UBOOT_MAKE_FLAGS += $(UBOOT_IMAGE) define Build/InstallDev - $(INSTALL_DIR) $(STAGING_DIR_IMAGE) - $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(UBOOT_IMAGE) $(STAGING_DIR_IMAGE)/$(BUILD_VARIANT)-$(UBOOT_IMAGE) + $(foreach device,$(BUILD_DEVICES), \ + $(INSTALL_DIR) $(STAGING_DIR_IMAGE)/$(device) + ) + $(foreach device,$(BUILD_DEVICES), \ + $(CP) $(patsubst %,$(PKG_BUILD_DIR)/%,$(UBOOT_IMAGE)) $(STAGING_DIR_IMAGE)/$(device)/ + ) endef $(eval $(call BuildPackage/U-Boot)) diff --git a/package/firmware/linux-firmware/Makefile b/package/firmware/linux-firmware/Makefile index bed11fdbe1..63259cae36 100644 --- a/package/firmware/linux-firmware/Makefile +++ b/package/firmware/linux-firmware/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=linux-firmware PKG_VERSION:=20230515 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE_URL:=@KERNEL/linux/kernel/firmware PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz diff --git a/package/firmware/linux-firmware/intel.mk b/package/firmware/linux-firmware/intel.mk index 97694572b0..23b58358b4 100644 --- a/package/firmware/linux-firmware/intel.mk +++ b/package/firmware/linux-firmware/intel.mk @@ -3,6 +3,8 @@ define Package/ibt-firmware/install $(INSTALL_DIR) $(1)/lib/firmware/intel $(CP) \ $(PKG_BUILD_DIR)/intel/*.bseq \ + $(PKG_BUILD_DIR)/intel/ibt*.sfi \ + $(PKG_BUILD_DIR)/intel/ibt*.ddc \ $(1)/lib/firmware/intel endef $(eval $(call BuildPackage,ibt-firmware)) diff --git a/package/kernel/qca-nss-dp/Makefile b/package/kernel/qca-nss-dp/Makefile index 3fde14560b..f9e992f246 100644 --- a/package/kernel/qca-nss-dp/Makefile +++ b/package/kernel/qca-nss-dp/Makefile @@ -1,7 +1,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=qca-nss-dp -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE_URL:=https://git.codelinaro.org/clo/qsdk/oss/lklm/nss-dp.git PKG_SOURCE_PROTO:=git diff --git a/package/kernel/qca-nss-dp/patches/0009-nss-dp-switchdev-fix-FDB-roaming.patch b/package/kernel/qca-nss-dp/patches/0009-nss-dp-switchdev-fix-FDB-roaming.patch new file mode 100644 index 0000000000..ec10bdc2d9 --- /dev/null +++ b/package/kernel/qca-nss-dp/patches/0009-nss-dp-switchdev-fix-FDB-roaming.patch @@ -0,0 +1,111 @@ +From 25ca3308edb67aa0c6c70b83edf0e22b8ae7533f Mon Sep 17 00:00:00 2001 +From: Robert Marko +Date: Thu, 29 Jun 2023 13:52:58 +0200 +Subject: [PATCH] nss-dp: switchdev: fix FDB roaming + +Try and solve the roaming issue by trying to replicate what NSS bridge +module is doing, but by utilizing switchdev FDB notifiers instead of +adding new notifiers to the bridge code. + +We register a new non-blocking switchdev notifier and simply wait for +notification, and then process the SWITCHDEV_FDB_DEL_TO_DEVICE +notifications. + +Those tell us that a certain FDB entry should be removed, then a VSI ID +is fetched for the physical PPE port and using that VSI ID and the +notification provided MAC adress existing FDB entry gets removed. + +Signed-off-by: Robert Marko +--- + nss_dp_switchdev.c | 73 +++++++++++++++++++++++++++++++++++++++++++++- + 1 file changed, 72 insertions(+), 1 deletion(-) + +--- a/nss_dp_switchdev.c ++++ b/nss_dp_switchdev.c +@@ -29,6 +29,8 @@ + #include "nss_dp_dev.h" + #include "fal/fal_stp.h" + #include "fal/fal_ctrlpkt.h" ++#include "fal/fal_fdb.h" ++#include "ref/ref_vsi.h" + + #define NSS_DP_SWITCH_ID 0 + #define NSS_DP_SW_ETHTYPE_PID 0 /* PPE ethtype profile ID for slow protocols */ +@@ -521,7 +523,76 @@ static struct notifier_block *nss_dp_sw_ + + #else + +-static struct notifier_block *nss_dp_sw_ev_nb; ++/* ++ * nss_dp_switchdev_fdb_del_event ++ * ++ * Used for EDMA v1 to remove old MAC in order to preventing having ++ * duplicate MAC entries in FDB thus and avoid roaming issues. ++ */ ++ ++static int nss_dp_switchdev_fdb_del_event(struct net_device *netdev, ++ struct switchdev_notifier_fdb_info *fdb_info) ++{ ++ struct nss_dp_dev *dp_priv = (struct nss_dp_dev *)netdev_priv(netdev); ++ fal_fdb_entry_t entry; ++ a_uint32_t vsi_id; ++ sw_error_t rv; ++ ++ netdev_dbg(netdev, "FDB DEL %pM port %d\n", fdb_info->addr, dp_priv->macid); ++ ++ rv = ppe_port_vsi_get(NSS_DP_SWITCH_ID, dp_priv->macid, &vsi_id); ++ if (rv) { ++ netdev_err(netdev, "cannot get VSI ID for port %d\n", dp_priv->macid); ++ return notifier_from_errno(rv); ++ } ++ ++ memset(&entry, 0, sizeof(entry)); ++ memcpy(&entry.addr, fdb_info->addr, ETH_ALEN); ++ entry.fid = vsi_id; ++ ++ rv = fal_fdb_entry_del_bymac(NSS_DP_SWITCH_ID, &entry); ++ if (rv) { ++ netdev_err(netdev, "FDB entry delete failed with MAC %pM and fid %d\n", ++ &entry.addr, entry.fid); ++ return notifier_from_errno(rv); ++ } ++ ++ return notifier_from_errno(rv); ++} ++ ++/* ++ * nss_dp_switchdev_event_nb ++ * ++ * Non blocking switchdev event for netdevice. ++ * Used for EDMA v1 to remove old MAC and avoid roaming issues. ++ */ ++static int nss_dp_switchdev_event_nb(struct notifier_block *unused, ++ unsigned long event, void *ptr) ++{ ++ struct net_device *dev = switchdev_notifier_info_to_dev(ptr); ++ ++ /* ++ * Handle switchdev event only for physical devices ++ */ ++ if (!nss_dp_is_phy_dev(dev)) { ++ return NOTIFY_DONE; ++ } ++ ++ switch (event) { ++ case SWITCHDEV_FDB_DEL_TO_DEVICE: ++ return nss_dp_switchdev_fdb_del_event(dev, ptr); ++ default: ++ netdev_dbg(dev, "Switchdev event %lu is not supported\n", event); ++ } ++ ++ return NOTIFY_DONE; ++} ++ ++static struct notifier_block nss_dp_switchdev_notifier_nb = { ++ .notifier_call = nss_dp_switchdev_event_nb, ++}; ++ ++static struct notifier_block *nss_dp_sw_ev_nb = &nss_dp_switchdev_notifier_nb; + + /* + * nss_dp_bridge_attr_set() diff --git a/package/libs/libnl-tiny/Makefile b/package/libs/libnl-tiny/Makefile index 7239c286fd..048c3e7939 100644 --- a/package/libs/libnl-tiny/Makefile +++ b/package/libs/libnl-tiny/Makefile @@ -12,9 +12,9 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/libnl-tiny.git -PKG_SOURCE_DATE:=2023-04-02 -PKG_SOURCE_VERSION:=11b7c5f0745af2637b48131287f28689bb80ed3e -PKG_MIRROR_HASH:=9bcae026ad1fde81865ea113d24bbc70c2bd1945655d51cd00181c41b70570d2 +PKG_SOURCE_DATE:=2023-07-01 +PKG_SOURCE_VERSION:=d433990c00e804593f253cc709b8fe901492b530 +PKG_MIRROR_HASH:=fffb2782c7ed2ebabc7d57e5513f52ac53d1828014bc9a8ea131f50eab093086 CMAKE_INSTALL:=1 PKG_LICENSE:=LGPL-2.1 diff --git a/package/network/utils/iwinfo/Makefile b/package/network/utils/iwinfo/Makefile index fcb89ff42b..e5add395ff 100644 --- a/package/network/utils/iwinfo/Makefile +++ b/package/network/utils/iwinfo/Makefile @@ -11,13 +11,13 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/iwinfo.git -PKG_SOURCE_DATE:=2023-05-17 -PKG_SOURCE_VERSION:=c9f5c3f7b50d146f18be1458ab5591defc0af6da -PKG_MIRROR_HASH:=0d9263cbbe79d62966398af66b3b3ce7b58991da6b266f8f4ec2ec4be3d4ad97 +PKG_SOURCE_DATE:=2023-07-01 +PKG_SOURCE_VERSION:=ca79f64154b107f192ec3c1ba631816cb8b07922 +PKG_MIRROR_HASH:=5eddf584a1c3ed5637162d6bfc573ed1ce3691fcb38bdd55bf9f1e11e82ccc46 PKG_MAINTAINER:=Jo-Philipp Wich PKG_LICENSE:=GPL-2.0 -IWINFO_ABI_VERSION:=20230121 +IWINFO_ABI_VERSION:=20230701 include $(INCLUDE_DIR)/package.mk diff --git a/package/system/rpcd/Makefile b/package/system/rpcd/Makefile index b0e351b25d..977932f9d1 100644 --- a/package/system/rpcd/Makefile +++ b/package/system/rpcd/Makefile @@ -12,9 +12,9 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/rpcd.git -PKG_MIRROR_HASH:=9c29ee1b4379f835420986fdef3d9510cdd5fc1fd5f4662ecc185913a1f0ec17 -PKG_SOURCE_DATE:=2023-06-25 -PKG_SOURCE_VERSION:=31c390727b83c9efd768c7aa258813e6084b46a3 +PKG_MIRROR_HASH:=76467ff072b50190f93d071b7792ade7c717674397a2547e995a8f819a48954e +PKG_SOURCE_DATE:=2023-07-01 +PKG_SOURCE_VERSION:=c07ab2f91061ad64209e9aaa1fb1b77061a1af25 PKG_MAINTAINER:=Jo-Philipp Wich PKG_LICENSE:=ISC diff --git a/scripts/netgear-encrypted-factory.py b/scripts/netgear-encrypted-factory.py index b6bb72f3b8..40cfd9df0d 100755 --- a/scripts/netgear-encrypted-factory.py +++ b/scripts/netgear-encrypted-factory.py @@ -14,6 +14,8 @@ def main(): parser.add_argument('--model', type=str, required=True) parser.add_argument('--region', type=str, required=True) parser.add_argument('--version', type=str, required=True) + parser.add_argument('--hw-id-list', type=str) + parser.add_argument('--model-list', type=str) parser.add_argument('--encryption-block-size', type=str, required=True) parser.add_argument('--openssl-bin', type=str, required=True) parser.add_argument('--key', type=str, required=True) @@ -26,6 +28,10 @@ def main(): assert (encryption_block_size > 0 and encryption_block_size % 16 == 0), 'Encryption block size must be a multiple of the AES block size (16)' + hw_id_list = args.hw_id_list.split(';') if args.hw_id_list else [] + model_list = args.model_list.split(';') if args.model_list else [] + hw_info = ';'.join(hw_id_list + model_list) + image = open(args.input_file, 'rb').read() image_enc = [] for i in range(0, len(image), encryption_block_size): @@ -45,13 +51,18 @@ def main(): image_enc = b''.join(image_enc) image_with_header = struct.pack( - '>32s32s64s64s64s256s12sII', + '>32s32s64s64sIBBB13s200s100s12sII', args.model.encode('ascii'), args.region.encode('ascii'), args.version.encode('ascii'), b'Thu Jan 1 00:00:00 1970', # static date for reproducibility + 0, # product hw model + 0, # model index + len(hw_id_list), + len(model_list), + b'', # reserved + hw_info.encode('ascii'), b'', # reserved - b'', # RSA signature - omitted for now b'encrpted_img', len(image_enc), encryption_block_size, diff --git a/target/linux/armsr/armv8/config-6.1 b/target/linux/armsr/armv8/config-6.1 index f1b4838d15..f6bcce191f 100644 --- a/target/linux/armsr/armv8/config-6.1 +++ b/target/linux/armsr/armv8/config-6.1 @@ -168,7 +168,6 @@ CONFIG_FB_CMDLINE=y CONFIG_FB_MODE_HELPERS=y # CONFIG_FB_XILINX is not set CONFIG_FRAME_POINTER=y -CONFIG_FRAME_WARN=2048 # CONFIG_FSL_DPAA is not set # CONFIG_FSL_DPAA2_QDMA is not set CONFIG_FSL_ERRATUM_A008585=y diff --git a/target/linux/ath79/dts/ar9344_mikrotik_routerboard-951g-2hnd.dts b/target/linux/ath79/dts/ar9344_mikrotik_routerboard-951g-2hnd.dts index 16da7a3c95..6229eefb1f 100644 --- a/target/linux/ath79/dts/ar9344_mikrotik_routerboard-951g-2hnd.dts +++ b/target/linux/ath79/dts/ar9344_mikrotik_routerboard-951g-2hnd.dts @@ -17,6 +17,12 @@ gpio-export,output = <1>; gpios = <&gpio 20 GPIO_ACTIVE_HIGH>; }; + + buzzer { + gpio-export,name = "buzzer"; + gpio-export,output = <1>; + gpios = <&gpio 17 GPIO_ACTIVE_HIGH>; + }; }; }; diff --git a/target/linux/ath79/dts/qca9558_comfast_cf-e380ac-v2.dts b/target/linux/ath79/dts/qca9558_comfast_cf-e380ac-v2.dts new file mode 100644 index 0000000000..b38e2e848f --- /dev/null +++ b/target/linux/ath79/dts/qca9558_comfast_cf-e380ac-v2.dts @@ -0,0 +1,150 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "qca955x.dtsi" + +#include +#include + +/ { + compatible = "comfast,cf-e380ac-v2", "qca,qca9558"; + model = "COMFAST CF-E380AC"; + + aliases { + serial0 = &uart; + label-mac-device = ð1; + led-boot = &led_lan; + led-failsafe = &led_lan; + led-upgrade = &led_lan; + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "reset"; + linux,code = ; + gpios = <&gpio 19 GPIO_ACTIVE_LOW>; + debounce-interval = <60>; + }; + }; + + leds { + compatible = "gpio-leds"; + + pinctrl-names = "default"; + pinctrl-0 = <&jtag_disable_pins>; + + led_lan: lan { + label = "green:lan"; + gpios = <&gpio 0 GPIO_ACTIVE_LOW>; + }; + + wlan2g { + label = "blue:wlan2g"; + gpios = <&gpio 2 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "phy1tpt"; + }; + + wlan5g { + label = "red:wlan5g"; + gpios = <&gpio 3 GPIO_ACTIVE_LOW>; + linux,default-trigger = "phy0tpt"; + }; + }; + + watchdog { + compatible = "linux,wdt-gpio"; + + gpios = <&gpio 17 GPIO_ACTIVE_LOW>; + hw_algo = "toggle"; + hw_margin_ms = <1200>; + always-running; + }; +}; + +ð0 { + status = "okay"; + mtd-mac-address = <&art 0x0>; +}; + + +&spi { + status = "okay"; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <50000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x000000 0x040000>; + read-only; + }; + + art: partition@40000 { + label = "art"; + reg = <0x040000 0x010000>; + read-only; + }; + + partition@50000 { + compatible = "denx,uimage"; + label = "firmware"; + reg = <0x050000 0x0fa0000>; + }; + + partition@ff0000 { + label = "art-backup"; + reg = <0xff0000 0x010000>; + read-only; + }; + }; + }; +}; + +ð0 { + status = "okay"; + + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; + + pll-data = <0xbe000000 0xb0000101 0xb0001313>; + + fixed-link { + speed = <1000>; + full-duplex; + }; +}; + +&pcie0 { + status = "okay"; +}; + +&wdt { + status = "okay"; +}; + +&wmac { + status = "okay"; + + mtd-cal-data = <&art 0x1000>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; + mac-address-increment = <10>; +}; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_0: macaddr@0 { + reg = <0x0 0x6>; + }; +}; diff --git a/target/linux/ath79/generic/base-files/etc/board.d/01_leds b/target/linux/ath79/generic/base-files/etc/board.d/01_leds index 65cf7b3292..00bcad2bc5 100644 --- a/target/linux/ath79/generic/base-files/etc/board.d/01_leds +++ b/target/linux/ath79/generic/base-files/etc/board.d/01_leds @@ -445,6 +445,7 @@ tplink,cpe510-v3) ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" "green:link3" "wlan0" "51" "100" "-50" "13" ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "green:link4" "wlan0" "76" "100" "-75" "13" ;; +comfast,cf-e380ac-v2|\ tplink,tl-wr902ac-v1) ucidef_set_led_netdev "lan" "LAN" "green:lan" "eth0" ucidef_set_led_netdev "internet" "Internet" "green:internet" "eth0" diff --git a/target/linux/ath79/generic/base-files/etc/board.d/02_network b/target/linux/ath79/generic/base-files/etc/board.d/02_network index 64869701c6..911517cf37 100644 --- a/target/linux/ath79/generic/base-files/etc/board.d/02_network +++ b/target/linux/ath79/generic/base-files/etc/board.d/02_network @@ -27,6 +27,7 @@ ath79_setup_interfaces() avm,fritzdvbc|\ comfast,cf-wr752ac-v1|\ comfast,cf-e130n-v2|\ + comfast,cf-e380ac-v2|\ devolo,dvl1200i|\ devolo,dvl1750c|\ devolo,dvl1750i|\ @@ -748,6 +749,7 @@ ath79_setup_macs() wan_mac=$(mtd_get_mac_text board_data 0x480) label_mac=$wan_mac ;; + comfast,cf-e380ac-v2|\ netgear,wndr3700|\ netgear,wndr3700-v2|\ netgear,wndr3800|\ diff --git a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata index f0a3755de9..dd627ad2d6 100644 --- a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata +++ b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata @@ -13,6 +13,7 @@ case "$FIRMWARE" in allnet,all-wap02860ac|\ araknis,an-500-ap-i-ac|\ araknis,an-700-ap-i-ac|\ + comfast,cf-e380ac-v2|\ engenius,enstationac-v1|\ glinet,gl-x750|\ watchguard,ap300) diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk index 2a6bd5145f..66d76c9917 100644 --- a/target/linux/ath79/image/generic.mk +++ b/target/linux/ath79/image/generic.mk @@ -740,6 +740,17 @@ define Device/comfast_cf-e375ac endef TARGET_DEVICES += comfast_cf-e375ac +define Device/comfast_cf-e380ac-v2 + SOC := qca9558 + DEVICE_VENDOR := COMFAST + DEVICE_MODEL := CF-E380AC + DEVICE_VARIANT := v2 + DEVICE_PACKAGES := kmod-usb-core kmod-usb2 \ + kmod-ath10k-ct ath10k-firmware-qca988x-ct + IMAGE_SIZE := 16000k +endef +TARGET_DEVICES += comfast_cf-e380ac-v2 + define Device/comfast_cf-e5 SOC := qca9531 DEVICE_VENDOR := COMFAST diff --git a/target/linux/ath79/patches-5.15/910-unaligned_access_hacks.patch b/target/linux/ath79/patches-5.15/910-unaligned_access_hacks.patch index ad685fb13b..55539d7d53 100644 --- a/target/linux/ath79/patches-5.15/910-unaligned_access_hacks.patch +++ b/target/linux/ath79/patches-5.15/910-unaligned_access_hacks.patch @@ -737,7 +737,7 @@ SVN-Revision: 35130 | TCPOLEN_TIMESTAMP)) --- a/net/xfrm/xfrm_input.c +++ b/net/xfrm/xfrm_input.c -@@ -166,8 +166,8 @@ int xfrm_parse_spi(struct sk_buff *skb, +@@ -167,8 +167,8 @@ int xfrm_parse_spi(struct sk_buff *skb, if (!pskb_may_pull(skb, hlen)) return -EINVAL; diff --git a/target/linux/bcm27xx/bcm2708/config-6.1 b/target/linux/bcm27xx/bcm2708/config-6.1 index e1942be1f9..c5d604e6bc 100644 --- a/target/linux/bcm27xx/bcm2708/config-6.1 +++ b/target/linux/bcm27xx/bcm2708/config-6.1 @@ -162,7 +162,6 @@ CONFIG_FONT_SUPPORT=y CONFIG_FRAMEBUFFER_CONSOLE=y # CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y -CONFIG_FRAME_WARN=1024 CONFIG_FREEZER=y CONFIG_FS_IOMAP=y CONFIG_FS_MBCACHE=y diff --git a/target/linux/bcm27xx/bcm2709/config-6.1 b/target/linux/bcm27xx/bcm2709/config-6.1 index 0e5824011c..ec2e7f3fa6 100644 --- a/target/linux/bcm27xx/bcm2709/config-6.1 +++ b/target/linux/bcm27xx/bcm2709/config-6.1 @@ -197,7 +197,6 @@ CONFIG_FONT_SUPPORT=y CONFIG_FRAMEBUFFER_CONSOLE=y # CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y -CONFIG_FRAME_WARN=1024 CONFIG_FREEZER=y CONFIG_FS_ENCRYPTION=y CONFIG_FS_ENCRYPTION_ALGS=y diff --git a/target/linux/bcm27xx/bcm2710/config-6.1 b/target/linux/bcm27xx/bcm2710/config-6.1 index 0782618e7c..b0abd49c7f 100644 --- a/target/linux/bcm27xx/bcm2710/config-6.1 +++ b/target/linux/bcm27xx/bcm2710/config-6.1 @@ -206,7 +206,6 @@ CONFIG_FRAMEBUFFER_CONSOLE=y # CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y CONFIG_FRAME_POINTER=y -CONFIG_FRAME_WARN=2048 CONFIG_FREEZER=y CONFIG_FSL_ERRATUM_A008585=y CONFIG_FS_ENCRYPTION=y diff --git a/target/linux/bcm27xx/bcm2711/config-6.1 b/target/linux/bcm27xx/bcm2711/config-6.1 index eea6beac3d..ff88926e3d 100644 --- a/target/linux/bcm27xx/bcm2711/config-6.1 +++ b/target/linux/bcm27xx/bcm2711/config-6.1 @@ -211,7 +211,6 @@ CONFIG_FRAMEBUFFER_CONSOLE=y # CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y CONFIG_FRAME_POINTER=y -CONFIG_FRAME_WARN=2048 CONFIG_FREEZER=y CONFIG_FSL_ERRATUM_A008585=y CONFIG_FS_ENCRYPTION=y diff --git a/target/linux/bcm63xx/patches-5.15/143-gpio-fix-device-tree-gpio-hogs-on-dual-role-gpio-pin.patch b/target/linux/bcm63xx/patches-5.15/143-gpio-fix-device-tree-gpio-hogs-on-dual-role-gpio-pin.patch index 4874fd1237..4b3e87cbbf 100644 --- a/target/linux/bcm63xx/patches-5.15/143-gpio-fix-device-tree-gpio-hogs-on-dual-role-gpio-pin.patch +++ b/target/linux/bcm63xx/patches-5.15/143-gpio-fix-device-tree-gpio-hogs-on-dual-role-gpio-pin.patch @@ -116,7 +116,7 @@ Signed-off-by: Jonas Gorski } --- a/drivers/gpio/gpiolib.c +++ b/drivers/gpio/gpiolib.c -@@ -1802,7 +1802,8 @@ int gpiochip_add_pingroup_range(struct g +@@ -1815,7 +1815,8 @@ int gpiochip_add_pingroup_range(struct g list_add_tail(&pin_range->node, &gdev->pin_ranges); @@ -126,7 +126,7 @@ Signed-off-by: Jonas Gorski } EXPORT_SYMBOL_GPL(gpiochip_add_pingroup_range); -@@ -1859,7 +1860,7 @@ int gpiochip_add_pin_range(struct gpio_c +@@ -1872,7 +1873,7 @@ int gpiochip_add_pin_range(struct gpio_c list_add_tail(&pin_range->node, &gdev->pin_ranges); diff --git a/target/linux/generic/backport-5.15/705-01-v5.17-net-dsa-mt7530-iterate-using-dsa_switch_for_each_use.patch b/target/linux/generic/backport-5.15/705-01-v5.17-net-dsa-mt7530-iterate-using-dsa_switch_for_each_use.patch index 4142fd1d50..d54819120e 100644 --- a/target/linux/generic/backport-5.15/705-01-v5.17-net-dsa-mt7530-iterate-using-dsa_switch_for_each_use.patch +++ b/target/linux/generic/backport-5.15/705-01-v5.17-net-dsa-mt7530-iterate-using-dsa_switch_for_each_use.patch @@ -21,7 +21,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -1190,27 +1190,31 @@ static int +@@ -1198,27 +1198,31 @@ static int mt7530_port_bridge_join(struct dsa_switch *ds, int port, struct net_device *bridge) { @@ -65,7 +65,7 @@ Signed-off-by: Jakub Kicinski } /* Add the all other ports to this port matrix. */ -@@ -1315,24 +1319,28 @@ static void +@@ -1323,24 +1327,28 @@ static void mt7530_port_bridge_leave(struct dsa_switch *ds, int port, struct net_device *bridge) { diff --git a/target/linux/generic/backport-5.15/705-02-v5.19-net-dsa-mt7530-populate-supported_interfaces-and-mac.patch b/target/linux/generic/backport-5.15/705-02-v5.19-net-dsa-mt7530-populate-supported_interfaces-and-mac.patch index f2ead18c36..391934a30a 100644 --- a/target/linux/generic/backport-5.15/705-02-v5.19-net-dsa-mt7530-populate-supported_interfaces-and-mac.patch +++ b/target/linux/generic/backport-5.15/705-02-v5.19-net-dsa-mt7530-populate-supported_interfaces-and-mac.patch @@ -23,7 +23,7 @@ Signed-off-by: Paolo Abeni --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -2444,6 +2444,32 @@ mt7531_setup(struct dsa_switch *ds) +@@ -2454,6 +2454,32 @@ mt7531_setup(struct dsa_switch *ds) return 0; } @@ -56,7 +56,7 @@ Signed-off-by: Paolo Abeni static bool mt7530_phy_mode_supported(struct dsa_switch *ds, int port, const struct phylink_link_state *state) -@@ -2480,6 +2506,37 @@ static bool mt7531_is_rgmii_port(struct +@@ -2490,6 +2516,37 @@ static bool mt7531_is_rgmii_port(struct return (port == 5) && (priv->p5_intf_sel != P5_INTF_SEL_GMAC5_SGMII); } @@ -94,7 +94,7 @@ Signed-off-by: Paolo Abeni static bool mt7531_phy_mode_supported(struct dsa_switch *ds, int port, const struct phylink_link_state *state) -@@ -2956,6 +3013,18 @@ mt7531_cpu_port_config(struct dsa_switch +@@ -2966,6 +3023,18 @@ mt7531_cpu_port_config(struct dsa_switch return 0; } @@ -113,7 +113,7 @@ Signed-off-by: Paolo Abeni static void mt7530_mac_port_validate(struct dsa_switch *ds, int port, unsigned long *supported) -@@ -3191,6 +3260,7 @@ static const struct dsa_switch_ops mt753 +@@ -3201,6 +3270,7 @@ static const struct dsa_switch_ops mt753 .port_vlan_del = mt7530_port_vlan_del, .port_mirror_add = mt753x_port_mirror_add, .port_mirror_del = mt753x_port_mirror_del, @@ -121,7 +121,7 @@ Signed-off-by: Paolo Abeni .phylink_validate = mt753x_phylink_validate, .phylink_mac_link_state = mt753x_phylink_mac_link_state, .phylink_mac_config = mt753x_phylink_mac_config, -@@ -3208,6 +3278,7 @@ static const struct mt753x_info mt753x_t +@@ -3218,6 +3288,7 @@ static const struct mt753x_info mt753x_t .phy_read = mt7530_phy_read, .phy_write = mt7530_phy_write, .pad_setup = mt7530_pad_clk_setup, @@ -129,7 +129,7 @@ Signed-off-by: Paolo Abeni .phy_mode_supported = mt7530_phy_mode_supported, .mac_port_validate = mt7530_mac_port_validate, .mac_port_get_state = mt7530_phylink_mac_link_state, -@@ -3219,6 +3290,7 @@ static const struct mt753x_info mt753x_t +@@ -3229,6 +3300,7 @@ static const struct mt753x_info mt753x_t .phy_read = mt7530_phy_read, .phy_write = mt7530_phy_write, .pad_setup = mt7530_pad_clk_setup, @@ -137,7 +137,7 @@ Signed-off-by: Paolo Abeni .phy_mode_supported = mt7530_phy_mode_supported, .mac_port_validate = mt7530_mac_port_validate, .mac_port_get_state = mt7530_phylink_mac_link_state, -@@ -3231,6 +3303,7 @@ static const struct mt753x_info mt753x_t +@@ -3241,6 +3313,7 @@ static const struct mt753x_info mt753x_t .phy_write = mt7531_ind_phy_write, .pad_setup = mt7531_pad_setup, .cpu_port_config = mt7531_cpu_port_config, @@ -145,7 +145,7 @@ Signed-off-by: Paolo Abeni .phy_mode_supported = mt7531_phy_mode_supported, .mac_port_validate = mt7531_mac_port_validate, .mac_port_get_state = mt7531_phylink_mac_link_state, -@@ -3293,6 +3366,7 @@ mt7530_probe(struct mdio_device *mdiodev +@@ -3303,6 +3376,7 @@ mt7530_probe(struct mdio_device *mdiodev */ if (!priv->info->sw_setup || !priv->info->pad_setup || !priv->info->phy_read || !priv->info->phy_write || diff --git a/target/linux/generic/backport-5.15/705-03-v5.19-net-dsa-mt7530-remove-interface-checks.patch b/target/linux/generic/backport-5.15/705-03-v5.19-net-dsa-mt7530-remove-interface-checks.patch index 228016383d..ac19163310 100644 --- a/target/linux/generic/backport-5.15/705-03-v5.19-net-dsa-mt7530-remove-interface-checks.patch +++ b/target/linux/generic/backport-5.15/705-03-v5.19-net-dsa-mt7530-remove-interface-checks.patch @@ -21,7 +21,7 @@ Signed-off-by: Paolo Abeni --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -2470,37 +2470,6 @@ static void mt7530_mac_port_get_caps(str +@@ -2480,37 +2480,6 @@ static void mt7530_mac_port_get_caps(str } } @@ -59,7 +59,7 @@ Signed-off-by: Paolo Abeni static bool mt7531_is_rgmii_port(struct mt7530_priv *priv, u32 port) { return (port == 5) && (priv->p5_intf_sel != P5_INTF_SEL_GMAC5_SGMII); -@@ -2537,44 +2506,6 @@ static void mt7531_mac_port_get_caps(str +@@ -2547,44 +2516,6 @@ static void mt7531_mac_port_get_caps(str } } @@ -104,7 +104,7 @@ Signed-off-by: Paolo Abeni static int mt753x_pad_setup(struct dsa_switch *ds, const struct phylink_link_state *state) { -@@ -2829,9 +2760,6 @@ mt753x_phylink_mac_config(struct dsa_swi +@@ -2839,9 +2770,6 @@ mt753x_phylink_mac_config(struct dsa_swi struct mt7530_priv *priv = ds->priv; u32 mcr_cur, mcr_new; @@ -114,7 +114,7 @@ Signed-off-by: Paolo Abeni switch (port) { case 0 ... 4: /* Internal phy */ if (state->interface != PHY_INTERFACE_MODE_GMII) -@@ -3047,12 +2975,6 @@ mt753x_phylink_validate(struct dsa_switc +@@ -3057,12 +2985,6 @@ mt753x_phylink_validate(struct dsa_switc __ETHTOOL_DECLARE_LINK_MODE_MASK(mask) = { 0, }; struct mt7530_priv *priv = ds->priv; @@ -127,7 +127,7 @@ Signed-off-by: Paolo Abeni phylink_set_port_modes(mask); if (state->interface != PHY_INTERFACE_MODE_TRGMII && -@@ -3279,7 +3201,6 @@ static const struct mt753x_info mt753x_t +@@ -3289,7 +3211,6 @@ static const struct mt753x_info mt753x_t .phy_write = mt7530_phy_write, .pad_setup = mt7530_pad_clk_setup, .mac_port_get_caps = mt7530_mac_port_get_caps, @@ -135,7 +135,7 @@ Signed-off-by: Paolo Abeni .mac_port_validate = mt7530_mac_port_validate, .mac_port_get_state = mt7530_phylink_mac_link_state, .mac_port_config = mt7530_mac_config, -@@ -3291,7 +3212,6 @@ static const struct mt753x_info mt753x_t +@@ -3301,7 +3222,6 @@ static const struct mt753x_info mt753x_t .phy_write = mt7530_phy_write, .pad_setup = mt7530_pad_clk_setup, .mac_port_get_caps = mt7530_mac_port_get_caps, @@ -143,7 +143,7 @@ Signed-off-by: Paolo Abeni .mac_port_validate = mt7530_mac_port_validate, .mac_port_get_state = mt7530_phylink_mac_link_state, .mac_port_config = mt7530_mac_config, -@@ -3304,7 +3224,6 @@ static const struct mt753x_info mt753x_t +@@ -3314,7 +3234,6 @@ static const struct mt753x_info mt753x_t .pad_setup = mt7531_pad_setup, .cpu_port_config = mt7531_cpu_port_config, .mac_port_get_caps = mt7531_mac_port_get_caps, @@ -151,7 +151,7 @@ Signed-off-by: Paolo Abeni .mac_port_validate = mt7531_mac_port_validate, .mac_port_get_state = mt7531_phylink_mac_link_state, .mac_port_config = mt7531_mac_config, -@@ -3367,7 +3286,6 @@ mt7530_probe(struct mdio_device *mdiodev +@@ -3377,7 +3296,6 @@ mt7530_probe(struct mdio_device *mdiodev if (!priv->info->sw_setup || !priv->info->pad_setup || !priv->info->phy_read || !priv->info->phy_write || !priv->info->mac_port_get_caps || diff --git a/target/linux/generic/backport-5.15/705-04-v5.19-net-dsa-mt7530-drop-use-of-phylink_helper_basex_spee.patch b/target/linux/generic/backport-5.15/705-04-v5.19-net-dsa-mt7530-drop-use-of-phylink_helper_basex_spee.patch index 1a1802a167..63f6e9b954 100644 --- a/target/linux/generic/backport-5.15/705-04-v5.19-net-dsa-mt7530-drop-use-of-phylink_helper_basex_spee.patch +++ b/target/linux/generic/backport-5.15/705-04-v5.19-net-dsa-mt7530-drop-use-of-phylink_helper_basex_spee.patch @@ -20,7 +20,7 @@ Signed-off-by: Paolo Abeni --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -2999,11 +2999,6 @@ mt753x_phylink_validate(struct dsa_switc +@@ -3009,11 +3009,6 @@ mt753x_phylink_validate(struct dsa_switc linkmode_and(supported, supported, mask); linkmode_and(state->advertising, state->advertising, mask); diff --git a/target/linux/generic/backport-5.15/705-05-v5.19-net-dsa-mt7530-only-indicate-linkmodes-that-can-be-s.patch b/target/linux/generic/backport-5.15/705-05-v5.19-net-dsa-mt7530-only-indicate-linkmodes-that-can-be-s.patch index 636353c2d6..5a3098ade3 100644 --- a/target/linux/generic/backport-5.15/705-05-v5.19-net-dsa-mt7530-only-indicate-linkmodes-that-can-be-s.patch +++ b/target/linux/generic/backport-5.15/705-05-v5.19-net-dsa-mt7530-only-indicate-linkmodes-that-can-be-s.patch @@ -23,7 +23,7 @@ Signed-off-by: Paolo Abeni --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -2577,12 +2577,13 @@ static int mt7531_rgmii_setup(struct mt7 +@@ -2587,12 +2587,13 @@ static int mt7531_rgmii_setup(struct mt7 } static void mt7531_sgmii_validate(struct mt7530_priv *priv, int port, @@ -38,7 +38,7 @@ Signed-off-by: Paolo Abeni phylink_set(supported, 2500baseX_Full); phylink_set(supported, 2500baseT_Full); } -@@ -2955,16 +2956,18 @@ static void mt753x_phylink_get_caps(stru +@@ -2965,16 +2966,18 @@ static void mt753x_phylink_get_caps(stru static void mt7530_mac_port_validate(struct dsa_switch *ds, int port, @@ -58,7 +58,7 @@ Signed-off-by: Paolo Abeni } static void -@@ -2987,12 +2990,13 @@ mt753x_phylink_validate(struct dsa_switc +@@ -2997,12 +3000,13 @@ mt753x_phylink_validate(struct dsa_switc } /* This switch only supports 1G full-duplex. */ diff --git a/target/linux/generic/backport-5.15/705-06-v5.19-net-dsa-mt7530-switch-to-use-phylink_get_linkmodes.patch b/target/linux/generic/backport-5.15/705-06-v5.19-net-dsa-mt7530-switch-to-use-phylink_get_linkmodes.patch index 4d7569b4ce..c779cb141e 100644 --- a/target/linux/generic/backport-5.15/705-06-v5.19-net-dsa-mt7530-switch-to-use-phylink_get_linkmodes.patch +++ b/target/linux/generic/backport-5.15/705-06-v5.19-net-dsa-mt7530-switch-to-use-phylink_get_linkmodes.patch @@ -20,7 +20,7 @@ Signed-off-by: Paolo Abeni --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -2576,19 +2576,6 @@ static int mt7531_rgmii_setup(struct mt7 +@@ -2586,19 +2586,6 @@ static int mt7531_rgmii_setup(struct mt7 return 0; } @@ -40,7 +40,7 @@ Signed-off-by: Paolo Abeni static void mt7531_sgmii_link_up_force(struct dsa_switch *ds, int port, unsigned int mode, phy_interface_t interface, -@@ -2955,51 +2942,21 @@ static void mt753x_phylink_get_caps(stru +@@ -2965,51 +2952,21 @@ static void mt753x_phylink_get_caps(stru } static void @@ -97,7 +97,7 @@ Signed-off-by: Paolo Abeni linkmode_and(supported, supported, mask); linkmode_and(state->advertising, state->advertising, mask); -@@ -3200,7 +3157,6 @@ static const struct mt753x_info mt753x_t +@@ -3210,7 +3167,6 @@ static const struct mt753x_info mt753x_t .phy_write = mt7530_phy_write, .pad_setup = mt7530_pad_clk_setup, .mac_port_get_caps = mt7530_mac_port_get_caps, @@ -105,7 +105,7 @@ Signed-off-by: Paolo Abeni .mac_port_get_state = mt7530_phylink_mac_link_state, .mac_port_config = mt7530_mac_config, }, -@@ -3211,7 +3167,6 @@ static const struct mt753x_info mt753x_t +@@ -3221,7 +3177,6 @@ static const struct mt753x_info mt753x_t .phy_write = mt7530_phy_write, .pad_setup = mt7530_pad_clk_setup, .mac_port_get_caps = mt7530_mac_port_get_caps, @@ -113,7 +113,7 @@ Signed-off-by: Paolo Abeni .mac_port_get_state = mt7530_phylink_mac_link_state, .mac_port_config = mt7530_mac_config, }, -@@ -3223,7 +3178,6 @@ static const struct mt753x_info mt753x_t +@@ -3233,7 +3188,6 @@ static const struct mt753x_info mt753x_t .pad_setup = mt7531_pad_setup, .cpu_port_config = mt7531_cpu_port_config, .mac_port_get_caps = mt7531_mac_port_get_caps, @@ -121,7 +121,7 @@ Signed-off-by: Paolo Abeni .mac_port_get_state = mt7531_phylink_mac_link_state, .mac_port_config = mt7531_mac_config, .mac_pcs_an_restart = mt7531_sgmii_restart_an, -@@ -3285,7 +3239,6 @@ mt7530_probe(struct mdio_device *mdiodev +@@ -3295,7 +3249,6 @@ mt7530_probe(struct mdio_device *mdiodev if (!priv->info->sw_setup || !priv->info->pad_setup || !priv->info->phy_read || !priv->info->phy_write || !priv->info->mac_port_get_caps || diff --git a/target/linux/generic/backport-5.15/705-07-v5.19-net-dsa-mt7530-partially-convert-to-phylink_pcs.patch b/target/linux/generic/backport-5.15/705-07-v5.19-net-dsa-mt7530-partially-convert-to-phylink_pcs.patch index fdf2a964cc..3854d0e6d5 100644 --- a/target/linux/generic/backport-5.15/705-07-v5.19-net-dsa-mt7530-partially-convert-to-phylink_pcs.patch +++ b/target/linux/generic/backport-5.15/705-07-v5.19-net-dsa-mt7530-partially-convert-to-phylink_pcs.patch @@ -33,7 +33,7 @@ Signed-off-by: Paolo Abeni /* String, offset, and register size in bytes if different from 4 bytes */ static const struct mt7530_mib_desc mt7530_mib[] = { MIB_DESC(1, 0x00, "TxDrop"), -@@ -2576,12 +2581,11 @@ static int mt7531_rgmii_setup(struct mt7 +@@ -2586,12 +2591,11 @@ static int mt7531_rgmii_setup(struct mt7 return 0; } @@ -50,7 +50,7 @@ Signed-off-by: Paolo Abeni unsigned int val; /* For adjusting speed and duplex of SGMII force mode. */ -@@ -2607,6 +2611,9 @@ mt7531_sgmii_link_up_force(struct dsa_sw +@@ -2617,6 +2621,9 @@ mt7531_sgmii_link_up_force(struct dsa_sw /* MT7531 SGMII 1G force mode can only work in full duplex mode, * no matter MT7531_SGMII_FORCE_HALF_DUPLEX is set or not. @@ -60,7 +60,7 @@ Signed-off-by: Paolo Abeni */ if ((speed == SPEED_10 || speed == SPEED_100) && duplex != DUPLEX_FULL) -@@ -2682,9 +2689,10 @@ static int mt7531_sgmii_setup_mode_an(st +@@ -2692,9 +2699,10 @@ static int mt7531_sgmii_setup_mode_an(st return 0; } @@ -73,7 +73,7 @@ Signed-off-by: Paolo Abeni u32 val; /* Only restart AN when AN is enabled */ -@@ -2741,6 +2749,24 @@ mt753x_mac_config(struct dsa_switch *ds, +@@ -2751,6 +2759,24 @@ mt753x_mac_config(struct dsa_switch *ds, return priv->info->mac_port_config(ds, port, mode, state->interface); } @@ -98,7 +98,7 @@ Signed-off-by: Paolo Abeni static void mt753x_phylink_mac_config(struct dsa_switch *ds, int port, unsigned int mode, const struct phylink_link_state *state) -@@ -2802,17 +2828,6 @@ unsupported: +@@ -2812,17 +2838,6 @@ unsupported: mt7530_write(priv, MT7530_PMCR_P(port), mcr_new); } @@ -116,7 +116,7 @@ Signed-off-by: Paolo Abeni static void mt753x_phylink_mac_link_down(struct dsa_switch *ds, int port, unsigned int mode, phy_interface_t interface) -@@ -2822,16 +2837,13 @@ static void mt753x_phylink_mac_link_down +@@ -2832,16 +2847,13 @@ static void mt753x_phylink_mac_link_down mt7530_clear(priv, MT7530_PMCR_P(port), PMCR_LINK_SETTINGS_MASK); } @@ -139,7 +139,7 @@ Signed-off-by: Paolo Abeni } static void mt753x_phylink_mac_link_up(struct dsa_switch *ds, int port, -@@ -2844,8 +2856,6 @@ static void mt753x_phylink_mac_link_up(s +@@ -2854,8 +2866,6 @@ static void mt753x_phylink_mac_link_up(s struct mt7530_priv *priv = ds->priv; u32 mcr; @@ -148,7 +148,7 @@ Signed-off-by: Paolo Abeni mcr = PMCR_RX_EN | PMCR_TX_EN | PMCR_FORCE_LNK; /* MT753x MAC works in 1G full duplex mode for all up-clocked -@@ -2923,6 +2933,8 @@ mt7531_cpu_port_config(struct dsa_switch +@@ -2933,6 +2943,8 @@ mt7531_cpu_port_config(struct dsa_switch return ret; mt7530_write(priv, MT7530_PMCR_P(port), PMCR_CPU_PORT_SETTING(priv->id)); @@ -157,7 +157,7 @@ Signed-off-by: Paolo Abeni mt753x_phylink_mac_link_up(ds, port, MLO_AN_FIXED, interface, NULL, speed, DUPLEX_FULL, true, true); -@@ -2962,16 +2974,13 @@ mt753x_phylink_validate(struct dsa_switc +@@ -2972,16 +2984,13 @@ mt753x_phylink_validate(struct dsa_switc linkmode_and(state->advertising, state->advertising, mask); } @@ -178,7 +178,7 @@ Signed-off-by: Paolo Abeni pmsr = mt7530_read(priv, MT7530_PMSR_P(port)); state->link = (pmsr & PMSR_LINK); -@@ -2998,8 +3007,6 @@ mt7530_phylink_mac_link_state(struct dsa +@@ -3008,8 +3017,6 @@ mt7530_phylink_mac_link_state(struct dsa state->pause |= MLO_PAUSE_RX; if (pmsr & PMSR_TX_FC) state->pause |= MLO_PAUSE_TX; @@ -187,7 +187,7 @@ Signed-off-by: Paolo Abeni } static int -@@ -3041,32 +3048,49 @@ mt7531_sgmii_pcs_get_state_an(struct mt7 +@@ -3051,32 +3058,49 @@ mt7531_sgmii_pcs_get_state_an(struct mt7 return 0; } @@ -249,7 +249,7 @@ Signed-off-by: Paolo Abeni if (ret) return ret; -@@ -3079,6 +3103,13 @@ mt753x_setup(struct dsa_switch *ds) +@@ -3089,6 +3113,13 @@ mt753x_setup(struct dsa_switch *ds) if (ret && priv->irq) mt7530_free_irq_common(priv); @@ -263,7 +263,7 @@ Signed-off-by: Paolo Abeni return ret; } -@@ -3140,9 +3171,8 @@ static const struct dsa_switch_ops mt753 +@@ -3150,9 +3181,8 @@ static const struct dsa_switch_ops mt753 .port_mirror_del = mt753x_port_mirror_del, .phylink_get_caps = mt753x_phylink_get_caps, .phylink_validate = mt753x_phylink_validate, @@ -274,7 +274,7 @@ Signed-off-by: Paolo Abeni .phylink_mac_link_down = mt753x_phylink_mac_link_down, .phylink_mac_link_up = mt753x_phylink_mac_link_up, .get_mac_eee = mt753x_get_mac_eee, -@@ -3152,36 +3182,34 @@ static const struct dsa_switch_ops mt753 +@@ -3162,36 +3192,34 @@ static const struct dsa_switch_ops mt753 static const struct mt753x_info mt753x_table[] = { [ID_MT7621] = { .id = ID_MT7621, @@ -314,7 +314,7 @@ Signed-off-by: Paolo Abeni }, }; -@@ -3239,7 +3267,7 @@ mt7530_probe(struct mdio_device *mdiodev +@@ -3249,7 +3277,7 @@ mt7530_probe(struct mdio_device *mdiodev if (!priv->info->sw_setup || !priv->info->pad_setup || !priv->info->phy_read || !priv->info->phy_write || !priv->info->mac_port_get_caps || diff --git a/target/linux/generic/backport-5.15/705-08-v5.19-net-dsa-mt7530-move-autoneg-handling-to-PCS-validati.patch b/target/linux/generic/backport-5.15/705-08-v5.19-net-dsa-mt7530-move-autoneg-handling-to-PCS-validati.patch index 7b2fa36699..220e34d1df 100644 --- a/target/linux/generic/backport-5.15/705-08-v5.19-net-dsa-mt7530-move-autoneg-handling-to-PCS-validati.patch +++ b/target/linux/generic/backport-5.15/705-08-v5.19-net-dsa-mt7530-move-autoneg-handling-to-PCS-validati.patch @@ -20,7 +20,7 @@ Signed-off-by: Paolo Abeni --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -2953,25 +2953,16 @@ static void mt753x_phylink_get_caps(stru +@@ -2963,25 +2963,16 @@ static void mt753x_phylink_get_caps(stru priv->info->mac_port_get_caps(ds, port, config); } @@ -55,7 +55,7 @@ Signed-off-by: Paolo Abeni } static void mt7530_pcs_get_state(struct phylink_pcs *pcs, -@@ -3073,12 +3064,14 @@ static void mt7530_pcs_an_restart(struct +@@ -3083,12 +3074,14 @@ static void mt7530_pcs_an_restart(struct } static const struct phylink_pcs_ops mt7530_pcs_ops = { @@ -70,7 +70,7 @@ Signed-off-by: Paolo Abeni .pcs_get_state = mt7531_pcs_get_state, .pcs_config = mt753x_pcs_config, .pcs_an_restart = mt7531_pcs_an_restart, -@@ -3170,7 +3163,6 @@ static const struct dsa_switch_ops mt753 +@@ -3180,7 +3173,6 @@ static const struct dsa_switch_ops mt753 .port_mirror_add = mt753x_port_mirror_add, .port_mirror_del = mt753x_port_mirror_del, .phylink_get_caps = mt753x_phylink_get_caps, diff --git a/target/linux/generic/backport-5.15/705-09-v5.19-net-dsa-mt7530-mark-as-non-legacy.patch b/target/linux/generic/backport-5.15/705-09-v5.19-net-dsa-mt7530-mark-as-non-legacy.patch index 8bb587f5f5..71ececd074 100644 --- a/target/linux/generic/backport-5.15/705-09-v5.19-net-dsa-mt7530-mark-as-non-legacy.patch +++ b/target/linux/generic/backport-5.15/705-09-v5.19-net-dsa-mt7530-mark-as-non-legacy.patch @@ -19,7 +19,7 @@ Signed-off-by: Paolo Abeni --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -2950,6 +2950,12 @@ static void mt753x_phylink_get_caps(stru +@@ -2960,6 +2960,12 @@ static void mt753x_phylink_get_caps(stru config->mac_capabilities = MAC_ASYM_PAUSE | MAC_SYM_PAUSE | MAC_10 | MAC_100 | MAC_1000FD; diff --git a/target/linux/generic/backport-5.15/705-10-v5.19-net-dsa-mt753x-fix-pcs-conversion-regression.patch b/target/linux/generic/backport-5.15/705-10-v5.19-net-dsa-mt753x-fix-pcs-conversion-regression.patch index 438c02ade6..26c465d67e 100644 --- a/target/linux/generic/backport-5.15/705-10-v5.19-net-dsa-mt753x-fix-pcs-conversion-regression.patch +++ b/target/linux/generic/backport-5.15/705-10-v5.19-net-dsa-mt753x-fix-pcs-conversion-regression.patch @@ -81,7 +81,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -3088,9 +3088,16 @@ static int +@@ -3098,9 +3098,16 @@ static int mt753x_setup(struct dsa_switch *ds) { struct mt7530_priv *priv = ds->priv; @@ -100,7 +100,7 @@ Signed-off-by: Jakub Kicinski if (ret) return ret; -@@ -3102,13 +3109,6 @@ mt753x_setup(struct dsa_switch *ds) +@@ -3112,13 +3119,6 @@ mt753x_setup(struct dsa_switch *ds) if (ret && priv->irq) mt7530_free_irq_common(priv); diff --git a/target/linux/generic/backport-5.15/705-11-v6.0-net-dsa-mt7530-rework-mt7530_hw_vlan_-add-del.patch b/target/linux/generic/backport-5.15/705-11-v6.0-net-dsa-mt7530-rework-mt7530_hw_vlan_-add-del.patch index 26d207ca6a..4adb167199 100644 --- a/target/linux/generic/backport-5.15/705-11-v6.0-net-dsa-mt7530-rework-mt7530_hw_vlan_-add-del.patch +++ b/target/linux/generic/backport-5.15/705-11-v6.0-net-dsa-mt7530-rework-mt7530_hw_vlan_-add-del.patch @@ -26,7 +26,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -1536,11 +1536,11 @@ static void +@@ -1544,11 +1544,11 @@ static void mt7530_hw_vlan_add(struct mt7530_priv *priv, struct mt7530_hw_vlan_entry *entry) { @@ -40,7 +40,7 @@ Signed-off-by: Jakub Kicinski /* Validate the entry with independent learning, create egress tag per * VLAN and joining the port as one of the port members. -@@ -1551,22 +1551,20 @@ mt7530_hw_vlan_add(struct mt7530_priv *p +@@ -1559,22 +1559,20 @@ mt7530_hw_vlan_add(struct mt7530_priv *p /* Decide whether adding tag or not for those outgoing packets from the * port inside the VLAN. @@ -72,7 +72,7 @@ Signed-off-by: Jakub Kicinski } static void -@@ -1585,11 +1583,7 @@ mt7530_hw_vlan_del(struct mt7530_priv *p +@@ -1593,11 +1591,7 @@ mt7530_hw_vlan_del(struct mt7530_priv *p return; } diff --git a/target/linux/generic/backport-5.15/705-13-v6.0-net-dsa-mt7530-get-cpu-port-via-dp-cpu_dp-instead-of.patch b/target/linux/generic/backport-5.15/705-13-v6.0-net-dsa-mt7530-get-cpu-port-via-dp-cpu_dp-instead-of.patch index 2bfa1ef438..276251f509 100644 --- a/target/linux/generic/backport-5.15/705-13-v6.0-net-dsa-mt7530-get-cpu-port-via-dp-cpu_dp-instead-of.patch +++ b/target/linux/generic/backport-5.15/705-13-v6.0-net-dsa-mt7530-get-cpu-port-via-dp-cpu_dp-instead-of.patch @@ -21,7 +21,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -1040,6 +1040,7 @@ static int +@@ -1048,6 +1048,7 @@ static int mt7530_port_enable(struct dsa_switch *ds, int port, struct phy_device *phy) { @@ -29,7 +29,7 @@ Signed-off-by: Jakub Kicinski struct mt7530_priv *priv = ds->priv; mutex_lock(&priv->reg_mutex); -@@ -1048,7 +1049,11 @@ mt7530_port_enable(struct dsa_switch *ds +@@ -1056,7 +1057,11 @@ mt7530_port_enable(struct dsa_switch *ds * restore the port matrix if the port is the member of a certain * bridge. */ @@ -42,7 +42,7 @@ Signed-off-by: Jakub Kicinski priv->ports[port].enable = true; mt7530_rmw(priv, MT7530_PCR_P(port), PCR_MATRIX_MASK, priv->ports[port].pm); -@@ -1196,7 +1201,8 @@ mt7530_port_bridge_join(struct dsa_switc +@@ -1204,7 +1209,8 @@ mt7530_port_bridge_join(struct dsa_switc struct net_device *bridge) { struct dsa_port *dp = dsa_to_port(ds, port), *other_dp; @@ -52,7 +52,7 @@ Signed-off-by: Jakub Kicinski struct mt7530_priv *priv = ds->priv; mutex_lock(&priv->reg_mutex); -@@ -1273,9 +1279,12 @@ mt7530_port_set_vlan_unaware(struct dsa_ +@@ -1281,9 +1287,12 @@ mt7530_port_set_vlan_unaware(struct dsa_ * the CPU port get out of VLAN filtering mode. */ if (all_user_ports_removed) { @@ -67,7 +67,7 @@ Signed-off-by: Jakub Kicinski | PVC_EG_TAG(MT7530_VLAN_EG_CONSISTENT)); } } -@@ -1325,6 +1334,7 @@ mt7530_port_bridge_leave(struct dsa_swit +@@ -1333,6 +1342,7 @@ mt7530_port_bridge_leave(struct dsa_swit struct net_device *bridge) { struct dsa_port *dp = dsa_to_port(ds, port), *other_dp; @@ -75,7 +75,7 @@ Signed-off-by: Jakub Kicinski struct mt7530_priv *priv = ds->priv; mutex_lock(&priv->reg_mutex); -@@ -1353,8 +1363,8 @@ mt7530_port_bridge_leave(struct dsa_swit +@@ -1361,8 +1371,8 @@ mt7530_port_bridge_leave(struct dsa_swit */ if (priv->ports[port].enable) mt7530_rmw(priv, MT7530_PCR_P(port), PCR_MATRIX_MASK, @@ -86,7 +86,7 @@ Signed-off-by: Jakub Kicinski /* When a port is removed from the bridge, the port would be set up * back to the default as is at initial boot which is a VLAN-unaware -@@ -1517,6 +1527,9 @@ static int +@@ -1525,6 +1535,9 @@ static int mt7530_port_vlan_filtering(struct dsa_switch *ds, int port, bool vlan_filtering, struct netlink_ext_ack *extack) { @@ -96,7 +96,7 @@ Signed-off-by: Jakub Kicinski if (vlan_filtering) { /* The port is being kept as VLAN-unaware port when bridge is * set up with vlan_filtering not being set, Otherwise, the -@@ -1524,7 +1537,7 @@ mt7530_port_vlan_filtering(struct dsa_sw +@@ -1532,7 +1545,7 @@ mt7530_port_vlan_filtering(struct dsa_sw * for becoming a VLAN-aware port. */ mt7530_port_set_vlan_aware(ds, port); diff --git a/target/linux/generic/backport-5.15/782-v6.1-net-dsa-mt7530-add-support-for-in-band-link-status.patch b/target/linux/generic/backport-5.15/782-v6.1-net-dsa-mt7530-add-support-for-in-band-link-status.patch index 377ee76171..8d55ffb8b6 100644 --- a/target/linux/generic/backport-5.15/782-v6.1-net-dsa-mt7530-add-support-for-in-band-link-status.patch +++ b/target/linux/generic/backport-5.15/782-v6.1-net-dsa-mt7530-add-support-for-in-band-link-status.patch @@ -19,7 +19,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -2736,9 +2736,6 @@ mt7531_mac_config(struct dsa_switch *ds, +@@ -2746,9 +2746,6 @@ mt7531_mac_config(struct dsa_switch *ds, case PHY_INTERFACE_MODE_NA: case PHY_INTERFACE_MODE_1000BASEX: case PHY_INTERFACE_MODE_2500BASEX: @@ -29,7 +29,7 @@ Signed-off-by: David S. Miller return mt7531_sgmii_setup_mode_force(priv, port, interface); default: return -EINVAL; -@@ -2814,13 +2811,6 @@ unsupported: +@@ -2824,13 +2821,6 @@ unsupported: return; } @@ -43,7 +43,7 @@ Signed-off-by: David S. Miller mcr_cur = mt7530_read(priv, MT7530_PMCR_P(port)); mcr_new = mcr_cur; mcr_new &= ~PMCR_LINK_SETTINGS_MASK; -@@ -2957,6 +2947,9 @@ static void mt753x_phylink_get_caps(stru +@@ -2967,6 +2957,9 @@ static void mt753x_phylink_get_caps(stru config->mac_capabilities = MAC_ASYM_PAUSE | MAC_SYM_PAUSE | MAC_10 | MAC_100 | MAC_1000FD; @@ -53,7 +53,7 @@ Signed-off-by: David S. Miller /* This driver does not make use of the speed, duplex, pause or the * advertisement in its mac_config, so it is safe to mark this driver * as non-legacy. -@@ -3022,6 +3015,7 @@ mt7531_sgmii_pcs_get_state_an(struct mt7 +@@ -3032,6 +3025,7 @@ mt7531_sgmii_pcs_get_state_an(struct mt7 status = mt7530_read(priv, MT7531_PCS_CONTROL_1(port)); state->link = !!(status & MT7531_SGMII_LINK_STATUS); @@ -61,7 +61,7 @@ Signed-off-by: David S. Miller if (state->interface == PHY_INTERFACE_MODE_SGMII && (status & MT7531_SGMII_AN_ENABLE)) { val = mt7530_read(priv, MT7531_PCS_SPEED_ABILITY(port)); -@@ -3052,16 +3046,44 @@ mt7531_sgmii_pcs_get_state_an(struct mt7 +@@ -3062,16 +3056,44 @@ mt7531_sgmii_pcs_get_state_an(struct mt7 return 0; } @@ -109,7 +109,7 @@ Signed-off-by: David S. Miller } static int mt753x_pcs_config(struct phylink_pcs *pcs, unsigned int mode, -@@ -3102,6 +3124,8 @@ mt753x_setup(struct dsa_switch *ds) +@@ -3112,6 +3134,8 @@ mt753x_setup(struct dsa_switch *ds) priv->pcs[i].pcs.ops = priv->info->pcs_ops; priv->pcs[i].priv = priv; priv->pcs[i].port = i; diff --git a/target/linux/generic/backport-5.15/788-v6.3-net-dsa-mt7530-use-external-PCS-driver.patch b/target/linux/generic/backport-5.15/788-v6.3-net-dsa-mt7530-use-external-PCS-driver.patch index 9e445f1300..2642cd4faf 100644 --- a/target/linux/generic/backport-5.15/788-v6.3-net-dsa-mt7530-use-external-PCS-driver.patch +++ b/target/linux/generic/backport-5.15/788-v6.3-net-dsa-mt7530-use-external-PCS-driver.patch @@ -81,7 +81,7 @@ Tested-by: Frank Wunderlich #include #include #include -@@ -2588,128 +2589,11 @@ static int mt7531_rgmii_setup(struct mt7 +@@ -2598,128 +2599,11 @@ static int mt7531_rgmii_setup(struct mt7 return 0; } @@ -210,7 +210,7 @@ Tested-by: Frank Wunderlich static int mt7531_mac_config(struct dsa_switch *ds, int port, unsigned int mode, phy_interface_t interface) -@@ -2732,11 +2616,11 @@ mt7531_mac_config(struct dsa_switch *ds, +@@ -2742,11 +2626,11 @@ mt7531_mac_config(struct dsa_switch *ds, phydev = dp->slave->phydev; return mt7531_rgmii_setup(priv, port, interface, phydev); case PHY_INTERFACE_MODE_SGMII: @@ -224,7 +224,7 @@ Tested-by: Frank Wunderlich default: return -EINVAL; } -@@ -2761,11 +2645,11 @@ mt753x_phylink_mac_select_pcs(struct dsa +@@ -2771,11 +2655,11 @@ mt753x_phylink_mac_select_pcs(struct dsa switch (interface) { case PHY_INTERFACE_MODE_TRGMII: @@ -238,7 +238,7 @@ Tested-by: Frank Wunderlich default: return NULL; } -@@ -3006,86 +2890,6 @@ static void mt7530_pcs_get_state(struct +@@ -3016,86 +2900,6 @@ static void mt7530_pcs_get_state(struct state->pause |= MLO_PAUSE_TX; } @@ -325,7 +325,7 @@ Tested-by: Frank Wunderlich static int mt753x_pcs_config(struct phylink_pcs *pcs, unsigned int mode, phy_interface_t interface, const unsigned long *advertising, -@@ -3105,18 +2909,57 @@ static const struct phylink_pcs_ops mt75 +@@ -3115,18 +2919,57 @@ static const struct phylink_pcs_ops mt75 .pcs_an_restart = mt7530_pcs_an_restart, }; @@ -389,7 +389,7 @@ Tested-by: Frank Wunderlich int i, ret; /* Initialise the PCS devices */ -@@ -3124,8 +2967,6 @@ mt753x_setup(struct dsa_switch *ds) +@@ -3134,8 +2977,6 @@ mt753x_setup(struct dsa_switch *ds) priv->pcs[i].pcs.ops = priv->info->pcs_ops; priv->pcs[i].priv = priv; priv->pcs[i].port = i; @@ -398,7 +398,7 @@ Tested-by: Frank Wunderlich } ret = priv->info->sw_setup(ds); -@@ -3140,6 +2981,16 @@ mt753x_setup(struct dsa_switch *ds) +@@ -3150,6 +2991,16 @@ mt753x_setup(struct dsa_switch *ds) if (ret && priv->irq) mt7530_free_irq_common(priv); @@ -415,7 +415,7 @@ Tested-by: Frank Wunderlich return ret; } -@@ -3231,7 +3082,7 @@ static const struct mt753x_info mt753x_t +@@ -3241,7 +3092,7 @@ static const struct mt753x_info mt753x_t }, [ID_MT7531] = { .id = ID_MT7531, @@ -424,7 +424,7 @@ Tested-by: Frank Wunderlich .sw_setup = mt7531_setup, .phy_read = mt7531_ind_phy_read, .phy_write = mt7531_ind_phy_write, -@@ -3339,7 +3190,7 @@ static void +@@ -3349,7 +3200,7 @@ static void mt7530_remove(struct mdio_device *mdiodev) { struct mt7530_priv *priv = dev_get_drvdata(&mdiodev->dev); @@ -433,7 +433,7 @@ Tested-by: Frank Wunderlich if (!priv) return; -@@ -3358,6 +3209,10 @@ mt7530_remove(struct mdio_device *mdiode +@@ -3368,6 +3219,10 @@ mt7530_remove(struct mdio_device *mdiode mt7530_free_irq(priv); dsa_unregister_switch(priv->ds); diff --git a/target/linux/generic/backport-5.15/790-v6.4-0002-net-dsa-mt7530-refactor-SGMII-PCS-creation.patch b/target/linux/generic/backport-5.15/790-v6.4-0002-net-dsa-mt7530-refactor-SGMII-PCS-creation.patch index a933d376c8..983423aaff 100644 --- a/target/linux/generic/backport-5.15/790-v6.4-0002-net-dsa-mt7530-refactor-SGMII-PCS-creation.patch +++ b/target/linux/generic/backport-5.15/790-v6.4-0002-net-dsa-mt7530-refactor-SGMII-PCS-creation.patch @@ -18,7 +18,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -2941,26 +2941,56 @@ static const struct regmap_bus mt7531_re +@@ -2951,26 +2951,56 @@ static const struct regmap_bus mt7531_re .reg_update_bits = mt7530_regmap_update_bits, }; @@ -88,7 +88,7 @@ Signed-off-by: David S. Miller int i, ret; /* Initialise the PCS devices */ -@@ -2982,15 +3012,11 @@ mt753x_setup(struct dsa_switch *ds) +@@ -2992,15 +3022,11 @@ mt753x_setup(struct dsa_switch *ds) if (ret && priv->irq) mt7530_free_irq_common(priv); diff --git a/target/linux/generic/backport-5.15/790-v6.4-0003-net-dsa-mt7530-use-unlocked-regmap-accessors.patch b/target/linux/generic/backport-5.15/790-v6.4-0003-net-dsa-mt7530-use-unlocked-regmap-accessors.patch index 5f6990f117..9d8f67ba95 100644 --- a/target/linux/generic/backport-5.15/790-v6.4-0003-net-dsa-mt7530-use-unlocked-regmap-accessors.patch +++ b/target/linux/generic/backport-5.15/790-v6.4-0003-net-dsa-mt7530-use-unlocked-regmap-accessors.patch @@ -19,7 +19,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -2914,7 +2914,7 @@ static int mt7530_regmap_read(void *cont +@@ -2924,7 +2924,7 @@ static int mt7530_regmap_read(void *cont { struct mt7530_priv *priv = context; @@ -28,7 +28,7 @@ Signed-off-by: David S. Miller return 0; }; -@@ -2922,23 +2922,25 @@ static int mt7530_regmap_write(void *con +@@ -2932,23 +2932,25 @@ static int mt7530_regmap_write(void *con { struct mt7530_priv *priv = context; @@ -62,7 +62,7 @@ Signed-off-by: David S. Miller }; static int -@@ -2964,6 +2966,9 @@ mt7531_create_sgmii(struct mt7530_priv * +@@ -2974,6 +2976,9 @@ mt7531_create_sgmii(struct mt7530_priv * mt7531_pcs_config[i]->reg_stride = 4; mt7531_pcs_config[i]->reg_base = MT7531_SGMII_REG_BASE(5 + i); mt7531_pcs_config[i]->max_register = 0x17c; diff --git a/target/linux/generic/backport-5.15/790-v6.4-0004-net-dsa-mt7530-use-regmap-to-access-switch-register-.patch b/target/linux/generic/backport-5.15/790-v6.4-0004-net-dsa-mt7530-use-regmap-to-access-switch-register-.patch index 9499ca598f..bd1d5c98a7 100644 --- a/target/linux/generic/backport-5.15/790-v6.4-0004-net-dsa-mt7530-use-regmap-to-access-switch-register-.patch +++ b/target/linux/generic/backport-5.15/790-v6.4-0004-net-dsa-mt7530-use-regmap-to-access-switch-register-.patch @@ -133,7 +133,7 @@ Signed-off-by: David S. Miller } static void -@@ -2910,22 +2931,6 @@ static const struct phylink_pcs_ops mt75 +@@ -2920,22 +2941,6 @@ static const struct phylink_pcs_ops mt75 .pcs_an_restart = mt7530_pcs_an_restart, }; @@ -156,7 +156,7 @@ Signed-off-by: David S. Miller static void mt7530_mdio_regmap_lock(void *mdio_lock) { -@@ -2938,7 +2943,7 @@ mt7530_mdio_regmap_unlock(void *mdio_loc +@@ -2948,7 +2953,7 @@ mt7530_mdio_regmap_unlock(void *mdio_loc mutex_unlock(mdio_lock); } @@ -165,7 +165,7 @@ Signed-off-by: David S. Miller .reg_write = mt7530_regmap_write, .reg_read = mt7530_regmap_read, }; -@@ -2971,7 +2976,7 @@ mt7531_create_sgmii(struct mt7530_priv * +@@ -2981,7 +2986,7 @@ mt7531_create_sgmii(struct mt7530_priv * mt7531_pcs_config[i]->lock_arg = &priv->bus->mdio_lock; regmap = devm_regmap_init(priv->dev, @@ -174,7 +174,7 @@ Signed-off-by: David S. Miller mt7531_pcs_config[i]); if (IS_ERR(regmap)) { ret = PTR_ERR(regmap); -@@ -3136,6 +3141,7 @@ MODULE_DEVICE_TABLE(of, mt7530_of_match) +@@ -3146,6 +3151,7 @@ MODULE_DEVICE_TABLE(of, mt7530_of_match) static int mt7530_probe(struct mdio_device *mdiodev) { @@ -182,7 +182,7 @@ Signed-off-by: David S. Miller struct mt7530_priv *priv; struct device_node *dn; -@@ -3215,6 +3221,21 @@ mt7530_probe(struct mdio_device *mdiodev +@@ -3225,6 +3231,21 @@ mt7530_probe(struct mdio_device *mdiodev mutex_init(&priv->reg_mutex); dev_set_drvdata(&mdiodev->dev, priv); diff --git a/target/linux/generic/backport-5.15/790-v6.4-0005-net-dsa-mt7530-move-SGMII-PCS-creation-to-mt7530_pro.patch b/target/linux/generic/backport-5.15/790-v6.4-0005-net-dsa-mt7530-move-SGMII-PCS-creation-to-mt7530_pro.patch index 44c31a4f6f..8c11bc3733 100644 --- a/target/linux/generic/backport-5.15/790-v6.4-0005-net-dsa-mt7530-move-SGMII-PCS-creation-to-mt7530_pro.patch +++ b/target/linux/generic/backport-5.15/790-v6.4-0005-net-dsa-mt7530-move-SGMII-PCS-creation-to-mt7530_pro.patch @@ -18,7 +18,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -3022,12 +3022,6 @@ mt753x_setup(struct dsa_switch *ds) +@@ -3032,12 +3032,6 @@ mt753x_setup(struct dsa_switch *ds) if (ret && priv->irq) mt7530_free_irq_common(priv); @@ -31,7 +31,7 @@ Signed-off-by: David S. Miller return ret; } -@@ -3144,6 +3138,7 @@ mt7530_probe(struct mdio_device *mdiodev +@@ -3154,6 +3148,7 @@ mt7530_probe(struct mdio_device *mdiodev static struct regmap_config *regmap_config; struct mt7530_priv *priv; struct device_node *dn; @@ -39,7 +39,7 @@ Signed-off-by: David S. Miller dn = mdiodev->dev.of_node; -@@ -3236,6 +3231,12 @@ mt7530_probe(struct mdio_device *mdiodev +@@ -3246,6 +3241,12 @@ mt7530_probe(struct mdio_device *mdiodev if (IS_ERR(priv->regmap)) return PTR_ERR(priv->regmap); diff --git a/target/linux/generic/backport-5.15/790-v6.4-0006-net-dsa-mt7530-introduce-mutex-helpers.patch b/target/linux/generic/backport-5.15/790-v6.4-0006-net-dsa-mt7530-introduce-mutex-helpers.patch index c23f96e7a6..4d75c55647 100644 --- a/target/linux/generic/backport-5.15/790-v6.4-0006-net-dsa-mt7530-introduce-mutex-helpers.patch +++ b/target/linux/generic/backport-5.15/790-v6.4-0006-net-dsa-mt7530-introduce-mutex-helpers.patch @@ -214,7 +214,7 @@ Signed-off-by: David S. Miller return ret; } -@@ -1109,7 +1109,6 @@ static int +@@ -1117,7 +1117,6 @@ static int mt7530_port_change_mtu(struct dsa_switch *ds, int port, int new_mtu) { struct mt7530_priv *priv = ds->priv; @@ -222,7 +222,7 @@ Signed-off-by: David S. Miller int length; u32 val; -@@ -1120,7 +1119,7 @@ mt7530_port_change_mtu(struct dsa_switch +@@ -1128,7 +1127,7 @@ mt7530_port_change_mtu(struct dsa_switch if (!dsa_is_cpu_port(ds, port)) return 0; @@ -231,7 +231,7 @@ Signed-off-by: David S. Miller val = mt7530_mii_read(priv, MT7530_GMACCR); val &= ~MAX_RX_PKT_LEN_MASK; -@@ -1141,7 +1140,7 @@ mt7530_port_change_mtu(struct dsa_switch +@@ -1149,7 +1148,7 @@ mt7530_port_change_mtu(struct dsa_switch mt7530_mii_write(priv, MT7530_GMACCR, val); @@ -240,7 +240,7 @@ Signed-off-by: David S. Miller return 0; } -@@ -1937,10 +1936,10 @@ mt7530_irq_thread_fn(int irq, void *dev_ +@@ -1945,10 +1944,10 @@ mt7530_irq_thread_fn(int irq, void *dev_ u32 val; int p; @@ -253,7 +253,7 @@ Signed-off-by: David S. Miller for (p = 0; p < MT7530_NUM_PHYS; p++) { if (BIT(p) & val) { -@@ -1976,7 +1975,7 @@ mt7530_irq_bus_lock(struct irq_data *d) +@@ -1984,7 +1983,7 @@ mt7530_irq_bus_lock(struct irq_data *d) { struct mt7530_priv *priv = irq_data_get_irq_chip_data(d); @@ -262,7 +262,7 @@ Signed-off-by: David S. Miller } static void -@@ -1985,7 +1984,7 @@ mt7530_irq_bus_sync_unlock(struct irq_da +@@ -1993,7 +1992,7 @@ mt7530_irq_bus_sync_unlock(struct irq_da struct mt7530_priv *priv = irq_data_get_irq_chip_data(d); mt7530_mii_write(priv, MT7530_SYS_INT_EN, priv->irq_enable); diff --git a/target/linux/generic/backport-5.15/790-v6.4-0008-net-dsa-mt7530-introduce-mt7530_probe_common-helper-.patch b/target/linux/generic/backport-5.15/790-v6.4-0008-net-dsa-mt7530-introduce-mt7530_probe_common-helper-.patch index aeb1e37a1a..00dd91bbc9 100644 --- a/target/linux/generic/backport-5.15/790-v6.4-0008-net-dsa-mt7530-introduce-mt7530_probe_common-helper-.patch +++ b/target/linux/generic/backport-5.15/790-v6.4-0008-net-dsa-mt7530-introduce-mt7530_probe_common-helper-.patch @@ -17,7 +17,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -3150,44 +3150,21 @@ static const struct of_device_id mt7530_ +@@ -3160,44 +3160,21 @@ static const struct of_device_id mt7530_ MODULE_DEVICE_TABLE(of, mt7530_of_match); static int @@ -67,7 +67,7 @@ Signed-off-by: David S. Miller if (!priv->info) return -EINVAL; -@@ -3201,23 +3178,53 @@ mt7530_probe(struct mdio_device *mdiodev +@@ -3211,23 +3188,53 @@ mt7530_probe(struct mdio_device *mdiodev return -EINVAL; priv->id = priv->info->id; @@ -131,7 +131,7 @@ Signed-off-by: David S. Miller priv->reset = devm_gpiod_get_optional(&mdiodev->dev, "reset", GPIOD_OUT_LOW); if (IS_ERR(priv->reset)) { -@@ -3226,12 +3233,15 @@ mt7530_probe(struct mdio_device *mdiodev +@@ -3236,12 +3243,15 @@ mt7530_probe(struct mdio_device *mdiodev } } diff --git a/target/linux/generic/backport-5.15/790-v6.4-0009-net-dsa-mt7530-introduce-mt7530_remove_common-helper.patch b/target/linux/generic/backport-5.15/790-v6.4-0009-net-dsa-mt7530-introduce-mt7530_remove_common-helper.patch index 2651f45918..be73b67c94 100644 --- a/target/linux/generic/backport-5.15/790-v6.4-0009-net-dsa-mt7530-introduce-mt7530_remove_common-helper.patch +++ b/target/linux/generic/backport-5.15/790-v6.4-0009-net-dsa-mt7530-introduce-mt7530_remove_common-helper.patch @@ -17,7 +17,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -3268,6 +3268,17 @@ mt7530_probe(struct mdio_device *mdiodev +@@ -3278,6 +3278,17 @@ mt7530_probe(struct mdio_device *mdiodev } static void @@ -35,7 +35,7 @@ Signed-off-by: David S. Miller mt7530_remove(struct mdio_device *mdiodev) { struct mt7530_priv *priv = dev_get_drvdata(&mdiodev->dev); -@@ -3286,16 +3297,11 @@ mt7530_remove(struct mdio_device *mdiode +@@ -3296,16 +3307,11 @@ mt7530_remove(struct mdio_device *mdiode dev_err(priv->dev, "Failed to disable io pwr: %d\n", ret); diff --git a/target/linux/generic/backport-5.15/790-v6.4-0011-net-dsa-mt7530-introduce-separate-MDIO-driver.patch b/target/linux/generic/backport-5.15/790-v6.4-0011-net-dsa-mt7530-introduce-separate-MDIO-driver.patch index d5ba5dbf66..c0e29fa00f 100644 --- a/target/linux/generic/backport-5.15/790-v6.4-0011-net-dsa-mt7530-introduce-separate-MDIO-driver.patch +++ b/target/linux/generic/backport-5.15/790-v6.4-0011-net-dsa-mt7530-introduce-separate-MDIO-driver.patch @@ -416,7 +416,7 @@ Signed-off-by: David S. Miller static u32 mt7530_mii_read(struct mt7530_priv *priv, u32 reg) { -@@ -2948,72 +2899,6 @@ static const struct phylink_pcs_ops mt75 +@@ -2958,72 +2909,6 @@ static const struct phylink_pcs_ops mt75 .pcs_an_restart = mt7530_pcs_an_restart, }; @@ -489,7 +489,7 @@ Signed-off-by: David S. Miller static int mt753x_setup(struct dsa_switch *ds) { -@@ -3072,7 +2957,7 @@ static int mt753x_set_mac_eee(struct dsa +@@ -3082,7 +2967,7 @@ static int mt753x_set_mac_eee(struct dsa return 0; } @@ -498,7 +498,7 @@ Signed-off-by: David S. Miller .get_tag_protocol = mtk_get_tag_protocol, .setup = mt753x_setup, .get_strings = mt7530_get_strings, -@@ -3106,8 +2991,9 @@ static const struct dsa_switch_ops mt753 +@@ -3116,8 +3001,9 @@ static const struct dsa_switch_ops mt753 .get_mac_eee = mt753x_get_mac_eee, .set_mac_eee = mt753x_set_mac_eee, }; @@ -509,7 +509,7 @@ Signed-off-by: David S. Miller [ID_MT7621] = { .id = ID_MT7621, .pcs_ops = &mt7530_pcs_ops, -@@ -3140,16 +3026,9 @@ static const struct mt753x_info mt753x_t +@@ -3150,16 +3036,9 @@ static const struct mt753x_info mt753x_t .mac_port_config = mt7531_mac_config, }, }; @@ -528,7 +528,7 @@ Signed-off-by: David S. Miller mt7530_probe_common(struct mt7530_priv *priv) { struct device *dev = priv->dev; -@@ -3186,88 +3065,9 @@ mt7530_probe_common(struct mt7530_priv * +@@ -3196,88 +3075,9 @@ mt7530_probe_common(struct mt7530_priv * return 0; } @@ -619,7 +619,7 @@ Signed-off-by: David S. Miller mt7530_remove_common(struct mt7530_priv *priv) { if (priv->irq) -@@ -3278,57 +3078,6 @@ mt7530_remove_common(struct mt7530_priv +@@ -3288,57 +3088,6 @@ mt7530_remove_common(struct mt7530_priv mutex_destroy(&priv->reg_mutex); } diff --git a/target/linux/generic/backport-5.15/790-v6.4-0013-net-dsa-mt7530-introduce-driver-for-MT7988-built-in-.patch b/target/linux/generic/backport-5.15/790-v6.4-0013-net-dsa-mt7530-introduce-driver-for-MT7988-built-in-.patch index b748fb5f8f..89dc30c7df 100644 --- a/target/linux/generic/backport-5.15/790-v6.4-0013-net-dsa-mt7530-introduce-driver-for-MT7988-built-in-.patch +++ b/target/linux/generic/backport-5.15/790-v6.4-0013-net-dsa-mt7530-introduce-driver-for-MT7988-built-in-.patch @@ -184,7 +184,7 @@ Signed-off-by: David S. Miller +MODULE_LICENSE("GPL"); --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -1984,6 +1984,47 @@ static const struct irq_domain_ops mt753 +@@ -1992,6 +1992,47 @@ static const struct irq_domain_ops mt753 }; static void @@ -232,7 +232,7 @@ Signed-off-by: David S. Miller mt7530_setup_mdio_irq(struct mt7530_priv *priv) { struct dsa_switch *ds = priv->ds; -@@ -2017,8 +2058,15 @@ mt7530_setup_irq(struct mt7530_priv *pri +@@ -2025,8 +2066,15 @@ mt7530_setup_irq(struct mt7530_priv *pri return priv->irq ? : -EINVAL; } @@ -250,7 +250,7 @@ Signed-off-by: David S. Miller if (!priv->irq_domain) { dev_err(dev, "failed to create IRQ domain\n"); return -ENOMEM; -@@ -2511,6 +2559,25 @@ static void mt7531_mac_port_get_caps(str +@@ -2521,6 +2569,25 @@ static void mt7531_mac_port_get_caps(str } } @@ -276,7 +276,7 @@ Signed-off-by: David S. Miller static int mt753x_pad_setup(struct dsa_switch *ds, const struct phylink_link_state *state) { -@@ -2587,6 +2654,17 @@ static bool mt753x_is_mac_port(u32 port) +@@ -2597,6 +2664,17 @@ static bool mt753x_is_mac_port(u32 port) } static int @@ -294,7 +294,7 @@ Signed-off-by: David S. Miller mt7531_mac_config(struct dsa_switch *ds, int port, unsigned int mode, phy_interface_t interface) { -@@ -2656,7 +2734,8 @@ mt753x_phylink_mac_config(struct dsa_swi +@@ -2666,7 +2744,8 @@ mt753x_phylink_mac_config(struct dsa_swi switch (port) { case 0 ... 4: /* Internal phy */ @@ -304,7 +304,7 @@ Signed-off-by: David S. Miller goto unsupported; break; case 5: /* 2nd cpu port with phy of port 0 or 4 / external phy */ -@@ -2734,7 +2813,8 @@ static void mt753x_phylink_mac_link_up(s +@@ -2744,7 +2823,8 @@ static void mt753x_phylink_mac_link_up(s /* MT753x MAC works in 1G full duplex mode for all up-clocked * variants. */ @@ -314,7 +314,7 @@ Signed-off-by: David S. Miller (phy_interface_mode_is_8023z(interface))) { speed = SPEED_1000; duplex = DUPLEX_FULL; -@@ -2814,6 +2894,21 @@ mt7531_cpu_port_config(struct dsa_switch +@@ -2824,6 +2904,21 @@ mt7531_cpu_port_config(struct dsa_switch return 0; } @@ -336,7 +336,7 @@ Signed-off-by: David S. Miller static void mt753x_phylink_get_caps(struct dsa_switch *ds, int port, struct phylink_config *config) { -@@ -2959,6 +3054,27 @@ static int mt753x_set_mac_eee(struct dsa +@@ -2969,6 +3064,27 @@ static int mt753x_set_mac_eee(struct dsa return 0; } @@ -364,7 +364,7 @@ Signed-off-by: David S. Miller const struct dsa_switch_ops mt7530_switch_ops = { .get_tag_protocol = mtk_get_tag_protocol, .setup = mt753x_setup, -@@ -3027,6 +3143,17 @@ const struct mt753x_info mt753x_table[] +@@ -3037,6 +3153,17 @@ const struct mt753x_info mt753x_table[] .mac_port_get_caps = mt7531_mac_port_get_caps, .mac_port_config = mt7531_mac_config, }, diff --git a/target/linux/generic/backport-5.15/790-v6.4-0014-net-dsa-mt7530-fix-support-for-MT7531BE.patch b/target/linux/generic/backport-5.15/790-v6.4-0014-net-dsa-mt7530-fix-support-for-MT7531BE.patch index ed8bca7d1c..40e1816726 100644 --- a/target/linux/generic/backport-5.15/790-v6.4-0014-net-dsa-mt7530-fix-support-for-MT7531BE.patch +++ b/target/linux/generic/backport-5.15/790-v6.4-0014-net-dsa-mt7530-fix-support-for-MT7531BE.patch @@ -73,7 +73,7 @@ Signed-off-by: Jakub Kicinski } --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -3021,6 +3021,12 @@ mt753x_setup(struct dsa_switch *ds) +@@ -3031,6 +3031,12 @@ mt753x_setup(struct dsa_switch *ds) if (ret && priv->irq) mt7530_free_irq_common(priv); diff --git a/target/linux/generic/config-filter b/target/linux/generic/config-filter index e7aa90f8b5..e7eda471d0 100644 --- a/target/linux/generic/config-filter +++ b/target/linux/generic/config-filter @@ -5,6 +5,7 @@ # CONFIG_CC_(CAN|HAS|IS|VERSION)_.* is not set CONFIG_CLANG_VERSION=.* # CONFIG_GCC_VERSION is not set +CONFIG_FRAME_WARN=.* # CONFIG_HAVE_(?!(ARCH_TIMER|TCM|SMP)).* is not set # CONFIG_INLINE_.* is not set # CONFIG_LD_.* is not set diff --git a/target/linux/generic/pending-5.15/723-net-mt7531-ensure-all-MACs-are-powered-down-before-r.patch b/target/linux/generic/pending-5.15/723-net-mt7531-ensure-all-MACs-are-powered-down-before-r.patch index a3274906a4..4ff7f321de 100644 --- a/target/linux/generic/pending-5.15/723-net-mt7531-ensure-all-MACs-are-powered-down-before-r.patch +++ b/target/linux/generic/pending-5.15/723-net-mt7531-ensure-all-MACs-are-powered-down-before-r.patch @@ -15,7 +15,7 @@ Signed-off-by: Alexander Couzens --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -2412,7 +2412,7 @@ mt7531_setup(struct dsa_switch *ds) +@@ -2422,7 +2422,7 @@ mt7531_setup(struct dsa_switch *ds) struct mt7530_priv *priv = ds->priv; struct mt7530_dummy_poll p; u32 val, id; @@ -24,7 +24,7 @@ Signed-off-by: Alexander Couzens /* Reset whole chip through gpio pin or memory-mapped registers for * different type of hardware -@@ -2444,6 +2444,10 @@ mt7531_setup(struct dsa_switch *ds) +@@ -2454,6 +2454,10 @@ mt7531_setup(struct dsa_switch *ds) return -ENODEV; } diff --git a/target/linux/generic/pending-5.15/795-mt7530-register-OF-node-for-internal-MDIO-bus.patch b/target/linux/generic/pending-5.15/795-mt7530-register-OF-node-for-internal-MDIO-bus.patch index 8a64a2a985..98fd6e9c7a 100644 --- a/target/linux/generic/pending-5.15/795-mt7530-register-OF-node-for-internal-MDIO-bus.patch +++ b/target/linux/generic/pending-5.15/795-mt7530-register-OF-node-for-internal-MDIO-bus.patch @@ -16,7 +16,7 @@ Signed-off-by: David Bauer --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -2121,10 +2121,13 @@ mt7530_setup_mdio(struct mt7530_priv *pr +@@ -2129,10 +2129,13 @@ mt7530_setup_mdio(struct mt7530_priv *pr { struct dsa_switch *ds = priv->ds; struct device *dev = priv->dev; @@ -30,7 +30,7 @@ Signed-off-by: David Bauer bus = devm_mdiobus_alloc(dev); if (!bus) return -ENOMEM; -@@ -2141,7 +2144,9 @@ mt7530_setup_mdio(struct mt7530_priv *pr +@@ -2149,7 +2152,9 @@ mt7530_setup_mdio(struct mt7530_priv *pr if (priv->irq) mt7530_setup_mdio_irq(priv); diff --git a/target/linux/layerscape/base-files/etc/board.d/01_led b/target/linux/layerscape/base-files/etc/board.d/01_led index a21c21980a..8a0e5c4b95 100644 --- a/target/linux/layerscape/base-files/etc/board.d/01_led +++ b/target/linux/layerscape/base-files/etc/board.d/01_led @@ -9,14 +9,6 @@ board_config_update board=$(board_name) case "$board" in -traverse,ls1043v) - ucidef_set_led_netdev "wan" "WAN LED" "ls1043v:yellow:wan" "eth4" - ;; -traverse,ls1043s) - ucidef_set_led_netdev "wan" "WAN LED" "ls1043s:yellow:wan" "eth4" - ucidef_set_led_netdev "xgact" "10G Activity" "ls1043s:yellow:10gact" "eth6" - ucidef_set_led_netdev "xglink" "10G Link" "ls1043s:green:10glink" "eth6" - ;; traverse,ten64) ucidef_set_led_netdev "sfp1" "SFP 1" "ten64:green:sfp1:down" "eth8" "link tx rx" ucidef_set_led_netdev "sfp2" "SFP 2" "ten64:green:sfp2:up" "eth9" "link tx rx" diff --git a/target/linux/layerscape/base-files/etc/board.d/02_network b/target/linux/layerscape/base-files/etc/board.d/02_network index 7bc5f9b502..0a42323801 100644 --- a/target/linux/layerscape/base-files/etc/board.d/02_network +++ b/target/linux/layerscape/base-files/etc/board.d/02_network @@ -9,14 +9,6 @@ case "$(board_name)" in fsl,ls1028a-rdb-sdboot) ucidef_set_interfaces_lan_wan "swp0 swp1 swp2 swp3" "eth0" ;; - traverse,ls1043v) - ucidef_set_interface_lan "eth0 eth1 eth2 eth3" - ucidef_set_interface_wan "eth4" - ;; - traverse,ls1043s) - ucidef_set_interface_lan "eth0 eth1 eth2 eth3 eth6" - ucidef_set_interface_wan "eth4" - ;; traverse,ten64) ucidef_set_interface_lan "eth0 eth1 eth2 eth3" ucidef_set_interface_wan "eth6" diff --git a/target/linux/layerscape/base-files/etc/board.d/03_gpio_switches b/target/linux/layerscape/base-files/etc/board.d/03_gpio_switches index 5e0e24ef28..46e54b960d 100644 --- a/target/linux/layerscape/base-files/etc/board.d/03_gpio_switches +++ b/target/linux/layerscape/base-files/etc/board.d/03_gpio_switches @@ -9,17 +9,6 @@ board_config_update board=$(board_name) case "$board" in -traverse,ls1043v) - ucidef_add_gpio_switch "lte_reset" "LTE Reset" "377" - ucidef_add_gpio_switch "lte_disable" "LTE Airplane mode" "378" - ;; -traverse,ls1043s) - ucidef_add_gpio_switch "tensfp_txdisable" "SFP+ TX Disable" "378" - ucidef_add_gpio_switch "gigsfp_txdisable" "SFP TX Disable" "381" - ucidef_add_gpio_switch "lte_reset" "LTE Reset" "502" - ucidef_add_gpio_switch "lte_disable" "LTE Airplane Mode" "394" - ucidef_add_gpio_switch "lte_power" "LTE Power" "395" - ;; traverse,ten64) ucidef_add_gpio_switch "lte_reset" "Cell Modem Reset" "376" ucidef_add_gpio_switch "lte_power" "Cell Modem Power" "377" diff --git a/target/linux/layerscape/base-files/lib/preinit/05_layerscape_reorder_eth b/target/linux/layerscape/base-files/lib/preinit/05_layerscape_reorder_eth deleted file mode 100644 index c6b741a5ce..0000000000 --- a/target/linux/layerscape/base-files/lib/preinit/05_layerscape_reorder_eth +++ /dev/null @@ -1,26 +0,0 @@ -reorder_layerscape_interfaces() { - if [ ! -f /tmp/sysinfo/board_name ]; then - echo "No board name found, not doing reorder_layerscape_interfaces" - return 0 - fi - - board=$(cat /tmp/sysinfo/board_name) - case "$board" in - traverse,ls1043v|\ - traverse,ls1043s) - - # Reorder ethernet interfaces to match the physical order - ip link set eth2 name fm1-mac3 - ip link set eth4 name eth2 - ip link set eth3 name fm1-mac4 - ip link set eth5 name eth3 - ip link set fm1-mac3 name eth4 - ip link set fm1-mac4 name eth5 - ;; - default) - echo "Unknown board $board" - ;; - esac -} - -boot_hook_add preinit_main reorder_layerscape_interfaces diff --git a/target/linux/layerscape/base-files/lib/upgrade/platform.sh b/target/linux/layerscape/base-files/lib/upgrade/platform.sh index c63cf05e5c..0b5d14b579 100644 --- a/target/linux/layerscape/base-files/lib/upgrade/platform.sh +++ b/target/linux/layerscape/base-files/lib/upgrade/platform.sh @@ -31,23 +31,6 @@ platform_do_upgrade_sdboot() { echo "Writing rootfs..." tar xf $tar_file ${board_dir}/root -O | dd of=/dev/mmcblk0p2 bs=512k > /dev/null 2>&1 -} -platform_do_upgrade_traverse_nandubi() { - bootsys=$(fw_printenv bootsys | awk -F= '{{print $2}}') - newbootsys=2 - if [ "$bootsys" -eq "2" ]; then - newbootsys=1 - fi - - # If nand_do_upgrade succeeds, we don't have an opportunity to add any actions of - # our own, so do it here and set back on failure - echo "Setting bootsys to #${newbootsys}" - fw_setenv bootsys $newbootsys - CI_UBIPART="nandubi" - CI_KERNPART="kernel${newbootsys}" - CI_ROOTPART="rootfs${newbootsys}" - nand_do_upgrade "$1" || (echo "Upgrade failed, setting bootsys ${bootsys}" && fw_setenv bootsys $bootsys) - } platform_do_upgrade_traverse_slotubi() { @@ -105,11 +88,6 @@ platform_check_image() { local board=$(board_name) case "$board" in - traverse,ls1043v | \ - traverse,ls1043s) - nand_do_platform_check "traverse-ls1043" $1 - return $? - ;; traverse,ten64) nand_do_platform_check "ten64-mtd" $1 return $? @@ -150,10 +128,6 @@ platform_do_upgrade() { touch /var/lock/fw_printenv.lock case "$board" in - traverse,ls1043v | \ - traverse,ls1043s) - platform_do_upgrade_traverse_nandubi "$1" - ;; traverse,ten64) platform_do_upgrade_traverse_slotubi "${1}" ;; diff --git a/target/linux/layerscape/files/arch/arm64/boot/dts/freescale/traverse-ls1043s.dts b/target/linux/layerscape/files/arch/arm64/boot/dts/freescale/traverse-ls1043s.dts deleted file mode 100644 index 81044aab3a..0000000000 --- a/target/linux/layerscape/files/arch/arm64/boot/dts/freescale/traverse-ls1043s.dts +++ /dev/null @@ -1,332 +0,0 @@ -/* - * Device Tree Include file for Traverse LS1043S board. - * - * Copyright 2014-2015, Freescale Semiconductor - * Copyright 2017-2018, Traverse Technologies - * - * This file is dual-licensed: you can use it either under the terms - * of the GPLv2 or the X11 license, at your option. Note that this dual - * licensing only applies to this file, and not this project as a - * whole. - * - * a) This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * Or, alternatively, - * - * b) Permission is hereby granted, free of charge, to any person - * obtaining a copy of this software and associated documentation - * files (the "Software"), to deal in the Software without - * restriction, including without limitation the rights to use, - * copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following - * conditions: - * - * The above copyright notice and this permission notice shall be - * included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES - * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT - * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR - * OTHER DEALINGS IN THE SOFTWARE. - */ - -/dts-v1/; -#include "fsl-ls1043a.dtsi" -#include -#include - -/ { - model = "Traverse LS1043S"; - compatible = "traverse,ls1043s"; - - aliases { - crypto = &crypto; - ethernet0 = &EMAC0; - ethernet1 = &EMAC1; - ethernet2 = &EMAC2; - ethernet3 = &EMAC3; - ethernet4 = &EMAC4; - ethernet5 = &EMAC5; - }; - - leds { - compatible = "gpio-leds"; - gpio0 { - label = "ls1043s:green:user0"; - gpios = <&gpio1 23 GPIO_ACTIVE_HIGH>; - }; - gpio1 { - label = "ls1043s:green:user1"; - gpios = <&gpio1 24 GPIO_ACTIVE_HIGH>; - }; - /* LED D17 */ - gpio2 { - label = "ls1043s:green:wan"; - gpios = <&gpio1 26 GPIO_ACTIVE_LOW>; - }; - gpio3 { - label = "ls1043s:yellow:wan"; - gpios = <&gpio1 27 GPIO_ACTIVE_LOW>; - }; - /* LED D18 */ - gpio4 { - label = "ls1043s:green:mgmt"; - gpios = <&gpio1 28 GPIO_ACTIVE_LOW>; - }; - gpio5 { - label = "ls1043s:yellow:mgmt"; - gpios = <&gpio1 29 GPIO_ACTIVE_LOW>; - }; - /* LED D6 */ - gpio6 { - label = "ls1043s:green:user2"; - gpios = <&gpio1 31 GPIO_ACTIVE_HIGH>; - }; - - /* SFP+ LEDs - these are for chassis - * with lightpipes only - */ - teng_act { - label = "ls1043s:yellow:10gact"; - gpios = <&gpio4 0 GPIO_ACTIVE_LOW>; - }; - - teng_link { - label = "ls1043s:green:10glink"; - gpios = <&gpio4 1 GPIO_ACTIVE_LOW>; - }; - }; - - keys { - compatible = "gpio-keys-polled"; - #address-cells = <1>; - #size-cells = <0>; - poll-interval = <1000>; - /* This button may not be loaded on all boards */ - button@0 { - label = "Front button"; - linux,code = ; - gpios = <&gpio1 25 GPIO_ACTIVE_LOW>; - }; - /* This is wired to header S3 */ - button@1 { - label = "Rear button"; - linux,code = ; - gpios = <&gpio1 30 GPIO_ACTIVE_LOW>; - }; - }; -}; - -&esdhc { - mmc-hs200-1_8v; - sd-uhs-sdr104; - sd-uhs-sdr50; - sd-uhs-sdr25; - sd-uhs-sdr12; -}; - -&i2c0 { - status = "okay"; - rtc@6f { - compatible = "intersil,isl1208"; - reg = <0x6f>; - }; - - sfp_pca9534: pca9534@24 { - compatible = "ti,tca9534", "nxp,pca9534"; - gpio-controller; - #gpio-cells = <2>; - reg = <0x24>; - gpio-base = <100>; - }; - - controller@50 { - compatible = "traverse,controller"; - reg = <0x50>; - }; - - ds125df111@18 { - compatible = "ti,ds125df111"; - reg = <0x18>; - }; - - emc1704@4c { - compatible = "microchip,emc1704"; - reg = <0x4c>; - }; - - pac1934@16 { - compatible = "microchip,pac1934"; - reg = <0x16>; - /* Monitoring 3.3V, 5V, Vin/12V (voltage only), Vbat/RTC (voltage only) */ - shunt-resistors = <4000 12000 0 0>; - }; - - pmic@8 { - compatible = "freescale,mc34vr500"; - reg = <0x08>; - }; -}; - -/* I2C Bus for SFP EEPROM and control - * These are multiplexed so - * they don't collide when loaded - */ -&i2c3 { - status = "okay"; - i2c-switch@70 { - compatible = "nxp,pca9540"; - #address-cells = <1>; - #size-cells = <0>; - reg = <0x70>; - - gigsfp_i2c: i2c@0 { - #address-cells = <1>; - #size-cells = <0>; - reg = <0>; - }; - tensfp_i2c: i2c@1 { - #address-cells = <1>; - #size-cells = <0>; - reg = <1>; - }; - }; -}; - -&ifc { - status = "okay"; - #address-cells = <2>; - #size-cells = <1>; - /* Only NAND flash is used on this board */ - ranges = <0x0 0x0 0x0 0x7e800000 0x00010000>; - - nand@1,0 { - compatible = "fsl,ifc-nand"; - #address-cells = <1>; - #size-cells = <1>; - reg = <0x0 0x0 0x10000>; - }; -}; - -&duart0 { - status = "okay"; -}; - -&duart1 { - status = "okay"; -}; - -#include "fsl-ls1043-post.dtsi" - -&fman0 { - EMAC0: ethernet@e0000 { - phy-handle = <&qsgmii_phy1>; - phy-connection-type = "qsgmii"; - local-mac-address = [0A 00 00 00 00 01]; - }; - - EMAC1: ethernet@e2000 { - phy-handle = <&qsgmii_phy2>; - phy-connection-type = "qsgmii"; - local-mac-address = [0A 00 00 00 00 02]; - }; - - EMAC2: ethernet@e8000 { - phy-handle = <&qsgmii_phy3>; - phy-connection-type = "qsgmii"; - local-mac-address = [0A 00 00 00 00 03]; - }; - - EMAC3: ethernet@ea000 { - phy-handle = <&qsgmii_phy4>; - phy-connection-type = "qsgmii"; - local-mac-address = [0A 00 00 00 00 04]; - }; - - /* SFP via AR8031 - * We treat this as a fixed-link as the - * AR8031 is hard-configured into - * 1000BASE-X mode - * Should MII control be desired, remove - * fixed-link and add - * phy-handle = <&rgmii_phy1>; - */ - EMAC4: ethernet@e4000 { - phy-connection-type = "rgmii"; - local-mac-address = [0A 00 00 00 00 05]; - fixed-link { - speed = <1000>; - full-duplex; - }; - }; - - /* Connection to Expansion (M.2) slot - * Future WAN (i.e xDSL) plugin - */ - EMAC5: ethernet@e6000 { - phy-connection-type = "rgmii-id"; - local-mac-address = [00 00 00 00 00 06]; - fixed-link { - speed = <1000>; - full-duplex; - }; - }; - - /* 10G SFP+ interface - * This can also run at 1.25 and 2.5G with - * the appropriate SerDes protocol setting in RCW - */ - TENSFP: ethernet@f0000 { - status = "okay"; - phy-connection-type = "xgmii"; - fixed-link { - speed = <10000>; - full-duplex; - }; - }; - - mdio@fc000 { - rgmii_phy1: ethernet-phy@2 { - reg = <0x2>; - }; - qsgmii_phy1: ethernet-phy@4 { - reg = <0x4>; - }; - qsgmii_phy2: ethernet-phy@5 { - reg = <0x5>; - }; - qsgmii_phy3: ethernet-phy@6 { - reg = <0x6>; - }; - qsgmii_phy4: ethernet-phy@7 { - reg = <0x7>; - }; - }; -}; - -/* No QUICC engine functions on this board - - * pins are used for other functions (GPIO, I2C etc.) - */ -&uqe { - status = "disabled"; -}; - -/* LS1043S does not use the QorIQ AHCI - * controller. - */ -&sata { - status = "disabled"; -}; diff --git a/target/linux/layerscape/files/arch/arm64/boot/dts/freescale/traverse-ls1043v.dts b/target/linux/layerscape/files/arch/arm64/boot/dts/freescale/traverse-ls1043v.dts deleted file mode 100644 index 936875101f..0000000000 --- a/target/linux/layerscape/files/arch/arm64/boot/dts/freescale/traverse-ls1043v.dts +++ /dev/null @@ -1,253 +0,0 @@ -/* - * Device Tree Include file for Traverse LS1043V board. - * - * Copyright 2014-2015, Freescale Semiconductor - * Copyright 2017, Traverse Technologies - * - * This file is dual-licensed: you can use it either under the terms - * of the GPLv2 or the X11 license, at your option. Note that this dual - * licensing only applies to this file, and not this project as a - * whole. - * - * a) This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * Or, alternatively, - * - * b) Permission is hereby granted, free of charge, to any person - * obtaining a copy of this software and associated documentation - * files (the "Software"), to deal in the Software without - * restriction, including without limitation the rights to use, - * copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following - * conditions: - * - * The above copyright notice and this permission notice shall be - * included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES - * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT - * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR - * OTHER DEALINGS IN THE SOFTWARE. - */ - -/dts-v1/; -#include "fsl-ls1043a.dtsi" -#include -#include - -/ { - model = "Traverse LS1043V"; - compatible = "traverse,ls1043v"; - - aliases { - crypto = &crypto; - ethernet0 = &EMAC0; - ethernet1 = &EMAC1; - ethernet2 = &EMAC2; - ethernet3 = &EMAC3; - ethernet4 = &EMAC4; - ethernet5 = &EMAC5; - pca9555 = &pca9555; - }; - - leds { - compatible = "gpio-leds"; - gpio0 { - label = "ls1043v:green:user0"; - gpios = <&pca9555 0 GPIO_ACTIVE_LOW>; - }; - gpio1 { - label = "ls1043v:yellow:user0"; - gpios = <&pca9555 1 GPIO_ACTIVE_LOW>; - }; - gpio2 { - label = "ls1043v:green:user1"; - gpios = <&pca9555 2 GPIO_ACTIVE_LOW>; - }; - gpio3 { - label = "ls1043v:yellow:user1"; - gpios = <&pca9555 3 GPIO_ACTIVE_LOW>; - }; - gpio4 { - label = "ls1043v:green:user2"; - gpios = <&pca9555 4 GPIO_ACTIVE_HIGH>; - }; - gpio5 { - label = "ls1043v:yellow:wlan"; - gpios = <&pca9555 5 GPIO_ACTIVE_HIGH>; - }; - gpio6 { - label = "ls1043v:yellow:wan"; - gpios = <&pca9555 6 GPIO_ACTIVE_HIGH>; - }; - }; - - keys { - compatible = "gpio-keys-polled"; - #address-cells = <1>; - #size-cells = <0>; - poll-interval = <1000>; - button@0 { - label = "Front button"; - linux,code = ; - gpios = <&pca9555 14 GPIO_ACTIVE_LOW>; - }; - button@1 { - label = "Rear button"; - linux,code = ; - gpios = <&pca9555 15 GPIO_ACTIVE_LOW>; - }; - }; -}; - -&i2c0 { - status = "okay"; - rtc@6f { - compatible = "intersil,isl1208"; - reg = <0x6f>; - }; - - pca9555: pca9555@20 { - compatible = "nxp,pca9555"; - gpio-controller; - #gpio-cells = <2>; - reg = <0x20>; - gpio-base = <0>; - }; - - /* CPU core temp sensor and VDD (1.0V) sensor */ - ltc2990@4c { - compatible = "lltc,ltc2990"; - reg = <0x4C>; - lltc,meas-mode = <4 3>; - }; - - /* 3.3V and 5V monitor (may not be loaded on some SKUs) */ - ltc2990@4f { - compatible = "lltc,ltc2990"; - reg = <0x4F>; - lltc,meas-mode = <6 3>; - }; -}; - -&ifc { - status = "okay"; - #address-cells = <2>; - #size-cells = <1>; - /* Only NAND flash is used on this board */ - ranges = <0x0 0x0 0x0 0x7e800000 0x00010000>; - - nand@1,0 { - compatible = "fsl,ifc-nand"; - #address-cells = <1>; - #size-cells = <1>; - reg = <0x0 0x0 0x10000>; - }; -}; - -&duart0 { - status = "okay"; -}; - -&duart1 { - status = "okay"; -}; - -#include "fsl-ls1043-post.dtsi" - -&fman0 { - EMAC0: ethernet@e0000 { - phy-handle = <&qsgmii_phy1>; - phy-connection-type = "qsgmii"; - local-mac-address = [0A 00 00 00 00 01]; - }; - - EMAC1: ethernet@e2000 { - phy-handle = <&qsgmii_phy2>; - phy-connection-type = "qsgmii"; - local-mac-address = [0A 00 00 00 00 02]; - }; - - EMAC2: ethernet@e8000 { - phy-handle = <&qsgmii_phy3>; - phy-connection-type = "qsgmii"; - local-mac-address = [0A 00 00 00 00 03]; - }; - - EMAC3: ethernet@ea000 { - phy-handle = <&qsgmii_phy4>; - phy-connection-type = "qsgmii"; - local-mac-address = [0A 00 00 00 00 04]; - }; - EMAC4: ethernet@e4000 { - phy-handle = <&rgmii_phy1>; - phy-connection-type = "rgmii"; - local-mac-address = [0A 00 00 00 00 05]; - }; - - /* Connection to VDSL SoC */ - EMAC5: ethernet@e6000 { - phy-connection-type = "rgmii-id"; - local-mac-address = [00 00 00 00 00 06]; - fixed-link { - speed = <1000>; - full-duplex; - }; - }; - - /* 10G XFI interface - not in use on this platform */ - TENSFP: ethernet@f0000 { - status = "disabled"; - - phy-connection-type = "sgmii"; - fixed-link { - /* NB: speed = 1000 and sgmii allows forward compatibility - * with both 1G and 10G, the same is not true - * in the reverse. - */ - speed = <1000>; - full-duplex; - }; - }; - - mdio@fc000 { - rgmii_phy1: ethernet-phy@3 { - reg = <0x3>; - }; - qsgmii_phy1: ethernet-phy@4 { - reg = <0x4>; - }; - qsgmii_phy2: ethernet-phy@5 { - reg = <0x5>; - }; - qsgmii_phy3: ethernet-phy@6 { - reg = <0x6>; - }; - qsgmii_phy4: ethernet-phy@7 { - reg = <0x7>; - }; - }; -}; - -/* No QUICC engine functions on this board */ -&uqe { - status = "disabled"; -}; - -/* No SATA/AHCI on this board */ -&sata { - status = "disabled"; -}; diff --git a/target/linux/layerscape/image/Makefile b/target/linux/layerscape/image/Makefile index 1463a3eaea..dfbda85b36 100644 --- a/target/linux/layerscape/image/Makefile +++ b/target/linux/layerscape/image/Makefile @@ -51,19 +51,6 @@ define Build/ls-append-sdhead dd if=$(STAGING_DIR_IMAGE)/$(1)-sdcard-head.img >> $@ endef -define Build/traverse-fit - ./mkits-multiple-config.sh -o $@.its -A $(LINUX_KARCH) \ - -v $(LINUX_VERSION) -k $@ -a $(KERNEL_LOADADDR) \ - -e $(if $(KERNEL_ENTRY),$(KERNEL_ENTRY),$(KERNEL_LOADADDR)) \ - -C gzip -c 1 -c 2 \ - -d $(DEVICE_DTS_DIR)/freescale/traverse-ls1043s.dtb \ - -D "Traverse_LS1043S" -n "ls1043s" -a $(FDT_LOADADDR) -c 1 \ - -d $(DEVICE_DTS_DIR)/freescale/traverse-ls1043v.dtb \ - -D "Traverse_LS1043V" -n "ls1043v" -a $(FDT_LOADADDR) -c 2 - PATH=$(LINUX_DIR)/scripts/dtc:$(PATH) mkimage -f $@.its $@.new - @mv -f $@.new $@ -endef - define Build/traverse-fit-ls1088 ./mkits-multiple-config.sh -o $@.its -A $(LINUX_KARCH) \ -v $(LINUX_VERSION) -k $@ -a $(KERNEL_LOADADDR) \ diff --git a/target/linux/layerscape/image/armv8_64b.mk b/target/linux/layerscape/image/armv8_64b.mk index 0016e3bde8..259bacee31 100644 --- a/target/linux/layerscape/image/armv8_64b.mk +++ b/target/linux/layerscape/image/armv8_64b.mk @@ -420,38 +420,6 @@ define Device/fsl_lx2160a-rdb-sdboot endef TARGET_DEVICES += fsl_lx2160a-rdb-sdboot -define Device/traverse_ls1043 - DEVICE_VENDOR := Traverse - DEVICE_MODEL := LS1043 Boards - KERNEL_NAME := Image - KERNEL_SUFFIX := -kernel.itb - KERNEL_INSTALL := 1 - FDT_LOADADDR = 0x90000000 - FILESYSTEMS := ubifs - MKUBIFS_OPTS := -m 1 -e 262016 -c 128 - DEVICE_PACKAGES += \ - layerscape-fman \ - uboot-envtools \ - kmod-i2c-mux-pca954x \ - kmod-hwmon-core \ - kmod-gpio-pca953x kmod-input-gpio-keys-polled \ - kmod-rtc-isl1208 - DEVICE_DESCRIPTION = \ - Build images for Traverse LS1043 boards. This generates a single image \ - capable of booting on any of the boards in this family. - DEVICE_DTS = freescale/traverse-ls1043s - DEVICE_DTS_DIR = $(LINUX_DIR)/arch/arm64/boot/dts - DEVICE_DTS_CONFIG = ls1043s - KERNEL := kernel-bin | gzip | traverse-fit gzip $$(DTS_DIR)/$$(DEVICE_DTS).dtb - KERNEL_INITRAMFS := kernel-bin | gzip | fit gzip $$(DTS_DIR)/$$(DEVICE_DTS).dtb - IMAGES = root sysupgrade.bin - IMAGE/root = append-rootfs - IMAGE/sysupgrade.bin = sysupgrade-tar | append-metadata - MKUBIFS_OPTS := -m 2048 -e 124KiB -c 4096 - SUPPORTED_DEVICES := traverse,ls1043s traverse,ls1043v -endef -TARGET_DEVICES += traverse_ls1043 - define Device/traverse_ten64_mtd DEVICE_VENDOR := Traverse DEVICE_MODEL := Ten64 (NAND boot) diff --git a/target/linux/layerscape/patches-5.15/300-add-DTS-for-Traverse-LS1043-Boards.patch b/target/linux/layerscape/patches-5.15/300-add-DTS-for-Traverse-LS1043-Boards.patch deleted file mode 100644 index 110afedefd..0000000000 --- a/target/linux/layerscape/patches-5.15/300-add-DTS-for-Traverse-LS1043-Boards.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 5b35aae22b4ca2400e49561c9267aa01346f91d4 Mon Sep 17 00:00:00 2001 -From: Mathew McBride -Date: Tue, 17 Apr 2018 10:01:03 +1000 -Subject: [PATCH] add DTS for Traverse LS1043 Boards - -Signed-off-by: Mathew McBride -[rebase] -Signed-off-by: Yangbo Lu ---- - arch/arm64/boot/dts/freescale/Makefile | 3 +++ - arch/arm64/boot/dts/freescale/traverse-ls1043s.dts | 29 ++++++++++++++++++++++ - arch/arm64/boot/dts/freescale/traverse-ls1043v.dts | 29 ++++++++++++++++++++++ - 3 files changed, 61 insertions(+) - ---- a/arch/arm64/boot/dts/freescale/Makefile -+++ b/arch/arm64/boot/dts/freescale/Makefile -@@ -31,6 +31,9 @@ dtb-$(CONFIG_ARCH_LAYERSCAPE) += fsl-lx2 - dtb-$(CONFIG_ARCH_LAYERSCAPE) += fsl-lx2160a-rdb.dtb - dtb-$(CONFIG_ARCH_LAYERSCAPE) += fsl-lx2162a-qds.dtb - -+dtb-$(CONFIG_ARCH_LAYERSCAPE) += traverse-ls1043v.dtb -+dtb-$(CONFIG_ARCH_LAYERSCAPE) += traverse-ls1043s.dtb -+ - dtb-$(CONFIG_ARCH_MXC) += imx8mm-beacon-kit.dtb - dtb-$(CONFIG_ARCH_MXC) += imx8mm-evk.dtb - dtb-$(CONFIG_ARCH_MXC) += imx8mm-ddr4-evk.dtb diff --git a/target/linux/mediatek/dts/mt7629-netgear-ex6250-v2.dts b/target/linux/mediatek/dts/mt7629-netgear-ex6250-v2.dts new file mode 100644 index 0000000000..5645ad799e --- /dev/null +++ b/target/linux/mediatek/dts/mt7629-netgear-ex6250-v2.dts @@ -0,0 +1,238 @@ +// SPDX-License-Identifier: GPL-2.0 + +/dts-v1/; +#include +#include "mt7629.dtsi" + +/ { + model = "Netgear EX6250 v2"; + compatible = "netgear,ex6250-v2", "mediatek,mt7629"; + + aliases { + led-boot = &led_power_green; + led-failsafe = &led_power_red; + led-running = &led_power_green; + led-upgrade = &led_power_red; + serial0 = &uart0; + }; + + chosen { + stdout-path = "serial0:115200n8"; + bootargs-override = "console=ttyS0,115200n8"; + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "reset"; + gpios = <&pio 60 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + wps { + label = "wps"; + gpios = <&pio 58 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + ap_mode { + label = "ap_mode"; + gpios = <&pio 54 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + extender_mode { + label = "extender_mode"; + gpios = <&pio 53 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; + + leds { + compatible = "gpio-leds"; + + led_power_green: power_green { + label = "green:power"; + gpios = <&pio 21 GPIO_ACTIVE_LOW>; + }; + + led_power_red: power_red { + label = "red:power"; + gpios = <&pio 61 GPIO_ACTIVE_LOW>; + }; + + client_green { + label = "green:client"; + gpios = <&pio 59 GPIO_ACTIVE_LOW>; + }; + + client_red { + label = "red:client"; + gpios = <&pio 24 GPIO_ACTIVE_LOW>; + }; + + router_green { + label = "green:router"; + gpios = <&pio 55 GPIO_ACTIVE_LOW>; + }; + + router_red { + label = "red:router"; + gpios = <&pio 56 GPIO_ACTIVE_LOW>; + }; + + wps_green { + label = "green:wps"; + gpios = <&pio 57 GPIO_ACTIVE_LOW>; + }; + + eth_green { + label = "green:eth"; + gpios = <&pio 16 GPIO_ACTIVE_LOW>; + }; + + eth_yellow { + label = "yellow:eth"; + gpios = <&pio 12 GPIO_ACTIVE_LOW>; + }; + }; +}; + +ð { + pinctrl-names = "default"; + pinctrl-0 = <ð_pins>; + pinctrl-1 = <&ephy_leds_pins>; + status = "okay"; + + mac@1 { + compatible = "mediatek,eth-mac"; + reg = <1>; + phy-mode = "gmii"; + phy-handle = <&phy0>; + }; + + mdio-bus { + #address-cells = <1>; + #size-cells = <0>; + + phy0: ethernet-phy@0 { + reg = <0>; + }; + }; +}; + +&qspi { + status = "okay"; + + pinctrl-names = "default"; + pinctrl-0 = <&qspi_pins>; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "Bootloader"; + reg = <0x0 0x60000>; + read-only; + }; + + partition@60000 { + label = "Config"; + reg = <0x60000 0x10000>; + read-only; + }; + + partition@70000 { + label = "Factory"; + reg = <0x70000 0x10000>; + read-only; + }; + + partition@80000 { + label = "firmware"; + reg = <0x80000 0xcd0000>; + compatible = "denx,fit"; + }; + + partition@d50000 { + label = "CFG"; + reg = <0xd50000 0x80000>; + read-only; + }; + + partition@dd0000 { + label = "RAE"; + reg = <0xdd0000 0x200000>; + read-only; + }; + + partition@fd0000 { + label = "POT"; + reg = <0xfd0000 0x10000>; + read-only; + }; + + partition@fe0000 { + label = "LOG"; + reg = <0xfe0000 0x20000>; + read-only; + }; + }; + }; +}; + +&pio { + eth_pins: eth-pins { + mux { + function = "eth"; + groups = "mdc_mdio"; + }; + }; + + ephy_leds_pins: ephy-leds-pins { + mux { + function = "led"; + groups = "ephy_leds"; + }; + }; + + qspi_pins: qspi-pins { + mux { + function = "flash"; + groups = "spi_nor"; + }; + }; + + uart0_pins: uart0-pins { + mux { + function = "uart"; + groups = "uart0_txd_rxd" ; + }; + }; + + watchdog_pins: watchdog-pins { + mux { + function = "watchdog"; + groups = "watchdog"; + }; + }; +}; + +&uart0 { + pinctrl-names = "default"; + pinctrl-0 = <&uart0_pins>; + status = "okay"; +}; + +&watchdog { + pinctrl-names = "default"; + pinctrl-0 = <&watchdog_pins>; + status = "okay"; +}; diff --git a/target/linux/mediatek/dts/mt7981b-h3c-magic-nx30-pro.dts b/target/linux/mediatek/dts/mt7981b-h3c-magic-nx30-pro.dts new file mode 100644 index 0000000000..358365adba --- /dev/null +++ b/target/linux/mediatek/dts/mt7981b-h3c-magic-nx30-pro.dts @@ -0,0 +1,239 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +/dts-v1/; +#include +#include + +#include "mt7981.dtsi" + +/ { + model = "H3C Magic NX30 Pro"; + compatible = "h3c,magic-nx30-pro", "mediatek,mt7981"; + + aliases { + serial0 = &uart0; + 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 0x10000000>; + }; + + gpio-keys { + compatible = "gpio-keys"; + + reset { + label = "reset"; + linux,code = ; + gpios = <&pio 1 GPIO_ACTIVE_LOW>; + }; + + wps { + label = "wps"; + linux,code = ; + gpios = <&pio 0 GPIO_ACTIVE_LOW>; + }; + }; + + leds { + compatible = "gpio-leds"; + + led_status_green: green { + label = "green:status"; + gpios = <&pio 4 GPIO_ACTIVE_LOW>; + }; + + led_status_red: red { + label = "red:status"; + gpios = <&pio 5 GPIO_ACTIVE_LOW>; + }; + }; +}; + +ð { + status = "okay"; + + gmac0: mac@0 { + compatible = "mediatek,eth-mac"; + reg = <0>; + phy-mode = "2500base-x"; + + fixed-link { + speed = <2500>; + full-duplex; + pause; + }; + }; + + gmac1: mac@1 { + compatible = "mediatek,eth-mac"; + reg = <1>; + phy-mode = "gmii"; + phy-handle = <&int_gbe_phy>; + }; +}; + +&mdio_bus { + switch: switch@0 { + compatible = "mediatek,mt7531"; + reg = <31>; + reset-gpios = <&pio 39 GPIO_ACTIVE_HIGH>; + interrupt-controller; + #interrupt-cells = <1>; + interrupt-parent = <&pio>; + interrupts = <38 IRQ_TYPE_LEVEL_HIGH>; + }; +}; + +&spi0 { + pinctrl-names = "default"; + pinctrl-0 = <&spi0_flash_pins>; + status = "okay"; + + spi_nand@0 { + compatible = "spi-nand"; + #address-cells = <1>; + #size-cells = <1>; + reg = <0>; + + spi-max-frequency = <52000000>; + spi-tx-buswidth = <4>; + spi-rx-buswidth = <4>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "BL2"; + reg = <0x0000000 0x0100000>; + read-only; + }; + + partition@100000 { + label = "u-boot-env"; + reg = <0x0100000 0x0080000>; + }; + + factory: partition@180000 { + label = "Factory"; + reg = <0x0180000 0x0200000>; + read-only; + }; + + partition@380000 { + label = "FIP"; + reg = <0x0380000 0x0200000>; + read-only; + }; + + partition@580000 { + label = "ubi"; + reg = <0x0580000 0x4000000>; + }; + + /* yaffs partition */ + partition@4580000 { + label = "pdt_data"; + reg = <0x4580000 0x0600000>; + read-only; + }; + + /* yaffs partition */ + partition@4b80000 { + label = "pdt_data_1"; + reg = <0x4b80000 0x0600000>; + read-only; + }; + + partition@5180000 { + label = "exp"; + reg = <0x5180000 0x0100000>; + read-only; + }; + + partition@5280000 { + label = "plugin"; + reg = <0x5280000 0x2580000>; + read-only; + }; + }; + }; +}; + +&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@6 { + reg = <6>; + ethernet = <&gmac0>; + phy-mode = "2500base-x"; + + fixed-link { + speed = <2500>; + full-duplex; + pause; + }; + }; + }; +}; + +&pio { + spi0_flash_pins: spi0-pins { + mux { + function = "spi"; + groups = "spi0", "spi0_wp_hold"; + }; + + conf-pu { + pins = "SPI0_CS", "SPI0_HOLD", "SPI0_WP"; + drive-strength = <8>; + mediatek,pull-up-adv = <0>; /* bias-disable */ + }; + + conf-pd { + pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO"; + drive-strength = <8>; + mediatek,pull-up-adv = <0>; /* bias-disable */ + }; + }; +}; + +&uart0 { + status = "okay"; +}; + +&watchdog { + status = "okay"; +}; + +&wifi { + status = "okay"; + + mediatek,mtd-eeprom = <&factory 0x0>; +}; diff --git a/target/linux/mediatek/filogic/base-files/etc/board.d/02_network b/target/linux/mediatek/filogic/base-files/etc/board.d/02_network index ba8114caa1..8203211776 100644 --- a/target/linux/mediatek/filogic/base-files/etc/board.d/02_network +++ b/target/linux/mediatek/filogic/base-files/etc/board.d/02_network @@ -28,6 +28,9 @@ mediatek_setup_interfaces() glinet,gl-mt3000) ucidef_set_interfaces_lan_wan eth1 eth0 ;; + h3c,magic-nx30-pro) + ucidef_set_interfaces_lan_wan "lan1 lan2 lan3" eth1 + ;; mediatek,mt7986a-rfb) ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4 lan6" "eth1 wan" ;; @@ -75,6 +78,11 @@ mediatek_setup_macs() bananapi,bpi-r3) wan_mac=$(macaddr_add $(cat /sys/class/net/eth0/address) 1) ;; + h3c,magic-nx30-pro) + wan_mac=$(mtd_get_mac_ascii pdt_data_1 ethaddr) + lan_mac=$(macaddr_add "$wan_mac" 1) + label_mac=$wan_mac + ;; mercusys,mr90x-v1) label_mac=$(get_mac_binary "/tmp/tp_data/default-mac" 0) lan_mac=$label_mac diff --git a/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac b/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac index fd4befb206..f85060acb1 100644 --- a/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac +++ b/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac @@ -32,6 +32,11 @@ case "$board" in [ "$PHYNBR" = "0" ] && echo "$addr" > /sys${DEVPATH}/macaddress [ "$PHYNBR" = "1" ] && macaddr_setbit_la $(macaddr_add $addr 1) > /sys${DEVPATH}/macaddress ;; + h3c,magic-nx30-pro) + addr=$(mtd_get_mac_ascii pdt_data_1 ethaddr) + [ "$PHYNBR" = "0" ] && macaddr_add $addr 2 > /sys${DEVPATH}/macaddress + [ "$PHYNBR" = "1" ] && macaddr_add $addr 3 > /sys${DEVPATH}/macaddress + ;; jcg,q30-ubootmod) [ "$PHYNBR" = "1" ] && \ macaddr_setbit_la "$(mtd_get_mac_binary Factory 0x4)" > /sys${DEVPATH}/macaddress diff --git a/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh b/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh index 11c2c5c664..186abfa5a8 100755 --- a/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh +++ b/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh @@ -74,6 +74,7 @@ platform_do_upgrade() { CI_UBIPART="ubi0" nand_do_upgrade "$1" ;; + h3c,magic-nx30-pro|\ qihoo,360t7|\ tplink,tl-xdr4288|\ tplink,tl-xdr6086|\ diff --git a/target/linux/mediatek/image/Makefile b/target/linux/mediatek/image/Makefile index 97164428e0..d4f79ec974 100644 --- a/target/linux/mediatek/image/Makefile +++ b/target/linux/mediatek/image/Makefile @@ -6,6 +6,8 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/image.mk +DEVICE_VARS += NETGEAR_ENC_MODEL NETGEAR_ENC_REGION NETGEAR_ENC_HW_ID_LIST NETGEAR_ENC_MODEL_LIST + loadaddr-$(CONFIG_TARGET_mediatek_mt7622) := 0x44000000 loadaddr-$(CONFIG_TARGET_mediatek_mt7623) := 0x80008000 loadaddr-$(CONFIG_TARGET_mediatek_mt7629) := 0x40008000 @@ -22,6 +24,10 @@ define Device/Default KERNEL_LOADADDR = $(loadaddr-y) FILESYSTEMS := squashfs DEVICE_DTS_DIR := $(DTS_DIR) + NETGEAR_ENC_MODEL := + NETGEAR_ENC_REGION := + NETGEAR_ENC_HW_ID_LIST := + NETGEAR_ENC_MODEL_LIST := IMAGES := sysupgrade.bin IMAGE/sysupgrade.bin := append-kernel | pad-to 128k | append-rootfs | \ pad-rootfs | append-metadata diff --git a/target/linux/mediatek/image/filogic.mk b/target/linux/mediatek/image/filogic.mk index b3f841e856..8d44aed014 100644 --- a/target/linux/mediatek/image/filogic.mk +++ b/target/linux/mediatek/image/filogic.mk @@ -176,6 +176,31 @@ define Device/glinet_gl-mt3000 endef TARGET_DEVICES += glinet_gl-mt3000 +define Device/h3c_magic-nx30-pro + DEVICE_VENDOR := H3C + DEVICE_MODEL := Magic NX30 Pro + DEVICE_DTS := mt7981b-h3c-magic-nx30-pro + DEVICE_DTS_DIR := ../dts + UBINIZE_OPTS := -E 5 + BLOCKSIZE := 128k + PAGESIZE := 2048 + KERNEL_IN_UBI := 1 + UBOOTENV_IN_UBI := 1 + IMAGE_SIZE := 65536k + 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-mt7981-firmware mt7981-wo-firmware + ARTIFACTS := preloader.bin bl31-uboot.fip + ARTIFACT/preloader.bin := mt7981-bl2 spim-nand-ddr3 + ARTIFACT/bl31-uboot.fip := mt7981-bl31-uboot h3c_magic-nx30-pro +endef +TARGET_DEVICES += h3c_magic-nx30-pro + define Device/jcg_q30-ubootmod DEVICE_VENDOR := JCG DEVICE_MODEL := Q30 (custom U-Boot layout) diff --git a/target/linux/mediatek/image/mt7629.mk b/target/linux/mediatek/image/mt7629.mk index 3f5b2e2579..33c557190f 100644 --- a/target/linux/mediatek/image/mt7629.mk +++ b/target/linux/mediatek/image/mt7629.mk @@ -22,3 +22,29 @@ define Device/iptime_a6004mx IMAGE/recovery.bin := append-kernel | pad-to 128k | append-ubi | append-metadata endef TARGET_DEVICES += iptime_a6004mx + +define Device/netgear_ex6250-v2 + DEVICE_VENDOR := NETGEAR + DEVICE_MODEL := EX6250 + DEVICE_VARIANT := v2 + DEVICE_ALT0_VENDOR := NETGEAR + DEVICE_ALT0_MODEL := EX6400 + DEVICE_ALT0_VARIANT := v3 + DEVICE_ALT1_VENDOR := NETGEAR + DEVICE_ALT1_MODEL := EX6410 + DEVICE_ALT1_VARIANT := v2 + DEVICE_ALT2_VENDOR := NETGEAR + DEVICE_ALT2_MODEL := EX6470 + DEVICE_DTS := mt7629-netgear-ex6250-v2 + DEVICE_DTS_DIR := ../dts + DEVICE_PACKAGES := uboot-envtools + NETGEAR_ENC_MODEL := EX6250v2 + NETGEAR_ENC_REGION := US + NETGEAR_ENC_HW_ID_LIST := 1010000003630000_NETGEAR;1010000003540000_NETGEAR + NETGEAR_ENC_MODEL_LIST := EX6250v2;EX6400v3;EX6470;EX6410v2 + IMAGE_SIZE := 13120k + IMAGES += factory.img + IMAGE/factory.img := append-kernel | pad-to 128k | append-rootfs | \ + pad-rootfs | check-size | netgear-encrypted-factory +endef +TARGET_DEVICES += netgear_ex6250-v2 diff --git a/target/linux/mediatek/mt7629/base-files/etc/board.d/01_leds b/target/linux/mediatek/mt7629/base-files/etc/board.d/01_leds index 42b6fcbbb3..c42ab4713b 100644 --- a/target/linux/mediatek/mt7629/base-files/etc/board.d/01_leds +++ b/target/linux/mediatek/mt7629/base-files/etc/board.d/01_leds @@ -9,6 +9,10 @@ case $board in iptime,a6004mx) ucidef_set_led_netdev "wan" "WAN" "orange:wan" "eth1" ;; +netgear,ex6250-v2) + ucidef_set_led_netdev "eth_act" "LAN act" "yellow:eth" "eth0" "tx rx" + ucidef_set_led_netdev "eth_link" "LAN link" "green:eth" "eth0" "link" + ;; esac board_config_flush diff --git a/target/linux/mediatek/mt7629/base-files/etc/board.d/02_network b/target/linux/mediatek/mt7629/base-files/etc/board.d/02_network index 4254f39ca0..db931c8334 100644 --- a/target/linux/mediatek/mt7629/base-files/etc/board.d/02_network +++ b/target/linux/mediatek/mt7629/base-files/etc/board.d/02_network @@ -16,6 +16,9 @@ mediatek_setup_interfaces() ucidef_add_switch "switch0" \ "0:lan" "1:lan" "2:lan" "3:lan" "6@eth0" ;; + netgear,ex6250-v2) + ucidef_set_interface_lan "eth0" + ;; esac } @@ -24,7 +27,15 @@ mediatek_setup_macs() local board="$1" case $board in + netgear,ex6250-v2) + lan_mac=$(mtd_get_mac_ascii Config mac) + label_mac=$lan_mac + ;; esac + + [ -n "$lan_mac" ] && ucidef_set_interface_macaddr "lan" $lan_mac + [ -n "$wan_mac" ] && ucidef_set_interface_macaddr "wan" $wan_mac + [ -n "$label_mac" ] && ucidef_set_label_macaddr $label_mac } board_config_update diff --git a/target/linux/mxs/Makefile b/target/linux/mxs/Makefile index 6ae4814e95..34e826dfbb 100644 --- a/target/linux/mxs/Makefile +++ b/target/linux/mxs/Makefile @@ -12,6 +12,7 @@ CPU_TYPE:=arm926ej-s SUBTARGETS:=generic KERNEL_PATCHVER:=5.15 +KERNEL_TESTING_PATCHVER:=6.1 KERNELNAME:=zImage dtbs diff --git a/target/linux/mxs/config-6.1 b/target/linux/mxs/config-6.1 new file mode 100644 index 0000000000..b23aef6969 --- /dev/null +++ b/target/linux/mxs/config-6.1 @@ -0,0 +1,245 @@ +CONFIG_ALIGNMENT_TRAP=y +CONFIG_ARCH_32BIT_OFF_T=y +CONFIG_ARCH_FORCE_MAX_ORDER=11 +CONFIG_ARCH_HIBERNATION_POSSIBLE=y +CONFIG_ARCH_KEEP_MEMBLOCK=y +CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y +CONFIG_ARCH_MULTIPLATFORM=y +CONFIG_ARCH_MULTI_CPU_AUTO=y +# CONFIG_ARCH_MULTI_V4 is not set +# CONFIG_ARCH_MULTI_V4T is not set +CONFIG_ARCH_MULTI_V4_V5=y +CONFIG_ARCH_MULTI_V5=y +CONFIG_ARCH_MXS=y +CONFIG_ARCH_NR_GPIO=0 +CONFIG_ARCH_OPTIONAL_KERNEL_RWX=y +CONFIG_ARCH_SELECT_MEMORY_MODEL=y +CONFIG_ARCH_SPARSEMEM_ENABLE=y +CONFIG_ARCH_SUSPEND_POSSIBLE=y +CONFIG_ARM=y +CONFIG_ARM_AMBA=y +CONFIG_ARM_APPENDED_DTB=y +CONFIG_ARM_ATAG_DTB_COMPAT=y +CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_FROM_BOOTLOADER=y +CONFIG_ARM_CPU_SUSPEND=y +CONFIG_ARM_L1_CACHE_SHIFT=5 +CONFIG_ARM_PATCH_PHYS_VIRT=y +CONFIG_ARM_THUMB=y +CONFIG_ARM_UNWIND=y +CONFIG_ATAGS=y +CONFIG_AUTO_ZRELADDR=y +CONFIG_BINFMT_FLAT_ARGVP_ENVP_ON_STACK=y +CONFIG_BLK_PM=y +CONFIG_CLKSRC_MMIO=y +CONFIG_CLONE_BACKWARDS=y +CONFIG_CMDLINE="console=ttyAMA0,115200 root=/dev/mmcblk0p2 rw rootwait" +CONFIG_CMDLINE_FROM_BOOTLOADER=y +CONFIG_COMMON_CLK=y +CONFIG_COMPAT_32BIT_TIME=y +CONFIG_COREDUMP=y +CONFIG_CPU_32v5=y +CONFIG_CPU_ABRT_EV5TJ=y +CONFIG_CPU_ARM926T=y +# CONFIG_CPU_CACHE_ROUND_ROBIN is not set +CONFIG_CPU_CACHE_VIVT=y +CONFIG_CPU_COPY_V4WB=y +CONFIG_CPU_CP15=y +CONFIG_CPU_CP15_MMU=y +# CONFIG_CPU_DCACHE_WRITETHROUGH is not set +CONFIG_CPU_IDLE=y +CONFIG_CPU_IDLE_GOV_LADDER=y +CONFIG_CPU_IDLE_GOV_MENU=y +CONFIG_CPU_LITTLE_ENDIAN=y +CONFIG_CPU_PABRT_LEGACY=y +CONFIG_CPU_PM=y +CONFIG_CPU_THUMB_CAPABLE=y +CONFIG_CPU_TLB_V4WBI=y +CONFIG_CPU_USE_DOMAINS=y +CONFIG_CRC16=y +CONFIG_CROSS_MEMORY_ATTACH=y +CONFIG_CRYPTO_CBC=y +CONFIG_CRYPTO_CRC32C=y +CONFIG_CRYPTO_DEV_MXS_DCP=y +CONFIG_CRYPTO_ECB=y +CONFIG_CRYPTO_HW=y +CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y +CONFIG_CRYPTO_RNG2=y +CONFIG_DEBUG_ALIGN_RODATA=y +CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S" +CONFIG_DMADEVICES=y +CONFIG_DMA_ENGINE=y +CONFIG_DMA_OF=y +CONFIG_DMA_OPS=y +CONFIG_DTC=y +CONFIG_EDAC_ATOMIC_SCRUB=y +CONFIG_EDAC_SUPPORT=y +CONFIG_EXT4_FS=y +CONFIG_EXTCON=y +CONFIG_FEC=y +CONFIG_FIXED_PHY=y +CONFIG_FIX_EARLYCON_MEM=y +CONFIG_FS_IOMAP=y +CONFIG_FS_MBCACHE=y +CONFIG_FWNODE_MDIO=y +CONFIG_FW_LOADER_PAGED_BUF=y +CONFIG_GENERIC_ALLOCATOR=y +CONFIG_GENERIC_ATOMIC64=y +CONFIG_GENERIC_BUG=y +CONFIG_GENERIC_CLOCKEVENTS=y +CONFIG_GENERIC_CPU_AUTOPROBE=y +CONFIG_GENERIC_EARLY_IOREMAP=y +CONFIG_GENERIC_IDLE_POLL_SETUP=y +CONFIG_GENERIC_IRQ_CHIP=y +CONFIG_GENERIC_IRQ_MULTI_HANDLER=y +CONFIG_GENERIC_IRQ_SHOW=y +CONFIG_GENERIC_IRQ_SHOW_LEVEL=y +CONFIG_GENERIC_LIB_DEVMEM_IS_ALLOWED=y +CONFIG_GENERIC_PCI_IOMAP=y +CONFIG_GENERIC_SCHED_CLOCK=y +CONFIG_GENERIC_SMP_IDLE_THREAD=y +CONFIG_GENERIC_STRNCPY_FROM_USER=y +CONFIG_GENERIC_STRNLEN_USER=y +# CONFIG_GIANFAR is not set +CONFIG_GLOB=y +CONFIG_GPIO_CDEV=y +CONFIG_GPIO_GENERIC=y +CONFIG_GPIO_GENERIC_PLATFORM=y +CONFIG_GPIO_MXS=y +CONFIG_HARDIRQS_SW_RESEND=y +CONFIG_HAS_DMA=y +CONFIG_HAS_IOMEM=y +CONFIG_HAS_IOPORT_MAP=y +CONFIG_HZ_FIXED=0 +CONFIG_HZ_PERIODIC=y +CONFIG_I2C=y +CONFIG_I2C_ALGOBIT=y +CONFIG_I2C_ALGOPCA=y +CONFIG_I2C_ALGOPCF=y +CONFIG_I2C_BOARDINFO=y +CONFIG_I2C_CHARDEV=y +CONFIG_I2C_COMPAT=y +CONFIG_I2C_MUX=y +CONFIG_I2C_MUX_PINCTRL=y +CONFIG_I2C_MXS=y +CONFIG_IIO=y +CONFIG_IIO_BUFFER=y +CONFIG_IIO_KFIFO_BUF=y +CONFIG_IIO_SYSFS_TRIGGER=y +CONFIG_IIO_TRIGGER=y +# CONFIG_IIO_TRIGGERED_BUFFER is not set +CONFIG_INITRAMFS_SOURCE="" +CONFIG_INPUT=y +CONFIG_IRQCHIP=y +CONFIG_IRQ_DOMAIN=y +CONFIG_IRQ_FORCED_THREADING=y +CONFIG_IRQ_MXS=y +CONFIG_IRQ_WORK=y +# CONFIG_ISDN is not set +CONFIG_JBD2=y +CONFIG_LIBFDT=y +CONFIG_LOCK_DEBUGGING_SUPPORT=y +CONFIG_MDIO_BUS=y +CONFIG_MDIO_DEVICE=y +CONFIG_MDIO_DEVRES=y +CONFIG_MEMFD_CREATE=y +CONFIG_MFD_CORE=y +CONFIG_MFD_MXS_LRADC=y +CONFIG_MIGRATION=y +CONFIG_MMC=y +CONFIG_MMC_BLOCK=y +CONFIG_MMC_MXS=y +CONFIG_MODULES_USE_ELF_REL=y +CONFIG_MXS_DMA=y +# CONFIG_MXS_LRADC_ADC is not set +CONFIG_MXS_TIMER=y +CONFIG_NEED_DMA_MAP_STATE=y +CONFIG_NEED_KUSER_HELPERS=y +CONFIG_NEED_PER_CPU_KM=y +CONFIG_NET_PTP_CLASSIFY=y +CONFIG_NET_SELFTESTS=y +CONFIG_NLS=y +CONFIG_NVMEM=y +CONFIG_NVMEM_MXS_OCOTP=y +CONFIG_OF=y +CONFIG_OF_ADDRESS=y +CONFIG_OF_EARLY_FLATTREE=y +CONFIG_OF_FLATTREE=y +CONFIG_OF_GPIO=y +CONFIG_OF_IRQ=y +CONFIG_OF_KOBJ=y +CONFIG_OF_MDIO=y +CONFIG_OLD_SIGACTION=y +CONFIG_OLD_SIGSUSPEND3=y +CONFIG_PAGE_OFFSET=0xC0000000 +CONFIG_PERF_USE_VMALLOC=y +CONFIG_PGTABLE_LEVELS=2 +CONFIG_PHYLIB=y +CONFIG_PINCTRL=y +CONFIG_PINCTRL_IMX23=y +CONFIG_PINCTRL_IMX28=y +CONFIG_PINCTRL_MXS=y +# CONFIG_PINCTRL_SINGLE is not set +CONFIG_PM=y +CONFIG_PM_CLK=y +CONFIG_POWER_SUPPLY=y +CONFIG_PPS=y +CONFIG_PTP_1588_CLOCK=y +CONFIG_PTP_1588_CLOCK_OPTIONAL=y +CONFIG_RATIONAL=y +CONFIG_REGULATOR=y +CONFIG_REGULATOR_FIXED_VOLTAGE=y +CONFIG_REGULATOR_GPIO=y +CONFIG_RESET_CONTROLLER=y +CONFIG_RTC_CLASS=y +CONFIG_RTC_DRV_STMP=y +CONFIG_RTC_I2C_AND_SPI=y +CONFIG_RTC_MC146818_LIB=y +# CONFIG_SERIAL_8250 is not set +CONFIG_SERIAL_AMBA_PL011=y +CONFIG_SERIAL_AMBA_PL011_CONSOLE=y +CONFIG_SERIAL_MCTRL_GPIO=y +CONFIG_SERIAL_MXS_AUART=y +CONFIG_SERIAL_MXS_AUART_CONSOLE=y +CONFIG_SMSC_PHY=y +CONFIG_SOC_BUS=y +CONFIG_SOC_IMX23=y +CONFIG_SOC_IMX28=y +CONFIG_SPARSE_IRQ=y +CONFIG_SPI=y +CONFIG_SPI_MASTER=y +CONFIG_SPI_MXS=y +CONFIG_SPLIT_PTLOCK_CPUS=999999 +CONFIG_SRCU=y +CONFIG_STMP3XXX_RTC_WATCHDOG=y +CONFIG_STMP_DEVICE=y +CONFIG_SWPHY=y +CONFIG_SYS_SUPPORTS_APM_EMULATION=y +CONFIG_TICK_CPU_ACCOUNTING=y +CONFIG_TIMER_OF=y +CONFIG_TIMER_PROBE=y +CONFIG_TINY_SRCU=y +CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h" +# CONFIG_UNUSED_BOARD_FILES is not set +CONFIG_UNWINDER_ARM=y +CONFIG_USB=y +CONFIG_USB_CHIPIDEA=y +CONFIG_USB_CHIPIDEA_HOST=y +CONFIG_USB_CHIPIDEA_IMX=y +CONFIG_USB_CHIPIDEA_UDC=y +CONFIG_USB_COMMON=y +CONFIG_USB_EHCI_HCD=y +# CONFIG_USB_EHCI_HCD_PLATFORM is not set +CONFIG_USB_GADGET=y +CONFIG_USB_MXS_PHY=y +CONFIG_USB_OTG=y +CONFIG_USB_PHY=y +CONFIG_USB_ROLE_SWITCH=y +CONFIG_USB_SUPPORT=y +CONFIG_USB_ULPI_BUS=y +CONFIG_USE_OF=y +# CONFIG_VFP is not set +CONFIG_WATCHDOG_CORE=y +CONFIG_XZ_DEC_ARM=y +CONFIG_XZ_DEC_BCJ=y +CONFIG_ZBOOT_ROM_BSS=0 +CONFIG_ZBOOT_ROM_TEXT=0 diff --git a/target/linux/mxs/image/Config.in b/target/linux/mxs/image/Config.in index a04700a440..b4318390c2 100644 --- a/target/linux/mxs/image/Config.in +++ b/target/linux/mxs/image/Config.in @@ -1,6 +1,6 @@ -config TARGET_BOOTFS_PARTSIZE +config MXS_SD_BOOT_PARTSIZE int "Boot (SD Card) filesystem partition size (in MB)" - depends on TARGET_mxs_generic_olinuxino-maxi || TARGET_mxs_generic_olinuxino-micro + depends on TARGET_mxs default 8 help On the Olimex OLinuXino boards, mainline U-Boot loads the diff --git a/target/linux/mxs/image/Makefile b/target/linux/mxs/image/Makefile index bcb6001bac..f1847dec1e 100644 --- a/target/linux/mxs/image/Makefile +++ b/target/linux/mxs/image/Makefile @@ -5,72 +5,77 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/image.mk -BOARDS:= \ - imx23-olinuxino \ - imx28-duckbill - FAT32_BLOCK_SIZE=1024 -FAT32_BLOCKS=$(shell echo $$(($(CONFIG_TARGET_BOOTFS_PARTSIZE)*1024*1024/$(FAT32_BLOCK_SIZE)))) +FAT32_BLOCKS=$(shell echo $$(($(CONFIG_MXS_SD_BOOT_PARTSIZE)*1024*1024/$(FAT32_BLOCK_SIZE)))) -define Image/BuildKernel - mkimage -A arm -O linux -T kernel -C none \ - -a 0x40008000 -e 0x40008000 \ - -n 'ARM OpenWrt Linux-$(LINUX_VERSION)' \ - -d $(KDIR)/zImage $(KDIR)/uImage - cp $(KDIR)/uImage $(BIN_DIR)/$(IMG_PREFIX)-uImage +KERNEL_LOADADDR:=0x40008000 + +define Build/mxs-sdcard-ext4-ext4 + ./gen_sdcard_ext4_ext4.sh \ + $@ \ + $(STAGING_DIR_IMAGE)/$(DEVICE_NAME)/u-boot.sb \ + $(IMAGE_ROOTFS) \ + $(CONFIG_TARGET_ROOTFS_PARTSIZE) endef -define Image/InstallKernel - mkdir -p $(TARGET_DIR)/boot - cp \ - $(KDIR)/zImage $(KDIR)/uImage \ - $(foreach board,$(BOARDS),$(DTS_DIR)/$(board).dtb) \ - $(TARGET_DIR)/boot/ -endef +define Build/mxs-sdcard-vfat-ext4 + rm -f $@.boot + mkfs.fat $@.boot -C $(FAT32_BLOCKS) -define Image/Build/SDCard-vfat-ext4 - rm -f $(KDIR)/boot.img - mkfs.fat $(KDIR)/boot.img -C $(FAT32_BLOCKS) - - mcopy -i $(KDIR)/boot.img $(DTS_DIR)/$(3).dtb ::$(3).dtb - mcopy -i $(KDIR)/boot.img $(BIN_DIR)/$(IMG_PREFIX)-uImage ::uImage + mcopy -i $@.boot $(DTS_DIR)/$(DEVICE_DTS).dtb ::$(DEVICE_DTS).dtb + mcopy -i $@.boot $(IMAGE_KERNEL) ::uImage ./gen_sdcard_vfat_ext4.sh \ - $(BIN_DIR)/$(2) \ - $(STAGING_DIR_IMAGE)/$(4)-u-boot.sb \ - $(KDIR)/boot.img \ - $(KDIR)/root.$(1) \ - $(CONFIG_TARGET_BOOTFS_PARTSIZE) \ + $@ \ + $(STAGING_DIR_IMAGE)/$(DEVICE_NAME)/u-boot.sb \ + $@.boot \ + $(IMAGE_ROOTFS) \ + $(CONFIG_MXS_SD_BOOT_PARTSIZE) \ $(CONFIG_TARGET_ROOTFS_PARTSIZE) - $(call Image/Gzip,$(BIN_DIR)/$(2)) endef -define Image/Build/SDCard-ext4-ext4 - ./gen_sdcard_ext4_ext4.sh \ - $(BIN_DIR)/$(2) \ - $(STAGING_DIR_IMAGE)/$(4)-u-boot.sb \ - $(KDIR)/root.$(1) \ - $(CONFIG_TARGET_ROOTFS_PARTSIZE) - $(call Image/Gzip,$(BIN_DIR)/$(2)) +define Device/Default + PROFILES := Default + KERNEL_NAME := zImage + KERNEL := kernel-bin | uImage none + IMAGES := sdcard.img.gz + DEVICE_DTS = $$(SOC)-$(lastword $(subst _, ,$(1))) endef -define Image/Build/Profile/olinuxino-maxi - $(call Image/Build/SDCard-vfat-ext4,$(1),$(2),imx23-olinuxino,mx23_olinuxino) +define Device/i2se_duckbill + DEVICE_VENDOR := I2SE + DEVICE_MODEL := Duckbill + DEVICE_PACKAGES := -dnsmasq -firewall -ppp -ip6tables -iptables -6relayd -mtd \ + uboot-envtools kmod-leds-gpio -kmod-ipt-nathelper + SUPPORTED_DEVICES:=i2se,duckbill + SOC:=imx28 + DEVICE_DTS:=imx28-duckbill + IMAGE/sdcard.img.gz = mxs-sdcard-ext4-ext4 | append-metadata | gzip endef +TARGET_DEVICES += i2se_duckbill -define Image/Build/Profile/olinuxino-micro - $(call Image/Build/SDCard-vfat-ext4,$(1),$(2),imx23-olinuxino,mx23_olinuxino) +define Device/olinuxino_maxi + DEVICE_VENDOR := Olimex + DEVICE_MODEL := OLinuXino Maxi + DEVICE_PACKAGES := kmod-usb-net-smsc95xx kmod-pinctrl-mcp23s08-i2c \ + kmod-pinctrl-mcp23s08-spi kmod-leds-gpio kmod-sound-core + SUPPORTED_DEVICES:=olimex,imx23-olinuxino + SOC:=imx23 + DEVICE_DTS:=imx23-olinuxino + IMAGE/sdcard.img.gz = mxs-sdcard-vfat-ext4 | append-metadata | gzip endef +TARGET_DEVICES += olinuxino_maxi -define Image/Build/Profile/duckbill - $(call Image/Build/SDCard-ext4-ext4,$(1),$(2),imx28-duckbill,duckbill) -endef - -define Image/Build - $(call Image/Build/$(1),$(1)) - $(call Image/Build/Profile/$(PROFILE),$(1),$(IMG_PREFIX)-$(PROFILE)-sdcard.img) - dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-root.$(1) bs=128k conv=sync - $(call Image/Gzip,$(BIN_DIR)/$(IMG_PREFIX)-root.$(1)) +define Device/olinuxino_micro + DEVICE_VENDOR := Olimex + DEVICE_MODEL := OLinuXino Micro + DEVICE_PACKAGES := kmod-pinctrl-mcp23s08-spi kmod-pinctrl-mcp23s08-i2c \ + kmod-leds-gpio + SUPPORTED_DEVICES:=olimex,imx23-olinuxino + SOC:=imx23 + DEVICE_DTS:=imx23-olinuxino + IMAGE/sdcard.img.gz = mxs-sdcard-vfat-ext4 | append-metadata | gzip endef +TARGET_DEVICES += olinuxino_micro $(eval $(call BuildImage)) diff --git a/target/linux/mxs/profiles/01-duckbill.mk b/target/linux/mxs/profiles/01-duckbill.mk deleted file mode 100644 index d7202a4422..0000000000 --- a/target/linux/mxs/profiles/01-duckbill.mk +++ /dev/null @@ -1,17 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0-only -# -# Copyright (C) 2013 OpenWrt.org - -define Profile/duckbill - NAME:=I2SE Duckbill boards - FEATURES+=usbgadget - PACKAGES+= \ - -dnsmasq -firewall -ppp -ip6tables -iptables -6relayd -mtd uboot-envtools \ - kmod-leds-gpio -kmod-ipt-nathelper uboot-mxs-duckbill -endef - -define Profile/duckbill/Description - I2SE's Duckbill devices -endef - -$(eval $(call Profile,duckbill)) diff --git a/target/linux/mxs/profiles/02-olinuxino-maxi.mk b/target/linux/mxs/profiles/02-olinuxino-maxi.mk deleted file mode 100644 index dd333629b8..0000000000 --- a/target/linux/mxs/profiles/02-olinuxino-maxi.mk +++ /dev/null @@ -1,16 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0-only -# -# Copyright (C) 2013 OpenWrt.org - -define Profile/olinuxino-maxi - NAME:=Olimex OLinuXino Maxi/Mini boards - PACKAGES += imx-bootlets uboot-mxs-mx23_olinuxino \ - kmod-usb-net-smsc95xx kmod-pinctrl-mcp23s08-i2c \ - kmod-pinctrl-mcp23s08-spi kmod-leds-gpio kmod-sound-core -endef - -define Profile/olinuxino-maxi/Description - Olimex OLinuXino Maxi/Mini boards -endef - -$(eval $(call Profile,olinuxino-maxi)) diff --git a/target/linux/mxs/profiles/03-olinuxino-micro.mk b/target/linux/mxs/profiles/03-olinuxino-micro.mk deleted file mode 100644 index 8413ebbdca..0000000000 --- a/target/linux/mxs/profiles/03-olinuxino-micro.mk +++ /dev/null @@ -1,16 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0-only -# -# Copyright (C) 2013 OpenWrt.org - -define Profile/olinuxino-micro - NAME:=Olimex OLinuXino Micro/Nano boards - PACKAGES += imx-bootlets uboot-mxs-mx23_olinuxino \ - kmod-pinctrl-mcp23s08-spi kmod-pinctrl-mcp23s08-i2c \ - kmod-leds-gpio -endef - -define Profile/olinuxino-micro/Description - Olimex OLinuXino Micro/Nano boards -endef - -$(eval $(call Profile,olinuxino-micro)) diff --git a/target/linux/ramips/dts/mt7621_beeline_smartbox-pro.dts b/target/linux/ramips/dts/mt7621_beeline_smartbox-pro.dts new file mode 100644 index 0000000000..e3e248d48f --- /dev/null +++ b/target/linux/ramips/dts/mt7621_beeline_smartbox-pro.dts @@ -0,0 +1,118 @@ +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "mt7621_sercomm_s1500.dtsi" + +/ { + compatible = "beeline,smartbox-pro", "mediatek,mt7621-soc"; + model = "Beeline SmartBox PRO"; + + aliases { + label-mac-device = &gmac0; + }; + + keys { + switch_bt { + label = "ROUT<->REP Switch_bt"; + gpios = <&gpio 6 GPIO_ACTIVE_LOW>; + linux,input-type = ; + linux,code = ; + debounce-interval = <60>; + }; + }; + + ubi-concat { + compatible = "mtd-concat"; + devices = <&ubiconcat0 &ubiconcat1 &ubiconcat2 &ubiconcat3 \ + &ubiconcat4 &ubiconcat5 &ubiconcat6>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "ubi"; + reg = <0x0 0xd2e0000>; + }; + }; + }; +}; + +&led_wps { + label = "blue:wps"; + color = ; +}; + +&partitions { + partition@0_all { + label = "ALL"; + reg = <0x0 0xff80000>; + read-only; + }; + + partition@200000 { + label = "sys_data"; + reg = <0x200000 0x1400000>; + + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + ubiconcat5: partition@0 { + label = "sys_data_1"; + reg = <0x0 0x600000>; + }; + + /* + * Sercomm U-Boot saves the environment at 0x800000 from + * the start of the NAND, destroying the "sys_data" + * partition. To prevent this, we split "sys_data" into + * two parts with "u-boot-env" partition between them. + */ + partition@600000 { + label = "u-boot-env"; + reg = <0x600000 0x20000>; + }; + + ubiconcat6: partition@620000 { + label = "sys_data_2"; + reg = <0x620000 0xde0000>; + }; + }; + + ubiconcat0: partition@1f00000 { + label = "RootFS_1"; + reg = <0x1f00000 0x1e00000>; + }; + + partition@3d00000 { + label = "RootFS_2"; + reg = <0x3d00000 0x1e00000>; + read-only; + }; + + ubiconcat1: partition@5b00000 { + label = "JVM/OSGI1"; + reg = <0x5b00000 0x3200000>; + }; + + ubiconcat2: partition@8d00000 { + label = "JVM/OSGI2"; + reg = <0x8d00000 0x3200000>; + }; + + ubiconcat3: partition@bf00000 { + label = "OSGI data"; + reg = <0xbf00000 0x3c00000>; + }; + + ubiconcat4: partition@fb00000 { + label = "Ftool"; + reg = <0xfb00000 0x100000>; + }; + + /* + * 4 MiB Reserved for the Bad Blocka + * 0x10000000-0xfc00000=0x400000 + */ +}; diff --git a/target/linux/ramips/dts/mt7621_comfast_cf-e390ax.dts b/target/linux/ramips/dts/mt7621_comfast_cf-e390ax.dts new file mode 100644 index 0000000000..80600470e7 --- /dev/null +++ b/target/linux/ramips/dts/mt7621_comfast_cf-e390ax.dts @@ -0,0 +1,135 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "mt7621.dtsi" + +#include +#include +#include + +/ { + compatible = "comfast,cf-e390ax", "mediatek,mt7621-soc"; + model = "COMFAST CF-E390AX"; + + chosen { + bootargs = "console=ttyS0,115200"; + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "reset"; + gpios = <&gpio 18 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; + + leds { + compatible = "gpio-leds"; + + led_status_green: status_green { + label = "green:status"; + gpios = <&gpio 15 GPIO_ACTIVE_LOW>; + }; + + led_status_blue: status_blue { + label = "blue:status"; + gpios = <&gpio 16 GPIO_ACTIVE_LOW>; + }; + + led_status_red: status_red { + label = "red:status"; + gpios = <&gpio 13 GPIO_ACTIVE_LOW>; + }; + }; + + aliases { + led-boot = &led_status_green; + led-failsafe = &led_status_red; + led-running = &led_status_blue; + led-upgrade = &led_status_red; + }; +}; + +&pcie { + status = "okay"; +}; + +&pcie1 { + wifi@0,0 { + compatible = "mediatek,mt76"; + reg = <0x0000 0 0 0 0>; + mediatek,mtd-eeprom = <&factory 0x0>; + }; +}; + +&spi0 { + status = "okay"; + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <14000000>; + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "bootloader"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "config"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@50000 { + label = "factory"; + reg = <0x50000 0x10000>; + read-only; + }; + + partition@90000 { + compatible = "denx,uimage"; + label = "firmware"; + reg = <0x90000 0xf70000>; + }; + }; + }; +}; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; +}; + +&gmac0 { + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; +}; + +&switch0 { + ports { + port@0 { + status = "okay"; + label = "wan"; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; + mac-address-increment = <1>; + }; + + port@4 { + status = "okay"; + label = "lan"; + }; + }; +}; + diff --git a/target/linux/ramips/dts/mt7621_netgear_eax12.dts b/target/linux/ramips/dts/mt7621_netgear_eax12.dts new file mode 100644 index 0000000000..d5ad404be0 --- /dev/null +++ b/target/linux/ramips/dts/mt7621_netgear_eax12.dts @@ -0,0 +1,189 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "mt7621.dtsi" + +#include +#include + +/ { + compatible = "netgear,eax12", "mediatek,mt7621-soc"; + model = "Netgear EAX12"; + + aliases { + led-boot = &led_power_green; + led-failsafe = &led_power_red; + led-running = &led_power_green; + led-upgrade = &led_power_red; + }; + + chosen { + bootargs = "console=ttyS0,115200"; + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "reset"; + gpios = <&gpio 15 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + wps { + label = "wps"; + gpios = <&gpio 8 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; + + leds { + compatible = "gpio-leds"; + + led_power_green: power_green { + label = "green:power"; + gpios = <&gpio 16 GPIO_ACTIVE_LOW>; + }; + + led_power_red: power_red { + label = "red:power"; + gpios = <&gpio 7 GPIO_ACTIVE_LOW>; + }; + + client_green { + label = "green:client"; + gpios = <&gpio 13 GPIO_ACTIVE_LOW>; + }; + + client_red { + label = "red:client"; + gpios = <&gpio 14 GPIO_ACTIVE_LOW>; + }; + + router_green { + label = "green:router"; + gpios = <&gpio 5 GPIO_ACTIVE_HIGH>; + }; + + router_red { + label = "red:router"; + gpios = <&gpio 11 GPIO_ACTIVE_HIGH>; + }; + + wps_green { + label = "green:wps"; + gpios = <&gpio 17 GPIO_ACTIVE_HIGH>; + }; + + eth_green { + label = "green:eth"; + gpios = <&gpio 10 GPIO_ACTIVE_LOW>; + }; + + eth_yellow { + label = "yellow:eth"; + gpios = <&gpio 12 GPIO_ACTIVE_LOW>; + }; + }; +}; + +&nand { + status = "okay"; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "Bootloader"; + reg = <0x0 0x80000>; + read-only; + }; + + partition@80000 { + label = "Config"; + reg = <0x80000 0x80000>; + read-only; + }; + + factory: partition@100000 { + label = "Factory"; + reg = <0x100000 0x80000>; + read-only; + }; + + partition@180000 { + label = "firmware"; + reg = <0x180000 0x3800000>; + + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "kernel"; + reg = <0x0 0x400000>; + }; + + partition@400000 { + label = "ubi"; + reg = <0x400000 0x3400000>; + }; + }; + + partition@2780000 { + label = "firmware_backup"; + reg = <0x3980000 0x3800000>; + read-only; + }; + + partition@4d80000 { + label = "CFG"; + reg = <0x7180000 0x200000>; + read-only; + }; + + partition@5580000 { + label = "RAE"; + reg = <0x7380000 0x600000>; + read-only; + }; + + partition@5980000 { + label = "POT"; + reg = <0x7980000 0x020000>; + read-only; + }; + + partition@6780000 { + label = "LOG"; + reg = <0x79A0000 0x40000>; + read-only; + }; + }; +}; + +&pcie { + status = "okay"; +}; + +&pcie1 { + wifi@0,0 { + compatible = "mediatek,mt76"; + reg = <0x0000 0 0 0 0>; + mediatek,mtd-eeprom = <&factory 0x0>; + }; +}; + +&switch0 { + ports { + port@0 { + status = "okay"; + label = "lan"; + }; + }; +}; + +&xhci { + status = "disabled"; +}; diff --git a/target/linux/ramips/dts/mt7621_sercomm_s1500.dtsi b/target/linux/ramips/dts/mt7621_sercomm_s1500.dtsi new file mode 100644 index 0000000000..91053f15bc --- /dev/null +++ b/target/linux/ramips/dts/mt7621_sercomm_s1500.dtsi @@ -0,0 +1,281 @@ +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "mt7621.dtsi" + +#include +#include +#include + +/ { + aliases { + led-boot = &led_status; + led-running = &led_status; + led-upgrade = &led_wps; + led-failsafe = &led_wps; + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "reset"; + gpios = <&gpio 7 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + wps { + label = "wps"; + gpios = <&gpio 18 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; + + leds { + compatible = "gpio-leds"; + + led-0 { + label = "amber:lan4"; + color = ; + function = LED_FUNCTION_LAN; + function-enumerator = <0>; + linux,default-trigger = "mt7530-0:00:1Gbps"; + gpios = <&gpio 3 GPIO_ACTIVE_LOW>; + }; + + led-1 { + label = "green:lan4"; + color = ; + function = LED_FUNCTION_LAN; + function-enumerator = <1>; + gpios = <&gpio 4 GPIO_ACTIVE_LOW>; + }; + + led-2 { + label = "amber:lan3"; + color = ; + function = LED_FUNCTION_LAN; + function-enumerator = <2>; + linux,default-trigger = "mt7530-0:01:1Gbps"; + gpios = <&gpio 10 GPIO_ACTIVE_LOW>; + }; + + led-3 { + label = "green:lan3"; + color = ; + function = LED_FUNCTION_LAN; + function-enumerator = <3>; + gpios = <&gpio 12 GPIO_ACTIVE_LOW>; + }; + + led-4 { + label = "amber:lan2"; + color = ; + function = LED_FUNCTION_LAN; + function-enumerator = <4>; + linux,default-trigger = "mt7530-0:02:1Gbps"; + gpios = <&gpio 14 GPIO_ACTIVE_LOW>; + }; + + led-5 { + label = "amber:lan1"; + color = ; + function = LED_FUNCTION_LAN; + function-enumerator = <5>; + linux,default-trigger = "mt7530-0:03:1Gbps"; + gpios = <&gpio 22 GPIO_ACTIVE_LOW>; + }; + + led-6 { + label = "green:lan1"; + color = ; + function = LED_FUNCTION_LAN; + function-enumerator = <6>; + gpios = <&gpio 23 GPIO_ACTIVE_LOW>; + }; + + led-7 { + label = "amber:wan"; + color = ; + function = LED_FUNCTION_WAN; + function-enumerator = <0>; + linux,default-trigger = "mt7530-0:04:1Gbps"; + gpios = <&gpio 24 GPIO_ACTIVE_LOW>; + }; + + led-8 { + label = "green:wan"; + color = ; + function = LED_FUNCTION_WAN; + function-enumerator = <1>; + gpios = <&gpio 25 GPIO_ACTIVE_LOW>; + }; + + led-9 { + label = "green:lan2"; + color = ; + function = LED_FUNCTION_LAN; + function-enumerator = <7>; + gpios = <&gpio 26 GPIO_ACTIVE_LOW>; + }; + + led-10 { + label = "white:wlan2g"; + color = ; + function = LED_FUNCTION_WLAN; + function-enumerator = <0>; + linux,default-trigger = "phy1radio"; + gpios = <&gpio 28 GPIO_ACTIVE_LOW>; + }; + + led_wps: led-11 { + function = LED_FUNCTION_WPS; + function-enumerator = <0>; + gpios = <&gpio 29 GPIO_ACTIVE_LOW>; + panic-indicator; + }; + + led_status: led-12 { + label = "white:status"; + color = ; + function = LED_FUNCTION_STATUS; + function-enumerator = <0>; + gpios = <&gpio 30 GPIO_ACTIVE_LOW>; + }; + + led-13 { + label = "white:wlan5g"; + color = ; + function = LED_FUNCTION_WLAN; + function-enumerator = <1>; + linux,default-trigger = "phy0radio"; + gpios = <&gpio 32 GPIO_ACTIVE_LOW>; + }; + }; +}; + +ðernet { + pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>; +}; + +&gmac0 { + nvmem-cells = <&macaddr_factory_1000>; + nvmem-cell-names = "mac-address"; +}; + +&nand { + status = "okay"; + + partitions: partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x100000>; + read-only; + }; + + factory: partition@100000 { + label = "Factory"; + reg = <0x100000 0x100000>; + read-only; + + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_1000: macaddr@1000 { + reg = <0x1000 0x6>; + }; + }; + + partition@1600000 { + label = "boot_flag"; + reg = <0x1600000 0x100000>; + }; + + partition@1700000 { + label = "kernel"; + reg = <0x1700000 0x400000>; + }; + + partition@1b00000 { + label = "Kernel_2"; + reg = <0x1b00000 0x400000>; + read-only; + }; + }; +}; + +&pcie { + status = "okay"; + + reset-gpios = <&gpio 8 GPIO_ACTIVE_LOW>, + <&gpio 19 GPIO_ACTIVE_LOW>; +}; + +&pcie0 { + wifi@0,0 { + compatible = "mediatek,mt76"; + reg = <0x0000 0 0 0 0>; + ieee80211-freq-limit = <5000000 6000000>; + mediatek,mtd-eeprom = <&factory 0x8000>; + + nvmem-cells = <&macaddr_factory_1000>; + nvmem-cell-names = "mac-address"; + mac-address-increment = <2>; + }; +}; + +&pcie1 { + wlan_2g: wifi@0,0 { + compatible = "mediatek,mt76"; + reg = <0x0000 0 0 0 0>; + ieee80211-freq-limit = <2400000 2500000>; + mediatek,mtd-eeprom = <&factory 0x0>; + + nvmem-cells = <&macaddr_factory_1000>; + nvmem-cell-names = "mac-address"; + }; +}; + +&state_default { + gpio { + groups = "wdt", "uart3", "jtag", "uart2", "i2c", "rgmii2"; + function = "gpio"; + }; +}; + +&switch0 { + ports { + port@0 { + status = "okay"; + label = "lan4"; + }; + + port@1 { + status = "okay"; + label = "lan3"; + }; + + port@2 { + status = "okay"; + label = "lan2"; + }; + + port@3 { + status = "okay"; + label = "lan1"; + }; + + wan: port@4 { + status = "okay"; + label = "wan"; + + nvmem-cells = <&macaddr_factory_1000>; + nvmem-cell-names = "mac-address"; + mac-address-increment = <1>; + }; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_wifire_s1500-nbn.dts b/target/linux/ramips/dts/mt7621_wifire_s1500-nbn.dts new file mode 100644 index 0000000000..6c0e2965aa --- /dev/null +++ b/target/linux/ramips/dts/mt7621_wifire_s1500-nbn.dts @@ -0,0 +1,81 @@ +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "mt7621_sercomm_s1500.dtsi" + +/ { + compatible = "wifire,s1500-nbn", "mediatek,mt7621-soc"; + model = "WiFire S1500.NBN"; + + aliases { + label-mac-device = &wan; + }; + + ubi-concat { + compatible = "mtd-concat"; + devices = <&ubiconcat0 &ubiconcat1 &ubiconcat2 &ubiconcat3>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "ubi"; + reg = <0x0 0x4680000>; + }; + }; + }; +}; + +&led_wps { + label = "white:wps"; + color = ; +}; + +&partitions { + partition@0_all { + label = "ALL"; + reg = <0x0 0x7f80000>; + read-only; + }; + + partition@80000 { + label = "u-boot-env"; + reg = <0x80000 0x20000>; + }; + + ubiconcat1: partition@200000 { + label = "sys_data"; + reg = <0x200000 0x1400000>; + }; + + ubiconcat0: partition@1f00000 { + label = "RootFS_1"; + reg = <0x1f00000 0x2e00000>; + }; + + partition@4d00000 { + label = "RootFS_2"; + reg = <0x4d00000 0x2e00000>; + read-only; + }; + + ubiconcat2: partition@7b00000 { + label = "Ftool"; + reg = <0x7b00000 0x100000>; + }; + + ubiconcat3: partition@7c00000 { + label = "BCT"; + reg = <0x7c00000 0x380000>; + }; + + /* + * 512 KiB reserved for the Bad Blocks + * 0x8000000-0x7f80000=0x80000 + */ +}; + +&wlan_2g { + mac-address-increment = <1>; +}; diff --git a/target/linux/ramips/image/Makefile b/target/linux/ramips/image/Makefile index c080456e7a..265e9fb5e0 100644 --- a/target/linux/ramips/image/Makefile +++ b/target/linux/ramips/image/Makefile @@ -7,6 +7,7 @@ include $(INCLUDE_DIR)/image.mk DEVICE_VARS += LOADER_TYPE LOADER_FLASH_OFFS LZMA_TEXT_START DEVICE_VARS += NETGEAR_BOARD_ID NETGEAR_HW_ID +DEVICE_VARS += NETGEAR_ENC_MODEL NETGEAR_ENC_REGION NETGEAR_ENC_HW_ID_LIST NETGEAR_ENC_MODEL_LIST DEVICE_VARS += BUFFALO_TAG_PLATFORM BUFFALO_TAG_VERSION BUFFALO_TAG_MINOR DEVICE_VARS += SEAMA_SIGNATURE SEAMA_MTDBLOCK DEVICE_VARS += SERCOMM_HWNAME SERCOMM_HWID SERCOMM_HWVER SERCOMM_SWVER @@ -179,6 +180,10 @@ define Device/Default SOC := $(DEFAULT_SOC) DEVICE_DTS_DIR := ../dts DEVICE_DTS = $$(SOC)_$(1) + NETGEAR_ENC_MODEL := + NETGEAR_ENC_REGION := + NETGEAR_ENC_HW_ID_LIST := + NETGEAR_ENC_MODEL_LIST := IMAGES := sysupgrade.bin COMPILE := sysupgrade_bin := append-kernel | append-rootfs | pad-rootfs diff --git a/target/linux/ramips/image/common-sercomm.mk b/target/linux/ramips/image/common-sercomm.mk index fbe29d7017..4060da0923 100644 --- a/target/linux/ramips/image/common-sercomm.mk +++ b/target/linux/ramips/image/common-sercomm.mk @@ -1,6 +1,12 @@ DEVICE_VARS += SERCOMM_KERNEL_OFFSET SERCOMM_ROOTFS_OFFSET DEVICE_VARS += SERCOMM_KERNEL2_OFFSET SERCOMM_ROOTFS2_OFFSET +define Build/sercomm-append-tail + printf 16 | dd seek=$$((0x90)) of=$@ bs=1 conv=notrunc 2>/dev/null + printf 11223344556677889900112233445566 | \ + sed 's/../\\x&/g' | xargs -d . printf >> $@ +endef + define Build/sercomm-crypto $(TOPDIR)/scripts/sercomm-crypto.py \ --input-file $@ \ @@ -22,18 +28,20 @@ define Build/sercomm-factory-cqr --hw-version $(SERCOMM_HWVER) \ --hw-id $(SERCOMM_HWID) \ --sw-version $(SERCOMM_SWVER) \ - --pid-file $@.fhdr + --pid-file $@.fhdr \ + --extra-padding-size 0x190 printf $$(stat -c%s $(IMAGE_KERNEL)) | \ dd seek=$$((0x70)) of=$@.fhdr bs=1 conv=notrunc 2>/dev/null printf $$(($$(stat -c%s $@)-$$(stat -c%s $(IMAGE_KERNEL))-$$((0x200)))) | \ dd seek=$$((0x80)) of=$@.fhdr bs=1 conv=notrunc 2>/dev/null - dd bs=$$((0x200)) skip=1 if=$@ conv=notrunc 2>/dev/null | \ - $(MKHASH) md5 | awk '{print $$1}' | tr -d '\n' | \ - dd seek=$$((0x1e0)) of=$@.fhdr bs=1 conv=notrunc 2>/dev/null dd if=$@ >> $@.fhdr 2>/dev/null mv $@.fhdr $@ endef +define Build/sercomm-fix-buc-pid + printf 1 | dd seek=$$((0x13)) of=$@ bs=1 conv=notrunc 2>/dev/null +endef + define Build/sercomm-kernel $(TOPDIR)/scripts/sercomm-kernel-header.py \ --kernel-image $@ \ @@ -60,6 +68,12 @@ define Build/sercomm-kernel-factory mv $@.khdr $@ endef +define Build/sercomm-mkhash + dd bs=$$((0x400)) skip=1 if=$@ conv=notrunc 2>/dev/null | \ + $(MKHASH) md5 | awk '{print $$1}' | tr -d '\n' | \ + dd seek=$$((0x1e0)) of=$@ bs=1 conv=notrunc 2>/dev/null +endef + define Build/sercomm-part-tag $(call Build/sercomm-part-tag-common,$(word 1,$(1)) $@) endef @@ -98,19 +112,28 @@ define Build/sercomm-prepend-tagged-kernel mv $(IMAGE_KERNEL).tagged $@ endef +define Build/sercomm-reset-slot1-chksum + printf "\xff\xff\xff\xff" | \ + dd of=$@ seek=$$((0x118)) bs=1 conv=notrunc 2>/dev/null +endef + define Device/sercomm $(Device/nand) LOADER_TYPE := bin + IMAGES += factory.img +endef + +define Device/sercomm_cxx_dxx + $(Device/sercomm) KERNEL_SIZE := 6144k KERNEL_LOADADDR := 0x81001000 LZMA_TEXT_START := 0x82800000 SERCOMM_KERNEL_OFFSET := 0x400100 SERCOMM_ROOTFS_OFFSET := 0x1000000 - IMAGES += factory.img endef define Device/sercomm_cxx - $(Device/sercomm) + $(Device/sercomm_cxx_dxx) SERCOMM_KERNEL2_OFFSET := 0xa00100 SERCOMM_ROOTFS2_OFFSET := 0x3000000 KERNEL := kernel-bin | append-dtb | lzma | loader-kernel | lzma -a0 | \ @@ -118,11 +141,11 @@ define Device/sercomm_cxx IMAGE/sysupgrade.bin := append-kernel | sercomm-kernel | \ sysupgrade-tar kernel=$$$$@ | append-metadata IMAGE/factory.img := append-kernel | sercomm-kernel-factory | \ - append-ubi | sercomm-factory-cqr + append-ubi | sercomm-factory-cqr | sercomm-mkhash endef define Device/sercomm_dxx - $(Device/sercomm) + $(Device/sercomm_cxx_dxx) KERNEL := kernel-bin | append-dtb | lzma | loader-kernel | lzma -a0 | \ uImage lzma | sercomm-kernel KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma | loader-kernel | \ @@ -132,3 +155,17 @@ define Device/sercomm_dxx sercomm-part-tag rootfs | sercomm-prepend-tagged-kernel kernel | \ gzip | sercomm-payload | sercomm-crypto endef + +define Device/sercomm_s1500 + $(Device/sercomm) + SERCOMM_KERNEL_OFFSET := 0x1700100 + SERCOMM_ROOTFS_OFFSET := 0x1f00000 + SERCOMM_KERNEL2_OFFSET := 0x1b00100 + KERNEL := kernel-bin | append-dtb | lzma | loader-kernel | lzma -a0 | \ + uImage lzma + KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma | loader-kernel | \ + lzma -a0 | uImage lzma + IMAGE/sysupgrade.bin := append-kernel | sercomm-kernel | \ + sysupgrade-tar kernel=$$$$@ | append-metadata + DEVICE_PACKAGES := kmod-mt76x2 kmod-usb3 +endef diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index 003b615d31..52eded6bf9 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -398,6 +398,23 @@ define Device/beeline_smartbox-giga endef TARGET_DEVICES += beeline_smartbox-giga +define Device/beeline_smartbox-pro + $(Device/sercomm_s1500) + DEVICE_VENDOR := Beeline + DEVICE_MODEL := SmartBox PRO + DEVICE_ALT0_VENDOR := Sercomm + DEVICE_ALT0_MODEL := S1500 AWI + IMAGE_SIZE := 34816k + IMAGE/factory.img := append-kernel | sercomm-kernel-factory | \ + sercomm-reset-slot1-chksum | append-ubi | check-size | \ + sercomm-factory-cqr | sercomm-append-tail | sercomm-mkhash + SERCOMM_HWID := AWI + SERCOMM_HWVER := 10000 + SERCOMM_ROOTFS2_OFFSET := 0x3d00000 + SERCOMM_SWVER := 2020 +endef +TARGET_DEVICES += beeline_smartbox-pro + define Device/beeline_smartbox-turbo $(Device/sercomm_dxx) IMAGE_SIZE := 32768k @@ -485,6 +502,20 @@ define Device/bolt_arion endef TARGET_DEVICES += bolt_arion +define Device/comfast_cf-e390ax + $(Device/dsa-migration) + $(Device/uimage-lzma-loader) + IMAGE_SIZE := 15808k + DEVICE_VENDOR := ComFast + DEVICE_MODEL := CF-E390AX + DEVICE_PACKAGES := kmod-mt7915-firmware -uboot-envtools + IMAGES += factory.bin + IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | \ + check-size | append-metadata + IMAGE/factory.bin := append-kernel | append-rootfs | pad-rootfs | check-size +endef +TARGET_DEVICES += comfast_cf-e390ax + define Device/cudy_m1800 $(Device/dsa-migration) DEVICE_VENDOR := Cudy @@ -1617,6 +1648,32 @@ define Device/mts_wg430223 endef TARGET_DEVICES += mts_wg430223 +define Device/netgear_eax12 + $(Device/nand) + DEVICE_VENDOR := NETGEAR + DEVICE_MODEL := EAX12 + DEVICE_ALT0_VENDOR := NETGEAR + DEVICE_ALT0_MODEL := EAX11 + DEVICE_ALT0_VARIANT := v2 + DEVICE_ALT1_VENDOR := NETGEAR + DEVICE_ALT1_MODEL := EAX15 + DEVICE_ALT1_VARIANT := v2 + DEVICE_PACKAGES := kmod-mt7915-firmware -uboot-envtools + NETGEAR_ENC_MODEL := EAX12 + NETGEAR_ENC_REGION := US + NETGEAR_ENC_HW_ID_LIST := 1010000004540000_NETGEAR + NETGEAR_ENC_MODEL_LIST := EAX12;EAX11v2;EAX15v2 + IMAGE_SIZE := 57344k + KERNEL_LOADADDR := 0x82000000 + KERNEL := kernel-bin | relocate-kernel 0x80001000 | lzma | \ + fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb | \ + append-squashfs4-fakeroot + IMAGES += factory.img + IMAGE/factory.img := append-kernel | pad-to $$(KERNEL_SIZE) | \ + append-ubi | check-size | netgear-encrypted-factory +endef +TARGET_DEVICES += netgear_eax12 + define Device/netgear_ex6150 $(Device/dsa-migration) $(Device/uimage-lzma-loader) @@ -2446,6 +2503,24 @@ define Device/wevo_w2914ns-v2 endef TARGET_DEVICES += wevo_w2914ns-v2 +define Device/wifire_s1500-nbn + $(Device/sercomm_s1500) + DEVICE_VENDOR := WiFire + DEVICE_MODEL := S1500.NBN + DEVICE_ALT0_VENDOR := Sercomm + DEVICE_ALT0_MODEL := S1500 BUC + IMAGE_SIZE := 51200k + IMAGE/factory.img := append-kernel | sercomm-kernel-factory | \ + sercomm-reset-slot1-chksum | append-ubi | check-size | \ + sercomm-factory-cqr | sercomm-fix-buc-pid | sercomm-mkhash | \ + sercomm-crypto + SERCOMM_HWID := BUC + SERCOMM_HWVER := 10000 + SERCOMM_ROOTFS2_OFFSET := 0x4d00000 + SERCOMM_SWVER := 2015 +endef +TARGET_DEVICES += wifire_s1500-nbn + define Device/winstars_ws-wn583a6 $(Device/dsa-migration) $(Device/uimage-lzma-loader) diff --git a/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds b/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds index f4d3f0cd99..70633e94e5 100644 --- a/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds +++ b/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds @@ -40,6 +40,14 @@ etisalat,s3|\ rostelecom,rt-sf-1) ucidef_set_led_netdev "wan" "wan" "blue:wan" "wan" ;; +beeline,smartbox-pro|\ +wifire,s1500-nbn) + ucidef_set_led_netdev "lan1" "lan1" "green:lan1" "lan1" "link tx rx" + ucidef_set_led_netdev "lan2" "lan2" "green:lan2" "lan2" "link tx rx" + ucidef_set_led_netdev "lan3" "lan3" "green:lan3" "lan3" "link tx rx" + ucidef_set_led_netdev "lan4" "lan4" "green:lan4" "lan4" "link tx rx" + ucidef_set_led_netdev "wan" "wan" "green:wan" "wan" "link tx rx" + ;; belkin,rt1800) ucidef_set_led_netdev "wan" "wan" "white:wan" "wan" ;; @@ -138,6 +146,10 @@ mikrotik,routerboard-m11g) mtc,wr1201) ucidef_set_led_netdev "eth_link" "LAN link" "green:eth_link" "br-lan" ;; +netgear,eax12) + ucidef_set_led_netdev "eth_act" "LAN act" "yellow:eth" "lan" "tx rx" + ucidef_set_led_netdev "eth_link" "LAN link" "green:eth" "lan" "link" + ;; netgear,r6220|\ netgear,r6260|\ netgear,r6350|\ diff --git a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network index 0b45d562be..28264b69ca 100644 --- a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network +++ b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network @@ -20,6 +20,7 @@ ramips_setup_interfaces() linksys,re7000|\ mikrotik,ltap-2hnd|\ mikrotik,routerboard-m11g|\ + netgear,eax12|\ netgear,ex6150|\ sercomm,na502|\ sercomm,na502s|\ @@ -144,6 +145,9 @@ ramips_setup_interfaces() ucidef_set_interface_lan "lan1 lan2 lan3 lan4" ucidef_set_interface "qtn" ifname "eth1" protocol "static" ipaddr "1.1.1.1" netmask "255.255.255.0" ;; + comfast,cf-e390ax) + ucidef_set_interfaces_lan_wan "lan" "wan" + ;; *) ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" "wan" ;; @@ -187,6 +191,11 @@ ramips_setup_macs() lan_mac=$wan_mac label_mac=$wan_mac ;; + comfast,cf-e390ax) + lan_mac=$(cat /sys/class/net/eth0/address) + label_mac=$lan_mac + wan_mac=$(macaddr_add "$lan_mac" 1) + ;; dlink,dir-860l-b1) lan_mac=$(mtd_get_mac_ascii factory lanmac) wan_mac=$(mtd_get_mac_ascii factory wanmac) @@ -277,6 +286,10 @@ ramips_setup_macs() label_mac=$wan_mac lan_mac=$(macaddr_add "$wan_mac" 2) ;; + netgear,eax12) + lan_mac=$(mtd_get_mac_ascii Config mac) + label_mac=$lan_mac + ;; netgear,wax202) lan_mac=$(mtd_get_mac_ascii Config mac) wan_mac=$(macaddr_add "$lan_mac" 1) diff --git a/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac b/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac index 80c7273543..351aa396e9 100644 --- a/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac +++ b/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac @@ -27,6 +27,10 @@ case "$board" in hw_mac_addr=$(macaddr_unsetbit $hw_mac_addr 28) [ "$PHYNBR" = "1" ] && macaddr_setbit_la $hw_mac_addr > /sys${DEVPATH}/macaddress ;; + comfast,cf-e390ax) + [ "$PHYNBR" = "0" ] && echo -n "$(mtd_get_mac_binary factory 0x0004)" > /sys${DEVPATH}/macaddress + [ "$PHYNBR" = "1" ] && echo -n "$(mtd_get_mac_binary factory 0x8004)" > /sys${DEVPATH}/macaddress + ;; cudy,x6-v1|\ cudy,x6-v2) hw_mac_addr="$(mtd_get_mac_binary bdinfo 0xde00)" @@ -118,6 +122,11 @@ case "$board" in [ "$PHYNBR" = "0" ] && macaddr_add $hw_mac_addr 1 > /sys${DEVPATH}/macaddress [ "$PHYNBR" = "1" ] && macaddr_add $hw_mac_addr 2 > /sys${DEVPATH}/macaddress ;; + netgear,eax12) + hw_mac_addr=$(mtd_get_mac_ascii Config mac) + [ "$PHYNBR" = "0" ] && macaddr_add $hw_mac_addr 1 > /sys${DEVPATH}/macaddress + [ "$PHYNBR" = "1" ] && macaddr_add $hw_mac_addr 2 > /sys${DEVPATH}/macaddress + ;; netgear,wax202) hw_mac_addr=$(mtd_get_mac_ascii Config mac) [ "$PHYNBR" = "0" ] && macaddr_add $hw_mac_addr 2 > /sys${DEVPATH}/macaddress diff --git a/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh b/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh index 4fcfdc5460..ed338635ab 100755 --- a/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh +++ b/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh @@ -59,6 +59,7 @@ platform_do_upgrade() { asus,rt-ax54|\ beeline,smartbox-flash|\ beeline,smartbox-giga|\ + beeline,smartbox-pro|\ beeline,smartbox-turbo|\ beeline,smartbox-turbo-plus|\ belkin,rt1800|\ @@ -88,6 +89,7 @@ platform_do_upgrade() { linksys,ea8100-v1|\ linksys,ea8100-v2|\ mts,wg430223|\ + netgear,eax12|\ netgear,r6220|\ netgear,r6260|\ netgear,r6350|\ @@ -107,6 +109,7 @@ platform_do_upgrade() { sercomm,na502s|\ sim,simax1800t|\ tplink,ec330-g5u-v1|\ + wifire,s1500-nbn|\ xiaomi,mi-router-3g|\ xiaomi,mi-router-3-pro|\ xiaomi,mi-router-4|\ diff --git a/target/linux/ramips/mt7621/config-5.15 b/target/linux/ramips/mt7621/config-5.15 index 1b4330c2d1..b366dac723 100644 --- a/target/linux/ramips/mt7621/config-5.15 +++ b/target/linux/ramips/mt7621/config-5.15 @@ -3,7 +3,6 @@ CONFIG_ARCH_HIBERNATION_POSSIBLE=y CONFIG_ARCH_KEEP_MEMBLOCK=y CONFIG_ARCH_MMAP_RND_BITS_MAX=15 CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MAX=15 -CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED=y CONFIG_ARCH_SUSPEND_POSSIBLE=y CONFIG_AT803X_PHY=y CONFIG_BLK_MQ_PCI=y @@ -24,8 +23,6 @@ CONFIG_CPU_HAS_DIEI=y CONFIG_CPU_HAS_PREFETCH=y CONFIG_CPU_HAS_RIXI=y CONFIG_CPU_HAS_SYNC=y -CONFIG_CPU_IDLE=y -CONFIG_CPU_IDLE_GOV_TEO=y CONFIG_CPU_LITTLE_ENDIAN=y CONFIG_CPU_MIPS32=y # CONFIG_CPU_MIPS32_R1 is not set @@ -34,7 +31,6 @@ CONFIG_CPU_MIPSR2=y CONFIG_CPU_MIPSR2_IRQ_EI=y CONFIG_CPU_MIPSR2_IRQ_VI=y CONFIG_CPU_NEEDS_NO_SMARTMIPS_OR_MICROMIPS=y -CONFIG_CPU_PM=y CONFIG_CPU_R4K_CACHE_TLB=y CONFIG_CPU_RMAP=y CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y @@ -62,7 +58,6 @@ CONFIG_FWNODE_MDIO=y CONFIG_FW_LOADER_PAGED_BUF=y CONFIG_GENERIC_ATOMIC64=y CONFIG_GENERIC_CLOCKEVENTS=y -CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y CONFIG_GENERIC_CMOS_UPDATE=y CONFIG_GENERIC_CPU_AUTOPROBE=y CONFIG_GENERIC_FIND_FIRST_BIT=y @@ -136,9 +131,7 @@ CONFIG_MIPS_CM=y CONFIG_MIPS_CMDLINE_FROM_DTB=y CONFIG_MIPS_CPC=y CONFIG_MIPS_CPS=y -CONFIG_MIPS_CPS_CPUIDLE=y # CONFIG_MIPS_CPS_NS16550_BOOL is not set -CONFIG_MIPS_CPS_PM=y CONFIG_MIPS_CPU_SCACHE=y CONFIG_MIPS_EBPF_JIT=y CONFIG_MIPS_GIC=y @@ -206,12 +199,15 @@ CONFIG_OF_IRQ=y CONFIG_OF_KOBJ=y CONFIG_OF_MDIO=y CONFIG_PADATA=y +CONFIG_PAGE_POOL=y +CONFIG_PAGE_POOL_STATS=y CONFIG_PCI=y CONFIG_PCIE_MT7621=y CONFIG_PCI_DISABLE_COMMON_QUIRKS=y CONFIG_PCI_DOMAINS=y CONFIG_PCI_DOMAINS_GENERIC=y CONFIG_PCI_DRIVERS_GENERIC=y +CONFIG_PCS_MTK_LYNXI=y CONFIG_PERF_USE_VMALLOC=y CONFIG_PGTABLE_LEVELS=2 CONFIG_PHYLIB=y