Ethernet PHY not coming up with the latest kernel 5.10.x

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Ethernet PHY not coming up with the latest kernel 5.10.x

1,333 次查看
vivsundar
Contributor III

Hi 

I am using imx.6 dual lite processor for my custom board.  I am trying to bring up the Ethernet interface.  The eth PHY is a SMSC8740.  I am using the kernel Version 5.10.72

The same PHY chip works well in U-Boot(i am able to do tftpboot).  But only when the kernel starts the bootup freezes. 

I have attached the dts entries and kernel messages during bootup.

Can any give me some direction where i am going wrong?

The DTS entries are as follows:

&fec {
    pinctrl-names = "default";
    pinctrl-0 = <&pinctrl_enet>;
    phy-mode = "rmii";
    phy-reset-gpios = <&gpio5 5 0>;
    phy-reset-duration = <1>;
    phy-reset-post-delay = <1>;
    phy-handle = <&phy>;
    fsl,magic-packet;
    status = "okay";

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

        phy: ethernet-phy@1 {
            compatible = "ethernet-phy-id0007.c110", "ethernet-phy-ieee802.3-c22";
            reg = <1>;

        };
    };
};

pinctrl_enet: enetgrp {
fsl,pins = <
    MX6QDL_PAD_ENET_MDIO__ENET_MDIO 0x1b0b0
    MX6QDL_PAD_ENET_MDC__ENET_MDC 0x1b0b0
    MX6QDL_PAD_GPIO_16__ENET_REF_CLK 0x4001b031
    MX6QDL_PAD_ENET_TXD1__ENET_TX_DATA1 0x1b0b0
    MX6QDL_PAD_ENET_TXD0__ENET_TX_DATA0 0x1b0b0
    MX6QDL_PAD_ENET_RX_ER__ENET_RX_ER 0x1b0b0
    MX6QDL_PAD_ENET_RXD0__ENET_RX_DATA0 0x1b0b0
    MX6QDL_PAD_ENET_RXD1__ENET_RX_DATA1 0x1b0b0
    MX6QDL_PAD_ENET_CRS_DV__ENET_RX_EN 0x1b0b0
    MX6QDL_PAD_ENET_TX_EN__ENET_TX_EN 0x1b0b0
    MX6QDL_PAD_GPIO_5__GPIO1_IO05 0x1b0b0
    MX6QDL_PAD_DISP0_DAT11__GPIO5_IO05 0x1b0b0
>;
};

The kernel bootup log is as follows:

Starting kernel ...

[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 5.10.72-lts-5.10.y+ga68e31b63f86 (oe-user@oe-host) (arm-poky-linux-gnueabi-gcc (GCC) 10.2.0, GNU ld (GNU Binutils) 2.36.1.20210209) #1 SMP PREEMPT Tue Nov 23 06:02:20 UTC 2021
[ 0.000000] CPU: ARMv7 Processor [412fc09a] revision 10 (ARMv7), cr=10c5387d
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[ 0.000000] OF: fdt: Machine model: Freescale i.MX6 DualLite SABRE Smart Device Board
[ 0.000000] printk: debug: ignoring loglevel setting.
[ 0.000000] Memory policy: Data cache writealloc
[ 0.000000] OF: reserved mem: failed to allocate memory for node 'linux,cma'
[ 0.000000] cma: Reserved 32 MiB at 0x1e000000
[ 0.000000] Zone ranges:
[ 0.000000] Normal [mem 0x0000000010000000-0x000000001fffffff]
[ 0.000000] HighMem empty
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000010000000-0x000000001fffffff]
[ 0.000000] Initmem setup node 0 [mem 0x0000000010000000-0x000000001fffffff]
[ 0.000000] On node 0 totalpages: 65536
[ 0.000000] Normal zone: 576 pages used for memmap
[ 0.000000] Normal zone: 0 pages reserved
[ 0.000000] Normal zone: 65536 pages, LIFO batch:15
[ 0.000000] percpu: Embedded 20 pages/cpu s49292 r8192 d24436 u81920
[ 0.000000] pcpu-alloc: s49292 r8192 d24436 u81920 alloc=20*4096
[ 0.000000] pcpu-alloc: [0] 0 [0] 1
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 64960
[ 0.000000] Kernel command line: console=ttymxc4,115200 root=/dev/nfs nfsroot=192.168.1.9:/nfs/ ignore_loglevel ip=192.168.1.15:192.168.1.9:192.168.1.1:255.255.255.0:wand:eth0:off V3
[ 0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes, linear)
[ 0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes, linear)
[ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[ 0.000000] Memory: 206684K/262144K available (12288K kernel code, 1866K rwdata, 2976K rodata, 1024K init, 458K bss, 22692K reserved, 32768K cma-reserved, 0K highmem)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[ 0.000000] rcu: Preemptible hierarchical RCU implementation.
[ 0.000000] rcu: RCU event tracing is enabled.
[ 0.000000] rcu: RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
[ 0.000000] Trampoline variant of Tasks RCU enabled.
[ 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=2
[ 0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[ 0.000000] L2C: DT/platform modifies aux control register: 0x32050000 -> 0x32450000
[ 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, 512 kB
[ 0.000000] L2C-310: CACHE_ID 0x410000c8, AUX_CTRL 0x76450001
[ 0.000000] random: get_random_bytes called from start_kernel+0x620/0x7f0 with crng_init=0
[ 0.000000] Switching to timer-based delay loop, resolution 333ns
[ 0.000008] sched_clock: 32 bits at 3000kHz, resolution 333ns, wraps every 715827882841ns
[ 0.000028] clocksource: mxc_timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 637086815595 ns
[ 0.001621] Console: colour dummy device 80x30
[ 0.001660] Calibrating delay loop (skipped), value calculated using timer frequency.. 6.00 BogoMIPS (lpj=30000)
[ 0.001680] pid_max: default: 32768 minimum: 301
[ 0.001873] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.001890] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.002740] CPU: Testing write buffer coherency: ok
[ 0.002790] CPU0: Spectre v2: using BPIALL workaround
[ 0.003057] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[ 0.003763] Setting up static identity map for 0x10100000 - 0x10100060
[ 0.003924] rcu: Hierarchical SRCU implementation.
[ 0.004329] smp: Bringing up secondary CPUs ...
[ 0.005126] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[ 0.005139] CPU1: Spectre v2: using BPIALL workaround
[ 0.005314] smp: Brought up 1 node, 2 CPUs
[ 0.005332] SMP: Total of 2 processors activated (12.00 BogoMIPS).
[ 0.005343] CPU: All CPU(s) started in SVC mode.
[ 0.005810] devtmpfs: initialized
[ 0.016050] VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
[ 0.016346] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.016374] futex hash table entries: 512 (order: 3, 32768 bytes, linear)
[ 0.018401] pinctrl core: initialized pinctrl subsystem
[ 0.019777] NET: Registered protocol family 16
[ 0.028083] DMA: preallocated 256 KiB pool for atomic coherent allocations
[ 0.029251] thermal_sys: Registered thermal governor 'step_wise'
[ 0.029549] cpuidle: using governor menu
[ 0.029824] CPU identified as i.MX6DL, silicon rev 1.1
[ 0.243570] vdd3p0: supplied by regulator-dummy
[ 0.832502] No ATAGs?
[ 0.832639] hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.
[ 0.832653] hw-breakpoint: maximum watchpoint size is 4 bytes.
[ 0.833914] imx6dl-pinctrl 20e0000.pinctrl: initialized IMX pinctrl driver
[ 0.836119] imx mu driver is registered.
[ 0.836599] imx rpmsg driver is registered.
[ 0.881273] vgaarb: loaded
[ 0.882247] SCSI subsystem initialized
[ 0.882503] libata version 3.00 loaded.
[ 0.883543] gpio-155 (scl): enforced open drain please flag it properly in DT/ACPI DSDT/board file
[ 0.894101] i2c i2c-0: IMX I2C adapter registered
[ 0.895362] gpio-108 (scl): enforced open drain please flag it properly in DT/ACPI DSDT/board file
[ 0.911162] i2c i2c-1: IMX I2C adapter registered
[ 0.912337] gpio-3 (scl): enforced open drain please flag it properly in DT/ACPI DSDT/board file
[ 0.939622] i2c i2c-2: Max17135 PMIC not found!
[ 0.939900] i2c i2c-2: IMX I2C adapter registered
[ 0.940969] mc: Linux media interface: v0.10
[ 0.941021] videodev: Linux video capture interface: v2.00
[ 0.941109] pps_core: LinuxPPS API ver. 1 registered
[ 0.941120] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[ 0.941145] PTP clock support registered
[ 0.969680] imx-ipuv3 2400000.ipu: IPU DMFC NORMAL mode: 1(0~1), 5B(4,5), 5F(6,7)
[ 0.971406] mxc_vdoa 21e4000.vdoa: i.MX Video Data Order Adapter(VDOA) driver probed
[ 0.972148] mxc_mipi_csi2 21dc000.mipi: i.MX MIPI CSI2 driver probed
[ 0.972165] mxc_mipi_csi2 21dc000.mipi: i.MX MIPI CSI2 dphy version is 0x3130302a
[ 0.972291] MIPI CSI2 driver module loaded
[ 0.972350] Advanced Linux Sound Architecture Driver Initialized.
[ 0.972884] Bluetooth: Core ver 2.22
[ 0.972965] NET: Registered protocol family 31
[ 0.972977] Bluetooth: HCI device and connection manager initialized
[ 0.972998] Bluetooth: HCI socket layer initialized
[ 0.973012] Bluetooth: L2CAP socket layer initialized
[ 0.973040] Bluetooth: SCO socket layer initialized
[ 0.973623] clocksource: Switched to clocksource mxc_timer1
[ 2.041137] VFS: Disk quotas dquot_6.6.0
[ 2.041239] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[ 2.051679] NET: Registered protocol family 2
[ 2.051860] IP idents hash table entries: 4096 (order: 3, 32768 bytes, linear)
[ 2.052746] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear)
[ 2.052798] TCP established hash table entries: 2048 (order: 1, 8192 bytes, linear)
[ 2.052831] TCP bind hash table entries: 2048 (order: 2, 16384 bytes, linear)
[ 2.052873] TCP: Hash tables configured (established 2048 bind 2048)
[ 2.052983] UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
[ 2.053017] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
[ 2.053222] NET: Registered protocol family 1
[ 2.053932] RPC: Registered named UNIX socket transport module.
[ 2.053950] RPC: Registered udp transport module.
[ 2.053960] RPC: Registered tcp transport module.
[ 2.053970] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 2.054979] PCI: CLS 0 bytes, default 64
[ 2.055526] hw perfevents: no interrupt-affinity property for /pmu, guessing.
[ 2.055741] hw perfevents: enabled with armv7_cortex_a9 PMU driver, 7 counters available
[ 2.058161] Bus freq driver module loaded
[ 2.059320] Initialise system trusted keyrings
[ 2.059594] workingset: timestamp_bits=14 max_order=16 bucket_order=2
[ 2.065339] NFS: Registering the id_resolver key type
[ 2.065385] Key type id_resolver registered
[ 2.065396] Key type id_legacy registered
[ 2.065501] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[ 2.065514] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering...
[ 2.065555] jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
[ 2.066113] fuse: init (API version 7.32)
[ 2.158672] Key type asymmetric registered
[ 2.158699] Asymmetric key parser 'x509' registered
[ 2.158726] io scheduler mq-deadline registered
[ 2.158738] io scheduler kyber registered
[ 2.163733] pwm-backlight backlight-lvds: supply power not found, using dummy regulator
[ 2.168545] mxc_mipi_dsi 21e0000.mipi: i.MX MIPI DSI driver probed
[ 2.172563] mxc_sdc_fb fb@0: registered mxc display driver ldb
[ 2.203715] imx-ipuv3 2400000.ipu: IPU DMFC DP HIGH RESOLUTION: 1(0,1), 5B(2~5), 5F(6,7)
[ 2.271566] Console: switching to colour frame buffer device 128x48
[ 2.307279] mxc_hdmi 20e0000.hdmi_video: Detected HDMI controller 0x13:0x1a:0xa0:0xc1
[ 2.307313] fbcvt: 1920x1080@60: CVT Name - 2.073M9
[ 2.307445] mxc_sdc_fb fb@1: registered mxc display driver hdmi
[ 2.332732] mxs-dma 110000.dma-apbh: initialized
[ 2.340095] pfuze100-regulator 1-0008: Full layer: 2, Metal layer: 1
[ 2.340831] pfuze100-regulator 1-0008: FAB: 0, FIN: 0
[ 2.340846] pfuze100-regulator 1-0008: pfuze100 found.
[ 2.362378] 2020000.serial: ttymxc0 at MMIO 0x2020000 (irq = 31, base_baud = 5000000) is a IMX
[ 2.363851] 21f4000.serial: ttymxc4 at MMIO 0x21f4000 (irq = 81, base_baud = 5000000) is a IMX
[ 3.298847] printk: console [ttymxc4] enabled
[ 3.304885] imx sema4 driver is registered.
[ 3.323519] brd: module loaded
[ 3.336960] loop: module loaded
[ 3.341776] imx ahci driver is registered.
[ 3.350639] libphy: Fixed MDIO Bus: probed
[ 3.355333] CAN device driver interface
[ 3.371514] pps pps0: new PPS source ptp0
[ 3.377915] libphy: fec_enet_mii_bus: probed
[ 3.384014] fec 2188000.ethernet eth0: registered PHC device 0
[ 3.390575] e1000: Intel(R) PRO/1000 Network Driver
[ 3.395494] e1000: Copyright (c) 1999-2006 Intel Corporation.
[ 3.401326] e1000e: Intel(R) PRO/1000 Network Driver
[ 3.406382] e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
[ 3.412367] igb: Intel(R) Gigabit Ethernet Network Driver
[ 3.417851] igb: Copyright (c) 2007-2014 Intel Corporation.
[ 3.428873] snvs_rtc 20cc000.snvs:snvs-rtc-lp: registered as rtc0
[ 3.435057] snvs_rtc 20cc000.snvs:snvs-rtc-lp: setting system clock to 1970-01-01T00:00:00 UTC (0)
[ 3.444335] i2c /dev entries driver
[ 3.449992] mxc_v4l2_output v4l2_out: V4L2 device registered as video16
[ 3.456823] mxc_v4l2_output v4l2_out: V4L2 device registered as video17
[ 3.463582] mxc_v4l2_output v4l2_out: V4L2 device registered as video18
[ 3.472069] mag3110 2-000e: check mag3110 chip ID
[ 3.477366] mag3110 2-000e: read chip ID 0xfffffff5 is not equal to 0xc4!
[ 3.484497] mag3110: probe of 2-000e failed with error -22
[ 3.490855] mma8451 0-001c: read chip ID 0x1 is not equal to 0x1a or 0x2a!
[ 3.498068] mma8451: probe of 0-001c failed with error -22
[ 3.506099] Bluetooth: HCI UART driver ver 2.3
[ 3.510558] Bluetooth: HCI UART protocol H4 registered
[ 3.515808] Bluetooth: HCI UART protocol BCSP registered
[ 3.521168] Bluetooth: HCI UART protocol LL registered
[ 3.526406] Bluetooth: HCI UART protocol Three-wire (H5) registered
[ 3.532704] Bluetooth: HCI UART protocol Marvell registered
[ 3.539457] sdhci: Secure Digital Host Controller Interface driver
[ 3.545684] sdhci: Copyright(c) Pierre Ossman
[ 3.550046] sdhci-pltfm: SDHCI platform and OF driver helper
[ 3.557102] sdhci-esdhc-imx 2194000.mmc: voltage-ranges unspecified
[ 3.563430] sdhci-esdhc-imx 2194000.mmc: Got CD GPIO
[ 3.569611] sdhci-esdhc-imx 2198000.mmc: voltage-ranges unspecified
[ 3.575293] sdhci-esdhc-imx 2194000.mmc: Got WP GPIO
[ 3.576128] sdhci-esdhc-imx 2198000.mmc: Got CD GPIO
[ 3.580914] mxc_hdmi_cec soc:hdmi_cec@120000: HDMI CEC initialized
[ 3.585889] sdhci-esdhc-imx 2198000.mmc: Got WP GPIO
[ 3.593551] NET: Registered protocol family 26
[ 3.598060] sdhci-esdhc-imx 219c000.mmc: voltage-ranges unspecified
[ 3.602599] NET: Registered protocol family 10
[ 3.614861] Segment Routing with IPv6
[ 3.618619] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[ 3.625295] NET: Registered protocol family 17
[ 3.629764] can: controller area network core
[ 3.634234] NET: Registered protocol family 29
[ 3.638815] can: raw protocol
[ 3.641795] can: broadcast manager protocol
[ 3.644621] mmc3: SDHCI controller on 219c000.mmc [219c000.mmc] using ADMA
[ 3.646168] can: netlink gateway - max_hops=1
[ 3.653262] mmc2: SDHCI controller on 2198000.mmc [2198000.mmc] using ADMA
[ 3.664795] mmc1: SDHCI controller on 2194000.mmc [2194000.mmc] using ADMA
[ 3.672130] Bluetooth: RFCOMM TTY layer initialized
[ 3.677317] Bluetooth: RFCOMM socket layer initialized
[ 3.682579] Bluetooth: RFCOMM ver 1.11
[ 3.686443] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[ 3.691822] Bluetooth: BNEP filters: protocol multicast
[ 3.697180] Bluetooth: BNEP socket layer initialized
[ 3.702215] Bluetooth: HIDP (Human Interface Emulation) ver 1.2
[ 3.708226] Bluetooth: HIDP socket layer initialized
[ 3.713306] lib80211: common routines for IEEE802.11 drivers
[ 3.719050] lib80211_crypt: registered algorithm 'NULL'
[ 3.724310] lib80211_crypt: registered algorithm 'WEP'
[ 3.729455] lib80211_crypt: registered algorithm 'CCMP'
[ 3.734742] lib80211_crypt: registered algorithm 'TKIP'
[ 3.740017] Key type dns_resolver registered
[ 3.745065] vddpu: supplied by SW1C
[ 3.749110] Registering SWP/SWPB emulation handler
[ 3.754273] Loading compiled-in X.509 certificates
[ 3.779917] imx_epdc_fb 20f4000.epdc: Unable to get display PMIC regulator.err = 0xfffffdfb
[ 3.800779] mmc3: new DDR MMC card at address 0001
[ 3.807064] mmcblk3: mmc3:0001 MMC02G 1.79 GiB
[ 3.812380] mmcblk3boot0: mmc3:0001 MMC02G partition 1 1.00 MiB
[ 3.813591] vdd1p1: supplied by VGEN5
[ 3.818878] mmcblk3boot1: mmc3:0001 MMC02G partition 2 1.00 MiB
[ 3.822524] usb_otg_vbus: supplied by SWBST
[ 3.828371] mmcblk3rpmb: mmc3:0001 MMC02G partition 3 128 KiB, chardev (240:0)
[ 3.832441] usb_h1_vbus: supplied by SWBST
[ 3.844270] vdd2p5: supplied by VGEN5
[ 3.848784] vddarm: supplied by SW1AB
[ 3.853205] vddsoc: supplied by SW1C
[ 3.858326] mmcblk3: p1 p2 p3 p4 < p5 p6 p7 >
[ 3.863310] mxc_vpu 2040000.vpu_fsl: VPU initialized
[ 3.872182] imx_thermal 20c8000.anatop:tempmon: Industrial CPU temperature grade - max:105C critical:100C passive:95C
[ 3.887678] input: gpio-keys as /devices/platform/gpio-keys/input/input0
[ 3.973977] SMSC LAN8740 2188000.ethernet-1:01: attached PHY driver [SMSC LAN8740] (mii_bus:phy_addr=2188000.ethernet-1:01, irq=POLL)
[ 23.993693] Waiting up to 100 more seconds for network.
[ 44.003693] Waiting up to 80 more seconds for network.
[ 64.013690] Waiting up to 60 more seconds for network.
[ 84.023689] Waiting up to 40 more seconds for network.
[ 104.033692] Waiting up to 20 more seconds for network.
[ 124.013693] IP-Config: Complete:
[ 124.016953] device=eth0, hwaddr=00:23:0f:00:0e:d2, ipaddr=192.168.1.15, mask=255.255.255.0, gw=192.168.1.1
[ 124.027163] host=wand, domain=, nis-domain=(none)
[ 124.032323] bootserver=192.168.1.9, rootserver=192.168.1.9, rootpath=
[ 124.032739] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[ 124.051826] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[ 124.058562] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[ 124.063980] ALSA device list:
[ 124.067269] platform regulatory.0: Falling back to sysfs fallback for: regulatory.db
[ 124.070158] No soundcards found.
[ 154.073755] usb_otg_vbus: disabling
[ 154.077275] usb_h1_vbus: disabling
[ 154.080693] wm8962-supply: disabling
[ 154.084337] sensors-supply: disabling
[ 154.088036] SWBST: disabling
[ 154.091665] VGEN1: disabling
[ 154.096091] VGEN2: disabling
[ 154.099667] VGEN3: disabling
[ 187.353906] cfg80211: failed to load regulatory.db
[ 239.114228] VFS: Unable to mount root fs via NFS.
[ 239.119062] devtmpfs: mounted
[ 239.124690] Freeing unused kernel memory: 1024K
[ 239.164062] Run /sbin/init as init process
[ 239.168172] with arguments:
[ 239.171141] /sbin/init
[ 239.173929] V3
[ 239.175958] with environment:
[ 239.179110] HOME=/
[ 239.181478] TERM=linux
[ 239.184573] Run /etc/init as init process
[ 239.188602] with arguments:
[ 239.191579] /etc/init
[ 239.194459] V3
[ 239.196550] with environment:
[ 239.199744] HOME=/
[ 239.202151] TERM=linux
[ 239.205315] Run /bin/init as init process
[ 239.209438] with arguments:
[ 239.212410] /bin/init
[ 239.215095] V3
[ 239.217115] with environment:
[ 239.220258] HOME=/
[ 239.222618] TERM=linux
[ 239.225495] Run /bin/sh as init process
[ 239.229336] with arguments:
[ 239.232305] /bin/sh
[ 239.234783] V3
[ 239.236799] with environment:
[ 239.239942] HOME=/
[ 239.242303] TERM=linux
[ 239.245171] Kernel panic - not syncing: No working init found. Try passing init= option to kernel. See Linux Documentation/admin-guide/init.rst for guidance.
[ 239.259360] CPU0: stopping
[ 239.262081] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.10.72-lts-5.10.y+ga68e31b63f86 #1
[ 239.270261] Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree)
[ 239.276829] [<80110840>] (unwind_backtrace) from [<8010b448>] (show_stack+0x10/0x14)
[ 239.284587] [<8010b448>] (show_stack) from [<80c7fc00>] (dump_stack+0x94/0xa8)
[ 239.291823] [<80c7fc00>] (dump_stack) from [<8010e8f4>] (do_handle_IPI+0x370/0x39c)
[ 239.299490] [<8010e8f4>] (do_handle_IPI) from [<8010e938>] (ipi_handler+0x18/0x20)
[ 239.307074] [<8010e938>] (ipi_handler) from [<8018f19c>] (handle_percpu_devid_fasteoi_ipi+0x80/0x1c8)
[ 239.316307] [<8018f19c>] (handle_percpu_devid_fasteoi_ipi) from [<80188e58>] (__handle_domain_irq+0x7c/0xd0)
[ 239.326153] [<80188e58>] (__handle_domain_irq) from [<805ba414>] (gic_handle_irq+0x80/0x94)
[ 239.334518] [<805ba414>] (gic_handle_irq) from [<80100b0c>] (__irq_svc+0x6c/0xa8)
[ 239.342006] Exception stack(0x81201ed0 to 0x81201f18)
[ 239.347064] 1ec0: 00000000 00000037 0cbe3000 8dd67540
[ 239.355250] 1ee0: 00000000 b4a1137f 8120adc8 8dd668b8 00000000 00000037 00000000 813c9d40
[ 239.363434] 1f00: 0000000b 81201f20 80924b64 80924b84 60000013 ffffffff
[ 239.370068] [<80100b0c>] (__irq_svc) from [<80924b84>] (cpuidle_enter_state+0x194/0x4b4)
[ 239.378173] [<80924b84>] (cpuidle_enter_state) from [<80924ee8>] (cpuidle_enter+0x30/0x40)
[ 239.386452] [<80924ee8>] (cpuidle_enter) from [<80167230>] (do_idle+0x214/0x2d0)
[ 239.393859] [<80167230>] (do_idle) from [<801675ec>] (cpu_startup_entry+0x18/0x1c)
[ 239.401440] [<801675ec>] (cpu_startup_entry) from [<811012d8>] (start_kernel+0x7ac/0x7f0)
[ 239.409634] ---[ end Kernel panic - not syncing: No working init found. Try passing init= option to kernel. See Linux Documentation/admin-guide/init.rst for guidance. ]---

标签 (4)
标记 (1)
0 项奖励
2 回复数

1,319 次查看
jimmychan
NXP TechSupport
NXP TechSupport

Please check the code in the mach-imx6q.c

https://source.codeaurora.org/external/imx/linux-imx/tree/arch/arm/mach-imx/mach-imx6q.c?h=lf-5.10.y

 

There is the code for phy fixup and you could add the code there to reset the phy when kernel start.

 

1,301 次查看
vivsundar
Contributor III

@jimmychan Thanks for the quick response.

Towards the probe function of: https://source.codeaurora.org/external/imx/linux-imx/tree/drivers/net/ethernet/freescale/fec_main.c?...

I can see that the probe function cuts/disables down the carrier, clock and sets the mux pins to sleep state.  The following lines of code tells this:

	/* Carrier starts down, phylib will bring it up */
	netif_carrier_off(ndev);
	fec_enet_clk_enable(ndev, false);
	pinctrl_pm_select_sleep_state(&pdev->dev);

 And in: https://source.codeaurora.org/external/imx/linux-imx/tree/arch/arm/mach-imx/mach-imx6q.c?h=lf-5.10.y

I am able to register a small fixup function. But in the fixup function "smsc_phy_fixup" I get a pointer to "struct phy_device.  Now I suppose that I should do the reverse: i.e. set the iomux pins, enable the clock and enable the carrier.  Is that correct? If so how should I do that with the pointer to phy_device?

Pls advice.

 

static void __init imx6q_enet_phy_init(void)
{
        if (IS_BUILTIN(CONFIG_PHYLIB)) {
                phy_register_fixup_for_uid(PHY_ID_KSZ9021, MICREL_PHY_ID_MASK,
                                ksz9021rn_phy_fixup);
                phy_register_fixup_for_uid(PHY_ID_KSZ9031, MICREL_PHY_ID_MASK,
                                ksz9031rn_phy_fixup);
                phy_register_fixup_for_uid(PHY_ID_AR8031, 0xffffffef,
                                ar8031_phy_fixup);
                phy_register_fixup_for_uid(PHY_ID_AR8035, 0xffffffef,
                                ar8035_phy_fixup);
                printk (KERN_CRIT "\My Smsc phy fixup!!!\n");
                phy_register_fixup_for_uid(0x0007c110, 0xfffffff0,
                                smsc_phy_fixup);
        }
}

/* Call Back Function */
static int smsc_phy_fixup(struct phy_device *dev)
{
        printk (KERN_CRIT "\Smsc phy fixup function\n");
        if ((dev != NULL) && (dev->drv != NULL)) {
                printk (KERN_CRIT "Phy driver name: %s", dev->drv->name);
                //dev->drv->soft_reset (dev);
        }
        return 0;
}

 

0 项奖励