[U-Boot] [PATCH v3 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 usbkeyboard rockchip: firefly: Add "usb start" to auto-start USB device rockchip: firefly: Set the environment variable 'usbkbd' to the stdin
include/configs/firefly-rk3288.h | 2 +- include/configs/rk3288_common.h | 6 +++++- 2 files changed, 6 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: I36378e53705f7a7e5470bcea59d7947b22eaa298 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 "usb start" to #define PREBOOT,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: I40f6d81a6e8478703cb03c44e0f00fc2d26df33a Signed-off-by: Leo Wen leo.wen@rock-chips.com --- include/configs/rk3288_common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/configs/rk3288_common.h b/include/configs/rk3288_common.h index ac268cd..23d7389 100644 --- a/include/configs/rk3288_common.h +++ b/include/configs/rk3288_common.h @@ -113,6 +113,6 @@ BOOTENV #endif
-#define CONFIG_PREBOOT +#define CONFIG_PREBOOT "usb start"
#endif

HI leo,
Leo Wen wrote on 2017年07月25日 13:53:
Add "usb start" to #define PREBOOT,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: I40f6d81a6e8478703cb03c44e0f00fc2d26df33a
Change-Id should be removed.
Signed-off-by: Leo Wen leo.wen@rock-chips.com
include/configs/rk3288_common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/configs/rk3288_common.h b/include/configs/rk3288_common.h index ac268cd..23d7389 100644 --- a/include/configs/rk3288_common.h +++ b/include/configs/rk3288_common.h @@ -113,6 +113,6 @@ BOOTENV #endif
-#define CONFIG_PREBOOT +#define CONFIG_PREBOOT "usb start"
It should not be set in here, it will affect all rockchip bords.
You can append "preboot=usb start;" to ROCKCHIP_DEVICE_SETTINGS. https://github.com/rockchip-linux/u-boot/blob/release/include/configs/firefl...
#endif

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: I3979c661adcf88904a0e8e10d27ceffc5081eae9 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"
participants (3)
-
Jacob Chen
-
leo
-
Leo Wen