Skip to main content
Visitor II
May 26, 2023
Question

How to use boot pin as gpio

  • May 26, 2023
  • 1 reply
  • 1237 views

Hi, I use boot1 pin as gpio key function. The boot1 is PI5, and I configure it in kernel dts code. When the system boot up, the input event0 device is shows, but I use hexdump can not get any key code data. Currently, my board is boot from sdcard.

	gpio-keys {
		compatible = "gpio-keys";
		#size-cells = <0>;
 
		user {
			label = "user";
			linux,code = <BTN_1>;
			gpios = <&gpioi 5 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
		};
	};

    This topic has been closed for replies.

    1 reply

    Technical Moderator
    May 29, 2023

    Hello @Community member​ ,

    Are you on a custom board or a board provided by ST?

    Best Regards,

    Kevin

    SChen.19Author
    Visitor II
    June 1, 2023

    My custom board. I try to use boot mode pin as gpio to input/output.