diff --git a/app/boards/arm/nice_nano/nice_nano.dtsi b/app/boards/arm/nice_nano/nice_nano.dtsi index c3e4bc1e..6c9d081c 100644 --- a/app/boards/arm/nice_nano/nice_nano.dtsi +++ b/app/boards/arm/nice_nano/nice_nano.dtsi @@ -49,13 +49,6 @@ scl-pin = <20>; }; -&spi0 { - compatible = "nordic,nrf-spim"; - sck-pin = <20>; - mosi-pin = <17>; - miso-pin = <25>; -}; - &uart0 { compatible = "nordic,nrf-uarte"; tx-pin = <6>; @@ -70,7 +63,6 @@ }; }; -nice_view_spi: &spi0 {}; &flash0 { /* diff --git a/app/boards/shields/nice_view/boards/nice_nano.overlay b/app/boards/shields/nice_view/boards/nice_nano.overlay new file mode 100644 index 00000000..ae5a8eb2 --- /dev/null +++ b/app/boards/shields/nice_view/boards/nice_nano.overlay @@ -0,0 +1,20 @@ +/* + * Copyright (c) 2022 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +nice_view_spi: &spi0 { + compatible = "nordic,nrf-spim"; + status = "okay"; + sck-pin = <20>; + mosi-pin = <17>; + miso-pin = <25>; + cs-gpios = <&pro_micro 1 GPIO_ACTIVE_HIGH>; +}; + +&pro_micro_i2c { + status = "disabled"; +}; + +#include "../nice_view.dtsi" diff --git a/app/boards/shields/nice_view/boards/nice_nano_v2.overlay b/app/boards/shields/nice_view/boards/nice_nano_v2.overlay new file mode 100644 index 00000000..ae5a8eb2 --- /dev/null +++ b/app/boards/shields/nice_view/boards/nice_nano_v2.overlay @@ -0,0 +1,20 @@ +/* + * Copyright (c) 2022 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +nice_view_spi: &spi0 { + compatible = "nordic,nrf-spim"; + status = "okay"; + sck-pin = <20>; + mosi-pin = <17>; + miso-pin = <25>; + cs-gpios = <&pro_micro 1 GPIO_ACTIVE_HIGH>; +}; + +&pro_micro_i2c { + status = "disabled"; +}; + +#include "../nice_view.dtsi" diff --git a/app/boards/shields/nice_view/nice_view.dtsi b/app/boards/shields/nice_view/nice_view.dtsi new file mode 100644 index 00000000..99ce98f9 --- /dev/null +++ b/app/boards/shields/nice_view/nice_view.dtsi @@ -0,0 +1,22 @@ +/* + * Copyright (c) 2022 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +&nice_view_spi { + nice_view: ls0xx@0 { + compatible = "sharp,ls0xx"; + label = "DISPLAY"; + spi-max-frequency = <1000000>; + reg = <0>; + width = <160>; + height = <68>; + }; +}; + +/ { + chosen { + zephyr,display = &nice_view; + }; +}; diff --git a/app/boards/shields/nice_view/nice_view.overlay b/app/boards/shields/nice_view/nice_view.overlay index f6033782..6840921f 100644 --- a/app/boards/shields/nice_view/nice_view.overlay +++ b/app/boards/shields/nice_view/nice_view.overlay @@ -3,27 +3,4 @@ * * SPDX-License-Identifier: MIT */ - -&nice_view_spi { - status = "okay"; - cs-gpios = <&pro_micro 1 GPIO_ACTIVE_HIGH>; - - nice_view: ls0xx@0 { - compatible = "sharp,ls0xx"; - label = "DISPLAY"; - spi-max-frequency = <1000000>; - reg = <0>; - width = <160>; - height = <68>; - }; -}; - -&pro_micro_i2c { - status = "disabled"; -}; - -/ { - chosen { - zephyr,display = &nice_view; - }; -}; + \ No newline at end of file diff --git a/app/boards/shields/nice_view/nice_view.zmk.yml b/app/boards/shields/nice_view/nice_view.zmk.yml index 0c95d59d..27a34e7d 100644 --- a/app/boards/shields/nice_view/nice_view.zmk.yml +++ b/app/boards/shields/nice_view/nice_view.zmk.yml @@ -3,6 +3,5 @@ id: nice_view name: nice!view type: shield url: https://nicekeyboards.com/nice-view -requires: [pro_micro, i2c_oled] features: - display