diff options
author | Sungbo Eo <mans0n@gorani.run> | 2020-01-12 21:36:23 +0900 |
---|---|---|
committer | Petr Štetiar <ynezz@true.cz> | 2020-07-08 23:22:30 +0200 |
commit | 358aec77756d6bf850a533272f2685a45220dc0c (patch) | |
tree | 6d28b534f25267ab28af866abb92ec92b057f3a9 /target/linux/ath79/patches-4.19 | |
parent | dc61e3b7ffdc2e3873af238a9100d44ee685578c (diff) | |
download | upstream-358aec77756d6bf850a533272f2685a45220dc0c.tar.gz upstream-358aec77756d6bf850a533272f2685a45220dc0c.tar.bz2 upstream-358aec77756d6bf850a533272f2685a45220dc0c.zip |
ath79: add support for Arduino Yun
Arduino Yun is a microcontroller development board, based on Atmel
ATmega32u4 and Atheros AR9331.
Specifications:
- MCU: ATmega32U4
- SoC: AR9331
- RAM: DDR2 64MB
- Flash: SPI NOR 16MB
- WiFi:
- 2.4GHz: SoC internal
- Ethernet: 1x 10/100Mbps
- USB: 1x 2.0
- MicroSD: 1x SDHC
Notes:
- Stock firmware is based on OpenWrt AA.
- The SoC UART can be accessed only through the MCU.
YunSerialTerminal is recommended for access to serial console.
- Stock firmware uses non-standard 250000 baudrate by default.
- The MCU can be reprogrammed from the SoC with avrdude linuxgpio.
Installation:
1. Update U-Boot environment variables to adapt to new partition scheme.
> setenv bootcmd "run addboard; run addtty; run addparts; run addrootfs; bootm 0x9f050000 || bootm 0x9fea0000"
> setenv mtdparts "spi0.0:256k(u-boot)ro,64k(u-boot-env),15936k(firmware),64k(nvram),64k(art)ro"
> saveenv
2. Boot into stock firmware normally and perform sysupgrade with
sysupgrade image.
# sysupgrade -n -F /tmp/sysupgrade.bin
Signed-off-by: Sungbo Eo <mans0n@gorani.run>
Diffstat (limited to 'target/linux/ath79/patches-4.19')
-rw-r--r-- | target/linux/ath79/patches-4.19/921-serial-core-add-support-for-boot-console-with-arbitr.patch | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/target/linux/ath79/patches-4.19/921-serial-core-add-support-for-boot-console-with-arbitr.patch b/target/linux/ath79/patches-4.19/921-serial-core-add-support-for-boot-console-with-arbitr.patch new file mode 100644 index 0000000000..f726b05200 --- /dev/null +++ b/target/linux/ath79/patches-4.19/921-serial-core-add-support-for-boot-console-with-arbitr.patch @@ -0,0 +1,54 @@ +From 4d3c17975c7814884a721fe693b3adf5c426d759 Mon Sep 17 00:00:00 2001 +From: Hauke Mehrtens <hauke@hauke-m.de> +Date: Tue, 10 Nov 2015 22:18:39 +0100 +Subject: [RFC] serial: core: add support for boot console with arbitrary + baud rates + +The Arduino Yun uses a baud rate of 250000 by default. The serial is +going over the Atmel ATmega and is used to connect to this chip. +Without this patch Linux wants to switch the console to 9600 Baud. + +With this patch Linux will use the configured baud rate and not a +default one specified in uart_register_driver(). + +Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> +[rebased to 4.14, slightly reworded commit message] +Signed-off-by: Sungbo Eo <mans0n@gorani.run> +--- + drivers/tty/serial/serial_core.c | 6 +++++- + include/linux/console.h | 1 + + 2 files changed, 6 insertions(+), 1 deletions(-) + +--- a/drivers/tty/serial/serial_core.c ++++ b/drivers/tty/serial/serial_core.c +@@ -219,6 +219,8 @@ static int uart_port_startup(struct tty_ + if (retval == 0) { + if (uart_console(uport) && uport->cons->cflag) { + tty->termios.c_cflag = uport->cons->cflag; ++ tty->termios.c_ospeed = uport->cons->baud; ++ tty->termios.c_ispeed = uport->cons->baud; + uport->cons->cflag = 0; + } + /* +@@ -2058,8 +2060,10 @@ uart_set_options(struct uart_port *port, + * Allow the setting of the UART parameters with a NULL console + * too: + */ +- if (co) ++ if (co) { + co->cflag = termios.c_cflag; ++ co->baud = baud; ++ } + + return 0; + } +--- a/include/linux/console.h ++++ b/include/linux/console.h +@@ -153,6 +153,7 @@ struct console { + short flags; + short index; + int cflag; ++ int baud; + void *data; + struct console *next; + }; |