Commit Graph

11899 Commits

Author SHA1 Message Date
Tom Rini
b55c89ce02 Merge git://git.denx.de/u-boot-spi 2017-12-19 07:57:40 -05:00
Tom Rini
76cc372879 Merge git://git.denx.de/u-boot-sunxi 2017-12-19 07:57:33 -05:00
Sean Nyekjaer
065592b40b mtd/spi: fix block count for is25lq040b
This spi-nor is 4Mbit/512KB

Fixes: b4fbcbc5a5 ("mtd/spi: add support for is25lq040b")
Signed-off-by: Sean Nyekjaer <sean.nyekjaer@prevas.dk>
Reviewed-by: Jagan Teki <jagan@openedev.com>
2017-12-19 17:33:48 +05:30
Tom Rini
1a3fc354b5 Merge git://git.denx.de/u-boot-fsl-qoriq 2017-12-18 18:39:00 -05:00
Jerome Brunet
30cbb524bc net: phy: meson-gxl: detect LPA corruption
This patch is ported from the Linux patch posted at [1] and applied to
net tree as commit f1e2400a80ff.

The purpose of this change is to fix the incorrect detection of the link
partner (LP) advertised capabilities which sometimes happens with this PHY
(roughly 1 time in a dozen)

This issue may cause the link to be negotiated at 10Mbps/Full or
10Mbps/Half when 100MBps/Full is actually possible. In some case, the link
is even completely broken and no communication is possible.

To detect the corruption, we must look for a magic undocumented bit in the
WOL bank (hint given by the SoC vendor kernel) but this is not enough to
cover all cases. We also have to look at the LPA ack. If the LP supports
Aneg but did not ack our base code when aneg is completed, we assume
something went wrong.

The detection of a corrupted LPA triggers a restart of the aneg process.
This solves the problem but may take up to 6 retries to complete.

[1] https://lkml.kernel.org/r/20171208110811.30789-1-jbrunet@baylibre.com

Fixes: 8995a96d1d ("net: phy: Add Amlogic Meson GXL Internal PHY support")
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2017-12-18 13:06:30 -05:00
Tom Rini
90d75d2efc Xilinx changes for v2018.01-rc2-v2
fpga:
 - Enable loading bitstream via fit image for !xilinx platforms
 
 zynq:
 - Fix SPL SD boot mode
 
 zynqmp:
 - Not not reset in panic
 - Do not use simple allocator because of fat changes
 - Various dt chagnes
 - modeboot variable setup
 - Fix fpga loading on automotive devices
 - Fix coverity issues
 
 test:
 - Fix env test for !hush case - Stephen's patch
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iEYEABECAAYFAlo3tMgACgkQykllyylKDCFQvQCfeFgaC/95gx9orLrHxpDx7s46
 wwYAmwSoXn6hc9bEzgKIppQHblzfqGU6
 =mscK
 -----END PGP SIGNATURE-----

Merge tag 'xilinx-for-v2018.01-rc2-v2' of git://www.denx.de/git/u-boot-microblaze

Xilinx changes for v2018.01-rc2-v2

fpga:
- Enable loading bitstream via fit image for !xilinx platforms

zynq:
- Fix SPL SD boot mode

zynqmp:
- Not not reset in panic
- Do not use simple allocator because of fat changes
- Various dt chagnes
- modeboot variable setup
- Fix fpga loading on automotive devices
- Fix coverity issues

test:
- Fix env test for !hush case - Stephen's patch
2017-12-18 12:23:27 -05:00
Tom Rini
15616a0aa5 Merge git://git.denx.de/u-boot-dm 2017-12-14 15:46:07 -05:00
Goldschmidt Simon
8b93a92f6d fpga: allow programming fpga from FIT image for all FPGA drivers
This drops the limit that fpga is only loaded from FIT images for Xilinx.
This is done by moving the 'partial' check from 'common/image.c' to
'drivers/fpga/xilinx.c' (the only driver supporting partial images yet)
and supplies a weak default implementation in 'drivers/fpga/fpga.c'.

Signed-off-by: Simon Goldschmidt <sgoldschmidt@de.pepperl-fuchs.com>
Tested-by: Michal Simek <michal.simek@xilinx.com> (On zcu102)
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2017-12-14 16:09:39 +01:00
Tom Rini
6b308494c5 Merge branch 'master' of git://git.denx.de/u-boot-usb 2017-12-13 17:58:36 -05:00
Tom Rini
fd12455643 Merge branch 'rmobile-mx' of git://git.denx.de/u-boot-sh 2017-12-13 17:58:27 -05:00
Wenbin song
a8f33034f2 armv8: ls1043a/ls2080a: check SoC by device ID
Check LS1043A/LS2080a by device ID without using personality ID to
determine revision number. This check applies to all various
personalities of the same SoC family.

Signed-off-by: Wenbin Song <wenbin.song@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
2017-12-13 13:40:29 -08:00
Felix Brack
854dfbf99b power: pmic/regulator: Add basic support for TPS65910
Texas Instrument's TPS65910 PMIC contains 3 buck DC-DC converts, one
boost DC-DC converter and 8 LDOs. This patch implements driver model
support for the TPS65910 PMIC and its regulators making the get/set
API for regulator value/enable available.
This patch depends on the patch "am33xx: Add a function to query MPU
voltage in uV" to build correctly. For boards relying on the DT
include file tps65910.dtsi the v3 patch "power: extend prefix match
to regulator-name property" and an appropriate regulator naming is
also required.

Signed-off-by: Felix Brack <fb@ltec.ch>
Reviewed-by: Simon Glass <sjg@chromium.org>
2017-12-12 19:53:45 -07:00
Stefan Roese
8a5cbc065d dm: blk: Use uclass_find_first/next_device() in blk_first/next_device()
This patch changes the calls to uclass_first/next_device() in blk_first/
next_device() to use uclass_find_first/next_device() instead. These functions
don't prepare the devices, which is correct in this case.

With this patch applied, the "usb storage" command now works again as
expected:

=> usb storage
  Device 0: Vendor: SanDisk Rev: 1.00 Prod: Ultra
  Type: Removable Hard Disk
  Capacity: 58656.0 MB = 57.2 GB (120127488 x 512)

Without this patch, it used to generate this buggy output:

=> usb storage
Card did not respond to voltage select!
mmc_init: -95, time 26
No storage devices, perhaps not 'usb start'ed..?

Signed-off-by: Stefan Roese <sr@denx.de>
Suggested-by: Simon Glass <sjg@chromium.org>
Cc: Simon Glass <sjg@chromium.org>
Cc: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2017-12-12 19:53:45 -07:00
Felix Brack
bf802f5d54 power: extend prefix match to regulator-name property
This patch extends pmic_bind_children prefix matching. In addition to
the node name the property regulator-name is used while trying to match
prefixes. This allows assigning different drivers to regulator nodes
named regulator@1 and regulator@10 for example.
I have discarded the idea of using other properties then regulator-name
as I do not see any benefit in using property compatible or even
regulator-compatible. Of course I am open to change this if there are
good reasons to do so.

Signed-off-by: Felix Brack <fb@ltec.ch>
Reviewed-by: Simon Glass <sjg@chromium.org>
2017-12-12 19:53:45 -07:00
Philipp Tomsich
b53f6992e9 dm: reset: have the reset-command perform a COLD reset
The DM version of do_reset has been issuing a warm-reset, which (on
some platforms keeps GPIOs and other parts of the platform active).
This may cause unintended behaviour, as calling do_reset usually
indicates a desire to reset the board/platform and not just the CPU.

This changes do_reset to always request a COLD reset.
Note that programmatic uses can still invoke a WARM reset through
reset_cpu() or using sysreset_walk().

Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2017-12-12 19:53:45 -07:00
Jorge Ramirez-Ortiz
bd3006c849 drivers: spmi-msm: fix scanning for peripherals
A typo in the probe function causes not all peripherals to be scanned
(in the case of the Dragonboard820c - work in progress - it wont find pmic0).
2017-12-12 21:33:38 -05:00
Tuomas Tynkkynen
cf71338ee7 ata: Migrate CONFIG_MVSATA_IDE to Kconfig
Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
2017-12-12 18:16:06 -05:00
Tuomas Tynkkynen
b82e667f79 ata: Migrate CONFIG_LIBATA to Kconfig
This symbol enables some library code used by various SATA drivers,
so make this a non-user-visible symbol select'ed by the respective
drivers, and let moveconfig handle the rest.

Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
2017-12-12 18:16:05 -05:00
Tuomas Tynkkynen
9fd95ef0d3 ata: Migrate CONFIG_SCSI_AHCI to Kconfig
And use 'imply' liberally.

Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
2017-12-12 18:13:19 -05:00
Tuomas Tynkkynen
477b16a798 ata: Migrate CONFIG_DWC_AHSATA to Kconfig
Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
2017-12-12 14:06:46 -05:00
Tuomas Tynkkynen
9920d151c4 ata: Migrate CONFIG_FSL_SATA to Kconfig
Use 'imply' here liberally to avoid the combinatorial explosion of
defconfig changes in the PowerPC boards.

Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
2017-12-12 14:05:48 -05:00
Tuomas Tynkkynen
ad0ac54361 ata: Migrate CONFIG_SATA_MV to Kconfig
Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
2017-12-12 14:05:48 -05:00
Tuomas Tynkkynen
32f0398ba5 ata: Migrate CONFIG_SATA_SIL3114 to Kconfig
Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
2017-12-12 14:05:48 -05:00
Tuomas Tynkkynen
c88ecf47bd ata: Migrate CONFIG_SATA_SIL to Kconfig
Use 'imply' here liberally to avoid the combinatorial explosion of
defconfig changes in the PowerPC boards.

Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
2017-12-12 14:05:48 -05:00
Tuomas Tynkkynen
ac2e33efda ata: Drop CONFIG_MX51_PATA
The last user of this driver went away in August 2015 in commit:
b6073fd211 ("arm: Remove mx51_efikamx, mx51_efikasb boards")

Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
2017-12-12 14:05:48 -05:00
Tuomas Tynkkynen
0d26b831d7 ata: Drop CONFIG_SATA_DWC
The last user of this driver went away in June 2017, in commit:
98f705c9ce ("powerpc: remove 4xx support")

Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
2017-12-12 14:05:35 -05:00
Alexey Brodkin
d5fbcd57ed gpio/hsdk: Depend on DM_GPIO instead of simple DM
This driver really is DM GPIO one and so we need to have a correct
dependency, because DM alone doesn't provide required for CMD_GPIO
call and we're seeing build failures like this:
---------------------->8---------------------
cmd/built-in.o: In function 'do_gpio':
.../cmd/gpio.c:188: undefined reference to 'gpio_request'
...
---------------------->8---------------------

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Eugeniy Paltsev <paltsev@synopsys.com>
Cc: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
2017-12-12 18:47:30 +03:00
Tom Rini
87f3dee22b Merge git://git.denx.de/u-boot-uniphier 2017-12-11 17:06:04 -05:00
Masahiro Yamada
dc774e69bb mtd: nand: denali: make NAND_DENALI unconfigurable option
denali.c has no driver entry in itself.  It makes sense only when
compiled together with denali_dt.c

Let NAND_DENALI_DT select NAND_DENALI, and hide NAND_DENALI from
the Kconfig menu.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2017-12-12 00:36:11 +09:00
Eugeniy Paltsev
e80dac0ab8 ARC: clk: introduce HSDK CGU clock driver
Synopsys HSDK clock controller generates and supplies clocks to various
controllers and peripherals within the SoC.

Each clock has assigned identifier and client device tree nodes can use
this identifier to specify the clock which they consume. All available
clocks are defined as preprocessor macros in the
dt-bindings/clock/snps,hsdk-cgu.h header and can be used in device
tree sources.

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
2017-12-11 11:36:23 +03:00
Chris Brandt
243fd6420d usb: r8a66597: convert wait loop to readw_poll_timeout
It is better to use an existing wait loop implementation.

Signed-off-by: Chris Brandt <chris.brandt@renesas.com>
2017-12-09 13:39:27 +01:00
Marek Vasut
9e4a63736e net: ravb: Add R8A77995 D3 compatible
Add new compatible to the Ethernet AVB driver for R8A77995 D3 SoC.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Joe Hershberger <joe.hershberger@ni.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
2017-12-09 13:36:26 +01:00
Marek Vasut
dc3bb3d41e net: ravb: Add R8A77970 V3M compatible
Add new compatible to the Ethernet AVB driver for R8A77970 V3M SoC.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Joe Hershberger <joe.hershberger@ni.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
2017-12-09 13:36:26 +01:00
Marek Vasut
af098530e5 mmc: uniphier-sd: Add R8A77995 D3 compatible
Add new compatible to the Uniphier SD driver for R8A77995 D3 SoC.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
2017-12-09 13:36:26 +01:00
Marek Vasut
6ba2382f42 mmc: uniphier-sd: Add R8A77970 V3M compatible
Add new compatible to the Uniphier SD driver for R8A77970 V3M SoC.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
2017-12-09 13:36:26 +01:00
Marek Vasut
e3ab42480e gpio: rmobile: Add generic Gen3 compatible
Add generic compatible to the GPIO driver for Gen3 SoCs.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
2017-12-09 13:36:26 +01:00
Marek Vasut
f122c13bf5 gpio: rmobile: Add R8A77995 D3 compatible
Add new compatible to the GPIO driver for R8A77995 D3 SoC.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
2017-12-09 13:36:26 +01:00
Marek Vasut
0f2f0d89c4 gpio: rmobile: Add R8A77970 V3M compatible
Add new compatible to the GPIO driver for R8A77970 V3M SoC.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
2017-12-09 13:36:26 +01:00
Marek Vasut
a59e697618 pinctrl: rmobile: Add R8A77995 D3 PFC tables
Add PFC tables for R8A77995 D3 SoC.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
2017-12-09 13:36:26 +01:00
Marek Vasut
c106bb53ea pinctrl: rmobile: Add R8A77970 V3M PFC tables
Add PFC tables for R8A77970 V3M SoC.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
2017-12-09 13:36:26 +01:00
Marek Vasut
2c150950b0 clk: rmobile: Add R8A77995 D3 clock tables
Add clock tables for R8A77995 D3 SoC.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
2017-12-09 13:36:25 +01:00
Marek Vasut
7691ff2ada clk: rmobile: Add R8A77970 V3M clock tables
Add clock tables for R8A77970 V3M SoC.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
2017-12-09 13:36:25 +01:00
Marek Vasut
894ee0575f clk: rmobile: Fix typo in R8A7796 RPC clock table entry
Fix a copy-paste typo in the clock table entry, s/7795/7796/.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
2017-12-09 13:36:25 +01:00
Tom Rini
6c7010b779 Merge git://git.denx.de/u-boot-fsl-qoriq 2017-12-07 17:56:51 -05:00
Alan Ott
cab8a27d80 i2c: at91_i2c: remove the .probe_chip function
The .probe_chip function is supposed to probe an i2c device on the bus to
determine whether a device is answering to a particular address.
at91_i2c_probe_chip() did not do anything resembling this and always
returned 0.

It looks as though at91_i2c_probe_chip() was intended to be a .probe
function for the controller, as it was copied-and-pasted to become
at91_i2c_probe() in 0bc8f640a4.

Removing the at91_i2c_probe_chip() function makes the higher layer
(i2c_probe_chip()) try a zero-length read transfer to test for the
presence of a device instead, which does work.

Signed-off-by: Alan Ott <alan@softiron.com>
Acked-by: Wenyou Yang <wenyou.yang@microchip.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
2017-12-07 09:29:19 +01:00
Alan Ott
0afbb0e1c0 i2c: at91_i2c: Wait for TXRDY after sending the first byte
The driver must wait for TXRDY after each byte is pushed into
the i2c FIFO before pushing the next byte. Previously this was
not done for the first byte, causing a race condition with zeros
sometimes being sent for the next byte (which is typically the
first actual data byte).

Signed-off-by: Alan Ott <alan@softiron.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
2017-12-07 09:28:58 +01:00
Beniamino Galvani
50a69095cb i2c: meson: add some comments
Add some comment describing the purpose of struct members and
functions.

Signed-off-by: Beniamino Galvani <b.galvani@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heiko Schocher <hs@denx.de>
2017-12-07 09:28:42 +01:00
Beniamino Galvani
989bb924c4 i2c: meson: fix return codes on error
Change meson_i2c_xfer_msg() to return -EREMOTEIO in case of NACK, as
done by other drivers. Also, don't change the return error in
meson_i2c_xfer().

Signed-off-by: Beniamino Galvani <b.galvani@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heiko Schocher <hs@denx.de>
2017-12-07 09:28:31 +01:00
Beniamino Galvani
8c47ab6b3b i2c: meson: reduce timeout
The datasheet doesn't specify a suggested timeout and 500ms seems very
long: reduce it to 100ms.

Signed-off-by: Beniamino Galvani <b.galvani@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heiko Schocher <hs@denx.de>
2017-12-07 09:28:21 +01:00
Beniamino Galvani
4ecbb8b678 i2c: meson: improve Kconfig description
Expand the Kconfig description with hardware features.

Signed-off-by: Beniamino Galvani <b.galvani@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heiko Schocher <hs@denx.de>
2017-12-07 09:28:06 +01:00