Date: Thu, 16 Aug 2018 12:26:52 +0930 From: "O'Connor, Daniel" <darius@dons.net.au> To: freebsd-arm <freebsd-arm@freebsd.org> Subject: Beaglebone Black pinmuxing Message-ID: <13360A40-3381-4AF9-8EC5-C8E9B00CCABD@dons.net.au>
next in thread | raw e-mail | index | archive | help
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: <TI UART (16550 compatible)> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?13360A40-3381-4AF9-8EC5-C8E9B00CCABD>