Always enable built-in 2.5G PHY on MT7988 for now, so that it can be
used. In future it would be nice to be able to switch power and MDIO
access via address 0 at run-time in Linux, both, to be able to use
external PHYs at address 0 and to reduce power consumption on systems
not using the built-in 2.5G PHY.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
The U-Boot build for the MT7988 reference board booting from SD card
wrongly depended on the 'ddr4' variant of the ARM TrustedFirmware-A build
even though the 'comb' variant is used. Fix that dependency.
Fixes: 572ea68070 ("uboot-mediatek: add patches for MT7988 and builds for RFB")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Changes from version 4.2.0 to version 4.2.1:
- Bug fixes (see <https://www.mpfr.org/mpfr-4.2.0/#fixed> and/or the
ChangeLog file).
- Improved MPFR manual.
- Configure tests: replaced the test of the link with GMP, in order to
avoid the use of a function without a prototype (Autoconf issue), as
this is obsolescent in ISO C. The new test should be more robust.
Signed-off-by: Linhui Liu <liulinhui36@gmail.com>
When adapting the network configuration for MT7988 RFB a stray quote
was left in a script. Remove it to fix generating the default network
configuration.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Import commits from upstream Linux replacing some downstream patches.
Move accepted patches from pending-{5.15,6.1} to backport-{5.15,6.1}.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Some recent models of the Ubiquiti Networks UniFi 6 LR access point
come with a RealTek RTL8211FS 1000M/100M/10M PHY instead of the
Aquantia AQR112 2500M/1000M/100M/10M PHY used in both v1 and v2. Add
build for this variant so we can support Ethernet with the PHY.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
While the v2 is nearly identical to v1, v3 uses a different PHY and
needs a different build for Ethernet to work in U-Boot.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Switch to OpenWrt uImage.FIT bootmethod and include various bootloader
artifacts with the generated binaries.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Select many potentially useful options for the MT7988 RFB U-Boot builds.
The resulting loader is intended as a development tool and intends to be
generic. It does *not* have a default bootcmd set, but allows to boot
pretty much everything, including EFI executables.
To install this U-Boot build to the eMMC:
opkg install mmc-utils partx-utils
mmc bootpart enable 1 1 /dev/mmcblk0
echo 0 > /sys/block/mmcblk0boot0/force_ro
dd if=*mediatek_mt7988a-rfb-nand-emmc-preloader.bin of=/dev/mmcblk0boot0
dd if=*mediatek_mt7988a-rfb-nand-emmc-gpt.bin of=/dev/mmcblk0
partx -a /dev/mmcblk0
dd if=*mediatek_mt7988a-rfb-nand-emmc-bl31-uboot.fip of=/dev/mmcblk0p3
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Set correct pull-type data and add additional uart groups for MT7981.
Assign functions to configure pin bias for MT7986.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Using the I2C host controller on the MT7981 SoC requires 4 clocks to
be enabled. One of them, the pmic clk, is only enabled in case
'mediatek,have-pmic' is also set which has other consequences which
are not desired in this case.
Allow defining a pmic clk even in case the 'mediatek,have-pmic' propterty
is not present and the bus is not used to connect to a pmic, but may
still require to enable the pmic clock.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
The patch was wrongly tagged as being part of Linux 6.0 even though it
was only committed with Linux 6.2 and hence needs to be backported for
Linux 6.1.
Fixes: fa79baf4a6 ("generic: copy backport, hack, pending patch and config from 5.15 to 6.1")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Unfortunately some device tree properties have slipped under the table
when switching from our downstream device tree.
Bring back 3W power for SFP cages and restore thermal trip points to
make sense again.
Fixes: 7a0ec001ff ("mediatek: sync MT7986 device trees with upstream")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
The DIR-890L is very similar to DIR-885L, but has both USB2
and USB3. The signature for the wrgac36 board was copied from
DD-Wrt.
The DIR-890L bootstrap will only load the first 2 MB after
the SEAMA header in the NAND flash, uncompress it with LZMA
and execute it. Since the compressed kernel will not fit in
2 MB we have a problem. Solve this by putting a LZMA
compressed U-Boot into the first 128 KB of the flash
followed by the kernel. The bootstrap will then uncompress
and execute U-Boot and then we let U-Boot read the kernel
from flash and execute it.
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
One of our SPI devices references this node, but we never enabled it.
This clutters up probe deferral logs.
(NB: this SPI device still doesn't have a real driver, so it's just here
for documentation and/or tinkering.)
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
The qcom spm driver is currently broken for IPQ8064 OnHub devices on
kernel 6.1, such that it hangs the system when booting, much to the
consternation of users. This is especially bad as these devices don't
yet have a fully-supported release branch, and are still sometimes
landing on snapshot builds.
OnHub devices have their own kernel config, so it's not that wide of an
impact to disable this.
I haven't fully gotten to the bottom of this, but:
(a) The vendor kernel didn't have any SPM driver at all, and didn't
utilize cpuidle.
(b) The device tree has never included any (non-disabled) cpuidle
states, so even when this driver was present on 5.15 (last
known-working kernel), it didn't actually do anything -- it bailed
early, before ever doing any SPM initialization.
(c) Refactoring in Linux 5.16 [1] caused the SPM driver to be activated
unconditionally, including setting us into standby mode
(PM_SLEEP_MODE_STBY) by default.
Removing the one PM_SLEEP_MODE_STBY line from drivers/soc/qcom/spm.c
seems to fix the problem, but that isn't much different than simply
disabling the driver, so I go with that for now.
I also disable CONFIG_ARM_QCOM_SPM_CPUIDLE, becuase it 'select's
QCOM_SPM.
NB: it's possible there's some other deeper root cause involved in here.
For one, I notice that CPU hotplug (e.g., echo 0 >
/sys/devices/system/cpu/cpu1/online, echo 1 > ...) doesn't work right
either. Perhaps there's some mismatch on upstream Linux qcom-scm
behavior and the old boot firmware used for these systems? It wouldn't
be the first time, as we've had some similar incompatibilities on the
next generation of these devices, Google WiFi [2].
[1] Commit 60f3692b5f0b ("cpuidle: qcom_spm: Detach state machine from
main SPM handling")
[2] [RFC] qcom_scm: IPQ4019 firmware does not support atomic API?
https://lore.kernel.org/linux-arm-kernel/20200913201608.GA3162100@bDebian/
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
This add support for PINE64 ROCK64, rockchip rk3328 board.
Specifications:
4 x ARM Cortex A53 cores @ 1.5 GHz
ARM Mali 450 MP2 GPU
LPDDR3 RAM (up to 4GB)
Gigabit Ethernet
Micro SD Slot
eMMC module slot
SPI Flash 128Mbit
4K digital video out
2x USB 2.0 Host
1x USB 3.0 Host
PI-2 bus
PI-P5+ bus
IR R/X port
Real Time Clock (RTC) port
Power Over Ethernet (POE) (when using optional HAT module)
A/V jack
Power, Reset and Recovery buttons
3.5mm barrel power (5V 3A) port
To install write image to the sd using dd (dd if=*.img of=/*)
Signed-off-by: Antonio Flores <antflores627@gmail.com>
The DRA-1360 rev A is a wall-plug AC1300 repeater.
Hardware is identical (same FCC ID, black case instead of white)
to D-Link DAP-1620 rev B, which is already supported, but a
different model name, revision, and hardware ID are needed.
Thus, the bulk of the DAP-1620 device tree is extracted to a
common dtsi included by the two models' device trees.
Repeating specs and installation instructions from e4c7703:
(note that the RAM size mentioned there was incorrect, oops)
Specs:
- SoC: MT7621AT (880MHz dual-core MIPS1004Kc)
- Memory: 128 MiB RAM, 16 MiB NOR SPI
- WiFi: MT7615DN 2x2 802.11n + 2x2 802.11ac (DBDC)
- Ethernet: 1 RJ45 port 10/100/1000
- Power/status LED: red+green
- LED RSSI bargraph: 2x green, 1x red+green
Installation:
- Keep reset button pressed during plug-in
- Web Recovery Updater is at 192.168.0.50
(pings are ignored, it listens only for http)
- Upload factory.bin, confirm flashing
(seems to work best with Chromium-based browsers)
Revert to OEM firmware:
- tail -c+117 DRA1360A1_FW112B03.bin | \
openssl aes-256-cbc -d -md md5 -out decrypted.bin \
-k c471706398cb147c6619f8a04a18d53e9c17ede8
- flash decrypted.bin via D-Link Web Recovery
Signed-off-by: Rani Hod <rani.hod@gmail.com>
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.1.48
No patches changed in this bump, only update was to checksum.
Build system: x86/64
Build-tested: x86/64/AMD Cezanne, filogic/xiaomi_redmi-router-ax6000-ubootmod
Run-tested: x86/64/AMD Cezanne, filogic/xiaomi_redmi-router-ax6000-ubootmod
Signed-off-by: John Audia <therealgraysky@proton.me>
The MAC address of the GMAC is contained inside the CWMP-Account
number on the label.
The label MAC address alias was defined previously, but it has been
removed with the switch to IPQESS / DSA.
Restore the label MAC address alias.
Fixes: 27b441cbaf ("ipq40xx: drop ESSEDMA + AR40xx DTS nodes")
Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Robert Marko <robimarko@gmail.com>
Compile-tested: all boards
Runtime-tested:
- Cortex-A8: pcDuino
- Cortex-A7: Bananapro, Bananapi M3
- Cortex-A53:Pine64+
Notes:
- binman tries to add firmware for the SCP (system control processor), which
we don't build, and is optional for the boot process on 64-bit. Disable this
via setting the SCP envvar to /dev/null. For further info, see [1] .
[1] https://github.com/u-boot/u-boot/blob/master/board/sunxi/README.sunxi64
Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
vhost-net is used to accelerate traffic to virtualisation
guests that use the virtio-net network card in QEMU.
Generally it is invoked by specifying "vhost=on" to a
QEMU -netdev device:
qemu-system-aarch64 -nographic -M virt -cpu host \
--enable-kvm -bios u-boot.bin -smp 1 -m 2048 \
-drive file=openwrt-armsr-armv8.img,format=raw,index=0,media=disk \
-device "virtio-net,netdev=landev,disable-legacy=off,disable-modern=off" \
-netdev "tap,id=landev,helper=/usr/lib/qemu-bridge-helper --br=br-lan,vhost=on"
Signed-off-by: Mathew McBride <matt@traverse.com.au>
Now that most cases do the same thing in SetupHostCommand, merge them
together into one. To allow moving the generic symlink check, invert the
check and let it check for relative links by matching on link targets
that do not start with a slash.
This then allows us to also drop the absolute link case, shortening the
case statement further.
This reorders the check to
* if it is not a symlink, do not change it
* if it is a symlink and it points to the found command, do not change it
* if it is a symlink with a relative path, do not change it
* else, update/replace it
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
To avoid replacing host built binaries with symlinks again, a check for
an appropriate stamp was added in 729909c07f ("prereq-build: do not
replace binaries with symlinks"). Unfortunately the stamp directory does
not exist in the SDK, so the fix was ineffective there.
This caused the packages builders to e.g. use the host tar again, which
in turn made the tarballs created different since it may lack
reproducibility fixes, or implement these differently, causing spurious
hash failures on source repository based packages.
Fix this by dropping the stamp dir check, and just check that the file
is usable.
Fixes: 729909c07f ("prereq-build: do not replace binaries with symlinks")
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
We have to move to use git clone as there are no newer tagged releases.
Changes:
604f8f5 Default CROSS_CM3 to arm-none-eabi- instead of armv7m-softfloat-eabi-
b9b9419 Tidy up license information
0290b2c wtmi: Fix typo
a10b8e9 Makefile: fix a53-firmware.bin generation (maximum size is not optimal)
f654082 wtmi: Add const qualifier to isr_vector
4a43a3b wtmi: Improve detection of ESPRESSObin boards with Topaz
189e629 wtmi: Improve detection of boards with insufficient MDIO pull-up
3dac4fe wtmi: Fix detection of Armada 3720 Devel Board
3ca4dfa Bump mox-imager commit
Signed-off-by: Robert Marko <robert.marko@sartura.hr>
Changes:
1de442d Convert floating point operations to integer operations
ce6770d Modify mv_ddr4_calibration_validate function body to match function header
Signed-off-by: Robert Marko <robert.marko@sartura.hr>
Changes:
a3e1c67 wtmi: Fix linker output sections
f65e3bf wtmi: Remove usage of non-existant string.h file and memcpy() function
Signed-off-by: Robert Marko <robert.marko@sartura.hr>
Recent envtools update to 2023.07.02 has introduced a breakage when trying
to parallel build with the following error:
/bin/sh: line 1: scripts/basic/fixdep: No such file or directory
Luckily it can easily be reproduced locally via a simple script so it was
not hard to bisect it down to upstream commit [1].
However, its not that commits fault, it just uncovered an issue with the
way we have been building envtools for a long time, maybe even from the
package introduction.
The issue is that we are trying to build envtools as one of the U-Boot
no-dot-config-targets but envtools was newer a valid target for it but
since we were creating the config headers that were not actually used it
was actually building all this time.
Since the blamed commit [1] a tool called printinitialenv is built and
now a proper config is actually required in order for prerequisites to
get built properly.
So, in order to properly fix this (Hopefully for good) lets stop pretending
that envtools are a valid no-dot-config-targets target and use the
tools-only defconfig which is meant exactly for just building the tools.
This will make a minimal config for the U-Boot sandbox target and then
envtools will build just fine in parallel mode (I tested with 32 threads).
We do hovewer need to override the ARCH passed by OpenWrt and set it to
sandbox as otherwise U-Boot will not find the required headers because the
ARCH is being overriden to an incorrect one.
[1] 40b77f2a3a
Fixes: 9db0330052 ("uboot-envtools: update to 2023.07.02")
Signed-off-by: Robert Marko <robert.marko@sartura.hr>
Don't skip remapping of the UBI area for the ZyXEL NWA50AX Pro. This is
due to the kernel being loaded from the UBI partition by U-Boot.
Link: https://github.com/openwrt/openwrt/pull/13335
Signed-off-by: David Bauer <mail@david-bauer.net>
WED requires a bunch of additional reserved memory regions. As U-Boot's
LMB allocator defaults to a maximum of only 8 regions, this currently
makes using WED impossible.
Raise LMB_MAX_REGIONS to 64 just like for all other MediaTek boards
with a SoC supporting WED.
Fixes: 572ea68070 ("uboot-mediatek: add patches for MT7988 and builds for RFB")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
From the Netgear u-boot GPL code[1]. Bootloader always unconditionally
marks block 768, 1020 - 1023 as bad blocks on each boot. This may lead
to conflicts with the OpenWrt nand driver since these blocks may be good
blocks. In this case, U-boot will override the oob of these blocks so
that break the ubi volume. The system will be damaged after first reboot.
To avoid this issue, manually skip these blocks by using "mtd-concat".
[1] https://www.downloads.netgear.com/files/GPL/EX7300v2series-V1.0.0.146_gpl_src.tar.bz2.zip
Fixes: https://github.com/openwrt/openwrt/issues/8878
Tested-by: Yousaf <yousaf465@gmail.com>
Signed-off-by: Shiji Yang <yangshiji66@qq.com>
In Netgear u-boot GPL code, nand devices uses this formula to locate the
rootfs offset.
offset = (((128 + KERNEL_SIZE) / BLOCK_SIZE) + 1) * BLOCK_SIZE;
Howerver, WNDR4500 source code incorrectly define the nand block size to
64k. In some cases, it causes u-boot can't get the correct rootfs offset,
which result in boot failure. This patch workaround it by padding kernel
size to (128k * n - 128 - 1). The additional char '\0' is used to ensure
the (128 + KERNEL_SIZE) can't be divided by the BLOCK_SIZE.
Fixes: https://github.com/openwrt/openwrt/issues/13050
Fixes: 3c1512a25d ("ath79: optimize the firmware recipe for Netgear NAND devices")
Tested-by: Yousaf <yousaf465@gmail.com>
Signed-off-by: Shiji Yang <yangshiji66@qq.com>