PRU Overlay Problem
Nicola Mingotti
nmingotti at gmail.com
Mon Aug 27 23:23:06 UTC 2018
Hi !
I am trying to configure the PRU in BeagleBone Black, FreeBSD-12-ALPHA.
I found Rolf code online, it compiles and load => I see the PRU
https://obsigna.com/articles/1530973669.html
Ok, the problem is I would like to configure the pins for the PRU either
in the new format
that Ian says on in the old one. I tried to modify Rolf code copying
from various resources
but i failed. I ask your help. I admint this thing for me is in good
part obscure.
In previous post I saw the DTS sources are here:
https://github.com/freebsd/freebsd/tree/master/sys/gnu/dts/arm
But, i can't find the file defining the PRU, so I am stuck, i don't know
where to copy from;)
here is were i landed :
--------------------- new style overlay ----------
/dts-v1/;
/plugin/;
/ {
compatible = "ti,am335x-bone-black", "ti,am335x-bone", "ti,am33xx";
exclusive-use = "P9.27","P9.28","pru0";
};
&am33xx_pinmux {
pru_pru_pins: pinmux_pru_pru_pins {
pinctrl-single,pins = <
0x1a4 0x05 /* P9.27 pr1_pru0_pru_r30_5, Mode 5 output
pull-down */
0x19c 0x26 /* P9.28 pr1_pru0_pru_r31_3, Mode 6 input
pull-down */
>;
};
};
/* &"/" { ummm, problem, doh */
&ocp {
#address-cells = <1>;
#size-cells = <1>;
pruss at 4a300000 {
status = "okay";
compatible = "ti,pruss-v2";
ti,deassert-hard-reset = "pruss", "pruss";
reg = <0x4a300000 0x080000>;
ti,pintc-offset = <0x20000>;
interrupt-parent = <&intc>;
interrupts = <20 21 22 23 24 25 26 27>;
pinctrl-names = "default";
pinctrl-0 = <&pru_pru_pins>;
};
};
--------------------------------------
---------- old style overlay -----------------
/dts-v1/;
/plugin/;
/ {
compatible = "ti,am335x-bone-black", "ti,am335x-bone", "ti,am33xx";
exclusive-use = "P9.27","P9.28", "pru0";
pru_pru_pins: pinmux_pru_pru_pins {
pinctrl-single,pins = <
0x1a4 0x05 /* P9.27 pr1_pru0_pru_r30_5, Mode 5 output
pull-down */
0x19c 0x26 /* P9.28 pr1_pru0_pru_r31_3, Mode 6 input
pull-down */
>;
};
fragment at 1 {
target-path="/";
__overlay__ {
ocp {
#address-cells = <1>;
#size-cells = <1>;
pruss at 4a300000 {
status = "okay";
compatible = "ti,pruss-v2";
ti,deassert-hard-reset = "pruss", "pruss";
reg = <0x4a300000 0x080000>;
ti,pintc-offset = <0x20000>;
interrupt-parent = <&intc>;
interrupts = <20 21 22 23 24 25 26 27>;
pinctrl-0 = <&pru_pru_pins>;
};
};
};
};
};
---------------------------------------------------
bye
Nicola
--
--------------------------
Dr. Nicola Mingotti
R&D - Borghi Srl
CTO - BondInsider
--------------------------
More information about the freebsd-arm
mailing list