Commit Graph

507 Commits (50c6938b95a0c915c5c8ffe1fe67a94b9402e98e)

Author SHA1 Message Date
Koen Vandeputte f4bea1b6a3 kernel: bump 4.14 to 4.14.171
Refreshed all patches.

Fixes:
- CVE-2013-1798

Compile-tested on: cns3xxx
Runtime-tested on: cns3xxx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
4 years ago
Koen Vandeputte 20b5a4ca01 kernel: bump 4.19 to 4.19.101
Refreshed all patches.

Fixes:
- CVE-2019-14896
- CVE-2019-14897

Remove upstreamed:
- 023-0007-crypto-crypto4xx-Fix-wrong-ppc4xx_trng_probe-ppc4xx_.patch
- 950-0202-staging-bcm2835-camera-fix-module-autoloading.patch
- 001-4.22-01-MIPS-BCM63XX-drop-unused-and-broken-DSP-platform-dev.patch

Compile-tested on: cns3xxx
Runtime-tested on: cns3xxx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
4 years ago
Álvaro Fernández Rojas 0c97f034c9 ipq806x: refresh kernel patches
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years ago
Ansuel Smith 5318a6dea3 ipq806x: add fab scaling support
Add fab scaling support and dtsi definition

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
4 years ago
Ansuel Smith 0ef755b8ad ipq806x: refactor l2 freq scaling patch
Refactor l2 freq scaling patch to support voltage
scaling and add support to base cache scaling on
cpu freq scaling. Update the dtsi files with the new
definition used in the new code.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
4 years ago
Ansuel Smith 411ad3727a ipq806x: reorganize nand_pins mux definition
It's wrong set the mux to bias-disable. The best way to
do this is by creating a separate group and disable the
specific pins.

By documentation, any subgroup with no bias definition
is ignored so the mux definition is useless.
Rework the definition by sremoving the mux subgroup and
set the remaining subgroup with the mux function and
drive-strength

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
4 years ago
Ansuel Smith 5ba02d10ed ipq806x: opp/core: fix broken patch Handle opp voltage adjust
The opp_notifier introduced with patch 0054-Handle-OPP-voltage adjust
for some reason missed the actual registration in the opp struct,
resulting in never being registred.
This was present in kernel 4.9 patchset but dropped in the transition
 to 4.14. Reintroduce this and fix patch 0055 about L2 cache scaling.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
4 years ago
Christian Lamparter 80c8a9aeed ipq806x: remove CONFIG_MDIO_IPQ8064 symbol
This driver is not available on upstream.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
4 years ago
Hauke Mehrtens b6cdc042af kernel: bump 4.19 to 4.19.93
Refreshed all patches.

The patch hack-4.19/550-loop-better-discard-for-block-devices.patch was
replaced with an new version of the patch from:
https://lore.kernel.org/patchwork/patch/1153625/
https://lore.kernel.org/patchwork/patch/1153626/

Compile-tested on: ipq40xx, lantiq
Runtime-tested on: ipq40xx, lantiq

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years ago
Adrian Schmutzler e0382e88a9 ipq806x: build DEVICE_DTS based on SOC and device name
This patch uses the SOC variable to calculate DTS names automatically
based on the SOC and the device definition node name.

This reduces redundancy and (by having to choose DTS name
appropriately) will unify the naming of a device in different places
(image/Makefile, DTS name, compatible, image name). This is supposed
to make life easier for developers and reviewers.

Since the kernel uses a "soc-device.dts" scheme for this target, we
use this for the derivation of DEVICE_DTS, too, leaving the DTS names
unchanged for this target.

Note that for some devices the kernel itself uses inconsistent names
(DTS naming scheme vs. compatible), leaving us with a manual overwrite
of DEVICE_DTS for those cases.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Ansuel Smith b04ccdb1e8 ipq806x: fix wrong definition for tsense calib
We have only 11 sensors on ipq806x. Fix the reg property
to load the right amount of data instead of the entire
space.

Tested-by: Stefan Lippers-Hollmann <s.l-h@gmx.de> [nbg6817/ipq8065]
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
4 years ago
Ansuel Smith 77f4d5c6bb ipq806x: rework ipq806x specific tsense temp driver
Tsense driver for ipq806x have various problem.
- Emit wrong error. On probing of this driver, nvmem driver can be
  not ready and this cause a EDEFER error. Actually this is not an
  error as the kernel will retry to probe the driver after the
  nvmem driver is loaded.
- Use uninitialized value on trigger of critical temp
- Doesn't free allocated memory

Because of this, rework the driver and improve it by removing extra
load of data.

Change the logic of loading data. Use the backup calib data only
when the calib data is not present. As the calibration is only
needed to set the temp offset, we don't really need to read
both calib data and set the offset based only on the backup one.
Also change how the notifier function work. At times when we
output the trigger message, we already have read the temp so
remove the extra read and the wrong uninitialized data that
probably caused a kernel panic for null pointer exception.
(Think we never experience this bug because the router
never reached that temp ever... So just lucky)

Tested-by: Stefan Lippers-Hollmann <s.l-h@gmx.de> [nbg6817/ipq8065]
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
4 years ago
Ansuel Smith a666f817a2 ipq806x: update kernel config with new driver
The config name for cpufreq driver has changed.

Tested-by: Stefan Lippers-Hollmann <s.l-h@gmx.de> [nbg6817/ipq8065]
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
4 years ago
Ansuel Smith c8086c7d2d ipq806x: refresh new and changed patches
Refresh patches to remove fuzz

Tested-by: Stefan Lippers-Hollmann <s.l-h@gmx.de> [nbg6817/ipq8065]
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
4 years ago
Ansuel Smith 62a4e4b319 ipq8065: update dtsi with new opp table
The new driver use opp table to register frequency.
Drop psv bindings as they are not used anymore.

Tested-by: Stefan Lippers-Hollmann <s.l-h@gmx.de> [nbg6817/ipq8065]
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
4 years ago
Ansuel Smith adc0bebd87 ipq8064: update dtsi with new opp table
The new driver use opp table to register frequency.
Drop psv bindings as they are not used anymore.
Adds speedbin definition for nvmem driver

Tested-by: Stefan Lippers-Hollmann <s.l-h@gmx.de> [nbg6817/ipq8065]
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
4 years ago
Ansuel Smith e18f8e417f ipq806x: add patch to support krait cpu scaling driver
This patch has been proposed but never actually merged to
mainline. It was accepted but never re proposed by the
creator.
Rework it, fix kernel panic cause by double kfree.

Tested-by: Stefan Lippers-Hollmann <s.l-h@gmx.de> [nbg6817/ipq8065]
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
4 years ago
Ansuel Smith a37f787162 ipq806x: backport qcom-cpufreq-kryo patch
Backport patch applied to qcom-cpufreq-kryo
driver as krait cpu will base on this driver.

Tested-by: Stefan Lippers-Hollmann <s.l-h@gmx.de> [nbg6817/ipq8065]
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
4 years ago
Ansuel Smith 4165f2340e ipq806x: drop old cpufreq patch
Drop old cpufreq as now we have new driver that
can use normal kernel opp definition

Tested-by: Stefan Lippers-Hollmann <s.l-h@gmx.de> [nbg6817/ipq8065]
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
4 years ago
Ansuel Smith e9a982e1d9 ipq806x: opp/core: update patch updating voltage tolerance on voltage adjust
Rework 0052-PM-OPP-Update-the-voltage-tolerance-when-adjusting-t
to reflect changes upstream.

- Skip unnecessary allocation of buffer to set u_volt
- Change opp u_volt directly

Tested-by: Stefan Lippers-Hollmann <s.l-h@gmx.de> [nbg6817/ipq8065]
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
4 years ago
Ansuel Smith 456ab9a912 ipq806x: opp/core: update patch allowing adjusting of OPP voltages at runtime
Update 0049-PM-OPP-Support-adjusting-OPP-voltages-at-runtime with
upstream version.

Tested-by: Stefan Lippers-Hollmann <s.l-h@gmx.de> [nbg6817/ipq8065]
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
4 years ago
Ansuel Smith 5ab9c0b388 ipq806x: fix bug in L2 cache scaling
It has been notice a buf in L2 cache scaling where the scaling is not
done proprely if the frequency is set to the initial state before
the new frequency.

From: https://patchwork.kernel.org/patch/10565443/

* The clocks are set to aux clock rate first to make sure the
* secondary mux is not sourcing off of QSB. The rate is then set to
* two different rates to force a HFPLL reinit under all
* circumstances.

In the initial stage of boot to force a new frequency to apply, is
needed to first set the frequency back to the lowest one (aux_rate)
and then to the target one. This force and make sure the controller
actually switch the frequency to the right one. Apply the same
mechanism to L2 frequency scaling. Before scaling to the target
frequency, first set the frequency to the aux_rate to force the
transition, then scale it to the target frequency. Doing the wrong way
can produce unexpected results and could lock the scaling mechanism
until a full reboot is done (Causing a full reset by the krait-cc driver)

From: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=77612720a2362230af726baa4149c40ec7a7fb05

When the Hfplls are reprogrammed during the rate change,
the primary muxes which are sourced from the same hfpll
for higher frequencies, needs to be switched to the 'safe
secondary mux' as the parent for that small window. This
is done by registering a clk notifier for the muxes and
switching to the safe parent in the PRE_RATE_CHANGE notifier
and back to the original parent in the POST_RATE_CHANGE notifier.

This should apply also to L2 scaling... as we can't relly use
the notifier, we manually do this on L2 scaling.

Tested-by: Stefan Lippers-Hollmann <s.l-h@gmx.de> [nbg6817/ipq8065]
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
4 years ago
Hauke Mehrtens f0df0d6a14 kernel: bump 4.19 to 4.19.91
Refreshed all patches.

Compile-tested on: ipq40xx, apm821xx
Runtime-tested on: ipq40xx

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years ago
Koen Vandeputte 7604e53d5f kernel: bump 4.14 to 4.14.159
Refreshed all patches.

Remove upstreamed:
- 302-0002-dmaengine-dw-implement-per-channel-protection-contro.patch

Fixes:
- CVE-2019-19332

Compile-tested on: cns3xxx
Runtime-tested on: cns3xxx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
4 years ago
Hauke Mehrtens 729d7bc751 kernel: Deactivate CONFIG_SFP in generic config
Deactivate CONFIG_SFP for kernel 4.19 in the generic configuration.
The CONFIG_SFP configuration option was not set to anything in the
ath79 build for me, set it to deactivated by default.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years ago
Ansuel Smith 2a82e0e1ca ipq806x: switch to 4.19 kernel version
It has been used by several people for some time already and feedback
has been mostly positive.

Ref: https://github.com/openwrt/openwrt/pull/2472
Tested-by: Hannu Nyman <hannu.nyman@iki.fi> [ipq8065, R7800]
Tested-by: Stefan Lippers-Hollmann <s.l-h@gmx.de> [ipq8065, NBG6817]
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
[separate commit, commit subject and description facelift]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years ago
Ansuel Smith ce8707ea79 ipq806x: update USB3 modules for 4.19
- Use new dwc3-qcom usb driver.
- Drop dwc3-of-simple as we have a dedicated driver now.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
[split into separate commit, commit subject facelift]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years ago
Pavel Kubelun 77e7d6c20d ipq806x: add missing core1 voltage tolerance
Voltage tolerance is accounted per core, not per cpu, so add
missing DT entry.

Signed-off-by: Pavel Kubelun <be.dissent@gmail.com>
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
4 years ago
Ansuel Smith 402153623d ipq806x: fix tsens driver in 4.19
Added patch:

 - 063-3 Fix tsense shared memory problem

Recent changes in ioremap_resource function are causing fails for the
memory areas which are already mapped. This changes are causing tsense
driver failures during initialization:

  qcom-tsens 900000.thermal-sensor: tsens init failed

So this patch uses simple ioremap in order to use this shared memory
space.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
[commit subject and desciption facelitf]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years ago
Christian Lamparter f28e6ae7ce ipq806x: improve mdio gpios list
Improve rediability of gpio mdio list. No functional change.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
[proper authorship of the patch]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years ago
Christian Lamparter 2296d41a1c ipq806x: ap161: fix wrong definition stdout
From documentation
https://www.kernel.org/doc/Documentation/devicetree/bindings/chosen.txt
should be just stdout-path

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
[proper authorship of the patch]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years ago
Christian Lamparter 044c79689b ipq806x: ap148: reorganize dts
Reorganize dts to use tags from ipq8064 dtsi

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
4 years ago
Christian Lamparter fe26364065 ipq806x: d7800: fix warning on dtc compilation
There is warning with "property has invalid length (4 bytes)"
related to nand definition. Set size-cells to zero to fix this.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
4 years ago
Christian Lamparter 1acc054341 ipq806x: r7800: add missing wifi definition for pcie
Add missing wifi compatible definition for r7800 device.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
4 years ago
Christian Lamparter 2da033eaa6 ipq806x: use ipq8064 dedicated watchdog
Add missing watchdog to list of compatible timers

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
4 years ago
Christian Lamparter df35293000 ipq806x: add nand and sata tags
Add some tags for nand and sata structure to easily
reference them in other dts.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
4 years ago
Christian Lamparter 5ce72009ac ipq806x: increase drive-strength for pinmux
Increase drive-strength from
https://lore.kernel.org/patchwork/patch/626885/

2mA drive strength is not enough when we connect multiple i2c devices
on the bus with different pull up resistors.

This issue was detected when multiple i2c devices
connected on the other side of level shifters on Linaro sensor board.
Maxing up to 16mA made i2c much stable.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
4 years ago
Christian Lamparter 9e7a8beb9c ipq806x: add missing gpio and gsbi declaration
Adds missing gpio and gsbi declaration.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
4 years ago
Ansuel Smith 2336c2dbb1 ipq806x: disable spc on ipq8065 soc
Spc is disabled in ipq8065 board as it does cause cpu lockup
(probably caused by wrong register being set)

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
4 years ago
Ansuel Smith 71b1062230 ipq806x: set apq8064 regulator to support cpuidle
Set qcom,apq8064-saw2-v1.1-cpu as regulator to make cpuidle work.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
4 years ago
Christian Lamparter 61505922dc ipq806x: convert ipq8064 dtsi interrupts
Convert hardcoded interrupts value to types defined in gci include file.
Interrupts sets to 0 are converted to IRQ_TYPE_LEVEL_HIGH to fix
kernel warning. Same fix has been applied to arm64 dts.

https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1797143
https://patchwork.kernel.org/patch/10367453/
https://patchwork.kernel.org/patch/10315315/

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
4 years ago
Christian Lamparter afcb78f103 ipq806x: use new usb3 implementation
Use new usb3 implementation and refresh dts to the new dwc3 structure

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
[proper authorship of the patch]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years ago
Christian Lamparter 96a509eeeb ipq806x: fix missing compatible and rename
- ipq8064 compatible was missing from nbg6817.
- Rename ap148 with a better descriptive name.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
[proper authorship of the patch]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years ago
Christian Lamparter 9e9fe2392e ipq806x: convert ok to okay in dts
DT spec require okay instead of ok in dts files

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
4 years ago
Christian Lamparter 63066d3006 ipq806x: refresh 4.19 patches
Reworked:

 - 0034 patchset update

Added:

 - 080 Add support for pinctrl-msm framework

Removed:

 - 0074-ipq806x-usb-Control-USB-master-reset.patch
   (we now have a dedicated driver for qcom usb)

 - 0047-mtd-nand-Create-a-BBT-flag-to-access-bad-block-marke
   (merged upstream)

 - 310-msm-adhoc-bus-support
   (it looks like it was never actually used in any dts)

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
[commit subject and description facelift, SoB fix]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years ago
Ansuel Smith f81e148eb6 ipq806x: update 4.19 kernel config
These changes are needed in order to migrate old kernel 4.14 config to
the upcoming kernel version 4.19.  Also add missing configuration
options that comes up with this SoC.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
[line wrap long commit description, add 4.19 to subject, soc->SoC]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years ago
Ansuel Smith c5d2f3c476 ipq806x: copy files from 4.14 to 4.19
This copies files from files-4.14 to files-4.19 directory in order to
get clear diffs for any changes done from now on.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
[added missing commit description, refreshed ea8500 and wpq864 DTS]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years ago
Koen Vandeputte d395583d69 kernel: bump 4.14 to 4.14.158
Refreshed all patches.

Altered patches:
- 400-mtd-add-rootfs-split-support.patch

Compile-tested on: cns3xxx
Runtime-tested on: cns3xxx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Koen Vandeputte 414b7c107a kernel: bump 4.14 to 4.14.156
Refreshed all patches.

Compile-tested on: cns3xxx
Runtime-tested on: cns3xxx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Koen Vandeputte db9e9e8382 kernel: bump 4.14 to 4.14.155
Refreshed all patches.

Altered patches:
- 707-dpaa-ethernet-support-layerscape.patch

Remove upstreamed:
- 034-v4.20-MIPS-BCM47XX-Enable-USB-power-on-Netgear-WNDR3400v3.patch
- 001-4.21-01-BCM63XX-fix-switch-core-reset-on-BCM6368.patch
- 073-qcom-ipq4019-fix-cpu0-s-qcom-saw2-reg-value.patch

Compile-tested on: cns3xxx
Runtime-tested on: cns3xxx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago