This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/AM3352: integration of TFT Screen with parallel RGB interface needing SPI configuration

Part Number: AM3352
Other Parts Discussed in Thread: TPS65217, DA8XX

Tool/software: Linux


Hi

I have been digging around on the forums here (and in other places) to try and understand how best to drive our LCD display.

The board is custom but closely based on a beaglebone black.
The display uses an Ilitek9340 driver with an interface in two parts; that I am having difficulty working out how to define in my device tree.

It is configured in what the Ilitek datasheet calls "3 wire 9 bit serial interface" mode; i.e. half duplex SPI mode.
This serial interface should be used to configure the chip whereafter the image data itself should be driven through a parallel RBG interface. This RGB interface can be set up to have a DataEnable (DE) line if necessary.

From my digging about this does not seem to be an uncommon situation (unfortunately neither does having difficulty with it!)

My hope was that I could define both:
- an lcd device on the spi bus which would run through the init process in the ili9340 driver
- a panel that would provide the necessary display

The spi device I have defined as:

&spi1 {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&spi1_pins>;

lcd@0 {
compatible = "ilitek,ili9340";
reg = <0>;
spi-max-frequency = <24000000>;
rotate = <90>;
fps = <30>;

buswidth = <9>;
width = <240>;
height = <320>;

reset-gpios= <&gpio3 19 GPIO_ACTIVE_LOW>;

};
};

The panel:

panel {
compatible = "ti,tilcdc,panel";
pinctrl-names = "default", "sleep";
pinctrl-0 = <&lcd_pins_default>;
pinctrl-1 = <&lcd_pins_sleep>;
status = "okay";
enable-gpios = <&gpio2 25 0>; 
panel-info {
ac-bias = <255>;
ac-bias-intrpt = <0>;
dma-burst-sz = <16>;
bpp = <32>;
fdd = <0x80>;
sync-edge = <0>;
sync-ctrl = <1>;
raster-order = <0>;
fifo-th = <0>;
};
display-timings {
240x320 {
clock-frequency = <6350000>; /* 6.35 MHz */
hactive = <240>;
vactive = <320>;
hfront-porch = <10>;
hback-porch = <20>;
hsync-len = <10>;
vback-porch = <2>;
vfront-porch = <4>;
vsync-len = <2>;
hsync-active = <0>;
vsync-active = <0>;
de-active = <1>;
pixelclk-active = <1>;
};
};
};

The pinmuxs I am using for both are:

lcd_pins_default: lcd_pins_default {
pinctrl-single,pins = <
0xa0 (PIN_OUTPUT | MUX_MODE0) /*DB0 lcd_data0.lcd_data0 */
0xa4 (PIN_OUTPUT | MUX_MODE0) /*DB1 lcd_data1.lcd_data1 */
0xa8 (PIN_OUTPUT | MUX_MODE0) /*DB2 lcd_data2.lcd_data2 */
0xac (PIN_OUTPUT | MUX_MODE0) /*DB3 lcd_data3.lcd_data3 */
0xb0 (PIN_OUTPUT | MUX_MODE0) /*DB4 lcd_data4.lcd_data4 */
0xb4 (PIN_OUTPUT | MUX_MODE0) /*DB5 lcd_data5.lcd_data5 */
0xb8 (PIN_OUTPUT | MUX_MODE0) /*DB6 lcd_data6.lcd_data6 */
0xbc (PIN_OUTPUT | MUX_MODE0) /*DB7 lcd_data7.lcd_data7 */
0xc0 (PIN_OUTPUT | MUX_MODE0) /*DB8 lcd_data8.lcd_data8 */
0xc4 (PIN_OUTPUT | MUX_MODE0) /*DB9 lcd_data9.lcd_data9 */
0xc8 (PIN_OUTPUT | MUX_MODE0) /*DB10 lcd_data10.lcd_data10 */
0xcc (PIN_OUTPUT | MUX_MODE0) /*DB11 lcd_data11.lcd_data11 */
0xd0 (PIN_OUTPUT | MUX_MODE0) /*DB12 lcd_data12.lcd_data12 */
0xd4 (PIN_OUTPUT | MUX_MODE0) /*DB13 lcd_data13.lcd_data13 */
0xd8 (PIN_OUTPUT | MUX_MODE0) /*DB14 lcd_data14.lcd_data14 */
0xdc (PIN_OUTPUT | MUX_MODE0) /*DB15 lcd_data15.lcd_data15 */
0x38 (PIN_OUTPUT | MUX_MODE1) /*DB16 gpmc_ad14.lcd_data16 */
0x3c (PIN_OUTPUT | MUX_MODE1) /*DB17 gpmc_ad15.lcd_data17 */
0xe0 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /*HSYNC lcd_vsync.lcd_vsync */
0xe4 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /*HSYNC lcd_hsync.lcd_hsync */
0xe8 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /*DOTCLK lcd_pclk.lcd_pclk */
0xec (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /*DE lcd_ac_bias_en.gpio*/
>;
};

spi1_pins: pinmux_spi1_pins {
pinctrl-single,pins = <
0x108 (PIN_INPUT_PULLUP | MUX_MODE2) /* SPI1_SCL */
0x110 (PIN_INPUT_PULLUP | MUX_MODE2) /* SPI1_MOSI */
0x19c (PIN_OUTPUT_PULLUP | MUX_MODE3) /* SPI1_CS */
0x1A4 (PIN_OUTPUT_PULLUP | MUX_MODE7) /* TFT_RESET */
>;
};

I can see the bytes being sent to over the SPI: the reset and CS look appropriate at the time (HI and LO respectively)

Tthis is using normal 4 wire mode; just not expecting anything in return, which should be sufficient for configuration.

I never see anything happen on the video lines

I can see /dev/fb0 from the fb_ili9340
And nodes

/proc/device-tree/panel
/proc/device-tree/ocp/spi@481a0000/lcd@0

I think I was expecting another framebuffer for the panel: is there something else I need to define in the DTS for this to appear?

The full dmesg is here:   

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Initializing cgroup subsys cpuacct
[    0.000000] Linux version 4.4.19-gdb0b54cdad (richard@richard-ubvm) (gcc version 5.3.1 20160113 (Linaro GCC 5.3-2016.02) ) #206 PREEMPT Tue Ju7
[    0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c5387d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] Machine model: Compumedics Argo
[    0.000000] cma: Reserved 24 MiB at 0x8d000000
[    0.000000] Memory policy: Data cache writeback
[    0.000000] On node 0 totalpages: 65536
[    0.000000] free_area_init_node: node 0, pgdat c099f44c, node_mem_map cfdad000
[    0.000000]   Normal zone: 576 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 65536 pages, LIFO batch:15
[    0.000000] CPU: All CPU(s) started in SVC mode.
[    0.000000] AM335X ES2.1 (neon )
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0 
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 64960
[    0.000000] Kernel command line: console=ttyO0,115200n8 root=PARTUUID=1eb3b9b3-02 rw rootfstype=ext4 rootwait
[    0.000000] PID hash table entries: 1024 (order: 0, 4096 bytes)
[    0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Memory: 224624K/262144K available (6715K kernel code, 384K rwdata, 2508K rodata, 268K init, 271K bss, 12944K reserved, 24576K cma-)
[    0.000000] Virtual kernel memory layout:
                   vector  : 0xffff0000 - 0xffff1000   (   4 kB)
                   fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
                   vmalloc : 0xd0800000 - 0xff800000   ( 752 MB)
                   lowmem  : 0xc0000000 - 0xd0000000   ( 256 MB)
                   pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
                   modules : 0xbf000000 - 0xbfe00000   (  14 MB)
                     .text : 0xc0008000 - 0xc090a004   (9225 kB)
                     .init : 0xc090b000 - 0xc094e000   ( 268 kB)
                     .data : 0xc094e000 - 0xc09ae2b0   ( 385 kB)
                      .bss : 0xc09ae2b0 - 0xc09f2158   ( 272 kB)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000]  Build-time adjustment of leaf fanout to 32.
[    0.000000] NR_IRQS:16 nr_irqs:16 16
[    0.000000] IRQ: Found an INTC at 0xfa200000 (revision 5.0) with 128 interrupts
[    0.000000] OMAP clockevent source: timer2 at 25000000 Hz
[    0.000017] sched_clock: 32 bits at 25MHz, resolution 40ns, wraps every 85899345900ns
[    0.000045] clocksource: timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 76450417870 ns
[    0.000059] OMAP clocksource: timer1 at 25000000 Hz
[    0.000287] clocksource_probe: no matching clocksources found
[    0.000525] Console: colour dummy device 80x30
[    0.000558] WARNING: Your 'console=ttyO0' has been replaced by 'ttyS0'
[    0.000567] This ensures that you still see kernel messages. Please
[    0.000575] update your kernel commandline.
[    0.000600] Calibrating delay loop... 597.60 BogoMIPS (lpj=2988032)
[    0.118794] pid_max: default: 32768 minimum: 301
[    0.118957] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.118973] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.119884] Initializing cgroup subsys io
[    0.119926] Initializing cgroup subsys memory
[    0.119974] Initializing cgroup subsys devices
[    0.119995] Initializing cgroup subsys freezer
[    0.120013] Initializing cgroup subsys perf_event
[    0.120030] Initializing cgroup subsys pids
[    0.120067] CPU: Testing write buffer coherency: ok
[    0.120597] Setting up static identity map for 0x80008200 - 0x80008258
[    0.126617] devtmpfs: initialized
[    0.143045] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
[    0.162586] omap_hwmod: debugss: _wait_target_disable failed
[    0.219974] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.222803] pinctrl core: initialized pinctrl subsystem
[    0.224514] NET: Registered protocol family 16
[    0.227357] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.248802] cpuidle: using governor ladder
[    0.278786] cpuidle: using governor menu
[    0.284427] gpiochip_add: registered GPIOs 0 to 31 on device: gpio
[    0.284833] OMAP GPIO hardware version 0.1
[    0.285865] gpiochip_add: registered GPIOs 32 to 63 on device: gpio
[    0.286892] gpiochip_add: registered GPIOs 64 to 95 on device: gpio
[    0.287882] gpiochip_add: registered GPIOs 96 to 127 on device: gpio
[    0.298047] hw-breakpoint: debug architecture 0x4 unsupported.
[    0.340092] edma 49000000.edma: TI EDMA DMA engine driver
[    0.340579] of_get_named_gpiod_flags: can't parse 'gpio' property of node '/fixedregulator@0[0]'
[    0.341071] of_get_named_gpiod_flags: parsed 'gpio' property of node '/fixedregulator@2[0]' - status (0)
[    0.345293] omap_i2c 44e0b000.i2c: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_i2c0_pins, deferring proe
[    0.345479] media: Linux media interface: v0.10
[    0.345562] Linux video capture interface: v2.00
[    0.345628] pps_core: LinuxPPS API ver. 1 registered
[    0.345638] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.345677] PTP clock support registered
[    0.345757] EDAC MC: Ver: 3.0.0
[    0.347312] omap-mailbox 480c8000.mailbox: omap mailbox rev 0x400
[    0.347731] Advanced Linux Sound Architecture Driver Initialized.
[    0.349465] clocksource: Switched to clocksource timer1
[    0.364116] NET: Registered protocol family 2
[    0.365157] TCP established hash table entries: 2048 (order: 1, 8192 bytes)
[    0.365205] TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
[    0.365242] TCP: Hash tables configured (established 2048 bind 2048)
[    0.365345] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.365372] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.365570] NET: Registered protocol family 1
[    0.366106] RPC: Registered named UNIX socket transport module.
[    0.366130] RPC: Registered udp transport module.
[    0.366139] RPC: Registered tcp transport module.
[    0.366148] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.366195] PCI: CLS 0 bytes, default 64
[    0.367411] hw perfevents: enabled with armv7_cortex_a8 PMU driver, 5 counters available
[    0.370230] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.381272] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.382556] NFS: Registering the id_resolver key type
[    0.382647] Key type id_resolver registered
[    0.382658] Key type id_legacy registered
[    0.382761] ntfs: driver 2.1.32 [Flags: R/O].
[    0.387541] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 248)
[    0.387582] io scheduler noop registered
[    0.387603] io scheduler deadline registered
[    0.387814] io scheduler cfq registered (default)
[    0.389830] pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800 size 568
[    0.474503] Serial: 8250/16550 driver, 10 ports, IRQ sharing disabled
[    0.480229] 44e09000.serial: ttyS0 at MMIO 0x44e09000 (irq = 158, base_baud = 3000000) is a 8250
[    1.074380] console [ttyS0] enabled
[    1.079717] 48022000.serial: ttyS1 at MMIO 0x48022000 (irq = 159, base_baud = 3000000) is a 8250
[    1.090224] 48024000.serial: ttyS2 at MMIO 0x48024000 (irq = 160, base_baud = 3000000) is a 8250
[    1.100476] [drm] Initialized drm 1.1.0 20060810
[    1.106553] panel panel: GPIO lookup for consumer enable
[    1.106575] panel panel: using device tree for GPIO lookup
[    1.106627] of_get_named_gpiod_flags: parsed 'enable-gpios' property of node '/panel[0]' - status (0)
[    1.106724] panel panel: found enable GPIO
[    1.120175] loop: module loaded
[    1.129304] libphy: Fixed MDIO Bus: probed
[    1.136248] mousedev: PS/2 mouse device common for all mice
[    1.142846] i2c /dev entries driver
[    1.147730] cpuidle: enable-method property 'ti,am3352' found operations
[    1.155676] omap_hsmmc 48060000.mmc: GPIO lookup for consumer cd
[    1.155700] omap_hsmmc 48060000.mmc: using device tree for GPIO lookup
[    1.155745] of_get_named_gpiod_flags: parsed 'cd-gpios' property of node '/ocp/mmc@48060000[0]' - status (0)
[    1.155849] omap_hsmmc 48060000.mmc: Got CD GPIO
[    1.160629] omap_hsmmc 48060000.mmc: GPIO lookup for consumer wp
[    1.160648] omap_hsmmc 48060000.mmc: using device tree for GPIO lookup
[    1.160665] of_get_named_gpiod_flags: can't parse 'wp-gpios' property of node '/ocp/mmc@48060000[0]'
[    1.160680] of_get_named_gpiod_flags: can't parse 'wp-gpio' property of node '/ocp/mmc@48060000[0]'
[    1.160694] omap_hsmmc 48060000.mmc: using lookup tables for GPIO lookup
[    1.160709] omap_hsmmc 48060000.mmc: lookup for GPIO wp failed
[    1.200351] omap_hsmmc 481d8000.mmc: GPIO lookup for consumer cd
[    1.200378] omap_hsmmc 481d8000.mmc: using device tree for GPIO lookup
[    1.200400] of_get_named_gpiod_flags: can't parse 'cd-gpios' property of node '/ocp/mmc@481d8000[0]'
[    1.200415] of_get_named_gpiod_flags: can't parse 'cd-gpio' property of node '/ocp/mmc@481d8000[0]'
[    1.200428] omap_hsmmc 481d8000.mmc: using lookup tables for GPIO lookup
[    1.200443] omap_hsmmc 481d8000.mmc: lookup for GPIO cd failed
[    1.200460] omap_hsmmc 481d8000.mmc: GPIO lookup for consumer wp
[    1.200472] omap_hsmmc 481d8000.mmc: using device tree for GPIO lookup
[    1.200486] of_get_named_gpiod_flags: can't parse 'wp-gpios' property of node '/ocp/mmc@481d8000[0]'
[    1.200500] of_get_named_gpiod_flags: can't parse 'wp-gpio' property of node '/ocp/mmc@481d8000[0]'
[    1.200513] omap_hsmmc 481d8000.mmc: using lookup tables for GPIO lookup
[    1.200526] omap_hsmmc 481d8000.mmc: lookup for GPIO wp failed
[    1.236893] mmc0: host does not support reading read-only switch, assuming write-enable
[    1.247016] mmc0: new high speed SDHC card at address 59b4
[    1.253398] mmcblk0: mmc0:59b4       1.84 GiB 
[    1.259831]  mmcblk0: p1 p2
[    1.320345] of_get_named_gpiod_flags: parsed 'gpios' property of node '/leds/led@2[0]' - status (0)
[    1.320610] of_get_named_gpiod_flags: parsed 'gpios' property of node '/leds/led@3[0]' - status (0)
[    1.320806] of_get_named_gpiod_flags: parsed 'gpios' property of node '/leds/led@4[0]' - status (0)
[    1.320987] of_get_named_gpiod_flags: parsed 'gpios' property of node '/leds/led@5[0]' - status (0)
[    1.321594] ledtrig-cpu: registered to indicate activity on CPUs
[    1.327994] fbtft_of_value: width = 240
[    1.349478] fbtft_of_value: height = 320
[    1.353427] fbtft_of_value: buswidth = 9
[    1.357370] fbtft_of_value: rotate = 90
[    1.369480] fbtft_of_value: fps = 30
[    1.373422] of_get_named_gpiod_flags: parsed 'reset-gpios' property of node '/ocp/spi@481a0000/lcd@0[0]' - status (0)
[    2.022493] Console: switching to colour frame buffer device 40x30
[    2.039530] graphics fb0: fb_ili9340 frame buffer, 320x240, 150 KiB video memory, 4 KiB DMA buffer memory, fps=33, spi2.0 at 24 MHz
[    2.069653] NET: Registered protocol family 10
[    2.083755] sit: IPv6 over IPv4 tunneling driver
[    2.094006] NET: Registered protocol family 17
[    2.103429] Key type dns_resolver registered
[    2.114570] omap_voltage_late_init: Voltage driver support not added
[    2.168050] tps65217 0-0024: TPS65217 ID 0xe version 1.2
[    2.178309] at24 0-0050: 32768 byte 24c256 EEPROM, writable, 1 bytes/write
[    2.191946] omap_i2c 44e0b000.i2c: bus 0 rev0.11 at 400 kHz
[    2.208005] hctosys: unable to open rtc device (rtc0)
[    2.227488] ALSA device list:
[    2.235060]   No soundcards found.
[    2.290272] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[    2.298532] VFS: Mounted root (ext4 filesystem) on device 179:2.
[    2.327519] devtmpfs: mounted
[    2.339973] Freeing unused kernel memory: 268K (c090b000 - c094e000)
[    2.346357] This architecture does not have kernel memory protection.
[    2.644623] systemd[1]: System time before build time, advancing clock.
[    2.725862] random: systemd: uninitialized urandom read (16 bytes read, 17 bits of entropy available)
[    2.757111] random: systemd: uninitialized urandom read (16 bytes read, 17 bits of entropy available)
[    2.803651] systemd[1]: systemd 229 running in system mode. (+PAM -AUDIT -SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP -LIBCRYPTSETUP -GCRYPT)
[    2.850670] systemd[1]: Detected architecture arm.
[    2.881420] systemd[1]: Set hostname to <am335x-evm>.
[    2.922666] omap_hsmmc 481d8000.mmc: card claims to support voltages below defined range
[    3.043638] random: systemd-gpt-aut: uninitialized urandom read (16 bytes read, 20 bits of entropy available)
[    3.064492] random: systemd-sysv-ge: uninitialized urandom read (16 bytes read, 21 bits of entropy available)
[    3.102067] random: systemd-gpt-aut: uninitialized urandom read (16 bytes read, 21 bits of entropy available)
[    3.119060] random: systemd-sysv-ge: uninitialized urandom read (16 bytes read, 21 bits of entropy available)
[    3.168025] random: systemd-sysv-ge: uninitialized urandom read (16 bytes read, 23 bits of entropy available)
[    3.280296] random: systemd: uninitialized urandom read (16 bytes read, 27 bits of entropy available)
[    3.300286] random: systemd: uninitialized urandom read (16 bytes read, 27 bits of entropy available)
[    3.321442] random: systemd: uninitialized urandom read (16 bytes read, 27 bits of entropy available)
[    3.640287] systemd[1]: [/etc/systemd/system/gadget-init.service:15] Unknown lvalue 'ExecStopPre' in section 'Service'
[    3.968404] mmc1: error -16 whilst initialising SDIO card
[    4.129412] systemd[1]: sysinit.target: Found ordering cycle on sysinit.target/start
[    4.137578] systemd[1]: sysinit.target: Found dependency on alignment.service/start
[    4.145418] systemd[1]: sysinit.target: Found dependency on basic.target/start
[    4.152736] systemd[1]: sysinit.target: Found dependency on sockets.target/start
[    4.160210] systemd[1]: sysinit.target: Found dependency on dbus.socket/start
[    4.167397] systemd[1]: sysinit.target: Found dependency on sysinit.target/start
[    4.174870] systemd[1]: sysinit.target: Breaking ordering cycle by deleting job alignment.service/start
[    4.184349] systemd[1]: alignment.service: Job alignment.service/start deleted to break ordering cycle starting with sysinit.target/start
[    4.227814] systemd[1]: Listening on /dev/initctl Compatibility Named Pipe.
[    4.260576] systemd[1]: Listening on Journal Socket.
[    4.290887] systemd[1]: Listening on Network Service Netlink Socket.
[    4.338653] systemd[1]: Reached target Remote File Systems.
[    4.370888] systemd[1]: Started Dispatch Password Requests to Console Directory Watch.
[    4.400528] systemd[1]: Started Forward Password Requests to Wall Directory Watch.
[    4.430022] systemd[1]: Reached target Paths.
[    4.450524] systemd[1]: Listening on Journal Socket (/dev/log).
[    4.480349] systemd[1]: Listening on udev Control Socket.
[    4.509984] systemd[1]: Reached target Swap.
[    4.530195] systemd[1]: Listening on Syslog Socket.
[    4.563044] systemd[1]: Created slice User and Session Slice.
[    4.591677] systemd[1]: Created slice System Slice.
[    4.645450] systemd[1]: Starting Load Kernel Modules...
[    4.727182] systemd[1]: Starting Setup Virtual Console...
[    4.808244] cryptodev: driver 1.8 loaded.
[    4.821048] systemd[1]: Mounting Debug File System...
[    4.912175] systemd[1]: Mounting Temporary Directory...
[    4.966653] systemd[1]: Starting Remount Root and Kernel File Systems...
[    5.037205] systemd[1]: Starting Create list of required static device nodes for the current kernel...
[    5.082974] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
[    5.116082] systemd[1]: Created slice system-getty.slice.
[    5.170122] systemd[1]: Reached target Slices.
[    5.205886] systemd[1]: Mounting POSIX Message Queue File System...
[    5.256454] systemd[1]: Starting Journal Service...
[    5.302309] systemd[1]: Created slice system-serial\x2dgetty.slice.
[    5.330578] systemd[1]: Listening on udev Kernel Socket.
[    5.436205] systemd[1]: Mounted POSIX Message Queue File System.
[    5.470438] systemd[1]: Mounted Debug File System.
[    5.489965] systemd[1]: Mounted Temporary Directory.
[    5.521044] systemd[1]: Started Journal Service.
[    7.538846] systemd-journald[100]: Received request to flush runtime journal from PID 1
[    9.581348] omap_wdt: OMAP Watchdog Timer Rev 0x01: initial timeout 60 sec
[    9.698746] rtc rtc0: 44e3e000.rtc: dev (254:0)
[    9.698820] omap_rtc 44e3e000.rtc: rtc core: registered 44e3e000.rtc as rtc0
[    9.799375] am335x-phy-driver 47401300.usb-phy: GPIO lookup for consumer reset
[    9.799419] am335x-phy-driver 47401300.usb-phy: using device tree for GPIO lookup
[    9.799445] of_get_named_gpiod_flags: can't parse 'reset-gpios' property of node '/ocp/usb@47400000/usb-phy@47401300[0]'
[    9.799679] of_get_named_gpiod_flags: can't parse 'reset-gpio' property of node '/ocp/usb@47400000/usb-phy@47401300[0]'
[    9.799698] am335x-phy-driver 47401300.usb-phy: using lookup tables for GPIO lookup
[    9.799715] am335x-phy-driver 47401300.usb-phy: lookup for GPIO reset failed
[    9.799735] am335x-phy-driver 47401300.usb-phy: GPIO lookup for consumer vbus-detect
[    9.799748] am335x-phy-driver 47401300.usb-phy: using device tree for GPIO lookup
[    9.799763] of_get_named_gpiod_flags: can't parse 'vbus-detect-gpios' property of node '/ocp/usb@47400000/usb-phy@47401300[0]'
[    9.799777] of_get_named_gpiod_flags: can't parse 'vbus-detect-gpio' property of node '/ocp/usb@47400000/usb-phy@47401300[0]'
[    9.799791] am335x-phy-driver 47401300.usb-phy: using lookup tables for GPIO lookup
[    9.799804] am335x-phy-driver 47401300.usb-phy: lookup for GPIO vbus-detect failed
[    9.799897] 47401300.usb-phy supply vcc not found, using dummy regulator
[   10.454944] omap_rng 48310000.rng: OMAP Random Number Generator ver. 20
[   10.945547] omap-sham 53100000.sham: hw accel on OMAP rev 4.3
[   11.261416]  remoteproc0: wkup_m3 is available
[   11.265921]  remoteproc0: Note: remoteproc is still under development and considered experimental.
[   11.389765]  remoteproc0: THE BINARY FORMAT IS NOT YET FINALIZED, and backward compatibility isn't yet guaranteed.
[   11.643958]  remoteproc0: powering up wkup_m3
[   11.697092]  remoteproc0: Booting fw image am335x-pm-firmware.elf, size 217148
[   11.748566] omap-aes 53500000.aes: OMAP AES hw accel rev: 3.2
[   11.800128]  remoteproc0: remote processor wkup_m3 is now up
[   11.800162] wkup_m3_ipc 44e11324.wkup_m3_ipc: CM3 Firmware Version = 0x191
[   12.240888] omap_hwmod: gfx: failed to hardreset
[   12.427946] pvrsrvkm 56000000.sgx: Unable to reset SGX!
[   12.511305] omap_hwmod: gfx: _wait_target_ready failed: -16
[   12.604108] PVR_K:(Error): EnableSGXClocks: pm_runtime_get_sync failed (16)
[   12.685566] PVR_K:(Error): SysInitialise: Failed to Enable system clocks (175)
[   12.794359] omap_hwmod: pruss: _wait_target_ready failed: -16
[   12.852168] ti-pruss 4a300000.pruss: couldn't enable pruss
[   12.926355] ti-pruss: probe of 4a300000.pruss failed with error -16
[   13.059077] PM: bootloader does not support rtc-only!
[   14.191633] FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
[   17.078609] usbcore: registered new interface driver usbfs
[   17.203279] usbcore: registered new interface driver hub
[   17.244695] usbcore: registered new device driver usb
[   17.400965] musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, bulk combine, bulk split, HB-ISO Rx, HB-ISO Tx, SoftConn)
[   17.401011] musb-hdrc: MHDRC RTL version 2.0 
[   17.401025] musb-hdrc: setup fifo_mode 4
[   17.401054] musb-hdrc: 28/31 max ep, 16384/16384 memory
[   17.401268] musb-hdrc musb-hdrc.0.auto: MUSB HDRC host driver
[   17.407096] musb-hdrc musb-hdrc.0.auto: new USB bus registered, assigned bus number 1
[   17.486526] hub 1-0:1.0: USB hub found
[   17.502908] hub 1-0:1.0: 1 port detected
[   19.263792] NET: Registered protocol family 15
[   19.508700] Bluetooth: Core ver 2.21
[   19.557468] NET: Registered protocol family 31
[   19.624483] Bluetooth: HCI device and connection manager initialized
[   19.692967] Bluetooth: HCI socket layer initialized
[   19.697926] Bluetooth: L2CAP socket layer initialized
[   19.818925] Bluetooth: SCO socket layer initialized
[   19.856038] random: nonblocking pool is initialized
[   20.599153] Initializing XFRM netlink socket
[   20.872467] using random self ethernet address
[   20.876976] using random host ethernet address
[   20.943443] using host ethernet address: 98:5D:AD:4E:D2:60
[   20.948975] using random self ethernet address
[   21.025774] using random host ethernet address
[   21.061317] using host ethernet address: 98:5D:AD:4E:D2:60
[   21.129204] usb0: HOST MAC 98:5d:ad:4e:d2:60
[   21.183849] usb0: MAC 46:92:2b:7e:30:a7
[   21.314189] Mass Storage Function, version: 2009/09/11
[   21.371392] LUN: removable file: (no medium)
[   21.376140] LUN: removable read only file: /dev/mmcblk0p2
[   21.470679] Number of LUNs=1
[   21.500852] g_multi gadget: Multifunction Composite Gadget
[   21.548663] g_multi gadget: g_multi ready
[   21.746532] IPv6: ADDRCONF(NETDEV_UP): usb0: link is not ready
[   21.862670] g_multi gadget: high-speed config #1: Multifunction with RNDIS
[   21.872898] IPv6: ADDRCONF(NETDEV_CHANGE): usb0: link becomes ready
[  127.047190] g_multi gadget: high-speed config #2: Multifunction with CDC ECM
[  187.824336] hrtimer: interrupt took 187840 ns

I am hoping there might be someone that has experience of this type of screen that can offer some advice.

From digging about the fbtft_device driver looks to have support for a DTS entry with a GPIO parallel TFT along with a SPI init sequence: is this a better way to do this?

Thanks for reading - any suggestions would be gratefully received.
Best regards,
Richard

  • Hi Richard,

    From the kernel log I can see that this is kernel 4.4.19. Is this the TISDK or a community release?

    From the shared device tree settings I cant see the lcdc enabled. Please try adding &lcdc with status = "okay". Something like:
    &lcdc {
    status = "okay";

    /* If you want to get 24 bit RGB and 16 BGR mode instead of
    * current 16 bit RGB and 24 BGR modes, set the propety
    * below to "crossed" and uncomment the video-ports -property
    * in tda19988 node.
    */
    blue-and-red-wiring = "straight";

    port {
    lcdc_0: endpoint@0 {
    remote-endpoint = <&hdmi_0>;
    };
    };
    };

    Of course you need to change the endpoint, or completely remove the port part of the dts node.

    I will inspect the log you've attached and update with my feedback.

    Best Regards,
    Yordan
  • Hi Yordan

    Thanks for the reply; this is the TISDK (it's a few months old and I should probably look at an update)

    I noticed earlier today that I needed to enable the lcdc and indeed after doing this I can see two framebuffers:

     - no displayed images, but I can see some activity on the pins (though I have not comprehensively checked if they make sense)

    The DMA port aspect confuses me: I don't think I need a port entry if i am directly driving the display via the pins on the am3352 (as there is no remote endpoint)? but at the same time there is an ili9340 at the other end of the wires.

    I am presently working through the different start up sequences I can find for the ili9340 chip to determine precisely what configuration I need.

    e.g. there appears to be references to AC bias - but no pin for it on the display

    I've still got plenty of reading to do and a lot to get my head around, but it feels like I am starting to make progress.

    Any recommendations would be gratefully received.

    Best regards,

    Richard

  • I'll look into this & update with any additional feedback I have.

    Best Regards,
    Yordan
  • Thanks Yordan

    I have spent the last couple of days reviewing the datasheets for the parts in question and comparing these with the intended operation.

    We intend that the panel be used in 18bit mode with a data enable line: this is the default for the display.

    The signals to be used are:
    HSYNC - active low,
    VSYNC - active low,
    ENABLE - needs to be HI for valid pixel,
    DOTCLK - acts on rising edge,
    DATA[17:0]

    There is a backlight connected to the Isink of the TPS65217 that we are using as a PMIC.

    The device tree entries at present look like:

    panel {
           compatible = "ti,tilcdc,panel";
           label = "lcd";
    
           pinctrl-names = "default", "sleep";
           pinctrl-0 = <&lcd_pins_default>;
           pinctrl-1 = <&lcd_pins_sleep>; 
           //backlight = <&lcd_backlight>;
           status = "okay";
           enable-gpios = <&gpio2 25 GPIO_ACTIVE_HIGH>; 
    
           panel-info {
                  ac-bias = <255>;
                  ac-bias-intrpt = <0>;
                  dma-burst-sz = <16>;
                  bpp = <32>;
                  fdd = <0x80>;
                  sync-edge = <0>;
                  sync-ctrl = <1>;
                  raster-order = <0>;
                  fifo-th = <0>;
           };
    
           display-timings {
           native-mode = <&timing0>;
           timing0:240x320 {
                  clock-frequency = <6350000>; /* 6.35 MHz */
    
                  /* display timings can support ranges */
                  /* min - typ - max from datasheet */
                  hsync-len = <2 10 16>;
                  hback-porch = <2 20 24>;
                  hactive = <240>;
                  hfront-porch = <2 10 16>;
                  vsync-len = <1 2 4>;
                  vback-porch = <2>;
                  vactive = <320>;
                  vfront-porch = <4>;
    
                  hsync-active = <0>;
                  vsync-active = <0>;
                  de-active = <1>;
    
                  pixelclk-active = <1>;
           };
    
    };
    
    };
    // snip
    
    &lcdc {
       status = "okay";
    };
    
    &i2c0 {
       status = "okay";
       clock-frequency = <400000>;
    
       tps: tps@24 {
           reg = <0x24>;
           status= "okay";
    
           lcd_backlight:backlight {
              status= "okay";
              isel = <1>; /* 1 - ISET1, 2 ISET2 */
              fdim = <100>; /* TPS65217_BL_FDIM_100HZ */
              default-brightness = <50>;
           };
       };
    };
    
    &spi1 {
      status = "okay";
      pinctrl-names = "default";
      pinctrl-0 = <&spi1_pins>;
    
      lcd@0 {
        compatible = "ilitek,ili9340";
        reg = <0>;
        spi-max-frequency = <24000000>;
        rotate = <90>;
        fps = <30>;
    
        buswidth = <9>;
        width = <240>;
        height = <320>;
    
        reset-gpios= <&gpio3 19 GPIO_ACTIVE_LOW>;
    
       };
    };
    

    I think this should be almost there (but then again I've been like that for a while!) - I am still running up against a few things:

    I have enabled the tps65217 backlight in the menuconfig
    - inserting printks I can see that I pass through the "return 0" at the end of the tps65217_bl probe
    and
    [ 2.840018] tps65217-bl tps65217-bl: backlight disabled
    [ 2.879403] backlight: backlight_device_register: name=tps65217-bl
    [ 2.920042] tps65217-bl tps65217-bl: backlight enabled
    [ 14.463514] backlight: set brightness to 50

    - so I think it should be available

    Though I do not see any illumination 

    and if I try and refer to in the panel descriptor then the panel startup never completes (it can't find the backlight).

    - what is the correct way to bind this?

    Poking with a scope
    I can see:
    - DATACLOCK at 6.410MHz (156ns)
    - the HSYNC line pulse low for 1.6uS evey 44uS
    - and VSYNC go low for 80us every 14.4ms
    - the DE line stays high - so all data should be transferred

    I expected to have to set the bpp to 18 in the panel-info
    - but if I do I get the error fb & crtc widths not matching; so I have set it to 32 bit

    the error was 

    [ 1.419845] [drm] Initialized tilcdc 1.0.0 20121205 on minor 0
    [ 30.792805] tilcdc 4830e000.lcdc: Invalid pitch: fb and crtc widths must be the same

    - is it correct to set the bpp to 32 or is there some lower level mismatch going on?

    I ask as I can see a variety of different panels described in different parts of the code: e.g. panel_dpi
    The older fbtft driver also looks to allow explicitly defining a variety of GPIO from the DTS
    - I would prefer though to use whatever method is best for going forward

    Thanks again for any ideas/suggestions or comments.

    Best regards,

    Richard

  • Thanks Yordan

    My last post appears to be awaiting moderation:

     - hopefully it will be with you soon

    Thanks again for any ideas/suggestions or comments.

    Best regards,

    Richard

  • Here is the dmesg from my last boot:

    dmesg
    [    0.000000] Booting Linux on physical CPU 0x0
    [    0.000000] Initializing cgroup subsys cpu
    [    0.000000] Initializing cgroup subsys cpuacct
    [    0.000000] Linux version 4.4.19-gdb0b54cdad (richard@richard-ubvm) (gcc version 5.3.1 20160113 (Linaro GCC 5.3-2016.02) ) #217 PREEMPT Fri Jul 14 14:10:38 AEST 2017
    [    0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c5387d
    [    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
    [    0.000000] Machine model: Compumedics Argo
    [    0.000000] cma: Reserved 24 MiB at 0x8d000000
    [    0.000000] Memory policy: Data cache writeback
    [    0.000000] On node 0 totalpages: 65536
    [    0.000000] free_area_init_node: node 0, pgdat c099748c, node_mem_map cfdad000
    [    0.000000]   Normal zone: 576 pages used for memmap
    [    0.000000]   Normal zone: 0 pages reserved
    [    0.000000]   Normal zone: 65536 pages, LIFO batch:15
    [    0.000000] CPU: All CPU(s) started in SVC mode.
    [    0.000000] AM335X ES2.1 (neon )
    [    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
    [    0.000000] pcpu-alloc: [0] 0 
    [    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 64960
    [    0.000000] Kernel command line: console=ttyO0,115200n8 loglevel=10 nomodeset printk.synchronous=1 DEBUG dyndbg="file drivers/video/backlight/* +p;file drivers/gpu/* +p;file drivers/mfd/* +p;module devtree +p;" root=PARTUUID=1eb3b9b3-02 rw rootfstype=ext4 rootwait
    [    0.000000] PID hash table entries: 1024 (order: 0, 4096 bytes)
    [    0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
    [    0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
    [    0.000000] Memory: 224656K/262144K available (6691K kernel code, 383K rwdata, 2500K rodata, 268K init, 270K bss, 12912K reserved, 24576K cma-reserved, 0K highmem)
    [    0.000000] Virtual kernel memory layout:
                       vector  : 0xffff0000 - 0xffff1000   (   4 kB)
                       fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
                       vmalloc : 0xd0800000 - 0xff800000   ( 752 MB)
                       lowmem  : 0xc0000000 - 0xd0000000   ( 256 MB)
                       pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
                       modules : 0xbf000000 - 0xbfe00000   (  14 MB)
                         .text : 0xc0008000 - 0xc0902004   (9193 kB)
                         .init : 0xc0903000 - 0xc0946000   ( 268 kB)
                         .data : 0xc0946000 - 0xc09a5ff0   ( 384 kB)
                          .bss : 0xc09a5ff0 - 0xc09e9bd8   ( 271 kB)
    [    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
    [    0.000000] Preemptible hierarchical RCU implementation.
    [    0.000000]  Build-time adjustment of leaf fanout to 32.
    [    0.000000] NR_IRQS:16 nr_irqs:16 16
    [    0.000000] IRQ: Found an INTC at 0xfa200000 (revision 5.0) with 128 interrupts
    [    0.000000] OMAP clockevent source: timer2 at 25000000 Hz
    [    0.000018] sched_clock: 32 bits at 25MHz, resolution 40ns, wraps every 85899345900ns
    [    0.000046] clocksource: timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 76450417870 ns
    [    0.000060] OMAP clocksource: timer1 at 25000000 Hz
    [    0.000283] clocksource_probe: no matching clocksources found
    [    0.000518] Console: colour dummy device 80x30
    [    0.000556] WARNING: Your 'console=ttyO0' has been replaced by 'ttyS0'
    [    0.000565] This ensures that you still see kernel messages. Please
    [    0.000573] update your kernel commandline.
    [    0.000598] Calibrating delay loop... 597.60 BogoMIPS (lpj=2988032)
    [    0.118783] pid_max: default: 32768 minimum: 301
    [    0.118945] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
    [    0.118961] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
    [    0.119881] Initializing cgroup subsys io
    [    0.119922] Initializing cgroup subsys memory
    [    0.119971] Initializing cgroup subsys devices
    [    0.119992] Initializing cgroup subsys freezer
    [    0.120011] Initializing cgroup subsys perf_event
    [    0.120027] Initializing cgroup subsys pids
    [    0.120066] CPU: Testing write buffer coherency: ok
    [    0.120582] Setting up static identity map for 0x80008200 - 0x80008258
    [    0.130050] devtmpfs: initialized
    [    0.146700] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
    [    0.166350] omap_hwmod: debugss: _wait_target_disable failed
    [    0.223735] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
    [    0.226572] pinctrl core: initialized pinctrl subsystem
    [    0.228253] NET: Registered protocol family 16
    [    0.231418] DMA: preallocated 256 KiB pool for atomic coherent allocations
    [    0.258789] cpuidle: using governor ladder
    [    0.288775] cpuidle: using governor menu
    [    0.294496] gpiochip_add: registered GPIOs 0 to 31 on device: gpio
    [    0.294912] OMAP GPIO hardware version 0.1
    [    0.295925] gpiochip_add: registered GPIOs 32 to 63 on device: gpio
    [    0.296967] gpiochip_add: registered GPIOs 64 to 95 on device: gpio
    [    0.297977] gpiochip_add: registered GPIOs 96 to 127 on device: gpio
    [    0.308388] hw-breakpoint: debug architecture 0x4 unsupported.
    [    0.350187] edma 49000000.edma: TI EDMA DMA engine driver
    [    0.350700] of_get_named_gpiod_flags: can't parse 'gpio' property of node '/fixedregulator@0[0]'
    [    0.351183] of_get_named_gpiod_flags: parsed 'gpio' property of node '/fixedregulator@2[0]' - status (0)
    [    0.355488] omap_i2c 44e0b000.i2c: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_i2c0_pins, deferring probe
    [    0.355675] media: Linux media interface: v0.10
    [    0.355760] Linux video capture interface: v2.00
    [    0.355827] pps_core: LinuxPPS API ver. 1 registered
    [    0.355838] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
    [    0.355885] PTP clock support registered
    [    0.355970] EDAC MC: Ver: 3.0.0
    [    0.357510] omap-mailbox 480c8000.mailbox: omap mailbox rev 0x400
    [    0.357927] Advanced Linux Sound Architecture Driver Initialized.
    [    0.359746] clocksource: Switched to clocksource timer1
    [    0.374473] NET: Registered protocol family 2
    [    0.375519] TCP established hash table entries: 2048 (order: 1, 8192 bytes)
    [    0.375568] TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
    [    0.375604] TCP: Hash tables configured (established 2048 bind 2048)
    [    0.375703] UDP hash table entries: 256 (order: 0, 4096 bytes)
    [    0.375729] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
    [    0.375918] NET: Registered protocol family 1
    [    0.376449] RPC: Registered named UNIX socket transport module.
    [    0.376470] RPC: Registered udp transport module.
    [    0.376480] RPC: Registered tcp transport module.
    [    0.376488] RPC: Registered tcp NFSv4.1 backchannel transport module.
    [    0.376530] PCI: CLS 0 bytes, default 64
    [    0.377870] hw perfevents: enabled with armv7_cortex_a8 PMU driver, 5 counters available
    [    0.380689] futex hash table entries: 256 (order: -1, 3072 bytes)
    [    0.391771] squashfs: version 4.0 (2009/01/31) Phillip Lougher
    [    0.392999] NFS: Registering the id_resolver key type
    [    0.393088] Key type id_resolver registered
    [    0.393101] Key type id_legacy registered
    [    0.393193] ntfs: driver 2.1.32 [Flags: R/O].
    [    0.397911] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 248)
    [    0.397953] io scheduler noop registered
    [    0.397972] io scheduler deadline registered
    [    0.398194] io scheduler cfq registered (default)
    [    0.400218] pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800 size 568
    [    0.485384] Serial: 8250/16550 driver, 10 ports, IRQ sharing disabled
    [    0.491133] 44e09000.serial: ttyS0 at MMIO 0x44e09000 (irq = 158, base_baud = 3000000) is a 8250
    [    1.180109] console [ttyS0] enabled
    [    1.185333] 48022000.serial: ttyS1 at MMIO 0x48022000 (irq = 159, base_baud = 3000000) is a 8250
    [    1.195832] 48024000.serial: ttyS2 at MMIO 0x48024000 (irq = 160, base_baud = 3000000) is a 8250
    [    1.206129] [drm] Initialized drm 1.1.0 20060810
    [    1.212080] RM LCD - drivers/gpu/drm/tilcdc/tilcdc_panel.c          panel_probe 350
    [    1.219897] RM LCD - drivers/gpu/drm/tilcdc/tilcdc_panel.c          panel_probe 355
    [    1.227594] RM LCD - drivers/gpu/drm/tilcdc/tilcdc_panel.c          panel_probe 360
    [    1.235313] RM LCD - drivers/gpu/drm/tilcdc/tilcdc_panel.c          panel_probe 364
    [    1.243023] RM LCD - drivers/gpu/drm/tilcdc/tilcdc_panel.c          panel_probe 377
    [    1.250745] panel panel: GPIO lookup for consumer enable
    [    1.256085] panel panel: using device tree for GPIO lookup
    [    1.261664] of_get_named_gpiod_flags: parsed 'enable-gpios' property of node '/panel[0]' - status (0)
    [    1.271027] RM LCD - drivers/gpu/drm/tilcdc/tilcdc_panel.c          panel_probe 380
    [    1.278721] RM LCD - drivers/gpu/drm/tilcdc/tilcdc_panel.c          panel_probe 386
    [    1.286438] panel panel: found enable GPIO
    [    1.290573] RM LCD - drivers/gpu/drm/tilcdc/tilcdc_panel.c          panel_probe 394
    [    1.298390] RM LCD - drivers/gpu/drm/tilcdc/tilcdc_panel.c          panel_probe 414 - DONE
    [    1.308488] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
    [    1.315290] [drm] No driver support for vblank timestamp query.
    [    1.333888] Console: switching to colour frame buffer device 30x40
    [    1.341752] tilcdc 4830e000.lcdc: fb0:  frame buffer device
    [    1.369789] [drm] Initialized tilcdc 1.0.0 20121205 on minor 0
    [    1.384635] loop: module loaded
    [    1.393978] libphy: Fixed MDIO Bus: probed
    [    1.400995] mousedev: PS/2 mouse device common for all mice
    [    1.407421] i2c /dev entries driver
    [    1.412485] cpuidle: enable-method property 'ti,am3352' found operations
    [    1.420374] omap_hsmmc 48060000.mmc: GPIO lookup for consumer cd
    [    1.426427] omap_hsmmc 48060000.mmc: using device tree for GPIO lookup
    [    1.433161] of_get_named_gpiod_flags: parsed 'cd-gpios' property of node '/ocp/mmc@48060000[0]' - status (0)
    [    1.443155] omap_hsmmc 48060000.mmc: Got CD GPIO
    [    1.447842] omap_hsmmc 48060000.mmc: GPIO lookup for consumer wp
    [    1.453907] omap_hsmmc 48060000.mmc: using device tree for GPIO lookup
    [    1.460489] of_get_named_gpiod_flags: can't parse 'wp-gpios' property of node '/ocp/mmc@48060000[0]'
    [    1.469695] of_get_named_gpiod_flags: can't parse 'wp-gpio' property of node '/ocp/mmc@48060000[0]'
    [    1.478829] omap_hsmmc 48060000.mmc: using lookup tables for GPIO lookup
    [    1.485588] omap_hsmmc 48060000.mmc: lookup for GPIO wp failed
    [    1.530645] omap_hsmmc 481d8000.mmc: GPIO lookup for consumer cd
    [    1.540031] omap_hsmmc 481d8000.mmc: using device tree for GPIO lookup
    [    1.546691] of_get_named_gpiod_flags: can't parse 'cd-gpios' property of node '/ocp/mmc@481d8000[0]'
    [    1.555979] of_get_named_gpiod_flags: can't parse 'cd-gpio' property of node '/ocp/mmc@481d8000[0]'
    [    1.565157] omap_hsmmc 481d8000.mmc: using lookup tables for GPIO lookup
    [    1.571968] omap_hsmmc 481d8000.mmc: lookup for GPIO cd failed
    [    1.577916] omap_hsmmc 481d8000.mmc: GPIO lookup for consumer wp
    [    1.584004] omap_hsmmc 481d8000.mmc: using device tree for GPIO lookup
    [    1.591621] of_get_named_gpiod_flags: can't parse 'wp-gpios' property of node '/ocp/mmc@481d8000[0]'
    [    1.602863] of_get_named_gpiod_flags: can't parse 'wp-gpio' property of node '/ocp/mmc@481d8000[0]'
    [    1.612017] omap_hsmmc 481d8000.mmc: using lookup tables for GPIO lookup
    [    1.618780] omap_hsmmc 481d8000.mmc: lookup for GPIO wp failed
    [    1.647207] mmc0: host does not support reading read-only switch, assuming write-enable
    [    1.657362] mmc0: new high speed SDHC card at address 59b4
    [    1.663737] mmcblk0: mmc0:59b4       1.84 GiB 
    [    1.670213]  mmcblk0: p1 p2
    [    1.740644] of_get_named_gpiod_flags: parsed 'gpios' property of node '/leds/led@2[0]' - status (0)
    [    1.760065] of_get_named_gpiod_flags: parsed 'gpios' property of node '/leds/led@3[0]' - status (0)
    [    1.779984] of_get_named_gpiod_flags: parsed 'gpios' property of node '/leds/led@4[0]' - status (0)
    [    1.799930] of_get_named_gpiod_flags: parsed 'gpios' property of node '/leds/led@5[0]' - status (0)
    [    1.820352] ledtrig-cpu: registered to indicate activity on CPUs
    [    1.830201] fbtft_of_value: width = 240
    [    1.834064] fbtft_of_value: height = 320
    [    1.838006] fbtft_of_value: buswidth = 9
    [    1.852532] fbtft_of_value: rotate = 90
    [    1.856390] fbtft_of_value: fps = 30
    [    1.867331] of_get_named_gpiod_flags: parsed 'reset-gpios' property of node '/ocp/spi@481a0000/lcd@0[0]' - status (0)
    [    2.129810] RM - drivers/staging/fbtft/fb_ili9340.c __FUNCTION__.30562+0x0/0x10 (59): force 18bit
    [    2.550466] graphics fb1: fb_ili9340 frame buffer, 320x240, 150 KiB video memory, 4 KiB DMA buffer memory, fps=33, spi2.0 at 24 MHz
    [    2.579482] NET: Registered protocol family 10
    [    2.600567] sit: IPv6 over IPv4 tunneling driver
    [    2.606405] NET: Registered protocol family 17
    [    2.619522] Key type dns_resolver registered
    [    2.624283] omap_voltage_late_init: Voltage driver support not added
    [    2.649867] RM TPS - drivers/mfd/tps65217.c       tps65217_probe 174
    [    2.656283] RM TPS - drivers/mfd/tps65217.c       tps65217_probe 191
    [    2.676927] RM TPS - drivers/mfd/tps65217.c       tps65217_probe 199
    [    2.689873] RM LCD - drivers/mfd/mfd-core.c       mfd_add_device 179 /ocp/i2c@44e0b000/tps@24/regulators
    [    2.705848] RM LCD - drivers/mfd/mfd-core.c       mfd_add_device 179 /ocp/i2c@44e0b000/tps@24/backlight
    [    2.756959] RM LCD - drivers/mfd/mfd-core.c       mfd_add_device 179 /ocp/i2c@44e0b000/tps@24/regulators
    [    2.778165] RM LCD - drivers/mfd/mfd-core.c       mfd_add_device 179 /ocp/i2c@44e0b000/tps@24/backlight
    [    2.792874] RM TPS - drivers/video/backlight/tps65217_bl.c    tps65217_bl_probe 278
    [    2.819769] RM TPS - drivers/video/backlight/tps65217_bl.c    tps65217_bl_probe 291
    [    2.827491] RM TPS - drivers/video/backlight/tps65217_bl.c    tps65217_bl_probe 300
    [    2.840018] tps65217-bl tps65217-bl: backlight disabled
    [    2.850653] tps65217-bl tps65217-bl: selected ISET2 current level
    [    2.865108] RM TPS - drivers/video/backlight/tps65217_bl.c    tps65217_bl_probe 308
    [    2.879403] backlight: backlight_device_register: name=tps65217-bl
    [    2.894025] RM TPS - drivers/video/backlight/tps65217_bl.c    tps65217_bl_probe 317
    [    2.908440] tps65217-bl tps65217-bl: brightness set to 100
    [    2.920042] tps65217-bl tps65217-bl: backlight enabled
    [    2.929760] RM TPS - drivers/video/backlight/tps65217_bl.c    tps65217_bl_probe 321
    [    2.949777] RM LCD - drivers/mfd/mfd-core.c       mfd_add_device 179 /ocp/i2c@44e0b000/tps@24/regulators
    [    2.966180] RM LCD - drivers/mfd/mfd-core.c       mfd_add_device 179 /ocp/i2c@44e0b000/tps@24/backlight
    [    2.990151] RM TPS - drivers/mfd/tps65217.c       tps65217_probe 221
    [    3.009808] RM TPS - drivers/mfd/tps65217.c       tps65217_probe 230
    [    3.016202] tps65217 0-0024: TPS65217 ID 0xe version 1.2
    [    3.038848] at24 0-0050: 32768 byte 24c256 EEPROM, writable, 1 bytes/write
    [    3.045856] omap_i2c 44e0b000.i2c: bus 0 rev0.11 at 400 kHz
    [    3.062233] hctosys: unable to open rtc device (rtc0)
    [    3.084706] ALSA device list:
    [    3.087730]   No soundcards found.
    [    3.137737] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
    [    3.154293] VFS: Mounted root (ext4 filesystem) on device 179:2.
    [    3.177058] devtmpfs: mounted
    [    3.183621] Freeing unused kernel memory: 268K (c0903000 - c0946000)
    [    3.197593] This architecture does not have kernel memory protection.
    [    3.414427] omap_hsmmc 481d8000.mmc: card claims to support voltages below defined range
    [    3.501382] systemd[1]: System time before build time, advancing clock.
    [    3.581197] random: systemd: uninitialized urandom read (16 bytes read, 20 bits of entropy available)
    [    3.611893] random: systemd: uninitialized urandom read (16 bytes read, 20 bits of entropy available)
    [    3.662385] systemd[1]: systemd 229 running in system mode. (+PAM -AUDIT -SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP -LIBCRYPTSETUP -GCRYPT +GNUTLS +ACL +XZ -LZ4 -SECCOMP +BLKID -ELFUTILS +KMOD -IDN)
    [    3.700757] systemd[1]: Detected architecture arm.
    [    3.731739] systemd[1]: Set hostname to <am335x-evm>.
    [    3.885338] random: systemd-sysv-ge: uninitialized urandom read (16 bytes read, 24 bits of entropy available)
    [    3.924059] random: systemd-gpt-aut: uninitialized urandom read (16 bytes read, 24 bits of entropy available)
    [    3.947621] random: systemd-gpt-aut: uninitialized urandom read (16 bytes read, 25 bits of entropy available)
    [    3.959491] random: systemd-sysv-ge: uninitialized urandom read (16 bytes read, 25 bits of entropy available)
    [    4.005768] random: systemd-sysv-ge: uninitialized urandom read (16 bytes read, 26 bits of entropy available)
    [    4.138738] random: systemd: uninitialized urandom read (16 bytes read, 30 bits of entropy available)
    [    4.160725] random: systemd: uninitialized urandom read (16 bytes read, 30 bits of entropy available)
    [    4.181836] random: systemd: uninitialized urandom read (16 bytes read, 30 bits of entropy available)
    [    4.408632] mmc1: error -16 whilst initialising SDIO card
    [    4.458844] systemd[1]: [/etc/systemd/system/gadget-init.service:15] Unknown lvalue 'ExecStopPre' in section 'Service'
    [    4.801101] systemd[1]: sysinit.target: Found ordering cycle on sysinit.target/start
    [    4.809052] systemd[1]: sysinit.target: Found dependency on alignment.service/start
    [    4.816966] systemd[1]: sysinit.target: Found dependency on sysinit.target/start
    [    4.824506] systemd[1]: sysinit.target: Breaking ordering cycle by deleting job alignment.service/start
    [    4.834024] systemd[1]: alignment.service: Job alignment.service/start deleted to break ordering cycle starting with sysinit.target/start
    [    4.877962] systemd[1]: Listening on udev Kernel Socket.
    [    4.900791] systemd[1]: Listening on Journal Socket (/dev/log).
    [    4.930304] systemd[1]: Reached target Swap.
    [    4.953679] systemd[1]: Created slice System Slice.
    [    4.982252] systemd[1]: Created slice system-serial\x2dgetty.slice.
    [    5.012031] systemd[1]: Created slice User and Session Slice.
    [    5.040341] systemd[1]: Reached target Slices.
    [    5.060640] systemd[1]: Listening on udev Control Socket.
    [    5.090699] systemd[1]: Started Forward Password Requests to Wall Directory Watch.
    [    5.139533] systemd[1]: Listening on /dev/initctl Compatibility Named Pipe.
    [    5.171117] systemd[1]: Listening on Syslog Socket.
    [    5.201344] systemd[1]: Started Dispatch Password Requests to Console Directory Watch.
    [    5.230649] systemd[1]: Reached target Paths.
    [    5.261697] systemd[1]: Listening on Network Service Netlink Socket.
    [    5.291377] systemd[1]: Listening on Journal Socket.
    [    5.331425] systemd[1]: Starting Create list of required static device nodes for the current kernel...
    [    5.423215] systemd[1]: Starting Load Kernel Modules...
    [    5.476332] systemd[1]: Starting Journal Service...
    [    5.534276] systemd[1]: Mounting Temporary Directory...
    [    5.542753] cryptodev: driver 1.8 loaded.
    [    5.605614] systemd[1]: Mounting POSIX Message Queue File System...
    [    5.706777] systemd[1]: Mounting Debug File System...
    [    5.760485] systemd[1]: Reached target Remote File Systems.
    [    5.796424] systemd[1]: Starting Remount Root and Kernel File Systems...
    [    5.883160] systemd[1]: Starting Setup Virtual Console...
    [    5.934878] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
    [    5.962823] systemd[1]: Created slice system-getty.slice.
    [    6.076011] systemd[1]: Mounted POSIX Message Queue File System.
    [    6.100586] systemd[1]: Mounted Debug File System.
    [    6.130473] systemd[1]: Mounted Temporary Directory.
    [    6.161284] systemd[1]: Started Journal Service.
    [    8.375270] systemd-journald[74]: Received request to flush runtime journal from PID 1
    [   10.540553] omap_wdt: OMAP Watchdog Timer Rev 0x01: initial timeout 60 sec
    [   10.602965] rtc rtc0: 44e3e000.rtc: dev (254:0)
    [   10.647170] omap_rtc 44e3e000.rtc: rtc core: registered 44e3e000.rtc as rtc0
    [   10.736419] am335x-phy-driver 47401300.usb-phy: GPIO lookup for consumer reset
    [   10.871056] am335x-phy-driver 47401300.usb-phy: using device tree for GPIO lookup
    [   11.118893] of_get_named_gpiod_flags: can't parse 'reset-gpios' property of node '/ocp/usb@47400000/usb-phy@47401300[0]'
    [   11.293578] of_get_named_gpiod_flags: can't parse 'reset-gpio' property of node '/ocp/usb@47400000/usb-phy@47401300[0]'
    [   11.446993] am335x-phy-driver 47401300.usb-phy: using lookup tables for GPIO lookup
    [   11.543854] am335x-phy-driver 47401300.usb-phy: lookup for GPIO reset failed
    [   11.600041] am335x-phy-driver 47401300.usb-phy: GPIO lookup for consumer vbus-detect
    [   11.717987] am335x-phy-driver 47401300.usb-phy: using device tree for GPIO lookup
    [   11.817800] of_get_named_gpiod_flags: can't parse 'vbus-detect-gpios' property of node '/ocp/usb@47400000/usb-phy@47401300[0]'
    [   11.914722] of_get_named_gpiod_flags: can't parse 'vbus-detect-gpio' property of node '/ocp/usb@47400000/usb-phy@47401300[0]'
    [   12.051100] am335x-phy-driver 47401300.usb-phy: using lookup tables for GPIO lookup
    [   12.058845] am335x-phy-driver 47401300.usb-phy: lookup for GPIO vbus-detect failed
    [   12.216279] 47401300.usb-phy supply vcc not found, using dummy regulator
    [   12.276974]  remoteproc0: wkup_m3 is available
    [   12.306976]  remoteproc0: Note: remoteproc is still under development and considered experimental.
    [   12.390028]  remoteproc0: THE BINARY FORMAT IS NOT YET FINALIZED, and backward compatibility isn't yet guaranteed.
    [   12.422704] omap_rng 48310000.rng: OMAP Random Number Generator ver. 20
    [   12.450673] omap-sham 53100000.sham: hw accel on OMAP rev 4.3
    [   12.609127]  remoteproc0: powering up wkup_m3
    [   12.661606]  remoteproc0: Booting fw image am335x-pm-firmware.elf, size 217148
    [   12.669200]  remoteproc0: remote processor wkup_m3 is now up
    [   12.669236] wkup_m3_ipc 44e11324.wkup_m3_ipc: CM3 Firmware Version = 0x191
    [   13.293526] omap-aes 53500000.aes: OMAP AES hw accel rev: 3.2
    [   13.787178] omap_hwmod: pruss: _wait_target_ready failed: -16
    [   13.910336] ti-pruss 4a300000.pruss: couldn't enable pruss
    [   13.973737] ti-pruss: probe of 4a300000.pruss failed with error -16
    [   14.057635] omap_hwmod: gfx: failed to hardreset
    [   14.300050] pvrsrvkm 56000000.sgx: Unable to reset SGX!
    [   14.409638] omap_hwmod: gfx: _wait_target_ready failed: -16
    [   14.463514] backlight: set brightness to 50
    [   14.550710] tps65217-bl tps65217-bl: brightness set to 50
    [   14.566151] PVR_K:(Error): EnableSGXClocks: pm_runtime_get_sync failed (16)
    [   14.686963] PVR_K:(Error): SysInitialise: Failed to Enable system clocks (175)
    [   14.792399] PM: bootloader does not support rtc-only!
    [   15.030069] FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
    [   18.490653] usbcore: registered new interface driver usbfs
    [   18.496301] usbcore: registered new interface driver hub
    [   18.570256] usbcore: registered new device driver usb
    [   18.787487] musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, bulk combine, bulk split, HB-ISO Rx, HB-ISO Tx, SoftConn)
    [   18.862085] musb-hdrc: MHDRC RTL version 2.0 
    [   18.866507] musb-hdrc: setup fifo_mode 4
    [   18.913077] musb-hdrc: 28/31 max ep, 16384/16384 memory
    [   18.918593] musb-hdrc musb-hdrc.0.auto: MUSB HDRC host driver
    [   18.940043] musb-hdrc musb-hdrc.0.auto: new USB bus registered, assigned bus number 1
    [   18.965235] hub 1-0:1.0: USB hub found
    [   18.977817] hub 1-0:1.0: 1 port detected
    [   19.267015] random: nonblocking pool is initialized
    [   20.686100] using random self ethernet address
    [   20.698920] using random host ethernet address
    [   20.715180] using host ethernet address: 98:5D:AD:4E:D2:60
    [   20.730292] using random self ethernet address
    [   20.734971] using random host ethernet address
    [   20.739451] using host ethernet address: 98:5D:AD:4E:D2:60
    [   20.808430] usb0: HOST MAC 98:5d:ad:4e:d2:60
    [   20.859260] usb0: MAC ca:41:4c:e3:95:70
    [   21.009990] Mass Storage Function, version: 2009/09/11
    [   21.015203] LUN: removable file: (no medium)
    [   21.120404] LUN: removable read only file: /dev/mmcblk0p1
    [   21.125870] Number of LUNs=1
    [   21.221890] g_multi gadget: Multifunction Composite Gadget
    [   21.227456] g_multi gadget: g_multi ready
    [   21.440856] IPv6: ADDRCONF(NETDEV_UP): usb0: link is not ready
    [   21.662768] g_multi gadget: high-speed config #1: Multifunction with RNDIS
    [   21.670202] IPv6: ADDRCONF(NETDEV_CHANGE): usb0: link becomes ready
    [   22.463685] Bluetooth: Core ver 2.21
    [   22.494971] NET: Registered protocol family 31
    [   22.567366] Bluetooth: HCI device and connection manager initialized
    [   22.597042] NET: Registered protocol family 15
    [   22.634949] Bluetooth: HCI socket layer initialized
    [   22.669186] Bluetooth: L2CAP socket layer initialized
    [   22.722628] Bluetooth: SCO socket layer initialized
    [   23.550979] Initializing XFRM netlink socket
    root@am335x-evm:~# 
    
    

    Best regards,

    Richard

  • Hi,

    - is it correct to set the bpp to 32 or is there some lower level mismatch going on?

    I think it is a lower level mismatch happening at the tilcdc_panel driver:
    drm_fb_get_bpp_depth(state->fb->pixel_format, &depth, &bpp);
    if (state->fb->pitches[0] != crtc_state->mode.hdisplay * bpp / 8) {
    dev_err(plane->dev->dev,
    "Invalid pitch: fb and crtc widths must be the same");
    return -EINVAL;
    }
    It is worth digging some more in the crtc drivers:
    drm_crtc, omap_crtc, tilcdc_crtc

    Best Regards,
    Yordan
  • Thanks Yordan

    It does not look as though the Raster mode of the LCD driver supports 18bit mode

    I think I will need to configure this panel for 16 bit mode (losing the LSBit of the Red and Blue channels)

    - this should be fine.

    Looks as though there a couple of HW issues needing addressed before I can do anything further with the display: hopefully it should be ready to go once these are fixed

    All the best,

    Richard

     

  • Hi,

    Thanks for updating the thread.

    Best Regards,
    Yordan
  • Hi
    hardware repaired so I am back trying to make some progress on this display.

    As it currently stands:
    In /dev/ I have two frame buffers:
    - /dev/fb0 from tilcdc

    [ 1.355895] tilcdc 4830e000.lcdc: fb0: frame buffer device
    [ 1.389772] [drm] Initialized tilcdc 1.0.0 20121205 on minor 0

    - /dev/fb1 from fb_ili9340 (this driver is only being used to send the init commands to the display)

    [ 3.690003] graphics fb1: fb_ili9340 frame buffer, 240x320, 150 KiB video memory, 4 KiB DMA buffer memory, fps=33, spi2.0 at 24 MHz

    Within /sys/class/graphics/ I also see fbcon

    root@am335x-evm:/sys/class/graphics# ls -l /sys/class/graphics/
    lrwxrwxrwx 1 root root 0 Oct 3 21:05 fb0 -> ../../devices/platform/ocp/4830e000.lcdc/graphics/fb0
    lrwxrwxrwx 1 root root 0 Oct 3 21:05 fb1 -> ../../devices/platform/ocp/481a0000.spi/spi_master/spi2/spi2.0/graphics/fb1
    lrwxrwxrwx 1 root root 0 Oct 3 21:05 fbcon -> ../../devices/virtual/graphics/fbcon

    Probing with the scope on my display lines I can see: HSYNC, VSYNC, PIXELCLOCK, DATAENABLE all with activity but all the data lines are low

    - even when I have random information in the /dev/fb0 (e.g. via cat /dev/random > /dev/fb0)
    - I can dump the contents of fb0 to console and see that they are random

    So it look as though the current issue is the conneciton from the /dev/fb0 to what is being put on the lcd lines

    The device tree entries look like:

    panel {
    compatible = "ti,tilcdc,panel";
    label = "lcd";
    
    pinctrl-names = "default";
    pinctrl-0 = <&lcd_pins_default>;
    //backlight = <&lcd_backlight>;
    status = "okay";
    enable-gpios = <&gpio2 25 GPIO_ACTIVE_HIGH>; 
    
    panel-info {
    ac-bias = <255>;
    ac-bias-intrpt = <0>;
    dma-burst-sz = <16>;
    bpp = <24>;
    fdd = <0x80>;
    sync-edge = <0>;
    sync-ctrl = <1>;
    raster-order = <0>;
    fifo-th = <0>;
    };
    
    display-timings {
    native-mode = <&timing0>;
    timing0:240x320 {
    clock-frequency = <6350000>; /* 6.35 MHz */
    
    hsync-len = <10>;
    hback-porch = <20>;
    hactive = <240>;
    hfront-porch = <10>;
    vsync-len = <2>;
    
    vback-porch = <2>;
    vactive = <320>;
    vfront-porch = <4>;
    
    hsync-active = <0>;
    vsync-active = <0>;
    de-active = <1>;
    
    pixelclk-active = <1>;
    };
    
    };
    
    };
    };
    
    &lcdc {
    status = "okay";
    ti,allow-non-reduced-blanking-modes;
    };
    
    

    modetest shows no frame buffers

    root@am335x-evm:/sys/class/graphics/fb0# modetest
    trying to open device 'i915'...failed
    trying to open device 'radeon'...failed
    trying to open device 'nouveau'...failed
    trying to open device 'vmwgfx'...failed
    trying to open device 'omapdrm'...failed
    trying to open device 'exynos'...failed
    trying to open device 'tilcdc'...done
    Encoders:
    id crtc type possible crtcs possible clones
    25 24 LVDS 0x00000001 0x00000000
    
    Connectors:
    id encoder status name size (mm) modes encoders
    26 25 connected LVDS-1 0x0 1 25
    modes:
    name refresh (Hz) hdisp hss hse htot vdisp vss vse vtot)
    240x320 69 240 250 260 280 320 324 326 328 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: 0
    
    CRTCs:
    id fb pos size
    24 29 (0,0) (240x320)
    240x320 69 240 250 260 280 320 324 326 328 flags: nhsync, nvsync; type: preferred, driver
    props:
    
    Planes:
    id crtc fb CRTC x,y x,y gamma size possible crtcs
    23 24 29 0,0 0,0 0 0x00000001
    formats: XR24 AR24
    props:
    5 type:
    flags: immutable enum
    enums: Overlay=0 Primary=1 Cursor=2
    value: 1
    
    Frame buffers:
    id size pitch
    
    

    fbset shows

    root@am335x-evm:~# fbset
    
    mode "240x320"
    geometry 240 320 240 320 24
    timings 0 0 0 0 0 0 0
    accel true
    rgba 8/16,8/8,8/0,0/0
    endmode
    
    /
    
    

    from the kernel menuconfig I cab confirm that:

    Symbol: FB_DA8XX [=n] 
    Symbol: DRM [=y] 
    Symbol: DRM_I2C_NXP_TDA998X [=y] 
    Symbol: DRM_TILCDC [=y]
    Symbol: DRM_TILCDC_SLAVE_COMPAT [=y]

    Given I see the frame buffer, and I see control line activity I am thinking that I need to bind the panel to lcdc?

    The LCD Controller user guide mentions Documentation/devicetree/bindings/video/da8xx_fb.txt which I cannot find?

    I have been looking through the various resources in the wiki for clues:
    processors.wiki.ti.com/.../Linux_Core_LCD_Controller_User_Guide
    processors.wiki.ti.com/.../Graphics_Display_Getting_Started_Guide
    processors.wiki.ti.com/index.php
    processors.wiki.ti.com/index.php

    There are a variety of different possible implementations mentioned perhaps I need to use the older fbdev style drivers? 

    Any suggestions for how to investigate the connection between the lcdc and the framebuffer (and why the data is not appearing on the lines) would be gratefully received.

    All the best,
    Richard

  • Quick update now I have this working

    The panel settings posted previousy are sufficient to instantiate a device and frame buffer node: these will get data onto the LCD signals

    Neither of the approaches (HW setting or SW emulation) in the SPI stack for coping with 9bit mode work even for just outgoing comms:
    - the data from the HW approach looked corrupted (but the correct number of bits)
    - the SW approach promoted each outgoing byte to 16bits setting the lowest bit of the MSB correctly but then clocked out all the leading 0

    I worked around this by bit bashing GPIO from user space: this allowed bi-directional comms

    The documentation for the ilitek93xx chips claims to allow change of mode at any time; however this is incorrect and the command appears to be only accessible with the panel in idle.

    Once I have configured this I was able to get the fb0 contents on the screen (after ensuring no other service e.g. weston was using it)

    I hope that helps anyone else with this type of display

    All the best,

    Richard

  • Hello Richard,

    Reading your previous post I think I am in the same situation, I can see control lines but all data lines are low. In your latest comment you mention the panel configuration in the devicetree is ok, so my question is, what did you do to get data on LCD signals?

    Thanks,

  • Hi Xavi

    it was case of:
    - checking the pin muxing
    - defining the panel
    - putting information in to the framebuffer (after making sure there was nothing else using it)

    If the control lines you mention the are SYNC and ENABLE lines for the panel then I would probably be looking at trying to make sure information is getting in to the framebuffer

    hope that helps
    Richard