/dts-v1/;
-/* Add place holder to avoid compilation error with renesas-smarc2.dtsi */
-#define KEY_1_GPIO 1
-#define KEY_2_GPIO 2
-#define KEY_3_GPIO 3
+/* Switch selection settings */
+#define RZ_BOOT_MODE3 1
+#define SW_DPI_EN 0
+#define SW_GPIO4 1
+
+#define PMOD_GPIO4 0
+#define PMOD_GPIO6 0
+#define PMOD_GPIO7 0
+
+#define KEY_1_GPIO RZG3L_GPIO(J, 3)
+#define KEY_2_GPIO RZG3L_GPIO(6, 4)
+#define KEY_3_GPIO RZG3L_GPIO(6, 5)
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
};
&keys {
- status = "disabled";
-
+#if !RZ_BOOT_MODE3 || !SW_GPIO4 || PMOD_GPIO4
/delete-node/ key-1;
+#endif
+
+#if SW_DPI_EN || PMOD_GPIO6
/delete-node/ key-2;
+#endif
+
+#if SW_DPI_EN || PMOD_GPIO7
/delete-node/ key-3;
+#endif
};
&pinctrl {
* Copyright (C) 2026 Renesas Electronics Corp.
*/
+/*
+ * Please set the below switch position on the SoM and the corresponding macro
+ * on the board DTS:
+ *
+ * Switch position SYS.5, Macro SW_DPI_EN:
+ * 0 - Select multiple SMARC signals active
+ * 1 - Select LCD
+ *
+ * Switch position BOOT.1, Macro RZ_BOOT_MODE3:
+ * 0 - Select JTAG enabled
+ * 1 - Select SDIO {CD,IOVS,PWEN} and GPIO4 Active
+ *
+ * Switch position SW_GPIO4, Macro SW_GPIO4:
+ * 0 - Select RZ_VBAT_TAMPER (position 2-1)
+ * 1 - Select GPIO4 (position 2-3)
+ */
+
/ {
compatible = "renesas,rzg3l-smarcm", "renesas,r9a08g046l48", "renesas,r9a08g046";