Re: [PATCH v2 2/2] clk: cdce9xxx: Add maintainer

2021-12-16 Thread Tero Kristo
On 16/12/2021 15:57, Sean Anderson wrote: On 12/16/21 8:17 AM, Tero Kristo wrote: On 15/12/2021 18:47, Sean Anderson wrote: This adds an entry in MAINTAINERS for the cdce9xx driver, since it was not added when the driver was submitted. This will help future submitters figure out who to CC

Re: [PATCH v2 2/2] clk: cdce9xxx: Add maintainer

2021-12-16 Thread Tero Kristo
ted by them. -Tero (no changes since v1) MAINTAINERS | 6 ++ 1 file changed, 6 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 6db5354322..44f4b846e0 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -658,6 +658,12 @@ M: Simon Glass S:Maintained F:tools/buildman/ +CDCE9XX

Re: [PATCH v2 1/2] clk: cdce9xx: Convert .of_xlate to .request

2021-12-16 Thread Tero Kristo
On 15/12/2021 18:47, Sean Anderson wrote: This xlate function just performs some checking. We can do this in request() instead and use the default xlate. Signed-off-by: Sean Anderson Looks good to me now. Reviewed-by: Tero Kristo --- Changes in v2: - Fix build error caused by mismatched

Re: [PATCH 1/2] clk: cdce9xx: Convert .of_xlate to .request

2021-12-03 Thread Tero Kristo
On 01/12/2021 22:10, Sean Anderson wrote: On 12/1/21 3:08 PM, Tom Rini wrote: On Wed, Dec 01, 2021 at 02:44:02PM -0500, Sean Anderson wrote: This xlate function just performs some checking. We can do this in request() instead and use the default xlate. Signed-off-by: Sean Anderson Hi

Re: [GIT PULL v2] TI changes for v2021.10 next

2021-06-14 Thread Tero Kristo
On 13/06/2021 19:49, Tom Rini wrote: On Fri, Jun 11, 2021 at 09:40:14PM +0530, Lokesh Vutla wrote: Hi Tom, Please find the PR for master branch targeted for v2021.10-next branch with checkpatch warnings fixed. Details about the PR are updated in the tag message. Gitlab CI report:

Re: [PATCHv6 00/26] HSM rearch series for TI K3 devices

2021-06-11 Thread Tero Kristo
On 11/06/2021 14:08, Lokesh Vutla wrote: Hi Tero, On 11/06/21 2:15 pm, Tero Kristo wrote: Hello, One more post, this time with the #ifdef hackery converted to use the IS_ENABLED / CONFIG_IS_ENABLED macros, and also removed the "common.h" include from k3-clk.h header. This ve

[PATCHv6 23/26] configs: j721e_evm_r5: Enable raw access power management features

2021-06-11 Thread Tero Kristo
From: Tero Kristo Sysfw is not going to provide access to power management features in the new architecture, so SPL must implement these itself. Enable all the raw register access based clock + power domain drivers. Signed-off-by: Tero Kristo Signed-off-by: Tero Kristo --- configs

[PATCHv6 25/26] board: ti: j72xx: README: update build instructions and image formats

2021-06-11 Thread Tero Kristo
From: Tero Kristo Update build instructions and image formats based on HSM rearch. A new DM image is added into the build, which gets executed right after R5 SPL finishes its job. Signed-off-by: Tero Kristo Signed-off-by: Tero Kristo --- board/ti/j721e/README | 9 ++--- 1 file changed, 6

[PATCHv6 26/26] arm: dts: k3-j72xx: correct MCU timer1 frequency

2021-06-11 Thread Tero Kristo
caused an error to the clock by a factor of 8 with j7 devices. This problem surfaced once the omap-timer was fixed. Signed-off-by: Tero Kristo --- arch/arm/dts/k3-j7200-common-proc-board-u-boot.dtsi | 2 +- arch/arm/dts/k3-j721e-common-proc-board-u-boot.dtsi | 2 +- 2 files changed, 2 insertions(+), 2

[PATCHv6 24/26] configs: j7200_evm_r5: Enable raw access power management features

2021-06-11 Thread Tero Kristo
From: Dave Gerlach Sysfw is not going to provide access to power management features in the new architecture, so SPL must implement these itself. Enable all the raw register access based clock + power domain drivers. Signed-off-by: Dave Gerlach Signed-off-by: Tero Kristo --- configs

[PATCHv6 17/26] arm: mach-k3: Add platform data for j721e and j7200

2021-06-11 Thread Tero Kristo
From: Dave Gerlach Add platform clock and powerdomain data for J721e and J7200. This data is used by the corresponding drivers to register all the required device clocks and powerdomains. Signed-off-by: Dave Gerlach Signed-off-by: Tero Kristo --- arch/arm/mach-k3/Makefile | 2

[PATCHv6 22/26] arm: mach-k3: j721e_init: Force early probe of clk-k3 driver

2021-06-11 Thread Tero Kristo
configuration. Signed-off-by: Dave Gerlach Reported-by: Keerthy Tested-by: Keerthy Signed-off-by: Tero Kristo --- arch/arm/mach-k3/j721e_init.c | 12 1 file changed, 12 insertions(+) diff --git a/arch/arm/mach-k3/j721e_init.c b/arch/arm/mach-k3/j721e_init.c index 76a04a9035

[PATCHv6 21/26] arm: mach-k3: sysfw-loader: pass boardcfg to sciserver

2021-06-11 Thread Tero Kristo
From: Tero Kristo Copy the contents of the board config loaded from sysfw.itb into an EXTBOOT shared memory buffer that gets passed to sciserver. This only needs to be done if EXTBOOT area has not been populated by ROM code yet. Signed-off-by: Tero Kristo Signed-off-by: Tero Kristo --- arch

[PATCHv6 20/26] arm: mach-k3: common: Drop main r5 start

2021-06-11 Thread Tero Kristo
From: Dave Gerlach Only start-up the non-linux remote cores if we are running in legacy boot mode. HSM rearch is not yet supporting this. Signed-off-by: Dave Gerlach Signed-off-by: Tero Kristo Signed-off-by: Tero Kristo --- arch/arm/mach-k3/common.c | 7 --- 1 file changed, 4 insertions

[PATCHv6 19/26] arm: mach-k3: do board config for PM only if supported

2021-06-11 Thread Tero Kristo
From: Tero Kristo If the raw PM support is built in, we are operating in the split firmware approach mode where PM support is not available. In this case, skip the board config for this. Signed-off-by: Tero Kristo Signed-off-by: Tero Kristo --- arch/arm/mach-k3/sysfw-loader.c | 2 ++ 1 file

[PATCHv6 18/26] arm: mach-k3: add support for detecting firmware images from FIT

2021-06-11 Thread Tero Kristo
From: Tero Kristo Add callback routines for parsing the firmware info from FIT image, and use the data to boot up ATF and the MCU R5 firmware. Signed-off-by: Tero Kristo Signed-off-by: Tero Kristo --- arch/arm/mach-k3/common.c | 84 + arch/arm/mach-k3

[PATCHv6 15/26] cmd: ti: pd: Add debug command for K3 power domains

2021-06-11 Thread Tero Kristo
From: Tero Kristo Add support command for debugging K3 power domains. This is useful with the HSM rearch setup, where power domains are directly controlled by SPL instead of going through the TI SCI layer. The debugging support is only available in the u-boot codebase though, so the raw register

[PATCHv6 16/26] tools: k3_fit_atf: add DM binary to the FIT image

2021-06-11 Thread Tero Kristo
From: Tero Kristo Add DM (device manager) firmware image to the fit image that is loaded by R5 SPL. This is needed with the HSM rearch where the firmware allocation has been changed slightly. Signed-off-by: Tero Kristo Signed-off-by: Tero Kristo --- arch/arm/mach-k3/config.mk | 4

[PATCHv6 13/26] clk: add support for TI K3 SoC clocks

2021-06-11 Thread Tero Kristo
From: Tero Kristo Add driver to support TI K3 generation SoC clocks. This driver registers the clocks provided via platform data, and adds support for controlling the clocks via DT handles. Signed-off-by: Tero Kristo Signed-off-by: Tero Kristo --- drivers/clk/ti/Kconfig | 12 ++ drivers

[PATCHv6 14/26] power: domain: Introduce driver for raw TI K3 PDs

2021-06-11 Thread Tero Kristo
From: Tero Kristo Normally, power domains are handled via TI-SCI in K3 SoCs. However, SPL is not going to have access to sysfw resources, so it must control them directly. Add driver for supporting this. Signed-off-by: Tero Kristo Signed-off-by: Tero Kristo Reviewed-by: Jaehoon Chung

[PATCHv6 12/26] clk: add support for TI K3 SoC PLL

2021-06-11 Thread Tero Kristo
From: Tero Kristo Add support for TI K3 SoC PLLs. This clock type supports enabling/disabling/setting and querying the clock rate for the PLL. The euclidean library routine is used to calculate divider/multiplier rates for the PLLs. Signed-off-by: Tero Kristo Signed-off-by: Tero Kristo

[PATCHv6 11/26] clk: fix set_rate to clean up cached rates for the hierarchy

2021-06-11 Thread Tero Kristo
From: Tero Kristo Clock rates are cached within the individual clock nodes, and right now if one changes a clock rate somewhere in the middle of the tree, none of its child clocks notice the change. To fix this, clear up all the cached rates for us and our child clocks. Signed-off-by: Tero

[PATCHv6 10/26] clk: fix assigned-clocks to pass with deferring provider

2021-06-11 Thread Tero Kristo
From: Tero Kristo If a clock provider is not ready for assigning default rates/parents during its probe, it may return -EPROBE_DEFER directly from xlate. Handle this special case properly by skipping the entry and adjusting the return value to pass. The defaults will be handled properly in post

[PATCHv6 09/26] clk: sci-clk: fix return value of set_rate

2021-06-11 Thread Tero Kristo
From: Tero Kristo Set rate should return the new clock rate on success, and negative error value on failure. Fix this, as currently set_rate returns 0 on success. Signed-off-by: Tero Kristo Signed-off-by: Tero Kristo --- drivers/clk/ti/clk-sci.c | 6 -- 1 file changed, 4 insertions(+), 2

[PATCHv6 08/26] clk: add support for setting clk rate from cmdline

2021-06-11 Thread Tero Kristo
From: Tero Kristo Add new clk subcommand "clk setfreq", for setting up a clock rate directly from u-boot cmdline. This is handy for any debugging purposes towards clocks. Acked-by: Lukasz Majewski Signed-off-by: Tero Kristo Signed-off-by: Tero Kristo --- cmd/

[PATCHv6 07/26] clk: do not attempt to fetch clock pointer with null device

2021-06-11 Thread Tero Kristo
From: Tero Kristo Bail out early if device returned for the parent clock is null. This avoids warning prints like this when doing clk dump: dev_get_uclass_priv: null device Signed-off-by: Tero Kristo Signed-off-by: Tero Kristo --- drivers/clk/clk-uclass.c | 2 ++ 1 file changed, 2

[PATCHv6 05/26] clk: fixed_rate: add API for directly registering fixed rate clocks

2021-06-11 Thread Tero Kristo
From: Tero Kristo Current driver only supports registering fixed rate clocks from DT. Add new API which makes it possible to register fixed rate clocks directly from e.g. platform specific clock drivers. Reviewed-by: Peng Fan Signed-off-by: Tero Kristo Signed-off-by: Tero Kristo --- drivers

[PATCHv6 06/26] clk: fix clock tree dump to properly dump out every registered clock

2021-06-11 Thread Tero Kristo
From: Tero Kristo Some clocks are not associated to a DM node, so just parsing the DM is not enough. This is especially true for root clocks, which typically don't have any parents. Instead, fetch every registered UCLASS_CLK instance, and dump these out. Signed-off-by: Tero Kristo Signed-off

[PATCHv6 04/26] common: fit: Update board_fit_image_post_process() to pass fit and node_offset

2021-06-11 Thread Tero Kristo
From: Lokesh Vutla board_fit_image_post_process() passes only start and size of the image, but type of the image is not passed. So pass fit and node_offset, to derive information about image to be processed. Signed-off-by: Lokesh Vutla Reviewed-by: Tom Rini Signed-off-by: Tero Kristo

[PATCHv6 03/26] remoteproc: k3-r5: remove sysfw PM calls if not supported

2021-06-11 Thread Tero Kristo
From: Tero Kristo With the sysfw rearch, sysfw PM calls are no longer available from SPL level. To properly support this, remove the is_on checks and the reset assertion from the R5 remoteproc driver as these are not supported. Attempting to access unavailable services will cause the device

[PATCHv6 02/26] arm: mach-k3: introduce new config option for sysfw split

2021-06-11 Thread Tero Kristo
From: Tero Kristo On J7 family of SoCs (J721E and J7200), sysfw is being split to be run under two cores, TIFS portion on DMSC core, and DM firmware under MCU R5. As MCU R5 is also used to run one phase of the bootloader, we must prevent access from here towards sysfw services. To support

[PATCHv6 01/26] lib: rational: copy the rational fraction lib routines from Linux

2021-06-11 Thread Tero Kristo
From: Tero Kristo Copy the best rational approximation calculation routines from Linux. Typical usecase for these routines is to calculate the M/N divider values for PLLs to reach a specific clock rate. This is based on linux kernel commit: "lib/math/rational.c: fix possible incorrect r

[PATCHv6 00/26] HSM rearch series for TI K3 devices

2021-06-11 Thread Tero Kristo
Hello, One more post, this time with the #ifdef hackery converted to use the IS_ENABLED / CONFIG_IS_ENABLED macros, and also removed the "common.h" include from k3-clk.h header. This version also contains fixes to any build issues reported by Lokesh, and these are squashed in to relevant patches.

Re: [GIT PULL] TI changes for v2021.10 next

2021-06-10 Thread Tero Kristo
On 10/06/2021 18:33, Lokesh Vutla wrote: +Tero, On 10/06/21 8:55 pm, Tom Rini wrote: On Thu, Jun 10, 2021 at 12:16:50PM +0530, Lokesh Vutla wrote: Hi Tom, Please find the PR for master branch targeted for v2021.10-next branch. Details about the PR are updated in the tag message.

Re: [PATCHv5 04/26] common: fit: Update board_fit_image_post_process() to pass fit and node_offset

2021-06-09 Thread Tero Kristo
**p_image, + size_t *p_size) { if (IS_ENABLED(CONFIG_SOCFPGA_SECURE_VAB_AUTH)) { if (socfpga_vendor_authentication(p_image, p_size)) -- -Tero On 03/06/2021 09:32, Tero Kristo wrote: From: Lokesh Vutla board_fit_image_post_process() passes

Re: [PATCHv5 00/26] Re-base / re-post of TI-K3 HSM rearch series

2021-06-08 Thread Tero Kristo
On 08/06/2021 09:32, Lokesh Vutla wrote: On 08/06/21 11:57 am, Tero Kristo wrote: On 07/06/2021 14:22, Lokesh Vutla wrote: On 03/06/21 12:02 pm, Tero Kristo wrote: Hi, As requested, this is just a rebase to the latest u-boot tip. Boot tested on j721e to make sure nothing got broken

Re: [PATCHv5 00/26] Re-base / re-post of TI-K3 HSM rearch series

2021-06-08 Thread Tero Kristo
On 07/06/2021 14:22, Lokesh Vutla wrote: On 03/06/21 12:02 pm, Tero Kristo wrote: Hi, As requested, this is just a rebase to the latest u-boot tip. Boot tested on j721e to make sure nothing got broken. There are some build errors. Can you take a look? https://source.denx.de/u-boot

[PATCHv5 17/26] arm: mach-k3: Add platform data for j721e and j7200

2021-06-03 Thread Tero Kristo
From: Dave Gerlach Add platform clock and powerdomain data for J721e and J7200. This data is used by the corresponding drivers to register all the required device clocks and powerdomains. Signed-off-by: Dave Gerlach Signed-off-by: Tero Kristo --- arch/arm/mach-k3/Makefile | 2

[PATCHv5 25/26] board: ti: j72xx: README: update build instructions and image formats

2021-06-03 Thread Tero Kristo
From: Tero Kristo Update build instructions and image formats based on HSM rearch. A new DM image is added into the build, which gets executed right after R5 SPL finishes its job. Signed-off-by: Tero Kristo Signed-off-by: Tero Kristo --- board/ti/j721e/README | 9 ++--- 1 file changed, 6

[PATCHv5 26/26] arm: dts: k3-j72xx: correct MCU timer1 frequency

2021-06-03 Thread Tero Kristo
caused an error to the clock by a factor of 8 with j7 devices. This problem surfaced once the omap-timer was fixed. Signed-off-by: Tero Kristo --- arch/arm/dts/k3-j7200-common-proc-board-u-boot.dtsi | 2 +- arch/arm/dts/k3-j721e-common-proc-board-u-boot.dtsi | 2 +- 2 files changed, 2 insertions(+), 2

[PATCHv5 24/26] configs: j7200_evm_r5: Enable raw access power management features

2021-06-03 Thread Tero Kristo
From: Dave Gerlach Sysfw is not going to provide access to power management features in the new architecture, so SPL must implement these itself. Enable all the raw register access based clock + power domain drivers. Signed-off-by: Dave Gerlach Signed-off-by: Tero Kristo --- configs

[PATCHv5 22/26] arm: mach-k3: j721e_init: Force early probe of clk-k3 driver

2021-06-03 Thread Tero Kristo
configuration. Signed-off-by: Dave Gerlach Reported-by: Keerthy Tested-by: Keerthy Signed-off-by: Tero Kristo --- arch/arm/mach-k3/j721e_init.c | 12 1 file changed, 12 insertions(+) diff --git a/arch/arm/mach-k3/j721e_init.c b/arch/arm/mach-k3/j721e_init.c index 76a04a9035

[PATCHv5 23/26] configs: j721e_evm_r5: Enable raw access power management features

2021-06-03 Thread Tero Kristo
From: Tero Kristo Sysfw is not going to provide access to power management features in the new architecture, so SPL must implement these itself. Enable all the raw register access based clock + power domain drivers. Signed-off-by: Tero Kristo Signed-off-by: Tero Kristo --- configs

[PATCHv5 21/26] arm: mach-k3: sysfw-loader: pass boardcfg to sciserver

2021-06-03 Thread Tero Kristo
From: Tero Kristo Copy the contents of the board config loaded from sysfw.itb into an EXTBOOT shared memory buffer that gets passed to sciserver. This only needs to be done if EXTBOOT area has not been populated by ROM code yet. Signed-off-by: Tero Kristo Signed-off-by: Tero Kristo --- arch

[PATCHv5 19/26] arm: mach-k3: do board config for PM only if supported

2021-06-03 Thread Tero Kristo
From: Tero Kristo If the raw PM support is built in, we are operating in the split firmware approach mode where PM support is not available. In this case, skip the board config for this. Signed-off-by: Tero Kristo Signed-off-by: Tero Kristo --- arch/arm/mach-k3/sysfw-loader.c | 2 ++ 1 file

[PATCHv5 20/26] arm: mach-k3: common: Drop main r5 start

2021-06-03 Thread Tero Kristo
From: Dave Gerlach Only start-up the non-linux remote cores if we are running in legacy boot mode. HSM rearch is not yet supporting this. Signed-off-by: Dave Gerlach Signed-off-by: Tero Kristo Signed-off-by: Tero Kristo --- arch/arm/mach-k3/common.c | 7 --- 1 file changed, 4 insertions

[PATCHv5 18/26] arm: mach-k3: add support for detecting firmware images from FIT

2021-06-03 Thread Tero Kristo
From: Tero Kristo Add callback routines for parsing the firmware info from FIT image, and use the data to boot up ATF and the MCU R5 firmware. Signed-off-by: Tero Kristo Signed-off-by: Tero Kristo --- arch/arm/mach-k3/common.c | 80 + arch/arm/mach-k3

[PATCHv5 16/26] tools: k3_fit_atf: add DM binary to the FIT image

2021-06-03 Thread Tero Kristo
From: Tero Kristo Add DM (device manager) firmware image to the fit image that is loaded by R5 SPL. This is needed with the HSM rearch where the firmware allocation has been changed slightly. Signed-off-by: Tero Kristo Signed-off-by: Tero Kristo --- arch/arm/mach-k3/config.mk | 4

[PATCHv5 15/26] cmd: ti: pd: Add debug command for K3 power domains

2021-06-03 Thread Tero Kristo
From: Tero Kristo Add support command for debugging K3 power domains. This is useful with the HSM rearch setup, where power domains are directly controlled by SPL instead of going through the TI SCI layer. The debugging support is only available in the u-boot codebase though, so the raw register

[PATCHv5 13/26] clk: add support for TI K3 SoC clocks

2021-06-03 Thread Tero Kristo
From: Tero Kristo Add driver to support TI K3 generation SoC clocks. This driver registers the clocks provided via platform data, and adds support for controlling the clocks via DT handles. Signed-off-by: Tero Kristo Signed-off-by: Tero Kristo --- drivers/clk/ti/Kconfig | 12 ++ drivers

[PATCHv5 14/26] power: domain: Introduce driver for raw TI K3 PDs

2021-06-03 Thread Tero Kristo
From: Tero Kristo Normally, power domains are handled via TI-SCI in K3 SoCs. However, SPL is not going to have access to sysfw resources, so it must control them directly. Add driver for supporting this. Signed-off-by: Tero Kristo Signed-off-by: Tero Kristo Reviewed-by: Jaehoon Chung

[PATCHv5 12/26] clk: add support for TI K3 SoC PLL

2021-06-03 Thread Tero Kristo
From: Tero Kristo Add support for TI K3 SoC PLLs. This clock type supports enabling/disabling/setting and querying the clock rate for the PLL. The euclidean library routine is used to calculate divider/multiplier rates for the PLLs. Signed-off-by: Tero Kristo Signed-off-by: Tero Kristo

[PATCHv5 11/26] clk: fix set_rate to clean up cached rates for the hierarchy

2021-06-03 Thread Tero Kristo
From: Tero Kristo Clock rates are cached within the individual clock nodes, and right now if one changes a clock rate somewhere in the middle of the tree, none of its child clocks notice the change. To fix this, clear up all the cached rates for us and our child clocks. Signed-off-by: Tero

[PATCHv5 10/26] clk: fix assigned-clocks to pass with deferring provider

2021-06-03 Thread Tero Kristo
From: Tero Kristo If a clock provider is not ready for assigning default rates/parents during its probe, it may return -EPROBE_DEFER directly from xlate. Handle this special case properly by skipping the entry and adjusting the return value to pass. The defaults will be handled properly in post

[PATCHv5 09/26] clk: sci-clk: fix return value of set_rate

2021-06-03 Thread Tero Kristo
From: Tero Kristo Set rate should return the new clock rate on success, and negative error value on failure. Fix this, as currently set_rate returns 0 on success. Signed-off-by: Tero Kristo Signed-off-by: Tero Kristo --- drivers/clk/ti/clk-sci.c | 6 -- 1 file changed, 4 insertions(+), 2

[PATCHv5 08/26] clk: add support for setting clk rate from cmdline

2021-06-03 Thread Tero Kristo
From: Tero Kristo Add new clk subcommand "clk setfreq", for setting up a clock rate directly from u-boot cmdline. This is handy for any debugging purposes towards clocks. Acked-by: Lukasz Majewski Signed-off-by: Tero Kristo Signed-off-by: Tero Kristo --- cmd/

[PATCHv5 07/26] clk: do not attempt to fetch clock pointer with null device

2021-06-03 Thread Tero Kristo
From: Tero Kristo Bail out early if device returned for the parent clock is null. This avoids warning prints like this when doing clk dump: dev_get_uclass_priv: null device Signed-off-by: Tero Kristo Signed-off-by: Tero Kristo --- drivers/clk/clk-uclass.c | 2 ++ 1 file changed, 2

[PATCHv5 06/26] clk: fix clock tree dump to properly dump out every registered clock

2021-06-03 Thread Tero Kristo
From: Tero Kristo Some clocks are not associated to a DM node, so just parsing the DM is not enough. This is especially true for root clocks, which typically don't have any parents. Instead, fetch every registered UCLASS_CLK instance, and dump these out. Signed-off-by: Tero Kristo Signed-off

[PATCHv5 05/26] clk: fixed_rate: add API for directly registering fixed rate clocks

2021-06-03 Thread Tero Kristo
From: Tero Kristo Current driver only supports registering fixed rate clocks from DT. Add new API which makes it possible to register fixed rate clocks directly from e.g. platform specific clock drivers. Reviewed-by: Peng Fan Signed-off-by: Tero Kristo Signed-off-by: Tero Kristo --- drivers

[PATCHv5 04/26] common: fit: Update board_fit_image_post_process() to pass fit and node_offset

2021-06-03 Thread Tero Kristo
From: Lokesh Vutla board_fit_image_post_process() passes only start and size of the image, but type of the image is not passed. So pass fit and node_offset, to derive information about image to be processed. Signed-off-by: Lokesh Vutla Reviewed-by: Tom Rini Signed-off-by: Tero Kristo

[PATCHv5 03/26] remoteproc: k3-r5: remove sysfw PM calls if not supported

2021-06-03 Thread Tero Kristo
From: Tero Kristo With the sysfw rearch, sysfw PM calls are no longer available from SPL level. To properly support this, remove the is_on checks and the reset assertion from the R5 remoteproc driver as these are not supported. Attempting to access unavailable services will cause the device

[PATCHv5 02/26] arm: mach-k3: introduce new config option for sysfw split

2021-06-03 Thread Tero Kristo
From: Tero Kristo On J7 family of SoCs (J721E and J7200), sysfw is being split to be run under two cores, TIFS portion on DMSC core, and DM firmware under MCU R5. As MCU R5 is also used to run one phase of the bootloader, we must prevent access from here towards sysfw services. To support

[PATCHv5 01/26] lib: rational: copy the rational fraction lib routines from Linux

2021-06-03 Thread Tero Kristo
From: Tero Kristo Copy the best rational approximation calculation routines from Linux. Typical usecase for these routines is to calculate the M/N divider values for PLLs to reach a specific clock rate. This is based on linux kernel commit: "lib/math/rational.c: fix possible incorrect r

[PATCHv5 00/26] Re-base / re-post of TI-K3 HSM rearch series

2021-06-03 Thread Tero Kristo
Hi, As requested, this is just a rebase to the latest u-boot tip. Boot tested on j721e to make sure nothing got broken. -Tero

[PATCHv2] net: convert TFTP_TSIZE to proper Kconfig option

2021-05-12 Thread Tero Kristo
. Signed-off-by: Tero Kristo --- v2: convert to proper Kconfig and add defaults for TI platforms net/Kconfig | 11 +++ 1 file changed, 11 insertions(+) diff --git a/net/Kconfig b/net/Kconfig index c4b4dae064..ba0ca813ce 100644 --- a/net/Kconfig +++ b/net/Kconfig @@ -74,6 +74,17 @@ config

Re: [PATCH v2 00/15] ram: k3-ddrss: Convert k3-j721e to common driver with k3-am64 support

2021-05-12 Thread Tero Kristo
might get confused by that. Just keep it in mind for future improvements. For the whole series (did a quick test run with the latest v4 HSM rearch series also): Reviewed-by: Tero Kristo Tested-by: Tero Kristo Dave Gerlach (14): dt-bindings: memory-controller: Add K3 AM64 DDRSS compatible

Re: [PATCH] configs: ti: enable TFTP_SIZE

2021-05-11 Thread Tero Kristo
On 11/05/2021 15:07, Tom Rini wrote: On Tue, May 11, 2021 at 10:40:15AM +0300, Tero Kristo wrote: This fits the TFTP progress bar on single line based on the size of the file being downloaded, reducing unnecessary spam and also making it easier to track the download progress. Signed-off

[PATCHv4 24/26] configs: j7200_evm_r5: Enable raw access power management features

2021-05-11 Thread Tero Kristo
From: Dave Gerlach Sysfw is not going to provide access to power management features in the new architecture, so SPL must implement these itself. Enable all the raw register access based clock + power domain drivers. Signed-off-by: Dave Gerlach Signed-off-by: Tero Kristo --- configs

[PATCHv4 26/26] arm: dts: k3-j72xx: correct MCU timer1 frequency

2021-05-11 Thread Tero Kristo
caused an error to the clock by a factor of 8 with j7 devices. This problem surfaced once the omap-timer was fixed. Signed-off-by: Tero Kristo --- arch/arm/dts/k3-j7200-common-proc-board-u-boot.dtsi | 2 +- arch/arm/dts/k3-j721e-common-proc-board-u-boot.dtsi | 2 +- 2 files changed, 2 insertions(+), 2

[PATCHv4 25/26] board: ti: j72xx: README: update build instructions and image formats

2021-05-11 Thread Tero Kristo
From: Tero Kristo Update build instructions and image formats based on HSM rearch. A new DM image is added into the build, which gets executed right after R5 SPL finishes its job. Signed-off-by: Tero Kristo Signed-off-by: Tero Kristo --- board/ti/j721e/README | 9 ++--- 1 file changed, 6

[PATCHv4 22/26] arm: mach-k3: j721e_init: Force early probe of clk-k3 driver

2021-05-11 Thread Tero Kristo
configuration. Signed-off-by: Dave Gerlach Reported-by: Keerthy Tested-by: Keerthy Signed-off-by: Tero Kristo --- arch/arm/mach-k3/j721e_init.c | 12 1 file changed, 12 insertions(+) diff --git a/arch/arm/mach-k3/j721e_init.c b/arch/arm/mach-k3/j721e_init.c index 1a4f796e5e

[PATCHv4 21/26] arm: mach-k3: sysfw-loader: pass boardcfg to sciserver

2021-05-11 Thread Tero Kristo
From: Tero Kristo Copy the contents of the board config loaded from sysfw.itb into an EXTBOOT shared memory buffer that gets passed to sciserver. This only needs to be done if EXTBOOT area has not been populated by ROM code yet. Signed-off-by: Tero Kristo Signed-off-by: Tero Kristo --- arch

[PATCHv4 23/26] configs: j721e_evm_r5: Enable raw access power management features

2021-05-11 Thread Tero Kristo
From: Tero Kristo Sysfw is not going to provide access to power management features in the new architecture, so SPL must implement these itself. Enable all the raw register access based clock + power domain drivers. Signed-off-by: Tero Kristo Signed-off-by: Tero Kristo --- configs

[PATCHv4 17/26] arm: mach-k3: Add platform data for j721e and j7200

2021-05-11 Thread Tero Kristo
From: Dave Gerlach Add platform clock and powerdomain data for J721e and J7200. This data is used by the corresponding drivers to register all the required device clocks and powerdomains. Signed-off-by: Dave Gerlach Signed-off-by: Tero Kristo --- arch/arm/mach-k3/Makefile | 2

[PATCHv4 20/26] arm: mach-k3: common: Drop main r5 start

2021-05-11 Thread Tero Kristo
From: Dave Gerlach Only start-up the non-linux remote cores if we are running in legacy boot mode. HSM rearch is not yet supporting this. Signed-off-by: Dave Gerlach Signed-off-by: Tero Kristo Signed-off-by: Tero Kristo --- arch/arm/mach-k3/common.c | 7 --- 1 file changed, 4 insertions

[PATCHv4 19/26] arm: mach-k3: do board config for PM only if supported

2021-05-11 Thread Tero Kristo
From: Tero Kristo If the raw PM support is built in, we are operating in the split firmware approach mode where PM support is not available. In this case, skip the board config for this. Signed-off-by: Tero Kristo Signed-off-by: Tero Kristo --- arch/arm/mach-k3/sysfw-loader.c | 2 ++ 1 file

[PATCHv4 16/26] tools: k3_fit_atf: add DM binary to the FIT image

2021-05-11 Thread Tero Kristo
From: Tero Kristo Add DM (device manager) firmware image to the fit image that is loaded by R5 SPL. This is needed with the HSM rearch where the firmware allocation has been changed slightly. Signed-off-by: Tero Kristo Signed-off-by: Tero Kristo --- arch/arm/mach-k3/config.mk | 4

[PATCHv4 18/26] arm: mach-k3: add support for detecting firmware images from FIT

2021-05-11 Thread Tero Kristo
From: Tero Kristo Add callback routines for parsing the firmware info from FIT image, and use the data to boot up ATF and the MCU R5 firmware. Signed-off-by: Tero Kristo Signed-off-by: Tero Kristo --- arch/arm/mach-k3/common.c | 80 + arch/arm/mach-k3

[PATCHv4 13/26] clk: add support for TI K3 SoC clocks

2021-05-11 Thread Tero Kristo
From: Tero Kristo Add driver to support TI K3 generation SoC clocks. This driver registers the clocks provided via platform data, and adds support for controlling the clocks via DT handles. Signed-off-by: Tero Kristo Signed-off-by: Tero Kristo --- drivers/clk/ti/Kconfig | 12 ++ drivers

[PATCHv4 15/26] cmd: ti: pd: Add debug command for K3 power domains

2021-05-11 Thread Tero Kristo
From: Tero Kristo Add support command for debugging K3 power domains. This is useful with the HSM rearch setup, where power domains are directly controlled by SPL instead of going through the TI SCI layer. The debugging support is only available in the u-boot codebase though, so the raw register

[PATCHv4 14/26] power: domain: Introduce driver for raw TI K3 PDs

2021-05-11 Thread Tero Kristo
From: Tero Kristo Normally, power domains are handled via TI-SCI in K3 SoCs. However, SPL is not going to have access to sysfw resources, so it must control them directly. Add driver for supporting this. Signed-off-by: Tero Kristo Signed-off-by: Tero Kristo --- drivers/power/domain/Kconfig

[PATCHv4 12/26] clk: add support for TI K3 SoC PLL

2021-05-11 Thread Tero Kristo
From: Tero Kristo Add support for TI K3 SoC PLLs. This clock type supports enabling/disabling/setting and querying the clock rate for the PLL. The euclidean library routine is used to calculate divider/multiplier rates for the PLLs. Signed-off-by: Tero Kristo Signed-off-by: Tero Kristo

[PATCHv4 11/26] clk: fix set_rate to clean up cached rates for the hierarchy

2021-05-11 Thread Tero Kristo
From: Tero Kristo Clock rates are cached within the individual clock nodes, and right now if one changes a clock rate somewhere in the middle of the tree, none of its child clocks notice the change. To fix this, clear up all the cached rates for us and our child clocks. Signed-off-by: Tero

[PATCHv4 09/26] clk: sci-clk: fix return value of set_rate

2021-05-11 Thread Tero Kristo
From: Tero Kristo Set rate should return the new clock rate on success, and negative error value on failure. Fix this, as currently set_rate returns 0 on success. Signed-off-by: Tero Kristo Signed-off-by: Tero Kristo --- drivers/clk/ti/clk-sci.c | 6 -- 1 file changed, 4 insertions(+), 2

[PATCHv4 10/26] clk: fix assigned-clocks to pass with deferring provider

2021-05-11 Thread Tero Kristo
From: Tero Kristo If a clock provider is not ready for assigning default rates/parents during its probe, it may return -EPROBE_DEFER directly from xlate. Handle this special case properly by skipping the entry and adjusting the return value to pass. The defaults will be handled properly in post

[PATCHv4 08/26] clk: add support for setting clk rate from cmdline

2021-05-11 Thread Tero Kristo
From: Tero Kristo Add new clk subcommand "clk setfreq", for setting up a clock rate directly from u-boot cmdline. This is handy for any debugging purposes towards clocks. Acked-by: Lukasz Majewski Signed-off-by: Tero Kristo Signed-off-by: Tero Kristo --- cmd/

[PATCHv4 06/26] clk: fix clock tree dump to properly dump out every registered clock

2021-05-11 Thread Tero Kristo
From: Tero Kristo Some clocks are not associated to a DM node, so just parsing the DM is not enough. This is especially true for root clocks, which typically don't have any parents. Instead, fetch every registered UCLASS_CLK instance, and dump these out. Signed-off-by: Tero Kristo Signed-off

[PATCHv4 07/26] clk: do not attempt to fetch clock pointer with null device

2021-05-11 Thread Tero Kristo
From: Tero Kristo Bail out early if device returned for the parent clock is null. This avoids warning prints like this when doing clk dump: dev_get_uclass_priv: null device Signed-off-by: Tero Kristo Signed-off-by: Tero Kristo --- drivers/clk/clk-uclass.c | 2 ++ 1 file changed, 2

[PATCHv4 04/26] common: fit: Update board_fit_image_post_process() to pass fit and node_offset

2021-05-11 Thread Tero Kristo
From: Lokesh Vutla board_fit_image_post_process() passes only start and size of the image, but type of the image is not passed. So pass fit and node_offset, to derive information about image to be processed. Signed-off-by: Lokesh Vutla Reviewed-by: Tom Rini Signed-off-by: Tero Kristo

[PATCHv4 05/26] clk: fixed_rate: add API for directly registering fixed rate clocks

2021-05-11 Thread Tero Kristo
From: Tero Kristo Current driver only supports registering fixed rate clocks from DT. Add new API which makes it possible to register fixed rate clocks directly from e.g. platform specific clock drivers. Reviewed-by: Peng Fan Signed-off-by: Tero Kristo Signed-off-by: Tero Kristo --- drivers

[PATCHv4 03/26] remoteproc: k3-r5: remove sysfw PM calls if not supported

2021-05-11 Thread Tero Kristo
From: Tero Kristo With the sysfw rearch, sysfw PM calls are no longer available from SPL level. To properly support this, remove the is_on checks and the reset assertion from the R5 remoteproc driver as these are not supported. Attempting to access unavailable services will cause the device

[PATCHv4 02/26] arm: mach-k3: introduce new config option for sysfw split

2021-05-11 Thread Tero Kristo
From: Tero Kristo On J7 family of SoCs (J721E and J7200), sysfw is being split to be run under two cores, TIFS portion on DMSC core, and DM firmware under MCU R5. As MCU R5 is also used to run one phase of the bootloader, we must prevent access from here towards sysfw services. To support

[PATCHv4 00/26] J72xx: HSM rearch support series

2021-05-11 Thread Tero Kristo
Hello, Couple of small changes in v4: - re-worked patch #14 to include review comments from Jaehoon Chung * changed code to use iopoll version instead of hand crafted loops for timeout handling * other mostly cosmetic changes - patch #19/#21 changed to allow RM init to happen based on

[PATCHv4 01/26] lib: rational: copy the rational fraction lib routines from Linux

2021-05-11 Thread Tero Kristo
From: Tero Kristo Copy the best rational approximation calculation routines from Linux. Typical usecase for these routines is to calculate the M/N divider values for PLLs to reach a specific clock rate. This is based on linux kernel commit: "lib/math/rational.c: fix possible incorrect r

[PATCH] configs: ti: enable TFTP_SIZE

2021-05-11 Thread Tero Kristo
This fits the TFTP progress bar on single line based on the size of the file being downloaded, reducing unnecessary spam and also making it easier to track the download progress. Signed-off-by: Tero Kristo --- include/configs/ti_armv7_common.h | 2 ++ 1 file changed, 2 insertions(+) diff --git

Re: [PATCHv3 19/26] arm: mach-k3: do board config for PM and RM only if supported

2021-05-10 Thread Tero Kristo
On 09/05/2021 08:54, Vignesh Raghavendra wrote: On 5/5/21 11:25 PM, Tero Kristo wrote: From: Tero Kristo If the raw PM support is built in, we are operating in the split firmware approach mode where RM and PM support is not available. In this case, skip the board config for these two

Re: [PATCHv3 14/26] power: domain: Introduce driver for raw TI K3 PDs

2021-05-07 Thread Tero Kristo
On 07/05/2021 03:03, Jaehoon Chung wrote: Hi Tero, On 5/6/21 2:55 AM, Tero Kristo wrote: From: Tero Kristo Normally, power domains are handled via TI-SCI in K3 SoCs. However, SPL is not going to have access to sysfw resources, so it must control them directly. Add driver for supporting

Re: [PATCHv3 00/26] J72xx: HSM rearch support series

2021-05-05 Thread Tero Kristo
Uhm, Sorry for CC:ing a stale email address with the patches, t-kri...@ti.com is no longer functional. Please drop that from any of the replies if you don't fancy spam replies from server. -Tero On 05/05/2021 20:55, Tero Kristo wrote: Hello, Resurrecting this series; v2 [1] was sort

[PATCHv3 26/26] arm: dts: k3-j72xx: correct MCU timer1 frequency

2021-05-05 Thread Tero Kristo
caused an error to the clock by a factor of 8 with j7 devices. This problem surfaced once the omap-timer was fixed. Signed-off-by: Tero Kristo --- arch/arm/dts/k3-j7200-common-proc-board-u-boot.dtsi | 2 +- arch/arm/dts/k3-j721e-common-proc-board-u-boot.dtsi | 2 +- 2 files changed, 2 insertions(+), 2

[PATCHv3 25/26] board: ti: j72xx: README: update build instructions and image formats

2021-05-05 Thread Tero Kristo
From: Tero Kristo Update build instructions and image formats based on HSM rearch. A new DM image is added into the build, which gets executed right after R5 SPL finishes its job. Signed-off-by: Tero Kristo Signed-off-by: Tero Kristo --- board/ti/j721e/README | 9 ++--- 1 file changed, 6

  1   2   3   >