Commit Graph

94 Commits (fbd4214bb0727268aa535af5b600d38939ec8dbc)

Author SHA1 Message Date
Álvaro Fernández Rojas 24f7ae814a bcm63xx: add missing endif board comnents
This provides better context for board patches.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years ago
Álvaro Fernández Rojas 0c109df7f0 bcm63xx: merge RTA770BW and RTA770W board patches
The only difference between both boards is the DSL annex.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years ago
Álvaro Fernández Rojas eddf863650 bcm63xx: add missing fallback SPROMs
A couple of SPROM IDs are missing.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years ago
Álvaro Fernández Rojas fb589b6142 bcm63xx: add missing OHCI nodes
All boards with EHCI enabled should also have OHCI enabled.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years ago
Álvaro Fernández Rojas 440d5996ef bcm63xx: remove invalid EHCI nodes
There's no EHCI controller on BCM6348.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years ago
Álvaro Fernández Rojas 81fdb4235e bcm63xx: refactor board patches
Current board patches format is crazy.
Let's try to put some order.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years ago
Álvaro Fernández Rojas 92727a1228 bcm63xx: switch to upstream CFE version detection patch
The patch improving CFE version detection has been merged (linux 5.9).

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years ago
Álvaro Fernández Rojas f41a40001a bcm63xx: switch to upstream endif comments patch
This allows better context for board patches and we no longer need a
downstream patch for that.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years ago
Álvaro Fernández Rojas 9fb1d4ce8a bcm63xx: switch to upstream LED patch
The patch adding support for the second LED HW blinking interval has been
merged (linux 5.9).

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years ago
Felix Fietkau b0f7ea2853 kernel: unify CONFIG_GPIO_SYSFS in kernel configs
Enable it for all platforms

Signed-off-by: Felix Fietkau <nbd@nbd.name>
4 years ago
Daniel González Cabanelas cef9e5a49f bcm63xx: R5010UNv2: fix flash partitions for 16MB flash
The router Nucom R5010UN v2 has the partitions defined for a 8MB flash,
but the flash chip is 16MB size. We are wasting half of the flash.

Fix it and use generic names for partitions.

Fixes: 474cde6123 ("brcm63xx: probe SPI flash through DT")

Signed-off-by: Daniel González Cabanelas <dgcbueu@gmail.com>
4 years ago
Hauke Mehrtens 68d9cb8214 kernel: Update kernel 5.4 to version 5.4.50
Run tested: ath79, ipq40xx
Build tested: ath79, ipq40xx

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years ago
Daniel González Cabanelas 3f27a6e640 bcm63xx: AV4202N: add missing PCI pinmux
The ADB P.DG AV4202N device has a wifi chipset connected via PCI. But the
PCI pinmux is missing and without it the wifi won't work properly.

Add the pinctrl_pci to enable the missing PCI pins for this device.

Signed-off-by: Daniel González Cabanelas <dgcbueu@gmail.com>
4 years ago
Petr Štetiar e44e60b290 kernel: bump 5.4 to 5.4.48
Resolved merge conflict in the following patches:

 layerscape: 701-net-0213-dpaa2-eth-Add-CEETM-qdisc-support.patch
 ramips: 0013-owrt-hack-fix-mt7688-cache-issue.patch

Refreshed patches, removed upstreamed patch:

 bcm63xx: 020-v5.8-mtd-rawnand-brcmnand-fix-hamming-oob-layout.patch

Run tested: qemu-x86-64
Build tested: x86/64

Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years ago
Daniel González Cabanelas 583b3e4025 bcm63xx: DGND3700v1: fix port order
Fix the switch LAN labels for the DGND3700v1/DGND3800B router,
the order is reversed.

Signed-off-by: Daniel González Cabanelas <dgcbueu@gmail.com>
[cut out of bigger patch, adjust commit title/message accordingly]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Daniel González Cabanelas 2c3bdef4bd bcm63xx: HG622: enable LAN LEDs
The Huawei Echolife HG622 has hardware controlled LAN LEDs.

Add the ephy led pinctrl to let the router show LAN activity on these
LEDs.

Signed-off-by: Daniel González Cabanelas <dgcbueu@gmail.com>
4 years ago
Daniel González Cabanelas e3eaf52ba3 bcm63xx: use the generic nand upgrade on Sercomm devices
The Sercomm devices don't need the jffs2 cleanmarkers for the kernel
partition. With the stock firmware they are only added when the
bootloader partition is upgraded.

Furthermore, on the Sercomm H500-s, the specific cfe_jffs2_upgrade_tar
function causes OOB corruption. As a result of this, combined with the
nature of the mtdsplit driver, the upgrade procedure ends in a bricked
device.

Use the generic nand_do_upgrade provided by the OpenWrt common functions.

Signed-off-by: Daniel González Cabanelas <dgcbueu@gmail.com>
4 years ago
Adrian Schmutzler 48c1fdd046 treewide: drop shebang from non-executable target files
This drops the shebang from all target files for /lib and
/etc/uci-defaults folders, as these are sourced and the shebang
is useless.

While at it, fix the executable flag on a few of these files.

This does not touch ar71xx, as this target is just used for
backporting now and applying cosmetic changes would just complicate
things.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Daniel González Cabanelas d64d5ed142 bcm63xx: a226m-fwb: fix linux partition offset
The Pirelli A226M-FWB has a wrong linux partition offset, caused
by a copy-paste error. As of result of this, OpenWrt is currently
broken in this unit.

Fix it.

While at it, also use generic node names and fix the addresses
there as well.

Fixes: a27d59bb42 ("brcm63xx: switch to new partition layout
specification")

Signed-off-by: Daniel González Cabanelas <dgcbueu@gmail.com>
[also fix/update node names, extend commit message]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Álvaro Fernández Rojas ce33ef997c bcm63xx: switch to upstream NAND patches
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years ago
Álvaro Fernández Rojas 6fca1646dd bcm63xx: bcm6328: switch to upstream boot sel patch
BCM6328 boot selection fix has been upstreamed.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years ago
Daniel González Cabanelas ff2c96333f bcm63xx: add support for the Sercomm H500-s
Sercomm H500-s is an xDSL dual band wireless router based on Broadcom
BCM63167 SoC.

Hardware:
   SoC:          Broadcom BCM63167
   CPU:          BMIPS4350 V8.0, 400 MHz, 2 cores
   Flash:        NAND 128 MiB
   RAM:          DDR3 128 MiB
   Ethernet:     4x 10/100/1000 Mbps
   Switch:       BCM53134S
   Wireless:     802.11b/g/n: BCM435f (integrated)
                 802.11ac:    Quantenna QT3740BC (onboard SoC)
   USB:          1x 2.0
   LEDs/Buttons: 11x / 2x

Flash instruction, web UI:
  1. Reset to defaults using the reset button if the admin password is
     unknown
  2. Login into the web UI as admin.
     Address:  http://192.168.0.1
     User:     admin
     Password: VF-ESVodafone-H-500-s or l033i-h500s
  3. Go to Settings -> Firmware Update, and select the Openwrt factory
     firmware
  4. Update the firmware.
  5. Wait until it finish, the device will reboot with Openwrt installed
     on the alternative image partitions keeping the stock firmware in
     the former.

Notes:
  - The patch also adds support for the lowi version. Only the factory
    firmware is different.
  - The integrated Wifi in the Broadcom Soc isn't still supported.
  - The Quantenna 802.11ac wifi works ok, but needs to be configured with
    the Quantenna client application. It can't be configured with Luci
    nor any iw command since it's a separated subsystem linked via
    ethernet.
  - The BCM53134S external switch is managed via MDIO which isn't
    supported in this target. Therefore it will behave as a dumb switch.

Signed-off-by: Daniel González Cabanelas <dgcbueu@gmail.com>
4 years ago
Álvaro Fernández Rojas 9eb9d0baa0 bcm63xx: image: support device-specific load address
Some CFEs are located at the address currently used for relocation and lzma
loader load address, so we need to provide a way to override it.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years ago
Daniel González Cabanelas 27c20a1ef5 bcm63xx: image: don't add the CFE to the sercomm factory
There is no need to include the CFE bootloader in the Sercomm factory
images.

There might be a case when this could be useful:
  - We are running the stock firmware on the first Sercomm image
  - The second partition storing the botloader was erased (unlikely)
Even in this case flashing an image without a bootlader is harmless.

Don't include the bootloader in the factory image creation and rid of the
risk of flashing factory images with an untested bootloader partition.

Signed-off-by: Daniel González Cabanelas <dgcbueu@gmail.com>
4 years ago
Daniel González Cabanelas 598ba5b169 bcm63xx: kernel: add BCM63167 cpuid variant
The BCM63167 is a BCM63268 SoC with a different physical packaging.

Add the CPU ID to allow supporting routers with this SoC (i.e Sercomm
H500-s)

Signed-off-by: Daniel González Cabanelas <dgcbueu@gmail.com>
4 years ago
Álvaro Fernández Rojas 66f7062160 bcm63xx: vr-3032u: add missing compatible property
SoC is a BCM63168.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years ago
Álvaro Fernández Rojas 57dce7c8f3 bcm63xx: vg-8050: add missing compatible property
SoC is a BCM63169.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years ago
Álvaro Fernández Rojas 8421ea7de1 bcm63xx: vg-8050: fix WFI partition size
Each image can take up to 0x3d60000, which means 128k more per image.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years ago
Álvaro Fernández Rojas e8aac7013a bcm63xx: vr-3032u: fix WFI partition size
Each image can take up to 0x3d60000, which means 128k more per image.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years ago
Álvaro Fernández Rojas 6dc01cdee8 bcm63xx: lzma-loader: allow bigger ramdisks
Some (older) CFEs are loaded at 0x80401000 and ramdisks are loaded at
0x80010000, which means that ramdisk size limit is 0x3F1000 (almost 4M).
Therefore, current ramdisks (~4MB) are overwritting CFE in these devices,
which results in a crash.

This commit changes the address where ramdisks are loaded to 0x80a00000,
which is the same address where kernel is loaded when booting from the flash.
Therefore, lzma-loader will now be loaded at 0x80a00000, but it will still
decompress the kernel at 0x80010000.

Tested with huawei,hg556a-b, which has its CFE loaded at 0x80401000.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years ago
Álvaro Fernández Rojas 231f728f69 bcm63xx: ad1018: remove cfe.bin image support
Apparently, Sercomm allows loading a BCM WFI image via CFE, but this image
destroys "serial" and "protect" nand partitions, which is wrong.
It will also set both bootflags to the same value, which causes booting
issues with cferam (cferom will alternatively boot from cferam1 or cferam2
each time the device is rebooted).
Now that OEM Sercomm images are supported it's time to remove this hacky
cfe.bin image support.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years ago
Álvaro Fernández Rojas 39f44be1dc bcm63xx: ad1018: add missing partitions
This partitions were missing when support for this device was added.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years ago
Álvaro Fernández Rojas b302a44206 bcm63xx: stop using legacy lzma for all devices
BCM6368 and newer devices are compatible with any lzma compression parameters.
Add a new legacy device definition and use it on BCM6358 and older devices.

Compressed kernel size is reduced by ~1.35%.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years ago
Álvaro Fernández Rojas e73c61a978 bcm63xx: vg-8050: switch to bcm-wfi-split
Allows to keep a backup firmware in case active firmware is corrupted.
Also fix hsspi address warning.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years ago
Álvaro Fernández Rojas b1d375b744 bcm63xx: vr-3032u: switch to bcm-wfi-split
Allows to keep a backup firmware in case active firmware is corrupted.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years ago
Álvaro Fernández Rojas 82cf488819 bcm63xx: nand: order devices alphabetically
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years ago
Álvaro Fernández Rojas 824cb78cf3 bcm63xx: nand: add CFE_WFI_VERSION values for each device
CFE_WFI_VERSION should be defined per device instead of using a generic value.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years ago
Álvaro Fernández Rojas e238c85e57 bcm63xx: nand: sercomm: switch to sercomm-load script
xxd is not a valid dependency and shouldn't be used.
Fixes buildbot failure.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years ago
Álvaro Fernández Rojas a47acae319 bcm63xx: ad1018: support Sercomm factory images
This images can be flashed from the official firmware, as opposed to CFE
images, which can only be flashed from CFE and require opening the case.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years ago
Álvaro Fernández Rojas f263a0f9ff bcm63xx: nand: support Sercomm firmwares
Add support for Sercomm factory firmwares (AES 256 CBC encrypted).

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years ago
Álvaro Fernández Rojas 80d8114802 bcm63xx: ad1018: switch to Sercomm WFI
Support Sercomm firmware partition split.
WFI partition must be defined after bootflag partitions in order for the
parser to properly find bootflag1 and bootflag2 partitions.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years ago
Álvaro Fernández Rojas b1604b744b bcm63xx: ar-5315u: expose LEDs through controller
Exposing LEDs through LED controller instead of gpio-leds takes
advantage of HW blinking.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years ago
Álvaro Fernández Rojas d361aa2ebd bcm63xx: ar-5387un: expose LEDs through controller
Exposing LEDs through LED controller instead of gpio-leds takes
advantage of HW blinking.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years ago
Álvaro Fernández Rojas 09b7922aaa bcm63xx: ar-5381u: expose LEDs through controller
Exposing LEDs through LED controller instead of gpio-leds takes
advantage of HW blinking.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years ago
Daniele Castro d6f66dd88e brcm63xx: add support for ADB P.DG A4001N A-000-1A1-AX
ADB P.DG A4001N A-000-1A1-AX a.k.a. Telecom Italia ADSL2+ Wi-Fi N (AGPWI)
has the same PCB as the OpenWrt's ADB P.DG A4001N1 with LEDs connected
to different GPIO PINs in active low configuration.

OpenWrt's ADB P.DG A4001N image is made for the ADB P.DG A4001N A-000-1A1-AE.
It has different LEDs configuration and flash size/layout
w.r.t the ADB P.DG A4001N A-000-1A1-AX.

Hardware:
* Board ID: 96328avng
* SoC: Broadcom BCM6328
* RAM DDR2-800: 32 Mbyte - winbond W9725G6KB-25
* Serial flash: 16 Mbyte - MXIC MX25L 12845EMI-10G
* Ethernet: 4x Ethernet 10/100 baseT
* Wifi 2.4GHz: Broadcom Corporation BCM43224/5 Wireless Network Adapter (rev 01)
* LEDs: 2x Power, 2x ADSL, 2x Internet, 2x Wi-Fi, 2x Service
* Buttons: 1x Reset, 1x WPS (named WiFi/LED)
* UART: 1x TTL 115200n8, TX  NC  RX, on J5 connector (short R192 and R193)
                         NC  GND NC

Installation via CFE:
* Stock CFE has to be overwriten with one for 96328avng boards that can upload
  .bin images with no signature check (cfe-A4001N-V0000_96328avng.bin)
* connect a serial port to the board
* Stop the boot process after power on by pressing enter
* set static IP 192.168.1.2 and subnet mask 255.255.255.0
* navigate to http://192.168.1.1/
* upload the OpenWrt image file

Signed-off-by: Daniele Castro <danielecastro@hotmail.it>
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years ago
Adrian Schmutzler e3e17b4ed4 bcm63xx: use model part of board name as variable in 01_leds
This extracts the model part of the board name and uses it for the
LED string identifiers in 01_leds. As this makes statements more
generic, it will allow to merge more cases in the future.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Adrian Schmutzler 5a7d11fb78 bcm63xx: replace further "ok" with "okay" 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
Álvaro Fernández Rojas 78a0ae9023 bcm63xx: WIP: add Huawei HG253s v2 support
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years ago
Álvaro Fernández Rojas 5998c8f059 bcm63xx: nand: support CFE partition tags
Introduce support for generating JFFS2 CFE partition tags.
This is used in NAND devices in order to verify the integrity of the JFFS2
partition.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years ago
Álvaro Fernández Rojas 6dc3dce658 bcm63xx: improve rgmii ctrl overrides
There are older devices which require overriding the RGMII ports, so this
shouldn't be limited and forced to BCM63268.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years ago