Configuring SPI pins in Beaglebone AI

Hello,

@RobertCNelson Installed the “device-tree-compiler” in BB-AI, compiled the BeagleBoard-DeviceTrees using make all option and generated the dtb and dtbo. In uEnt.txt file, I have overridden the overlay as follow

###Overide capes with eeprom
uboot_overlay_addr0=BBAI-SPI0_1.dtbo

Thereby in folder /dev/ consists of spidev1.0, spidev1.1, and spidev2.1. I observed the pin description in the dts file as below,

&ocp {
P9_23_pinmux { pinctrl-0 = <&P9_23_spi_cs_pin>; }; /* CS /
P9_18_pinmux { pinctrl-0 = <&P9_18_spi_pin>; }; /
MOSI /
P9_21_pinmux { pinctrl-0 = <&P9_21_spi_pin>; }; /
MISO /
P9_22_pinmux { pinctrl-0 = <&P9_22_spi_sclk_pin>; }; /
CLK */
};

Using config-pin option I tried configuring the P9_23 for spi_cs, But there is no option to configure spi_cs. Hence I referred am5729-beagleboneai-roboticscape.dts and altered as P9_17_pinmux { pinctrl-0 = <&P9_17_spi_cs_pin>; }; /* CS */ , recompile it, and used in the uEnv.txt file. Still, I couldn’t access the SPI Hardware. I tried changing the Bus and device as 1.0, 1.1, and 2.1. Don’t know what’s going wrong.

In BBB and BBBW, I can access the SPI Hardware using following SPI Values,
#define SPI_BUS 2
#define SPI_DEVICE 0
#define SPI_MODE 1
#define SPI_BITSPERWORD 8
#define SPI_SPEED 1000000
#define SPI_LSBSETTING 0
#define SPI_DELAY 0

Regards

Mahaboob