From 68638773f072c50d95a3900946d3a8d2162c9ec7 Mon Sep 17 00:00:00 2001 From: Alin Marin Elena Date: Wed, 8 Nov 2023 05:35:26 +0000 Subject: [PATCH] m66 --- .../mlego_m66_rev4/mlego_m66_rev4.overlay | 50 ++++++++++--------- 1 file changed, 27 insertions(+), 23 deletions(-) diff --git a/config/boards/shields/mlego_m66_rev4/mlego_m66_rev4.overlay b/config/boards/shields/mlego_m66_rev4/mlego_m66_rev4.overlay index 43c281d..9f8e048 100644 --- a/config/boards/shields/mlego_m66_rev4/mlego_m66_rev4.overlay +++ b/config/boards/shields/mlego_m66_rev4/mlego_m66_rev4.overlay @@ -47,7 +47,7 @@ RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,5) RC(4,6) RC(4,7) RC(4,8) RC(4,9 compatible = "zmk,kscan-gpio-matrix"; label = "kscan"; diode-direction = "col2row"; - col-gpios = <&shift_reg 2 (GPIO_ACTIVE_HIGH)> + col-gpios = <&shift_reg 2 (GPIO_ACTIVE_HIGH)> , <&shift_reg 9 (GPIO_ACTIVE_HIGH)> , <&shift_reg 10 (GPIO_ACTIVE_HIGH)> , <&shift_reg 11 (GPIO_ACTIVE_HIGH)> @@ -62,11 +62,11 @@ RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,5) RC(4,6) RC(4,7) RC(4,8) RC(4,9 , <&shift_reg 7 (GPIO_ACTIVE_HIGH)> , <&shift_reg 1 (GPIO_ACTIVE_HIGH)> ; - row-gpios = <&pro_micro 0 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - ,<&pro_micro 18(GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - ,<&pro_micro 21(GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - ,<&pro_micro 20(GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - ,<&pro_micro 19(GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + row-gpios = <&pro_micro 0 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 18(GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 21(GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 20(GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 19(GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> ; }; @@ -91,16 +91,18 @@ RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,5) RC(4,6) RC(4,7) RC(4,8) RC(4,9 &pinctrl { spi0_default: spi0_default { group1 { - psels = , - , - ; + psels = + , + , + ; }; }; spi0_sleep: spi0_sleep { group1 { - psels = , - , - ; + psels = + , + , + ; low-power-enable; }; }; @@ -111,14 +113,15 @@ RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,5) RC(4,6) RC(4,7) RC(4,8) RC(4,9 }; nice_nano_spi: &spi0 { - status = "okay"; + status = "okay"; compatible = "nordic,nrf-spim"; pinctrl-0 = <&spi0_default>; pinctrl-1 = <&spi0_sleep>; pinctrl-names = "default", "sleep"; - cs-gpios = <&pro_micro 10 GPIO_ACTIVE_LOW> - ,<&pro_micro 6 GPIO_ACTIVE_LOW>; + cs-gpios = <&pro_micro 10 GPIO_ACTIVE_LOW> + , <&pro_micro 6 GPIO_ACTIVE_HIGH> + ; shift_reg: 595@0 { compatible = "zmk,gpio-595"; status = "okay"; @@ -129,12 +132,13 @@ nice_nano_spi: &spi0 { label = "4HC595"; ngpios = <16>; }; - nice_view: ls0xx@0 { - compatible = "sharp,ls0xx"; - label = "DISPLAY"; - spi-max-frequency = <1000000>; - reg = <0>; - width = <128>; - height = <128>; - }; + nice_view: ls0xx@0 { + compatible = "sharp,ls0xx"; + label = "DISPLAY"; + spi-max-frequency = <1000000>; + disp-en-gpios = <&pro_micro 9 GPIO_ACTIVE_HIGH> + reg = <0>; + width = <168>; + height = <144>; + }; };