diff --git a/include/kernel-5.10 b/include/kernel-5.10 index 61a182a2cd9..9e63190cdd8 100644 --- a/include/kernel-5.10 +++ b/include/kernel-5.10 @@ -1,2 +1,2 @@ -LINUX_VERSION-5.10 = .176 -LINUX_KERNEL_HASH-5.10.176 = ce072c60ba04173e05b2a1de3fefdeba5ac8b28b1958d92d21bdbf9b736ef793 +LINUX_VERSION-5.10 = .177 +LINUX_KERNEL_HASH-5.10.177 = 9f2261fea804112dcec8fa2dcc26e9c1388aa9cb7f86e5913beb00b9b5a15571 diff --git a/include/kernel-5.15 b/include/kernel-5.15 index 8575ce5d917..28c840bb870 100644 --- a/include/kernel-5.15 +++ b/include/kernel-5.15 @@ -1,2 +1,2 @@ -LINUX_VERSION-5.15 = .105 -LINUX_KERNEL_HASH-5.15.105 = 01b537650332d2852722a626169cf7e5e798d11f9b578171b477868555f5e44f +LINUX_VERSION-5.15 = .106 +LINUX_KERNEL_HASH-5.15.106 = 84e6934f828033570966e2a56fe8b72dc6e1409be296c66f4bf3c8ca6e3c8fe4 diff --git a/package/boot/uboot-envtools/files/mpc85xx b/package/boot/uboot-envtools/files/mpc85xx index 6d389c5b574..a74466ab3a6 100644 --- a/package/boot/uboot-envtools/files/mpc85xx +++ b/package/boot/uboot-envtools/files/mpc85xx @@ -8,6 +8,10 @@ touch /etc/config/ubootenv board=$(board_name) case "$board" in +enterasys,ws-ap3715i) + ubootenv_add_uci_config "$(find_mtd_part 'cfg1')" "0x0" "0x10000" "0x10000" + ubootenv_add_uci_config "$(find_mtd_part 'cfg2')" "0x0" "0x10000" "0x10000" + ;; extreme-networks,ws-ap3825i) ubootenv_add_uci_config "$(find_mtd_part 'cfg1')" "0x0" "0x10000" "0x20000" ubootenv_add_uci_config "$(find_mtd_part 'cfg2')" "0x0" "0x10000" "0x20000" diff --git a/package/libs/libcap/Makefile b/package/libs/libcap/Makefile index a35b5e394fa..6f51b5d5edd 100644 --- a/package/libs/libcap/Makefile +++ b/package/libs/libcap/Makefile @@ -6,12 +6,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libcap -PKG_VERSION:=2.67 +PKG_VERSION:=2.68 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@KERNEL/linux/libs/security/linux-privs/libcap2 -PKG_HASH:=ce9b22fdc271beb6dae7543da5f74cf24cb82e6848cfd088a5a069dec5ea5198 +PKG_HASH:=90be3b6d41be5f81ae4b03ec76012b0d27c829293684f6c05b65d5f9cce724b2 PKG_MAINTAINER:=Paul Wassi PKG_LICENSE:=GPL-2.0-only diff --git a/scripts/sercomm-payload.py b/scripts/sercomm-payload.py index 5193069b6c8..2390d5d93a9 100755 --- a/scripts/sercomm-payload.py +++ b/scripts/sercomm-payload.py @@ -12,11 +12,21 @@ def create_output(args): in_bytes = in_f.read(in_size) in_f.close() + if (args.pid_file): + pid_st = os.stat(args.pid_file) + pid_size = pid_st.st_size + + pid_f = open(args.pid_file, 'r+b') + pid_bytes = pid_f.read(pid_size) + pid_f.close() + else: + pid_bytes = bytes.fromhex(args.pid) + sha256 = hashlib.sha256() sha256.update(in_bytes) out_f = open(args.output_file, 'w+b') - out_f.write(bytes.fromhex(args.pid)) + out_f.write(pid_bytes) out_f.write(sha256.digest()) out_f.write(in_bytes) out_f.close() @@ -38,6 +48,12 @@ def main(): type=str, help='Output file') + parser.add_argument('--pid-file', + dest='pid_file', + action='store', + type=str, + help='Sercomm PID file') + parser.add_argument('--pid', dest='pid', action='store', @@ -48,7 +64,7 @@ def main(): if ((not args.input_file) or (not args.output_file) or - (not args.pid)): + (not args.pid_file and not args.pid)): parser.print_help() create_output(args) diff --git a/scripts/sercomm-pid.py b/scripts/sercomm-pid.py index b89977a5b94..4d88a678396 100755 --- a/scripts/sercomm-pid.py +++ b/scripts/sercomm-pid.py @@ -27,11 +27,15 @@ def create_pid_file(args): def get_pid(args): buf = bytearray([PADDING] * PID_SIZE) - enc = args.hw_version.rjust(8, '0').encode('ascii') - struct.pack_into('>8s', buf, 0x0, enc) + if not args.hw_id: + enc = args.hw_version.rjust(14, '0').encode('ascii') + struct.pack_into('>14s', buf, 0x0, enc) + else: + enc = args.hw_version.rjust(8, '0').encode('ascii') + struct.pack_into('>8s', buf, 0x0, enc) - enc = binascii.hexlify(args.hw_id.encode()) - struct.pack_into('>6s', buf, 0x8, enc) + enc = binascii.hexlify(args.hw_id.encode()) + struct.pack_into('>6s', buf, 0x8, enc) enc = args.sw_version.rjust(4, '0').encode('ascii') struct.pack_into('>4s', buf, 0x64, enc) @@ -41,6 +45,9 @@ def get_pid(args): if (args.extra_padd_byte): struct.pack_into ('; + scl-gpios = <&gpio 9 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>; + #address-cells = <1>; + #size-cells = <0>; + }; + + keys { + compatible = "gpio-keys-polled"; + poll-interval = <20>; + + wps { + label = "wps"; + gpios = <&gpio 34 GPIO_ACTIVE_LOW>; + linux,code = ; + debounce-interval = <60>; + }; + + reset { + label = "reset"; + gpios = <&gpio 35 GPIO_ACTIVE_LOW>; + linux,code = ; + debounce-interval = <60>; + }; + }; +}; + +&ehci { + status = "okay"; +}; + +ðernet { + status = "okay"; + + nvmem-cells = <&macaddr_cferom_6a0>; + nvmem-cell-names = "mac-address"; +}; + +&hsspi { + status = "okay"; + + led-controller@1 { + compatible = "sercomm,msp430-leds"; + reg = <1>; + spi-max-frequency = <500000>; + + led@1 { + reg = <1>; + label = "red:modem"; + }; + + led_modem_green: led@2 { + reg = <2>; + label = "green:modem"; + }; + + led@3 { + reg = <3>; + label = "blue:modem"; + }; + + led@4 { + reg = <4>; + label = "red:internet"; + }; + + led@5 { + reg = <5>; + label = "red:phone"; + }; + + led@6 { + reg = <6>; + label = "green:phone"; + }; + + led_wireless_green: led@7 { + reg = <7>; + label = "green:wifi"; + }; + + led_power_red: led@8 { + reg = <8>; + label = "red:power"; + }; + + led_internet_green: led@9 { + reg = <9>; + label = "green:internet"; + }; + }; +}; + +&mdio_int { + phy12: ethernet-phy@c { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <12>; + }; +}; + +&mdio_ext { + switch@1e { + compatible = "brcm,bcm53125"; + reg = <30>; + + dsa,member = <1 0>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@1 { + reg = <1>; + label = "lan1"; + }; + + port@2 { + reg = <2>; + label = "lan2"; + }; + + port@3 { + reg = <3>; + label = "lan3"; + }; + + port@4 { + reg = <4>; + label = "lan4"; + }; + + port@8 { + reg = <8>; + + phy-mode = "rgmii"; + ethernet = <&switch0port4>; + + fixed-link { + speed = <1000>; + full-duplex; + }; + }; + }; + }; +}; + +&nflash { + status = "okay"; + + nandcs@0 { + compatible = "brcm,nandcs"; + reg = <0>; + nand-ecc-step-size = <512>; + nand-ecc-strength = <15>; + nand-on-flash-bbt; + brcm,nand-oob-sector-size = <64>; + + #address-cells = <1>; + #size-cells = <1>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + cferom: partition@0 { + label = "cferom"; + reg = <0x0000000 0x0020000>; + read-only; + }; + + partition@20000 { + label = "part_map"; + reg = <0x0020000 0x00a0000>; + read-only; + }; + + partition@c0000 { + label = "cferam1"; + reg = <0x00c0000 0x0140000>; + read-only; + }; + + partition@200000 { + label = "cferam2"; + reg = <0x0200000 0x0140000>; + read-only; + }; + + artition@6920000 { + label = "bootflag1"; + reg = <0x6920000 0x0140000>; + }; + + partition@6a60000 { + label = "bootflag2"; + reg = <0x6a60000 0x0140000>; + }; + + partition@520000 { + compatible = "sercomm,wfi"; + label = "wfi"; + reg = <0x0520000 0x6400000>; + }; + + partition@6ba0000 { + label = "xml_cfg"; + reg = <0x6ba0000 0x0280000>; + read-only; + }; + + partition@6e20000 { + label = "app_data"; + reg = <0x6e20000 0x0280000>; + read-only; + }; + }; + }; +}; + +&ohci { + status = "okay"; +}; + +&pcie { + status = "okay"; +}; + +&pinctrl { + pinctrl_uart1: uart1-pins { + pinctrl_uart1_sdin: uart1_sdin { + function = "uart1_sdin"; + pins = "gpio12"; + }; + + pinctrl_uart1_sdout: uart1_sdout { + function = "uart1_sdout"; + pins = "gpio13"; + }; + }; +}; + +&switch0 { + dsa,member = <0 0>; + + ports { + port@3 { + reg = <3>; + label = "wan"; + + phy-handle = <&phy12>; + phy-mode = "gmii"; + }; + + switch0port4: port@4 { + reg = <4>; + label = "extsw"; + + phy-mode = "rgmii"; + + fixed-link { + speed = <1000>; + full-duplex; + }; + }; + }; +}; + +&uart0 { + status = "okay"; +}; + +&uart1 { + status = "okay"; + + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_uart1>; +}; + +&usbh { + status = "okay"; +}; + +&cferom { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_cferom_6a0: macaddr@6a0 { + reg = <0x6a0 0x6>; + }; +}; diff --git a/target/linux/bmips/files/drivers/leds/leds-sercomm-msp430.c b/target/linux/bmips/files/drivers/leds/leds-sercomm-msp430.c new file mode 100644 index 00000000000..54091429899 --- /dev/null +++ b/target/linux/bmips/files/drivers/leds/leds-sercomm-msp430.c @@ -0,0 +1,380 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* + * Driver for Sercomm MSP430G2513 LEDs. + * + * Copyright 2023 Álvaro Fernández Rojas + */ + +#include +#include +#include +#include +#include +#include "leds.h" + +/* + * MSP430G2513 SPI protocol description: + * +----+----+----+----+----+----+ + * | b1 | b2 | b3 | b4 | b5 | b6 | + * +----+----+----+----+----+----+ + * 6 bytes TX & RX per transaction. + * + * LEDs: + * MSP430G2513 can control up to 9 LEDs. + * b1: LED ID [1,9] + * b2: LED function + * b3-b6: LED function parameters + * + * LED functions: + * [0] Off + * [1] On + * [2] Flash + * - b4: delay (x 6ms) + * - b5: repeat (0 = infinite) + * [3] Pulse + * - b3: delay (x 6ms) + * - b4: blink while pulsing? (unknown) + * - b5: repeat (0 = infinite) + * [4] Pulse On + * - b3: delay (x 6ms) + * - b4: blink while pulsing? (unknown) + * - b5: repeat (0 = infinite) + * [5] Pulse Off + * - b3: delay (x 6ms) + * - b4: blink while pulsing? (unknown) + * - b5: repeat (0 = infinite) + * [6] Level + * - b3: brightness [0,4] + * + * MCU Commands (b1 = 0x55): + * [0x0a] FW upgrade data + * - b3: Data size (usually 0x40), which is appended to TX & RX. + * [0x31] Get MCU version? (unknown) + * [0x68] Get MCU work mode + * [0xa5] Start FW upgrade + * [0xf0] End FW upgrade + */ + +#define MSP430_CMD_BYTES 6 +#define MSP430_CMD_MCU 0x55 +#define MSP430_MCU_WM 0x68 + +#define MSP430_LED_MIN_ID 1 +#define MSP430_LED_MAX_ID 9 + +#define MSP430_LED_OFF 0 +#define MSP430_LED_ON 1 +#define MSP430_LED_FLASH 2 +#define MSP430_LED_PULSE 3 +#define MSP430_LED_PULSE_ON 4 +#define MSP430_LED_PULSE_OFF 5 +#define MSP430_LED_LEVEL 6 + +#define MSP430_LED_BLINK_DEF 500 +#define MSP430_LED_BLINK_MASK 0xff +#define MSP430_LED_BLINK_MS 6 +#define MSP430_LED_BLINK_MAX (MSP430_LED_BLINK_MS * \ + MSP430_LED_BLINK_MASK) + +#define MSP430_LED_BRIGHTNESS_MAX 5 +#define MSP430_LED_REPEAT_MAX 0xff + +/** + * struct msp430_led - state container for Sercomm MSP430 based LEDs + * @cdev: LED class device for this LED + * @spi: spi resource + * @id: LED ID + */ +struct msp430_led { + struct led_classdev cdev; + struct spi_device *spi; + u8 id; +}; + +static inline int msp430_cmd(struct spi_device *spi, u8 tx[MSP430_CMD_BYTES], + u8 rx[MSP430_CMD_BYTES]) +{ + struct device *dev = &spi->dev; + int rc; + + memset(rx, 0, MSP430_CMD_BYTES); + + rc = spi_write_then_read(spi, tx, MSP430_CMD_BYTES, + rx, MSP430_CMD_BYTES); + if (rc) + dev_err(dev, "spi error\n"); + + dev_dbg(dev, "msp430_cmd: [%02x %02x %02x %02x %02x %02x]" + " -> [%02x %02x %02x %02x %02x %02x]", + tx[0], tx[1], tx[2], tx[3], tx[4], tx[5], + rx[0], rx[1], rx[2], rx[3], rx[4], rx[5]); + + return rc; +} + +static unsigned long msp430_blink_delay(unsigned long delay) +{ + unsigned long msp430_delay; + + msp430_delay = delay + MSP430_LED_BLINK_MS / 2; + msp430_delay = msp430_delay / MSP430_LED_BLINK_MS; + if (msp430_delay == 0) + msp430_delay = 1; + + return msp430_delay; +} + +static int msp430_blink_set(struct led_classdev *led_cdev, + unsigned long *delay_on, + unsigned long *delay_off) +{ + struct msp430_led *led = + container_of(led_cdev, struct msp430_led, cdev); + u8 tx[MSP430_CMD_BYTES] = {led->id, MSP430_LED_FLASH, 0, 0, 0, 0}; + u8 rx[MSP430_CMD_BYTES]; + unsigned long delay; + + if (!*delay_on) + *delay_on = MSP430_LED_BLINK_DEF; + if (!*delay_off) + *delay_off = MSP430_LED_BLINK_DEF; + + delay = msp430_blink_delay(*delay_on); + if (delay != msp430_blink_delay(*delay_off)) { + dev_dbg(led_cdev->dev, + "fallback to soft blinking (delay_on != delay_off)\n"); + return -EINVAL; + } + + if (delay > MSP430_LED_BLINK_MASK) { + dev_dbg(led_cdev->dev, + "fallback to soft blinking (delay > %ums)\n", + MSP430_LED_BLINK_MAX); + return -EINVAL; + } + + tx[3] = delay; + + return msp430_cmd(led->spi, tx, rx); +} + +static int msp430_brightness_set(struct led_classdev *led_cdev, + enum led_brightness brightness) +{ + struct msp430_led *led = + container_of(led_cdev, struct msp430_led, cdev); + u8 tx[MSP430_CMD_BYTES] = {led->id, 0, 0, 0, 0, 0}; + u8 rx[MSP430_CMD_BYTES]; + u8 val = (u8) brightness; + + switch (val) + { + case LED_OFF: + tx[1] = MSP430_LED_OFF; + break; + case MSP430_LED_BRIGHTNESS_MAX: + tx[1] = MSP430_LED_ON; + break; + default: + tx[1] = MSP430_LED_LEVEL; + tx[2] = val - 1; + break; + } + + return msp430_cmd(led->spi, tx, rx); +} + +static int msp430_pattern_clear(struct led_classdev *ldev) +{ + msp430_brightness_set(ldev, LED_OFF); + + return 0; +} + +static int msp430_pattern_set(struct led_classdev *led_cdev, + struct led_pattern *pattern, + u32 len, int repeat) +{ + struct msp430_led *led = + container_of(led_cdev, struct msp430_led, cdev); + u8 tx[MSP430_CMD_BYTES] = {led->id, 0, 0, 0, 0, 0}; + u8 rx[MSP430_CMD_BYTES]; + unsigned long delay0; + unsigned long delay1; + int rc; + + if (len != 2 || + repeat > MSP430_LED_REPEAT_MAX || + pattern[0].delta_t > MSP430_LED_BLINK_MAX || + pattern[1].delta_t > MSP430_LED_BLINK_MAX) + return -EINVAL; + + delay0 = msp430_blink_delay(pattern[0].delta_t); + delay1 = msp430_blink_delay(pattern[1].delta_t); + + /* Pulse: */ + if (delay0 == delay1 && + pattern[0].brightness == LED_OFF && + pattern[1].brightness == MSP430_LED_BRIGHTNESS_MAX) + { + tx[1] = MSP430_LED_PULSE; + tx[2] = delay0; + tx[4] = (u8) repeat; + } + + /* Pulse On: <0ms> */ + if (pattern[0].delta_t != 0 && + pattern[1].delta_t == 0 && + pattern[0].brightness == LED_OFF && + pattern[1].brightness == MSP430_LED_BRIGHTNESS_MAX) { + tx[1] = MSP430_LED_PULSE_ON; + tx[2] = delay0; + tx[4] = (u8) repeat; + } + + /* Pulse Off: <0ms> */ + if (pattern[0].delta_t != 0 && + pattern[1].delta_t == 0 && + pattern[0].brightness == MSP430_LED_BRIGHTNESS_MAX && + pattern[1].brightness == LED_OFF) { + tx[1] = MSP430_LED_PULSE_OFF; + tx[2] = delay0; + tx[4] = (u8) repeat; + } + + if (!tx[1]) + return -EINVAL; + + rc = msp430_cmd(led->spi, tx, rx); + if (rc) + return rc; + + return 0; +} + +static int msp430_led(struct spi_device *spi, struct device_node *nc, u8 id) +{ + struct device *dev = &spi->dev; + struct led_init_data init_data = {}; + struct msp430_led *led; + enum led_default_state state; + int rc; + + led = devm_kzalloc(dev, sizeof(*led), GFP_KERNEL); + if (!led) + return -ENOMEM; + + led->id = id; + led->spi = spi; + + init_data.fwnode = of_fwnode_handle(nc); + + state = led_init_default_state_get(init_data.fwnode); + switch (state) { + case LEDS_DEFSTATE_ON: + led->cdev.brightness = MSP430_LED_BRIGHTNESS_MAX; + break; + default: + led->cdev.brightness = LED_OFF; + break; + } + + msp430_brightness_set(&led->cdev, led->cdev.brightness); + + led->cdev.blink_set = msp430_blink_set; + led->cdev.brightness_set_blocking = msp430_brightness_set; + led->cdev.max_brightness = MSP430_LED_BRIGHTNESS_MAX; + led->cdev.pattern_clear = msp430_pattern_clear; + led->cdev.pattern_set = msp430_pattern_set; + + rc = devm_led_classdev_register_ext(dev, &led->cdev, &init_data); + if (rc < 0) + return rc; + + dev_dbg(dev, "registered LED %s\n", led->cdev.name); + + return 0; +} + +static inline int msp430_check_workmode(struct spi_device *spi) +{ + struct device *dev = &spi->dev; + u8 tx[MSP430_CMD_BYTES] = {MSP430_CMD_MCU, MSP430_MCU_WM, 0, 0, 0, 0}; + u8 rx[MSP430_CMD_BYTES]; + int rc; + + rc = msp430_cmd(spi, tx, rx); + if (rc) + return rc; + + if ((rx[3] == 0xA5 && rx[4] == 'Z') || + (rx[4] == 0xA5 && rx[5] == 'Z') || + (rx[4] == '\b' && rx[5] == '\n')) { + dev_err(dev, "invalid workmode: " + "[%02x %02x %02x %02x %02x %02x]\n", + rx[0], rx[1], rx[2], rx[3], rx[4], rx[5]); + return -EINVAL; + } + + return 0; +} + +static int msp430_leds_probe(struct spi_device *spi) +{ + struct device *dev = &spi->dev; + struct device_node *np = dev_of_node(dev); + struct device_node *child; + int rc; + + rc = msp430_check_workmode(spi); + if (rc) + return rc; + + for_each_available_child_of_node(np, child) { + u32 reg; + + if (of_property_read_u32(child, "reg", ®)) + continue; + + if (reg < MSP430_LED_MIN_ID || reg > MSP430_LED_MAX_ID) { + dev_err(dev, "invalid LED (%u) [%d, %d]\n", reg, + MSP430_LED_MIN_ID, MSP430_LED_MAX_ID); + continue; + } + + rc = msp430_led(spi, child, reg); + if (rc < 0) { + of_node_put(child); + return rc; + } + } + + return 0; +} + +static const struct of_device_id msp430_leds_of_match[] = { + { .compatible = "sercomm,msp430-leds", }, + { }, +}; +MODULE_DEVICE_TABLE(of, msp430_leds_of_match); + +static const struct spi_device_id msp430_leds_id_table[] = { + { "msp430-leds", 0 }, + { } +}; + +static struct spi_driver msp430_leds_driver = { + .driver = { + .name = KBUILD_MODNAME, + .of_match_table = msp430_leds_of_match, + }, + .id_table = msp430_leds_id_table, + .probe = msp430_leds_probe, +}; + +module_spi_driver(msp430_leds_driver); + +MODULE_AUTHOR("Álvaro Fernández Rojas "); +MODULE_DESCRIPTION("LED driver for Sercomm MSP430 controllers"); +MODULE_LICENSE("GPL v2"); +MODULE_ALIAS("platform:leds-sercomm-msp430"); diff --git a/target/linux/bmips/image/Makefile b/target/linux/bmips/image/Makefile index af2fd98d1fa..da328f7216f 100644 --- a/target/linux/bmips/image/Makefile +++ b/target/linux/bmips/image/Makefile @@ -194,12 +194,18 @@ define Build/cfe-sercomm-crypto endef define Build/cfe-sercomm-load + $(TOPDIR)/scripts/sercomm-pid.py \ + --hw-version $(SERCOMM_HWVER) \ + --sw-version $(SERCOMM_SWVER) \ + --extra-padding-size 0x10 \ + --pid-file $@.pid $(TOPDIR)/scripts/sercomm-payload.py \ --input-file $@ \ --output-file $@.new \ - --pid "$(SERCOMM_PID)" + --pid-file $@.pid mv $@.new $@ + rm -f $@.pid endef define Build/cfe-sercomm-part @@ -208,18 +214,18 @@ define Build/cfe-sercomm-part --output-file $@.kernel_rootfs \ --part-name kernel_rootfs \ --part-version OpenWrt \ - --rootfs-version $(SERCOMM_VERSION) + --rootfs-version $(SERCOMM_FSVER) rm -rf $@-rootfs_lib mkdir -p $@-rootfs_lib - echo $(SERCOMM_VERSION) > $@-rootfs_lib/lib_ver + echo $(SERCOMM_FSVER) > $@-rootfs_lib/lib_ver $(call Build/cfe-jffs2,$@-rootfs_lib) $(call Build/pad-to,$(BLOCKSIZE)) $(TOPDIR)/scripts/sercomm-partition-tag.py \ --input-file $@ \ --output-file $@.rootfs_lib \ --part-name rootfs_lib \ - --part-version $(SERCOMM_VERSION) + --part-version $(SERCOMM_FSVER) mv $@.kernel_rootfs $@ dd if=$@.rootfs_lib >> $@ diff --git a/target/linux/bmips/image/bcm63xx_generic.mk b/target/linux/bmips/image/bcm63xx_generic.mk index 33282bd1a50..2c832fe8ba9 100644 --- a/target/linux/bmips/image/bcm63xx_generic.mk +++ b/target/linux/bmips/image/bcm63xx_generic.mk @@ -33,7 +33,8 @@ define Device/comtrend_ar-5315u CHIP_ID := 6318 CFE_BOARD_ID := 96318A-1441N1 FLASH_MB := 16 - DEVICE_PACKAGES += $(USB2_PACKAGES) $(B43_PACKAGES) + DEVICE_PACKAGES += $(USB2_PACKAGES) $(B43_PACKAGES) \ + kmod-leds-bcm6328 endef TARGET_DEVICES += comtrend_ar-5315u @@ -44,7 +45,8 @@ define Device/comtrend_ar-5387un CHIP_ID := 6328 CFE_BOARD_ID := 96328A-1441N1 FLASH_MB := 16 - DEVICE_PACKAGES += $(USB2_PACKAGES) $(B43_PACKAGES) + DEVICE_PACKAGES += $(USB2_PACKAGES) $(B43_PACKAGES) \ + kmod-leds-bcm6328 endef TARGET_DEVICES += comtrend_ar-5387un @@ -56,7 +58,8 @@ define Device/comtrend_vr-3025u CFE_BOARD_ID := 96368M-1541N BLOCKSIZE := 0x20000 FLASH_MB := 32 - DEVICE_PACKAGES += $(USB2_PACKAGES) $(B43_PACKAGES) + DEVICE_PACKAGES += $(USB2_PACKAGES) $(B43_PACKAGES) \ + kmod-leds-gpio endef TARGET_DEVICES += comtrend_vr-3025u @@ -69,6 +72,7 @@ define Device/huawei_hg556a-b CFE_BOARD_ID := HW556 CFE_EXTRAS += --rsa-signature "EchoLife_HG556a" --tag-version 8 BLOCKSIZE := 0x20000 - DEVICE_PACKAGES += $(USB2_PACKAGES) $(ATH9K_PACKAGES) + DEVICE_PACKAGES += $(USB2_PACKAGES) $(ATH9K_PACKAGES) \ + kmod-leds-gpio endef TARGET_DEVICES += huawei_hg556a-b diff --git a/target/linux/bmips/image/bcm63xx_nand.mk b/target/linux/bmips/image/bcm63xx_nand.mk index 01540625ed0..732a5accdc5 100644 --- a/target/linux/bmips/image/bcm63xx_nand.mk +++ b/target/linux/bmips/image/bcm63xx_nand.mk @@ -5,7 +5,7 @@ DEVICE_VARS += CFE_RAM_FILE DEVICE_VARS += CFE_RAM_JFFS2_NAME CFE_RAM_JFFS2_PAD DEVICE_VARS += CFE_WFI_CHIP_ID CFE_WFI_FLASH_TYPE DEVICE_VARS += CFE_WFI_FLAGS CFE_WFI_VERSION -DEVICE_VARS += SERCOMM_PID SERCOMM_VERSION +DEVICE_VARS += SERCOMM_FSVER SERCOMM_HWVER SERCOMM_SWVER # CFE expects a single JFFS2 partition with cferam and kernel. However, # it's possible to fool CFE into properly loading both cferam and kernel @@ -41,8 +41,9 @@ define Device/sercomm-nand IMAGES := factory.img sysupgrade.bin IMAGE/factory.img := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi |\ cfe-sercomm-part | gzip | cfe-sercomm-load | cfe-sercomm-crypto - SERCOM_PID := - SERCOMM_VERSION := + SERCOMM_FSVER := + SERCOMM_HWVER := + SERCOMM_SWVER := endef define Device/comtrend_vr-3032u @@ -57,7 +58,8 @@ define Device/comtrend_vr-3032u PAGESIZE := 2048 SUBPAGESIZE := 512 VID_HDR_OFFSET := 2048 - DEVICE_PACKAGES += $(USB2_PACKAGES) + DEVICE_PACKAGES += $(USB2_PACKAGES) \ + kmod-leds-bcm6328 CFE_WFI_FLASH_TYPE := 3 CFE_WFI_VERSION := 0x5732 endef @@ -79,7 +81,8 @@ define Device/huawei_hg253s-v2 PAGESIZE := 2048 SUBPAGESIZE := 512 VID_HDR_OFFSET := 2048 - DEVICE_PACKAGES += $(USB2_PACKAGES) + DEVICE_PACKAGES += $(USB2_PACKAGES) \ + kmod-leds-bcm6328 kmod-leds-gpio CFE_WFI_FLASH_TYPE := 3 endef TARGET_DEVICES += huawei_hg253s-v2 @@ -95,7 +98,8 @@ define Device/netgear_dgnd3700-v2 CFE_RAM_JFFS2_PAD := 496k BLOCKSIZE := 16k PAGESIZE := 512 - DEVICE_PACKAGES += $(USB2_PACKAGES) $(B43_PACKAGES) + DEVICE_PACKAGES += $(USB2_PACKAGES) $(B43_PACKAGES) \ + kmod-leds-bcm6328 kmod-leds-gpio CFE_WFI_FLASH_TYPE := 2 CFE_WFI_VERSION := 0x5731 endef @@ -114,17 +118,11 @@ define Device/sercomm_h500-s-lowi PAGESIZE := 2048 SUBPAGESIZE := 512 VID_HDR_OFFSET := 2048 - DEVICE_PACKAGES += $(USB2_PACKAGES) - SERCOMM_PID := \ - 30 30 30 30 30 30 30 31 34 33 34 62 33 31 30 30 \ - 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 \ - 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 \ - 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 \ - 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 \ - 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 \ - 30 30 30 30 33 33 30 35 30 30 30 30 30 30 30 30 \ - 0D 0A 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - SERCOMM_VERSION := 1001 + DEVICE_PACKAGES += $(USB2_PACKAGES) \ + kmod-leds-bcm6328 + SERCOMM_FSVER := 1001 + SERCOMM_HWVER := 1434b31 + SERCOMM_SWVER := 3305 endef TARGET_DEVICES += sercomm_h500-s-lowi @@ -141,16 +139,30 @@ define Device/sercomm_h500-s-vfes PAGESIZE := 2048 SUBPAGESIZE := 512 VID_HDR_OFFSET := 2048 - DEVICE_PACKAGES += $(USB2_PACKAGES) - SERCOMM_PID := \ - 30 30 30 30 30 30 30 31 34 32 35 38 34 62 30 30 \ - 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 \ - 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 \ - 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 \ - 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 \ - 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 \ - 30 30 30 30 33 34 31 37 30 30 30 30 30 30 30 30 \ - 0D 0A 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - SERCOMM_VERSION := 1001 + DEVICE_PACKAGES += $(USB2_PACKAGES) \ + kmod-leds-bcm6328 + SERCOMM_FSVER := 1001 + SERCOMM_HWVER := 142584b + SERCOMM_SWVER := 3417 endef TARGET_DEVICES += sercomm_h500-s-vfes + +define Device/sercomm_shg2500 + $(Device/sercomm-nand) + DEVICE_VENDOR := Sercomm + DEVICE_MODEL := SHG2500 + DEVICE_LOADADDR := $(KERNEL_LOADADDR) + KERNEL := kernel-bin | append-dtb | lzma | cfe-jffs2-kernel + CHIP_ID := 63268 + SOC := bcm63168 + BLOCKSIZE := 128k + PAGESIZE := 2048 + SUBPAGESIZE := 512 + VID_HDR_OFFSET := 2048 + DEVICE_PACKAGES += $(USB2_PACKAGES) kmod-i2c-gpio \ + kmod-leds-sercomm-msp430 + SERCOMM_FSVER := 1001 + SERCOMM_HWVER := 1424e4a + SERCOMM_SWVER := 3207 +endef +TARGET_DEVICES += sercomm_shg2500 diff --git a/target/linux/bmips/modules.mk b/target/linux/bmips/modules.mk new file mode 100644 index 00000000000..3032dab7099 --- /dev/null +++ b/target/linux/bmips/modules.mk @@ -0,0 +1,46 @@ +# SPDX-License-Identifier: GPL-2.0-only + +define KernelPackage/leds-bcm6328 + SUBMENU:=$(LEDS_MENU) + TITLE:=BCM6328 LED support + KCONFIG:=CONFIG_LEDS_BCM6328 + FILES:=$(LINUX_DIR)/drivers/leds/leds-bcm6328.ko + DEPENDS:=@TARGET_bmips + AUTOLOAD:=$(call AutoLoad,60,leds-bcm6328,1) +endef + +define KernelPackage/leds-bcm6328/description + Kernel support for the BCM6328 LED controller. +endef + +$(eval $(call KernelPackage,leds-bcm6328)) + +define KernelPackage/leds-bcm6358 + SUBMENU:=$(LEDS_MENU) + TITLE:=BCM6358 LED support + KCONFIG:=CONFIG_LEDS_BCM6358 + FILES:=$(LINUX_DIR)/drivers/leds/leds-bcm6358.ko + DEPENDS:=@TARGET_bmips + AUTOLOAD:=$(call AutoLoad,60,leds-bcm6358,1) +endef + +define KernelPackage/leds-bcm6358/description + Kernel support for the BCM6358 LED controller. +endef + +$(eval $(call KernelPackage,leds-bcm6358)) + +define KernelPackage/leds-sercomm-msp430 + SUBMENU:=$(LEDS_MENU) + TITLE:=Sercomm MSP430G2513 LED support + KCONFIG:=CONFIG_LEDS_SERCOMM_MSP430 + FILES:=$(LINUX_DIR)/drivers/leds/leds-sercomm-msp430.ko + DEPENDS:=@TARGET_bmips +kmod-ledtrig-pattern + AUTOLOAD:=$(call AutoLoad,60,leds-sercomm-msp430,1) +endef + +define KernelPackage/leds-sercomm-msp430/description + Kernel support for the Sercomm MSP430G2513 SPI LED controller. +endef + +$(eval $(call KernelPackage,leds-sercomm-msp430)) diff --git a/target/linux/bmips/nand/base-files/etc/board.d/02_network b/target/linux/bmips/nand/base-files/etc/board.d/02_network index b2a340ecf8c..0e130103da3 100644 --- a/target/linux/bmips/nand/base-files/etc/board.d/02_network +++ b/target/linux/bmips/nand/base-files/etc/board.d/02_network @@ -10,7 +10,8 @@ comtrend,vr-3032u) ucidef_set_interface_lan "lan1 lan2 lan3 lan4" ;; huawei,hg253s-v2 |\ -netgear,dgnd3700-v2) +netgear,dgnd3700-v2 |\ +sercomm,shg2500) ucidef_set_bridge_device switch ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" "wan" ;; diff --git a/target/linux/bmips/patches-5.15/700-leds-add-support-for-Sercomm-MSP430-LED-controller.patch b/target/linux/bmips/patches-5.15/700-leds-add-support-for-Sercomm-MSP430-LED-controller.patch new file mode 100644 index 00000000000..eeeb8d1ae0d --- /dev/null +++ b/target/linux/bmips/patches-5.15/700-leds-add-support-for-Sercomm-MSP430-LED-controller.patch @@ -0,0 +1,46 @@ +From 1a5f2263d388016c88d39e141c7eb8085c9313fc Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= +Date: Wed, 5 Apr 2023 08:07:00 +0200 +Subject: [PATCH] leds: add support for Sercomm MSP430 LED controller +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Sercomm added an external MSP430G2513 for controlling LEDs through SPI on some +boards. + +Signed-off-by: Álvaro Fernández Rojas +--- + drivers/leds/Kconfig | 9 +++++++++ + drivers/leds/Makefile | 1 + + drivers/spi/spidev.c | 2 ++ + 3 files changed, 12 insertions(+) + +--- a/drivers/leds/Kconfig ++++ b/drivers/leds/Kconfig +@@ -288,6 +288,15 @@ config LEDS_COBALT_RAQ + help + This option enables support for the Cobalt Raq series LEDs. + ++config LEDS_SERCOMM_MSP430 ++ tristate "LED support for Sercomm MSP430 SPI LED controllers" ++ depends on LEDS_CLASS ++ depends on SPI ++ depends on OF ++ help ++ This option enables support for the Sercomm MSP430G2513 SPI LED ++ controllers. ++ + config LEDS_SUNFIRE + tristate "LED support for SunFire servers." + depends on LEDS_CLASS +--- a/drivers/leds/Makefile ++++ b/drivers/leds/Makefile +@@ -77,6 +77,7 @@ obj-$(CONFIG_LEDS_PWM) += leds-pwm.o + obj-$(CONFIG_LEDS_REGULATOR) += leds-regulator.o + obj-$(CONFIG_LEDS_S3C24XX) += leds-s3c24xx.o + obj-$(CONFIG_LEDS_SC27XX_BLTC) += leds-sc27xx-bltc.o ++obj-$(CONFIG_LEDS_SERCOMM_MSP430) += leds-sercomm-msp430.o + obj-$(CONFIG_LEDS_SUNFIRE) += leds-sunfire.o + obj-$(CONFIG_LEDS_SYSCON) += leds-syscon.o + obj-$(CONFIG_LEDS_TCA6507) += leds-tca6507.o diff --git a/target/linux/generic/backport-5.15/702-v5.19-06-net-ethernet-mtk_eth_soc-support-TC_SETUP_BLOCK-for-.patch b/target/linux/generic/backport-5.15/702-v5.19-06-net-ethernet-mtk_eth_soc-support-TC_SETUP_BLOCK-for-.patch index 72c6d281723..1950d81ebba 100644 --- a/target/linux/generic/backport-5.15/702-v5.19-06-net-ethernet-mtk_eth_soc-support-TC_SETUP_BLOCK-for-.patch +++ b/target/linux/generic/backport-5.15/702-v5.19-06-net-ethernet-mtk_eth_soc-support-TC_SETUP_BLOCK-for-.patch @@ -10,7 +10,7 @@ Signed-off-by: Felix Fietkau --- a/drivers/net/ethernet/mediatek/mtk_ppe_offload.c +++ b/drivers/net/ethernet/mediatek/mtk_ppe_offload.c -@@ -563,10 +563,13 @@ mtk_eth_setup_tc_block(struct net_device +@@ -564,10 +564,13 @@ mtk_eth_setup_tc_block(struct net_device int mtk_eth_setup_tc(struct net_device *dev, enum tc_setup_type type, void *type_data) { diff --git a/target/linux/generic/backport-5.15/702-v5.19-07-net-ethernet-mtk_eth_soc-allocate-struct-mtk_ppe-sep.patch b/target/linux/generic/backport-5.15/702-v5.19-07-net-ethernet-mtk_eth_soc-allocate-struct-mtk_ppe-sep.patch index bc75d152114..f18a816b703 100644 --- a/target/linux/generic/backport-5.15/702-v5.19-07-net-ethernet-mtk_eth_soc-allocate-struct-mtk_ppe-sep.patch +++ b/target/linux/generic/backport-5.15/702-v5.19-07-net-ethernet-mtk_eth_soc-allocate-struct-mtk_ppe-sep.patch @@ -148,7 +148,7 @@ Signed-off-by: Felix Fietkau return -EOPNOTSUPP; if (f->binder_type != FLOW_BLOCK_BINDER_TYPE_CLSACT_INGRESS) -@@ -574,7 +574,7 @@ int mtk_eth_setup_tc(struct net_device * +@@ -575,7 +575,7 @@ int mtk_eth_setup_tc(struct net_device * int mtk_eth_offload_init(struct mtk_eth *eth) { diff --git a/target/linux/generic/backport-5.15/715-v6.0-net-ethernet-mtk_eth_soc-add-the-capability-to-run-m.patch b/target/linux/generic/backport-5.15/715-v6.0-net-ethernet-mtk_eth_soc-add-the-capability-to-run-m.patch index 4d6dd4dcb44..93860e41457 100644 --- a/target/linux/generic/backport-5.15/715-v6.0-net-ethernet-mtk_eth_soc-add-the-capability-to-run-m.patch +++ b/target/linux/generic/backport-5.15/715-v6.0-net-ethernet-mtk_eth_soc-add-the-capability-to-run-m.patch @@ -307,7 +307,7 @@ Signed-off-by: Lorenzo Bianconi return -EOPNOTSUPP; if (f->binder_type != FLOW_BLOCK_BINDER_TYPE_CLSACT_INGRESS) -@@ -589,8 +589,5 @@ int mtk_eth_setup_tc(struct net_device * +@@ -590,8 +590,5 @@ int mtk_eth_setup_tc(struct net_device * int mtk_eth_offload_init(struct mtk_eth *eth) { diff --git a/target/linux/generic/hack-5.10/711-net-dsa-mv88e6xxx-disable-ATU-violation.patch b/target/linux/generic/hack-5.10/711-net-dsa-mv88e6xxx-disable-ATU-violation.patch index 648134c6d03..ef4635065d1 100644 --- a/target/linux/generic/hack-5.10/711-net-dsa-mv88e6xxx-disable-ATU-violation.patch +++ b/target/linux/generic/hack-5.10/711-net-dsa-mv88e6xxx-disable-ATU-violation.patch @@ -29,7 +29,7 @@ Submitted-by: DENG Qingfang --- a/drivers/net/dsa/mv88e6xxx/chip.c +++ b/drivers/net/dsa/mv88e6xxx/chip.c -@@ -2709,6 +2709,9 @@ static int mv88e6xxx_setup_port(struct m +@@ -2714,6 +2714,9 @@ static int mv88e6xxx_setup_port(struct m if (dsa_is_cpu_port(ds, port)) reg = 0; diff --git a/target/linux/generic/hack-5.10/904-debloat_dma_buf.patch b/target/linux/generic/hack-5.10/904-debloat_dma_buf.patch index 333ed12b066..7bf15c1dd8f 100644 --- a/target/linux/generic/hack-5.10/904-debloat_dma_buf.patch +++ b/target/linux/generic/hack-5.10/904-debloat_dma_buf.patch @@ -72,7 +72,7 @@ Signed-off-by: Felix Fietkau +MODULE_LICENSE("GPL"); --- a/kernel/sched/core.c +++ b/kernel/sched/core.c -@@ -3071,6 +3071,7 @@ int wake_up_state(struct task_struct *p, +@@ -3074,6 +3074,7 @@ int wake_up_state(struct task_struct *p, { return try_to_wake_up(p, state, 0); } diff --git a/target/linux/generic/hack-5.15/711-net-dsa-mv88e6xxx-disable-ATU-violation.patch b/target/linux/generic/hack-5.15/711-net-dsa-mv88e6xxx-disable-ATU-violation.patch index ffa44f09607..e62f45f3c33 100644 --- a/target/linux/generic/hack-5.15/711-net-dsa-mv88e6xxx-disable-ATU-violation.patch +++ b/target/linux/generic/hack-5.15/711-net-dsa-mv88e6xxx-disable-ATU-violation.patch @@ -9,7 +9,7 @@ Subject: [PATCH] net/dsa/mv88e6xxx: disable ATU violation --- a/drivers/net/dsa/mv88e6xxx/chip.c +++ b/drivers/net/dsa/mv88e6xxx/chip.c -@@ -2980,6 +2980,9 @@ static int mv88e6xxx_setup_port(struct m +@@ -2985,6 +2985,9 @@ static int mv88e6xxx_setup_port(struct m else reg = 1 << port; diff --git a/target/linux/generic/pending-5.10/760-net-dsa-mv88e6xxx-fix-vlan-setup.patch b/target/linux/generic/pending-5.10/760-net-dsa-mv88e6xxx-fix-vlan-setup.patch index a9c2f7ed129..9c3b81fefb4 100644 --- a/target/linux/generic/pending-5.10/760-net-dsa-mv88e6xxx-fix-vlan-setup.patch +++ b/target/linux/generic/pending-5.10/760-net-dsa-mv88e6xxx-fix-vlan-setup.patch @@ -17,7 +17,7 @@ Signed-off-by: DENG Qingfang --- a/drivers/net/dsa/mv88e6xxx/chip.c +++ b/drivers/net/dsa/mv88e6xxx/chip.c -@@ -2929,6 +2929,7 @@ static int mv88e6xxx_setup(struct dsa_sw +@@ -2934,6 +2934,7 @@ static int mv88e6xxx_setup(struct dsa_sw chip->ds = ds; ds->slave_mii_bus = mv88e6xxx_default_mdio_bus(chip); diff --git a/target/linux/generic/pending-5.10/768-net-dsa-mv88e6xxx-Request-assisted-learning-on-CPU-port.patch b/target/linux/generic/pending-5.10/768-net-dsa-mv88e6xxx-Request-assisted-learning-on-CPU-port.patch index 10781da152c..07a166125b5 100644 --- a/target/linux/generic/pending-5.10/768-net-dsa-mv88e6xxx-Request-assisted-learning-on-CPU-port.patch +++ b/target/linux/generic/pending-5.10/768-net-dsa-mv88e6xxx-Request-assisted-learning-on-CPU-port.patch @@ -17,7 +17,7 @@ Signed-off-by: Tobias Waldekranz --- a/drivers/net/dsa/mv88e6xxx/chip.c +++ b/drivers/net/dsa/mv88e6xxx/chip.c -@@ -5498,6 +5498,7 @@ static int mv88e6xxx_register_switch(str +@@ -5503,6 +5503,7 @@ static int mv88e6xxx_register_switch(str ds->ops = &mv88e6xxx_switch_ops; ds->ageing_time_min = chip->info->age_time_coeff; ds->ageing_time_max = chip->info->age_time_coeff * U8_MAX; diff --git a/target/linux/generic/pending-5.15/350-mips-bmips-BCM6358-disable-RAC-flush-for-TP1.patch b/target/linux/generic/pending-5.15/350-mips-bmips-BCM6358-disable-RAC-flush-for-TP1.patch deleted file mode 100644 index 1941b853cc6..00000000000 --- a/target/linux/generic/pending-5.15/350-mips-bmips-BCM6358-disable-RAC-flush-for-TP1.patch +++ /dev/null @@ -1,180 +0,0 @@ -From patchwork Fri Mar 17 10:20:04 2023 -Content-Type: text/plain; charset="utf-8" -MIME-Version: 1.0 -Content-Transfer-Encoding: 8bit -X-Patchwork-Submitter: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= - -X-Patchwork-Id: 13178815 -Return-Path: -X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on - aws-us-west-2-korg-lkml-1.web.codeaurora.org -Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) - by smtp.lore.kernel.org (Postfix) with ESMTP id 583F3C6FD1D - for ; Fri, 17 Mar 2023 10:20:18 +0000 (UTC) -Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand - id S230027AbjCQKUQ (ORCPT ); - Fri, 17 Mar 2023 06:20:16 -0400 -Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59114 "EHLO - lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org - with ESMTP id S230044AbjCQKUN (ORCPT - ); Fri, 17 Mar 2023 06:20:13 -0400 -Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com - [IPv6:2a00:1450:4864:20::32f]) - by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D53A3A8C6D; - Fri, 17 Mar 2023 03:20:11 -0700 (PDT) -Received: by mail-wm1-x32f.google.com with SMTP id m35so2981539wms.4; - Fri, 17 Mar 2023 03:20:11 -0700 (PDT) -DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; - d=gmail.com; s=20210112; t=1679048410; - h=content-transfer-encoding:mime-version:references:in-reply-to - :message-id:date:subject:cc:to:from:from:to:cc:subject:date - :message-id:reply-to; - bh=B2zyx3U3AXPDRFjYOKBt3zCYzGwvMHjuxaFvhcNGMYw=; - b=K3QDrLd9/AHTE97KGupZsihjvv1DcPrg2e5kH4N0u/ThdjpSlxk4PJnJ9/W85XPSVY - zfpR2A/7EoOEyo9550zL4/vmpfYl5lHM165L/lkqA7Wk5e/nBD9VnONeb+Ez793paFFp - RxLrZ8g8vsw5NIz3niUCWkssoP2pnhKziF9soVnCQVqJa9NU+K+eBXiQWjYeXVVpf8Ea - AoOekpaWai5FbM4COmKJ/BDQtrJNRfInvBhVWCCkHFy1S5u62UdueveL3+51NeXMtdqz - SetdI7WF1tRyDt+Xg/KfChDi8C0UaNruqs4LXxNzfsB61BFNwRFhSKOZM1Upw0RCaBBt - 0+2Q== -X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; - d=1e100.net; s=20210112; t=1679048410; - h=content-transfer-encoding:mime-version:references:in-reply-to - :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc - :subject:date:message-id:reply-to; - bh=B2zyx3U3AXPDRFjYOKBt3zCYzGwvMHjuxaFvhcNGMYw=; - b=ssmBiLA9DVCYeyC8re6arEIfPSvf12+ZaR/lSBvPJ7neJBPgX28RJgfWLbi9OusC5u - wmSMBZ0qVjMyrcS6sYaOGQ56OxGeHkV1AoCPChp4/4gaWQJmyqY+2oPTGkA2+m0074uL - T2+QW0Lur1M2SHucj+0efX80LEnRxP5vm9AM4eyLIlJ2QQxjgZXugBUhCrbZGXiEP9eB - SdMQGSWQD8CGXoT5XdlsjsoVz1OD3eTQ473h9hoEzJJHt8iaev/cbakU+sXJp47LAOm+ - Z9lFp48X9PYKCMLnIpv9R7wDOZEuVUsFbSt+cWYjYhe/2pk81hq/6GoqwRg49d5RCGYg - 0yJQ== -X-Gm-Message-State: AO0yUKXr0uvEyGo9igqtrAKEBKNPRe53kAqRy0B/zeh/7tt0qOu9YtUj - YMatgtK4nm//OUHE/4+7hlAo/t4+V2+khw== -X-Google-Smtp-Source: - AK7set+XbAcnblyGYtZEQ3m/zbT8wd4QB6ZZhQIf//mcWDT47T1rsYpCDodIx9M1dCI0qTfC6sZw7w== -X-Received: by 2002:a05:600c:540a:b0:3ea:e582:48dd with SMTP id - he10-20020a05600c540a00b003eae58248ddmr24486119wmb.34.1679048409764; - Fri, 17 Mar 2023 03:20:09 -0700 (PDT) -Received: from atlantis.lan (255.red-79-146-124.dynamicip.rima-tde.net. - [79.146.124.255]) - by smtp.gmail.com with ESMTPSA id - 1-20020a05600c234100b003e00c453447sm7336512wmq.48.2023.03.17.03.20.08 - (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); - Fri, 17 Mar 2023 03:20:09 -0700 (PDT) -From: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= -To: f.fainelli@gmail.com, jonas.gorski@gmail.com, - bcm-kernel-feedback-list@broadcom.com, tsbogend@alpha.franken.de, - linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org -Cc: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= -Subject: [PATCH v3] mips: bmips: BCM6358: disable RAC flush for TP1 -Date: Fri, 17 Mar 2023 11:20:04 +0100 -Message-Id: <20230317102004.235879-1-noltari@gmail.com> -X-Mailer: git-send-email 2.30.2 -In-Reply-To: <20230316180518.783613-1-noltari@gmail.com> -References: <20230316180518.783613-1-noltari@gmail.com> -MIME-Version: 1.0 -Precedence: bulk -List-ID: -X-Mailing-List: linux-mips@vger.kernel.org - -RAC flush causes kernel panics on BCM6358 with EHCI/OHCI when booting from TP1: -[ 3.881739] usb 1-1: new high-speed USB device number 2 using ehci-platform -[ 3.895011] Reserved instruction in kernel code[#1]: -[ 3.900113] CPU: 0 PID: 1 Comm: init Not tainted 5.10.16 #0 -[ 3.905829] $ 0 : 00000000 10008700 00000000 77d94060 -[ 3.911238] $ 4 : 7fd1f088 00000000 81431cac 81431ca0 -[ 3.916641] $ 8 : 00000000 ffffefff 8075cd34 00000000 -[ 3.922043] $12 : 806f8d40 f3e812b7 00000000 000d9aaa -[ 3.927446] $16 : 7fd1f068 7fd1f080 7ff559b8 81428470 -[ 3.932848] $20 : 00000000 00000000 55590000 77d70000 -[ 3.938251] $24 : 00000018 00000010 -[ 3.943655] $28 : 81430000 81431e60 81431f28 800157fc -[ 3.949058] Hi : 00000000 -[ 3.952013] Lo : 00000000 -[ 3.955019] epc : 80015808 setup_sigcontext+0x54/0x24c -[ 3.960464] ra : 800157fc setup_sigcontext+0x48/0x24c -[ 3.965913] Status: 10008703 KERNEL EXL IE -[ 3.970216] Cause : 00800028 (ExcCode 0a) -[ 3.974340] PrId : 0002a010 (Broadcom BMIPS4350) -[ 3.979170] Modules linked in: ohci_platform ohci_hcd fsl_mph_dr_of ehci_platform ehci_fsl ehci_hcd gpio_button_hotplug usbcore nls_base usb_common -[ 3.992907] Process init (pid: 1, threadinfo=(ptrval), task=(ptrval), tls=77e22ec8) -[ 4.000776] Stack : 81431ef4 7fd1f080 81431f28 81428470 7fd1f068 81431edc 7ff559b8 81428470 -[ 4.009467] 81431f28 7fd1f080 55590000 77d70000 77d5498c 80015c70 806f0000 8063ae74 -[ 4.018149] 08100002 81431f28 0000000a 08100002 81431f28 0000000a 77d6b418 00000003 -[ 4.026831] ffffffff 80016414 80080734 81431ecc 81431ecc 00000001 00000000 04000000 -[ 4.035512] 77d54874 00000000 00000000 00000000 00000000 00000012 00000002 00000000 -[ 4.044196] ... -[ 4.046706] Call Trace: -[ 4.049238] [<80015808>] setup_sigcontext+0x54/0x24c -[ 4.054356] [<80015c70>] setup_frame+0xdc/0x124 -[ 4.059015] [<80016414>] do_notify_resume+0x1dc/0x288 -[ 4.064207] [<80011b50>] work_notifysig+0x10/0x18 -[ 4.069036] -[ 4.070538] Code: 8fc300b4 00001025 26240008 ac830004 3c048063 0c0228aa 24846a00 26240010 -[ 4.080686] -[ 4.082517] ---[ end trace 22a8edb41f5f983b ]--- -[ 4.087374] Kernel panic - not syncing: Fatal exception -[ 4.092753] Rebooting in 1 seconds.. - -Because the bootloader (CFE) is not initializing the Read-ahead cache properly -on the second thread (TP1). Since the RAC was not initialized properly, we -should avoid flushing it at the risk of corrupting the instruction stream as -seen in the trace above. - -Signed-off-by: Álvaro Fernández Rojas ---- - v3: add changes suggested by Florian: - - Switch to a bool and remove unneeded initialization. - - Remove if from bcm6358_quirks(). - - Improve commit description and bcm6358_quirks() comment. - v2: check if we're running on TP1 and invert logic. - - arch/mips/bmips/dma.c | 5 +++++ - arch/mips/bmips/setup.c | 8 ++++++++ - 2 files changed, 13 insertions(+) - ---- a/arch/mips/bmips/dma.c -+++ b/arch/mips/bmips/dma.c -@@ -64,6 +64,8 @@ phys_addr_t dma_to_phys(struct device *d - return dma_addr; - } - -+bool bmips_rac_flush_disable; -+ - void arch_sync_dma_for_cpu_all(void) - { - void __iomem *cbr = BMIPS_GET_CBR(); -@@ -74,6 +76,9 @@ void arch_sync_dma_for_cpu_all(void) - boot_cpu_type() != CPU_BMIPS4380) - return; - -+ if (unlikely(bmips_rac_flush_disable)) -+ return; -+ - /* Flush stale data out of the readahead cache */ - cfg = __raw_readl(cbr + BMIPS_RAC_CONFIG); - __raw_writel(cfg | 0x100, cbr + BMIPS_RAC_CONFIG); ---- a/arch/mips/bmips/setup.c -+++ b/arch/mips/bmips/setup.c -@@ -34,6 +34,8 @@ - #define REG_BCM6328_OTP ((void __iomem *)CKSEG1ADDR(0x1000062c)) - #define BCM6328_TP1_DISABLED BIT(9) - -+extern bool bmips_rac_flush_disable; -+ - static const unsigned long kbase = VMLINUX_LOAD_ADDRESS & 0xfff00000; - - struct bmips_quirk { -@@ -103,6 +105,12 @@ static void bcm6358_quirks(void) - * disable SMP for now - */ - bmips_smp_enabled = 0; -+ -+ /* -+ * RAC flush causes kernel panics on BCM6358 when booting from TP1 -+ * because the bootloader is not initializing it properly. -+ */ -+ bmips_rac_flush_disable = !!(read_c0_brcm_cmt_local() & (1 << 31)); - } - - static void bcm6368_quirks(void) diff --git a/target/linux/generic/pending-5.15/735-net-ethernet-mtk_eth_soc-fix-flow_offload-related-re.patch b/target/linux/generic/pending-5.15/735-net-ethernet-mtk_eth_soc-fix-flow_offload-related-re.patch deleted file mode 100644 index 95dc6333209..00000000000 --- a/target/linux/generic/pending-5.15/735-net-ethernet-mtk_eth_soc-fix-flow_offload-related-re.patch +++ /dev/null @@ -1,33 +0,0 @@ -From: Felix Fietkau -Date: Mon, 20 Mar 2023 15:49:15 +0100 -Subject: [PATCH] net: ethernet: mtk_eth_soc: fix flow_offload related refcount - bug - -Since we call flow_block_cb_decref on FLOW_BLOCK_UNBIND, we need to call -flow_block_cb_incref unconditionally, even for a newly allocated cb. -Fixes a use-after-free bug. Also fix the accidentally inverted refcount -check on unbind. - -Fixes: 502e84e2382d ("net: ethernet: mtk_eth_soc: add flow offloading support") -Signed-off-by: Felix Fietkau ---- - ---- a/drivers/net/ethernet/mediatek/mtk_ppe_offload.c -+++ b/drivers/net/ethernet/mediatek/mtk_ppe_offload.c -@@ -584,6 +584,7 @@ mtk_eth_setup_tc_block(struct net_device - if (IS_ERR(block_cb)) - return PTR_ERR(block_cb); - -+ flow_block_cb_incref(block_cb); - flow_block_cb_add(block_cb, f); - list_add_tail(&block_cb->driver_list, &block_cb_list); - return 0; -@@ -592,7 +593,7 @@ mtk_eth_setup_tc_block(struct net_device - if (!block_cb) - return -ENOENT; - -- if (flow_block_cb_decref(block_cb)) { -+ if (!flow_block_cb_decref(block_cb)) { - flow_block_cb_remove(block_cb, f); - list_del(&block_cb->driver_list); - } diff --git a/target/linux/generic/pending-5.15/768-net-dsa-mv88e6xxx-Request-assisted-learning-on-CPU-port.patch b/target/linux/generic/pending-5.15/768-net-dsa-mv88e6xxx-Request-assisted-learning-on-CPU-port.patch index 335a2b04ed9..c6b56699c4b 100644 --- a/target/linux/generic/pending-5.15/768-net-dsa-mv88e6xxx-Request-assisted-learning-on-CPU-port.patch +++ b/target/linux/generic/pending-5.15/768-net-dsa-mv88e6xxx-Request-assisted-learning-on-CPU-port.patch @@ -17,7 +17,7 @@ Signed-off-by: Tobias Waldekranz --- a/drivers/net/dsa/mv88e6xxx/chip.c +++ b/drivers/net/dsa/mv88e6xxx/chip.c -@@ -6327,6 +6327,7 @@ static int mv88e6xxx_register_switch(str +@@ -6332,6 +6332,7 @@ static int mv88e6xxx_register_switch(str ds->ops = &mv88e6xxx_switch_ops; ds->ageing_time_min = chip->info->age_time_coeff; ds->ageing_time_max = chip->info->age_time_coeff * U8_MAX; diff --git a/target/linux/mpc85xx/base-files/etc/board.d/01_leds b/target/linux/mpc85xx/base-files/etc/board.d/01_leds index 391c909e4cd..d9b4d2d79d3 100644 --- a/target/linux/mpc85xx/base-files/etc/board.d/01_leds +++ b/target/linux/mpc85xx/base-files/etc/board.d/01_leds @@ -8,6 +8,7 @@ boardname="${board##*,}" board_config_update case $board in +enterasys,ws-ap3715i|\ extreme-networks,ws-ap3825i) ucidef_set_led_netdev "lan1" "LAN1" "green:lan1" "eth1" ucidef_set_led_netdev "lan2" "LAN2" "green:lan2" "eth0" diff --git a/target/linux/mpc85xx/base-files/etc/board.d/02_network b/target/linux/mpc85xx/base-files/etc/board.d/02_network index 77e208c7faa..04c27769a93 100644 --- a/target/linux/mpc85xx/base-files/etc/board.d/02_network +++ b/target/linux/mpc85xx/base-files/etc/board.d/02_network @@ -9,7 +9,8 @@ board_config_update board=$(board_name) case "$board" in -aerohive,hiveap-330) +aerohive,hiveap-330|\ +enterasys,ws-ap3715i) ucidef_set_interfaces_lan_wan "eth1" "eth0" ;; ocedo,panda) diff --git a/target/linux/mpc85xx/base-files/etc/hotplug.d/ieee80211/10-fix-wifi-mac b/target/linux/mpc85xx/base-files/etc/hotplug.d/ieee80211/10-fix-wifi-mac index 8050c7bea27..20ad8eb44f4 100644 --- a/target/linux/mpc85xx/base-files/etc/hotplug.d/ieee80211/10-fix-wifi-mac +++ b/target/linux/mpc85xx/base-files/etc/hotplug.d/ieee80211/10-fix-wifi-mac @@ -12,6 +12,10 @@ PHYNBR=${DEVPATH##*/phy} board=$(board_name) case "$board" in +enterasys,ws-ap3715i) + [ "$PHYNBR" -eq 0 ] && mtd_get_mac_ascii cfg2 RADIOADDR1 > /sys${DEVPATH}/macaddress + [ "$PHYNBR" -eq 1 ] && mtd_get_mac_ascii cfg2 RADIOADDR0 > /sys${DEVPATH}/macaddress + ;; enterasys,ws-ap3710i|\ extreme-networks,ws-ap3825i) mtd_get_mac_ascii cfg2 RADIOADDR${PHYNBR} > /sys${DEVPATH}/macaddress diff --git a/target/linux/mpc85xx/base-files/lib/preinit/10_fix_eth_mac.sh b/target/linux/mpc85xx/base-files/lib/preinit/10_fix_eth_mac.sh index 0d9058420b7..ddb9bef1416 100644 --- a/target/linux/mpc85xx/base-files/lib/preinit/10_fix_eth_mac.sh +++ b/target/linux/mpc85xx/base-files/lib/preinit/10_fix_eth_mac.sh @@ -3,6 +3,7 @@ preinit_set_mac_address() { case $(board_name) in + enterasys,ws-ap3715i|\ extreme-networks,ws-ap3825i) ip link set dev eth0 address $(mtd_get_mac_ascii cfg1 ethaddr) ip link set dev eth1 address $(mtd_get_mac_ascii cfg1 eth1addr) diff --git a/target/linux/mpc85xx/config-5.15 b/target/linux/mpc85xx/config-5.15 index ab2eef94cdc..42d17c13610 100644 --- a/target/linux/mpc85xx/config-5.15 +++ b/target/linux/mpc85xx/config-5.15 @@ -262,6 +262,7 @@ CONFIG_VDSO32=y CONFIG_VM_EVENT_COUNTERS=y CONFIG_WATCHDOG_CORE=y # CONFIG_WS_AP3710I is not set +# CONFIG_WS_AP3715I is not set # CONFIG_WS_AP3825I is not set # CONFIG_XES_MPC85xx is not set CONFIG_XZ_DEC_BCJ=y diff --git a/target/linux/mpc85xx/files/arch/powerpc/boot/dts/ws-ap3715i.dts b/target/linux/mpc85xx/files/arch/powerpc/boot/dts/ws-ap3715i.dts new file mode 100644 index 00000000000..d13952acae8 --- /dev/null +++ b/target/linux/mpc85xx/files/arch/powerpc/boot/dts/ws-ap3715i.dts @@ -0,0 +1,293 @@ +// SPDX-License-Identifier: GPL-2.0-or-later or MIT + +#include + +/include/ "fsl/p1010si-pre.dtsi" + +/ { + model = "Enterasys WS-AP3715i"; + compatible = "enterasys,ws-ap3715i"; + + aliases { + led-boot = &led_power_green; + led-failsafe = &led_power_red; + led-running = &led_power_green; + led-upgrade = &led_power_red; + label-mac-device = &enet0; + }; + + chosen { + bootargs = "console=ttyS0,115200"; + }; + + memory { + device_type = "memory"; + reg = <0x0 0x0 0x0 0x10000000>; + }; + + leds { + compatible = "gpio-leds"; + + wifi1 { + gpios = <&spi_gpio 3 GPIO_ACTIVE_HIGH>; + label = "green:radio1"; + linux,default-trigger = "phy1tpt"; + }; + + wifi2 { + gpios = <&spi_gpio 2 GPIO_ACTIVE_HIGH>; + label = "green:radio2"; + linux,default-trigger = "phy0tpt"; + }; + + led_power_green: power_green { + gpios = <&spi_gpio 0 GPIO_ACTIVE_HIGH>; + label = "green:power"; + }; + + led_power_red: power_red { + gpios = <&spi_gpio 1 GPIO_ACTIVE_HIGH>; + label = "red:power"; + }; + + lan1_red { + gpios = <&spi_gpio 6 GPIO_ACTIVE_HIGH>; + label = "red:lan1"; + }; + + lan1_green { + gpios = <&spi_gpio 4 GPIO_ACTIVE_HIGH>; + label = "green:lan1"; + }; + + lan2_red { + gpios = <&spi_gpio 7 GPIO_ACTIVE_HIGH>; + label = "red:lan2"; + }; + + lan2_green { + gpios = <&spi_gpio 5 GPIO_ACTIVE_HIGH>; + label = "green:lan2"; + }; + }; + + soc: soc@ffe00000 { + ranges = <0x0 0x0 0xffe00000 0x100000>; + + gpio0: gpio-controller@fc00 { + }; + + usb@22000 { + status = "disabled"; + }; + + mdio@24000 { + phy0: ethernet-phy@0 { + reg = <0x1>; + }; + + phy2: ethernet-phy@2 { + reg = <0x2>; + }; + }; + + mdio@25000 { + tbi_phy: tbi-phy@11 { + reg = <0x11>; + }; + }; + + mdio@26000 { + status = "disabled"; + }; + + enet0: ethernet@b0000 { + phy-handle = <&phy0>; + phy-connection-type = "rgmii-id"; + + label = "lan1"; + }; + + enet1: ethernet@b1000 { + phy-handle = <&phy2>; + phy-connection-type = "sgmii"; + + tbi-handle = <&tbi_phy>; + + label = "lan2"; + }; + + enet2: ethernet@b2000 { + status = "disabled"; + }; + + sdhc@2e000 { + status = "disabled"; + }; + }; + + ifc: ifc@ffe1e000 { + }; + + pci0: pcie@ffe09000 { + reg = <0 0xffe09000 0 0x1000>; + ranges = <0x2000000 0x0 0xa0000000 0 0xa0000000 0x0 0x20000000 + 0x1000000 0x0 0x00000000 0 0xffc10000 0x0 0x10000>; + pcie@0 { + ranges = <0x2000000 0x0 0xa0000000 + 0x2000000 0x0 0xa0000000 + 0x0 0x20000000 + + 0x1000000 0x0 0x0 + 0x1000000 0x0 0x0 + 0x0 0x100000>; + + wifi@0,0,0 { + compatible = "pci168c,0033"; + reg = <0x0 0 0 0 0>; + ieee80211-freq-limit = <2400000 2500000>; + }; + }; + }; + + pci1: pcie@ffe0a000 { + reg = <0 0xffe0a000 0 0x1000>; + ranges = <0x2000000 0x0 0x80000000 0 0x80000000 0x0 0x20000000 + 0x1000000 0x0 0x00000000 0 0xffc00000 0x0 0x10000>; + pcie@0 { + ranges = <0x2000000 0x0 0x80000000 + 0x2000000 0x0 0x80000000 + 0x0 0x20000000 + + 0x1000000 0x0 0x0 + 0x1000000 0x0 0x0 + 0x0 0x100000>; + + wifi@0,0,0 { + compatible = "pci168c,0033"; + reg = <0x0 0 0 0 0>; + ieee80211-freq-limit = <5000000 6000000>; + }; + }; + }; +}; + +&soc { + led_spi { + compatible = "spi-gpio"; + #address-cells = <1>; + #size-cells = <0>; + + sck-gpios = <&gpio0 10 GPIO_ACTIVE_HIGH>; + mosi-gpios = <&gpio0 11 GPIO_ACTIVE_HIGH>; + num-chipselects = <0>; + + spi_gpio: led_gpio@0 { + compatible = "fairchild,74hc595"; + reg = <0>; + gpio-controller; + #gpio-cells = <2>; + registers-number = <1>; + spi-max-frequency = <100000>; + }; + }; + + spi0: spi@7000 { + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <25000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + reg = <0x0 0xa0000>; + label = "boot-bak"; + read-only; + }; + + partition@a0000 { + reg = <0xa0000 0xa0000>; + label = "boot-pri"; + read-only; + }; + + partition@120000 { + reg = <0x120000 0x10000>; + label = "cfg1"; + read-only; + }; + + partition@130000 { + reg = <0x130000 0x10000>; + label = "cfg2"; + read-only; + }; + + partition@140000 { + compatible = "denx,uimage"; + reg = <0x140000 0x1d80000>; + label = "firmware"; + }; + + partition@1ec0000 { + reg = <0x1ec0000 0x100000>; + label = "nvram"; + read-only; + }; + }; + }; + }; +}; + +/include/ "fsl/p1010si-post.dtsi" + +/ { + cpus { + PowerPC,P1010@0 { + bus-frequency = <399999996>; + timebase-frequency = <50000000>; + clock-frequency = <799999992>; + d-cache-block-size = <0x20>; + d-cache-size = <0x8000>; + d-cache-sets = <0x80>; + i-cache-block-size = <0x20>; + i-cache-size = <0x8000>; + i-cache-sets = <0x80>; + }; + }; + + soc@ffe00000 { + bus-frequency = <399999996>; + + serial@4600 { + clock-frequency = <399999996>; + status = "disabled"; + }; + + serial@4500 { + clock-frequency = <399999996>; + }; + + pic@40000 { + clock-frequency = <399999996>; + }; + }; +}; + +/* + * For the OpenWrt 22.03 release, since Linux 5.10.138 now uses + * aliases to determine PCI domain numbers, drop aliases so as not to + * change the sysfs path of our wireless netdevs. + */ + +/ { + aliases { + /delete-property/ pci0; + /delete-property/ pci1; + }; +}; + diff --git a/target/linux/mpc85xx/files/arch/powerpc/boot/dts/ws-ap3825i.dts b/target/linux/mpc85xx/files/arch/powerpc/boot/dts/ws-ap3825i.dts index 684bd725484..a347900e5df 100644 --- a/target/linux/mpc85xx/files/arch/powerpc/boot/dts/ws-ap3825i.dts +++ b/target/linux/mpc85xx/files/arch/powerpc/boot/dts/ws-ap3825i.dts @@ -20,6 +20,7 @@ chosen { bootargs-override = "console=ttyS0,115200"; + linux,stdout-path = &serial0; }; memory { @@ -198,6 +199,13 @@ ranges = <0x2000000 0x0 0xa0000000 0 0xa0000000 0x0 0x20000000 0x1000000 0x0 0x00000000 0 0xffc10000 0x0 0x10000>; reg = <0 0xffe09000 0 0x1000>; + + /* Filled by U-Boot */ + bus-range = <0x00 0x01>; + dma-ranges = <0x2000000 0x00 0xfff00000 0x00 0xffe00000 + 0x00 0x100000 0x42000000 0x00 0x00 0x00 + 0x00 0x00 0x10000000>; + pcie@0 { ranges = <0x2000000 0x0 0xa0000000 0x2000000 0x0 0xa0000000 @@ -213,6 +221,13 @@ reg = <0 0xffe0a000 0 0x1000>; ranges = <0x2000000 0x0 0x80000000 0 0x80000000 0x0 0x20000000 0x1000000 0x0 0x00000000 0 0xffc00000 0x0 0x10000>; + + /* Filled by U-Boot */ + bus-range = <0x00 0x01>; + dma-ranges = <0x2000000 0x00 0xfff00000 0x00 + 0xffe00000 0x00 0x100000 0x42000000 + 0x00 0x00 0x00 0x00 0x00 0x10000000>; + pcie@0 { ranges = <0x2000000 0x0 0x80000000 0x2000000 0x0 0x80000000 @@ -254,7 +269,7 @@ / { cpus { - PowerPC,P1010@0 { + PowerPC,P1020@0 { bus-frequency = <399999996>; timebase-frequency = <50000000>; clock-frequency = <799999992>; @@ -264,9 +279,12 @@ i-cache-block-size = <0x20>; i-cache-size = <0x8000>; i-cache-sets = <0x80>; + cpu-release-addr = <0x0 0x0ffff280>; + status = "okay"; + enable-method = "spin-table"; }; - PowerPC,P1010@1 { + PowerPC,P1020@1 { bus-frequency = <399999996>; timebase-frequency = <50000000>; clock-frequency = <799999992>; @@ -276,11 +294,15 @@ i-cache-block-size = <0x20>; i-cache-size = <0x8000>; i-cache-sets = <0x80>; + cpu-release-addr = <0x0 0x0ffff2a0>; + status = "disabled"; + enable-method = "spin-table"; }; }; memory { - reg = <0x0 0x0 0x0 0x10000000>; + /* Reserve upper MB for second-core-bootpage */ + reg = <0x0 0x0 0x0 0xff00000>; }; soc@ffe00000 { @@ -298,6 +320,22 @@ clock-frequency = <399999996>; }; }; + + localbus@ffe05000 { + bus-frequency = <24999999>; + }; +}; + +&enet0 { + rx-stash-idx = <0x00>; + rx-stash-len = <0x60>; + bd-stash; +}; + +&enet2 { + rx-stash-idx = <0x00>; + rx-stash-len = <0x60>; + bd-stash; }; /* diff --git a/target/linux/mpc85xx/files/arch/powerpc/platforms/85xx/ws-ap3715i.c b/target/linux/mpc85xx/files/arch/powerpc/platforms/85xx/ws-ap3715i.c new file mode 100644 index 00000000000..aa2a366b3db --- /dev/null +++ b/target/linux/mpc85xx/files/arch/powerpc/platforms/85xx/ws-ap3715i.c @@ -0,0 +1,87 @@ +// SPDX-License-Identifier: GPL-2.0-or-later + +/* + * Enterasys WS-AP3715i Board Setup + * + * Copyright (C) 2023 David Bauer + * + * Based on: + * p1010rdb.c: + * P1010 RDB Board Setup + * Copyright 2011 Freescale Semiconductor Inc. + * + * This program 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. + */ + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include "mpc85xx.h" + +void __init wsap3715i_pic_init(void) +{ + struct mpic *mpic; + + mpic = mpic_alloc(NULL, 0, + MPIC_BIG_ENDIAN | MPIC_SINGLE_DEST_CPU, + 0, 256, " OpenPIC "); + + BUG_ON(mpic == NULL); + mpic_init(mpic); +} + +/* + * Setup the architecture + */ +static void __init wsap3715i_setup_arch(void) +{ + if (ppc_md.progress) + ppc_md.progress("wsap3715i_setup_arch()", 0); + + fsl_pci_assign_primary(); + + pr_info("WS-AP3715i from Enterasys\n"); +} + +machine_arch_initcall(wsap3715i, mpc85xx_common_publish_devices); + +/* + * Called very early, device-tree isn't unflattened + */ +static int __init wsap3715i_probe(void) +{ + if (of_machine_is_compatible("enterasys,ws-ap3715i")) + return 1; + return 0; +} + +define_machine(wsap3715i) { + .name = "P1010 RDB", + .probe = wsap3715i_probe, + .setup_arch = wsap3715i_setup_arch, + .init_IRQ = wsap3715i_pic_init, +#ifdef CONFIG_PCI + .pcibios_fixup_bus = fsl_pcibios_fixup_bus, + .pcibios_fixup_phb = fsl_pcibios_fixup_phb, +#endif + .get_irq = mpic_get_irq, + .calibrate_decr = generic_calibrate_decr, + .progress = udbg_progress, +}; diff --git a/target/linux/mpc85xx/image/p1010.mk b/target/linux/mpc85xx/image/p1010.mk index 90ef46d7097..034f6abc40c 100644 --- a/target/linux/mpc85xx/image/p1010.mk +++ b/target/linux/mpc85xx/image/p1010.mk @@ -14,6 +14,19 @@ define Build/spi-loader-okli mv "$@.new" "$@" endef +define Device/enterasys_ws-ap3715i + DEVICE_VENDOR := Enterasys + DEVICE_MODEL := WS-AP3715i + BLOCKSIZE := 64k + KERNEL_NAME := simpleImage.ws-ap3715i + KERNEL_ENTRY := 0x1000000 + KERNEL_LOADADDR := 0x1000000 + KERNEL = kernel-bin | lzma | uImage lzma + IMAGES := sysupgrade.bin + IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata +endef +TARGET_DEVICES += enterasys_ws-ap3715i + define Device/tplink_tl-wdr4900-v1 DEVICE_VENDOR := TP-Link DEVICE_MODEL := TL-WDR4900 diff --git a/target/linux/mpc85xx/image/p1020.mk b/target/linux/mpc85xx/image/p1020.mk index 1f17de3f55f..d3d7f93ddda 100644 --- a/target/linux/mpc85xx/image/p1020.mk +++ b/target/linux/mpc85xx/image/p1020.mk @@ -76,7 +76,7 @@ define Device/extreme-networks_ws-ap3825i KERNEL_NAME := simpleImage.ws-ap3825i KERNEL_ENTRY := 0x1000000 KERNEL_LOADADDR := 0x1000000 - KERNEL = kernel-bin | lzma | fit lzma $(KDIR)/image-$$(DEVICE_DTS).dtb + KERNEL = kernel-bin | fit none $(KDIR)/image-$$(DEVICE_DTS).dtb IMAGES := sysupgrade.bin IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata endef diff --git a/target/linux/mpc85xx/p1010/config-default b/target/linux/mpc85xx/p1010/config-default index 53e077b6c2e..6af6b8e0970 100644 --- a/target/linux/mpc85xx/p1010/config-default +++ b/target/linux/mpc85xx/p1010/config-default @@ -1,9 +1,11 @@ CONFIG_AT803X_PHY=y CONFIG_CMDLINE_OVERRIDE=y # CONFIG_FSL_CORENET_CF is not set +CONFIG_GPIO_74X164=y CONFIG_MTD_NAND_FSL_IFC=y CONFIG_MTD_SPLIT_FIRMWARE=y CONFIG_MTD_SPLIT_TPLINK_FW=y +CONFIG_MTD_SPLIT_UIMAGE_FW=y CONFIG_MTD_UBI=y CONFIG_MTD_UBI_BEB_LIMIT=20 CONFIG_MTD_UBI_BLOCK=y @@ -18,6 +20,8 @@ CONFIG_REALTEK_PHY=y CONFIG_RED_15W_REV1=y CONFIG_REGMAP=y CONFIG_REGULATOR=y +CONFIG_SPI_GPIO=y CONFIG_TL_WDR4900_V1=y CONFIG_UBIFS_FS=y +CONFIG_WS_AP3715I=y CONFIG_FIREBOX_T10=y \ No newline at end of file diff --git a/target/linux/mpc85xx/p1010/target.mk b/target/linux/mpc85xx/p1010/target.mk index 86628e32dac..fa1bb7542d7 100644 --- a/target/linux/mpc85xx/p1010/target.mk +++ b/target/linux/mpc85xx/p1010/target.mk @@ -1,5 +1,5 @@ BOARDNAME:=P1010 -KERNEL_IMAGES:=simpleImage.tl-wdr4900-v1 +KERNEL_IMAGES:=simpleImage.tl-wdr4900-v1 simpleImage.ws-ap3715i define Target/Description Build firmware images for P1010 based boards. diff --git a/target/linux/mpc85xx/patches-5.10/107-powerpc-85xx-add-ws-ap3825i-support.patch b/target/linux/mpc85xx/patches-5.10/107-powerpc-85xx-add-ws-ap3825i-support.patch index 1829a78ec47..89c58078de2 100644 --- a/target/linux/mpc85xx/patches-5.10/107-powerpc-85xx-add-ws-ap3825i-support.patch +++ b/target/linux/mpc85xx/patches-5.10/107-powerpc-85xx-add-ws-ap3825i-support.patch @@ -35,3 +35,31 @@ WS-AP3825i AP. obj-$(CONFIG_CORENET_GENERIC) += corenet_generic.o obj-$(CONFIG_FB_FSL_DIU) += t1042rdb_diu.o obj-$(CONFIG_RED_15W_REV1) += red15w_rev1.o +--- a/arch/powerpc/boot/Makefile ++++ b/arch/powerpc/boot/Makefile +@@ -159,6 +159,7 @@ src-plat-$(CONFIG_PPC_POWERNV) += pserie + src-plat-$(CONFIG_PPC_IBM_CELL_BLADE) += pseries-head.S + src-plat-$(CONFIG_MVME7100) += motload-head.S mvme7100.c + src-plat-$(CONFIG_TL_WDR4900_V1) += simpleboot.c fixed-head.S ++src-plat-$(CONFIG_WS_AP3825I) += simpleboot.c fixed-head.S + + src-wlib := $(sort $(src-wlib-y)) + src-plat := $(sort $(src-plat-y)) +@@ -339,6 +340,7 @@ image-$(CONFIG_TQM8560) += cuImage.tqm + image-$(CONFIG_SBC8548) += cuImage.sbc8548 + image-$(CONFIG_KSI8560) += cuImage.ksi8560 + image-$(CONFIG_TL_WDR4900_V1) += simpleImage.tl-wdr4900-v1 ++image-$(CONFIG_WS_AP3825I) += simpleImage.ws-ap3825i + # Board ports in arch/powerpc/platform/86xx/Kconfig + image-$(CONFIG_MVME7100) += dtbImage.mvme7100 + +--- a/arch/powerpc/boot/wrapper ++++ b/arch/powerpc/boot/wrapper +@@ -324,6 +324,7 @@ adder875-redboot) + platformo="$object/fixed-head.o $object/redboot-8xx.o" + binary=y + ;; ++simpleboot-ws-ap3825i|\ + simpleboot-tl-wdr4900-v1) + platformo="$object/fixed-head.o $object/simpleboot.o" + link_address='0x1000000' diff --git a/target/linux/mpc85xx/patches-5.10/109-powerpc-85xx-add-ws-ap3715i-support.patch b/target/linux/mpc85xx/patches-5.10/109-powerpc-85xx-add-ws-ap3715i-support.patch new file mode 100644 index 00000000000..10ba7448971 --- /dev/null +++ b/target/linux/mpc85xx/patches-5.10/109-powerpc-85xx-add-ws-ap3715i-support.patch @@ -0,0 +1,50 @@ +--- a/arch/powerpc/platforms/85xx/Kconfig ++++ b/arch/powerpc/platforms/85xx/Kconfig +@@ -82,6 +82,17 @@ config WS_AP3710I + This board is a Concurrent Dual-Band wireless access point with a + Freescale P1020 SoC. + ++config WS_AP3715I ++ bool "Enterasys WS-AP3715i" ++ select DEFAULT_UIMAGE ++ select ARCH_REQUIRE_GPIOLIB ++ select GPIO_MPC8XXX ++ help ++ This option enables support for the Enterasys WS-AP3715i board. ++ ++ This board is a Concurrent Dual-Band wireless access point with a ++ Freescale P1010 SoC. ++ + config WS_AP3825I + bool "Extreme Networks WS-AP3825i" + select DEFAULT_UIMAGE +--- a/arch/powerpc/platforms/85xx/Makefile ++++ b/arch/powerpc/platforms/85xx/Makefile +@@ -27,6 +27,7 @@ obj-$(CONFIG_P1023_RDB) += p1023_rdb.o + obj-$(CONFIG_PANDA) += panda.o + obj-$(CONFIG_TWR_P102x) += twr_p102x.o + obj-$(CONFIG_WS_AP3710I) += ws-ap3710i.o ++obj-$(CONFIG_WS_AP3715I) += ws-ap3715i.o + obj-$(CONFIG_WS_AP3825I) += ws-ap3825i.o + obj-$(CONFIG_FIREBOX_T10) += firebox_t10.o + obj-$(CONFIG_CORENET_GENERIC) += corenet_generic.o +--- a/arch/powerpc/boot/Makefile ++++ b/arch/powerpc/boot/Makefile +@@ -340,6 +340,7 @@ image-$(CONFIG_TQM8560) += cuImage.tqm + image-$(CONFIG_SBC8548) += cuImage.sbc8548 + image-$(CONFIG_KSI8560) += cuImage.ksi8560 + image-$(CONFIG_TL_WDR4900_V1) += simpleImage.tl-wdr4900-v1 ++image-$(CONFIG_WS_AP3715I) += simpleImage.ws-ap3715i + image-$(CONFIG_WS_AP3825I) += simpleImage.ws-ap3825i + # Board ports in arch/powerpc/platform/86xx/Kconfig + image-$(CONFIG_MVME7100) += dtbImage.mvme7100 +--- a/arch/powerpc/boot/wrapper ++++ b/arch/powerpc/boot/wrapper +@@ -324,6 +324,7 @@ adder875-redboot) + platformo="$object/fixed-head.o $object/redboot-8xx.o" + binary=y + ;; ++simpleboot-ws-ap3715i|\ + simpleboot-ws-ap3825i|\ + simpleboot-tl-wdr4900-v1) + platformo="$object/fixed-head.o $object/simpleboot.o" diff --git a/target/linux/mpc85xx/patches-5.10/900-powerpc-bootwrapper-disable-uImage-generation.patch b/target/linux/mpc85xx/patches-5.10/900-powerpc-bootwrapper-disable-uImage-generation.patch index 0f784a10512..86a1ea902e4 100644 --- a/target/linux/mpc85xx/patches-5.10/900-powerpc-bootwrapper-disable-uImage-generation.patch +++ b/target/linux/mpc85xx/patches-5.10/900-powerpc-bootwrapper-disable-uImage-generation.patch @@ -16,7 +16,7 @@ Signed-off-by: David Bauer --- a/arch/powerpc/boot/Makefile +++ b/arch/powerpc/boot/Makefile -@@ -265,7 +265,6 @@ image-$(CONFIG_PPC_CHRP) += zImage.chrp +@@ -266,7 +266,6 @@ image-$(CONFIG_PPC_CHRP) += zImage.chrp image-$(CONFIG_PPC_EFIKA) += zImage.chrp image-$(CONFIG_PPC_PMAC) += zImage.pmac image-$(CONFIG_PPC_HOLLY) += dtbImage.holly @@ -24,7 +24,7 @@ Signed-off-by: David Bauer image-$(CONFIG_EPAPR_BOOT) += zImage.epapr # -@@ -396,15 +395,6 @@ $(obj)/dtbImage.%: vmlinux $(wrapperbits +@@ -399,15 +398,6 @@ $(obj)/dtbImage.%: vmlinux $(wrapperbits $(obj)/vmlinux.strip: vmlinux $(STRIP) -s -R .comment $< -o $@ diff --git a/target/linux/mpc85xx/patches-5.15/109-powerpc-85xx-add-ws-ap3715i-support.patch b/target/linux/mpc85xx/patches-5.15/109-powerpc-85xx-add-ws-ap3715i-support.patch new file mode 100644 index 00000000000..8272d9dd2ae --- /dev/null +++ b/target/linux/mpc85xx/patches-5.15/109-powerpc-85xx-add-ws-ap3715i-support.patch @@ -0,0 +1,50 @@ +--- a/arch/powerpc/platforms/85xx/Kconfig ++++ b/arch/powerpc/platforms/85xx/Kconfig +@@ -82,6 +82,17 @@ config WS_AP3710I + This board is a Concurrent Dual-Band wireless access point with a + Freescale P1020 SoC. + ++config WS_AP3715I ++ bool "Enterasys WS-AP3715i" ++ select DEFAULT_UIMAGE ++ select ARCH_REQUIRE_GPIOLIB ++ select GPIO_MPC8XXX ++ help ++ This option enables support for the Enterasys WS-AP3715i board. ++ ++ This board is a Concurrent Dual-Band wireless access point with a ++ Freescale P1010 SoC. ++ + config WS_AP3825I + bool "Extreme Networks WS-AP3825i" + select DEFAULT_UIMAGE +--- a/arch/powerpc/platforms/85xx/Makefile ++++ b/arch/powerpc/platforms/85xx/Makefile +@@ -27,6 +27,7 @@ obj-$(CONFIG_P1023_RDB) += p1023_rdb.o + obj-$(CONFIG_PANDA) += panda.o + obj-$(CONFIG_TWR_P102x) += twr_p102x.o + obj-$(CONFIG_WS_AP3710I) += ws-ap3710i.o ++obj-$(CONFIG_WS_AP3715I) += ws-ap3715i.o + obj-$(CONFIG_WS_AP3825I) += ws-ap3825i.o + obj-$(CONFIG_FIREBOX_T10) += firebox_t10.o + obj-$(CONFIG_CORENET_GENERIC) += corenet_generic.o +--- a/arch/powerpc/boot/Makefile ++++ b/arch/powerpc/boot/Makefile +@@ -346,6 +346,7 @@ image-$(CONFIG_TQM8555) += cuImage.tqm + image-$(CONFIG_TQM8560) += cuImage.tqm8560 + image-$(CONFIG_KSI8560) += cuImage.ksi8560 + image-$(CONFIG_TL_WDR4900_V1) += simpleImage.tl-wdr4900-v1 ++image-$(CONFIG_WS_AP3715I) += simpleImage.ws-ap3715i + image-$(CONFIG_WS_AP3825I) += simpleImage.ws-ap3825i + # Board ports in arch/powerpc/platform/86xx/Kconfig + image-$(CONFIG_MVME7100) += dtbImage.mvme7100 +--- a/arch/powerpc/boot/wrapper ++++ b/arch/powerpc/boot/wrapper +@@ -326,6 +326,7 @@ adder875-redboot) + platformo="$object/fixed-head.o $object/redboot-8xx.o" + binary=y + ;; ++simpleboot-ws-ap3715i|\ + simpleboot-ws-ap3825i|\ + simpleboot-tl-wdr4900-v1) + platformo="$object/fixed-head.o $object/simpleboot.o" diff --git a/target/linux/mpc85xx/patches-5.15/900-powerpc-bootwrapper-disable-uImage-generation.patch b/target/linux/mpc85xx/patches-5.15/900-powerpc-bootwrapper-disable-uImage-generation.patch index dfd26a66039..66935c04b7c 100644 --- a/target/linux/mpc85xx/patches-5.15/900-powerpc-bootwrapper-disable-uImage-generation.patch +++ b/target/linux/mpc85xx/patches-5.15/900-powerpc-bootwrapper-disable-uImage-generation.patch @@ -24,7 +24,7 @@ Signed-off-by: David Bauer image-$(CONFIG_EPAPR_BOOT) += zImage.epapr # -@@ -406,15 +405,6 @@ $(obj)/dtbImage.%: vmlinux $(wrapperbits +@@ -407,15 +406,6 @@ $(obj)/dtbImage.%: vmlinux $(wrapperbits $(obj)/vmlinux.strip: vmlinux $(STRIP) -s -R .comment $< -o $@ diff --git a/target/linux/ramips/dts/mt7621_dlink_dap-x1860-a1.dts b/target/linux/ramips/dts/mt7621_dlink_dap-x1860-a1.dts index edc1c6544c0..1aa3f7c91b7 100644 --- a/target/linux/ramips/dts/mt7621_dlink_dap-x1860-a1.dts +++ b/target/linux/ramips/dts/mt7621_dlink_dap-x1860-a1.dts @@ -94,6 +94,13 @@ status = "okay"; mediatek,nmbm; + /* rsvd = Remapping Range / NAND Erase-Size */ + /* rsvd = 0x800000 / 0x20000 */ + mediatek,bmt-max-reserved-blocks = <64>; + /* Remapping should include raw-nand we operate upon without UBI layer. */ + /* This includes (at least) the kernel which has to be loaded by U-Boot.*/ + mediatek,bmt-remap-range = + <0x0 0x980000>; partitions { compatible = "fixed-partitions"; diff --git a/target/linux/ramips/dts/mt7628an_tplink_re305-v3.dts b/target/linux/ramips/dts/mt7628an_tplink_re305-v3.dts index 652aebec834..21df0fb3e69 100644 --- a/target/linux/ramips/dts/mt7628an_tplink_re305-v3.dts +++ b/target/linux/ramips/dts/mt7628an_tplink_re305-v3.dts @@ -13,7 +13,7 @@ flash@0 { compatible = "jedec,spi-nor"; reg = <0>; - spi-max-frequency = <50000000>; + spi-max-frequency = <10000000>; partitions { compatible = "fixed-partitions"; diff --git a/target/linux/ramips/image/common-sercomm.mk b/target/linux/ramips/image/common-sercomm.mk index 1cd6d1ece77..83bb2a742c9 100644 --- a/target/linux/ramips/image/common-sercomm.mk +++ b/target/linux/ramips/image/common-sercomm.mk @@ -51,7 +51,7 @@ define Build/sercomm-payload $(TOPDIR)/scripts/sercomm-payload.py \ --input-file $@ \ --output-file $@.tmp \ - --pid "$$(cat $@.pid | od -t x1 -An -v | tr -d '\n')" + --pid-file $@.pid mv $@.tmp $@ rm $@.pid endef diff --git a/target/linux/ramips/patches-5.10/720-Revert-net-phy-simplify-phy_link_change-arguments.patch b/target/linux/ramips/patches-5.10/720-Revert-net-phy-simplify-phy_link_change-arguments.patch index 6e8b4882901..f3df206f3e1 100644 --- a/target/linux/ramips/patches-5.10/720-Revert-net-phy-simplify-phy_link_change-arguments.patch +++ b/target/linux/ramips/patches-5.10/720-Revert-net-phy-simplify-phy_link_change-arguments.patch @@ -16,7 +16,7 @@ still required by target/linux/ramips/files/drivers/net/ethernet/ralink/mdio.c --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c -@@ -58,13 +58,13 @@ static const char *phy_state_to_str(enum +@@ -70,13 +70,13 @@ static void phy_process_state_change(str static void phy_link_up(struct phy_device *phydev) { @@ -33,7 +33,7 @@ still required by target/linux/ramips/files/drivers/net/ethernet/ralink/mdio.c phy_led_trigger_change_speed(phydev); } -@@ -572,7 +572,7 @@ int phy_start_cable_test(struct phy_devi +@@ -584,7 +584,7 @@ int phy_start_cable_test(struct phy_devi goto out; /* Mark the carrier down until the test is complete */ @@ -42,7 +42,7 @@ still required by target/linux/ramips/files/drivers/net/ethernet/ralink/mdio.c netif_testing_on(dev); err = phydev->drv->cable_test_start(phydev); -@@ -643,7 +643,7 @@ int phy_start_cable_test_tdr(struct phy_ +@@ -655,7 +655,7 @@ int phy_start_cable_test_tdr(struct phy_ goto out; /* Mark the carrier down until the test is complete */ @@ -51,7 +51,7 @@ still required by target/linux/ramips/files/drivers/net/ethernet/ralink/mdio.c netif_testing_on(dev); err = phydev->drv->cable_test_tdr_start(phydev, config); -@@ -714,7 +714,7 @@ static int phy_check_link_status(struct +@@ -726,7 +726,7 @@ static int phy_check_link_status(struct phy_link_up(phydev); } else if (!phydev->link && phydev->state != PHY_NOLINK) { phydev->state = PHY_NOLINK; @@ -60,7 +60,7 @@ still required by target/linux/ramips/files/drivers/net/ethernet/ralink/mdio.c } return 0; -@@ -1226,7 +1226,7 @@ void phy_state_machine(struct work_struc +@@ -1241,7 +1241,7 @@ void phy_state_machine(struct work_struc case PHY_HALTED: if (phydev->link) { phydev->link = 0; diff --git a/target/linux/ramips/patches-5.10/721-NET-no-auto-carrier-off-support.patch b/target/linux/ramips/patches-5.10/721-NET-no-auto-carrier-off-support.patch index 5e82c13d2a2..00a41928402 100644 --- a/target/linux/ramips/patches-5.10/721-NET-no-auto-carrier-off-support.patch +++ b/target/linux/ramips/patches-5.10/721-NET-no-auto-carrier-off-support.patch @@ -11,7 +11,7 @@ Signed-off-by: John Crispin --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c -@@ -714,7 +714,10 @@ static int phy_check_link_status(struct +@@ -726,7 +726,10 @@ static int phy_check_link_status(struct phy_link_up(phydev); } else if (!phydev->link && phydev->state != PHY_NOLINK) { phydev->state = PHY_NOLINK; @@ -23,7 +23,7 @@ Signed-off-by: John Crispin } return 0; -@@ -1226,7 +1229,10 @@ void phy_state_machine(struct work_struc +@@ -1241,7 +1244,10 @@ void phy_state_machine(struct work_struc case PHY_HALTED: if (phydev->link) { phydev->link = 0; diff --git a/target/linux/ramips/patches-5.10/850-awake-rt305x-dwc2-controller.patch b/target/linux/ramips/patches-5.10/850-awake-rt305x-dwc2-controller.patch index 19c8ec877ee..5c87298f367 100644 --- a/target/linux/ramips/patches-5.10/850-awake-rt305x-dwc2-controller.patch +++ b/target/linux/ramips/patches-5.10/850-awake-rt305x-dwc2-controller.patch @@ -1,6 +1,6 @@ --- a/drivers/usb/dwc2/platform.c +++ b/drivers/usb/dwc2/platform.c -@@ -477,6 +477,12 @@ static int dwc2_driver_probe(struct plat +@@ -465,6 +465,12 @@ static int dwc2_driver_probe(struct plat if (retval) return retval; diff --git a/tools/mtools/Makefile b/tools/mtools/Makefile index c0c36a9d02c..b810918b98b 100644 --- a/tools/mtools/Makefile +++ b/tools/mtools/Makefile @@ -7,11 +7,11 @@ include $(TOPDIR)/rules.mk PKG_NAME:=mtools -PKG_VERSION:=4.0.42 +PKG_VERSION:=4.0.43 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=@GNU/$(PKG_NAME) -PKG_HASH:=64bfdfde4d82af6b22f3c1c72c3e231cbb618f4c2309cc46f54d16d5502ccf15 +PKG_HASH:=541e179665dc4e272b9602f2074243591a157da89cc47064da8c5829dbd2b339 HOST_BUILD_PARALLEL:=1