Date: Tue, 28 Aug 2018 09:43:18 +0200 From: Nicola Mingotti <nmingotti@gmail.com> To: "freebsd-arm@freebsd.org" <freebsd-arm@freebsd.org> Subject: Re: PRU Overlay Problem Message-ID: <b4d68340-d6e8-87bf-b711-0ca5883503db@gmail.com> In-Reply-To: <9ac1edad-1fbf-0e4d-cb2f-3de077fff7f8@gmail.com> References: <9ac1edad-1fbf-0e4d-cb2f-3de077fff7f8@gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Also, i found this, in FreeBSD.11-1 decompiling the dtb i can see the pru definition: ------------------------------------------------------------------- #> cd /boot/dtb #> dtc -I dtb -O dts am335x-boneblack.dtb | less .... pruss@4A300000 { compatible = "ti,pruss-v2"; reg = <0x4a300000 0x80000>; interrupt-parent = <0x1>; interrupts = <0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b>; }; ... ------------------------------------------------------------------- But, if i decompile the dtb in FreeBSD.12-ALPHA the only thing matching pru is --------------------------------- #> cd /boot/dtb #> dtc -I dtb -O dts am335x-boneblack.dtb | less .... pruss_ocp_gclk@530 { #clock-cells = <0x0>; compatible = "ti,mux-clock"; clocks = <0x1f 0x18>; reg = <0x530>; phandle = <0x20>; }; .... --------------------------------- Then, i guess the PRU description is nor present at the moment in FreeBSD-12-ALPHA Well, these are just my considerations, i may be totally wrong. Wild guesses. bye n. On 08/28/18 01:23, Nicola Mingotti wrote: > > 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@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@1 { > target-path="/"; > __overlay__ { > ocp { > #address-cells = <1>; > #size-cells = <1>; > pruss@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 > -------------------------- -- -------------------------- Dr. Nicola Mingotti R&D - Borghi Srl CTO - BondInsider --------------------------
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?b4d68340-d6e8-87bf-b711-0ca5883503db>