Device Tree Rebuilder

Forums Devices OSD335x-SM Device Tree Rebuilder

Viewing 17 reply threads
  • Author
    Posts
    • #5842
      Dusty
      Participant

        Hello,

        I followed the instructions in the “OSD335x Lesson 2: Linux Device Tree” App Note to modify and rebuild our custom board device tree.

        I ran into this issue when trying to compile using Robert Nelson’s Device Tree Rebuilder:

        dusty@dusty-VirtualBox:/media/dusty/rootfs/tmp/dtb-rebuilder-4.4-ti$ sudo make src/arm/WV_OSD3358-SM__066.dtb
          DTC     src/arm/WV_OSD3358-SM__066.dtb
        Error: src/arm/am335x-osd335x-sm.dtsi:1399.17-18 syntax error
        FATAL ERROR: Unable to parse input tree
        Makefile:148: recipe for target 'src/arm/WV_OSD3358-SM__066.dtb' failed
        make[1]: *** [src/arm/WV_OSD3358-SM__066.dtb] Error 1
        Makefile:112: recipe for target 'src/arm/WV_OSD3358-SM__066.dtb' failed
        make: *** [src/arm/WV_OSD3358-SM__066.dtb] Error 2
        dusty@dusty-VirtualBox:/media/dusty/rootfs/tmp/dtb-rebuilder-4.4-ti$

        Attached are the two input files located in the /src/arm/ folder.

        What am I doing wrong?

        Thank you,
        Dusty

        • This topic was modified 6 years, 9 months ago by Dusty.
      • #5849
        Eshtaartha Basu
        Moderator

          Hello Dusty,

          It looks like you’re using v4.17 OSD335x Device Tree files. These files are incompatible with v4.4 dtb-rebuilder. To get around this problem, you should use v4.4 OSD335x Device Tree files.

          You can get them here: https://github.com/octavosystems/OSD335x-Device-Tree/tree/v4.4.

          You can also manually navigate to this page on our Github Device Tree page by clicking on “Branches” drop down menu > Tags > v4.4. I’ll soon update the Lesson 2 webpages to directly point to this version.

          While going through your device tree files, I found few other issues that you will have to fix once you get around the version problem.

          1. In line 139 of WV_OSD3358-SM__066.dts, small brackets “( )” are not allowed as part of node names. This will lead to syntax error (Check Table 2.2 of Device Tree Spec v0.2 for all the allowed characters).

          2. In the same file, there are references to the following non-existent nodes/labels which will lead to invalid reference error:

          mmc1_pins

          emmc_pins

          cpsw_default

          cpsw_sleep

          davinci_mdio_sleep

          Also, make sure all the new pin muxing nodes you’ve added are properly referenced/used by suitable nodes to make sure your hardware operates as intended.

          Please let us know if you have any other questions.

        • #5850
          Dusty
          Participant

            Thank you Eshtaartha.

            I included the osd335x-sm.dtsi file you referenced and (believe) I fixed the invalid references.

            Please see error message below…  did I miss something? Attached are the two input files used.

            Thank you,
            Dusty

             

            dusty@dusty-VirtualBox:/media/dusty/rootfs/tmp/dtb-rebuilder-4.4-ti$ sudo make src/arm/WV_OSD3358-SM__066.dtb
            [sudo] password for dusty: 
              DTC     src/arm/WV_OSD3358-SM__066.dtb
            In file included from src/arm/WV_OSD3358-SM__066.dts:11:0:
            src/arm/osd335x-sm.dtsi:1330:10: fatal error: dt-bindings/mfd/tps65217.h: No such file or directory
             #include dt-bindings/mfd/tps65217.h
                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
            compilation terminated.
            Makefile:148: recipe for target 'src/arm/WV_OSD3358-SM__066.dtb' failed
            make[1]: *** [src/arm/WV_OSD3358-SM__066.dtb] Error 1
            Makefile:112: recipe for target 'src/arm/WV_OSD3358-SM__066.dtb' failed
            make: *** [src/arm/WV_OSD3358-SM__066.dtb] Error 2
            dusty@dusty-VirtualBox:/media/dusty/rootfs/tmp/dtb-rebuilder-4.4-ti$

             

            • This reply was modified 6 years, 9 months ago by Dusty.
            • This reply was modified 6 years, 9 months ago by Dusty.
          • #5856
            Eshtaartha Basu
            Moderator

              Hello Dusty,

              Could you please tell me which Debian image you’re using (RED Debian image or one of the BeagleBoard Debian images)?

              This will help me use the same kernel version while debugging this problem so that I can give you the right solution.

               

            • #5857
              Dusty
              Participant

                Hello Eshtaartha,

                on the uSD card is the latest “bone-debian-9.4-iot-armhf-2018-06-17-4gb” image, and the host computer (where the SD card is inserted in) runs Ubuntu 18.04 LTS.

                Thank you,
                Dusty

                 

              • #5859
                Eshtaartha Basu
                Moderator

                  Thanks Dusty. I’m currently working on resolving your issue and will get back to you shortly.

                • #5880
                  Eshtaartha Basu
                  Moderator

                    Dusty,

                    We apologize for the inconvenience.  During our most recent update, we had modified all of the device tree files so that they could be built under the mainline Linux build flow.  Unfortunately, we did not also make sure that they were able to be used within the dtb_rebuilder mentioned in the tutorials.  We have now posted a version of the device tree files that can be used in the dtb_rebuilder.  You can find them here:

                    https://github.com/octavosystems/OSD335x-Device-Tree

                    I was able to successfully build your custom device tree file (WV_OSD3358-SM__066.dts) after pairing it with the new tested .dtsi file (osd335x-sm.dtsi) and making the following changes:

                    a. I corrected an improper reference to “pruss” node (have added comment in file to indicate the same).

                    b. I commented out a reference to non-existent node “emmc_pins” (have added comment in file to indicate the same).

                    I was also able to login to Debian (I used the latest BeagleBoard Debian Image 9.4 LXQT) using WV_OSD3358-SM__066.dtb. 

                    Before making further modifications to your device tree files, I would suggest building the files I’ve sent on your setup to make sure you have a good starting point. 

                    Please let us know if you have any other questions.

                    Attachments:
                  • #5883
                    Dusty
                    Participant

                      Hello Eshtaartha, thank you very much for following up!

                      I was also able to build my dtb, using both dts and dtsi files you attached to your last response.

                      Here’s the output:

                      dusty@dusty-VirtualBox:/media/dusty/rootfs/tmp/dtb-rebuilder-4.4-ti$ sudo make src/arm/WV_OSD3358-SM__066.dtb
                        DTC     src/arm/WV_OSD3358-SM__066.dtb
                      src/arm/WV_OSD3358-SM__066.dtb: Warning (unit_address_format): Node /ocp/epwmss@48300000/eqep@0x48300180 unit name should not have leading "0x"
                      src/arm/WV_OSD3358-SM__066.dtb: Warning (unit_address_format): Node /ocp/epwmss@48302000/eqep@0x48302180 unit name should not have leading "0x"
                      src/arm/WV_OSD3358-SM__066.dtb: Warning (unit_address_format): Node /ocp/epwmss@48304000/eqep@0x48304180 unit name should not have leading "0x"
                      src/arm/WV_OSD3358-SM__066.dtb: Warning (simple_bus_reg): Node /ocp/l4_wkup@44c00000/scm@210000/clockdomains missing or empty reg/ranges property
                      src/arm/WV_OSD3358-SM__066.dtb: Warning (simple_bus_reg): Node /ocp/mailbox@480C8000 simple-bus unit address format error, expected "480c8000"
                      src/arm/WV_OSD3358-SM__066.dtb: Warning (simple_bus_reg): Node /ocp/pruss@4a300000 missing or empty reg/ranges property
                      src/arm/WV_OSD3358-SM__066.dtb: Warning (simple_bus_reg): Node /ocp/mcasp@4803C000 simple-bus unit address format error, expected "4803c000"
                      src/arm/WV_OSD3358-SM__066.dtb: Warning (phys_property): Missing property '#phy-cells' in node /ocp/usb@47400000/usb-phy@47401300 or bad phandle (referred from /ocp/usb@47400000/usb@47401000:phys[0])
                      src/arm/WV_OSD3358-SM__066.dtb: Warning (phys_property): Missing property '#phy-cells' in node /ocp/usb@47400000/usb-phy@47401b00 or bad phandle (referred from /ocp/usb@47400000/usb@47401800:phys[0])
                      dusty@dusty-VirtualBox:/media/dusty/rootfs/tmp/dtb-rebuilder-4.4-ti$

                      Interesting, my dtb has a different file size than yours (47kb vs 50kb).

                      I attach the dtb I built, as well as the boot log when booting the OSD3358-SM with your dtb vs. mine.

                      My uEnv.txt is also attached.

                      Thank you again for the great support!
                      Dusty

                      Attachments:
                    • #5897
                      Eshtaartha Basu
                      Moderator

                        Hello Dusty,

                        You’re welcome. I’m glad you were able to build the device tree on your setup.

                        I built your dtb on my development board (OSD3358-RED) running latest Debian 9.4. I did not get any warnings. I believe your compiler version is different from mine since you’re  using dtb-rebuilder on Ubuntu.

                        All BeagleBoard images and RED image come with a “dtc” (Device Tree Compiler). You can find it under /usr/bin of BeagleBoard Debian image or RED image. dtb-rebuilder uses this compiler to compile your dts into dtb. I don’t know which version of dtc you’ve installed on your Ubuntu machine (Keep in mind that dtb-rebuilder does not come with a dtc).

                        I would recommend copying dtb-rebuilder (or you could just clone the git repo) directly to one of the directories of your dev board (hope you have one of BeagleBoards or RED board) running Debian 9.4 and building device tree files directly on the dev board as described in Device Tree article. This should resolve the warnings.

                      • #5898
                        Dusty
                        Participant

                          Thanks a lot, Eshtaartha.

                          I have it now all locally on a PocketBeagle with the latest official beagleboard 9.4 debian image and dtb-rebuilder-4.4-ti, but run into ‘permission denied’ issues when trying to build the dtb:

                          debian@beaglebone:~/dtb-rebuilder-4.4-ti$ sudo make src/arm/WV_OSD3358-SM__066.dtb
                          [sudo] password for debian:
                          make[1]: Warning: File 'src/arm/WV_OSD3358-SM__066.dts' has modification time 1230980 s in the future
                            DTC     src/arm/WV_OSD3358-SM__066.dtb
                          /bin/sh: 1: scripts/basic/fixdep: Permission denied
                          Makefile:148: recipe for target 'src/arm/WV_OSD3358-SM__066.dtb' failed
                          make[1]: *** [src/arm/WV_OSD3358-SM__066.dtb] Error 126
                          Makefile:112: recipe for target 'src/arm/WV_OSD3358-SM__066.dtb' failed
                          make: *** [src/arm/WV_OSD3358-SM__066.dtb] Error 2
                          debian@beaglebone:~/dtb-rebuilder-4.4-ti$
                          

                          I tried with root permission and moved it to different locations, but can’t figure out the ‘permission denied’ issue yet.

                          I know, it’s not related to the original issue, but I wanted to let you know why I haven’t confirmed success with building the custom dtb yet…

                          Best regards,
                          Dusty

                           

                        • #5899
                          Eshtaartha Basu
                          Moderator

                            Hello Dusty,

                            It is better to always keep the “dtb-rebuilder” at home directory ( /home/debian ) to avoid permission issues. The permissions on some of your files might have gotten altered when you copied dtb-rebuilder to PocketBeagle. Check the file permissions of fixdep file by running ls -l command in /dtb-rebuilder-4.4-ti/scripts/basic directory. The permissions for this file should be 755 (-rwxr-xr-x). If you have something different, change the permissions using chmod.

                            Also, resolve time skew warnings by running make clean command in /dtb-rebuilder-4.4-ti directory. If that doesn’t fix it, run the touch * command in the dtb-rebuilder directory and the dtb-rebuilder/src, dtb-rebuilder/src/arm sub-directories to update the file modification time of all files to resolve the warning.

                          • #5900
                            Dusty
                            Participant

                              Yes Sir, thank you again. This did help to fix the permissions issue.

                              The dtb compiled without warnings.

                              The boot process on the custom board using the just built dtb got stuck in the “RNDIS – The remote end did not respond in time” (log attached), so next up is verifying the Device Tree for correctness, and the boot configuration (set to [4:0] 11100, booting from uSD at MMC0).

                              Thanks again!
                              Dusty

                              Attachments:
                            • #5904
                              Dusty
                              Participant

                                Sorry – can’t edit the previous post. Looks like the uEnv.txt was corrupted. Now it boots with the custom dtb (see log below).

                                Looks like we need to debug eth0 (KSZ9031 gbit PHY) next…

                                Thanks again for your help!
                                Dusty

                                U-Boot SPL 2018.03-00002-gac9cce7c6a (Apr 05 2018 - 13:07:46 -0500)
                                Trying to boot from MMC1
                                Loading Environment from EXT4... ** File not found /boot/uboot.env **
                                
                                ** Unable to read "/boot/uboot.env" from mmc0:1 **
                                Failed (-5)
                                
                                
                                U-Boot 2018.03-00002-gac9cce7c6a (Apr 05 2018 - 13:07:46 -0500), Build: jenkins-github_Bootloader-Builder-47
                                
                                CPU  : AM335X-GP rev 2.1
                                I2C:   ready
                                DRAM:  512 MiB
                                No match for driver 'omap_hsmmc'
                                No match for driver 'omap_hsmmc'
                                Some drivers were not found
                                Reset Source: Power-on reset has occurred.
                                RTC 32KCLK Source: External.
                                MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
                                Loading Environment from EXT4... ** File not found /boot/uboot.env **
                                
                                ** Unable to read "/boot/uboot.env" from mmc0:1 **
                                Failed (-5)
                                Board: BeagleBone Black
                                Model: Octavo Systems OSD3358-SM-RED
                                 not set. Validating first E-fuse MAC
                                BeagleBone Black:
                                Model: Octavo Systems OSD3358-SM-RED:
                                BeagleBone: cape eeprom: i2c_probe: 0x54:
                                BeagleBone: cape eeprom: i2c_probe: 0x55:
                                BeagleBone: cape eeprom: i2c_probe: 0x56:
                                BeagleBone: cape eeprom: i2c_probe: 0x57:
                                Net:   eth0: MII MODE
                                Could not get PHY for cpsw: addr 0
                                cpsw, usb_ether
                                Press SPACE to abort autoboot in 2 seconds
                                board_name=[OS00] ...
                                switch to partitions #0, OK
                                mmc0 is current device
                                SD/MMC found on device 0
                                ** Bad device 0:2 0x82000000 **
                                ** Bad device 0:2 0x82000000 **
                                switch to partitions #0, OK
                                mmc0 is current device
                                Scanning mmc 0:1...
                                gpio: pin 56 (gpio 56) value is 0
                                gpio: pin 55 (gpio 55) value is 0
                                gpio: pin 54 (gpio 54) value is 0
                                gpio: pin 53 (gpio 53) value is 1
                                switch to partitions #0, OK
                                mmc0 is current device
                                gpio: pin 54 (gpio 54) value is 1
                                Checking for: /uEnv.txt ...
                                Checking for: /boot.scr ...
                                Checking for: /boot/boot.scr ...
                                Checking for: /boot/uEnv.txt ...
                                gpio: pin 55 (gpio 55) value is 1
                                2107 bytes read in 41 ms (49.8 KiB/s)
                                Loaded environment from /boot/uEnv.txt
                                debug: [dtb=WV_OSD3358-SM__066.dtb] ...
                                Using: dtb=WV_OSD3358-SM__066.dtb ...
                                Checking if uname_r is set in /boot/uEnv.txt...
                                gpio: pin 56 (gpio 56) value is 1
                                Running uname_boot ...
                                loading /boot/vmlinuz-4.14.49-ti-r54 ...
                                10453504 bytes read in 692 ms (14.4 MiB/s)
                                uboot_overlays: dtb=WV_OSD3358-SM__066.dtb in /boot/uEnv.txt, unable to use [uboot_base_dtb=am335x-boneblack-uboot-univ.dtb] ...
                                loading /boot/dtbs/4.14.49-ti-r54/WV_OSD3358-SM__066.dtb ...
                                50726 bytes read in 154 ms (321.3 KiB/s)
                                uboot_overlays: [fdt_buffer=0x60000] ...
                                uboot_overlays: loading /lib/firmware/M-BB-OSD3358-SM-RED-00A0.dtbo ...
                                794 bytes read in 443 ms (1000 Bytes/s)
                                uboot_overlays: loading /lib/firmware/BB-BONE-eMMC1-01-00A0.dtbo ...
                                1440 bytes read in 298 ms (3.9 KiB/s)
                                uboot_overlays: loading /lib/firmware/BB-HDMI-TDA998x-00A0.dtbo ...
                                5127 bytes read in 403 ms (11.7 KiB/s)
                                uboot_overlays: loading /lib/firmware/BB-ADC-00A0.dtbo ...
                                711 bytes read in 462 ms (1000 Bytes/s)
                                uboot_overlays: loading /lib/firmware/AM335X-PRU-RPROC-4-14-TI-00A0.dtbo ...
                                3513 bytes read in 324 ms (9.8 KiB/s)
                                loading /boot/initrd.img-4.14.49-ti-r54 ...
                                4034122 bytes read in 293 ms (13.1 MiB/s)
                                debug: [console=ttyO0,115200n8 root=/dev/mmcblk0p1 ro rootfstype=ext4 rootwait coherent_pool=1M net.ifnames=0 quiet] ...
                                debug: [bootz 0x82000000 0x88080000:3d8e4a 88000000] ...
                                ## Flattened Device Tree blob at 88000000
                                   Booting using the fdt blob at 0x88000000
                                   Loading Ramdisk to 8fc27000, end 8ffffe4a ... OK
                                   reserving fdt memory region: addr=88000000 size=6f000
                                   Loading Device Tree to 8fbb5000, end 8fc26fff ... OK
                                
                                Starting kernel ...
                                
                                [    0.000736] timer_probe: no matching timers found
                                [    0.536567] dmi: Firmware registration failed.
                                [    1.019244] wkup_m3_ipc 44e11324.wkup_m3_ipc: could not get rproc handle
                                [    1.148713] cpu cpu0: "syscon" is missing, cannot use OPPv2 table.
                                [    1.268650] omap_voltage_late_init: Voltage driver support not added
                                [    1.315400] tda998x 0-0070: Error -121 writing to cec:0xff
                                [    1.321101] tda998x 0-0070: set_page 000a err -121
                                [    1.383432] tda998x 0-0070: set_page 000a err -121
                                [    1.447383] tda998x 0-0070: set_page 0001 err -121
                                [    1.452295] tda998x 0-0070: set_page 0001 err -121
                                [    1.457206] tda998x 0-0070: set_page 0200 err -121
                                [    1.462112] tda998x 0-0070: set_page 0201 err -121
                                [    1.467011] tda998x 0-0070: set_page 0202 err -121
                                [    1.471916] tda998x 0-0070: set_page 0203 err -121
                                [    1.476820] tda998x 0-0070: set_page 0204 err -121
                                [    1.481723] tda998x 0-0070: set_page 0205 err -121
                                [    1.486626] tda998x 0-0070: set_page 020e err -121
                                [    1.491528] tda998x 0-0070: set_page 0211 err -121
                                [    1.496432] tda998x 0-0070: set_page 0207 err -121
                                [    1.501334] tda998x 0-0070: set_page 0208 err -121
                                [    1.506235] tda998x 0-0070: set_page 0209 err -121
                                [    1.511136] tda998x 0-0070: set_page 020a err -121
                                [    1.516037] tda998x 0-0070: set_page 0206 err -121
                                [    1.520938] tda998x 0-0070: set_page 0027 err -121
                                [    1.525839] tda998x 0-0070: set_page 0000 err -121
                                [    1.530741] tda998x 0-0070: set_page 0002 err -121
                                [    1.535815] tilcdc 4830e000.lcdc: failed to bind 0-0070 (ops tda998x_ops): -6
                                [    8.933556] libphy: PHY 4a101000.mdio:04 not found
                                [    8.959476] net eth0: phy "4a101000.mdio:04" not found on slave 0, err -19
                                [   14.677185] libphy: PHY 4a101000.mdio:04 not found
                                [   14.727673] net eth0: phy "4a101000.mdio:04" not found on slave 0, err -19
                                
                                Debian GNU/Linux 9 beaglebone ttyS0
                                
                                BeagleBoard.org Debian Image 2018-06-17
                                
                                Support/FAQ: http://elinux.org/Beagleboard:BeagleBoneBlack_Debian
                                
                                default username:password is [debian:temppwd]
                                
                                beaglebone login:
                                

                                 

                              • #5912
                                Eshtaartha Basu
                                Moderator

                                  Hello Dusty,

                                  You’re welcome.

                                  Make sure there are no issues in the custom pin muxing and device tree bindings in your custom device tree. Have you checked if phy_id is correct on your device tree? Your ethernet PHY (KSZ9031) has 3 address pins: 35, 15 and 17. I don’t know what these are set to on your board. But, make sure it matches your phy_id. 

                                  For example, in the RED device tree, phy_id is as follows:

                                  phy_id = <&davinci_mdio>, <4>;

                                  It is set to “4” because the phy_addr pins of our Eth PHY are set to “4” in RED hardware. Also make sure your Eth PHY is powered up properly and not held in reset.

                                  You can also use dmesg command and kernel log ( /var/log/kern.log ) to better debug your design and quickly find the source of the problem.

                                   

                                • #5946
                                  Dusty
                                  Participant

                                    Thank you Eshtaartha.

                                    The PHYAD[2:0] strap-in options are set in hardware to 001b.

                                    In the dts I have used phy addr 1 at emac0:

                                    &mac {
                                    	slaves = <1>;
                                    	active_slave = <0>;  // select emac0
                                    	pinctrl-names = "default", "sleep";
                                    	pinctrl-0 = <&cpsw_default>;
                                    	pinctrl-1 = <&cpsw_sleep>;
                                    
                                    	status = "okay";
                                    };
                                    
                                    
                                    &davinci_mdio {
                                    	pinctrl-names = "default", "sleep";
                                    	pinctrl-0 = <&davinci_mdio_default>;
                                    	pinctrl-1 = <&davinci_mdio_sleep>;
                                    
                                    	status = "okay";
                                    };
                                    
                                    
                                    &cpsw_emac0 {
                                    	phy_id = <&davinci_mdio>, <1>;  // select phy address 1
                                    	phy-mode = "rgmii-txid";
                                    };

                                    Interesting part is that the PHY seems to be detected

                                    [    1.107314] davinci_mdio 4a101000.mdio: davinci mdio revision 1.6, bus freq 1000000
                                    [    1.107330] davinci_mdio 4a101000.mdio: detected phy mask fffffffd
                                    [    1.121731] libphy: 4a101000.mdio: probed
                                    [    1.121760] davinci_mdio 4a101000.mdio: phy[1]: device 4a101000.mdio:01, driver Micrel KSZ9031 Gigabit PHY
                                    [    1.122759] cpsw 4a100000.ethernet: Detected MACID = 98:5d:ad:4e:ab:fd
                                    [    1.122867] cpsw 4a100000.ethernet: initialized cpsw ale version 1.4
                                    [    1.122877] cpsw 4a100000.ethernet: ALE Table size 1024
                                    [    1.122917] cpsw 4a100000.ethernet: cpts: overflow check period 1250 (jiffies)
                                    

                                    but still fails to load properly

                                    [    9.032486] net eth0: initializing cpsw version 1.12 (0)
                                    [    9.034143] libphy: PHY 4a101000.mdio:04 not found
                                    [    9.055525] net eth0: phy "4a101000.mdio:04" not found on slave 0, err -19
                                    [    9.102887] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
                                    [   12.505488] nf_conntrack version 0.5.0 (8192 buckets, 32768 max)
                                    [   13.915683] using random self ethernet address
                                    [   13.915703] using random host ethernet address
                                    [   14.103888] net eth0: initializing cpsw version 1.12 (0)
                                    [   14.105546] libphy: PHY 4a101000.mdio:04 not found
                                    [   14.152930] using random self ethernet address
                                    [   14.152939] using random host ethernet address
                                    [   14.171795] net eth0: phy "4a101000.mdio:04" not found on slave 0, err -19
                                    [   14.261069] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
                                    

                                    Wondering why it is trying to find the PHY at addr 4, although I have specified 1?

                                    Since you mentioned the RED uses addr 4…  following the app note, I programmed the board ID to being an Octavo Systems OSD3358-SM-RED board

                                    AA 55 33 EE  41 33 33 35  42 4E 4C 54  4F 53 30 30  .U3.A335BNLTOS00
                                    00 00 00 00  00 00 00 00  00 00 00 00  FF FF FF FF  ................

                                    Suspecting this to be the issue, I reprogrammed the board ID to the BeagleLogic Standalone, which uses the same PHY at the same address (https://github.com/RobertCNelson/omap-image-builder)

                                    => i2c md 0x50 0x00.2 20
                                    0000: aa 55 33 ee 41 33 33 35 42 4c 47 43 30 30 30 41    .U3.A335BLGC000A

                                    Now the boot process stalls at ‘Starting Kernel…’

                                    U-Boot 2018.03-00002-gac9cce7c6a (Apr 05 2018 - 13:07:46 -0500), Build: jenkins-github_Bootloader-Builder-47
                                    
                                    CPU  : AM335X-GP rev 2.1
                                    I2C:   ready
                                    DRAM:  512 MiB
                                    No match for driver 'omap_hsmmc'
                                    No match for driver 'omap_hsmmc'
                                    Some drivers were not found
                                    Reset Source: Power-on reset has occurred.
                                    RTC 32KCLK Source: External.
                                    MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
                                    Loading Environment from EXT4... ** File not found /boot/uboot.env **
                                    
                                    ** Unable to read "/boot/uboot.env" from mmc0:1 **
                                    Failed (-5)
                                    Model: BeagleLogic
                                     not set. Validating first E-fuse MAC
                                    Net:   eth0: MII MODE
                                    Could not get PHY for cpsw: addr 0
                                    cpsw, usb_ether
                                    Press SPACE to abort autoboot in 2 seconds
                                    board_name=[A335BLGC] ...
                                    switch to partitions #0, OK
                                    mmc0 is current device
                                    SD/MMC found on device 0
                                    ** Bad device 0:2 0x82000000 **
                                    ** Bad device 0:2 0x82000000 **
                                    switch to partitions #0, OK
                                    mmc0 is current device
                                    Scanning mmc 0:1...
                                    gpio: pin 56 (gpio 56) value is 0
                                    gpio: pin 55 (gpio 55) value is 0
                                    gpio: pin 54 (gpio 54) value is 0
                                    gpio: pin 53 (gpio 53) value is 1
                                    switch to partitions #0, OK
                                    mmc0 is current device
                                    gpio: pin 54 (gpio 54) value is 1
                                    Checking for: /uEnv.txt ...
                                    Checking for: /boot.scr ...
                                    Checking for: /boot/boot.scr ...
                                    Checking for: /boot/uEnv.txt ...
                                    gpio: pin 55 (gpio 55) value is 1
                                    2107 bytes read in 42 ms (48.8 KiB/s)
                                    Loaded environment from /boot/uEnv.txt
                                    debug: [dtb=WV_OSD3358-SM__066.dtb] ...
                                    Using: dtb=WV_OSD3358-SM__066.dtb ...
                                    Checking if uname_r is set in /boot/uEnv.txt...
                                    gpio: pin 56 (gpio 56) value is 1
                                    Running uname_boot ...
                                    loading /boot/vmlinuz-4.14.49-ti-r54 ...
                                    10453504 bytes read in 691 ms (14.4 MiB/s)
                                    loading /boot/dtbs/4.14.49-ti-r54/WV_OSD3358-SM__066.dtb ...
                                    51190 bytes read in 155 ms (322.3 KiB/s)
                                    uboot_overlays: [fdt_buffer=0x60000] ...
                                    uboot_overlays: loading /lib/firmware/AM335X-PRU-RPROC-4-14-TI-00A0.dtbo ...
                                    3513 bytes read in 323 ms (9.8 KiB/s)
                                    loading /boot/initrd.img-4.14.49-ti-r54 ...
                                    4034122 bytes read in 293 ms (13.1 MiB/s)
                                    debug: [console=ttyO4,115200n8 root=/dev/mmcblk0p1 ro rootfstype=ext4 rootwait coherent_pool=1M net.ifnames=0 quiet] ...
                                    debug: [bootz 0x82000000 0x88080000:3d8e4a 88000000] ...
                                    ## Flattened Device Tree blob at 88000000
                                       Booting using the fdt blob at 0x88000000
                                       Loading Ramdisk to 8fc27000, end 8ffffe4a ... OK
                                       reserving fdt memory region: addr=88000000 size=6e000
                                       Loading Device Tree to 8fbb6000, end 8fc26fff ... OK
                                    
                                    Starting kernel ...

                                    If I abort autoboot, I can talk to the PHY at address 1 through mii commands so I don’t suspect an MDIO issue talking to the PHY.

                                    Can the board ID be the problem?

                                    Thank you again,
                                    Dusty

                                     

                                     

                                     

                                     

                                     

                                    • This reply was modified 6 years, 8 months ago by Dusty.
                                    Attachments:
                                  • #5949
                                    Eshtaartha Basu
                                    Moderator

                                      Hello Dusty,

                                      It doesn’t look like there is anything wrong with your Device Tree. I think it is better if you do a clean re-build of your dtb and also re-flash your SD card and/or eMMC with a clean image and try again. If the problem persists, you can try probing the MDIO lines and observing the signals.

                                      On researching about KSZ9031 PHY online, I found a couple of discussions of TI forum which talk about issues that are very similar to what you’re facing. Looks like many people have faced the same issue with this particular PHY:

                                      1. https://e2e.ti.com/support/arm/sitara_arm/f/791/t/488807?Micrel-9031-on-Phy-address-0x0-is-not-working- (Pay attention go Biser Gatchev-XID’s comments)

                                      2. https://e2e.ti.com/support/arm/sitara_arm/f/791/t/182794 (Check if any of the recommendations done by Mugunthan V N applies to your case)

                                      This may be a reset timing issue as explained by Biser. If your current setup supports external control of PHY’s reset pin, I would suggest experimenting with it. Also, try experimenting with PHY address by changing it to 0, 2,3 or 4 (although your PHY is on 1) as done by the person from forum post (1) above.

                                    • #5951
                                      Dusty
                                      Participant

                                        Thanks Eshtaartha.

                                        I’m aware of the posts and have checked most of it, but I will make a brand new card/build and go over everything again at this point…

                                        Just to make sure: Once the boot process gets past the board ID check (and loads the beagleboard image), the device tree will ‘override’ the board/device configuration. Means, the board ID programmed into the EEPROM doesn’t really matter (whether it’s the RED or BBB or anything else) as long as the image loads, only the custom DTB does in terms of device configuration, is that correct?

                                        Also, in general, for a custom board, would you recommend to work off of the beagleboard.org image or rather using the TI SDK (http://www.ti.com/tool/PROCESSOR-SDK-AM335X)?

                                        Thanks,
                                        Dusty

                                      • #6019
                                        Eshtaartha Basu
                                        Moderator

                                          Hello Dusty,

                                          The Board ID continues to matter as long as U-Boot is in control (i.e., even after the Board ID check). Because, the Board ID not only helps U-Boot choose the right “dtb” but also affects other U-Boot environment variables. You can understand this better if you go through the U-Boot patch code that helps you bypass Board ID check. The patches make sure U-Boot boot process continues normally even without the Board ID. From the code you should be able to infer the other uses of Board-ID:

                                          https://rcn-ee.com/repos/git/u-boot-patches/v2018.03/0001-am335x_evm-uEnv.txt-bootz-n-fixes.patch

                                          https://rcn-ee.com/repos/git/u-boot-patches/v2018.03/0002-U-Boot-BeagleBone-Cape-Manager.patch

                                          OSD335x EEPROM During Boot (https://octavosystems.com/app_notes/osd335x-eeprom-during-boot/) gives you more information about the usage of the above patches.

                                          Both BeagleBoard Debian images and TI SDK are fine for development but we do not know the status of development/support for TI SDK. But, we do know that the BeagleBoard Debian is being actively developed, maintained and supported.

                                           

                                      Viewing 17 reply threads
                                      • You must be logged in to reply to this topic.
                                      chatsimple