2022-03-31 08:00 PM
Hi,
My LCD display format is RGB666, I removed the "LCD_R0,LCDR1, LCD_G0,LCD_G1,LCD_B0,LCD_B1" in file "stm32mp15-pinctrl.dtsi", and recompile my device tree, then upload to my board.
I tried to use the LCD_R0 as GPIO with command:
gpioset gpiochip7 2=1
But get error:
"
[ 52.329202] stm32mp157-pinctrl soc:pin-controller@50002000: pin PH2 already requested by panel; cannot claim for GPIOH:114
[ 52.348561] stm32mp157-pinctrl soc:pin-controller@50002000: pin-114 (GPIOH:114) status -22
gpioset: error setting the GPIO line values: Invalid argument
"
Please advise how to reuse the unused LTDC pin as GPIO.
Thanks,
QiZhang
ltdc_pins_a: ltdc-a-0 {
pins {
pinmux = <STM32_PINMUX('G', 7, AF14)>, /* LCD_CLK */
<STM32_PINMUX('I', 10, AF14)>, /* LCD_HSYNC */
<STM32_PINMUX('I', 9, AF14)>, /* LCD_VSYNC */
<STM32_PINMUX('E', 13, AF14)>, /* LCD_DE */
<STM32_PINMUX('H', 8, AF14)>, /* LCD_R2 */
<STM32_PINMUX('H', 9, AF14)>, /* LCD_R3 */
<STM32_PINMUX('H', 10, AF14)>, /* LCD_R4 */
<STM32_PINMUX('H', 11, AF14)>, /* LCD_R5 */
<STM32_PINMUX('H', 12, AF14)>, /* LCD_R6 */
<STM32_PINMUX('E', 15, AF14)>, /* LCD_R7 */
<STM32_PINMUX('H', 13, AF14)>, /* LCD_G2 */
<STM32_PINMUX('H', 14, AF14)>, /* LCD_G3 */
<STM32_PINMUX('H', 15, AF14)>, /* LCD_G4 */
<STM32_PINMUX('I', 0, AF14)>, /* LCD_G5 */
<STM32_PINMUX('I', 1, AF14)>, /* LCD_G6 */
<STM32_PINMUX('I', 2, AF14)>, /* LCD_G7 */
<STM32_PINMUX('G', 10, AF14)>, /* LCD_B2 */
<STM32_PINMUX('D', 10, AF14)>, /* LCD_B3 */
<STM32_PINMUX('I', 4, AF14)>, /* LCD_B4 */
<STM32_PINMUX('I', 5, AF14)>, /* LCD_B5 */
<STM32_PINMUX('I', 6, AF14)>, /* LCD_B6 */
<STM32_PINMUX('I', 7, AF14)>; /* LCD_B7 */
bias-disable;
drive-push-pull;
slew-rate = <1>;
};
};
ltdc_pins_sleep_a: ltdc-a-1 {
pins {
pinmux = <STM32_PINMUX('G', 7, ANALOG)>, /* LCD_CLK */
<STM32_PINMUX('I', 10, ANALOG)>, /* LCD_HSYNC */
<STM32_PINMUX('I', 9, ANALOG)>, /* LCD_VSYNC */
<STM32_PINMUX('E', 13, ANALOG)>, /* LCD_DE */
<STM32_PINMUX('H', 8, ANALOG)>, /* LCD_R2 */
<STM32_PINMUX('H', 9, ANALOG)>, /* LCD_R3 */
<STM32_PINMUX('H', 10, ANALOG)>, /* LCD_R4 */
<STM32_PINMUX('H', 11, ANALOG)>, /* LCD_R5 */
<STM32_PINMUX('H', 12, ANALOG)>, /* LCD_R6 */
<STM32_PINMUX('E', 15, ANALOG)>, /* LCD_R7 */
<STM32_PINMUX('H', 13, ANALOG)>, /* LCD_G2 */
<STM32_PINMUX('H', 14, ANALOG)>, /* LCD_G3 */
<STM32_PINMUX('H', 15, ANALOG)>, /* LCD_G4 */
<STM32_PINMUX('I', 0, ANALOG)>, /* LCD_G5 */
<STM32_PINMUX('I', 1, ANALOG)>, /* LCD_G6 */
<STM32_PINMUX('I', 2, ANALOG)>, /* LCD_G7 */
<STM32_PINMUX('G', 10, ANALOG)>, /* LCD_B2 */
<STM32_PINMUX('D', 10, ANALOG)>, /* LCD_B3 */
<STM32_PINMUX('I', 4, ANALOG)>, /* LCD_B4 */
<STM32_PINMUX('I', 5, ANALOG)>, /* LCD_B5 */
<STM32_PINMUX('I', 6, ANALOG)>, /* LCD_B6 */
<STM32_PINMUX('I', 7, ANALOG)>; /* LCD_B7 */
};
};
Solved! Go to Solution.
2022-04-29 03:36 AM
Hello,
Sorry for the late reply.
I don't know if you still have the problem, but I tried on my 157C-DK2 board and I am able to set the PIN.
I edited "stm32mp15-pinctrl.dtsi" and removed the two lines "LCD_R0", rebuild, then scp of the new DTB.
root@stm32mp1:~# gpioset gpiochip7 2=1
root@stm32mp1:~#
And I no longer have the error.
Can you please send me your "stm32mp15-pinctrl.dtsi" and your complete DTB file?
Regards,
Kevin
2022-04-29 03:36 AM
Hello,
Sorry for the late reply.
I don't know if you still have the problem, but I tried on my 157C-DK2 board and I am able to set the PIN.
I edited "stm32mp15-pinctrl.dtsi" and removed the two lines "LCD_R0", rebuild, then scp of the new DTB.
root@stm32mp1:~# gpioset gpiochip7 2=1
root@stm32mp1:~#
And I no longer have the error.
Can you please send me your "stm32mp15-pinctrl.dtsi" and your complete DTB file?
Regards,
Kevin
2022-06-01 01:55 AM
Hello @zqizh.1 ,
Do you still have the problem?
Regards,
Kévin
2024-08-07 06:44 AM
I have s similar problem with pin already requested by panel" see: Link