Jump to content

Recommended Posts

Posted

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

 

 

 

 

This thread is quite old. Please consider starting a new thread rather than reviving this one.

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