So, I got this work by taking the blob of my device, decompiling it and merging it into sections from the overlay files of the device tree and recompiling it. I realized that I need uarts 1 and 2 instead of 2 and 4, so this is a little different from my original problem.
To decompile the device tree:
dtc -I dtb -O dts -o am335x-boneblack.dts am335x-boneblack.dtb
I used the existing uart0 as an example to show me the sections I need to work.
I added a section for uart1 and uart2 in the pinmux section in the section for uart0. Now it looks like this:
pinmux_uart0_pins { pinctrl-single,pins = <0x170 0x30 0x174 0x0>; linux,phandle = <0x27>; phandle = <0x27>; }; bb_uart1_pins: pinmux_bb_uart1_pins { pinctrl-single,pins = < 0x184 0x20 /* P9.24 uart1_txd.uart1_txd OUTPUT */ 0x180 0x20 /* P9.26 uart1_rxd.uart1_rxd INPUT */ >; }; bb_uart2_pins: pinmux_bb_uart2_pins { pinctrl-single,pins = < 0x150 0x21 /okay* spi0_sclk.uart2_rxd | MODE1 */ 0x154 0x01 /* spi0_d0.uart2_txd | MODE1 */ >; };
Then later, you need to enable the sequential sections and indicate which contacts to use. I have modified the existing uart sections and now it looks like this:
serial@44e09000 { compatible = "ti,omap3-uart"; ti,hwmods = "uart1"; clock-frequency = <0x2dc6c00>; reg = <0x44e09000 0x2000>; interrupts = <0x48>; status = "okay"; dmas = <0x26 0x1a 0x26 0x1b>; dma-names = "tx", "rx"; pinctrl-names = "default"; pinctrl-0 = <0x27>; }; serial@48022000 { compatible = "ti,omap3-uart"; ti,hwmods = "uart2"; clock-frequency = <0x2dc6c00>; reg = <0x48022000 0x2000>; interrupts = <0x49>; status = "okay"; dmas = <0x26 0x1c 0x26 0x1d>; dma-names = "tx", "rx"; pinctrl-names = "default"; pinctrl-0 = <&bb_uart1_pins>; }; serial@48024000 { compatible = "ti,omap3-uart"; ti,hwmods = "uart3"; clock-frequency = <0x2dc6c00>; reg = <0x48024000 0x2000>; interrupts = <0x4a>; status = "okay"; dmas = <0x26 0x1e 0x26 0x1f>; dma-names = "tx", "rx"; pinctrl-names = "default"; pinctrl-0 = <&bb_uart2_pins>; }
To recompile the device tree:
dtc -I dts -O dtb -o am335x-boneblack.dtb am335x-boneblack.dts
In short, I managed to get this work, although little is known about how device trees work.
I also needed to disable hdmi, which I did by setting the status to βdisabledβ in the hdmi section.