summaryrefslogtreecommitdiff
path: root/drivers/misc
Commit message (Collapse)AuthorAgeFilesLines
* spl: misc: Allow misc drivers in SPL and TPLSimon Glass2019-05-212-3/+77
| | | | | | | | In some cases it is necessary to read the keyboard in early phases of U-Boot. The cros_ec keyboard is kept in the misc directory. Update the config to allow this. Signed-off-by: Simon Glass <sjg@chromium.org>
* gdsys_rxaui_ctrl: Use new regmap interfaceMario Six2019-05-211-1/+1
| | | | | | | For the DM case, use the proper parameter for the regmap_init_mem call (which is the ofnode, not the udevice). Signed-off-by: Mario Six <mario.six@gdsys.cc>
* gdsys_rxaui_ctrl: Return old stateMario Six2019-05-211-1/+6
| | | | | | | Make the gdsys_rxaui_ctrl polarity setting function return the old state to comply with the API requirements. Signed-off-by: Mario Six <mario.six@gdsys.cc>
* cros_ec: Use a hyphen in the uclass nameSimon Glass2019-05-081-1/+1
| | | | | | | | | | | | | | | | Device-tree rules require that aliases use a hyphen rather than a underscore. Update the uclass name to fit with this. This allows device-tree aliases to be used to refer to cros-ec devices, for example: aliases { cros-ec0 = &ec; cros-ec1 = &pd; }; Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* mxc_ocotp: Disable fuse sense for imx8mq B1Ye Li2019-04-251-0/+5
| | | | | | | | | | On iMX8MQ Rev B1, reading from fuse box is not allowed. The OCOTP_READ_FUSE_DATA register is tied to magic number 0xff0055aa for chip rev. So u-boot has to disable the fuse sense function for it. Signed-off-by: Ye Li <ye.li@nxp.com> Tested-by: Anson Huang <Anson.Huang@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>
* mxc_ocotp: Update redundancy banks for mx7ulp B0Ye Li2019-04-251-7/+11
| | | | | | | | | On mx7ulp B0, beside bank 0 and 1, the fuse bank 9, 10, 28 are changed to Redundancy mode not ECC, so they can support to program different bits of a word in multiple times. Signed-off-by: Ye Li <ye.li@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>
* misc: imx8: scu: add i.MX8QM supportPeng Fan2019-04-251-3/+13
| | | | | | | According to IMX8QXP/8QM config option, choose the clk/iomuxc compatible. Signed-off-by: Peng Fan <peng.fan@nxp.com>
* imx8: fuse: add fuse driverPeng Fan2019-04-252-0/+87
| | | | | | Add fuse write for i.MX8 Signed-off-by: Peng Fan <peng.fan@nxp.com>
* misc: fs_loader: Replace label with DT phandleTien Fong Chee2019-04-221-21/+15
| | | | | | | | | In previously label which will be expanded to the node's full path was used, and now replacing label with most commonly used DT phandle. The codes were changed accordingly to the use of DT phandle and supporting multiple instances. Signed-off-by: Tien Fong Chee <tien.fong.chee@intel.com>
* misc: fs_loader: Add support for initializing block deviceTien Fong Chee2019-04-221-0/+23
| | | | | | | | | | Firmware loader would encounter problem if the block device is accessed before initializing it. This patch would adding the support of probing block device and initializing block before the block device is accessed by firmware loader. Signed-off-by: Tien Fong Chee <tien.fong.chee@intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* configs: move CONFIG_MXC_OCOTP to KconfigMarcel Ziswiler2019-04-131-0/+2
| | | | | | | | | | | | | | While commit 3e020f03e94f ("driver: misc: add MXC_OCOTP Kconfig entry") introduced a Kconfig entry it did not actually migrate all configurations to using it. As CONFIG_MXC_OCOTP was in mx{6/7}_common.h enable it by default on those architectures. Additionally, also enable it on ARCH_IMX8M and ARCH_VF610 where all current members enabled it through their legacy configuration header files. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Reviewed-by: Lukasz Majewski <lukma@denx.de>
* Merge tag 'u-boot-stm32-20190412' of https://github.com/patrickdelaunay/u-bootTom Rini2019-04-121-0/+28
|\ | | | | | | | | | | | | | | | | | | | | | | stm32 patches for v2019.07-rc1 - Add trusted boot with TF-A for stm32mp1 - stm32mp1 dts files sync'ed with Linux version - add STM32MP1 Discovery boards (DK1 and DK2) - add STMFX gpio expander driver - misc improvement for stm3mp1 supports - rename stpmu1 to stpmic1 (official name) - stm32_qspi: move to exec_op (spi nor driver for stm32 mpu and mcu) - add STM32 FMC2 NAND flash controller driver
| * stpmic1: add NVM update support in fuse commandPatrick Delaunay2019-04-121-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add functions to read/update the non volatile memory of STPMIC1 (8 bytes-register at 0xF8 address) and allow access with fuse command (bank=1, word > 0xF8). For example: STM32MP> fuse read 1 0xf8 8 Reading bank 1: Word 0x000000f8: 000000ee 00000092 000000c0 00000002 Word 0x000000fc: 000000f2 00000080 00000002 00000033 Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
* | misc: i2c_eeprom: add eeprom write supportBaruch Siach2019-04-111-1/+19
| | | | | | | | | | | | | | Write up to page size in each i2c transfer. Signed-off-by: Baruch Siach <baruch@tkos.co.il> Reviewed-by: Heiko Schocher <hs@denx.de>
* | misc: i2c_eeprom: support DT pagesize propertyBaruch Siach2019-04-111-0/+6
|/ | | | | | | Read the page size from DT when available. Signed-off-by: Baruch Siach <baruch@tkos.co.il> Reviewed-by: Heiko Schocher <hs@denx.de>
* xilinx: common: Remove !DM_i2C code for reading mac from eepromMichal Simek2019-02-141-0/+1
| | | | | | | | All platforms are converted to DM_I2C that's why there is no reason to keep this code here. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Heiko Schocher <hs@denx.de>
* misc: Allow child devicesSimon Glass2019-02-091-0/+3
| | | | | | | | Allow misc devices to have children, so that we can use this uclass for cases where a child device (e.g. I2S) needs to access a misc driver for transferring data. Signed-off-by: Simon Glass <sjg@chromium.org>
* Merge tag 'u-boot-imx-20190129' of git://git.denx.de/u-boot-imxTom Rini2019-01-301-0/+4
|\ | | | | | | For 2019.04
| * imx8: scu: use dedicated MU for SPLPeng Fan2019-01-281-0/+4
| | | | | | | | | | | | | | | | | | SPL runs in EL3 mode, except MU0_A, others are not powered on, and could not be used. However normal U-Boot use MU1_A, so we could not reuse the one in dts. And we could not replace the one in dts with MU0_A, because MU0_A is reserved in secure world. Signed-off-by: Peng Fan <peng.fan@nxp.com>
* | misc: i2c_eeprom: Add atmel,24c08 to the listMichal Simek2019-01-261-0/+1
|/ | | | | | | | | | | Linux kernel binding is using atmel,24c08 compatible string. On the other hand there is atmel,24c08a which is not listed in the kernel. Add compatible string without "a" suffix to be compatible with Linux kernel binding. These eeproms are available on several ZynqMP development boards. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* Merge tag 'fsl-qoriq-for-v2019.04-rc1' of git://git.denx.de/u-boot-fsl-qoriqTom Rini2019-01-181-0/+173
|\ | | | | | | | | | | | | Add TFA boot flow for more boards Add TFA boot defconfig for ls1088a and ls2088a. Add dts fixup for PCIe endpoint and root complex.
| * drivers: ifc: restore the legacy flow for IFC configRajesh Bhagat2019-01-171-0/+173
| | | | | | | | | | | | | | | | | | Restore the legacy flow along with TFABOOT flow for IFC configuration. Signed-off-by: Pankit Garg <pankit.garg@nxp.com> Signed-off-by: Rajesh Bhagat <rajesh.bhagat@nxp.com> Reviewed-by: York Sun <york.sun@nxp.com>
* | misc: fs_loader: Switching private data allocation to DM auto allocationTien Fong Chee2019-01-151-63/+45
|/ | | | | | | | | Switching private data manual allocation to driver model auto allocation so users no longer need to deallocate themself because this would be deallocated by driver model when the device is no longer required. Signed-off-by: Tien Fong Chee <tien.fong.chee@intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* misc: imx8: scu: use platdata instead of priv dataPeng Fan2019-01-091-13/+13
| | | | | | | | | | priv data has not been allocated when doing bind, so it is wrong to use dev_get_priv in bind call back. Let's switch to use platdata in the driver to fix the issue. Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* misc: imx: scu: avoid write null pointerPeng Fan2019-01-091-2/+2
| | | | | | | | | When boot_dev is true, fill boot device. However the original logic is when boot_dev is false, fill boot device, this will trigger data abort. Also fix sc_misc_get_control when using pointer val. Signed-off-by: Peng Fan <peng.fan@nxp.com>
* Merge tag 'u-boot-imx-20190101' of git://www.denx.de/git/u-boot-imxTom Rini2019-01-011-3/+3
|\ | | | | | | | | | | | | | | | | imx for 2019.01 - introduce support for i.MX8M - fix size limit for Vhybrid / pico boards - several board fixes - w1 driver for MX2x / MX5x
| * imx: rename mx8m,MX8M to imx8m,IMX8MPeng Fan2019-01-011-3/+3
| | | | | | | | | | | | | | Rename mx8m,MX8M to imx8m,IMX8M Signed-off-by: Peng Fan <peng.fan@nxp.com> Signed-off-by: Jon Nettleton <jon@solid-run.com>
* | misc: Add JZ47xx efuse driverPaul Burton2018-12-193-0/+110
|/ | | | | | | | | | Add driver for the efuse block in the JZ47xx SOC. Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> Signed-off-by: Paul Burton <paul.burton@imgtec.com> Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com> Reviewed-by: Marek Vasut <marex@denx.de>
* Merge tag 'fsl-qoriq-for-v2019.01-rc2' of git://git.denx.de/u-boot-fsl-qoriqTom Rini2018-12-101-136/+352
|\ | | | | | | | | | | | | | | Add TFA boot flow for some Layerscape platforms Add support for lx2160a SoC [trini: Add a bunch of missing MAINTAINERS entries] Signed-off-by: Tom Rini <trini@konsulko.com>
| * drivers: ifc: dynamic chipselect mapping supportPankit Garg2018-12-061-136/+352
| | | | | | | | | | | | | | | | | | | | | | | | IFC driver changes to implement the chipselect mappings at run time. Defines init_early_memctl_regs and init_final_memctl_regs with chipselect dynamic mapping for nor and nand boot. Signed-off-by: Pankit Garg <pankit.garg@nxp.com> Signed-off-by: Rajesh Bhagat <rajesh.bhagat@nxp.com> [YS: fix checkpatch issues] Reviewed-by: York Sun <york.sun@nxp.com>
* | cros_ec: Adjust to use v1 vboot context onlySimon Glass2018-12-051-4/+6
| | | | | | | | | | | | | | | | | | | | At present there are no users of the 64-byte v2 context. The v1 context is only 16 bytes long and currently an error is raised if too much data is returned from the EC. Update the code to limit the size to 16 bytes. Signed-off-by: Simon Glass <sjg@chromium.org>
* | cros: Correct a printf() string and commentSimon Glass2018-12-051-2/+2
|/ | | | | | | Correct a warning that occurs on sandbox. Also fix the comment style in cros_ec_set_lid_shutdown_mask(). Signed-off-by: Simon Glass <sjg@chromium.org>
* misc: Update read() and write() methods to return bytes xferedSimon Glass2018-11-204-4/+16
| | | | | | | | | | | At present these functions return 0 on success. For some devices we want to know how many bytes were transferred. It seems useful to adjust the API to be more like the POSIX read() and write() functions. Update these two methods, a test and all users. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Patrick Delaunay <patrick.delaunay@st.com>
* cros_ec: Add new features for events and powerSimon Glass2018-11-202-7/+340
| | | | | | | This adds new commands to the EC related to setting and clearing events as well as controlling power-related settings. Signed-off-by: Simon Glass <sjg@chromium.org>
* cros_ec: Align uclass data to a cache boundarySimon Glass2018-11-201-0/+1
| | | | | | | The LPC driver expects its buffer to be word-aligned. Add the required flag to the uclass driver to ensure this. Signed-off-by: Simon Glass <sjg@chromium.org>
* cros_ec: Fail if we cannot determine the flash burst sizeSimon Glass2018-11-201-0/+3
| | | | | | | This value is required for flashing to work correctly. Add a check for it. Signed-off-by: Simon Glass <sjg@chromium.org>
* cros_ec: Add error logging on a few commandsSimon Glass2018-11-201-2/+9
| | | | | | Add some more logging to provide more information on failures. Signed-off-by: Simon Glass <sjg@chromium.org>
* cros_ec: Use uint instead of u8 for parametersSimon Glass2018-11-201-6/+4
| | | | | | | | | There is no advantage to using a u8 for function parameters. It forces the compiler to mask values and can increase code size. Also the command enum has been extended to 16 bits. Update the functions to use uint instead. Signed-off-by: Simon Glass <sjg@chromium.org>
* misc: fs_loader: Fix compiler warningKeerthy2018-11-161-1/+1
| | | | | | | | | | | Fix compiler warning drivers/misc/fs_loader.c:193:9: warning: format ‘%d’ expects argument of type ‘int’, but argument 5 has type ‘size_t {aka long unsigned int}’ [-Wformat=] Signed-off-by: Keerthy <j-keerthy@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* misc: fs_loader: Use device_get_global_by_ofnode to get to nodeKeerthy2018-11-161-3/+2
| | | | | | | | | Instead of two staged ofnode_to_offset followed by device_get_global_by_of_offset approach, direcly use the device_get_global_by_ofnode to fetch the device. Signed-off-by: Keerthy <j-keerthy@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* test: dm: pci: Add cases for finding next PCI capability APIsBin Meng2018-11-141-0/+9
| | | | | | | | Add test cases to cover the two newly added PCI APIs: dm_pci_find_next_capability() & dm_pci_find_next_ext_capability(). Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* misc: Add IHS FPGA driverMario Six2018-11-144-0/+926
| | | | | | | | Add a driver for gdsys IHS (Integrated Hardware Systems) FPGAs, which supports initialization of the FPGA, as well as information gathering. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Mario Six <mario.six@gdsys.cc>
* misc: Add gdsys_soc driverMario Six2018-11-144-0/+106
| | | | | | | This patch adds a driver for the bus associated with a IHS FPGA. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Mario Six <mario.six@gdsys.cc>
* misc: Sort Makefile entriesMario Six2018-11-141-30/+31
| | | | | | | | | Makefile entries should be sorted. Reviewed-by: Anatolij Gustschin <agust@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Mario Six <mario.six@gdsys.cc> Signed-off-by: Anatolij Gustschin <agust@denx.de>
* dm: core: Respect drivers with the DM_FLAG_PRE_RELOC flag in lists_bind_fdt()Bin Meng2018-11-141-2/+2
| | | | | | | | | | | | | | | | | | | | Currently the comments of several APIs (eg: dm_init_and_scan()) say: @pre_reloc_only: If true, bind only drivers with the DM_FLAG_PRE_RELOC flag. If false bind all drivers. The 'Pre-Relocation Support' chapter in doc/driver-model/README.txt documents the same that both device tree properties and driver flag are supported. However the implementation only checks these special device tree properties without checking the driver flag at all. This updates lists_bind_fdt() to consider both scenarios. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Squashed in http://patchwork.ozlabs.org/patch/996473/ : Signed-off-by: Simon Glass <sjg@chromium.org>
* drivers: cosmetic: Convert SPDX license tags to Linux Kernel stylePatrick Delaunay2018-10-281-2/+2
| | | | | | | | | Complete in the drivers directory the work started with commit 83d290c56fab ("SPDX: Convert all of our single license tags to Linux Kernel style"). Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
* Merge tag 'u-boot-imx-20181025' of git://git.denx.de/u-boot-imxTom Rini2018-10-254-0/+637
|\ | | | | | | Merged imx8 architecture, fix build for imx8 + warnings
| * misc: imx8: add scfw api impementationPeng Fan2018-10-222-1/+368
| | | | | | | | | | | | | | | | | | | | Add clk/misc/pad/pm/rm scfw api implementaion for different drivers to invoke. The low level code is using misc_call to invoke imx8_scu driver. Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Anatolij Gustschin <agust@denx.de> Cc: Stefano Babic <sbabic@denx.de>
| * misc: add i.MX8 misc driverPeng Fan2018-10-223-0/+270
| | | | | | | | | | | | | | | | | | Add i.MX8 MISC driver to handle the communication between A35 Core and SCU. Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Anatolij Gustschin <agust@denx.de> Cc: Stefano Babic <sbabic@denx.de>
* | 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>