Hello. I trying add RGMII, executing next step:
1 In flash log i find dts file that use for pinmux
copying inmux_config(/home/jetson/Jetson_RT/Linux_for_Tegra/bootloader/generic/BCT/tegra234-mb1-bct-pinmux-p3701-0000-a04.dtsi)... done.
in this file i add changes
eqos_txc_pe0 {
nvidia,pins = "eqos_txc_pe0";
nvidia,function = "eqos";
nvidia,pull = <TEGRA_PIN_PULL_NONE>;
nvidia,tristate = <TEGRA_PIN_DISABLE>;
nvidia,enable-input = <TEGRA_PIN_DISABLE>;
};
eqos_td0_pe1 {
nvidia,pins = "eqos_td0_pe1";
nvidia,function = "eqos";
nvidia,pull = <TEGRA_PIN_PULL_NONE>;
nvidia,tristate = <TEGRA_PIN_DISABLE>;
nvidia,enable-input = <TEGRA_PIN_DISABLE>;
};
eqos_td1_pe2 {
nvidia,pins = "eqos_td1_pe2";
nvidia,function = "eqos";
nvidia,pull = <TEGRA_PIN_PULL_NONE>;
nvidia,tristate = <TEGRA_PIN_DISABLE>;
nvidia,enable-input = <TEGRA_PIN_DISABLE>;
};
eqos_td2_pe3 {
nvidia,pins = "eqos_td2_pe3";
nvidia,function = "eqos";
nvidia,pull = <TEGRA_PIN_PULL_NONE>;
nvidia,tristate = <TEGRA_PIN_DISABLE>;
nvidia,enable-input = <TEGRA_PIN_DISABLE>;
};
eqos_td3_pe4 {
nvidia,pins = "eqos_td3_pe4";
nvidia,function = "eqos";
nvidia,pull = <TEGRA_PIN_PULL_NONE>;
nvidia,tristate = <TEGRA_PIN_DISABLE>;
nvidia,enable-input = <TEGRA_PIN_DISABLE>;
};
eqos_tx_ctl_pe5 {
nvidia,pins = "eqos_tx_ctl_pe5";
nvidia,function = "eqos";
nvidia,pull = <TEGRA_PIN_PULL_NONE>;
nvidia,tristate = <TEGRA_PIN_DISABLE>;
nvidia,enable-input = <TEGRA_PIN_DISABLE>;
};
eqos_rd0_pe6 {
nvidia,pins = "eqos_rd0_pe6";
nvidia,function = "eqos";
nvidia,pull = <TEGRA_PIN_PULL_UP>;
nvidia,tristate = <TEGRA_PIN_ENABLE>;
nvidia,enable-input = <TEGRA_PIN_ENABLE>;
};
eqos_rd1_pe7 {
nvidia,pins = "eqos_rd1_pe7";
nvidia,function = "eqos";
nvidia,pull = <TEGRA_PIN_PULL_UP>;
nvidia,tristate = <TEGRA_PIN_ENABLE>;
nvidia,enable-input = <TEGRA_PIN_ENABLE>;
};
eqos_rd2_pf0 {
nvidia,pins = "eqos_rd2_pf0";
nvidia,function = "eqos";
nvidia,pull = <TEGRA_PIN_PULL_UP>;
nvidia,tristate = <TEGRA_PIN_ENABLE>;
nvidia,enable-input = <TEGRA_PIN_ENABLE>;
};
eqos_rd3_pf1 {
nvidia,pins = "eqos_rd3_pf1";
nvidia,function = "eqos";
nvidia,pull = <TEGRA_PIN_PULL_UP>;
nvidia,tristate = <TEGRA_PIN_ENABLE>;
nvidia,enable-input = <TEGRA_PIN_ENABLE>;
};
eqos_rx_ctl_pf2 {
nvidia,pins = "eqos_rx_ctl_pf2";
nvidia,function = "eqos";
nvidia,pull = <TEGRA_PIN_PULL_UP>;
nvidia,tristate = <TEGRA_PIN_ENABLE>;
nvidia,enable-input = <TEGRA_PIN_ENABLE>;
};
eqos_rxc_pf3 {
nvidia,pins = "eqos_rxc_pf3";
nvidia,function = "eqos";
nvidia,pull = <TEGRA_PIN_PULL_UP>;
nvidia,tristate = <TEGRA_PIN_ENABLE>;
nvidia,enable-input = <TEGRA_PIN_ENABLE>;
};
eqos_sma_mdio_pf4 {
nvidia,pins = "eqos_sma_mdio_pf4";
nvidia,function = "eqos";
nvidia,pull = <TEGRA_PIN_PULL_NONE>;
nvidia,tristate = <TEGRA_PIN_DISABLE>;
nvidia,enable-input = <TEGRA_PIN_ENABLE>;
};
eqos_sma_mdc_pf5 {
nvidia,pins = "eqos_sma_mdc_pf5";
nvidia,function = "eqos";
nvidia,pull = <TEGRA_PIN_PULL_NONE>;
nvidia,tristate = <TEGRA_PIN_DISABLE>;
nvidia,enable-input = <TEGRA_PIN_DISABLE>;
};
soc_gpio17_pg4 {
nvidia,pins = "soc_gpio17_pg4";
nvidia,function = "rsvd0";
nvidia,pull = <TEGRA_PIN_PULL_UP>;
nvidia,tristate = <TEGRA_PIN_ENABLE>;
nvidia,enable-input = <TEGRA_PIN_ENABLE>;
nvidia,lpdr = <TEGRA_PIN_DISABLE>;
};
soc_gpio18_pg5 {
nvidia,pins = "soc_gpio18_pg5";
nvidia,function = "rsvd0";
nvidia,pull = <TEGRA_PIN_PULL_NONE>;
nvidia,tristate = <TEGRA_PIN_DISABLE>;
nvidia,enable-input = <TEGRA_PIN_DISABLE>;
nvidia,lpdr = <TEGRA_PIN_DISABLE>;
};
2 In 2 In Linux_for_Tegra/source/hardware/nvidia/t23x/nv-public/nv-platform
i add entries to tegra234-p3737-0000+p3701-0004-nv.dts file
/* EQOS */
ethernet0: ethernet@2310000 {
status = "okay";
nvidia,mac-addr-idx = <0>;
nvidia,phy-reset-gpio = <&gpio TEGRA234_MAIN_GPIO(G, 5) 0>;
phy-mode = "rgmii-id";
phy-handle = <&phy>;
mdio {
compatible = "nvidia,eqos-mdio";
#address-cells = <1>;
#size-cells = <0>;
phy: phy@3 {
reg = <3>;
nvidia,phy-rst-pdelay-msec = <224>; /* msec */
nvidia,phy-rst-duration-usec = <10000>; /* usec */
interrupt-parent = <&gpio>;
interrupts = <TEGRA234_MAIN_GPIO(G, 4) IRQ_TYPE_LEVEL_LOW>;
};
};
};
3 Then I create and rewrite DTB files
$ export CROSS_COMPILE=/bin/aarch64-buildroot-linux-gnu-
$ export KERNEL_HEADERS=$PWD/kernel/kernel-jammy-src
$ make dtbs
$ cp nvidia-oot/device-tree/platform/generic-dts/dtbs/* /Linux_for_Tegra/kernel/dtb/
I checked tegra234-p3737-0000+p3701-0004-nv.dtb the added entries actually appeared in it.
ethernet@2310000 {
status = "okay";
nvidia,mac-addr-idx = <0x00>;
nvidia,phy-reset-gpio = <0xe3 0x35 0x00>;
phy-mode = "rgmii-id";
phy-handle = <0x20a>;
phandle = <0x361>;
mdio {
compatible = "nvidia,eqos-mdio";
#address-cells = <0x01>;
#size-cells = <0x00>;
phy@3 {
reg = <0x03>;
nvidia,phy-rst-pdelay-msec = <0xe0>;
nvidia,phy-rst-duration-usec = <0x2710>;
interrupt-parent = <0xe3>;
interrupts = <0x34 0x08>;
phandle = <0x20a>;
};
};
};
I attach flash_log, boot_log, dtb, pinmux files:
boot_log.txt.txt (76.5 KB)
Flash_log.txt.txt (96.5 KB)
tegra234-mb1-bct-pinmux-p3701-0000-a04.dtsi.txt (63.6 KB)
tegra234-p3737-0000+p3701-0004-nv.dts.txt (316.9 KB)
I tried debugging:
jetson@ubuntu:~$ sudo mii-tool eth0
[sudo] password for jetson:
SIOCGMIIPHY on ‘eth0’ failed: No such device
jetson@ubuntu:~$ sudo dmesg | grep 2310000
jetson@ubuntu:~$ ls /sys/bus/mdio_bus/devices/
jetson@ubuntu:~$ sudo cat /sys/kernel/debug/gpio |grep PG
gpio-347 (PGG.00 )
gpio-383 (PG.00 |Force Recovery ) in hi IRQ ACTIVE LOW
gpio-384 (PG.01 )
gpio-385 (PG.02 |Suspend ) in hi IRQ ACTIVE LOW
gpio-386 (PG.03 )
gpio-387 (PG.04 )
gpio-388 (PG.05 )
gpio-389 (PG.06 )
gpio-390 (PG.07 |cd ) in hi IRQ ACTIVE LOW
jetson@ubuntu:~$
GPIO not added
No log messages about RGMII.