Commit Graph

651 Commits (fbd4214bb0727268aa535af5b600d38939ec8dbc)

Author SHA1 Message Date
Stijn Segers 41a881a8d9 Kernel: bump 4.14 to 4.14.29
Right patch version this time, sorry!

* Patch 180-usb-xhci-add-support-for-performing-fake-doorbell.patch had to be adjusted slightly because of upstream adapted code.
* Refreshed patches.

Compile-tested: ramips/mt7621, x86/64
Run-tested: ramips/mt7621, x86/64
Signed-off-by: Stijn Segers <foss@volatilesystems.org>
Tested-by: Rosen Penev <rosenp@gmail.com>
6 years ago
Rafał Miłecki 6c194078db bcm53xx: include patch adding WZR-900DHP LEDs support
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
6 years ago
Stijn Segers e72b2464b1 kernel: bump 4.4 to 4.4.119
This bumps the 4.4. kernel in master to 4.4.119.
Includes more Meltdown & Spectre mitigation.

* Refresh patches.
* Refresh x86/config for RETPOLINE.
* Deleted 8049-PCI-layerscape-Add-fsl-ls2085a-pcie-compatible-ID.patch (accepted upstream)
* Deleted 8050-PCI-layerscape-Fix-MSG-TLP-drop-setting.patch (accepted upstream)
* Deleted 650-pppoe_header_pad.patch (does not apply anymore (code was replaced)).

Bumps from 4.4.112 to 4.4.115 were handled by Kevin Darbyshire-Bryant.

Compile-tested on: ar71xx & oxnas.

Signed-off-by: Stijn Segers <foss@volatilesystems.org>
Tested-by: Rosen Penev <rosenp@gmail.com>
6 years ago
Stijn Segers b5469b38cd kernel: bump 4.14 to 4.14.23
This patch bumps the 4.14 kernel to .23.
- Refreshed patches.
- Deleted bcm53xx/patches-4.14/089-PCI-iproc-Fix-NULL-pointer-dereference-for-BCMA.patch. Has been accepted upstream.
- Deleted generic/pending-4.14/821-usb-Remove-annoying-warning-about-bogus-URB.patch. The upstream URB code was changed,
  the patch no longer applies. I discussed this with the patch author and removed it for now, we'll see how it goes.

Compile-tested on: ramips/mt7621, x86/64
Run-tested on: ramips/mt7621, x86/64

Signed-off-by: Stijn Segers <foss@volatilesystems.org>
6 years ago
Rafał Miłecki 86e5a6d985 bcm53xx: fix fallback code for picking status LED
Looking for a wrong LED file name was stopping this code from find any
LED. This affects devices with only a red/amber power LED.

Fixes: 3aaee1ba02 ("bcm53xx: failsafe support")
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
6 years ago
Rafał Miłecki 3618dcbff8 bcm53xx: rename SPI driver fix to use 0xx prefix as it was accepted
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
6 years ago
Rafał Miłecki 8cd3370cce bcm53xx: use upstream fix for PCI iproc driver regression
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
6 years ago
Rafał Miłecki 05cb6aa69f bcm53xx: replace linux,part-probe with a proper partitions subnode
This solution is more upstream compatible as it only requires specifying
of_match_table in the parser code and doesn't depend on linux,part-probe
which is solution made generic by a LEDE downstream patch that can't be
upstreamed.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
6 years ago
Rafał Miłecki 3267ce750e bcm53xx: use iflag=skip_bytes for dd command during sysupgrade
Since BusyBox 1.25.0 dd command supports iflag=skip_bytes which allows
skipping requested amount of bytes without reducing blocksize. Thanks to
this we can leave default blocksize and let dd work more efficiently.

On Netgear R6250 "dd skip=58 iflag=skip_bytes" can be 5 times faster
than "dd bs=58 skip=1" when extracting TRX out of CHK.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
6 years ago
Rafał Miłecki fea884ff51 bcm53xx: add early support for kernel 4.14
Don't switch to it by default yet as it requires more testing.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
6 years ago
Rafał Miłecki 6e922a0756 bcm53xx: make USB packages compatible with kernels 4.13+
In kernels 4.13+ modules are located in an extra "broadcom" subdir.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
6 years ago
Rafał Miłecki 9c312ef628 bcm53xx: add upstream patch fixing SPI controller driver
That patch fixes handling SPI messages with two writing transfers. It's
important when using e.g. by m25p80 driver which uses one transfer for
opcode and another one for data.

Thanks to that fix we can now drop m25p80 workaround patch. It means one
less hack and also a better flash writing performance as there is no
more data buf copying.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
6 years ago
Kevin Darbyshire-Bryant 7b6e01d389 kernel: bump 4.9 to 4.9.72
Refresh patches.

Runtime tested: ar71xx - Archer C7 v2

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
6 years ago
Kevin Darbyshire-Bryant b0d99b77e5 kernel: bump 4.4 to 4.4.107
Refresh patches.

Update patch that no longer applied:
oxnas/0072-mtd-backport-v4.7-0day-patches-from-Boris.patch

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
Tested-by: Rosen Penev <rosenp@gmail.com>
6 years ago
Rafał Miłecki 370ce1fb48 bcm53xx: use otrx for creating TRX images
The advantage is that we don't have to specify max TRX size anymore and
otrx doesn't allocate a buffer of that size. It saves us allocating
32 MiB for every image we generate.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years ago
Florian Fainelli 5df1f4113b bcm53xx: Fix Generic profile description
Fix the sentence describing the bcm53xx generic profile.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
7 years ago
Florian Fainelli 7f0a32e21c bcm53xx: Fix SmartRG SR400AC initramfs image
The SmartRG SR400AC CFE does not accept a TRX image, just a normal
binary image.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
7 years ago
Kevin Darbyshire-Bryant 886d66abcd kernel: bump 4.9 to 4.9.57
Refresh patches.
Compile-tested for ar71xx - Archer C7 v2
Runtime-tested on  ar71xx - Archer C7 v2

Fixes the following CVEs:

- CVE-2017-7518
- CVE-2017-0786
- CVE-2017-1000255
- CVE-2017-12188
- CVE-2017-15265

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
7 years ago
Rafał Miłecki f98f83eada bcm53xx: backport DTS changes up to the first 4.15 queued commits
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years ago
Stijn Tintel f12c42940d kernel: bump 4.9 to 4.9.54
Refresh patches.
Remove upstreamed patches:
- ramips/0067-enable-mt7621-xhci.patch
- ramips/0085-pinmux-util.patch
- ramips/301-fix-rt3883.patch

Compile-tested on brcm2708/bcm2708, octeon, ramips/mt7621, x86/64.
Runtime-tested on brcm2708/bcm2708, octeon, ramips/mt7621, x86/64.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
7 years ago
Kevin Darbyshire-Bryant 9c82861cb8 kernel: update 4.4 to 4.4.86
Refresh patches

Compile & run tested: ar71xx - Archer C7 v2

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
7 years ago
Stijn Tintel 046618f5da kernel: update 4.9 to 4.9.47
Refresh patches.
Compile-tested on ramips/mt7621 and x86/64.
Runtime-tested on ramips/mt7621 and x86/64.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
7 years ago
Rafał Miłecki d9564d79b8 bcm53xx: backport DTS commits that setup USB LEDs
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years ago
Hauke Mehrtens 39e8ab17d5 kernel: update kernel 4.4 to version 4.4.79
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
7 years ago
Hauke Mehrtens 88f3c63572 kernel: update kernel 4.9 to version 4.9.40
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
7 years ago
Mathias Kresin e4e984f2a0 treewide: use only board_name function to get name
Do not parse /tmp/sysinfo/board_name, /proc/cpuinfo or the device tree
compatible string directly. Always use the board_name function to get
the board name.

The admswconfig package still reads /proc/cpuinfo directly. The code
looks somehow broken and the whole adm5120 which uses this package
looks unmaintained. Leave it as it is for now.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Mathias Kresin f12a32630f treewide: use the generic board_name function
Use the generic function instead ot the target specific ones.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Koen Vandeputte cd54b2d42b kernel: update kernel 4.9 to 4.9.37
- Refreshed all patches
- Removed upstreamed
- Adapted 4 patches:

473-fix-marvell-phy-initialization-issues.patch
-----------------------------------------------
Removed hunk 5 which got upstreamed

403-net-phy-avoid-setting-unsupported-EEE-advertisments.patch
404-net-phy-restart-phy-autonegotiation-after-EEE-advert.patch
--------------------------------------------------------------
Adapted these 2 RFC patches, merging the delta's from an upstream commit
(see below) which made it before these 2.

https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-
stable.git/commit/?h=v4.9.36&id=97ace183074d306942b903a148aebd5d061758f0

180-usb-xhci-add-support-for-performing-fake-doorbell.patch
-----------------------------------------------------------
- Moved fake_doorbell bitmask due to new item

Compile tested on: cns3xxx, imx6
Run tested on: cns3xxx, imx6

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
7 years ago
Matthias Schiffer 438dcbfe74
base-files: automatically handle paths and symlinks for RAMFS_COPY_BIN
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>
7 years ago
Matthias Schiffer 73f675415c
bcm53xx: upgrade: fix RAMFS_COPY_*
Fixes: 30f61a34b4 "base-files: always use staged sysupgrade"
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
7 years ago
Stijn Tintel 880f73c327 kernel: cleanup CONFIG_SCHED_HRTICK
Remove CONFIG_SCHED_HRTICK from target configs, as it was added to the
generic config in b47fd76563.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
7 years ago
Stijn Tintel f80963d4d1 kernel: update kernel 4.4 to 4.4.74
Refresh patches.
Compile-tested on ar71xx.
Runtime-tested on ar71xx.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
7 years ago
Koen Vandeputte 69649a1b45 kernel: update kernel 4.9 to 4.9.34
- 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>
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 c00fbaf670 bcm53xx: include wpad-mini only on devices with (supported) wireless
Don't include wpad-mini when it's useless just like we don't include
useless wireless drivers.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years ago
Sergey Ryazanov 68e7a2a0b7 kernel: disable CONFIG_SG_POOL by default
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>
7 years ago
Koen Vandeputte e842e16f45 kernel: update kernel 4.9 to 4.9.29
- Refresh all patches
- Removed upstreamed
- Adapted 1

Compile tested on: bcm53xx, cns3xxx, imx6, lantiq
Run tested on: cns3xxx & imx6

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
[update from 4.9.28 to 4.9.29]
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
7 years ago
Rafał Miłecki 0a05fbd135 bcm53xx: add support for TP-LINK Archer C5 V2
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>
7 years ago
Rafał Miłecki 8adeb4e5d0 bcm53xx: backport MDIO bus clock initialization fix
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years ago
Rafał Miłecki 51abaf722c bcm53xx: backport USB 3.0 PHY patch cleaning all writes
It doesn't change any bevahior just cleanes up the code.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years ago
Rafał Miłecki 23d7c4d632 bcm53xx: enable Northstar thermal driver
It allows monitoring CPU temp and will shutdown system on critical
value.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years ago
Rafał Miłecki b0fcb9b85c bcm53xx: backport DT patches for serial, thermal and MDIO
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years ago
Rafał Miłecki 2ebfdabfbd bcm53xx: put kernel into TRX when building initramfs images
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>
7 years ago
Rafał Miłecki 8fae77fc9b kernel: update bcma including recent changes for 4.12
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>
7 years ago
Rafał Miłecki 0694d08c84 bcm53xx: switch to kernel 4.9
With iproc regression fixed and GIC interrupts in DTS updated it seems
we can safely start using 4.9.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years ago
Rafał Miłecki 3a2e735b96 bcm53xx: backport BCM5301X patches
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>
7 years ago
Rafał Miłecki cd0f9900a4 bcm53xx: parepare for building more Linksys images
We still can't enable them by default without proper TRX support.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years ago
Rafał Miłecki cc3c50eb22 bcm53xx: prepare for building Archer C5 V2 image
Don't enable it yet as kernel needs to be updated first.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years ago
Rafał Miłecki e58ea0a80d bcm53xx: use upstream fix for iproc regression
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years ago
Rafał Miłecki edda26dc4f bcm53xx: fix memory corruption caused by iproc PCE controller driver
This is a simple revert of upstream patch for now.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years ago
Rafał Miłecki 9209511d61 bcm53xx: backport Broadcom's iProc QSPI driver
This driver has been added instead of improving spi-bcm53xx. It has some
advantages: allows SPI speed control & hopefully doesn't have bug that
was stopping us from using multiple SPI messages for writing flash data.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years ago
Rafał Miłecki 2677b66f9b bcm53xx: backport accepted BCM5301X and BCM53573 patches
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years ago
Rafał Miłecki a732f69f85 bcm53xx: enable CLK_BCM_NSP for kernel 4.9
This is required to get booting kernel.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years ago
Rafał Miłecki 75b530a51b bcm53xx: add kernel 4.9 config
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years ago
Hauke Mehrtens 236840eb47 kernel: update kernel 4.9 to version 4.9.10
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
7 years ago
Rafał Miłecki 2fd81681f9 bcm53xx: include Broadcom PHY driver in the kernel
Initial idea was to use package with this PHY driver for devices that
need it. Unfortunately this can't work as bgmac is built-in and PHY
probing happens before loading modules - it results in PHY subsystem
picking default (generic) PHY driver.

There were two ways of solving this:
1) Making bcm53xx use bgmac as module
xor
2) Built-in Broadcom PHY driver

After some quick discussion it seems we can simply built-in the driver
as increased kenel size is relatively small (1805 B).

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years ago
Rafał Miłecki ec10bb18f5 bcm53xx: add missing system.sh include
It's needed for macaddr_add.

Fixes: 50efd403e6 ("bcm53xx: set WAN MAC address to don't share one with LAN interface")
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years ago
Rafał Miłecki 6b01f0f196 bcm53xx: set Netgear R8000 USB LEDs
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years ago
Rafał Miłecki fb18c3c8ff bcm53xx: refresh Linux 4.4 config
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years ago
Rafał Miłecki f24cb34239 bcm53xx: image: use one style of adding TARGET_DEVICES entries
It just makes code consistent. This trivial change may be a 17.01
candidate to provide simpler backporting experience.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years ago
Rafał Miłecki 26bc05eda9 bcm53xx: move bcm47xx_sprom driver to 4.4 specific directory
In kernel 4.9 it's already present so we don't want to overwite it (with
older & API incompatible version).

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years ago
Rafał Miłecki 2252627b0e bcm53xx: add Linux 4.9 patches
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years ago
Rafał Miłecki 75d48d80c7 bcm53xx: backport upstream DTS files for Linksys devices
We dont't build officialy images for them yet due to partitioning
issues.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years ago
Rafał Miłecki 50efd403e6 bcm53xx: set WAN MAC address to don't share one with LAN interface
After analyzing numerous NVRAMs and vendor firmwares it seems the base
MAC address is used for LAN interface. WAN interface has different one
which sometimes is set directly in NVRAM and sometines needs to be
calculated.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years ago
Rafał Miłecki 58221d79d9 bcm53xx: fix LAN MAC address for devices that use eth2 originally
We override default Ethernet interface with eth0 which often uses random
MAC due to missing proper NVRAM entry. Fix this by manually assigning
MAC in the config.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years ago
Rafał Miłecki 12288d450b kernel: update bcma to fix devm memory leaks
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years ago
FUKAUMI Naoki 3b5d29b96e bcm53xx: build factory images for WZR-900DHP series
only factory images for DHP-EU and DHP2-JP (fw ver. 2.x) are built.

this will not work for DHP-JP/AP/TW (fw ver. 1.x) because they use
different buffalo_csum() formula.

Signed-off-by: FUKAUMI Naoki <naobsd@gmail.com>
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years ago
Felix Fietkau 727e244fae bcm53xx: suppress osafeloader info error messages during flashing
Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Rafał Miłecki 55ff15cfd5 bcm53xx: disable building Linksys EA6300 V1 image
This device has 2 TRX partitions (main one and failsafe one) and Linux
may not detect them properly failing to run userspace.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years ago
Rafał Miłecki b86a34efea bcm53xx: use accepted BCM5301X patches for R8000 and Luxul devices
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years ago
Rafał Miłecki ea6d10d572 bcm53xx: add pending BCM5301X patches: Netgear R8000 WiFi & Luxul DTS
This specifies wireless limitations for Netgear R8000 making sure people
won't use channels incorrectly (limited performance). There are also 2
new DTS files not used by us yet.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years ago
Hauke Mehrtens 5b089e45a6 kernel: update 4.4 kernel to 4.4.42
Refresh patches on all 4.4 supported platforms.
Compile & run tested: lantiq/xrx200

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
7 years ago
Rafał Miłecki 4ce3c41696 bcm53xx: backport upstream bcm53xx spi driver changes
One replaces our local patch and another is just for keeping driver in
sync (license change).

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years ago
Rafał Miłecki 7c8a36340c kernel: update bcm47xxpart failsafe partition patches
V2 using helper function was sent for upstream kernel

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years ago
Rafał Miłecki 1a5cb4ac1b kernel: add pending bcm47xxpart support for failsafe TRX partition
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years ago
Felix Fietkau 018d80007e kernel: remove ubifs xz decompression support
It has been unused, and less useful than squashfs for cases where flash
space usage matters.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Victor Shyba d6c831e0e5 generic: mtd: backport SPI_NOR_HAS_LOCK
This flag was added to 4.9 with upstream commit
76a4707de5e18dc32d9cb4e990686140c5664a15.

Signed-off-by: Victor Shyba <victor1984@riseup.net>
[refresh and adjust platform patches, fix commit message]
Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Rafał Miłecki c5ca3043d1 bcm53xx: drop unused source file of bcm53xxspiflash
We don't use this driver since commit 741715331a ("bcm53xx: switch to
m25p80 and drop bcm53xxspiflash").

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years ago
Rafał Miłecki 2ca4c74279 bcm53xx: backport missed BCM53573 ILP patch from 4.10
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
8 years ago
Rafał Miłecki 1feb166ee7 bcm53xx: backport DTS patches accepted for 4.11
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
8 years ago
Rafał Miłecki 52c7375c13 bcm53xx: disable CONFIG_FW_LOADER_USER_HELPER_FALLBACK
There are many targets using user space scripts to generate firmware but
bcm53xx doesn't need this, so let's disable that kernel option.

This lets us avoid some scary-looking kernel warnings like:
brcmfmac 0001:04:00.0: Falling back to user helper
firmware brcm!brcmfmac43602-pcie.txt: firmware_loading_store: map pages failed

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
8 years ago
Rafał Miłecki ee55a19a61 bcm53xx: update patch adding fake USB doorbell
Rob suggested I should use of_machine_is_compatible insteak of a new
property and updated patch has been sent.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
8 years ago
Kevin Darbyshire-Bryant 102cb4742c kernel: bump to 4.4.35
Refresh patches on all 4.4 supported platforms.

077-0005-bgmac-stop-clearing-DMA-receive-control-register-rig.patch
removed as now upstream.

Compile & run tested: ar71xx - Archer C7 v2

Signed-off-by: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
8 years ago
Rafał Miłecki 32875a2d79 bcm53xx: use upstream accepted fix for ARM core aborts
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
8 years ago
Rafał Miłecki 5e339a48aa bcm53xx: build image for TP-LINK Archer C9 v1
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
8 years ago
Rafał Miłecki 2d61c26f02 bcm53xx: support SafeLoader format in sysupgrade
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
8 years ago
Rafał Miłecki eab2b17d43 bcm53xx: add kernel support for TP-LINK Archer C9 V1
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
8 years ago
Felix Fietkau 1a1c3c690f bcm53xx: add switch config for Buffalo WXR-1900DHP and WZR-1750DHP
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Stijn Segers 2f2ea7b44c kernel: update kernel 4.4 to version 4.4.30
This patch bumps the 4.4 kernel from .28 to .30 and refreshes the patches.
Compile-tested on ar71xx, x86/64, ramips/mt7621, brcm47xx and kirkwood.

Run-tested on ar71xx & ramips/mt7621, brcm47xx and kirkwood (last two confirmed
by P. Wassi).

Signed-off-by: Stijn Segers <francesco.borromini@inventati.org>
8 years ago
Rafał Miłecki 3b26a5bb15 bcm53xx: include b43 in Tenda AC9 image
There is some (poor?) support for BCM43217 in b43.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
8 years ago
Rafał Miłecki ea7462ae07 bcm53xx: include usbport trigger for devices with USB
We don't have any code for enabling it automatically yet but it allows
adding entries manually to the /etc/config/system.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
8 years ago
Rafał Miłecki ba1024b9c9 bcm53xx: use the latest XHCI doorbell patch sent for upstream
The main difference is it supports DT binding. This allows us to use DT
for specifying controller and the new standalone USB 3.0 PHY driver.
Thanks to that we don't need out of tree patch adding PHY initialization
to the controller driver anymore.
8 years ago
Rafał Miłecki 28974de663 bcm53xx: drop unneeded fix for usb3-lpm-capable DT property
This problem has been fixed by upstream commit 757de492f2d ("xhci: fix
platform quirks overwrite regression in 4.7-rc1").

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
8 years ago
Rafał Miłecki d7e41df24a bcm53xx: switch to standalone USB 2.0 PHY driver
This drops built-in support for USB 2.0 PHY and starts using separated
driver that was upstreamed & backported some time ago.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
8 years ago
Rafał Miłecki 7120a43013 bcm53xx: add patch specifying USB controllers in DT
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
8 years ago
Rafał Miłecki d5dcb1bf97 bcm53xx: backport BCM5301X patches from 2019-09-30
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
8 years ago
Rafał Miłecki 1ac5cf7713 bcm53xx: move BCM53573 USB 2.0 patch to use backports prefix
It was pushed into the usb-next branch.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
8 years ago
Rafał Miłecki 41a582a986 bcm53xx: use upstream accepted ILP clk driver for BCM53573
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
8 years ago
Rafał Miłecki b964196c68 bcm53xx: use the latest submitted version of ILP clock driver
It switched to syscon to better describe PMU block.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
8 years ago
Rafał Miłecki 2c38b6e076 bcm53xx: specify brcmfmac firmware for every device
This will allow us to include required firmwares only and save some
rootfs space.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
8 years ago
Felix Fietkau d27bce8d28 build: drop UBI EOF marker from images by default
Only add them where they are actually required.
Should help with compatibility issues with stock U-Boot images that
access UBI

Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Mathias Kresin e7ec7a08aa image: use k as unit suffix for blocksize
Use k as unit suffix for kilobyte to have a the same unit regardless of
the used filesystem.

Signed-off-by: Mathias Kresin <dev@kresin.me>
8 years ago
Mathias Kresin 85fefcdb61 kernel: mtd: backport Macronix sector size fix
Signed-off-by: Mathias Kresin <dev@kresin.me>
8 years ago
Rafał Miłecki 232767edf0 bcm53xx: enable switch port 5 on Tenda AC9
Now b53 forces port 5 link when needed, we can enable it on Tenda AC9
and start using eth1.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
8 years ago
Rafał Miłecki dd158ef346 bcm53xx: use upstream queued patches for R8500 and AC9
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
8 years ago
Felix Fietkau aa53f78038 build: fix subtarget descriptions
Move Target/Description above the target.mk include

Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Rafał Miłecki 1bb914dbed bcm53xx: use the latest 6th version of ILP clock driver patch
It still wasn't accepted, so don't switch to 0xx prefix yet.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
8 years ago
Rafał Miłecki fcdba8d590 bcm53xx: backport patch adding ARCH_BCM_53573 symbol
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
8 years ago
Rafał Miłecki 28d641be43 bcm53xx: update copy of ASM entry flushing whole D-cache
Previous version was based on code from kernel 2.6.22 with Broadcom two
trivial modifications. This updates the copy to the version from current
kernel and refreshes the patch.

This was tested for regressions on Netgear R6250 (BCM4708A0), D-Link
DIR-885L (BCM4709C0) and Tenda AC9 (BCM47189B0).

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
8 years ago
Rafał Miłecki 1bef5050ef bcm53xx: build Tenda AC9 image
We finally got kernel booting on this device and LAN ports are working,
so it won't "brick" the device. One more big missing thing is WAN port
support. It requires fix for BCM53125 to get switch port 5 working.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
8 years ago
Rafał Miłecki 5e885c09c6 bcm53xx: switch back to standalone ASM entry flushing cache
Over a year ago in a commit ac96a1665a ("bcm53xx: update Disable MMU
and Dcache during decompression") we switched to Florian's patch for
workarounding CFE bug. The main difference was using a part of existing
__armv7_mmu_cache_flush instead of implementing flushing separately.

This worked well for Northstar devices but doesn't work for BCM53573 as
these devices simply don't start booting with Florian's patch. It's
because of the ldmfd ASM instruction in the __armv7_mmu_cache_flush.

So this commit switches back to using standalone implementation. This
time instead of copying Broadcom's copy of cache-v7.S, we just make a
copy of the original file on our own. Unfortunately we can't cross-dir
compile cache-v7.S from ../../mm/ as that one also adds __INITDATA with
define_cache_functions v7 which would just trigger
> Error: unrecognized/unsupported machine ID (r1 = 0x0000007f).

The only real change Broadcom did in copied .S file was modifying mcr
instruction to use c6 instead of c14. It isn't clear to me if we really
need it, but let's use it for now.

By the way we also update commit message of the
[PATCH] ARM: BCM5301X: Disable MMU and Dcache during decompression

This makes kernel booting on BCM53573 successfully.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
8 years ago
Rafał Miłecki d22ae5e888 bcm53xx: package drivers for Northstar USB PHYs
We don't use them yet as we still init PHY in controller driver but they
will be needed soon.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
8 years ago
Rafał Miłecki 31fada8bec bcm53xx: generate proper network config for Tenda AC9
It's a more complex device with 2 interfaces on the SoC, one we can use
for LAN and another for WAN.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
8 years ago
Rafał Miłecki 93f2aa44f7 kernel: bgmac: backport patch adding platform support
It also reworks bcma support by moving specific code to separated file.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
8 years ago
Rafał Miłecki 5846620890 bcm53xx: fix warning caused by m25p80 patch
It was adding unused variable:
drivers/mtd/devices/m25p80.c: In function 'm25p80_write':
drivers/mtd/devices/m25p80.c:85:6: warning: unused variable 'i' [-Wunused-variable]
  int i;
      ^

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
8 years ago
Rafał Miłecki 27b078e83a bcm53xx: add quick fixes for BCM53573
It adds and uses ILP clock that requires some other work (in progress)
for upstreaming it. Other than that it adds a quick fix for bcma to add
serial flash before trying to read SPROM.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
8 years ago
Rafał Miłecki 38750ce739 bcm53xx: add temporary BCM53573 ILP clock driver
It wasn't accepted upstream as there was a discusson on Northstar vs.
BCM53573. Once we get a new ARM arch Kconfig entry it should be
possible to upstream it.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
8 years ago
Rafał Miłecki dd7eddcb08 bcm53xx: prepare for building Tenda AC9 TRX image
It'll be enabled when we complete basic support.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
8 years ago
Rafał Miłecki 857f00a9f7 bcm53xx: drop target's preinit network support script
We don't need it anymore since the rework of generic preinit script.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
8 years ago
Rafał Miłecki 5b1c00e4fa bcm53xx: support USB 2.0 controller on BCM53573
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
8 years ago
Rafał Miłecki 62c5f68095 bcm53xx: backport USB 3.0 controller init patch
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
8 years ago
Rafał Miłecki e674c1aab3 bcm53xx: backport USB 3.0 Northstar PHY driver
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
8 years ago
Rafał Miłecki b9d8c81018 bcm53xx: rename PHY patches to use 07* prefix
This is not a strict rule but it matches better this one:
7xx - network / phy driver patches

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
8 years ago
Rafał Miłecki fa350d5aba bcm53xx: add profiles for Buffalo devices
This generates proper images when using CONFIG_TARGET_MULTI_PROFILE and
CONFIG_TARGET_PER_DEVICE_ROOTFS.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
8 years ago
Rafał Miłecki b835d7e811 bcm53xx: include USB modules in images for devices with USB ports
This allows using USB out of the box.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
8 years ago
Rafał Miłecki 0b9de8daa7 bcm53xx: add profiles for all other (SoftMAC) devices
Thanks to this images for SoftMAC devices don't get brcmfmac anymore and
b43 is added for devices with (quite poor) support only.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
8 years ago
Rafał Miłecki d378a7c4f7 bcm53xx: convert (disabled) Netgear R8500 image to own profile
It should be the last device with FullMAC chipset to convert.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
8 years ago
Rafał Miłecki 931d309203 bcm53xx: add profile with brcmfmac for Netgear R7900
It's one more device with FullMAC that got forgotten in the previous
commit.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
8 years ago
Rafał Miłecki c769c1b584 bcm53xx: add profiles for devices with FullMAC chipsets
This allows building images for selected devices with brcmfmac only
(without b43 which is for SoftMAC devices).

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Reviewed-by: Jo-Philipp Wich <jo@mein.io>
8 years ago
Felix Fietkau 63b525dd6b image: add a helper variable for getting kernel/rootfs from within image Build/* templates
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Rafał Miłecki f6a86ba066 bcm53xx: enable kernel symbols/drivers needed for BCM53573
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
8 years ago
Rafał Miłecki 2552e9319e bcm53xx: backport DTS patches for USB 2.0 and Tenda AC9
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
8 years ago
Rafał Miłecki a3be48593b bcm53xx: refresh kernel patches
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
8 years ago
Rafał Miłecki 60d2620253 kernel: update bcma backporting changes up to 4.8
This allows building bcm47xxsflash on ARM.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
8 years ago
Felix Fietkau 8e2764ce9b image.mk: clean up redundant code related to DEVICE_DTS
It is used by a core build template, so the variable should be
initialized and added to DEVICE_VARS in the core.
Same for DEVICE_DTS_DIR

Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Rafał Miłecki c940ccedd8 bcm53xx: image: don't suppress "mv" command echoing
We call all commands normally, with standard echoing. It's useful for
debugging with V=s. Don't make lzma compression an exception, it's a bit
confusing this way.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
8 years ago
Felix Fietkau b3b797076e bcm53xx: simplify image building code
Use append-ubi template for ubinize, remove mkfs override

Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Felix Fietkau dbc416b6ec bcm53xx: remove duplicate template data from the image makefile
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Hauke Mehrtens efa1960abb kernel: update kernel 4.4 to version 4.4.15
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
8 years ago
Felix Fietkau fac693441f bcm53xx: fix kernel config after USB2 PHY driver backport
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Rafał Miłecki 1692c71564 bcm53xx: use upstream fix simplifying USB power GPIO usage
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
8 years ago
Rafał Miłecki c74c227e5b bcm53xx: backport driver for Northstar's USB 2.0 PHY
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
8 years ago
Rafał Miłecki e71fffed64 bcm53xx: backport BCM5301x patches from 2016-07-06
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
8 years ago
Rafał Miłecki eaf0d22421 bcm53xx: calculate Seama MD5 using content of kernel partition
We don't want checksum to cover any part of UBI as even its part with
SquashFS may be changed due to e.g. flash wearing.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
8 years ago
Rafał Miłecki 3c014dc306 Revert "bcm53xx: use uncompressed zImages"
This reverts commit b3be33f135.

CFE is known to fail in some non-standard cases, e.g. when using kernel
or format different that what was tested by Broadcom. This kernel change
triggered some problem with booting OpenWrt kernel stored in Seama.

As long as Seama checksum was covering enough data, it was working fine.
We need to change it however, because calculating MD5 over part of UBI
containing SquashFS is unsafe. UBI may move PEBs depending on flash
wearing level which would break CFE booting the image.

For some reason this kernel change was breaking CFE. Calculating MD5
over 0x47ffc0 B data or less (there is 0x40 B long header) was stopping
booting process at:
Starting program at 0x00008000

As our kernel is usually 0x3fffc0 B it was affected by this problem.

Reverting this change fixes sysupgrade (which already uses kernel size
for MD5 calculation) and will allow us to adjust "fixseama" command call
on the first boot.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
8 years ago
Ben Whitten b7baaaf782 kernel: Move append-dtb to common image-commands
This build step is used by various targets, move it to a common section.

Signed-off-by: Ben Whitten <ben.whitten@gmail.com>
8 years ago
Rafał Miłecki a180f90518 bcm53xx: backport BCM5301X patches for SRAB
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
8 years ago
Rafał Miłecki 776b24d9aa bcm53xx: properly support sysupgrade using Seama on NAND devices
It updates kernel and then formats UBI without loosing erase counters.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
8 years ago
Rafał Miłecki cf6d9d97fb kernel: rename B53 symbols to avoid upstream kernel conflict
In kernel 4.7 there is upstreamed b53 driver using (mostly?) the same
symbols as our b53 does. Change our symbols so both drivers can coexist
in kernel tree.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Acked-by: Jonas Gorski <jonas.gorski@gmail.com>
8 years ago
Felix Fietkau b3be33f135 bcm53xx: use uncompressed zImages
The boot loader expects LZMA compressed kernel images

Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago