Commit Graph

94 Commits (fbd4214bb0727268aa535af5b600d38939ec8dbc)

Author SHA1 Message Date
Álvaro Fernández Rojas 7a817752f6 bcm63xx: dgnd3700-v1: add NAND support
NAND is used as extra storage on this device.

Signed-off-by: Daniel Gonzalez Cabanelas <dgcbueu@gmail.com>
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years ago
Álvaro Fernández Rojas 67861b2a66 bcm63xx: nand: fix v2.1 controller support
Page size shift is different from v2.2+ controllers

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years ago
Álvaro Fernández Rojas c93cdf536a bcm63xx: lzma-loader: rely on CHIP_ID for UART address
lzma-loader uart output wasn't working on BCM3380/BCM6362 because these
SoCs have the same processor ID.
Let's use CHIP_ID for establishing the UART base address.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years ago
Álvaro Fernández Rojas 8e8920c92f bcm63xx: lzma-loader: remove unused definitions
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years ago
Álvaro Fernández Rojas 0836e22a83 bcm63xx: image: add CVG834G CHIP_ID
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years ago
Álvaro Fernández Rojas 91b275b6e3 bcm63xx: image: rename CFE_CHIP_ID to CHIP_ID
Rename CFE_CHIP_ID to a generic name that doesn't involve CFE.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years ago
Álvaro Fernández Rojas e0382c50e9 bcm63xx: fix AD1018 WLAN led
Standard AD1018 has lower case LEDs.

Fixes: 5f82691923 ("bcm63xx: add unmodded SERCOMM AD1018 support")
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years ago
Álvaro Fernández Rojas 5f82691923 bcm63xx: add unmodded SERCOMM AD1018 support
Until now only HW modded SPI flash version was supported.

BCM6328 with 64M RAM and 128M NAND.
More info: https://openwrt.org/toh/sercomm/ad1018

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years ago
Álvaro Fernández Rojas f996377a26 bcm63xx: bcm6328: fix strapbus boot sel
Boot selection bit is 18, not 28.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years ago
Álvaro Fernández Rojas 597df570f3 bcm63xx: reorganize board patches
Let's put some order on board patches.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years ago
Álvaro Fernández Rojas edafbe81e0 bcm63xx: bcm6328-leds: improve HW blinking
Add support for second HW blinking interval.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years ago
Álvaro Fernández Rojas daee6b4661 bcm63xx: add Comtrend VG-8050 support
BCM63169 with 128M RAM, 128M NAND and BCM53125 switch.
Switch is connected by HSSPI to CS5.
More info: https://openwrt.org/toh/comtrend/vg8050

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years ago
Álvaro Fernández Rojas 62e7342ddf bcm63xx: add NETGEAR DGND3700v2 support
BCM6362 with 64M RAM, 32M NAND and BCM53125 switch.
Switch is connected by MMAP, which is currently unsupported (no VLANs).
More info: https://openwrt.org/toh/netgear/dgnd3700v2

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years ago
Álvaro Fernández Rojas 367a30389d bcm63xx: add support for Comtrend VR-3032u
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years ago
Álvaro Fernández Rojas 86583384ff bcm63xx: smp: add NAND support
NAND controller is present on BCM6328, BCM6362, BCM6368 and BCM63268.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years ago
Álvaro Fernández Rojas 13c33f3f12 bcm63xx: mask interrupts on init
Fixes BCM6348/BCM6358 hangs while booting:
https://bugs.openwrt.org/index.php?do=details&task_id=2202

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years ago
Daniel Gonzalez Cabanelas e04ff3c7cc bcm63xx: periph_intc: report effective affinity
The bcm6345-periph-intc driver only targets a single CPU at a time, even
if the notional affinity is wider. Let's inform the core code about this.

This patch gets rid of the kernel message:
"genirq: irq_chip bcm6345-periph-intc did not update eff. affinity mask
of irq 52"

Signed-off-by: Daniel Gonzalez Cabanelas <dgcbueu@gmail.com>
4 years ago
Álvaro Fernández Rojas 29c3bb5f41 bcm63xx: ext_intc: fix warning
In file included from ./arch/mips/include/asm/io.h:34,
                 from ./arch/mips/include/asm/mmiowb.h:5,
                 from ./include/linux/spinlock.h:60,
                 from ./include/linux/irq.h:14,
                 from drivers/irqchip/irq-bcm6345-ext.c:10:
drivers/irqchip/irq-bcm6345-ext.c: In function 'bcm6345_ext_intc_of_init':
./arch/mips/include/asm/mach-bcm63xx/ioremap.h:48:9: warning: 'base' may be used uninitialized in this function [-Wmaybe-uninitialized]
  return is_bcm63xx_internal_registers((unsigned long)addr);
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/irqchip/irq-bcm6345-ext.c:255:16: note: 'base' was declared here
  void __iomem *base;
                ^~~~

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years ago
Álvaro Fernández Rojas f2f2cf07a6 bcm63xx: periph_intc: fix warning
drivers/irqchip/irq-bcm6345-periph.c: In function 'bcm6345_periph_irq_handle':
drivers/irqchip/irq-bcm6345-periph.c:55:21: warning: 'block' may be used uninitialized in this function [-Wmaybe-uninitialized]
  struct intc_block *block;
                     ^~~~~

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years ago
Álvaro Fernández Rojas f314cbe54b bcm63xx: redboot: fix warning
drivers/mtd/parsers/redboot.c: In function 'parse_redboot_partitions':
drivers/mtd/parsers/redboot.c:194:59: warning: suggest parentheses around '-' in operand of '&' [-Wparentheses]
     fis_origin = (buf[i].flash_base & (master->size << 1) - 1);
                                       ~~~~~~~~~~~~~~~~~~~~^~~

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years ago
Álvaro Fernández Rojas ee6bf7e865 bcm63xx: bcm6362: fix pinctrl bug
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years ago
Álvaro Fernández Rojas aa2f2276f7 bcm63xx: image: remove unused definition
KERNEL_ENTRY isn't used by lzma-loader.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years ago
Álvaro Fernández Rojas eea23c2004 bcm63xx: remove linux 4.14 support
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years ago
Adrian Schmutzler fdd968d64e bcm63xx: replace "ok" with "okay" for status in DTS files
While "ok" is recognized in DT parsing, only "okay" is actually
mentioned as valid value. Replace it accordingly.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Adrian Schmutzler 026fe1308c bcm63xx: use generic diag.sh
This commit removes the target-specific diag.sh script. This way, the
generic one is used for the target, which uses DT-aliases to specify the
LEDs used.

Though generic diag.sh allows to use different LEDs to indicate different
states, this patch just moves the old assignment and does not try to
"improve" the assignment by using additional colors.
However, individual proposals to do so are welcome.

For the few cases where status_led2 was used in old diag.sh, only the
primary LED was migrated.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Koen Vandeputte ef2d5a2ab4 kernel: bump 4.14 to 4.14.180
Refreshed all patches.

Fixes:
- CVE-2020-12114
- CVE-2020-11669

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

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
4 years ago
Álvaro Fernández Rojas a0081b1945 bcm63xx: loader-lzma: use default lzma
Specific CFE LZMA parameters aren't needed for LZMA Loader.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years ago
Álvaro Fernández Rojas 84646936a6 bcm63xx: image: rename LOADADDR to KERNEL_LOADADDR
Also remove KERNEL_ENTRY, since it's the same as KERNEL_LOADADDR

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years ago
Álvaro Fernández Rojas d27e2c67ed bcm63xx: switch to 5.4 kernel
Seems stable after 6 days of testing on some of my devices.
Let's switch to 5.4 in order to get more feedback.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years ago
Aleksander Jan Bajkowski b43023b7ba kernel: remove non-existant symbols
These symbols exist only in older kernels and can be removed.

Signed-off-by: Aleksander Jan Bajkowski <A.Bajkowski@stud.elka.pw.edu.pl>
4 years ago
Jonas Gorski 4e535d81ee bcm63xx: disable all devices with <= 4MiB flash and <= 32 MiB RAM
Device with 4 MiB flash and 32 MiB RAM won't be able to run OpenWrt in
a sufficient manner without tweaks, so don't build images for them by
default.

This includes all BCM6338, BCM6345 and BCM6348 "generic" devices,
as there are no supported devices of these with more than that.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
4 years ago
Adrian Schmutzler bebc9809d1 bcm63xx: remove support for kernel 4.19
Since stable kernel for this target is still 4.14, kernel 4.19
has never been used much (and actually was broken for some devices).

So, since we bump testing kernel to 5.4, there is no real need to
keep 4.19 and have an additional version to care about.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Adrian Schmutzler 51b07e782d bcm63xx: use kernel 5.4 as testing kernel
This uses 5.4 as testing kernel. Since 4.19 has not seen broad
testing yet, just keep 4.14 as stable kernel until 5.4 is ready.

Tested on Comtrend AR-5387un (Thanks to @Noltari).

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Adrian Schmutzler cb2f0df784 bcm63xx: 5.4: fix compilation for changed driver_find_device
In kernel patch 92ce7e83b4e5 ("driver_find_device: Unify the match
function with class_find_device()") the arguments of functions used
with driver_find_device are adjusted. Do the same for our local
user.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Adrian Schmutzler 8a2118e1b4 bcm63xx: 5.4: add removed helper syscon_regmap_lookup_by_pdevname
The helper syscon_regmap_lookup_by_pdevname has been removed in kernel patch
29d14b668d2f ("mfd: Remove unused helper syscon_regmap_lookup_by_pdevname")
due to lack of users.

However, we use this function in our local pinctrl drivers for BCM6358 and
BCM6368. Thus, we have to add it locally.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Adrian Schmutzler 43d3ef91f1 bcm63xx: prevent fall-through in kernel patches for 5.4
In kernel 5.4 -Werror=implicit-fallthrough is treated as error:

arch/mips/bcm63xx/cpu.c: In function 'detect_cpu_clock':
arch/mips/bcm63xx/cpu.c:158:2: error: this statement may fall through [-Werror=implicit-fallthrough=]
  {
  ^
arch/mips/bcm63xx/cpu.c:179:2: note: here
  case BCM6328_CPU_ID:
  ^~~~
cc1: all warnings being treated as errors

This can be fixed by adding "Fall through" as a comment where intended,
and has to be fixed by returning a proper default otherwise.

In case of the default clock frequency for BCM6318 we fixed this by
returning the default value taken from BCM6328 and BCM6362.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Adrian Schmutzler 6c521f6828 bcm63xx: fix missing watchdog core dependency
This patch follows the other patches that added the watchdog
core to various (armvirt, malta, ath79, ...) targets that
have been hit by the following build error:

Package kmod-hwmon-sch5627 is missing dependencies for the following libraries:
watchdog.ko

In theory, we could have just added the CONFIG_WATCHDOG_CORE=y
to the Kconfig variable of kmod-hwmon-sch5627's package definition.
This would have forced the watchdog core to be builtin and less
architectures would need to be updated. But we might as well follow
through here.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Adrian Schmutzler f0fbc47a91 bcm63xx: update config for kernel 5.4
Update config with make kernel_oldconfig.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Adrian Schmutzler 04c07e05a1 bcm63xx: refresh patches for kernel 5.4
Refresh patches to make them apply to kernel 5.4.

The removed patches have been merged upstream.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Adrian Schmutzler f8f1dc6eab bcm63xx: copy files to kernel 5.4
Copy config and patches to kernel 5.4.
make kernel_oldconfig has been run on 4.19 beforehand.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Sungbo Eo 5b392c7119 treewide: gather DEVICE_VARS into one place
Place DEVICE_VARS assignments at the top of the file or above Device/Default
to make them easier to find.

For ramips, remove redundant values already present in parent file.

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
[do not touch ar71xx, extend commit message]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Petr Štetiar 9ba09653ad treewide: remove maintainer variable from targets
There is no such role as target maintainer anymore, one should always
send corresponding changes for the review and anyone from the commiters
is allowed to merge them or eventually use the hand break and NACK them.

Lets make it clear, that it is solely a community doing the maintenance
tasks.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
Acked-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Acked-by: Piotr Dymacz <pepe2k@gmail.com>
4 years ago
Aleksander Jan Bajkowski 84845123fe kernel: remove non-existant symbols from 4.19 config
These symbols only exist in kernel version <= 4.15

Signed-off-by: Aleksander Jan Bajkowski <A.Bajkowski@stud.elka.pw.edu.pl>
4 years ago
Adrian Schmutzler e7bfda2c24 brcm63xx: rename target to bcm63xx
This change makes the names of Broadcom targets consistent by using
the common notation based on SoC/CPU ID (which is used internally
anyway), bcmXXXX instead of brcmXXXX.
This is even used for target TITLE in make menuconfig already,
only the short target name used brcm so far.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago