Commit Graph

14 Commits

Author SHA1 Message Date
INAGAKI Hiroshi bb6d11e534 ath79: add aliases to qca955x.dtsi for uart0/1
Add aliases with "serialN = &uartN;" of uart0/1 on QCA955x SoCs to
qca955x.dtsi, to enable uart1 on Linux Kernel.

without this:

[    0.342915] ar933x-uart 18500000.uart: unable to get alias id, err=-19

Additionally, remove "serial0 = &uart;" alias from QCA955x device
dts/dtsi files.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2024-03-08 17:35:01 +01:00
Thibaut VARÈNE 8084ec8061 ath79: cleanup mikrotik routerboot partitions
For some reason useless labels and aliases have been propagated through
copy-paste. Before the issue spreads any further, this patch cleans up
all relevant DTS files to the canonical form, bringing ath79 in line
with other mikrotik platforms (ramips and ipq40xx).

Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
2022-04-15 07:11:18 +02:00
Oskari Lemmela fdda3130f2 mikrotik: make soft_config writable
Parent mtd partition needs to be writable

Signed-off-by: Oskari Lemmela <oskari@lemmela.net>
2022-01-13 09:33:29 +01:00
Adrian Schmutzler 3a4b751110 ath79: enable UART in SoC DTSI files
The uart node is enabled on all devices except one (GL-USB150 *).
Thus, let's not have a few hundred nodes to enable it, but do not
disable it in the first place.

Where the majority of devices is using it, also move the serial0
alias to the DTSI.

*) Since GL-USB150 even defines serial0 alias, the missing uart
   is probably just a mistake. Anyway, disable it for now so this
   patch stays cosmetic.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-02-24 02:53:53 +01:00
Adrian Schmutzler 72bd92bea0 ath79: drop num-cs for SPI controller
None of the spi drivers on ath79 uses the num-cs property.

Cc: Chuanhong Guo <gch981213@gmail.com>
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Acked-by: Chuanhong Guo <gch981213@gmail.com>
2020-12-04 15:50:24 +01:00
Adrian Schmutzler 41cc7edc15 ath79: move dts-v1 statement to ath79.dtsi
The "/dts-v1/;" identifier is supposed to be present once at the
top of a device tree file after the includes have been processed.

In ath79, we therefore requested to have in the DTS files so far,
and omit it in the DTSI files. However, essentially the syntax of
the parent ath79.dtsi file already determines the DTS version, so
putting it into the DTS files is just a useless repetition.

Consequently, this patch puts the dts-v1 statement into the parent
ath79.dtsi, which is (indirectly) included by all DTS files. All
other occurences are removed.
Since the dts-v1 statement needs to be before any other definitions,
this also moves the includes to make sure the ath79.dtsi or its
descendants are always included first.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-09-25 23:26:34 +02:00
Adrian Schmutzler 635f111148 ath79: drop and consolidate redundant chosen/bootargs
In ath79, for several SoCs the console bootargs are defined to the
very same value in every device's DTS. Consolidate these definitions
in the SoC dtsi files and drop further redundant definitions elsewhere.

The only device without any bootargs set has been OpenMesh OM5P-AC V2.
This will now inherit the setting from qca955x.dtsi

Note that while this tidies up master a lot, it might develop into a
frequent pitfall for backports.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-06-25 23:09:05 +02:00
Thibaut VARÈNE 301bc3290d ath79/mikrotik: don't use mtd-mac-address in DTS
As evidenced here[1] the device MAC address can be stored at a random
offset in the hard_config partition. Rely on sysfs to update the MAC
address correctly.

To match sticker and vendor OS behavior, WAN MAC is set to the device
base MAC and LAN MAC is incremented from that.

Note: this will trigger a harmless kernel message during boot:
ag71xx 19000000.eth: invalid MAC address, using random address

There is no clean workaround to prevent this message from being emitted.

[1] https://github.com/openwrt/openwrt/pull/2850#issuecomment-610809021

Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
2020-05-08 15:17:17 +02:00
Thibaut VARÈNE 8f90dbfd1f ath79/mikrotik: use routerbootpart partitions
Enable routerbootpart partitions on MikroTik devices.

Tested-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
2020-05-08 15:17:17 +02:00
David Bauer c0a80b7125 ath79: rename qca9557.dtsi to qca955x.dtsi
There are at least 3 different chips in the Scorpion series of SoCs.
Rename the common DTSI to better reflect it's purpose for the whole
series.

Also rename the compatible bindings from qca,ar9557 and qca,qca9557
to qca,qca9550.

Signed-off-by: David Bauer <mail@david-bauer.net>
2020-04-24 20:02:29 +02:00
Roger Pueyo Centelles c0430b8da4 ath79: reduce spi-max-frequency for Mikrotik wAP G-5HacT2HnD
The previous spi-max-frequency value did not work with all the CPU speed
settings (configurable with rbcfg or from the stock firmware); the new
one does for the three of them.

Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
2020-04-16 13:44:18 +02:00
Thibaut VARÈNE 9a122df07e ath79: fix Mikrotik wAP G-5HacT2HnD mtd partitions
In RouterBOARD parlance there never was an "art" partition.
This partition has always been named 'hard_config' on ar71xx.

This partition contains more than just ART (Atheros Radio Test) data. It
includes the hardware description (product code, serial, board
identifier, name, hardware options, MAC address), as well as other bits
affecting the operation of RouterBoot.
To avoid confusion with regular ART data, this partition is renamed in
line with historical ar71xx and ramips nomenclature as 'hard_config'.

This commit fixes the previous support files and implements the nested
RouterBoot partition scheme as already used by ramips-based SPI-NOR
RouterBOARD DTSes, as previously reviewed and implemented in
bbe2cf657c ("ramips: fix RBM11G partitioning").

Tested-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
[minor commit title/message adjustments]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-03-27 17:12:46 +01:00
Roger Pueyo Centelles 9de6bc872a ath79: fix spi-max-frequency for wAP G-5HacT2HnD
The introduction of ebf0d8dade (ath79: add new ar934x spi driver)
made the SPI memory unusable. Reducing the spi-max-frequency to
a smaller value makes it work again.

Tested on two MikroTik RouterBOARD wAP G-5HacT2HnD devices.

Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
2020-02-27 12:14:09 +01:00
Roger Pueyo Centelles 6aaa5ce2c5 ath79: add support for MikroTik RouterBOARD wAP G-5HacT2HnD
This commit adds support for the MikroTik RouterBOARD wAP G-5HacT2HnD
(wAP AC), a small weatherproof dual band, dual-radio 802.11ac
wireless AP with integrated omnidirectional anntennae and one
10/100/1000 Mbps Ethernet port.

See https://mikrotik.com/product/RBwAPG-5HacT2HnD for more info.

Specifications:
 - SoC: Qualcomm Atheros QCA9556
 - RAM: 64 MB
 - Storage: 16 MB NOR
 - Wireless:
   · Atheros AR9550 (SoC) 802.11b/g/n 2x2:2, 2 dBi antennae
   · Qualcomm QCA9880 802.11a/n/ac 3x3:3, 2 dBi antennae
 - Ethernet: Atheros AG71xx (SoC, AR8033), 1x 1000/100/10 port,
   passive PoE in

Working:
 - Board/system detection
 - Sysupgrade
 - Serial console
 - Ethernet
 - 2.4 GHz radio
 - 5 GHz radio and LED
 - Reset button

Not working/Unsupported:
 - 2.4 GHz LED
 - AP/CAP LED
 - ZT2046Q SPI temperature and voltage sensor

This adds the basic features for supporting MikroTik devices:
 - a common recipe for mikrotik images in common-mikrotik.mk
 - support for minor (MikroTik NOR) split firmware (only for
   generic subtarget so far)

Acknowledgments: Robert Marko <robimarko@gmail.com>
                 Andrew Cameron <apcameron@softhome.net>
                 Koen Vandeputte <koen.vandeputte@ncentric.com>
                 Chuanhong Guo <gch981213@gmail.com>

Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
Co-developed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Tested-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2020-01-23 15:28:03 +01:00