iMX6 SoloX kernel freeze issue with RMII

cancel
Showing results for 
Search instead for 
Did you mean: 

iMX6 SoloX kernel freeze issue with RMII

44 Views
texnikk
Contributor II

Hello,

 

We've been trying to connect FEC1 of iMX6SX with DP83640 in RMII mode.

We're using external 50MHz generator to supply both FEC and PHY with REF_CLK.

 

Following changes to clk-imx6sx.c:

 

+imx_clk_set_rate(clks[IMX6SX_CLK_ENET_REF], 50000000);

 

 

IOMUXC_GPR_GPR1 bits are:

ENET1_CLK_SEL = "1", 

ENET1_TX_CLK_DIR = "0"

 

SION bit is set:

 

 

#define MX6SX_PAD_ENET1_TX_CLK__ENET1_REF_CLK1 0x0090 0x03D8 0x0760 0x11 0x1

 

 

Device tree:

 

&fec1 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_enet1_rmii>;
	phy-supply = <&reg_enet_3v3>;
	phy-mode = "rmii";
	phy-handle = <&ethphy1>;
	phy-reset-gpios = <&gpio2 1 GPIO_ACTIVE_LOW>;
	status = "okay";

	mdio {
		#address-cells = <1>;
		#size-cells = <0>;

		ethphy1: ethernet-phy@1 {
			reg = <1>;
			max-speed = <100>;
			interrupt-parent = <&gpio2>;
			interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
		};
	};
};

&iomuxc {
	imx6sx {
		pinctrl_enet1_rmii: enet1rmiigrp {
			fsl,pins =
				<MX6SX_PAD_ENET1_CRS__GPIO2_IO_1	0xa0b1>, //RST
				<MX6SX_PAD_ENET1_MDC__ENET1_MDC		0xa088>,
				<MX6SX_PAD_ENET1_MDIO__ENET1_MDIO	0xa088>,
				<MX6SX_PAD_RGMII1_TD0__ENET1_TX_DATA_0	0xa088>,
				<MX6SX_PAD_RGMII1_TD1__ENET1_TX_DATA_1	0xa088>,
				<MX6SX_PAD_RGMII1_TX_CTL__ENET1_TX_EN	0xa088>,
				//<MX6SX_PAD_ENET1_TX_CLK__ENET1_REF_CLK1	0x10f9>,

				<MX6SX_PAD_ENET1_TX_CLK__ENET1_REF_CLK1 0x30C1>,
				<MX6SX_PAD_ENET1_COL__GPIO2_IO_0		0x3081>, // INT
				<MX6SX_PAD_RGMII1_RD0__ENET1_RX_DATA_0	0x3081>,
				<MX6SX_PAD_RGMII1_RD1__ENET1_RX_DATA_1	0x3081>,
				<MX6SX_PAD_RGMII1_RX_CTL__ENET1_RX_EN	0x3081>; // ->CRS/CRS_DV
		};
	};
};

 

 

The problem is that when kernel is starting, it hangs on following lines:

 

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.9.11-VenOS (root@f8558289a7eb) (gcc version 7.4.1 20181213 [linaro-7.4-2019.02 revision 56ec6f6b99cc167ff0c2f8e1a2eed33b1ed
c85d4] (Linaro GCC 7.4-2019.02) ) #1 SMP PREEMPT Fri Sep 10 09:19:07 UTC 2021
[    0.000000] CPU: ARMv7 Processor [412fc09a] revision 10 (ARMv7), cr=10c53c7d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] OF: fdt:Machine model: DC500
[    0.000000] Reserved memory: created CMA memory pool at 0x98000000, size 64 MiB
[    0.000000] OF: reserved mem: initialized node linux,cma, compatible id shared-dma-pool
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] percpu: Embedded 13 pages/cpu @9fbaf000 s21580 r8192 d23476 u53248
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 130048
[    0.000000] Kernel command line: mtdparts=gpmi-nand:2m(boot),1m(env),509m(data) video=fb_lcd panic=1 console=ttymxc0,115200 ubi.mtd=2 root=ubi0:boot1 r
o noatime rootfstype=ubifs init=/launcher
[    0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] Memory: 445104K/524288K available (5120K kernel code, 189K rwdata, 1624K rodata, 1024K init, 392K bss, 13648K reserved, 65536K 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 : 0xa0800000 - 0xff800000   (1520 MB)
[    0.000000]     lowmem  : 0x80000000 - 0xa0000000   ( 512 MB)
[    0.000000]     pkmap   : 0x7fe00000 - 0x80000000   (   2 MB)
[    0.000000]     modules : 0x7f000000 - 0x7fe00000   (  14 MB)
[    0.000000]       .text : 0x80008000 - 0x80600000   (6112 kB)
[    0.000000]       .init : 0x80800000 - 0x80900000   (1024 kB)
[    0.000000]       .data : 0x80900000 - 0x8092f6c0   ( 190 kB)
[    0.000000]        .bss : 0x80931000 - 0x809932b4   ( 393 kB)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000]  Build-time adjustment of leaf fanout to 32.
[    0.000000]  RCU restricting CPUs from NR_CPUS=4 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] L2C-310 erratum 769419 enabled
[    0.000000] L2C-310 enabling early BRESP for Cortex-A9
[    0.000000] L2C-310 full line of zeros enabled for Cortex-A9
[    0.000000] L2C-310 ID prefetch enabled, offset 16 lines
[    0.000000] L2C-310 dynamic clock gating enabled, standby mode enabled
[    0.000000] L2C-310 cache controller enabled, 16 ways, 256 kB
[    0.000000] L2C-310: CACHE_ID 0x410000c8, AUX_CTRL 0x76430001
[    0.000000] Switching to timer-based delay loop, resolution 333ns
[    0.000007] sched_clock: 32 bits at 3000kHz, resolution 333ns, wraps every 715827882841ns
[    0.000025] clocksource: mxc_timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 637086815595 ns
[    0.001670] Console: colour dummy device 80x30
[    0.001691] Calibrating delay loop (skipped), value calculated using timer frequency.. 6.00 BogoMIPS (lpj=30000)
[    0.001706] pid_max: default: 32768 minimum: 301
[    0.001803] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.001814] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.002444] CPU: Testing write buffer coherency: ok
[    0.002740] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.002784] Setting up static identity map for 0x80100000 - 0x80100058
[    0.100359] Brought up 1 CPUs
[    0.100376] SMP: Total of 1 processors activated (6.00 BogoMIPS).
[    0.100384] CPU: All CPU(s) started in SVC mode.
[    0.101177] devtmpfs: initialized
[    0.109899] VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
[    0.110243] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.113940] pinctrl core: initialized pinctrl subsystem
[    0.114946] NET: Registered protocol family 16
[    0.121762] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.150617] cpuidle: using governor menu
[    0.171441] setting gpr mode 1
[    0.171764] hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.
[    0.171776] hw-breakpoint: maximum watchpoint size is 4 bytes.
[    0.172367] imx6sx-pinctrl 20e0000.iomuxc: initialized IMX pinctrl driver
[    0.173493] imx-gpc 20dc000.gpc: Registered imx-gpc
[    0.174209] MU is ready for cross core communication!
[    0.254907] mxs-dma 1804000.dma-apbh: initialized
[    0.258177] i2c i2c-1: IMX I2C adapter registered
[    0.258200] i2c i2c-1: can't use DMA, using PIO instead.
[    0.258846] i2c i2c-2: IMX I2C adapter registered
[    0.258867] i2c i2c-2: can't use DMA, using PIO instead.
[    0.259059] pps_core: LinuxPPS API ver. 1 registered
[    0.259069] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.259094] PTP clock support registered
[    0.260302] imx rpmsg driver is registered.
[    0.271332] clocksource: Switched to clocksource mxc_timer1
[    0.281578] NET: Registered protocol family 2
[    0.282175] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
[    0.282226] TCP bind hash table entries: 4096 (order: 3, 32768 bytes)
[    0.282296] TCP: Hash tables configured (established 4096 bind 4096)
[    0.282364] UDP hash table entries: 256 (order: 1, 8192 bytes)
[    0.282393] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[    0.282567] NET: Registered protocol family 1
[    0.283178] hw perfevents: enabled with armv7_cortex_a9 PMU driver, 7 counters available
[    0.284796] Bus freq driver module loaded
[    0.285542] futex hash table entries: 256 (order: 2, 16384 bytes)
[    0.296458] workingset: timestamp_bits=30 max_order=17 bucket_order=0
[    0.302225] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.309516] io scheduler noop registered
[    0.309532] io scheduler deadline registered
[    0.309743] io scheduler cfq registered (default)
[    0.432877] mxsfb 2220000.lcdif: failed to find mxc display driver 
[    0.434932] mxsfb 2220000.lcdif: Unable to allocate overlay fb memory
[    0.434947] mxsfb 2220000.lcdif: failed to map video mem for overlay
[    0.435139] mxsfb 2220000.lcdif: initialized
[    0.436442] imx-sdma 20ec000.sdma: no iram assigned, using external mem
[    0.439460] imx-sdma 20ec000.sdma: loaded firmware 3.3
[    0.445638] 2020000.serial: ttymxc0 at MMIO 0x2020000 (irq = 23, base_baud = 5000000) is a IMX
[    1.052160] console [ttymxc0] enabled
[    1.056663] 21e8000.serial: ttymxc1 at MMIO 0x21e8000 (irq = 63, base_baud = 5000000) is a IMX
[    1.066038] 21ec000.serial: ttymxc2 at MMIO 0x21ec000 (irq = 64, base_baud = 5000000) is a IMX
[    1.075382] 21f0000.serial: ttymxc3 at MMIO 0x21f0000 (irq = 65, base_baud = 5000000) is a IMX
[    1.084751] 21f4000.serial: ttymxc4 at MMIO 0x21f4000 (irq = 66, base_baud = 5000000) is a IMX
[    1.094131] 22a0000.serial: ttymxc5 at MMIO 0x22a0000 (irq = 71, base_baud = 5000000) is a IMX
[    1.103772] imx sema4 driver is registered.
[    1.108021] [drm] Initialized
[    1.111565] [drm] Initialized vivante 1.0.0 20120216 on minor 0
[    1.128664] loop: module loaded
[    1.136940] random: fast init done
[    1.142607] nand: device found, Manufacturer ID: 0xc2, Chip ID: 0xdc
[    1.148968] nand: Macronix MX30LF4G28AC
[    1.152842] nand: 512 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 112
[    1.160851] gpmi-nand 1806000.gpmi-nand: mode:5 ,failed in set feature.
[    1.168424] Bad block table not found for chip 0
[    1.173915] Bad block table not found for chip 0
[    1.178538] Scanning device for bad blocks
[    1.472686] Bad eraseblock 2989 at 0x0000175a0000
[    1.556505] Bad eraseblock 3810 at 0x00001dc40000
[    1.590755] Bad block table written to 0x00001ffe0000, version 0x01
[    1.598516] Bad block table written to 0x00001ffc0000, version 0x01
[    1.604846] 3 cmdlinepart partitions found on MTD device gpmi-nand
[    1.611033] Creating 3 MTD partitions on "gpmi-nand":
[    1.616119] 0x000000000000-0x000000200000 : "boot"
[    1.632274] 0x000000200000-0x000000300000 : "env"
[    1.648275] 0x000000300000-0x000020000000 : "data"
[    1.670072] gpmi-nand 1806000.gpmi-nand: driver registered.
[    1.677618] libphy: Fixed MDIO Bus: probed
[    1.685330] pps pps0: new PPS source ptp0
[    1.694736] libphy: fec_enet_mii_bus: probed
[    1.710467] fec 2188000.ethernet eth0: registered PHC device 0
[    1.717585] input: 20cc000.snvs:snvs-powerkey as /devices/soc0/soc/2000000.aips-bus/20cc000.snvs/20cc000.snvs:snvs-powerkey/input/input0
[    1.730829] input: fts_ts as /devices/soc0/soc/2100000.aips-bus/21a4000.i2c/i2c-1/1-0038/input/input1
[    1.994095] rtc-pcf85063 2-0051: rtc core: registered rtc-pcf85063 as rtc0
[    2.001709] snvs_rtc 20cc000.snvs:snvs-rtc-lp: rtc core: registered 20cc000.snvs:snvs-r as rtc1
[    2.010570] i2c /dev entries driver
[    2.016033] imx2-wdt 20bc000.wdog: timeout 60 sec (nowayout=0)
[    2.022927] sdhci: Secure Digital Host Controller Interface driver
[    2.029118] sdhci: Copyright(c) Pierre Ossman
[    2.033537] sdhci-pltfm: SDHCI platform and OF driver helper
[    2.040259] sdhci-esdhc-imx 2198000.usdhc: allocated mmc-pwrseq
[    2.111397] mmc2: SDHCI controller on 2198000.usdhc [2198000.usdhc] using ADMA
[    2.142322] mmc2: queuing unknown CIS tuple 0x80 (2 bytes)
[    2.149538] mmc2: queuing unknown CIS tuple 0x80 (3 bytes)
[    2.156737] mmc2: queuing unknown CIS tuple 0x80 (3 bytes)
[    2.167375] mmc2: queuing unknown CIS tuple 0x80 (7 bytes)
[    2.174607] mmc2: queuing unknown CIS tuple 0x80 (3 bytes)
[    2.182808] mmc2: queuing unknown CIS tuple 0x80 (6 bytes)
[    2.191358] mmc3: SDHCI controller on 219c000.usdhc [219c000.usdhc] using ADMA
[    2.201297] NET: Registered protocol family 26
[    2.206035] NET: Registered protocol family 17
[    2.210560] 8021q: 802.1Q VLAN Support v1.8
[    2.225049] cpu cpu0: dev_pm_opp_get_opp_count: OPP table not found (-19)
[    2.234267] cpu cpu0: Registered imx6q-cpufreq
[    2.265262] imx_thermal 2000000.aips-bus:tempmon: Extended Commercial CPU temperature grade - max:105C critical:100C passive:95C
[    2.277486] ubi0: attaching mtd2
[    2.299954] random: crng init done
[    2.398177] mmc2: new high speed SDIO card at address 0001
[    4.338619] ubi0: scanning is finished
[    4.368853] ubi0: attached mtd2 (name "data", size 509 MiB)
[    4.374594] ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
[    4.381533] ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
[    4.388338] ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
[    4.395347] ubi0: good PEBs: 4066, bad PEBs: 6, corrupted PEBs: 0
[    4.401487] ubi0: user volume: 5, internal volumes: 1, max. volumes count: 128
[    4.408729] ubi0: max/mean erase counter: 1/0, WL threshold: 4096, image sequence number: 850540274
[    4.417918] ubi0: available PEBs: 171, total reserved PEBs: 3895, PEBs reserved for bad PEB handling: 74
[    4.427484] ubi0: background thread "ubi_bgt0d" started, PID 81
[    4.435298] input: gpio-inputs as /devices/soc0/gpio-inputs/input/input2
[    4.444157] rtc-pcf85063 2-0051: setting system clock to 2021-09-10 04:27:10 UTC (1631248030)

 

 

But if we disconnect 50MHz generator from MX6SX_PAD_ENET1_TX_CLK__ENET1_REF_CLK1 of iMX6, kernel continues to boot normally!

Could you please help solving this issue?

Thanks

Labels (1)
Tags (3)
0 Kudos
0 Replies