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.

PROCESSOR-SDK-AM335X: Framebuffer control causes kernel panic

Part Number: PROCESSOR-SDK-AM335X
Other Parts Discussed in Thread: AM3352, TPS65910, AM3354

Hi,

We want to show images in panel and change the image every 5s. However, we always got kernel error messages after few minutes. We just write a simple script with the cat command or using ioctl to implement the function.

=========================Log==================================

U-Boot 2018.01 (Nov 28 2019 - 15:06:38 +0800)

CPU : AM335X-GP rev 2.1
Model: TI AM335x EVM
DRAM: 512 MiB
NAND: 2048 MiB
MMC: OMAP SD/MMC: 0
** Bad device mmc 0 **
Using default environment

<ethaddr> not set. Validating first E-fuse MAC
Net: Could not get PHY for cpsw: addr 0
cpsw, usb_ether
Hit any key to stop autoboot: 0
Booting from nand ...

NAND read: device 0 offset 0x200000, size 0x80000
524288 bytes read: OK

NAND read: device 0 offset 0x400000, size 0xa00000
10485760 bytes read: OK

NAND read: device 0 offset 0x1800000, size 0x1800000
Skipping bad block 0x02d00000
Skipping bad block 0x02d80000
25165824 bytes read: OK
## Flattened Device Tree blob at 80f80000
Booting using the fdt blob at 0x80f80000
Loading Device Tree to 9def8000, end 9df050a8 ... OK

Starting kernel ...

[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 4.9.59 (jason@jason-vb) (gcc version 6.2.1 20161016 (Linaro GCC 6.2-2016.11) ) #18 PREEMPT Fri Nov 29 16:51:39 CST 2019
[ 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] OF: fdt:Machine model: TI AM335x EVM
[ 0.000000] efi: Getting EFI parameters from FDT:
[ 0.000000] efi: UEFI not found.
[ 0.000000] cma: Reserved 48 MiB at 0x9a800000
[ 0.000000] Memory policy: Data cache writeback
[ 0.000000] CPU: All CPU(s) started in SVC mode.
[ 0.000000] AM335X ES2.1 (neon)
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 129920
[ 0.000000] Kernel command line: console=ttyS0,115200n8 consoleblank=0 vt.global_cursor_default=0 mem=512M root=/dev/ram0 rw rootfstype=ext4 initrd=0x81000000,64M ramdisk_size=67108864
[ 0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[ 0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[ 0.000000] Memory: 390300K/524288K available (9216K kernel code, 317K rwdata, 2704K rodata, 1024K init, 321K bss, 84836K reserved, 49152K cma-reserved, 0K highmem)
[ 0.000000] Virtual kernel memory layout:
[ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB)
[ 0.000000] fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
[ 0.000000] vmalloc : 0xe0800000 - 0xff800000 ( 496 MB)
[ 0.000000] lowmem : 0xc0000000 - 0xe0000000 ( 512 MB)
[ 0.000000] pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB)
[ 0.000000] modules : 0xbf000000 - 0xbfe00000 ( 14 MB)
[ 0.000000] .text : 0xc0008000 - 0xc0a00000 (10208 kB)
[ 0.000000] .init : 0xc0d00000 - 0xc0e00000 (1024 kB)
[ 0.000000] .data : 0xc0e00000 - 0xc0e4f4c0 ( 318 kB)
[ 0.000000] .bss : 0xc0e4f4c0 - 0xc0e9fad4 ( 322 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 24000000 Hz
[ 0.000019] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
[ 0.000047] clocksource: timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[ 0.000060] OMAP clocksource: timer1 at 24000000 Hz
[ 0.000295] clocksource_probe: no matching clocksources found
[ 0.000507] Console: colour dummy device 80x30
[ 0.000557] Calibrating delay loop... 597.60 BogoMIPS (lpj=2988032)
[ 0.118785] pid_max: default: 32768 minimum: 301
[ 0.118954] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.118969] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.120016] CPU: Testing write buffer coherency: ok
[ 0.120479] Setting up static identity map for 0x80100000 - 0x80100060
[ 0.121582] EFI services will not be available.
[ 0.123403] devtmpfs: initialized
[ 0.140611] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
[ 0.141053] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.141085] futex hash table entries: 256 (order: -1, 3072 bytes)
[ 0.145651] pinctrl core: initialized pinctrl subsystem
[ 0.147285] NET: Registered protocol family 16
[ 0.150118] DMA: preallocated 256 KiB pool for atomic coherent allocations
[ 0.169925] omap_hwmod: debugss: _wait_target_disable failed
[ 0.248791] cpuidle: using governor ladder
[ 0.278777] cpuidle: using governor menu
[ 0.287240] OMAP GPIO hardware version 0.1
[ 0.307593] omap-gpmc 50000000.gpmc: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/nandflash_pins_default, deferring probe
[ 0.310560] No ATAGs?
[ 0.310587] hw-breakpoint: debug architecture 0x4 unsupported.
[ 0.360244] edma 49000000.edma: TI EDMA DMA engine driver
[ 0.365444] SCSI subsystem initialized
[ 0.365837] usbcore: registered new interface driver usbfs
[ 0.365927] usbcore: registered new interface driver hub
[ 0.366062] usbcore: registered new device driver usb
[ 0.366597] omap_i2c 44e0b000.i2c: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/i2c0_pins_default, deferring probe
[ 0.366769] media: Linux media interface: v0.10
[ 0.366845] Linux video capture interface: v2.00
[ 0.366901] pps_core: LinuxPPS API ver. 1 registered
[ 0.366912] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[ 0.366943] PTP clock support registered
[ 0.366993] EDAC MC: Ver: 3.0.0
[ 0.368366] omap-mailbox 480c8000.mailbox: omap mailbox rev 0x400
[ 0.369646] Bluetooth: Core ver 2.22
[ 0.369721] NET: Registered protocol family 31
[ 0.369735] Bluetooth: HCI device and connection manager initialized
[ 0.369757] Bluetooth: HCI socket layer initialized
[ 0.369774] Bluetooth: L2CAP socket layer initialized
[ 0.369817] Bluetooth: SCO socket layer initialized
[ 0.371046] nfc: nfc_init: NFC Core ver 0.1
[ 0.371133] NET: Registered protocol family 39
[ 0.371669] clocksource: Switched to clocksource timer1
[ 0.385924] NET: Registered protocol family 2
[ 0.386914] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
[ 0.386989] TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
[ 0.387051] TCP: Hash tables configured (established 4096 bind 4096)
[ 0.387141] UDP hash table entries: 256 (order: 0, 4096 bytes)
[ 0.387166] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[ 0.387342] NET: Registered protocol family 1
[ 0.388071] Trying to unpack rootfs image as initramfs...
[ 0.389105] rootfs image is not initramfs (no cpio magic); looks like an initrd
[ 0.928928] Freeing initrd memory: 65536K
[ 0.929670] hw perfevents: enabled with armv7_cortex_a8 PMU driver, 5 counters available
[ 0.933303] workingset: timestamp_bits=14 max_order=17 bucket_order=3
[ 0.944056] ntfs: driver 2.1.32 [Flags: R/O].
[ 0.944460] jffs2: version 2.2. (NAND) (SUMMARY) c 2001-2006 Red Hat, Inc.
[ 0.951860] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 246)
[ 0.951890] io scheduler noop registered
[ 0.951901] io scheduler deadline registered
[ 0.952107] io scheduler cfq registered (default)
[ 0.954066] pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800 size 568
[ 0.958454] backlight supply power not found, using dummy regulator
[ 1.042621] Serial: 8250/16550 driver, 10 ports, IRQ sharing disabled
[ 1.047914] console [ttyS0] disabled
[ 1.048034] 44e09000.serial: ttyS0 at MMIO 0x44e09000 (irq = 158, base_baud = 3000000) is a 8250
[ 1.675317] console [ttyS0] enabled
[ 1.680279] 48022000.serial: ttyS1 at MMIO 0x48022000 (irq = 159, base_baud = 3000000) is a 8250
[ 1.690523] 48024000.serial: ttyS2 at MMIO 0x48024000 (irq = 160, base_baud = 3000000) is a 8250
[ 1.700672] 481a6000.serial: ttyS3 at MMIO 0x481a6000 (irq = 161, base_baud = 3000000) is a 8250
[ 1.710805] 481aa000.serial: ttyS5 at MMIO 0x481aa000 (irq = 162, base_baud = 3000000) is a 8250
[ 1.722182] omap_rng 48310000.rng: OMAP Random Number Generator ver. 20
[ 1.728992] [drm] Initialized
[ 1.732791] panel panel: found backlight
[ 1.738100] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[ 1.744844] [drm] No driver support for vblank timestamp query.
[ 1.781175] Console: switching to colour frame buffer device 100x30
[ 1.795154] tilcdc 4830e000.lcdc: fb0: frame buffer device
[ 1.824768] brd: module loaded
[ 1.836785] loop: module loaded
[ 1.843024] mtdoops: mtd device (mtddev=name/number) must be supplied
[ 1.853145] libphy: Fixed MDIO Bus: probed
[ 1.858887] CAN device driver interface
[ 1.864487] c_can_platform 481cc000.can: c_can_platform device registered (regs=fa1cc000, irq=166)
[ 1.874734] c_can_platform 481d0000.can: c_can_platform device registered (regs=fa1d0000, irq=167)
[ 1.951729] davinci_mdio 4a101000.mdio: davinci mdio revision 1.6
[ 1.957914] davinci_mdio 4a101000.mdio: detected phy mask 3f3f3f01
[ 1.972588] libphy: 4a101000.mdio: probed
[ 1.976651] davinci_mdio 4a101000.mdio: phy[1]: device 4a101000.mdio:01, driver unknown
[ 1.984797] davinci_mdio 4a101000.mdio: phy[2]: device 4a101000.mdio:02, driver unknown
[ 1.993125] davinci_mdio 4a101000.mdio: phy[3]: device 4a101000.mdio:03, driver unknown
[ 2.001217] davinci_mdio 4a101000.mdio: phy[4]: device 4a101000.mdio:04, driver unknown
[ 2.009323] davinci_mdio 4a101000.mdio: phy[5]: device 4a101000.mdio:05, driver unknown
[ 2.017451] davinci_mdio 4a101000.mdio: phy[6]: device 4a101000.mdio:06, driver unknown
[ 2.025521] davinci_mdio 4a101000.mdio: phy[7]: device 4a101000.mdio:07, driver unknown
[ 2.033613] davinci_mdio 4a101000.mdio: phy[14]: device 4a101000.mdio:0e, driver unknown
[ 2.041766] davinci_mdio 4a101000.mdio: phy[15]: device 4a101000.mdio:0f, driver unknown
[ 2.049926] davinci_mdio 4a101000.mdio: phy[22]: device 4a101000.mdio:16, driver unknown
[ 2.058078] davinci_mdio 4a101000.mdio: phy[23]: device 4a101000.mdio:17, driver unknown
[ 2.066256] davinci_mdio 4a101000.mdio: phy[30]: device 4a101000.mdio:1e, driver unknown
[ 2.074491] davinci_mdio 4a101000.mdio: phy[31]: device 4a101000.mdio:1f, driver unknown
[ 2.083645] cpsw 4a100000.ethernet: Missing dual_emac_res_vlan in DT.
[ 2.090135] cpsw 4a100000.ethernet: Using 1 as Reserved VLAN for 0 slave
[ 2.097100] cpsw 4a100000.ethernet: Missing dual_emac_res_vlan in DT.
[ 2.103611] cpsw 4a100000.ethernet: Using 2 as Reserved VLAN for 1 slave
[ 2.110391] cpsw 4a100000.ethernet: Detected MACID = 78:04:73:2a:83:66
[ 2.117154] cpsw 4a100000.ethernet: device node lookup for pps timer failed
[ 2.124272] cpsw 4a100000.ethernet: cpts: overflow check period 500 (jiffies)
[ 2.133002] cpsw 4a100000.ethernet: cpsw: Detected MACID = 78:04:73:2a:83:68
[ 2.141950] PPP generic driver version 2.4.2
[ 2.146643] PPP BSD Compression module registered
[ 2.151442] PPP Deflate Compression module registered
[ 2.156591] PPP MPPE Compression module registered
[ 2.161409] NET: Registered protocol family 24
[ 2.166058] usbcore: registered new interface driver cdc_ether
[ 2.172107] usbcore: registered new interface driver rndis_host
[ 2.178894] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 2.185586] ehci-pci: EHCI PCI platform driver
[ 2.190173] ehci-platform: EHCI generic platform driver
[ 2.195746] ehci-omap: OMAP-EHCI Host Controller driver
[ 2.201825] usbcore: registered new interface driver cdc_acm
[ 2.207515] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
[ 2.215697] usbcore: registered new interface driver cdc_wdm
[ 2.221438] usbcore: registered new interface driver usbtmc
[ 2.227191] usbcore: registered new interface driver usb-storage
[ 2.233314] usbcore: registered new interface driver ums-sddr09
[ 2.239309] usbcore: registered new interface driver ums-sddr55
[ 2.245366] usbcore: registered new interface driver ums-usbat
[ 2.251373] usbcore: registered new interface driver usbserial
[ 2.257367] usbcore: registered new interface driver usbserial_generic
[ 2.264005] usbserial: USB Serial support registered for generic
[ 2.270088] usbcore: registered new interface driver ftdi_sio
[ 2.275970] usbserial: USB Serial support registered for FTDI USB Serial Device
[ 2.283388] usbcore: registered new interface driver ipw
[ 2.288807] usbserial: USB Serial support registered for IPWireless converter
[ 2.296058] usbcore: registered new interface driver option
[ 2.301728] usbserial: USB Serial support registered for GSM modem (1-port)
[ 2.308807] usbcore: registered new interface driver pl2303
[ 2.314427] random: fast init done
[ 2.317928] usbserial: USB Serial support registered for pl2303
[ 2.323949] usbcore: registered new interface driver qcserial
[ 2.329767] usbserial: USB Serial support registered for Qualcomm USB modem
[ 2.339431] 47401300.usb-phy supply vcc not found, using dummy regulator
[ 2.352058] 47401b00.usb-phy supply vcc not found, using dummy regulator
[ 2.372750] mousedev: PS/2 mouse device common for all mice
[ 2.378921] i2c /dev entries driver
[ 2.385154] omap_wdt: OMAP Watchdog Timer Rev 0x01: initial timeout 60 sec
[ 2.403935] ISDN subsystem Rev: 1.1.2.3/[ 2.407734] 1.1.2.2/
1.1.2.3/[ 2.410742] none/
1.1.2.2[ 2.413352]
[ 2.414990] Modular ISDN core version 1.1.29
[ 2.419606] NET: Registered protocol family 34
[ 2.424163] gigaset: Driver for Gigaset 307x
[ 2.428455] gigaset: Kernel CAPI interface
[ 2.433974] cpuidle: enable-method property 'ti,am3352' found operations
[ 2.441577] sdhci: Secure Digital Host Controller Interface driver
[ 2.447878] sdhci: Copyright(c) Pierre Ossman
[ 2.453649] omap_hsmmc 48060000.mmc: Got CD GPIO
[ 2.459778] Synopsys Designware Multimedia Card Interface Driver
[ 2.466808] VUB300 Driver rom wait states = 1C irqpoll timeout = 0400[ 2.473871] usbcore: registered new interface driver vub300
[ 2.479561] usbcore: registered new interface driver ushc
[ 2.485529] sdhci-pltfm: SDHCI platform and OF driver helper
[ 2.492077] ledtrig-cpu: registered to indicate activity on CPUs
[ 2.498412] usbcore: registered new interface driver usbhid
[ 2.504126] usbhid: USB HID core driver
[ 2.509923] Netfilter messages via NETLINK v0.30.
[ 2.514877] ip_set: protocol 6
[ 2.518248] ip_tables: (C) 2000-2006 Netfilter Core Team
[ 2.523643] Initializing XFRM netlink socket
[ 2.528600] NET: Registered protocol family 10
[ 2.535108] ip6_tables: (C) 2000-2006 Netfilter Core Team
[ 2.540550] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[ 2.547748] NET: Registered protocol family 17
[ 2.552357] NET: Registered protocol family 15
[ 2.556907] Bridge firewalling registered
[ 2.560999] Ebtables v2.0 registered
[ 2.564623] can: controller area network core (rev 20120528 abi 9)
[ 2.570932] NET: Registered protocol family 29
[ 2.575506] can: raw protocol (rev 20120528)
[ 2.579799] can: broadcast manager protocol (rev 20161123 t)
[ 2.585522] can: netlink gateway (rev 20130117) max_hops=1
[ 2.591568] NET: Registered protocol family 36
[ 2.596184] Key type dns_resolver registered
[ 2.600790] omap_voltage_late_init: Voltage driver support not added
[ 2.614928] omap-gpmc 50000000.gpmc: GPMC revision 6.0
[ 2.620258] gpmc_mem_init: disabling cs 0 mapped at 0x0-0x1000000
[ 2.628923] nand: device found, Manufacturer ID: 0x2c, Chip ID: 0x48
[ 2.635533] nand: Micron MT29F16G08ABACAWP
[ 2.639661] nand: 2048 MiB, SLC, erase size: 512 KiB, page size: 4096, OOB size: 224
[ 2.647513] using OMAP_ECC_BCH16_CODE_HW ECC scheme
[ 2.652650] 15 ofpart partitions found on MTD device omap2-nand.0
[ 2.658775] Creating 15 MTD partitions on "omap2-nand.0":
[ 2.664260] 0x000000000000-0x000000080000 : "NAND.SPL"
[ 2.671425] 0x000000080000-0x000000100000 : "NAND.SPL.backup1"
[ 2.679053] 0x000000100000-0x000000180000 : "NAND.SPL.backup2"
[ 2.686563] 0x000000180000-0x000000200000 : "NAND.SPL.backup3"
[ 2.694007] 0x000000200000-0x000000280000 : "NAND.kernel-fdt"
[ 2.701346] 0x000000280000-0x000000380000 : "NAND.u-boot"
[ 2.708430] 0x000000380000-0x000000400000 : "NAND.u-boot-env"
[ 2.715908] 0x000000400000-0x000000e00000 : "Primary kernel"
[ 2.723864] 0x000000e00000-0x000001800000 : "Secondary kernel"
[ 2.732078] 0x000001800000-0x000003000000 : "Primary rootfs"
[ 2.740981] 0x000003000000-0x000004800000 : "Secondary rootfs"
[ 2.749954] 0x000004800000-0x000004e00000 : "Primary user configuration"
[ 2.758705] 0x000004e00000-0x000005400000 : "Secondary user configuration"
[ 2.767591] 0x000005400000-0x000005a00000 : "Factory default configuration"
[ 2.776621] 0x000005a00000-0x000080000000 : "Storage"
[ 2.941971] tps65910 0-002d: No interrupt support, no core IRQ
[ 2.950329] vrtc: supplied by vbat
[ 2.957861] vio: supplied by vbat
[ 2.962939] vdd1: supplied by vbat
[ 2.968403] vdd2: supplied by vbat
[ 2.975445] vdig1: supplied by vbat
[ 2.980522] vdig2: supplied by vbat
[ 2.985713] vpll: supplied by vbat
[ 2.990682] vdac: supplied by vbat
[ 2.995741] vaux1: supplied by vbat
[ 3.000897] vaux2: supplied by vbat
[ 3.005939] vaux33: supplied by vbat
[ 3.010998] vmmc: supplied by vbat
[ 3.016118] vbb: supplied by vbat
[ 3.020893] omap_i2c 44e0b000.i2c: bus 0 rev0.11 at 400 kHz
[ 3.036400] musb-hdrc musb-hdrc.0: MUSB HDRC host driver
[ 3.042184] musb-hdrc musb-hdrc.0: new USB bus registered, assigned bus number 1
[ 3.049948] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[ 3.056824] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 3.064144] usb usb1: Product: MUSB HDRC host driver
[ 3.069137] usb usb1: Manufacturer: Linux 4.9.59 musb-hcd
[ 3.074612] usb usb1: SerialNumber: musb-hdrc.0
[ 3.080101] hub 1-0:1.0: USB hub found
[ 3.084032] hub 1-0:1.0: 1 port detected
[ 3.098370] musb-hdrc musb-hdrc.1: MUSB HDRC host driver
[ 3.104237] musb-hdrc musb-hdrc.1: new USB bus registered, assigned bus number 2
[ 3.111962] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002
[ 3.118843] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 3.126136] usb usb2: Product: MUSB HDRC host driver
[ 3.131127] usb usb2: Manufacturer: Linux 4.9.59 musb-hcd
[ 3.136610] usb usb2: SerialNumber: musb-hdrc.1
[ 3.142174] hub 2-0:1.0: USB hub found
[ 3.145997] hub 2-0:1.0: 1 port detected
[ 3.153244] omap_hsmmc 48060000.mmc: Got CD GPIO
[ 3.212788] hctosys: unable to open rtc device (rtc0)
[ 3.218442] lis3_reg: disabling
[ 3.221846] mmc0: mmc_rescan_try_freq: trying to init card at 400000 Hz
[ 3.232848] RAMDISK: gzip image found at block 0
[ 5.228121] EXT4-fs (ram0): mounted filesystem without journal. Opts: (null)
[ 5.235633] VFS: Mounted root (ext4 filesystem) on device 1:0.
[ 5.242348] devtmpfs: mounted
[ 5.246971] Freeing unused kernel memory: 1024K
Bad inittab entry at line 2
[ 5.985714] jffs2: notice: (110) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
/ # [Info] Number of Image: 3

/ # echo 8 > /proc/sys/kernel/printk
/ #
/ # cat /proc/sys/kernel/printk
8 4 1 7
/ # [ 159.373936] random: crng init done

/ # uptime
00:03:01 up 3 min, 0 users, load average: 0.00, 0.00, 0.00
/ # [ 1380.081722] Unable to handle kernel paging request at virtual address c0e01ce8
[ 1380.088998] pgd = c1510000
[ 1380.091715] [c0e01ce8] *pgd=80e0041e(bad)
[ 1380.095763] Internal error: Oops: 8000000d [#1] PREEMPT ARM
[ 1380.101359] Modules linked in:
[ 1380.104438] CPU: 0 PID: 0 Comm: swapper Not tainted 4.9.59 #18
[ 1380.110295] Hardware name: Generic AM33XX (Flattened Device Tree)
[ 1380.116413] task: c0e060c0 task.stack: c0e00000
[ 1380.120978] PC is at init_thread_union+0x1ce8/0x2000
[ 1380.125977] LR is at rpm_suspend+0x48/0x5c4
[ 1380.130179] pc : [<c0e01ce8>] lr : [<c04fecbc>] psr: 60000193
[ 1380.130179] sp : c0e01d3c ip : c0e01ce8 fp : 60000113
[ 1380.141706] r10: df020010 r9 : c061a1b0 r8 : c0e13840
[ 1380.146952] r7 : c0e14940 r6 : 0000000d r5 : 60000113 r4 : d7505210
[ 1380.153505] r3 : 00000004 r2 : c01594f4 r1 : 00000001 r0 : fffffff5
[ 1380.160063] Flags: nZCv IRQs off FIQs on Mode SVC_32 ISA ARM Segment none
[ 1380.167315] Control: 10c5387d Table: 81510019 DAC: 00000051
[ 1380.173084] Process swapper (pid: 0, stack limit = 0xc0e00208)
[ 1380.178941] Stack: (0xc0e01d3c to 0xc0e02000)
[ 1380.183316] 1d20: c04fec80
[ 1380.191533] 1d40: 40000113 00000000 d7505210 df020010 c0e01d7c c0e01d60 c061a2b8 c0500668
[ 1380.199749] 1d60: ffffe000 00000101 c061a1b0 00000000 c0e01da4 c0e01d80 c017a484 c061a1bc
[ 1380.207966] 1d80: c0e14a78 c0e01d90 c04ae714 c0e00000 c0e01dd8 00000200 c0e01dd4 c0e01da8
[ 1380.216181] 1da0: c017a5dc c017a460 c0e01dd8 00000001 c0e01dd4 c0e13840 c0e14940 c0e13840
[ 1380.224399] 1dc0: c0e50280 40000001 c0e01e1c c0e01dd8 c017a6a0 c017a500 00000000 c0e01de8
[ 1380.232616] 1de0: c016900c c0119f34 0000c8b0 0001a5e8 c0e01e2c c0e01e00 c048a7ec 00000000
[ 1380.240831] 1e00: 00000001 c0e00000 c0e50284 00000101 c0e01e7c c0e01e20 c012ee7c c017a5fc
[ 1380.249047] 1e20: c0e01e4c c0e01e30 c01690f0 00200100 c0e14940 0001a5e9 0000000a c0a03154
[ 1380.257264] 1e40: ffffe000 c0e50240 c0e103e8 c0e50280 00000000 c0e1d180 00000010 00000000
[ 1380.265479] 1e60: 00000000 df006000 c0e00000 00000000 c0e01e8c c0e01e80 c012f360 c012ed9c
[ 1380.273695] 1e80: c0e01eb4 c0e01e90 c01688b4 c012f22c c0e8d1c0 20000013 ffffffff c0e01f04
[ 1380.281912] 1ea0: 001d7b5d c0e00000 c0e01ecc c0e01eb8 c0101484 c0168860 c06af2e0 20000013
[ 1380.290128] 1ec0: c0e01f54 c0e01ed0 c010c5cc c0101454 00000000 00000141 d32d9c16 c0e0fea8
[ 1380.298343] 1ee0: 53293c72 00000141 00000000 d757a600 001d7b5d 00000141 00000000 c0e01f54
[ 1380.306559] 1f00: c0e01f20 c0e01f20 c06af2d8 c06af2e0 20000013 ffffffff 00000051 00000000
[ 1380.314775] 1f20: 00000000 00000000 001da21c d757a600 c0e00000 c0e42440 c0e028c8 c0e42000
[ 1380.322993] 1f40: c0e028d0 c0e4e2eb c0e01f64 c0e01f58 c06af458 c06af160 c0e01f74 c0e01f68
[ 1380.331208] 1f60: c0159ba8 c06af448 c0e01f94 c0e01f78 c0159dd0 c0159b8c c093b2b0 c0bc93f4
[ 1380.339424] 1f80: 00000002 c0e02840 c0e01fac c0e01f98 c0939f70 c0159cf4 c0e4f50c 00000000
[ 1380.347640] 1fa0: c0e01ff4 c0e01fb0 c0d00d44 c0939ef0 ffffffff ffffffff 00000000 c0d00704
[ 1380.355856] 1fc0: 00000000 c0d3ca28 00000000 c0e4f694 c0e0285c c0d3ca24 c0e0740c 80004059
[ 1380.364071] 1fe0: 413fc082 00000000 00000000 c0e01ff8 80008078 c0d009a8 00000000 00000000
[ 1380.372278] Backtrace: invalid frame pointer 0x60000113
[ 1380.377540] Code: 60000113 c0e01ce8 c010c764 c01013ac (fffffff5)
[ 1380.383670] ---[ end trace 2d370cefb5844926 ]---
[ 1380.388307] Kernel panic - not syncing: Fatal exception in interrupt
[ 1380.394689] ---[ end Kernel panic - not syncing: Fatal exception in interrupt

  • Hello,

    I am wondering if you could please share more information about the custom script. Also, if you remove the script from the system service, are you still experiencing Kernel panics? As an experiment, please launch the script after the login prompt to see if the panic still exists.

    Regards,
    Krunal

  • Hi Krunal,
     
    We did some tests as follows:
    1. Change image every 5 sec. (script or ioctl ) => system crash.
    2. Just show one image => everything is fine.
    3. Open/Close framebuffer every 5 sec. => after few minutes, can’t unblank panel. (But system doesn’t crash

    Script content as below:

    =================Script========================

    #!/bin/sh

    num=0;

    while true
    do

    if [ $num -eq 0 ]; then
      cat /root/standby.raw > /dev/fb0
      num=1
      sleep 5
    elif [ $num -eq 1 ]; then
      cat /root/plug.raw > /dev/fb0
      num=2
      sleep 5
    else
      cat /root/charging.raw > /dev/fb0
      num=0
      sleep 5
    fi

    done

    ==============================================

    Thanks

    We did some tests as follows:
    1. Change image every 5 sec. => system crash.
    2. Just show one image => everything is fine.

    Open/Close framebuffer every 5 sec. => after few minutes, can’t unblank panel. (But system doesn’t crash)

  • dts is shown below

    /*
    * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/
    *
    * This program is free software; you can redistribute it and/or modify
    * it under the terms of the GNU General Public License version 2 as
    * published by the Free Software Foundation.
    */

    /dts-v1/;

    #include "am33xx.dtsi"
    #include <dt-bindings/pwm/pwm.h>
    #include <dt-bindings/interrupt-controller/irq.h>

    / {
    model = "TI AM335x EVM";
    compatible = "ti,am335x-evm", "ti,am33xx";

    cpus {
    cpu@0 {
    cpu0-supply = <&vdd1_reg>;
    };
    };

    memory@80000000 {
    device_type = "memory";
    /* +++ Seamus,512MB DDR ,20190318 ---*/
    /*reg = <0x80000000 0x10000000>;*/ /* 256 MB */
    reg = <0x80000000 0x20000000>; /* 512 MB */
    /* --- Seamus,ramdisk ,20190318 ---*/
    };
    /* +++ Seamus,512MB DDR ,20190318 ---*/
    chosen {
    bootargs = "console=ttyS0,115200n8 root=/dev/ram0";
    };
    /* --- Seamus,ramdisk ,20190318 ---*/
    vbat: fixedregulator0 {
    compatible = "regulator-fixed";
    regulator-name = "vbat";
    regulator-min-microvolt = <5000000>;
    regulator-max-microvolt = <5000000>;
    regulator-boot-on;
    };

    hdmi {
    compatible = "ti,tilcdc,slave";
    i2c = <&i2c0>;
    pinctrl-names = "default", "off";
    pinctrl-0 = <&nxp_hdmi_pins>;
    pinctrl-1 = <&nxp_hdmi_off_pins>;
    status = "okay";
    };

    lis3_reg: fixedregulator1 {
    compatible = "regulator-fixed";
    regulator-name = "lis3_reg";
    regulator-boot-on;
    };

    #if 1
    lcd_bl: backlight {
    compatible = "pwm-backlight";
    pwms = <&ecap2 0 50000 PWM_POLARITY_INVERTED>;
    brightness-levels = <0 51 53 56 62 75 101 152 255>;
    default-brightness-level = <8>;
    };

    panel {
    compatible = "ti,tilcdc,panel";
    status = "okay";
    pinctrl-names = "default", "sleep";
    pinctrl-0 = <&lcd_pins_s0>;
    pinctrl-1 = <&lcd_pins_sleep>;
    backlight = <&lcd_bl>;
    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 {
    800x480 {
    clock-frequency = <30000000>;
    hactive = <800>;
    vactive = <480>;
    hfront-porch = <56>;
    hback-porch = <4>;
    hsync-len = <12>;
    vback-porch = <21>;
    vfront-porch = <16>;
    vsync-len = <3>;
    hsync-active = <0>;
    vsync-active = <0>;
    };
    };
    };
    #endif
    };


    /* +++ Seamus,Pinmux ,20190318 +++*/
    &am33xx_pinmux {
    pinctrl-names = "default";
    pinctrl-0 = <&InitialGPIO &clkout2_pin>;
    InitialGPIO: InitialGPIO {
    pinctrl-single,pins = <
    /* AM33XX_IOPAD(0x910, PIN_OUTPUT_PULLUP | MUX_MODE7) MII1_RX_ER.GPIO3_2 */
    AM33XX_IOPAD(0x88C, PIN_OUTPUT | MUX_MODE7) /* GPMC_CLK.GPIO2_1 */
    AM33XX_IOPAD(0x880, PIN_OUTPUT | MUX_MODE7) /* GPMC_CSn1.GPIO1_30 */
    AM33XX_IOPAD(0x840, PIN_OUTPUT | MUX_MODE7) /* GPMC_A0.GPIO1_16 */
    AM33XX_IOPAD(0x84C, PIN_OUTPUT | MUX_MODE7) /* GPMC_A3.GPIO1_19 */
    AM33XX_IOPAD(0x850, PIN_OUTPUT | MUX_MODE7) /* GPMC_A4.GPIO1_20 */
    AM33XX_IOPAD(0x858, PIN_OUTPUT | MUX_MODE7) /* GPMC_A6.GPIO1_22 */
    AM33XX_IOPAD(0x85C, PIN_INPUT | MUX_MODE7) /* GPMC_A7.GPIO1_23 */
    AM33XX_IOPAD(0x864, PIN_INPUT | MUX_MODE7) /* GPMC_A9.GPIO1_25 */
    AM33XX_IOPAD(0x868, PIN_INPUT | MUX_MODE7) /* GPMC_A10.GPIO1_26 */
    AM33XX_IOPAD(0x990, PIN_OUTPUT | MUX_MODE7) /* MCASP0_ACLKX.GPIO3_14 */
    AM33XX_IOPAD(0x994, PIN_INPUT | MUX_MODE7) /* MCASP0_FSX.GPIO3_15 */
    AM33XX_IOPAD(0x9AC, PIN_INPUT | MUX_MODE7) /* MCASP0_AHCLKX.GPIO3_21 */
    AM33XX_IOPAD(0x9B0, PIN_OUTPUT | MUX_MODE7) /* XDMA_EVENT_INTR0.GPIO0_19 */
    AM33XX_IOPAD(0x9A0, PIN_OUTPUT | MUX_MODE7) /* MCASP0_ACLKR.GPIO3_18 */
    AM33XX_IOPAD(0x9A4, PIN_OUTPUT | MUX_MODE7) /* MCASP0_FSR.GPIO3_19 */
    AM33XX_IOPAD(0x998, PIN_OUTPUT | MUX_MODE7) /* MCASP0_AXR0.GPIO3_16 */
    AM33XX_IOPAD(0x9A8, PIN_OUTPUT | MUX_MODE7) /* MCASP0_AXR1.GPIO3_20 */
    AM33XX_IOPAD(0x938, PIN_INPUT | MUX_MODE7) /* MII1_RXD2.GPIO2_19*/
    AM33XX_IOPAD(0x888, PIN_OUTPUT | MUX_MODE7) /* GPMC_CSn3.GPIO2_0*/
    AM33XX_IOPAD(0x878, PIN_OUTPUT | MUX_MODE7) /* GPMC_ben1.GPIO1_28*/
    AM33XX_IOPAD(0x884, PIN_OUTPUT | MUX_MODE7) /* GPMC_CSn2.GPIO1_31*/
    >;
    };

    i2c0_pins_default: i2c0_pins_default {
    pinctrl-single,pins = <
    AM33XX_IOPAD(0x98c, PIN_INPUT_PULLUP | MUX_MODE0) /* (C16) I2C0_SCL.I2C0_SCL */
    AM33XX_IOPAD(0x988, PIN_INPUT_PULLUP | MUX_MODE0) /* (C17) I2C0_SDA.I2C0_SDA */
    >;
    };

    uart0_pins_default: uart0_pins_default {
    pinctrl-single,pins = <
    AM33XX_IOPAD(0x970, PIN_INPUT_PULLUP | MUX_MODE0) /* (E15) uart0_rxd.uart0_rxd */
    AM33XX_IOPAD(0x974, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* (E16) uart0_txd.uart0_txd */
    >;
    };

    uart1_pins_default: uart1_pins_default {
    pinctrl-single,pins = <
    AM33XX_IOPAD(0x980, PIN_INPUT_PULLUP | MUX_MODE0) /* (D16) uart1_rxd.uart1_rxd */
    AM33XX_IOPAD(0x984, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* (D15) uart1_txd.uart1_txd */
    AM33XX_IOPAD(0x978, PIN_INPUT | MUX_MODE0) /* (D18) uart1_ctsn.uart1_ctsn */
    AM33XX_IOPAD(0x97c, PIN_OUTPUT | MUX_MODE0) /* (D17) uart1_rtsn.uart1_rtsn */
    >;
    };

    uart2_pins_default: uart2_pins_default {
    pinctrl-single,pins = <
    AM33XX_IOPAD(0x92c, PIN_INPUT_PULLUP | MUX_MODE1) /* (K18) gmii1_txclk.uart2_rxd */
    AM33XX_IOPAD(0x930, PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* (L18) gmii1_rxclk.uart2_txd */
    >;
    };

    uart3_pins_default: uart3_pins_default {
    pinctrl-single,pins = <
    AM33XX_IOPAD(0x934, PIN_INPUT_PULLUP | MUX_MODE1) /* (L17) gmii1_rxd3.uart3_rxd */
    AM33XX_IOPAD(0x964, PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* (C18) eCAP0_in_PWM0_out.uart3_txd */
    >;
    };

    uart5_pins_default: uart5_pins_default {
    pinctrl-single,pins = <
    AM33XX_IOPAD(0x908, PIN_INPUT_PULLUP | MUX_MODE3) /* (H16) gmii1_col.uart5_rxd */
    AM33XX_IOPAD(0x918, PIN_OUTPUT_PULLDOWN | MUX_MODE3) /* (J17) gmii1_rxdv.uart5_txd */
    >;
    };

    clkout2_pin: pinmux_clkout2_pin {
    pinctrl-single,pins = <
    AM33XX_IOPAD(0x9b4, PIN_OUTPUT_PULLDOWN | MUX_MODE3) /* xdma_event_intr1.clkout2 */
    >;
    };

    ecap2_pins: backlight_pins {
    pinctrl-single,pins = <
    AM33XX_IOPAD(0x99c, MUX_MODE4) /* mcasp0_ahclkr.ecap2_in_pwm2_out */
    >;
    };

    nandflash_pins_default: nandflash_pins_default {
    pinctrl-single,pins = <
    AM33XX_IOPAD(0x81c, PIN_INPUT_PULLUP | MUX_MODE0) /* (T9) gpmc_ad7.gpmc_ad7 */
    AM33XX_IOPAD(0x818, PIN_INPUT_PULLUP | MUX_MODE0) /* (R9) gpmc_ad6.gpmc_ad6 */
    AM33XX_IOPAD(0x814, PIN_INPUT_PULLUP | MUX_MODE0) /* (V8) gpmc_ad5.gpmc_ad5 */
    AM33XX_IOPAD(0x810, PIN_INPUT_PULLUP | MUX_MODE0) /* (U8) gpmc_ad4.gpmc_ad4 */
    AM33XX_IOPAD(0x80c, PIN_INPUT_PULLUP | MUX_MODE0) /* (T8) gpmc_ad3.gpmc_ad3 */
    AM33XX_IOPAD(0x808, PIN_INPUT_PULLUP | MUX_MODE0) /* (R8) gpmc_ad2.gpmc_ad2 */
    AM33XX_IOPAD(0x804, PIN_INPUT_PULLUP | MUX_MODE0) /* (V7) gpmc_ad1.gpmc_ad1 */
    AM33XX_IOPAD(0x800, PIN_INPUT_PULLUP | MUX_MODE0) /* (U7) gpmc_ad0.gpmc_ad0 */
    AM33XX_IOPAD(0x870, PIN_INPUT_PULLUP | MUX_MODE0) /* (T17) gpmc_wait0.gpmc_wait0 */
    AM33XX_IOPAD(0x874, PIN_OUTPUT | MUX_MODE0) /* (U17) gpmc_wpn.gpmc_wpn */
    AM33XX_IOPAD(0x890, PIN_OUTPUT | MUX_MODE0) /* (R7) gpmc_advn_ale.gpmc_advn_ale */
    AM33XX_IOPAD(0x894, PIN_OUTPUT | MUX_MODE0) /* (T7) gpmc_oen_ren.gpmc_oen_ren */
    AM33XX_IOPAD(0x898, PIN_OUTPUT | MUX_MODE0) /* (U6) gpmc_wen.gpmc_wen */
    AM33XX_IOPAD(0x89c, PIN_OUTPUT | MUX_MODE0) /* (T6) gpmc_be0n_cle.gpmc_be0n_cle */
    AM33XX_IOPAD(0x87c, PIN_OUTPUT | MUX_MODE0) /* (V6) gpmc_csn0.gpmc_csn0 */
    >;
    };

    /* Optional sleep pin settings. Must manually enter values in the below skeleton. */
    nandflash_pins_sleep: nandflash_pins_sleep {
    pinctrl-single,pins = <
    AM33XX_IOPAD(0x81c,PIN_INPUT_PULLDOWN | MUX_MODE7) /* (T9) gpmc_ad7.gpmc_ad7 */
    AM33XX_IOPAD(0x818,PIN_INPUT_PULLDOWN | MUX_MODE7) /* (R9) gpmc_ad6.gpmc_ad6 */
    AM33XX_IOPAD(0x814,PIN_INPUT_PULLDOWN | MUX_MODE7) /* (V8) gpmc_ad5.gpmc_ad5 */
    AM33XX_IOPAD(0x810,PIN_INPUT_PULLDOWN | MUX_MODE7) /* (U8) gpmc_ad4.gpmc_ad4 */
    AM33XX_IOPAD(0x80c,PIN_INPUT_PULLDOWN | MUX_MODE7) /* (T8) gpmc_ad3.gpmc_ad3 */
    AM33XX_IOPAD(0x808,PIN_INPUT_PULLDOWN | MUX_MODE7) /* (R8) gpmc_ad2.gpmc_ad2 */
    AM33XX_IOPAD(0x804,PIN_INPUT_PULLDOWN | MUX_MODE7) /* (V7) gpmc_ad1.gpmc_ad1 */
    AM33XX_IOPAD(0x800,PIN_INPUT_PULLDOWN | MUX_MODE7) /* (U7) gpmc_ad0.gpmc_ad0 */
    AM33XX_IOPAD(0x870,PIN_INPUT_PULLDOWN | MUX_MODE7) /* (T17) gpmc_wait0.gpmc_wait0 */
    AM33XX_IOPAD(0x874,PIN_INPUT_PULLDOWN | MUX_MODE7) /* (U17) gpmc_wpn.gpmc_wpn */
    AM33XX_IOPAD(0x890,PIN_INPUT_PULLDOWN | MUX_MODE7) /* (R7) gpmc_advn_ale.gpmc_advn_ale */
    AM33XX_IOPAD(0x894,PIN_INPUT_PULLDOWN | MUX_MODE7) /* (T7) gpmc_oen_ren.gpmc_oen_ren */
    AM33XX_IOPAD(0x898,PIN_INPUT_PULLDOWN | MUX_MODE7) /* (U6) gpmc_wen.gpmc_wen */
    AM33XX_IOPAD(0x89c,PIN_INPUT_PULLDOWN | MUX_MODE7) /* (T6) gpmc_be0n_cle.gpmc_be0n_cle */
    AM33XX_IOPAD(0x87c,PIN_INPUT_PULLDOWN | MUX_MODE7) /* (V6) gpmc_csn0.gpmc_csn0 */
    >;
    };

    cpsw_default: cpsw_default {
    pinctrl-single,pins = <
    AM33XX_IOPAD(0x90c, PIN_INPUT_PULLDOWN | MUX_MODE1) /* (H17) gmii1_crs.rmii1_crs_dv */
    AM33XX_IOPAD(0x914, PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* (J16) gmii1_txen.rmii1_txen */
    AM33XX_IOPAD(0x928, PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* (K17) gmii1_txd0.rmii1_txd0 */
    AM33XX_IOPAD(0x924, PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* (K16) gmii1_txd1.rmii1_txd1 */
    AM33XX_IOPAD(0x940, PIN_INPUT_PULLDOWN | MUX_MODE1) /* (M16) gmii1_rxd0.rmii1_rxd0 */
    AM33XX_IOPAD(0x93c, PIN_INPUT_PULLDOWN | MUX_MODE1) /* (L15) gmii1_rxd1.rmii1_rxd1 */
    AM33XX_IOPAD(0x944, PIN_INPUT_PULLDOWN | MUX_MODE0) /* (H18) rmii1_refclk.rmii1_refclk */

    AM33XX_IOPAD(0x90c, PIN_INPUT_PULLDOWN | MUX_MODE1) /* (H17) gmii1_crs.rmii1_crs_dv */
    AM33XX_IOPAD(0x914, PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* (J16) gmii1_txen.rmii1_txen */
    AM33XX_IOPAD(0x928, PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* (K17) gmii1_txd0.rmii1_txd0 */
    AM33XX_IOPAD(0x924, PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* (K16) gmii1_txd1.rmii1_txd1 */
    AM33XX_IOPAD(0x940, PIN_INPUT_PULLDOWN | MUX_MODE1) /* (M16) gmii1_rxd0.rmii1_rxd0 */
    AM33XX_IOPAD(0x93c, PIN_INPUT_PULLDOWN | MUX_MODE1) /* (L15) gmii1_rxd1.rmii1_rxd1 */
    AM33XX_IOPAD(0x944, PIN_INPUT_PULLDOWN | MUX_MODE0) /* (H18) rmii1_refclk.rmii1_refclk */
    >;
    };

    /* Optional sleep pin settings. Must manually enter values in the below skeleton. */
    cpsw_sleep: cpsw_sleep {
    pinctrl-single,pins = <
    AM33XX_IOPAD(0x90c,PIN_INPUT_PULLDOWN | MUX_MODE7) /* (H17) gmii1_crs.rmii1_crs_dv */
    AM33XX_IOPAD(0x914,PIN_INPUT_PULLDOWN | MUX_MODE7) /* (J16) gmii1_txen.rmii1_txen */
    AM33XX_IOPAD(0x928,PIN_INPUT_PULLDOWN | MUX_MODE7) /* (K17) gmii1_txd0.rmii1_txd0 */
    AM33XX_IOPAD(0x924,PIN_INPUT_PULLDOWN | MUX_MODE7) /* (K16) gmii1_txd1.rmii1_txd1 */
    AM33XX_IOPAD(0x940,PIN_INPUT_PULLDOWN | MUX_MODE7) /* (M16) gmii1_rxd0.rmii1_rxd0 */
    AM33XX_IOPAD(0x93c,PIN_INPUT_PULLDOWN | MUX_MODE7) /* (L15) gmii1_rxd1.rmii1_rxd1 */
    AM33XX_IOPAD(0x944,PIN_INPUT_PULLDOWN | MUX_MODE7) /* (H18) rmii1_refclk.rmii1_refclk */


    AM33XX_IOPAD(0x90c,PIN_INPUT_PULLDOWN | MUX_MODE7) /* (H17) gmii1_crs.rmii1_crs_dv */
    AM33XX_IOPAD(0x914,PIN_INPUT_PULLDOWN | MUX_MODE7) /* (J16) gmii1_txen.rmii1_txen */
    AM33XX_IOPAD(0x928,PIN_INPUT_PULLDOWN | MUX_MODE7) /* (K17) gmii1_txd0.rmii1_txd0 */
    AM33XX_IOPAD(0x924,PIN_INPUT_PULLDOWN | MUX_MODE7) /* (K16) gmii1_txd1.rmii1_txd1 */
    AM33XX_IOPAD(0x940,PIN_INPUT_PULLDOWN | MUX_MODE7) /* (M16) gmii1_rxd0.rmii1_rxd0 */
    AM33XX_IOPAD(0x93c,PIN_INPUT_PULLDOWN | MUX_MODE7) /* (L15) gmii1_rxd1.rmii1_rxd1 */
    AM33XX_IOPAD(0x944,PIN_INPUT_PULLDOWN | MUX_MODE7) /* (H18) rmii1_refclk.rmii1_refclk */
    >;
    };

    davinci_mdio_default: davinci_mdio_default {
    pinctrl-single,pins = <
    AM33XX_IOPAD(0x94c, PIN_OUTPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0) /* (M18) mdio_clk.mdio_clk */
    AM33XX_IOPAD(0x948, PIN_INPUT_PULLUP | MUX_MODE0) /* (M17) mdio_data.mdio_data */
    >;
    };

    /* Optional sleep pin settings. Must manually enter values in the below skeleton. */
    davinci_mdio_sleep: davinci_mdio_sleep {
    pinctrl-single,pins = <
    AM33XX_IOPAD(0x94c,PIN_INPUT_PULLDOWN | MUX_MODE7) /* (M18) mdio_clk.mdio_clk */
    AM33XX_IOPAD(0x948,PIN_INPUT_PULLDOWN | MUX_MODE7) /* (M17) mdio_data.mdio_data */
    >;
    };

    mmc1_pins: mmc1_pins_default {
    pinctrl-single,pins = <
    AM33XX_IOPAD(0x900, PIN_INPUT_PULLUP | MUX_MODE0) /* (G17) mmc0_clk.mmc0_clk */
    AM33XX_IOPAD(0x904, PIN_INPUT_PULLUP | MUX_MODE0) /* (G18) mmc0_cmd.mmc0_cmd */
    AM33XX_IOPAD(0x8fc, PIN_INPUT_PULLUP | MUX_MODE0) /* (G16) mmc0_dat0.mmc0_dat0 */
    AM33XX_IOPAD(0x8f8, PIN_INPUT_PULLUP | MUX_MODE0) /* (G15) mmc0_dat1.mmc0_dat1 */
    AM33XX_IOPAD(0x8f4, PIN_INPUT_PULLUP | MUX_MODE0) /* (F18) mmc0_dat2.mmc0_dat2 */
    AM33XX_IOPAD(0x8f0, PIN_INPUT_PULLUP | MUX_MODE0) /* (F17) mmc0_dat3.mmc0_dat3 */
    AM33XX_IOPAD(0x960, PIN_INPUT | MUX_MODE7) /* (C15) spi0_cs1.mmc0_sdcd gpio0_6*/
    >;
    };

    dcan0_pins_default: dcan0_pins_default {
    pinctrl-single,pins = <
    AM33XX_IOPAD(0x920, PIN_INPUT_PULLDOWN | MUX_MODE1) /* (K15) gmii1_txd2.dcan0_rx */
    AM33XX_IOPAD(0x91c, PIN_OUTPUT_PULLUP | MUX_MODE1) /* (J18) gmii1_txd3.dcan0_tx */
    >;
    };

    dcan1_pins_default: dcan1_pins_default {
    pinctrl-single,pins = <
    AM33XX_IOPAD(0x96c, PIN_INPUT_PULLDOWN | MUX_MODE2) /* (E17) uart0_rtsn.dcan1_rx */
    AM33XX_IOPAD(0x968, PIN_OUTPUT_PULLUP | MUX_MODE2) /* (E18) uart0_ctsn.dcan1_tx */
    >;
    };



    spi0_pins_default: spi0_pins_default {
    pinctrl-single,pins = <
    AM33XX_IOPAD(0x950, PIN_INPUT_PULLUP | MUX_MODE0) /* (A17) spi0_sclk.spi0_sclk */
    AM33XX_IOPAD(0x954, PIN_INPUT_PULLUP | MUX_MODE0) /* (B17) spi0_d0.spi0_d0 */
    AM33XX_IOPAD(0x958, PIN_OUTPUT_PULLUP | MUX_MODE0) /* (B16) spi0_d1.spi0_d1 */
    AM33XX_IOPAD(0x95c, PIN_OUTPUT_PULLUP | MUX_MODE0) /* (A16) spi0_cs0.spi0_cs0 */
    >;
    };
    lcd_pins_s0: lcd_pins_s0 {
    pinctrl-single,pins = <
    AM33XX_IOPAD(0x820, PIN_OUTPUT | MUX_MODE1) /* gpmc_ad8.lcd_data23 */
    AM33XX_IOPAD(0x824, PIN_OUTPUT | MUX_MODE1) /* gpmc_ad9.lcd_data22 */
    AM33XX_IOPAD(0x828, PIN_OUTPUT | MUX_MODE1) /* gpmc_ad10.lcd_data21 */
    AM33XX_IOPAD(0x82c, PIN_OUTPUT | MUX_MODE1) /* gpmc_ad11.lcd_data20 */
    AM33XX_IOPAD(0x830, PIN_OUTPUT | MUX_MODE1) /* gpmc_ad12.lcd_data19 */
    AM33XX_IOPAD(0x834, PIN_OUTPUT | MUX_MODE1) /* gpmc_ad13.lcd_data18 */
    AM33XX_IOPAD(0x838, PIN_OUTPUT | MUX_MODE1) /* gpmc_ad14.lcd_data17 */
    AM33XX_IOPAD(0x83c, PIN_OUTPUT | MUX_MODE1) /* gpmc_ad15.lcd_data16 */
    AM33XX_IOPAD(0x8a0, PIN_OUTPUT | MUX_MODE0) /* lcd_data0.lcd_data0 */
    AM33XX_IOPAD(0x8a4, PIN_OUTPUT | MUX_MODE0) /* lcd_data1.lcd_data1 */
    AM33XX_IOPAD(0x8a8, PIN_OUTPUT | MUX_MODE0) /* lcd_data2.lcd_data2 */
    AM33XX_IOPAD(0x8ac, PIN_OUTPUT | MUX_MODE0) /* lcd_data3.lcd_data3 */
    AM33XX_IOPAD(0x8b0, PIN_OUTPUT | MUX_MODE0) /* lcd_data4.lcd_data4 */
    AM33XX_IOPAD(0x8b4, PIN_OUTPUT | MUX_MODE0) /* lcd_data5.lcd_data5 */
    AM33XX_IOPAD(0x8b8, PIN_OUTPUT | MUX_MODE0) /* lcd_data6.lcd_data6 */
    AM33XX_IOPAD(0x8bc, PIN_OUTPUT | MUX_MODE0) /* lcd_data7.lcd_data7 */
    AM33XX_IOPAD(0x8c0, PIN_OUTPUT | MUX_MODE0) /* lcd_data8.lcd_data8 */
    AM33XX_IOPAD(0x8c4, PIN_OUTPUT | MUX_MODE0) /* lcd_data9.lcd_data9 */
    AM33XX_IOPAD(0x8c8, PIN_OUTPUT | MUX_MODE0) /* lcd_data10.lcd_data10 */
    AM33XX_IOPAD(0x8cc, PIN_OUTPUT | MUX_MODE0) /* lcd_data11.lcd_data11 */
    AM33XX_IOPAD(0x8d0, PIN_OUTPUT | MUX_MODE0) /* lcd_data12.lcd_data12 */
    AM33XX_IOPAD(0x8d4, PIN_OUTPUT | MUX_MODE0) /* lcd_data13.lcd_data13 */
    AM33XX_IOPAD(0x8d8, PIN_OUTPUT | MUX_MODE0) /* lcd_data14.lcd_data14 */
    AM33XX_IOPAD(0x8dc, PIN_OUTPUT | MUX_MODE0) /* lcd_data15.lcd_data15 */
    AM33XX_IOPAD(0x8e0, PIN_OUTPUT | MUX_MODE0) /* lcd_vsync.lcd_vsync */
    AM33XX_IOPAD(0x8e4, PIN_OUTPUT | MUX_MODE0) /* lcd_hsync.lcd_hsync */
    AM33XX_IOPAD(0x8e8, PIN_OUTPUT | MUX_MODE0) /* lcd_pclk.lcd_pclk */
    AM33XX_IOPAD(0x8ec, PIN_OUTPUT | MUX_MODE0) /* lcd_ac_bias_en.lcd_ac_bias_en */
    >;
    };

    lcd_pins_sleep: lcd_pins_sleep {
    pinctrl-single,pins = <
    AM33XX_IOPAD(0x820, PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_ad8.lcd_data23 */
    AM33XX_IOPAD(0x824, PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_ad9.lcd_data22 */
    AM33XX_IOPAD(0x828, PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_ad10.lcd_data21 */
    AM33XX_IOPAD(0x82c, PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_ad11.lcd_data20 */
    AM33XX_IOPAD(0x830, PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_ad12.lcd_data19 */
    AM33XX_IOPAD(0x834, PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_ad13.lcd_data18 */
    AM33XX_IOPAD(0x838, PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_ad14.lcd_data17 */
    AM33XX_IOPAD(0x83c, PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_ad15.lcd_data16 */
    AM33XX_IOPAD(0x8a0, PULL_DISABLE | MUX_MODE7) /* lcd_data0.lcd_data0 */
    AM33XX_IOPAD(0x8a4, PULL_DISABLE | MUX_MODE7) /* lcd_data1.lcd_data1 */
    AM33XX_IOPAD(0x8a8, PULL_DISABLE | MUX_MODE7) /* lcd_data2.lcd_data2 */
    AM33XX_IOPAD(0x8ac, PULL_DISABLE | MUX_MODE7) /* lcd_data3.lcd_data3 */
    AM33XX_IOPAD(0x8b0, PULL_DISABLE | MUX_MODE7) /* lcd_data4.lcd_data4 */
    AM33XX_IOPAD(0x8b4, PULL_DISABLE | MUX_MODE7) /* lcd_data5.lcd_data5 */
    AM33XX_IOPAD(0x8b8, PULL_DISABLE | MUX_MODE7) /* lcd_data6.lcd_data6 */
    AM33XX_IOPAD(0x8bc, PULL_DISABLE | MUX_MODE7) /* lcd_data7.lcd_data7 */
    AM33XX_IOPAD(0x8c0, PULL_DISABLE | MUX_MODE7) /* lcd_data8.lcd_data8 */
    AM33XX_IOPAD(0x8c4, PULL_DISABLE | MUX_MODE7) /* lcd_data9.lcd_data9 */
    AM33XX_IOPAD(0x8c8, PULL_DISABLE | MUX_MODE7) /* lcd_data10.lcd_data10 */
    AM33XX_IOPAD(0x8cc, PULL_DISABLE | MUX_MODE7) /* lcd_data11.lcd_data11 */
    AM33XX_IOPAD(0x8d0, PULL_DISABLE | MUX_MODE7) /* lcd_data12.lcd_data12 */
    AM33XX_IOPAD(0x8d4, PULL_DISABLE | MUX_MODE7) /* lcd_data13.lcd_data13 */
    AM33XX_IOPAD(0x8d8, PULL_DISABLE | MUX_MODE7) /* lcd_data14.lcd_data14 */
    AM33XX_IOPAD(0x8dc, PULL_DISABLE | MUX_MODE7) /* lcd_data15.lcd_data15 */
    AM33XX_IOPAD(0x8e0, PIN_INPUT_PULLDOWN | MUX_MODE7) /* lcd_vsync.lcd_vsync */
    AM33XX_IOPAD(0x8e4, PIN_INPUT_PULLDOWN | MUX_MODE7) /* lcd_hsync.lcd_hsync */
    AM33XX_IOPAD(0x8e8, PIN_INPUT_PULLDOWN | MUX_MODE7) /* lcd_pclk.lcd_pclk */
    AM33XX_IOPAD(0x8ec, PIN_INPUT_PULLDOWN | MUX_MODE7) /* lcd_ac_bias_en.lcd_ac_bias_en */
    >;
    };

    ehrpwm1_pins: ehrpwm1_pins {
    pinctrl-single,pins = <
    0x048 (PIN_OUTPUT | MUX_MODE6) /* GPMC_A2.eHRPWM1A */
    >;
    };
    };
    #if 0
    &gpio2 {
    ti,no-reset-on-init;
    gpios = <&gpio2 1 GPIO_ACTIVE_HIGH>;
    };


    &gpio2 {
    pinctrl-names = "default";
    pinctrl-0 = <&gpio2_pins_default>;
    gpios = <&gpio2 1 GPIO_ACTIVE_HIGH>;
    status = "okay";
    };
    #endif
    &gpio3 {
    ti,no-reset-on-init;
    gpios = <&gpio3 17 GPIO_ACTIVE_LOW>;
    };

    &uart0 {
    pinctrl-names = "default";
    pinctrl-0 = <&uart0_pins_default>;

    status = "okay";
    };

    &uart1 {
    pinctrl-names = "default";
    pinctrl-0 = <&uart1_pins_default>;

    status = "okay";
    };

    &uart2 {
    pinctrl-names = "default";
    pinctrl-0 = <&uart2_pins_default>;

    status = "okay";
    };

    &uart3 {
    pinctrl-names = "default";
    pinctrl-0 = <&uart3_pins_default>;

    status = "okay";
    };

    &uart5 {
    pinctrl-names = "default";
    pinctrl-0 = <&uart5_pins_default>;

    status = "okay";
    };

    &i2c0 {
    pinctrl-names = "default";
    pinctrl-0 = <&i2c0_pins_default>;

    status = "okay";
    clock-frequency = <400000>;

    tps: tps@2d {
    reg = <0x2d>;
    };
    };


    &usb {
    status = "okay";
    };

    &usb_ctrl_mod {
    status = "okay";
    };

    &usb0_phy {
    status = "okay";
    };

    &usb1_phy {
    status = "okay";
    };

    &usb0 {
    status = "okay";
    };

    &usb1 {
    status = "okay";
    dr_mode = "host";
    };

    &cppi41dma {
    status = "okay";
    };

    &elm {
    status = "okay";
    };


    &epwmss2 {
    status = "okay";

    ecap2: ecap@48304100 {
    status = "okay";
    pinctrl-names = "default";
    pinctrl-0 = <&ecap2_pins>;
    };
    };

    &gpmc {
    status = "okay";
    pinctrl-names = "default", "sleep";
    pinctrl-0 = <&nandflash_pins_default>;
    pinctrl-1 = <&nandflash_pins_sleep>;
    /*ranges = <0 0 0x08000000 0x10000000>;*/ /* CS0: NAND */
    ranges = <0 0 0x08000000 0x80000000>; /*+++ Seamus,NAND,20190318 ---*/
    nand@0,0 {
    compatible = "ti,omap2-nand";
    reg = <0 0 4>; /* CS0, offset 0, IO size 4 */
    interrupt-parent = <&gpmc>;
    interrupts = <0 IRQ_TYPE_NONE>, /* fifoevent */
    <1 IRQ_TYPE_NONE>; /* termcount */
    rb-gpios = <&gpmc 0 GPIO_ACTIVE_HIGH>; /* gpmc_wait0 */
    ti,nand-ecc-opt = "bch16";
    ti,elm-id = <&elm>;
    nand-bus-width = <8>;
    gpmc,device-width = <1>;
    gpmc,sync-clk-ps = <0>;
    gpmc,cs-on-ns = <0>;
    gpmc,cs-rd-off-ns = <44>;
    gpmc,cs-wr-off-ns = <44>;
    gpmc,adv-on-ns = <6>;
    gpmc,adv-rd-off-ns = <34>;
    gpmc,adv-wr-off-ns = <44>;
    gpmc,we-on-ns = <0>;
    gpmc,we-off-ns = <40>;
    gpmc,oe-on-ns = <0>;
    gpmc,oe-off-ns = <54>;
    gpmc,access-ns = <64>;
    gpmc,rd-cycle-ns = <82>;
    gpmc,wr-cycle-ns = <82>;
    gpmc,wait-on-read = "true";
    gpmc,wait-on-write = "true";
    gpmc,bus-turnaround-ns = <0>;
    gpmc,cycle2cycle-delay-ns = <0>;
    gpmc,clk-activation-ns = <0>;
    gpmc,wait-monitoring-ns = <0>;
    gpmc,wr-access-ns = <40>;
    gpmc,wr-data-mux-bus-ns = <0>;
    /* MTD partition table */
    /* All SPL-* partitions are sized to minimal length
    * which can be independently programmable. For
    * NAND flash this is equal to size of erase-block */
    #address-cells = <1>;
    #size-cells = <1>;
    partition@0 {
    label = "NAND.SPL";
    reg = <0x00000000 0x00080000>; /* 512KB */
    };
    partition@1 {
    label = "NAND.SPL.backup1";
    reg = <0x00080000 0x00080000>; /* 512KB */
    };
    partition@2 {
    label = "NAND.SPL.backup2";
    reg = <0x00100000 0x00080000>; /* 512KB */
    };
    partition@3 {
    label = "NAND.SPL.backup3";
    reg = <0x00180000 0x00080000>; /* 512KB */
    };
    partition@4 {
    label = "NAND.kernel-fdt";
    reg = <0x00200000 0x00080000>; /* 512KB */
    };
    partition@5 {
    label = "NAND.u-boot";
    reg = <0x00280000 0x00100000>; /* 1MB */
    };
    partition@6 {
    label = "NAND.u-boot-env"; /* 512KB */
    reg = <0x00380000 0x00080000>;
    };
    partition@7 {
    label = "Primary kernel";
    reg = <0x00400000 0x00A00000>;
    };
    partition@8 {
    label = "Secondary kernel";
    reg = <0x00E00000 0x00A00000>;
    };
    partition@9 {
    label = "Primary rootfs";
    reg = <0x01800000 0x01800000>;
    };
    partition@10 {
    label = "Secondary rootfs";
    reg = <0x03000000 0x01800000>;
    };
    partition@11 {
    label = "Primary user configuration";
    reg = <0x04800000 0x00600000>;
    };
    partition@12 {
    label = "Secondary user configuration";
    reg = <0x04E00000 0x00600000>;
    };
    partition@13 {
    label = "Factory default configuration";
    reg = <0x05400000 0x00600000>;
    };
    partition@14 {
    label = "Storage";
    reg = <0x05A00000 0x7A600000>;
    };
    };
    };


    #include "tps65910.dtsi"
    #if 0
    &mcasp1 {
    #sound-dai-cells = <0>;
    pinctrl-names = "default", "sleep";
    pinctrl-0 = <&mcasp1_pins>;
    pinctrl-1 = <&mcasp1_pins_sleep>;

    status = "okay";

    op-mode = <0>; /* MCASP_IIS_MODE */
    tdm-slots = <2>;
    /* 4 serializers */
    serial-dir = < /* 0: INACTIVE, 1: TX, 2: RX */
    0 0 1 2
    >;
    tx-num-evt = <32>;
    rx-num-evt = <32>;
    };
    #endif

    &tps {
    vcc1-supply = <&vbat>;
    vcc2-supply = <&vbat>;
    vcc3-supply = <&vbat>;
    vcc4-supply = <&vbat>;
    vcc5-supply = <&vbat>;
    vcc6-supply = <&vbat>;
    vcc7-supply = <&vbat>;
    vccio-supply = <&vbat>;

    regulators {
    vrtc_reg: regulator@0 {
    regulator-always-on;
    };

    vio_reg: regulator@1 {
    regulator-always-on;
    };

    vdd1_reg: regulator@2 {
    /* VDD_MPU voltage limits 0.95V - 1.325V with +/-4% tolerance */
    regulator-name = "vdd_mpu";
    regulator-min-microvolt = <912500>;
    regulator-max-microvolt = <1378000>;
    regulator-boot-on;
    regulator-always-on;
    };

    vdd2_reg: regulator@3 {
    /* VDD_CORE voltage limits 0.95V - 1.1V with +/-4% tolerance */
    regulator-name = "vdd_core";
    regulator-min-microvolt = <912500>;
    regulator-max-microvolt = <1150000>;
    regulator-boot-on;
    regulator-always-on;
    };

    vdd3_reg: regulator@4 {
    regulator-always-on;
    };

    vdig1_reg: regulator@5 {
    regulator-always-on;
    };

    vdig2_reg: regulator@6 {
    regulator-always-on;
    };

    vpll_reg: regulator@7 {
    regulator-always-on;
    };

    vdac_reg: regulator@8 {
    regulator-always-on;
    };

    vaux1_reg: regulator@9 {
    regulator-always-on;
    };

    vaux2_reg: regulator@10 {
    regulator-always-on;
    };

    vaux33_reg: regulator@11 {
    regulator-always-on;
    };

    vmmc_reg: regulator@12 {
    regulator-min-microvolt = <1800000>;
    regulator-max-microvolt = <3300000>;
    regulator-always-on;
    };
    };
    };

    &mac {
    pinctrl-names = "default", "sleep";
    pinctrl-0 = <&cpsw_default>;
    pinctrl-1 = <&cpsw_sleep>;
    status = "okay";
    dual_emac;
    };

    &davinci_mdio {
    pinctrl-names = "default", "sleep";
    pinctrl-0 = <&davinci_mdio_default>;
    pinctrl-1 = <&davinci_mdio_sleep>;
    status = "okay";
    };

    &cpsw_emac0 {
    phy_id = <&davinci_mdio>, <2>;
    phy-mode = "rmii";
    };

    &cpsw_emac1 {
    phy_id = <&davinci_mdio>, <3>;
    phy-mode = "rmii";
    };

    &tscadc {
    status = "okay";
    tsc {
    ti,wires = <4>;
    ti,x-plate-resistance = <200>;
    ti,coordinate-readouts = <5>;
    ti,wire-config = <0x00 0x11 0x22 0x33>;
    ti,charge-delay = <0x400>;
    };

    adc {
    ti,adc-channels = <4 5 6 7>;
    };
    };

    /* Miscro SD */
    &mmc1 {
    status = "okay";
    vmmc-supply = <&vmmc_reg>;
    bus-width = <4>;
    pinctrl-names = "default";
    pinctrl-0 = <&mmc1_pins>;
    cd-gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
    };

    &sham {
    status = "okay";
    };

    &aes {
    status = "okay";
    };

    &wkup_m3_ipc {
    ti,scale-data-fw = "am335x-evm-scale-data.bin";
    };

    &dcan0 {
    status = "okay";
    pinctrl-names = "default";
    pinctrl-0 = <&dcan0_pins_default>;
    };

    &dcan1 {
    status = "okay";
    pinctrl-names = "default";
    pinctrl-0 = <&dcan1_pins_default>;
    };
    #if 0
    &epwmss1 {
    status = "okay";

    ehrpwm1: pwm@48302200 {
    status = "okay";
    pinctrl-names = "default";
    pinctrl-0 = <&ehrpwm1_pins>;
    };
    };
    #endif
    /*
    The QCA7000 acts as a SPI slave and uses Mode 3: CPOL=1, CPHA=1.
    SPI data width is 8 bit. The SPI CLK period should not be less than 83.3 ns
    The SPI should be used in burst mode, meaning that the chip select is held low during a complete SPI message.
    Note: The SPI lines between Host CPU and QCA7000 should be kept as short as possible.

    */
    /* Green PHY (QCA7000) */
    &spi0 {
    status = "okay";
    pinctrl-names = "default";
    pinctrl-0 = <&spi0_pins_default>;

    qca7000: ethernet@0 {
    reg = <0x0>;
    compatible = "qca,qca7000";
    interrupt-parent = <&gpio0>;
    interrupts = <19 IRQ_TYPE_EDGE_RISING>;
    spi-cpha;
    spi-cpol;
    spi-max-frequency = <10000000>;
    local-mac-address = [ A0 B0 C0 D0 E0 F0 ];
    status = "okay";
    };
    };
    #if 1
    &lcdc {
    status = "okay";

    blue-and-red-wiring = "crossed";
    };
    #endif

    #if 0
    &rtc {
    clocks = <&clk_32768_ck>, <&clkdiv32k_ick>;
    clock-names = "ext-clk", "int-clk";
    };


    &pruss_soc_bus {
    status = "okay";

    pruss: pruss@0 {
    status = "okay";
    };
    };

    &sgx {
    status = "okay";
    };
    #endif

  • Hi

    I attached DTS and script at Dec 3 

    Please reply me ASAP, if you got any idea.

    Thanks

  • Hello,

    Could you please share the Kernel panic with the following symbols enabled: CONFIG_DEBUG_KERNEL=y and CONFIG_FRAME_POINTER=y?

    Regards,
    Krunal

  • Already enable by default config. 

    config.config

  • Hi Krunal.

    Compare the boot log with AM335x Started Kit. Our log missing the below highlight part. Does it effect the lcd control?

    Apr  6 01:44:37 am335x-evm user.info kernel: [    0.952131] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).

    Apr  6 01:44:37 am335x-evm user.info kernel: [    0.958809] [drm] No driver support for vblank timestamp query.

    Apr  6 01:44:37 am335x-evm user.info kernel: [    1.008009] Console: switching to colour frame buffer device 60x34

    Apr  6 01:44:37 am335x-evm user.info kernel: [    1.031881] tilcdc 4830e000.lcdc: fb0:  frame buffer device

    Apr  6 01:44:37 am335x-evm user.info kernel: [    1.038031] [drm] Initialized tilcdc 1.0.0 20121205 for 4830e000.lcdc on minor 0

    Apr  6 01:44:37 am335x-evm user.info kernel: [    1.056223] brd: module loaded

    Apr  6 01:44:37 am335x-evm user.info kernel: [    1.065827] loop: module loaded

    Thanks

  • I set log level (echo 7 > /proc/sys/kernel/printk) before test LCD. Please reference the attachment.

    Thankskernel_panic_1206.log

  • Hello,

    Does your application work on the AM335x Started Kit?

    Regards,
    Krunal

  • Hello,

    I am wondering if you have any updates and are you able to replicate your issues on a TI board?

    Regards,
    Krunal

  • Hi Krunal,

    I run our task overnight in AM335x start kit and it work well. 

    The attachment is the memtester log in our board (AM3352). It seems abnormal.

    Thanks.

    Jason

    / # ps
    PID   USER     TIME   COMMAND
        1 root       0:04 init
        2 root       0:00 [kthreadd]
        3 root       0:00 [ksoftirqd/0]
        5 root       0:00 [kworker/0:0H]
        7 root       0:00 [rcu_preempt]
        8 root       0:00 [rcu_sched]
        9 root       0:00 [rcu_bh]
       10 root       0:00 [lru-add-drain]
       11 root       0:00 [kdevtmpfs]
       12 root       0:00 [netns]
       13 root       0:01 [kworker/0:1]
       14 root       0:00 [oom_reaper]
       15 root       0:00 [writeback]
       16 root       0:00 [kcompactd0]
       17 root       0:00 [crypto]
       18 root       0:00 [bioset]
       19 root       0:00 [kblockd]
       20 root       0:00 [tifm]
       21 root       0:00 [edac-poller]
       22 root       0:00 [cfg80211]
       23 root       0:00 [watchdogd]
       24 root       0:00 [kswapd0]
       48 root       0:00 [kpcitest]
       49 root       0:00 [kworker/u2:1]
       50 root       0:00 [bioset]
       51 root       0:00 [bioset]
       52 root       0:00 [bioset]
       53 root       0:00 [bioset]
       54 root       0:00 [bioset]
       55 root       0:00 [bioset]
       56 root       0:00 [bioset]
       57 root       0:00 [bioset]
       58 root       0:00 [bioset]
       59 root       0:00 [spi1]
       73 root       0:00 [kvub300c]
       74 root       0:00 [kvub300p]
       75 root       0:00 [kvub300d]
       76 root       0:00 [irq/183-TI-am33]
       77 root       0:00 [ipv6_addrconf]
       78 root       0:00 [bioset]
       79 root       0:00 [bioset]
       80 root       0:00 [bioset]
       81 root       0:00 [bioset]
       82 root       0:00 [bioset]
       83 root       0:00 [bioset]
       84 root       0:00 [bioset]
       85 root       0:00 [bioset]
       86 root       0:00 [bioset]
       87 root       0:00 [bioset]
       88 root       0:00 [bioset]
       89 root       0:00 [bioset]
       90 root       0:00 [bioset]
       91 root       0:00 [bioset]
       92 root       0:00 [bioset]
       94 root       0:00 [irq/163-44e0b00]
       95 root       0:00 [irq/33-48060000]
       97 root       0:00 [ext4-rsv-conver]
      111 root       0:00 [jffs2_gcd_mtd13]
      118 root       0:00 -/bin/ash
      139 root       0:00 [kworker/0:1H]
      170 root       0:00 [kworker/0:2]
      183 root       0:00 [kworker/u2:2]
      189 root       0:00 [kworker/0:0]
      191 root       0:00 [bioset]
      192 root       0:00 [mmcqd/0]
      197 root       0:00 [kworker/u2:0]
      202 root       0:00 ps
    / # cat /proc/meminfo
    MemTotal:         506012 kB
    MemFree:          418404 kB
    MemAvailable:     420324 kB
    Buffers:             392 kB
    Cached:             6376 kB
    SwapCached:            0 kB
    Active:             2336 kB
    Inactive:           4556 kB
    Active(anon):        124 kB
    Inactive(anon):        0 kB
    Active(file):       2212 kB
    Inactive(file):     4556 kB
    Unevictable:           0 kB
    Mlocked:               0 kB
    HighTotal:             0 kB
    HighFree:              0 kB
    LowTotal:         506012 kB
    LowFree:          418404 kB
    SwapTotal:             0 kB
    SwapFree:              0 kB
    Dirty:                20 kB
    Writeback:             0 kB
    AnonPages:           152 kB
    Mapped:             1056 kB
    Shmem:                 0 kB
    Slab:              10416 kB
    SReclaimable:       4544 kB
    SUnreclaim:         5872 kB
    KernelStack:         536 kB
    PageTables:           28 kB
    NFS_Unstable:          0 kB
    Bounce:                0 kB
    WritebackTmp:          0 kB
    CommitLimit:      253004 kB
    Committed_AS:        856 kB
    VmallocTotal:     507904 kB
    VmallocUsed:           0 kB
    VmallocChunk:          0 kB
    CmaTotal:          49152 kB
    CmaFree:           47380 kB
    / # ./memtester 400M 1
    memtester version 4.3.0 (32-bit)
    Copyright (C) 2001-2012 Charles Cazabon.
    Licensed under the GNU General Public License version 2 (only).
    
    pagesize is 4096
    pagesizemask is 0xfffff000
    want 400MB (419430400 bytes)
    got  400MB (419430400 bytes), trying mlock ...locked.
    Loop 1/1:
      Stuck Address       : testing   0FAILURE: possible bad address line at offset 0x095f6e68.
    Skipping to next test...
      Random Value        : FAILURE: 0x7ebd8d04 != 0x7ebd8d14 at offset 0x015667c0.
    FAILURE: 0x6fcfb33d != 0x6fcfb31d at offset 0x0306d608.
    FAILURE: 0xff5f0970 != 0xff5f0950 at offset 0x04729a34.
    FAILURE: 0xb6cd4160 != 0xb6cd4140 at offset 0x05f26a68.
    FAILURE: 0x2bf71200 != 0x2bf71220 at offset 0x085f5260.
    FAILURE: 0xfc9f6d29 != 0xfc9f6d09 at offset 0x0a10e060.
    FAILURE: 0x158e5d9f != 0x158e5dbf at offset 0x01669de0.
    FAILURE: 0x371c9ceb != 0x371c9ccb at offset 0x0266c54c.
    FAILURE: 0x00542aaf != 0x00742aaf at offset 0x0287effc.
    FAILURE: 0x6266f880 != 0x6266f8a0 at offset 0x04c80abc.
    FAILURE: 0xcd48f4e7 != 0xcd48f4c7 at offset 0x0642e098.
    FAILURE: 0x55cdb093 != 0x55cdb0b3 at offset 0x06f0934c.
    FAILURE: 0xc0446a27 != 0xc0446a17 at offset 0x08e0c580.
    FAILURE: 0xa44659d1 != 0xa44659f1 at offset 0x0b1ce084.
      Compare XOR         : FAILURE: 0xa134f7f5 != 0xa134f815 at offset 0x01669de0.
    FAILURE: 0xc2c33741 != 0xc2c33721 at offset 0x0266c54c.
    FAILURE: 0x20bc4432 != 0x20bc4412 at offset 0x029db004.
    FAILURE: 0xee0d92d6 != 0xee0d92f6 at offset 0x04c80abc.
    FAILURE: 0x58ef8f3d != 0x58ef8f1d at offset 0x0642e098.
    FAILURE: 0xe1744ae9 != 0xe1744b09 at offset 0x06f0934c.
    FAILURE: 0x4beb047d != 0x4beb046d at offset 0x08e0c580.
    FAILURE: 0xac7b01b8 != 0xac7b0180 at offset 0x095ec67c.
    FAILURE: 0x91c6cd54 != 0x91a6cd54 at offset 0x09a466c4.
    FAILURE: 0x8cec6350 != 0x8cec6370 at offset 0x0ade8104.
    FAILURE: 0x2fecf427 != 0x2fecf447 at offset 0x0b1ce084.
      Compare SUB         : FAILURE: 0xcaab8ede != 0x79e9639e at offset 0x01669de0.
    FAILURE: 0x12ad4226 != 0x636f6d66 at offset 0x0266c54c.
    FAILURE: 0xdac4025c != 0xdac4027c at offset 0x034e6e8c.
    FAILURE: 0x80762ac4 != 0x2fb3ff84 at offset 0x04c80abc.
    FAILURE: 0x8f56978e != 0xe018c2ce at offset 0x0642e098.
    FAILURE: 0x6c2e3116 != 0x1b6c05d6 at offset 0x06f0934c.
    FAILURE: 0x90a61f0e != 0xb90734ae at offset 0x08e0c580.
    FAILURE: 0x2a813c78 != 0x55c13c78 at offset 0x09a466c4.
    FAILURE: 0xaa15626c != 0xaa15624c at offset 0x09d8ee64.
    FAILURE: 0xe011934a != 0x8f4f680a at offset 0x0b1ce084.
      Compare MUL         : FAILURE: 0x00000001 != 0x00000000 at offset 0x01669de0.
    FAILURE: 0x00000000 != 0x00000001 at offset 0x0642e098.
    FAILURE: 0x00000000 != 0x00000001 at offset 0x08e0c580.
    FAILURE: 0x00000001 != 0x00000000 at offset 0x0b1ce084.
      Compare DIV         : FAILURE: 0x35be0c66 != 0x35be0c46 at offset 0x00b5932c.
    FAILURE: 0x35be0c67 != 0x35be0c66 at offset 0x01669de0.
    FAILURE: 0x35be0c46 != 0x35be0c66 at offset 0x027de704.
    FAILURE: 0x35be0c66 != 0x35be0c46 at offset 0x02ad94fc.
    FAILURE: 0x35be0c46 != 0x35be0c66 at offset 0x0384ea88.
    FAILURE: 0x35be0c66 != 0x35be0c46 at offset 0x0414dbf4.
    FAILURE: 0x35be0c66 != 0x35be0c46 at offset 0x04449a34.
    FAILURE: 0x35be0c66 != 0x35be0c46 at offset 0x04bc7440.
    FAILURE: 0x35be0c46 != 0x35be0c66 at offset 0x04d406b0.
    FAILURE: 0x35be0c66 != 0x35be0c67 at offset 0x0642e098.
    FAILURE: 0x35be0c66 != 0x35be0c46 at offset 0x06fbb8a4.
    FAILURE: 0x35be0c66 != 0x35be0c67 at offset 0x08e0c580.
    FAILURE: 0x35be0c67 != 0x35be0c47 at offset 0x09fc7440.
    FAILURE: 0x35be0c67 != 0x35be0c66 at offset 0x0b1ce084.
    FAILURE: 0x35be0c66 != 0x35be0c46 at offset 0x0b4c2990.
    FAILURE: 0x35be0c66 != 0x35be0c46 at offset 0x0b7bdc64.
    FAILURE: 0x35be0c46 != 0x35be0c66 at offset 0x0baba280.
    FAILURE: 0x35be0c66 != 0x35be0c46 at offset 0x0c238360.
      Compare OR          : FAILURE: 0x15be0847 != 0x15be0846 at offset 0x01669de0.
    FAILURE: 0x15be0846 != 0x15be0847 at offset 0x0642e098.
    FAILURE: 0x15be0846 != 0x15be0847 at offset 0x08e0c580.
    FAILURE: 0x15be0847 != 0x15be0846 at offset 0x0b1ce084.
      Compare AND         : [ 1964.266660] tilcdc_crtc_irq: 32 callbacks suppressed
    [ 1964.266687] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000020): FIFO underflow
    [ 1964.278963] tilcdc_crtc_irq: 50 callbacks suppressed
    [ 1964.278974] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000104): Sync lost
    [ 1964.291663] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost
    [ 1964.298427] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost
    [ 1964.306776] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost
    [ 1964.313528] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost
    [ 1964.321891] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost
    [ 1964.328625] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost
    [ 1964.337004] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost
    [ 1964.343754] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost
    [ 1964.352119] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost
    [ 1964.361913] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000020): FIFO underflow
    [ 1964.374815] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000020): FIFO underflow
    [ 1964.399671] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000020): FIFO underflow
    [ 1964.408528] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000020): FIFO underflow
    [ 1964.431629] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000020): FIFO underflow
    [ 1964.468520] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000020): FIFO underflow
    [ 1964.521673] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000020): FIFO underflow
    [ 1964.531801] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000020): FIFO underflow
    [ 1964.562205] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000020): FIFO underflow
    FAILURE: 0xcffa8a61 != 0xcffa8a41 at offset 0x08574eac.
      Sequential Increment:   Solid Bits          : setting   1[ 1970.052538] tilcdc_crtc_irq: 67 callbacks suppressed
    [ 1970.052563] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000020): FIFO underflow
    [ 1970.065461] tilcdc_crtc_irq: 114 callbacks suppressed
    [ 1970.065470] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost
    [ 1970.077296] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost
    [ 1970.084053] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000104): Sync lost
    [ 1970.091163] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000020): FIFO underflow
    [ 1970.098358] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000104): Sync lost
    [ 1970.113013] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000020): FIFO underflow
    [ 1970.122337] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000020): FIFO underflow
    [ 1970.129515] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000104): Sync lost
    [ 1970.147678] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000020): FIFO underflow
    [ 1970.156151] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost
    [ 1970.162901] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost
    [ 1970.179663] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000020): FIFO underflow
    [ 1970.186856] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000104): Sync lost
    [ 1970.193605] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost
    [ 1970.201495] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost
    [ 1970.214859] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000020): FIFO underflow
    [ 1970.232933] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000020): FIFO underflow
    [ 1970.241666] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000020): FIFO underflow
    [ 1970.270644] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000020): FIFO underflow
    testing   1[ 1971.350947] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost flood detected, recovering
    [ 1971.360192] tilcdc 4830e000.lcdc: tilcdc_crtc_recover_work: Reset CRTC
    setting   3[ 1975.815442] tilcdc_crtc_irq: 86 callbacks suppressed
    [ 1975.815468] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000020): FIFO underflow
    [ 1975.827726] tilcdc_crtc_irq: 150 callbacks suppressed
    [ 1975.827735] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000104): Sync lost
    [ 1975.846483] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000020): FIFO underflow
    [ 1975.855257] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost
    [ 1975.862007] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost
    [ 1975.868943] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000020): FIFO underflow
    [ 1975.876132] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000104): Sync lost
    [ 1975.918650] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000020): FIFO underflow
    [ 1975.930833] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost
    [ 1975.937596] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost
    [ 1975.950479] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000020): FIFO underflow
    [ 1975.961060] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost
    [ 1975.967810] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost
    [ 1975.976174] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost
    [ 1975.982923] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost
    [ 1975.999520] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000020): FIFO underflow
    [ 1976.027446] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000020): FIFO underflow
    [ 1976.071659] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000020): FIFO underflow
    [ 1976.085316] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000020): FIFO underflow
    [ 1976.155402] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000020): FIFO underflow
    setting   5[ 1981.592660] tilcdc_crtc_irq: 60 callbacks suppressed
    [ 1981.592684] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000020): FIFO underflow
    [ 1981.604892] tilcdc_crtc_irq: 94 callbacks suppressed
    [ 1981.604900] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000104): Sync lost
    [ 1981.617051] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000020): FIFO underflow
    [ 1981.625452] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000020): FIFO underflow
    [ 1981.632646] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000104): Sync lost
    [ 1981.658718] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000020): FIFO underflow
    [ 1981.665918] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000104): Sync lost
    [ 1981.679044] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000020): FIFO underflow
    [ 1981.689518] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost
    [ 1981.696271] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost
    [ 1981.739136] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000020): FIFO underflow
    [ 1981.749978] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost
    [ 1981.756729] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost
    [ 1981.769100] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000020): FIFO underflow
    [ 1981.780208] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost
    [ 1981.786958] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost
    [ 1981.795321] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost
    [ 1981.825077] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000020): FIFO underflow
    [ 1981.844231] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000020): FIFO underflow
    [ 1981.852953] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000020): FIFO underflow
    setting   7[ 1987.347168] tilcdc_crtc_irq: 62 callbacks suppressed
    [ 1987.347193] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000020): FIFO underflow
    [ 1987.359472] tilcdc_crtc_irq: 91 callbacks suppressed
    [ 1987.359481] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000104): Sync lost
    [ 1987.383833] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000020): FIFO underflow
    [ 1987.391028] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000104): Sync lost
    [ 1987.397848] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000020): FIFO underflow
    [ 1987.405035] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000104): Sync lost
    [ 1987.423606] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000020): FIFO underflow
    [ 1987.433092] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost
    [ 1987.439828] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost
    [ 1987.450440] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000020): FIFO underflow
    [ 1987.463320] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost
    [ 1987.470056] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost
    [ 1987.501173] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000020): FIFO underflow
    [ 1987.508664] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost
    [ 1987.515414] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost
    [ 1987.543056] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000020): FIFO underflow
    [ 1987.554010] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost
    [ 1987.574200] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000020): FIFO underflow
    [ 1987.601915] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000020): FIFO underflow
    [ 1987.613801] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000020): FIFO underflow
    setting   9[ 1993.137938] tilcdc_crtc_irq: 62 callbacks suppressed
    [ 1993.137963] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000020): FIFO underflow
    [ 1993.150175] tilcdc_crtc_irq: 90 callbacks suppressed
    [ 1993.150184] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000104): Sync lost
    [ 1993.167629] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000020): FIFO underflow
    [ 1993.176668] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost
    [ 1993.183422] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost
    [ 1993.191780] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost
    [ 1993.198515] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost
    [ 1993.206894] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost
    [ 1993.213644] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost
    [ 1993.222009] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost
    [ 1993.228744] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost
    [ 1993.237122] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost
    [ 1993.247017] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000020): FIFO underflow
    [ 1993.271416] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000020): FIFO underflow
    [ 1993.308103] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000020): FIFO underflow
    [ 1993.332809] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000020): FIFO underflow
    [ 1993.368156] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000020): FIFO underflow
    [ 1993.382785] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000020): FIFO underflow
    [ 1993.404874] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000020): FIFO underflow
    [ 1993.414834] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000020): FIFO underflow
    testing   9[ 1994.431917] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost flood detected, recovering
    [ 1994.441084] tilcdc 4830e000.lcdc: tilcdc_crtc_recover_work: Reset CRTC
    setting  11[ 1998.906894] tilcdc_crtc_irq: 73 callbacks suppressed
    [ 1998.906920] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000020): FIFO underflow
    [ 1998.920824] tilcdc_crtc_irq: 145 callbacks suppressed
    [ 1998.920834] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000104): Sync lost
    [ 1998.932670] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost
    [ 1998.952689] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000020): FIFO underflow
    [ 1998.966025] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost
    [ 1998.972776] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost
    [ 1998.991562] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000020): FIFO underflow
    [ 1998.998753] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000104): Sync lost
    [ 1999.016824] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000020): FIFO underflow
    [ 1999.026480] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost
    [ 1999.033233] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost
    [ 1999.041595] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost
    [ 1999.048343] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost
    [ 1999.056711] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost
    [ 1999.078669] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000020): FIFO underflow
    [ 1999.122186] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000020): FIFO underflow
    [ 1999.129750] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000020): FIFO underflow
    [ 1999.154368] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000020): FIFO underflow
    [ 1999.176273] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000020): FIFO underflow
    [ 1999.197011] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000020): FIFO underflow
    testing  12[ 2003.017489] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost flood detected, recovering
    [ 2003.026723] tilcdc 4830e000.lcdc: tilcdc_crtc_recover_work: Reset CRTC
    setting  13[ 2004.688068] tilcdc_crtc_irq: 77 callbacks suppressed
    [ 2004.688093] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000020): FIFO underflow
    [ 2004.700373] tilcdc_crtc_irq: 143 callbacks suppressed
    [ 2004.700382] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000104): Sync lost
    [ 2004.717235] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000020): FIFO underflow
    [ 2004.725580] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost
    [ 2004.732332] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost
    [ 2004.740692] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost
    [ 2004.747444] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost
    [ 2004.755806] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost
    [ 2004.762556] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost
    [ 2004.770920] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost
    [ 2004.777669] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost
    [ 2004.786035] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost
    [ 2004.810740] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000020): FIFO underflow
    [ 2004.821798] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000020): FIFO underflow
    [ 2004.847438] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000020): FIFO underflow
    [ 2004.858204] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000020): FIFO underflow
    [ 2004.884919] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000020): FIFO underflow
    [ 2004.913832] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000020): FIFO underflow
    [ 2004.938407] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000020): FIFO underflow
    [ 2004.970679] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000020): FIFO underflow
    setting  15[ 2010.462050] tilcdc_crtc_irq: 79 callbacks suppressed
    [ 2010.462075] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000020): FIFO underflow
    [ 2010.474289] tilcdc_crtc_irq: 102 callbacks suppressed
    [ 2010.474299] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000104): Sync lost
    [ 2010.487169] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000020): FIFO underflow
    [ 2010.499383] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost
    [ 2010.506139] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost
    [ 2010.516381] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000020): FIFO underflow
    [ 2010.524862] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000020): FIFO underflow
    [ 2010.532053] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000104): Sync lost
    [ 2010.548292] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000020): FIFO underflow
    [ 2010.559839] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost
    [ 2010.566590] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost
    [ 2010.582925] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000020): FIFO underflow
    [ 2010.590104] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000104): Sync lost
    [ 2010.596863] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost
    [ 2010.607825] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000020): FIFO underflow
    [ 2010.616580] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000020): FIFO underflow
    [ 2010.623774] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000104): Sync lost
    [ 2010.638403] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000020): FIFO underflow
    [ 2010.650526] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost
    [ 2010.658347] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000020): FIFO underflow

  • Hi Jason,

    I am wondering if the memtester fails without the tilcdc. Also, is the display fully functional and are you able to run applications like kmscube/matrix-gui?

    Regards,
    Krunal

  • Hi Krunal,

    In our board, we will get kernel panic after run gui applications 30 min or 1 hour. However, it works well in start kit. Why memtest show a lot tilcdc information?

    Can we solve the kernel panic problem, if we change the MPU to AM3354? 

    Btw, we using MT41K256M16TW 4Gbit DDR3L.

    Thanks.

  • Hello,

    Could you please disable tilcdc and run the memtest? Before we debug any display/graphics problem, lets make sure the DDR is stable.

    Regards,
    Krunal

  • Also, please share the EMIF tool values that were generated for your custom DDR part.

    Regards,
    Krunal

  • Hi Krunal,

    I think TI's SDK support this DDR3L. The memtest show ok now, after we add ocp_config in u-boot. However, the kernel panic issue still happened. 

    Do we need to change the value of EMIF_OCP_CONFIG_AM335X_EVM ?

    Thanks

    DRAMs Connected to EMIF

    Signal

    PCB Trace Length in inches

    Byte 0

    Byte 1

    CLK

    1.002

    1.001

    DQSn

    1.001

    1.000

    /* Micron MT41K256M16HA-125E */
    #define MT41K256M16HA125E_EMIF_READ_LATENCY 0x100007
    #define MT41K256M16HA125E_EMIF_TIM1 0x0AAAD4DB
    #define MT41K256M16HA125E_EMIF_TIM2 0x266B7FDA
    #define MT41K256M16HA125E_EMIF_TIM3 0x501F867F
    #define MT41K256M16HA125E_EMIF_SDCFG 0x61C05332
    #define MT41K256M16HA125E_EMIF_SDREF 0xC30
    #define MT41K256M16HA125E_ZQ_CFG 0x50074BE4
    #define MT41K256M16HA125E_RATIO 0x80
    #define MT41K256M16HA125E_INVERT_CLKOUT 0x0
    #define MT41K256M16HA125E_RD_DQS 0x38
    #define MT41K256M16HA125E_WR_DQS 0x44
    #define MT41K256M16HA125E_PHY_WR_DATA 0x7D
    #define MT41K256M16HA125E_PHY_FIFO_WE 0x94
    #define MT41K256M16HA125E_IOCTRL_VALUE 0x18B

    S1_memtest_ocp_config.log


  • All custom designs need to use the AM335x EMIF tool spreadsheet: https://www.ti.com/lit/pdf/sprack4 to properly configure the DDR.  Please read this appnote and follow the directions to complete the spreadsheet, then use the resulting values in your code.  

    Most likely you have a sub-optimal DDR configuration which is causing your kernel panics. 

    Regards,

    James 

  • Hi James,

    We finish SW leveling and rebuild the MLO & uboot.img.

    Summary :

    1. With SW leveling -> segmentation fault after a few minutes, but no kernel log.

    2. No SW leveling, but with ocp_config -> kernel panic after 4-5 hours.

    3. AM335x Starter Kit -> 1 day no error

    I have no idea...

    CCCCCCCC
    AM335x DDR3 Software Leveling -- Version: Beta 3.0
                                  -- Copyright: Texas Instruments China Local Team
     *************************** Program Start********************************
    
    Please input the AM335x EMIF Timing Configuration:
    -- AM335x Default EMIF Timing configuration (for StarterKit EVM) --
    DDR3_EMIF_SDRAM_TIM_1 : 0x0888A39B
    DDR3_EMIF_SDRAM_TIM_2 : 0x26337FDA
    DDR3_EMIF_SDRAM_TIM_3 : 0x501F830F
    DDR3_EMIF_SDRAM_CONFIG : 0x61C04AB2
    
    Your choice:  1. Use the default one; 2. Input your own one.
    Please Choose The DDR3 Frequency:  1. 303MHz; 2. 400MHz.
    DDR3 Frequency is Set at 303MHz!
    
    Please input your DDR3_EMIF_SDRAM_TIM_1 conifguration (in Hex) :
    0AAAD4DB
    Please input your DDR3_EMIF_SDRAM_TIM_2 conifguration (in Hex) :
    266B7FDA
    Please input your DDR3_EMIF_SDRAM_TIM_3 conifguration (in Hex) :
    501F867F
    Please input your DDR3_EMIF_SDRAM_CONFIG conifguration (in Hex) :
    61C05332
    Your input EMIF Timing configuration --
    DDR3_EMIF_SDRAM_TIM_1 :         0xAAAD4DB
    DDR3_EMIF_SDRAM_TIM_2 :         0x266B7FDA
    DDR3_EMIF_SDRAM_TIM_3 :         0x501F867F
    DDR3_EMIF_SDRAM_CONFIG :        0x61C05332
    
    Please Enter the PHY_INVERT_CLKOUT value (0 or 1) from the spreadsheet :
    0
    Please Enter the Seed RD_DQS_SLAVE_RATIO Value in Hex to search the RD DQS Ratio Window :
    38
    Please Enter the Seed FIFO_WE_SLAVE_RATIO Value in Hex to search the RD DQS Gate Window :
    94
    Please Enter the Seed WR_DQS_SLAVE_RATIO Write DQS Ratio Value in Hex to search the Write DQS Ratio Window :
    44
    Please Enter the Seed PHY_CTRL_SLAVE_RATIO Value in Hex :
    80
    The ratio seeds for the DDR3 Software Leveling :
    invert_clkout =         0x0
    RD_DQS_RATIO_VAL =      0x38
    FIFO_WE_SLAVE_RATIO =   0x94
    WR_DQS_SLAVE_RATIO =    0x44
    PHY_CTRL_SLAVE_RATIO =  0x80
    
            The Slave Ratio Search Program Values are...
    ***************************************************************
    DATA_PHY_RD_DQS_SLAVE_RATIO is :0x3C
    DATA_PHY_FIFO_WE_SLAVE_RATIO is : 0x9A
    DATA_PHY_WR_DQS_SLAVE_RATIO is : 0x45
    DATA_PHY_WR_DATA_SLAVE_RATIO is : 0x80
    ***************************************************************
    rd_dqs_range = 60
    fifo_we_range = 154
    wr_dqs_range = 69
    wr_data_range = 128
    
    Optimal values not reached, rerunning program with new values...
    
            The Slave Ratio Search Program Values are...
    ***************************************************************
    DATA_PHY_RD_DQS_SLAVE_RATIO is :0x3D
    DATA_PHY_FIFO_WE_SLAVE_RATIO is : 0x9C
    DATA_PHY_WR_DQS_SLAVE_RATIO is : 0x45
    DATA_PHY_WR_DATA_SLAVE_RATIO is : 0x82
    ***************************************************************
    rd_dqs_range = 1
    fifo_we_range = 2
    wr_dqs_range = 0
    wr_data_range = 2
    
    Optimal values have been found!!
    
    ***************************************************************
    DATA_PHY_RD_DQS_SLAVE_RATIO is :0x3D
    DATA_PHY_FIFO_WE_SLAVE_RATIO is : 0x9C
    DATA_PHY_WR_DQS_SLAVE_RATIO is : 0x45
    DATA_PHY_WR_DATA_SLAVE_RATIO is : 0x82
    ***************************************************************
    
    ===== END OF TEST =====
    DDR3 software leveling done!

    U-Boot 2018.01 (Dec 17 2019 - 08:53:00 +0800)
    
    CPU  : AM335X-GP rev 2.1
    Model: TI AM335x EVM
    DRAM:  512 MiB
    NAND:  2048 MiB
    MMC:   OMAP SD/MMC: 0
    ** Bad device mmc 0 **
    Using default environment
    
    <ethaddr> not set. Validating first E-fuse MAC
    Net:   ######test#####
    cpsw, usb_ether
    Hit any key to stop autoboot:  0
    Booting from nand ...
    
    NAND read: device 0 offset 0x200000, size 0x80000
     524288 bytes read: OK
    
    NAND read: device 0 offset 0x400000, size 0xa00000
     10485760 bytes read: OK
    
    NAND read: device 0 offset 0x1800000, size 0x1800000
    Skipping bad block 0x02d00000
    Skipping bad block 0x02d80000
     25165824 bytes read: OK
    ## Flattened Device Tree blob at 80f80000
       Booting using the fdt blob at 0x80f80000
       Loading Device Tree to 9def8000, end 9df04ff0 ... OK
    
    Starting kernel ...
    
    [    0.000000] Booting Linux on physical CPU 0x0
    [    0.000000] Linux version 4.9.59 (jason@jason-vb) (gcc version 6.2.1 20161016 (Linaro GCC 6.2-2016.11) ) #62 PREEMPT Mon Dec 16 16:52:31 CST 2019
    [    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] OF: fdt:Machine model: TI AM335x EVM
    [    0.000000] efi: Getting EFI parameters from FDT:
    [    0.000000] efi: UEFI not found.
    [    0.000000] cma: Reserved 48 MiB at 0x9a800000
    [    0.000000] Memory policy: Data cache writeback
    [    0.000000] CPU: All CPU(s) started in SVC mode.
    [    0.000000] AM335X ES2.1 (neon)
    [    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 129920
    [    0.000000] Kernel command line: console=ttyS0,115200n8 consoleblank=0 vt.global_cursor_default=0 mem=512M root=/dev/ram0 rw rootfstype=ext4 initrd=0x81000000,64M ramdisk_size=67108864
    [    0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
    [    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
    [    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
    [    0.000000] Memory: 390300K/524288K available (9216K kernel code, 315K rwdata, 2700K rodata, 1024K init, 321K bss, 84836K reserved, 49152K cma-reserved, 0K highmem)
    [    0.000000] Virtual kernel memory layout:
    [    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    [    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
    [    0.000000]     vmalloc : 0xe0800000 - 0xff800000   ( 496 MB)
    [    0.000000]     lowmem  : 0xc0000000 - 0xe0000000   ( 512 MB)
    [    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
    [    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
    [    0.000000]       .text : 0xc0008000 - 0xc0a00000   (10208 kB)
    [    0.000000]       .init : 0xc0d00000 - 0xc0e00000   (1024 kB)
    [    0.000000]       .data : 0xc0e00000 - 0xc0e4edc0   ( 316 kB)
    [    0.000000]        .bss : 0xc0e4edc0 - 0xc0e9f2d4   ( 322 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 24000000 Hz
    [    0.000021] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
    [    0.000049] clocksource: timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
    [    0.000063] OMAP clocksource: timer1 at 24000000 Hz
    [    0.000292] clocksource_probe: no matching clocksources found
    [    0.000501] Console: colour dummy device 80x30
    [    0.000552] Calibrating delay loop... 597.60 BogoMIPS (lpj=2988032)
    [    0.118769] pid_max: default: 32768 minimum: 301
    [    0.118941] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
    [    0.118957] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
    [    0.119992] CPU: Testing write buffer coherency: ok
    [    0.120445] Setting up static identity map for 0x80100000 - 0x80100060
    [    0.121570] EFI services will not be available.
    [    0.123390] devtmpfs: initialized
    [    0.140852] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
    [    0.141309] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
    [    0.141341] futex hash table entries: 256 (order: -1, 3072 bytes)
    [    0.145906] pinctrl core: initialized pinctrl subsystem
    [    0.147536] NET: Registered protocol family 16
    [    0.150337] DMA: preallocated 256 KiB pool for atomic coherent allocations
    [    0.170020] omap_hwmod: debugss: _wait_target_disable failed
    [    0.233746] OMAP GPIO hardware version 0.1
    [    0.254339] omap-gpmc 50000000.gpmc: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/nandflash_pins_default, deferring probe
    [    0.257210] No ATAGs?
    [    0.257237] hw-breakpoint: debug architecture 0x4 unsupported.
    [    0.300278] edma 49000000.edma: TI EDMA DMA engine driver
    [    0.305524] SCSI subsystem initialized
    [    0.305920] usbcore: registered new interface driver usbfs
    [    0.306008] usbcore: registered new interface driver hub
    [    0.306146] usbcore: registered new device driver usb
    [    0.306690] omap_i2c 44e0b000.i2c: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/i2c0_pins_default, deferring probe
    [    0.306860] media: Linux media interface: v0.10
    [    0.306930] Linux video capture interface: v2.00
    [    0.306986] pps_core: LinuxPPS API ver. 1 registered
    [    0.306997] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
    [    0.307027] PTP clock support registered
    [    0.307078] EDAC MC: Ver: 3.0.0
    [    0.308461] omap-mailbox 480c8000.mailbox: omap mailbox rev 0x400
    [    0.309738] Bluetooth: Core ver 2.22
    [    0.309812] NET: Registered protocol family 31
    [    0.309823] Bluetooth: HCI device and connection manager initialized
    [    0.309845] Bluetooth: HCI socket layer initialized
    [    0.309861] Bluetooth: L2CAP socket layer initialized
    [    0.309904] Bluetooth: SCO socket layer initialized
    [    0.311130] nfc: nfc_init: NFC Core ver 0.1
    [    0.311219] NET: Registered protocol family 39
    [    0.311747] clocksource: Switched to clocksource timer1
    [    0.326017] NET: Registered protocol family 2
    [    0.327016] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
    [    0.327089] TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
    [    0.327151] TCP: Hash tables configured (established 4096 bind 4096)
    [    0.327244] UDP hash table entries: 256 (order: 0, 4096 bytes)
    [    0.327269] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
    [    0.327445] NET: Registered protocol family 1
    [    0.328199] Trying to unpack rootfs image as initramfs...
    [    0.329232] rootfs image is not initramfs (no cpio magic); looks like an initrd
    [    0.869529] Freeing initrd memory: 65536K
    [    0.870267] hw perfevents: enabled with armv7_cortex_a8 PMU driver, 5 counters available
    [    0.873927] workingset: timestamp_bits=14 max_order=17 bucket_order=3
    [    0.884766] ntfs: driver 2.1.32 [Flags: R/O].
    [    0.885159] jffs2: version 2.2. (NAND) (SUMMARY)  c 2001-2006 Red Hat, Inc.
    [    0.892699] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 246)
    [    0.892727] io scheduler noop registered
    [    0.892737] io scheduler deadline registered
    [    0.892926] io scheduler cfq registered (default)
    [    0.894910] pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800 size 568
    [    0.899333] backlight supply power not found, using dummy regulator
    [    0.983870] Serial: 8250/16550 driver, 10 ports, IRQ sharing disabled
    [    0.989138] console [ttyS0] disabled
    [    0.989258] 44e09000.serial: ttyS0 at MMIO 0x44e09000 (irq = 158, base_baud = 3000000) is a 8250
    [    1.608477] console [ttyS0] enabled
    [    1.613474] 48022000.serial: ttyS1 at MMIO 0x48022000 (irq = 159, base_baud = 3000000) is a 8250
    [    1.623743] 48024000.serial: ttyS2 at MMIO 0x48024000 (irq = 160, base_baud = 3000000) is a 8250
    [    1.633918] 481a6000.serial: ttyS3 at MMIO 0x481a6000 (irq = 161, base_baud = 3000000) is a 8250
    [    1.644048] 481aa000.serial: ttyS5 at MMIO 0x481aa000 (irq = 162, base_baud = 3000000) is a 8250
    [    1.655354] omap_rng 48310000.rng: OMAP Random Number Generator ver. 20
    [    1.662298] [drm] Initialized
    [    1.666026] panel panel: found backlight
    [    1.671344] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
    [    1.678139] [drm] No driver support for vblank timestamp query.
    [    1.732263] Console: switching to colour frame buffer device 100x30
    [    1.746652] tilcdc 4830e000.lcdc: fb0:  frame buffer device
    [    1.784892] brd: module loaded
    [    1.796744] loop: module loaded
    [    1.803045] mtdoops: mtd device (mtddev=name/number) must be supplied
    [    1.813095] libphy: Fixed MDIO Bus: probed
    [    1.819289] CAN device driver interface
    [    1.824723] c_can_platform 481cc000.can: c_can_platform device registered (regs=fa1cc000, irq=166)
    [    1.834964] c_can_platform 481d0000.can: c_can_platform device registered (regs=fa1d0000, irq=167)
    [    1.911782] davinci_mdio 4a101000.mdio: davinci mdio revision 1.6
    [    1.917925] davinci_mdio 4a101000.mdio: detected phy mask 3f3f3f01
    [    1.932652] libphy: 4a101000.mdio: probed
    [    1.936784] davinci_mdio 4a101000.mdio: phy[1]: device 4a101000.mdio:01, driver unknown
    [    1.944908] davinci_mdio 4a101000.mdio: phy[2]: device 4a101000.mdio:02, driver unknown
    [    1.953182] davinci_mdio 4a101000.mdio: phy[3]: device 4a101000.mdio:03, driver unknown
    [    1.961230] davinci_mdio 4a101000.mdio: phy[4]: device 4a101000.mdio:04, driver unknown
    [    1.969372] davinci_mdio 4a101000.mdio: phy[5]: device 4a101000.mdio:05, driver Microchip KSZ8895 PHY 5
    [    1.978877] davinci_mdio 4a101000.mdio: phy[6]: device 4a101000.mdio:06, driver unknown
    [    1.986945] davinci_mdio 4a101000.mdio: phy[7]: device 4a101000.mdio:07, driver unknown
    [    1.995008] davinci_mdio 4a101000.mdio: phy[14]: device 4a101000.mdio:0e, driver unknown
    [    2.003195] davinci_mdio 4a101000.mdio: phy[15]: device 4a101000.mdio:0f, driver unknown
    [    2.011328] davinci_mdio 4a101000.mdio: phy[22]: device 4a101000.mdio:16, driver unknown
    [    2.019479] davinci_mdio 4a101000.mdio: phy[23]: device 4a101000.mdio:17, driver unknown
    [    2.027655] davinci_mdio 4a101000.mdio: phy[30]: device 4a101000.mdio:1e, driver unknown
    [    2.035873] davinci_mdio 4a101000.mdio: phy[31]: device 4a101000.mdio:1f, driver unknown
    [    2.045018] cpsw 4a100000.ethernet: Missing dual_emac_res_vlan in DT.
    [    2.051512] cpsw 4a100000.ethernet: Using 1 as Reserved VLAN for 0 slave
    [    2.058399] cpsw 4a100000.ethernet: No slave[1] phy_id, phy-handle, or fixed-link property
    [    2.066738] cpsw 4a100000.ethernet: Missing dual_emac_res_vlan in DT.
    [    2.073233] cpsw 4a100000.ethernet: Using 2 as Reserved VLAN for 1 slave
    [    2.079972] cpsw 4a100000.ethernet: Detected MACID = 78:04:73:2a:83:66
    [    2.086746] cpsw 4a100000.ethernet: device node lookup for pps timer failed
    [    2.093819] cpsw 4a100000.ethernet: cpts: overflow check period 500 (jiffies)
    [    2.102611] cpsw 4a100000.ethernet: cpsw: Detected MACID = 78:04:73:2a:83:68
    [    2.111412] PPP generic driver version 2.4.2
    [    2.116169] PPP BSD Compression module registered
    [    2.120978] PPP Deflate Compression module registered
    [    2.126109] PPP MPPE Compression module registered
    [    2.130927] NET: Registered protocol family 24
    [    2.135580] usbcore: registered new interface driver cdc_ether
    [    2.141505] usbcore: registered new interface driver rndis_host
    [    2.148377] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
    [    2.155003] ehci-pci: EHCI PCI platform driver
    [    2.159572] ehci-platform: EHCI generic platform driver
    [    2.165139] ehci-omap: OMAP-EHCI Host Controller driver
    [    2.171097] usbcore: registered new interface driver cdc_acm
    [    2.176825] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
    [    2.185030] usbcore: registered new interface driver cdc_wdm
    [    2.190775] usbcore: registered new interface driver usbtmc
    [    2.196504] usbcore: registered new interface driver usb-storage
    [    2.202614] usbcore: registered new interface driver ums-sddr09
    [    2.208654] usbcore: registered new interface driver ums-sddr55
    [    2.214679] usbcore: registered new interface driver ums-usbat
    [    2.220686] usbcore: registered new interface driver usbserial
    [    2.226630] usbcore: registered new interface driver usbserial_generic
    [    2.233267] usbserial: USB Serial support registered for generic
    [    2.239390] usbcore: registered new interface driver ftdi_sio
    [    2.245238] usbserial: USB Serial support registered for FTDI USB Serial Device
    [    2.252650] usbcore: registered new interface driver ipw
    [    2.258039] usbserial: USB Serial support registered for IPWireless converter
    [    2.265282] usbcore: registered new interface driver option
    [    2.270967] usbserial: USB Serial support registered for GSM modem (1-port)
    [    2.278038] usbcore: registered new interface driver pl2303
    [    2.283706] usbserial: USB Serial support registered for pl2303
    [    2.289702] usbcore: registered new interface driver qcserial
    [    2.295543] usbserial: USB Serial support registered for Qualcomm USB modem
    [    2.305234] 47401300.usb-phy supply vcc not found, using dummy regulator
    [    2.317632] 47401b00.usb-phy supply vcc not found, using dummy regulator
    [    2.338354] mousedev: PS/2 mouse device common for all mice
    [    2.344606] i2c /dev entries driver
    [    2.350738] omap_wdt: OMAP Watchdog Timer Rev 0x01: initial timeout 60 sec
    [    2.369494] ISDN subsystem Rev: 1.1.2.3/[    2.373384] 1.1.2.2/
    1.1.2.3/[    2.376297] none/
    1.1.2.2[    2.378851]
    [    2.380489] Modular ISDN core version 1.1.29
    [    2.385112] NET: Registered protocol family 34
    [    2.389662] gigaset: Driver for Gigaset 307x
    [    2.393988] gigaset: Kernel CAPI interface
    [    2.400063] sdhci: Secure Digital Host Controller Interface driver
    [    2.406373] sdhci: Copyright(c) Pierre Ossman
    [    2.412087] omap_hsmmc 48060000.mmc: Got CD GPIO
    [    2.418257] Synopsys Designware Multimedia Card Interface Driver
    [    2.425362] VUB300 Driver rom wait states = 1C irqpoll timeout = 0400[    2.432376] usbcore: registered new interface driver vub300
    [    2.438061] usbcore: registered new interface driver ushc
    [    2.443531] random: fast init done
    [    2.447428] sdhci-pltfm: SDHCI platform and OF driver helper
    [    2.454047] ledtrig-cpu: registered to indicate activity on CPUs
    [    2.460378] usbcore: registered new interface driver usbhid
    [    2.466030] usbhid: USB HID core driver
    [    2.471910] Netfilter messages via NETLINK v0.30.
    [    2.476712] ip_set: protocol 6
    [    2.480167] ip_tables: (C) 2000-2006 Netfilter Core Team
    [    2.485564] Initializing XFRM netlink socket
    [    2.490515] NET: Registered protocol family 10
    [    2.496948] ip6_tables: (C) 2000-2006 Netfilter Core Team
    [    2.502498] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
    [    2.509509] NET: Registered protocol family 17
    [    2.514161] NET: Registered protocol family 15
    [    2.518718] Bridge firewalling registered
    [    2.522824] Ebtables v2.0 registered
    [    2.526417] can: controller area network core (rev 20120528 abi 9)
    [    2.532746] NET: Registered protocol family 29
    [    2.537257] can: raw protocol (rev 20120528)
    [    2.541589] can: broadcast manager protocol (rev 20161123 t)
    [    2.547314] can: netlink gateway (rev 20130117) max_hops=1
    [    2.553369] NET: Registered protocol family 36
    [    2.557889] Key type dns_resolver registered
    [    2.562537] omap_voltage_late_init: Voltage driver support not added
    [    2.576534] omap-gpmc 50000000.gpmc: GPMC revision 6.0
    [    2.581736] gpmc_mem_init: disabling cs 0 mapped at 0x0-0x1000000
    [    2.590466] nand: device found, Manufacturer ID: 0x2c, Chip ID: 0x48
    [    2.597022] nand: Micron MT29F16G08ABACAWP
    [    2.601222] nand: 2048 MiB, SLC, erase size: 512 KiB, page size: 4096, OOB size: 224
    [    2.609079] using OMAP_ECC_BCH16_CODE_HW ECC scheme
    [    2.614168] 15 ofpart partitions found on MTD device omap2-nand.0
    [    2.620293] Creating 15 MTD partitions on "omap2-nand.0":
    [    2.625776] 0x000000000000-0x000000080000 : "NAND.SPL"
    [    2.632972] 0x000000080000-0x000000100000 : "NAND.SPL.backup1"
    [    2.640485] 0x000000100000-0x000000180000 : "NAND.SPL.backup2"
    [    2.647943] 0x000000180000-0x000000200000 : "NAND.SPL.backup3"
    [    2.655344] 0x000000200000-0x000000280000 : "NAND.kernel-fdt"
    [    2.662750] 0x000000280000-0x000000380000 : "NAND.u-boot"
    [    2.669705] 0x000000380000-0x000000400000 : "NAND.u-boot-env"
    [    2.677112] 0x000000400000-0x000000e00000 : "Primary kernel"
    [    2.685081] 0x000000e00000-0x000001800000 : "Secondary kernel"
    [    2.693290] 0x000001800000-0x000003000000 : "Primary rootfs"
    [    2.702181] 0x000003000000-0x000004800000 : "Secondary rootfs"
    [    2.711053] 0x000004800000-0x000004e00000 : "Primary user configuration"
    [    2.719724] 0x000004e00000-0x000005400000 : "Secondary user configuration"
    [    2.728662] 0x000005400000-0x000005a00000 : "Factory default configuration"
    [    2.737732] 0x000005a00000-0x000080000000 : "Storage"
    [    2.902091] tps65910 0-002d: No interrupt support, no core IRQ
    [    2.910577] vrtc: supplied by vbat
    [    2.918007] vio: supplied by vbat
    [    2.923038] vdd1: supplied by vbat
    [    2.928481] vdd2: supplied by vbat
    [    2.935426] vdig1: supplied by vbat
    [    2.940435] vdig2: supplied by vbat
    [    2.945572] vpll: supplied by vbat
    [    2.950529] vdac: supplied by vbat
    [    2.955556] vaux1: supplied by vbat
    [    2.960623] vaux2: supplied by vbat
    [    2.965770] vaux33: supplied by vbat
    [    2.970898] vmmc: supplied by vbat
    [    2.975877] vbb: supplied by vbat
    [    2.980619] omap_i2c 44e0b000.i2c: bus 0 rev0.11 at 400 kHz
    [    2.996335] musb-hdrc musb-hdrc.0: MUSB HDRC host driver
    [    3.002139] musb-hdrc musb-hdrc.0: new USB bus registered, assigned bus number 1
    [    3.009841] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
    [    3.016719] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
    [    3.024049] usb usb1: Product: MUSB HDRC host driver
    [    3.029041] usb usb1: Manufacturer: Linux 4.9.59 musb-hcd
    [    3.034489] usb usb1: SerialNumber: musb-hdrc.0
    [    3.039973] hub 1-0:1.0: USB hub found
    [    3.043894] hub 1-0:1.0: 1 port detected
    [    3.058483] musb-hdrc musb-hdrc.1: MUSB HDRC host driver
    [    3.064289] musb-hdrc musb-hdrc.1: new USB bus registered, assigned bus number 2
    [    3.071994] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002
    [    3.078820] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
    [    3.086157] usb usb2: Product: MUSB HDRC host driver
    [    3.091149] usb usb2: Manufacturer: Linux 4.9.59 musb-hcd
    [    3.096607] usb usb2: SerialNumber: musb-hdrc.1
    [    3.102137] hub 2-0:1.0: USB hub found
    [    3.105957] hub 2-0:1.0: 1 port detected
    [    3.113089] omap_hsmmc 48060000.mmc: Got CD GPIO
    [    3.172880] hctosys: unable to open rtc device (rtc0)
    [    3.178085] mmc0: mmc_rescan_try_freq: trying to init card at 400000 Hz
    [    3.188644] lis3_reg: disabling
    [    3.193113] RAMDISK: gzip image found at block 0
    [    5.119235] EXT4-fs (ram0): mounted filesystem without journal. Opts: (null)
    [    5.126874] VFS: Mounted root (ext4 filesystem) on device 1:0.
    [    5.133536] devtmpfs: mounted
    [    5.138096] Freeing unused kernel memory: 1024K
    Bad inittab entry at line 2
    [    5.868591] jffs2: notice: (110) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
    / # [  203.534709] random: crng init done
    
    / #
    / # [  552.291815] mmc0: mmc_rescan_try_freq: trying to init card at 400000 Hz
    [  552.490666] mmc0: host does not support reading read-only switch, assuming write-enable
    [  552.502949] mmc0: new high speed SDHC card at address 0007
    [  552.512011] mmcblk0: mmc0:0007 SD08G 7.42 GiB
    [  552.526897]  mmcblk0: p1 p2
    
    / # mount /dev/mmcblk0p1 /UsbFlash/
    [  564.504344] FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
    / # cp /UsbFlash/memtester .
    / # umount /UsbFlash/
    / #
    / #
    / # [  575.740570] mmc0: card 0007 removed
    [  575.773679] mmc0: mmc_rescan_try_freq: trying to init card at 400000 Hz
    
    / #
    / #
    / # cat /proc/meminfo
    MemTotal:         506012 kB
    MemFree:          424180 kB
    MemAvailable:     423464 kB
    Buffers:             332 kB
    Cached:             1268 kB
    SwapCached:            0 kB
    Active:             1496 kB
    Inactive:            224 kB
    Active(anon):        120 kB
    Inactive(anon):        0 kB
    Active(file):       1376 kB
    Inactive(file):      224 kB
    Unevictable:           0 kB
    Mlocked:               0 kB
    HighTotal:             0 kB
    HighFree:              0 kB
    LowTotal:         506012 kB
    LowFree:          424180 kB
    SwapTotal:             0 kB
    SwapFree:              0 kB
    Dirty:                36 kB
    Writeback:             0 kB
    AnonPages:           148 kB
    Mapped:             1056 kB
    Shmem:                 0 kB
    Slab:              10312 kB
    SReclaimable:       4456 kB
    SUnreclaim:         5856 kB
    KernelStack:         512 kB
    PageTables:           28 kB
    NFS_Unstable:          0 kB
    Bounce:                0 kB
    WritebackTmp:          0 kB
    CommitLimit:      253004 kB
    Committed_AS:        856 kB
    VmallocTotal:     507904 kB
    VmallocUsed:           0 kB
    VmallocChunk:          0 kB
    CmaTotal:          49152 kB
    CmaFree:           47380 kB
    / # ./memtester 424180K 1
    memtester version 4.3.0 (32-bit)
    Copyright (C) 2001-2012 Charles Cazabon.
    Licensed under the GNU General Public License version 2 (only).
    
    pagesize is 4096
    pagesizemask is 0xfffff000
    want 414MB (434360320 bytes)
    got  414MB (434360320 bytes), trying mlock ...locked.
    Loop 1/1:
      Stuck Address       : ok
      Random Value        : ok
      Compare XOR         : ok
      Compare SUB         : ok
      Compare MUL         : ok
      Compare DIV         : ok
      Compare OR          : ok
      Compare AND         : ok
      Sequential Increment: ok
      Solid Bits          : ok
      Block Sequential    : ok
      Checkerboard        : ok
      Bit Spread          : ok
      Bit Flip            : ok
      Walking Ones        : ok
      Walking Zeroes      : ok
      8-bit Writes        : ok
      16-bit Writes       : ok
    
    Done.

  • Any ideas on what we should do? 

  • Please send the completed spreadsheet for your design and the patch file of the changes you made to board.c based on the spreadsheet output. If you only have one DDR memory component, you do not need to run the software leveling algorithm.

    Regards,

    James

  • If you only have one DDR memory component, you do not need to run the software leveling algorithm.

    -> We only have one DDR memory component. Why TI's FAE tell us must to do software leveling ... Who is right?

    Also, we find that if we run LCDTask without insert LCD, it can run overnight well. Do you have any ideas?

    Thanks 

  • Hello,

    For a single DDR memory, the software leveling is no longer required. Before we debug the LCD issues, we need to ensure that the memory is stable and configured correctly. As James recommended in the following post, please fill out the AM335x EMIF tool spreadsheet and update the Uboot code.

    Regards,
    Krunal

  • As the attachments 

    CCCCCCCC
    AM335x DDR3 Software Leveling -- Version: Beta 3.0
                                  -- Copyright: Texas Instruments China Local Team
     *************************** Program Start********************************
    
    Please input the AM335x EMIF Timing Configuration:
    -- AM335x Default EMIF Timing configuration (for StarterKit EVM) --
    DDR3_EMIF_SDRAM_TIM_1 : 0x0888A39B
    DDR3_EMIF_SDRAM_TIM_2 : 0x26337FDA
    DDR3_EMIF_SDRAM_TIM_3 : 0x501F830F
    DDR3_EMIF_SDRAM_CONFIG : 0x61C04AB2
    
    Your choice:  1. Use the default one; 2. Input your own one.
    Please Choose The DDR3 Frequency:  1. 303MHz; 2. 400MHz.
    DDR3 Frequency is Set at 303MHz!
    
    Please input your DDR3_EMIF_SDRAM_TIM_1 conifguration (in Hex) :
    0AAAD4DB
    Please input your DDR3_EMIF_SDRAM_TIM_2 conifguration (in Hex) :
    266B7FDA
    Please input your DDR3_EMIF_SDRAM_TIM_3 conifguration (in Hex) :
    501F867F
    Please input your DDR3_EMIF_SDRAM_CONFIG conifguration (in Hex) :
    61C05332
    Your input EMIF Timing configuration --
    DDR3_EMIF_SDRAM_TIM_1 :         0xAAAD4DB
    DDR3_EMIF_SDRAM_TIM_2 :         0x266B7FDA
    DDR3_EMIF_SDRAM_TIM_3 :         0x501F867F
    DDR3_EMIF_SDRAM_CONFIG :        0x61C05332
    
    Please Enter the PHY_INVERT_CLKOUT value (0 or 1) from the spreadsheet :
    0
    Please Enter the Seed RD_DQS_SLAVE_RATIO Value in Hex to search the RD DQS Ratio Window :
    38
    Please Enter the Seed FIFO_WE_SLAVE_RATIO Value in Hex to search the RD DQS Gate Window :
    94
    Please Enter the Seed WR_DQS_SLAVE_RATIO Write DQS Ratio Value in Hex to search the Write DQS Ratio Window :
    44
    Please Enter the Seed PHY_CTRL_SLAVE_RATIO Value in Hex :
    80
    The ratio seeds for the DDR3 Software Leveling :
    invert_clkout =         0x0
    RD_DQS_RATIO_VAL =      0x38
    FIFO_WE_SLAVE_RATIO =   0x94
    WR_DQS_SLAVE_RATIO =    0x44
    PHY_CTRL_SLAVE_RATIO =  0x80
    
            The Slave Ratio Search Program Values are...
    ***************************************************************
    DATA_PHY_RD_DQS_SLAVE_RATIO is :0x3C
    DATA_PHY_FIFO_WE_SLAVE_RATIO is : 0x9A
    DATA_PHY_WR_DQS_SLAVE_RATIO is : 0x45
    DATA_PHY_WR_DATA_SLAVE_RATIO is : 0x80
    ***************************************************************
    rd_dqs_range = 60
    fifo_we_range = 154
    wr_dqs_range = 69
    wr_data_range = 128
    
    Optimal values not reached, rerunning program with new values...
    
            The Slave Ratio Search Program Values are...
    ***************************************************************
    DATA_PHY_RD_DQS_SLAVE_RATIO is :0x3D
    DATA_PHY_FIFO_WE_SLAVE_RATIO is : 0x9C
    DATA_PHY_WR_DQS_SLAVE_RATIO is : 0x45
    DATA_PHY_WR_DATA_SLAVE_RATIO is : 0x82
    ***************************************************************
    rd_dqs_range = 1
    fifo_we_range = 2
    wr_dqs_range = 0
    wr_data_range = 2
    
    Optimal values have been found!!
    
    ***************************************************************
    DATA_PHY_RD_DQS_SLAVE_RATIO is :0x3D
    DATA_PHY_FIFO_WE_SLAVE_RATIO is : 0x9C
    DATA_PHY_WR_DQS_SLAVE_RATIO is : 0x45
    DATA_PHY_WR_DATA_SLAVE_RATIO is : 0x82
    ***************************************************************
    
    ===== END OF TEST =====
    DDR3 software leveling done!

    U-Boot 2018.01 (Dec 17 2019 - 08:53:00 +0800)
    
    CPU  : AM335X-GP rev 2.1
    Model: TI AM335x EVM
    DRAM:  512 MiB
    NAND:  2048 MiB
    MMC:   OMAP SD/MMC: 0
    ** Bad device mmc 0 **
    Using default environment
    
    <ethaddr> not set. Validating first E-fuse MAC
    Net:   ######test#####
    cpsw, usb_ether
    Hit any key to stop autoboot:  0
    Booting from nand ...
    
    NAND read: device 0 offset 0x200000, size 0x80000
     524288 bytes read: OK
    
    NAND read: device 0 offset 0x400000, size 0xa00000
     10485760 bytes read: OK
    
    NAND read: device 0 offset 0x1800000, size 0x1800000
    Skipping bad block 0x02d00000
    Skipping bad block 0x02d80000
     25165824 bytes read: OK
    ## Flattened Device Tree blob at 80f80000
       Booting using the fdt blob at 0x80f80000
       Loading Device Tree to 9def8000, end 9df04ff0 ... OK
    
    Starting kernel ...
    
    [    0.000000] Booting Linux on physical CPU 0x0
    [    0.000000] Linux version 4.9.59 (jason@jason-vb) (gcc version 6.2.1 20161016 (Linaro GCC 6.2-2016.11) ) #62 PREEMPT Mon Dec 16 16:52:31 CST 2019
    [    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] OF: fdt:Machine model: TI AM335x EVM
    [    0.000000] efi: Getting EFI parameters from FDT:
    [    0.000000] efi: UEFI not found.
    [    0.000000] cma: Reserved 48 MiB at 0x9a800000
    [    0.000000] Memory policy: Data cache writeback
    [    0.000000] CPU: All CPU(s) started in SVC mode.
    [    0.000000] AM335X ES2.1 (neon)
    [    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 129920
    [    0.000000] Kernel command line: console=ttyS0,115200n8 consoleblank=0 vt.global_cursor_default=0 mem=512M root=/dev/ram0 rw rootfstype=ext4 initrd=0x81000000,64M ramdisk_size=67108864
    [    0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
    [    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
    [    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
    [    0.000000] Memory: 390300K/524288K available (9216K kernel code, 315K rwdata, 2700K rodata, 1024K init, 321K bss, 84836K reserved, 49152K cma-reserved, 0K highmem)
    [    0.000000] Virtual kernel memory layout:
    [    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    [    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
    [    0.000000]     vmalloc : 0xe0800000 - 0xff800000   ( 496 MB)
    [    0.000000]     lowmem  : 0xc0000000 - 0xe0000000   ( 512 MB)
    [    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
    [    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
    [    0.000000]       .text : 0xc0008000 - 0xc0a00000   (10208 kB)
    [    0.000000]       .init : 0xc0d00000 - 0xc0e00000   (1024 kB)
    [    0.000000]       .data : 0xc0e00000 - 0xc0e4edc0   ( 316 kB)
    [    0.000000]        .bss : 0xc0e4edc0 - 0xc0e9f2d4   ( 322 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 24000000 Hz
    [    0.000021] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
    [    0.000049] clocksource: timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
    [    0.000063] OMAP clocksource: timer1 at 24000000 Hz
    [    0.000292] clocksource_probe: no matching clocksources found
    [    0.000501] Console: colour dummy device 80x30
    [    0.000552] Calibrating delay loop... 597.60 BogoMIPS (lpj=2988032)
    [    0.118769] pid_max: default: 32768 minimum: 301
    [    0.118941] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
    [    0.118957] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
    [    0.119992] CPU: Testing write buffer coherency: ok
    [    0.120445] Setting up static identity map for 0x80100000 - 0x80100060
    [    0.121570] EFI services will not be available.
    [    0.123390] devtmpfs: initialized
    [    0.140852] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
    [    0.141309] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
    [    0.141341] futex hash table entries: 256 (order: -1, 3072 bytes)
    [    0.145906] pinctrl core: initialized pinctrl subsystem
    [    0.147536] NET: Registered protocol family 16
    [    0.150337] DMA: preallocated 256 KiB pool for atomic coherent allocations
    [    0.170020] omap_hwmod: debugss: _wait_target_disable failed
    [    0.233746] OMAP GPIO hardware version 0.1
    [    0.254339] omap-gpmc 50000000.gpmc: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/nandflash_pins_default, deferring probe
    [    0.257210] No ATAGs?
    [    0.257237] hw-breakpoint: debug architecture 0x4 unsupported.
    [    0.300278] edma 49000000.edma: TI EDMA DMA engine driver
    [    0.305524] SCSI subsystem initialized
    [    0.305920] usbcore: registered new interface driver usbfs
    [    0.306008] usbcore: registered new interface driver hub
    [    0.306146] usbcore: registered new device driver usb
    [    0.306690] omap_i2c 44e0b000.i2c: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/i2c0_pins_default, deferring probe
    [    0.306860] media: Linux media interface: v0.10
    [    0.306930] Linux video capture interface: v2.00
    [    0.306986] pps_core: LinuxPPS API ver. 1 registered
    [    0.306997] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
    [    0.307027] PTP clock support registered
    [    0.307078] EDAC MC: Ver: 3.0.0
    [    0.308461] omap-mailbox 480c8000.mailbox: omap mailbox rev 0x400
    [    0.309738] Bluetooth: Core ver 2.22
    [    0.309812] NET: Registered protocol family 31
    [    0.309823] Bluetooth: HCI device and connection manager initialized
    [    0.309845] Bluetooth: HCI socket layer initialized
    [    0.309861] Bluetooth: L2CAP socket layer initialized
    [    0.309904] Bluetooth: SCO socket layer initialized
    [    0.311130] nfc: nfc_init: NFC Core ver 0.1
    [    0.311219] NET: Registered protocol family 39
    [    0.311747] clocksource: Switched to clocksource timer1
    [    0.326017] NET: Registered protocol family 2
    [    0.327016] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
    [    0.327089] TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
    [    0.327151] TCP: Hash tables configured (established 4096 bind 4096)
    [    0.327244] UDP hash table entries: 256 (order: 0, 4096 bytes)
    [    0.327269] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
    [    0.327445] NET: Registered protocol family 1
    [    0.328199] Trying to unpack rootfs image as initramfs...
    [    0.329232] rootfs image is not initramfs (no cpio magic); looks like an initrd
    [    0.869529] Freeing initrd memory: 65536K
    [    0.870267] hw perfevents: enabled with armv7_cortex_a8 PMU driver, 5 counters available
    [    0.873927] workingset: timestamp_bits=14 max_order=17 bucket_order=3
    [    0.884766] ntfs: driver 2.1.32 [Flags: R/O].
    [    0.885159] jffs2: version 2.2. (NAND) (SUMMARY)  c 2001-2006 Red Hat, Inc.
    [    0.892699] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 246)
    [    0.892727] io scheduler noop registered
    [    0.892737] io scheduler deadline registered
    [    0.892926] io scheduler cfq registered (default)
    [    0.894910] pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800 size 568
    [    0.899333] backlight supply power not found, using dummy regulator
    [    0.983870] Serial: 8250/16550 driver, 10 ports, IRQ sharing disabled
    [    0.989138] console [ttyS0] disabled
    [    0.989258] 44e09000.serial: ttyS0 at MMIO 0x44e09000 (irq = 158, base_baud = 3000000) is a 8250
    [    1.608477] console [ttyS0] enabled
    [    1.613474] 48022000.serial: ttyS1 at MMIO 0x48022000 (irq = 159, base_baud = 3000000) is a 8250
    [    1.623743] 48024000.serial: ttyS2 at MMIO 0x48024000 (irq = 160, base_baud = 3000000) is a 8250
    [    1.633918] 481a6000.serial: ttyS3 at MMIO 0x481a6000 (irq = 161, base_baud = 3000000) is a 8250
    [    1.644048] 481aa000.serial: ttyS5 at MMIO 0x481aa000 (irq = 162, base_baud = 3000000) is a 8250
    [    1.655354] omap_rng 48310000.rng: OMAP Random Number Generator ver. 20
    [    1.662298] [drm] Initialized
    [    1.666026] panel panel: found backlight
    [    1.671344] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
    [    1.678139] [drm] No driver support for vblank timestamp query.
    [    1.732263] Console: switching to colour frame buffer device 100x30
    [    1.746652] tilcdc 4830e000.lcdc: fb0:  frame buffer device
    [    1.784892] brd: module loaded
    [    1.796744] loop: module loaded
    [    1.803045] mtdoops: mtd device (mtddev=name/number) must be supplied
    [    1.813095] libphy: Fixed MDIO Bus: probed
    [    1.819289] CAN device driver interface
    [    1.824723] c_can_platform 481cc000.can: c_can_platform device registered (regs=fa1cc000, irq=166)
    [    1.834964] c_can_platform 481d0000.can: c_can_platform device registered (regs=fa1d0000, irq=167)
    [    1.911782] davinci_mdio 4a101000.mdio: davinci mdio revision 1.6
    [    1.917925] davinci_mdio 4a101000.mdio: detected phy mask 3f3f3f01
    [    1.932652] libphy: 4a101000.mdio: probed
    [    1.936784] davinci_mdio 4a101000.mdio: phy[1]: device 4a101000.mdio:01, driver unknown
    [    1.944908] davinci_mdio 4a101000.mdio: phy[2]: device 4a101000.mdio:02, driver unknown
    [    1.953182] davinci_mdio 4a101000.mdio: phy[3]: device 4a101000.mdio:03, driver unknown
    [    1.961230] davinci_mdio 4a101000.mdio: phy[4]: device 4a101000.mdio:04, driver unknown
    [    1.969372] davinci_mdio 4a101000.mdio: phy[5]: device 4a101000.mdio:05, driver Microchip KSZ8895 PHY 5
    [    1.978877] davinci_mdio 4a101000.mdio: phy[6]: device 4a101000.mdio:06, driver unknown
    [    1.986945] davinci_mdio 4a101000.mdio: phy[7]: device 4a101000.mdio:07, driver unknown
    [    1.995008] davinci_mdio 4a101000.mdio: phy[14]: device 4a101000.mdio:0e, driver unknown
    [    2.003195] davinci_mdio 4a101000.mdio: phy[15]: device 4a101000.mdio:0f, driver unknown
    [    2.011328] davinci_mdio 4a101000.mdio: phy[22]: device 4a101000.mdio:16, driver unknown
    [    2.019479] davinci_mdio 4a101000.mdio: phy[23]: device 4a101000.mdio:17, driver unknown
    [    2.027655] davinci_mdio 4a101000.mdio: phy[30]: device 4a101000.mdio:1e, driver unknown
    [    2.035873] davinci_mdio 4a101000.mdio: phy[31]: device 4a101000.mdio:1f, driver unknown
    [    2.045018] cpsw 4a100000.ethernet: Missing dual_emac_res_vlan in DT.
    [    2.051512] cpsw 4a100000.ethernet: Using 1 as Reserved VLAN for 0 slave
    [    2.058399] cpsw 4a100000.ethernet: No slave[1] phy_id, phy-handle, or fixed-link property
    [    2.066738] cpsw 4a100000.ethernet: Missing dual_emac_res_vlan in DT.
    [    2.073233] cpsw 4a100000.ethernet: Using 2 as Reserved VLAN for 1 slave
    [    2.079972] cpsw 4a100000.ethernet: Detected MACID = 78:04:73:2a:83:66
    [    2.086746] cpsw 4a100000.ethernet: device node lookup for pps timer failed
    [    2.093819] cpsw 4a100000.ethernet: cpts: overflow check period 500 (jiffies)
    [    2.102611] cpsw 4a100000.ethernet: cpsw: Detected MACID = 78:04:73:2a:83:68
    [    2.111412] PPP generic driver version 2.4.2
    [    2.116169] PPP BSD Compression module registered
    [    2.120978] PPP Deflate Compression module registered
    [    2.126109] PPP MPPE Compression module registered
    [    2.130927] NET: Registered protocol family 24
    [    2.135580] usbcore: registered new interface driver cdc_ether
    [    2.141505] usbcore: registered new interface driver rndis_host
    [    2.148377] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
    [    2.155003] ehci-pci: EHCI PCI platform driver
    [    2.159572] ehci-platform: EHCI generic platform driver
    [    2.165139] ehci-omap: OMAP-EHCI Host Controller driver
    [    2.171097] usbcore: registered new interface driver cdc_acm
    [    2.176825] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
    [    2.185030] usbcore: registered new interface driver cdc_wdm
    [    2.190775] usbcore: registered new interface driver usbtmc
    [    2.196504] usbcore: registered new interface driver usb-storage
    [    2.202614] usbcore: registered new interface driver ums-sddr09
    [    2.208654] usbcore: registered new interface driver ums-sddr55
    [    2.214679] usbcore: registered new interface driver ums-usbat
    [    2.220686] usbcore: registered new interface driver usbserial
    [    2.226630] usbcore: registered new interface driver usbserial_generic
    [    2.233267] usbserial: USB Serial support registered for generic
    [    2.239390] usbcore: registered new interface driver ftdi_sio
    [    2.245238] usbserial: USB Serial support registered for FTDI USB Serial Device
    [    2.252650] usbcore: registered new interface driver ipw
    [    2.258039] usbserial: USB Serial support registered for IPWireless converter
    [    2.265282] usbcore: registered new interface driver option
    [    2.270967] usbserial: USB Serial support registered for GSM modem (1-port)
    [    2.278038] usbcore: registered new interface driver pl2303
    [    2.283706] usbserial: USB Serial support registered for pl2303
    [    2.289702] usbcore: registered new interface driver qcserial
    [    2.295543] usbserial: USB Serial support registered for Qualcomm USB modem
    [    2.305234] 47401300.usb-phy supply vcc not found, using dummy regulator
    [    2.317632] 47401b00.usb-phy supply vcc not found, using dummy regulator
    [    2.338354] mousedev: PS/2 mouse device common for all mice
    [    2.344606] i2c /dev entries driver
    [    2.350738] omap_wdt: OMAP Watchdog Timer Rev 0x01: initial timeout 60 sec
    [    2.369494] ISDN subsystem Rev: 1.1.2.3/[    2.373384] 1.1.2.2/
    1.1.2.3/[    2.376297] none/
    1.1.2.2[    2.378851]
    [    2.380489] Modular ISDN core version 1.1.29
    [    2.385112] NET: Registered protocol family 34
    [    2.389662] gigaset: Driver for Gigaset 307x
    [    2.393988] gigaset: Kernel CAPI interface
    [    2.400063] sdhci: Secure Digital Host Controller Interface driver
    [    2.406373] sdhci: Copyright(c) Pierre Ossman
    [    2.412087] omap_hsmmc 48060000.mmc: Got CD GPIO
    [    2.418257] Synopsys Designware Multimedia Card Interface Driver
    [    2.425362] VUB300 Driver rom wait states = 1C irqpoll timeout = 0400[    2.432376] usbcore: registered new interface driver vub300
    [    2.438061] usbcore: registered new interface driver ushc
    [    2.443531] random: fast init done
    [    2.447428] sdhci-pltfm: SDHCI platform and OF driver helper
    [    2.454047] ledtrig-cpu: registered to indicate activity on CPUs
    [    2.460378] usbcore: registered new interface driver usbhid
    [    2.466030] usbhid: USB HID core driver
    [    2.471910] Netfilter messages via NETLINK v0.30.
    [    2.476712] ip_set: protocol 6
    [    2.480167] ip_tables: (C) 2000-2006 Netfilter Core Team
    [    2.485564] Initializing XFRM netlink socket
    [    2.490515] NET: Registered protocol family 10
    [    2.496948] ip6_tables: (C) 2000-2006 Netfilter Core Team
    [    2.502498] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
    [    2.509509] NET: Registered protocol family 17
    [    2.514161] NET: Registered protocol family 15
    [    2.518718] Bridge firewalling registered
    [    2.522824] Ebtables v2.0 registered
    [    2.526417] can: controller area network core (rev 20120528 abi 9)
    [    2.532746] NET: Registered protocol family 29
    [    2.537257] can: raw protocol (rev 20120528)
    [    2.541589] can: broadcast manager protocol (rev 20161123 t)
    [    2.547314] can: netlink gateway (rev 20130117) max_hops=1
    [    2.553369] NET: Registered protocol family 36
    [    2.557889] Key type dns_resolver registered
    [    2.562537] omap_voltage_late_init: Voltage driver support not added
    [    2.576534] omap-gpmc 50000000.gpmc: GPMC revision 6.0
    [    2.581736] gpmc_mem_init: disabling cs 0 mapped at 0x0-0x1000000
    [    2.590466] nand: device found, Manufacturer ID: 0x2c, Chip ID: 0x48
    [    2.597022] nand: Micron MT29F16G08ABACAWP
    [    2.601222] nand: 2048 MiB, SLC, erase size: 512 KiB, page size: 4096, OOB size: 224
    [    2.609079] using OMAP_ECC_BCH16_CODE_HW ECC scheme
    [    2.614168] 15 ofpart partitions found on MTD device omap2-nand.0
    [    2.620293] Creating 15 MTD partitions on "omap2-nand.0":
    [    2.625776] 0x000000000000-0x000000080000 : "NAND.SPL"
    [    2.632972] 0x000000080000-0x000000100000 : "NAND.SPL.backup1"
    [    2.640485] 0x000000100000-0x000000180000 : "NAND.SPL.backup2"
    [    2.647943] 0x000000180000-0x000000200000 : "NAND.SPL.backup3"
    [    2.655344] 0x000000200000-0x000000280000 : "NAND.kernel-fdt"
    [    2.662750] 0x000000280000-0x000000380000 : "NAND.u-boot"
    [    2.669705] 0x000000380000-0x000000400000 : "NAND.u-boot-env"
    [    2.677112] 0x000000400000-0x000000e00000 : "Primary kernel"
    [    2.685081] 0x000000e00000-0x000001800000 : "Secondary kernel"
    [    2.693290] 0x000001800000-0x000003000000 : "Primary rootfs"
    [    2.702181] 0x000003000000-0x000004800000 : "Secondary rootfs"
    [    2.711053] 0x000004800000-0x000004e00000 : "Primary user configuration"
    [    2.719724] 0x000004e00000-0x000005400000 : "Secondary user configuration"
    [    2.728662] 0x000005400000-0x000005a00000 : "Factory default configuration"
    [    2.737732] 0x000005a00000-0x000080000000 : "Storage"
    [    2.902091] tps65910 0-002d: No interrupt support, no core IRQ
    [    2.910577] vrtc: supplied by vbat
    [    2.918007] vio: supplied by vbat
    [    2.923038] vdd1: supplied by vbat
    [    2.928481] vdd2: supplied by vbat
    [    2.935426] vdig1: supplied by vbat
    [    2.940435] vdig2: supplied by vbat
    [    2.945572] vpll: supplied by vbat
    [    2.950529] vdac: supplied by vbat
    [    2.955556] vaux1: supplied by vbat
    [    2.960623] vaux2: supplied by vbat
    [    2.965770] vaux33: supplied by vbat
    [    2.970898] vmmc: supplied by vbat
    [    2.975877] vbb: supplied by vbat
    [    2.980619] omap_i2c 44e0b000.i2c: bus 0 rev0.11 at 400 kHz
    [    2.996335] musb-hdrc musb-hdrc.0: MUSB HDRC host driver
    [    3.002139] musb-hdrc musb-hdrc.0: new USB bus registered, assigned bus number 1
    [    3.009841] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
    [    3.016719] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
    [    3.024049] usb usb1: Product: MUSB HDRC host driver
    [    3.029041] usb usb1: Manufacturer: Linux 4.9.59 musb-hcd
    [    3.034489] usb usb1: SerialNumber: musb-hdrc.0
    [    3.039973] hub 1-0:1.0: USB hub found
    [    3.043894] hub 1-0:1.0: 1 port detected
    [    3.058483] musb-hdrc musb-hdrc.1: MUSB HDRC host driver
    [    3.064289] musb-hdrc musb-hdrc.1: new USB bus registered, assigned bus number 2
    [    3.071994] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002
    [    3.078820] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
    [    3.086157] usb usb2: Product: MUSB HDRC host driver
    [    3.091149] usb usb2: Manufacturer: Linux 4.9.59 musb-hcd
    [    3.096607] usb usb2: SerialNumber: musb-hdrc.1
    [    3.102137] hub 2-0:1.0: USB hub found
    [    3.105957] hub 2-0:1.0: 1 port detected
    [    3.113089] omap_hsmmc 48060000.mmc: Got CD GPIO
    [    3.172880] hctosys: unable to open rtc device (rtc0)
    [    3.178085] mmc0: mmc_rescan_try_freq: trying to init card at 400000 Hz
    [    3.188644] lis3_reg: disabling
    [    3.193113] RAMDISK: gzip image found at block 0
    [    5.119235] EXT4-fs (ram0): mounted filesystem without journal. Opts: (null)
    [    5.126874] VFS: Mounted root (ext4 filesystem) on device 1:0.
    [    5.133536] devtmpfs: mounted
    [    5.138096] Freeing unused kernel memory: 1024K
    Bad inittab entry at line 2
    [    5.868591] jffs2: notice: (110) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
    / # [  203.534709] random: crng init done
    
    / #
    / # [  552.291815] mmc0: mmc_rescan_try_freq: trying to init card at 400000 Hz
    [  552.490666] mmc0: host does not support reading read-only switch, assuming write-enable
    [  552.502949] mmc0: new high speed SDHC card at address 0007
    [  552.512011] mmcblk0: mmc0:0007 SD08G 7.42 GiB
    [  552.526897]  mmcblk0: p1 p2
    
    / # mount /dev/mmcblk0p1 /UsbFlash/
    [  564.504344] FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
    / # cp /UsbFlash/memtester .
    / # umount /UsbFlash/
    / #
    / #
    / # [  575.740570] mmc0: card 0007 removed
    [  575.773679] mmc0: mmc_rescan_try_freq: trying to init card at 400000 Hz
    
    / #
    / #
    / # cat /proc/meminfo
    MemTotal:         506012 kB
    MemFree:          424180 kB
    MemAvailable:     423464 kB
    Buffers:             332 kB
    Cached:             1268 kB
    SwapCached:            0 kB
    Active:             1496 kB
    Inactive:            224 kB
    Active(anon):        120 kB
    Inactive(anon):        0 kB
    Active(file):       1376 kB
    Inactive(file):      224 kB
    Unevictable:           0 kB
    Mlocked:               0 kB
    HighTotal:             0 kB
    HighFree:              0 kB
    LowTotal:         506012 kB
    LowFree:          424180 kB
    SwapTotal:             0 kB
    SwapFree:              0 kB
    Dirty:                36 kB
    Writeback:             0 kB
    AnonPages:           148 kB
    Mapped:             1056 kB
    Shmem:                 0 kB
    Slab:              10312 kB
    SReclaimable:       4456 kB
    SUnreclaim:         5856 kB
    KernelStack:         512 kB
    PageTables:           28 kB
    NFS_Unstable:          0 kB
    Bounce:                0 kB
    WritebackTmp:          0 kB
    CommitLimit:      253004 kB
    Committed_AS:        856 kB
    VmallocTotal:     507904 kB
    VmallocUsed:           0 kB
    VmallocChunk:          0 kB
    CmaTotal:          49152 kB
    CmaFree:           47380 kB
    / # ./memtester 424180K 1
    memtester version 4.3.0 (32-bit)
    Copyright (C) 2001-2012 Charles Cazabon.
    Licensed under the GNU General Public License version 2 (only).
    
    pagesize is 4096
    pagesizemask is 0xfffff000
    want 414MB (434360320 bytes)
    got  414MB (434360320 bytes), trying mlock ...locked.
    Loop 1/1:
      Stuck Address       : ok
      Random Value        : ok
      Compare XOR         : ok
      Compare SUB         : ok
      Compare MUL         : ok
      Compare DIV         : ok
      Compare OR          : ok
      Compare AND         : ok
      Sequential Increment: ok
      Solid Bits          : ok
      Block Sequential    : ok
      Checkerboard        : ok
      Bit Spread          : ok
      Bit Flip            : ok
      Walking Ones        : ok
      Walking Zeroes      : ok
      8-bit Writes        : ok
      16-bit Writes       : ok
    
    Done.

    From c2dd627975cebf65a42c17a3d0e651a9860751d3 Mon Sep 17 00:00:00 2001
    From: "jason.ht.huang" <jason.ht.huang@liteon.com>
    Date: Tue, 17 Dec 2019 09:25:37 +0800
    Subject: [PATCH] Modified ddr defs ref default value
    
    ---
     .../u-boot-2018/arch/arm/include/asm/arch-am33xx/ddr_defs.h       | 8 ++++----
     1 file changed, 4 insertions(+), 4 deletions(-)
    
    diff --git a/board-support/u-boot-2018/arch/arm/include/asm/arch-am33xx/ddr_defs.h b/board-support/u-boot-2018/arch/arm/include/asm/arch-am33xx/ddr_defs.h
    index a97ebb5..216a48c 100644
    --- a/board-support/u-boot-2018/arch/arm/include/asm/arch-am33xx/ddr_defs.h
    +++ b/board-support/u-boot-2018/arch/arm/include/asm/arch-am33xx/ddr_defs.h
    @@ -117,10 +117,10 @@
     #define MT41K256M16HA125E_ZQ_CFG		0x50074BE4
     #define MT41K256M16HA125E_RATIO			0x80
     #define MT41K256M16HA125E_INVERT_CLKOUT		0x0
    -#define MT41K256M16HA125E_RD_DQS		0x38
    -#define MT41K256M16HA125E_WR_DQS		0x44
    -#define MT41K256M16HA125E_PHY_WR_DATA		0x7D
    -#define MT41K256M16HA125E_PHY_FIFO_WE		0x94
    +#define MT41K256M16HA125E_RD_DQS		0x3D
    +#define MT41K256M16HA125E_WR_DQS		0x45
    +#define MT41K256M16HA125E_PHY_WR_DATA		0x82
    +#define MT41K256M16HA125E_PHY_FIFO_WE		0x9C
     #define MT41K256M16HA125E_IOCTRL_VALUE		0x18B
     
     /* Micron MT41J512M8RH-125 on EVM v1.5 */
    -- 
    2.7.4
    
    

  • Please follow the directions in the app note with the link provided previously.  The app note explains how the changes should be made in board.c, not ddr_defs.h.  After completing the spreadsheet, please provide the spreadsheet and the board.c diff file.

    Regards,

    James

  • As the attachment 

    Thanks

    /*
     * board.c
     *
     * Board functions for TI AM335X based boards
     *
     * Copyright (C) 2011, Texas Instruments, Incorporated - http://www.ti.com/
     *
     * SPDX-License-Identifier:	GPL-2.0+
     */
    
    #include <common.h>
    #include <dm.h>
    #include <errno.h>
    #include <spl.h>
    #include <serial.h>
    #include <asm/arch/cpu.h>
    #include <asm/arch/hardware.h>
    #include <asm/arch/omap.h>
    #include <asm/arch/ddr_defs.h>
    #include <asm/arch/clock.h>
    #include <asm/arch/clk_synthesizer.h>
    #include <asm/arch/gpio.h>
    #include <asm/arch/mmc_host_def.h>
    #include <asm/arch/sys_proto.h>
    #include <asm/arch/mem.h>
    #include <asm/io.h>
    #include <asm/emif.h>
    #include <asm/gpio.h>
    #include <asm/omap_common.h>
    #include <asm/omap_sec_common.h>
    #include <asm/omap_mmc.h>
    #include <i2c.h>
    #include <miiphy.h>
    #include <cpsw.h>
    #include <power/tps65217.h>
    #include <power/tps65910.h>
    #include <environment.h>
    #include <watchdog.h>
    #include <environment.h>
    #include "../common/board_detect.h"
    #include "board.h"
    
    DECLARE_GLOBAL_DATA_PTR;
    
    /* GPIO that controls power to DDR on EVM-SK */
    #define GPIO_TO_PIN(bank, gpio)		(32 * (bank) + (gpio))
    #define GPIO_DDR_VTT_EN		GPIO_TO_PIN(0, 7)
    #define ICE_GPIO_DDR_VTT_EN	GPIO_TO_PIN(0, 18)
    #define GPIO_PR1_MII_CTRL	GPIO_TO_PIN(3, 4)
    #define GPIO_MUX_MII_CTRL	GPIO_TO_PIN(3, 10)
    #define GPIO_FET_SWITCH_CTRL	GPIO_TO_PIN(0, 7)
    #define GPIO_PHY_RESET		GPIO_TO_PIN(2, 5)
    #define GPIO_ETH0_MODE		GPIO_TO_PIN(0, 11)
    #define GPIO_ETH1_MODE		GPIO_TO_PIN(1, 26)
    
    /*PLC reset seamus*/
    #define GPIO_PLC_RESET		GPIO_TO_PIN(2, 1)
    
    /*panel gpio control seamus*/
    #define GPIO_PANNEL_RESET	GPIO_TO_PIN(3, 16)
    #define GPIO_PANNEL_STBY	GPIO_TO_PIN(3, 17)
    
    /*mmc cd pin control seamus*/
    #define GPIO_MMC0_SDCD		GPIO_TO_PIN(0, 6)
    
    static struct ctrl_dev *cdev = (struct ctrl_dev *)CTRL_DEVICE_BASE;
    
    #define GPIO0_RISINGDETECT	(AM33XX_GPIO0_BASE + OMAP_GPIO_RISINGDETECT)
    #define GPIO1_RISINGDETECT	(AM33XX_GPIO1_BASE + OMAP_GPIO_RISINGDETECT)
    
    #define GPIO0_IRQSTATUS1	(AM33XX_GPIO0_BASE + OMAP_GPIO_IRQSTATUS1)
    #define GPIO1_IRQSTATUS1	(AM33XX_GPIO1_BASE + OMAP_GPIO_IRQSTATUS1)
    
    #define GPIO0_IRQSTATUSRAW	(AM33XX_GPIO0_BASE + 0x024)
    #define GPIO1_IRQSTATUSRAW	(AM33XX_GPIO1_BASE + 0x024)
    
    /*
     * Read header information from EEPROM into global structure.
     */
    #ifdef CONFIG_TI_I2C_BOARD_DETECT
    void do_board_detect(void)
    {
    	enable_i2c0_pin_mux();
    	i2c_init(CONFIG_SYS_OMAP24_I2C_SPEED, CONFIG_SYS_OMAP24_I2C_SLAVE);
    
    	if (ti_i2c_eeprom_am_get(CONFIG_EEPROM_BUS_ADDRESS,
    				 CONFIG_EEPROM_CHIP_ADDRESS))
    		printf("ti_i2c_eeprom_init failed\n");
    }
    #endif
    
    #ifndef CONFIG_DM_SERIAL
    struct serial_device *default_serial_console(void)
    {
    	if (board_is_icev2())
    		return &eserial4_device;
    	else
    		return &eserial1_device;
    }
    #endif
    
    #ifndef CONFIG_SKIP_LOWLEVEL_INIT
    static const struct ddr_data ddr2_data = {
    	.datardsratio0 = MT47H128M16RT25E_RD_DQS,
    	.datafwsratio0 = MT47H128M16RT25E_PHY_FIFO_WE,
    	.datawrsratio0 = MT47H128M16RT25E_PHY_WR_DATA,
    };
    
    static const struct cmd_control ddr2_cmd_ctrl_data = {
    	.cmd0csratio = MT47H128M16RT25E_RATIO,
    
    	.cmd1csratio = MT47H128M16RT25E_RATIO,
    
    	.cmd2csratio = MT47H128M16RT25E_RATIO,
    };
    
    static const struct emif_regs ddr2_emif_reg_data = {
    	.sdram_config = MT47H128M16RT25E_EMIF_SDCFG,
    	.ref_ctrl = MT47H128M16RT25E_EMIF_SDREF,
    	.sdram_tim1 = MT47H128M16RT25E_EMIF_TIM1,
    	.sdram_tim2 = MT47H128M16RT25E_EMIF_TIM2,
    	.sdram_tim3 = MT47H128M16RT25E_EMIF_TIM3,
    	.emif_ddr_phy_ctlr_1 = MT47H128M16RT25E_EMIF_READ_LATENCY,
    };
    
    static const struct emif_regs ddr2_evm_emif_reg_data = {
    	.sdram_config = MT47H128M16RT25E_EMIF_SDCFG,
    	.ref_ctrl = MT47H128M16RT25E_EMIF_SDREF,
    	.sdram_tim1 = MT47H128M16RT25E_EMIF_TIM1,
    	.sdram_tim2 = MT47H128M16RT25E_EMIF_TIM2,
    	.sdram_tim3 = MT47H128M16RT25E_EMIF_TIM3,
    	.ocp_config = EMIF_OCP_CONFIG_AM335X_EVM,
    	.emif_ddr_phy_ctlr_1 = MT47H128M16RT25E_EMIF_READ_LATENCY,
    };
    
    static const struct ddr_data ddr3_data = {
    	/*+++ vern,20161126, for 512 DDR+++*/
    	/*.datardsratio0 = MT41J128MJT125_RD_DQS,
    	.datawdsratio0 = MT41J128MJT125_WR_DQS,
    	.datafwsratio0 = MT41J128MJT125_PHY_FIFO_WE,
    	.datawrsratio0 = MT41J128MJT125_PHY_WR_DATA,*/
    	.datardsratio0 = 0x00000040,
    	.datawdsratio0 = 0x00000080,
    	.datafwsratio0 = 0x000000E9,
    	.datawrsratio0 = 0x000000C0,
    		/*--- vern,20161126, for 512 DDR---*/	
    };
    
    static const struct ddr_data ddr3_beagleblack_data = {
    	.datardsratio0 = MT41K256M16HA125E_RD_DQS,
    	.datawdsratio0 = MT41K256M16HA125E_WR_DQS,
    	.datafwsratio0 = MT41K256M16HA125E_PHY_FIFO_WE,
    	.datawrsratio0 = MT41K256M16HA125E_PHY_WR_DATA,
    };
    
    static const struct ddr_data ddr3_evm_data = {
    /*	.datardsratio0 = MT41J512M8RH125_RD_DQS,
    	.datawdsratio0 = MT41J512M8RH125_WR_DQS,
    	.datafwsratio0 = MT41J512M8RH125_PHY_FIFO_WE,
    	.datawrsratio0 = MT41J512M8RH125_PHY_WR_DATA,*/
    	.datardsratio0 = 0x00000040,
    	.datawdsratio0 = 0x00000080,
    	.datafwsratio0 = 0x000000E9,
    	.datawrsratio0 = 0x000000C0,
    };
    
    static const struct ddr_data ddr3_icev2_data = {
    	.datardsratio0 = MT41J128MJT125_RD_DQS_400MHz,
    	.datawdsratio0 = MT41J128MJT125_WR_DQS_400MHz,
    	.datafwsratio0 = MT41J128MJT125_PHY_FIFO_WE_400MHz,
    	.datawrsratio0 = MT41J128MJT125_PHY_WR_DATA_400MHz,
    };
    
    static const struct cmd_control ddr3_cmd_ctrl_data = {
    	/*.cmd0csratio = MT41J128MJT125_RATIO,
    	.cmd0iclkout = MT41J128MJT125_INVERT_CLKOUT,
    
    	.cmd1csratio = MT41J128MJT125_RATIO,
    	.cmd1iclkout = MT41J128MJT125_INVERT_CLKOUT,
    
    	.cmd2csratio = MT41J128MJT125_RATIO,
    	.cmd2iclkout = MT41J128MJT125_INVERT_CLKOUT,*/
    	.cmd0csratio = 0x00000100,
    	.cmd0iclkout = 0x00000001,
    
    	.cmd1csratio = 0x00000100,
    	.cmd1iclkout = 0x00000001,
    
    	.cmd2csratio = 0x00000100,
    	.cmd2iclkout = 0x00000001,	
    };
    
    static const struct cmd_control ddr3_beagleblack_cmd_ctrl_data = {
    	.cmd0csratio = MT41K256M16HA125E_RATIO,
    	.cmd0iclkout = MT41K256M16HA125E_INVERT_CLKOUT,
    
    	.cmd1csratio = MT41K256M16HA125E_RATIO,
    	.cmd1iclkout = MT41K256M16HA125E_INVERT_CLKOUT,
    
    	.cmd2csratio = MT41K256M16HA125E_RATIO,
    	.cmd2iclkout = MT41K256M16HA125E_INVERT_CLKOUT,
    };
    
    static const struct cmd_control ddr3_evm_cmd_ctrl_data = {
    	/*.cmd0csratio = MT41J512M8RH125_RATIO,
    	.cmd0iclkout = MT41J512M8RH125_INVERT_CLKOUT,
    
    	.cmd1csratio = MT41J512M8RH125_RATIO,
    	.cmd1iclkout = MT41J512M8RH125_INVERT_CLKOUT,
    
    	.cmd2csratio = MT41J512M8RH125_RATIO,
    	.cmd2iclkout = MT41J512M8RH125_INVERT_CLKOUT,*/
    	.cmd0csratio = 0x00000100,
    	.cmd0iclkout = 0x00000001,
    
    	.cmd1csratio = 0x00000100,
    	.cmd1iclkout = 0x00000001,
    
    	.cmd2csratio = 0x00000100,
    	.cmd2iclkout = 0x00000001,
    };
    
    static const struct cmd_control ddr3_icev2_cmd_ctrl_data = {
    	.cmd0csratio = MT41J128MJT125_RATIO_400MHz,
    	.cmd0iclkout = MT41J128MJT125_INVERT_CLKOUT_400MHz,
    
    	.cmd1csratio = MT41J128MJT125_RATIO_400MHz,
    	.cmd1iclkout = MT41J128MJT125_INVERT_CLKOUT_400MHz,
    
    	.cmd2csratio = MT41J128MJT125_RATIO_400MHz,
    	.cmd2iclkout = MT41J128MJT125_INVERT_CLKOUT_400MHz,
    };
    
    static struct emif_regs ddr3_emif_reg_data = {
    	/*.sdram_config = MT41J128MJT125_EMIF_SDCFG,
    	.ref_ctrl = MT41J128MJT125_EMIF_SDREF,
    	.sdram_tim1 = MT41J128MJT125_EMIF_TIM1,
    	.sdram_tim2 = MT41J128MJT125_EMIF_TIM2,
    	.sdram_tim3 = MT41J128MJT125_EMIF_TIM3,
    	.zq_config = MT41J128MJT125_ZQ_CFG,
    	.emif_ddr_phy_ctlr_1 = MT41J128MJT125_EMIF_READ_LATENCY |
    				PHY_EN_DYN_PWRDN,*/
    	.sdram_config = 0x61A05332,
    	.ref_ctrl = 0x0000093B,
    	.sdram_tim1 = 0x0888A39B,
    	.sdram_tim2 = 0x24517FDA,
    	.sdram_tim3 = 0x50FFE4EF,
    	.zq_config = 0x500750C6,
    	.emif_ddr_phy_ctlr_1 = 0x00100208,	
    };
    
    static struct emif_regs ddr3_beagleblack_emif_reg_data = {
    	.sdram_config = MT41K256M16HA125E_EMIF_SDCFG,
    	.ref_ctrl = MT41K256M16HA125E_EMIF_SDREF,
    	.sdram_tim1 = MT41K256M16HA125E_EMIF_TIM1,
    	.sdram_tim2 = MT41K256M16HA125E_EMIF_TIM2,
    	.sdram_tim3 = MT41K256M16HA125E_EMIF_TIM3,
    	.ocp_config = EMIF_OCP_CONFIG_BEAGLEBONE_BLACK,
    	.zq_config = MT41K256M16HA125E_ZQ_CFG,
    	.emif_ddr_phy_ctlr_1 = MT41K256M16HA125E_EMIF_READ_LATENCY,
    };
    
    static struct emif_regs ddr3_evm_emif_reg_data = {
    	/*.sdram_config = MT41J512M8RH125_EMIF_SDCFG,
    	.ref_ctrl = MT41J512M8RH125_EMIF_SDREF,
    	.sdram_tim1 = MT41J512M8RH125_EMIF_TIM1,
    	.sdram_tim2 = MT41J512M8RH125_EMIF_TIM2,
    	.sdram_tim3 = MT41J512M8RH125_EMIF_TIM3,
    	.zq_config = MT41J512M8RH125_ZQ_CFG,
    	.emif_ddr_phy_ctlr_1 = MT41J512M8RH125_EMIF_READ_LATENCY |
    				PHY_EN_DYN_PWRDN,*/
    	.sdram_config = 0x61A05332,
    	.ref_ctrl = 0x0000093B,
    	.sdram_tim1 = 0x0888A39B,
    	.sdram_tim2 = 0x24517FDA,
    	.sdram_tim3 = 0x50FFE4EF,
    	.zq_config = 0x500750C6,
    	.emif_ddr_phy_ctlr_1 = 0x00100208,	
    };
    
    static struct emif_regs ddr3_icev2_emif_reg_data = {
    	.sdram_config = MT41J128MJT125_EMIF_SDCFG_400MHz,
    	.ref_ctrl = MT41J128MJT125_EMIF_SDREF_400MHz,
    	.sdram_tim1 = MT41J128MJT125_EMIF_TIM1_400MHz,
    	.sdram_tim2 = MT41J128MJT125_EMIF_TIM2_400MHz,
    	.sdram_tim3 = MT41J128MJT125_EMIF_TIM3_400MHz,
    	.zq_config = MT41J128MJT125_ZQ_CFG_400MHz,
    	.emif_ddr_phy_ctlr_1 = MT41J128MJT125_EMIF_READ_LATENCY_400MHz |
    				PHY_EN_DYN_PWRDN,
    };
    
    #ifdef CONFIG_SPL_OS_BOOT
    int spl_start_uboot(void)
    {
    	/* break into full u-boot on 'c' */
    	if (serial_tstc() && serial_getc() == 'c')
    		return 1;
    
    #ifdef CONFIG_SPL_ENV_SUPPORT
    	env_init();
    	env_load();
    	if (env_get_yesno("boot_os") != 1)
    		return 1;
    #endif
    
    	return 0;
    }
    #endif
    
    const struct dpll_params *get_dpll_ddr_params(void)
    {
    	int ind = get_sys_clk_index();
    
    	return &dpll_ddr3_303MHz[ind];
    }
    
    static u8 bone_not_connected_to_ac_power(void)
    {
    	if (board_is_bone()) {
    		uchar pmic_status_reg;
    		if (tps65217_reg_read(TPS65217_STATUS,
    				      &pmic_status_reg))
    			return 1;
    		if (!(pmic_status_reg & TPS65217_PWR_SRC_AC_BITMASK)) {
    			puts("No AC power, switching to default OPP\n");
    			return 1;
    		}
    	}
    	return 0;
    }
    
    const struct dpll_params *get_dpll_mpu_params(void)
    {
    	int ind = get_sys_clk_index();
    	int freq = am335x_get_efuse_mpu_max_freq(cdev);
    
    	if (bone_not_connected_to_ac_power())
    		freq = MPUPLL_M_600;
    
    	if (board_is_bone_lt())
    		freq = MPUPLL_M_1000;
    
    	switch (freq) {
    	case MPUPLL_M_1000:
    		return &dpll_mpu_opp[ind][5];
    	case MPUPLL_M_800:
    		return &dpll_mpu_opp[ind][4];
    	case MPUPLL_M_720:
    		return &dpll_mpu_opp[ind][3];
    	case MPUPLL_M_600:
    		return &dpll_mpu_opp[ind][2];
    	case MPUPLL_M_500:
    		return &dpll_mpu_opp100;
    	case MPUPLL_M_300:
    		return &dpll_mpu_opp[ind][0];
    	}
    
    	return &dpll_mpu_opp[ind][0];
    }
    
    static void scale_vcores_bone(int freq)
    {
    	int usb_cur_lim, mpu_vdd;
    
    	/*
    	 * Only perform PMIC configurations if board rev > A1
    	 * on Beaglebone White
    	 */
    	if (board_is_bone() && !strncmp(board_ti_get_rev(), "00A1", 4))
    		return;
    
    	if (i2c_probe(TPS65217_CHIP_PM))
    		return;
    
    	/*
    	 * On Beaglebone White we need to ensure we have AC power
    	 * before increasing the frequency.
    	 */
    	if (bone_not_connected_to_ac_power())
    		freq = MPUPLL_M_600;
    
    	/*
    	 * Override what we have detected since we know if we have
    	 * a Beaglebone Black it supports 1GHz.
    	 */
    	if (board_is_bone_lt())
    		freq = MPUPLL_M_1000;
    
    	switch (freq) {
    	case MPUPLL_M_1000:
    		mpu_vdd = TPS65217_DCDC_VOLT_SEL_1325MV;
    		usb_cur_lim = TPS65217_USB_INPUT_CUR_LIMIT_1800MA;
    		break;
    	case MPUPLL_M_800:
    		mpu_vdd = TPS65217_DCDC_VOLT_SEL_1275MV;
    		usb_cur_lim = TPS65217_USB_INPUT_CUR_LIMIT_1300MA;
    		break;
    	case MPUPLL_M_720:
    		mpu_vdd = TPS65217_DCDC_VOLT_SEL_1200MV;
    		usb_cur_lim = TPS65217_USB_INPUT_CUR_LIMIT_1300MA;
    		break;
    	case MPUPLL_M_600:
    	case MPUPLL_M_500:
    	case MPUPLL_M_300:
    	default:
    		mpu_vdd = TPS65217_DCDC_VOLT_SEL_1100MV;
    		usb_cur_lim = TPS65217_USB_INPUT_CUR_LIMIT_1300MA;
    		break;
    	}
    
    	if (tps65217_reg_write(TPS65217_PROT_LEVEL_NONE,
    			       TPS65217_POWER_PATH,
    			       usb_cur_lim,
    			       TPS65217_USB_INPUT_CUR_LIMIT_MASK))
    		puts("tps65217_reg_write failure\n");
    
    	/* Set DCDC3 (CORE) voltage to 1.10V */
    	if (tps65217_voltage_update(TPS65217_DEFDCDC3,
    				    TPS65217_DCDC_VOLT_SEL_1100MV)) {
    		puts("tps65217_voltage_update failure\n");
    		return;
    	}
    
    	/* Set DCDC2 (MPU) voltage */
    	if (tps65217_voltage_update(TPS65217_DEFDCDC2, mpu_vdd)) {
    		puts("tps65217_voltage_update failure\n");
    		return;
    	}
    
    	/*
    	 * Set LDO3, LDO4 output voltage to 3.3V for Beaglebone.
    	 * Set LDO3 to 1.8V and LDO4 to 3.3V for Beaglebone Black.
    	 */
    	if (board_is_bone()) {
    		if (tps65217_reg_write(TPS65217_PROT_LEVEL_2,
    				       TPS65217_DEFLS1,
    				       TPS65217_LDO_VOLTAGE_OUT_3_3,
    				       TPS65217_LDO_MASK))
    			puts("tps65217_reg_write failure\n");
    	} else {
    		if (tps65217_reg_write(TPS65217_PROT_LEVEL_2,
    				       TPS65217_DEFLS1,
    				       TPS65217_LDO_VOLTAGE_OUT_1_8,
    				       TPS65217_LDO_MASK))
    			puts("tps65217_reg_write failure\n");
    	}
    
    	if (tps65217_reg_write(TPS65217_PROT_LEVEL_2,
    			       TPS65217_DEFLS2,
    			       TPS65217_LDO_VOLTAGE_OUT_3_3,
    			       TPS65217_LDO_MASK))
    		puts("tps65217_reg_write failure\n");
    }
    
    void scale_vcores_generic(int freq)
    {
    	int sil_rev, mpu_vdd;
    
    	/*
    	 * The GP EVM, IDK and EVM SK use a TPS65910 PMIC.  For all
    	 * MPU frequencies we support we use a CORE voltage of
    	 * 1.10V.  For MPU voltage we need to switch based on
    	 * the frequency we are running at.
    	 */
    	if (i2c_probe(TPS65910_CTRL_I2C_ADDR))
    		return;
    
    	/*
    	 * Depending on MPU clock and PG we will need a different
    	 * VDD to drive at that speed.
    	 */
    	sil_rev = readl(&cdev->deviceid) >> 28;
    	mpu_vdd = am335x_get_tps65910_mpu_vdd(sil_rev, freq);
    
    	/* Tell the TPS65910 to use i2c */
    	tps65910_set_i2c_control();
    
    	/* First update MPU voltage. */
    	if (tps65910_voltage_update(MPU, mpu_vdd))
    		return;
    
    	/* Second, update the CORE voltage. */
    	if (tps65910_voltage_update(CORE, TPS65910_OP_REG_SEL_1_1_0))
    		return;
    
    }
    
    void gpi2c_init(void)
    {
    	/* When needed to be invoked prior to BSS initialization */
    	static bool first_time = true;
    
    	if (first_time) {
    		enable_i2c0_pin_mux();
    		i2c_init(CONFIG_SYS_OMAP24_I2C_SPEED,
    			 CONFIG_SYS_OMAP24_I2C_SLAVE);
    		first_time = false;
    	}
    }
    
    void scale_vcores(void)
    {
    	int freq;
    
    	gpi2c_init();
    	freq = am335x_get_efuse_mpu_max_freq(cdev);
    
    	if (board_is_beaglebonex())
    		scale_vcores_bone(freq);
    	else
    		scale_vcores_generic(freq);
    }
    
    void set_uart_mux_conf(void)
    {
    #if CONFIG_CONS_INDEX == 1
    	enable_uart0_pin_mux();
    #elif CONFIG_CONS_INDEX == 2
    	enable_uart1_pin_mux();
    #elif CONFIG_CONS_INDEX == 3
    	enable_uart2_pin_mux();
    #elif CONFIG_CONS_INDEX == 4
    	enable_uart3_pin_mux();
    #elif CONFIG_CONS_INDEX == 5
    	enable_uart4_pin_mux();
    #elif CONFIG_CONS_INDEX == 6
    	enable_uart5_pin_mux();
    #endif
    }
    
    void set_mux_conf_regs(void)
    {
    	enable_board_pin_mux();
    }
    
    const struct ctrl_ioregs ioregs_evmsk = {
    	/*.cm0ioctl		= MT41J128MJT125_IOCTRL_VALUE,
    	.cm1ioctl		= MT41J128MJT125_IOCTRL_VALUE,
    	.cm2ioctl		= MT41J128MJT125_IOCTRL_VALUE,
    	.dt0ioctl		= MT41J128MJT125_IOCTRL_VALUE,
    	.dt1ioctl		= MT41J128MJT125_IOCTRL_VALUE,*/
    	.cm0ioctl		= MT41K256M16HA125E_IOCTRL_VALUE,
    	.cm1ioctl		= MT41K256M16HA125E_IOCTRL_VALUE,
    	.cm2ioctl		= MT41K256M16HA125E_IOCTRL_VALUE,
    	.dt0ioctl		= MT41K256M16HA125E_IOCTRL_VALUE,
    	.dt1ioctl		= MT41K256M16HA125E_IOCTRL_VALUE,
    };
    
    const struct ctrl_ioregs ioregs_bonelt = {
    	.cm0ioctl		= MT41K256M16HA125E_IOCTRL_VALUE,
    	.cm1ioctl		= MT41K256M16HA125E_IOCTRL_VALUE,
    	.cm2ioctl		= MT41K256M16HA125E_IOCTRL_VALUE,
    	.dt0ioctl		= MT41K256M16HA125E_IOCTRL_VALUE,
    	.dt1ioctl		= MT41K256M16HA125E_IOCTRL_VALUE,
    };
    
    const struct ctrl_ioregs ioregs_evm15 = {
    	/*.cm0ioctl		= MT41J512M8RH125_IOCTRL_VALUE,
    	.cm1ioctl		= MT41J512M8RH125_IOCTRL_VALUE,
    	.cm2ioctl		= MT41J512M8RH125_IOCTRL_VALUE,
    	.dt0ioctl		= MT41J512M8RH125_IOCTRL_VALUE,
    	.dt1ioctl		= MT41J512M8RH125_IOCTRL_VALUE,*/
    	.cm0ioctl		= 0x0000018B,
    	.cm1ioctl		= 0x0000018B,
    	.cm2ioctl		= 0x0000018B,
    	.dt0ioctl		= 0x0000018B,
    	.dt1ioctl		= 0x0000018B,
    };
    
    const struct ctrl_ioregs ioregs = {
    	/*.cm0ioctl		= MT47H128M16RT25E_IOCTRL_VALUE,
    	.cm1ioctl		= MT47H128M16RT25E_IOCTRL_VALUE,
    	.cm2ioctl		= MT47H128M16RT25E_IOCTRL_VALUE,
    	.dt0ioctl		= MT47H128M16RT25E_IOCTRL_VALUE,
    	.dt1ioctl		= MT47H128M16RT25E_IOCTRL_VALUE,*/
    	.cm0ioctl		= MT41K256M16HA125E_IOCTRL_VALUE,
    	.cm1ioctl		= MT41K256M16HA125E_IOCTRL_VALUE,
    	.cm2ioctl		= MT41K256M16HA125E_IOCTRL_VALUE,
    	.dt0ioctl		= MT41K256M16HA125E_IOCTRL_VALUE,
    	.dt1ioctl		= MT41K256M16HA125E_IOCTRL_VALUE,
    };
    
    void sdram_init(void)
    {
    	if (board_is_evm_sk()) {
    		/*
    		 * EVM SK 1.2A and later use gpio0_7 to enable DDR3.
    		 * This is safe enough to do on older revs.
    		 */
    		gpio_request(GPIO_DDR_VTT_EN, "ddr_vtt_en");
    		gpio_direction_output(GPIO_DDR_VTT_EN, 1);
    	}
    
    	if (board_is_icev2()) {
    		gpio_request(ICE_GPIO_DDR_VTT_EN, "ddr_vtt_en");
    		gpio_direction_output(ICE_GPIO_DDR_VTT_EN, 1);
    	}
    
    	config_ddr(303, &ioregs_evm15, &ddr3_evm_data, &ddr3_evm_cmd_ctrl_data, &ddr3_evm_emif_reg_data, 0);
    }
    #endif
    
    #if !defined(CONFIG_SPL_BUILD) || \
    	(defined(CONFIG_SPL_ETH_SUPPORT) && defined(CONFIG_SPL_BUILD))
    static void request_and_set_gpio(int gpio, char *name, int val)
    {
    	int ret;
    
    	ret = gpio_request(gpio, name);
    	if (ret < 0) {
    		printf("%s: Unable to request %s\n", __func__, name);
    		return;
    	}
    
    	ret = gpio_direction_output(gpio, 0);
    	if (ret < 0) {
    		printf("%s: Unable to set %s  as output\n", __func__, name);
    		goto err_free_gpio;
    	}
    
    	gpio_set_value(gpio, val);
    
    	return;
    
    err_free_gpio:
    	gpio_free(gpio);
    }
    
    #define REQUEST_AND_SET_GPIO(N)	request_and_set_gpio(N, #N, 1);
    #define REQUEST_AND_CLR_GPIO(N)	request_and_set_gpio(N, #N, 0);
    
    /**
     * RMII mode on ICEv2 board needs 50MHz clock. Given the clock
     * synthesizer With a capacitor of 18pF, and 25MHz input clock cycle
     * PLL1 gives an output of 100MHz. So, configuring the div2/3 as 2 to
     * give 50MHz output for Eth0 and 1.
     */
    static struct clk_synth cdce913_data = {
    	.id = 0x81,
    	.capacitor = 0x90,
    	.mux = 0x6d,
    	.pdiv2 = 0x2,
    	.pdiv3 = 0x2,
    };
    #endif
    
    #if !defined(CONFIG_SPL_BUILD) || \
    	(defined(CONFIG_SPL_ETH_SUPPORT) && defined(CONFIG_SPL_BUILD))
    static bool prueth_is_mii = true;
    #endif
    
    /*
     * Basic board specific setup.  Pinmux has been handled already.
     */
    int board_init(void)
    {
    #if defined(CONFIG_HW_WATCHDOG)
    	hw_watchdog_init();
    #endif
    
    	gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
    #if defined(CONFIG_NOR) || defined(CONFIG_NAND)
    	gpmc_init();
    #endif
    
    #if !defined(CONFIG_SPL_BUILD) || \
    	(defined(CONFIG_SPL_ETH_SUPPORT) && defined(CONFIG_SPL_BUILD))
    	if (board_is_icev2()) {
    		int rv;
    		u32 reg;
    		bool eth0_is_mii = true;
    		bool eth1_is_mii = true;
    
    		REQUEST_AND_SET_GPIO(GPIO_PR1_MII_CTRL);
    		/* Make J19 status available on GPIO1_26 */
    		REQUEST_AND_CLR_GPIO(GPIO_MUX_MII_CTRL);
    
    		REQUEST_AND_SET_GPIO(GPIO_FET_SWITCH_CTRL);
    		/*
    		 * Both ports can be set as RMII-CPSW or MII-PRU-ETH using
    		 * jumpers near the port. Read the jumper value and set
    		 * the pinmux, external mux and PHY clock accordingly.
    		 * As jumper line is overridden by PHY RX_DV pin immediately
    		 * after bootstrap (power-up/reset), we need to sample
    		 * it during PHY reset using GPIO rising edge detection.
    		 */
    		REQUEST_AND_SET_GPIO(GPIO_PHY_RESET);
    		/* Enable rising edge IRQ on GPIO0_11 and GPIO 1_26 */
    		reg = readl(GPIO0_RISINGDETECT) | BIT(11);
    		writel(reg, GPIO0_RISINGDETECT);
    		reg = readl(GPIO1_RISINGDETECT) | BIT(26);
    		writel(reg, GPIO1_RISINGDETECT);
    		/* Reset PHYs to capture the Jumper setting */
    		gpio_set_value(GPIO_PHY_RESET, 0);
    		udelay(2);	/* PHY datasheet states 1uS min. */
    		gpio_set_value(GPIO_PHY_RESET, 1);
    
    		reg = readl(GPIO0_IRQSTATUSRAW) & BIT(11);
    		if (reg) {
    			writel(reg, GPIO0_IRQSTATUS1); /* clear irq */
    			/* RMII mode */
    			printf("ETH0, CPSW\n");
    			eth0_is_mii = false;
    		} else {
    			/* MII mode */
    			printf("ETH0, PRU\n");
    			cdce913_data.pdiv3 = 4;	/* 25MHz PHY clk */
    		}
    
    		reg = readl(GPIO1_IRQSTATUSRAW) & BIT(26);
    		if (reg) {
    			writel(reg, GPIO1_IRQSTATUS1); /* clear irq */
    			/* RMII mode */
    			printf("ETH1, CPSW\n");
    			gpio_set_value(GPIO_MUX_MII_CTRL, 1);
    			eth1_is_mii = false;
    		} else {
    			/* MII mode */
    			printf("ETH1, PRU\n");
    			cdce913_data.pdiv2 = 4;	/* 25MHz PHY clk */
    		}
    
    		if (eth0_is_mii != eth1_is_mii) {
    			printf("Unsupported Ethernet port configuration\n");
    			printf("Both ports must be set as RMII or MII\n");
    			hang();
    		}
    
    		prueth_is_mii = eth0_is_mii;
    
    		/* disable rising edge IRQs */
    		reg = readl(GPIO0_RISINGDETECT) & ~BIT(11);
    		writel(reg, GPIO0_RISINGDETECT);
    		reg = readl(GPIO1_RISINGDETECT) & ~BIT(26);
    		writel(reg, GPIO1_RISINGDETECT);
    
    		rv = setup_clock_synthesizer(&cdce913_data);
    		if (rv) {
    			printf("Clock synthesizer setup failed %d\n", rv);
    			return rv;
    		}
    
    		/* reset PHYs */
    		gpio_set_value(GPIO_PHY_RESET, 0);
    		udelay(2);	/* PHY datasheet states 1uS min. */
    		gpio_set_value(GPIO_PHY_RESET, 1);
    	}
    #endif
    	/*+++ Seamus,20190621, MMC0_SDCD gpio control +++*/
    	REQUEST_AND_CLR_GPIO(GPIO_MMC0_SDCD);
    	/*--- Seamus,20190621, MMC0_SDCD gpio control ---*/
    	/*+++ Seamus,20190621, PLC & pannel gpio control +++*/
    	REQUEST_AND_CLR_GPIO(GPIO_PLC_RESET);
    	REQUEST_AND_SET_GPIO(GPIO_PANNEL_RESET);
    	REQUEST_AND_SET_GPIO(GPIO_PANNEL_STBY);
    	udelay(500000);
    	gpio_set_value(GPIO_PLC_RESET, 1);
    	gpio_set_value(GPIO_PANNEL_RESET, 0);
    	udelay(50000);	
    	gpio_set_value(GPIO_PANNEL_STBY, 0);
    	/*--- Seamus,20190621, PLC & pannel gpio control ---*/
    	return 0;
    }
    
    #ifdef CONFIG_BOARD_LATE_INIT
    int board_late_init(void)
    {
    #if !defined(CONFIG_SPL_BUILD)
    	uint8_t mac_addr[6];
    	uint32_t mac_hi, mac_lo;
    #endif
    
    #ifdef CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
    	char *name = NULL;
    
    	if (board_is_bone_lt()) {
    		/* BeagleBoard.org BeagleBone Black Wireless: */
    		if (!strncmp(board_ti_get_rev(), "BWA", 3)) {
    			name = "BBBW";
    		}
    		/* SeeedStudio BeagleBone Green Wireless */
    		if (!strncmp(board_ti_get_rev(), "GW1", 3)) {
    			name = "BBGW";
    		}
    		/* BeagleBoard.org BeagleBone Blue */
    		if (!strncmp(board_ti_get_rev(), "BLA", 3)) {
    			name = "BBBL";
    		}
    	}
    
    	if (board_is_bbg1())
    		name = "BBG1";
    	set_board_info_env(name);
    
    	/*
    	 * Default FIT boot on HS devices. Non FIT images are not allowed
    	 * on HS devices.
    	 */
    	if (get_device_type() == HS_DEVICE)
    		env_set("boot_fit", "1");
    #endif
    
    #if !defined(CONFIG_SPL_BUILD)
    	/* try reading mac address from efuse */
    	mac_lo = readl(&cdev->macid0l);
    	mac_hi = readl(&cdev->macid0h);
    	mac_addr[0] = mac_hi & 0xFF;
    	mac_addr[1] = (mac_hi & 0xFF00) >> 8;
    	mac_addr[2] = (mac_hi & 0xFF0000) >> 16;
    	mac_addr[3] = (mac_hi & 0xFF000000) >> 24;
    	mac_addr[4] = mac_lo & 0xFF;
    	mac_addr[5] = (mac_lo & 0xFF00) >> 8;
    
    	if (!env_get("ethaddr")) {
    		printf("<ethaddr> not set. Validating first E-fuse MAC\n");
    
    		if (is_valid_ethaddr(mac_addr))
    			eth_env_set_enetaddr("ethaddr", mac_addr);
    	}
    
    	mac_lo = readl(&cdev->macid1l);
    	mac_hi = readl(&cdev->macid1h);
    	mac_addr[0] = mac_hi & 0xFF;
    	mac_addr[1] = (mac_hi & 0xFF00) >> 8;
    	mac_addr[2] = (mac_hi & 0xFF0000) >> 16;
    	mac_addr[3] = (mac_hi & 0xFF000000) >> 24;
    	mac_addr[4] = mac_lo & 0xFF;
    	mac_addr[5] = (mac_lo & 0xFF00) >> 8;
    
    	if (!env_get("eth1addr")) {
    		if (is_valid_ethaddr(mac_addr))
    			eth_env_set_enetaddr("eth1addr", mac_addr);
    	}
    
    	env_set("ice_mii", prueth_is_mii ? "mii" : "rmii");
    #endif
    
    	return 0;
    }
    #endif
    
    #ifndef CONFIG_DM_ETH
    
    #if (defined(CONFIG_DRIVER_TI_CPSW) && !defined(CONFIG_SPL_BUILD)) || \
    	(defined(CONFIG_SPL_ETH_SUPPORT) && defined(CONFIG_SPL_BUILD))
    static void cpsw_control(int enabled)
    {
    	/* VTP can be added here */
    
    	return;
    }
    
    static struct cpsw_slave_data cpsw_slaves[] = {
    	{
    		.slave_reg_ofs	= 0x208,
    		.sliver_reg_ofs	= 0xd80,
    		.phy_addr	= 2,
    	},
    	{
    		.slave_reg_ofs	= 0x308,
    		.sliver_reg_ofs	= 0xdc0,
    		.phy_addr	= 3,
    	},
    };
    
    static struct cpsw_platform_data cpsw_data = {
    	.mdio_base		= CPSW_MDIO_BASE,
    	.cpsw_base		= CPSW_BASE,
    	.mdio_div		= 0xff,
    	.channels		= 8,
    	.cpdma_reg_ofs		= 0x800,
    	.slaves			= 1,
    	.slave_data		= cpsw_slaves,
    	.ale_reg_ofs		= 0xd00,
    	.ale_entries		= 1024,
    	.host_port_reg_ofs	= 0x108,
    	.hw_stats_reg_ofs	= 0x900,
    	.bd_ram_ofs		= 0x2000,
    	.mac_control		= (1 << 5),
    	.control		= cpsw_control,
    	.host_port_num		= 0,
    	.version		= CPSW_CTRL_VERSION_2,
    };
    #endif
    
    #if ((defined(CONFIG_SPL_ETH_SUPPORT) || defined(CONFIG_SPL_USBETH_SUPPORT)) &&\
    	defined(CONFIG_SPL_BUILD)) || \
    	((defined(CONFIG_DRIVER_TI_CPSW) || \
    	  defined(CONFIG_USB_ETHER) && defined(CONFIG_MUSB_GADGET)) && \
    	 !defined(CONFIG_SPL_BUILD))
    
    /*
     * This function will:
     * Read the eFuse for MAC addresses, and set ethaddr/eth1addr/usbnet_devaddr
     * in the environment
     * Perform fixups to the PHY present on certain boards.  We only need this
     * function in:
     * - SPL with either CPSW or USB ethernet support
     * - Full U-Boot, with either CPSW or USB ethernet
     * Build in only these cases to avoid warnings about unused variables
     * when we build an SPL that has neither option but full U-Boot will.
     */
    int board_eth_init(bd_t *bis)
    {
    	int rv, n = 0;
    #if defined(CONFIG_USB_ETHER) && \
    	(!defined(CONFIG_SPL_BUILD) || defined(CONFIG_SPL_USBETH_SUPPORT))
    	uint8_t mac_addr[6];
    	uint32_t mac_hi, mac_lo;
    
    	/*
    	 * use efuse mac address for USB ethernet as we know that
    	 * both CPSW and USB ethernet will never be active at the same time
    	 */
    	mac_lo = readl(&cdev->macid0l);
    	mac_hi = readl(&cdev->macid0h);
    	mac_addr[0] = mac_hi & 0xFF;
    	mac_addr[1] = (mac_hi & 0xFF00) >> 8;
    	mac_addr[2] = (mac_hi & 0xFF0000) >> 16;
    	mac_addr[3] = (mac_hi & 0xFF000000) >> 24;
    	mac_addr[4] = mac_lo & 0xFF;
    	mac_addr[5] = (mac_lo & 0xFF00) >> 8;
    #endif
    
    
    #if (defined(CONFIG_DRIVER_TI_CPSW) && !defined(CONFIG_SPL_BUILD)) || \
    	(defined(CONFIG_SPL_ETH_SUPPORT) && defined(CONFIG_SPL_BUILD))
    	if (!env_get("ethaddr")) {
    		puts("<ethaddr> not set. Validating first E-fuse MAC\n");
    		if (is_valid_ethaddr(mac_addr))
    			eth_env_set_enetaddr("ethaddr", mac_addr);
    	}
    
    #ifdef CONFIG_DRIVER_TI_CPSW
    	if (board_is_bone() || board_is_bone_lt() ||
    	    board_is_idk()) {
    		writel(MII_MODE_ENABLE, &cdev->miisel);
    		cpsw_slaves[0].phy_if = cpsw_slaves[1].phy_if =
    				PHY_INTERFACE_MODE_MII;
    	} else if (board_is_icev2()) {
    		writel(RMII_MODE_ENABLE | RMII_CHIPCKL_ENABLE, &cdev->miisel);
    		cpsw_slaves[0].phy_if = PHY_INTERFACE_MODE_RMII;
    		cpsw_slaves[1].phy_if = PHY_INTERFACE_MODE_RMII;
    		cpsw_slaves[0].phy_addr = 1;
    		cpsw_slaves[1].phy_addr = 3;
    	} else {
    		writel((RMII_MODE_ENABLE | RMII_CHIPCKL_ENABLE), &cdev->miisel);
    		cpsw_slaves[0].phy_if = PHY_INTERFACE_MODE_RMII;
    		cpsw_slaves[1].phy_if = PHY_INTERFACE_MODE_RMII;
    		cpsw_slaves[0].phy_addr = 2;
    		cpsw_slaves[1].phy_addr = 3;
    	}
    
    	rv = cpsw_register(&cpsw_data);
    	if (rv < 0)
    		printf("Error %d registering CPSW switch\n", rv);
    	else
    		n += rv;
    #endif
    
    	/*
    	 *
    	 * CPSW RGMII Internal Delay Mode is not supported in all PVT
    	 * operating points.  So we must set the TX clock delay feature
    	 * in the AR8051 PHY.  Since we only support a single ethernet
    	 * device in U-Boot, we only do this for the first instance.
    	 */
    #define AR8051_PHY_DEBUG_ADDR_REG	0x1d
    #define AR8051_PHY_DEBUG_DATA_REG	0x1e
    #define AR8051_DEBUG_RGMII_CLK_DLY_REG	0x5
    #define AR8051_RGMII_TX_CLK_DLY		0x100
    
    	if (board_is_evm_sk() || board_is_gp_evm()) {
    		const char *devname;
    		devname = miiphy_get_current_dev();
    
    		miiphy_write(devname, 0x0, AR8051_PHY_DEBUG_ADDR_REG,
    				AR8051_DEBUG_RGMII_CLK_DLY_REG);
    		miiphy_write(devname, 0x0, AR8051_PHY_DEBUG_DATA_REG,
    				AR8051_RGMII_TX_CLK_DLY);
    	}
    #endif
    #if defined(CONFIG_USB_ETHER) && \
    	(!defined(CONFIG_SPL_BUILD) || defined(CONFIG_SPL_USBETH_SUPPORT))
    	if (is_valid_ethaddr(mac_addr))
    		eth_env_set_enetaddr("usbnet_devaddr", mac_addr);
    
    	rv = usb_eth_initialize(bis);
    	if (rv < 0)
    		printf("Error %d registering USB_ETHER\n", rv);
    	else
    		n += rv;
    #endif
    	return n;
    }
    #endif
    
    #endif /* CONFIG_DM_ETH */
    
    #ifdef CONFIG_SPL_LOAD_FIT
    int board_fit_config_name_match(const char *name)
    {
    	if (board_is_gp_evm() && !strcmp(name, "am335x-evm"))
    		return 0;
    	else if (board_is_bone() && !strcmp(name, "am335x-bone"))
    		return 0;
    	else if (board_is_bone_lt() && !strcmp(name, "am335x-boneblack"))
    		return 0;
    	else if (board_is_evm_sk() && !strcmp(name, "am335x-evmsk"))
    		return 0;
    	else if (board_is_bbg1() && !strcmp(name, "am335x-bonegreen"))
    		return 0;
    	else if (board_is_icev2() && !strcmp(name, "am335x-icev2"))
    		return 0;
    	else
    		return -1;
    }
    #endif
    
    #ifdef CONFIG_TI_SECURE_DEVICE
    void board_fit_image_post_process(void **p_image, size_t *p_size)
    {
    	secure_boot_verify_image(p_image, p_size);
    }
    #endif
    
    #if !CONFIG_IS_ENABLED(OF_CONTROL)
    static const struct omap_hsmmc_plat am335x_mmc0_platdata = {
    	.base_addr = (struct hsmmc *)OMAP_HSMMC1_BASE,
    	.cfg.host_caps = MMC_MODE_HS_52MHz | MMC_MODE_HS | MMC_MODE_4BIT,
    	.cfg.f_min = 400000,
    	.cfg.f_max = 52000000,
    	.cfg.voltages = MMC_VDD_32_33 | MMC_VDD_33_34 | MMC_VDD_165_195,
    	.cfg.b_max = CONFIG_SYS_MMC_MAX_BLK_COUNT,
    };
    
    U_BOOT_DEVICE(am335x_mmc0) = {
    	.name = "omap_hsmmc",
    	.platdata = &am335x_mmc0_platdata,
    };
    
    static const struct omap_hsmmc_plat am335x_mmc1_platdata = {
    	.base_addr = (struct hsmmc *)OMAP_HSMMC2_BASE,
    	.cfg.host_caps = MMC_MODE_HS_52MHz | MMC_MODE_HS | MMC_MODE_8BIT,
    	.cfg.f_min = 400000,
    	.cfg.f_max = 52000000,
    	.cfg.voltages = MMC_VDD_32_33 | MMC_VDD_33_34 | MMC_VDD_165_195,
    	.cfg.b_max = CONFIG_SYS_MMC_MAX_BLK_COUNT,
    };
    
    U_BOOT_DEVICE(am335x_mmc1) = {
    	.name = "omap_hsmmc",
    	.platdata = &am335x_mmc1_platdata,
    };
    #endif
    

    5432.AM335x_EMIF_Configuration_Tool_v2.xlsx

  • Hi James,

    LCDC seams well now, after we follow https://www.ti.com/lit/an/sprack4/sprack4.pdf to modify u-boot’s board.c and without SW leveling.

    Thanks