Jump to content

GPIO hog via device tree overlay


inx-onlya

Recommended Posts

I would like to set a GPIO to output-high during the boot. In this case, the GPIO is PG0 whose number is 192.

The device tree overlay is

/dts-v1/;
/plugin/;

/ {
	compatible = "allwinner,sun50i-a64";

	fragment@0 {
		target = <&pio>;
		__overlay__ {
			gpio_out_override_hog {
				gpio-hog;
				gpios = <192 0>; /* PG0 */
				output-high;
				line-name = "PG0-gpio-hog";
			};
		};
	};
};

 

However, after the application and reboot, I do not see any init information in "/sys/kernel/gpio" about GPIO 192. There is no "/sys/class/gpio/gpio192" folder existed after boot either.

Is there anything wrong in the overlay file?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines