Enabling SPI for usage in the PRU


I’m trying to enable the SPI for usage within the PRU0. I’m using kernel: 3.8.13-bone47

I have the following DTSI:


/ {
compatible = “ti,beaglebone”, “ti,beaglebone-black”;

part-number = “printer”;
version = “00A0”;

/* This overlay uses the following resources */
exclusive-use =
“P9.27”, “P9.28”, “P9.29”, “P9.30”, “P8.46”, “pru0”, “pru1”;

fragment@0 {
target = <&am33xx_pinmux>;
overlay {

pru_pru_pins: pinmux_pru_pru_pins { // The PRU pin modes
pinctrl-single,pins = <
0x1a4 0x15 /p9_28, MCASP0_AHCLKR=9afh, 1a4h
0x19c 0x15 /* p9_27, mcasp0_fsr=99ch, 19ch*/

0x194 0x15 /* p9_29, MCASP0_FSX=994h, 194h*/
0x198 0x15 /* p9_30, MCASP0_AXR0=998h, 198h*/
0x190 0x15 /p9_31, MCASP0_ACLKX=990h, 190h/
0xe8 0x15 /* //p8_11, lcd_pclk=8e8h, 0x0e8*/

0xec 0x15 /pins used stepper enable p8_30=pru1_11=lcd_ac_bias_en=8ech, 0x0ech, low is enabled, high is disabled, 8ech, 0x0ech*/
0xa8 0x15 /P8_43=DirX=LCD_DATA2=pru1_pin2=8a8h, 0x0a8/
0xac 0x15 /P8_44=DirY=LCD_DATA3=pru1_pin3=8ach, 0x0ac/
0xa0 0x15 /P8_45=StepX= LCD_DATA0=pru1_pin0=8a0, 0x0a0/
0xa4 0x15 /P8_46=StepY=LCD_DATA1=pru1_pin1=8a4, 0x0a4/

/* inputs = 0x36 mode 6 */
0xbc 0x36 /P8_40=Laser Sensor=lcd_data7=8BCh=0xbc, change p8_27=pru0-pin8=lcd_vsync=8E0h=0xe0, mode 6 for input/
0xe0 0x36
0xb0 0x36 /P8_41=X Limit=lcd_data4=8B0h=0xb0, change p8_28pru0-pin10=lcd_pclk=8E8h=0xe8/
0xe8 0x36
0xb4 0x36 /P8_42=Y Limit=lcd_data5=8B4h=0xb4 (pullup to +5v, 10k)=pru1-pin5, p8_29=pru0-pin9=lcd_hsync=8E4h=0xe4/
0xe4 0x36


fragment@1 { // Enable the PRUSS
target = <&pruss>;
overlay {
status = “okay”;
pinctrl-names = “default”;
pinctrl-0 = <&pru_pru_pins>;



Enter code here...



I compile it with: dtc -@ -O dtb -o /lib/firmware/printer-00A0.dtbo printer-00A0.dtsi

When I load it via: echo printer > /sys/devices/bone_capemgr.9/slots

I don’t see any errors (either from the command or in dmesg), but looking at pinctrl it shows they are still inputs; not outputs.

pin 101 (44e10994) 00000027 pinctrl-single

pin 102 (44e10998) 00000027 pinctrl-single
pin 103 (44e1099c) 00000027 pinctrl-single

pin 105 (44e109a4) 00000027 pinctrl-single

Any idea how I can debug this?