Hi,
Custom board based upon BBB.
Kernel 5.11.10
snippets from my custom device tree
leds {
pinctrl-names = "default";
pinctrl-0 = <&user_leds_s0>;
compatible = "gpio-leds";
led1 {
label = "zcpu:red:led"; /* ONBOARD RED LED */
gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "none";
default-state = "off";
};
led2 {
label = "zcpu:green:led"; /* ONBOARD GREEN LED */
gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "none";
default-state = "off";
};
led3 {
label = "zcpu:blue:led"; /* ONBOARD BLUE LED */
gpios = <&gpio0 11 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "heartbeat";
default-state = "off";
};
};
and
user_leds_s0: user_leds_s0 {
pinctrl-single,pins = <
AM33XX_IOPAD(0x8d0, PIN_OUTPUT | MUX_MODE7) /* (V2) lcd_data12.gpio0[8] (GPIO_8) ONBOARD RED LED*/
AM33XX_IOPAD(0x8d4, PIN_OUTPUT | MUX_MODE7) /* (V3) lcd_data13.gpio1[9] (GPIO_9) ONBOARD GREEN LED*/
AM33XX_IOPAD(0x8dc, PIN_OUTPUT | MUX_MODE7) /* (T5) ldc_data15.gpio1[11] (GPIO_11) ONBOARD BLUE LED*/
>;
};
The onboard leds work without a problem. They show up in /sys/class/leds.
ls /sys/class/leds
mmc0:: mmc1:: zcpu:blue:led zcpu:green:led zcpu:red:led
The RED led is GPIO0 pin 8.
The GREEN is GPIO0 pin 9.
The BLUE is GPIO0 pin 11.
Now I run this command,
cat /sys/kernel/debug/gpio
gpiochip0: GPIOs 0-31, parent: platform/4804c000.gpio, gpio-0-31:
gpio-23 ( |sysfs ) out hi
gpiochip1: GPIOs 32-63, parent: platform/481ac000.gpio, gpio-32-63:
gpio-33 ( |sysfs ) out hi
gpiochip2: GPIOs 64-95, parent: platform/481ae000.gpio, gpio-64-95:
gpiochip3: GPIOs 96-127, parent: platform/44e07000.gpio, gpio-96-127:
gpio-104 ( |zcpu:red:led ) out lo
gpio-105 ( |zcpu:green:led ) out lo
gpio-107 ( |zcpu:blue:led ) out lo
I would expect the led(s) would show up under gpiochip0 pins 8, 9 and 11.
Now my question.
Why do the led(s) show up as pins under gpiochip3 pins 102, 104 and 107?
Thank you,