#22399: AR71xx / AR9331 UART not initialized -------------------------------------------------+------------------------- Reporter: mike@… | Owner: developers Type: defect | Status: new Priority: normal | Milestone: Component: packages | Version: Trunk Keywords: UART, serial, AR9331, AR933x, | AR71xx, framing errors | -------------------------------------------------+------------------------- Issue:
Many TTL UART Devices do not work with this device during uBoot, but work just fine once Linux initializes the port. During uBoot, all serial output is "junk" with framing errors. The moment Linux inits the AR9331 UART correctly, everything works as expected. Cause: In uBoot, UART is not initialized per datasheet requirements. It simply stuffs in the bit-rate and hopes for the best. It should a) enable, b) "start", c) bit-rate, and d) parameter the UART before beginning communication. Skipping enable and "start" causes jitter leading to sampling errors. This also affects uplink and can cause checksum errors when uploading firmware, leading to bricked devices. Some RS232 TLL adapters overcome this on the downlink by deviating from the EIA 232 standard and sampling outside of recommended timing. It is not possible to overcome this on the uplink. Piotr from the uBoot community has provided the following updated UART routine which includes proper initialization. He's given permission to patch the AR71xx tree with it. https://github.com/pepe2k/u-boot_mod/blob/master/u-boot/cpu/mips/ar7240/qca_hs_uart.c Patching is beyond my capabilities. Happy to support a fix any way I'm able. -- Ticket URL: <https://dev.openwrt.org/ticket/22399> OpenWrt <http://openwrt.org> Opensource Wireless Router Technology _______________________________________________ openwrt-tickets mailing list openwrt-tickets@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-tickets