Commit Graph

23246 Commits (f886a26851f3f6e82fbd8c11fb0e7ff2f3295c5b)

Author SHA1 Message Date
John Crispin 9da2b56760 ipq40xx: fix ethernet vlan double tagging
As the the SoC uses implicit vlan tagging for dual MAC support, the
offload feature breaks when using double tagging.

Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: John Crispin <john@phrozen.org>
4 years ago
John Crispin 2557d2eb4c ipq40xx: merge all ar40xx patches into one single patch
Signed-off-by: John Crispin <john@phrozen.org>
4 years ago
Adrian Schmutzler 3635f7efc1 ipq806x: really fix aliases node for Qualcomm IPQ8064/DB149
Having looked at this again, it appears that only gsbi2_serial
is actually enabled for this device, so the entry in the broken
aliases node was correct.

Therefore, this needs to set its own serial0 instead of inheriting
"serial0 = &gsbi4_serial;" from DTSI. Do this with the correctly
named aliases node now.

Fixes: c83f7b6d21 ("ipq806x: fix aliases node name for Qualcomm
IPQ8064/DB149")

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Adrian Schmutzler e363470d1a ipq806x: use consistent DT labels for gsbiX_serial
Kernel uses the label gsbiX_serial, so let's adjust our labels to
this naming scheme.

This is cosmetic, and actually only already existing gsbi4_serial
has been used at all.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Adrian Schmutzler c83f7b6d21 ipq806x: fix aliases node name for Qualcomm IPQ8064/DB149
This device uses a node incorrectly named "alias" instead of
"aliases" since it was introduced.

Remove it without replacement, as the definitions in it don't
seem to be required anyway:

The serial0 definition has never been effective anyway and this
would be the only device deviating from the common setting
"serial0 = &gsbi4_serial;" for ipq8064. (So, maybe the wrong
node prevented us from finding out about the wrong serial
definition?)

The mdio-gpio0 alias was supposed to be removed in d2a2eb7e48
anyway, the redundant definition in the alias node was just
overlooked back then.

Fixes: 0fd202f3e5 ("ipq806x: add db149 dts files")
Fixes: d2a2eb7e48 ("ipq806x: replace caf nss-gmac driver by upstream stmmac")

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Roger Pueyo Centelles 26fda610f3 ath79: use rgmii-id instead of rgmii in ubnt,lap-120
Since commit 6f2e1b7485 (ath79: disable delays on AT803X config init)
the incoming incoming traffic on the ubnt,lap-120 devices Ethernet
port was not making it through. Using rgmii-id instead of rgmii (same
configuration as ubnt,litebeam-ac-gen2) fixes it.

Fixes FS#2893.

Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
4 years ago
Mathieu Martin-Borret d7233b0a6a ramips: add support for D-Link DIR-878 A1
Specifications:

    SoC: MT7621AT
    RAM: 128MB
    Flash: 16MB NOR SPI flash
    WiFi: MT7615N (2.4GHz) and MT7615N (5Ghz)
    LAN: 5x1000M
    Firmware layout is Uboot with extra 96 bytes in header
    Base PCB is AP-MTKH7-0002
    LEDs Power Green,Power Orange,Internet Green,Internet Orange
    LEDs "2.4G" Green & "5G" Green connected directly to wifi module
    Buttons Reset,WPS,WIFI

Flashing instructions:

Upload image via emergency recovery mode
Push and hold reset button (on the back of the device) until power led
starts flashing (about 10 secs or so) while powering the device on.
Give it ~30 seconds, to boot the recovery mode GUI
Connect your client computer to LAN1 of the device
Set your client IP address manually to 192.168.0.2 / 255.255.255.0.
Call the recovery page for the device at http://192.168.0.1
Use the provided emergency web GUI to upload and flash a new firmware to
the device. Some browsers/OS combinations are known not to work, so if
you don't see the percentage complete displayed and moving within a few
seconds, restart the procedure from scratch and try anoher one,
or try the command line way.

Alternative method using command line on Linux:
curl -v -i -F "firmware=@openwrt-xxxx-squashfs-factory.bin" 192.168.0.1

Signed-off-by: Mathieu Martin-Borret <mathieu.mb@protonmail.com>
[use of generic uimage-padhdr in image generation code]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years ago
Mathieu Martin-Borret 96761ecc2f kernel: mtdsplit_uimage: add SGE parser
Adding SGE parser for SGE (T&W) Shenzhen Gongjin Electronics
to add 96 bytes padding the the firmware image

Signed-off-by: Mathieu Martin-Borret <mathieu.mb@protonmail.com>
4 years ago
David Bauer 0485fb3925 rockchip: don't disable timer LED trigger
The timer LED trigger is enabled in all targets (except for lantiq
xway-legacy). It's necessary for the OpenWrt preinit LED pattern to
work.

Signed-off-by: David Bauer <mail@david-bauer.net>
4 years ago
David Bauer 875a04478c rockchip: use downstream GPIO button implementation
Use the OpenWrt netlink GPIO button implementation to forward button
presses to procd. This is necessary to make failsafe-mode access
using a button possible.

Signed-off-by: David Bauer <mail@david-bauer.net>
4 years ago
Adrian Schmutzler eb15b0e0c9 bcm47xx: disable image for Linksys WRT160n v3
The device can only hold 3.6 MB, but newer images (since 18.06)
are bigger, so flashing a new version fails.

This disables default build for this device based on the bug report
referenced below.

Fixes: FS#1963

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Adrian Schmutzler 11478524a2 ramips: consolidate Netgear devices for mt7628
This creates a common DTSI and shared image definition for the
relatively similar Netgear devices for mt7628 platform.

As a side effect, this raises SPI flash frequency for the R6120,
as it's expected to work there as well if it works for R6080 and
R6020.

Based on the data from the other devices, it also seems probable
the 5g MAC address for R6120 could be extracted from the caldata,
and the mtd-mac-address there could be dropped.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Chuanhong Guo 28893f5878 ath79: fix dsa binding for TP-Link TL-WR941ND v2
upstream changed dt-bindings for marvell 88e6060 to use mdio-device
and dropped support for legacy bindings.
fix it in our local dts.

Fixes: FS#2524
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
4 years ago
Chuanhong Guo 0997342f24 ath79: qihoo,c301: use phy-supply for usb vbus
Linux phy subsystem provides support for a phy regulator defined via
phy-supply property. Use it to turn on usb power only when usb is
probed.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
4 years ago
Tomasz Maciej Nowak 2dc5ce622a mvebu: add support for MACCHIATObin Single Shot
Add support for Marvell MACCHIATObin Single Shot, cortex-a72 based
Marvell ARMADA 8040 Community board. Single Shot was broken as the
device tree is different on the Double Shot Board.

Specifications:
- Quad core Cortex-A72 (up to 2GHz)
- DDR4 DIMM slot with optional ECC and single/dual chip select support
- Dual 10GbE (1/2.5/10GbE) SFP+
  2.5GbE (1/2.5GbE) via SFP
  1GbE via copper
- SPI Flash
- 3 X SATA 3.0 connectors
- MicroSD connector
- eMMC
- PCI x4 3.0 slot
- USB 2.0 Headers (Internal)
- USB 3.0 connector
- Console port (UART) over microUSB connector
- 20-pin Connector for CPU JTAG debugger
- 2 X UART Headers
- 12V input via DC Jack
- ATX type power connector
- Form Factor: Mini-ITX (170 mm x 170 mm)

More details at http://macchiatobin.net

Installation:

Write the Image to your Micro SD Card and insert it in the
MACCHIATObin Single Shot SD Card Slot.

In the U-Boot Environment:
   1. reset U-Boot environment:
      env default -a
      saveenv

   2. prepare U-Boot with boot script:
      setenv bootcmd "load mmc 1:1 0x4d00000 boot.scr; source 0x4d00000"
      saveenv

   or manually (hanging lines indicate wrapped one-line command):
      setenv fdt_name armada-8040-mcbin-singleshot.dtb
      setenv image_name Image
      setenv bootcmd 'mmc dev 1; ext4load mmc 1:1 $kernel_addr
         $image_name;ext4load mmc 1:1 $fdt_addr $fdt_name;setenv
         bootargs $console root=/dev/mmcblk1p2 rw rootwait; booti
         $kernel_addr - $fdt_addr'
      saveenv

   On newer Bootloaders (18.12) the Variables have been changed, use:
      setenv fdt_name armada-8040-mcbin-singleshot.dtb
      setenv image_name Image
      setenv bootcmd 'mmc dev 1; ext4load mmc 1:1 $kernel_addr_r
         $image_name;ext4load mmc 1:1 $fdt_addr_r $fdt_name;setenv
         bootargs $console root=/dev/mmcblk1p2 rw rootwait; booti
         $kernel_addr_r - $fdt_addr_r'

Reported-by: Alexandra Alth <alexandra@alth.de>
Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
Tested-by: Alexandra Alth <alexandra@alth.de>
[add specs and installation as provided by Alexandra Alth]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Adrian Schmutzler 479adb0929 ramips: consolidate recipes with uimage_padhdr
There are already two very similar recipes using uimage_padhdr
in ramips target, and a third one is about to be added.

Make the recipe more generic, so redefinitions are not necessary
anymore.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Tested-by: Bjørn Mork <bjorn@mork.no> [Zyxel WAP6805]
4 years ago
Adrian Schmutzler 9faf9f8f23 mvebu: fix support for Marvell 8040 MACCHIATOBin
Between kernels 4.20 and 5.0, a new variant of this board has been
introduced ("Single Shot"), and the existing one has been renamed
with the appendix "Double Shot". [1]
This also adjusted the first compatible in the list:

marvell,armada8040-mcbin -> marvell,armada8040-mcbin-doubleshot

This patch updates the OpenWrt implementation of this device by
adjusting the relevant references to that compatible (i.e., our
board name).

To still provide support for 4.19 with our setup, this adds a
small patch to change the compatible there as well.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=b1f0bbe2700051886b954192b6c1751233fe0f52

Cc: Tomasz Maciej Nowak <tomek_n@o2.pl>
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
4 years ago
Daniel González Cabanelas cef9e5a49f bcm63xx: R5010UNv2: fix flash partitions for 16MB flash
The router Nucom R5010UN v2 has the partitions defined for a 8MB flash,
but the flash chip is 16MB size. We are wasting half of the flash.

Fix it and use generic names for partitions.

Fixes: 474cde6123 ("brcm63xx: probe SPI flash through DT")

Signed-off-by: Daniel González Cabanelas <dgcbueu@gmail.com>
4 years ago
Roman Yeryomin 2ca084ccaa build: improve ccache support
Set CCACHE_DIR to $(TOPDIR)/.ccache and CCACHE_BASEDIR to $(TOPDIR).
This allows to do clean and dirclean. Cache hit rate for test build
after dirclean is ~65%.
If CCACHE is enabled stats are printed out at the end of building process.
CCACHE_DIR config variable allows to override default, which could be useful
when sharing cache with many builds.
cacheclean make target allows to clean the cache.

Changes from v1:
- remove ccache directory using CCACHE_DIR variable
- remove ccache leftovers from sdk and toolchain make files
- introduce CONFIG_CCACHE_DIR variable
- introduce cacheclean make target

Signed-off-by: Roman Yeryomin <roman@advem.lv>
4 years ago
DENG Qingfang 23de93a521 ramips: mt7621: refactor set affinity script
The current one only looks for mt76x2e and mt7603e, and
does not work for 2 or more same Wi-Fi chips.
Refactor the script to cover those cases.

Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
4 years ago
Yangbo Lu 2a5460b11b layerscape: define IMAGE_SIZE and LS_SYSUPGRADE_IMAGE_SIZE
Define 64m IMAGE_SIZE for flash firmware.bin since the flash size
is 64MB. Define 48m LS_SYSUPGRADE_IMAGE_SIZE for flash sysupgrade.bin
which contains maximum 16MB kernel and 32MB rootfs according to
memory map.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
4 years ago
Yangbo Lu 0841b68c91 layerscape: support sysupgrade for SD card ext4 rootfs
Support sysupgrade for SD card ext4 rootfs.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
4 years ago
Yangbo Lu c4d0e57e16 layerscape: support sysupgrade for squashfs rootfs
Support sysupgrade for all Layerscape boards with squashfs
rootfs.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
4 years ago
Yangbo Lu 3a99b624d8 layerscape: fix board name for SD card boot
Many Layerscape boards support both flash boot and SD card boot.
And different firmware and sysupgrade.bin are built for the two
boot methods. To identify them, a fix could be done on board name
by adding a postfix "-sdboot" for SD card boot.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
4 years ago
Yangbo Lu 3a3b9ded50 layerscape: add compatible for board ls1043ardb
Backport a dts patch which added compatible for ls1043ardb.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
4 years ago
Yangbo Lu 5ca8903631 layerscape: convert to squashfs rootfs for QSPI NOR boot
There had been an issue in Layerscape QSPI driver for very long
time, which made squashfs,jffs2 rootfs not work on QSPI NOR.
And the ubifs had been used as a workaround.
Now the issue has been fixed. So convert to use squashfs,jffs2
rootfs on QSPI NOR for Layerscape boards (LS1012ARDB/LS1046ARDB/
LS1088ARDB), and update u-boot bootargs for booting.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
4 years ago
Petr Štetiar df09cc6ddb toolchain/wrapper.sh: fix remaining shellcheck warnings
Fixes following warnings:

 In target/toolchain/files/wrapper.sh line 18:
 REALNAME=$(readlink -f $0)
                        ^-- SC2086: Double quote to prevent globbing and word splitting.
 --
 In target/toolchain/files/wrapper.sh line 20:
 REALNAME_BASE=$(basename $REALNAME)
                          ^-------^ SC2086: Double quote to prevent globbing and word splitting.
 --
 In target/toolchain/files/wrapper.sh line 21:
 REALNAME_DIR=$(dirname $REALNAME)
                        ^-------^ SC2086: Double quote to prevent globbing and word splitting.
 --
 In target/toolchain/files/wrapper.sh line 74:
 		exec $TARGET_TOOLCHAIN_TRIPLET-$BINARY.bin $GCC_SYSROOT_FLAGS $TARGET_FUNDAMENTAL_CFLAGS $TARGET_ROOTFS_CFLAGS "$@"
                     ^-----------------------^ SC2086: Double quote to prevent globbing and word splitting.
 --
 In target/toolchain/files/wrapper.sh line 77:
 		exec $TARGET_TOOLCHAIN_TRIPLET-$BINARY.bin $LD_SYSROOT_FLAGS $TARGET_FUNDAMENTAL_LDFLAGS "$@"
                      ^-----------------------^ SC2086: Double quote to prevent globbing and word splitting.
 --
 In target/toolchain/files/wrapper.sh line 80:
 		exec $TARGET_TOOLCHAIN_TRIPLET-$BINARY.bin $TARGET_FUNDAMENTAL_ASFLAGS "$@"
                      ^-----------------------^ SC2086: Double quote to prevent globbing and word splitting.
 --
 In target/toolchain/files/wrapper.sh line 83:
 		exec $TARGET_TOOLCHAIN_TRIPLET-$BINARY.bin "$@"
                      ^-----------------------^ SC2086: Double quote to prevent globbing and word splitting.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years ago
Rosen Penev d8e6a92e7c toolchain/wrapper.sh: Replace read with read -r
Without -r, backslashes would get mangled.

Found with shellcheck.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Alexey Dobrovolsky ecda6b791b ramips: kernel: fix awake-rt305x-dwc2 patch
At this point in v5.4 kernel we cannot use dwc2_readl() and
dwc2_writel() since they rely on the value hsotg->needs_byte_swap
which cannot be obtained before the controller wakes up.
We should use readl() and writel() to wake up the controller before
calling dwc2_check_core_endianness().

Fixes: 6be0da90a1 ("ramips: refresh patches")
Signed-off-by: Alexey Dobrovolsky <dobrovolskiy.alexey@gmail.com>
[fixed Fixes: tag]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years ago
Pawel Dembicki 67ce9aedd6 kirkwood: add support for Check Point L-50
This patch adds support for the Check Point L-50 from 600/1100 series
routers.

Specification:
-CPU: Marvell Kirkwood 88F6281 1200MHz
-RAM: 512MB
-Flash: NAND 512MB
-WiFi: mPCIe card based on Atheros AR9287 b/g/n
-WAN: 1 Gigabit Port (Marvell 88E1116R PHY)
-LAN: 9 Gigabit Ports (2x Marvell 88E6171(5+4))
-USB: 2x USB2.0
-Express card slot
-SD card slot
-Serial console: RJ-45 115200 8n1
-Unsupported DSL

Known issues:
-DSL not supported
-Expresscard not tested

Installation:

Step one -> backup:
make backup u-boot and env for revert stock posibility
make backup dsl_mac_addr, dmz_mac_addr, eth1addr, ethaddr and all lanX_mac_addr

Step two -> Use kwboot tool to upload openwrt u-boot to RAM:

run kwboot: "kwboot -B 115200 /dev/ttyUSB0 -b u-boot.kwb -p -t"
end start u-boot

Step three -> Restore macs (e.g. below):
setenv eth1addr 00:1C:XX:XX:XX:6C
setenv ethaddr 00:1C:XX:XX:XX:6B
setenv lan1_mac_addr 00:1C:XX:XX:XX:6C
setenv lan2_mac_addr 00:1C:XX:XX:XX:6D
setenv lan3_mac_addr 00:1C:XX:XX:XX:6E
setenv lan4_mac_addr 00:1C:XX:XX:XX:6F
setenv lan5_mac_addr 00:1C:XX:XX:XX:70
setenv lan6_mac_addr 00:1C:XX:XX:XX:71
setenv lan7_mac_addr 00:1C:XX:XX:XX:72
setenv lan8_mac_addr 00:1C:XX:XX:XX:73
setenv dmz_mac_addr 00:1C:XX:XX:XX:74
setenv dsl_mac_addr 00:1C:XX:XX:XX:75

Step four -> flash u-boot:
mw 0x0800000 0xffff 0x100000
nand erase 0x0 100000
tftp 0x0800000 openwrt-kirkwood-l50-u-boot.kwb
nand write 0x0800000 0x0 0x100000
saveenv

Step five -> run initramfs image:

tftpboot 0x02000000 openwrt.bin; bootm 0x02000000;

Step six -> install sysupgrade OpenWrt image:

copy to /tmp/ sysupgrade image
run sysupgrade

Back to stock:
Restore original u-boot end env.
Install factory image via stock u-boot.

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
4 years ago
John Audia 039fd27173 kernel: bump 5.4 to 5.4.51
update via update_kernel.sh -v -u 5.4

Removed upstreamed patches:
 350-MIPS-Add-missing-EHB-in-mtc0-mfc0-sequence-for-DSPen.patch

Script refreshed patches:
 902-debloat_proc.patch
 904-debloat_dma_buf.patch

Attempted merge conflict in following patches:
 0024-MIPS-lantiq-revert-DSA-switch-driver-PMU-clock-chang.patch

Build system: x86_64
Build tested: ipq806x (Netgear R7800)

Signed-off-by: John Audia <graysky@archlinux.us>
[fixed sha256sum of the tarball]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years ago
Pawel Dembicki f93267bccf ipq806x: enable Linksys EA8500 eth1 interface
At this moment Linksys EA8500 uses only eth0.

This patch change switch registers, which allow to use eth1 as lan
and eth0 as wan. The method work with similar Linksys EA7500V1
and it work with EA8500.

Suggested-by: Sungbo Eo <mans0n@gorani.run>
Tested-by: Brian Onn <brian.a.onn@gmail.com>
Tested-by: Adrian Panella <ianchi74@outlook.com>
Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
4 years ago
Adrian Schmutzler bc85cc2b42 ath79: disable TP-Link TL-WR941ND v2
The support for this device's Marvell MV88E6060 switch has been
reported to be broken with kernels 4.19/5.4 (see bug report).

Since this a 4/32 device and it has been confirmed to be working
with stable 19.07 release (kernel 4.14), and since fixing it does
not seem trivial, let's just disable it in master.

Fixes: FS#2524

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Tim Thorpe edbc8e5512 ramips: add support for Netgear R6020
This adds support for the Netgear R6020, aka Netgear AC750.

The R6020 appears to be the same hardware as the Netgear R6080,
aka Netgear AC1000, but it has a slightly different flash layout,
and no USB ports.

Specification:

SoC: MediaTek MT7628 (580 MHz)
Flash: 8 MiB
RAM: 64 MiB
Wireless: 2.4Ghz (builtin) and 5Ghz (MT7612E)
LAN speed: 10/100
LAN ports: 4
WAN speed: 10/100
WAN ports: 1
UART (57600 8N1) on PCB

MAC addresses based on vendor firmware:
LAN      *:88   0x4
WAN      *:89
WLAN2    *:88   0x4
WLAN5    *:8a   0x8004

The factory partition might have been corrupted beforehand. However,
the comparison of vendor firmware and OpenWrt still allowed to retrieve
a meaningful assignment that also matches the other similar devices.

Installation:

Flashing OpenWRT from stock firmware requires nmrpflash. Use an ethernet
cable to connect to LAN port 1 of the R6020, and power the R6020 off.
From the connected workstation, run
`nmrpflash -i eth0 -f openwrt-ramips-mt76x8-netgear_r6020-squashfs-factory.img`,
replacing eth0 with the appropriate interface (can be identified by
running `nmrpflash -L`). Then power on the R6020. After flashing has finished,
power cycle the R6020, and it will boot into OpenWRT. Once OpenWRT has been
installed, subsequent flashes can use the web interface and sysupgrade files.

Signed-off-by: Tim Thorpe <timfthorpe@gmail.com>
[slightly extend commit message, fix whitespaces in DTS, align From:
with Signed-off-by]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Willem van den Akker 0df71e01cf lantiq: set correct gphy pins for Zyxel P-2812
This fixes the gphy LED pins for Zyxel P-2812 devices. The have
been accidentally altered during a tidy-up operation (see Fixes:
below).

No ports were available, dmesg reported:

[ 0.658577] pinctrl-xway 1e100b10.pinmux: pin io5 already requested by
            1e100bb0.stp; cannot claim for 1e108000.eth
[ 0.667566] pinctrl-xway 1e100b10.pinmux: pin-5 (1e108000.eth) status -22
[ 0.685238] lantiq,xrx200-net 1e108000.eth: Error applying setting,
            reverse things back
[ 0.693270] lantiq,xrx200-net: probe of 1e108000.eth failed with error -22

Fixes: FS#3188
Fixes: 660200e53d ("lantiq: dts: assign the GPHY LED pins to the
Ethernet controller node")

Suggested-by: Mathias Kresin <dev@kresin.me>
Signed-off-by: Willem van den Akker <wvdakker@wilsoft.nl>
[commit message facelift]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
David Woodhouse f632747704 mediatek: fix bashism in gen_banana_pi_img.sh
There was a bashism in the script. This fixes the script so that it
doesn't actually require bash, and can be run with any POSIX shell as
its shebang suggests.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
4 years ago
Sungbo Eo 36105880ee mediatek: re-add u3phy2 phy-switch patch
This patch is required for pcie@2,0 in mt7623 to work. The patch was originally
added in kernel 4.14, but it has not been ported to 4.19 and later.

Fixes: FS#3217
Tested-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Sungbo Eo <mans0n@gorani.run>
4 years ago
Sungbo Eo 923792369e mediatek: do not create device nodes in uci-defaults script
Since commit 298814e6be ("base-files: config_generate: split macaddr with
multiple ifaces") uci MAC address setup will create a device node for each
member iface. But this script might override the device nodes and interfere
with the MAC address setup.

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
4 years ago
Petr Štetiar c7b750e7ac treewide: kernel: drop redundant USB_EHCI_HCD=n config symbol
Commit e53ec043ba ("kirkwood: move usb support to modules") has moved
this config symbol into generic configs, so it could be removed from
other configs.

Suggested-by: Aleksander Jan Bajkowski <A.Bajkowski@stud.elka.pw.edu.pl>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years ago
Sebastian Schaper 361c670a46 ath79: add support for D-Link DAP-1330/DAP-1365 A1
Port device support for DAP-1330 from the ar71xx target to ath79.

Additionally, images are generated for the European through-socket
case variant DAP-1365. Both devices run the same vendor firmware, the
only difference being the DAP_SIGNATURE field in the factory header.
The vendor's Web UI will display a model string stored in the flash.

Specifications:

 * QCA9533, 8 MiB Flash, 64 MiB RAM
 * One Ethernet Port (10/100)
 * Wall-plug style case (DAP-1365 with additional socket)
 * LED bargraph RSSI indicator

Installation:

 * Web UI: http://192.168.0.50 (or different address obtained via DHCP)
   There is no password set by default
 * Recovery Web UI: Keep reset button pressed during power-on
   until LED starts flashing red, upgrade via http://192.168.0.50
 * Some modern browsers may have problems flashing via the Web UI,
   if this occurs consider booting to recovery mode and flashing via:
   curl -F \
     files=@openwrt-ath79-generic-dlink_dap-1330-a1-squashfs-factory.bin \
     http://192.168.0.50/cgi/index

The device will use the same MAC address for both wired and wireless
interfaces, however it is stored at two different locations in the flash.

Signed-off-by: Sebastian Schaper <openwrt@sebastianschaper.net>
4 years ago
Sungbo Eo 358aec7775 ath79: add support for Arduino Yun
Arduino Yun is a microcontroller development board, based on Atmel
ATmega32u4 and Atheros AR9331.

Specifications:
- MCU: ATmega32U4
- SoC: AR9331
- RAM: DDR2 64MB
- Flash: SPI NOR 16MB
- WiFi:
  - 2.4GHz: SoC internal
- Ethernet: 1x 10/100Mbps
- USB: 1x 2.0
- MicroSD: 1x SDHC

Notes:
- Stock firmware is based on OpenWrt AA.
- The SoC UART can be accessed only through the MCU.
  YunSerialTerminal is recommended for access to serial console.
- Stock firmware uses non-standard 250000 baudrate by default.
- The MCU can be reprogrammed from the SoC with avrdude linuxgpio.

Installation:
1.  Update U-Boot environment variables to adapt to new partition scheme.
    > setenv bootcmd "run addboard; run addtty; run addparts; run addrootfs; bootm 0x9f050000 || bootm 0x9fea0000"
    > setenv mtdparts "spi0.0:256k(u-boot)ro,64k(u-boot-env),15936k(firmware),64k(nvram),64k(art)ro"
    > saveenv
2.  Boot into stock firmware normally and perform sysupgrade with
    sysupgrade image.
    # sysupgrade -n -F /tmp/sysupgrade.bin

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
4 years ago
David Woodhouse af9932c9b7 mediatek: Implement sysupgrade support for Banana Pi R2
Based on work by Alexey Loukianov <lx2@lexa2.ru> and others.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
4 years ago
David Woodhouse e19ffb25d9 mediatek: store MAC address in boot partition on Banana Pi R2
Like many boards, the Banana Pi R2 doesn't have permanant storage of
its MAC address, and we store the first random one that the kernel
generates in order to use it later and at least be consistent.

Store it in the FAT boot partition, just as the U7623 board (and others)
do.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
4 years ago
David Woodhouse 7adc29f59e mediatek: add SD card image creation for Banana Pi R2
Based on work by Alexey Loukianov <lx2@lexa2.ru> and others.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
4 years ago
David Woodhouse 91e43a1d7a mediatek: enable SATA for mt7623
The MT7623 SoC has the same SATA block as the MT7622, so enable it in
MT7623 builds too and add it to the DEVICE_PACKAGES for those boards.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
4 years ago
David Woodhouse c848bc6cd5 mediatek/mt7623: unify features and packages, add ext4 and usb
The supported MT7623 boards are mostly identical (what with being a
System-on-Chip and all), so unify the DEVICE_PACKAGES for them, and add
ext4 and usb support for them.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
4 years ago
David Woodhouse c07d0d7f3e mediatek: mt7623: refresh 5.4 kernel config
Some options were not explicitly specified, causing the kernel build to
drop to interactive mode. Set the missing options.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
4 years ago
Sebastian Schaper 14599c5945 ath79: add support for D-Link DCH-G020 Rev. A1
The DCH-G020 is a Smart Home Gateway for Z-Wave devices.

Specifications:

 * QCA9531, 16 MiB Flash, 64 MiB RAM
 * On-Board USB SD3503A Z-Wave dongle
 * GL850 USB 2.0 Hub (one rear port, internal Z-Wave)
 * Two Ethernet Ports (10/100)

Installation:

 * Web UI: http://192.168.0.60 (or different address obtained via DHCP)
   Login with 'admin' and the 6-digit PIN Code from the bottom label
 * Recovery Web UI: Keep reset button pressed during power-on
   until LED starts flashing red, upgrade via http://192.168.0.60
 * Some modern browsers may have problems flashing via the Web UI,
   if this occurs consider booting to recovery mode and flashing via:
   curl -F \
     files=@openwrt-ath79-generic-dlink_dch-g020-a1-squashfs-factory.bin \
     http://192.168.0.60/cgi/index

Known issues:

 * Real-Time-Clock is not working as there is currently no matching driver
   It is still included in the dts as compatible = "pericom,pt7c43390";
 * openzwave was tested on v19.07 (running MinOZW as a proof-of-concept),
   but the package grew too big as lots of device pictures were included,
   thus any use of Z-Wave is up to the user (e.g. extroot and domoticz)

The device will use the same MAC address for both wired and wireless
interfaces, however it is stored at two different locations in the flash.

Signed-off-by: Sebastian Schaper <openwrt@sebastianschaper.net>
4 years ago
John Audia 3e992ea790 ipq806x: compile in schedutil governor
Gives users a third option to augment ondemand and performance. Kernel
docs[1] explain differences and this PR empowers users w/ the choice to
select between the older ondemand and newer and more simplistic schedutil
should they wish to use one that is not the performance governor.

1. Documentation/admin-guide/pm/cpufreq.rst

Signed-off-by: John Audia <graysky@archlinux.us>
[fixed From: to match SoB:]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years ago
Furkan Alaca 541faf2c93 ramips: mt7621: use lzma-loader for ra21s & rg21s
The rg21s fails to boot if the kernel is larger than about
2,376 KiB. The ra21s is virtually identical hardware.
Enabling lzma-loader resolves the issue on both the rg21s
and ra21s (see FS#3057 on the issue tracker).

Fixes: FS#3057
Signed-off-by: Furkan Alaca <furkan.alaca@queensu.ca>
4 years ago