Commit graph

18961 commits

Author SHA1 Message Date
Johann Neuhauser
c15dfbeea0 ath79: fix gmac compatible in ar9330.dtsi and ag71xx_setup_gmac_933x
1. compatible property in node gmac was wrong

2. ag71xx_setup_gmac_933x should use np of gmac-config and
   not the pointer to gmac. gmac is only used for the reg address.

Signed-off-by: Johann Neuhauser <johann@it-neuhauser.de>
2018-05-15 06:38:07 +02:00
Michael Gray
bfbdeeb3de mvebu: add support for WRT32X (venom)
Linksys WRT32X (Venom) is identical in hardware to the WRT3200ACM
with a different flash layout and boots zImage rather than uImage.

Specification:
- Marvell Armada 385 88F6820 (2x 1.8GHz)
- 256MB of Flash
- 512MB of RAM
- 2.4GHz (bgn) and 5GHz (an+ac wave 2)
- 4x 1Gbps LAN + 1x 1Gbps WAN
- 1x USB 3.0 and 1x USB 2.0/eSATA (combo port)

Flash instruction:
Apply factory image via web-gui.

Signed-off-by: Michael Gray <michael.gray@lantisproject.com>
2018-05-14 17:20:10 +02:00
Linus Walleij
1f56417e6b gemini: Augment DIR-685 device tree for RTL8366RB
This makes the ethernet and RTL8366RB come up on the
D-Link DIR-685.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2018-05-14 16:24:10 +02:00
Linus Walleij
3b48111df9 gemini: create zImage for DIR-685
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2018-05-14 16:24:09 +02:00
NeilBrown
edea934799 ramips: remove unnecessary resource details.
These resources are extracted from devicetree, so they aren't
needed here.

Signed-off-by: NeilBrown <neil@brown.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-14 16:24:07 +02:00
NeilBrown
1f78625714 ramips: remove conditional compilation.
Code currently defines:

and then compiles code only if they are defined.
We might want to disable some of these via devicetree one
day, but for now just remove the #defines and the
conditions - all the code for different ports is
easy to identify.

Signed-off-by: NeilBrown <neil@brown.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-14 16:24:04 +02:00
NeilBrown
5f7396ebef ramips: improve interrupt mapping
As the Interrupts for the PCI adapters are listed in
devicetree we shouldn't need to have them explicit in the code.

The simplest way to do this is to use of_irq_parse_and_map_pci()
and specify an interrupt-map which identifies the different
PCI hosts by bus/slot numbers.
This has the advantage that the hwirq number are mapped to virq
numbers for us, so the ugly hack can go.

Signed-off-by: NeilBrown <neil@brown.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-14 16:23:59 +02:00
Christian Lütke-Stetzkamp
2ad4daf579 ramips: Remove redundant owner assignment
Remove the owner assignment form the platform driver as
platform_driver_register() already initializes the owner.
Found using coccinelle.

Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-14 16:23:36 +02:00
Rosen Penev
a098a78a33 ramips: Move PCI driver to files directory
This will make it easier to port upstream code.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2018-05-14 15:55:17 +02:00
Jo-Philipp Wich
aadca035bc at91: sama5d4: fix bad mkubifs options
Drop the "-x lzo" compression type override from MKUBIFS_OPTS since we
do not support it in mkfs.ubifs. Attempting to use LZO compression results
in "Error: bad compressor name".

The build system also appends an explicit "--compr=zlib" to the mkfs command
line, turning the "-x" flag into a no-op anyway.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-05-13 18:33:47 +02:00
Rafał Miłecki
404508001e kernel: use accepted version of bcm47xxpart fix commit
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2018-05-12 23:53:44 +02:00
Rafał Miłecki
070693477a kernel: backport mtd patch for minor partitioning cleanup
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2018-05-12 23:14:07 +02:00
Felix Fietkau
a3096b4b33 kernel: fix build error in flow offload code with CONFIG_NETFILTER=n
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2018-05-12 22:28:00 +02:00
Rafał Miłecki
02225f5763 bcm53xx: backport the first bunch of 4.18 BCM5301X patches
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2018-05-12 15:38:55 +02:00
Jo-Philipp Wich
cf7a88cf5a at91: cleanup kernel configurations
The subtarget configurations contained a lot of reduntant symbols, arbitrary
overrides and symbols set to =m.

Remove most of these redundant settings to shrink the subtarget configurations
to a manageable size.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-05-11 18:24:00 +02:00
Jo-Philipp Wich
f23326eb76 at91: sama5d2: remove CONFIG_XZ_DEC override
Fixes the following error spotted by the buildbot:

    Package kmod-fs-squashfs is missing dependencies for the following libraries:
    xz_dec.ko

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-05-11 16:40:34 +02:00
Jo-Philipp Wich
0167f53b9d at91: add missing config symbols
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-05-11 16:01:26 +02:00
Jo-Philipp Wich
d8c7cd9cb1 kernel: rtl8366_smi: guard of_mdiobus_register() call
Make the call to of_mdiobus_register() dependant on CONFIG_OF to avoid
pulling in an unwanted dependency on of_mdio.ko.

Fixes: 3dc523f232 kernel: add OF support to rtl8355 driver
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-05-11 15:07:56 +02:00
Piotr Dymacz
ce4d2fb5cc ar71xx: fix and improve ALFA Network Tube2H support
Fix ART offset (make it universal for 8/16 MB versions of the board) and
while at it, include also GPIO setup for h/w watchdog (EM6324QYSP5B).

Fixes: FS#1532

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2018-05-09 20:32:47 +02:00
Matthias Schiffer
db34cdf6c5
ath79: Ubiquiti Airmax M: add relocate-kernel to invalidate cache
Apply ar71xx fix for broken Ubiquiti bootloader to ath79 as well.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
2018-05-08 21:14:24 +02:00
Felix Fietkau
6069bdd087 ramips: move mtk-mmc init to probe function to avoid breaking NAND flash
The driver messes with the pin control settings - MMC and NAND are
mutually exclusive

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2018-05-08 17:56:04 +02:00
Felix Fietkau
f95a4aa565 ramips: clean up the mt7621 nand flash driver hacks, add support for the xiaomi mir3g flash chip
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2018-05-08 17:56:04 +02:00
Rafał Miłecki
97f3c0f041 brcm47xx: switch to the kernel 4.14
The biggest (and the only?) disadventage of this is obviously an
increased image size.

For mips74k the size of vmlinux goes up from 4186684 B to 4701436 B.
Most devices use LZMA compressed kernel so probably more important is
vmlinux.lzma size which goes up from 1342945 B to the 1508498 B.

Still this isn't something that should stop target kernel bump. There
are various adventages of kernel 4.14. If kernel / image size is a
serious concern for anyone, it's perfectly possible to use previous
release which is pretty solid for the brcm47xx.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Cc: Paul Wassi <p.wassi@gmx.at>
Cc: Hauke Mehrtens <hauke@hauke-m.de>
2018-05-08 09:55:10 +02:00
Rafał Miłecki
f9dcdc7fef kernel: mark source kernel for netfilter backports
This helps keeping track on patches & adding new kernels in the future.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2018-05-08 09:42:07 +02:00
Davide Ammirata
004cc22e4e ramips: add support for mqmaker witi 512mb version
Splitted out the dts file and create the new dts for the 256 MByte RAM and
the 512 MB RAM version.

Migrate both versions to the common board detection.

The install the 512 MByte Version on a board running the 256 MByte image,
a forceful sysupgrade with the -F flag is required.

Signed-off-by: Davide Ammirata <list@davidea.it>
2018-05-07 18:54:23 +02:00
Matthias Badaire
5ef79af4f8 ramips: add support for Ravpower WD03
The RavPower WD03 is a battery powered SD card reader and a USB port.

Specifications:
SOC:     MediaTek MT7620N
BATTERY: 6000mah
WLAN:    802.11bgn
LAN:     1x 10/100 Mbps Ethernet
USB:     1x USB 2.0 (Type-A)
RAM:     PM Tech PMD708416CTR-5CN 32 MB
FLASH:   Holtek HT66F40 - 8 MB Flash
LED:     Power button and 4 leds to indicate power level of the
         battery (could not get control of that)
INPUT:   Power, reset button
OTHER:   USB SD-Card reader with card detect on GPIO#42

Tested and working:
 - Ethernet
 - 2.4 GHz WiFi (Correct MAC-address)
 - installation from tftp
 - OpenWRT sysupgrade (Preserving and non-preserving)
 - LEDs
 - Buttons

Installation:
 - Download the sysupgrade image
 - Place it in the root of a clean TFTP server running on your computer.
 - Rename the image to "kernel" — be sure there is no file extension.
 - Plug the WD03 into your computer via ethernet.
 - Set your computer to use 10.10.10.254 as its IP address.
 - With your WD03 shut down, hold down the power button until the first
   white LED lights up.
 - Push and hold the reset button and release the power button. Continue
   holding the reset button for 30 seconds or until it begins searching
   for files on your TFTP server, whichever comes first.
 - The WD03 (10.10.10.128) will look for your computer at 10.10.10.254
   and install the kernel file. Once it has finished installation of the
   kernel file, it will search for a (nonexistent) rootfs file — when it
   begins searching for this file, shut down the WD03 by holding the
   power button normally.
 - Start up your WD03 normally.

Signed-off-by: Matthias Badaire <mbadaire@gmail.com>
2018-05-07 18:54:23 +02:00
Mathias Kresin
ef19747b6c lantiq: kernel 4.14: Remove reboot/remove reset asserts
Backport patch accepted upstream which removes the reset asserts of the
xrx200 gphy driver on reboot/remove.

While doing a global software reset, these bits are not cleared and let
some bootloader fail to initialise the GPHYs. The bootloader don't expect
these bits to be set, as they aren't during power on.

The asserts were a workaround for a wrong syscon-reboot mask. With a mask
set which includes the GPHY resets of the first reset register, the
resets of the second reset register arn't required any more.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2018-05-07 18:53:08 +02:00
John Crispin
99f10b193e ath79: drop dts/Makefile
Signed-off-by: John Crispin <john@phrozen.org>
2018-05-07 15:01:12 +02:00
Russell Senior
4aacd6388a ath79: u-boot partitions should be read-only in dts
Some of the new ath79 device trees were missing read-only tags on the
u-boot partitions.  This adds the tags where previously missing.

Signed-off-by: Russell Senior <russell@personaltelco.net>
2018-05-07 13:07:00 +02:00
Rafał Miłecki
4edd4cb2b3 ath79: use the new DT fixed partitions syntax
This new syntax is slightly better designed & uses "compatible" string.
For details see Documentation/devicetree/bindings/mtd/partition.txt .

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2018-05-07 12:57:47 +02:00
John Crispin
7fe77a5962 ath79: revert license change on upstream DTS files
Signed-off-by: John Crispin <john@phrozen.org>
2018-05-07 12:52:03 +02:00
David Bauer
b6a4c67468 ar71xx: add support for Fritz!Box 4020
This commit adds support for the AVM Fritz!Box 4020 WiFi-router.

SoC:   Qualcomm Atheros QCA9561 (Dragonfly) 750MHz
RAM:   Winbond W971GG6KB-25
FLASH: Macronix MX25L12835F
WiFi:  QCA9561 b/g/n 3x3 450Mbit/s
USB:   1x USB 2.0
IN:    WPS button, WiFi button
OUT:   Power LED green, Internet LED green, WLAN LED green,
       LAN LED green, INFO LED green, INFO LED red
UART:  Header Next to Black metal shield
       Pinout is 3.3V - RX - TX - GND (Square Pad is 3.3V)
       The Serial setting is 115200-8-N-1.

Tested and working:
 - Ethernet (LAN + WAN)
 - WiFi (correct MAC)
 - Installation via EVA bootloader
 - OpenWRT sysupgrade
 - Buttons
 - LEDs

Not working:
 - USB port

Installation via EVA:
In the first seconds after Power is connected, the bootloader will
listen for FTP connections on 169.254.157.1 (Might also be 192.168.178.1). Firmware can be uploaded
like following:

  ftp> quote USER adam2
  ftp> quote PASS adam2
  ftp> binary
  ftp> debug
  ftp> passive
  ftp> quote MEDIA FLSH
  ftp> put openwrt-sysupgrade.bin mtd1

Note that this procedure might take up to two minutes. After transfer is
complete you need to powercycle the device to boot OpenWRT.

Signed-off-by: David Bauer <mail@david-bauer.net>
2018-05-07 10:42:26 +02:00
Rafał Miłecki
66c8afd115 ath79: relicense DTS files to the GPL 2.0+ / MIT
Some maintainers prefer DTS files licensed under permissive license like
MIT / BSD. As all DT bindings should be OS independent and DTS files are
pretty separated from Linux code it probably makes sense to share them
across projects.

The safest solution is to use dual licensing: that way it stays clear
these files can be used in GPL projects without depending on current
belief of licenses compatibility.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Acked-by: John Crispin <john@phrozen.org>
2018-05-07 10:31:35 +02:00
John Crispin
53c474abbd ath79: add new OF only target for QCA MIPS silicon
This target aims to replace ar71xx mid-term. The big part that is still
missing is making the MMIO/AHB wifi work using OF. NAND and mikrotik
subtargets will follow.

Signed-off-by: John Crispin <john@phrozen.org>
2018-05-07 08:06:51 +02:00
John Crispin
3dc523f232 kernel: add OF support to rtl8355 driver
Signed-off-by: John Crispin <john@phrozen.org>
2018-05-07 08:06:51 +02:00
Rafał Miłecki
ed00387dc5 bcm53xx: switch to the new/alternative SPI controller driver
This switches bcm53xx from spi-bcm53xx to the spi-bcm-qspi driver. The
later one was developed by Broadcom and is more advanced one. It
supports more modes, setting a speed, setting bits per word and uses
IRQs instead of polling.

This increases kernel size from 1808120 B to the 1811160 B (by 3040 B).

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2018-05-07 07:56:38 +02:00
John Crispin
6e0ae87a98 ramips: disable spi full duplex on mt7621
Signed-off-by: John Crispin <john@phrozen.org>
2018-05-05 08:25:18 +02:00
Linus Walleij
6cd2e1f947 gemini: Add ethernet to DNS-313 and Wiliboard
This adds an interrim patch for v4.14 based on an
upstream commit to get ethernet working on D-Link DNS-313
(probably also on the Wiliboards)

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2018-05-05 06:57:00 +02:00
Roman Yeryomin
ce93b05bf1 gemini: fix hard disk boot on D-Link devices
Since the D-Link devices boot from hard disk we need to
add the following changes to Gemini:

- Supply a bootarg in the device tree so we can boot from
  the right partition (/dev/sda4 on DNS-313)
- Disable forced command line in config so the kernel picks
  up the right bootargs from the device tree
- Enable EXT4 in the config as this is used for rootfs else
  we get nowhere, we cannot load this as a module because,
  well, it is supposed to be loaded from the root partition
  (chicken and egg problem).
- Enable jbd2 and mbcache (needed by ext4)

Also clean out the premature attempts to dynamically
modify the command line in the Image makefile: we should
pass this with the device tree bootargs instead, it works
much better.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Roman Yeryomin <roman@advem.lv>
2018-05-05 06:57:00 +02:00
Roman Yeryomin
2c35bcffd0 gemini: add rtl8366rb to dir-685 board
Signed-off-by: Roman Yeryomin <roman@advem.lv>
2018-05-05 06:57:00 +02:00
Roman Yeryomin
af069fbd24 gemini: cleanup kernel config
Disable video and input drivers - they are needed only for one
board and can be enabled via modules if/when UI will be available.
Use LED drivers from packages.
Cleanup other things unnecessarily overriding defaults.

Signed-off-by: Roman Yeryomin <roman@advem.lv>
2018-05-05 06:57:00 +02:00
Roman Yeryomin
91930c0f99 gemini: remove 4.4 support
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Roman Yeryomin <roman@advem.lv>
2018-05-05 06:57:00 +02:00
Roman Yeryomin
6409b159e8 gemini: switch to 4.14
This introduces Device/ infrastructure and images
for all boards available upstream.

Changes from Linus submitted version:
- fix Raidsonic image generation
- remove redundant (old) image generation
- remove redundant header tool for dns313 board

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Roman Yeryomin <roman@advem.lv>
2018-05-05 06:57:00 +02:00
Roman Yeryomin
4f74957584 gemini: add 4.14 support
This adds the patches to get fairly complete Gemini support
using kernel v4.14. It is mainly a backport of patches from
kernel v4.16 with omissions of things like graphics that require
substantial changes and will be better handled once we move
to the v4.16 kernel proper.
On top of this are some WIP patches for USB support.

Tested on Raidsonic NAS4220B and D-link DNS-313.

ChangeLog v4->v5:
- Fix ethernet single gmac usecase
- Fix USB reset (patch from Hans)
- Fix Raidsonic ethernet skew delay
- Fix kernel config (bridge, squashfs, jffs2, usb)
- Disable second usb port on Raidsonic board until fotg210_hcd is fixed

ChangeLog v3->v4:
- Make sure to use tabs rather than spaces in base-files.
- Use the dns313 image tool from the firmware-utils.
- Break out the addition of the v4.14 patches and the removal
  of the v4.4 patches to separate (big) patches.

ChangeLog v2->v3:
- Update the kernel config as indicated by Hauke Martens:
- Regenerate again after rebasing using kernel_oldconfig
  dropping a few optimization settings that are now generic
- Drop CFG80211 stuff (module)
- Drop CIFS stuff (module)
- Drop MAC80211 (module)
- Drop wireless drivers (module)
- Enabled OverlayFS
- Added proper DNS-313 boot image generation with the special
  file header tool.
- Disable CMA in the kernel
- Enable LZMA compression of the kernel
- Consequently name the nas4220b images nas4220b
- Update preinit MAC detection script to handle also DNS-313
- Add board.d/03_hdparm to set the disk to spin down after
  1 minute by default, if we have the hdparm tool installed

ChangeLog v1->v2:
- Processed config through kernel_oldconfig
- Processed patches through make target/linux/{clean,refresh} V=99

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Roman Yeryomin <roman@advem.lv>
2018-05-05 06:57:00 +02:00
Roman Yeryomin
55c9aa27be gemini: rename files directory (preparation for 4.14)
Signed-off-by: Roman Yeryomin <roman@advem.lv>
2018-05-05 06:57:00 +02:00
Sandeep Sheriker Mallikarjun
610770dc5b at91: refreshing kernel configurations.
refreshing kernel configurations for sama5 and legacy subtarget.

Signed-off-by: Sandeep Sheriker Mallikarjun <sandeepsheriker.mallikarjun@microchip.com>
2018-05-05 06:55:22 +02:00
Sandeep Sheriker Mallikarjun
27ca6cdc7b at91: Add SAMA5D2 PTC EK board
Add target device as at91-sama5d2_ptc_ek in SAMA5D2 subtarget and
build images for SAMA5D2 PTC Ek board.

Signed-off-by: Sandeep Sheriker Mallikarjun <sandeepsheriker.mallikarjun@microchip.com>
2018-05-05 06:55:22 +02:00
Sandeep Sheriker Mallikarjun
60750ab505 at91: reorganize at91 subtargets
reorganizing at91 subtargets based on sama5 soc features and this fix
below problems.
  1. able to set neon flags to sama5d2 & sama5d4 subtargets.
  2. fix the make clean which removes all the subtargets in bin folder.
  3. able to configure kernel specific to subtarget.
  4. able to set vfpu4 flags to samad3 subtargets.

Signed-off-by: Sandeep Sheriker Mallikarjun <sandeepsheriker.mallikarjun@microchip.com>
2018-05-05 06:55:22 +02:00
Sandeep Sheriker Mallikarjun
581f5e2392 at91: sdcard image with ext4 rootfs
creating sdcard image with ext4 rootfs only and ignoring creating
other filesystem in sdcard image.

Signed-off-by: Sandeep Sheriker Mallikarjun <sandeepsheriker.mallikarjun@microchip.com>
2018-05-05 06:55:21 +02:00
Sandeep Sheriker Mallikarjun
22c398d257 at91: Add SAMA5D27 SOM1 EK board
Add support for SAMA5D27 SOM1 with target device as at91-sama5d27_som1_ek
in SAMA5 subtarget and build images for SAMA5D27 SOM1 Ek board.

Signed-off-by: Sandeep Sheriker Mallikarjun <sandeepsheriker.mallikarjun@microchip.com>
2018-05-05 06:55:21 +02:00