Microchip-Ethernet / EVB-KSZ9477

Repository for using Microchip EVB-KSZ9477 board. Product Supported: KSZ9477, KSZ9567, KSZ9897, KSZ9896, KSZ8567, KSZ8565, KSZ9893, KSZ9563, KSZ8563, LAN9646, Phys(KSZ9031/9131, LAN8770
76 stars 79 forks source link

How to set RGMII delay #90

Open lantianhaohh opened 1 year ago

lantianhaohh commented 1 year ago

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 commented 1 year ago

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