Re: [PATCH v2 2/4] regmap: Allow providing read/write callbacks through struct regmap_config

2020-01-08 Thread Jean-Jacques Hiblot
Simon, On 24/12/2019 16:58, Simon Glass wrote: Hi Jean-Jacques, On Mon, 16 Dec 2019 at 03:10, Jean-Jacques Hiblot wrote: Hi Simon, On 10/12/2019 16:18, Simon Glass wrote: Hi Jean-Jacques, On Tue, 5 Nov 2019 at 04:47, Jean-Jacques Hiblot wrote: Some linux drivers provide their own read

Re: [PATCH PATCH v6 00/13] Add support for applications of overlays in SPL

2019-12-23 Thread Jean-Jacques Hiblot
on the series as a whole. JJ On 22/10/2019 16:39, Jean-Jacques Hiblot wrote: The purpose of this series is to provide the SPL with ability to apply overlays for u-boot. Our use-case is the support of the daughter boards of the AM65x and J721e EVMs. In Linux, each board is supported by a unique

Re: [PATCH v2 2/4] regmap: Allow providing read/write callbacks through struct regmap_config

2019-12-16 Thread Jean-Jacques Hiblot
Hi Simon, On 10/12/2019 16:18, Simon Glass wrote: Hi Jean-Jacques, On Tue, 5 Nov 2019 at 04:47, Jean-Jacques Hiblot wrote: Some linux drivers provide their own read/write functions to access data from/of the regmap. Adding support for it. Signed-off-by: Jean-Jacques Hiblot --- Changes

Re: [U-Boot] [PATCH v3 1/5] dm: clk: add stub for clk_disable_bulk when CONFIG_CLK is desactivated

2019-11-12 Thread Jean-Jacques Hiblot
Hi Patrick, On 12/11/2019 10:42, Patrick Delaunay wrote: Add stub for clk_disable_bulk() when CONFIG_CLK is desactivated. That avoid compilation issue (undefined reference to `clk_disable_bulk') for code: clk_disable_bulk(>clks); clk_release_bulk(>clks); Signed-off-by: Patrick Delaunay ---

Re: [U-Boot] [PATCH v2 3/4] drivers: mux: mmio-based syscon mux controller

2019-11-08 Thread Jean-Jacques Hiblot
On 08/11/2019 13:16, Alexandru Marginean wrote: Hi JJ, On 11/5/2019 12:50 PM, Jean-Jacques Hiblot wrote: This adds a driver for mmio-based syscon multiplexers controlled by bitfields in a syscon register range. This is heavily based on the linux mmio-mux driver. Signed-off-by: Jean-Jacques

Re: [U-Boot] [PATCH v1 2/3] drivers: reset: Add a managed API to get reset controllers from the DT

2019-11-05 Thread Jean-Jacques Hiblot
On 05/11/2019 17:42, Simon Goldschmidt wrote: Am 05.11.2019 um 17:33 schrieb Simon Glass: Hi Jean-Jacques, On Mon, 4 Nov 2019 at 08:41, Jean-Jacques Hiblot wrote: On 30/10/2019 02:48, Simon Glass wrote: On Mon, 30 Sep 2019 at 10:15, Jean-Jacques Hiblot wrote: Add managed functions

Re: [U-Boot] [PATCH v2 2/4] dm: board: complete the initialization of the muxes in initr_dm()

2019-11-05 Thread Jean-Jacques Hiblot
On 05/11/2019 14:05, Vignesh Raghavendra wrote: Hi JJ, On 05/11/19 5:20 PM, Jean-Jacques Hiblot wrote: This will probe the multiplexer devices that have a "u-boot,mux-autoprobe" property. As a consequence they will be put in their idle state. Signed-off-by: Jean-Jacq

[U-Boot] [PATCH v2 0/4] drivers: Add a framework for MUX drivers

2019-11-05 Thread Jean-Jacques Hiblot
the definition of dm_mux_init() in this commit - Call sandbox_set_enable_memio(true) before running the test Jean-Jacques Hiblot (4): drivers: Add a new framework for multiplexer devices dm: board: complete the initialization of the muxes in initr_dm() drivers: mux: mmio-based syscon mux

[U-Boot] [PATCH v2 1/4] drivers: Add a new framework for multiplexer devices

2019-11-05 Thread Jean-Jacques Hiblot
Add a new subsystem that handles multiplexer controllers. The API is the same as in Linux. Signed-off-by: Jean-Jacques Hiblot --- Changes in v2: - Fixed warning in mux_of_xlate_default() - Improved documentation - Fixed SPL build drivers/Kconfig | 2 + drivers/Makefile

[U-Boot] [PATCH v2 2/4] dm: board: complete the initialization of the muxes in initr_dm()

2019-11-05 Thread Jean-Jacques Hiblot
This will probe the multiplexer devices that have a "u-boot,mux-autoprobe" property. As a consequence they will be put in their idle state. Signed-off-by: Jean-Jacques Hiblot --- Changes in v2: - insert the mux initialization in init_sequence_r[], just before the console is initiali

[U-Boot] [PATCH v2 4/4] test: Add tests for the multiplexer framework

2019-11-05 Thread Jean-Jacques Hiblot
Provide tests to check the behavior of the multiplexer framework. The test uses a mmio-based multiplexer. Signed-off-by: Jean-Jacques Hiblot --- Changes in v2: - Call sandbox_set_enable_memio(true) before running the test arch/sandbox/dts/test.dts | 26 +++ configs/sandbox_defconfig

[U-Boot] [PATCH v2 3/4] drivers: mux: mmio-based syscon mux controller

2019-11-05 Thread Jean-Jacques Hiblot
This adds a driver for mmio-based syscon multiplexers controlled by bitfields in a syscon register range. This is heavily based on the linux mmio-mux driver. Signed-off-by: Jean-Jacques Hiblot --- Changes in v2: None drivers/mux/Kconfig | 15 + drivers/mux/Makefile | 1 + drivers/mux

[U-Boot] [PATCH v2 3/4] regmap: Add support for regmap fields

2019-11-05 Thread Jean-Jacques Hiblot
A regmap field is an abstraction available in Linux. It provides to access bitfields in a regmap without having to worry about shifts and masks. Signed-off-by: Jean-Jacques Hiblot Reviewed-by: Simon Glass --- Changes in v2: None drivers/core/regmap.c | 77

[U-Boot] [PATCH v2 4/4] test: dm: Add tests for regmap managed API and regmap fields

2019-11-05 Thread Jean-Jacques Hiblot
-by: Jean-Jacques Hiblot Reviewed-by: Simon Glass --- Changes in v2: None arch/sandbox/dts/test.dts | 13 +++ test/dm/regmap.c | 189 ++ 2 files changed, 202 insertions(+) diff --git a/arch/sandbox/dts/test.dts b/arch/sandbox/dts/test.dts index

[U-Boot] [PATCH v2 2/4] regmap: Allow providing read/write callbacks through struct regmap_config

2019-11-05 Thread Jean-Jacques Hiblot
Some linux drivers provide their own read/write functions to access data from/of the regmap. Adding support for it. Signed-off-by: Jean-Jacques Hiblot --- Changes in v2: - Only use custom accessors if {,SPL,TPL}_REGMAP_ACCESSORS is enabled drivers/core/Kconfig | 25

[U-Boot] [PATCH v2 0/4] regmap: Add a managed API, custom read/write callbacks and support for regmap fields

2019-11-05 Thread Jean-Jacques Hiblot
as linux. It also adds support for regmap fields and for custom read/write callbacks. Changes in v2: - Fix comment for devm_regmap_init() - Fix spelling in commit log - Only use custom accessors if {,SPL,TPL}_REGMAP_ACCESSORS is enabled Jean-Jacques Hiblot (4): regmap: Add devm_regmap_init

[U-Boot] [PATCH v2 1/4] regmap: Add devm_regmap_init()

2019-11-05 Thread Jean-Jacques Hiblot
Most of new linux drivers are using managed-API to allocate resources. To ease porting drivers from linux to U-Boot, introduce devm_regmap_init() as a managed API to get a regmap from the device tree. Signed-off-by: Jean-Jacques Hiblot Reviewed-by: Simon Glass --- Changes in v2: - Fix comment

Re: [U-Boot] [PATCH v1 3/4] drivers: mux: mmio-based syscon mux controller

2019-11-04 Thread Jean-Jacques Hiblot
Simon, On 30/10/2019 02:48, Simon Glass wrote: On Wed, 2 Oct 2019 at 06:47, Jean-Jacques Hiblot wrote: This adds a driver for mmio-based syscon multiplexers controlled by bitfields in a syscon register range. This is heavily based on the linux mmio-mux driver. Signed-off-by: Jean-Jacques

Re: [U-Boot] [PATCH v1 2/4] dm: board: complete the initialization of the muxes in initr_dm()

2019-11-04 Thread Jean-Jacques Hiblot
On 30/10/2019 02:48, Simon Glass wrote: Hi Jean-Jacques, On Wed, 2 Oct 2019 at 06:47, Jean-Jacques Hiblot wrote: This will probe the multiplexer devices that have a "u-boot,mux-autoprobe" property. As a consequence they will be put in their idle state. Signed-off-by: Jean-Jacq

Re: [U-Boot] [PATCH v1 1/4] drivers: Add a new framework for multiplexer devices

2019-11-04 Thread Jean-Jacques Hiblot
Hi Simon, Thank for the review. On 30/10/2019 02:48, Simon Glass wrote: Hi Jean-Jacques, On Wed, 2 Oct 2019 at 06:47, Jean-Jacques Hiblot wrote: Add a new subsystem that handles multiplexer controllers. The API is the same as in Linux. Signed-off-by: Jean-Jacques Hiblot --- drivers

Re: [U-Boot] [PATCH v1 3/5] regmap: Allow providing read/write callbacks through struct regmap_config

2019-11-04 Thread Jean-Jacques Hiblot
On 30/10/2019 02:48, Simon Glass wrote: Hi Jean-Jacques, On Fri, 27 Sep 2019 at 07:22, Jean-Jacques Hiblot wrote: Some linux drivers provide their own read/write functions to access data from/of the regmap. Adding support for it. Signed-off-by: Jean-Jacques Hiblot --- drivers/core

Re: [U-Boot] [PATCH v1 2/3] drivers: reset: Add a managed API to get reset controllers from the DT

2019-11-04 Thread Jean-Jacques Hiblot
On 30/10/2019 02:48, Simon Glass wrote: On Mon, 30 Sep 2019 at 10:15, Jean-Jacques Hiblot wrote: Add managed functions to get a reset_ctl from the device-tree, based on a name or an index. Also add a managed functions to get a reset_ctl_bulk (array of reset_ctl) from the device-tree. When

Re: [U-Boot] [PATCH 4/5] dm: regmap: Fix mask in regmap_update_bits()

2019-10-25 Thread Jean-Jacques Hiblot
to write + * @val: Value to OR with the read value after masking. Note that any + * bits set in @val which are not set in @mask are ignored * Return: 0 if OK, -ve on error */ int regmap_update_bits(struct regmap *map, uint offset, uint mask, uint val); Reviewed-by: Jean-Jacque

Re: [U-Boot] [PATCH v1 4/4] test: Add tests for the multiplexer framework

2019-10-25 Thread Jean-Jacques Hiblot
Hi Tom, On 25/10/2019 01:45, Tom Rini wrote: On Wed, Oct 02, 2019 at 02:47:49PM +0200, Jean-Jacques Hiblot wrote: Provide tests to check the behavior of the multiplexer framework. The test uses a mmio-based multiplexer. Signed-off-by: Jean-Jacques Hiblot These tests don't pass (with all

Re: [U-Boot] [PATCH] usb: composite: add BOS descriptor support to composite framework

2019-10-24 Thread Jean-Jacques Hiblot
+ Vignesh and Roger On 24/10/2019 13:22, Michal Simek wrote: po 14. 10. 2019 v 14:52 odesílatel Michal Simek napsal: From: T Karthik Reddy To add usb-3.0 support to peripheral device add BOS & SS capability descriptors to gadget composite framework. Signed-off-by: T Karthik Reddy

[U-Boot] [PATCH] configs: sei610: khadas-vim3 : disable Gadget support for the DWC3

2019-10-24 Thread Jean-Jacques Hiblot
Those platform use the DWC2 controller for the gadget support and the DWC3 for host-only operations. Signed-off-by: Jean-Jacques Hiblot --- Applies on u-boot/master. Fixes build breakage introduced by "usb: dwc3: Kconfig: get rid of obsolete mode selection" configs/khadas-vim3_def

[U-Boot] [PATCH PATCH v6 00/13] Add support for applications of overlays in SPL

2019-10-22 Thread Jean-Jacques Hiblot
- update the commit log - reworked board_fit_get_additionnal_images() and how it used in spl_fit.c - removed dtbo generation from dtso files and use .dts extension for the overlays - add dynamic allocation usage in a separate patch - defconfig change for the am335x_evm Jean-Jacques Hiblot (12): spl

[U-Boot] [PATCH PATCH v6 12/13] dts: Add support for adding DT overlays in u-boot.img

2019-10-22 Thread Jean-Jacques Hiblot
If u-boot.img is a FIT image, CONFIG_OF_OVERLAY_LIST can be used to add DT overlays to u-boot.img. Signed-off-by: Jean-Jacques Hiblot --- Changes in v6: None Changes in v5: None Changes in v4: None Changes in v3: None Changes in v2: None Makefile| 3 ++- dts/Kconfig | 8 2 files

[U-Boot] [PATCH PATCH v6 13/13] spl: fit: Allow the board to tell if more images must be loaded from FIT

2019-10-22 Thread Jean-Jacques Hiblot
a handful of images. To address this problem, give the board driver code the opportunity to add to the list of images. The images from the FIT property are loaded first, and then the board_get_fit_loadable() is called to get more image names. Signed-off-by: Jean-Jacques Hiblot --- Changes in v6

[U-Boot] [PATCH PATCH v6 09/13] drivers: board: Make the board drivers available in SPL

2019-10-22 Thread Jean-Jacques Hiblot
Make the board driver available in the SPL too. The board driver is a way to provide useful information about the board and that can be useful in the SPL too. Signed-off-by: Jean-Jacques Hiblot Reviewed-by: Simon Glass --- Changes in v6: None Changes in v5: None Changes in v4: None Changes

[U-Boot] [PATCH PATCH v6 06/13] spl: fit: be more verbose when an error occurs when applying the overlays

2019-10-22 Thread Jean-Jacques Hiblot
and at least show which overlay is failing. Signed-off-by: Jean-Jacques Hiblot Reviewed-by: Simon Glass --- Changes in v6: None Changes in v5: None Changes in v4: None Changes in v3: None Changes in v2: None common/spl/spl_fit.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions

[U-Boot] [PATCH PATCH v6 04/13] spl: fit: allocate a temporary buffer to load the overlays

2019-10-22 Thread Jean-Jacques Hiblot
-off-by: Jean-Jacques Hiblot --- Changes in v6: None Changes in v5: - Do not allocate the buffer if not needed (no overlay). - Add a Kconfig option for the buffer size Changes in v4: - make sure that the temp buffer is freed in all cases Changes in v3: None Changes in v2: None Kconfig

[U-Boot] [PATCH PATCH v6 10/13] drivers: board: Add get_fit_loadable()

2019-10-22 Thread Jean-Jacques Hiblot
This function will be used by the SPL to get the names of images to load from the FIT. This allows to load different images based on runtime HW detection. Signed-off-by: Jean-Jacques Hiblot --- Changes in v6: None Changes in v5: - board_get_fit_loadable() returns an error code instead

[U-Boot] [PATCH PATCH v6 02/13] spl: fit: Add support for applying DT overlay

2019-10-22 Thread Jean-Jacques Hiblot
feature. Signed-off-by: Michal Simek Signed-off-by: Jean-Jacques Hiblot Reviewed-by: Simon Glass --- Changes in v6: None Changes in v5: None Changes in v4: - use CONFIG_IS_ENABLED() instead of #idef Changes in v3: - Add a new config option: SPL_LOAD_FIT_APPLY_OVERLAY. By default,

[U-Boot] [PATCH PATCH v6 07/13] Makefile.lib: include /__symbols__ in dtb if SPL_LOAD_FIT_APPLY_OVERLAY is enabled

2019-10-22 Thread Jean-Jacques Hiblot
In order to apply an overlay to a DTB. The DTB must have been generated with the option '-@'. Signed-off-by: Jean-Jacques Hiblot Reviewed-by: Simon Glass --- Changes in v6: None Changes in v5: None Changes in v4: None Changes in v3: None Changes in v2: None scripts/Makefile.lib | 4 1

[U-Boot] [PATCH PATCH v6 01/13] spl: fit: don't load the firmware twice

2019-10-22 Thread Jean-Jacques Hiblot
The firmware is referenced twice. Once by the 'firmware' property and once by the 'loadables' property. Currently this result in the firmware being loaded twice. This is not a big problem but has an impact on the boot time. Fixing it by not loading a loadable image if it is also the firmware image. Sign

[U-Boot] [PATCH PATCH v6 08/13] spl: fit: constify the output parameter of spl_fit_get_image_name()

2019-10-22 Thread Jean-Jacques Hiblot
There is no need for it to be non-constant. Making it constant, allows to return constant string without warning. Signed-off-by: Jean-Jacques Hiblot Reviewed-by: Simon Glass --- Changes in v6: None Changes in v5: None Changes in v4: None Changes in v3: None Changes in v2: None common/spl

[U-Boot] [PATCH PATCH v6 11/13] include: board: provide empty stubs when the BOARD option is not selected

2019-10-22 Thread Jean-Jacques Hiblot
Useful to avoid #ifdef throughout the code that uses the board driver API. Signed-off-by: Jean-Jacques Hiblot Reviewed-by: Simon Glass --- Changes in v6: None Changes in v5: None Changes in v4: None Changes in v3: None Changes in v2: None include/board.h | 37

[U-Boot] [PATCH PATCH v6 03/13] spl: fit: Make room in the FDT before applying overlays

2019-10-22 Thread Jean-Jacques Hiblot
on the loadables. Signed-off-by: Jean-Jacques Hiblot Reviewed-by: Simon Glass --- Changes in v6: None Changes in v5: None Changes in v4: None Changes in v3: None Changes in v2: None common/spl/spl_fit.c | 17 - 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/common/spl

[U-Boot] [PATCH PATCH v6 05/13] spl: fit: Do not fail immediately if an overlay is not available

2019-10-22 Thread Jean-Jacques Hiblot
If one overlay that must be applied cannot be found in the FIT, the current implementation stops applying the overlays. Let's make it skip only the failing overlay instead. Signed-off-by: Jean-Jacques Hiblot Reviewed-by: Simon Glass --- Changes in v6: None Changes in v5: None Changes in v4

Re: [U-Boot] [PATCH 1/3] cmd: fru: Add support for FRU commands

2019-10-22 Thread Jean-Jacques Hiblot
On 14/10/2019 15:29, Michal Simek wrote: From: Siva Durga Prasad Paladugu This patch adds support for fru commands "fru capture" and "fru display". The fru capture parses the FRU table present at an address and stores in a structure for later use. The fru display prints the content of

[U-Boot] [PATCH v2 0/5] clk: Add a managed API and fix clock self-assignment

2019-10-22 Thread Jean-Jacques Hiblot
as linux. It also fix a use-case where the clock is initialized (rate and/or mux) when it is probed using the assigned-clocks-* properties. Changes in v2: - Add clk_prepare_enable/clk_disable_unprepare - remove conflicting implmentations from brcmnand_compat.{c,h} Jean-Jacques Hiblot (5): drivers

[U-Boot] [PATCH v2 4/5] drivers: clk: Fix using assigned-clocks in the node of the clock it sets up

2019-10-22 Thread Jean-Jacques Hiblot
on) Making it work by handling "assigned-clocks" in 2 steps: first before the clk device is probed, and then after the clk device is probed. Signed-off-by: Jean-Jacques Hiblot --- Changes in v2: None drivers/clk/clk-uclass.c | 48 +++- drivers

[U-Boot] [PATCH v2 1/5] drivers: clk: Handle gracefully NULL pointers

2019-10-22 Thread Jean-Jacques Hiblot
Prepare the way for a managed CLK API by handling NULL pointers without crashing nor failing. Signed-off-by: Jean-Jacques Hiblot --- Changes in v2: None drivers/clk/clk-uclass.c | 43 +--- include/clk.h| 2 +- 2 files changed, 37 insertions

[U-Boot] [PATCH v2 2/5] drivers: clk: Add a managed API to get clocks from the device-tree

2019-10-22 Thread Jean-Jacques Hiblot
Add devm_clk_get(), devm_clk_get_optional() to get clocks from the device-tree. The clocks is automatically released and the data structure freed when the device is unbound. Also add devm_clk_put() to release the clock and free the data structure manually. Signed-off-by: Jean-Jacques Hiblot

[U-Boot] [PATCH v2 3/5] test: clk: Update tests to also check the managed API

2019-10-22 Thread Jean-Jacques Hiblot
Add a few more clocks the clk_sandbox clock provider and get them using the managed API. Make sure they are released when the device is removed. Signed-off-by: Jean-Jacques Hiblot --- Changes in v2: None arch/sandbox/dts/test.dts | 6 ++-- arch/sandbox/include/asm/clk.h | 33

[U-Boot] [PATCH v2 5/5] test: clk: test clock self assignment

2019-10-22 Thread Jean-Jacques Hiblot
Make sure that the clock self-assignment works by having a clock of clk-sbox be configured automatically when clk-sbox is probed. Signed-off-by: Jean-Jacques Hiblot --- Changes in v2: None arch/sandbox/dts/test.dts | 2 ++ drivers/clk/clk_sandbox.c | 22 ++ test/dm/clk.c

Re: [U-Boot] [PATCH v1 1/3] drivers: gpio: Handle gracefully NULL pointers

2019-10-22 Thread Jean-Jacques Hiblot
On 22/10/2019 00:53, Simon Glass wrote: Hi Jean-Jacques, On Mon, 21 Oct 2019 at 01:45, Jean-Jacques Hiblot wrote: On 18/10/2019 22:38, Simon Glass wrote: Hi Jean-Jacques, On Tue, 1 Oct 2019 at 05:51, Jean-Jacques Hiblot wrote: Prepare the way for a managed GPIO API by handling NULL

[U-Boot] [PATCH v2] fdt: Fix alignment issue when reading 64-bits properties from fdt

2019-10-22 Thread Jean-Jacques Hiblot
-Jacques Hiblot --- Here is a portion of the disassembly of ofnode_read_u64(). It show the effect of the patch on ARM64. with the classic fdt64_t type. GCC emits LDR (load register) 34: 54000109b.ls54 // b.plast 38: f940ldr x0, [x0] 3c: dac00c00

Re: [U-Boot] [PATCH] fdt: Fix alignment issue when reading 64-bits properties

2019-10-22 Thread Jean-Jacques Hiblot
Hi Simon, On 22/10/2019 01:46, Simon Glass wrote: Hi Jean-Jacques, On Mon, 21 Oct 2019 at 06:50, Jean-Jacques Hiblot wrote: The FDT specification [0] gives a requirement of aligning properties on 32-bits. Make sure that the compiler is aware of this constraint when accessing 64-bits

[U-Boot] [PATCH] fdt: Fix alignment issue when reading 64-bits properties

2019-10-21 Thread Jean-Jacques Hiblot
-Jacques Hiblot --- common/fdt_support.c | 2 +- drivers/core/ofnode.c | 2 +- lib/fdtdec.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/common/fdt_support.c b/common/fdt_support.c index baf7924ff6..d14cf7f61a 100644 --- a/common/fdt_support.c +++ b/common

Re: [U-Boot] [PATCH v1 1/3] drivers: gpio: Handle gracefully NULL pointers

2019-10-21 Thread Jean-Jacques Hiblot
On 18/10/2019 22:38, Simon Glass wrote: Hi Jean-Jacques, On Tue, 1 Oct 2019 at 05:51, Jean-Jacques Hiblot wrote: Prepare the way for a managed GPIO API by handling NULL pointers without crashing nor failing. VALIDATE_DESC() and validate_desc() come straight from Linux. Signed-off-by: Jean

Re: [U-Boot] [PULL] u-boot-usb/master

2019-10-15 Thread Jean-Jacques Hiblot
On 15/10/2019 11:36, Jean-Jacques Hiblot wrote: Hi Marek, On 15/10/2019 03:01, Marek Vasut wrote: On 10/15/19 2:59 AM, Tom Rini wrote: On Tue, Oct 15, 2019 at 01:34:57AM +0200, Marek Vasut wrote: The following changes since commit 44fb0d6c9f5147a41c710032869e5e01b3c9e310:    Merge tag

Re: [U-Boot] [PULL] u-boot-usb/master

2019-10-15 Thread Jean-Jacques Hiblot
Hi Marek, On 15/10/2019 03:01, Marek Vasut wrote: On 10/15/19 2:59 AM, Tom Rini wrote: On Tue, Oct 15, 2019 at 01:34:57AM +0200, Marek Vasut wrote: The following changes since commit 44fb0d6c9f5147a41c710032869e5e01b3c9e310: Merge tag 'xilinx-for-v2020.01' of

Re: [U-Boot] [PATCH 0/8] usb: Add support for Cadence USB controller driver

2019-10-11 Thread Jean-Jacques Hiblot
ns3/trace.c create mode 100644 drivers/usb/cdns3/trace.h I tested the series for Host and device operations on  with a J721e-evm. As expected, USB3 is not yet supported on the J721e because the driver for the USB3 phy is not there yet. Tested-by: Jean-Jacques Hib

[U-Boot] [RESEND PATCH v1 1/3] ARM: dts: dra7: Add usb peripheral nodes in spl

2019-10-09 Thread Jean-Jacques Hiblot
From: Faiz Abbas Add usb peripheral and usb phy nodes in spl to enable SPL_DFU bootmode. Signed-off-by: Faiz Abbas Signed-off-by: Jean-Jacques Hiblot --- arch/arm/dts/dra7-evm-u-boot.dtsi | 17 + arch/arm/dts/dra71-evm-u-boot.dtsi | 17 + arch/arm

[U-Boot] [RESEND PATCH v1 0/3] Add support for DFU boot to DRA7-based EVMs

2019-10-09 Thread Jean-Jacques Hiblot
The purpose of this series is to provide the SPL with ability to boot u-boot from DFU. The DRA7x can download the SPL over the USB1 port when configured in the USB peripheral boot mode. Details on how this can be acheived with the EVMs can found here http://www.ti.com/lit/an/sprac33/sprac33.pdf

[U-Boot] [RESEND PATCH v1 3/3] configs: dra7xx_evm: Increase the size of SPL_MULTI_DTB_FIT

2019-10-09 Thread Jean-Jacques Hiblot
From: Faiz Abbas Expand SPL_MULTI_DTB_FIT to accommodate usb peripheral nodes being added to support SPL_DFU bootmode. Signed-off-by: Faiz Abbas Signed-off-by: Jean-Jacques Hiblot --- configs/dra7xx_evm_defconfig| 2 +- configs/dra7xx_hs_evm_defconfig | 2 +- 2 files changed, 2

[U-Boot] [RESEND PATCH v1 2/3] configs: dra7xx_evm: Add Kconfigs for SPL_DFU bootmode

2019-10-09 Thread Jean-Jacques Hiblot
From: Faiz Abbas Enable configs for supporting SPL_DFU bootmode. Signed-off-by: Faiz Abbas Signed-off-by: Jean-Jacques Hiblot --- configs/dra7xx_evm_defconfig| 6 ++ configs/dra7xx_hs_evm_defconfig | 6 ++ 2 files changed, 12 insertions(+) diff --git a/configs

Re: [U-Boot] [PATCH v5 10/15] Makefile: Query the SPL Fit Generator for its dependencies

2019-10-09 Thread Jean-Jacques Hiblot
On 07/10/2019 18:02, Tom Rini wrote: On Mon, Oct 07, 2019 at 11:43:07AM +0200, Jean-Jacques Hiblot wrote: On 06/10/2019 19:12, Tom Rini wrote: On Sun, Oct 06, 2019 at 04:57:29PM +, Auer, Lukas wrote: Hi Jean-Jacques, On Fri, 2019-09-20 at 17:28 +0200, Jean-Jacques Hiblot wrote

Re: [U-Boot] [PATCH v5 10/15] Makefile: Query the SPL Fit Generator for its dependencies

2019-10-07 Thread Jean-Jacques Hiblot
On 06/10/2019 19:12, Tom Rini wrote: On Sun, Oct 06, 2019 at 04:57:29PM +, Auer, Lukas wrote: Hi Jean-Jacques, On Fri, 2019-09-20 at 17:28 +0200, Jean-Jacques Hiblot wrote: To reduce the complexity of the Makefile, let the generator tell what its dependencies are. For this purpose use

[U-Boot] [PATCH v1 4/4] test: Add tests for the multiplexer framework

2019-10-02 Thread Jean-Jacques Hiblot
Provide tests to check the behavior of the multiplexer framework. The test uses a mmio-based multiplexer. Signed-off-by: Jean-Jacques Hiblot --- arch/sandbox/dts/test.dts | 26 +++ configs/sandbox_defconfig | 2 + test/dm/Makefile | 1 + test/dm/mux-mmio.c| 143

[U-Boot] [PATCH v1 1/4] drivers: Add a new framework for multiplexer devices

2019-10-02 Thread Jean-Jacques Hiblot
Add a new subsystem that handles multiplexer controllers. The API is the same as in Linux. Signed-off-by: Jean-Jacques Hiblot --- drivers/Kconfig | 2 + drivers/Makefile | 1 + drivers/mux/Kconfig | 7 + drivers/mux/Makefile | 6 + drivers

[U-Boot] [PATCH v1 2/4] dm: board: complete the initialization of the muxes in initr_dm()

2019-10-02 Thread Jean-Jacques Hiblot
This will probe the multiplexer devices that have a "u-boot,mux-autoprobe" property. As a consequence they will be put in their idle state. Signed-off-by: Jean-Jacques Hiblot --- common/board_r.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/board_r.c b/common/board

[U-Boot] [PATCH v1 0/4] drivers: Add a framework for MUX drivers

2019-10-02 Thread Jean-Jacques Hiblot
] : https://patchwork.ozlabs.org/project/uboot/list/?series=132923 [2] : https://patchwork.ozlabs.org/project/uboot/list/?series=133713 Jean-Jacques Hiblot (4): drivers: Add a new framework for multiplexer devices dm: board: complete the initialization of the muxes in initr_dm() drivers: mux

[U-Boot] [PATCH v1 3/4] drivers: mux: mmio-based syscon mux controller

2019-10-02 Thread Jean-Jacques Hiblot
This adds a driver for mmio-based syscon multiplexers controlled by bitfields in a syscon register range. This is heavily based on the linux mmio-mux driver. Signed-off-by: Jean-Jacques Hiblot --- drivers/mux/Kconfig | 15 + drivers/mux/Makefile | 1 + drivers/mux/mmio.c | 155

[U-Boot] [PATCH v1 0/2] sandbox: Fixes the regmap tests

2019-10-02 Thread Jean-Jacques Hiblot
The sandbox architecture does not implement the writeX nor readX functions. This prevents testing properly the regmaps and the other stuff relying on it. Jean-Jacques Hiblot (2): arch: sandbox: Provide working writeX/readX functions test: regmap: check the values read from the regmap arch

[U-Boot] [PATCH v1 1/2] arch: sandbox: Provide working writeX/readX functions

2019-10-02 Thread Jean-Jacques Hiblot
Those functions are used by the regmap core. Without them regmaps are not working on sandbox. The implementation is taken from arch/x86/include/asm/io.h. Signed-off-by: Jean-Jacques Hiblot --- arch/sandbox/include/asm/io.h | 18 +- 1 file changed, 9 insertions(+), 9 deletions

[U-Boot] [PATCH v1 2/2] test: regmap: check the values read from the regmap

2019-10-02 Thread Jean-Jacques Hiblot
The test did reads after writes but didn't check the value. It probably was because the sandbox didn't implement the writeX/readX functions. Signed-off-by: Jean-Jacques Hiblot --- test/dm/regmap.c | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/test/dm

[U-Boot] [PATCH] drivers: phy: Handle gracefully NULL pointers

2019-10-01 Thread Jean-Jacques Hiblot
For some controllers PHYs can be optional. Handling NULL pointers without crashing nor failing, makes it easy to handle optional PHYs. Signed-off-by: Jean-Jacques Hiblot --- drivers/phy/phy-uclass.c | 30 +- include/generic-phy.h| 2 +- 2 files changed, 26

[U-Boot] [PATCH v1 3/3] test: gpio: Add tests for the managed API

2019-10-01 Thread Jean-Jacques Hiblot
Add a test to verify that GPIOs can be acquired/released using the managed API. Also check that the GPIOs are released when the consumer device is removed. Signed-off-by: Jean-Jacques Hiblot --- arch/sandbox/dts/test.dts | 10 test/dm/gpio.c| 102

[U-Boot] [PATCH v1 1/3] drivers: gpio: Handle gracefully NULL pointers

2019-10-01 Thread Jean-Jacques Hiblot
Prepare the way for a managed GPIO API by handling NULL pointers without crashing nor failing. VALIDATE_DESC() and validate_desc() come straight from Linux. Signed-off-by: Jean-Jacques Hiblot --- drivers/gpio/gpio-uclass.c | 66 -- include/asm-generic/gpio.h

[U-Boot] [PATCH v1 2/3] drivers: gpio: Add a managed API to get a GPIO from the device-tree

2019-10-01 Thread Jean-Jacques Hiblot
Add managed functions to get a gpio from the devce-tree, based on a property name (minus the '-gpios' suffix) and optionally an index. When the device is unbound, the GPIO is automatically released and the data structure is freed. Signed-off-by: Jean-Jacques Hiblot --- drivers/gpio/gpio

[U-Boot] [PATCH v1 0/3] gpio: Add a managed API

2019-10-01 Thread Jean-Jacques Hiblot
. To make it 100% compatible with linux, there is a small deviation from u-boot's way of naming the gpio lists: the managed equivalent of gpio_request_by_name(..,"blabla-gpios", ...) is devm_gpiod_get_index(..., "blabla", ...) Jean-Jacques Hiblot (3): drivers: gpio: Handle grac

[U-Boot] [PATCH v1 3/3] test: reset: Add tests for the managed API

2019-09-30 Thread Jean-Jacques Hiblot
The tests are basically the same as for the regular API. Except that the reset are initialized using the managed API, and no freed manually. Signed-off-by: Jean-Jacques Hiblot --- arch/sandbox/include/asm/reset.h | 1 + drivers/reset/sandbox-reset-test.c | 50

[U-Boot] [PATCH v1 1/3] drivers: reset: Handle gracefully NULL pointers

2019-09-30 Thread Jean-Jacques Hiblot
Prepare the way for a managed reset API by handling NULL pointers without crashing nor failing. Signed-off-by: Jean-Jacques Hiblot --- drivers/reset/reset-uclass.c | 30 +- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/drivers/reset/reset-uclass.c

[U-Boot] [PATCH v1 2/3] drivers: reset: Add a managed API to get reset controllers from the DT

2019-09-30 Thread Jean-Jacques Hiblot
. Signed-off-by: Jean-Jacques Hiblot --- drivers/reset/reset-uclass.c | 116 +- include/reset.h | 135 ++- 2 files changed, 247 insertions(+), 4 deletions(-) diff --git a/drivers/reset/reset-uclass.c b/drivers/reset/reset

[U-Boot] [PATCH v1 0/3] reset: Add a managed API

2019-09-30 Thread Jean-Jacques Hiblot
to that of linux. The main difference is that bulk and reset_ctl are handled with different functions. Jean-Jacques Hiblot (3): drivers: reset: Handle gracefully NULL pointers drivers: reset: Add a managed API to get reset controllers from the DT test: reset: Add tests for the managed API arch

[U-Boot] [PATCH v1 4/5] drivers: clk: Fix using assigned-clocks in the node of the clock it sets up

2019-09-30 Thread Jean-Jacques Hiblot
on) Making it work by handling "assigned-clocks" in 2 steps: first before the clk device is probed, and then after the clk device is probed. Signed-off-by: Jean-Jacques Hiblot --- drivers/clk/clk-uclass.c | 48 +++- drivers/core/device.c| 2 +- inclu

[U-Boot] [PATCH v1 5/5] test: clk: test clock self assignment

2019-09-30 Thread Jean-Jacques Hiblot
Make sure that the clock self-assignment works by having a clock of clk-sbox be configured automatically when clk-sbox is probed. Signed-off-by: Jean-Jacques Hiblot --- arch/sandbox/dts/test.dts | 2 ++ drivers/clk/clk_sandbox.c | 22 ++ test/dm/clk.c | 4

[U-Boot] [PATCH v1 1/5] drivers: clk: Handle gracefully NULL pointers

2019-09-30 Thread Jean-Jacques Hiblot
Prepare the way for a managed CLK API by handling NULL pointers without crashing nor failing. Signed-off-by: Jean-Jacques Hiblot --- drivers/clk/clk-uclass.c | 43 +--- include/clk.h| 2 +- 2 files changed, 37 insertions(+), 8 deletions(-) diff

[U-Boot] [PATCH v1 0/5] clk: Add a managed API and fix clock self-assignment

2019-09-30 Thread Jean-Jacques Hiblot
as linux. It also fix a use-case where the clock is initialized (rate and/or mux) when it is probed using the assigned-clocks-* properties. JJ Jean-Jacques Hiblot (5): drivers: clk: Handle gracefully NULL pointers drivers: clk: Add a managed API to get clocks from the device-tree test: clk

[U-Boot] [PATCH v1 2/5] drivers: clk: Add a managed API to get clocks from the device-tree

2019-09-30 Thread Jean-Jacques Hiblot
Add devm_clk_get(), devm_clk_get_optional() to get clocks from the device-tree. The clocks is automatically released and the data structure freed when the device is unbound. Also add devm_clk_put() to release the clock and free the data structure manually. Signed-off-by: Jean-Jacques Hiblot

[U-Boot] [PATCH v1 3/5] test: clk: Update tests to also check the managed API

2019-09-30 Thread Jean-Jacques Hiblot
Add a few more clocks the clk_sandbox clock provider and get them using the managed API. Make sure they are released when the device is removed. Signed-off-by: Jean-Jacques Hiblot --- arch/sandbox/dts/test.dts | 6 ++-- arch/sandbox/include/asm/clk.h | 33 + drivers/clk

[U-Boot] [PATCH v1 3/5] regmap: Allow providing read/write callbacks through struct regmap_config

2019-09-27 Thread Jean-Jacques Hiblot
Some linux drivers provide their own read/write functions to access data from/of the regmap. Adding support for it. Signed-off-by: Jean-Jacques Hiblot --- drivers/core/regmap.c | 12 include/regmap.h | 26 +++--- 2 files changed, 35 insertions(+), 3

[U-Boot] [PATCH v1 5/5] test: dm: Add tests for regmap managed API and regmap fields

2019-09-27 Thread Jean-Jacques Hiblot
-by: Jean-Jacques Hiblot --- arch/sandbox/dts/test.dts | 13 +++ test/dm/regmap.c | 189 ++ 2 files changed, 202 insertions(+) diff --git a/arch/sandbox/dts/test.dts b/arch/sandbox/dts/test.dts index 27b0baab27..044895586a 100644 --- a/arch/sandbox

[U-Boot] [PATCH v1 4/5] regmap: Add support for regmap fields

2019-09-27 Thread Jean-Jacques Hiblot
A regmap field is an abstraction available in Linux. It provides to access bitfields in a regmap without having to worry about shifts and masks. Signed-off-by: Jean-Jacques Hiblot --- drivers/core/regmap.c | 77 ++ include/regmap.h | 108

[U-Boot] [PATCH v1 2/5] regmap: Add devm_regmap_init()

2019-09-27 Thread Jean-Jacques Hiblot
Most of new linux drivers are using managed-API to allocate resources. To ease porting drivers from linux to u-boot, introduce devm_regmap_init() as a managed API to get a regmap from the device tree. Signed-off-by: Jean-Jacques Hiblot --- drivers/core/regmap.c | 26

[U-Boot] [PATCH v1 0/5] regmap: Add a managed API, custom read/write callbacks and support for regmap fields

2019-09-27 Thread Jean-Jacques Hiblot
as linux. It also adds support for regmap fields and for custom read/write callbacks. Jean-Jacques Hiblot (5): regmap: Fix potential overflow in regmap_update_bits() regmap: Add devm_regmap_init() regmap: Allow providing read/write callbacks through struct regmap_config regmap: Add

[U-Boot] [PATCH v1 1/5] regmap: Fix potential overflow in regmap_update_bits()

2019-09-27 Thread Jean-Jacques Hiblot
Mask the value to write so that it cannot affect the bits outside of the mask Signed-off-by: Jean-Jacques Hiblot --- drivers/core/regmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/core/regmap.c b/drivers/core/regmap.c index d1d12eef38..e9e55c9d16 100644

[U-Boot] [PATCH] dm: device: Fix typo in the non-DEVRES version of devm_kmalloc_array()

2019-09-26 Thread Jean-Jacques Hiblot
When DEVRES is not set, devm_kmalloc_array() is spelled devm_kmaloc_array() (with one 'l' only). Fixing it so that the name is the same with and without DEVRES. Signed-off-by: Jean-Jacques Hiblot --- include/dm/device.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[U-Boot] [PATCH] clk: Fix error check in clk_set_default_parents()

2019-09-26 Thread Jean-Jacques Hiblot
According to the documentation in clk.h, clk_set_parent() return the new rate of the clock or a negative error code. Signed-off-by: Jean-Jacques Hiblot --- drivers/clk/clk-uclass.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/clk-uclass.c b/drivers/clk/clk

[U-Boot] [PATCH v1 0/3] Add support for DFU boot to DRA7-based EVMs

2019-09-24 Thread Jean-Jacques Hiblot
The purpose of this series is to provide the SPL with ability to boot u-boot from DFU. The DRA7x can download the SPL over the USB1 port when configured in the USB peripheral boot mode. Details on how this can be acheived with the EVMs can found here http://www.ti.com/lit/an/sprac33/sprac33.pdf

[U-Boot] [PATCH v1 1/3] ARM: dts: dra7: Add usb peripheral nodes in spl

2019-09-24 Thread Jean-Jacques Hiblot
From: Faiz Abbas Add usb peripheral and usb phy nodes in spl to enable SPL_DFU bootmode. Signed-off-by: Faiz Abbas Signed-off-by: Jean-Jacques Hiblot --- arch/arm/dts/dra7-evm-u-boot.dtsi | 17 + arch/arm/dts/dra71-evm-u-boot.dtsi | 17 + arch/arm

[U-Boot] [PATCH v1 3/3] configs: dra7xx_evm: Increase the size of SPL_MULTI_DTB_FIT

2019-09-24 Thread Jean-Jacques Hiblot
From: Faiz Abbas Expand SPL_MULTI_DTB_FIT to accommodate usb peripheral nodes being added to support SPL_DFU bootmode. Signed-off-by: Faiz Abbas Signed-off-by: Jean-Jacques Hiblot --- configs/dra7xx_evm_defconfig| 2 +- configs/dra7xx_hs_evm_defconfig | 2 +- 2 files changed, 2

[U-Boot] [PATCH v1 2/3] configs: dra7xx_evm: Add Kconfigs for SPL_DFU bootmode

2019-09-24 Thread Jean-Jacques Hiblot
From: Faiz Abbas Enable configs for supporting SPL_DFU bootmode. Signed-off-by: Faiz Abbas Signed-off-by: Jean-Jacques Hiblot --- configs/dra7xx_evm_defconfig| 6 ++ configs/dra7xx_hs_evm_defconfig | 6 ++ 2 files changed, 12 insertions(+) diff --git a/configs

[U-Boot] FDT: alignment of 64-bits integers

2019-09-20 Thread Jean-Jacques Hiblot
Hi Simon, while working with the FDT in the SPL, I came across an alignment issue. I have seen 64-bits integers not aligned on a 64-bit boundary, although is doesn't happen very often. According to the FDT spec, the requirement is to be aligned on 32-bits, so it is OK. However on ARM64,

[U-Boot] [PATCH v5 00/15] Add support for applications of overlays in SPL

2019-09-20 Thread Jean-Jacques Hiblot
_evm Jean-Jacques Hiblot (14): spl: fit: don't load the firmware twice spl: fit: Make room in the FDT before applying overlays spl: fit: allocate a temporary buffer to load the overlays spl: fit: Do not fail immediately if an overlay is not available spl: fit: be more verbose when an er

[U-Boot] [PATCH v5 15/15] spl: fit: Allow the board to tell if more images must be loaded from FIT

2019-09-20 Thread Jean-Jacques Hiblot
a handful of images. To address this problem, give the board driver code the opportunity to add to the list of images. The images from the FIT property are loaded first, and then the board_get_fit_loadable() is called to get more image names. Signed-off-by: Jean-Jacques Hiblot --- Changes in v5

[U-Boot] [PATCH v5 07/15] Makefile.lib: include /__symbols__ in dtb if SPL_LOAD_FIT_APPLY_OVERLAY is enabled

2019-09-20 Thread Jean-Jacques Hiblot
In order to apply an overlay to a DTB. The DTB must have been generated with the option '-@'. Signed-off-by: Jean-Jacques Hiblot Reviewed-by: Simon Glass --- Changes in v5: None Changes in v4: None Changes in v3: None Changes in v2: None scripts/Makefile.lib | 4 1 file changed, 4

  1   2   3   4   5   6   7   8   9   10   >