[PATCH 6/8] addon_boards: Add addon_boards plumbing

From: Ayush Singh
Date: Wed Sep 11 2024 - 10:29:57 EST


A directory to store and build addon_board overlays like mikroBUS,
Groove, etc. The overlays present here should be completely independent
of the underlying connector.

Signed-off-by: Ayush Singh <ayush@xxxxxxxxxxxxxxx>
---
Kbuild | 1 +
Kconfig | 2 ++
MAINTAINERS | 1 +
addon_boards/Kconfig | 16 ++++++++++++++++
addon_boards/Makefile | 3 +++
addon_boards/mikrobus/Makefile | 1 +
6 files changed, 24 insertions(+)

diff --git a/Kbuild b/Kbuild
index 464b34a08f51..9c897397f55f 100644
--- a/Kbuild
+++ b/Kbuild
@@ -97,3 +97,4 @@ obj-$(CONFIG_SAMPLES) += samples/
obj-$(CONFIG_NET) += net/
obj-y += virt/
obj-y += $(ARCH_DRIVERS)
+obj-y += addon_boards/
diff --git a/Kconfig b/Kconfig
index 745bc773f567..49880d4e91e9 100644
--- a/Kconfig
+++ b/Kconfig
@@ -30,3 +30,5 @@ source "lib/Kconfig"
source "lib/Kconfig.debug"

source "Documentation/Kconfig"
+
+source "addon_boards/Kconfig"
diff --git a/MAINTAINERS b/MAINTAINERS
index 95f228c85a40..8e2e0f8d16be 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -15432,6 +15432,7 @@ F: drivers/usb/image/microtek.*
MIKROBUS CONNECTOR
M: Ayush Singh <ayush@xxxxxxxxxxxxxxx>
S: Maintained
+F: addon_boards/mikrobus/*.dtso
F: arch/arm64/boot/dts/ti/k3-am625-beagleplay-mikrobus-connector0.dtso
F: Documentation/devicetree/bindings/connector/mikrobus-connector.yaml
F: drivers/misc/mikrobus.rs
diff --git a/addon_boards/Kconfig b/addon_boards/Kconfig
new file mode 100644
index 000000000000..01766ab28848
--- /dev/null
+++ b/addon_boards/Kconfig
@@ -0,0 +1,16 @@
+# SPDX-License-Identifier: GPL-2.0
+
+menu "Addon Board Overlays"
+
+config MIKROBUS_BOARD_OVERLAYS
+ bool "mikroBUS board overlays"
+ depends on OF_OVERLAY
+ depends on MIKROBUS
+ help
+ This option enables the mikroBUS addon board overlays. mikroBUS is an
+ add-on board socket standard that offers maximum expandability with
+ the smallest number of pins.
+
+ Say Y here to enable overlays for MikroBUS addon boards.
+
+endmenu
diff --git a/addon_boards/Makefile b/addon_boards/Makefile
new file mode 100644
index 000000000000..38275c3ff4c1
--- /dev/null
+++ b/addon_boards/Makefile
@@ -0,0 +1,3 @@
+# SPDX-License-Identifier: GPL-2.0
+
+subdir-$(CONFIG_MIKROBUS_BOARD_OVERLAYS) += mikrobus
diff --git a/addon_boards/mikrobus/Makefile b/addon_boards/mikrobus/Makefile
new file mode 100644
index 000000000000..f66554cd5c45
--- /dev/null
+++ b/addon_boards/mikrobus/Makefile
@@ -0,0 +1 @@
+# SPDX-License-Identifier: GPL-2.0

--
2.46.0