@wj8331585 DOUBLEBUF 只要驱动支持就可以
hsinyuwang 发布的帖子
-
开源一个低成本的V3s掌机方案(未验证)
主控:全志V3s
屏幕:2.4寸 320x240 SPI+RGB666 驱动方案
PCB尺寸:10x6.8cm 双层板
PCB打样中,暂未验证原理图
-
t113使用nand flash启动后不识别TF卡
启动log
[ 0.000000] Booting Linux on physical CPU 0x0 [ 0.000000] Linux version 5.4.61 (hsinyuwang@vm) (arm-openwrt-linux-gnueabi-gcc.bin (OpenWrt/Linaro GCC 6.4-2017.11 2017-11) 6.4.1, GNU ld (GNU Binutils) 2.27) #444 SMP PREEMPT Fri Jul 28 11:40:31 UTC 2023 [ 0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d [ 0.000000] CPU: div instructions available: patching division code [ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache [ 0.000000] OF: fdt: Machine model: sun8iw20 [ 0.000000] printk: bootconsole [earlycon0] enabled [ 0.000000] Memory policy: Data cache writealloc [ 0.000000] cma: Reserved 8 MiB at 0x47800000 [ 0.000000] On node 0 totalpages: 32768 [ 0.000000] Normal zone: 256 pages used for memmap [ 0.000000] Normal zone: 0 pages reserved [ 0.000000] Normal zone: 32768 pages, LIFO batch:7 [ 0.000000] psci: probing for conduit method from DT. [ 0.000000] psci: PSCIv1.0 detected in firmware. [ 0.000000] psci: Using standard PSCI v0.2 function IDs [ 0.000000] psci: MIGRATE_INFO_TYPE not supported. [ 0.000000] psci: SMC Calling Convention v1.0 [ 0.000000] percpu: Embedded 15 pages/cpu s30348 r8192 d22900 u61440 [ 0.000000] pcpu-alloc: s30348 r8192 d22900 u61440 alloc=15*4096 [ 0.000000] pcpu-alloc: [0] 0 [0] 1 [ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 32512 [ 0.000000] Kernel command line: ubi.mtd=sys ubi.block=0,rootfs earlyprintk=sunxi-uart,0x02500C00 clk_ignore_unused initcall_debug=0 console=tty0 console=ttyS3,115200 loglevel=8 root=/dev/ubiblock0_5 rootfstype=squashfs init=/pseudo_init partitions=mbr@ubi0_0:boot-resource@ubi0_1:env@ubi0_2:env-redund@ubi0_3:boot@ubi0_4:rootfs@ubi0_5:private@ubi0_6:rootfs_data@ubi0_7:UDISK@ubi0_8: cma=8M snum= mac_addr= wifi_mac= bt_mac= specialstr= gpt=1 androidboot.hardware=sun8iw20p1 boot_type=5 androidboot.boot_type=5 gpt=1 uboot_message=2018.07(07/28/2023-18:44:23) aw-ubi-spinand.ubootblks=24 androidboot.dramsize=128 [ 0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes, linear) [ 0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes, linear) [ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off [ 0.000000] Memory: 109616K/131072K available (6144K kernel code, 268K rwdata, 1536K rodata, 1024K init, 1175K bss, 13264K reserved, 8192K cma-reserved) [ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1 [ 0.000000] rcu: Preemptible hierarchical RCU implementation. [ 0.000000] Tasks RCU enabled. [ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies. [ 0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16 [ 0.000000] random: get_random_bytes called from start_kernel+0x264/0x3e8 with crng_init=0 [ 0.000000] arch_timer: cp15 timer(s) running at 24.00MHz (phys). [ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns [ 0.000006] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns [ 0.008016] Switching to timer-based delay loop, resolution 41ns [ 0.014185] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns [ 0.023964] Console: colour dummy device 80x30 [ 0.029109] printk: console [tty0] enabled [ 0.033254] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000) [ 0.043643] pid_max: default: 32768 minimum: 301 [ 0.048404] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear) [ 0.055738] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear) [ 0.064099] CPU: Testing write buffer coherency: ok [ 0.069334] /cpus/cpu@0 missing clock-frequency property [ 0.074668] /cpus/cpu@1 missing clock-frequency property [ 0.080026] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000 [ 0.086199] Setting up static identity map for 0x40100000 - 0x40100060 [ 0.092888] rcu: Hierarchical SRCU implementation. [ 0.098121] smp: Bringing up secondary CPUs ... [ 0.103743] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001 [ 0.103863] smp: Brought up 1 node, 2 CPUs [ 0.113695] SMP: Total of 2 processors activated (96.00 BogoMIPS). [ 0.119887] CPU: All CPU(s) started in SVC mode. [ 0.124969] devtmpfs: initialized [ 0.139256] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5 [ 0.147410] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns [ 0.157309] futex hash table entries: 512 (order: 3, 32768 bytes, linear) [ 0.164547] pinctrl core: initialized pinctrl subsystem [ 0.170739] NET: Registered protocol family 16 [ 0.176667] DMA: preallocated 256 KiB pool for atomic coherent allocations [ 0.210653] rtc_ccu: sunxi ccu init OK [ 0.216845] ccu: sunxi ccu init OK [ 0.220671] r_ccu: sunxi ccu init OK [ 0.242271] sun6i-dma 3002000.dma-controller: sunxi dma probed [ 0.249817] iommu: Default domain type: Translated [ 0.254889] sunxi iommu: irq = 24 [ 0.259045] usbcore: registered new interface driver usbfs [ 0.264595] usbcore: registered new interface driver hub [ 0.270031] usbcore: registered new device driver usb [ 0.275852] Advanced Linux Sound Architecture Driver Initialized. [ 0.282500] Bluetooth: Core ver 2.22 [ 0.286379] NET: Registered protocol family 31 [ 0.290867] Bluetooth: HCI device and connection manager initialized [ 0.297260] Bluetooth: HCI socket layer initialized [ 0.302155] Bluetooth: L2CAP socket layer initialized [ 0.307243] Bluetooth: SCO socket layer initialized [ 0.312386] pwm module init! [ 0.316438] g2d 5410000.g2d: Adding to iommu group 0 [ 0.321727] G2D: rcq version initialized.major:252 [ 0.327340] clocksource: Switched to clocksource arch_sys_counter [ 0.341749] sun8iw20-pinctrl 2000000.pinctrl: initialized sunXi PIO driver [ 0.358941] NET: Registered protocol family 2 [ 0.363859] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear) [ 0.372316] TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear) [ 0.380024] TCP bind hash table entries: 1024 (order: 1, 8192 bytes, linear) [ 0.387117] TCP: Hash tables configured (established 1024 bind 1024) [ 0.393608] UDP hash table entries: 256 (order: 1, 8192 bytes, linear) [ 0.400187] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear) [ 0.407384] NET: Registered protocol family 1 [ 0.412700] sun8iw20-pinctrl 2000000.pinctrl: 2000000.pinctrl supply vcc-pc not found, using dummy regulator [ 0.423067] spi spi0: spi0 supply spi not found, using dummy regulator [ 0.429819] sunxi_spi_resource_get()2438 - [spi0] SPI MASTER MODE [ 0.435984] sunxi_spi_resource_get()2476 - Failed to get sample mode [ 0.442377] sunxi_spi_resource_get()2481 - Failed to get sample delay [ 0.448863] sunxi_spi_resource_get()2485 - sample_mode:-1431633921 sample_delay:-1431633921 [ 0.457277] sunxi_spi_clk_init()2527 - [spi0] mclk 100000000 [ 0.463552] sunxi_spi_probe()2978 - [spi0]: driver probe succeed, base c881f000, irq 39 [ 0.473228] workingset: timestamp_bits=30 max_order=15 bucket_order=0 [ 0.484522] squashfs: version 4.0 (2009/01/31) Phillip Lougher [ 0.490430] jffs2: version 2.2. (NAND) (SUMMARY) © 2001-2006 Red Hat, Inc. [ 0.527055] io scheduler mq-deadline registered [ 0.531656] io scheduler kyber registered [ 0.536691] [DISP]disp_module_init [ 0.540652] disp 5000000.disp: Adding to iommu group 0 [ 0.546305] [DISP] parser_disp_init_para,line:1430: [ 0.546308] of_property_read fb0_width fail [ 0.571536] display_fb_request,fb_id:0 [ 0.575799] [DISP] Fb_copy_boot_fb,line:1445: [ 0.575803] no boot_fb0 [ 0.583066] disp_al_manager_apply ouput_type:0 [ 0.583460] [DISP] lcd_clk_config,line:774: [ 0.583471] disp 0, clk: pll(192000000),clk(192000000),dclk(16000000) dsi_rate(192000000) [ 0.583471] clk real:pll(288000000),clk(288000000),dclk(24000000) dsi_rate(0) [ 0.584290] sun8iw20-pinctrl 2000000.pinctrl: 2000000.pinctrl supply vcc-pd not found, using dummy regulator [ 0.707368] [ILI9488 LCD INFO] LINE:0159-->LCD_panel_init: [ 0.707375] [ILI9488 LCD INFO] LINE:0178-->lcd_panel_ili9488_init: [ 1.151368] Console: switching to colour frame buffer device 60x40 [ 1.225855] [DISP]disp_module_init finish [ 1.232097] sunxi_sid_init()783 - insmod ok [ 1.238620] sun8iw20-pinctrl 2000000.pinctrl: 2000000.pinctrl supply vcc-pb not found, using dummy regulator [ 1.251283] uart uart3: uart3 supply uart not found, using dummy regulator [ 1.260885] uart3: ttyS3 at MMIO 0x2500c00 (irq = 34, base_baud = 1500000) is a SUNXI [ 1.271251] sw_console_setup()1807 - console setup baud 115200 parity n bits 8, flow n ÿ[ 1.281807] printk: console [ttyS3] enabled [ 1.281807] printk: console [ttyS3] enabled [ 1.292017] printk: bootconsole [earlycon0] disabled [ 1.292017] printk: bootconsole [earlycon0] disabled [ 1.304631] misc dump reg init [ 1.310523] sun8iw20-pinctrl 2000000.pinctrl: 2000000.pinctrl supply vcc-pg not found, using dummy regulator [ 1.324310] sunxi-rfkill soc@3000000:rfkill@0: module version: v1.0.9 [ 1.334121] sunxi-rfkill soc@3000000:rfkill@0: get gpio chip_en failed [ 1.344068] sunxi-rfkill soc@3000000:rfkill@0: get gpio power_en failed [ 1.354149] sunxi-rfkill soc@3000000:rfkill@0: wlan_busnum (1) [ 1.363397] sunxi-rfkill soc@3000000:rfkill@0: Missing wlan_power. [ 1.373081] sunxi-rfkill soc@3000000:rfkill@0: wlan clock[0] (32k-fanout1) [ 1.383606] sunxi-rfkill soc@3000000:rfkill@0: wlan_regon gpio=204 assert=1 [ 1.394273] sunxi-rfkill soc@3000000:rfkill@0: wlan_hostwake gpio=202 assert=1 [ 1.405211] sunxi-rfkill soc@3000000:rfkill@0: wakeup source is enabled [ 1.415660] sunxi-rfkill soc@3000000:rfkill@0: Missing bt_power. [ 1.425246] sunxi-rfkill soc@3000000:rfkill@0: bt clock[0] (32k-fanout1) [ 1.435612] sunxi-rfkill soc@3000000:rfkill@0: bt_rst gpio=205 assert=0 [ 1.446463] [ADDR_MGT] addr_mgt_probe: module version: v1.0.11 [ 1.456512] [ADDR_MGT] addr_mgt_probe: success. [ 1.463399] dma-buf: Running sanitycheck [ 1.469263] dma-buf: Running dma_fence [ 1.474865] sizeof(dma_fence)=48 [ 1.480002] dma-buf: Running dma_fence/sanitycheck [ 1.486775] dma-buf: Running dma_fence/test_signaling [ 1.493818] dma-buf: Running dma_fence/test_add_callback [ 1.501129] dma-buf: Running dma_fence/test_late_add_callback [ 1.510177] dma-buf: Running dma_fence/test_rm_callback [ 1.517382] dma-buf: Running dma_fence/test_late_rm_callback [ 1.526319] dma-buf: Running dma_fence/test_status [ 1.533014] dma-buf: Running dma_fence/test_error [ 1.539584] dma-buf: Running dma_fence/test_wait [ 1.546017] dma-buf: Running dma_fence/test_wait_timeout [ 1.587353] dma-buf: Running dma_fence/test_stub [ 1.593756] dma-buf: Running dma_fence/race_signal_callback [ 1.667350] thread_signal_callback[0] completed 34540 passes, 79 misses [ 1.677159] thread_signal_callback[1] completed 34541 passes, 79 misses [ 1.747346] thread_signal_callback[0] completed 36845 passes, 36845 misses [ 1.757445] thread_signal_callback[1] completed 36856 passes, 36855 misses [ 1.767960] sunxi-spinand: AW SPINand MTD Layer Version: 2.3 20211223 [ 1.777624] sunxi-spinand-phy: AW SPINand Phy Layer Version: 1.10 20200306 [ 1.787867] sunxi-spinand-phy: not detect any munufacture from id table [ 1.797673] sunxi-spinand-phy: get spi-nand Model from fdt fail [ 1.806644] sunxi-spinand-phy: get phy info from fdt fail [ 1.813977] sunxi-spinand-phy: not detect munufacture from fdt [ 1.822915] sunxi-spinand-phy: detect munufacture from id table: Winbond [ 1.832791] sunxi-spinand-phy: detect spinand id: ff21aaef ffffffff [ 1.842196] sunxi-spinand-phy: ========== arch info ========== [ 1.851190] sunxi-spinand-phy: Model: W25N01GVZEIG [ 1.860424] sunxi-spinand-phy: Munufacture: Winbond [ 1.869232] sunxi-spinand-phy: DieCntPerChip: 1 [ 1.876172] sunxi-spinand-phy: BlkCntPerDie: 1024 [ 1.883429] sunxi-spinand-phy: PageCntPerBlk: 64 [ 1.890461] sunxi-spinand-phy: SectCntPerPage: 4 [ 1.897387] sunxi-spinand-phy: OobSizePerPage: 64 [ 1.904388] sunxi-spinand-phy: BadBlockFlag: 0x0 [ 1.911508] sunxi-spinand-phy: OperationOpt: 0x7 [ 1.918644] sunxi-spinand-phy: MaxEraseTimes: 65000 [ 1.925957] sunxi-spinand-phy: EccFlag: 0x0 [ 1.933098] sunxi-spinand-phy: EccType: 2 [ 1.940008] sunxi-spinand-phy: EccProtectedType: 3 [ 1.946883] sunxi-spinand-phy: ======================================== [ 1.956692] sunxi-spinand-phy: [ 1.961395] sunxi-spinand-phy: ========== physical info ========== [ 1.970656] sunxi-spinand-phy: TotalSize: 128 M [ 1.977183] sunxi-spinand-phy: SectorSize: 512 B [ 1.983709] sunxi-spinand-phy: PageSize: 2 K [ 1.990010] sunxi-spinand-phy: BlockSize: 128 K [ 1.996472] sunxi-spinand-phy: OOBSize: 64 B [ 2.002836] sunxi-spinand-phy: ======================================== [ 2.012346] sunxi-spinand-phy: [ 2.016900] sunxi-spinand-phy: ========== logical info ========== [ 2.025752] sunxi-spinand-phy: TotalSize: 128 M [ 2.032148] sunxi-spinand-phy: SectorSize: 512 B [ 2.038550] sunxi-spinand-phy: PageSize: 4 K [ 2.044712] sunxi-spinand-phy: BlockSize: 256 K [ 2.051070] sunxi-spinand-phy: OOBSize: 128 B [ 2.057395] sunxi-spinand-phy: ======================================== [ 2.066699] sunxi-spinand-phy: block lock register: 0x00 [ 2.073676] sunxi-spinand-phy: feature register: 0x19 [ 2.080272] sunxi-spinand-phy: sunxi physic nand init end [ 2.087695] Creating 5 MTD partitions on "sunxi_mtd_nand": [ 2.095645] 0x000000000000-0x000000100000 : "boot0" [ 2.108249] 0x000000100000-0x000000400000 : "uboot" [ 2.128216] 0x000000400000-0x000000500000 : "secure_storage" [ 2.136898] random: fast init done [ 2.148220] 0x000000500000-0x000000580000 : "pstore" [ 2.158223] 0x000000580000-0x000008000000 : "sys" [ 2.268620] libphy: Fixed MDIO Bus: probed [ 2.274700] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver [ 2.283999] sunxi-ehci: EHCI SUNXI driver [ 2.289922] get ehci1-controller wakeup-source is fail. [ 2.296916] sunxi ehci1-controller don't init wakeup source [ 2.305220] [sunxi-ehci1]: probe, pdev->name: 4200000.ehci1-controller, sunxi_ehci: 0xc0b62288, 0x:c8835000, irq_no:38 [ 2.320380] sunxi-ehci 4200000.ehci1-controller: 4200000.ehci1-controller supply drvvbus not found, using dummy regulator [ 2.336113] sunxi-ehci 4200000.ehci1-controller: 4200000.ehci1-controller supply hci not found, using dummy regulator [ 2.350603] sunxi-ehci 4200000.ehci1-controller: EHCI Host Controller [ 2.360204] sunxi-ehci 4200000.ehci1-controller: new USB bus registered, assigned bus number 1 [ 2.372528] sunxi-ehci 4200000.ehci1-controller: irq 56, io mem 0x04200000 [ 2.407381] sunxi-ehci 4200000.ehci1-controller: USB 2.0 started, EHCI 1.00 [ 2.418446] hub 1-0:1.0: USB hub found [ 2.423946] hub 1-0:1.0: 1 port detected [ 2.430179] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver [ 2.439666] sunxi-ohci: OHCI SUNXI driver [ 2.445881] get ohci1-controller wakeup-source is fail. [ 2.453154] sunxi ohci1-controller don't init wakeup source [ 2.461947] [sunxi-ohci1]: probe, pdev->name: 4200400.ohci1-controller, sunxi_ohci: 0xc0b62518 [ 2.474192] sunxi-ohci 4200400.ohci1-controller: 4200400.ohci1-controller supply drvvbus not found, using dummy regulator [ 2.490599] sunxi-ohci 4200400.ohci1-controller: 4200400.ohci1-controller supply hci not found, using dummy regulator [ 2.505501] sunxi-ohci 4200400.ohci1-controller: OHCI Host Controller [ 2.515525] sunxi-ohci 4200400.ohci1-controller: new USB bus registered, assigned bus number 2 [ 2.528132] sunxi-ohci 4200400.ohci1-controller: irq 57, io mem 0x04200400 [ 2.612136] hub 2-0:1.0: USB hub found [ 2.617829] hub 2-0:1.0: 1 port detected [ 2.624290] i2c /dev entries driver [ 2.629700] sunxi cedar version 1.1 [ 2.635131] sunxi-cedar 1c0e000.ve: Adding to iommu group 0 [ 2.644101] VE: sunxi_cedar_probe power-domain init!!! [ 2.651218] VE: install start!!! [ 2.651218] [ 2.659305] VE: cedar-ve the get irq is 40 [ 2.659305] [ 2.668289] VE: ve_debug_proc_info:(ptrval), data:(ptrval), lock:(ptrval) [ 2.668289] [ 2.681286] VE: install end!!! [ 2.681286] [ 2.688737] VE: sunxi_cedar_probe [ 2.693857] Bluetooth: HCI UART driver ver 2.3 [ 2.700034] Bluetooth: HCI UART protocol H4 registered [ 2.706956] Bluetooth: HCI UART protocol BCSP registered [ 2.714409] Bluetooth: XRadio Bluetooth LPM Mode Driver Ver 1.0.10 [ 2.725465] sunxi-mmc 4020000.sdmmc: SD/MMC/SDIO Host Controller Driver(v4.25 2022-6-21 13:40) [ 2.737751] sunxi-mmc 4020000.sdmmc: ***ctl-spec-caps*** 8 [ 2.746271] sunxi-mmc 4020000.sdmmc: No vmmc regulator found [ 2.754942] sunxi-mmc 4020000.sdmmc: No vqmmc regulator found [ 2.763733] sunxi-mmc 4020000.sdmmc: No vdmmc regulator found [ 2.772503] sunxi-mmc 4020000.sdmmc: No vd33sw regulator found [ 2.781385] sunxi-mmc 4020000.sdmmc: No vd18sw regulator found [ 2.790253] sunxi-mmc 4020000.sdmmc: No vq33sw regulator found [ 2.799131] sunxi-mmc 4020000.sdmmc: No vq18sw regulator found [ 2.808442] sunxi-mmc 4020000.sdmmc: Got CD GPIO [ 2.815059] sunxi-mmc 4020000.sdmmc: set cd-gpios as 24M fail [ 2.824101] sunxi-mmc 4020000.sdmmc: sdc set ios:clk 0Hz bm PP pm UP vdd 21 width 1 timing LEGACY(SDR12) dt B [ 2.837764] sunxi-mmc 4020000.sdmmc: no vqmmc,Check if there is regulator [ 2.860380] sunxi-mmc 4020000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B [ 2.887399] sunxi-mmc 4020000.sdmmc: detmode:gpio irq [ 2.894395] sunxi-mmc 4020000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B [ 2.909073] sunxi-mmc 4021000.sdmmc: SD/MMC/SDIO Host Controller Driver(v4.25 2022-6-21 13:40) [ 2.911627] sunxi-mmc 4020000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B [ 2.921580] sunxi-mmc 4021000.sdmmc: ***ctl-spec-caps*** 8 [ 2.938077] sunxi-mmc 4020000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B [ 2.944673] sunxi-mmc 4021000.sdmmc: No vmmc regulator found [ 2.962085] sunxi-mmc 4020000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B [ 2.968237] sunxi-mmc 4021000.sdmmc: No vqmmc regulator found [ 2.968245] sunxi-mmc 4021000.sdmmc: No vdmmc regulator found [ 3.001244] sunxi-mmc 4021000.sdmmc: No vd33sw regulator found [ 3.004706] mmc0: host does not support reading read-only switch, assuming write-enable [ 3.010616] sunxi-mmc 4021000.sdmmc: No vd18sw regulator found [ 3.024158] sunxi-mmc 4020000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing SD-HS(SDR25) dt B [ 3.031791] sunxi-mmc 4021000.sdmmc: No vq33sw regulator found [ 3.031798] sunxi-mmc 4021000.sdmmc: No vq18sw regulator found [ 3.046250] sunxi-mmc 4020000.sdmmc: sdc set ios:clk 50000000Hz bm PP pm ON vdd 21 width 1 timing SD-HS(SDR25) dt B [ 3.055584] sunxi-mmc 4021000.sdmmc: Cann't get pin bias hs pinstate,check if needed [ 3.065053] sunxi-mmc 4020000.sdmmc: sdc set ios:clk 50000000Hz bm PP pm ON vdd 21 width 4 timing SD-HS(SDR25) dt B [ 3.105901] mmc0: new high speed SDHC card at address 59b4 [ 3.115359] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 0Hz bm PP pm UP vdd 21 width 1 timing LEGACY(SDR12) dt B [ 3.129498] sunxi-mmc 4021000.sdmmc: no vqmmc,Check if there is regulator [ 3.152568] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B [ 3.179739] sunxi-mmc 4021000.sdmmc: detmode:manually by software [ 3.190333] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 52, RTO !! [ 3.200944] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 52, RTO !! [ 3.201969] [AUDIOCODEC][sunxi_codec_parse_params][2437]:digital_vol:0, lineout_vol:26, mic1gain:31, mic2gain:31 pa_msleep:120, pa_level:1, pa_pwr_level:1 [ 3.201969] [ 3.233825] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B [ 3.237376] [AUDIOCODEC][sunxi_codec_parse_params][2473]:adcdrc_cfg:0, adchpf_cfg:1, dacdrc_cfg:0, dachpf:0 [ 3.262700] [AUDIOCODEC][sunxi_internal_codec_probe][2634]:codec probe finished [ 3.263510] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B [ 3.274755] debugfs: Directory '203034c.dummy_cpudai' with parent 'audiocodec' already present! [ 3.301114] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 5, RTO !! [ 3.310780] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 5, RTO !! [ 3.320447] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 5, RTO !! [ 3.330095] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 5, RTO !! [ 3.330123] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 0Hz bm PP pm OFF vdd 0 width 1 timing LEGACY(SDR12) dt B [ 3.353882] [SNDCODEC][sunxi_card_init][583]:card init finished [ 3.363911] sunxi-codec-machine 2030340.sound: 2030000.codec <-> 203034c.dummy_cpudai mapping ok [ 3.377777] input: audiocodec sunxi Audio Jack as /devices/platform/soc@3000000/2030340.sound/sound/card0/input0 [ 3.392719] [SNDCODEC][sunxi_card_dev_probe][836]:register card finished [ 3.404018] NET: Registered protocol family 10 [ 3.410564] [SNDCODEC][sunxi_hs_init_work][259]:resume-->report switch [ 3.418308] Segment Routing with IPv6 [ 3.426403] NET: Registered protocol family 17 [ 3.433063] Bluetooth: RFCOMM TTY layer initialized [ 3.440011] Bluetooth: RFCOMM socket layer initialized [ 3.447237] Bluetooth: RFCOMM ver 1.11 [ 3.453431] Registering SWP/SWPB emulation handler [ 3.477784] get ehci0-controller wakeup-source is fail. [ 3.485154] sunxi ehci0-controller don't init wakeup source [ 3.494198] [sunxi-ehci0]: probe, pdev->name: 4101000.ehci0-controller, sunxi_ehci: 0xc0b61d68, 0x:c88ed000, irq_no:36 [ 3.510336] [sunxi-ehci0]: Not init ehci0 [ 3.516540] get ohci0-controller wakeup-source is fail. [ 3.523912] sunxi ohci0-controller don't init wakeup source [ 3.532900] [sunxi-ohci0]: probe, pdev->name: 4101400.ohci0-controller, sunxi_ohci: 0xc0b61ff8 [ 3.545297] [sunxi-ohci0]: Not init ohci0 [ 3.552449] ubi0: attaching mtd4 [ 3.739483] ubi0: scanning is finished [ 3.750692] ubi0 warning: ubi_eba_init: cannot reserve enough PEBs for bad PEB handling, reserved 18, need 20 [ 3.766395] ubi0: attached mtd4 (name "sys", size 122 MiB) [ 3.775182] ubi0: PEB size: 262144 bytes (256 KiB), LEB size: 258048 bytes [ 3.785484] ubi0: min./max. I/O unit sizes: 4096/4096, sub-page size 2048 [ 3.795688] ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096 [ 3.806087] ubi0: good PEBs: 490, bad PEBs: 0, corrupted PEBs: 0 [ 3.815408] ubi0: user volume: 9, internal volumes: 1, max. volumes count: 128 [ 3.826107] ubi0: max/mean erase counter: 18/12, WL threshold: 4096, image sequence number: 0 [ 3.838288] ubi0: available PEBs: 0, total reserved PEBs: 490, PEBs reserved for bad PEB handling: 18 [ 3.851299] ubi0: background thread "ubi_bgt0d" started, PID 75 [ 3.861759] block ubiblock0_5: created from ubi0:5(rootfs) [ 3.871139] otg manager soc@3000000:usbc0@0: soc@3000000:usbc0@0 supply usbc not found, using dummy regulator [ 3.886696] sun8iw20-pinctrl 2000000.pinctrl: 2000000.pinctrl supply vcc-pe not found, using dummy regulator [ 3.901800] input: gpio-keys as /devices/platform/gpio-keys/input/input1 [ 3.914729] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2 [ 3.927299] cfg80211: failed to load regulatory.db [ 3.927308] clk: Not disabling unused clocks [ 3.940342] ALSA device list: [ 3.945054] #0: audiocodec [ 3.949660] alloc_fd: slot 0 not NULL! [ 3.958312] VFS: Mounted root (squashfs filesystem) readonly on device 254:0. [ 3.971231] devtmpfs: mounted [ 3.977886] Freeing unused kernel memory: 1024K [ 3.987502] Run /pseudo_init as init process mount: mounting none on /dev failed: Device or resource busy [ 4.706715] UBIFS (ubi0:7): Mounting in unauthenticated mode [ 4.716025] UBIFS (ubi0:7): background thread "ubifs_bgt0_7" started, PID 104 [ 4.744355] random: crng init done [ 4.770429] UBIFS (ubi0:7): recovery needed [ 4.921813] UBIFS (ubi0:7): recovery completed [ 4.928450] UBIFS (ubi0:7): UBIFS: mounted UBI device 0, volume 7, name "rootfs_data" [ 4.939907] UBIFS (ubi0:7): LEB size: 258048 bytes (252 KiB), min./max. I/O unit sizes: 4096 bytes/4096 bytes [ 4.953676] UBIFS (ubi0:7): FS size: 3096576 bytes (2 MiB, 12 LEBs), journal size 1806337 bytes (1 MiB, 5 LEBs) [ 4.967656] UBIFS (ubi0:7): reserved for root: 146258 bytes (142 KiB) [ 4.977507] UBIFS (ubi0:7): media format: w5/r0 (latest is w5/r0), UUID B9215416-B885-4FE1-9784-B5F966954AF9, small LPT model can't run '/etc/preinit': No such file or directory mount: mounting proc on /proc failed: Device or resource busy hostname: can't open '/etc/hostname': No such file or directory ------run rc.preboot file----- [ 5.260087] UBIFS (ubi0:8): Mounting in unauthenticated mode [ 5.269238] UBIFS (ubi0:8): background thread "ubifs_bgt0_8" started, PID 133 [ 5.354310] UBIFS (ubi0:8): UBIFS: mounted UBI device 0, volume 8, name "UDISK" [ 5.365182] UBIFS (ubi0:8): LEB size: 258048 bytes (252 KiB), min./max. I/O unit sizes: 4096 bytes/4096 bytes [ 5.378940] UBIFS (ubi0:8): FS size: 53673984 bytes (51 MiB, 208 LEBs), journal size 2580480 bytes (2 MiB, 10 LEBs) [ 5.393269] UBIFS (ubi0:8): reserved for root: 2535154 bytes (2475 KiB) [ 5.403286] UBIFS (ubi0:8): media format: w5/r0 (latest is w5/r0), UUID 254AC323-E796-441E-9597-B9747E9125E4, small LPT model ------run rc.modules file----- insmod: can't insert '/lib/modules/5.4.61/sunxi_gpadc.ko': No such file or directory [ 5.575971] ======== XRADIO WIFI OPEN ======== [ 5.582951] [XRADIO] Driver Label:XR_V02.16.85_P2P_HT40_01.31 [ 5.592472] [XRADIO] Allocated hw_priv @ 92b02454 [ 5.599698] sunxi-rfkill soc@3000000:rfkill@0: bus_index: 1 [ 5.618767] sunxi-rfkill soc@3000000:rfkill@0: wlan power on success [ 5.828722] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 0Hz bm PP pm UP vdd 21 width 1 timing LEGACY(SDR12) dt B [ 5.842672] [XRADIO] Detect SDIO card 1 [ 5.842782] sunxi-mmc 4021000.sdmmc: no vqmmc,Check if there is regulator [ 5.871373] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B [ 5.899341] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 52, RTO !! [ 5.909899] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 52, RTO !! [ 5.919638] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B [ 5.937146] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B [ 5.953823] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 5, RTO !! [ 5.964258] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 5, RTO !! [ 5.974703] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 5, RTO !! [ 5.985137] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 5, RTO !! [ 5.994789] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 0Hz bm PP pm OFF vdd 0 width 1 timing LEGACY(SDR12) dt B [ 7.447622] sunxi_usb_udc 4100000.udc-controller: 4100000.udc-controller supply udc not found, using dummy regulator [ 7.887418] sunxi-rfkill soc@3000000:rfkill@0: wlan power off success [ 7.997598] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 0Hz bm PP pm UP vdd 21 width 1 timing LEGACY(SDR12) dt B [ 8.011645] [XRADIO] Remove SDIO card 1 [ 8.027402] [SBUS_ERR] sdio probe timeout! [ 8.027429] sunxi-mmc 4021000.sdmmc: no vqmmc,Check if there is regulator [ 8.033438] [XRADIO_ERR] sbus_sdio_init failed [ 8.050656] xradio_core_init failed (-110)! [ 8.056440] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B [ 8.084693] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 52, RTO !! [ 8.095183] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 52, RTO !! [ 8.104883] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B [ 8.122369] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B [ 8.139035] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 5, RTO !! [ 8.149442] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 5, RTO !! [ 8.159844] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 5, RTO !! [ 8.170257] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 5, RTO !! [ 8.179875] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 0Hz bm PP pm OFF vdd 0 width 1 timing LEGACY(SDR12) dt B [ 8.225930] ======== XRADIO WIFI OPEN ======== [ 8.232967] [XRADIO] Driver Label:XR_V02.16.85_P2P_HT40_01.31 [ 8.242654] [XRADIO] Allocated hw_priv @ 6acdb30e [ 8.249930] sunxi-rfkill soc@3000000:rfkill@0: bus_index: 1 [ 8.269066] sunxi-rfkill soc@3000000:rfkill@0: wlan power on success [ 8.479093] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 0Hz bm PP pm UP vdd 21 width 1 timing LEGACY(SDR12) dt B [ 8.493086] [XRADIO] Detect SDIO card 1 [ 8.493192] sunxi-mmc 4021000.sdmmc: no vqmmc,Check if there is regulator [ 8.521757] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B [ 8.549664] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 52, RTO !! [ 8.560170] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 52, RTO !! [ 8.569904] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B [ 8.587436] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B [ 8.604130] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 5, RTO !! [ 8.614573] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 5, RTO !! [ 8.625032] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 5, RTO !! [ 8.635488] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 5, RTO !! [ 8.645137] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 0Hz bm PP pm OFF vdd 0 width 1 timing LEGACY(SDR12) dt B [ 10.527415] sunxi-rfkill soc@3000000:rfkill@0: wlan power off success [ 10.637604] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 0Hz bm PP pm UP vdd 21 width 1 timing LEGACY(SDR12) dt B [ 10.651656] [XRADIO] Remove SDIO card 1 [ 10.667410] [SBUS_ERR] sdio probe timeout! [ 10.667427] sunxi-mmc 4021000.sdmmc: no vqmmc,Check if there is regulator [ 10.673451] [XRADIO_ERR] sbus_sdio_init failed [ 10.690618] xradio_core_init failed (-110)! [ 10.696431] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B [ 10.724648] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 52, RTO !! [ 10.735142] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 52, RTO !! [ 10.744827] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B [ 10.762314] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B [ 10.778962] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 5, RTO !! [ 10.789374] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 5, RTO !! [ 10.799792] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 5, RTO !! [ 10.810197] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 5, RTO !! [ 10.819811] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 0Hz bm PP pm OFF vdd 0 width 1 timing LEGACY(SDR12) dt B
-
萌新自制GBA游戏机(第二弹)
前言
紧跟晕哥和司徒大佬的脚步
基于全志T113-S3自制GBA游戏机
视频介绍 https://www.bilibili.com/video/BV1Gu411V7ar
开源地址 https://github.com/hsinyuwang/X-Boy-Plus图片展示
为了方便使用嘉立创免费打样,依旧分开设计PCB,每块PCB尺寸都在10x10cm以内
因为时间有限还没有画3D外壳 -
回复: T113 tina linux 适配 ili9488 屏幕 i80 16bit
尚未解决问题
- fb0_format 修改为10 后启动 log 是绿色
fb0_format = <10>;
- 屏幕实时帧率与期望帧率相差较大
lcd_x = <480>; lcd_y = <320>; lcd_width = <72>; lcd_height = <48>; lcd_dclk_freq = <10>; lcd_hbp = <2>; lcd_ht = <486>; lcd_hspw = <2>; lcd_vbp = <20>; lcd_vt = <342>; lcd_vspw = <2>; lcd_cpu_mode = <1>; lcd_cpu_te = <1>;
-
T113 tina linux 适配 ili9488 屏幕 i80 16bit
前言
在上一篇文章已经搞定了 T113 tina linux 移植 gpsp 模拟器 接下来适配屏幕驱动。
因为 GBA 原生分辨率是 240x160,所以屏幕选用的是 480x320 的 ili9488,正好可以整数倍缩放。初始化屏幕
先从 tina linux 自带的驱动中 copy 一份 st7789v_cpu 的代码,然后对照 ili9488 屏幕厂商提供的初始化代码做修改
完整代码/* * drivers/video/fbdev/sunxi/disp2/disp/lcd/ili9488_cpu.c * * Copyright (c) 2007-2018 Allwinnertech Co., Ltd. * Author: zhengxiaobin <zhengxiaobin@allwinnertech.com> * * This software is licensed under the terms of the GNU General Public * License version 2, as published by the Free Software Foundation, and * may be copied, distributed, and modified under those terms. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * */ #include "ili9488_cpu.h" #define CPU_TRI_MODE #define DBG_INFO(format, args...) (printk("[ILI9488 LCD INFO] LINE:%04d-->%s:"format, __LINE__, __func__, ##args)) #define DBG_ERR(format, args...) (printk("[ILI9488 LCD ERR] LINE:%04d-->%s:"format, __LINE__, __func__, ##args)) #define panel_reset(val) sunxi_lcd_gpio_set_value(sel, 0, val) #define lcd_cs(val) sunxi_lcd_gpio_set_value(sel, 1, val) static void lcd_panel_ili9488_init(u32 sel, struct disp_panel_para *info); static void LCD_power_on(u32 sel); static void LCD_power_off(u32 sel); static void LCD_bl_open(u32 sel); static void LCD_bl_close(u32 sel); static void LCD_panel_init(u32 sel); static void LCD_panel_exit(u32 sel); static void LCD_cfg_panel_info(struct panel_extend_para *info) { #if 0 u32 i = 0, j = 0; u32 items; u8 lcd_gamma_tbl[][2] = { //{input value, corrected value} {0, 0}, {15, 15}, {30, 30}, {45, 45}, {60, 60}, {75, 75}, {90, 90}, {105, 105}, {120, 120}, {135, 135}, {150, 150}, {165, 165}, {180, 180}, {195, 195}, {210, 210}, {225, 225}, {240, 240}, {255, 255}, }; u32 lcd_cmap_tbl[2][3][4] = { { {LCD_CMAP_G0, LCD_CMAP_B1, LCD_CMAP_G2, LCD_CMAP_B3}, {LCD_CMAP_B0, LCD_CMAP_R1, LCD_CMAP_B2, LCD_CMAP_R3}, {LCD_CMAP_R0, LCD_CMAP_G1, LCD_CMAP_R2, LCD_CMAP_G3}, }, { {LCD_CMAP_B3, LCD_CMAP_G2, LCD_CMAP_B1, LCD_CMAP_G0}, {LCD_CMAP_R3, LCD_CMAP_B2, LCD_CMAP_R1, LCD_CMAP_B0}, {LCD_CMAP_G3, LCD_CMAP_R2, LCD_CMAP_G1, LCD_CMAP_R0}, }, }; items = sizeof(lcd_gamma_tbl) / 2; for (i = 0; i < items - 1; i++) { u32 num = lcd_gamma_tbl[i + 1][0] - lcd_gamma_tbl[i][0]; for (j = 0; j < num; j++) { u32 value = 0; value = lcd_gamma_tbl[i][1] + ((lcd_gamma_tbl[i + 1][1] - lcd_gamma_tbl[i][1]) * j) / num; info->lcd_gamma_tbl[lcd_gamma_tbl[i][0] + j] = (value << 16) + (value << 8) + value; } } info->lcd_gamma_tbl[255] = (lcd_gamma_tbl[items - 1][1] << 16) + (lcd_gamma_tbl[items - 1][1] << 8) + lcd_gamma_tbl[items - 1][1]; memcpy(info->lcd_cmap_tbl, lcd_cmap_tbl, sizeof(lcd_cmap_tbl)); #endif } static s32 LCD_open_flow(u32 sel) { LCD_OPEN_FUNC(sel, LCD_power_on, 120); #ifdef CPU_TRI_MODE LCD_OPEN_FUNC(sel, LCD_panel_init, 100); LCD_OPEN_FUNC(sel, sunxi_lcd_tcon_enable, 50); #else LCD_OPEN_FUNC(sel, sunxi_lcd_tcon_enable, 100); LCD_OPEN_FUNC(sel, LCD_panel_init, 50); #endif LCD_OPEN_FUNC(sel, LCD_bl_open, 0); return 0; } static s32 LCD_close_flow(u32 sel) { LCD_CLOSE_FUNC(sel, LCD_bl_close, 20); #ifdef CPU_TRI_MODE LCD_CLOSE_FUNC(sel, sunxi_lcd_tcon_disable, 10); LCD_CLOSE_FUNC(sel, LCD_panel_exit, 50); #else LCD_CLOSE_FUNC(sel, LCD_panel_exit, 10); LCD_CLOSE_FUNC(sel, sunxi_lcd_tcon_disable, 10); #endif LCD_CLOSE_FUNC(sel, LCD_power_off, 0); return 0; } static void LCD_power_on(u32 sel) { /*config lcd_power pin to open lcd power0 */ sunxi_lcd_power_enable(sel, 0); sunxi_lcd_pin_cfg(sel, 1); } static void LCD_power_off(u32 sel) { /*lcd_cs, active low */ lcd_cs(1); sunxi_lcd_delay_ms(10); /*lcd_rst, active hight */ panel_reset(1); sunxi_lcd_delay_ms(10); sunxi_lcd_pin_cfg(sel, 0); /*config lcd_power pin to close lcd power0 */ sunxi_lcd_power_disable(sel, 0); } static void LCD_bl_open(u32 sel) { sunxi_lcd_pwm_enable(sel); /*config lcd_bl_en pin to open lcd backlight */ sunxi_lcd_backlight_enable(sel); } static void LCD_bl_close(u32 sel) { /*config lcd_bl_en pin to close lcd backlight */ sunxi_lcd_backlight_disable(sel); sunxi_lcd_pwm_disable(sel); } /*static int bootup_flag = 0;*/ static void LCD_panel_init(u32 sel) { struct disp_panel_para *info = kmalloc(sizeof(struct disp_panel_para), GFP_KERNEL); DBG_INFO("\n"); bsp_disp_get_panel_info(sel, info); lcd_panel_ili9488_init(sel, info); kfree(info); return; } static void LCD_panel_exit(u32 sel) { sunxi_lcd_cpu_write_index(0, 0x28); sunxi_lcd_delay_ms(10); sunxi_lcd_cpu_write_index(0, 0x10); sunxi_lcd_delay_ms(120); } static void lcd_panel_ili9488_init(u32 sel, struct disp_panel_para *info) { DBG_INFO("\n"); /*lcd_cs, active low */ lcd_cs(0); sunxi_lcd_delay_ms(10); panel_reset(1); sunxi_lcd_delay_ms(20); panel_reset(0); sunxi_lcd_delay_ms(20); panel_reset(1); sunxi_lcd_delay_ms(120); sunxi_lcd_cpu_write_index(0, 0xF7); sunxi_lcd_cpu_write_data(0, 0xA9); sunxi_lcd_cpu_write_data(0, 0x51); sunxi_lcd_cpu_write_data(0, 0x2C); sunxi_lcd_cpu_write_data(0, 0x82); sunxi_lcd_cpu_write_index(0, 0xC0); sunxi_lcd_cpu_write_data(0, 0x11); sunxi_lcd_cpu_write_data(0, 0x09); sunxi_lcd_cpu_write_index(0, 0xC1); sunxi_lcd_cpu_write_data(0, 0x41); sunxi_lcd_cpu_write_index(0, 0xC5); sunxi_lcd_cpu_write_data(0, 0x00); sunxi_lcd_cpu_write_data(0, 0x2A); sunxi_lcd_cpu_write_data(0, 0x80); sunxi_lcd_cpu_write_index(0, 0xB1); sunxi_lcd_cpu_write_data(0, 0xB0); sunxi_lcd_cpu_write_data(0, 0x11); sunxi_lcd_cpu_write_index(0, 0xB4); sunxi_lcd_cpu_write_data(0, 0x02); sunxi_lcd_cpu_write_index(0, 0xB6); sunxi_lcd_cpu_write_data(0, 0x02); sunxi_lcd_cpu_write_data(0, 0x22); sunxi_lcd_cpu_write_index(0, 0xB7); sunxi_lcd_cpu_write_data(0, 0xC6); sunxi_lcd_cpu_write_index(0, 0xBE); sunxi_lcd_cpu_write_data(0, 0x00); sunxi_lcd_cpu_write_data(0, 0x04); sunxi_lcd_cpu_write_index(0, 0xE9); sunxi_lcd_cpu_write_data(0, 0x00); sunxi_lcd_cpu_write_index(0, 0x3A); sunxi_lcd_cpu_write_data(0, 0x55); sunxi_lcd_cpu_write_index(0, 0xE0); sunxi_lcd_cpu_write_data(0, 0x00); sunxi_lcd_cpu_write_data(0, 0x07); sunxi_lcd_cpu_write_data(0, 0x12); sunxi_lcd_cpu_write_data(0, 0x0B); sunxi_lcd_cpu_write_data(0, 0x18); sunxi_lcd_cpu_write_data(0, 0x0B); sunxi_lcd_cpu_write_data(0, 0x3F); sunxi_lcd_cpu_write_data(0, 0x9B); sunxi_lcd_cpu_write_data(0, 0x4B); sunxi_lcd_cpu_write_data(0, 0x0B); sunxi_lcd_cpu_write_data(0, 0x0F); sunxi_lcd_cpu_write_data(0, 0x0B); sunxi_lcd_cpu_write_data(0, 0x15); sunxi_lcd_cpu_write_data(0, 0x17); sunxi_lcd_cpu_write_data(0, 0x0F); sunxi_lcd_cpu_write_index(0, 0xE1); sunxi_lcd_cpu_write_data(0, 0x00); sunxi_lcd_cpu_write_data(0, 0x16); sunxi_lcd_cpu_write_data(0, 0x1B); sunxi_lcd_cpu_write_data(0, 0x02); sunxi_lcd_cpu_write_data(0, 0x0F); sunxi_lcd_cpu_write_data(0, 0x06); sunxi_lcd_cpu_write_data(0, 0x34); sunxi_lcd_cpu_write_data(0, 0x46); sunxi_lcd_cpu_write_data(0, 0x48); sunxi_lcd_cpu_write_data(0, 0x04); sunxi_lcd_cpu_write_data(0, 0x0D); sunxi_lcd_cpu_write_data(0, 0x0D); sunxi_lcd_cpu_write_data(0, 0x35); sunxi_lcd_cpu_write_data(0, 0x36); sunxi_lcd_cpu_write_data(0, 0x0F); sunxi_lcd_cpu_write_index(0, 0x2A); sunxi_lcd_cpu_write_data(0, 0x00); sunxi_lcd_cpu_write_data(0, 0x00); sunxi_lcd_cpu_write_data(0, 0x01); sunxi_lcd_cpu_write_data(0, 0xDF); sunxi_lcd_cpu_write_index(0, 0x2B); sunxi_lcd_cpu_write_data(0, 0x00); sunxi_lcd_cpu_write_data(0, 0x00); sunxi_lcd_cpu_write_data(0, 0x01); sunxi_lcd_cpu_write_data(0, 0x3F); sunxi_lcd_cpu_write_index(0, 0x36); sunxi_lcd_cpu_write_data(0, 0x68); #if defined(CPU_TRI_MODE) /* enable te, mode 0 */ sunxi_lcd_cpu_write_index(0, 0x35); sunxi_lcd_cpu_write_data(0, 0x00); #endif sunxi_lcd_cpu_write_index(0, 0x11); sunxi_lcd_delay_ms(120); sunxi_lcd_cpu_write_index(0, 0x29); sunxi_lcd_cpu_write_index(0, 0x2c); } /* panel driver name, must mach the name of lcd_drv_name in sys_config.fex */ struct __lcd_panel ili9488_cpu_panel = { .name = "ili9488_cpu", .func = { .cfg_panel_info = LCD_cfg_panel_info, .cfg_open_flow = LCD_open_flow, .cfg_close_flow = LCD_close_flow, }, };
Kconfig 添加
config LCD_SUPPORT_ILI9488_CPU bool "LCD support ili9488_cpu panel" default n ---help--- If you want to support ili9488_cpu panel for display driver, select it.
Makefile 添加
disp-$(CONFIG_LCD_SUPPORT_ILI9488_CPU) += lcd/ili9488_cpu.o
panels.c 添加
#ifdef CONFIG_LCD_SUPPORT_ILI9488_CPU &ili9488_cpu_panel, #endif
panels.h 添加
#ifdef CONFIG_LCD_SUPPORT_ILI9488_CPU extern struct __lcd_panel ili9488_cpu_panel; #endif
再打开 m kernel_menuconfig
Device Drivers ---> Graphics support ---> Frame buffer Devices ---> Video support for sunxi ---> LCD panels select ---> [*] LCD support ili9488_cpu panel
修改 board.dts
disp
&disp { disp_init_enable = <1>; disp_mode = <0>; screen0_output_type = <1>; screen0_output_mode = <4>; screen1_output_type = <3>; screen1_output_mode = <4>; screen1_output_format = <0>; screen1_output_bits = <0>; screen1_output_eotf = <4>; screen1_output_cs = <257>; screen1_output_dvi_hdmi = <2>; screen1_output_range = <2>; screen1_output_scan = <0>; screen1_output_aspect_ratio = <8>; dev0_output_type = <1>; dev0_output_mode = <4>; dev0_screen_id = <0>; dev0_do_hpd = <0>; dev1_output_type = <4>; dev1_output_mode = <10>; dev1_screen_id = <1>; dev1_do_hpd = <1>; def_output_dev = <1>; hdmi_mode_check = <3>; disp_rotation_used = <1>; degree0 = <0>; fb0_format = <10>; fb0_buffer_num = <1>; /*fb0_width = <800>;*/ /*fb0_height = <480>;*/ /*read from lcd*/ fb1_format = <0>; fb1_width = <0>; fb1_height = <0>; chn_cfg_mode = <1>; disp_para_zone = <1>; /*VCC-LCD*/ /* dc1sw-supply = <®_dc1sw>;*/ /*VCC-DSI*/ /* eldo3-supply = <®_eldo3>;*/ /*VCC-PD*/ /* dcdc1-supply = <®_dcdc1>;*/ };
lcd0
&lcd0 { /* part 1 */ lcd_used = <1>; lcd_driver_name = "ili9488_cpu"; /* part 2 */ lcd_if = <1>; lcd_cpu_if = <8>; /* part 3 */ lcd_x = <480>; lcd_y = <320>; lcd_width = <72>; lcd_height = <48>; lcd_dclk_freq = <10>; lcd_hbp = <2>; lcd_ht = <486>; lcd_hspw = <2>; lcd_vbp = <20>; lcd_vt = <342>; lcd_vspw = <2>; /* part 4 */ lcd_pwm_used = <1>; lcd_pwm_ch = <8>; lcd_pwm_freq = <50000>; lcd_pwm_pol = <1>; lcd_pwm_max_limit = <255>; lcd_bright_curve_en = <0>; /* part 5 */ lcd_cpu_mode = <1>; lcd_cpu_te = <1>; /* part 6 */ lcd_frm = <2>; lcd_gamma_en = <0>; lcd_cmap_en = <0>; lcd_rb_swap = <0>; /* part 7 */ // reset pin lcd_gpio_0 = <&pio PD 0 GPIO_ACTIVE_HIGH>; // cs pin lcd_gpio_1 = <&pio PD 9 GPIO_ACTIVE_HIGH>; pinctrl-0 = <&rgb16_pins_a>; pinctrl-1 = <&rgb16_pins_b>; };
然后在pio中添加
rgb16_pins_a: rgb16@0 { pins = "PD1", "PD2","PD3","PD4","PD5","PD6", "PD7", "PD8", \ "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PD16", "PD17", \ "PD18", "PD19", "PD20", "PD21"; function = "lcd0"; drive-strength = <30>; bias-disable; }; rgb16_pins_b: rgb16@1 { pins = "PD1", "PD2","PD3","PD4","PD5","PD6", "PD7", "PD8", \ "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PD16", "PD17", \ "PD18", "PD19", "PD20", "PD21"; function = "io_disabled"; bias-disable; };
测试 gpsp 显示
-
回复: T113 tina linux 移植 gpsp 模拟器
sdl_ttf 的完整 makefile
# # Copyright (C) 2010 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. # include $(TOPDIR)/rules.mk PKG_NAME:=libsdl-ttf PKG_VERSION:=2.0.11 PKG_RELEASE:=2 PKG_SOURCE:=SDL_ttf-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://www.libsdl.org/projects/SDL_ttf/release/ PKG_MD5SUM:=61e29bd9da8d245bc2471d1b2ce591aa PKG_BUILD_DIR:=$(COMPILE_DIR)/SDL_ttf-$(PKG_VERSION) PKG_INSTALL:=1 include $(BUILD_DIR)/package.mk include $(BUILD_DIR)/nls.mk define Package/libsdl-ttf SECTION:=libs CATEGORY:=Libraries TITLE:=Simple DirectMedia Layer True Font URL:=http://www.libsdl.org/projects/SDL_ttf/ DEPENDS:=+sdl +libfreetype $(ICONV_DEPENDS) $(INTL_DEPENDS) endef define Package/libsdl-ttf/description SDL_ttf is a TrueType font rendering library that is used with the SDL library, and almost as portable. It depends on freetype2 to handle the TrueType font data. It allows a programmer to use multiple TrueType fonts without having to code a font rendering routine themselves. With the power of outline fonts and antialiasing, high quality text output can be obtained without much effort. endef PKG_FIXUP:=libtool TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include/SDL CONFIGURE_ARGS += \ --with-sdl-exec-prefix=$(STAGING_DIR) \ --without-x \ LIBS="-lSDL -liconv" TARGET_LDFLAGS+= \ -Wl,-rpath-link=$(STAGING_DIR)/usr/lib define Build/InstallDev $(INSTALL_DIR) \ $(1)/usr/include/SDL \ $(1)/usr/lib $(CP) \ $(PKG_INSTALL_DIR)/usr/include/SDL/SDL_ttf.h \ $(1)/usr/include/SDL/ $(CP) \ $(PKG_INSTALL_DIR)/usr/lib/libSDL_ttf*.{a,so*} \ $(1)/usr/lib/ endef define Package/libsdl-ttf/install $(INSTALL_DIR) \ $(1)/usr/lib $(CP) \ $(PKG_INSTALL_DIR)/usr/lib/libSDL_ttf*.so* \ $(1)/usr/lib/ endef $(eval $(call BuildPackage,libsdl-ttf))
-
回复: T113 tina linux 移植 gpsp 模拟器
补充:sdl_ttf 的 makefile 需要把 DEPENDS:=+libsdl 改成 DEPENDS:=+sdl +libfreetype
-
T113 tina linux 移植 gpsp 模拟器
gpsp 依赖 SDL 和 SDL_TTF
- SDL 1.2.5 的移植可以看这篇文章 d1s移植sdl1-2-15版本,makefile中需要关掉 directfb 和 tslib
CONFIGURE_ARGS += \ --enable-static=no \ --disable-video-directfb \ --enable-input-tslib=no \
同时在 menuconfig 中也关掉 directfb
- SDL_TTF 可以在 openwrt 的 package 中找到 https://github.com/robbie-cao/openwrt-packages-kyak 直接将 libsdl-ttf 复制到 tina linux 的 package/libs 目录下,这个 makefile 里面是 2.0.9 的版本,可以修改到 2.0.11 ,对应修改 md5sum 为 61e29bd9da8d245bc2471d1b2ce591aa
PKG_NAME:=libsdl-ttf PKG_VERSION:=2.0.11 PKG_RELEASE:=2 PKG_SOURCE:=SDL_ttf-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://www.libsdl.org/projects/SDL_ttf/release/ PKG_MD5SUM:=61e29bd9da8d245bc2471d1b2ce591aa PKG_BUILD_DIR:=$(COMPILE_DIR)/SDL_ttf-$(PKG_VERSION)
编译好之后 开始编译 gpsp
- 修改 CFLAGS 添加头文件路径
-I/home/hsinyuwang/t113/tina-d1-h/out/t113-nezha/staging_dir/target/usr/include/SDL -I/home/hsinyuwang/t113/tina-d1-h/out/t113-nezha/staging_dir/target/usr/include
- 修改 LDFLAGS 添加库文件路径
-L/home/hsinyuwang/t113/tina-d1-h/out/t113-nezha/staging_dir/target/usr/lib
- 修改 LIBS 添加需要链接的库文件
-lfreetype -lbz2
完整的 makefile
TARGET = gpsp CC = arm-openwrt-linux-gnueabi-gcc-6.4.1 VPATH = .. ../arm OBJS = main.o cpu.o memory.o video.o input.o sound.o cheats.o zip.o arm_stub.o warm.o cpu_threaded.o video_blend.o sha1.o imageio.o gui_xboy.o #gui.o CFLAGS = -DARM_ARCH -DPC_BUILD -march=armv7-a -mtune=cortex-a7 -mfloat-abi=hard -mfpu=neon -ffast-math -Ofast -I/home/hsinyuwang/t113/tina-d1-h/out/t113-nezha/staging_dir/target/usr/include/SDL -I/home/hsinyuwang/t113/tina-d1-h/out/t113-nezha/staging_dir/target/usr/include LDFLAGS = -L/home/hsinyuwang/t113/tina-d1-h/out/t113-nezha/staging_dir/target/usr/lib LIBS = -lSDL -lSDL_ttf -lz -lpng -lfreetype -lbz2 all: $(TARGET) $(TARGET): $(OBJS) $(CC) $(LDFLAGS) $(OBJS) $(LIBS) -o $(TARGET) %.o: %.S $(CC) $(CFLAGS) -c -o $@ $< clean: rm -f *.o $(TARGET)
导入环境变量后编译
export PATH=$PATH:/home/hsinyuwang/t113/tina-d1-h/out/t113-nezha/staging_dir/toolchain/bin/ export STAGING_DIR=/home/hsinyuwang/t113/tina-d1-h/out/t113-nezha/staging_dir/
OK了
因为 t113 的屏幕驱动没有调,所以还没办法验证
完整的 gpsp 代码 https://github.com/hsinyuwang/gpsp 切换到 t113 分支
过程遇到了很多问题,感谢司徒大佬指点! -
萌新基于全志V3s自制GBA游戏机
视频介绍 https://www.bilibili.com/video/BV1JP4y1X7Uz
开源地址https://github.com/hsinyuwang/X-Boy
非常感谢哇酷网和司徒大佬开源的资料!!!
图片展示
电路板