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.

ADS7846 touch screen doesn't work. unknown pin PL8 error.

Featured Replies

Hi all! Could someone help me?
I am triying to setup Kedei 3.5 HDLCD touchscreen. I found a common example sunxi-DT-overlay for ads7846.

/dts-v1/;
/plugin/;

/ {
	compatible = "allwinner,sun4i-a10", "allwinner,sun7i-a20", "allwinner,sun8i-h3", "allwinner,sun50i-a64", "allwinner,sun50i-h5";

	fragment@0 {
		target = <&pio>;
		__overlay__ {
			ads7846_pins: ads7846_pins {
				pins= "PA7";
				function = "irq";
           		};
		};
	};

	fragment@1 {
		target = <&spi0>;
		__overlay__ {
			#address-cells = <1>;
			#size-cells = <0>;
			status = "okay";
			ads7846@0 {
				compatible = "ti,ads7846";
				reg = <0>; /* Chip Select 0 */
				status = "okay";
				pinctrl-names = "default";
				pinctrl-0 = <&ads7846_pins>;
				spi-max-frequency = <2000000>;
				interrupt-parent = <&pio>;
				interrupts = <0 7 2>; /* PA7 IRQ_TYPE_EDGE_FALLING */
				pendown-gpio = <&pio 0 7 0>; /* PA7 */

				/* driver defaults, optional */
				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>;
			};
		};
	};
};

 

I changed pin "PA7" with "PL8" and after reboot got such error:
[    9.788721] sun50i-h6-pinctrl 300b000.pinctrl: unknown pin PL8


Also I can't use other ports, PA and PH support interrupts, but PA is not exposed to the interface pins. All of PH occupated by SPI. PD does not support interrupts (got "no irq" error).

 

My dts:
 

/dts-v1/;
/plugin/;

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

        fragment@0 {
                target = <&pio>;
                __overlay__ {
                        ads7846_pins: ads7846_pins {
                                pins= "PL8";
                                function = "irq";
                        };
                };
        };

        fragment@1 {
                target = <&spi1>;
                __overlay__ {
                        #address-cells = <1>;
                        #size-cells = <0>;
                        status = "okay";
                        ads7846@0 {
                                compatible = "ti,ads7846";
                                reg = <0>; /* Chip Select 0 */
                                status = "okay";
                                pinctrl-names = "default";
                                pinctrl-0 = <&ads7846_pins>;
                                spi-max-frequency = <2000000>;
                                interrupt-parent = <&pio>;
                                interrupts = <11 8 2>; /* PL8 IRQ_TYPE_EDGE_FALLING */
                                pendown-gpio = <&pio 11 8 0>; /* PL8 */

                                /* driver defaults, optional */
                                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>;
                        };
                };
        };
};

 

Edited by sas321sas

Solved by Gunjan Gupta

  • sas321sas changed the title to ADS7846 touch screen doesn't work. unknown pin PL8 error.

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.