diff options
author | Pete Johanson <peter@peterjohanson.com> | 2020-05-01 14:58:00 -0400 |
---|---|---|
committer | Pete Johanson <peter@peterjohanson.com> | 2020-05-01 14:58:00 -0400 |
commit | 52bfc9dd84592f834c13ce9af4a1dd7fc90d7fef (patch) | |
tree | 808a50c4fb4238987d3b7bc6aebb3f1c4c2af29f /boards | |
parent | 5b4e43cebd89c09e7cbd405f4a0dfdb942add4fc (diff) |
Lots of clean up, basic kscan working, remove zephyr-rust.
Diffstat (limited to 'boards')
4 files changed, 35 insertions, 20 deletions
diff --git a/boards/arm/planck/planck_rev6.dts b/boards/arm/planck/planck_rev6.dts index a3e14f7..58de7a4 100644 --- a/boards/arm/planck/planck_rev6.dts +++ b/boards/arm/planck/planck_rev6.dts @@ -16,7 +16,6 @@ zephyr,shell-uart = &usart1; zephyr,sram = &sram0; zephyr,flash = &flash0; - zmk,matrix = &matrix0; }; leds { @@ -55,25 +54,23 @@ }; }; - matrix0: kscan_matrix { - rows { - gpio-map = <0 0 &gpioa 10 0>, - <1 0 &gpioa 9 0>, - <2 0 &gpioa 8 0>, - <3 0 &gpiob 15 0>, - <4 0 &gpioc 13 0>, - <5 0 &gpioc 14 0>, - <6 0 &gpioc 15 0>, - <7 0 &gpioa 2 0>; - }; - columns { - gpio-map = <0 0 &gpiob 11 0>, - <1 0 &gpiob 10 0>, - <2 0 &gpiob 2 0>, - <3 0 &gpiob 1 0>, - <4 0 &gpioa 7 0>, - <5 0 &gpiob 0 0>; - }; + kscan { + compatible = "gpio-kscan"; + label = "Keyscan Matrix"; + row-gpios = <&gpioa 10 GPIO_ACTIVE_HIGH>, + <&gpioa 9 GPIO_ACTIVE_HIGH>, + <&gpioa 8 GPIO_ACTIVE_HIGH>, + <&gpiob 15 GPIO_ACTIVE_HIGH>, + <&gpioc 13 GPIO_ACTIVE_HIGH>, + <&gpioc 14 GPIO_ACTIVE_HIGH>, + <&gpioc 15 GPIO_ACTIVE_HIGH>, + <&gpioa 2 GPIO_ACTIVE_HIGH>; + col-gpios = <&gpiob 11 GPIO_ACTIVE_HIGH>, + <&gpiob 10 GPIO_ACTIVE_HIGH>, + <&gpiob 2 GPIO_ACTIVE_HIGH>, + <&gpiob 1 GPIO_ACTIVE_HIGH>, + <&gpioa 7 GPIO_ACTIVE_HIGH>, + <&gpiob 0 GPIO_ACTIVE_HIGH>; }; gpio_keys { diff --git a/boards/shields/petejohanson_handwire/Kconfig.defconfig b/boards/shields/petejohanson_handwire/Kconfig.defconfig new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/boards/shields/petejohanson_handwire/Kconfig.defconfig diff --git a/boards/shields/petejohanson_handwire/Kconfig.shield b/boards/shields/petejohanson_handwire/Kconfig.shield new file mode 100644 index 0000000..7e8ad48 --- /dev/null +++ b/boards/shields/petejohanson_handwire/Kconfig.shield @@ -0,0 +1,6 @@ +# Copyright (c) 2019 Linaro Limited +# SPDX-License-Identifier: Apache-2.0 + +config SHIELD_PETEJOHANSON_HANDWIRE + def_bool $(shields_list_contains,petejohanson_handwire) + diff --git a/boards/shields/petejohanson_handwire/petejohanson_handwire.overlay b/boards/shields/petejohanson_handwire/petejohanson_handwire.overlay new file mode 100644 index 0000000..678070e --- /dev/null +++ b/boards/shields/petejohanson_handwire/petejohanson_handwire.overlay @@ -0,0 +1,12 @@ + +/ { + kscan { + compatible = "gpio-kscan"; + label = "Handwired GPIO KSCAN matrix"; + + row-gpios = <&arduino_header 8 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>, + <&arduino_header 10 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; + col-gpios = <&arduino_header 13 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>, + <&arduino_header 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; + }; +}; |