Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to set RGMII delay #90

Open
lantianhaohh opened this issue Feb 1, 2023 · 1 comment
Open

How to set RGMII delay #90

lantianhaohh opened this issue Feb 1, 2023 · 1 comment

Comments

@lantianhaohh
Copy link

Because KS9896 defaults to TX-Delay, it also needs the RGMII delay on the CPU (Ethernet node) side to ensure that RGMII works normally, if the settings here are incorrect, RX will always have no data, how to add RGMII delay, add this?
fsl,rgmii_txc_dly;
The configuration of my Ethernet node is:

#include <dt-bindings/gpio/tegra194-gpio.h>

/ {
        ethernet@2490000 {
		interrupts =	<0 194 0x4>,    /* common */
				<0 186 0x4>,    /* tx0 */
				<0 190 0x4>;    /* rx0 */
		/* 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>;
		nvidia,num-dma-chans = <1>;
		nvidia,dma-chans = <0>;
		nvidia,num-mtl-queues = <1>;
		nvidia,mtl-queues = <0>;
		nvidia,rx-queue-prio = <0x2>;
		nvidia,tx-queue-prio = <0x0>;
		/* 0=enable, 1=disable */
		nvidia,pause_frames = <0>;
		/* no reset GPIO */
		//nvidia,phy-reset-gpio = <&tegra_main_gpio TEGRA194_MAIN_GPIO(G, 5) 0>;
		phy-mode = "rgmii-id";
		nvidia,max-platform-mtu = <16383>;
		nvidia,if-name = "ethsw0";
		fixed-link {
			speed = <1000>;
			full-duplex;
		};
	};

	thermal-zones {
		CPU-therm {
			trips {
				MAKE_EQOS_TRIP(m40, -40000, 5000);
				MAKE_EQOS_TRIP(m5, -5000, 5000);
				MAKE_EQOS_TRIP(p30, 30000, 5000);
				MAKE_EQOS_TRIP(p65, 65000, 5000);
				MAKE_EQOS_TRIP(p100, 100000, 5000);
			};

			cooling-maps {
				MAP_EQOS(m40, 1);
				MAP_EQOS(m5, 2);
				MAP_EQOS(p30, 3);
				MAP_EQOS(p65, 4);
				MAP_EQOS(p100, 5);
			};
		};
	};
};
@lantianhaohh
Copy link
Author

If the management interface is I2C, can I set the delay of KSZ9896 through I2C?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant