Commit graph

77 commits

Author SHA1 Message Date
John Crispin
b0b59a8e75 ipq806x: switch AP148 to using SMEM based MTD parser
*Enable SMEM MTD parser and its dependencies (SMEM & HW spinlocks) in
 the kernel config
*Replaces the MTD layout in DT by the dynamic layout provided by the
 SMEM parser for AP148

Using the OF based parser is still possible on platforms which have a
fixed MTD partition layout.

Signed-off-by: Mathieu Olivari <mathieu@codeaurora.org>

SVN-Revision: 46658
2015-08-17 06:18:15 +00:00
John Crispin
0e33ae8e5d ipq806x: add QCOM SMEM based MTD parser
This patch adds a new parser which uses the SMEM available on IPQ and
some other QCOM platforms to map the MTD partitions.

Signed-off-by: Mathieu Olivari <mathieu@codeaurora.org>

SVN-Revision: 46657
2015-08-17 06:18:04 +00:00
John Crispin
6529d23267 ipq806x: add SMEM support
2 patches are cherry-picked from the following LKML thread:
*https://lkml.org/lkml/2015/4/11/208

The last patch (036-soc-qcom-add-smem-to-IPQ806x-platforms.patch) is
adding the corresponding DT nodes required for IPQ806x.

Signed-off-by: Mathieu Olivari <mathieu@codeaurora.org>

SVN-Revision: 46656
2015-08-17 06:17:58 +00:00
John Crispin
6b775f4517 ipq806x: add hwspinlock support
This change cherry-picks the following 3 changes from linux-next:
*fb7737 hwspinlock/core: add device tree support
*19a0f6 hwspinlock: qcom: Add support for Qualcomm HW Mutex block
*bd5717 hwspinlock: qcom: Correct msb in regmap_field

We're also adding a patch to add the hardware spinlock device nodes on
IPQ806x platforms (033-soc-qcom-Add-sfbp-device-to-IPQ806x-dts.patch).

Signed-off-by: Mathieu Olivari <mathieu@codeaurora.org>

SVN-Revision: 46655
2015-08-17 06:17:47 +00:00
Jonas Gorski
c7d8377931 ipq806x: switch to new image build system
Switch ipq806x to the new image build system. Image files might change
slightly their names, but the generated files should not change.

Signed-off-by: Jonas Gorski <jogo@openwrt.org>

SVN-Revision: 46602
2015-08-14 15:10:54 +00:00
Jonas Gorski
1c56854639 ipq806x: disable dma for spi on linux 4.1 as well
Linux 4.1 is also affected from the dma issue, so remove the dma
proprties there as well.

Signed-off-by: Jonas Gorski <jogo@openwrt.org>

SVN-Revision: 46599
2015-08-14 15:10:11 +00:00
Felix Fietkau
6cc5919e8a ipq806x: disable DMA on the SPI flash
Previous patch 6f2905eeb6ce5ddec8d12d677e1f377a940b537b enabled ADM in
the kernel, which causes a kernel panic when accessing the SPI flash.

As a workaround, We'll disable DMA for the flash for now. It was not
enabled previously anyway so we'll just leave it as is.

Reported-by: Jonas Gorski <jogo@openwrt.org>
Signed-off-by: Mathieu Olivari <mathieu@codeaurora.org>

SVN-Revision: 46587
2015-08-13 19:02:16 +00:00
Felix Fietkau
3e52c8c357 ipq806x: enable NAND flash support in the kernel
Previous patch set backported the recently posted NAND flash driver to
3.18 and 4.1 kernel. This patch now enables it in the kernel config.

There is no change to the partition layout and init yet. But the NAND
flash can be seen in the mtd list on an AP148:

root@OpenWrt:/# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 10000000 00020000 "qcom-nandc"
...

Signed-off-by: Mathieu Olivari <mathieu@codeaurora.org>

SVN-Revision: 46569
2015-08-07 08:36:36 +00:00
Felix Fietkau
d523866eb3 ipq806x: add NAND flash controller support
These patches add support for ipq806x NAND flash controller. Most of
these are cherry-picked & backported from LKML:
*https://lkml.org/lkml/2015/8/3/16

This patch just modifies the kernel code, but doesn't change the config.
It should be harmless.

Signed-off-by: Mathieu Olivari <mathieu@codeaurora.org>

SVN-Revision: 46568
2015-08-07 08:36:31 +00:00
Felix Fietkau
c7bf2accc9 ipq806x: Add ADM support
These are cherry-picked & backported from LKML:
*https://lkml.org/lkml/2015/3/17/19

They are enabled on both 3.18 and 4.1 kernel. Patches 150 to 154 are
applying changes merged since 3.18; they enable mechanisms used by the
ADM driver.

ADM engine is used by the NAND controller, so it is necessary to
bring-up NAND flash support.

Signed-off-by: Mathieu Olivari <mathieu@codeaurora.org>

SVN-Revision: 46567
2015-08-07 08:36:16 +00:00
Jonas Gorski
caa73eb95c kernel: update 4.1 to 4.1.4
Changelog:
 * https://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.1.4

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
[jogo: fix brcm2708 patches, refresh target patches]
Signed-off-by: Jonas Gorski <jogo@openwrt.org>

SVN-Revision: 46560
2015-08-05 13:55:14 +00:00
Felix Fietkau
0b15f91ed6 ipq806x: add ethernet (stmmac) support
We forgot to enable the stmmac driver for 4.1 kernel, so ethernet
interfaces don't show-up on this kernel.

Signed-off-by: Mathieu Olivari <mathieu@codeaurora.org>

SVN-Revision: 46559
2015-08-04 23:10:18 +00:00
Felix Fietkau
04154f3d33 ipq806x: refresh kernel configs
Remove options which have been moved into the generic config ever since.

Signed-off-by: Mathieu Olivari <mathieu@codeaurora.org>

SVN-Revision: 46558
2015-08-04 23:10:12 +00:00
Felix Fietkau
0f7de49fa3 ipq806x: fix freeze in PCIe code when booting with an old u-boot
Old bootloader (same ones which have DT disabled) don't perform any PCIe
initialization. The consequence is a freeze during PCIe bring-up on
these old u-boot. Same kernel with a newer bootloaders works fine as
they contain the corresponding PCIe init code.

In this change, we'll add the missing init and make sure the kernel
doesn't rely on some preexisting init to get PCIe to work. That includes
the following changes:
*GPIOs: set function & drive strength
*Clocks: add init code for aux & ref clocks
*PCIe driver: additional init of the hardware controller

Tested 3.18 and 4.1 on an AP148 with bootloader branch 0.0.1

Signed-off-by: Mathieu Olivari <mathieu@codeaurora.org>

SVN-Revision: 46557
2015-08-04 23:10:03 +00:00
Felix Fietkau
f7651fdba5 ipq806x: fix pcie pinmux naming in ipq806x dts
PCIe controller nodes are numbers 0/1/2 in the chipset dtsi file, but
the pinmux nodes are numbers 1/2/3. We'll make it consistent by changing
the pinmux numbering to match the controller's one.

Signed-off-by: Mathieu Olivari <mathieu@codeaurora.org>

SVN-Revision: 46556
2015-08-04 23:09:55 +00:00
Felix Fietkau
c4c986e419 ipq806x: add support for non-dt enabled ap148 bootloader
Certain AP148 platforms (and derivative) use bootloaders which did not
have DT enabled.
In order to support these old platforms, we'll now make the following
modifications:
*explicitely add the memory node in the AP148 DT: this used to be added
 by new u-boot through a run-time patch mechanism. We'll now add it
 explicitely so it works on boots which don't support that feature. New
 boots will have the node twice, the second one will be ignored.
*add the zImage generation next to the FIT image for AP148.

Other platforms using non-DT enabled bootloaders may want to leverage
this zImage code to generate their own firmare as well.

Signed-off-by: Mathieu Olivari <mathieu@codeaurora.org>

SVN-Revision: 46555
2015-08-04 23:09:43 +00:00
Felix Fietkau
4d1656e813 ipq806x: update bleeding-edge kernel from 4.0 to 4.1
Default kernel doesn't change and stays on 3.18 for now.

Signed-off-by: Mathieu Olivari <mathieu@codeaurora.org>

SVN-Revision: 46554
2015-08-04 23:09:38 +00:00
John Crispin
096b3759a9 build: Prevent more gzip timestamps
To improve reproducibility, prevent the inclusion of timestamps
in the gzip header.

Signed-off-by: Reiner Herrmann <reiner@reiner-h.de>

SVN-Revision: 46361
2015-07-14 09:57:45 +00:00
Jonas Gorski
0f5b1a3eca kernel: update 4.0 to 4.0.5
Changelog:
* https://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.0.5

Signed-off-by: Jonas Gorski <jogo@openwrt.org>

SVN-Revision: 46063
2015-06-19 11:12:43 +00:00
Jonas Gorski
9a59b350b7 kernel: update 3.18 to 3.18.16
Changelogs:

* https://www.kernel.org/pub/linux/kernel/v3.x/ChangeLog-3.18.15
* https://www.kernel.org/pub/linux/kernel/v3.x/ChangeLog-3.18.16

Signed-off-by: Jonas Gorski <jogo@openwrt.org>

SVN-Revision: 46011
2015-06-17 09:54:55 +00:00
Felix Fietkau
b9ebf29fbd kernel: move a symbol from the ipq806x config to generic to prevent it from being nuked by make kernel_oldconfig
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 45920
2015-06-07 07:32:35 +00:00
John Crispin
f9f093baa3 ipq806x: missing symbol
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 45880
2015-06-03 13:58:30 +00:00
John Crispin
ff324050c3 ipq806x: move stmmac support in the kernel binary
Ethernet GMAC is built-in the SoC, so there is no need to enable it as a
module. We'll just assume we need it. That's what is done for other
platform where this driver is used so it'll make things more consistent.

Signed-off-by: Mathieu Olivari <mathieu@codeaurora.org>

SVN-Revision: 45871
2015-06-01 20:11:35 +00:00
John Crispin
d2a2eb7e48 ipq806x: replace caf nss-gmac driver by upstream stmmac
This driver has been cherry-picked and backported from the following
LKML thread:
*https://lkml.org/lkml/2015/5/26/744

It also updates the DT accordingly.

Signed-off-by: Mathieu Olivari <mathieu@codeaurora.org>

SVN-Revision: 45831
2015-05-29 12:26:01 +00:00
John Crispin
72369c2976 ipq806x: enable kernel support for Fixed PHY emulation
Most ipq806x platforms use an ethernet switch, and the new upstream
GMAC driver makes use of the Fixed PHY emulation to force the link
settings despite the lack of PHY.

Signed-off-by: Mathieu Olivari <mathieu@codeaurora.org>

SVN-Revision: 45830
2015-05-29 12:25:44 +00:00
John Crispin
30bbe0b388 ipq806x: move arm-gic include into pcie patch
This include is necessary starting at the PCIe patch, which has a lower
number. So in order to keep the patches consistent, we'll move the
arm-gic include in the first patch who needs it.

Signed-off-by: Mathieu Olivari <mathieu@codeaurora.org>

SVN-Revision: 45827
2015-05-29 12:25:15 +00:00
John Crispin
12772b66fe ipq806x: fix imagebuilder
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 45823
2015-05-29 11:28:44 +00:00
John Crispin
71621ca702 ipq806x: add missing symbol
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 45794
2015-05-27 20:05:03 +00:00
John Crispin
b4494d9713 ipq806x: enable cpu idle support in kernel conf
Signed-off-by: Mathieu Olivari <mathieu@codeaurora.org>

SVN-Revision: 45731
2015-05-23 15:28:11 +00:00
John Crispin
8e49b4b902 ipq806x: add & enable cpufreq support
This change set enables frequency scaling on ipq806x, which speeds-up
the CPU and allows it to achieve its max frequency.

These patches are cherry-picked & backported from the following location:
*130-132: linux-next
*133-143: LKML - https://lkml.org/lkml/2015/3/21/15
*144: derived from other qcom similar dts
*145: derived from https://chromium.googlesource.com/chromiumos/third_party/kernel/+/chromeos-3.14/drivers/cpufreq/cpufreq-krait.c

Signed-off-by: Mathieu Olivari <mathieu@codeaurora.org>

SVN-Revision: 45730
2015-05-23 15:28:02 +00:00
John Crispin
0b24527e4d ipq806x: add power regulators support
Patches are cherry-picked from linux-next. We're also adding the
corresponding config option to the kernel.

Signed-off-by: Mathieu Olivari <mathieu@codeaurora.org>

SVN-Revision: 45729
2015-05-23 15:27:54 +00:00
John Crispin
f74477de48 ipq806x: disable i2c device on gsbi4
Patch cherry-picked from the following location:
https://chromium-review.googlesource.com/#/c/269931/

Disable the i2c device on gsbi4 and mark gsbi4_h and gsbi4_qup clks as
unused. If they are enabled, clock framework will turn them off at end
of probe. On ipq806x by design gsbi4_qup, gsbi4_h clks and i2c on gsbi4
are meant for RPM usage. So turning them off in kernel is incorrect.

Signed-off-by: Mathieu Olivari <mathieu@codeaurora.org>

SVN-Revision: 45728
2015-05-23 15:27:45 +00:00
John Crispin
1c6d332d8f ipq806x: refresh kernel patches
Signed-off-by: Mathieu Olivari <mathieu@codeaurora.org>

SVN-Revision: 45727
2015-05-23 15:27:28 +00:00
Jonas Gorski
76d079204d kernel: update 3.18 to 3.18.14
Changelogs:

* https://www.kernel.org/pub/linux/kernel/v3.x/ChangeLog-3.18.12
* https://www.kernel.org/pub/linux/kernel/v3.x/ChangeLog-3.18.13
* https://www.kernel.org/pub/linux/kernel/v3.x/ChangeLog-3.18.14

Build tested on brcm63xx and ipq806x, runtested on brcm63xx.

Signed-off-by: Jonas Gorski <jogo@openwrt.org>

SVN-Revision: 45711
2015-05-21 19:32:46 +00:00
Felix Fietkau
cfb56b4811 ipq806x: add pcie support to ipq806x based platforms
This change adds PCIe support to IPQ806x based platforms. The driver is
actually cherry-picked from the following LKML thread:
*https://lwn.net/Articles/643086/ (patches 110-111)

We also add here an additional fix to support multiple PCI controllers
on the same platform (patch 112), and to patch the ap148 & dbs149 DTS
files (patch 113).

Signed-off-by: Mathieu Olivari <mathieu@codeaurora.org>

SVN-Revision: 45663
2015-05-10 11:47:09 +00:00
Felix Fietkau
3c4bc0cd77 ipq806x: add support for zImage kernel
This change enable zImage+appended dtb support in ipq806x kernel
options. The zImage will now be generated as part of the kernel
binaries. Platforms which do not have DT support enabled in U-boot
can now make use of it by generating zImage files and appending dtb
to it.

It is not used yet but it is done as a stepping stone for early IPQ806x
platforms, which did not include DT support in U-boot.

Signed-off-by: Mathieu Olivari <mathieu@codeaurora.org>

SVN-Revision: 45662
2015-05-10 11:47:02 +00:00
Felix Fietkau
bdcba36442 ipq806x: fix boot freeze on zImage kernel
ARCH_QCOM is using the ARCH_MULTIPLATFORM option, as now recommended
on most ARM architectures. This automatically calculate ZRELADDR by
masking PHYS_OFFSET with 0xf8000000.

On IPQ806x though, the first ~20MB of RAM is reserved for the hardware.
In newer bootloader, when DT is used, this is not a problem, we just
reserve this memory in the device tree. But if the bootloader doesn't
have DT support, then ATAGS have to be used. In this case, the ARM
decompressor will position the kernel in this low mem, which will not be
in the RAM section mapped by the bootloader, which means the kernel will
freeze in the middle of the boot process trying to map the memory.

As a work around, this patch allows disabling AUTO_ZRELADDR when
ARCH_QCOM is selected. It makes the zImage usage possible on bootloaders
which don't support device-tree, which is the case on certain early
IPQ806x based designs.

Signed-off-by: Mathieu Olivari <mathieu@codeaurora.org>

SVN-Revision: 45661
2015-05-10 11:46:56 +00:00
John Crispin
0ddebefc74 ipq806x: add db149 support to OpenWrt init scripts
DB149 is a IPQ8064 based platform. This patch adds the init scripts to
detect it, configure the network accordingly, and generate a flashable
image for it.

Signed-off-by: Mathieu Olivari <mathieu@codeaurora.org>

SVN-Revision: 45537
2015-04-21 07:15:47 +00:00
John Crispin
0fd202f3e5 ipq806x: add db149 dts files
DB149 is an IPQ806x based development platform. This patch adds the dts
files to support it.

Signed-off-by: Mathieu Olivari <mathieu@codeaurora.org>

SVN-Revision: 45536
2015-04-21 07:15:37 +00:00
John Crispin
be5f3b9016 ipq806x: enable AT803x driver
Certain IPQ806x based platforms are making use of this PHY. So we'll
enable it so it gets detected as such.

Signed-off-by: Mathieu Olivari <mathieu@codeaurora.org>

SVN-Revision: 45535
2015-04-21 07:15:30 +00:00
John Crispin
6adf864770 ipq806x: automatically select kmod-usb-phy-qcom-dwc3
kmod-usb-phy-qcom-dwc3 is required to get USB working on ipq806x. It was
missed in previous commit so let's enable it automatically.

Signed-off-by: Mathieu Olivari <mathieu@codeaurora.org>

SVN-Revision: 45345
2015-04-10 08:28:44 +00:00
John Crispin
bf26426fd8 ipq806x: another missing symbol
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 45277
2015-04-05 07:53:32 +00:00
John Crispin
4ad0ad9817 ipq806x: enable usb3 packages in default profile
Default profile already enables usb2 so we'll do the same for usb3 now
that we have support for it.

Signed-off-by: Mathieu Olivari <mathieu@codeaurora.org>

SVN-Revision: 45262
2015-04-03 19:06:38 +00:00
John Crispin
5d52f4b51d ipq806x: add platform usb support
This change adds DWC3 QCOM USB phys and TCSR drivers. These are
cherry-picked from the following LKML threads:
*dwc3 qcom: https://lkml.org/lkml/2014/9/12/599
*tcsr: https://lkml.org/lkml/2015/2/9/579

We're also adding an additional patch to add the corresponding dev nodes
in the IPQ806x and AP148 dts files.

Signed-off-by: Mathieu Olivari <mathieu@codeaurora.org>

SVN-Revision: 45261
2015-04-03 19:06:30 +00:00
John Crispin
114338003a kernel: add package for dwc3 usb driver used on ipq806x
Signed-off-by: Mathieu Olivari <mathieu@codeaurora.org>

SVN-Revision: 45260
2015-04-03 19:06:21 +00:00
John Crispin
654312267c ipq806x: enable usb support
This change doesn't make USB functional but it does make it selectable
from a configuration perspective.

Signed-off-by: Mathieu Olivari <mathieu@codeaurora.org>

SVN-Revision: 45259
2015-04-03 19:06:11 +00:00
John Crispin
e26f0d86e8 ipq806x: another missing symbol
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 45257
2015-04-03 19:05:57 +00:00
Felix Fietkau
4869387480 ipq806x: clean-up kernel config file
Options that used to be in target config have been added to the generic
config file, so remove them.

Signed-off-by: Mathieu Olivari <mathieu@codeaurora.org>

SVN-Revision: 45255
2015-04-03 18:47:51 +00:00
John Crispin
bb0e931298 ipq806x: add missing symbol
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 45228
2015-04-01 22:57:54 +00:00
John Crispin
bf7eeea7ee ipq806x: clean up kernel conf
Signed-off-by: Mathieu Olivari <mathieu@codeaurora.org>

SVN-Revision: 45211
2015-04-01 08:32:29 +00:00