Tool/software: Linux
Need assistance in setting up device tree for use of PRUSS2_PRU0 as 16 bit input parallel capture mode along with 4 GPO lines.
First question.. is that even possible? And second question, how do I implement the pru as input capture in the device tree?
I can do it by using MemTools and shell but that's not the desired method for the end product.
# PRUSS_GPCFG0, enable parallel capture
./memtool 0x4b2a6008=0x00002001
# pr2_pru0_gpi0
./memtool 0x4a0035e8=0x0004010c
# pr2_pru0_gpi1
./memtool 0x4a0035ec=0x0004010c
# pr2_pru0_gpi2
./memtool 0x4a0035f0=0x0004010c
# pr2_pru0_gpi3
./memtool 0x4a0035f4=0x0004010c
# pr2_pru0_gpi4
./memtool 0x4a0035f8=0x0004010c
# pr2_pru0_gpi5
./memtool 0x4a0035fc=0x0004010c
# pr2_pru0_gpi6
./memtool 0x4a003600=0x0004010c
# pr2_pru0_gpi7
./memtool 0x4a003604=0x0004010c
# pr2_pru0_gpi8
./memtool 0x4a003608=0x0004010c
# pr2_pru0_gpi9
./memtool 0x4a00360c=0x0004010c
# pr2_pru0_gpi10
./memtool 0x4a003610=0x0004010c
# pr2_pru0_gpi11
./memtool 0x4a003614=0x0004010c
# pr2_pru0_gpi16, DCLK
./memtool 0x4a003628=0x0004010c
Here is my section in the Device Tree
/* PRU input = MUXMODE_C output = MUXMODE_D */
pru_test_pins: pru_test_pins {
pinctrl-single,pins = <
0x1e8 (PIN_INPUT_PULLDOWN | MUX_MODE12) /* vout1_d3 PRU Data0 */
0x1ec (PIN_INPUT_PULLDOWN | MUX_MODE12) /* vout1_d4 PRU Data1 */
0x1f0 (PIN_INPUT_PULLDOWN | MUX_MODE12) /* vout1_d5 PRU Data2 */
0x1f4 (PIN_INPUT_PULLDOWN | MUX_MODE12) /* vout1_d6 PRU Data3 */
0x1f8 (PIN_INPUT_PULLDOWN | MUX_MODE12) /* vout1_d7 PRU Data4 */
0x1fc (PIN_INPUT_PULLDOWN | MUX_MODE12) /* vout1_d8 PRU Data5 */
0x200 (PIN_INPUT_PULLDOWN | MUX_MODE12) /* vout1_d9 PRU Data6 */
0x204 (PIN_INPUT_PULLDOWN | MUX_MODE12) /* vout1_d10 PRU Data7 */
0x208 (PIN_INPUT_PULLDOWN | MUX_MODE12) /* vout1_d11 PRU Data8 */
0x20c (PIN_INPUT_PULLDOWN | MUX_MODE12) /* vout1_d12 PRU Data9 */
0x210 (PIN_INPUT_PULLDOWN | MUX_MODE12) /* vout1_d13 PRU Data10 */
0x214 (PIN_INPUT_PULLDOWN | MUX_MODE12) /* vout1_d14 PRU Data11 */
0x218 (PIN_INPUT_PULLDOWN | MUX_MODE12) /* vout1_d15 PRU Data12 */
0x21c (PIN_INPUT_PULLDOWN | MUX_MODE12) /* vout1_d16 PRU Data13 */
0x220 (PIN_INPUT_PULLDOWN | MUX_MODE12) /* vout1_d17 PRU Data14 */
0x224 (PIN_INPUT_PULLDOWN | MUX_MODE12) /* vout1_d18 PRU Data15 */
0x228 (PIN_INPUT_PULLDOWN | MUX_MODE12) /* vout1_d19 PRU Clock Data16 */
/* future expansion to output pins as welll */
/* 0x22c (PIN_OUTPUT | MUX_MODE13) /* vout1_d20 PRU AFE Trig */
/* 0x230 (PIN_OUTPUT | MUX_MODE13) /* vout1_d21 PRU AFE SelA */
/* 0x234 (PIN_OUTPUT | MUX_MODE13) /* vout1_d21 PRU AFE SelB */
/* 0x238 (PIN_OUTPUT | MUX_MODE13) /* vout1_d21 PRU AFE SelC */
>;
};