TinkerBoard / debian_kernel

Debian Kernel source for Tinker Board
Other
143 stars 64 forks source link

Which pin is the PPS overlay tied to? #30

Closed qume closed 5 years ago

qume commented 5 years ago

Also is is possible to override this.

Where is the documentation which maps the physical pins onto the chip pin specification inside the overlays, i.e:

gpios = <&gpio5 19 0>;

the &gpio5 19 presumably maps to a physical pin - is there a mapping documented somewhere?

The overlay is here: https://github.com/TinkerBoard/debian_kernel/blob/2e432c3bcf918e83605970830b85d4695aff82fa/arch/arm/boot/dts/overlays/pps-gpio-overlay.dts

jamess-huang commented 5 years ago

The group of GPIO5 has the below 32 pins. GPIO5 A0 ~ GPIO5 A7, GPIO5 B0 ~ GPIO5 B7, GPIO5 C0 ~ GPIO5 C7, GPIO5 D0 ~ GPIO5 D7 and you can use the below rule to map to the dts settings GPIOx A0 -> 0 GPIOx A1 -> 1 GPIOx A2 -> 2 … GPIOx A7 -> 7 GPIOx B0 -> 8 GPIOx B1 -> 9 GPIOx B2 -> 10 ... GPIOx B7 -> 15 GPIOx C0 -> 16 GPIOx C1 -> 17 GPIOx C2 -> 18 GPIOx C3 -> 19

So as you can see, the <&gpio5 19 0> is mapping to GPIO5 C3. Then please look up the below picture, you can find that the GPIO5C3 is mappping to physical pin 22. tinker_header_pinout