summaryrefslogtreecommitdiffstats
path: root/drivers
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'for-next/of'Sascha Hauer2019-10-171-12/+141
|\
| * of: add of_diff()Sascha Hauer2019-09-121-10/+131
| | | | | | | | | | | | | | of_diff compares two device trees against each other and prints a diff-like result. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * of: Fix memory hole in of_find_node_by_reproducible_name()Sascha Hauer2019-09-121-2/+10
| | | | | | | | | | | | | | of_get_reproducible_name() returns an allocated string, so we must free it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/mmc'Sascha Hauer2019-10-172-6/+28
|\ \
| * | mci: imx-esdhc: fix error handling during probeMarco Felsch2019-09-121-6/+24
| | | | | | | | | | | | | | | | | | | | | | | | Currently the the driver don't handle any error and return immediately. Handling the errors correctly is a must to support defered probing. Signed-off-by: Marco Felsch <m.felsch@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | mci: core: make mci_register -EPROBE_DEFER sensitiveMarco Felsch2019-09-121-0/+4
| |/ | | | | | | | | | | | | | | If the current regulator can't be requested because of -EPROBE_DEFER we shouldn't print a error and ignore it. Signed-off-by: Marco Felsch <m.felsch@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/misc'Sascha Hauer2019-10-1724-54/+1045
|\ \
| * | mfd: superio: add base SMSC MFD driverAhmad Fatoum2019-10-143-0/+122
| | | | | | | | | | | | | | | | | | | | | | | | | | | The SMSC FDC37C93xAPM is the Super I/O chip on the Dell Latitude 7490. This adds device detection for it and its siblings, so device drivers can be written against it or init scripts can use its regmap interface. Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | watchdog: add support for Fintek F718xx and, F818xx Super I/OAhmad Fatoum2019-10-143-0/+389
| | | | | | | | | | | | | | | | | | | | | | | | This is an adaptation of the Linux v5.3 f71808e_wdt driver for the watchdog component of the Fintek Super I/O chips. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | mfd: superio: add Fintek MFD driverAhmad Fatoum2019-10-143-0/+129
| | | | | | | | | | | | | | | | | | | | | | | | | | | Super I/O chips require a password to unlock access to the I/O ports. Add a driver that pokes the password and registers the appropriate GPIO and Watchdog devices as well as a regmap reflecting the Super I/O chip. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | mfd: add basic Super I/O chip helpersAhmad Fatoum2019-10-143-0/+102
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Super I/O chips are ICs common to x86 that are used for interfacing to low-bandwidth peripherals. They often contain serial ports, watchdog timers and hardware monitoring units. They are usually addressable via one of two I/O port pairs, either 0x2e-0x2f or 0x4e-0x4f, but they don't typically respond to reads from their range unless a device-specific 'password' has been poked in. After this is done, they are read and written in the same manner however. On Linux, these devices aren't subject to any device/driver model. Each driver for some function (e.g. watchdog or GPIO) duplicates the device probe in the module_init and board-specific configuration is handled via module parameters. Lets do it a bit fancier in barebox and add a helper to register chips and a regmap for the control and configuration registers as well as a helper to register child devices for each function contained within the Super I/O chip. Board-specific configuration, e.g. which pin to use as a watchdog reset, can then be realized using barebox device-specific parameters. The regmap will be more of a debugging aid, however. For ease of porting from Linux, it's expected that access to the I/O ports won't happen via the regmap. For this reason, the new <superio.h> header offers functions to read/write these chips' registers as well. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | regulator: pfuze: add device_id of pfuze3001Ahmad Fatoum2019-10-141-0/+2
| | | | | | | | | | | | | | | | | | | | | This enables easy access to the pfuze3001's registers via regmap. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | regulator: pfuze: remove unused driver_dataAhmad Fatoum2019-10-141-20/+6
| | | | | | | | | | | | | | | | | | | | | We pass along driver_data that goes unused. Drop it. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | gpio: add DA9062 MFD gpio supportMarco Felsch2019-10-141-0/+136
| | | | | | | | | | | | | | | | | | | | | | | | | | | The DA9062 PMIC is a mfd device which have 5 gpios. These can be configured to work as input/output or to have an alternate function. This commit adds the support to configure the gpios as input or output. Signed-off-by: Marco Felsch <m.felsch@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | mfd: da9063: add support to populate subdevsMarco Felsch2019-10-141-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The upstream dt-bindings abstracts the DA9063/2 PMIC MFD by multiple of-subnodes and the linux-mfd core creates platform-devices for each node. Due to the lack of a mfd fw we need to add the platform-devices by our own to reuse the upstream bindings. Signed-off-by: Marco Felsch <m.felsch@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | MIPS: net: ag71xx/ar9331: partially sync network support with upstreamOleksij Rempel2019-10-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ethernet support for ar9331 is upstream now. So, drop every thing what is provided by upstream devicetree and rename compatible in the driver. barebox network driver will need more work to be upstream compliant. For example we should not request or touch the gmac register directly. Since currently it is not clear how this should be implemented, patch the upstream dts with reg-names = "ge0", "gmac". Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | nvmem: Fix read/write access to partition devicesStefan Riedmueller2019-10-141-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | Partition devices are not directly associated with the nvmem instance but via their master cdev. Thus reading and writing needs to be handled via the master. Signed-off-by: Stefan Riedmueller <s.riedmueller@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | net: dsa: mv88e6xxx: Wait for EEPROM done after HW resetAndrey Smirnov2019-10-145-0/+124
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Based on a unpublished patch from Andrew Lunn: When the switch is hardware reset, it reads the contents of the EEPROM. This can contain instructions for programming values into registers and to perform waits between such programming. Reading the EEPROM can take longer than the 100ms mv88e6xxx_hardware_reset() waits after deasserting the reset GPIO. So poll the EEPROM done bit to ensure it is complete. Signed-off-by: Andrew Lunn <andrew@lunn.ch> orignal patch augmented to have necessary Global 1 plubming, ported to Barebox and slightly changed. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Cc: Chris Healy <cphealy@gmail.com> Cc: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | net: dsa: mv88e6xxx: Fix error message typoAndrey Smirnov2019-10-141-1/+1
| | | | | | | | | | | | | | | | | | | | | s/MIDO/MDIO Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | USB: gadget: ACM: don't announce V.25ter supportAhmad Fatoum2019-10-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | barebox currently announces support for ITU V.25ter AT commands, but doesn't handle them specially when they arrive. Instead they are passed as is to the sole barebox input console, where it may interfere with valid user input. This is especially annoying as ModemManager probes ttyACM devices that announce their AT command support. So even when not using the ttyACM device at all, the other UART ports are affected. Fix this by ceasing to announce USB_CDC_ACM_PROTO_AT_V25TER as function protocol. After applying this patch, I can't see any spurious AT or ~x~ symbols on the console anymore. Cc: <bst@pengutronix.de> Cc: <jlu@pengutronix.de> Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | input: set console input name as inputAhmad Fatoum2019-10-141-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | The input console is usually called /dev/cs0 and devinfo doesn't yield any extra information what this device is about. Rename it for clarity. Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | mtd: ubi: Max out wear-leveling thresholdStefan Riedmueller2019-10-144-26/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Due to the recursive ubi_thread implementation in the barebox, a large amount of wear-leveling can lead to a stack overflow. This was observed during extensive ubi stress tests with the linux kernel and periodic power cycles. We found that if the wear-leveling threshold is exceeded and a large amount of erase blocks need wear-leveling the stack can overflow. The hardware used to observe this was a phyCORE-i.MX 6 with 1GB NAND flash. As the kernel is perfectly capable of handling wear-leveling we can disable wear-leveling in the barebox by maxing out the threshold and removing its Kconfig option. Signed-off-by: Stefan Riedmueller <s.riedmueller@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | regmap: align documentation in comment with codeAhmad Fatoum2019-10-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | dev_get_regmap has some copy-paste left-over in the comment. Rectify this. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/machine-id'Sascha Hauer2019-10-171-0/+19
|\ \ \
| * | | nvmem: ocotp: set unique id as machine-id hashableBastian Krause2019-09-301-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pass the OCOTP unique id as hashable information to machine id generation. Signed-off-by: Bastian Krause <bst@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | Merge branch 'for-next/layerscape'Sascha Hauer2019-10-1713-23/+5280
|\ \ \ \
| * | | | gpio: add driver for MPC8xxx ip coreSteffen Trumtrar2019-09-173-0/+131
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Import GPIO-driver for MPC512x/8349/8572/8610/QorIQ and compatible from Linux v5.2. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | usb: gadget: composite: conditionally dequeue setup requestsSascha Hauer2019-09-171-3/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is an adoption of Kernel commit a7c12eaf2 ("usb: gadget: composite: conditionally dequeue os_desc and setup requests"). Basically we only want to dequeue ep0 requests when they are actually queued. Drivers like dwc3 warn when unqueued requests are being tried to unqueued. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | usb: dwc3: add support for gadget modeSteffen Trumtrar2019-09-178-20/+5094
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Expand the DWC3 usb core with gadget support. Patches imported and adopted from Linux v5.2. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | usb: gadget: add usb_gadget_udc_reset functionSteffen Trumtrar2019-09-171-0/+15
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | Add a function to notify the udc core, that a bus reset occured. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | Merge branch 'for-next/imx'Sascha Hauer2019-10-173-20/+27
|\ \ \ \
| * | | | net: fec_imx: Fix resource rollback with regulator errorsStefan Riedmueller2019-10-141-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the driver is not able to get or control the phy regulator memory resources are already acquired and need to be released during rollback. Signed-off-by: Stefan Riedmueller <s.riedmueller@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | i2c-mux-pca954x: Add support for "i2c-mux-idle-disconnect"Andrey Smirnov2019-10-141-1/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for "i2c-mux-idle-disconnect" binding to match the behavior, already present in upstream kernel driver. This feature is a must have for I2C bus topologies with multiple muxes connected to child segments containing slaves with identical addresses (e.g. ZII's SCU4) Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | video: imxfb: make pcr and bpp per-display settingsUwe Kleine-König2019-09-121-17/+6
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These settings used to be specified per-mode. But the device tree bindings have these two values attached to the display and not to each mode. Also for the supported boards it doesn't matter as they all only have a single mode. This is preparatory work to add devicetree support for the imxfb driver. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | Merge branch 'for-next/bfin'Sascha Hauer2019-10-179-422/+2
|\ \ \ \
| * | | | USB: remove blackfin supportSascha Hauer2019-09-126-284/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The blackfin architecture has been removed from barebox. Remove the blackfin specifics in the USB drivers as well. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | serial: Remove blackfin driverSascha Hauer2019-09-123-138/+0
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | The blackfin architecture has been removed from barebox. Remove the serial driver as well. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | Merge branch 'for-next/at91'Sascha Hauer2019-10-176-7/+333
|\ \ \ \
| * | | | usb: gadget: at91_udc: don't depend on !ARCH_SAMA5D4Ahmad Fatoum2019-10-141-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The negative depends rules out using UDC for some targets of a multi-image barebox while still supporting SAMA5D4. We don't (yet) have such a configuration, but seeing as there is little to gain by restricting the selection, drop it. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | ARM: at91: delete no-longer needed #ifdef guardsAhmad Fatoum2019-10-141-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | c16bcbc644 ("ARM: at91: remove unused defines") removed conflicting definitions from the headers, so we can include the headers and code that uses them unconditionally now. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | pinctrl: add gpio and pinctrl driver for sama5d2 PIO4Ahmad Fatoum2019-10-144-0/+333
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The sama5d2 features a GPIO and pin controller different than the one we support in barebox. The device tree bindings are different as well, so it makes sense to have a separate driver for it. Add the pin control and GPIO driver as well as some helpers usable from PBL, should we want to do pinmuxing that early. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | Merge branch 'for-next/arm'Sascha Hauer2019-10-176-455/+0
|\ \ \ \ | |/ / / |/| | |
| * | | net: Remove NETX ethernet driverSascha Hauer2019-09-233-288/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | NETX support has been removed from barebox, so remove the ethernet driver as well. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | serial: Remove NETX serial driverSascha Hauer2019-09-233-167/+0
| |/ / | | | | | | | | | | | | | | | | | | NETX support has been removed from barebox. Remove the serial driver as well. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | input: specialkeys: remove unused printk argumentAhmad Fatoum2019-10-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Two pr_info calls have no format specifiers, but are still passed an argument. Remove the unused arguments. Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | mci: imx-esdhc-pbl: Fix watermark level value for i.MXAndrey Smirnov2019-10-022-3/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Layerscape and i.MX have different semantics of Watermark Level Register. Whereas the former uses "0" to signify maximum allowed value, the latter does not. According to the RM (i.MX8MQ, i.MX6): "...The read burst length must be less than or equal to the read watermark level.." Setting Watermark Level Register to zero violates that limitation. It appears that, on i.MX8MQ, not following that rule causes certain configs + toolchains to result in non-bootable image. Specifically, polling for CICHB, CIDHB and DLA to clear in esdhc_send_cmd() times out. There doesn't appear to be any clear relationship as to what kind of image will have the problem, but the following combinations failed to boot on ZII i.MX8MQ Zest board: - gcc version 9.2.1 20190827 (Red Hat Cross 9.2.1-1) (GCC) + imx_v8_defconfig + CONFIG_DEBUG_LL and CONFIG_PBL_CONSOLE - gcc version 5.5.0 (Timesys 20190405) (custom toolchain) + imx_v8_defconfig Setting WML's *_BRST_LE to 16 and *_WML to 128 on i.MX resolves the issue (same setting that's selected by writing 0 on Layerscape). Fixes: 48562aeaa8 ("esdhc-xload: check for PRSSTAT_BREN only after each block") Cc: Chris Healy <cphealy@gmail.com> Cc: Ruslan Sushko <ruslan.sushko@zii.aero> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Tested-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | mtd: nand: nand_omap_gpmc: Fix mtd_info usageTeresa Remmet2019-09-301-8/+8
| |/ |/| | | | | | | | | | | | | | | | | | | The mtd_info has not been set correctly in the omap gpmc probe. Remove the mtd_info in the private struct like it has been done in other nand drivers. And update the driver accordingly. Fixes: 76b6f74c5397 ("mtd: nand: Embed struct mtd_info into struct nand_chip") Signed-off-by: Teresa Remmet <t.remmet@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | clk: i.MX6qp: Fix location of the enfc_sel muxSascha Hauer2019-09-121-1/+1
|/ | | | | | | | | | | | | | | | | | | | | | | On the i.MX6qp the enfc_sel mux is at bits 15-17, not on 16-17. Fix this. During clock tree initialization we reparented the enfc_sel to: clk_set_parent(clks[IMX6QDL_CLK_ENFC_SEL], clks[IMX6QDL_CLK_PLL2_PFD2_396M]); This resulted in a register setting 0b110 for the enfc_sel mux which is reserved. Apparently this reserved setting resulted in the enfc clock being driven from pll3_pfd3_454m. This means our enfc clock was the factor 454/396 too high. With b534f79112f0 ("clk: imx6: Fix procedure to switch the parent of LDB_DI_CLK") we happened to disable pll3_pfd3_454m during init, so with this commit NAND stopped working entirely on i.MX6qp. Both issues are fixed with this patch Fixes: b534f79112f0 ("clk: imx6: Fix procedure to switch the parent of LDB_DI_CLK") Fixes: 92fd61d12723 ("clk: i.MX6: Fix enfc_sel for i.MX6dqp") Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/stm32'Sascha Hauer2019-09-1210-0/+1266
|\
| * watchdog: add support for STPMIC1 integrated watchdogAhmad Fatoum2019-09-093-0/+231
| | | | | | | | | | | | | | | | The driver adds support for the PMIC's watchdog, reset, poweroff and reset reason query capabilities. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>