From 6d8b19be5234ff0057e33d72c4e6188d41f3aaff Mon Sep 17 00:00:00 2001 From: rlcamp Date: Tue, 30 Aug 2022 15:51:38 -0700 Subject: [PATCH 1/3] Add a pullup/down parameter to PPS DTBO Square wave output from RTCs such as the DS3231 requires a pullup resistor, this commit allows the pin's internal pullup resistor to be used by specifying "pull=2" in the parameters, or "pull=1" for pulldown if necessary on other parts --- arch/arm/boot/dts/overlays/pps-gpio-overlay.dts | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/boot/dts/overlays/pps-gpio-overlay.dts b/arch/arm/boot/dts/overlays/pps-gpio-overlay.dts index 524a1c1d367009..a4f6b868aad8a4 100644 --- a/arch/arm/boot/dts/overlays/pps-gpio-overlay.dts +++ b/arch/arm/boot/dts/overlays/pps-gpio-overlay.dts @@ -34,5 +34,6 @@ <&pps_pins>,"reg:0"; assert_falling_edge = <&pps>,"assert-falling-edge?"; capture_clear = <&pps>,"capture-clear?"; + pull = <&pps_pins>,"brcm,pull:0"; }; }; From 24cee921144bba90f79063f4f7bd19048a7523a8 Mon Sep 17 00:00:00 2001 From: rlcamp Date: Tue, 30 Aug 2022 16:02:56 -0700 Subject: [PATCH 2/3] Update DTB overlay readme for PPS pullup/down --- arch/arm/boot/dts/overlays/README | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README index 3152c2354670a5..a669b551a5f3f6 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README @@ -3102,6 +3102,8 @@ Params: gpiopin Input GPIO (default "18") off) capture_clear Generate clear events on the trailing edge (default off) + pull Specify whether the pin is pulled up (2), down + (1), or neither (0, default) Name: pwm From 104fbb3b44f2421bd340fa2a01d37d1ff897c741 Mon Sep 17 00:00:00 2001 From: Richard Campbell Date: Wed, 31 Aug 2022 05:31:02 -0700 Subject: [PATCH 3/3] Amended documentation following prior example --- arch/arm/boot/dts/overlays/README | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README index a669b551a5f3f6..f958481255405a 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README @@ -3102,8 +3102,8 @@ Params: gpiopin Input GPIO (default "18") off) capture_clear Generate clear events on the trailing edge (default off) - pull Specify whether the pin is pulled up (2), down - (1), or neither (0, default) + pull Desired pull-up/down state (off, down, up) + Default is "off". Name: pwm