历史上的今天
今天是:2024年12月29日(星期日)
2020年12月29日 | I.MX6Q(TQIMX6Q/TQE9)学习笔记——新版BSP之LCD移植
2020-12-29 来源:eefocus
经过前面的移植,eMMC已经可以在tqimx6q上正常运行了,本文将来移植LCD驱动。
DTS编写
imx6的LCD控制器与之前的芯片略有不同,详细的信息可以阅读芯片手册。参考sabrelite开发板的DTS,我们可以添加如下内容:
/ {
...
aliases {
mxcfb0 = &mxcfb1;
};
...
regulators {
...
reg_mipi_dsi_pwr_on: mipi_dsi_pwr_on {
compatible = "regulator-fixed";
regulator-name = "mipi_dsi_pwr_on";
gpio = <&gpio6 14 0>;
enable-active-high;
};
};
...
backlight {
compatible = "pwm-backlight";
pwms = <&pwm1 0 5000000>;
brightness-levels = <0 4 8 16 32 64 128 255>;
default-brightness-level = <7>;
};
mipi_dsi_reset: mipi-dsi-reset {
compatible = "gpio-reset";
reset-gpios = <&gpio6 11 GPIO_ACTIVE_LOW>;
reset-delay-us = <50>;
#reset-cells = <0>;
};
mxcfb1: fb@0 {
compatible = "fsl,mxc_sdc_fb";
disp_dev = "lcd";
interface_pix_fmt = "RGB24";
mode_str ="CLAA-WVGA";
default_bpp = <24>;
int_clk = <0>;
late_init = <0>;
status = "okay";
};
};
...
&mipi_dsi {
dev_id = <0>;
disp_id = <1>;
lcd_panel = "TRULY-WVGA";
disp-power-on-supply = <®_mipi_dsi_pwr_on>;
resets = <&mipi_dsi_reset>;
status = "okay";
};
...
添加以上内容后重新编译并烧写DTB。
测试方法
用新的DTB启动内核会发现屏幕上出现了四只可爱的小企鹅,我这里就不发图片了,只附上完整的内核启动Log,详细如下:
U-Boot 2013.04-04987-g98fdbdc-dirty (May 03 2015 - 11:46:24)
CPU: Freescale i.MX6Q rev1.2 at 792 MHz
CPU: Temperature 23 C, calibration data: 0x54e4bb69
Reset cause: POR
Board: MX6Q/SDL-SabreSD
I2C: ready
DRAM: 1 GiB
MMC: FSL_SDHC: 0, FSL_SDHC: 1, FSL_SDHC: 2
No panel detected: default to Hannstar-XGA
Display: Hannstar-XGA (1024x768)
In: serial
Out: serial
Err: serial
mmc0 is current device
Net: Phy not found
PHY reset timed out
FEC [PRIME]
Warning: failed to set MAC address
Normal Boot
Hit any key to stop autoboot: 0
mmc0 is current device
MMC read: dev # 0, block # 2048, count 12288 ... 12288 blocks read: OK
MMC read: dev # 0, block # 20480, count 2048 ... 2048 blocks read: OK
## Booting kernel from Legacy Image at 11ffffc0 ...
Image Name: Linux-3.10.17-80739-g33597e3-dir
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 5289360 Bytes = 5 MiB
Load Address: 12000000
Entry Point: 12000000
Verifying Checksum ... OK
## Flattened Device Tree blob at 18000000
Booting using the fdt blob at 0x18000000
XIP Kernel Image ... OK
OK
Using Device Tree in place at 18000000, end 1800cb83
Starting kernel ...
Booting Linux on physical CPU 0x0
Linux version 3.10.17-80739-g33597e3-dirty (lilianrong@lenovo) (gcc version 4.7.3 (Ubuntu/Linaro 4.7.3-12ubuntu1) ) #3 SMP PREEMPT Wed May 13 00:16:49 CST 2015
CPU: ARMv7 Processor [412fc09a] revision 10 (ARMv7), cr=10c53c7d
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
Machine: Freescale i.MX6 Quad/DualLite (Device Tree), model: Freescale i.MX6 Quad TQIMX6Q Smart Device Board
cma: CMA: reserved 320 MiB at 3c000000
Memory policy: ECC disabled, Data cache writealloc
PERCPU: Embedded 8 pages/cpu @814fa000 s8896 r8192 d15680 u32768
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 260096
Kernel command line: noinitrd console=ttymxc0,115200 root=/dev/mmcblk0p1 rw rootfstype=ext4 init=/linuxrc
PID hash table entries: 4096 (order: 2, 16384 bytes)
Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
Memory: 1024MB = 1024MB total
Memory: 697788k/697788k available, 350788k reserved, 0K highmem
Virtual kernel memory layout:
vector : 0xffff0000 - 0xffff1000 ( 4 kB)
fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)
vmalloc : 0xc0800000 - 0xff000000 (1000 MB)
lowmem : 0x80000000 - 0xc0000000 (1024 MB)
pkmap : 0x7fe00000 - 0x80000000 ( 2 MB)
modules : 0x7f000000 - 0x7fe00000 ( 14 MB)
.text : 0x80008000 - 0x80be704c (12157 kB)
.init : 0x80be8000 - 0x80c2a2c0 ( 265 kB)
.data : 0x80c2c000 - 0x80c7c260 ( 321 kB)
.bss : 0x80c7c260 - 0x80ce5434 ( 421 kB)
SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
Preemptible hierarchical RCU implementation.
NR_IRQS:16 nr_irqs:16 16
L310 cache controller enabled
l2x0: 16 ways, CACHE_ID 0x410000c7, AUX_CTRL 0x32070000, Cache size: 1048576 B
sched_clock: 32 bits at 3000kHz, resolution 333ns, wraps every 1431655ms
CPU identified as i.MX6Q, silicon rev 1.2
Console: colour dummy device 80x30
Calibrating delay loop... 1581.05 BogoMIPS (lpj=7905280)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
Setting up static identity map for 0x806106a8 - 0x80610700
CPU1: Booted secondary processor
CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
CPU2: Booted secondary processor
CPU2: thread -1, cpu 2, socket 0, mpidr 80000002
CPU3: Booted secondary processor
CPU3: thread -1, cpu 3, socket 0, mpidr 80000003
Brought up 4 CPUs
SMP: Total of 4 processors activated (6324.22 BogoMIPS).
CPU: All CPU(s) started in SVC mode.
devtmpfs: initialized
pinctrl core: initialized pinctrl subsystem
regulator-dummy: no parameters
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic coherent allocations
Use WDOG1 as reset source
syscon 20c8000.anatop: regmap [mem 0x020c8000-0x020c8fff] registered
vdd1p1: 800 <--> 1375 mV at 1125 mV
vdd3p0: 2800 <--> 3150 mV at 3000 mV
vdd2p5: 2000 <--> 2750 mV at 2425 mV
cpu: 725 <--> 1450 mV at 1150 mV
vddpu: 725 <--> 1450 mV
vddsoc: 725 <--> 1450 mV at 1200 mV
syscon 20e0000.iomuxc-gpr: regmap [mem 0x020e0000-0x020e0037] registered
syscon 21bc000.ocotp-ctrl: regmap [mem 0x021bc000-0x021bffff] registered
hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.
hw-breakpoint: maximum watchpoint size is 4 bytes.
imx6q-pinctrl 20e0000.iomuxc: initialized IMX pinctrl driver
bio: create slab mxs-dma 110000.dma-apbh: initialized usb_otg_vbus: 5000 mV mipi_dsi_pwr_on: no parameters i2c-core: driver [max17135] using legacy suspend method i2c-core: driver [max17135] using legacy resume method SCSI subsystem initialized usbcore: registered new interface driver usbfs usbcore: registered new interface driver hub usbcore: registered new device driver usb Linux video capture interface: v2.00 pps_core: LinuxPPS API ver. 1 registered pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti PTP clock support registered imx-ipuv3 2400000.ipu: IPU DMFC NORMAL mode: 1(0~1), 5B(4,5), 5F(6,7) imx-ipuv3 2800000.ipu: IPU DMFC NORMAL mode: 1(0~1), 5B(4,5), 5F(6,7) MIPI CSI2 driver module loaded Advanced Linux Sound Architecture Driver Initialized. cfg80211: Calling CRDA to update world regulatory domain Switching to clocksource mxc_timer1 NET: Registered protocol family 2 TCP established hash table entries: 8192 (order: 4, 65536 bytes) TCP bind hash table entries: 8192 (order: 4, 65536 bytes) TCP: Hash tables configured (established 8192 bind 8192) TCP: reno registered UDP hash table entries: 512 (order: 2, 16384 bytes) UDP-Lite hash table entries: 512 (order: 2, 16384 bytes) NET: Registered protocol family 1 RPC: Registered named UNIX socket transport module. RPC: Registered udp transport module. RPC: Registered tcp transport module. RPC: Registered tcp NFSv4.1 backchannel transport module. hw perfevents: enabled with ARMv7 Cortex-A9 PMU driver, 7 counters available pureg-dummy: no parameters imx6_busfreq busfreq.15: DDR medium rate not supported. Bus freq driver module loaded VFS: Disk quotas dquot_6.5.2 Dquot-cache hash table entries: 1024 (order 0, 4096 bytes) NFS: Registering the id_resolver key type Key type id_resolver registered Key type id_legacy registered jffs2: version 2.2. (NAND) 漏 2001-2006 Red Hat, Inc. fuse init (API version 7.22) msgmni has been set to 2002 io scheduler noop registered io scheduler deadline registered io scheduler cfq registered (default) imx-weim 21b8000.weim: WEIM driver registered. mxc_mipi_dsi 21e0000.mipi: i.MX MIPI DSI driver probed MIPI DSI driver module loaded mxc_sdc_fb fb.23: register mxc display driver lcd Console: switching to colour frame buffer device 100x30 imx-sdma 20ec000.sdma: no iram assigned, using external mem imx-sdma 20ec000.sdma: loaded firmware 1.1 imx-sdma 20ec000.sdma: initialized Serial: IMX driver 2020000.serial: ttymxc0 at MMIO 0x2020000 (irq = 58) is a IMX console [ttymxc0] enabled 21e8000.serial: ttymxc1 at MMIO 0x21e8000 (irq = 59) is a IMX 21ec000.serial: ttymxc2 at MMIO 0x21ec000 (irq = 60) is a IMX 21f0000.serial: ttymxc3 at MMIO 0x21f0000 (irq = 61) is a IMX 21f4000.serial: ttymxc4 at MMIO 0x21f4000 (irq = 62) is a IMX serial: Freescale lpuart driver [drm] Initialized drm 1.1.0 20060810 [drm] Initialized vivante 1.0.0 20120216 on minor 0 brd: module loaded loop: module loaded CAN device driver interface flexcan 2090000.can: device registered (reg_base=c0a28000, irq=142) fec 2188000.ethernet (unregistered net_device): Invalid MAC address: 00:00:00:00:00:00 fec 2188000.ethernet (unregistered net_device): Using random MAC address: 3a:bb:80:a1:c6:b2 libphy: fec_enet_mii_bus: probed fec 2188000.ethernet eth0: registered PHC device 0 ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver usbcore: registered new interface driver usb-storage ci_hdrc ci_hdrc.1: doesn't support gadget ci_hdrc ci_hdrc.1: EHCI Host Controller ci_hdrc ci_hdrc.1: new USB bus registered, assigned bus number 1
史海拾趣
|
本文介绍的电路,原是在分时电度表中,用于校时和抄表的实际电路。它既简单又实用。利用单片机异步通讯口,用红外光发射管SIR-563和红外光接收IC管RPM6938来实现接受和发送点信号的功能,可以实现半双工双向通讯功能。通讯距离约10米,异步通讯波特 ...… 查看全部问答> |
|
我是已经从事DSP开发有几年了,看到许多朋友对DSP的开发非常感兴取,我结合这几年对DSP的开发写一写自己的感受,一家之言,欢迎指教。我上研究生 的第一天起根据老板的安排就开始接触DSP,那时DSP开发在国内高校刚刚开始,一台DSP开发器接近一万还 ...… 查看全部问答> |
|
虽然有周立功宣传的成分,但也不失为一个学习的路径,学习过程仅供参考。 1. 要对ARM Cortex-M3处理器内核有所了解 下载《ARM 白皮书-ARM Cortex-M3 处理器简介》一文,通读2~3遍。读完之后,我相信您已经可以体会到Cortex-M3处理器的巨 ...… 查看全部问答> |
|
使用USB ActiveSync 需要增加组件或修改什么吗? 这两天想使用同步的方式去测试CE的程式 目前使用COM的同步方式可行! 但使用usb却不知道位何没法同步! 先说说我COM的作法! 1.当然先安装ActiveSync 4.5 2.勾选ActiveSync 及 Network User Interface 组件 3.在CE中,Make New Connections ->D ...… 查看全部问答> |
|
如果要初始化一个字符串有两种写法: 1:char *p = \"hello\"; 2:char *p; p = \"hello\"; 这两种写法有没有错的,是否有区别。 谭浩强c程序设计p238说是一样的,大家讨论一下吧 … 查看全部问答> |
|
最新职位发布: 1、上海: JAVA/C/.NET/COBLE/VB/嵌入式开发主管;初高级TESTING,以及白盒/自动化/本地化测试/QA 2、广州:JAVA/C/C++/.NET/QA/TECHNICAL SUPPORT/数据仓库开发 3、北京:JAVA/C/C++/.NET/QA/SA/PM(JAVA)/PM(TEST)/银行 ...… 查看全部问答> |




