Re: [PATCH] spl: watchdog: introduce SPL_HW_WATCHDOG

2023-08-22 Thread Oleksandr Suvorov
On Tue, Aug 22, 2023 at 7:28 PM Fabio Estevam  wrote:
>
> Hi Oleksandr,
>
> On Tue, Aug 22, 2023 at 12:53 PM Oleksandr Suvorov
>  wrote:
>
> > ddr-1d-imem-fw {
> > -   filename = "lpddr4_pmu_train_1d_imem_202006.bin";
> > +   filename = "lpddr4_pmu_train_1d_imem.bin";
> > type = "blob-ext";
> > align-end = <4>;
> > };
> >
> > ddr-1d-dmem-fw {
> > -   filename = "lpddr4_pmu_train_1d_dmem_202006.bin";
> > +   filename = "lpddr4_pmu_train_1d_dmem.bin";
> > type = "blob-ext";
> > align-end = <4>;
> > };
> >
> > ddr-2d-imem-fw {
> > -   filename = "lpddr4_pmu_train_2d_imem_202006.bin";
> > +   filename = "lpddr4_pmu_train_2d_imem.bin";
>
> Unrelated changes?

Oops, yes, sorry, I'll resend the fixed version soon.

-- 
Best regards
Oleksandr

Oleksandr Suvorov
cryo...@gmail.com


Re: [PATCH] spl: watchdog: introduce SPL_HW_WATCHDOG

2023-08-22 Thread Fabio Estevam
Hi Oleksandr,

On Tue, Aug 22, 2023 at 12:53 PM Oleksandr Suvorov
 wrote:

> ddr-1d-imem-fw {
> -   filename = "lpddr4_pmu_train_1d_imem_202006.bin";
> +   filename = "lpddr4_pmu_train_1d_imem.bin";
> type = "blob-ext";
> align-end = <4>;
> };
>
> ddr-1d-dmem-fw {
> -   filename = "lpddr4_pmu_train_1d_dmem_202006.bin";
> +   filename = "lpddr4_pmu_train_1d_dmem.bin";
> type = "blob-ext";
> align-end = <4>;
> };
>
> ddr-2d-imem-fw {
> -   filename = "lpddr4_pmu_train_2d_imem_202006.bin";
> +   filename = "lpddr4_pmu_train_2d_imem.bin";

Unrelated changes?


[PATCH] spl: watchdog: introduce SPL_HW_WATCHDOG

2023-08-22 Thread Oleksandr Suvorov
Add SPL_HW_WATCHDOG Kconfig symbol which can be used to enable
non-WDT hardware watchdog in SPL.

Co-developed-by: Igor Opaniuk 
Signed-off-by: Igor Opaniuk 
Signed-off-by: Oleksandr Suvorov 
---

 arch/arm/dts/imx8mp-u-boot.dtsi | 8 
 common/spl/Kconfig  | 1 -
 drivers/Makefile| 1 +
 drivers/sysreset/Kconfig| 6 ++
 drivers/sysreset/Makefile   | 2 +-
 drivers/watchdog/Kconfig| 4 
 6 files changed, 16 insertions(+), 6 deletions(-)

diff --git a/arch/arm/dts/imx8mp-u-boot.dtsi b/arch/arm/dts/imx8mp-u-boot.dtsi
index 36e7444a627..c8ab3916862 100644
--- a/arch/arm/dts/imx8mp-u-boot.dtsi
+++ b/arch/arm/dts/imx8mp-u-boot.dtsi
@@ -65,25 +65,25 @@
};
 
ddr-1d-imem-fw {
-   filename = "lpddr4_pmu_train_1d_imem_202006.bin";
+   filename = "lpddr4_pmu_train_1d_imem.bin";
type = "blob-ext";
align-end = <4>;
};
 
ddr-1d-dmem-fw {
-   filename = "lpddr4_pmu_train_1d_dmem_202006.bin";
+   filename = "lpddr4_pmu_train_1d_dmem.bin";
type = "blob-ext";
align-end = <4>;
};
 
ddr-2d-imem-fw {
-   filename = "lpddr4_pmu_train_2d_imem_202006.bin";
+   filename = "lpddr4_pmu_train_2d_imem.bin";
type = "blob-ext";
align-end = <4>;
};
 
ddr-2d-dmem-fw {
-   filename = "lpddr4_pmu_train_2d_dmem_202006.bin";
+   filename = "lpddr4_pmu_train_2d_dmem.bin";
type = "blob-ext";
align-end = <4>;
};
diff --git a/common/spl/Kconfig b/common/spl/Kconfig
index c5dd476db58..07d9dac29bd 100644
--- a/common/spl/Kconfig
+++ b/common/spl/Kconfig
@@ -1351,7 +1351,6 @@ config SPL_THERMAL
 
 config SPL_WATCHDOG
bool "Support watchdog drivers"
-   imply SPL_WDT if !HW_WATCHDOG
help
  Enable support for watchdog drivers in SPL. A watchdog is
  typically a hardware peripheral which can reset the system when it
diff --git a/drivers/Makefile b/drivers/Makefile
index efc2a4afb24..2eb8ec0a894 100644
--- a/drivers/Makefile
+++ b/drivers/Makefile
@@ -62,6 +62,7 @@ obj-$(CONFIG_SPL_USB_GADGET) += usb/gadget/
 obj-$(CONFIG_SPL_USB_GADGET) += usb/common/
 obj-$(CONFIG_SPL_USB_GADGET) += usb/gadget/udc/
 obj-$(CONFIG_SPL_WATCHDOG) += watchdog/
+obj-$(CONFIG_SPL_HW_WATCHDOG) += watchdog/
 obj-$(CONFIG_SPL_USB_HOST) += usb/host/
 obj-$(CONFIG_SPL_SATA) += ata/ scsi/
 obj-$(CONFIG_SPL_LEGACY_BLOCK) += block/
diff --git a/drivers/sysreset/Kconfig b/drivers/sysreset/Kconfig
index bdbe2a95364..0d21673e402 100644
--- a/drivers/sysreset/Kconfig
+++ b/drivers/sysreset/Kconfig
@@ -157,6 +157,12 @@ config SYSRESET_WATCHDOG
help
  Reboot support for generic watchdog reset.
 
+config SPL_SYSRESET_WATCHDOG
+   bool "Enable support for watchdog reboot driver in SPL mode"
+   select SPL_WDT
+   help
+ Reboot support for generic watchdog reset in SPL mode.
+
 config SYSRESET_WATCHDOG_AUTO
bool "Automatically register first watchdog with sysreset"
depends on SYSRESET_WATCHDOG
diff --git a/drivers/sysreset/Makefile b/drivers/sysreset/Makefile
index 40c876764af..e5a7fc07a81 100644
--- a/drivers/sysreset/Makefile
+++ b/drivers/sysreset/Makefile
@@ -18,7 +18,7 @@ obj-$(CONFIG_SYSRESET_SOCFPGA) += sysreset_socfpga.o
 obj-$(CONFIG_SYSRESET_SOCFPGA_SOC64) += sysreset_socfpga_soc64.o
 obj-$(CONFIG_SYSRESET_TI_SCI) += sysreset-ti-sci.o
 obj-$(CONFIG_SYSRESET_SYSCON) += sysreset_syscon.o
-obj-$(CONFIG_SYSRESET_WATCHDOG) += sysreset_watchdog.o
+obj-$(CONFIG_$(SPL_)SYSRESET_WATCHDOG) += sysreset_watchdog.o
 obj-$(CONFIG_SYSRESET_RESETCTL) += sysreset_resetctl.o
 obj-$(CONFIG_$(SPL_TPL_)SYSRESET_AT91) += sysreset_at91.o
 obj-$(CONFIG_$(SPL_TPL_)SYSRESET_X86) += sysreset_x86.o
diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig
index 07fc4940e91..d696a04fc18 100644
--- a/drivers/watchdog/Kconfig
+++ b/drivers/watchdog/Kconfig
@@ -39,9 +39,13 @@ config WATCHDOG_TIMEOUT_MSECS
 config HW_WATCHDOG
bool
 
+config SPL_HW_WATCHDOG
+   bool
+
 config IMX_WATCHDOG
bool "Enable Watchdog Timer support for IMX and LSCH2 of NXP"
select HW_WATCHDOG if !WDT
+   select SPL_HW_WATCHDOG if !SPL_WDT
help
  Select this to enable the IMX and LSCH2 of Layerscape watchdog
  driver.
-- 
2.41.0