Commit Graph

52090 Commits (master)
 

Author SHA1 Message Date
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>
3 years ago
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>
3 years ago
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>
3 years ago
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>
3 years ago
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>
3 years ago
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>
3 years ago
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>
3 years ago
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>
3 years ago
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>
3 years ago
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>
3 years ago
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>
3 years ago
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>
3 years ago
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>
3 years ago
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>
3 years ago
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>
3 years ago
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>
3 years ago
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>
3 years ago
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>
3 years ago
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>
3 years ago
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>
3 years ago
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>
3 years ago
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>
3 years ago
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>
3 years ago
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>
3 years ago
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>
3 years ago
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>
3 years ago
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>
3 years ago
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>
3 years ago
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>
3 years ago
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>
3 years ago
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>
3 years ago
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>
3 years ago
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]
3 years ago
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>
3 years ago
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>
3 years ago
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>
3 years ago
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>
3 years ago
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>
3 years ago
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>
3 years ago
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>
3 years ago
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>
3 years ago
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>
3 years ago
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>
3 years ago
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>
3 years ago
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>
3 years ago
Felix Fietkau 8ea0d08e0e kernel: add patch to fix an issue with kernel headers that broke perf
Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 years ago
Felix Fietkau ea44aebc27 tools/fakeroot: fix build error on macOS
Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 years ago
Felix Fietkau 2bfac61483 mac80211: backport support for BSS color changes
This is needed for an upcoming mt76 update

Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 years ago
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>
3 years ago
Jesus Fernandez Manzano 5269c47e8d hostapd: fix segfault when deinit mesh ifaces
In hostapd_ubus_add_bss(), ubus objects are not registered for mesh
interfaces. This provokes a segfault when accessing the ubus object in
mesh deinit.

This commit adds the same condition to hostapd_ubus_free_bss() for
discarding those mesh interfaces.

Signed-off-by: Jesus Fernandez Manzano <jesus.manzano@galgus.net>
3 years ago