Skip to content

Add support for Rockchip RK808 PMIC RTC device

sunil at amarulasolutions.com u-boot 3 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest4 patches 0 repliesNew
  2. v24 patches 0 repliesSuperseded
  3. v13 patches 0 repliesSuperseded

Changes in v3 from the cover letter

- forgot to add reviewed by tag for first two patches, added the tag.

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4arm: dts: rockchip: rk3399-roc-pc: Add RTC child node for RK808 PMICarch/arm/dts/rk3399-roc-pc-u-boot.dtsi+8 -00 replies
2/4power: pmic: rk8xx: bind rk808 RTCdrivers/power/pmic/rk8xx.c+18 -10 replies
3/4rtc: rk8xx: Add base support for the RK808 PMIC RTCdrivers/rtc/Kconfig drivers/rtc/Makefile drivers/rtc/rk808-rtc.c+174 -02 replies
4/4configs: roc-rk3399-pc: Enable DM for RTC and commandsconfigs/roc-pc-rk3399_defconfig+2 -00 replies

Reviews trailers per patch

2 of 4 patches have a Reviewed-by or Acked-by.

PatchKever Yang
1/4R-b
2/4R-b
3/4
4/4

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 0/4] Add support for Rockchip RK808 PMIC RTC device

From: Suniel Mahesh <[email protected]>

This patch series adds support for Rockchip RK808 PMIC RTC device.

Patch #1, adds a child node under RK808 PMIC node. Patch #2 binds this child device with its parent RK808 PMIC. Patch #3 adds the rtc driver. Patch #4 enables DM RTC, adds date command for the target.

The RK808 PMIC RTC has a hardware bug. It counts 31 days for november month and the weeks register counts 0 - 7.

This driver does a temporary fix, where as in if date is Nov 31, then it resets the date to Dec 1(this happens only if date cmd is queried from u-boot command line/script). Similarly for the weeks register, 0(sun) - 6(sat). If 7 is encountered then it is reset to zero.

u-boot generally loads linux/other binary. Linux has a full fledged driver implemented along with a workaround.
https://lkml.org/lkml/2015/12/2/1202
---
Changes for v3:
- forgot to add reviewed by tag for first two patches, added the tag.

Changes for v2:
- changed the description of the patch
- earlier it was a three patch series. code which was enabling RTC DM and date command is split into a seperate patch as suggested by kever yang. patch#3 is split into patch#4.
---
Suniel Mahesh (4):
arm: dts: rockchip: rk3399-roc-pc: Add RTC child node for RK808 PMIC
power: pmic: rk8xx: bind rk808 RTC
rtc: rk8xx: Add base support for the RK808 PMIC RTC
configs: roc-rk3399-pc: Enable DM for RTC and commands

 arch/arm/dts/rk3399-roc-pc-u-boot.dtsi |   8 ++
 configs/roc-pc-rk3399_defconfig        |   2 +
 drivers/power/pmic/rk8xx.c             |  19 +++-
 drivers/rtc/Kconfig                    |   8 ++
 drivers/rtc/Makefile                   |   1 +
 drivers/rtc/rk808-rtc.c                | 165 +++++++++++++++++++++++++++++++++
 6 files changed, 202 insertions(+), 1 deletion(-)
 create mode 100644 drivers/rtc/rk808-rtc.c
Signature · 1 line
2.7.4