Commit Graph

49066 Commits

Author SHA1 Message Date
Bryan O'Donoghue
f25006b96e optee: Add CONFIG_OPTEE_LOAD_ADDR
CONFIG_OPTEE_LOAD_ADDR is used to tell u-boot where to load the OPTEE
binary into memory prior to handing off control to OPTEE.

We need to pull this value out of u-boot in order to produce an IMX IVT/CSF
signed pair for the purposes of secure boot. The best way to do that is to
have CONFIG_OPTEE_LOAD_ADDR appear in u-boot.cfg.

Adding new CONFIG entires to u-boot should be kconfig driven so this patch
does just that.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Reviewed-by: Ryan Harkin <ryan.harkin@linaro.org>
2018-03-19 16:14:24 -04:00
Bryan O'Donoghue
35499baf3b optee: Add CONFIG_OPTEE_TZDRAM_BASE
OPTEE is currently linked to a specific area of memory called the TrustZone
DRAM. This patch adds a CONFIG entry for the default address of TrustZone
DRAM that a board-port can over-ride. The region that U-Boot sets aside for
the OPTEE run-time should be verified before attempting to hand off to the
OPTEE run-time. Each board-port should carefully ensure that the TZDRAM
address specified in the OPTEE build and the TZDRAM address specified in
U-Boot match-up.

Further patches will use TZDRAM address with other defines and variables to
carry out a degree of automated verification in U-Boot prior to trying to
boot an OPTEE image.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Cc: Harinarayan Bhatta <harinarayan@ti.com>
Cc: Andrew F. Davis <afd@ti.com>
Cc: Tom Rini <trini@konsulko.com>
Cc: Kever Yang <kever.yang@rock-chips.com>
Cc: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2018-03-19 16:14:24 -04:00
Bryan O'Donoghue
d89a5aa6d0 optee: Add CONFIG_OPTEE_TZDRAM_SIZE
OPTEE is currently linked to a specific area of memory called the TrustZone
DRAM. This patch adds a CONFIG entry for the default size of TrustZone DRAM
that a board-port can over-ride. The region that U-Boot sets aside for the
OPTEE run-time should be verified before attempting to hand off to the
OPTEE run-time. Each board-port should carefully ensure that the TZDRAM
size specified in the OPTEE build and the TZDRAM size specified in U-Boot
match-up.

Further patches will use TZDRAM size with other defines and variables to
carry out a degree of automated verification in U-Boot prior to trying to
boot an OPTEE image.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Cc: Harinarayan Bhatta <harinarayan@ti.com>
Cc: Andrew F. Davis <afd@ti.com>
Cc: Tom Rini <trini@konsulko.com>
Cc: Kever Yang <kever.yang@rock-chips.com>
Cc: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Cc: Peng Fan <peng.fan@nxp.com>
Tested-by: Peng Fan <peng.fan@nxp.com>
2018-03-19 16:14:23 -04:00
Bryan O'Donoghue
32ce6179fb optee: Add lib entries for sharing OPTEE code across ports
This patch adds code to lib to enable sharing of useful OPTEE code between
board-ports and architectures. The code on lib/optee/optee.c comes from the
TI omap2 port. Eventually the OMAP2 code will be patched to include the
shared code. The intention here is to add more useful OPTEE specific code
as more functionality gets added.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Cc: Harinarayan Bhatta <harinarayan@ti.com>
Cc: Andrew F. Davis <afd@ti.com>
Cc: Tom Rini <trini@konsulko.com>
Cc: Kever Yang <kever.yang@rock-chips.com>
Cc: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Cc: Peng Fan <peng.fan@nxp.com>
Tested-by: Peng Fan <peng.fan@nxp.com>
2018-03-19 16:14:23 -04:00
Stefan Roese
5cf32518ea MAINTAINERS: Remove unused ppc4xx entry
ppc4xx support was removed some time ago. Lets remove the now unused
entry in MAINTAINERS as well.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>
2018-03-19 16:14:23 -04:00
Stefan Roese
ed68ccbf42 pci: Remove unused ppc4xx variable from struct pci_controller
ppc4xx support was removed some time ago. Lets remove the now unused
"pci_fb" variable from "struct pci_controller" as well.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Bin Meng <bmeng.cn@gmail.com>
Cc: Simon Glass <sjg@chromium.org>
2018-03-19 16:14:23 -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
f8598d9815 board: st: add generic board for STM32MP1 family
Add first support for STM32MP157C-ED1 board with "Basic" boot chain
1/ Boot Rom: load SPL with STM32 image header in SYSRAM
2/ SPL: power up and initialize the DDR and load U-Boot image
        from SDCARD in DDR
3/ U-Boot: search and load extlinux.conf in SDCARD
           (DISTRO activated)

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2018-03-19 16:14:22 -04:00
Patrick Delaunay
3d2d115a30 dts: add device tree for STM32MP157C-ED1 board
Add minimal devicetree for STM32MP157C-ED1 board,
with only the devices to allow boot from SDCARD:
- RCC for clock and reset
- UART4 for console
- I2C and PMIC
- DDR
- SDMMC0 for SDCard

Waiting Kernel upstream for alignment.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2018-03-19 16:14:22 -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
77aace579a arm: armv7: solve issue for timer_rate_hz in arch timer
The current value timer_rate_hz causes a problem with function
timer_get_us() from lib time and then an issue with
readx_poll_timeout() function.

With corrected value for tbclk() = timer_rate_hz = CONFIG_SYS_HZ_CLOCK
the weak functions in lib timer can be used:
- get_timer()
- __udelay()
So the specific function in this file are removed.

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
Patrick Delaunay
81260e3331 tools/mkimage: add support for STM32 image format
STM32MP157 bootrom needs a specific header for first boot stage.
This patch adds support of this header in mkimage.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2018-03-19 16:14:19 -04:00
Alex Kiernan
dbc3432379 tools: env: Implement atomic replace for filesystem
If the U-Boot environment is stored in a regular file and redundant
operation isn't set, then write to a temporary file and perform an
atomic rename.

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
2018-03-19 16:14:19 -04:00
Alex Kiernan
899b5338fa tools: env: Refactor write path of flash_io()
Extract write path of flash_io() into a separate function. This patch
should be a functional no-op.

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Reviewed-by: Stefano Babic <sbabic@denx.de>
2018-03-19 16:14:19 -04:00
Alex Kiernan
2deb3cac08 tools: env: Fix CamelCasing style violation
Replace HaveRedundEnv with have_redund_env to fix style violation.

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
2018-03-19 16:14:19 -04:00
Alex Kiernan
c7f52c4b6e tools: env: Pass through indent
Pass tools/env/fw_env.c through indent to correct style violations. This
commit consists of only one non-whitespace change:

  tools/env/fw_env.c:549: error: do not use assignment in if condition

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
2018-03-19 16:14:19 -04:00
Jun Nie
5c643db4cc SPL: Add signature verification when loading image
U-boot proper signature is not verified by SPL on most platforms
even config SPL_FIT_SIGNATURE is enabled. Only fsl-layerscape
platform support secure boot in platform specific code. So
verified boot cannot be achieved if u-boot proper is loaded by
SPL.

This patch add signature verification to u-boot proper images
when loading FIT image in SPL. It is tested on Allwinner bananapi
zero board with H2+ SoC.

Signed-off-by: Jun Nie <jun.nie@linaro.org>
2018-03-19 09:59:32 -04:00
Tom Rini
50905b55c7 Merge git://git.denx.de/u-boot-video 2018-03-19 09:56:34 -04:00
yannick fertre
cc1b0e7b8e board: Add display to STM32F746 SoC discovery board
Signed-off-by: yannick fertre <yannick.fertre@st.com>
2018-03-19 11:01:43 +01:00
yannick fertre
92eac5848f stm32f7: board: add splash screen
Support several pixel format (8bits, 16bits, 24bits & 32bits).
Add new file st_logo_data.h which contains logo
stmicroelectronics_uboot_logo_8bit_rle.bmp.

Signed-off-by: yannick fertre <yannick.fertre@st.com>
2018-03-19 11:01:04 +01:00
yannick fertre
455141636f arm: dts: stm32: add display for STM32F746 disco board
Enable the display controller, panel & backlight.
Set panel display timings & set the RGB data bus.

Signed-off-by: yannick fertre <yannick.fertre@st.com>
2018-03-19 11:00:23 +01:00
Philippe CORNU
0e75aa4d1d arm: dts: stm32: add ltdc for STM32F746
Add display controller node in device-tree.

Signed-off-by: yannick fertre <yannick.fertre@st.com>
[agust: rebased on master]
Signed-off-by: Anatolij Gustschin <agust@denx.de>
2018-03-19 10:58:16 +01:00
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
Patrick Delaunay
b8aa55cb64 common: move init_helpers.h prototypes in init.h
Merge init_helpers.h in the new file init.h
with only prototypes for init_cache_f_r
used in common/board_f.c

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2018-03-16 14:56:59 -04:00
Patrick Delaunay
fc22ee215a common: move board_info.c prototypes in init.h
Move function prototype for common/init/board_init.c
from common.h to init.h

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2018-03-16 14:56:59 -04:00
Patrick Delaunay
e2c219cd71 common: move board_r.c prototypes in init.h
Move function prototypes used in common/board_r.c
from common.h to init.h

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2018-03-16 14:56:59 -04:00
Patrick Delaunay
11f86cbaff common: move board_init.c prototypes in init.h
Move function prototypes for common/init/board_init.c
from common.h to init.h

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2018-03-16 14:56:00 -04:00
Patrick Delaunay
d6f8771239 common: move board_f.c prototypes in init.h
Move prototypes for function used in common/board_f.c
from common.h to init.h
Remove weak for arch_reserve_stacks in prototype
(checkpatch issue)

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2018-03-16 14:56:00 -04:00
Michal Simek
71b7564479 ppc: Remove orphan xilinx_irq.h file
This file is completely unused and it should be removed as the part of
ppc405/ppc440 xilinx platform removal.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2018-03-16 14:54:14 -04:00
Heinrich Schuchardt
02c5e891a3 MAINTAINERS: TI SYSTEM SECURITY: remove invalid file
Remove a link to a non-existent file.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Acked-by: Andrew F. Davis <afd@ti.com>
2018-03-16 14:54:14 -04:00
Heinrich Schuchardt
c133915eb2 MAINTAINERS: ARM TI: remove invalid paths
Remove non-existing paths.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2018-03-16 14:54:14 -04:00
Heinrich Schuchardt
cbc4423e87 MAINTAINERS: ARM SAMSUNG: remove invalid paths
Remove non-existing directories.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Acked-by: Minkyu Kang <mk7.kang@samsung.com>
2018-03-16 14:54:14 -04:00