Skip to contentSkip to conversation

rtc: ds1307: Add ds1339 compatible

PATCH New Chris Packham 2 participants 4 messages Mar 3, 2021 – Mar 5, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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.

---

 drivers/rtc/ds1307.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/rtc/ds1307.c +2 -0
index 17344d4d4ff2..2015ce9bbcd4 100644
@@ -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 },
Signature · 1 line
2.30.1
#1 lore raw

PATCH 2/3 powerpc: t2080rdb: Enable RTC support

The T2080RDB has a ds1339 on i2c0. Add this to the devicetree and enable the relevant support in the configs.

---

 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(+)
arch/powerpc/dts/t2080rdb.dts +8 -0
index 34ec6a74cb1d..74bbb20e2a1e 100644
@@ -30,3 +30,11 @@
 		spi-max-frequency = <10000000>; /* input clock */
 	};
 };
+
+&i2c0 {
+	status = "okay";
+	rtc at 68 {
+		compatible = "dallas,ds1339";
+		reg = <0x68>;
+	};
+};
configs/T2080RDB_NAND_defconfig +2 -0
index d7ccee255929..543d34e24988 100644
@@ -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
configs/T2080RDB_SDCARD_defconfig +2 -0
index 99ea925df8f5..d947846e6458 100644
@@ -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
configs/T2080RDB_SPIFLASH_defconfig +2 -0
index c820c2bf5aed..6f7b083bc623 100644
@@ -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
configs/T2080RDB_defconfig +2 -0
index d20de349de7c..9dd01bbe50a5 100644
@@ -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
Signature · 1 line
2.30.1
#2 lore raw

PATCH 3/3 board: freescale: t208xrdb: Add link to User Guide

In reply to Chris Packham

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.

---

 board/freescale/t208xrdb/README | 5 +++++
 1 file changed, 5 insertions(+)
board/freescale/t208xrdb/README +5 -0
index 9e4b28faf411..ec47c96f2b1a 100644
@@ -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
Signature · 1 line
2.30.1
#3 lore raw

PATCH 1/3 rtc: ds1307: Add ds1339 compatible

In reply to Chris Packham
Quoted 2 lines · Chris Packham

As far as u-boot is concerned the ds1339 is compatible with the other

U-Boot

Quoted 10 lines

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.

---

 drivers/rtc/ds1307.c | 2 ++
 1 file changed, 2 insertions(+)