[PATCH] arm: imx: add u-boot-nand.imx to boot from NAND without SPL

2023-03-10 Thread Luca Ceresoli
on i.MX6ULL. The resulting layout of u-boot-nand.imx is: - Offset 0x (0 KiB): padding - Offset 0x0400 (1 KiB): DCD header - Offset 0x1000 (4 KiB): u-boot.bin Signed-off-by: Luca Ceresoli --- Makefile | 3 +++ arch/arm/mach-imx/Makefile | 6 ++ 2 files changed, 9

Re: [PATCH 29/88] i2c: Rename I2C_MUX_PCA954x

2023-01-23 Thread Luca Ceresoli
en removed from Michal's tree: https://lore.kernel.org/u-boot/093405ed-7e96-da00-cb7a-9ac3ad07b...@amd.com/ -- Luca Ceresoli, Bootlin Embedded Linux and Kernel engineering https://bootlin.com

[PATCH v2] arm64: zynqmp: remove Avnet UltraZed-EV Starter Kit

2023-01-11 Thread Luca Ceresoli
/#m76d726f1ab3f7074c8105c9a2af2110ac7d18708 Signed-off-by: Luca Ceresoli --- Changed in v2: - also remove board/xilinx/zynqmp/avnet-ultrazedev-cc-v1.0-ultrazedev-som-v1.0/ (reported by Michal) --- arch/arm/dts/Makefile | 1 - ...ultrazedev-cc-v1.0-ultrazedev-som-v1.0.dts | 59 -- arch/arm/dts

[PATCH] arm64: zynqmp: remove Avnet UltraZed-EV Starter Kit

2023-01-09 Thread Luca Ceresoli
/#m76d726f1ab3f7074c8105c9a2af2110ac7d18708 Signed-off-by: Luca Ceresoli --- arch/arm/dts/Makefile | 1 - ...ultrazedev-cc-v1.0-ultrazedev-som-v1.0.dts | 59 - arch/arm/dts/avnet-ultrazedev-som-v1.0.dtsi | 56 - board/xilinx/zynqmp/MAINTAINERS | 6

Re: [PATCH v9 14/14] treewide: Disable USE_SPL_FIT_GENERATOR by default

2023-01-09 Thread Luca Ceresoli
> > > > > > + This is deprecated. Please do not use it. Use binman > > > > > > > instead. > > > > > > > > > > > > Lets remove the text around bool so it can't be enabled, and move to > > > > > >

[PATCH] board/xilinx/zynqmp/MAINTAINERS: change e-mail address for Luca Ceresoli

2022-12-03 Thread Luca Ceresoli
My Bootlin address is the preferred one now. Signed-off-by: Luca Ceresoli Signed-off-by: Luca Ceresoli --- board/xilinx/zynqmp/MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/board/xilinx/zynqmp/MAINTAINERS b/board/xilinx/zynqmp/MAINTAINERS index 17a2766413c6

Re: [PATCH] arm64: zynqmp: Do not include psu_init to U-Boot by default

2022-12-03 Thread Luca Ceresoli
e ZYNQMP_PSU_INIT_ENABLED from boards which enables it by > default. CONFIG_SPL_ZYNQMP_PSU_INIT_ENABLED is enabled by default when SPL > is enabled. > > Reported-by: Venkatesh Yadav Abbarapu > Signed-off-by: Michal Simek After checking ed35de617013 I can see the problem, a

[PATCH] tools/zynqmp_pm_cfg_obj_convert.py: fix build with Vivado 2021.x

2022-02-12 Thread Luca Ceresoli
/buildroot/2022-February/636639.html] Signed-off-by: Luca Ceresoli --- tools/zynqmp_pm_cfg_obj_convert.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/zynqmp_pm_cfg_obj_convert.py b/tools/zynqmp_pm_cfg_obj_convert.py index 0a44710e1e14..239991a5263c 100755 --- a/tools

Re: [PATCH] clk: clk_versaclock: Add support for versaclock driver

2021-06-03 Thread Luca Ceresoli
Hi Adam, On 03/06/21 14:06, Adam Ford wrote: > On Thu, Jun 3, 2021 at 3:34 AM Luca Ceresoli wrote: >> >> On 24/05/21 19:53, Adam Ford wrote: >>> The driver is based on the Versaclock driver from the Linux code, but >>> do differences in the clock API betwee

Re: [PATCH] clk: clk_versaclock: Add support for versaclock driver

2021-06-03 Thread Luca Ceresoli
On 24/05/21 19:53, Adam Ford wrote: > The driver is based on the Versaclock driver from the Linux code, but > do differences in the clock API between them, some pieces had to change. s/do/due to/ ? s/had to change/had to be changed/ > This driver creates a mux, pfd, pll, and a series of fod

Re: [PATCH v2] tools: zynqmp: Fix regex expression around XPm_ConfigObject.

2020-11-24 Thread Luca Ceresoli
Pm_ConfigObject array definition > -code = re.search('const u32 XPm_ConfigObject.*= {\n(.*)};', > +code = re.search('const u32 XPm_ConfigObject.*=.*{\n(.*)};', > code, flags=re.DOTALL).group(1) Looks good, thanks. Reviewed-by: Luca Ceresoli -- Luca

Re: [PATCH] arm64: zynqmp: Support converting pm_cfg_obj.c

2020-06-23 Thread Luca Ceresoli
Hi, On 23/06/20 23:23, Luca Ceresoli wrote: > Hi Brandon, > > On 23/06/20 19:08, Brandon Maier wrote: >> On Tue, Jun 23, 2020 at 10:18 AM Luca Ceresoli wrote: >>> >>> Hi Brandon, >>> >>> On 22/06/20 22:45, Brandon Maier wrote: >>>>

Re: [PATCH] arm64: zynqmp: Support converting pm_cfg_obj.c

2020-06-23 Thread Luca Ceresoli
Hi Brandon, On 23/06/20 19:08, Brandon Maier wrote: > On Tue, Jun 23, 2020 at 10:18 AM Luca Ceresoli wrote: >> >> Hi Brandon, >> >> On 22/06/20 22:45, Brandon Maier wrote: >>> To use CONFIG_ZYNQMP_SPL_PM_CFG_OBJ_FILE, a developer must pull down t

Re: [PATCH] arm64: zynqmp: Support converting pm_cfg_obj.c

2020-06-23 Thread Luca Ceresoli
U-Boot tools are extracted in a different step w.r.t. U-Boot cross-compilation, so I never felt the need for this feature. But I understand this feature can be handy. The code looks OK too. Reviewed-by: Luca Ceresoli -- Luca

Re: [PATCHv2 29/31] spi: Enable missing CONFIG_SPL_DM_SPI support

2020-06-17 Thread Luca Ceresoli
y making use of it. [...] For the Avnet Ultrazed: > configs/avnet_ultrazedev_cc_v1_0_ultrazedev_som_v1_0_defconfig | 1 + Reviewed-by: Luca Ceresoli -- Luca

Re: [PATCH 28/30] spi: Enable missing CONFIG_SPL_DM_SPI support

2020-06-12 Thread Luca Ceresoli
nnes Schmelzer > Cc: Heiko Schocher > Cc: Jagan Teki > Cc: Klaus Goger > Cc: Levin Du > Cc: Ley Foon Tan > Cc: Lokesh Vutla > Cc: Luca Ceresoli > Cc: Marek Vasut > Cc: Michal Simek > Cc: Mike Looijmans > Cc: Nicolas Ferre > Cc: Nikita Kiryanov > Cc:

Re: [PATCH] serial: Convert ARM_DCC to Kconfig

2020-06-03 Thread Luca Ceresoli
On 02/06/20 23:26, Tom Rini wrote: > The symbol "CONFIG_ARM_DCC" is used to control building > drivers/serial/arm_dcc.c. Provide a simple Kconfig entry for this. > > Cc: Luca Ceresoli > Cc: Michal Simek > Cc: Tom McLeod > Cc: Mike Looijmans > Signed-of

[PATCH 1/2] board: ti: am57xx: use GPIO_TO_PIN() to define GPIO number

2020-05-21 Thread Luca Ceresoli
Using the macro makes code readable without the need for a comment. Signed-off-by: Luca Ceresoli --- board/ti/am57xx/board.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/board/ti/am57xx/board.c b/board/ti/am57xx/board.c index 8720eb87a55d..c41aa24f957b 100644

[PATCH 2/2] board: ti: use positive logic to detect idk boards

2020-05-21 Thread Luca Ceresoli
instead of not-known-without-LCD boards). Even more important, add the macro just below the board_is_*_idk() macros, so it is easy to remember to update it when adding a new IDK. Signed-off-by: Luca Ceresoli --- board/ti/am57xx/board.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff

Re: [PATCH] firmware: zynqmp: Change panic logic in zynqmp_pmufw_load_config_object()

2020-05-12 Thread Luca Ceresoli
o me. Reviewed-by: Luca Ceresoli -- Luca

Re: [PATCH] i2c: muxes: pca954x: add PCA9546 variant

2020-04-02 Thread Luca Ceresoli
Hi Chris, On 01/04/20 04:55, Chris Packham wrote: > This adds the PCA9546 4-channel i2c bus switch. > > Signed-off-by: Chris Packham Reviewed-by: Luca Ceresoli -- Luca

Re: [U-Boot] [PATCH] firmware: zynqmp: Clean up zynqmp_power_probe

2019-10-10 Thread Luca Ceresoli
("firmware: zynqmp: Add zynqmp-power support") > Reported-by: Luca Ceresoli > Signed-off-by: Michal Simek Reviewed-by: Luca Ceresoli -- Luca ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot

Re: [U-Boot] [PATCH] firmware: zynqmp: Report error when xilinx_pm_request called from EL3

2019-10-10 Thread Luca Ceresoli
Hi, On 10/10/19 11:13, Michal Simek wrote: > Function should report error when called in EL3 context. Also report it as > error instead 0 (success). > > Reported-by: Luca Ceresoli > Signed-off-by: Michal Simek > --- > > Based on https://lists.denx.de/pipermail/u-boot/

Re: [U-Boot] [PATCH 2/4] arm64: xilinx: Move firmware functions from platform to driver

2019-10-10 Thread Luca Ceresoli
> +{ > + /* > + * Added SIP service call Function Identifier > + * Make sure to stay in x0 register > + */ > + struct pt_regs regs; > + > + if (current_el() == 3) > + return 0; Not stated in the log message, but this check does not exist in current invoke_smc(). It's useful to check as it avoids a big explosion in case invoke_smc is called in the wrong context. But, if possible, it would be good to emit an error here, or the failure would be silent. Does this look correct? But that would be another patch, so: Reviewed-by: Luca Ceresoli -- Luca ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot

Re: [U-Boot] [PATCH v2 04/13] firmware: zynqmp: Add zynqmp-power support

2019-10-09 Thread Luca Ceresoli
Hi, On 02/10/19 15:39, Michal Simek wrote: > From: Ibai Erkiaga > > zynqmp-power driver for ZynqMP to handle the communication with the PMU > firmware. Firmware driver just probes subnodes and power driver handles > communication with PMU using the IPI mailbox driver. > > Signed-off-by: Ibai

Re: [U-Boot] [PATCH v2 03/13] mailbox: zynqmp: ipi mailbox driver

2019-10-09 Thread Luca Ceresoli
Hi Ibai, Michal, I had half-written a review of this patch and patch 4. Unfortunately I didn't finish them before they got applied. I'll send them now anyway, they are mostly nitpicking but you might consider them for a future improvement. Sorry for the inconvenience. On 02/10/19 15:39, Michal

Re: [U-Boot] [PATCH 06/13] arm64: zynqmp: Cleanup PM SMC macro composition

2019-10-02 Thread Luca Ceresoli
Hi Michal, On 02/10/19 11:36, Michal Simek wrote: > On 02. 10. 19 11:34, Luca Ceresoli wrote: >> Hi Michal, >> >> On 27/09/19 15:34, Michal Simek wrote: >>> Cleanup PM ID handling by using enum values. >>> >>> Signed-off-by: Michal Simek >>&g

Re: [U-Boot] [PATCH 12/13] firmware: zynqmp: Separate function for sending message via mailbox

2019-10-02 Thread Luca Ceresoli
Hi Michal, On 27/09/19 15:35, Michal Simek wrote: > U-Boot running in EL3 can't use SMC that's why there is a need to talk to > PMUFW directly via mailbox. The same logic is applied to all functions > which need to talk to PMUFW that's why move this logic to separate function > to avoid code

Re: [U-Boot] [PATCH 06/13] arm64: zynqmp: Cleanup PM SMC macro composition

2019-10-02 Thread Luca Ceresoli
Hi Michal, On 27/09/19 15:34, Michal Simek wrote: > Cleanup PM ID handling by using enum values. > > Signed-off-by: Michal Simek > Signed-off-by: Ibai Erkiaga > --- > > arch/arm/mach-zynqmp/include/mach/sys_proto.h | 13 +++-- > 1 file changed, 11 insertions(+), 2 deletions(-) > >

Re: [U-Boot] [PATCH 13/13] arm64: zynqmp: Use mailbox driver for PMUFW config loading

2019-10-02 Thread Luca Ceresoli
| 4 - > arch/arm/mach-zynqmp/include/mach/sys_proto.h | 2 - > arch/arm/mach-zynqmp/pmu_ipc.c| 112 -- Goodbye, beloved pmu_ipc.c... :) Reviewed-by: Luca Ceresoli -- Luca ___ U-Boot mailing list

Re: [U-Boot] [PATCH 04/13] firmware: zynqmp: Add zynqmp-power support

2019-10-02 Thread Luca Ceresoli
Hi Ibai, Michal, On 27/09/19 15:34, Michal Simek wrote: > From: Ibai Erkiaga > > zynqmp-power driver for ZynqMP to handle the communication with the PMU > firmware. Firmware driver just probes subnodes and power driver handles > communication with PMU using the IPI mailbox driver. > >

Re: [U-Boot] [PATCH 00/13] arm64: zynqmp: Clean communication with PMUFW

2019-10-02 Thread Luca Ceresoli
Hi Michal, Ibai, On 27/09/19 15:34, Michal Simek wrote: > Hi, > > This patch series using ZynqMP firmware driver to provide a interface to > communicate with the PMU Firmware. As part of the series a mailbox driver > is also implemented to handle communication through ipi interface. > > There

Re: [U-Boot] [PATCH 2/2] arm64: zynqmp: Define default SYS_PROMPT

2019-09-25 Thread Luca Ceresoli
mpt" > default "Zynq> " if ARCH_ZYNQ > + default "ZynqMP> " if ARCH_ZYNQMP > default "=> " Generally speaking, why do we need a per-machine prompt at all? "=> " ought be enough for everybody, nope? However to maintain b

Re: [U-Boot] [PATCH] arm64: zynqmp: Define default SPL_TEXT_BASE address in Kconfig

2019-09-12 Thread Luca Ceresoli
e has been done by commit 9340d8fe8beb > ("sunxi: move CONFIG_SPL_TEXT_BASE from *_defconfig to Kconfig") > > Signed-off-by: Michal Simek Reviewed-by: Luca Ceresoli -- Luca ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot

[U-Boot] [PATCH v2] arm64: zynqmp: add MAINTAINERS entry for Avnet UltraZed-EV

2019-06-20 Thread Luca Ceresoli
-by: Luca Ceresoli --- Changes v1 -> v2: - add to board/xilinx/zynqmp/MAINTAINERS, not the top-level file (Michal) - add the dts files (Michal) - explicitly mention the "EV" board variant --- board/xilinx/zynqmp/MAINTAINERS | 6 ++ 1 file changed, 6 insertions(+) diff --git a

Re: [U-Boot] [PATCH] arm64: zynqmp: add MAINTAINERS entry for Avnet UltraZed

2019-06-20 Thread Luca Ceresoli
Hi Michal, On 20/06/19 08:03, Michal Simek wrote: > On 19. 06. 19 18:28, Luca Ceresoli wrote: >> The board was added without adding a MAINTAINERS entry. >> >> Fixes: >> >> $ ./tools/genboardscfg.py -f >> WARNING: no status info for 'avnet_ultrazedev_cc

[U-Boot] [PATCH] arm64: zynqmp: add MAINTAINERS entry for Avnet UltraZed

2019-06-19 Thread Luca Ceresoli
-by: Luca Ceresoli --- MAINTAINERS | 6 ++ 1 file changed, 6 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 8e26eda2c887..29751901d752 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -420,6 +420,12 @@ F: tools/zynqmp* N: ultra96 N: zynqmp +ARM ZYNQMP AVNET ULTRAZED BOARD +M

Re: [U-Boot] [PATCH v3 2/2] arm64: zynqmp: add support for Avnet UltraZed-EV Starter Kit

2019-06-19 Thread Luca Ceresoli
Hi Michal, On 19/06/19 09:20, Michal Simek wrote: [...] >> I have removed this line and applied this patch. > > Can you please also send a patch to create maintainer fragment for this > board? > > [u-boot](sdhci2)$ ./tools/genboardscfg.py -f > WARNING: no status info for

[U-Boot] [PATCH v3 2/2] arm64: zynqmp: add support for Avnet UltraZed-EV Starter Kit

2019-06-11 Thread Luca Ceresoli
and then minimized by tools/zynqmp_psu_init_minimize.sh. Manually removed serdes init code since it is not mentioned in device tree and fixed a checkpatch error. [0] https://github.com/Avnet/bdf/tree/3686c9ff7d2f0467fb4fcf39f861b8d6ff183b12/ultrazed_7ev_cc/1.1 Signed-off-by: Luca Ceresoli --- Changes

[U-Boot] [PATCH v3 1/2] tools/zynqmp_psu_init_minimize.sh: fix return lines coding style

2019-06-11 Thread Luca Ceresoli
Remove unneeded parenthess around return value. E.g.: return (0); -> return 0; Signed-off-by: Luca Ceresoli --- tools/zynqmp_psu_init_minimize.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/zynqmp_psu_init_minimize.sh b/tools/zynqmp_psu_init_minimize.sh in

Re: [U-Boot] [PATCH v2 3/3] arm64: zynqmp: add support for Avnet UltraZed-EV Starter Kit

2019-06-11 Thread Luca Ceresoli
Hi Michal, On 28/05/19 09:45, Michal Simek wrote: [...] >> +static unsigned long psu_ddr_phybringup_data(void) >> +{ >> +unsigned int regval = 0; >> +unsigned int pll_retry = 10; >> +unsigned int pll_locked = 0; >> + >> +while ((pll_retry > 0) && (!pll_locked)) { >> +

[U-Boot] [PATCH v2 3/3] arm64: zynqmp: add support for Avnet UltraZed-EV Starter Kit

2019-05-24 Thread Luca Ceresoli
and then minimized by tools/zynqmp_psu_init_minimize.sh. Manually removed serdes init code since it is not mentioned in device tree and fixed a checkpatch error. [0] https://github.com/Avnet/bdf/tree/3686c9ff7d2f0467fb4fcf39f861b8d6ff183b12/ultrazed_7ev_cc/1.1 Signed-off-by: Luca Ceresoli --- Changes

[U-Boot] [PATCH v2 1/3] arm64: zynqmp: xil_io.h: declare functions as static

2019-05-24 Thread Luca Ceresoli
/xil_io.h:22:6: warning: symbol 'usleep' was not declared. Should it be static? Also add __maybe_unused to usleep() since it is not used by minimized psu_init_gpl.c files, so it would warn as "defined but not used". Signed-off-by: Luca Ceresoli --- Chages v1 -> v2: - fix commit

[U-Boot] [PATCH v2 2/3] arm64: zynqmp: add tool to minimize psu_init_gpl.c files

2019-05-24 Thread Luca Ceresoli
This script transforms a pair of psu_init_gpl.c and .h files produced by the Xilinx Vivado tool for ZynqMP into a smaller psu_init_gpl.c file that is almost checkpatch compliant. Based on a script by Michal Simek. Signed-off-by: Luca Ceresoli --- Changes v1 -> v2: - docum

Re: [U-Boot] [PATCH 3/3] arm64: zynqmp: add support for Avnet UltraZed-EV Starter Kit

2019-05-24 Thread Luca Ceresoli
Hi, On 24/05/19 10:01, Michal Simek wrote: > On 23. 05. 19 15:54, Luca Ceresoli wrote: >> Hi, >> >> On 22/05/19 12:24, Michal Simek wrote: >>> On 10. 05. 19 10:15, Luca Ceresoli wrote: >>>> Avnet UltraZed-EV Starter Kit is composed by the UltraZed-E

Re: [U-Boot] [PATCH 3/3] arm64: zynqmp: add support for Avnet UltraZed-EV Starter Kit

2019-05-23 Thread Luca Ceresoli
Hi, On 22/05/19 12:24, Michal Simek wrote: > On 10. 05. 19 10:15, Luca Ceresoli wrote: >> Avnet UltraZed-EV Starter Kit is composed by the UltraZed-EV SoM and the >> only publicly-available compatible carrier card. The SoM is based on the EV >> version of the X

Re: [U-Boot] [PATCH 2/3] arm64: zynqmp: add tool to minimize psu_init_gpl.c files

2019-05-23 Thread Luca Ceresoli
Hi, On 22/05/19 13:11, Michal Simek wrote: > On 10. 05. 19 10:15, Luca Ceresoli wrote: >> This script transforms a pair of psu_init_gpl.c and .h files produced by >> the Xilinx Vivado tool for ZynqMP into a smaller psu_init_gpl.c file that >> is checkpatch compliant. &g

Re: [U-Boot] [PATCH 1/3] arm64: zynqmp: xil_io.h: declare functions as static

2019-05-23 Thread Luca Ceresoli
Hi, On 22/05/19 13:26, Michal Simek wrote: > On 10. 05. 19 10:15, Luca Ceresoli wrote: >> Fixes chekcpatch warnings when building zynqmp defconfigs: > > it is not checkpatch who reports this. It is sparse. Good catch, will fix. -- Luca ___

[U-Boot] [PATCH v5 2/2] arm64: zynqmp: add tool to convert PMU config object .c to binary

2019-05-21 Thread Luca Ceresoli
Signed-off-by: Luca Ceresoli --- Changes v4 -> v5: - remove argparse allow_abbrev to run on Python < 3.5, Ubuntu 14.04 (Michal) Changes v3 -> v4: - move to tools/ directory - remove double item.strip() call --- tools/zynqmp_pm_cfg_obj_convert.py | 301

[U-Boot] [PATCH v5 0/2] arm64: zynqmp: pass a PMUFW config object

2019-05-21 Thread Luca Ceresoli
/pipermail/u-boot/2019-February/360450.html RFCv2: https://lists.denx.de/pipermail/u-boot/2019-March/362464.html v3: https://lists.denx.de/pipermail/u-boot/2019-April/365410.html v4: https://lists.denx.de/pipermail/u-boot/2019-May/369427.html Luca Luca Ceresoli (2): arm64: zynqmp: spl: ins

[U-Boot] [PATCH v5 1/2] arm64: zynqmp: spl: install a PMU firmware config object at runtime

2019-05-21 Thread Luca Ceresoli
-Processor Communication with the Platform Management Unit (PMU) + * firmware. + * + * (C) Copyright 2019 Luca Ceresoli + * Luca Ceresoli + */ + +#include +#include +#include + +/* IPI bitmasks, register base and register offsets */ +#define IPI_BIT_MASK_APU 0x1 +#define IPI_BIT_MASK_

[U-Boot] [PATCH v4 2/2] arm64: zynqmp: add tool to convert PMU config object .c to binary

2019-05-15 Thread Luca Ceresoli
Signed-off-by: Luca Ceresoli --- Changes v3 -> v4: - move to tools/ directory - remove double item.strip() call --- tools/zynqmp_pm_cfg_obj_convert.py | 302 + 1 file changed, 302 insertions(+) create mode 100755 tools/zynqmp_pm_cfg_obj_convert.py diff --

[U-Boot] [PATCH v4 1/2] arm64: zynqmp: spl: install a PMU firmware config object at runtime

2019-05-15 Thread Luca Ceresoli
with the Platform Management Unit (PMU) + * firmware. + * + * (C) Copyright 2019 Luca Ceresoli + * Luca Ceresoli + */ + +#include +#include +#include + +/* IPI bitmasks, register base and register offsets */ +#define IPI_BIT_MASK_APU 0x1 +#define IPI_BIT_MASK_PMU0 0x1 +#define IP

[U-Boot] [PATCH v4 0/2] arm64: zynqmp: pass a PMUFW config object

2019-05-15 Thread Luca Ceresoli
May/368957.html RFCv1: https://lists.denx.de/pipermail/u-boot/2019-February/360450.html RFCv2: https://lists.denx.de/pipermail/u-boot/2019-March/362464.html v3: https://lists.denx.de/pipermail/u-boot/2019-April/365410.html Luca Luca Ceresoli (2): arm64: zynqmp: spl: install a PMU firmware con

Re: [U-Boot] [PATCH v3 1/2] arm64: zynqmp: spl: install a PMU firmware config object at runtime

2019-05-15 Thread Luca Ceresoli
Hi, On 14/05/19 17:45, Michal Simek wrote: >>> +$(obj)/pm_cfg_obj.o: $(obj)/pm_cfg_obj.bin >>> + >>> +CFLAGS_zynqmp.o += -DZYNQMP_LOAD_PM_CFG_OBJ >> >> I am no fan of passing another object. you have >> CONFIG_ZYNQMP_LOAD_PM_CFG_OBJ_FILE already and this can be used

Re: [U-Boot] [PATCH v3 1/2] arm64: zynqmp: spl: install a PMU firmware config object at runtime

2019-05-14 Thread Luca Ceresoli
Hi Michal, All, On 07/05/19 16:11, Luca Ceresoli wrote: > Hi, > > On 06/05/19 17:56, Michal Simek wrote: >> Hi, >> >> snip. >> >>>>> +$(obj)/pm_cfg_obj.o: $(obj)/pm_cfg_obj.bin >>>>> + >>>>> +CFLAGS_zynqmp.o += -DZY

[U-Boot] [PATCH 3/3] arm64: zynqmp: add support for Avnet UltraZed-EV Starter Kit

2019-05-10 Thread Luca Ceresoli
then minimized by tools/zynqmp_psu_init_minimize.sh and slightly fixed manually. [0] https://github.com/Avnet/bdf/tree/3686c9ff7d2f0467fb4fcf39f861b8d6ff183b12/ultrazed_7ev_cc/1.1 Signed-off-by: Luca Ceresoli --- Whole patchset tested on: - current u-boot/master, as is - current u-boot

[U-Boot] [PATCH 2/3] arm64: zynqmp: add tool to minimize psu_init_gpl.c files

2019-05-10 Thread Luca Ceresoli
This script transforms a pair of psu_init_gpl.c and .h files produced by the Xilinx Vivado tool for ZynqMP into a smaller psu_init_gpl.c file that is checkpatch compliant. Based on a script by Michal Simek. Signed-off-by: Luca Ceresoli --- tools/zynqmp_psu_init_minimize.sh | 129

[U-Boot] [PATCH 1/3] arm64: zynqmp: xil_io.h: declare functions as static

2019-05-10 Thread Luca Ceresoli
/xil_io.h:22:6: warning: symbol 'usleep' was not declared. Should it be static? Also add __maybe_unused to usleep() since it is not used by minimized psu_init_gpl.c files, so it would warn as "defined but not used". Signed-off-by: Luca Ceresoli --- board/xilinx/zynqmp/xil_io.h | 6 +++-

Re: [U-Boot] [PATCH v3 1/2] arm64: zynqmp: spl: install a PMU firmware config object at runtime

2019-05-07 Thread Luca Ceresoli
Hi, On 06/05/19 17:56, Michal Simek wrote: > Hi, > > snip. > +$(obj)/pm_cfg_obj.o: $(obj)/pm_cfg_obj.bin + +CFLAGS_zynqmp.o += -DZYNQMP_LOAD_PM_CFG_OBJ >>> >>> I am no fan of passing another object. you have >>> CONFIG_ZYNQMP_LOAD_PM_CFG_OBJ_FILE already and this can be used

Re: [U-Boot] [PATCH v3 1/2] arm64: zynqmp: spl: install a PMU firmware config object at runtime

2019-05-04 Thread Luca Ceresoli
Hi Michal, thanks for your review. See my replies below. On 04/05/19 00:38, Michal Simek wrote: > On 15. 04. 19 9:47, Luca Ceresoli wrote: >> Optionally allow U-Boot to load at the PMU firmware configuration object >> into the Power Management Unit (PMU) on Xilinx ZynqMP. >>

Re: [U-Boot] [PATCH v3 2/2] arm64: zynqmp: add tool to convert PMU config object .c to binary

2019-05-04 Thread Luca Ceresoli
Hi Michal, On 04/05/19 00:31, Michal Simek wrote: > Hi, > > On 15. 04. 19 9:47, Luca Ceresoli wrote: >> The recently-added ZYNQMP_LOAD_PM_CFG_OBJ_FILE option allows SPL to load a >> PMUFW configuration object from a binary blob. However the configuration >> o

[U-Boot] [PATCH v3 2/2] arm64: zynqmp: add tool to convert PMU config object .c to binary

2019-04-15 Thread Luca Ceresoli
Signed-off-by: Luca Ceresoli --- arch/arm/mach-zynqmp/pm_cfg_obj_convert.py | 302 + 1 file changed, 302 insertions(+) create mode 100755 arch/arm/mach-zynqmp/pm_cfg_obj_convert.py diff --git a/arch/arm/mach-zynqmp/pm_cfg_obj_convert.py b/arch/arm/mach-zynqmp

[U-Boot] [PATCH v3 1/2] arm64: zynqmp: spl: install a PMU firmware config object at runtime

2019-04-15 Thread Luca Ceresoli
/c48d02bade88b07fa7f43aa44e5217f68e5d047f/plat/xilinx/zynqmp/pm_service/pm_api_sys.c#L357 SPL logs on the console before loading the configuration object: U-Boot SPL 2018.01 (Mar 20 2019 - 08:12:21) Loading PMUFW cfg obj (2008 bytes) EL Level: EL3 ... Signed-off-by: Luca Ceresoli --- Changes

[U-Boot] [PATCH v3 0/2] arm64: zynqmp: pass a PMUFW config object

2019-04-15 Thread Luca Ceresoli
nfigObject-at-boot.patch RFCv1: https://lists.denx.de/pipermail/u-boot/2019-February/360450.html RFCv2: https://lists.denx.de/pipermail/u-boot/2019-March/362464.html Luca Luca Ceresoli (2): arm64: zynqmp: spl: install a PMU firmware config object at runtime arm64: zynqmp: add tool to convert PMU config

[U-Boot] [PATCH] arm64: zynqmp: fix preprocessor check for SPL_ZYNQMP_TWO_SDHCI

2019-04-15 Thread Luca Ceresoli
;) Signed-off-by: Luca Ceresoli --- arch/arm/mach-zynqmp/spl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-zynqmp/spl.c b/arch/arm/mach-zynqmp/spl.c index f6f5414201b5..b7d2ecdf7257 100644 --- a/arch/arm/mach-zynqmp/spl.c +++ b/arch/arm/mach-zynqmp/spl.c @@ -

[U-Boot] [PATCH v2 3/3] i2c: muxes: pca954x: support PCA9543 I2C switch

2019-04-09 Thread Luca Ceresoli
The PCA9543 is a 2-channel I2C switch. Signed-off-by: Luca Ceresoli Reviewed-by: Heiko Schocher --- Changes v1 -> v2: - rebase on current tree --- drivers/i2c/muxes/Kconfig | 3 ++- drivers/i2c/muxes/pca954x.c | 6 ++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --

[U-Boot] [PATCH v2 2/3] i2c: muxes: pca954x: clarify enable field

2019-04-09 Thread Luca Ceresoli
The chip_desc.enable field is used only for muxes, not for switches. Document it and remove the unused values. Signed-off-by: Luca Ceresoli Reviewed-by: Heiko Schocher --- Changes v1 -> v2: - fix typo in commit message (Michal) --- drivers/i2c/muxes/pca954x.c | 4 +--- 1 file changed

[U-Boot] [PATCH v2 1/3] i2c: muxes: pca954x: update list of supported devices

2019-04-09 Thread Luca Ceresoli
The Kconfig help has not been updated while adding PCA9547 and PCA9646. Signed-off-by: Luca Ceresoli --- Changes v1 -> v2: - add missing comma (Michal) - reword and rewrap the sentence --- drivers/i2c/muxes/Kconfig | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --

Re: [U-Boot] [PATCH 1/3] i2c: muxes: pca954x: update list of supported devices

2019-04-05 Thread Luca Ceresoli
Hi Michal, On 05/04/19 12:58, Michal Simek wrote: > On 05. 04. 19 12:32, Luca Ceresoli wrote: >> The Kconfig help has not been updated while adding PCA9547 and PCA9646. >> >> Signed-off-by: Luca Ceresoli >> --- >> drivers/i2c/muxes/Kconfig | 2 +- >> 1 f

[U-Boot] [PATCH 3/3] i2c: muxes: pca954x: support PCA9543 I2C switch

2019-04-05 Thread Luca Ceresoli
The PCA9543 is a 2-channel I2C switch. Signed-off-by: Luca Ceresoli --- drivers/i2c/muxes/Kconfig | 10 +- drivers/i2c/muxes/pca954x.c | 6 ++ 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/drivers/i2c/muxes/Kconfig b/drivers/i2c/muxes/Kconfig index 26be78f685de

[U-Boot] [PATCH 1/3] i2c: muxes: pca954x: update list of supported devices

2019-04-05 Thread Luca Ceresoli
The Kconfig help has not been updated while adding PCA9547 and PCA9646. Signed-off-by: Luca Ceresoli --- drivers/i2c/muxes/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/i2c/muxes/Kconfig b/drivers/i2c/muxes/Kconfig index b0da67ce2c6b..26be78f685de 100644

[U-Boot] [PATCH 2/3] i2c: muxes: pca954x: clarify enable field

2019-04-05 Thread Luca Ceresoli
The chip_desc.enable field is used only for muxes, not tor switches. Document it and remove the unused values. Signed-off-by: Luca Ceresoli --- drivers/i2c/muxes/pca954x.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/i2c/muxes/pca954x.c b/drivers/i2c/muxes

Re: [U-Boot] [RFC v2 2/2] arm64: zynqmp: spl: install a PMU firmware config object at runtime

2019-04-04 Thread Luca Ceresoli
Hi Mike, Michal, On 04/04/19 08:49, Michal Simek wrote: [...] >>> +#ifdef ZYNQMP_LOAD_PM_CFG_OBJ >>> +#include CONFIG_ZYNQMP_LOAD_PM_CFG_OBJ_FILE >>> +#endif >>> + >>>int board_early_init_f(void) >>>{ >>> int ret = 0; >>> @@ -332,6 +338,11 @@ int

Re: [U-Boot] [RFC v2 2/2] arm64: zynqmp: spl: install a PMU firmware config object at runtime

2019-04-03 Thread Luca Ceresoli
Hi Mike, On 03/04/19 13:24, Mike Looijmans wrote: > On 29-03-19 13:22, Luca Ceresoli wrote: >> Hi Michal, >> >> thanks for the feedback. >> >> On 27/03/19 16:03, Michal Simek wrote: >>> On 21. 03. 19 16:48, Luca Ceresoli wrote: >>>&g

Re: [U-Boot] [RFC v2 1/2] zynqmp: add minimal include files to build a pm_cfg_obj.c

2019-03-29 Thread Luca Ceresoli
Hi Michal, On 27/03/19 16:10, Michal Simek wrote: > On 21. 03. 19 16:48, Luca Ceresoli wrote: >> A following commit will allow U-Boot to pass a configuration object to >> the ZynqMP PMU firmware. This configuration object is generated by >> Xilinx tools in the form of a

Re: [U-Boot] [RFC v2 2/2] arm64: zynqmp: spl: install a PMU firmware config object at runtime

2019-03-29 Thread Luca Ceresoli
Hi Michal, thanks for the feedback. On 27/03/19 16:03, Michal Simek wrote: > On 21. 03. 19 16:48, Luca Ceresoli wrote: >> Optionally allow U-Boot to load at the PMU firmware configuration object >> into the Power Management Unit (PMU) on Xilinx ZynqMP. >> >> The confi

[U-Boot] [RFC v2 0/2] arm64: zynqmp: pass a PMUFW config object

2019-03-21 Thread Luca Ceresoli
ts.denx.de/pipermail/u-boot/2019-February/360450.html Luca Luca Ceresoli (2): zynqmp: add minimal include files to build a pm_cfg_obj.c arm64: zynqmp: spl: install a PMU firmware config object at runtime board/xilinx/zynqmp/Kconfig | 26 board/xilinx/zynqmp/Makefile | 5 + board/xil

[U-Boot] [RFC v2 1/2] zynqmp: add minimal include files to build a pm_cfg_obj.c

2019-03-21 Thread Luca Ceresoli
/xilinx-v2018.3/lib/sw_services/xilpm/src/common/pm_defs.h Signed-off-by: Luca Ceresoli --- board/xilinx/zynqmp/pm_defs.h| 254 +++ board/xilinx/zynqmp/pmu_global.h | 0 board/xilinx/zynqmp/xil_types.h | 1 + 3 files changed, 255 insertions(+) create mode

[U-Boot] [RFC v2 2/2] arm64: zynqmp: spl: install a PMU firmware config object at runtime

2019-03-21 Thread Luca Ceresoli
/c48d02bade88b07fa7f43aa44e5217f68e5d047f/plat/xilinx/zynqmp/pm_service/pm_api_sys.c#L357 The load is logged on the console during boot: U-Boot SPL 2018.01 (Mar 20 2019 - 08:12:21) Loading PMUFW cfg obj (2008 bytes) EL Level: EL3 ... Signed-off-by: Luca Ceresoli --- Changes RFC v1 -> RFC

[U-Boot] [RFC 1/2] arm64: zynqmp: add minimal include files to build a pm_cfg_obj.c

2019-02-28 Thread Luca Ceresoli
/xilinx-v2018.3/lib/sw_services/xilpm/src/common/pm_defs.h Signed-off-by: Luca Ceresoli --- board/xilinx/zynqmp/pm_defs.h| 254 +++ board/xilinx/zynqmp/pmu_global.h | 0 board/xilinx/zynqmp/xil_types.h | 1 + 3 files changed, 255 insertions(+) create mode

[U-Boot] [RFC 2/2] arm64: zynqmp: install a PMU firmware config object at runtime

2019-02-28 Thread Luca Ceresoli
firmware. Allow a different boot process, where the PMU FW is equal for any ZynqMP chip and its configuration is passed at runtime by U-Boot proper. Requires the PM_SET_CONFIGURATION command to be implemented by ARM Trusted Firmware. Signed-off-by: Luca Ceresoli --- arch/arm/mach-zynqmp/include/mach

[U-Boot] [RFC 0/2] arm64: zynqmp: pass a PMUFW config object

2019-02-28 Thread Luca Ceresoli
ed on the ZCU106 and UltraZed EV boards. [0] https://github.com/topic-embedded-products/meta-topic/blob/master/recipes-bsp/pmu-firmware/pmu-firmware/0001-Load-XPm_ConfigObject-at-boot.patch [1] https://github.com/ARM-software/arm-trusted-firmware/pull/1850 Luca Luca Ceresoli (2): arm64: zynqmp: add minim

[U-Boot] [PATCH] fpga: zynqmp: show an error message when FPGA programming fails

2019-01-11 Thread Luca Ceresoli
When FPGA programming fails, it does so silently, unless debugging code is enabled. This makes it hard to detect problems in production environments. Print the error message unconditionally so the error doesn't go unnoticed. Signed-off-by: Luca Ceresoli --- drivers/fpga/zynqmppl.c | 2 +- 1

Re: [U-Boot] [PATCH] arm/arm64: zynq/zynqmp: pass the PS init file as a kconfig variable

2018-06-22 Thread Luca Ceresoli
Hi Michal, On 22/06/2018 09:38, Michal Simek wrote: [...] > I have tested it and it looks good. Good, thanks. v2 on its way with the changes you requested. Regards, -- Luca ___ U-Boot mailing list U-Boot@lists.denx.de

Re: [U-Boot] [PATCH] arm/arm64: zynq/zynqmp: pass the PS init file as a kconfig variable

2018-06-22 Thread Luca Ceresoli
Hi Michal, On 22/06/2018 09:38, Michal Simek wrote: > On 20.6.2018 23:00, Luca Ceresoli wrote: >> U-Boot needs to link ps7_init_gpl.c on Zynq or psu_init_gpl.c on >> ZynqMP (PS init for short). The current logic to locate this file for >> both platforms is: >> >

[U-Boot] [PATCH v2] arm/arm64: zynq/zynqmp: pass the PS init file as a kconfig variable

2018-06-22 Thread Luca Ceresoli
path, non-existing), in-tree board-specific, in board/xilinx/zynq[mp]/ - building in-tree, in subdir, in other directory Signed-off-by: Luca Ceresoli Cc: Albert Aribaud Cc: Michal Simek Cc: Nathan Rossi --- Changes v1 -> v2: - removed link to yocto layer code (Michal) - fixed locat

[U-Boot] [PATCH] arm/arm64: zynq/zynqmp: pass the PS init file as a kconfig variable

2018-06-20 Thread Luca Ceresoli
Kconfig b/board/xilinx/Kconfig new file mode 100644 index ..aa3fa061edef --- /dev/null +++ b/board/xilinx/Kconfig @@ -0,0 +1,41 @@ +# Copyright (c) 2018, Luca Ceresoli +# +# SPDX-License-Identifier: GPL-2.0 + +if ARCH_ZYNQ || ARCH_ZYNQMP + +config XILINX_PS_INIT_FILE + string "Zynq/Z

Re: [U-Boot] [PATCH] if_changed: fix error handling

2018-06-06 Thread Luca Ceresoli
Hi Chris, On 06/06/2018 05:23, Chris Packham wrote: > Hi, > > On Tue, Jun 5, 2018 at 2:08 AM Luca Ceresoli wrote: >> >> The commands in if_changed and if_changed_dep are concatenated with a >> ';', thus any error in any command except the last one

[U-Boot] [PATCH] if_changed: fix error handling

2018-06-04 Thread Luca Ceresoli
Signed-off-by: Luca Ceresoli --- Note: I'm not aware of any situation in which this bug has any visible effect. I noticed the problem while working on a different topic, but later I did that job in a different way, not involving if_changed usages. But this is a bug anyway, so let's fix it. ---

Re: [U-Boot] [PATCH] arm64: zynqmp: accept an absolute path for PMUFW_INIT_FILE

2018-06-04 Thread Luca Ceresoli
Hi Emmanuel, On 31/05/2018 17:14, Emmanuel Vadot wrote: > On Thu, 31 May 2018 16:28:46 +0200 > Michal Simek wrote: > >> On 31.5.2018 14:58, Luca Ceresoli wrote: >>> The value of PMUFW_INIT_FILE is prefixed with "$(srctree)/", thus >>> forcing it to

[U-Boot] [PATCH v2] arm64: zynqmp: accept an absolute path for PMUFW_INIT_FILE

2018-06-04 Thread Luca Ceresoli
d in the 12 possible combinations of: - PMUFW_INIT_FILE empty, relative, absolute, non-existing - building in-tree, in subdir, in other directory Signed-off-by: Luca Ceresoli Cc: Michal Simek Cc: Simon Glass Cc: Emmanuel Vadot --- Changes v1 -> v2: - avoid non-portable 'readlink -m' by a

Re: [U-Boot] [PATCH] arm64: zynqmp: accept an absolute path for PMUFW_INIT_FILE

2018-05-31 Thread Luca Ceresoli
Hi Michal, Emmanuel, On 31/05/2018 17:14, Emmanuel Vadot wrote: > On Thu, 31 May 2018 16:28:46 +0200 > Michal Simek wrote: > >> On 31.5.2018 14:58, Luca Ceresoli wrote: >>> The value of PMUFW_INIT_FILE is prefixed with "$(srctree)/", thus >>> forcing

[U-Boot] [PATCH] arm64: zynqmp: accept an absolute path for PMUFW_INIT_FILE

2018-05-31 Thread Luca Ceresoli
from a relative path. Tested in the 9 possible combinations of: - PMUFW_INIT_FILE empty, relative or absolute - building in-tree, in subdir, in other directory Signed-off-by: Luca Ceresoli Cc: Michal Simek Cc: Simon Glass --- scripts/Makefile.spl | 2 +- 1 file changed, 1 insertion(+), 1 del

[U-Boot] [PATCH] scripts/check-config.sh: fix "command not found" error handling

2018-03-15 Thread Luca Ceresoli
ors. [0] http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=fe0b4cb5b48580d4a3f3c0eb82bfa6f1b13801e4 Signed-off-by: Luca Ceresoli <l...@lucaceresoli.net> --- scripts/check-config.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/check-config.sh b/scripts/check-config

Re: [U-Boot] Bricked when trying to attach UBI

2013-01-02 Thread Luca Ceresoli
Luca Ceresoli wrote: Hi, I'm Cc'ing the linux-mtd list as well as the authors of the Linux commits cited below. For these new readers: I reported a problem with U-Boot 2012.04.01 not being able to attach an UBI partition in NAND, while Linux (2.6.37) can attach and repair it. It looks like

Re: [U-Boot] Bricked when trying to attach UBI

2012-12-20 Thread Luca Ceresoli
://thread.gmane.org/gmane.comp.boot-loaders.u-boot/149624 Luca Ceresoli wrote: Hi Andreas, Andreas Bießmann wrote: Hi Luca, On 19.12.2012 16:56, Luca Ceresoli wrote: Hi Andreas, Andreas Bießmann wrote: ... Creating 1 MTD partitions on nand0: 0x0010-0x1000 : mtd=3 UBI: attaching

[U-Boot] Bricked when trying to attach UBI

2012-12-19 Thread Luca Ceresoli
Hi all, I am facing a problem with some boards that do not boot after some weeks or months of normal usage, being unable to attach UBI. They do not boot anymore event after a power cycle, in other words they are totally bricked. I don't know exactly what problem UBI has, but it is recoverable by

Re: [U-Boot] Bricked when trying to attach UBI

2012-12-19 Thread Luca Ceresoli
Hi Andreas, Andreas Bießmann wrote: ... Creating 1 MTD partitions on nand0: 0x0010-0x1000 : mtd=3 UBI: attaching mtd1 to ubi0 UBI: physical eraseblock size: 131072 bytes (128 KiB) UBI: logical eraseblock size:129024 bytes UBI: smallest flash I/O unit:2048 UBI: sub-page

Re: [U-Boot] Bricked when trying to attach UBI

2012-12-19 Thread Luca Ceresoli
Hi Andreas, Andreas Bießmann wrote: Hi Luca, On 19.12.2012 16:56, Luca Ceresoli wrote: Hi Andreas, Andreas Bießmann wrote: ... Creating 1 MTD partitions on nand0: 0x0010-0x1000 : mtd=3 UBI: attaching mtd1 to ubi0 UBI: physical eraseblock size: 131072 bytes (128 KiB) UBI

  1   2   3   >