From owner-freebsd-arm@freebsd.org Thu Aug 16 09:31:09 2018 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 284BF1083C03 for ; Thu, 16 Aug 2018 09:31:09 +0000 (UTC) (envelope-from darius@dons.net.au) Received: from ipmail06.adl6.internode.on.net (ipmail06.adl6.internode.on.net [150.101.137.145]) by mx1.freebsd.org (Postfix) with ESMTP id 1C77E76BBC for ; Thu, 16 Aug 2018 09:31:07 +0000 (UTC) (envelope-from darius@dons.net.au) Received: from ppp118-210-251-92.bras1.adl4.internode.on.net (HELO midget.dons.net.au) ([118.210.251.92]) by ipmail06.adl6.internode.on.net with ESMTP; 16 Aug 2018 12:39:39 +0930 Received: from midget.dons.net.au (localhost [127.0.0.1]) by midget.dons.net.au (8.15.2/8.14.9) with ESMTPS id w7G39Qwh058503 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Thu, 16 Aug 2018 12:39:28 +0930 (ACST) (envelope-from darius@dons.net.au) Received: (from mailnull@localhost) by midget.dons.net.au (8.15.2/8.14.9/Submit) id w7G2ur46051181 for ; Thu, 16 Aug 2018 12:26:53 +0930 (ACST) (envelope-from darius@dons.net.au) X-Authentication-Warning: midget.dons.net.au: mailnull set sender to using -f Received: from [203.31.81.59] ([203.31.81.59]) by ppp118-210-251-92.bras1.adl4.internode.on.net (envelope-sender ) (MIMEDefang) with ESMTP id w7G2urXU051180; Thu, 16 Aug 2018 12:26:53 +0930 From: "O'Connor, Daniel" Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Date: Thu, 16 Aug 2018 12:26:52 +0930 Subject: Beaglebone Black pinmuxing Message-Id: <13360A40-3381-4AF9-8EC5-C8E9B00CCABD@dons.net.au> To: freebsd-arm X-Mailer: Apple Mail (2.3445.9.1) X-Spam-Score: 1.5 (*) No, score=1.5 required=5.0 tests=HELO_MISC_IP, RDNS_NONE autolearn=no autolearn_force=no version=3.4.1 X-Scanned-By: MIMEDefang 2.83 on 10.0.2.1 X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Aug 2018 09:31:09 -0000 Hi, I have a BBB with a GPS engine attached to UART4 (P9_11 - UART4 Rx, = P9_13 - UART4 Tx) but I am having trouble communicating with it. I have tried both an overlay and editing the main DTS file directly but = while the UART is probed and attached I can't see any data coming in, = nor see any go out (by putting a 'scope probe on P9_13 while sending = data out cuau2). By my reading of the TRM and some googling P9_13 is gpmc_wait0 who's = pinmux offset is 0x870, P9_11 is gpmc_wpn, offset 0x874. The pinmuxes = get 0x800 subtracted from this (based on what is already in the DTS = file) This is the overlay source.. root@generic:/ # cat /boot/dtb/overlays/am335x-beaglebone-uart4a.dtso /dts-v1/; /plugin/; / { compatible =3D "ti,am335x-bone-black", "ti,am335x-bone", = "ti,am33xx"; fragment@1 { target =3D <&uart4>; __overlay__ { status =3D "okay"; pinctrl-names =3D "default"; pinctrl-0 =3D < 0x074 0x06 // = gpmc_wpn.uart4_txd_mux2 -> mode 6 0x070 0x2e // = gpmc_wait0.uart4_rxd_mux2 -> mode 6 >; }; }; }; Compiled with.. dtc -@ -I dts -O dtb -o am335x-beaglebone-uart4a.dtbo = am335x-beaglebone-uart4a.dtso And I put this in loader.conf fdt_overlays=3D"am335x-beaglebone-uart4a" After that didn't work I tried modifying the = /boot/msdos/dtb/am335x-boneblack.dts file directly with these diffs.. --- am335x-boneblack-orig.dts 2018-08-11 12:27:38.000000000 +0000 +++ am335x-boneblack.dts 2018-08-11 13:25:42.000000000 +0000 @@ -785,6 +785,13 @@ pinctrl-single,pins =3D = <0x170 0x30 0x174 0x0>; phandle =3D <0x4f>; }; + pinmux_uart4_pins { + pinctrl-single,pins =3D = < + 0x070 0x2e // P9_11 = gpmc_wait0.uart4_rxd_mux2 -> mode 6 + 0x074 0x06 // P9_13 = gpmc_wpn.uart4_txd_mux2 -> mode 6 + >; + phandle =3D <0x7a>; + }; pinmux_clkout2_pin { pinctrl-single,pins =3D = <0x1b4 0x3>; @@ -1153,7 +1160,7 @@ clock-frequency =3D <0x2dc6c00>; reg =3D <0x481a8000 0x2000>; interrupts =3D <0x2d>; - status =3D "disabled"; + status =3D "okay"; phandle =3D <0x7a>; }; serial@481aa000 { @@ -2189,6 +2196,7 @@ hdmi_0 =3D = "/ocp/i2c@44e0b000/tda19988/ports/port@0/endpoint@0"; gpio1 =3D "/ocp/gpio@4804c000"; uart0_pins =3D = "/ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_uart0_pins"; + uart4_pins =3D = "/ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_uart4_pins"; i2c2_pins =3D = "/ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_i2c2_pins"; pm_sram_data =3D = "/ocp/ocmcram@40300000/pm-sram-data@1000"; sha0_fck =3D = "/ocp/l4_wkup@44c00000/scm@210000/scm_conf@0/clocks/sha0_fck"; And while in both cases the UART attaches.. uart2: mem 0x481a8000-0x481a9fff irq 15 on = simplebus0 .. I can't see any data from the GPS engine with.. ( stty clocal -crtscts 9600 ) < /dev/cuau2 Any help much appreciated, thanks! -- Daniel O'Connor "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum