Repository navigation
Conversation
ahmadexp
marked this pull request as ready for review
September 29, 2026 00:42
Contributor
|
This is very TL;DR - why don't you start with brief, human-written description of the problem you are trying to solve, followed by a list of the elements involved in the solution. It's also not a good idea to let your AI randomly "improve" things, except in separate commits that are clearly described. BTW, "BCM" has no part to play in the discussion of GPIOs in the kernel - everything uses GPIO numbers, never (header) pin numbers. |
pelwell
reviewed
Sep 29, 2026
| * Do not add an input-direction monitor SM on this same GPIO: its direction | ||
| * request removes the pad output enable on RP1. | ||
| */ | ||
| static const u16 rp1_compact_output_program[RP1_OUTPUT_PROGRAM_WORDS] = { |
Contributor
There was a problem hiding this comment.
Why would you not include the full output from pioasm, with the assembly language as comments?
pelwell
marked this pull request as draft
September 29, 2026 08:29
Contributor
|
Did you test this on HW? Ideally test the performance against pps-gpio |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Raspberry Pi 5's RP1 owns GPIO and PIO resources, while its Ethernet MAC
provides a PTP hardware clock (PHC). Linux currently does not expose those
GPIOs through that PHC's standard PTP pin interface, so it cannot timestamp a
reference PPS on a selected GPIO or generate a PHC-aligned PPS output on one.
This series connects the MACB PHC to RP1 PIO, DMA and pin control. Linux PTP
clients such as
testptpcan map an available GPIO to an external timestampinput or periodic output. This provides a route for hardware timestamping a
reference PPS in the Ethernet PHC and for outputting a PHC-aligned PPS to
another device, using standard PTP ioctls and no private ABI.
The series:
channels and one periodic output channel.
testptpconfiguration for PPS input, output and simultaneousoperation.
The first external timestamp channel works without periodic output. A second
input channel needs PEROUT active to provide the PHC anchor. With PEROUT active,
both indexed rising-edge inputs can operate alongside the output on three
distinct GPIOs. The direct channel-0 input path also supports falling-edge and
both-edge requests. GPIOs are selected at runtime by GPIO number, not header
pin number. The kernel PTP UAPI is unchanged.
Validation:
enabled. The counter conversion helper also compiles with
W=1.testptpselftest and validated the MACBbinding with
dt-doc-validate.testptp -con a Pi 5 booted with the candidate reports two externaltimestamp channels, one periodic output and 28 programmable pins.
GPIO24 on channel 1 and GPIO23 for PEROUT, and confirmed that the pins were
initially unmapped.
The simultaneous two-input plus output path has not yet received a physical
waveform test. No comparison against the standard
pps-gpiodriver has beenrun. These tests establish neither absolute accuracy nor a jitter bound.
The simultaneous input/output path still needs physical qualification with
separate PPS sources on both input GPIOs and a scope or logic analyzer on the
output. CM5, additional GPIO waveforms, sustained duplex operation, failure
recovery under hardware faults and independent timing calibration remain open.