summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-03-12ARM: Odroid XU3: Enable driver I2C support for OdroidXU3Anand Moon
This commit enables support for I2C S3C424X0 driver. Signed-off-by: Anand Moon <linux.amoon@gmail.com> Acked-by: Lukasz Majewski <lukma@denx.de> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2019-03-11espresso7420: remove duplicated configMinkyu Kang
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2019-03-11arm: exynos: odroid: Fix build if BOARD_TYPES are not setKrzysztof Kozlowski
CONFIG_BOARD_TYPES is necessary for Odroid X/X2/U3 boards to detect proper revision. However building should succeed even without it. While moving code around, document also the reference clock selection. This fixes the build error without CONFIG_BOARD_TYPES: board/samsung/odroid/odroid.c: In function 'board_usb_init': board/samsung/odroid/odroid.c:473:8: error: 'gd_t' {aka 'volatile struct global_data'} has no member named 'board_type' if (gd->board_type == ODROID_TYPE_U3) ^~ Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2019-03-11arm: dts: exynos: Adjust whitespace around status propertyKrzysztof Kozlowski
Just add spaces around '=' sign for clarity. Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2019-03-11arm: exynos: Remove duplicated "boardname" env settingKrzysztof Kozlowski
Various places in the code set "boardname" env property. It was used for booting from ITB images and choosing proper DTB file name. Instead of duplicating it, use existing U-Boot wide - "board_name". Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Reviewed-by: Lukasz Majewski <lukma@denx.de> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2019-03-11configs: odroid_xu3: Unify indentationKrzysztof Kozlowski
File mixed space and tab indentation. Unify it. Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Reviewed-by: Lukasz Majewski <lukma@denx.de> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2019-03-11configs: odroid_xu3: Use consistent syntax for #includeKrzysztof Kozlowski
When including other header from configs, use consistent <> syntax. Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Reviewed-by: Lukasz Majewski <lukma@denx.de> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2019-03-11arm: exynos: arndale: Replace Chander Kashyap inactive maintainerKrzysztof Kozlowski
Last activity from Arndale (Exynos5250) board maintainer Chander Kashyap was in January 2014 (Signed-off). Recently his samsung.com email bounces with 550 (5.1.1 Recipient address rejected: User unknown). Add Krzysztof Kozlowski as odd fixer for this board. Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2019-03-11arm: dts: exynos: Add ramp delay property to LDO regulators to Odroid XU3 familyKrzysztof Kozlowski
Add startup time to LDO regulators of S2MPS11 PMIC on Odroid XU3/XU4/HC1 family of boards to be sure the voltage is proper before relying on the regulator. The datasheet for all the S2MPS1x family is inconsistent here and does not specify unambiguously the value of ramp delay for LDO. It mentions 30 mV/us in one timing diagram but then omits it completely in LDO regulator characteristics table (it is specified for bucks). However the vendor kernels for Galaxy S5 and Odroid XU3 use values of 12 mV/us or 24 mV/us. Without the ramp delay value the consumers do not wait for voltage settle after changing it. Although the proper value of ramp delay for LDOs is unknown, it seems safer to use at least some value from reference kernel than to leave it unset. Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Reviewed-by: Lukasz Majewski <lukma@denx.de> Tested-by: Anand Moon <linux.amoon@gmail.com> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2019-03-11arm: dts: exynos: Add supply for ADC block to Odroid XU3 familyKrzysztof Kozlowski
The ADC block requires VDD supply to be on so provide one. Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Reviewed-by: Lukasz Majewski <lukma@denx.de> Tested-by: Anand Moon <linux.amoon@gmail.com> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2019-03-11power: regulator: s2mps11: Add enable delayKrzysztof Kozlowski
According to datasheet, the output on LDO regulators will start appearing after 10-15 us. Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Tested-by: Anand Moon <linux.amoon@gmail.com> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2019-03-11regulator: Add support for ramp delayKrzysztof Kozlowski
Changing voltage and enabling regulator might require delays so the regulator stabilizes at expected level. Add support for "regulator-ramp-delay" binding which can introduce required time to both enabling the regulator and to changing the voltage. Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Tested-by: Anand Moon <linux.amoon@gmail.com> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2019-03-11arm: exynos: Wait till ADC stabilizes before checking Odroid HC1 revisionKrzysztof Kozlowski
Fix detection of Odroid HC1 (Exynos5422) after reboot if kernel disabled the LDO4/VDD_ADC regulator. The LDO4 supplies both ADC block and the ADC input AIN9. Voltage on AIN9 will rise slowly, so use delay of 5 milliseconds instead of timers-based loop to wait for voltage stabilization. First reads on Odroid HC1 return 305, 1207, 1297 and finally 1308 (reference value is 1309). Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Tested-by: Anand Moon <linux.amoon@gmail.com> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2019-03-11arm: exynos: odroid-xu3: Display info late to have proper typeKrzysztof Kozlowski
Printing the "Type" of board requires proper detection of revision which can happen only late because regulators are needed. Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Tested-by: Anand Moon <linux.amoon@gmail.com> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2019-03-11arm: exynos: Detect revision later, when all resources are readyKrzysztof Kozlowski
Detection of board revision is done early - before power setup. In case of Odroid XU3/XU4/HC1 family, the detection is done using ADC which is supplied by LDO4/VDD_ADC regulator. This regulator could be turned off (e.g. by kernel before reboot). If ADC is used early, the regulators are not yet available and the detection won't work. Split the revision detection out of set_board_type() into separate function called later - either when displaying board info (in late mode) or during misc_init_r. The idea is that set_board_type() will be called early so its method of detection are limited to flattened device tree (exynos5-dt-types.c for Exynos5) or GPIO (odroid.c for Exynos4412). The newly added set_board_revision() can be called only later, when resources like regulator are available. This is necessary to fix the detection of Odroid HC1 after reboot, if kernel turned off the LDO4 regulator. Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Reviewed-by: Lukasz Majewski <lukma@denx.de> Tested-by: Anand Moon <linux.amoon@gmail.com> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2019-03-11power: regulator: s2mps11: Fix step for LDO27 and LDO35Krzysztof Kozlowski
LDO27 and LDO35 have 25 mV step, not 50 mV. Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Reviewed-by: Lukasz Majewski <lukma@denx.de> Tested-by: Anand Moon <linux.amoon@gmail.com> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2019-03-11adc: exynos-adc: Fix wrong bit operation used to stop the ADCKrzysztof Kozlowski
When stopping the ADC_V2_CON1_STC_EN should be cleared. Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Reviewed-by: Lukasz Majewski <lukma@denx.de> Tested-by: Anand Moon <linux.amoon@gmail.com> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2019-03-08Merge branch '2019-03-08-master-imports'Tom Rini
- Assorted minor fixes: - ARM: qemu-arm: enable USB boot in distro boot with UEFI - image: fdt: handle coalesced reserve region - cmd: thordown: Fix spelling of download. - fdt: Fix FIT header verification in mkimage and conduct same checks as bootm - test: Update test-imagetools.sh to match new syntax
2019-03-08ARM: qemu-arm: enable USB boot in distro boot with UEFIAKASHI Takahiro
With this patch which adds a removable USB mass storage to a list of bootable devices, USB boot is supported in distro boot if UEFI is configured. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
2019-03-08image: fdt: handle coalesced reserve regionPatrick Delaunay
Handle in boot_fdt_reserve_region any return value > 0 of lmb_reserve() function; it occurs when coalesced region are found: adjacent reserved region are merged. This patch avoid the error trace: ERROR: reserving fdt memory region failed.. when reserved region are merged (return value = 1). Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-03-08cmd: thordown: Fix spelling of download.Vagrant Cascadian
Signed-off-by: Vagrant Cascadian <vagrant@debian.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Lukasz Majewski <lukma@denx.de>
2019-03-08fdt: Fix FIT header verification in mkimage and conduct same checks as bootmJordan Hand
FIT header verification in mkimage was treating a return code as a boolean, which meant that failures in validating the fit were seen as successes. Additionally, mkimage was checking all formats to find a header which passes validation, rather than using the image type specified to mkimage. checkpatch.pl checks for lines ending with '(' and alignment matching open parentheses are ignored to keep with existing coding style. Signed-off-by: Jordan Hand <jorhand@microsoft.com>
2019-03-08test: Update test-imagetools.sh to match new syntaxMartyn Welch
The syntax of dumpimage was simplified in commit 12b831879a76 ("tools: dumpimage: Simplify arguments"), but the test (test/image/test-imagetools.sh) was not updated and is now failing. Update the test to use the new syntax. Reported-by: Vagrant Cascadian <vagrant@debian.org> Signed-off-by: Martyn Welch <martyn.welch@collabora.com> Tested-by: Vagrant Cascadian <vagrant@debian.org>
2019-03-08Merge branch 'master' of git://git.denx.de/u-boot-i2cTom Rini
This pull request contains bugfixes for rcar_i2c, rcar_ii2c and i2c_cdns driver. Also the commit "i2c: rcar_i2c: Add Gen3 SoC support" from Marek is a bugfix for arm64 builds, as discussed with Marek on list.
2019-03-08i2c: rcar_i2c: Move FSDA check to rcar_i2c_recoverIsmael Luceno Cortes
Cosmetic change. Any call to the recover function would need to do the same check afterwards, so it's sensible to make it part of the function. Signed-off-by: Ismael Luceno <ismael.luceno@silicon-gears.com>
2019-03-08i2c: rcar_i2c: Set the slave address from rcar_i2c_xferIsmael Luceno Cortes
It needs to be done for both reads and writes, so do it at rcar_i2c_xfer to avoid duplication. Signed-off-by: Ismael Luceno <ismael.luceno@silicon-gears.com> Reviewed-by: Marek Vasut <marek.vasut+renesas@gmail.com> Reviewed-by: Heiko Schocher <hs@denx.de>
2019-03-08i2c: rcar_i2c: Don't mask errors with EREMOTEIO at rcar_i2c_xferIsmael Luceno Cortes
Fix rcar_i2c_xfer return value, previously it was always returning -EREMOTEIO when dealing with errors from calls to the read/write functions. Signed-off-by: Ismael Luceno <ismael.luceno@silicon-gears.com> Reviewed-by: Marek Vasut <marek.vasut+renesas@gmail.com> Reviewed-by: Heiko Schocher <hs@denx.de>
2019-03-08i2c: rcar_i2c: Fix sending of slave addressesIsmael Luceno Cortes
Do the reset before clearing the MSR, otherwise it may result in a read or write operation instead if the start condition is repeated. Signed-off-by: Ismael Luceno <ismael.luceno@silicon-gears.com> Reviewed-by: Marek Vasut <marek.vasut+renesas@gmail.com> Reviewed-by: Heiko Schocher <hs@denx.de>
2019-03-08i2c: rcar_i2c: Add comments about registers & valuesIsmael Luceno Cortes
Document the meaning of macros related to registers and values to be written to them. Signed-off-by: Ismael Luceno <ismael.luceno@silicon-gears.com> Reviewed-by: Marek Vasut <marek.vasut+renesas@gmail.com> Reviewed-by: Heiko Schocher <hs@denx.de>
2019-03-08i2c: rcar_i2c: Setup SCL/SDA delay at rcar_i2c_set_speedIsmael Luceno Cortes
Setting up the delay only needs to be done once; move it to rcar_i2c_set_speed so it's done at initialization time. Signed-off-by: Ismael Luceno <ismael.luceno@silicon-gears.com> Reviewed-by: Marek Vasut <marek.vasut+renesas@gmail.com> Reviewed-by: Heiko Schocher <hs@denx.de>
2019-03-08i2c: i2c_cdns: Add support for handling arbitration lostSiva Durga Prasad Paladugu
This patch adds support for handling arbitration lost in case of multi master mode. When an arbitration lost is detected, it retries for 10 times before failing. Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Heiko Schocher <hs@denx.de>
2019-03-08i2c: i2c_cdns: Fix clearing of all interruptsSiva Durga Prasad Paladugu
The arbitration lost interrupt was not getting cleared while clearing interrupts. This patch fixes this by adding arbitration lost interrupt as well during clear. This patch also removes hardcoded value and defined a macro for it. Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Heiko Schocher <hs@denx.de>
2019-03-07i2c: rcar_i2c: Add Gen3 SoC supportMarek Vasut
Add support for R-Car Gen3 SoCs into the driver, which encompases the Gen3 SoC extra timing register handling and 64bit build fixes. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Heiko Schocher <hs@denx.de> Reviewed-by: Heiko Schocher <hs@denx.de>
2019-03-07i2c: rcar_iic: Read ICSR only onceMarek Vasut
Read ICSR only once to avoid missing interrupts. This happens on R8A7791 Porter during reset, when reading the PMIC register 0x13, which may fail sometimes because of the missed DTE interrupt. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Heiko Schocher <hs@denx.de> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> Reviewed-by: Heiko Schocher <hs@denx.de>
2019-03-06Merge branch 'master' of git://git.denx.de/u-boot-spiTom Rini
- dw spi include file fix - Allwinner A31 spi, been in ML in many releases.
2019-03-05Merge tag 'efi-2019-04-rc4' of https://github.com/xypron2/u-bootTom Rini
Pull request for the UEFI subsystem for v2019.04-rc4 This pull request contains only bug fixes. The most notable bug fixed was writing to random memory addresses when trying to add a HII package of a yet unsupported package type.
2019-03-04Prepare v2019.04-rc4Tom Rini
Signed-off-by: Tom Rini <trini@konsulko.com>
2019-03-04Merge branch 'master' of git://git.denx.de/u-boot-shTom Rini
- Assorted PFC fixes
2019-03-04Merge tag 'u-boot-atmel-2019.04-a' of git://git.denx.de/u-boot-atmelTom Rini
First set of u-boot-atmel fixes for 2019.04 cycle
2019-03-04Merge git://git.denx.de/u-boot-fsl-qoriqTom Rini
- Enable DHCP as boot-source in distro boot for NXP layerscape platforms - fix register layout for SEC on Layerscape architectures - fixes related to DPAA2 ethernet
2019-03-04spi: Rename sun4i_spi.c into spi-sunxi.cJagan Teki
Now the same SPI controller driver is reusable in all Allwinner SoC variants, so rename the existing sun4i_spi.c into spi-sunxi.c which eventually look like a common sunxi driver. Also update the function, variable, structure names in driver from sun4i into sunxi. Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
2019-03-04spi: sun4i: Driver cleanupJagan Teki
- drop unused macros. - use base instead of base_addr, for better code readability - move .probe and .ofdata_to_platdata functions in required places to add platdata support in future. - use sentinel sun4i_spi_ids. Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
2019-03-04spi: sun4: Add A31 spi controller supportJagan Teki
The usual SPI transmission protocol in Allwinner A10 and A31 controllers share similar context with minimal changes in register offsets along with few additional register bits on A31. So, add A31 spi controller support in existing sun4i_spi with A31 specific register offsets and bits. Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
2019-03-04spi: sun4i: Add CLK supportJagan Teki
Add CLK support to enable AHB and MOD SPI clocks on sun4i_spi driver. Clock disablement could be done while releasing the bus transfer, but the existing code doesn't disable the clocks it only taken care of clock enablement globally in probe. So to make a proper clock handling, the clocks should enable it in claim and disable it in release. This patch would also do that change, by enable and disable clock in proper order. Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> Reviewed-by: Andre Przywara <andre.przywara@arm.com>
2019-03-04spi: sun4i: Support fifo_depth via drvdataJagan Teki
Support fifo_depth via drvdata instead of macro definition, this would eventually reduce another macro definition for new SPI controller fifo depth support addition. Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> Reviewed-by: Andre Przywara <andre.przywara@arm.com>
2019-03-04spi: sun4i: Access registers and bits via enum offsetsJagan Teki
Allwinner support two different SPI controllers one for A10 and another for A31 with minimal changes in register offsets and respective register bits, but the logic for accessing the SPI master via SPI slave remains nearly similar. Add enum offsets for register set and register bits, so-that it can access both classes of SPI controllers. Assign same control register for global, transfer and fifo control registers to make the same code compatible with A31 SPI controller. Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> Tested-by: Stefan Mavrodiev <stefan@olimex.com> # A20-SOM204
2019-03-04spi: sun4i: Simplify reg writes using set/clrbits_le32Jagan Teki
Update the existing register writes using setbits_le32 and clrbits_le32 in required places. Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
2019-03-04clk: sunxi: Implement SPI clocks, resetsJagan Teki
- Implement SPI AHB, MOD clocks via ccu_clk_gate for all supported Allwinner SoCs - Implement SPI resets via ccu_reset for all supported Allwinner SoCs. Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> Reviewed-by: Andre Przywara <andre.przywara@arm.com>
2019-03-04spi: sun4i: Poll for rxfifo to be filled upJagan Teki
To drain rx fifo the fifo need to poll for how much data has been filled up in rx fifo. To achieve this, the current code is using wait_for_bit logic on control register with exchange burst mode mask, which is not a proper way of waiting for fifo filled up. So, add code for polling rxfifo to be filled up using fifo status register. Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> Reviewed-by: Andre Przywara <andre.przywara@arm.com>
2019-03-04spi: designware: Change include orderHoratiu.Vultur@microchip.com
With current order of include files, the file designware_spi.c can't see that the struct global_data has the member board_type when CONFIG_BOARD_TYPES is defined. By not seeing this then all the members are shifted in the struct global_data. So when the driver is trying to read from device tree blob, it would pass the wrong address to the function 'fdtdev_get_int'. This will make to use the default frequency 500000. The fix consists of changing the order of include files in designware_spi.c to include first common.h file. Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com> Reviewed-by: Jagan Teki <jagan@openedev.com>