2025-07-22 3:37 AM
I am trying to control the LTDC on the STM32MP257FAL based on the STM32MP257F-DK board, but I am unable to configure pin PH4. This pin is used as LED1 on the STM32MP257F-DK board, which is the LED near the button. However, I cannot find where this pin is configured in the kernel, OP-TEE, TF-A, or U-Boot.
Below is the relevant log message:
[ OK ] Reached target Local File Systems.
Starting Automatic Boot Loader Update...
Starting Create Volatile Files and Directories...
[ OK ] Finished Coldplug All udev Devices.
[ OK ] Finished Load/Save OS Random Seed.
[ OK ] Finished Automatic Boot Loader Update.
Starting Wait for udev To Complete Device Initialization...
[ OK ] Finished Create Volatile Files and Directories.
[ 6.950932] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[ 6.995536] Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[ 6.996629] Loaded X.509 cert 'wens: 61c038651aabdcf94bd0ac7ff06c7248db18c600'
[ OK ] Started Network Configuration.
Starting Network Name Resolution...
Starting Network Time Synchronization...
Starting Record System Boot/Shutdown in UTMP...
[ OK ] Finished Record System Boot/Shutdown in UTMP.
[ 7.982761] stm32-crc32 404c0000.crc: Initialized
[ 7.984493] stm32-adc-core 404f0000.adc: supply vdda not found, using dummy regulator
[ 7.993122] stm32mp257-pinctrl soc@0:pinctrl@44240000: Can't access gpio 116
[ 7.996877] stm32mp257-pinctrl soc@0:pinctrl@44240000: request() failed for pin 116
[ 8.017022] stm32mp257-pinctrl soc@0:pinctrl@44240000: pin-116 (48010000.display-controller) status -13
[ 8.021675] stm32mp257-pinctrl soc@0:pinctrl@44240000: could not request pin 116 (PH4) from group PH4 on device soc@0:pinctrl@44240000
[ 8.029469] stm32-adc-core 404f0000.adc: supply vref not found, using dummy regulator
[ 8.033312] stm32-display 48010000.display-controller: Error applying setting, reverse things back
[ 8.052773] stm32mp257-pinctrl soc@0:pinctrl@44240000: Can't access gpio 116
[ 8.060289] stm32mp257-pinctrl soc@0:pinctrl@44240000: request() failed for pin 116
[ 8.065100] stm32mp257-pinctrl soc@0:pinctrl@44240000: pin-116 (48010000.display-controller) status -13
[ 8.074556] stm32mp257-pinctrl soc@0:pinctrl@44240000: could not request pin 116 (PH4) from group PH4 on device soc@0:pinctrl@44240000
[ 8.086912] stm32-display 48010000.display-controller: Error applying setting, reverse things back
[ OK ] Started
[ 8.100540] mc: Linux media interface: v0.10
[ 8.104861] stm32-cryp 42030000.crypto: will run requests pump with realtime priority
Network Time Synchronization.
[ OK ] Started Network Name Resolution.
[ 8.129508] stm32-adc-core 404f0000.adc: vdda get voltage failed, -22
[ 8.135569] galcore: loading out-of-tree module taints kernel.
[ OK ] Reached target Network.
[ 8.149377] stm32-adc-core: probe of 404f0000.adc failed with error -22
[ 8.155689] stm32-cryp 42030000.crypto: Initialized
[ 8.159156] videodev: Linux video capture interface: v2.00
[ OK ] Reached target Host and Network Name Lookups.
[ 8.181429] stm32mp257-pinctrl soc@0:pinctrl@44240000: Can't access gpio 116
[ 8.182906] stm32mp257-pinctrl soc@0:pinctrl@44240000: request() failed for pin 116
[ 8.191183] stm32mp257-pinctrl soc@0:pinctrl@44240000: pin-116 (48010000.display-controller) status -13
[ 8.200291] stm32mp257-pinctrl soc@0:pinctrl@44240000: could not request pin 116 (PH4) from group PH4 on device soc@0:pinctrl@44240000
[ 8.214373] stm32-display 48010000.display-controller: Error applying setting, reverse things back
[ 8.225354] Galcore version 6.4.19.4.952875
[ OK ] Reached target System Time Set.
[ 8.260436] stm32mp257-pinctrl soc@0:pinctrl@44240000: Can't access gpio 116
[ 8.265402] stm32mp257-pinctrl soc@0:pinctrl@44240000: request() failed for pin 116
[ 8.272987] stm32mp257-pinctrl soc@0:pinctrl@44240000: pin-116 (48010000.display-controller) status -13
[ 8.280939] stm32mp257-pinctrl soc@0:pinctrl@44240000: could not request pin 116 (PH4) from group PH4 on device soc@0:pinctrl@44240000
How can I configure this pin correctly?
2025-07-23 5:31 AM
Hello @jhkim,
I suggest to take a look at your RIF configuration present in OP-TEE. OP-TEE is responsible of setting the firewall configuration for peripherals and resources of RIF-aware peripherals. Your PH4 GPIO probably is configured as secure.
You can find more information at: STM32MP2_firewall_configuration wiki
The RIF configuration of your board should be found under the: <board_name>-rif.dtsi file included by your board device tree file in OPTEE.
I don't see this pin used in the stm32mp257f-dk board file as a LED GPIO. It is the red LED used by the bootROM for errors, hence this GPIO being secure. In this case, if you change the configuration, be aware of that usage as well. (source: STM32_MPU_ROM_code_overview section 11.1).
Best regards,
Gatien