sas321sas Posted August 15, 2023 Posted August 15, 2023 (edited) 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 August 15, 2023 by sas321sas 0 Quote
Solution Gunjan Gupta Posted August 15, 2023 Solution Posted August 15, 2023 try changing &pio to &r_pio when using PL8 0 Quote
sas321sas Posted August 15, 2023 Author Posted August 15, 2023 @Gunjan Gupta, thanks for helping! 😄 It fixed the pl8 error. 0 Quote
Recommended Posts
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.