Commit Graph

274 Commits (fbd4214bb0727268aa535af5b600d38939ec8dbc)

Author SHA1 Message Date
David Bauer b368373fab mpc85xx: add support for OCEDO Panda
CPU:   FSL P1020 (2x 800MHz E500 PPC)
RAM:   1GB DDR3
FLASH: 256MiB NAND
WiFi:  2x Atheros AR9382 2x2:2 abgn
ETH:   2x BCM54616S - 1x BCM53128 8-port switch
LED:   5x LEDs (Power, WiFi1, WiFi2, N/D, SYS)
BTN:   1x RESET

Installation
------------

1. Download initrams kernel image, dtb binary and sysupgrade image.

2. Place initramfs kernel into tftp root directory. Rename to
"panda-uimage-factory".

3. Place dtb binary into tftp root directory. Rename to "panda.fdt".

4. Start tftp server on 192.168.100.8/24.

5. Power up the device with the reset button pressed. It will download
the initrams and dtb via tftp and boot into OpenWRT in RAM.

6. SSH into the device and remove the factory partitions.

 > ubirmvol /dev/ubi0 --name=kernel1
 > ubirmvol /dev/ubi0 --name=rootfs1
 > ubirmvol /dev/ubi0 --name=devicetree1

You will have around 60 MiB of free space with that.

You can also delete "kernel2", "devicetree2", "rootfs2" and "storage"
respectively in case you do not want to go back to the vendor firmware.

7. Modify the U-Boot bootcmd to allow for booting OpenWRT

 > fw_setenv bootcmd_owrt "ubi part ubi && ubi read 0x1000000 kernel
   && bootm 0x1000000"

 > fw_setenv bootargs_owrt "setenv bootargs console=ttyS0,115200
   ubi.mtd=3,2048"

 > fw_setenv bootcmd "run bootargs_owrt; run bootcmd_owrt"

8. Transfer the sysupgrade image via scp into the /tmp directory.

9. Upgrade the device

 > sysupgrade -n /tmp/<imagename>

Signed-off-by: David Bauer <mail@david-bauer.net>
5 years ago
David Bauer 90bfbed7c2 mpc85xx: use generic diag.sh
This commit removes the target-specific diag.sh script. This way, the
generic one is used for the target, which uses DT-aliases to specify the
LEDs used.

This way, we are also able to use different LEDs to indicate different
states. We use green status LEDs for indicating boot and a running
system. Where possible, the red status LED is used to indicate failsafe
mode and a running upgrade.

Signed-off-by: David Bauer <mail@david-bauer.net>
5 years ago
Stijn Tintel a37098a2d0 kernel: bump 4.19 to 4.19.16
Refresh patches.
Remove upstreamed patches:
- backport/096-mips-math-emu-Write-protect-delay-slot-emulation-pages.patch
- backport/096-v4.20-netfilter-ipv6-Preserve-link-scope-traffic-original-.patch
- backport/424-v4.20-net-dsa-fix-88e6060-roaming.patch
- hack/100-mtd-rawnand-qcom-fix-memory-corruption-that-causes-p.patch
- pending/510-f2fs-fix-sanity_check_raw_super-on-big-endian-machines.patch
Update patch that no longer applies:
- backport/343-netfilter-nft_flow_offload-handle-netdevice-events-f.patch

Compile-tested: mesongx
Runtime-tested: mesongx

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
5 years ago
Stijn Tintel 8c6f00ef4f kernel: bump 4.14 to 4.14.93
Refresh patches.
Remove upstreamed patches:
- backport/096-mips-math-emu-Write-protect-delay-slot-emulation-pages.patch
- pending/510-f2fs-fix-sanity_check_raw_super-on-big-endian-machines.patch
- brcm2708/950-0415-qmi_wwan-apply-SET_DTR-quirk-to-the-SIMCOM-shared-de.patch

Compile-tested: ar71xx, ath79, brcm2708/bcm27{08,10}, octeon, x86/64
Runtime-tested: ar71xx, ath79, brcm2708/bcm27{08,10}, octeon, x86/64

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
5 years ago
David Bauer 97e4311fca mpc85xx: add support for Sophos RED 15w Rev.1
Hardware
========
CPU:  Freescale P1010 PowerPC
RAM:  128M DDR3
NAND: 128MiB
ETH:  RTL8211F SGMII PHY
      RTL8367B 5-port RGMII switch
      (not connected to SoC - unmanaged)
WiFi: SparkLan WPEA-121N
       - Atheros AR9382 2T2R abgn
USB:  1x USB 2.0
LED:  System, Router, Internet, Tunnel controllable
      LAN1-4, WAN, Power non-controllable
BTN:  None

Installation
============
1. Power on the device while attached to the Console port.

2. Halt the U-Boot by pressing Enter when prompted.

3. Set the correct bootcmd for booting OpenWRT:
 > setenv bootargs_owrt "setenv bootargs console=ttyS0,115200"
 > setenv bootcmd "run bootargs_owrt;
   nand read 0x1000000 0x300000 0x800000;
   bootm 0x1000000;"
 > saveenv

5. Rename OpenWRT initramfs image to 'kernel.bin' and place it in a
   TFTP server root-directory served on 192.168.1.2/24. Connect your
   computer to one of the LAN-ports.

4. Boot OpenWRT initramfs image with
 > run bootargs_owrt; tftpboot 0x1000000 192.168.1.2:kernel.bin;
   bootm 0x1000000;

6. (Optional)
   Make a Backup of 'sophos-os1', 'sophos-os2' and 'sophos-data' in case
   you ever want to go back to the vendor firmware.

7. Create Ubi Volume on mtd4 by executing
 > ubiformat /dev/mtd4 -y

8. Transfer OpenWRT sysupgrade image to the device via SCP and install it
   with
 > sysupgrade -n <openwrt-image-file>

Back to Stock
=============
If you want to go back to the stock firmware, here is the bootcmd of the
vendor firmware:
 > setenv bootargs console=ttyS0,115200 root=/dev/mtdblock5;
   nand read 0xc00000 0x00300000  0x100000;
   nand read 0x1000000 0x00400000 0x00800000;
   bootm 0x1000000 - 0xc00000

Set it via 'setenv' from the U-Boot shell and don't forget to save it
using 'saveenv'!

After this, boot the OpenWRT initramfs image just like you would for
installation. Write back the three vendor partitions using mtd. Reboot
the device afterwards.

Signed-off-by: David Bauer <mail@david-bauer.net>
[refresh and reorder patches]
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
5 years ago
Pawel Dembicki 46d4c09bb6 mpc85xx: disable initramfs image in TL-WDR4900
Initramfs image isn't required for this device and regular
initramfs generation isn't work properly. It create not working
binaries.

This patch disable initramfs image for TL-WDR4900.

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
5 years ago
Pawel Dembicki 5de6aed42c mpc85xx: add support for Freescale (NXP) P2020RDB
This commit add initial support for Freescale (NXP) P2020RDB

Hardware:
SoC: P2020 2x1GHz
DRAM: 512-1GB DDR3
2 + 4 GBE (2 separate ports and four in VSC7385)
Flash: 16MB NOR, 32MB NAND, 16MB SPI-NOR
PCIE x1 and mPCIE x1
SD Reader

Interfaces:
GBE RJ45 x6
USB2.0 x1
UART x2
I2C x2
JTAG x1
SD x1
PCIE x2 (PCIE and mPCIE)

Flash instructions:
Place sysupgrade image to 0x80000 address in NOR.
Eg. (no brakelines in setenv command):

setenv 'firmware_flash tftpboot $loadaddr $firmwarefile;
 protect off $norfdtaddr +$filesize; erase $norfdtaddr +$filesize;
 cp.b $loadaddr $norfdtaddr $filesize; protect on $norfdtaddr +$filesize;
 cmp.b $loadaddr $norfdtaddr $filesize'
setenv firmwarefile firmware.bin
run firmware_flash

Boot (no brakeline in setenv command):
setenv bootcmd 'setenv bootargs root=/dev/mtdblock3 rw console=$consoledev,
$baudrate rootfstype=squashfs $othbootargs;
bootm $norfdtaddr'
saveenv
boot

Known issues:
-Switch is unmanaged (VSC 7385 is connected via eLBC, driver uses SPI)
-No SD reader support

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com> [refreshed patches]
5 years ago
Christian Lamparter bbe7ad5a2f mpc85xx: 4.19: refresh kernel config
This patch syncs the 4.19 kernel config to the
current generic configuration.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
5 years ago
Christian Lamparter 32420fc6b9 mpc85xx: 4.14: refresh kernel config
This patch syncs the 4.14 kernel config to the
current generic configuration.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
5 years ago
Pawel Dembicki 36d45e4cdc mpc85xx: add kernel 4.19 support
Copied config from 4.14

Add patches for 4.19

Drop patch 103-powerpc-fix-build-cross32ar.patch,
because issue was fixed in upstream.

Compiled: generic p1020
Compiled and tested: (unofficial) P2020, TP-Link TL-WDR4900

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com> [reworded commit]
5 years ago
Pawel Dembicki 576c69938b mpc85xx: tl-wdr4900-v1: convert to mtdsplit image
Currently, the image creation process for the TP-Link tl-wdr4900-v1
needs a fixed sized kernel and places the rootfs partition at a
fixed offset. With the upcoming move to 4.19 the kernel will no
longer fit into the existing allocated space for the kernel
partition.

This patch converts the device to utilize the established
tplink,firmware mtdsplitter, which can deal with a dynamic
kernel/rootfs size.

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com> [reworded commit]
5 years ago
Ryan Mounce 4d2613b01a mpc85xx: workaround 4.14 cross compile issue
Regression introduced with 4.10 by 43c9127d94d62a232ed33ed2eab8a08657ce5472

Build will fail if system 'ar' does not support deterministic builds.
e.g. macOS with Xcode toolchain

Appears to be fixed upstream in 4.18 by af3901cbbd3de182aafb8ee553c825c0074df6a2

Signed-off-by: Ryan Mounce <ryan@mounce.com.au>
6 years ago
Mathias Kresin 80c61c161a treewide: use wpad-basic for not small flash targets
Add out of the box support for 802.11r and 802.11w to all targets not
suffering from small flash.

Signed-off-by: Mathias Kresin <dev@kresin.me>

Mathias did all the heavy lifting on this, but I'm the one who should
get shouted at for committing.

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
6 years ago
Koen Vandeputte 0d0bd8e6da kernel: bump 4.14 to 4.14.76
Refreshed all patches.

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

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
6 years ago
Magnus Kroken ba826ce4e7 mpc85xx: remove kernel 4.9 support
Signed-off-by: Magnus Kroken <mkroken@gmail.com>
6 years ago
Magnus Kroken 650806d83a mpc85xx: switch to kernel 4.14
Signed-off-by: Magnus Kroken <mkroken@gmail.com>
6 years ago
Magnus Kroken c83c180489 mpc85xx: add kernel 4.14 support
Based on patches previously submitted by Achim Gottinger:
http://lists.infradead.org/pipermail/openwrt-devel/2018-June/012719.html

Tested on TP-Link TL-WDR4900 v1.

Signed-off-by: Magnus Kroken <mkroken@gmail.com>
6 years ago
Christian Lamparter 63a7cf6791 treewide: replace 'linux, stdout-path' with 'stdout-path'
This follows a similar upstream patch by Rob Herring:

|commit 78e5dfea84dc15d69940831b3981b3014d17222e
|Author: Rob Herring <robh@kernel.org>
|Date:   Wed Feb 28 16:44:06 2018 -0600
|    powerpc: dts: replace 'linux,stdout-path' with 'stdout-path'
|
|    'linux,stdout-path' has been deprecated for some time in favor of
|    'stdout-path'. Now dtc will warn on occurrences of 'linux,stdout-path'.
|    Search and replace all the of occurrences with 'stdout-path'.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
6 years ago
Matthias Schiffer b452af23a8
mpc85xx: add migration script for TP-Link TL-WDR4900 v1 WLAN PCI paths
PCI paths of the WLAN devices have changed between kernel 4.4 and 4.9;
migrate config so existing wifi-iface definitions don't break.

This is implemented as a hotplug handler rather than a uci-defaults script
as the migration script must run before the 10-wifi-detect hotplug handler.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
6 years ago
Tim Small e97aaf483c WDR4900v1 remove dt node for absent hw crypto.
The WDR4900v1 uses the P1040 SoC, so the device tree pulls in the
definition for the related P1010 SoC.  However, the P1040 lacks the
CAAM/SEC4 hardware crypto accelerator which the P1010 device tree
defines.  If left defined, this causes the CAAM drivers (if present) to
attempt to use the non-existent device, making various crypto-related
operations (e.g. macsec and ipsec) fail.

This commit overrides the incorrect dt node definition in the included
file.

See also:
 - https://bugs.openwrt.org/index.php?do=details&task_id=1262
 - https://community.nxp.com/thread/338432#comment-474107

Signed-off-by: Tim Small <tim@seoss.co.uk>
6 years ago
Kevin Darbyshire-Bryant 7dca1bae82 kernel: bump to 4.9.105
Refresh patches.

Drop patches that have been upstreamed:
target/linux/ar71xx/patches-4.9/106-01-MIPS-ath79-fix-AR724X_PLL_REG_PCIE_CONFIG-offset.patch
target/linux/generic/backport-4.9/095-v4.12-ipv6-Need-to-export-ipv6_push_frag_opts-for-tunnelin.patch
target/linux/generic/pending-4.9/180-net-phy-at803x-add-support-for-AT8032.patch
target/linux/generic/pending-4.9/181-net-usb-add-lte-modem-wistron-neweb-d18q1.patch
target/linux/generic/pending-4.9/182-net-qmi_wwan-add-BroadMobi-BM806U-2020-2033.patch

Compile & run tested: ar71xx Archer C7 v2

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
6 years ago
Koen Vandeputte 12f44b83a8 kernel: bump 4.9 to 4.9.100
Refreshed all patches

Added new ARM64 symbol: ARM64_ERRATUM_1024718

Compile-tested on: ar71xx
Runtime-tested on: ar71xx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
6 years ago
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>
6 years ago
Stijn Tintel f621b53951 kernel: bump 4.9 to 4.9.82
Refresh patches.
Remove upstreamed patches:
- ar7/002-MIPS-AR7-ensure-the-port-type-s-FCR-value-is-used.patch
- backport/040-crypto-fix-typo-in-KPP-dependency-of-CRYPTO_ECDH.patch
Remove layerscape/819-Revert-dmaengine-dmatest-move-callback-wait-queue-to.patch,
it is superseded by upstream commit 297c7cc4b5651b174a62925b6c961085f04979fd.
Remove pending/650-pppoe_header_pad.patch, it is superseded by
upstream commit 1bd21b158e07e0b8c5a2ce832305a0ebfe42c480.
Update patches that no longer apply:
- ar71xx/004-register_gpio_driver_earlier.patch
- hack/204-module_strip.patch
- pending/493-ubi-set-ROOT_DEV-to-ubiblock-rootfs-if-unset.patch

Fixes CVE-2017-8824.

Compile-tested: ar71xx.
Runtime-tested: ar71xx.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
6 years ago
Mathias Kresin c4ac02ffca treewide: remove obsolete sysupgrade watchdog kill
The watchdog kill command was meant for busybox watchdog. Busybox watchdog
was replaced by the procd watchdog mid 2013 with commit df7ce9301a
("busybox: disable the watchdog utility by default"), which makes the kill
command obsolete since quite some time.

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Jo-Philipp Wich 7e99a6ba69 target: disable CONFIG_PROC_PAGE_MONITOR on most targets
Disable CONFIG_PROC_PAGE_MONITOR in most places and only keep it enabled
for virtual targets such as malta or potent ones like x86.

This saves up to 4KB of uncompressed kernel size and significantly
decreases CPU load under certain workloads.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
6 years ago
Mathias Kresin 605ce5f6cd mpc85xx: use image metadata
Append and enforce image metadata. Remove the device specific image
checks, they are replaced by image metadata.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Mathias Kresin dcbbac55ed mpc85xx: use the generic board detect
Use the values populated by the generic board detect function. The
first compatible from the device tree source file will be the board
name in userspace. The model property from the device tree source file
will be the model name.

Change the board name where used in the userspace and drop the target
specific board detect, to use the generic one.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Mathias Kresin f0e1f69f39 mpc85xx: fix TL-WDR4900 v1 compatible string
Use the vendor as it is listed in vendor.txt. Use a standard lower case
compatible string.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Chris Blake 93bfac468e mpc85xx: update HiveAP-330 dts
initramfs is not the proper name for this, as it stores a boot ramdisk
and not a filesystem. Update the name to reflect it's usage correctly.

If CMDLINE_OVERRIDE is enabled, the chosen bootargs aren't used at all.
Drop them from the device tree source file to not cause confusion.

Remove the noinitrd bootarg. Due to the empty ramdisk this parameter
isn't required any longer:

  [    0.000000] Initrd not found or empty - disabling initrd

Use the LEDE mtd-mac-address* device tree properties to set the interfaces
MAC-Addresses.

Signed-off-by: Chris Blake <chrisrblake93@gmail.com>
Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Mathias Kresin 79992d197f mpc85xx: cleanup kernel config
Move the kernel config changes added with the HiveAP 330 to the
subtarget the board belongs to instead of changing the target kernel
config.

While at it, move the TL_WDR4900_V1 config symbol to the containing
subtarget and disable boards we don't support.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Chris Blake ec269290db mpc85xx: use new build code style
The following moves the mpc85xx target (generic & P1020) to the new
build code style.

Compile & Flash tested on an Aerohive HiveAP-330.

Signed-off-by: Chris Blake <chrisrblake93@gmail.com>
Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Chris Blake f2b7d9dc1c mpc85xx: Add Aerohive HiveAP-330 Access Point
The following adds the Aerohive HiveAP-330 Access Point to LEDE under
the mpc85xx/p1020 subtarget.

Hardware:
- SoC: Freescale P1020NSE2DFB
- NAND: Intel JS28F512M29EWH 64MB
- Memory: 2x ProMOS V59C1G01168QBJ3 128MB (Total of 256MB)
- 2.4GHz WiFi: Atheros AR9390-AL1A
- 5.0GHz WiFi: Atheros AR9390-AL1A
- Eth1: Atheros AR8035-A PoE
- Eth2: Atheros AR8035-A
- TPM: Atmel AT97SC3204
- LED Driver: TI LP5521

Flashing:
1. Hook into UART (9600 baud) and enter U-Boot. You may need to enter a
password of administrator or AhNf?d@ta06 if prompted.
2. Once in U-Boot, tftp boot the initramfs image:
    dhcp;
    tftpboot 0x1000000 192.168.1.101:lede-
mpc85xx-p1020-hiveap-330-initramfs.zImage;
    tftpboot 0x6000000 192.168.1.101:lede-mpc85xx-p1020-hiveap-330.fdt;
    bootm 0x1000000 - 0x6000000;
3. Once booted, scp over the sysupgrade file and sysupgrade the device
to flash LEDE to the NAND.
    sysupgrade /tmp/lede-mpc85xx-p1020-hiveap-330-sysupgrade.img

Signed-off-by: Chris Blake <chrisrblake93@gmail.com>
7 years ago
Chris Blake 8cd6686ef8 mpc85xx: Add cmdline override patch
This patch adds a new kernel option called CONFIG_CMDLINE_OVERRIDE. This
setting is for devices with locked down u-boot environments, where users
are unable to change the default bootargs. When set, the fdt driver will
propagate the cmdline for the kernel from chosen/bootargs-override
instead of chosen/bootargs as long as it exists within the DTB.

Signed-off-by: Chris Blake <chrisrblake93@gmail.com>
7 years ago
Chris Blake a92f73e922 mpc85xx: Enable initramfs for p1020 subtarget
The following patch enables building of initramfs images by default for
the P1020 subtarget in mpc85xx.

Signed-off-by: Chris Blake <chrisrblake93@gmail.com>
7 years ago
Mathias Kresin e0b9ec8e96 treewide: drop target board_name functions
They are not used any longer.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Mathias Kresin f12a32630f treewide: use the generic board_name function
Use the generic function instead ot the target specific ones.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Mathias Kresin ac3e05c5d7 treewide: populate boardname and model earlier
For targets using the generic board detection and board specific
settings in diag.sh, the board name is still unset at the time the
set_state() provided by diag.sh is called by 10_indicate_preinit.

Change the execution order to ensure the boardname is populated before
required the first time. Do the target specific board detection as
early as possible, directly followed by the generic one to allow a
seamless switch to the generic function for populating /tmp/sysinfo/.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Stijn Tintel 880f73c327 kernel: cleanup CONFIG_SCHED_HRTICK
Remove CONFIG_SCHED_HRTICK from target configs, as it was added to the
generic config in b47fd76563.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
7 years ago
Sergey Ryazanov 68e7a2a0b7 kernel: disable CONFIG_SG_POOL by default
CONFIG_SG_POOL symbol is selected only by CONFIG_SCSI, since the last
one is disabled by default then disable CONFIG_SG_POOL by default too.
And explicitly enable it only for platforms that use CONFIG_SCSI.

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
7 years ago
Koen Vandeputte e842e16f45 kernel: update kernel 4.9 to 4.9.29
- Refresh all patches
- Removed upstreamed
- Adapted 1

Compile tested on: bcm53xx, cns3xxx, imx6, lantiq
Run tested on: cns3xxx & imx6

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
[update from 4.9.28 to 4.9.29]
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
7 years ago
Alexandru Ardelean 3bdeaa5f0d target: mpc85xx: make kernel_menuconfig
It's the best method I know (so far) to refresh
the kernel config to a default state.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
7 years ago
Alexandru Ardelean 2512741c9a target: mpc85xx: tl_wdr4900_v1: drop 'fsl_rstcr_restart' hook
Since commit:
7120438e5d

Seems that fsl_rstcr_restart() has been converted
to a reset handler and dropped as hook/callback.

Apply the same to the `tl_wdr4900_v1` target.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
7 years ago
Alexandru Ardelean e57d783185 target: mpc85xx: refresh kernel patches
Re-applied patches:
001-powerpc-85xx-add-gpio-keys-to-of-match-table.patch
100-powerpc-85xx-tl-wdr4900-v1-support.patch

Dropped patch:
200-spi-fsl-espi-preallocate-local-buffer.patch
now part of kernel upstream hash
1423877b73

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
7 years ago
Alexandru Ardelean 3688b96226 target: mpc85xx: switch to kernel 4.9
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
7 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>
7 years ago
Felix Fietkau f5c649d7c6 mpc85xx: build i2c support into the kernel instead of packaging it separately
Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Felix Fietkau 96ade7adae mpc85xx: build usb support into the kernel instead of packaging it separately
Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Felix Fietkau c00e5a4f09 mpc85xx: enable the crypto acceleration driver in the kernel config instead of packaging it
Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Mathias Kresin c1578d4fc9 cleanup ucidef_set_interface* usage
- quote the interface name
- remove call of not existing function
- remove the proto if it's the default proto

Signed-off-by: Mathias Kresin <dev@kresin.me>
8 years ago
Mathias Kresin 92eaf27c62 use immediate set in target Makefiles
No functional change, it's just to have the same style everywhere. This
way I don't need to use any regex magic to extract all subtargets for
compile tests.

Signed-off-by: Mathias Kresin <dev@kresin.me>
8 years ago
Felix Fietkau aa53f78038 build: fix subtarget descriptions
Move Target/Description above the target.mk include

Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Christian Lamparter 39f3408732 ppc4xx: remove booke-wdt watchdog package
This patch gets rid of the booke watchdog kmod package.
Instead the affected boards will enable it in their
kernel configs.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
8 years ago
Felix Fietkau 7eeb254cc4 treewide: replace nbd@openwrt.org with nbd@nbd.name
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Dirk Neukirchen d0ef9b4d38 mpc85xx: remove unneeded symbols
Signed-off-by: Dirk Neukirchen <dirkneukirchen@web.de>
8 years ago
John Crispin 74c6b21973 target/mpc85xx: check for 'generic' subtarget for initramfs image file
Copy 'cuImage.tl-wdr4900-v1-initramfs' only for the 'generic' subtarget.
This is a follow-up to:
 http://git.openwrt.org/?p=openwrt.git;a=commitdiff;h=b889fe55c1844aec2c03da28fecb03e958c21f18

We build our initramfs images more rarely, so it took a while
to catch this too.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>

SVN-Revision: 48892
8 years ago
John Crispin cbfec477ce mpc85xx/tl-wdr4900: correct address of the gpio controller
since linux 3.19 the address of the gpio-controller changed

Signed-off-by: Alexander Couzens <lynxis@fe80.eu>

SVN-Revision: 48794
8 years ago
Felix Fietkau 32dea5d2a9 mpc85xx: fix TL-WDR4900 mac address assignment to match original firmware
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 48645
8 years ago
Felix Fietkau 57776e68ce base-files: remove default /etc/config/network, generate it via board.d instead
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 48493
8 years ago
Felix Fietkau 57690041fa kernel: clean up redundant SLUB/SLAB related defines for 4.4
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 48443
8 years ago
Felix Fietkau 93a2b8a6c4 mpc85xx: update to linux 4.4, remove unnecessary patches
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 48297
8 years ago
Felix Fietkau 271a348cda mpc85xx: Add PTP node for TL-WD4900 in device tree
PTP requires at least one timer to be 1PPS so describe it.
For testing, load kernel module gianfar_ptp and use ptp4l
from linuxptp.

Copied from FSL P1010RDB reference design.

Signed-off-by: Wojciech Dubowik <Wojciech.Dubowik@neratec.com>

SVN-Revision: 48275
8 years ago
Jo-Philipp Wich 67e1c87012 all: drop old uci-defaults.sh
Replace former uci-defaults.sh implementation with the uci-defaults-new.sh one
and update all users accordingly.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 47867
9 years ago
Jo-Philipp Wich 08848936dd all: remove redundant board.d/00_model files
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 47753
9 years ago
Jo-Philipp Wich 527ec2af59 all: remove dummy ucidef_set_interface_loopback() from board.d
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 47744
9 years ago
Jo-Philipp Wich 8f8b702f85 board.d: remove redundant ucidef_set_interfaces_lan_wan() calls
This removes calls to ucidef_set_interfaces_lan_wan() and
ucidef_set_interfaces_lan() on boards where all relevant info can be
inferred from the switch definition.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 47722
9 years ago
Jo-Philipp Wich 9b02e73188 board.d: merge ucidef_add_switch() and ucidef_add_switch_ports()
This changes uci-defaults-new.sh, config_generate and all relevant board.d
files in order combine ucidef_add_switch() and ucidef_add_switch_ports() into
a single function.

Also removes now superfluous enable and reset arguments.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 47721
9 years ago
Felix Fietkau e2999a8e5f mpc85xx: fix up m25p80 device id (#21286)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 47691
9 years ago
Jo-Philipp Wich 0c250ad4cc mpc85xx: fix typo added in r47676
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 47681
9 years ago
Jo-Philipp Wich c977dfbec3 mpc85xx: record board id and model name in /etc/board.json
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 47680
9 years ago
Jo-Philipp Wich b4531995c8 mpc85xx: convert to ucidef_add_switch_ports()
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 47676
9 years ago
Jo-Philipp Wich 8e79f25991 mpc85xx: migrate network setup to board detection framework
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 47540
9 years ago
John Crispin df47e4c55b target/mpc85xx: check if 'generic' subtarget for image file cuImage.tl-wdr4900-v1
Only add 'cuImage.tl-wdr4900-v1' to KERNEL_IMAGES if
the selected subtarget is 'generic'.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>

SVN-Revision: 47109
9 years ago
John Crispin 71db293eab mpc85xx: Enable RFKill and USB Power GPIO Control for WDR4900v1
This patch adds the RFKill GPIO control switch and enables another GPIO to
control power supply to USB Ports by emulating an LED GPIO for WDR4900v1.

Signed-off-by: Guo Wei Lim <alphasparc@gmail.com>

SVN-Revision: 46279
9 years ago
Felix Fietkau cb47ccfc77 mpc85xx: disable SPE FPU support until musl gets support for it (fixes #19896)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 46268
9 years ago
Felix Fietkau 7b85e8e316 mpc85xx: TL-WDR4900: Fix port 6 being shown as up (10MBit/half) in LUCI/swconfig
Currently port 6 is shown as up 10MBit/half in LUCI and swconfig.
Reason is that all bits in the port 6 config are zero.
This means that also the aneg flag is not set and in this case
ar8216_read_port_link hardcodes the link to be up.

This is no real problem but a little annoying.
To fix this initialize port 6 with the aneg bit enabled.
This causes ar8216_read_port_link to evaluate the link status bit which is
always zero for port 6 as no PHY is connected to this port.
And it doesn't hurt as port 6 isn't connected to anything on TL-WDR4900.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>

SVN-Revision: 45749
9 years ago
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
9 years ago
Imre Kaloz 3ee45e61fe mpc85xx: replace WDR4900 uci-defaults ethernet MAC address hack with DTS entry
This also changes the MAC address to one of the adresses actually used by the
stock firmware on one of the ethernet interfaces.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>

SVN-Revision: 45599
9 years ago
Imre Kaloz 322d798510 mpc85xx: gianfar: add mtd-mac-address support
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>

SVN-Revision: 45598
9 years ago
Imre Kaloz b9fbf31fe7 mpc85xx: move newly created files from patch files to files directory
This will make these files much more maintainable.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>

SVN-Revision: 45597
9 years ago
Imre Kaloz af69bf56b6 drop 3.19 support
Signed-off-by: Imre Kaloz <kaloz@openwrt.org>

SVN-Revision: 45002
9 years ago
John Crispin fe33c185bd mpc85xx: drop 3.14 support
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 44818
9 years ago
John Crispin d15ac306fa kernel: move KERNFS to generic config
KERNFS symbol is selected by SYSFS, so place it in generic config.

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>

SVN-Revision: 44615
9 years ago
John Crispin f04a268a04 kernel: disable ARCH_NEEDS_CPU_IDLE_COUPLED
Disable ARCH_NEEDS_CPU_IDLE_COUPLED by-default in generic config, since
only one platfrom (omap) needs them.

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>

SVN-Revision: 44614
9 years ago
John Crispin fa097e5ae5 kernel: disbale HAMRADIO in generic config
HAMRADIO enabled in all generic configs, but no one platform directly
use related drivers/protocols. This symbol is only used for kmod-ax25
package modules. Furthermore, half of platforms explicitly disables
this symbol, what silently disables build of modules for kmod-ax25
package.

So disable HAMRADIO by-default in generic config, add it to kmod-ax25
package and remove it from platform specific configs.

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>

SVN-Revision: 44613
9 years ago
John Crispin 6617845711 kernel: move MTD_SPLIT_SUPPORT to generic config
CONFIG_MTD_SPLIT_SUPPORT symbol default value is 'y' and many platform
specific configs explicitly enables it, while no one platform disables
this symbol. So place it in generic config and remove from platform
specific configs.

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>

SVN-Revision: 44612
9 years ago
John Crispin 1175e83f50 mpc85xx: add 3.19 support
It took very little to make the TL-WDR4900 work under 3.19:
- config is the same as for 3.18
- only patch 210 had to be refreshed, the other patches are
  the same as for 3.18
- in /etc/config/wireless the path options need to be prefixed
  with "platform/" ('platform/ffe09000.pci/...')

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>

SVN-Revision: 44517
9 years ago
John Crispin 2f544d56d0 mpc85xx: add mpic timer clock frequency to avoid boot log warning
MPIC timers are enabled in the config, however a devicetree clock setting
is missing causing the following error:
/soc@ffe00000/timer@41100: cannot get timer frequency.
/soc@ffe00000/timer@42100: cannot get timer frequency.

This patch adds the missing clock and avoids the error.
It's a functional copy of this code
do_fixup_by_compat_u32(blob, "fsl,mpic",
        "clock-frequency", get_bus_freq(0), 1);
in arch/powerpc/cpu/mpc85xx/fdt.c in the u-boot code.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>

SVN-Revision: 44501
9 years ago
John Crispin e071f4fd1a mpc85xx: set v3.18 as default
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 44496
9 years ago
John Crispin 7cfc88bac8 mpc85xx: add v3.18 support
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 44485
9 years ago
Luka Perkov 81db848656 targets: base-files: diag.sh does not need to be executable
Signed-off-by: Luka Perkov <luka@openwrt.org>

SVN-Revision: 44305
9 years ago
Luka Perkov 92e6e80080 targets: files in uci-defaults do not need to be executables
Signed-off-by: Luka Perkov <luka@openwrt.org>

SVN-Revision: 44304
9 years ago
John Crispin 019ea725aa add "preinit_regular" diag.sh set_state argument
This new argument is used right after starting regular preinit (which
happens if failsafe wasn't triggered). The main purpose of "preinit"
argument is to indicate that failsafe can be triggered, however we were
missing a way to inform user that we don't wait for a trigger anymore.
With this change it's clear when failsafe mode can be triggered.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>

SVN-Revision: 43715
10 years ago
Felix Fietkau daeec86fba mpc85xx: remove linux 3.10 support
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 43684
10 years ago
John Crispin ce06a742c9 mcp85xx/p1020: fixup config-default
this was missed during the 3.14 bump

Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 43628
10 years ago
Felix Fietkau 1558a6bcbf mpc85xx: fix another typo in the image makefile
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 43625
10 years ago
Felix Fietkau 5c89c4a5de mpc85xx: add missing devicetree ranges property for ethernet devices
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 43624
10 years ago
Felix Fietkau 4db5bc59b1 mpc85xx: fix typo in image name
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 43622
10 years ago
Felix Fietkau 2d9d3e7163 mpc85xx: fix initramfs images
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 43620
10 years ago
Felix Fietkau ceccdc4a31 mpc85xx: update to linux 3.14
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 43413
10 years ago