willisNGC_39

Forum Replies Created

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • in reply to: SPI NOR not recognized by u-boot on the OSD3358-SM-RED #9064
    Raymond WilliswillisNGC_39
    Participant

      SPI0 or SPI1 is not initialized from an unedited version of the OSD Debian 9.1 (or any debian OS) used. You have to set it up in the device tree overlay or cape overlay (Cape overlays still work in 9.1 but the Debian OS designers are designing it out, I suggest getting familiar with creating or editing the device tree overlay).

      There’s a nice little quirk I found. If you use the adafruit_BBIO library for SPI (comes with the debian arm OS) in a python script to access SPI, it will auto attach the spi cape overlay to an open and empty attached cape overlay. 4 are initialized when it boots up to add capes when it’s already on.

      in reply to: Device Tree Build Issue #9061
      Raymond WilliswillisNGC_39
      Participant

        You do not need dtb rebuilder. Create your device tree overlay. FYI if you require Ethernet keep CSPW and MAC info in your device tree. To use the driver for a device that comes with OS, just put the correct information in the com/bus declaration. Also, Lesson 2 is designed for debian 9.5 (Kernel 4.14), not OSD 9.1 (Kernel 4.9) provided by Octavo. You can reverse a dtb of 9.1 to a dts to reverse engineer it by using DTC. The device tree is set using really different hexadecimal values and info, nothing like the device tree in Lesson 2. I also noticed an error with the include in the .dts in Lesson2. The include .dtsi is wrong as it shows as #include “osd335x.dtsi” when it should be “osd335x-sm.dtsi”

        Here’s an example from start to finish. Using 9.5 as reference only. I have Debian 9.5 working on the Octavo RED I have for development.

        As an example, the device tree overlay I want to add ADS7828 A/D converter on my I2C2 bus, because the driver comes with Debian package used.

        &12C2{
        #….”already written info”

        ads7828: ads7828@48 {
        compatible = “ti,ads7828”;
        ti, differential-input;
        reg = <0x4b>;
        };
        };

        On a Linux dev device (Ubuntu or Mint, etc)
        1. Copy the Lesson 2 device tree overlay files to the target device using secure copy from Linux dev device:
        $ scp <myfile>.dts debian@192.168.7.2:
        $ scp osd335x-sm.dtsi debian@192.168.7.2:
        # Or if you set the IP address as something else. You can only secure copy files to debian…not root or any other folder.

        2. SSH into your target device in terminal:
        $ ssh debian@192.168.7.2

        3. Move the device tree overlay where is belongs:
        $ sudo cp <myfile>.dts /opt/source/dtb-4.14-ti/src/arm/
        $ sudo cp osd335x-sm.dtsi /opt/source/dtb-4.14-ti/src/arm/

        4. Change directory to make the dtb of your device tree:
        $ cd /opt/source/dtb-4.14-ti/

        5. Your file will likely have a different date created, let’s fix that:
        $ sudo touch src/arm/*
        # This will set all the timestamp of the files to current time, if not you may get clock skew when the dtb is created.

        6. Let’s clean the dtbs and rebuild:
        $ sudo make clean

        7. Now make the dtbs:
        $ sudo make
        # If you get any errors, look at the line number in the error and use: $ sudo nano src/arm/myfile.dts

        8. Almost there, I swear. Move a copy of the dtb created where it belongs:
        $ sudo cp src/arm/<myfile>.dtb /boot/dtbs/4.14.71-ti-r80

        9. Now edit the uEnv.txt file to include your dtb.
        $ sudo nano /boot/uEnv.txt.

        10. Save and reboot. Your device tree should be in use now. If it looks wrong, use $ dmesg to see the bootup debug messages.
        # You should see something somewhere in there that mentions your sensor or device being added into the kernel or hwmon.

        If something isn’t clear or anyone needs more info, reply. Hope this helps, Enjoy!

        • This reply was modified 5 years, 1 month ago by Raymond WilliswillisNGC_39.
        • This reply was modified 5 years, 1 month ago by Raymond WilliswillisNGC_39.
        in reply to: Potential Issue with Lesson 2 – Device Tree Overlays #9060
        Raymond WilliswillisNGC_39
        Participant

          Thanks for the feedback. That pretty much answered my question.

          FYI, by leaving in the CPSW and MAC information in the device tree overlay has Ethernet working again.

          in reply to: Virtual Capes with the Redboard #8438
          Raymond WilliswillisNGC_39
          Participant

            Neeraj,
            Thank you. That works great. I also found you can verify on the Octavo Red what capes are loaded at boot by running the following script.
            $ sudo cat /opt/scripts/tools/version.sh

            in reply to: Flash the emmc of the Octavo Red #8390
            Raymond WilliswillisNGC_39
            Participant

              Mr. Dantu,
              Thank you for your support. Your information worked perfectly and now it is at least in the forums on how to flash the emmc.
              Some notes for anyone else doing this:
              1. After editing the inserting the MicroSD Card being used to flash the new image, hold the boot button before applying power (do not use USB power).
              2. Release the boot button when (LEDs) D1 and D4 thru D7 are all on.
              3. To verify it is flashing the emmc, D4 thru D7 will turn on/off in a sequential pattern during the flash (think Knight Rider or Cylon).
              4. Wait until all LEDs are off or 45 mins has passed (mine took maybe 10 mins).
              5. Remove Power and MicroSD Card.
              6. Comment out the last line in the uEnv.txt file to use it as a MicroSD Card bootable OS.

              If you had any problems and it is not flashing the emmc…ensure you uncommented just the last line and saved your changes for uEnv.txt.

              • This reply was modified 5 years, 5 months ago by Raymond WilliswillisNGC_39.
              in reply to: How to customize device tree? #8382
              Raymond WilliswillisNGC_39
              Participant

                I followed the instructions for the device tree overlay but now can’t communicate to my Octavo Redboard at all. It seems to be stuck in boot up.

                I was trying to do the following:
                -Activate I2C2
                -Activate SPI0
                -Activate mcasp0
                -Include the Sound in kernel to add a tlv320aic31xx Sound Codec.

                I need that SPI0 activated to use for special devices.
                I need the I2C2 and mcasp0 active to try and use a tlv320aic31xx development board. I want to put sound out to the codec to be amplified and cannot use the HDMI port to do this.
                I believe the codec has to be added to the kernel layers but the above sound codec seems to have been incorporated before and was just removed for the Redboard. So I did not remove it form the modified device tree and performed all the steps, including modifying the uEnv.txt file. If needed, I can add my modified files.

              Viewing 6 posts - 1 through 6 (of 6 total)