Commit Graph

251 Commits (5c617aec051de5c9dc788d592931a673d58b053d)

Author SHA1 Message Date
Hannu Nyman 3f9eadf599 ipq806x: support independent core clocks in cpufreq with kernel 4.9+
Add back support for the independent_clocks definition that has been
removed between kernel 4.4 and 4.9 by upstream commits
eb96924acddc709db58221c210ca05cd9effb1df and
e86eee6bc2aaa6b3637f6497b26beee09a91bde9

* extend the new cpufreq_dt_platform_data definition in cpufreq-dt.h
* revert the removal of its usage in cpufreq-dt.c
* use new cpufreq-dt.h in qcom-cpufreq.c

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
7 years ago
Pavel Kubelun ef4ca01d6f ipq806x: route gpio interrupts to APPS processor through scm firmware
For IPQ806x targets, TZ protects the registers that are used to
configure the routing of interrupts to a target processor.
To resolve this, this patch uses scm call to route GPIO interrupts
to application processor. Also the scm call interface is changed.

Signed-off-by: Pavel Kubelun <be.dissent@gmail.com>
7 years ago
Pavel Kubelun 0d89650db1 ipq806x: remove scm firmware clocks
At the moment as a workaround definition for scm firmware in DT is used as if it is
apq8064 board. This leads to incomplete scm firmware initialization and as a result
cpuidle driver fails to configure.

By design unlike other qcom boards ipq do not use clocks to connect to scm.

Considering this we're removing from DT and scm driver clocks for ipq boards.

As a result cpuidle does not produce errors about failed configuration anymore.

Signed-off-by: Pavel Kubelun <be.dissent@gmail.com>
7 years ago
Felix Fietkau 894ee9510b ipq806x: fix ethernet DMA parameters with linux 4.9
Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Felix Fietkau 7ffaf71d53 ipq806x: fix pcie with linux 4.9
Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Felix Fietkau 5267ff2b6a ipq806x: re-enable the RAM clock for gcc on 4.9
Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Felix Fietkau 2029167b56 ipq806x: fix crash on 4.9 if the rpm clock probe happens before cpuidle init
Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Felix Fietkau 2a4baf3e79 ipq806x: fix NAND support for linux 4.9
Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Felix Fietkau 6006227cb7 ipq806x: do not allocate coherent memory in dma engine hotpath
The available amount of coherent DMA memory is very limited. On Linux
4.4 this issue was worked around by increasing the pool size.

It turns out that using coherent memory here is completely unnecessary.
This change reworks the driver code to use kzalloc+dma_map_single
instead.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
John Crispin 1adf51702e ipq806x: clean up patches, port missing patches from 4.4
Signed-off-by: John Crispin <john@phrozen.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
John Crispin 99b6aefd63 ipq806x: sync 4.9 kernel config with 4.4
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: John Crispin <john@phrozen.org>
7 years ago
Felix Fietkau a531d37fab ipq806x: clean up dts patching in 4.9
Do not patch upstream files, overwrite them entirely. The upstream files
are buggy for a number of devices and this significantly simplifies the
patch structure

Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: John Crispin <john@phrozen.org>
7 years ago
Felix Fietkau ddf577b0b2 ipq806x: enable cmdline mangle on 4.9 (like on 4.4)
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: John Crispin <john@phrozen.org>
7 years ago
Hauke Mehrtens 9a065fcfec kernel: update kernel 4.9 to 4.9.14
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
7 years ago
Felix Fietkau 92b5b360fe ipq806x: clean up dts patch
Move dts files to files/, remove useless patch chunks

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Felix Fietkau 2a3952bcd5 kernel: re-apply 300-arch-arm-force-ZRELADDR-on-arch-qcom.patch on 4.9 (FS#549)
Fixes memory corruption issues. See commit bdcba36442 for more
details.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Felix Fietkau 9f09bd6606 ipq806x: refresh patches
Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Thomas Reifferscheid eb09d79c16 ipq806x: sanitize Dni image generation
The more straight forward approach for generating the pure and unpadded
kernel file which then can be used for initramfs straight.
Build options for factory.img and sysupgrade.tar are handeled
seperately.

Signed-off-by: Thomas Reifferscheid <thomas@reifferscheid.org>
7 years ago
Thomas Reifferscheid e01b034cdc ipq806x: fix fakerootfs position
The fakeroot header is expected by the netgear bootloader in the last
64 bytes of the last block used by the uImage. With the current
linux-4.9 uImage being more than 128k smaller than the linux-4.4 uImage
the bootloader was unable to locate the rootfs ih_magic and was
refusing to load and start the kernel.

Fixes: FS#542

Signed-off-by: Thomas Reifferscheid <thomas@reifferscheid.org>
7 years ago
John Crispin bb255f7429 ipq806x: add v4.9 support
Signed-off-by: John Crispin <john@phrozen.org>
7 years ago
Jo-Philipp Wich ea269c37b8 ar71xx/ipq806x/mediatek/mvebu: fix network defaults
After "73d923e base-files: emit tagged switch configuration by default"
some default network configurations are broken because the lan and wan
ifnames are forcibly set to untagged netdevs.

Adjust the offending set_interfaces_lan_wan() calls to use the proper
tagged device names.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
8 years ago
Stijn Tintel d2c4041f02 kernel: update kernel 4.4 to version 4.4.47
Refresh patches for all targets that support kernel 4.4.
Compile-tested on all targets that use kernel 4.4 and aren't marked
broken, except arc770 and arch38 due to broken toolchain.

Runtime-tested on ar71xx, octeon, ramips and x86/64.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
8 years ago
Joseph C. Lehner 7d00cfe9bb build: centralize fakeroot code
This patch moves the fakeroot code required by some devices to
`image-commands.mk`.

Create the fakeroot on the fly by using the undocumented -s (skip copy)
parameter of mkimage.

Signed-off-by: Joseph C. Lehner <joseph.c.lehner@gmail.com>
[remove unused NETGEAR_KERNEL_MAGIC, remove workarounds to have a dummy
rootfs for mkimage]
Signed-off-by: Mathias Kresin <dev@kresin.me>
8 years ago
Hannu Nyman c980147527 ipq806x: fix wireless macs
Commit 71a39b8 ("ipq806x: Fix wireless support for Netgear Nighthawk X4S
D7800") added a trailing TAB char after the backslash which prevents
the assignment of the correct MACs for wifi devices.

Fixes: FS#451

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
[reworded commit message]
Signed-off-by: Mathias Kresin <dev@kresin.me>
8 years ago
André Valentin 8725d1cffa ipq806x: fixup nbg6817 internal mmc and switch configuration in DTS
The setting mmc-ddr-1_8v in the platform dts leads to read errors. The
device is unusable and system reboots in a loop. Because NBG6817 is the
only mmc device, I removed it in base dts.

The second change removes settings now present in base dts.

The third change references was a wrong conversion of constants in the switch settings.
Switch now initializes again.

Signed-off-by: André Valentin <avalentin@marcant.net>
8 years ago
Joseph C. Lehner aeba0fe466 build: move append-file to image-commands.mk
Move it append-file to image-commands.mk so that it can used by other
targets as well.

Signed-off-by: Joseph C. Lehner <joseph.c.lehner@gmail.com>
8 years ago
Zhang Jingye 71a39b8690 ipq806x: Fix wireless support for Netgear Nighthawk X4S D7800
D7800 has a simular hardware to R7800 and uses dual QCA9980 for both 2.4GHz and 5GHz band.
However there is no proper initialization for them, which causes a kernel panic due to failed firmware loading.

This patch adds d7800 to ath10k caldata extraction list.
I can get two functional wireless bands after making change to it.

Signed-off-by: Zhang Jingye <934526987@qq.com>
8 years ago
Pavel Kubelun 8004aa313a ipq806x: refactor ipq8065 device tree
At the moment we have 2 seperate device tree sources: 1 for ipq8064 soc located
in kernel source and 1 custom in LEDE for ipq8065.
ipq8064 and ipq8065 SoCs are completely identical except ipq8065 has higher cpu
frequencies and adjusted corresponding power supply.

This commit makes ipq8065 DTS to contain only specific for ipq8065 DT entries while
pulling all the basic SoC stuff from ipq8064 DTS.

It makes easier to manage ipq806x device trees and instead of committing changes into
2 seperate equal DTS we are ending up with only 1.
It also enables ipq8065 devices to automatically receive changes made in upstream kernel.

Signed-off-by: Pavel Kubelun <be.dissent@gmail.com>
8 years ago
Pavel Kubelun ca25b4d729 ipq806x: enable hw pseudo random number generator
Enables support for pseudo random number generator in device tree.

Signed-off-by: Pavel Kubelun <be.dissent@gmail.com>
8 years ago
Pavel Kubelun 44b44595dc ipq806x: update eMMC and SDCC3 nodes in device tree
Enable bam dma support for eMMC and SDCC3 in device tree and update nodes
to reflect Qualcomm SDK.

Signed-off-by: Pavel Kubelun <be.dissent@gmail.com>
8 years ago
Pavel Kubelun 45bf3d4f24 ipq806x: disable usb3 phy suspend and add usb tcsr control
According to Qualcomm SDK usb3 phy suspend should be disabled for
ipq806x.
This may solve issue on some ipq806x devices that breaks usb3
storage peripherals during system boot.

Signed-off-by: Pavel Kubelun <be.dissent@gmail.com>
8 years ago
Hauke Mehrtens 5b089e45a6 kernel: update 4.4 kernel to 4.4.42
Refresh patches on all 4.4 supported platforms.
Compile & run tested: lantiq/xrx200

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
8 years ago
Felix Fietkau c2fc52ae22 kernel: remove DEVMEM/DEVKMEM platform overrides
Those options are handled via top-level menuconfig instead

Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Pavel Kubelun 6ebb46a40a ipq806x: fix pvs1_bin voltage in ipq8065 DT
Fixing pvs1 bin voltage as found in GPL tarball and Qualcomm SDK.

Also adjusting smb208_s2a/b minimum voltage to reflect lowest value in pvs table.

Current ipq8065 devices in LEDE choose (based on eFuse data) pvs bin n4, that has
correct values in DT, but in future a new device may choose n1 or n6.

Without this change n1 is semi-correct and n6 is not available, because OPP driver
disregards bins with voltage values that regulator cannot supply.

Signed-off-by: Pavel Kubelun <be.dissent@gmail.com>
8 years ago
Felix Fietkau 018d80007e kernel: remove ubifs xz decompression support
It has been unused, and less useful than squashfs for cases where flash
space usage matters.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Adrian Panella d700c120bf ipq806x: EA8500 fix sysupgrade over stock firmware
When running sysupgrade for the first time over the second partition
(that still had stock firmware) the rootfs wasn't flashed as there
wasn't enough space.
This happend because stock also uses UBI, but the volume name wasn't
recognised and wasn't deleted before flashing.

Signed-off-by: Adrian Panella <ianchi74@outlook.com>
8 years ago
dissent1 fef6a96d9e ipq806x: add thermal sensor driver
Allows to check cpu temperature.

Huge thanks to @hnyman for valuable assistance!

Signed-off-by: Pavel Kubelun <be.dissent@gmail.com>
8 years ago
Pavel Kubelun 2b71f958b1 ipq806x: increase coherent dma pool size
Cherry-picked and rebased from
https://source.codeaurora.org/quic/qsdk/system/openwrt/tree/?h=korg/linux-3.4.y/release/arugula_bb_cs

Signed-off-by: Pavel Kubelun <be.dissent@gmail.com>
8 years ago
Pavel Kubelun 8fca99266e ipq806x: add enable reg and masks for PRNG
Cherry-picked from https://source.codeaurora.org/quic/qsdk/system/openwrt/tree/?h=korg/linux-3.4.y/release/arugula_bb_cs

Signed-off-by: Pavel Kubelun <be.dissent@gmail.com>
8 years ago
Pavel Kubelun 550f71ec8d ipq806x: refactor rpm clock controller patches
RPM clock controller driver had made its way upstream and previous
approach of directly redoing a driver to support ipq806x is a no go anymore.

Thus reverting mentioned patches to upstream state and renaming
in correct patch numbering accordance.

To make the driver work on ipq806x boards we introduce a custom patch.

Signed-off-by: Pavel Kubelun <be.dissent@gmail.com>
8 years ago
Kevin Darbyshire-Bryant 102cb4742c kernel: bump to 4.4.35
Refresh patches on all 4.4 supported platforms.

077-0005-bgmac-stop-clearing-DMA-receive-control-register-rig.patch
removed as now upstream.

Compile & run tested: ar71xx - Archer C7 v2

Signed-off-by: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
8 years ago
Mathias Kresin 3228c2a682 ipq806x: more dts cleanup
Remove the wifi5g LED from the the d7800, r7500 and r7800. Albeit this
GPIO is mentioned in the GPL tarball, it doesn't do anything. The
2.4/5 GHz LEDs are connected to the wifi chips and not be controlled
from the the userspace.

Use the LEDs names/colours as they are used in the board manuals. Merge
redundant LED configurations. Use the phy[0|1]tpt trigger for the
wireless LEDs. Remove the workarounds for the not controllable wireless
LEDs.

Fix spi compatible strings and remove superfluous spi-max-frequency
parameters.

If there are two power leds, use one for indicating normal operation and
one for failsafe/upgrade. Keep the on/off state of the main power led
during boot.

Use the usb pinmux settings from the nbg6817 gpl sources.

Signed-off-by: Mathias Kresin <dev@kresin.me>
8 years ago
Henryk Heisig e3caadc69d ipq806x: clean up dts files
Set the pinmux to the values found in the GPL tarballs of the boards.
Remove pinmux which are is not used (like nand pinmux for spi
flash boards).

This allows to use the wan orange led of the C2600 which had a wrong
pinmux before. Might fix buttons or leds of other boards as well.

Fix the LED color and the ledswitch key code of the C2600. Rename the
ledgnr to ledswitch.

Add support for indication the boot state using LEDs to the D7800,
NBG6817, R7500 and R7500v2.

Change GPIO active to readable values in D7800, EA8500, R7500,
R7500v2 and R7800.

Change gpioexport to gpio pinmux.

Add proper "drive strenght" to i2c4_pins and use it for RPM on
C2600, D7800, EA8500, R7500, R7500v2.

Remove pcie pinmux from D7800.

Move pinctrl to correct place in NBG6817 and R7800.

Signed-off-by: Henryk Heisig <hyniu@o2.pl>
8 years ago
Sebastian Quilitz ae79c41286 ipq806x: add support for TP-Link Archer VR2600v
This router is similar to the C2600. Ethernet on WAN + LAN, switch,
sysupgrade, LEDs, buttons and WiFi on 2G + 5G do work. The xDSL modem
and the POTS/DECT interface are not supported yet.

It is not possible to flash LEDE via the TP-Link webinterface. The
image need to be signed. The first 0x200 bytes of the image is the
TP-Link header including the signature. The signature is not validated
by the bootloader. The LEDE image is zeroed in this area.

To install LEDE it is necessary to solder a four pin header to JP2.
Connect a serial interface to this header and interrupt the autostart
of kernel. Transfer the sysupgrade image via TFTP and write it to the
serial flash at 0x320000.

Signed-off-by: Sebastian Quilitz <zeraphim@x-pantion.de>
8 years ago
Henryk Heisig c380772c19 ipq806x: c2600: change wan and lan led trigger to swconfig port
Signed-off-by: Henryk Heisig <hyniu@o2.pl>
8 years ago
Henryk Heisig 8b1731964b ipq806x: enable swconfig LED support
Signed-off-by: Henryk Heisig <hyniu@o2.pl>
8 years ago
Pavel Kubelun 70434c3f94 ipq806x: switch to upstream usb driver and backport fixes
Also removing fifo-resize property drom DT as it has been removed from the driver.

Signed-off-by: Pavel Kubelun <be.dissent@gmail.com>
8 years ago
Felix Fietkau b5ee86c4e5 ipq806x: remove device specific sysupgrade image checks
Replaced by image metadata

Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Pavel Kubelun 27c355f8a4 ipq806x: fix build errors
Add missing patches that broke LEDE builder while updating WDT driver

Signed-off-by: Pavel Kubelun <be.dissent@gmail.com>
8 years ago
Felix Fietkau 9d6d7d9a0e ipq806x: append metadata to images
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago