No clks available, skipping PHY read

Hi, Sir

I am debugging the driver for 88EA6321.
The function ‘of_find_net_device_by_node(ethernet)’ in dsa2.c line 460 returned an error.
Only one related error prompt is seen in the log: eqos_mdio_read:No clks available, skipping PHY read

Used the following device-tree configuration:

   fec1:ether_qos@2490000 {
	/* PTP_ref clock speed in MHz */
	nvidia,ptp_ref_clock_speed = <312500000>;
	/* rxq_enable_ctrl = <rx0 rx1 rx2 rx3>
	 * 0x0 = Not enabled, 0x1 = Enabled for AV
	 * 0x2 = Enabled for Legacy, 0x3 = Reserved
	 */
	nvidia,rxq_enable_ctrl = <2 2 2 2>;
	nvidia,queue_prio = <0 1 2 3>;

	nvidia,use_tagged_ptp;
	nvidia,ptp_dma_ch = <3>;

	nvidia,chan_napi_quota = <64 64 64 64>;
	nvidia,pause_frames = <0>; /*0=enable, 1=disable */

	nvidia,phy-reset-gpio = <&tegra_main_gpio TEGRA194_MAIN_GPIO(G, 5) 0>;

	nvidia,phy-max-frame-size = <16>;	/* size in kbytes */
	nvidia,eth_iso_enable = <1>; /*0=enable, 1=disable */
	phy-mode = "rgmii";
	fixed-link {
		speed = <1000>;
		full-duplex;
		pause;
	};


	mdio {
		compatible = "nvidia,eqos-mdio";
		#address-cells = <1>;
		#size-cells = <0>;

		switch0@0 {
			compatible = "marvell,mv88e6085";
			dsa,member = <0 0>;
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <0>;
			switch,phy-reset-gpios = <&tegra_main_gpio TEGRA194_MAIN_GPIO(G, 5) 0>;

			ports {
				#address-cells = <1>;
				#size-cells = <0>;
				port@0{
					reg = <0>;
					label = "lan0";
				};
				port@1{
					reg = <1>;
					label = "lan1";
				};
				port@2{
					reg = <2>;
					label = "lan2";
				};
				port@3{
					reg = <3>;
					label = "lan3";
				};
				port@4{
					reg = <4>;
					label = "lan4";
				};

				port@5{
					reg = <5>;
					label = "cpu";
					ethernet = <&fec1>;

					phy-mode = "rgmii";
					fixed-link {
						speed = <1000>;
						full-duplex;
					};
				};

				port@6{
					reg = <6>;
					label = "lan6";
				};

			};


		};

	};



};

static int dsa_cpu_parse(struct device_node *port, u32 index,
struct dsa_switch_tree *dst,
struct dsa_switch *ds)
{
enum dsa_tag_protocol tag_protocol;
struct net_device *ethernet_dev;
struct device_node *ethernet;

printk(“geng-dsa2.c-41\n”);
ethernet = of_parse_phandle(port, “ethernet”, 0);
if (!ethernet)
return -EINVAL;

printk(“geng-dsa2.c-42\n”);
ethernet_dev = of_find_net_device_by_node(ethernet);
if (!ethernet_dev)
return -EPROBE_DEFER; /the function return here/

printk(“geng-dsa2.c-43\n”);
if (!ds->master_netdev)
ds->master_netdev = ethernet_dev;

printk(“geng-dsa2.c-44\n”);
if (!dst->master_netdev)
dst->master_netdev = ethernet_dev;

printk(“geng-dsa2.c-45\n”);
if (dst->cpu_switch == -1) {
dst->cpu_switch = ds->index;
dst->cpu_port = index;
}

printk(“geng-dsa2.c-46\n”);
tag_protocol = ds->ops->get_tag_protocol(ds);
dst->tag_ops = dsa_resolve_tag_protocol(tag_protocol);
if (IS_ERR(dst->tag_ops)) {
dev_warn(ds->dev, “No tagger for this switch\n”);
return PTR_ERR(dst->tag_ops);
}

dst->rcv = dst->tag_ops->rcv;

return 0;

}

dmesg.log (67.9 KB)

Please at least review what you posted after you sent it out. The format is gone. And I totally don’t know which is line 460.

Is the mdio driver giving you the correct phy driver or not?

I use the driver ‘Marvell 88e6xxx Ethernet’ that comes with the kernel source code。

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.