Re: [PATCH v5] FIT: Parse `load` and `entry` addresses.

2020-08-11 Thread Christian Mauderer
Hello Sascha, thanks for the review. On 11/08/2020 09:57, Sascha Hauer wrote: > Hi Christian, > > On Wed, Jul 15, 2020 at 11:26:56AM +0200, Christian Mauderer wrote: >> According to the U-Boot documentation for the FIT file format, the load >> and entry have to be allways defined for a "kernel"

[PATCH v4 05/13] usb: dwc2: Rework timeout

2020-08-11 Thread Jules Maselbas
Signed-off-by: Jules Maselbas --- drivers/usb/dwc2/core.h | 22 -- drivers/usb/dwc2/host.c | 16 +++- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/drivers/usb/dwc2/core.h b/drivers/usb/dwc2/core.h index 94f992cb1..a2ec3ff68 100644 --- a/drivers/

[PATCH v4 02/13] usb: dwc2: Add host controller driver

2020-08-11 Thread Jules Maselbas
The host driver is taken from U-Boot (v2018.09-rc3) and mixed with some part from Linux, mainly the replacement of memory map structure in favor of the read/write functions. Signed-off-by: Jules Maselbas --- drivers/usb/Kconfig | 2 + drivers/usb/Makefile | 1 + drivers/usb/dwc2/K

[PATCH v4 12/13] usb: dwc2: Add gadget driver

2020-08-11 Thread Jules Maselbas
This driver is comes from Linux (~ 5.1-rc6) and only support buffer DMA. Signed-off-by: Jules Maselbas --- drivers/usb/dwc2/Kconfig |7 + drivers/usb/dwc2/Makefile |1 + drivers/usb/dwc2/core.c | 64 + drivers/usb/dwc2/core.h |7 + drivers/usb/dwc2/dwc2.c |2 + drivers/u

[PATCH v4 01/13] Revert "usb: Add dwc2 host driver"

2020-08-11 Thread Jules Maselbas
This reverts commit 69f8b20cc016dc3680d5acc20f43a3e52c0bff7e. Signed-off-by: Jules Maselbas --- drivers/usb/host/Kconfig |3 - drivers/usb/host/Makefile |1 - drivers/usb/host/dwc2.c | 1132 - drivers/usb/host/dwc2.h | 778 ---

[PATCH v4 13/13] usb: dwc2: Use register_otg_device

2020-08-11 Thread Jules Maselbas
Signed-off-by: Jules Maselbas --- drivers/usb/dwc2/dwc2.c | 29 ++--- drivers/usb/dwc2/dwc2.h | 4 ++-- 2 files changed, 28 insertions(+), 5 deletions(-) diff --git a/drivers/usb/dwc2/dwc2.c b/drivers/usb/dwc2/dwc2.c index 45be2c070..908d62479 100644 --- a/drivers/usb/dw

[PATCH v4 07/13] usb: dwc2: host: Dynamic fifo size support from Linux

2020-08-11 Thread Jules Maselbas
Signed-off-by: Jules Maselbas --- drivers/usb/dwc2/host.c | 146 ++-- drivers/usb/dwc2/regs.h | 8 --- 2 files changed, 124 insertions(+), 30 deletions(-) diff --git a/drivers/usb/dwc2/host.c b/drivers/usb/dwc2/host.c index ccc32ba04..8c116c5df 100644 --- a/

[PATCH v4 11/13] usb: dwc2: Add structure for gadget driver

2020-08-11 Thread Jules Maselbas
Signed-off-by: Jules Maselbas --- drivers/usb/dwc2/core.h | 55 + 1 file changed, 55 insertions(+) diff --git a/drivers/usb/dwc2/core.h b/drivers/usb/dwc2/core.h index a2ec3ff68..b188990a0 100644 --- a/drivers/usb/dwc2/core.h +++ b/drivers/usb/dwc2/core.h

[PATCH v4 06/13] usb: dwc2: host: Handle dma mapping errors

2020-08-11 Thread Jules Maselbas
Signed-off-by: Jules Maselbas --- drivers/usb/dwc2/host.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/usb/dwc2/host.c b/drivers/usb/dwc2/host.c index ea2facbc8..ccc32ba04 100644 --- a/drivers/usb/dwc2/host.c +++ b/drivers/usb/dwc2/host.c @@ -157,6 +157,11 @@ static int transf

[PATCH v4 03/13] usb: dwc2: host: Read dr_mode from device tree

2020-08-11 Thread Jules Maselbas
Signed-off-by: Jules Maselbas --- drivers/usb/dwc2/core.c | 95 + drivers/usb/dwc2/dwc2.c | 2 + drivers/usb/dwc2/dwc2.h | 1 + 3 files changed, 98 insertions(+) diff --git a/drivers/usb/dwc2/core.c b/drivers/usb/dwc2/core.c index 0046e955f..6e8d30c22 10

[PATCH v4 04/13] usb: dwc2: Rework roothub interface

2020-08-11 Thread Jules Maselbas
Roothub requests are now decoded in one place. Signed-off-by: Jules Maselbas --- drivers/usb/dwc2/dwc2.h | 2 +- drivers/usb/dwc2/host.c | 4 +- drivers/usb/dwc2/rhub.c | 519 +++- 3 files changed, 245 insertions(+), 280 deletions(-) diff --git a/drivers/

[PATCH v4 08/13] usb: dwc2: host: Fix toggle reset

2020-08-11 Thread Jules Maselbas
>From USB 2.0 specification, section 9.4.5: ClearFeature(ENDPOINT_HALT) request always results in the data toggle being reinitialized to DATA0. The hacky solution for now is to reset the toggle bit to DATA0 when the host controller send a ClearFeature request on an endpoint. Signed-off-by: Ju

[PATCH v4 09/13] usb: dwc2: host: Rewrite dwc2_hc_init

2020-08-11 Thread Jules Maselbas
Removed the uses of a table to convert the usb endpoint type for the controller. Signed-off-by: Jules Maselbas --- drivers/usb/dwc2/host.c | 47 +++-- 1 file changed, 27 insertions(+), 20 deletions(-) diff --git a/drivers/usb/dwc2/host.c b/drivers/usb/dwc2/ho

[PATCH v4 00/13] usb: dwc2: Add host and gadget driver

2020-08-11 Thread Jules Maselbas
This patchset add USB host and gadget support for the DWC2 controller. The host driver is ported from the U-Boot driver (v2018.09-rc3), the memory map structure from U-Boot has been replaced with read/write functions and the hardware parameters structure are taken from Linux. The gadget driver is

[PATCH v4 10/13] usb: dwc2: Add function to flush tx fifo

2020-08-11 Thread Jules Maselbas
Signed-off-by: Jules Maselbas --- drivers/usb/dwc2/core.c | 33 + drivers/usb/dwc2/dwc2.h | 1 + 2 files changed, 34 insertions(+) diff --git a/drivers/usb/dwc2/core.c b/drivers/usb/dwc2/core.c index 6e8d30c22..a8693097d 100644 --- a/drivers/usb/dwc2/core.c +++ b

Re: [PATCH v4 2/3] of: base: register DT root as device

2020-08-11 Thread Ahmad Fatoum
Hello Oleksij, On 7/20/20 8:39 AM, Oleksij Rempel wrote: > A usual board file contains at least one of_machine_is_compatible(). > Some of the have a rather long list with complicated version logic. > > To avoid own implementation for driver management, register the root node > of device tree as p

Re: [PATCH v3 14/14] usb: dwc2: Add ulpi phy function

2020-08-11 Thread Jules Maselbas
On Mon, Aug 10, 2020 at 10:34:12PM +0200, Sascha Hauer wrote: > On Tue, Jul 21, 2020 at 02:06:00PM +0200, Jules Maselbas wrote: > > Signed-off-by: Jules Maselbas > > --- > > drivers/usb/dwc2/core.c | 33 + > > drivers/usb/dwc2/dwc2.h | 3 +++ > > 2 files changed,

Re: [PATCH] console_countdown: Add CR as valid return key

2020-08-11 Thread Jules Maselbas
Hi Sascha, > I have no problem with this change, but out of curiosity: In which case > do you need it? I am using minicom to communicate with barebox through an UART interface. It seems that minicom is sending an carriage return when the enter key is pressed. I know there is the termios/stty opti

Re: [PATCH] console_countdown: Add CR as valid return key

2020-08-11 Thread Sascha Hauer
On Tue, Aug 11, 2020 at 11:29:46AM +0200, Jules Maselbas wrote: > Hi Sascha, > > > I have no problem with this change, but out of curiosity: In which case > > do you need it? > I am using minicom to communicate with barebox through an UART interface. > It seems that minicom is sending an carriage

Re: [PATCH v2 00/13] prepare Protonic board code for mainline

2020-08-11 Thread Sascha Hauer
On Wed, Aug 05, 2020 at 12:16:15PM +0200, Oleksij Rempel wrote: > changes v2: > - add power init support for KvG boards > - spell fixes > - do not print error on probe exit > - add of_console_get_by_alias() helper > - free requested gpio array > - exit fec init only in case of PROBE_DEFERED > > Th

Re: [PATCH v2 12/13] of: add barebox-serial driver

2020-08-11 Thread David Jander
On Tue, 11 Aug 2020 10:58:47 +0200 Oleksij Rempel wrote: > On Tue, Aug 11, 2020 at 10:34:01AM +0200, Sascha Hauer wrote: > > On Wed, Aug 05, 2020 at 12:16:27PM +0200, Oleksij Rempel wrote: > > > Provide a driver which should act as nvmem consumer > > > for board serial number information. > > >

[PATCH v2 4/4] nvmem: ocotp: add support for i.MX8MM

2020-08-11 Thread Lucas Stach
For whatever reason the i.MX8MM OCOTP got a separate compatible and is not marked as compatible to imx8mq, while the parameters used in the driver seem to be the same. Signed-off-by: Lucas Stach --- drivers/nvmem/Kconfig | 2 +- drivers/nvmem/ocotp.c | 3 +++ 2 files changed, 4 insertions(+), 1

[PATCH v2 3/4] ARM: nxp-imx8mm-evk: always set up UART

2020-08-11 Thread Lucas Stach
When the TF-A is configured to have some output on the UART it does not set up the UART on its own, but just expects a pre-existing configuration. If Barebox did not set up the UART in the !DEBUG_LL case, TF-A will just hang without any user accessible debug output, which is a very non-obvious fail

[PATCH v2 1/4] ARM: imx8mm: select FIRMWARE_IMX_LPDDR4_PMU_TRAIN from IMX8MM_EVK

2020-08-11 Thread Lucas Stach
Without this select the necessary DDR PHY firmware files will be missing when only building for the i.MX8MM-EVK board. Signed-off-by: Lucas Stach --- arch/arm/mach-imx/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig index 7e426590

[PATCH v2 2/4] ARM: imx8m: make debug UART selection available on i.MX8MM/MP

2020-08-11 Thread Lucas Stach
i.MX8MM/MN/MP has UARTs in the same place in the MMIO address space as the i.MX8MQ, so make the lowlevel debug a bit more generic across the i.MX8M family. Signed-off-by: Lucas Stach --- v2: - rebase on top of i.MX8MP support - remove unused and redundant UART base address defines in SoC specific

Re: [PATCH v2 12/13] of: add barebox-serial driver

2020-08-11 Thread Oleksij Rempel
On Tue, Aug 11, 2020 at 10:34:01AM +0200, Sascha Hauer wrote: > On Wed, Aug 05, 2020 at 12:16:27PM +0200, Oleksij Rempel wrote: > > Provide a driver which should act as nvmem consumer > > for board serial number information. > > > > To make use of this driver, DTS should contain a serial > > node

Re: [PATCH v2 12/13] of: add barebox-serial driver

2020-08-11 Thread Sascha Hauer
On Wed, Aug 05, 2020 at 12:16:27PM +0200, Oleksij Rempel wrote: > Provide a driver which should act as nvmem consumer > for board serial number information. > > To make use of this driver, DTS should contain a serial > node with compatibe "barebox,serial" and nvmem-cell-names > "serial-number": >

Re: [PATCH v1 11/11] ARM: dts: imx6q-prti6q: add barebox.serial node

2020-08-11 Thread Sascha Hauer
On Tue, Aug 04, 2020 at 07:48:29AM +0200, Oleksij Rempel wrote: > On Mon, Aug 03, 2020 at 11:12:59PM +0200, Sascha Hauer wrote: > > On Thu, Jul 23, 2020 at 12:33:26PM +0200, Oleksij Rempel wrote: > > > Add serial node provider > > > > > > Signed-off-by: Oleksij Rempel > > > --- > > > arch/arm/dt

Re: [PATCH v5] FIT: Parse `load` and `entry` addresses.

2020-08-11 Thread Sascha Hauer
Hi Christian, On Wed, Jul 15, 2020 at 11:26:56AM +0200, Christian Mauderer wrote: > According to the U-Boot documentation for the FIT file format, the load > and entry have to be allways defined for a "kernel" or "standalone". > But Barebox ignored the parameters. That changes with this patch. >

Re: [PATCH] arm: baltos: export DIP switch value

2020-08-11 Thread Sascha Hauer
On Fri, Jul 17, 2020 at 08:04:43PM +0200, yegorsli...@googlemail.com wrote: > From: Yegor Yefremov > > Some device in the OnRISC device family provide four DIP switches. > Read them and provide their value as a hex in the global variable > "board.dip". > > Signed-off-by: Yegor Yefremov > --- >

Re: [PATCH] kvx: exclude dtb from malloc zone

2020-08-11 Thread Sascha Hauer
On Thu, Jul 09, 2020 at 10:22:04PM +0200, Clement Leger wrote: > When dtb is provided by the FSBL (first stage bootloader), it might > end up in the malloc zone initialized by barebox. While the dtb is > discarded after being unflatten, if the dtb is provided right after > barebox elf, then the mal