All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lokesh Vutla <lokeshvutla@ti.com>
To: u-boot@lists.denx.de
Subject: [PATCH v2] Nokia RX-51: Enable usbtty serial console by default
Date: Tue, 22 Dec 2020 21:08:45 +0530	[thread overview]
Message-ID: <76a88c4a-377a-f52f-a8cf-7d668514e34c@ti.com> (raw)
In-Reply-To: <20201222151741.bxmyyd2eeoqscv4w@pali>



On 22/12/20 8:47 pm, Pali Roh?r wrote:
> On Tuesday 22 December 2020 20:39:11 Lokesh Vutla wrote:
>>
>>
>> On 22/12/20 8:38 pm, Lokesh Vutla wrote:
>>>
>>>
>>> On 22/12/20 8:36 pm, Lokesh Vutla wrote:
>>>>
>>>>
>>>> On 22/12/20 8:28 pm, Pali Roh?r wrote:
>>>>> On Tuesday 22 December 2020 19:56:51 Lokesh Vutla wrote:
>>>>>>
>>>>>>
>>>>>> On 01/12/20 12:57 am, Pali Roh?r wrote:
>>>>>>> Now when usbtty serial console is fixed in U-Boot enable CONFIG_USB_TTY for
>>>>>>> Nokia RX-51 board by default.
>>>>>>>
>>>>>>> Fix also USB product id as U-Boot ignores CONFIG_USBD_PRODUCTID macro and
>>>>>>> include U-Boot string into USB product name to indicate usage of U-Boot.
>>>>>>>
>>>>>>> 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>
>>>>>>> ---
>>>>>>> Changes since v1:
>>>>>>> * Fixed USB product id and product name
>>>>>>> * Disabled some other options to free more space
>>>>>>> * Changes now passed CI tests:
>>>>>>>   https://dev.azure.com/u-boot/u-boot/_build/results?buildId=1492&view=results
>>>>>>>
>>>>>>> Note that this patch depends on other Nokia RX-51 patches which are on
>>>>>>> mailing list, otherwise CI tests do not pass:
>>>>>>>
>>>>>>> https://patchwork.ozlabs.org/project/uboot/patch/20201121223011.14262-1-pali at kernel.org/
>>>>>>> https://patchwork.ozlabs.org/project/uboot/patch/20201121223317.14347-1-pali at kernel.org/
>>>>>>> https://patchwork.ozlabs.org/project/uboot/patch/20201129161505.5092-1-pali at kernel.org/
>>>>>>> https://patchwork.ozlabs.org/project/uboot/patch/20201130191034.795-1-pali at kernel.org/
>>>>>>
>>>>>> okay, Ill wait for all these patches to get merged, before I pick this patch.
>>>>>
>>>>> Web pages for all these patches is saying:
>>>>>
>>>>> State: Under Review
>>>>> Delegated to: Lokesh Vutla
>>>>>
>>>>> So I think these patches are also waiting for you.
>>>>
>>>> The main patch I need is this[0]. Without this I am getting a build failure as
>>>> you mentioned in the commit description. So, Until [0] patch is applied I cannot
>>>> apply this patch. Since you combined disabling of other configs in the same
>>>> patch, it is causing my pipeline failure.
>>>>
>>>> Can you split the disabling of other configs into a separate patch so that
>>>> others are unblocked?
>>>
>>> [0]
>>> https://patchwork.ozlabs.org/project/uboot/patch/20201130192715.1793-1-pali at kernel.org/
>>
>> ahh copy paste issues:
>> [0]
>> https://patchwork.ozlabs.org/project/uboot/patch/20201129164618.5829-3-pali at kernel.org/
> 
> Sorry, now I'm somehow lost.
> 
> All patches are in my git repository git://github.com/pali/u-boot.git in
> branch nokia-rx51. And this branch passed pipeline checks.

Yeah because there is a usb patch that is not in my queue which is fixing build
issues.

Let me give more details. Below are the patches that are in my queue:

	[v2] Nokia RX-51: Enable usbtty serial console by default	
	Nokia RX-51: Do not try calling both ext2load and ext4load	
	Nokia RX-51: Add test for U-Boot serial console	Nokia RX-51:
	Nokia RX-51: Convert to CONFIG_DM_MMC
	Nokia RX-51: Decrease i2c speed to 100000

Issue1:
If I apply all these patches I get this build error
https://pastebin.ubuntu.com/p/R7P6z8RJJZ/

When I saw you queue, the patch [0] is fixing the build error. But it[0] is
assigned to Marek. So I bisecting the error to $patch and dropped it from my
queue for now.

Issue2:
After applying the below 4 patches, I see the Gitlab pipeline error[1].
	Nokia RX-51: Do not try calling both ext2load and ext4load	
	Nokia RX-51: Add test for U-Boot serial console	Nokia RX-51:
	Nokia RX-51: Convert to CONFIG_DM_MMC
	Nokia RX-51: Decrease i2c speed to 100000

This error[1] can be solved by disabling unnecessary configs like the ones you
disabled in $patch
	+# CONFIG_DM_WARN is not set
        +# CONFIG_DM_SEQ_ALIAS is not set
        +# CONFIG_BLOCK_CACHE is not set
        +# CONFIG_SYS_DEVICE_NULLDEV is not set

I am asking to send the above as a separate patch so that the 4 patches can be
un blocked.
Hope this is clear.

[0]
https://patchwork.ozlabs.org/project/uboot/patch/20201129164618.5829-3-pali at kernel.org/
[1] https://gitlab.denx.de/u-boot/custodians/u-boot-ti/-/jobs/192532

Thanks and regards,
Lokesh

> 
> It took me some time to prepare all patches in state that after applying
> all of them whole pipeline pass.
> 
> As this starting to be complicated, could you please tell me which
> commit/patch either needs to be modified or if needed how to change
> order of them?
> 
>> Thanks and regards,
>> Lokesh
>>
>>
>>>
>>> Sorry missed this.
>>>
>>> Thanks and regards,
>>> Lokesh
>>>
>>>>
>>>> Thanks and regards,
>>>> Lokesh
>>>>
>>>>>
>>>>>> Thanks and regards,
>>>>>> Lokesh
>>>>>>
>>>>>>> ---
>>>>>>>  configs/nokia_rx51_defconfig |  8 +++++---
>>>>>>>  doc/README.nokia_rx51        | 15 +--------------
>>>>>>>  include/configs/nokia_rx51.h | 21 +++++++--------------
>>>>>>>  3 files changed, 13 insertions(+), 31 deletions(-)
>>>>>>>
>>>>>>> diff --git a/configs/nokia_rx51_defconfig b/configs/nokia_rx51_defconfig
>>>>>>> index 0f05fe6fc3..963dd145ce 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,7 @@ 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_DM_SEQ_ALIAS is not set
>>>>>>> +# CONFIG_BLOCK_CACHE is not set
>>>>>>> +# CONFIG_SYS_DEVICE_NULLDEV 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 3f2700d8e2..23368de624 100644
>>>>>>> --- a/include/configs/nokia_rx51.h
>>>>>>> +++ b/include/configs/nokia_rx51.h
>>>>>>> @@ -70,10 +70,12 @@
>>>>>>>  
>>>>>>>  /* USB device configuration */
>>>>>>>  #define CONFIG_USB_DEVICE
>>>>>>> +#define CONFIG_USB_TTY
>>>>>>>  #define CONFIG_USBD_VENDORID		0x0421
>>>>>>> -#define CONFIG_USBD_PRODUCTID		0x01c8
>>>>>>> +#define CONFIG_USBD_PRODUCTID_CDCACM	0x01c8
>>>>>>> +#define CONFIG_USBD_PRODUCTID_GSERIAL	0x01c8
>>>>>>>  #define CONFIG_USBD_MANUFACTURER	"Nokia"
>>>>>>> -#define CONFIG_USBD_PRODUCT_NAME	"N900"
>>>>>>> +#define CONFIG_USBD_PRODUCT_NAME	"N900 (U-Boot)"
>>>>>>>  
>>>>>>>  #define GPIO_SLIDE			71
>>>>>>>  
>>>>>>> @@ -108,15 +110,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" \
>>>>>>> @@ -198,9 +194,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.;" \
>>>>>>>

  reply	other threads:[~2020-12-22 15:38 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-29 16:46 [PATCH 00/13] Nokia RX-51: Fix USB TTY console and enable it Pali Rohár
2020-11-29 16:46 ` [PATCH 01/13] serial: usbtty: Fix puts function Pali Rohár
2020-11-29 17:50   ` Pavel Machek
2020-11-29 16:46 ` [PATCH 02/13] usb: musb: Fix compilation of gadget code Pali Rohár
2020-11-29 17:52   ` Pavel Machek
2021-01-16  0:18     ` Pali Rohár
2020-11-29 16:46 ` [PATCH 03/13] usb: musb: Always clear the data toggle bit when configuring ep Pali Rohár
2020-11-29 17:52   ` Pavel Machek
2020-11-29 16:46 ` [PATCH 04/13] usb: musb: Fix configuring FIFO for endpoints Pali Rohár
2020-11-29 17:53   ` Pavel Machek
2020-12-26 18:08   ` [PATCH v2] " Pali Rohár
2020-11-29 16:46 ` [PATCH 05/13] usb: musb: Read value of PERI_RXCSR to 16bit variable Pali Rohár
2020-11-29 17:53   ` Pavel Machek
2020-11-29 16:46 ` [PATCH 06/13] usb: musb: Fix transmission of bigger buffers Pali Rohár
2020-11-29 17:55   ` Pavel Machek
2020-11-29 16:46 ` [PATCH 07/13] usb: gadget: Do not export usbd_device_* arrays Pali Rohár
2020-11-29 17:57   ` Pavel Machek
2020-12-26 18:12   ` [PATCH v2] " Pali Rohár
2020-11-29 16:49 ` [PATCH 08/13] usb: gadget: Use dbg_ep0() macro instead of serial_printf() Pali Rohár
2020-11-29 17:57   ` Pavel Machek
2020-11-29 16:51 ` [PATCH 09/13] arm: omap3: Compile lowlevel_init() function only when it is used Pali Rohár
2020-11-29 17:59   ` Pavel Machek
2020-11-29 16:52 ` [PATCH 10/13] arm: omap3: Compile s_init() " Pali Rohár
2020-11-29 18:00   ` Pavel Machek
2020-11-29 16:52 ` [PATCH 11/13] Nokia RX-51: Remove function set_muxconf_regs() Pali Rohár
2020-11-29 16:52 ` [PATCH 12/13] Nokia RX-51: Move content of rx51.h to rx51.c Pali Rohár
2020-11-29 16:52 ` [PATCH 13/13] Nokia RX-51: Enable usbtty serial console by default Pali Rohár
2020-11-29 18:11   ` Pavel Machek
2020-11-30 19:27   ` [PATCH v2] " Pali Rohár
2020-12-22 14:26     ` Lokesh Vutla
2020-12-22 14:58       ` Pali Rohár
2020-12-22 15:06         ` Lokesh Vutla
2020-12-22 15:08           ` Lokesh Vutla
2020-12-22 15:09             ` Lokesh Vutla
2020-12-22 15:17               ` Pali Rohár
2020-12-22 15:38                 ` Lokesh Vutla [this message]
2020-12-22 16:02                   ` Pali Rohár
2020-12-23  6:05                     ` Lokesh Vutla
2020-12-26 17:01                       ` Pali Rohár
2020-12-27 16:28   ` [PATCH 13/13] " Andy Shevchenko
2020-12-27 16:35     ` Pali Rohár
2020-12-27 16:42       ` Andy Shevchenko
2020-12-27 16:50         ` Pali Rohár
2020-12-10 20:01 ` [PATCH 00/13] Nokia RX-51: Fix USB TTY console and enable it Pali Rohár
2020-12-11 10:53   ` Lokesh Vutla
2020-12-19 23:46     ` Pali Rohár
2020-12-27 16:32 ` Pali Rohár
2021-01-17 10:37 ` Lokesh Vutla
2021-02-01 15:30   ` Pali Rohár

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=76a88c4a-377a-f52f-a8cf-7d668514e34c@ti.com \
    --to=lokeshvutla@ti.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.