Free up the pins from the pinmux helper
[experiments/bbb-gpio-keypad.git] / bbb-gpio-keypad-00A0.dts
index a2069e0..fb06c45 100644 (file)
 / {
     compatible = "ti,beaglebone", "ti,beaglebone-black";
 
 / {
     compatible = "ti,beaglebone", "ti,beaglebone-black";
 
-    /* identification */
+    // Identification.
     part-number = "bbb-gpio-keypad";
     version = "00A0";
 
     part-number = "bbb-gpio-keypad";
     version = "00A0";
 
-    // resources this cape uses
+    // Resources this cape uses, see also https://ao2.it/137
     exclusive-use =
     exclusive-use =
-      "P8.07",
-      "P8.08",
-      "P8.09",
-      "P8.10",
-      "P8.26",
-      "P9.15";
+        "P8.07",
+        "P8.08",
+        "P8.09",
+        "P8.10",
+        "P8.26",
+        "P9.15";
 
 
+    // Free up the pins from the pinmux helper
     fragment@0 {
     fragment@0 {
+        target = <&ocp>;
+        __overlay__ {
+            P8_07_pinmux { status = "disabled"; };
+            P8_08_pinmux { status = "disabled"; };
+            P8_09_pinmux { status = "disabled"; };
+            P8_10_pinmux { status = "disabled"; };
+            P8_26_pinmux { status = "disabled"; };
+            P9_15_pinmux { status = "disabled"; };
+        };
+    };
+
+    fragment@1 {
         target = <&am33xx_pinmux>;
         __overlay__ {
         target = <&am33xx_pinmux>;
         __overlay__ {
-            keypad_pins: pinmux_gpio_pins{
+            keypad_pins: pinmux_gpio_pins {
                 pinctrl-single,pins = <
                 pinctrl-single,pins = <
-                   BONE_P8_07 (PIN_INPUT_PULLUP | MUX_MODE7)
-                   BONE_P8_08 (PIN_INPUT_PULLUP | MUX_MODE7)
-                   BONE_P8_09 (PIN_INPUT_PULLUP | MUX_MODE7)
-                   BONE_P8_10 (PIN_INPUT_PULLUP | MUX_MODE7)
-                   BONE_P8_26 (PIN_INPUT_PULLUP | MUX_MODE7)
-                   BONE_P9_15 (PIN_INPUT_PULLUP | MUX_MODE7)
+                    BONE_P8_07 (PIN_INPUT_PULLUP | MUX_MODE7)
+                    BONE_P8_08 (PIN_INPUT_PULLUP | MUX_MODE7)
+                    BONE_P8_09 (PIN_INPUT_PULLUP | MUX_MODE7)
+                    BONE_P8_10 (PIN_INPUT_PULLUP | MUX_MODE7)
+                    BONE_P8_26 (PIN_INPUT_PULLUP | MUX_MODE7)
+                    BONE_P9_15 (PIN_INPUT_PULLUP | MUX_MODE7)
                 >;
             };
         };
     };
 
                 >;
             };
         };
     };
 
-    fragment@1 {
+    fragment@2 {
         target-path = "/";
         __overlay__ {
             gpio_keys {
         target-path = "/";
         __overlay__ {
             gpio_keys {
         };
     };
 };
         };
     };
 };
-