Commit Graph

136 Commits (d3c0a944059bb0d45c3b56278249100258378b0c)

Author SHA1 Message Date
Petr Štetiar 65f9e52526 brcm63xx: dts: Unify naming of gpio-led nodes
In DTS Checklist[1] we're now demanding proper generic node names, as
the name of a node should reflect the function of the device and use
generic name for that[2]. Everybody seems to be copy&pasting from DTS
files available in the repository today, so let's unify that naming
there as well and provide proper examples.

1. https://openwrt.org/submitting-patches#dts_checklist
2. https://github.com/devicetree-org/devicetree-specification/blob/master/source/devicetree-basics.rst#generic-names-recommendation

Signed-off-by: Petr Štetiar <ynezz@true.cz>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com> [split up]
5 years ago
Petr Štetiar 4b66f55bb1 brcm63xx: dts: Unify naming of gpio-keys nodes
In DTS Checklist[1] we're now demanding proper generic node names, as
the name of a node should reflect the function of the device and use
generic name for that[2]. Everybody seems to be copy&pasting from DTS
files available in the repository today, so let's unify that naming
there as well and provide proper examples.

1. https://openwrt.org/submitting-patches#dts_checklist
2. https://github.com/devicetree-org/devicetree-specification/blob/master/source/devicetree-basics.rst#generic-names-recommendation

Signed-off-by: Petr Štetiar <ynezz@true.cz>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com> [split up]
5 years ago
Daniel Gonzalez Cabanelas 5af04f0d94 brcm63xx: VH4032N: add missing pinctrl
Add missing pin controls for the Observa VH4032N router.

This fixes the wifi radio and ethernet LAN LEDs.

Signed-off-by: Daniel Gonzalez Cabanelas <dgcbueu@gmail.com>
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
Petr Štetiar d9753f0ec5 ath79, brcm63xx: Fix debounce-interval properties in gpio-keys-polled nodes
This patch fixes wrong usage of debounce-interval subnode property of
gpio-keys-polled nodes, which was used inproperly in parent node, but it
belongs to the subnodes, excerpt from the docs:

 Optional subnode-properties:
     - debounce-interval: Debouncing interval time in milliseconds.
       If not specified defaults to 5.

And the docs are up to date as the source code matches that description
as well:

 if (fwnode_property_read_u32(child, "debounce-interval",
                              &button->debounce_interval))
         button->debounce_interval = 5;

While at it, I've also re-formatted gpio-keys-polled nodes, usually just
adding new lines after every key subnode.

Cc: Tomasz Maciej Nowak <tomek_n@o2.pl>
Cc: Matt Merhar <mattmerhar@protonmail.com>
Cc: Jonas Gorski <jonas.gorski@gmail.com>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
6 years ago
Daniel Gonzalez Cabanelas 26d4cb2ca7 brcm63xx: HG655b: fix the imagetag at dts
Fix the imagetag on the HG655b to allow a correct partition detection at boot time.

It turns out that it was defined at the wrong partition. Just move the imagetag to
the linux firmware partition.

The bug is present since the 18.06 release. Without this fix, the board won't boot.

Fixes: a27d59bb42 ("brcm63xx: switch to new partition layout specification")
Signed-off-by: Daniel Gonzalez Cabanelas <dgcbueu@gmail.com>
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
6 years ago
Paul Wassi e348ccc4e6 treewide: fix some cosmetic glitches in dts files
- fix single spaces hidden by a tab
- replace indentation with spaces by tabs
- make empty lines empty
- drop trailing whitespace
- drop unnecessary blank lines

Signed-off-by: Mathias Kresin <dev@kresin.me>
Signed-off-by: Paul Wassi <p.wassi@gmx.at>
6 years ago
Matt Merhar a2eaaaaf4b kernel: switch compatible property for RedBoot DT binding
This changes the DT binding's compatible property to
"ecoscentric,redboot-fis-partitions", removing the existing reference to
Red Hat.

Per the documentation hosted at eCosCentric's website, eCosCentric is
RedBoot's sole commercial maintainer since 2002, and the project has
been under the stewardship of the Free Software Foundation since 2008.

This also updates the property in the Inventel Livebox 1 .dts, the
binding's only current user.

Signed-off-by: Matt Merhar <mattmerhar@protonmail.com>
6 years ago
Rafał Miłecki 23197e4580 brcm63xx: update DT RedBoot binding for the Inventel Livebox 1
linux,part-probe should be avoided as its only supported with OpenWrt
downstream patch that is going to be dropped eventually.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
6 years ago
Jonas Gorski 7880a6f7fe brcm63xx: drop linux,part-probe usage where possible
It was present as 4.4 compatibility, but since we now use 4.9 or later
with the new upstream solution, we don't need it anymore.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
6 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
Jonas Gorski 0f063f8ac7 brcm63xx: drop root parameter from cmdline
The root= parameter overrides the automatic rootfs detection by partition
name, so drop it. Fixes boot from flash after renumeration changes of
partitions due to parser changes.

Fixes FS#1350.

Fixes: a27d59bb42 ("brcm63xx: switch to new partition layout specification")
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
6 years ago
Jonas Gorski a27d59bb42 brcm63xx: switch to new partition layout specification
Now that we support parsing the expected upstream definition, update
the dts files to it.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
6 years ago
Jonas Gorski aba4e29ead brcm63xx: register serial through device tree
Register serial consoles through device tree instead of through board
data.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
7 years ago
Jonas Gorski a3384088a2 brcm63xx: add uart nodes
Now that we can register uarts through device-tree, add them to the dtsi
files.

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
Paul Wassi 0d4cda8a3b brcm63xx: DTS: fix AV4202N flash layout
Fix incorrect offset and size of linux partition.

Fixes: 97b36aca09 ("brcm63xx: add pflash for remaining pflash equipped boards")
Signed-off-by: Paul Wassi <p.wassi@gmx.at>
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
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
Jonas Gorski b43c190079 brcm63xx: probe SPI connected switches through DT
Now that we can configure the switches through DT, do so.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
7 years ago
Jonas Gorski 9ceeaf4c6c brcm63xx: switch to hardware led controllers
Instead of bit banging SPI to talk to the GPIO chip, use the hardware
led controllers intended for controlling the LEDs.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
7 years ago
Jonas Gorski c5d394e9ba brcm63xx: dsl-275xb-d: configure switch leds
Add pinctrl configuration to configure the switch leds on DSL-275XB.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
7 years ago
Jonas Gorski 0755c2d117 brcm63xx: add pinctrl support
Add and enable pincontrol drivers, and update dts(i) files with
appropriate hogs.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
7 years ago
Jonas Gorski 474cde6123 brcm63xx: probe SPI flash through DT
Now that we support problem the SPI controllers through DT, we can also
probe flash through DT.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
7 years ago
Jonas Gorski 97b36aca09 brcm63xx: add pflash for remaining pflash equipped boards
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
7 years ago
Jonas Gorski b50fd8c2b3 brcm63xx: register SPI controllers through DT
Register SPI controllers through device tree. We will wire up the clocks
at a later stage.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
7 years ago
Daniel Gonzalez Cabanelas dc3537415c brcm63xx: CPVA502+: fix LEDs and buttons at DTS
Leds are wrong and a button is missing, fix them.

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
Jonas Gorski 0127c480bb brcm63xx: Neufbox 6: fix switch by probing through DT
Probe the switch through DT instead of a platform device. This fixes
probe, as GPIO offsets are now properly accounted for.

Fixes the following issue:

[    0.802953] 8021q: 802.1Q VLAN Support v1.8
[    0.810518] rtl8366_smi: gpio_request failed for 18, err=-517

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
Jonas Gorski 31d5c5bc90 brcm63xx: setup internal switch leds for bcm6368
Setup the GPIO_MODE register bits for used internal switch port leds.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
7 years ago
Jonas Gorski dd7079e79a brcm63xx: implement gpio_to_irq for bcm63xx-gpio
Add support for mapping some GPIO lines to IRQs. GPIO to IRQ mappings
were found out through experimentation, helped by having the GPIO as
output still toggling the IRQ input.

Based-on: http://patchwork.ozlabs.org/patch/660534/
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
7 years ago
Jonas Gorski 94bbd1f057 brcm63xx: fix external interrupts on BCM6318
Setting the clear bit for an interrupt seems to cause interrupts to be
deasserted again immediately. So unset the bit for BCM6318 to allow
subsequent interrupts to still work.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
7 years ago
Daniel Gonzalez Cabanelas 422ba32c71 brcm63xx: Livebox 1: fix part probe name
Fix the DTS file for the Livebox 1 routers:
- part probe wrong, it should be RedBoot (uppercase matters)

Signed-off-by: Daniel Gonzalez Cabanelas <dgcbueu@gmail.com>
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
8 years ago
Daniel Gonzalez Cabanelas 768595c9f1 brcm63xx: Livebox 1: fix led naming
Fix the DTS file for the Livebox 1 routers:
- leds are totally wrong, fix them.

Signed-off-by: Daniel Gonzalez Cabanelas <dgcbueu@gmail.com>
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
8 years ago
Daniel Gonzalez Cabanelas 727ebf3a70 brcm63xx: Livebox 1: use button 1 as failsafe button
Fix the DTS file for the Livebox 1 routers:
- no failsafe button, use button 1 for this purpose

Signed-off-by: Daniel Gonzalez Cabanelas <dgcbueu@gmail.com>
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
8 years ago
Mathias Kresin 2b55c83e68 treewide: dts: use keycode defines from input dt-binding
All compiled device tree files not mentioned are binary identical to the
former ones.

Fix the obvious decimal/hex confusion for the power key of ramips/M2M.dts.

Due to the include of the input binding header, the BTN_* node names in:

  - ramips/GL-MT300A.dts
  - ramips/GL-MT300N.dts
  - ramips/GL-MT750.dts
  - ramips/Timecloud.dts

will be changed by the compiler to the numerical equivalent.

Move the binding include of lantiq boards to the file where they are
used the first time to hint the user where the values do come from.

Signed-off-by: Mathias Kresin <dev@kresin.me>
8 years ago
Mathias Kresin de40d45363 treewide: dts: fix dtc compiler warnings
Fixes invalid device tree parameters.

Drop the mvsw61xx node used in mvebu device tree source files. It looks
like some kind of ethernet switch cargo cult. Neither the
marvell,88e6352 nor the marvell,88e6172 compatible strings can be found
in any LEDE file or in the kernel sources.

Signed-off-by: Mathias Kresin <dev@kresin.me>
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
dani cea917c30b brcm63xx: fix HG556a C button
One button of the HG556a-C has the wrong GPIO pin defined in the dts file,
fix it

Signed-off-by: Daniel Gonzalez <dgcbueu@gmail.com>
8 years ago
Jonas Gorski 0bed85bbca brcm63xx: fix CVG834G compatible string
The CVG834G claimed to be a BCM6348, but is actually BCM3368. Since we
don't test against it, this was harmless.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
8 years ago
Jonas Gorski a89f5e795a brcm63xx: move the bootargs into the dtb files
Instead of using a fixed commandline, allow one per device.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
8 years ago
Jonas Gorski 80403e4558 brcm63xx: use upstreamed compatible name for the periph intc
This makes the eventual migration to bmips easier, as dts files
will require less changes.

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
John Crispin 69b28c5382 brcm63xx: fix BCM3368 interrupt controller addresses
Looks like the addresses for BCM3368 were wrongly defined when DT
support was introduced.

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

SVN-Revision: 48980
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
8 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 a15f148cf8 brcm63xx: fix BCM3368 external interrupts
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Acked-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: Jonas Gorski <jogo@openwrt.org>

SVN-Revision: 47375
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 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