This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

How to configure the PRU Cape dtsi file for AM437x

I was follow Lab4 the PRU Training, but get a problem in PRU Cape

5. Modify to SDK provided DTS (devicetree source) files to account for the PRU cape.

a. Copy the am437x-gp-evm-prucape.dtsi from the <PRU_SW_PATH>/pru_cape directory to arch/arm/boot/dts.
b. In your kernel source tree, open arch/arm/boot/dts/am437x-gp-evm.dts for editing.
c. Add the below line to include the PRU Cape DTS file to the bottomof the am437x-gp-evm.dts file.
#include "am437x-gp-evm-prucape.dtsi"
d. Save the file.

Beacase my EVM board is am437x-gp-evm board. so I was change from AM335x to AM437x and Modify am335x-boneblack-prucape.dtsi to AM437x-gp-evm-prucape.dtsi, below as

1.   0x190 0x00050005 /* mcasp0_aclkx, OMAP_MUX_MODE5 | AM437X_PIN_OUTPUT, PRU CAPE Blue LED, pr0_pru0_gpo0 */
2.   0x194 0x00050005 /* mcasp0_fsx, OMAP_MUX_MODE5 | AM437X_PIN_OUTPUT, PRU CAPE Green LED, pr0_pru0_gpo1 */
3.   0x198 0x00050005 /* mcasp0_axr0, OMAP_MUX_MODE5 | AM437X_PIN_OUTPUT, PRU CAPE Orange LED, pr0_pru0_gpo2 */
4.   0x19c 0x00050005 /* mcasp0_ahclkr, OMAP_MUX_MODE5 | AM437X_PIN_OUTPUT, PRU CAPE Red LED, pr0_pru0_gpo3 */

/*
 * Copyright (C) 2015 Texas Instruments Incorporated - http://www.ti.com/
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 */

&am43xx_pinmux {
 pru_cape_bone_pins: pru_cape_bone_pins {
      pinctrl-single,pins = <
        0x190 0x00050005 /* mcasp0_aclkx, OMAP_MUX_MODE5 | AM437X_PIN_OUTPUT, PRU CAPE Blue LED, pr0_pru0_gpo0 */
        0x194 0x00050005 /* mcasp0_fsx, OMAP_MUX_MODE5 | AM437X_PIN_OUTPUT, PRU CAPE Green LED, pr0_pru0_gpo1 */
        0x198 0x00050005 /* mcasp0_axr0, OMAP_MUX_MODE5 | AM437X_PIN_OUTPUT, PRU CAPE Orange LED, pr0_pru0_gpo2 */
        0x19c 0x00050005 /* mcasp0_ahclkr, OMAP_MUX_MODE5 | AM437X_PIN_OUTPUT, PRU CAPE Red LED, pr0_pru0_gpo3 */
       >;
      };
};

&mcasp1 {
 status = "disabled";
};

&sound0 {
 status = "disabled";
};

&pruss {
        pinctrl-names = "default";
 pinctrl-0 = <&pru_cape_bone_pins>;
};

And then Compile the DTS file:

make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- am437x-gp-evm.dtb

Get the error message

"Error: arch/arm/boot/dts/am437x-gp-evm-prucape.dtsi:9.1-15 syntax error"

note: Would you provide the AM437x dtsi example code,  

  • Hi,

    You should add the pru pinmux settings directly in the am437x-gp-evm.dts file, like:
    pruss_pins: pruss_pins {
    pinctrl-single,pins = <
    0x190 0x00050005 /* mcasp0_aclkx, OMAP_MUX_MODE5 | AM437X_PIN_OUTPUT, PRU CAPE Blue LED, pr0_pru0_gpo0 */
    0x194 0x00050005 /* mcasp0_fsx, OMAP_MUX_MODE5 | AM437X_PIN_OUTPUT, PRU CAPE Green LED, pr0_pru0_gpo1 */
    0x198 0x00050005 /* mcasp0_axr0, OMAP_MUX_MODE5 | AM437X_PIN_OUTPUT, PRU CAPE Orange LED, pr0_pru0_gpo2 */
    0x19c 0x00050005 /* mcasp0_ahclkr, OMAP_MUX_MODE5 | AM437X_PIN_OUTPUT, PRU CAPE Red LED, pr0_pru0_gpo3 */
    >;
    };

    &pruss {
    pinctrl-names = "default";
    pinctrl-0 = <&pru_cape_bone_pins>;
    status = "okay";
    };

    And then compile the kernel.

    Hope this helps.

    Best Regards,
    Yordan
  • Hi,
    I was add pru pinmux setting into am437x-gp-evm.dts file. but get another error. below as

    "Error : arch/arm/bootdts/am437x-gp-evm-prucape.dtsi:9.1-15 syntax error"
    "FATAL ERROR : unable to parse input tree"
  • Hi,

    You should remove the #include "am437x-gp-evm-prucape.dtsi" line, and apply the pru settings directly in am437x dts file. Take a reference from the other pinmux settings in am437x-gp-evm.dts.

    Best Regards,
    Yordan
  • Hi
    Thanks for you reply. follow your suggestion.
    1. remove the #include "am437x-gp-evm-prucape.dtsi"
    2. Add the pru pinmux settings into dts file

    pruss_pins: pruss_pins {
    pinctrl-single,pins = <
    0x190 (PIN_OUTPUT_PULLDOWN | MUX_MODE5)
    0x194 (PIN_OUTPUT_PULLDOWN | MUX_MODE5)
    0x198 (PIN_OUTPUT_PULLDOWN | MUX_MODE5)
    0x19C (PIN_OUTPUT_PULLDOWN | MUX_MODE5)
    >;
    };
    .
    .
    .

    &pruss {
    status = "okay";
    pinctrl-names = "default";
    pinctrl-0 = <&pruss_pins>;
    };

    Error message: Error: arch/arm/boot/dts/am437x-gp-evm.dts:1253.3-4 label or path, 'pruss', not found

    I have no idea for not found "pruss".
  • This whole effort is completely meaningless. The PRU training lab you try to follow is based on a completely different set of boards: one is AM335X Beaglebone Black, and the other is the PRU Cape for Beaglebone Black. Blindly copying steps from the training lab will not help you on your AM437X EVM, and even if you get the system running it's very likely you will burn something on your board, as the pinmuxing must match exactly the hardware you have.
  • Thanks for your suggestion. Would TI has provided relevant PRU training for AM437x??? If not, how do we understand and use the new products it. How do we get started it's good for beginners.
  • The PRU-ICSS is the same in both AM335X and AM437X. You could get a BBB and a PRU Cape and what you do on them will be quite the same on AM437X.