oweals/u-boot.git
6 years agoARM: dts: Add support for stm32f746-evaluation board support
Patrice Chotard [Fri, 16 Feb 2018 12:27:03 +0000 (13:27 +0100)]
ARM: dts: Add support for stm32f746-evaluation board support

This board offers:
  _ STM32F746NGH6 microcontroller with 1 Mbyte Flash and 320+4 Kbytes RAM
  _ Six 5 V power supply options:
        Power jack
        ST-LINK/V2-1 USB connector
        User USB HS connector
        User USB FS1 connector
        User USB FS2 connector
        Daughterboard
  _ SAI Audio DAC, stereo audio jack which supports headset with microphone
  _ Stereo digital microphone, audio jack connector used to connect
    external speakers
  _ 2 Gbytes (or more) SDMMC interface microSD card
  _ RF-EEPROM on I2C compatible serial interface
  _ RS-232 communication
  _ IrDA transceiver
  _ JTAG/SWD and ETM trace debug support, ST-LINK/V2-1 embedded
  _ IEEE-802.3-2002 compliant Ethernet connector
  _ Camera module
  _ 8Mx32 bit SDRAM, 1Mx16 bit SRAM & 8Mx16 bit Nor Flash
  _ 512 Mbits QuadSPI Nor Flash
  _ 5.7 inch 640x480 pixel TFT color LCD with capacitive touch panel
  _ Joystick with 4-direction control and selector
  _ Reset, WakeUp/Tamper or key button
  _ 4 color user LEDs
  _ Extension connectors & memory connectors for daughterboard or
    wrapping board
  _ USB OTG HS and FS with Micro-AB connectors
  _ RTC with backup battery
  _ CAN 2.0A/B compliant connection
  _ Potentiometer
  _ Motor control connector

More detailed information are available here :
http://www.st.com/en/evaluation-tools/stm32746g-eval.html

To compile stm32f746-eval board, use same defconfig as
stm32f746-disco, the only difference is to pass
"DEVICE_TREE=stm32746g-eval".

Signed-off-by: Christophe Priouzeau <christophe.priouzeau@st.com>
Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Acked-by: Vikas Manocha <vikas.manocha@st.com>
6 years agoarch-stm32: Clean arch-stm32f7/syscfg.h
Patrice Chotard [Fri, 9 Feb 2018 12:09:57 +0000 (13:09 +0100)]
arch-stm32: Clean arch-stm32f7/syscfg.h

Remove all unused defines

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
6 years agoarch-stm32: Remove stm32_periph.h
Patrice Chotard [Fri, 9 Feb 2018 12:09:56 +0000 (13:09 +0100)]
arch-stm32: Remove stm32_periph.h

Remove arch/arm/include/asm/arch-stm32fx/stm32_periph.h
as all defines or enums are no more used.

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
6 years agoarch-stm32: Factorize stm32.h for STM32F4 and F7
Patrice Chotard [Fri, 9 Feb 2018 12:09:55 +0000 (13:09 +0100)]
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>
6 years agoarch-stm32: Move gpio.h for STM32 SoCs in include/asm/
Patrice Chotard [Fri, 9 Feb 2018 12:09:54 +0000 (13:09 +0100)]
arch-stm32: Move gpio.h for STM32 SoCs in include/asm/

Instead to have 3 identical gpio.h for all STM32 SoCs,
migrate them in one file in include/asm.

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
6 years agoarch-stm32f4: Remove fmc.h file
Patrice Chotard [Fri, 9 Feb 2018 12:09:53 +0000 (13:09 +0100)]
arch-stm32f4: Remove fmc.h file

fmc.h file is no more used, remove it.
All FMC related defines are declared in drivers/ram/stm32_sdram.c
which is common to all STM32 SoCs.

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
6 years agoARM: dts: stm32: limit sdio frequency to 14Mhz for stm32f429i-eval
Patrice Chotard [Thu, 8 Feb 2018 16:25:19 +0000 (17:25 +0100)]
ARM: dts: stm32: limit sdio frequency to 14Mhz for stm32f429i-eval

This avoids the following errors while reading on mmc:
  Read data bytes CRC error: 0x2
  switch to partitions #0, OK
  mmc0 is current device
  Read data bytes CRC error: 0x82002
  ** Unrecognized filesystem type **

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
6 years agoclk: clk_stm32f: Add DSI clock support
Patrice Chotard [Thu, 8 Feb 2018 16:20:51 +0000 (17:20 +0100)]
clk: clk_stm32f: Add DSI clock support

DSI clock is available on STM32F769-disco and
STM32F469-disco board.

Signed-off-by: Yannick Fertre <yannick.fertre@st.com>
Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
6 years agoclk: clk_stm32f: Add set_rate for LTDC clock
Patrice Chotard [Thu, 8 Feb 2018 16:20:50 +0000 (17:20 +0100)]
clk: clk_stm32f: Add set_rate for LTDC clock

Implement set_rate() for LTDC clock only, set_rate for other
clocks will be added if needed. This is needed by future LTDC driver
improvements.

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
6 years agoclk: clk_stm32f: Configure SAI PLL to generate LTDC pixel clock
Patrice Chotard [Thu, 8 Feb 2018 16:20:49 +0000 (17:20 +0100)]
clk: clk_stm32f: Configure SAI PLL to generate LTDC pixel clock

Configure SAI PLL configuration to generate LTDC pixel clock on
the PLLSAIR output.

PLLSAI is enabled only if CONFIG_VIDEO_STM32 flag is set.

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
6 years agoclk: clk_stm32f: Rework SDMMC stm32_clk_get_rate() part
Patrice Chotard [Thu, 8 Feb 2018 16:20:48 +0000 (17:20 +0100)]
clk: clk_stm32f: Rework SDMMC stm32_clk_get_rate() part

Rework the way SDMMC clock get rate is done in a more
generic way :

_ Add stm32_clk_get_pllsai_rate() which give the PLLSAI
  indicated output rate.

_ Add stm32_clk_get_pllsai_vco_rate() which give the VCO
  internal rate.

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
6 years agoclk: clk_stm32f: No more need of 48Mhz from PLL_SAI
Patrice Chotard [Thu, 8 Feb 2018 16:20:47 +0000 (17:20 +0100)]
clk: clk_stm32f: No more need of 48Mhz from PLL_SAI

Initially, 48Mhz for SDIO clock was generated from SAI pll for
STM32F469 and STM32F746 SoCs, but this solution was not suitable
for STM32F429 SoCs.

A generic solution is to used the PLL_Q output as 48Mhz clock
for all STM32F SOCs family.

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
6 years agoclk: clk_stm32f: Fix RCC_PLLSAICFGR mask defines
Patrice Chotard [Thu, 8 Feb 2018 16:20:46 +0000 (17:20 +0100)]
clk: clk_stm32f: Fix RCC_PLLSAICFGR mask defines

Use the correct name for RCC_PLLSAICFGR_PLLSAIx_MASK masks.

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
6 years agoclk: clk_stm32f: Fix stm32_clk_get_rate()
Patrice Chotard [Thu, 8 Feb 2018 16:20:45 +0000 (17:20 +0100)]
clk: clk_stm32f: Fix stm32_clk_get_rate()

Wrong parameter was passed to stm32_clk_pll48clk_rate().
sysclk (PLL_p output value) was passed instead of VCO value.

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
6 years agommc: stm32: sdmmc2: add support for st, pin-ckinsdmmc_ckin
Patrick Delaunay [Wed, 7 Feb 2018 16:19:59 +0000 (17:19 +0100)]
mmc: stm32: sdmmc2: add support for st, pin-ckinsdmmc_ckin

This patch adds "st,pin-ckin" support to activate sdmmc_ckin feature.
When using an external driver (a voltage switch transceiver),
it's advised to select SDMMC_CKIN feedback clock input to sample
the received data.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
6 years agommc: stm32: sdmmc2: add hardware flow control support
Patrick Delaunay [Wed, 7 Feb 2018 16:19:58 +0000 (17:19 +0100)]
mmc: stm32: sdmmc2: add hardware flow control support

The hardware flow control functionality is used to avoid
FIFO underrun (TX mode) and overrun (RX mode) errors.
The behavior is to stop SDMMC_CK during data transfer and
freeze the SDMMC state machines.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
6 years agoboard: stm32: switch to DM STM32 timer
Patrice Chotard [Wed, 7 Feb 2018 09:44:50 +0000 (10:44 +0100)]
board: stm32: switch to DM STM32 timer

Use available DM stm32_timer driver instead of dedicated
mach-stm32/stm32fx/timer.c.

Remove all defines or files previously used for timer usage in
arch/arm/include/asm/arch-stm32fx and in arch/arm/mach-stm32/stm32fx

Enable DM STM32_TIMER for STM32F4/F7 and H7.

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
6 years agoARM: dts: stm32: Add timer support for STM32F7
Patrice Chotard [Wed, 7 Feb 2018 09:44:49 +0000 (10:44 +0100)]
ARM: dts: stm32: Add timer support for STM32F7

Add missing timer node to enable timer5 for STM32F7 SoCs family

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
6 years agoclk: clk_stm32h7: Fix prescaler for Domain 3
Patrice Chotard [Wed, 7 Feb 2018 09:44:48 +0000 (10:44 +0100)]
clk: clk_stm32h7: Fix prescaler for Domain 3

d1cfgr register was used to calculate the domain 3
prescaler value instead of d3cfgr.

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
6 years agoclk: clk_stm32h7: Fix stm32_clk_get_rate() for timer
Patrice Chotard [Wed, 7 Feb 2018 09:44:47 +0000 (10:44 +0100)]
clk: clk_stm32h7: Fix stm32_clk_get_rate() for timer

For timer clock, an additional prescaler is used which
was not taken into account previously.

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
6 years agoclk: clk_stm32f: Fix stm32_clk_get_rate() for timer
Patrice Chotard [Wed, 7 Feb 2018 09:44:46 +0000 (10:44 +0100)]
clk: clk_stm32f: Fix stm32_clk_get_rate() for timer

For timer clock, an additionnal prescaler is used which was
not taken into account previously.

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
6 years agotimer: stm32: Add timer support for STM32 SoCs family
Patrice Chotard [Wed, 7 Feb 2018 09:44:45 +0000 (10:44 +0100)]
timer: stm32: Add timer support for STM32 SoCs family

This timer driver is using GPT Timer (General Purpose Timer)
available on all STM32 SOCs family.
This driver can be used on STM32F4/F7 and H7 SoCs family

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
6 years agoMerge git://git.denx.de/u-boot-rockchip
Tom Rini [Tue, 13 Mar 2018 23:00:29 +0000 (19:00 -0400)]
Merge git://git.denx.de/u-boot-rockchip

6 years agoMerge branch 'next' of git://git.denx.de/u-boot-video
Tom Rini [Tue, 13 Mar 2018 21:32:47 +0000 (17:32 -0400)]
Merge branch 'next' of git://git.denx.de/u-boot-video

6 years agork3288: vyasa: Add eMMC boot support
Jagan Teki [Wed, 14 Feb 2018 15:56:22 +0000 (21:26 +0530)]
rk3288: vyasa: Add eMMC boot support

RK3288 Vyasa has eMMC boot support, with JP4 open.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
6 years agoARM: dts: rockchip: Add usb otg for rk3288-vyasa
Jagan Teki [Wed, 14 Feb 2018 15:56:21 +0000 (21:26 +0530)]
ARM: dts: rockchip: Add usb otg for rk3288-vyasa

Add usb otg support for rk3288-vyasa, board support usb1 otg
power through otg_vbus_drv and naming conversion followed
as per schematic.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
6 years agoARM: dts: rockchip: Add usb host for rk3288-vyasa
Jagan Teki [Wed, 14 Feb 2018 15:56:20 +0000 (21:26 +0530)]
ARM: dts: rockchip: Add usb host for rk3288-vyasa

Add usb host support for rk3288-vyasa, board support hub power
through phy_pwr_en and usb2 host power through usb2_pwr_en and
naming conversion followed as per schematic.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
6 years agorockchip: rk3288-vyasa: defconfig: Enable gmac support
Jagan Teki [Wed, 14 Feb 2018 15:56:19 +0000 (21:26 +0530)]
rockchip: rk3288-vyasa: defconfig: Enable gmac support

Enable gmac support for rk3288-vyasa board.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
6 years agoARM: dts: rockchip: Add gmac support for rk3288-vyasa board
Jagan Teki [Wed, 14 Feb 2018 15:56:18 +0000 (21:26 +0530)]
ARM: dts: rockchip: Add gmac support for rk3288-vyasa board

Sync gmac dts node from Linux.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
6 years agoARM: dts: rockchip: Add regulators for rk3288-vyasa
Jagan Teki [Wed, 14 Feb 2018 15:56:17 +0000 (21:26 +0530)]
ARM: dts: rockchip: Add regulators for rk3288-vyasa

Add supporting regulators for rk3288-vyasa board, dc12_vbat is
parent regulatorand followed regulators as are child regulators.
regulator naming conversion followed as per schematic for better
readability and easy for identification.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
6 years agoARM: dts: rockchip: rk3288-vyasa: Use vmmc-supply from PMIC
Jagan Teki [Wed, 14 Feb 2018 15:56:16 +0000 (21:26 +0530)]
ARM: dts: rockchip: rk3288-vyasa: Use vmmc-supply from PMIC

rk808, SWITCH_REG1 has configured for sdmmc regulator as vcc_sd,
so use the same by renaming vcc33_sd to vcc_sd(as per schematic)
and drop explicit regulator definition from root.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
6 years agoARM: dts: rockchip: rk3288-vyasa: Remove vdd_log from rk808, DCDC_REG1
Jagan Teki [Wed, 14 Feb 2018 15:56:15 +0000 (21:26 +0530)]
ARM: dts: rockchip: rk3288-vyasa: Remove vdd_log from rk808, DCDC_REG1

vdd_log, never used on DCDC_REG1 of rk808 from latest schematic so
remove the same and update the regulator-name as 'vdd_arm' to sync
with existing rk3288 board dts files.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
6 years agoARM: dts: rockchip: Sync rk3288-vyasa dts from Linux
Jagan Teki [Wed, 14 Feb 2018 15:56:14 +0000 (21:26 +0530)]
ARM: dts: rockchip: Sync rk3288-vyasa dts from Linux

Sync rk3288-vyasa board dts from Linux for proper updates and maintenance
- rk3288-vyasa.dts: Similar to Linux dts
- rk3288-vyasa-u-boot.dtsi: u-boot dts changes

Also updated MAINTAINERS for these dts files.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
6 years agorockchip: add text_offset to kernel_addr_r on aarch64 platforms
Klaus Goger [Mon, 19 Feb 2018 07:02:26 +0000 (08:02 +0100)]
rockchip: add text_offset to kernel_addr_r on aarch64 platforms

Booting a aarch64 Linux kernel requires the image to be placed
text_offset bytes from a 2MB aligned address.
See https://www.kernel.org/doc/Documentation/arm64/booting.txt

booti_setup() takes care about this alignment and will relocate the
image if not properly aligned with memmove(). This can require up
to double the size of the loaded image and therefore accidentally
overwrite content placed there (i.e ramdisk_addr_r) for large kernel
images.

By adding text_offset to the default kernel_addr_r we can prevent that
from happening for kernels larger 18MB and also save a few cycles.

We can assume a text_offset of 0x80000 for most cases, all others will be
handled by booti_setup() anyway.

Signed-off-by: Klaus Goger <klaus.goger@theobroma-systems.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
6 years agorockchip: pwm: convert to use live dt
Kever Yang [Thu, 8 Feb 2018 13:15:21 +0000 (21:15 +0800)]
rockchip: pwm: convert to use live dt

use live dt api to get base addr

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
6 years agorockchip: clk: rk1108: convert to use live dt
Kever Yang [Sun, 11 Feb 2018 03:53:10 +0000 (11:53 +0800)]
rockchip: clk: rk1108: convert to use live dt

Use live dt api to get cru base addr.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
6 years agorockchip: clk: rk3328: convert to use live dt
Kever Yang [Sun, 11 Feb 2018 03:53:09 +0000 (11:53 +0800)]
rockchip: clk: rk3328: convert to use live dt

Use live dt api to get cru base addr.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
6 years agorockchip: clk: rk3288: convert to use live dt
Kever Yang [Sun, 11 Feb 2018 03:53:08 +0000 (11:53 +0800)]
rockchip: clk: rk3288: convert to use live dt

Use live dt api to get cru base addr.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
6 years agorockchip: clk: rk322x: convert to use live dt
Kever Yang [Sun, 11 Feb 2018 03:53:07 +0000 (11:53 +0800)]
rockchip: clk: rk322x: convert to use live dt

Use live dt api to get cru base addr.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
6 years agorockchip: clk: rk3188: convert to use live dt
Kever Yang [Sun, 11 Feb 2018 03:53:06 +0000 (11:53 +0800)]
rockchip: clk: rk3188: convert to use live dt

Use live dt api to get cru base addr.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
6 years agorockchip: clk: rk3036: convert to use live dt
Kever Yang [Sun, 11 Feb 2018 03:53:05 +0000 (11:53 +0800)]
rockchip: clk: rk3036: convert to use live dt

Use live dt api to get cru base addr.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
6 years agoPrepare v2018.03 v2018.03
Tom Rini [Tue, 13 Mar 2018 12:02:19 +0000 (08:02 -0400)]
Prepare v2018.03

Signed-off-by: Tom Rini <trini@konsulko.com>
6 years agoimx: hab: Convert DCD non-NULL error to warning
Bryan O'Donoghue [Fri, 9 Mar 2018 13:07:21 +0000 (13:07 +0000)]
imx: hab: Convert DCD non-NULL error to warning

commit 8c4037a09a5c ("imx: hab: Ensure the IVT DCD pointer is Null prior
to calling HAB authenticate function.") makes the DCD field being NULL a
dependency.

This change though will break loading and executing of existing pre-signed
binaries on a u-boot update i.e. if this change is deployed on a board you
will be forced to redo all images on that board to NULL out the DCD.

There is no prior guidance from NXP that the DCD must be NULL similarly
public guidance on usage of the HAB doesn't call out this NULL dependency
(see boundary devices link).

Since later SoCs will reject a non-NULL DCD there's no reason to make a
NULL DCD a requirement, however if there is an actual dependency for later
SoCs the appropriate fix would be to do SoC version checking.

Earlier SoCs are capable (and happy) to authenticate images with non-NULL
DCDs, we should not be forcing this change on downstream users -
particularly if it means those users now must rewrite their build systems
and/or redeploy signed images in the field.

Fixes: 8c4037a09a5c ("imx: hab: Ensure the IVT DCD pointer is Null prior
to calling HAB authenticate function.")

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Cc: Utkarsh Gupta <utkarsh.gupta@nxp.com>
Cc: Breno Lima <breno.lima@nxp.com>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Link: https://boundarydevices.com/high-assurance-boot-hab-dummies
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
6 years agodoc: mxc_hab: Update i.MX HAB documentation
Breno Lima [Thu, 22 Feb 2018 00:42:56 +0000 (00:42 +0000)]
doc: mxc_hab: Update i.MX HAB documentation

The README.mxc_hab is outdated and need improvements, add the following
modifications:

- Reorganize document and remove duplicate content
- Add CST download link
- Update CST package name
- Align command lines with CST v2.3.3
- Update U-Boot binary name
- Remove CSF padding since is not documented in AN4581

Signed-off-by: Breno Lima <breno.lima@nxp.com>
6 years agodoc: mxc_hab: Move HAB related info to the appropriate doc
Breno Lima [Thu, 22 Feb 2018 00:42:55 +0000 (00:42 +0000)]
doc: mxc_hab: Move HAB related info to the appropriate doc

Currently the High Assurance Boot procedure is documented in two
places:

- doc/README.imx6
- doc/README.mxc_hab

It is better to consolidate all HAB related information into
README.mxc_hab file, so move the content from README.imx6 to
README.mxc_hab.

Signed-off-by: Breno Lima <breno.lima@nxp.com>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
6 years agoimx: hab: Make usage of packed attribute consistent
Bryan O'Donoghue [Fri, 9 Mar 2018 13:07:20 +0000 (13:07 +0000)]
imx: hab: Make usage of packed attribute consistent

commit cd2d46003ce1 ("arm: imx: hab: Add IVT header definitions") declares
struct ivt_header as "__attribute__((packed))".

commit ed286bc80e9d ("imx: hab: Check if CSF is valid before
authenticating image") declares struct hab_hdr with __packed.

This patch makes the __packed convention consistent.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Cc: Utkarsh Gupta <utkarsh.gupta@nxp.com>
Cc: Breno Lima <breno.lima@nxp.com>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
6 years agoimx: hab: Fix usage of packed attribute
Bryan O'Donoghue [Fri, 9 Mar 2018 13:07:19 +0000 (13:07 +0000)]
imx: hab: Fix usage of packed attribute

commit ed286bc80e9d ("imx: hab: Check if CSF is valid before authenticating
image") makes use of "__packed" as a prefix to the "struct hab_hdr"
declaration.

With my compiler "gcc version 7.2.1 20171011 (Linaro GCC 7.2-2017.11)" we
get:

./arch/arm/include/asm/mach-imx/hab.h:42:25: error: expected ‘=’, ‘,’, ‘;’,
‘asm’ or ‘__attribute__’ before ‘{’ token
 struct __packed hab_hdr {

Fix this problem by including <linux/compiler.h>

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Cc: Utkarsh Gupta <utkarsh.gupta@nxp.com>
Cc: Breno Lima <breno.lima@nxp.com>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
6 years agoARM: dts: imx6dl-icore-rqs: Fix to include correct dtsi
Jagan Teki [Tue, 6 Mar 2018 11:45:59 +0000 (17:15 +0530)]
ARM: dts: imx6dl-icore-rqs: Fix to include correct dtsi

This patch fixes the wrongly included dtsi file which was
breaking mainline support for Engicam i.CoreM6 DualLite/Solo RQS.

Linux commit details for the same change as
"ARM: dts: imx6dl: Include correct dtsi file for Engicam i.CoreM6
DualLite/Solo RQS"
(sha1: c0c6bb2322964bd264b4ddedaa5776f40c709f0c)

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
6 years agoARM: dts: imx6qdl-icore-rqs: Sync usdhc4 node from Linux
Jagan Teki [Tue, 6 Mar 2018 11:45:58 +0000 (17:15 +0530)]
ARM: dts: imx6qdl-icore-rqs: Sync usdhc4 node from Linux

usdhc4 node need to update pinctrl, bus-width and non-removable
properties, sync the same from Linux.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
6 years agoMerge git://git.denx.de/u-boot-imx
Tom Rini [Fri, 9 Mar 2018 18:29:58 +0000 (13:29 -0500)]
Merge git://git.denx.de/u-boot-imx

6 years agoconfigs: Resync with savedefconfig
Tom Rini [Fri, 9 Mar 2018 14:27:23 +0000 (09:27 -0500)]
configs: Resync with savedefconfig

Rsync all defconfig files using moveconfig.py

Signed-off-by: Tom Rini <trini@konsulko.com>
6 years agotools/mkimage: Use proper output parameter in dtc-system call
Stefan Theil [Thu, 8 Mar 2018 08:00:13 +0000 (09:00 +0100)]
tools/mkimage: Use proper output parameter in dtc-system call

The system call used by mkimage to run dtc redirects stdout to a
temporary file. This can cause problems on Windows (with a MinGW
cross-compiled version). Using the "-o" dtc parameter avoids
this problem.

Signed-off-by: Stefan Theil <stefan.theil@mixed-mode.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
6 years agofs: ext4: Do not print mount fail message when not ext4 filesystem
Marek Behún [Wed, 7 Mar 2018 23:26:08 +0000 (00:26 +0100)]
fs: ext4: Do not print mount fail message when not ext4 filesystem

Other filesystem drivers don't do this.

Signed-off-by: Marek Behun <marek.behun@nic.cz>
6 years agoMAINTAINERS: bring sections into alphabetic order
Heinrich Schuchardt [Wed, 7 Mar 2018 03:04:29 +0000 (04:04 +0100)]
MAINTAINERS: bring sections into alphabetic order

NETWORK should be after NAND_FLASH.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
6 years agoscripts/coccinelle: add some more coccinelle tests
Heinrich Schuchardt [Thu, 8 Mar 2018 19:56:17 +0000 (20:56 +0100)]
scripts/coccinelle: add some more coccinelle tests

kmerr: verify that malloc and calloc are followed by a check to verify
that we are not out of memory.

badzero: Compare pointer-typed values to NULL rather than 0

Both checks are copied from the Linux kernel archive.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
6 years agoyaffs2: iterator variable cannot be NULL
Heinrich Schuchardt [Thu, 8 Mar 2018 21:52:29 +0000 (22:52 +0100)]
yaffs2: iterator variable cannot be NULL

The iterator of list_for_each() is never NULL.

Identified with coccinelle.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
6 years agobcm283x_pl011: Flush RX queue after setting baud rate
Alexander Graf [Wed, 7 Mar 2018 21:08:25 +0000 (22:08 +0100)]
bcm283x_pl011: Flush RX queue after setting baud rate

After the UART was initialized, we may still have bogus data in the
RX queue if it was enabled with incorrect pin muxing before.

So let's flush the RX queue whenever we initialize baud rates.

This fixes a regression with the dynamic pinmuxing code when enable_uart=1
is not set in config.txt on Raspberry Pis that use pl011 for serial.

Fixes: caf2233b28 ("bcm283x: Add pinctrl driver")
Reported-by: Göran Lundberg <goran@lundberg.email>
Reported-by: Peter Robinson <pbrobinson@gmail.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
Tested-by: Peter Robinson <pbrobinson@gmail.com>
Tested-by: Tuomas Tynkkynen <tuomas@tuxera.com>
6 years agoserial_bcm283x_mu: Flush RX queue after setting baud rate
Alexander Graf [Wed, 7 Mar 2018 21:08:24 +0000 (22:08 +0100)]
serial_bcm283x_mu: Flush RX queue after setting baud rate

After the UART was initialized, we may still have bogus data in the
RX queue if it was enabled with incorrect pin muxing before.

So let's flush the RX queue whenever we initialize baud rates.

This fixes a regression with the dynamic pinmuxing code when enable_uart=1
is not set in config.txt.

Fixes: caf2233b28 ("bcm283x: Add pinctrl driver")
Reported-by: Göran Lundberg <goran@lundberg.email>
Reported-by: Peter Robinson <pbrobinson@gmail.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
Tested-by: Peter Robinson <pbrobinson@gmail.com>
Tested-by: Tuomas Tynkkynen <tuomas@tuxera.com>
6 years agosunxi: video: mark framebuffer as EFI reserved memory
Heinrich Schuchardt [Sat, 3 Mar 2018 09:30:17 +0000 (10:30 +0100)]
sunxi: video: mark framebuffer as EFI reserved memory

Inform the EFI subsystem that the framebuffer memory is reserved.

Without the patch the AllocatePool boot service allocates memory from the
framebuffer which will will be overwritten by screen output.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
6 years agoARM: Drop unreferenced CONFIG_* defines named after boards
Tuomas Tynkkynen [Mon, 5 Mar 2018 23:46:39 +0000 (01:46 +0200)]
ARM: Drop unreferenced CONFIG_* defines named after boards

The following config symbols are only defined once and never referenced
anywhere else:

CONFIG_AT91SAM9263EK
CONFIG_AT91SAM9RLEK
CONFIG_BARIX_IPAM390
CONFIG_BOARD_H2200
CONFIG_EP9301
CONFIG_KZM_A9_GT
CONFIG_PICOSAM
CONFIG_PLATINUM_PICON
CONFIG_PLATINUM_TITANIUM
CONFIG_PM9261
CONFIG_PM9263
CONFIG_PM9G45
CONFIG_SIEMENS_DRACO
CONFIG_SIEMENS_PXM2
CONFIG_SIEMENS_RUT
CONFIG_SMDKC100
CONFIG_SMDKV310
CONFIG_STM32F4DISCOVERY

Most of them are config symbols named after the respective boards which
seems to have been a standard practice at some point.

Signed-off-by: Tuomas Tynkkynen <tuomas@tuxera.com>
6 years agoARM: Drop unreferenced CONFIG_* defines named after SoCs
Tuomas Tynkkynen [Mon, 5 Mar 2018 23:46:38 +0000 (01:46 +0200)]
ARM: Drop unreferenced CONFIG_* defines named after SoCs

The following config symbols are only defined once and never referenced
anywhere else:

CONFIG_ARM926EJS
CONFIG_CPUAT91
CONFIG_EXYNOS5800
CONFIG_SYS_CORTEX_R4

Most of them are config symbols named after the respective SoCs which
seems to have been a standard practice at some point.

Signed-off-by: Tuomas Tynkkynen <tuomas@tuxera.com>
6 years agoMIPS: Drop unreferenced CONFIG_* defines
Tuomas Tynkkynen [Mon, 5 Mar 2018 23:46:37 +0000 (01:46 +0200)]
MIPS: Drop unreferenced CONFIG_* defines

The following config symbols are only defined once and never referenced
anywhere else:

CONFIG_DBAU1X00
CONFIG_PB1X00

Most of them are config symbols named after the respective boards which
seems to have been a standard practice at some point.

Signed-off-by: Tuomas Tynkkynen <tuomas@tuxera.com>
6 years agotreewide: Fix gdsys mail addresses
Mario Six [Tue, 6 Mar 2018 07:04:58 +0000 (08:04 +0100)]
treewide: Fix gdsys mail addresses

The @gdsys.cc addresses are supposed to be used for mailing lists.
Switch all occurrences of @gdsys.de mail addresses to their @gdsys.cc
equivalent.

Also, Dirk's address was wrong in one place; fix that as well.

Signed-off-by: Mario Six <six@gdsys.cc>
6 years agoARM: qemu-arm: Increase CONFIG_SYS_CBSIZE
Tuomas Tynkkynen [Mon, 5 Mar 2018 21:20:41 +0000 (23:20 +0200)]
ARM: qemu-arm: Increase CONFIG_SYS_CBSIZE

CONFIG_SYS_CBSIZE determines the maximum length of the kernel command
line, and the default value of 256 is too small for booting some Linux
images in the wild.

Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
6 years agoimx: syscounter: make sure asm is volatile
Yasushi SHOJI [Thu, 8 Mar 2018 04:21:10 +0000 (13:21 +0900)]
imx: syscounter: make sure asm is volatile

Without the volatile attribute, compilers are entitled to optimize out
the same asm().  In the case of __udelay() in syscounter.c, it calls
`get_ticks()` twice, one for the starting time and the second in the
loop to check the current time.  When compilers inline `get_ticks()`
they see the same `mrrc` instructions and optimize out the second one.
This leads to infinite loop since we don't get updated value from the
system counter.

Here is a portion of the disassembly of __udelay:

  88: 428b       cmp r3, r1
  8a: f8ce 20a4  str.w r2, [lr, #164] ; 0xa4
  8e: bf08       it eq
  90: 4282       cmpeq r2, r0
  92: f8ce 30a0  str.w r3, [lr, #160] ; 0xa0
  96: d3f7       bcc.n 88 <__udelay+0x88>
  98: e8bd 8cf0  ldmia.w sp!, {r4, r5, r6, r7, sl, fp, pc}

Note that final jump / loop at 96 to 88, we don't have any `mrrc`.

With a volatile attribute, the above changes to this:

  8a: ec53 2f0e  mrrc 15, 0, r2, r3, cr14
  8e: 42ab       cmp r3, r5
  90: f8c1 20a4  str.w r2, [r1, #164] ; 0xa4
  94: bf08       it eq
  96: 42a2       cmpeq r2, r4
  98: f8c1 30a0  str.w r3, [r1, #160] ; 0xa0
  9c: d3f5       bcc.n 8a <__udelay+0x8a>
  9e: e8bd 8cf0  ldmia.w sp!, {r4, r5, r6, r7, sl, fp, pc}
  a2: bf00       nop

I'm advised[1] to put volatile on all asm(), so this commit also adds it
to the asm() in timer_init().

[1]: https://lists.denx.de/pipermail/u-boot/2018-March/322062.html

Signed-off-by: Yasushi SHOJI <yasushi.shoji@gmail.com>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
6 years agoimximage: Remove failure when no IVT offset is found
Fabio Estevam [Fri, 9 Mar 2018 11:25:00 +0000 (08:25 -0300)]
imximage: Remove failure when no IVT offset is found

Sometimes imximage throws the following error:

  CFGS    board/freescale/vf610twr/imximage.cfg.cfgtmp
  CFGS    board/freescale/vf610twr/imximage.cfg.cfgtmp
  MKIMAGE u-boot-dtb.imx
Error: No BOOT_FROM tag in board/freescale/vf610twr/imximage.cfg.cfgtmp
arch/arm/mach-imx/Makefile:100: recipe for target 'u-boot-dtb.imx' failed

Later on, when running mkimage for the u-boot.imx it will succeed in
finding the IVT offset.

Looks like some race condition happening during parallel build when
processing mkimage for u-boot-dtb.imx and u-boot.imx.

A proper fix still needs to be implemented, but as a workaround let's
remove the error when the IVT offset is not found.

It is useful to have such message, especially during bring-up phase,
but the build error that it causes is severe, so better avoid the
build error for now.

The error checking can be re-implemented later when we have a proper
fix.

Reported-by: Breno Lima <breno.lima@nxp.com>
Reported-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
6 years agovideo: indicate code page of bitmap fonts
Heinrich Schuchardt [Fri, 2 Mar 2018 19:50:17 +0000 (20:50 +0100)]
video: indicate code page of bitmap fonts

Add comments clarifying that the bitmap fonts support code page 437.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
6 years agopwm-backlight: make power-supply as option
Kever Yang [Fri, 9 Feb 2018 02:45:12 +0000 (10:45 +0800)]
pwm-backlight: make power-supply as option

Some pwm backlight may not need 'power-supply', let's make it as option
in pwm-backlight driver.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
6 years agodm: video: support increased intensity (bold)
Heinrich Schuchardt [Thu, 8 Feb 2018 20:47:12 +0000 (21:47 +0100)]
dm: video: support increased intensity (bold)

Support special rendition code 0 - reset attributes.
Support special rendition code 1 - increased intensity (bold).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agodm: video: use constants to refer to colors
Heinrich Schuchardt [Thu, 8 Feb 2018 20:47:11 +0000 (21:47 +0100)]
dm: video: use constants to refer to colors

Use constants to refer to colors.
Adjust initialization of foreground and background color to avoid
setting reserved bits.
Consistently u32 instead of unsigned for color bit mask.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agodm: video: correctly clean background in 16bit mode
Heinrich Schuchardt [Thu, 8 Feb 2018 20:47:10 +0000 (21:47 +0100)]
dm: video: correctly clean background in 16bit mode

In 16 bit mode we have to copy two bytes per pixels repeatedly and not
four. Otherwise we will see a striped pattern.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agodm: video: show correct colors in graphical console
Heinrich Schuchardt [Thu, 8 Feb 2018 20:47:09 +0000 (21:47 +0100)]
dm: video: show correct colors in graphical console

Get RGB sequence in pixels right (swap blue and red).
Do not set reserved bits.

qemu-system-i386 -display sdl -vga virtio and
qemu-system-i386 -display sdl -vga cirrus
now display the similar colors (highlighting still missing) as
qemu-system-i386 -nographic

Testing is possible via

setenv efi_selftest test output
bootefi selftest

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agoPrepare v2018.03-rc4 v2018.03-rc4
Tom Rini [Tue, 6 Mar 2018 01:27:08 +0000 (20:27 -0500)]
Prepare v2018.03-rc4

Signed-off-by: Tom Rini <trini@konsulko.com>
6 years agoMerge git://git.denx.de/u-boot-sh
Tom Rini [Tue, 6 Mar 2018 01:24:17 +0000 (20:24 -0500)]
Merge git://git.denx.de/u-boot-sh

6 years agoDevboards.de DBM-SoC1 BOARD: Add S line
Tom Rini [Mon, 5 Mar 2018 15:20:46 +0000 (10:20 -0500)]
Devboards.de DBM-SoC1 BOARD: Add S line

This was missing the 'S' line causing a warning from genboardscfg.py

Signed-off-by: Tom Rini <trini@konsulko.com>
6 years agoARM: DTS: Re-sync logicpd-som-lv with Linux 4.16-rc3
Adam Ford [Mon, 5 Mar 2018 10:16:33 +0000 (04:16 -0600)]
ARM: DTS: Re-sync logicpd-som-lv with Linux 4.16-rc3

This should clean up a warning about a missing phy-cells

Signed-off-by: Adam Ford <aford173@gmail.com>
6 years agoMAINTAINERS: bring sections into alphabetic order
Heinrich Schuchardt [Mon, 5 Mar 2018 07:15:51 +0000 (08:15 +0100)]
MAINTAINERS: bring sections into alphabetic order

POWER should be after ONENAND

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
6 years agoscripts/spelling.txt: Sync script with kernel 4.16-rc4
Fabio Estevam [Mon, 5 Mar 2018 01:55:19 +0000 (22:55 -0300)]
scripts/spelling.txt: Sync script with kernel 4.16-rc4

Keep spelling.txt in sync with the version from kernel 4.16-rc4.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
6 years agoomap3_logic: Remove unnecessary undefs
Adam Ford [Sun, 4 Mar 2018 21:05:38 +0000 (15:05 -0600)]
omap3_logic: Remove unnecessary undefs

Due to evolution of the MMC driver and better support, let's
remove unnecessary undefs.

Signed-off-by: Adam Ford <aford173@gmail.com>
6 years agoti_armv7_omap: Remove comment remnant
Adam Ford [Sun, 4 Mar 2018 20:54:15 +0000 (14:54 -0600)]
ti_armv7_omap: Remove comment remnant

With the migration to Kconfig, the I2C block no longer exists in here.
Let's clean up the comment.

Signed-off-by: Adam Ford <aford173@gmail.com>
6 years agoMPC8315ERDB: Enable DHCP support
Ed Bartosh [Sun, 4 Mar 2018 18:17:52 +0000 (19:17 +0100)]
MPC8315ERDB: Enable DHCP support

Enable DHCP support for this board.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Marek Vasut <marex@denx.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
6 years agolibfdt: move headers to <linux/libfdt.h> and <linux/libfdt_env.h>
Masahiro Yamada [Sun, 4 Mar 2018 16:20:11 +0000 (01:20 +0900)]
libfdt: move headers to <linux/libfdt.h> and <linux/libfdt_env.h>

Thomas reported U-Boot failed to build host tools if libfdt-devel
package is installed because tools include libfdt headers from
/usr/include/ instead of using internal ones.

This commit moves the header code:
  include/libfdt.h         -> include/linux/libfdt.h
  include/libfdt_env.h     -> include/linux/libfdt_env.h

and replaces include directives:
  #include <libfdt.h>      -> #include <linux/libfdt.h>
  #include <libfdt_env.h>  -> #include <linux/libfdt_env.h>

Reported-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
6 years agotools: Include U-Boot libfdt headers from their actual path
Paul Kocialkowski [Fri, 2 Mar 2018 22:13:42 +0000 (23:13 +0100)]
tools: Include U-Boot libfdt headers from their actual path

There are no headers for libfdt in lib/libfdt, as they are instead
located in scripts/dtc/libfdt. Specifying lib/libfdt for headers
inclusion in host tools results in using the system libfdt headers,
which is not what we want. Change this to the proper path.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
6 years agoinput: indicate that code page 437 is used
Heinrich Schuchardt [Fri, 2 Mar 2018 20:11:35 +0000 (21:11 +0100)]
input: indicate that code page 437 is used

Add a comment indicating that the German key map assumes code page 437.

Add support for character ² (square sign) in the German key map.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
6 years agopinctrl: Kconfig: Fix typo
Marek Behún [Fri, 2 Mar 2018 08:56:00 +0000 (09:56 +0100)]
pinctrl: Kconfig: Fix typo

Signed-off-by: Marek Behun <marek.behun@nic.cz>
6 years agogpio: pca953x_gpio: Support label setting from DT
Mario Six [Thu, 1 Mar 2018 13:45:04 +0000 (14:45 +0100)]
gpio: pca953x_gpio: Support label setting from DT

The PCA953x driver uses "gpio@%x_" as the GPIO bank name, where "%x" is
instantiated with the I2C address of the chip. While this works, it
becomes very confusing if a board has multiple PCAs with the same
address on different I2C busses, and it also becomes an issue when a
GPIO's value is to be set via the 'gpio' command, because this command
only ever sets the value of the first device it encounters, leaving the
other devices inaccessible to the command.

As to not break boards that rely on this naming scheme, we introduce a
new device tree string property "label" for the driver. If it exists, it
is used to build a bank name of the form "%s@%x_" (where %x is still
instantiated with the I2C address). If it does not exist, the legacy
labeling scheme is used.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
6 years agospl: Kconfig: Rename SPL_USBETH_SUPPORT to SPL_USB_ETHER to match with the U-boot...
Faiz Abbas [Fri, 16 Feb 2018 15:47:44 +0000 (21:17 +0530)]
spl: Kconfig: Rename SPL_USBETH_SUPPORT to SPL_USB_ETHER to match with the U-boot CONFIG

Rename CONFIG_SPL_USBETH_SUPPORT to CONFIG_SPL_USB_ETHER.

This enables users to block text using CONFIG_IS_ENABLED() instead
of resorting to #if ladders with SPL and non-SPL cases.

Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
6 years agotools/env: allow equal sign as key value separation
Stefan Agner [Thu, 1 Mar 2018 13:06:32 +0000 (14:06 +0100)]
tools/env: allow equal sign as key value separation

Treat the first equal sign as a key/value separation too. This makes
the script files compatible with mkenvimage input file format. It
won't support variables with equal signs anymore, but this seems not
really like a loss.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
6 years agoAtmel TPM: Fix potential buffer overruns
Jeremy Boone [Mon, 12 Feb 2018 22:56:37 +0000 (17:56 -0500)]
Atmel TPM: Fix potential buffer overruns

Ensure that the Atmel TPM driver performs sufficient
validation of the length returned in the TPM response header.
This patch prevents memory corruption if the header contains a
length value that is larger than the destination buffer.

Signed-off-by: Jeremy Boone <jeremy.boone@nccgroup.trust>
6 years agoInfineon TPM: Fix potential buffer overruns
Jeremy Boone [Mon, 12 Feb 2018 22:56:36 +0000 (17:56 -0500)]
Infineon TPM: Fix potential buffer overruns

Ensure that the Infineon I2C and SPI TPM driver performs adequate
validation of the length extracted from the TPM response header.
This patch prevents integer underflow when the length was too small,
which could lead to memory corruption.

Signed-off-by: Jeremy Boone <jeremy.boone@nccgroup.trust>
6 years agoSTMicro TPM: Fix potential buffer overruns
Jeremy Boone [Mon, 12 Feb 2018 22:56:35 +0000 (17:56 -0500)]
STMicro TPM: Fix potential buffer overruns

This patch prevents integer underflow when the length was too small,
which could lead to memory corruption.

Signed-off-by: Jeremy Boone <jeremy.boone@nccgroup.trust>
6 years agoARM: dts: rmobile: Add PHY reset GPIO
Marek Vasut [Fri, 15 Sep 2017 19:11:40 +0000 (21:11 +0200)]
ARM: dts: rmobile: Add PHY reset GPIO

This patch got dropped during the update of DTs to 4.14, re-add it
back. This adds reset GPIOs to the ethernet PHYs.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agoARM: dts: rmobile: Make PFC and RST available early on Gen2 only
Marek Vasut [Mon, 5 Mar 2018 09:57:40 +0000 (10:57 +0100)]
ARM: dts: rmobile: Make PFC and RST available early on Gen2 only

These do not need to be available early on Gen3 , so move them to
the respective DT files.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agoARM: rmobile: Add R8A77965 Salvator-XS board support
Marek Vasut [Mon, 26 Feb 2018 09:35:15 +0000 (10:35 +0100)]
ARM: rmobile: Add R8A77965 Salvator-XS board support

Add R8A77965 M3N Salvator-XS development kit support. This kit is
similar to the other Salvator-X(S) ones, except is has M3N SoC on
it.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agoARM: dts: rmobile: Add SDHI nodes to R8A77965 M3N DT
Marek Vasut [Thu, 1 Mar 2018 20:52:19 +0000 (21:52 +0100)]
ARM: dts: rmobile: Add SDHI nodes to R8A77965 M3N DT

Add SDHI nodes to r8a77965.dtsi to get eMMC and SD slots operational.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agoARM: dts: rmobile: Add xHCI node to R8A77965 M3N DT
Marek Vasut [Thu, 1 Mar 2018 20:51:11 +0000 (21:51 +0100)]
ARM: dts: rmobile: Add xHCI node to R8A77965 M3N DT

Add xHCI node to r8a77965.dtsi to get xHCI USB operational.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agoARM: dts: rmobile: Add EHCI nodes to R8A77965 M3N DT
Marek Vasut [Thu, 1 Mar 2018 20:51:05 +0000 (21:51 +0100)]
ARM: dts: rmobile: Add EHCI nodes to R8A77965 M3N DT

Add generic EHCI nodes to r8a77965.dtsi to get EHCI USB operational.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agoARM: dts: rmobile: Add RAVB node to R8A77965 M3N DT
Marek Vasut [Thu, 1 Mar 2018 20:50:56 +0000 (21:50 +0100)]
ARM: dts: rmobile: Add RAVB node to R8A77965 M3N DT

Add RAVB node to r8a77965.dtsi to get ethernet operational.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agoARM: dts: rmobile: Import R8A77965 M3N DT files from Linux
Marek Vasut [Mon, 26 Feb 2018 09:35:15 +0000 (10:35 +0100)]
ARM: dts: rmobile: Import R8A77965 M3N DT files from Linux

Import the R8A77965 M3N DT from Linux 4.16-rc1 .

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agousb: xhci-rcar: Add R8A77965 M3N entries
Marek Vasut [Mon, 26 Feb 2018 09:35:15 +0000 (10:35 +0100)]
usb: xhci-rcar: Add R8A77965 M3N entries

Add entries for the R8A77965 M3N SoC.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>