Hi @OlivierK ,
Thank you so much for your reply, useful to understand better the DT, but I found the solution to my problem (probably I didn't make myself clear
about my purpose).
In the following, the patch that I get to enable pin d 11 (led blue) and pin h 7 (led orange) for the linux userspace:
diff --git a/stm32mp15xx-dkx.dtsi.orig b/stm32mp15xx-dkx.dtsi
index ee50622..584ed71 100644
--- a/arch/arm/boot/dts/stm32mp15xx-dkx.dtsi
+++ b/arch/arm/boot/dts/stm32mp15xx-dkx.dtsi
@@ -76,13 +76,22 @@
};
led {
- compatible = "gpio-leds";
+ compatible = "gpio-export";
led-blue {
label = "heartbeat";
gpios = <&gpiod 11 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "heartbeat";
default-state = "off";
+ status = "okay";
};
+
+ led-orange {
+ label = "myled_orange";
+ pinctrl-names = "default";
+ pinctrl-0 = <&my_leds_orange_pins>;
+ status = "okay";
+ };
+
};
sound {
@@ -548,6 +557,17 @@
};
};
+&pinctrl
+{
+ my_leds_orange_pins: my-leds-orange-0
+ {
+ pins
+ {
+ pinmux = <STM32_PINMUX('H', 7, RSVD)>;
+ };
+ };
+};
+
&pwr_regulators {
vdd-supply = <&vdd>;
vdd_3v3_usbfs-supply = <&vdd_usb>;
After the compilation of the new Linux image, I use "gpioinfo" and I get:
gpiochip3 - 16 lines:
...
line 11: unnamed unused output active-high
...
gpiochip7 - 16 lines:
...
line 7: unnamed unused output active-high
Then using the command:
gpioset gpiochip3 11=1
gpioset gpiochip7 7=1
Blue and orange leds switch on.
Best Regards,
Andrea