Commit Graph

17790 Commits (d6331d5583d17e4cf9f67906449cb11dcef4007c)

Author SHA1 Message Date
Alexander Couzens d6331d5583 ar71xx/image: make tar calls reproducible
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>
7 years ago
Christian Lamparter 6adc757097 apm821xx: MR24: fix ethernet phy detection on the MR24
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>
7 years ago
Mathias Kresin 1faff3b7e3 ramips: add MT7603E driver to AFoundry EW1200
Add the MT7603E driver for the 2.4GHz wireless.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Mathias Kresin e7cd6f5d66 ar71xx: add AVM FRITZ!WLAN Repeater 300E support
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>
7 years ago
Mathias Kresin 0605b15be4 ar71xx: add AR724x PCIe init fixes
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>
7 years ago
Mathias Kresin 8e0d7d6574 build: move lzma2eva build step to image-commands.mk
Move it to image-commands.mk so that it can used by other targets with
eva based boards as well.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Mathias Kresin d165f1f3bc kernel: move Lantiq PEF7061/7071/7072 phy driver to generic
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>
7 years ago
Rafał Miłecki f5f1d40b5e kernel: backport MTD patch extracing TRX code to separated parser
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years ago
Rafał Miłecki 4d5f296af8 kernel: backport upstream mtd support for partition parsers
In a log term it should replace our implementation. For now both can
coexist.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years ago
Rafał Miłecki 8c1e760ab6 kernel: backport upstream mtdpart.c cleanups
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>
7 years ago
Rafał Miłecki 4052443a23 kernel: don't switch allocate_partition to use mtd_roundup_to_eb
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>
7 years ago
Mathias Kresin 3ccca56eb0 ramips: remove optional ucidef_set_led_rssi parameters
The same values are set if the parameters are not specified.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Pavlo Samko 82f9486142 ramips: add support for TRENDnet TEW-638APB V2
This patch add support for the TRENDnet TEW-638APB V2.

Specification:
- SoC: Ralink SoC RT3052F
- Flash: 4MB
- RAM: 32MB
- Ethernet: 1x LAN (100 Mbps)
- Wireless: 2.4GHz b/g/n, 2x external antenna
- Buttons: 1x Reset, 1x WPS
- LEDs: Power (green), Ethernet (green), WPS (green and orange),
  Wireless (green)
- UART: 1x UART on PCB (3.3V, GND, RX, TX) - 57600 8N1

Installation

via vendor firmware:
- upload sysupgrade.bin image

via TFTP:
- stop uboot into tftp-load into option "2"
- upload sysupgrade.bin image

Signed-off-by: Pavlo Samko <bulldozerbsg@gmail.com>
7 years ago
Mathias Kresin 259fc1e778 lantiq: show xdsl line init status on shared dsl/internet led
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>
7 years ago
Martin Schiller 03776d813c lantiq: restore netdev trigger of dsl led on line up
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>
7 years ago
Pavel Kubelun 189239ade3 ipq806x: qca99xx: fix wifi calibration
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>
7 years ago
小桥 a3332f2aa2 ramips: fix Phicomm K1S(PSG1208) pinmux
Use gpio function for pins with LEDs.

Signed-off-by: 小桥 <29551030@qq.com>
7 years ago
Makoto Takeuchi ca27b3d370 kirkwood: add support for Cisco ON100
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>
7 years ago
Ben Whitten c2f052acae at91: convert boards to generic build target
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>
7 years ago
Piotr Dymacz 3ff31586eb ar71xx: image: simplify TP-Link devices definitions
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
7 years ago
Piotr Dymacz 8b556fb056 ar71xx: image: fix TP-Link TL-WR710N v2/v2.1 BOARDNAME
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>
7 years ago
Piotr Dymacz 7efe0cd83d ar71xx: image: tp-link.mk: keep devices in alphabetical order
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>
7 years ago
Piotr Dymacz a41f38e61d ar71xx: base-files: cleanups in 10-ar922x-led-fix
Fix code style, indentation and leading/trailing whitespaces in:
/etc/hotplug.d/net/10-ar922x-led-fix

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
7 years ago
Piotr Dymacz b73cb365d5 ar71xx: base-files: cleanups in 11-ath10k-caldata
Fix code style and boards alphabetical order in:
/etc/hotplug.d/firmware/11-ath10k-caldata

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
7 years ago
Ludwig Thomeczek b4711dbad3 ar71xx: add support for TP-Link Archer C25 v1
The TP-Link Archer C25 is a low-cost dual-band router.

Specification:

- CPU: Atheros QCA9561 775 MHz
- RAM: 64 MB
- Flash: 8 MB
- Wifi: 3x3 2.4 GHz (integrated), 1x1 5 GHz QCA9887
- NET: 5x 10/100 Mbps Ethernet

Some LEDs are controlled by an additional 74HC595 chip.

Signed-off-by: Ludwig Thomeczek <ledesrc@wxorx.net>
[minor code style fixes, boards alphabetical order fixes,
reworked commit message]
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
7 years ago
Serg Studzinskii b7cc661615 ar71xx: add support for TP-Link TL-WR942N v1
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>
7 years ago
Piotr Dymacz 641af0c39d ar71xx: move WRTnode2Q to generic build target
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
7 years ago
Piotr Dymacz 636ae9e9a0 ar71xx: image: simplify Ubiquiti devices definitions
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
7 years ago
Piotr Dymacz 01aa23acf7 ar71xx: image: mikrotik: shorten DEVICE_TITLE
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
7 years ago
Piotr Dymacz 7bc5571d14 ar71xx: image: use simply expanded variables
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
7 years ago
Piotr Dymacz 80136e57a4 ar71xx: image: update GL.iNet boards DEVICE_TITLE
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>
7 years ago
Piotr Dymacz 93198b8335 ar71xx: image: fix 8devices boards DEVICE_TITLE
Be consistent with DEVICE_TITLE syntax and use vendor + board names.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
7 years ago
Piotr Dymacz bd92a6cf57 ar71xx: image: drop unused mtdlayouts from legacy.mk
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
7 years ago
Piotr Dymacz 708cc2bd3c ar71xx: image: cosmetic: drop redundant empty lines
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
7 years ago
Piotr Dymacz e83cac1a8f ar71xx: image: add ROOTFS_SIZE to DEVICE_VARS
Also use ROOTFS_SIZE variable in place of static values.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
7 years ago
Piotr Dymacz c00fb14329 ar71xx: image: keep custom Build/* functions in separate files
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>
7 years ago
Piotr Dymacz 3a3cd0ac43 ar71xx: image: keep DEVICE_VARS and Build/* at the beginning
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
7 years ago
Piotr Dymacz af27dd1a51 ar71xx: image: simplify Compex devices definitions
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
7 years ago
Piotr Dymacz 43c0ef1010 ar71xx: image: drop redundant kmod-usb-ohci from DEVICE_PACKAGES
kmod-usb-ohci is needed only on devices with AR71xx and AR7240 SoCs.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
7 years ago
Piotr Dymacz 05e276c071 ar71xx: image: drop redundant uboot-envtools from DEVICE_PACKAGES
uboot-envtools is already included in DEFAULT_PACKAGES for ar71xx.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
7 years ago
Kevin Darbyshire-Bryant 8960f2b80c
ar71xx: fixup ar71xx/ar933x_wmac_reset: remove indefinite wait for wmac reset
Fix malformed patch introduced by 296312fca1

Signed-off-by: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
7 years ago
Alexander Couzens ab11618001 ar71xx/ar93xx_wmac_otp_read_word: fix wrongly used sizeof(*u)
Found-by: Coverity Scan #1330474
Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
7 years ago
Alexander Couzens 878cd77026 linux/swconfig_get_attr: fix leak of msg in case of error
Found-by: Coverity Scan #1330102
Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
7 years ago
Alexander Couzens 814e1695aa linux/ledtrig-netdev: remove `unsigned < 0` check
Found-by: Coverity Scan
Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
7 years ago
Alexander Couzens 296312fca1 ar71xx/ar933x_wmac_reset: remove indefinite wait for wmac reset
Found-by: Coverity Scan #1329327
Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
7 years ago
Alexander Couzens 1025941662 ar71xx/ag71xx_ethtool: don't return uninitialized return value on success
ag71xx_ethtool_set_ringparam() will return an uninitialized value on
success.

Found-by: Coverity Scan #1330877
Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
7 years ago
Alexander Couzens 64cd4b48e8 ar71xx/ag71xx_mdio_probe: fix a memory leak when probe fails
Found-by: Coverity Scan #1330233
Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
7 years ago
Alexander Couzens d18cb142d5 ar71xx/ag71xx_ar7240_get_port_link: fix off-by-one check on argument `port`
Found-by: Coverity Scan #1329901
Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
7 years ago
Jonas Gorski b43c190079 brcm63xx: probe SPI connected switches through DT
Now that we can configure the switches through DT, do so.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
7 years ago
Jonas Gorski 5df15c06cc b53: allow configuration through device tree
Add support for the same binding as upstream b53 to allow an
easy switch.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
7 years ago