[PATCH 1/3] rtc: ds1307: Add ds1339 compatible

As far as u-boot is concerned the ds1339 is compatible with the other devices supported by the ds1307 driver. The Linux driver does expose some additional functionality but as far as u-boot is concerned just adding the compatible string is enough.
Signed-off-by: Chris Packham judge.packham@gmail.com ---
drivers/rtc/ds1307.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/drivers/rtc/ds1307.c b/drivers/rtc/ds1307.c index 17344d4d4ff2..2015ce9bbcd4 100644 --- a/drivers/rtc/ds1307.c +++ b/drivers/rtc/ds1307.c @@ -23,6 +23,7 @@ enum ds_type { ds_1307, ds_1337, + ds_1339, ds_1340, m41t11, mcp794xx, @@ -344,6 +345,7 @@ static const struct rtc_ops ds1307_rtc_ops = { static const struct udevice_id ds1307_rtc_ids[] = { { .compatible = "dallas,ds1307", .data = ds_1307 }, { .compatible = "dallas,ds1337", .data = ds_1337 }, + { .compatible = "dallas,ds1339", .data = ds_1339 }, { .compatible = "dallas,ds1340", .data = ds_1340 }, { .compatible = "microchip,mcp7941x", .data = mcp794xx }, { .compatible = "st,m41t11", .data = m41t11 },

The T2080RDB has a ds1339 on i2c0. Add this to the devicetree and enable the relevant support in the configs.
Signed-off-by: Chris Packham judge.packham@gmail.com ---
arch/powerpc/dts/t2080rdb.dts | 8 ++++++++ configs/T2080RDB_NAND_defconfig | 2 ++ configs/T2080RDB_SDCARD_defconfig | 2 ++ configs/T2080RDB_SPIFLASH_defconfig | 2 ++ configs/T2080RDB_defconfig | 2 ++ 5 files changed, 16 insertions(+)
diff --git a/arch/powerpc/dts/t2080rdb.dts b/arch/powerpc/dts/t2080rdb.dts index 34ec6a74cb1d..74bbb20e2a1e 100644 --- a/arch/powerpc/dts/t2080rdb.dts +++ b/arch/powerpc/dts/t2080rdb.dts @@ -30,3 +30,11 @@ spi-max-frequency = <10000000>; /* input clock */ }; }; + +&i2c0 { + status = "okay"; + rtc@68 { + compatible = "dallas,ds1339"; + reg = <0x68>; + }; +}; diff --git a/configs/T2080RDB_NAND_defconfig b/configs/T2080RDB_NAND_defconfig index d7ccee255929..543d34e24988 100644 --- a/configs/T2080RDB_NAND_defconfig +++ b/configs/T2080RDB_NAND_defconfig @@ -77,6 +77,8 @@ CONFIG_DM_PCI=y CONFIG_DM_PCI_COMPAT=y CONFIG_PCIE_FSL=y CONFIG_SYS_QE_FMAN_FW_IN_NAND=y +CONFIG_DM_RTC=y +CONFIG_RTC_DS1307=y CONFIG_SYS_NS16550=y CONFIG_SPI=y CONFIG_DM_SPI=y diff --git a/configs/T2080RDB_SDCARD_defconfig b/configs/T2080RDB_SDCARD_defconfig index 99ea925df8f5..d947846e6458 100644 --- a/configs/T2080RDB_SDCARD_defconfig +++ b/configs/T2080RDB_SDCARD_defconfig @@ -74,6 +74,8 @@ CONFIG_DM_PCI=y CONFIG_DM_PCI_COMPAT=y CONFIG_PCIE_FSL=y CONFIG_SYS_QE_FMAN_FW_IN_MMC=y +CONFIG_DM_RTC=y +CONFIG_RTC_DS1307=y CONFIG_SYS_NS16550=y CONFIG_SPI=y CONFIG_DM_SPI=y diff --git a/configs/T2080RDB_SPIFLASH_defconfig b/configs/T2080RDB_SPIFLASH_defconfig index c820c2bf5aed..6f7b083bc623 100644 --- a/configs/T2080RDB_SPIFLASH_defconfig +++ b/configs/T2080RDB_SPIFLASH_defconfig @@ -76,6 +76,8 @@ CONFIG_DM_PCI=y CONFIG_DM_PCI_COMPAT=y CONFIG_PCIE_FSL=y CONFIG_SYS_QE_FMAN_FW_IN_SPIFLASH=y +CONFIG_DM_RTC=y +CONFIG_RTC_DS1307=y CONFIG_SYS_NS16550=y CONFIG_SPI=y CONFIG_DM_SPI=y diff --git a/configs/T2080RDB_defconfig b/configs/T2080RDB_defconfig index d20de349de7c..9dd01bbe50a5 100644 --- a/configs/T2080RDB_defconfig +++ b/configs/T2080RDB_defconfig @@ -61,6 +61,8 @@ CONFIG_DM_PCI=y CONFIG_DM_PCI_COMPAT=y CONFIG_PCIE_FSL=y CONFIG_SYS_QE_FMAN_FW_IN_NOR=y +CONFIG_DM_RTC=y +CONFIG_RTC_DS1307=y CONFIG_SYS_NS16550=y CONFIG_SPI=y CONFIG_DM_SPI=y

The User Guide contains handy things like block diagrams and DIP switch settings and it's even available on the public web. Add a link to it in the README.
Signed-off-by: Chris Packham judge.packham@gmail.com ---
board/freescale/t208xrdb/README | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/board/freescale/t208xrdb/README b/board/freescale/t208xrdb/README index 9e4b28faf411..ec47c96f2b1a 100644 --- a/board/freescale/t208xrdb/README +++ b/board/freescale/t208xrdb/README @@ -34,6 +34,11 @@ T2080 includes the following functions and features: - Support for hardware virtualization and partitioning enforcement - QorIQ Platform's Trust Architecture 2.0
+User Guide +---------- +The T2080RDB User Guide is available on the web at +https://www.nxp.com/docs/en/user-guide/T2080RDBPCUG.pdf + Differences between T2080 and T2081 ----------------------------------- Feature T2080 T2081

On Tue, 2 Mar 2021 at 20:09, Chris Packham judge.packham@gmail.com wrote:
As far as u-boot is concerned the ds1339 is compatible with the other
U-Boot
devices supported by the ds1307 driver. The Linux driver does expose some additional functionality but as far as u-boot is concerned just adding the compatible string is enough.
Signed-off-by: Chris Packham judge.packham@gmail.com
drivers/rtc/ds1307.c | 2 ++ 1 file changed, 2 insertions(+)
Reviewed-by: Simon Glass sjg@chromium.org
participants (2)
-
Chris Packham
-
Simon Glass