Commit Graph

198 Commits (9601d94138de66e4fc9f55a08dfb348cdfcc3181)

Author SHA1 Message Date
Chuanhong Guo 387736af41 ath79: ag71xx: remove PHY reset
Bit 8/12 of reset controller which is marked as PHY_RESET/SWITCH_RESET
in datasheets will trigger either a reset for builtin switch or assert
an external ETH0_RESET_L/ETH1_RESET_L pin, which are usually connected
to external PHY/switch. None of them should be triggered every time an
interface is brought up in ethernet driver.

Remove PHY reset support from ag71xx and definition for them in dtsi.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
6 years ago
INAGAKI Hiroshi 23519edbca ath79: add support for Buffalo BHR-4GRV2
Buffalo BHR-4GRV2 is a wired router, based on Qualcomm Atheros
QCA9558.
Ported from ar71xx target.

Specification:

- Qualcomm Atheros QCA9558
- 64 MB of RAM
- 16 MB of Flash
- 5x 10/100/1000 Ethernet
  - QCA8337N
- 4x LEDs, 2x keys
- UART header on PCB
  - Vcc, TX, RX, GND from LED side
  - 115200n8

Flash instruction using factory image:

1. Connect the computer to the LAN port of BHR-4GRV2
2. Connect power cable to BHR-4GRV2 and turn on it
3. Access to "http://192.168.12.1/" and open firmware update
page ("ファームウェア更新")
4. Select the OpenWrt factory image and click update ("更新実行")
button
5. Wait ~120 seconds to complete flashing

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
6 years ago
David Bauer 6555612783 ath79: fix PLL settings for QCA955x
This adds PLL settings for the ethernet ports of the TP-Link TL-WR1043
v2/v3 and the Openmesh OM5P-AC-v2.

We also change the PLL-settings in the qca9557.dtsi to match the ones
used as default on the ar71xx target.

As of 4b9680f138 those devices have broken ethernet ports as the default
PLL settings defined in the QCA9557.dtsi are applied which are off for
those devices.

Signed-off-by: David Bauer <mail@david-bauer.net>
6 years ago
Kevin Darbyshire-Bryant 995a1ba841 ath79: add pll for archer c7
commit 4b9680f fixed pll settings and the correct pll set
by bootloader is overrided by value in qca9557.dtsi which
is incorrect for Archer C7 and breaks ethernet. Add pll
values for archer c7 to fix ethernet connection.

This individual pll tweak has been cherry picked from github pr 1260
which changes a couple of things in a single commit and should be
ideally split.  This commit get archer v7 back and working.

Tested: archer c7 v2

Original combined commit authored by:
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
c7 fix only split out by:
Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
6 years ago
David Bauer 4b9680f138 ath79: fix QCA9557 eth PLL settings
The QCA9557 dtsi is currently missing pll-handle and pll-regs for both
eth0 and eth1, therefore PLL settings won't be applied. This commit
fixes this behavior.

Signed-off-by: David Bauer <mail@david-bauer.net>
6 years ago
Chuanhong Guo 1edba538a9 ath79: Fix led nodes for TL-WR740N v2 and add its clones
This patch did the following things:
1. Separate ath9k-leds out of gpio leds so that all other leds will work
   before ath9k loded (e.g. during preinit/init stage).
2. Rename wps led to qss since that's how TP-Link mark it.
3. Rename LED prefix to tp-link because that dts is shared by many devices.
4. Rename to wr740n-v1 because v1 is the first and v2 just use the fw of v1.
   (This will require a forced sysupgrade if you comes from
   the previous wr740n v2 image.)
5. Remove SUPPORTED_DEVICES.
   (tl-wr740n-v2 doesn't exist anywhere so it's useless.)
6. Add all WR741ND v1 clones found in ar71xx.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
6 years ago
Mathias Kresin 55ff2951ea ath79: fix dts warnings
Fix all issues found by the devicetree compiler like wrong address/size
cells as well as wrong/missing/superfluous unit addresses.

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Mathias Kresin bf078fcab6 ath79: fix node names
Use the standardized node names from the devicetree specification.

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Mathias Kresin a8ad7b6efa ath79: fix compatible strings
Use only the jedec,spi-nor compatible string. Everything else either
never worked or is only support to keep compatibility.

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Mathias Kresin 7b42247182 ath79: fix whitespace issue in dts files
Fixes spaces vs. tabs issues and remove indentation on blank lines.

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Chuanhong Guo 18a2595315 ath79: rename tl-archer-c7 to archer-c7
This router is called Archer C7 and the tl was used to identify
TP-LINK. Since we have added tplink in dts/board name, the tl
prefix is useless now.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
6 years ago
Chuanhong Guo 8288af1e18 ath79: rename dts/image using manufacturer_board scheme
This helps getting rid of SUPPORTED_DEVICES which can be
auto-generated in image/Makefile.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
6 years ago
Chuanhong Guo 690c55e8cc ath79: fix support for TL-WR740N/WR741N v4
1. Swap eth0/eth1
 Both devices are using AR9331, the builtin switch on AR9331 is
 connected to gmac1 and gmac1 is named as eth1 in ath79.
 PS: gmac1 is eth0 and gmac0 is eth1 in ar71xx because of the
 reversed initialization order.
2. Fix the incorrect compatible string in dts

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
6 years ago
Chuanhong Guo 115e993adc ath79: remove useless phy-handle nodes
phy-handle is used to poll link status. They are useless when
we need fixed-link on these interfaces.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
6 years ago
Mathias Kresin 1d18a14a90 ath79: really fix TP-Link Archer C7 v2 MAC address
Revert 290c54473e ("ath79: fix TP-Link Archer C7 v2 wlan1 MAC address")
which obviously aims to have a distinct MAC address per interface.

Unfortunally it doesn't match what is used by the stock firmware and we
shouldn'z use MAC Adresses not reserverd for/assigned to a particular
board.

The correct MAC adress increments for this board are:

wlan0 (5GHz) : -1
wlan1 (2.4GHz) : 0
eth1 (LAN) : 0
eth0 (WAN) : 1

Fixes: FS#408

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Daniel F. Dickinson 60cf71ede7 ath79: Forward port support for CR3000
The PowerCloud Systems CR3000 was a cloud-managed CPE for a now defunct
NaaS offering.  It was previously supported under the ar71xx branch and
this forward ports that support with some notable differences:

1) Since reverting to stock firmware is now irrelevant there is is only
a single openwrt image generated which uses the entire flash rather than
preserving PowerCloud-specific partitions that are unneeded to openwrt--
those partitions will be erased and used by the openwrt image.

2) Rather than use a non-standard probe order for the ethernet devices,
this image uses a set of 'ip link set ethX name ethY' commands very early
in preinit (before the network is used at all), in order to have the the
switch and Wan use the same ethernet names as in previous images.

3) /etc/config/wireless will need to be regenerated as the path to the
wireless device has changed due to differences in ath79 DT for ar93x
compared to ar71xx images.

4) eth0 is wan and eth1 is lan (switch)

Signed-off-by: Daniel F. Dickinson <cshored@thecshore.com>
6 years ago
Lucian Cristian accb67e582 ath79: add support for tl-wr841n-v9
Signed-off-by: Lucian Cristian <lucian.cristian@gmail.com>
6 years ago
Chuanhong Guo 7a07b4cff0 ath79: Add switch reset definition in dts
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
6 years ago
Chuanhong Guo a5fa6b3825 ath79: ar724x: Fix reset definition for gmac0/gmac1
reset bit 8 is for builtin switch and bit 12 is marked 'reserved' on datasheet.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
6 years ago
Chuanhong Guo 4e5ba50760 ath79: ar7240: Update dts for current ag71xx driver
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
6 years ago
Chuanhong Guo 85189e4c00 ath79: ag71xx: Rework mdio clock settings
Allow specifying desired mdio clock frequency in dts.
Use default frequency around 5MHz for builtin switch and 2MHz for other mdio bus.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
6 years ago
Chuanhong Guo bb7fac4369 ath79: ar7242: Update dts for current ag71xx driver
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
6 years ago
Chuanhong Guo 113b4cf90f ath79: ar7241: Update dts for current ag71xx driver
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
6 years ago
Chuanhong Guo b6c8e5deae ath79: Fix support for TP-LINK Archer C7 v2
Remove mdio1 and phy1 handle. AR8327N is controlled through mdio0.
Add gmac-config for Archer C7.
Remove ucidef_set_interfaces_lan_wan. They can be determined by config_generate automatically.

The following are for adding support for WDR4900 v2/Archer C7 v1 and other
devices that shared the same machine file in ar71xx:
Move mtd partitions to archer-c7-v2.dts. Only Archer C7 v2 has 16M flash.
Flash on Archer C7 v1/TL-WDR4900 v2 is 8M.
Add label for wlan leds. The default trigger for archer c7/wdr4900 is different.
Move wlan5g led to archer-c7-v2.dts. 5G led on WDR4900 is connected to ar9380.
Move rfkill definition to archer-c7-v2.dts. There is no such a button on wdr4900 v2.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
6 years ago
Chuanhong Guo 18db385eb7 ath79: qca955x: Update dts for current ag71xx driver
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
6 years ago
Chuanhong Guo b7a10772d1 ath79: qca956x: Update dts for current ag71xx driver
enable mdio1 by default because mdio1 node is a subnode of eth1
and eth1 node is a "simple-mfd", which makes mdio1 disabled when
eth1 isn't enabled.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
6 years ago
Chuanhong Guo fc1f55ebf4 ath79: qca953x: Add chosen node and specify console in bootargs
Most qca devices use 115200n8 as it's default uart baudrate.
Add 'chosen' node for qca953x like other SoCs in ath79 target.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
6 years ago
Chuanhong Guo e8245c5b3f ath79: qca953x: Update dts for current ag71xx driver
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
6 years ago
Lucian Cristian e6417390e0 ath79: update qca9533 to new irq driver
Commit c7efc93 renamed controller name
to qca,ar9340-intc and added some functions but qca9533.dtsi was overlooked.
Correct the dtsi and adust it to the new format

Add gmac and correct reset for cascaded irq and build-in switch
Also add the reference clock to soc dtsi so we don't have to have it in every dts

Signed-off-by: Lucian Cristian <lucian.cristian@gmail.com>

Remove switch reset definition
Fix gmac compatible string (We only need SW_PHY_SWAP and SW_PHY_ADDR_SWAP on qca953x so use ar9330-gmac instead of ar9340-gmac.)

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
6 years ago
Chuanhong Guo c7c807cb8c ath79: ar933x: Update dts for current ag71xx driver
gmac0 is always connected to switch phy4 and mdio1 is always needed.
So add phy handle for eth0 and enable mdio1 by default.
Move fixed-link for gmac1 from device dts to ar9331.dtsi because gmac1 is always connected to builtin switch.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
6 years ago
Chuanhong Guo f6c99241ba ath79: ar934x: Update dts for current ag71xx driver
Enable mdio1 by default because mdio1 is needed when eth1 is enabled.

PS: If a ar9341 device has only one port and you only want to use gmac0,
change compatible of gmac1 to "syscon", "simple-mfd" in dts.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
6 years ago
Chuanhong Guo 2d081addb5 ath79: ag71xx: Split gmac config into separated file and add support for ar934x/qca955x.
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
6 years ago
Chuanhong Guo b346c37588 ath79: Fix mac reset and gmac compatible in ar934x.dtsi
Also add phy-mode and fixed-link as gmac1 is always connected
to the builtin switch.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
6 years ago
Daniel F. Dickinson 915966d861 ath79: Port PowerCloud Systems CAP324 support
The CAP324 was an AP for a NaaS offering that is now defunct.  While
previously supported in the ar71xx arch, there were some errata (to
be fixed shortly).

Notable differences from ar71xx support:

1) The method of getting the ath9k firmware for the PCIe 2ghz wifi has
changed (due to changes in how the arch handles this), since this device
doesn't use the EEPROM except to get the MAC address of the wifi.

2) /etc/config/wireless will need to be regenerated as the path(s) to
the wireless device(s) have changed.

3) ath79 OpenWrt firmware no longer supports build an image that allows
reverting to stock firmware (as the cloud service no longer exists, the
stock firmware is useless), instead using all of the flash for image and
overlay (less u-boot/env and art).

4) Initial network config treats the ethernet port as a Lan port with
the standard default address (192.168.1.1 unless changed in .config
--e.g. via menuconfig) instead of using DHCP (this was the default for
the stock firmware, however for openwrt use this is rather confusion and
counter-productive as the user has a harder time finding the device on
the network.

Signed-off-by: Daniel F. Dickinson <cshored@thecshore.com>
6 years ago
Daniel F. Dickinson 4b93cbd172 ath79: Port PowerCloud Systems CR5000 support
Add ath79 arch support for PowerCloud Systems CR5000.  Previously
supported under ar71xx (however there are some errors in that support;
to be fixed shortly).

Info:

* This board is based on the Atheros DB120 reference design, but doesn't
  use the on-board switch.  Instead it attachs GMAC0 to an AR8327 switch.
* It only uses GMAC0 and the WAN is simply a VLAN in the stock firmware.
* It has 64MB RAM and 8MB flash.
* In the dts version we get rid of using 'open-drain' for the AR8327
  LED controls.
* As with the platform data version we disable JTAG as this conflicts
  with one of the pair of GPIO's required for the power/status LED
  (GPIO2 and GPIO4 are used for this LED).
* The pcie card wifi has an EEPROM but gets it's MAC address from
  the ART partition.
* The SoC wifi (2.4 GHz) is all from the ART.
* The USB is support comes from the SoC.

NB. This is actually an AR9342 rather than AR9344 but we use the 9344
definitions because there are no relevant differences for this board.

NB: Building only images that don't support reverting to the old
cloud-based firmware as the Skydog cloud service for the CR5000 no
longer exists.

Signed-off-by: Daniel F. Dickinson <cshored@thecshore.com>
6 years ago
David Bauer 5409dcffbd ath79: fix OCEDO Raccoon
The OCEDO Raccoon only has one ethernet port, but currently uci sections
for WAN and LAN are created.

Additionally, newer versions of the devices U-Boot (units with SteelWRT)
set the kernel-cmdline and therefore overwrite the partition-layout.
We fix this by overwriting the cmdline supplied by the bootloader.

Signed-off-by: David Bauer <mail@david-bauer.net>
6 years ago
Aleksandr V. Piskunov 290c54473e ath79: fix TP-Link Archer C7 v2 wlan1 MAC address
The mac address for the 2.4 wireless need to be decremented by one.

Correct MAC adress increments for this board are:
wlan0 (5GHz)   : -2
wlan1 (2.4GHz) : -1
eth1  (LAN)    :  0
eth0  (WAN)    :  1

Signed-off-by: Aleksandr V. Piskunov <aleksandr.v.piskunov@gmail.com>
6 years ago
David Bauer 6476148034 ath79: add support for OCEDO Raccoon
This commit adds support for the OCEDO Raccoon

SOC:	Atheros AR9344
RAM:    128MB
FLASH:  16MiB
WLAN1:  AR9344 2.4 GHz 802.11bgn 2x2
WLAN2:  AR9382 5 GHz 802.11an 2x2
INPUT:  RESET button
LED:    Power, LAN, WiFi 2.4, WiFi 5
Serial: Header Next to Black metal shield
        Pinout is 3.3V - GND - TX - RX (Arrow Pad is 3.3V)
        The Serial setting is 115200-8-N-1.

	NOTE: The U-Boot won't boot with the serial attached.
	Boot the device without serial attached and attach it
	after 3 seconds.

Tested and working:
 - Ethernet
 - 2.4 GHz WiFi
 - 5 GHz WiFi
 - TFTP boot from ramdisk image
 - Installation via ramdisk image
 - OpenWRT sysupgrade
 - Buttons
 - LEDs

Installation seems to be possible only through booting an OpenWRT
ramdisk image.

Hold down the reset button while powering on the device. It will load a
ramdisk image named 'raccoon-uImage-initramfs-lzma.bin' from 192.168.100.8.

Note: depending on the present software, the device might also try to
pull a file called 'raccoon-uimage-factory'. Only the name differs, it
is still used as a ramdisk image.

Wait for the ramdisk image to boot. OpenWRT can be written to the flash
via sysupgrade or mtd.

Due to the flip-flop bootloader which we not (yet) support, you need to
set the partition the bootloader is selecting. It is possible from the
initramfs image with

 > fw_setenv bootcmd run bootcmd_1

Afterwards you can reboot the device.

Signed-off-by: David Bauer <mail@david-bauer.net>
6 years ago
Christoph Krapp e420b7b5c5 ath79: add support for UniFi AC-Mesh Pro
The Unifi AC-Mesh Pro has identical hardware to the Unifi AC-Pro except
USB support.
Furthermore for setting parameters like antenna gain it is helpful to
know the exact device variant.

Signed-off-by: Christoph Krapp <achterin@googlemail.com>
6 years ago
Christoph Krapp 8722c52b41 ath79: remove bs-partition ro-flag for UniFi AC devices
This removes the read-only flag from the bs (bootselect) partition
on UniFi AC devices. This allows to correct the indicator from which
partition the device is booting its kernel from.

See also:
 - freifunk-gluon/gluon#1301
 - https://bugs.lede-project.org/index.php?do=details&task_id=662

Signed-off-by: Christoph Krapp <achterin@googlemail.com>
6 years ago
Aleksandr V. Piskunov 63c9081c77 ath79: swap TP-Link Archer C7 v2 USB port LED and GPIO names
TP-Link Archer C7 v2 USB port LED and GPIO names are in incorrect order,
i.e. in order to match actual user visible labels, usb1 should be usb2,
and vice versa.
This patch swaps LED and GPIO power control node names.

Signed-off-by: Aleksandr V. Piskunov <aleksandr.v.piskunov@gmail.com>
6 years ago
Peter Lundkvist 781ad46206 ath79: add support for TP-Link RE450 v2
TP-Link RE450 v2 is a dual band router/range-extender
based on Qualcomm/Atheros QCA9563 + QCA9880.

Specification:

- 775 MHz CPU
- 64 MB of RAM (DDR2)
- 8 MB of FLASH (SPI NOR)
- 3T3R 2.4 GHz
- 3T3R 5 GHz
- 1x 10/100/1000 Mbps Ethernet (AR8033 PHY)
- 7x LED, 4x button
- UART header on PCB (needs unmounted R64 & R69 0201 resistors/jumpers)

Flash instruction:
Apply factory image in OEM firmware web-gui.

U-Boot does not seem to have any recovery functions, so
debricking requires connection via UART.

Signed-off-by: Peter Lundkvist <peter.lundkvist@gmail.com>
6 years ago
Rocco Folino 4ff019722c ath79: port TP-Link TL-WR741ND v4 and TL-WR740ND v4
This patch ports the TP-Link TL-WR741ND v4 and TL-WR740ND v4 to the
ath79 target.

Because the two devices share the same hw layout, this patch adds a common
.dtsi which is included by the two .dts.

Signed-off-by: Rocco Folino <rocco@folino.io>
6 years ago
Rocco Folino 9b575288eb ath79: add pinmux to ar9330
This patch adds the pinmux support to the ar9330 used to disable the
JTAG or to enable switch LEDs

Signed-off-by: Rocco Folino <rocco@folino.io>
6 years ago
Adrian Schmutzler 4456dd4660 ath79: add support for Unifi AC Mesh
The Unifi AC Mesh is equivalent to the Unifi AC Lite. However,
for setting certain parameters with the flashed device it is
helpful that the devices know their variant (e.g. automatically
setting antenna gain for the different antennas in Lite and Mesh).

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
6 years ago
Dmytro Smyrnov 40218a2632 ath79: add support for more AR7241 TP-Link boards
Its common AP99(AR7241) platform with following devices:

  TP-Link TL-WR841N/ND v7 (SoC AR7241 / Wifi AR9287 / without USB)
  TP-Link TL-MR3220 v1 (SoC AR7241 / Wifi AR9285 / USB support)
  TP-Link TL-MR3420 v1 (SoC AR7241 / Wifi AR9287 / USB support)

Signed-off-by: Dmytro Smyrnov <dioptimizer@hotmail.com>
Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Lucian Cristian 25070f7106 ath79: small wr1043nd-v4 fixes
- fix sysupgrade check
- move usb to v4 dts because v5 doesn't have it
- make wan mac address behave like ar71xx target
- add orange wan led support, it can be userspace activated like:

  on:
  echo default-on > /sys/class/leds/tp-link\:orange\:wan/trigger

  off:
  echo none > /sys/class/leds/tp-link\:orange\:wan/trigger

Signed-off-by: Lucian Cristian <lucian.cristian@gmail.com>
6 years ago
Lucian Cristian 7dd3d7e1d3 ath79: add support for Ubiquiti UniFi AC-Pro
rework the dts to a common unifi-ac dtsi
pro network is connected via phy0 and has usb ports
lite network is connected via phy4 without usb ports

Signed-off-by: Lucian Cristian <lucian.cristian@gmail.com>
6 years ago
Adrian Schmutzler 56fddc2577 ath79: sync naming of Ubiquiti devices
Use a Unifi AC Lite board-/image name consistent with other Ubiquiti
devices.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
6 years ago
Chuanhong Guo c463320812 ath79: Remove all memory nodes defined in dts
This target can automatically detect the correct memory size and we've
been using it for long in ar71xx.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
6 years ago
Sibren Vasse ba74b45476 ath79: add support for TP-Link Archer c7 v2
Signed-off-by: Sibren Vasse <github@sibrenvasse.nl>
6 years ago
Lucian Cristian 2a7e03af37 ath79: add tl-wr2543-v1 support
to switch between wlan leds we need a userspace implementation

Signed-off-by: Lucian Cristian <lucian.cristian@gmail.com>
6 years ago
Zoltan HERPAI 31c26cece3 ath79: add support for ON Networks N150R
This is a rebranded Netgear WNR612v2, specs are the same.

 - Atheros AR7240 (Python) @400MHz
 - flash 4MB
 - ram 32MB
 - ethernet 10/100: 1xwan + 2xlan (only two)
 - radio AR9285

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
6 years ago
Zoltan HERPAI 51dd8ec62f ath79: add Netgear WNR612 v2
Netgear WNR612 v2:
 - cpu Atheros AR7240 (Python) @400MHz
 - flash 4MB
 - ram 32MB
 - ethernet 10/100: 1xwan + 2xlan (only two)
 - radio AR9285

As there is a rebranded WNR612v2 called ON Networks N150R, add
a dtsi which includes all device support, and add a separate dts
for the device only (with a separate one for the subsequent N150R).

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
6 years ago
Johann Neuhauser dcc942e666 ath79: ar934x: use irq-ath79-intc driver and enable wmac
Signed-off-by: Johann Neuhauser <johann@it-neuhauser.de>
6 years ago
Johann Neuhauser b8562f168b ath79: qca95xx: add new intc2, correct intc3 and add second pcie on qca9557
Signed-off-by: Johann Neuhauser <johann@it-neuhauser.de>
6 years ago
John Crispin c49ae68cba ath79: fix qm5p-ac-v2 dts file
Signed-off-by: John Crispin <john@phrozen.org>
6 years ago
Lucian Cristian b1a173d7c3 ath79: add support for tl-wr1043nd v2/v3
Signed-off-by: Lucian Cristian <lucian.cristian@gmail.com>
6 years ago
Marty E. Plummer 0e81968ee8 ath79: add initial nand support for gl-ar300m
Signed-off-by: Marty E. Plummer <hanetzer@startmail.com>
6 years ago
Marty E. Plummer fe3b62bbdc ath79: initial gl-ar300m support
Signed-off-by: Marty E. Plummer <hanetzer@startmail.com>
6 years ago
Lucian Cristian 71ae0792ba ath79: add tl-wr1043nd-v4 support everything is working
tplink-safeloader: resize kernel partition
kernel 4.14 is much bigger, resize the partition

Signed-off-by: Lucian Cristian <lucian.cristian@gmail.com>
6 years ago
Lucian Cristian cad843e1f5 ath79: add ubiquiti unifi ap ac lite/lr
Signed-off-by: Lucian Cristian <lucian.cristian@gmail.com>
6 years ago
Weijie Gao 97c5cbc496 ath79: add support for Phicomm K2T
This patch adds dts for qca956x and also support for Phicomm K2T

The qca965x.dtsi adds nearly all the necessary components.
Both ath9k AHB and PCIe worked well.

The Phicomm K2T uses MTD partition 'config' to store the mac addresses in
JSON format. To extract these fields correctly, a script is introduced:
    /lib/functions/k2t.sh
This script provides a helper function to extract mac addresses, and is used
in three places.

Hardware spec of Phicomm K2T:
CPU: QCA9563
DRAM: 64MB DDR2
Flash: 16MB SPI-NOR
Switch: QCA8337
WiFi 5.8GHz: QCA9886

Flash instruction:
Apply sysupgrade.bin via serial console:

tftp 0x80000000 sysupgrade.bin && erase 0x9f090000 +$filesize && cp.b $fileaddr 0x9f090000 $filesize

Signed-off-by: Weijie Gao <hackpascal@gmail.com>
6 years ago
Johann Neuhauser 14cb05909a ath79: clean up led config script files for all devices
1. Move all status led definitions out of diag.sh into device dt
   as we use here a generic script hook.

2. Encode "phy0ptp" led trigger in dt of device for all ath79 devices.

Signed-off-by: Johann Neuhauser <johann@it-neuhauser.de>
6 years ago
Hannu Nyman 25ea21d765 ath79: fix WNDR3800 support
Fixes for WNDR3800 DTS:
* fix bootcmd
* name art partition to reference it for MACs
* format firmware partition's address similarly as others
* make u-boot-env read-only like in ar71xx
* read wan and lan MACs from art
* fix LED and button gpio values to match ar71xx
  (orange/green powerLED, reset button)
* enable power LED in dts by alias led-status
* define USB LED triggers and connect to USB port
* change wifi button to KEY_RFKILL like in ar71xx

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
6 years ago
Lucian Cristian f7a220b2f6 ath79: fix usb led on wr-1043nd-v1
usb port was not triggered correctly
also remove uneded wifi led trigger from the script

Signed-off-by: Lucian Cristian <lucian.cristian@gmail.com>
6 years ago
Alex Maclean ab5b359876 ath79: fixup TL-WR703N/TL-MR10U split
Readd SoC compatible strings and correct model names mangled in
a51078f735, cleanup dts to remove
duplication, rename dtsi for clarity, use correct GPIO for TL-MR10U
USB power.

Tested only on TL-WR703N due to lack of a TL-MR10U.

Signed-off-by: Alex Maclean <monkeh@monkeh.net>
6 years ago
Lucian Cristian c8677ca89e ath79: add tl-mr3020-v1 support
Signed-off-by: Lucian Cristian <lucian.cristian@gmail.com>
6 years ago
Karl Palsson 8c15fb5240 ath79: wr1043: fix DTC warnings
Use the "correct" unit name to avoid DTC warnings.

Signed-off-by: Karl Palsson <karlp@etactica.com>
6 years ago
Karl Palsson 5e69dce0e7 ath79: glinet ar150: fix DTC warnings
Supply a unit name to match other .dts files and avoid DTC warnings.

Signed-off-by: Karl Palsson <karlp@etactica.com>
6 years ago
Karl Palsson 9dad82c5d6 ath79: ubnt: fix DTC warnings
Use explicit labels instead of units with no reg's to avoid DTC
warnings.

Signed-off-by: Karl Palsson <karlp@etactica.com>
6 years ago
Karl Palsson 93ff973c97 ath79: wdr4300: avoid DTC warnings
Use direct button labels to avoid dtc warnings

Signed-off-by: Karl Palsson <karlp@etactica.com>
6 years ago
Karl Palsson 29b2804c6b ath79: buffalo_wzr-hp-g450h: fix dtc warnings
Just name buttons directly, rather than abstract and then also a label.
Likewise for leds.  Avoids DTC warnings about unit address with no reg
parameter.

Signed-off-by: Karl Palsson <karlp@etactica.com>
6 years ago
Karl Palsson 97326e5131 ath79: avm_fritz300e: avoid dtc warnings
Use number formats preferred by the device tree compiler

Signed-off-by: Karl Palsson <karlp@etactica.com>
6 years ago
Karl Palsson d25d847e78 ath79: mdio: add address-cells and size-cells defaults
Eliminates warnings about relying on defaults from the device tree
compiler.

Signed-off-by: Karl Palsson <karlp@etactica.com>
6 years ago
Karl Palsson 35aae0735c ath79: ar9330.dtsi: fix typo in USB unit name
Make the unitname match the reg address.  This fixes a DTC warning.

Tested that USB is still functional on an ar9331 device including this
dtsi.

Signed-off-by: Karl Palsson <karlp@etactica.com>
6 years ago
Karl Palsson 1588114cf2 ath79: add etactica-eg200 support
Based on original ar71xx eg200 board files

Tested working:
* usb hub, storage and serial port
* ethernet
* wifi
* leds
* button

sysupgrade from self->self passes validity checks.
sysupgrade from old ar71xx->ath79 passes. (however this doesn't migrate
wireless driver configs)

Only unknown issue is the existance of a /sys/class/leds/ath9k-phy0,
which doesn't "exist"

Signed-off-by: Karl Palsson <karlp@etactica.com>
6 years ago
Adoal Xu a51078f735 ath79: add TP-Link TL-MR10U port
Signed-off-by: Adoal Xu <adoalxu@gmail.com>
6 years ago
Catrinel Catrinescu dc1268cb11 ath79: add WLAN, Ethernet-Switch with LAN/WAN and Status LED to Dorin
Signed-off-by: Catrinel Catrinescu <cc@80211.de>
6 years ago
Alex Maclean 5b0c899bfd ath79: correct wmac names in dts
Signed-off-by: Alex Maclean <monkeh@monkeh.net>
6 years ago
Alex Maclean ba5b6c619b ath79: add TP-Link TL-WR703N port
Signed-off-by: Alex Maclean <monkeh@monkeh.net>
6 years ago
Alex Maclean d215d0f9ae ath79: add TP-Link TL-WR740N/ND v2 port
Signed-off-by: Alex Maclean <monkeh@monkeh.net>
6 years ago
Alex Maclean fab3254b32 ath79: add pinmux node to ar724x.dtsi
Signed-off-by: Alex Maclean <monkeh@monkeh.net>
6 years ago
Alex Maclean 34f874b872 ath79: add AR7240 dtsi
Signed-off-by: Alex Maclean <monkeh@monkeh.net>
6 years ago
Lucian Cristian 253095131d ath79: initial tl-wr1043nd v1 support
Signed-off-by: Lucian Cristian <lucian.cristian@gmail.com>
Signed-off-by: John Crispin <john@phrozen.org>
6 years ago
John Crispin 83fb9ec5e0 ath79: make ahb wifi work
Signed-off-by: John Crispin <john@phrozen.org>
6 years ago
Johann Neuhauser a7e1e919af ath79: preliminary support for TP-Link WDR3600 / WDR4300 (AR9344)
working:
 - leds
 - buttons
 - lan / wan
 - usb (hub port 1 + 2)
 - wifi 5g
 - sysupgrade
 - ...

not working:
 - wifi 2g

Signed-off-by: Johann Neuhauser <johann@it-neuhauser.de>
6 years ago
Matthias Schiffer aea146736c
ath79: fix TP-Link TL-WR1043ND v1 image build
Both initramfs and flashed images are built and boot. No Ethernet, no WLAN,
probably further issues, so the image is not added to TARGET_DEVICES for
now.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
6 years ago
Mathias Kresin 75ed56a08a ath79: add AVM FRITZ!WLAN Repeater 300E
No known issues, everything works fine.

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Mathias Kresin bc04cf780e ath79: ar724x: fix pll settings
Add the syscon compatible, otherwise used functions like
syscon_regmap_lookup_by_phandle() will return an error and setting the
ethernet pll data wont work at all.

Fix the pll register width. Writing to registers out of the range via
syscon isn't possible and returns an error. On ar7242 the last pll
register - Current Audio Modulation Logic Output - is at 0x1805003c.

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Mathias Kresin 0ff5785c5d ath79: fix dts files
Add the SoC compatible to the individual dts files. Rename the dts files
to match the common pattern.

Remove dts files wich aren't used and no image in ar71xx exists.

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Johann Neuhauser c15dfbeea0 ath79: fix gmac compatible in ar9330.dtsi and ag71xx_setup_gmac_933x
1. compatible property in node gmac was wrong

2. ag71xx_setup_gmac_933x should use np of gmac-config and
   not the pointer to gmac. gmac is only used for the reg address.

Signed-off-by: Johann Neuhauser <johann@it-neuhauser.de>
6 years ago
John Crispin 99f10b193e ath79: drop dts/Makefile
Signed-off-by: John Crispin <john@phrozen.org>
6 years ago
Russell Senior 4aacd6388a ath79: u-boot partitions should be read-only in dts
Some of the new ath79 device trees were missing read-only tags on the
u-boot partitions.  This adds the tags where previously missing.

Signed-off-by: Russell Senior <russell@personaltelco.net>
6 years ago
Rafał Miłecki 4edd4cb2b3 ath79: use the new DT fixed partitions syntax
This new syntax is slightly better designed & uses "compatible" string.
For details see Documentation/devicetree/bindings/mtd/partition.txt .

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
6 years ago
John Crispin 7fe77a5962 ath79: revert license change on upstream DTS files
Signed-off-by: John Crispin <john@phrozen.org>
6 years ago
Rafał Miłecki 66c8afd115 ath79: relicense DTS files to the GPL 2.0+ / MIT
Some maintainers prefer DTS files licensed under permissive license like
MIT / BSD. As all DT bindings should be OS independent and DTS files are
pretty separated from Linux code it probably makes sense to share them
across projects.

The safest solution is to use dual licensing: that way it stays clear
these files can be used in GPL projects without depending on current
belief of licenses compatibility.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Acked-by: John Crispin <john@phrozen.org>
6 years ago
John Crispin 53c474abbd ath79: add new OF only target for QCA MIPS silicon
This target aims to replace ar71xx mid-term. The big part that is still
missing is making the MMIO/AHB wifi work using OF. NAND and mikrotik
subtargets will follow.

Signed-off-by: John Crispin <john@phrozen.org>
6 years ago