您尚未登录。

楼主 #1 2020-09-11 17:36:55

lovexulu
会员
注册时间: 2020-05-17
已发帖子: 53
积分: 304.5

F1C100s怎么才能驱动spi屏显示?主线Uboot与主线liunx什么区别?@晕哥!!

刚入坑微型计算机,入手了荔枝派nano,香橙派的H3,还有一个X3的卡片电脑,结果都是人家编译好的系统。liunx系统也不怎么会玩。请各位大佬指条路,该怎么学习呢,本打算从荔枝派开始,烧录镜像启动运行,串口通讯都可以,想着手头只有小屏(spi7789v) ,玩51,arduino,stm32用的,就想用一下,uboot查不到资料,主线liunx里倒是有驱动,可是编译都是错误。。。。。搞了2天也没成,求大佬出手教教我,@晕哥!!

离线

#2 2020-09-11 18:31:25

哇酷小二
wechat微信:whycan_cn
所在地: 你猜
注册时间: 2020-04-22
已发帖子: 3,378
积分: 1902
个人网站

Re: F1C100s怎么才能驱动spi屏显示?主线Uboot与主线liunx什么区别?@晕哥!!

具体出现什么错误呢?
linux驱动st7789本站有帖子,右上角搜一下





离线

楼主 #3 2020-09-11 19:17:00

lovexulu
会员
注册时间: 2020-05-17
已发帖子: 53
积分: 304.5

Re: F1C100s怎么才能驱动spi屏显示?主线Uboot与主线liunx什么区别?@晕哥!!

哇酷小二 说:

具体出现什么错误呢?
linux驱动st7789本站有帖子,右上角搜一下

嗯我下载了主线liunx进行编译,配置输出选择st7789v,但编译报错。

离线

#4 2020-09-12 14:54:20

vip888888
会员
注册时间: 2020-07-16
已发帖子: 141
积分: 138

Re: F1C100s怎么才能驱动spi屏显示?主线Uboot与主线liunx什么区别?@晕哥!!

lovexulu 说:
哇酷小二 说:

具体出现什么错误呢?
linux驱动st7789本站有帖子,右上角搜一下

嗯我下载了主线liunx进行编译,配置输出选择st7789v,但编译报错。

其实吧,我觉得吧,编译报错这个事还是得调才知道毕竟每个人的编译环境呀,工具呀什么的都有差异。而且你刚入门,可以先学习学习别人怎么玩的。
驱动SPI的显示屏的例子有很多。学习的话,刚好可以尝试自己写下驱动。

离线

楼主 #5 2020-09-12 15:26:36

lovexulu
会员
注册时间: 2020-05-17
已发帖子: 53
积分: 304.5

Re: F1C100s怎么才能驱动spi屏显示?主线Uboot与主线liunx什么区别?@晕哥!!

vip888888 说:
lovexulu 说:

嗯我下载了主线liunx进行编译,配置输出选择st7789v,但编译报错。

其实吧,我觉得吧,编译报错这个事还是得调才知道毕竟每个人的编译环境呀,工具呀什么的都有差异。而且你刚入门,可以先学习学习别人怎么玩的。
驱动SPI的显示屏的例子有很多。学习的话,刚好可以尝试自己写下驱动。

萌新啊,刚从单片机过来,对这块基本上啥都不懂,没有什么概念框架,别说写驱动了,系统构成,下载步骤,都还没搞清除。说不定有数据手册跑裸机还能当单片机用。。。。。应该还是对系统不了解,对linux系统不够了解,通过昨天一天突击,总算了解了一点点启动过程,理论上的启动过程,慢慢学习吧,编译错误先放一下。
今天尝试编译linux5.8,居然成了。。。。

离线

楼主 #6 2020-09-12 19:35:40

lovexulu
会员
注册时间: 2020-05-17
已发帖子: 53
积分: 304.5

Re: F1C100s怎么才能驱动spi屏显示?主线Uboot与主线liunx什么区别?@晕哥!!

make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- dtbs -j4
无法生成设备树dtb文件。但也没报错?!

执行如下:
root@xulu:/home/xulu/uliunx/linux# make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- dtbs -j4
  CHK     include/config/kernel.release
  CHK     include/generated/uapi/linux/version.h
  CHK     scripts/mod/devicetable-offsets.h
  CHK     include/generated/utsrelease.h
  CHK     include/generated/bounds.h
  CHK     include/generated/timeconst.h
  CHK     include/generated/asm-offsets.h
  CALL    scripts/checksyscalls.sh
root@xulu:/home/xulu/uliunx/linux#

离线

#7 2020-09-12 20:52:07

哇酷小二
wechat微信:whycan_cn
所在地: 你猜
注册时间: 2020-04-22
已发帖子: 3,378
积分: 1902
个人网站

Re: F1C100s怎么才能驱动spi屏显示?主线Uboot与主线liunx什么区别?@晕哥!!

@lovexulu 已经执行成功了, 这个指令是编译所有 dtb 文件.





离线

楼主 #8 2020-09-12 22:39:22

lovexulu
会员
注册时间: 2020-05-17
已发帖子: 53
积分: 304.5

Re: F1C100s怎么才能驱动spi屏显示?主线Uboot与主线liunx什么区别?@晕哥!!

哇酷小二 说:

@lovexulu 已经执行成功了, 这个指令是编译所有 dtb 文件.

看起来是成功了,可是在dts文件夹下并没有dtd文件生成。
重新下载了一个linux源码就可以了。也不知道什么原因,重新编译后已经可以正确引导启动,但st7789v仍然无法驱动,设备树以及代码部分已经参考 https://www.cnblogs.com/listenscience/p/13619930.html 这个修改过了,并正确编译镜像,在启动过程中没发现有st7789加载。。。

离线

楼主 #9 2020-09-12 22:45:51

lovexulu
会员
注册时间: 2020-05-17
已发帖子: 53
积分: 304.5

Re: F1C100s怎么才能驱动spi屏显示?主线Uboot与主线liunx什么区别?@晕哥!!

这是引导启动的打印

U-Boot SPL 2018.01-05676-g00188782ee (Aug 09 2018 - 18:49:43)
DRAM: 32 MiB
Trying to boot from MMC1


U-Boot 2018.01-05676-g00188782ee (Aug 09 2018 - 18:49:43 +0800) Allwinner Techno                                                                                                                     logy

CPU:   Allwinner F Series (SUNIV)
Model: Lichee Pi Nano
DRAM:  32 MiB
MMC:   SUNXI SD/MMC: 0
SF: unrecognized JEDEC id bytes: 0b, 40, 18
*** Warning - spi_flash_probe_bus_cs() failed, using default environment

Setting up a 800x600 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
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
Found U-Boot script /boot.scr
reading /boot.scr
280 bytes read in 15 ms (17.6 KiB/s)
## Executing script at 80c50000
reading suniv-f1c100s-licheepi-nano.dtb
7629 bytes read in 26 ms (286.1 KiB/s)
reading zImage
3893392 bytes read in 339 ms (11 MiB/s)
## Flattened Device Tree blob at 80c00000
   Booting using the fdt blob at 0x80c00000
   Loading Device Tree to 80e60000, end 80e64dcc ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 5.2.0-licheepi-nano+ (xulu@xulu) (gcc version 7.2.1                                                                                                                      20171011 (Linaro GCC 7.2-2017.11)) #35 Sat Sep 12 21:59:15 CST 2020
[    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] Built 1 zonelists, mobility grouping on.  Total pages: 8128
[    0.000000] Kernel command line: console=tty0 console=ttyS0,115200 panic=5 ro                                                                                                                     otwait root=/dev/mmcblk0p2 rw
[    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: 22704K/32768K available (6144K kernel code, 235K rwdata,                                                                                                                      1468K rodata, 1024K init, 227K bss, 10064K reserved, 0K cma-reserved, 0K highmem                                                                                                                     )
[    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.000000] random: get_random_bytes called from start_kernel+0x254/0x42c wit                                                                                                                     h crng_init=0
[    0.000047] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478                                                                                                                     484971ns
[    0.000115] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_                                                                                                                     idle_ns: 79635851949 ns
[    0.000682] Console: colour dummy device 80x30
[    0.001052] printk: console [tty0] enabled
[    0.001143] Calibrating delay loop... 358.80 BogoMIPS (lpj=1794048)
[    0.050264] pid_max: default: 32768 minimum: 301
[    0.050659] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.050720] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.052286] CPU: Testing write buffer coherency: ok
[    0.054542] Setting up static identity map for 0x80100000 - 0x80100058
[    0.056641] devtmpfs: initialized
[    0.061635] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, ma                                                                                                                     x_idle_ns: 19112604462750000 ns
[    0.061785] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.062131] pinctrl core: initialized pinctrl subsystem
[    0.064329] NET: Registered protocol family 16
[    0.066129] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.067960] cpuidle: using governor menu
[    0.116196] SCSI subsystem initialized
[    0.116626] usbcore: registered new interface driver usbfs
[    0.116822] usbcore: registered new interface driver hub
[    0.117114] usbcore: registered new device driver usb
[    0.117613] pps_core: LinuxPPS API ver. 1 registered
[    0.117683] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giome                                                                                                                     tti <giometti@linux.it>
[    0.118228] Advanced Linux Sound Architecture Driver Initialized.
[    0.119780] clocksource: Switched to clocksource timer
[    0.147870] NET: Registered protocol family 2
[    0.149379] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096                                                                                                                      bytes)
[    0.149565] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.149650] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.149719] TCP: Hash tables configured (established 1024 bind 1024)
[    0.150261] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.150394] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.150968] NET: Registered protocol family 1
[    0.153310] NetWinder Floating Point Emulator V0.97 (double precision)
[    0.155409] Initialise system trusted keyrings
[    0.156075] workingset: timestamp_bits=30 max_order=13 bucket_order=0
[    0.176686] Key type asymmetric registered
[    0.176785] Asymmetric key parser 'x509' registered
[    0.177002] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 2                                                                                                                     52)
[    0.177080] io scheduler mq-deadline registered
[    0.177117] io scheduler kyber registered
[    0.178967] sun4i-usb-phy 1c13400.phy: Couldn't request ID GPIO
[    0.187697] suniv-f1c100s-pinctrl 1c20800.pinctrl: initialized sunXi PIO driv                                                                                                                     er
[    0.361335] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[    0.366603] suniv-f1c100s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc                                                                                                                     -pe not found, using dummy regulator
[    0.368304] printk: console [ttyS0] disabled
[    0.388646] 1c25000.serial: ttyS0 at MMIO 0x1c25000 (irq = 22, base_baud = 62                                                                                                                     50000) is a 16550A
[    0.772373] printk: console [ttyS0] enabled
[    0.780014] suniv-f1c100s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc                                                                                                                     -pd not found, using dummy regulator
[    0.796461] SCSI Media Changer driver v0.25
[    0.802224] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    0.808824] ehci-platform: EHCI generic platform driver
[    0.814462] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    0.820843] ohci-platform: OHCI generic platform driver
[    0.826538] usbcore: registered new interface driver usb-storage
[    0.833675] udc-core: couldn't find an available UDC - added [g_cdc] to list                                                                                                                      of pending drivers
[    0.842852] i2c /dev entries driver
[    0.847962] suniv-f1c100s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc                                                                                                                     -pf not found, using dummy regulator
[    0.886100] sunxi-mmc 1c0f000.mmc: initialized, max. request size: 16384 KB
[    0.895287] usbcore: registered new interface driver usbhid
[    0.901068] usbhid: USB HID core driver
[    0.919168] NET: Registered protocol family 17
[    0.923978] Key type dns_resolver registered
[    0.930832] Loading compiled-in X.509 certificates
[    0.946578] suniv-f1c100s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc                                                                                                                     -pd not found, using dummy regulator
[    0.958077] sun4i-backend 1e60000.display-backend: Couldn't find matching fro                                                                                                                     ntend, frontend features disabled
[    0.968947] sun4i-drm display-engine: bound 1e60000.display-backend (ops 0xc0                                                                                                                     737d54)
[    0.977915] sun4i-drm display-engine: bound 1c0c000.lcd-controller (ops 0xc07                                                                                                                     369ac)
[    0.985764] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[    0.992460] [drm] No driver support for vblank timestamp query.
[    1.000048] [drm] Initialized sun4i-drm 1.0.0 20150629 for display-engine on                                                                                                                      minor 0
[    1.033529] mmc0: host does not support reading read-only switch, assuming wr                                                                                                                     ite-enable
[    1.038115] mmc0: new high speed SDHC card at address 0215
[    1.041519] mmcblk0: mmc0:0215 APPSD 7.66 GiB
[    1.044127]  mmcblk0: p1 p2
[    1.052718] Console: switching to colour frame buffer device 60x34
[    1.111751] sun4i-drm display-engine: fb0: sun4i-drmdrmfb frame buffer device
[    1.127776] usb_phy_generic usb_phy_generic.0.auto: usb_phy_generic.0.auto su                                                                                                                     pply vcc not found, using dummy regulator
[    1.150973] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
[    1.164543] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus                                                                                                                      number 1
[    1.182144] hub 1-0:1.0: USB hub found
[    1.190157] hub 1-0:1.0: 1 port detected
[    1.199400] using random self ethernet address
[    1.207941] using random host ethernet address
[    1.217884] usb0: HOST MAC ee:41:df:22:12:d3
[    1.226312] usb0: MAC da:b5:dd:01:37:54
[    1.234061] g_cdc gadget: CDC Composite Gadget, version: King Kamehameha Day                                                                                                                      2008
[    1.248894] g_cdc gadget: g_cdc ready
[    1.257207] cfg80211: Loading compiled-in X.509 certificates for regulatory d                                                                                                                     atabase
[    1.279347] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[    1.293454] ALSA device list:
[    1.300137]   #0: Loopback 1
[    1.307422] platform regulatory.0: Direct firmware load for regulatory.db fai                                                                                                                     led with error -2
[    1.323223] cfg80211: failed to load regulatory.db
[    1.643964] random: fast init done
[    2.265942] EXT4-fs (mmcblk0p2): recovery complete
[    2.568393] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. O                                                                                                                     pts: (null)
[    2.583707] VFS: Mounted root (ext4 filesystem) on device 179:2.
[    2.597935] devtmpfs: mounted
[    2.609009] Freeing unused kernel memory: 1024K
[    2.617236] Run /sbin/init as init process
[    2.806112] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
Starting logging: OK
Initializing random number generator... [    3.086239] random: dd: uninitialized                                                                                                                      urandom read (512 bytes read)
done.

Welcome to Lichee Pi
Lichee login: root
Password:

离线

#10 2020-09-12 22:47:59

哇酷小二
wechat微信:whycan_cn
所在地: 你猜
注册时间: 2020-04-22
已发帖子: 3,378
积分: 1902
个人网站

Re: F1C100s怎么才能驱动spi屏显示?主线Uboot与主线liunx什么区别?@晕哥!!

你的 spi 都没有驱动.





离线

楼主 #11 2020-09-12 23:00:49

lovexulu
会员
注册时间: 2020-05-17
已发帖子: 53
积分: 304.5

Re: F1C100s怎么才能驱动spi屏显示?主线Uboot与主线liunx什么区别?@晕哥!!

哇酷小二 说:

你的 spi 都没有驱动.

大牛解说下这是什么原因,需要怎么操作,是不是在配置里修改,或者设备树添加节点?我已经在设备树中添加了SPI节点。。。

离线

#12 2020-09-12 23:12:33

哇酷小二
wechat微信:whycan_cn
所在地: 你猜
注册时间: 2020-04-22
已发帖子: 3,378
积分: 1902
个人网站

Re: F1C100s怎么才能驱动spi屏显示?主线Uboot与主线liunx什么区别?@晕哥!!

lovexulu 说:
哇酷小二 说:

你的 spi 都没有驱动.

大牛解说下这是什么原因,需要怎么操作,是不是在配置里修改,或者设备树添加节点?我已经在设备树中添加了SPI节点。。。

dts 配置 io 和 spi 节点,

make menuconfig 添加 sunxi spi 驱动.

右上角搜索一下.





离线

楼主 #13 2020-09-12 23:49:19

lovexulu
会员
注册时间: 2020-05-17
已发帖子: 53
积分: 304.5

Re: F1C100s怎么才能驱动spi屏显示?主线Uboot与主线liunx什么区别?@晕哥!!

[    1.547683] graphics fb0: fb_st7789v frame buffer, 240x135, 63 KiB video memory, 4 KiB buffer memory, fps=33, spi0.0 at 32 MHz
[    1.576839] NET: Registered protocol family 17
[    1.583143] Key type dns_resolver registered
[    1.595225] Loading compiled-in X.509 certificates
[    1.613810] suniv-f1c100s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pd not found, using dummy regulator
[    1.628404] sun4i-backend 1e60000.display-backend: Couldn't find matching frontend, frontend features disabled
[    1.642288] sun4i-drm display-engine: bound 1e60000.display-backend (ops 0xc0737d54)
[    1.653617] sun4i-drm display-engine: bound 1c0c000.lcd-controller (ops 0xc07369ac)
[    1.662968] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[    1.671143] [drm] No driver support for vblank timestamp query.
[    1.681118] [drm] Initialized sun4i-drm 1.0.0 20150629 for display-engine on minor 0
重新修改设备树配置检查spi都打开了。多了这些启动信息。

离线

#14 2020-09-13 00:00:08

我思故我在
会员
注册时间: 2019-09-03
已发帖子: 244
积分: 243.5

Re: F1C100s怎么才能驱动spi屏显示?主线Uboot与主线liunx什么区别?@晕哥!!

设备fb0生成了,试一试

cat /dev/urandom > /dev/fb0

最近编辑记录 我思故我在 (2020-09-13 00:00:40)

离线

楼主 #15 2020-09-13 00:17:51

lovexulu
会员
注册时间: 2020-05-17
已发帖子: 53
积分: 304.5

Re: F1C100s怎么才能驱动spi屏显示?主线Uboot与主线liunx什么区别?@晕哥!!

我思故我在 说:

设备fb0生成了,试一试

cat /dev/urandom > /dev/fb0

# cat /dev/urandom > /dev/fb0
cat: write error: No space left on device
#
没有剩余空间?!

离线

#16 2020-09-13 00:18:44

哇酷小二
wechat微信:whycan_cn
所在地: 你猜
注册时间: 2020-04-22
已发帖子: 3,378
积分: 1902
个人网站

Re: F1C100s怎么才能驱动spi屏显示?主线Uboot与主线liunx什么区别?@晕哥!!

lovexulu 说:
我思故我在 说:

设备fb0生成了,试一试

cat /dev/urandom > /dev/fb0

# cat /dev/urandom > /dev/fb0
cat: write error: No space left on device
#
没有剩余空间?!

看下屏幕有没有变化?





离线

楼主 #17 2020-09-13 00:34:55

lovexulu
会员
注册时间: 2020-05-17
已发帖子: 53
积分: 304.5

Re: F1C100s怎么才能驱动spi屏显示?主线Uboot与主线liunx什么区别?@晕哥!!

哇酷小二 说:
lovexulu 说:

# cat /dev/urandom > /dev/fb0
cat: write error: No space left on device
#
没有剩余空间?!

看下屏幕有没有变化?

没有变化,我觉得还是我的设备树有问题

离线

楼主 #18 2020-09-13 00:42:17

lovexulu
会员
注册时间: 2020-05-17
已发帖子: 53
积分: 304.5

Re: F1C100s怎么才能驱动spi屏显示?主线Uboot与主线liunx什么区别?@晕哥!!

我想我可能走了弯路,一上来就按照网上的文章修改了树,节点,还有驱动程序代码。明天再来一次。按照标准设置走一遍。

离线

楼主 #19 2020-09-13 19:28:37

lovexulu
会员
注册时间: 2020-05-17
已发帖子: 53
积分: 304.5

Re: F1C100s怎么才能驱动spi屏显示?主线Uboot与主线liunx什么区别?@晕哥!!

CPU:   Allwinner F Series (SUNIV)
Model: Lichee Pi Nano
DRAM:  32 MiB
MMC:   SUNXI SD/MMC: 0
SF: unrecognized JEDEC id bytes: 0b, 40, 18
*** Warning - spi_flash_probe_bus_cs() failed, using default environment

Setting up a 800x600 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 
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
Found U-Boot script /boot.scr
reading /boot.scr
280 bytes read in 15 ms (17.6 KiB/s)
## Executing script at 80c50000
reading suniv-f1c100s-licheepi-nano.dtb
7642 bytes read in 26 ms (286.1 KiB/s)
reading zImage
3890544 bytes read in 324 ms (11.5 MiB/s)
## Flattened Device Tree blob at 80c00000
   Booting using the fdt blob at 0x80c00000
   Loading Device Tree to 80e60000, end 80e64dd9 ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 5.2.0lovexulu+ (xulu@xulu) (gcc version 7.2.1 20171011 (Linaro GCC 7.2-2017.11)) #36 Sun Sep 13 15:38:27 CST 2020
[    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] Built 1 zonelists, mobility grouping on.  Total pages: 8128
[    0.000000] Kernel command line: console=tty0 console=ttyS0,115200 panic=5 rootwait root=/dev/mmcblk0p2 rw
[    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: 22704K/32768K available (6144K kernel code, 235K rwdata, 1468K rodata, 1024K init, 227K bss, 10064K reserved, 0K cma-reserved, 0K highmem)
[    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.000000] random: get_random_bytes called from start_kernel+0x254/0x42c with crng_init=0
[    0.000047] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
[    0.000116] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.000652] Console: colour dummy device 80x30
[    0.001022] printk: console [tty0] enabled
[    0.001114] Calibrating delay loop... 358.80 BogoMIPS (lpj=1794048)
[    0.050272] pid_max: default: 32768 minimum: 301
[    0.050648] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.050712] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.052275] CPU: Testing write buffer coherency: ok
[    0.054479] Setting up static identity map for 0x80100000 - 0x80100058
[    0.056587] devtmpfs: initialized
[    0.061699] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.061854] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.062203] pinctrl core: initialized pinctrl subsystem
[    0.064370] NET: Registered protocol family 16
[    0.066172] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.068036] cpuidle: using governor menu
[    0.116178] SCSI subsystem initialized
[    0.116653] usbcore: registered new interface driver usbfs
[    0.116873] usbcore: registered new interface driver hub
[    0.117116] usbcore: registered new device driver usb
[    0.117624] pps_core: LinuxPPS API ver. 1 registered
[    0.117703] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.118316] Advanced Linux Sound Architecture Driver Initialized.
[    0.119872] clocksource: Switched to clocksource timer
[    0.148068] NET: Registered protocol family 2
[    0.149587] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes)
[    0.149777] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.150012] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.150106] TCP: Hash tables configured (established 1024 bind 1024)
[    0.150504] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.150617] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.151188] NET: Registered protocol family 1
[    0.153503] NetWinder Floating Point Emulator V0.97 (double precision)
[    0.155596] Initialise system trusted keyrings
[    0.156278] workingset: timestamp_bits=30 max_order=13 bucket_order=0
[    0.176860] Key type asymmetric registered
[    0.176971] Asymmetric key parser 'x509' registered
[    0.177196] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
[    0.177271] io scheduler mq-deadline registered
[    0.177303] io scheduler kyber registered
[    0.179187] sun4i-usb-phy 1c13400.phy: Couldn't request ID GPIO
[    0.188151] suniv-f1c100s-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[    0.362437] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[    0.367751] suniv-f1c100s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pe not found, using dummy regulator
[    0.369458] printk: console [ttyS0] disabled
[    0.389798] 1c25000.serial: ttyS0 at MMIO 0x1c25000 (irq = 23, base_baud = 6250000) is a 16550A
[    0.773212] printk: console [ttyS0] enabled
[    0.780829] suniv-f1c100s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pd not found, using dummy regulator
[    0.797530] SCSI Media Changer driver v0.25 
[    0.803239] suniv-f1c100s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pa not found, using dummy regulator
[    0.816111] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    0.822865] ehci-platform: EHCI generic platform driver
[    0.828420] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    0.834809] ohci-platform: OHCI generic platform driver
[    0.840574] usbcore: registered new interface driver usb-storage
[    0.847576] udc-core: couldn't find an available UDC - added [g_cdc] to list of pending drivers
[    0.856802] i2c /dev entries driver
[    0.862001] suniv-f1c100s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pf not found, using dummy regulator
[    0.900111] sunxi-mmc 1c0f000.mmc: initialized, max. request size: 16384 KB
[    0.909242] usbcore: registered new interface driver usbhid
[    0.915035] usbhid: USB HID core driver
[    0.919136] fbtft_of_value: buswidth = 8
[    0.923227] fbtft_of_value: debug = 0
[    0.926928] fbtft_of_value: rotate = 0
[    0.930765] fbtft_of_value: fps = 30
[    0.964446] mmc0: host does not support reading read-only switch, assuming write-enable
[    0.977216] mmc0: new high speed SDHC card at address 0215
[    0.987284] mmcblk0: mmc0:0215 APPSD 7.66 GiB 
[    0.994926]  mmcblk0: p1 p2
[    1.513392] random: fast init done
[    1.538761] Console: switching to colour frame buffer device 30x16
[    1.547601] graphics fb0: fb_st7789v frame buffer, 240x135, 63 KiB video memory, 4 KiB buffer memory, fps=33, spi1.0 at 32 MHz
[    1.576700] NET: Registered protocol family 17
[    1.583043] Key type dns_resolver registered
[    1.595093] Loading compiled-in X.509 certificates
[    1.613793] suniv-f1c100s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pd not found, using dummy regulator
[    1.628405] sun4i-backend 1e60000.display-backend: Couldn't find matching frontend, frontend features disabled
[    1.642265] sun4i-drm display-engine: bound 1e60000.display-backend (ops 0xc0737d54)
[    1.653259] sun4i-drm display-engine: bound 1c0c000.lcd-controller (ops 0xc07369ac)
[    1.662601] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[    1.670770] [drm] No driver support for vblank timestamp query.
[    1.680782] [drm] Initialized sun4i-drm 1.0.0 20150629 for display-engine on minor 0
[    1.693769] sun4i-drm display-engine: fb1: sun4i-drmdrmfb frame buffer device
[    1.703805] usb_phy_generic usb_phy_generic.0.auto: usb_phy_generic.0.auto supply vcc not found, using dummy regulator
[    1.718147] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
[    1.725621] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 1
[    1.741756] hub 1-0:1.0: USB hub found
[    1.747590] hub 1-0:1.0: 1 port detected
[    1.755985] using random self ethernet address
[    1.761681] using random host ethernet address
[    1.770154] usb0: HOST MAC d6:57:09:94:ba:ed
[    1.775690] usb0: MAC da:67:1c:c9:fb:9a
[    1.780803] g_cdc gadget: CDC Composite Gadget, version: King Kamehameha Day 2008
[    1.789964] g_cdc gadget: g_cdc ready
[    1.796507] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[    1.820945] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[    1.829573] ALSA device list:
[    1.833723]   #0: Loopback 1
[    1.838422] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[    1.849184] cfg80211: failed to load regulatory.db
[    1.881413] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[    1.891821] VFS: Mounted root (ext4 filesystem) on device 179:2.
[    1.901297] devtmpfs: mounted
[    1.909298] Freeing unused kernel memory: 1024K
[    1.915263] Run /sbin/init as init process
[    2.112724] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
[    2.154298] random: crng init done
Starting logging: OK
Initializing random number generator... done.

Welcome to Lichee Pi
Lichee login: root
Password: 
# ls
littlevgl_demo
# cd /
# ls
bin      lib      media    proc     sbin     usr
dev      lib32    mnt      root     sys      var
etc      linuxrc  opt      run      tmp
# cd sys
# 
# ls
block     class     devices   fs        module
bus       dev       firmware  kernel    power
# cd class
# ls
backlight     graphics      mmc_host      scsi_changer  thermal
bdi           i2c-adapter   mtd           scsi_device   tty
block         i2c-dev       net           scsi_disk     udc
bsg           ieee80211     phy           scsi_generic  vc
dma           input         power_supply  scsi_host     vtconsole
drm           leds          pps           sound
extcon        mem           pwm           spi_master
gpio          misc          regulator     spidev
# cd spidev
# ls
# cd ..
# cd spi_master
# ls
spi1

SPI1应该是加载了,可为什么没有显示呢??

离线

楼主 #20 2020-09-13 19:54:37

lovexulu
会员
注册时间: 2020-05-17
已发帖子: 53
积分: 304.5

Re: F1C100s怎么才能驱动spi屏显示?主线Uboot与主线liunx什么区别?@晕哥!!

进程中有SPI1在运行,头疼。。。。没头绪了

离线

楼主 #21 2020-09-14 23:17:17

lovexulu
会员
注册时间: 2020-05-17
已发帖子: 53
积分: 304.5

Re: F1C100s怎么才能驱动spi屏显示?主线Uboot与主线liunx什么区别?@晕哥!!

# cd /
# ls
bin         lib32       mnt         rootfs.tar  tmp
dev         linuxrc     opt         run         usr
etc         lost+found  proc        sbin        var
lib         media       root        sys
# cd sys/bus/spi
# ls
devices            drivers_autoprobe  uevent
drivers            drivers_probe
# cd drivers
# ls
fb_st7789v  spidev
# cd fb_st7789v
# ls
bind    uevent  unbind
#
到这里了,不知道为啥还是没显示输出呢?求教。。。。。

离线

#22 2020-09-14 23:21:11

pythinker
会员
注册时间: 2019-02-12
已发帖子: 215
积分: 215

Re: F1C100s怎么才能驱动spi屏显示?主线Uboot与主线liunx什么区别?@晕哥!!

st7789 驱动只有写, 没有读, 系统根本不知道有没有ss7789, 所以你用逻辑分析仪抓一下SPI总线, 看时序是否正确.

离线

楼主 #23 2020-09-14 23:41:12

lovexulu
会员
注册时间: 2020-05-17
已发帖子: 53
积分: 304.5

Re: F1C100s怎么才能驱动spi屏显示?主线Uboot与主线liunx什么区别?@晕哥!!

pythinker 说:

st7789 驱动只有写, 没有读, 系统根本不知道有没有ss7789, 所以你用逻辑分析仪抓一下SPI总线, 看时序是否正确.

流下了无奈的眼泪,我这里木有示波器,逻辑分析仪,只有一台万用表。。。

离线

楼主 #24 2020-09-16 21:55:58

lovexulu
会员
注册时间: 2020-05-17
已发帖子: 53
积分: 304.5

Re: F1C100s怎么才能驱动spi屏显示?主线Uboot与主线liunx什么区别?@晕哥!!

经过几天的突击学习。终于可以在这块1.14寸spi屏上看到启动log了。运行了几个dome。还行,最高刷新帧率能达到55+(白屏)。这几天也是汤坑无数,有硬件问题,更多的是软件问题,设备树,驱动程序,等等,现在还有些问题我还解决不了,再努力学习吧,这几天也让我从一个萌新蜕变成了一个小白。。特此记录一下。
主要问题如下:1、硬件连接RST->PE7,DC->PE10,CS->GND,其他按照spi标准接就行。
                    2、设备树添加节点,io口描述,节点中要有使能。
                    3、由于添加PE7,PE10需要额外申请gpio,申请gpio的程序代码目前版本中存在问题。
                    4、目前版本中st7789v的驱动伽马矫正存在问题,有色差。且针对1.14寸屏有显示坐标偏差,行偏52,列偏40。
参照这位大牛的博客。https://www.cnblogs.com/listenscience/p/13619930.html
我也是问了很多问题才解决的。
至于下一个目标。。另开一帖吧。。

最近编辑记录 lovexulu (2020-09-16 22:01:47)

离线

#25 2021-05-13 09:54:34

542396750@qq.com
会员
注册时间: 2021-03-26
已发帖子: 153
积分: 14.5

Re: F1C100s怎么才能驱动spi屏显示?主线Uboot与主线liunx什么区别?@晕哥!!

按照 https://www.cnblogs.com/listenscience/p/13619930.html 方法,出现了两个fb,分别是fb0和fb1,fb1才是st7789,文件树注释掉了panel那一段,重新烧录还是有fb0,不知道怎么删掉fb0,只留一个ST7789

离线

#26 2021-11-01 19:00:29

HongSang
会员
注册时间: 2021-08-12
已发帖子: 42
积分: 16.5

Re: F1C100s怎么才能驱动spi屏显示?主线Uboot与主线liunx什么区别?@晕哥!!

@lovexulu
能贴下设备树吗?
panel中有引用到st7789吗?

离线

#27 2022-09-28 14:05:15

coldj
会员
注册时间: 2022-09-22
已发帖子: 10
积分: 5

Re: F1C100s怎么才能驱动spi屏显示?主线Uboot与主线liunx什么区别?@晕哥!!

542396750@qq.com 说:

按照 https://www.cnblogs.com/listenscience/p/13619930.html 方法,出现了两个fb,分别是fb0和fb1,fb1才是st7789,文件树注释掉了panel那一段,重新烧录还是有fb0,不知道怎么删掉fb0,只留一个ST7789

能知道linux主线使用的是什么版本吗?5.2还是5.7.1

离线

#28 2023-05-09 10:21:42

hang
会员
注册时间: 2023-05-07
已发帖子: 7
积分: 2

Re: F1C100s怎么才能驱动spi屏显示?主线Uboot与主线liunx什么区别?@晕哥!!

可以试着删除系统再网上学习重新安装

离线

页脚

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

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