您尚未登录。

楼主 # 2022-08-11 10:39:16

Abbet
会员
注册时间: 2022-07-18
已发帖子: 2
积分: 2

更换正点原子7寸RGB LCD(1024*600),启动失败

U-boot配置(生成.config文件):

CONFIG_VIDEO_SUNXI=y
CONFIG_VIDEO_LCD_MODE="x:1024,y:600,depth:24,pclk_khz:33000,le:140,ri:160,up:20,lo:12,hs:20,vs:3,sync:3,vmode:0"

设备树修改(suniv-f1c100s-licheepi-nano.dts):

	panel: panel {
		compatible = "ab,ab7_inch", "simple-panel";    //原compatible = "lg,lb070wv8", "simple-panel";
		#address-cells = <1>;
		#size-cells = <0>;
		enable-gpios = <&pio 4 6 GPIO_ACTIVE_HIGH>;

		port@0 {
			reg = <0>;
			#address-cells = <1>;
			#size-cells = <0>;
			panel_input: endpoint@0 {
				reg = <0>;
				remote-endpoint = <&tcon0_out_lcd>;
			};
		};
	};

panel-simple.c添加:

static const struct of_device_id platform_of_match[] = {
	{
		.compatible = "ampire,am-480272h3tmqw-t01h",
		.data = &ampire_am_480272h3tmqw_t01h,
	}, 
        ......
	{
		.compatible = "urt,umsh-8596md-19t",
		.data = &urt_umsh_8596md_lvds,
	}, {
		.compatible = "ab,ab7_inch",     //添加部分
		.data = &ab7_inch                    //添加部分
	}, {
		/* sentinel */
	}
};
static const struct drm_display_mode ab7_inch_mode = {
	.clock = 51000,
	.hdisplay = 1024,
	.hsync_start = 1024 + 160,
	.hsync_end = 1024 + 160 + 20,
	.htotal = 1024 + 160 + 20 + 140,
	.vdisplay = 600,
	.vsync_start = 600 + 12,
	.vsync_end = 600 + 12 + 3,
	.vtotal = 600 + 12 + 3 + 20,
	.vrefresh = 60,
};

static const struct panel_desc ab7_inch = {
	.modes = &ab7_inch_mode,
	.num_modes = 1,
	.bpc = 6,
	.size = {
		.width = 154,
		.height = 85,
	},
	.bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
};

启动打印信息:

U-Boot 2018.01-05688-ga9729b3241-dirty (Aug 11 2022 - 09:50:01 +0800) Allwinner Technology

CPU:   Allwinner F Series (SUNIV)
Model: Lichee Pi Nano
DRAM:  32 MiB
MMC:   SUNXI SD/MMC: 0
SF: Detected xt25f128b with page size 256 Bytes, erase size 4 KiB, total 16 MiB
*** Warning - bad CRC, using default environment

Setting up a 1024x600 lcd console (overscan 0x0)
In:    serial@1c25000
Out:   serial@1c25000
Err:   serial@1c25000
Net:   No ethernet found.
starting USB...
No controllers found
Hit any key to stop autoboot:  0
SF: Detected xt25f128b with page size 256 Bytes, erase size 4 KiB, total 16 MiB
device 0 offset 0x100000, size 0x4000
SF: 16384 bytes @ 0x100000 Read: OK
device 0 offset 0x110000, size 0x400000
SF: 4194304 bytes @ 0x110000 Read: OK
## Flattened Device Tree blob at 80c00000
   Booting using the fdt blob at 0x80c00000
   Loading Device Tree to 816fb000, end 816fffab ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.15.0-rc8-licheepi-nano+ (abbet@abbet) (gcc version 7.2.1 20171011 (Linaro GCC 7.2-2017.11)) #21 Thu Aug 11 09:48:55 CST 2022
[    0.000000] CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=0005317f
[    0.000000] CPU: VIVT data cache, VIVT instruction cache
[    0.000000] OF: fdt: Machine model: Lichee Pi Nano
[    0.000000] Memory policy: Data cache writeback
[    0.000000] random: fast init done
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 8128
[    0.000000] Kernel command line: console=ttyS0,115200 earlyprintk panic=5 root=/dev/mtdblock3 rw rootfstype=jffs2 init=/linuxrc
[    0.000000] Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Memory: 22688K/32768K available (6144K kernel code, 234K rwdata, 1344K rodata, 1024K init, 233K bss, 10080K reserved, 0K 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 : 0xc2800000 - 0xff800000   ( 976 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xc2000000   (  32 MB)
[    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
[    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
[    0.000000]       .text : 0x(ptrval) - 0x(ptrval)   (7136 kB)
[    0.000000]       .init : 0x(ptrval) - 0x(ptrval)   (1024 kB)
[    0.000000]       .data : 0x(ptrval) - 0x(ptrval)   ( 235 kB)
[    0.000000]        .bss : 0x(ptrval) - 0x(ptrval)   ( 234 kB)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000044] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
[    0.000098] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.000595] Console: colour dummy device 80x30
[    0.000668] Calibrating delay loop... 395.67 BogoMIPS (lpj=1978368)
[    0.120243] pid_max: default: 32768 minimum: 301
[    0.120480] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.120530] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.121771] CPU: Testing write buffer coherency: ok
[    0.123481] Setting up static identity map for 0x80100000 - 0x80100058
[    0.125462] devtmpfs: initialized
[    0.130000] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.130065] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.130418] pinctrl core: initialized pinctrl subsystem
[    0.132338] NET: Registered protocol family 16
[    0.133870] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.135347] cpuidle: using governor menu
[    0.153752] SCSI subsystem initialized
[    0.154036] usbcore: registered new interface driver usbfs
[    0.154150] usbcore: registered new interface driver hub
[    0.154355] usbcore: registered new device driver usb
[    0.154721] pps_core: LinuxPPS API ver. 1 registered
[    0.154743] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.154795] PTP clock support registered
[    0.155227] Advanced Linux Sound Architecture Driver Initialized.
[    0.156466] clocksource: Switched to clocksource timer
[    0.181180] NET: Registered protocol family 2
[    0.182358] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.182422] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.182454] TCP: Hash tables configured (established 1024 bind 1024)
[    0.182788] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.182851] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.183288] NET: Registered protocol family 1
[    0.185012] NetWinder Floating Point Emulator V0.97 (double precision)
[    0.186833] Initialise system trusted keyrings
[    0.187369] workingset: timestamp_bits=30 max_order=13 bucket_order=0
[    0.198876] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[    0.210915] Key type asymmetric registered
[    0.210956] Asymmetric key parser 'x509' registered
[    0.211155] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251)
[    0.211183] io scheduler noop registered
[    0.211195] io scheduler deadline registered
[    0.211812] io scheduler cfq registered (default)
[    0.211840] io scheduler mq-deadline registered
[    0.211852] io scheduler kyber registered
[    0.212765] sun4i-usb-phy 1c13400.phy: Couldn't request ID GPIO
[    0.220439] suniv-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[    0.378115] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[    0.384016] console [ttyS0] disabled
[    0.404314] 1c25000.serial: ttyS0 at MMIO 0x1c25000 (irq = 23, base_baud = 6250000) is a 16550A
[    0.844760] console [ttyS0] enabled
[    0.853119] panel-simple panel: panel supply power not found, using dummy regulator
[    0.880585] loop: module loaded
[    0.884444] SCSI Media Changer driver v0.25
[    0.891933] m25p80 spi0.0: xt25f128b (16384 Kbytes)
[    0.896992] 4 ofpart partitions found on MTD device spi0.0
[    0.902469] Creating 4 MTD partitions on "spi0.0":
[    0.907355] 0x000000000000-0x000000100000 : "u-boot"
[    0.914742] 0x000000100000-0x000000110000 : "dtb"
[    0.921796] 0x000000110000-0x000000510000 : "kernel"
[    0.929090] 0x000000510000-0x000001000000 : "rootfs"
[    0.936795] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    0.943329] ehci-platform: EHCI generic platform driver
[    0.948844] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    0.955056] ohci-platform: OHCI generic platform driver
[    0.960688] usbcore: registered new interface driver usb-storage
[    0.967654] udc-core: couldn't find an available UDC - added [g_cdc] to list of pending drivers
[    0.976790] i2c /dev entries driver
[    1.036586] sunxi-mmc 1c0f000.mmc: base:0xc92523b2 irq:19
[    1.043806] usbcore: registered new interface driver usbhid
[    1.049502] usbhid: USB HID core driver
[    1.068391] NET: Registered protocol family 17
[    1.072939] Key type dns_resolver registered
[    1.079351] Loading compiled-in X.509 certificates
[    1.093849] sun4i-drm display-engine: bound 1e60000.display-backend (ops 0xc0736c38)
[    1.102542] sun4i-drm display-engine: bound 1c0c000.lcd-controller (ops 0xc0735f1c)
[    1.110334] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[    1.116986] [drm] No driver support for vblank timestamp query.
[    1.125324] sun4i-drm display-engine: Failed to set initial hw configuration.
[    1.132594] sun4i-drm display-engine: Couldn't create our framebuffer
[    1.139578] sun4i-drm display-engine: master bind failed: -12
[    1.145800] sun4i-tcon: probe of 1c0c000.lcd-controller failed with error -12
[    1.154286] usb_phy_generic usb_phy_generic.0.auto: usb_phy_generic.0.auto supply vcc not found, using dummy regulator
[    1.165940] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
[    1.171836] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 1
[    1.182654] hub 1-0:1.0: USB hub found
[    1.186657] hub 1-0:1.0: 1 port detected
[    1.191726] using random self ethernet address
[    1.196180] using random host ethernet address
[    1.202046] usb0: HOST MAC 5a:68:2a:fe:d5:eb
[    1.206401] usb0: MAC c2:16:41:d1:5d:8a
[    1.210413] g_cdc gadget: CDC Composite Gadget, version: King Kamehameha Day 2008
[    1.217941] g_cdc gadget: g_cdc ready
[    1.222334] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[    1.236123] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[    1.242897] Internal error: Oops - undefined instruction: 0 [#1] ARM
[    1.249237] Modules linked in:
[    1.252299] CPU: 0 PID: 1 Comm: swapper Not tainted 4.15.0-rc8-licheepi-nano+ #21
[    1.259750] Hardware name: Allwinner suniv Family
[    1.264441] PC is at 0xc0cc7390
[    1.267604] LR is at regmap_read+0x2c/0x5c
[    1.271688] pc : [<c0cc7390>]    lr : [<c03d2158>]    psr: 60000093
[    1.277928] sp : c182de98  ip : 20000093  fp : 000000a6
[    1.283131] r10: c092f3cc  r9 : c0920838  r8 : c0a3ab60
[    1.288336] r7 : c0920834  r6 : c182deac  r5 : 00000044  r4 : c0cb4a00
[    1.294836] r3 : c0cc7300  r2 : c182deac  r1 : 00000044  r0 : 00000004
[    1.301338] Flags: nZCv  IRQs off  FIQs on  Mode SVC_32  ISA ARM  Segment none
[    1.308532] Control: 0005317f  Table: 80004000  DAC: 00000053
[    1.314264] Process swapper (pid: 1, stack limit = 0xee054f20)
[    1.320076] Stack: (0xc182de98 to 0xc182e000)
[    1.324421] de80:                                                       c0ca5b00 c0ca5b00
[    1.332574] dea0: c0341f50 c03b5190 c0341f50 c0341b14 c0ca5b00 c033fee0 60000013 c0341b54
[    1.340725] dec0: c0ca5b00 c180ae00 c0341f50 c0341ac4 c180ae00 c1809480 c0341f50 c0341ac4
[    1.348877] dee0: c1809480 c1809000 c0341f50 c0341ac4 c1809000 c0a6d4f0 c0341f50 c0341f84
[    1.357028] df00: ffffe000 00000000 c0341f50 c0101854 000000a6 00000000 c1fb4900 c1fb49e0
[    1.365178] df20: c084f524 000000a6 000000a6 c012e294 c07bf530 00000007 00000007 00000000
[    1.373328] df40: c1fb49f1 c1fb49f6 00000000 0000033e 00000008 c0a3ab60 0000033e 00000008
[    1.381479] df60: c0a3ab60 c0920834 c0a3ab60 c0900cf0 00000007 00000007 00000000 c0900598
[    1.389629] df80: c060d428 00000000 c060d428 00000000 00000000 00000000 00000000 00000000
[    1.397779] dfa0: 00000000 c060d430 00000000 c0107dc0 00000000 00000000 00000000 00000000
[    1.405928] dfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[    1.414078] dfe0: 00000000 00000000 00000000 00000000 00000013 00000000 ced2edf5 cdcc48ad
[    1.422267] [<c03d2158>] (regmap_read) from [<c03b5190>] (sun4i_dclk_is_enabled+0x18/0x28)
[    1.430527] [<c03b5190>] (sun4i_dclk_is_enabled) from [<c033fee0>] (clk_core_is_enabled+0x2c/0xb4)
[    1.439471] [<c033fee0>] (clk_core_is_enabled) from [<c0341b54>] (clk_disable_unused_subtree+0xb4/0xf4)
[    1.448839] [<c0341b54>] (clk_disable_unused_subtree) from [<c0341ac4>] (clk_disable_unused_subtree+0x24/0xf4)
[    1.458807] Code: c0cb7400 c0a09114 c0a09278 c0cb0748 (ffff8b45)
[    1.464882] ---[ end trace 218ada9c9ecaeebb ]---
[    1.469612] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
[    1.469612]
[    1.478724] Rebooting in 5 seconds..
[    7.477509] Reboot failed -- System halted

uboot启动显示LCD内容正常,进入linux运行失败,应该就是这部分失败造成的,
[    1.116986] [drm] No driver support for vblank timestamp query.
[    1.125324] sun4i-drm display-engine: Failed to set initial hw configuration.
[    1.132594] sun4i-drm display-engine: Couldn't create our framebuffer
[    1.139578] sun4i-drm display-engine: master bind failed: -12
[    1.145800] sun4i-tcon: probe of 1c0c000.lcd-controller failed with error -12
大佬们,麻烦该如何修改。。。

离线

楼主 #1 2022-08-25 15:37:26

Abbet
会员
注册时间: 2022-07-18
已发帖子: 2
积分: 2

Re: 更换正点原子7寸RGB LCD(1024*600),启动失败

默认800*480屏,正常串口打印:

[    1.122474] sun4i-drm display-engine: bound 1e60000.display-backend (ops 0xc0736c38)
[    1.131474] sun4i-drm display-engine: bound 1c0c000.lcd-controller (ops 0xc0735f1c)
[    1.139371] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[    1.146029] [drm] No driver support for vblank timestamp query.
[    1.284784] Console: switching to colour frame buffer device 100x30
[    1.335990] sun4i-drm display-engine: fb0:  frame buffer device
[    1.354890] [drm] Initialized sun4i-drm 1.0.0 20150629 for display-engine on minor 0

修改1024*600屏,串口打印:

[    1.122378] sun4i-drm display-engine: bound 1e60000.display-backend (ops 0xc0736c38)
[    1.131387] sun4i-drm display-engine: bound 1c0c000.lcd-controller (ops 0xc0735f1c)
[    1.139285] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[    1.145948] [drm] No driver support for vblank timestamp query.
[    1.154931] sun4i-drm display-engine: Failed to set initial hw configuration.
[    1.162310] sun4i-drm display-engine: Couldn't create our framebuffer
[    1.169467] sun4i-drm display-engine: master bind failed: -12
[    1.175841] sun4i-tcon: probe of 1c0c000.lcd-controller failed with error -12

查询问题后,应该是存储空间太小引起,参考:
https://whycan.com/t_7527.html

skliu 说:

CONFIG_FORCE_MAX_ZONEORDER=12
暂时修改这个搞定。

修改CONFIG_FORCE_MAX_ZONEORDER=12,解决问题!
1024.jpg

离线

页脚

工信部备案:粤ICP备20025096号 Powered by FluxBB

感谢为中文互联网持续输出优质内容的各位老铁们。 QQ: 516333132, 微信(wechat): whycan_cn (哇酷网/挖坑网/填坑网) service@whycan.cn