For Anyone Using Yocto/Poky and/or Poky-Tiny for Testing to Get GPIO Up and Running

Would me using the BeagleBoard-DeviceTrees work within Yocto with libgpiod-dev, python3-gpiod, and etc for utilizing the onboard GPIO peripherals?

I am trying to understand Yocto a bit better but seem to fail at their vast amount of documentation. They, their writers and document specialists, are extremely documenting things and in a positive manner.

The only complaint I have with them is the amount of data to process within their build environment to have success.

Anyway…

So, I can append my files within local.conf and put in the hardware so far. Drr. I know…extravagant over here.

Outside of fun time, when I install the python3-gpiod library within yocto builds for particular boards, BeagleV-Ahead and/or BeagleBone Black, I am getting really no data with gpioinfo.

I have the Chip and Line Numbers as usual but they are not populated.

  1. Would I need a DTS file along with .dtsi files to handle instantiating the GPIO peripheral on the boards?
  2. So, again. I am using Yocto and trying to figure out what methods I need to take to handle populating gpioinfo after boot.
  3. I can boot a random test Yocto build on the BeagleV-Ahead and with installed python3-gpiod libs and dependencies.

If there is some type of guide that illustrates this effort, please try to reason with me on it.

first, Yocto is a beast, spent several yrs learning the basics.

seconds, in the dts files that your using, does it have all the gpio information. i.e. what you see when you use gpioinfo?

i haven’t looked into gpioinfo, but isn’t it a script that reads this dts info?

1 Like

No. My DTS does not have anything in it yet. I have not created it just yet.

gpioinfo reports back I/O but the I/O are not marked by any values.

And…most likely about the gpioinfo report to output. I always just used it to handle whatever beagleboard.org personnel had done previously with DTS.

Here:

What technology in DTS should I be using to handle GPIO instances with python3-gpiod?

gpio-leds?

gpio-hog?

others?

This is where I am making follies so far. Soaking up the data from Yocto documentation has left me boggled on DTS for now. I need to figure out exactly how to propose a DTS in a format that is workable.

Also, dually noted here, I need to install the DTC in my build and its deps alongside other commands I will need to scratch this DTS in the bud.

Also:

I need to configure whereabouts of the .dtb used in this build for the BeagleV-Ahead to progress (I think).

And…another idea (I am full of them today since “conquering” a fresh build) is me having numerous files that are not used so far. I need to figure out where to place them and how to place them.

e.g. uEnv.txt is one of them and I have some other files too.

here is one part of bbblue dts, that i think is related to gettting gpioinfo to work.

&gpio0 {
	gpio-line-names =
		"UART3_CTS", /* M17 */
		"UART3_RTS", /* M18 */
		"UART2_RX", /* A17 */
		"UART2_TX", /* B17 */
		"I2C1_SDA", /* B16 */
		"I2C1_SCL", /* A16 */
		"MMC0_CD", /* C15 */
		"SPI1_SS2", /* C18 */
		"EQEP_1A", /* V2 */
		"EQEP_1B", /* V3 */
		"MDIR_2B", /* V4 */
		"BATT_LED_2", /* T5 */
		"I2C2_SDA", /* D18 */
		"I2C2_SCL", /* D17 */
		"UART1_RX", /* D16 */
		"UART1_TX", /* D15 */
		"MMC2_DAT1", /* J18 */
		"MMC2_DAT2", /* K15 */
		"NC", /* F16 */
		"WIFI_LED", /* A15 */
		"MOT_STBY", /* D14 */
		"WLAN_IRQ", /* K16 */
		"PWM_2A", /* U10 */
		"PWM_2B", /* T10 */
		"",
		"",
		"BATT_LED_4", /* T11 */
		"BATT_LED_1", /* U12 */
		"BT_EN", /* K17 */
		"SPI1_SS1", /* H18 */
		"UART4_RX", /* T17 */
		"MDIR_1B"; /* U17 */
};