heltheowl Posted 10 hours ago Posted 10 hours ago (edited) I'm trying to connect Nokia 5110 / PCD8544 LCD to my Orange Pi One H3 (Board v1.1). This is my wiring: Connection (LCD to OPi) Nokia 5110 LCD pin Orange Pi One pin GND GND LIGHT GND VCC 3.3v CLK PC2 (CLK) DIN PC0 (MOSI) DC PA6 CE PC3 (CE) RST PA9 This is my LCD: The backlight is working upon turning on OPi One. The official Orange Pi One H3 manual suggests using fbtft_device kernel module, which is LONG deprecated and no longer supported. On Raspberry Pi forums, someone was suggested to use a Device Tree Overlay instead. I've stumbled upon an Orange Pi Zero overlay file for my LCD. So I've changed a few lines: /dts-v1/; /plugin/; / { compatible = "allwinner,sun8i-h3"; fragment@0 { target = <&spi1>; __overlay__ { status = "okay"; spidev@0{ status = "disabled"; }; spidev@1{ status = "disabled"; }; }; }; fragment@1 { target = <&pio>; __overlay__ { opiz_display_pins: opiz_display_pins { pins = "PA9", "PA6"; function = "gpio_out"; }; }; }; fragment@2 { target = <&spi1>; __overlay__ { /* needed to avoid dtc warning */ #address-cells = <1>; #size-cells = <0>; opizdisplay: opiz-display@0{ compatible = "philips,pcd8544"; reg = <0>; pinctrl-names = "default"; pinctrl-0 = <&opiz_display_pins>; spi-max-frequency = <400000>; fps = <30>; buswidth = <8>; reset-gpios = <&pio 0 33 1>; dc-gpios = <&pio 0 7 0>; }; }; }; }; And compiled, loaded it into an DTS user directory. I've connected Arduino as a Serial-to-USB convertor to OPi and it would seem it has loaded successfully: Applying user provided DT overlay nokia5110opizero.dtbo 4185 bytes read in 14 ms (291 KiB/s) Applying kernel provided DT fixup script (sun8i-h3-fixup.scr) ## Executing script at 45000000 Kernel image @ 0x42000000 [ 0x000000 - 0xa0ea90 ] ## Loading init Ramdisk from Legacy Image at 43400000 ... Image Name: uInitrd Image Type: ARM Linux RAMDisk Image (gzip compressed) Data Size: 17670074 Bytes = 16.9 MiB Load Address: 00000000 Entry Point: 00000000 Verifying Checksum ... OK ## Flattened Device Tree blob at 43000000 Booting using the fdt blob at 0x43000000 Working FDT set to 43000000 Loading Ramdisk to 48f26000, end 49ffffba ... OK Loading Device Tree to 48eb5000, end 48f25fff ... OK Working FDT set to 48eb5000 But according to armbianmonitor -u output , the overlay ends up creating new errors: [ 1.630221] sun8i-h3-pinctrl 1c20800.pinctrl: pin PA14 already requested by 1c28c00.serial; cannot claim for 1c69000.spi [ 1.630250] sun8i-h3-pinctrl 1c20800.pinctrl: error -EINVAL: pin-14 (1c69000.spi) [ 1.630269] sun8i-h3-pinctrl 1c20800.pinctrl: error -EINVAL: could not request pin 14 (PA14) from group PA14 on device 1c20800.pinctrl [ 1.630288] sun6i-spi 1c69000.spi: Error applying setting, reverse things back I know the overlay is for Zero series, but i figured it should be the same since H3 is mentioned in there. Or at least I would be glad to know how to modify this for my board. Attached below are both logs for Serial and the kernel. So far my goal is display anything, even a black square, on the screen. Would be sick to use it as a screen for console (like /dev/fb0). Hoping for your help since I'm stuck. Thanks in advance! dmesg.txt serial.txt Edited 10 hours ago by heltheowl /dev/fb0 mention 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.