From: Bert Vermeulen <bert@biot.com>
To: Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
Rob Herring <robh+dt@kernel.org>,
Sander Vanheule <sander@svanheule.net>,
linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org,
devicetree@vger.kernel.org
Cc: Bert Vermeulen <bert@biot.com>
Subject: [PATCH v3 4/4] dts: Add support for Cisco SG220-26 switch
Date: Wed, 30 Dec 2020 22:22:05 +0100 [thread overview]
Message-ID: <20201230212205.2605383-4-bert@biot.com> (raw)
In-Reply-To: <20201230212205.2605383-1-bert@biot.com>
Signed-off-by: Bert Vermeulen <bert@biot.com>
Signed-off-by: Sander Vanheule <sander@svanheule.net>
---
arch/mips/Kconfig | 10 +++
arch/mips/boot/dts/realtek/Makefile | 2 +
arch/mips/boot/dts/realtek/cisco_sg220-26.dts | 81 +++++++++++++++++++
3 files changed, 93 insertions(+)
create mode 100644 arch/mips/boot/dts/realtek/Makefile
create mode 100644 arch/mips/boot/dts/realtek/cisco_sg220-26.dts
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index 0986d0c4405f..a398416842ca 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -1055,6 +1055,16 @@ config NLM_XLP_BOARD
endchoice
+if MACH_REALTEK_RTL
+choice
+ prompt "Realtek RTL838x/RTL839x-based switch"
+ optional
+
+ config DT_CISCO_SG220_26
+ bool "Cisco SG220-26"
+endchoice
+endif
+
source "arch/mips/alchemy/Kconfig"
source "arch/mips/ath25/Kconfig"
source "arch/mips/ath79/Kconfig"
diff --git a/arch/mips/boot/dts/realtek/Makefile b/arch/mips/boot/dts/realtek/Makefile
new file mode 100644
index 000000000000..f0a3e5816767
--- /dev/null
+++ b/arch/mips/boot/dts/realtek/Makefile
@@ -0,0 +1,2 @@
+# SPDX-License-Identifier: GPL-2.0
+dtb-$(CONFIG_DT_CISCO_SG220_26) += cisco_sg220-26.dtb
diff --git a/arch/mips/boot/dts/realtek/cisco_sg220-26.dts b/arch/mips/boot/dts/realtek/cisco_sg220-26.dts
new file mode 100644
index 000000000000..5d8ba3df95aa
--- /dev/null
+++ b/arch/mips/boot/dts/realtek/cisco_sg220-26.dts
@@ -0,0 +1,81 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR BSD-2-Clause
+
+/dts-v1/;
+
+#include "rtl83xx.dtsi"
+#include "rtl838x.dtsi"
+
+/ {
+ model = "Cisco SG220-26";
+ compatible = "cisco,sg220-26", "realtek,rtl8382-soc";
+
+ chosen {
+ stdout-path = "serial0:9600n8";
+ bootargs = "earlycon console=ttyS0,9600";
+ };
+
+ memory@0 {
+ device_type = "memory";
+ reg = <0x0 0x8000000>;
+ };
+};
+
+&uart0 {
+ status = "okay";
+};
+
+&spi {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ spi-max-frequency = <10000000>;
+ reg = <0>;
+ m25p,fast-read;
+ broken-flash-reset;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ loader: partition@0 {
+ label = "boot";
+ reg = <0x0 0x80000>;
+ read-only;
+ };
+
+ bdinfo: partition@80000 {
+ label = "bdinfo";
+ reg = <0x80000 0x10000>;
+ read-only;
+ };
+
+ sysinfo: partition@90000 {
+ label = "sysinfo";
+ reg = <0x90000 0x10000>;
+ read-only;
+ };
+
+ jffs2_cfg: partition@a0000 {
+ label = "jffs2 cfg";
+ reg = <0xa0000 0x400000>;
+ };
+
+ jffs2_log: partition@4a0000 {
+ label = "jffs2 log";
+ reg = <0x4a0000 0x100000>;
+ };
+
+ runtime: partition@5a0000 {
+ label = "runtime";
+ reg = <0x5a0000 0xd30000>;
+ };
+
+ runtime2: partition@12d0000 {
+ label = "runtime2";
+ reg = <0x12d0000 0xd30000>;
+ };
+ };
+ };
+};
--
2.25.1
next prev parent reply other threads:[~2020-12-30 21:23 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-30 21:22 [PATCH v3 1/4] Add support for Realtek RTL838x/RTL839x switch SoCs Bert Vermeulen
2020-12-30 21:22 ` [PATCH v3 2/4] MIPS: Add Realtek RTL838x/RTL839x support as generic MIPS system Bert Vermeulen
2021-01-05 10:20 ` Thomas Bogendoerfer
2020-12-30 21:22 ` [PATCH v3 3/4] dt-bindings: Add Cisco prefix to vendor list Bert Vermeulen
2021-01-11 22:01 ` Rob Herring
2020-12-30 21:22 ` Bert Vermeulen [this message]
2020-12-30 21:26 ` [PATCH v3 1/4] Add support for Realtek RTL838x/RTL839x switch SoCs Bert Vermeulen
2021-01-11 21:59 ` Rob Herring
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=20201230212205.2605383-4-bert@biot.com \
--to=bert@biot.com \
--cc=devicetree@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=robh+dt@kernel.org \
--cc=sander@svanheule.net \
--cc=tsbogend@alpha.franken.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.