0078-Add-pps-gpio-DT-overlay.patch 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. From 4cd9d10a9cd482e993dcfe3bd1d576ad0d11c3c3 Mon Sep 17 00:00:00 2001
  2. From: Phil Elwell <phil@raspberrypi.org>
  3. Date: Mon, 26 Jan 2015 09:18:24 +0000
  4. Subject: [PATCH 078/114] Add pps-gpio DT overlay
  5. Parameters:
  6. gpiopin=<input pin> // Default 18
  7. ---
  8. arch/arm/boot/dts/Makefile | 1 +
  9. arch/arm/boot/dts/pps-gpio-overlay.dts | 34 ++++++++++++++++++++++++++++++++++
  10. 2 files changed, 35 insertions(+)
  11. create mode 100644 arch/arm/boot/dts/pps-gpio-overlay.dts
  12. --- a/arch/arm/boot/dts/Makefile
  13. +++ b/arch/arm/boot/dts/Makefile
  14. @@ -62,6 +62,7 @@ dtb-$(CONFIG_BCM2708_DT) += hifiberry-am
  15. dtb-$(CONFIG_BCM2708_DT) += iqaudio-dac-overlay.dtb
  16. dtb-$(CONFIG_BCM2708_DT) += iqaudio-dacplus-overlay.dtb
  17. dtb-$(CONFIG_BCM2708_DT) += lirc-rpi-overlay.dtb
  18. +dtb-$(CONFIG_BCM2708_DT) += pps-gpio-overlay.dtb
  19. dtb-$(CONFIG_BCM2708_DT) += w1-gpio-overlay.dtb
  20. dtb-$(CONFIG_BCM2708_DT) += w1-gpio-pullup-overlay.dtb
  21. dtb-$(CONFIG_ARCH_BCM2835) += bcm2835-rpi-b.dtb
  22. --- /dev/null
  23. +++ b/arch/arm/boot/dts/pps-gpio-overlay.dts
  24. @@ -0,0 +1,34 @@
  25. +/dts-v1/;
  26. +/plugin/;
  27. +
  28. +/ {
  29. + compatible = "brcm,bcm2708";
  30. + fragment@0 {
  31. + target-path = "/";
  32. + __overlay__ {
  33. + pps: pps {
  34. + compatible = "pps-gpio";
  35. + pinctrl-names = "default";
  36. + pinctrl-0 = <&pps_pins>;
  37. + gpios = <&gpio 18 0>;
  38. + status = "okay";
  39. + };
  40. + };
  41. + };
  42. +
  43. + fragment@1 {
  44. + target = <&gpio>;
  45. + __overlay__ {
  46. + pps_pins: pps_pins {
  47. + brcm,pins = <18>;
  48. + brcm,function = <0>; // in
  49. + brcm,pull = <0>; // off
  50. + };
  51. + };
  52. + };
  53. +
  54. + __overrides__ {
  55. + gpiopin = <&pps>,"gpios:4",
  56. + <&pps_pins>,"brcm,pins:0";
  57. + };
  58. +};