0549-config-Add-ABX80X-RTC-driver-and-overlay.patch 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. From da62b2064a19346529bf827e8d7fbbd76e5e7ead Mon Sep 17 00:00:00 2001
  2. From: Phil Elwell <phil@raspberrypi.org>
  3. Date: Wed, 23 Nov 2016 14:19:40 +0000
  4. Subject: [PATCH] config: Add ABX80X RTC driver and overlay
  5. Signed-off-by: Phil Elwell <phil@raspberrypi.org>
  6. ---
  7. arch/arm/boot/dts/overlays/README | 12 ++++++++++--
  8. arch/arm/boot/dts/overlays/i2c-rtc-overlay.dts | 12 +++++++++++-
  9. arch/arm/configs/bcm2709_defconfig | 1 +
  10. arch/arm/configs/bcmrpi_defconfig | 1 +
  11. 4 files changed, 23 insertions(+), 3 deletions(-)
  12. --- a/arch/arm/boot/dts/overlays/README
  13. +++ b/arch/arm/boot/dts/overlays/README
  14. @@ -498,7 +498,11 @@ Params: addr I2C addr
  15. Name: i2c-rtc
  16. Info: Adds support for a number of I2C Real Time Clock devices
  17. Load: dtoverlay=i2c-rtc,<param>=<val>
  18. -Params: ds1307 Select the DS1307 device
  19. +Params: abx80x Select one of the ABx80x family:
  20. + AB0801, AB0803, AB0804, AB0805,
  21. + AB1801, AB1803, AB1804, AB1805
  22. +
  23. + ds1307 Select the DS1307 device
  24. ds1339 Select the DS1339 device
  25. @@ -514,7 +518,11 @@ Params: ds1307 Select t
  26. pcf8563 Select the PCF8563 device
  27. - trickle-resistor-ohms Resistor value for trickle charge (DS1339-only)
  28. + trickle-diode-type Diode type for trickle charge - "standard" or
  29. + "schottky" (ABx80x only)
  30. +
  31. + trickle-resistor-ohms Resistor value for trickle charge (DS1339,
  32. + ABx80x)
  33. wakeup-source Specify that the RTC can be used as a wakeup
  34. source
  35. --- a/arch/arm/boot/dts/overlays/i2c-rtc-overlay.dts
  36. +++ b/arch/arm/boot/dts/overlays/i2c-rtc-overlay.dts
  37. @@ -12,6 +12,13 @@
  38. #size-cells = <0>;
  39. status = "okay";
  40. + abx80x: abx80x@69 {
  41. + compatible = "abracon,abx80x";
  42. + reg = <0x69>;
  43. + abracon,tc-diode = "standard";
  44. + abracon,tc-resistor = <0>;
  45. + status = "disable";
  46. + };
  47. ds1307: ds1307@68 {
  48. compatible = "maxim,ds1307";
  49. reg = <0x68>;
  50. @@ -56,6 +63,7 @@
  51. };
  52. };
  53. __overrides__ {
  54. + abx80x = <&abx80x>,"status";
  55. ds1307 = <&ds1307>,"status";
  56. ds1339 = <&ds1339>,"status";
  57. ds3231 = <&ds3231>,"status";
  58. @@ -64,7 +72,9 @@
  59. pcf2127 = <&pcf2127>,"status";
  60. pcf8523 = <&pcf8523>,"status";
  61. pcf8563 = <&pcf8563>,"status";
  62. - trickle-resistor-ohms = <&ds1339>,"trickle-resistor-ohms:0";
  63. + trickle-diode-type = <&abx80x>,"abracon,tc-diode";
  64. + trickle-resistor-ohms = <&ds1339>,"trickle-resistor-ohms:0",
  65. + <&abx80x>,"abracon,tc-resistor";
  66. wakeup-source = <&ds1339>,"wakeup-source?",
  67. <&ds3231>,"wakeup-source?",
  68. <&mcp7940x>,"wakeup-source?",
  69. --- a/arch/arm/configs/bcm2709_defconfig
  70. +++ b/arch/arm/configs/bcm2709_defconfig
  71. @@ -1060,6 +1060,7 @@ CONFIG_LEDS_TRIGGER_CAMERA=m
  72. CONFIG_LEDS_TRIGGER_INPUT=y
  73. CONFIG_RTC_CLASS=y
  74. # CONFIG_RTC_HCTOSYS is not set
  75. +CONFIG_RTC_DRV_ABX80X=m
  76. CONFIG_RTC_DRV_DS1307=m
  77. CONFIG_RTC_DRV_DS1374=m
  78. CONFIG_RTC_DRV_DS1672=m
  79. --- a/arch/arm/configs/bcmrpi_defconfig
  80. +++ b/arch/arm/configs/bcmrpi_defconfig
  81. @@ -1067,6 +1067,7 @@ CONFIG_LEDS_TRIGGER_CAMERA=m
  82. CONFIG_LEDS_TRIGGER_INPUT=y
  83. CONFIG_RTC_CLASS=y
  84. # CONFIG_RTC_HCTOSYS is not set
  85. +CONFIG_RTC_DRV_ABX80X=m
  86. CONFIG_RTC_DRV_DS1307=m
  87. CONFIG_RTC_DRV_DS1374=m
  88. CONFIG_RTC_DRV_DS1672=m