Commit Graph

144 Commits (d3c0a944059bb0d45c3b56278249100258378b0c)

Author SHA1 Message Date
Adrian Schmutzler 5b6a809092 treewide: move calibration data extraction function to library
This moves the almost identical calibration data extraction
functions present multiple times in several targets to a single
library file /lib/functions/caldata.sh.

Functions are renamed with more generic names to merge different
variants that only differ in their names.

Most of the targets used find_mtd_chardev, while some used
find_mtd_part inside the extraction code. To merge them, the more
abundant version with find_mtd_chardev is used in the common code.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
[rebase on latest master; add mpc85xx]
Signed-off-by: David Bauer <mail@david-bauer.net>
5 years ago
Adrian Schmutzler b133e466b0
treewide: convert WiFi caldata size and offset to hexadecimal
This changes size and offset set for WiFi caldata extraction and
MAC address adjustment to hexadecimal notation.

This will be much clearer for the reader when numbers are big, and
will also match the style used for mtd-cal-data in DTS files.

Since dd cannot deal with hexadecimal notation, one has to convert
back to decimal by simple $(($hexnum)).

Acked-by: Alexander Couzens <lynxis@fe80.eu>
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years ago
Daniel Gonzalez Cabanelas 6b2b35e043 brcm63xx: VH4032N: fix the power led and the wlan button
- use the blue LED for power, since the red LED is already used by
  CFE in emergency mode.
- use the correct code for the wlan button

Signed-off-by: Daniel Gonzalez Cabanelas <dgcbueu@gmail.com>
5 years ago
Andrius Štikonas d591260407 brcm63xx: initial support for Sky SR102 router
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.
SOC: 	    BCM63168 (BMIPS4350 V8.0 @400MHz)
Flash size: 16 MiB
RAM size:   128 MiB

Heavily based on patch for OpenWRT Chaos Chalmer.
Original patch and more info can be found at:
https://openwrt.org/toh/sky/sr102

Known issues:
 - Wireless and ADSL modem are not working.

Signed-off-by: Andrius Štikonas <andrius@stikonas.eu>
6 years ago
Daniel Gonzalez Cabanelas fbbb977772 brcm63xx: Tune the network configuration for several routers
- DGND3700v1: fix port numbers, they're in reverse order
- FaST2704n: there is no WAN port identified as such, only 4 LAN
- AD1018: configure the "FIBRE" port as WAN

Signed-off-by: Daniel Gonzalez Cabanelas <dgcbueu@gmail.com>
6 years ago
Jonas Gorski 60a39e8f5a brcm63xx: fix Sercomm AD1018 status led
The status led part was missed when changing the board name to *-nor.

Fixes: e12c72bb52 ("brcm63xx: Add Sercomm AD1018 support")
Reported-by: Daniel Gonzalez Cabanelas <dgcbueu@gmail.com>
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
7 years ago
Daniel Gonzalez Cabanelas e12c72bb52 brcm63xx: Add Sercomm AD1018 support
Add support for the Sercomm AD1018 router

This a BCM6328 based board, 128 MB RAM, 128 MiB NAND flash,
with an onboard BCM43217 wifi, 4 ethernet ports and 1 USB
host port (not soldered). The board also has an FXS chip (Si32177)
connected via SPI (SS2#), without support in LEDE.

Since NAND flash chips aren't still supported in brcm63xx, the
support is for now added to work only with SPI flash chips. Therefore
hardware modding, soldering a new SPI flash chip, is required
to make the board work with LEDE (tested and working OK).
The flash at dts is intentionally left without partitioning to let
the user choose a NOR chip of any size (8, 16 or 32 MB).

Signed-off-by: Daniel Gonzalez Cabanelas <dgcbueu@gmail.com>
[jonas.gorski: renamed ad1018 to ad1018-nor to signify the modification]
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
7 years ago
Daniel Gonzalez Cabanelas c7b4b4cee2 brcm63xx: Add Comtrend AR-5315u support
Add support for the Comtrend AR-5315u router

This a BCM6318 based board, 64 MB RAM, 16 MB SPI flash,
with an onboard BCM43217 wifi, 4 ethernet ports and 1
USB host port

Signed-off-by: Daniel Gonzalez Cabanelas <dgcbueu@gmail.com>
[jonas.gorski: refreshed patch]
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
7 years ago
Mathias Kresin e0b9ec8e96 treewide: drop target board_name functions
They are not used any longer.

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
Mathias Kresin ac3e05c5d7 treewide: populate boardname and model earlier
For targets using the generic board detection and board specific
settings in diag.sh, the board name is still unset at the time the
set_state() provided by diag.sh is called by 10_indicate_preinit.

Change the execution order to ensure the boardname is populated before
required the first time. Do the target specific board detection as
early as possible, directly followed by the generic one to allow a
seamless switch to the generic function for populating /tmp/sysinfo/.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Anthony Sepa f9b67b89d3 brcm63xx: add support for the Actiontec R1000H gateway
SOC: Broadcom BCM6368 (2 * Broadcom BMIPS4350 V3.1 / 400 MHz)
Flash size: 32MB (split 16/16 dual boot)
RAM size: 64MB
Wireless: BCM432x 802.11a/b/g/n(pci)
Ethernet: Broadcom BCM53115
USB: 1 x USB 2.0

Known issues:
 - Unable to detect 53115 switch attached to MDIO. Not supported
 - No support for the cable port

More info on the device and the research can be found at:
http://www.actiontec.com/212.html

Same FCC ID as:
https://wikidevi.com/wiki/Actiontec_V1000H_(Telus)

Signed-off-by: Anthony Sepa <anthonysepa@yahoo.ca>
[jonas.gorski: fix commit subject/message]
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
7 years ago
Piotr Dymacz f9a1f322d2 brcm63xx: diag.sh: use common status_led_blink_* functions
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
7 years ago
Daniel Gonzalez Cabanelas c5138d943b brcm63xx: CPVA502+: fix userspace support
Fix board name typo, fix network configuration and add a led trigger.

Signed-off-by: Daniel Gonzalez Cabanelas <dgcbueu@gmail.com>
7 years ago
Daniel Gonzalez Cabanelas 41ad9ed13a brcm63xx: Add Observa VH4032N support
Add support for the Observa Telecom VH4032N router.

This is another BCM6368 router, 128 MB RAM, 32MB flash and 3 USB
host ports.

The wifi chip is an onboard Broadcom BCM43222.

Signed-off-by: Daniel Gonzalez Cabanelas <dgcbueu@gmail.com>
[jonas.gorski: use gpio-hog instead of abusing ephy-reset]
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
7 years ago
Paul Wassi 9d4f8ff4f6 brcm63xx: add support for Pirelli/ADB P.DG AV4202N
This patch adds support for the ADB P.DG AV4202N aka Pirelli PRG AV4202N.

Signed-off-by: Paul Wassi <p.wassi@gmx.at>
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
7 years ago
Jo-Philipp Wich 770ac77cce brcm63xx: board.d: request untagged switch config where applicable
In order to prepare support for generating tagged switch configurations by
default, explicitely request untagged configs for boards which do not already
request tagging to retain default behaviour.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
7 years ago
Daniel Gonzalez Cabanelas d2b79e4d80 brcm63xx: Livebox 1: add userspace board support
Fix configuration files for the Livebox 1 routers.
- Add status led
- Set eth0 as the LAN port, for coherence with RedBoot and comfortability.
- Add led triggers

Signed-off-by: Daniel Gonzalez Cabanelas <dgcbueu@gmail.com>
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
8 years ago
Jonas Gorski cf8da98e94 brcm63xx: switch to board based failsafe networking
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
8 years ago
Daniel Gonzalez 4ab33a3002 brcm63xx: fix CT-536p/CT-5621T support
Fix support for the Comtrend  CT-536+, CT-5361 and CT-5621T routers support.

Currently the firmware is broken for these routers, because there is a missing
bar in the code at the DTS file avoiding to match with DTS stuff at the kernel. This
causes the router boots without ethernet connectivity. The status led also has a typo.

Signed-off-by: Daniel Gonzalez <dgcbueu@gmail.com>
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
8 years ago
Graham Fairweather 532c3f3218 brcm63xx: add initial support for Netgear EVG2000
This patch adds support for the Netgear EVG2000 VoIP Gateway to the
bcm63xx targets.

This device was not sold to the general public, but rather is/was
provided by telcos to customers in Sweden, Australia, Singapore and
other parts of asia.

Known issues:
 - Unable to detect 53115 switch. This appear to be a problem with
probing for the PHY using MDIO and results in error 5. Doesn't seem to
be a problem with the configuration, and could use someone with
experience to have a look at it.
 - Uses the b43 driver as using the OpenWRT/LEDE broadcom-wl driver
fails to load the firmware for the 4322, so 802.11n is not supported.

More info on the device and the research can be found at:
https://wiki.openwrt.org/toh/netgear/evg2000
https://wikidevi.com/wiki/Netgear_EVG2000
https://github.com/Xotic750/mirror-lede/tree/evg2000
https://forum.openwrt.org/viewtopic.php?id=63950

Signed-off-by: Graham Fairweather <xotic750@gmail.com>
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
8 years ago
Álvaro Fernández Rojas ec95509af4 brcm63xx: remove obsolote preinit scripts and fix preinit iface script
These scripts were causing ip issues in the latest version of LEDE:
https://gist.github.com/Noltari/6d20d8bcbe236caf516c0a73f5477d00

Fixes preinit iface script by making eth0 the default ifname and only changing
it to eth1 for the devices that specifically need it.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
8 years ago
Jonas Gorski a78bb9590f brcm63xx: add support for Huawei HG622
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Signed-off-by: Jonas Gorski <jogo@openwrt.org>

SVN-Revision: 48305
9 years ago
Jo-Philipp Wich 67e1c87012 all: drop old uci-defaults.sh
Replace former uci-defaults.sh implementation with the uci-defaults-new.sh one
and update all users accordingly.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 47867
9 years ago
Jo-Philipp Wich 708c0212e7 brcm63xx: switch from uci-defaults to board.d
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
Acked-by: Jonas Gorski <jogo@openwrt.org>

SVN-Revision: 47754
9 years ago
Jonas Gorski d12502b666 brcm63xx: Add NuCom R5010UNv2 support
This patch adds support for the NuCom R5010UNv2.

It's a BCM6328 based board. It has an onboard BCM43217 wifi chip. For this
wifi chip looks like the brcmsmac driver isn't still supported, b43 drivers are used
for the profile of the router.

It's worth mentioning this board was affected by a bug solved with
https://dev.openwrt.org/changeset/46707

Tested-by: Angel Fontan <angel.fontan@gmail.com>
Signed-off-by: Daniel Gonzalez <dgcbueu@gmail.com>
Signed-off-by: Jonas Gorski <jogo@openwrt.org>

SVN-Revision: 47697
9 years ago
Jonas Gorski 78f253f9b1 brcm63xx: add Comtrend VR-3026e support
Add support for Comtrend VR-3026e v1.
The device is almost identical to the Comtrend VR-3025un.

Signed-off-by: Martin Tesar <tesarmar@gmail.com>
Signed-off-by: Jonas Gorski <jogo@openwrt.org>

SVN-Revision: 46752
9 years ago
Jonas Gorski 05a3cdd71f brcm63xx: fix WAP-5813n default network config
/etc/uci-defaults/02_network had a typo, making it generate the wrong
network config.

Closes #20407.

Signed-off-by: Jonas Gorski <jogo@openwrt.org>

SVN-Revision: 46727
9 years ago
Jonas Gorski a105688c87 brcm63xx: Add support for Plusnet 2704N
BCM6318: add support for Plusnet / Sagem 2704N (V1)
Signed-off-by: Matt Goring <matt.goring@googlemail.com>
Signed-off-by: Jonas Gorski <jogo@openwrt.org>

SVN-Revision: 46562
9 years ago
Jonas Gorski 4bb7b2186e brcm63xx: fix failsafe lan and status led for DSL-274xB rev. F1
Add it to the appropriate places so the power led properly works
and ethernet is properly configured for failsafe.

Signed-off-by: Jonas Gorski <jogo@openwrt.org>

SVN-Revision: 45709
9 years ago
Jonas Gorski 509c3211d6 brcm63xx: Add Huawei HG655b support
This patch adds support for the Huawei HG655b.

Nothing much special in this router, it's just another BCM6368 with
a Ralink RT3062 wifi chip and the calibration data embedded in the
main flash chip at offset 0x7c0000. There is also configuration data
used by the OEM firmware before the cal_data partition, this area is
protected by the board_data partition in this patch.

Signed-off-by: Daniel Gonzalez <dgcbueu@gmail.com>
Signed-off-by: Jonas Gorski <jogo@openwrt.org>

SVN-Revision: 45708
9 years ago
Jonas Gorski 5e8eedb897 brcm63xx: add missing bcm96329bhr profile and dts
Hopefully the last missing board.

Signed-off-by: Jonas Gorski <jogo@openwrt.org>

SVN-Revision: 45557
9 years ago
Jonas Gorski 0f08442ded brcm63xx: move DSL-275XB to DT
Signed-off-by: Jonas Gorski <jogo@openwrt.org>

SVN-Revision: 45168
9 years ago
Jonas Gorski f77b446051 brcm63xx: move bcm6318 reference boards to DT
Signed-off-by: Jonas Gorski <jogo@openwrt.org>

SVN-Revision: 45167
9 years ago
Jonas Gorski f644c1581a brcm63xx: move VG50 to DT
Signed-off-by: Jonas Gorski <jogo@openwrt.org>

SVN-Revision: 45166
9 years ago
Jonas Gorski f973580488 brcm63xx: move V2110 to DT
Also readd image generation which was accidentally dropped in r43364.

Signed-off-by: Jonas Gorski <jogo@openwrt.org>

SVN-Revision: 45165
9 years ago
Jonas Gorski 1e07f8c7ff brcm63xx: fix bcm96328avng board name
Signed-off-by: Jonas Gorski <jogo@openwrt.org>

SVN-Revision: 44994
9 years ago
Jonas Gorski 4dc169f9a2 brcm63xx: fix bt v2500v dts based detection
Signed-off-by: Jonas Gorski <jogo@openwrt.org>

SVN-Revision: 44993
9 years ago
Jonas Gorski 10cdfd04e6 brcm63xx: move RTA770(B)W to dts
Signed-off-by: Jonas Gorski <jogo@openwrt.org>

SVN-Revision: 44992
9 years ago
Jonas Gorski 0e4c1ba284 brcm63xx: move MAGIC to dts
Signed-off-by: Jonas Gorski <jogo@openwrt.org>

SVN-Revision: 44991
9 years ago
Jonas Gorski 582dfc52f5 brcm63xx: move CPVA502+ to dts
Signed-off-by: Jonas Gorski <jogo@openwrt.org>

SVN-Revision: 44990
9 years ago
Jonas Gorski 46b4d4d1d5 brcm63xx: move dg834g v4 to dts
Signed-off-by: Jonas Gorski <jogo@openwrt.org>

SVN-Revision: 44989
9 years ago
Jonas Gorski 30a579c674 brcm63xx: move dsl-2640u to dts
Also build image again(?).

Signed-off-by: Jonas Gorski <jogo@openwrt.org>

SVN-Revision: 44988
9 years ago
Jonas Gorski 16ea19053a brcm63xx: move bcm963268bu_p300 to dts
Signed-off-by: Jonas Gorski <jogo@openwrt.org>

SVN-Revision: 44987
9 years ago
Jonas Gorski 2d3371cd0f brcm63xx: Add BT Home Hub 2A support.
Support for the BT HomeHub 2.0 Type A.

This router was manufactured by Thomson, and it's BCM6358 based.
The leds are controled by two chained HC594, all working ok. The BCM5325
switch has the RESET# pin wired to the GPIO15, but currently there is no
way to tell the b53 driver how to get this gpio number in brcm63xx,
therefore swconfig won't use it when performing a switch reset.

The patch was tested with several firmwares, and all except unsupported
stuff (i.e xDSL) works pretty well.

Tested-by: Tahir <tahir00ali@gmail.com>
Signed-off-by: Daniel Gonzalez <dgcbueu@gmail.com>

SVN-Revision: 44985
9 years ago
Jonas Gorski 5d0e2d1b41 brcm63xx: call brcm63xx_detect explicitly
Now that we have converted all users of global variables to use
brcm63xx_board_name, we can savely convert the implicit call to detect
in brcm63xx.sh to a single, explicit call in preinit.

Signed-off-by: Jonas Gorski <jogo@openwrt.org>

SVN-Revision: 44840
9 years ago
Jonas Gorski 020e5733f9 brcm63xx: move preinit ifname detection to the preinit script
Signed-off-by: Jonas Gorski <jogo@openwrt.org>

SVN-Revision: 44839
9 years ago
Jonas Gorski 90da308e3b brcm63xx: remove obsolete brcm63xx_has_reset_button
r37000 made button kmods loaded from generic code, so we don't use
it anymore for deciding to load them.

Signed-off-by: Jonas Gorski <jogo@openwrt.org>

SVN-Revision: 44838
9 years ago
Jonas Gorski f0badcb769 brcm63xx: set status leds from within diag.sh
Instead of setting them up on invocation of brcm63xx_detect, set them
when calling diag.sh based.

Signed-off-by: Jonas Gorski <jogo@openwrt.org>

SVN-Revision: 44837
9 years ago
Jonas Gorski 098377af25 brcm63xx: switch to board_name based configuration
Board IDs are not unique, so in preparation for depricating them, always
use board_name for any (default) configuration decisions.

Signed-off-by: Jonas Gorski <jogo@openwrt.org>

SVN-Revision: 44836
9 years ago