This patch adds support for GL.iNet GL-B1300
Specification:
- SOC: IPQ4028 / QCA Dakota
- RAM: 256 MiB
- FLASH: 32 MiB
- ETH: Qualcomm Atheros QCA8075 Gigabit Switch (2 x LAN, 1 x WAN)
- USB: 1 x 3.0 (via Synopsys DesignWare DWC3 controller in the SoC)
- WLAN1: Qualcomm Atheros QCA4028 2.4GHz 802.11bgn 2:2x2
- WLAN2: Qualcomm Atheros QCA4028 5GHz 802.11a/n/ac 2:2x2
- INPUT: one reset and one WPS button
- LEDS: 3 leds: Power, WIFI(only for 2.4G currently), and one reserved
- UART: 1 x UART on PCB (3.3V, TX, RX, GND) - 115200 8N1
Installation:
Method 1:
- use serial port to stop uboot
- uboot command: run lf
Method 2:
- push down reset button and power on
- wait until three leds constantly on then release
- upgrade by uboot web at http://192.168.1.1
Note:
- the sysupgrade image need to be renamed to lede-gl-b1300.bin in both method.
- the sysupgrade image can be automatically downloaded if tftp server at
192.168.1.2 have that file.
- the wifi led will be flashing when writing image.
Signed-off-by: Dongming Han <handongming@gl-inet.com>
Instead of writing to the currently booted partition set, this
implements full dual-boot support for sysupgrade by always writing to
the other, currently inactive, partition set and toggling the dualflag
after a successful flash.
The currently active/ booted partition set is determined by parsing
/proc/cmdline for its rootfs parameter (supplied by the DTS), instead
of reading from the 0:DUAL_FLAG mtd, in order to prevent (potentially)
bricking both partition sets.
Signed-off-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
Instead of hardcoding /dev/loop0, it's safer to query for the first
free loop device and assign that dynamically. While /dev/loop0 is a
reasonable assumption immediately following "losetup --detach-all",
detaching the mounted overlay is no longer strictly necessary once
dual-boot support has been added for the nbg6817.
Signed-off-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
Harmonize the variable usage for $kernel and $rootfs to always contain
the full device path, instead of just its basename.
Signed-off-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
PHY drivers were grouped into vendor specific directories
by upstream commit 0b56e9a7e8358e59b21d8a425e463072bfae523c
Signed-off-by: Luis Araneda <luaraneda@gmail.com>
The BDFs for OpenMesh A42 were upstreamed [1] to the ath10k-firmware
repository and are now part of ath10k-firmware 2018-01-26. The
ipq-wifi-openmesh_a42 package can now be dropped because OpenWrt already
ships the QCA4019 board-2.bin from this version.
[1] https://wireless.wiki.kernel.org/en/users/drivers/ath10k/boardfiles
Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
This commit marks the CPUs switchport explicit as untagged.
Otherwise, an eth0.1 interface is created and the devices
LAN-ports are not working.
Signed-off-by: David Bauer <mail@david-bauer.net>
Some part of this patch was added to the generic patches as it was
needed also for some other target. Do not add it here any more.
Fixes: 02050f7e7d ("kernel/4.{4, 9}: add manufacturer ID for Winbond NANDs")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
The patch 0022-dts-ipq4019-support-ARMv7-PMU.patch
was merged into 4.8-rc1.
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
[refresh patches]
Signed-off-by: Mathias Kresin <dev@kresin.me>
During the integration of the ipq40xx target,
the phy drivers were included into the ipq806x's
target kernel config.
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
This patch renames the AVM FRITZ!Box 4040's board-2.bin
file and package to match the 'vendor_product' format.
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
This patch aligns the device-tree file with the latest
guidelines.
- No longer include qcom-ipq4019-ap.dk01.1.dtsi. This
file is only partially upstream and therefore subjected
to changes that might not be compatible with the board.
As a result, the definitions from the file have been
copied into this dts.
- exclusively use decimal GPIO addresses.
- reorganize the reserved-memory layout to waste less
memory. There's no point in keeping the u-boot loader
around. This should also make it possible to create
an image that will boot with the original EVA/ADAM2 loader
without needing to install the modified u-boot loader.
And finally mark the "tz-apps" as reusable.
There isn't a way to upload apps to the trust-zone in OpenWrt
yet. But it might see some use in the future as a "secure"
key-store/TPM.
- sort the first-level nodes alphabetically.
- sort nodes with an address by the address.
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
Use the first found directory in the tar archive instead of relying on
a directory named according to the userspace boardname.
It allows to change the boardname without adding another compatibility
layer to the zyxel sysupgrade.
Fixes: 33f09cf151 ("ipq806x: convert to dt-based board-detection")
Signed-off-by: Mathias Kresin <dev@kresin.me>
Picking commit from QSDK
https://source.codeaurora.org/quic/qsdk/oss/kernel/linux-msm/commit/?h=eggplant&id=a86bda9f8a7965f0cedd347a9c04800eb9f41ea3
Commit message:
"During removal of the glue layer(dwc3-of-simple), USB master reset is set to active and during insertion it is de-activated."
Change-Id: I537dc810f6cb2a46664ee674840145066432b957
Signed-off-by: Vasudevan Murugesan <vmuruges@codeaurora.org>
(cherry picked from commit 4611e13580a216812f85f0801b95442d02eeb836)"
Signed-off-by: Pavel Kubelun <be.dissent@gmail.com>
A newer clk and cpufreq drivers for ipq806x platform had been sent upstream.
A change that i have noticed is that now it's possible to set min, cur and max frequencies from sysfs (previously it was bugged and caused nothing).
Following patches are removed:
- 0036-clk-Avoid-sending-high-rates-to-downstream-clocks-du.patch - seems it was dropped from the patchset by current committer.
- 0044-clk-qcom-krait-Remove-CLK_IS_ROOT.patch - already applied to the driver itself in the corresponding patch.
- 0057-clk-qcom-Add-regmap-mux-div-clocks-support.patch - seem to be irrelevant to ipq806x.
Signed-off-by: Pavel Kubelun <be.dissent@gmail.com>
According to QSDK and OEM tarballs (checked c2600, r7500v2, r7800) 2nd pci slot (pci1, 2,4 GHz card)) on ap148 based boards should operate in gen1 mode.
EA8500 is an exception and according to GPL pcie0 should operate in gen1 mode.
In previous commit we've added the support for this option, so enable it in DT for affected devices.
QSDK ref:
https://source.codeaurora.org/quic/qsdk/oss/kernel/linux-msm/commit/?h=release/endive_preview_cc&id=f3b07fe309027c52fc163149500cedddd707c506
While at it move the phy transmit termination offset value into dtsi file as it's platform specific.
Signed-off-by: Pavel Kubelun <be.dissent@gmail.com>
In current state there's huge regression on ipq806x target that causes the device to transmit broken/malformed frames that are not corrected/detected by error control mechanisms and other less severe issues.
https://bugs.lede-project.org/index.php?do=details&task_id=1197
This finally had been narrowed down to patch 0071-pcie-qcom-fixes.patch
Meanwhile QSDK contains a handful of commits that add support for ipq806x to upstream qcom pcie driver
https://source.codeaurora.org/quic/qsdk/oss/kernel/linux-msm/log/drivers/pci/host/pcie-qcom.c?h=eggplant
Unfortunately qca developers do not bother to push it upstream.
Using those commits instead of lede 0071 patch fixes mentioned issue and probably many others as it seems that corrupted data has been originating within pcie misconfiguration.
Fixes: FS#1197 and probably others
Signed-off-by: Pavel Kubelun <be.dissent@gmail.com>
Ubifs is disabled for all boards except the evaluation boards and the
Fritz!Box 4040 anyway. According the author, the ubifs support for the
Fritz!Box 4040 wasn't enabled on purpose.
Signed-off-by: Mathias Kresin <dev@kresin.me>
Remove leftover code used for legacy images. There are no relevant
binary differences for the images after removing the legacy leftovers.
Signed-off-by: Mathias Kresin <dev@kresin.me>
Initialise the filesystem specific build command. Otherwise it will be
unintended inherit to following images and will cause a wrong image
format.
The issue is around for ages but was only recently triggered due to the
added support for the Openmesh a42.
Fixes: FS#1276
Signed-off-by: Mathias Kresin <dev@kresin.me>
* QCA IPQ401x
* 256 MB of RAM
* 32 MB of SPI NOR flash (s25fl256s1)
- 2x 15 MB available; but one of the 15 MB regions is the recovery image
* 2T2R 2.4 GHz
- QCA4019 hw1.0 (SoC)
- requires special BDF in QCA4019/hw1.0/board-2.bin with
bus=ahb,bmi-chip-id=0,bmi-board-id=16,variant=OM-A42
* 2T2R 5 GHz
- QCA4019 hw1.0 (SoC)
- requires special BDF in QCA4019/hw1.0/board-2.bin with
bus=ahb,bmi-chip-id=0,bmi-board-id=17,variant=OM-A42
* multi-color LED (controlled via red/green/blue GPIOs)
* 1x button (reset; kmod-input-gpio-keys compatible)
* external watchdog
- triggered GPIO
* 1x USB (xHCI)
* TTL pins are on board (arrow points to VCC, then follows: GND, TX, RX)
* 2x gigabit ethernet
* powered only via POE
- 802.3af POE on Ethernet 1
- 18-24v passive POE (mode B) on Ethernet 2
The tool ap51-flash (https://github.com/ap51-flash/ap51-flash) should be
used to transfer the factory image to the u-boot when the device boots up.
Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
The kernel driver gpio-wdt or the userspace tool om-watchdog can be used to
trigger external gpio watchdog chips. The gpio-wdt driver has the benefit
that it can be configured together with the rest of the device in the DTS
and better integrates in the OpenWrt via procd.
Signed-off-by: Sven Eckelmann <sven.eckelmann@openmesh.com>
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>
Use <manufacturer>_<modelname> as image name for board using the
devicetree compat string as boardname.
Signed-off-by: Luis Araneda <luaraneda@gmail.com>
This will allow to maintain the current syntax for LEDs config
when switching to a device tree compatible string boardname.
None of the current boards use a comma in the boardname, so they
will be unaffected.
Signed-off-by: Luis Araneda <luaraneda@gmail.com>
There are only artifacts for these boards in our tree and not even
partial support.
Drop teh stale files.
Signed-off-by: Mathias Kresin <dev@kresin.me>
Lantiq and IPQ806X (which includes IPQ40XX) both define the
same custom function {ipq806x|lantiq}_get_dt_led.
This patch moves the function into the base-file package at
lib/functions/leds.sh to make it more accessible for other
targets as well.
Cc: Mathias Kresin <dev@kresin.me>
Cc: John Crispin <john@phrozen.org>
Cc: Hannu Nyman <hannu.nyman@iki.fi>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
This will avoid some conflicts when doing a git rebase or merge,
specially when adding support to a new device.
Signed-off-by: Luis Araneda <luaraneda@gmail.com>
[drop brcm47xx changes which rename the images]
Signed-off-by: Mathias Kresin <dev@kresin.me>
This changes the cmdline from:
Kernel command line: root=/dev/mmcblk0p5 rootfstype=squashfs,ext4 rootwait noinitrd
Bootloader command line (ignored): board=NBG6817 root=/dev/mmcblk0p5 rootwait zld_ver=2.04 console=ttyHSL1,115200n8 mtdparts=m25p80:0xC0000(SBL)ro,0x40000(TZ)ro,0x40000(RPM)ro,0x80000(u-boot)ro,0x10000(env)ro,0x10000(ART)ro,0x10000(dualflag),0x210000(reserved)
to
Kernel command line: rootfstype=squashfs,ext4 rootwait noinitrd root=/dev/mmcblk0p5
Bootloader command line (ignored): board=NBG6817 root=/dev/mmcblk0p5 rootwait zld_ver=2.04 console=ttyHSL1,115200n8 mtdparts=m25p80:0xC0000(SBL)ro,0x40000(TZ)ro,0x40000(RPM)ro,0x80000(u-boot)ro,0x10000(env)ro,0x10000(ART)ro,0x10000(dualflag),0x210000(reserved)
As a consequence booting from the alternative dual-boot partition set
(root=/dev/mmcblk0p8) becomes possible.
Signed-off-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
AP-DK01.1-C1 is QCA dev board with:
- ipq4018 quad core ARM @716.8MHz, 2x2 dual (11n+11ac) radio
- 256MB RAM
- 32MB SPI flash
- QCA8075 multiport ethernet phy (WAN port, 4x LAN ports)
First installation via u-boot:
sf probe
sf erase 0x180000 0x1a00000
tftpboot 0x84000000 lede-ipq806x-AP-DK01.1-C1-squashfs-sysupgrade.bin
sf write 0x84000000 0x180000 $filesize
Further upgrades via sysupgrade.
Changes:
- add partitions
- set memory size to 256MB
- add reserved memory mapping
- add correct compatible string
- add image generation
- extract pre-cal data from ART partition
Compile and run tested.
Wirespeed NAT can be achieved with spreading rx interrupts over different
cores. Wifi speed is ~550Mbps @5GHz in open air.
Note:
AP-DK01.1-C1 is fully compatible with AP-DK01.2-C1, which has
ipq4028 instead of ipq4018 on board.
Changes since v2:
- based on dts(i) rework/cleanup submitted:
http://lists.infradead.org/pipermail/lede-dev/2017-October/009596.html
- precise reserved memory mapping
- more precise description
- compatible string
Signed-off-by: Roman Yeryomin <roman@advem.lv>
Supported frequencies of all ipq40xx chips are 48, 200, 500 and 716.8 MHz.
Previous 666MHz setting was most likely related to instability of early
chips/boards made before mass production.
Signed-off-by: Roman Yeryomin <roman@advem.lv>