Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Jan 2020 21:25:47 +0100
From:      Manuel =?ISO-8859-1?Q?St=FChn?= <freebsdnewbie@freenet.de>
To:        Hans Bentum <jwbentum44@gmail.com>
Cc:        freebsd-arm@freebsd.org
Subject:   Re: How to get pin to mode 6 on beagle bone black
Message-ID:  <20200120212547.aa3a36c31b90d4438250c367@freenet.de>
In-Reply-To: <CAH4pBpMck41ie2K_r11sU87XvC1K0BtgYPHoRjmJHfjMUWcWCw@mail.gmail.com>
References:  <CAH4pBpP2oC-8Vjm5AFMuQopZ-6DvQG_suX5yknv6nYTkLe8yPQ@mail.gmail.com> <20200115220647.1958e8639dc718e714775fed@freenet.de> <CAH4pBpMKktrPFYcK2y0zECQJFKUiOmvv5pbBcQ2ooqycuvHqHQ@mail.gmail.com> <20200116213411.ba213b01885d2108c9ace7a5@freenet.de> <CAH4pBpMck41ie2K_r11sU87XvC1K0BtgYPHoRjmJHfjMUWcWCw@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 20 Jan 2020 09:36:39 +0100
Hans Bentum <jwbentum44@gmail.com> wrote:
[..]
>=20
> Question:
> - Is is to be expected that a user level tool like gpioctl can see an inp=
ut
> for a pin configurated for usage by the pru?

I'm successfully using Header 9 Pin 30 (GPIO112, PRU0[2], gpio3[16]) as pru=
-pin configured with this overlay:

/dts-v1/;
/plugin/;

/{
  compatible =3D "ti,am335x-bone-black", "ti,am335x-bone", "ti,am33xx";
  version =3D "0001";

  fragment@0 {
      target-path =3D "/ocp";

      __overlay__ {
        pruss: pruss@4a300000 {
                   compatible =3D "ti,pruss-v2";
                   reg =3D <0x4a300000 0x080000>;
                   interrupt-parent =3D <&intc>;
                   interrupts =3D <20 21 22 23 24 25 26 27>;
                   status =3D "okay";
                   pinctrl-names =3D "default";
                   pinctrl-0 =3D <&pru_pru_pins>;
               };
      };
  };

  fragment@1 {
      target =3D <&am33xx_pinmux>;
      __overlay__ {

        pru_pru_pins: pinmux_pru_pru_pins {
                  pinctrl-single,pins =3D <
                      0x198 0x26	/* PRU0-2 */
                      >;
              };
      };
  };

};


gpioctl shows this:
root@nanobsd-bbb:~ # gpioctl -l -f /dev/gpioc3 | grep 16
pin 16: 0       gpio_16<>

gpioctl does not recognize any toggle but pru does.

> Question:
> - I think /boot/dtb/am335x-boneblack.dtb must be is loaded. Is this
> correct. The serial console output does not print the
> name of the device tree file that is loaded. How can I know what is loade=
d?

I'm seeing this output generated by my bbb running FreeBSD 12.0-RELEASE-p2 =
over the serial console:


Loading kernel...
/boot/kernel/kernel text=3D0x8655ac data=3D0xb0da0+0x1f4ca0 syms=3D[0x4+0xa=
1060+0x4+0x101505]
Loading configured modules...
can't find '/boot/entropy'
/boot/dtb/am335x-boneblack.dtb size=3D0xc92c
Loaded DTB from file 'am335x-boneblack.dtb'.
Loading DTB overlays: 'ti_pruss.dtbo,onewire.dtbo'
/boot/dtb/overlays/ti_pruss.dtbo size=3D0x41f
/boot/dtb/overlays/onewire.dtbo size=3D0x1c2
applying DTB overlay '/boot/dtb/overlays/ti_pruss.dtbo'
applying DTB overlay '/boot/dtb/overlays/onewire.dtbo'
Kernel entry at 0x82400180...
Kernel args: (null)
---<<BOOT>>---

There can be seen that am335x-boneblack.dtb gets loaded, then ti_pruss.dtbo=
 and onewire.dtbo are applied.

--=20
Manuel St=FChn



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20200120212547.aa3a36c31b90d4438250c367>