This patch cleans and reworks the WNDR4700 dts to increase the
now combined dtb+kernel partition to 3.5 MiB. This has become
necessary due to the switch to GCC 7.3 and the ever increasing
kernel binary size.
The dtb+kernel partition was combined in order to finally
fix the problem with out-of-sync device-trees. From now
on, the kernel and device-tree will always be updated together.
Upgrade Note:
Existing installations will have to use the TFTP firmware
recovery option in order to install the update. Affected users
are advised to make a backup of their existing configuration
prior to running sysupgrade:
<https://openwrt.org/docs/guide-user/installation/generic.backup#backup_openwrt_configuration>
Due to the repartitioning of the NAND, the generated backup
should be placed on either the internal HDD, an attached
USB-Stick or on another PC (externally).
To manually trigger the firmware recovery, the reset button has
to be pressed (and hold) during boot. U-boot will enter the "Upgrade
Mode" and starts a tftpserver listening on 192.168.1.1 for a
tftp client from one of the four LAN/Ethernet ports to connect and
upload the new system: (enable tftp binary mode!).
openwrt-apm821xx-nand-netgear_wndr4700-squashfs-factory.img
Cc: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
The recent change to switch to gcc 7.3 broke the image
generation code, as the kernel would no longer fit into
KERNEL_SIZE.
This patch fixes the issue by reworking the initramfs
creation and packaging, which will get rid of the
KERNEL_SIZE check in the process.
This new initramfs can be loaded through the MR24 U-boot
in the following way:
=> setenv ipaddr 192.168.1.1
=> setenv bootargs console=ttyS0,$baudrate
=> tftpboot c00000 192.168.1.2:meraki_mr24-initramfs-kernel.bin
[...]
Load address: 0xc00000
Loading: ################################################ [...]
done
Bytes transferred = 5952544 (5ad420 hex)
=> bootm $fileaddr
\## Booting kernel from Legacy Image at 00c00000 ...
...
For more information and the latest flashing guide:
please visit the OpenWrt Wiki Page for the MR24:
<https://openwrt.org/toh/meraki/mr24#flashing>
Cc: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
Signed-off-by: Chris Blake <chrisrblake93@gmail.com>
There are few symbol changes but only 3 symbols were possible to set:
THERMAL_EMERGENCY_POWEROFF_DELAY_MS
CLK_BCM_SR
PHY_NS2_USB_DRD
Both new drivers don't seem to apply to Northstar so they are disabled.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Right patch version this time, sorry!
* Patch 180-usb-xhci-add-support-for-performing-fake-doorbell.patch had to be adjusted slightly because of upstream adapted code.
* Refreshed patches.
Compile-tested: ramips/mt7621, x86/64
Run-tested: ramips/mt7621, x86/64
Signed-off-by: Stijn Segers <foss@volatilesystems.org>
Tested-by: Rosen Penev <rosenp@gmail.com>
During upstreaming the intel phy driver, support for the vr9 v1.1
embedded phys got lost. Backport the upstream send patch adding support
for the vr9 v1.1 embbeded phys to the driver.
Signed-off-by: Mathias Kresin <dev@kresin.me>
cosmetic fixes
Signed-off-by: Mathias Kresin <dev@kresin.me>
WHR-G300N has 5 ethernet ports (lan: 4, wan: 1), but there was no
correct configuration in 02_network script and 6 ports was configured
on the switch.
Also, since the MAC address was not acquired from factory partition,
incorrect values was set to LAN and WAN interfaces.
This commit fixes these issues.
Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
The APPSBL and anything after that it not allowed to touch some of the
memory regions which are used by other components. Still trying to write to
the memory can lead to sudden device restarts
(IPQ40xx) # mw 87e80000 0
data abort
pc : [<873149f8>] lr : [<87308578>]
sp : 86edfc28 ip : 86ef4412 fp : 00000000
r10: 00000000 r9 : 00000000 r8 : 86edff68
r7 : 00000003 r6 : 8737e624 r5 : 86ef4420 r4 : 8736c154
r3 : 00000000 r2 : 00000010 r1 : 00000000 r0 : 00000000
Flags: nZCv IRQs off FIQs off Mode SVC_32
Resetting CPU ...
The device manufacturer only provided a very rough list of regions:
* rsvd1: 0x87000000 0x500000
* wifi_dump: 0x87500000 0x600000
* rsvd2: 0x87b00000 0x500000
A more detailed list for devices using the AP.DK reference design memory
maps was provided by Roman Yeryomin <roman@advem.lv> in commit 56f2df879fd
("ipq806x: ipq4019: add ap-dk01.1-c1 board support"):
* apps_bl: 0x87000000 0x400000
* sbl: 0x87400000 0x100000
* cnss_debug: 0x87500000 0x600000
* cpu_context_dump: 0x87b00000 0x080000
* tz_apps: 0x87b80000 0x280000
* smem: 0x87e00000 0x080000
* tz: 0x87e80000 0x180000
The u-boot function ipq_fdt_mem_rsvd_fixup seems to suggest that only the
rsvd2 (tz_apps, smem, tz) should be protected. All other regions would have
been removed by it when CONFIG_QCA_APPSBL_DLOAD is not enabled. This allows
to reduce the 16MB reserved memory region to only 4.5MB.
Signed-off-by: Sven Eckelmann <sven.eckelmann@openmesh.com>
The APPSBL and anything after that it not allowed to touch some of the
memory regions which are used by other components. Still trying to write to
the memory can lead to sudden device restarts
(IPQ40xx) # mw 87e80000 0
data abort
pc : [<873149f8>] lr : [<87308578>]
sp : 86edfc28 ip : 86ef4412 fp : 00000000
r10: 00000000 r9 : 00000000 r8 : 86edff68
r7 : 00000003 r6 : 8737e624 r5 : 86ef4420 r4 : 8736c154
r3 : 00000000 r2 : 00000010 r1 : 00000000 r0 : 00000000
Flags: nZCv IRQs off FIQs off Mode SVC_32
Resetting CPU ...
The device manufacturer only provided a very rough list of regions:
* rsvd1: 0x87000000 0x500000
* wifi_dump: 0x87500000 0x600000
* rsvd2: 0x87b00000 0x500000
A more detailed list for devices using the AP.DK reference design memory
maps was provided by Roman Yeryomin <roman@advem.lv> in commit 56f2df879fd
("ipq806x: ipq4019: add ap-dk01.1-c1 board support"):
* apps_bl: 0x87000000 0x400000
* sbl: 0x87400000 0x100000
* cnss_debug: 0x87500000 0x600000
* cpu_context_dump: 0x87b00000 0x080000
* tz_apps: 0x87b80000 0x280000
* smem: 0x87e00000 0x080000
* tz: 0x87e80000 0x180000
The u-boot function ipq_fdt_mem_rsvd_fixup seems to suggest that only the
rsvd2 (tz_apps, smem, tz) should be protected. All other regions would have
been removed by it when CONFIG_QCA_APPSBL_DLOAD is not enabled. This allows
to reduce the 16MB reserved memory region to only 4.5MB.
Signed-off-by: Sven Eckelmann <sven.eckelmann@openmesh.com>
There is currently no code to read the phy reset gpios for the ethernet
PHY. It would also have been better to use the more common name
"phy-reset-gpios" for this property.
Signed-off-by: Sven Eckelmann <sven@narfation.org>
The AVM Fritz!Box 4040 uses an IPQ4018 as SoC and not an IPQ4019. The DTS
must be adjusted to reflect this.
Signed-off-by: Sven Eckelmann <sven@narfation.org>
The GPIO configuration in the DTS have as third parameter the active
low/high configuration. This parameter is not easy to parse by humans when
it is only set to 0/1. It is better to use the predefined constants
GPIO_ACTIVE_HIGH and GPIO_ACTIVE_LOW.
Signed-off-by: Sven Eckelmann <sven.eckelmann@openmesh.com>
The "Devicetree Specification, Release v0.2 - 2.3.4 status" [1] only allows
the "okay" value for an operational device. The "ok" value will be accepted
by the kernel but should be avoided.
Signed-off-by: Sven Eckelmann <sven.eckelmann@openmesh.com>
The OpenMesh A42 will use the default config entry in the FIT when no other
on is found but prefers the config@om.a42. This only becomes relevant when
a Multi-FIT image is prepared for this device.
Signed-off-by: Sven Eckelmann <sven.eckelmann@openmesh.com>
This fixes:
drivers/net/phy/b53/b53_priv.h:325:2: error: enumeration value '<board>' not handled in switch [-Werror=switch]
errors.
Fixes: 0de2213eea ("kernel: b53: look for NVRAM's "robo_reset" entry on every platform")
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Since kernel 4.1 bcm47xx_nvram_gpio_pin() is now defined in a global
header and can be safely called even on non-Broadcom platforms.
This change makes b53 look for "robo_reset" on ARCH_BCM_5301X and
slightly simplifies the code.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
The chosen dts configuration linux,initrd-* gives an error message
on bootup of kirkwood-iconnect. Since initramfs/initrd is not used
remove these options from the dts.
Reported-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
Tested-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
Signed-off-by: Paul Wassi <p.wassi@gmx.at>
Add patches for 4.14, undoing upstream changes for Linksys devices
regarding DSA. Instead, the switchdev driver marvell,88e6171 is used.
Tested-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
Tested-by: Alberto Bursi <alberto.bursi@outlook.it>
Signed-off-by: Paul Wassi <p.wassi@gmx.at>
A regression seriously affecting the Linksys WRT1900ACv1 (Mamba) was
introduced some time between the OpenWrt/LEDE v4.4 and v4.9 kernels.
The root cause has not yet been identified, despite many attempts for
more than a year. Disabling the SoC specific CPU idle support should
mitigate this issue.
The symptoms on an affected system are unwanted reboots at a variable
frequency. In many cases almost immediately after boot, causing a
bootloop. This effectively disables support for Mamba on OpenWrt
with kernels > v4.4.
Signed-off-by: Felix Fietkau <nbd@nbd.name>
The latest bootloader versions load the firmware into memory and call
`chk_dniimg` (defined in Netgear GPL release), which expects to find
three consecutive block-aligned uImages. Add two fake uImage headers
after the kernel to fool this check.
This wastes up to 128k of space for alignment. The alternative would be
to put the rootfs in a second uImage, but this would limit the firmware
size to 0x710000 (the number of bytes loaded and verified by the
bootloader) instead of 0x7b0000 (the size of the firmware partition).
Signed-off-by: Thomas Nixon <tom@tomn.co.uk>
TP-Link TL-WR902AC v3 is a pocket-size dual-band (AC750) router
based on MediaTek MT7628N + MT7650E.
Specification:
- MediaTek MT7628N/N (580 Mhz)
- 64 MB of RAM
- 8 MB of FLASH
- 2T2R 2.4 GHz and 1T1R 5 GHz
- 1x 10/100 Mbps Ethernet
* MT7650 ac chip isn't not supported by LEDE/OpenWrt at the moment.
Therefore 5Ghz won' work.
Flash instruction:
The only way to flash LEDE image in TL-WR902AC v3 is to use
tftp recovery mode in U-Boot:
1. Configure PC with static IP 192.168.0.66/24 and tftp server.
2. Rename "openwrt-ramips-mt76x8-tplink_tl-wr902ac-v3-squashfs-tftp-recovery.bin"
to "tp_recovery.bin" and place it in tftp server directory.
3. Connect PC with the LAN port, press the reset button, power up
the router and keep button pressed for around 6-7 seconds, until
device starts downloading the file.
4. Router will download file from server, write it to flash and reboot.
Signed-off-by: Peter Lundkvist <peter.lundkvist@gmail.com>
[drop p2led_an pinmux, this pin isn't used as gpio, fix whitespace issues]
Signed-off-by: Mathias Kresin <dev@kresin.me>
The DWR-116-A1/2 Wireless Router is based on the MT7620N SoC.
Specification:
MediaTek MT7620N (580 Mhz)
32 MB of RAM
8 MB of FLASH
802.11bgn radio
5x 10/100 Mbps Ethernet (1 WAN and 4 LAN)
2x external, non-detachable antennas
UART (J1 in A1, JP1 in A2) header on PCB (57600 8n1)
6x LED (GPIO-controlled), 2x button
JBOOT bootloader
Known issues:
WAN LED is drived by uartl tx pin. I decide to use this pin as
uartlite tx pin.
Installation:
Apply factory image via http web-gui.
Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
The internal RTC does not work correctly on these Linksys boards based
on Marvell SoCs. It is off by 3 minutes in 10 minutes running, this
was reported by multiple users. On the Linksys Mamba device the device
tree comment says that no crystal is connected to the internal RTC, this
is probably also true for the other devices.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Some boards like the Turris Omnia have an RTC chip that does not get
initialized. Initializing the RTC at the driver level helps get rid of
bootloader hacks that write special register values.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
The patch breaks LED operation and has already been reverted in 4.4.121.
4.9.87 is still affected; revert it locally until the issue is sorted out
upstream.
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
The deletion of the mdio node childs was meant for testing and were
committed accidentally. Without the mdio nodes the network isn't
initialised.
While at it, remove the orphaned qcom-ipq4019-gl-b1300.dts as well.
Fixes: FS#1439
Signed-off-by: Mathias Kresin <dev@kresin.me>
* QCA IPQ4028
* 256 MB of RAM
* 32 MB of SPI NOR flash (mx25l25635e)
* 128 MB of SPI NAND flash (gd5f1gq4ucy1g)
* 2T2R 2.4 GHz
- QCA4019 hw1.0 (SoC)
- uses AP-DK03 BDF from QCA4019/hw1.0/board-2.bin
* 2T2R 5 GHz
- QCA4019 hw1.0 (SoC)
- uses AP-DK03 BDF from QCA4019/hw1.0/board-2.bin
* 2 fully software controllable GPIO-LEDs
* 2 additional GPIO-LEDs which also affect the SIM card detection
* 1x button (reset)
* 1x GPIO buzzer
* 1x USB (xHCI)
* 1x NGFF (USB-only with Dual-SIM support, untested)
* TTL pins are on board (R124 is next to GND, then follows: RX, TX, VCC)
* 2x gigabit ethernet
- phy@mdio4:
+ Manual: Ethernet port 0
+ gmac0 (ethaddr) in original firmware
+ 802.3af POE (HV version)
+ 24v passive POE (LV version)
- phy@mdio3:
+ Manual: Ethernet port 1
+ gmac1 (eth1addr) in original firmware
* DC Jack connector
+ 24-56V (HV version)
+ 12-24V (LV version)
The SPI NAND flash isn't supported at the moment.
The bootloader has to be updated before OpenWrt is installed to fix a
reboot problem. The nor-ipq40xx-single.img from
https://downloads.compex.com.sg/?dir=uploads/QSDK/QCA-Reference/WPJ428/b170123-IPQ40xx-Reference-Firmware
has to be downloaded and the transfered in u-boot via TFTP
set ipaddr 192.168.1.11
set serverip 192.168.1.10
ping ${serverip}
tftpboot 0x84000000 nor-ipq40xx-single.img
imgaddr=0x84000000 && source $imgaddr:script
The sysupgrade image can be installed directly on flash using u-boot:
sf probe
tftpboot 0x84000000 openwrt-ipq40xx-compex_wpj428-squashfs-sysupgrade.bin
sf erase 0x00180000 +$filesize
sf write 0x84000000 0x00180000 $filesize
bootipq
The initramfs image can be started using
tftpboot 0x82000000 openwrt-ipq40xx-compex_wpj428-initramfs-fit-uImage.itb
set fdt_high 0x83000000
bootm 0x82000000
The used SIM card slot can be changed using
# slot 1 (also enables orange LED)
echo 1 > /sys/class/gpio/gpio3/value
# slot 2
echo 0 > /sys/class/gpio/gpio3/value
It can be checked whether a SIM card is inserted in the current slot and
the red LED is subsequently on via:
echo 2 > /sys/class/gpio/export
cat /sys/class/gpio/gpio2/value
Signed-off-by: Sven Eckelmann <sven@narfation.org>
There are 2 ethernet ports on Nexx WT1520 and WT3020. These ethernet
ports are assigned as follows, and other ports cannot be used.
- WT1520:
- port0 -> lan
- port4 -> wan
- WT3020:
- port0 -> wan
- port4 -> lan
I dropped ports that cannot be used.
Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Hardware highlights:
- SoC: Qualcomm Atheros IPQ8064/5 ARM Dual Core CPU
- RAM: (512MB or 1GB) DDR3 System Memory
- Storage: 32MB NOR (Cypress S25FL256S1)
256MB NAND (Micron MT29F2G08ABBEAH4)
- Ethernet: 5 x 1G via QCA8337N
- USB: 1 x USB 2.0/3.0 + 1 x USB 2.0 on mini PCIe3 socket
- PCIe: 3x mini PCIe (third mini PCIE3 is PCIe/USB shared)
- SIM Card Slot: 2 x Slot
- Buttons: Reset Button
- LEDs: 18x, 8x GPIO controllable
- Buzzer
The correct amount of RAM will be passed by the bootloader.
In contrast to the documentation provided by Compex, the third PCIe
doesn't use GPIO16 for PERST. Instead, GPIO3 is shared and used as PERST
for PCIe0 and PCIe2.
So far, no one was able to get USB 3.0 working with the 1GB RAM version,
while it works fine for my 512MB version. Since USB 3.0 doesn't work with
the Compex firmware for the 1G variant either, it could be a hardware
issue with these boards.
OpenWrt will be installed to the NAND flash. Make sure to have a full
working image on the NOR flash. It will be the backup in case anything
goes wrong.
It has been observed that an image loaded via tftpboot might have
bitflips. Hence the extra step to create a crc32 checksum to allow to
compare the checksum with the one from the source file prior to flashing.
In all cases it is necessary to set the following u-boot parameter to an
empty (whitespace) value, to ensure that the chosen bootargs of the dts
isn't overwritten or set to bogus - not working - values:
(IPQ) # set bootargs " "
(IPQ) # set fsbootargs " "
(IPQ) # saveenv
The sysupgrade image can be installed directly on flash using u-boot (put
jumper in JP13 (leave JP9 open) to boot from nand):
(IPQ) # set serverip 192.168.1.20
(IPQ) # set ipaddr 192.168.1.1
(IPQ) # tftpboot 0x42000000 openwrt-ipq806x-compex_wpq864-squashfs-nand-factory.bin
(IPQ) # crc32 0x42000000 $filesize
(IPQ) # nand erase 0x1340000 0x4000000
(IPQ) # nand write 0x42000000 0x1340000 $filesize
The initramfs image can be started using:
(IPQ) # set fdt_high 0x48000000
(IPQ) # tftpboot 0x44000000 openwrt-ipq806x-compex_wpq864-initramfs-fit-uImage.itb
(IPQ) # bootm 0x44000000
Signed-off-by: Christian Mehlis <christian@m3hlis.de>
Signed-off-by: Mathias Kresin <dev@kresin.me>
Initialise the UBOOT variable by default. Otherwise it will be
unintended inherit to following images if set and causes an uboot build
where not required.
Signed-off-by: Mathias Kresin <dev@kresin.me>