Commit Graph

5 Commits

Author SHA1 Message Date
Mark Mentovai 565814a5ee ipq806x: ubnt,unifi-ac-hd: reorder eth0 and eth1
The Ubiquiti UniFi AC HD (UAP-AC-HD, UAP301) has two Ethernet ports,
labeled MAIN and SECONDARY, connected to gmac2 and gmac1, respectively.
The standard probe order results in gmac1/SECONDARY being eth0 and
gmac2/MAIN being eth1. This does not match the stock firmware, is
contrary to user expectation, causes the wrong (high) MAC address to be
used in a bridged configuration (the default for this device), and makes
the gmac2/MAIN port unusable in the preinit environment (such as for
failsafe). Until a recent patch, gmac1/SECONDARY (eth0) was not even
usable.

This reorders the ports so that gmac2/MAIN is eth0, and the now-working
gmac1/SECONDARY is eth1. eth0 has the low MAC address and eth1 has the
high; when bridged, the bridge takes on the correct low MAC address.
This matches the stock firmware. The MAIN port is usable for failsafe
during preinit.

This device does not have a switch on board, so there's no possibility
to remap ports via switch configuration. "ip link set $interface name"
is used instead, during preinit before networking is configured.

Signed-off-by: Mark Mentovai <mark@moxienet.com>
Build-tested: ipq806x/ubnt,unifi-ac-hd
Run-tested: ipq806x/ubnt,unifi-ac-hd
2021-05-07 07:05:16 +02:00
Christian Lamparter 98b86296e6 ipq806x: add support for ASRock G10
The ASRock G10 is a 2.4/5 GHz band 11ac "Gaming" router,
based on Qualcomm IPQ8064.

Specifications:

SoC:	Qualcomm IPQ8064
CPU:	Dual-Core A15 @ (384 - 1,400 MHz, 2C2T)
DRAM:	512 MiB (~467 MiB available)
NAND:	128 MB (Micron MT29F1G08ABBEAH4)
WLAN0:	4T4R 5 GHz Wlan (QCA9980)
WLAN1:	4T4R 2.4 GHz Wlan (QCA9980)
ETH:    5x 10/100/1000 Mbps Ethernet (QCA8337)
INPUT:  Reset Button, WPS 2.4G and WPS 5G Button
LEDS:   1 multicolor status LED
USB:    2x USB 3.0 Type-A
POWER:  12VDC/3A AC Adapter + dedicated Power Switch
UART:   Setting is 115200-8-N-1. 1x4 .1" unpopulated header
	on the PCB (J6 - very tiny silkscreen next to TX).
        Pinout: 1. 3v3 (Square - best skipped!), 2. RX, 3. GND, 4. TX

WARNING: The serial port needs a TTL/RS-232 3.3v level converter!
	 (Depending on the serial adapter RX and TX might need to
	  be swapped).

Note about the IR-Remote:
There's a 8-Bit MCU (SONIX SN8F25E21SG) which is controlling the
IR-Remote and is fed by the IR-Photodiode. The SoC can talk to
the device via I2C. The vendor's GPL archive comes with the source
of the interface driver for this as a (character driver), the main
control software is however a blob.

Installation Instructions:
 1. Download factory image to disk
 2. Apply factory image via stock web-gui

Back to stock:
 1. Login to router via ssh
 2. run "asrock_g10_back_to_factory" script from /sbin

Notes:
 - If something goes wrong durring sysupgrade, router will go back to
   factory image.
 - Asrock G10 uses partition layout from smem. So partition layout can
   be normal or alternate.
 - 900-arm-add-cmdline-override.patch was copied from 102-powerpc-add-cmdline-override.patch
   from powerpc target.

Knowledge about BOOTCONFIG partition was based on user "jmomo" post from old
OpenWrt forum (Post #50):
https://forum.archive.openwrt.org/viewtopic.php?id=65956&p=2

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
[bump to 5.4, add factory image, fix sysupgrade, convert partition
layout to smem, remove ipq-wifi-asrock-g10 and use ART, minor fixes]
Co-Authored-by: Pawel Dembicki <paweldembicki@gmail.com>
Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
Tested-by: Lukasz Ostapiuk <palibrzuch@gmail.com>
2020-12-22 19:11:50 +01:00
Luis Araneda 33f09cf151 ipq806x: convert to dt-based board-detection
Use the generic board detection method:
- Board name: First compatible string from the device tree
- Board model: Model property from the device tree

Change occurrences of board name in userspace by the compatible
string, and removed target specific board detection script

Replace the definition of SUPPORTED_DEVICES in Device/Default
to extract the dt compatible string from each device definition.
Additionally, for devices supported by lede-17.01, append
the value of BOARD_NAME to SUPPORTED_DEVICES in the device
definition.

Signed-off-by: Luis Araneda <luaraneda@gmail.com>
2018-01-13 07:33:03 +01:00
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>
2017-07-15 23:13:34 +02:00
John Crispin 3c1f6e358d ipq806x: Add support for IPQ806x chip family
Patches are generated using the "format-patch" command from the
following location:
*https://www.codeaurora.org/cgit/quic/kernel/galak-msm/log/?h=apq_ipq_base
*rev=0771849495b4128cac2faf7d49c85c729fc48b20
Patches numbered 76/77/102/103 have already been integrated in 3.14.12,
so they're not in this list.

All these patches are either integrated are pending integration into
kernel.org, therefore these patches should go away once the kernel
gets upgraded to 3.16.

Support is currently limited to AP148 board but can be extended to other
platforms in the future.

These changes do not cover ethernet connectivity.

Signed-off-by: Mathieu Olivari <mathieu@codeaurora.org>

SVN-Revision: 42334
2014-08-30 09:32:58 +00:00