Commit Graph

63 Commits

Author SHA1 Message Date
Hauke Mehrtens 5d01d05608 kernel: Update kernel 4.14 to version 4.14.202
Compile and runtime tested on x86/64.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2020-10-18 00:32:31 +02:00
Hauke Mehrtens b8336ebab9 kernel: Update kernel 4.14 to version 4.14.195
Compile and runtime tested on x86/64.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2020-08-27 00:19:34 +02:00
Hauke Mehrtens 1f8d9f70c2 kernel: Update kernel 4.14 to version 4.14.187
Fixes:
- CVE-2020-10757

Run tested: x86
Build tested: x86

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2020-07-05 15:02:47 +02:00
Sven Eckelmann d6bbfc8b52 ipq40xx: essedma: Disable TCP segmentation offload for IPv6
It was noticed that the the whole MAC can hang when transferring data from
one ar40xx port (WAN ports) to the CPU and from the CPU back to another
ar40xx port (LAN ports). The CPU was doing only NATing in that process.

Usually, the problem first starts with a simple data corruption:

  $ wget https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-10.4.0-amd64-netinst.iso -O /dev/null
  ...
  Connecting to saimei.ftp.acc.umu.se (saimei.ftp.acc.umu.se)|2001:6b0:19::138|:443... connected.
  ...
  Read  error at byte 48807936/352321536 (Decryption has failed.). Retrying.

But after a short while, the whole MAC will stop to react. No traffic can
be transported anymore from the CPU port from/to the AR40xx PHY/switch and
the MAC has to be resetted.

The whole problem can be avoided by disabling the TSO for IPv6 for this
ethernet MAC driver.

Signed-off-by: Sven Eckelmann <sven@narfation.org>
Acked-by: John Crispin <john@phrozen.org>
(backported from commit 6785695056,
with updated commit message)
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2020-06-13 17:41:57 +02:00
Koen Vandeputte e38f355569 kernel: bump 4.14 to 4.14.172
Refreshed all patches.

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

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2020-03-09 20:45:11 +01:00
Koen Vandeputte 2219b0258d ipq40xx: fix build error
Add missing brace which was accidentally omitted

Fixes: 6d6026021390 ("kernel: bump 4.14 to 4.14.154")
Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2019-11-20 09:27:55 +01:00
Koen Vandeputte 0a9147be6a kernel: bump 4.14 to 4.14.154
Refreshed all patches.

Altered patches:
- 902-debloat_proc.patch
- 040-dmaengine-qcom-bam-Process-multiple-pending-descript.patch

Remove upstreamed:
- 303-spi-nor-enable-4B-opcodes-for-mx66l51235l.patch

New symbols:
X86_INTEL_MPX
X86_INTEL_MEMORY_PROTECTION_KEYS
X86_INTEL_TSX_MODE_OFF
X86_INTEL_TSX_MODE_ON
X86_INTEL_TSX_MODE_AUTO
SGL_ALLOC

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

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2019-11-19 15:03:17 +01:00
David Bauer dcfca830a8 ipq40xx: copy Fritz4040 UBoot to STAGING_DIR_IMAGE
Copy U-Boot to STAGING_DIR_IMAGE (and append it to the EVA-image from
there) to fix image generation using the image-builder.

Also remove the bootloader from DEVICE_PACKAGES and instead use the
BUILD_DEVICES directive from within the U-Boot makefile.

This fixes eva-image generation using the OpenWRT image-builder.

Signed-off-by: David Bauer <mail@david-bauer.net>
(cherry picked from commit 634c733065)
2019-03-18 20:41:02 +01:00
Koen Vandeputte 1be6ff6dc0 kernel: bump 4.14 to 4.14.102
Refreshed all patches.

Remove upstreamed:
- 272-uapi-if_ether.h-prevent-redefinition-of-struct-ethhd.patch

Remove upstreamed hunks:
- 105-pinctrl-msm-fix-gpio-hog-related-boot-issues.patch

Fixes:
- CVE-2018-1000026

Compile-tested on: cns3xxx, imx6
Runtime-tested on: cns3xxx, imx6

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2019-02-25 10:23:44 +01:00
Koen Vandeputte 7b0e1d28e8 kernel: bump 4.14 to 4.14.89
Refreshed all patches.

Compile-tested on: cns3xxx, imx6
Runtime-tested on: cns3xxx, imx6

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2018-12-18 15:12:06 +01:00
Koen Vandeputte 2213b20aee kernel: bump 4.14 to 4.14.86
Refreshed all patches.

Altered patches:
- 180-usb-xhci-add-support-for-performing-fake-doorbell.patch

Compile-tested on: cns3xxx, imx6
Runtime-tested on: cns3xxx, imx6

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2018-12-13 13:28:54 +01:00
Marek Lindner fbadfecbb5 ipq40xx: fix openmesh sysupgrade with tar content out of order
The tar extraction depends on the order in which the files
are added to the tar file. Since the order is not guaranteed
and depends on the host system, the combined mtd write fails
with sysupgrade images built on some systems.
Fix by changing to tar file order independent mtd write.

Fixes: 86e18f6706 ("ipq806x: add support for OpenMesh A42")
Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
2018-12-05 09:09:38 +01:00
Koen Vandeputte f9c79947b5 kernel: bump 4.14 to 4.14.79
Refreshed all patches.

Compile-tested on: cns3xxx, imx6, x86_64
Runtime-tested on: cns3xxx, imx6, x86_64

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2018-11-05 16:00:47 +01:00
Koen Vandeputte 47f68ca586 kernel: bump 4.14 to 4.14.77
Refreshed all patches.

Altered patches:
- 666-Add-support-for-MAP-E-FMRs-mesh-mode.patch

New symbol for arm targets:
    - HARDEN_BRANCH_PREDICTOR

Compile-tested on: cns3xxx, imx6, x86_64
Runtime-tested on: cns3xxx, imx6, x86_64

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
Tested-by: Stijn Tintel <stijn@linux-ipv6.be>
2018-10-19 10:00:48 +02:00
Koen Vandeputte 81b2bf8e3b kernel: bump 4.14 to 4.14.72
Refreshed all patches.

Removed upstreamed:
- 180-earlycon-initialize-port-uartclk-based-on-clock-frequency-property.patch
- 181-earlycon-remove-hardcoded-port-uartclk-initialization-in-of_setup_earlycon. patch
- 700-1-6-e1000e-Remove-Other-from-EIAC.patch
- 700-2-6-Partial-revert-e1000e-Avoid-receiver-overrun-interrupt-bursts.patch
- 700-3-6-e1000e-Fix-queue-interrupt-re-raising-in-Other-interrupt.patch
- 700-4-6-e1000e-Avoid-missed-interrupts-following-ICR-read.patch

Compile-tested on: cns3xxx, imx6
Runtime-tested on: cns3xxx, imx6

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2018-09-26 15:55:23 +02:00
Koen Vandeputte def9d215ac kernel: bump 4.14 to 4.14.67
Refreshed all patches.

Removed upstreamed patches:
- 037-v4.18-0008-ARM-dts-BCM5301x-Fix-i2c-controller-interrupt-type.patch

Compile-tested on: cns3xxx, imx6
Runtime-tested on: cns3xxx, imx6

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2018-08-28 23:06:48 +02:00
Hauke Mehrtens bfc9a4401b kernel: bump kernel 4.14 to version 4.14.63
The following patches were integrated upstream:
 * target/linux/ipq40xx/patches-4.14/050-0006-mtd-nand-qcom-Add-a-NULL-check-for-devm_kasprintf.patch
 * target/linux/mediatek/patches-4.14/0177-phy-phy-mtk-tphy-use-auto-instead-of-force-to-bypass.patch

This fixes tries to work around the following security problems:
 * CVE-2018-3620 L1 Terminal Fault OS, SMM related aspects
 * CVE-2018-3646 L1 Terminal Fault Virtualization related aspects

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2018-08-15 22:40:58 +02:00
David Bauer dc52b7b104
ipq40xx: add get_status_led to diag.sh
This commit adds the get_status_led method to diag.sh, which sets the
boot-led as status-led for scripts using this method to get a
status-led.

This method is used platform-independent in downstream project gluon to
set the LED used to indicate the config-mode.

Signed-off-by: David Bauer <mail@david-bauer.net>
(cherry picked from commit 4fc005197a)
2018-07-15 20:08:44 +02:00
Koen Vandeputte ca903c73c7 kernel: bump 4.14 to 4.14.54 for 18.06
Refreshed all patches

Reworked patches to match upstream:
335-v4.16-netfilter-nf_tables-add-single-table-list-for-all-fa.patch

Compile-tested on: cns3xxx, imx6, x86_64
Runtime-tested on: cns3xxx, imx6, x86_64

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2018-07-12 13:54:24 +02:00
Stijn Segers ab7cabd09d kernel: bump 4.14 to 4.14.52 for 18.06
Compile-tested on: ramips/mt7621, x86/64.
Run-tested on: ramips/mt7621.

Signed-off-by: Stijn Segers <foss@volatilesystems.org>
2018-07-02 07:06:23 +02:00
Magnus Frühling 36234df96c ipq40xx: add support for ZyXEL WRE6606
Specifications:
SOC:	Qualcomm IPQ4018 (DAKOTA) ARM Quad-Core
RAM:	128 MB Nanya NT5CC64M16GP-DI
FLASH:	16 MiB Macronix MX25L12845EMI-12G
ETH:	Qualcomm QCA8072
WLAN1:  Qualcomm Atheros QCA4018 2.4GHz 802.11b/g/n 2x2
WLAN2:  Qualcomm Atheros QCA4018 5GHz 802.11n/ac W2 2x2
INPUT:  WPS, Mode-toggle-switch
LED:	Power, WLAN 2.4GHz, WLAN 5GHz, LAN, WPS
        (LAN not controllable by software)
        (WLAN each green / red)
SERIAL:	Header next to eth-phy.
        VCC, TX, GND, RX (Square hole is VCC)
        The Serial setting is 115200-8-N-1.

Tested and working:
 - Ethernet (Correct MAC-address)
 - 2.4 GHz WiFi (Correct MAC-address)
 - 5 GHz WiFi (Correct MAC-address)
 - Factory installation from tftp
 - OpenWRT sysupgrade
 - LEDs
 - WPS Button

Not Working:
 - Mode-toggle-switch

Install via TFTP:

Connect to the devices serial. Hit Enter-Key in bootloader to stop
autobooting. Command `tftpboot` will pull an initramfs image named
`C0A86302.img` from a tftp server at `192.168.99.08/24`.
After successfull transfer, boot the image with `bootm`.

To persistently write the firmware, flash an openwrt sysupgrade image
from inside the initramfs, for example transfer
via `scp <sysupgrade> root@192.168.1.1:/tmp` and flash on the device
with `sysupgrade -n /tmp/<sysupgrade>`.

append-cmdline patch taken from chunkeeys work on the NBG6617.

Signed-off-by: Magnus Frühling <skorpy@frankfurt.ccc.de>
Co-authored-by: David Bauer <mail@david-bauer.net>
Co-authored-by: Christian Lamparter <chunkeey@googlemail.com>
(cherry picked from commit 4b280ad91a)
2018-06-21 07:02:37 +02:00
Chen Minqiang 520c656d7b ipq40xx: essedma: fixup ip align
This fixup ip align in essedma driver rx path
see cat /proc/cpu/alignment
which reports alignment-fixups without this fix.

Signed-off-by: Chen Minqiang <ptpt52@gmail.com>
(cherry picked from commit 8f804f42d5)
2018-06-18 21:21:55 +02:00
Stijn Segers 1199a91095 kernel: bump 4.14 to 4.14.48 for 18.06
Refreshed patches. The following patches were upstreamed and have been deleted:

* target/linux/lantiq/patches-4.14/0025-MIPS-lantiq-gphy-Remove-reboot-remove-reset-asserts.patch
* target/linux/generic/pending-4.14/101-clocksource-mips-gic-timer-fix-clocksource-counter-w.patch
* target/linux/generic/pending-4.14/103-MIPS-c-r4k-fix-data-corruption-related-to-cache-coherence.patch
* target/linux/generic/pending-4.14/181-net-usb-add-lte-modem-wistron-neweb-d18q1.patch

Compile-tested: ramips/mt7621, x86/64
Run-tested: ramips/mt7621

Signed-off-by: Stijn Segers <foss@volatilesystems.org>
2018-06-07 09:03:24 +02:00
David Bauer 9361c359e4 ipq40xx: add eva-image for FRITZ!Box 4040
This commit adds an EVA flashable image for the FRITZ!Box 4040.

The image contains the U-Boot with OpenWRT appended to it. This way we
remove the need to use UART for initial flashing.

Signed-off-by: David Bauer <mail@david-bauer.net>
(cherry picked from commit 70e6ea319d)
2018-05-24 17:24:31 +02:00
Sergey Ryazanov 23cdf9f246 kernel: enable THIN_ARCHIVES by default
THIN_ARCHIVES option is enabled by default in the kernel configuration
and no one target config disables it. So enable it by default and remove
this symbol from target specific configs to keep them light.

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
(cherry picked from commit 67a3cdcbb0)
2018-05-24 17:24:31 +02:00
Sergey Ryazanov 16e0866a74 kernel: enable FUTEX_PI by default
New FUTEX_PI configuration symbol enabled if FUTEX and RT_MUTEX symbols
are enabled. Both of these symbols are enabled by default in the
generic config, so enable FUTEX_PI by default too to keep platform
specific configs minimal.

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
(cherry picked from commit bdc2b58c4b)
2018-05-24 17:24:31 +02:00
Sergey Ryazanov 1f26cfc92b kernel: enable EXPORTFS by default
OVERLAY_FS config symbol selects EXPORTFS since 4.12 kernel, we have
OVERLAY_FS enabled by default, so enable EXPORTFS in the generic config
of 4.14 and remove this option from platform specific configs.

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
(cherry picked from commit a08b0d0c31)
2018-05-24 17:24:31 +02:00
Sergey Ryazanov 294a45adbe kernel: disable DRM_LIB_RANDOM by default
DRM_LIB_RANDOM config symbol selected only by DRM_DEBUG_MM_SELFTEST
which is disable by default, so disable DRM_LIB_RANDOM by default too.

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
(cherry picked from commit 978543a246)
2018-05-24 17:24:30 +02:00
Sergey Ryazanov 1deadfe3de kernel: disable DMA_{NOOP|VIRT}_OPS by default
These options do not used by any supported arch, so disable them by
default to make arch configs a bit more clean.

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
(cherry picked from commit ead26e9db6)
2018-05-24 17:24:30 +02:00
Sergey Ryazanov 95922e16d7 kernel: disable ARCH_WANTS_THP_SWAP by default
Only one arch (x86_64) enables this option. So disable
ARCH_WANTS_THP_SWAP by default and remove referencies to it from all
configs (except x86_64) to make them clean.

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
(cherry picked from commit f928c338ad)
2018-05-24 17:24:30 +02:00
Roman Yeryomin f882f4474f ipq40xx: fix ethernet on ap-dk01.1
Not sure how it worked before but ethernet is disabled
by default in ipq4019 dtsi.

Signed-off-by: Roman Yeryomin <roman@advem.lv>
(cherry picked from commit 1f42deec8e)
2018-05-24 17:24:30 +02:00
Koen Vandeputte 6cd41b419c kernel: bump 4.14 to 4.14.36
Refreshed all patches.

Compile-tested on: cns3xxx, imx6
Runtime-tested on: cns3xxx, imx6

Fixes for CVEs:
CVE-2018-1108
CVE-2018-1092
CVE-2018-1094
CVE-2018-1095

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
Tested-by: Stijn Segers <foss@volatilesystems.org>
2018-04-26 08:54:01 +02:00
Sven Eckelmann 0b20490207 ipq40xx: add support for OpenMesh A62
* QCA IPQ4019
* 256 MB of RAM
* 32 MB of SPI NOR flash (s25fl256s1)
  - 2x 15 MB available; but one of the 15 MB regions is the recovery image
* 2T2R 2.4 GHz
  - QCA4019 hw1.0 (SoC)
  - requires special BDF in QCA4019/hw1.0/board-2.bin with
    bus=ahb,bmi-chip-id=0,bmi-board-id=20,variant=OM-A62
* 2T2R 5 GHz (channel 36-64)
  - QCA9888 hw2.0 (PCI)
  - requires special BDF in QCA9888/hw2.0/board-2.bin
    bus=pci,bmi-chip-id=0,bmi-board-id=16,variant=OM-A62
* 2T2R 5 GHz (channel 100-165)
  - QCA4019 hw1.0 (SoC)
  - requires special BDF in QCA4019/hw1.0/board-2.bin with
    bus=ahb,bmi-chip-id=0,bmi-board-id=21,variant=OM-A62
* multi-color LED (controlled via red/green/blue GPIOs)
* 1x button (reset; kmod-input-gpio-keys compatible)
* external watchdog
  - triggered GPIO
* 1x USB (xHCI)
* TTL pins are on board (arrow points to VCC, then follows: GND, TX, RX)
* 2x gigabit ethernet
  - phy@mdio3:
    + Label: Ethernet 1
    + gmac0 (ethaddr) in original firmware
    + 802.3at POE+
  - phy@mdio4:
    + Label: Ethernet 2
    + gmac1 (eth1addr) in original firmware
    + 18-24V passive POE (mode B)
* powered only via POE

The tool ap51-flash (https://github.com/ap51-flash/ap51-flash) should be
used to transfer the factory image to the u-boot when the device boots up.

The initramfs image can be started using

  setenv bootargs 'loglevel=8 earlycon=msm_serial_dm,0x78af000 console=ttyMSM0,115200 mtdparts=spi0.0:256k(0:SBL1),128k(0:MIBIB),384k(0:QSEE),64k(0:CDT),64k(0:DDRPARAMS),64k(0:APPSBLENV),512k(0:APPSBL),64k(0:ART),64k(0:custom),64k(0:KEYS),15552k(inactive),15552k(inactive2)'
  tftpboot 0x84000000 openwrt-ipq40xx-openmesh_a62-initramfs-fit-uImage.itb
  set fdt_high 0x85000000
  bootm 0x84000000

Signed-off-by: Sven Eckelmann <sven.eckelmann@openmesh.com>
2018-04-23 22:07:22 +02:00
Sven Eckelmann c6aac196b8 ipq40xx: fix gpio-hog related boot issues
The pinctrl initialization fails with the MSM pinctrl code and gpio-hogs
because either the gpio ranges are not yet initialized (missing gpio-range
in DT) or that the msm driver unconditionally tries to re-initializes the
ranges (gpio-range in DT).

To allow gpio-hogs and similar early-boot gpio code, the gpio-ranges must
be in the device tree and the pinctrl-msm code must check whether the range
was already initialized by the DT.

Signed-off-by: Sven Eckelmann <sven.eckelmann@openmesh.com>
[drop changes to unrelated dtsi files, refresh patches]
Signed-off-by: Mathias Kresin <dev@kresin.me>
2018-04-23 22:07:22 +02:00
Sven Eckelmann 856f0d5d0d ipq40xx: use upstream board-2.bin
The BDFs for all boards were upstreamed to the ath10k-firmware
repository and are now part of ath10k-firmware 2018-04-19.

Signed-off-by: Sven Eckelmann <sven.eckelmann@openmesh.com>
2018-04-23 22:07:22 +02:00
Thomas Hebb 16b25ad829 ipq40xx: ex61x0v2: Disable unused GMACs
These devices have only one ethernet port. It doesn't make sense to
expose the unused GMACs as separate network devices.

Signed-off-by: Thomas Hebb <tommyhebb@gmail.com>
2018-04-20 20:58:52 +02:00
Sven Eckelmann c4c2a8f00c ipq40xx: Move reserved-memory DT to qcom-ipq4019.dtsi
The tz and smem reserved-memory information handled in the upstream Linux
sources by the SoC specific dtsi and not by the the boards dts. Using the
same approach in OpenWrt avoids unneccessary duplication.

Signed-off-by: Sven Eckelmann <sven.eckelmann@openmesh.com>
2018-04-20 20:58:52 +02:00
Sven Eckelmann 0d62432834 ipq40xx: Remove unused reserved-memory nodes
The reserved-memory regions are mostly undocumented by QCA and are named
very unspecific in the QSDK device trees. It was tried to clean them up by
commit 71ed9f10a3 ("ipq40xx: Use detailed reserved memory for A42") and
similar changes.

The features which require these regions were mostly unknown but
Senthilkumar N L <snlakshm@qti.qualcomm.com> and Sricharan Ramabadhran
<srichara@qti.qualcomm.com> provided some more insight in some of them:

* crash dump feature
  - a couple of regions used when 'qca,scm_restart_reason' dt node has the
    value 'dload_status' not set to 1
    + apps_bl <0x87000000 0x400000>
    + sbl <0x87400000 0x100000>
    + cnss_debug <0x87400000 0x100000>
    + cpu_context_dump <0x87b00000 0x080000>
  - required driver not available in Linux
  - safe to remove
* QSEE app execution
  - region tz_apps <0x87b80000 0x280000>
  - required driver not available in Linux
  - safe to remove
* communication with TZ/QSEE
  - region smem <0x87b80000 0x280000>
  - driver changes not yet upstreamed
  - must not be removed because any access can crash kernel/program
* trustzone (QSEE) private memory
  - region tz <0x87e80000 0x180000>
  - must not be removed because any access can crash kernel/program

Removing the unnecessary regions saves some kilobyte of reserved-memory and
cleans up the device tree:

* 2560 KiB
  - 8devices Jalapeno
  - AVM FRITZ!Box 4040
  - Compex WPJ428
  - Meraki MR33 Access Point
  - OpenMesh A42
* 14336 KiB
  - GL.iNet GL-B1300
  - Qualcomm Technologies, Inc. IPQ40xx/AP-DK01.1-C1

Signed-off-by: Sven Eckelmann <sven.eckelmann@openmesh.com>
2018-04-20 20:58:52 +02:00
Mathias Kresin 74a0d8cd92 build: consolidate fake uImage header build commands
Merge the two existing functions and use a parameter for the type
header field.

It updates the syntax of the former mpc85xx fake ramdisk header
command to be compatible with mkimage from u-boot 2018.03 and fixes the
build error spotted by the build bot.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2018-04-20 20:58:52 +02:00
Stijn Tintel ec1d7b9461 kernel: bump 4.14 to 4.14.34
Refresh patches.
Update patches that no longer apply:
- backport/313-netfilter-remove-defensive-check-on-malformed-packet.patch
- pending/642-net-8021q-support-hardware-flow-table-offload.patch

Compile-tested: x86/64.
Runtime-tested: x86/64.

Signed-off-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2018-04-16 00:22:57 +03:00
Mathias Kresin fb528b1674 ipq40xx: unbundle firmware and board file
Don't select the firmware with the board file, it prevents an easy use
of the -ct ath10k firmware. Select the firmware within the default
packages instead.

Remove the per device selection of the firmware now that it the
firmware is selected by default.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2018-04-13 07:48:19 +02:00
David Bauer 970f1914be ipq40xx: add support for Netgear EX6100v2/EX6150v2
Specifications:
SOC:	Qualcomm IPQ4018 (DAKOTA) ARM Quad-Core
RAM:	256 MB Winbond W632GU6KB12J
FLASH:	16 MiB Macronix MX25L12805D
ETH:	Qualcomm QCA8072
WLAN1:  Qualcomm Atheros QCA4018 2.4GHz 802.11b/g/n/ac 2x2
WLAN2:  Qualcomm Atheros QCA4018 5GHz 802.11n/ac
	1x1 (EX6100)
	2x2 (EX6150)
INPUT:  Power, WPS, reset button
	AP / Range-extender toggle
LED:	Power, Router, Extender (dual), WPS, Left-/Right-arrow
SERIAL:	Header next to QCA8072 chip.
	VCC, TX, RX, GND (Square hole is VCC)
	WARNING: The serial port needs a TTL/RS-232 v3.3 level converter!
        The Serial setting is 115200-8-N-1.

Tested and working:
 - Ethernet
 - 2.4 GHz WiFi (Correct MAC-address)
 - 5 GHz WiFi (Correct MAC-address)
 - Factory installation from WebIF
 - Factory installation from tftp
 - OpenWRT sysupgrade (Preserving and non-preserving)
 - LEDs
 - Buttons

Not Working:
 - AP/Extender toggle-switch

Untested:
 - Support on EX6100v2. They share the same GPL-Code and vendor-images.
   The 6100v2 seems to lack one 5GHz stream and differs in the 5GHz
   board-blob. I only own a EX6150v2, therefore i am only able to verify
   functionality on this device.

Install via Web-Interface:
Upload the factory image to the device to the Netgear Web-Interface.
The device might asks you to confirm the update a second time due to
detecting the OpenWRT firmware as older. The device will automatically
reboot after the image is written to flash.

Install via TFTP:
Connect to the devices serial. Hit Enter-Key in bootloader to stop
autobooting. Command "fw_recovery" will start a tftp server, waiting for
a DNI image to be pushed.
Assign your computer the IP-address 192.168.1.10/24. Push image with
tftp -4 -v -m binary 192.168.1.1 -c put <OPENWRT_FACTORY>
Device will erase factory-partition first, then writes the pushed image
to flash and reboots.

Parts of this commit are based on Thomas Hebb's work on the
openwrt-devel mailinglist.

See https://lists.openwrt.org/pipermail/openwrt-devel/2018-January/043418.html

Signed-off-by: David Bauer <mail@david-bauer.net>
2018-04-13 07:48:19 +02:00
Robert Marko be6e28b516 ipq-wifi: Add 8devices Jalapeno
Add custom board-2.bin for 8devices Jalapeno.
Upstreaming is in progress.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2018-04-13 07:48:19 +02:00
Robert Marko 1e341bb5ef ipq40xx: add support for 8devices Jalapeno
This patch adds support for 8devices Jalapeno.

Specification:
QCA IPQ4018, Quad core ARM v7 Cortex A7 717MHz
256 MB of DDR3 RAM
8 MB of SPI NOR flash
128 MB of Winbond SPI NAND flash
WLAN1: Qualcomm Atheros QCA4018 2.4GHz 802.11bgn 2:2x2
requires special BDF in QCA4019/hw1.0/board-2.bin with:
bus=ahb,bmi-chip-id=0,bmi-board-id=16,variant=8devices-Jalapeno
WLAN2: Qualcomm Atheros QCA4018 5GHz 802.11a/n/ac 2:2x2
requires special BDF in QCA4019/hw1.0/board-2.bin with:
bus=ahb,bmi-chip-id=0,bmi-board-id=17,variant=8devices-Jalapeno
ETH: Qualcomm Atheros QCA8072 Gigabit Switch (1 x LAN, 1 x WAN)
phy@mdio3:
Label: eth0
gmac0
phy@mdio4:
Label: eth1
gmac1

Installation instructions:
Since boards ship with old version of LEDE installation is simple.
Just use sysupgrade -n -F sysupgrade.bin

Syuspgrade needs to be forced since OpenWRT uses DT detection in recent
releases.

If you get error that FIT configuration is not found during boot it is
due to older U-boot used on your board.
That is because 8devices used custom FIT configuration partition name
as they internally had v1 and v2 boards.
Only v2 boards are sold so now they are shipping boards with never
U-boot using generic config@1 FIT partition name.

Also for old uboot it is possible to force loading config@1 by changing
uboot environment:

setenv boot5 'bootm 0x84000000#config@1’
saveenv

Signed-off-by: Robert Marko <robimarko@gmail.com>
2018-04-13 07:48:19 +02:00
Stijn Segers 41a881a8d9 Kernel: bump 4.14 to 4.14.29
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>
2018-03-23 23:49:55 +01:00
Sven Eckelmann 7004f681cd ipq40xx: Add reserved memory for WPJ428
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>
2018-03-23 20:31:49 +01:00
Sven Eckelmann 71ed9f10a3 ipq40xx: Use detailed reserved memory for A42
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>
2018-03-23 20:31:49 +01:00
Sven Eckelmann 1fcd625c0a ipq40xx: Remove phy reset gpio from Cisco Meraki MR33
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>
2018-03-23 20:31:49 +01:00
Sven Eckelmann 7a8017b0ae ipq40xx: Adjust SoC name of AVM Fritz!Box 4040
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>
2018-03-23 20:31:49 +01:00
Sven Eckelmann 9ca81646b9 ipq40xx: Use constant to set gpio active low/high
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>
2018-03-23 20:31:49 +01:00