0343-BCM270X_DT-Fix-the-tinylcd35-overlay-RTC-support.patch 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. From 6410b301f0c9fb6751b03eb11724dd1cd9748f4e Mon Sep 17 00:00:00 2001
  2. From: Phil Elwell <phil@raspberrypi.org>
  3. Date: Thu, 12 May 2016 09:04:20 +0100
  4. Subject: [PATCH] BCM270X_DT: Fix the tinylcd35 overlay RTC support
  5. Now that overlay parameters are applied before the merge (a requirement
  6. for kernel runtime overlays) it is illegal for parameters/overrides to
  7. target nodes in the base DTB. Solve the problem of only enabling I2C
  8. when an RTC option is used by making the RTC fragments conditional,
  9. and including the required status="okay" within the fragments.
  10. Signed-off-by: Phil Elwell <phil@raspberrypi.org>
  11. ---
  12. arch/arm/boot/dts/overlays/tinylcd35-overlay.dts | 18 ++++++++++--------
  13. 1 file changed, 10 insertions(+), 8 deletions(-)
  14. --- a/arch/arm/boot/dts/overlays/tinylcd35-overlay.dts
  15. +++ b/arch/arm/boot/dts/overlays/tinylcd35-overlay.dts
  16. @@ -132,28 +132,32 @@
  17. fragment@5 {
  18. target = <&i2c1>;
  19. - __overlay__ {
  20. + __dormant__ {
  21. #address-cells = <1>;
  22. #size-cells = <0>;
  23. + status = "okay";
  24. +
  25. pcf8563: pcf8563@51 {
  26. compatible = "nxp,pcf8563";
  27. reg = <0x51>;
  28. - status = "disabled";
  29. + status = "okay";
  30. };
  31. };
  32. };
  33. fragment@6 {
  34. target = <&i2c1>;
  35. - __overlay__ {
  36. + __dormant__ {
  37. #address-cells = <1>;
  38. #size-cells = <0>;
  39. + status = "okay";
  40. +
  41. ds1307: ds1307@68 {
  42. compatible = "maxim,ds1307";
  43. reg = <0x68>;
  44. - status = "disabled";
  45. + status = "okay";
  46. };
  47. };
  48. };
  49. @@ -213,10 +217,8 @@
  50. <&tinylcd35_ts>,"interrupts:0",
  51. <&tinylcd35_ts>,"pendown-gpio:4";
  52. xohms = <&tinylcd35_ts>,"ti,x-plate-ohms;0";
  53. - rtc-pcf = <&i2c1>,"status",
  54. - <&pcf8563>,"status";
  55. - rtc-ds = <&i2c1>,"status",
  56. - <&ds1307>,"status";
  57. + rtc-pcf = <0>,"=5";
  58. + rtc-ds = <0>,"=6";
  59. keypad = <&keypad>,"status";
  60. };
  61. };