Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
To: Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	devicetree@vger.kernel.org, linux-mips@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH 2/2] MIPS: octeon: Add detection of UBNT Edgeroute Lite devices
Date: Sun, 27 Sep 2026 11:15:11 +0200	[thread overview]
Message-ID: <20260927091512.117046-2-tsbogend@alpha.franken.de> (raw)
In-Reply-To: <20260927091512.117046-1-tsbogend@alpha.franken.de>

The U-Boot of Ubiquiti Edgerouter Lite don't provide a DT to the kernel.
Use MIPS_MACHINE mechanism to provide one.

Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
---
 arch/mips/boot/dts/cavium-octeon/Makefile |  1 +
 arch/mips/cavium-octeon/Kconfig           |  5 +++++
 arch/mips/cavium-octeon/Makefile          |  2 ++
 arch/mips/cavium-octeon/board-ubnt.c      | 16 ++++++++++++++++
 4 files changed, 24 insertions(+)
 create mode 100644 arch/mips/cavium-octeon/board-ubnt.c

diff --git a/arch/mips/boot/dts/cavium-octeon/Makefile b/arch/mips/boot/dts/cavium-octeon/Makefile
index 48085bca666c..aa3a5ff1468d 100644
--- a/arch/mips/boot/dts/cavium-octeon/Makefile
+++ b/arch/mips/boot/dts/cavium-octeon/Makefile
@@ -1,2 +1,3 @@
 # SPDX-License-Identifier: GPL-2.0
 dtb-$(CONFIG_CAVIUM_OCTEON_SOC)	+= octeon_3xxx.dtb octeon_68xx.dtb
+dtb-$(CONFIG_OCTEON_BOARD_UBNT)	+= ubnt_e100.dtb
diff --git a/arch/mips/cavium-octeon/Kconfig b/arch/mips/cavium-octeon/Kconfig
index 450e979ef5d9..f3618117cc39 100644
--- a/arch/mips/cavium-octeon/Kconfig
+++ b/arch/mips/cavium-octeon/Kconfig
@@ -89,4 +89,9 @@ config OCTEON_ILM
 	  To compile this driver as a module, choose M here.  The module
 	  will be called octeon-ilm
 
+config OCTEON_BOARD_UBNT
+	bool "Support Ubiquiti Devices"
+	help
+	  Enable this for missing Ubiquit device trees and quirks
+
 endif # CAVIUM_OCTEON_SOC
diff --git a/arch/mips/cavium-octeon/Makefile b/arch/mips/cavium-octeon/Makefile
index ab84ede0cbe0..c9b52c94a8ca 100644
--- a/arch/mips/cavium-octeon/Makefile
+++ b/arch/mips/cavium-octeon/Makefile
@@ -18,3 +18,5 @@ obj-y += executive/
 obj-$(CONFIG_MTD)		      += flash_setup.o
 obj-$(CONFIG_SMP)		      += smp.o
 obj-$(CONFIG_OCTEON_ILM)	      += oct_ilm.o
+
+obj-$(CONFIG_OCTEON_BOARD_UBNT)	      += board-ubnt.o
diff --git a/arch/mips/cavium-octeon/board-ubnt.c b/arch/mips/cavium-octeon/board-ubnt.c
new file mode 100644
index 000000000000..e89ab3a02f49
--- /dev/null
+++ b/arch/mips/cavium-octeon/board-ubnt.c
@@ -0,0 +1,16 @@
+// SPDX-License-Identifier: GPL-2.0-only
+
+#include <asm/machine.h>
+#include <asm/octeon/octeon.h>
+
+static __init bool ubnt_e100_detect(void)
+{
+	return cvmx_sysinfo_get()->board_type == CVMX_BOARD_TYPE_UBNT_E100;
+}
+
+extern const char __dtb_ubnt_e100_begin[];
+
+MIPS_MACHINE(ubnt_e100) = {
+	.fdt = __dtb_ubnt_e100_begin,
+	.detect = ubnt_e100_detect,
+};
-- 
2.51.0


  reply	other threads:[~2026-09-27  9:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-27  9:15 [PATCH 1/2] MIPS: octeon: Use MIPS_MACHINE for boards without provided device tree Thomas Bogendoerfer
2026-09-27  9:15 ` Thomas Bogendoerfer [this message]
2026-10-01 12:12   ` [PATCH 2/2] MIPS: octeon: Add detection of UBNT Edgeroute Lite devices Thomas Bogendoerfer
2026-10-01 12:12 ` [PATCH 1/2] MIPS: octeon: Use MIPS_MACHINE for boards without provided device tree Thomas Bogendoerfer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260927091512.117046-2-tsbogend@alpha.franken.de \
    --to=tsbogend@alpha.franken.de \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=robh@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox