Closed parzival2 closed 3 years ago
Hi @parzival2 please grab this image:
Then set, in /boot/uEnv.txt
dtb=am335x-boneblack-roboticscape.dtb
Overlays need to be disabled with this cape..
Regards,
Thanks for the input. Is there any possibility that I can get away with using an overlay? Is the software problem or is it because of the Hardware and we can't do anything about it? I am asking because I want to try out new Kernel versions, but the Device tree sources are only available for 4.14 and 4.19 versions here. Do you think the Device tree sources are compatible with newer Linux versions? I tried compiling them with the newer versions but had some build errors. I also want to try out the Yocto builds as I can customize the OS.
@parzival2 and generic overlay would have to be rewritten..
As far as why it's not in any tree other then v4.14.x/v4.19.x, feel free to do a pull request. ;) I'll gladly merge it.. Just because i don't use it day to day, doesn't mean other's don't!
Regards,
@parzival2 and generic overlay would have to be rewritten..
As far as why it's not in any tree other then v4.14.x/v4.19.x, feel free to do a pull request. ;) I'll gladly merge it.. Just because i don't use it day to day, doesn't mean other's don't!
Regards,
Thanks. That was good to hear that it is possible to write an overlay for that board. I am interested to learn and make a PR for it. I worked on it a bit and came to know that the DTB files in 4.19 are not compatible with the newer versions(5.4 and so on). I tried to compile them by checking out the newer version of Linux( I tried 5.4 and 5.10) and they had some build problems but I solved them looking at the videos of how the DTS file should be written and how it works. Here is the solution that I came up with if any one is interested.
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- am335x-boneblack-roboticscape.dtb
for the above command to work, we need to modify the Makefile
in the /arch/arm/boot/dts
folder in the Linux Kernel.
dtb-$(CONFIG_SOC_AM33XX) += \
am335x-boneblack-roboticscape.dtb \
We have to add the DTS file that we are trying to compile so that it will be switched on when the particular SOC is switched on using the defconfig
. I used the bb.org_defconfig
to generate the configuration for the Beaglebone.
The compilation failed due to some missing elements in am33xx.dts
file. Those are particularly related to eqep
and pruss
subsystems.
So I copied and pasted carefully the lines related to PRUSS subsystem to the am33xx.dtsi
file
pruss_soc_bus: pruss-soc-bus@4a326004 {
compatible = "ti,am3356-pruss-soc-bus";
reg = <0x4a326004 0x4>;
ti,hwmods = "pruss";
#address-cells = <1>;
#size-cells = <1>;
ranges;
status = "disabled";
pruss: pruss@4a300000 {
compatible = "ti,am3356-pruss";
reg = <0x4a300000 0x80000>;
interrupts = <20 21 22 23 24 25 26 27>;
interrupt-names = "host2", "host3", "host4",
"host5", "host6", "host7",
"host8", "host9";
#address-cells = <1>;
#size-cells = <1>;
ranges;
status = "disabled";
pruss_mem: memories@4a300000 {
reg = <0x4a300000 0x2000>,
<0x4a302000 0x2000>,
<0x4a310000 0x3000>;
reg-names = "dram0", "dram1",
"shrdram2";
};
pruss_cfg: cfg@4a326000 {
compatible = "syscon";
reg = <0x4a326000 0x2000>;
};
pruss_iep: iep@4a32e000 {
compatible = "syscon";
reg = <0x4a32e000 0x31c>;
};
pruss_mii_rt: mii-rt@4a332000 {
compatible = "syscon";
reg = <0x4a332000 0x58>;
};
pruss_intc: interrupt-controller@4a320000 {
compatible = "ti,am3356-pruss-intc";
reg = <0x4a320000 0x2000>;
interrupt-controller;
#interrupt-cells = <1>;
};
pru0: pru@4a334000 {
compatible = "ti,am3356-pru";
reg = <0x4a334000 0x2000>,
<0x4a322000 0x400>,
<0x4a322400 0x100>;
reg-names = "iram", "control", "debug";
firmware-name = "am335x-pru0-fw";
interrupt-parent = <&pruss_intc>;
interrupts = <16>, <17>;
interrupt-names = "vring", "kick";
};
pru1: pru@4a338000 {
compatible = "ti,am3356-pru";
reg = <0x4a338000 0x2000>,
<0x4a324000 0x400>,
<0x4a324400 0x100>;
reg-names = "iram", "control", "debug";
firmware-name = "am335x-pru1-fw";
interrupt-parent = <&pruss_intc>;
interrupts = <18>, <19>;
interrupt-names = "vring", "kick";
};
pruss_mdio: mdio@4a332400 {
compatible = "ti,davinci_mdio";
reg = <0x4a332400 0x90>;
clocks = <&dpll_core_m4_ck>;
clock-names = "fck";
bus_freq = <1000000>;
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
};
};
};
Other missing elements are in am33xx-l4.dtsi
. I also copy pasted them following the other identical elements in the
epwmss
subsystems.
eqep0: eqep@180 {
compatible = "ti,am33xx-eqep";
reg = <0x180 0x80>;
clocks = <&l4ls_gclk>;
clock-names = "fck";
interrupt-parent = <&intc>;
interrupts = <79>;
status = "disabled";
};
eqep1: eqep@180 {
compatible = "ti,am33xx-eqep";
reg = <0x180 0x80>;
clocks = <&l4ls_gclk>;
clock-names = "fck";
interrupt-parent = <&intc>;
interrupts = <88>;
status = "disabled";
};
eqep2: eqep@0180 {
compatible = "ti,am33xx-eqep";
reg = <0x180 0x80>;
clocks = <&l4ls_gclk>;
clock-names = "fck";
interrupt-parent = <&intc>;
interrupts = <89>;
status = "disabled";
};
and the last final change that I did is commenting this piece of code in am335x-bone-common-no-capemgr.dtsi
// &rtc {
// clocks = <&clk_32768_ck>, <&l4_per_clkctrl AM3_CLKDIV32K_CLKCTRL 0>;
// clock-names = "ext-clk", "int-clk";
// system-power-controller;
// };
After all theses changes, I compiled and it was successful. I compiled it for 5.10 version of Linux as I was already using it in my Yocto project.
I copied the DTB file over to the boot
folder and add a file uEnv.txt
so that u-boot will read the correct DTB file.
fdtfile=am335x-boneblack-roboticscape.dtb
I restarted it and it booted normally. I checked the LEDS, I2C buses and they seem to be working properly.
The i2cdetect
also shows MPU9250 and barometer.
I will try to make a PR after I have understood the DTS files and making sure the changes that I did are correct. If you can correct me the changes that I have made, it would also be great.
Another thing I want to add is, when I try gpioinfo
from libgpiod
the pin names are not displayed. So I also want to add them to the DTS files like the original Beaglebone DTS file have as seen here https://github.com/torvalds/linux/blob/b90e90f40b4ff23c753126008bf4713a42353af6/arch/arm/boot/dts/am335x-boneblack.dts#L27
Thanks.
After above procedure: debian@BeagleBone:~$ sudo rc_test_drivers
Kernel: 5.10.168-ti-r71 BeagleBoard.org Debian Bullseye IoT Image 2023-09-02 Debian: 11.8
PASSED: gpio 0 PASSED: gpio 1 PASSED: gpio 2 PASSED: gpio 3 ERROR: ti-pwm driver not loaded for hrpwm0 ERROR: ti-pwm driver not loaded for hrpwm1 ERROR: ti-pwm driver not loaded for hrpwm2 ERROR: ti-eqep driver not loaded for eqep0 ERROR: ti-eqep driver not loaded for eqep1 ERROR: ti-eqep driver not loaded for eqep2 PASSED: pru-rproc ERROR: uart1 driver not loaded ERROR: uart2 driver not loaded ERROR: uart4 driver not loaded ERROR: uart5 driver not loaded PASSED: i2c1 PASSED: i2c2 PASSED: spi PASSED: LED PASSED: ADC iio
Currently running on a: MODEL_BB_BLACK_RC Robot Control library Version: 1.0.5
Still some wrong syntax in am335x-roboticscape.dtsi.
Describe the bug RoboticsCape-00A0 overlay is not working on the fresh install of debian. The board fails to boot with
failed on fdt_overlay_apply(): FDT_ERR_NOTFOUND
Describe which image you are running The image is the fresh install of https://debian.beagleboard.org/images/bone-debian-10.3-console-armhf-2020-04-06-1gb.img.xz and the board is booting from SD-Card.
Describe your hardware Hardware is beaglebone black
Describe any Capes Installed I wanted to use RoboticsCape
Please run this built-in script
sudo /opt/scripts/tools/version.sh
The log output while the u-boot is booting
U-boot output
UEnv.txt
Any help regarding this issue would be greatly appreciated. Thanks.