SuperVagabond
Posts: 1
Joined: Tue Jul 31, 2018 12:51 pm

device tree, touch panel adaptation ... don't work :/ !

Tue Jul 31, 2018 1:02 pm

Hello everyone !

I got a problem ;) !
I have a touch panel with a driver for linux. I want to use it on my raspberry pi 3 ... I succeed to compile the module and add it to the kernel !
Just, i have a device tree issue ... I need to add this (specif touch panel) :

Code: Select all

	[email protected] {  
		compatible = "sis,i2c_touch_driver";  
		reg = <0x5c>;  
		sis,rst-gpio = <&pio 7 5 0>;  
		sis,int-gpio = <&pio 7 3 0>;  
	};
So I need to modify this because it's not the same on my raspberry pi 3 ... With many search, I succeed to create a specific overlays named : touch-i2c-overlay.dts

Code: Select all

	
	
	/dts-v1/;
	/plugin/;
	
	/ {
	
	compatible = "brcm,bcm2708";
	
	[email protected] {
		target = <&gpio>;
		__overlay__ {
				touch_pins: touch_pins {
					brcm,pins = <5 6>; /* Mapping on GPIO RPI3 */
					brcm,function = <1 0>;
					brcm,pull = <2 2>; /* Reset and Interrup Active Low */	
				};
		};
	};
	
	[email protected]{
		target = <&i2c_arm>;
		__overlay__{
			#address-cells = <1>;
			#size-cells = <0>;
			status = "okay";

			touch: [email protected]{
				pincrtl-names = "default";
				pincrtl-0 = <&touch_pins>;
			
				compatible = "sis,i2c_touch_driver";
				reg = <0x5c>;
				interrupts = <6, 2> /* IRQ_TYPE_EDGE_FALLING */
				interrupt-parent = <&gpio>;
				sis,rst-gpio = <&gpio 5 2>; /* ACTIVE LOW, OUTPUT, RESET  */
				sis,int-gpio = <&gpio 6 2>; /* IRQ_TYPE_EDGE_FALLING, INPUT, INTERRUPT */
				status = "okay";
			};
		};
	};
	
	};
So, the idea: the touch panel generate an IRQ if there is a touch and the raspberry pi should get this interrupt through the driver on GPIO6 (I try to map the sis,int-gpio with the interrupt on gpio6). I force the reset high with an external connexion for the moment ...
With evtest, I see my device but can't get a touch interrupt catch by the raspberry pi so, i think, there is something wrong ins my overlay syntax ...

I check with raspi-gpio, and this is correct ... on the gpio6, on start is UP, if i made a touch, gpio6 goes down but the driver don't catch the interrupt ... I try to change the baudrate to 640000 (400KHz), but in this case, my device is not seen (with evtest) ...

Someone see something wrong ?

Thanks a lot...

Return to “Device Tree”

Who is online

Users browsing this forum: No registered users and 2 guests