[U-Boot] [PATCH 1/2] i2c: lpi2c: do not add 4 for bus seq

2018-01-02 Thread Peng Fan
The number 4 is dedicated on i.MX7ULP, but lpi2c will be reused on i.MX8, 4 is not valid. The seq number could be configured by alias node. The following patch will use i2c4 as the begin for i.MX7ULP. Signed-off-by: Peng Fan --- drivers/i2c/imx_lpi2c.c | 8 1 file changed, 4 insertions

[U-Boot] [PATCH 2/2] imx: mx7ulp: modify lpi2c seq number

2018-01-02 Thread Peng Fan
Modify the lpi2c alias seq number to align with device. Then no need to add 4 to get the device index. Signed-off-by: Peng Fan --- arch/arm/dts/imx7ulp.dtsi | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm/dts/imx7ulp.dtsi b/arch/arm/dts/imx7ulp.dtsi index 549

[U-Boot] [PATCH] misc: mxc_ocotp: check fuse word before programming on i.MX7ULP

2018-01-02 Thread Peng Fan
On i.MX7ULP, the fuse words (except bank 0 and 1) only supports to write once, because they use ECC mode. Multiple writes may damage the ECC value and cause a wrong fuse value decoded when reading. This patch adds a checking before the fuse word programming, only can write when the word value is 0.

Re: [U-Boot] [PATCH 09/13] board: ti: am574x-idk: Add ddr data support

2018-01-02 Thread Lukasz Majewski
Hi Lokesh, > Hi Lukas, > > Sorry for the delayed response. No problem :-). Happy new year :-) > > On Tuesday 19 December 2017 03:04 PM, Lukasz Majewski wrote: > > Hi Lokesh, > > > >> Hi Lukas, > >> > >> On Monday 18 December 2017 04:46 PM, Lukasz Majewski wrote: > >>> Hi Lokesh, > >>>

[U-Boot] [PATCH] mmc: fsl_esdhc: Fix eMMC 1.8v setting issue

2018-01-02 Thread Peng Fan
Current USDHC driver will reset VSELECT to 0 (3.3v) during mmc init, then set to 1 for 1.8v eMMC I/O. When booting from eMMC, since ROM has already set VSELECT to 1.8v before running the u-boot. This reset in USDHC driver causes a short 2.2v pulse on CMD pin. Fix this issue by not reset VSELECT to

Re: [U-Boot] [PATCH] wait_bit: add big endian version of wait_for_bit function

2018-01-02 Thread Álvaro Fernández Rojas
Hello Tom, El 01/01/2018 a las 14:41, Tom Rini escribió: On Sat, Dec 30, 2017 at 11:12:36AM +0100, Álvaro Fernández Rojas wrote: The only difference with the existing wait_for_bit function is the fact that wait_for_bit_be expects the register size to be read. Signed-off-by: Álvaro Fernández

Re: [U-Boot] [PATCH v10 00/27] dm: Generic MTD Subsystem, with SPI-NOR interface

2018-01-02 Thread Jagan Teki
On Thu, Dec 28, 2017 at 8:14 PM, Lukasz Majewski wrote: > Hi Jagan, > >> Compared to previous series’s [1], [2], [3] and [4] this patch set >> redefined most of the implementation suitable to fit into existing >> driver-model. >> >> MTD is generic subsystem for underlying flash devices like nand,

Re: [U-Boot] [PATCH 0/3][v2] sf: Update spi-nor framework

2018-01-02 Thread Jagan Teki
On Fri, Dec 29, 2017 at 6:05 PM, Prabhakar Kushwaha wrote: > Hi Jagan, > > >> -Original Message- >> From: Prabhakar Kushwaha [mailto:prabhakar.kushw...@nxp.com] >> Sent: Thursday, December 21, 2017 5:43 PM >> To: u-boot@lists.denx.de >> Cc: jagannadh.t...@gmail.com; Poonam Aggrwal >> ; Sur

Re: [U-Boot] [PATCH] Revert "Kconfig: mx6ull: Deselect MX6UL from CONFIG_MX6ULL"

2018-01-02 Thread Fabio Estevam
Hi Peng, On Tue, Jan 2, 2018 at 4:15 AM, Peng Fan wrote: > 6ULL reuses as much as possible code from 6UL. Removing > the selection will cause 6ULL could not boot up. So revert it. > > This reverts commit 051ba9e082f71f4709c32a69378192ca8964ca50. > > Signed-off-by: Peng Fan I sent a fix for this

Re: [U-Boot] [PATCH v10 03/27] mtd: add SPI-NOR core support

2018-01-02 Thread Prabhakar Kushwaha
Hi Jagan, > -Original Message- > From: U-Boot [mailto:u-boot-boun...@lists.denx.de] On Behalf Of Jagan Teki > Sent: Thursday, December 28, 2017 11:42 AM > To: u-boot@lists.denx.de > Cc: Tom Rini > Subject: [U-Boot] [PATCH v10 03/27] mtd: add SPI-NOR core support > > Some of the SPI devi

Re: [U-Boot] [PATCH v10 03/27] mtd: add SPI-NOR core support

2018-01-02 Thread Jagan Teki
On Tue, Jan 2, 2018 at 3:48 PM, Prabhakar Kushwaha wrote: > Hi Jagan, > > >> -Original Message- >> From: U-Boot [mailto:u-boot-boun...@lists.denx.de] On Behalf Of Jagan Teki >> Sent: Thursday, December 28, 2017 11:42 AM >> To: u-boot@lists.denx.de >> Cc: Tom Rini >> Subject: [U-Boot] [PAT

Re: [U-Boot] [PATCH 4/7] pci: imx: request gpio before use

2018-01-02 Thread Fabio Estevam
On Mon, Jan 1, 2018 at 11:32 PM, Peng Fan wrote: > Before use GPIO, we need to request gpio first. > > Signed-off-by: Peng Fan > Cc: Stefano Babic > Cc: Fabio Estevam > --- > drivers/pci/pcie_imx.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/pci/pcie_imx.c b/drivers/pci/

Re: [U-Boot] [PATCH 4/7] pci: imx: request gpio before use

2018-01-02 Thread Peng Fan
> -Original Message- > From: Fabio Estevam [mailto:feste...@gmail.com] > Sent: Tuesday, January 02, 2018 6:34 PM > To: Peng Fan > Cc: Stefano Babic ; U-Boot-Denx ; > Fabio Estevam > Subject: Re: [U-Boot] [PATCH 4/7] pci: imx: request gpio before use > > On Mon, Jan 1, 2018 at 11:32 PM,

[U-Boot] [PATCH V2] pci: imx: request gpio before use

2018-01-02 Thread Peng Fan
Before use GPIO, we need to request gpio first. Free gpio after use. Signed-off-by: Peng Fan Cc: Stefano Babic Cc: Fabio Estevam --- V2: Typo fix. Free gpio after use. drivers/pci/pcie_imx.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/pci/pcie_imx.c b/drivers/pci/pcie_i

Re: [U-Boot] [PATCH v2] mx6ull: Handle the CONFIG_MX6ULL cases correctly

2018-01-02 Thread Breno Matheus Lima
Hi Fabio, 2018-01-01 22:16 GMT-02:00 Fabio Estevam : > From: Fabio Estevam > > Since commit 051ba9e082f7 ("Kconfig: mx6ull: Deselect MX6UL from > CONFIG_MX6ULL") CONFIG_MX6ULL does not select CONFIG_MX6UL anymore, so > take this into consideration in all the checks for CONFIG_MX6UL. > > Reported-

[U-Boot] [PATCH] boards: amlogic: khadas-vim: Typo fixup

2018-01-02 Thread Neil Armstrong
Khadas VIM is an Open Source DIY Box manufactured by Shenzhen Wesion NOT 'Tomato' The fix was provided by Khadas Team member 'numbqq'. Signed-off-by: Neil Armstrong --- board/amlogic/khadas-vim/README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/board/amlogic/khadas-vim/

Re: [U-Boot] [PATCH] boards: amlogic: khadas-vim: Typo fixup

2018-01-02 Thread Tom Rini
On Tue, Jan 02, 2018 at 01:34:59PM +0100, Neil Armstrong wrote: > Khadas VIM is an Open Source DIY Box manufactured by Shenzhen Wesion NOT > 'Tomato' > > The fix was provided by Khadas Team member 'numbqq'. > > Signed-off-by: Neil Armstrong Applied to u-boot/master, thanks! -- Tom signatu

Re: [U-Boot] [PATCH v3 00/25] Fix and extend i.MX HAB layer

2018-01-02 Thread Breno Matheus Lima
Hi Bryan, 2017-12-29 23:08 GMT-02:00 Bryan O'Donoghue : > v3: > - Only call into ROM if headers are verified. - Bryan > > - Print HAB event log if and only if a call was made to HAB > and a meaningful status code has been obtained. - Breno > > v2: > - Fix compilation warnings and errors in SPL h

[U-Boot] [PATCH V3] Convert CONFIG_SOC_DA8XX et al to Kconfig

2018-01-02 Thread Adam Ford
This converts the following to Kconfig: CONFIG_SOC_DA8XX CONFIG_SOC_DA850 CONFIG_DA850_LOWLEVEL CONFIG_MACH_DAVINCI_DA850_EVM CONFIG_SYS_DA850_PLL_INIT CONFIG_SYS_DA850_DDR_INIT Signed-off-by: Adam Ford --- Changes in V3: Add bool for DA850_LOWLEVEL and make it select DA

Re: [U-Boot] [PATCH] wait_bit: add big endian version of wait_for_bit function

2018-01-02 Thread Tom Rini
On Tue, Jan 02, 2018 at 10:37:31AM +0100, Álvaro Fernández Rojas wrote: > Hello Tom, > > > El 01/01/2018 a las 14:41, Tom Rini escribió: > >On Sat, Dec 30, 2017 at 11:12:36AM +0100, Álvaro Fernández Rojas wrote: > > > >>The only difference with the existing wait_for_bit function is the fact that

[U-Boot] [PATCH 1/1] efi_loader: fix StartImage bootservice

2018-01-02 Thread Heinrich Schuchardt
The calling convention for the entry point of an EFI image is always 'asmlinkage'. Signed-off-by: Heinrich Schuchardt --- lib/efi_loader/efi_boottime.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c index 4316f2

[U-Boot] [PATCH 1/1] MAINTAINERS: correct entry for lib/efi*/

2018-01-02 Thread Heinrich Schuchardt
lib/efi* indicates files efi* in directory lib. lib/efi*/ indicates all files in directories lib/efi*. Fixes: 623b3a579765 efi_selftest: provide an EFI selftest application Cc: Alexander Graf Signed-off-by: Heinrich Schuchardt --- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-

[U-Boot] [PATCH] mx6: Support SKS-Kinkel sksimx6 Board

2018-01-02 Thread Stefano Babic
Board has 1GB RAM and boots from SD Card U-Boot SPL 2018.01-rc3-5-ga1898b8 (Jan 02 2018 - 13:48:54) BT_FUSE_SEL already fused, will do nothing Trying to boot from MMC1 U-Boot 2018.01-rc3-5-ga1898b8 (Jan 02 2018 - 13:48:54 +0100) CPU: Freescale i.MX6DL rev1.2 996 MHz (running at 792 MH

Re: [U-Boot] [PATCH v3 2/2] Enable test case with A20-OLinuXino-Lime2

2018-01-02 Thread Stefan Mavrodiev
On 12/26/2017 11:47 AM, Jagan Teki wrote: On Fri, Dec 22, 2017 at 3:30 PM, Stefan Mavrodiev wrote: Driver testing is done with A20-OLinuXino-Lime2. Testing requirements are: - Exposing spi0 alternative pins in the dts file - Add alias node, enabling driver probing - Enable spi flash re

[U-Boot] How to specify new file size and CRC32 checksum for modified Linux Kernel Image?

2018-01-02 Thread A.W.C.
U-boot 2009.03 How to specify in U-boot file the new file size and CRC32 checksum for modified Linux Kernel Image? So that avoid Error message "Verifying Checksum ... Bad Data CRC"  when u-boot load linux kernel. Regards, Alex ___ U-Boot mailing list

[U-Boot] How to specify new file size and CRC32 checksum for modified Linux Kernel Image?

2018-01-02 Thread A.W.C.
U-boot 2009.03 How to specify in U-boot file the new file size and CRC32 checksum for modified Linux Kernel Image? So that avoid Error message "Verifying Checksum ... Bad Data CRC"  when u-boot load linux kernel. Regards, Alex ___ U-Boot mailing list

Re: [U-Boot] [PATCH V2] Convert CONFIG_USB_MUSB_OMAP2PLUS et al to Kconfig

2018-01-02 Thread Andrew F. Davis
On 12/29/2017 10:10 AM, Adam Ford wrote: > On Fri, Dec 29, 2017 at 10:04 AM, Andreas Färber wrote: >> Hi, >> >> Am 29.12.2017 um 16:52 schrieb Paul Kocialkowski: >>> Le vendredi 29 décembre 2017 à 08:16 -0600, Adam Ford a écrit : This converts the following to Kconfig: CONFIG_USB_MUSB

Re: [U-Boot] [PATCH V2] Convert CONFIG_USB_MUSB_OMAP2PLUS et al to Kconfig

2018-01-02 Thread Adam Ford
Thanks all. I was able to fix my script. For what it's worth if anyone wants to see how I was automating git send-email, I used: --cc-cmd='./scripts/get_maintainer.pl --nogit-fallback --norolestats xxx.patch' Adding the --nogit-fallback flag removed a lot of the people on the list. I'll use t

Re: [U-Boot] [PATCH V2] Convert CONFIG_USB_MUSB_OMAP2PLUS et al to Kconfig

2018-01-02 Thread Dr. Philipp Tomsich
> On 2 Jan 2018, at 15:35, Andreas Färber wrote: > > Am 02.01.2018 um 15:29 schrieb Andrew F. Davis: >> On 12/29/2017 10:10 AM, Adam Ford wrote: >>> On Fri, Dec 29, 2017 at 10:04 AM, Andreas Färber wrote: Hi, Am 29.12.2017 um 16:52 schrieb Paul Kocialkowski: > Le vendredi 29

Re: [U-Boot] [PATCH V2] Convert CONFIG_USB_MUSB_OMAP2PLUS et al to Kconfig

2018-01-02 Thread Andreas Färber
Am 02.01.2018 um 15:29 schrieb Andrew F. Davis: > On 12/29/2017 10:10 AM, Adam Ford wrote: >> On Fri, Dec 29, 2017 at 10:04 AM, Andreas Färber wrote: >>> Hi, >>> >>> Am 29.12.2017 um 16:52 schrieb Paul Kocialkowski: Le vendredi 29 décembre 2017 à 08:16 -0600, Adam Ford a écrit : > This co

[U-Boot] [PATCH v2 1/1] MAINTAINERS: correct entry for lib/efi*/

2018-01-02 Thread Heinrich Schuchardt
lib/efi* indicates files efi* in directory lib. lib/efi*/ indicates all files in directories lib/efi*. Fixes: 623b3a579765 efi_selftest: provide an EFI selftest application Cc: Alexander Graf Signed-off-by: Heinrich Schuchardt --- v2 rebase on http://git.denx.de/u-boot.git --- MAINTAINE

Re: [U-Boot] [PATCH 1/2] spi: fsl_qspi: support i.MX6UL/7D

2018-01-02 Thread Fabio Estevam
Hi Peng, On Tue, Jan 2, 2018 at 5:23 AM, Peng Fan wrote: > -#ifdef CONFIG_MX6SX > +#if defined(CONFIG_MX6SX) || defined(CONFIG_MX6UL) || defined(CONFIG_MX7D) Please add defined(CONFIG_MX6ULL) as well. ___ U-Boot mailing list U-Boot@lists.denx.de https

Re: [U-Boot] [PATCH v3 00/25] Fix and extend i.MX HAB layer

2018-01-02 Thread Bryan O'Donoghue
On 02/01/18 13:30, Breno Matheus Lima wrote: Hi Bryan, 2017-12-29 23:08 GMT-02:00 Bryan O'Donoghue : v3: - Only call into ROM if headers are verified. - Bryan - Print HAB event log if and only if a call was made to HAB and a meaningful status code has been obtained. - Breno v2: - Fix com

[U-Boot] [PATCH 1/3] Convert CONFIG_TWL4030_USB to Kconfig

2018-01-02 Thread Adam Ford
This converts the following to Kconfig: CONFIG_TWL4030_USB Signed-off-by: Adam Ford --- configs/cm_t35_defconfig | 1 + configs/igep0032_defconfig | 2 ++ configs/igep00x0_defconfig | 2 ++ configs/nokia_rx51_defconfig | 2 ++ configs/omap3_beagle_defconfig | 1

[U-Boot] [PATCH 2/3] Convert CONFIG_OMAP_USB_PHY to Kconfig

2018-01-02 Thread Adam Ford
This converts the following to Kconfig: CONFIG_OMAP_USB_PHY Signed-off-by: Adam Ford --- configs/am43xx_evm_defconfig | 1 + configs/am43xx_evm_ethboot_defconfig | 1 + configs/am43xx_evm_qspiboot_defconfig | 1 + configs/am43xx_evm_usbhost_boot_defconfig | 1 + configs/

[U-Boot] [PATCH 3/3] Convert CONFIG_ROCKCHIP_USB2_PHY to Kconfig

2018-01-02 Thread Adam Ford
This converts the following to Kconfig: CONFIG_ROCKCHIP_USB2_PHY Signed-off-by: Adam Ford --- configs/chromebit_mickey_defconfig | 1 + configs/chromebook_jerry_defconfig | 1 + configs/chromebook_minnie_defconfig | 1 + configs/evb-rk3288_defconfig| 1 + configs/fennec-rk3288_defco

[U-Boot] [PATCH v4 00/25] Fix and extend i.MX HAB layer

2018-01-02 Thread Bryan O'Donoghue
v4: - No change mixed extra patches @ v3 unnoticed with previous git-send v3: - Only call into ROM if headers are verified. - Bryan - Print HAB event log if and only if a call was made to HAB and a meaningful status code has been obtained. - Breno v2: - Fix compilation warnings and errors in

[U-Boot] [PATCH v4 04/25] arm: imx: hab: Optimise flow of authenticate_image on hab_entry fail

2018-01-02 Thread Bryan O'Donoghue
The current code disjoins an entire block of code on hab_entry pass/fail resulting in a large chunk of authenticate_image being offset to the right. Fix this by checking hab_entry() pass/failure and exiting the function directly if in an error state. Signed-off-by: Bryan O'Donoghue Cc: Stefano B

[U-Boot] [PATCH v4 02/25] arm: imx: hab: Fix authenticate_image result code

2018-01-02 Thread Bryan O'Donoghue
authenticate_image returns 1 for success and 0 for failure. That result code is mapped directly to the result code for the command line function hab_auth_img - which means when hab_auth_img succeeds it is returning CMD_RET_FAILURE (1) instead of CMD_RET_SUCCESS (0). This patch fixes this behaviour

[U-Boot] [PATCH v4 01/25] arm: imx: hab: Make authenticate_image return int

2018-01-02 Thread Bryan O'Donoghue
Both usages of authenticate_image treat the result code as a simple binary. The command line usage of authenticate_image directly returns the result code of authenticate_image as a success/failure code. Right now when calling hab_auth_img and test the result code in a shell a passing hab_auth_img

[U-Boot] [PATCH v4 08/25] arm: imx: hab: Fix authenticate image lockup on MX7

2018-01-02 Thread Bryan O'Donoghue
The i.MX6 has some pretty explicit code associated with informing the IROM about flushing caches during authenticate_image(). Looking at various pieces of documentation its pretty clear the i.MX6 IROM registers are not documented and absent similar documentation on the i.MX7 the next-best fix is t

[U-Boot] [PATCH v4 03/25] arm: imx: hab: Optimise flow of authenticate_image on is_enabled fail

2018-01-02 Thread Bryan O'Donoghue
There is no need to call is_enabled() twice in authenticate_image - it does nothing but add an additional layer of indentation. We can check for is_enabled() at the start of the function and return the result code directly. Signed-off-by: Bryan O'Donoghue Cc: Stefano Babic Cc: Fabio Estevam Cc

[U-Boot] [PATCH v4 11/25] arm: imx: hab: Verify IVT self matches calculated address

2018-01-02 Thread Bryan O'Donoghue
The IVT is a self-describing structure which contains a self field. The self field is the absolute physical base address the IVT ought to be at in memory. Use the IVT self field to validate the calculated ivt_addr bugging out if the two values differ. Signed-off-by: Bryan O'Donoghue Cc: Stefano B

[U-Boot] [PATCH v4 05/25] arm: imx: hab: Move IVT_SIZE to hab.h

2018-01-02 Thread Bryan O'Donoghue
The size of the IVT header should be defined in hab.h move it there now. Signed-off-by: Bryan O'Donoghue Cc: Stefano Babic Cc: Fabio Estevam Cc: Peng Fan Cc: Albert Aribaud Cc: Sven Ebenfeld Cc: George McCollister Cc: Breno Matheus Lima --- arch/arm/include/asm/mach-imx/hab.h | 2 ++ arch

[U-Boot] [PATCH v4 07/25] arm: imx: hab: Fix authenticate_image input parameters

2018-01-02 Thread Bryan O'Donoghue
u-boot command "hab_auth_img" tells a user that it takes - addr - image hex address - offset - hex offset of IVT in the image but in fact the callback hab_auth_img makes to authenticate_image treats the second 'offset' parameter as an image length. Furthermore existing code requires the IVT head

[U-Boot] [PATCH v4 10/25] arm: imx: hab: Add IVT header verification

2018-01-02 Thread Bryan O'Donoghue
The IVT header contains a magic number, fixed length and one of two version identifiers. Validate these settings before doing anything with a putative IVT binary. Signed-off-by: Bryan O'Donoghue Cc: Stefano Babic Cc: Fabio Estevam Cc: Peng Fan Cc: Albert Aribaud Cc: Sven Ebenfeld Cc: George

[U-Boot] [PATCH v4 09/25] arm: imx: hab: Add IVT header definitions

2018-01-02 Thread Bryan O'Donoghue
The various i.MX BootROMs containing the High Assurance Boot (HAB) block rely on a data structure called the Image Vector Table (IVT) to describe to the BootROM where to locate various data-structures used by HAB during authentication. This patch adds a definition of the IVT header for use in late

[U-Boot] [PATCH v4 20/25] arm: imx: hab: Prefix authenticate_image with imx_hab

2018-01-02 Thread Bryan O'Donoghue
Tidy up the HAB namespace a bit by prefixing external functions with imx_hab. All external facing functions past this point will be prefixed in the same way to make the fact we are doing IMX HAB activities clear from reading the code. authenticate_image() could mean anything imx_hab_authenticate_im

[U-Boot] [PATCH v4 23/25] arm: imx: hab: Define rvt_failsafe()

2018-01-02 Thread Bryan O'Donoghue
The hab_rvt_failsafe() callback according to the HABv4 documentation: "This function provides a safe path when image authentication has failed and all possible boot paths have been exhausted. It is intended for use by post-ROM boot stage components, via the ROM Vector Table." Once invoked the par

[U-Boot] [PATCH v4 19/25] arm: imx: hab: Make internal functions and data static

2018-01-02 Thread Bryan O'Donoghue
There is no need to export these functions and data structures externally. Make them all static now. Signed-off-by: Bryan O'Donoghue Cc: Stefano Babic Cc: Fabio Estevam Cc: Peng Fan Cc: Albert Aribaud Cc: Sven Ebenfeld Cc: George McCollister Cc: Breno Matheus Lima --- arch/arm/mach-imx/ha

[U-Boot] [PATCH v4 06/25] arm: imx: hab: Move CSF_PAD_SIZE to hab.h

2018-01-02 Thread Bryan O'Donoghue
CSF_PAD_SIZE should be defined in hab.h, move it to that location now. Signed-off-by: Bryan O'Donoghue Cc: Stefano Babic Cc: Fabio Estevam Cc: Peng Fan Cc: Albert Aribaud Cc: Sven Ebenfeld Cc: George McCollister Cc: Breno Matheus Lima --- arch/arm/include/asm/mach-imx/hab.h | 1 + arch/ar

[U-Boot] [PATCH v4 17/25] arm: imx: hab: Add a hab_rvt_check_target to image auth

2018-01-02 Thread Bryan O'Donoghue
Add a hab_rvt_check_target() step to authenticate_image() as a sanity check for the target memory region authenticate_image() will run over, prior to making the BootROM authentication callback itself. This check is recommended by the HAB documentation so it makes sense to adhere to the guidance an

[U-Boot] [PATCH v4 12/25] arm: imx: hab: Only call ROM once headers are verified

2018-01-02 Thread Bryan O'Donoghue
Previous patches added IVT header verification steps. We shouldn't call hab_rvt_entry() until we have done the basic header verification steps. This patch changes the time we make the hab_rvt_entry() call so that it only takes place if we are happy with the IVT header sanity checks. Signed-off-by

[U-Boot] [PATCH v4 24/25] arm: imx: hab: Implement hab_rvt_failsafe

2018-01-02 Thread Bryan O'Donoghue
This patch implements the basic callback hooks for hab_rvt_check_failsafe for BootROM code using the older BootROM address layout - in my test case the i.MX7. Code based on new BootROM callbacks will just do nothing and there's definitely a TODO to implement that extra functionality on the alternat

[U-Boot] [PATCH v4 15/25] arm: imx: hab: Define rvt_check_target()

2018-01-02 Thread Bryan O'Donoghue
The hab_rvt_check_target() callback according to the HABv4 documentation: "This function reports whether or not a given target region is allowed for either peripheral configuration or image loading in memory. It is intended for use by post-ROM boot stage components, via the ROM Vector Table, in

[U-Boot] [PATCH v4 13/25] arm: imx: hab: Print CSF based on IVT descriptor

2018-01-02 Thread Bryan O'Donoghue
The IVT gives the absolute address of the CSF. There is no requirement for the CSF to be located adjacent to the IVT so lets use the address provided in the IVT header instead of the hard-coded fixed CSF offset currently in place. Signed-off-by: Bryan O'Donoghue Cc: Stefano Babic Cc: Fabio Estev

[U-Boot] [PATCH v4 18/25] arm: imx: hab: Print HAB event log only after calling ROM

2018-01-02 Thread Bryan O'Donoghue
The current flow of authenticate_image() will print the HAB event log even if we reject an element of the IVT header before ever calling into the ROM. This can be confusing. This patch changes the flow of the code so that the HAB event log is only printed out if we have called into the ROM and rec

[U-Boot] [PATCH v4 16/25] arm: imx: hab: Implement hab_rvt_check_target

2018-01-02 Thread Bryan O'Donoghue
This patch implements the basic callback hooks for hab_rvt_check_target() for BootROM code using the older BootROM address layout - in my test case the i.MX7. Code based on new BootROM callbacks will just have HAB_SUCCESS as a result code. Adding support for the new BootROM callbacks is a TODO. Si

[U-Boot] [PATCH v4 25/25] arm: imx: hab: Add hab_failsafe console command

2018-01-02 Thread Bryan O'Donoghue
hab_failsafe when called puts the part into BootROM recovery mode. This will allow u-boot scripts to script the dropping down into recovery mode. => hab_failsafe Shows the i.MX7 appear as "hiddev0,hidraw5: USB HID v1.10 Device [Freescale SemiConductor Inc SP Blank ULT1] " in a Linux dmesg thus a

[U-Boot] [PATCH v4 14/25] arm: imx: hab: Print additional IVT elements during debug

2018-01-02 Thread Bryan O'Donoghue
This patch enables printout of the IVT entry, dcd and csf data fields. Signed-off-by: Bryan O'Donoghue Cc: Stefano Babic Cc: Fabio Estevam Cc: Peng Fan Cc: Albert Aribaud Cc: Sven Ebenfeld Cc: George McCollister Cc: Breno Matheus Lima --- arch/arm/mach-imx/hab.c | 2 ++ 1 file changed, 2

[U-Boot] [PATCH v4 22/25] arm: imx: hab: Make imx_hab_is_enabled global

2018-01-02 Thread Bryan O'Donoghue
It will be helpful to boot commands to know if the HAB is enabled. Export imx_hab_is_enabled() now to facilitate further work with this data-point in a secure-boot context. Signed-off-by: Bryan O'Donoghue Cc: Stefano Babic Cc: Fabio Estevam Cc: Peng Fan Cc: Albert Aribaud Cc: Sven Ebenfeld C

[U-Boot] [PATCH v4 21/25] arm: imx: hab: Rename is_hab_enabled imx_hab_is_enabled

2018-01-02 Thread Bryan O'Donoghue
Understanding if the HAB is enabled is something that we want to interrogate and report on outside of the HAB layer. First step to that is renaming the relevant function to match the previously introduced external naming convention imx_hab_function() The name imx_hab_is_hab_enabled() is a tautolog

Re: [U-Boot] rockchip: rk3399-puma: reduce env size to 8kiB

2018-01-02 Thread Philipp Tomsich
> ...even when the environment is saved to SD card. > > With the default of 32kiB, the environment overwrites the SPL > stage which lives at 16kiB. > > Signed-off-by: Jakob Unterwurzacher > > Acked-by: Philipp Tomsich > Reviewed-by: Philipp Tomsich > Tested-by: Philipp Tomsich > --- > > bo

Re: [U-Boot] [U-Boot, v3, 05/11] sysreset: enable driver support in SPL/TPL

2018-01-02 Thread Philipp Tomsich
> SPL/TPL also need use sysreset for some feature like panic callback. > > Signed-off-by: Kever Yang > --- > > Changes in v3: None > Changes in v2: None > > drivers/sysreset/Kconfig | 18 ++ > drivers/sysreset/Makefile | 2 +- > 2 files changed, 19 insertions(+), 1 deletion(-

Re: [U-Boot] [U-Boot, v3, 01/11] lib: add TPL_OF_LIBFDT option for TPL

2018-01-02 Thread Philipp Tomsich
> TPL may need use libfdt for dt decode, add option for it. > > Signed-off-by: Kever Yang > --- > > Changes in v3: None > Changes in v2: None > > lib/Kconfig | 10 ++ > 1 file changed, 10 insertions(+) > Acked-by: Philipp Tomsich ___ U-Boo

Re: [U-Boot] [U-Boot, v5, 1/2] drivers/reset: support rockchip reset drivers

2018-01-02 Thread Philipp Tomsich
> From: Elaine Zhang > > Create driver to support all Rockchip SoCs soft reset. > Example of usage: > i2c driver: > ret = reset_get_by_name(dev, "i2c", &reset_ctl); > if (ret) { > error("reset_get_by_name() failed: %d\n", ret); > } > > reset_assert(&reset_ct

Re: [U-Boot] [U-Boot, v3, 02/11] arm: add option for TPL ARCH_MEM in arm 32bit

2018-01-02 Thread Philipp Tomsich
> Some options like TPL_SYS_THUMB_BUILD, TPL_USE_ARCH_MEMCPY > and TPL_USE_ARCH_MEMCPY are needed for TPL build in 32bit arm. > > Signed-off-by: Kever Yang > --- > > Changes in v3: None > Changes in v2: > - update subject with ARCH_MEM info > > arch/arm/Kconfig | 29 +++

Re: [U-Boot] rockchp: dts: rk3399-evb: support boot from sd-card

2018-01-02 Thread Philipp Tomsich
> Enable sdmmc node in SPL and add it to boot order. > > Signed-off-by: Kever Yang > Acked-by: Philipp Tomsich > Reviewed-by: Philipp Tomsich > --- > > arch/arm/dts/rk3399-evb.dts | 3 +++ > 1 file changed, 3 insertions(+) > Acked-by: Philipp Tomsich ___

Re: [U-Boot] [U-Boot,v3,03/11] arm: add a separate stack for TPL

2018-01-02 Thread Philipp Tomsich
> TPL stack may different from SPL and sys stack, add support for > separate one when the board defines it. > > Signed-off-by: Kever Yang > --- > > Changes in v3: None > Changes in v2: None > > arch/arm/lib/crt0.S | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > Acked-by: Philipp

Re: [U-Boot] [U-Boot, v3, 04/11] rockchip: rk322x: enable tpl support

2018-01-02 Thread Philipp Tomsich
> Move original spl to tpl, and add spl to load next stage firmware, > adapt all the address and option for them. > > Serial-changes: 2 > - update upon latest source > > Signed-off-by: Kever Yang > --- > > Changes in v3: > - do not init ddr region in spl > > Changes in v2: None > > arch/arm/

Re: [U-Boot] [U-Boot,v5,2/2] rockchip: clk: bind reset driver

2018-01-02 Thread Philipp Tomsich
> From: Elaine Zhang > > Bind rockchip reset to clock-controller with rockchip_reset_bind(). > > Signed-off-by: Elaine Zhang > Signed-off-by: Kever Yang > Acked-by: Philipp Tomsich > Reviewed-by: Philipp Tomsich > --- > > Changes in v5: None > Changes in v4: > - fix compile error if CONFIG_

Re: [U-Boot] [U-Boot,v3,06/11] image: add os type for OP-TEE

2018-01-02 Thread Philipp Tomsich
> OP-TEE is an open source trust OS maintained here: > https://github.com/OP-TEE/optee_os > > Signed-off-by: Kever Yang > --- > > Changes in v3: None > Changes in v2: > - Add new image type like ATF > > common/image.c | 1 + > include/image.h | 1 + > 2 files changed, 2 insertions(+) > Acke

Re: [U-Boot] [U-Boot, v3, 04/11] rockchip: rk322x: enable tpl support

2018-01-02 Thread Philipp Tomsich
On Tue, 19 Dec 2017, Kever Yang wrote: Move original spl to tpl, and add spl to load next stage firmware, adapt all the address and option for them. Serial-changes: 2 - update upon latest source Signed-off-by: Kever Yang Reviewed-by: Philipp Tomsich See below for requested changes. --

Re: [U-Boot] [U-Boot, v3, 07/11] spl: add support to booting with OP-TEE

2018-01-02 Thread Philipp Tomsich
On Tue, 19 Dec 2017, Kever Yang wrote: OP-TEE is an open source trusted OS, in armv7, its loading and running are like this: loading: - SPL load both OP-TEE and U-Boot running: - SPL run into OP-TEE in secure mode; - OP-TEE run into U-Boot in non-secure mode; More detail: https://github.com/O

Re: [U-Boot] [PATCH V3] Convert CONFIG_SOC_DA8XX et al to Kconfig

2018-01-02 Thread David Lechner
On 01/02/2018 07:45 AM, Adam Ford wrote: This converts the following to Kconfig: CONFIG_SOC_DA8XX CONFIG_SOC_DA850 CONFIG_DA850_LOWLEVEL CONFIG_MACH_DAVINCI_DA850_EVM CONFIG_SYS_DA850_PLL_INIT CONFIG_SYS_DA850_DDR_INIT Signed-off-by: Adam Ford --- This patch does not

Re: [U-Boot] [U-Boot, v3, 05/11] sysreset: enable driver support in SPL/TPL

2018-01-02 Thread Philipp Tomsich
> SPL/TPL also need use sysreset for some feature like panic callback. > > Signed-off-by: Kever Yang > Acked-by: Philipp Tomsich > --- > > Changes in v3: None > Changes in v2: None > > drivers/sysreset/Kconfig | 18 ++ > drivers/sysreset/Makefile | 2 +- > 2 files changed, 1

Re: [U-Boot] [U-Boot, v3, 01/11] lib: add TPL_OF_LIBFDT option for TPL

2018-01-02 Thread Philipp Tomsich
> TPL may need use libfdt for dt decode, add option for it. > > Signed-off-by: Kever Yang > Acked-by: Philipp Tomsich > --- > > Changes in v3: None > Changes in v2: None > > lib/Kconfig | 10 ++ > 1 file changed, 10 insertions(+) > Reviewed-by: Philipp Tomsich _

Re: [U-Boot] [U-Boot, v3, 10/11] rockchip: evb-rk3229: add README file for OP-TEE support

2018-01-02 Thread Philipp Tomsich
> Detail of step by step to bring up the board with OP-TEE support. > > Signed-off-by: Kever Yang > --- > > Changes in v3: None > Changes in v2: None > > board/rockchip/evb_rk3229/README | 72 > > 1 file changed, 72 insertions(+) > create mode 100644

Re: [U-Boot] [U-Boot, v3, 08/11] rockchip: rk322x: dts: enable uart2 for SPL/TPL

2018-01-02 Thread Philipp Tomsich
> When we use DM_SERIAL for serial driver, we need enable the > dts node for the debug console. > > Signed-off-by: Kever Yang > --- > > Changes in v3: None > Changes in v2: None > > arch/arm/dts/rk3229-evb.dts | 1 + > 1 file changed, 1 insertion(+) > Reviewed-by: Philipp Tomsich __

Re: [U-Boot] [U-Boot, v3, 11/11] rockchip: evb-rk322x: update defconfig with tpl and optee support

2018-01-02 Thread Philipp Tomsich
> Enable all the options for TPL/SPL and OPTEE. > > Signed-off-by: Kever Yang > --- > > Changes in v3: None > Changes in v2: > - update defconfig option > > configs/evb-rk3229_defconfig | 26 +++--- > 1 file changed, 23 insertions(+), 3 deletions(-) > Reviewed-by: Philipp

Re: [U-Boot] [U-Boot, v3, 09/11] rockchip: add fit source file for pack itb with op-tee

2018-01-02 Thread Philipp Tomsich
> We package U-Boot and OP-TEE into one itb file for SPL, > so that we can support OP-TEE in SPL. > > Signed-off-by: Kever Yang > --- > > Changes in v3: None > Changes in v2: > - Make the its as common file used for all armv7 with op-tee > > arch/arm/mach-rockchip/fit_spl_optee.its | 50 > +++

Re: [U-Boot] [U-Boot,v3,03/11] arm: add a separate stack for TPL

2018-01-02 Thread Philipp Tomsich
> TPL stack may different from SPL and sys stack, add support for > separate one when the board defines it. > > Signed-off-by: Kever Yang > Acked-by: Philipp Tomsich > --- > > Changes in v3: None > Changes in v2: None > > arch/arm/lib/crt0.S | 4 +++- > 1 file changed, 3 insertions(+), 1 dele

Re: [U-Boot] [U-Boot,v3,06/11] image: add os type for OP-TEE

2018-01-02 Thread Philipp Tomsich
> OP-TEE is an open source trust OS maintained here: > https://github.com/OP-TEE/optee_os > > Signed-off-by: Kever Yang > Acked-by: Philipp Tomsich > --- > > Changes in v3: None > Changes in v2: > - Add new image type like ATF > > common/image.c | 1 + > include/image.h | 1 + > 2 files chan

Re: [U-Boot] [U-Boot, v3, 02/11] arm: add option for TPL ARCH_MEM in arm 32bit

2018-01-02 Thread Philipp Tomsich
> Some options like TPL_SYS_THUMB_BUILD, TPL_USE_ARCH_MEMCPY > and TPL_USE_ARCH_MEMCPY are needed for TPL build in 32bit arm. > > Signed-off-by: Kever Yang > Acked-by: Philipp Tomsich > --- > > Changes in v3: None > Changes in v2: > - update subject with ARCH_MEM info > > arch/arm/Kconfig | 2

Re: [U-Boot] [U-Boot, v3, 10/11] rockchip: evb-rk3229: add README file for OP-TEE support

2018-01-02 Thread Philipp Tomsich
> Detail of step by step to bring up the board with OP-TEE support. > > Signed-off-by: Kever Yang > --- > > Changes in v3: None > Changes in v2: None > > board/rockchip/evb_rk3229/README | 72 > > 1 file changed, 72 insertions(+) > create mode 100644

Re: [U-Boot] [U-Boot, v3, 07/11] spl: add support to booting with OP-TEE

2018-01-02 Thread Philipp Tomsich
> OP-TEE is an open source trusted OS, in armv7, its loading and > running are like this: > loading: > - SPL load both OP-TEE and U-Boot > running: > - SPL run into OP-TEE in secure mode; > - OP-TEE run into U-Boot in non-secure mode; > > More detail: > https://github.com/OP-TEE/optee_os > and sea

Re: [U-Boot] [U-Boot, v3, 09/11] rockchip: add fit source file for pack itb with op-tee

2018-01-02 Thread Philipp Tomsich
> We package U-Boot and OP-TEE into one itb file for SPL, > so that we can support OP-TEE in SPL. > > Signed-off-by: Kever Yang > --- > > Changes in v3: None > Changes in v2: > - Make the its as common file used for all armv7 with op-tee > > arch/arm/mach-rockchip/fit_spl_optee.its | 50 > +++

Re: [U-Boot] [U-Boot, v3, 11/11] rockchip: evb-rk322x: update defconfig with tpl and optee support

2018-01-02 Thread Philipp Tomsich
> Enable all the options for TPL/SPL and OPTEE. > > Signed-off-by: Kever Yang > --- > > Changes in v3: None > Changes in v2: > - update defconfig option > > configs/evb-rk3229_defconfig | 26 +++--- > 1 file changed, 23 insertions(+), 3 deletions(-) > Acked-by: Philipp To

Re: [U-Boot] [U-Boot, v3, 08/11] rockchip: rk322x: dts: enable uart2 for SPL/TPL

2018-01-02 Thread Philipp Tomsich
> When we use DM_SERIAL for serial driver, we need enable the > dts node for the debug console. > > Signed-off-by: Kever Yang > --- > > Changes in v3: None > Changes in v2: None > > arch/arm/dts/rk3229-evb.dts | 1 + > 1 file changed, 1 insertion(+) > Acked-by: Philipp Tomsich _

[U-Boot] [PATCH] rockchip: board: lion-rk3368: reduce env-size default to 8KiB

2018-01-02 Thread Philipp Tomsich
We want to have the same configuration defaults for the RK3368-uQ7 as for the RK3399-Q7: this change reduces the default env-size to 8KiB to ensure that it does not overlap the boot-payload on SD/MMC configurations. References: commit fe529e6597c0 ("rockchip: rk3399-puma: reduce env size to 8kiB"

[U-Boot] [PATCH V4] Convert CONFIG_SOC_DA8XX et al to Kconfig

2018-01-02 Thread Adam Ford
This converts the following to Kconfig: CONFIG_SOC_DA8XX CONFIG_SOC_DA850 CONFIG_DA850_LOWLEVEL CONFIG_MACH_DAVINCI_DA850_EVM CONFIG_SYS_DA850_PLL_INIT CONFIG_SYS_DA850_DDR_INIT Signed-off-by: Adam Ford --- Changes in V4: Rebase against origin/master Changes in V3:

[U-Boot] [PATCH v6 01/11] wait_bit: add big endian version of wait_for_bit function

2018-01-02 Thread Álvaro Fernández Rojas
Add 8/16/32 bits and BE/LE versions of wait_for_bit. This is needed for reading registers that are not aligned to 32 bits. Signed-off-by: Álvaro Fernández Rojas --- v6: Introduce changes suggested by Jagan Teki: - Switch to wait_for_bit instead of infinite loop. include/wait_bit.h | 44 ++

[U-Boot] [PATCH v6 00/11] mips: bmips: add SPI support

2018-01-02 Thread Álvaro Fernández Rojas
BCM63xx SPI controller is a bit tricky since it doesn't allow keeping CS active between transfers, so I had to modify the spi_flash driver in order to allow limiting reads. v6: Introduce changes suggested by Jagan Teki: - Use cmd instead of val to avoid confusions. - Switch to wait_for_bit instead

[U-Boot] [PATCH v6 02/11] drivers: spi: allow limiting reads

2018-01-02 Thread Álvaro Fernández Rojas
For some SPI controllers it's not possible to keep the CS active between transfers and they are limited to a known number of bytes. This splits spi_flash reads into different iterations in order to respect the SPI controller limits. Signed-off-by: Álvaro Fernández Rojas Reviewed-by: Simon Glass

[U-Boot] [PATCH v6 06/11] mips: bmips: add bcm63xx-spi driver support for BCM6348

2018-01-02 Thread Álvaro Fernández Rojas
This driver manages the SPI controller present on this SoC. Signed-off-by: Álvaro Fernández Rojas Reviewed-by: Daniel Schwierzeck --- v6: no changes v5: no changes v4: no changes v3: rename BCM6338 SPI driver to BCM6348 v2: add spi alias arch/mips/dts/brcm,bcm6348.dtsi | 17 ++

[U-Boot] [PATCH v6 03/11] drivers: spi: consider command bytes when sending transfers

2018-01-02 Thread Álvaro Fernández Rojas
Command bytes are part of the written bytes and they should be taken into account when sending a spi transfer. Signed-off-by: Álvaro Fernández Rojas Reviewed-by: Simon Glass Reviewed-by: Daniel Schwierzeck Reviewed-by: Jagan Teki --- v6: no changes v5: no changes v4: no changes v3: Fix bug

[U-Boot] [PATCH v6 10/11] mips: bmips: enable the SPI flash on the Sagem F@ST1704

2018-01-02 Thread Álvaro Fernández Rojas
It's a Winbond (w25x32) 4 MB SPI flash. Signed-off-by: Álvaro Fernández Rojas Reviewed-by: Daniel Schwierzeck --- v6: no changes v5: sync with master v4: switch to CONFIG_BCM63XX_SPI v3: rename BCM6338 SPI driver to BCM6348 v2: remove spi alias arch/mips/dts/sagem,f...@st1704.dts | 12

[U-Boot] [PATCH v6 04/11] dm: spi: add BCM63xx SPI driver

2018-01-02 Thread Álvaro Fernández Rojas
This driver is a simplified version of linux/drivers/spi/spi-bcm63xx.c Signed-off-by: Álvaro Fernández Rojas Reviewed-by: Simon Glass Reviewed-by: Daniel Schwierzeck --- v6: Introduce changes suggested by Jagan Teki: - Use cmd instead of val to avoid confusions. - Switch to wait_for_bit inst

[U-Boot] [PATCH v6 05/11] mips: bmips: add bcm63xx-spi driver support for BCM6338

2018-01-02 Thread Álvaro Fernández Rojas
This driver manages the SPI controller present on this SoC. Signed-off-by: Álvaro Fernández Rojas Reviewed-by: Daniel Schwierzeck --- v6: no changes v5: no changes v4: no changes v3: rename BCM6338 SPI driver to BCM6348 v2: add spi alias arch/mips/dts/brcm,bcm6338.dtsi | 17 ++

[U-Boot] [PATCH v6 07/11] mips: bmips: add bcm63xx-spi driver support for BCM6358

2018-01-02 Thread Álvaro Fernández Rojas
This driver manages the SPI controller present on this SoC. Signed-off-by: Álvaro Fernández Rojas Reviewed-by: Daniel Schwierzeck --- v6: no changes v5: no changes v4: no changes v3: no changes v2: add spi alias arch/mips/dts/brcm,bcm6358.dtsi | 17 + 1 file changed, 17 in

  1   2   >