Commit Graph

12476 Commits

Author SHA1 Message Date
Álvaro Fernández Rojas
190c36b975 phy: add support for bcm6358 usbh phy
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
2018-03-21 23:23:13 +01:00
Álvaro Fernández Rojas
bcb9b502d5 phy: add support for bcm6348 usbh phy
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
2018-03-21 23:23:13 +01:00
Álvaro Fernández Rojas
1b075ba016 dm: cpu: bmips: add BCM6362 support
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2018-03-21 23:23:13 +01:00
Tom Rini
da773532cd Merge git://git.denx.de/u-boot-usb 2018-03-19 20:10:15 -04:00
Tom Rini
c17848a798 Merge git://git.denx.de/u-boot-sunxi 2018-03-19 18:39:14 -04:00
Stefan Roese
ec9c80d643 nand: Remove unused ppc4xx NAND driver and references
ppc4xx support was removed some time ago. Lets remove the now unused
NAND driver and all its references for this platform as well.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>
Cc: Scott Wood <oss@buserror.net>
2018-03-19 16:14:23 -04:00
Patrick Delaunay
266fa4df00 clk: stm32mp1: add clock tree initialization
add binding and code for clock tree initialization from device tree

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2018-03-19 16:14:22 -04:00
Patrick Delaunay
a6151916cb clk: add driver for stm32mp1
add RCC clock driver for STMP32MP157
- base on driver model = UCLASS_CLK
- support ops to enable, disable and get rate
  of all SOC clock needed by U-Boot

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2018-03-19 16:14:22 -04:00
Patrick Delaunay
a7519b3324 reset: stm32: adapt driver for stm32mp1
- move to livetree and allow to get address to parent
- add stm32mp1 compatible for probe

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2018-03-19 16:14:22 -04:00
Patrick Delaunay
8aeba629cc pinctrl: stm32: update pincontrol for stmp32mp157
- add the 2 new compatible used by STM32MP157
	"st,stm32mp157-pinctrl"
	"st,stm32mp157-z-pinctrl"
- update the mask for the port

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2018-03-19 16:14:21 -04:00
Patrick Delaunay
5d0c74e624 pmic: add stpmu1 support
This driver implements register read/write operations for STPMU1.

The STPMU1 PMIC provides 4 BUCKs, 6 LDOs, 1 VREF
and 2 power switches. It is accessed via an I2C interface.
This device is used with STM32MP1 SoCs.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2018-03-19 16:14:21 -04:00
Patrick Delaunay
e70f70aa65 ram: stm32mp1: add driver
Add driver and binding for stm32mp1 ddr controller and phy

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2018-03-19 16:14:21 -04:00
Patrick Delaunay
2514c2d0e6 arm: stm32: add new architecture for STM32MP family
- add new arch stm32mp for STM32 MPU/Soc based on Cortex A
- support for stm32mp157 SOC
- SPL is used as first boot stage loader
- using driver model for all the drivers, even in SPL
- all security feature are deactivated (ETZC and TZC)
- reused STM32 MCU drivers when it is possible

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2018-03-19 16:14:21 -04:00
Patrick Delaunay
35746c0138 stm32mp: stm32f7_i2c: use calloc instead of kmalloc
Kmalloc is using memalign allocation function. It is not necessary to
align this structure so to save bytes, we move to calloc.

And kmalloc function can't be used in SPL early stage (in board_init_f())

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2018-03-19 16:14:21 -04:00
Patrick Delaunay
f11c308ac2 gpio: stm32f7_gpio: handle node ngpios
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2018-03-19 16:14:20 -04:00
Patrick Delaunay
d876eaf2be dm: gpio: Convert stm32f7 driver to livetree
Update the GPIO driver to support a live device tree.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2018-03-19 16:14:20 -04:00
Patrick Delaunay
0e373c0ade spl: add SPL_RESET_SUPPORT
Add option to include RESET driver and uclass in SPL.
That can be useful to handle IP reset with same driver
in U-Boot and in SPL.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2018-03-19 16:14:20 -04:00
Jagan Teki
735fb25202 sunxi: Add AXP_PMIC_BUS kconfig entry
Add simple and meaningful kconfig option for pmic_bus.c
instead of using MACH type on Makefile.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Acked-by: Maxime Ripard <maxime.ripard@bootlin.com>
2018-03-19 15:37:20 +05:30
yannick fertre
e6194ce612 video: stm32: stm32_ltdc: set the blending factor
Set the blending factor regarding the pixel format

Signed-off-by: yannick fertre <yannick.fertre@st.com>
2018-03-19 10:52:30 +01:00
yannick fertre
75fa711ac8 video: stm32: stm32_ltdc: missing set of line interrupt position
Set LIPCR (line interrupt position conf) register with line length.

Signed-off-by: yannick fertre <yannick.fertre@st.com>
2018-03-19 10:52:09 +01:00
yannick fertre
2a0e878460 video: stm32: stm32_ltdc: set rate of the pixel clock
pxclk is useless to set pixel clock.

Signed-off-by: yannick fertre <yannick.fertre@st.com>
2018-03-19 10:51:58 +01:00
yannick fertre
c4c33e9d8b video: stm32: stm32_ltdc: update file header & footer
Modified copyright & driver name.

Signed-off-by: yannick fertre <yannick.fertre@st.com>
2018-03-19 10:51:38 +01:00
yannick fertre
c0fb2fc045 video: stm32: stm32_ltdc: add reset
Add reset of LTDC display controller.

Signed-off-by: yannick fertre <yannick.fertre@st.com>
2018-03-19 10:50:25 +01:00
Heinrich Schuchardt
1ef9aed92a video: exynos: remove redundant assignments
No need to initialize variables if the next usage is an assignment.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2018-03-19 10:02:05 +01:00
Heinrich Schuchardt
c16b342d90 video, da8xx-fb: fix time out in wait_for_event()
If an event does not occur the current coding stays in an endless loop.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2018-03-19 09:49:20 +01:00
Heinrich Schuchardt
348f044fda video: stb_truetype: simplify expression
Eliminate (x2 - x2) which is always zero.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2018-03-19 09:47:02 +01:00
Heinrich Schuchardt
41ec127016 video: cfb_console: simplify logical constraint
(A || !A && B) == (A || B)

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2018-03-19 09:35:57 +01:00
Patrice Chotard
ac6c796c3f usb: dwc2: Replace printf, pr_err by dev_info, dev_err
Replace printf() call by dev_info() and pr_err() by dev_err()

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
2018-03-17 03:23:09 +01:00
Christophe Kerello
c2e4c86569 usb: dwc2: increase timeout in wait_for_chhltd
This patch increases timeout to 2s.
It was seen on 2 USB devices (Verbatim STORE N GO 070B4AED0FB22358 and
USB DISK 2.0 9000729BA41DDF40) that the request sense command takes
between 1.3s and and 1.5s.

Signed-off-by: Christophe Kerello <christophe.kerello@st.com>
Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
2018-03-17 03:23:09 +01:00
Christophe Kerello
82e7975b85 usb: dwc2: disable external vbus supply when the device is removed
This patch adds an interface to disable the power in dwc2 driver.
This new interface is called when the device is removed.

Signed-off-by: Christophe Kerello <christophe.kerello@st.com>
Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
2018-03-17 03:23:09 +01:00
Patrice Chotard
6048d42fa7 usb: ohci-generic: replace pr_err() by dev_err()
As we get access to struct udevice, use dev_err() instead
of pr_err().

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
2018-03-17 03:20:53 +01:00
Patrice Chotard
cab4d48a93 usb: ohci-generic: factorize PHY operation
Factorize PHY get/init/poweron and PHY poweroff/exit operations
into separate function, it simplify the error path.

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
2018-03-17 03:20:53 +01:00
Patrice Chotard
633e1ec6bf usb: ohci-generic: handle phy power on/off
Add generic_phy_power_on() and generic_phy_power_off()
calls to switch ON/OFF phy during probe and remove functions.

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
2018-03-17 03:20:53 +01:00
Patrice Chotard
df7777ab43 usb: ehci-generic: replace pr_err() by dev_err()
As we get access to struct udevice, use dev_err() instead
of pr_err().

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
2018-03-17 03:20:53 +01:00
Patrice Chotard
20f06a4833 usb: ehci-generic: factorize PHY operation
Factorize PHY get/init/poweron and PHY poweroff/exit operations
into separate function, it simplify the error path.

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
2018-03-17 03:20:53 +01:00
Patrice Chotard
a800a6793f usb: ehci-generic: handle phy power on/off
Add generic_phy_power_on() and generic_phy_power_off()
calls to switch ON/OFF phy during probe and remove functions.

Signed-off-by: Christophe Kerello <christophe.kerello@st.com>
Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
2018-03-17 03:20:53 +01:00
Stefan Roese
2715e32ce1 usb: Remove unused ppc4xx EHCI host driver
ppc4xx support was removed some time ago. Lets remove the now unused
EHCI driver and all its references for this platform as well.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>
Cc: Marek Vasut <marex@denx.de>
2018-03-17 03:20:15 +01:00
Vignesh R
2fd4242cc5 ubs: xhci-dwc3: Enable USB3 PHY when available
DWC3 USB3 controllers will need USB3 PHY to be enabled, in addition to
USB2 PHY, to be functional. Therefore enable USB3 PHY when available.

Signed-off-by: Vignesh R <vigneshr@ti.com>
2018-03-17 03:19:09 +01:00
Vignesh R
3fc2635d3d usb: xhci-dwc3: Refractor PHY operations into separate function
Refractor PHY get/init/poweron and PHY poweroff/exit operations into
separate function so that its easy to support multiple PHYs.

Signed-off-by: Vignesh R <vigneshr@ti.com>
2018-03-17 03:19:08 +01:00
Vignesh R
7d4e4d3063 usb: xhci-dwc3: Power on USB PHY before using
It is wrong that expect .phy_init() to also power on the PHY. Therefore,
explicitly, call generic_phy_power_on() after generic_phy_power_init() in
order to power on PHY before using it.

Signed-off-by: Vignesh R <vigneshr@ti.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2018-03-17 03:19:08 +01:00
Alexey Brodkin
42637fdae8 usb: dwc2: Allow selection of data buffer size
If we use hardware with very small RAM (let's consider just a couple
of hundreds of kB but not megabytes) it is not super convenient to lose
64kB for statically allocated bufer which most probably won't be used
as big as it is. Typically we'll have much shorter data packages to
excahnge and in the worst case longer packets will be split on separate
transactions.

For those corner-cases user will be able to set his buffer size of
choice via USB_DWC2_BUFFER_SIZE option in menuconfig.

By default we'll use 64 kB as it was hard-coeded before so existing
users shouldn't be affected at all.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Marek Vasut <marex@denx.de>
2018-03-17 03:15:18 +01:00
Tom Rini
6f6b7cfa89 Convert all of CONFIG_CONS_INDEX to Kconfig
This converts the following to Kconfig:
   CONFIG_CONS_INDEX

We have existing entries for this option in a number of places, with
different guards on them.  They're also sometimes used for things not
directly inside of the serial driver.  First, introduce a new symbol to
guard the use of CONFIG_CONS_INDEX, so that in the case where we don't
need this for the serial driver, but for some other use, we can still do
it.  Next, consolidate all of these into the single entry in
drivers/serial/Kconfig.  Finally, introduce CONS_INDEX_[023456] so that
we can imply a correct value here to make the defconfig side of this
smaller.

Signed-off-by: Adam Ford <aford173@gmail.com>
[trini: Rework a lot of the logic here, such that I took authorship from
Adam, but kept his S-o-B line]
Signed-off-by: Tom Rini <trini@konsulko.com>
2018-03-16 10:28:52 -04:00
Ruslan Bilovol
87c692cbc1 watchdog: omap_wdt: improve watchdog reset path
Remove busy looping during watchdog reset.
Each polling of W_PEND_WTGR bit ("finish posted
write") after watchdog reset takes 120-140us
on BeagleBone Black board. Current U-Boot code
has watchdog resets in random places and often
there is situation when watchdog is reset
few times in a row in nested functions.
This adds extra delays and slows the whole system.

Instead of polling W_PEND_WTGR bit, we skip
watchdog reset if the bit is set. Anyway, watchdog
is in the middle of reset *right now*, so we can
just return.

This noticeably increases performance of the
system. Below are some measurements on BBB:
 - DFU upload over USB                 15% faster
 - fastboot image upload               3x times faster
 - USB ep0 transfers with 4k packets   20% faster

Signed-off-by: Ruslan Bilovol <ruslan.bilovol@gmail.com>
Tested-by: Sam Protsenko <semen.protsenko@linaro.org>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Tested-by: Alex Kiernan <alex.kiernan@gmail.com>
2018-03-16 09:42:38 -04:00
Wenyou Yang
162a7de5e5 clk: at91: clk-system: add set/get_rate operations
To support set/get the clock rate, add set/get_rate operations.

Signed-off-by: Wenyou Yang <wenyou.yang@microchip.com>
2018-03-16 07:30:04 -04:00
Wenyou Yang
fed0509c92 clk: at91: add PLLADIV driver
As said in the SAMA5D2 datasheet, the PLLA clock must be divided
by 2 by writing the PLLADIV2 bit in PMC_MCKR, if the ratio between
PCK and MCK is 3 (MDIV = 3). This is the purpose of the driver.

Signed-off-by: Wenyou Yang <wenyou.yang@microchip.com>
2018-03-16 07:30:04 -04:00
Wenyou Yang
cb0cb1b0cf clk: at91: add USB Host clock driver
Add USB clock driver to configure the input clock and the divider
in the PMC_USB register to generate a 48MHz and a 12MHz signal to
the USB Host OHCI.

Signed-off-by: Wenyou Yang <wenyou.yang@microchip.com>
2018-03-16 07:30:04 -04:00
Tom Rini
3fa9bc7969 Merge git://git.denx.de/u-boot-spi 2018-03-15 08:27:27 -04:00
Jagan Teki
b2b41d2777 spi: omap3: Fix redeclared error
omap3_spi_set_speed|mode redeclared bus symbol, fix the same.

error:
drivers/spi/omap3_spi.c: In function ‘omap3_spi_set_speed’:
drivers/spi/omap3_spi.c:650:18: error: ‘bus’ redeclared as different kind of symbol
  struct udevice *bus = dev->parent;

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
2018-03-14 23:19:31 +05:30
Tom Rini
b75643ad0a Merge git://git.denx.de/u-boot-sunxi 2018-03-14 13:27:14 -04:00
Patrice Chotard
2536f18bfa arch-stm32: Factorize stm32.h for STM32F4 and F7
For STM32F4 and F7 SoCx family, a specific stm32.h file exists.
Some common defines are duplicated or even unused in each of
these stm32.h.

Factorize all common definition in arch/arm/include/asm/stm32f.h and keep
specific definitions in each arch/arm/include/asm/arch-stm32fx/stm32.h.

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
2018-03-13 21:45:37 -04:00