I’ve been trying to use the SPI pins on the BeagleBoard-X15, but as far as I can tell I have not been changing the correct pins to the correct muxmodes.
On the TI PinMux Tool, I set it up for spi4 (pin AA4 for CS0, AB3 for D0, AB9 for D1, and AA3 for SCLK. These, as far as I can tell from this spreadsheet, correspond to the extension pins 17.39, 17.40, 17.09, and 17.10, respectively.). I see the autogenerated files on the right side, but I’m not sure what parts of that information must be put into the device tree file, or exactly how syntactically to do that. The most relevant information seems to be in the genericFileFormatPadConf.txt file:
0x4A003744 0x50002 AA3 CTRL_CORE_PAD_MCASP5_ACLKX mcasp5_aclkx spi4_sclk
0x4A00374C 0x50002 AB3 CTRL_CORE_PAD_MCASP5_AXR0 mcasp5_axr0 spi4_d0
0x4A003748 0x10002 AB9 CTRL_CORE_PAD_MCASP5_FSX mcasp5_fsx spi4_d1
0x4A003750 0x10002 AA4 CTRL_CORE_PAD_MCASP5_AXR1 mcasp_axr1 spi4_cs0
(That is with Rx checked off for D0 and SCLK)
The file I’ve been editing is the am57xx-beagle-x15-revc.dtb. Right now, this is the spi4 module in my .dtb:
spi@480ba000 {
pinctrl-names = “default”;
pinctrl-0 = <&mcspi4_pins>;
compatible = “ti,omap4-mcspi”;
reg = <0x480ba000 0x200>;
interrupts = <0x0 0x2b 0x4>;
#address-cells = <0x1>;
#size-cells = <0x0>;
ti,hwmods = “mcspi4”;
ti,spi-num-cs = <0x1>;
dmas = <0xb1 0x46 0xb1 0x47>;
dma-names = “tx0”, “rx0”;
status = “okay”;
linux,phandle = <0x1ea>;
phandle = <0x1ea>;
mcspi4_pins: mcspi4_pins {
pinctrl-single,pins = <
… (SEE BELOW) …
;
};
spidev@0 {
#address-cells = <0x1>;
#size-cells = <0x1>;
compatible = “linux,spidev”;
spi-max-frequency = <0x1312d00>;
reg = <0x0>;
status = “okay”;
};
};
Inside of that mcspi4_pins block, inside of pinctrl-single,pins, I’ve tried a multitude of different syntaxes and modes. At first, I started with this block because documentation online said it was correct:
0x344 (PIN_INPUT_PULLUP | MANUAL_MODE | MUX_MODE2)
0x348 (PIN_INPUT_PULLUP | MANUAL_MODE | MUX_MODE2)
0x34c (PIN_OUTPUT_PULLUP | MANUAL_MODE | MUX_MODE2)
0x350 (PIN_OUTPUT_PULLUP | MANUAL_MODE | MUX_MODE2)
However, this gives a “cannot parse input tree” error when attempting to compile from dts to dtb.
I’ve tried putting variations of the PinMux Tool information in there, but nothing has worked. Besides editing the dtb file (I am actually editing a copy called am57xx-beagle-x15-revc-ben.dtb), I have changed the /boot/uEnv.txt file to use am57xx-beagle-x15-revc-ben.dtb (and I have tested and proven that my edited file is used or booting), I have edited the config-4.9.35-ti-r44 file by changing the CONFIG_SPI_SPIDEV and similar configuration lines from “= m” to “= y”.
The furthest I have gotten is being able to see the correct spidevX.X folders in /dev. I’m not sure how to get this part of my system working.
As a final addition, I wanted to ask if the process for accessing UARTs and GPIOs is similar / how that should be done.
Thank you!