Commit Graph

17868 Commits (6704410b158b47aecf507971ad2ee5e3db840e3a)

Author SHA1 Message Date
Felix Fietkau a531d37fab ipq806x: clean up dts patching in 4.9
Do not patch upstream files, overwrite them entirely. The upstream files
are buggy for a number of devices and this significantly simplifies the
patch structure

Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: John Crispin <john@phrozen.org>
7 years ago
Felix Fietkau ddf577b0b2 ipq806x: enable cmdline mangle on 4.9 (like on 4.4)
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: John Crispin <john@phrozen.org>
7 years ago
Daniel Gonzalez Cabanelas 080c6fa476 ar71xx: WNDR4300: Fix network vlan IDs
The Netgear WNDR4300 has the VLAN IDs flipped in LuCi, fix it.

Signed-off-by: Daniel Gonzalez Cabanelas <dgcbueu@gmail.com>
7 years ago
Daniel Gonzalez Cabanelas ad9ad376bb ar71xx: WNDR4300: Fix switch HW controlled LEDs
The Netgear WNDR4300, equipped with an Atheros AR8327 Gigabit Switch,
has two LEDs on each port for monitoring LAN activity, but it currently
only uses one. Fix the configuration to use both.

The patch provides this new configuration:
- green LED: 1 Gbps link, 4Hz blink frequency
- amber LED: 10/100 Mbps link. 4Hz for 100Mbps, 2Hz for 10Mbps

Signed-off-by: Daniel Gonzalez Cabanelas <dgcbueu@gmail.com>
7 years ago
Piotr Dymacz 09862bb006 ar71xx: fix Wallys DR344 ethernet MAC addresses offsets
Without this fix, ethernet interfaces on Wallys DR344 use random MAC
addresses.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
7 years ago
Piotr Dymacz 7e38ce2e7d ar71xx: base-files: few minor cleanups in lib/ar71xx.sh
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
7 years ago
Piotr Dymacz c2b5206c80 ar71xx: base-files: fix boards order in lib/ar71xx.sh
Keep everything within case statements in alphabetical order.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
7 years ago
Piotr Dymacz d9bc3e6882 ar71xx: base-files: shorten case statement patterns in lib/ar71xx.sh
At now there is no general rule about what part of (or whole) machine
name string should be used for board name assignment/detection and every
target handles this in a different way.

For most of the boards in ar71xx we already use only part of the string,
generally without the vendor name.

This shortens wildcards patterns in case statement for board name
assignment, wherever possible (e.g. where it won't be misleading).

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
7 years ago
Piotr Dymacz 4f09837cdf ar71xx: base-files: always use double quotes in lib/ar71xx.sh
Be consistent and always use double quotes for case statement patterns,
as in other targets. With this approach it should be less confusing for
users adding support for new devices.

Also, be consistent with MikroTik boards wildcard pattern.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
7 years ago
Piotr Dymacz 589b37e8b5 ar71xx: base-files: fix indentation in lib/ar71xx.sh
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
7 years ago
Piotr Dymacz e213647399 ar71xx: fix machine name for several devices
Be consistent with form and format of the vendor name.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
7 years ago
Shuanglin Liu 53ef20f65a ar71xx: add support for Rockeetech AP531B0
Specification:
- SoC: Qualcomm Atheros QCA9531 (650/400/216 MHz (CPU/DDR/AHB))
- RAM: 64 MiB DDR2
- Storage: 16 MiB of flash (optional 16 MiB second flash)
- Wireless: built into QCA9531 (Honey Bee), PHY modes b/g/n
- Ethernet: 1x100M (port0) 1x100M (port 4)
- PCI-E: x1
- SIMcard slot: x1
- USB 2.0 port: x1 (optional)
- Ext GPIO pin: x8
- UART for serial console: x1
- External watchdog: x1 (optional)
- Power supply: 9-48V (DC jack/passive PoE)

Installation through tftp:
- Copy <Firmware Image Name> into tftp directory
- Connect board via ttl port and Ethernet port
- Boot the AP531B0
- When "Autobooting in 1 seconds" appears press Enter
- Set serverip and ipaddr appropriate
  (e.g. setenv serverip 192.168.88.10;setenv ipaddr 192.168.88.1)
- Enter "tftp 0x8050000 <Firmware Image Name>"
- Enter "erase 0x9f050000 +$filesize"
- Enter "cp.b 0x80500000 0x9f050000 $filesize"
- Enter "reset"

Signed-off-by: Shuanglin Liu <roboidler@gmail.com>
7 years ago
Rafał Miłecki cd0f9900a4 bcm53xx: parepare for building more Linksys images
We still can't enable them by default without proper TRX support.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years ago
Hauke Mehrtens 31c6452107 kernel: update kernel 4.4 to 4.4.53
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
7 years ago
Hauke Mehrtens 9a065fcfec kernel: update kernel 4.9 to 4.9.14
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
7 years ago
Rafał Miłecki f5d403488e x86: image: drop unneeded grub call
It appears there isn't any Image/Build/grub/* define so this step looks
redundant.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years ago
Rafał Miłecki 9a267e6a4b x86: image: drop unused ROOTDELAY variable
It's unused since commit 7427007193 ("x86: remove the olpc subtarget,
it has been unmaintained for a long time").

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years ago
Tim Harvey b2255f3621 imx6: add DSA driver for MV88E6176 switch
The MV88E6176 switch is present on the GW16083 and the GW5904

As of a5c32a1f19 these drivers are to be
enabled static in per-target kernels.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
7 years ago
Tim Harvey 5f458bf7f8 imx6: add support for GW5904
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
7 years ago
Tim Harvey 35d761c0c5 imx6: added fixfdt to bootscript
If a 'fixfdt' uboot script exists, execute it prior to bootm to allow
easy bootloader env based fdt fixups and tweaks

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
7 years ago
Tim Harvey 028350907e imx6: add missing dtb for imx6dl-gw553x
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
7 years ago
Tim Harvey 4cc70d8610 imx6: fix USB for 4.9 kernel
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
7 years ago
Tim Harvey 08371a2db7 kernel: fix phy aneg crash
Fix a kernel crash caused when CONFIG_FIXED_PHY used for fixed phy drivers
in phy-add-aneg-done-function patch.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
7 years ago
Mathias Kresin 11eac705c5 ramips: sort mt7620 image file alphabetical
Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Joseph C. Lehner de33a4cef0 ramips: add support for Netgear EX3700
Specifications:
* SoC: MT7620A
* RAM: 64 MB DDR
* Flash: 8MB NOR SPI flash
* WiFi: MT7612E (5Ghz) and builtin MT7620A (2.4GHz)
* LAN: 1x100M

The -factory images can be flashed from the device's web
interface or via nmrpflash.

Co-authored-by: Paul Oranje <por@xs4all.nl>
Signed-off-by: Paul Oranje <por@xs4all.nl>
Signed-off-by: Joseph C. Lehner <joseph.c.lehner@gmail.com>
7 years ago
Hanqing Wong 38bee61dab ramips: add support for Netgear R6220
This patch adds support for the Netgear R6220, aka Netgear AC1200 and
R6220-100NAS.

Specification:
- SoC: MediaTek MT7621ST (880 MHz)
- Falsh: 128 MiB (Macronix MX30LF1G08AA-TI)
- RAM: 128 MiB (Nanya NT5CB64M16FP-DH)
- Wireless: MediaTek MT7603EN b/g/n , MediaTek MT7612EN an+ac
- LAN speed: 10/100/1000
- LAN ports: 4
- WAN speed: 10/100/1000
- WAN ports: 1
- Serial baud rate of Bootloader and factory firmware: 57600

Installation through telnet:
- Copy kernel.bin and rootfs.bin to a USB flash disk, plug to usb port
  on the router.
- Enable telnet with link: http://192.168.1.1/setup.cgi?todo=debug
  (login if required, default: admin password)
- You will see "Debug Enabled!"
- Telnet 192.168.1.1 and login with "root"
- ls /mnt/shares/ to find out path of your USB disk. 'myUdisk' for
  example.
- cd /mnt/shares/myUdisk
- mtd_write write rootfs.bin Rootfs
- mtd_write write kernel.bin Kernel
- reboot

nmrpflash can be used to recover to the netgear firmware if a broken
image was flashed.

Signed-off-by: Hanqing Wong <hquu@outlook.com>
7 years ago
Henryk Heisig 6674aa9798 mvebu: wrt3200acm enable SDIO interface
add mwifiex-sdio package to wrt3200acm

Signed-off-by: Henryk Heisig <hyniu@o2.pl>
7 years ago
Mathias Kresin 73eb5c74a1 lantiq: use the P2812HNUF* wan port as wan
The port is labeled as wan and was only used as lan port because of the
"tx ring full" issues fixed with 8f02f7c.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Mathias Kresin cd8b20931e lantiq: xrx200: use vlan for ethernet wan port
Using the lantiq,wan device tree property for one interface node and
the lantiq,switch device tree property for another interface node at
the same time was never intended/isn't supported at the moment.

The property is meant to be used in two phy operation mode where one
phy is assigned to an interface without lantiq,* device tree property
and the other phy is assigned to an interface with the lantiq,wan
device property to have two netdevs.

If both properties are used at the same time, the lantiq,wan interface
is shown as independent netdev but not able to operate independent. The
port needs to be managed via swconfig. These dependency is not obvious
and fooled already a lot of users.

Add a default WAN vlan for xrx200 devices having an ethernet WAN port
and remove the lantiq,wan device tree property. Leave it up to the user
to set the ethernet WAN port as default WAN interface or to use this
port as additional LAN port.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Mathias Kresin 715b066419 lantiq: fix broadcasts and vlans in two iface mode
The two phy operation mode where one phy is assigned to an interface
without lantiq,* device tree property and the other phy is assigned to
an interface with the lantiq,wan device property was broken with the
multicast package leaks between vlans fixes.

Move the multicast packages relevant portmap settings to the condition
which handles multicast packages for better readability.

Replace the priv->port_map based port_map only for the interface which
has the lantiq,switch device tree property set, to allow tagged
multicast packages in two phy mode where the lantiq,switch device tree
property isn't used.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Rafał Miłecki cc3c50eb22 bcm53xx: prepare for building Archer C5 V2 image
Don't enable it yet as kernel needs to be updated first.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years ago
Kristian Evensen b11c51916c ramips: Improve Sanlinking D240 config
* The left most mini-PCIe slot (the one attached to SIM2) can be
power-cycled by setting GPIO 0 to high/low.

* The D240 only needs the MT76x2 module, so update makefile to reflect this.
Note that until the default mt7620 target is updated, then kmod-mt76 (and thus
kmod-mt7603) will be selected by default.

v2->v3:
* Indentation error.

v1->v2:
* Rename gpio and remove redundant comment (thanks Piotr Dymacz)

Signed-off-by: Kristian Evensen <kristian.evensen@gmail.com>
7 years ago
Stijn Segers 0ad82375cd ar71xx: add ath10k driver and firmware for Netgear R6100 to firmware image
A Netgear R6100 owner reported the LEDE images lack the ath10k driver and firmware [1]. This patch adds both to the R6100 image.

[1] https://forum.lede-project.org/t/netgear-r6100-5ghz-wifi-not-working-after-initial-install/2222

Signed-off-by: Stijn Segers <francesco.borromini@inventati.org>
7 years ago
John Crispin 99d0633f24 kernel: add another missing TPM symbol
Signed-off-by: John Crispin <john@phrozen.org>
7 years ago
Furong Xu a93a48328d ramips: kmod-sdhci-mt7620: switch dependence to kmod-mmc
mtk-mmc/mtk_sd.ko only depends on mmc_core and mmc_block.
And, we remove kmod-sdhci dependence assignment from all related target devices.

Signed-off-by: Furong Xu <xfr@outlook.com>
7 years ago
John Crispin 0e56151ab2 mediatek: fix ESW EINT pinctrl define
This got lost while bumping the target to v4.9 causing ethernet issues on
some boards.

Signed-off-by: John Crispin <john@phrozen.org>
7 years ago
Rafał Miłecki e58ea0a80d bcm53xx: use upstream fix for iproc regression
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years ago
Rafał Miłecki edda26dc4f bcm53xx: fix memory corruption caused by iproc PCE controller driver
This is a simple revert of upstream patch for now.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years ago
Ansuel Smith 2261c9cc77 mvebu: add default sata trigger
Change dts file to add default sata trigger to sata led.

Backport upstream accepted patch to add sata trigger to device tree
source files already upstreamed.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
[backport upstream accepted patch]
Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Ansuel Smith 3d0bd15056 mvebu: enable disk led trigger
As we have a disk led we enable the disk trigger that work with the easata port

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
7 years ago
Alex Maclean 6254a2028c lantiq: add support for the Alpha ASL56026
The ASL56026 is a VDSL2 router with dual 100mbit ethernet,
also known as the ECI B-FOCuS V-2FUb/I.

CPU: Lantiq XRX268 v1.1 at 333MHz
Modem: Lantiq VRX208
RAM: 32MiB DDR2 at 167MHz
Flash: 8MiB NOR, Spansion S29GL064N90TF04

UART is at JP1:
Pin 1 TX
Pin 2 GND
Pin 3 +3.3V
Pin 4 NC
Pin 5 RX

Boot selection pins are exposed via several resistor jumpers:
boot_sel0 is at J15, on the rear of the board. Default is high.
boot_sel1 is at J3, next to the flash - it is also the flash CE# pin. Default is low.
boot_sel2 is at J12, directly below the SoC. Default is low.
boot_sel3 is at J16, on the rear of the board. Default is low.

The boot_sel pins should never be shorted, the jumper must be moved or
a lower value resistor used to change the pull (existing resistors are 4k7, 1k should work)

To install with the stock bootloader you must break the built in image selection process
which uses at least the following vars: f_upgrade_addr, f_upgrade2_addr, loadaddr, kernel_addr, activeregion, committedregion
This is done by setting loadaddr and both f_upgrade_addr vars to the same address:

	VR9 # setenv loadaddr 0xB0040000
	VR9 # setenv f_upgrade_addr 0xB0040000
	VR9 # setenv f_upgrade2_addr 0xB0040000
	VR9 # saveenv

Then flash the firmware image:

	VR9 # tftpboot 0x81000000 lede-lantiq-xrx200-ASL56026-squashfs-sysupgrade.bin
	VR9 # erase B0040000 +${filesize}
	VR9 # cp.b 0x81000000 0xB0040000 ${filesize}

Signed-off-by: Alex Maclean <monkeh@monkeh.net>
7 years ago
Alex Maclean a9b74f9f81 lantiq: clarify VG3503J name
Append the ECI model to the device name, to avoid confusion with the
older model.

Signed-off-by: Alex Maclean <monkeh@monkeh.net>
7 years ago
Rafał Miłecki 154b3a6863 kernel: backport first bcma 4.12 patch for GPIO and of_node
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years ago
Felix Fietkau 92b5b360fe ipq806x: clean up dts patch
Move dts files to files/, remove useless patch chunks

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Felix Fietkau 2a3952bcd5 kernel: re-apply 300-arch-arm-force-ZRELADDR-on-arch-qcom.patch on 4.9 (FS#549)
Fixes memory corruption issues. See commit bdcba36442 for more
details.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Felix Fietkau 9f09bd6606 ipq806x: refresh patches
Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Rafał Miłecki 318f2d6101 kernel: fix of_node handling in LEDs core code
This backports fixes for setting of_node and making it possible to read
extra info from DT. This was partially fixed by:
[PATCH] leds: leds-gpio: Set of_node for created LED devices
but it didn't work during initialization.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years ago
Stijn Tintel 4124847772 brcm2708: detect Raspberry Pi Zero W
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
7 years ago
Stijn Tintel a8c2a719fa brcm2708: order boards and models alphabetically
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
7 years ago
Jo-Philipp Wich 2543e986ad ramips: fix Linksys RE6500 switch port mapping
Properly map the internal switch ports to the proper LAN1..LAN4 labels.

Fixes #530.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
7 years ago
Felix Fietkau 0504cd22aa ar71xx: fix build without CONFIG_NOP_USB_XCEIV (FS#593)
Open-code usb_phy_generic_register instead of calling it, since it is
really trivial. Avoid pulling CONFIG_NOP_USB_XCEIV into the kernel
config and add a proper dependency instead

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Felix Fietkau 2422f84b1b kernel: disable deprecated CONFIG_USB_EHCI_ATH79 symbol
USB_EHCI_HCD_PLATFORM is used instead

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Felix Fietkau 697ff33771 kernel: fix whiteout rename on ubifs (FS#579)
This was apparently caused by some linux upstream merge damage

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Wojciech Jowsa f223c4a923 ar71xx: set status led for the gl-* boards
Signed-off-by: Wojciech Jowsa <w.jowsa@radytek.com>
7 years ago
John Crispin 787cb58574 kernel: more tpm related symbols
Signed-off-by: John Crispin <john@phrozen.org>
7 years ago
Yousong Zhou 6c9345bd8c malta: restore "be" subtarget from being source-only
The malta "be" and "le" subtargets share the arch with many devices of
ar71xx and ramips.  They can be handy for testing, debugging, trying
both snapshot and release builds.

This commit makes the "be" subtarget part of the ci and release builds

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
7 years ago
Álvaro Fernández Rojas 6debeaab45 brcm2708: add support for the new Raspberry Pi Zero W
Support is experimental since I haven't got any device to test.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
7 years ago
Álvaro Fernández Rojas baad22eed3 brcm2708: update linux 4.9 patches to latest version
As usual these patches were extracted and rebased from the raspberry pi repo:
https://github.com/raspberrypi/linux/tree/rpi-4.9.y

- Remove led1 from diag.sh for RPi3 since it causes boot issues.
- Fix modules.mk typos.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
7 years ago
Kevin Darbyshire-Bryant f229f4af31 kernel: update kernel 4.4 to 4.4.52
Bump kernel from 4.4.50 to 4.4.52

Refresh patches

Compile tested all 4.4. targets

Run tested: ar71xx Archer C7 v2

Signed-off-by: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
7 years ago
Joseph C. Lehner 11356e4078 ramips: remove kmod-mt76* from EX2700 images
These modules are not needed by the EX2700, since it does not
have an external wifi chip (MT7620A is covered by rt2x00).

Signed-off-by: Joseph C. Lehner <joseph.c.lehner@gmail.com>
7 years ago
Furong Xu b65718ae14 ramips: rename patch file suffix from .c to .patch
Signed-off-by: Furong Xu <xfr@outlook.com>
7 years ago
Francois Goudal 9b35815f0f ramips: add support for Afoundry EW-1200
This device features both a 2.4 and 5Ghz radio, and supports
802.11a/b/g/n/ac modes.
It has 5 Gb-Ethernet ports and a USB 3.0 host port.

It is powered by the Mediatek MT7621 SoC, and the MT7602E and MT7612E wifi
chipsets, together with 128MB of RAM and 16 MB of SPI Flash.

The stock firmware is in fact based on some openwrt barrier breaker, with a
mediatek SDK kernel, and an afoundry custom made web interface (not LuCI
based).
Firmware update page on the stock web interface can not accept sysupgrade
images, it bricks the device.
At this point, the only working solution I found was to connect to the
serial console port (available on J4 header) and to use opkg to install
dropbear.
Then scp the sysupgrade file in the device's /tmp and run sysupgrade from
console without preserving configuration files.

Signed-off-by: Francois Goudal <francois@goudal.net>
7 years ago
Rafał Miłecki 23bf153ead kernel: fix earlycon by keeping __earlycon_table
Somewhere between 4.4 and 4.9 there was a change that made
OF_EARLYCON_DECLARE adding entries to the __earlycon_table instead of
__earlycon_of_table. We need to keep this table as well.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years ago
Rafał Miłecki 9209511d61 bcm53xx: backport Broadcom's iProc QSPI driver
This driver has been added instead of improving spi-bcm53xx. It has some
advantages: allows SPI speed control & hopefully doesn't have bug that
was stopping us from using multiple SPI messages for writing flash data.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years ago
Alberto Bursi ff42a8330b kirkwood: fix include in etc/board.d/02_network
the mtd_get_mac_ascii function called within this script requires the inclusion of /lib/functions/system.sh

Signed-off-by: Alberto Bursi <alberto.bursi@outlook.it>
7 years ago
ZengFei Zhang edae3479e6 ramips: add support for HiWiFi HC5962
This patch adds supports for the HiWiFi HC5962(gee4) http://www.hiwifi.com

Short specification:

 - MT7621AT + MT7612EN + 7603EN
 - 256MB DDR3 RAM
 - 128MB NAND flash
 - 1+3 x 1000M Ethernet
 - 1x USB 2.0 port. 1x USB 3.0 port.
 - reset button
 - UART pad on PCB (JP3: TX, RX, GND, 3.3V)

Flash instruction:

1, Download lede-ramips-mt7621-hc5962-squashfs-factory.bin
2, Login as root via SSH on 192.168.199.1 and then copy factory.bin(using wget or nc or...) to /tmp/
3, use the following commands:
   $ mtd write /tmp/lede-ramips-mt7621-hc5962-squashfs-factory.bin firmware
   $ mtd erase firmware_backup && reboot
After reboot you should be able to login as root via SSH on 192.168.1.1

Signed-off-by: ZengFei Zhang <zhangzengfei@kunteng.org>
7 years ago
Rafał Miłecki 2677b66f9b bcm53xx: backport accepted BCM5301X and BCM53573 patches
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years ago
Felix Fietkau f9da6238e4 kernel: fix MIPS memory function optimization build error in decompressor
Fixes the following build error:
  CC      arch/mips/boot/compressed/decompress.o
  OBJCOPY arch/mips/boot/compressed/vmlinux.bin
  XZKERN  arch/mips/boot/compressed/vmlinux.bin.z
  OBJCOPY arch/mips/boot/compressed/piggy.o
  LD      vmlinuz
arch/mips/boot/compressed/decompress.o: In function `lzma2_lzma':
/tmp2/mehrtens/linux/arch/mips/boot/compressed/../../../../lib/xz/xz_dec_lzma2.c:884: undefined reference to `memmove'
make[1]: *** [vmlinuz] Error 1
make: *** [vmlinuz] Error 2

lib/decompress_unxz.c only defines its own memmove function if there is no
macro with the same name.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Rafał Miłecki a732f69f85 bcm53xx: enable CLK_BCM_NSP for kernel 4.9
This is required to get booting kernel.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years ago
Daniel Gonzalez Cabanelas 1e4ee5a318 brcm63xx: CPVA502+: add SPROM wifi
Add SPROM wifi to the kernel board data.

After this fix, the wifi won't work anyway due the lack
of RAM memory (16 MB). It will throw a kernel panic
when loading the b43 drivers.

Signed-off-by: Daniel Gonzalez Cabanelas <dgcbueu@gmail.com>
7 years ago
Daniel Gonzalez Cabanelas c5138d943b brcm63xx: CPVA502+: fix userspace support
Fix board name typo, fix network configuration and add a led trigger.

Signed-off-by: Daniel Gonzalez Cabanelas <dgcbueu@gmail.com>
7 years ago
Daniel Gonzalez Cabanelas d371581a2a brcm63xx: CPVA502+: fix image generation
Fix typo, erase pointless option and allow to build the image.

Signed-off-by: Daniel Gonzalez Cabanelas <dgcbueu@gmail.com>
7 years ago
Daniel Gonzalez Cabanelas dc3537415c brcm63xx: CPVA502+: fix LEDs and buttons at DTS
Leds are wrong and a button is missing, fix them.

Signed-off-by: Daniel Gonzalez Cabanelas <dgcbueu@gmail.com>
7 years ago
Daniel Gonzalez Cabanelas 377315de4d brcm63xx: fix external IRQ edge type sense
Fix the register for configuring rising/falling edge

Rising should be sense=1, and falling sense=0.
The old driver used these values, but the new one have
them flipped.

Signed-off-by: Daniel Gonzalez Cabanelas <dgcbueu@gmail.com>
7 years ago
Jonas Gorski a1a0f3f275 kernel: sort generic configs
Use kconfig.pl to sort the generic configs and get rid of duplicate
entries.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
7 years ago
John Crispin d49ddcdfd2 kernel: add another missing TPM symbol
Signed-off-by: John Crispin <john@phrozen.org>
7 years ago
Felix Fietkau 97212262d5 kernel: add missing TPM related config symbol for 3.18
Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Felix Fietkau 891ed144ff lantiq: select kmod-mt7603 instead of kmod-mt76 for WBMR-300HPD
Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Felix Fietkau 4babc62dbd kernel: fix TPM related config symbols for 4.9
Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
John Crispin 011798a0de kernel: add missing HW_RANDOM_TPM symbol
Signed-off-by: John Crispin <john@phrozen.org>
7 years ago
Wang JiaWei d48cc5e044 ramips: add support for HiWiFi HC5661A
HC5661A is almost the same as HC5661 but MT7628AN is used instead of MT7620A.

- MT7628AN
- 128 MiB DDR2 RAM (W971GG6KB-25)
- 16 MiB SPI NOR flash (W25Q128)
- SD slot (not work yet)
- 1+4 x 100M Ethernet
- 802.11 b/g/n Wi-Fi
- 3 x LED
- 1 x button
- UART pad on PCB (JP1: TX, RX, GND, 3.3V)

The factory flash layout seems different from HC5661.
"hwf_config" is renamed to "oem" and its size changes to 0x20000.
It is modified accordingly in the dts file.

0x000000000000-0x000000030000 : "u-boot"
0x000000030000-0x000000040000 : "hw_panic"
0x000000040000-0x000000050000 : "Factory"
0x000000050000-0x000000160000 : "kernel"
0x000000160000-0x000000fc0000 : "rootfs"
0x000000bb0000-0x000000fc0000 : "rootfs_data"
0x000000fc0000-0x000000fe0000 : "oem"
0x000000fe0000-0x000000ff0000 : "bdinfo"
0x000000ff0000-0x000001000000 : "backup"
0x000000050000-0x000000fc0000 : "firmware"

To install LEDE, enabled the "developer mode",
which will *void your warranty* and open the SSH server at port 1022.

sysupgrade -n -F lede-ramips-mt7628-hc5661a-squashfs-sysupgrade.bin

SD slot:
- Tried to add modules kmod-sdhci kmod-sdhci-mt7620, and corresponding dts block.
- It will block WAN + 3xLAN ports, only one LAN works.
- I'm not sure why, everything else works fine.

Signed-off-by: Wang JiaWei <buaawjw@gmail.com>
7 years ago
Ansuel Smith a0a9ba0464 kernel: update 4.9 to 4.9.13
refresh patch 630-packet_socket_type

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
7 years ago
Chris Blake 3fcc4b656a kernel: Add TPM Module support
The following will enable the TPM kernel module, as well as support for
the atmel i2c TPM driver. Tested and confirmed working on an Aerohive
AP-121

Signed-off-by: Chris Blake <chrisrblake93@gmail.com>
7 years ago
Thomas Reifferscheid eb09d79c16 ipq806x: sanitize Dni image generation
The more straight forward approach for generating the pure and unpadded
kernel file which then can be used for initramfs straight.
Build options for factory.img and sysupgrade.tar are handeled
seperately.

Signed-off-by: Thomas Reifferscheid <thomas@reifferscheid.org>
7 years ago
Felix Fietkau b24d91faf1 kernel: enable hwmon-k10temp in the x86/64 kernel config instead of packaging it
Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Felix Fietkau 9467ce42da build: get rid of host.mk
Defined required host related variables in toplevel.mk instead

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Thibaut VARENE ed49d08762 ar71xx: mikrotik: erase firmware partition on SPI NOR devices in pre_upgrade()
On Mikrotik SPI NOR devices, the firmware partition must be erased when flashing
from stock firmware, otherwise leftover bits (in particular a kernel signature)
can trigger a boot loop.

When booted from initramfs (the only way to flash LEDE on these devices),
this patch unconditionally erases the firmware partition in the pre_upgrade()
stage for all supported SPI NOR devices.

Signed-off-by: Thibaut VARENE <hacks@slashdirt.org>
7 years ago
Joseph C. Lehner df36b5e1b3 ramips: include only kmod-mt76-core in EX2700 image
This patch frees up flash space on the EX2700, by
removing unused mt76 drivers and firmware.

Signed-off-by: Joseph C. Lehner <joseph.c.lehner@gmail.com>
7 years ago
Arvid E. Picciani 0d09c7281f ar71xx: Enable RB2011 TTY
Enables TTY on the Mikrotik RouterBoard RB2011*R*

Signed-off-by: Arvid E. Picciani <aep@exys.org>
7 years ago
Ansuel Smith 9c3e29033d kernel: update 4.9 to 4.9.12
Refresh generic patch

Compiled and tested WRT1900ACS

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
7 years ago
Yangbo Lu 0e5d67d483 layerscape: add LS1043A Rev1.1 support
Backport kernel patches for LS1043A Rev1.1 support from upstream,
patchwork, and SDK. And update to latest u-boot to support LS1043A
Rev1.1.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
7 years ago
Felix Fietkau eb4f70a3cd ar71xx: use common firmware partition for WNDAP360
Patch from https://github.com/openwrt/openwrt/pull/398

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Felix Fietkau 735a27df81 lantiq: fix broadcast packets leaking on the wrong vlan on xrx200
The ethernet driver uses a port map override via special tag to control
the ports on which multicast packets are sent. This was added to work
around an issue in the switch that was occasionally leaking packets onto
the wrong vlan.
Unfortunately the change had some leftover lines that were overwrting
the port map with a list of all ports, thus always leaking packets onto
the wront vlan.

Fix this by only enabling the override with the VLAN port map and only
if a matching VLAN port map was actually found

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Kevin Darbyshire-Bryant 91a65f6c88 kernel: update kernel 4.4 to 4.4.50
Bump kernel from 4.4.49 to 4.4.50

Compile tested: All targets

Run tested: ar71xx Archer C7 v2

Signed-off-by: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
7 years ago
Felix Fietkau 1c8d155142 kernel: add missing config symbol for linux 3.18
Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Thibaut VARENE f6a52bf337 ar71xx: Enable mtdsplit support for RB SPI NOR devices
This patch enables mtdsplit for the MikroTik subtarget.
It converts mach-rbspi.c to use a single "firmware" partition.
Finally, it converts the SPI NOR profile to metadata images:
the original combined-image format is gone, the images are now
"standard" sysupgrade images with metadata appended.

Note: kernel2minor apparently pads the kernel container to erase-block
boundary, but this is undocumented behaviour, so we do not rely on it
and call pad-to anyway.

Note: in platform.sh, the boards are tested last in platform_check_image()
as this should eventually become the "*)" default case when more devices
switch to metadata images.

Signed-off-by: Thibaut VARENE <hacks@slashdirt.org>
7 years ago
Thibaut VARENE 53c862705d ar71xx: remove bogus "rb*)" catch-all from platform.sh
This patch replaces a dangerous catch-all with the exhaustive list of devices.

Signed-off-by: Thibaut VARENE <hacks@slashdirt.org>
7 years ago
Thibaut VARENE 890daca9e2 kernel: mtdsplit: Add support for Mikrotik NOR firmware
The RouterBOOT bootloader does not care where the kernel lives in the SPI
flash, all that matters is that the kernel is wrapped in the custom yaffs
container as generated by kernel2minor.

This container has a fixed signature as follows:
00000000  00 00 00 01 00 00 00 01  ff ff 6b 65 72 6e 65 6c  |..........kernel|

This patch adds mtdsplit support for identifying that signature and
triggering the search for the rootfs. rootfs is expected at EB boundary since
we use wget mtd_find_rootfs_from(). We make no use of the yaffs file size
field because it contains invalid data in the image generated by kernel2minor.

Signed-off-by: Thibaut VARENE <hacks@slashdirt.org>
7 years ago
Stijn Tintel 5c49fecf72 Revert "kernel: ar8327/ar8337: disable ARL access code to avoid lockups (FS#384)"
This reverts commit ec1a695daa.

Revert the workaround, the problem was properly fixed in
2374549916.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
7 years ago
Thomas Reifferscheid e01b034cdc ipq806x: fix fakerootfs position
The fakeroot header is expected by the netgear bootloader in the last
64 bytes of the last block used by the uImage. With the current
linux-4.9 uImage being more than 128k smaller than the linux-4.4 uImage
the bootloader was unable to locate the rootfs ih_magic and was
refusing to load and start the kernel.

Fixes: FS#542

Signed-off-by: Thomas Reifferscheid <thomas@reifferscheid.org>
7 years ago
Felix Fietkau f66a0c93b3 archs38: only calculate entry point address when necessary
$(eval) runs even during prereq check, which can cause bogus error
messages

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Felix Fietkau f77a1aac0b arc770: only calculate entry point address when necessary
$(eval) runs even during prereq check, which can cause bogus error
messages

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Alif M. Ahmad 2712497442 x86_64: Add support for EFI framebuffer (FS#515)
CONFIG_FB_EFI and CONFIG_FB_SIMPLE are needed to display console text on
EFI framebuffer.

CONFIG_FB_EFI is needed when the kernel is directly launched via EFI
shell or EFI startup.nsh script.

CONFIG_FB_SIMPLE is needed when launching the kernel via grub2 efi. In
this case, grub2 has prepared a gfxterm framebuffer and the kernel just
need to use the already prepared grub's gfxterm framebuffer to display
console text.

Signed-off-by: Alif M. Ahmad <alive4ever@live.com>
7 years ago
Rafał Miłecki 75b530a51b bcm53xx: add kernel 4.9 config
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years ago
Weijie Gao 3ee793f601 ar71xx: fix vlan settings for some boards
For AR71XX devices, GMAC1 always connects port 0 of the built-in switch,
as the CPU port.

This patch sets correct vlan for some devices with wrong settings:
a) mark port 0 as CPU port, tagged
b) reverse port order, marking these ports untagged

Signed-off-by: Weijie Gao <hackpascal@gmail.com>
7 years ago
Thibaut VARENE 6e4549138d ar71xx: Add more boards to the routerboard serial detection patch
This patch enables serial console on the 435 series and the 953gs.

Signed-off-by: Thibaut VARENE <hacks@slashdirt.org>
7 years ago
Thomas Roberts f9278337cf ar71xx: add support for TL-WR802N Version 2
This patch adds support for the TP-Link TL-WR802N Version 2.

Specification:
- SoC: Qualcomm Atheros QCA9533 (560 MHz, MIPS 24Kc)
- RAM: 32 MiB
- Storage: 4 MiB of FLash on board
- Wireless: Built into QCA9533 (Honey Bee), PHY modes b/g/n
- Ethernet: 1x100M (port0)

Installation through OEM Web Interface:
- Connect to TL-WR802N by Ethernet or Wi-Fi
- Go to http://192.168.0.1 (default user is "admin" & password is "admin)
- Go to "System Tools -> Firmware Upgrade"
- Browse for firmware "*.factory-us.bin" or  "*.factory-eu.bin" for eu model
- Click upgrade

Installation through tftp:
Note: T_OUT, T_IN and GND on the board must be connected to USB TTL
      Serial Configuration 115200 8n1

- Boot the TL-WR802N
- When "Autobooting in 1 seconds" appears type "tpl" followed by enter
- Connect to the board Ethernet port
    (IPADDR: 192.168.1.1, ServerIP: 192.168.1.10)
- tftpboot 0x80000000 <Firmware Image Name>
- Record the result of "printenv bootcmd"
- Enter "erase <Result of 'printenv bootcmd'> +0x3c0000"
    (e.g erase 0x9f020000 +0x3c0000)
- Enter "cp.b 0x80000000 <Result of 'printenv bootcmd'> 0x3c0000"
    (e.g cp.b 0x80000000 0x9f020000 0x3c0000)
- Enter "bootm <Result of 'printenv bootcmd'>"
    (e.g bootm 0x9f020000)

Signed-off-by: Thomas Roberts <tom.p.roberts@gmail.com>
7 years ago
Jo-Philipp Wich 7c9f5c7e6b sdk: emit proper tag references for base URLs
Properly resolve symbolic tag names when constructing the base feed Git url
and avoid emitting "HEAD" references when building from detached commits.

Fixes #495, #501.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
7 years ago
Mathias Kresin bececcce86 lantiq: fix warning if ltq_atm modules are missing
Fixes the following warning on first boot if the ltq_atm modules are
not included in the image:

  ls: /lib/modules/4.4.49/ltq_atm*: No such file or directory

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Mathias Kresin e88b36f4be lantiq: set the internet led interface according to wan interface
Use the nas0 interface for the netdev trigger as default. Use the ptm0
interface for xRX200 boards to match the default wan interface set in
02_network.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Mathias Kresin 044a4eafd5 lantiq: introduce lantiq_is_vdsl_system
Move the code to check if the current system is a system with vdsl
support to a dedicate function to make it reusable.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Mathias Kresin cfd16ecc48 lantiq: fix ARV7519RW22 switch port indexing
Fixes FS#454.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Felix Fietkau 72327d1757 ar71xx: fix ethernet PLL configuration for QCA956x
QCA956x is configured like AR934x, not like the older chips.
Should fix ethernet hangs when using the WAN port without SGMII

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Henryk Heisig d6baeb5c48 ar71xx: fix lan ports on archer C59 and C60
Signed-off-by: Henryk Heisig <hyniu@o2.pl>
7 years ago
David Woodhouse d16f433e42 x86: Add Geos profile for Geode subtarget
This makes the Geode images actually useful again. The Geos profile
should include the relevant hardware for that board, and the Default
profile adds the via-rhine adapter which seems to have been present in
the net5501 and alix targets killed in commit 9e0759ea26 ("x86: merge
all geode based subtargets into one").

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
7 years ago
Karol Dudek 58fc50f1b0 ar71xx: add support for 8devices Lima board
Lima is a module for the (IoE) internet of everything applications,
based on Qualcomm/Atheros QCA4531.

Specification:

- 650/600/216 MHz (CPU/DDR/AHB)
- 64 MB of RAM (DDR2)
- 32 MB of FLASH
- 2T2R 2.4 GHz
- 2x 10/100 Mbps Ethernet
- USB 2.0 Host
- PCIe
- UART for serial console
- 14x GPIO

Flash instruction:
1. Download lede-ar71xx-generic-lima-squashfs-sysupgrade.bin
and rename it to 8dev_recovery.bin
2. Binary file copy to USB stick and plug into slot USB
3. Press S2 (reset) button
4. Press and hold the S1 button by 5 seconds
5. Wait ~40 seconds to complete recovery

Tested on:

- Lima development kit

Signed-off-by: Karol Dudek <karoiz@sli.pl>
7 years ago
John Crispin a4efc9965c mediatek: add more missing symbols
Signed-off-by: John Crispin <john@phrozen.org>
7 years ago
John Crispin bb255f7429 ipq806x: add v4.9 support
Signed-off-by: John Crispin <john@phrozen.org>
7 years ago
John Crispin 04c4b6f7fd mediatek: add config file for v4.9
Signed-off-by: John Crispin <john@phrozen.org>
7 years ago
Felix Fietkau 2bf9ea6a31 mvebu: add linux 4.9 support
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
7 years ago
Günther Kelleter 2374549916 ar8216: flush ARL table during reset after init_globals
commit 33b72b8e0f
"ar8216: adjust ATU flushing in case of link changes"
introduced portwise flushing on link down events. Now the ARL table could
be in a chaotic state after boot where ar8xxx_sw_get_arl_table looped
forever (depending on the entries collected while booting).

Signed-off-by: Günther Kelleter <guenther.kelleter@devolo.de>
7 years ago
John Crispin 53f5d59fa1 mediatek: bump to v4.9
Signed-off-by: John Crispin <john@phrozen.org>
7 years ago
Furong Xu f885edef5a ramips: fix the number of uarts for MT7688
Same as MT7621 and MT7628, MT7688 allows up to 3 uarts

Signed-off-by: Furong Xu <xfr@outlook.com>
7 years ago
Furong Xu 00343e18f2 ramips: fix PWM pin mux conflict in dtsi
GPIO18 and GPIO19 on OMEGA2(+) should be GPIO mode, enable PWM lead to a conflict

[    0.290633] rt2880-pinmux pinctrl: pin io18 already requested by pinctrl; cannot claim for 10005000.pwm
[    0.299722] rt2880-pinmux pinctrl: pin-18 (10005000.pwm) status -22
[    0.305729] rt2880-pinmux pinctrl: could not request pin 18 (io18) from group pwm0  on device rt2880-pinmux
[    0.315131] mtk-pwm 10005000.pwm: Error applying setting, reverse things back

Keep PWM disabled.

Signed-off-by: Furong Xu <xfr@outlook.com>
7 years ago
Hauke Mehrtens a11243578a kernel: update kernel 4.4 to version 4.4.49
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
7 years ago
Hauke Mehrtens 236840eb47 kernel: update kernel 4.9 to version 4.9.10
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
7 years ago
Mirko Parthey d517f04343 brcm47xx: fix button inversion for Asus WL-500W
The Asus WL-500W buttons are active high,
but the software treats them as active low.
Fix the inverted logic.

Signed-off-by: Mirko Parthey <mirko.parthey@web.de>
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years ago
Mirko Parthey ac3a4e7ae2 brcm47xx: fix USB driver choice for Asus WL-500W
BCM4704 SoC has only USB 1.1 core:
ssb: Core 3 found: USB 1.1 Hostdev (cc 0x808, rev 0x03, vendor 0x4243)
but this device actually comes with two USB 2.0 ports.

It appears embedded controller isn't used but instead there are two PCI
attached controllers (next to the BCM4321 wireless card):
1106:3038 VT82xx/62xx UHCI USB 1.1 Controller
1106:3104 USB 2.0

Choose a set of USB drivers which actually support this hardware.

Signed-off-by: Mirko Parthey <mirko.parthey@web.de>
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years ago
Felix Fietkau 1e1a0592f8 kernel: fix crashes on MIPS when loading kernel modules under memory pressure
When memory is tight, modules may need to be loaded into vmalloc()
space. The code then has to generate jump trampolines which enable
relocations between vmalloc space and physical address space.

The code had a bug that was freeing these trampolines even when the
module was successfully loaded.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Thibaut VARENE 748e701b74 ar71xx: add preliminary kernel support for several RB SPI NOR devices
The cAP 2nD, mAP 2nD and wAP 2nD apparently all share the same QCA953x/SPI-NOR
platform.

This patch adds preliminary kernel support based on init data used in
Mikrotik's linux-3.3.5 kernel patch. Since this is totally experimental and
untested, the necessary glue in base-files has not been added, the code is
provided as a starting point in case somebody with that hardware wants to help
getting it supported.

The cAP lite (cAPL 2nD) should also be supported once it is determined whether
or not it uses the same board identifier as the mAP lite.

Code has been successfully built and has no side effect (no impact on already
supported devices).

Signed-off-by: Thibaut VARENE <hacks@slashdirt.org>
7 years ago
Thibaut VARENE b800453282 ar71xx: add new SPI NOR RB devices to the list of serial-enable patch
Signed-off-by: Thibaut VARENE <hacks@slashdirt.org>
7 years ago
Thibaut VARENE b2044a7f60 ar71xx: add support for RB750r2
This patch adds support for the MikroTik RouterBOARD hEX lite
https://routerboard.com/RB750r2

Specifications:
- SoC: Qualcomm QCA9531 (850MHz)
- RAM: 64MB
- Storage: 16MB NOR SPI flash
- Ethernet: 5x100M (1 PoE in)

This ethernet router is based on the same platform as the hEX PoE lite (it
shares the same board identifier), but has no USB and no PoE out.

Signed-off-by: Thibaut VARENE <hacks@slashdirt.org>
7 years ago
Thibaut VARENE 19f42663d2 ar71xx: add support for RB750UPr2
This patch adds support for the MikroTik RouterBOARD hEX PoE lite
https://routerboard.com/RB750UPr2

Specifications:
- SoC: Qualcomm QCA9531 (650MHz)
- RAM: 64MB
- Storage: 16MB NOR SPI flash
- Ethernet: 5x100M (1 PoE in, 1 PoE out)
- USB: Type A

This ethernet router is based on the same platform as the wireless router hAP.

Signed-off-by: Thibaut VARENE <hacks@slashdirt.org>
7 years ago
Thibaut VARENE 8cbb2ac633 ar71xx: add support for RB951Ui-2nD
This patch adds support for the MikroTik RouterBOARD hAP
https://routerboard.com/RB951Ui-2nD

Specifications:
- SoC: Qualcomm QCA9531 (650MHz)
- RAM: 64MB
- Storage: 16MB NOR SPI flash
- Wireless: builtin QCA9531, 2x2:2
- Ethernet: 5x100M (1 PoE in, 1 PoE out)
- USB: Type A

Signed-off-by: Thibaut VARENE <hacks@slashdirt.org>
7 years ago
Thibaut VARENE b18bae37a4 ar71xx: provide support for RB-941-2nD via mach-rbspi.c
This patch implements support for the hAP lite in mach-rbspi.c

hAP lite was supported via mach-rb941.c, so this file is removed
as well as the corresponding build bits.

Signed-off-by: Thibaut VARENE <hacks@slashdirt.org>
7 years ago
Thibaut VARENE c59fa94eee ar71xx: add support for RB mAP L-2nD
This patch adds support for the MikroTik RouterBOARD mAP lite
https://routerboard.com/RBmAPL-2nD

Specifications:
- SoC: Qualcomm QCA9533 (650MHz)
- RAM: 64MB
- Storage: 16MB NOR SPI flash
- Wireless: builtin QCA9533, 2x2:2
- Ethernet: 1x100M

This is another 16M SPI NOR mikrotik device. The machine file is named
mach-rbspi.c because I plan to add support for several of the other spi-based
RouterBOARD devices in subsequent patches: they share most of the hardware
and thus the same codebase.

Signed-off-by: Thibaut VARENE <hacks@slashdirt.org>
7 years ago
Daniel Golle d57223259b ramips: replace remaining instances of ralink, port-map
Some boards were apparently forgotten when ralink,portmap was renamed
to mediatek,portmap -- probably because they used the long obsolete
ralink,port-map attribute.
If this commit breaks ethernet wan/lan assignment, this is because
the port-map attribute wasn't actually parsed, you'll have to replace
"wllll" by "llllw" in the dts file belonging to that board (and send
a patch doing that!)

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
7 years ago
John Crispin 6cb0372d42 ramips: fix mt7621 ethernet support for v4.9
Signed-off-by: John Crispin <john@phrozen.org>
7 years ago
John Crispin 38f9d08f57 kernel: add missing symbol for v4.9
Signed-off-by: John Crispin <john@phrozen.org>
7 years ago
Chris Blake 9a6c932556 x86: Add board configs for the PC Engines APU2
This adds the default LED and network settings for the PC Engines APU2
when running under the x86 target.

[dwmw2: Change Ethernet port setup]
Signed-off-by: Chris Blake <chrisrblake93@gmail.com>
7 years ago
David Woodhouse add465f1be x86: Enable DIAG LED on Geos
Based on a patch from Chris Blake <chrisrblake93@gmail.com>, except let's
do it by using the LED configuration instead of hard-coding it for each
board type. And try using /bin/board_detect to do the default behaviour,
on the first boot where the config hasn't yet been generated.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
7 years ago
Chris Blake 27a635f0b4 x86: Move Traverse Geos configs into x86 base-files
This change moves the files in 657418d to the root of the x86 target.
This is done in preperation for adding more devices under other
subtargets.

CC: David Woodhouse <dwmw2@infradead.org>

Signed-off-by: Chris Blake <chrisrblake93@gmail.com>
7 years ago
Giuseppe Lippolis 35c60d18c5 ramips: export slic IRQ line in dwr-512
The DWR-512 embeds the hw slic device si3210. This device have the IRQ line
attached to the gpio1. This patch export the gpio1 with proper name and
parameters to the sysfs.

Signed-off-by: Giuseppe Lippolis <giu.lippolis@gmail.com>
7 years ago
John Crispin c186a48fca octeon: only copy sysupgrade file if present
this caused

'mv: can't rename '/mnt/sysupgrade.tgz': No such file or directory'

when running sysupgrade -n

Signed-off-by: John Crispin <john@phrozen.org>
7 years ago
John Crispin 1753720261 octeon: bump to v4.9
Signed-off-by: John Crispin <john@phrozen.org>
7 years ago
Felix Fietkau 9dcb921d90 build: add buildbot specific config option for setting defaults
This can be used to tweak the buildbot behavior without having to change
buildbot's configuration.
It will also allow us to add more aggressive clean steps (e.g. on
toolchain changes), which would break developers' workflows if enable
by default.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Felix Fietkau f5977c0c0a ramips: revert faulty 4.4 config change from 9c24227090
Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Felix Fietkau f533b94436 ar71xx: fix DEFAULT_PACKAGES for mikrotik devices
Include packages from the default profile for NAND devices

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Alexandru Gagniuc 6cce9557a0 ar71xx: Add support for D-Link EBR-2310 Rev. C
Add support for the EBR-2310, which is almost identical to the DIR-615
rev E4, without the wifi.

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
7 years ago
Piotr Dymacz 56561b9f51 ar71xx: add support for TP-Link TL-WA850RE v2
TP-Link TL-WA850RE v2 is a wall-plug N300 Wi-Fi range extender,
based on Qualcomm/Atheros QCA9533 v2.

Short specification:

- 550/391/195 MHz (CPU/DDR/AHB)
- 1x 10/100 Mbps Ethernet
- 32 MB of RAM (DDR1)
- 4 MB of FLASH
- 2T2R 2.4 GHz
- 2x internal antennas (embedded on PCB)
- 9x LED (all can be turned off with GPIO15), 2x button
- UART (J3) header on PCB

Flash instruction: use "factory" image directly in vendor GUI.

Warning: this device does not include any kind of recovery mechanism
in the bootloader and disassembling process is not trivial.

You can access vendor firmware over serial line using:
- login: root
- password: sohoadmin

Image was tested only in US version of the device, but should work
also with the same device version sold in other countries.

Available FLASH space, with LEDE trunk, is only 240 KB.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
7 years ago
Furong Xu a9fdb35740 ramips: Clean duplicated status property for Omega2 WMAC in dtsi
At the tail of dtsi, wmac is enabled twice, clean the first one

Signed-off-by: Furong Xu <xfr@outlook.com>
7 years ago
Giuseppe Lippolis 85766c8d70 ramips: fixed sms led polarity into dwr-512 DT
Signed-off-by: Giuseppe Lippolis <giu.lippolis@gmail.com>
7 years ago
Thibaut VARENE 157353c210 ramips: WN3000RPv3: do not setup switch
The WN3000RPv3 is a repeater with a single ethernet port. Setting up the
switch, even to disable it, is unnecessary and possibly confusing.

Configure LAN as eth0 instead.

Signed-off-by: Thibaut VARENE <hacks@slashdirt.org>
7 years ago
Sven Eckelmann 3d16c16eb6 ar71xx: Add missing device package om-watchdog for MR1750
Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
7 years ago
Sven Eckelmann 391d498fe5 ar71xx: add OpenMesh A40 to OpenMesh A60 profile
Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
7 years ago
Sven Eckelmann d0061798a6 ar71xx: extract ath10k wifi board.bin for the OpenMesh A40 board
Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
7 years ago
Sven Eckelmann c6e1bb2ace ar71xx: enable sysupgrade for the OpenMesh A40
Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
7 years ago
Sven Eckelmann 640f9158e2 ar71xx: add user-space support for the OpenMesh A40
Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
7 years ago
Sven Eckelmann 5e61a8331d ar71xx: add kernel support for the OpenMesh A40 board
Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
7 years ago
Sven Eckelmann 5e50adeed3 ar71xx: create profile and build image for the OpenMesh A60 board
Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
7 years ago
Sven Eckelmann 1330ff189b ar71xx: extract ath10k wifi board.bin for the OpenMesh A60 board
Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
7 years ago
Sven Eckelmann fce57c4082 ar71xx: enable sysupgrade for the OpenMesh A60
Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
7 years ago
Sven Eckelmann 174605c467 ar71xx: add user-space support for the OpenMesh A60
Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
7 years ago
Sven Eckelmann 417f9e7e82 ar71xx: add kernel support for the OpenMesh A60 board
Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
7 years ago
Sven Eckelmann baaf0acded ar71xx: enable sysupgrade for the OpenMesh OM2Pv4/-HSv4
Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
7 years ago
Sven Eckelmann bdfe4c1218 ar71xx: add user-space support for the OpenMesh OM2Pv4/-HSv4
Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
7 years ago
Sven Eckelmann e1b50457b0 ar71xx: add kernel support for the OpenMesh OM2Pv4/-HSv4
Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
7 years ago
Sven Eckelmann 019276a9c6 ar71xx: Remove the v2/v3 from the OpenMesh profile names
The list of v2/v3 devices is getting longer and makes reading the names of
the profiles unnecessary hard.

Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
7 years ago
John Crispin 9c24227090 ramips: add v4.9 support
NAND support is missing

Signed-off-by: John Crispin <john@phrozen.org>
7 years ago
Jonas Gorski c0841b3c4e mvebu: append metadata to clearfog sd card images
Fixes the following issue:

root@LEDE:/# sysupgrade /tmp/lede-mvebu-armada-388-clearfog-sdcard.img.gz
Saving metaconfig...
Image metadata not found
Use sysupgrade -F to override this check when downgrading or flashing to vendor firmware
Image check 'fwtool_check_image' failed.
root@LEDE:/#

Acked-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
7 years ago
Felix Fietkau 90728c796d sdk: clean scripts/config before packing tarball (FS#504)
Avoids shipping potentially incompatible object files and also reduces
the tarball size

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Felix Fietkau fcea190b8b cns3xxx: disable watchdog until it is fixed
It has been reported to cause random reboots on some devices

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Felix Fietkau fec57b40c3 kernel: add missing tracing related config symbols for linux 4.9
Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
John Crispin 60a52cd4b4 apm821xx: adds missing symbol to v4.9 default config
Signed-off-by: John Crispin <john@phrozen.org>
7 years ago
Giuseppe Lippolis ec0f20212e ramips: added image size into dwr-512 DT
Signed-off-by: Giuseppe Lippolis <giu.lippolis@gmail.com>
7 years ago
Yangbo Lu 3c01fd0119 layerscape: fix adjust_link for 10G & 2.5G
Added a linux-4.4 patch to fix adjust_link for 10G & 2.5G.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
7 years ago
Chuanhong Guo 634328c0de ramips: correct switch configuration for Newifi D1
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
7 years ago
Martin Blumenstingl 70395ae8cb lantiq: fix patching the wifi mac address on BTHOMEHUBV3A
The firmware hotplug script tries to read the mac address from a
partition with the name "uboot-env" which does not exist (instead it's
name is uboot_env). This broke calculation of the new checksum (after
patching the mac address) which resulted in ath9k refusing to use the
EEPROM data.

The original error reported by ath9k was:
PCI: Enabling device 0000:00:0e.0 (0000 -> 0002)
ath: phy0: Bad EEPROM checksum 0x2523
ath: phy0: Unable to initialize hardware; initialization status: -22
ath9k 0000:00:0e.0: Failed to initialize device

Fixes: a20616863d ("lantiq: use ath9k device tree bindings
binding/owl-loader")

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
7 years ago
Thibaut VARENE 33154eaf41 ar71xx: fix platform_find_rootfspart()
platform_find_rootfspart() fails if the kernel partition comes before the
rootfs partition. The proposed patch fixes this while preserving what I
understand was the original idea: stop at first match.

Signed-off-by: Thibaut VARENE <hacks@slashdirt.org>
7 years ago
Hauke Mehrtens 5c651b029e kernel: fix kmod-rxrpc with kernel 4.9
rxkad will be build into af-rxrpc now and is of type boolean.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
7 years ago
Martin Blumenstingl 0caffa60af kernel: fix compile error on linux 4.9 with CONFIG_KALLSYMS disabled
Upstream linux commit 7523e4dc5057e "module: use a structure to
encapsulate layout." moves some of the struct module members into a
separate struct module_layout.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
7 years ago
Hauke Mehrtens b1c2506a76 kernel: MIPS: IRQ Stack: Fix erroneous jal to plat_irq_dispatch
This backports the following fix to our mips IRQ stack patches:
https://patchwork.linux-mips.org/patch/15110/

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
7 years ago
Hauke Mehrtens 136d4a0656 lantiq: fix section mismatch in PCIe driver
Do not put the probe function into the __init section, but use the normal
section. This fixes a section mismatch warning.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
7 years ago
Hauke Mehrtens 863e79f8d5 lantiq: add support for kernel 4.9
The following patches were dropped because they are already applied
upstream:
0012-pinctrl-lantiq-fix-up-pinmux.patch
0013-MTD-lantiq-xway-fix-invalid-operator.patch
0014-MTD-lantiq-xway-the-latched-command-should-be-persis.patch
0015-MTD-lantiq-xway-remove-endless-loop.patch
0016-MTD-lantiq-xway-add-missing-write_buf-and-read_buf-t.patch
0017-MTD-xway-fix-nand-locking.patch
0044-pinctrl-lantiq-introduce-new-dedicated-devicetree-bi.patch
0045-pinctrl-lantiq-Fix-GPIO-Setup-of-GPIO-Port3.patch
0046-pinctrl-lantiq-2-pins-have-the-wrong-mux-list.patch
0047-irq-fixes.patch
0047-mtd-plat-nand-pass-of-node.patch
0060-usb-dwc2-Add-support-for-Lantiq-ARX-and-XRX-SoCs.patch
0120-MIPS-lantiq-add-support-for-device-tree-file-from-bo.patch
0121-MIPS-lantiq-make-it-possible-to-build-in-no-device-t.patch
122-MIPS-store-the-appended-dtb-address-in-a-variable.patch

The PHY driver was reduced to the code adding the LED configuration,
the rest is already upstream:
0023-NET-PHY-adds-driver-for-lantiq-PHY11G.patch

The SPI driver was replaced with the version pending for upstream
inclusion:
New driver:
0090-spi-add-transfer_status-callback.patch
0091-spi-lantiq-ssc-add-support-for-Lantiq-SSC-SPI-controller.patch
Old driver:
0100-spi-add-support-for-Lantiq-SPI-controller.patch

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
7 years ago
Hauke Mehrtens d61a799528 kernel: add missing config option for kernel 4.9
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
7 years ago
Hauke Mehrtens 11215fb23c kernel: add rest controller option for kernel 4.9
Deactivate the reset controllers which could be activated on kernel 4.9
by default.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
7 years ago
Felix Fietkau e9f76f0f46 cns3xxx: clean up patches
Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Alberto Bursi 4383c13aee kirkwood: add ZyXEL NSA325 device
This patch add ZyXEL NSA325 2-Bay Media Server

The ZyXEL NSA325 device is a Kirkwood based NAS:

- SoC: Marvell 88F6702 1600Mhz
- SDRAM memory: 512MB DDR2 400Mhz
- Gigabit ethernet: Marvell Alaska
- Flash memory: 128MB
- 1 Power button
- 1 Power LED (blue)
- 5 Status LED (green/red)
- 1 Copy/Sync button
- 1 Reset button
- 2 SATA II ports (internal)
- 2 USB 2.0 ports (back)
- 1 USB 3.0 port (front)
- Fan (fixed speed)
- hardware watchdog in a mcu

Basically a bigger, more powerful version of NSA310,
installation is the same as they share the same flash layout.

A notable difference is that there is a hardware watchdog
in a mcu on the board, which is disabled by default in the LEDE u-boot.
The watchdog is also disabled with a GPIO activation through
raw register change when kwbooting or it would reset the board before
the new uboot was transferred.

Signed-off-by: Alberto Bursi <alberto.bursi@outlook.it>
Signed-off-by: Felix Fietkau <nbd@nbd.name> [remove dead code]
7 years ago
Alberto Bursi f99178b6c0 kirkwood: cleanup nsa310b mac address extraction
switch nsa310b mac address reading to mtd_get_mac_ascii helper as
it seems the fw_env.config file is created way later than when
network is set up, when I tested I still had that file included
in the image through /files folder.

Signed-off-by: Alberto Bursi <alberto.bursi@outlook.it>
7 years ago
Christian Lamparter 9a9f2f97e6 apm821xx: add linux 4.9 apm821xx patches
This patch updates the apm821xx target to use the 4.9 kernel.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
7 years ago
David Woodhouse 657418db68 x86: Add configuration back for Traverse Geos
When we merged all the Geode boards into one generic target, the default
network and LED configuration was lost. Put it back.

Fixes: 9e0759ea26 ("x86: merge all geode based subtargets into one")
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
7 years ago
Felix Fietkau e0e5f8ca2f kernel: fix linux 4.9 host tools portability issues
Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Tim Harvey 092f2c14bd imx6: move to Linux 4.9 kernel
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Felix Fietkau 73ea3c3f9c cns3xxx: add back watchdog support
Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
John Crispin 84e784671b kernel: add missing symbols to generic/config-4.9
Signed-off-by: John Crispin <john@phrozen.org>
7 years ago
John Crispin 4bdf3a33ad kernel: fix 304-mips_disable_fpu.patch for v4.9
the function prototype has changed, make the new stub consistent with this
change.

Signed-off-by: John Crispin <john@phrozen.org>
7 years ago
Koen Vandeputte 2c416b1db0 cns3xxx: switch to linux 4.9
Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
7 years ago
Koen Vandeputte 1db4135e32 cns3xxx: add preliminary 4.9 support
Adds preliminary kernel 4.9 support for this target.

- Refreshed/Updated all patches

Added 3 new patches:
- 093 --> Add virtual PCI MMIO mapping
- 230 --> Remove deprecated code
- 240 --> Rework AT24 eeprom code to use the new NVMEM API

Compiled & tested on cns3xxx (gw2388)

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
7 years ago
Felix Fietkau e690280a16 mxs: enable nvmem support
fixes build error due to missing kernel config options

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Rafał Miłecki db866154fc kernel: move upstream accepted bcm47xxpart TRX cleanups
Use 0xx prefix for accepted patches.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years ago
Daniel Gonzalez Cabanelas 41ad9ed13a brcm63xx: Add Observa VH4032N support
Add support for the Observa Telecom VH4032N router.

This is another BCM6368 router, 128 MB RAM, 32MB flash and 3 USB
host ports.

The wifi chip is an onboard Broadcom BCM43222.

Signed-off-by: Daniel Gonzalez Cabanelas <dgcbueu@gmail.com>
[jonas.gorski: use gpio-hog instead of abusing ephy-reset]
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
7 years ago
Felix Fietkau 7096ed58fd kernel: remove kmod packages for bridge, stp, llc and 8021q
Remove CONFIG_VLAN_8021Q overrides for two targets
These features are built into the kernel image for all targets

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Jonas Gorski 0127c480bb brcm63xx: Neufbox 6: fix switch by probing through DT
Probe the switch through DT instead of a platform device. This fixes
probe, as GPIO offsets are now properly accounted for.

Fixes the following issue:

[    0.802953] 8021q: 802.1Q VLAN Support v1.8
[    0.810518] rtl8366_smi: gpio_request failed for 18, err=-517

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
7 years ago
Jonas Gorski 8b741d5cd1 brcm63xx: fix lzma loader for BCM6362
BCM6362 and BCM3380 seem to share the same PRID. Disable serial output
for them until we can find a way to tell them apart reliably.

Fixes: 8f3cfe4ba2 ("brcm63xx: lzma-loader: add BCM3380 support")
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
7 years ago
Paul Wassi 9d4f8ff4f6 brcm63xx: add support for Pirelli/ADB P.DG AV4202N
This patch adds support for the ADB P.DG AV4202N aka Pirelli PRG AV4202N.

Signed-off-by: Paul Wassi <p.wassi@gmx.at>
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
7 years ago
Jonas Gorski 31d5c5bc90 brcm63xx: setup internal switch leds for bcm6368
Setup the GPIO_MODE register bits for used internal switch port leds.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
7 years ago
Jonas Gorski c7f31b280f brcm63xx: do a full reset phy cycle
Make sure we do a proper reset of the phy, if the phy reset is defined.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
7 years ago
Jonas Gorski dd7079e79a brcm63xx: implement gpio_to_irq for bcm63xx-gpio
Add support for mapping some GPIO lines to IRQs. GPIO to IRQ mappings
were found out through experimentation, helped by having the GPIO as
output still toggling the IRQ input.

Based-on: http://patchwork.ozlabs.org/patch/660534/
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
7 years ago
Jonas Gorski 94bbd1f057 brcm63xx: fix external interrupts on BCM6318
Setting the clear bit for an interrupt seems to cause interrupts to be
deasserted again immediately. So unset the bit for BCM6318 to allow
subsequent interrupts to still work.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
7 years ago
Felix Fietkau d826af2cbb build: make <subdir>/install opt-in, use it for target/ only
Fixes buildbot errors on running make target/install or
toolchain/install

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Piotr Dymacz f5416b0622 ar71xx: image: drop redundant CONSOLE assignment
Default CONSOLE value for ar71xx target is "ttyS0,115200", so there
is no need to specify the same value in device profiles.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
7 years ago
Alexey Brodkin aab344d227 arc770: backport upstream fix for unaligned access
This commit reverts 42f3c1f ("arc770: fix broken upstream change")
and simultaneously adds back-ported fix from Linus' tree:
a524c218bc94 ("ARC: [arcompact] brown paper bag bug in unaligned
access delay slot fixup").

Note mentioned patch will appear in stable trees soon as well so
IMHO there's not much sense in adding this separate patch in lede/master branch.
As well as we will get rid of it here in 17.01 once we bump 4.4 kernel here
later down the line.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Felix Fietkau <nbd@nbd.name>
Cc: John Crispin <john@phrozen.org>
Cc: Jo-Philipp Wich <jo@mein.io>
7 years ago
Claudio Leite 290ca2ba46 ramips: fix AR670W partition alignment
mtdsplit_lzma requires that the rootfs be aligned to a block boundary.
Pad the kernel partition to make this so.

Signed-off-by: Claudio Leite <leitec@gmail.com>
7 years ago
Rafał Miłecki 76eb62e5af kernel: backport bcm47xxsflash support for reading 32 MiB flashes
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years ago
Álvaro Fernández Rojas 48b71a0b07 brcm2708: bcm2708: fix build
buildbot fails to build without regmap, which I couldn't reproduce locally.
Hopefully this fixes it.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
7 years ago
Felix Fietkau 412cf4cc51 sdk: add missing change from r3328-f55c29e4c7
Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Álvaro Fernández Rojas ba9dbc3dd5 brcm2708: add more patches for linux 4.9
Also removes unneeded wireless patches

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
7 years ago
Álvaro Fernández Rojas 7ef713c9c4 brcm2708: bcm2710: add 64 bit support for Raspberry Pi 3
64 bit support for Raspberry Pi 3 is experimental. However, bcm2709 subtarget
should serve as a stable and compatible 32 bit support.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
7 years ago
Álvaro Fernández Rojas 77a00027c3 brcm2708: bcm2709: add support for Raspberry Pi 3
This adds support for Raspberry Pi 3 on the bcm2709 subtarget, in order to
keep 32 bit image support when 64 bit support is added on bcm2710 subtarget.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
7 years ago
Álvaro Fernández Rojas de1f83097a generic: add missing symbols for linux 4.9
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
7 years ago
Álvaro Fernández Rojas e9e52761d3 brcm2708: remove duplicated gzip from image generation
Images are now automatically gziped so remove custom image command

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
7 years ago
Álvaro Fernández Rojas d9d090e520 brcm2708: remove linux 4.4 support
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
7 years ago
Álvaro Fernández Rojas ada91d8a24 brcm2708: switch to linux 4.9
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
7 years ago
Álvaro Fernández Rojas 96aa0c6b0b brcm2708: add linux 4.9 support
Patches from Raspberry Pi repo:
https://github.com/raspberrypi/linux/commits/rpi-4.9.y

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
7 years ago
Álvaro Fernández Rojas 989a0b4846 generic: add missing kernel symbols
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
7 years ago
Rafał Miłecki 2fd81681f9 bcm53xx: include Broadcom PHY driver in the kernel
Initial idea was to use package with this PHY driver for devices that
need it. Unfortunately this can't work as bgmac is built-in and PHY
probing happens before loading modules - it results in PHY subsystem
picking default (generic) PHY driver.

There were two ways of solving this:
1) Making bcm53xx use bgmac as module
xor
2) Built-in Broadcom PHY driver

After some quick discussion it seems we can simply built-in the driver
as increased kenel size is relatively small (1805 B).

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years ago
Felix Fietkau 83ab1982b4 x86: remove linux 4.4 support
Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Felix Fietkau 92bda4ae5c x86: switch to Linux 4.9
Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Rafał Miłecki 174ce4c56d kernel: update spi-nor in 4.9 to spi-nor tree version (next branch)
These are patches queued for 4.11. It adds support for even more hw and
removes some annoying WARN_ONCE.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years ago
Rafał Miłecki 6d5419d96a kernel: update spi-nor in 4.9 to version from Linus's tree (4.10)
This adds support for more devices.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years ago
Rafał Miłecki ec10bb18f5 bcm53xx: add missing system.sh include
It's needed for macaddr_add.

Fixes: 50efd403e6 ("bcm53xx: set WAN MAC address to don't share one with LAN interface")
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years ago
Koen Vandeputte 4339e5ddb1 kernel: fix build error in mtdsplit driver
Add missing parentheses.
Fixes kernel build issue when using this driver.

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
7 years ago
Koen Vandeputte 597ea08038 cns3xxx: use proper macro's for ID handling
Compiled & tested on cns3xxx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
7 years ago
Jo-Philipp Wich ea269c37b8 ar71xx/ipq806x/mediatek/mvebu: fix network defaults
After "73d923e base-files: emit tagged switch configuration by default"
some default network configurations are broken because the lan and wan
ifnames are forcibly set to untagged netdevs.

Adjust the offending set_interfaces_lan_wan() calls to use the proper
tagged device names.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
7 years ago
Jo-Philipp Wich 62bf0d4958 arc770: fix broken upstream change
Add a patch to revert upstream commit 9aed02feae57bf7a40cb04ea0e3017cb7a998db4
which introduces syntax errors.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
7 years ago
Álvaro Fernández Rojas dab5a44067 brcm2708: update linux 4.4 patches to latest version
n
As usual these patches were extracted and rebased from the raspberry pi repo:
https://github.com/raspberrypi/linux/tree/rpi-4.4.y

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
7 years ago
Rafał Miłecki 6b01f0f196 bcm53xx: set Netgear R8000 USB LEDs
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years ago
Rafał Miłecki fb18c3c8ff bcm53xx: refresh Linux 4.4 config
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years ago
Rafał Miłecki f24cb34239 bcm53xx: image: use one style of adding TARGET_DEVICES entries
It just makes code consistent. This trivial change may be a 17.01
candidate to provide simpler backporting experience.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years ago
Rafał Miłecki e991b0d741 kernel: merge b53 API patch with the one handling all switch drivers
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years ago
Felix Fietkau 91fce81df6 kernel: add missing config symbols for 4.9
Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Felix Fietkau 478be1d371 kernel: fix crashlog build error on 4.9
Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Felix Fietkau 9c18235b3a kernel: add compile fix for linux 4.9 on x86
Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Rafał Miłecki b008357960 kernel: port b53 to use kernel 4.5+ API
For backward 4.4 compatibility I added patch reverting my changes.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years ago
Rafał Miłecki 26bc05eda9 bcm53xx: move bcm47xx_sprom driver to 4.4 specific directory
In kernel 4.9 it's already present so we don't want to overwite it (with
older & API incompatible version).

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years ago
Rafał Miłecki 2252627b0e bcm53xx: add Linux 4.9 patches
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years ago
Rafał Miłecki 75d48d80c7 bcm53xx: backport upstream DTS files for Linksys devices
We dont't build officialy images for them yet due to partitioning
issues.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years ago
Stijn Tintel d2c4041f02 kernel: update kernel 4.4 to version 4.4.47
Refresh patches for all targets that support kernel 4.4.
Compile-tested on all targets that use kernel 4.4 and aren't marked
broken, except arc770 and arch38 due to broken toolchain.

Runtime-tested on ar71xx, octeon, ramips and x86/64.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
7 years ago
Kristian Evensen bb7068f26c ramips: add support for Sanlinking D240
The Sanlinking Technologies D240
(http://www.sanlinking.com/en/29-dual-4g-wifi-router.html) is basically the same
device as the ZBT WE826, so adding support for it in LEDE is straight forward.
The differences is that the D240 has two mini-PCIe slots (instead of one), blue
LEDs and supports PoE.

Specification:
* CPU: MT7620A
* 1x 10/100Mbps POE (802.3af/802.3at) Ethernet, 4x 10/100Mbps.
* 16 MB Flash.
* 128 MB RAM.
* 1x USB 2.0 port.
* 2x mini-PCIe slots.
* 2x SIM slots.
* 1x 2.4Ghz WIFI.
* 1x button.

Wifi, USB, switch and both mini-PCIe slots are working. I have not been able to
test the SD card reader.

The device comes pre-installed with an older version of OpenWRT, including Luci.
In order to install LEDE, you need to follow the existing procedure for updating
OpenWRT/LEDE using Luci. I.e., you need to access the UI and update the firmware
using the sysupgrade-image. Remember to select that you do not want to keep
existing settings. The default router address is 192.168.10.1 and
username/password admin/root (at least on my devices).

If you brick the device, the procedure for recovery is the same as for the
WE826. Please see the wiki page for that device for instructions.

Signed-off-by: Kristian Evensen <kristian.evensen@gmail.com>
7 years ago
Felix Fietkau f791fb4af4 kernel: add linux 4.9 support
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Tim Harvey <tharvey@gateworks.com> [fixes]
7 years ago