Hi -
I am using a device tree overlay to enable the pins for the multichannel
serial periphearl controller (McSPI) on the beaglebone black. I am using
the following device tree overlay to enable the pins for the McSPI:
/dts-v1/;
/plugin/;
/ {
compatible = "ti,beaglebone", "ti,beaglebone-black";
/* identification */
part-number = "PUGGLEBOARD";
version = "00A1";
/* Pins used */
exclusive-use =
/* Pins for Intan RHD2132 */
"P9.17", /* SPI0_CS0 */
"P9.18", /* SPI0_D1_MISO */
"P9.21", /* SPI0_D0_MOSI */
"P9.22", /* SPI0_SCLK */
/* Pins for BOB */
"P9.27", /* ADC CONVST PRU0: pr1_pru0_pru_r30_5 */
"P9.28", /* SPI1_CS0 */
"P9.29", /* SPI1_D0_MOSI */
"P9.30", /* SPI1_D1_MISO */
"P9.31", /* SPI1_SCLK */
"P9.42", /* SPI1_CS1 */
/* Hardware used */
"spi0",
"spi1",
"pruss",
"pru0";
fragment@0 {
target = <&am33xx_pinmux>;
__overlay__ {
spi1_pins: pinmux_spi1_pins {
pinctrl-single,pins = <
0x190 0xB /* spi1_sclk, OUTPUT | MODE3 *
/
0x194 0xB /* spi1_d0, OUTPUT | MODE3 */
0x198 0x2B /* spi1_d1, INPUT | MODE3 */
0x19c 0xB /* spi1_cs0, OUTPUT | MODE3 */
0x164 0xA /* spi1_cs1, OUTPUT | MODE2 */
>;
};
};
};
fragment@1 {
target = <&spi1>;
__overlay__ {
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&spi1_pins>;
};
};
fragment@2 {
target = <&am33xx_pinmux>;
__overlay__ {
spi0_pins: pinmux_spi0_pins {
pinctrl-single,pins = <
0x150 0x8 /* spi0_sclk, OUTPUT | MODE0 *
/
0x154 0x8 /* spi0_d0, OUTPUT | MODE0 */
0x158 0x28 /* spi0_d1, INPUT | MODE0 */
0x15c 0x8 /* spi0_cs0, OUTPUT | MODE0 */
>;
};
};
};
fragment@3 {
target = <&spi0>;
__overlay__ {
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&spi0_pins>;
};
};
fragment@4 {
target = <&am33xx_pinmux>;
__overlay__ {
puggle_pins: pinmux_puggle_pins {
pinctrl-single,pins = <
0x1a4 0x05 /* P9.27, OUTPUT | MODE5 */
>;
};
};
};
fragment@5 {
target = <&pruss>;
__overlay__ {
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&puggle_pins>;
};
};
};
I am using the following script to compile and load the dto:
#!/bin/sh
if ! id | grep -q root; then
echo "must be run as root"
exit
fi
set -x
set -e
export SLOTS=/sys/devices/bone_capemgr.8/slots
export PINS=/sys/kernel/debug/pinctrl/44e10800.pinmux/pins
dtc -O dtb -o PUGGLE-00A1.dtbo -b 0 -@ PUGGLE-00A1.dts
cp PUGGLE-00A1.dtbo /lib/firmware/
cat $SLOTS
echo PUGGLE:00A1 > $SLOTS
cat $SLOTS
I am using device tree compiler version: DTC 1.4.0-gf345d9e4
All the pins from the spi fragments work and I am able to generate an SPI
output using those pins. The problem is the single PRU pin I am trying to
initialize. It's pin P9.27 and I want to set it as an output in mode 5. But
this pin never gets initialized. I checked this by catting the pins file as
follows:
cat /sys/kernel/debug/pinctrl/44e10800.pinmux/pins | grep 9a4
and all I get out is:
pin 105 (44e109a4) 00000027 pinctrl-single
To debug this, I tried changing the pin to P9.25 and even P8.46 but neither
of those pins were intialized either when I checked the pins file in
kernel/debug. I even tried running this on a different beaglebone black,
and still no luck.
Is there something fundamentally wrong in my device tree overlay? I'm a bit
confused as to why the pins for the spi0 and spi1 fragments get loaded but
not the pruss.
Thanks in advance!
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.