Ethernet device is not detecting on ubuntu 20.04 LTS on BBG

Robert, Rev C3 looks like a controlled reset on the PHY. So what was the issue with the PHY 1*) having a hardware issue of not connecting only fix, resetting with new gpio, and read address to see if it booted right, 2*) Resets too early before power stabilized, 3*) We don’t know, but now we can reset without doing a full power reboot?

Depending on the answer implies that s/w control will need different solutions, I have an older board design that needs to implement these changes, so it brings up a few questions.

  1. Will the new Rev C3’s work with the old software, when the GPIO controlling the reset is not configured in old BBB(AOSP) design
  2. What software changes need to be implemented to use this new h/w control
    2a) Based on 1* above - A lot more code need to read the PHY address to see if it booted correctly
    2b) Based on 2* above, simple hold the reset off a little longer on the PHY and no need to read address because it will just work
    2c) Based on 3* A combination of both 2a and 2b

I’m looking for the detail of all the s/w changes that are needed, and will need to look into our old BBB(aosp) that you did a long time ago, and see how to add into that code. Sorry, I’m more of an embedded micrcontroller engineer, and inherited the BBB linux from another no longer contractor, and we are looking how to get 100% ethernet boot. Is there a provider of the industrial version Ver C3 boards that you know of? Thanks

Right now, no software changes are required.

There are two fixes on the RevC3 to fix (or help fix) the 8710A random startup conditions…

The first was to remove C24 from the design, this helped some of the boards that had shown issues:

The second was wire up a “new spare” gpio to physically reset the phy on startup.

The first doesn’t require any software update, and works on any image you are using today…

The second would need a u-boot change, but to test i need a RevC3 board that normally fails to verify it actually does something… So yeah, that u-boot change hasn’t been written or tested yet…

The PCB needed a new spin for our microSD cage that went EOL, so we added all the fixes we could with backup options if more fixes where still needed (gpio - phy - reset)…

Seeed’s version of the Industrial should use the RevC3 pcb, as once they ran out of microSD cages, they had no options to build older PCB’s…

Short answer, if you have a board with this problem, de-populate C24, there is a good chance the Ethernet PHY will be fixed…

For an existing image in the field, RevC3 should be a seamless upgrade…

Regards,

Thank you for the quick response. I can’t seem to find a Seeed Industrial BBB, do you know the orderable Digikey or Seeed part number, or at least a link to an Industrial Temp version?

Thank you and Merry Christmas!

I checked on this earlier, as i wanted to verify it was RevC3… We are out of stock at the moment…

Regards,

RCN,
kernel 5.11.10

The revC3 schematic shows GPIO1_8 being used to reset the PHY but the kernel’s BBB device tree files don’t reference gpio1_8. I found https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/Documentation/devicetree/bindings/net/mdio.yaml?h=v5.11.10 mentions reset-gpios, reset-delay-us and reset-post-delay-us. I understand, from the description, that those are used to control the mdio reset lines. Please correct me if I misunderstand. I don’t have a BBB revC3 yet but want to prepare the device tree to use the hardware fix. Here is snippet and proposed device tree entries.
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/arch/arm/boot/dts/am335x-bone-common.dtsi?h=v5.11.10

&davinci_mdio {
	pinctrl-names = "default", "sleep";
	pinctrl-0 = <&davinci_mdio_default>;
	pinctrl-1 = <&davinci_mdio_sleep>;
	status = "okay";
	// added to support gpio controlled PHY reset
	reset-gpios = <&gpio1 8 GPIO_ACVIVE_LOW>;
	reset-delay-us = <2>;

	ethphy0: ethernet-phy@0 {
		reg = <0>;
	};
};

Also I am guessing that the pinmux for gpio1_8 has to be set in the device tree.

davinci_mdio_default: davinci_mdio_default {
	pinctrl-single,pins = <
		/* MDIO */
		AM33XX_PADCONF(AM335X_PIN_MDIO, PIN_INPUT_PULLUP | SLEWCTRL_FAST, MUX_MODE0)
		AM33XX_PADCONF(AM335X_PIN_MDC, PIN_OUTPUT_PULLUP, MUX_MODE0)
		// added to support gpio controlled PHY reset
		AM33XX_PADCONF(AM335X_PIN_UART0_CTSN,  PIN_OUTPUT_PULLUP, MUX_MODE7)
	>;
};

Is this also correct?
Thank you,

Also update davinci_mdio_sleep pinmux, otherwise it looks good, it would be nice to scope it to validate it actually reset.

Ethernet

another option, just remove C24, this wasn’t documented directly, but it was another small fix to help reset.

Regards,

RCN,
I received my BBB C3 today from digikey. The eMMC came loaded with

cat /proc/version
Linux version 4.19.94-ti-r42 (voodoo@x3-am57xx-beagle-x15-2gb) (gcc version 8.3.0 (Debian 8.3.0-6)) #1buster SMP PREEMPT Tue Mar 31 19:38:29 UTC 2020
cat /etc/debian_version 
10.3

# snippet from 
sudo cat /sys/kernel/debug/gpio                                                                    
gpiochip1: GPIOs 32-63, parent: platform/4804c000.gpio, gpio-32-63:
 gpio-32  (GPMC_AD0            |P8_25               ) in  lo    
 gpio-33  (GPMC_AD1            |P8_24               ) in  lo    
 gpio-34  (GPMC_AD2            |P8_05               ) in  lo    
 gpio-35  (GPMC_AD3            |P8_06               ) in  lo    
 gpio-36  (GPMC_AD4            |P8_23               ) in  lo    
 gpio-37  (GPMC_AD5            |P8_22               ) in  lo    
 gpio-38  (GPMC_AD6            |P8_03               ) in  lo    
 gpio-39  (GPMC_AD7            |P8_04               ) in  lo    
 gpio-40  (UART0_CTSN         )
 gpio-41  (UART0_RTSN         )
 gpio-42  (UART0_RXD           )
 gpio-43  (UART0_TXD           )

The BBB C3 uses gpio1_8 (gpio-40) to control the PHY reset signal. I am able to toggle gpio1_8 like this,

# connect RJ45 on BBB to an ethernet switch and observe the leds are lighted
cd /sys/class/gpio
echo 40 > export
echo high > gpio40/direction
# set gpio1_8 low
echo 0 > gpio40/value
# observe the RJ45 leds are not lighted
# set gpio1_8 high
echo 1 > gpio40/value
# observe the RJ45 leds are lighted

Now I want to edit the BBB device tree to add reset-gpios to &davinci_mdio and add pinmux for UART_CTSN so that I can test how/when the kernel controls gpio1_8.

Where do I find the source .dts/.dtsi files used to create the /boot/dtbs/4.19.94-ti-r42/am335x-boneblack-uboot-univ.dtb blob?

Thank you,

Main repo is here: BeagleBoard.org / BeagleBoard-DeviceTrees · GitLab the branch you are looking for is: ‘v4.19.x-ti-overlays’

Regards,

RCN,

Is there an existing BBB-phy-gpio-reset.dts file to build as an overlay to apply to the kernel that supports the BBB RevC3 hardware?
Thank you,

Nope, so far (knock on wood) none of my RevC3’s have shown the issue yet…

Regards,

RCN,

I changed from the 4.19.x kernel. I want to use kernel 5.19.3 because it is first kernel with built-in frame buffer driver for i2c ssd1307fb OLED display. I have downloaded/built/installed the 5.19.3 kernel. I found a am335x-boneblack.dtb that was created during the build. I could not find am335x-boneblack-uboot-univ.dtb or any of the .dtbo overlay files. I admit that I am confused. I downloaded/extracted the files, found here, into an empty folder.
I don’t know what to do with the extracted v5.19.x files.
Do I copy the files in the extracted …v5.19.x/src/arm folder into the kernel arch/arm/boot/dts folder and rebuild the kernel?
Thank you,

I have answered part of my question, but now have another.
I changed to the extracted folder and run
make clean
make all_arm

All of the src/arm .dts files built .dtb files but none of the src/arm/overlay/ .dts files built. The compile stopped with this error.

  DTC     src/arm/overlays/BB-BBGW-WL1835-00A0.dtbo
Error: src/arm/overlays/BB-BBGW-WL1835-00A0.dts:16.1-11 syntax error
FATAL ERROR: Unable to parse input tree
Makefile:215: recipe for target 'src/arm/overlays/BB-BBGW-WL1835-00A0.dtbo' failed
make[1]: *** [src/arm/overlays/BB-BBGW-WL1835-00A0.dtbo] Error 1
Makefile:163: recipe for target 'all_arm' failed
make: *** [all_arm] Error 2

I moved the BB-BBGW-WL1835-00A0.dts from the overlay folder and then received

  DTC     src/arm/overlays/BB-BBBW-WL1835-00A0.dtbo
Error: src/arm/overlays/BB-BBBW-WL1835-00A0.dts:16.1-11 syntax error
FATAL ERROR: Unable to parse input tree
Makefile:215: recipe for target 'src/arm/overlays/BB-BBBW-WL1835-00A0.dtbo' failed
make[1]: *** [src/arm/overlays/BB-BBBW-WL1835-00A0.dtbo] Error 1
Makefile:163: recipe for target 'all_arm' failed
make: *** [all_arm] Error 2

How do I build the overlay files?
Thank you,

Don’t use 5.19.x, it’s eol, please just use 6.1.x which is an LTS:

v6.1.x overlays can be built via:

git clone -b v6.1.x https://git.beagleboard.org/beagleboard/BeagleBoard-DeviceTrees.git
cd ./BeagleBoard-DeviceTrees/
make
Cloning into 'BeagleBoard-DeviceTrees'...
remote: Enumerating objects: 15026, done.
remote: Counting objects: 100% (373/373), done.
remote: Compressing objects: 100% (166/166), done.
remote: Total 15026 (delta 201), reused 345 (delta 184), pack-reused 14653
Receiving objects: 100% (15026/15026), 3.31 MiB | 3.94 MiB/s, done.
Resolving deltas: 100% (10035/10035), done.
  DTC     src/arm/omap4-panda-a4.dtb
  DTC     src/arm/omap3-beagle.dtb
  DTC     src/arm/am335x-boneblack-wireless.dtb
src/arm/am335x-boneblack-hdmi.dtsi:87.9-98.5: Warning (graph_child_address): /ocp/interconnect@44c00000/segment@200000/target-module@b000/i2c@0/tda19988@70/ports: graph node has single child node 'port@0', #address-cells/#size-cells are not necessary
  DTC     src/arm/am335x-pocketbeagle.dtb
  DTC     src/arm/am57xx-beagle-x15-revb1.dtb
  DTC     src/arm/am335x-bonegreen-wireless-uboot-univ.dtb
  DTC     src/arm/omap3-beagle-xm.dtb
  DTC     src/arm/am335x-boneblue.dtb
  DTC     src/arm/am335x-bonegreen.dtb
  DTC     src/arm/omap3-beagle-xm-ab.dtb
  DTC     src/arm/am335x-sancloud-bbe-extended-wifi.dtb
  DTC     src/arm/am335x-sancloud-bbe-lite.dtb
  DTC     src/arm/omap4-panda-es.dtb
  DTC     src/arm/am57xx-beagle-x15.dtb
  DTC     src/arm/omap5-uevm.dtb
  DTC     src/arm/omap4-sdp.dtb
  DTC     src/arm/am335x-bone.dtb
  DTC     src/arm/am335x-bonegreen-gateway.dtb
  DTC     src/arm/am335x-osd3358-sm-red.dtb
src/arm/am335x-boneblack-hdmi.dtsi:87.9-98.5: Warning (graph_child_address): /ocp/interconnect@44c00000/segment@200000/target-module@b000/i2c@0/tda19988@70/ports: graph node has single child node 'port@0', #address-cells/#size-cells are not necessary
  DTC     src/arm/am335x-bonegreen-wireless.dtb
  DTC     src/arm/am335x-boneblack-uboot-univ.dtb
  DTC     src/arm/am57xx-beagle-x15-revc.dtb
  DTC     src/arm/am335x-boneblack.dtb
src/arm/am335x-boneblack-hdmi.dtsi:87.9-98.5: Warning (graph_child_address): /ocp/interconnect@44c00000/segment@200000/target-module@b000/i2c@0/tda19988@70/ports: graph node has single child node 'port@0', #address-cells/#size-cells are not necessary
  DTC     src/arm/am5729-beagleboneai.dtb
  DTC     src/arm/omap4-panda.dtb
  DTC     src/arm/am335x-boneblack-uboot.dtb
  DTC     src/arm/am335x-sancloud-bbe.dtb
src/arm/am335x-boneblack-hdmi.dtsi:87.9-98.5: Warning (graph_child_address): /ocp/interconnect@44c00000/segment@200000/target-module@b000/i2c@0/tda19988@70/ports: graph node has single child node 'port@0', #address-cells/#size-cells are not necessary
  DTC     src/arm/overlays/BB-I2C1-MCP7940X-00A0.dtbo
  DTC     src/arm/overlays/AM335X-PRU-UIO-00A0.dtbo
  DTC     src/arm/overlays/BB-NHDMI-TDA998x-00A0.dtbo
  DTC     src/arm/overlays/BB-BBGW-WL1835-00A0.dtbo
  DTC     src/arm/overlays/BB-BONE-4D5R-01-00A1.dtbo
  DTC     src/arm/overlays/BB-SPIDEV0-00A0.dtbo
  DTC     src/arm/overlays/BB-I2C2-MPU6050.dtbo
  DTC     src/arm/overlays/BB-UART4-00A0.dtbo
  DTC     src/arm/overlays/BB-CAPE-DISP-CT4-00A0.dtbo
  DTC     src/arm/overlays/BB-W1-P9.12-00A0.dtbo
  DTC     src/arm/overlays/BB-UART1-00A0.dtbo
  DTC     src/arm/overlays/BB-I2C1-RTC-PCF8563.dtbo
  DTC     src/arm/overlays/BB-UART2-00A0.dtbo
  DTC     src/arm/overlays/BB-LCD-ADAFRUIT-24-SPI1-00A0.dtbo
  DTC     src/arm/overlays/PB-MIKROBUS-0.dtbo
  DTC     src/arm/overlays/BB-BONE-eMMC1-01-00A0.dtbo
  DTC     src/arm/overlays/M-BB-BBGG-00A0.dtbo
  DTC     src/arm/overlays/BB-BBBW-WL1835-00A0.dtbo
  DTC     src/arm/overlays/BB-BONE-NH7C-01-A0.dtbo
  DTC     src/arm/overlays/BONE-ADC.dtbo
  DTC     src/arm/overlays/BB-HDMI-TDA998x-00A0.dtbo
  DTC     src/arm/overlays/BBORG_RELAY-00A2.dtbo
  DTC     src/arm/overlays/M-BB-BBG-00A0.dtbo
  DTC     src/arm/overlays/BB-BBGG-WL1835-00A0.dtbo
  DTC     src/arm/overlays/BB-I2C2-BME680.dtbo
  DTC     src/arm/overlays/BBORG_COMMS-00A2.dtbo
  DTC     src/arm/overlays/BB-ADC-00A0.dtbo
  DTC     src/arm/overlays/BB-SPIDEV1-00A0.dtbo
  DTC     src/arm/overlays/PB-MIKROBUS-1.dtbo
  DTC     src/arm/overlays/BB-BONE-LCD4-01-00A1.dtbo
  DTC     src/arm/overlays/BBORG_FAN-A000.dtbo
  DTC     src/arm/overlays/BB-I2C1-RTC-DS3231.dtbo
find: ‘src/arm64/overlays’: No such file or directory
  DTC     src/arm64/k3-j721e-common-proc-board.dtb
  DTC     src/arm64/k3-am625-sk.dtb
  DTC     src/arm64/k3-j721e-beagleboneai64.dtb
  DTC     src/arm64/k3-j721e-sk.dtb

These overlays are also alraedy included in the am33x-v6.1 branch of: GitHub - RobertCNelson/bb-kernel

git clone -b am33x-v6.1 https://github.com/RobertCNelson/bb-kernel.git
cd ./bb-kernel/
./build_deb.sh

Regards,

Regards,

RCN
My host computer is Ubuntu 18.04.
dtc --version
Version: DTC 1.4.5
cpp --version
cpp (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0

jak@ws267:~/jktemp2$ git clone -b v6.1.x https://git.beagleboard.org/beagleboard/BeagleBoard-DeviceTrees.git
Cloning into 'BeagleBoard-DeviceTrees'...
remote: Enumerating objects: 15026, done.
remote: Counting objects: 100% (373/373), done.
remote: Compressing objects: 100% (166/166), done.
remote: Total 15026 (delta 201), reused 345 (delta 184), pack-reused 14653
Receiving objects: 100% (15026/15026), 3.31 MiB | 6.11 MiB/s, done.
Resolving deltas: 100% (10035/10035), done.
jak@ws267:~/jktemp2$ cd BeagleBoard-DeviceTrees/
jak@ws267:~/jktemp2/BeagleBoard-DeviceTrees$ make
  DTC     src/arm/am335x-sancloud-bbe.dtb
  DTC     src/arm/am335x-boneblack-uboot-univ.dtb
  DTC     src/arm/omap4-sdp.dtb
  DTC     src/arm/omap3-beagle.dtb
  DTC     src/arm/am335x-bonegreen-gateway.dtb
  DTC     src/arm/am335x-boneblack.dtb
  DTC     src/arm/am335x-boneblack-wireless.dtb
  DTC     src/arm/am335x-boneblack-uboot.dtb
  DTC     src/arm/am335x-sancloud-bbe-extended-wifi.dtb
  DTC     src/arm/am335x-osd3358-sm-red.dtb
  DTC     src/arm/am335x-boneblue.dtb
  DTC     src/arm/omap4-panda-a4.dtb
  DTC     src/arm/omap5-uevm.dtb
  DTC     src/arm/am335x-bone.dtb
  DTC     src/arm/am57xx-beagle-x15-revb1.dtb
  DTC     src/arm/am57xx-beagle-x15.dtb
  DTC     src/arm/am335x-sancloud-bbe-lite.dtb
  DTC     src/arm/omap3-beagle-xm.dtb
  DTC     src/arm/omap4-panda.dtb
  DTC     src/arm/omap3-beagle-xm-ab.dtb
  DTC     src/arm/am57xx-beagle-x15-revc.dtb
  DTC     src/arm/am335x-bonegreen.dtb
  DTC     src/arm/am335x-bonegreen-wireless-uboot-univ.dtb
  DTC     src/arm/am335x-pocketbeagle.dtb
  DTC     src/arm/omap4-panda-es.dtb
  DTC     src/arm/am5729-beagleboneai.dtb
  DTC     src/arm/am335x-bonegreen-wireless.dtb
  DTC     src/arm/overlays/BB-BBGW-WL1835-00A0.dtbo
Error: src/arm/overlays/BB-BBGW-WL1835-00A0.dts:16.1-11 syntax error
FATAL ERROR: Unable to parse input tree
Makefile:219: recipe for target 'src/arm/overlays/BB-BBGW-WL1835-00A0.dtbo' failed
make[1]: *** [src/arm/overlays/BB-BBGW-WL1835-00A0.dtbo] Error 1
Makefile:163: recipe for target 'all_arm' failed
make: *** [all_arm] Error 2

My make fails when trying to build the .dtbo overlay files.
How do I get the overlay files to build?
Thank you,

Feel free to update to Ubuntu 20.04, which has DTC 1.5.0… The BeagleBoard-DeviceTrees project requires DTC 1.4.7 or newer…

Regards,

Hi Robert,

I’ve got the same issue

cpsw 4a100000.ethernet: phy “/ocp/interconnect@4a000000/segment@0/target-module@100000/ethernet@0/mdio@1000/ethernet-phy@0” not found on slave 0

on a couple of rev B boards with 5.4.70-ti-r19, U-Boot version 2019.04-00002. These boards are installed on offshore measuring stations, so having issues with network connectivity is quite disastrous.

I don’t have any experience compiling or setting up U-Boot/custom device trees/… so most of the above conversation goes above my head. However, I am willing to learn if necessary to get my systems back up to a state where they can be relied upon.

It is not completely clear to me which board revisions suffer from this issue and when the newer U-Boot or the cap removal should help. From what I read above (if I understand correctly), this issue shouldn’t even exist with this kernel.

I looked at the schematics and the board and found the C24 cap on the reset line. Would removing this cap help my REV B boards as well?

Thanks for your help,

dieter

Pretty much every boards prior to the RevC3 may show the issue. It’s rare, but still when you have a board it’s an issue… In my CI testing farm for BeagleBoard.org i have a couple dozen boards running 24/7… If a specific board shows the issue, it always has the issue… I haven’t seen any that were good for years all of suddenly stop…

I’d say the biggest issue, our ‘hack’ for the driver only works on 3.14.x → 5.x-ish… TI rewrote the cpsw driver to better support newer devices, and removed the trick our hacked worked with.

So far on testing RevC3 i haven’t found a board that shows the issue… So it seems removing C24 has fixed the main issue. (reminds me, i need to order a few more, to keep up with my random samples per year…)

Side note, i did have one board i tried removing C24, a few months ago as that board wasn’t coming up… However in a brain fart move, i had just rewired my CI enclosure, and i didn’t notice i was one port short… Yeah the Ethernet wasn’t even wired to that board… Anywho, the board still works great, just never needed to remove C24 on it…

Regards,

Ok, a big thanks for that.
So I can either:

  • remove C24 on these REV B boards
  • update the U-Boot version?

Or does updating U-Boot not help anything?

The thing is that, for stations that are not serviced by myself but scientists, I cannot ask them to remove a 0402 (0201?) cap from a pcb. I can make a new image and explain them how to put it on the BBB, so if U-Boot is an option, then that’s the way to go.

With the help from the linked DigiKey page one the BBB, I should be able to get a new version of U-Boot ready and on the boards (at least, if that would help).

Regards,

dieter

There is no U-Boot fix for this. There is a git commit in mainline u-boot that reads the mdio address and patches the device-tree… This is exactly what the hack use to do…

If your board is one of these boards that has the mdio issue, and is running v4.19.x or 5.4.x, don’t upgrade to 5.10.x (in which the hack no longer applies nor does it work…)

Normal board that is fine:

[    2.449113] libphy: Fixed MDIO Bus: probed
[    2.543401] davinci_mdio 4a101000.mdio: detected phy mask fffffffe
[    2.550624] MDIO: davinci_mdio: dt: updated phy_id[0] from phy_mask[fffffffe]
[    2.576572] libphy: 4a101000.mdio: probed

Regards,

Sorry, but I’m a bit confused.

I do have the issue with these REV B boards running 5.4.70, but according to your last message (unless I -likely- misunderstand), I shouldn’t be seeing this issue?