summaryrefslogtreecommitdiffstats
path: root/drivers
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'for-next/usb-dwc2' into masterSascha Hauer2020-08-1916-1914/+6308
|\
| * usb: dwc2: Use register_otg_deviceJules Maselbas2020-08-142-5/+28
| | | | | | | | | | Signed-off-by: Jules Maselbas <jmaselbas@kalray.eu> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * usb: dwc2: Add gadget driverJules Maselbas2020-08-148-0/+2825
| | | | | | | | | | | | | | This driver is comes from Linux (~ 5.1-rc6) and only support buffer DMA. Signed-off-by: Jules Maselbas <jmaselbas@kalray.eu> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * usb: dwc2: Add structure for gadget driverJules Maselbas2020-08-141-0/+55
| | | | | | | | | | Signed-off-by: Jules Maselbas <jmaselbas@kalray.eu> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * usb: dwc2: Add function to flush tx fifoJules Maselbas2020-08-142-0/+34
| | | | | | | | | | Signed-off-by: Jules Maselbas <jmaselbas@kalray.eu> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * usb: dwc2: host: Rewrite dwc2_hc_initJules Maselbas2020-08-141-20/+27
| | | | | | | | | | | | | | | | Removed the uses of a table to convert the usb endpoint type for the controller. Signed-off-by: Jules Maselbas <jmaselbas@kalray.eu> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * usb: dwc2: host: Fix toggle resetJules Maselbas2020-08-141-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | From USB 2.0 specification, section 9.4.5: ClearFeature(ENDPOINT_HALT) request always results in the data toggle being reinitialized to DATA0. The hacky solution for now is to reset the toggle bit to DATA0 when the host controller send a ClearFeature request on an endpoint. Signed-off-by: Jules Maselbas <jmaselbas@kalray.eu> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * usb: dwc2: host: Dynamic fifo size support from LinuxJules Maselbas2020-08-142-30/+124
| | | | | | | | | | Signed-off-by: Jules Maselbas <jmaselbas@kalray.eu> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * usb: dwc2: host: Handle dma mapping errorsJules Maselbas2020-08-141-0/+5
| | | | | | | | | | Signed-off-by: Jules Maselbas <jmaselbas@kalray.eu> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * usb: dwc2: Rework timeoutJules Maselbas2020-08-142-19/+19
| | | | | | | | | | Signed-off-by: Jules Maselbas <jmaselbas@kalray.eu> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * usb: dwc2: Rework roothub interfaceJules Maselbas2020-08-143-280/+245
| | | | | | | | | | | | | | Roothub requests are now decoded in one place. Signed-off-by: Jules Maselbas <jmaselbas@kalray.eu> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * usb: dwc2: host: Read dr_mode from device treeJules Maselbas2020-08-143-0/+98
| | | | | | | | | | Signed-off-by: Jules Maselbas <jmaselbas@kalray.eu> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * usb: dwc2: Add host controller driverJules Maselbas2020-08-1411-0/+3183
| | | | | | | | | | | | | | | | | | The host driver is taken from U-Boot (v2018.09-rc3) and mixed with some part from Linux, mainly the replacement of memory map structure in favor of the read/write functions. Signed-off-by: Jules Maselbas <jmaselbas@kalray.eu> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * Revert "usb: Add dwc2 host driver"Jules Maselbas2020-08-144-1914/+0
| | | | | | | | | | | | | | This reverts commit 69f8b20cc016dc3680d5acc20f43a3e52c0bff7e. Signed-off-by: Jules Maselbas <jmaselbas@kalray.eu> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/misc' into masterSascha Hauer2020-08-187-24/+16
|\ \
| * | video: ssd1307fb: Honour reset GPIO polaritySascha Hauer2020-08-181-7/+11
| | | | | | | | | | | | | | | | | | | | | The reset GPIO polarity was hardcoded as active low. Honour the polarity flags given in the device tree instead. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | USB: gadget: Add serialnumber device parameterJules Maselbas2020-08-032-0/+5
| | | | | | | | | | | | | | | | | | | | | This add the device parameter usbgadget.serialnumber Signed-off-by: Jules Maselbas <jmaselbas@kalray.eu> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | treewide: remove stale instances of struct deviceAhmad Fatoum2020-08-034-17/+0
| | | | | | | | | | | | | | | | | | | | | | | | We call it struct device_d, any instances of struct device are likely left-over code after porting from Linux. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/imx' into masterSascha Hauer2020-08-184-8/+218
|\ \ \
| * | | nvmem: ocotp: add support for i.MX8MMLucas Stach2020-08-172-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For whatever reason the i.MX8MM OCOTP got a separate compatible and is not marked as compatible to imx8mq, while the parameters used in the driver seem to be the same. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | nvmem: enable OCOTP for i.MX7Rouven Czerwinski2020-08-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since we now have proper timing, read and write support, enable the OCOTP driver for i.MX7 Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | nvmem: ocotp: read/write i.MX7 supportRouven Czerwinski2020-08-101-6/+141
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement read and write support for the banked access on i.MX7. Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | nvmem: ocotp: add new timing function for i.MX7Rouven Czerwinski2020-08-101-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Ported from the linux kernel. Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | nvmem: ocotp: retrieve set_timing from structureRouven Czerwinski2020-08-101-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | i.MX7S/D use a different timing setup, prepare for a new different timing function. Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | clk: imx7: add IMX7D_OCOTP_CLKRouven Czerwinski2020-08-101-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise barebox is not able to resolve the clock from the device tree node. Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | mci: imx-esdhc-pbl: Add support for IMX7Anees Rehman2020-08-101-0/+37
| | |/ | |/| | | | | | | | | | Signed-off-by: Anees Rehman <anees.r3hman@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/at91' into masterSascha Hauer2020-08-185-58/+234
|\ \ \
| * | | mfd: add Atmel Flexcom supportAhmad Fatoum2020-08-033-0/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a wrapper which embeds a SPI controller, a I2C controller and a USART. Only one function can be used at a time. The choice is done at boot time by the probe function of this MFD driver according to a device tree property. These IP cores are available in the sama5d2 and sam9x60. We already have support for all three configurations, only thing we need is the MFD selecting one of them. Add this. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | i2c: at91: extend for sama5d2 supportAhmad Fatoum2020-08-031-19/+116
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Port over the Linux v5.8-rc4 bits to support i2c on the sama5d2. This has been tested by reading the i2c EEPROM on the sama5d27-som1-ek. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | i2c: sync i2c_parse_fw_timings() with upstreamAhmad Fatoum2020-08-031-39/+34
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | Upstream now has support for i2c-digital-filter-width-ns and i2c-analog-filter-cutoff-frequency device tree properties, that are used in an upcoming patch. Prepare for it by syncing with Linux v5.8-rc4. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / / Revert "usb: host: ehci: Use to USBSTS to wait for transfer completion"Christian Eggers2020-08-142-8/+14
|/ / | | | | | | | | | | | | | | | | | | | | Since 6044d6c08e, some USB mass storage devices (in my case some USB memory sticks and one SD card reader) are not detected anymore. Waiting once for USBSTS::USBINT is not sufficient as it takes multiple USBINT events until QT_TOKEN_STATUS_ACTIVE is cleared. Fixes: 6044d6c08e ("usb: host: ehci: Use to USBSTS to wait for transfer completion") Signed-off-by: Christian Eggers <ceggers@arri.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | gpio: get function returns masked register valueRenaud Barbier2020-08-031-1/+1
| | | | | | | | | | | | | | | | | | | | Unlike Linux the generic driver get function returns the masked register content and not the 0 or 1 value. The consequence is that gpio_get_value returns for instance 0x10 for bit 4 instead of 1. Use the Linux normalized form instead. Signed-off-by: Renaud Barbier <renaud.barbier@abaco.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | i2c: stm32: support new st,stm32mp15-i2c compatibleAhmad Fatoum2020-08-031-0/+1
|/ | | | | | | | | | | | | | Linux v5.8-rc1 has gained support for the FastMode+ registers on the stm32mp15, but those are incompatible between the stm32mp15 and the stm32f7, so a new compatible was introduced. The old compatible was replaced for the MP15 SoC, breaking I2C in barebox. Add the new compatible to fix this. Unlike Linux, we just use the same setup parameters as for the stm32f7. This is ok as long we don't want to support FastMode+. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/watchdog'Sascha Hauer2020-07-271-0/+30
|\
| * startup: inhibit watchdogs on non-interactive autoboot abortAhmad Fatoum2020-06-231-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | nv.autoboot=abort has been added as development aid to have barebox stop at the shell prompt automatically. It makes sense to inhibit all watchdogs in this mode, so the user can later use the shell in peace. This also applies to fastboot aborting the shell prompt. If this happens, watchdog will be automatically inhibited as well. Behavior on user aborting the shell prompt via keypad or uart input remains unchanged for backwards-compatibility. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * watchdog: permit `wd 0` for non-stoppable, but inactive, watchdogsAhmad Fatoum2020-06-231-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | A watchdog that can't be stopped returns -ENOSYS on set_timeout(0). If the watchdog supports communicating whether it's running, we could still allow `wd 0`, if it hasn't been started yet. Setting device parameter .priority=0 disables a watchdog. One would expect this to always succeed for a not-running watchdog, but currently it doesn't, if the driver's set_timeout(0) returns -ENOSYS. With this fix, this is supported making the user API less surprising. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/ramfs'Sascha Hauer2020-07-272-3/+0
|\ \
| * | update list.h from Linux-5.7Sascha Hauer2020-06-172-3/+0
| |/ | | | | | | | | | | This updates include/linux/list.h from Linux-5.7. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/misc'Sascha Hauer2020-07-2723-128/+359
|\ \
| * | treewide: Convert files covered by ARM copyright to SPDXUwe Kleine-König2020-07-144-49/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to Marc Zyngier, former employee at ARM, the company owns the copyright for code created by its employees. Convert accordingly to SPDX with the usual rearrangements. Also dropped Marc's email address which doesn't work any more. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | i2c: designware: use proper type for writel argumentAhmad Fatoum2020-07-141-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | We need to write DW_IC_ENABLE_ENABLE (1 << 0) to the register to enable, but instead we were writing true. This happens to work, but is quite unusual. Make the code more readable. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | mfd: superio: depend on X86 || COMPILE_TESTAhmad Fatoum2020-07-141-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | Super I/O chips are usually found x86 PCs. Make them depend on it, so users of other arches aren't prompted for it, when they oldconfig. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | mfd: superio: smsc: fix C99ism initial declaration in for loopAhmad Fatoum2020-07-141-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Codebase is meant to be gnu89, but was only enforced starting with bc4840e98b94 ("kbuild: add -Wmissing-prototypes and -std=gnu89 to KBUILD_HOSTCFLAGS"). Since then, this driver no longer compiles. Fix this. Fixes: eaf020f1bb52 ("mfd: superio: add base SMSC MFD driver") Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | mci: dw_mmc: remove unused local variableAhmad Fatoum2020-07-141-2/+1
| | | | | | | | | | | | | | | | | | | | | data_start is assigned once and never used. Drop it. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | ARM: stm32mp: depend on ARCH_STM32MP for SoC driversAhmad Fatoum2020-07-143-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | The i2c, MCI and reset controller peripherals are STM32-specific. There is no reason to ask uses on oldconfig about it, thus make them depend on ARCH_STM32MP || COMPILE_TEST. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | drivers: net: phy: at803x: add phy clk setup via dtsMichael Grzeschik2020-07-051-7/+171
| | | | | | | | | | | | | | | | | | | | | | | | | | | There are dt-bindings for the setup of the clk configuration in the phy. This patch adds support for these bindings in the driver. Reviewed-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | net: phy: add uapi/linux/mdio.h from kernel for MDIO MMD accessMichael Grzeschik2020-07-052-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The headerfile is used in the kernel for access of MDIO Managed Devices (MMD) indirect access. Some drivers already use those device addresses. We add the headerfile from the kernel and change the current users to use the defines instead Reviewed-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | treewide: make use of PTR_ERR_OR_ZEROUwe Kleine-König2020-06-267-33/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PTR_ERR_OR_ZERO is designed to replace boiler plate like: if (IS_ERR(x)) return PTR_ERR(x); return 0; Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | net: phy: micrel: backport ksz9031 phy-mode supportOleksij Rempel2020-06-171-0/+103
| | | | | | | | | | | | | | | | | | | | | | | | this patch will allow to use proper clock skew configuration from devicetree instead of using board specific fixups. Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | net: phy: port phy_interface_is_rgmii() from kernelOleksij Rempel2020-06-172-12/+0
| | | | | | | | | | | | | | | | | | | | | and remove duplicates from other drivers Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>