Re: [U-Boot] [PATCH] cros-ec-keyboard: Synchronize DT binding from linux
On 17 December 2014 at 20:41, Simon Glass s...@chromium.org wrote: Hi, On 16 December 2014 at 01:03, Sjoerd Simons sjoerd.sim...@collabora.co.uk wrote: On Mon, 2014-12-15 at 23:34 +0100, Pavel Machek wrote: On Thu 2014-11-27 16:34:08, Sjoerd Simons wrote: The ChromeOS EC keyboard is used by various different chromebooks. Peach pi being the third board in the u-boot tree to use it (snow and peach pit the other two). Rather then embedding the same big DT node in the peach-pi DT again, copy the dtsi snippit bindings documentation from linux and include it in all 3 boards. This slightly changes the dt bindings in u-boot: ... * google,repeat-delay-ms and google,repeat-rate-ms are no longer used and replaced by hardcoded values (similar to tegra kbc) If more than one board needs this (and it clearly does) it would be good to make the binding official...? I guess that means talking to linux Documentation/devicetree maintainers... Device tree is for describing hardware, while repeat rate delay are user preferences, not something inherent to the hardware. As such, those properties do not belong in device-tree in the first place. Fwiw, Linux by default uses a delay of 250ms and a period of 33ms unless the driver handles auto-repeat (e.g. for PS2 which does repeat in hardware). If your goal is to fix the hardcoding of these values in various drivers, it's probably better to make u-boot input core have sane defaults for repeat rather then pushing it out into device-tree. This patch could be adjusted to drop the common keyboard file, which is now in mainline. But on the other hand, it will probably apply cleaning for Minkyu. I'll pick this up and apply it on top of my previous change. Applied to u-boot-x86 branch misc, thanks! - Simon ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] cros-ec-keyboard: Synchronize DT binding from linux
Hi, On 16 December 2014 at 01:03, Sjoerd Simons sjoerd.sim...@collabora.co.uk wrote: On Mon, 2014-12-15 at 23:34 +0100, Pavel Machek wrote: On Thu 2014-11-27 16:34:08, Sjoerd Simons wrote: The ChromeOS EC keyboard is used by various different chromebooks. Peach pi being the third board in the u-boot tree to use it (snow and peach pit the other two). Rather then embedding the same big DT node in the peach-pi DT again, copy the dtsi snippit bindings documentation from linux and include it in all 3 boards. This slightly changes the dt bindings in u-boot: ... * google,repeat-delay-ms and google,repeat-rate-ms are no longer used and replaced by hardcoded values (similar to tegra kbc) If more than one board needs this (and it clearly does) it would be good to make the binding official...? I guess that means talking to linux Documentation/devicetree maintainers... Device tree is for describing hardware, while repeat rate delay are user preferences, not something inherent to the hardware. As such, those properties do not belong in device-tree in the first place. Fwiw, Linux by default uses a delay of 250ms and a period of 33ms unless the driver handles auto-repeat (e.g. for PS2 which does repeat in hardware). If your goal is to fix the hardcoding of these values in various drivers, it's probably better to make u-boot input core have sane defaults for repeat rather then pushing it out into device-tree. This patch could be adjusted to drop the common keyboard file, which is now in mainline. But on the other hand, it will probably apply cleaning for Minkyu. Regards, Simon ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] cros-ec-keyboard: Synchronize DT binding from linux
On Mon, 2014-12-15 at 23:34 +0100, Pavel Machek wrote: On Thu 2014-11-27 16:34:08, Sjoerd Simons wrote: The ChromeOS EC keyboard is used by various different chromebooks. Peach pi being the third board in the u-boot tree to use it (snow and peach pit the other two). Rather then embedding the same big DT node in the peach-pi DT again, copy the dtsi snippit bindings documentation from linux and include it in all 3 boards. This slightly changes the dt bindings in u-boot: ... * google,repeat-delay-ms and google,repeat-rate-ms are no longer used and replaced by hardcoded values (similar to tegra kbc) If more than one board needs this (and it clearly does) it would be good to make the binding official...? I guess that means talking to linux Documentation/devicetree maintainers... Device tree is for describing hardware, while repeat rate delay are user preferences, not something inherent to the hardware. As such, those properties do not belong in device-tree in the first place. Fwiw, Linux by default uses a delay of 250ms and a period of 33ms unless the driver handles auto-repeat (e.g. for PS2 which does repeat in hardware). If your goal is to fix the hardcoding of these values in various drivers, it's probably better to make u-boot input core have sane defaults for repeat rather then pushing it out into device-tree. -- Sjoerd Simons sjoerd.sim...@collabora.co.uk Collabora Ltd. smime.p7s Description: S/MIME cryptographic signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] cros-ec-keyboard: Synchronize DT binding from linux
On Thu 2014-11-27 16:34:08, Sjoerd Simons wrote: The ChromeOS EC keyboard is used by various different chromebooks. Peach pi being the third board in the u-boot tree to use it (snow and peach pit the other two). Rather then embedding the same big DT node in the peach-pi DT again, copy the dtsi snippit bindings documentation from linux and include it in all 3 boards. This slightly changes the dt bindings in u-boot: ... * google,repeat-delay-ms and google,repeat-rate-ms are no longer used and replaced by hardcoded values (similar to tegra kbc) If more than one board needs this (and it clearly does) it would be good to make the binding official...? I guess that means talking to linux Documentation/devicetree maintainers... Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] cros-ec-keyboard: Synchronize DT binding from linux
On 27 November 2014 at 08:34, Sjoerd Simons sjoerd.sim...@collabora.co.uk wrote: The ChromeOS EC keyboard is used by various different chromebooks. Peach pi being the third board in the u-boot tree to use it (snow and peach pit the other two). Rather then embedding the same big DT node in the peach-pi DT again, copy the dtsi snippit bindings documentation from linux and include it in all 3 boards. This slightly changes the dt bindings in u-boot: * google,key-rows becomes keypad,num-rows * google,key-colums becomes keypad,num-colums * google,repeat-delay-ms and google,repeat-rate-ms are no longer used and replaced by hardcoded values (similar to tegra kbc) Signed-off-by: Sjoerd Simons sjoerd.sim...@collabora.co.uk --- arch/arm/dts/cros-ec-keyboard.dtsi | 105 arch/arm/dts/exynos5250-snow.dts| 59 + arch/arm/dts/exynos5420-peach-pit.dts | 59 + arch/arm/dts/exynos5800-peach-pi.dts| 4 +- doc/device-tree-bindings/input/cros-ec-keyb.txt | 53 ++-- drivers/input/cros_ec_keyb.c| 16 ++-- 6 files changed, 143 insertions(+), 153 deletions(-) create mode 100644 arch/arm/dts/cros-ec-keyboard.dtsi Thanks for doing this. Acked-by: Simon Glass s...@chromium.org Tested Chrome OS EC and keyboard on snow, pit, pi. Tested-by: Simon Glass s...@chromium.org ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] cros-ec-keyboard: Synchronize DT binding from linux
The ChromeOS EC keyboard is used by various different chromebooks. Peach pi being the third board in the u-boot tree to use it (snow and peach pit the other two). Rather then embedding the same big DT node in the peach-pi DT again, copy the dtsi snippit bindings documentation from linux and include it in all 3 boards. This slightly changes the dt bindings in u-boot: * google,key-rows becomes keypad,num-rows * google,key-colums becomes keypad,num-colums * google,repeat-delay-ms and google,repeat-rate-ms are no longer used and replaced by hardcoded values (similar to tegra kbc) Signed-off-by: Sjoerd Simons sjoerd.sim...@collabora.co.uk --- arch/arm/dts/cros-ec-keyboard.dtsi | 105 arch/arm/dts/exynos5250-snow.dts| 59 + arch/arm/dts/exynos5420-peach-pit.dts | 59 + arch/arm/dts/exynos5800-peach-pi.dts| 4 +- doc/device-tree-bindings/input/cros-ec-keyb.txt | 53 ++-- drivers/input/cros_ec_keyb.c| 16 ++-- 6 files changed, 143 insertions(+), 153 deletions(-) create mode 100644 arch/arm/dts/cros-ec-keyboard.dtsi diff --git a/arch/arm/dts/cros-ec-keyboard.dtsi b/arch/arm/dts/cros-ec-keyboard.dtsi new file mode 100644 index 000..9c7fb0a --- /dev/null +++ b/arch/arm/dts/cros-ec-keyboard.dtsi @@ -0,0 +1,105 @@ +/* + * Keyboard dts fragment for devices that use cros-ec-keyboard + * + * Copyright (c) 2014 Google, Inc + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. +*/ + +#include dt-bindings/input/input.h + +cros_ec { + keyboard-controller { + compatible = google,cros-ec-keyb; + keypad,num-rows = 8; + keypad,num-columns = 13; + google,needs-ghost-filter; + + linux,keymap = + MATRIX_KEY(0x00, 0x01, KEY_LEFTMETA) + MATRIX_KEY(0x00, 0x02, KEY_F1) + MATRIX_KEY(0x00, 0x03, KEY_B) + MATRIX_KEY(0x00, 0x04, KEY_F10) + MATRIX_KEY(0x00, 0x06, KEY_N) + MATRIX_KEY(0x00, 0x08, KEY_EQUAL) + MATRIX_KEY(0x00, 0x0a, KEY_RIGHTALT) + + MATRIX_KEY(0x01, 0x01, KEY_ESC) + MATRIX_KEY(0x01, 0x02, KEY_F4) + MATRIX_KEY(0x01, 0x03, KEY_G) + MATRIX_KEY(0x01, 0x04, KEY_F7) + MATRIX_KEY(0x01, 0x06, KEY_H) + MATRIX_KEY(0x01, 0x08, KEY_APOSTROPHE) + MATRIX_KEY(0x01, 0x09, KEY_F9) + MATRIX_KEY(0x01, 0x0b, KEY_BACKSPACE) + + MATRIX_KEY(0x02, 0x00, KEY_LEFTCTRL) + MATRIX_KEY(0x02, 0x01, KEY_TAB) + MATRIX_KEY(0x02, 0x02, KEY_F3) + MATRIX_KEY(0x02, 0x03, KEY_T) + MATRIX_KEY(0x02, 0x04, KEY_F6) + MATRIX_KEY(0x02, 0x05, KEY_RIGHTBRACE) + MATRIX_KEY(0x02, 0x06, KEY_Y) + MATRIX_KEY(0x02, 0x07, KEY_102ND) + MATRIX_KEY(0x02, 0x08, KEY_LEFTBRACE) + MATRIX_KEY(0x02, 0x09, KEY_F8) + + MATRIX_KEY(0x03, 0x01, KEY_GRAVE) + MATRIX_KEY(0x03, 0x02, KEY_F2) + MATRIX_KEY(0x03, 0x03, KEY_5) + MATRIX_KEY(0x03, 0x04, KEY_F5) + MATRIX_KEY(0x03, 0x06, KEY_6) + MATRIX_KEY(0x03, 0x08, KEY_MINUS) + MATRIX_KEY(0x03, 0x0b, KEY_BACKSLASH) + + MATRIX_KEY(0x04, 0x00, KEY_RIGHTCTRL) + MATRIX_KEY(0x04, 0x01, KEY_A) + MATRIX_KEY(0x04, 0x02, KEY_D) + MATRIX_KEY(0x04, 0x03, KEY_F) + MATRIX_KEY(0x04, 0x04, KEY_S) + MATRIX_KEY(0x04, 0x05, KEY_K) + MATRIX_KEY(0x04, 0x06, KEY_J) + MATRIX_KEY(0x04, 0x08, KEY_SEMICOLON) + MATRIX_KEY(0x04, 0x09, KEY_L) + MATRIX_KEY(0x04, 0x0a, KEY_BACKSLASH) + MATRIX_KEY(0x04, 0x0b, KEY_ENTER) + + MATRIX_KEY(0x05, 0x01, KEY_Z) + MATRIX_KEY(0x05, 0x02, KEY_C) + MATRIX_KEY(0x05, 0x03, KEY_V) + MATRIX_KEY(0x05, 0x04, KEY_X) + MATRIX_KEY(0x05, 0x05, KEY_COMMA) + MATRIX_KEY(0x05, 0x06, KEY_M) + MATRIX_KEY(0x05, 0x07, KEY_LEFTSHIFT) + MATRIX_KEY(0x05, 0x08, KEY_SLASH) + MATRIX_KEY(0x05, 0x09, KEY_DOT) + MATRIX_KEY(0x05, 0x0b, KEY_SPACE) + +