ag123 Posted Monday at 04:08 AM Posted Monday at 04:08 AM I think rotation is managed by some LCD commands, see MADCTL in the datasheet. https://www.hpinfotech.ro/ILI9488.pdf so the driver probably needs to implement it to have rotation 0 Quote
Solution WDR_s Posted yesterday at 02:57 AM Author Solution Posted yesterday at 02:57 AM LCD and Touch working 😊 All that's left is to calibrate it, but it's working normally. Thank you, robertoj, for helping me so far. Updated DTS Spoiler /dts-v1/; /plugin/; / { compatible = "allwinner,sun50i-h616"; fragment@0 { target = <&spi1>; __overlay__ { status = "okay"; cs-gpios = <&pio 7 5 0>,<&pio 2 15 0>; /*PH5=CS0 for lcd, PC15=CS1 for touch*/ display: display@0 { compatible = "ilitek,ili9341"; reg = <0>; pinctrl-names = "default"; spi-max-frequency = <20000000>; rotate = <270>; bgr = <0>; fps = <30>; buswidth = <8>; regwidth = <16>; height = <480>; width = <320>; reset-gpios = <&pio 2 14 1>; /* PC14 */ dc-gpios = <&pio 2 6 0>; /* PC6 */ debug = <3>; init = <0x10000b0 0x00 // Interface Mode Control 0x1000011 // Sleep Out 0x20000ff // Delay (255ms) 0x10000C0 0x0D 0x0D // Power Control 1 0x10000C1 0x43 // Power Control 2 0x10000C5 0x00 0x48 0x80 // VCOM Control 1 0x10000C7 0x00 // VCOM Control 2 0x1000036 0x28 // Memory Access Control (Rotação) 0x100003A 0x55 // Pixel Format Set (16bit) 0x10000B1 0xB0 0x11 // Frame Rate Control 0x10000F0 0x01 // Enable Extended Comand Set 0x10000F6 0x00 0x01 0x32 // SPI ilInterface Control 0x1000026 0x01 // Gamma Set 0x10000E0 0x0F 0x31 0x2B 0x0C 0x0E 0x08 0x4E 0xF1 0x37 0x07 0x10 0x03 0x0E 0x09 0x00 // Positive Gamma Correction 0x10000E1 0x00 0x0E 0x14 0x03 0x11 0x07 0x31 0xC1 0x48 0x08 0x0F 0x0C 0x31 0x36 0x0F // Negative Gamma Correction 0x10000B6 0x02 0x02 0x3B // Display Function Control 0x1000011 // Sleep Out 0x20000ff // Delay (255ms) 0x1000029>; // Display ON }; ads7846: ads7846@1 { compatible = "ti,ads7846"; reg = <1>; pinctrl-names = "default"; spi-max-frequency = <1000000>; interrupt-parent = <&pio>; interrupts = <2 10 2>; /* PC10 - IRQ */ pendown-gpio = <&pio 2 10 1>; /* PC10 */ /* OPTIONS */ ti,x-min = /bits/ 16 <0>; ti,y-min = /bits/ 16 <0>; ti,x-max = /bits/ 16 <0xFFF>; ti,y-max = /bits/ 16 <0xFFF>; ti,pressure-min = /bits/ 16 <0>; ti,pressure-max = /bits/ 16 <0xFFF>; ti,x-plate-ohms = /bits/ 16 <400>; ti,swap-xy = <1>; }; }; }; }; 0 Quote
WDR_s Posted 19 hours ago Author Posted 19 hours ago running directly on the board, the LCD and Touch, in this dts: Spoiler /dts-v1/; /plugin/; / { compatible = "allwinner,sun50i-h616"; fragment@0 { target = <&spi1>; __overlay__ { status = "okay"; cs-gpios = <&pio 7 5 0>,<&pio 2 10 0>; /*PH5=CS0 for lcd, PC10=CS1 for touch*/ display: display@0 { compatible = "ilitek,ili9341"; reg = <0>; pinctrl-names = "default"; spi-max-frequency = <20000000>; rotate = <270>; bgr = <0>; fps = <30>; buswidth = <8>; regwidth = <16>; height = <480>; width = <320>; reset-gpios = <&pio 2 7 1>; /* PC7 */ dc-gpios = <&pio 2 14 0>; /* PC14 */ debug = <3>; init = <0x10000b0 0x00 // Interface Mode Control 0x1000011 // Sleep Out 0x20000ff // Delay (255ms) 0x10000C0 0x0D 0x0D // Power Control 1 0x10000C1 0x43 // Power Control 2 0x10000C5 0x00 0x48 0x80 // VCOM Control 1 0x10000C7 0x00 // VCOM Control 2 0x1000036 0x28 // Memory Access Control (Rotação) 0x100003A 0x55 // Pixel Format Set (16bit) 0x10000B1 0xB0 0x11 // Frame Rate Control 0x10000F0 0x01 // Enable Extended Comand Set 0x10000F6 0x00 0x01 0x32 // SPI ilInterface Control 0x1000026 0x01 // Gamma Set 0x10000E0 0x0F 0x31 0x2B 0x0C 0x0E 0x08 0x4E 0xF1 0x37 0x07 0x10 0x03 0x0E 0x09 0x00 // Positive Gamma Correction 0x10000E1 0x00 0x0E 0x14 0x03 0x11 0x07 0x31 0xC1 0x48 0x08 0x0F 0x0C 0x31 0x36 0x0F // Negative Gamma Correction 0x10000B6 0x02 0x02 0x3B // Display Function Control 0x1000011 // Sleep Out 0x20000ff // Delay (255ms) 0x1000029>; // Display ON }; ads7846: ads7846@1 { compatible = "ti,ads7846"; reg = <1>; pinctrl-names = "default"; spi-max-frequency = <1000000>; interrupt-parent = <&pio>; interrupts = <2 6 2>; /* PC6 - IRQ */ pendown-gpio = <&pio 2 6 1>; /* PC6 */ /* OPTIONS */ ti,x-min = /bits/ 16 <0>; ti,y-min = /bits/ 16 <0>; ti,x-max = /bits/ 16 <0xFFF>; ti,y-max = /bits/ 16 <0xFFF>; ti,pressure-min = /bits/ 16 <0>; ti,pressure-max = /bits/ 16 <0xFFF>; ti,x-plate-ohms = /bits/ 16 <400>; ti,swap-xy = <1>; }; }; }; }; 0 Quote
robertoj Posted 17 hours ago Posted 17 hours ago Nicely done!! How are you going to use it? X11? Wayland? What window manger and desktop? Is your mouse cursor jumpy or stable? Is there RGB noise when you drag windows on the desktop? I have those issues. My setup: orange pi zero3, ili9488, drm, x11, openbox and idesk. I wonder if my problem comes from sharing the SPI bus with 2 chip selects... but if you have one SPI and 2 chip selects, but no noise problems, then SPI is not my problem. 0 Quote
WDR_s Posted 15 hours ago Author Posted 15 hours ago i installed xfce to test the touch, the touch is stable when dragging the window there is a noise, but i think it's because of the frequency. maybe I can help you. 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.