cancel
Showing results for 
Search instead for 
Did you mean: 

How to use boot pin as gpio

SChen.19
Associate II

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)>;
		};
	};

2 REPLIES 2
Kevin HUBER
ST Employee

Hello @Community member​ ,

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

Best Regards,

Kevin

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

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