[PATCH v2 20/30] video: backlight: fix pwm's duty cycle calculation

2020-09-06 Thread Dario Binacchi
For levels equal to the maximum value, the duty cycle must be equal to the period. Signed-off-by: Dario Binacchi Reviewed-by: Simon Glass --- (no changes since v1) drivers/video/pwm_backlight.c | 2 +- test/dm/panel.c | 12 ++-- 2 files changed, 7 insertions(+), 7

[PATCH v2 21/30] video: backlight: fix pwm data structure description

2020-09-06 Thread Dario Binacchi
The description of the 'max_level' field was incorrectly assigned to the 'min_level' field. Signed-off-by: Dario Binacchi --- (no changes since v1) drivers/video/pwm_backlight.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/pwm_backlig

[PATCH v2 18/30] pwm: ti: am33xx: add enhanced pwm driver

2020-09-06 Thread Dario Binacchi
Enhanced high resolution PWM module (EHRPWM) hardware can be used to generate PWM output over 2 channels. This commit adds PWM driver support for EHRPWM device present on AM33XX SOC. The code is based on the drivers/pwm/pwm-tiehrpwm.c driver of the Linux kernel. Signed-off-by: Dario Binacchi

[PATCH v2 19/30] pwm: ti: am33xx: add subsystem driver

2020-09-06 Thread Dario Binacchi
can be enabled before probing the peripheral child device and disabled after its removal. Signed-off-by: Dario Binacchi --- (no changes since v1) arch/arm/dts/am33xx.dtsi | 9 +++ doc/device-tree-bindings/pwm/ti,pwmss.txt | 58 ++ drivers/pwm/Kconfig

[PATCH v2 17/30] misc: am33xx: add control module driver

2020-09-06 Thread Dario Binacchi
#address-cells = <1>; #size-cells = <1>; ranges = <0 0 0x800>; scm_clocks: clocks { #address-cells = <1>; #size-cells = <0>; }; }; }; Signed-

[PATCH v2 12/30] clk: ti: move drivers to 'ti' directory

2020-09-06 Thread Dario Binacchi
Add drivers/clk/ti/ folder and move all TI's code in this folder for better maintenance. Signed-off-by: Dario Binacchi --- (no changes since v1) drivers/clk/Kconfig | 40 +- drivers/clk/Makefile | 8 +--- drivers/c

[PATCH v2 13/30] clk: ti: omap4: add clock manager driver

2020-09-06 Thread Dario Binacchi
This minimal driver is only used to bind child devices. Signed-off-by: Dario Binacchi --- (no changes since v1) doc/device-tree-bindings/arm/omap,prcm.txt | 63 ++ drivers/clk/ti/Makefile| 2 +- drivers/clk/ti/omap4-cm.c | 22

[PATCH v2 16/30] omap: timer: fix the rate setting

2020-09-06 Thread Dario Binacchi
The prescaler (PTV) setting must be taken into account even when the timer input clock frequency has been set. Signed-off-by: Dario Binacchi --- (no changes since v1) drivers/timer/omap-timer.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/timer/omap

[PATCH v2 14/30] clk: ti: am335x: add clock manager driver

2020-09-06 Thread Dario Binacchi
= "ti,am3-dpll-core-clock"; clocks = <&sys_clkin_ck>, <&sys_clkin_ck>; reg = <0x0490>, <0x045c>, <0x0468>; }; ... }; Signed-off-by: Dario Binacchi --- Changes in v2: - Remove the 'ti_am3_prcm_clocks' driver. Handl

[PATCH v2 15/30] fdt: translate address if #size-cells = <0>

2020-09-06 Thread Dario Binacchi
generated for the registers of the loaded drivers are those specified by the AM335x reference manual. Signed-off-by: Dario Binacchi Tested-by: Dario Binacchi --- Changes in v2: - Fix a missing line in the commit message. - Add dm_flags to global_data structure and GD_DM_FLG_SIZE_CELLS_0

[PATCH v2 11/30] clk: ti: add support for clkctrl clocks

2020-09-06 Thread Dario Binacchi
Until now the clkctrl clocks have been enabled/disabled through platform routines. Thanks to this patch they can be enabled and configured directly by the probed devices that need to use them. Signed-off-by: Dario Binacchi --- (no changes since v1) doc/device-tree-bindings/clock/ti

[PATCH v2 09/30] clk: ti: add gate clock driver

2020-09-06 Thread Dario Binacchi
The patch adds support for TI gate clock binding. The code is based on the drivers/clk/ti/gate.c driver of the Linux kernel. Signed-off-by: Dario Binacchi --- (no changes since v1) .../clock/gpio-gate-clock.txt | 21 .../clock/ti,clockdomain.txt | 24

[PATCH v2 08/30] clk: ti: add divider clock driver

2020-09-06 Thread Dario Binacchi
The patch adds support for TI divider clock binding. The driver uses routines provided by the common clock framework (ccf). The code is based on the drivers/clk/ti/divider.c driver of the Linux kernel. Signed-off-by: Dario Binacchi --- Changes in v2: - Merged to patch [09/31] clk: ti

[PATCH v2 10/30] ti: am33xx: fix do_enable_clocks() to accept NULL parameters

2020-09-06 Thread Dario Binacchi
Up till this commit passing NULL as input parameter was allowed, but not handled properly. When a NULL parameter was passed to the function a data abort was raised. Signed-off-by: Dario Binacchi Reviewed-by: Simon Glass --- (no changes since v1) arch/arm/mach-omap2/am33xx/clock.c | 10

[PATCH v2 05/30] clk: ti: add mux clock driver

2020-09-06 Thread Dario Binacchi
"TI mux clock driver" + depends on CLK && OF_CONTROL && CLK_CCF + help + This enables the mux clock driver support on TI's SoCs. + config CLK_TI_SCI bool "TI System Control Interface (TI SCI) clock driver" depends on

[PATCH v2 06/30] arm: ti: am33xx: add DPLL_EN_FAST_RELOCK_BYPASS macro

2020-09-06 Thread Dario Binacchi
Add missing DPLL_EN_FAST_RELOCK_BYPASS macro. Used to put the DPLL in idle bypass fast relock mode. Signed-off-by: Dario Binacchi --- (no changes since v1) arch/arm/include/asm/arch-am33xx/clock.h | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/include/asm/arch-am33xx/clock.h b

[PATCH v2 03/30] arch: sandbox: fix typo in clk.h

2020-09-06 Thread Dario Binacchi
Fix the 'devivce' typo in arch/sandbox/include/asm/clk.h. Signed-off-by: Dario Binacchi Reviewed-by: Simon Glass --- (no changes since v1) arch/sandbox/include/asm/clk.h | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/arch/sandbox/i

[PATCH v2 07/30] clk: ti: am33xx: add DPLL clock drivers

2020-09-06 Thread Dario Binacchi
ot;ti,am3-dpll-core-clock" * "ti,am3-dpll-no-gate-clock" * "ti,am3-dpll-no-gate-j-type-clock" * "ti,am3-dpll-x2-clock" The code is loosely based on the drivers/clk/ti/dpll.c drivers of the Linux kernel. Signed-off-by: Dario Binacchi --- (no changes since

[PATCH v2 02/30] clk: export generic routines

2020-09-06 Thread Dario Binacchi
Export routines that can be used by other drivers avoiding duplicating code. Signed-off-by: Dario Binacchi --- Changes in v2: - Add the clk_ prefix to the divider functions. - Add kernel-doc comments to the exported functions. drivers/clk/clk-divider.c| 24 +++ include/linux

[PATCH v2 04/30] clk: add clk_round_rate()

2020-09-06 Thread Dario Binacchi
y the clock hardware in any way. Signed-off-by: Dario Binacchi Reviewed-by: Simon Glass --- (no changes since v1) arch/sandbox/include/asm/clk.h | 9 + drivers/clk/clk-uclass.c | 15 +++ drivers/clk/clk_sandbox.c | 17 + drivers/clk/clk_sandbox_t

[PATCH v2 01/30] clk: remove a redundant header

2020-09-06 Thread Dario Binacchi
The linux/err.h header file was included twice. Signed-off-by: Dario Binacchi Reviewed-by: Simon Glass --- (no changes since v1) include/linux/clk-provider.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h index 79dce8f0ad

Re: [PATCH 18/31] misc: am33xx: add control module driver

2020-09-05 Thread Dario Binacchi
Hi Lokesh, > Il 03/09/2020 08:31 Lokesh Vutla ha scritto: > > > On 25/08/20 2:51 pm, Dario Binacchi wrote: > > The implementation of this driver was needed to bind the device tree > > sub-nodes of the 'clocks' node. In fact, the lack of the compatible >

Re: [PATCH 04/31] clk: add clk_round_rate()

2020-08-31 Thread Dario Binacchi
> Il 29/08/2020 23:50 Sean Anderson ha scritto: > > > On 8/29/20 5:48 PM, Sean Anderson wrote: > > > > On 8/29/20 5:20 PM, Simon Glass wrote: > >> Hi Dario, > >> > >> +Stephen Warren > >> On Tue, 25 Aug 2020 at 03:24, Dario Binacc

[PATCH 00/31] Add DM support for omap PWM backlight

2020-08-25 Thread Dario Binacchi
few changes as possible and to verify the execution of all the tests already developed, as well as the new ones I added for the new feature. Dario Binacchi (31): clk: remove a redundant header clk: export generic routines arch: sandbox: fix typo in clk.h clk: add clk_round_rate() clk:

[PATCH 29/31] video: omap: split the legacy code from the DM code

2020-08-25 Thread Dario Binacchi
a code replication until the pre-driver-model version is dropped. Signed-off-by: Dario Binacchi --- drivers/video/Makefile | 5 +- drivers/video/am335x-fb.c| 350 drivers/video/am335x-fb.h| 35 --- drivers/video/tilcdc-panel.c | 2 +- drivers

[PATCH 30/31] video: omap: move drivers to 'ti' directory

2020-08-25 Thread Dario Binacchi
Add drivers/video/ti/ folder and move all TI's code in this folder for better maintenance. Signed-off-by: Dario Binacchi --- drivers/video/Kconfig | 5 + drivers/video/Makefile| 4 +--- drivers/video/ti/Kconfig | 8 drivers/vid

[PATCH 28/31] video: omap: set LCD clock rate through DM API

2020-08-25 Thread Dario Binacchi
DPLL registers are removed from the LCD driver code because they are implemented inside the DPLL clock driver. Signed-off-by: Dario Binacchi --- drivers/video/am335x-fb.c | 127 ++ 1 file changed, 101 insertions(+), 26 deletions(-) diff --git a/drivers/video

[PATCH 31/31] board: ti: am335x-ice: get CDCE913 clock device

2020-08-25 Thread Dario Binacchi
With support for other clock drivers, the potentially supported CDCE913 device can no longer be probed without specifying its DT node name. Signed-off-by: Dario Binacchi --- board/ti/am335x/board.c | 2 +- board/ti/am43xx/board.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff

[PATCH 27/31] video: omap: enable LCD clock domain through DM API

2020-08-25 Thread Dario Binacchi
er node is not the child of any interconnection node in the current device tree, I added the domain clock reference inside the LCD controller node. I think getting the domain clock from the device tree and using the driver model API is still an improvement. In the future, when possible, we c

[PATCH 26/31] video: omap: add panel driver

2020-08-25 Thread Dario Binacchi
the same driver. There are now two drivers, each with its own compatible string, functions and API. Furthermore, the panel driver, in addition to decoding the display timings, is now also able to manage the backlight. Signed-off-by: Dario Binacchi --- arch/arm/dts/am335x-brppt1-mmc.dts

[PATCH 25/31] dm: core: add a function to decode display timings

2020-08-25 Thread Dario Binacchi
The patch adds a function to get display timings from the device tree node attached to the device. Signed-off-by: Dario Binacchi --- arch/sandbox/dts/test.dts | 46 ++ drivers/core/read.c | 6 +++ include/dm/read.h | 24 test/dm/test-fdt.c

[PATCH 24/31] gpio: fix gpio_request_by_name() description

2020-08-25 Thread Dario Binacchi
Replace 'dev->dev' with '@desc->dev' in the gpio_request_by_name function desc parameter description. Signed-off-by: Dario Binacchi --- include/asm-generic/gpio.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/asm-generic/gpio.h b/includ

[PATCH 19/31] pwm: ti: am33xx: add enhanced pwm driver

2020-08-25 Thread Dario Binacchi
Enhanced high resolution PWM module (EHRPWM) hardware can be used to generate PWM output over 2 channels. This commit adds PWM driver support for EHRPWM device present on AM33XX SOC. The code is based on the drivers/pwm/pwm-tiehrpwm.c driver of the Linux kernel. Signed-off-by: Dario Binacchi

[PATCH 23/31] dm: core: improve uclass_get_device_by_phandle_id() description

2020-08-25 Thread Dario Binacchi
Complete the devp parameter description. Signed-off-by: Dario Binacchi --- include/dm/uclass.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/dm/uclass.h b/include/dm/uclass.h index 67ff7466c8..7188304304 100644 --- a/include/dm/uclass.h +++ b/include/dm/uclass.h

[PATCH 22/31] video: backlight: fix pwm data structure description

2020-08-25 Thread Dario Binacchi
The description of the 'max_level' field was incorrectly assigned to the 'min_level' field. Signed-off-by: Dario Binacchi --- drivers/video/pwm_backlight.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/pwm_backlight.c b/drivers/video/p

[PATCH 21/31] video: backlight: fix pwm's duty cycle calculation

2020-08-25 Thread Dario Binacchi
For levels equal to the maximum value, the duty cycle must be equal to the period. Signed-off-by: Dario Binacchi --- drivers/video/pwm_backlight.c | 2 +- test/dm/panel.c | 12 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/video

[PATCH 20/31] pwm: ti: am33xx: add subsystem driver

2020-08-25 Thread Dario Binacchi
can be enabled before probing the peripheral child device and disabled after its removal. Signed-off-by: Dario Binacchi --- arch/arm/dts/am33xx.dtsi | 9 +++ doc/device-tree-bindings/pwm/ti,pwmss.txt | 58 ++ drivers/pwm/Kconfig | 9 ++- drivers

[PATCH 18/31] misc: am33xx: add control module driver

2020-08-25 Thread Dario Binacchi
s used typically to reboot the board in error condition. +config TI_AM3_SCM + bool "AM33XX specific control module support (SCM)" + depends on ARCH_OMAP2PLUS + help +The control module includes status and control logic not addressed +wit

[PATCH 14/31] clk: ti: omap4: add clock manager driver

2020-08-25 Thread Dario Binacchi
This minimal driver is only used to bind child devices. Signed-off-by: Dario Binacchi --- doc/device-tree-bindings/arm/omap,prcm.txt | 63 ++ drivers/clk/ti/Makefile| 2 +- drivers/clk/ti/omap4-cm.c | 22 3 files changed, 86

[PATCH 17/31] omap: timer: fix the rate setting

2020-08-25 Thread Dario Binacchi
The prescaler (PTV) setting must be taken into account even when the timer input clock frequency has been set. Signed-off-by: Dario Binacchi --- drivers/timer/omap-timer.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/timer/omap-timer.c b/drivers/timer/omap

[PATCH 16/31] fdt: translate address if #size-cells = <0>

2020-08-25 Thread Dario Binacchi
335x reference manual. Signed-off-by: Dario Binacchi Tested-by: Dario Binacchi --- arch/sandbox/dts/test.dts | 21 +++ common/fdt_support.c | 10 -- drivers/core/Kconfig | 12 +++ drivers/core/fdtaddr.c| 2 +- drivers/core/of_addr.c| 14 +++- drivers/core/

[PATCH 12/31] clk: ti: add support for clkctrl clocks

2020-08-25 Thread Dario Binacchi
Until now the clkctrl clocks have been enabled/disabled through platform routines. Thanks to this patch they can be enabled and configured directly by the probed devices that need to use them. Signed-off-by: Dario Binacchi --- doc/device-tree-bindings/clock/ti,clkctrl.txt | 61

[PATCH 15/31] clk: ti: am335x: add clock manager driver

2020-08-25 Thread Dario Binacchi
... dpll_core_ck: dpll_core_ck@490 { #clock-cells = <0>; compatible = "ti,am3-dpll-core-clock"; clocks = <&sys_clkin_ck>, <&sys_clkin_ck>; reg = <0x0490>, <0x045c>, <0x0

[PATCH 13/31] clk: ti: move drivers to 'ti' directory

2020-08-25 Thread Dario Binacchi
Add drivers/clk/ti/ folder and move all TI's code in this folder for better maintenance. Signed-off-by: Dario Binacchi --- drivers/clk/Kconfig | 40 +- drivers/clk/Makefile | 8 +--- drivers/clk/ti/Kc

[PATCH 11/31] ti: am33xx: fix do_enable_clocks() to accept NULL parameters

2020-08-25 Thread Dario Binacchi
Up till this commit passing NULL as input parameter was allowed, but not handled properly. When a NULL parameter was passed to the function a data abort was raised. Signed-off-by: Dario Binacchi --- arch/arm/mach-omap2/am33xx/clock.c | 10 ++ 1 file changed, 6 insertions(+), 4

[PATCH 09/31] clk: ti: refactor mux and divider clock drivers

2020-08-25 Thread Dario Binacchi
The patch removes duplicate routines used by the two drivers. Signed-off-by: Dario Binacchi --- drivers/clk/Makefile | 1 + drivers/clk/clk-ti-divider.c | 27 ++- drivers/clk/clk-ti-mux.c | 27 ++- drivers/clk/clk-ti.c | 34

[PATCH 07/31] clk: ti: am33xx: add DPLL clock drivers

2020-08-25 Thread Dario Binacchi
ot;ti,am3-dpll-core-clock" * "ti,am3-dpll-no-gate-clock" * "ti,am3-dpll-no-gate-j-type-clock" * "ti,am3-dpll-x2-clock" The code is loosely based on the drivers/clk/ti/dpll.c drivers of the Linux kernel. Signed-off-by: Dario Binacchi --- doc/devi

[PATCH 10/31] clk: ti: add gate clock driver

2020-08-25 Thread Dario Binacchi
The patch adds support for TI gate clock binding. The code is based on the drivers/clk/ti/gate.c driver of the Linux kernel. Signed-off-by: Dario Binacchi --- .../clock/gpio-gate-clock.txt | 21 .../clock/ti,clockdomain.txt | 24 doc/device-tree

[PATCH 05/31] clk: ti: add mux clock driver

2020-08-25 Thread Dario Binacchi
iver" + depends on CLK && OF_CONTROL && CLK_CCF + help + This enables the mux clock driver support on TI's SoCs. + config CLK_TI_SCI bool "TI System Control Interface (TI SCI) clock driver" depends on CLK && TI_SCI_PR

[PATCH 08/31] clk: ti: add divider clock driver

2020-08-25 Thread Dario Binacchi
The patch adds support for TI divider clock binding. The driver uses routines provided by the common clock framework (ccf). The code is based on the drivers/clk/ti/divider.c driver of the Linux kernel. Signed-off-by: Dario Binacchi --- .../clock/ti,autoidle.txt | 39

[PATCH 04/31] clk: add clk_round_rate()

2020-08-25 Thread Dario Binacchi
y the clock hardware in any way. Signed-off-by: Dario Binacchi --- arch/sandbox/include/asm/clk.h | 9 + drivers/clk/clk-uclass.c | 15 +++ drivers/clk/clk_sandbox.c | 17 + drivers/clk/clk_sandbox_test.c | 10 ++ include/clk-uclass.h

[PATCH 03/31] arch: sandbox: fix typo in clk.h

2020-08-25 Thread Dario Binacchi
Fix the 'devivce' typo in arch/sandbox/include/asm/clk.h. Signed-off-by: Dario Binacchi --- arch/sandbox/include/asm/clk.h | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/arch/sandbox/include/asm/clk.h b/arch/sandbox/include/asm/c

[PATCH 06/31] arm: ti: am33xx: add DPLL_EN_FAST_RELOCK_BYPASS macro

2020-08-25 Thread Dario Binacchi
Add missing DPLL_EN_FAST_RELOCK_BYPASS macro. Used to put the DPLL in idle bypass fast relock mode. Signed-off-by: Dario Binacchi --- arch/arm/include/asm/arch-am33xx/clock.h | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/include/asm/arch-am33xx/clock.h b/arch/arm/include/asm

[PATCH 01/31] clk: remove a redundant header

2020-08-25 Thread Dario Binacchi
The linux/err.h header file was included twice. Signed-off-by: Dario Binacchi --- include/linux/clk-provider.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h index 79dce8f0ad..a2630056de 100644 --- a/include/linux/clk-provider.h

[PATCH 02/31] clk: export generic routines

2020-08-25 Thread Dario Binacchi
Export routines that can be used by other drivers avoiding duplicating code. Signed-off-by: Dario Binacchi --- drivers/clk/clk-divider.c| 18 +- include/linux/clk-provider.h | 10 ++ 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/drivers/clk/clk

[PATCH v2] doc: driver-model: fix typo in design.rst

2020-06-04 Thread Dario Binacchi
Fix the 'memeber' typo in doc/driver-model/design.rst. Signed-off-by: Dario Binacchi Reviewed-by: Simon Glass --- Changes in v2: - Add the commit message doc/driver-model/design.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/driver-model/design.rst b/

[PATCH 1/1] clk: ccf: mux: change the get_rate helper

2020-06-03 Thread Dario Binacchi
clock selection register. Since changing the parent of a probed device can be tricky, the new version of the get_rate helper provides the rate of the selected clock and not that of the parent. Signed-off-by: Dario Binacchi --- drivers/clk/clk-mux.c | 26 +- test/dm/clk_ccf.c

[PATCH] doc: driver-model: fix typo in design.rst

2020-06-03 Thread Dario Binacchi
Signed-off-by: Dario Binacchi --- doc/driver-model/design.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/driver-model/design.rst b/doc/driver-model/design.rst index 635effcef6..1bd2a22672 100644 --- a/doc/driver-model/design.rst +++ b/doc/driver-model/design.rst

[PATCH v3 4/4] spl: fit: improve spl_nand_fit_read(...) readability

2020-05-27 Thread Dario Binacchi
Replacing the ret variable with err and handling first the error condition about the value returned by the spl_nand_fit_read routine, improves the code readability. Furthermore, the 'else' int the 'else return ret' instruction was useless. cc: Michael Trimarchi Signed-of

[PATCH v3 0/4] Fix the SPL loading of a FIT image from NAND

2020-05-27 Thread Dario Binacchi
e the read helper for the NAND device only. This solution fixes the problem for the NAND device without side effects for other types of devices. Changes in v2: - Replace CONFIG_IS_ENABLED(OF_EMBED) with IS_ENABLED(CONFIG_OF_EMBED)) Dario Binacchi (4): spl: fix format of function documentation

[PATCH v3 3/4] spl: fit: nand: fix fit loading in case of bad blocks

2020-05-27 Thread Dario Binacchi
. cc: Michael Trimarchi Signed-off-by: Dario Binacchi --- Changes in v3: The previous versions were buggy for devices others than NAND. This because the 'adjust_offset' helper was properly set only for the NAND case but called even for devices like MMC, RAM, and so on, crashing the boot

[PATCH v3 2/4] spl: fit: fail fit loading in case of FDT appending error

2020-05-27 Thread Dario Binacchi
If uboot does not embed its device tree and the FIT loading function returns error in case of failure in the FDT append, the redundant itb image could be loaded. cc: Michael Trimarchi Signed-off-by: Dario Binacchi Reviewed-by: Michael Trimarchi --- Changes in v3: None Changes in v2

[PATCH v3 1/4] spl: fix format of function documentation

2020-05-27 Thread Dario Binacchi
U-Boot adopted the kernel-doc annotation style. cc: Michael Trimarchi Signed-off-by: Dario Binacchi --- Changes in v3: None Changes in v2: None include/spl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/spl.h b/include/spl.h index b31c9bb4ab..580e4e024f 100644

[PATCH v2 3/3] spl: fit: nand: fix fit loading in case of bad blocks

2020-05-10 Thread Dario Binacchi
. cc: Michael Trimarchi Signed-off-by: Dario Binacchi --- Changes in v2: None common/spl/spl_fit.c| 7 --- common/spl/spl_nand.c | 7 +++ drivers/mtd/nand/raw/nand_spl_loaders.c | 28 + include/nand.h

[PATCH v2 2/3] spl: fit: fail fit loading in case of FDT appending error

2020-05-10 Thread Dario Binacchi
If uboot does not embed its device tree and the FIT loading function returns error in case of failure in the FDT append, the redundant itb image could be loaded. cc: Michael Trimarchi Signed-off-by: Dario Binacchi --- Changes in v2: - Replace CONFIG_IS_ENABLED(OF_EMBED) with IS_ENABLED

[PATCH v2 1/3] spl: fix format of function documentation

2020-05-10 Thread Dario Binacchi
U-Boot adopted the kernel-doc annotation style. cc: Michael Trimarchi Signed-off-by: Dario Binacchi --- Changes in v2: None include/spl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/spl.h b/include/spl.h index 6bf9fd8beb..e2fbd6d765 100644 --- a/include/spl.h

[PATCH v2 0/3] Fix the SPL loading of a FIT image from NAND

2020-05-10 Thread Dario Binacchi
Loading u-boot and its fdt from a NAND memory area with bad blocks led to the creation of these patches. Changes in v2: - Replace CONFIG_IS_ENABLED(OF_EMBED) with IS_ENABLED(CONFIG_OF_EMBED)) Dario Binacchi (3): spl: fix format of function documentation spl: fit: fail fit loading in case

[PATCH 2/3] spl: fit: fail fit loading in case of FDT appending error

2020-05-09 Thread Dario Binacchi
If uboot does not embed its device tree and the FIT loading function returns error in case of failure in the FDT append, the redundant itb image could be loaded. Signed-off-by: Dario Binacchi --- common/spl/spl_fit.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git

[PATCH 1/3] spl: fix format of function documentation

2020-05-09 Thread Dario Binacchi
U-Boot adopted the kernel-doc annotation style. Signed-off-by: Dario Binacchi --- include/spl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/spl.h b/include/spl.h index 6bf9fd8beb..e2fbd6d765 100644 --- a/include/spl.h +++ b/include/spl.h @@ -151,7 +151,7

[PATCH 3/3] spl: fit: nand: fix fit loading in case of bad blocks

2020-05-09 Thread Dario Binacchi
. Signed-off-by: Dario Binacchi --- common/spl/spl_fit.c| 7 --- common/spl/spl_nand.c | 7 +++ drivers/mtd/nand/raw/nand_spl_loaders.c | 28 + include/nand.h | 1 + include/spl.h

[PATCH 0/3] Fix the SPL loading of a FIT image from NAND

2020-05-09 Thread Dario Binacchi
Loading u-boot and its fdt from a NAND memory area with bad blocks led to the creation of these patches. Dario Binacchi (3): spl: fix format of function documentation spl: fit: fail fit loading in case of FDT appending error spl: fit: nand: fix fit loading in case of bad blocks common

[PATCH v2] video: omap: change include order

2020-05-03 Thread Dario Binacchi
Apply u-boot coding style on include files order as described by the wiki https://www.denx.de/wiki/U-Boot/CodingStyle. Signed-off-by: Dario Binacchi --- Changes in v2: - Add reference to code style wiki drivers/video/am335x-fb.c | 8 1 file changed, 4 insertions(+), 4 deletions

[PATCH 4/4] clk: ccf: mux: change the get_rate helper

2020-05-02 Thread Dario Binacchi
clock selection register. Since changing the parent of a probed device can be tricky, the new version of the get_rate helper provides the rate of the selected clock and not that of the parent. Signed-off-by: Dario Binacchi --- drivers/clk/clk-mux.c | 26 +- test/dm/clk_ccf.c

[PATCH 2/4] clk: ccf: mux: fix typo

2020-05-02 Thread Dario Binacchi
Close the opening bracket. Signed-off-by: Dario Binacchi --- drivers/clk/clk-mux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/clk-mux.c b/drivers/clk/clk-mux.c index 9511a80fe3..6264b63900 100644 --- a/drivers/clk/clk-mux.c +++ b/drivers/clk/clk-mux.c

[PATCH 3/4] clk: ccf: mux: fix access to the sandbox register

2020-05-02 Thread Dario Binacchi
The tests developed for the mux clock are run on the sandbox. They don't call the clk_mux_set_parent routine and therefore they do not detect this error. Signed-off-by: Dario Binacchi --- drivers/clk/clk-mux.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/clk/clk-mu

[PATCH 1/4] clk: ccf: mux: change include order

2020-05-02 Thread Dario Binacchi
Apply u-boot coding style on include files order. Signed-off-by: Dario Binacchi --- drivers/clk/clk-mux.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/clk/clk-mux.c b/drivers/clk/clk-mux.c index b9d2ae6778..9511a80fe3 100644 --- a/drivers/clk/clk-mux.c

[PATCH 0/4] change the clk-mux get_rate helper

2020-05-02 Thread Dario Binacchi
Changes: - Apply coding style - Fix typo - Fix access to sandbox register - Change the gate_rate helper Dario Binacchi (4): clk: ccf: mux: change include order clk: ccf: mux: fix typo clk: ccf: mux: fix access to the sandbox register clk: ccf: mux: change the get_rate helper

[PATCH] spi: fix dev parameter in dev_* calls

2020-05-02 Thread Dario Binacchi
Probably the non-use of the device parameter by the print routines did not generate compilation errors. Signed-off-by: Dario Binacchi --- drivers/mtd/spi/spi-nor-core.c | 19 +++ 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/drivers/mtd/spi/spi-nor-core.c b

[PATCH] video: omap: change include order

2020-05-02 Thread Dario Binacchi
Apply u-boot coding style on include files order. Signed-off-by: Dario Binacchi --- drivers/video/am335x-fb.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/video/am335x-fb.c b/drivers/video/am335x-fb.c index eb5add2a20..0f066df451 100644 --- a/drivers

[PATCH] clk: fix the console output of clk_register

2020-05-02 Thread Dario Binacchi
The parent->name variable can be used only in case the uclass_get_device_by_name routine returns successfully. Signed-off-by: Dario Binacchi --- drivers/clk/clk.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c in

[PATCH 2/2] clk: set flags in the ccf registration routines

2020-04-13 Thread Dario Binacchi
The top-level framework flags are passed as parameter to the common clock framework (ccf) registration routines without being used. Checks of the flags setting added by the patch have been added in the ccf test. Signed-off-by: Dario Binacchi --- drivers/clk/clk-composite.c| 1 + drivers

[PATCH 0/2] Set clock flags in the ccf registration routines

2020-04-13 Thread Dario Binacchi
Test for ccf gated clock has been added too. Dario Binacchi (2): dm: test: clk: add the test for the ccf gated clock clk: set flags in the ccf registration routines drivers/clk/clk-composite.c| 1 + drivers/clk/clk-divider.c | 1 + drivers/clk/clk-fixed-factor.c | 1

[PATCH 1/2] dm: test: clk: add the test for the ccf gated clock

2020-04-13 Thread Dario Binacchi
Unlike the other clock types, in the case of the gated clock, a new driver has been developed which does not use the registering routine provided by the common clock framework. The addition of the ecspi0 clock to sandbox therefore allows testing the ccf gate clock. Signed-off-by: Dario Binacchi

[PATCH 3/3] dm: core: refactor functions reading an u32 from dt

2020-03-29 Thread Dario Binacchi
Now reading a 32 bit value from a device-tree property can be expressed as reading the first element of an array with a single value. Signed-off-by: Dario Binacchi --- drivers/core/of_access.c | 16 +--- drivers/core/ofnode.c| 23 ++- 2 files changed, 3

[PATCH 2/3] dm: core: support reading a single indexed u32 value

2020-03-29 Thread Dario Binacchi
The patch adds helper functions to allow reading a single indexed u32 value from a device-tree property containing multiple u32 values, that is an array of integers. Signed-off-by: Dario Binacchi --- arch/sandbox/dts/test.dts | 1 + drivers/core/of_access.c | 22

[PATCH 0/3] Support reading an u32 from a multi-value property

2020-03-29 Thread Dario Binacchi
. Maybe to add in a second version of this series. Dario Binacchi (3): dm: test: add test case for dev_read_u64 function dm: core: support reading a single indexed u32 value dm: core: refactor functions reading an u32 from dt arch/sandbox/dts/test.dts | 2 ++ drivers/core/of_access.c | 38

[PATCH 1/3] dm: test: add test case for dev_read_u64 function

2020-03-29 Thread Dario Binacchi
Add test case to cover dev_read_u64 and dev_read_u64_default functions. Signed-off-by: Dario Binacchi --- arch/sandbox/dts/test.dts | 1 + include/test/ut.h | 16 test/dm/test-fdt.c| 10 ++ 3 files changed, 27 insertions(+) diff --git a/arch/sandbox

[PATCH v3 10/13] arm: dts: am335x: add 'u-boot, dm-pre-reloc' to panel

2020-02-22 Thread Dario Binacchi
nfig --> failure with CONFIG_AM335X_LCD enabled Enabling CONFIG_AM335X_LCD in da850evm_defconfig causes building errors even without applying the patch. The driver has never been enabled on the da850 and must be adapted for this platform. Signed-off-by: Dario Binacchi Tested-by: Dario Binacchi --- C

[PATCH v3 13/13] board: brxre1: fix building errors

2020-02-22 Thread Dario Binacchi
Fix building errors if CONFIG_DM_VIDEO is enabled. This is the only u-boot board that enables CONFIG_AM335X_LCD and from which I started to develop the version of the frame buffer driver that supports the driver model. Signed-off-by: Dario Binacchi --- Changes in v3: None Changes in v2: None

[PATCH v3 12/13] video: omap: fix pixel-per-line bitfield setting

2020-02-22 Thread Dario Binacchi
Fix the macro to set the pplmsb field (bit 3) of the RASTER_TIMING_0 register. It is used in order to support up to 2048 pixels per line. Signed-off-by: Dario Binacchi --- Changes in v3: None Changes in v2: None drivers/video/am335x-fb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH v3 11/13] fdt: video: omap: add framebuffer and panel bindings

2020-02-22 Thread Dario Binacchi
Add device-tree binding documentation for ti framebuffer and generic panel output driver. Signed-off-by: Dario Binacchi Reviewed-by: Simon Glass --- Changes in v3: None Changes in v2: None .../video/tilcdc/panel.txt| 66 +++ .../video/tilcdc/tilcdc.txt

[PATCH v3 09/13] video: omap: add support for DM/DTS

2020-02-22 Thread Dario Binacchi
= <10>; clock-frequency = <3300>; hsync-active = <0>; vsync-active= <0>; }; }; }; Signed-off-by: Dario Binacchi Te

[PATCH v3 08/13] video: omap: create two routines to set the pixel clock rate

2020-02-22 Thread Dario Binacchi
Created in preparation to support driver-model, they can also be called from legacy code. In this way, code duplication is avoided. Signed-off-by: Dario Binacchi --- Changes in v3: None Changes in v2: - Use GENMASK macro for clock divisor mask drivers/video/am335x-fb.c | 130

[PATCH v3 06/13] video: omap: fix debug message

2020-02-22 Thread Dario Binacchi
"DISP" -> "DIV" Signed-off-by: Dario Binacchi Reviewed-by: Lokesh Vutla --- Changes in v3: None Changes in v2: None drivers/video/am335x-fb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/am335x-fb.c b/drivers/video/am335x-fb.c index

[PATCH v3 05/13] video: omap: rename LCD controller registers

2020-02-22 Thread Dario Binacchi
Add more clarity by prefixing the name of the register to the bitfields. Signed-off-by: Dario Binacchi --- Changes in v3: None Changes in v2: None drivers/video/am335x-fb.c | 107 +++--- 1 file changed, 54 insertions(+), 53 deletions(-) diff --git a/drivers

[PATCH v3 04/13] video: omap: fix bitfields order

2020-02-22 Thread Dario Binacchi
Arrange the bitfields of each register in the ascending order. Signed-off-by: Dario Binacchi --- Changes in v3: None Changes in v2: None drivers/video/am335x-fb.c | 29 ++--- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/drivers/video/am335x-fb.c b

[PATCH v3 07/13] video: omap: add loop exit conditions to the dpll setup

2020-02-22 Thread Dario Binacchi
In case of null error, round rate is equal to target rate, so it is useless to continue to search the DPLL setup parameters to get the desidered pixel clock rate. Signed-off-by: Dario Binacchi Reviewed-by: Lokesh Vutla --- Changes in v3: None Changes in v2: None drivers/video/am335x-fb.c | 4

[PATCH v3 03/13] video: omap: fix coding style on use of spaces

2020-02-22 Thread Dario Binacchi
Use one space around (on each side of) the binary '-' operator. Signed-off-by: Dario Binacchi --- Changes in v3: None Changes in v2: None drivers/video/am335x-fb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/am335x-fb.c b/drivers/video/am335x-

[PATCH v3 02/13] video: omap: add missing bitfield masks

2020-02-22 Thread Dario Binacchi
Add, if missing, the bitfield masks in the setting macros of the LCD controller registers. Signed-off-by: Dario Binacchi --- Changes in v3: None Changes in v2: - Use GENMASK macro drivers/video/am335x-fb.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers

[PATCH v3 01/13] video: omap: use BIT() and GENMASK() macros

2020-02-22 Thread Dario Binacchi
Use the standard BIT() and GENMASK() macros for bitfield definitions. Signed-off-by: Dario Binacchi --- Changes in v3: None Changes in v2: - Use GENMASK macro too drivers/video/am335x-fb.c | 36 ++-- drivers/video/am335x-fb.h | 12 ++-- 2 files changed

<    2   3   4   5   6   7   8   >