summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-08-08usb: xhci: Program 'route string' in the input slot contextBin Meng
xHCI spec says: the values of the 'route string' field shall be initialized by the first 'Address Device' command issued to a device slot, and shall not be modified by any other command. So far U-Boot does not program this field, and it does not prevent SS device directly attached to root port, or HS device behind an HS hub, from working, due to the fact that 'route string' is used by the xHC to target SS packets. But in order to enumerate devices behind an SS hub, this field must be programmed. With this commit and along with previous commits, now SS & HS devices attached to a USB 3.0 hub can be enumerated by U-Boot. As usual, this new feature is only available when DM is on. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-08-08usb: xhci: Change xhci_setup_addressable_virt_dev() signatureBin Meng
For future extension, change xhci_setup_addressable_virt_dev() signature to accept a pointer to 'struct usb_device', instead of its members slot_id & speed, as the struct already contains these two plus some other useful information of the device. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-08-08usb: hub: Support 'set hub depth' request for USB 3.0 hubsBin Meng
USB 3.0 hub uses a hub depth value multiplied by four as an offset into the 'route string' to locate the bits it uses to determine the downstream port number. We shall set the hub depth value of a USB 3.0 hub after it is configured. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-08-08usb: hub: Translate USB 3.0 hub port status into old versionBin Meng
USB 3.0 hub port status field has different bit positions from 2.0 hubs. Since U-Boot only understands the old version, translate the new one into the old one. Since we are going to add USB 3.0 hub support, this feature is only available with driver model USB. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-08-08usb: hub: Add a new API to test if a hub device is root hubBin Meng
Sometimes we need know if a given hub device is root hub or not. Add a new API to test this. This removes the xHCI driver's own version is_root_hub() and change to use the new API. While we are here, remove the unused/commented out get_usb_device() in the xHCI driver too. Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
2017-08-08usb: hub: Remove hub_port_reset()Bin Meng
At present hub_port_reset() is defined in DM USB, but it is never called hence remove it (removing another ifdefs). While we are here, change legacy_hub_port_reset() name to usb_hub_port_reset() to better match other function names in the same hub module. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-08-08usb: hub: Use 'struct usb_hub_device' as hub device's uclass_privBin Meng
Use USB hub device's dev->uclass_priv to point to 'usb_hub_device' so that with driver model usb_hub_reset() and usb_hub_allocate() are no longer needed. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-08-08usb: xhci-pci: Clean up the driver a little bitBin Meng
This cleans up the driver a little bit. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-08-08usb: xhci-pci: Drop non-DM version of xhci-pci driverBin Meng
As there is no board that currently uses xhci-pci driver without DM USB, drop its support and leave only DM support. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-08-08usb: xhci: Convert CONFIG_USB_XHCI_PCI to KconfigBin Meng
Add CONFIG_USB_XHCI_PCI as a Kconfig option. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Stefan Roese <sr@denx.de> Tested-by: Stefan Roese <sr@denx.de>
2017-08-08usb: cmd: Print actual packet size for super speed devicesBin Meng
USB 3.0 defines bMaxPacketSize0 field in the device descriptor as the exponent of 2, so let's print the calculated actual size. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Stefan Roese <sr@denx.de> Tested-by: Stefan Roese <sr@denx.de>
2017-08-08configs: Remove CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS in all boardsBin Meng
Now that EHCD does not use CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS, remove it in all boards' config files. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Stefan Roese <sr@denx.de> Tested-by: Stefan Roese <sr@denx.de>
2017-08-08usb: ehci: Get rid of CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTSBin Meng
EHC reports supported maximum number of ports in the HCSPARAMS register, so it's unnecessary to use a hardcoded config option CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Stefan Roese <sr@denx.de> Tested-by: Stefan Roese <sr@denx.de>
2017-08-08configs: Remove CONFIG_SYS_USB_XHCI_MAX_ROOT_PORTS in all boardsBin Meng
Now that xHCD does not use CONFIG_SYS_USB_XHCI_MAX_ROOT_PORTS, remove it in all boards' config files. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Stefan Roese <sr@denx.de> Tested-by: Stefan Roese <sr@denx.de>
2017-08-08usb: xhci: Get rid of CONFIG_SYS_USB_XHCI_MAX_ROOT_PORTSBin Meng
xHC reports supported maximum number of ports in the HCSPARAMS1 register, so it's unnecessary to use a hardcoded config option CONFIG_SYS_USB_XHCI_MAX_ROOT_PORTS. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Stefan Roese <sr@denx.de> Tested-by: Stefan Roese <sr@denx.de>
2017-08-08usb: xhci: Change MAX_HC_PORTS to 255Bin Meng
HCSPARAMS1:MaxPorts field specifies the maximum port number value, and its valid values are in the range of 1 to 255. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Stefan Roese <sr@denx.de> Tested-by: Stefan Roese <sr@denx.de>
2017-08-08usb: hub: Add 3.0 hub port status mask of 2.0 hubBin Meng
USB 3.0 hub port status has different bit position regarding to port power, port speed, etc. But others are the same as 2.0 hubs. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Stefan Roese <sr@denx.de> Tested-by: Stefan Roese <sr@denx.de>
2017-08-08usb: hub: Change USB hub descriptor to match USB 3.0 hubsBin Meng
USB 3.0 hubs have a slightly different hub descriptor than USB 2.0 hubs, with a fixed (rather than variable length) size. Change the host controller drivers that access those last two fields (DeviceRemovable and PortPowerCtrlMask) to use the union. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Stefan Roese <sr@denx.de> Tested-by: Stefan Roese <sr@denx.de>
2017-08-08usb: hub: Revise wLength for 'get port status' requestBin Meng
For accuracy, we should use 'sizeof(struct usb_port_status)' as the wLength for 'get port status' request, although it happens to be equal to 'sizeof(struct usb_hub_status)'. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Stefan Roese <sr@denx.de> Tested-by: Stefan Roese <sr@denx.de>
2017-08-08usb: hub: Send correct wValue to get hub descriptor of a USB 3.0 hubBin Meng
Testing a USB 3.0 hub by connecting it to the xHCI port on Intel MinnowMax, when issuing 'get hub descriptor' to the hub, xHCI reports a transfer event TRB with a completion code 6 which means 'Stall Error'. In fact super speed USB hub descriptor type is 0x2a, not 0x29. Sending correct SETUP packet to the hub makes it not stall anymore. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Stefan Roese <sr@denx.de> Tested-by: Stefan Roese <sr@denx.de>
2017-08-08usb: hub: Update handling connect status/change in usb_scan_port()Bin Meng
It was observed that on Intel MinnowMax board, when xHCI is enabled in the BayTrail SoC, with a USB 3.0 device connected to the bottom USB 3.0 port (mapped to xHCI root port #7), its PORTSC register is always 0x201203 (CCS = 1, CSC = 0). The root cause of such behavior is unknown yet. Connect status change bit is set on the same port with a USB 2.0 device (mapped to xHCI port #1, which is a different port on the root hub). With current logic in usb_scan_port(), the enumeration process will abort if it does not detect a connect status change on a hub port. However since a device connection status is correctly reported, the enumeration process can still continue. With this change, USB device connected to the bottom blue port on MinnowMax board can be enumerated under either SS or HS mode. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Stefan Roese <sr@denx.de> Tested-by: Stefan Roese <sr@denx.de> Tested-by: Dinh Nguyen <dinguyen@kernel.org>
2017-08-08usb: xhci: Add input slot context in xhci_set_configuration()Bin Meng
A valid input slot context for a 'configure endpoint' command requires the 'Context Entries' field to be initialized to the index of the last valid endpoint context that is defined by the target configuration. We set up the 'Context Entries' field, but we forget to include the input slot context in the input control context 'Add Context flags' bitmap. So xHC will simply ignore input slot context and continue using its own which contains old information of the device. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Stefan Roese <sr@denx.de> Tested-by: Stefan Roese <sr@denx.de>
2017-08-08usb: xhci: Initialize scratchpad buffer array and scratchpad buffersBin Meng
The scratchpad buffer array is used to define the locations of statically allocated memory pages that are available for the private use of the xHC. The xHCI spec explicitly mentions that system software shall allocate the scratchpad buffers before placing the xHC in to Run mode (Run/Stop (R/S) = ‘1’), however U-Boot is missing this part. This causes xHC on Intel platform does not respond the very first 'enable slot' command that is given to xHC and the 'enable slot' command completion event TRB is never generated and xHC seems to hang forever. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Stefan Roese <sr@denx.de> Tested-by: Stefan Roese <sr@denx.de>
2017-08-08usb: xhci: Correct command TRB 4th dword initializationBin Meng
In xhci_queue_command(), when the command is not 'reset endpoint', 'stop endpoint' or 'set TR dequeue pointer', endpoint ID should not be encoded in the TRB. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Stefan Roese <sr@denx.de> Tested-by: Stefan Roese <sr@denx.de>
2017-08-08usb: xhci: Remove incorrect comments for struct xhci_container_ctxBin Meng
There is no member called 'dma' in struct xhci_container_ctx. Remove the comments that mentions it. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Stefan Roese <sr@denx.de> Tested-by: Stefan Roese <sr@denx.de>
2017-07-19configs: remove ls1043ardb_sdcard & ls2088ardb_qspi secure targetsPrabhakar Kushwaha
Build of ls1043ardb_sdcard & ls2088ardb_qspi secure targets showing compilation error so removing them for the time being till propper support has been applied. Signed-off-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
2017-07-19drivers:net:fsl-mc: Update MC address calculationPrabhakar Kushwaha
Update MC address caluclation as per MC design requirement of address as least significant 512MB address of MC private allocated memory. Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com> Signed-off-by: Ashish Kumar <ashish.kumar@nxp.com>
2017-07-19board:ls2080ardb: Update execution of config_board_muxPrabhakar Kushwaha
config_board_mux() is dependent on 'hwconfig' env read value. For some bootloaders like QSPI, env is ready only after relocation. So delay execution of config_board_mux() to misc_init_r(). Signed-off-by: Santan Kumar <santan.kumar@nxp.com>
2017-07-19 armv8: ls1046ardb: update core frequency to 1800MHZPrabhakar Kushwaha
Update the default core frequency to 1800MHZ for best performance under SD boot and eMMC boot. Signed-off-by: Gong Qianyu <Qianyu.Gong@nxp.com>
2017-07-19fsl/usb: enable errata-a010151 for ls2088a and ls2081aSantan Kumar
Signed-off-by: Santan Kumar <santan.kumar@nxp.com>
2017-07-19board/ls2080ardb: Disable SD-related GPIO programmingPrabhakar Kushwaha
LS2080ARDB/LS2088ARDB updated RevF boards do not have smart voltage translator, so no need to program GPIO for LS2088ARDB boards The GPIO programming is required only for LS2081ARDB. Signed-off-by: Santan Kumar <santan.kumar@nxp.com> Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
2017-07-19arm: ls1021atwr: Add distro secure boot supportPrabhakar Kushwaha
Enable validation of boot.scr script prior to its execution dependent on "secureboot" flag in environment. Disable fall back option to qspi boot in case of secure boot. Also enable "secureboot=y" flag in environment for ARM based platforms instead of bootcmd. Signed-off-by: Sumit Garg <sumit.garg@nxp.com> Tested-by: Vinitha Pillai <vinitha.pillai@nxp.com>
2017-07-19arm64: ls1046ardb: Add distro boot supportPrabhakar Kushwaha
Tested on ls1046ardb with automatically boot Ubuntu from SD card or USB disk, if it fails to detect external storage disk, fall back to qspi boot. Signed-off-by: Shengzhou Liu <Shengzhou.Liu@nxp.com> Signed-off-by: Gong Qianyu <Qianyu.Gong@nxp.com>
2017-07-19arm: ls1021atwr: Add distro boot supportPrabhakar Kushwaha
Include common config_distro_defaults.h and config_distro_bootcmd.h for u-boot enviroments to support distro boot which automatically scan boot.scr from storage devices(e.g. SD/USB/SATA/SCSI disk) and execute autoboot script. Signed-off-by: Shengzhou Liu <Shengzhou.Liu@nxp.com> Signed-off-by: Alison Wang <alison.wang@nxp.com>
2017-07-19armv8: ls1046a: move CONFIG_CMD_USB to defconfigPrabhakar Kushwaha
Move the macro to defconfig to take effect globally. Signed-off-by: Gong Qianyu <Qianyu.Gong@nxp.com>
2017-07-19usb: ums: support multiple controllers using controller_indexRajesh Bhagat
Adds a new field in fsg_common namely controller_index to support multiple controllers usb gadget support. Signed-off-by: Rajat Srivastava <rajat.srivastava@nxp.com> Signed-off-by: Rajesh Bhagat <rajesh.bhagat@nxp.com> Acked-by: Lukasz Majewski <l.majewski@samsung.com>
2017-07-19usb: dwc3: Add helper functions to enable snooping and burst settingsRajat Srivastava
Adds helper functions to enable snooping and outstanding burst beat settings. Signed-off-by: Rajat Srivastava <rajat.srivastava@nxp.com> Signed-off-by: Rajesh Bhagat <rajesh.bhagat@nxp.com>
2017-07-19armv7: Add workaround for USB erratum A-009007Suresh Gupta
USB3PHY Observing Intermittent Failure in Rx This patch is adding the erratum for LS1021. Signed-off-by: Sriram Dash <sriram.dash@nxp.com> Signed-off-by: Rajesh Bhagat <rajesh.bhagat@nxp.com> Signed-off-by: yinbo.zhu <yinbo.zhu@nxp.com>
2017-07-19armv7: Add workaround for USB erratum A-008997Suresh Gupta
USB3 LFPS Peak-Peak Differential Output Voltage Adjustment This patch is adding the erratum for LS1021. Signed-off-by: Sriram Dash <sriram.dash@nxp.com> Signed-off-by: Rajesh Bhagat <rajesh.bhagat@nxp.com> Signed-off-by: yinbo.zhu <yinbo.zhu@nxp.com>
2017-07-19armv7: Add workaround for USB erratum A-009798Suresh Gupta
USB High Speed Squelch Threshold Adjustment This patch is adding the erratum for LS1021. Signed-off-by: Sriram Dash <sriram.dash@nxp.com> Signed-off-by: Rajesh Bhagat <rajesh.bhagat@nxp.com> Signed-off-by: yinbo.zhu <yinbo.zhu@nxp.com>
2017-07-19armv7: Add workaround for USB erratum A-009008Suresh Gupta
USB High Speed (HS) EYE Height Adjustment This patch is adding the erratum for LS1021. Signed-off-by: Sriram Dash <sriram.dash@nxp.com> Signed-off-by: yinbo.zhu <yinbo.zhu@nxp.com>
2017-07-18LS2080ARDB: Secure Boot defconfig for QSPI boot.Udit Agarwal
Add the secure boot defconfig for QSPI boot on LS2088ARDB platform. Signed-off-by: Udit Agarwal <udit.agarwal@nxp.com>
2017-07-18spi: fsl_qspi: Add 4bytes address supportSuresh Gupta
The QSPI support the direct 4bytes address command for flash read/write/erase. And the address can cover the whole QSPI memory space. signed-off-by: Yuan Yao <yao.yuan@nxp.com>
2017-07-18sf: add ADDR_4B for 4byte address supportSuresh Gupta
Some new flash don't support bar register but use 4bytes address to support exceed 16MB flash size. So add flash flag: ADDR_4B for some flash which support 4bytes address. Signed-off-by: Yuan Yao <yao.yuan@nxp.com>
2017-07-18sf: Fix s25fs512s erase size and remove SECT_4K flagSuresh Gupta
As per data sheet, S25FS512S support Uniform sector option or erase size of 256 kbytes and Page Programming buffer of 256 or 512 Bytes. So, flag SECT_4K have no significance for this flash. Signed-off-by: Suresh Gupta <suresh.gupta@nxp.com>
2017-07-10Prepare v2017.07Tom Rini
Signed-off-by: Tom Rini <trini@konsulko.com>
2017-07-10km/common: remove unused function declarationsHolger Brunck
Cc: Wolfgang Denk <wd@denx.de> Cc: Heiko Schocher <hs@denx.de> Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
2017-07-10cmd, nand: fix broken output of "nand info"Lothar Waßmann
If the value of either "nand options" or "bbt options" has a zero in the most significant nibble, the '0x' prefix will be isolated from the value like shown below: |Device 0: nand0, sector size 128 KiB | Page size 2048 b | OOB size 64 b | Erase size 131072 b | subpagesize 2048 b | options 0x40000200 | bbt options 0x 60000 Change the format string to produce leading zeroes filling the gap. Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de>
2017-07-10libfdt: Drop -FDT_ERR_TOODEEPSimon Glass
This error code has not been upstreamed and is not really needed since it is unlikely to be triggered. Drop it to maintain compatability with upstream. Reported-by: Peter Robinson <pbrobinson@gmail.com> Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Peter Robinson <pbrobinson@gmail.com>
2017-07-10configs: Resync defconfigsTom Rini
Signed-off-by: Tom Rini <trini@konsulko.com>