summaryrefslogtreecommitdiff
path: root/drivers
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'master' of git://git.denx.de/u-boot-spiTom Rini2018-10-124-20/+39
|\
| * sf: Add MICRON manufacturer idAshish Kumar2018-10-122-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | NOR flash name MT35X_QLKA and MT25Q_** used on NXP board has manufacturer id as 0x2C, which are rather for newer flashes after the split of Micron from ST. So macro for this micron manufacturer id. Signed-off-by: Suresh Gupta <suresh.gupta@nxp.com> Signed-off-by: Yogesh Gaur <yogeshnarayan.gaur@nxp.com> Signed-off-by: Ashish Kumar <Ashish.Kumar@nxp.com> [jagan: updated commit message] Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
| * spi: davinci: Add platdata supportJagan Teki2018-10-101-19/+28
| | | | | | | | | | | | | | | | | | Davanci spi driver has DM support already, this patch add support for platdata so-that SPL can use it for low foot-print. Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> Tested-by: Adam Ford <aford173@gmail.com>
| * mtd: uboot: Fix hanging during mtd list commandAdam Ford2018-10-101-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | Some boards (like omap3_logic) hang when trying to access address 0. This happens when executing the new 'mtd list' command. This patch enhances the checks for conditions that would preclude mtd_probe_devices() from operating. Fixes: 5db66b3aee6f ("cmd: mtd: add 'mtd' command") Suggested-by: Boris Brezillon <boris.brezillon@bootlin.com> Signed-off-by: Adam Ford <aford173@gmail.com> Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
* | ldpaa_eth.c: Fix warning when PHYLIB is not enabledTom Rini2018-10-121-3/+7
| | | | | | | | | | | | | | | | We need to #ifdef some variables to avoid warning about them being unused. Fixes: 1a048cd65645 ("driver: net: fsl-mc: Add support of multiple phys for dpmac") Signed-off-by: Tom Rini <trini@konsulko.com>
* | Merge branch 'master' of git://git.denx.de/u-boot-netTom Rini2018-10-1118-245/+567
|\ \
| * | driver: net: fsl-mc: Add support of multiple phys for dpmacPankaj Bansal2018-10-102-43/+94
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Till now we have had cases where we had one phy device per dpmac. Now, with the upcoming products (LX2160AQDS), we have cases, where there are sometimes two phy devices for one dpmac. One phy for TX lanes and one phy for RX lanes. to handle such cases, add the support for multiple phys in ethernet driver. The ethernet link is up if all the phy devices connected to one dpmac report link up. also the link capabilities are limited by the weakest phy device. i.e. say if there are two phys for one dpmac. one operates at 10G without autoneg and other operate at 1G with autoneg. Then the ethernet interface will operate at 1G without autoneg. Signed-off-by: Pankaj Bansal <pankaj.bansal@nxp.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
| * | driver: net: fsl-mc: initialize dpmac irrespective of phyPankaj Bansal2018-10-101-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | The dpmac initalization should not depend on phy. As the phy is not necessary to be present for dpmac to function. Therefore, remove dpmac initialization dependency from phy. Signed-off-by: Pankaj Bansal <pankaj.bansal@nxp.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
| * | driver: net: fsl-mc: Modify the dpmac link detection methodPankaj Bansal2018-10-101-62/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | when there is no phy present for a dpmac, a dummy phy device is created. when we move to multiple phy method, we need to create as many dummy phy devices. Change this method so that we don't need to create dummy phy devices. We always report linkup if no phy is present. Signed-off-by: Pankaj Bansal <pankaj.bansal@nxp.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
| * | driver: net: fsl-mc: fix error handing in init_phyPankaj Bansal2018-10-101-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | if an error occurs during init_phy, we should free the phydev structure which has been allocated by phy_connect. Signed-off-by: Pankaj Bansal <pankaj.bansal@nxp.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
| * | driver: net: fsl-mc: remove unused strcture elementsPankaj Bansal2018-10-103-27/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The phydev structure is present in both ldpaa_eth_priv and wriop_dpmac_info. the phydev in wriop_dpmac_info is not being used As the phydev is created based on phy_addr and bus members of wriop_dpmac_info, it is appropriate to keep phydev in wriop_dpmac_info. Also phy_regs is not being used, therefore remove it Signed-off-by: Pankaj Bansal <pankaj.bansal@nxp.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
| * | driver: net: fsl-mc: modify the label namePankaj Bansal2018-10-101-4/+4
| | | | | | | | | | | | | | | | | | | | | The goto label name is misspelled it should be DPMAC not DPAMC Signed-off-by: Pankaj Bansal <pankaj.bansal@nxp.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
| * | test: eth: Add a test for the target being pingedJoe Hershberger2018-10-101-0/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The target will respond to pings while doing other network handling. Make sure that the response happens and is correct. This currently corrupts the ongoing operation of the device if it happens to be awaiting an ARP reply of its own to whatever serverip it is attempting to communicate with. In the test, add an expectation that the user operation (ping, in this case) will fail. A later patch will address this problem. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| * | test: eth: Add a test for ARP requestsJoe Hershberger2018-10-101-0/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This tests that ARP requests made to this target's IP address are responded-to by the target when it is doing other networking operations. This currently corrupts the ongoing operation of the device if it happens to be awaiting an ARP reply of its own to whatever serverip it is attempting to communicate with. In the test, add an expectation that the user operation (ping, in this case) will fail. A later patch will address this problem. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| * | net: sandbox: Add a priv ptr for tests to useJoe Hershberger2018-10-101-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | Tests need to be able to pass their "unit test state" to the handlers where asserts are evaluated. Add a function that allows the tests to set this private data on the sandbox eth device. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| * | net: sandbox: Allow fake eth to handle more than 1 packet responseJoe Hershberger2018-10-101-11/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | Use up to the max allocated receive buffers so as to be able to test more complex situations. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| * | net: sandbox: Share the priv structure with testsJoe Hershberger2018-10-101-19/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | If tests want to implement tx handlers, they will likely need access to the details in the priv structure. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| * | net: sandbox: Make the fake eth driver response configurableJoe Hershberger2018-10-101-4/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | Make the send handler registerable so tests can check for different things. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| * | net: sandbox: Refactor sandbox send functionJoe Hershberger2018-10-101-74/+106
| | | | | | | | | | | | | | | | | | | | | Make the behavior of the send function reusable. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| * | net: sandbox: Move disabled flag into priv structJoe Hershberger2018-10-101-4/+14
| | | | | | | | | | | | | | | | | | | | | | | | Store the per-device data with the device. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| * | net: phy: ti: Add binding for the CLK_OUT pin muxingJanine Hagemann2018-10-101-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The DP83867 has a muxing option for the CLK_OUT pin. It is possible to set CLK_OUT for different channels. Create a binding to select a specific clock for CLK_OUT pin. Based on commit 9708fb630d19 ("net: phy: dp83867: Add binding for the CLK_OUT pin muxing option") of mainline linux kernel. Signed-off-by: Janine Hagemann <j.hagemann@phytec.de> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
| * | net: phy: ti: Recover from "port mirroring" N/A MODE4Janine Hagemann2018-10-101-1/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The DP83867 when not properly bootstrapped - especially with LED_0 pin - can enter N/A MODE4 for "port mirroring" feature. To provide normal operation of the PHY, one needs not only to explicitly disable the port mirroring feature, but as well stop some IC internal testing (which disables RGMII communication). To do that the STRAP_STS1 (0x006E) register must be read and RESERVED bit 11 examined. When it is set, the another RESERVED bit (11) at PHYCR (0x0010) register must be clear to disable testing mode and enable RGMII communication. Thorough explanation of the problem can be found at following e2e thread: "DP83867IR: Problem with RESERVED bits in PHY Control Register (PHYCR) - Linux driver" https://e2e.ti.com/support/interface/ethernet/f/903/p/571313/2096954#2096954 Based on commit ac6e058b75be ("net: phy: dp83867: Recover from "port mirroring" N/A MODE4") of mainline linux kernel. Signed-off-by: Janine Hagemann <j.hagemann@phytec.de> Acked-by: Joe Hershberger <joe.hershberger@ni.com> Acked-by: Lukasz Majewski <lukma@denx.de>
| * | net: phy: ti: Add lane swapping support in the DP83867 TI's PHY driverJanine Hagemann2018-10-101-0/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for enabling or disabling the lane swapping (called "port mirroring" in PHY's CFG4 register) feature of the DP83867 TI's PHY device. One use case is when bootstrap configuration enables this feature (because of e.g. LED_0 wrong wiring) so then one needs to disable it in software (at u-boot/Linux). Based on commit fc6d39c39581 ("net: phy: dp83867: Add lane swapping support in the DP83867 TI's PHY driver") of mainline linux kernel. Signed-off-by: Janine Hagemann <j.hagemann@phytec.de> Acked-by: Lukasz Majewski <lukma@denx.de> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
| * | net.h: Include linux/if_ether.h to avoid duplicationBin Meng2018-10-1010-30/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | There are plenty of existing drivers that have macros like ETH_ALEN defined in their own source files. Now that we imported the kernel's if_ether.h to U-Boot we can reduce some duplication. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
| * | net: pch_gbe: Make probe/remove staticBin Meng2018-10-091-2/+2
| | | | | | | | | | | | | | | | | | | | | These two routines are internal to pch_gbe driver. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
| * | linux/compat.h: Add netdev_### log macrosBin Meng2018-10-092-18/+0
| |/ | | | | | | | | | | | | | | | | Currently there are two ethernet drivers (mvneta.c and mvpp2.c) that has netdev_### (eg: netdev_dbg) log macros defined in its own driver file. This adds these log macros in a common place linux/compat.h. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
* | Merge tag 'dm-9oct18' of git://git.denx.de/u-boot-dmTom Rini2018-10-1038-397/+792
|\ \ | | | | | | | | | | | | | | | Test improvements to tidy up output and drop duplicate tests Sandbox SPL/TPL support Various dm-related improvements
| * | video: at91: Adjust vidconsole_position_cursor() to use char posSimon Glass2018-10-091-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At present this function uses pixels but it seems more useful for it to position in terms of characters on the screen. This also matches the comment to the function. Update this. Unfortunately there is one user of this function (at91). Have a crack at fixing this, since I cannot test it. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Anatolij Gustschin <agust@denx.de>
| * | sysreset: Add a way to find the last resetSimon Glass2018-10-092-0/+45
| | | | | | | | | | | | | | | | | | | | | | | | We have a method to return the last reset as a string for humans, but not a method that allows it to be used programmatically. Add a new method that returns the last reset as an enum. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | sysreset: Tidy up a few comments and loggingSimon Glass2018-10-091-1/+3
| | | | | | | | | | | | | | | | | | | | | Some comments are incorrect or missing pieces. Fix these and use logging to print the error. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | pci: Add a little more debugging to pci_romSimon Glass2018-10-091-2/+2
| | | | | | | | | | | | | | | | | | | | | Add some logging on failure. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| * | ctags: Minor changes to fix ctags outputSimon Glass2018-10-091-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At present ctags emits lines with unmatched quotes which means that the output file is invalid. This is with exuberant-ctags version 5.9~svn201103 but I also see it with plain ctags. I am not sure that it is a bug though. Make a few minor changes in the source code to fix this problem. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | panel: Expand the backlight supportSimon Glass2018-10-094-36/+199
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At present the panel can be turned on but not off, and the brightness cannot be controlled at run-time. Add a new API function to both the panel and backlight uclasses to handle this. Enhance the PWM backlight driver to deal with custom levels properly and allow the backlight to be turned on and off. Update the test to cover thes new features. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | test: panel: Add a test for the panel uclassSimon Glass2018-10-091-0/+25
| | | | | | | | | | | | | | | | | | | | | At present this uclass has no tests. Add a simple one which checks the PWM configuration, regulator and GPIO. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | cros_ec: Add support for v3 messages on LPCSimon Glass2018-10-091-0/+33
| | | | | | | | | | | | | | | | | | | | | At present version 3 messages are only supported on SPI. Add support for using LPC as well, as used on samus. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | cros_ec: Update cros_ec_read_hash() to specify the imageSimon Glass2018-10-091-3/+4
| | | | | | | | | | | | | | | | | | Allow selection of which EC image to hash. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | cros: Update ec_commands to latest versionSimon Glass2018-10-092-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This file has changed quite a bit in the last 5 years as the capabilities of the ECs have grown. Sync it up with the copy in coreboot commit b9141f2215. The only change is the addition of EC_VBNV_BLOCK_SIZE_V2. This is needed because U-Boot uses the new v2 vboot API and this is not currently fully supported by Chromium OS firmware. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | tpm: Use livetree and allow childrenSimon Glass2018-10-092-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | Adjust the TPM drivers to use livetree (only one does not). Also, sometimes TPMs can have child devices if they provide a service to the system (such as storing secure data), so permit that. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | video: Adjust video_clear() to return an errorSimon Glass2018-10-091-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | All driver-model operation should return an error code. Adjust this function to do so also. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Anatolij Gustschin <agust@denx.de>
| * | dm: spi: Add logging of some return valuesSimon Glass2018-10-094-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | When SPI flash operations fail it is helpful to be able to see the error codes and where they are generated. Add logging to capture this information for read operations. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | cros: Update cros_ec code to use struct udeviceSimon Glass2018-10-093-78/+79
| | | | | | | | | | | | | | | | | | | | | | | | At present we pass around a private pointer to specify the cros_ec device. With driver model it makes more sense to pass the device. Update the code to do this. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | serial: Allow serial to be absent in TPLSimon Glass2018-10-092-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | At present this option applies to SPL, but it should be available in TPL also, and separately. Change to using CONFIG_IS_ENABLED(), add a new Kconfig option and fix up hang(). Signed-off-by: Simon Glass <sjg@chromium.org>
| * | tpm: Add support for SPL and TPLSimon Glass2018-10-091-1/+1
| | | | | | | | | | | | | | | | | | | | | At present the tpm can only be used in U-Boot proper. Updated it to work in SPL and TPL also. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | fdt: Allow indicating a node is for U-Boot proper onlySimon Glass2018-10-091-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | At present it is not possible to specify that a node should be used before relocation (in U-Boot proper) without it also ending up in SPL and TPL device trees. Add a new "u-boot,dm-pre-proper" boolean property for this. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | rtc: Allow use of RTC in SPL and TPLSimon Glass2018-10-092-1/+19
| | | | | | | | | | | | | | | | | | | | | Add Kconfig options so that the RTC can be used in SPL and TPL. This is helpful for accessing the contents of CMOS RAM, for example. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | Kconfig: Convert CONFIG_RTC_MC146818 to KconfigSimon Glass2018-10-091-0/+8
| | | | | | | | | | | | | | | | | | Move this option to Kconfig and tidy up the two boards which use it. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | blk: Support block drivers in TPLSimon Glass2018-10-092-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | At present it is not possible to enable/disable block drivers in TPL. This is needed to provide sandbox support. Add a Kconfig option and adjust the Makefile. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | spl: input: Allow input in SPL and TPLSimon Glass2018-10-093-5/+59
| | | | | | | | | | | | | | | | | | | | | In some cases it is necessary to read the keyboard in early phases of U-Boot. Update the config to allow this. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | sf: Avoid allocating memory on every read operationSimon Glass2018-10-091-7/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At present spi_flash_cmd_read_ops() allocates and frees a few bytes of memory every time it is called. It is faster to use the stack for this and this is now supported by the minimum GCC version required by U-Boot. Remove the allocation and use a variable-sized array instead. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | dm: core: Update ofnode to read binman-style flash entrySimon Glass2018-10-092-24/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At present ofnode_read_fmap_entry() reads a flash map entry in a format which is not supported by binman. To allow use to use binman-format descriptions, update this function. Also add a simple test. Signed-off-by: Simon Glass <sjg@chromium.org>