|
1 | 1 | //SPDX-License-Identifier: GPL-3.0-only |
| 2 | +//This file is released under the GPL v3.0 License, and comes without warranty, express or implied. |
| 3 | +//(C) Josh Blake, 2026 |
| 4 | + |
2 | 5 | /* |
3 | | - This file is released under the GPL v3.0 License, and comes without warranty, express or implied. |
4 | | - (C) Josh Blake, 2026 |
5 | | -*/ |
6 | | -/* |
7 | | - dtparams: |
8 | | - pin: (integer) Specifies the PPS Input pin. Takes the pin number correlating to the RPi 40-pin GPIO. Defaults to GPIO 18. |
9 | | - pull-none: (boolean) Disable pull-up/down resistors on the PPS Input pin. |
10 | | - pull-up: (boolean) Enable pull-up resistor on the PPS Input pin. |
11 | | - pull-down: (boolean) Enable pull-down resistor on the PPS Input pin. |
12 | | - schmitt-trigger: (boolean) Enable the Schmitt-trigger on the PPS Input pin. Defaults to off. |
13 | | - echo-pin: (integer) Specifies the PPS Echo Output pin. Takes the pin number correlating to the RPi 40-pin GPIO. Defaults to GPIO 17. |
14 | | - echo-ms: (integer) Specifies the pulse-width in ms that the echo signal outputs on the PPS Echo Output pin. Must be less than 999. Defaults to 10ms. |
15 | | - echo: (boolean) Enables the PPS Echo Output signal. Defaults to off. |
16 | | - capture-clear: (boolean) Captures the clear event time. Defaults to off. |
17 | | - assert-falling-edge: (boolean) Uses the falling signal edge instead of the rising signal edge. Defaults to off. |
| 6 | +* dtparams: |
| 7 | +* pin: (integer) Specifies the PPS Input pin. Takes the pin number correlating to the RPi 40-pin GPIO. Defaults to GPIO 18. |
| 8 | +* pull-none: (boolean) Disable pull-up/down resistors on the PPS Input pin. |
| 9 | +* pull-up: (boolean) Enable pull-up resistor on the PPS Input pin. |
| 10 | +* pull-down: (boolean) Enable pull-down resistor on the PPS Input pin. |
| 11 | +* schmitt-trigger: (boolean) Enable the Schmitt-trigger on the PPS Input pin. Defaults to off. |
| 12 | +* echo-pin: (integer) Specifies the PPS Echo Output pin. Takes the pin number correlating to the RPi 40-pin GPIO. Defaults to GPIO 17. |
| 13 | +* echo-ms: (integer) Specifies the pulse-width in ms that the echo signal outputs on the PPS Echo Output pin. Must be less than 999. Defaults to 10ms. |
| 14 | +* echo: (boolean) Enables the PPS Echo Output signal. Defaults to off. |
| 15 | +* capture-clear: (boolean) Captures the clear event time. Defaults to off. |
| 16 | +* assert-falling-edge: (boolean) Uses the falling signal edge instead of the rising signal edge. Defaults to off. |
18 | 17 | */ |
| 18 | + |
19 | 19 | /dts-v1/; |
20 | 20 | /plugin/; |
21 | 21 |
|
22 | 22 | / { |
23 | | - compatible = "brcm,bcm2712"; |
| 23 | + compatible = "brcm,bcm2712"; |
24 | 24 |
|
25 | | - fragment@0 { |
26 | | - target-path = "/"; |
27 | | - __overlay__ { |
28 | | - pps: pps@ { |
29 | | - compatible = "pps-gpio"; |
30 | | - pinctrl-names = "default"; |
31 | | - pinctrl-0 = <&pps_gpios>; |
32 | | - gpios = <&gpio 18 0>; |
33 | | - status = "okay"; |
34 | | - }; |
35 | | - }; |
36 | | - }; |
| 25 | + fragment@0 { |
| 26 | + target-path = "/"; |
| 27 | + __overlay__ { |
| 28 | + pps: pps@ { |
| 29 | + compatible = "pps-gpio"; |
| 30 | + pinctrl-names = "default"; |
| 31 | + pinctrl-0 = <&pps_gpios>; |
| 32 | + gpios = <&gpio 18 0>; |
| 33 | + status = "okay"; |
| 34 | + }; |
| 35 | + }; |
| 36 | + }; |
37 | 37 |
|
38 | | - fragment@1 { |
39 | | - target = <&gpio>; |
40 | | - __overlay__ { |
41 | | - pps_gpios: pps_gpios@ { |
42 | | - pps_in: pps_in@ { |
43 | | - function = "gpio"; |
44 | | - input-enable; |
45 | | - }; |
46 | | - }; |
47 | | - }; |
48 | | - }; |
| 38 | + fragment@1 { |
| 39 | + target = <&gpio>; |
| 40 | + __overlay__ { |
| 41 | + pps_gpios: pps_gpios@ { |
| 42 | + pps_in: pps_in@ { |
| 43 | + function = "gpio"; |
| 44 | + input-enable; |
| 45 | + }; |
| 46 | + }; |
| 47 | + }; |
| 48 | + }; |
49 | 49 |
|
50 | | - fragment@2 { |
51 | | - target = <&pps_gpios>; |
52 | | - __dormant__ { |
53 | | - pps_out: pps_out@ { |
54 | | - function = "gpio"; |
55 | | - output-enable; |
56 | | - drive-push-pull; |
57 | | - bias-disable; |
58 | | - }; |
59 | | - }; |
60 | | - }; |
| 50 | + fragment@2 { |
| 51 | + target = <&pps_gpios>; |
| 52 | + __dormant__ { |
| 53 | + pps_out: pps_out@ { |
| 54 | + function = "gpio"; |
| 55 | + output-enable; |
| 56 | + drive-push-pull; |
| 57 | + bias-disable; |
| 58 | + }; |
| 59 | + }; |
| 60 | + }; |
61 | 61 |
|
62 | | - fragment@3 { |
63 | | - target = <&pps>; |
64 | | - pps_echo: __dormant__ { |
65 | | - echo-gpios = <&gpio 17 0>; |
66 | | - echo-active-ms = <10>; |
67 | | - }; |
68 | | - }; |
| 62 | + fragment@3 { |
| 63 | + target = <&pps>; |
| 64 | + pps_echo: __dormant__ { |
| 65 | + echo-gpios = <&gpio 17 0>; |
| 66 | + echo-active-ms = <10>; |
| 67 | + }; |
| 68 | + }; |
69 | 69 |
|
70 | | - __overrides__ { |
71 | | - /* A very annoying and inelegant pinctrl to pin number LUT */ |
72 | | - pin = |
73 | | - <&pps>,"reg:0{,=18}", |
74 | | - <&pps>,"gpios:4{,=18}", |
75 | | - <&pps_gpios>,"reg:0{,=18}", |
76 | | - <&pps_in>,"reg:0{,=18}", |
77 | | - <&pps_in>,"pins{2=gpio2,3=gpio3,4=gpio4,17=gpio17,27=gpio27,22=gpio22,10=gpio10,9=gpio9,11=gpio11,0=gpio0,5=gpio5,6=gpio6,13=gpio13,19=gpio19,26=gpio26,14=gpio14,15=gpio15,18=gpio18,23=gpio23,24=gpio24,25=gpio25,8=gpio8,7=gpio7,1=gpio1,12=gpio12,16=gpio16,20=gpio20,21=gpio21,=gpio18}"; |
78 | | - pull-none = <&pps_in>,"bias-disable?"; |
79 | | - pull-up = <&pps_in>,"bias-pull-up?"; |
80 | | - pull-down = <&pps_in>,"bias-pull-down?"; |
81 | | - schmitt-trigger = <&pps_in>,"input-enable!",<&pps_in>,"input-schmitt-enable?"; |
82 | | - assert-falling-edge = <&pps>,"assert-falling-edge?"; |
83 | | - capture-clear = <&pps>,"capture-clear?"; |
84 | | - echo-pin = |
85 | | - <&pps_out>,"reg:0{,=17}", |
86 | | - <&pps_out>,"pins{2=gpio2,3=gpio3,4=gpio4,17=gpio17,27=gpio27,22=gpio22,10=gpio10,9=gpio9,11=gpio11,0=gpio0,5=gpio5,6=gpio6,13=gpio13,19=gpio19,26=gpio26,14=gpio14,15=gpio15,18=gpio18,23=gpio23,24=gpio24,25=gpio25,8=gpio8,7=gpio7,1=gpio1,12=gpio12,16=gpio16,20=gpio20,21=gpio21,=gpio17}", |
87 | | - <&pps_echo>,"echo-gpios:4{,=17}"; |
88 | | - echo-ms = <&pps_echo>,"echo-active-ms:0"; |
89 | | - echo = <0>,"+2+3"; |
90 | | - }; |
| 70 | + __overrides__ { |
| 71 | + // A very annoying and inelegant pinctrl to pin number LUT |
| 72 | + pin = |
| 73 | + <&pps>,"reg:0{,=18}", |
| 74 | + <&pps>,"gpios:4{,=18}", |
| 75 | + <&pps_gpios>,"reg:0{,=18}", |
| 76 | + <&pps_in>,"reg:0{,=18}", |
| 77 | + <&pps_in>,"pins{2=gpio2,3=gpio3,4=gpio4,17=gpio17,27=gpio27,22=gpio22,10=gpio10,9=gpio9,11=gpio11,0=gpio0,5=gpio5,6=gpio6,13=gpio13,19=gpio19,26=gpio26,14=gpio14,15=gpio15,18=gpio18,23=gpio23,24=gpio24,25=gpio25,8=gpio8,7=gpio7,1=gpio1,12=gpio12,16=gpio16,20=gpio20,21=gpio21,=gpio18}"; |
| 78 | + pull-none = <&pps_in>,"bias-disable?"; |
| 79 | + pull-up = <&pps_in>,"bias-pull-up?"; |
| 80 | + pull-down = <&pps_in>,"bias-pull-down?"; |
| 81 | + schmitt-trigger = <&pps_in>,"input-enable!",<&pps_in>,"input-schmitt-enable?"; |
| 82 | + assert-falling-edge = <&pps>,"assert-falling-edge?"; |
| 83 | + capture-clear = <&pps>,"capture-clear?"; |
| 84 | + echo-pin = |
| 85 | + <&pps_out>,"reg:0{,=17}", |
| 86 | + <&pps_out>,"pins{2=gpio2,3=gpio3,4=gpio4,17=gpio17,27=gpio27,22=gpio22,10=gpio10,9=gpio9,11=gpio11,0=gpio0,5=gpio5,6=gpio6,13=gpio13,19=gpio19,26=gpio26,14=gpio14,15=gpio15,18=gpio18,23=gpio23,24=gpio24,25=gpio25,8=gpio8,7=gpio7,1=gpio1,12=gpio12,16=gpio16,20=gpio20,21=gpio21,=gpio17}", |
| 87 | + <&pps_echo>,"echo-gpios:4{,=17}"; |
| 88 | + echo-ms = <&pps_echo>,"echo-active-ms:0"; |
| 89 | + echo = <0>,"+2+3"; |
| 90 | + }; |
91 | 91 | }; |
0 commit comments