[U-Boot] [PATCH v6 0/3] rockchip: firefly: Enabled the USB keyboard in the uboot

These three patches enable usbkeyboard drivers(usb_kbd.c) and set some environment variables to auto-start USB device. You can use the usbkeyboard instead of the serial input command in uboot.
Leo Wen (3): rockchip: firefly: Add some macros to enable the usb keyboard rockchip: firefly: Set the environment variable 'usbkbd' to the stdin rockchip: firefly: Add "usb start" to auto-start USB device
configs/firefly-rk3288_defconfig | 4 ++++ include/configs/firefly-rk3288.h | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-)

Add four macros of CONFIG_USB_KEYBOARD,CONFIG_DM_KEYBOARD,etc in the firefly-rk3288_defconfig,can support usb keyboard device when these four macros are enabled.
Signed-off-by: Leo Wen leo.wen@rock-chips.com --- configs/firefly-rk3288_defconfig | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/configs/firefly-rk3288_defconfig b/configs/firefly-rk3288_defconfig index 6f093f4..5173c3f 100644 --- a/configs/firefly-rk3288_defconfig +++ b/configs/firefly-rk3288_defconfig @@ -75,3 +75,7 @@ CONFIG_CONSOLE_SCROLL_LINES=10 CONFIG_USE_TINY_PRINTF=y CONFIG_CMD_DHRYSTONE=y CONFIG_ERRNO_STR=y +CONFIG_USB_KEYBOARD=y +CONFIG_DM_KEYBOARD=y +CONFIG_SYS_USB_EVENT_POLL=y +CONFIG_SYS_STDIO_DEREGISTER=y

Add four macros of CONFIG_USB_KEYBOARD,CONFIG_DM_KEYBOARD,etc in the firefly-rk3288_defconfig,can support usb keyboard device when these four macros are enabled.
Signed-off-by: Leo Wen leo.wen@rock-chips.com
configs/firefly-rk3288_defconfig | 4 ++++ 1 file changed, 4 insertions(+)
Acked-by: Philipp Tomsich philipp.tomsich@theobroma-systems.com

Add four macros of CONFIG_USB_KEYBOARD,CONFIG_DM_KEYBOARD,etc in the firefly-rk3288_defconfig,can support usb keyboard device when these four macros are enabled.
Signed-off-by: Leo Wen leo.wen@rock-chips.com Acked-by: Philipp Tomsich philipp.tomsich@theobroma-systems.com
configs/firefly-rk3288_defconfig | 4 ++++ 1 file changed, 4 insertions(+)
Reviewed-by: Philipp Tomsich philipp.tomsich@theobroma-systems.com

Add four macros of CONFIG_USB_KEYBOARD,CONFIG_DM_KEYBOARD,etc in the firefly-rk3288_defconfig,can support usb keyboard device when these four macros are enabled.
Signed-off-by: Leo Wen leo.wen@rock-chips.com Acked-by: Philipp Tomsich philipp.tomsich@theobroma-systems.com Reviewed-by: Philipp Tomsich philipp.tomsich@theobroma-systems.com
configs/firefly-rk3288_defconfig | 4 ++++ 1 file changed, 4 insertions(+)
Applied to u-boot-rockchip, thanks!

Add the 'usbkbd' environment variable to the 'stdin', the contents of the keyboard input can be auto-displayed on the serial terminal,so you don't need to manually set the environment variable 'stdin'.
Signed-off-by: Leo Wen leo.wen@rock-chips.com --- include/configs/firefly-rk3288.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/configs/firefly-rk3288.h b/include/configs/firefly-rk3288.h index b4dcf23..6ef0960 100644 --- a/include/configs/firefly-rk3288.h +++ b/include/configs/firefly-rk3288.h @@ -8,7 +8,7 @@ #define __CONFIG_H
#define ROCKCHIP_DEVICE_SETTINGS \ - "stdin=serial,cros-ec-keyb\0" \ + "stdin=serial,usbkbd\0" \ "stdout=serial,vidconsole\0" \ "stderr=serial,vidconsole\0"

Add the 'usbkbd' environment variable to the 'stdin', the contents of the keyboard input can be auto-displayed on the serial terminal,so you don't need to manually set the environment variable 'stdin'.
Signed-off-by: Leo Wen leo.wen@rock-chips.com
include/configs/firefly-rk3288.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Acked-by: Philipp Tomsich philipp.tomsich@theobroma-systems.com

Add the 'usbkbd' environment variable to the 'stdin', the contents of the keyboard input can be auto-displayed on the serial terminal,so you don't need to manually set the environment variable 'stdin'.
Signed-off-by: Leo Wen leo.wen@rock-chips.com Acked-by: Philipp Tomsich philipp.tomsich@theobroma-systems.com
include/configs/firefly-rk3288.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Philipp Tomsich philipp.tomsich@theobroma-systems.com

Add the 'usbkbd' environment variable to the 'stdin', the contents of the keyboard input can be auto-displayed on the serial terminal,so you don't need to manually set the environment variable 'stdin'.
Signed-off-by: Leo Wen leo.wen@rock-chips.com Acked-by: Philipp Tomsich philipp.tomsich@theobroma-systems.com Reviewed-by: Philipp Tomsich philipp.tomsich@theobroma-systems.com
include/configs/firefly-rk3288.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Applied to u-boot-rockchip, thanks!

Add "preboot=usb start" to ROCKCHIP_DEVICE_SETTINGS,you don't need to input "usb start" in command line of u-boot console,it can auto-start the USB device,after that usb keyboard can work.
Signed-off-by: Leo Wen leo.wen@rock-chips.com --- include/configs/firefly-rk3288.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/include/configs/firefly-rk3288.h b/include/configs/firefly-rk3288.h index 6ef0960..c99ab99 100644 --- a/include/configs/firefly-rk3288.h +++ b/include/configs/firefly-rk3288.h @@ -10,7 +10,8 @@ #define ROCKCHIP_DEVICE_SETTINGS \ "stdin=serial,usbkbd\0" \ "stdout=serial,vidconsole\0" \ - "stderr=serial,vidconsole\0" + "stderr=serial,vidconsole\0" \ + "preboot=usb start\0"
#include <configs/rk3288_common.h>

Add "preboot=usb start" to ROCKCHIP_DEVICE_SETTINGS,you don't need to input "usb start" in command line of u-boot console,it can auto-start the USB device,after that usb keyboard can work.
Signed-off-by: Leo Wen leo.wen@rock-chips.com
include/configs/firefly-rk3288.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
Acked-by: Philipp Tomsich philipp.tomsich@theobroma-systems.com

Add "preboot=usb start" to ROCKCHIP_DEVICE_SETTINGS,you don't need to input "usb start" in command line of u-boot console,it can auto-start the USB device,after that usb keyboard can work.
Signed-off-by: Leo Wen leo.wen@rock-chips.com Acked-by: Philipp Tomsich philipp.tomsich@theobroma-systems.com
include/configs/firefly-rk3288.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
Reviewed-by: Philipp Tomsich philipp.tomsich@theobroma-systems.com

Add "preboot=usb start" to ROCKCHIP_DEVICE_SETTINGS,you don't need to input "usb start" in command line of u-boot console,it can auto-start the USB device,after that usb keyboard can work.
Signed-off-by: Leo Wen leo.wen@rock-chips.com Acked-by: Philipp Tomsich philipp.tomsich@theobroma-systems.com Reviewed-by: Philipp Tomsich philipp.tomsich@theobroma-systems.com
include/configs/firefly-rk3288.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
Applied to u-boot-rockchip, thanks!
participants (2)
-
Leo Wen
-
Philipp Tomsich