From patchwork Mon Nov 30 19:27:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pali_Roh=C3=A1r?= X-Patchwork-Id: 1408454 X-Patchwork-Delegate: lokeshvutla@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=default header.b=Nhw7kSjJ; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4ClFcw1XJTz9sVj for ; Tue, 1 Dec 2020 06:28:00 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 776748264E; Mon, 30 Nov 2020 20:27:50 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="Nhw7kSjJ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 0C30F8265D; Mon, 30 Nov 2020 20:27:48 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-8.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_HI,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id A66A582617 for ; Mon, 30 Nov 2020 20:27:37 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=pali@kernel.org Received: from pali.im (pali.im [31.31.79.79]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 52BA52067C; Mon, 30 Nov 2020 19:27:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1606764450; bh=ffB/wa3QckDindly5FuOwvww4kxAYCM4xW5ovnZXZHc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Nhw7kSjJg1AMtxDZxwWrE4pWR1tIBkBIPBdZ7SZwsolKQAPcOSgVeDhwCzadilGHL U6sqqXce8z6Z1ooX8ixj66vu0SaofZQphCoDeUoK9bYjkeUE93Cgk9M6ZEE7iU+bJG F+lzWs2/J+OATnoG7pQFSQSyTdaw4FcYOHIJVlt4= Received: by pali.im (Postfix) id DD6CF81A; Mon, 30 Nov 2020 20:27:27 +0100 (CET) From: =?utf-8?q?Pali_Roh=C3=A1r?= To: Lokesh Vutla , Lukasz Majewski , Marek Vasut , Simon Glass Cc: Ivaylo Dimitrov , Tony Lindgren , Pavel Machek , Aaro Koskinen , Merlijn Wajer , u-boot@lists.denx.de, maemo-leste@lists.dyne.org Subject: [PATCH v2] Nokia RX-51: Enable usbtty serial console by default Date: Mon, 30 Nov 2020 20:27:15 +0100 Message-Id: <20201130192715.1793-1-pali@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201129165252.6350-1-pali@kernel.org> References: <20201129165252.6350-1-pali@kernel.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean 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 --- 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@kernel.org/ https://patchwork.ozlabs.org/project/uboot/patch/20201121223317.14347-1-pali@kernel.org/ https://patchwork.ozlabs.org/project/uboot/patch/20201129161505.5092-1-pali@kernel.org/ https://patchwork.ozlabs.org/project/uboot/patch/20201130191034.795-1-pali@kernel.org/ --- 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.;" \