summaryrefslogtreecommitdiffstats
path: root/include
Commit message (Collapse)AuthorAgeFilesLines
* ARM: i.MX8M: Add DDR controller supportSascha Hauer2020-02-192-0/+504
| | | | | | | | | | | | | | | This adds the DDR driver for the i.MX8MQ/i.MX8MM. It's taken from U-Boot v2020.04-rc1 with slight modifications for barebox The i.MX8MQ boards in the tree currently use the output of an earlier version of the NXP i.MX8M DDR Tool which doesn't use a controller driver but instead does most stuff in board code. It seems this can coexist with the new driver, only a few helper functions that previously lived in arch/arm/mach-imx/imx8-ddrc.c are now provided by the new driver. Tested on an i.MX8MM EVK Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mfd: Add Rohm bd71837 header fileSascha Hauer2020-02-191-0/+103
| | | | | | | The Rohm bd71837 is a PMIC used on the NXP i.MX8MM EVK eval board. For now only add the register definitions to be used by the lowlevel code. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* clk: imx: Add pll14xx supportSascha Hauer2020-02-191-0/+7
| | | | | | | | This adds support for the pll14xx found on i.MX8MM devices. This is taken from the Kernel as of v5.5. Since we'll need some early setup for the PLL a PBL hook is added to be called from lowlevel code. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* I2C: i.MX: Add early i2c support for i.MX8MSascha Hauer2020-02-191-0/+1
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* usb: gadget: fsl_udc: Add PBL image loading supportSascha Hauer2020-02-191-0/+6
| | | | | | | | | | | | | | | | | For boards that do the RAM setup in code we can up to now only download the PBL part to SRAM. This patch adds support for downloading the rest of the image after the RAM has been configured. The ROM is nice enough to leave the USB controller initialized after a download, so we don't have to reinitialize it, but can simply continue to use the controller. Like all two-staged loading processes on i.MX this needs board support, it will only work when a board calls imx_barebox_load_usb() or one of the SoC specific variants. This needs the host counterpart in imx-usb-loader which is done in the next patch. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* USB: gadget: fsl_udc: move register definitions to header fileSascha Hauer2020-02-191-0/+377
| | | | | | | The register definitions will be shared by the regular and the pbl driver, so move them to a header file. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/spdx'Sascha Hauer2020-02-18140-383/+141
|\
| * include: spi: add SPDX GPL-2.0-only license tags for files without licensing ↵Roland Hieber2020-02-174-0/+4
| | | | | | | | | | | | | | | | | | | | | | information According to our /README, GPL-2.0-only applies for the whole project except noted otherwise. Signed-off-by: Roland Hieber <rohieb@rohieb.name> Reviewed-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * include: spi: add SPDX GPL-2.0-or-later license tags where applicableRoland Hieber2020-02-171-10/+1
| | | | | | | | | | | | Signed-off-by: Roland Hieber <rohieb@rohieb.name> Reviewed-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * include: add SPDX LGPL-2.1-or-later license tags where applicableRoland Hieber2020-02-172-30/+4
| | | | | | | | | | | | Signed-off-by: Roland Hieber <rohieb@rohieb.name> Reviewed-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * include: add SPDX GPL-2.0-only license tags for files without licensing ↵Roland Hieber2020-02-1788-1/+88
| | | | | | | | | | | | | | | | | | | | | | information According to our /README, GPL-2.0-only applies for the whole project except noted otherwise. Signed-off-by: Roland Hieber <rohieb@rohieb.name> Reviewed-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * include: add SPDX GPL-2.0-or-later license tags where applicableRoland Hieber2020-02-1724-246/+24
| | | | | | | | | | | | Signed-off-by: Roland Hieber <rohieb@rohieb.name> Reviewed-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * include: add SPDX GPL-2.0-only license tags where applicableRoland Hieber2020-02-1721-96/+20
| | | | | | | | | | | | | | | | Interpret "GPLv2" as "GPLv2 only". Signed-off-by: Roland Hieber <rohieb@rohieb.name> Reviewed-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/pwm'Sascha Hauer2020-02-182-1/+4
|\ \
| * | PWM: core: constify chip->ops pointerAhmad Fatoum2020-02-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | There's no reason,users of the member would want to change the pointee. Make it const. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | regmap: forward declare structs used in headerAhmad Fatoum2020-02-101-0/+3
| |/ | | | | | | | | | | | | | | | | Both the device_d and device_node struct are used opaquely in this header. Forward declare them to avoid compilation errors on different include order. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/parameter'Sascha Hauer2020-02-182-11/+10
|\ \
| * | parameter: Return NULL instead of ENOSYS if CONFIG_PARAMETER is disabledChristian Eggers2020-01-271-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts 03b59bdb64 ("paramter: The dev_add_param_*() return ERR_PTR(), change no-ops to return ERR_PTR(-ENOSYS) instead of NULL"). Most callers of dev_add_param_*() don't care about whether CONFIG_PARAMETER is enabled or not. The remaining ones have already been prepared for getting a NULL pointer. As a result, these callers will not fail itself, only because CONFIG_PARAMETER (which is always optional) is disabled. Signed-off-by: Christian Eggers <ceggers@arri.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | mci: remove param_probe member from struct mciChristian Eggers2020-01-271-1/+0
| | | | | | | | | | | | | | | | | | | | | After adding the parameter, the pointer isn't required anymore. Signed-off-by: Christian Eggers <ceggers@arri.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/optee'Sascha Hauer2020-02-182-2/+13
|\ \ \
| * | | ARM: add optee early loading functionRouven Czerwinski2020-01-302-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a OP-TEE early loading function which expects a pointer to a valid tee binary and the device tree. OP-TEE will then be started and barebox will continue to run in normal mode. The function start_optee_early should be used in a boards lowlevel.c file. Ensure that barebox has been relocated and a proper c environment has been setup beforehand. Depending on the OP-TEE configuration, the fdt will be modified. If the internal barebox device tree is passed, OP-TEE will overwrite barebox PBL memory during this modification. Copy the fdt to a save memory location beforehand to avoid a corruption of barebox PBL memory. This also moves the OP-TEE Kconfig symbols into a separate menu. Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | optee: move optee_verify_header() to commonRouven Czerwinski2020-01-281-0/+5
| |/ / | | | | | | | | | | | | | | | | | | | | | Subsequent patches will use this to verify the header in the PBL, move it to common to make it potentially available for both. Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/mmc'Sascha Hauer2020-02-181-11/+14
|\ \ \
| * | | mci: core: populate mci_ios.timing memberAhmad Fatoum2020-02-141-11/+14
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | So far we passed an uninitialized timing member in the ios to the ->set_ios of the host controller drivers. To allow extension for new modes that need MCI host support beyond the usual clock rate change, make the member useful: - populate is with the correct value - add some type safety by using an enum - print it in the devinfo output Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/misc'Sascha Hauer2020-02-184-3/+325
|\ \ \
| * | | fs: jffs2: add initial support for reading jffs2Steffen Trumtrar2020-02-102-0/+322
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Import the jffs2 filesystem code from Linux v5.5-rc1 and convert it to work with barebox. Writing is *not* supported. Testing was done with a n25q256a-compatible QuadSPI chip on a SoCFPGA-based Socrates board. Testing was done with a combination of: user@somelinuxhost: mkfs.jffs2 --eraseblock=4 -d fs/jffs2/ -o jffs2.img root@target:~ flash_erase -j /dev/mtd5 0 0 root@target:~ dd if=jffs2.img of=/dev/mtd5 barebox@EBV SOCrates:/ mount /dev/mtd0.data (...) mounted /dev/mtd0.data on /mnt/mtd0.data Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | eeprom: at25: Allow page sizes greater than 16 bitChristian Eggers2020-01-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For FRAM devices the page size is usually equal to the device size. Some available devices are greater than 64kB, so a 32 bit variable must be used. The same change has to be done for the Linux driver. I'll try to upstream this as soon as possible. Signed-off-by: Christian Eggers <ceggers@arri.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | param: Make enum param_tristate always visibleChristian Eggers2020-01-221-2/+2
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When disabling CONFIG_SHELL_HUSH, also CONFIG_PARAMETER may be disabled. In this case, the definition "enum param_tristate" is not reachable from watchdog.h. I also considered moving almost everything in watchdog.h inside the CONFIG_WATCHDOG guard. But this doesn't work for me because drivers/watchdog/imxwd.c can also be built without CONFIG_WATCHDOG. Signed-off-by: Christian Eggers <ceggers@arri.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/imx'Sascha Hauer2020-02-181-0/+16
|\ \ \
| * | | regulator: pfuze: add support to other architecturesMichael Grzeschik2020-02-031-0/+16
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | Currently the pfuze driver is build dependent to ARCH_IMX6. To make it possible to work with ARCH_IMX8 we move the imx6_poweroff call to an own poweroff handler. Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/imdcrc'Sascha Hauer2020-02-181-1/+37
|\ \ \
| * | | imd: add support for checksum generation/verificationSteffen Trumtrar2020-02-101-1/+37
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a new imd type "checksum". This type consists of the CRC32 checksum of the whole barebox image minus the checksum itself. The checksum can be written to the imd field with the bareboximd host-tool. It can be verified with said tool or with "imd" on the target. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | clk-conf.h: Add static inline wrapper for of_clk_set_defaults()Sascha Hauer2020-02-131-0/+8
| | | | | | | | | | | | | | | | | | Will be needed once we call of_clk_set_defaults() from the driver core. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | clk-conf.h: Add missing re-inclusion protectionSascha Hauer2020-02-131-2/+5
| |/ |/| | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | acpi: include missing header in <acpi.h>Ahmad Fatoum2020-02-101-0/+1
|/ | | | | | | | | | acpi_sigcmp defined in the header uses memcmp, but no included headers pull in memcmp, which can lead to compile errors in new code, depending on include order. Fix this. Reported-by: @healytpk, https://github.com/saschahauer/barebox/issues/7 Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/zynq'Sascha Hauer2020-01-152-0/+93
|\
| * serial: cadence: add lowlevel init and putc functionsLucas Stach2020-01-141-0/+55
| | | | | | | | | | | | | | This allows to use the Cadence serial as a PBL console. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * serial: cadence: move register definitions into header fileLucas Stach2020-01-141-0/+37
| | | | | | | | | | Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * filetype: add Zynq image typeLucas Stach2019-12-111-0/+1
| | | | | | | | | | | | | | | | Use the 2 invariant words (width detection and image identification) from the Zynq image header to detect the filetype. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/rpi'Sascha Hauer2020-01-156-4/+156
|\ \
| * | regulator: add function to get regulator by its nameSascha Hauer2019-12-201-0/+1
| | | | | | | | | | | | | | | | | | | | | Useful for getting regulators that are not correctly associated with a device. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | usb: Add usbroothubdes.hSascha Hauer2019-12-201-0/+128
| | | | | | | | | | | | | | | | | | Taken from U-Boot, needed for the upcoming dwc2 driver. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | of: Read dma_offset from device treeSascha Hauer2019-12-201-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | This reads the dma-ranges property from the device tree and sets dma_offset in the devices accordingly. The code is mostly taken from the Kernel as of v5.5-rc1. of_dma_configure() is trimmed down to the cases we want to support currently. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | device: Introduce dma_offsetSascha Hauer2019-12-201-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For devices that do not have a 1:1 mapping between DMA and CPU we need a dma_offset. This adds dma_offset to struct device_d and starts honoring it in ARM dma_(un)map_single(). Also we add some comments to functions that would normally need a device argument to make the DMA <-> CPU translations device specific. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | of: Add of_bus_n_xxx_cells()Sascha Hauer2019-12-201-0/+12
| | | | | | | | | | | | | | | | | | Added straight from the Kernel. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | usb: Make timeout unit clearSascha Hauer2019-12-201-4/+4
| |/ | | | | | | | | | | | | The usb_*_msg() functions take a timeout parameter. Make clear which unit is expected by adding a _ms suffix to the variable name. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/misc'Sascha Hauer2020-01-152-6/+5
|\ \
| * | include/linux/amba/bus.h: drop unused declarationsAntony Pavlov2020-01-081-6/+0
| | | | | | | | | | | | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | Allow usage of default environment without environment file storageAlbert Schwarzkopf2019-12-111-0/+5
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, the default environment is only used when the barebox environment on the persistent store is not valid or when ENVFS_FLAGS_FORCE_BUILT_IN is set in the super block. However, ENVFS_FLAGS_FORCE_BUILT_IN can be cleared and the environmnet variables in the persistent store will be used again. This may not be desirable. This patch allows building CONFIG_DEFAULT_ENVIRONMENT independent of CONFIG_ENV_HANDLING. This can be useful if you never want to load or write values from the persistent store and you only need to read environment variables from your default environment. If CONFIG_ENV_HANDLING is not set, a message will be printed to the user indicating that changes to non-volatile variables won't be persisted. Move envfs functions that are needed when CONFIG_DEFAULT_ENVIRONMENT and/or CONFIG_ENV_HANDLING is set to a new file common/envfs-core.c. Signed-off-by: Albert Schwarzkopf <a.schwarzkopf@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | include/soc/fsl: Make struct ccsr_qman v3 specificSascha Hauer2020-01-131-12/+1
| | | | | | | | | | | | | | | | | | | | struct ccsr_qman is ifdeffed for different versions of this structure. CONFIG_SYS_FSL_QMAN_V3 is not defined which means we happen to use the wrong version on LS1046a. Hardcode it to the v3 version to make it work on LS1046a and rename it to ccsr_qman_v3 to make it obvious that it needs a change on non v3 versions. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>