Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Activation of GPIO pins using overlays

Featured Replies

Hello there. I'm trying to set up GPIO pins PD15 and PD16 on my OrangePi 3 LTS to work as input pins using device tree overlays. The overlay I have created is the following (for PD15 only):

 

/dts-v1/;
/plugin/;

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

	fragment@0 {
		target = <&pio>;

		__overlay__ {
			my_pins:my_pins {
				pins = "PD15";
				function = "gpio_in";
				default-state = "on";
			};
		};
	};
	
	fragment@1 {
		target-path = "/";
		__overlay__ {
			my@0 {
				compatible = "my-gpio";
				pinctrl-names = "default";
				pinctrl-0 = <&my_pins>;
				gpios = <&pio 3 15 0>;
				status = "okay";
			};
		};
	};	
};

Probably it is incorrect, because when I check the GPIO state using "gpio readall" command, I still get OFF state for the PD15 pin. Of course, I could change the pin mode using the "gpio" command itself (it does work, like "gpio mode 9 in" does set the PD15 pin mode to input), but I would prefer the overlays method.

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...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.