sgjava Posted December 11, 2020 Posted December 11, 2020 (edited) OK, so while documenting the Armbian patch process I needed something actual to patch. I added gpio-line-names to the device tree, so now all lines are defined. Once I finish the documentation I'll PR this patch. No more guessing what physical pin is! At some point it might make sense to put in jumper and physical pin #. Spoiler gpioinfo gpiochip0 - 8 lines: line 0: "GPY7.0" unused input active-high line 1: "GPY7.1" unused input active-high line 2: "GPY7.2" unused input active-high line 3: "GPY7.3" unused input active-high line 4: "GPY7.4" unused input active-high line 5: "GPY7.5" unused input active-high line 6: "GPY7.6" unused input active-high line 7: "GPY7.7" unused input active-high gpiochip1 - 8 lines: line 0: "GPX0.0" unused input active-high line 1: "GPX0.1" unused input active-high line 2: "GPX0.2" unused input active-high line 3: "GPX0.3" "power key" input active-low [used] line 4: "GPX0.4" "interrupt" input active-high [used] line 5: "GPX0.5" unused input active-high line 6: "GPX0.6" unused input active-high line 7: "GPX0.7" unused input active-high gpiochip10 - 8 lines: line 0: "GPD1.0" "reset" output active-low [used] line 1: "GPD1.1" unused input active-high line 2: "GPD1.2" unused input active-high line 3: "GPD1.3" unused input active-high line 4: "GPD1.4" unused input active-high line 5: "GPD1.5" unused input active-high line 6: "GPD1.6" unused input active-high line 7: "GPD1.7" unused input active-high gpiochip11 - 6 lines: line 0: "GPY0.0" unused input active-high line 1: "GPY0.1" unused input active-high line 2: "GPY0.2" unused input active-high line 3: "GPY0.3" unused input active-high line 4: "GPY0.4" unused input active-high line 5: "GPY0.5" unused input active-high gpiochip12 - 4 lines: line 0: "GPY1.0" unused input active-high line 1: "GPY1.1" unused input active-high line 2: "GPY1.2" unused input active-high line 3: "GPY1.3" unused input active-high gpiochip13 - 6 lines: line 0: "GPY2.0" unused input active-high line 1: "GPY2.1" unused input active-high line 2: "GPY2.2" unused input active-high line 3: "GPY2.3" unused input active-high line 4: "GPY2.4" unused input active-high line 5: "GPY2.5" unused input active-high gpiochip14 - 8 lines: line 0: "GPY3.0" unused input active-high line 1: "GPY3.1" unused input active-high line 2: "GPY3.2" unused input active-high line 3: "GPY3.3" unused input active-high line 4: "GPY3.4" unused input active-high line 5: "GPY3.5" unused input active-high line 6: "GPY3.6" unused input active-high line 7: "GPY3.7" unused input active-high gpiochip15 - 8 lines: line 0: "GPY4.0" unused input active-high line 1: "GPY4.1" unused input active-high line 2: "GPY4.2" unused input active-high line 3: "GPY4.3" unused input active-high line 4: "GPY4.4" unused input active-high line 5: "GPY4.5" unused input active-high line 6: "GPY4.6" unused input active-high line 7: "GPY4.7" unused input active-high gpiochip16 - 8 lines: line 0: "GPY5.0" unused input active-high line 1: "GPY5.1" unused input active-high line 2: "GPY5.2" unused input active-high line 3: "GPY5.3" unused input active-high line 4: "GPY5.4" unused input active-high line 5: "GPY5.5" unused input active-high line 6: "GPY5.6" unused input active-high line 7: "GPY5.7" unused input active-high gpiochip17 - 8 lines: line 0: "GPY6.0" unused input active-high line 1: "GPY6.1" unused input active-high line 2: "GPY6.2" unused input active-high line 3: "GPY6.3" unused input active-high line 4: "GPY6.4" unused input active-high line 5: "GPY6.5" unused input active-high line 6: "GPY6.6" unused input active-high line 7: "GPY6.7" unused input active-high gpiochip18 - 8 lines: line 0: "GPE0.0" unused input active-high line 1: "GPE0.1" unused input active-high line 2: "GPE0.2" unused input active-high line 3: "GPE0.3" unused input active-high line 4: "GPE0.4" unused input active-high line 5: "GPE0.5" unused input active-high line 6: "GPE0.6" unused input active-high line 7: "GPE0.7" unused input active-high gpiochip19 - 2 lines: line 0: "GPE1.0" unused input active-high line 1: "GPE1.1" unused input active-high gpiochip2 - 8 lines: line 0: "GPX1.0" unused input active-high line 1: "GPX1.1" unused input active-high line 2: "GPX1.2" unused input active-high line 3: "GPX1.3" unused input active-high line 4: "GPX1.4" unused input active-high line 5: "GPX1.5" unused input active-high line 6: "GPX1.6" unused input active-high line 7: "GPX1.7" unused input active-high gpiochip20 - 6 lines: line 0: "GPF0.0" unused input active-high line 1: "GPF0.1" unused input active-high line 2: "GPF0.2" unused input active-high line 3: "GPF0.3" unused input active-high line 4: "GPF0.4" unused input active-high line 5: "GPF0.5" unused input active-high gpiochip21 - 8 lines: line 0: "GPF1.0" unused input active-high line 1: "GPF1.1" unused input active-high line 2: "GPF1.2" unused input active-high line 3: "GPF1.3" unused input active-high line 4: "GPF1.4" unused input active-high line 5: "GPF1.5" unused input active-high line 6: "GPF1.6" unused input active-high line 7: "GPF1.7" unused input active-high gpiochip22 - 8 lines: line 0: "GPG0.0" unused input active-high line 1: "GPG0.1" unused input active-high line 2: "GPG0.2" unused input active-high line 3: "GPG0.3" unused input active-high line 4: "GPG0.4" unused input active-high line 5: "GPG0.5" unused input active-high line 6: "GPG0.6" unused input active-high line 7: "GPG0.7" unused input active-high gpiochip23 - 8 lines: line 0: "GPG1.0" unused input active-high line 1: "GPG1.1" unused input active-high line 2: "GPG1.2" unused input active-high line 3: "GPG1.3" unused input active-high line 4: "GPG1.4" unused input active-high line 5: "GPG1.5" unused input active-high line 6: "GPG1.6" unused input active-high line 7: "GPG1.7" unused input active-high gpiochip24 - 2 lines: line 0: "GPG2.0" unused input active-high line 1: "GPG2.1" unused input active-high gpiochip25 - 4 lines: line 0: "GPJ4.0" unused input active-high line 1: "GPJ4.1" unused input active-high line 2: "GPJ4.2" unused input active-high line 3: "GPJ4.3" unused input active-high gpiochip26 - 8 lines: line 0: "GPA0.0" unused input active-high line 1: "GPA0.1" unused input active-high line 2: "GPA0.2" unused input active-high line 3: "GPA0.3" unused input active-high line 4: "GPA0.4" unused input active-high line 5: "GPA0.5" unused input active-high line 6: "GPA0.6" unused input active-high line 7: "GPA0.7" unused input active-high gpiochip27 - 6 lines: line 0: "GPA1.0" unused input active-high line 1: "GPA1.1" unused input active-high line 2: "GPA1.2" unused input active-high line 3: "GPA1.3" unused input active-high line 4: "GPA1.4" unused input active-high line 5: "GPA1.5" unused input active-high gpiochip28 - 8 lines: line 0: "GPA2.0" unused input active-high line 1: "GPA2.1" unused input active-high line 2: "GPA2.2" unused input active-high line 3: "GPA2.3" unused input active-high line 4: "GPA2.4" unused input active-high line 5: "GPA2.5" unused input active-high line 6: "GPA2.6" unused input active-high line 7: "GPA2.7" unused input active-high gpiochip29 - 5 lines: line 0: "GPB0.0" unused input active-high line 1: "GPB0.1" unused input active-high line 2: "GPB0.2" unused input active-high line 3: "GPB0.3" unused input active-high line 4: "GPB0.4" unused input active-high gpiochip3 - 8 lines: line 0: "GPX2.0" unused input active-high line 1: "GPX2.1" unused input active-high line 2: "GPX2.2" unused input active-high line 3: "GPX2.3" unused input active-high line 4: "GPX2.4" unused input active-high line 5: "GPX2.5" unused input active-high line 6: "GPX2.6" unused input active-high line 7: "GPX2.7" unused input active-high gpiochip30 - 5 lines: line 0: "GPB1.0" unused input active-high line 1: "GPB1.1" unused input active-high line 2: "GPB1.2" unused input active-high line 3: "GPB1.3" unused input active-high line 4: "GPB1.4" unused input active-high gpiochip31 - 4 lines: line 0: "GPB2.0" unused input active-high line 1: "GPB2.1" unused input active-high line 2: "GPB2.2" unused input active-high line 3: "GPB2.3" unused input active-high gpiochip32 - 8 lines: line 0: "GPB3.0" unused input active-high line 1: "GPB3.1" unused input active-high line 2: "GPB3.2" unused input active-high line 3: "GPB3.3" unused input active-high line 4: "GPB3.4" unused input active-high line 5: "GPB3.5" unused input active-high line 6: "GPB3.6" unused input active-high line 7: "GPB3.7" unused input active-high gpiochip33 - 2 lines: line 0: "GPB4.0" unused input active-high line 1: "GPB4.1" unused input active-high gpiochip34 - 8 lines: line 0: "GPH0.0" unused input active-high line 1: "GPH0.1" unused input active-high line 2: "GPH0.2" unused input active-high line 3: "GPH0.3" unused input active-high line 4: "GPH0.4" unused input active-high line 5: "GPH0.5" unused input active-high line 6: "GPH0.6" unused input active-high line 7: "GPH0.7" unused input active-high gpiochip35 - 7 lines: line 0: "GPZ.0" unused input active-high line 1: "GPZ.1" unused input active-high line 2: "GPZ.2" unused input active-high line 3: "GPZ.3" unused input active-high line 4: "GPZ.4" unused input active-high line 5: "GPZ.5" unused input active-high line 6: "GPZ.6" unused input active-high gpiochip4 - 8 lines: line 0: "GPX3.0" unused input active-high line 1: "GPX3.1" unused input active-high line 2: "GPX3.2" unused input active-high line 3: "GPX3.2" unused input active-high line 4: "GPX3.4" unused input active-high line 5: "GPX3.5" unused input active-high line 6: "GPX3.6" unused input active-high line 7: "GPX3.7" "hpd" input active-high [used] gpiochip5 - 8 lines: line 0: "GPC0.0" unused input active-high line 1: "GPC0.1" unused input active-high line 2: "GPC0.2" unused input active-high line 3: "GPC0.3" unused input active-high line 4: "GPC0.4" unused input active-high line 5: "GPC0.5" unused input active-high line 6: "GPC0.6" unused input active-high line 7: "GPC0.7" unused input active-high gpiochip6 - 8 lines: line 0: "GPC1.0" unused input active-high line 1: "GPC1.1" unused input active-high line 2: "GPC1.2" unused input active-high line 3: "GPC1.3" unused input active-high line 4: "GPC1.4" unused input active-high line 5: "GPC1.5" unused input active-high line 6: "GPC1.6" unused input active-high line 7: "GPC1.7" unused input active-high gpiochip7 - 7 lines: line 0: "GPC2.0" unused input active-high line 1: "GPC2.1" unused input active-high line 2: "GPC2.2" unused input active-high line 3: "GPC2.3" unused input active-high line 4: "GPC2.4" unused input active-high line 5: "GPC2.5" unused input active-high line 6: "GPC2.6" unused input active-high gpiochip8 - 4 lines: line 0: "GPC3.0" unused input active-high line 1: "GPC3.1" unused input active-high line 2: "GPC3.2" unused input active-high line 3: "GPC3.3" unused input active-high gpiochip9 - 2 lines: line 0: "GPC4.0" unused input active-high line 1: "GPC4.1" unused input active-high Edited December 12, 2020 by TRS-80 put long output inside spoiler 1
TRS-80 Posted December 12, 2020 Posted December 12, 2020 Cool, man! Please forgive me if this out of place, as I really have no idea about any of this stuff. However as a casual observer, those mappings look quite random and I could not discern any sort of order. But maybe that's because they map to some underlying hardware or something else I am not understanding? In which case, feel free to disregard this feedback. In either case, thanks for your contribution!
sgjava Posted December 13, 2020 Author Posted December 13, 2020 So if you look at the device tree you'll see pin controllers like GPA0, GPA1, etc. I'm not sure how the kernel gpio device enumerates them, but basically a chip is a pin controller and lines are the pins. The main thing is soon you'll be able to look at a pin map and know exactly which physical pin it is. Also gpioinfo seems to sort by chip string instead of int, thus 2, 21, 22, etc. are all 2s 1
Recommended Posts