[U-Boot] [PATCH v4 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
include/configs/firefly-rk3288.h | 5 +++-- include/configs/rk3288_common.h | 4 ++++ 2 files changed, 7 insertions(+), 2 deletions(-)

Add four macros of CONFIG_USB_KEYBOARD,CONFIG_DM_KEYBOARD,etc in the rk3288_common.h,can support usb keyboard device when these four macros are enabled.
Change-Id: I13696758827f3129733cdd21073a83781be93b06 Signed-off-by: Leo Wen leo.wen@rock-chips.com --- include/configs/rk3288_common.h | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/include/configs/rk3288_common.h b/include/configs/rk3288_common.h index ac36986..ac268cd 100644 --- a/include/configs/rk3288_common.h +++ b/include/configs/rk3288_common.h @@ -88,6 +88,10 @@ #define CONFIG_USB_HOST_ETHER #define CONFIG_USB_ETHER_SMSC95XX #define CONFIG_USB_ETHER_ASIX +#define CONFIG_USB_KEYBOARD +#define CONFIG_DM_KEYBOARD +#define CONFIG_SYS_USB_EVENT_POLL +#define CONFIG_SYS_STDIO_DEREGISTER 1 #endif #define ENV_MEM_LAYOUT_SETTINGS \ "scriptaddr=0x00000000\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'.
Change-Id: Ia1e65ca6e22cff90c9338e6474c0b27c9bef93da 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 "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.
Change-Id: I28fc883ca7b1151a72fb7342aaaf5802492e867b 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>
participants (1)
-
Leo Wen