You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Missing GPIO line names for newer Raspberry Pi models #2760
The gpio-line-names feature is currently only present in the upstream DTS files (those named bcm28*), and even then only for a subset of models (A, A+, B, B+, Zero and ZeroW).
If it's any help, all Pis with the 40-pin header have exactly the same pin functions available on GPIOs 0-27. But beware - although pin functions are easily modified using DT overlays, the pinctrl mechanism for drivers and other utilities such as raspi-gpio, that list of GPIO names is completely static.
I was just wondering, since the sysfs interface for GPIOs will be removed in 2020, then the only available interface for GPIOs will be the character device one, if the pin numbers will be the same.
So echo 26 > export is basically the same as exporting line offset 26 of gpio chip 0? Looking at the schematic, that seems to be the case.
Yes, thank goodness - each gpiochip has a fixed numbering scheme (the Broadcom numbers for the on-board GPIOs), and the main gpiochip always seems to start at offset 0 in the global space.
N.B. gpiochip0 is named that way because it manages the global GPIO space starting at 0, so your statement above is trivially true, but it is also true that the onboard GPIO controller is always gpiochip0.
I am encountering the same problem. Names available on pi4, no names on pi3 b+. I am on kernel 5.10, raspian buster. Does that make a difference or can I simply download and replace my dts file with the upstream version to get the pin names.
Activity
pelwell commentedon Nov 20, 2018
The gpio-line-names feature is currently only present in the upstream DTS files (those named
bcm28*), and even then only for a subset of models (A, A+, B, B+, Zero and ZeroW).If it's any help, all Pis with the 40-pin header have exactly the same pin functions available on GPIOs 0-27. But beware - although pin functions are easily modified using DT overlays, the pinctrl mechanism for drivers and other utilities such as
raspi-gpio, that list of GPIO names is completely static.nikonthethird commentedon Nov 20, 2018
Thank you, that does help.
I was just wondering, since the sysfs interface for GPIOs will be removed in 2020, then the only available interface for GPIOs will be the character device one, if the pin numbers will be the same.
So
echo 26 > exportis basically the same as exporting line offset 26 of gpio chip 0? Looking at the schematic, that seems to be the case.pelwell commentedon Nov 20, 2018
Yes, thank goodness - each gpiochip has a fixed numbering scheme (the Broadcom numbers for the on-board GPIOs), and the main gpiochip always seems to start at offset 0 in the global space.
N.B. gpiochip0 is named that way because it manages the global GPIO space starting at 0, so your statement above is trivially true, but it is also true that the onboard GPIO controller is always gpiochip0.
nikonthethird commentedon Nov 20, 2018
That solves everything for me then. 👍
Feel free to close the issue since it seems to me now that the actual line names are not that important anyways.
seamusdemora commentedon Feb 18, 2022
pelwell commentedon Feb 18, 2022
The dts file for the 3B+ is called bcm2710-rpi-3-b-plus.dts (the current version is here: https://github.com/raspberrypi/linux/blob/rpi-5.15.y/arch/arm/boot/dts/bcm2710-rpi-3-b-plus.dts). How to build dtb files is covered in https://www.raspberrypi.com/documentation/computers/configuration.html#device-trees-overlays-and-parameters and https://www.raspberrypi.com/documentation/computers/linux_kernel.html#building (
make ARCH=arm bcm2709_defconfig, andmake ARCH=arm dtbsshould suffice), and the way to make the changes is to add the gpio-line-names property to the above .dts file and rebuild the .dtb file.pelwell commentedon Feb 18, 2022
None. AFAIK.
pelwell commentedon Feb 18, 2022
Note that the line-names property can be copied from the upstream file bcm2837-rpi-3-b-plus.dts.
maxpolzin commentedon Feb 18, 2022
I am encountering the same problem. Names available on pi4, no names on pi3 b+. I am on kernel 5.10, raspian buster. Does that make a difference or can I simply download and replace my dts file with the upstream version to get the pin names.
pelwell commentedon Feb 18, 2022
No - you will lose a number of features at least. The correct solution is to add the necessary GPIO names to the remaining models.
ARM: dts: Add GPIO line names for downstream RPis
pelwell commentedon Feb 20, 2022
The line names are added by commit ac66b3f (until the next rebase, which the hash will change).
seamusdemora commentedon Feb 21, 2022
44 remaining items
ARM: dts: Add GPIO line names for downstream RPis
ARM: dts: Add GPIO line names for downstream RPis
ARM: dts: Add GPIO line names for downstream RPis
ARM: dts: Add GPIO line names for downstream RPis
ARM: dts: Add GPIO line names for downstream RPis
ARM: dts: Add GPIO line names for downstream RPis
ARM: dts: Add GPIO line names for downstream RPis
ARM: dts: Add GPIO line names for downstream RPis
ARM: dts: Add GPIO line names for downstream RPis
ARM: dts: Add GPIO line names for downstream RPis
ARM: dts: Add GPIO line names for downstream RPis
ARM: dts: Add GPIO line names for downstream RPis
ARM: dts: Add GPIO line names for downstream RPis
ARM: dts: Add GPIO line names for downstream RPis
ARM: dts: Add GPIO line names for downstream RPis