Ultimately, I'm not sure what was wrong.  But for anyone who is having 
trouble with the device tree and the PRU, here is my device tree for the 
PRU code for my project:

/dts-v1/;
/plugin/;

/ {
        compatible = "ti,beaglebone", "ti,beaglebone-black";

        /* identification */
        part-number = "BB-CAMERA";
        version = "00A0";

        /* state the resources this cape uses */
        exclusive-use =
                /* the pin header uses */
                "P8.46",
                "P8.45",
                "P8.44",
                "P8.43",
                "P8.42",
                "P8.41",
                "P8.40",
                "P8.39",
                "P9.26",
                "P8.27",
                "P8.29",
                "P9.31",

                /* the hardware ip uses */
                "pruss";

        fragment@0 {
                target = <&am33xx_pinmux>;
                __overlay__ {
                        bb_uart1_pins: pinmux_bb_uart1_pins {
                                pinctrl-single,pins = <
                                        0x180 0x2e /* P9.26 uart1_rxd.uart1_rxd 
 INPUT  */
                                        0x0a4 0x2e
                                        0x0a0 0x2e
                                        0x0ac 0x2e
                                        0x0a8 0x2e
                                        0x0b4 0x2e
                                        0x0b0 0x2e
                                        0x0bc 0x2e
                                        0x0b8 0x2e
                                        0x180 0x2e
                                        0x0e0 0x2e
                                        0x0e4 0x2e
                                        0x190 0x26

                                >;
                        };
                };
        };

        fragment@1 {
                target = <&uart2>;      /* really uart1 */
                __overlay__ {
                        status = "okay";
                        pinctrl-names = "default";
                        pinctrl-0 = <&bb_uart1_pins>;
                };
        };
};




On Thursday, January 23, 2014 3:51:16 PM UTC-5, Christopher Hopwood wrote:
>
> Thanks Brandon.  I did get some of the pins working, but am getting all 
> zeros on PRU1_R31 0 through 7.  I'm trying to use the "interacto" pru code 
> to capture images from a CMOS camera, which I've copied into my own repo: 
> https://github.com/Rose-Hulman-ROBO4xx/1314-BeagleBone-Quadcopter/blob/master/code/i2c_bitbang/pru_sw/example_apps/camera/camera.p.
>  
>  PRU1_R31_16, 8, and 9 are definitely working, as the program will run to 
> completion when I supply a clock to the camera, and does not run to 
> completion when there is no clock.  I've tested the memory mapping by 
> moving dummy test values into r0 before storing it into dram at line 92, 
> but when it comes time to actually store the camera's data, I only get 
> zeros, even when I wire one of the data pins to 3.3v (through a 2.2k 
> resistor for safety).  I've also confirmed that there is data coming from 
> the camera using my BusPirate, which shows the voltage getting up to 2.76, 
> and a frequency in the range of 1.8MHz, which does seem about right.
>
> Any ideas why this is happening?
>
> On Thursday, January 23, 2014 12:29:53 AM UTC-5, Brandon I wrote:
>>
>> Here's mine:
>> /dts-v1/;
>>
>> / {
>> compatible = "ti,beaglebone", "ti,beaglebone-black";
>> part-number = "AQ-PRU-MDIO";
>> exclusive-use = "P8.43", "P8.44", "P8.45", "P8.46", "P8.39", "P8.40", 
>> "P8.41", "P8.42", "P8.27", "P8.28", "P8.29", "P8.30", "pru1";
>>
>> fragment@0 {
>> target = <0xdeadbeef>;
>>
>> __overlay__ {
>>
>> pinmux_pru_mdio_pins {
>> pinctrl-single,pins = <0xa8 0xd 0xac 0xd 0xa0 0xd 0xa4 0xd 0xb8 0x35 0xbc 
>> 0x35 0xb0 0x35 0xb4 0x35 0xe0 0x36 0xe8 0x36 0xe4 0x36 0xec 0x36>;
>> linux,phandle = <0x1>;
>> phandle = <0x1>;
>> };
>> };
>> };
>>
>> fragment@1 {
>> target = <0xdeadbeef>;
>>
>> __overlay__ {
>> status = "okay";
>> pinctrl-names = "default";
>> pinctrl-0 = <0x1>;
>> };
>> };
>>
>> __symbols__ {
>> pru_mdio_pins = "/fragment@0/__overlay__/pinmux_pru_mdio_pins";
>> };
>>
>> __fixups__ {
>> am33xx_pinmux = "/fragment@0:target:0";
>> pruss = "/fragment@1:target:0";
>> };
>>
>> __local_fixups__ {
>> fixup = "/fragment@1/__overlay__:pinctrl-0:0";
>> };
>> };
>>
>>
>> I constructed mine by modifying one of the existing dts files on the 
>> beaglebone. I'll admit I don't completely understand it, but you could 
>> trimming it down to only your pins.
>>
>> On Tuesday, January 21, 2014 6:56:41 PM UTC-8, Christopher Hopwood wrote:
>>>
>>> Hello all,
>>>
>>> I'm trying to use the PRU gpio pins, but cannot get them to work.  I've 
>>> modified Doctor Yoder's device tree example to enable the PRU pins, but my 
>>> program is still not getting the input.  What am I doing wrong?
>>>
>>> Here is my overlay:
>>> /dts-v1/;
>>> /plugin/;
>>>
>>> /{
>>>        compatible = "ti,beaglebone", "ti,beaglebone-black";
>>>        part-number = "MAY-gpio-set";
>>>        version = "00A0";
>>>
>>>        fragment@0 {
>>>              target = <&am33xx_pinmux>;
>>>
>>>              __overlay__ {
>>>                   pinctrl_test: MAY-gpio-set {
>>>                         pinctrl-single,pins = <
>>>
>>>                             0x0e4 0x36
>>>                             0x0e0 0x36
>>>
>>>
>>>                         >;
>>>                   };
>>>              };
>>>        };
>>>
>>>        fragment@1 {
>>>                 target = <&ocp>;
>>>                 __overlay__ {
>>>                         test_helper: helper {
>>>                                 compatible = "bone-pinmux-helper";
>>>                                 pinctrl-names = "default";
>>>                                 pinctrl-0 = <&pinctrl_test>;
>>>                                 status = "okay";
>>>                         };
>>>                 };
>>>         };
>>> };
>>>
>>>
>>>
>>>

-- 
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 beagleboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to