robertoj Posted August 25 Posted August 25 I am experimenting with a cheap ILI9341 screen and mi OrangePi Zero LTS https://www.aliexpress.us/item/2251832431328471.html I found these recent instructions to be able to display graphics here: https://ryjelsum.me/homelab/xpt2046-ili9341-opi-zero/ with a reference to a previous experience (without mentioning success) https://hackaday.io/project/190371-g-edm/log/217902-first-success-with-armbian-nanopi-and-ili9341-touch and independently, I found these instructions and experiences here: https://docs.armbian.com/User-Guide_Allwinner_overlays/ https://forum.armbian.com/topic/27457-connecting-banana-pi-m2-zero-with-ili9341-display-over-spi-on-latest-armbian-image/ <-just found it and it has some success with BananaPi M2 Zero https://tech-de.netlify.app/articles/de547180/index.html https://4pda.to/forum/index.php?showtopic=782242&st=5060#entry112401076 I connected with wires as shown in instructions: https://forum.armbian.com/topic/28674-text-version-of-orange-pi-zero-pinout/ And the LCD's LED input pin to 3.3V I activated the spi-add-cs1 overlay in arbian-config I copied the dts for opiZ into ~/ili9341/ili9341-touch-double-spi-cs.dts Then, I executed: cd ili9341 armbian-add-overlay ili9341-touch-double-spi-cs.dts Then, I rebooted, and my LCD just looks gray. My armbianEnv looks like this: verbosity=1 bootlogo=false console=both disp_mode=1920x1080p60 overlay_prefix=sun8i-h3 overlays=spi-add-cs1 tve usbhost2 usbhost3 rootdev=UUID=7d9a7016-73db-4f9c-a5bd-e3e5ab53ffc4 rootfstype=ext4 user_overlays=ili9341-touch-double-spi-cs usbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u my armbianmonitor -u: https://paste.armbian.com/arogurekiv I am still not done checking against the experiences with Bpi M2-0, but I ask here: anyone has experience with ILI9341+XPT2046, in either OrangePi Zero or Zero 3? Should I downgrade to Linux 6.1.53? 1 Quote
robertoj Posted September 3 Author Posted September 3 Just to keep track of my progress: OrangePi Zero can drive a ILI9341, with this ili9341-spi1.dts, with the fb_ili9341.ko driver (not the drm driver). Works on Linux 6.1.104 and Linux 6.6.44 Pin connections inside the DTS code: Spoiler /* OrangePi Zero -> ILI9341 LCD connections SPI CLOCK = PA14 SPI DO (LCD MISO) = PA16 (OPIZ MISO) SPI DI (LCD MOSI) = PA15 (OPIZ MOSI) LCD DATA/CONTROL = PA18 LCD RESET = PA2 CHIP SELECT = PA13 VCC = 3.3V PIN GND = GND PIN */ /dts-v1/; /plugin/; /{ compatible = "allwinner,sun4i-a10", "allwinner,sun7i-a20", "allwinner,sun8i-h3", "allwinner,sun50i-a64", "allwinner,sun50i-h5"; fragment@0 { target = <&pio>; __overlay__{ display_pins: display_pins { pins = "PA18", "PA2"; /* reset, DC pins, order does not matter*/ function = "gpio_out", "gpio_out"; }; }; }; fragment@1 { target = <&spi1>; __overlay__ { /* needed to avoid dtc warning */ #address-cells = <1>; #size-cells = <0>; status="okay"; pinctrl-names = "default"; pinctrl-0 = <&spi1_pins>; /* Mux the PI to make sure they are set in spi Mode */ cs-gpios = <&pio 0 13 0>; /* PA13 chip select */ num-chipselects = <1>; display: display@0 { /*compatible = "adafruit,yx240qv29","ilitek,ili9341";*/ compatible = "ilitek,ili9341"; reg = <0>; pinctrl-names = "default"; pinctrl-1 = <&display_pins>; spi-max-frequency = <40000000>; rotate = <270>; /* rotate for ili9341, rotation for yx240qv29 */ bgr=<0>; fps = <15>; buswidth = <8>; height = <320>; width = <240>; reset-gpios = <&pio 0 2 1>; /* PA2 reset pin*/ dc-gpios = <&pio 0 18 0>; /* PA18 Data control pin */ debug = <3>; 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 0x1000036 0x28 0x1000011 0x1000029>; }; }; }; __overrides__ { rotate = <&display>,"rotate:0"; fps = <&display>,"fps:0"; debug = <&display>,"debug:0"; }; }; and this armbianEnv.txt Spoiler verbosity=1 bootlogo=false console=both disp_mode=1920x1080p60 overlay_prefix=sun8i-h3 overlays=usbhost2 usbhost3 rootdev=UUID=677917ab-5341-4634-b556-aafaeaa83c52 rootfstype=ext4 user_overlays=ili9341-spi1 usbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u 1 Quote
robertoj Posted September 4 Author Posted September 4 Investigating why fb_ili9341 works but ili9341 does not. With this ili9341-spi1.dts, fb_ili9341 gets loaded and TFT shows images perfectly Spoiler /* OrangePi Zero -> ILI9341 LCD connections SPI CLOCK = PA14 SPI DO (LCD MISO) = PA16 (OPIZ MISO) SPI DI (LCD MOSI) = PA15 (OPIZ MOSI) LCD DATA/CONTROL = PA18 LCD RESET = PA2 CHIP SELECT = PA13 VCC = 3.3V PIN GND = GND PIN */ /dts-v1/; /plugin/; /{ compatible = "allwinner,sun4i-a10", "allwinner,sun7i-a20", "allwinner,sun8i-h3", "allwinner,sun50i-a64", "allwinner,sun50i-h5"; fragment@0 { target = <&pio>; __overlay__{ display_pins: display_pins { pins = "PA18", "PA2"; /* reset, DC pins, order does not matter*/ function = "gpio_out", "gpio_out"; }; }; }; fragment@1 { target = <&spi1>; __overlay__ { /* needed to avoid dtc warning */ #address-cells = <1>; #size-cells = <0>; status="okay"; pinctrl-names = "default"; pinctrl-0 = <&spi1_pins>; /* Mux the PI to make sure they are set in spi Mode */ cs-gpios = <&pio 0 13 0>; /* PA13 chip select */ num-chipselects = <1>; display: display@0 { /*compatible = "adafruit,yx240qv29","ilitek,ili9341";*/ compatible = "ilitek,ili9341"; reg = <0>; pinctrl-names = "default"; pinctrl-1 = <&display_pins>; spi-max-frequency = <40000000>; rotate = <270>; /* rotate for ili9341, rotation for yx240qv29 */ bgr=<0>; fps = <15>; buswidth = <8>; height = <320>; width = <240>; reset-gpios = <&pio 0 2 1>; /* PA2 reset pin*/ dc-gpios = <&pio 0 18 0>; /* PA18 Data control pin */ debug = <3>; 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 0x1000036 0x28 0x1000011 0x1000029>; }; }; }; __overrides__ { rotate = <&display>,"rotate:0"; fps = <&display>,"fps:0"; debug = <&display>,"debug:0"; }; }; here's the armbian-monitor -u result https://paste.armbian.com/vimetexiqe Other results in this successful DTS: Spoiler roberto@orangepizero:~$ lsmod |grep ili fb_ili9341 12288 1 fbtft 36864 1 fb_ili9341 roberto@orangepizero:~$ sudo cat /proc/device-tree/soc/spi@1c69000/status okay roberto@orangepizerosudo cat /sys/kernel/debug/pinctrl/1c20800.pinctrl/pinmux-pinspins Pinmux settings per pin Format: pin (name): mux_owner gpio_owner hog? pin 0 (PA0): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 1 (PA1): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 2 (PA2): (MUX UNCLAIMED) 1c20800.pinctrl:2 pin 3 (PA3): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 4 (PA4): 1c28000.serial (GPIO UNCLAIMED) function uart0 group PA4 pin 5 (PA5): 1c28000.serial (GPIO UNCLAIMED) function uart0 group PA5 pin 6 (PA6): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 7 (PA7): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 8 (PA8): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 9 (PA9): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 10 (PA10): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 11 (PA11): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 12 (PA12): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 13 (PA13): 1c69000.spi 1c20800.pinctrl:13 function spi1 group PA13 pin 14 (PA14): 1c69000.spi (GPIO UNCLAIMED) function spi1 group PA14 pin 15 (PA15): 1c69000.spi (GPIO UNCLAIMED) function spi1 group PA15 pin 16 (PA16): 1c69000.spi (GPIO UNCLAIMED) function spi1 group PA16 pin 17 (PA17): (MUX UNCLAIMED) 1c20800.pinctrl:17 pin 18 (PA18): (MUX UNCLAIMED) 1c20800.pinctrl:18 pin 19 (PA19): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 20 (PA20): (MUX UNCLAIMED) 1c20800.pinctrl:20 pin 21 (PA21): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 64 (PC0): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 65 (PC1): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 66 (PC2): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 67 (PC3): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 68 (PC4): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 69 (PC5): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 70 (PC6): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 71 (PC7): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 72 (PC8): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 73 (PC9): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 74 (PC10): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 75 (PC11): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 76 (PC12): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 77 (PC13): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 78 (PC14): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 79 (PC15): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 80 (PC16): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 96 (PD0): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 97 (PD1): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 98 (PD2): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 99 (PD3): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 100 (PD4): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 101 (PD5): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 102 (PD6): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 103 (PD7): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 104 (PD8): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 105 (PD9): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 106 (PD10): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 107 (PD11): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 108 (PD12): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 109 (PD13): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 110 (PD14): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 111 (PD15): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 112 (PD16): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 113 (PD17): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 128 (PE0): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 129 (PE1): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 130 (PE2): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 131 (PE3): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 132 (PE4): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 133 (PE5): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 134 (PE6): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 135 (PE7): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 136 (PE8): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 137 (PE9): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 138 (PE10): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 139 (PE11): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 140 (PE12): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 141 (PE13): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 142 (PE14): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 143 (PE15): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 160 (PF0): 1c0f000.mmc (GPIO UNCLAIMED) function mmc0 group PF0 pin 161 (PF1): 1c0f000.mmc (GPIO UNCLAIMED) function mmc0 group PF1 pin 162 (PF2): 1c0f000.mmc (GPIO UNCLAIMED) function mmc0 group PF2 pin 163 (PF3): 1c0f000.mmc (GPIO UNCLAIMED) function mmc0 group PF3 pin 164 (PF4): 1c0f000.mmc (GPIO UNCLAIMED) function mmc0 group PF4 pin 165 (PF5): 1c0f000.mmc (GPIO UNCLAIMED) function mmc0 group PF5 pin 166 (PF6): (MUX UNCLAIMED) 1c20800.pinctrl:166 pin 192 (PG0): 1c10000.mmc (GPIO UNCLAIMED) function mmc1 group PG0 pin 193 (PG1): 1c10000.mmc (GPIO UNCLAIMED) function mmc1 group PG1 pin 194 (PG2): 1c10000.mmc (GPIO UNCLAIMED) function mmc1 group PG2 pin 195 (PG3): 1c10000.mmc (GPIO UNCLAIMED) function mmc1 group PG3 pin 196 (PG4): 1c10000.mmc (GPIO UNCLAIMED) function mmc1 group PG4 pin 197 (PG5): 1c10000.mmc (GPIO UNCLAIMED) function mmc1 group PG5 pin 198 (PG6): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 199 (PG7): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 200 (PG8): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 201 (PG9): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 202 (PG10): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 203 (PG11): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 204 (PG12): (MUX UNCLAIMED) 1c20800.pinctrl:204 pin 205 (PG13): (MUX UNCLAIMED) (GPIO UNCLAIMED) When I change the DTS to (notice the differences in compatible and rotate/rotation lines) Spoiler /* OrangePi Zero -> ILI9341 LCD connections SPI CLOCK = PA14 SPI DO (LCD MISO) = PA16 (OPIZ MISO) SPI DI (LCD MOSI) = PA15 (OPIZ MOSI) LCD DATA/CONTROL = PA18 LCD RESET = PA2 CHIP SELECT = PA13 VCC = 3.3V PIN GND = GND PIN */ /dts-v1/; /plugin/; /{ compatible = "allwinner,sun4i-a10", "allwinner,sun7i-a20", "allwinner,sun8i-h3", "allwinner,sun50i-a64", "allwinner,sun50i-h5"; fragment@0 { target = <&pio>; __overlay__{ display_pins: display_pins { pins = "PA18", "PA2"; /* reset, DC pins, order does not matter*/ function = "gpio_out", "gpio_out"; }; }; }; fragment@1 { target = <&spi1>; __overlay__ { /* needed to avoid dtc warning */ #address-cells = <1>; #size-cells = <0>; status="okay"; pinctrl-names = "default"; pinctrl-0 = <&spi1_pins>; /* Mux the PI to make sure they are set in spi Mode */ cs-gpios = <&pio 0 13 0>; /* PA13 chip select */ num-chipselects = <1>; display: display@0 { compatible = "adafruit,yx240qv29","ilitek,ili9341"; /*compatible = "ilitek,ili9341";*/ reg = <0>; pinctrl-names = "default"; pinctrl-1 = <&display_pins>; spi-max-frequency = <40000000>; rotation = <270>; /* rotate for ili9341, rotation for yx240qv29 */ bgr=<0>; fps = <15>; buswidth = <8>; height = <320>; width = <240>; reset-gpios = <&pio 0 2 1>; /* PA2 reset pin*/ dc-gpios = <&pio 0 18 0>; /* PA18 Data control pin */ debug = <3>; 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 0x1000036 0x28 0x1000011 0x1000029>; }; }; }; __overrides__ { rotate = <&display>,"rotate:0"; fps = <&display>,"fps:0"; debug = <&display>,"debug:0"; }; }; The TFT remains 100% white. Here's the armbianmonitor -u: https://paste.armbian.com/segulokeso Other tests in this failed attempt: Spoiler roberto@orangepizero:~$ sudo cat /proc/device-tree/soc/spi@1c69000/status okay roberto@orangepizero:~$ lsmod|grep ili ili9341 12288 0 panel_ilitek_ili9341 16384 0 drm_mipi_dbi 20480 2 ili9341,panel_ilitek_ili9341 oberto@orangepizero:~$ sudo cat /sys/kernel/debug/pinctrl/1c20800.pinctrl/pinmux-pins Pinmux settings per pin Format: pin (name): mux_owner gpio_owner hog? pin 0 (PA0): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 1 (PA1): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 2 (PA2): (MUX UNCLAIMED) 1c20800.pinctrl:2 pin 3 (PA3): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 4 (PA4): 1c28000.serial (GPIO UNCLAIMED) function uart0 group PA4 pin 5 (PA5): 1c28000.serial (GPIO UNCLAIMED) function uart0 group PA5 pin 6 (PA6): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 7 (PA7): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 8 (PA8): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 9 (PA9): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 10 (PA10): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 11 (PA11): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 12 (PA12): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 13 (PA13): 1c69000.spi 1c20800.pinctrl:13 function spi1 group PA13 pin 14 (PA14): 1c69000.spi (GPIO UNCLAIMED) function spi1 group PA14 pin 15 (PA15): 1c69000.spi (GPIO UNCLAIMED) function spi1 group PA15 pin 16 (PA16): 1c69000.spi (GPIO UNCLAIMED) function spi1 group PA16 pin 17 (PA17): (MUX UNCLAIMED) 1c20800.pinctrl:17 pin 18 (PA18): (MUX UNCLAIMED) 1c20800.pinctrl:18 pin 19 (PA19): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 20 (PA20): (MUX UNCLAIMED) 1c20800.pinctrl:20 pin 21 (PA21): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 64 (PC0): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 65 (PC1): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 66 (PC2): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 67 (PC3): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 68 (PC4): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 69 (PC5): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 70 (PC6): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 71 (PC7): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 72 (PC8): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 73 (PC9): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 74 (PC10): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 75 (PC11): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 76 (PC12): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 77 (PC13): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 78 (PC14): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 79 (PC15): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 80 (PC16): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 96 (PD0): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 97 (PD1): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 98 (PD2): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 99 (PD3): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 100 (PD4): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 101 (PD5): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 102 (PD6): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 103 (PD7): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 104 (PD8): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 105 (PD9): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 106 (PD10): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 107 (PD11): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 108 (PD12): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 109 (PD13): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 110 (PD14): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 111 (PD15): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 112 (PD16): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 113 (PD17): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 128 (PE0): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 129 (PE1): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 130 (PE2): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 131 (PE3): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 132 (PE4): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 133 (PE5): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 134 (PE6): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 135 (PE7): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 136 (PE8): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 137 (PE9): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 138 (PE10): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 139 (PE11): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 140 (PE12): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 141 (PE13): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 142 (PE14): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 143 (PE15): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 160 (PF0): 1c0f000.mmc (GPIO UNCLAIMED) function mmc0 group PF0 pin 161 (PF1): 1c0f000.mmc (GPIO UNCLAIMED) function mmc0 group PF1 pin 162 (PF2): 1c0f000.mmc (GPIO UNCLAIMED) function mmc0 group PF2 pin 163 (PF3): 1c0f000.mmc (GPIO UNCLAIMED) function mmc0 group PF3 pin 164 (PF4): 1c0f000.mmc (GPIO UNCLAIMED) function mmc0 group PF4 pin 165 (PF5): 1c0f000.mmc (GPIO UNCLAIMED) function mmc0 group PF5 pin 166 (PF6): (MUX UNCLAIMED) 1c20800.pinctrl:166 pin 192 (PG0): 1c10000.mmc (GPIO UNCLAIMED) function mmc1 group PG0 pin 193 (PG1): 1c10000.mmc (GPIO UNCLAIMED) function mmc1 group PG1 pin 194 (PG2): 1c10000.mmc (GPIO UNCLAIMED) function mmc1 group PG2 pin 195 (PG3): 1c10000.mmc (GPIO UNCLAIMED) function mmc1 group PG3 pin 196 (PG4): 1c10000.mmc (GPIO UNCLAIMED) function mmc1 group PG4 pin 197 (PG5): 1c10000.mmc (GPIO UNCLAIMED) function mmc1 group PG5 pin 198 (PG6): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 199 (PG7): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 200 (PG8): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 201 (PG9): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 202 (PG10): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 203 (PG11): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 204 (PG12): (MUX UNCLAIMED) 1c20800.pinctrl:204 pin 205 (PG13): (MUX UNCLAIMED) (GPIO UNCLAIMED) In both cases, I used sudo armbian-add-overlay ili9341-spi1.dts, and my armbianEnv remained the same: Spoiler verbosity=1 bootlogo=false console=both disp_mode=1920x1080p60 overlay_prefix=sun8i-h3 overlays=usbhost2 usbhost3 rootdev=UUID=54388674-edbe-4032-83b8-1f048fe55a29 rootfstype=ext4 user_overlays=ili9341-spi1 usbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u 0 Quote
robertoj Posted September 5 Author Posted September 5 I tried this DTS, to try to declare, reserve, or pin mux the chip select (I don't know what the added block does) Spoiler /* OrangePi Zero -> ILI9341 LCD connections SPI CLOCK = PA14 SPI DO (LCD MISO) = PA16 (OPIZ MISO) SPI DI (LCD MOSI) = PA15 (OPIZ MOSI) LCD DATA/CONTROL = PA18 LCD RESET = PA2 CHIP SELECT = PA13 VCC = 3.3V PIN GND = GND PIN */ /dts-v1/; /plugin/; /{ compatible = "allwinner,sun4i-a10", "allwinner,sun7i-a20", "allwinner,sun8i-h3", "allwinner,sun50i-a64", "allwinner,sun50i-h5"; fragment@0 { target = <&pio>; __overlay__{ spi1_cs0: spi1_cs0 { pins = "PA13"; function = "gpio_out"; output-high; }; display_pins: display_pins { pins = "PA18", "PA2"; /* reset, DC pins, order does not matter*/ function = "gpio_out", "gpio_out"; }; }; }; fragment@1 { target = <&spi1>; __overlay__ { /* needed to avoid dtc warning */ #address-cells = <1>; #size-cells = <0>; status="okay"; pinctrl-names = "default"; cs-gpios = <&pio 0 13 0>; /* PA13 chip select */ num-chipselects = <1>; display: display@0 { pinctrl-1 = <&spi1_cs0>; /* Mux the PI to make sure they are set in spi Mode */ reg = <0>; compatible = "adafruit,yx240qv29","ilitek,ili9341"; /*compatible = "ilitek,ili9341";*/ spi-max-frequency = <40000000>; status="okay"; pinctrl-names = "default"; pinctrl-0 = <&display_pins>; rotation = <270>; /* rotate for ili9341, rotation for yx240qv29 */ bgr=<0>; fps = <15>; buswidth = <8>; height = <320>; width = <240>; dc-gpios = <&pio 0 18 0>; /* PA18 Data control pin */ reset-gpios = <&pio 0 2 1>; /* PA2 reset pin*/ debug = <4>; 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 0x1000036 0x28 0x1000011 0x1000029>; }; }; }; __overrides__ { rotate = <&display>,"rotate:0"; fps = <&display>,"fps:0"; debug = <&display>,"debug:0"; }; }; The TFT screen did not work (100% white), but at least I see more pins used in pinctrl (PA2, PA18) Spoiler roberto@orangepizerosudo cat /sys/kernel/debug/pinctrl/1c20800.pinctrl/pinmux-pinspins Pinmux settings per pin Format: pin (name): mux_owner gpio_owner hog? pin 0 (PA0): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 1 (PA1): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 2 (PA2): spi0.0 1c20800.pinctrl:2 function gpio_out group PA2 pin 3 (PA3): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 4 (PA4): 1c28000.serial (GPIO UNCLAIMED) function uart0 group PA4 pin 5 (PA5): 1c28000.serial (GPIO UNCLAIMED) function uart0 group PA5 pin 6 (PA6): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 7 (PA7): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 8 (PA8): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 9 (PA9): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 10 (PA10): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 11 (PA11): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 12 (PA12): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 13 (PA13): 1c69000.spi 1c20800.pinctrl:13 function spi1 group PA13 pin 14 (PA14): 1c69000.spi (GPIO UNCLAIMED) function spi1 group PA14 pin 15 (PA15): 1c69000.spi (GPIO UNCLAIMED) function spi1 group PA15 pin 16 (PA16): 1c69000.spi (GPIO UNCLAIMED) function spi1 group PA16 pin 17 (PA17): (MUX UNCLAIMED) 1c20800.pinctrl:17 pin 18 (PA18): spi0.0 1c20800.pinctrl:18 function gpio_out group PA18 pin 19 (PA19): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 20 (PA20): (MUX UNCLAIMED) 1c20800.pinctrl:20 pin 21 (PA21): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 64 (PC0): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 65 (PC1): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 66 (PC2): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 67 (PC3): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 68 (PC4): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 69 (PC5): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 70 (PC6): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 71 (PC7): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 72 (PC8): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 73 (PC9): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 74 (PC10): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 75 (PC11): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 76 (PC12): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 77 (PC13): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 78 (PC14): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 79 (PC15): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 80 (PC16): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 96 (PD0): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 97 (PD1): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 98 (PD2): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 99 (PD3): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 100 (PD4): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 101 (PD5): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 102 (PD6): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 103 (PD7): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 104 (PD8): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 105 (PD9): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 106 (PD10): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 107 (PD11): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 108 (PD12): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 109 (PD13): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 110 (PD14): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 111 (PD15): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 112 (PD16): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 113 (PD17): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 128 (PE0): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 129 (PE1): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 130 (PE2): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 131 (PE3): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 132 (PE4): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 133 (PE5): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 134 (PE6): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 135 (PE7): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 136 (PE8): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 137 (PE9): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 138 (PE10): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 139 (PE11): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 140 (PE12): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 141 (PE13): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 142 (PE14): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 143 (PE15): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 160 (PF0): 1c0f000.mmc (GPIO UNCLAIMED) function mmc0 group PF0 pin 161 (PF1): 1c0f000.mmc (GPIO UNCLAIMED) function mmc0 group PF1 pin 162 (PF2): 1c0f000.mmc (GPIO UNCLAIMED) function mmc0 group PF2 pin 163 (PF3): 1c0f000.mmc (GPIO UNCLAIMED) function mmc0 group PF3 pin 164 (PF4): 1c0f000.mmc (GPIO UNCLAIMED) function mmc0 group PF4 pin 165 (PF5): 1c0f000.mmc (GPIO UNCLAIMED) function mmc0 group PF5 pin 166 (PF6): (MUX UNCLAIMED) 1c20800.pinctrl:166 pin 192 (PG0): 1c10000.mmc (GPIO UNCLAIMED) function mmc1 group PG0 pin 193 (PG1): 1c10000.mmc (GPIO UNCLAIMED) function mmc1 group PG1 pin 194 (PG2): 1c10000.mmc (GPIO UNCLAIMED) function mmc1 group PG2 pin 195 (PG3): 1c10000.mmc (GPIO UNCLAIMED) function mmc1 group PG3 pin 196 (PG4): 1c10000.mmc (GPIO UNCLAIMED) function mmc1 group PG4 pin 197 (PG5): 1c10000.mmc (GPIO UNCLAIMED) function mmc1 group PG5 pin 198 (PG6): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 199 (PG7): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 200 (PG8): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 201 (PG9): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 202 (PG10): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 203 (PG11): (MUX UNCLAIMED) (GPIO UNCLAIMED) pin 204 (PG12): (MUX UNCLAIMED) 1c20800.pinctrl:204 pin 205 (PG13): (MUX UNCLAIMED) (GPIO UNCLAIMED) 0 Quote
robertoj Posted September 12 Author Posted September 12 So, I temporarily quit the effort to make ili9341.ko work, and continue with fb_ili9341.ko (Note: try changing the reset HIGH/LOW polarity, as advised in https://forums.raspberrypi.com/viewtopic.php?t=358240&start=25 ) To make this work with the orangepi zero 3, the DTS needed would be changed in the pinout, and the compatible line: Spoiler /* OrangePi Zero 3 -> ILI9341 LCD connections SPI CLOCK = PH6 SPI DO (LCD MISO) = PH8 (OPIZ MISO) SPI DI (LCD MOSI) = PH7 (OPIZ MOSI) LCD DATA/CONTROL = PC7 * LCD RESET = PC14 * could be any GPIO pin I want CHIP SELECT = PH9 VCC = 3.3V PIN 17 GND = GND PIN 20 */ /dts-v1/; /plugin/; /{ compatible = "**************"; /*what is the H618*/ fragment@0 { target = <&pio>; __overlay__{ display_pins: display_pins { pins = "PC7", "PC14"; /* reset, DC pins, order does not matter*/ function = "gpio_out", "gpio_out"; }; }; }; fragment@1 { target = <&spi1>; __overlay__ { /* needed to avoid dtc warning */ #address-cells = <1>; #size-cells = <0>; status="okay"; pinctrl-names = "default"; pinctrl-0 = <&spi1_pins>; /* Mux the PI to make sure they are set in spi Mode */ cs-gpios = <&pio 7 9 0>; /* PH9 chip select, H=7 */ num-chipselects = <1>; display: display@0 { /*compatible = "adafruit,yx240qv29","ilitek,ili9341";*/ compatible = "ilitek,ili9341"; reg = <0>; pinctrl-names = "default"; pinctrl-1 = <&display_pins>; spi-max-frequency = <40000000>; rotate = <270>; /* rotate for ili9341, rotation for yx240qv29 */ bgr=<0>; fps = <15>; buswidth = <8>; height = <320>; width = <240>; reset-gpios = <&pio 2 14 1>; /* PC14 reset pin*/ dc-gpios = <&pio 2 7 0>; /* PC7 Data control pin */ debug = <3>; 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 0x1000036 0x28 0x1000011 0x1000029>; }; }; }; __overrides__ { rotate = <&display>,"rotate:0"; fps = <&display>,"fps:0"; debug = <&display>,"debug:0"; }; }; Now I need to try this at home 0 Quote
Solution robertoj Posted October 1 Author Solution Posted October 1 For anyone interested in connecting the ili9341 to an orange pi zero, and use the adafruit DRM driver: ili9341-spi1-drm.dts Spoiler /* OrangePi Zero -> ILI9341 LCD connections SPI CLOCK = PA14 SPI DO (LCD MISO) = PA16 (OPIZ MISO) SPI DI (LCD MOSI) = PA15 (OPIZ MOSI) LCD DATA/CONTROL = PA18 LCD RESET = PA2 CHIP SELECT = PA13 VCC = 3.3V PIN GND = GND PIN */ /dts-v1/; /plugin/; /{ compatible = "allwinner,sun4i-a10", "allwinner,sun7i-a20", "allwinner,sun8i-h3", "allwinner,sun50i-a64", "allwinner,sun50i-h5"; fragment@0 { target = <&pio>; __overlay__{ display_pins: display_pins { pins = "PA18", "PA2"; /* reset, DC pins, order does not matter*/ function = "gpio_out", "gpio_out"; }; }; }; fragment@1 { target = <&spi1>; __overlay__ { /* needed to avoid dtc warning */ #address-cells = <1>; #size-cells = <0>; status="okay"; pinctrl-names = "default"; pinctrl-0 = <&spi1_pins>; /* Mux the PI to make sure they are set in spi Mode */ cs-gpios = <&pio 0 13 0>; /* PA13 chip select */ num-chipselects = <1>; display: display@0 { compatible = "adafruit,yx240qv29","ilitek,ili9341"; /*compatible = "ilitek,ili9341";*/ reg = <0>; pinctrl-names = "default"; pinctrl-1 = <&display_pins>; spi-max-frequency = <40000000>; rotation = <270>; /* rotate for ili9341, rotation for yx240qv29 */ bgr=<0>; fps = <15>; buswidth = <8>; height = <320>; width = <240>; reset-gpios = <&pio 0 2 0>; /* PA2 reset pin*/ dc-gpios = <&pio 0 18 0>; /* PA18 Data control pin */ debug = <3>; 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 0x1000036 0x28 0x1000011 0x1000029>; }; }; }; __overrides__ { rotate = <&display>,"rotate:0"; fps = <&display>,"fps:0"; debug = <&display>,"debug:0"; }; }; I made these experiments, since the LCD is the only one chip in the SPI bus. * disconnect the LCD's Chip Select -> LCD remains white * connect the LCD's Chip Select to GND -> LCD displays the login line and linux crashes soon after <- it might be my orange pi zero, which needs a heatsink 0 Quote
robertoj Posted October 4 Author Posted October 4 It turned out that my USB power cable was too long... I replaced it with the previous short one and I am back in business. I am experimenting with NOT USING CS. Good progress: In the DTS, comment out with "/*" the line cs-gpios = <&pio 0 13 0>; /* PA13 chip select */ Also, change this line num-chipselects = <1>; to <0> Previous result of: sudo cat /sys/kernel/debug/pinctrl/1c20800.pinctrl/pinmux-pins ... Spoiler pin 13 (PA13): 1c69000.spi 1c20800.pinctrl:13 function spi1 group PA13 pin 14 (PA14): 1c69000.spi (GPIO UNCLAIMED) function spi1 group PA14 pin 15 (PA15): 1c69000.spi (GPIO UNCLAIMED) function spi1 group PA15 pin 16 (PA16): 1c69000.spi (GPIO UNCLAIMED) function spi1 group PA16 New result, with NO CS configuration: ... Spoiler pin 13 (PA13): 1c69000.spi (GPIO UNCLAIMED) function spi1 group PA13 pin 14 (PA14): 1c69000.spi (GPIO UNCLAIMED) function spi1 group PA14 pin 15 (PA15): 1c69000.spi (GPIO UNCLAIMED) function spi1 group PA15 pin 16 (PA16): 1c69000.spi (GPIO UNCLAIMED) function spi1 group PA16 ... ^ with my next steps, I hope to verify that PA13 is available for other things It plays an h264 file with no hiccups mplayer -vo fbdev2:/dev/fb0 mj_remember_time.mp4 0 Quote
robertoj Posted October 8 Author Posted October 8 When the chip select is not specified, as above, the gpio pin is available for other uses I read somewhere that the ili9341 does not need the MISO wire because no information is read from the LCD ever... is this true? Some people are getting away with it https://forums.raspberrypi.com/viewtopic.php?t=370089 Also, if a wire is loose momentarily, the LCD locks up or turns "white-washed"... is there a way to reset the LCD and its KO module? 0 Quote
robertoj Posted October 12 Author Posted October 12 FOR ORANGE PI ZERO: This is the version of the LCD DTS, to use NO CS and all pins in the lower end of the connector: ili9341-spi1-opiz.dts Spoiler /* OrangePi Zero -> ILI9341 LCD connections SPI CLOCK = PA14 SPI DO (LCD MISO) = PA16 (OPIZ MISO) SPI DI (LCD MOSI) = PA15 (OPIZ MOSI) LCD DATA/CONTROL = PA3 LCD RESET = PA10 CHIP SELECT = PA13 < NOT USED ANYMORE ;) VCC = 3.3V PIN GND = GND PIN */ /dts-v1/; /plugin/; /{ compatible = "allwinner,sun4i-a10", "allwinner,sun7i-a20", "allwinner,sun8i-h3", "allwinner,sun50i-a64", "allwinner,sun50i-h5"; fragment@0 { target = <&pio>; __overlay__{ display_pins: display_pins { pins = "PA3", "PA10"; /* DC, reset pins*/ function = "gpio_out", "gpio_out"; }; }; }; fragment@1 { target = <&spi1>; __overlay__ { /* needed to avoid dtc warning */ #address-cells = <1>; #size-cells = <0>; status="okay"; pinctrl-names = "default"; pinctrl-0 = <&spi1_pins>; /* Mux the PI to make sure they are set in spi Mode */ /*cs-gpios = <&pio 0 13 0>; /* PA13 chip select */ num-chipselects = <0>; display: display@0 { compatible = "adafruit,yx240qv29","ilitek,ili9341"; /*compatible = "ilitek,ili9341";*/ reg = <0>; pinctrl-names = "default"; pinctrl-1 = <&display_pins>; spi-max-frequency = <40000000>; rotation = <270>; /* rotate for ili9341, rotation for yx240qv29 */ bgr=<0>; fps = <15>; buswidth = <8>; height = <320>; width = <240>; reset-gpios = <&pio 0 10 0>; /* PA10 reset pin*/ dc-gpios = <&pio 0 3 0>; /* PA3 Data control pin */ debug = <3>; 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 0x1000036 0x28 0x1000011 0x1000029>; }; }; }; __overrides__ { rotate = <&display>,"rotate:0"; fps = <&display>,"fps:0"; debug = <&display>,"debug:0"; }; }; To make the touch screen work, use this DTS: ads7846-opiz-spi-gpio.dts Spoiler /* Configure the GPIO to handle ADS7846 touch surface chip with the gpio-spi driver: https://www.kernel.org/doc/Documentation/devicetree/bindings/spi/spi-gpio.txt https://stackoverflow.com/questions/78905378/how-do-i-use-spi-gpio-driver-in-linux https://gist.github.com/BjoernSch/39d3bca950a3b025b806decc2b686bbc */ /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 = "PA2"; /*irq*/ function = "irq"; }; }; }; fragment@1 { target-path = "/"; __overlay__ { my_soft_spi { compatible = "spi-gpio"; /* needed to avoid dtc warning */ #address-cells = <1>; ranges; status="okay"; mosi-gpios = <&pio 0 13 0>; /*t_din= PA13*/ sck-gpios = <&pio 0 19 0>; /*t_clk= PA19*/ miso-gpios = <&pio 0 18 0>; /*t_dout=PA18*/ /*cs-gpios = <&pio 0 0 0>; /*t_cs= PA0*/ num-chipselects = <0>; ads7846: ads7846@1 { reg = <0>; /* Chip Select 0 on this separate SPI bus IS THIS NEEDED? */ compatible = "ti,ads7846"; spi-max-frequency = <1000000>; status = "okay"; pinctrl-names ="default"; pinctrl-0 = <&ads7846_pins>; interrupt-parent = <&pio>; interrupts = <0 2 2>; /* PA2 IRQ_TYPE_EDGE_FALLING */ pendown-gpio = <&pio 0 2 1>; /* PA1 */ /* driver defaults, optional*/ 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 <0xFFFF>; ti,x-plate-ohms = /bits/ 16 <400>; ti,swap-xy = <1>; }; }; //end of my_soft_spi }; }; }; Confirmed to work in orange pi zero Linux 6.6.44 Wiring schematic later... but they are defined in the code comments 0 Quote
robertoj Posted October 12 Author Posted October 12 FOR ORANGE PI ZERO 3: This is the version of the LCD DTS, to use NO CS and all pins in the lower end of the connector: ili9341-spi1-opiz3.dts Spoiler /* OrangePi Zero 3 -> ILI9341 LCD connections SPI CLOCK = PH6 SPI DO (LCD MISO) = PH8 (OPIZ MISO) SPI DI (LCD MOSI) = PH7 (OPIZ MOSI) LCD DATA/CONTROL = PC8 LCD RESET = PC10 CHIP SELECT = PH9 < NOT USED ANYMORE ;) VCC = 3.3V PIN GND = GND PIN */ /dts-v1/; /plugin/; /{ compatible = "allwinner,sun4i-a10", "allwinner,sun7i-a20", "allwinner,sun8i-h3", "allwinner,sun50i-a64", "allwinner,sun50i-h5"; fragment@0 { target = <&pio>; __overlay__{ display_pins: display_pins { pins = "PC8", "PC10"; /* DC, reset pins*/ function = "gpio_out", "gpio_out"; }; }; }; fragment@1 { target = <&spi1>; __overlay__ { /* needed to avoid dtc warning */ #address-cells = <1>; #size-cells = <0>; status="okay"; pinctrl-names = "default"; pinctrl-0 = <&spi1_pins>; /* Mux the PI to make sure they are set in spi Mode */ /*cs-gpios = <&pio 0 13 0>; /* PA13 chip select NOT USED! */ num-chipselects = <0>; display: display@0 { compatible = "adafruit,yx240qv29","ilitek,ili9341"; /*compatible = "ilitek,ili9341";*/ reg = <0>; pinctrl-names = "default"; pinctrl-1 = <&display_pins>; spi-max-frequency = <40000000>; rotation = <270>; /* rotate for ili9341, rotation for yx240qv29 */ bgr=<0>; fps = <15>; buswidth = <8>; height = <320>; width = <240>; reset-gpios = <&pio 2 10 0>; /* PC10 reset pin*/ dc-gpios = <&pio 2 8 0>; /* PC8 Data control pin */ debug = <3>; 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 0x1000036 0x28 0x1000011 0x1000029>; }; }; }; __overrides__ { rotate = <&display>,"rotate:0"; fps = <&display>,"fps:0"; debug = <&display>,"debug:0"; }; }; ^ confirmed working in Orange Pi Zero 3, Linux 6.6.31, with drivers included in Armbian 24.8.0-trunk.21 bookworm v My current ATTEMPT to make the touch screen work: ads7846-opiz3-spi-gpio.dts Spoiler /* Configure the GPIO to handle ADS7846 touch surface chip with the gpio-spi driver: https://www.kernel.org/doc/Documentation/devicetree/bindings/spi/spi-gpio.txt https://stackoverflow.com/questions/78905378/how-do-i-use-spi-gpio-driver-in-linux https://gist.github.com/BjoernSch/39d3bca950a3b025b806decc2b686bbc */ /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 = "PC7"; /*irq*/ function = "irq"; }; }; }; fragment@1 { target-path = "/"; __overlay__ { my_soft_spi { compatible = "spi-gpio"; /* needed to avoid dtc warning */ #address-cells = <1>; ranges; status="okay"; mosi-gpios = <&pio 7 9 0>; /*t_din= PH9*/ sck-gpios = <&pio 2 15 0>; /*t_clk= PC15*/ miso-gpios = <&pio 2 14 0>; /*t_dout=PC14*/ /*cs-gpios = <&pio 0 0 0>; /*t_cs= PA0*/ num-chipselects = <0>; ads7846: ads7846@1 { reg = <0>; /* Chip Select 0 on this separate SPI bus IS THIS NEEDED? */ compatible = "ti,ads7846"; spi-max-frequency = <1000000>; status = "okay"; pinctrl-names ="default"; pinctrl-0 = <&ads7846_pins>; interrupt-parent = <&pio>; interrupts = <2 7 2>; /* PC7 IRQ_TYPE_EDGE_FALLING */ pendown-gpio = <&pio 2 7 1>; /* PC7 */ /* driver defaults, optional*/ 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 <0xFFFF>; ti,x-plate-ohms = /bits/ 16 <400>; ti,swap-xy = <1>; }; }; //end of my_soft_spi }; }; }; It is not working... the errors may be visible here: Spoiler roberto@orangepizero3:~/ads7846$ sudo cat /sys/kernel/debug/gpio [sudo] password for roberto: gpiochip0: GPIOs 0-287, parent: platform/300b000.pinctrl, 300b000.pinctrl: gpio-72 ( |dc ) out hi gpio-74 ( |reset ) out hi gpio-76 ( |red:status ) out hi gpio-77 ( |green:power ) out hi gpio-78 ( |miso ) in lo gpio-79 ( |sck ) out lo gpio-80 ( |regulator-usb1-vbus ) out hi gpio-166 ( |cd ) in lo ACTIVE LOW gpio-210 ( |reset ) out hi ACTIVE LOW gpio-233 ( |mosi ) out lo gpiochip1: GPIOs 352-383, parent: platform/7022000.pinctrl, 7022000.pinctrl: roberto@orangepizero3:~/ads7846$ dmesg|grep spi [ 1.327593] sun50i-h616-pinctrl 300b000.pinctrl: pin-64 (5010000.spi) status -517 [ 1.327612] sun6i-spi 5010000.spi: Error applying setting, reverse things back [ 1.327862] sun50i-h616-pinctrl 300b000.pinctrl: pin-230 (5011000.spi) status -517 [ 1.327879] sun6i-spi 5011000.spi: Error applying setting, reverse things back [ 1.337959] spi-nor spi0.0: supply vdd not found, using dummy regulator [ 1.353233] spi-nor spi0.0: spi-nor-generic (16384 Kbytes) [ 5.331551] SPI driver ads7846 has no spi_device_id for ti,tsc2046 [ 5.331571] SPI driver ads7846 has no spi_device_id for ti,ads7843 [ 5.331575] SPI driver ads7846 has no spi_device_id for ti,ads7845 [ 5.331579] SPI driver ads7846 has no spi_device_id for ti,ads7873 [ 5.331822] sun50i-h616-pinctrl 300b000.pinctrl: pin PC7 already requested by spi2.0; cannot claim for 300b000.pinctrl:71 [ 5.331841] ads7846 spi2.0: failed to request pendown GPIO [ 5.331847] ads7846: probe of spi2.0 failed with error -22 [ 5.542231] panel-ilitek-ili9341 spi1.0: get optional vcc failed [ 5.545269] [drm] Initialized ili9341 1.0.0 20210716 for spi1.0 on minor 2 [ 5.995348] panel-ilitek-ili9341 spi1.0: [drm] Initialized display serial interface [ 6.031125] panel-ilitek-ili9341 spi1.0: [drm] fb0: ili9341drmfb frame buffer device roberto@orangepizero3:~/ads7846$ dmesg|grep ads [ 5.331551] SPI driver ads7846 has no spi_device_id for ti,tsc2046 [ 5.331571] SPI driver ads7846 has no spi_device_id for ti,ads7843 [ 5.331575] SPI driver ads7846 has no spi_device_id for ti,ads7845 [ 5.331579] SPI driver ads7846 has no spi_device_id for ti,ads7873 [ 5.331841] ads7846 spi2.0: failed to request pendown GPIO [ 5.331847] ads7846: probe of spi2.0 failed with error -22 More tests: Spoiler roberto@orangepizero3:~/ads7846$ sudo cat /sys/kernel/debug/pinctrl/300b000.pinctrl/pinmux-pins Pinmux settings per pin Format: pin (name): mux_owner|gpio_owner (strict) hog? pin 0 (PA0): UNCLAIMED pin 1 (PA1): UNCLAIMED pin 2 (PA2): UNCLAIMED pin 3 (PA3): UNCLAIMED pin 4 (PA4): UNCLAIMED pin 5 (PA5): UNCLAIMED pin 6 (PA6): UNCLAIMED pin 7 (PA7): UNCLAIMED pin 8 (PA8): UNCLAIMED pin 9 (PA9): UNCLAIMED pin 10 (PA10): UNCLAIMED pin 11 (PA11): UNCLAIMED pin 12 (PA12): UNCLAIMED pin 64 (PC0): device 5010000.spi function spi0 group PC0 pin 65 (PC1): UNCLAIMED pin 66 (PC2): device 5010000.spi function spi0 group PC2 pin 67 (PC3): device 5010000.spi function spi0 group PC3 pin 68 (PC4): device 5010000.spi function spi0 group PC4 pin 69 (PC5): UNCLAIMED pin 70 (PC6): UNCLAIMED pin 71 (PC7): UNCLAIMED pin 72 (PC8): GPIO 300b000.pinctrl:72 pin 73 (PC9): UNCLAIMED pin 74 (PC10): GPIO 300b000.pinctrl:74 pin 75 (PC11): UNCLAIMED pin 76 (PC12): GPIO 300b000.pinctrl:76 pin 77 (PC13): GPIO 300b000.pinctrl:77 pin 78 (PC14): GPIO 300b000.pinctrl:78 pin 79 (PC15): GPIO 300b000.pinctrl:79 pin 80 (PC16): GPIO 300b000.pinctrl:80 pin 160 (PF0): device 4020000.mmc function mmc0 group PF0 pin 161 (PF1): device 4020000.mmc function mmc0 group PF1 pin 162 (PF2): device 4020000.mmc function mmc0 group PF2 pin 163 (PF3): device 4020000.mmc function mmc0 group PF3 pin 164 (PF4): device 4020000.mmc function mmc0 group PF4 pin 165 (PF5): device 4020000.mmc function mmc0 group PF5 pin 166 (PF6): GPIO 300b000.pinctrl:166 pin 192 (PG0): device 4021000.mmc function mmc1 group PG0 pin 193 (PG1): device 4021000.mmc function mmc1 group PG1 pin 194 (PG2): device 4021000.mmc function mmc1 group PG2 pin 195 (PG3): device 4021000.mmc function mmc1 group PG3 pin 196 (PG4): device 4021000.mmc function mmc1 group PG4 pin 197 (PG5): device 4021000.mmc function mmc1 group PG5 pin 198 (PG6): UNCLAIMED pin 199 (PG7): UNCLAIMED pin 200 (PG8): UNCLAIMED pin 201 (PG9): UNCLAIMED pin 202 (PG10): UNCLAIMED pin 203 (PG11): UNCLAIMED pin 204 (PG12): UNCLAIMED pin 205 (PG13): UNCLAIMED pin 206 (PG14): UNCLAIMED pin 207 (PG15): UNCLAIMED pin 208 (PG16): UNCLAIMED pin 209 (PG17): UNCLAIMED pin 210 (PG18): GPIO 300b000.pinctrl:210 pin 211 (PG19): UNCLAIMED pin 224 (PH0): device 5000000.serial function uart0 group PH0 pin 225 (PH1): device 5000000.serial function uart0 group PH1 pin 226 (PH2): UNCLAIMED pin 227 (PH3): UNCLAIMED pin 228 (PH4): UNCLAIMED pin 229 (PH5): UNCLAIMED pin 230 (PH6): device 5011000.spi function spi1 group PH6 pin 231 (PH7): device 5011000.spi function spi1 group PH7 pin 232 (PH8): device 5011000.spi function spi1 group PH8 pin 233 (PH9): GPIO 300b000.pinctrl:233 pin 234 (PH10): UNCLAIMED pin 256 (PI0): device 5020000.ethernet function emac0 group PI0 pin 257 (PI1): device 5020000.ethernet function emac0 group PI1 pin 258 (PI2): device 5020000.ethernet function emac0 group PI2 pin 259 (PI3): device 5020000.ethernet function emac0 group PI3 pin 260 (PI4): device 5020000.ethernet function emac0 group PI4 pin 261 (PI5): device 5020000.ethernet function emac0 group PI5 pin 262 (PI6): UNCLAIMED pin 263 (PI7): device 5020000.ethernet function emac0 group PI7 pin 264 (PI8): device 5020000.ethernet function emac0 group PI8 pin 265 (PI9): device 5020000.ethernet function emac0 group PI9 pin 266 (PI10): device 5020000.ethernet function emac0 group PI10 pin 267 (PI11): device 5020000.ethernet function emac0 group PI11 pin 268 (PI12): device 5020000.ethernet function emac0 group PI12 pin 269 (PI13): device 5020000.ethernet function emac0 group PI13 pin 270 (PI14): device 5020000.ethernet function emac0 group PI14 pin 271 (PI15): device 5020000.ethernet function emac0 group PI15 pin 272 (PI16): device 5020000.ethernet function emac0 group PI16 roberto@orangepizero3:~/ads7846$ sudo cat /sys/kernel/debug/pinctrl/7022000.pinctrl/pinmux-pins Pinmux settings per pin Format: pin (name): mux_owner|gpio_owner (strict) hog? pin 352 (PL0): UNCLAIMED pin 353 (PL1): UNCLAIMED roberto@orangepizero3:~/ads7846$ sudo cat /sys/kernel/debug/pinctrl/pinctrl-devices name [pinmux] [pinconf] 300b000.pinctrl yes yes 7022000.pinctrl yes yes roberto@orangepizero3:~/ads7846$ sudo cat /sys/kernel/debug/pinctrl/pinctrl-handles Requested pin control handlers their pinmux maps: device: 5000000.serial current state: default state: default type: MUX_GROUP controller 300b000.pinctrl group: PH0 (57) function: uart0 (11) type: MUX_GROUP controller 300b000.pinctrl group: PH1 (58) function: uart0 (11) device: 5010000.spi current state: default state: default type: MUX_GROUP controller 300b000.pinctrl group: PC0 (13) function: spi0 (7) type: MUX_GROUP controller 300b000.pinctrl group: PC2 (15) function: spi0 (7) type: MUX_GROUP controller 300b000.pinctrl group: PC4 (17) function: spi0 (7) type: MUX_GROUP controller 300b000.pinctrl group: PC3 (16) function: spi0 (7) device: 5011000.spi current state: default state: default type: MUX_GROUP controller 300b000.pinctrl group: PH6 (63) function: spi1 (27) type: MUX_GROUP controller 300b000.pinctrl group: PH7 (64) function: spi1 (27) type: MUX_GROUP controller 300b000.pinctrl group: PH8 (65) function: spi1 (27) device: 4020000.mmc current state: default state: default type: MUX_GROUP controller 300b000.pinctrl group: PF0 (30) function: mmc0 (9) type: CONFIGS_GROUP controller 300b000.pinctrl group PF0 (30)config 00001e09 config 00000105 type: MUX_GROUP controller 300b000.pinctrl group: PF1 (31) function: mmc0 (9) type: CONFIGS_GROUP controller 300b000.pinctrl group PF1 (31)config 00001e09 config 00000105 type: MUX_GROUP controller 300b000.pinctrl group: PF2 (32) function: mmc0 (9) type: CONFIGS_GROUP controller 300b000.pinctrl group PF2 (32)config 00001e09 config 00000105 type: MUX_GROUP controller 300b000.pinctrl group: PF3 (33) function: mmc0 (9) type: CONFIGS_GROUP controller 300b000.pinctrl group PF3 (33)config 00001e09 config 00000105 type: MUX_GROUP controller 300b000.pinctrl group: PF4 (34) function: mmc0 (9) type: CONFIGS_GROUP controller 300b000.pinctrl group PF4 (34)config 00001e09 config 00000105 type: MUX_GROUP controller 300b000.pinctrl group: PF5 (35) function: mmc0 (9) type: CONFIGS_GROUP controller 300b000.pinctrl group PF5 (35)config 00001e09 config 00000105 device: 4021000.mmc current state: default state: default type: MUX_GROUP controller 300b000.pinctrl group: PG0 (37) function: mmc1 (12) type: CONFIGS_GROUP controller 300b000.pinctrl group PG0 (37)config 00001e09 config 00000105 type: MUX_GROUP controller 300b000.pinctrl group: PG1 (38) function: mmc1 (12) type: CONFIGS_GROUP controller 300b000.pinctrl group PG1 (38)config 00001e09 config 00000105 type: MUX_GROUP controller 300b000.pinctrl group: PG2 (39) function: mmc1 (12) type: CONFIGS_GROUP controller 300b000.pinctrl group PG2 (39)config 00001e09 config 00000105 type: MUX_GROUP controller 300b000.pinctrl group: PG3 (40) function: mmc1 (12) type: CONFIGS_GROUP controller 300b000.pinctrl group PG3 (40)config 00001e09 config 00000105 type: MUX_GROUP controller 300b000.pinctrl group: PG4 (41) function: mmc1 (12) type: CONFIGS_GROUP controller 300b000.pinctrl group PG4 (41)config 00001e09 config 00000105 type: MUX_GROUP controller 300b000.pinctrl group: PG5 (42) function: mmc1 (12) type: CONFIGS_GROUP controller 300b000.pinctrl group PG5 (42)config 00001e09 config 00000105 device: 5020000.ethernet current state: default state: default type: MUX_GROUP controller 300b000.pinctrl group: PI0 (68) function: emac0 (33) type: CONFIGS_GROUP controller 300b000.pinctrl group PI0 (68)config 00002809 type: MUX_GROUP controller 300b000.pinctrl group: PI1 (69) function: emac0 (33) type: CONFIGS_GROUP controller 300b000.pinctrl group PI1 (69)config 00002809 type: MUX_GROUP controller 300b000.pinctrl group: PI2 (70) function: emac0 (33) type: CONFIGS_GROUP controller 300b000.pinctrl group PI2 (70)config 00002809 type: MUX_GROUP controller 300b000.pinctrl group: PI3 (71) function: emac0 (33) type: CONFIGS_GROUP controller 300b000.pinctrl group PI3 (71)config 00002809 type: MUX_GROUP controller 300b000.pinctrl group: PI4 (72) function: emac0 (33) type: CONFIGS_GROUP controller 300b000.pinctrl group PI4 (72)config 00002809 type: MUX_GROUP controller 300b000.pinctrl group: PI5 (73) function: emac0 (33) type: CONFIGS_GROUP controller 300b000.pinctrl group PI5 (73)config 00002809 type: MUX_GROUP controller 300b000.pinctrl group: PI7 (75) function: emac0 (33) type: CONFIGS_GROUP controller 300b000.pinctrl group PI7 (75)config 00002809 type: MUX_GROUP controller 300b000.pinctrl group: PI8 (76) function: emac0 (33) type: CONFIGS_GROUP controller 300b000.pinctrl group PI8 (76)config 00002809 type: MUX_GROUP controller 300b000.pinctrl group: PI9 (77) function: emac0 (33) type: CONFIGS_GROUP controller 300b000.pinctrl group PI9 (77)config 00002809 type: MUX_GROUP controller 300b000.pinctrl group: PI10 (78) function: emac0 (33) type: CONFIGS_GROUP controller 300b000.pinctrl group PI10 (78)config 00002809 type: MUX_GROUP controller 300b000.pinctrl group: PI11 (79) function: emac0 (33) type: CONFIGS_GROUP controller 300b000.pinctrl group PI11 (79)config 00002809 type: MUX_GROUP controller 300b000.pinctrl group: PI12 (80) function: emac0 (33) type: CONFIGS_GROUP controller 300b000.pinctrl group PI12 (80)config 00002809 type: MUX_GROUP controller 300b000.pinctrl group: PI13 (81) function: emac0 (33) type: CONFIGS_GROUP controller 300b000.pinctrl group PI13 (81)config 00002809 type: MUX_GROUP controller 300b000.pinctrl group: PI14 (82) function: emac0 (33) type: CONFIGS_GROUP controller 300b000.pinctrl group PI14 (82)config 00002809 type: MUX_GROUP controller 300b000.pinctrl group: PI15 (83) function: emac0 (33) type: CONFIGS_GROUP controller 300b000.pinctrl group PI15 (83)config 00002809 type: MUX_GROUP controller 300b000.pinctrl group: PI16 (84) function: emac0 (33) type: CONFIGS_GROUP controller 300b000.pinctrl group PI16 (84)config 00002809 roberto@orangepizero3:~/ads7846$ sudo cat /sys/kernel/debug/pinctrl/pinctrl-maps Pinctrl maps: device 5000000.serial state default type MUX_GROUP (2) controlling device 300b000.pinctrl group PH0 function uart0 device 5000000.serial state default type MUX_GROUP (2) controlling device 300b000.pinctrl group PH1 function uart0 device 5010000.spi state default type MUX_GROUP (2) controlling device 300b000.pinctrl group PC0 function spi0 device 5010000.spi state default type MUX_GROUP (2) controlling device 300b000.pinctrl group PC2 function spi0 device 5010000.spi state default type MUX_GROUP (2) controlling device 300b000.pinctrl group PC4 function spi0 device 5010000.spi state default type MUX_GROUP (2) controlling device 300b000.pinctrl group PC3 function spi0 device 5011000.spi state default type MUX_GROUP (2) controlling device 300b000.pinctrl group PH6 function spi1 device 5011000.spi state default type MUX_GROUP (2) controlling device 300b000.pinctrl group PH7 function spi1 device 5011000.spi state default type MUX_GROUP (2) controlling device 300b000.pinctrl group PH8 function spi1 device 4020000.mmc state default type MUX_GROUP (2) controlling device 300b000.pinctrl group PF0 function mmc0 device 4020000.mmc state default type CONFIGS_GROUP (4) controlling device 300b000.pinctrl group PF0 config 00001e09 config 00000105 device 4020000.mmc state default type MUX_GROUP (2) controlling device 300b000.pinctrl group PF1 function mmc0 device 4020000.mmc state default type CONFIGS_GROUP (4) controlling device 300b000.pinctrl group PF1 config 00001e09 config 00000105 device 4020000.mmc state default type MUX_GROUP (2) controlling device 300b000.pinctrl group PF2 function mmc0 device 4020000.mmc state default type CONFIGS_GROUP (4) controlling device 300b000.pinctrl group PF2 config 00001e09 config 00000105 device 4020000.mmc state default type MUX_GROUP (2) controlling device 300b000.pinctrl group PF3 function mmc0 device 4020000.mmc state default type CONFIGS_GROUP (4) controlling device 300b000.pinctrl group PF3 config 00001e09 config 00000105 device 4020000.mmc state default type MUX_GROUP (2) controlling device 300b000.pinctrl group PF4 function mmc0 device 4020000.mmc state default type CONFIGS_GROUP (4) controlling device 300b000.pinctrl group PF4 config 00001e09 config 00000105 device 4020000.mmc state default type MUX_GROUP (2) controlling device 300b000.pinctrl group PF5 function mmc0 device 4020000.mmc state default type CONFIGS_GROUP (4) controlling device 300b000.pinctrl group PF5 config 00001e09 config 00000105 device 4021000.mmc state default type MUX_GROUP (2) controlling device 300b000.pinctrl group PG0 function mmc1 device 4021000.mmc state default type CONFIGS_GROUP (4) controlling device 300b000.pinctrl group PG0 config 00001e09 config 00000105 device 4021000.mmc state default type MUX_GROUP (2) controlling device 300b000.pinctrl group PG1 function mmc1 device 4021000.mmc state default type CONFIGS_GROUP (4) controlling device 300b000.pinctrl group PG1 config 00001e09 config 00000105 device 4021000.mmc state default type MUX_GROUP (2) controlling device 300b000.pinctrl group PG2 function mmc1 device 4021000.mmc state default type CONFIGS_GROUP (4) controlling device 300b000.pinctrl group PG2 config 00001e09 config 00000105 device 4021000.mmc state default type MUX_GROUP (2) controlling device 300b000.pinctrl group PG3 function mmc1 device 4021000.mmc state default type CONFIGS_GROUP (4) controlling device 300b000.pinctrl group PG3 config 00001e09 config 00000105 device 4021000.mmc state default type MUX_GROUP (2) controlling device 300b000.pinctrl group PG4 function mmc1 device 4021000.mmc state default type CONFIGS_GROUP (4) controlling device 300b000.pinctrl group PG4 config 00001e09 config 00000105 device 4021000.mmc state default type MUX_GROUP (2) controlling device 300b000.pinctrl group PG5 function mmc1 device 4021000.mmc state default type CONFIGS_GROUP (4) controlling device 300b000.pinctrl group PG5 config 00001e09 config 00000105 device 5020000.ethernet state default type MUX_GROUP (2) controlling device 300b000.pinctrl group PI0 function emac0 device 5020000.ethernet state default type CONFIGS_GROUP (4) controlling device 300b000.pinctrl group PI0 config 00002809 device 5020000.ethernet state default type MUX_GROUP (2) controlling device 300b000.pinctrl group PI1 function emac0 device 5020000.ethernet state default type CONFIGS_GROUP (4) controlling device 300b000.pinctrl group PI1 config 00002809 device 5020000.ethernet state default type MUX_GROUP (2) controlling device 300b000.pinctrl group PI2 function emac0 device 5020000.ethernet state default type CONFIGS_GROUP (4) controlling device 300b000.pinctrl group PI2 config 00002809 device 5020000.ethernet state default type MUX_GROUP (2) controlling device 300b000.pinctrl group PI3 function emac0 device 5020000.ethernet state default type CONFIGS_GROUP (4) controlling device 300b000.pinctrl group PI3 config 00002809 device 5020000.ethernet state default type MUX_GROUP (2) controlling device 300b000.pinctrl group PI4 function emac0 device 5020000.ethernet state default type CONFIGS_GROUP (4) controlling device 300b000.pinctrl group PI4 config 00002809 device 5020000.ethernet state default type MUX_GROUP (2) controlling device 300b000.pinctrl group PI5 function emac0 device 5020000.ethernet state default type CONFIGS_GROUP (4) controlling device 300b000.pinctrl group PI5 config 00002809 device 5020000.ethernet state default type MUX_GROUP (2) controlling device 300b000.pinctrl group PI7 function emac0 device 5020000.ethernet state default type CONFIGS_GROUP (4) controlling device 300b000.pinctrl group PI7 config 00002809 device 5020000.ethernet state default type MUX_GROUP (2) controlling device 300b000.pinctrl group PI8 function emac0 device 5020000.ethernet state default type CONFIGS_GROUP (4) controlling device 300b000.pinctrl group PI8 config 00002809 device 5020000.ethernet state default type MUX_GROUP (2) controlling device 300b000.pinctrl group PI9 function emac0 device 5020000.ethernet state default type CONFIGS_GROUP (4) controlling device 300b000.pinctrl group PI9 config 00002809 device 5020000.ethernet state default type MUX_GROUP (2) controlling device 300b000.pinctrl group PI10 function emac0 device 5020000.ethernet state default type CONFIGS_GROUP (4) controlling device 300b000.pinctrl group PI10 config 00002809 device 5020000.ethernet state default type MUX_GROUP (2) controlling device 300b000.pinctrl group PI11 function emac0 device 5020000.ethernet state default type CONFIGS_GROUP (4) controlling device 300b000.pinctrl group PI11 config 00002809 device 5020000.ethernet state default type MUX_GROUP (2) controlling device 300b000.pinctrl group PI12 function emac0 device 5020000.ethernet state default type CONFIGS_GROUP (4) controlling device 300b000.pinctrl group PI12 config 00002809 device 5020000.ethernet state default type MUX_GROUP (2) controlling device 300b000.pinctrl group PI13 function emac0 device 5020000.ethernet state default type CONFIGS_GROUP (4) controlling device 300b000.pinctrl group PI13 config 00002809 device 5020000.ethernet state default type MUX_GROUP (2) controlling device 300b000.pinctrl group PI14 function emac0 device 5020000.ethernet state default type CONFIGS_GROUP (4) controlling device 300b000.pinctrl group PI14 config 00002809 device 5020000.ethernet state default type MUX_GROUP (2) controlling device 300b000.pinctrl group PI15 function emac0 device 5020000.ethernet state default type CONFIGS_GROUP (4) controlling device 300b000.pinctrl group PI15 config 00002809 device 5020000.ethernet state default type MUX_GROUP (2) controlling device 300b000.pinctrl group PI16 function emac0 device 5020000.ethernet state default type CONFIGS_GROUP (4) controlling device 300b000.pinctrl group PI16 config 00002809 It looks like PC7 is not available for IRQ GPIO due to SPI2... That was unexpected... I will try other pins Does the opiz3 even have a SPI2??? 1 Quote
ag123 Posted October 12 Posted October 12 What do you use to run the ILI9341 LCD? FBTFT? https://github.com/notro/fbtft 0 Quote
robertoj Posted October 12 Author Posted October 12 This is an example from someone who used a single SPI, with chip selects for LCD and touch (as it is usually done)... for the zero2W (may need slight modification for opiz3) https://github.com/dev-null2019/orangepizero2w35tft/blob/main/joyit35a-overlay.dts 0 Quote
robertoj Posted October 12 Author Posted October 12 6 minutes ago, ag123 said: What do you use to run the ILI9341 LCD? FBTFT? https://github.com/notro/fbtft I use the Linux official DRM enabled kernel module for ili9341... everybody has this KO... look for it in: roberto@orangepizero3:~/ads7846$ lsmod|grep ili ili9341 12288 0 panel_ilitek_ili9341 16384 0 drm_mipi_dbi 24576 2 ili9341,panel_ilitek_ili9341 roberto@orangepizero3:~/ads7846$ ls /lib/modules/6.6.31-current-sunxi64/kernel/drivers/gpu/drm/tiny/ gm12u320.ko ili9163.ko ili9341.ko mi0283qt.ko repaper.ko st7586.ko hx8357d.ko ili9225.ko ili9486.ko panel-mipi-dbi.ko simpledrm.ko st7735r.ko 0 Quote
ag123 Posted October 12 Posted October 12 @robertoj Thanks I stumbled into this in a google search looks like quite a feasible and interesting 'project' to try. 0 Quote
robertoj Posted October 12 Author Posted October 12 Thank you ag123 Continuing my effort to make ads7846 work with spi-gpio... When I change the GPIO pin from PC7 to PC11 (three places in my DTS), I get the same error: Spoiler roberto@orangepizero3:~$ dmesg|grep spi [ 1.327582] sun50i-h616-pinctrl 300b000.pinctrl: pin-64 (5010000.spi) status -517 [ 1.327600] sun6i-spi 5010000.spi: Error applying setting, reverse things back [ 1.327843] sun50i-h616-pinctrl 300b000.pinctrl: pin-230 (5011000.spi) status -517 [ 1.327860] sun6i-spi 5011000.spi: Error applying setting, reverse things back [ 1.337684] spi-nor spi0.0: supply vdd not found, using dummy regulator [ 1.353257] spi-nor spi0.0: spi-nor-generic (16384 Kbytes) [ 5.458707] SPI driver ads7846 has no spi_device_id for ti,tsc2046 [ 5.458733] SPI driver ads7846 has no spi_device_id for ti,ads7843 [ 5.458737] SPI driver ads7846 has no spi_device_id for ti,ads7845 [ 5.458741] SPI driver ads7846 has no spi_device_id for ti,ads7873 [ 5.459015] sun50i-h616-pinctrl 300b000.pinctrl: pin PC11 already requested by spi2.0; cannot claim for 300b000.pinctrl:75 [ 5.459034] ads7846 spi2.0: failed to request pendown GPIO [ 5.459039] ads7846: probe of spi2.0 failed with error -22 [ 5.689067] panel-ilitek-ili9341 spi1.0: get optional vcc failed [ 5.690031] [drm] Initialized ili9341 1.0.0 20210716 for spi1.0 on minor 2 [ 6.139086] panel-ilitek-ili9341 spi1.0: [drm] Initialized display serial interface [ 6.174818] panel-ilitek-ili9341 spi1.0: [drm] fb0: ili9341drmfb frame buffer device roberto@orangepizero3:~/ads7846$ cat ads7846-opiz3-spi-gpio-otherirq.dts /* Configure the GPIO to handle ADS7846 touch surface chip with the gpio-spi driver: https://www.kernel.org/doc/Documentation/devicetree/bindings/spi/spi-gpio.txt https://stackoverflow.com/questions/78905378/how-do-i-use-spi-gpio-driver-in-linux https://gist.github.com/BjoernSch/39d3bca950a3b025b806decc2b686bbc */ /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 = "PC11"; /*irq was PC7*/ function = "irq"; }; }; }; fragment@1 { target-path = "/"; __overlay__ { my_soft_spi { compatible = "spi-gpio"; /* needed to avoid dtc warning */ #address-cells = <1>; ranges; status="okay"; mosi-gpios = <&pio 7 9 0>; /*t_din= PH9*/ sck-gpios = <&pio 2 15 0>; /*t_clk= PC15*/ miso-gpios = <&pio 2 14 0>; /*t_dout=PC14*/ /*cs-gpios = <&pio 0 0 0>; /*t_cs= PA0*/ num-chipselects = <0>; ads7846: ads7846@1 { reg = <0>; /* Chip Select 0 on this separate SPI bus IS THIS NEEDED? */ compatible = "ti,ads7846"; spi-max-frequency = <1000000>; status = "okay"; pinctrl-names ="default"; pinctrl-0 = <&ads7846_pins>; interrupt-parent = <&pio>; interrupts = <2 11 2>; /* PC7 IRQ_TYPE_EDGE_FALLING */ pendown-gpio = <&pio 2 11 1>; /* PC7 */ /* driver defaults, optional*/ 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 <0xFFFF>; ti,x-plate-ohms = /bits/ 16 <400>; ti,swap-xy = <1>; }; }; //end of my_soft_spi }; }; }; roberto@orangepizero3:~/ads7846$ cat /boot/armbianEnv.txt verbosity=1 bootlogo=false console=both disp_mode=1920x1080p60 overlay_prefix=sun50i-h616 rootdev=UUID=a11792ff-b0ec-44a8-b544-22c976b54151 rootfstype=ext4 user_overlays=ili9341-spi1-opiz3 ads7846-opiz3-spi-gpio-otherirq usbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u Is my DTS wrong? 0 Quote
robertoj Posted October 13 Author Posted October 13 OK. I solved the issue of sun50i-h616-pinctrl 300b000.pinctrl: pin PC7 already requested by spi2.0; cannot claim for 300b000.pinctrl:71 by deleting the fragment, which pre-defines the IRQ. See the DTS for touch chip: Spoiler /* Configure the GPIO to handle ADS7846 touch surface chip with the gpio-spi driver: https://www.kernel.org/doc/Documentation/devicetree/bindings/spi/spi-gpio.txt https://stackoverflow.com/questions/78905378/how-do-i-use-spi-gpio-driver-in-linux https://gist.github.com/BjoernSch/39d3bca950a3b025b806decc2b686bbc https://github.com/dev-null2019/orangepizero2w35tft/blob/main/joyit35a-overlay.dts < example of DTS without pre-definition of GPIO-IRQ */ /dts-v1/; /plugin/; / { compatible = "allwinner,sun50i-h616"; fragment@0 { target-path = "/"; __overlay__ { my_soft_spi { compatible = "spi-gpio"; /* needed to avoid dtc warning */ #address-cells = <1>; ranges; status="okay"; mosi-gpios = <&pio 7 9 0>; /*t_din= PH9*/ sck-gpios = <&pio 2 15 0>; /*t_clk= PC15*/ miso-gpios = <&pio 2 14 0>; /*t_dout=PC14*/ /*cs-gpios = <&pio 0 0 0>; /*t_cs= PA0*/ num-chipselects = <0>; ads7846: ads7846@1 { reg = <0>; /* Chip Select 0 on this separate SPI bus IS THIS NEEDED? */ compatible = "ti,ads7846"; spi-max-frequency = <1000000>; status = "okay"; /*pinctrl-names ="default"; pinctrl-0 = <&ads7846_pins>;*/ interrupt-parent = <&pio>; interrupts = <2 7 2>; /* PC7 IRQ_TYPE_EDGE_FALLING */ pendown-gpio = <&pio 2 7 1>; /* PC7 */ /* driver defaults, optional*/ 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 <0xFFFF>; ti,x-plate-ohms = /bits/ 16 <400>; ti,swap-xy = <1>; }; }; //end of my_soft_spi }; }; }; I see these successful messages Spoiler $ dmesg|grep spi ... [ 5.259818] ads7846 spi2.0: supply vcc not found, using dummy regulator [ 5.265779] ads7846 spi2.0: touchscreen, irq 68 [ 5.266223] input: ADS7846 Touchscreen as /devices/platform/my_soft_spi/spi_master/spi2/spi2.0/input/input0 $ dmesg|grep ads [ 5.259542] SPI driver ads7846 has no spi_device_id for ti,tsc2046 [ 5.259566] SPI driver ads7846 has no spi_device_id for ti,ads7843 [ 5.259570] SPI driver ads7846 has no spi_device_id for ti,ads7845 [ 5.259574] SPI driver ads7846 has no spi_device_id for ti,ads7873 [ 5.259818] ads7846 spi2.0: supply vcc not found, using dummy regulator [ 5.265779] ads7846 spi2.0: touchscreen, irq 68 $ dmesg|grep ADS [ 5.266223] input: ADS7846 Touchscreen as /devices/platform/my_soft_spi/spi_master/spi2/spi2.0/input/input0 $ sudo evtest No device specified, trying to scan all of /dev/input/event* Available devices: /dev/input/event0: ADS7846 Touchscreen Select the device event number [0-0]: The same solution might work for those who want to use native SPI with chip selects, and get the error message I mentioned above 1 Quote
robertoj Posted October 17 Author Posted October 17 I either have something miswired, or the hardware doesn't like the spi-gpio, but I have constant problems switching into X11. I want to try the most commonly method: one SPI bus, 2 chip selects, as shown in this example: https://github.com/dev-null2019/orangepizero2w35tft/blob/main/joyit35a-overlay.dts But modifying it from opiz2w to opiz3. The DTS by dev-null2019 has this connection wiring list: cs0=ph5 pin 24 (user defined,lcd) cs1=ph9 pin 26 (_____,touch) res=pi6 dc=ph4 irq=ph2 mosi=ph7 (native) miso=ph8 (native) clk=ph6 (native) 3v3=native 0v=native It looks weird to me that in line 9 of the DTS, only the CS0 is specified, but not CS1... is that normal? Is everyone feeeding the LCD with 3.3V or 5V? (I was using 3.3V because that works great in my orange pi zero) Has anyone had success with the backlight gpio parameter? Is it ok to use 5V instead of 3.3v? This would be the modified wiring list, for opiz3: cs0=ph5 pin 24 (user defined,lcd, next to 5V) cs1=ph9 pin 26 (native,touch) res=pc14 dc=pc7 irq=pc10 mosi=ph7 (native, both touch and lcd) miso=ph8 (native, touch only) clk=ph6 (native, both touch and lcd) led=3v3 (native) 5v=pin 5 (native, use next pin ph5 for cs0) 0v=native 11 wires, 2 with Y splitter in physical pin order: 3=cs0 4=5v 17=3v3 18=res < 3v3 for LED 19=mosi 20=gnd < mosi with Y 21=miso 22=dc 23=clk 24=cs1 < clk with Y 26=irq Spoiler in physical pin order: 3=cs0 4=5v 17=3v3 18=res < 3v3 for LED 19=mosi 20=gnd < gnd with Y 21=miso 22=dc 23=clk 24=cs1 < clk with Y 26=irq LCD pin order (14 pins): *5 pin connector irq < 1-brown tmiso < 2-red tmosi < 6-blue (Y with mosi) tcs < 3-orange tclk < 5-blue (Y with clk) *4 pin connector miso (no connection) led (3v3)< 4-yellow clk < 5-green (Y with tclk) mosi < 6-blue (Y with tmosi) *5 pin connector dc < 7-purple reset < 8-gray cs < 9-white gnd < 10-black vcc (5v) < 11-brown wire color code 1=brown 2=red 3=orange 4=yellow 5=green 6=blue 7=purple 8=gray 9=white 10=black 11=brown 0 Quote
Ivano Posted October 18 Posted October 18 Hello there. First time posting on this forum so I apologize in advance if there is any issue with my post. I have been learning and using Armbian for some time on an Orange Pi Zero 2W intended for Klipper with an ili9341 as a screen for KlipperScreen. In order to have the display and touch working with the CS0 and CS1 pins, I used the dts provided below. I am not very knowledgeable about the structure required in dts files, so I tried to keep all the values the same from the examples that I found online on this forum and Github and only modified what I required or what seemed to work for my case. Pins were assigned in the following way: CS0 = Connected to CS from display CS1 = Connected to T_CS from touch IRQ = PI5 Reset = PI6 DC = PH4 LED = PI14 (PWM) These were connected to the same pins in display and touch MOSI = PH7 | Connected to SDI (MOSI) and T_DIN MISO = PH8 | Connected to SDO (MISO) and T_DO SCL = PH6 | Connected to SCK and T_CLK Backlight is controlled by pin PI14 which is assigned to pwm4 in fragment@0 since pwm4 is assigned to PH1 by default on the Orange Pi Zero 2W and that pin was a bit far from the rest. At first I was using gpio-backlight on PI14 to control the backlight, so I left those values commented in the dts just for future reference. For VCC I used the 3.3V pin from the Orange Pi Zero 2W. In regards to CS, I once tried to define both, CS0 and CS1, in cs-gpios at the same time but the dts never loaded when I did this. However touch appears to work fine on CS1 even when only CS0 is defined in cs-gpios. No additional overlays from armbian-config were required for this. Something I noticed and I am not sure if this has to do with my configuration, the drivers, my wiring, or the screen itself, but when the screen was turned off by dpms on an X11 session, touch would stop working on some occasions and touch activity was no longer displayed with evtest which always forced me to reboot the device in order to make it work again. Reloading the ads7846 driver did not help since I always receive an error saying "ads7846 spi1.0: failed to request pendown GPIO" when trying to load the driver with modprobe after unloading it. Due to that issue, I changed the backlight to a PWM pin and instead of completely turning it off, I now set it at the lowest brightness level. I have not yet encountered the same problem again after making this change, so the source of the issue is still a mystery for me. Anyways, I hope any of this information is helpful for the Orange Pi Zero 3. Spoiler /dts-v1/; /plugin/; / { compatible = "allwinner,sun50i-h616"; fragment@0 { target = <&pwm4_ph_pin>; __overlay__ { pins = "PI14"; // Assign PI14 to PWM4 function = "pwm4"; }; }; fragment@1 { target-path = "/"; __overlay__ { backlight: backlight { //compatible = "gpio-backlight"; //pinctrl-names = "default"; //gpios = <&pio 8 14 0>; // PI14 //default-on; compatible = "pwm-backlight"; pwms = <&pwm 4 1000000 0>; // PI14 - pwm4 brightness-levels = <0 1 2 4 8 16 32 64 128 255>; default-brightness-level = <9>; post-pwm-on-delay-ms = <10>; pwm-off-delay-ms = <10>; status = "okay"; }; }; }; fragment@2 { target = <&spi1>; __overlay__ { /* needed to avoid dtc warning */ #address-cells = <1>; #size-cells = <0>; status = "okay"; cs-gpios = <&pio 7 5 0>; // PH5 - CS0 //num-chipselects = <1>; ili9341: ili9341@0 { compatible = "adafruit,yx240qv29", "ilitek,ili9341"; reg = <0>; // CS0 pinctrl-names = "default"; spi-max-frequency = <32000000>; rotation= <90>; buswidth = <8>; height = <240>; width = <320>; reset-gpios = <&pio 8 6 0>; // PI6 dc-gpios = <&pio 7 4 0>; // PH4 backlight = <&backlight>; //debug = <3>; }; xpt2046: xpt2046@1 { compatible = "ti,ads7846"; reg = <1>; // CS1 pinctrl-names = "default"; spi-max-frequency = <1000000>; interrupts = <8 5 2>; // PI5 - IRQ interrupt-parent = <&pio>; pendown-gpio = <&pio 8 5 1>; // PI5 ti,pressure-min = /bits/ 16 <0>; ti,pressure-max = /bits/ 16 <255>; ti,x-plate-ohms = /bits/ 16 <40>; ti,y-plate-ohms = /bits/ 16 <40>; ti,keep-vref-on = <1>; ti,debounce-rep = /bits/ 16 <1>; ti,debounce-tol = /bits/ 16 <2>; ti,debounce-max = /bits/ 16 <100>; ti,settle-delay-usec = /bits/ 16 <20>; ti,penirq-recheck-delay-usecs = /bits/ 16 <20>; ti,x-min = /bits/ 16 <0>; ti,x-max = /bits/ 16 <3900>; ti,y-min = /bits/ 16 <0>; ti,y-max = /bits/ 16 <3900>; ti,swap-xy = <0>; wakeup-source; }; }; }; }; 0 Quote
robertoj Posted October 18 Author Posted October 18 Thank you for the suggestion With my modified DTS, which takes hints from your DTS and my reference, I get the LCD to display with the DRM driver... but no touch events (with evtest) Spoiler roberto@orangepizero3:~/ili9341$ cat ili9341-ads7846.dts /dts-v1/; /plugin/; / { compatible = "allwinner,sun50i-h616"; fragment@0 { target = <&spi1>; __overlay__ { status = "okay"; cs-gpios = <&pio 2 15 0>; /*PC15=CS0 PH9=CS1*/ ili9341: ili9341@1 { compatible = "adafruit,yx240qv29"; reg = <0>; pinctrl-names = "default"; spi-max-frequency = <24000000>; rotation = <270>; bgr = <0>; fps = <30>; buswidth = <8>; reset-gpios = <&pio 2 14 0>; /* PC14 */ dc-gpios = <&pio 2 7 0>; /* PHC7 */ debug = <3>; 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 0x1000036 0x28 0x1000011 0x1000029>; }; ads7846: ads7846@0 { 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,keep-vref-on = <1>; ti,pressure-min = /bits/ 16 <0>; ti,pressure-max = /bits/ 16 <0xFFF>; //ti,debounce-rep = /bits/ 16 <1>; //ti,debounce-tol = /bits/ 16 <2>; //ti,debounce-max = /bits/ 16 <100>; //ti,settle-delay-usec = /bits/ 16 <20>; //ti,penirq-recheck-delay-usecs = /bits/ 16 <20>; ti,x-plate-ohms = /bits/ 16 <400>; //ti,y-plate-ohms = /bits/ 16 <400>; ti,swap-xy = <1>; }; }; }; }; roberto@orangepizero3:~/ili9341$ dmesg|grep spi [ 1.328766] sun50i-h616-pinctrl 300b000.pinctrl: pin-64 (5010000.spi) status -517 [ 1.328785] sun6i-spi 5010000.spi: Error applying setting, reverse things back [ 1.329033] sun50i-h616-pinctrl 300b000.pinctrl: pin-230 (5011000.spi) status -517 [ 1.329050] sun6i-spi 5011000.spi: Error applying setting, reverse things back [ 1.338829] spi-nor spi0.0: supply vdd not found, using dummy regulator [ 1.353173] spi-nor spi0.0: spi-nor-generic (16384 Kbytes) [ 5.272310] ads7846 spi1.1: supply vcc not found, using dummy regulator [ 5.272796] ads7846 spi1.1: touchscreen, irq 72 [ 5.273240] input: ADS7846 Touchscreen as /devices/platform/soc/5011000.spi/spi_master/spi1/spi1.1/input/input0 [ 5.327189] panel-ilitek-ili9341 spi1.0: get optional vcc failed [ 5.327816] [drm] Initialized ili9341 1.0.0 20210716 for spi1.0 on minor 2 [ 5.463388] panel-ilitek-ili9341 spi1.0: [drm] Initialized display serial interface [ 5.532230] panel-ilitek-ili9341 spi1.0: [drm] fb0: ili9341drmfb frame buffer device root@orangepizero3:~# cat /sys/kernel/debug/pinctrl/300b000.pinctrl/pinmux-pins Pinmux settings per pin Format: pin (name): mux_owner|gpio_owner (strict) hog? pin 0 (PA0): UNCLAIMED pin 1 (PA1): UNCLAIMED pin 2 (PA2): UNCLAIMED pin 3 (PA3): UNCLAIMED pin 4 (PA4): UNCLAIMED pin 5 (PA5): UNCLAIMED pin 6 (PA6): UNCLAIMED pin 7 (PA7): UNCLAIMED pin 8 (PA8): UNCLAIMED pin 9 (PA9): UNCLAIMED pin 10 (PA10): UNCLAIMED pin 11 (PA11): UNCLAIMED pin 12 (PA12): UNCLAIMED pin 64 (PC0): device 5010000.spi function spi0 group PC0 pin 65 (PC1): UNCLAIMED pin 66 (PC2): device 5010000.spi function spi0 group PC2 pin 67 (PC3): device 5010000.spi function spi0 group PC3 pin 68 (PC4): device 5010000.spi function spi0 group PC4 pin 69 (PC5): UNCLAIMED pin 70 (PC6): UNCLAIMED pin 71 (PC7): GPIO 300b000.pinctrl:71 pin 72 (PC8): UNCLAIMED pin 73 (PC9): UNCLAIMED pin 74 (PC10): GPIO 300b000.pinctrl:74 pin 75 (PC11): UNCLAIMED pin 76 (PC12): GPIO 300b000.pinctrl:76 pin 77 (PC13): GPIO 300b000.pinctrl:77 pin 78 (PC14): GPIO 300b000.pinctrl:78 pin 79 (PC15): GPIO 300b000.pinctrl:79 pin 80 (PC16): GPIO 300b000.pinctrl:80 pin 160 (PF0): device 4020000.mmc function mmc0 group PF0 pin 161 (PF1): device 4020000.mmc function mmc0 group PF1 pin 162 (PF2): device 4020000.mmc function mmc0 group PF2 pin 163 (PF3): device 4020000.mmc function mmc0 group PF3 pin 164 (PF4): device 4020000.mmc function mmc0 group PF4 pin 165 (PF5): device 4020000.mmc function mmc0 group PF5 pin 166 (PF6): GPIO 300b000.pinctrl:166 pin 192 (PG0): device 4021000.mmc function mmc1 group PG0 pin 193 (PG1): device 4021000.mmc function mmc1 group PG1 pin 194 (PG2): device 4021000.mmc function mmc1 group PG2 pin 195 (PG3): device 4021000.mmc function mmc1 group PG3 pin 196 (PG4): device 4021000.mmc function mmc1 group PG4 pin 197 (PG5): device 4021000.mmc function mmc1 group PG5 pin 198 (PG6): UNCLAIMED pin 199 (PG7): UNCLAIMED pin 200 (PG8): UNCLAIMED pin 201 (PG9): UNCLAIMED pin 202 (PG10): UNCLAIMED pin 203 (PG11): UNCLAIMED pin 204 (PG12): UNCLAIMED pin 205 (PG13): UNCLAIMED pin 206 (PG14): UNCLAIMED pin 207 (PG15): UNCLAIMED pin 208 (PG16): UNCLAIMED pin 209 (PG17): UNCLAIMED pin 210 (PG18): GPIO 300b000.pinctrl:210 pin 211 (PG19): UNCLAIMED pin 224 (PH0): device 5000000.serial function uart0 group PH0 pin 225 (PH1): device 5000000.serial function uart0 group PH1 pin 226 (PH2): UNCLAIMED pin 227 (PH3): UNCLAIMED pin 228 (PH4): UNCLAIMED pin 229 (PH5): UNCLAIMED pin 230 (PH6): device 5011000.spi function spi1 group PH6 pin 231 (PH7): device 5011000.spi function spi1 group PH7 pin 232 (PH8): device 5011000.spi function spi1 group PH8 pin 233 (PH9): UNCLAIMED pin 234 (PH10): UNCLAIMED pin 256 (PI0): device 5020000.ethernet function emac0 group PI0 pin 257 (PI1): device 5020000.ethernet function emac0 group PI1 pin 258 (PI2): device 5020000.ethernet function emac0 group PI2 pin 259 (PI3): device 5020000.ethernet function emac0 group PI3 pin 260 (PI4): device 5020000.ethernet function emac0 group PI4 pin 261 (PI5): device 5020000.ethernet function emac0 group PI5 pin 262 (PI6): UNCLAIMED pin 263 (PI7): device 5020000.ethernet function emac0 group PI7 pin 264 (PI8): device 5020000.ethernet function emac0 group PI8 pin 265 (PI9): device 5020000.ethernet function emac0 group PI9 pin 266 (PI10): device 5020000.ethernet function emac0 group PI10 pin 267 (PI11): device 5020000.ethernet function emac0 group PI11 pin 268 (PI12): device 5020000.ethernet function emac0 group PI12 pin 269 (PI13): device 5020000.ethernet function emac0 group PI13 pin 270 (PI14): device 5020000.ethernet function emac0 group PI14 pin 271 (PI15): device 5020000.ethernet function emac0 group PI15 pin 272 (PI16): device 5020000.ethernet function emac0 group PI16 I dont have more time to analyze this problem for now... but I havent triple checked my connections. Ivano, check whether PI5 (your desired IRQ) is not already claimed by the kernel, with the last command I show up there (pinmux-pins) Maybe you can try other GPIO. Then, if it doesn't work, try changing the level and edge polarity parameter (I talk about it in this thread or the other recent ili9341 thread). In your case: use PI5 <8 5 _>, interrupts = <2 10 2>; /* PC10 - IRQ */ < try changing 2 (active high) into 8 (active low) I HAVE NEVER CHANGED THIS pendown-gpio = <&pio 2 10 1>; /* PC10 */ <try changing 1 (edge rising) into 0 (edge falling) Opiz2w reference: More useful discussion here: https://forum.armbian.com/topic/27457-connecting-banana-pi-m2-zero-with-ili9341-display-over-spi-on-latest-armbian-image/page/2/#comments 0 Quote
robertoj Posted October 19 Author Posted October 19 More progress: this single DTS configures 1 SPI bus control the ili9341 and XPT2046 touch chip Spoiler roberto@orangepizero3:~/ili9341$ cat ili9341-ads7846.dts /dts-v1/; /plugin/; / { compatible = "allwinner,sun50i-h616"; fragment@0 { target = <&spi1>; __overlay__ { status = "okay"; cs-gpios = <&pio 7 9 0>,<&pio 2 15 0>; /*PH9=CS0 for lcd, PC15=CS1 for touch*/ ili9341: ili9341@0 { compatible = "adafruit,yx240qv29"; reg = <0>; pinctrl-names = "default"; spi-max-frequency = <24000000>; rotation = <270>; bgr = <0>; fps = <30>; buswidth = <8>; reset-gpios = <&pio 2 14 0>; /* PC14 */ dc-gpios = <&pio 2 7 0>; /* PHC7 */ debug = <3>; }; 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>; }; }; }; }; I needed to specify explicitly both CS in: cs-gpios = <&pio 7 9 0>,<&pio 2 15 0>; /*PH9=CS0 for lcd, PC15=CS1 for touch*/ That "<0>" that I saw in other examples IS NOT WORKING! Ivano, try modifying this DTS. It doesn't have backlight function, so plug the LED wire to 3.3V to test. 0 Quote
Ivano Posted October 20 Posted October 20 I am glad you are making further progress and thankful for sharing your findings. I tried your suggestions and it appears that the pin for IRQ (PI5) is listed as unclaimed when the dts is not loaded, so it appears to be available for use. I previously tried using different pins for IRQ thinking that maybe the one that I was using did not properly support interrupts and that it was causing the random missing touch problem, but the result was the same and touch was randomly lost after the backlight was powered off. This could happen after a few minutes, but sometimes it did not happen even after a full day. I noticed that the problem did not happen when the backlight was not powered off, which is why I decided to dim the backlight to its lowest value instead of powering it off. When I was first trying to make touch work, I had 0 (edge falling) on pendown-gpio which resulted in touch not being registered. Most of the dts I found online had this value set to 0 (edge falling), so it took me a while to try changing the value to 1 (edge rising) to make it work. Anyways, I tried your suggestion about using different values in "interrupts" and touch was still being registered with the value 8, so I will make further tests with this configuration to see if it makes a different for my case. I also tried the dts provided in your last reply with the required modifications for my board (I only changed the pins to match the ones for my board) and with the backlight now connected to 3.3V, but the dts was not loaded and I was presented with a white screen. Logs displayed issues claiming PH9 (CS1) and said that it was already requested. Once I removed CS1 from cs-gpios, the dts was loaded and the display and touch were working properly. The interesting thing is that while logs were complaining that PH9 (CS1) was already requested when both CS were defined in cs-gpios, pinmux-pins was still listing PH9 as unclaimed. But after removing PH9 from cs-gpios, pinmux-pins then listed the pin as claimed and everything seemed to work. I am not sure why this is happening but it appears that your board requires you to explicitly define both CS while mine only wants one in the dts. Below I will provide some details from loading the dts with both CS and with only CS0 defined. This is with the dts from your last reply with both CS defined which is not working for me. | cs-gpios = <&pio 7 5 0>,<&pio 7 9 0>; // PH5=CS0, PH9=CS1 Spoiler cat /sys/kernel/debug/gpio gpiochip0: GPIOs 0-287, parent: platform/300b000.pinctrl, 300b000.pinctrl: gpio-77 ( |green_led ) out lo gpio-79 ( |100m_link ) out lo gpio-80 ( |100m_act ) out lo gpio-166 ( |cd ) in lo IRQ ACTIVE LOW gpio-210 ( |reset ) out hi ACTIVE LOW dmesg | grep spi [ 1.342973] sun50i-h616-pinctrl 300b000.pinctrl: pin-64 (5010000.spi) status -517 [ 1.342991] sun6i-spi 5010000.spi: Error applying setting, reverse things back [ 1.343253] sun50i-h616-pinctrl 300b000.pinctrl: pin-230 (5011000.spi) status -517 [ 1.343270] sun6i-spi 5011000.spi: Error applying setting, reverse things back [ 1.355348] spi-nor spi0.0: supply vdd not found, using dummy regulator [ 1.368746] spi-nor spi0.0: spi-nor-generic (16384 Kbytes) [ 1.381193] sun50i-h616-pinctrl 300b000.pinctrl: pin PH9 already requested by 5011000.spi; cannot claim for 300b000.pinctrl:233 [ 1.381215] sun6i-spi 5011000.spi: cannot register SPI master [ 1.381255] sun6i-spi: probe of 5011000.spi failed with error -22 cat /sys/kernel/debug/pinctrl/300b000.pinctrl/pinmux-pins Pinmux settings per pin Format: pin (name): mux_owner|gpio_owner (strict) hog? pin 0 (PA0): device 5030000.ethernet function emac1 group PA0 pin 1 (PA1): device 5030000.ethernet function emac1 group PA1 pin 2 (PA2): device 5030000.ethernet function emac1 group PA2 pin 3 (PA3): device 5030000.ethernet function emac1 group PA3 pin 4 (PA4): device 5030000.ethernet function emac1 group PA4 pin 5 (PA5): device 5030000.ethernet function emac1 group PA5 pin 6 (PA6): device 5030000.ethernet function emac1 group PA6 pin 7 (PA7): device 5030000.ethernet function emac1 group PA7 pin 8 (PA8): device 5030000.ethernet function emac1 group PA8 pin 9 (PA9): device 5030000.ethernet function emac1 group PA9 pin 10 (PA10): device 5002c00.i2c function i2c3 group PA10 pin 11 (PA11): device 5002c00.i2c function i2c3 group PA11 pin 12 (PA12): device soc:pwm5@0300a000 function pwm5 group PA12 pin 64 (PC0): device 5010000.spi function spi0 group PC0 pin 65 (PC1): UNCLAIMED pin 66 (PC2): device 5010000.spi function spi0 group PC2 pin 67 (PC3): device 5010000.spi function spi0 group PC3 pin 68 (PC4): device 5010000.spi function spi0 group PC4 pin 69 (PC5): UNCLAIMED pin 70 (PC6): UNCLAIMED pin 71 (PC7): UNCLAIMED pin 72 (PC8): UNCLAIMED pin 73 (PC9): UNCLAIMED pin 74 (PC10): UNCLAIMED pin 75 (PC11): UNCLAIMED pin 76 (PC12): UNCLAIMED pin 77 (PC13): GPIO 300b000.pinctrl:77 pin 78 (PC14): UNCLAIMED pin 79 (PC15): GPIO 300b000.pinctrl:79 pin 80 (PC16): GPIO 300b000.pinctrl:80 pin 160 (PF0): device 4020000.mmc function mmc0 group PF0 pin 161 (PF1): device 4020000.mmc function mmc0 group PF1 pin 162 (PF2): device 4020000.mmc function mmc0 group PF2 pin 163 (PF3): device 4020000.mmc function mmc0 group PF3 pin 164 (PF4): device 4020000.mmc function mmc0 group PF4 pin 165 (PF5): device 4020000.mmc function mmc0 group PF5 pin 166 (PF6): GPIO 300b000.pinctrl:166 pin 192 (PG0): device 4021000.mmc function mmc1 group PG0 pin 193 (PG1): device 4021000.mmc function mmc1 group PG1 pin 194 (PG2): device 4021000.mmc function mmc1 group PG2 pin 195 (PG3): device 4021000.mmc function mmc1 group PG3 pin 196 (PG4): device 4021000.mmc function mmc1 group PG4 pin 197 (PG5): device 4021000.mmc function mmc1 group PG5 pin 198 (PG6): UNCLAIMED pin 199 (PG7): UNCLAIMED pin 200 (PG8): UNCLAIMED pin 201 (PG9): UNCLAIMED pin 202 (PG10): UNCLAIMED pin 203 (PG11): UNCLAIMED pin 204 (PG12): UNCLAIMED pin 205 (PG13): UNCLAIMED pin 206 (PG14): UNCLAIMED pin 207 (PG15): UNCLAIMED pin 208 (PG16): UNCLAIMED pin 209 (PG17): UNCLAIMED pin 210 (PG18): GPIO 300b000.pinctrl:210 pin 211 (PG19): UNCLAIMED pin 224 (PH0): device 5000000.serial function uart0 group PH0 pin 225 (PH1): device 5000000.serial function uart0 group PH1 pin 226 (PH2): UNCLAIMED pin 227 (PH3): UNCLAIMED pin 228 (PH4): UNCLAIMED pin 229 (PH5): UNCLAIMED pin 230 (PH6): UNCLAIMED pin 231 (PH7): UNCLAIMED pin 232 (PH8): UNCLAIMED pin 233 (PH9): UNCLAIMED pin 234 (PH10): device 7040000.ir function ir_rx group PH10 pin 256 (PI0): UNCLAIMED pin 257 (PI1): UNCLAIMED pin 258 (PI2): UNCLAIMED pin 259 (PI3): UNCLAIMED pin 260 (PI4): UNCLAIMED pin 261 (PI5): UNCLAIMED pin 262 (PI6): UNCLAIMED pin 263 (PI7): UNCLAIMED pin 264 (PI8): UNCLAIMED pin 265 (PI9): UNCLAIMED pin 266 (PI10): UNCLAIMED pin 267 (PI11): UNCLAIMED pin 268 (PI12): UNCLAIMED pin 269 (PI13): UNCLAIMED pin 270 (PI14): UNCLAIMED pin 271 (PI15): UNCLAIMED pin 272 (PI16): UNCLAIMED And this is the same dts with only CS1 removed. | cs-gpios = <&pio 7 5 0>; // PH5=CS0 Spoiler cat /sys/kernel/debug/gpio gpiochip0: GPIOs 0-287, parent: platform/300b000.pinctrl, 300b000.pinctrl: gpio-77 ( |green_led ) out lo gpio-79 ( |100m_link ) out lo gpio-80 ( |100m_act ) out lo gpio-166 ( |cd ) in lo IRQ ACTIVE LOW gpio-210 ( |reset ) out hi ACTIVE LOW gpio-228 ( |dc ) out hi gpio-229 ( |spi1 CS0 ) out hi ACTIVE LOW gpio-261 ( |pendown ) in hi IRQ ACTIVE LOW gpio-262 ( |reset ) out hi dmesg | grep spi [ 1.343008] sun50i-h616-pinctrl 300b000.pinctrl: pin-64 (5010000.spi) status -517 [ 1.343026] sun6i-spi 5010000.spi: Error applying setting, reverse things back [ 1.343293] sun50i-h616-pinctrl 300b000.pinctrl: pin-230 (5011000.spi) status -517 [ 1.343310] sun6i-spi 5011000.spi: Error applying setting, reverse things back [ 1.354019] spi-nor spi0.0: supply vdd not found, using dummy regulator [ 1.368924] spi-nor spi0.0: spi-nor-generic (16384 Kbytes) [ 6.683949] panel-ilitek-ili9341 spi1.1: get optional vcc failed [ 6.686705] [drm] Initialized ili9341 1.0.0 20210716 for spi1.1 on minor 2 [ 6.694517] ads7846 spi1.0: supply vcc not found, using dummy regulator [ 6.700387] ads7846 spi1.0: touchscreen, irq 259 [ 6.713088] input: ADS7846 Touchscreen as /devices/platform/soc/5011000.spi/spi_master/spi1/spi1.0/input/input0 [ 7.186496] panel-ilitek-ili9341 spi1.1: [drm] Initialized display serial interface [ 7.244872] panel-ilitek-ili9341 spi1.1: [drm] fb0: ili9341drmfb frame buffer device [ 18.551714] panel-ilitek-ili9341 spi1.1: [drm] Initialized display serial interface cat /sys/kernel/debug/pinctrl/300b000.pinctrl/pinmux-pins Pinmux settings per pin Format: pin (name): mux_owner|gpio_owner (strict) hog? pin 0 (PA0): device 5030000.ethernet function emac1 group PA0 pin 1 (PA1): device 5030000.ethernet function emac1 group PA1 pin 2 (PA2): device 5030000.ethernet function emac1 group PA2 pin 3 (PA3): device 5030000.ethernet function emac1 group PA3 pin 4 (PA4): device 5030000.ethernet function emac1 group PA4 pin 5 (PA5): device 5030000.ethernet function emac1 group PA5 pin 6 (PA6): device 5030000.ethernet function emac1 group PA6 pin 7 (PA7): device 5030000.ethernet function emac1 group PA7 pin 8 (PA8): device 5030000.ethernet function emac1 group PA8 pin 9 (PA9): device 5030000.ethernet function emac1 group PA9 pin 10 (PA10): device 5002c00.i2c function i2c3 group PA10 pin 11 (PA11): device 5002c00.i2c function i2c3 group PA11 pin 12 (PA12): device soc:pwm5@0300a000 function pwm5 group PA12 pin 64 (PC0): device 5010000.spi function spi0 group PC0 pin 65 (PC1): UNCLAIMED pin 66 (PC2): device 5010000.spi function spi0 group PC2 pin 67 (PC3): device 5010000.spi function spi0 group PC3 pin 68 (PC4): device 5010000.spi function spi0 group PC4 pin 69 (PC5): UNCLAIMED pin 70 (PC6): UNCLAIMED pin 71 (PC7): UNCLAIMED pin 72 (PC8): UNCLAIMED pin 73 (PC9): UNCLAIMED pin 74 (PC10): UNCLAIMED pin 75 (PC11): UNCLAIMED pin 76 (PC12): UNCLAIMED pin 77 (PC13): GPIO 300b000.pinctrl:77 pin 78 (PC14): UNCLAIMED pin 79 (PC15): GPIO 300b000.pinctrl:79 pin 80 (PC16): GPIO 300b000.pinctrl:80 pin 160 (PF0): device 4020000.mmc function mmc0 group PF0 pin 161 (PF1): device 4020000.mmc function mmc0 group PF1 pin 162 (PF2): device 4020000.mmc function mmc0 group PF2 pin 163 (PF3): device 4020000.mmc function mmc0 group PF3 pin 164 (PF4): device 4020000.mmc function mmc0 group PF4 pin 165 (PF5): device 4020000.mmc function mmc0 group PF5 pin 166 (PF6): GPIO 300b000.pinctrl:166 pin 192 (PG0): device 4021000.mmc function mmc1 group PG0 pin 193 (PG1): device 4021000.mmc function mmc1 group PG1 pin 194 (PG2): device 4021000.mmc function mmc1 group PG2 pin 195 (PG3): device 4021000.mmc function mmc1 group PG3 pin 196 (PG4): device 4021000.mmc function mmc1 group PG4 pin 197 (PG5): device 4021000.mmc function mmc1 group PG5 pin 198 (PG6): UNCLAIMED pin 199 (PG7): UNCLAIMED pin 200 (PG8): UNCLAIMED pin 201 (PG9): UNCLAIMED pin 202 (PG10): UNCLAIMED pin 203 (PG11): UNCLAIMED pin 204 (PG12): UNCLAIMED pin 205 (PG13): UNCLAIMED pin 206 (PG14): UNCLAIMED pin 207 (PG15): UNCLAIMED pin 208 (PG16): UNCLAIMED pin 209 (PG17): UNCLAIMED pin 210 (PG18): GPIO 300b000.pinctrl:210 pin 211 (PG19): UNCLAIMED pin 224 (PH0): device 5000000.serial function uart0 group PH0 pin 225 (PH1): device 5000000.serial function uart0 group PH1 pin 226 (PH2): UNCLAIMED pin 227 (PH3): UNCLAIMED pin 228 (PH4): GPIO 300b000.pinctrl:228 pin 229 (PH5): GPIO 300b000.pinctrl:229 pin 230 (PH6): device 5011000.spi function spi1 group PH6 pin 231 (PH7): device 5011000.spi function spi1 group PH7 pin 232 (PH8): device 5011000.spi function spi1 group PH8 pin 233 (PH9): device 5011000.spi function spi1 group PH9 pin 234 (PH10): device 7040000.ir function ir_rx group PH10 pin 256 (PI0): UNCLAIMED pin 257 (PI1): UNCLAIMED pin 258 (PI2): UNCLAIMED pin 259 (PI3): UNCLAIMED pin 260 (PI4): UNCLAIMED pin 261 (PI5): GPIO 300b000.pinctrl:261 pin 262 (PI6): GPIO 300b000.pinctrl:262 pin 263 (PI7): UNCLAIMED pin 264 (PI8): UNCLAIMED pin 265 (PI9): UNCLAIMED pin 266 (PI10): UNCLAIMED pin 267 (PI11): UNCLAIMED pin 268 (PI12): UNCLAIMED pin 269 (PI13): UNCLAIMED pin 270 (PI14): UNCLAIMED pin 271 (PI15): UNCLAIMED pin 272 (PI16): UNCLAIMED 0 Quote
robertoj Posted October 20 Author Posted October 20 That’s very interesting… why my opiz3 needs both CS defined and the opiz2w only wants one CS defined. but please make further tests and confirm this works with lightdm Sudo apt install lightdm xorg-input-evdev sudo cp /usr/share/X11/xorg.conf.d/45-evdev.conf /etc/X11/xorg.conf.d/ (https://www.waveshare.com/wiki/3.5inch_RPi_LCD_(A)_Manual_Configuration) sudo systemctl disable lightdm sudo startx (in second ssh) sudo DISPLAY=:0.0 xinput-calibrator do the calibration plug usb keyboard and mouse Sudo systemctl start lightdm check that the cursor moves with touch or pen right click and 0 Quote
Ivano Posted October 22 Posted October 22 Hello again. I followed the steps and performed the calibration and LightDM seems to work fine with the display and touch. I only did a short test, but the cursor was moving together with the pen while in the login screen. I currently have KDE Plasma installed and this desktop environment appears to be too big for this screen resolution, however the cursor was still moving with the pen while being in the desktop and I was also able to drag a window and move it around. The only small issue I noticed is that even after performing the calibration, the cursor was getting a small offset from the touch point the farther I was getting from the center of the screen and this made it difficult to reach the border section and also the corners. I experienced problems closing a maximized window due to this. This was somehow resolved after setting a better value range for the min and max values for x and y in the dts. I got the required values by using evtest, then touching each corner, and comparing the minimum and maximum values registered in ABS_X and ABS_Y. My numbers might require some tuning but they are working fine for now and I am able to reach all four corners without the cursor offset issue. Please note that the values reported in ABS_X and ABS_Y are in a decimal format instead of hexadecimal. Spoiler Minimum values: Event: time 1729638604.477383, type 3 (EV_ABS), code 0 (ABS_X), value 174 Event: time 1729638604.477383, type 3 (EV_ABS), code 1 (ABS_Y), value 260 Maximum values: Event: time 1729637910.370625, type 3 (EV_ABS), code 0 (ABS_X), value 3808 Event: time 1729637910.370625, type 3 (EV_ABS), code 1 (ABS_Y), value 3767 ti,x-min = /bits/ 16 <200>; ti,x-max = /bits/ 16 <3800>; ti,y-min = /bits/ 16 <200>; ti,y-max = /bits/ 16 <3800>; If you experience the same offset problem, please feel free to try this to see if it helps you resolve it. I hope this information is helpful. 0 Quote
robertoj Posted October 22 Author Posted October 22 I HAD the same issues with calibration. The 99-calibration.conf needs to be created, with the output of xinput-calibrator. It is not automatically done. You also need the evdev.conf file copied from usr/share/... to /etc/X11. When I wasn't doing this, I did the calibration many times and it wasn't effective. Read https://www.waveshare.com/wiki/3.5inch_RPi_LCD_(A)_Manual_Configuration very carefully and follow all steps regarding calibration. 0 Quote
Ivano Posted October 22 Posted October 22 Thank you for your quick response. I created the 99-calibration.conf file in /etc/X11/xorg.conf.d/ with the values provided by xinput_calibrator, however it appears that I somehow forgot to copy 10-evdev.conf to /etc/X11/xorg.conf.d/ while testing. After copying 10-evdev.conf to the intended directory and running xinput_calibrator, I now get a different set of values and after putting them in 99-calibration.conf, the calibration is now being properly applied. 0 Quote
robertoj Posted October 26 Author Posted October 26 Hello Ivano Can you control the backlight? If so, can you share your whole DTS? (opiz2w) 0 Quote
Ivano Posted October 29 Posted October 29 (edited) Hello Robertoj. Yes, I can control the backlight via /sys/class/backlight/ when it is configured with gpio-backlight or pwm-backlight. You may find below the default dts for the Orange Pi Zero 2W on kernel 6.6.44. Spoiler /dts-v1/; / { interrupt-parent = <0x01>; #address-cells = <0x02>; #size-cells = <0x02>; model = "OrangePi Zero 2W"; compatible = "xunlong,orangepi-zero2w\0allwinner,sun50i-h618"; cpus { #address-cells = <0x01>; #size-cells = <0x00>; cpu@0 { compatible = "arm,cortex-a53"; device_type = "cpu"; reg = <0x00>; enable-method = "psci"; clocks = <0x02 0x15>; clock-latency-ns = <0x3b9b0>; #cooling-cells = <0x02>; operating-points-v2 = <0x03>; cpu-supply = <0x04>; status = "okay"; phandle = <0x06>; }; cpu@1 { compatible = "arm,cortex-a53"; device_type = "cpu"; reg = <0x01>; enable-method = "psci"; clocks = <0x02 0x15>; clock-latency-ns = <0x3b9b0>; #cooling-cells = <0x02>; operating-points-v2 = <0x03>; phandle = <0x07>; }; cpu@2 { compatible = "arm,cortex-a53"; device_type = "cpu"; reg = <0x02>; enable-method = "psci"; clocks = <0x02 0x15>; clock-latency-ns = <0x3b9b0>; #cooling-cells = <0x02>; operating-points-v2 = <0x03>; phandle = <0x08>; }; cpu@3 { compatible = "arm,cortex-a53"; device_type = "cpu"; reg = <0x03>; enable-method = "psci"; clocks = <0x02 0x15>; clock-latency-ns = <0x3b9b0>; #cooling-cells = <0x02>; operating-points-v2 = <0x03>; phandle = <0x09>; }; }; display-engine { compatible = "allwinner,sun50i-h6-display-engine"; allwinner,pipelines = <0x05>; status = "okay"; phandle = <0x4e>; }; reserved-memory { #address-cells = <0x02>; #size-cells = <0x02>; ranges; secmon@40000000 { reg = <0x00 0x40000000 0x00 0x80000>; no-map; }; }; osc24M-clk { #clock-cells = <0x00>; compatible = "fixed-clock"; clock-frequency = <0x16e3600>; clock-output-names = "osc24M"; phandle = <0x13>; }; pmu { compatible = "arm,cortex-a53-pmu"; interrupts = <0x00 0x8c 0x04 0x00 0x8d 0x04 0x00 0x8e 0x04 0x00 0x8f 0x04>; interrupt-affinity = <0x06 0x07 0x08 0x09>; }; psci { compatible = "arm,psci-0.2"; method = "smc"; }; timer { compatible = "arm,armv8-timer"; arm,no-tick-in-suspend; interrupts = <0x01 0x0d 0xf04 0x01 0x0e 0xf04 0x01 0x0b 0xf04 0x01 0x0a 0xf04>; }; soc { compatible = "simple-bus"; #address-cells = <0x01>; #size-cells = <0x01>; ranges = <0x00 0x00 0x00 0x40000000>; bus@1000000 { compatible = "allwinner,sun50i-h616-de33\0allwinner,sun50i-a64-de2"; reg = <0x1000000 0x400000>; allwinner,sram = <0x0a 0x01>; #address-cells = <0x01>; #size-cells = <0x01>; ranges = <0x00 0x1000000 0x400000>; clock@8000 { compatible = "allwinner,sun50i-h616-de33-clk"; reg = <0x8000 0x100>; clocks = <0x02 0x1d 0x02 0x1e>; clock-names = "mod\0bus"; resets = <0x02 0x01>; #clock-cells = <0x01>; #reset-cells = <0x01>; phandle = <0x0b>; }; mixer@100000 { compatible = "allwinner,sun50i-h616-de33-mixer-0"; reg = <0x100000 0x100000 0x8100 0x40 0x280000 0x20000>; clocks = <0x0b 0x00 0x0b 0x06>; clock-names = "bus\0mod"; resets = <0x0b 0x00>; phandle = <0x05>; ports { #address-cells = <0x01>; #size-cells = <0x00>; port@1 { reg = <0x01>; phandle = <0x4f>; endpoint { remote-endpoint = <0x0c>; phandle = <0x33>; }; }; }; }; }; dma-controller@3002000 { compatible = "allwinner,sun50i-h6-dma"; reg = <0x3002000 0x1000>; interrupts = <0x00 0x2a 0x04>; clocks = <0x02 0x2a 0x02 0x32>; clock-names = "bus\0mbus"; dma-channels = <0x10>; dma-requests = <0x31>; resets = <0x02 0x06>; #dma-cells = <0x01>; phandle = <0x0d>; }; codec@05096000 { #sound-dai-cells = <0x00>; compatible = "allwinner,sun50i-h616-codec"; reg = <0x5096000 0x31c>; interrupts = <0x00 0x3a 0x04>; clocks = <0x02 0x5d 0x02 0x5b 0x02 0x5c>; clock-names = "apb\0audio-codec-1x\0audio-codec-4x"; resets = <0x02 0x24>; dmas = <0x0d 0x06>; dma-names = "tx"; status = "disabled"; phandle = <0x50>; }; ahub_dam_plat@5097000 { #sound-dai-cells = <0x00>; compatible = "allwinner,sunxi-snd-plat-ahub_dam"; reg = <0x5097000 0x1000>; resets = <0x02 0x25>; clocks = <0x02 0x5b 0x02 0x5c 0x02 0x5e 0x02 0x5f>; clock-names = "clk_pll_audio\0clk_pll_audio_4x\0clk_audio_hub\0clk_bus_audio_hub"; status = "disabled"; phandle = <0x51>; }; ahub1_plat { #sound-dai-cells = <0x00>; compatible = "allwinner,sunxi-snd-plat-ahub"; apb_num = <0x01>; dmas = <0x0d 0x04 0x0d 0x04>; dma-names = "tx\0rx"; playback_cma = <0x80>; capture_cma = <0x80>; tx_fifo_size = <0x80>; rx_fifo_size = <0x80>; tdm_num = <0x01>; tx_pin = <0x00>; rx_pin = <0x00>; status = "disabled"; phandle = <0x0f>; }; ahub1_mach { compatible = "allwinner,sunxi-snd-mach"; soundcard-mach,name = "HDMI"; soundcard-mach,format = "i2s"; soundcard-mach,frame-master = <0x0e>; soundcard-mach,bitclock-master = <0x0e>; soundcard-mach,slot-num = <0x02>; soundcard-mach,slot-width = <0x20>; status = "disabled"; phandle = <0x52>; soundcard-mach,cpu { sound-dai = <0x0f>; soundcard-mach,pll-fs = <0x04>; soundcard-mach,mclk-fs = <0x00>; phandle = <0x0e>; }; soundcard-mach,codec { sound-dai = <0x10>; phandle = <0x53>; }; }; gpu@1800000 { compatible = "allwinner,sun50i-h616-mali\0arm,mali-bifrost"; reg = <0x1800000 0x40000>; interrupts = <0x00 0x5f 0x04 0x00 0x60 0x04 0x00 0x61 0x04>; interrupt-names = "job\0mmu\0gpu"; clocks = <0x02 0x23 0x02 0x24>; clock-names = "core\0bus"; resets = <0x02 0x03>; status = "disabled"; mali-supply = <0x11>; phandle = <0x54>; }; video-codec@1c0e000 { compatible = "allwinner,sun50i-h616-video-engine"; reg = <0x1c0e000 0x2000>; clocks = <0x02 0x29 0x02 0x28 0x02 0x33>; clock-names = "ahb\0mod\0ram"; resets = <0x02 0x05>; interrupts = <0x00 0x5d 0x04>; allwinner,sram = <0x12 0x01>; }; syscon@3000000 { compatible = "allwinner,sun50i-h616-system-control"; reg = <0x3000000 0x30 0x3000038 0xfc8>; #address-cells = <0x01>; #size-cells = <0x01>; ranges; phandle = <0x2b>; sram@100000 { compatible = "mmio-sram"; reg = <0x100000 0x18000>; #address-cells = <0x01>; #size-cells = <0x01>; ranges = <0x00 0x100000 0x18000>; phandle = <0x55>; scpi-sram@17c00 { compatible = "arm,scp-shmem"; reg = <0x17c00 0x200>; phandle = <0x56>; }; }; sram@28000 { compatible = "mmio-sram"; reg = <0x28000 0x30000>; #address-cells = <0x01>; #size-cells = <0x01>; ranges = <0x00 0x28000 0x30000>; phandle = <0x57>; sram-section@0 { compatible = "allwinner,sun50i-h616-sram-c\0allwinner,sun50i-a64-sram-c"; reg = <0x00 0x1e000>; phandle = <0x0a>; }; }; sram@1a00000 { compatible = "mmio-sram"; reg = <0x1a00000 0x200000>; #address-cells = <0x01>; #size-cells = <0x01>; ranges = <0x00 0x1a00000 0x200000>; phandle = <0x58>; sram-section@0 { compatible = "allwinner,sun50i-h616-sram-c1"; reg = <0x00 0x200000>; phandle = <0x12>; }; }; }; clock@3001000 { compatible = "allwinner,sun50i-h616-ccu"; reg = <0x3001000 0x1000>; clocks = <0x13 0x14 0x00 0x14 0x02>; clock-names = "hosc\0losc\0iosc"; #clock-cells = <0x01>; #reset-cells = <0x01>; phandle = <0x02>; }; efuse@3006000 { compatible = "allwinner,sun50i-h616-sid"; reg = <0x3006000 0x1000>; #address-cells = <0x01>; #size-cells = <0x01>; phandle = <0x59>; cpu-speed-grade@0 { reg = <0x00 0x02>; phandle = <0x4b>; }; thermal-sensor-calibration@14 { reg = <0x14 0x08>; phandle = <0x3d>; }; ephy-calibration@2c { reg = <0x2c 0x02>; phandle = <0x25>; }; }; watchdog@30090a0 { compatible = "allwinner,sun50i-h616-wdt\0allwinner,sun6i-a31-wdt"; reg = <0x30090a0 0x20>; interrupts = <0x00 0x32 0x04>; clocks = <0x13>; phandle = <0x5a>; }; pinctrl@300b000 { compatible = "allwinner,sun50i-h616-pinctrl"; reg = <0x300b000 0x400>; interrupts = <0x00 0x33 0x04 0x00 0x34 0x04 0x00 0x35 0x04 0x00 0x2b 0x04 0x00 0x36 0x04 0x00 0x37 0x04 0x00 0x38 0x04 0x00 0x39 0x04>; clocks = <0x02 0x1a 0x13 0x14 0x00>; clock-names = "apb\0hosc\0losc"; gpio-controller; #gpio-cells = <0x03>; interrupt-controller; #interrupt-cells = <0x03>; vcc-pc-supply = <0x15>; vcc-pf-supply = <0x15>; vcc-pg-supply = <0x16>; vcc-ph-supply = <0x15>; vcc-pi-supply = <0x15>; phandle = <0x18>; rgmii-pins { pins = "PI0\0PI1\0PI2\0PI3\0PI4\0PI5\0PI7\0PI8\0PI9\0PI10\0PI11\0PI12\0PI13\0PI14\0PI15\0PI16"; function = "emac0"; drive-strength = <0x28>; phandle = <0x5b>; }; i2c0-pins { pins = "PI6\0PI7"; function = "i2c0"; phandle = <0x22>; }; i2c2-ph-pins { pins = "PH2\0PH3"; function = "i2c2"; phandle = <0x5c>; }; i2c3-pg-pins { pins = "PG17\0PG18"; function = "i2c3"; phandle = <0x5d>; }; i2c3-ph-pins { pins = "PH4\0PH5"; function = "i2c3"; phandle = <0x5e>; }; i2c4-pg-pins { pins = "PG15\0PG16"; function = "i2c4"; phandle = <0x5f>; }; i2c4-ph-pins { pins = "PH6\0PH7"; function = "i2c4"; phandle = <0x26>; }; ir-rx-pin { pins = "PH10"; function = "ir_rx"; phandle = <0x3b>; }; mmc0-pins { pins = "PF0\0PF1\0PF2\0PF3\0PF4\0PF5"; function = "mmc0"; drive-strength = <0x1e>; bias-pull-up; phandle = <0x17>; }; mmc1-pins { pins = "PG0\0PG1\0PG2\0PG3\0PG4\0PG5"; function = "mmc1"; drive-strength = <0x1e>; bias-pull-up; phandle = <0x19>; }; mmc2-pins { pins = "PC0\0PC1\0PC5\0PC6\0PC8\0PC9\0PC10\0PC11\0PC13\0PC14\0PC15\0PC16"; function = "mmc2"; drive-strength = <0x1e>; bias-pull-up; phandle = <0x1d>; }; rmii-pins { pins = "PA0\0PA1\0PA2\0PA3\0PA4\0PA5\0PA6\0PA7\0PA8\0PA9"; function = "emac1"; drive-strength = <0x28>; phandle = <0x2c>; }; spi0-pins { pins = "PC0\0PC2\0PC4"; function = "spi0"; phandle = <0x27>; }; spi0-cs0-pin { pins = "PC3"; function = "spi0"; phandle = <0x28>; }; spi1-pins { pins = "PH6\0PH7\0PH8"; function = "spi1"; phandle = <0x29>; }; spi1-cs0-pin { pins = "PH5"; function = "spi1"; phandle = <0x60>; }; spi1-cs1-pin { pins = "PH9"; function = "spi1"; phandle = <0x2a>; }; uart0-ph-pins { pins = "PH0\0PH1"; function = "uart0"; phandle = <0x1e>; }; uart1-pins { pins = "PG6\0PG7"; function = "uart1"; phandle = <0x61>; }; uart1-rts-cts-pins { pins = "PG8\0PG9"; function = "uart1"; phandle = <0x62>; }; uart2-pins { pins = "PH5\0PH6"; function = "uart2"; phandle = <0x63>; }; uart2-rts-cts-pins { pins = "PH7\0PH8"; function = "uart2"; phandle = <0x64>; }; uart5-pins { pins = "PH2\0PH3"; function = "uart5"; phandle = <0x65>; }; uart2-pi-pins { pins = "PI5\0PI6"; function = "uart2"; phandle = <0x1f>; }; uart3-pi-pins { pins = "PI9\0PI10"; function = "uart3"; phandle = <0x20>; }; uart4-pi-pins { pins = "PI13\0PI14"; function = "uart4"; phandle = <0x21>; }; i2c0-pi-pins { pins = "PI5\0PI6"; function = "i2c0"; phandle = <0x66>; }; i2c1-pi-pins { pins = "PI7\0PI8"; function = "i2c1"; phandle = <0x67>; }; i2c2-pi-pins { pins = "PI9\0PI10"; function = "i2c2"; phandle = <0x68>; }; i2c3-pa-pins { pins = "PA10\0PA11"; function = "i2c3"; bias-pull-up; phandle = <0x23>; }; pwm1-ph-pin { pins = "PH3"; function = "pwm1"; phandle = <0x44>; }; pwm2-ph-pin { pins = "PH2"; function = "pwm2"; phandle = <0x45>; }; pwm3-ph-pin { pins = "PH0"; function = "pwm3"; phandle = <0x46>; }; pwm4-ph-pin { pins = "PH1"; function = "pwm4"; phandle = <0x47>; }; pwm5-pin { pins = "PA12"; function = "pwm5"; phandle = <0x48>; }; }; interrupt-controller@3021000 { compatible = "arm,gic-400"; reg = <0x3021000 0x1000 0x3022000 0x2000 0x3024000 0x2000 0x3026000 0x2000>; interrupts = <0x01 0x09 0xf04>; interrupt-controller; #interrupt-cells = <0x03>; phandle = <0x01>; }; iommu@30f0000 { compatible = "allwinner,sun50i-h616-iommu\0allwinner,sun50i-h6-iommu"; reg = <0x30f0000 0x10000>; interrupts = <0x00 0x3d 0x04>; clocks = <0x02 0x30>; resets = <0x02 0x0b>; #iommu-cells = <0x01>; status = "okay"; phandle = <0x69>; }; mmc@4020000 { compatible = "allwinner,sun50i-h616-mmc\0allwinner,sun50i-a100-mmc"; reg = <0x4020000 0x1000>; clocks = <0x02 0x3f 0x02 0x3c>; clock-names = "ahb\0mmc"; resets = <0x02 0x0e>; reset-names = "ahb"; interrupts = <0x00 0x23 0x04>; pinctrl-names = "default"; pinctrl-0 = <0x17>; status = "okay"; max-frequency = <0x2faf080>; cap-sd-highspeed; cap-mmc-highspeed; mmc-ddr-3_3v; cap-sdio-irq; #address-cells = <0x01>; #size-cells = <0x00>; cd-gpios = <0x18 0x05 0x06 0x01>; bus-width = <0x04>; vmmc-supply = <0x15>; phandle = <0x6a>; }; mmc@4021000 { compatible = "allwinner,sun50i-h616-mmc\0allwinner,sun50i-a100-mmc"; reg = <0x4021000 0x1000>; clocks = <0x02 0x40 0x02 0x3d>; clock-names = "ahb\0mmc"; resets = <0x02 0x0f>; reset-names = "ahb"; interrupts = <0x00 0x24 0x04>; pinctrl-names = "default"; pinctrl-0 = <0x19>; status = "okay"; max-frequency = <0x8f0d180>; cap-sd-highspeed; cap-mmc-highspeed; mmc-ddr-3_3v; cap-sdio-irq; #address-cells = <0x01>; #size-cells = <0x00>; vmmc-supply = <0x1a>; vqmmc-supply = <0x1b>; mmc-pwrseq = <0x1c>; bus-width = <0x04>; non-removable; mmc-ddr-1_8v; phandle = <0x6b>; }; mmc@4022000 { compatible = "allwinner,sun50i-h616-emmc\0allwinner,sun50i-a100-emmc"; reg = <0x4022000 0x1000>; clocks = <0x02 0x41 0x02 0x3e>; clock-names = "ahb\0mmc"; resets = <0x02 0x10>; reset-names = "ahb"; interrupts = <0x00 0x25 0x04>; pinctrl-names = "default"; pinctrl-0 = <0x1d>; status = "disabled"; max-frequency = <0x8f0d180>; cap-sd-highspeed; cap-mmc-highspeed; mmc-ddr-3_3v; cap-sdio-irq; #address-cells = <0x01>; #size-cells = <0x00>; phandle = <0x6c>; }; serial@5000000 { compatible = "snps,dw-apb-uart"; reg = <0x5000000 0x400>; interrupts = <0x00 0x00 0x04>; reg-shift = <0x02>; reg-io-width = <0x04>; clocks = <0x02 0x42>; resets = <0x02 0x11>; status = "okay"; pinctrl-names = "default"; pinctrl-0 = <0x1e>; phandle = <0x6d>; }; serial@5000400 { compatible = "snps,dw-apb-uart"; reg = <0x5000400 0x400>; interrupts = <0x00 0x01 0x04>; reg-shift = <0x02>; reg-io-width = <0x04>; clocks = <0x02 0x43>; resets = <0x02 0x12>; status = "disabled"; phandle = <0x6e>; }; serial@5000800 { compatible = "snps,dw-apb-uart"; reg = <0x5000800 0x400>; interrupts = <0x00 0x02 0x04>; reg-shift = <0x02>; reg-io-width = <0x04>; clocks = <0x02 0x44>; resets = <0x02 0x13>; status = "disabled"; pinctrl-names = "default"; pinctrl-0 = <0x1f>; phandle = <0x6f>; }; serial@5000c00 { compatible = "snps,dw-apb-uart"; reg = <0x5000c00 0x400>; interrupts = <0x00 0x03 0x04>; reg-shift = <0x02>; reg-io-width = <0x04>; clocks = <0x02 0x45>; resets = <0x02 0x14>; status = "disabled"; pinctrl-names = "default"; pinctrl-0 = <0x20>; phandle = <0x70>; }; serial@5001000 { compatible = "snps,dw-apb-uart"; reg = <0x5001000 0x400>; interrupts = <0x00 0x04 0x04>; reg-shift = <0x02>; reg-io-width = <0x04>; clocks = <0x02 0x46>; resets = <0x02 0x15>; status = "disabled"; pinctrl-names = "default"; pinctrl-0 = <0x21>; phandle = <0x71>; }; serial@5001400 { compatible = "snps,dw-apb-uart"; reg = <0x5001400 0x400>; interrupts = <0x00 0x05 0x04>; reg-shift = <0x02>; reg-io-width = <0x04>; clocks = <0x02 0x47>; resets = <0x02 0x16>; status = "disabled"; phandle = <0x72>; }; i2c@5002000 { compatible = "allwinner,sun50i-h616-i2c\0allwinner,sun8i-v536-i2c\0allwinner,sun6i-a31-i2c"; reg = <0x5002000 0x400>; interrupts = <0x00 0x06 0x04>; clocks = <0x02 0x48>; resets = <0x02 0x17>; pinctrl-names = "default"; pinctrl-0 = <0x22>; status = "disabled"; #address-cells = <0x01>; #size-cells = <0x00>; phandle = <0x73>; }; i2c@5002400 { compatible = "allwinner,sun50i-h616-i2c\0allwinner,sun8i-v536-i2c\0allwinner,sun6i-a31-i2c"; reg = <0x5002400 0x400>; interrupts = <0x00 0x07 0x04>; clocks = <0x02 0x49>; resets = <0x02 0x18>; status = "disabled"; #address-cells = <0x01>; #size-cells = <0x00>; phandle = <0x74>; }; i2c@5002800 { compatible = "allwinner,sun50i-h616-i2c\0allwinner,sun8i-v536-i2c\0allwinner,sun6i-a31-i2c"; reg = <0x5002800 0x400>; interrupts = <0x00 0x08 0x04>; clocks = <0x02 0x4a>; resets = <0x02 0x19>; status = "disabled"; #address-cells = <0x01>; #size-cells = <0x00>; phandle = <0x75>; }; i2c@5002c00 { compatible = "allwinner,sun50i-h616-i2c\0allwinner,sun8i-v536-i2c\0allwinner,sun6i-a31-i2c"; reg = <0x5002c00 0x400>; interrupts = <0x00 0x09 0x04>; clocks = <0x02 0x4b>; resets = <0x02 0x1a>; status = "okay"; #address-cells = <0x01>; #size-cells = <0x00>; pinctrl-names = "default"; pinctrl-0 = <0x23>; phandle = <0x76>; mfd@10 { compatible = "x-powers,ac200-sunxi"; reg = <0x10>; clocks = <0x24>; nvmem-cells = <0x25>; nvmem-cell-names = "calibration"; phandle = <0x77>; phy { compatible = "x-powers,ac200-ephy-sunxi"; status = "okay"; phandle = <0x78>; }; }; }; i2c@5003000 { compatible = "allwinner,sun50i-h616-i2c\0allwinner,sun8i-v536-i2c\0allwinner,sun6i-a31-i2c"; reg = <0x5003000 0x400>; interrupts = <0x00 0x0a 0x04>; clocks = <0x02 0x4c>; resets = <0x02 0x1b>; status = "disabled"; #address-cells = <0x01>; #size-cells = <0x00>; pinctrl-names = "default"; pinctrl-0 = <0x26>; phandle = <0x79>; }; spi@5010000 { compatible = "allwinner,sun50i-h616-spi\0allwinner,sun8i-h3-spi"; reg = <0x5010000 0x1000>; interrupts = <0x00 0x0c 0x04>; clocks = <0x02 0x4f 0x02 0x4d>; clock-names = "ahb\0mod"; dmas = <0x0d 0x16 0x0d 0x16>; dma-names = "rx\0tx"; resets = <0x02 0x1c>; pinctrl-names = "default"; pinctrl-0 = <0x27 0x28>; status = "okay"; #address-cells = <0x01>; #size-cells = <0x00>; phandle = <0x7a>; flash@0 { #address-cells = <0x01>; #size-cells = <0x01>; compatible = "jedec,spi-nor"; reg = <0x00>; spi-max-frequency = <0x2625a00>; }; }; spi@5011000 { compatible = "allwinner,sun50i-h616-spi\0allwinner,sun8i-h3-spi"; reg = <0x5011000 0x1000>; interrupts = <0x00 0x0d 0x04>; clocks = <0x02 0x50 0x02 0x4e>; clock-names = "ahb\0mod"; dmas = <0x0d 0x17 0x0d 0x17>; dma-names = "rx\0tx"; resets = <0x02 0x1d>; pinctrl-names = "default"; pinctrl-0 = <0x29 0x2a>; status = "disabled"; #address-cells = <0x01>; #size-cells = <0x00>; phandle = <0x7b>; spidev@1 { compatible = "rohm,dh2228fv"; status = "disabled"; reg = <0x01>; spi-max-frequency = <0xf4240>; }; }; ethernet@5020000 { compatible = "allwinner,sun50i-h616-emac0\0allwinner,sun50i-a64-emac"; reg = <0x5020000 0x10000>; interrupts = <0x00 0x0e 0x04>; interrupt-names = "macirq"; clocks = <0x02 0x52>; clock-names = "stmmaceth"; resets = <0x02 0x1e>; reset-names = "stmmaceth"; syscon = <0x2b>; status = "disabled"; phandle = <0x7c>; mdio { compatible = "snps,dwmac-mdio"; #address-cells = <0x01>; #size-cells = <0x00>; phandle = <0x7d>; }; }; ethernet@5030000 { compatible = "allwinner,sunxi-gmac"; reg = <0x5030000 0x10000 0x3000034 0x04>; reg-names = "gmac1_reg\0ephy_reg"; interrupts = <0x00 0x0f 0x04>; interrupt-names = "gmacirq"; resets = <0x02 0x1f>; reset-names = "stmmaceth"; clocks = <0x02 0x53 0x02 0x51>; clock-names = "bus-emac1\0emac-25m"; pinctrl-0 = <0x2c>; pinctrl-names = "default"; tx-delay = <0x07>; rx-delay = <0x1f>; phy-rst; gmac-power0; gmac-power1; gmac-power2; status = "okay"; phy-mode = "rmii"; phy-handle = <0x2d>; phy-supply = <0x15>; allwinner,rx-delay-ps = <0xc1c>; allwinner,tx-delay-ps = <0x2bc>; phandle = <0x7e>; mdio { compatible = "ethernet-phy-ieee802.3-c22"; #address-cells = <0x01>; #size-cells = <0x00>; phandle = <0x7f>; ethernet-phy@1 { compatible = "ethernet-phy-ieee802.3-c22"; reg = <0x01>; phandle = <0x2d>; }; }; }; usb@5100000 { compatible = "allwinner,sun50i-h616-musb\0allwinner,sun8i-h3-musb"; reg = <0x5100000 0x400>; clocks = <0x02 0x70>; resets = <0x02 0x32>; interrupts = <0x00 0x19 0x04>; interrupt-names = "mc"; phys = <0x2e 0x00>; phy-names = "usb"; extcon = <0x2e 0x00>; status = "okay"; dr_mode = "peripheral"; phandle = <0x80>; }; phy@5100400 { compatible = "allwinner,sun50i-h616-usb-phy"; reg = <0x5100400 0x24 0x5101800 0x14 0x5200800 0x14 0x5310800 0x14 0x5311800 0x14>; reg-names = "phy_ctrl\0pmu0\0pmu1\0pmu2\0pmu3"; clocks = <0x02 0x61 0x02 0x63 0x02 0x65 0x02 0x67 0x02 0x6e>; clock-names = "usb0_phy\0usb1_phy\0usb2_phy\0usb3_phy\0pmu2_clk"; resets = <0x02 0x26 0x02 0x27 0x02 0x28 0x02 0x29>; reset-names = "usb0_reset\0usb1_reset\0usb2_reset\0usb3_reset"; status = "okay"; #phy-cells = <0x01>; usb1_vbus-supply = <0x2f>; phandle = <0x2e>; }; usb@5101000 { compatible = "allwinner,sun50i-h616-ehci\0generic-ehci"; reg = <0x5101000 0x100>; interrupts = <0x00 0x1a 0x04>; clocks = <0x02 0x68 0x02 0x6c 0x02 0x60>; resets = <0x02 0x2a 0x02 0x2e>; phys = <0x2e 0x00>; phy-names = "usb"; status = "disabled"; phandle = <0x81>; }; usb@5101400 { compatible = "allwinner,sun50i-h616-ohci\0generic-ohci"; reg = <0x5101400 0x100>; interrupts = <0x00 0x1b 0x04>; clocks = <0x02 0x68 0x02 0x60>; resets = <0x02 0x2a>; phys = <0x2e 0x00>; phy-names = "usb"; status = "disabled"; phandle = <0x82>; }; usb@5200000 { compatible = "allwinner,sun50i-h616-ehci\0generic-ehci"; reg = <0x5200000 0x100>; interrupts = <0x00 0x1c 0x04>; clocks = <0x02 0x69 0x02 0x6d 0x02 0x62>; resets = <0x02 0x2b 0x02 0x2f>; phys = <0x2e 0x01>; phy-names = "usb"; status = "okay"; phandle = <0x83>; }; usb@5200400 { compatible = "allwinner,sun50i-h616-ohci\0generic-ohci"; reg = <0x5200400 0x100>; interrupts = <0x00 0x1d 0x04>; clocks = <0x02 0x69 0x02 0x62>; resets = <0x02 0x2b>; phys = <0x2e 0x01>; phy-names = "usb"; status = "okay"; phandle = <0x84>; }; usb@5310000 { compatible = "allwinner,sun50i-h616-ehci\0generic-ehci"; reg = <0x5310000 0x100>; interrupts = <0x00 0x1e 0x04>; clocks = <0x02 0x6a 0x02 0x6e 0x02 0x64>; resets = <0x02 0x2c 0x02 0x30>; phys = <0x2e 0x02>; phy-names = "usb"; status = "okay"; phandle = <0x85>; }; usb@5310400 { compatible = "allwinner,sun50i-h616-ohci\0generic-ohci"; reg = <0x5310400 0x100>; interrupts = <0x00 0x1f 0x04>; clocks = <0x02 0x6a 0x02 0x64>; resets = <0x02 0x2c>; phys = <0x2e 0x02>; phy-names = "usb"; status = "okay"; phandle = <0x86>; }; usb@5311000 { compatible = "allwinner,sun50i-h616-ehci\0generic-ehci"; reg = <0x5311000 0x100>; interrupts = <0x00 0x20 0x04>; clocks = <0x02 0x6b 0x02 0x6f 0x02 0x66>; resets = <0x02 0x2d 0x02 0x31>; phys = <0x2e 0x03>; phy-names = "usb"; status = "okay"; phandle = <0x87>; }; usb@5311400 { compatible = "allwinner,sun50i-h616-ohci\0generic-ohci"; reg = <0x5311400 0x100>; interrupts = <0x00 0x21 0x04>; clocks = <0x02 0x6b 0x02 0x66>; resets = <0x02 0x2d>; phys = <0x2e 0x03>; phy-names = "usb"; status = "okay"; phandle = <0x88>; }; hdmi@6000000 { #sound-dai-cells = <0x00>; compatible = "allwinner,sun50i-h616-dw-hdmi\0allwinner,sun50i-h6-dw-hdmi"; reg = <0x6000000 0x10000>; reg-io-width = <0x01>; interrupts = <0x00 0x3f 0x04>; clocks = <0x02 0x75 0x02 0x73 0x02 0x72 0x02 0x74 0x02 0x7e 0x02 0x7f>; clock-names = "iahb\0isfr\0tmds\0cec\0hdcp\0hdcp-bus"; resets = <0x02 0x33 0x02 0x3a>; reset-names = "ctrl\0hdcp"; phys = <0x30>; phy-names = "phy"; status = "okay"; phandle = <0x10>; ports { #address-cells = <0x01>; #size-cells = <0x00>; port@0 { reg = <0x00>; phandle = <0x89>; endpoint { remote-endpoint = <0x31>; phandle = <0x36>; }; }; port@1 { reg = <0x01>; phandle = <0x8a>; endpoint { remote-endpoint = <0x32>; phandle = <0x4c>; }; }; }; }; hdmi-phy@6010000 { compatible = "allwinner,sun50i-h616-hdmi-phy"; reg = <0x6010000 0x10000>; clocks = <0x02 0x75 0x02 0x73>; clock-names = "bus\0mod"; resets = <0x02 0x34>; reset-names = "phy"; #phy-cells = <0x00>; phandle = <0x30>; }; tcon-top@6510000 { compatible = "allwinner,sun50i-h6-tcon-top"; reg = <0x6510000 0x1000>; clocks = <0x02 0x76 0x02 0x77>; clock-names = "bus\0tcon-tv0"; clock-output-names = "tcon-top-tv0"; resets = <0x02 0x35>; #clock-cells = <0x01>; phandle = <0x37>; ports { #address-cells = <0x01>; #size-cells = <0x00>; port@0 { #address-cells = <0x01>; #size-cells = <0x00>; reg = <0x00>; phandle = <0x8b>; endpoint@0 { reg = <0x00>; remote-endpoint = <0x33>; phandle = <0x0c>; }; }; port@1 { #address-cells = <0x01>; #size-cells = <0x00>; reg = <0x01>; phandle = <0x8c>; endpoint@2 { reg = <0x02>; remote-endpoint = <0x34>; phandle = <0x38>; }; }; port@4 { #address-cells = <0x01>; #size-cells = <0x00>; reg = <0x04>; phandle = <0x8d>; endpoint@0 { reg = <0x00>; remote-endpoint = <0x35>; phandle = <0x39>; }; }; port@5 { reg = <0x05>; phandle = <0x8e>; endpoint { remote-endpoint = <0x36>; phandle = <0x31>; }; }; }; }; lcd-controller@6515000 { compatible = "allwinner,sun50i-h6-tcon-tv\0allwinner,sun8i-r40-tcon-tv"; reg = <0x6515000 0x1000>; interrupts = <0x00 0x42 0x04>; clocks = <0x02 0x79 0x37 0x00>; clock-names = "ahb\0tcon-ch1"; resets = <0x02 0x36>; reset-names = "lcd"; phandle = <0x8f>; ports { #address-cells = <0x01>; #size-cells = <0x00>; port@0 { reg = <0x00>; phandle = <0x90>; endpoint { remote-endpoint = <0x38>; phandle = <0x34>; }; }; port@1 { #address-cells = <0x01>; #size-cells = <0x00>; reg = <0x01>; phandle = <0x91>; endpoint@1 { reg = <0x01>; remote-endpoint = <0x39>; phandle = <0x35>; }; }; }; }; rtc@7000000 { compatible = "allwinner,sun50i-h616-rtc"; reg = <0x7000000 0x400>; interrupts = <0x00 0x68 0x04>; clocks = <0x3a 0x0e 0x13 0x02 0x80>; clock-names = "bus\0hosc\0pll-32k"; #clock-cells = <0x01>; phandle = <0x14>; }; clock@7010000 { compatible = "allwinner,sun50i-h616-r-ccu"; reg = <0x7010000 0x210>; clocks = <0x13 0x14 0x00 0x14 0x02 0x02 0x04>; clock-names = "hosc\0losc\0iosc\0pll-periph"; #clock-cells = <0x01>; #reset-cells = <0x01>; phandle = <0x3a>; }; pinctrl@7022000 { compatible = "allwinner,sun50i-h616-r-pinctrl"; reg = <0x7022000 0x400>; interrupts = <0x00 0x8f 0x04>; clocks = <0x3a 0x02 0x13 0x14 0x00>; clock-names = "apb\0hosc\0losc"; gpio-controller; #gpio-cells = <0x03>; interrupt-controller; #interrupt-cells = <0x03>; phandle = <0x92>; r-i2c-pins { pins = "PL0\0PL1"; function = "s_i2c"; phandle = <0x93>; }; r-rsb-pins { pins = "PL0\0PL1"; function = "s_rsb"; phandle = <0x3c>; }; }; ir@7040000 { compatible = "allwinner,sun50i-h616-ir\0allwinner,sun6i-a31-ir"; reg = <0x7040000 0x400>; interrupts = <0x00 0x6a 0x04>; clocks = <0x3a 0x09 0x3a 0x0b>; clock-names = "apb\0ir"; resets = <0x3a 0x05>; pinctrl-names = "default"; pinctrl-0 = <0x3b>; status = "okay"; phandle = <0x94>; }; i2c@7081400 { compatible = "allwinner,sun50i-h616-i2c\0allwinner,sun8i-v536-i2c\0allwinner,sun6i-a31-i2c"; reg = <0x7081400 0x400>; interrupts = <0x00 0x69 0x04>; clocks = <0x3a 0x08>; resets = <0x3a 0x04>; status = "okay"; #address-cells = <0x01>; #size-cells = <0x00>; phandle = <0x95>; pmic@36 { compatible = "x-powers,axp313a"; reg = <0x36>; #interrupt-cells = <0x01>; interrupt-controller; interrupt-parent = <0x18>; interrupts = <0x02 0x09 0x08>; vin1-supply = <0x2f>; vin2-supply = <0x2f>; vin3-supply = <0x2f>; phandle = <0x96>; regulators { aldo1 { regulator-always-on; regulator-min-microvolt = <0x1b7740>; regulator-max-microvolt = <0x1b7740>; regulator-name = "vcc1v8"; phandle = <0x16>; }; dldo1 { regulator-always-on; regulator-min-microvolt = <0x325aa0>; regulator-max-microvolt = <0x325aa0>; regulator-name = "vcc3v3"; phandle = <0x15>; }; dcdc1 { regulator-always-on; regulator-min-microvolt = <0xc5c10>; regulator-max-microvolt = <0xf1b30>; regulator-step-delay-us = <0x19>; regulator-final-delay-us = <0x32>; regulator-name = "vdd-gpu-sys"; phandle = <0x11>; }; dcdc2 { regulator-always-on; regulator-min-microvolt = <0x7a120>; regulator-max-microvolt = <0x10c8e0>; regulator-step-delay-us = <0x19>; regulator-final-delay-us = <0x32>; regulator-ramp-delay = <0xc8>; regulator-name = "vdd-cpu"; phandle = <0x04>; }; dcdc3 { regulator-always-on; regulator-min-microvolt = <0x10c8e0>; regulator-max-microvolt = <0x10c8e0>; regulator-step-delay-us = <0x19>; regulator-final-delay-us = <0x32>; regulator-name = "vdd-dram"; phandle = <0x97>; }; }; }; }; rsb@7083000 { compatible = "allwinner,sun50i-h616-rsb\0allwinner,sun8i-a23-rsb"; reg = <0x7083000 0x400>; interrupts = <0x00 0x6d 0x04>; clocks = <0x3a 0x0d>; clock-frequency = <0x2dc6c0>; resets = <0x3a 0x07>; pinctrl-names = "default"; pinctrl-0 = <0x3c>; status = "disabled"; #address-cells = <0x01>; #size-cells = <0x00>; phandle = <0x98>; }; thermal-sensor@5070400 { compatible = "allwinner,sun50i-h616-ths"; reg = <0x5070400 0x400>; interrupts = <0x00 0x13 0x04>; clocks = <0x02 0x56>; clock-names = "bus"; resets = <0x02 0x21>; nvmem-cells = <0x3d>; nvmem-cell-names = "calibration"; #thermal-sensor-cells = <0x01>; phandle = <0x49>; }; dump_reg@20000 { compatible = "allwinner,sunxi-dump-reg"; reg = <0x00 0x3001000 0x00 0xf20>; status = "okay"; phandle = <0x99>; }; sunxi-info { compatible = "allwinner,sun50i-h616-sys-info"; status = "okay"; }; addr-mgt { compatible = "allwinner,sunxi-addr_mgt"; type_addr_wifi = <0x02>; type_addr_bt = <0x02>; type_addr_eth = <0x02>; status = "okay"; phandle = <0x9a>; }; pwm@300a000 { compatible = "allwinner,sun50i-h616-pwm"; reg = <0x300a000 0x400>; clocks = <0x13 0x02 0x2f>; clock-names = "mod\0bus"; resets = <0x02 0x0a>; pwm-number = <0x06>; pwm-base = <0x00>; sunxi-pwms = <0x3e 0x3f 0x40 0x41 0x42 0x43>; #pwm-cells = <0x03>; status = "okay"; phandle = <0x4d>; }; pwm0@0300a000 { compatible = "allwinner,sunxi-pwm0"; phandle = <0x3e>; }; pwm1@0300a000 { compatible = "allwinner,sunxi-pwm1"; pinctrl-names = "default"; pinctrl-0 = <0x44>; phandle = <0x3f>; }; pwm2@0300a000 { compatible = "allwinner,sunxi-pwm2"; pinctrl-names = "default"; pinctrl-0 = <0x45>; phandle = <0x40>; }; pwm3@0300a000 { compatible = "allwinner,sunxi-pwm3"; pinctrl-names = "default"; pinctrl-0 = <0x46>; phandle = <0x41>; }; pwm4@0300a000 { compatible = "allwinner,sunxi-pwm4"; pinctrl-names = "default"; pinctrl-0 = <0x47>; phandle = <0x42>; }; pwm5@0300a000 { compatible = "allwinner,sunxi-pwm5"; pinctrl-names = "default"; pinctrl-0 = <0x48>; clk_bypass_output = <0x01>; status = "okay"; phandle = <0x43>; }; }; thermal-zones { cpu-thermal { polling-delay-passive = <0x1f4>; polling-delay = <0x3e8>; thermal-sensors = <0x49 0x02>; sustainable-power = <0x3e8>; k_po = <0x14>; k_pu = <0x28>; k_i = <0x00>; trips { trip-point@0 { temperature = <0xea60>; type = "passive"; hysteresis = <0x00>; phandle = <0x9b>; }; trip-point@1 { temperature = <0x11170>; type = "passive"; hysteresis = <0x00>; phandle = <0x4a>; }; trip-point@2 { temperature = <0x186a0>; type = "critical"; hysteresis = <0x00>; phandle = <0x9c>; }; }; cooling-maps { map0 { trip = <0x4a>; cooling-device = <0x06 0xffffffff 0xffffffff 0x07 0xffffffff 0xffffffff 0x08 0xffffffff 0xffffffff 0x09 0xffffffff 0xffffffff>; }; }; }; gpu-thermal { polling-delay-passive = <0x1f4>; polling-delay = <0x3e8>; thermal-sensors = <0x49 0x00>; sustainable-power = <0x44c>; trips { trip-point@0 { temperature = <0x186a0>; type = "critical"; hysteresis = <0x00>; phandle = <0x9d>; }; }; }; ve-thermal { polling-delay-passive = <0x00>; polling-delay = <0x00>; thermal-sensors = <0x49 0x01>; trips { trip-point@0 { temperature = <0x186a0>; type = "critical"; hysteresis = <0x00>; phandle = <0x9e>; }; }; }; ddr-thermal { polling-delay-passive = <0x00>; polling-delay = <0x00>; thermal-sensors = <0x49 0x03>; trips { trip-point@0 { temperature = <0x186a0>; type = "critical"; hysteresis = <0x00>; phandle = <0x9f>; }; }; }; }; opp-table-cpu { compatible = "allwinner,sun50i-h616-operating-points"; nvmem-cells = <0x4b>; opp-shared; phandle = <0x03>; opp-480000000 { clock-latency-ns = <0x3b9b0>; opp-hz = <0x00 0x1c9c3800>; opp-microvolt-speed0 = <0xc8320 0xc8320 0x10c8e0>; opp-microvolt-speed1 = <0xd6d80 0xd6d80 0x10c8e0>; opp-microvolt-speed2 = <0xd6d80 0xd6d80 0x10c8e0>; }; opp-600000000 { clock-latency-ns = <0x3b9b0>; opp-hz = <0x00 0x23c34600>; opp-microvolt-speed0 = <0xc8320 0xc8320 0x10c8e0>; opp-microvolt-speed1 = <0xd6d80 0xd6d80 0x10c8e0>; opp-microvolt-speed2 = <0xd6d80 0xd6d80 0x10c8e0>; }; opp-792000000 { clock-latency-ns = <0x3b9b0>; opp-hz = <0x00 0x2f34f600>; opp-microvolt-speed0 = <0xd1f60 0xd1f60 0x10c8e0>; opp-microvolt-speed1 = <0xe57e0 0xe57e0 0x10c8e0>; opp-microvolt-speed2 = <0xe57e0 0xe57e0 0x10c8e0>; }; opp-1008000000 { clock-latency-ns = <0x3b9b0>; opp-hz = <0x00 0x3c14dc00>; opp-microvolt-speed0 = <0xdbba0 0xdbba0 0x10c8e0>; opp-microvolt-speed1 = <0xf9060 0xf9060 0x10c8e0>; opp-microvolt-speed2 = <0xf9060 0xf9060 0x10c8e0>; }; opp-1200000000 { clock-latency-ns = <0x3b9b0>; opp-hz = <0x00 0x47868c00>; opp-microvolt-speed0 = <0xea600 0xea600 0x10c8e0>; opp-microvolt-speed1 = <0x10c8e0 0x10c8e0 0x10c8e0>; opp-microvolt-speed2 = <0x10c8e0 0x10c8e0 0x10c8e0>; }; opp-1512000000 { clock-latency-ns = <0x3b9b0>; opp-hz = <0x00 0x5a1f4a00>; opp-microvolt-speed0 = <0x10c8e0 0x10c8e0 0x10c8e0>; opp-microvolt-speed1 = <0x10c8e0 0x10c8e0 0x10c8e0>; opp-microvolt-speed2 = <0x10c8e0 0x10c8e0 0x10c8e0>; }; }; aliases { serial0 = "/soc/serial@5000000"; serial2 = "/soc/serial@5000800"; serial3 = "/soc/serial@5000c00"; serial4 = "/soc/serial@5001000"; serial5 = "/soc/serial@5001400"; }; chosen { stdout-path = "serial0:115200n8"; }; connector { compatible = "hdmi-connector"; type = "d"; port { endpoint { remote-endpoint = <0x4c>; phandle = <0x32>; }; }; }; leds { compatible = "gpio-leds"; led-0 { function = "status"; color = <0x02>; label = "green_led"; gpios = <0x18 0x02 0x0d 0x00>; linux,default-trigger = "heartbeat"; }; 100m_link { label = "100m_link"; gpios = <0x18 0x02 0x0f 0x00>; default-state = "off"; }; 100m_act { label = "100m_act"; gpios = <0x18 0x02 0x10 0x00>; default-state = "off"; }; }; vcc5v { compatible = "regulator-fixed"; regulator-name = "vcc-5v"; regulator-min-microvolt = <0x4c4b40>; regulator-max-microvolt = <0x4c4b40>; regulator-always-on; phandle = <0x2f>; }; vcc3v3 { compatible = "regulator-fixed"; regulator-name = "vcc-3v3"; regulator-min-microvolt = <0x325aa0>; regulator-max-microvolt = <0x325aa0>; vin-supply = <0x2f>; regulator-always-on; phandle = <0x1a>; }; vcc-wifi-io { compatible = "regulator-fixed"; regulator-name = "vcc-wifi-io"; regulator-min-microvolt = <0x1b7740>; regulator-max-microvolt = <0x1b7740>; regulator-always-on; vin-supply = <0x1a>; phandle = <0x1b>; }; wifi-pwrseq { compatible = "mmc-pwrseq-simple"; clocks = <0x14 0x01>; clock-names = "osc32k-out"; reset-gpios = <0x18 0x06 0x12 0x01>; post-power-on-delay-ms = <0xc8>; phandle = <0x1c>; }; ac200_clk { compatible = "pwm-clock"; #clock-cells = <0x00>; pwms = <0x4d 0x05 0x1f4 0x00>; clock-frequency = <0x1e8480>; status = "okay"; phandle = <0x24>; }; __symbols__ { cpu0 = "/cpus/cpu@0"; cpu1 = "/cpus/cpu@1"; cpu2 = "/cpus/cpu@2"; cpu3 = "/cpus/cpu@3"; de = "/display-engine"; osc24M = "/osc24M-clk"; display_clocks = "/soc/bus@1000000/clock@8000"; mixer0 = "/soc/bus@1000000/mixer@100000"; mixer0_out = "/soc/bus@1000000/mixer@100000/ports/port@1"; mixer0_out_tcon_top_mixer0 = "/soc/bus@1000000/mixer@100000/ports/port@1/endpoint"; dma = "/soc/dma-controller@3002000"; codec = "/soc/codec@05096000"; ahub_dam_plat = "/soc/ahub_dam_plat@5097000"; ahub1_plat = "/soc/ahub1_plat"; ahub1_mach = "/soc/ahub1_mach"; ahub1_cpu = "/soc/ahub1_mach/soundcard-mach,cpu"; ahub1_codec = "/soc/ahub1_mach/soundcard-mach,codec"; gpu = "/soc/gpu@1800000"; syscon = "/soc/syscon@3000000"; sram_a2 = "/soc/syscon@3000000/sram@100000"; scpi_sram = "/soc/syscon@3000000/sram@100000/scpi-sram@17c00"; sram_c = "/soc/syscon@3000000/sram@28000"; de3_sram = "/soc/syscon@3000000/sram@28000/sram-section@0"; sram_c1 = "/soc/syscon@3000000/sram@1a00000"; ve_sram = "/soc/syscon@3000000/sram@1a00000/sram-section@0"; ccu = "/soc/clock@3001000"; sid = "/soc/efuse@3006000"; cpu_speed_grade = "/soc/efuse@3006000/cpu-speed-grade@0"; ths_calibration = "/soc/efuse@3006000/thermal-sensor-calibration@14"; ephy_calibration = "/soc/efuse@3006000/ephy-calibration@2c"; watchdog = "/soc/watchdog@30090a0"; pio = "/soc/pinctrl@300b000"; ext_rgmii_pins = "/soc/pinctrl@300b000/rgmii-pins"; i2c0_pins = "/soc/pinctrl@300b000/i2c0-pins"; i2c2_ph_pins = "/soc/pinctrl@300b000/i2c2-ph-pins"; i2c3_pg_pins = "/soc/pinctrl@300b000/i2c3-pg-pins"; i2c3_ph_pins = "/soc/pinctrl@300b000/i2c3-ph-pins"; i2c4_pg_pins = "/soc/pinctrl@300b000/i2c4-pg-pins"; i2c4_ph_pins = "/soc/pinctrl@300b000/i2c4-ph-pins"; ir_rx_pin = "/soc/pinctrl@300b000/ir-rx-pin"; mmc0_pins = "/soc/pinctrl@300b000/mmc0-pins"; mmc1_pins = "/soc/pinctrl@300b000/mmc1-pins"; mmc2_pins = "/soc/pinctrl@300b000/mmc2-pins"; rmii_pins = "/soc/pinctrl@300b000/rmii-pins"; spi0_pins = "/soc/pinctrl@300b000/spi0-pins"; spi0_cs0_pin = "/soc/pinctrl@300b000/spi0-cs0-pin"; spi1_pins = "/soc/pinctrl@300b000/spi1-pins"; spi1_cs0_pin = "/soc/pinctrl@300b000/spi1-cs0-pin"; spi1_cs1_pin = "/soc/pinctrl@300b000/spi1-cs1-pin"; uart0_ph_pins = "/soc/pinctrl@300b000/uart0-ph-pins"; uart1_pins = "/soc/pinctrl@300b000/uart1-pins"; uart1_rts_cts_pins = "/soc/pinctrl@300b000/uart1-rts-cts-pins"; uart2_pins = "/soc/pinctrl@300b000/uart2-pins"; uart2_rts_cts_pins = "/soc/pinctrl@300b000/uart2-rts-cts-pins"; uart5_pins = "/soc/pinctrl@300b000/uart5-pins"; uart2_pi_pins = "/soc/pinctrl@300b000/uart2-pi-pins"; uart3_pi_pins = "/soc/pinctrl@300b000/uart3-pi-pins"; uart4_pi_pins = "/soc/pinctrl@300b000/uart4-pi-pins"; i2c0_pi_pins = "/soc/pinctrl@300b000/i2c0-pi-pins"; i2c1_pi_pins = "/soc/pinctrl@300b000/i2c1-pi-pins"; i2c2_pi_pins = "/soc/pinctrl@300b000/i2c2-pi-pins"; i2c3_pa_pins = "/soc/pinctrl@300b000/i2c3-pa-pins"; pwm1_ph_pin = "/soc/pinctrl@300b000/pwm1-ph-pin"; pwm2_ph_pin = "/soc/pinctrl@300b000/pwm2-ph-pin"; pwm3_ph_pin = "/soc/pinctrl@300b000/pwm3-ph-pin"; pwm4_ph_pin = "/soc/pinctrl@300b000/pwm4-ph-pin"; pwm5_pin = "/soc/pinctrl@300b000/pwm5-pin"; gic = "/soc/interrupt-controller@3021000"; iommu = "/soc/iommu@30f0000"; mmc0 = "/soc/mmc@4020000"; mmc1 = "/soc/mmc@4021000"; mmc2 = "/soc/mmc@4022000"; uart0 = "/soc/serial@5000000"; uart1 = "/soc/serial@5000400"; uart2 = "/soc/serial@5000800"; uart3 = "/soc/serial@5000c00"; uart4 = "/soc/serial@5001000"; uart5 = "/soc/serial@5001400"; i2c0 = "/soc/i2c@5002000"; i2c1 = "/soc/i2c@5002400"; i2c2 = "/soc/i2c@5002800"; i2c3 = "/soc/i2c@5002c00"; ac200_x = "/soc/i2c@5002c00/mfd@10"; ac200_ephy = "/soc/i2c@5002c00/mfd@10/phy"; i2c4 = "/soc/i2c@5003000"; spi0 = "/soc/spi@5010000"; spi1 = "/soc/spi@5011000"; emac0 = "/soc/ethernet@5020000"; mdio0 = "/soc/ethernet@5020000/mdio"; emac1 = "/soc/ethernet@5030000"; mdio1 = "/soc/ethernet@5030000/mdio"; rmii_phy = "/soc/ethernet@5030000/mdio/ethernet-phy@1"; usbotg = "/soc/usb@5100000"; usbphy = "/soc/phy@5100400"; ehci0 = "/soc/usb@5101000"; ohci0 = "/soc/usb@5101400"; ehci1 = "/soc/usb@5200000"; ohci1 = "/soc/usb@5200400"; ehci2 = "/soc/usb@5310000"; ohci2 = "/soc/usb@5310400"; ehci3 = "/soc/usb@5311000"; ohci3 = "/soc/usb@5311400"; hdmi = "/soc/hdmi@6000000"; hdmi_in = "/soc/hdmi@6000000/ports/port@0"; hdmi_in_tcon_top = "/soc/hdmi@6000000/ports/port@0/endpoint"; hdmi_out = "/soc/hdmi@6000000/ports/port@1"; hdmi_out_con = "/soc/hdmi@6000000/ports/port@1/endpoint"; hdmi_phy = "/soc/hdmi-phy@6010000"; tcon_top = "/soc/tcon-top@6510000"; tcon_top_mixer0_in = "/soc/tcon-top@6510000/ports/port@0"; tcon_top_mixer0_in_mixer0 = "/soc/tcon-top@6510000/ports/port@0/endpoint@0"; tcon_top_mixer0_out = "/soc/tcon-top@6510000/ports/port@1"; tcon_top_mixer0_out_tcon_tv = "/soc/tcon-top@6510000/ports/port@1/endpoint@2"; tcon_top_hdmi_in = "/soc/tcon-top@6510000/ports/port@4"; tcon_top_hdmi_in_tcon_tv = "/soc/tcon-top@6510000/ports/port@4/endpoint@0"; tcon_top_hdmi_out = "/soc/tcon-top@6510000/ports/port@5"; tcon_top_hdmi_out_hdmi = "/soc/tcon-top@6510000/ports/port@5/endpoint"; tcon_tv = "/soc/lcd-controller@6515000"; tcon_tv_in = "/soc/lcd-controller@6515000/ports/port@0"; tcon_tv_in_tcon_top_mixer0 = "/soc/lcd-controller@6515000/ports/port@0/endpoint"; tcon_tv_out = "/soc/lcd-controller@6515000/ports/port@1"; tcon_tv_out_tcon_top = "/soc/lcd-controller@6515000/ports/port@1/endpoint@1"; rtc = "/soc/rtc@7000000"; r_ccu = "/soc/clock@7010000"; r_pio = "/soc/pinctrl@7022000"; r_i2c_pins = "/soc/pinctrl@7022000/r-i2c-pins"; r_rsb_pins = "/soc/pinctrl@7022000/r-rsb-pins"; ir = "/soc/ir@7040000"; r_i2c = "/soc/i2c@7081400"; axp313 = "/soc/i2c@7081400/pmic@36"; reg_aldo1 = "/soc/i2c@7081400/pmic@36/regulators/aldo1"; reg_dldo1 = "/soc/i2c@7081400/pmic@36/regulators/dldo1"; reg_dcdc1 = "/soc/i2c@7081400/pmic@36/regulators/dcdc1"; reg_dcdc2 = "/soc/i2c@7081400/pmic@36/regulators/dcdc2"; reg_dcdc3 = "/soc/i2c@7081400/pmic@36/regulators/dcdc3"; r_rsb = "/soc/rsb@7083000"; ths = "/soc/thermal-sensor@5070400"; dump_reg = "/soc/dump_reg@20000"; addr_mgt = "/soc/addr-mgt"; pwm = "/soc/pwm@300a000"; pwm0 = "/soc/pwm0@0300a000"; pwm1 = "/soc/pwm1@0300a000"; pwm2 = "/soc/pwm2@0300a000"; pwm3 = "/soc/pwm3@0300a000"; pwm4 = "/soc/pwm4@0300a000"; pwm5 = "/soc/pwm5@0300a000"; cpu_threshold = "/thermal-zones/cpu-thermal/trips/trip-point@0"; cpu_target = "/thermal-zones/cpu-thermal/trips/trip-point@1"; cpu_temp_critical = "/thermal-zones/cpu-thermal/trips/trip-point@2"; gpu_temp_critical = "/thermal-zones/gpu-thermal/trips/trip-point@0"; ve_temp_critical = "/thermal-zones/ve-thermal/trips/trip-point@0"; ddr_temp_critical = "/thermal-zones/ddr-thermal/trips/trip-point@0"; cpu_opp_table = "/opp-table-cpu"; hdmi_con_in = "/connector/port/endpoint"; reg_vcc5v = "/vcc5v"; reg_vcc3v3 = "/vcc3v3"; reg_vcc_wifi_io = "/vcc-wifi-io"; wifi_pwrseq = "/wifi-pwrseq"; ac200_pwm_clk = "/ac200_clk"; }; }; EDIT: In case you were referring to the whole dts from /sys/firmware/devicetree/base, you may find it below. Spoiler /dts-v1/; / { #address-cells = <0x02>; model = "OrangePi Zero 2W"; #size-cells = <0x02>; interrupt-parent = <0x01>; compatible = "xunlong,orangepi-zero2w\0allwinner,sun50i-h618"; vcc5v { regulator-max-microvolt = <0x4c4b40>; regulator-always-on; regulator-min-microvolt = <0x4c4b40>; regulator-name = "vcc-5v"; compatible = "regulator-fixed"; phandle = <0x2f>; }; vcc3v3 { regulator-max-microvolt = <0x325aa0>; regulator-always-on; regulator-min-microvolt = <0x325aa0>; regulator-name = "vcc-3v3"; compatible = "regulator-fixed"; phandle = <0x1a>; vin-supply = <0x2f>; }; connector { type = "d"; compatible = "hdmi-connector"; port { endpoint { remote-endpoint = <0x4c>; phandle = <0x32>; }; }; }; backlight { pinctrl-names = "default"; default-on; compatible = "gpio-backlight"; status = "okay"; phandle = <0xa0>; gpios = <0x18 0x08 0x0e 0x00>; }; wifi-pwrseq { clock-names = "osc32k-out"; clocks = <0x14 0x01>; reset-gpios = <0x18 0x06 0x12 0x01>; compatible = "mmc-pwrseq-simple"; post-power-on-delay-ms = <0xc8>; phandle = <0x1c>; }; thermal-zones { cpu-thermal { polling-delay = <0x3e8>; polling-delay-passive = <0x1f4>; thermal-sensors = <0x49 0x02>; k_po = <0x14>; k_i = <0x00>; sustainable-power = <0x3e8>; k_pu = <0x28>; trips { trip-point@2 { temperature = <0x186a0>; hysteresis = <0x00>; type = "critical"; phandle = <0x9c>; }; trip-point@0 { temperature = <0xea60>; hysteresis = <0x00>; type = "passive"; phandle = <0x9b>; }; trip-point@1 { temperature = <0x11170>; hysteresis = <0x00>; type = "passive"; phandle = <0x4a>; }; }; cooling-maps { map0 { trip = <0x4a>; cooling-device = <0x06 0xffffffff 0xffffffff 0x07 0xffffffff 0xffffffff 0x08 0xffffffff 0xffffffff 0x09 0xffffffff 0xffffffff>; }; }; }; ddr-thermal { polling-delay = <0x00>; polling-delay-passive = <0x00>; thermal-sensors = <0x49 0x03>; trips { trip-point@0 { temperature = <0x186a0>; hysteresis = <0x00>; type = "critical"; phandle = <0x9f>; }; }; }; ve-thermal { polling-delay = <0x00>; polling-delay-passive = <0x00>; thermal-sensors = <0x49 0x01>; trips { trip-point@0 { temperature = <0x186a0>; hysteresis = <0x00>; type = "critical"; phandle = <0x9e>; }; }; }; gpu-thermal { polling-delay = <0x3e8>; polling-delay-passive = <0x1f4>; thermal-sensors = <0x49 0x00>; sustainable-power = <0x44c>; trips { trip-point@0 { temperature = <0x186a0>; hysteresis = <0x00>; type = "critical"; phandle = <0x9d>; }; }; }; }; soc { #address-cells = <0x01>; #size-cells = <0x01>; compatible = "simple-bus"; ranges = <0x00 0x00 0x00 0x40000000>; phy@5100400 { usb1_vbus-supply = <0x2f>; clock-names = "usb0_phy\0usb1_phy\0usb2_phy\0usb3_phy\0pmu2_clk"; reg-names = "phy_ctrl\0pmu0\0pmu1\0pmu2\0pmu3"; resets = <0x02 0x26 0x02 0x27 0x02 0x28 0x02 0x29>; clocks = <0x02 0x61 0x02 0x63 0x02 0x65 0x02 0x67 0x02 0x6e>; #phy-cells = <0x01>; compatible = "allwinner,sun50i-h616-usb-phy"; status = "okay"; reg = <0x5100400 0x24 0x5101800 0x14 0x5200800 0x14 0x5310800 0x14 0x5311800 0x14>; phandle = <0x2e>; reset-names = "usb0_reset\0usb1_reset\0usb2_reset\0usb3_reset"; }; gpu@1800000 { mali-supply = <0x11>; clock-names = "core\0bus"; resets = <0x02 0x03>; interrupts = <0x00 0x5f 0x04 0x00 0x60 0x04 0x00 0x61 0x04>; clocks = <0x02 0x23 0x02 0x24>; compatible = "allwinner,sun50i-h616-mali\0arm,mali-bifrost"; status = "okay"; interrupt-names = "job\0mmu\0gpu"; reg = <0x1800000 0x40000>; phandle = <0x54>; }; pwm0@0300a000 { compatible = "allwinner,sunxi-pwm0"; phandle = <0x3e>; }; syscon@3000000 { #address-cells = <0x01>; #size-cells = <0x01>; compatible = "allwinner,sun50i-h616-system-control"; ranges; reg = <0x3000000 0x30 0x3000038 0xfc8>; phandle = <0x2b>; sram@1a00000 { #address-cells = <0x01>; #size-cells = <0x01>; compatible = "mmio-sram"; ranges = <0x00 0x1a00000 0x200000>; reg = <0x1a00000 0x200000>; phandle = <0x58>; sram-section@0 { compatible = "allwinner,sun50i-h616-sram-c1"; reg = <0x00 0x200000>; phandle = <0x12>; }; }; sram@100000 { #address-cells = <0x01>; #size-cells = <0x01>; compatible = "mmio-sram"; ranges = <0x00 0x100000 0x18000>; reg = <0x100000 0x18000>; phandle = <0x55>; scpi-sram@17c00 { compatible = "arm,scp-shmem"; reg = <0x17c00 0x200>; phandle = <0x56>; }; }; sram@28000 { #address-cells = <0x01>; #size-cells = <0x01>; compatible = "mmio-sram"; ranges = <0x00 0x28000 0x30000>; reg = <0x28000 0x30000>; phandle = <0x57>; sram-section@0 { compatible = "allwinner,sun50i-h616-sram-c\0allwinner,sun50i-a64-sram-c"; reg = <0x00 0x1e000>; phandle = <0x0a>; }; }; }; mmc@4022000 { mmc-ddr-3_3v; pinctrl-names = "default"; #address-cells = <0x01>; pinctrl-0 = <0x1d>; clock-names = "ahb\0mmc"; cap-sd-highspeed; resets = <0x02 0x10>; cap-sdio-irq; interrupts = <0x00 0x25 0x04>; clocks = <0x02 0x41 0x02 0x3e>; #size-cells = <0x00>; compatible = "allwinner,sun50i-h616-emmc\0allwinner,sun50i-a100-emmc"; status = "disabled"; reg = <0x4022000 0x1000>; phandle = <0x6c>; max-frequency = <0x8f0d180>; cap-mmc-highspeed; reset-names = "ahb"; }; ethernet@5030000 { rx-delay = <0x1f>; gmac-power1; pinctrl-names = "default"; phy-supply = <0x15>; phy-mode = "rmii"; phy-rst; tx-delay = <0x07>; pinctrl-0 = <0x2c>; clock-names = "bus-emac1\0emac-25m"; reg-names = "gmac1_reg\0ephy_reg"; resets = <0x02 0x1f>; interrupts = <0x00 0x0f 0x04>; clocks = <0x02 0x53 0x02 0x51>; gmac-power2; gmac-power0; compatible = "allwinner,sunxi-gmac"; status = "okay"; interrupt-names = "gmacirq"; reg = <0x5030000 0x10000 0x3000034 0x04>; phandle = <0x7e>; allwinner,tx-delay-ps = <0x2bc>; phy-handle = <0x2d>; reset-names = "stmmaceth"; allwinner,rx-delay-ps = <0xc1c>; mdio { #address-cells = <0x01>; #size-cells = <0x00>; compatible = "ethernet-phy-ieee802.3-c22"; phandle = <0x7f>; ethernet-phy@1 { compatible = "ethernet-phy-ieee802.3-c22"; reg = <0x01>; phandle = <0x2d>; }; }; }; hdmi@6000000 { reg-io-width = <0x01>; phy-names = "phy"; clock-names = "iahb\0isfr\0tmds\0cec\0hdcp\0hdcp-bus"; resets = <0x02 0x33 0x02 0x3a>; interrupts = <0x00 0x3f 0x04>; clocks = <0x02 0x75 0x02 0x73 0x02 0x72 0x02 0x74 0x02 0x7e 0x02 0x7f>; #sound-dai-cells = <0x00>; compatible = "allwinner,sun50i-h616-dw-hdmi\0allwinner,sun50i-h6-dw-hdmi"; status = "okay"; phys = <0x30>; reg = <0x6000000 0x10000>; phandle = <0x10>; reset-names = "ctrl\0hdcp"; ports { #address-cells = <0x01>; #size-cells = <0x00>; port@0 { reg = <0x00>; phandle = <0x89>; endpoint { remote-endpoint = <0x31>; phandle = <0x36>; }; }; port@1 { reg = <0x01>; phandle = <0x8a>; endpoint { remote-endpoint = <0x32>; phandle = <0x4c>; }; }; }; }; clock@7010000 { #reset-cells = <0x01>; clock-names = "hosc\0losc\0iosc\0pll-periph"; clocks = <0x13 0x14 0x00 0x14 0x02 0x02 0x04>; #clock-cells = <0x01>; compatible = "allwinner,sun50i-h616-r-ccu"; reg = <0x7010000 0x210>; phandle = <0x3a>; }; pinctrl@300b000 { vcc-pi-supply = <0x15>; clock-names = "apb\0hosc\0losc"; gpio-controller; interrupts = <0x00 0x33 0x04 0x00 0x34 0x04 0x00 0x35 0x04 0x00 0x2b 0x04 0x00 0x36 0x04 0x00 0x37 0x04 0x00 0x38 0x04 0x00 0x39 0x04>; clocks = <0x02 0x1a 0x13 0x14 0x00>; compatible = "allwinner,sun50i-h616-pinctrl"; #interrupt-cells = <0x03>; vcc-pc-supply = <0x15>; reg = <0x300b000 0x400>; phandle = <0x18>; #gpio-cells = <0x03>; vcc-pf-supply = <0x15>; vcc-pg-supply = <0x16>; interrupt-controller; vcc-ph-supply = <0x15>; i2c4-ph-pins { function = "i2c4"; pins = "PH6\0PH7"; phandle = <0x26>; }; pwm2-ph-pin { function = "pwm2"; pins = "PH2"; phandle = <0x45>; }; pwm3-ph-pin { function = "pwm3"; pins = "PH0"; phandle = <0x46>; }; pwm4-ph-pin { function = "pwm4"; pins = "PH1"; phandle = <0x47>; }; spi1-cs0-pin { function = "spi1"; pins = "PH5"; phandle = <0x60>; }; i2c1-pi-pins { function = "i2c1"; pins = "PI7\0PI8"; phandle = <0x67>; }; i2c4-pg-pins { function = "i2c4"; pins = "PG15\0PG16"; phandle = <0x5f>; }; uart5-pins { function = "uart5"; pins = "PH2\0PH3"; phandle = <0x65>; }; rmii-pins { function = "emac1"; pins = "PA0\0PA1\0PA2\0PA3\0PA4\0PA5\0PA6\0PA7\0PA8\0PA9"; drive-strength = <0x28>; phandle = <0x2c>; }; pwm5-pin { function = "pwm5"; pins = "PA12"; phandle = <0x48>; }; mmc2-pins { function = "mmc2"; pins = "PC0\0PC1\0PC5\0PC6\0PC8\0PC9\0PC10\0PC11\0PC13\0PC14\0PC15\0PC16"; drive-strength = <0x1e>; phandle = <0x1d>; bias-pull-up; }; uart3-pi-pins { function = "uart3"; pins = "PI9\0PI10"; phandle = <0x20>; }; spi1-cs1-pin { function = "spi1"; pins = "PH9"; phandle = <0x2a>; }; ir-rx-pin { function = "ir_rx"; pins = "PH10"; phandle = <0x3b>; }; mmc1-pins { function = "mmc1"; pins = "PG0\0PG1\0PG2\0PG3\0PG4\0PG5"; drive-strength = <0x1e>; phandle = <0x19>; bias-pull-up; }; i2c3-ph-pins { function = "i2c3"; pins = "PH4\0PH5"; phandle = <0x5e>; }; uart1-rts-cts-pins { function = "uart1"; pins = "PG8\0PG9"; phandle = <0x62>; }; i2c3-pa-pins { function = "i2c3"; pins = "PA10\0PA11"; phandle = <0x23>; bias-pull-up; }; rgmii-pins { function = "emac0"; pins = "PI0\0PI1\0PI2\0PI3\0PI4\0PI5\0PI7\0PI8\0PI9\0PI10\0PI11\0PI12\0PI13\0PI14\0PI15\0PI16"; drive-strength = <0x28>; phandle = <0x5b>; }; mmc0-pins { function = "mmc0"; pins = "PF0\0PF1\0PF2\0PF3\0PF4\0PF5"; drive-strength = <0x1e>; phandle = <0x17>; bias-pull-up; }; spi0-cs0-pin { function = "spi0"; pins = "PC3"; phandle = <0x28>; }; i2c0-pi-pins { function = "i2c0"; pins = "PI5\0PI6"; phandle = <0x66>; }; i2c3-pg-pins { function = "i2c3"; pins = "PG17\0PG18"; phandle = <0x5d>; }; uart2-pins { function = "uart2"; pins = "PH5\0PH6"; phandle = <0x63>; }; spi1-pins { function = "spi1"; pins = "PH6\0PH7\0PH8"; phandle = <0x29>; }; i2c2-pi-pins { function = "i2c2"; pins = "PI9\0PI10"; phandle = <0x68>; }; i2c0-pins { function = "i2c0"; pins = "PI6\0PI7"; phandle = <0x22>; }; uart2-pi-pins { function = "uart2"; pins = "PI5\0PI6"; phandle = <0x1f>; }; uart0-ph-pins { function = "uart0"; pins = "PH0\0PH1"; phandle = <0x1e>; }; uart2-rts-cts-pins { function = "uart2"; pins = "PH7\0PH8"; phandle = <0x64>; }; uart1-pins { function = "uart1"; pins = "PG6\0PG7"; phandle = <0x61>; }; spi0-pins { function = "spi0"; pins = "PC0\0PC2\0PC4"; phandle = <0x27>; }; i2c2-ph-pins { function = "i2c2"; pins = "PH2\0PH3"; phandle = <0x5c>; }; uart4-pi-pins { function = "uart4"; pins = "PI13\0PI14"; phandle = <0x21>; }; pwm1-ph-pin { function = "pwm1"; pins = "PH3"; phandle = <0x44>; }; }; pwm5@0300a000 { pinctrl-names = "default"; clk_bypass_output = <0x01>; pinctrl-0 = <0x48>; compatible = "allwinner,sunxi-pwm5"; status = "okay"; phandle = <0x43>; }; pwm@300a000 { clock-names = "mod\0bus"; resets = <0x02 0x0a>; clocks = <0x13 0x02 0x2f>; pwm-number = <0x06>; #pwm-cells = <0x03>; compatible = "allwinner,sun50i-h616-pwm"; status = "okay"; reg = <0x300a000 0x400>; phandle = <0x4d>; pwm-base = <0x00>; sunxi-pwms = <0x3e 0x3f 0x40 0x41 0x42 0x43>; }; ahub_dam_plat@5097000 { clock-names = "clk_pll_audio\0clk_pll_audio_4x\0clk_audio_hub\0clk_bus_audio_hub"; resets = <0x02 0x25>; clocks = <0x02 0x5b 0x02 0x5c 0x02 0x5e 0x02 0x5f>; #sound-dai-cells = <0x00>; compatible = "allwinner,sunxi-snd-plat-ahub_dam"; status = "okay"; reg = <0x5097000 0x1000>; phandle = <0x51>; }; bus@1000000 { #address-cells = <0x01>; allwinner,sram = <0x0a 0x01>; #size-cells = <0x01>; compatible = "allwinner,sun50i-h616-de33\0allwinner,sun50i-a64-de2"; ranges = <0x00 0x1000000 0x400000>; reg = <0x1000000 0x400000>; mixer@100000 { clock-names = "bus\0mod"; resets = <0x0b 0x00>; clocks = <0x0b 0x00 0x0b 0x06>; compatible = "allwinner,sun50i-h616-de33-mixer-0"; reg = <0x100000 0x100000 0x8100 0x40 0x280000 0x20000>; phandle = <0x05>; ports { #address-cells = <0x01>; #size-cells = <0x00>; port@1 { reg = <0x01>; phandle = <0x4f>; endpoint { remote-endpoint = <0x0c>; phandle = <0x33>; }; }; }; }; clock@8000 { #reset-cells = <0x01>; clock-names = "mod\0bus"; resets = <0x02 0x01>; clocks = <0x02 0x1d 0x02 0x1e>; #clock-cells = <0x01>; compatible = "allwinner,sun50i-h616-de33-clk"; reg = <0x8000 0x100>; phandle = <0x0b>; }; }; i2c@5002800 { #address-cells = <0x01>; resets = <0x02 0x19>; interrupts = <0x00 0x08 0x04>; clocks = <0x02 0x4a>; #size-cells = <0x00>; compatible = "allwinner,sun50i-h616-i2c\0allwinner,sun8i-v536-i2c\0allwinner,sun6i-a31-i2c"; status = "disabled"; reg = <0x5002800 0x400>; phandle = <0x75>; }; rtc@7000000 { clock-names = "bus\0hosc\0pll-32k"; interrupts = <0x00 0x68 0x04>; clocks = <0x3a 0x0e 0x13 0x02 0x80>; #clock-cells = <0x01>; compatible = "allwinner,sun50i-h616-rtc"; reg = <0x7000000 0x400>; phandle = <0x14>; }; pwm1@0300a000 { pinctrl-names = "default"; pinctrl-0 = <0x44>; compatible = "allwinner,sunxi-pwm1"; phandle = <0x3f>; }; addr-mgt { compatible = "allwinner,sunxi-addr_mgt"; status = "okay"; type_addr_eth = <0x02>; type_addr_wifi = <0x02>; phandle = <0x9a>; type_addr_bt = <0x02>; }; lcd-controller@6515000 { clock-names = "ahb\0tcon-ch1"; resets = <0x02 0x36>; interrupts = <0x00 0x42 0x04>; clocks = <0x02 0x79 0x37 0x00>; compatible = "allwinner,sun50i-h6-tcon-tv\0allwinner,sun8i-r40-tcon-tv"; reg = <0x6515000 0x1000>; phandle = <0x8f>; reset-names = "lcd"; ports { #address-cells = <0x01>; #size-cells = <0x00>; port@0 { reg = <0x00>; phandle = <0x90>; endpoint { remote-endpoint = <0x38>; phandle = <0x34>; }; }; port@1 { #address-cells = <0x01>; #size-cells = <0x00>; reg = <0x01>; phandle = <0x91>; endpoint@1 { remote-endpoint = <0x39>; reg = <0x01>; phandle = <0x35>; }; }; }; }; i2c@5003000 { pinctrl-names = "default"; #address-cells = <0x01>; pinctrl-0 = <0x26>; resets = <0x02 0x1b>; interrupts = <0x00 0x0a 0x04>; clocks = <0x02 0x4c>; #size-cells = <0x00>; compatible = "allwinner,sun50i-h616-i2c\0allwinner,sun8i-v536-i2c\0allwinner,sun6i-a31-i2c"; status = "disabled"; reg = <0x5003000 0x400>; phandle = <0x79>; }; usb@5311400 { phy-names = "usb"; resets = <0x02 0x2d>; interrupts = <0x00 0x21 0x04>; clocks = <0x02 0x6b 0x02 0x66>; compatible = "allwinner,sun50i-h616-ohci\0generic-ohci"; status = "okay"; phys = <0x2e 0x03>; reg = <0x5311400 0x100>; phandle = <0x88>; }; ahub1_mach { soundcard-mach,slot-num = <0x02>; soundcard-mach,slot-width = <0x20>; compatible = "allwinner,sunxi-snd-mach"; status = "okay"; soundcard-mach,frame-master = <0x0e>; phandle = <0x52>; soundcard-mach,name = "HDMI"; soundcard-mach,format = "i2s"; soundcard-mach,bitclock-master = <0x0e>; soundcard-mach,codec { phandle = <0x53>; sound-dai = <0x10>; }; soundcard-mach,cpu { soundcard-mach,mclk-fs = <0x00>; soundcard-mach,pll-fs = <0x04>; phandle = <0x0e>; sound-dai = <0x0f>; }; }; efuse@3006000 { #address-cells = <0x01>; #size-cells = <0x01>; compatible = "allwinner,sun50i-h616-sid"; reg = <0x3006000 0x1000>; phandle = <0x59>; thermal-sensor-calibration@14 { reg = <0x14 0x08>; phandle = <0x3d>; }; ephy-calibration@2c { reg = <0x2c 0x02>; phandle = <0x25>; }; cpu-speed-grade@0 { reg = <0x00 0x02>; phandle = <0x4b>; }; }; mmc@4021000 { mmc-ddr-3_3v; pinctrl-names = "default"; #address-cells = <0x01>; pinctrl-0 = <0x19>; clock-names = "ahb\0mmc"; cap-sd-highspeed; vqmmc-supply = <0x1b>; bus-width = <0x04>; non-removable; resets = <0x02 0x0f>; cap-sdio-irq; interrupts = <0x00 0x24 0x04>; clocks = <0x02 0x40 0x02 0x3d>; #size-cells = <0x00>; vmmc-supply = <0x1a>; mmc-ddr-1_8v; compatible = "allwinner,sun50i-h616-mmc\0allwinner,sun50i-a100-mmc"; status = "okay"; mmc-pwrseq = <0x1c>; reg = <0x4021000 0x1000>; phandle = <0x6b>; max-frequency = <0x8f0d180>; cap-mmc-highspeed; reset-names = "ahb"; }; usb@5101400 { phy-names = "usb"; resets = <0x02 0x2a>; interrupts = <0x00 0x1b 0x04>; clocks = <0x02 0x68 0x02 0x60>; compatible = "allwinner,sun50i-h616-ohci\0generic-ohci"; status = "disabled"; phys = <0x2e 0x00>; reg = <0x5101400 0x100>; phandle = <0x82>; }; clock@3001000 { #reset-cells = <0x01>; clock-names = "hosc\0losc\0iosc"; clocks = <0x13 0x14 0x00 0x14 0x02>; #clock-cells = <0x01>; compatible = "allwinner,sun50i-h616-ccu"; reg = <0x3001000 0x1000>; phandle = <0x02>; }; serial@5001400 { reg-io-width = <0x04>; resets = <0x02 0x16>; interrupts = <0x00 0x05 0x04>; clocks = <0x02 0x47>; compatible = "snps,dw-apb-uart"; status = "disabled"; reg = <0x5001400 0x400>; phandle = <0x72>; reg-shift = <0x02>; }; video-codec@1c0e000 { clock-names = "ahb\0mod\0ram"; allwinner,sram = <0x12 0x01>; resets = <0x02 0x05>; interrupts = <0x00 0x5d 0x04>; clocks = <0x02 0x29 0x02 0x28 0x02 0x33>; compatible = "allwinner,sun50i-h616-video-engine"; reg = <0x1c0e000 0x2000>; }; thermal-sensor@5070400 { nvmem-cells = <0x3d>; clock-names = "bus"; resets = <0x02 0x21>; interrupts = <0x00 0x13 0x04>; clocks = <0x02 0x56>; #thermal-sensor-cells = <0x01>; compatible = "allwinner,sun50i-h616-ths"; nvmem-cell-names = "calibration"; reg = <0x5070400 0x400>; phandle = <0x49>; }; i2c@7081400 { #address-cells = <0x01>; resets = <0x3a 0x04>; interrupts = <0x00 0x69 0x04>; clocks = <0x3a 0x08>; #size-cells = <0x00>; compatible = "allwinner,sun50i-h616-i2c\0allwinner,sun8i-v536-i2c\0allwinner,sun6i-a31-i2c"; status = "okay"; reg = <0x7081400 0x400>; phandle = <0x95>; pmic@36 { vin1-supply = <0x2f>; vin2-supply = <0x2f>; vin3-supply = <0x2f>; interrupts = <0x02 0x09 0x08>; interrupt-parent = <0x18>; compatible = "x-powers,axp313a"; #interrupt-cells = <0x01>; reg = <0x36>; phandle = <0x96>; interrupt-controller; regulators { aldo1 { regulator-max-microvolt = <0x1b7740>; regulator-always-on; regulator-min-microvolt = <0x1b7740>; regulator-name = "vcc1v8"; phandle = <0x16>; }; dcdc3 { regulator-max-microvolt = <0x10c8e0>; regulator-step-delay-us = <0x19>; regulator-always-on; regulator-min-microvolt = <0x10c8e0>; regulator-name = "vdd-dram"; regulator-final-delay-us = <0x32>; phandle = <0x97>; }; dcdc1 { regulator-max-microvolt = <0xf1b30>; regulator-step-delay-us = <0x19>; regulator-always-on; regulator-min-microvolt = <0xc5c10>; regulator-name = "vdd-gpu-sys"; regulator-final-delay-us = <0x32>; phandle = <0x11>; }; dcdc2 { regulator-max-microvolt = <0x10c8e0>; regulator-step-delay-us = <0x19>; regulator-always-on; regulator-min-microvolt = <0x7a120>; regulator-name = "vdd-cpu"; regulator-ramp-delay = <0xc8>; regulator-final-delay-us = <0x32>; phandle = <0x04>; }; dldo1 { regulator-max-microvolt = <0x325aa0>; regulator-always-on; regulator-min-microvolt = <0x325aa0>; regulator-name = "vcc3v3"; phandle = <0x15>; }; }; }; }; iommu@30f0000 { resets = <0x02 0x0b>; interrupts = <0x00 0x3d 0x04>; clocks = <0x02 0x30>; #iommu-cells = <0x01>; compatible = "allwinner,sun50i-h616-iommu\0allwinner,sun50i-h6-iommu"; status = "okay"; reg = <0x30f0000 0x10000>; phandle = <0x69>; }; i2c@5002400 { #address-cells = <0x01>; resets = <0x02 0x18>; interrupts = <0x00 0x07 0x04>; clocks = <0x02 0x49>; #size-cells = <0x00>; compatible = "allwinner,sun50i-h616-i2c\0allwinner,sun8i-v536-i2c\0allwinner,sun6i-a31-i2c"; status = "disabled"; reg = <0x5002400 0x400>; phandle = <0x74>; }; pwm2@0300a000 { pinctrl-names = "default"; pinctrl-0 = <0x45>; compatible = "allwinner,sunxi-pwm2"; phandle = <0x40>; }; rsb@7083000 { pinctrl-names = "default"; #address-cells = <0x01>; pinctrl-0 = <0x3c>; resets = <0x3a 0x07>; interrupts = <0x00 0x6d 0x04>; clocks = <0x3a 0x0d>; #size-cells = <0x00>; clock-frequency = <0x2dc6c0>; compatible = "allwinner,sun50i-h616-rsb\0allwinner,sun8i-a23-rsb"; status = "disabled"; reg = <0x7083000 0x400>; phandle = <0x98>; }; sunxi-info { compatible = "allwinner,sun50i-h616-sys-info"; status = "okay"; }; spi@5011000 { pinctrl-names = "default"; #address-cells = <0x01>; pinctrl-0 = <0x29 0x2a>; clock-names = "ahb\0mod"; resets = <0x02 0x1d>; interrupts = <0x00 0x0d 0x04>; clocks = <0x02 0x50 0x02 0x4e>; #size-cells = <0x00>; dma-names = "rx\0tx"; compatible = "allwinner,sun50i-h616-spi\0allwinner,sun8i-h3-spi"; status = "okay"; reg = <0x5011000 0x1000>; phandle = <0x7b>; dmas = <0x0d 0x17 0x0d 0x17>; cs-gpios = <0x18 0x07 0x05 0x00>; xpt2046@1 { ti,pressure-min = [00 00]; ti,y-max = [0e d8]; ti,penirq-recheck-delay-usecs = [00 14]; pinctrl-names = "default"; ti,y-plate-ohms = [00 28]; ti,debounce-tol = [00 02]; ti,pressure-max = [00 ff]; ti,debounce-rep = [00 01]; wakeup-source; interrupts = <0x08 0x05 0x02>; ti,settle-delay-usec = [00 14]; spi-max-frequency = <0xf4240>; interrupt-parent = <0x18>; ti,keep-vref-on = <0x01>; ti,x-min = [00 aa]; compatible = "ti,ads7846"; pendown-gpio = <0x18 0x08 0x05 0x01>; ti,debounce-max = [00 64]; ti,x-plate-ohms = [00 28]; reg = <0x00>; ti,x-max = [0e d8]; phandle = <0xa2>; ti,y-min = [00 c8]; ti,swap-xy = <0x00>; }; ili9341@0 { pinctrl-names = "default"; height = <0xf0>; width = <0x140>; backlight = <0xa0>; rotation = <0x5a>; spi-max-frequency = <0x1e84800>; fps = <0x1e>; reset-gpios = <0x18 0x08 0x06 0x00>; compatible = "adafruit,yx240qv29\0ilitek,ili9341"; dc-gpios = <0x18 0x07 0x04 0x00>; buswidth = <0x08>; reg = <0x01>; phandle = <0xa1>; }; spidev@1 { spi-max-frequency = <0xf4240>; compatible = "rohm,dh2228fv"; status = "disabled"; reg = <0x01>; }; }; serial@5000800 { reg-io-width = <0x04>; pinctrl-names = "default"; pinctrl-0 = <0x1f>; resets = <0x02 0x13>; interrupts = <0x00 0x02 0x04>; clocks = <0x02 0x44>; compatible = "snps,dw-apb-uart"; status = "disabled"; reg = <0x5000800 0x400>; phandle = <0x6f>; reg-shift = <0x02>; }; interrupt-controller@3021000 { interrupts = <0x01 0x09 0xf04>; compatible = "arm,gic-400"; #interrupt-cells = <0x03>; reg = <0x3021000 0x1000 0x3022000 0x2000 0x3024000 0x2000 0x3026000 0x2000>; phandle = <0x01>; interrupt-controller; }; usb@5311000 { phy-names = "usb"; resets = <0x02 0x2d 0x02 0x31>; interrupts = <0x00 0x20 0x04>; clocks = <0x02 0x6b 0x02 0x6f 0x02 0x66>; compatible = "allwinner,sun50i-h616-ehci\0generic-ehci"; status = "okay"; phys = <0x2e 0x03>; reg = <0x5311000 0x100>; phandle = <0x87>; }; i2c@5002c00 { pinctrl-names = "default"; #address-cells = <0x01>; pinctrl-0 = <0x23>; resets = <0x02 0x1a>; interrupts = <0x00 0x09 0x04>; clocks = <0x02 0x4b>; #size-cells = <0x00>; compatible = "allwinner,sun50i-h616-i2c\0allwinner,sun8i-v536-i2c\0allwinner,sun6i-a31-i2c"; status = "okay"; reg = <0x5002c00 0x400>; phandle = <0x76>; mfd@10 { nvmem-cells = <0x25>; clocks = <0x24>; compatible = "x-powers,ac200-sunxi"; nvmem-cell-names = "calibration"; reg = <0x10>; phandle = <0x77>; phy { compatible = "x-powers,ac200-ephy-sunxi"; status = "okay"; phandle = <0x78>; }; }; }; usb@5200400 { phy-names = "usb"; resets = <0x02 0x2b>; interrupts = <0x00 0x1d 0x04>; clocks = <0x02 0x69 0x02 0x62>; compatible = "allwinner,sun50i-h616-ohci\0generic-ohci"; status = "okay"; phys = <0x2e 0x01>; reg = <0x5200400 0x100>; phandle = <0x84>; }; ahub1_plat { capture_cma = <0x80>; rx_fifo_size = <0x80>; rx_pin = <0x00>; dma-names = "tx\0rx"; #sound-dai-cells = <0x00>; compatible = "allwinner,sunxi-snd-plat-ahub"; status = "okay"; tdm_num = <0x01>; phandle = <0x0f>; dmas = <0x0d 0x04 0x0d 0x04>; playback_cma = <0x80>; tx_fifo_size = <0x80>; tx_pin = <0x00>; apb_num = <0x01>; }; usb@5101000 { phy-names = "usb"; resets = <0x02 0x2a 0x02 0x2e>; interrupts = <0x00 0x1a 0x04>; clocks = <0x02 0x68 0x02 0x6c 0x02 0x60>; compatible = "allwinner,sun50i-h616-ehci\0generic-ehci"; status = "disabled"; phys = <0x2e 0x00>; reg = <0x5101000 0x100>; phandle = <0x81>; }; tcon-top@6510000 { clock-output-names = "tcon-top-tv0"; clock-names = "bus\0tcon-tv0"; resets = <0x02 0x35>; clocks = <0x02 0x76 0x02 0x77>; #clock-cells = <0x01>; compatible = "allwinner,sun50i-h6-tcon-top"; reg = <0x6510000 0x1000>; phandle = <0x37>; ports { #address-cells = <0x01>; #size-cells = <0x00>; port@0 { #address-cells = <0x01>; #size-cells = <0x00>; reg = <0x00>; phandle = <0x8b>; endpoint@0 { remote-endpoint = <0x33>; reg = <0x00>; phandle = <0x0c>; }; }; port@5 { reg = <0x05>; phandle = <0x8e>; endpoint { remote-endpoint = <0x36>; phandle = <0x31>; }; }; port@1 { #address-cells = <0x01>; #size-cells = <0x00>; reg = <0x01>; phandle = <0x8c>; endpoint@2 { remote-endpoint = <0x34>; reg = <0x02>; phandle = <0x38>; }; }; port@4 { #address-cells = <0x01>; #size-cells = <0x00>; reg = <0x04>; phandle = <0x8d>; endpoint@0 { remote-endpoint = <0x35>; reg = <0x00>; phandle = <0x39>; }; }; }; }; serial@5001000 { reg-io-width = <0x04>; pinctrl-names = "default"; pinctrl-0 = <0x21>; resets = <0x02 0x15>; interrupts = <0x00 0x04 0x04>; clocks = <0x02 0x46>; compatible = "snps,dw-apb-uart"; status = "disabled"; reg = <0x5001000 0x400>; phandle = <0x71>; reg-shift = <0x02>; }; dump_reg@20000 { compatible = "allwinner,sunxi-dump-reg"; status = "okay"; reg = <0x00 0x3001000 0x00 0xf20>; phandle = <0x99>; }; hdmi-phy@6010000 { clock-names = "bus\0mod"; resets = <0x02 0x34>; clocks = <0x02 0x75 0x02 0x73>; #phy-cells = <0x00>; compatible = "allwinner,sun50i-h616-hdmi-phy"; reg = <0x6010000 0x10000>; phandle = <0x30>; reset-names = "phy"; }; i2c@5002000 { pinctrl-names = "default"; #address-cells = <0x01>; pinctrl-0 = <0x22>; resets = <0x02 0x17>; interrupts = <0x00 0x06 0x04>; clocks = <0x02 0x48>; #size-cells = <0x00>; compatible = "allwinner,sun50i-h616-i2c\0allwinner,sun8i-v536-i2c\0allwinner,sun6i-a31-i2c"; status = "disabled"; reg = <0x5002000 0x400>; phandle = <0x73>; }; pwm3@0300a000 { pinctrl-names = "default"; pinctrl-0 = <0x46>; compatible = "allwinner,sunxi-pwm3"; phandle = <0x41>; }; usb@5310400 { phy-names = "usb"; resets = <0x02 0x2c>; interrupts = <0x00 0x1f 0x04>; clocks = <0x02 0x6a 0x02 0x64>; compatible = "allwinner,sun50i-h616-ohci\0generic-ohci"; status = "okay"; phys = <0x2e 0x02>; reg = <0x5310400 0x100>; phandle = <0x86>; }; mmc@4020000 { mmc-ddr-3_3v; pinctrl-names = "default"; #address-cells = <0x01>; pinctrl-0 = <0x17>; clock-names = "ahb\0mmc"; cap-sd-highspeed; bus-width = <0x04>; resets = <0x02 0x0e>; cap-sdio-irq; interrupts = <0x00 0x23 0x04>; clocks = <0x02 0x3f 0x02 0x3c>; #size-cells = <0x00>; vmmc-supply = <0x15>; compatible = "allwinner,sun50i-h616-mmc\0allwinner,sun50i-a100-mmc"; status = "okay"; reg = <0x4020000 0x1000>; phandle = <0x6a>; max-frequency = <0x2faf080>; cap-mmc-highspeed; reset-names = "ahb"; cd-gpios = <0x18 0x05 0x06 0x01>; }; serial@5000400 { reg-io-width = <0x04>; resets = <0x02 0x12>; interrupts = <0x00 0x01 0x04>; clocks = <0x02 0x43>; compatible = "snps,dw-apb-uart"; status = "disabled"; reg = <0x5000400 0x400>; phandle = <0x6e>; reg-shift = <0x02>; }; dma-controller@3002000 { clock-names = "bus\0mbus"; resets = <0x02 0x06>; interrupts = <0x00 0x2a 0x04>; clocks = <0x02 0x2a 0x02 0x32>; dma-requests = <0x31>; compatible = "allwinner,sun50i-h6-dma"; reg = <0x3002000 0x1000>; phandle = <0x0d>; dma-channels = <0x10>; #dma-cells = <0x01>; }; usb@5200000 { phy-names = "usb"; resets = <0x02 0x2b 0x02 0x2f>; interrupts = <0x00 0x1c 0x04>; clocks = <0x02 0x69 0x02 0x6d 0x02 0x62>; compatible = "allwinner,sun50i-h616-ehci\0generic-ehci"; status = "okay"; phys = <0x2e 0x01>; reg = <0x5200000 0x100>; phandle = <0x83>; }; ethernet@5020000 { syscon = <0x2b>; clock-names = "stmmaceth"; resets = <0x02 0x1e>; interrupts = <0x00 0x0e 0x04>; clocks = <0x02 0x52>; compatible = "allwinner,sun50i-h616-emac0\0allwinner,sun50i-a64-emac"; status = "disabled"; interrupt-names = "macirq"; reg = <0x5020000 0x10000>; phandle = <0x7c>; reset-names = "stmmaceth"; mdio { #address-cells = <0x01>; #size-cells = <0x00>; compatible = "snps,dwmac-mdio"; phandle = <0x7d>; }; }; codec@05096000 { clock-names = "apb\0audio-codec-1x\0audio-codec-4x"; resets = <0x02 0x24>; interrupts = <0x00 0x3a 0x04>; clocks = <0x02 0x5d 0x02 0x5b 0x02 0x5c>; dma-names = "tx"; #sound-dai-cells = <0x00>; compatible = "allwinner,sun50i-h616-codec"; status = "okay"; reg = <0x5096000 0x31c>; phandle = <0x50>; dmas = <0x0d 0x06>; allwinner,audio-routing = "Line Out\0LINEOUT"; }; serial@5000c00 { reg-io-width = <0x04>; pinctrl-names = "default"; pinctrl-0 = <0x20>; resets = <0x02 0x14>; interrupts = <0x00 0x03 0x04>; clocks = <0x02 0x45>; compatible = "snps,dw-apb-uart"; status = "disabled"; reg = <0x5000c00 0x400>; phandle = <0x70>; reg-shift = <0x02>; }; spi@5010000 { pinctrl-names = "default"; #address-cells = <0x01>; pinctrl-0 = <0x27 0x28>; clock-names = "ahb\0mod"; resets = <0x02 0x1c>; interrupts = <0x00 0x0c 0x04>; clocks = <0x02 0x4f 0x02 0x4d>; #size-cells = <0x00>; dma-names = "rx\0tx"; compatible = "allwinner,sun50i-h616-spi\0allwinner,sun8i-h3-spi"; status = "okay"; reg = <0x5010000 0x1000>; phandle = <0x7a>; dmas = <0x0d 0x16 0x0d 0x16>; flash@0 { #address-cells = <0x01>; #size-cells = <0x01>; spi-max-frequency = <0x2625a00>; compatible = "jedec,spi-nor"; reg = <0x00>; }; }; pinctrl@7022000 { clock-names = "apb\0hosc\0losc"; gpio-controller; interrupts = <0x00 0x8f 0x04>; clocks = <0x3a 0x02 0x13 0x14 0x00>; compatible = "allwinner,sun50i-h616-r-pinctrl"; #interrupt-cells = <0x03>; reg = <0x7022000 0x400>; phandle = <0x92>; #gpio-cells = <0x03>; interrupt-controller; r-rsb-pins { function = "s_rsb"; pins = "PL0\0PL1"; phandle = <0x3c>; }; r-i2c-pins { function = "s_i2c"; pins = "PL0\0PL1"; phandle = <0x93>; }; }; usb@5310000 { phy-names = "usb"; resets = <0x02 0x2c 0x02 0x30>; interrupts = <0x00 0x1e 0x04>; clocks = <0x02 0x6a 0x02 0x6e 0x02 0x64>; compatible = "allwinner,sun50i-h616-ehci\0generic-ehci"; status = "okay"; phys = <0x2e 0x02>; reg = <0x5310000 0x100>; phandle = <0x85>; }; pwm4@0300a000 { pinctrl-names = "default"; pinctrl-0 = <0x47>; compatible = "allwinner,sunxi-pwm4"; phandle = <0x42>; }; ir@7040000 { pinctrl-names = "default"; pinctrl-0 = <0x3b>; clock-names = "apb\0ir"; resets = <0x3a 0x05>; interrupts = <0x00 0x6a 0x04>; clocks = <0x3a 0x09 0x3a 0x0b>; compatible = "allwinner,sun50i-h616-ir\0allwinner,sun6i-a31-ir"; status = "okay"; reg = <0x7040000 0x400>; phandle = <0x94>; }; watchdog@30090a0 { interrupts = <0x00 0x32 0x04>; clocks = <0x13>; compatible = "allwinner,sun50i-h616-wdt\0allwinner,sun6i-a31-wdt"; reg = <0x30090a0 0x20>; phandle = <0x5a>; }; usb@5100000 { phy-names = "usb"; resets = <0x02 0x32>; interrupts = <0x00 0x19 0x04>; clocks = <0x02 0x70>; extcon = <0x2e 0x00>; compatible = "allwinner,sun50i-h616-musb\0allwinner,sun8i-h3-musb"; status = "okay"; interrupt-names = "mc"; phys = <0x2e 0x00>; reg = <0x5100000 0x400>; phandle = <0x80>; dr_mode = "peripheral"; }; serial@5000000 { reg-io-width = <0x04>; pinctrl-names = "default"; pinctrl-0 = <0x1e>; resets = <0x02 0x11>; interrupts = <0x00 0x00 0x04>; clocks = <0x02 0x42>; compatible = "snps,dw-apb-uart"; status = "okay"; reg = <0x5000000 0x400>; phandle = <0x6d>; reg-shift = <0x02>; }; }; leds { compatible = "gpio-leds"; 100m_act { label = "100m_act"; default-state = "off"; gpios = <0x18 0x02 0x10 0x00>; }; led-0 { linux,default-trigger = "heartbeat"; function = "status"; color = <0x02>; label = "green_led"; gpios = <0x18 0x02 0x0d 0x00>; }; 100m_link { label = "100m_link"; default-state = "off"; gpios = <0x18 0x02 0x0f 0x00>; }; }; psci { method = "smc"; compatible = "arm,psci-0.2"; }; timer { arm,no-tick-in-suspend; interrupts = <0x01 0x0d 0xf04 0x01 0x0e 0xf04 0x01 0x0b 0xf04 0x01 0x0a 0xf04>; compatible = "arm,armv8-timer"; }; opp-table-cpu { nvmem-cells = <0x4b>; opp-shared; compatible = "allwinner,sun50i-h616-operating-points"; phandle = <0x03>; opp-1200000000 { opp-microvolt-speed1 = <0x10c8e0 0x10c8e0 0x10c8e0>; opp-hz = <0x00 0x47868c00>; opp-microvolt-speed2 = <0x10c8e0 0x10c8e0 0x10c8e0>; opp-microvolt-speed0 = <0xea600 0xea600 0x10c8e0>; clock-latency-ns = <0x3b9b0>; }; opp-480000000 { opp-microvolt-speed1 = <0xd6d80 0xd6d80 0x10c8e0>; opp-hz = <0x00 0x1c9c3800>; opp-microvolt-speed2 = <0xd6d80 0xd6d80 0x10c8e0>; opp-microvolt-speed0 = <0xc8320 0xc8320 0x10c8e0>; clock-latency-ns = <0x3b9b0>; }; opp-1008000000 { opp-microvolt-speed1 = <0xf9060 0xf9060 0x10c8e0>; opp-hz = <0x00 0x3c14dc00>; opp-microvolt-speed2 = <0xf9060 0xf9060 0x10c8e0>; opp-microvolt-speed0 = <0xdbba0 0xdbba0 0x10c8e0>; clock-latency-ns = <0x3b9b0>; }; opp-1512000000 { opp-microvolt-speed1 = <0x10c8e0 0x10c8e0 0x10c8e0>; opp-hz = <0x00 0x5a1f4a00>; opp-microvolt-speed2 = <0x10c8e0 0x10c8e0 0x10c8e0>; opp-microvolt-speed0 = <0x10c8e0 0x10c8e0 0x10c8e0>; clock-latency-ns = <0x3b9b0>; }; opp-792000000 { opp-microvolt-speed1 = <0xe57e0 0xe57e0 0x10c8e0>; opp-hz = <0x00 0x2f34f600>; opp-microvolt-speed2 = <0xe57e0 0xe57e0 0x10c8e0>; opp-microvolt-speed0 = <0xd1f60 0xd1f60 0x10c8e0>; clock-latency-ns = <0x3b9b0>; }; opp-600000000 { opp-microvolt-speed1 = <0xd6d80 0xd6d80 0x10c8e0>; opp-hz = <0x00 0x23c34600>; opp-microvolt-speed2 = <0xd6d80 0xd6d80 0x10c8e0>; opp-microvolt-speed0 = <0xc8320 0xc8320 0x10c8e0>; clock-latency-ns = <0x3b9b0>; }; }; aliases { serial5 = "/soc/serial@5001400"; serial3 = "/soc/serial@5000c00"; serial4 = "/soc/serial@5001000"; serial2 = "/soc/serial@5000800"; serial0 = "/soc/serial@5000000"; }; display-engine { allwinner,pipelines = <0x05>; compatible = "allwinner,sun50i-h6-display-engine"; status = "okay"; phandle = <0x4e>; }; chosen { u-boot,version = "2024.04-armbian-2024.04-S2504-Pb651-Ha9af-V1f7b-Bda0a-R448a"; linux,initrd-end = <0x00 0x49fff201>; bootargs = "root=UUID=fa6ac70e-cbfb-41a3-86f7-76a14385f52c rootwait rootfstype=ext4 splash=verbose console=ttyS0,115200 console=tty1 consoleblank=0 loglevel=1 ubootpart=54e3c107-01 usb-storage.quirks=0x2537:0x1066:u,0x2537:0x1068:u cma=256M cgroup_enable=memory"; linux,initrd-start = <0x00 0x4958d000>; stdout-path = "serial0:115200n8"; }; osc24M-clk { clock-output-names = "osc24M"; #clock-cells = <0x00>; clock-frequency = <0x16e3600>; compatible = "fixed-clock"; phandle = <0x13>; }; ac200_clk { #clock-cells = <0x00>; clock-frequency = <0x1e8480>; compatible = "pwm-clock"; status = "okay"; phandle = <0x24>; pwms = <0x4d 0x05 0x1f4 0x00>; }; vcc-wifi-io { regulator-max-microvolt = <0x1b7740>; regulator-always-on; regulator-min-microvolt = <0x1b7740>; regulator-name = "vcc-wifi-io"; compatible = "regulator-fixed"; phandle = <0x1b>; vin-supply = <0x1a>; }; pmu { interrupt-affinity = <0x06 0x07 0x08 0x09>; interrupts = <0x00 0x8c 0x04 0x00 0x8d 0x04 0x00 0x8e 0x04 0x00 0x8f 0x04>; compatible = "arm,cortex-a53-pmu"; }; cpus { #address-cells = <0x01>; #size-cells = <0x00>; cpu@1 { clocks = <0x02 0x15>; device_type = "cpu"; compatible = "arm,cortex-a53"; reg = <0x01>; enable-method = "psci"; phandle = <0x07>; operating-points-v2 = <0x03>; clock-latency-ns = <0x3b9b0>; #cooling-cells = <0x02>; }; cpu@2 { clocks = <0x02 0x15>; device_type = "cpu"; compatible = "arm,cortex-a53"; reg = <0x02>; enable-method = "psci"; phandle = <0x08>; operating-points-v2 = <0x03>; clock-latency-ns = <0x3b9b0>; #cooling-cells = <0x02>; }; cpu@0 { cpu-supply = <0x04>; clocks = <0x02 0x15>; device_type = "cpu"; compatible = "arm,cortex-a53"; status = "okay"; reg = <0x00>; enable-method = "psci"; phandle = <0x06>; operating-points-v2 = <0x03>; clock-latency-ns = <0x3b9b0>; #cooling-cells = <0x02>; }; cpu@3 { clocks = <0x02 0x15>; device_type = "cpu"; compatible = "arm,cortex-a53"; reg = <0x03>; enable-method = "psci"; phandle = <0x09>; operating-points-v2 = <0x03>; clock-latency-ns = <0x3b9b0>; #cooling-cells = <0x02>; }; }; __symbols__ { pwm3_ph_pin = "/soc/pinctrl@300b000/pwm3-ph-pin"; i2c3 = "/soc/i2c@5002c00"; pwm = "/soc/pwm@300a000"; syscon = "/soc/syscon@3000000"; ve_temp_critical = "/thermal-zones/ve-thermal/trips/trip-point@0"; ohci2 = "/soc/usb@5310400"; ths_calibration = "/soc/efuse@3006000/thermal-sensor-calibration@14"; cpu_temp_critical = "/thermal-zones/cpu-thermal/trips/trip-point@2"; wifi_pwrseq = "/wifi-pwrseq"; emac1 = "/soc/ethernet@5030000"; pwm4_ph_pin = "/soc/pinctrl@300b000/pwm4-ph-pin"; ahub_dam_plat = "/soc/ahub_dam_plat@5097000"; ir = "/soc/ir@7040000"; r_rsb_pins = "/soc/pinctrl@7022000/r-rsb-pins"; i2c4_ph_pins = "/soc/pinctrl@300b000/i2c4-ph-pins"; ephy_calibration = "/soc/efuse@3006000/ephy-calibration@2c"; i2c1 = "/soc/i2c@5002400"; r_i2c_pins = "/soc/pinctrl@7022000/r-i2c-pins"; ohci0 = "/soc/usb@5101400"; axp313 = "/soc/i2c@7081400/pmic@36"; hdmi_con_in = "/connector/port/endpoint"; display_clocks = "/soc/bus@1000000/clock@8000"; uart2_rts_cts_pins = "/soc/pinctrl@300b000/uart2-rts-cts-pins"; gpu = "/soc/gpu@1800000"; spi0 = "/soc/spi@5010000"; ili9341 = "/soc/spi@5011000/ili9341@0"; uart5_pins = "/soc/pinctrl@300b000/uart5-pins"; rmii_pins = "/soc/pinctrl@300b000/rmii-pins"; pwm5 = "/soc/pwm5@0300a000"; mmc1 = "/soc/mmc@4021000"; r_ccu = "/soc/clock@7010000"; hdmi_phy = "/soc/hdmi-phy@6010000"; i2c1_pi_pins = "/soc/pinctrl@300b000/i2c1-pi-pins"; i2c4_pg_pins = "/soc/pinctrl@300b000/i2c4-pg-pins"; uart4 = "/soc/serial@5001000"; tcon_top_hdmi_in = "/soc/tcon-top@6510000/ports/port@4"; mmc2_pins = "/soc/pinctrl@300b000/mmc2-pins"; xpt2046 = "/soc/spi@5011000/xpt2046@1"; dma = "/soc/dma-controller@3002000"; backlight = "/backlight"; ccu = "/soc/clock@3001000"; pwm3 = "/soc/pwm3@0300a000"; tcon_tv = "/soc/lcd-controller@6515000"; tcon_top_hdmi_out = "/soc/tcon-top@6510000/ports/port@5"; sram_a2 = "/soc/syscon@3000000/sram@100000"; cpu3 = "/cpus/cpu@3"; uart2 = "/soc/serial@5000800"; ir_rx_pin = "/soc/pinctrl@300b000/ir-rx-pin"; rmii_phy = "/soc/ethernet@5030000/mdio/ethernet-phy@1"; tcon_top_mixer0_in = "/soc/tcon-top@6510000/ports/port@0"; ahub1_mach = "/soc/ahub1_mach"; gic = "/soc/interrupt-controller@3021000"; pwm1 = "/soc/pwm1@0300a000"; uart3_pi_pins = "/soc/pinctrl@300b000/uart3-pi-pins"; mmc1_pins = "/soc/pinctrl@300b000/mmc1-pins"; spi1_cs0_pin = "/soc/pinctrl@300b000/spi1-cs0-pin"; ac200_ephy = "/soc/i2c@5002c00/mfd@10/phy"; mdio1 = "/soc/ethernet@5030000/mdio"; mixer0 = "/soc/bus@1000000/mixer@100000"; cpu1 = "/cpus/cpu@1"; scpi_sram = "/soc/syscon@3000000/sram@100000/scpi-sram@17c00"; uart0 = "/soc/serial@5000000"; ehci2 = "/soc/usb@5310000"; dump_reg = "/soc/dump_reg@20000"; mixer0_out = "/soc/bus@1000000/mixer@100000/ports/port@1"; r_rsb = "/soc/rsb@7083000"; reg_dcdc2 = "/soc/i2c@7081400/pmic@36/regulators/dcdc2"; i2c4 = "/soc/i2c@5003000"; pwm5_pin = "/soc/pinctrl@300b000/pwm5-pin"; ac200_x = "/soc/i2c@5002c00/mfd@10"; gpu_temp_critical = "/thermal-zones/gpu-thermal/trips/trip-point@0"; ohci3 = "/soc/usb@5311400"; ddr_temp_critical = "/thermal-zones/ddr-thermal/trips/trip-point@0"; addr_mgt = "/soc/addr-mgt"; cpu_opp_table = "/opp-table-cpu"; cpu_speed_grade = "/soc/efuse@3006000/cpu-speed-grade@0"; i2c3_ph_pins = "/soc/pinctrl@300b000/i2c3-ph-pins"; ehci0 = "/soc/usb@5101000"; reg_vcc_wifi_io = "/vcc-wifi-io"; hdmi_out = "/soc/hdmi@6000000/ports/port@1"; tcon_top_hdmi_in_tcon_tv = "/soc/tcon-top@6510000/ports/port@4/endpoint@0"; i2c2 = "/soc/i2c@5002800"; tcon_top = "/soc/tcon-top@6510000"; ohci1 = "/soc/usb@5200400"; mmc0_pins = "/soc/pinctrl@300b000/mmc0-pins"; sram_c = "/soc/syscon@3000000/sram@28000"; emac0 = "/soc/ethernet@5020000"; reg_dldo1 = "/soc/i2c@7081400/pmic@36/regulators/dldo1"; spi1 = "/soc/spi@5011000"; hdmi_out_con = "/soc/hdmi@6000000/ports/port@1/endpoint"; usbphy = "/soc/phy@5100400"; i2c3_pa_pins = "/soc/pinctrl@300b000/i2c3-pa-pins"; tcon_top_mixer0_out = "/soc/tcon-top@6510000/ports/port@1"; ahub1_plat = "/soc/ahub1_plat"; tcon_top_mixer0_out_tcon_tv = "/soc/tcon-top@6510000/ports/port@1/endpoint@2"; de3_sram = "/soc/syscon@3000000/sram@28000/sram-section@0"; i2c0 = "/soc/i2c@5002000"; uart2_pins = "/soc/pinctrl@300b000/uart2-pins"; mmc2 = "/soc/mmc@4022000"; ahub1_codec = "/soc/ahub1_mach/soundcard-mach,codec"; spi1_pins = "/soc/pinctrl@300b000/spi1-pins"; i2c0_pi_pins = "/soc/pinctrl@300b000/i2c0-pi-pins"; i2c3_pg_pins = "/soc/pinctrl@300b000/i2c3-pg-pins"; spi1_cs1_pin = "/soc/pinctrl@300b000/spi1-cs1-pin"; ahub1_cpu = "/soc/ahub1_mach/soundcard-mach,cpu"; usbotg = "/soc/usb@5100000"; uart5 = "/soc/serial@5001400"; cpu_threshold = "/thermal-zones/cpu-thermal/trips/trip-point@0"; codec = "/soc/codec@05096000"; osc24M = "/osc24M-clk"; hdmi_in_tcon_top = "/soc/hdmi@6000000/ports/port@0/endpoint"; reg_vcc5v = "/vcc5v"; tcon_tv_in = "/soc/lcd-controller@6515000/ports/port@0"; pwm4 = "/soc/pwm4@0300a000"; mmc0 = "/soc/mmc@4020000"; ac200_pwm_clk = "/ac200_clk"; tcon_top_mixer0_in_mixer0 = "/soc/tcon-top@6510000/ports/port@0/endpoint@0"; tcon_tv_out_tcon_top = "/soc/lcd-controller@6515000/ports/port@1/endpoint@1"; i2c0_pins = "/soc/pinctrl@300b000/i2c0-pins"; tcon_tv_out = "/soc/lcd-controller@6515000/ports/port@1"; r_pio = "/soc/pinctrl@7022000"; uart3 = "/soc/serial@5000c00"; i2c2_pi_pins = "/soc/pinctrl@300b000/i2c2-pi-pins"; tcon_top_hdmi_out_hdmi = "/soc/tcon-top@6510000/ports/port@5/endpoint"; cpu_target = "/thermal-zones/cpu-thermal/trips/trip-point@1"; sram_c1 = "/soc/syscon@3000000/sram@1a00000"; uart1_pins = "/soc/pinctrl@300b000/uart1-pins"; spi0_pins = "/soc/pinctrl@300b000/spi0-pins"; reg_aldo1 = "/soc/i2c@7081400/pmic@36/regulators/aldo1"; mixer0_out_tcon_top_mixer0 = "/soc/bus@1000000/mixer@100000/ports/port@1/endpoint"; iommu = "/soc/iommu@30f0000"; tcon_tv_in_tcon_top_mixer0 = "/soc/lcd-controller@6515000/ports/port@0/endpoint"; uart1_rts_cts_pins = "/soc/pinctrl@300b000/uart1-rts-cts-pins"; uart2_pi_pins = "/soc/pinctrl@300b000/uart2-pi-pins"; pwm2 = "/soc/pwm2@0300a000"; spi0_cs0_pin = "/soc/pinctrl@300b000/spi0-cs0-pin"; ve_sram = "/soc/syscon@3000000/sram@1a00000/sram-section@0"; pio = "/soc/pinctrl@300b000"; uart0_ph_pins = "/soc/pinctrl@300b000/uart0-ph-pins"; cpu2 = "/cpus/cpu@2"; ths = "/soc/thermal-sensor@5070400"; uart1 = "/soc/serial@5000400"; ehci3 = "/soc/usb@5311000"; hdmi = "/soc/hdmi@6000000"; r_i2c = "/soc/i2c@7081400"; hdmi_in = "/soc/hdmi@6000000/ports/port@0"; pwm1_ph_pin = "/soc/pinctrl@300b000/pwm1-ph-pin"; reg_dcdc3 = "/soc/i2c@7081400/pmic@36/regulators/dcdc3"; ext_rgmii_pins = "/soc/pinctrl@300b000/rgmii-pins"; de = "/display-engine"; pwm0 = "/soc/pwm0@0300a000"; reg_vcc3v3 = "/vcc3v3"; i2c2_ph_pins = "/soc/pinctrl@300b000/i2c2-ph-pins"; pwm2_ph_pin = "/soc/pinctrl@300b000/pwm2-ph-pin"; rtc = "/soc/rtc@7000000"; watchdog = "/soc/watchdog@30090a0"; mdio0 = "/soc/ethernet@5020000/mdio"; uart4_pi_pins = "/soc/pinctrl@300b000/uart4-pi-pins"; cpu0 = "/cpus/cpu@0"; sid = "/soc/efuse@3006000"; ehci1 = "/soc/usb@5200000"; reg_dcdc1 = "/soc/i2c@7081400/pmic@36/regulators/dcdc1"; }; reserved-memory { #address-cells = <0x02>; #size-cells = <0x02>; ranges; secmon@40000000 { reg = <0x00 0x40000000 0x00 0x80000>; no-map; }; }; memory { device_type = "memory"; reg = <0x00 0x40000000 0x01 0x00>; }; }; Edited October 29 by Ivano 0 Quote
robertoj Posted October 30 Author Posted October 30 Thank you, but I was referring to the 1 DTS that enables the ili9341, ads7846 and pwm-backlight, just in case you made a last change that you didn't mention. 0 Quote
Ivano Posted October 30 Posted October 30 This is the latest dts that I used with pwm-backlight. The only changes I made from the previous dts were moving ili9341 to CS1 and ads7846 to CS0, changing the default calibration values for ads7846, and adjusting the brightness values in pwm-backlight. Spoiler /dts-v1/; /plugin/; / { compatible = "allwinner,sun50i-h616"; fragment@0 { target = <&pwm4_ph_pin>; __overlay__ { pins = "PI14"; // Assign PI14 to pwm4 function = "pwm4"; }; }; fragment@1 { target-path = "/"; __overlay__ { backlight: backlight { compatible = "pwm-backlight"; pwms = <&pwm 4 1000000 0>; // PI14 - pwm4 brightness-levels = <0 8 16 32 64 96 128 160 208 255>; default-brightness-level = <9>; post-pwm-on-delay-ms = <10>; pwm-off-delay-ms = <10>; status = "okay"; }; }; }; fragment@2 { target = <&spi1>; __overlay__ { /* needed to avoid dtc warning */ #address-cells = <1>; #size-cells = <0>; status = "okay"; cs-gpios = <&pio 7 5 0>; // PH5 - CS0, PH9 - CS1 ili9341: ili9341@0 { compatible = "adafruit,yx240qv29", "ilitek,ili9341"; reg = <1>; // CS1 pinctrl-names = "default"; spi-max-frequency = <32000000>; rotation= <90>; fps = <30>; buswidth = <8>; height = <240>; width = <320>; reset-gpios = <&pio 8 6 0>; // PI6 dc-gpios = <&pio 7 4 0>; // PH4 backlight = <&backlight>; //debug = <3>; }; xpt2046: xpt2046@1 { compatible = "ti,ads7846"; reg = <0>; // CS0 pinctrl-names = "default"; spi-max-frequency = <1000000>; interrupts = <8 5 2>; // PI5 - IRQ interrupt-parent = <&pio>; pendown-gpio = <&pio 8 5 1>; // PI5 ti,pressure-min = /bits/ 16 <0>; ti,pressure-max = /bits/ 16 <255>; ti,x-plate-ohms = /bits/ 16 <40>; ti,y-plate-ohms = /bits/ 16 <40>; ti,x-min = /bits/ 16 <170>; ti,x-max = /bits/ 16 <3800>; ti,y-min = /bits/ 16 <200>; ti,y-max = /bits/ 16 <3800>; ti,debounce-rep = /bits/ 16 <1>; ti,debounce-tol = /bits/ 16 <2>; ti,debounce-max = /bits/ 16 <100>; ti,settle-delay-usec = /bits/ 16 <20>; ti,penirq-recheck-delay-usecs = /bits/ 16 <20>; ti,keep-vref-on = <1>; ti,swap-xy = <0>; wakeup-source; }; }; }; }; For gpio-backlight I used the following fragment which replaces fragment@0 and fragment@1 from above. Spoiler fragment@0 { target-path = "/"; __overlay__ { backlight: backlight { compatible = "gpio-backlight"; pinctrl-names = "default"; gpios = <&pio 8 14 0>; // PI14 default-on; status = "okay"; }; }; }; Make also sure that backlight = <&backlight>; is included inside the ili9341 section in order to have the backlight working or it will most likely not power on after the device boots. 0 Quote
robertoj Posted October 31 Author Posted October 31 Thank you I will try to modify it for opiz3 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.