您尚未登录。

楼主 #1 2021-04-28 21:47:32

无痕
会员
注册时间: 2021-02-04
已发帖子: 28
积分: 10

linux5.2内核,配置SPI屏幕(ili9341)步骤

内核版本:linux5.2

参考文章:
      https://whycan.com/t_576.html#p1579
      https://blog.csdn.net/qulang000/article/details/114686525

我在配置此屏幕时遇到问题发的帖子
      https://whycan.com/t_6393.html

感谢大佬们的热心指导!

-----------------------------------------------------------------------------------------------------------------------------
1、配置内核驱动
Device Drivers  --->
    [ * ] Staging drivers  --->
        <*>   Support for small TFT LCD display modules  --->
                <*>   FB driver for the ILI9341 LCD Controller
                <*>   Generic FB driver for TFT LCD displays

2、在sun8i-v3s-licheepi-zero.dts添加设备树节点。注意,reset、dc引脚可以自由选择,只要不跟其它驱动冲突即可。

&i2c0 {
112     status = "disable";
113 
114     ns2009: ns2009@48 {
115         compatible = "nsiway,ns2009";
116         reg = <0x48>;
117     };
118 };


183 &spi0 {
184     status = "okay";
185     spi_lcd@0 {
186         #address-cells = <1>;
187         #size-cells = <1>;
188         rotate = <90>;
189         fps = <30>;
190         buswidth = <8>;
191         bgr;
192         dc-gpios = <&pio 1 5 GPIO_ACTIVE_HIGH>;
193         reset-gpios = <&pio 1 7 GPIO_ACTIVE_LOW>;
194         debug = <0x0>;
195         compatible = "ilitek,ili9341";
196         reg = <0>;
197         spi-max-frequency = <48000000>;
198     };
199 };

3、修改drivers/staging/fbtft/fbtft-core.c文件中的fbtft_request_one_gpio函数

注意需要在该文件上引入下面头文件,否则编译报错。
#include <linux/of_gpio.h>

      static int fbtft_request_one_gpio(struct fbtft_par *par,
  76                   const char *name, int index,
  77                   struct gpio_desc **gpiop)
  78 {
  79 /*
  80     struct device *dev = par->info->device;
  81     struct device_node *node = dev->of_node;
  82     int ret = 0;
  83 
  84     if (of_find_property(node, name, NULL)) {
  85         *gpiop = devm_gpiod_get_index(dev, dev->driver->name, index,
  86                           GPIOD_OUT_HIGH);
  87         if (IS_ERR(*gpiop)) {
  88             ret = PTR_ERR(*gpiop);
  89             dev_err(dev,
  90                 "Failed to request %s GPIO:%d\n", name, ret);
  91             return ret;
  92         }
  93         fbtft_par_dbg(DEBUG_REQUEST_GPIOS, par, "%s: '%s' GPIO\n",
  94                   __func__, name);
  95     }
  96 
  97     return ret;
  98 */
 100     struct device *dev = par->info->device;
 101     struct device_node *node = dev->of_node;
 102     int gpio, flags, ret = 0;
 103     enum of_gpio_flags of_flags;
 104     char gpio_names[32];
 105 
 106     //sprintf(gpio_names, "%s-gpios", name);
 107     sprintf(gpio_names, "%s", name);
 108     printk("@ gpio_names = %s\n", gpio_names);
 109     if (of_find_property(node, gpio_names, NULL)) {
 110         gpio = of_get_named_gpio_flags(node, gpio_names, index, &of_flags);
 111         printk ("@ gpio = %d | ENOENT = %d | EPROBE_DEFER = %d  \n", gpio, ENOENT, EPROBE_DEFER);
 112         if (gpio == -ENOENT)
 113             return 0;
 114         if (gpio == -EPROBE_DEFER)
 115             return gpio;
 116         if (gpio < 0) {
 117             dev_err(dev,
 118                 "failed to get '%s' from DT\n", gpio_names);
 119             return gpio;
 120         }
 121 
 122          //active low translates to initially low 
 123         flags = (of_flags & OF_GPIO_ACTIVE_LOW) ? GPIOF_OUT_INIT_LOW :
 124                             GPIOF_OUT_INIT_HIGH;
 125         ret = devm_gpio_request_one(dev, gpio, flags,
 126                         dev->driver->name);
 127         if (ret) {
 128             dev_err(dev,
 129                 "gpio_request_one('%s'=%d) failed with %d\n",
 130                 gpio_names, gpio, ret);
 131             return ret;
 132         }
 133 
 134         *gpiop = gpio_to_desc(gpio);
 135         fbtft_par_dbg(DEBUG_REQUEST_GPIOS, par, "%s: '%s' = GPIO%d\n",
 136                             __func__, gpio_names, gpio);
 137     }
 138     return ret;
 139 }

4、修改drivers/staging/fbtft/fbtft-core.c文件中的fbtft_reset函数

 278 static void fbtft_reset(struct fbtft_par *par)
 279 {
 280     /*
 281     if (!par->gpio.reset)
 282         return;
 283     fbtft_par_dbg(DEBUG_RESET, par, "%s()\n", __func__);
 284     gpiod_set_value_cansleep(par->gpio.reset, 0);
 285     usleep_range(20, 40);
 286     gpiod_set_value_cansleep(par->gpio.reset, 1);
 287     msleep(120);
 288     */
 289 
 290 
 291     if (!par->gpio.reset)
 292         return;
 293     fbtft_par_dbg(DEBUG_RESET, par, "%s()\n", __func__);
 294     gpiod_set_value_cansleep(par->gpio.reset, 1);
 295     usleep_range(20, 40);
 296     gpiod_set_value_cansleep(par->gpio.reset, 0);
 297     msleep(120);
 298     gpiod_set_value_cansleep(par->gpio.reset, 1);
 299     msleep(10);
 300 
 301 }

5、修改修改drivers/staging/fbtft/fbtft-core.c文件中的fbtft_request_gpios_dt函数里面,reset和dc引脚名称,从reset-gpios 和 dc-gpios 改为reset 和dc。

141 static int fbtft_request_gpios_dt(struct fbtft_par *par)
 142 {
 143     int i;
 144     int ret;
 145 
 146     if (!par->info->device->of_node)
 147         return -EINVAL;
 148 
 149 
 150     ret = fbtft_request_one_gpio(par, "reset", 0, &par->gpio.reset);
 151     if (ret)
 152         return ret;
 153 
 154     ret = fbtft_request_one_gpio(par, "dc", 0, &par->gpio.dc);
 155     if (ret)
 156         return ret;
 157 
 158     ret = fbtft_request_one_gpio(par, "rd-gpios", 0, &par->gpio.rd);
 159     if (ret)
 160         return ret;
 161     ret = fbtft_request_one_gpio(par, "wr-gpios", 0, &par->gpio.wr);
 162     if (ret)
 163         return ret;
 164     ret = fbtft_request_one_gpio(par, "cs-gpios", 0, &par->gpio.cs);
 165     if (ret)
 166         return ret;
 167     ret = fbtft_request_one_gpio(par, "latch-gpios", 0, &par->gpio.latch);
 168     if (ret)
 169         return ret;
 170     for (i = 0; i < 16; i++) {
 171         ret = fbtft_request_one_gpio(par, "db-gpios", i,
 172                          &par->gpio.db[i]);
 173         if (ret)
 174             return ret;
 175         ret = fbtft_request_one_gpio(par, "led-gpios", i,
 176                          &par->gpio.led[i]);
 177         if (ret)
 178             return ret;
 179         ret = fbtft_request_one_gpio(par, "aux-gpios", i,
 180                          &par->gpio.aux[i]);
 181         if (ret)
 182             return ret;
 183     }

6、修改drivers/staging/fbtft/fbtft-bus.c 中的fbtft_write_vmem16_bus8函数,直接替换

 
int fbtft_write_vmem16_bus8(struct fbtft_par *par, size_t offset, size_t len)
{
	u16 *vmem16;
	__be16 *txbuf16 = par->txbuf.buf;
	size_t remain;
	size_t to_copy;
	size_t tx_array_size;
	int i;
	int ret = 0;
	size_t startbyte_size = 0;
 
	fbtft_par_dbg(DEBUG_WRITE_VMEM, par, "%s(offset=%zu, len=%zu)\n",
		      __func__, offset, len);
 
	remain = len / 2;
	vmem16 = (u16 *)(par->info->screen_buffer + offset);
 
	if (par->gpio.dc)
	{
		//printk("dc拉高!\n");
		gpiod_set_value(par->gpio.dc, 1);
	}
	/* non buffered write */
	if (!par->txbuf.buf)
		return par->fbtftops.write(par, vmem16, len);
 
	/* buffered write */
	tx_array_size = par->txbuf.len / 2;
 
	if (par->startbyte) {
		txbuf16 = par->txbuf.buf + 1;
		tx_array_size -= 2;
		*(u8 *)(par->txbuf.buf) = par->startbyte | 0x2;
		startbyte_size = 1;
	}
 
	while (remain) {
		to_copy = min(tx_array_size, remain);
		dev_dbg(par->info->device, "to_copy=%zu, remain=%zu\n",
			to_copy, remain - to_copy);
 
		for (i = 0; i < to_copy; i++)
			txbuf16[i] = cpu_to_be16(vmem16[i]);
 
		vmem16 = vmem16 + to_copy;
		ret = par->fbtftops.write(par, par->txbuf.buf,
						startbyte_size + to_copy * 2);
		if (ret < 0)
			return ret;
		remain -= to_copy;
	}
 
	return ret;
}

最后编译运行即可,启动log中会出现下面提示

[    1.165809] fbtft_of_value: buswidth = 8
[    1.169779] fbtft_of_value: debug = 0
[    1.173438] fbtft_of_value: rotate = 90
[    1.177267] fbtft_of_value: fps = 30
[    1.215817] mmc0: host does not support reading read-only switch, assuming write-enable
[    1.225921] mmc0: new high speed SDHC card at address 1234
[    1.233279] mmcblk0: mmc0:1234 SA08G 7.21 GiB
[    1.239976]  mmcblk0: p1 p2
[    1.475892] random: fast init done
[    1.510864] Console: switching to colour frame buffer device 40x30
[    1.517762] graphics fb0: fb_ili9341 frame buffer, 320x240, 150 KiB video memory, 16 KiB buffer memory, fps=33, spi0.0 at 48 MHz

离线

楼主 #2 2021-04-28 21:49:14

无痕
会员
注册时间: 2021-02-04
已发帖子: 28
积分: 10

Re: linux5.2内核,配置SPI屏幕(ili9341)步骤

接线

SPI屏    zero
3v3    3v3
GND    GND
DC    PWM1
RST    3v3
CS    CS
CLK    CLK
MISO    MISO
MOSI    MOSI
LED   3.3V

离线

#3 2021-04-29 13:10:23

阿黄
会员
注册时间: 2018-10-03
已发帖子: 299
积分: 134

Re: linux5.2内核,配置SPI屏幕(ili9341)步骤

娃酷网就需要你这样的分享

离线

#4 2021-04-29 16:16:38

zzm24
会员
注册时间: 2018-05-07
已发帖子: 120
积分: 107

Re: linux5.2内核,配置SPI屏幕(ili9341)步骤

记得spi FIFO只有64字节,楼主可以在刷屏时cat /proc/interrupts看看spi的中断次数不?
看看刷屏中断会不会太频繁了

离线

楼主 #5 2021-04-29 17:21:44

无痕
会员
注册时间: 2021-02-04
已发帖子: 28
积分: 10

Re: linux5.2内核,配置SPI屏幕(ili9341)步骤

zzm24 说:

记得spi FIFO只有64字节,楼主可以在刷屏时cat /proc/interrupts看看spi的中断次数不?
看看刷屏中断会不会太频繁了

可以呀,但是我现在只是把屏幕配置好。我是打算把摄像头获取到的图像显示在屏幕上的,但是使用的时候遇到了问题。问题发在下面的帖子上。
https://whycan.com/t_3909.html

或者你告诉怎么刷屏

离线

楼主 #6 2021-04-30 07:29:36

无痕
会员
注册时间: 2021-02-04
已发帖子: 28
积分: 10

Re: linux5.2内核,配置SPI屏幕(ili9341)步骤

zzm24 说:

记得spi FIFO只有64字节,楼主可以在刷屏时cat /proc/interrupts看看spi的中断次数不?
看看刷屏中断会不会太频繁了

你看下

# cat /proc/interrupts
           CPU0
 19:       7542     GIC-0  27 Level     arch_timer
 21:          0     GIC-0  50 Level     timer@1c20c00
 22:          0     GIC-0  82 Level     1c02000.dma-controller
 23:      27439     GIC-0  92 Level     sunxi-mmc
 24:          0     GIC-0 103 Level     musb-hdrc.1.auto
 25:          0     GIC-0 104 Level     ehci_hcd:usb1
 26:          2     GIC-0 105 Level     ohci_hcd:usb2
 27:          0     GIC-0  72 Level     1c20400.rtc
 29:       1021     GIC-0 116 Level     sun6i-csi
 34:        392     GIC-0  32 Level     ttyS0
 35:       1724     GIC-0  39 Level     mv64xxx_i2c
 36:    4082175     GIC-0  97 Level     sun6i-spi
IPI0:          0  CPU wakeup interrupts
IPI1:          0  Timer broadcast interrupts
IPI2:          0  Rescheduling interrupts
IPI3:          0  Function call interrupts
IPI4:          0  CPU stop interrupts
IPI5:          0  IRQ work interrupts
IPI6:          0  completion interrupts
Err:          0

离线

#7 2021-04-30 10:04:54

zzm24
会员
注册时间: 2018-05-07
已发帖子: 120
积分: 107

Re: linux5.2内核,配置SPI屏幕(ili9341)步骤

FIFO 刷屏这个中断次数确实挺高的
36:    4082175     GIC-0  97 Level     sun6i-spi

一帧320*240*2=153600字节
刷一帧153600/64=2400次
因为我现在F1C100S上在用DMA刷SPI TFT,但是感觉跟其他通道DMA有干扰,想看看主线的FIFO刷的效率

离线

#8 2021-05-02 23:39:32

酷酷酷
会员
注册时间: 2021-04-13
已发帖子: 48
积分: 45

Re: linux5.2内核,配置SPI屏幕(ili9341)步骤

请问如果移植完是黑屏的怎么办 u-boot使用的默认的配置 没有lcd的

离线

楼主 #9 2021-05-03 09:39:26

无痕
会员
注册时间: 2021-02-04
已发帖子: 28
积分: 10

Re: linux5.2内核,配置SPI屏幕(ili9341)步骤

酷酷酷 说:

请问如果移植完是黑屏的怎么办 u-boot使用的默认的配置 没有lcd的

cat /dev/urandom > /dev/fb0
cat /dev/zero > /dev/fb0

使用第一条命令可以让屏幕出现雪花

使用第二条命令可以让屏幕变黑

说明屏幕移植成功

离线

#10 2021-05-03 21:33:24

酷酷酷
会员
注册时间: 2021-04-13
已发帖子: 48
积分: 45

Re: linux5.2内核,配置SPI屏幕(ili9341)步骤

无痕 说:
酷酷酷 说:

请问如果移植完是黑屏的怎么办 u-boot使用的默认的配置 没有lcd的

cat /dev/urandom > /dev/fb0
cat /dev/zero > /dev/fb0

使用第一条命令可以让屏幕出现雪花

使用第二条命令可以让屏幕变黑

说明屏幕移植成功

那有什么库可以显示图片的吗 还有就是控制台的输出是怎么输出在屏幕上的呀
fbv太难移植了 fbset好像又用不了

最近编辑记录 酷酷酷 (2021-05-03 21:34:41)

离线

#11 2021-09-06 18:33:23

liefyuan
会员
注册时间: 2021-05-30
已发帖子: 69
积分: 95

Re: linux5.2内核,配置SPI屏幕(ili9341)步骤

大佬,如果ili9341屏幕没有CS引脚该怎么办呢?

离线

#12 2022-04-10 14:43:20

stutian
会员
注册时间: 2022-03-30
已发帖子: 7
积分: 5

Re: linux5.2内核,配置SPI屏幕(ili9341)步骤

[    0.860671] fbtft_of_value: buswidth = 8
[    0.864653] fbtft_of_value: debug = 0
[    0.868325] fbtft_of_value: rotate = 270
[    0.872252] fbtft_of_value: fps = 10
[    1.244063] graphics fb0: fb_ili9341 frame buffer, 320x240, 150 KiB video memory, 16 KiB DMA buffer memory, fps=10, spi32766.0 at 15 MHz


make menuconfig同样配置为什么启动时没有显示如上log信息?
在这之前还需要在meun里配置什么吗?

离线

#13 2022-05-25 19:12:04

IF-YiFan
会员
注册时间: 2022-04-12
已发帖子: 1
积分: 1
个人网站

Re: linux5.2内核,配置SPI屏幕(ili9341)步骤

5、修改修改drivers/staging/fbtft/fbtft-core.c文件中的fbtft_request_gpios_dt函数里面,reset和dc引脚名称,从reset-gpios 和 dc-gpios 改为reset 和dc。
这一步为什么要改这个,改成reset后你设备树还是reset-gpios,怎么会注册成功?

离线

#14 2022-07-30 23:27:28

tevada2010
会员
注册时间: 2022-07-23
已发帖子: 54
积分: 69

Re: linux5.2内核,配置SPI屏幕(ili9341)步骤

我已经完成了每一步 为什么显示器不显示?

https://whycan.com/t_6413.html

294852832_573954257546892_1233592662052268409_n.jpg294726111_1099367357681843_8528158930884724977_n.jpg

U-Boot 2017.01-rc2-00073-gdd6e8740dc-dirty (Jul 31 2022 - 11:52:11 +0700) Allwinner Technology

CPU:   Allwinner V3s (SUN8I 1681)
Model: Lichee Pi Zero
DRAM:  64 MiB
MMC:   SUNXI SD/MMC: 0
SF: unrecognized JEDEC id bytes: 00, c2, 12
*** Warning - spi_flash_probe() failed, using default environment

In:    serial@01c28000
Out:   serial@01c28000
Err:   serial@01c28000
Net:   No ethernet found.
starting USB...
No controllers found
Hit any key to stop autoboot:  0 
reading zImage
4196800 bytes read in 232 ms (17.3 MiB/s)
reading sun8i-v3s-licheepi-zero-dock.dtb
12397 bytes read in 30 ms (403.3 KiB/s)
## Flattened Device Tree blob at 41800000
   Booting using the fdt blob at 0x41800000
   Loading Device Tree to 42df9000, end 42dff06c ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 5.2.0-licheepi-zero (tevada@T420s) (gcc version 6.3.1 20170404 (Linaro GCC 6.3-2017.05)) #6 SMP Sun Jul 31 21:06:16 +07 2022
[    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: Lichee Pi Zero with Dock
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] percpu: Embedded 16 pages/cpu s34508 r8192 d22836 u65536
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 16256
[    0.000000] Kernel command line: console=ttyS0,115200 panic=5 mtdparts=spi32766.0:1M(uboot),64k(dtb),4M(kernel),-(rootfs) rootwait root=/dev/mmcblk0p2 earlyprintk rw  vt.global_cursor_default=0
[    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes, linear)
[    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 55044K/65536K available (6144K kernel code, 301K rwdata, 1684K rodata, 1024K init, 254K bss, 10492K reserved, 0K cma-reserved, 0K highmem)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000] rcu: 	RCU event tracing is enabled.
[    0.000000] rcu: 	RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=1.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] random: get_random_bytes called from start_kernel+0x300/0x48c with crng_init=0
[    0.000000] arch_timer: cp15 timer(s) running at 24.00MHz (virt).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
[    0.000007] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[    0.000019] Switching to timer-based delay loop, resolution 41ns
[    0.000210] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.000451] Console: colour dummy device 80x30
[    0.000507] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000)
[    0.000523] pid_max: default: 32768 minimum: 301
[    0.000686] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.000703] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.001507] CPU: Testing write buffer coherency: ok
[    0.002022] /cpus/cpu@0 missing clock-frequency property
[    0.002048] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.002815] Setting up static identity map for 0x40100000 - 0x40100060
[    0.003022] rcu: Hierarchical SRCU implementation.
[    0.003567] smp: Bringing up secondary CPUs ...
[    0.003586] smp: Brought up 1 node, 1 CPU
[    0.003597] SMP: Total of 1 processors activated (48.00 BogoMIPS).
[    0.003604] CPU: All CPU(s) started in SVC mode.
[    0.004683] devtmpfs: initialized
[    0.008173] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[    0.008494] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.008526] futex hash table entries: 256 (order: 2, 16384 bytes, linear)
[    0.008770] pinctrl core: initialized pinctrl subsystem
[    0.009804] NET: Registered protocol family 16
[    0.010423] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.011687] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[    0.011706] hw-breakpoint: maximum watchpoint size is 8 bytes.
[    0.035081] SCSI subsystem initialized
[    0.035244] usbcore: registered new interface driver usbfs
[    0.035298] usbcore: registered new interface driver hub
[    0.035418] usbcore: registered new device driver usb
[    0.035651] mc: Linux media interface: v0.10
[    0.035692] videodev: Linux video capture interface: v2.00
[    0.035881] Advanced Linux Sound Architecture Driver Initialized.
[    0.037188] clocksource: Switched to clocksource arch_sys_counter
[    0.049291] NET: Registered protocol family 2
[    0.050120] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear)
[    0.050160] TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.050185] TCP bind hash table entries: 1024 (order: 1, 8192 bytes, linear)
[    0.050209] TCP: Hash tables configured (established 1024 bind 1024)
[    0.050354] UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.050406] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.050700] NET: Registered protocol family 1
[    0.052563] Initialise system trusted keyrings
[    0.052935] workingset: timestamp_bits=30 max_order=14 bucket_order=0
[    0.090419] Key type asymmetric registered
[    0.090441] Asymmetric key parser 'x509' registered
[    0.090541] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 250)
[    0.090553] io scheduler mq-deadline registered
[    0.090560] io scheduler kyber registered
[    0.091569] sun4i-usb-phy 1c19400.phy: Couldn't request ID GPIO
[    0.095297] sun8i-v3s-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[    0.164058] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[    0.166389] sun8i-v3s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pb not found, using dummy regulator
[    0.167563] printk: console [ttyS0] disabled
[    0.187847] 1c28000.serial: ttyS0 at MMIO 0x1c28000 (irq = 36, base_baud = 1500000) is a U6_16550A
[    0.702720] printk: console [ttyS0] enabled
[    0.731672] sun8i-v3s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pc not found, using dummy regulator
[    0.742960] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    0.749580] ehci-platform: EHCI generic platform driver
[    0.755100] ehci-platform 1c1a000.usb: EHCI Host Controller
[    0.760774] ehci-platform 1c1a000.usb: new USB bus registered, assigned bus number 1
[    0.768731] ehci-platform 1c1a000.usb: irq 26, io mem 0x01c1a000
[    0.797213] ehci-platform 1c1a000.usb: USB 2.0 started, EHCI 1.00
[    0.804423] hub 1-0:1.0: USB hub found
[    0.808377] hub 1-0:1.0: 1 port detected
[    0.812959] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    0.819279] ohci-platform: OHCI generic platform driver
[    0.824817] ohci-platform 1c1a400.usb: Generic Platform OHCI controller
[    0.831558] ohci-platform 1c1a400.usb: new USB bus registered, assigned bus number 2
[    0.839555] ohci-platform 1c1a400.usb: irq 27, io mem 0x01c1a400
[    0.912278] hub 2-0:1.0: USB hub found
[    0.916125] hub 2-0:1.0: 1 port detected
[    0.923471] usbcore: registered new interface driver usb-storage
[    0.930748] input: 1c22800.lradc as /devices/platform/soc/1c22800.lradc/input/input0
[    0.940032] sun6i-rtc 1c20400.rtc: registered as rtc0
[    0.945094] sun6i-rtc 1c20400.rtc: RTC enabled
[    0.949816] i2c /dev entries driver
[    0.954200] sunxi-wdt 1c20ca0.watchdog: Watchdog enabled (timeout=16 sec, nowayout=0)
[    0.962886] sun8i-v3s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pf not found, using dummy regulator
[    0.999313] sunxi-mmc 1c0f000.mmc: initialized, max. request size: 16384 KB
[    1.006575] sun8i-v3s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pg not found, using dummy regulator
[    1.041672] sunxi-mmc 1c10000.mmc: initialized, max. request size: 16384 KB
[    1.049759] usbcore: registered new interface driver usbhid
[    1.055335] usbhid: USB HID core driver
[    1.059383] fbtft_of_value: buswidth = 8
[    1.063311] fbtft_of_value: debug = 0
[    1.066969] fbtft_of_value: rotate = 90
[    1.070841] fbtft_of_value: fps = 30
[    1.084058] mmc0: host does not support reading read-only switch, assuming write-enable
[    1.095947] mmc0: new high speed SD card at address e624
[    1.103110] mmcblk0: mmc0:e624 SU02G 1.84 GiB 
[    1.108669] mmc1: queuing unknown CIS tuple 0x01 (3 bytes)
[    1.119178]  mmcblk0: p1 p2
[    1.125484] mmc1: queuing unknown CIS tuple 0x1a (5 bytes)
[    1.134200] mmc1: queuing unknown CIS tuple 0x1b (8 bytes)
[    1.141570] mmc1: queuing unknown CIS tuple 0x80 (1 bytes)
[    1.147100] mmc1: queuing unknown CIS tuple 0x81 (1 bytes)
[    1.152699] mmc1: queuing unknown CIS tuple 0x82 (1 bytes)
[    1.158256] mmc1: new high speed SDIO card at address 0001
[    1.364748] random: fast init done
[    1.400120] Console: switching to colour frame buffer device 40x30
[    1.407009] graphics fb0: fb_ili9341 frame buffer, 320x240, 150 KiB video memory, 16 KiB buffer memory, fps=33, spi0.0 at 48 MHz
[    1.420661] sun4i-codec 1c22c00.codec: ASoC: codec-analog@01c23000 not registered
[    1.428304] sun4i-codec 1c22c00.codec: Failed to register our card
[    1.435554] Initializing XFRM netlink socket
[    1.439995] NET: Registered protocol family 17
[    1.448384] Registering SWP/SWPB emulation handler
[    1.464852] Loading compiled-in X.509 certificates
[    1.480779] usb_phy_generic usb_phy_generic.0.auto: usb_phy_generic.0.auto supply vcc not found, using dummy regulator
[    1.492236] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
[    1.498078] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 3
[    1.512457] random: crng init done
[    1.519802] hub 3-0:1.0: USB hub found
[    1.524108] hub 3-0:1.0: 1 port detected
[    1.530974] debugfs: Directory '1c22c00.codec' with parent 'V3s Audio Codec' already present!
[    1.539665] sun4i-codec 1c22c00.codec: ASoC: Failed to create component debugfs directory: -17
[    1.549756] sun4i-codec 1c22c00.codec: Codec <-> 1c22c00.codec mapping ok
[    1.558304] sun6i-rtc 1c20400.rtc: setting system clock to 1970-01-01T00:05:48 UTC (348)
[    1.566671] vcc5v0: disabling
[    1.569728] ALSA device list:
[    1.572699]   #0: V3s Audio Codec
[    1.615172] EXT4-fs (mmcblk0p2): recovery complete
[    1.622057] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[    1.630315] VFS: Mounted root (ext4 filesystem) on device 179:2.
[    1.638526] devtmpfs: mounted
[    1.642696] Freeing unused kernel memory: 1024K
[    1.647461] Run /sbin/init as init process
[    1.745748] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
Starting syslogd: OK
Starting klogd: OK
Running sysctl: OK
Initializing random number generator: OK
Saving random seed: OK
Starting network: OK

Welcome to Buildroot for the LicheePi Zero
licheepi-zero login: 

最近编辑记录 tevada2010 (2022-07-31 22:23:24)

离线

#17 2022-09-16 10:55:39

liutian
会员
注册时间: 2022-09-15
已发帖子: 5
积分: 0

Re: linux5.2内核,配置SPI屏幕(ili9341)步骤

@酷酷酷

那有什么库可以显示图片的吗 还有就是控制台的输出是怎么输出在屏幕上的呀
fbv太难移植了 fbset好像又用不了


解决了吗?我也想问配置好驱动系统就能输出显示到屏上了吗?

离线

#18 2022-12-29 16:46:54

hj0787
会员
注册时间: 2022-12-11
已发帖子: 3
积分: 3

Re: linux5.2内核,配置SPI屏幕(ili9341)步骤

楼主有没有遇到过一会就死机了
[   76.400003] Unable to handle kernel paging request at virtual address c4000000
[   76.410644] pgd = b12b71ea
[   76.414521] [c4000000] *pgd=00000000
[   76.419283] Internal error: Oops: 5 [#1] ARM
[   76.425835] Modules linked in:
[   76.430065] CPU: 0 PID: 0 Comm: swapper Not tainted 5.7.1 #12
[   76.438074] Hardware name: Allwinner suniv Family
[   76.445061] PC is at sun6i_spi_handler+0x110/0x150
[   76.452141] LR is at 0xc4000001

离线

#19 2023-04-07 09:19:26

AB
会员
注册时间: 2023-04-07
已发帖子: 1
积分: 1

Re: linux5.2内核,配置SPI屏幕(ili9341)步骤

遇到驱动问题,真的很搞死人。。。。

离线

页脚

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

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