Jump to content

Opi zero +2 H5 - pin 11 name?


arjepsen

Recommended Posts

Hey.

I'm working on setting up octoprint on my opi zero +2(H5), aiming at running octodash on a small 3.5" spi waveshare clone display.

So far I've got the display working fine, as in showing the console text, and also working in xorg.

However, I have a bit of trouble with the touch part.

 

I've combed through the forum and followed the guides I could find, and have a fairly good working DTS file, however, I can't seem to get pin number 11 to work.

In the overlay files, it seems to be named PA1, but I couldn't get that to work, and there were a bit of oddities with what pins seemed to be enabled, in relation to the various overlays.

However, I found different info here: https://linux-sunxi.org/Xunlong_Orange_Pi_Zero_Plus_2#Variants

suggesting that it's named PL0. Here, also pin 26 seems to be named PD14, which actually seems to be correct. But dmesg reports an error:

sun50i-h5-pinctrl 1c20800.pinctrl: unknown pin PL0
when I use that pin-name in the dts file.

 

Here's the DTS file I'm using:

 

/dts-v1/;
/plugin/;

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

	fragment@0 {
		target = <&spi1>;
		__overlay__ {
			status = "okay";

			spidev@0{
				status = "disabled";
			};

			spidev@1{
				status = "disabled";
			};

		};
	};




	fragment@1 {
		target = <&pio>;

		__overlay__ {

			tft35a_pins: tft35a_pins {
				allwinner,pins = "PA18", "PA2";
				allwinner,function = "gpio_out";
			};

			ads7846_pins: ads7846_pins {
				pins = "PL0";
				function = "irq";
      };
		};
	};

	fragment@2 {
		target = <&spi1>;

		__overlay__ {
			#address-cells = <1>;
			#size-cells = <0>;
// extra m.m..
//			status = "okay";


			tft35a: tft35a@0 {
				compatible = "ilitek,ili9486";
				reg = <0>;
				status = "okay";
				pinctrl-names = "default";
				pinctrl-0 = <&tft35a_pins>;
				
				spi-max-frequency = <16000000>;
				txbuflen = <32768>;
				rotation = <180>; // rotate eller rotation?
				bgr = <0>;
				fps = <25>;
				buswidth = <8>;
				regwidth = <16>;
				reset-gpios = <&pio 0 2 0>; /* PA2 */
				dc-gpios = <&pio 0 18 0>; /* PA18 */
				debug = <1>;
				
				init = <0x10000b0 0x00
				        0x1000011
					0x20000ff
					0x100003a 0x55
					0x1000036 0x28
					0x10000c2 0x44
					0x10000c5 0x00 0x00 0x00 0x00
					0x10000e0 0x0f 0x1f 0x1c 0x0c 0x0f 0x08 0x48 0x98 0x37 0x0a 0x13 0x04 0x11 0x0d 0x00
					0x10000e1 0x0f 0x32 0x2e 0x0b 0x0d 0x05 0x47 0x75 0x37 0x06 0x10 0x03 0x24 0x20 0x00
					0x10000e2 0x0f 0x32 0x2e 0x0b 0x0d 0x05 0x47 0x75 0x37 0x06 0x10 0x03 0x24 0x20 0x00
					/* piscreen -> waveshare35a */
					0x1000036 0x28
					0x1000011
					0x1000029>;
			};

			tft35a_ts: tft35a-ts@1 {
				compatible = "ti,ads7846";
				reg = <1>;
				status = "okay";
				pinctrl-names = "default";
				pinctrl-0 = <&ads7846_pins>;
				spi-max-frequency = <2000000>;
				interrupts = <11 0 2>; /* PA1 IRQ_TYPE_EDGE_FALLING */ // PL0
				interrupt-parent = <&pio>;
				pendown-gpio = <&pio 11 0 0>;  // PL0
				ti,x-min = /bits/ 16 <0>;
				ti,y-min = /bits/ 16 <0>;
				ti,x-max = /bits/ 16 <0x0FFF>;
				ti,y-max = /bits/ 16 <0x0FFF>;
				ti,pressure-min = /bits/ 16 <0>;
				ti,pressure-max = /bits/ 16 <0xFFFF>;
				ti,x-plate-ohms = /bits/ 16 <400>;
			};
		};
	};

	__overrides__ {
		speed = <&tft35a>,"spi-max-frquency:0";
		txbuflen = <&tft35a>,"txbuflen:0";
		rotate = <&tft35a>,"rotate:0";
		fps = <&tft35a>,"fps:0";
		bgr = <&tft35a>,"bgr:0";
		debug = <&tft35a>,"debug:0";
		swapxy = <&tft35a_ts>,"ti,swap-xy?";
	};
};

 

Does anyone know the specific name to be used there?

 

Regards

Anders

Link to comment
Share on other sites

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