ARM: socfpga: Enable DM RTC bootcount on ABB SECU1
authorMarek Vasut <marex@denx.de>
Fri, 6 Mar 2020 20:52:21 +0000 (21:52 +0100)
committerMarek Vasut <marex@denx.de>
Mon, 13 Apr 2020 11:49:51 +0000 (13:49 +0200)
Add and enable RTC-backed boot counter on ABB SECU1 platform.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Ley Foon Tan <ley.foon.tan@intel.com>
Cc: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
Reviewed-by: Ley Foon Tan <ley.foon.tan@intel.com>
arch/arm/dts/socfpga_arria5_secu1.dts
configs/socfpga_secu1_defconfig

index dadf766682d8dd45dd20b93c010f01b9c90391d9..820e29ad6d40db6a754a8de8622a25ced4737eca 100644 (file)
                spi0 = &spi1;
        };
 
+       bootcount@0 {
+               compatible = "u-boot,bootcount-rtc";
+               rtc = <&rtc>;
+               offset = <0x9e>;
+       };
+
        i2c_gpio: i2c@0 {
                compatible = "i2c-gpio";
                #address-cells = <1>;
index 230959ec8659597248ac4dd70b22cf1a813cfab1..fcb38f1a41082ca88e09e9026b63176e8c3df776 100644 (file)
@@ -48,6 +48,9 @@ CONFIG_ENV_IS_IN_NAND=y
 CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
 CONFIG_SPL_DM_SEQ_ALIAS=y
 # CONFIG_SPL_BLK is not set
+CONFIG_BOOTCOUNT_LIMIT=y
+CONFIG_DM_BOOTCOUNT=y
+CONFIG_DM_BOOTCOUNT_RTC=y
 CONFIG_DWAPB_GPIO=y
 CONFIG_DM_I2C=y
 CONFIG_I2C_SET_DEFAULT_BUS_NUM=y
@@ -76,6 +79,8 @@ CONFIG_PHY_GIGE=y
 CONFIG_ETH_DESIGNWARE=y
 CONFIG_MII=y
 CONFIG_DM_RESET=y
+CONFIG_DM_RTC=y
+CONFIG_RTC_M41T62=y
 CONFIG_SPI=y
 CONFIG_SPI_MEM=y
 CONFIG_DESIGNWARE_SPI=y