From 3ab922822c0b1bbf99e9ea50f17fe15dcef6c3f3 Mon Sep 17 00:00:00 2001
From: Peter Johanson <peter@peterjohanson.com>
Date: Mon, 2 Oct 2023 22:05:24 -0700
Subject: [PATCH] feat(shields): Add ZMK Uno nice!view support.

Export the `nice_view_spi` node properly from the ZMK Uno overlay
to ensure the shield will work when built along with the `nice_view`
shield.
---
 app/boards/shields/zmk_uno/zmk_uno.overlay | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/app/boards/shields/zmk_uno/zmk_uno.overlay b/app/boards/shields/zmk_uno/zmk_uno.overlay
index 78f3b4a7..02bb4ad8 100644
--- a/app/boards/shields/zmk_uno/zmk_uno.overlay
+++ b/app/boards/shields/zmk_uno/zmk_uno.overlay
@@ -11,9 +11,17 @@
     status = "okay";
 };
 
-&arduino_spi {
+nice_view_spi: &arduino_spi {
     status = "okay";
 
+    cs-gpios = <&arduino_header 16 GPIO_ACTIVE_HIGH>;
+
+    // Needed so the nice_view shield will enhance the existing node which falls *first*
+    // on the bus, properly picking up the first `cs-gpios` specifier.
+    ls0xx@0 {
+        reg = <0>;
+    };
+
     led_strip: ws2812@0 {
         compatible = "worldsemi,ws2812-spi";