]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
mips: dts: Add EcoNet DTS with EN751221 and SmartFiber XP8421-B board
authorCaleb James DeLisle <cjd@cjdns.fr>
Wed, 7 May 2025 13:44:59 +0000 (13:44 +0000)
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>
Tue, 20 May 2025 06:47:07 +0000 (08:47 +0200)
Add DTS files in support of EcoNet platform, including SmartFiber XP8421-B,
a low cost commercially available board based on EN751221.

Signed-off-by: Caleb James DeLisle <cjd@cjdns.fr>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
arch/mips/boot/dts/Makefile
arch/mips/boot/dts/econet/Makefile [new file with mode: 0644]
arch/mips/boot/dts/econet/en751221.dtsi [new file with mode: 0644]
arch/mips/boot/dts/econet/en751221_smartfiber_xp8421-b.dts [new file with mode: 0644]
arch/mips/econet/Kconfig

index ff468439a8c4e9652fbac35b62906d1a7846d018..7375c6ced82b461f0bfaabd3b48632dd2e87606f 100644 (file)
@@ -1,6 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0
 subdir-$(CONFIG_BMIPS_GENERIC)         += brcm
 subdir-$(CONFIG_CAVIUM_OCTEON_SOC)     += cavium-octeon
+subdir-$(CONFIG_ECONET)                        += econet
 subdir-$(CONFIG_EYEQ)                  += mobileye
 subdir-$(CONFIG_FIT_IMAGE_FDT_MARDUK)   += img
 subdir-$(CONFIG_FIT_IMAGE_FDT_BOSTON)  += img
diff --git a/arch/mips/boot/dts/econet/Makefile b/arch/mips/boot/dts/econet/Makefile
new file mode 100644 (file)
index 0000000..b467d56
--- /dev/null
@@ -0,0 +1,2 @@
+# SPDX-License-Identifier: GPL-2.0
+dtb-$(CONFIG_DTB_ECONET_SMARTFIBER_XP8421_B)   += en751221_smartfiber_xp8421-b.dtb
diff --git a/arch/mips/boot/dts/econet/en751221.dtsi b/arch/mips/boot/dts/econet/en751221.dtsi
new file mode 100644 (file)
index 0000000..66197e7
--- /dev/null
@@ -0,0 +1,67 @@
+// SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+/dts-v1/;
+
+/ {
+       compatible = "econet,en751221";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       hpt_clock: clock {
+               compatible = "fixed-clock";
+               #clock-cells = <0>;
+               clock-frequency = <200000000>;  /* 200 MHz */
+       };
+
+       cpus: cpus {
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               cpu@0 {
+                       device_type = "cpu";
+                       compatible = "mips,mips24KEc";
+                       reg = <0>;
+               };
+       };
+
+       cpuintc: interrupt-controller {
+               compatible = "mti,cpu-interrupt-controller";
+               interrupt-controller;
+               #address-cells = <0>;
+               #interrupt-cells = <1>;
+       };
+
+       intc: interrupt-controller@1fb40000 {
+               compatible = "econet,en751221-intc";
+               reg = <0x1fb40000 0x100>;
+               interrupt-parent = <&cpuintc>;
+               interrupts = <2>;
+
+               interrupt-controller;
+               #interrupt-cells = <1>;
+               econet,shadow-interrupts = <7 2>, <8 3>, <13 12>, <30 29>;
+       };
+
+       uart: serial@1fbf0000 {
+               compatible = "ns16550";
+               reg = <0x1fbf0000 0x30>;
+               reg-io-width = <4>;
+               reg-shift = <2>;
+               interrupt-parent = <&intc>;
+               interrupts = <0>;
+               /*
+                * Conversion of baud rate to clock frequency requires a
+                * computation that is not in the ns16550 driver, so this
+                * uart is fixed at 115200 baud.
+                */
+               clock-frequency = <1843200>;
+       };
+
+       timer_hpt: timer@1fbf0400 {
+               compatible = "econet,en751221-timer";
+               reg = <0x1fbf0400 0x100>;
+
+               interrupt-parent = <&intc>;
+               interrupts = <30>;
+               clocks = <&hpt_clock>;
+       };
+};
diff --git a/arch/mips/boot/dts/econet/en751221_smartfiber_xp8421-b.dts b/arch/mips/boot/dts/econet/en751221_smartfiber_xp8421-b.dts
new file mode 100644 (file)
index 0000000..8223c5b
--- /dev/null
@@ -0,0 +1,19 @@
+// SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+/dts-v1/;
+
+#include "en751221.dtsi"
+
+/ {
+       model = "SmartFiber XP8421-B";
+       compatible = "smartfiber,xp8421-b", "econet,en751221";
+
+       memory@0 {
+               device_type = "memory";
+               reg = <0x00000000 0x1c000000>;
+       };
+
+       chosen {
+               stdout-path = "/serial@1fbf0000:115200";
+               linux,usable-memory-range = <0x00020000 0x1bfe0000>;
+       };
+};
index d03f90f3daa441e77588b207353704716b154f23..fd69884cc9a85eea9d17c9dd79c999d8beeb9602 100644 (file)
@@ -32,6 +32,17 @@ choice
 
        config DTB_ECONET_NONE
                bool "None"
+
+       config DTB_ECONET_SMARTFIBER_XP8421_B
+               bool "EN751221 SmartFiber XP8421-B"
+               depends on SOC_ECONET_EN751221
+               select BUILTIN_DTB
+               help
+                 The SmartFiber XP8421-B is a device based on the EN751221 SoC.
+                 It has 512MB of memory and 256MB of NAND flash. This kernel
+                 needs only an appended initramfs to boot. It can be loaded
+                 through XMODEM and booted from memory in the bootloader, or
+                 it can be packed in tclinux.trx format and written to flash.
 endchoice
 
 endif