Hi All,
I am trying to change SPI1 data lines MOSI and MISO. i.e. changing MOSI to MISO and MISO to MOSI.
I found some articles on Google, but seems they are old. and slots and cape manager are no more supported.
BeagleBone Black Enable SPIDEV - eLinux.org
The slots and cape manager are replaced by u-boot device overlays.
I tried the following Device tree file and able to compile and create a dtbo file.
step1:
/dts-v1/;
/plugin/;
&{/chosen} {
overlays {
BB-SPI1-01-00A0 = “2023-10-31”;
};
};
&ocp {
P9_28_pinmux { status = “disabled”; };
P9_29_pinmux { status = “disabled”; };
P9_30_pinmux { status = “disabled”; };
P9_31_pinmux { status = “disabled”; };
};
&am33xx_pinmux {
spi1_pins_s0: spi1_pins_s0 {
pinctrl-single,pins = <
0x190 0x33 /* mcasp0_aclkx.spi1_sclk, INPUT_PULLUP | MODE3 /
0x194 0x13 / mcasp0_fsx.spi1_d0, OUTPUT_PULLUP | MODE3 /
0x198 0x33 / mcasp0_axr0.spi1_d1, INPUT_PULLUP | MODE3 /
0x19c 0x13 / mcasp0_ahclkr.spi1_cs0, OUTPUT_PULLUP | MODE3 */
>;
};
};
&spi1 {
#address-cells = <1>;
#size-cells = <0>;
status = “okay”;
pinctrl-names = “default”;
pinctrl-0 = <&spi1_pins_s0>;
ti,pindir-d0-out-d1-in = <1>;
spidev@1 {
compatible = “linux,spidev”;
reg = <0>;
spi-max-frequency = <16000000>;
};
};
step2:
Then I loaded it into /lib/firmware.
step3:
I tried different combinations here:
combination1:
changed the uEnv.txt file as following and rebooted:
uboot_overlay_addr4=/lib/firmware/BB-SPI1-01-00A0.dtbo
disable_uboot_overlay_emmc=1
disable_uboot_overlay_video=1
disable_uboot_overlay_audio=1
enable_uboot_cape_universal=1
capemgr.enable_partno=BB-SPIDEV1 (i know this is not supported, but tried)
output:
I don’t see /dev/spidev1*.*
I could see only /dev/spidev0.0 and /dev/spidev0.1
combination2:
changed the uEnv.txt file as following and rebooted:
uboot_overlay_addr4=/lib/firmware/BB-SPI1-01-00A0.dtbo
disable_uboot_overlay_emmc=1
disable_uboot_overlay_video=1
disable_uboot_overlay_audio=1
enable_uboot_cape_universal=1
output:
I don’t see /dev/spidev1*.*
I could see only /dev/spidev0.0 and /dev/spidev0.1
combination3:
changed the uEnv.txt file as following and rebooted:
uboot_overlay_addr0=/lib/firmware/BB-SPI1-01-00A0.dtbo
disable_uboot_overlay_emmc=1
disable_uboot_overlay_video=1
disable_uboot_overlay_audio=1
enable_uboot_cape_universal=1
output:
I don’t see /dev/spidev1*.*
I could see only /dev/spidev0.0 and /dev/spidev0.1
combination4:
changed the uEnv.txt file as following and rebooted:
dtb_overlay=/lib/firmware/BB-SPI1-01-00A0.dtbo
disable_uboot_overlay_emmc=1
disable_uboot_overlay_video=1
disable_uboot_overlay_audio=1
enable_uboot_cape_universal=1
output:
I don’t see /dev/spidev1*.*
I could see only /dev/spidev0.0 and /dev/spidev0.1
combination5:
changed the uEnv.txt file as following and rebooted:
dtb_overlay=/lib/firmware/BB-SPI1-01-00A0.dtbo
disable_uboot_overlay_emmc=1
disable_uboot_overlay_video=1
disable_uboot_overlay_audio=1
disabled the the following
#enable_uboot_cape_universal=1
output:
I could see only /dev/spidev1.0
But I am not able to access other devices like uart etc.
out of all these, I feel “disable_uboot_overlay_emmc” is not a matter seems to be.
Could some one suggest me, how should I update the overlay file which should not disturb other devices in Beable bone black?
Appreciate your support.