Beaglebone Black pinmuxing
O'Connor, Daniel
darius at dons.net.au
Thu Aug 16 09:31:09 UTC 2018
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 at generic:/ # cat /boot/dtb/overlays/am335x-beaglebone-uart4a.dtso
/dts-v1/;
/plugin/;
/ {
compatible = "ti,am335x-bone-black", "ti,am335x-bone", "ti,am33xx";
fragment at 1 {
target = <&uart4>;
__overlay__ {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <
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="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 = <0x170 0x30 0x174 0x0>;
phandle = <0x4f>;
};
+ pinmux_uart4_pins {
+ pinctrl-single,pins = <
+ 0x070 0x2e // P9_11 gpmc_wait0.uart4_rxd_mux2 -> mode 6
+ 0x074 0x06 // P9_13 gpmc_wpn.uart4_txd_mux2 -> mode 6
+ >;
+ phandle = <0x7a>;
+ };
pinmux_clkout2_pin {
pinctrl-single,pins = <0x1b4 0x3>;
@@ -1153,7 +1160,7 @@
clock-frequency = <0x2dc6c00>;
reg = <0x481a8000 0x2000>;
interrupts = <0x2d>;
- status = "disabled";
+ status = "okay";
phandle = <0x7a>;
};
serial at 481aa000 {
@@ -2189,6 +2196,7 @@
hdmi_0 = "/ocp/i2c at 44e0b000/tda19988/ports/port at 0/endpoint at 0";
gpio1 = "/ocp/gpio at 4804c000";
uart0_pins = "/ocp/l4_wkup at 44c00000/scm at 210000/pinmux at 800/pinmux_uart0_pins";
+ uart4_pins = "/ocp/l4_wkup at 44c00000/scm at 210000/pinmux at 800/pinmux_uart4_pins";
i2c2_pins = "/ocp/l4_wkup at 44c00000/scm at 210000/pinmux at 800/pinmux_i2c2_pins";
pm_sram_data = "/ocp/ocmcram at 40300000/pm-sram-data at 1000";
sha0_fck = "/ocp/l4_wkup at 44c00000/scm at 210000/scm_conf at 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
More information about the freebsd-arm
mailing list