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.

enabling lcd through dts overlay

Featured Replies

Hey.

I'm working on an olimex A13-SOM board that is connected to some pcb board, that has a 4.3" lcd with capacitive touch panel connected to it.

After a looong while, I've finaly managed to get the touch panel to work. Hooray.

The display itself actually worked right away without me having to do anything...... well... almost.

The display is initially off, so I have to run the 3 following commands, to turn it on:

echo 35 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio35/direction
echo 5 > /sys/class/gpio/gpio35/value

After that the display works just fine. (so basicly I enable the PB3 pin, change it's direction to out, and set it's value to 5 - this is the backlight level - it takes values from 0 to 10).

 

I can of course have those commands run through scripts during boot, but I would very much like to have it done through a dts overlay.

Can anyone help point me in the right direction of how to do that? 

So far I've managed to turn it on during boot by adding a fragment targeted at <&panel> with the following line:

enable-gpios = <&pio 1 3 0>;

 

and this does seem to turn the display on - however, it just stays completely white/blank.

Here's the dts that I've gotten to work so far (mainly the touch panel):

// Device tree overlay for I2C connected Goodix gt911 - (Brewie beer brewing machine)
/dts-v1/;
/plugin/;

/{
	compatible = "allwinner,sun5i-a13";	

// disable rtp - resistive touch.
	fragment@0 {
		target = <&rtp>;
		__overlay__ {
			status = "disabled";
		};
	};

	fragment@1 {
		target = <&pio>;
		__overlay__ {
			goodix_irq: goodix_irq {
				allwinner,pins = "PG11"; 
				allwinner,function = "gpio_in";
			};

			goodix_reset: goodix_reset {
				allwinner,pins = "PC3";
				allwinner,function = "gpio_out";
			};
		};
	};


	fragment@2 {
		target = <&i2c2>;
		__overlay__ {
			#address-cells = <0x1>;
			#size-cells = <0x0>;
			gt911: gt911@14 {
				compatible = "goodix,gt911";
				reg = <0x14>;
				pinctrl-names = "default";
				pinctrl-0 = <&goodix_irq &goodix_reset>;
				interrupt-parent = <&pio>;
				interrupts = <6 11 0>;	
				irq-gpios = <&pio 6 11 0>;
				reset-gpios = <&pio 2 3 0>;
			};
		};
	};
};

 

 

 

 

Guest
This topic is now closed to further replies.

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.