From owner-freebsd-arm@freebsd.org Mon Jan 20 20:28:07 2020 Return-Path: Delivered-To: freebsd-arm@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DE22B22623C for ; Mon, 20 Jan 2020 20:28:07 +0000 (UTC) (envelope-from freebsdnewbie@freenet.de) Received: from mout0.freenet.de (mout0.freenet.de [IPv6:2001:748:100:40::2:2]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (Client CN "*.freenet.de", Issuer "TeleSec ServerPass Class 2 CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 481jsf3x7Bz3HTC for ; Mon, 20 Jan 2020 20:28:06 +0000 (UTC) (envelope-from freebsdnewbie@freenet.de) Received: from [195.4.92.165] (helo=mjail2.freenet.de) by mout0.freenet.de with esmtpa (ID freebsdnewbie@freenet.de) (port 25) (Exim 4.92 #3) id 1itdeU-0004Wk-L1; Mon, 20 Jan 2020 21:28:02 +0100 Received: from [::1] (port=56488 helo=mjail2.freenet.de) by mjail2.freenet.de with esmtpa (ID freebsdnewbie@freenet.de) (Exim 4.92 #3) id 1itdeU-000473-KS; Mon, 20 Jan 2020 21:28:02 +0100 Received: from sub3.freenet.de ([195.4.92.122]:59804) by mjail2.freenet.de with esmtpa (ID freebsdnewbie@freenet.de) (Exim 4.92 #3) id 1itdcK-0002sS-Vt; Mon, 20 Jan 2020 21:25:48 +0100 Received: from p4fd9f4f7.dip0.t-ipconnect.de ([79.217.244.247]:20563 helo=freebsd-t450.fritz.box) by sub3.freenet.de with esmtpsa (ID freebsdnewbie@freenet.de) (TLSv1.2:ECDHE-RSA-CHACHA20-POLY1305:256) (port 465) (Exim 4.92 #3) id 1itdcK-0006IU-RC; Mon, 20 Jan 2020 21:25:48 +0100 Date: Mon, 20 Jan 2020 21:25:47 +0100 From: Manuel =?ISO-8859-1?Q?St=FChn?= To: Hans Bentum 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: References: <20200115220647.1958e8639dc718e714775fed@freenet.de> <20200116213411.ba213b01885d2108c9ace7a5@freenet.de> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.32; amd64-portbld-freebsd12.0) Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Originated-At: 79.217.244.247!20563 X-Rspamd-Queue-Id: 481jsf3x7Bz3HTC X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of freebsdnewbie@freenet.de designates 2001:748:100:40::2:2 as permitted sender) smtp.mailfrom=freebsdnewbie@freenet.de X-Spamd-Result: default: False [-1.78 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_FROM(0.00)[freenet.de]; R_SPF_ALLOW(-0.20)[+ip6:2001:748:100:40::2:0/112]; MV_CASE(0.50)[]; RCPT_COUNT_TWO(0.00)[2]; FREEMAIL_TO(0.00)[gmail.com]; RECEIVED_SPAMHAUS_PBL(0.00)[247.244.217.79.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.10]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[freenet.de]; ASN(0.00)[asn:5430, ipnet:2001:748::/32, country:DE]; MID_RHS_MATCH_FROM(0.00)[]; SH_EMAIL_ZRD(0.00)[0.0.0.0,0.0.0.1]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; RCVD_COUNT_FIVE(0.00)[5]; IP_SCORE(0.00)[ip: (-0.28), ipnet: 2001:748::/32(-0.24), asn: 5430(-0.28), country: DE(-0.02)]; FROM_HAS_DN(0.00)[]; SH_EMAIL_DBL_DONT_QUERY_IPS(0.00)[0.0.0.0,0.0.0.1]; NEURAL_HAM_LONG(-0.98)[-0.984,0]; MIME_GOOD(-0.10)[text/plain]; MIME_TRACE(0.00)[0:+]; DMARC_NA(0.00)[freenet.de]; IP_SCORE_FREEMAIL(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2.0.0.0.2.0.0.0.0.0.0.0.0.0.0.0.0.4.0.0.0.0.1.0.8.4.7.0.1.0.0.2.list.dnswl.org : 127.0.5.0]; RCVD_TLS_LAST(0.00)[] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Jan 2020 20:28:07 -0000 On Mon, 20 Jan 2020 09:36:39 +0100 Hans Bentum 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) ---<>--- There can be seen that am335x-boneblack.dtb gets loaded, then ti_pruss.dtbo= and onewire.dtbo are applied. --=20 Manuel St=FChn