Commit Graph

28166 Commits

Author SHA1 Message Date
Bo Shen
cd5ca303c4 ARM: atmel: sama5d4ek: enable usb ethernet gadget
Signed-off-by: Bo Shen <voice.shen@atmel.com>
2015-01-19 15:02:46 +01:00
Bo Shen
da08d791d9 ARM: atmel: sama5d4ek: add option for usb ethernet gadget
Add the option for USB Ethernet gadget based on atmel usb
device.

Signed-off-by: Bo Shen <voice.shen@atmel.com>
2015-01-19 15:02:45 +01:00
Bo Shen
765ece8b13 ARM: atmel: sama5d4: add usb device initial code
Signed-off-by: Bo Shen <voice.shen@atmel.com>
2015-01-19 15:02:44 +01:00
Bo Shen
e05e46ed3c ARM: atmel: sama5d4: add usb platform data
The SAMA5D4 has the same usb platform data with SAMA5D3 SoC.

Signed-off-by: Bo Shen <voice.shen@atmel.com>
2015-01-19 15:02:43 +01:00
Simon Glass
d4798a2b52 arm: at91: snapper9260: Drop invalid CONFIG_SKIP_RELOCATE_UBOOT
This config is not valid, so drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
2015-01-19 12:49:32 +01:00
Wu, Josh
05a4d54429 ARM: at91: sama5d3_xplained: spl: enable PMECC header generation
As sama5d3 xplained support the PMECC. So add the PMECC header for spl
binary. That make ROM loader can use PMECC to avoid error flips in spl
code in nandflash.

Signed-off-by: Josh Wu <josh.wu@atmel.com>
Acked-by: Bo Shen <voice.shen@atmel.com>
2015-01-19 12:49:31 +01:00
Heiko Schocher
ab88f471e3 arm, at91, axm: add SPL support for axm
add SPL support also for the axm board.

Signed-off-by: Heiko Schocher <hs@denx.de>
2015-01-19 12:49:30 +01:00
Heiko Schocher
a5f8ccaeab arm, at91: corvus board updates
- corvus board fix problems with toshiba nand chips
  on the corvus board problems with toshiba chips
  Manufacturer ID: 0x98 Chip ID: 0xdc encounterd.

  Solve this in the following way:
  - set other nand timings
  - enable CONFIG_SYS_NAND_READY_PIN

- correct the MACH_TYPE setting

Signed-off-by: Heiko Schocher <hs@denx.de>
2015-01-19 12:49:29 +01:00
Heiko Schocher
a1655bb2e1 taurus, spl: erase also spi flash if recovery button is pressed
if in SPL mode recovery button is pressed, erase also spi flash
from offset 0 to CONFIG_SYS_NAND_U_BOOT_SIZE on the taurus board.

Signed-off-by: Heiko Schocher <hs@denx.de>
2015-01-19 12:49:28 +01:00
Heiko Schocher
389aee8930 arm, at91: enable thumb mode for taurus board in SPL
Signed-off-by: Heiko Schocher <hs@denx.de>
2015-01-19 12:49:27 +01:00
Heiko Schocher
99197a9e31 arm, arm926ejs: make thumb mode compileable
in thumb mode compiler says for example for arch/arm/lib/cache-cp15.c
when enabling CONFIG_SYS_THUMB_BUILD:

{standard input}: Assembler messages:
{standard input}:373: Error: selected processor does not support Thumb mode `mrc p15,0,r4,c1,c0,0'
{standard input}:416: Error: selected processor does not support Thumb mode `mcr p15,0,r3,c2,c0,0'

so, if caches are disabled, do not use this command on arm926ejs.
used on at91 in SPL, to reduce size of SPL.

Signed-off-by: Heiko Schocher <hs@denx.de>
2015-01-19 12:49:26 +01:00
Rene Griessl
1193397592 usb: eth: asix88179: add ability to modify MAC address
This patch enables U-Boot to modify the MAC address of the AX88179.
Tested on RECS5250 (similar to Arndale5250)

Signed-off-by: Rene Griessl <rgriessl@cit-ec.uni-bielefeld.de>
2015-01-18 12:31:36 +01:00
Hans de Goede
904f2a83a8 musb-new: Add interrupt queue support
Add interrupt queue support, so that a usb keyboard can be used without
causing huge latencies.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2015-01-18 12:31:36 +01:00
Hans de Goede
accf04c2aa musb-new: Add urb and hep parameters to construct_urb
Make construct_urb take an urb and hep parameter, rather then having it always
operate on the file global urb and hep structs. This is a preperation patch
for adding interrupt queue support.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2015-01-18 12:31:36 +01:00
Hans de Goede
b918a0c6f6 musb-new: Properly remove a transfer from the schedule on timeout
If a transfer / urb times-out, properly remove it from the schedule, rather
then letting it sit on the ep head. This stops the musb code from getting
confused and refusing to queue further transfers after a timeout.

Tested by unplugging a usb-keyboard, replugging it and doing a usb-reset,
before this commit the keyboard would not work after the usb-reset.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2015-01-18 12:31:36 +01:00
Hans de Goede
90cdc1039d musb-new: Fix reset sequence when in host mode
This commit fixes a number of issues with the reset sequence of musb-new
in host mode:

1) Our usb device probe relies on a second device reset being done after the
first descriptors read. Factor the musb reset code into a usb_reset_root_port
function (and add this as an empty define for other controllers), and call
this when a device has no parent.

2) Just like with normal usb controllers there needs to be a delay after
reset, for normal usb controllers, this is handled in hub_port_reset, add a
delay to usb_reset_root_port.

3) Sync the musb reset sequence with the upstream kernel, clear all bits of
power except bits 4-7, and increase the time reset is asserted to 50 ms.

With these fixes an usb keyboard I have now always enumerates properly, where
as earlier it would only enumerare properly once every 5 tries.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2015-01-18 12:31:36 +01:00
Hans de Goede
e8672e3f0e musb-new: Fix interrupt transfers not working
For bulk and ctrl transfers common/usb.c sets udev->status = USB_ST_NOT_PROC,
but it does not do so for interrupt transfers.

musb_uboot.c: submit_urb() however was waiting for USB_ST_NOT_PROC to become 0,
and thus without anyone setting USB_ST_NOT_PROC would exit immediately for
interrupt urbs, returning the urb status of EINPROGRESS as error.

This commit fixes this, thereby also making usb_kbd.c work together with
musb_new and CONFIG_SYS_USB_EVENT_POLL.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2015-01-18 12:31:36 +01:00
Hans de Goede
dc9a391270 musb-new: Use time based timeouts rather then cpu-cycles based timeouts
CPU cycle based timeouts are no good, because how long they use depends on
CPU speed. Instead use time based timeouts, and wait one second for a
device connection to show up (per the USB spec), and wait USB_TIMEOUT_MS
for various urbs to complete.

This fixes "usb start" taking for ever when no device is plugged into the
otg port.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2015-01-18 12:31:36 +01:00
Hans de Goede
28a15ef7fd musb-new: Add sunxi musb controller support
This is based on Jussi Kivilinna's work for the linux-sunxi-3.4 kernel to use
the kernels musb driver instead of Allwinners own custom driver.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2015-01-18 12:31:36 +01:00
Hans de Goede
0f8bc53240 musb-new: Add register defines for different reg layout on sunxi
The sunxi SoCs also have a musb controller, but with a different register
layout.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2015-01-18 12:31:36 +01:00
Hans de Goede
d906bbc262 usb: Do not log an error when no devices is plugged into a root-hub-less hcd
Before this commit u-boot would print the following on boot with musb and
no usb device plugged in:

starting USB...
USB0:   Port not available.
USB error: all controllers failed lowlevel init

This commit changes this to:

starting USB...
USB0:   Port not available.

Which is the correct thing to do since the low-level init went fine.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2015-01-18 12:31:36 +01:00
Hans de Goede
3cbcb28928 usb: Fix usb_kbd_deregister when console-muxing is used
When iomuxing is used we must not only deregister the device with stdio.c,
but also remove the reference to the device in the console_devices array
used by console-muxing. Add a call to iomux_doenv to usb_kbd_deregister to
update console_devices, which will drop the reference.

This fixes the console filling with "Failed to enqueue URB to controller"
messages after a "usb stop force", or when the USB keyboard is gone after a
"usb reset".

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2015-01-18 12:31:36 +01:00
Hans de Goede
8bb6c1d1e0 usb: Add an interval parameter to create_int_queue
Currently create_int_queue is only implemented by the ehci code, and that
does not honor interrupt intervals, but other drivers which might also want
to implement create_int_queue may honor intervals, so add an interval param.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2015-01-18 12:31:35 +01:00
Hans de Goede
a1d31077d0 config_distro_bootcmd.h: Remove unnecessary magic to avoid repeated USB scans
Now that "usb start" will only start usb if not already started, we can simply
call "usb start" whenever we (may) need access to usb devices, and it will only
actually scan the bus at the first call.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2015-01-18 12:31:35 +01:00
Hans de Goede
b507226405 USB: make "usb start" start usb only once
Currently we've this magic in include/config_distro_bootcmd.h to avoid
scanning the usb bus multiple times.

And it does not work when also using an usb keyboard because then the
preboot command has already scanned the bus, so we're still scanning it
twice.

This commit makes "usb start" only start usb if it is no already started,
allowing us to remove all the magic for it from include/config_distro_bootcmd.h
and just call it unconditionally.

This also causes "usb start" and "usb reset" to actually do what their
different names suggest, rather then both of them doing exactly the same.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2015-01-18 12:31:35 +01:00
Alex Sadovsky
c0978a94aa usb: gadget: pxa25x_udc: fix use-before-initialized bug
Fix use-before-initialized bug in pxa25x_udc driver.

Function usb_gadget_register_driver calls udc_disable,
and udc_disable calls pullup_off that uses dev->mach->udc_command.
But dev->mach is initialized in usb_gadget_register_driver after
calling udc_disable. This patch fixes the order of initialization.

Signed-off-by: Alex Sadovsky <Nable.MainInbox@googlemail.com>
2015-01-18 12:31:01 +01:00
Stefan Roese
1fd81b7c23 usb: gadget: f_dfu: Add get_alt function to pass the USB compliance test
Without this function the USB compliance test (USB 2.0 Command Verifier) will
fail in the "Interface Descriptor Test" with this error message:

FAIL
(1.2.51) A successful GetInterface request must return the alternate setting
set by a prior call to SetInterface.

Lets add this function to read back the value so that the DFU device fully
passes the USB compliance test.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Roger Meier <r.meier@siemens.com>
Cc: Samuel Egli <samuel.egli@siemens.com>
Cc: Enrico Leto <enrico.leto@siemens.com>
Acked-by: Heiko Schocher <hs@denx.de>
Cc: Lukasz Majewski <l.majewski@samsung.com>
Cc: Marek Vasut <marex@denx.de>
2015-01-18 12:31:00 +01:00
Stefan Roese
87ed6b1067 usb: gadget: composite: Fix NULL pointer crash in USB compliance test
On the DXR2 board (AM335x using MUSB) the USB compliance test suite
(USB 2.0 Command Verifier) will cause the board to crash and reset
upon the "BOS Descriptor Test - Addressed state". Here the output
from the DRX2 while running this test:

GADGET DRIVER: usb_dnl_dfu
musb-hdrc: peripheral reset irq lost!
composite_setup (776)
data abort
pc : [<87f693ac>]          lr : [<87f6911c>]
sp : 86f33a58  ip : 00000000     fp : 86f3bbac
r10: 00000f00  r9 : 86f33ef4     r8 : 86f37da8
r7 : 00000005  r6 : 86f33a90     r5 : 00000000  r4 : 86f37e30
r3 : 00000000  r2 : 00000000     r1 : 87f9c888  r0 : 00000016
Flags: Nzcv  IRQs off  FIQs on  Mode SVC_32
Resetting CPU ...

resetting ...

By adding the case statement for USB_DT_BOS and therefore not running
into the default case (jump to unkown label) this crash is fixed.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Roger Meier <r.meier@siemens.com>
Cc: Samuel Egli <samuel.egli@siemens.com>
Cc: Enrico Leto <enrico.leto@siemens.com>
Acked-by: Heiko Schocher <hs@denx.de>
Cc: Lukasz Majewski <l.majewski@samsung.com>
Cc: Marek Vasut <marex@denx.de>
2015-01-18 12:31:00 +01:00
Simon Glass
2b7c0f3081 sunxi: Drop use of lowlevel_init()
This does nothing now, so drop it. We have SPL anyway to do our low-level
init.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
2015-01-16 14:52:53 -05:00
Simon Glass
f630974ccb sunxi: Move SPL s_init() code to board_init_f()
The current sunxi implementation uses gdata, which is going away. It also
sets up DRAM before board_init_f() in SPL.

There is really no reason to do much in s_init() since board_init_f() is
called immediately afterwards. The only change is that we need our own
implementation of board_init_f() which sets up DRAM before the BSS (which
is in DRAM) is cleared.

The s_init() code runs once for SPL and again for U-Boot proper. We
shouldn't need to init the clock/timer/gpio/i2c init twice, so just have it
in SPL.

Signed-off-by: Simon Glass <sjg@chromium.org>
2015-01-16 14:52:52 -05:00
Simon Glass
480ca13e74 arm: Add warnings about using gdata
We need to get rid of this SPL-specific setting of the global_data pointer.
It is already set up in start.S immediately before board_init_f() is called,
and there may be information there that is needed (e.g. pre-reloc malloc
info).

Signed-off-by: Simon Glass <sjg@chromium.org>
2015-01-16 14:52:52 -05:00
Tom Rini
a6b541b090 TI ARMv7: Don't use GD before crt0.S has set it
Prior to this change we set the gd pointer early so that we can store
data in it.  This becomes problematic for DM changes as well as being
odd in general.  Re-work the code paths so that we don't need to set the
gd pointer so early and instead can rely upon the normal setting of it.

In order to do this we do need to move certain calls from s_init into
spl_board_init(), mainly preloader_console_init and
save_omap_boot_params.

Tested on: Beaglebone Black, AM43xx GP EVM, Beagleboard, Beagleboard xM,
OMAP5 uEVM, DRA7xx EVM
Signed-off-by: Tom Rini <trini@ti.com>
Tested-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
2015-01-16 14:52:52 -05:00
Codrin Ciubotariu
6706b115a6 net/vsc9953: Add driver for Vitesse VSC9953 L2 Switch IP
This patch adds a driver for VSC9953 L2 Switch. This Vitesse IP
is integrated in Freescale T1040 and T1020 SoCs.
The L2 switch has 10 Ethernet ports: 2 internal fixed-links
(ports 8 and 9) at 2.5 Gbps and and 8 external ports at 1 Gbps.
The external ports may be connected to PHYs over QSGMII and SGMII.

Commands have also been added to enable/disable a port and to
check a port's link speed, duplexity and status. The commands are:

ethsw port <port_nr> enable|disable - enable/disable an l2 switch port
ethsw port <port_nr> show - show an l2 switch port's configuration

port_nr=0..9; use "all" for all ports

For more detailse please see doc/README.t1040-l2switch

Signed-off-by: Codrin Ciubotariu <codrin.ciubotariu@freescale.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: York Sun <yorksun@freescale.com>
2015-01-16 09:32:38 -08:00
Codrin Ciubotariu
27b5756954 net/fm: Enable FMAN ports if l2switch ports are connected over SGMII
If SerDes is configured to connect L2 Switch ports from T1040
over SGMII or QSGMII, the two FMAN fixed ports (FM1@DTSEC1 and FM2@DTSEC2)
that are connected to two L2 swtch ports must be enabled. These
ports don't have PHYs and must be treated accordingly.

Signed-off-by: Codrin Ciubotariu <codrin.ciubotariu@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
2015-01-16 09:32:32 -08:00
Codrin Ciubotariu
c2a61cd232 arch/powerpc: Add SGMII support for the L2 Switch ports
Some Freescale SoCs like T1020 and T1040 have an integrated
L2 Switch. The L2 Switch ports may be connected to Ethernet PHYs
over SGMII and QSGMII.

Signed-off-by: Codrin Ciubotariu <codrin.ciubotariu@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
2015-01-16 09:32:26 -08:00
Codrin Ciubotariu
7d33a87d9d arch/powerpc: Fix mapping of Freescale SerDes protocols
The number of supported serdes protocols on Freescale SoCs
has increased over time. Until now, an u64 variable have been
initialized on boot with the configured protocols. However,
since this number has increased (enum srds_prtcl has more
than 64 values), 64 bits are no longer sufficient to hold track
of all the configured protocols.
This patch replaces the u64 map values with static arrays.
To keep track of the number of serdes protocols, the
SERDES_PRCTL_COUNT vale has been added at the end of
enum srds_prtcl. This value must always be the last one.

Signed-off-by: Codrin Ciubotariu <codrin.ciubotariu@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
2015-01-16 09:32:20 -08:00
Codrin Ciubotariu
6798c324ed net/fm: Fix error when FMAN MAC has no PHY
U-boot assumes that all FMAN ports have a PHY. Some SoCs (like T1040)
have fixed links. This means that the ports are connected MAC to MAc
and there is no Ethernet PHY attatched. This patch initializes a
FMAN MAC even if it doesn't have a PHY attached.

Signed-off-by: Codrin Ciubotariu <codrin.ciubotariu@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
2015-01-16 09:32:16 -08:00
Shaohui Xie
f7c38cf827 phylib: add support for aquantia PHYs
This patch supports AQ1202, AQ2104, AQR105 PHY.

Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: York Sun <yorksun@freescale.com>
2015-01-16 09:32:11 -08:00
tang yuantian
59d34ed022 mpc85xx: clean up the old deep sleep framework
All the boards that support deep sleep feature are converted
to deep sleep generic board interface. The old interface which
support non-generic board is not used anymore. So clean it up.

Signed-off-by: Tang Yuantian <Yuantian.Tang@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
2015-01-16 09:31:40 -08:00
tang yuantian
7d0e97a294 mpc85xx/t1040qds: convert deep sleep to generic board interface
A new deep sleep interface is introduced to support generic
board structure. Converts it to use new interface.

Signed-off-by: Tang Yuantian <Yuantian.Tang@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
2015-01-16 09:31:36 -08:00
tang yuantian
2c537642e9 mpc85xx/t102xqds: convert deep sleep to generic board interface
A new deep sleep interface is introduced to support generic
board structure. Converts it to use new interface.

Signed-off-by: Tang Yuantian <Yuantian.Tang@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
2015-01-16 09:31:26 -08:00
Shengzhou Liu
e26416a3f1 powerpc/t1024rdb: Add support for T1024RDB-PB
T1024RDB-PB board adds 2.5G SGMII support with AQR105 PHY.
rcw_0x095 is used for 10G XFI + 3x PCIex1
rcw_0x135 is used for 2.5G SGMII + 2x PCIex1

Signed-off-by: Shengzhou Liu <Shengzhou.Liu@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
2015-01-16 09:31:20 -08:00
tang yuantian
f49b8c1b5d mpc85xx/t102xrdb: convert deep sleep to generic board interface
A new deep sleep interface is introduced to support generic
board structure. Converts it to use new interface.

Besides, added SPI/SD/NAND boot deep sleep support.

Signed-off-by: Tang Yuantian <Yuantian.Tang@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
2015-01-16 09:31:06 -08:00
Shengzhou Liu
026f64f636 t1024qds: add missing T1024QDS_defconfig
Add missing T1024QDS_defconfig for NOR boot on T1024QDS.

Signed-off-by: Shengzhou Liu <Shengzhou.Liu@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
2015-01-16 09:30:58 -08:00
Shengzhou Liu
f08a5db950 powerpc/t1024: add serdes protocol 0x40 and 0x5f
Add serdes protocol 0x40 and 0x5f.

Signed-off-by: Shengzhou Liu <Shengzhou.Liu@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
2015-01-16 09:30:49 -08:00
gaurav rana
68caf1dd1e powerpc: SECURE BOOT- Add secure boot target for T1042RDB
Secure boot target is added for T1042RDB platform.

Signed-off-by: Gaurav Rana <gaurav.rana@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
2015-01-16 09:30:39 -08:00
harninder rai
37811ec226 powerpc/913x: Add config flag for bootdelay
CONFIG_BOOTDELAY is missing from board header file. Add this macro
to enable counting down of auto boot.

Signed-off-by: Harninder Rai <harninder.rai@freescale.com>
[York Sun: Add commit message]
Reviewed-by: York Sun <yorksun@freescale.com>
2015-01-16 09:30:32 -08:00
Aneesh Bansal
b3f0f63223 powerpc/mpc85xx: Define PBI Flash Base for C29XPCIE Secure Boot
CONFIG_SYS_PBI_FLASH_BASE is defined for Secure Boot on C29X

Signed-off-by: Aneesh Bansal <aneesh.bansal@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
2015-01-16 09:30:12 -08:00
Tudor Laurentiu
d1ccaf76a4 b4860: Correct LIODN assignment for PCIe
For B4 the LIODN register for PCIe is in PCIe address space and not in
GUTs

Signed-off-by: Poonam Aggrwal <poonam.aggrwal@freescale.com>
Signed-off-by: Varun Sethi <Varun.Sethi@freescale.com>
Signed-off-by: Shaveta Leekha <shaveta@freescale.com>
Signed-off-by: Laurentiu Tudor <Laurentiu.Tudor@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
2015-01-16 09:30:06 -08:00
Chunhe Lan
3bcf047da8 powerpc/t4240rdb: Add alternate SerDes 2 protocol to align with RCW
SerDes 2 protocol 56 is not valid any longer due to
the new RCW; protocol 55 is used instead, so add
SerDes 2 protocol 55 to align with RCW.

Signed-off-by: Chunhe Lan <Chunhe.Lan@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
2015-01-16 09:29:59 -08:00