Help getting LCD working on AT91SAM9X35

This forum is for users of Microchip MPUs and who are interested in using Linux OS.

Moderator: nferre

Shpoople96
Posts: 2
Joined: Sun Feb 18, 2018 10:31 pm

Help getting LCD working on AT91SAM9X35

Sun Feb 18, 2018 11:26 pm

Hello,
I am new to embedded Linux here, I am using the Embest MBS-SAM9X35 board with the AT91SAM9X35 processor and the 4.3" AT043TN24 TFT LCD panel.
I have been having issues getting the AT043TN24 display to work using buildroot. I've modified the at91sam9x5dm.dtsi file to enable and reflect the panel modules that I am using, but other than that, I have not made any modifications to the device tree files, as I am not really familiar with them.

The atmel-hlcdc driver is returning the error failed to create HLCDC outputs: -517 and failed to initialize mode setting, however using the modetest program, I am able to get the color test running, using modetest -M atmel-hlcdc -s 24@31:480x242

I have a feeling that the issue may be with the Device tree files, but I am not 100% sure. If somebody could help me figure out what I am doing wrong, that would be much appreciated. I have been struggling with this for a couple of days now. Thanks.

Boot log:

Code: Select all

RomBOOT



AT91Bootstrap 3.8.9 (Sat Feb 17 22:13:17 MST 2018)

1-Wire: Loading 1-Wire information ...
1-Wire: ROM Searching ... Done, 2 1-Wire chips found

1-Wire: BoardName | [Revid] | VendorName
  #0  SAM9X35-CM [B1]      EMBEST
  #1  SAM9x5-EK [B0]      FLEX

1-Wire: Board sn: 0x4000026 revision: 0x8401

SD/MMC: Image: Read file u-boot.bin to 0x26f00000
SD: Card Capacity: High or Extended
SD: Specification Version 3.0X
SD/MMC: Done to load image
<debug_uart> 

U-Boot 2017.03-linux4sam_5.7 (Feb 17 2018 - 22:13:47 -0700)

CPU: AT91SAM9X35
Crystal frequency:       12 MHz
CPU clock        :      400 MHz
Master clock     :  133.333 MHz
DRAM:  128 MiB
NAND:  256 MiB
MMC:   Atmel mci: 0, Atmel mci: 1
reading uboot.env
In:    serial
Out:   serial
Err:   serial
Net:   
Error: ethernet@f802c000 address not set.
No ethernet found.
Hit any key to stop autoboot:  1  0 
reading at91sam9g35ek.dtb
28714 bytes read in 8 ms (3.4 MiB/s)
reading zImage
3840344 bytes read in 506 ms (7.2 MiB/s)
## Flattened Device Tree blob at 21000000
   Booting using the fdt blob at 0x21000000
   Loading Device Tree to 27eb1000, end 27ebb029 ... OK

Starting kernel ...

Booting Linux on physical CPU 0x0
Linux version 4.9.52-linux4sam_5.7 (shpoople@Shpoople-Mint) (gcc version 6.4.0 (Buildroot 2017.11.2) ) #2 Sat Feb 17 22:29:07 MST 2018
CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=0005317f
CPU: VIVT data cache, VIVT instruction cache
OF: fdt:Machine model: Atmel AT91SAM9G35-EK
Memory policy: Data cache writeback
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512
Kernel command line: console=ttyS0,115200 root=/dev/mmcblk0p2 rw rootfstype=ext4 rootwait
PID hash table entries: 512 (order: -1, 2048 bytes)
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 122112K/131072K available (5508K kernel code, 180K rwdata, 1380K rodata, 208K init, 199K bss, 8960K reserved, 0K cma-reserved)
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
    vmalloc : 0xc8800000 - 0xff800000   ( 880 MB)
    lowmem  : 0xc0000000 - 0xc8000000   ( 128 MB)
    modules : 0xbf000000 - 0xc0000000   (  16 MB)
      .text : 0xc0008000 - 0xc0569400   (5509 kB)
      .init : 0xc06ea000 - 0xc071e000   ( 208 kB)
      .data : 0xc071e000 - 0xc074b380   ( 181 kB)
       .bss : 0xc074b380 - 0xc077d1cc   ( 200 kB)
NR_IRQS:16 nr_irqs:16 16
clocksource: pit: mask: 0x7ffffff max_cycles: 0x7ffffff, max_idle_ns: 7167226906 ns
sched_clock: 32 bits at 128 Hz, resolution 7812500ns, wraps every 16777215996093750ns
Console: colour dummy device 80x30
Calibrating delay loop... 198.76 BogoMIPS (lpj=775168)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
CPU: Testing write buffer coherency: ok
Setting up static identity map for 0x20008400 - 0x2000847c
devtmpfs: initialized
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 14931722236523437 ns
futex hash table entries: 256 (order: -1, 3072 bytes)
pinctrl core: initialized pinctrl subsystem
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic coherent allocations
cpuidle: using governor ladder
AT91: PM: standby: standby, suspend: ulp0
gpio-at91 fffff400.gpio: at address c885f400
gpio-at91 fffff600.gpio: at address c8861600
gpio-at91 fffff800.gpio: at address c8863800
gpio-at91 fffffa00.gpio: at address c8865a00
pinctrl-at91 ahb:apb:pinctrl@fffff400: initialized AT91 pinctrl driver
clocksource: tcb_clksrc: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 114675631333 ns
at_hdmac ffffec00.dma-controller: Atmel AHB DMA Controller ( cpy set slave sg-cpy ), 8 channels
at_hdmac ffffee00.dma-controller: Atmel AHB DMA Controller ( cpy set slave sg-cpy ), 8 channels
AT91: Detected SoC family: at91sam9x5
AT91: Detected SoC: at91sam9x35, revision 1
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
at91_i2c f8010000.i2c: using dma0chan0 (tx) and dma0chan1 (rx) for DMA transfers
at91_i2c f8010000.i2c: AT91 i2c bus driver (hw version: 0x402).
Linux video capture interface: v2.00
Advanced Linux Sound Architecture Driver Initialized.
clocksource: Switched to clocksource tcb_clksrc
NET: Registered protocol family 2
TCP established hash table entries: 1024 (order: 0, 4096 bytes)
TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
TCP: Hash tables configured (established 1024 bind 1024)
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
workingset: timestamp_bits=30 max_order=15 bucket_order=0
io scheduler noop registered (default)
fffff200.serial: ttyS0 at MMIO 0xfffff200 (irq = 16, base_baud = 8333333) is a ATMEL_SERIAL
console [ttyS0] enabled
f801c000.serial: ttyS1 at MMIO 0xf801c000 (irq = 25, base_baud = 8333333) is a ATMEL_SERIAL
[drm] Initialized
brd: module loaded
loop: module loaded
ssc f0010000.ssc: Atmel SSC device at 0xc88a4000 (irq 22)
[drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[drm] No driver support for vblank timestamp query.
atmel-hlcdc-display-controller atmel-hlcdc-dc: failed to create HLCDC outputs: -517
atmel-hlcdc-display-controller atmel-hlcdc-dc: failed to initialize mode setting
atmel_nand 40000000.nand: Using dma0chan2 for DMA transfers.
nand: device found, Manufacturer ID: 0x2c, Chip ID: 0xda
nand: Micron MT29F2G08ABAEAWP
nand: 256 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
atmel_nand 40000000.nand: Use On Flash BBT
atmel_nand 40000000.nand: minimum ECC: 4 bits in 512 bytes
atmel_nand 40000000.nand: WARNING: Be Caution! Using different PMECC parameters from Nand ONFI ECC reqirement.
atmel_nand 40000000.nand: Initialize PMECC params, cap: 2, sector: 512
atmel_nand 40000000.nand: invalid resource
nand: WARNING: 40000000.nand: the ECC used on your system is too weak compared to the one required by the NAND chip
Bad block table found at page 131008, version 0x01
Bad block table found at page 130944, version 0x01
5 ofpart partitions found on MTD device atmel_nand
Creating 5 MTD partitions on "atmel_nand":
0x000000000000-0x000000040000 : "at91bootstrap"
0x000000040000-0x0000000c0000 : "u-boot"
0x0000000c0000-0x000000200000 : "U-Boot Env"
0x000000200000-0x000000800000 : "kernel"
0x000000800000-0x000020000000 : "rootfs"
mtd: partition "rootfs" extends beyond the end of device "atmel_nand" -- size truncated to 0xf800000
libphy: Fixed MDIO Bus: probed
CAN device driver interface
macb f802c000.ethernet: invalid hw address, using random
libphy: MACB_mii_bus: probed
Davicom DM9161A f802c000.etherne:10: attached PHY driver [Davicom DM9161A] (mii_bus:phy_addr=f802c000.etherne:10, irq=-1)
macb f802c000.ethernet eth0: Cadence MACB rev 0x0001010c at 0xf802c000 irq 30 (e6:58:47:01:02:30)
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ehci-atmel: EHCI Atmel driver
atmel-ehci 700000.ehci: EHCI Host Controller
atmel-ehci 700000.ehci: new USB bus registered, assigned bus number 1
atmel-ehci 700000.ehci: irq 31, io mem 0x00700000
atmel-ehci 700000.ehci: USB 2.0 started, EHCI 1.00
usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb1: Product: EHCI Host Controller
usb usb1: Manufacturer: Linux 4.9.52-linux4sam_5.7 ehci_hcd
usb usb1: SerialNumber: 700000.ehci
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 3 ports detected
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
ohci-atmel: OHCI Atmel driver
at91_ohci 600000.ohci: failed to find sfr node
at91_ohci 600000.ohci: USB Host Controller
at91_ohci 600000.ohci: new USB bus registered, assigned bus number 2
at91_ohci 600000.ohci: irq 31, io mem 0x00600000
usb usb2: New USB device found, idVendor=1d6b, idProduct=0001
usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb2: Product: USB Host Controller
usb usb2: Manufacturer: Linux 4.9.52-linux4sam_5.7 ohci_hcd
usb usb2: SerialNumber: at91
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 3 ports detected
usbcore: registered new interface driver cdc_acm
cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
usbcore: registered new interface driver usb-storage
usbcore: registered new interface driver usbserial
usbcore: registered new interface driver usbserial_generic
usbserial: USB Serial support registered for generic
usbcore: registered new interface driver ftdi_sio
usbserial: USB Serial support registered for FTDI USB Serial Device
usbcore: registered new interface driver pl2303
usbserial: USB Serial support registered for pl2303
mousedev: PS/2 mouse device common for all mice
qt1070 0-001b: AT42QT1070 firmware version 15
random: fast init done
usb 2-3: new full-speed USB device number 2 using at91_ohci
input: AT42QT1070 QTouch Sensor as /devices/platform/ahb/ahb:apb/f8010000.i2c/i2c-0/0-001b/input/input0
rtc rtc0: alarm rollover not handled
rtc rtc0: invalid alarm value: 1900-1-1 0:0:0
at91_rtc fffffeb0.rtc: rtc core: registered fffffeb0.rtc as rtc0
at91_rtc fffffeb0.rtc: AT91 Real Time Clock driver.
i2c /dev entries driver
AT91: Starting after general reset
at91_wdt fffffe40.watchdog: watchdog is disabled
at91_wdt: probe of fffffe40.watchdog failed with error -22
atmel_mci f0008000.mmc: version: 0x504
atmel_mci f0008000.mmc: using dma0chan3 for DMA transfers
atmel_mci f0008000.mmc: Atmel MCI controller at 0xf0008000 irq 23, 1 slots
atmel_mci f000c000.mmc: version: 0x504
atmel_mci f000c000.mmc: using dma1chan0 for DMA transfers
usb 2-3: not running at top speed; connect to a high speed hub
usb 2-3: New USB device found, idVendor=154b, idProduct=007a
usb 2-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 2-3: Product: USB 2.0 FD
usb 2-3: Manufacturer: PNY Technologies
usb 2-3: SerialNumber: ADB2HE02000000081
usb-storage 2-3:1.0: USB Mass Storage device detected
scsi host0: usb-storage 2-3:1.0
mmc0: host does not support reading read-only switch, assuming write-enable
mmc0: new high speed SDHC card at address 59b4
atmel_mci f000c000.mmc: Atmel MCI controller at 0xf000c000 irq 24, 1 slots
ledtrig-cpu: registered to indicate activity on CPUs
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
iio iio:device0: Resolution used: 10 bits
input: at91_adc as /devices/platform/ahb/ahb:apb/f804c000.adc/input/input1
mmcblk0: mmc0:59b4 SD    14.7 GiB 
 mmcblk0: p1 p2
wm8731 0-001a: Assuming static MCLK
0-001a supply AVDD not found, using dummy regulator
0-001a supply HPVDD not found, using dummy regulator
0-001a supply DCVDD not found, using dummy regulator
0-001a supply DBVDD not found, using dummy regulator
sam9x5-snd-wm8731 sound: wm8731-hifi <-> f0010000.ssc mapping ok
ip_tables: (C) 2000-2006 Netfilter Core Team
NET: Registered protocol family 10
sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
NET: Registered protocol family 17
can: controller area network core (rev 20120528 abi 9)
NET: Registered protocol family 29
can: raw protocol (rev 20120528)
can: broadcast manager protocol (rev 20161123 t)
can: netlink gateway (rev 20130117) max_hops=1
[drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[drm] No driver support for vblank timestamp query.
atmel-hlcdc-display-controller atmel-hlcdc-dc: DRM device successfully registered
at91_rtc fffffeb0.rtc: setting system clock to 2007-01-01 00:00:07 UTC (1167609607)
panel-power-supply: disabling
ALSA device list:
  #0: wm8731 @ AT91SAM9X5EK
EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
VFS: Mounted root (ext4 filesystem) on device 179:2.
devtmpfs: mounted
Freeing unused kernel memory: 208K
This architecture does not have kernel memory protection.
usb 2-2: new full-speed USB device number 3 using at91_ohci
EXT4-fs (mmcblk0p2): re-mounted. Opts: data=ordered
Starting logging: OK
Populating /dev using udev: /etc/init.d/S10udev: line 47: can't create /proc/sys/kernel/hotplug: nonexistenusb 2-2: New USB device found, idVendor=046d, idProduct=c52b
usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 2-2: Product: USB Receiver
usb 2-2: Manufacturer: Logitech
t directory
input: Logitech USB Receiver as /devices/platform/ahb/600000.ohci/usb2/2-2/2-2:1.0/0003:046D:C52B.0001/input/input2
hid-generic 0003:046D:C52B.0001: input: USB HID v1.11 Keyboard [Logitech USB Receiver] on usb-at91-2/input0
input: Logitech USB Receiver as /devices/platform/ahb/600000.ohci/usb2/2-2/2-2:1.1/0003:046D:C52B.0002/input/input3
udevd[91]: starting version 3.2.4
hid-generic 0003:046D:C52B.0002: input: USB HID v1.11 Mouse [Logitech USB Receiver] on usb-at91-2/input1
hid-generic 0003:046D:C52B.0003: device has no listeners, quitting
udevd[92]: starting eudev-3.2.4
scsi 0:0:0:0: Direct-Access     PNY      USB 2.0 FD       1100 PQ: 0 ANSI: 4
sd 0:0:0:0: [sda] 62844672 512-byte logical blocks: (32.2 GB/30.0 GiB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] No Caching mode page found
sd 0:0:0:0: [sda] Assuming drive cache: write through
 sda: sda1
sd 0:0:0:0: [sda] Attached SCSI removable disk
atmel_usba_udc 500000.gadget: MMIO registers at 0xf803c000 mapped at c8afb000
atmel_usba_udc 500000.gadget: FIFO at 0x00500000 mapped at c8c80000
Console: switching to colour frame buffer device 100x30
atmel-hlcdc-display-controller atmel-hlcdc-dc: fb0:  frame buffer device
done
Initializing random number generator... done.
Starting system message bus: done
Starting network: OK
Starting dropbear sshd: OK
ssh-keygen: generating new host keys: RSA DSA ECDSA ED25519 
Starting sshd: OK


Welcome to Buildroot

buildroot login: root
# modetest -M atmel-hlcdc
Encoders:
id	crtc	type	possible crtcs	possible clones	
23	0	none	0x00000001	0x00000000

Connectors:
id	encoder	status		name		size (mm)	modes	encoders
24	0	connected	unknown-1      	95x54		1	23
  modes:
	name refresh (Hz) hdisp hss hse htot vdisp vss vse vtot)
  480x272 60 480 482 523 525 272 274 285 287 9000 flags: nhsync, nvsync; type: preferred, driver
  props:
	1 EDID:
		flags: immutable blob
		blobs:

		value:
	2 DPMS:
		flags: enum
		enums: On=0 Standby=1 Suspend=2 Off=3
		value: 3

CRTCs:
id	fb	pos	size
31	0	(0,0)	(0x0)
   0 0 0 0 0 0 0 0 0 0 flags: ; type: 
  props:

Planes:
id	crtc	fb	CRTC x,y	x,y	gamma size	possible crtcs
27	0	0	0,0		0,0	0       	0x00000001
  formats: XR12 AR12 RA12 AR15 RG16 RG24 XR24 AR24 RA24
  props:
	5 type:
		flags: immutable enum
		enums: Overlay=0 Primary=1 Cursor=2
		value: 1
	26 rotation:
		flags: bitmask
		values: rotate-0=0x1 rotate-90=0x2 rotate-180=0x4 rotate-270=0x8
		value: 0
28	0	0	0,0		0,0	0       	0x00000001
  formats: XR12 AR12 RA12 AR15 RG16 RG24 XR24 AR24 RA24
  props:
	5 type:
		flags: immutable enum
		enums: Overlay=0 Primary=1 Cursor=2
		value: 0
	25 alpha:
		flags: range
		values: 0 255
		value: 255
	26 rotation:
		flags: bitmask
		values: rotate-0=0x1 rotate-90=0x2 rotate-180=0x4 rotate-270=0x8
		value: 0
29	0	0	0,0		0,0	0       	0x00000001
  formats: XR12 AR12 RA12 AR15 RG16 RG24 XR24 AR24 RA24 AYUV YUYV UYVY YVYU VYUY NV21 NV61 YU16 YU12
  props:
	5 type:
		flags: immutable enum
		enums: Overlay=0 Primary=1 Cursor=2
		value: 0
	25 alpha:
		flags: range
		values: 0 255
		value: 255
	26 rotation:
		flags: bitmask
		values: rotate-0=0x1 rotate-90=0x2 rotate-180=0x4 rotate-270=0x8
		value: 0
30	0	0	0,0		0,0	0       	0x00000001
  formats: XR12 AR12 RA12 AR15 RG16 RG24 XR24 AR24 RA24
  props:
	5 type:
		flags: immutable enum
		enums: Overlay=0 Primary=1 Cursor=2
		value: 2
	25 alpha:
		flags: range
		values: 0 255
		value: 255
	26 rotation:
		flags: bitmask
		values: rotate-0=0x1 rotate-90=0x2 rotate-180=0x4 rotate-270=0x8
		value: 0

Frame buffers:
id	size	pitch

# modetest -M atmel-hlcdc -s 24@31:480x272
setting mode 480x272-60Hz@XR24 on connectors 24, crtc 31

# fbset

mode "800x480-0"
	# D: 0.000 MHz, H: 0.000 kHz, V: 0.000 Hz
	geometry 800 480 800 480 16
	timings 0 0 0 0 0 0 0
	accel true
	rgba 5/11,6/5,5/0,0/0
endmode

# 

at91sam9x5dm.dtsi:

Code: Select all

/*
 * at91sam9x5dm.dtsi - Device Tree file for SAM9x5 display module
 *
 *  Copyright (C) 2014 Atmel,
 *                2014 Free Electrons
 *
 *  Author: Boris Brezillon <boris.brezillon@free-electrons.com>
 *
 * Licensed under GPLv2 or later.
 */

/ {
	ahb {
		apb {
			i2c0: i2c@f8010000 {
				qt1070: keyboard@1b {
					compatible = "qt1070";
					reg = <0x1b>;
					interrupt-parent = <&pioA>;
					interrupts = <7 0x0>;
					pinctrl-names = "default";
					pinctrl-0 = <&pinctrl_qt1070_irq>;
					wakeup-source;
				};
			};

			hlcdc: hlcdc@f8038000 {
				hlcdc-display-controller {
					pinctrl-names = "default";
					pinctrl-0 = <&pinctrl_lcd_base &pinctrl_lcd_rgb888>;

					port@0 {
						hlcdc_panel_output: endpoint@0 {
							reg = <0>;
							remote-endpoint = <&panel_input>;
						};
					};
				};
			};

			adc0: adc@f804c000 {
				atmel,adc-ts-wires = <4>;
				atmel,adc-ts-pressure-threshold = <10000>;
				status = "okay";
			};

			pinctrl@fffff400 {
				board {
					pinctrl_qt1070_irq: qt1070_irq {
						atmel,pins =
							<AT91_PIOA 7 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>;
					};
				};
			};
		};
	};

	backlight: backlight {
		compatible = "pwm-backlight";
		pwms = <&hlcdc_pwm 0 50000 0>;
		brightness-levels = <0 4 8 16 32 64 128 255>;
		default-brightness-level = <6>;
		power-supply = <&bl_reg>;
		status = "okay";
	};

	bl_reg: backlight_regulator {
		compatible = "regulator-fixed";
		regulator-name = "backlight-power-supply";
		regulator-min-microvolt = <5000000>;
		regulator-max-microvolt = <5000000>;
		status = "okay";
	};

	panel: panel {
		compatible = "innolux,at043tn24", "simple-panel";
		backlight = <&backlight>;
		power-supply = <&panel_reg>;
		#address-cells = <1>;
		#size-cells = <0>;
		status = "okay";

		port@0 {
			#address-cells = <1>;
			#size-cells = <0>;

			panel_input: endpoint@0 {
				reg = <0>;
				remote-endpoint = <&hlcdc_panel_output>;
			};
		};
	};

	panel_reg: panel_regulator {
		compatible = "regulator-fixed";
		regulator-name = "panel-power-supply";
		regulator-min-microvolt = <3300000>;
		regulator-max-microvolt = <3300000>;
		status = "okay";
	};
};
blue_z
Location: USA
Posts: 1721
Joined: Thu Apr 19, 2007 10:15 pm

Re: Help getting LCD working on AT91SAM9X35

Mon Feb 19, 2018 10:43 pm

Shpoople96 wrote:I am new to embedded Linux here, I am using the Embest MBS-SAM9X35 board with the AT91SAM9X35 processor and the 4.3" AT043TN24 TFT LCD panel.
The SAM9X35 is not a processor, but a SoC which has an ARM 926EJ-S processor.

Shpoople96 wrote:The atmel-hlcdc driver is returning the error failed to create HLCDC outputs: -517 and failed to initialize mode setting,
Those are actually benign messages since you failed to notice that the atmel-hlcdc driver does eventually successfully install.
See this topic for the same issue.
Shpoople96 wrote:however using the modetest program, I am able to get the color test running, using modetest -M atmel-hlcdc -s 24@31:480x242
If the atmel-hlcdc driver had not successfully installed, then that command would not succeed.
Shpoople96 wrote:If somebody could help me figure out what I am doing wrong, that would be much appreciated.
Other than the undetected install of the atmel-hlcdc driver, what is the problem?
Success with the `modetest` color pattern means that the LCD is connected and functional.
Have you studied Use of the legacy fbdev emulation?

Regards
Shpoople96
Posts: 2
Joined: Sun Feb 18, 2018 10:31 pm

Re: Help getting LCD working on AT91SAM9X35

Wed Feb 21, 2018 2:42 am

blue_z wrote:
Mon Feb 19, 2018 10:43 pm
Other than the undetected install of the atmel-hlcdc driver, what is the problem?
Success with the `modetest` color pattern means that the LCD is connected and functional.
Have you studied Use of the legacy fbdev emulation?

Regards

Sorry, like I said, I'm still pretty new to all of this, so I just threw out all of the things that stuck out to me.

Specifically, I can't get the framebuffer to work at all with the screen. When I first boot up Linux, the screen flashes white but does nothing else after that. The modetest is actually the only thing that I've gotten to display on the screen at all so far.

When I check the available modes for /dev/fb0 using fbset, I get U:800x480p-0 (With no timings at all, resulting in an overall screen clockrate of 0.0 MHz), despite the fact that the screen I'm using is 480x272. Thus, I tried changing the mode using fbset -g and fbset -t and the timings that I pulled from the preloaded Angstrom image on the NAND flash, however that returned with the error FBIOPUT_VSCREENINFO: Invalid argument. I also tried to set /etc/fb.modes directly, but fbset still showed that the U:800x480p-0 mode was the only one available.

I would try using video=Unknown-1:480x272-16 on the kernel boot, but that requires that the correct mode exists.

Hopefully this makes it a little clearer as to what I might be doing wrong.
blue_z
Location: USA
Posts: 1721
Joined: Thu Apr 19, 2007 10:15 pm

Re: Help getting LCD working on AT91SAM9X35

Thu Feb 22, 2018 1:50 am

Shpoople96 wrote:Sorry, like I said, I'm still pretty new to all of this, ...
Then study How To Ask Questions The Smart Way.
Your posts are littered with your conclusions and/or interpretations (instead of straightforward observations), abbreviated descriptions and error messages, and typos in commands that you claimed to use (e.g. resolution for modetest).
I neglected to initially mention those shortcomings because the boot log that you included provided the salient and accurate information.

Shpoople96 wrote:Specifically, I can't get the framebuffer to work at all with the screen.
That's a conclusion, rather than a description or observation.
Shpoople96 wrote:The modetest is actually the only thing that I've gotten to display on the screen at all so far.
What is displayed?
How do you know that what you see is an accurate rendering of what is supposed to be displayed?

Shpoople96 wrote:Thus, I tried changing the mode using fbset -g and fbset -t ...
I also tried to set /etc/fb.modes directly, ...

I would try using video=Unknown-1:480x272-16 on the kernel boot, but ....
I asked a question regarding your awareness of how to enable fbdev emulation, and instead of a simple answer regarding adherence to that documentation, you respond with abbreviated descriptions of irrelevant experimentation and an apparent refusal to apply one of the requirements.

Shpoople96 wrote:Hopefully this makes it a little clearer as to what I might be doing wrong.
It seems like you don't know how or want to study/follow a documented procedure.

The panel timings are defined for the DRM driver (see drivers/gpu/drm/panel/panel-simple.c), and apparently that data are not passed back to the emulated fbdev.
For example on an AT91SAM9x5-EK, the emulated fbdev timings for the functioning LCD panel are null:

Code: Select all

root@at91sam9x5ek:~# fbset

mode "800x480-0"
        # D: 0.000 MHz, H: 0.000 kHz, V: 0.000 Hz
        geometry 800 480 800 480 16
        timings 0 0 0 0 0 0 0
        accel true
        rgba 5/11,6/5,5/0,0/0
endmode
Hence your experimentation with "fb timing" was a waste of time/effort.


Regards

Return to “LINUX”

Who is online

Users browsing this forum: No registered users and 2 guests