Commit Graph

25298 Commits

Author SHA1 Message Date
Rui Salvaterra 9664b41c05 kernel: bump 5.10 to 5.10.68
Deleted (upstreamed):
generic/backport-5.10/610-v5.13-02-netfilter-Fix-fall-through-warnings-for-Clang.patch
generic/backport-5.10/792-v5.15-0001-net-dsa-b53-Fix-calculating-number-of-switch-ports.patch
generic/backport-5.10/792-v5.15-0002-net-dsa-b53-Set-correct-number-of-ports-in-the-DSA-s.patch
generic/backport-5.10/792-v5.15-0003-net-dsa-b53-Fix-IMP-port-setup-on-BCM5301x.patch
generic/backport-5.10/840-0001-PCI-of-Don-t-fail-devm_pci_alloc_host_bridge-on-miss.patch
generic/backport-5.10/840-0002-PCI-iproc-Fix-BCMA-probe-resource-handling.patch
generic/pending-5.10/498-mtd-mtdconcat-select-readwrite-function.patch

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
2021-09-30 22:29:33 +01:00
Rui Salvaterra 6e7fadb0c7 kernel: bump 5.10 to 5.10.67
Deleted (upstreamed):
bcm27xx/patches-5.10/950-0312-vc4_hdmi-Set-HD_CTL_WHOLSMP-and-HD_CTL_CHALIGN_SET.patch

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
2021-09-30 22:29:33 +01:00
Rui Salvaterra 3a2c16d1d2 kernel: bump 5.10 to 5.10.65
Manually refreshed:
generic/pending-5.10/800-bcma-get-SoC-device-struct-copy-its-DMA-params-to-th.patch
bcm27xx/patches-5.10/950-0053-firmware-bcm2835-Support-ARCH_BCM270x.patch
bcm27xx/patches-5.10/950-0087-firmware-raspberrypi-Add-backward-compatible-get_thr.patch

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
2021-09-30 22:29:33 +01:00
Dale Hui 830c2e5378 ramips: add support for Netgear R7450
Netgear R7450 is a clone of Netgear R6700v2

Specifications
==============
SoC: MediaTek MT7621AT
RAM: 256M DDR3
FLASH: 128M NAND
WiFi: MediaTek MT7615N an+ac
MediaTek MT7615N bgn
ETH: MediaTek MT7621AT
BTN: 1x Connect (WPS), 1x WLAN, 1x Reset
LED: Power (white/amber), WAN(white/amber), 2.4G(white), 5G(white),
USB(white) , GuestWifi(white) 4x LAN(white/amber), Wifi Button(white),
WPS Button(white)

Flash Instructions
==================
Login to netgear webinterface and flash factory.img

Signed-off-by: Dale Hui <strokes-races0b@icloud.com>
[fix model/compatible in DTS]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-09-26 15:38:01 +02:00
Dale Hui 16fc409e7a ramips: add support for Netgear R6900v2
Netgear R6900v2 is a clone of Netgear R6700v2

Specifications
==============
SoC: MediaTek MT7621AT
RAM: 256M DDR3
FLASH: 128M NAND
WiFi: MediaTek MT7615N an+ac
MediaTek MT7615N bgn
ETH: MediaTek MT7621AT
BTN: 1x Connect (WPS), 1x WLAN, 1x Reset
LED: Power (white/amber), WAN(white/amber), 2.4G(white), 5G(white),
USB(white) , GuestWifi(white) 4x LAN(white/amber), Wifi Button(white),
WPS Button(white)

Flash Instructions
==================
Login to netgear webinterface and flash factory.img

Signed-off-by: Dale Hui <strokes-races0b@icloud.com>
2021-09-26 15:15:36 +02:00
Dale Hui 95807f89ff ramips: add Nighthawk AC2100 as name for Netgear R6700v2
Netgear Nighthawk AC2100 is another name of the Netgear R6700v2.

Signed-off-by: Dale Hui <strokes-races0b@icloud.com>
[adjust commit message/title]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-09-26 15:15:36 +02:00
Dale Hui af3104d25b ramips: make Netgear R7200 a separate device from R6700v2
With the various variants of Netgear R**** devices, make it more
obvious which image should be used for the R7200.

Signed-off-by: Dale Hui <strokes-races0b@icloud.com>
[provide proper commit message]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-09-26 15:15:30 +02:00
INAGAKI Hiroshi fc050c7b53 realtek: add Kernel 5.10 as testing version
This patch adds "KERNEL_TESTING_PATCHVER:=5.10" to the Makefile in
realtek target to allow using Kernel 5.10 for testing.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2021-09-26 00:32:18 +02:00
INAGAKI Hiroshi 216011e424 realtek: enable uart1 on the devices with PoE support in 5.10
On the devices with PoE support, the secondary UART (uart1) on the SoC
is used to communicate between the SoC and controller.

Enable the secondary UART on the following devices:

- D-Link DGS-1210-10P
- Netgear GS110TPP v1
- Netgear GS310TP v1
- ZyXEL GS1900-8HP v1/v2
- ZyXEL GS1900-10HP
- ZyXEL GS1900-24HP v2

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2021-09-26 00:32:18 +02:00
INAGAKI Hiroshi 45b2a5d840 realtek: use physical addresses in soc dtsi in 5.10
Use physical addresses instead of virtual address in dts files.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2021-09-26 00:32:18 +02:00
INAGAKI Hiroshi d7b349db7c realtek: use gpio-keys instead of "-polled" if SoC GPIO is used in 5.10
The new backported GPIO driver supports interrupt, so use gpio-keys
instead of gpio-keys-polled for keys connected to the internal GPIO
controller.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2021-09-26 00:32:18 +02:00
INAGAKI Hiroshi 61a3d0075b realtek: update GPIO bindings in the dts files in dts-5.10
this patch includes the following changes:

- adjust mapping for the new driver
  - GPIO 24 -> GPIO 0
  - GPIO 47 -> GPIO 0 (+ disabling system LED)

- disable pins in the invalid range
  (out of the range 0-31 of the new driver)
  - are these pins on the external RTL8231 (&gpio1)?
    - GPIO 67 (-> GPIO 3 on &gpio1?)
    - GPIO 94 (-> GPIO 30 on &gpio1?)

- drop "indirect-access-bus-id" property from gpio0 node in device dts
  files

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2021-09-26 00:32:18 +02:00
INAGAKI Hiroshi 2e676c05dc realtek: fix kernel panic in DSA driver for 5.10
dsa_to_port function in 5.10 returns dsa_port from the port list in
dsa_switch_tree, but the tree is built when the switch is registered
by dsa_register_switch and it's null in rtl83xx_mdio_probe.

So, we need to use dsa_to_port after the registration of the switch.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2021-09-26 00:32:18 +02:00
INAGAKI Hiroshi 99a658cb71 realtek: add pinmux node of LED_GLB_CTRL to rtl838x.dtsi in dts-5.10
This patch adds a pinctrl-single pinmux node to allow disabling system
LED and enabling GPIO 0 (old driver: GPIO 24).

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2021-09-26 00:32:18 +02:00
INAGAKI Hiroshi a22602728c realtek: fix compile errors in dsa driver for 5.10
this patch fixes the following errors when compiling:

- dsa_switch_alloc is removed[1]

- a parameter "enum dsa_tag_protocol mprot" is added to dsa_tag_protocol
  in dsa_switch_ops (include/net/dsa.h)

- several paramters are added to "phylink_mac_link_up" in dsa_switch_ops
  (include/net/dsa.h)

  added:
    - int speed
    - int duplex
    - bool tx_pause
    - bool rx_pause

- a parameter "struct switchdev_trans *trans" is added to
  port_vlan_filtering in dsa_switch_ops (include/net/dsa.h)

[1]: https://lore.kernel.org/lkml/20191020031941.3805884-17-vivien.didelot@gmail.com/

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2021-09-26 00:32:18 +02:00
INAGAKI Hiroshi 9a4b8d6c30 realtek: fix compile errors in rtl838x_eth.c for 5.10
this patch fixes the following errors when compiling:

- "unsigned int txqueue" is added as an additional parameter of
  ndo_tx_timeout in net_device_ops (include/linux/netdevice.h)

- "mac_link_state" in phylink_mac_ops (include/linux/phylink.h)
  is renamed to "mac_pcs_get_state" and changed the return value
  to void from int

- several parameters are added to "mac_link_up" in phylink_mac_ops
  (include/linux/phylink.h) and the order of the parameters is
  changed

  added:
    - int speed
    - int duplex
    - bool tx_pause
    - bool rx_pause

- a parameter "phy_interface_t *interface" is added to of_get_phy_mode
  (drivers/of/of_net.c) and returns the state instead of phy mode

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2021-09-26 00:32:18 +02:00
INAGAKI Hiroshi 3069fffe60 realtek: add "soc" node to soc dtsi in dts-5.10
Add a "soc" node as a simple-bus to rtl838x.dtsi and rtl930x.dtsi.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2021-09-26 00:32:17 +02:00
INAGAKI Hiroshi ddaeb73de0 realtek: update soc dtsi in 5.10 for backported drivers
this patch updates SoC dtsi (rtl838x.dtsi, rtl930x.dtsi) for the
following backported drivers:

- gpio-realtek-otto (5.13)
- spi-realtek-rtl (5.12)
- irq-realtek-rtl (5.12)

And, disable SoC GPIO node (gpio0) in rtl930x.dtsi in dts-5.10.
Currently, the upstreamed driver doesn't support the GPIO controller on
RTL930x SoC.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2021-09-26 00:32:17 +02:00
INAGAKI Hiroshi 1c020f8b43 realtek: cleanup and update soc dtsi in 5.10
the following changes are included in this patch:

- node is enabled by default, drop 'status = "okay"'
- adjust order of "compatible" lines and "reg" lines
- add a new blank line before fixed-link node in rtl830x.dtsi

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2021-09-26 00:32:17 +02:00
INAGAKI Hiroshi 0de230bd0c realtek: copy dts directory for Kernel 5.10
This patch adds "dts-5.10" directory to use backported drivers.
There are several specification changes in the new drivers, so there
are some compatibility issues in using dts/dtsi files for 5.4.

The old DTS files are moved to "dts-5.4", so their corresponding
kernel version is obvious as well.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
[change "dts" to "dts-5.4", adjust Makefile]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-09-26 00:32:17 +02:00
INAGAKI Hiroshi 9e418b061c realtek: refresh and update config-5.10
This patch adjusts config-5.10 by running kernel_menuconfig.

Note:

- disable psb6970 phy driver (unused in realtek target?)

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2021-09-26 00:32:17 +02:00
INAGAKI Hiroshi 95f089dafe realtek: refresh patches for Kernel 5.10
This patch refresh all patches in patches-5.10/ to adjust for Kernel
5.10.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2021-09-26 00:32:17 +02:00
INAGAKI Hiroshi 46945e02d3 realtek: remove unnecessary line from rtl838x/Platform in 5.10
The following line is already defined in arch/mips/Kbuild.platforms by
300-mips-add-rtl838x-platform.patch.

platform-$(CONFIG_RTL838X) += rtl838x/

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2021-09-26 00:32:17 +02:00
INAGAKI Hiroshi 781f50705c realtek: drop fixup_bigphys_addr from ioremap.h in 5.10
A macro with the same name is provided in asm/pgtable.h in Kernel 5.10,
use it and drop from ioremap.h.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2021-09-26 00:32:17 +02:00
INAGAKI Hiroshi 2ec38bfea1 realtek: fix "help" line in Kconfig in files/patches for 5.10
In Kernel 5.10, "help" must be used instead of "---help---".

this patch fixes the following errors:

drivers/net/dsa/rtl83xx/Kconfig:7: syntax errorgit
drivers/net/dsa/rtl83xx/Kconfig:6: unknown statement "---help---"
drivers/net/dsa/rtl83xx/Kconfig:7:warning: ignoring unsupported character '.'
drivers/net/dsa/rtl83xx/Kconfig:7: unknown statement "This"
drivers/net/ethernet/Kconfig:170: syntax error
drivers/net/ethernet/Kconfig:169: unknown statement "---help---"
drivers/net/ethernet/Kconfig:170:warning: ignoring unsupported character '.'
drivers/net/ethernet/Kconfig:170: unknown statement "Say"
drivers/net/phy/Kconfig:331: syntax error
drivers/net/phy/Kconfig:330: unknown statement "---help---"
drivers/net/phy/Kconfig:331: unknown statement "Supports"

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2021-09-26 00:32:17 +02:00
INAGAKI Hiroshi 2cd00b5147 realtek: backport irq-realtek-rtl driver from 5.12 to 5.10
This patch backports "irq-realtek-rtl" driver to Kernel 5.10 from 5.12.
"MACH_REALTEK_RTL" is used as a platform name in upstream, but "RTL838X"
is used in OpenWrt, so update the dependency by the additional patch.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2021-09-26 00:32:17 +02:00
INAGAKI Hiroshi b2bd0199a8 realtek: drop platform irq driver from 5.10
To use backported irq driver, drop old irq driver from realtek target
and call irqchip_init() in setup.c.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2021-09-26 00:32:17 +02:00
INAGAKI Hiroshi 9bac1c20b8 realtek: backport gpio-realtek-otto driver from 5.13 to 5.10
This patch backports "gpio-realtek-otto" driver to Kernel 5.10.
"MACH_REALTEK_RTL" is used as a platform name in upstream, but "RTL838X"
is used in OpenWrt, so update the dependency by the additional patch.

Note: GPIO mapping is changed in the upstreamed driver.

  old - new

   24 -  0
   25 -  1
   26 -  2
   27 -  3
   28 -  4
   29 -  5
   30 -  6
   31 -  7
   16 -  8
   17 -  9
   18 - 10
   19 - 11
   20 - 12
   21 - 13
   22 - 14
   23 - 15
    8 - 16
    9 - 17
   10 - 18
   11 - 19
   12 - 20
   13 - 21
   14 - 22
   15 - 23

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2021-09-26 00:32:17 +02:00
INAGAKI Hiroshi fbd675c668 realtek: drop rtl838x gpio driver from 5.10
To backport the upstreamed driver (gpio-realtek-otto) from 5.13, drop the
old driver from realtek target.

And, modify 301-gpio-add-rtl838x-driver.patch to remove rtl838x GPIO
support and rename it only for rtl8231 GPIO support.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2021-09-26 00:32:17 +02:00
INAGAKI Hiroshi 0b000cbfe0 realtek: backport spi-realtek-rtl driver from 5.12 to 5.10
This patch backports "spi-realtek-rtl" driver to Kernel 5.10 from 5.12.
"MACH_REALTEK_RTL" is used as a platform name in upstream, but "RTL838X"
is used in OpenWrt, so update the dependency by the additional patch.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2021-09-26 00:32:17 +02:00
INAGAKI Hiroshi 1651bd9bc6 realtek: drop rtl838x spi-nor driver from 5.10
To backport the upstreamed driver (spi-realtek-rtl) from 5.12, drop the
old driver from realtek target.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2021-09-26 00:32:17 +02:00
INAGAKI Hiroshi 95170b4350 realtek: copy config/files/patches to 5.10
this patch copies the following files from 5.4 to 5.10:

- config-5.4   -> config-5.10
- files-5.4/   -> files-5.10/
- patches-5.4/ -> patches-5.10/

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
[rebase on change in files-5.4]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-09-26 00:32:17 +02:00
David Bauer 1edc7078d6 ramips: enable I2C_CHARDEV
Expose I2C busses with a chardev device. This is required to control the
PSE controller on the Ubiquiti UniFi Flex Switch.

Signed-off-by: David Bauer <mail@david-bauer.net>
2021-09-25 21:05:07 +02:00
David Bauer a983969789 ramips: add support for Ubiquiti USW-Flex
Hardware
--------
MediaTek MT7621AT
16M SPI-NOR Macronix MX25L12835FMI
Microchip PD69104B1 4-Channel PoE-PSE controller
TI TPS2373 PoE-PD controller

PoE-Controller
--------------

By default, the PoE outputs do not work with OpenWrt. To make them output
power, install the "poemgr" package from the packages feed.
This package can control the PD69104B1 PSE controller.

Installation
------------

1. Connect to the booted device at 192.168.1.20 using username/password
   "ubnt" via SSH.

2. Add the uboot-envtools configuration file /etc/fw_env.config with the
   following content

   $ echo "/dev/mtd1 0x0 0x1000 0x10000 1" > /etc/fw_env.config

3. Update the bootloader environment.

   $ fw_setenv boot_openwrt "fdt addr \$(fdtcontroladdr);
     fdt rm /signature; bootubnt"
   $ fw_setenv bootcmd "run boot_openwrt"

4. Transfer the OpenWrt sysupgrade image to the device using SCP.

5. Check the mtd partition number for bs / kernel0 / kernel1

   $ cat /proc/mtd

6. Set the bootselect flag to boot from kernel0

   $ dd if=/dev/zero bs=1 count=1 of=/dev/mtdblock4

7. Write the OpenWrt sysupgrade image to both kernel0 as well as kernel1

   $ dd if=openwrt.bin of=/dev/mtdblock6
   $ dd if=openwrt.bin of=/dev/mtdblock7

8. Reboot the device. It should boot into OpenWrt.

Restore to UniFi
----------------

To restore the vendor firmware, follow the Ubiquiti UniFi TFTP
recovery guide for access points. The process is the same for
the Flex switch.

Signed-off-by: David Bauer <mail@david-bauer.net>
2021-09-25 21:04:53 +02:00
Andrew Cameron ac03e24635 ath79: add support for TP-Link CPE710-v1
TP-Link CPE710-v1 is an outdoor wireless CPE for 5 GHz with
one Ethernet port based on the AP152 reference board

Specifications:
- SoC: QCA9563-AL3A MIPS 74kc @ 775MHz, AHB @ 258MHz
- RAM: 128MiB DDR2 @ 650MHz
- Flash: 16MiB SPI NOR Based on the GD25Q128
- Wi-Fi 5Ghz: ath10k chip (802.11ac for up to 867Mbps on 5GHz wireless
  data rate) Based on the QCA9896
- Ethernet: one 1GbE port
- 23dBi high-gain directional 2×2 MIMO antenna and a dedicated metal
  reflector
- Power, LAN, WLAN5G Blue LEDs
- 3x Blue LEDs

Flashing instructions:
Flash factory image through stock firmware WEB UI or through TFTP
To get to TFTP recovery just hold reset button while powering on for
around 30-40 seconds and release.
Rename factory image to recovery.bin
Stock TFTP server IP:192.168.0.100
Stock device TFTP address:192.168.0.254

Signed-off-by: Andrew Cameron <apcameron@softhome.net>
[convert to nvmem, fix MAC assignment in 11-ath10k-caldata]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-09-25 19:28:54 +02:00
Robert Marko 3c3b84fd87 kernel: 5.10: backport fix for lp55xx LED driver
This backports the upstream commit:
leds: lp55xx: Initialize enable GPIO direction to output

Without it under kernel 5.10 on Asus MAP-AC2200
the LED driver will fail probing:
[    1.947521] lp5523x: probe of 0-0032 failed with error -22

After the backported fix:
[    1.873236] lp5523x 0-0032: lp5523 Programmable led chip found

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
Tested-by: Szabolcs Hubai <szab.hu@gmail.com> [ipq4029/gl-b1300]
Tested-by: Nick Hainke <vincent@systemli.org> [ipq4019/fritzbox-7530
                                               ipq4019/fritzbox-4040
                                               ipq4019/sxtsq-5ac]
Tested-by: Stefan Lippers-Hollmann <s.l-h@gmx.de> [ipq4019/map-ac2200]
2021-09-25 19:28:54 +02:00
Robert Marko 7b1fa276f5 ipq40xx: add testing support for kernel 5.10
Add kernel 5.10 as the testing kernel to ipq40xx to
get wider testing.

The following devices failed to build with buildbot settings and all
feeds installed (apparently due to kernel size):

 * cell-c rtl30vw
 * compex wpj428
 * devolo magic 2 next
 * engenius emr3500
 * glinet gl-b1300
 * glinet gl-s1300
 * qcom ap-dk01.1-c1
 * qcom ap-dk04.1-c1

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
Tested-by: Nick Hainke <vincent@systemli.org> [ipq4019/fritzbox-7530
                                               ipq4019/fritzbox-4040
                                               ipq4019/sxtsq-5ac]
Tested-by: Szabolcs Hubai <szab.hu@gmail.com> [ipq4029/gl-b1300]
Tested-by: Stefan Lippers-Hollmann <s.l-h@gmx.de> [ipq4019/map-ac2200]
[add tested-by and note about failed devices]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-09-25 19:28:54 +02:00
Robert Marko f4fb63d2ab ipq40xx: 5.10: move AR40xx to MDIO drivers
MDIO drivers were moved into their own sub directory of networking drivers.
This has caused the AR40xx driver to probe before MDIO drivers and that wont
work as it depends on the MDIO bus to be up so it can be fetched.

Lets solve it by moving the AR40xx into MDIO folder so they get probed like
before.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
2021-09-25 19:28:54 +02:00
Robert Marko ccf214a408 ipq40xx: net: ethernet: edma: reject unsupported coalescing params
Set ethtool_ops->supported_coalesce_params to let
the core reject unsupported coalescing parameters.

This driver did not previously reject unsupported parameters.

This is a required ethtool op since kernel 5.7.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
2021-09-25 19:28:54 +02:00
Robert Marko 603848cad8 ipq40xx: net: ethernet: edma: update of_get_phy_mode() for 5.10
In kernel v5.5 of_get_phy_mode had its API changed, so its now returning 0
or errors instead of phymode.

Phymode is now returning by passing a pointer to phy_interface_t where it
will be stored.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
2021-09-25 19:28:54 +02:00
Robert Marko 80f007fdb2 ipq40xx: 5.10: add kernel config
Copy config from 5.4 and run "make kernel_oldconfig".

Select default ("N") for all new symbols.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
[make commit message more explicit]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-09-25 19:28:54 +02:00
Robert Marko e9559182b9 ipq40xx: 5.10: refresh patches to apply
Refresh the kernel patches on top of 5.10 so they apply.
Manually fixup the 705-net-add-qualcomm-ar40xx-phy.patch
to apply.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
2021-09-25 19:28:54 +02:00
Robert Marko fec22cfa59 ipq40xx: 5.10: replace patches with upstreamed versions
USB and SDHCI LDO DTS patches have been upstreamed into 5.12, so
replace the local versions with upstreamed ones.

Reorder, and clearly mark the kernel version.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
2021-09-25 19:28:54 +02:00
Robert Marko 75a90f161e ipq40xx: 5.10: remove duplicate GPIO export patch
Its in the generic target already, so remove the duplicate
as it breaks compilation.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
2021-09-25 19:28:54 +02:00
Robert Marko 9fe5516ee5 ipq40xx: 5.10: drop upstreamed patches
Drop patches that have been upstreamed in before 5.10.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
2021-09-25 19:28:54 +02:00
Robert Marko 8f27ac5ec0 ipq40xx: 5.10: copy patches
Copy over the 5.4 kernel patches to 5.10 folder.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
2021-09-25 19:28:54 +02:00
INAGAKI Hiroshi 7ff0efa0b0 ramips: add support for I-O DATA WN-DX2033GR
I-O DATA WN-DX2033GR is a 2.4/5 GHz band 11ac (Wi-Fi 5) router, based on
MT7621A.

Specification:

- SoC		: MediaTek MT7621A
- RAM		: DDR3 128 MiB
- Flash		: Raw NAND 128 MiB (Macronix MX30LF1G18AC-TI)
- WLAN		: 2.4/5 GHz
  - 2.4 GHz	: 2T2R, MediaTek MT7603E
  - 5 GHz	: 4T4R, MediaTek MT7615
- Ethernet	: 5x 10/100/1000 Mbps
  - Switch	: MediaTek MT7530 (SoC)
- LEDs/Keys	: 2x/3x (2x buttons, 1x slide-switch)
- UART		: through-hole on PCB
  - J5: 3.3V, TX, RX, NC, GND from triangle mark
  - 57600n8
- Power		: 12 VDC, 1 A

Flash instruction using initramfs image:

1. Boot WN-DX2033GR normally
2. Access to "http://192.168.0.1/" and open firmware update page
   ("ファームウェア")
3. Select the OpenWrt initramfs image and click update ("更新") button
   to perform firmware update
4. On the initramfs image, download the sysupgrade.bin image to the
   device and perform sysupgrade with it
5. Wait ~120 seconds to complete flashing

Notes:

- The hardware of WN-DX2033GR and WN-AX2033GR are almost the same, and
  it is certified under the same radio-wave related regulations in Japan

- The last 0x80000 (512 KiB) in NAND flash is not used on stock firmware

- stock firmware requires "customized uImage header" (called as "combo
  image") by MSTC (MitraStar Technology Corp.), but U-Boot doesn't

  - uImage magic ( 0x0 - 0x3 ) : 0x434F4D42 ("COMB")
  - header crc32 ( 0x4 - 0x7 ) : with "data length" and "data crc32"
  - image name   (0x20 - 0x37) : model ID and firmware versions
  - data length  (0x38 - 0x3b) : kernel + rootfs
  - data crc32   (0x3c - 0x3f) : kernel + rootfs

- There are 2x important flags in the flash:

  - bootnum   : select os partition for booting (persist, 0x4)

    - 0x01: firmware
    - 0x02: firmware_2

  - debugflag : allow interrupt kernel loader, it's named as "Z-LOADER"
    (Factory, 0xFE75)

    - 0x00: disable debug
    - 0x01: enable debug

MAC addresses:

LAN     : 50:41:B9:xx:xx:90 (Factory, 0xE000 (hex) / Ubootenv, ethaddr (text))
WAN     : 50:41:B9:xx:xx:92 (Factory, 0xE006 (hex))
2.4 GHz : 50:41:B9:xx:xx:90 (Factory, 0x4    (hex))
5 GHz   : 50:41:B9:xx:xx:91 (Factory, 0x8004 (hex))

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2021-09-25 19:28:54 +02:00
Paul Fertser 16ae56b4f9 realtek: fix RTL8231 gpio expander for high GPIOs
GPIOs > 31 require special handling. This patch fixes both the
initialisation and direction get/set operations.

Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-by: Sander Vanheule <sander@svanheule.net>
2021-09-25 19:28:54 +02:00
Felix Fietkau 8ea0d08e0e kernel: add patch to fix an issue with kernel headers that broke perf
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-09-25 14:08:48 +02:00
Alan Luck 2c9a07ed28 ramips: add missing information to dlink headers
Add additional header information required for newer
bootloaders found on DIR-2660-A1 & A2.

Also remove the MTD splitter compatible from the second firmware
partition, as OpenWrt only supports handling of the first one.

Signed-off-by: Alan Luck <luckyhome2008@gmail.com>
[rephrase commit message, remove removal of read-only flags]
Signed-off-by: David Bauer <mail@david-bauer.net>
2021-09-24 12:32:28 +02:00
David Bauer b56f7407d9 rockchip: fix broken squashfs sysupgrade
The rockchip platform supports squashfs SD card images. However, the
resulting image is not padded to completely fill the rootfs partition.

Because of that, the f2fs overlay might not be erased, resulting in
uci-defaults not bing executed or the configuration not being erased,
even though drop config was selected.

Modify the image generation process so the image is padded to cover the
entire root filesystem partition.

Signed-off-by: David Bauer <mail@david-bauer.net>
2021-09-24 12:28:48 +02:00
Moritz Warning b34aa6aff7 bcm47xx: use device vendor/model variable
Remove use of DEVICE_TITLE in favor of the
DEVICE_VENDOR and DEVICE_MODEL as used by
all other targets.

Signed-off-by: Moritz Warning <moritzwarning@web.de>
2021-09-23 21:45:30 -10:00
Moritz Warning e2f284dbd1 x86: use device vendor/model variable
Remove use of DEVICE_TITLE in favor of the
DEVICE_VENDOR and DEVICE_MODEL as used by
all other targets.

Signed-off-by: Moritz Warning <moritzwarning@web.de>
2021-09-23 21:45:13 -10:00
Paul Spooren a7fdd4de59 imagebuilder: show architecture in `make info` output
Using `make info` show the current target, revision, default packages
and available profiles. This commits adds the used architecture.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2021-09-23 21:37:19 -10:00
Christian Lamparter 608baf44c6 bcm53xx: MR32: read mac-address from eeprom
Meraki wrote the ethernet MAC-address of the device
onto the eeprom (AT24C64) at the fixed location 0x66
to 0x6C. Let's fetch it from there.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2021-09-23 20:50:58 +02:00
Damien Mascord fd67908647 scripts: mkits.sh: Allow legacy @ mode for dts creation
commit 5ec60cbe9d ("scripts: mkits.sh: replace @ with - in nodes")
broke support for Meraki MR32 and this patch makes the replacement
configurable allowing for specifying the @ or - or whatever character
that is desired to retain backwards compatibility with existing devices.

For example, this patch includes the fix for the Meraki MR32 in
target/linux/bcm53xx/image for meraki_mr32:

  DEVICE_DTS_DELIMITER := @
  DEVICE_DTS_CONFIG := config@1

Fixes: 5ec60cbe9d ("scripts: mkits.sh: replace @ with - in nodes")
Signed-off-by: Damien Mascord <tusker@tusker.org>
[Added tags, checkpatch.pl fixes, noted that this is for old stuff]
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2021-09-23 20:49:32 +02:00
Rafał Miłecki 366be2183e bcm53xx: backport early DT patches queued for 5.16
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2021-09-23 07:55:55 +02:00
Rosen Penev f9050f1c43 bcm63xx: remove memcpy from mac assignment
With GCC11, memcpy doesn't work here as it assumes a size of 0. Use
ioremap to avoid it.

Fixed parameter type to match board_get_mac_address.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-09-21 15:46:19 -10:00
Felix Fietkau a4b5bc20d7 kernel: add a bridge feature for filtering BPDU packets on ports
This will be used to ensure that APs don't transmit unnecessary STP packets

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-09-21 19:43:20 +02:00
Rafał Miłecki 0be4dea48e kernel: add missing CONFIG_NET_DSA_TAG_BRCM_LEGACY config symbol
This fixes:
Distributed Switch Architecture (NET_DSA) [Y/n/m/?] y
  Tag driver for Atheros AR9331 SoC with built-in switch (NET_DSA_TAG_AR9331) [N/m/y/?] n
  Tag driver for Broadcom switches using in-frame headers (NET_DSA_TAG_BRCM) [N/m/y/?] n
  Tag driver for Broadcom legacy switches using in-frame headers (NET_DSA_TAG_BRCM_LEGACY) [N/m/y/?] (NEW)
Error in reading or end of file.

Fixes: 8fa1b576bb ("linux: update b53 upstream driver")
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2021-09-17 22:07:03 +02:00
Rafał Miłecki 8fa1b576bb linux: update b53 upstream driver
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2021-09-17 10:15:26 +02:00
Rafał Miłecki a46fa5c3a7 bcm53xx: drop DTS based workaround for serial support in procd
Specifying serial in bootargs is not needed since the commit
ffeb37047e ("procd: update to git HEAD"). It's thanks to the procd
commit 2cfc26f8456a ("inittab: detect active console from kernel if no
console= specified").

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2021-09-16 07:59:50 +02:00
Daniel Golle 83672f506d
sunxi: add testing Linux 5.10
Add testing Linux kernel 5.10 for sunxi targets.

Removed patches were replaced by upstream commits:

- 410-v5.6-arm64-dts-allwinner-a64-olinuxino-Add-bank-supply-re.patch
   f0c3b29f56f0a arm64: dts: allwinner: a64: olinuxino: Add bank supply regulators

- 420-v5.7-arm64-dts-allwinner-a64-olinuxino-add-user-red-LED.patch
   89866b2667e0d arm64: dts: allwinner: a64: olinuxino: add user red LED

- 440-add-h6-pwm.patch
   a7fe985633f92 pwm: sun4i: Add an optional probe for reset line
   b8d74644f34a8 pwm: sun4i: Prefer "mod" clock to unnamed
   5b090b430d750 pwm: sun4i: Add an optional probe for bus clock
   fa4d81784681a pwm: sun4i: Always calculate params when applying new parameters
   9f28e95b5286f pwm: sun4i: Add support to output source clock directly
   fdd2c12e3761f pwm: sun4i: Add support for H6 PWM

- 441-arm64-dts-add-PWM-node.patch
   88432f5f8469b arm64: dts: allwinner: h6: Add PWM node

- 443-board-h6-orangepioneplus-fix-missing-ethernet.patch
   7ee32a17e0d65 arm64: dts: allwinner: h6: orangepi-one-plus: Enable ethernet

Run tested on friendlyarm,nanopi-neo (allwinner,sun8i-h3), looks all good.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-09-15 19:11:44 +01:00
Daniel Golle 47b531de32
sunxi: bring up DSA b53 switch on Lamobo R1
Build cortexa7 subtarget with DSA driver for MDIO-connected Broadcom
BCM53xxx switches. This is needed for the Lamobo R1 aka. BananaPi
BPi-R1 board which comes with such a switch IC.

Remove old swconfig driver from target kernel config as the only board
using it is now supported by the DSA driver.

No changes to device tree are needed as upstream DTS already got a
DSA switch definition and we are just using that upstream source.

Update default network config of the Lamobo R1 to create lan bridge
with all 4 lan ports.

Introduce DEVICE_COMPAT_VERSION for the board to inform users about
having the re-create their network configuration and add device alias
as Bananapi BPi-R1 while at it.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-09-15 19:11:29 +01:00
Daniel Danzberger ba59466bf4 octeontx: add linux 5.10 testing kernel support
Changes from 5.4 to 5.10:
-------------------------
 - patches from 5.4 are all upstream for 5.10 execpt for
   0004-PCI-add-quirk-for-Gateworks-PLX-PEX860x-switch-with-.patch

 - disable block device data integrity (DIF/DIX/T10) in default config
   (CONFIG_BLK_DEV_INTEGRITY)
   This feature is only supported by:
     - Enterprise SAS/SCSI HBAs and Disks
     - Software raid
     - NVMEs with metadata capabilities (most don't have this)
   None of which are part of any octeontx boards.

 - arm64 TEXT_OFFSET (0x80000) has been removed after 5.4
   This will break Uimages with kernel load addresses that aren't 2MiB
   aligned any longer. Resulting in the kernel silently fail to boot.
   For Gatworks newport boards for example, the uimage kernel load
   and execute address is 0x20080000. These need to be changed to
   0x20000000 when running kernels beyond 5.4.

Tested-on: Gateworks Newport GW64xx

Signed-off-by: Daniel Danzberger <daniel@dd-wrt.com>
2021-09-13 18:36:15 +02:00
Pawel Dembicki 0dbe754e43 kirkwood: increase kernel size of Linksyses
Linksyses Audi EA3500 and Viper E4200/E4500 have too small kernel
partition size when kernel 5.10 is used. This patch change kernel
partition to maximum size allowed by u-boot.

Kernel size is overlapping rootfs now, like mvebu Linksyses and stock
partition table. It fix  back to stock via sysupgrade, which was broken
since 18.06.

Fixes: 9808b9ae02 ("kirkwood: switch to kernel 4.9")

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
2021-09-13 18:36:15 +02:00
Soma Zambelly c5b44af2fc realtek: add ZyXEL GS1900-24HPv2 support
The ZyXEL GS1900-24HPv2 is a 24 port PoE switch with two SFP ports, similar to the other GS1900 switches.

Specifications
--------------
* Device:    ZyXEL GS1900-24HPv2
* SoC:       Realtek RTL8382M 500 MHz MIPS 4KEc
* Flash:     16 MiB
* RAM:       W631GG8MB-12 128 MiB DDR3 SDRAM
             (stock firmware is configured to use only 64 MiB)
* Ethernet:  24x 10/100/1000 Mbps, 2x SFP 100/1000 Mbps
* LEDs:      1 PWR LED (green, not configurable)
             1 SYS LED (green, configurable)
             24 ethernet port link/activity LEDs (green, SoC controlled)
             24 ethernet port PoE status LEDs
             2 SFP status/activity LEDs (green, SoC controlled)
* Buttons:   1 "RESTORE" button on front panel
             1 "RESET" button on front panel
* Power      120-240V AC C13
* UART:      1 serial header (J41) with populated standard pin connector on
             the left edge of the PCB, angled towards the side.
             The casing has a rectangular cutout on the side that provides
             external access to these pins.
             Pinout (front to back):
             + GND
             + TX
             + RX
             + VCC

Serial connection parameters for both devices: 115200 8N1.

Installation
------------

OEM upgrade method:

(Possible on master once https://patchwork.ozlabs.org/project/openwrt/patch/20210624210408.19248-1-bjorn@mork.no/ is merged)

* Log in to OEM management web interface
* Navigate to Maintenance > Firmware > Management
* If "Active Image" has the first option selected, OpenWrt will need to be
  flashed to the "Active" partition. If the second option is selected,
  OpenWrt will need to be flashed to the "Backup" partition.
* Navigate to Maintenance > Firmware > Upload
* Upload the openwrt-realtek-generic-zyxel_gs1900-24hp-v2-initramfs-kernel.bin
  file by your preferred method to the previously determined partition.
  When prompted, select to boot from the newly flashed image, and reboot the switch.
* Once OpenWrt has booted, scp the sysupgrade image to /tmp and flash it:
   > sysupgrade -n /tmp/openwrt-realtek-generic-zyxel_gs1900-24hp-v2-squashfs-sysupgrade.bin
   it may be necessary to restart the network (/etc/init.d/network restart) on
   the running initramfs image.

U-Boot TFTP method:

* Configure your client with a static 192.168.1.x IP (e.g. 192.168.1.10).
* Set up a TFTP server on your client and make it serve the initramfs image.
* Connect serial, power up the switch, interrupt U-boot by hitting the
  space bar, and enable the network:
   > rtk network on
* Since the GS1900-24HPv2 is a dual-partition device, you want to keep the OEM
  firmware on the backup partition for the time being. OpenWrt can only boot
  from the first partition anyway (hardcoded in the DTS). To make sure we are
  manipulating the first partition, issue the following commands:
  > setsys bootpartition 0
  > savesys
* Download the image onto the device and boot from it:
   > tftpboot 0x84f00000 192.168.1.10:openwrt-realtek-generic-zyxel_gs1900-24hp-v2-initramfs-kernel.bin
   > bootm
* Once OpenWrt has booted, scp the sysupgrade image to /tmp and flash it:
   > sysupgrade -n /tmp/openwrt-realtek-generic-zyxel_gs1900-24hp-v2-squashfs-sysupgrade.bin
   it may be necessary to restart the network (/etc/init.d/network restart) on
   the running initramfs image.

Signed-off-by: Soma Zambelly <zambelly.soma@gmail.com>
2021-09-13 18:36:15 +02:00
Zhao Yu 3d4867addf sunxi: enable MUSB in A7 subtarget
like commit 78c1ed6. Without this,Some USB port on H3 baseboard
can' work. So, need enable MUSB support on this target.

Signed-off-by: Zhao Yu <574249312@qq.com>
2021-09-13 18:36:15 +02:00
Fabian Bläse c50ece58c4 kernel: backport switchdev fix for bridge in bridge configurations
This patch fixes the forwarding behavior of bridge in bridge
configurations with DSA.

Without it, the configuration of the upper bridge might overwrite
settings of the lower bridge. For example, a vlan-aware bridge
with DSA interfaces in it might be offloaded to the DSA hardware. If the
bridge interface itself gets slave of a different bridge without vlan
filtering, the vlan filtering setting of the lower bridge is overwritten
by the upper bridge, which results in an incorrect hardware
configuration.

This was backported from kernel 5.7.

Ref: https://lore.kernel.org/netdev/20191222192235.GK25745@shell.armlinux.org.uk/
Fixes: FS#3996
Signed-off-by: Fabian Bläse <fabian@blaese.de>
2021-09-13 17:11:50 +02:00
John Audia a88b32bf6e kernel: bump 5.4 to 5.4.145
Removed upstreamed:
  generic-backport/040-ARM-8918-2-only-build-return_address-if-needed.patch

All other patches automatically rebased.

Build system: x86_64
Build-tested: ipq806x/R7800

Signed-off-by: John Audia <graysky@archlinux.us>
2021-09-13 17:08:17 +02:00
John Audia 51c7e1d25f kernel: bump 5.4 to 5.4.144
Manually rebased:
  backport-5.4/370-netfilter-nf_flow_table-fix-offloaded-connection-tim.patch

All other patches automatically rebased.

Build system: x86_64
Build-tested: ipq806x/R7800
Run-tested: ipq806x/R7800

Signed-off-by: John Audia <graysky@archlinux.us>
2021-09-13 17:08:17 +02:00
John Audia 5fb4cb07e2 kernel: bump 5.10 to 5.10.64
All patches automatically rebased.

Build system: x86_64
Build-tested: bcm2711/RPi4B, ipq806x/R7800
Run-tested: bcm2711/RPi4B, ipq806x/R7800

No dmesg regressions, everything functional

Signed-off-by: John Audia <graysky@archlinux.us>
2021-09-13 17:08:17 +02:00
Matt Merhar 55643e469c kernel: fix jffs2 compilation with GCC_PLUGIN_RANDSTRUCT enabled
Designated initializers are required when using the randstruct GCC
plugin, otherwise an error like the following is seen:

./include/linux/lzma.h:60:31: error: positional initialization of field in 'struct' declared with 'designated_init' attribute [-Werror=designated-init]

Signed-off-by: Matt Merhar <mattmerhar@protonmail.com>
2021-09-13 17:08:12 +02:00
Hauke Mehrtens 1a3b3dc797 kernel: Add missing kernel config options
These options are selectable when some of the kernel debug options like
KERNEL_SOFTLOCKUP_DETECTOR are selected.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2021-09-13 13:04:21 +02:00
Ansuel Smith 0470159552 ipq806x: switch to kernel 5.10
Move kernel version to 5.10 as has been tested by many users
with positive feedback.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
[Tested on: ipq8064/g10; ipq8065/nbg6817]
Tested-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
2021-09-12 18:52:30 +02:00
Sven Eckelmann c7e9335e4c ipq40xx: Fix board-2.bin package name for Plasma Cloud PA2200
The board data file for the Plasma Cloud PA2200 is not part of the default
board-2.bin which is shipped by ath10k-board-qca4019. A typo in the device
package name resulted in a not correctly selected package for the device
specific board-2.bin. The wifi driver has therefore loaded the wrong
calibration information into the wifi chip.

Fixes: 4871fd2616 ("ipq40xx: add support for Plasma Cloud PA2200")
Signed-off-by: Sven Eckelmann <sven@narfation.org>
2021-09-12 18:52:30 +02:00
Sven Eckelmann d0ffc17535 ipq40xx: Fix board-2.bin package name for Plasma Cloud PA1200
The board data file for the Plasma Cloud PA1200 is not part of the default
board-2.bin which is shipped by ath10k-board-qca4019. A typo in the device
package name resulted in a not correctly selected package for the device
specific board-2.bin. The wifi driver has therefore loaded the wrong
calibration information into the wifi chip.

Fixes: ea5bb6bbfe ("ipq40xx: add support for Plasma Cloud PA1200")
Signed-off-by: Sven Eckelmann <sven@narfation.org>
2021-09-12 18:52:30 +02:00
Sven Eckelmann 14bd392a1c ipq40xx: Select correct board-2.bin for EnGenius EMR3500
The board data file for the EnGenius EMR3500 is not part of the default
board-2.bin which is shipped by ath10k-board-qca4019. As result, the wrong
calibration information will be loaded into the wifi chip.

Fixes: 3f61e5e1b9 ("ipq40xx: add support for EnGenius EMR3500")
Signed-off-by: Sven Eckelmann <sven@narfation.org>
2021-09-12 18:52:30 +02:00
Sven Eckelmann d9f4a4280e ipq40xx: Select correct board-2.bin for EnGenius EMD1
The board data file for the EnGenius EMD1 is not part of the default
board-2.bin which is shipped by ath10k-board-qca4019. As result, the wrong
calibration information will be loaded into the wifi chip.

Fixes: 51f3035978 ("ipq40xx: add support for EnGenius EMD1")
Signed-off-by: Sven Eckelmann <sven@narfation.org>
2021-09-12 18:52:30 +02:00
Rui Salvaterra 27199a4e66 kernel: bump 5.10 to 5.10.62
Patches automatically refreshed.

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
2021-09-09 23:40:32 +02:00
Ian Chang 70c75965a9 mvebu: add support for iEi Puzzle-M901/Puzzle-M902
Hardware specification
 ----------------------
 * CN9130 SoC, Quad-core ARMv8 Cortex-72 @ 2200 MHz
 * 4 GB DDR
 * 4 GB eMMC
 * mmcblk0
 - mmcblk0p1    64M  kernel_1
 - mmcblk0p2    64M  kernel_2
 - mmcblk0p3   512M  rootfs_1
 - mmcblk0p4   512M  rootfs_2
 - mmcblk0p5   512M  Reserved
 - mmcblk0p6    64M  Reserved
 - mmcblk0p7   1.8G  rootfs_data

 * 4 MB (SPI Flash)
 * 6 x 2.5 Gigabit  ports (Puzzle-M901)
 - External PHY with 6 ports (AQR112R)

 * 6 x 2.5 Gigabit ports (Puzzle-M902)
 - External PHY with 6 ports (AQR112R)
   3 x 10 Gigabit ports (Puzzle-M902)
 - External PHY with 3 ports (AQR113R)

 * 4 x Front panel LED
 * 1 x USB 3.0
 * Reset button on Rear panel
 * UART (115200 8N1,header on PCB)

 Flash instructions:
    The original firmware is based on OpenWrt.
    Flash firmware using LuCI and CLI

Signed-off-by: Ian Chang <ianchang@ieiworld.com>
2021-09-09 23:36:13 +02:00
Ian Chang c98ddf0f01 mvebu: backport CN9130 dts necessary files changes to 5.4
1. Add support for Marvell CN9130 SoC
 2. Add support for CP115,and create an armada-cp11x.dtsi file which will be used to instantiate both CP110 and CP115
 3. Add support for AP807/AP807-quad,AP807 is a major component of CN9130 SoC series
 4. Drop PCIe I/O ranges from CP11x file and externalize PCIe macros from CP11x file

Signed-off-by: Ian Chang <ianchang@ieiworld.com>
2021-09-09 23:36:13 +02:00
Hauke Mehrtens b9cc16a5e8 kernel: Set CONFIG_RCU_CPU_STALL_TIMEOUT=21
The default value for CONFIG_RCU_CPU_STALL_TIMEOUT was changed from 60
seconds to 21 seconds in 2012 in the upstream kernel. Some targets
already use 21 seconds.

This patch changes the default value in the generic configuration to 21
seconds and removes the target specific configuration options.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Acked-by: Rui Salvaterra <rsalvaterra@gmail.com>
2021-09-09 20:24:12 +02:00
Paul Spooren 64be0eadc1 x86: switch to kernel 5.10
Seems to be working fine in QEMU and the wild.

Signed-off-by: Paul Spooren <mail@aparcar.org>
Acked-by: Hauke Mehrtens <hauke@hauke-m.de>
2021-09-08 13:29:43 -10:00
Rui Salvaterra c9042202ad mvebu: switch to kernel 5.10
It's been brewing on my cortexa9 subtarget (Turris Omnia) for months.
Perfectly stable.

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
Acked-by: Hauke Mehrtens <hauke@hauke-m.de>
[modify subject to match previous updates]
Signed-off-by: Paul Spooren <mail@aparcar.org>
2021-09-08 13:28:22 -10:00
Rafał Miłecki ae33ce2af2 bcm53xx: specify switch ports for more devices
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2021-09-07 13:23:16 +02:00
Rafał Miłecki 854a4de10c linux: backport DSA b53 driver fixes for switch ports
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2021-09-07 13:23:13 +02:00
Andrea Poletti de0c380a5f ramips: add support for Sitecom WLR-4100 v1 002
Sitecom WLR-4100 v1 002 (marked as X4 N300) is a wireless router
Specification:
SoC: MT7620A
RAM: 64 MB DDR2
Flash: MX25L6405D SPI NOR 8 MB
WIFI: 2.4 GHz integrated
Ethernet: 5x 10/100/1000 Mbps QCA8337
USB: 1x 2.0
LEDS: 2x GPIO controlled, 5x switch
Buttons: 1x GPIO controlled
UART: row of 4 unpopulated holes near USB port, starting count from
      white triangle on PCB:

    VCC 3.3V
    GND
    TX
    RX

    baud: 115200, parity: none, flow control: none

Installation

    Connect to one of LAN (yellow) ethernet ports,
    Open router configuration interface,
    Go to Toolbox > Firmware,
    Browse for OpenWrt factory image with dlf extension and hit Apply,
    Wait few minutes, after the Power LED will stop blinking, the router is
    ready for configuration.

Known issues
Some USB 2.0 devices work at full speed mode 1.1 only

MAC addresses

factory partition only contains one (binary) MAC address in 0x4.
u-boot-env contains four (ascii) MAC addresses, of which two appear
to be valid.

  factory     0x4       **:**:**:**:b9:84  binary
  u-boot-env  ethaddr   **:**:**:**:b9:84  ascii
  u-boot-env  wanaddr   **:**:**:**:b9:85  ascii
  u-boot-env  wlanaddr  00:AA:BB:CC:DD:12  ascii
  u-boot-env  iNICaddr  00:AA:BB:CC:DD:22  ascii

The factory firmware only assigns ethaddr. Thus, we take the
binary value which we can use directly in DTS.

Additional information
OEM firmware shell password is: SitecomSenao
useful for creating backup of original firmware.
There is also another revision of this device (v1 001), based on RT3352 SoC

Signed-off-by: Andrea Poletti <polex73@yahoo.it>
[remove config DT label, convert to nvmem, remove MAC address
 setup from u-boot-env, add MAC address info to commit message]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-09-05 23:52:35 +02:00
Robert Balas baacdd53df ath79: add support for TP-Link TL-WA1201 v2
This device is a wireless access point working on the 2.4 GHz and 5 GHz
band, based on Qualcomm/Atheros QCA9563 + QCA9886.

Specification
- 775 MHz CPU
- 128 MB of RAM (DDR2)
- 16 MB of FLASH (SPI NOR)
- QCA9563: 2.4 GHz 3x3
- QCA9886: 5 GHz
- AR8033: 1x 1 Gbs Ethernet
- 4x LED, WPS factory reset and power button
- bare UART on PCB (accessible through testpoints)

Methods for Flashing:
- Apply factory image in OEM firmware web-gui. Wait a minute after the
  progress bar completes and restart the device.
- Sysupgrade on top of existing OpenWRT image
- Solder wires onto UART testpoints and attach a terminal.
  Boot the device and press enter to enter u-boot's menu. Then issue the
  following commands
  1. setenv serverip your-server-ip
     setenv ipaddr your-device-ip
  2. tftp 0x80060000 openwrt-squashfs.bin (Rembember output of size in
    hex, henceforth "sizeinhex")
  3. erase 0x9f030000 +"sizeinhex"
  4. cp.b 0x80060000 0x9f030000 0x"sizeinhex"
  5. reboot

Recover:
- U-boot serial console

Signed-off-by: Robert Balas <balasr@iis.ee.ethz.ch>
[convert to nvmem]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-09-05 23:52:35 +02:00
Chuanhong Guo 43f0e386d4 mediatek: add support for TOTOLINK A8000RU
Specifications:
- SoC: MT7622
- RAM: 512MB
- Flash: MX35LF1GE4AB 128MB SPI NAND
- Ethernet: RTL8367S 5x1GbE
- WiFi: 2.4G: MT7622 5G: MT7615N x2
- Other ports: USB3.0 x1

Flash instruction:
*important*: upgrade vendor firmware to at least V7.1cu.643_B20200521
1. hold the reset button and power on the device. wait for about 10s
   before releasing the reset button.
2. upload sysupgrade.bin via u-boot recovery page on http://192.168.1.1

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
2021-09-03 15:53:28 +08:00
Rui Salvaterra 42ee7d8157 kernel: add missing CONFIG_SECURITY_NETWORK_XFRM ksym
Paul noticed a build failure [1] due to this missing symbol. Add it as disabled
to both generic kconfigs.

[1] https://github.com/aparcar/openwrt/runs/3480872706?check_suite_focus=true#step:11:63

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
2021-08-31 22:41:46 -10:00
Rafał Miłecki f55f1dbaad bcm53xx: switch to the kernel 5.10
With PCI and USB regressions fixed it should be safe to switch now.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2021-08-31 11:41:09 +02:00
Rafał Miłecki 9b40346328 bcm53xx: fix kmod-i2c-bcm-iproc for kernel 5.10
I2C_BCM_IPROC selects I2C_SLAVE which in turn makes two new symbols
available: I2C_SLAVE_EEPROM and I2C_SLAVE_TESTUNIT. That was causing:

I2C support (I2C) [M/n/y/?] m
  Enable compatibility bits for old user-space (I2C_COMPAT) [N/y/?] n
  I2C device interface (I2C_CHARDEV) [M/n/?] m
  I2C bus multiplexing support (I2C_MUX) [N/m/?] n
  Autoselect pertinent helper modules (I2C_HELPER_AUTO) [N/y/?] n
    SMBus-specific protocols (I2C_SMBUS) [N/m/?] n
  I2C/SMBus Test Stub (I2C_STUB) [N/m/?] n
  I2C slave support (I2C_SLAVE) [Y/?] y
    I2C eeprom slave driver (I2C_SLAVE_EEPROM) [N/m/?] n
    I2C eeprom testunit driver (I2C_SLAVE_TESTUNIT) [N/m/?] (NEW)

Ideally I2C_SLAVE should probably be packaged as kmod-i2c-slabe. For now
just modify kmod-i2c-bcm-iproc to fix kernel compilation.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2021-08-31 11:41:04 +02:00
Rafał Miłecki 62465c75be bcm53xx: fix USB in kernel 5.10
This makes USB controller driver work with USBs that are always powered
on (don't require toggling any GPIO).

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2021-08-31 09:34:40 +02:00
Alexander Couzens c39be8e7a4
ramips: minew g1-c: use default static address for lan instead of dhcp
As Adrian Schmutzler suggested on github [1] the device should follow the
default behaviour on ethernet using a static address instead using dhcp.

[1] 8d497b6570

Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
2021-08-31 02:42:32 +02:00
Rafał Miłecki 8a4d4d4243 bcm53xx: backport missed DT patch cleaning up CRU block
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2021-08-30 09:00:28 +02:00
Sungbo Eo f08b76b32f ramips: w2914ns-v2: consolidate leds nodes into dtsi
w2914ns-v2, 11acnas, and freezio use almost same board and thus share a
common dtsi file. Now that LED labels do not contain "devicename" since
commit c846dd91f0 ("ramips: remove model name from LED labels"), let's
move the leds nodes to dtsi and remove them from dts.

Note that freezio has only one USB 3.0 port and adding &ehci_port2 trigger
does not incur any visible changes.

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
2021-08-30 00:37:47 +02:00
Adrian Schmutzler aec97b31ea ramips: provide default BLOCKSIZE for Device/seama
The Device/seama shared definition requires BLOCKSIZE, so it should
have a default value for this variable.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-08-30 00:37:47 +02:00
Filip Matijević e2b03c16eb ipq806x: add missing enclosing partitions block for TP-Link C2600
The partitions that have compatible property set are skipped by mtd if
they are not contained inside a partitions node and this breaks
fetching MAC address from "default-mac" partition.

Fix this by defining all the partitions inside partitions node with
compatible = "fixed-partitions" as nvmem requires the standard
partitions scheme to work correctly.

Fixes: FS#3945
Fixes: cd36d71655 ("ipq806x/dts: Add Archer C2600 DTS")
Fixes: 0458a8993c ("ipq806x: convert mtd-mac-address to nvmem
implementation")

Signed-off-by: Filip Matijević <filip.matijevic.pz@gmail.com>
Reviewed-by: Ansuel Smith <ansuelsmth@gmail.com>
[adjust commit title/message]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-08-30 00:37:35 +02:00
Adrian Schmutzler d37125b3f3 ath79: remove redundant BLOCKSIZE of 64k from devices
BLOCKSIZE = 64k is set in Device/Default, i.e. global default on
the target.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-08-30 00:37:35 +02:00
Rafał Miłecki bce00f47e5 bcm53xx: backport the latest upstream DT changes
This includes:
1. BCM5301X changes from 5.14 and queued 5.15 stuff
2. NSP changes from 5.11 - 5.15 for kernel 5.10

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2021-08-29 22:57:13 +02:00
Rui Salvaterra 505b7a2d08 kernel: move two symbols to the generic kconfigs
CONFIG_RCU_{NEED_SEGCBLIST,STALL_COMMON} are set basically everywhere. Move them
to the generic kconfigs. And resort the generic kconfigs while at it.

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
2021-08-29 17:07:19 +02:00
Rui Salvaterra 7e135add24 kernel: disable CONFIG_RCU_EXPERT and friends
Based on the existing documentation [1][2], I dare anyone to demonstrate that
we need to fine-tune these RCU parameters. The (performance) breakage potential
for doing so is immense, so let's just please put down this loaded footgun.

Disable CONFIG_RCU_EXPERT and its dependent symbols. Additionally, remove the
CONFIG_RCU_EXPERT symbol from the target kconfigs which contain it.

[1] https://www.kernel.org/doc/Documentation/RCU/Design/Data-Structures/Data-Structures.html
[2] https://lwn.net/Articles/777214/

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
2021-08-29 17:03:38 +02:00
Ansuel Smith b8f8d0651c kernel: fix warning about unused try_to_force_load
There is a longlasting warn about unused defined try_to_force_load.
Fix this by including this function only when actually used.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2021-08-29 16:31:24 +02:00
John Audia be7e0091fe kernel: bump 5.4 to 5.4.143
Manually rebased:
  bcm27xx/patches-5.4/950-1031-net-lan78xx-Ack-pending-PHY-ints-when-resetting.patch

Removed upstreamed:
  mvebu/patches-5.4/100-cpufreq-armada-37xx-forbid-cpufreq-for-1.2-GHz-variant.patch

All other patches automatically rebased.

Build system: x86_64
Build-tested: ipq806x/R7800
Run-tested: ipq806x/R7800

No dmesg regressions, everything functional

Signed-off-by: John Audia <graysky@archlinux.us>
2021-08-29 16:31:02 +02:00
John Audia 6b1cd3e345 kernel: bump 5.10 to 5.10.61
Manually rebased:
  bcm27xx/patches-5.10/950-1031-net-lan78xx-Ack-pending-PHY-ints-when-resetting.patch

Removed upstreamed:
  mvebu/patches-5.10/101-cpufreq-armada-37xx-forbid-cpufreq-for-1.2-GHz-variant.patch

All other patches automatically rebased.

Build system: x86_64
Build-tested: bcm2711/RPi4B
Run-tested: bcm2711/RPi4B

No dmesg regressions, everything functional

Signed-off-by: John Audia <graysky@archlinux.us>
2021-08-29 16:30:20 +02:00
Sebastian Schaper 1c8214d6f2 ath79: fix spelling of DEVICE_MODEL for D-Link DAP-2695
Change `DAP-2965` to `DAP-2695` for device selection in menuconfig.

Fixes: cd09f26660 ("ath79: add support for D-Link DAP-2695-A1")

Signed-off-by: Sebastian Schaper <openwrt@sebastianschaper.net>
[add Fixes]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-08-28 13:24:23 +02:00
David Bauer 90e167abaa ramips: add label-mac for TL-MR3020 v3
The TP-Link TL-MR3020 v3 only has a single MAC address assigned for
ethernet LAN as well as WiFi. This MAC address is also printed on the
casing.

Signed-off-by: David Bauer <mail@david-bauer.net>
2021-08-28 01:35:02 +02:00
David Bauer 9c965893ed ramips: enable fast-read for TL-MR3020 v3
The GigaDevices GD25Q64B found on the TL-MR3020 v3 supports the fast
read instruction. Add the required DT property in order to enable usage
of this property.

Signed-off-by: David Bauer <mail@david-bauer.net>
2021-08-28 01:31:45 +02:00
David Bauer db3545cd02 ramips: increase SPI frequency for TL-MR3020 v3
The GigaDevices GD25Q64B supports higher SPI clocks than 10 MHz. While
100 MHz do not work reliably, 50 MHz works without issues.

Signed-off-by: David Bauer <mail@david-bauer.net>
2021-08-28 01:31:36 +02:00
David Bauer 161ee85bbe ramips: fix input type for TL-MR3020 v3
The modec{1,2} keys are actually switches.

Add the respective DTS properties to avoid accidental activation of
failsafe mode.

Signed-off-by: David Bauer <mail@david-bauer.net>
2021-08-28 01:31:29 +02:00
Daniel Golle cf40141b51
kernel: properly handle paging errors in fit partition parser
The uImage.FIT partition uses page mapping without properly handling
paging errors. This can lead to Kernel Oops in case of read errors
while trying to parse uImage.FIT partitions.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-08-27 21:32:43 +01:00
Chuanhong Guo 97e32e9702 mediatek: mt7623: replace kconfig symbol for snand driver
this change was missing during the spi-nand driver replacement, causing
build failure.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
2021-08-27 22:22:29 +08:00
Chuanhong Guo 472437b93f mediatek: mt7629: manually add missing kconfig
These options doesn't show up unless some kernel packages are selected,
so they are not covered by kernel_menuconfig.
Manually add them so that a build with all kmods can pass without user
interaction.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
2021-08-27 15:54:53 +08:00
Chuanhong Guo 8f2cace0b7 mediatek: mt7629: build with linux 5.10
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
2021-08-27 10:26:25 +08:00
Chuanhong Guo 9abd2fb6c4 mediatek: bmt: set default bmt oob offset to 0
there's no driver level remapping of oob data in the new spi-nand
driver and bmt oob signature starts at 0x0 of the dumped oob data.
change the default value to 0 for the new spi-nand driver.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
2021-08-27 10:26:25 +08:00
Chuanhong Guo 388127abd1 mediatek: mtk-snand: check request size against chip info
mtd->size will be overrided by BMT which makes all mtd requests made by
bmt fail in request size checking.
this commit changes the driver to check against actual chip size in chip
info as a workaround.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
2021-08-27 10:26:25 +08:00
Chuanhong Guo b600aee3ed mediatek: attach bmt to the new snand driver
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
2021-08-27 10:26:25 +08:00
Chuanhong Guo 01b452fe2d mediatek: change dts to use the new snand driver
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
2021-08-27 10:26:25 +08:00
Chuanhong Guo c6ed31630d mediatek: remove spi-nand hacks from 5.10
we now have a standalone mtd driver and the old spi-mem driver along
with the hack in spi-nand core can be removed.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
2021-08-27 10:26:25 +08:00
Weijie Gao e8e8487603 mediatek: enable new spi-nand driver for kernel 5.10
This patch enables new spi-nand driver for mt7622 and mt7629.

Signed-off-by: Weijie Gao <hackpascal@gmail.com>
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
2021-08-27 10:26:25 +08:00
Weijie Gao 050621aa01 mediatek: add a new spi-nand driver for kernel 5.10
This patch adds a new spi-nand driver which implements the SNFI of mt7622
and mt7629.

Unlike the existing snfi driver which makes use of the spi-mem framework
and the spi-nand framework with modified ecc support, this driver is
implemented directly on the mtd framework with other components untouched,
and provides better performance, and behaves exactly the same as the nand
framework.

Signed-off-by: Weijie Gao <hackpascal@gmail.com>
2021-08-27 10:26:24 +08:00
Christian Lamparter a1bd8109f0 ath79: remove obsolete pci-ath9k-fixup.[c,h] files
This was old code from the AR71XXs target days that
doesn't get compiled and used anymore.

Bringing up AR92xx and earlier chips from their
OWL-Emulator state is currently done by the upstream
ath9k-pci-owl-loader module. (see the kmod-owl-loader
package).

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2021-08-26 21:00:26 +02:00
Jan-Niklas Burfeind d98738b5c1 ath79: add support for onion omega
The Onion Omega is a hardware development platform with built-in WiFi.

https://onioniot.github.io/wiki/

Specifications:
 - QCA9331 @ 400 MHz (MIPS 24Kc Big-Endian Processor)
 - 64MB of DDR2 RAM running at 400 MHz
 - 16MB of on-board flash storage
 - Support for USB 2.0
 - Support for Ethernet at 100 Mbps
 - 802.11b/g/n WiFi at 150 Mbps
 - 18 digital GPIOs
 - A single Serial UART
 - Support for SPI
 - Support for I2S

Flash instructions:
The device is running OpenWrt upon release using the ar71xx target.
Both a sysupgrade
and uploading the factory image using u-boots web-UI do work fine.

Depending on the ssh client, it might be necessary to enable outdated
KeyExchange methods e.g. in the clients ssh-config:

Host 192.168.1.1
        KexAlgorithms +diffie-hellman-group1-sha1

The stock credentials are: root onioneer

For u-boots web-UI manually configure `192.168.1.2/24` on your computer,
connect to `192.168.1.1`.

MAC addresses as verified by OEM firmware:
2G       phy0      label
LAN      eth0      label - 1

LAN is only available in combination with an optional expansion dock.

Based on vendor acked commit:
commit 5cd49bb067 ("ar71xx: add support for Onion Omega")

Partly reverts:
commit fc553c7e4c ("ath79: drop unused/incomplete dts")

Signed-off-by: Jan-Niklas Burfeind <git@aiyionpri.me>
2021-08-26 15:07:18 +02:00
Álvaro Fernández Rojas 4ab0b5fabd bmips: backport accepted watchdog patch
This patch has been accepted for linux v5.14.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2021-08-25 10:24:33 +02:00
David Yang 38cb500516 ramips: expose ephy leds for miwifi-mini
Give users more control by exposing ephy leds.

Signed-off-by: David Yang <mmyangfl@gmail.com>
[remove execute bit on 01_leds, add status for gpio2]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-08-25 01:42:17 +02:00
David Yang 5ed11012e7 ramips: lock u-boot partition and unlock u-boot-env for miwifi-mini
Generally u-boot should keep read-only to avoid mis-overwriting and
bricking the device, but u-boot-env could be safely modified with u-boot
setenv tool.

Signed-off-by: David Yang <mmyangfl@gmail.com>
2021-08-25 01:42:17 +02:00
David Yang a6c410ae10 ramips: increase flash freq for miwifi-mini
The flash is Winbond 25Q128. As it has large rom, better to increase flash
frequency to 70MHz according to the flash spec and enable fast-read.

Signed-off-by: David Yang <mmyangfl@gmail.com>
2021-08-25 01:42:17 +02:00
Giovanni Cascione d57ba86e48 ramips: add support for D-Link DAP-1325-A1
This patch adds support for D-Link DAP-1325-A1 (Range Extender Wi-Fi N300)

Specifications:
- SoC: 580Mhz MT7628NN
- RAM: 64MB, DDR2 SDRAM
- Storage: 8MB, SPI (W25Q64JVSSIQ)
- Ethernet: 1x 10/100 LAN port
- WIFI: 2.4 GHz 802.11bgn
- LED: Status (2x to provide 3 colors), Wi-Fi Signal Strength (4x)
- Buttons: Reset, WPS
- UART: Serial console (57600, 8n1)
Row of 4 holes near LAN port, starting from square hole:
3.3V, TX,RX,GND
- FCC ID: fccid.io/KA2AP1325A1/

Installation:

Failsafe UI
Firmware can be uploaded with Failsafe UI web page:
- turn device off
- press and hold reset button
- turn device on
- keep holding reset until red wifi strength led turns on (ab. 10sec)
- connect to device through LAN port
PC must be configured with static ip (192.168.0.x)
- connect to 192.168.0.50
- select image to be flashed and upload.
Device will reboot after successful update

Serial port/TFTP server
- Connect through serial connectors on PCB (e.g. with teraterm)
- Set up a TFTP server, and connect through LAN with static IP
- Put image file in the root of the server
- Boot the device and select '2' at U-Boot startup
- Set device IP, server IP and image file name
- Start upload and flash

Signed-off-by: Giovanni Cascione <ing.cascione@gmail.com>
[fix whitespaces in DTS, convert to nvmem, add mtd-eeprom]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-08-25 01:42:17 +02:00
Romain Mahoux e2d08084c3 ath79: add support for Compex WPJ558 (16M)
Specifications:
- SoC: QCA9558
- DRAM: 128MB DDR2
- Flash: 16MB SPI-NOR
- Wireless: on-board abgn 2×2 2.4GHz radio
- Ethernet: 2x 10/100/1000 Mbps (1x 802.11af PoE)
- miniPCIe slot

Flash instruction:
- From u-boot

tftpboot 0x80500000 openwrt-ath79-generic-compex_wpj558-16m-squashfs-sysupgrade.bin
erase 0x9f030000 +$filesize
cp.b $fileaddr 0x9f030000 $filesize
boot

- From cpximg loader

The cpximg loader can be started either by holding the reset button
during power up. Once it's running, a TFTP-server under 192.168.1.1 will accept
the image appropriate for the board revision that is etched on the board.

For example, if the board is labelled '6A07':

tftp -v -m binary 192.168.1.1 -c put openwrt-ath79-generic-compex_wpj558-16m-squashfs-cpximg-6a07.bin

Signed-off-by: Romain Mahoux <romain@mahoux.fr>
[convert to nvmem, remove redundant lan_mac in 02_network]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-08-25 01:42:17 +02:00
Chukun Pan 269758a5bc ipq806x: Askey RT4230W REV6: use usual writing for pcie part
The problem has been fixed in f47cb405ca ("ipq806x: fix pci broken
on bootm command"), now the pcie part can be written in the usual way.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
Reviewed-by: Ansuel Smith <ansuelsmth@gmail.com>
2021-08-25 01:42:16 +02:00
Shiji Yang a73a8269e1 ramips: add support for DomyWifi DM202/DM203/DW22D
Specifications:
* SOC: MT7620A + MT7610E
* ROM: 16 MiB spi flash (W25Q128FVSG)
* RAM: 128 MiB DDR2 (W971GG6KB-25)
* WAN: 10/100M *1
* LAN: 10/100M *4
* USB: Type-A USB2.0 *1
* SD: MicroSD *1
* Button: Reset *1
* Antennas: 2.4 GHz *2 + 5 GHz *1
* TTL Baudrate: 57600
* U-Boot Recovery: IP: 10.10.10.123, Server: 10.10.10.3

Installation:
* Web UI Update
  1. Open http://192.168.10.1/upgrade.html in the browser.
  2. Rename firmware to a short name like firmware.bin and then upload it.
  3. Fill in the password column with the following content:
  password | mtd -x mIp2osnRG3qZGdIlQPh1 -r write /tmp/firmware.bin firmware
* TFTP + U-Boot
  1. Connect device with a TTL cable.
  2. Press "2" when booting to select "Load system code then write to Flash via TFTP".
  3. Upload firmware by tftpd64, it will boot when write instruction is executed.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
2021-08-25 01:42:16 +02:00
Shiji Yang 09143282bd ramips: add support for Motorola MWR03
Specifications:
* SOC: MT7628AN + MT7612E
* ROM: 8 MiB Flash
* RAM: 64 MiB DDR2
* WAN: 10/100M *1
* LAN: 10/100M *3
* Button: Reset *1
* LEDs: orange *1, white *1
* Antennas: 2.4 GHz *2 + 5 GHz *2
* TTL Baudrate: 57600
* TFTP Upgrade: IP: 192.168.51.1, Server: 192.168.51.100

MAC addresses as verified by OEM firmware:

use   address   source
2g    *:d8      factory 0x0004 (label)
5g    *:d9      factory 0x8004
LAN   *:d7      factory $label -1
WAN   *:da      factory $label +2

Installation (TFTP + U-Boot):
 * Connect device with a TTL cable and open a serial session by
   PuTTY.
 * Press "2" when booting to select "Load system code then write
   to Flash via TFTP".
 * Configure the IP of local host server.
 * Upload firmware by tftpd64, it will boot when write instruction
   is executed.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
[fix DTS line endings, fix label MAC address, adjust status LED
 names, convert mtd-mac-address-increment to mac-address-increment]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-08-25 01:41:35 +02:00
Chukun Pan fcc075e12f ipq806x: Askey RT4230W REV6: fix caldata script
The partition name in the device dts is '0:ART'.
Be independent to prevent this part from becoming
incorrect once the kernel v5.4 gone.

Fixes: da8428d277 ("ipq806x: add support for Askey RT4230W REV6")

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
2021-08-24 20:26:00 +02:00
Shiji Yang 80e70be0ab ramips: add new flash layout support to Phicomm K2
Descriptions:
Phicomm K2 (PSG1218) got a new "permanent_config" partition after
update firmware to v22.5. This partition located in front of the
firmware partition, same as The Phicomm K2P and K2G. Due to this
change the new bootloader can't load previous firmware any more.
This commit is aimed at add support for Phicomm K2 which official
firmware version is 22.5.x or newer. For which runs old firmware
version, just update OpenWrt that has a prefix of "k2-v22.4".
For uniform naming, this commit also changed the model name
PSG1218 to a more recognizable name K2, refer to Phicomm K2G,
K2P K2T.

OpenWrt selection table:
official firmware version           OpenWrt
v22.4.x.x or older              phicomm_k2-v22.4
v22.5.x.x or newer              phicomm_k2-v22.5

Installation:
Same as Phicomm K2G, K2P, PSG1208.
a. TFTP + U-Boot
b. Open telnet by some web page vulnerability (Search Baidu by key
   words "K2 telnet"), and then we can upload firmware image to
   /tmp and write it to firmware partition with mtd instruction.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
[rebase, add/harmonize version in model variables, fix version typo
 in commit message, wrap commit message properly]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-08-24 20:26:00 +02:00
Adrian Schmutzler c4143505e0 ramips: mt7620: move Phicomm MAC address setup to DTSI
The setup is the same for all devices, so move it up one level.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-08-24 20:26:00 +02:00
Zoltan HERPAI 98eb95dd00 ath79: add support for Atheros DB120 reference board
Atheros DB120 reference board.

Specifications:

SoC:    QCA9344
DRAM:   128Mb DDR2
Flash:  8Mb SPI-NOR, 128Mb NAND flash
Switch: 5x 10/100Mbps via AR8229 switch (integrated into SoC),
        5x 10/100/1000Mbps via QCA8237 via RGMII
WLAN:   AR9300 (SoC, 2.4G+5G) + AR9340 (PCIe, 5G-only)
USB:    1x 2.0
UART:   standard QCA UART header
JTAG:   yes
Button: 1x reset
LEDs:   a lot
Slots:  2x mPCIe + 1x mini-PCI, but using them requires
        additional undocumented changes.
Misc:   The board allows to boot off NAND, and there is
        I2S audio support as well - also requiring
        additional undocumented changes.

Installation:

1. Original bootloader

   Connect the board to ethernet
   Set up a server with an IP address of 192.168.1.10
   Make the openwrt-ath79-generic-atheros_db120-squashfs-factory.bin
   available via TFTP

   tftpboot 0x80060000 openwrt-ath79-generic-atheros_db120-squashfs-factory.bin
   erase 0x9f050000 +$filesize
   cp.b $fileaddr 0x9f050000 $filesize

2. pepe2k's u-boot_mod

   Connect the board to ethernet
   Set up a server with an IP address of 192.168.1.10
   Make the openwrt-ath79-generic-atheros_db120-squashfs-factory.bin
   available via TFTP, as "firmware.bin"

   run fw_upg

   Reboot the board.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
[explicit factory recipe in generic.mk, sorting in 10-ath9k-eeprom,
 convert to nvmem, use fwconcat* names in DTS, remove unneeded DT
 labels, remove redundant uart node]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-08-22 23:02:08 +02:00
Russell Senior 61b49cd3f8 ath79: add support for Ubiquiti PowerBeam M2 (XW)
This patch adds support for the Ubiquiti PowerBeam M2 (XW), e.g. PBE-M2-400,
a 802.11n wireless with a feed+dish form factor. This device was previously
supported by the ar71xx loco-m-xw firmware.

Specifications:
 - Atheros AR9342 SoC
 - 64 MB RAM
 - 8 MB SPI flash
 - 1x 10/100 Mbps Ethernet port, 24 Vdc PoE-in
 - Power and LAN green LEDs
 - 4x RSSI LEDs (red, orange, green, green)
 - UART (115200 8N1)

Flashing via stock GUI:
 - Downgrade to AirOS v5.5.x (latest available is 5.5.10-u2) first (see
   https://openwrt.org/toh/ubiquiti/powerbeam installation instructions)
 - Upload the factory image via AirOS web GUI.

Flashing via TFTP:
 - Use a pointy tool (e.g., unbent paperclip) to keep the
   reset button pressed.
 - Power on the device (keep reset button pressed).
 - Keep pressing until LEDs flash alternatively LED1+LED3 =>
   LED2+LED4 => LED1+LED3, etc.
 - Release reset button.
 - The device starts a TFTP server at 192.168.1.20.
 - Set a static IP on the computer (e.g., 192.168.1.21/24).
 - Upload via tftp the factory image:
    $ tftp 192.168.1.20
    tftp> bin
    tftp> trace
    tftp> put openwrt-ath79-generic-ubnt_powerbeam-m2-xw-squashfs-factory.bin

WARNING: so far, no non-destructive method has been discovered for
opening the enclosure to reach the serial console. Internal photos
are available here: https://fcc.io/SWX-NBM2HP

Signed-off-by: Russell Senior <russell@personaltelco.net>
2021-08-22 22:41:52 +02:00
Russell Senior 96db7d2a73 ath79: rename Ubiquiti PowerBeam M (XW) to PowerBeam M5 (XW)
The commit [1] added support for Ubiquiti PowerBeam M (XW), tested
on the PBE-M5-400. But, it turns out the PBE-M2-400 has a different
ethernet configuration, so make the support specific to the m5 version
in anticipation of adding specific support for the m2 in a separate
commit.

[1] 12eb5b2384 ("ath79: add support for Ubiquiti PowerBeam M (XW)")

Signed-off-by: Russell Senior <russell@personaltelco.net>
[fix model name in DTS, format commit reference in commit message]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-08-22 22:41:41 +02:00
Daniel Golle f4493c647a
mediatek: mt7623: enable clock drivers for Mali-450 and audio
Built clock drivers for G3DSYS and AUDSYS into the kernel to allow
multimedia features (GPU and audio) to work if they exist.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-08-22 14:34:29 +01:00
Shane Synan 9baca41064 ipq806x: fix min<>target opp-microvolt DTS mixup
Rearrange all voltage triplets for "opp_table0" to match the
specifications.  "opp-microvolt" and "opp-microvolt-<name>" triplets
are in order of <target min max>, and NOT <min target max>.

Previously, the CPU would *always* spend its time at the "minimum"
voltage, ignoring the actual intended target.  This is a regression
from previous behavior.

On an NBG6817 with a Qualcomm CPU of PVS bin #2...
(see &opp_table0 -> opp-1725000000 -> opp-microvolt-speed0-pvs2-v0)

* Before:
/usr/bin/tail -n +1 /sys/kernel/debug/opp/cpu0/opp\:1725000000/supply-0/u_volt_*
==> /sys/kernel/debug/opp/cpu0/opp:1725000000/supply-0/u_volt_max <==
1260000

==> /sys/kernel/debug/opp/cpu0/opp:1725000000/supply-0/u_volt_min <==
1200000

==> /sys/kernel/debug/opp/cpu0/opp:1725000000/supply-0/u_volt_target <==
1140000

* After:
/usr/bin/tail -n +1 /sys/kernel/debug/opp/cpu0/opp\:1725000000/supply-0/u_volt_*
==> /sys/kernel/debug/opp/cpu0/opp:1725000000/supply-0/u_volt_max <==
1260000

==> /sys/kernel/debug/opp/cpu0/opp:1725000000/supply-0/u_volt_min <==
1140000

==> /sys/kernel/debug/opp/cpu0/opp:1725000000/supply-0/u_volt_target <==
1200000

To check voltages and frequencies at run time, use...
/bin/cat /sys/kernel/debug/regulator/regulator_summary &&
  /bin/cat /sys/kernel/debug/clk/clk_summary | grep "hfpll"

See
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/Documentation/devicetree/bindings/opp/opp.txt?h=v5.4.142#n91

Fixes: 1e25423be8 ("ipq806x: refresh dtsi patches")

Signed-off-by: Shane Synan <digitalcircuit36939@gmail.com>
Reviewed-by: Ansuel Smith <ansuelsmth@gmail.com>
[commit message style cleanup, another kernel refresh]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-08-21 23:54:31 +02:00
Adrian Schmutzler c23bc5032f ramips: add label MAC address for Onion Omega 2(+)
Thanks to a hint from Michael Siegenthaler in 4b4fa2f9fe ("ramips:
fix ethernet MAC address on Omega2"), the label MAC address of
the Onion Omega 2(+) can be set based on its documentation [1].

[1] https://docs.onion.io/omega2-docs/mac-address.html

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-08-21 23:42:32 +02:00
Álvaro Fernández Rojas e1142041b0 bcm27xx: switch to kernel 5.10
After testing it on RPi B+ and RPi 4B it seems stable enough to enable it on
OpenWrt master.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2021-08-21 19:07:07 +02:00
Álvaro Fernández Rojas 8299d1f057 bcm27xx: add kernel 5.10 support
Rebased RPi foundation patches on linux 5.10.59, removed applied and reverted
patches, wireless patches and defconfig patches.

bcm2708: boot tested on RPi B+ v1.2
bcm2709: boot tested on RPi 4B v1.1 4G
bcm2711: boot tested on RPi 4B v1.1 4G

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2021-08-21 19:07:07 +02:00
Álvaro Fernández Rojas 33b6885975 generic: fix debloat dma-buf 5.10 patch
The current patch produces the following error when CONFIG_DMABUF_HEAPS is
enabled:
drivers/built-in.a: member drivers/dma-buf/heaps in archive is not an object

Fixes: b10d604459 ("kernel: add linux 5.10 support")

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2021-08-21 19:07:06 +02:00
Álvaro Fernández Rojas 41ceec8100 generic: add missing 5.10 config symbols
These symbols are needed for bcm27xx 5.10 kernel support.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2021-08-21 19:07:06 +02:00
Daniel Golle 4f1c5b01c1
mediatek: mt7623: backport musb, improve HDMI console
Backport support for dual-role USB 2.0 as that's what is actually
built-into MT7623.
Improve HDMI console by enabling VT and setting up tty1..tty6.
Re-add accidentally removed CONFIG_ARM_ARCH_TIMER.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-08-21 17:23:36 +01:00
Michael Siegenthaler 4b4fa2f9fe ramips: fix ethernet MAC address on Omega2
According to https://docs.onion.io/omega2-docs/mac-address.html, 0x28 is
the correct location to read the address on Onion Omega 2(+) devices.

This fixes a regression introduced by commit 77e850fe76 ("ramips: tidy up
MAC address setup for Linkit Smart and Omega2"), which was a cleanup that
intended to preserve existing behavior. In my testing with v19.07.7,
however, the MAC address determined from the device tree takes precedence
over the one set by 02_network, so the aforementioned commit actually
changed the behavior.

Signed-off-by: Michael Siegenthaler <msiegen@google.com>
[Adapt patch to nvmem usage]
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2021-08-21 16:30:30 +02:00
John Audia f25cebc43c kernel: bump 5.4 to 5.4.142
Removed upstreamed:
  hack-5.4/991-platform-x86-pcengines-apuv2-revert-simswitch.patch

All other patches automatically rebased.

Build system: x86_64
Build-tested: ipq806x/R7800
Run-tested: ipq806x/R7800

No dmesg regressions, everything functional

Signed-off-by: John Audia <graysky@archlinux.us>
2021-08-21 15:59:39 +02:00
John Audia 96369a68e7 kernel: bump 5.4 to 5.4.141
All patches automatically rebased.

Build system: x86_64
Build-tested: ipq806x/R7800
Run-tested: ipq806x/R7800

No dmesg regressions, everything functional

Signed-off-by: John Audia <graysky@archlinux.us>
2021-08-21 15:59:39 +02:00