AM335x(TQ335x)学习笔记——USB驱动移植

对于AM335x来讲,TI维护的USB驱动已经非常完善了,本文称之为移植,实际上仅仅是配置内核选项使能USB HOST/OTG功能。废话少说,直接动手开启AM335x的USB驱动配置项。

Step1. 配置内核支持USB

默认的配置项没有配置USB相关的选项,但是DTS已经配置好了,我们不需要对DTS作任何修改,详细的内核配置项如下:

Device Drivers  --->
	[*] USB support  --->
		[*]     OTG support
		<*>     EHCI HCD (USB 2.0) support
		[*]       Improved Transaction Translator scheduling (NEW)
		<*>     EHCI support for OMAP3 and later chips (NEW)
		<*>     OHCI HCD (USB 1.1) support
		<*>       OHCI support for OMAP3 and later chips (NEW)
		<*>   Inventra Highspeed Dual Role Controller (TI, ADI, ...)
			MUSB Mode Selection (Dual Role mode)  --->
		<*>     Platform Glue Layer (TI DSPS platforms)  --->
			MUSB DMA mode (Disable DMA (always use PIO))  --->

Step2. 编译内核

编译内核的指令如下:

make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- -j8

Step3.测试

用新编译好的内核启动开发板,可以看到如下Log:

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 3.17.2 ([email protected]) (gcc version 4.7.3 (Ubuntu/Linaro 4.7.3-12ubuntu1) ) #96 SMP Fri Dec 26 22:28:21 CST 2014
[    0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c5387d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] Machine model: TI AM335x EVM
[    0.000000] cma: Reserved 16 MiB at 9e800000
[    0.000000] Memory policy: Data cache writeback
[    0.000000]   HighMem zone: 1048574 pages exceeds freesize 0
[    0.000000] CPU: All CPU(s) started in SVC mode.
[    0.000000] AM335X ES2.1 (sgx neon )
[    0.000000] PERCPU: Embedded 9 pages/cpu @dfa99000 s14336 r8192 d14336 u36864
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 129792
[    0.000000] Kernel command line: console=ttyO0,115200n8 root=/dev/mmcblk0p2 rw rootfstype=ext3 rootwait
[    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: 483980K/523264K available (6184K kernel code, 668K rwdata, 2468K rodata, 410K init, 8215K bss, 39284K reserved, 0K highmem)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xffe00000   (2048 kB)
[    0.000000]     vmalloc : 0xe0800000 - 0xff000000   ( 488 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 - 0xc087b564   (8654 kB)
[    0.000000]       .init : 0xc087c000 - 0xc08e2800   ( 410 kB)
[    0.000000]       .data : 0xc08e4000 - 0xc098b330   ( 669 kB)
[    0.000000]        .bss : 0xc098b330 - 0xc1190f60   (8216 kB)
[    0.000000] Hierarchical RCU implementation.
[    0.000000]  RCU restricting CPUs from NR_CPUS=2 to nr_cpu_ids=1.
[    0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
[    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] Total of 128 interrupts on 1 active controller
[    0.000000] OMAP clockevent source: timer2 at 24000000 Hz
[    0.000014] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 178956969942ns
[    0.000064] OMAP clocksource: timer1 at 24000000 Hz
[    0.000795] Console: colour dummy device 80x30
[    0.000845] Lock dependency validator: Copyright (c) 2006 Red Hat, Inc., Ingo Molnar
[    0.000853] ... MAX_LOCKDEP_SUBCLASSES:  8
[    0.000861] ... MAX_LOCK_DEPTH:          48
[    0.000869] ... MAX_LOCKDEP_KEYS:        8191
[    0.000876] ... CLASSHASH_SIZE:          4096
[    0.000884] ... MAX_LOCKDEP_ENTRIES:     32768
[    0.000890] ... MAX_LOCKDEP_CHAINS:      65536
[    0.000898] ... CHAINHASH_SIZE:          32768
[    0.000905]  memory used by lock dependency info: 5167 kB
[    0.000913]  per task-struct memory footprint: 1152 bytes
[    0.000956] Calibrating delay loop... 996.14 BogoMIPS (lpj=4980736)
[    0.079037] pid_max: default: 32768 minimum: 301
[    0.079443] Security Framework initialized
[    0.079567] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.079580] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.081764] CPU: Testing write buffer coherency: ok
[    0.082949] CPU0: thread -1, cpu 0, socket -1, mpidr 0
[    0.083077] Setting up static identity map for 0x805dbb70 - 0x805dbbe0
[    0.086307] Brought up 1 CPUs
[    0.086326] SMP: Total of 1 processors activated.
[    0.086336] CPU: All CPU(s) started in SVC mode.
[    0.088948] devtmpfs: initialized
[    0.097822] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
[    0.133146] omap_hwmod: tptc0 using broken dt data from edma
[    0.133495] omap_hwmod: tptc1 using broken dt data from edma
[    0.133823] omap_hwmod: tptc2 using broken dt data from edma
[    0.141643] omap_hwmod: debugss: _wait_target_disable failed
[    0.199665] pinctrl core: initialized pinctrl subsystem
[    0.202194] regulator-dummy: no parameters
[    0.232293] NET: Registered protocol family 16
[    0.240857] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.243121] cpuidle: using governor ladder
[    0.243149] cpuidle: using governor menu
[    0.255109] OMAP GPIO hardware version 0.1
[    0.270370] omap-gpmc 50000000.gpmc: could not find pctldev for node /[email protected]/nandflash_pins_s0, deferring probe
[    0.270413] platform 50000000.gpmc: Driver omap-gpmc requests probe deferral
[    0.274914] hw-breakpoint: debug architecture 0x4 unsupported.
[    0.320324] edma-dma-engine edma-dma-engine.0: TI EDMA DMA engine driver
[    0.321686] vbat: 5000 mV 
[    0.322450] lis3_reg: no parameters
[    0.325863] SCSI subsystem initialized
[    0.326622] usbcore: registered new interface driver usbfs
[    0.326782] usbcore: registered new interface driver hub
[    0.330704] usbcore: registered new device driver usb
[    0.331558] omap_i2c 44e0b000.i2c: could not find pctldev for node /[email protected]/pinmux_i2c0_pins, deferring probe
[    0.331597] platform 44e0b000.i2c: Driver omap_i2c requests probe deferral
[    0.331654] omap_i2c 4802a000.i2c: could not find pctldev for node /[email protected]/pinmux_i2c1_pins, deferring probe
[    0.331677] platform 4802a000.i2c: Driver omap_i2c requests probe deferral
[    0.332863] Advanced Linux Sound Architecture Driver Initialized.
[    0.336272] Switched to clocksource timer1
[    0.489380] NET: Registered protocol family 2
[    0.491239] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
[    0.491422] TCP bind hash table entries: 4096 (order: 5, 147456 bytes)
[    0.492785] TCP: Hash tables configured (established 4096 bind 4096)
[    0.492955] TCP: reno registered
[    0.492981] UDP hash table entries: 256 (order: 2, 20480 bytes)
[    0.493170] UDP-Lite hash table entries: 256 (order: 2, 20480 bytes)
[    0.494207] NET: Registered protocol family 1
[    0.496281] RPC: Registered named UNIX socket transport module.
[    0.496304] RPC: Registered udp transport module.
[    0.496314] RPC: Registered tcp transport module.
[    0.496323] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.498147] hw perfevents: enabled with armv7_cortex_a8 PMU driver, 5 counters available
[    0.502301] futex hash table entries: 256 (order: 2, 16384 bytes)
[    0.507875] VFS: Disk quotas dquot_6.5.2
[    0.508024] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.510137] NFS: Registering the id_resolver key type
[    0.510482] Key type id_resolver registered
[    0.510497] Key type id_legacy registered
[    0.510654] jffs2: version 2.2. (NAND) (SUMMARY)  漏 2001-2006 Red Hat, Inc.
[    0.511074] msgmni has been set to 977
[    0.516250] io scheduler noop registered
[    0.516287] io scheduler deadline registered
[    0.516358] io scheduler cfq registered (default)
[    0.518591] pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800 size 568
[    0.523698] backlight supply power not found, using dummy regulator
[    0.527040] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
[    0.533191] omap_uart 44e09000.serial: no wakeirq for uart0
[    0.533803] 44e09000.serial: ttyO0 at MMIO 0x44e09000 (irq = 88, base_baud = 3000000) is a OMAP UART0
[    1.234091] console [ttyO0] enabled
[    1.243201] omap_rng 48310000.rng: OMAP Random Number Generator ver. 20
[    1.250887] [drm] Initialized drm 1.1.0 20060810
[    1.264563] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[    1.271671] [drm] No driver support for vblank timestamp query.
[    1.331494] Console: switching to colour frame buffer device 100x30
[    1.342552] tilcdc 4830e000.lcdc: fb0:  frame buffer device
[    1.348442] tilcdc 4830e000.lcdc: registered panic notifier
[    1.354341] [drm] Initialized tilcdc 1.0.0 20121205 on minor 0
[    1.390556] brd: module loaded
[    1.408704] loop: module loaded
[    1.414966] mtdoops: mtd device (mtddev=name/number) must be supplied
[    1.425658] usbcore: registered new interface driver asix
[    1.431555] usbcore: registered new interface driver ax88179_178a
[    1.438078] usbcore: registered new interface driver cdc_ether
[    1.444343] usbcore: registered new interface driver smsc95xx
[    1.450493] usbcore: registered new interface driver net1080
[    1.456543] usbcore: registered new interface driver cdc_subset
[    1.462850] usbcore: registered new interface driver zaurus
[    1.468911] usbcore: registered new interface driver cdc_ncm
[    1.475931] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    1.482939] ehci-omap: OMAP-EHCI Host Controller driver
[    1.488833] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    1.495347] ohci-omap3: OHCI OMAP3 driver
[    1.500021] usbcore: registered new interface driver cdc_wdm
[    1.506178] usbcore: registered new interface driver usb-storage
[    1.512631] usbcore: registered new interface driver usbtest
[    1.521522] 47401300.usb-phy supply vcc not found, using dummy regulator
[    1.533165] musb-hdrc musb-hdrc.0.auto: MUSB HDRC host driver
[    1.543455] musb-hdrc musb-hdrc.0.auto: new USB bus registered, assigned bus number 1
[    1.562104] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    1.569359] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.576955] usb usb1: Product: MUSB HDRC host driver
[    1.582140] usb usb1: Manufacturer: Linux 3.17.2 musb-hcd
[    1.587820] usb usb1: SerialNumber: musb-hdrc.0.auto
[    1.599603] hub 1-0:1.0: USB hub found
[    1.605078] hub 1-0:1.0: 1 port detected
[    1.622178] 47401b00.usb-phy supply vcc not found, using dummy regulator
[    1.632793] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
[    1.640700] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 2
[    1.651379] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002
[    1.658617] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.666213] usb usb2: Product: MUSB HDRC host driver
[    1.671397] usb usb2: Manufacturer: Linux 3.17.2 musb-hcd
[    1.677083] usb usb2: SerialNumber: musb-hdrc.1.auto
[    1.686595] hub 2-0:1.0: USB hub found
[    1.690986] hub 2-0:1.0: 1 port detected
[    1.701609] mousedev: PS/2 mouse device common for all mice
[    1.711782] omap_rtc 44e3e000.rtc: rtc core: registered 44e3e000.rtc as rtc0
[    1.720055] i2c /dev entries driver
[    1.723788] Driver for 1-wire Dallas network protocol.
[    1.736318] omap_wdt: OMAP Watchdog Timer Rev 0x01: initial timeout 60 sec
[    1.755078] omap_hsmmc 48060000.mmc: unable to get vmmc regulator -517
[    1.762557] platform 48060000.mmc: Driver omap_hsmmc requests probe deferral
[    1.772215] ledtrig-cpu: registered to indicate activity on CPUs
[    1.779192] usbcore: registered new interface driver usbhid
[    1.785014] usbhid: USB HID core driver
[    1.795167] davinci_evm sound: ASoC: CODEC (null) not registered
[    1.801977] davinci_evm sound: snd_soc_register_card failed (-517)
[    1.808594] platform sound: Driver davinci_evm requests probe deferral
[    1.816440] oprofile: using arm/armv7
[    1.821115] TCP: cubic registered
[    1.824592] Initializing XFRM netlink socket
[    1.829340] NET: Registered protocol family 17
[    1.834075] NET: Registered protocol family 15
[    1.839198] Key type dns_resolver registered
[    1.843920] omap_voltage_late_init: Voltage driver support not added
[    1.850660] sr_dev_init: No voltage domain specified for smartreflex0. Cannot initialize
[    1.859152] sr_dev_init: No voltage domain specified for smartreflex1. Cannot initialize
[    1.868786] ThumbEE CPU extension supported.
[    1.873392] Registering SWP/SWPB emulation handler
[    1.878502] SmartReflex Class3 initialized
[    1.891065] omap-gpmc 50000000.gpmc: GPMC revision 6.0
[    1.898216] nand: device found, Manufacturer ID: 0xec, Chip ID: 0xd3
[    1.904865] nand: Samsung NAND 1GiB 3,3V 8-bit
[    1.909588] nand: 1024MiB, SLC, page size: 2048, OOB size: 64
[    1.915591] nand: using OMAP_ECC_BCH8_CODE_HW ECC scheme
[    1.921433] 10 ofpart partitions found on MTD device omap2-nand.0
[    1.927825] Creating 10 MTD partitions on "omap2-nand.0":
[    1.933473] 0x000000000000-0x000000020000 : "NAND.SPL"
[    1.947581] 0x000000020000-0x000000040000 : "NAND.SPL.backup1"
[    1.958288] 0x000000040000-0x000000060000 : "NAND.SPL.backup2"
[    1.967696] 0x000000060000-0x000000080000 : "NAND.SPL.backup3"
[    1.978978] 0x000000080000-0x0000000c0000 : "NAND.u-boot-spl"
[    1.989074] 0x0000000c0000-0x0000001c0000 : "NAND.u-boot"
[    2.000439] 0x0000001c0000-0x0000001e0000 : "NAND.u-boot-env"
[    2.010926] 0x0000001e0000-0x000000200000 : "NAND.u-boot-env.backup1"
[    2.022841] 0x000000200000-0x000000a00000 : "NAND.kernel"
[    2.038984] 0x000000a00000-0x000010000000 : "NAND.file-system"
[    2.332279] tps65910 0-002d: No interrupt support, no core IRQ
[    2.349898] vrtc: 1800 mV 
[    2.353264] vrtc: supplied by vbat
[    2.360422] vio: at 1500 mV 
[    2.363696] vio: supplied by vbat
[    2.370657] vdd_mpu: 912 <--> 1312 mV at 1325 mV 
[    2.375794] vdd_mpu: supplied by vbat
[    2.384999] vdd_core: 912 <--> 1150 mV at 1137 mV 
[    2.390404] vdd_core: supplied by vbat
[    2.397288] vdd3: 5000 mV 
[    2.402667] vdig1: at 1800 mV 
[    2.406225] vdig1: supplied by vbat
[    2.412538] vdig2: at 1800 mV 
[    2.415945] vdig2: supplied by vbat
[    2.422351] vpll: at 1800 mV 
[    2.425662] vpll: supplied by vbat
[    2.432822] vdac: at 1800 mV 
[    2.436335] vdac: supplied by vbat
[    2.443361] vaux1: at 1800 mV 
[    2.446899] vaux1: supplied by vbat
[    2.453342] vaux2: at 3300 mV 
[    2.456846] vaux2: supplied by vbat
[    2.463190] vaux33: at 3300 mV 
[    2.466775] vaux33: supplied by vbat
[    2.473172] vmmc: 1800 <--> 3300 mV at 3300 mV 
[    2.478237] vmmc: supplied by vbat
[    2.484283] vbb: at 3000 mV 
[    2.487872] vbb: supplied by vbat
[    2.495458] omap_i2c 44e0b000.i2c: bus 0 rev0.11 at 400 kHz
[    2.503173] usb 2-1: new high-speed USB device number 2 using musb-hdrc
[    2.517638] omap_i2c 4802a000.i2c: bus 1 rev0.11 at 100 kHz
[    2.568304] wm8960 0-001a: No platform data supplied
[    2.644805] mmc0: host does not support reading read-only switch. assuming write-enable.
[    2.654108] usb 2-1: New USB device found, idVendor=1a40, idProduct=0101
[    2.661182] usb 2-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[    2.668663] usb 2-1: Product: USB 2.0 Hub
[    2.675544] hub 2-1:1.0: USB hub found
[    2.681178] hub 2-1:1.0: 4 ports detected
[    2.690227] mmc0: new high speed SDHC card at address aaaa
[    2.699372] mmcblk0: mmc0:aaaa SL16G 14.8 GiB 
[    2.710574]  mmcblk0: p1 p2
[    2.723345] davinci_evm sound: wm8960-hifi <-> 4803c000.mcasp mapping ok
[    2.806163] davinci_mdio 4a101000.mdio: davinci mdio revision 1.6
[    2.812552] davinci_mdio 4a101000.mdio: detected phy mask ffffffde
[    2.825370] libphy: 4a101000.mdio: probed
[    2.829704] davinci_mdio 4a101000.mdio: phy[0]: device 4a101000.mdio:00, driver unknown
[    2.838093] davinci_mdio 4a101000.mdio: phy[5]: device 4a101000.mdio:05, driver unknown
[    2.847649] cpsw 4a100000.ethernet: Detected MACID = c4:ed:ba:88:b5:e4
[    2.859600] input: [email protected] as /devices/[email protected]/input/input0
[    2.869505] omap_rtc 44e3e000.rtc: setting system clock to 2000-01-01 00:00:00 UTC (946684800)
[    2.878657] sr_init: No PMIC hook to init smartreflex
[    2.884274] sr_init: platform driver register failed for SR
[    2.907467] lis3_reg: disabling
[    2.910975] ALSA device list:
[    2.914075]   #0: AM335x-EVM
[    3.008783] kjournald starting.  Commit interval 5 seconds
[    3.017395] EXT3-fs (mmcblk0p2): using internal journal
[    3.025475] EXT3-fs (mmcblk0p2): recovery complete
[    3.030554] EXT3-fs (mmcblk0p2): mounted filesystem with ordered data mode
[    3.037888] VFS: Mounted root (ext3 filesystem) on device 179:2.
[    3.047778] devtmpfs: mounted
[    3.051614] Freeing unused kernel memory: 408K (c087c000 - c08e2000)
----------mount all..........
----------Starting mdev......

Please press Enter to activate this console. 
@tq335x #[   11.296192] usb 2-1.2: new high-speed USB device number 3 using musb-hdrc
[   11.419745] usb 2-1.2: device v0951 p1665 is not supported
[   11.425483] usb 2-1.2: New USB device found, idVendor=0951, idProduct=1665
[   11.432693] usb 2-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[   11.440342] usb 2-1.2: Product: DataTraveler 2.0
[   11.445163] usb 2-1.2: Manufacturer: Kingston
[   11.449729] usb 2-1.2: SerialNumber: 50E549C20268FE41491C17E1
[   11.458198] usb-storage 2-1.2:1.0: USB Mass Storage device detected
[   11.476650] scsi host0: usb-storage 2-1.2:1.0
[   12.768968] scsi 0:0:0:0: Direct-Access     Kingston DataTraveler 2.0 1.00 PQ: 0 ANSI: 4
[   12.785085] sd 0:0:0:0: [sda] 30233588 512-byte logical blocks: (15.4 GB/14.4 GiB)
[   12.806457] sd 0:0:0:0: [sda] Write Protect is off
[   12.817312] sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[   12.840718]  sda: sda4
[   12.850713] sd 0:0:0:0: [sda] Attached SCSI removable disk
[   13.265222] usb 2-1.2: USB disconnect, device number 3

末尾是拔插U盘的效果。

Step4. 配置其它USB设备驱动

如果需要配置其它USB设备驱动可以继续在menuconfig配置列表中进行配置,这里就不一一介绍了。

注:

不知道是我的开发板硬件问题还是其它问题,我自己移植的Linux-3.17.2只有中间的一个USB端口可用,另外两个USB端口没有任何作用。使用官方提供的内核镜像也存在这样的问题,下周一跟天嵌售后确认下此问题。如果看到本文的朋友手头上也有TQ3358开发板,请帮忙测试下,多谢。

本文作者:girlkoo

本文链接:http://blog.csdn.net/girlkoo/article/details/42178103

时间: 2024-12-21 02:33:27

AM335x(TQ335x)学习笔记——USB驱动移植的相关文章

AM335x(TQ335x)学习笔记——LCD驱动移植

TI的LCD控制器驱动是非常完善的,共通的地方已经由驱动封装好了,与按键一样,我们可以通过DTS配置完成LCD的显示.下面,我们来讨论下使用DTS方式配置内核完成LCD驱动的思路. (1)初步分析 由于TQ335x使用的芯片是AM335x,故仍然可以参考am335x-evm.dts.当然,am335x-evmsk.dts.am335x-beagbone.dts都可以.本文以am335x-evm.dts为例.大体上浏览下DTS文件,可以发现两个醒目的节点:一个是panel,一个是backlight

AM335x(TQ335x)学习笔记——触摸屏驱动编写

前面几篇文章已经通过配置DTS的方式完成了多个驱动的移植,接下来我们解决TQ335x的触摸驱动问题.由于种种原因,TQ335x的触摸屏驱动是以模块方式提供的,且Linux官方内核中也没有带该触摸屏的驱动源码,单纯的配置DTS是无法完成TQ335x的触摸驱动移植工作的,因此,本文参考内核中原有的pixcir_i2c_ts驱动编写TQ335x的触摸屏(TN92)驱动. 在之前移植TQ210时,我已经编写过TQ210的触摸屏驱动,我的TQ335x还是使用的TQ210的屏,因此,难度不是很大.这里需要说

AM335x(TQ335x)学习笔记——u-boot-2014.10移植

最近移植了下u-boot-2014.10到TQ335x,如果基于am335x evm进行移植,需要修改的地方并不多. 由于TI的am335x evm开发使用了一个eeprom保存了板载配置信息,用来区分不同板子的型号的,而TQ335x没有这个eeprom,因此,需要修改eeprom相关的部分,使u-boot适应TQ335x开发板. 使用source insight查看代码,很容易发现,所有获取板载配置的部分都是通过读取eeprom获得的,因此,首选修改read_eeprom(board/ti/a

AM335x(TQ335x)学习笔记——Nand&amp;&amp;网卡驱动移植

移植完成声卡驱动之后本想再接再励,移植网卡驱动,但没想到的是TI维护的内核太健壮,移植网卡驱动跟之前移植按键驱动一样简单,Nand驱动也是如此,于是,本人将Nand和网卡放在同一篇文章中介绍.介绍之前先感慨一下:TI的维护的内核真的很健壮,DTS真的很强大. 1. Nand驱动移植 阅读TQ335x的原理图可知,TQ335x的Nand连接到了GPMC上,且都是使用的相应引脚的MODE0复用功能,AM335x上上电复位后这些引脚的默认状态就处于MODE0模式,故无需进行pinmux设置,原始的DT

AM335x(TQ335x)学习笔记——Nand&amp;amp;&amp;amp;网卡驱动移植

移植完毕声卡驱动之后本想再接再励,移植网卡驱动,但没想到的是TI维护的内核太健壮,移植网卡驱动跟之前移植按键驱动一样简单,Nand驱动也是如此,于是,本人将Nand和网卡放在同一篇文章中介绍.介绍之前先感慨一下:TI的维护的内核真的非常健壮,DTS真的非常强大. 1. Nand驱动移植 阅读TQ335x的原理图可知,TQ335x的Nand连接到了GPMC上,且与DTS中默认的配置吻合,此处不做不论什么改动,详情例如以下: nandflash_pins_s0: nandflash_pins_s0

AM335x(TQ335x)学习笔记——WM8960声卡驱动移植

经过一段时间的调试,终于调好了TQ335x的声卡驱动.TQ335x采用的Codec是WM8960,本文来总结下WM8960驱动在AM335x平台上的移植方法.Linux声卡驱动架构有OSS和ALSA两种架构,目前最常用的架构是ALSA,本文也使用ALSA架构对WM8960驱动进行移植. ASoC是对ALSA驱动架构的进一步封装.ASoC将ALSA驱动中的各模块抽象为三部分:Platform.Codec和Machine.Platform主要是平台硬件驱动,包括SoC的IIS模块.DMA等,在本文中

AM335x(TQ335x)学习笔记——挂载Ramdisk

上篇文章中我们已经可以通过u-boot启动内核了.可是没有可以启动成功,从内核的log中可以看出.内核启动失败的原因是没有挂载到root文件系统,本文将使用busybox制作根文件系统并打包成ramdisk供u-boot启动内核使用. (1)制作根文件系统 使用busybox构建根文件系统的步骤能够參考本博客的另外一篇文章.该文章链接例如以下: S5PV210(TQ210)学习笔记--内核移植与文件系统构建 须要补充的是,文章"S5PV210(TQ210)学习笔记--内核移植与文件系统构建&qu

AM335x(TQ335x)学习笔记——GPIO按键

还是按照S5PV210的学习顺序来,我们首先解决按键问题.TQ335x有六个用户按键,分别是上.下.左.右.Enter和ESC.开始我想到的是跟学习S5PV210时一样,编写输入子系统驱动解决按键问题,但是浏览driver/input/keyboard目录时意外的发现了gpio-keys.c,大体上看下该驱动程序,其功能是实现了通用的gpio按键.再去看了下DTS,发现DTS中有对gpio-keys的引用,于是猜到,新的内核不需要自己编写输入子系统驱动,可以通过配置DTS直接解决按键问题.本人最

AM335x(TQ335x)学习笔记——启动内核

老式的u-boot使用ATAGS的方式启动linux内核,本文使用新式的dtb方式启动内核. 我使用的内核是linux-3.17.2版本,下面开始编译内核. (1) 解压内核 tar jxf linux-3.17.2.tar.bz2 (2)配置linux内核,由于am335x在内核中都归为omap2系列,故可以使用如下命令: make ARCH=arm omap2plus_defconfig (3)编译内核: make ARCH=arm CROSS_COMPILE=arm-linux-gnuea