ath10k loads before ath9k and thus ends up as phy0.
Also use led-sources to avoid some confusion.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/19860
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
The ath9k driver creates an ath9k LED by default. Instead of having a non
functional LED, configure it properly and remove the extra as it's not
needed.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/19860
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
The ath9k driver creates an ath9k LED by default. Instead of having a
non functional LED, configure it properly and remove the extra as it's
not needed.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/19861
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
All users of regular CONFIG_NVMEM_U_BOOOT_ENV have been converted to use
layouts.
CONFIG_NVMEM_U_BOOT_ENV selects the layout variant anyway so this is
safe to do.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16376
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
The child node "partitions" doesn't have "reg" property. Hence, we
don't need to use "#address-cells" and "#size-cells" to describe the
reg property information.
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/20942
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
With previous patches these devices have only 128 KiB less space than
RE450 v3. It may be even possible to revert commit 65b6f1c1b2 ("ath79:
move TP-Link RE450 v1 & v2 and RE355 v1 to tiny target") but that was
not done as the device has only 8 MiB flash and will eventually run out of
it anyway.
Signed-off-by: Radek Dostál <rd@radekdostal.com>
Link: https://github.com/openwrt/openwrt/pull/20709
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This patch utilizes unused and empty flash space in the original partition
layout and increase maximum image size by 1664 KiB.
Tested on RE450v1 by running sysupgrade with build of size 5697 KiB and
checking that df shows 1988 1K-blocks for "/overlay".
Inspired by commit ebd5e5fb53 ("ramips: switched TP-Link RE305 v1 to new
partition layout").
Signed-off-by: Radek Dostál <rd@radekdostal.com>
Link: https://github.com/openwrt/openwrt/pull/20709
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Dump of content of my RE450 v1 showed, that there are valid data only
up to 0x10420. Everything after is just 0xFF. This will also make
partition table identical to qca9563_tplink_re450-v2.dts, which seems
to be logical.
Signed-off-by: Radek Dostál <rd@radekdostal.com>
Link: https://github.com/openwrt/openwrt/pull/20709
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
The MikroTik RouterBOARD 962UiGS-5HacT2HnT (hAP ac) currently comes up
with random MAC addresses. Assign the MAC addresses from hard_config for
LAN and WAN ports.
Fixes: c2140e32ce ("ath79: add support for MikroTik RouterBOARD 962UiGS-5HacT2HnT (hAP ac)")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Link: https://github.com/openwrt/openwrt/pull/20782
Signed-off-by: Robert Marko <robimarko@gmail.com>
Userspace handling is deprecated.
Move calibration for pcie node out of dtsi. calibration size for ath10k
and ath9k differs.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16231
Signed-off-by: Robert Marko <robimarko@gmail.com>
Userspace handling is deprecated.
Use ath9k LED instead of specifying a generic one.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16286
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Userspace handling is deprecated.
Use ath9k LED binding to avoid generic LED usage.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16286
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Now that we have a board file, add calibration variant for TP-Link
Archer C60 v2 and add ipq-wifi package for it.
Tested-by: Semih Baskan <strstgs@gmail.com>
Signed-off-by: Christoph Krapp <achterin@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20496
Signed-off-by: Robert Marko <robimarko@gmail.com>
The SPI chip select GPIO polarity is active low by default. We must
use "spi-cs-high" dts property to toggle the polarity. The polarity
on "cs-gpios" won't take effect at all[1]. Fix these incorrect GPIO
polarities to silence the kernel warnings.
[1] Refer to Linux/Documentation/devicetree/bindings/spi/spi-controller.yaml
```
device node | cs-gpio | CS pin state active | Note
================+===============+=====================+=====
spi-cs-high | - | H |
- | - | L |
spi-cs-high | ACTIVE_HIGH | H |
- | ACTIVE_HIGH | L | 1
spi-cs-high | ACTIVE_LOW | H | 2
- | ACTIVE_LOW | L |
Notes:
1) Should print a warning about polarity inversion.
Here it would be wise to avoid and define the gpio as
ACTIVE_LOW.
2) Should print a warning about polarity inversion
because ACTIVE_LOW is overridden by spi-cs-high.
Should be generally avoided and be replaced by
spi-cs-high + ACTIVE_HIGH.
```
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/19845
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This is a useless property on ath79 target. Both spi-ar934x and
spi-ath79 drivers don't check num-cs property. They always set
chip select number to 3.
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/19845
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
The DTC recommends using wifi@0,0 as the node name to match the reg
property structure. Fix warning:
../dts/qca9557_fortinet_fap-221-c.dts:208.13-213.4: Warning (pci_device_reg): /ahb/pcie@180c0000/wifi@0,0,0: PCI unit address format error, expected "0,0"
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/18242
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
The imagebuilder is not intended to build initramfs images. Some
profiles attempt to do this and succeed, due to buildroot leaking
the initramfs-kernel into staging_dir; others attempt it, but fail
due to not having initramfs binaries present in the imagebuilder.
Fix this by adding an explict guard around the unsupported generation
of the initramfs images. This saves space and time during imagebuilder
runs, fixes those that are currently broken and protects against future
breakage for profiles that inadvertently work now.
Fixes: https://github.com/openwrt/openwrt/issues/20151
Signed-off-by: Eric Fahlgren <ericfahlgren@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20347
Signed-off-by: Robert Marko <robimarko@gmail.com>
Now that we have a board file, add calibration variant for TP-Link
Archer C59 v1 and add ipq-wifi package for it.
Tested-by: Mateusz Jończyk <matjon@users.noreply.github.com>
Signed-off-by: Christoph Krapp <achterin@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20401
Signed-off-by: Robert Marko <robimarko@gmail.com>
Fix a regression introduced by a recent commit.
It looks like a copy/paste error.
Add the missing line which defines the 'board' val
as it does not exist otherwise in the case check.
This fixes sysupgrade on ath79 MikroTik non-NOR boards.
Fixes: 318f07c231 ("ath79: mikrotik: check RouterBOOT version matching sysupgrade image")
Signed-off-by: Koen Vandeputte <koen.vandeputte@citymesh.com>
The latter is more descriptive in terms of what's going on.
Mostly found with
git grep gpios\ | grep 0\>
git grep gpios\ | grep 1\>
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20116
Signed-off-by: Robert Marko <robimarko@gmail.com>
Userspace handling is deprecated.
Also handle 2.4ghz LED in ath9k instead of generic.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20269
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Deprecated. Replaced with nvmem.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20176
Signed-off-by: Robert Marko <robimarko@gmail.com>
Userspace handling is deprecated.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20176
Signed-off-by: Robert Marko <robimarko@gmail.com>
Userspace handling is deprecated.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20176
Signed-off-by: Robert Marko <robimarko@gmail.com>
Userspace handling is deprecated.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20176
Signed-off-by: Robert Marko <robimarko@gmail.com>
Check if the uploaded image matches the version of RouterBOOT before
proceeding with sysupgrade on MikroTik devices with NOR flash.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
RouterBOOT v7 for NOR devices does not support the historic yaffs
"kernel" ELF boot method.
Generate a compatible kernel
Signed-off-by: John Thomson <git@johnthomson.fastmail.com.au>
Userspace handling is deprecated.
Also convert custom LED to one handled by ath9k.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20112
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Userspace handling is deprecated.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17344
Signed-off-by: Robert Marko <robimarko@gmail.com>
Userspace handling is deprecated.
Move the mac address patch to 10_fix_wifi_mac.
This uses an AR9287, which uses a smaller size for its calibration.
The PCI ID is also wrong.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/19864
Signed-off-by: Robert Marko <robimarko@gmail.com>
Now that we have a board file, add calibration variant for TP-Link
Archer C60 v1 and add ipq-wifi package for it.
Signed-off-by: Christoph Krapp <achterin@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/19993
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Instead of having two LED entries that supposedly control the same
thing, set the pin properly.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18905
Signed-off-by: Robert Marko <robimarko@gmail.com>
of_gpio.h is deprecated in upstream Linux and may be removed soon. Get
ahead of things and remove it. Most of these drivers already use the
gpiod API.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20076
Signed-off-by: Robert Marko <robimarko@gmail.com>
The driver makes its own ath9k LED which handles everything.
Simplifies DTS slightly.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20023
Signed-off-by: Robert Marko <robimarko@gmail.com>
Userspace handling for this is deprecated.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20023
Signed-off-by: Robert Marko <robimarko@gmail.com>
In first commit I successfully bring WAN port into ethernet switch,
without realizing that I was using custom bootloader. But if using
original bootloader it do not works. WAN port in original bootloader
is tied to using its own GMAC.
This fix is made so this firmware will be compatible with orignal
bootloader, so the user can directly flash from stock firmware without
changing anything.
Signed-off-by: Roy H <roy@altbytes.com>
Link: https://github.com/openwrt/openwrt/pull/20039
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Despite having the same tplink.dtsi file, there are differences in wifi
Move wifi nodes out of dtsi to make it clear what the chipset is and
what calibration size should be used.
While at it, change to use led-sources to simplify LED setup.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20024
Signed-off-by: Robert Marko <robimarko@gmail.com>
They have the same 0x200 calibration size.
Added various compatible lines in various places to make it clear what
device we're talking about.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/19863
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
These devices use AR9285, which uses 1f8 as the calibration size, not
440 like newer chips do. Actually the driver mandates a minimum of 200.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/19863
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Add calibration variant and ipq-wifi package for Xiaomi AIoT AC2350
Signed-off-by: Igor Dyatlov <dyatlov.igor@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/19707
Signed-off-by: Robert Marko <robimarko@gmail.com>
The ath9k driver creates an ath9k LED by default. Instead of having a
non functional LED, configure it properly and remove the extra as it's
not needed.
It's also a bit funny matching against phy0 and phy1 when both differ
between ath9k and ath10k.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/19862
Signed-off-by: Robert Marko <robimarko@gmail.com>