您尚未登录。

楼主 #1 2020-06-13 10:40:00

asdfwyg
会员
注册时间: 2020-04-10
已发帖子: 26
积分: 26

自己做了一块V3S的板子,系统启动MMC报错,大神给分析下

{178081BB-12EA-4538-8AB7-87D269AAF3E5}_20200613103244.jpg{98CC9B87-AB26-4A0F-80F1-E9448D3BA959}_20200613103213.jpg
系统可以启动起来,但是老是报错
sunxi-mmc 1c10000.mmc: fatal err update clk timeout

以下是全部日志

U-Boot SPL 2017.01-rc2-00055-gc41fbfe7b5 (Jan 20 2017 - 00:39:08)
DRAM: 64 MiB
Trying to boot from MMC1

U-Boot 2017.01-rc2-00055-gc41fbfe7b5 (Jan 20 2017 - 00:39:08 +0800) Allwinner Te                                                                                                             chnology

CPU:   Allwinner V3s (SUN8I 1681)
Model: Lichee Pi Zero
DRAM:  64 MiB
MMC:   SUNXI SD/MMC: 0
*** Warning - bad CRC, using default environment

Setting up a 800x480 lcd console (overscan 0x0)
dotclock: 33000kHz = 33000kHz: (1 * 3MHz * 66) / 6
In:    serial@01c28000
Out:   serial@01c28000
Err:   serial@01c28000


U-Boot 2017.01-rc2-00055-gc41fbfe7b5 (Jan 20 2017 - 00:39:08 +0800) Allwinner Te                                                                                                             chnology

CPU:   Allwinner V3s (SUN8I 1681)
Model: Lichee Pi Zero
DRAM:  64 MiB
MMC:   SUNXI SD/MMC: 0
*** Warning - bad CRC, using default environment

Setting up a 800x480 lcd console (overscan 0x0)
dotclock: 33000kHz = 33000kHz: (1 * 3MHz * 66) / 6
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
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
Found U-Boot script /boot.scr
reading /boot.scr
292 bytes read in 14 ms (19.5 KiB/s)
## Executing script at 41900000
reading zImage
3987024 bytes read in 654 ms (5.8 MiB/s)
reading sun8i-v3s-licheepi-zero-dock.dtb
9262 bytes read in 28 ms (322.3 KiB/s)
## Flattened Device Tree blob at 41800000
   Booting using the fdt blob at 0x41800000
   Loading Device Tree to 42dfa000, end 42dff42d ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.10.2-licheepi-zero+ (zp@ubuntu) (gcc version 6.3.1 20170109 (Linaro GCC 6.3-2017.02) ) #15 SMP Sat Apr 15 21:38:23 CST 2017
[    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 14 pages/cpu @c3dea000 s24652 r8192 d24500 u57344
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 15883
[    0.000000] Kernel command line: console=ttyS0,115200 panic=5 console=tty0 rootwait root=/dev/mmcblk0p2 earlyprintk rw
[    0.000000] PID hash table entries: 256 (order: -2, 1024 bytes)
[    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Memory: 53628K/64036K available (6144K kernel code, 213K rwdata, 1472K rodata, 1024K init, 260K bss, 10408K reserved, 0K cma-reserved, 0K highmem)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xc4000000 - 0xff800000   ( 952 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xc3e89000   (  62 MB)
[    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
[    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
[    0.000000]       .text : 0xc0008000 - 0xc0700000   (7136 kB)
[    0.000000]       .init : 0xc0900000 - 0xc0a00000   (1024 kB)
[    0.000000]       .data : 0xc0a00000 - 0xc0a35600   ( 214 kB)
[    0.000000]        .bss : 0xc0a37000 - 0xc0a781cc   ( 261 kB)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] Hierarchical RCU implementation.
[    0.000000]  Build-time adjustment of leaf fanout to 32.
[    0.000000]  RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=1.
[    0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=32, nr_cpu_ids=1
[    0.000000] NR_IRQS:16 nr_irqs:16 16
[    0.000000] arm_arch_timer: Architected 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.000006] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[    0.000019] Switching to timer-based delay loop, resolution 41ns
[    0.000147] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.000357] Console: colour dummy device 80x30
[    0.000788] console [tty0] enabled
[    0.000829] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000)
[    0.000868] pid_max: default: 32768 minimum: 301
[    0.001025] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.001054] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.001788] CPU: Testing write buffer coherency: ok
[    0.002231] /cpus/cpu@0 missing clock-frequency property
[    0.002282] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.002676] Setting up static identity map for 0x40100000 - 0x40100058
[    0.003468] smp: Bringing up secondary CPUs ...
[    0.003510] smp: Brought up 1 node, 1 CPU
[    0.003531] SMP: Total of 1 processors activated (48.00 BogoMIPS).
[    0.003550] CPU: All CPU(s) started in SVC mode.
[    0.004363] devtmpfs: initialized
[    0.007281] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[    0.007597] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.007652] futex hash table entries: 256 (order: 2, 16384 bytes)
[    0.007824] pinctrl core: initialized pinctrl subsystem
[    0.008867] NET: Registered protocol family 16
[    0.009365] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.010729] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[    0.010783] hw-breakpoint: maximum watchpoint size is 8 bytes.
[    0.022739] SCSI subsystem initialized
[    0.023076] usbcore: registered new interface driver usbfs
[    0.023162] usbcore: registered new interface driver hub
[    0.023287] usbcore: registered new device driver usb
[    0.023534] pps_core: LinuxPPS API ver. 1 registered
[    0.023560] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.023606] PTP clock support registered
[    0.023867] Advanced Linux Sound Architecture Driver Initialized.
[    0.025728] clocksource: Switched to clocksource arch_sys_counter
[    0.026595] simple-framebuffer 43e89000.framebuffer: framebuffer at 0x43e89000, 0x177000 bytes, mapped to 0xc4080000
[    0.026652] simple-framebuffer 43e89000.framebuffer: format=x8r8g8b8, mode=800x480x32, linelength=3200
[    0.033576] Console: switching to colour frame buffer device 100x30
[    0.043411] simple-framebuffer 43e89000.framebuffer: fb0: simplefb registered!
[    0.057359] NET: Registered protocol family 2
[    0.061765] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.065640] TCP bind hash table entries: 1024 (order: 1, 8192 bytes)
[    0.069539] TCP: Hash tables configured (established 1024 bind 1024)
[    0.073390] UDP hash table entries: 256 (order: 1, 8192 bytes)
[    0.077180] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[    0.081098] NET: Registered protocol family 1
[    0.085400] RPC: Registered named UNIX socket transport module.
[    0.089174] RPC: Registered udp transport module.
[    0.092757] RPC: Registered tcp transport module.
[    0.096247] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.102016] workingset: timestamp_bits=30 max_order=14 bucket_order=0
[    0.114650] NFS: Registering the id_resolver key type
[    0.118301] Key type id_resolver registered
[    0.121675] Key type id_legacy registered
[    0.125030] ntfs: driver 2.1.32 [Flags: R/W].
[    0.132962] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 249)
[    0.136713] io scheduler noop registered
[    0.140228] io scheduler deadline registered
[    0.143885] io scheduler cfq registered (default)
[    0.151506] sun8i-v3s-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[    0.224441] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[    0.231426] console [ttyS0] disabled
[    0.255202] 1c28000.serial: ttyS0 at MMIO 0x1c28000 (irq = 34, base_baud = 1500000) is a U6_16550A
[    0.856488] console [ttyS0] enabled
[    0.864098] [drm] Initialized
[    0.872432] libphy: Fixed MDIO Bus: probed
[    0.880310] usbcore: registered new interface driver r8152
[    0.889115] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    0.898888] ehci-platform: EHCI generic platform driver
[    0.907444] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    0.916881] ohci-platform: OHCI generic platform driver
[    0.925452] usbcore: registered new interface driver usb-storage
[    0.934741] usbcore: registered new interface driver ums-freecom
[    0.944337] udc-core: couldn't find an available UDC - added [g_cdc] to list of pending drivers
[    0.957111] input: 1c22800.lradc as /devices/platform/soc/1c22800.lradc/input/input0
[    0.969488] sun6i-rtc 1c20400.rtc: rtc core: registered rtc-sun6i as rtc0
[    0.979779] sun6i-rtc 1c20400.rtc: RTC enabled
[    0.987797] i2c /dev entries driver
[    0.996254] input: ns2009_ts as /devices/platform/soc/1c2ac00.i2c/i2c-0/0-0048/input/input1
[    1.009419] sunxi-wdt 1c20ca0.watchdog: Watchdog enabled (timeout=16 sec, nowayout=0)
[    1.075783] sunxi-mmc 1c0f000.mmc: base:0xc405f000 irq:23
[    1.134629] mmc0: host does not support reading read-only switch, assuming write-enable
[    1.146497] sunxi-mmc 1c10000.mmc: base:0xc4063000 irq:24
[    1.156630] usbcore: registered new interface driver usbhid
[    1.165976] usbhid: USB HID core driver
[    1.174159] mmc0: new high speed SDHC card at address aaaa
[    1.197192] sun4i-codec 1c22c00.codec: ASoC: /soc/codec-analog@01c23000 not registered
[    1.209102] sun4i-codec 1c22c00.codec: Failed to register our card
[    1.219536] mmcblk0: mmc0:aaaa SS08G 7.40 GiB
[    1.237903]  mmcblk0: p1 p2
[    1.257434] NET: Registered protocol family 17
[    1.265636] Key type dns_resolver registered
[    1.273625] Registering SWP/SWPB emulation handler
[    2.995720] sunxi-mmc 1c10000.mmc: fatal err update clk timeout
[    3.755702] sunxi-mmc 1c10000.mmc: fatal err update clk timeout
[    4.515698] sunxi-mmc 1c10000.mmc: fatal err update clk timeout
[    4.527297] usb_phy_generic.0.auto supply vcc not found, using dummy regulator
[    4.538748] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
[    4.548100] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 1
[    4.560681] hub 1-0:1.0: USB hub found
[    4.568160] hub 1-0:1.0: 1 port detected
[    4.576334] using random self ethernet address
[    4.584241] using random host ethernet address
[    4.593066] usb0: HOST MAC 0a:8e:1a:25:5a:45
[    4.600725] usb0: MAC a2:44:48:b2:84:f7
[    4.607737] g_cdc gadget: CDC Composite Gadget, version: King Kamehameha Day 2008
[    4.618461] g_cdc gadget: g_cdc ready
[    4.627940] sun4i-codec 1c22c00.codec: Codec <-> 1c22c00.codec mapping ok
[    4.640140] sun6i-rtc 1c20400.rtc: setting system clock to 1970-01-01 00:00:15 UTC (15)
[    4.651757] vcc5v0: disabling
[    4.657933] ALSA device list:
[    4.663889]   #0: V3s Audio Codec
[    4.682259] EXT4-fs (mmcblk0p2): couldn't mount as ext3 due to feature incompatibilities
[    4.694887] EXT4-fs (mmcblk0p2): couldn't mount as ext2 due to feature incompatibilities
[    4.759810] random: fast init done
[    4.853262] EXT4-fs (mmcblk0p2): recovery complete
[    4.862787] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[    4.874042] VFS: Mounted root (ext4 filesystem) on device 179:2.
[    4.887108] devtmpfs: mounted
[    4.894364] Freeing unused kernel memory: 1024K
[    5.080524] systemd[1]: systemd 215 running in system mode. (+PAM +AUDIT +SELINUX +IMA +SYSVINIT +LIBCRYPTSETUP +GCRYPT +ACL +XZ -SECCOMP -APPARMOR)
[    5.100998] systemd[1]: Detected architecture 'arm'.
[    5.138711] systemd[1]: Failed to insert module 'autofs4'
[    5.147935] systemd[1]: Failed to insert module 'ipv6'
[    5.158638] systemd[1]: Set hostname to <LicheePi>.
[    5.577995] systemd[1]: Cannot add dependency job for unit dbus.socket, ignoring: Unit dbus.socket failed to load: No such file or directory.
[    5.597929] systemd[1]: Cannot add dependency job for unit display-manager.service, ignoring: Unit display-manager.service failed to load: No such file or directory.
[    5.622866] systemd[1]: Expecting device dev-ttyS0.device...
[    5.637372] systemd[1]: Starting Forward Password Requests to Wall Directory Watch.
[    6.395713] sunxi-mmc 1c10000.mmc: fatal err update clk timeout
[    6.406187] systemd[1]: Started Forward Password Requests to Wall Directory Watch.
[    6.936239] systemd-udevd[84]: starting version 215
[    7.145632] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
[    8.023077] FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
[    8.416642] systemd-journald[78]: Received request to flush runtime journal from PID 1
[   13.275724] sunxi-mmc 1c10000.mmc: fatal err update clk timeout

[   14.025710] sunxi-mmc 1c10000.mmc: fatal err update clk timeout
Debian GNU/Linux 8 LicheePi ttyS0

[   14.775718] sunxi-mmc 1c10000.mmc: fatal err update clk timeout
LicheePi login: [   17.645719] sunxi-mmc 1c10000.mmc: fatal err update clk timeout
[   18.395703] sunxi-mmc 1c10000.mmc: fatal err update clk timeout
[   19.175718] sunxi-mmc 1c10000.mmc: fatal err update clk timeout

离线

楼主 #5 2020-06-14 22:11:48

asdfwyg
会员
注册时间: 2020-04-10
已发帖子: 26
积分: 26

Re: 自己做了一块V3S的板子,系统启动MMC报错,大神给分析下

问题明确了
0A8FDE2C-4832-437a-8540-02F6BB62F2DA.png
led灯占用和mmc1冲突了。

离线

楼主 #6 2020-06-14 23:22:26

asdfwyg
会员
注册时间: 2020-04-10
已发帖子: 26
积分: 26

Re: 自己做了一块V3S的板子,系统启动MMC报错,大神给分析下

去了pg还是不行,dts里并没有初始化mmc1,为啥一直报mmc1的错误呢。

离线

楼主 #8 2020-06-15 09:39:33

asdfwyg
会员
注册时间: 2020-04-10
已发帖子: 26
积分: 26

Re: 自己做了一块V3S的板子,系统启动MMC报错,大神给分析下

int sunxi_mmc_oclk_onoff(struct sunxi_mmc_host *host, u32 oclk_en)
{
	unsigned long expire = jiffies + msecs_to_jiffies(750);
	u32 rval;

	dev_dbg(mmc_dev(host->mmc), "%sabling the clock\n",
		oclk_en ? "en" : "dis");

	rval = mmc_readl(host, REG_CLKCR);
	rval &= ~(SDXC_CARD_CLOCK_ON | SDXC_LOW_POWER_ON | SDXC_MASK_DATA0);

	if (oclk_en)
		rval |= SDXC_CARD_CLOCK_ON;
	if (host->cfg->mask_data0)
		rval |= SDXC_MASK_DATA0;

	mmc_writel(host, REG_CLKCR, rval);

	rval = SDXC_START | SDXC_UPCLK_ONLY | SDXC_WAIT_PRE_OVER;
	mmc_writel(host, REG_CMDR, rval);

	do {
		rval = mmc_readl(host, REG_CMDR);
	} while (time_before(jiffies, expire) && (rval & SDXC_START));

	/* clear irq status bits set by the command */
	mmc_writel(host, REG_RINTR,
		   mmc_readl(host, REG_RINTR) & ~SDXC_SDIO_INTERRUPT);

	if (rval & SDXC_START) {
		dev_err(mmc_dev(host->mmc), "fatal err update clk timeout\n");
		return -EIO;
	}

	if (host->cfg->mask_data0) {
		rval = mmc_readl(host, REG_CLKCR);
		mmc_writel(host, REG_CLKCR, rval & ~SDXC_MASK_DATA0);
	}

	return 0;
}

int sunxi_mmc_clk_set_rate(struct sunxi_mmc_host *host,
				  struct mmc_ios *ios)
{
	struct mmc_host *mmc = host->mmc;
	long rate;
	u32 rval, clock = ios->clock, div = 1;
	int ret;

	ret = sunxi_mmc_oclk_onoff(host, 0);
	if (ret)
		return ret;

	/* Our clock is gated now */
	mmc->actual_clock = 0;

	if (!ios->clock)
		return 0;

	/*
	 * Under the old timing mode, 8 bit DDR requires the module
	 * clock to be double the card clock. Under the new timing
	 * mode, all DDR modes require a doubled module clock.
	 *
	 * We currently only support the standard MMC DDR52 mode.
	 * This block should be updated once support for other DDR
	 * modes is added.
	 */
	if (ios->timing == MMC_TIMING_MMC_DDR52 &&
	    (host->use_new_timings ||
	     ios->bus_width == MMC_BUS_WIDTH_8)) {
		div = 2;
		clock <<= 1;
	}

	if (host->use_new_timings && host->cfg->has_timings_switch) {
		ret = sunxi_ccu_set_mmc_timing_mode(host->clk_mmc, true);
		if (ret) {
			dev_err(mmc_dev(mmc),
				"error setting new timing


void sunxi_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
{
	struct sunxi_mmc_host *host = mmc_priv(mmc);
	u32 rval;

	/* Set the power state */
	switch (ios->power_mode) {
	case MMC_POWER_ON:
		break;

	case MMC_POWER_UP:
		if (!IS_ERR(mmc->supply.vmmc)) {
			host->ferror = mmc_regulator_set_ocr(mmc,
							     mmc->supply.vmmc,
							     ios->vdd);
			if (host->ferror)
				return;
		}

		if (!IS_ERR(mmc->supply.vqmmc)) {
			host->ferror = regulator_enable(mmc->supply.vqmmc);
			if (host->ferror) {
				dev_err(mmc_dev(mmc),
					"failed to enable vqmmc\n");
				return;
			}
			host->vqmmc_enabled = true;
		}

		host->ferror = sunxi_mmc_init_host(mmc);
		if (host->ferror)
			return;

		dev_dbg(mmc_dev(mmc), "power on!\n");
		break;

	case MMC_POWER_OFF:
		dev_dbg(mmc_dev(mmc), "power off!\n");
		sunxi_mmc_reset_host(host);
		if (!IS_ERR(mmc->supply.vmmc))
			mmc_regulator_set_ocr(mmc, mmc->supply.vmmc, 0);

		if (!IS_ERR(mmc->supply.vqmmc) && host->vqmmc_enabled)
			regulator_disable(mmc->supply.vqmmc);
		host->vqmmc_enabled = false;
		break;
	}

	/* set bus width */
	switch (ios->bus_width) {
	case MMC_BUS_WIDTH_1:
		mmc_writel(host, REG_WIDTH, SDXC_WIDTH1);
		break;
	case MMC_BUS_WIDTH_4:
		mmc_writel(host, REG_WIDTH, SDXC_WIDTH4);
		break;
	case MMC_BUS_WIDTH_8:
		mmc_writel(host, REG_WIDTH, SDXC_WIDTH8);
		break;
	}

	/* set ddr mode */
	rval = mmc_readl(host, REG_GCTRL);
	if (ios->timing == MMC_TIMING_UHS_DDR50 ||
	    ios->timing == MMC_TIMING_MMC_DDR52)
		rval |= SDXC_DDR_MODE;
	else
		rval &= ~SDXC_DDR_MODE;
	mmc_writel(host, REG_GCTRL, rval);

	/* set up clock */
	if (ios->power_mode) {
		host->ferror = sunxi_mmc_clk_set_rate(host, ios);
		/* Android code had a usleep_range(50000, 55000); here */
	}
}

检查了一下驱动代码,发现是在打开和关闭时钟的时候报的这个错误。最后指向sunxi_mmc_probe,可是我在dts中mmc1是dis状态,为什么会初始化mmc1呢。

离线

楼主 #10 2020-06-16 16:13:27

asdfwyg
会员
注册时间: 2020-04-10
已发帖子: 26
积分: 26

Re: 自己做了一块V3S的板子,系统启动MMC报错,大神给分析下

有梦的地方 说:

dts贴出来看看

用的licheepizero的dts,没有初始化mmc1.mmc1在sun8i-v3s.dtsi中配置的是disable

{5EDF7468-7CD1-42F7-9FD4-8FCB49F2CEDA}_20200616161259.jpg

最近编辑记录 asdfwyg (2020-06-16 16:13:50)

离线

楼主 #11 2020-06-16 16:25:54

asdfwyg
会员
注册时间: 2020-04-10
已发帖子: 26
积分: 26

Re: 自己做了一块V3S的板子,系统启动MMC报错,大神给分析下

static bool __of_device_is_available(const struct device_node *device)
{
	const char *status;
	int statlen;

	if (!device)
		return false;

	status = __of_get_property(device, "status", &statlen);
	if (status == NULL)
		return true;

	if (statlen > 0) {
		if (!strcmp(status, "okay") || !strcmp(status, "ok"))
			return true;
	}

	return false;
}

按理说如果是disabled是不会初始化mmc1的,奇怪了。

离线

楼主 #12 2020-06-16 17:02:40

asdfwyg
会员
注册时间: 2020-04-10
已发帖子: 26
积分: 26

Re: 自己做了一块V3S的板子,系统启动MMC报错,大神给分析下

哇酷小二 说:

检查在应用层有没有 export gpio 口,

然后对照一下荔枝派原理图, 是否需要电阻上拉。

还没到应用层,2.995720] sunxi-mmc 1c10000.mmc: fatal err update clk timeout,在内核加载3秒的时候就开始报错,关键dts的mmc1是disabled。

离线

楼主 #14 2020-06-16 17:18:36

asdfwyg
会员
注册时间: 2020-04-10
已发帖子: 26
积分: 26

Re: 自己做了一块V3S的板子,系统启动MMC报错,大神给分析下

哇酷小二 说:

你搞错dts文件了,不是 sun8i-v3s.dtsi

是这样的,我用的zero.dts,他包含sun8i-v3s.dtsi

离线

楼主 #16 2020-06-16 18:42:55

asdfwyg
会员
注册时间: 2020-04-10
已发帖子: 26
积分: 26

Re: 自己做了一块V3S的板子,系统启动MMC报错,大神给分析下

哇酷小二 说:

查一下你到底用了哪个dts文件,在这个文件里面disable mmc,一定会关掉的。

这是完整的dts,我觉得好奇怪。

/dts-v1/;
#include "sun8i-v3s.dtsi"
#include "sunxi-common-regulators.dtsi"

/ {
        model = "Lichee Pi Zero";
        compatible = "licheepi,licheepi-zero", "allwinner,sun8i-v3s";

        aliases {
                serial0 = &uart0;
        };

        chosen {
                stdout-path = "serial0:115200n8";
        };

        leds {
                status = "disbaled";
        };
};

&ehci0 {
        status = "okay";
};

&mmc0 {
        pinctrl-0 = <&mmc0_pins_a>;
        pinctrl-names = "default";
        broken-cd;
        bus-width = <4>;
        vmmc-supply = <&reg_vcc3v3>;
        status = "okay";
};

&ohci0 {
        status = "okay";
};

&uart0 {
        pinctrl-0 = <&uart0_pins_a>;
        pinctrl-names = "default";
        status = "okay";
};

&usb_otg {
        dr_mode = "otg";
        status = "okay";
};

&usbphy {
        usb0_id_det-gpio = <&pio 5 6 GPIO_ACTIVE_HIGH>;
        status = "okay";
};

离线

楼主 #18 2020-06-18 13:00:15

asdfwyg
会员
注册时间: 2020-04-10
已发帖子: 26
积分: 26

Re: 自己做了一块V3S的板子,系统启动MMC报错,大神给分析下

哦豁哦豁 说:

晕,正好又搜了咱哇酷网,

没想到这个错误居然还能把系统脱得死慢死慢的:



就清净了。

mmc1口上wifi模块焊接问题,补焊后好了不报错了。

sunxi-mmc 1c10000.mmc: base:0xc406b000 irq:24

离线

页脚

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

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