Non-US versions of the TP-Link TL-WR710N v1 don't have a region code so
far, so we can just set US unconditionally.
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
Depending on busybox applet selection, paths of basic utiilties may differ,
and may not work as symlinks to busybox. Simply using whatever binary is
found in PATH and detecting symlinks automatically is more robust and
easier to maintain.
The list of binaries is also slightly cleaned up and duplicates are
removed.
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
RAMFS_COPY_* are moved to platform.sh toplevel. The nand_do_upgrade call is
moved to platform_do_upgrade.
Fixes: 30f61a34b4 "base-files: always use staged sysupgrade"
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
RAMFS_COPY_* are moved to platform.sh toplevel. The unneeded
linksys_preupgrade function is removed, and the nand_do_upgrade call is
moved to platform_do_upgrade.
Fixes: 30f61a34b4 "base-files: always use staged sysupgrade"
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
TP-Link TL-WR902AC has another one, tiny LED inside RJ45 socket which is
attached to GPIO15. Add support for it, use it as a "lan" LED and rename
old one to "internet". Also, fix uci option name for "lan" LED in system
configuration ("wan" -> "lan").
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
Until we enable requirement for metadata in sysupgrade images under
ar71xx target, this prevents users from using wrong image.
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
This commit adds metadata to TP-Link sysupgrade images
created by tplink-safeloader with uImage kernel header.
Signed-off-by: Henryk Heisig <hyniu@o2.pl>
With kernel 4.8 common used code was moved to a shared kmod. Add the
missing dependency to the shared snd-soc-simple-card-utils.ko.
Signed-off-by: Mathias Kresin <dev@kresin.me>
There is no device tree property named phynmode0. Use phy-mode as it is
done for the other ethernet nodes.
Signed-off-by: Mathias Kresin <dev@kresin.me>
Netgear DM200 is an inexpensive VDSL modem:
CPU: VRX220 MIPS 34Kc 5.6 @ 500Mhz
RAM: 64MiB
Flash: 8MiB
Ethernet: 1x100M
DSL: VDSL2+, ADSL2+
reset button, 3x bi-color LEDs
Serial port is 115200 baud, on the 4 pin header; pins from the bottom to
top are GND, RX, TX.
To upgrade from the vendor firmware, upload factory.img
The DM200 bootloader supports flashing over TFTP; hold the reset button
while powering on the device, and wait for the power light to start
flashing green before releasing. The device is now listening on
192.168.0.1/24, and can be sent a factory.img or a netgear image with a
TFTP put.
Once the image is loaded, it will be written to the flash, and the
device will reboot; this will take a few minutes.
Thanks to Edward O'Callaghan and Baptiste Jonglez, who implemented their
own ports for this device and provided valuable feedback.
Signed-off-by: Thomas Nixon <tom@tomn.co.uk>
Most of the ubnt-erx definition can be reused; the package removals in
DEVICE_PACKAGES have become redundant after d17cb4a68a "ramips: purge
default packages on MT7621".
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
This change enables .itb image generation for AP148,
It will help us to boot and test AP148 with NOR flash.
Signed-off-by: Ram Chandra Jangir <rjangir@codeaurora.org>
The warning will be triggered by jffs2 or UBI, and partial writes are no
issue for most flash chips.
Fixes: 2a2b16210b ("brcm63xx: backport upstream solution for SPI message size limits")
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
Add patches-4.9, some of them (heavily) rewritten:
- ea4500 is upstream available, keep only LEDE changes in dts
- ea3500 is changed to match the structure of the upstream ea4500 dts
- nsa310s rewritten to include the common dtsi
- nsa325 is dropped, since already upstream
Signed-off-by: Paul Wassi <p.wassi@gmx.at>
Signed-off-by: Alberto Bursi <alberto.bursi@outlook.it>
[refresh kernel config, add on100, use the switchdev based mv88e6171
driver for the linksys boards, keep lede specific rootfs/kernel
partition names for linksys boards, reorder patches]
Signed-off-by: Mathias Kresin <dev@kresin.me>
The Netgear UI in basic mode refuses the upgrade file if the the
fileextension is not img. The expert/advanced mode accepts any
fileextension. Use img to make it work in any case.
Signed-off-by: Mathias Kresin <dev@kresin.me>
Rename TPLINK_BOARD_NAME to TPLINK_BOARD_ID for two ommited devices.
Fixes: 7d6c63d ("build: rename TPLINK_BOARD_NAME to TPLINK_BOARD_ID")
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
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 LEDE (use "factory" image) or vendor firmware.
1. Configure PC with static IP 192.168.0.66/24 and tftp server.
2. Rename "lede-ar71xx-generic-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.
Root access over serial line in vendor firmware: root/sohoadmin.
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
We can use "tplink-fw" mtd splitter for TP-Link devices which use kernel
with TP-Link header embedded inside "safeloader" image type and thus get
rid of statically defined "kernel" and "rootfs" partitions in cmdline.
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
Refresh mikrotik subtarget kernel config and enable kernel support for
boards which belong to this subtarget only.
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
Refresh nand subtarget kernel config and enable kernel support for
boards which belong to this subtarget only.
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
Refresh target kernel config and disable kernel support for all boards
which belong to nand and mikrotik subtargets only.
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
I tested this on a WRT54GS and a WRT610N V1.
The WRT610N does not boot when the kernel is too big, so I deactivated KALLSYMS
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
On the Linksys WRT54GSv1, the Power LED flickers in the "off" state.
Indicate status using the DMZ LED if available, since it has solid "on" and
"off" states.
This change was tested on the WRT54GSv1, but may also affect other brcm47xx
devices.
Fixes FS#793.
Signed-off-by: Mirko Parthey <mirko.parthey@web.de>
On the Linksys WRT54GSv1, the adm6996 switch driver and the
gpio_button_hotplug module both claim GPIO 6, which is connected to the
Reset button. When the switch driver's request wins, the Reset button
cannot work. This makes it impossible to enter failsafe mode without a
serial console.
Stop requesting the "adm_rc" GPIO in the switch driver, since it is not
used anywhere.
Fixes FS#792.
Signed-off-by: Mirko Parthey <mirko.parthey@web.de>
SOC: Broadcom BCM6368 (2 * Broadcom BMIPS4350 V3.1 / 400 MHz)
Flash size: 32MB (split 16/16 dual boot)
RAM size: 64MB
Wireless: BCM432x 802.11a/b/g/n(pci)
Ethernet: Broadcom BCM53115
USB: 1 x USB 2.0
Known issues:
- Unable to detect 53115 switch attached to MDIO. Not supported
- No support for the cable port
More info on the device and the research can be found at:
http://www.actiontec.com/212.html
Same FCC ID as:
https://wikidevi.com/wiki/Actiontec_V1000H_(Telus)
Signed-off-by: Anthony Sepa <anthonysepa@yahoo.ca>
[jonas.gorski: fix commit subject/message]
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
The pinmux register is at relative offset 0x8, not 0xc. Fixes hang
when trying to modify pins >= 32.
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
Commit 9fec39a (ar71xx: add support for TP-Link TL-WA855RE v1) introduced a
typo in 02_network, fix it by removing the stray paren.
Reported-by: Henryk Heisig <hyniu@o2.pl>
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
TPLINK_HWID hasn't been specified for TP-Link RE450 since the begin.
As we don't want to break sysupgrade (all existing LEDE release images
for this board have TPLINK_HWID set to 0x0), set it explicitly to 0x0.
Fixes FS#852
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
TP-Link TL-WR840N v4 and TL-WR841N v13 are simple N300 routers with
5-port FE switch and non-detachable antennas. Both are very similar
and are based on MediaTek MT7628NN (aka MT7628N) WiSoC.
The difference between these two models is in number of available
LEDs, buttons and power input switch.
This work is partially based on GitHub PR#974.
Specification:
- MT7628N/N (580 MHz)
- 64 MB of RAM (DDR2)
- 8 MB of FLASH
- 2T2R 2.4 GHz
- 5x 10/100 Mbps Ethernet
- 2x external, non-detachable antennas
- UART (J1) header on PCB (115200 8n1)
- TL-WR840N v4: 5x LED (GPIO-controlled), 1x button
- TL-WR841N v13: 8x LED (GPIO-controlled*), 2x button, power input
switch
* WAN LED in TL-WR841N v13 is a dual-color, dual-leads type which isn't
(fully) supported by gpio-leds driver. This type of LED requires both
GPIOs state change at the same time to select color or turn it off.
For now, we support/use only the green part of the LED.
Factory image notes:
These devices use version 3 of TP-Link header, fortunately without RSA
signature (at least in case of devices sold in Europe). The difference
lays in the requirement for a non-zero value in "Additional Hardware
Version" field. Ideally, it should match the value stored in vendor
firmware header on device ("0x4"/"0x13" for these devices) but it seems
that anything other than "0" is correct.
We are able to prepare factory firwmare file which is accepted and
(almost) correctly flashed from the vendor GUI. As it turned out, it
accepts files without U-Boot image with second header at the beginning
but due to some kind of bug in upgrade routine, flashed image gets
corrupted before it's written to flash.
Tests showed that the GUI upgrade routine copies value of "Additional
Hardware Version" from existing firmware into offset "0x2023c" in
provided file, _before_ storing it in flash. In case of vendor firmware
upgrade files (which all include U-Boot image and two headers), this
offset points to the matching field in kernel+rootfs firmware part
header. Unfortunately, in case of LEDE factory image file which contains
only one header, it points to the offset "0x2023c" in kernel image. This
leads to a corrupted kernel and ends up with a "soft-bricked" device.
The good news is that U-Boot in these devices contains well known tftp
recovery mode, which can be triggered with "reset" button. What's more,
in comparison to some of older MediaTek based TP-Link devices, this
recovery mode doesn't write whole file at offset "0x0" in flash, without
verifying provided file in advance. In case of recovery mode in these
devices, first "0x20000" bytes are always skipped and "0x7a0000" bytes
from rest of the file are stored in flash at offset "0x20000".
Flash instruction:
Until (if at all) TP-Link fixes described problem, the only way to flash
LEDE image in these devices is to use tftp recovery mode in U-Boot:
1. Configure PC with static IP 192.168.0.66/24 and tftp server.
2. Rename "lede-ramips-mt7628-tl-wr84...-squashfs-tftp-recovery.bin"
to "tp_recovery.bin" and place it in tftp server directory.
3. Connect PC with one of LAN ports, press the reset button, power up
the router and keep button pressed for around 6-7 seconds, until
device starts downloading the file.
4. Router will download file from server, write it to flash and reboot.
To access U-Boot CLI, keep pressed "4" key during boot.
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
There are already two targets (lantiq, ramips) which use mktplinkfw2
tool for creating images. This de-duplicates code, introduces two new
build commands: tplink-v2-header, tplink-v2-image and makes use of
them in place of old, (sub)target specific ones.
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
TP-Link Archer C58 v1 is a dual-band AC1350 router, based on Qualcomm
QCA9561 + QCA9886. It looks like Archer C59 v1 without USB port.
Specification:
- 775/650/258 MHz (CPU/DDR/AHB)
- 64 MB of RAM (DDR2)
- 8 MB of FLASH (SPI NOR)
- 3T3R 2.4 GHz
- 2T2R 5 GHz
- 5x 10/100 Mbps Ethernet
- 6x LED, 3x button
- UART header on PCB, RX, TX at TP4+5 (backside)
QCA9886 wlan needs pre_cal_data file and enable ieee80211 phy hotplug to
patch macaddress.
Flash instruction:
Use "factory" image directly in vendor GUI.
Recovery method:
1. Set PC to fixed ip address 192.168.0.66/24.
2. Download "lede-ar71xx-generic-archer-c58-v1-squashfs-factory.bin" and
rename it to "tp_recovery.bin".
3. Start a tftp server with the file "tp_recovery.bin" in its root
directory.
4. Turn off the router.
5. Press and hold Reset button.
6. Turn on router with the reset button pressed and wait ~15 seconds.
7. Release the reset button and after a short time the firmware should
be transferred from the tftp server.
8. Wait ~30 second to complete recovery.
Flash instruction under U-Boot, using UART:
tftp 0x81000000 lede-ar71xx-...-sysupgrade.bin
erase 0x9f020000 +$filesize
cp.b $fileaddr 0x9f020000 $filesize
reset
This commit is based on GitHub PR#1112
Signed-off-by: Henryk Heisig <hyniu@o2.pl>
TP-Link TL-WA855RE v1 is a wall-plug N300 Wi-Fi range extender,
based on Qualcomm/Atheros QCA9533 v2.
Short specification:
- 550/397/198 MHz (CPU/DDR/AHB)
- 1x 10/100 Mbps Ethernet
- 32 MB of RAM (DDR1)
- 4 MB of FLASH
- 2T2R 2.4 GHz
- 2x external antennas
- 2x LED (green and orange in the same package), 2x button
- UART: TP5(TX) and TP4(RX) test points on PCB
Flash instruction: use "factory" image directly in vendor GUI.
Warning: this device does not include any kind of recovery mechanism
in the bootloader and disassembling process is not trivial.
You can access vendor firmware over serial line using:
- login: root
- password: sohoadmin
Image was tested only in EU version of the device, but should work
also with the same device version sold in other countries.
Signed-off-by: Federico Cappon <dududede371@gmail.com>
Use statically defined sizes for kernel and rootfs mtd partitions.
Vendor upgrade script writes both firmware parts independently which
ends up in a gap between kernel and rootfs images. This results in
incorrectly calculated rootfs_data start offset.
Also, fix IMAGE_SIZE, DEVICE_PACKAGES and drop redundant KERNEL
definition.
Fixes FS#835
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
Migrate Arduino Yun from legacy to generic building code.
Note: the mtd partitioning is changed to adopt the LEDE default
partitioning. It allows to have a kernel bigger than 1280k. It is
necessary as kernel > 4.4 with default LEDE configuration grows
bigger.
To use the new partitioning, you need to update your U-Boot env in
advance:
setenv mtdparts "spi0.0:256k(u-boot)ro,64k(u-boot-env),15936k(firmware),64k(nvram),64k(art)ro"
setenv bootcmd "run addboard; run addtty; run addparts; run addrootfs; bootm 0x9f050000 || bootm 0x9fea0000"
saveenv
Signed-off-by: Camille Bilodeau <camille.bilodeau@protonmail.com>
This way, the assigned addresses match those on the barcode labels.
Otherwise, the addresses appear to vary on boot.
Signed-off-by: Leon M. George <leon@georgemail.eu>
The kernel configs for all targets should have the version in the
filename, for clearness and consistency across all targets.
It is also expected by the update_kernel.sh script.
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
I did not port the regulator and power patches from Stefan Wahren
because I talked to him and he told me that work on this is currently
stalled. And since AFAIK nothing depends on these patches, leaving them
out seems reasonable.
I build minimum default configurations and run-tested them on both
I2SE Duckbill devices and Olimex Olinuxino Maxi boards successfully [1].
[1] Tested:
- debug uart is working
- boot without any obvious kernel problem
- network is coming up and data transfer is possible
- Olinuxino: USB detects a plugged-in pen drive
Signed-off-by: Michael Heimpold <mhei@heimpold.de>
[refreshed config and patches]
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
In preparation for bumping mxs target to 4.9, disable a bunch of configuration
symbols that provoked config prompts.
Signed-off-by: Michael Heimpold <mhei@heimpold.de>
- Refreshed all patches
- Adapted 1 (0031-mtd-add-SMEM-parser-for-QCOM-platforms.patch)
Compile tested on: brcm2708, cns3xxx, imx6
Run tested on: brcm2708, cns3xxx, imx6
Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
[Compile and run tested on brcm2708]
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
Use --mtime when SOURCE_DATE_EPOCH is set.
Use gzip -n9z instead of tar z to remove
timestamp in gzip header.
Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.
This patch fixes a problem where the AR8035 PHY can't be
detected on the Cisco Meraki MR24, when the ethernet cable
is not connected during boot.
Russell Senior reported:
|This appears to be a problem during probing of the AR8035
|phy chip. When ethernet has no link, the phy detection fails,
|and eth0 is not created. Plugging ethernet later has no effect,
|because there is no interface as far as the kernel is
|concerned. The relevant part of the boot log looks like this:
|
|[ 0.876611] /plb/opb/emac-rgmii@ef601500: input 0 in RGMII mode
|[ 0.882532] /plb/opb/ethernet@ef600c00: reset timeout
|[ 0.888546] /plb/opb/ethernet@ef600c00: can't find PHY!
(<https://bugs.lede-project.org/index.php?do=details&task_id=687>)
Fixes FS#687
Cc: Chris Blake <chrisrblake93@gmail.com>
Reported-by: Russell Senior <russell@personaltelco.net>
Fixes: 23fbb5a87c56e98 ("emac: Fix EMAC soft reset on 460EX/GT")
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Specifications:
* SoC: AR7242 (Virian 400MHz)
* RAM: 64 MB DDR (W9751G6JB-25)
* Flash: 16MB SPI flash (S25FL129PIF)
* WiFi: AR9382 (2.4/5GHz) + 2x SE2595L
* LAN: 1x1000M (PEF7071V)
To install LEDE via EVA bootloader, a FTP connection need to be
established to 192.168.178.1 within the first seconds after power on:
ftp> quote USER adam2
ftp> quote PASS adam2
ftp> binary
ftp> debug
ftp> passive
ftp> quote MEDIA FLSH
ftp> put lede-ar71xx-generic-fritz300e-squashfs-sysupgrade.bin mtd1
Signed-off-by: Mathias Kresin <dev@kresin.me>
Add upstream send AR724x PCIe patches to get the PCIe controller out of
reset during driver init.
The AVM Fritz 300E bootloader doesn't take care of releasing the
different PCIe controller related resets which causes an endless hang
as soon as either the PCIE Reset register (0x180f0018) or the PCI
Application Control register (0x180f0000) is read from.
Signed-off-by: Mathias Kresin <dev@kresin.me>
The driver is used for boards outside the lantiq target as well. Move
it to generic to make it available for more targets.
The phy driver is included in kernel 4.8 as INTEL_XWAY_PHY.
Signed-off-by: Mathias Kresin <dev@kresin.me>
Except for renames and line changes the only conflict was in
allocate_partition in handling MTD_WRITEABLE. Hopefully it was handled
correctly.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
This mtd_roundup_to_eb helper was introduced years ago in the commit
daec7ad768 ("kernel/3.10: add separate rootfs partition parser") and
it was probably supposed to simplify code a bit.
With the recent upstream commit 1eeef2d7483a7 ("mtd: handle partitioning
on devices with 0 erasesize") the logic in allocate_partition got
slightly more complex and we can't use this simple helper anymore as it
doesn't support MTD_NO_ERASE properly.
There also isn't any real gain from this helper, so it's probably easier
to just don't use it *or* work on upstreaming it to avoid maintenance
cost.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
On boards which don't have a distinct internet and dsl led, use the
shared LED to indicate the xdsl line state and any traffic that is
send/received via the netdev. This traffic doesn't necessarily need to
be internet traffic.
Rename the shared LED of existing configs to "dsl", to match the new
defaults. The configuration of the to be renamed LED is identical with
the new defaults.
Signed-off-by: Mathias Kresin <dev@kresin.me>
Allows to use a single LED for line init status indication and to show
any rx/tx activity on a synchronized dsl line.
Signed-off-by: Martin Schiller <ms@dev.tdt.de>
Signed-off-by: Mathias Kresin <dev@kresin.me>
As of now OTP is being correctly parsed and the driver requires to parse pre-caldata to follow corresponding routine.
Rename cal file into pre-calfile so the board initialized correctly with API 2 board data (board-2.bin).
Also remove the now unneeded for qca9984 board.bin symlink to 5GHz calfile.
Signed-off-by: Pavel Kubelun <be.dissent@gmail.com>
No longer rewrite opkg list output in package_list function, remove
the awk call in the pipe (which was intended for a single specific
use-case).
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
commit 19ac879954 (imagebuilder: add package_list function) introduced
a new function 'package_list' to the imagebuilder Makefile.
Unfortunately the package list was poluted by stdout noise of the
Makefile itself as well as opkg. Redirect those outputs to stderr to
make sure that the package_list returned doesn't contain progress
info output but really only packages.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
The imagebuilder can now list all available packages by using make
package_list. This is usefull for scripts to retrieve a list of all
packages with versions (and size)
Signed-off-by: Paul Spooren <paul@spooren.de>
[daniel@makrotopia.org: fixed commit message]
The Cisco ON100 device is a Kirkwood based router:
SoC: Marvell 88F6282 1600Mhz
SDRAM memory: 512MB DDR3 1333Mhz
Gigabit ethernet: 2x Marvell 88E1310 (over RGMII)
Flash memory: 512MB
2 bi-colour status LEDs (green/red)
1 Reset button
1 USB 2.0 port (on back)
1 SDIO slot (on back)
This commit adds a target profile of "Cisco Systems ON100" under the target
system "Marvell Kirkwood".
Flashing can be performed over tftp, once "dhcp" has been issued:
tftpboot ${loadaddr} lede-kirkwood-on100-squashfs-factory.bin
nand erase 0x0c0000 ${filesize}
nand write ${loadaddr} 0x0c0000 ${filesize}
Once flashed, set environment variables to boot:
setenv bootcmd nand read \${loadaddr} 0x0c0000 0x540000\; setenv bootargs
\; bootm
saveenv
Signed-off-by: Makoto Takeuchi <mak0@lxsys.co.uk>
Evaluation boards are left in component form to ease flashing
using vendor tooling and instructions. These boards also do
not include the EOF marker in the UBIFS as the bootloaders
are recent and easily upgradeable.
The end product boards use factory.bin images based on the
dts layout and include EOF markers as bootloader UBI support
is not determined.
Signed-off-by: Ben Whitten <ben.whitten@gmail.com>
Signed-off-by: Mathias Kresin <dev@kresin.me>
All TP-Link TL-WR710N versions share the same machine code.
This has been working since the beginning as we don't use double-quotes
to protect spaces inside command line values. Thus, kernel interprets
'board=TL-WR710N v2' as 'board=TL-WR710N' and separate parameter 'v2'.
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
Keep TP-Link devices definitions in alphabetical order whenever it's
possible. Also group together similar devices or devices from the same
series.
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
TP-Link TL-WR942N v1 is a 2.4 GHz single-band N450 router, based on
Qualcomm/Atheros QCA9561.
Specification:
- 775/650/258 MHz (CPU/DDR/AHB)
- 128 MB of RAM (DDR2)
- 16 MB of FLASH (SPI NOR)
- 3T3R 2.4 GHz
- 5x 10/100 Mbps Ethernet
- 2x USB 2.0
- 11x LED (most are controlled by 74HC595)
- 2x button
- UART header on PCB*
* Serial console is disabled in OEM non-beta firmwares and corresponding
GPIO pins 14 and 15 are assigned to control USB1 and USB2 LEDs by
production (non-beta) U-Boot and firmware.
Currently not working:
1. USB1 and USB2 LEDs if UART RX and TX pins are assigned to their GPIOs
by some U-Boot versions.
Flash instruction under vendor GUI:
1. Download "lede-ar71xx-generic-tl-wr942n-v1-squashfs-factory.bin".
2. Go to WEB interface and perform usual firmware upgrade.
FLash instruction under U-Boot recovery mode (doesn't work in beta
firmware):
1. Setup PC with static IP "192.168.0.66/24" and tftp server.
2. Change "*-factory" image filename to "WR942v1_recovery.bin" and make
it available to download from your tftp server.
3. Press "reset" button and power up the router, wait till "WPS" LED
turns on.
Flash instruction under U-Boot, using UART (can be done only with
preinstalled UART-enabled U-Boot version!):
1. Use "tpl" to stop autobooting and obtain U-Boot CLI access.
2. Setup ip addresses for U-Boot and your tftp server.
3. Issue below commands:
tftp 0x81000000 lede-ar71xx-generic-tl-wr942n-v1-sysupgrade.bin
erase 0x9f020000 +$filesize
cp.b 0x81000000 0x9f020000 $filesize
reset
Signed-off-by: Serg Studzinskii <serguzhg@gmail.com>
[minor code style fixes, extended commit message]
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
Use "GL.iNet" as vendor name (based on information from the vendor, this
is registered name of the company) and align model names with official
website.
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
Most of the custom Build/* functions in ar71xx target are rarely used by
image building code for devices from more than one subtarget. As they
don't need to be always included, move them to corresponding *.mk files.
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
ag71xx_ethtool_set_ringparam() will return an uninitialized value on
success.
Found-by: Coverity Scan #1330877
Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
Instead of bit banging SPI to talk to the GPIO chip, use the hardware
led controllers intended for controlling the LEDs.
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
Fixes the following security vulnerabilities:
CVE-2017-8890
The inet_csk_clone_lock function in net/ipv4/inet_connection_sock.c in the
Linux kernel through 4.10.15 allows attackers to cause a denial of service
(double free) or possibly have unspecified other impact by leveraging use
of the accept system call.
CVE-2017-9074
The IPv6 fragmentation implementation in the Linux kernel through 4.11.1
does not consider that the nexthdr field may be associated with an invalid
option, which allows local users to cause a denial of service (out-of-bounds
read and BUG) or possibly have unspecified other impact via crafted socket
and send system calls.
CVE-2017-9075
The sctp_v6_create_accept_sk function in net/sctp/ipv6.c in the Linux kernel
through 4.11.1 mishandles inheritance, which allows local users to cause a
denial of service or possibly have unspecified other impact via crafted
system calls, a related issue to CVE-2017-8890.
CVE-2017-9076
The dccp_v6_request_recv_sock function in net/dccp/ipv6.c in the Linux
kernel through 4.11.1 mishandles inheritance, which allows local users to
cause a denial of service or possibly have unspecified other impact via
crafted system calls, a related issue to CVE-2017-8890.
CVE-2017-9077
The tcp_v6_syn_recv_sock function in net/ipv6/tcp_ipv6.c in the Linux kernel
through 4.11.1 mishandles inheritance, which allows local users to cause a
denial of service or possibly have unspecified other impact via crafted
system calls, a related issue to CVE-2017-8890.
CVE-2017-9242
The __ip6_append_data function in net/ipv6/ip6_output.c in the Linux kernel
through 4.11.3 is too late in checking whether an overwrite of an skb data
structure may occur, which allows local users to cause a denial of service
(system crash) via crafted system calls.
Ref: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-8890
Ref: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-9074
Ref: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-9075
Ref: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-9076
Ref: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-9077
Ref: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-9242
Ref: https://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.9.31
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Fixes the following security vulnerabilities:
CVE-2017-8890
The inet_csk_clone_lock function in net/ipv4/inet_connection_sock.c in the
Linux kernel through 4.10.15 allows attackers to cause a denial of service
(double free) or possibly have unspecified other impact by leveraging use
of the accept system call.
CVE-2017-9074
The IPv6 fragmentation implementation in the Linux kernel through 4.11.1
does not consider that the nexthdr field may be associated with an invalid
option, which allows local users to cause a denial of service (out-of-bounds
read and BUG) or possibly have unspecified other impact via crafted socket
and send system calls.
CVE-2017-9075
The sctp_v6_create_accept_sk function in net/sctp/ipv6.c in the Linux kernel
through 4.11.1 mishandles inheritance, which allows local users to cause a
denial of service or possibly have unspecified other impact via crafted
system calls, a related issue to CVE-2017-8890.
CVE-2017-9076
The dccp_v6_request_recv_sock function in net/dccp/ipv6.c in the Linux
kernel through 4.11.1 mishandles inheritance, which allows local users to
cause a denial of service or possibly have unspecified other impact via
crafted system calls, a related issue to CVE-2017-8890.
CVE-2017-9077
The tcp_v6_syn_recv_sock function in net/ipv6/tcp_ipv6.c in the Linux kernel
through 4.11.1 mishandles inheritance, which allows local users to cause a
denial of service or possibly have unspecified other impact via crafted
system calls, a related issue to CVE-2017-8890.
CVE-2017-9242
The __ip6_append_data function in net/ipv6/ip6_output.c in the Linux kernel
through 4.11.3 is too late in checking whether an overwrite of an skb data
structure may occur, which allows local users to cause a denial of service
(system crash) via crafted system calls.
Ref: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-8890
Ref: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-9074
Ref: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-9075
Ref: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-9076
Ref: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-9077
Ref: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-9242
Ref: https://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.4.71
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
CONFIG_SG_POOL symbol is selected only by CONFIG_SCSI, since the last
one is disabled by default then disable CONFIG_SG_POOL by default too.
And explicitly enable it only for platforms that use CONFIG_SCSI.
Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
Add HAVE_IRQ_EXIT_ON_IRQ_STACK kernel configuration symbol that was
missed during backporting separate IRQ stack for MIPS from upstream.
Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
PHY core treats any positive return value as the auto-negotiation done
indication. Since we do not actually check any device register in this
callback then update it to return positive value with a neutral meaning
instead of the register flag to avoid confusing for future readers.
Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
The Marvel 88E6060 switch has an MDIO interface, but does not emulate
regular PHY behavior for the host. The network core can not detect using
the generic code, whether the connection via the attached PHY can be
used or not. The PHY's state machine is stuck in a state of
auto-negotiation and does not go any further so the Ethernet interface
of the router stay forever in the not-runing state.
Fix this issue by implementing the aneg_done callback to be able to
inform the network core that the Ethernet interface link to which the
switch is connected can be marked as RUNNING.
Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
Drop the own PHY polling function and switch to using the kernel PHY
state machine. This change allows driver to work correctly with devices
that do not support PHY behaviour but whose driver could emulate
autonegotiation completion (e.g. MV88E6060 and IP17xx switches).
NB: earlier this driver rely on flaws in PHY core code and could use PHY
device without really starting it. But now (at least in kernel 4.9)
this trick no more work and network interface could stuck in not-running
state.
Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
Few tiny fixes for issues caused by changes in the upstream:
- do not touch PHY IRQ array (core code initializes it itself now)
- add missed SET_NETDEV_DEV() invocation (causes segfault during phy
connection)
- use phy API inside the MDIO probe function instead of direct field
access (consider phy structure changes in upstream and prevent
similar issues in the future)
Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
This patch adds support for the Ubiquiti EdgeRouter X-SFP and
improves support for the EdgeRouter X (PoE-passthrough).
Specification:
- SoC: MediaTek MT7621AT
- Flash: 256 MiB
- RAM: 265 MiB
- Ethernet: 5 x LAN (1000 Mbps)
- UART: 1 x UART on PCB (3.3V, RX, TX, GND) - 57600 8N1
- EdgeRouter X:
- 1 x PoE-Passtrough (Eth4)
- powered by Wallwart or passive PoE
- EdgeRouter X-SFP:
- 5 x PoE-Out (24V, passive)
- 1 x SFP (unknown status)
- powered by Wallwart (24V)
Doesn't work:
* SoC has crypto engine but no open driver.
* SoC has nat acceleration, but no open driver.
* This router has 2MB spi flash soldered in but MT
nand/spi drivers do not support pin sharing,
so it is not accessable and disabled. Stock
firmware could read it and it was empty.
Installation
via vendor firmware:
- build an Initrd-image (> 3MiB) and upload the factory-image
- initrd can have luci-mod-failsafe
- flash final firmware via LuCI / sysupgrade on rebooted system
via TFTP:
- stop uboot into tftp-load into option "1"
- upload factory.bin image
Signed-off-by: Sven Roederer <devel-sven@geroedel.de>
This change add IPQ40xx AP-DK04.1-C1 board image support,
enables ubi image for IPQ40xx AP-DK04.1-C1 board and also
add sysupgrage support for AP-DK04.1-C1 and generates a
sysupgrade.tar image.
Testing:
*Tested on IPQ40xx AP-DK04.1-C1:
a. NAND boot
b. ubi sysupgrade
Signed-off-by: Ram Chandra Jangir <rjangir@codeaurora.org>
x86 board.d only contains a case for the APU2, not the APU1. This
causes, for example, network configuration not to be created correctly.
Even though the APU1 seems to reaching EOL, there a still a lot of them
out there.
The APU1 and APU2 is configured in the same way and this patch should
also be considered for stable, as the error also exists there.
Signed-off-by: Kristian Evensen <kristian.evensen@gmail.com>
Now that we always provide these partitions through DT, we don't need to
pass their data through parser data from board files anymore.
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
Allow the parser to be invoked from DT without fixed cfe/linux/nvram
partitions. This allows flash to be probed from DT also for multi
flash-size images.
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
The patch 0008 removes the vanilla kernel gptu.c of lantiq.
But the replacement file timer.c does not work Amazon-SE and
is also protected therefore with an CONFIG_SOC_AMAZON_SE :-)
This commit will re-activate the default vanilla kernel code
in gptu.c for Amazon-SE.
Signed-off-by: Tino Reichardt <milky-lede@mcmilk.de>
[refresh patches and add same change for kernel 4.9]
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This patch adds support for the Allnet ADSL2+ Modem ALL0333CJ.
Specifications:
- SoC: Amazon-SE
- RAM: 16MB
- Storage: 4MB NOR FLash
- LEDs: Power, Ethernet, DSL (Sync)
- Buttons: 1x Reset Button (not currently supported, will be done)
- 1x Ethernet-Port: 1x RJ45 10/100BaseTX
- 1x WAN-Port: AnnexB & J, G.992.1(ADSL), G.992.3(ADSL2), G.992.5(ADSL2+)
Installation:
- can be done via telnet+tftp or serial console
- default passwords:
- via telnet (root:admin)
- via webinterface http://172.16.1.254:8235/ (admin:coolwhite)
Installation via telnet / tftp:
host: # your own host must have an tftpd daemon, then do this:
host: ifconfig eth0:172 172.16.1.1 up
host: # telnet to allnet modem, root:admin
host: telnet 172.16.1.254
modem: # kill this daemon, it spams your console
modem: killall dsl_cpe_control
modem: # change to some place in ram:
modem: cd /ramdisk/tftp_upload
modem: # load lede-lantiq-ase-ALL0333CJ-squashfs-sysupgrade.bin alias uImage
modem: tftp -g -r uImage 172.16.1.1
modem: # load these extra tools from your tftpd via:
modem: # source: https://github.com/mcmilk/uboot-utils/releases/download/0.1/mips32.tar.gz
modem: tftp -g -r flashwrite 172.16.1.1
modem: tftp -g -r fw_setenv 172.16.1.1
modem: tftp -g -r fw.conf 172.16.1.1
modem: ln -s fw_setenv fw_printenv
modem: chmod +x *
modem: ./fw_setenv disable_recovery y
modem: ./fw_setenv kernel_addr 0xb0010000
modem: ./flashwrite /dev/mtd/1 uImage 0
Installation via serial line at uboot:
uboot: # erase everything exept bootloader
uboot: protect on b0000000 +10000; protect on b03f0000 +10000
uboot: erase all
uboot: # get new firmware via tftp:
uboot: tftpboot 0x80100000 uImage; setenv kernel_addr 0xb0010000
uboot: # copy to flash:
uboot: cp.b 0x80100000 $(kernel_addr) $(filesize)
uboot: # disable proprietary image checking:
uboot: setenv disable_recovery=y; saveenv
uboot: # reboot with LEDE ;)
uboot: reset
Ethernet works as expected, DSL syncronization does not work properly
currently, I am working on this issue.
Signed-off-by: Tino Reichardt <milky-lede@mcmilk.de>
Enable the building of Netgear DGN1000B images. I have an
example device here, but it was not tested currently.
Also WLAN and USB is not ready in the moment.
This is just the proper way, so that developing on this
device is known to be done in the near future.
Signed-off-by: Tino Reichardt <milky-lede@mcmilk.de>
Add block device sd to kernel config otherwise AHCI/eSATA devices won't get enumerated in /dev
Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
Explicitely disable X2APIC support on legacy targets since the targeted
processor types do not support it anyway there.
Fixes FS#285.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
mvebu was modifying RAMFS_COPY_BIN and RAMFS_COPY_DATA from a
sysupgrade_pre_upgrade hook. As the ramfs is created from stage2, this
did not have an effect anymore after the staged sysupgrade changes.
As it doesn't really hurt to copy fw_printenv and fw_setenv
unconditionally, simply add them in /lib/upgrade/platform.sh, so stage2
will see them.
Config copying is moved to a function called by platform_copy_config, where
it belongs.
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
Fixes: FS#821
Fixes: 30f61a34b4 "base-files: always use staged sysupgrade"
If nand chip has no NAND_NO_SUBPAGE_WRITE flag on its options
ubifs can't use it mtd devices and the kernel crashes with error:
__nand_correct_data: uncorrectable ECC error
Signed-off-by: Sergey Sergeev <adron@yapic.net>
Fixes these prints on boot:
[ 13.785600] imx-uart 2020000.serial: DMA transaction error.
[ 13.793134] imx-uart 2020000.serial: DMA transaction error.
[ 13.798721] imx-uart 2020000.serial: DMA transaction error.
Based on following upstream patch by Tim Harvey (Gateworks):
80a01b6582
TX complete DMA messages are getting missed.
This is also currently an issue in mainline.
For now we will disable DMA in serial/imx.c.
This resolves an issue encountered with RS485 transmit.
Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
The "reserved" partition should probably be read-only, just in case. Even
not knowing it's content, other devices have marked it as such, so it
seems a good idea to do so also for this device.
Signed-off-by: Enrico Mioso <mrkiko.rs@gmail.com>
CC: Mathias Kresin <dev@kresin.me>
CC: Hanqing Wong <hquu@outlook.com>
This fixes wrong GPIO numbers for LEDs and button in Wallys DR344 board
and sets color of all LEDs to green as the mass production boards have
only green one.
Actually, DR344 has 6 GPIO-connected LEDs and one button:
- GPIO11: status
- GPIO12: sig1
- GPIO13: sig2
- GPIO14: sig3
- GPIO15: sig4
- GPIO16: reset button
- GPIO17: lan
WAN LED is connected directly with AR8035 PHY.
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
This aligns default network interfaces configuration with vendor
firmware: GE (eth0) -> wan, FE (eth1) -> lan.
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
GMAC0 interface of AR9344 SOC in Wallys DR344 board is connected with
AR8035, not with AR8327. Without this fix, GE interface doesn't work at
all or shows high packet loss ratio.
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
EnGenius ENS202EXT is an outdoor wireless access point with
2-port 10/100 switch, detachable antennas and proprietery PoE.
The device is based on Qualcomm/Atheros AR9341 v1.
Specifications:
- 535/400/200 MHz (CPU/DDR/AHB)
- 64 MB of RAM
- 16 MB of FLASH
- UART (J1) header on PCB (unpopulated)
- 2x 10/100 Mbps Ethernet
- 2.4 GHz, up to 26dBm
- 2x external, detachable antennas
- 7x LED, 1x button
Flash instructions:
You have three options:
- Use the vendor firmware upgrade page on the web interface and give
it the factory.img. This is the easiest way to go about it.
- If you have serial access during u-boot, interrupt the normal boot
(any key before timeout) and run 'run failsafe_boot'; this will bring
you to a minimal openwrt luci image on ip 192.168.1.1 useful if you've
bricked the normal firmware.
- Use the vendor's management cli, which can be accessed via telnet
with the same credentials as the web login (default admin:admin), then
issue the following commands:
*** Hi admin, welcome to use cli(V-1.6.7) ***
---========= Commands Help =========---
stat -- Status
sys -- System
wless2 -- 2.4G-Wireless
mgmt -- Management
tree -- Tree
help -- Help
reboot -- Reboot
ens202ext>mgmt
Management
---========= Commands Help =========---
admin -- Administration
mvlan -- Management VLAN settings
snmp -- SNMP settings
backup -- Backup/Restore settings
autorb -- Auto reboot settings
fwgrade -- Firmware upgrade
time -- Time settings
wifisch -- Wifi schedule
log -- Log
diag -- Diagnostics
disc -- Device Discovery
logout -- Logout
help -- Help
exit -- Exit
ens202ext/mgmt>fwgrade
Management --> Firmware upgrade
---========= Commands Help =========---
fwup -- Firmware upgrade
help -- Help
exit -- Exit
ens202ext/mgmt/fwgrade>fwup http://web.server/lede-ar71xx-generic-ens202ext-squashfs-factory.bin
Signed-off-by: Marty Plummer <ntzrmtthihu777@gmail.com>
The single SFP port is meant for direct media access to WAN, such as
VDSL2, GPON). While it could also be used for in-home fiber, it is much
more likely that the LAN is standard ethernet, especially considering
that SFP is the onmly port that can go beyond 1Gbps.
Signed-off-by: Josua Mayer <josua.mayer97@gmail.com>
Take explicit note of what physical ports eth{0,1,2} refer to.
Also repair port assignment:
At some point between 4.9.20 and 4.9.29 the numbering changed.
Keep previous port assignment that was:
LAN = SFP+Switch
WAN = standalone ethernet
Also use the same assignment for Clearfog-Base to avoid confusion.
Signed-off-by: Josua Mayer <josua.mayer97@gmail.com>
Installing all armada-388-clearfog-* DTBs in the same sdcard image,
it now becomes much easier to swap sdcards between different device variants.
Signed-off-by: Josua Mayer <josua.mayer97@gmail.com>
U-Boot provides standard variables for load addresses, and
filesystem-agnostic load-commands. Furthermore thanks to distro-boot,
the device and partition from which the system boots is known.
The new boot-script makes use of all this information.
Tested on the only board that uses this boot-script: Clearfog Pro
Signed-off-by: Josua Mayer <josua.mayer97@gmail.com>
sunxi sysupgrade was based on the x86 implementation; sync fixes and other
changes from the current x86 version:
x86: fix sysupgrades on disks with 4k block size
x86: sysupgrade: move partition table change check to platform_check_image
x86: sysupgrade: refactor platform_do_upgrade
x86: sysupgrade: explicitly rescan disk after writing partition table
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
When existing partitions are retained, the dd call writing the uboot image
in the space before the first partition was accidentally writing the whole
image, making the code for individual partitions redundant. Limit the copy
to 1016KiB (the first 8KiB are skipped, and the first partition starts at
1024KiB).
In addition, conv=notrunc is replaced with conv=fsync. It seems this was an
oversight, as notrunc doesn't make sense for block devices and all other dd
commands use conv=fsync.
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
This should ensure that the kernel partition can be mounted in
platform_copy_config when its size has changed.
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
By returning early when no upgrade device can be found and handling the
SAVE_PARTITIONS=0 case differently, we can get rid of two levels of if.
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
The staged sysupgrade will prevent us from using ask_bool in
platform_do_upgrade; therefore, the check is moved to platform_check_image.
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
All targets with NAND support should gradually move their nand_do_upgrade
calls from platform_pre_upgrade to platform_do_upgrade.
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
This change adds QPIC BAM dma and NAND driver node's in IPQ4019
device tree, also enable this for AP-DK04.1 based boards.
Signed-off-by: Ram Chandra Jangir <rjangir@codeaurora.org>
This change adds support for below:
- Bam transaction which will be used for any NAND request.
- Reset function for NAND BAM transaction
- Add support for additional CSRs.
Signed-off-by: Ram Chandra Jangir <rjangir@codeaurora.org>
The existing qcom_nand driver supports ADM DMA which is mainly
required for ipq806x family based boards,
IPQ40xx based boards uses BAM DMA in NAND driver, so this patch
adds BAM DMA support with compatible string as qcom,ebi2-nandc-bam.
Signed-off-by: Ram Chandra Jangir <rjangir@codeaurora.org>
GPIO_PULL bits configurations in TLMM_GPIO_CFG register
differs for IPQ40xx from rest of the other qcom SoC's.
This change add support to configure the msm_gpio_pull
bits for ipq40xx, It is required to fix the proper
configurations of gpio-pull bits for nand pins mux.
Signed-off-by: Ram Chandra Jangir <rjangir@codeaurora.org>
The generic preinit code is now able to setup network and switch vlan settings
from the /etc/board.json file, therefor drop the target specific code.
Fixes FS#790.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
You can flash via tftp recovery (serve factory image as /mr6400_tp_recovery.bin
on 192.168.0.66/24, connect to any ethernet port and power on device while
holding the reset button). Flashing via OEM web interface does not work.
Hardware Specification (v1.0 EU):
- SoC: QCA9531
- Flash: Winbond W25Q64FV (8MiB)
- RAM: EtronTech EM6AB160TSE-5G (64MiB)
- Wireless: SoC platform only (2.4GHz b/g/n, 2x internal antenna)
- Ethernet: 2NIC (3x100M + 1x100M)
- WWAN: TP-LINK LTE MODULE (2x external detachable antenna)
- Power: DC 12V 1A
Signed-off-by: Filip Moc <lede@moc6.cz>
Neither the AsiaRF AWM002 or AWM003 actually has an LED on the module
board. The ld1 and ld2 do not represent actual LEDs. These pins might
connect to LEDS on an eval board or other carrier board, but that is
outside the scope of this device tree file.
Signed-off-by: Russell Senior <russell@personaltelco.net>
UML statically links against libutil, librt and libpthread. Some hosts do not
necessarily have these libraries installed and we should find out sooner than
later (during the final vmlinux linking stage) about that.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
The device tree is at /proc/device-tree/ without a base subdir.
Fixes: da472e5b30 ("treewide: access device tree from userspace via /proc/")
Signed-off-by: Mathias Kresin <dev@kresin.me>
This patch adds supports for the GL-inet GL-MT300N-V2.
Specification:
- SoC: MediaTek MT7628AN
- Flash: 16 MiB (W25Q128FVSG)
- RAM: 128 MiB DDR
- Ethernet: 1 x WAN (100 Mbps) and 1 x LAN (100 Mbps)
- USB: 1 x USB 2.0 port
- Button: 1 x switch button, 1 x reset button
- LED: 3 x LEDS (system power led is not GPIO controller)
- UART: 1 x UART on PCB (JP1: 3.3V, RX, TX, GND)
Installation through Luci:
- The original firmware is LEDE, so both LuCI or sysupgrade can be used.
- Do not keep settings, for sysupgrade please use the -n option.
Installation through bootloader webserver:
- Plug power and hold reset button until red LED blink to bright.
- Install sysupgrade image using web interface on 192.168.1.1.
Signed-off-by: Kyson Lok <kysonlok@gmail.com>
[match maximum image size with firmware partition]
Signed-off-by: Mathias Kresin <dev@kresin.me>
Access the device tree via /proc/device-tree/ is the documented way to
access the properties. Everything else might not work in future.
Signed-off-by: Mathias Kresin <dev@kresin.me>
commit 961c0eacea ('x86: fix lifting kernel CPU requirements and always
enable PAE') broke some older geode boards such as Soekris net4826.
Hence disable PAE on x86/legacy again in order to still support those
very old non-PAE capable CPUs.
Fixes FS#773 - PAE broke Soekris net4826
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
This PR allow the 3G modem embedded in the DWR-512 to be managed
by the wwan-ncm scripts. The modem will use the usb-option and
usb-cdc-ether drivers.
The DWR-512 DT is updated accordingly.
Signed-off-by: Giuseppe Lippolis <giu.lippolis@gmail.com>
These drivers are in many reference-design Xeon, iCore, or
Atom64 based server boards.
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
This change is required to make the GBit switch work on my Mikrotik Routerboard RB2011UiAS-RM, and I assume that the other RB2011 variants are exactly the same in terms of the switch. I have tested the board without and with the patch and confirm that the GBit ports are not supported at all (i.e. no communication works) with the current version in trunk and that everything works with the patch applied. The test box has been running for a few days with the patch applied, and does not show any performance problems in a test setting. I have not used it with LEDE in production so far, but with a previous turnk version of OpenWRT for many years - with the same patch applied. I therefore have good indication that it is stable.
For the record, the switch chip on my test box is identified as
switch0: Atheros AR8327 rev. 4 switch registered on ag71xx-mdio.0
The value 0x6f000000 has been taken from the table at https://wiki.openwrt.org/toh/mikrotik/rb2011uias with the previous discussion thread still online at https://lists.openwrt.org/pipermail/openwrt-devel/2014-December/029949.html.
One definite improvement from the older OpenWRT trunk version I have been running in production and current LEDE trunk is that the SFP interface can be kept in the default configuration without excessive kernel messages about it constantly going up and down. I have not yet tested an actual SFP module, though.
Performance seems to be reasonable. Routing between two GBit ports on that switch separated by different VLANs with the default firewall ruleset (and one additional rule two allow traffic between the VLANs), but without NAT, iperf3 results are:
[ ID] Interval Transfer Bandwidth Retr
[ 4] 0.00-10.00 sec 508 MBytes 426 Mbits/sec 102 sender
[ 4] 0.00-10.00 sec 506 MBytes 425 Mbits/sec receiver
With a connection going through NAT (also 2 ports on the same GBit switch, same ruleset, but NAT active), routing performance drops to around 250 MBit/s.
(Note that RouterOS achieves beyond 900 MBit/s on the same hardware with the default rule set and the FastTrack rule active even for NAT, see https://wiki.mikrotik.com/index.php?title=Manual:IP/Fasttrack and http://www.mikrotik.com/download/share/FastTrack.pdf).
Summarizing, I strongly recommend to apply this patch in trunk, so that the GBit switch chip rev. 4 can be supported upstream in the next LEDE release (hopefully soon).
Signed-off-by: René Mayrhofer <rene@mayrhofer.eu.org>
changes the image version from hardcoded OpenWrt to
$VERSION_DIST. AirOS shows a notification with the image version
during a firmware upgrade.
fixes#582
Signed-off-by: Matthias Fritzsche <txt.file@txtfile.eu>
With cpufreq disabled, the CPU stays locked at the frequency set by the
bootloader. This severely degrades performance as the bootloader sets
the CPU at the lowest frequency by default.
Enable cpufreq for all subtargets and use the ondemand governor.
Tested bcm2708 on RPi0W. Tested bcm2709 and bcm2710 on RPi3.
Reported-by: Bryan Mayland <bmayland@capnbry.net>
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
The generic SPI code calculates how long the issued transfer would take
and adds 100ms in addition to the timeout as tolerance. On my 500 MHz
Lantiq Mips SoC I am getting timeouts from the SPI like this when the
system boots up:
m25p80 spi32766.4: SPI transfer timed out
blk_update_request: I/O error, dev mtdblock3, sector 2
SQUASHFS error: squashfs_read_data failed to read block 0x6e
After increasing the tolerance for the timeout to 200ms I haven't seen
these SPI transfer time outs any more.
The Lantiq SPI driver in use here has an extra work queue in between,
which gets triggered when the controller send the last word and the
hardware FIFOs used for reading and writing are only 8 words long.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Refresh patches. A number of patches have landed upstream & hence are no
longer required locally:
062-[1-6]-MIPS-* series
042-0004-mtd-bcm47xxpart-fix-parsing-first-block
Reintroduced lantiq/patches-4.4/0050-MIPS-Lantiq-Fix-cascaded-IRQ-setup
as it was incorrectly included upstream thus dropped from LEDE.
As it has now been reverted upstream it needs to be included again for
LEDE.
Run tested ar71xx Archer C7 v2 and lantiq.
Signed-off-by: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
[update from 4.4.68 to 4.4.69]
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This model also contains few partitions non-discoverable partitions we
need to "protect". Othen than that it uses non-deprecated serial entry
in DTS that doesn't work with LEDE so we need to workaround it as well.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Teltonika RUT900 is a Router with LTE dual SIM, WiFi, 4x Ethernet
ports, I/O, RS232, RS485, GPS.
The device ist based on a Atheros AR9344 rev 3,
Specifications:
- 560/450/225 MHz (CPU/DDR/AHB)
- 128 MB of RAM
- 16 MB of FLASH
- Serial Console header on a Card Board edge connector
- 4x 10/100 Mbps Ethernet (3x LAN, 1x WAN)
- 2.4 GHz Wifi
- 2x external, detachable Wifi antennas
- LTE Modem Huawei ME909u-521 (Also other Modem seen)
- 2x LTE antennas
- 1x GPS antenna
- 7x LED, 1x button
- 1x USB Connector
- 1x Serial RS232
- 1x Serial RS485
- 1x MicroSD Card
The GPL sources of the device are available at www.teltonika.lt/gpl/
and are based on OpenWRT Barrier Breaker (14.07)
Running from tftp:
The Router starts into the uboot Webupdater if the Button ist pressed
more than 3 seconds, if no Network cable is attached it starts the
uboot serial console, from there the router loads the firmware image
via tftpboot from 192.168.1.2:firmware.bin (the router has the
192.168.1.1). With bootm the loaded image will be booted.
Signed-off-by: Steffen Weinreich <steve@weinreich.org>
Remove support for NCT6775/6 from W83627EHF driver so the NCT6775
driver will still be used for those chips.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
This adds support for Aerohive AP-121 access point.
Specification:
- SoC: Atheros AR9344-BC2A at 560MHz
- WiFi 1: 2.4GHz Atheros AR9340? - SoC
- WiFi 2: 5.0GHz Atheros AR9382-AL1A
- Memory: 128MB from 2x Nanya NT5TU32M16DG-AC
- SPI: 1MB Macronix MX25L8006E
- NAND: 128MB Hynix H27U1G8F2BTR-BC
- Ethernet: Atheros AR8035-A
- USB: 1x 2.0
- TPM: Atmel SC3204
Flashing:
1. Hook into UART (9600 baud) and enter U-Boot. You may need to enter
a password of administrator or AhNf?d@ta06 if prompted.
2. Once in U-Boot, download and flash LEDE factory image over tftp:
dhcp;
setenv serverip tftp-server-ip;
tftpboot 0x81000000 lede-ar71xx-nand-hiveap-121-squashfs-factory.bin;
nand erase 0x800000 0x800000;
nand write 0x81000000 0x800000 0x800000;
reset;
Signed-off-by: Chris Blake <chrisrblake93@gmail.com>
[minor text changes in commit subject and description, fixed
alphabetical order in etc/diag.sh, use only model name in lib/ar71xx.sh,
fixed code style issues in mach-hiveap-121.c, ubinized factory image]
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
Rambutan is a Wifi module based on QCA9550/9557
http://www.8devices.com/products/rambutan
This commit adds basic support for Rambutan development kit
Specification:
- 720/600/200 MHz (CPU/DDR/AHB)
- 128 MB of DDR2 RAM
- 128 MB of NAND Flash
- 1x 100Mbps Ethernet
- 1x 1000Mbps Ethernet (PHY on dev-kit)
- 1x Wifi radio 2x2 MIMO, dualband 2.4 and 5 GHz
- 2x U.FL connectors on module, chip antennas on dev-kit
- 1x miniPCIe slot
- 1x USB2.0 host socket + 1x USB2.0 pins on 2.54mm header
Flash instructions:
Stock firmware is OpenWrt, so use:
sysupgrade -n /tmp/lede-ar71xx-nand-rambutan-squashfs-sysupgrade.tar
or upgarde from GUI (don't save config)
Use factory image to flash from U-Boot:
tftpboot 80060000 lede-ar71xx-nand-rambutan-squashfs-factory.ubi
nand erase.part ubi
nand write 80060000 ubi ${filesize}
Signed-off-by: Mantas Pucka <mantas@8devices.com>
[split support in uboot-envtools package into a separate commit,
fixed alphabetical order in lib/preinit/05_set_iface_mac_ar71xx]
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
This adds the build option for the new UniFi AC Mesh.
It is a direct hardware copy from the AC Lite.
- SoC: QCA9563-AL3A (775Mhz)
- RAM: 128MiB
- Flash: 16MiB - dual firmware partitions!
- LAN: 1 1000M - POE
- Wireless:
2.4G: QCA9563
5G: UniFi Chip, QCA988X compatible
Thanks to Frank Dietz for testing.
Signed-off-by: Ludwig Thomeczek <ledesrc@wxorx.net>
[wrapped too long lines in mach-ubnt-unifiac.c]
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
This fixes switch port mapping for: TL-WR841N/ND v8, TL-MR3420 v2 and
TL-WR941N/ND v5. All of them share the same Atheros ap123 reference
design.
The order of switch ports (shown in "swconfig dev eth1 show") is CPU,
LAN 4, LAN 1, LAN 2, LAN 3.
Signed-off-by: Oldřich Jedlička <oldium.pro@gmail.com>
[included 2 more devices]
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
these two devices have a Sata led for each sata port.
These leds must be controlled separately by a special
sata led trigger already used in oxnas target.
Both these devices have a single USB led, and to keep
consistent behaviour with the Sata leds that show
sata activity, this led uses usb-host trigger
to show usb activity.
Signed-off-by: Alberto Bursi <alberto.bursi@outlook.it>
Refer to LINUX_KARCH instead of ARCH when bundling DTS files in the image
builder tarball.
While we're at it, also dereference symbolic links when copying as some
kernel architectures contain symbolic links in their DTS directories.
This fixes aarch64 imagebuilders such as brcm2708/bcm2710 ones in particular
as the kernel refers to "aarch64" as "arm64" internally.
Ref: https://forum.lede-project.org/t/lede-image-builder-problem/3680
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Add support for SolidRun ClearFog Base board.
The base model is a smaller version of ClearFog Pro without
the DSA switch, replacing it with a second copper gigabit
port, and only one PCIe socket.
Signed-off-by: Marko Ratkaj <marko.ratkaj@sartura.hr>
Add device tree files for Solidrun ClearFog Base board.
We also need to backport some improvements for Armada
388 MicroSoM.
The base model is a smaller version of ClearFog Pro without
the DSA switch, replacing it with a second copper gigabit
port, and only one PCIe socket.
Signed-off-by: Marko Ratkaj <marko.ratkaj@sartura.hr>
The conventional model is now known as the "Clearfog Pro".
We keep the old armada-388-clearfog.dts file for compatibility reasons.
Signed-off-by: Marko Ratkaj <marko.ratkaj@sartura.hr>
Add missing include of ramips.sh in order to import the missing
ramips_board_name() procedure.
Fixes FS#774.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Specification:
- SoC: MediaTek MT7620A (580 MHz)
- RAM: 64 MiB (Winbond W9751G6JB-25)
- Flash: 16 MiB (Spansion S25FL128SAIF00)
- LAN: x4 100M
- WAN: x1 100M
- Others: USB 2.0, reset button, wps button and 9 LEDs
Issues:
- 5 GHz band is not functional (missing driver support)
Installation:
Asus windows recovery tool:
- install the Asus firmware restoration utility
- unplug the router, hold the reset button while powering it on
- release when the power LED flashes slowly
- specify a static IP on your computer:
IP address: 192.168.1.75;
Subnet mask 255.255.255.0
- Start the Asus firmware restoration utility, specify the sysupgrade
image, and press upload
TFTP Recovery method:
- set computer to a static ip, 192.168.1.75
- connect computer to the LAN 1 port of the router
- hold the reset button while powering on the router for a few seconds
- send firmware image using a tftp client; i.e from linux:
$ tftp
tftp> binary
tftp> connect 192.168.1.1
tftp> put lede-ramips-mt7620-rt-ac51u-squashfs-sysupgrade.bin
tftp> quit
Signed-off-by: Ørjan Malde <foxyred333@gmail.com>
This device exactly same as NBG-419N but with USB port and USB Led.
Specification:
- SoC: Ralink RT3052 (MIPS24Kc) @384MHz
- RAM: 32 MiB
- Flash: 8 MiB
- WLAN: WiSoC 2T2R/300Mbps (2.4GHz)
- LAN: 4x100M
- WAN: 1x100M
- USB: 1x2.0
Installation via serial console (57600 8N1) from TFTP server
- rename the firmware to something shorter, for example
"sysupgrade.bin" (max. 32 chars)
- copy firmware TFTP server's directory
- when you power on device, and see U-Boot log, immediatly push "2"
once.
- You will see this message:
2: System Load Linux Kernel then write to Flash via TFTP.
Warning!! Erase Linux in Flash then burn new one. Are you sure?
- Push "y", and enter: device IP, then TFTP server's IP, and then
image firmware file name.
The firmware will be downloaded within ~30 seconds and flashed to the
device (It will take about 2 minutes).
Signed-off-by: Alexey Belyaev <spider@spider.vc>
[squash commits, compact commit message, fix compatible string, remove
superfluous pinmuxes]
Signed-off-by: Mathias Kresin <dev@kresin.me>
Build profile for Asmax AR 1004g refers to an invalid DTS "rg100a". The
correct DTS for this device is "ar1004g".
Signed-off-by: Marcin Jurkowski <marcin1j@gmail.com>
It has been shown that the Fritz boxes have the correct mac address set
in the wireless calibration data/eeeprom. Use this mac address as base
for the ethernet and xdsl interface increment/decrement the address to
match the values stored in the tffs.
Signed-off-by: Mathias Kresin <dev@kresin.me>
commit 89878f60f4 x86: lift kernel minimum CPU requirement to Pentium MMX
caused kconfig havoc. Fix this and make sure PAE is enabled even on legacy
CPUs as the minimum required CPU has been Pentium MMX for a while now and
hence PAE is supported even on the x86_legacy target.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Anything older than that isn't supported since commit f4f8f4a180,
hence also switch to Pentium MMX when building the kernel.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
commit 4b4f739373 switched on HIGHMEM4G which implicitely disabled
PAE and hence also NX and other useful and security-relevant features.
Re-enable PAE by switching to HIGHMEM64G.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
In order to have a smaller initramfs image remove all packages not
needed on all devices and add them explicitely for those actually
needing them. Also remove wpad-mini from ramips default package set
and add it to all sub-targets except for MT7621.
While at it reorder packages alphabetically and replace kmod-mt76 with
kmod-mt7603 and/or kmod-mt76x2 depending on the chip actually used on
a specific board.
Hopefully fixes FS#758
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Module definitions for kmod-wdt-sunxi and kmod-eeprom-sunxi are removed
(wdt-sunxi was builtin anyways; nvmem-sunxi, which is the new name of
eeprom-sunxi is changed to builtin). As kmod-eeprom-sunxi was specified
in DEFAULT_PACKAGES, but not available on kernel 4.4, it was breaking the
image builder.
Support for kmod-sunxi-ir is added for kernel 4.4 (it is unclear why it
was disable before, it builds fine with with kernel 4.4).
Condtionals only relevant for pre-4.4 kernels are removed from modules.mk,
as sunxi does't support older kernels anymore.
Fixes FS#755.
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
It was originally only enabled for the "32" subtarget along with the
"usb" feature which is now also shared by the "64" target
This should fix the phase1 build of armvirt/64
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
Do not assign the CPU port twice, this confuses LuCI and possible other
programs relying on topology information in board.json.
Ref: https://github.com/openwrt/luci/issues/1086
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
With update of ARC tools to arc-2016.09 based on GCC v6.x
we have to bump Linux kernel version so both toolchain and
the kernel use the same ARC ABIv4.
Signed-off-by: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
With update of ARC tools to arc-2016.09 based on GCC v6.x
we have to bump Linux kernel version so both toolchain and
the kernel use the same ARC ABIv4.
Signed-off-by: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
DWC3 driver uses of_usb_get_phy_mode() which is
implemented in drivers/usb/phy/of.c and in bare minimal
configuration it might not be pulled in kernel binary.
In case of ARC or ARM this could be easily reproduced with
"allnodefconfig" +CONFIG_USB=m +CONFIG_USB_DWC3=m.
On building all ends-up with:
---------------------->8------------------
Kernel: arch/arm/boot/Image is ready
Kernel: arch/arm/boot/zImage is ready
Building modules, stage 2.
MODPOST 5 modules
ERROR: "of_usb_get_phy_mode" [drivers/usb/dwc3/dwc3.ko] undefined!
make[1]: *** [__modpost] Error 1
make: *** [modules] Error 2
---------------------->8------------------
This was affecting Lede in case of CONFIG_ALL_KMODS=y.
The patch is already scheduled for v4.12 and once it is backported to
4.9.y it must be removed from here.
Note this patch makes sense not only for ARC instead it fixes
a generic issue which may affect more arches and platforms thus
putting it in "generic/" folder.
Signed-off-by: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name> [patch rename]
Since commit:
7120438e5d
Seems that fsl_rstcr_restart() has been converted
to a reset handler and dropped as hook/callback.
Apply the same to the `tl_wdr4900_v1` target.
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
Re-applied patches:
001-powerpc-85xx-add-gpio-keys-to-of-match-table.patch
100-powerpc-85xx-tl-wdr4900-v1-support.patch
Dropped patch:
200-spi-fsl-espi-preallocate-local-buffer.patch
now part of kernel upstream hash
1423877b73
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
Early SoC versions with an ECO of 1 required the gpio reset.
Mass production SoCs no longer need this work around.
Signed-off-by: John Crispin <john@phrozen.org>
Add the changes suggested by FS#716 to fix the switch driver initialization
on the ZTE Q7.
Also remove the `pinctrl-names` field obsoleted by the changes.
Reported-by: Harry Lau <harrylwc@gmail.com>
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Fix a copy/paste error and include the ZBT-WE826 dtsi instead of the
ZBT-WG3526 one.
Fix the syntax error in the ZBT-WE826 dtsi to prevent an compile error.
Signed-off-by: Mathias Kresin <dev@kresin.me>
The IMX6 PCIe host controller does not fire legacy interrupts if MSI is
enabled. A patch is being worked on to enable MSI at runtime only when
it is needed but meanwhile this patch will disable MSI for the imx6 kernel.
This fixes the no interrupt issue on cards/drivers that use legacy interrupts
such as ath9k.
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Tested-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
Both of these boards share the same DTS, and hardware. The only
difference would be the PCI-E slot, and ath9k card found on the MX60W.
Due to the similarities, it would be more efficient to merge these
profiles.
Signed-off-by: Chris Blake <chrisrblake93@gmail.com>
This moves core router packages to the NAND target, to ensure they are
applied to all images. This change is being done due to an issue found
when flashing the MX60W image, which came without these when built as a
multi image.
Signed-off-by: Chris Blake <chrisrblake93@gmail.com>
The patch 523-MIPS-ath79-OTP-support only supports the OTP offsets for
AR933x chips, which has changed on newer platforms such as the AR934x.
The follwoing change is to add support for reading the OTP on the
AR934x. Tested on an Aerohive AP-121.
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: Chris Blake <chrisrblake93@gmail.com>
The ZBT-WG826 is available with 16 or 32 MByte of flash. Split the
device tree source file, rename the currently supported 16 MByte
version and add the 32 MByte variant.
Signed-off-by: Mathias Kresin <dev@kresin.me>
The Digineo AC1200 Pro is the 32MB flash variant of the ZBT-WG3526 with
unpopulated/exposed sdhci slot. Rename to board to the OEM/ODM name and
add the sdhci kernel module to use it for multiple clones.
Signed-off-by: Mathias Kresin <dev@kresin.me>
The ZBT-WG3526 is available with 16 or 32 MByte of flash. Rename the
current supported 16MByte version to indicate which flash size variant
is supported.
Signed-off-by: Mathias Kresin <dev@kresin.me>
Specification:
- SoC: MT7621AT, MT7603EN and MT7612EN
- Flash: 16 MiB (W25Q128FVSG)
- RAM: 512 MiB (EM6GE16EWXD-12H)
- Ethernet: 1 x WAN (10/100/1000Mbps) and 4 x LAN (10/100/1000 Mbps)
- Others: USB 2.0, micro SD slot, reset button and 8 x LEDs
Issues:
- Two LEDs for 2.4 GHz and 5 GHz Wi-Fi do not work, can't find GPIOs.
- The pwr LED is not GPIO controllable
How to install:
- The original firmware is OpenWrt, so both LuCI or sysupgrade can be used.
- Do not keep settings, for sysupgrade please use the -n option.
Signed-off-by: Jiawei Wang <buaawjw@gmail.com>
The wan port is connected to switch port 0. Fix the mediatek,portmap as
well as the default switch config.
Signed-off-by: Alexey Belyaev <spider@spider.vc>
Make switch port LEDs blink on activity as they do with stock firmware.
The u-boot loader sets suitable values in the LED control register that
unfortunately get blown away by the linux switch driver init. Restore
that value by using driver 'initvals'. 0x0431 is the led control
register, the value 0x0960. Each nybble represents each LED's mode
(LED3,2,1,0) in this case OFF, 1000LINK+Activity, 100/10LINK+Activity,
OFF. Only LED1&2 are physically present.
Enabling the blinkenlights exposed the fact that an RRCP packet was
being emitted by the switch on all ports every second. Further initvals
copied from stock firmware's u-boot driver disabled this 'feature'.
Signed-off-by: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
Allow per-device initvals in the DTS file for rlt8366rb
switches.
Shamelessly copies 30494598f8
Signed-off-by: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
Migrate to new image generation and
introduce sdcard generation (based on sunxi).
Profile now generated via image/Makefile instead
of profiles/ directory.
Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
boardnames were changed with the recent target update. the sysupgrade board
detection was not updated properly.
Signed-off-by: John Crispin <john@phrozen.org>
Without patch unloading the dwc3-of-simple module went stuck after
successfully removing hcd.1 during the hcd.0 removal:
root@LEDE:/# rmmod dwc3-of-simple
[ 21.391846] xhci-hcd xhci-hcd.1.auto: remove, state 1
[ 21.391931] usb usb4: USB disconnect, device number 1
[ 21.397038] xhci-hcd xhci-hcd.1.auto: USB bus 4 deregistered
[ 21.401111] xhci-hcd xhci-hcd.1.auto: remove, state 1
[ 21.406685] usb usb3: USB disconnect, device number 1
[ 21.412848] xhci-hcd xhci-hcd.1.auto: USB bus 3 deregistered
[ 21.417248] xhci-hcd xhci-hcd.0.auto: remove, state 1
[ 21.422521] usb usb2: USB disconnect, device number 1
followed by nothing.
Sometimes a stall CPU was detected, or a kernel panic,
or a reboot occurred after a couple of minutes.
At the same time unloading the dwc3 module followed by dwc3-of-simple
module was working repeatedly.
root@LEDE:/# rmmod dwc3
[ 53.827328] xhci-hcd xhci-hcd.1.auto: remove, state 1
[ 53.827412] usb usb4: USB disconnect, device number 1
[ 53.832630] xhci-hcd xhci-hcd.1.auto: USB bus 4 deregistered
[ 53.836452] xhci-hcd xhci-hcd.1.auto: remove, state 1
[ 53.842314] usb usb3: USB disconnect, device number 1
[ 53.848412] xhci-hcd xhci-hcd.1.auto: USB bus 3 deregistered
[ 53.852542] xhci-hcd xhci-hcd.0.auto: remove, state 1
[ 53.857882] usb usb2: USB disconnect, device number 1
[ 53.863956] xhci-hcd xhci-hcd.0.auto: USB bus 2 deregistered
[ 53.867875] xhci-hcd xhci-hcd.0.auto: remove, state 1
[ 53.873696] usb usb1: USB disconnect, device number 1
[ 53.879742] xhci-hcd xhci-hcd.0.auto: USB bus 1 deregistered
root@LEDE:/# rmmod dwc3-of-simple
root@LEDE:/#
For the non-working case, the code was stuck in a readl() in
http://lxr.free-electrons.com/source/drivers/usb/host/xhci.c#L91
because
http://lxr.free-electrons.com/source/drivers/usb/dwc3/dwc3-of-simple.c#L126
was disabling the wrong clocks when removing hcd.1 (it was disabling
the clock of hcd.0). That's why the readl() went stuck when removing
hcd.0
The patch however addresses the clock assignment from the Netgear R7500
dts file and backs off the previous attempt.
Now unloading and repeated module loading is working just fine.
root@LEDE:/# rmmod dwc3-of-simple
[ 24.089679] xhci-hcd xhci-hcd.1.auto: remove, state 1
[ 24.089765] usb usb4: USB disconnect, device number 1
[ 24.094856] xhci-hcd xhci-hcd.1.auto: USB bus 4 deregistered
[ 24.098963] xhci-hcd xhci-hcd.1.auto: remove, state 1
[ 24.104522] usb usb3: USB disconnect, device number 1
[ 24.111194] xhci-hcd xhci-hcd.1.auto: USB bus 3 deregistered
[ 24.115086] xhci-hcd xhci-hcd.0.auto: remove, state 1
[ 24.120396] usb usb2: USB disconnect, device number 1
[ 24.126503] xhci-hcd xhci-hcd.0.auto: USB bus 2 deregistered
[ 24.130347] xhci-hcd xhci-hcd.0.auto: remove, state 1
[ 24.135948] usb usb1: USB disconnect, device number 1
[ 24.142085] xhci-hcd xhci-hcd.0.auto: USB bus 1 deregistered
root@LEDE:/#
Fixes: dwc3-of-simple module unloading for Netgear R7500
Signed-off-by: Thomas Reifferscheid <thomas@reifferscheid.org>
The patch follows the qualcomm code comments setting
SSUSB_CTRL_TEST_POWERDOWN to 0x1 and is testing and clearing the
bit during USB superspeed PHY init. According to Andy Gross it
needs to be BIT(26).
Signed-off-by: Thomas Reifferscheid <thomas@reifferscheid.org>
Acked-by: Andy Gross <andy.gross@linaro.org>
We need to ensure there is enough headroom to push extra header,
but we also need to check if we are allowed to change headers.
skb_cow_head() is the proper helper to deal with this.
Fixes Ethernet<->WiFi bridge for Raspberry Pi and probably other devices.
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Original armvirt target is now subtarget 32. Other than that the built
result should remain the same as before
Besides old features already available with arm64, the new armvirt/64
subtarget will also have those features originally enabled for
armvirt/32 with commit 44ecfc2 ("armvirt: new target")
- pl011, uart
- pl031, rtc
- pl061, gpio
- pci-host-generic
- virtio_{mmio,pci,net,blk,scsi,9p,console,balloon}
- smp with NR_CPUS=4
- cpu-hotplug
- ext4
- DEBUG_BUGVERBOSE for debug purposes
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
Fix a '==' that should be a '=' in a test condition. Busybox fortunately
doesn't care.
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
Add red:internet led on gpio 30 previously claimed as missing.
Wifi led was claimed as blue however there are no blue leds on the
board at all. Actually there are two wifi leds, green & amber so add
definitions for those. Make the newly discovered green wifi led gpio
14 the default.
There is no amber power led on this board. The mention of the amber
power led in the manual means power red and power green at the same
time.
Signed-off-by: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
[removed unnecessary aliases, add migration script]
Signed-off-by: Mathias Kresin <dev@kresin.me>
Use fixed led names and add each board variant instead of manipulating
the board name.
It makes the ramips board name function less different to the one used
in other targets and allows to merge them with a common function.
Signed-off-by: Mathias Kresin <dev@kresin.me>
We need to keep the former used (unmodified) boardname in the metadata.
Otherwise an upgrade from an board using the old boardname will be
refused.
Fixes: a75ce960ac ("ramips: use different board names for variants")
Signed-off-by: Mathias Kresin <dev@kresin.me>
PSG1218 got only 4 Ethernet ports and WAN on port 3 while
PSG1218K2C got 5 Ethernet ports and WAN on port 4
Switch to use kmod-kt76x2 instead of kmod-mt76 for both devices while
at it.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Use the stateless 4-byte op codes for this flash chip to fix reboot
hangs on SoCs expecting the flash chip in 3-byte mode.
Fixes: FS#179
Signed-off-by: Mathias Kresin <dev@kresin.me>
This reverts commit 51397d7d95.
There are some unresolved random crashes on WRT1900AC v1 that still need
to be sorted out
Signed-off-by: Felix Fietkau <nbd@nbd.name>
This fixes:
Thermal sensors on bcm2835 SoC (BCM2835_THERMAL) [N/m/y/?] (NEW) aborted!
This symbol depends on ARCH_BCM2835 so it should be OK to disable it at
brcm2708 target only.
Fixes: 7d32caa61fb0 ("brcm2708: backport upstream sdhost controller driver")
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Since 192f0a3db8 ("ath9k: unset the default LED pin if used by
platform leds") the default ath9k wireless LED is not set as soon as
any pin of the ath ath9k gpio controller is used.
All touched boards have leds defined which are using the gpio pins
exposed by the ath9k driver but rely on a default set wireless led
trigger.
Add the wireless leds were missing and setup the wireless phy trigger
in userspace.
Signed-off-by: Russell Senior <russell@personaltelco.net>
Signed-off-by: Mathias Kresin <dev@kresin.me>
The Netgear R6220 requires the kmod-usb3 package and misses
kmod-usb-ledtrig-usbport package to setup the configured usb led
trigger.
Drop the already target selected kmod-mt76.
Fixes: FS#686
Fixes: 38bee61dab ("ramips: add support for Netgear R6220")
Signed-off-by: Mathias Kresin <dev@kresin.me>
Fix the PCIe 5GHz wireless by using the on flash eeprom/caldata.
Disable the 2.4GHz band as this band has no antennas attached but is
enabled in the eeprom/caldata.
Fixes: FS#691
Signed-off-by: Mathias Kresin <dev@kresin.me>
Fix the PCIe 5GHz wireless by using the ralink mtd-eeprom property as
this board have a RT5592 and uses the rt2x00 driver. The mediathek
device tree bindings do not work here.
Fixes: FS#691
Fixes: d8dd207ea6 ("ramips: use the ralink,mtd-eeprom device tree property")
Signed-off-by: Mathias Kresin <dev@kresin.me>
The factory image has an uImage header covering the entire image and
not only the kernel. The original uImage header which covers only the
kernel is appended to the end of the image.
During LEDE boot the uImage rootfs splitter skips the whole filesystem,
can't find a valid filesystem magic and panics.
The last known working version was OpenWrt 14.07, which simply kept on
searching for an uImage header if the first found didn't resulted into
a working rootfs. This behaviour is kind of error prone since it could
produce false positives.
Since the sysupgrade image works fine in combination with the tftp
recovery for doing the initial installation of LEDE, simply drop the
factory image.
Related: FS#462
Signed-off-by: Mathias Kresin <dev@kresin.me>
The original implementation loaded the count register with (wrong) semi-
random values due to its implemenation nature.
If the wrongly calulated value was below the kickrate,
the WD was triggered and rebooted the system.
Rework this, partly based on upstream patches, to dynamically fetch the
current clockrate and calculate the proper offset for the WD countdown
register.
Before:
[ 143.800000] count val: 27219720
[ 148.820000] count val: 50623201
[ 153.830000] count val: 96425250
[ 158.830000] count val: 89735401
[ 163.840000] count val: 4756110
After:
[ 0.700000] MPCore WD init. clockrate: 299984500 prescaler: 256
countrate: 1171814 timeout: 60s
[ 358.530000] count val: 35154751
[ 363.540000] count val: 35154750
[ 368.540000] count val: 35154751
[ 373.550000] count val: 35154750
Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
In preparation for bumping arm64 to 4.9, add a bunch of configuration
symbols that are available under arm64.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Drop sample command line to use against the ARM Foundation v8 model and
replace the path to something that matches LEDE's directory structure.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
This required us to both download the Foundation emulator but also build
a boot wrapper. QEMU is now fully usable and is a much better
replacement.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Instead of renaming the default wireless led attached to the wireless
chip, add a new led using the platform leds with the phy0tpt trigger
set in userspace.
When switching ar71xx to device tree, the same can be done by using the
build in GPIO controller and without adding new bindings.
Drop the now unused platform code.
Signed-off-by: Mathias Kresin <dev@kresin.me>
With the fritz-tools a userspace parser for the Tiny Flash File System
is available and makes the tffs2 kernel patches obsolete.
Signed-off-by: Mathias Kresin <dev@kresin.me>
Split the fritz-tools into subpackages. fritz_tffs_read is usefull for
all Fritz boards where fritz-cal_extract is only required for the
Fritz 4040 at the moment.
Rename the tffs related binary to the more catchy name fritz_tffs and
move the whole package to utilities since the package doesn't really
provide a firmware file.
Make the fritz-tools available for all targets and build them shared.
The tffs is used by avm on lantiq and ar71xx as well.
Tested-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: Mathias Kresin <dev@kresin.me>
Fix the list order instead of adjusting the controller scan order.
Revert the former required changes to the lantiq PCIe driver.
Signed-off-by: Mathias Kresin <dev@kresin.me>
* adds MT7530 DSA support
* backport latest ethernet driver
* add PMIC leds
* add auxadc support
* add efuse support
* add thermal sensor support
* add irq affinity support for ethernet
still todo
* DSA multi cpu support
Signed-off-by: John Crispin <john@phrozen.org>
Keeping it in base-files was resulting in adding it to the base-files
package. This file is meant to be included manually for initramfs
images only.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
There are currently several supported TP-Link devices without specified
version number in image name and/or DEVICE_TITLE (e.g. WBS210, WBS510,
TL-WR810N, TL-WA7510N, TL-WPA8630), but vendor website shows that there
are already more than one version of them on the market.
For devices like Archer C5, which second version is based on a total
different platform, missing version number in DEVICE_TITLE (used in
menuconfig) might be misleading for users.
To make it less confusing for users and easier to maintain in future,
include version number in image name and DEVICE_TITLE for all TP-Link
devices, even if there is only one version of device at the moment.
Also, keep DEVICE_TITLE in same format for all TP-Link devices.
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
Acked-by: John Crispin <john@phrozen.org>
Kernel/hardware support for this board has been implemented since
Chaos Calmer. This set of patches is to get the board identified in
userland. This will allow support for things like sysupgrade,
configuring initial LED state, configuring initial switch state, etc.
Signed-off-by: Ron Angeles <ronangeles@gmail.com>
This router has the same hardware as TP-LINK TL-WR841N/ND v11 (same FCC
ID, same TFTP image name...).
If the stock firmware web interface doesn't accept LEDE factory image,
it can be flashed via the U-Boot TFTP recovery mode, by long-pressing
the reset button after power on.
The TFTP image name is wr841nv11_tp_recovery.bin (yes, v11, not v12).
Signed-off-by: Vittorio Gambaletta <openwrt@vittgam.net>
On the more sophisticated (i.e. deeper FIFO) serial controllers,
flow-control might be needed to avoid dropping output.
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
Specification:
- SoC: Qualcomm Atheros QCA9563 (775 MHz, MIPS 74Kc)
- RAM: 128 MiB
- Storage: 16MB NOR flash
- Wireless: Built into QCA9563 (Dragonfly), PHY modes b/g/n, 3x3 MIMO
- Ethernet: 2x1G
Tested and working:
- ethernet / switch / lan / wan
- 2.4GHz SoC wifi
- PCIe
- leds
- buzzer
Ramload:
- tftpboot 0x84000000 lede-ar71xx-generic-wpj563-16M-initramfs-uImage.bin
- bootm 0x84000000
Install:
- tftpboot 0x80500000 lede-ar71xx-generic-wpj563-16M-squashfs-sysupgrade.bin
- erase 0x9f030000 +$filesize
- erase 0x9f680000 +1
- cp.b $fileaddr 0x9f030000 $filesize
Erasing 0x9f680000 is required because uboot defines
"bootcmd=bootm 0x9f680000 || bootm 0x9f030000", so it first tries to boot
the higher address. I think the 16 mb flash are intended to be used as
8+8mb for a fallback image. In my hardware only the lower address has a
bootable image. But to make sure future hardware will boot lede too, I
erase one block, so uboot will skip this address.
Signed-off-by: Christian Mehlis <christian@m3hlis.de>
RGMII RX delay setting needs to be always specified for AR8337 to
avoid port 5 RX hang on high traffic / flood conditions.
Also, the HOL registers that set per-port and per-packet-priority
buffer sizes are updated with the reduced values suggested by the
QCA switch team.
Finally, AR8327 reserved register fixups are disabled for the AR8337.
This patch is adapted from the Code Aurora QSDK, but with magic
values mapped to proper defines.
Signed-off-by: Vittorio Gambaletta <openwrt@vittgam.net>
Without patch unloading the dwc3-of-simple module went stuck after
successfully removing hcd.1 during the hcd.0 removal:
root@LEDE:/# rmmod dwc3-of-simple
[ 21.391846] xhci-hcd xhci-hcd.1.auto: remove, state 1
[ 21.391931] usb usb4: USB disconnect, device number 1
[ 21.397038] xhci-hcd xhci-hcd.1.auto: USB bus 4 deregistered
[ 21.401111] xhci-hcd xhci-hcd.1.auto: remove, state 1
[ 21.406685] usb usb3: USB disconnect, device number 1
[ 21.412848] xhci-hcd xhci-hcd.1.auto: USB bus 3 deregistered
[ 21.417248] xhci-hcd xhci-hcd.0.auto: remove, state 1
[ 21.422521] usb usb2: USB disconnect, device number 1
followed by nothing.
Sometimes a stall CPU was detected, or a kernel panic,
or a reboot occurred after a couple of minutes.
At the same time unloading the dwc3 module followed by dwc3-of-simple
module was working repeatedly.
root@LEDE:/# rmmod dwc3
[ 53.827328] xhci-hcd xhci-hcd.1.auto: remove, state 1
[ 53.827412] usb usb4: USB disconnect, device number 1
[ 53.832630] xhci-hcd xhci-hcd.1.auto: USB bus 4 deregistered
[ 53.836452] xhci-hcd xhci-hcd.1.auto: remove, state 1
[ 53.842314] usb usb3: USB disconnect, device number 1
[ 53.848412] xhci-hcd xhci-hcd.1.auto: USB bus 3 deregistered
[ 53.852542] xhci-hcd xhci-hcd.0.auto: remove, state 1
[ 53.857882] usb usb2: USB disconnect, device number 1
[ 53.863956] xhci-hcd xhci-hcd.0.auto: USB bus 2 deregistered
[ 53.867875] xhci-hcd xhci-hcd.0.auto: remove, state 1
[ 53.873696] usb usb1: USB disconnect, device number 1
[ 53.879742] xhci-hcd xhci-hcd.0.auto: USB bus 1 deregistered
root@LEDE:/# rmmod dwc3-of-simple
root@LEDE:/#
For the non-working case, the code was stuck in a readl() in
http://lxr.free-electrons.com/source/drivers/usb/host/xhci.c#L91
because
http://lxr.free-electrons.com/source/drivers/usb/dwc3/dwc3-of-simple.c#L126
was disabling the wrong clocks when removing hcd.1 (it was disabling
the clock of hcd.0). That's why the readl() went stuck when removing
hcd.0
The patch however addresses the clock assignment from the .dtsi
file. Most probably it went into openwrt here:
https://dev.openwrt.org/browser/trunk/target/linux/ipq806x/patches-3.18/101-ARM-qcom-add-USB-nodes-to-ipq806x-ap148.patch?rev=45261
copied from Qualcomms attempt here: https://lkml.org/lkml/2015/11/20/116
Now unloading and repeated module loading is working just fine,
no matter if you'd remove dwc3-of-simple or dwc3.
root@LEDE:/# rmmod dwc3-of-simple
[ 24.089679] xhci-hcd xhci-hcd.1.auto: remove, state 1
[ 24.089765] usb usb4: USB disconnect, device number 1
[ 24.094856] xhci-hcd xhci-hcd.1.auto: USB bus 4 deregistered
[ 24.098963] xhci-hcd xhci-hcd.1.auto: remove, state 1
[ 24.104522] usb usb3: USB disconnect, device number 1
[ 24.111194] xhci-hcd xhci-hcd.1.auto: USB bus 3 deregistered
[ 24.115086] xhci-hcd xhci-hcd.0.auto: remove, state 1
[ 24.120396] usb usb2: USB disconnect, device number 1
[ 24.126503] xhci-hcd xhci-hcd.0.auto: USB bus 2 deregistered
[ 24.130347] xhci-hcd xhci-hcd.0.auto: remove, state 1
[ 24.135948] usb usb1: USB disconnect, device number 1
[ 24.142085] xhci-hcd xhci-hcd.0.auto: USB bus 1 deregistered
root@LEDE:/#
Fixes: dwc3-of-simple module unloading
Signed-off-by: Thomas Reifferscheid <thomas@reifferscheid.org>
Allow module unloading by fixing a mistake.
qcom_dwc3_phy_write_readback() is expecting (phy, offset, mask, value)
while the mistake was calling it with (phy, offset, value, mask)
The patch is swapping value and mask.
Without the patch unloading the dwc3 module was showing a
write to QSCRATCH failed and repeated module loading was
failing:
root@LEDE:/# rmmod dwc3
[ 19.167998] xhci-hcd xhci-hcd.1.auto: remove, state 1
[ 19.168084] usb usb4: USB disconnect, device number 1
[ 19.173371] xhci-hcd xhci-hcd.1.auto: USB bus 4 deregistered
[ 19.177134] xhci-hcd xhci-hcd.1.auto: remove, state 1
[ 19.182960] usb usb3: USB disconnect, device number 1
[ 19.189023] xhci-hcd xhci-hcd.1.auto: USB bus 3 deregistered
[ 19.192989] qcom-dwc3-usb-phy 110f8830.phy: write: 8000000 to QSCRATCH: 0 FAILED
[ 19.199064] xhci-hcd xhci-hcd.0.auto: remove, state 1
[ 19.205912] usb usb2: USB disconnect, device number 1
[ 19.211611] xhci-hcd xhci-hcd.0.auto: USB bus 2 deregistered
[ 19.215905] xhci-hcd xhci-hcd.0.auto: remove, state 1
[ 19.221751] usb usb1: USB disconnect, device number 1
[ 19.227307] xhci-hcd xhci-hcd.0.auto: USB bus 1 deregistered
[ 19.231795] qcom-dwc3-usb-phy 100f8830.phy: write: 8000000 to QSCRATCH: 0 FAILED
root@LEDE:/# modprobe dwc3
[ 29.583343] phy phy-100f8830.phy.4: phy init failed --> -110
[ 29.583399] dwc3 10000000.dwc3: failed to initialize core
[ 29.588169] dwc3: probe of 10000000.dwc3 failed with error -110
[ 29.652943] phy phy-110f8830.phy.2: phy init failed --> -110
[ 29.652988] dwc3 11000000.dwc3: failed to initialize core
[ 29.657735] dwc3: probe of 11000000.dwc3 failed with error -110
root@LEDE:/#
With patch repeated module unloading and loading is working good:
root@LEDE:/# rmmod dwc3
[ 22.622214] xhci-hcd xhci-hcd.1.auto: remove, state 1
[ 22.622298] usb usb4: USB disconnect, device number 1
[ 22.627401] xhci-hcd xhci-hcd.1.auto: USB bus 4 deregistered
[ 22.631492] xhci-hcd xhci-hcd.1.auto: remove, state 1
[ 22.637054] usb usb3: USB disconnect, device number 1
[ 22.643721] xhci-hcd xhci-hcd.1.auto: USB bus 3 deregistered
[ 22.647421] xhci-hcd xhci-hcd.0.auto: remove, state 1
[ 22.652910] usb usb2: USB disconnect, device number 1
[ 22.659219] xhci-hcd xhci-hcd.0.auto: USB bus 2 deregistered
[ 22.662768] xhci-hcd xhci-hcd.0.auto: remove, state 1
[ 22.668604] usb usb1: USB disconnect, device number 1
[ 22.674803] xhci-hcd xhci-hcd.0.auto: USB bus 1 deregistered
root@LEDE:/# modprobe dwc3
[ 25.404592] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
[ 25.404694] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 1
[ 25.409444] xhci-hcd xhci-hcd.0.auto: hcc params 0x0228f065 hci version 0x100 quirks 0x00010010
[ 25.416589] xhci-hcd xhci-hcd.0.auto: irq 168, io mem 0x10000000
[ 25.426509] hub 1-0:1.0: USB hub found
[ 25.431626] hub 1-0:1.0: 1 port detected
[ 25.435472] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
[ 25.439206] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 2
[ 25.444573] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[ 25.452926] hub 2-0:1.0: USB hub found
[ 25.460420] hub 2-0:1.0: 1 port detected
[ 25.525037] xhci-hcd xhci-hcd.1.auto: xHCI Host Controller
[ 25.525099] xhci-hcd xhci-hcd.1.auto: new USB bus registered, assigned bus number 3
[ 25.529750] xhci-hcd xhci-hcd.1.auto: hcc params 0x0228f065 hci version 0x100 quirks 0x00010010
[ 25.537002] xhci-hcd xhci-hcd.1.auto: irq 169, io mem 0x11000000
[ 25.546583] hub 3-0:1.0: USB hub found
[ 25.551997] hub 3-0:1.0: 1 port detected
[ 25.555734] xhci-hcd xhci-hcd.1.auto: xHCI Host Controller
[ 25.559621] xhci-hcd xhci-hcd.1.auto: new USB bus registered, assigned bus number 4
[ 25.564942] usb usb4: We don't know the algorithms for LPM for this host, disabling LPM.
[ 25.573063] hub 4-0:1.0: USB hub found
[ 25.580842] hub 4-0:1.0: 1 port detected
root@LEDE:/#
Fixes: dwc3 module unloading
Signed-off-by: Thomas Reifferscheid <thomas@reifferscheid.org>
Many (most?) devices can't boot raw kernel using tftp and probably none
allows flashing it. It's way more usable to have TRX with kernel
containing initrams as such an image can be actually flashed.
An exception are Buffalo devices which have recovery mode with support
for booting kernels over TFTP. For them keep building default images.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Makes use of the syscon tcsr and enables both USB ports. Cleans up
qcom-ipq8064.dtsi from previous attempts.
Fixes FS#497
Signed-off-by: Thomas Reifferscheid <thomas@reifferscheid.org>
Current driver shows temp in full degrees while other apps await it
to be in millidegrees.
Initially the driver represents termal data in millidegrees but then
it gets divided by TSENS_FACTOR. So lets just set it to '1'.
Signed-off-by: Pavel Kubelun <be.dissent@gmail.com>
Deactivate all the ARM64 erratums by default. The target code should
activate them if needed. This fixes a problem with a new erratum added
in kernel 4.9.17 breaking brcm2708.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This gets us in sync with dts from kernel 4.11. Two patches were already
backported earlier.
I decided to use 03x prefix as it's kind of similar to the 3xx prefix:
3xx - architecture specific patches
It isn't any documented or strict rule though. We don't need to stick to
it if we hit any problems.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Acked-by: Álvaro Fernández Rojas <noltari@gmail.com>
modify 0152-lantiq-VPE.patch from
commit e0229a16b0 ("lantiq: added support for VPE1")
- remove wdog function declarations from header (asm/vpe.h)
- remove wdog command line init functions (vpe.c)
Signed-off-by: Stefan Koch <stefan.koch10@gmail.com>
- remove patched header (vpe.h) because kernel
already provides one (asm/vpe.h)
- remove module softdog_vpe since watchdog functionality is unused
- remove module softdog_vpe from Makefile
Signed-off-by: Stefan Koch <stefan.koch10@gmail.com>
Even the commit message of the patch adding support for the MiWiFi Nano
says that a 16 MB flash chip is used. Extend the firmware partition to
make use of all available flash space.
Fixes: FS#622
Signed-off-by: Mathias Kresin <dev@kresin.me>
Netgear X4 R7500 comes with a QCA988X. Select a firmware that matches
the ath10k chipset
Signed-off-by: Thomas Reifferscheid <thomas@reifferscheid.org>
Commit 23dac14d058f ("MIPS: PCI: Use struct list_head lists") changed
the controller list from reverse to straight order. Use the last entry
in the controller list to get the fist conroller of the system.
Signed-off-by: Mathias Kresin <dev@kresin.me>
Upstream commit 23dac14d058f ("MIPS: PCI: Use struct list_head lists")
changed the controller list from reverse to straight order without
taking care of the changed order for the scan of the recorded PCI
controllers.
Traverse the list in reverse order to restore the former behaviour.
This patches fixes the following PCI error on lantiq:
pci 0000:01:00.0: BAR 0: error updating (0x1c000004 != 0x000000)
Signed-off-by: Mathias Kresin <dev@kresin.me>
Right now all brcm2708 patches are extracted from the non-mainline
raspberrypi/linux git tree. Many of them are hacks and/or are unneeded
in LEDE. Raspberry Pi is getting better and better mainline support so
it would be nice to finally start maintaining patches in a cleaner way:
1) Backport patches accepted in upstream tree
2) Start using upstream drivers
3) Pick only these patches that are needed for more complete support
Handling above tasks requires grouping patches - ideally using the same
prefixes as generic ones. It means we should rename existing patches to
use some high prefix. This will allow e.g. use 0xx for backported code.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Acked-by: Stijn Tintel <stijn@linux-ipv6.be>
P&W (full name: Shenzhen Progress&Win Technologies) R602N (could be also
labeled as R602F, R602, etc.) is a simple N300 router with 5-port
10/100 Mbps switch, non-detachable antennas and USB.
CPE505 is an outdoor CPE with PoE support and detachable antennas.
Both devices are based on Qualcomm/Atheros QCA9531 v2.
Common specification:
- 650/597/216 MHz (CPU/DDR/AHB)
- 64 MB of RAM (DDR2)
- 16 MB of FLASH
- UART (J2) header on PCB
R602N specification:
- 5x 10/100 Mbps Ethernet
- 1x USB 2.0
- 2T2R 2.4 GHz with external LNA and PA (SE2576L), up to 28 dBm
- 2x external, non-detachable antennas
- 7x LED, 1x button
CPE505N specification:
- 2x 10/100 Mbps Ethernet (both ports support passive PoE 12-24 V)
- 2T2R 2.4 GHz with external LNA and PA (SKY65174-21), up to 30 dBm
- 2x external, detachable antennas (RP-SMA connectors)
- 1x RGB LED, 2x LEDs (in RJ45 sockets), 1x button
Flash instructions:
It seems that there are many different versions of the firmware which
these devices are shipped with. The generic/standard one is based on
some modified OpenWrt and LEDE firmware can be flashed directly from
vendor's webgui or with sysupgrade (root password is "admin123").
Before flashing, make sure (use "fw_printenv") that the kernel load
address in your device is set to "0x9f050000" (bootcmd variable is
"bootm 0x9f050000"). If your device uses different load address, you
should first change it, under vendor's firmware, with command:
fw_setenv bootcmd "bootm 0x9f050000 || bootm OLD_ADDRESS"
Where OLD_ADDRESS is previous kernel load address (in CPE505 version
I got access to, it was "0x9fe80000"). This will allow you to use
both the vendor's and LEDE firmware.
If version of your device contains empty U-Boot environment (you will
get information about this after issuing "fw_printenv"), you should
use U-Boot, serial line access and TFTP to perform firmware upgrade:
1. tftp 0x80060000 lede-ar71xx-generic-...-squashfs-sysupgrade.bin
2. erase 0x9f050000 +$filesize
3. cp.b $fileaddr 0x9f050000 $filesize
4. setenv bootcmd "bootm 0x9f050000 || bootm OLD_ADDRESS"
5. saveenv && reset
These devices contain also web recovery mode inside U-Boot. It can be
started with pressing the reset button for around 3 seconds just after
the device powerup. Web recovery panel is available on "192.168.10.9"
and to be able to use it, IP on your PC must be set to "192.168.10.10".
Make sure to change kernel load address before using recovery mode or
the U-Boot will not be able to load LEDE firmware.
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
This patch adds initial support for the MikroTik RouterBOARD hAP ac
(RB962UiGS-5HacT2HnT).
All functions are supported except:
-SFP cage (eth1) is not working
-WLAN LEDs are not working
Signed-off-by: Ryan Mounce <ryan@mounce.com.au>
This patch adds support for the MikroTik RouterBOARD hAP ac lite
(RB952Ui-5ac2nD).
The hAP ac lite is nearly identical to the hAP, with an added QCA9887
5GHz radio. The 2.4GHz radio ID is also changed in the hAP ac lite.
Signed-off-by: Ryan Mounce <ryan@mounce.com.au>
v4.9 CM code has a few bugs on this HW. Disable the GCR register access
during boot. This caused a cpu stall.
Signed-off-by: John Crispin <john@phrozen.org>
The Pistachio target is a MIPS interaptiv based SoC developed by
Imagination Technologies. It includes blocks for i2c, spi, audio,
usb and WiFi.
This also adds the base support for the 'Creator Ci40 (marduk)'
device which uses the Pistachio SoC to create an IoT hub by
including Bluetooth, WiFi and 6lowpan on one board. Additionally 2x
Mikrobus ports are available to expand with further RF technologies
or add sensors. You can find out more here http://creatordev.io.
Note, this commit is just the initial board support hence the
following are not expected to work yet:
* WiFi
* Bluetooth
* 6lowpan
* Audio
* Mikrobus uarts, user leds (clock dependency of 6lowpan chip)
The aim of this commit is to essentially have the same level of
support that currently exists in the mainline kernel.
Signed-off-by: Abhijit Mahajani <Abhijit.Mahajani@imgtec.com>
Signed-off-by: Francois Berder <francois.berder@imgtec.com>
Signed-off-by: Ian Pozella <Ian.Pozella@imgtec.com>
Signed-off-by: Mayank Sirotiya <Mayank.Sirotiya@imgtec.com>
Signed-off-by: Sean Kelly <Sean.Kelly@imgtec.com>
This adds kernel support for the Pistachio SoC and the Marduk (Ci40)
board which uses it.
Much of the code for Pistachio has been upstreamed however some
patches are still required to boot from the Marduk board:
* spi bug fixes
* dma bug fixes
* pistachio internal clock tree bug fixes
* spi-nand implementation
* dts based mtd device naming scheme
* dts backports and bug fixes
Signed-off-by: Abhijit Mahajani <Abhijit.Mahajani@imgtec.com>
Signed-off-by: Francois Berder <francois.berder@imgtec.com>
Signed-off-by: Ian Pozella <Ian.Pozella@imgtec.com>
This patch adds support for AVM FRITZ!Box 4040.
hardware highlights:
SOC: IPQ4018 / QCA Dakota
CPU: Quad-Core ARMv7 Processor rev 5 (v7l) Cortex-A7
DRAM: 256 MiB Nanya NT5CC128M16IP
FLASH: 32 MiB MXIC MX25L25635FMI
ETH: Qualcomm Atheros QCA8075 Gigabit Switch (4 x LAN, 1 x WAN)
USB: 1 x 3.0 (via Synopsys DesignWare DWC3 controller in the SoC)
1 x 2.0 (via Synopsys DesignWare DWC3 controller in the SoC)
WLAN1: Qualcomm Atheros QCA4018 2.4GHz 802.11bgn 2:2x2
WLAN2: Qualcomm Atheros QCA4018 5GHz 802.11a/n/ac 2:2x2
INPUT: one WLAN and one WPS button
LEDS: Power, WAN/Internet, WIFI, INFO (red and amber) and LAN.
Serial:
WARNING: The serial port needs a TTL/RS-232 v3.3 level converter!
The Serial setting is 115200-8-N-1. The SoC's serial port is right
next to the MXIC FLASH chip. The board has a unpopulated 1x4 0.1"
header for it. Use a multimeter to figure out the pinout!
This board currently needs an additional u-boot image in order to boot
properly. Booting with EVA isn't possible ATM.
Install Procedure:
0. It's highly recommended to connect to the serial port.
The serial settings are listed above.
1. install a u-boot image for AVM Fritz!Box 4040
(see <https://github.com/chunkeey/FritzBox-4040-UBOOT/releases> and
<https://github.com/chunkeey/FritzBox-4040-UBOOT/blob/master/upload-to-f4040.sh>)
2. upload the initramfs.itb image via tftp (u-boot listens to
192.168.1.1 - use binary transfer mode!)
3. connect to the FB4040 and use sysupgrade sysupgrade.bin
to install the image.
Works:
- Switch and Ethernet (99%)
- Buttons (WLAN, WPS)
- FLASH (1 x 32MiB NOR Chip)
- WLAN2G and WLAN5G
- CPUFREQ scaling
- PRNG
- serial
- Crypto Accelerator
- sysupgrade (Read the flash instructions to avoid bricking)
- full LEDE Install (Read the flash instructions to avoid bricking)
- LEDs (Power, WAN, Info (red and amber), LAN)
The LEDs are connected to the QCA8075 LED ports.
The AR40xx driver contains a gpio-controller to
handle these special "GPIOs".
- USB Both 3.0 and 2.0 ports
- many packages from other ARMv7 boards
(This does include the RaspberryPi Model 2!)
- ...
Not planned:
- WAN<->LAN short-cut
- Qualcomm Secure Execution Environment
- ...
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John Crispin <john@phrozen.org>
This adds support for describing GPIO chips placed on PCIe cards. Thanks
to this we get working 2.4 GHz LED on Tenda AC9.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
This is the standard way we handle this. Please note (it seems) I could
drop few symbols as they are hidden under (disabled) DRM_LEGACY now.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Add back support for the independent_clocks definition that has been
removed between kernel 4.4 and 4.9 by upstream commits
eb96924acddc709db58221c210ca05cd9effb1df and
e86eee6bc2aaa6b3637f6497b26beee09a91bde9
* extend the new cpufreq_dt_platform_data definition in cpufreq-dt.h
* revert the removal of its usage in cpufreq-dt.c
* use new cpufreq-dt.h in qcom-cpufreq.c
Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
For IPQ806x targets, TZ protects the registers that are used to
configure the routing of interrupts to a target processor.
To resolve this, this patch uses scm call to route GPIO interrupts
to application processor. Also the scm call interface is changed.
Signed-off-by: Pavel Kubelun <be.dissent@gmail.com>
At the moment as a workaround definition for scm firmware in DT is used as if it is
apq8064 board. This leads to incomplete scm firmware initialization and as a result
cpuidle driver fails to configure.
By design unlike other qcom boards ipq do not use clocks to connect to scm.
Considering this we're removing from DT and scm driver clocks for ipq boards.
As a result cpuidle does not produce errors about failed configuration anymore.
Signed-off-by: Pavel Kubelun <be.dissent@gmail.com>
This fixes GIC interrupts (required before switching to 4.9), adds few
new entires & introduces DTS for Archer C5.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
This patch adds support for the Zbtlink ZBT-WE2026.
Specification:
- SoC: MediaTek MT7620N (580MHz)
- RAM: 64 MiB
- Flash: 8 MiB SPI
- LAN: 4x100M
- WAN: 1x100M
Installation through bootloader webserver:
- With the power unplugged press and hold reset button.
- Plug power and hold reset button until LED starts to blink.
- Install sysupgrade image using web interface on 192.168.1.1.
Signed-off-by: Vaclav Svoboda <svoboda@neng.cz>
SMP state is generally affected by
- CONFIG_SMP build-time kernel configuration option and
- 'nosmp' runtime kernel commandline option
The SMP state within vpe-mt.c is determined by CONFIG_SMP option.
A runtime check is needed if VPE functionality
should be used with a kernel image that supports SMP.
This fix introduces a check for 'nosmp' command line option
if CONFIG_SMP kernel configuration option is enabled.
Note: This patch is needed to use lantiq FXS if CONFIG_MIPS_MT_SMP
(that activates CONFIG_SMP) is enabled within kernel configuration
and the 'nosmp' command line argument is given to disable SMP at runtime.
Without this patch CONFIG_MIPS_MT_SMP must be disabled before using FXS.
With this patch setting the 'nosmp' parameter is enough.
In general, concurrent usage of FXS and SMP
is incompatible and will cause kernel panics.
Signed-off-by: Stefan Koch <stefan.koch10@gmail.com>
It is not needed for anything on the system and skipping this saves some
build time, especially in cases where there is nothing to do.
Signed-off-by: Felix Fietkau <nbd@nbd.name>
The problem is caused by the incorrect handling of the parent inode's
i_nlink count for the dentry to be RENAME_EXCHANGED. There are 3 cases
to consider. Assume we want to RENAME_EXCHANGE struct dentry *a and
struct dentry *b, and inode_a is pointed to by dentry_a, inode_b is
pointed to by dentry_b:
1. If inode_a is a directory, but inode_b isn't, then we must decrease
the i_nlink count of old_dir_i, and increase the i_nlink of new_dir_i.
2. If inode_a isn't a directory, but inode_b is a directory, then we
must increase the i_nlink of old_dir_i, and decrease the i_nlink count
of new_dir_i.
3. If the types of inode_a and inode_b are the same, we don't change the
i_nlink for either old_dir_i or new_dir_i.
Signed-off-by: Jing Qiu <aqiu0720@gmail.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Switch to the common LED related status_led_blink_* functions in
set_state() as it's done in most of other targets.
Also, use "status_led_on" instead of "status_led_set_heartbeat"
and incorrect "status_led_set_on" in the "done" state.
Moreover, remove outdated comment from the script.
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
When the device name doesn't already contain "RouterBOARD", this patch adds
this string to the machine name.
Most NOR devices already have "RouterBOARD" in their hardware-stored device name,
but not all of them.
This patch also makes the code more robust against buffer overflows.
Signed-off-by: Thibaut VARENE <hacks@slashdirt.org>
This driver supports CPU-specific idle features on recent Intel
processors. It does not conflict with the ACPI idle driver and
that driver will continue to be used for unsupported and non-Intel
processors.
Signed-off-by: Michael Marley <michael@michaelmarley.com>
The x86_64 build already has the k10temp driver for AMD processors
built in, so this patch adds the coretemp driver for the same
functionality on Intel processors.
Signed-off-by: Michael Marley <michael@michaelmarley.com>
SMP state is generally affected by
- CONFIG_SMP build-time kernel configuration option and
- 'nosmp' runtime kernel commandline option
The SMP state within vpe-mt.c is determined by CONFIG_SMP option.
A runtime check is needed if VPE functionality
should be used with a kernel image that supports SMP.
This fix introduces a check for 'nosmp' command line option
if CONFIG_SMP kernel configuration option is enabled.
Note: This patch is needed to use lantiq FXS if CONFIG_MIPS_MT_SMP
(that activates CONFIG_SMP) is enabled within kernel configuration
and the 'nosmp' command line argument is given to disable SMP at runtime.
Without this patch CONFIG_MIPS_MT_SMP must be disabled before using FXS.
With this patch setting the 'nosmp' parameter is enough.
In general, concurrent usage of FXS and SMP
is incompatible and will cause kernel panics.
Signed-off-by: Stefan Koch <stefan.koch10@gmail.com>
The available amount of coherent DMA memory is very limited. On Linux
4.4 this issue was worked around by increasing the pool size.
It turns out that using coherent memory here is completely unnecessary.
This change reworks the driver code to use kzalloc+dma_map_single
instead.
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Do not patch upstream files, overwrite them entirely. The upstream files
are buggy for a number of devices and this significantly simplifies the
patch structure
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: John Crispin <john@phrozen.org>
The Netgear WNDR4300, equipped with an Atheros AR8327 Gigabit Switch,
has two LEDs on each port for monitoring LAN activity, but it currently
only uses one. Fix the configuration to use both.
The patch provides this new configuration:
- green LED: 1 Gbps link, 4Hz blink frequency
- amber LED: 10/100 Mbps link. 4Hz for 100Mbps, 2Hz for 10Mbps
Signed-off-by: Daniel Gonzalez Cabanelas <dgcbueu@gmail.com>
At now there is no general rule about what part of (or whole) machine
name string should be used for board name assignment/detection and every
target handles this in a different way.
For most of the boards in ar71xx we already use only part of the string,
generally without the vendor name.
This shortens wildcards patterns in case statement for board name
assignment, wherever possible (e.g. where it won't be misleading).
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
Be consistent and always use double quotes for case statement patterns,
as in other targets. With this approach it should be less confusing for
users adding support for new devices.
Also, be consistent with MikroTik boards wildcard pattern.
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>