Message ID | 20201129165252.6350-1-pali@kernel.org |
---|---|
State | Superseded |
Delegated to: | Marek Vasut |
Headers | show |
Series | Nokia RX-51: Fix USB TTY console and enable it | expand |
On Sun 2020-11-29 17:52:52, Pali Rohár wrote: > Now when usbtty serial console is fixed in U-Boot enable it for Nokia RX-51 > board by default. > > CONFIG_CONSOLE_MUX is already used and U-Boot console is available for > all in/out devices. Therefore there is no need to have separate commands > 'run sercon', 'run usbcon' and 'run vgacon', so remove them. > > As space for U-Boot is limited to 256kB, disable some other unused options > so CONFIG_USB_TTY can be enabled. > > Nokia RX-51 does not have easily accessible UART serial console so the only > option for easy debugging is to use device's keyboard+screen or this usbtty > serial console over USB. > > Signed-off-by: Pali Rohár <pali@kernel.org> 11-13 Reviewed-by: Pavel Machek <pavel@ucw.cz> Best regards, Pavel
On Sun, Nov 29, 2020 at 6:53 PM Pali Rohár <pali@kernel.org> wrote: > > Now when usbtty serial console is fixed in U-Boot enable it for Nokia RX-51 > board by default. > > CONFIG_CONSOLE_MUX is already used and U-Boot console is available for > all in/out devices. Therefore there is no need to have separate commands > 'run sercon', 'run usbcon' and 'run vgacon', so remove them. > > As space for U-Boot is limited to 256kB, disable some other unused options > so CONFIG_USB_TTY can be enabled. > > Nokia RX-51 does not have easily accessible UART serial console so the only > option for easy debugging is to use device's keyboard+screen or this usbtty > serial console over USB. I think it's not a good idea to revive usbtty. I was recently playing around f_serial.c (I can send you the half baked stuff, which by a lot of twisted code in DWC3 driver is not working properly, actually almost not working) and I think that would be the right thing to do. usbtty quite old, intrusive way of serial console via USB supported only by outdated hardware (like this Nokia N-900), while f_serial gotta work on better recent base. And I believe musb should be, if needed, patched to support composite devices. So, kinda disagreement from my side as a summary on this. But disclaimer, I'm not a maintainer here, just my 2 cents.
On Sunday 27 December 2020 18:28:25 Andy Shevchenko wrote: > On Sun, Nov 29, 2020 at 6:53 PM Pali Rohár <pali@kernel.org> wrote: > > > > Now when usbtty serial console is fixed in U-Boot enable it for Nokia RX-51 > > board by default. > > > > CONFIG_CONSOLE_MUX is already used and U-Boot console is available for > > all in/out devices. Therefore there is no need to have separate commands > > 'run sercon', 'run usbcon' and 'run vgacon', so remove them. > > > > As space for U-Boot is limited to 256kB, disable some other unused options > > so CONFIG_USB_TTY can be enabled. > > > > Nokia RX-51 does not have easily accessible UART serial console so the only > > option for easy debugging is to use device's keyboard+screen or this usbtty > > serial console over USB. > > I think it's not a good idea to revive usbtty. Well, but u-boot does not support anything else for Nokia N900. And main issues here are musb bugs which this patch series is fixing. For debugging is serial console (e.g. usbtty) needed. > I was recently playing around f_serial.c (I can send you the half > baked stuff, which by a lot of twisted code in DWC3 driver is not > working properly, actually almost not working) and I think that would > be the right thing to do. > > usbtty quite old, intrusive way of serial console via USB supported > only by outdated hardware (like this Nokia N-900), while f_serial > gotta work on better recent base. And I believe musb should be, if > needed, patched to support composite devices. > > So, kinda disagreement from my side as a summary on this. > But disclaimer, I'm not a maintainer here, just my 2 cents. > > > > > -- > With Best Regards, > Andy Shevchenko
On Sun, Dec 27, 2020 at 6:35 PM Pali Rohár <pali@kernel.org> wrote: > On Sunday 27 December 2020 18:28:25 Andy Shevchenko wrote: > > On Sun, Nov 29, 2020 at 6:53 PM Pali Rohár <pali@kernel.org> wrote: > > > > > > Now when usbtty serial console is fixed in U-Boot enable it for Nokia RX-51 > > > board by default. > > > > > > CONFIG_CONSOLE_MUX is already used and U-Boot console is available for > > > all in/out devices. Therefore there is no need to have separate commands > > > 'run sercon', 'run usbcon' and 'run vgacon', so remove them. > > > > > > As space for U-Boot is limited to 256kB, disable some other unused options > > > so CONFIG_USB_TTY can be enabled. > > > > > > Nokia RX-51 does not have easily accessible UART serial console so the only > > > option for easy debugging is to use device's keyboard+screen or this usbtty > > > serial console over USB. > > > > I think it's not a good idea to revive usbtty. > > Well, but u-boot does not support anything else for Nokia N900. And main > issues here are musb bugs which this patch series is fixing. For > debugging is serial console (e.g. usbtty) needed. I'm not against musb fixes, I'm against promoting usbtty. Why composite + f_serial can't be used for that? > > I was recently playing around f_serial.c (I can send you the half > > baked stuff, which by a lot of twisted code in DWC3 driver is not > > working properly, actually almost not working) and I think that would > > be the right thing to do. > > > > usbtty quite old, intrusive way of serial console via USB supported > > only by outdated hardware (like this Nokia N-900), while f_serial > > gotta work on better recent base. And I believe musb should be, if > > needed, patched to support composite devices. > > > > So, kinda disagreement from my side as a summary on this. > > But disclaimer, I'm not a maintainer here, just my 2 cents.
On Sunday 27 December 2020 18:42:19 Andy Shevchenko wrote: > On Sun, Dec 27, 2020 at 6:35 PM Pali Rohár <pali@kernel.org> wrote: > > On Sunday 27 December 2020 18:28:25 Andy Shevchenko wrote: > > > On Sun, Nov 29, 2020 at 6:53 PM Pali Rohár <pali@kernel.org> wrote: > > > > > > > > Now when usbtty serial console is fixed in U-Boot enable it for Nokia RX-51 > > > > board by default. > > > > > > > > CONFIG_CONSOLE_MUX is already used and U-Boot console is available for > > > > all in/out devices. Therefore there is no need to have separate commands > > > > 'run sercon', 'run usbcon' and 'run vgacon', so remove them. > > > > > > > > As space for U-Boot is limited to 256kB, disable some other unused options > > > > so CONFIG_USB_TTY can be enabled. > > > > > > > > Nokia RX-51 does not have easily accessible UART serial console so the only > > > > option for easy debugging is to use device's keyboard+screen or this usbtty > > > > serial console over USB. > > > > > > I think it's not a good idea to revive usbtty. > > > > Well, but u-boot does not support anything else for Nokia N900. And main > > issues here are musb bugs which this patch series is fixing. For > > debugging is serial console (e.g. usbtty) needed. > > I'm not against musb fixes, I'm against promoting usbtty. > Why composite + f_serial can't be used for that? Because nobody looked at it and invested time in it. usbtty was there for a long time and is working fine right now (with these musb patches). > > > I was recently playing around f_serial.c (I can send you the half > > > baked stuff, which by a lot of twisted code in DWC3 driver is not > > > working properly, actually almost not working) and I think that would > > > be the right thing to do. > > > > > > usbtty quite old, intrusive way of serial console via USB supported > > > only by outdated hardware (like this Nokia N-900), while f_serial > > > gotta work on better recent base. And I believe musb should be, if > > > needed, patched to support composite devices. > > > > > > So, kinda disagreement from my side as a summary on this. > > > But disclaimer, I'm not a maintainer here, just my 2 cents. > > > > -- > With Best Regards, > Andy Shevchenko
diff --git a/configs/nokia_rx51_defconfig b/configs/nokia_rx51_defconfig index 0f05fe6fc3..e1b874a870 100644 --- a/configs/nokia_rx51_defconfig +++ b/configs/nokia_rx51_defconfig @@ -44,18 +44,16 @@ CONFIG_MTDPARTS_DEFAULT="mtdparts=onenand:128k(bootloader)ro,384k(config),256k(l CONFIG_ENV_OVERWRITE=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y # CONFIG_NET is not set -CONFIG_TWL4030_LED=y # CONFIG_MMC_HW_PARTITIONING is not set +# CONFIG_MMC_VERBOSE is not set CONFIG_MMC_OMAP_HS=y CONFIG_MTD=y CONFIG_CONS_INDEX=3 CONFIG_SYS_NS16550=y CONFIG_SPI=y CONFIG_USB=y -CONFIG_USB_MUSB_HCD=y CONFIG_USB_MUSB_UDC=y CONFIG_USB_OMAP3=y -CONFIG_TWL4030_USB=y CONFIG_CFB_CONSOLE=y CONFIG_CFB_CONSOLE_ANSI=y # CONFIG_VGA_AS_SINGLE_DEVICE is not set @@ -66,3 +64,5 @@ CONFIG_DM_I2C=y CONFIG_DM_MMC=y # CONFIG_DM_DEVICE_REMOVE is not set # CONFIG_SYS_MALLOC_F is not set +# CONFIG_DM_WARN is not set +# CONFIG_BLOCK_CACHE is not set diff --git a/doc/README.nokia_rx51 b/doc/README.nokia_rx51 index 320b5efc7d..84d1912ddd 100644 --- a/doc/README.nokia_rx51 +++ b/doc/README.nokia_rx51 @@ -24,8 +24,7 @@ called u-boot-gen-combined. It is available in following repository: There is support for hardware watchdog. Hardware watchdog is started by NOLO so u-boot must kick watchdog to prevent reboot device (but not very often, max every 2 seconds). There is also support for framebuffer display -output with ANSI escape codes and the N900 HW keyboard input. USB tty works -but is disabled because it prevents the current Maemo kernel from booting. +output with ANSI escape codes and the N900 HW keyboard input. When U-Boot is starting it enable IBE bit in Auxiliary Control Register, which is needed for Thumb-2 ISA support. It is workaround for errata 430973. @@ -49,10 +48,6 @@ Boot from SD or eMMC in this order: Available additional commands/variables: - * run sercon - Use serial port for control - * run usbcon - Use usbtty for control - * run vgacon - Use framebuffer and HW keyboard for control (default) - * run sdboot - Boot from external SD card (see boot order) * run emmcboot - Boot from internal eMMC memory (see boot order) * run attachboot - Boot attached kernel image (attached to U-Boot binary) @@ -87,14 +82,6 @@ Additional variables for booting kernel: and u-boot standard output is set to serial then setup_console_atag is automatically set to 1. So output from Maemo kernel would go to serial port. -USB TTY: - - Maemo kernel 2.6.28 will crash if u-boot enable usb tty. So USB TTY is disabled. - For enabling USB TTY just add this line to file include/configs/nokia_rx51.h - - #define CONFIG_USB_TTY - - UBIFS support: UBIFS support is disabled, because U-Boot image is too big and cannot be diff --git a/include/configs/nokia_rx51.h b/include/configs/nokia_rx51.h index 6879f52a0c..36b1f9221c 100644 --- a/include/configs/nokia_rx51.h +++ b/include/configs/nokia_rx51.h @@ -70,6 +70,7 @@ /* USB device configuration */ #define CONFIG_USB_DEVICE +#define CONFIG_USB_TTY #define CONFIG_USBD_VENDORID 0x0421 #define CONFIG_USBD_PRODUCTID 0x01c8 #define CONFIG_USBD_MANUFACTURER "Nokia" @@ -108,15 +109,9 @@ int rx51_kp_getc(struct stdio_dev *sdev); /* Environment information */ #define CONFIG_EXTRA_ENV_SETTINGS \ "usbtty=cdc_acm\0" \ - "stdin=serial,vga\0" \ - "stdout=serial,vga\0" \ - "stderr=serial,vga\0" \ - "setcon=setenv stdin ${con};" \ - "setenv stdout ${con};" \ - "setenv stderr ${con}\0" \ - "sercon=setenv con serial; run setcon\0" \ - "usbcon=setenv con usbtty; run setcon\0" \ - "vgacon=setenv con vga; run setcon\0" \ + "stdin=usbtty,serial,vga\0" \ + "stdout=usbtty,serial,vga\0" \ + "stderr=usbtty,serial,vga\0" \ "slide=gpio input " __stringify(GPIO_SLIDE) "\0" \ "switchmmc=mmc dev ${mmcnum}\0" \ "kernaddr=0x82008000\0" \ @@ -209,9 +204,6 @@ int rx51_kp_getc(struct stdio_dev *sdev); #define CONFIG_POSTBOOTMENU \ "echo;" \ "echo Extra commands:;" \ - "echo run sercon - Use serial port for control.;" \ - "echo run usbcon - Use usbtty for control.;" \ - "echo run vgacon - Use framebuffer/keyboard.;" \ "echo run sdboot - Boot from SD card slot.;" \ "echo run emmcboot - Boot internal eMMC memory.;" \ "echo run attachboot - Boot attached kernel image.;" \
Now when usbtty serial console is fixed in U-Boot enable it for Nokia RX-51 board by default. CONFIG_CONSOLE_MUX is already used and U-Boot console is available for all in/out devices. Therefore there is no need to have separate commands 'run sercon', 'run usbcon' and 'run vgacon', so remove them. As space for U-Boot is limited to 256kB, disable some other unused options so CONFIG_USB_TTY can be enabled. Nokia RX-51 does not have easily accessible UART serial console so the only option for easy debugging is to use device's keyboard+screen or this usbtty serial console over USB. Signed-off-by: Pali Rohár <pali@kernel.org> --- configs/nokia_rx51_defconfig | 6 +++--- doc/README.nokia_rx51 | 15 +-------------- include/configs/nokia_rx51.h | 16 ++++------------ 3 files changed, 8 insertions(+), 29 deletions(-)