Commit Graph

169 Commits (05d73a2a73794f8a978300eac75e25deae6d0626)

Author SHA1 Message Date
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
Felix Fietkau 1846efcaaf mpc85xx: refresh linux 3.14 patches
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 43412
10 years ago
Felix Fietkau d33db91a38 mpc85xx: remove the PHY reset change patch (no longer necessary)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 43411
10 years ago
John Crispin b994aca1e4 mpc85xx: fix missing dts target for kernel 3.14
With kernel 3.14 dts target p1010rdb was renamed to p1010rdb-pa.
To maintain compatibility define p1010rdb-pa as new standard and
copy p1010rdb.dts to p1010rdb-pa.dts under 3.10.

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

SVN-Revision: 43371
10 years ago
John Crispin bd164f233c mpc85xx: add 3.14 kernel support for mpc85xx platform
This patch adds 3.14 kernel support for the mpc85xx platform.
Works fine here with a TL-WDR4900 which seems to be the only
supported device using this platform.
There might be differences depending on HW version, therefore
I'd ask others to test too.

Changes to 3.10
  missing config options added to 3.14 config file
  patch 001: rebased
  patch 100: rebased
  patch 110: rebased
  patch 120: rebased
  patch 130: rebased
  patch 140: minor adjustment
  patch 200: removed, change went upstream
  patch 210: rebased
  patch 220: removed, change went upstream
  patch 750: new, fixes an issue with ethernet port autoneg being
             disabled due to changes in kernel phy handling

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

SVN-Revision: 43308
10 years ago
John Crispin c997410461 mpc85xx: fix WAN/LAN-MAC for TP-LINK TL-WDR4900 v1
This works around a bootloader issue where every device
has the same lan/wan-mac 00:04:9f:ef:01:01 - with this patch
we read the macs from config-partition during initial network
setup. We have 9 valid macs stored in the partition, the
1st two are used for the radios, 3 and 4 are now used for WAN/LAN.

on an already setup / running device we can get the real macs with
. /lib/functions.sh
. /lib/functions/system.sh
echo "LAN = $(mtd_get_mac_binary config 338)"
echo "WAN = $(mtd_get_mac_binary config 344)"

see:
https://dev.openwrt.org/ticket/14714

from the ticket / user klondike:
U-Boot passed this commit ecd1a09b81
http://u-boot.10912.n7.nabble.com/U-Boot-PATCH-mpc83xx-remove-hardcoded-network-addresses-from-config-files-td44372.html
I suppose to prevent this particular issue, but the WDR4900 may be using an old bootloader still affected.
                                                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

I have been checking the contents of the dtb on the flash, this particular bit is quite revealing:

ethernet@b0000 {
                        #address-cells = <0x1>;
                        #size-cells = <0x1>;
                        device_type = "network";
                        model = "eTSEC";
                        compatible = "fsl,etsec2";
                        fsl,num_rx_queues = <0x8>;
                        fsl,num_tx_queues = <0x8>;
                        local-mac-address = [00 00 00 00 00 00];
                                             ^^^^^^^^^^^^^^^^^

                        interrupt-parent = <0x2>;
                        phy-handle = <0x3>;
                        phy-connection-type = "rgmii-id";
                        ptimer-handle = <0x4>;

                        queue-group@0 {
                                #address-cells = <0x1>;
                                #size-cells = <0x1>;
                                reg = <0xb0000 0x1000>;
                                rx-bit-map = <0xff>;
                                tx-bit-map = <0xff>;
                                interrupts = <0x1d 0x2 0x1e 0x2 0x22 0x2>;
                        };
                };

I also have been checking the live device map to find this:

root@GHS-AP3:~# hexdump -C /proc/device-tree/soc@ffe00000/ethernet@b0000/local-mac-address
00000000  00 04 9f ef 01 01                                 |......|
00000006
root@GHS-AP3:~# hexdump -C /proc/device-tree/soc@ffe00000/ethernet@b1000/local-mac-address
*
root@GHS-AP3:~# hexdump -C /proc/device-tree/soc@ffe00000/ethernet@b2000/local-mac-address
*

My conclussion is that U-Boot most likely finds the device and (as no valid MAC-address is provided)
falls back to the default MAC provided by the old code, the kernel then receives thee modified
device map from U-Boot and assumes this is the correct MAC for the device despite it obviously isn't.

This can be seen at
target/linux/mpc85xx/patches-3.10/140-powerpc-85xx-tl-wdr4900-v1-support.patch

The enetaddr is filled up by using the device tree data by the process_boot_dtb
function and used by the platform_fixups function to set the eth0 address
(by calling dt_fixup_mac_address_by_alias("ethernet0", enetaddr); ).
But instead we should be used the device address which to my understanding is
provided in the mtd.

Signed-off-by: Bastian Bittorf <bittorf@bluebottle.com>

SVN-Revision: 43074
10 years ago