Commit Graph

20362 Commits (9601d94138de66e4fc9f55a08dfb348cdfcc3181)

Author SHA1 Message Date
INAGAKI Hiroshi 3198ec5b9d ipq806x: fix and cleanup dts for NEC WG2600HP
This commit fixes and cleanups qcom-ipq8064-wg2600hp.dts to improve the
support for WG2600HP.

- Use dt label in qcom-ipq8064.dtsi:

  - gmac1
  - gmac2
  - gsbi4
    - gsbi4_serial
  - gsbi5
  - hs_phy_0
  - ss_phy_0
  - usb3_0
  - usb3_1
  - pcie0
  - pcie1
  - qcom_pinmux

- Fix wrong pcie reset (perst) gpios

  - drop reset-gpio and use perst-gpios in qcom-ipq8064.dtsi

- Remove unnecessary dt label from device dts

  - flash
  - phy0, phy4

- Rename spi-nor node to "flash" from "m25p80"

- Fix qca,ar8327-initvals

  - use oem settings

    - fix: PAD0_MODE, PAD6_MODE
    - drop: PAD5_MODE (unnecessary)

- Move mtd partitions under partitions (fixed-partitions) node

- Specify "firmware" partition format

  - WG2600HP uses uImage format (denx,uimage)

- Change failsafe status LED to power_red

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
5 years ago
Mathias Kresin 0fdfdaef2d ath79: fix dtc compiler warnings
The qca9557/qca956x reset-controller aren't a simple bus. A simple bus
would require node unit addresses.

Add the node unit addresses for the qca9557 usb phys. Add the regs for
the USB_PWRCTL and USB_CONFIG registers even not yet used.

Fix the wrong ar7100 pcie controller node unit address as well.

Signed-off-by: Mathias Kresin <dev@kresin.me>
5 years ago
Mathias Kresin 35f70774b8 ramips: drop old image validation code
Due to the enforced image metadata we ensure that the correct image is
uploaded. Checks based on a magic arn't required any more.

Signed-off-by: Mathias Kresin <dev@kresin.me>
5 years ago
Mathias Kresin 1a5df6add7 ramips: enforce image metadata verification
Now that we got rid of all legacy images, we can enforce image metadata
verification.

Signed-off-by: Mathias Kresin <dev@kresin.me>
5 years ago
Mathias Kresin 8e40fbff0b ramips: drop support for ALLNET ALL0239-3G and Sitecom WL-341 v3
Beside one exception, no one took care of these two remaining boards
still using the legacy image build code during the last two years.

Since OpenWrt 14.07 the ALLNET ALL0239-3G image building is broken.

The Sitecom WL-341 v3 image build code looks pretty hackish and broken.
It's questionable if the legacy image works as all.

Signed-off-by: Mathias Kresin <dev@kresin.me>
5 years ago
Mathias Kresin 262b885b83 ramips: use new image build code for D-Link DCS-930 family
Drop the factory images and the firmware tool to create them. They don't
work any more, since the factory image has an uImage header covering the
whole kernel + rootfs. This way the uImage splitter will not be able to
find the rootfs and the kernel will panic later on.

The factory images were most likely added at a time the board had
distinct partitions for kernel and rootfs.

Signed-off-by: Mathias Kresin <dev@kresin.me>
5 years ago
Daniel Gonzalez Cabanelas 26d4cb2ca7 brcm63xx: HG655b: fix the imagetag at dts
Fix the imagetag on the HG655b to allow a correct partition detection at boot time.

It turns out that it was defined at the wrong partition. Just move the imagetag to
the linux firmware partition.

The bug is present since the 18.06 release. Without this fix, the board won't boot.

Fixes: a27d59bb42 ("brcm63xx: switch to new partition layout specification")
Signed-off-by: Daniel Gonzalez Cabanelas <dgcbueu@gmail.com>
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
5 years ago
Jonas Gorski e08ef42b24 brcm63xx: fix ethernet switch core reset mask for BCM6368
The reset mask for the bcm6368 switch core was left at 0 due to a copy &
paste error. Fix this by setting it to the correct value.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
5 years ago
Jonas Gorski 620b36c1b5 brcm63xx: drop legacy profile for SR102
Remove the sky.mk causing a duplicate device profile to be added in
image builder. The generic device code already generates a profile for
the device.

Fixes FS#1780.

Fixes: d591260407 ("brcm63xx: initial support for Sky SR102 router")
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
5 years ago
Koen Vandeputte ecc6f3ff76 kernel: add missing symbol in some 4.9 subtargets
Buildbot revealed some subtargets are still missing the new symbol.

Fixes: dfbf836a52 ("kernel: bump 4.9 to 4.9.143")
Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Koen Vandeputte f6e9f23771 kernel: bump 4.14 to 4.14.87
Refreshed all patches.

Remove upstreamed:
- 0008-MIPS-ralink-Fix-mt7620-nd_sd-pinmux.patch

Compile-tested: cns3xxx, imx6
Runtime-tested: cns3xxx, imx6

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Koen Vandeputte 861dcd717f kernel: bump 4.9 to 4.9.144
Refreshed all patches.

Remove upstreamed:
- 014-Kbuild-suppress-packed-not-aligned-warning-for-defau.patch

Compile-tested: ar7, brcm2708
Runtime-tested: none

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Koen Vandeputte 0028f86687 kernel: bump 4.14 to 4.14.86
Refreshed all patches.

Altered patches:
- 180-usb-xhci-add-support-for-performing-fake-doorbell.patch

Compile-tested on: ar71xx, cns3xxx, imx6
Runtime-tested on: ar71xx, cns3xxx, imx6

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Koen Vandeputte dfbf836a52 kernel: bump 4.9 to 4.9.143
Refreshed all patches.

Altered patches:
- 950-0063-Improve-__copy_to_user-and-__copy_from_user-performa.patch
- 201-extra_optimization.patch

New symbol:
- CONFIG_HARDEN_BRANCH_PREDICTOR

Compile-tested on: ar7, at91, brcm2708, ixp4xx, layerscape, orion
Runtime-tested on: none

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
[fix brcm2708/950-0149-Update-vfpmodule.c.patch]
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
5 years ago
Koen Vandeputte 4e38fc824c kernel: bump 3.18 to 3.18.128
Refreshed all patches.

Altered patches:
- 002-phy_drivers_backport.patch

Compile-tested on: adm5120
Runtime-tested on: none

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Christian Lamparter 0bce89037f apm821xx: WNDAP620: remove bad semicolon in dts after #include
This patch fixes a build warning triggered by a semicolon in
the dts after the #include directive.

netgear-wndap620.dts:11:33: warning: extra tokens at end of #include directive

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
5 years ago
Christian Lamparter bd3e234473 apm821xx: move fifo-entry-size property to WNDR4700
This property (and value) came from Netgear's WNDR4700
stock firmware dts. However, other devices do not set
it and the EMAC default is 16, which matches that of
the programming notes of the APM82181 spec.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
5 years ago
Rafał Miłecki 4d3a53b9ef kernel: add DT binding support to the TRX and minor parsers
It allows specifying those parsers directly in the DT.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
5 years ago
Russell Senior ed000fcaf2 ramips: fix firmware compatible string for dir860l-b1
In commit d70ec3008d, a firmware compatible
string of "denx,uimage" was added for the Dlink DIR-860L-B1. Unfortunately,
this was the wrong string. It needs "seama" instead.

Signed-off-by: Russell Senior <russell@personaltelco.net>
5 years ago
Romain MARIADASSOU 02494fa35c
Add support for TL-WA801ND v4
This add support for TP-Link TL-WA801ND v4 (same as TL-WA801ND v3) :

Specification:

- System-On-Chip: Qualcomm Atheros QCA9533
- CPU/Speed: 650 MHz
- Flash-Chip: Winbond W25Q32BVSIG
- Flash size: 4096 KiB
- RAM: 32 MiB
- Wireless No1: SoC-integrated: QCA9533 2.4GHz 802.11bgn

Flash instructions:

1) To flash the image, rename the file
   openwrt-ar71xx-generic-tl-wa801nd-v4-squashfs-factory.bin
   to firmware.bin
2) Connect your device to the LAN port, then upload the firmware
   through web interface. It will try to download the image and
   flash it.

It can take up to 2-3 minutes to finish. When it reaches 100%, the
router will reboot itself.

Signed-off-by: Romain MARIADASSOU <roms2000@free.fr>
5 years ago
Daniel F. Dickinson 32bc733796 ath79: dts: Use PowerCloud CAP324 bicolor status LED
PowerCloud Systems CAP324 has a bicolor power LED and OpenWrt DTS files /
base files support using both colours to better inform user of state
and to better match stock firmware, so use green power to indicate
normal operation.

Signed-off-by: Daniel F. Dickinson <cshored@thecshore.com>
5 years ago
INAGAKI Hiroshi 3358cae523 ath79: add support for I-O DATA WN-AG300DGR
I-O DATA WN-AG300DGR is a 2T2R 2.4/5 GHz 11n router, based on Atheros
AR1022.

WN-AG300DGR does not have an LED to indicates power or system status,
I set "router" LED as OpenWrt status LED.

There is no eeprom data for 5 GHz wlan in "art" partition.

Specification:

- Atheros AR1022
- 64 MB of RAM (DDR2)
- 8 MB of Flash (SPI-NOR)
- 2T2R 2.4/5GHz wifi
  - 2.4 GHz: SoC internal
  - 5 GHz: Atheros AR93x2
- 5x 10/100/1000 Mbps Ethernet
- 6x LEDs, 6x keys (4x buttons, 1x slide switch)
- 1x USB 2.0 Type-A
- UART through-hole on PCB
  - Vcc, GND, TX, RX from ethernet port side
  - 115200n8

Flash instruction using factory image:

1. Connect the computer to the LAN port on WN-AG300DGR
2. Connect power cable to WN-AG300DGR and turn it
3. Access to "http://192.168.0.1/" and open firmware update page
("ファームウェア")
4. Select the OpenWrt factory image and click update ("更新") button
5. Wait ~150 seconds to complete flashing

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
5 years ago
Chuanhong Guo 9dd7147f6b ath79: add support for Winchannel WB2000
WB2000 is a dual-band 11N AP using AR9344.
The factory firmware used the original DB120 partition table
with a small kernel partition at the end of firmware and the
kernel will easily get oversized in the future. Since it has
to be flashed using UART I also swapped kernel/rootfs and
changed the default load address.

Specification:

- SoC: Atheros AR9344
- RAM: 128 MB
- Flash: 16 MB
- Ethernet: 10/100/1000 Mbps (Atheros AR8035)
- 2x USB 2.0
- WIFI: AR9344(2G) + AR9382(5G)
- RTC: DS1338

Known issue:
5G ath9k led doesn't work due to commit ccab68f.

Flash instruction:
Set up a TFTP server on your computer and configure static IP.
Connect UART (J11 TX/GND/RX) and press any key to enter U-boot
shell.
1. Change the default boot command:
   setenv bootcmd 'bootm 0x9f050000 || bootm 0x9fd50000'
   saveenv
2. Set your router ipaddr and server ipaddr. e.g.:
   setenv ipaddr 192.168.1.1
   setenv serverip 192.168.1.50
3. Load and flash the firmware:
   tftp 0x80060000 fw.bin
   erase 0x9f050000 +$filesize
   cp.b $fileaddr 0x9f050000 $filesize
4. Reset your router:
   reset

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
[Drop the i2c node unit address. Move the ath9k-leds node out of the spi
node, it doesn't belong there. Add the #gpio-cells property to the pci
wifi node. All fix dtc compiler warnings]
Signed-off-by: Mathias Kresin <dev@kresin.me>

merge
5 years ago
INAGAKI Hiroshi e0c55760e6 ath79: fix ethernet configurations for I-O DATA ETG3-R
This commit fixes several issues in eth0 on ETG3-R, and solve slowdown
in NA(P)T speed.

- add gmac-config with correct configurations
- fix pll-data value

And I added ref clock-frequency.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
5 years ago
Mathias Kresin 6e626477d5 ath79: drop unused mtd splitter
Neither the seama nor the wrgg splitter are used at the moment. Drop
them for now to not bloat the target from the beginning.

Signed-off-by: Mathias Kresin <dev@kresin.me>
5 years ago
Mathias Kresin dacd962cfd ath79: remove duplicate image build variables
Remove image build variables which are set to the same value as the
default image build recipe.

Signed-off-by: Mathias Kresin <dev@kresin.me>
5 years ago
Mathias Kresin 9d8fcab77a ath79: fix GL.iNet GL-AR300M sysupgrade
The userspace boardname derived from the dts compatible was out of sync
with the expected board added to the image metadata. This way a
sysupgrade is refused.

Sync the userspace boardname and the baordname used in the image metdata
to allow a seamless sasupgrade.

Signed-off-by: Mathias Kresin <dev@kresin.me>
5 years ago
Mathias Kresin 8d6f128d39 ath79: add SoC or family compatible
Add missing SoC specific compatibles and/or inherit the family
compatibles like "ubnt,xm".

Signed-off-by: Mathias Kresin <dev@kresin.me>
5 years ago
David Bauer adfc8d8eca ath79: add AVM EVA firmware partition compatible
This commit adds firmware partition compatible for the
AVM FRITZ!Box 4020 and AVM FRITZ!WLAN Repeater 300E.

This allows to select the correct mtdsplit parser
instead of trying all available ones one by one.

Signed-off-by: David Bauer <mail@david-bauer.net>
5 years ago
Petr Štetiar bc41fb7efe ath79: Define firmware partition format to all boards where applicable
Parsing "firmware" partition (to create kernel + rootfs) was implemented
using OpenWrt downstream code enabled by CONFIG_MTD_SPLIT_FIRMWARE. With
recent upstream mtd changes we can do it in a more clean way for DTS
targets. It just requires adding a proper "compatible" string to the
"firmware" partition node.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years ago
Mathias Kresin ffa55386f1 ramips: fix dtc compiler warnings
The latest dtc compiler considers nodes named i2c or spi as the
respective bus:

  /pinctrl/i2c: incorrect #address-cells for I2C bus
  /pinctrl/spi: incorrect #address-cells for SPI bus

Rename the node to fix the false positives.

Fix the spi node unit address for the DWR-512-B and UBNT-ER-e50 to get
rid of the following warning:

  SPI bus unit address format error, expected "n"

Signed-off-by: Mathias Kresin <dev@kresin.me>
5 years ago
Chen Minqiang 295b37d207 ramips: mt76x8: select only the matching mt76 driver
Select the matching mt76 driver for the PCI wireless of the following
devices:

 - HiWiFi HC5861B
 - Mercury MAC1200R v2.0
 - Netgear AC1200 R6120
 - Buffalo WCR-1166DS
 - ZyXEL Keenetic Extra II
 - Wavlink WL-WN575A3

Because every device has selected the corresponding mt76 driver, we can
include kmod-mt7603 instead of the mt76 metapackage, which used for the
wireless of the mt7628 and mt7688 WiSoC.

Signed-off-by: Chen Minqiang <ptpt52@gmail.com>
[select kmod-mt7603 as target default package, add wireless driver for
WL-WN575A3]
Signed-off-by: Mathias Kresin <dev@kresin.me>
5 years ago
Chuanhong Guo c36ec336a3 ath79: rename qca9533.dtsi to qca953x.dtsi
qca9533 is a costdown version of qca9531 which doesn't have USB and PCIE.
Rename the misleading dtsi names and fix the SoC type of gl-ar300m.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
[apply the changes for the gl-x750 as well]
Signed-off-by: Mathias Kresin <dev@kresin.me>
5 years ago
Chuanhong Guo 5563d49a39 ramips: disable sdhc for HC5661A
Currently OpenWrt doesn't support switching MT7628 into AP mode
(which is done by writing some undocumented registers in MTK SDK)
Without doing so, enabling SD breaks 4 FE ports and the SD controller
doesn't work since SD pins aren't configured correctly.

Disable SDHC on HC5661A to recover the 4 FE ports.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
[drop the sdhci node completely]
Signed-off-by: Mathias Kresin <dev@kresin.me>
5 years ago
Petr Štetiar 9da6cd40eb apm821xx, ath79, ipq40xx, ipq806x, lantiq, ramips: base-files: Use generic diag.sh
I wanted to add status LEDs support to my imx6 based board and have found out,
that I could use diag.sh script found in ramips platform, which seems to be
also shared in a few other platforms:

 4801276bc2078c5bcf03003c831e3b0a target/linux/ramips/base-files/etc/diag.sh
 4801276bc2078c5bcf03003c831e3b0a target/linux/ipq40xx/base-files/etc/diag.sh
 4801276bc2078c5bcf03003c831e3b0a target/linux/ath79/base-files/etc/diag.sh

And @chunkeey suggested to me, that I can also add lantiq, ipq806x and
apm821xx to the list of platforms which could share this generic
diag.sh.

I've extended the base diag.sh in a way, that if it detects any of the
DTS LED aliases, then it would use the generic DTS set_led_state code.
The code in platform's diag.sh has moved to base-files package in this
commit:

 base-files: diag.sh: Make it more generic towards DTS so it could be reused

Signed-off-by: Petr Štetiar <ynezz@true.cz>
Tested-by: Christian Lamparter <chunkeey@gmail.com> (apm821xx and ipq40xx)
5 years ago
David Bauer 68e59b61c6 kernel: add DT binding support to AVM EVA parser
It allows selecting split-firmware parser directly by
specifying image-format in the device-tree.

Signed-off-by: David Bauer <mail@david-bauer.net>
5 years ago
Jonathan Thibault e93e2b6318 octeon: Evaluate board names in alphabetical order
Signed-off-by: Jonathan Thibault <jonathan@navigue.com>
5 years ago
Ram Chandra Jangir 9ed180b000 ipq806x: dts: Add support for RGMII RX and TX clock delays
This change enables support to select phy4 in RGMII mode and
enables RGMII TX/RX clock internal delays.

Signed-off-by: Ram Chandra Jangir <rjangir@codeaurora.org>
5 years ago
Ram Chandra Jangir bf7719f22c kernel: ar83xx: Add support for three GMAC's connection
We have IPQ8064 AP161 board which has three GMAC's
 * RGMII x2
 * SGMII x1.
The existing ar8327 driver does not have support for
three GMAC's connection, hence this change adds support
for the same. This has been verified on AP148 and AP161
board.

Signed-off-by: xiaofeis <xiaofeis@codeaurora.org>
Signed-off-by: Ram Chandra Jangir <rjangir@codeaurora.org>
5 years ago
Daniel Halmschlager 99e212171a ar71xx: Add usb drivers in Archer C7 v4/v5 images
This commit adds the default usb packages
- kmod-usb-core
- kmod-usb2
- kmod-usb-ledtrig-usbport
for Archer C7 v4 and v5.
(The C7 v5 configuration is based on the v4, therefore the change for v4
also applies for v5.)

Signed-off-by: Daniel Halmschlager <dh@dev.halms.at>
5 years ago
Marek Lindner 8ad45992ac ipq40xx: fix openmesh sysupgrade with tar content out of order
The tar extraction depends on the order in which the files
are added to the tar file. Since the order is not guaranteed
and depends on the host system, the combined mtd write fails
with sysupgrade images built on some systems.
Fix by changing to tar file order independent mtd write.

Fixes: 86e18f6706 ("ipq806x: add support for OpenMesh A42")
Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
5 years ago
Steven Lin 2b4ac79a79 ipq40xx: add support for EnGenius EAP1300
SOC:    IPQ4018 / QCA Dakota
CPU:    Quad-Core ARMv7 Processor rev 5 (v7l) Cortex-A7
DRAM:   256 MiB
NOR:    32 MiB
ETH:    Qualcomm Atheros QCA8072
WLAN1:  Qualcomm Atheros QCA4018 2.4GHz 802.11bgn 2:2x2
WLAN2:  Qualcomm Atheros QCA4018 5GHz 802.11a/n/ac 2:2x2
INPUT:  RESET Button
LEDS:   Power, LAN, MESH, WLAN 2.4GHz, WLAN 5GHz

1. Load Ramdisk via U-Boot

To set up the flash memory environment, do the following:
a. As a preliminary step, ensure that the board console port is connected to the PC using these RS232 parameters:
   * 115200bps
   * 8N1
b. Confirm that the PC is connected to the board using one of the Ethernet ports. Set a static ip 192.168.99.8 for Ethernet that connects to board. The PC must have a TFTP server launched and listening on the interface to which the board is connected. At this stage power up the board and, after a few seconds, press 4 and then any key during the countdown.

U-BOOT> set serverip 192.168.99.8 && set ipaddr 192.168.99.9 && tftpboot 0x84000000 openwrt.itb && bootm

2. Load image via GUI

a. Upgrade EAP1300 to FW v3.5.3.2
In the GUI, System Manager > Firmware > Firmware Upgrade, to do upgrade.
b. Transfer to OpenWrt from EnGenius.
In Firmware Upgrade page, to upgrade yours openwrt-ipq40xx-engenius_eap1300-squashfs-sysupgrade.bin.

3. Revert to EnGenius EAP1300
To flash openwrt-ipq40xx-engenius_eap1300-squashfs-factory.bin by using sysupgrade command and "DO NOT" keep configuration.
$ sysupgrade –n openwrt-ipq40xx-engenius_eap1300-squashfs-factory.bin

Signed-off-by: Steven Lin <steven.lin@senao.com>
5 years ago
Stijn Tintel e261c8b764 brcm2708-gpu-fw: add fw required for camera module
To be able to use the camera module, start_x=1 has to be set in
config.txt. This will cause the bootloader to load the GPU firmware that
contain the extra video codecs. Install these firmware files.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
5 years ago
Stijn Tintel 93a14b8f2a kernel: add missing symbol
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
5 years ago
Mathias Kresin f381cbcb5f ramips: fix Netgear EX3700/EX3800 wireless driver selection
Fix the typo to select kmod-mt76x2.

Signed-off-by: Mathias Kresin <dev@kresin.me>
5 years ago
Rafał Miłecki f98fde2db4 Revert "kernel: use add_mtd_partitions() helper when using OpenWrt parsers"
This reverts commit 7e88753ace.

Using subpartitions (hierarchical layout) resulted in calling MTD ops of
parent partition instead of master device ops. That was expected and
should work but testing revealed some bugs.

Apparently the way MTD_ERASE_PARTIAL is implemented in the OpenWrt
breaks something and using parent partition ops triggers using that
code.

On SmartRG SR400ac it was resulting in:
[  225.487519] jffs2: Erase at 0x01ac0000 failed immediately: errno -22
on the second boot (for some reason erasing was starting over) and it
was breaking flash access in a long term.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
6 years ago
Pawel Dembicki e9a9b7d1ed ramips: add support for D-Link DWR-118-A1
The DWR-118-A1 Wireless Router is based on the MT7620A SoC.

Specification:

- MediaTek MT7620A (580 Mhz)
- 64 MB of RAM
- 16 MB of FLASH
- 1x 802.11bgn radio
- 1x 802.11ac radio (MT7610EN)
- 3x 10/100 Mbps Ethernet (3 LAN)
- 2x 10/100/1000 Mbps ICPlus IP1001 Ethernet PHY (1 WAN AND 1 LAN)
- 1x internal, non-detachable antenna
- 2x external, non-detachable antennas
- 1x USB 2.0
- UART (J1) header on PCB (57600 8n1)
- 7x LED (5x GPIO-controlled), 2x button
- JBOOT bootloader

Known issues:
- WIFI 5G LED not working
- flash is very slow

The status led has been assigned to the dwr-118-a1:green:internet led.
At the end of the boot it is switched off and is available for other
operation. Work correctly also during sysupgrade operation.

Installation:
Apply factory image via http web-gui or JBOOT recovery page

How to revert to OEM firmware:
- push the reset button and turn on the power. Wait until LED start
  blinking (~10sec.)
- upload original factory image via JBOOT http (IP: 192.168.123.254)

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
6 years ago
Chen Minqiang 40692f0fb5 ramips: mt7620: select only the matching mt76 driver
Because every device has selected the corresponding mt76 driver, we can
now disable the mt76 metapackage by default to make sure that other
devices (those don't need mt76) avoid selecting unwanted packages.

We can find the hardware specifies and determine the dependencies on
these sites:
  https://wikidevi.com/wiki/
  https://openwrt.org/toh/hwdata/

Signed-off-by: Chen Minqiang <ptpt52@gmail.com>
6 years ago
Chen Minqiang 7a32a73e52 ramips: mt7620: drop mt76 driver for boards without mt76 wireless
These boards don't have a mt76 wireless at all and don't need any of the
mt76 family drivers.

Signed-off-by: Chen Minqiang <ptpt52@gmail.com>
6 years ago
Mathias Kresin 55101877d3 ramips: mt7620: disable PCIe if nothing is attached
All boards neither expose the PCIe as Mini-PCIe nor have anything
attached to the PCIe Bus. Disable PCIe for those by dropping the node
from the dts files.

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Chen Minqiang 14b81c909f ramips: mt7620: add missing pci wifi nodes to dts files
These devices has pci wifi but not defined in dts:
 HC5761
 HC5861
 TINY-AC

Signed-off-by: Chen Minqiang <ptpt52@gmail.com>
6 years ago
Rafał Miłecki 7e88753ace kernel: use add_mtd_partitions() helper when using OpenWrt parsers
This helper uses hierarchical partitions layout following the way
upstream parsers work. It's closer to what we should use when mainlining
our solutions. It also doesn't require hacky casting of struct
mtd_partition to the const.

THIS WILL AFFECT KERNEL PRINTING PARTITIONS IN THE LOG

Something like:
[    3.930158] 0x0000004e0000-0x000001fb0000 : "rootfs_data"
will get replaced by:
[    3.907338] Creating 1 MTD partitions on "rootfs":
[    3.912142] 0x00000031d400-0x000001ded400 : "rootfs_data"

It's important to understand that "rootfs_data" in above example is a
*subpartition* of the "rootfs" now. To get absolute addresses (e.g. for
some debugging purposes) one has to add them to the "rootfs", e.g.
[    3.912548] 0x0000001c2c00-0x000001fb0000 : "rootfs"

(0x1c2c00 + 0x31d400 = 0x4e0000)

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
6 years ago
Rafał Miłecki e24983e710 kernel: backport 2 mtd partitioning fixes
This improves handling of subpartitions.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
6 years ago
Russell Senior 73127a878d ath79: add support for Ubiquiti AirRouter
Indoor low-power router with 2.4 GHz radio

CPU:    Atheros AR7241 rev 1
RAM:    32 MB
Flash:  8 MB NOR SPI
Switch: Atheros AR7240
Ports:  1x WAN, 4x LAN 10/100 Ethernet
WLAN:   Atheros AR9285 (2.4 GHz)
USB:    1x USB2 host port

Note: Ethernet WAN/LAN port naming is reversed from ar71xx.
WAN is eth0; LAN is eth1.1.

UART settings: 115200, 8N1

                LEDs
        +--------------------------
        |
        |
        |
        |
        |
        |
        |
        |
    VCC | x x
     RX | * x
        | x x
        | x x
     TX | * x
    GND | * x
        |
        |
        |
        |
        +--------------------------
                ETHERNET PORTS

Installation from Ubiquiti firmware, is as for other ubnt-xm AirOs devices.

Signed-off-by: Russell Senior <russell@personaltelco.net>
6 years ago
Russell Senior 20ec6af15e ath79: split ubnt outdoor device leds into separate dtsi
Move common LED configuration into a separate includible dtsi.

Signed-off-by: Russell Senior <russell@personaltelco.net>
6 years ago
Tomasz Maciej Nowak c288ad9c2b x86: make sysupgrade.tgz reachable again
Moving binding mount before check for saved sysupgrade configuration
made it unreachable. Fix it by moving binding mount after the check.

Fixes: f78b2616 (x86: mount writable bootfs)
Reported-by: Lucian Cristian <luci@powerneth.ro>
Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
6 years ago
Mathias Kresin 78ca6a5578 ramips: merge relocate compile into build recipe
Compile the loader if the relocate-kernel image recipe is used and get
rid of the legacy build code to do so.

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Pawel Dembicki 465d57370f ramips: specify "firmware" partition format in JBOOT devices
Specify firmware partition format by compatible string.

List of devices:
-DWR-116-A1
-DWR-118-A2
-DWR-512-B
-DWR-921-C1
-LR-25G001

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
6 years ago
Pawel Dembicki b5597d5cc9 kernel: add DT binding support to the jimage parser
It allows specifying jimage parser directly in the DT.

Tested on LAVA LR-25G001

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
6 years ago
Valentín Kivachuk 30a7ab8f61 ramips: add support for MTC Wireless Router WR1201
MTC Wireless Router WR1201 is the OEM name of the board. It is also sold
rebranded as STRONG Dual Band Gigabit Router 1200.

Specification:
- SoC: MediaTek MT7621A (880 MHz)
- Flash: 16 MiB
- RAM: 128 MiB
- Wireless: 2.4Ghz(MT7602EN) and 5Ghz (MT7612EN)
- Ethernet speed: 10/100/1000
- Ethernet ports: 4+1
- 1x USB 3.0
- 1x microSD reader
- Serial baud rate of Bootloader and factory firmware: 57600

The OEM webinterface writes only as much bytes as listed in the
uImage header field to the flash. Also, the OEM webinterface
evaluates the name field of uImage header before flashing (the
string "WR1201_8_128")

To flash via webinterface, is mandatory to use first initramfs.bin
and after (from the OpenWrt) the sysupgrade.bin

Some notes:
- Some microSD will not work:

  mtk-sd 1e130000.sdhci: no support for card's volts
  mmc0: error -22 whilst initialising SDIO card
  mtk-sd 1e130000.sdhci: no support for card's volts
  mmc0: error -22 whilst initialising MMC card
  mtk-sd 1e130000.sdhci: no support for card's volts
  mmc0: error -22 whilst initialising SDIO card
  mtk-sd 1e130000.sdhci: card claims to support voltages below defined range
  mtk-sd 1e130000.sdhci: no support for card's volts
  mmc0: error -22 whilst initialising MMC card
  mtk-sd 1e130000.sdhci: no support for card's volts
  mmc0: error -22 whilst initialising SDIO card
  mtk-sd 1e130000.sdhci: no support for card's volts
  mmc0: error -22 whilst initialising MMC card

Signed-off-by: Valentín Kivachuk <vk18496@gmail.com>
6 years ago
INAGAKI Hiroshi d70ec3008d ramips: specify "firmware" partition format
Specify firmware partition format by compatible string.

formats in ramips:

- denx,uimage
- tplink,firmware
- seama

It's unlikely but the firmware splitting might not work any longer for
the following boards, due to a custom header:

- EX2700: two uImage headers
- BR-6478AC-V2: edimax-header
- 3G-6200N: edimax-header
- 3G-6200NL: edimax-header
- BR-6475ND: edimax-header
- TEW-638APB-V2: umedia-header
- RT-N56U: mkrtn56uimg

But it rather looks like the uImage splitter is fine with the extra
header.

The following dts are not touched, due to lack of a compatible string in
the matching firmware splitter submodule:

- CONFIG_MTD_SPLIT_JIMAGE_FW
    DWR-116-A1.dts
    DWR-118-A2.dts
    DWR-512-B.dts
    DWR-921-C1.dts
    LR-25G001.dts
- CONFIG_MTD_SPLIT_TRX_FW
    WCR-1166DS.dts
    WSR-1166.dts
- CONFIG_MTD_SPLIT_MINOR_FW
    RBM11G.dts
    RBM33G.dts
- CONFIG_MTD_SPLIT_LZMA_FW
    AR670W.dts
- CONFIG_MTD_SPLIT_WRGG_FW
    DAP-1522-A1.dts

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
6 years ago
Mathias Kresin 1977be8bd0 ramips: unifiy sysupgrade file extensions
Use .bin as file extension where possible. The user doesn't need to that
sysupgrade images for NAND boards are tarballs.

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Mathias Kresin 7f00123d63 ramips: remove duplicate image build variables
Remove image build variables which are set to the same value as the
default image build recipe.

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Petr Štetiar 221d3e0234 ramips: bdcom-wap2100: Change DTS license to GPL-2.0-or-later OR MIT
Having MIT as alternative is sometimes preferred by upstream maintainers
and allows sharing that simple code with other projects. We don't really
want multiple DTS versions for the same device.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
6 years ago
Petr Štetiar 1576666d67 ath79: ubnt-xw: Change DTS license to GPL-2.0-or-later OR MIT
Having MIT as alternative is sometimes preferred by upstream maintainers
and allows sharing that simple code with other projects. We don't really
want multiple DTS versions for the same device.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
6 years ago
Petr Štetiar 9f563267d2 ath79: ubnt-bullet-m-xw: Change DTS license to GPL-2.0-or-later OR MIT
Having MIT as alternative is sometimes preferred by upstream maintainers
and allows sharing that simple code with other projects. We don't really
want multiple DTS versions for the same device.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
6 years ago
Felix Fietkau 5c9ad4fa6e ramips: fix MTD EEPROM offset for TL-WR840N v5
The previous offset was invalid and pointed to the end of the partition,
which was causing issues with mt76

Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years ago
Karl Vogel ae980458ab sdk: find kernel modules when KDIR is a symlink
The find statement would not return any results if the KDIR_BASE pointed to a
symlink. Ran into this issue due to a custom Kernel/Prepare that was installing
a symlink to the kernel directory.

The extra slash at the end fixes this scenario and does no harm for targets that
have a proper KDIR.

Signed-off-by: Karl Vogel <karl.vogel@gmail.com>
6 years ago
Petr Štetiar 8ba6e95eed ramips: bdcom-wap2100: Enable mt7610e 5GHz radio
The 5GHz radio of this device uses an mt7610e PCI-E chip, which has
been recently started to be supported.

 mt76x0e 0000:01:00.0: card - bus=0x1, slot = 0x0 irq=4
 mt76x0e 0000:01:00.0: ASIC revision: 76100002
 mt76x0e 0000:01:00.0: Firmware Version: 0.1.00
 mt76x0e 0000:01:00.0: EEPROM ver:01 fae:00

Signed-off-by: Petr Štetiar <ynezz@true.cz>
6 years ago
Petr Štetiar 26ad357192 ramips: bdcom-wap2100: Set firmware partition format to denx,uimage
Specify firmware partition format to denx,uimage in compatible DTS property.

 2 uimage-fw partitions found on MTD device firmware
 Creating 2 MTD partitions on "firmware":
 0x000000000000-0x00000017f72b : "kernel"
 0x00000017f72b-0x000000f70000 : "rootfs"

Signed-off-by: Petr Štetiar <ynezz@true.cz>
6 years ago
Petr Štetiar 795211093f ramips: bdcom-wap2100: Fix boot failure by adding partitions compatible property
Flash partitions were moved under partition table node, but addition of
compatible property was omitted which lead to following boot failure:

 VFS: Cannot open root device "(null)" or unknown-block(0,0): error -6
 Please append a correct "root=" boot option; here are the available partitions:
 1f00           16384 mtdblock0
  (driver?)
 Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)

Fixes: e4d9217f (ramips: improve BDCOM WAP2100-SK support)
Signed-off-by: Petr Štetiar <ynezz@true.cz>
6 years ago
Michael Heimpold e880a30549 mxs: use generic sysinfo board detection
Since we do nothing special for mxs based boards,
we can simply use the generic existing code.
We just need to convert scripts to use the DT
compatible strings.

Signed-off-by: Michael Heimpold <mhei@heimpold.de>
6 years ago
David Yang 824b580079 ramips: fix switch port order for HuaWei HG255D
The order of port marks and LEDs is reversed according to the board.

Signed-off-by: David Yang <mmyangfl@gmail.com>
6 years ago
Roger Pueyo Centelles cb6a8aa584 ramips: mt7620: add DIR-810L's mt7610e 5 GHz radio
The 5 GHz radio of this device uses an mt7610e pci-e chip, which has
been recently added support.

Tested on the actual device as AP and client, TCP throughput ~90 Mbps
U/D.

Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
6 years ago
Nishant Sharma df3e0b5806 ramips: add support for UniElec U7621-06-512M-64M variant
Add support for UniElec U7621-06 variant with 512MB RAM and 64MB flash.

Additional specs are below:

CPU: MT7621 (880Mhz)
Bootloader: Ralink U-Boot
Flash: 64MB
 - U-Boot identifies as Macronix MX66L51235F
 - kernel identifies as MX66L51235l (65536 Kbytes)
RAM: 512MB

Rest of the details as per commit 46ab81e405 ("ramips add support for
UniElec U7621-06")

Signed-off-by: Nishant Sharma <nishant@unmukti.in>
[use generic board detection, add firmware partition compatible, extend
firmware partition to use all of the remaining flash space, add a
maximum image size matching the firmware partition size]
Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Mathias Kresin 509d02a3d1 ramips: use generic board detection for Unielec u7621-06
Use the generic board detection for the board instead of the target
specific one. Mark the sysupgrade image compatible with the former used
userspace boardname to allow an upgrade from earlier versions.

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Thomas Vincent-Cross a160f50d4f ramips: add support for Wavlink WL-WN570HA1
This commit adds support for the Wavlink WL-WN570HA1, a dual-band PoE
wireless router with the following specifications:

 - CPU: MediaTek MT7688AN 580MHz
 - Flash: 8MB
 - RAM: 64MB
 - Ethernet: 1x 10/100Mbps
 - 2.4 GHz: 802.11b/g/n SoC, 1T1R, 27 dBm
 - 5 GHz: 802.11a/n/ac MT7610E, 1T1R, 25 dBm
 - Antennas: 2x external (1 per radio), detachable
 - LEDs: 3 programmable + Wi-Fi, WAN/LAN, Power
 - Buttons: Reset

Flashing instructions:

Factory U-boot launches a TFTP client if reset button is pressed during power-on.
Rename the sysupgrade file and configure TFTP as follows:

 - Client (WL-WN570HA1) IP: 192.168.10.101
 - Server IP: 192.168.10.100
 - Filename: firmware.bin

Signed-off-by: Thomas Vincent-Cross <me@tvc.id.au>
[use generic board detection, add firmware partition compatible]
Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Rosy Song 31469aebd4 ath79: add support for ROSINSON WR818 board
This commit adds support for the ROSINSON WR818 WiFi-Router

SoC:    Qualcomm Atheros QCA9563,
FLASH:  Winbond W25Q128FV 16MBytes,
WiFi:   QCA9563 b/g/n 3x3 450Mbit/s,
USB:    1x USB 2.0 Type A, 1x USB2.0 Type C,
IN:     WPS/Reset button GPIO1,
OUT:    Power LED red, Internet LED red, WLAN LED red,
        LAN1 LED red, LAN2 LED red, System LED red,
UART:   RX-GPIO18, TX-GPIO22,

Tested and working:
    - Ethernet (LAN + WAN)
    - WiFi
    - OpenWRT sysupgrade
    - Button
    - LEDs

Installation of OpenWRT from vendor firmware:
    - Connect to the Web-interface at http://192.168.1.1
    - Go to "Administration" -> "Firmware Upgrade"
    - Upload the OpenWrt sysupgrade image

Signed-off-by: Rosy Song <rosysong@rosinson.com>
6 years ago
Mathias Kresin 7574781337 ath79: merge glinet gl-x750 dtsi and dts
The board doesn't come in different flash type flavours, hence there is
no need to keep a dtsi + dts for this purpose.

While at it, fix some whitespace issues.

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Mathias Kresin 68d77241cd ath79: rename glinet x750
The boardname is gl-x750 and is already used for the led names.

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Russell Senior e0def989e8 ramips: fix alphabetic ordering of skylab skw92a
Fix the alphabetic ordering of skylab skw92a in ramips_setup_interfaces.

Signed-off-by: Russell Senior <russell@personaltelco.net>
6 years ago
Matthias Badaire 1100ba43db ramips: fix RavPower WD03 SoC dtsi include
The RavPower WD03 is a mt7620n based baord. With the change applied, I2C
should work now with the RavPower WD03.

Signed-off-by: Matthias Badaire <mbadaire@gmail.com>
[reworded commit message]
Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
John Crispin c6aa4f53e8 Revert "x86: add intel microcode entries to grub config"
This reverts commit 546fced2a2.

Signed-off-by: John Crispin <john@phrozen.org>
6 years ago
John Crispin 8ead5a735d Revert "x86: add amd microcode entries to grub config"
This reverts commit a822283c7e.

Signed-off-by: John Crispin <john@phrozen.org>
6 years ago
David Bauer a734450d6f ath79: add Archer C58/C59 partition compatible
This commit adds firmware partition compatible for the
TP-Link Archer C58 v1 and Archer C59 v1.

Since a22311e this allows to select the correct mtdsplit
parser instead of trying all available ones one by one.

Signed-off-by: David Bauer <mail@david-bauer.net>
6 years ago
David Bauer df2e6b64d1 ath79: add firmware partition compatible for OCEDO
This commit adds firmware partition compatible for the
OCEDO Raccoon and OCEDO Koala.

Since a22311e this allows to select the correct mtdsplit
parser instead of trying all available ones one by one.

Signed-off-by: David Bauer <mail@david-bauer.net>
6 years ago
INAGAKI Hiroshi 37c848810c ath79: specify "firmware" partition format for I-O DATA devices
Specify firmware partition format (denx,uimage) by compatible string
for I-O DATA devices.

affected devices (&run tested)

- WN-AC1167DGR
- WN-AC1600DGR2

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
6 years ago
INAGAKI Hiroshi fa1a120a1a ath79: specify "firmware" partition format for ELECOM WRC-300GHBK2-I
Specify firmware partition format (denx,uimage) by compatible string
for ELECOM WRC-300GHBK2-I.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
6 years ago
Mathias Kresin f4abc962ec ath79: fix shebang
The shebang was accidentally changed with 9989fd5154 ("ath79: add
support for GL-iNet GL-X750").

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Mathias Kresin aa82fdf110 ramips: fix GB-PC1/PC2 build error
With ed25e3ac02 ("ramips: fix some clocks in mt7621.dtsi") the
cpuclock node was dropped from the mt7621.dtsi without removing the
references to this node from the GB-PC1/PC2 dts files.

Remove them now, to fix the build error.

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Mathias Kresin d7494f30f5 ramips: fix Lava LR-25G001 invalid led names
It has to be <board>:<colour>:<function> and is expected exactly this
way by the userspace scripts.

While at it, fix some whitespace issues in the dts file and rename the
flash node as required upstream.

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Günther Kelleter 33878b0a40 kernel: ar8xxx: get_arl_table now shows all ports of an entry
Multicast ARL entries can have multiple destination ports. Get and dump
all destination ports of each entry, not just the lowest.

Signed-off-by: Günther Kelleter <guenther.kelleter@devolo.de>
6 years ago
Mathias Kresin be3e69d991 ramips: rt2880: fix pci cells definition
Set the correct number of cells to fix "property has invalid length" dtc
compiler warnings.

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Mathias Kresin e4d9217fe5 ramips: improve BDCOM WAP2100-SK support
Use the generic board detection instead of the target specific one as
all recent additions are doing.

Setup the USB led via devicetree (a58535771f) and include the required
driver by default. Merge the led userspace setting with an existing
identical case.

Use the wps led for boot status indication.

Move the partitions into a partition table node (6031ab345d) and drop
needless labels. Drop misplaced cells properties (53624c1702).

Cleanup the pinmux and only switch pins to gpio functions which a
referenced as gpio in the dts.

Match the maximum image size with the size of the firmware partition.

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Mathias Kresin 71ba834cf1 ramips: add Sanlinking Technologies D240 pinmux quirk
The sd function of the nd_sd group configures two of the groups pins as
gpios. The pins are used as PCIe reset/power.

Due to the driver load order, the pins are configured way to late if
triggered by the sd-card driver.

To not introduce another kind of driver load order dependency and
configure the pins as early as possible, means during pinmux driver
load.

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Mathias Kresin d6ce04dad8 ralink: fix mt7620 nd_sd pinmux
In case the nd_sd group is set to the sd-card function, Pins 45 + 46 are
configured as GPIOs. If they are blocked by the sd function, they can't
be used as GPIOs.

Reported-by: Kristian Evensen <kristian.evensen@gmail.com>
Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Mathias Kresin 9ebce69611 ramips: revert fix rt3883 pci pinmux
This reverts commit dcdc6d9dad.

Even if described this way in the datasheet, it causes a bootloop on a
RT-N56U (v1):

  of-flash 1c000000.nor-flash: do_map_probe() failed for type cfi_probe
  of-flash 1c000000.nor-flash: do_map_probe() failed
  VFS: Cannot open root device “(null)” or unknown-block(0,0): error -6

Fixes: FS#1930

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Mathias Kresin 8ec1a66c34 ramips: improve Skylab SKW92A support
Use the generic board detection instead of the target specific one as
all recent additions are doing.

Add the wireless led according the gpio number from the datasheet.
Rename the board part of the leds to match the name used for the
compatible string. Finally, do not hijack the wps led for boot status
indication longer than necessary.

Merge userspace config into existing cases.

Include the manufacture Name in the dts model string.

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
John Crispin 749a29f76c Revert "ramips: mt7621-spi: replace the driver with upstream staging one"
This reverts commit a44f000077.

This breaks some mt7621 devices.

Signed-off-by: John Crispin <john@phrozen.org>
6 years ago
Zheng Qian 48a7a2a75d ramips: fix switch ports mapping for newifi d2
Signed-off-by: Zheng Qian <sotux82@gmail.com>
6 years ago
Kevin Schmidt bce555b09b lantiq: enable FXS ports on VR200v
Disables SMP support.
Add VR200 target to keep SMP on FXS-less device variant.

Signed-off-by: Kevin Schmidt <kevin.patrick.schmidt@googlemail.com>
6 years ago
INAGAKI Hiroshi 879f2ef7c0 ath79: modify mtd partitions for Buffalo BHR-4GRV2
This commit modifies mtd partitions define for Buffalo BHR-4GRV2 and
move it to generic subtarget.

In Buffalo BHR-4GRV2, "kernel" partition is located behined "rootfs"
partition in the stock firmware. This causes the size of the kernel
to be limited by the fixed value.

0x50000                       0xe80000        0xff0000
  +-------------------------------+--------------+
  |            rootfs             |    kernel    |
  |           (14528k)            |    (1472k)   |
  +-------------------------------+--------------+

After ar71xx was updated to Kernel 4.14, the kernel size of BHR-4GRV2
exceeded the limit, and it breaks builds on official buildbot.
Since this issue was also confirmed in ath79, I modified the mtd
partitions to get rid of that limitation.

0x50000                                       0xff0000
  +----------------------------------------------+
  |                   firmware                   |
  |                   (16000k)                   |
  +----------------------------------------------+

However, this commit breaks compatibility with ar71xx firmware, so I
dropped "SUPPORTED_DEVICES += bhr-4grv2".

This commit requires new flash instruction instead of the old one.

Flash instruction using initramfs image:

1. Connect the computer to the LAN port of BHR-4GRV2
2. Set the IP address of the computer to 192.168.12.10
3. Rename the OpenWrt initramfs image to
"bhr4grv2-uImage-initramfs-gzip.bin" and place it into the TFTP
directory
4. Start the tftp server on the computer
5. While holding down the "ECO" button, connect power cable to
BHR-4GRV2 and turn on it
6. Flashing (orange) diag LED and release the finger from the button,
BHR-4GRV2 downloads the intiramfs image from TFTP server and boot
with it
7. On the initramfs image, create "/etc/fw_env.config" file with
following contents
  /dev/mtd1 0x0 0x10000 0x10000
8. Execute following commands to add environment variables for
u-boot
  fw_setenv ipaddr 192.168.12.1
  fw_setenv serverip 192.168.12.10
  fw_setenv ethaddr 00:aa:bb:cc:dd:ee
  fw_setenv bootcmd "bootm 0x9f050000 || bootm 0x9fe80000"
9. Perform sysupgrade with squashfs-sysupgrade image
10. Wait ~150 seconds to complete flashing

And this commit includes small fix; BHR-4GRV2 has QCA9557 as a SoC,
not QCA9558.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
6 years ago
Robert Marko d6e92b18d9 ath79: Remove source-only flag
Remove the source-only flag from ath79, its supposed to replace ar71xx after next stable release but buildbots are not currently generating images for it.
So in order to expand testing as much as possible and prepare for moving to ath79 lets enable the buildbots to actually build the target.

Signed-off-by: Robert Marko <robimarko@gmail.com>
6 years ago
Chuanhong Guo a44f000077 ramips: mt7621-spi: replace the driver with upstream staging one
That driver is more efficient thanks to the refactor of spi reading operation.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
6 years ago
Pawel Dembicki 20b09a2125 ramips: add support for Lava LR-25G001
The Lava LR-25G001 Wireless Router is based on the MT7620A SoC.

Specification:

- MediaTek MT7620A (580 Mhz)
- 64 MB of RAM
- 16 MB of FLASH
- 1x 802.11bgn radio
- 1x 802.11ac radio (MT7610EN)
- 5x 10/100/1000 Mbps AR8337 Switch (1 WAN AND 4 LAN)
- 2x external, detachable antennas
- 1x USB 2.0
- UART (J3) header on PCB (57600 8n1)
- 8x LED (3x GPIO-controlled), 2x button
- JBOOT bootloader

Known issues:
- Work only three Gigabit ports (3/5, 1 WAN and 2LAN)

Installation:
Apply factory image via http web-gui or JBOOT recovery page

How to revert to OEM firmware:
- push the reset button and turn on the power. Wait until LED start
  blinking (~10sec.)
- upload original factory image via JBOOT http (IP: 192.168.123.254)

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
6 years ago
Pawel Dembicki b85fe43ec8 ramips: mt7620: add force use of mdio-mode
Some boards have external switches different than mt7530.

This patch allow to use mdio-mode without 0x1f register.

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
6 years ago
Pawel Dembicki e61812fd34 ar8216: add adjust_link checking
Driver crash when 'phydev->adjust_link' isn't provided.

This patch check if 'phydev->adjust_link' exist before
call the method.

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
6 years ago
Weijie Gao ed25e3ac02 ramips: fix some clocks in mt7621.dtsi
As the cpu clock calculation has been fixed, the clock for gic and spi
should be also fixed.

Signed-off-by: Weijie Gao <hackpascal@gmail.com>
6 years ago
Weijie Gao c7ca224299 ramips: fix cpu clock of mt7621 and add dt clk devices
For a long time the mt7621 uses a fixed cpu clock which causes a problem
if the cpu frequency is not 880MHz.

This patch fixes the cpu clock calculation and adds the cpu/bus clkdev
which will be used in dts.

Signed-off-by: Weijie Gao <hackpascal@gmail.com>
6 years ago
Weijie Gao f5af8be636 ramips: fix register range of memc node in mt7621.dtsi
The memc node from mt7621.dtsi has incorrect register resource.
Fix it according to the programming guide.

Signed-off-by: Weijie Gao <hackpascal@gmail.com>
6 years ago
Weijie Gao e217d69a4a ramips: merge two patches 101-mt7621-timer and 998-mt7621-needs-jiffies
These two patches both modified the mt7621.c, and the patch file
998-mt7621-needs-jiffies.patch adds only one line which is used by the
another patch file. So merge them into one file.

Signed-off-by: Weijie Gao <hackpascal@gmail.com>
6 years ago
INAGAKI Hiroshi 83f08aebb1 ath79: specify "firmware" partition format for Buffalo devices
Specify firmware partition format (denx,uimage) by compatible string
for Buffalo devices.

affected devices (&run tested):
- BHR-4GRV
- WHR-G301N
- WZR-HP-AG300H
- WZR-HP-G302H A1A0
- WZR-HP-G450H (WZR-450HP)

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
6 years ago
Tomasz Maciej Nowak d93b09fa74 sdk: expose part of advanced configuration options
These option can be useful in developement/packagig applications for
OpenWrt. Instead of searching them by hand in Config-build.in lets
expose them for easier access.

Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
6 years ago
Lorenzo Bianconi e612e60517 ramips: add mt76x0 node to RT-AC51U device tree
Introduce mt76x0e device tree node in RT-AC51U dts.
Define mt76x0e mtd partition and offset

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
6 years ago
Christian Lamparter 5d5c0b0582 apm821xx: wndr4700: restore sd-card media detection
This was not converted to the new, dt-based board name.

Fixes: e90dc8d272 ("apm821xx: convert to device-tree board detection")
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
6 years ago
Christian Lamparter a2266a6d42 apm821xx: shuffle helper scripts to the front
In a patch for the ath79, Mathias Kresin mentioned that
helper scripts should be in front of the device targets.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
6 years ago
Christian Lamparter d82d84694e apm821xx: add support for the Netgear WNDAP620 and WNDAP660
This patch adds support for the Netgear WNDAP620 and WNDAP660,
they are similar devices, but due to the LAN LED configuration,
the switch setup and WIFI configuration each gets a different
device target.

Hardware Highlights WNDAP620:
CPU: AMCC PowerPC APM82181 at 1000 MHz
DRAM:  128 MB, 2 x 64 MiB DDR2 Hynix H5PS5162GF
CPU: AMCC PowerPC APM82181 at 1000 MHz
FLASH: 32 MiB, NAND SLC, Hynix HY27US08561A
Ethernet: RealTek RTL8363SB 2x2-Port Switch PHY - Only 1 GBit Port (POE)
Wifi: Atheros AR9380 minipcie - Dual-Band - 3x3:3
Serial: console port with RJ45 Interface (9600-N-8-1)
LEDS: Power, LAN-Activity, dual color LAN-Linkspeed, 2.4GHz, 5GHz LEDs
Button: Soft Reset Button
Antennae: 3 internal dual-band antennae + 3 x RSMA for external antennaes

Hardware Highlights WNDAP660:
CPU: AMCC PowerPC APM82181 at 1000 MHz + 2 Heatsinks
DRAM:  256 MB, 2 x 128 MiB DDR2
FLASH: 32 MiB, NAND SLC, Hynix HY27US08561A
Ethernet: RealTek RTL8363SB 2x2-Port Switch PHY (POE)
Wifi1: Atheros AR9380 minipcie - Dual-Band - 3x3:3
Wifi2: Atheros AR9380 minipcie - Dual-Band - 3x3:3
Serial: console port with RJ45 Interface (9600-N-8-1)
LEDS: Power, LAN-Activity, 2x dual color LAN-Linkspeed, 2.4GHz, 5GHz LEDs
Button: Soft Reset Button
Antennae: 6 internal dual-band antennae + 3 x RSMA for external antennaes

Flashing requirements:

 - needs a tftp server at 192.168.1.10/serverip.
 - special 8P8C(aka RJ45)<->D-SUB9 Console Cable
   ("Cisco Console Cable"). Note: Both WNDAP6x0 have
   a MAX3232 transceivers, hence no need for any separate
   CMOS/TTL level shifters.

External Antenna:
The antennae mux is controlled by GPIO 11 and GPIO14. Valid Configurations:
 = Config# = | = GPIO 11 = | = GPIO 14 = |  ===== Description =====
      1.     |   1 / High  |  0 / Low    | Use the internal antennae (default)
      2.     |   0 / Low   |  1 / High   | Use the external antennae

The external antennaes are only meant for the 2.4 GHz band.

One-way Flashing instructions via u-boot:

 0. connect the serial cable to the RJ45 Console Port
    Note: This requires a poper RS232 and not a TTL/USB adaptor.

 1. power up the AP and interrupt the u-boot process at

    'Hit any key to stop autoboot'

 2. setup serverip and ipaddr env settings
    Enter the following commands into the u-boot shell
    # setenv ipaddr 192.168.1.1
    # setenv serverip 192.168.1.10

 3. download the factory.img image to the AP
    Enter the following commands into the u-boot shell

    # tftp ${kernel_addr_r} openwrt-apm821xx-nand-netgear_wndap660-squashfs-factory.img

 4. verfiy image integrity
    Enter the following commands into the u-boot shell

    # crc32 $fileaddr $filesize

    If the calculated crc32 checksum does not match, go back to step 3.

 5. flash the image
    Enter the following commands into the u-boot shell

    # nand erase 0x110000 0x1bd0000
    # nand write ${kernel_addr_r} 0x110000 ${filesize}

 6. setup uboot environment
    Enter the following commands into the u-boot shell

    # setenv bootargs
    # setenv fileaddr
    # setenv filesize
    # setenv addroot 'setenv bootargs ${bootargs} root=/dev/ubiblock0_0'
    # setenv owrt_boot 'nboot ${kernel_addr_r} nand0 0x110000; run addroot; run addtty; bootm ${kernel_addr_r}'
    # setenv bootcmd 'run owrt_boot'
    # saveenv

 7. boot
    # run bootcmd

Booting initramfs instructions via u-boot:

 Follow steps 0 - 2 from above.

 3. boot initramfs
    Enter the following commands into the u-boot shell

    # tftp ${kernel_addr_r} openwrt-apm821xx-nand-netgear_wndap660-initramfs-kernel.bin
    # run addtty
    # bootm ${kernel_addr_r}

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
6 years ago
Christian Lamparter a9839fe638 generic: rtl8367b: make it possible to specify cpu_port via DT
This patch adds the feature to parse the existing cpu_port DT
property, which is used to specify which port is the cpu port
of the switch.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
6 years ago
Christian Lamparter 910c2f9e68 generic: rtl836x: support defered probe on mdio-bus
On the WNDAP620, the mdio and mdc lines are controlled by
the EMAC ethernet device. This results in a hen-vs-egg problem.
The rtl8367b driver is probed before the ethernet driver and
the mdio-bus is not available yet, which caused the rtl8367b
driver to fail.

This patch changes the rtl8366_smi_probe_of() function to
return -EPROBE_DEFER if the mdio-bus lookup failed and changes
rtl8366_smi_probe()'s signature to return the error code back to
the callee, so it can propagate back to the kernel. Which, will
retry the switch probe at a later time.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
6 years ago
Christian Lamparter fb4bed5fe9 apm821xx: import gpio-export DT code from lantiq
This will come in handy for the Netgear WNDAP620's antennae mux.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
6 years ago
Christian Lamparter f6968952df apm821xx: MR24: add to uboot-envtools
This patch adds the complicated u-boot
environment access settings for to the
MR24 target.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
6 years ago
Ram Chandra Jangir dc6af37544 ipq806x: Add support for IPQ8064 AP161 board
Specification:
   - SoC: Qualcomm Atheros IPQ8064 ARM-v7 Dual Core SMP CPU
   - RAM: 512MB DDR3 System Memory
   - NOR Flash: 32MB SPI NOR
   - NAND Flash: 256MB NAND
   - Ethernet: 5 x 1G via QCA8337N
   - USB: 2 x USB 3.0 SuperSpeed
   - PCIe: 3x Mini PCIe 2.0 Slots
	   Three PCIE2.0 connectors can connect two or three radio cards
           such as the CUS260 for 2.4 GHz WLAN and the CUS239 for 802.11ac WLAN

 How to flash via u-boot console:
   tftpboot 0x44000000 openwrt-ipq806x-qcom_ipq8064-ap161-squashfs-nand-factory.bin
   nand erase  0x1340000 0x4000000
   nand write  0x44000000 0x1340000 $filesize
   setenv bootargs ‘console=ttyMSM0,115200 ubi.mtd=ubi root=/dev/ubiblock0_1’
   saveenv
   bootm

 Further upgrades via sysupgrade.

 Tested on IPQ8064 AP161 Board:
   1) NAND boot
   2) Tested USB and PCIe interfaces
   3) WDOG test
   4) cpu frequency scaling
   5) ethernet, 2G and 5G WiFi
   6) ubi sysupgrade

Signed-off-by: Ram Chandra Jangir <rjangir@codeaurora.org>
6 years ago
Ram Chandra Jangir 1ade96def7 ipq8064: pinctrl: Fixed missing RGMII pincontrol definitions
Signed-off-by: Ram Chandra Jangir <rjangir@codeaurora.org>
6 years ago
Sergey Ryazanov 8baad26d01 ar71xx: fix RouterBOARD Power LED default state
RouterBOARD(s) bootloader actully turns Power LED off just before
it starts the kernel. So we need to set the LED default status to On
instead of Keep in order to keep LED on during kernel boot.

This change fixes Power LED off during the kernel boot on the RB91x and
SXT Lite boards.

Fixes: 6cad8ee0bd ("ar71xx: keep the RouterBOARD Power LED in On state")

CC: Mathias Kresin <dev@kresin.me>
Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
6 years ago
Ben Greear 38167cb7f4 hotplug: Allow configuring radio name.
This way the radio (phy) name can be the same through module reloads.

To set the desired name:

uci set wireless.@wifi-device[0].phyname=wiphy0

I guess this only works on ipq6086 boards as I could not find a more
generic place to put this.  Maybe someone can improve it.

Signed-off-by: Ben Greear <greearb@candelatech.com>
6 years ago
Tomasz Maciej Nowak a822283c7e x86: add amd microcode entries to grub config
Create initrd enries for x86 images, that'll load amd microcode as early
as possible. Also remove the preinit script responsible for late load of
microcode.

Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
6 years ago
David Bauer 946ffe470d ath79: add support for Archer C58/C59 v1
This commit adds support for the Archer C58 v1 and C59 v1, previously
supported in the ar71xx target.

CPU:   Qualcomm QCA9561
RAM:   64M (C58) / 128M (C59)
FLASH: 8M (C58) / 16M (C59)
WiFi:  QCA9561 bgn 3x3:3
       QCA9888 nac 2x2:2
LED:   Power, WiFi 2.4, WiFi 5, WAN green, WAN amber, LAN, WPS
       Only C59: USB
BTN:   WPS, WiFi, Reset

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

Via Web-UI:
Update factory image via Web-UI.

Via TFTP:
Rename factory image to "tp_recovery.bin" and place it in the root-dir
of your tftp server. Configure to listen on 192.168.0.66. Power up the
router while holding down the reset-button. The router will flash itself
and reboot.

Note: For TFTP, you might need a switch between router and computer, as
link establishment might take to long.

Signed-off-by: David Bauer <mail@david-bauer.net>
6 years ago
Daniel Santos 89eb1a6d72 ralink: Add support for GPIO as interrupt-controller
The gpio-ralink driver has everything it needs to be used as an
interrupt controller except for device tree support.  This simple patch
adds that support by configuring the irq domain to use two cells and
adding the appropriate documentation to the devicetree bindings.

Signed-off-by: Daniel Santos <daniel.santos@pobox.com>
6 years ago
Luo chongjun 9989fd5154 ath79: add support for GL-iNet GL-X750
this patch adds supports for GL-X750.

Specification:
- SOC: QCA9531 (650MHz)
- Flash: 16 MiB (W25Q128FVSG)
- RAM: 128 MiB DDR2
- Ethernet: 10/100: 1xLAN + 10/100: 1xWAN
- Wireless: 2.4GHz (bgn) and 5GHz (ac)
- USB: 1x USB 2.0 port
- Button: 1x reset button
- LED: 5x LEDS (green)

Flash instruction:
The original firmware is openwrt, so both LuCI or sysupgrade can be used.

Signed-off-by: Luo chongjun <luochongjun@gl-inet.com>
6 years ago
Christoph Krapp 987b961537 ar71xx: add support for UniFi-AC-Mesh-Pro
This adds the build option for UniFi AC Mesh Pro as well as
model detection for it.
The device is a hardware clone of the AC Pro.

- SoC: QCA9563-AL3A (775Mhz)
- RAM: 128MiB
- Flash: 16MiB - dual firmware partitions!
- LAN: 2x 1000M - POE+
- Wireless:
        2.4G: QCA9563
          5G: UniFi Chip, QCA988X compatible

Signed-off-by: Christoph Krapp <achterin@googlemail.com>
6 years ago
Petr Štetiar 16b950c981 ramips: Add support for ZTE ZXECS EBG3130 aka BDCOM WAP2100-SK
On the bottom sticker it's branded as ZTE ZXECS EBG3130 device, but in factory
OpenWrt image it's referenced as BDCOM WAP2100-SK device.

Specifications:

- SoC: MediaTek MT7620A
- RAM: 128 MB
- Flash: 16 MB
- Ethernet: 5 FE ports
- Wireless radio: 2T2R 2.4 GHz and 1T1R 5 GHz (MT7610EN, unsupported)
- UART: 1 x UART on PCB marked as J2 (R=RX, T=TX, G=GND) with 115200 8N1 config
- LEDs: Power, FE ports 1-5, WPS, USB, RF 2.4G, RF 5G
- Other: USB port, SD card slot and 2x external antennas (non-detachable)

Flashing instructions:

A) The U-Boot has HTTP based firmware upgrade

  A1) Flashing notes

  We've identified so far two different batches of units, unfortunately
  each batch has different U-Boot bootloader flashed with different
  default environment variables, thus each batch has different IP address
  for accessing web based firmware updater.

  * First batch has web based bootloader IP address 1.1.1.1
  * Second batch has web based bootloader IP address 192.168.1.250

  In case you can't connect to either of those IPs, you can try to get
  the default IP address via two methods:

  A1.1) Serial console, then the IP address is visible during the boot

   ...
   HTTP server is starting at IP: 1.1.1.1
   raspi_read: from:40004 len:6
   HTTP server is ready!
   ...

  A1.2) Over telnet/SSH using this command:

   root@bdcom:/# grep ipaddr= /dev/mtd0
   ipaddr=1.1.1.1

  A2) Flashing with browser

  * Change IP address of PC to 1.1.1.2 with 255.255.255.0 netmask
  * Reboot the device and try to reach web based bootloader in the
    browser with the following URL http://1.1.1.1

  * Quickly select the firmware sysupgrade file and click on the
    `Update firmware` button, this all has to be done within 10 seconds,
    bootloader doesn't wait any longer

   If done correctly, the web page should show UPDATE IN PROGRESS page
   with progress indicator. Once the flashing completes (it takes roughly
   around 1 minute), the device will reboot to the OpenWrt firmware

  A3) Flashing with curl

   sudo ip addr add 1.1.1.2/24 dev eth0
   curl \
      --verbose \
      --retry 3 \
      --retry-delay 1 \
      --retry-max-time 30 \
      --connect-timeout 30 \
      --form "firmware=@openwrt-ramips-mt7620-BDCOM-WAP2100-SK-squashfs-sysupgrade.bin" \
      http://1.1.1.1

   Now power on the router.

B) The U-boot is based on Ralink SDK so we can flash the firmware using UART.

   1. Configure PC with a static IP address and setup an TFTP server.
   2. Put the firmware into the tftp directory.
   3. Connect the UART line as described on the PCB (G=GND, R=RX, T=TX)
   4. Power up the device and press 2, follow the instruction to set device and
      tftp server IP address and input the firmware file name. U-boot will then load
      the firmware and write it into the flash.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
6 years ago
Tomasz Maciej Nowak 546fced2a2 x86: add intel microcode entries to grub config
Create initrd enries for x86 images, that'll load intel microcode as
early as possible. To achieve that the test module for grub is enabled
which provides shell-like conditionals. Also restrict the late load of
microcode to AMD processors.

Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
6 years ago
Tomasz Maciej Nowak 51e199fbe8 x86: add packages files to image bootfs
Add files to bootfs image from selected as built-in packages, which want
to install files to targets boot file system.

Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
6 years ago
Tomasz Maciej Nowak f78b261637 x86: mount writable bootfs
Mount boot file system with rw option to allow installation of packages
which install files to /boot directory.

Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
6 years ago
Petr Štetiar d42a7c4699 ath79: ubnt-m-xw: Fix factory image flashing using TFTP recovery method
Ubiquity allows flashing of unsigned factory images via TFTP recovery
method[1]. They claim in airOS v6.0.7 release changelog[2] following:

 All future airOS versions will be signed in this way and not allow
 unsigned firmware to be loaded except via TFTP.

U-boot bootloader on M-XW devices expects factory image revision
version in specific format. On airOS v6.1.7 with `U-Boot 1.1.4-s1039
(May 24 2017 - 15:58:18)` bootloader checks if the revision major(?)
number is actually a number, but in currently generated images there's
OpenWrt text and so the check fails:

 Hit any key to stop autoboot:  0
 Setting default IP 192.168.1.20
 Starting TFTP server...
 Receiving file from 192.168.1.25:38438
 Received 4981148 bytes
 Firmware check failed! (1)

By placing arbitrary correct number first in major version, we make the
bootloader happy and we can flash factory images over TFTP again:

 Received 3735964 bytes
 Firmware Version: XW.ar934x.v6.0.4-42.r8474-56aa1ac-OpenWrt
 Setting U-Boot environment variables
 Un-Protected 1 sectors
 Erasing Flash.... done

Patch provided by AREDN[3] project, tested on Bullet M2 XW (ynezz) and
Nanostation M5 XW (ae6xe).

1. https://help.ubnt.com/hc/en-us/articles/204910124-UniFi-TFTP-Recovery-for-Bricked-Access-Points
2. https://dl.ubnt.com/firmwares/XW-fw/v6.0.7/changelog.txt
3. https://github.com/aredn

Signed-off-by: Petr Štetiar <ynezz@true.cz>
6 years ago
Petr Štetiar db4b6535f8 ath79: Add support for Ubiquity Bullet M (XW)
CPU: AR9342 SoC
RAM:     64 MB DDR2
Flash:    8 MB NOR SPI
Ports:  100 MBit (24V PoE in)
WLAN: 2.4/5 GHz
UART:     1 UART on PCB marked as J1 with 115200 8N1 config
LEDs:       Power, Ethernet, 4x RSSI LEDs (orange, red, 2x green)
Buttons:    Reset

UART connection details

  .---------------------------------.
  |                                 |
[ETH]          J1                 [ANT]
  |    o VCC o RX o TX o GND        |
  `---------------------------------'

Flashing instructions

 A) Serial console, U-Boot and TFTP

   1. Connect to serial header J1 on the PCB
   2. Power on device and enter U-Boot console
   3. Set up TFTP server serving an OpenWrt initramfs build
   4. Load initramfs build using the command tftpboot in the U-Boot cli
   5. Boot the loaded image using the command bootm
   6. Copy squashfs OpenWrt sysupgrade build to the booted device
   7. Use mtd to write sysupgrade to partition "firmware"
   8. Reboot and enjoy

 B) Experimental factory image flashing over SSH from airOS v6.1.7

   1. You need to flash your UBNT M2HP with airOS v6.1.7 firmware
      no other airOS version is currently supported
   2. git clone https://github.com/true-systems/ubnt-bullet-m2hp-openwrt-flashing
   3. cd ubnt-bullet-m2hp-openwrt-flashing
   4. make flash-factory FW_OWRT=/path/to/your/openwrt-ath79-generic-ubnt_bullet-m-xw-squashfs-factory.bin

Tested only on Bullet M2HP.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
6 years ago
Roman Yeryomin ae2b43b873 ramips: fix ethernet for f5d8235-v2 board
Belkin F5D8235 v2 has two ethernet switches on board.
One internal rt3052 and rtl8366rb on rgmii interface.
Looks like internal switch settings were lost in
translation to device tree infrastructure.

Signed-off-by: Roman Yeryomin <roman@advem.lv>
6 years ago
Russell Senior e42327aa89 ramips: add support for Skylab SKW92A in EVB
Specifically, SKW92A_E16, described here:

  http://www.skylabmodule.com/wp-content/uploads/SkyLab_SKW92A_V1.04_datasheet.pdf

Specification:
- MediaTek MT7628N/N (580 Mhz)
- 64 MB of RAM
- 16 MB of FLASH
- 2T2R 2.4 GHz
- 5x 10/100 Mbps Ethernet
- 2x u.FL
- Power by micro-USB connector at USB1 on EVB
- UART via micro-USB connector at USB3 on EVB (57600 8n1)
- 5x Ethernet LEDs
- 1x WLAN LEDs
- 1x WPS LED connected by jumper wire from I2S_CK on J20 to WPS_LED pin hole next
  to daughter board on EVB
- WPS/Reset button (S2 on EVB)
- RESET button (S1 on EVB) is *not* connected to RST hole next to daughter board

Flash instruction:

>From Skylab firmware:

1. Associate with SKYLAP_AP
2. In a browser, load: http://10.10.10.254/
3. Username/password: admin/admin
4. In web admin interface: Administration / Upload Firmware, browse to
   sysupgrade image, apply, flash will fail with a message:
   Not a valid firmware. *** Warning: "/var/tmpFW" has corrupted data!
5. Telnet to 10.10.10.254, drops you into a root shell with no credentials
6. # cd /var
7. # mtd_write -r write tmpFW mtd4
   Unlocking mtd4 ...
   Writing from tmpFW to mtd4 ... [e]
8. When flash has completed, you will have booted into your firmware.

>From U-boot via TFTP and initramfs:

1. Place openwrt-ramips-mt76x8-skw92a-initramfs-kernel.bin on a TFTP server
2. Connect to serial console at USB3 on EVB
3. Connect ethernet between port 1 (not WAN) and your TFTP server (e.g.
   192.168.11.20)
4. Start terminal software (e.g. screen /dev/ttyUSB0 57600) on PC
5. Apply power to EVB
6. Interrupt u-boot with keypress of "1"
7. At u-boot prompts:
   Input device IP (10.10.10.123) ==:192.168.11.21
   Input server IP (10.10.10.3) ==:192.168.11.20
   Input Linux Kernel filename (root_uImage) ==:openwrt-ramips-mt76x8-skw92a-initramfs-kernel.bin
8. Move ethernet to port 0 (WAN) on EVB
9. At new OpenWrt console shell, fetch squashfs-sysupgrade image and flash
   with sysupgrade.

>From U-boot via TFTP direct flash:

1. Place openwrt-ramips-mt76x8-skw92a-squashfs-sysupgrade.bin on a TFTP server
2. Connect to serial console at USB3 on EVB (57600 8N1)
3. Connect ethernet between port 1 (not WAN) an your TFTP server (e.g.
   192.168.11.20)
4. Start terminal software (e.g. screen /dev/ttyUSB0 57600) on PC
5. Apply power to EVB
6. Interrupt u-boot with keypress of "2"
7. At u-boot prompts:
   Warning!! Erase Linux in Flash then burn new one. Are you sure?(Y/N) Y
   Input device IP (10.10.10.123) ==:192.168.11.21
   Input server IP (10.10.10.3) ==:192.168.11.20
   Input Linux Kernel filename (root_uImage) ==:openwrt-ramips-mt76x8-skw92a-squashfs-sysupgrade.bin
8. When transfer is complete or as OpenWrt begins booting, move ethernet to
   port 0 (WAN).

Signed-off-by: Russell Senior <russell@personaltelco.net>
6 years ago
Roman Yeryomin b0d6653ab8 rb532: drop 4.9 support
Signed-off-by: Roman Yeryomin <roman@advem.lv>
6 years ago
Roman Yeryomin 9f13cde1fa rb532: switch to 4.14
Signed-off-by: Roman Yeryomin <roman@advem.lv>
6 years ago
Roman Yeryomin 920845357f rb532: add 4.14 support
Signed-off-by: Roman Yeryomin <roman@advem.lv>
6 years ago
Martin Schiller 18398abe1e lantiq/basefiles: use shutdown instead of stop when the system goes down
I can't see any reason why we shouldn't use shutdown for lantiq as well.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
6 years ago
Petr Štetiar 82b34c1f60 imx6: image: ventana: Add missing BOOT_SCRIPT variable
This is probably theoretical problem as the Ventana is defined first in
the image Makefile, but once the position of the definition would change
in the future (alphabetical sorting?) it would get bootscript from the
previous board which would have BOOT_SCRIPT set.

Cc: Tim Harvey <tharvey@gateworks.com>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
6 years ago
Daniel Golle 7c4251d881 ramips: select kmod-mt76x0e for TP-Link ArcherC20i and wr902ac-v3
Both devices come with a MediaTek MT7610E 5GHz 802.11ac 1T1R radio
which wasn't supported at the time the devices were added to OpenWrt.
Now that we got it, include kmod-mt76x0e in images for those devices.

Reported-by: Arian Sanusi <openwrt@semioptimal.net>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
6 years ago
Daniel Golle 51c094e703 kernel: enable CONFIG_BRIDGE_VLAN_FILTERING
This allows us to use the bridge as a managed switch and gracefully
handle mixed tagged and untagged frames. Prior to this, the only
alternative was creating one bridge per vlan which quickly becomes a
nightmare and still won't let you mix both tagged and untagged frames on
the physical port without some complex ebtables magic.

This is in line with the notion that OpenWRT is the network go-to swiss
army knife when you need a nice set-and-forget, low maintenance box to
handle a specific task.

Current builds of the ip-bridge package already fully support this
feature so the only requirement is enabling the kernel config.

This is disabled by default so existing bridge configurations will not
be affected.  This patch only gives the ability to turn it on with an
'ip link' command.  If there is interest, I could look into making the
feature accessible via uci configuration.

It causes about 3.1% hit on raw bridging speed, which is relatively
trivial considering that I had to use 300 byte packets to strain the CPU
enough to notice a slowdown at all.  The ER8 would chug along at wire
speed otherwise, and that's using only one core.  Since the typical
bridge use case on OpenWRT is wireless, I doubt it would be noticeable
at all.

With BRIDGE_VLAN_FILTERING

iperf -u -c 192.168.1.105 -b 1G -l 300
------------------------------------------------------------
Client connecting to 192.168.1.105, UDP port 5001
Sending 300 byte datagrams, IPG target: 2.24 us (kalman adjust)
UDP buffer size:  208 KByte (default)
------------------------------------------------------------
[  3] local 192.168.1.12 port 58045 connected with 192.168.1.105 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-10.0 sec   977 MBytes   820 Mbits/sec
[  3] Sent 3414986 datagrams
[  3] Server Report:
[  3]  0.0-10.0 sec   811 MBytes   680 Mbits/sec   0.000 ms
581210/3414986 (0%)

Without BRIDGE_VLAN_FILTERING

iperf -u -c 192.168.1.105 -b 1G -l 300
------------------------------------------------------------
Client connecting to 192.168.1.105, UDP port 5001
Sending 300 byte datagrams, IPG target: 2.24 us (kalman adjust)
UDP buffer size:  208 KByte (default)
------------------------------------------------------------
[  3] local 192.168.1.12 port 36645 connected with 192.168.1.105 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-10.0 sec   977 MBytes   820 Mbits/sec
[  3] Sent 3414990 datagrams
[  3] Server Report:
[  3]  0.0-10.0 sec   836 MBytes   701 Mbits/sec   0.000 ms
493950/3414990 (0%)

In terms of kernel size, it uses 16KB (6753K vs 6737K on ER8) so a
0.002% hit.  The exact 16KB is probably just due to how the kernel is
compressed.

Suggested-by: Jonathan Thibault <jonathan@navigue.com>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
6 years ago
Rafał Miłecki 18c5e7ba91 ath79: specify "firmware" partition format for Ubiquiti UniFi
This affects:
1. Ubiquiti UniFi-AC-LITE/LR
2. Ubiquiti UniFi-AC-PRO
3. Ubiquiti UniFi-AC-MESH
4. Ubiquiti UniFi-AC-MESH PRO

Succesfully tested on UniFi AP AC Pro.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
6 years ago
Hannu Nyman 3e19113d5d ath79: specify "firmware" partition format for WNDR3700 and v2
Specify the new "firmware" partition format for Netgear WNDR3700
and WNDR3700v2 similarly as ffd082aa did for WNDR3800, the third
device in the family.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
6 years ago
Rafał Miłecki c8a005fefd ath79: specify "firmware" partition format for TP-LINK Archer C7 v2
With this change it doesn't require trying parsers one by one.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
6 years ago
Rafał Miłecki c87d47aee8 kernel: drop unused arch_split_mtd_part()
No single target/arch uses it and most likely there is no need to make
such a potential code target/arch specific.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
6 years ago
Rafał Miłecki f995e143ba kernel: add missing version.h include to the TP-LINK parser
Fixes: a29c8d685b ("kernel: add DT binding support to the TP-LINK parser")
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
6 years ago
Rafał Miłecki a29c8d685b kernel: add DT binding support to the TP-LINK parser
It allows triggering it directly by specifying format in the DT.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
6 years ago
Rafał Miłecki ffd082aa38 ath79: specify "firmware" partition format for Netgear WNDR3800
It doesn't require trying parsers one by one.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
6 years ago
Rafał Miłecki a22311e6a6 kernel: add DT binding support to the uimage parsers
It allows specifying default and Netgear parsers directly in the DT.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
6 years ago
Rafał Miłecki 934edb764d kernel: don't auto-split "firmware" if it has "compatible" DT property
If "compatible" is being used that should trigger a proper parser
directly. It's more reliable thanks to not trying parsers one by one. In
such case partition shouldn't be split automatically to avoid parsing it
twice.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
6 years ago
David Bauer 6680fab947 kernel: b53: register switch on probe
Currently, the b53 MDIO switch driver registers the switch on
config-init and not on device probe. Because of this, the switch
gets added every time the associated interface comes up.

This commit fixes this behavior by registering the switch on device
probe.

Compile- and run-tested on OCEDO Koala.

Signed-off-by: David Bauer <mail@david-bauer.net>
6 years ago
Koen Vandeputte 3a1978bbb4 kernel: bump 3.18 to 3.18.126
Refreshed all patches.

Compile-tested: adm5120
Runtime-tested: none

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
6 years ago
Koen Vandeputte 02e16e9e82 kernel: bump 4.14 to 4.14.82
Refreshed all patches.

Compile-tested: ar71xx, cns3xxx, imx6, x86_64
Runtime-tested: ar71xx, cns3xxx, imx6, x86_64

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
Tested-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
Tested-by: Stijn Tintel <stijn@linux-ipv6.be>
6 years ago
Koen Vandeputte e1debc557c kernel: bump 4.9 to 4.9.138
Refreshed all patches.

Compile-tested: ar71xx, layerscape
Runtime-tested: ar71xx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
6 years ago
Rafał Miłecki d3381b5a64 bcm53xx: request Seama parser on DIR-885L directly
It's more reliable as mtd subsystem doesn't have to blindly try that
parser. It allows disabling MTD_SPLIT_FIRMWARE completely (TRX is
handled in a similar way).

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
6 years ago
Rafał Miłecki dab5a93086 kernel: add DT binding support to the Seama parser
It allows specifying that parser directly in the DT.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
6 years ago
Rafał Miłecki 4585cd3bdf kernel: move diff adding run_parsers_by_type() between mtd patches
It makes more sense to add run_parsers_by_type() in a patch that
introduces parser types. That makes the other one just add a code using
it.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
6 years ago
Rafał Miłecki 4d0431801d kernel: don't export parse_mtd_partitions_by_type() in 4.9 and 4.14
That function isn't used anywhere out of the mtdpart.c & can be static.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
6 years ago
Rafał Miłecki 9b8a955358 kernel: drop mtd_pad_erasesize() helper from 4.9 and 4.14
It has been last used in kernel 3.18 for uimage and squashfs splitters
embedded in the mtdpart.c.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
6 years ago
Rinki Kumari dd02a19ff5
ar71xx: fix TP-Link Archer C7 v5 switch LEDs
Signed-off-by: Rinki Kumari <rinki13@gmail.com>
6 years ago
Pau Escrich 15f16bf05b ar71xx: add support for Gainstrong MiniBox V3.2
Adds MiniBox V3.2 ar71xx target (QCA99531 + QCA9887)
Info: http://oolite.cn/minibox-v3-2-qca9531-qca9887-module-pin-specification.html
Reference patch: http://oolite.cn/wp-content/uploads/2017/09/minibox_v3_cc15.05_20160325.patch
Installation: Upload firmware to uboot via HTTP at 192.168.1.1 (press button for 5 seconds)

Signed-off-by: Pau Escrich <p4u@dabax.net>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(daniel@makrotopia.org: rebased and fixed conflicts, fixed LED name,
                        added ath10k eeprom)
6 years ago
Rafał Miłecki c6a1bcac16 kernel: fix ubifs loosing O_TMPFILE data after power cut
There was a bug in ubifs related to the O_TMPFILE. When reapplying
changes after power cut data could be lost. This problem was exposed by
overlayfs and the upstream commit 3a1e819b4e80 ("ovl: store file handle
of lower inode on copy up").

This fixes a regression introduced when switching from 4.9 to 4.14.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
6 years ago
Koen Vandeputte e14dc93073 kernel: bump 4.14 to 4.14.81
Refreshed all patches.

Removed upstreamed patches:
- 081-spi-bcm-qspi-switch-back-to-reading-flash-using-smal.patch

Altered patches:
- 0054-cpufreq-dt-Handle-OPP-voltage-adjust-events

Compile-tested on: cns3xxx, imx6, ipq806x, x86_64
Runtime-tested on: cns3xxx, imx6, x86_64

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
6 years ago
Koen Vandeputte 7e20e4ab96 kernel: bump 4.9 to 4.9.137
Refreshed all patches.

Removed upstreamed hunks in:
- 703-phy-support-layerscape.patch

Compile-tested on: ar71xx, layerscape
Runtime-tested on: ar71xx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
6 years ago
Koen Vandeputte f7a406deaf kernel: bump 3.18 to 3.18.125
Refreshed all patches.

Compile-tested on: adm5120
Compile-tested on: none

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
6 years ago
Stijn Tintel e95e9fcbb2 kernel: bump 4.14 to 4.14.80
Refresh patches.

Compile-tested: ar71xx, ath79, x86/64
Runtime-tested: ar71xx, ath79, x86/64

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
6 years ago
Rafał Miłecki 0cf32de17c bcm53xx: add DT patch describing pins mux controller
It's needed to support new devices that use specific pin functions.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
6 years ago
Rafał Miłecki c7c4ae35d6 kernel: deprecate support for the generic "linux,part-probe" DT binding
It has been rejected upstream and instead a nice/more generic solution
has been implemented. It's possible now to describe partitions format
using "compatible" DT string.

No OpenWrt target uses "linux,part-probe" anymore, leave it only in case
some forks need it. It will be dropped with support for new kernels.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
6 years ago
Rafał Miłecki 9a3c805584 ramips: use separated mtd patch reverting write_page() removal
This helps understanding mtd changes needed to get downstream NAND
driver working.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
6 years ago
Rafał Miłecki f975ab8f4e bcm53xx: update pinctrl driver
It's upstream now with a one trivial fix.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
6 years ago
Daniel Golle 217fe505b6 oxnas: remove superseded sysupgrade image check
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
6 years ago
Daniel Golle b831eb5363 oxnas: kd20: correct memory size to 256MB
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
6 years ago
Koen Vandeputte b4e17a7440 ramips: fix netgear r6120 factory image generation
as indicated in commit c5bf408ed6 "(ramips: fix image generation for mt76x8")
more rework was needed to fix the other issues.

Building on another machine, but using the same arch, showed
the application failing again for different reasons.

Fix this by completely rewriting the application, fixing following found issues:

- buffer overflows, resulting in stack corruption
- flaws in memory requirement calculations (too small, too large)
- memory leaks
- missing bounds checking on string handling
- non-reproducable images, by using unitilized memory in checksum calculation
- missing error handling, resulting in succes on specific image errors
- endianness errors when building on BE machines
- various minor build warnings
- documentation did not match the code actions (header item locations)
- allowing input to be decimal, hex or octal now

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
6 years ago
Felix Fietkau b318edb999 ramips: add missing DTS frequency limit for the 5 GHz radio on Archer C20i
Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years ago
Koen Vandeputte 74738c4b80 imx6: fix DMA transaction errors
Following errors were seen in the past on imx6 when using serial:

[ 22.617622] imx-uart 2020000.serial: DMA transaction error.
[ 22.623228] imx-uart 2020000.serial: DMA transaction error.
[ 22.628826] imx-uart 2020000.serial: DMA transaction error.
[ 22.648951] imx-uart 2020000.serial: DMA transaction error.
[ 22.654558] imx-uart 2020000.serial: DMA transaction error.
[ 22.660156] imx-uart 2020000.serial: DMA transaction error.

Which is the reason why DMA for the serial ports
got disabled in commits:

efb362cd93 ("imx6: disable dma on uart")
3b4241071d ("imx6: disable UART dma")

As indicated on mailinglist discussion, the cause seems to be
the usage of very old SDMA firmware which is present in the soc:

[    0.624302] imx-sdma 20ec000.sdma: Direct firmware load for imx/sdma/sdma-imx6q.bin failed with error -2
[    0.624318] imx-sdma 20ec000.sdma: Falling back to user helper
[   64.531607] imx-sdma 20ec000.sdma: external firmware not found, using ROM firmware

This patch adds the new firmware binary. (2196 bytes)

It is required to embed the binary into the kernel image, as it
gets loaded very early in the boot process where the rootfs is not
available yet:

[    0.622966] imx-sdma 20ec000.sdma: loaded firmware 3.3

Extended testing shows that the DMA errors are not seen anymore
when using this newer firmware version.

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
6 years ago
Koen Vandeputte 860de2e1aa ar71xx: disable some tiny targets with kernel 4.14
The bump to kernel 4.14 caused a massive increase in kernel size.

For most targets, switching them to dynamic partitioning allowed
to cope with this.

On some targets, the kernel partition is located behind the rootfs,
which disallows switching to dynamic partitioning as the boot location
would be altered, requiring a u-boot change.

Also within the tiny section, which disables kernel symbols etc
to decrease the image size,  the partition size is still too small.

Disable these targets for now, fixing image generation:

- Buffalo BHR-4GRV2
- Zbtlink ZBT-WE1526

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
6 years ago
Koen Vandeputte c764b2b531 kernel: bump 4.14 to 4.14.79
Refreshed all patches.

Compile-tested on: ar71xx, cns3xxx, imx6, x86_64
Runtime-tested on: ar71xx, cns3xxx, imx6, x86_64

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
6 years ago
David Bauer 5896b146a4 ipq40xx: fix NBG6617 LED mapping
The NBG6617's LEDs are wrongly identified in the 01_leds boardinit
script (board instead of boardname), resulting in referencing
non-existent LEDs in UCI.

Signed-off-by: David Bauer <mail@david-bauer.net>
6 years ago
Daniel Golle 9bcc08958b oxnas: add console=ttyS0,115200 argument to bootargs
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
6 years ago
Daniel Golle cf7896117b oxnas: enable image metadata by setting SUPPORTED_DEVICES
For each board, set the legacy name as well as the new based on the
compatible-string from devicetree.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
6 years ago
Daniel Golle ef9b169df0 oxnas: remove stray kernel config symbols
CONFIG_CRYPTO_* shouldn't be set by the target

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
6 years ago
Daniel Golle 4f017c871d oxnas: switch to generic board detect
remove /lib/oxnas.sh platform-specific board-detection and use
generic which is based on device-tree compatible node instead.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
6 years ago
Martin Weinelt 0411813c6f
ramips: fix leds on GL.iNet GL-MT300N-V2
The WAN LED now shows the link state. It's color is green,
not blue.

Signed-off-by: Martin Weinelt <hexa@darmstadt.ccc.de>
6 years ago
Christian Lamparter dceee8cc09 ipq-wifi: drop custom board-2.bins
The BDFs for all boards were upstreamed to the ath10k-firmware
repository and linux-firmware.git.

We switched to the upstream board-2.bin, hence the files can be removed
here.

Keep the ipq-wifi package in case new boards are added. It might take
some time till board-2.bins send upstream are merged.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
6 years ago
Christian Lamparter 8b18fce3b8 ipq40xx: nbg6617: switch to upstream boardfile variant
The NBG6617's boardfile was merged and this device can
now switch to the upstream ath10k board-2.bin.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
6 years ago
Christian Lamparter 6840f15a16 ipq40xx: rt-ac58u: replace ubi auto load hack
This patch replaces the custom autoload quirk of the
RT-AC58U with a bootargs-append overwrite.

The vendor's u-boot doesn't leave the bootargs / cmdline alone,
so the it can't be overwritten in any other way right now...
And of course, this will be a lot of fun to deal with once
the device switches to the new spi-nand subsystem.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
6 years ago
Koen Vandeputte 162e016fed ar71xx: expand kernel size for ubnt targets
Kernel 4.14 is pretty large causing a build error as the partition is too small.
Expand the kernel partition a bit to make it fit.

* ubnt-uap-pro
* ubnt-unifi-outdoor-plus

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
6 years ago
Koen Vandeputte d6b63f1698 ar71xx: disable ap91-5g due to kernel size
This target causes a build failure as the kernel image does not fit
into the kernel partition.

As the kernel is located behind the rootfs, it cannot be enlarged
as the boot entry location would get altered.

Disable this target for now.

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
6 years ago
Koen Vandeputte 7c78be1b74 ar71xx: switch more targets to dynamic partitioning
Targets:
- TP-LINK ER355
- TP-LINK C25 V1
- TP-LINK C59 V1
- TP-LINK C7 V4
- TP-LINK C7 V5

Fixes build issues seen due to the kernel being too big

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
6 years ago
Radek Dostál 9d35b68776 ar71xx: switch TP-Link RE450 v1 to dynamic partitioning
As mentioned in commit 5f24933 recent changes on ar71xx (switch to 4.14,
memory compaction, ...) cause an increase in kernel size, making it too
big for RE450.

RE450 images were not build due to the following error message:
os-image partition too big (more than 1572864 bytes): Success

Tested on RE450, device boots and was used to send this patch.

Reported-by: Enrico Mioso <mrkiko.rs@gmail.com>
Suggested-by: David Bauer <mail@david-bauer.net>
Signed-off-by: Radek Dostál <rd@radekdostal.com>
[rewrote commit msg keeping it tight + fixed SoB lines]
Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
6 years ago
David Bauer f89fc43a50 ar71xx: move OCEDO Koala to generic and use dynamic partitioning
This changes the OCEDO Koala flash-layout to a unified firmware
partition, thus making the ar71xx-generic kernel fit in flash.

Compile and runtested on OCEDO Koala.

Signed-off-by: David Bauer <mail@david-bauer.net>
[small title reword]
Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
6 years ago
Mathias Kresin 374e646724 ath79: fix PQI Air Pen support
Use the correct dts filename. It has to be <soc>_<manufacturer>_<device>.

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
YuheiOKAWA 27eae6597e ath79: add support for PQI Air Pen
SoC: AR9330 (or AR9331 revision?)
Ethernet x1, Wireless 2.4G, uSD card slot x1.
USB Power, include Li-Po Battery.

Flash 8MiB. (factory is dual image)
1. write image is use half 4MiB size from factory.
  write initramfs image to mtd6 and mtd7.
2. change next boot setting. next is mtd6 boot.
  echo -ne "\x01" | dd of=/dev/mtdblock8 conv=notrunc bs=1 count=1 seek=0

3. rewrite sysupgrade image.
  change next boot setting. next is mtd4.
  echo -ne "\x00" | dd of=/dev/mtdblock8 conv=notrunc bs=1 count=1 seek=0

OEM mtd.
dev:    size   erasesize  name
mtd0: 00040000 00010000 "u-boot"
mtd1: 00010000 00010000 "u-boot-env"
mtd2: 00010000 00010000 "ART"
mtd3: 00010000 00010000 "NVRAM"
mtd4: 00140000 00010000 "uImage"
mtd5: 00280000 00010000 "rootfs"
mtd6: 00140000 00010000 "uImage2"
mtd7: 00280000 00010000 "rootfs2"
mtd8: 00010000 00010000 "CONF"

Signed-off-by: YuheiOKAWA <tochiro.srchack@gmail.com>
6 years ago
Roger Pueyo Centelles 23f9b2d9a9 ath79: Add support for Ubiquiti LiteAP ac (LAP-120)
This commit adds support for the Ubiquiti LiteAP ac (LAP-120), an outdoor
5 GHz AC access point with an integrated 120° 16 dBi antenna. The device
was previously known as LiteBeam AP ac but was later rebranded.

CPU:    Atheros AR9342 SoC
RAM:    64 MB DDR2
Flash:  16 MB NOR SPI
Ports:  1 GbE port (PoE in)
WLAN:   5 GHz QCA899X (PCI)

The integrated QCA899X is a Ubiquiti branded part with modified vendor
and product id (0777:11ac9). It is very similar to the NanoStation loco
AC, except for the 2.4 GHz management radio (missing here).

Installation procedure is the same as the NanoStation [loco] AC:

1. Connect to serial header on device
2. Power on device and enter uboot console
3. Set up tftp server serving an openwrt initramfs build
4. Load initramfs build using the command tftpboot in the uboot cli
5. Boot the loaded image using the command bootm
6. Copy squashfs openwrt sysupgrade build to the booted device
7. Use mtd to write sysupgrade to partition "firmware"
8. Reboot and enjoy

Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
6 years ago
Koen Vandeputte 5f298b95a1 kernel: add missing symbol for target bcm53xx
Fixes: ca88f4153f ("kernel: bump 4.14 to 4.14.77")

Reported-by: Rafał Miłecki <rafal@milecki.pl>
Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
6 years ago
Rafał Miłecki 9b385b2496 bcm53xx: use upstream SPI controller fix
This just moves patch to use 0xx prefix and includes maintainer's s-o-b.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
6 years ago