diff --git a/config/Config-build.in b/config/Config-build.in index a67f719dc7..848b42dcc8 100644 --- a/config/Config-build.in +++ b/config/Config-build.in @@ -426,7 +426,7 @@ menu "Global build settings" config USE_SECCOMP bool "Enable SECCOMP" select KERNEL_SECCOMP - depends on (aarch64 || arm || armeb || mips || mipsel || mips64 || mips64el || i386 || powerpc || x86_64) + depends on (aarch64 || arm || armeb || mips || mipsel || mips64 || mips64el || i386 || loongarch64 || powerpc || x86_64) depends on !TARGET_uml default y help diff --git a/config/Config-kernel.in b/config/Config-kernel.in index 52db117cbd..f09c295ee6 100644 --- a/config/Config-kernel.in +++ b/config/Config-kernel.in @@ -1257,6 +1257,13 @@ config KERNEL_MPTCP_IPV6 default KERNEL_MPTCP endif +config KERNEL_NF_CONNTRACK_TIMEOUT + bool "Per-connection connection tracking timeout" + default y if !SMALL_FLASH + help + Select this option to enable support for per-connection conntrack timeouts. + Increases the (uncompressed) size of nf_conntrack.ko by ~8kB. + # # NFS related symbols # diff --git a/package/boot/uboot-envtools/files/ath79 b/package/boot/uboot-envtools/files/ath79 index c6d23ce73d..c989e61bd5 100644 --- a/package/boot/uboot-envtools/files/ath79 +++ b/package/boot/uboot-envtools/files/ath79 @@ -28,6 +28,7 @@ asus,rt-ac59u-v2|\ asus,zenwifi-cd6n|\ asus,zenwifi-cd6r|\ buffalo,bhr-4grv2|\ +buffalo,wzr-450hp2|\ devolo,magic-2-wifi|\ engenius,eap300-v2|\ engenius,eap350-v1|\ diff --git a/package/boot/uboot-envtools/files/mediatek_filogic b/package/boot/uboot-envtools/files/mediatek_filogic index 76448840b6..bff42bfba2 100644 --- a/package/boot/uboot-envtools/files/mediatek_filogic +++ b/package/boot/uboot-envtools/files/mediatek_filogic @@ -102,7 +102,8 @@ zbtlink,zbt-z8103ax) comfast,cf-e393ax) ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x80000" ;; -dlink,aquila-pro-ai-m30-a1) +dlink,aquila-pro-ai-m30-a1|\ +dlink,aquila-pro-ai-m60-a1) ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x40000" "0x40000" ;; gatonetworks,gdsp) diff --git a/package/boot/uboot-rockchip/patches/110-rockchip-board-Increase-rng-seed-size-to-make-it-sufficie.patch b/package/boot/uboot-rockchip/patches/001-rockchip-board-Increase-rng-seed-size-to-make-it-sufficie.patch similarity index 67% rename from package/boot/uboot-rockchip/patches/110-rockchip-board-Increase-rng-seed-size-to-make-it-sufficie.patch rename to package/boot/uboot-rockchip/patches/001-rockchip-board-Increase-rng-seed-size-to-make-it-sufficie.patch index d8042215a9..0b7bf1be7d 100644 --- a/package/boot/uboot-rockchip/patches/110-rockchip-board-Increase-rng-seed-size-to-make-it-sufficie.patch +++ b/package/boot/uboot-rockchip/patches/001-rockchip-board-Increase-rng-seed-size-to-make-it-sufficie.patch @@ -1,29 +1,8 @@ +From ed4ae7386257aa66455e330234e513d098a36f84 Mon Sep 17 00:00:00 2001 From: Alex Shumsky -To: u-boot@lists.denx.de -Cc: Alex Shumsky , - Dragan Simic , Marek Vasut , - Ben Wolsieffer , - Caleb Connolly , - Chris Morgan , - Devarsh Thakkar , - Jagan Teki , - Janne Grunau , - Jerome Forissier , - Jiaxun Yang , - Jonas Karlman , - Joshua Watt , - Kever Yang , - Mattijs Korpershoek , - Neal Gompa , - Philipp Tomsich , - Philipp Tomsich , - Quentin Schulz , - Rasmus Villemoes , - Simon Glass , Stefan Roese , - Tim Harvey , Tom Rini -Subject: [PATCH v6] rockchip: board: Increase rng-seed size to make it sufficient for modern Linux -Date: Wed, 16 Oct 2024 13:02:03 +0300 [thread overview] -Message-ID: <20241016100203.629713-1-alexthreed@gmail.com> (raw) +Date: Wed, 16 Oct 2024 13:02:03 +0300 +Subject: [PATCH] rockchip: board: Increase rng-seed size to make it sufficient + for modern Linux Increase rng-seed size to make Linux happy and initialize rng pool instantly. Linux 5.19+ requires 32 bytes of entropy to initialize random pool, but u-boot @@ -46,27 +25,9 @@ Signed-off-by: Alex Shumsky Fixes: d2048bafae40 ("rockchip: board: Add board_rng_seed() for all Rockchip devices") Reviewed-by: Dragan Simic Reviewed-by: Marek Vasut +Reviewed-by: Quentin Schulz +Reviewed-by: Kever Yang --- - -Changes in v6: -- fix wording in docs and debug message - -Changes in v5: -- add docs - -Changes in v4: -- fix typos and code style - -Changes in v3: -- reword warning -- increase default rng_seed_size to support older linux as well -- reword commit message - -Changes in v2: -- add env config knob rng_seed_size -- add warning for small rng_seed_size -- 12-character commit SHA in Fixes - arch/arm/mach-rockchip/board.c | 11 ++++++++++- common/Kconfig | 3 +++ doc/usage/environment.rst | 5 +++++ diff --git a/package/boot/uboot-rockchip/patches/002-scripts-dtc-pylibfdt-libfdt-i_shipped-Use-SWIG_AppendOutp.patch b/package/boot/uboot-rockchip/patches/002-scripts-dtc-pylibfdt-libfdt-i_shipped-Use-SWIG_AppendOutp.patch new file mode 100644 index 0000000000..f5beca8d77 --- /dev/null +++ b/package/boot/uboot-rockchip/patches/002-scripts-dtc-pylibfdt-libfdt-i_shipped-Use-SWIG_AppendOutp.patch @@ -0,0 +1,55 @@ +From a63456b9191fae2fe49f4b121e025792022e3950 Mon Sep 17 00:00:00 2001 +From: Markus Volk +Date: Wed, 30 Oct 2024 06:07:16 +0100 +Subject: [PATCH] scripts/dtc/pylibfdt/libfdt.i_shipped: Use SWIG_AppendOutput +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Swig has changed language specific AppendOutput functions. The helper +macro SWIG_AppendOutput remains unchanged. Use that instead +of SWIG_Python_AppendOutput, which would require an extra parameter +since swig 4.3.0. + +/home/flk/poky/build-test/tmp/work/qemux86_64-poky-linux/u-boot/2024.10/git/arch/x86/cpu/u-boot-64.lds +| scripts/dtc/pylibfdt/libfdt_wrap.c: In function ‘_wrap_fdt_next_node’: +| scripts/dtc/pylibfdt/libfdt_wrap.c:5581:17: error: too few arguments to function ‘SWIG_Python_AppendOutput’ +| 5581 | resultobj = SWIG_Python_AppendOutput(resultobj, val); +| | ^~~~~~~~~~~~~~~~~~~~~~~~ + +Signed-off-by: Markus Volk +Reported-by: Rudi Heitbaum +Link: https://github.com/dgibson/dtc/pull/154 +--- + scripts/dtc/pylibfdt/libfdt.i_shipped | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +--- a/scripts/dtc/pylibfdt/libfdt.i_shipped ++++ b/scripts/dtc/pylibfdt/libfdt.i_shipped +@@ -1037,7 +1037,7 @@ typedef uint32_t fdt32_t; + fdt_string(fdt1, fdt32_to_cpu($1->nameoff))); + buff = PyByteArray_FromStringAndSize( + (const char *)($1 + 1), fdt32_to_cpu($1->len)); +- resultobj = SWIG_Python_AppendOutput(resultobj, buff); ++ resultobj = SWIG_AppendOutput(resultobj, buff); + } + } + +@@ -1076,7 +1076,7 @@ typedef uint32_t fdt32_t; + + %typemap(argout) int *depth { + PyObject *val = Py_BuildValue("i", *arg$argnum); +- resultobj = SWIG_Python_AppendOutput(resultobj, val); ++ resultobj = SWIG_AppendOutput(resultobj, val); + } + + %apply int *depth { int *depth }; +@@ -1092,7 +1092,7 @@ typedef uint32_t fdt32_t; + if (PyTuple_GET_SIZE(resultobj) == 0) + resultobj = val; + else +- resultobj = SWIG_Python_AppendOutput(resultobj, val); ++ resultobj = SWIG_AppendOutput(resultobj, val); + } + } + diff --git a/package/kernel/leds-gca230718/src/leds-gca230718.c b/package/kernel/leds-gca230718/src/leds-gca230718.c index 194d149970..4cfa205203 100644 --- a/package/kernel/leds-gca230718/src/leds-gca230718.c +++ b/package/kernel/leds-gca230718/src/leds-gca230718.c @@ -17,40 +17,30 @@ #include #include -#define GCA230718_MAX_LEDS (4u) +#define GCA230718_MAX_LEDS (4u) -#define GCA230718_OPMODE_DISABLED (0x00u) -#define GCA230718_OPMODE_NO_TOGGLE (0x01u) -#define GCA230718_OPMODE_TOGGLE_RAMP_CONTROL_DISABLED (0x02u) -#define GCA230718_OPMODE_TOGGLE_RAMP_CONTROL_ENSABLED (0x03u) +#define GCA230718_OPMODE_DISABLED (0x00u) +#define GCA230718_OPMODE_NO_TOGGLE (0x01u) +#define GCA230718_OPMODE_TOGGLE_RAMP_CONTROL_DISABLED (0x02u) +#define GCA230718_OPMODE_TOGGLE_RAMP_CONTROL_ENSABLED (0x03u) -#define GCA230718_1ST_SEQUENCE_BYTE_1 (0x02u) -#define GCA230718_2ND_SEQUENCE_BYTE_1 (0x01u) -#define GCA230718_3RD_SEQUENCE_BYTE_1 (0x03u) +#define GCA230718_1ST_SEQUENCE_BYTE_1 (0x02u) +#define GCA230718_2ND_SEQUENCE_BYTE_1 (0x01u) +#define GCA230718_3RD_SEQUENCE_BYTE_1 (0x03u) -struct gca230718_led -{ +struct gca230718_led { enum led_brightness brightness; struct i2c_client *client; struct led_classdev ledClassDev; }; -struct gca230718_private -{ +struct gca230718_private { struct mutex lock; struct gca230718_led leds[GCA230718_MAX_LEDS]; }; -static void gca230718_init_private_led_data(struct gca230718_private* data) -{ - u8 ledIndex; - for (ledIndex = 0; ledIndex < GCA230718_MAX_LEDS; ledIndex++) - { - data->leds[ledIndex].client = NULL; - } -} - -static void gca230718_send_sequence(struct i2c_client *client, u8 byte0, struct gca230718_private* gca230718_privateData) +static void gca230718_send_sequence(struct i2c_client *client, u8 byte0, + struct gca230718_private *priv) { int status = 0; u8 ledIndex; @@ -64,142 +54,119 @@ static void gca230718_send_sequence(struct i2c_client *client, u8 byte0, struct controlCommand[1] = byte0; controlCommand[2] = GCA230718_OPMODE_NO_TOGGLE; /* Byte 3-6 are set below to the brighness value of the individual LEDs */ - controlCommand[7] = 0x01; /* Frequency, doesn't care as long as GCA230718_OPMODE_NO_TOGGLE is used above */ + controlCommand[7] = + 0x01; /* Frequency, doesn't care as long as GCA230718_OPMODE_NO_TOGGLE is used above */ /* Byte 8-11 are set below to the brighness value of the individual LEDs */ controlCommand[12] = 0x87; - for (ledIndex = 0; ledIndex < GCA230718_MAX_LEDS; ledIndex++) - { - controlCommand[3 + ledIndex] = gca230718_privateData->leds[ledIndex].brightness; - controlCommand[8 + ledIndex] = gca230718_privateData->leds[ledIndex].brightness; + for (ledIndex = 0; ledIndex < GCA230718_MAX_LEDS; ledIndex++) { + controlCommand[3 + ledIndex] = priv->leds[ledIndex].brightness; + controlCommand[8 + ledIndex] = priv->leds[ledIndex].brightness; } - mutex_lock(&(gca230718_privateData->lock)); + mutex_lock(&(priv->lock)); - if ((status = i2c_smbus_write_i2c_block_data(client, resetCommandRegister, sizeof(resetCommand), resetCommand)) != 0) - { - pr_info("Error %i during call of i2c_smbus_write_i2c_block_data for reset command\n", status); - } - else if ((status = i2c_smbus_write_i2c_block_data(client, controlCommandRegister, sizeof(controlCommand), controlCommand)) != 0) - { - pr_info("Error %i during call of i2c_smbus_write_i2c_block_data for control command\n", status); + if ((status = i2c_smbus_write_i2c_block_data( + client, resetCommandRegister, sizeof(resetCommand), + resetCommand)) != 0) { + pr_info("Error %i during call of i2c_smbus_write_i2c_block_data for reset command\n", + status); + } else if ((status = i2c_smbus_write_i2c_block_data( + client, controlCommandRegister, + sizeof(controlCommand), controlCommand)) != 0) { + pr_info("Error %i during call of i2c_smbus_write_i2c_block_data for control command\n", + status); } - mutex_unlock(&(gca230718_privateData->lock)); + mutex_unlock(&(priv->lock)); } -static int gca230718_set_brightness(struct led_classdev *led_cdev, enum led_brightness value) +static int gca230718_set_brightness(struct led_classdev *led_cdev, + enum led_brightness value) { - struct gca230718_led* led; - struct i2c_client* client; + struct gca230718_led *led; + struct i2c_client *client; led = container_of(led_cdev, struct gca230718_led, ledClassDev); client = led->client; - if (client != NULL) - { - struct gca230718_private* gca230718_privateData; + if (client) { + struct gca230718_private *priv; led->brightness = value; - gca230718_privateData = i2c_get_clientdata(client); + priv = i2c_get_clientdata(client); - gca230718_send_sequence(client, GCA230718_2ND_SEQUENCE_BYTE_1, gca230718_privateData); + gca230718_send_sequence(client, GCA230718_2ND_SEQUENCE_BYTE_1, + priv); } return 0; } -#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,3,0) static int gca230718_probe(struct i2c_client *client) -#else -static int gca230718_probe(struct i2c_client *client, const struct i2c_device_id *id) -#endif { - int status = 0; - struct gca230718_private* gca230718_privateData; + struct gca230718_private *priv; + int err; pr_info("Enter gca230718_probe for device address %u\n", client->addr); - gca230718_privateData = devm_kzalloc(&(client->dev), sizeof(struct gca230718_private), GFP_KERNEL); - - if (gca230718_privateData == NULL) - { + priv = devm_kzalloc(&client->dev, sizeof(struct gca230718_private), + GFP_KERNEL); + if (!priv) { pr_info("Error during allocating memory for private data\n"); - status = -ENOMEM; + return -ENOMEM; } - else - { - struct device_node* ledNode; - mutex_init(&gca230718_privateData->lock); - gca230718_init_private_led_data(gca230718_privateData); - i2c_set_clientdata(client, gca230718_privateData); - for_each_child_of_node(client->dev.of_node, ledNode) - { - u32 regValue = 0; - if (of_property_read_u32(ledNode, "reg", ®Value) != 0) - { - pr_info("Missing entry \"reg\" in node %s\n", ledNode->name); - } - else if (regValue >= GCA230718_MAX_LEDS) - { - pr_info("Invalid entry \"reg\" in node %s (%u)\n", ledNode->name, regValue); - } - else - { - struct led_classdev* ledClassDev = &(gca230718_privateData->leds[regValue].ledClassDev); - struct led_init_data init_data = {}; + err = devm_mutex_init(&client->dev, &priv->lock); + if (err) + return err; - gca230718_privateData->leds[regValue].client = client; - init_data.fwnode = of_fwnode_handle(ledNode); + i2c_set_clientdata(client, priv); - pr_info("Creating LED for node %s: reg=%u\n", ledNode->name, regValue); + struct device_node *ledNode; + for_each_child_of_node(client->dev.of_node, ledNode) { + u32 regValue = 0; + if (of_property_read_u32(ledNode, "reg", ®Value)) + pr_info("Missing entry \"reg\" in node %s\n", + ledNode->name); + else if (regValue >= GCA230718_MAX_LEDS) + pr_info("Invalid entry \"reg\" in node %s (%u)\n", + ledNode->name, regValue); + else { + struct led_classdev *ledClassDev = + &(priv->leds[regValue].ledClassDev); + struct led_init_data init_data = {}; - ledClassDev->name = of_get_property(ledNode, "label", NULL); - if (ledClassDev->name == NULL) - { - ledClassDev->name = ledNode->name; - } + priv->leds[regValue].client = client; + init_data.fwnode = of_fwnode_handle(ledNode); - ledClassDev->brightness = LED_OFF; - ledClassDev->max_brightness = LED_FULL; - ledClassDev->brightness_set_blocking = gca230718_set_brightness; - - if (devm_led_classdev_register_ext(&(client->dev), ledClassDev, &init_data) != 0) - { - pr_info("Error during call of devm_led_classdev_register_ext"); - } - } + pr_info("Creating LED for node %s: reg=%u\n", + ledNode->name, regValue); + + ledClassDev->name = + of_get_property(ledNode, "label", NULL); + if (!ledClassDev->name) + ledClassDev->name = ledNode->name; + + ledClassDev->brightness = LED_OFF; + ledClassDev->max_brightness = LED_FULL; + ledClassDev->brightness_set_blocking = + gca230718_set_brightness; + + if (devm_led_classdev_register_ext( + &client->dev, ledClassDev, &init_data)) + pr_info("Error during call of devm_led_classdev_register_ext"); } } - if (status == 0) - { - /* - Send full initialization sequence. - Afterwards only GCA230718_2ND_SEQUENCE_BYTE_1 must be send to upddate the brightness values. - */ - gca230718_send_sequence(client, GCA230718_1ST_SEQUENCE_BYTE_1, gca230718_privateData); - gca230718_send_sequence(client, GCA230718_2ND_SEQUENCE_BYTE_1, gca230718_privateData); - gca230718_send_sequence(client, GCA230718_3RD_SEQUENCE_BYTE_1, gca230718_privateData); - } + /* + Send full initialization sequence. + Afterwards only GCA230718_2ND_SEQUENCE_BYTE_1 must be send to upddate the brightness values. + */ + gca230718_send_sequence(client, GCA230718_1ST_SEQUENCE_BYTE_1, priv); + gca230718_send_sequence(client, GCA230718_2ND_SEQUENCE_BYTE_1, priv); + gca230718_send_sequence(client, GCA230718_3RD_SEQUENCE_BYTE_1, priv); - return status; -} - -#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,18,0) -static void gca230718_remove(struct i2c_client *client) -#else -static int gca230718_remove(struct i2c_client *client) -#endif -{ - struct gca230718_private* gca230718_privateData; - gca230718_privateData = i2c_get_clientdata(client); - mutex_destroy(&gca230718_privateData->lock); - gca230718_init_private_led_data(gca230718_privateData); - -#if LINUX_VERSION_CODE < KERNEL_VERSION(5,18,0) return 0; -#endif } static const struct i2c_device_id gca230718_i2c_ids[] = { @@ -216,7 +183,6 @@ MODULE_DEVICE_TABLE(of, gca230718_dt_ids); static struct i2c_driver gca230718_driver = { .probe = gca230718_probe, - .remove = gca230718_remove, .id_table = gca230718_i2c_ids, .driver = { .name = KBUILD_MODNAME, diff --git a/package/kernel/linux/modules/netfilter.mk b/package/kernel/linux/modules/netfilter.mk index cf66bd8cd8..30ff35ca6b 100644 --- a/package/kernel/linux/modules/netfilter.mk +++ b/package/kernel/linux/modules/netfilter.mk @@ -1048,6 +1048,40 @@ endef $(eval $(call KernelPackage,nfnetlink-queue)) +define KernelPackage/nfnetlink-cthelper + TITLE:=Netfilter User space conntrack helpers + FILES:=$(LINUX_DIR)/net/netfilter/nfnetlink_cthelper.ko + KCONFIG:=CONFIG_NF_CT_NETLINK_HELPER + AUTOLOAD:=$(call AutoProbe,nfnetlink_cthelper) + $(call AddDepends/nfnetlink,+kmod-nfnetlink-queue +kmod-nf-conntrack-netlink) +endef + +define KernelPackage/nfnetlink-cthelper/description + Kernel modules support for a netlink-based connection tracking + userspace helpers interface +endef + +$(eval $(call KernelPackage,nfnetlink-cthelper)) + + +define KernelPackage/nfnetlink-cttimeout + TITLE:=Netfilter conntrack expectation timeout + FILES:=$(LINUX_DIR)/net/netfilter/nfnetlink_cttimeout.ko + KCONFIG:=CONFIG_NF_CT_NETLINK_TIMEOUT + AUTOLOAD:=$(call AutoProbe,nfnetlink_cttimeout) + $(call AddDepends/nfnetlink,+kmod-nf-conntrack +kmod-nf-conntrack-timeout @KERNEL_NF_CONNTRACK_TIMEOUT) +endef + +define KernelPackage/nfnetlink-cttimeout/description + Kernel modules support for a netlink-based connection tracking + userspace timeout interface + + Requires CONFIG_NF_CONNTRACK_TIMEOUT (only enabled for non-small flash devices) +endef + +$(eval $(call KernelPackage,nfnetlink-cttimeout)) + + define KernelPackage/nf-conntrack-netlink TITLE:=Connection tracking netlink interface FILES:=$(LINUX_DIR)/net/netfilter/nf_conntrack_netlink.ko diff --git a/package/libs/mbedtls/Config.in b/package/libs/mbedtls/Config.in index b09f6eae49..0aa61d08ae 100644 --- a/package/libs/mbedtls/Config.in +++ b/package/libs/mbedtls/Config.in @@ -8,6 +8,10 @@ config MBEDTLS_AES_C bool "MBEDTLS_AES_C" default y +config MBEDTLS_ARIA_C + bool "MBEDTLS_ARIA_C" + default n + config MBEDTLS_CAMELLIA_C bool "MBEDTLS_CAMELLIA_C" default n diff --git a/package/libs/mbedtls/Makefile b/package/libs/mbedtls/Makefile index 4649505e7c..8fea3a04a7 100644 --- a/package/libs/mbedtls/Makefile +++ b/package/libs/mbedtls/Makefile @@ -37,6 +37,7 @@ MBEDTLS_BUILD_OPTS_CURVES= \ MBEDTLS_BUILD_OPTS_CIPHERS= \ CONFIG_MBEDTLS_AES_C \ + CONFIG_MBEDTLS_ARIA_C \ CONFIG_MBEDTLS_CAMELLIA_C \ CONFIG_MBEDTLS_CCM_C \ CONFIG_MBEDTLS_CMAC_C \ diff --git a/package/system/procd/Makefile b/package/system/procd/Makefile index 7a2276a46d..65cc0ad9f6 100644 --- a/package/system/procd/Makefile +++ b/package/system/procd/Makefile @@ -12,9 +12,9 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/procd.git -PKG_MIRROR_HASH:=99139ce325d73f5b250d115703540acfac3bcdc8ee202f2d3aacf3083042bc70 -PKG_SOURCE_DATE:=2024-12-17 -PKG_SOURCE_VERSION:=fd01fb852302a2683d09ee1c2193d7c51e2b0ba8 +PKG_MIRROR_HASH:=41dbb5352eff931ecc78c4ce9a081645c26a7fb8dc57cdd6521a2f8d3a142567 +PKG_SOURCE_DATE:=2024-12-22 +PKG_SOURCE_VERSION:=42d3937654508b04da64969f9d764ac2ec411904 CMAKE_INSTALL:=1 PKG_LICENSE:=GPL-2.0 diff --git a/target/linux/ath79/dts/ar7241_netgear_wnr2200-16m.dts b/target/linux/ath79/dts/ar7241_netgear_wnr2200-16m.dts index aa734966d5..9576666486 100644 --- a/target/linux/ath79/dts/ar7241_netgear_wnr2200-16m.dts +++ b/target/linux/ath79/dts/ar7241_netgear_wnr2200-16m.dts @@ -50,6 +50,10 @@ macaddr_art_6: macaddr@6 { reg = <0x6 0x6>; }; + + cal_art_1000: calibration@1000 { + reg = <0x1000 0x3d8>; + }; }; }; }; @@ -65,6 +69,6 @@ }; &ath9k { - nvmem-cells = <&macaddr_art_0 1>; - nvmem-cell-names = "mac-address"; + nvmem-cells = <&macaddr_art_0 1>, <&cal_art_1000>; + nvmem-cell-names = "mac-address", "calibration"; }; diff --git a/target/linux/ath79/dts/ar7241_netgear_wnr2200-8m.dts b/target/linux/ath79/dts/ar7241_netgear_wnr2200-8m.dts index 27c31c3c12..62ee49e9d0 100644 --- a/target/linux/ath79/dts/ar7241_netgear_wnr2200-8m.dts +++ b/target/linux/ath79/dts/ar7241_netgear_wnr2200-8m.dts @@ -50,6 +50,10 @@ macaddr_art_6: macaddr@6 { reg = <0x6 0x6>; }; + + cal_art_1000: calibration@1000 { + reg = <0x1000 0x3d8>; + }; }; }; }; @@ -65,6 +69,6 @@ }; &ath9k { - nvmem-cells = <&macaddr_art_0 1>; - nvmem-cell-names = "mac-address"; + nvmem-cells = <&macaddr_art_0 1>, <&cal_art_1000>; + nvmem-cell-names = "mac-address", "calibration"; }; diff --git a/target/linux/ath79/dts/ar7241_netgear_wnr2200.dtsi b/target/linux/ath79/dts/ar7241_netgear_wnr2200.dtsi index 2c1dd064fe..8dcb8f852c 100644 --- a/target/linux/ath79/dts/ar7241_netgear_wnr2200.dtsi +++ b/target/linux/ath79/dts/ar7241_netgear_wnr2200.dtsi @@ -173,7 +173,6 @@ ath9k: wifi@0,0 { compatible = "pci168c,002e"; reg = <0x0000 0 0 0 0>; - qca,no-eeprom; #gpio-cells = <2>; gpio-controller; diff --git a/target/linux/ath79/dts/ar7241_tplink_tl-wr842n-v1.dts b/target/linux/ath79/dts/ar7241_tplink_tl-wr842n-v1.dts index b0edbf4d06..8369010688 100644 --- a/target/linux/ath79/dts/ar7241_tplink_tl-wr842n-v1.dts +++ b/target/linux/ath79/dts/ar7241_tplink_tl-wr842n-v1.dts @@ -128,6 +128,16 @@ reg = <0x7f0000 0x10000>; label = "art"; read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + cal_art_1000: calibration@1000 { + reg = <0x1000 0x3d8>; + }; + }; }; }; }; @@ -141,9 +151,8 @@ reg = <0x0000 0 0 0 0>; #gpio-cells = <2>; gpio-controller; - qca,no-eeprom; - nvmem-cells = <&macaddr_uboot_1fc00 0>; - nvmem-cell-names = "mac-address"; + nvmem-cells = <&macaddr_uboot_1fc00 0>, <&cal_art_1000>; + nvmem-cell-names = "mac-address", "calibration"; }; }; diff --git a/target/linux/ath79/dts/ar7241_ubnt_unifi-ap.dtsi b/target/linux/ath79/dts/ar7241_ubnt_unifi-ap.dtsi index d9c7336f91..e9abd423f5 100644 --- a/target/linux/ath79/dts/ar7241_ubnt_unifi-ap.dtsi +++ b/target/linux/ath79/dts/ar7241_ubnt_unifi-ap.dtsi @@ -83,7 +83,7 @@ }; calibration_art_1000: calibration@1000 { - reg = <0x1000 0x440>; + reg = <0x1000 0x3d8>; }; }; }; @@ -92,6 +92,7 @@ }; &wifi { + compatible = "pci168c,002e"; nvmem-cells = <&calibration_art_1000>; nvmem-cell-names = "calibration"; }; diff --git a/target/linux/ath79/dts/ar7242_tplink_tl-wr2543-v1.dts b/target/linux/ath79/dts/ar7242_tplink_tl-wr2543-v1.dts index 0124ddff87..744971c6f8 100644 --- a/target/linux/ath79/dts/ar7242_tplink_tl-wr2543-v1.dts +++ b/target/linux/ath79/dts/ar7242_tplink_tl-wr2543-v1.dts @@ -159,6 +159,7 @@ status = "okay"; ath9k: wifi@0,0 { + compatible = "pci168c,0030"; reg = <0x0000 0 0 0 0>; #gpio-cells = <2>; gpio-controller; diff --git a/target/linux/ath79/dts/qca9558_buffalo_wzr-450hp2.dts b/target/linux/ath79/dts/qca9558_buffalo_wzr-450hp2.dts new file mode 100644 index 0000000000..8f19907dfe --- /dev/null +++ b/target/linux/ath79/dts/qca9558_buffalo_wzr-450hp2.dts @@ -0,0 +1,179 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "qca955x.dtsi" + +#include +#include +#include + +/ { + compatible = "buffalo,wzr-450hp2", "qca,qca9558"; + model = "Buffalo WZR-450HP2/WZR-450HP2D"; + + aliases { + led-boot = &led_status_green; + led-failsafe = &led_status_green; + led-running = &led_status_green; + led-upgrade = &led_status_green; + label-mac-device = ð0; + }; + + leds { + compatible = "gpio-leds"; + + led_status_green: status_green { + function = LED_FUNCTION_STATUS; + color = ; + gpios = <&gpio 20 GPIO_ACTIVE_LOW>; + default-state = "on"; + }; + + led_wlan_green: wlan_green { + function = LED_FUNCTION_WLAN; + color = ; + gpios = <&gpio 18 GPIO_ACTIVE_LOW>; + linux,default-trigger = "phy0tpt"; + }; + + led_wps_green: wps_green { + function = LED_FUNCTION_WPS; + color = ; + gpios = <&gpio 3 GPIO_ACTIVE_LOW>; + }; + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "Reset button"; + linux,code = ; + gpios = <&gpio 17 GPIO_ACTIVE_LOW>; + debounce-interval = <60>; + }; + + rfkill { + label = "RFKILL button"; + linux,code = ; + gpios = <&gpio 21 GPIO_ACTIVE_LOW>; + debounce-interval = <60>; + }; + }; +}; + +&spi { + status = "okay"; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <25000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x40000>; + read-only; + }; + + partition@40000 { + reg = <0x40000 0x10000>; + label = "u-boot-env"; + }; + + partition@50000 { + compatible = "denx,uimage"; + reg = <0x50000 0xf90000>; + label = "firmware"; + }; + + partition@fe0000 { + reg = <0xfe0000 0x10000>; + label = "user_property"; + read-only; + }; + + art: partition@ff0000 { + label = "art"; + reg = <0xff0000 0x10000>; + read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_wan: macaddr@0 { + reg = <0x0 0x6>; + }; + + macaddr_lan: macaddr@6 { + reg = <0x6 0x6>; + }; + + cal_ath9k: cal_ath9k@1000 { + reg = <0x1000 0x440>; + }; + }; + }; + }; + }; +}; + +&mdio0 { + status = "okay"; + + phy0: ethernet-phy@0 { + reg = <0>; + + qca,ar8327-initvals = < + 0x04 0x07600000 /* PORT0 PAD MODE CTRL: RGMII, to eth0 */ + 0x0c 0x00080080 /* PORT6 PAD MODE CTRL: SGMII, to eth1 */ + 0x10 0x81000080 /* POWER ON STRAP */ + 0x50 0xcc35cc35 /* LED_CTRL0 */ + 0x54 0xca35ca35 /* LED_CTRL1 */ + 0x58 0xc935c935 /* LED_CTRL2 */ + 0x5c 0x03ffff00 /* LED_CTRL3 */ + 0x7c 0x0000007e /* PORT0_STATUS */ + 0x94 0x0000007e /* PORT6_STATUS */ + >; + }; +}; + +ð0 { + status = "okay"; + + nvmem-cells = <&macaddr_wan>; + nvmem-cell-names = "mac-address"; + phy-handle = <&phy0>; + pll-data = <0x56000000 0x00000101 0x00001616>; + + gmac-config { + device = <&gmac>; + rgmii-enabled = <1>; + }; +}; + +ð1 { + status = "okay"; + + nvmem-cells = <&macaddr_lan>; + nvmem-cell-names = "mac-address"; + pll-data = <0x03000101 0x00000101 0x00001616>; + + fixed-link { + speed = <1000>; + full-duplex; + }; +}; + +&wmac { + status = "okay"; + + nvmem-cells = <&cal_ath9k>; + nvmem-cell-names = "calibration"; +}; 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 ad0365a465..0321a9ac85 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 @@ -213,6 +213,10 @@ ath79_setup_interfaces() ucidef_add_switch "switch0" \ "0@eth1" "1:lan" "2:lan" "3:lan" "4:lan" "5:wan" "6@eth0" ;; + buffalo,wzr-450hp2) + ucidef_add_switch "switch0" \ + "6@eth1" "1:lan" "2:lan" "3:lan" "4:lan" "5:wan" "0@eth0" + ;; buffalo,wzr-600dhp|\ buffalo,wzr-hp-ag300h|\ tplink,archer-c25-v1|\ diff --git a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom index 675522823f..89cb3df6f2 100644 --- a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom +++ b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom @@ -83,11 +83,6 @@ case "$FIRMWARE" in meraki,mr12) caldata_extract "art" 0x11000 0xeb8 ;; - netgear,wnr2200-8m|\ - netgear,wnr2200-16m|\ - tplink,tl-wr842n-v1) - caldata_extract "art" 0x1000 0x3e0 - ;; ubnt,powerbridge-m|\ ubnt,rocket-m) caldata_extract "art" 0x1000 0x1000 diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk index 3e7e75d1f8..c6166a4c28 100644 --- a/target/linux/ath79/image/generic.mk +++ b/target/linux/ath79/image/generic.mk @@ -760,6 +760,18 @@ define Device/buffalo_wzr-hp-g450h endef TARGET_DEVICES += buffalo_wzr-hp-g450h +define Device/buffalo_wzr-450hp2 + $(Device/buffalo_common) + SOC := qca9558 + DEVICE_MODEL := WZR-450HP2 + DEVICE_ALT0_VENDOR := Buffalo + DEVICE_ALT0_MODEL := WZR-450HP2D + BUFFALO_PRODUCT := WZR-450HP2 + IMAGE_SIZE := 15936k + SUPPORTED_DEVICES += wzr-450hp2 +endef +TARGET_DEVICES += buffalo_wzr-450hp2 + define Device/comfast_cf-e110n-v2 SOC := qca9533 DEVICE_VENDOR := COMFAST diff --git a/target/linux/bmips/dts/bcm6328-dlink-dsl-2750b-b1.dts b/target/linux/bmips/dts/bcm6328-dlink-dsl-2750b-b1.dts index e4806c0a9a..970182629d 100644 --- a/target/linux/bmips/dts/bcm6328-dlink-dsl-2750b-b1.dts +++ b/target/linux/bmips/dts/bcm6328-dlink-dsl-2750b-b1.dts @@ -180,7 +180,7 @@ #size-cells = <1>; cal_data_1000: calibration@1000 { - reg = <0x1000 0x440>; + reg = <0x1000 0x3d8>; }; }; }; diff --git a/target/linux/ipq40xx/base-files/etc/board.d/02_network b/target/linux/ipq40xx/base-files/etc/board.d/02_network index e3a6e24228..549e1ac0c9 100644 --- a/target/linux/ipq40xx/base-files/etc/board.d/02_network +++ b/target/linux/ipq40xx/base-files/etc/board.d/02_network @@ -202,6 +202,9 @@ ipq40xx_setup_macs() wan_mac=$(mtd_get_mac_ascii u-boot-env ethaddr) lan_mac=$(macaddr_add "$wan_mac" 1) ;; + extreme-networks,ws-ap3915i) + label_mac="$(mtd_get_mac_ascii CFG1 ethaddr)" + ;; ezviz,cs-w3-wd1200g-eup) label_mac=$(mtd_get_mac_binary "ART" 0x6) ;; diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-wia3300-20.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-wia3300-20.dts index 85ad382223..644329419d 100644 --- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-wia3300-20.dts +++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-wia3300-20.dts @@ -68,6 +68,11 @@ }; }; + output-usb-power { + compatible = "regulator-output"; + vout-supply = <®_usb>; + }; + reg_usb: regulator-usb { compatible = "regulator-fixed"; @@ -414,8 +419,6 @@ &usb2_hs_phy { status = "okay"; - - phy-supply = <®_usb>; }; &watchdog { diff --git a/target/linux/ipq40xx/generic/config-default b/target/linux/ipq40xx/generic/config-default index bd9876a0b6..4999ad3622 100644 --- a/target/linux/ipq40xx/generic/config-default +++ b/target/linux/ipq40xx/generic/config-default @@ -3,4 +3,5 @@ CONFIG_MTD_UBI_BEB_LIMIT=20 CONFIG_MTD_UBI_BLOCK=y CONFIG_MTD_UBI_NVMEM=y CONFIG_MTD_UBI_WL_THRESHOLD=4096 +CONFIG_REGULATOR_USERSPACE_CONSUMER=y CONFIG_UBIFS_FS=y diff --git a/target/linux/ipq40xx/image/generic.mk b/target/linux/ipq40xx/image/generic.mk index d92d0824f9..21841f4bf1 100644 --- a/target/linux/ipq40xx/image/generic.mk +++ b/target/linux/ipq40xx/image/generic.mk @@ -542,7 +542,6 @@ define Device/extreme-networks_ws-ap3915i DEVICE_MODEL := WS-AP3915i IMAGE_SIZE := 30080k SOC := qcom-ipq4029 - BLOCKSIZE := 128k IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | check-size | append-metadata endef TARGET_DEVICES += extreme-networks_ws-ap3915i diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_avm_fritz7312.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_avm_fritz7312.dts index 9ea6c3929c..ba6c487048 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_avm_fritz7312.dts +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_avm_fritz7312.dts @@ -136,6 +136,10 @@ #address-cells = <1>; #size-cells = <1>; + cal_ath9k_cal_985: calibration@985 { + reg = <0x985 0x3d8>; + }; + macaddr_ath9k_cal_a91: macaddr@a91 { compatible = "mac-base"; reg = <0xa91 0x6>; @@ -180,8 +184,9 @@ reset-gpios = <&gpio 21 GPIO_ACTIVE_LOW>; wifi@0,0 { - compatible = "pci0,0"; + compatible = "pci168c,002d"; reg = <0x7000 0 0 0 0>; - qca,no-eeprom; /* load from ath9k-eeprom-pci-0000:00:0e.0.bin */ + nvmem-cells = <&cal_ath9k_cal_985>; + nvmem-cell-names = "calibration"; }; }; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_avm_fritz7320.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_avm_fritz7320.dts index 953a8ccbf7..c09d3879b4 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_avm_fritz7320.dts +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_avm_fritz7320.dts @@ -163,6 +163,10 @@ #address-cells = <1>; #size-cells = <1>; + cal_ath9k_cal_985: calibration@985 { + reg = <0x985 0x3d8>; + }; + macaddr_ath9k_cal_a91: macaddr@a91 { compatible = "mac-base"; reg = <0xa91 0x6>; @@ -206,9 +210,10 @@ reset-gpios = <&gpio 21 GPIO_ACTIVE_LOW>; wifi@0,0 { - compatible = "pci0,0"; + compatible = "pci168c,002d"; reg = <0x7000 0 0 0 0>; - qca,no-eeprom; /* load from ath9k-eeprom-pci-0000:00:0e.0.bin */ + nvmem-cells = <&cal_ath9k_cal_985>; + nvmem-cell-names = "calibration"; }; }; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz7360-v2.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz7360-v2.dts index cc15324b56..1b41405062 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz7360-v2.dts +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz7360-v2.dts @@ -49,7 +49,7 @@ #size-cells = <1>; cal_urlader_985: cal@985 { - reg = <0x985 0x440>; + reg = <0x985 0x3d8>; }; macaddr_urlader_a91: macaddr@a91 { @@ -94,7 +94,7 @@ }; &wifi { - /delete-property/ qca,no-eeprom; + compatible = "pci168c,002e"; nvmem-cells = <&cal_urlader_985>; nvmem-cell-names = "calibration"; }; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz7360sl.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz7360sl.dts index cbe6c14c99..9301b049ca 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz7360sl.dts +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz7360sl.dts @@ -49,6 +49,10 @@ #address-cells = <1>; #size-cells = <1>; + cal_urlader_985: cal@985 { + reg = <0x985 0x3d8>; + }; + macaddr_urlader_a91: macaddr@a91 { compatible = "mac-base"; reg = <0xa91 0x6>; @@ -89,3 +93,9 @@ &phy1 { reset-gpios = <&gpio 44 GPIO_ACTIVE_LOW>; }; + +&wifi { + compatible = "pci168c,002e"; + nvmem-cells = <&cal_urlader_985>; + nvmem-cell-names = "calibration"; +}; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz7362sl.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz7362sl.dts index 7929bde6cf..e1334fa306 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz7362sl.dts +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz7362sl.dts @@ -127,3 +127,8 @@ &phy1 { reset-gpios = <&gpio 44 GPIO_ACTIVE_LOW>; }; + +&wifi { + compatible = "pci168c,0030"; + qca,no-eeprom; /* load from ath9k-eeprom-pci-0000:01:00.0.bin */ +}; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz736x.dtsi b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz736x.dtsi index e7fc9a4f55..cc0c97da89 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz736x.dtsi +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz736x.dtsi @@ -155,10 +155,8 @@ #address-cells = <2>; device_type = "pci"; - wifi: wifi@168c,002e { - compatible = "pci168c,002e"; + wifi: wifi@0,0 { reg = <0 0 0 0 0>; - qca,no-eeprom; /* load from ath9k-eeprom-pci-0000:01:00.0.bin */ }; }; }; diff --git a/target/linux/lantiq/xrx200/base-files/etc/hotplug.d/firmware/12-ath9k-eeprom b/target/linux/lantiq/xrx200/base-files/etc/hotplug.d/firmware/12-ath9k-eeprom index 164e2d39ca..936181c693 100644 --- a/target/linux/lantiq/xrx200/base-files/etc/hotplug.d/firmware/12-ath9k-eeprom +++ b/target/linux/lantiq/xrx200/base-files/etc/hotplug.d/firmware/12-ath9k-eeprom @@ -19,9 +19,6 @@ case "$FIRMWARE" in avm,fritz3390) caldata_extract_reverse "urlader" 0x2546 0x440 ;; - avm,fritz7360sl) - caldata_extract "urlader" 0x985 0x1000 - ;; avm,fritz7412|\ avm,fritz7430) /usr/bin/fritz_cal_extract -i 1 -s 0x1e000 -e 0x207 -l 5120 -o /lib/firmware/$FIRMWARE $(find_mtd_chardev "urlader") || \ diff --git a/target/linux/lantiq/xway/base-files/etc/hotplug.d/firmware/12-ath9k-eeprom b/target/linux/lantiq/xway/base-files/etc/hotplug.d/firmware/12-ath9k-eeprom index 98bb9af694..91eb3f1680 100644 --- a/target/linux/lantiq/xway/base-files/etc/hotplug.d/firmware/12-ath9k-eeprom +++ b/target/linux/lantiq/xway/base-files/etc/hotplug.d/firmware/12-ath9k-eeprom @@ -45,9 +45,6 @@ case "$FIRMWARE" in caldata_extract "calibration" 0xf000 0x1000 ath9k_patch_mac_crc $(macaddr_add $(mtd_get_mac_ascii u-boot-env ethaddr) 2) 0x20c ;; - avm,fritz7312|avm,fritz7320) - caldata_extract "urlader" 0x985 0x1000 - ;; *) caldata_die "board $board is not supported yet" ;; diff --git a/target/linux/mediatek/dts/mt7986a-dlink-aquila-pro-ai-m60-a1.dts b/target/linux/mediatek/dts/mt7986a-dlink-aquila-pro-ai-m60-a1.dts new file mode 100644 index 0000000000..a95c069156 --- /dev/null +++ b/target/linux/mediatek/dts/mt7986a-dlink-aquila-pro-ai-m60-a1.dts @@ -0,0 +1,377 @@ +// SPDX-License-Identifier: (GPL-2.0 OR MIT) + +/dts-v1/; +#include +#include +#include + +#include "mt7986a.dtsi" + +/ { + model = "D-Link AQUILA PRO AI M60 A1"; + compatible = "dlink,aquila-pro-ai-m60-a1", "mediatek,mt7986a"; + + aliases { + serial0 = &uart0; + led-boot = &led_status_white; + led-failsafe = &led_status_red; + led-running = &led_status_white; + led-upgrade = &led_status_blue; + }; + + chosen { + stdout-path = "serial0:115200n8"; + }; + + memory@40000000 { + reg = <0 0x40000000 0 0x20000000>; + }; + + gpio-keys { + compatible = "gpio-keys"; + + button-reset { + label = "reset"; + gpios = <&pio 10 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + button-wps { + label = "wps"; + gpios = <&pio 9 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + button-leds-on-off { + label = "leds-on-off"; + linux,code = ; + gpios = <&pio 47 GPIO_ACTIVE_LOW>; + }; + }; +}; + +ð { + status = "okay"; + + gmac0: mac@0 { + compatible = "mediatek,eth-mac"; + reg = <0>; + phy-mode = "2500base-x"; + + nvmem-cells = <&macaddr_odm 1>; + nvmem-cell-names = "mac-address"; + fixed-link { + speed = <2500>; + full-duplex; + pause; + }; + }; + + gmac1: mac@1 { + compatible = "mediatek,eth-mac"; + reg = <1>; + phy-mode = "2500base-x"; + phy-handle = <&phy6>; + nvmem-cells = <&macaddr_odm 0>; + nvmem-cell-names = "mac-address"; + label = "internet"; + }; + + mdio: mdio-bus { + #address-cells = <1>; + #size-cells = <0>; + + reset-gpios = <&pio 6 GPIO_ACTIVE_LOW>; + reset-delay-us = <1500000>; + reset-post-delay-us = <1000000>; + + phy6: phy@6 { + compatible = "maxlinear,gpy211", "ethernet-phy-ieee802.3-c45"; + reg = <6>; + phy-mode = "2500base-x"; + }; + + switch@1f { + compatible = "mediatek,mt7531"; + reg = <31>; + reset-gpios = <&pio 5 GPIO_ACTIVE_HIGH>; + interrupt-controller; + #interrupt-cells = <1>; + interrupt-parent = <&pio>; + interrupts = <66 IRQ_TYPE_LEVEL_HIGH>; + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + label = "lan1"; + }; + + port@1 { + reg = <1>; + label = "lan2"; + }; + + port@2 { + reg = <2>; + label = "lan3"; + }; + + port@3 { + reg = <3>; + label = "lan4"; + }; + + port@6 { + reg = <6>; + label = "cpu"; + ethernet = <&gmac0>; + phy-mode = "2500base-x"; + + fixed-link { + speed = <2500>; + full-duplex; + pause; + }; + }; + }; + }; + }; +}; + +&pio { + spi_flash_pins: spi-flash-pins-33-to-38 { + mux { + function = "spi"; + groups = "spi0", "spi0_wp_hold"; + }; + conf-pu { + pins = "SPI2_CS", "SPI2_HOLD", "SPI2_WP"; + drive-strength = <8>; + mediatek,pull-up-adv = <0>; /* bias-disable */ + }; + conf-pd { + pins = "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO"; + drive-strength = <8>; + mediatek,pull-down-adv = <0>; /* bias-disable */ + }; + }; + + wf_2g_5g_pins: wf_2g_5g-pins { + mux { + function = "wifi"; + groups = "wf_2g", "wf_5g"; + }; + conf { + pins = + "WF0_HB2", + "WF0_HB3", + "WF0_HB4", + "WF0_HB0", + "WF0_HB0_B", + "WF0_HB5", + "WF0_HB6", + "WF0_HB7", + "WF0_HB8", + "WF0_HB9", + "WF0_HB10", + "WF0_TOP_CLK", + "WF0_TOP_DATA", + "WF1_HB1", + "WF1_HB2", + "WF1_HB3", + "WF1_HB4", + "WF1_HB0", + "WF1_HB5", + "WF1_HB6", + "WF1_HB7", + "WF1_HB8", + "WF1_TOP_CLK", + "WF1_TOP_DATA"; + drive-strength = <4>; + }; + }; + + i2c_pins_3_4: i2c-pins-3-4 { + mux { + function = "i2c"; + groups = "i2c"; + }; + }; +}; + +&spi0 { + pinctrl-names = "default"; + pinctrl-0 = <&spi_flash_pins>; + status = "okay"; + + flash@0 { + compatible = "spi-nand"; + #address-cells = <1>; + #size-cells = <1>; + reg = <0>; + + spi-max-frequency = <20000000>; + spi-tx-bus-width = <4>; + spi-rx-bus-width = <4>; + + mediatek,nmbm; + mediatek,bmt-max-ratio = <1>; + mediatek,bmt-max-reserved-blocks = <64>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "BL2"; + reg = <0x000000 0x100000>; + read-only; + }; + + partition@100000 { + label = "u-boot-env"; + reg = <0x100000 0x80000>; + }; + + partition@180000 { + label = "Factory"; + reg = <0x180000 0x200000>; + read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x1000>; + }; + }; + }; + + partition@380000 { + label = "FIP"; + reg = <0x380000 0x200000>; + read-only; + }; + + partition@580000 { + label = "ubi"; + reg = <0x580000 0x3200000>; + }; + + partition@3780000 { + label = "ubi1"; + reg = <0x3780000 0x3200000>; + read-only; + }; + + partition@6980000 { + label = "Odm"; + reg = <0x6980000 0x40000>; + read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_odm: macaddr@81 { + compatible = "mac-base"; + reg = <0x81 0x6>; + #nvmem-cell-cells = <1>; + }; + }; + + }; + + partition@69c0000 { + label = "Config1"; + reg = <0x69c0000 0x80000>; + read-only; + }; + + partition@6a40000 { + label = "Config2"; + reg = <0x6a40000 0x80000>; + read-only; + }; + + partition@6ac0000 { + label = "Storage"; + reg = <0x6ac0000 0xA00000>; + read-only; + }; + + }; + }; +}; + +&wifi { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&wf_2g_5g_pins>; + + + nvmem-cells = <&eeprom_factory_0>; + nvmem-cell-names = "eeprom"; + + band@0 { + /* 2.4 GHz */ + reg = <0>; + nvmem-cells = <&macaddr_odm 2>; + nvmem-cell-names = "mac-address"; + }; + band@1 { + /* 5 GHz */ + reg = <1>; + nvmem-cells = <&macaddr_odm 5>; + nvmem-cell-names = "mac-address"; + }; +}; + +&uart0 { + status = "okay"; +}; + +&watchdog { + status = "okay"; +}; + +&i2c0 { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&i2c_pins_3_4>; + + gca230718@40 { + compatible = "unknown,gca230718"; + reg = <0x40>; + + led_status_red: led@0 { + color = ; + function = LED_FUNCTION_STATUS; + reg = <0>; + }; + + led@1 { + color = ; + function = LED_FUNCTION_STATUS; + reg = <1>; + }; + + led_status_blue: led@2 { + color = ; + function = LED_FUNCTION_STATUS; + reg = <2>; + }; + + led_status_white: led@3 { + color = ; + function = LED_FUNCTION_STATUS; + reg = <3>; + }; + }; +}; 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 b5ad87e5aa..bf38a5c347 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 @@ -100,7 +100,8 @@ mediatek_setup_interfaces() openwrt,one) ucidef_set_interfaces_lan_wan eth1 eth0 ;; - dlink,aquila-pro-ai-m30-a1) + dlink,aquila-pro-ai-m30-a1|\ + dlink,aquila-pro-ai-m60-a1) ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" internet ;; keenetic,kn-3911|\ 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 9ec5e9cfc3..cbb294b370 100755 --- a/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh +++ b/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh @@ -128,6 +128,10 @@ platform_do_upgrade() { yuncore,ax835) default_do_upgrade "$1" ;; + dlink,aquila-pro-ai-m60-a1) + fw_setenv sw_tryactive 0 + nand_do_upgrade "$1" + ;; mercusys,mr90x-v1|\ tplink,re6000xd) CI_UBIPART="ubi0" diff --git a/target/linux/mediatek/image/filogic.mk b/target/linux/mediatek/image/filogic.mk index 1dcc8df7ef..38ec736a4c 100644 --- a/target/linux/mediatek/image/filogic.mk +++ b/target/linux/mediatek/image/filogic.mk @@ -777,6 +777,20 @@ define Device/dlink_aquila-pro-ai-m30-a1 endef TARGET_DEVICES += dlink_aquila-pro-ai-m30-a1 +define Device/dlink_aquila-pro-ai-m60-a1 + DEVICE_VENDOR := D-Link + DEVICE_MODEL := AQUILA PRO AI M60 + DEVICE_VARIANT := A1 + DEVICE_DTS := mt7986a-dlink-aquila-pro-ai-m60-a1 + DEVICE_DTS_DIR := ../dts + DEVICE_PACKAGES := kmod-leds-gca230718 kmod-mt7915e kmod-mt7986-firmware mt7986-wo-firmware + IMAGES += recovery.bin + IMAGE_SIZE := 51200k + IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata + IMAGE/recovery.bin := sysupgrade-tar | pad-to $$(IMAGE_SIZE) | dlink-ai-recovery-header DLK6E8202001 \x30\x6C\x19\x0C \x00\x00\x2C\x00 \x00\x00\x20\x03 \x82\x6E +endef +TARGET_DEVICES += dlink_aquila-pro-ai-m60-a1 + define Device/edgecore_eap111 DEVICE_VENDOR := Edgecore DEVICE_MODEL := EAP111