Commit Graph

22082 Commits (d3c0a944059bb0d45c3b56278249100258378b0c)

Author SHA1 Message Date
Rosen Penev 19be55aa37 toolchain/wrapper: replace legacy backticks with $()
This replaces deprecated backticks by more versatile $(...) syntax.

Found with shellcheck.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
[alter commit title, extend commit message]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Rosen Penev 9edf808e35 mvebu: gen_mvebu_sdcard_img.sh: don't use format directly in printf
Enables proper checking. Matches printf behavior in C.

Found with shellcheck.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
[add prefix to commit title]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Rosen Penev 927210a828 mvebu: gen_mvebu_sdcard_img.sh: replace let with $(())
let is a bashism.

Found with shellcheck.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
[add prefix to commit title]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
David Bauer c48b571ad7 ramips: add LED trigger for TL-WR902AC v3 WAN LED
This adds an LED trigger for the WAN LED on top of the TP-Link
TL-WR902AC v3. Currently, only the LED on the port itself shows the link
state, while the LED on top of the device stays dark.

The WAN port of the device is a hybrid LAN/WAN one, hence why the LED at
the port was labled LAN.

Signed-off-by: David Bauer <mail@david-bauer.net>
4 years ago
Álvaro Fernández Rojas 9941edc724 brcm2708: image: stop using mkknlimg script
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years ago
Álvaro Fernández Rojas 5c06657e42 brcm2708: switch to upstream cpufreq driver
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years ago
Felix Fietkau b2d10977a8 Revert "kernel: fix kmemleak warnings introduced in 305-mips_module_reloc.patch"
This reverts commit a03afef7f2e8ae363a97357ec75ffbfef372a9ea.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
4 years ago
Adrian Schmutzler e0382e88a9 ipq806x: build DEVICE_DTS based on SOC and device name
This patch uses the SOC variable to calculate DTS names automatically
based on the SOC and the device definition node name.

This reduces redundancy and (by having to choose DTS name
appropriately) will unify the naming of a device in different places
(image/Makefile, DTS name, compatible, image name). This is supposed
to make life easier for developers and reviewers.

Since the kernel uses a "soc-device.dts" scheme for this target, we
use this for the derivation of DEVICE_DTS, too, leaving the DTS names
unchanged for this target.

Note that for some devices the kernel itself uses inconsistent names
(DTS naming scheme vs. compatible), leaving us with a manual overwrite
of DEVICE_DTS for those cases.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Adrian Schmutzler 9c7025b779 ipq40xx: build DEVICE_DTS based on SOC and device name
This patch uses the SOC variable to calculate DTS names automatically
based on the SOC and the device definition node name.

This reduces redundancy and (by having to choose DTS name
appropriately) will unify the naming of a device in different places
(image/Makefile, DTS name, compatible, image name). This is supposed
to make life easier for developers and reviewers.

Since the kernel uses a "soc-device.dts" scheme for this target, we
use this for the derivation of DEVICE_DTS, too, and rename the files
not having followed it so far.

Note that for some devices the kernel itself is inconsistent, leaving
us with a manual overwrite for ap.dk01.1-c1 and ap.dk04.1-c1.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Adrian Schmutzler 09d38a3bc3 ramips: remove bogus ralink,mtd-eeprom with offset 0x4
Several devices in mt76x8 subtarget use the following line to set
up wmac in their DTS(I) files:

ralink,mtd-eeprom = <&factory 0x4>

This is strange for several reasons:
- They should use mediatek,mtd-eeprom on this SOC
- The caldata is supposed to start at 0x0
- The parent DTSI mt7628an.dtsi specifies mediatek,mtd-eeprom anyway,
  starting from 0x0
- The offset coincides with the default location of the MAC address
  in caldata

Based on the comment in b28e94d4bf ("ramips: MiWiFi Nano fixes"),
it looks like the author for this device wanted to actually use
mtd-mac-address instead of ralink,mtd-eeprom. A check on the same
device revealed that actually the MAC address start at offset 4 there,
so the correct caldata offset is 0x0.

Based on these findings, and the fact that the expected location on
this SOC is 0x0, we remove the "ralink,mtd-eeprom = <&factory 0x4>"
statement from all devices in ramips (being only mt7628an anyway).

Thanks to Sungbo Eo for finding and researching this.

Reported-by: Sungbo Eo <mans0n@gorani.run>
Fixes: b28e94d4bf ("ramips: MiWiFi Nano fixes")
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Felix Fietkau 441052f44a kernel: fix kmemleak warnings introduced in 305-mips_module_reloc.patch
Physically allocated memory for modules needs to be registered with kmemleak,
so it can track it as object.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
4 years ago
Paul Fertser 0b7d779dcf ipq40xx: use ath10k-ct-smallbuffers for 128 MiB devices
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
4 years ago
Ansuel Smith b04ccdb1e8 ipq806x: fix wrong definition for tsense calib
We have only 11 sensors on ipq806x. Fix the reg property
to load the right amount of data instead of the entire
space.

Tested-by: Stefan Lippers-Hollmann <s.l-h@gmx.de> [nbg6817/ipq8065]
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
4 years ago
Ansuel Smith 77f4d5c6bb ipq806x: rework ipq806x specific tsense temp driver
Tsense driver for ipq806x have various problem.
- Emit wrong error. On probing of this driver, nvmem driver can be
  not ready and this cause a EDEFER error. Actually this is not an
  error as the kernel will retry to probe the driver after the
  nvmem driver is loaded.
- Use uninitialized value on trigger of critical temp
- Doesn't free allocated memory

Because of this, rework the driver and improve it by removing extra
load of data.

Change the logic of loading data. Use the backup calib data only
when the calib data is not present. As the calibration is only
needed to set the temp offset, we don't really need to read
both calib data and set the offset based only on the backup one.
Also change how the notifier function work. At times when we
output the trigger message, we already have read the temp so
remove the extra read and the wrong uninitialized data that
probably caused a kernel panic for null pointer exception.
(Think we never experience this bug because the router
never reached that temp ever... So just lucky)

Tested-by: Stefan Lippers-Hollmann <s.l-h@gmx.de> [nbg6817/ipq8065]
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
4 years ago
Ansuel Smith a666f817a2 ipq806x: update kernel config with new driver
The config name for cpufreq driver has changed.

Tested-by: Stefan Lippers-Hollmann <s.l-h@gmx.de> [nbg6817/ipq8065]
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
4 years ago
Ansuel Smith c8086c7d2d ipq806x: refresh new and changed patches
Refresh patches to remove fuzz

Tested-by: Stefan Lippers-Hollmann <s.l-h@gmx.de> [nbg6817/ipq8065]
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
4 years ago
Ansuel Smith 62a4e4b319 ipq8065: update dtsi with new opp table
The new driver use opp table to register frequency.
Drop psv bindings as they are not used anymore.

Tested-by: Stefan Lippers-Hollmann <s.l-h@gmx.de> [nbg6817/ipq8065]
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
4 years ago
Ansuel Smith adc0bebd87 ipq8064: update dtsi with new opp table
The new driver use opp table to register frequency.
Drop psv bindings as they are not used anymore.
Adds speedbin definition for nvmem driver

Tested-by: Stefan Lippers-Hollmann <s.l-h@gmx.de> [nbg6817/ipq8065]
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
4 years ago
Ansuel Smith e18f8e417f ipq806x: add patch to support krait cpu scaling driver
This patch has been proposed but never actually merged to
mainline. It was accepted but never re proposed by the
creator.
Rework it, fix kernel panic cause by double kfree.

Tested-by: Stefan Lippers-Hollmann <s.l-h@gmx.de> [nbg6817/ipq8065]
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
4 years ago
Ansuel Smith a37f787162 ipq806x: backport qcom-cpufreq-kryo patch
Backport patch applied to qcom-cpufreq-kryo
driver as krait cpu will base on this driver.

Tested-by: Stefan Lippers-Hollmann <s.l-h@gmx.de> [nbg6817/ipq8065]
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
4 years ago
Ansuel Smith 4165f2340e ipq806x: drop old cpufreq patch
Drop old cpufreq as now we have new driver that
can use normal kernel opp definition

Tested-by: Stefan Lippers-Hollmann <s.l-h@gmx.de> [nbg6817/ipq8065]
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
4 years ago
Ansuel Smith e9a982e1d9 ipq806x: opp/core: update patch updating voltage tolerance on voltage adjust
Rework 0052-PM-OPP-Update-the-voltage-tolerance-when-adjusting-t
to reflect changes upstream.

- Skip unnecessary allocation of buffer to set u_volt
- Change opp u_volt directly

Tested-by: Stefan Lippers-Hollmann <s.l-h@gmx.de> [nbg6817/ipq8065]
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
4 years ago
Ansuel Smith 456ab9a912 ipq806x: opp/core: update patch allowing adjusting of OPP voltages at runtime
Update 0049-PM-OPP-Support-adjusting-OPP-voltages-at-runtime with
upstream version.

Tested-by: Stefan Lippers-Hollmann <s.l-h@gmx.de> [nbg6817/ipq8065]
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
4 years ago
Ansuel Smith 5ab9c0b388 ipq806x: fix bug in L2 cache scaling
It has been notice a buf in L2 cache scaling where the scaling is not
done proprely if the frequency is set to the initial state before
the new frequency.

From: https://patchwork.kernel.org/patch/10565443/

* The clocks are set to aux clock rate first to make sure the
* secondary mux is not sourcing off of QSB. The rate is then set to
* two different rates to force a HFPLL reinit under all
* circumstances.

In the initial stage of boot to force a new frequency to apply, is
needed to first set the frequency back to the lowest one (aux_rate)
and then to the target one. This force and make sure the controller
actually switch the frequency to the right one. Apply the same
mechanism to L2 frequency scaling. Before scaling to the target
frequency, first set the frequency to the aux_rate to force the
transition, then scale it to the target frequency. Doing the wrong way
can produce unexpected results and could lock the scaling mechanism
until a full reboot is done (Causing a full reset by the krait-cc driver)

From: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=77612720a2362230af726baa4149c40ec7a7fb05

When the Hfplls are reprogrammed during the rate change,
the primary muxes which are sourced from the same hfpll
for higher frequencies, needs to be switched to the 'safe
secondary mux' as the parent for that small window. This
is done by registering a clk notifier for the muxes and
switching to the safe parent in the PRE_RATE_CHANGE notifier
and back to the original parent in the POST_RATE_CHANGE notifier.

This should apply also to L2 scaling... as we can't relly use
the notifier, we manually do this on L2 scaling.

Tested-by: Stefan Lippers-Hollmann <s.l-h@gmx.de> [nbg6817/ipq8065]
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
4 years ago
Paul Fertser 3e51cb7820 ath79: tp-link: use ath10k-ct-smallbuffers for 64 MiB devices
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
4 years ago
Álvaro Fernández Rojas 1579599079 brcm2708: fix malformed patch
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years ago
Álvaro Fernández Rojas c2308a7e4a brcm2708: update to latest patches from RPi Foundation
Also removes reverted patches.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years ago
Álvaro Fernández Rojas 67dcc43f3a brcm2708: organize kernel patches
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years ago
Hauke Mehrtens 47a93a810f kernel: bump 4.9 to 4.9.207
Refreshed all patches.

Compile-tested on: ar7
Runtime-tested on: none

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years ago
Hauke Mehrtens 25b422a041 kernel: bump 4.14 to 4.14.160
Refreshed all patches.

Compile-tested on: ipq40xx, apm821xx
Runtime-tested on: ipq40xx

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years ago
Hauke Mehrtens f0df0d6a14 kernel: bump 4.19 to 4.19.91
Refreshed all patches.

Compile-tested on: ipq40xx, apm821xx
Runtime-tested on: ipq40xx

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years ago
Koen Vandeputte e115fa478f kernel: bump 4.19 to 4.19.90
Refreshed all patches.

Remove upstreamed:
- 010-dmaengine-dw-dmac-implement-dma-prot.patch
- 950-0148-Increase-firmware-call-buffer-size-to-48-bytes.patch
- 950-0206-Mailbox-firmware-calls-now-use-kmalloc-2749.patch
- 402-leds-trigger-netdev-fix-handling-on-interface-rename.patch

Fixes:
- CVE-2019-19332

Compile-tested on: cns3xxx
Runtime-tested on: cns3xxx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
[Add 010-dt-bindings-dmaengine-dw-dmac-add-protection-control.patch]
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years ago
Koen Vandeputte 7604e53d5f kernel: bump 4.14 to 4.14.159
Refreshed all patches.

Remove upstreamed:
- 302-0002-dmaengine-dw-implement-per-channel-protection-contro.patch

Fixes:
- CVE-2019-19332

Compile-tested on: cns3xxx
Runtime-tested on: cns3xxx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
4 years ago
Paul Fertser db992e7b53 ath79: use ath10k-ct-smallbuffers for 64 MiB devices
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
4 years ago
Florian Fainelli c715f71bce treewide: Remove self from MAINTAINER entries
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
4 years ago
Hauke Mehrtens 729d7bc751 kernel: Deactivate CONFIG_SFP in generic config
Deactivate CONFIG_SFP for kernel 4.19 in the generic configuration.
The CONFIG_SFP configuration option was not set to anything in the
ath79 build for me, set it to deactivated by default.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years ago
Hauke Mehrtens b0b1d4aaf0 ath79: Do not build dlink_dir-615-e4 by default
The factory image for the dlink_dir-615-e4 is getting too big which makes
the full ath79 tiny build fail, deactivate it by default.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years ago
Álvaro Fernández Rojas 2d899a69e7 brcm2708: remove unneeded patches
- wireless patches
- defconfig patches

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years ago
Sven Roederer eca05bc4cc ramips: add label MAC address for Mikrotik RB750Gr3
The device label contains:
E01: 74:4D:28:xx:xx:30
E05: 74:4D:28:xx:xx:34

The first value corresponds to the address set in hard_config 0x10.

That one is taken for the label MAC address.

Signed-off-by: Sven Roederer <freifunk@it-solutions.geroedel.de>
4 years ago
Adrian Schmutzler e4ce3109f2 ramips: simplify state_default/pinctrl0 in device DTS files
The node pinctrl0 is already set up in the SOC DTSI files, but
defined again as member of pinctrl in most of the device DTS(I)
files. This patch removes this redundancy for the entire ramips
target.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
John Sommerville 6041eb9547 build: build proper VMDK formats for ESXI 6.5
VMWare ESXI 6.5 and above is not compatible with
subformat=monolithicSparse (The default qemu-img convert -O VMDK option).
Monolithic Sparse vmdk can be imported, but issues occur when running
sysupgrade with new images and other tasks that modify the file system
(issues like Kernel panics, reboot loops, sometimes crashing the Host ESXI
box).

This change creates an additional VMDK output file for ESXI that sets the
subformat to monlithicFlat, and the adapter_type to the SCSI lsilogic
controller.

This change existed back on:
25e36d379e

But it looks like the change was removed when refactoring occurred with:
5f6a2732f892b6229473576d89cc963ae9c97d5d

Signed-off-by: John Sommerville <jsommerville@untangle.com>
4 years ago
Kevin Schmidt 77e27e0f53 lantiq: enable 5ghz wifi on VR200/VR200v
Enable mt76 driver on VR200/VR200v.

Signed-off-by: Kevin Schmidt <kevin.patrick.schmidt@googlemail.com>
4 years ago
Aleksander Jan Bajkowski 692390225d lantiq: fix phys led
led2l and led2h value is incorrectly set by led3l and led3h.
Bug was introduced in commit: 863e79f8d5

Signed-off-by: Aleksander Jan Bajkowski <A.Bajkowski@stud.elka.pw.edu.pl>
Fixes: 863e79f8d5 ("lantiq: add support for kernel 4.9")
4 years ago
Sungbo Eo ea5cf7c0dd ramips: fix MAC address setup for Xiaomi MiWiFi Nano
MAC addresses are stored in factory partition at:
0x0004: WiFi 2.4GHz (label_mac +1)
0x0028: LAN, WAN (label_mac)

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
4 years ago
Sungbo Eo 74e9f95c79 ramips: further improve support for Xiaomi MiWiFi Nano
This patch does the following:

- prepend vendor name to model
- set status LEDs to follow the behavior in stock FW
- simplify state_default node definition
- use generic name for flash node

Stock FW status indicators:
https://files.xiaomi-mi.com/files/Mi_Router_Wi-Fi_Nano/Mi_router-NANO_EN.pdf
> Yellow: power on / off
> Blue: during normal operation
> Red: in case of problems with the operation of the device

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
4 years ago
Adrian Schmutzler e2eb6d5829 lantiq: move include to parent falcon_lantiq_easy98000.dtsi
This moves the include of lantiq.dtsi from the DTS files to the
parent falcon_lantiq_easy98000.dtsi.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Adrian Schmutzler 397aa5d37d lantiq: remove ar9_lantiq_easy50810.dts
This file seems to be orphaned, no device setup existing for it.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Adrian Schmutzler c640370939 lantiq: use soc_vendor_device scheme on DTS file
This renames lantiq DTS(I) files to follow soc_vendor_device scheme.
This will make DTS files easier to maintain.

As a side effect, DTS file name can be derived from device node
names now, only having to specify a SOC variable in Makefiles.

While at it, move files to arch/mips/boot/dts/lantiq subfolder.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Adrian Schmutzler de6dd7a8db lantiq: split device definitions into files
This splits device definitions into several *.mk files to increase
overview.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Martin Blumenstingl 4c88b3b5dc lantiq: dts: assign the ASC pins to the serial controller node
Assign the ASC pins to the serial controller node instead of using pin
hogging (where pins are assigned to the pin controller).
This is the preferred way of assigning pins upstream.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
4 years ago
Martin Blumenstingl 8e7b573b7a lantiq: dts: assign the PCI pins to the PCI controller node
Assign the PCI pins to the PCI controller node instead of using pin
hogging (where pins are assigned to the pin controller).
This is the preferred way of assigning pins upstream.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
4 years ago
Martin Blumenstingl dcb5e52209 lantiq: dts: assign the STP pins to the STP GPIO controller node
Assign the STP pins to the STP GPIO controller node instead of using
pin hogging (where pins are assigned to the pin controller).
This is the preferred way of assigning pins upstream.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
4 years ago
Martin Blumenstingl 660200e53d lantiq: dts: assign the GPHY LED pins to the Ethernet controller node
Assign the GPHY LED pins to the Ethernet controller node instead of
using pin hogging (where pins are assigned to the pin controller).
This is the preferred way of assigning pins upstream.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
4 years ago
Martin Blumenstingl 7298c25f74 lantiq: dts: assign the NAND pins to the nand-controller node
Assign the NAND pins to the NAND controller node instead of using pin
hogging (where pins are assigned to the pin controller).
This is the preferred way of assigning pins upstream.

While here, define all NAND pins (CLE, ALE, read/RD, ready busy/RDY and
CE/CS1). This means that the pinctrl subsystem knows that these pins are
in use and cannot be re-assigned as GPIOs for example.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
4 years ago
Martin Blumenstingl edb0a936f0 lantiq: dts: define the SPI pins in {amazonse,ar9,vr9}.dtsi
Define the SPI pins in the corresponding SoCs.dtsi and assign them to
the SPI controller node. All known boards use CS4 and it's likely that
this is hardcoded in bootrom so this doesn't bother with having
per-board SPI pinmux settings.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
4 years ago
Martin Blumenstingl b3bdfd5df5 lantiq: dts: assign the MDIO pins to the gsw node
Assign the MDIO pins to the switch node instead of using pin hogging
(where pins are assigned to the pin controller).
This is the preferred way of assigning pins upstream.

This converts amazonse, ar9 and vr9. danube is skipped because the pin
controller doesn't define a pinmux for the MDIO pins (some of the SoC
pads may be hardwired to the MDIO pins instead of being configurable).

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
4 years ago
Adrian Schmutzler 8ea7aa5380 ramips: further DTS improvements for Edimax RG21S
This fixes the state_default node by setting the correct groups and
inheriting &state_default from parent DTSI directly.

The compatible for the wifi nodes is changed to the more generic
mediatek,mt76.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Adrian Schmutzler 02f8dbc6fe ramips: add eth0 MAC address for Edimax RG21S
So far, lan/wan MAC address for Edimax RG21S are only read using
mtd_get_mac_ascii, so eth0.1 and eth0.2 addresses are set, but
eth0 address is random. Since the device's LAN address is the same
as for 2.4 GHz, though, this patch set's the eth0 address based
on the 2.4 GHz one, which can be extracted by mtd-mac-address.

This will also allow to move the label MAC address setup to DT.

The setup of lan_mac and wan_mac are kept in 02_network, so those
locations are still in use, too.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Sungbo Eo d0efb1ba95 ipq40xx: remove unnecessary usb nodes in DTS for ASUS RT-AC58U
RT-AC58U has single USB 3.0 port, and only usb3_port1 is actually used.

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
4 years ago
Sungbo Eo 8083969405 ipq40xx: improve ASUS RT-AC58U support
This patch does the following:

- move WiFi LED setup to DTS
- fix LAN/WAN MAC addresses and add label MAC address
- wan5G -> wlan5G, power -> led_power
- increase flash SPI frequency to 30MHz

MAC addresses are stored in Factory partition at:
0x1006: WiFi 2.4GHz, WAN (label_mac)
0x5006: WiFi 5GHz, LAN (label_mac +4)

By improving flash speed,
`time dd if=/dev/mtdblock8 of=/dev/null bs=2k`
is reduced from 7m 10.26s to 5m 9.52s.
Using higher frequencies did not improve speed further.

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
4 years ago
Sungbo Eo 9b02d32e34 ar71xx: fix MAC address setup for TL-WDR4300 board
The current ethernet MAC address setup of TL-WDR4300 board is different
from the setup of stock firmware:

OpenWrt: lan = label_mac -2, wan = label_mac -2
  stock: lan = label_mac,    wan = label_mac +1

This patch applies to all devices using TL-WDR4300 board:
TL-WDR3600 v1
TL-WDR4300 v1
TL-WDR4300 v1 (IL)
TL-WDR4310 v1
Mercury MW4530R v1

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
4 years ago
Sungbo Eo a4260eaab7 ath79: fix MAC address setup for TP-Link TL-WDR3600/TL-WDR4300
The current ethernet MAC address setup of TL-WDR4300 board is different
from the setup of stock firmware:

OpenWrt: lan = label_mac -2, wan = label_mac -2
  stock: lan = label_mac,    wan = label_mac +1

The full address assignment is as follows:
LAN  label
WAN  label + 1
5G   label
2G   label - 1

This patch changes all devices using TL-WDR4300 board:
TL-WDR3600 v1 (checked on device)
TL-WDR4300 v1 (checked on device)
TL-WDR4300 v1 (IL)

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
[rephrase/extend commit title/message]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
David Bauer 102c8c55f2 ipq40xx: add support for Aruba AP-303
Hardware
--------

SoC:   Qualcomm IPQ4029
RAM:   512M DDR3
FLASH: - 128MB NAND (Macronix MX30LF1G18AC)
       - 4MB SPI-NOR (Macronix MX25R3235F)
TPM:   Atmel AT97SC3203
BLE:   Texas Instruments CC2540T
       attached to ttyMSM0
ETH:   Atheros AR8035
LED:   WiFi (amber / green)
       System (red / green)
BTN:   Reset

To connect to the serial console, you can solder to the labled pads next
to the USB port or use your Aruba supplied UARt adapter.

Do NOT plug a standard USB cable into the Console labled USB-port!
Aruba/HPE simply put UART on the micro-USB pins. You can solder yourself
an adapter cable:

VCC - NC
 D+ - TX
 D- - RX
GND - GND

The console setting in bootloader and OS is 9600 8N1. Voltage level is
3.3V.

To enable a full list of commands in the U-Boot "help" command, execute
the literal "diag" command.

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

1. Get the OpenWrt initramfs image. Rename it to ipq40xx.ari and put it
   into the TFTP server root directory. Configure the TFTP server to
   be reachable at 192.168.1.75/24. Connect the machine running the TFTP
   server to the ethernet port of the access point.

2. Connect to the serial console. Interrupt autobooting by pressing
   Enter when prompted.

3. Configure the bootargs and bootcmd for OpenWrt.
   $ setenv bootargs_openwrt "setenv bootargs console=ttyMSM1,9600n8"
   $ setenv nandboot_openwrt "run bootargs_openwrt; ubi part aos1;
     ubi read 0x85000000 kernel; bootm 0x85000000"
   $ setenv ramboot_openwrt "run bootargs_openwrt;
     setenv ipaddr 192.168.1.105; setenv serverip 192.168.1.75;
     netget; set fdt_high 0x87000000; bootm"
   $ setenv bootcmd "run nandboot_openwrt"
   $ saveenv

4. Load OpenWrt into RAM:
   $ run ramboot_openwrt

5. After OpenWrt booted, transfer the OpenWrt sysupgrade image to the
   /tmp folder on the device.

6. Flash OpenWrt:
   $ ubidetach -p /dev/mtd1
   $ ubiformat /dev/mtd1
   $ sysupgrade -n /tmp/openwrt-sysupgrade.bin

To go back to the stock firmware, simply reset the bootcmd in the
bootloader to the original value:

  $ setenv bootcmd "boot"
  $ saveenv

Signed-off-by: David Bauer <mail@david-bauer.net>
4 years ago
Sungbo Eo 1f455418ef ramips: fix USB LED for Belkin F9K1109v1
Device support for Belkin F9K1109v1 was added using set_usb_led()
although this was removed in 772b27c207 ("ramips: set F5D8235 v1
usb led trigger via devicetree").

Use ucidef_set_led_usbport() instead.

Fixes: f2c83532f9 ("ramips: add support for Belkin F9K1109v1")

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
[rephrase commit title and message]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Adrian Schmutzler b085e0586f sunxi: rename SUNXI_SOC to SOC
This replaces SUNXI_SOC by the newly introduced common SOC device
variable.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Adrian Schmutzler 58e71e322b ramips: rename MTK_SOC to SOC
This replaces MTK_SOC by the newly introduced common SOC device
variable.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Adrian Schmutzler 95030ac0b6 ath79: rename ATH_SOC to SOC
This replaces ATH_SOC by the newly introduced common SOC device
variable.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Adrian Schmutzler 0757f7fedc ath79: harmonize line breaks in image Makefiles
This harmonizes the line wrapping in image Makefile device
definitions, as those are frequently copy-pasted and are a common
subject of review comments. Having the treatment unifying should
reduce the cases where adjustment is necessary afterwards.

Harmonization is achieved by consistently (read "strictly")
applying certain rules:
- Never put more than 80 characters into one line
- Fill lines up (do not break after 40 chars because of ...)
- Use one tab for indent after wrapping by "\"
- Only break after pipe "|" for IMAGE variables

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Adrian Schmutzler e417ff88f1 ramips: harmonize line breaks in image Makefiles
This harmonizes the line wrapping in image Makefile device
definitions, as those are frequently copy-pasted and are a common
subject of review comments. Having the treatment unifying should
reduce the cases where adjustment is necessary afterwards.

Harmonization is achieved by consistently (read "strictly")
applying certain rules:
- Never put more than 80 characters into one line
- Fill lines up (do not break after 40 chars because of ...)
- Use one tab for indent after wrapping by "\"
- Only break after pipe "|" for IMAGE variables

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Paul Fertser 05d35403b2 ath79-tiny: enable 4k sectors
This enables using 4kiB sectors as erase blocks for 4MiB NOR flash ICs
that support it.

Writeable jffs2 overlay used to store settings requires a partition with
at least 5 erase blocks, so using small sectors is essential for devices
with 4MiB flash.

Sysupgrading a device running firmware without this feature will likely
not allow to preserve configs automatically but since ath79 is
considered to be in a "technology preview" state it shouldn't be a
problem.

Signed-off-by: Paul Fertser <fercerpav@gmail.com>
4 years ago
Paul Fertser b14e529dd7 ath79: add D-Link DIR-615 E4
Specifications:

- FCC ID: KA2IR615E3
- SoC: MIPS32 24K 400 MHz Atheros AR7240
- RAM: 32 MiB DDR SDRAM ESMT M13S2561616A-5T
- Flash: 4 MiB NOR SPI Macronix MX25L3208E
- Wireless: AR9287 2.4 GHz 802.11n 2T2R, 2x RP-SMA connectors
- Ethernet: 5x 100BASE-TX Fast Ethernet
- LEDs: 9x GPIO, 1x ath9k
- Buttons: 2x tactile switches
- UART: 3.3 V, 115200 8n1
- USB: simple hardware modification required, 1x USB 1.1 Full Speed

Partitioning notes:

Vendor firmware (based on CameoAP99) defines two additional partitions:
"mac" @0x3b0000, size 0x10000 and "lp" @0x3c0000, size 0x30000.

The "mac" partition stores LAN MAC address and hardware board name.
However, the vendor firmware uses addresses from "nvram" partition, and
the board name is used only for informational purposes in the Web
interface (included in the pages' header), not affecting the firmware
image check.

The "lp" partition is supposed to contain a "language pack" (which can
be used to add an additional language support to the Web interface) and
is flashed separately, using the vendor firmware upgrade page.

Since these partitions are absolutely useless for OpenWrt and
overwriting them doesn't prevent downgrading to obsolete vendor
firmware, this patch appends the valueable space to "firmware".

Installation instructions:

- Upgrade from OpenWrt ar71xx with "sysupgrade -f -n"
or
- Upload as a firmware update via the vendor Web-interface
or
- Connect UART and use "loady" to upload and run OpenWrt initramfs
  image, then sysupgrade from it (TFTP client doesn't work)
or
- Before powering up hold "reset" button and keep it pressed for about
  15 seconds after, then access fail safe Web server on 192.168.0.1 (the
  old uIP TCP/IP protocol stack is not compatible with modern Linux, the
  kernel, so you'll need to use some other OS to do this). Can be
  performed without a Web-browser too:
    curl http://192.168.0.1/cgi/index \
      -F Send=@openwrt-ath79-tiny-dlink_dir-615-e4-squashfs-factory.bin

Signed-off-by: Paul Fertser <fercerpav@gmail.com>
4 years ago
Michal Cieslakiewicz ad6c6361f9 ath79: enable all space on Netgear ar9344-based WNDR routers
Netgear WNDR routers (AR9344 models) like WNDR4300 have 128 MiB of flash
memory but only first 32 MiB are used now - both by vendor's firmware and
OpenWrt. This patch concatenates two regions of flash memory: ubi part
of firmware partition and reserved (unused) space beyond 'caldata_backup'
while preserving ART backup. No data is wiped or moved away.
This increases area for OS ubi volumes from 23 to 119 Megabytes.

Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>
4 years ago
Ansuel Smith 2a82e0e1ca ipq806x: switch to 4.19 kernel version
It has been used by several people for some time already and feedback
has been mostly positive.

Ref: https://github.com/openwrt/openwrt/pull/2472
Tested-by: Hannu Nyman <hannu.nyman@iki.fi> [ipq8065, R7800]
Tested-by: Stefan Lippers-Hollmann <s.l-h@gmx.de> [ipq8065, NBG6817]
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
[separate commit, commit subject and description facelift]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years ago
Ansuel Smith ce8707ea79 ipq806x: update USB3 modules for 4.19
- Use new dwc3-qcom usb driver.
- Drop dwc3-of-simple as we have a dedicated driver now.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
[split into separate commit, commit subject facelift]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years ago
Pavel Kubelun 77e7d6c20d ipq806x: add missing core1 voltage tolerance
Voltage tolerance is accounted per core, not per cpu, so add
missing DT entry.

Signed-off-by: Pavel Kubelun <be.dissent@gmail.com>
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
4 years ago
Ansuel Smith 402153623d ipq806x: fix tsens driver in 4.19
Added patch:

 - 063-3 Fix tsense shared memory problem

Recent changes in ioremap_resource function are causing fails for the
memory areas which are already mapped. This changes are causing tsense
driver failures during initialization:

  qcom-tsens 900000.thermal-sensor: tsens init failed

So this patch uses simple ioremap in order to use this shared memory
space.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
[commit subject and desciption facelitf]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years ago
Christian Lamparter f28e6ae7ce ipq806x: improve mdio gpios list
Improve rediability of gpio mdio list. No functional change.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
[proper authorship of the patch]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years ago
Christian Lamparter 2296d41a1c ipq806x: ap161: fix wrong definition stdout
From documentation
https://www.kernel.org/doc/Documentation/devicetree/bindings/chosen.txt
should be just stdout-path

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
[proper authorship of the patch]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years ago
Christian Lamparter 044c79689b ipq806x: ap148: reorganize dts
Reorganize dts to use tags from ipq8064 dtsi

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
4 years ago
Christian Lamparter fe26364065 ipq806x: d7800: fix warning on dtc compilation
There is warning with "property has invalid length (4 bytes)"
related to nand definition. Set size-cells to zero to fix this.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
4 years ago
Christian Lamparter 1acc054341 ipq806x: r7800: add missing wifi definition for pcie
Add missing wifi compatible definition for r7800 device.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
4 years ago
Christian Lamparter 2da033eaa6 ipq806x: use ipq8064 dedicated watchdog
Add missing watchdog to list of compatible timers

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
4 years ago
Christian Lamparter df35293000 ipq806x: add nand and sata tags
Add some tags for nand and sata structure to easily
reference them in other dts.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
4 years ago
Christian Lamparter 5ce72009ac ipq806x: increase drive-strength for pinmux
Increase drive-strength from
https://lore.kernel.org/patchwork/patch/626885/

2mA drive strength is not enough when we connect multiple i2c devices
on the bus with different pull up resistors.

This issue was detected when multiple i2c devices
connected on the other side of level shifters on Linaro sensor board.
Maxing up to 16mA made i2c much stable.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
4 years ago
Christian Lamparter 9e7a8beb9c ipq806x: add missing gpio and gsbi declaration
Adds missing gpio and gsbi declaration.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
4 years ago
Ansuel Smith 2336c2dbb1 ipq806x: disable spc on ipq8065 soc
Spc is disabled in ipq8065 board as it does cause cpu lockup
(probably caused by wrong register being set)

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
4 years ago
Ansuel Smith 71b1062230 ipq806x: set apq8064 regulator to support cpuidle
Set qcom,apq8064-saw2-v1.1-cpu as regulator to make cpuidle work.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
4 years ago
Christian Lamparter 61505922dc ipq806x: convert ipq8064 dtsi interrupts
Convert hardcoded interrupts value to types defined in gci include file.
Interrupts sets to 0 are converted to IRQ_TYPE_LEVEL_HIGH to fix
kernel warning. Same fix has been applied to arm64 dts.

https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1797143
https://patchwork.kernel.org/patch/10367453/
https://patchwork.kernel.org/patch/10315315/

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
4 years ago
Christian Lamparter afcb78f103 ipq806x: use new usb3 implementation
Use new usb3 implementation and refresh dts to the new dwc3 structure

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
[proper authorship of the patch]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years ago
Christian Lamparter 96a509eeeb ipq806x: fix missing compatible and rename
- ipq8064 compatible was missing from nbg6817.
- Rename ap148 with a better descriptive name.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
[proper authorship of the patch]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years ago
Christian Lamparter 9e9fe2392e ipq806x: convert ok to okay in dts
DT spec require okay instead of ok in dts files

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
4 years ago
Christian Lamparter 63066d3006 ipq806x: refresh 4.19 patches
Reworked:

 - 0034 patchset update

Added:

 - 080 Add support for pinctrl-msm framework

Removed:

 - 0074-ipq806x-usb-Control-USB-master-reset.patch
   (we now have a dedicated driver for qcom usb)

 - 0047-mtd-nand-Create-a-BBT-flag-to-access-bad-block-marke
   (merged upstream)

 - 310-msm-adhoc-bus-support
   (it looks like it was never actually used in any dts)

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
[commit subject and description facelift, SoB fix]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years ago
Ansuel Smith 53801ae1c7 kernel: generic: add missing config symbol to 4.19
PCI_V3_SEMI config symbol was found missing in generic kernel config
after ipq806x config refresh to 4.19.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
[commit subject and description facelift]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years ago
Ansuel Smith f81e148eb6 ipq806x: update 4.19 kernel config
These changes are needed in order to migrate old kernel 4.14 config to
the upcoming kernel version 4.19.  Also add missing configuration
options that comes up with this SoC.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
[line wrap long commit description, add 4.19 to subject, soc->SoC]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years ago
Ansuel Smith c5d2f3c476 ipq806x: copy files from 4.14 to 4.19
This copies files from files-4.14 to files-4.19 directory in order to
get clear diffs for any changes done from now on.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
[added missing commit description, refreshed ea8500 and wpq864 DTS]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years ago
Lech Perczak b1e8a390ea ath79: restore gpio-export on TL-WDR3600/4300
This partially reverts commit 32144ba275.

This commit replaced gpio-exports in favor of gpio-hogs for enabling USB
power at boot, but this rids the user of control of the USB port power
present on this device for a long time. It was agreed on a mailing list
[1] that this is not the way to go, and this patch breaks a very common
use-case of WWAN modem reset by power cycle, used on a lot USB equipped
routers, hence revert this change until a better solution can be found.

[1] http://lists.infradead.org/pipermail/openwrt-devel/2019-November/020151.html

Tested-by: Sungbo Eo <mans0n@gorani.run>
Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
[adjusted commit title]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Lech Perczak 60de1fdbb4 ath79: add support for TP-Link TL-WR902AC v1
TP-Link TL-WR902AC v1 is a pocket-size, dual-band (AC750), successor of
TL-MR3020 (both devices use very similar enclosure, in same size). New
device is based on Qualcomm QCA9531 v2 + QCA9887. FCC ID: TE7WR902AC.

Specification:

- 650/391/216 MHz (CPU/DDR/AHB)
- 1x 10/100 Mbps Ethernet
- 1x USB 2.0 (GPIO-controlled power)
- 64 MB of RAM (DDR2)
- 8 MB of FLASH
- 2T2R 2.4 GHz (QCA9531)
- 1T1R 5 GHz (QCA9887)
- 5x LED (GPIO-controlled), 2x button, 1x 3-pos switch
- UART pads on PCB (TP1 -> TX, TP2 -> RX, TP3 -> GND, TP4 -> 3V3, jumper
  resitors are missing on TX/RX lines)
- 1x micro USB (for power only)

Flash instructions:

Use "factory" image under vendor GUI.

Recovery instructions:

This device contains tftp recovery mode inside U-Boot. You can use it to
flash OpenWrt (use "factory" image) or vendor firmware.

1. Configure PC with static IP 192.168.0.66/24 and tftp server.
2. Rename "openwrt-ath79-generic-tplink_tl-wr902ac-v1-squashfs-factory.bin"
   to "wr902acv1_un_tp_recovery.bin" and place it in tftp server dir.
3. Connect PC with LAN port, press the reset button, power up the router
   and keep button pressed until WPS LED lights up.
4. Router will download file from server, write it to flash and reboot.

MAC Address summary:
- wlan1 (2.4GHz Wi-Fi): Label MAC
- wlan0 (5GHz Wi-Fi): Offset -1 from label
- eth0 (Wired): Offset +1 from label

Root access over serial line in vendor firmware: root/sohoadmin.

Based on support in ar71xx target by: Piotr Dymacz <pepe2k@gmail.com>

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
[remove size-cells from gpio-export]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Maxim Anisimov ebf535a6cf ramips: fix portmap for TP-Link Archer C50 v4
According to 02_network portmap is wan=0 lan1=1 lan2=2 lan3=3 lan4=4

Signed-off-by: Maxim Anisimov <maxim.anisimov.ua@gmail.com>
4 years ago
Álvaro Fernández Rojas 922b538cc9 brcm2708: switch to cypress-nvram package
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years ago
Álvaro Fernández Rojas efe15993d3 brcm2708: switch to cypress-firmware package
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years ago
Adrian Schmutzler f45a16dead ramips: allow to set switchdev by board in ramips_set_preinit_iface
This adds the option to determine switchdev by board when setting
preinit iface for failsafe. The patch reorganizes the code to use
functions for setting correct switchdev based on SOC and board,
which is supposed to improve readability and maintainability.

In this patch, the ramips_switchdev_from_board function is added
without specifying an actual device using it. This is meant to
make the life of device supporters waiting for merge easier, as
there is less to rebase and keep track of.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Sungbo Eo 38bdfcdb87 ramips: add support for ipTIME A104ns
ipTIME A104ns is a 2.4/5GHz band AC750 router, based on MediaTek MT7620A.

Specifications:
- SoC: MT7620A
- RAM: DDR2 64MB
- Flash: SPI NOR 8MB
- WiFi:
  - 2.4GHz: SoC internal
  - 5GHz: MT7610EN
- Ethernet: 5x 10/100Mbps
  - Switch: SoC internal
- USB: 1x 2.0
- UART:
  - J2: 3.3V, TX, RX, GND (3.3V is the square pad) / 57600 8N1

Installation via web interface:
1.  Flash **initramfs** image through the stock web interface.
2.  Boot into OpenWrt and perform sysupgrade with sysupgrade image.

Revert to stock firmware:
1.  Perform sysupgrade with stock image.

In contrast to to-be-supported A1004ns, the A104ns has no usable
value in 0x1fc40 (uboot), so wan_mac needs to be calculated.
Also note that GPIOs for the LEDs really are inverted compared to
the A1004ns.

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
[moved state_default to device DTS, reordered properties in wmac,
added comment about wan_mac and LED GPIOs]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Sungbo Eo 01d39cd18c ath79: migrate LED paths of TL-WDR4300 board
TL-WDR4300 board uses only green LED names in DTSI.
This patch adds migration for them.

The actual LED colors on the devices have been reported to vary
across subrevisions (v1.x). Despite, the USB LEDs on the back might
have different color than the other LEDs on the front.

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
[extended commit message]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Adrian Schmutzler 2708d58c1d ramips: add label MAC address for Edimax RG21S
The Edimax RG21S has a label which bears two MAC addresses:
2.4 GHz (n) and 5 GHz (n+1)

The complete MAC address setup is as follows:
2.4 GHz  *:83  factory 0x4, u-boot-env wlanaddr
5 GHz    *:84  factory 0x8004
LAN      *:83  u-boot-env ethaddr
WAN      *:85  u-boot-env wanaddr

Since 2.4 GHz is the first address on the label and the same
as used for ethernet, take this one for label MAC address.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Birger Koblitz c79df949ab ramips: increase SPI frequency for Edimax RG21S
This increases SPI frequency from the relatively low 10 MHz to 40 MHz.

Signed-off-by: Birger Koblitz <mail@birger-koblitz.de>
[added commit title/message, split patch]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Birger Koblitz 8007853f79 ramips: remove unnecessary nodes in DTS for Edimax RG21S
This sdhci and i2c nodes were copy-pasted, but are not needed as
the device does not provide that functionality. Remove them.

Signed-off-by: Birger Koblitz <mail@birger-koblitz.de>
[added commit title/message, split patch]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
David Bauer 9e1e432469 ar71xx: indicate upgrade using system LED
This enables the system LED to indicate a running firmware upgrade. This
pattern is used on most platforms provided by the generic base-files
package. ar71xx uses it's own implementation for the system-LED, where
the upgrade case is not yet implemented.

Signed-off-by: David Bauer <mail@david-bauer.net>
4 years ago
David Bauer 16b01fb1b9 mpc85xx: add support for Enterasys WS-AP3710i
Hardware
--------

SoC:   NXP P1020 (2x e500 @ 800MHz)
RAM:   256M DDR3 (Micron)
FLASH: 32M NOR (Spansion S29GL128S)
BTN:   1x Reset
WiFi:  1x Atheros AR9590 2.4 bgn 3x3
       2x Atheros AR9590 5.0 an 3x3
ETH:   1x Gigabit Ethernet (Atheros AR8033)
LED:   System (green/red) - Radio{0,1} (green)
       LAN (connected to PHY)
        - GE blue
        - FE green

Serial is a Cisco-compatible RJ45 next to the ethernet port.
115200-N-8 are the settings for OS and U-Boot.

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

1. Grab the OpenWrt initramfs, rename it to 01C8A8C0.img. Place it in
   the root directory of a TFTP server and serve it at
   192.168.200.200/24.

2. Connect to the serial port and boot the AP. Stop autoboot in U-Boot
   by pressing Enter when prompted. Credentials are identical to the one
   in the APs interface. By default it is admin / new2day.

3. Set the bootcmd so the AP can boot OpenWrt by executing

   $ setenv boot_openwrt "setenv bootargs;
     cp.b 0xee000000 0x1000000 0x1000000; bootm 0x1000000"
   $ setenv bootcmd "run boot_openwrt"
   $ saveenv

   If you plan on going back to the vendor firmware - the bootcmd for it
   is stored in the boot_flash variable.

4. Load the initramfs image to RAM and boot by executing

   $ tftpboot 0x1000000 192.168.200.200:01C8A8C0.img; bootm

5. Make a backup of the "firmware" partition if you ever wish to go back
   to the vendor firmware.

6. Upload the OpenWrt sysupgrade image via SCP to the devices /tmp
   folder.

7. Flash OpenWrt using sysupgrade.

   $ sysupgrade -n /tmp/openwrt-sysupgrade.bin

Signed-off-by: David Bauer <mail@david-bauer.net>
4 years ago
DENG Qingfang 1b7199c90c ramips: add support for JCG JHR-AC876M
JCG JHR-AC876M is an AC2600M router

Hardware specs:
  SoC: MT7621AT
  2.4GHz: MT7615N 4x4 @ PCIe0
  5GHz: MT7615N 4x4 @ PCIe1
  Flash: Winbond W25Q128JVSQ 16MiB
  RAM: Nanya NT5CB128M16 256MiB
  USB 2.0 and 3.0 ports
  6 LEDs, 3 of which are connected to SoC GPIO
  Reset and WPS buttons

Flash instructions:
Stock to OpenWrt:
  Upload factory.bin in stock firmware's upgrade page,
  do not preserve settings

OpenWrt to stock:
  Push and hold the reset button for 5s while power cycling to
  enter recovery mode;
  Visit 192.168.1.1 and upload stock firmware

MAC addresses map:
  0x0004  *:1c  wlan2g/wan/label
  0x8004  *:20  wlan5g
  0xe000  *:1b  lan
  0xe006  *:1a  not used in stock fw

Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
4 years ago
Adrian Schmutzler 0bf4d681d4 ramips: allow JCG_MAXSIZE in kiB in Build/jcg-header
This allows JCG_MAXSIZE to be specified in kilobytes. This makes
this value more consistent and easier comparable with other size
variables.

This also changes the only occurence of the variable, for Cudy WR1000.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Sungbo Eo a972b1fb5f ramips: add support for ipTIME A6ns-M
ipTIME A6ns-M is a 2.4/5GHz band AC1900 router, based on MediaTek MT7621A.

Specifications:
- SoC: MT7621AT
- RAM: DDR3 128MB
- Flash: SPI NOR 16MB
- WiFi:
  - 2.4GHz: MT7615
  - 5GHz: MT7615
- Ethernet: 5x 10/100/1000Mbps
  - Switch: SoC internal
- UART:
  - J4: 3.3V, TX, RX, GND (3.3V is the square pad) / 57600 8N1

Installation via web interface:
1.  Flash **initramfs** image through the stock web interface.
2.  Boot into OpenWrt and perform sysupgrade with sysupgrade image.

Revert to stock firmware:
1.  Perform sysupgrade with stock image.

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
4 years ago
Adrian Schmutzler 5cda133d99 ramips: DTS style improvements for mt7621_wevo_w2914ns-v2.dtsi
This does several trivial DTS style improvements:

- Move device name compatible to DTS files (and fix compatible in
  11acnas.dts)
- Remove xhci node as status is set to okay in mt7621.dtsi already
- 0x0 instead of 0x0000
- Simplify state_default node definition

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Sungbo Eo 0375c076b6 ramips: add support for ZIO FREEZIO
ZIO FREEZIO is a 2.4/5GHz band AC1200 router, based on MediaTek MT7621A.

Specifications:
- SoC: MT7621AT
- RAM: DDR3 128MB
- Flash: SPI NOR 16MB
- WiFi:
  - 2.4GHz: MT7603EN
  - 5GHz: MT7612EN
- Ethernet: 5x 10/100/1000Mbps
  - Switch: SoC internal
- USB: 1x 3.0
- UART:
  - J4: 3.3V, RX, TX, GND (3.3V is the square pad) / 57600 8N1

Notes:
- FREEZIO has almost the same board as WeVO W2914NS v2.
- Stock firmware is based on OpenWrt BB.

MAC addresses in factory partition:
0x0004: WiFi 2.4GHz (label_mac-8)
0x002e: WAN (label_mac)
0x8004: WiFi 5GHz (label_mac-4)
0xe000: LAN (label_mac+1)

Installation via web interface:
1.  Access web admin page and turn on "OpenWrt UI mode".
2.  Flash sysupgrade image through LuCI, with the "Keep settings" option
    OFF.

Revert to stock firmware:
1.  Perform sysupgrade with stock image.
    Make sure to NOT preserve settings.

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
[rebase, use mt7621_wevo_w2914ns-v2.dtsi]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Roman Bazalevsky 69fff339e9 sunxi: add support for FriendlyARM Nano PI NEO Air dev board
Hardware:

  Allwinner H3 upto 1.2GHz
  512MB DDR3 RAM
  8GB on-board eMMC - mountable, can be used as boot with custom boot.scr
  microSD-card slot
  WiFi 802.11n (AP6212A) - working
  Bluetooth (AP6212A) - not working for now
  Micro-USB OTG + 2*USB headers
  UART 3.3V - working
  GPIO/I2C/SPI 2.54mm headers

Standard sunxi SD-card installation procedure - copy image to SD card,
insert in into slot and boot. First time you will need UART adapter to
enable on-board wireless (or just build custom image with enabled WiFi).

To boot from eMMC:

  - boot from SD
  - copy SD image to emmc (dd bs=... if=.... of=/dev/mmcblk2)
  - mount eMMC boot partition and replace boot script on it
  - unmount, reboot

To use i2c, spi and more uarts - replace dtb on boot partition with
fixed one (use dtc or fdt-tools).

Signed-off-by: Roman Bazalevsky <rvb@rvb.name>
[rebase onto device name consolidation patches]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Adrian Schmutzler 3a4ad758f5 sunxi: construct DTS name from device node name and SOC
The device part in the SUNXI_DTS variable always corresponds to
device node name. This is another redundancy that can be removed
by calculating the DTS name from a newly introduced SUNXI_SOC
variable and the node name.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Adrian Schmutzler a4cdb537b1 sunxi: use vendor_device scheme for device definitions
This changes device definition to resemble the vendor_device scheme
already present for the majority of device compatible strings.

By doing this, we achieve several advantages at once:
- Image names and node names are more consistent with other targets.
- SUPPORTED_DEVICES can be set automatically for all but two cases.
- Image names and node names are in line with DEVICE_TITLEs.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Adrian Schmutzler c642a97aa6 ath79: add support for TP-Link TL-WDR4300 v1 (IL)
The TL-WDR4300 v1 sold in Israel has a different TPLINK_HWID.

Thanks to Josh4300 for testing on device.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Adrian Schmutzler 8e91b18ab7 ath79: redistribute UBNT variables in Ubiquiti image Makefile
The variables UBNT_BOARD and UBNT_VERSION are defined in the parent
Device/ubnt definition and then overwritten for most of the derived
platform definitions (e.g. Device/ubnt-wa).

Since this mixed use of inheritance and overwriting can be misleading,
this moves the variables to the platform-based definitions.

While at it, reorder the definitions to have order consistent, too.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Adrian Schmutzler 68ef534989 ramips: add label MAC address for Mikrotik RBM33G
The device label contains:
E01: B8:69:F4:xx:xx:07
E02: B8:69:F4:xx:xx:09

The first value corresponds to the address set in hard_config 0x10.

That one is taken for the label MAC address.

Thanks to Martin Schiller for retrieving the information.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Adrian Schmutzler 772af7f98d ramips: rt305x: use flash location for wan_mac in 02_network
This uses the flash locations instead of eth0 MAC address to
calculate MAC address increments for WAN.

The change will make the MAC address setup of a particular device
more obvious and removes the dependency of 02_network on the eth0
initialization.

This removes the wan_mac setup for the following devices as they
do not set up a MAC address for ethernet in the first place:
- asiarf,awapn2403
- belkin,f7c027
- dlink,dir-615-d
- mofinetwork,mofi3500-3gn
- prolink,pwh2004
- ralink,v22rw-2x2
- unbranded,wr512-3gn-4m
- unbranded,wr512-3gn-8m

While at it, make some DT node labels consistent with the label
property.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Adrian Schmutzler a858d6d0e2 ramips: rt288x: use flash location for wan_mac in 02_network
This uses the flash locations instead of eth0 MAC address to
calculate MAC address increments for WAN.

The change will make the MAC address setup of a particular device
more obvious and removes the dependency of 02_network on the eth0
initialization.

This removes the wan_mac setup for ralink,v11st-fe as this device
does not set up a MAC address for ethernet in the first place.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Adrian Schmutzler fef1810897 ramips: mt76x8: use flash location for wan_mac in 02_network
This uses the flash locations instead of eth0 MAC address to
calculate MAC address increments for WAN.

The change will make the MAC address setup of a particular device
more obvious and removes the dependency of 02_network on the eth0
initialization.

While at it, change the partition label for zyxel,keenetic-extra-ii
to factory to be consistent with node label and all the other devices.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Adrian Schmutzler ed975a58e4 ramips: mt7621: use flash location for wan_mac in 02_network
This uses the flash locations instead of eth0 MAC address to
calculate MAC address increments for WAN.

The change will make the MAC address setup of a particular device
more obvious and removes the dependency of 02_network on the eth0
initialization.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Adrian Schmutzler 98d9158d2f ramips: mt7620: use flash location for wan_mac in 02_network
This uses the flash locations instead of eth0 MAC address to
calculate MAC address increments for WAN.

The change will make the MAC address setup of a particular device
more obvious and removes the dependency of 02_network on the eth0
initialization.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Adrian Schmutzler 38866f275d ramips: remove wan_mac setup for evaluation boards
The evaluation boards do not set up a MAC address for eth0
in the first place, so it does not make sense to calculate a WAN
address from the random MAC used there.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Adrian Schmutzler 757658f2ab ramips: create common DTSI for TP-Link Archer C20i/C20 v1/C50 v1
The TP-Link Archer C20i/C20 v1/C50 v1 seem to be almost the same,
so creating a common DTSI will reduce duplicate code.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Adrian Schmutzler c4f6850efc ramips: remove unused DTS variable from DEVICE_VARS
The DTS variable has been removed in 402138d12d ("ramips: Derive
DTS name from device name in Makefile"), but the DEVICE_VARS entry
has been overlooked.

Remove it now since we are not using this variable.

This must _not_ be backported to 19.07, where the variable is still
in use.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Gabor Varga a283b1788a ramips: fix switch port numbering for RT-AC65P/RT-AC85P
The switch LAN port numbers are in reversed order with original config.
With this patch they are fixed.

Port order checked on both devices.

Signed-off-by: Gabor Varga <vargagab@gmail.com>
[merged definitions into appropriate block, extended commit message]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Adrian Schmutzler e00396d584 ramips: add label MAC address for TP-Link Archer C20i
Current OpenWrt MAC setup:
eth0             &rom 0xf100    :48
eth0.2           eth0+1         :49
wlan0 (5 GHz)    &radio 0x8004  different OUI
wlan1 (2.4 GHz)  &radio 0x4     same OUI as wlan0

Label MAC address corresponds to eth0 (&ethernet).

No additional addresses found in hexdump of rom/radio.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
DENG Qingfang 46c74944df ath79: fix typos in DTS
Replace "usb_ochi" with "usb_ohci", and "usb_echi" with "usb_ehci".

Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
4 years ago
Koen Vandeputte 88ca372b5a kernel: bump 4.19 to 4.19.88
Refreshed all patches.

Remove upstreamed:
- 0004-boot-sq201-from-sda1.patch
- 500-v4.20-ubifs-Fix-default-compression-selection-in-ubifs.patch
- 0003-usb-dwc2-use-a-longer-core-rest-timeout-in-dwc2_core.patch

Altered patches:
- 0011-ARM-dts-Fix-up-SQ201-flash-access.patch
- 400-mtd-add-rootfs-split-support.patch
- 0101-pci-mediatek-backport-fix-pcie.patch

Compile-tested on: cns3xxx
Runtime-tested on: cns3xxx

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

Altered patches:
- 400-mtd-add-rootfs-split-support.patch

Compile-tested on: cns3xxx
Runtime-tested on: cns3xxx

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

Altered patches:
- 400-mtd-add-rootfs-split-support.patch

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

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
4 years ago
Daniel Golle e964338110 malta: remove CONFIG_LEGACY_PTY from kernel config
Having legacy PTYs enabled causes problems with procd-hotplug.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
4 years ago
Daniel Golle 2105354968 sunxi: remove CONFIG_LEGACY_PTY from kernel config
Having legacy PTYs enabled causes problems with procd-hotplug.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
4 years ago
Daniel Golle 414d027ae8 layerscape: remove CONFIG_LEGACY_PTY from kernel config
Having legacy PTYs enabled causes problems with procd-hotplug.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
4 years ago
Daniel Golle 411e824ec3 kirkwood: remove CONFIG_LEGACY_PTY from kernel config
Having legacy PTYs enabled causes problems with procd-hotplug.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
4 years ago
Daniel Golle c1db4d9c56 at91: disable legacy PTYs and virtual terminals
Enabling legacy PTYs causes problems with procd-hotplug.
And as this is a headless target, no need to have virtual terminals.
Remove corresponding kernel config options, they are disabled in
generic kernel config.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
4 years ago
Daniel Golle d0d7f5d9e4 mpc85xx: remove CONFIG_LEGACY_PTY from kernel config
Having legacy PTYs enabled causes problems with procd-hotplug.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
4 years ago
Daniel Golle 8069e9734b ixp4xx: remove CONFIG_LEGACY_PTY from kernel config
Having legacy PTYs enabled causes problems with procd-hotplug.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
4 years ago
Daniel Golle dcf48fda05 uml: remove CONFIG_LEGACY_PTY from kernel config
Having legacy PTYs enabled causes problems with procd-hotplug.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
4 years ago
Daniel Golle c881769a55 oxnas: disable legacy PTYs and virtual terminals
Enabling legacy PTYs causes problems with procd-hotplug.
And as this is a headless target, no need to have virtual terminals.
Remove corresponding kernel config options, they are disabled in
generic kernel config.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
4 years ago
Adrian Schmutzler 231dc26867 treewide: remove dts-v1 identifier from DTSI files
The "/dts-v1/;" identifier is supposed to be put once at the beginning
of a device tree file. Thus, it makes no sense to provide it a second
time in to-be-included DTSI files.

This removes the identifier from all DTSI files in /target/linux.

Most of the DTS files in OpenWrt do contain the "/dts-v1/;". It is
missing for most of the following targets, though:
mvebu, ipq806x, mpc85xx, ipq40xx

This does not touch ipq806x for now, as the bump to 4.19 is close.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Olli Asikainen deb835849a brcm47xx: add switch configuration for WNR3500L
Netgear WNR3500L is an already supported device, but out of the
box, the device has no switch configuration and there is no wan.
The correct configuration for this specific model is similar to
some other models. This simple commit adds the correct switch
and the out-of-the-box experience is improved.

Experimentally determined:

Port 0 => WAN
Port 1..4 => LAN
Port 5..7 => unused
Port 8 => CPU

Signed-off-by: Olli Asikainen <olli.asikainen@gmail.com>
Tested-by: Fabian Zaremba <fabian@youremail.eu>
[added port mapping to commit message]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Adrian Schmutzler 34abfb6e91 ramips: convert mediatek,mtd-eeprom from decimal to hex notation
A small subset of devices uses decimal notation for mediatek,mtd-eeprom
in DTS files. Convert to hexadecimal notation to be consistent with
all the rest.

Also change "0" to "0x0" in the same files for consistency.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Martin Schiller 3a55c7935d ramips: fix number of LAN Ports for Mikrotik RBM33G
The Mikrotik RBM33G has only 2 LAN ports.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
[moved node in 02_network to maintain alphabetic sorting]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Walter Sonius a065cd29bf ramips: fix switch port order for TP-Link Archer C20i
Physical port order watched from the backside of the C20i
(from left to right) is: Internet / 1 / 2 / 3 / 4

Physical Port	Switch port
WAN             0
LAN 3           1
LAN 4           2
LAN 1           3
LAN 2           4
(not used)      5
CPU             6

Signed-off-by: Walter Sonius <walterav1984@gmail.com>
[commit message/title improvements]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Christian Lamparter a428606646 ath79: fix WNDR3700/WNDR3800 wifi reg size
"[...] the size component shall be zero."
(See "PCI Bus Binding to: IEEE Std 1275-1994 Rev 2.1"
section "4.1.1 Open Firmware-defined Properties for Child Nodes")

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
4 years ago
John Crispin a512123a4b mediatek: fix pcie bringup issue
Signed-off-by: John Crispin <john@phrozen.org>
5 years ago
Stijn Tintel 157e17e985 ath79: add support for Ubiquiti LiteBeam AC Gen2
Hardware:
* SoC: Atheros AR9342-BL1A
* RAM: 64MB DDR2 (Winbond W9751G6KB-25)
* Flash: 16MB SPI NOR (Macronix MX25L12835FZ2I-10G)
* Ethernet: 1x 10/100/1000 Mbps (Atheros AR8035-A) with 24V PoE support
* Wifi 2.4GHz: Atheros AR9340 v2
* WiFi 5GHz: Ubiquiti U-AME-G1-BR4A (rebranded QCA988X v2)
* LEDs: 1x Power, 1x Ethernet
* Buttons: 1x Reset
* UART: 1x TTL 115200n8, 3.3V RX TX GND, 3.3V pin closest to RJ45 port

The LEDs do not seem to be connected to any GPIO, so there is currently
no way to control them.

Installation via U-Boot, TFTP and serial console:
* Configure your TFTP server with IP 192.168.1.254
* Connect serial console and power up the device
* Hit any key to stop autoboot
* tftpboot 0x81000000 openwrt-ath79-generic-ubnt_litebeam-ac-gen2-initramfs-kernel.bin
* bootm 0x81000000
* copy openwrt-ath79-generic-ubnt_litebeam-ac-gen2-squashfs-sysupgrade.bin
  to /tmp
* sysupgrade /tmp/openwrt-ath79-generic-ubnt_litebeam-ac-gen2-squashfs-sysupgrade.bin

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
Acked-by: Petr Štetiar <ynezz@true.cz>
Acked-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years ago