Search code examples
linux-device-driverembedded-linuxdevice-tree

What does the variable and value of DP83867_RGMIIDCTL_2_25_NS in device tree correspond to?


I am a newbie to the embedded linux and device-tree world. I am trying to modify the device tree of ethernet phy from TI. I am interested to know what values the following variables <DP83867_RGMIIDCTL_2_25_NS>, <DP83867_RGMIIDCTL_2_75_NS> and <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB> correspond to. It appears to be delay values, but I searched through the datasheet (https://www.ti.com/lit/ds/symlink/dp83867ir.pdf?HQS=dis-mous-null-mousermode-dsf-pf-null-wwe&DCM=yes&ref_url=https%3A%2F%2Fwww.mouser.co.uk%2F&distId=26) and couldn't find any reference to such variable.

Can someone with some experience in device-tree explain where these variable are coming from and how to change/configure such register values.

&gem3 { /* required by spec */
    status = "okay";
    pinctrl-names = "default";
    pinctrl-0 = <&pinctrl_gem3_default>;
    phy-handle = <&phy0>;
    phy-mode = "rgmii-id";

    mdio: mdio {
        #address-cells = <1>;
        #size-cells = <0>;
        reset-gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
        reset-delay-us = <2>;

        phy0: ethernet-phy@1 {
            #phy-cells = <1>;
            reg = <1>;
            ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_25_NS>;
            ti,tx-internal-delay = <DP83867_RGMIIDCTL_2_75_NS>;
            ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>;
            ti,dp83867-rxctrl-strap-quirk;
        };
    };
};


Solution

  • What does the variable and value of DP83867_RGMIIDCTL_2_25_NS in device tree correspond to?

    From https://elixir.bootlin.com/linux/latest/A/ident/DP83867_RGMIIDCTL_2_25_NS it corresponds to a macro with the value 0x8.

     #define    DP83867_RGMIIDCTL_2_25_NS   0x8