From patchwork Wed Nov 4 12:10:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Petr_=C5=A0tetiar?= X-Patchwork-Id: 1393867 X-Patchwork-Delegate: ynezz@true.cz Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.openwrt.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=true.cz Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=kS+97dN9; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CR5C32sdzz9sTK for ; Wed, 4 Nov 2020 23:13:03 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=avquWsDAQ9NueTkUoffPJgid3wFFVa0J9CSkB5DE4os=; b=kS+97dN9TePgZSnohZki8tINl z+knUYU8bgcT5ygAsNGjNlhiXoFkqlxG2pRJZdjyRuxjHZhip6hBIfz+YSDBbGgPoktmZYPSgoEan 1G5RADM2IgQTMoXLazz7Lgcivlt5xY1Us8FnLpAsd/AbrekLQ46FXih2MCYw0vLAViuEDXDnUm2AX P1w+Qmyh+6HQo5v69f2heRuB5QXBH5Db8HMc7IDz0a2Fl/fSJGah24ZTIBg8qegYDTvwN6pL/8WQO VoSRLV76OY66j6nJ9ukTEIQLYiOQvyStv8KbnJGHQMFh7Rm7eCBCRn8QAijb9UkMli3v46byf14y+ dMrEmDlNw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kaHcq-0003tZ-Qq; Wed, 04 Nov 2020 12:10:52 +0000 Received: from smtp-out.xnet.cz ([178.217.244.18]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kaHcm-0003rs-8p for openwrt-devel@lists.openwrt.org; Wed, 04 Nov 2020 12:10:49 +0000 Received: from meh.true.cz (meh.true.cz [108.61.167.218]) (Authenticated sender: petr@true.cz) by smtp-out.xnet.cz (Postfix) with ESMTPSA id 811C33F82; Wed, 4 Nov 2020 13:10:42 +0100 (CET) Received: by meh.true.cz (OpenSMTPD) with ESMTP id 852ae347; Wed, 4 Nov 2020 13:10:24 +0100 (CET) From: =?utf-8?q?Petr_=C5=A0tetiar?= To: openwrt-devel@lists.openwrt.org Subject: [PATCH 1/3] rtl838x: clean whitespace issues in rtl8382_d-link_dgs-1210-16.dts Date: Wed, 4 Nov 2020 13:10:35 +0100 Message-Id: <20201104121037.5788-2-ynezz@true.cz> In-Reply-To: <20201104121037.5788-1-ynezz@true.cz> References: <20201104121037.5788-1-ynezz@true.cz> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201104_071048_473710_FE81D5B3 X-CRM114-Status: GOOD ( 15.84 ) X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 SPF_NONE SPF: sender does not publish an SPF Record X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Petr_=C5=A0tetiar?= Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org So it's tidy. Signed-off-by: Petr Štetiar --- target/linux/rtl838x/dts/rtl8382_d-link_dgs-1210-16.dts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/target/linux/rtl838x/dts/rtl8382_d-link_dgs-1210-16.dts b/target/linux/rtl838x/dts/rtl8382_d-link_dgs-1210-16.dts index 2d7abc00db1b..3fb3cfb35346 100644 --- a/target/linux/rtl838x/dts/rtl8382_d-link_dgs-1210-16.dts +++ b/target/linux/rtl838x/dts/rtl8382_d-link_dgs-1210-16.dts @@ -12,7 +12,7 @@ led-failsafe = &led_power; led-running = &led_power; led-upgrade = &led_power; - }; + }; chosen { bootargs = "console=ttyS0,115200"; @@ -90,7 +90,7 @@ regmap = <ðernet0>; #address-cells = <1>; #size-cells = <0>; - + /* External phy RTL8218B */ phy0: ethernet-phy@0 { reg = <0>; @@ -166,7 +166,7 @@ compatible = "ethernet-phy-ieee802.3-c22"; phy-is-integrated; }; - + /* External phy: RTL8214FC */ phy24: ethernet-phy@24 { compatible = "ethernet-phy-ieee802.3-c22"; @@ -248,7 +248,6 @@ phy-handle = <&phy7>; phy-mode = "qsgmii"; }; - port@8 { reg = <8>; label = "lan9"; From patchwork Wed Nov 4 12:10:36 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Petr_=C5=A0tetiar?= X-Patchwork-Id: 1393866 X-Patchwork-Delegate: ynezz@true.cz Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.openwrt.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=true.cz Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=dXdTib3I; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CR5Bn6vktz9sRR for ; Wed, 4 Nov 2020 23:12:48 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=sbxNusK/MnSmonFaDi/qpOvd2YxS/0qtsWykpFi9Fnk=; b=dXdTib3IdBivkqPsXiuhGcD2Q gIe44uXYvXVN9JlzRmGTq9WQ7HTmAAm1em0him/xK1Ovp+pcem1gQCfoWakw6AHD8eJ9WEF4OinwV +YY6vZofvqwHlMZF0GD85ceYQDjVJI1ilOe4jM/TNYNfRw2gDmaNhTuzn7rZe940CF/eXMit1vFO7 tgJW4x0rcyyNmLnL7FTtLz4oUxHhGgn7eydWM09UdLmO8m7V6FD+Ie7aZ1dcH8ibfi4z2tQHQKkHH c0DYCcH0W//5aG9NAWlmbIJkYzMTNm0YF06HXV0XuvBH2wJnELyE7w9VF5NJDOV7AJsLBO0sEA3rQ 0hze7E8dA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kaHcs-0003to-7m; Wed, 04 Nov 2020 12:10:54 +0000 Received: from smtp-out.xnet.cz ([178.217.244.18]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kaHcm-0003rp-9P for openwrt-devel@lists.openwrt.org; Wed, 04 Nov 2020 12:10:50 +0000 Received: from meh.true.cz (meh.true.cz [108.61.167.218]) (Authenticated sender: petr@true.cz) by smtp-out.xnet.cz (Postfix) with ESMTPSA id 9DEB03F83; Wed, 4 Nov 2020 13:10:42 +0100 (CET) Received: by meh.true.cz (OpenSMTPD) with ESMTP id c9650091; Wed, 4 Nov 2020 13:10:25 +0100 (CET) From: =?utf-8?q?Petr_=C5=A0tetiar?= To: openwrt-devel@lists.openwrt.org Subject: [PATCH 2/3] rtl838x: d-link_dgs-1210: refactor common family bits Date: Wed, 4 Nov 2020 13:10:36 +0100 Message-Id: <20201104121037.5788-3-ynezz@true.cz> In-Reply-To: <20201104121037.5788-1-ynezz@true.cz> References: <20201104121037.5788-1-ynezz@true.cz> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201104_071048_601123_6D363ED4 X-CRM114-Status: GOOD ( 20.46 ) X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 SPF_NONE SPF: sender does not publish an SPF Record X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Petr_=C5=A0tetiar?= Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org So it can be easily shared with other boards in the family and while at it add missing SPDX license identifiers into the DTS files. Signed-off-by: Petr Štetiar Acked-by: Adrian Schmutzler --- .../dts/rtl8382_d-link_dgs-1210-16.dts | 81 +----------------- .../rtl838x/dts/rtl8382_d-link_dgs-1210.dtsi | 84 +++++++++++++++++++ target/linux/rtl838x/image/Makefile | 14 ++-- 3 files changed, 94 insertions(+), 85 deletions(-) create mode 100644 target/linux/rtl838x/dts/rtl8382_d-link_dgs-1210.dtsi diff --git a/target/linux/rtl838x/dts/rtl8382_d-link_dgs-1210-16.dts b/target/linux/rtl838x/dts/rtl8382_d-link_dgs-1210-16.dts index 3fb3cfb35346..3843af1371a7 100644 --- a/target/linux/rtl838x/dts/rtl8382_d-link_dgs-1210-16.dts +++ b/target/linux/rtl838x/dts/rtl8382_d-link_dgs-1210-16.dts @@ -1,87 +1,10 @@ -#include "rtl838x.dtsi" +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT -#include -#include +#include "rtl8382_d-link_dgs-1210.dtsi" / { compatible = "d-link,dgs-1210-16", "realtek,rtl838x-soc"; model = "D-Link DGS-1210-16"; - - aliases { - led-boot = &led_power; - led-failsafe = &led_power; - led-running = &led_power; - led-upgrade = &led_power; - }; - - chosen { - bootargs = "console=ttyS0,115200"; - }; - - leds { - compatible = "gpio-leds"; - - led_power: power { - label = "green:power"; - gpios = <&gpio0 24 GPIO_ACTIVE_LOW>; - }; - }; -}; - -&gpio0 { - indirect-access-bus-id = <0>; -}; - -&spi0 { - status = "okay"; - flash@0 { - compatible = "jedec,spi-nor"; - reg = <0>; - spi-max-frequency = <10000000>; - - partitions { - compatible = "fixed-partitions"; - #address-cells = <1>; - #size-cells = <1>; - - partition@0 { - label = "u-boot"; - reg = <0x00000000 0x80000>; - read-only; - }; - partition@80000 { - label = "u-boot-env"; - reg = <0x00080000 0x40000>; - read-only; - }; - partition@c0000 { - label = "u-boot-env2"; - reg = <0x000c0000 0x40000>; - read-only; - }; - partition@280000 { - label = "firmware"; - compatible = "denx,uimage"; - reg = <0x00100000 0xd80000>; - }; - partition@be80000 { - label = "kernel2"; - reg = <0x00e80000 0x180000>; - }; - partition@1000000 { - label = "sysinfo"; - reg = <0x01000000 0x40000>; - }; - partition@1040000 { - label = "rootfs2"; - reg = <0x01040000 0xc00000>; - }; - partition@1c40000 { - label = "jffs2"; - reg = <0x01c40000 0x3c0000>; - }; - }; - }; }; ðernet0 { diff --git a/target/linux/rtl838x/dts/rtl8382_d-link_dgs-1210.dtsi b/target/linux/rtl838x/dts/rtl8382_d-link_dgs-1210.dtsi new file mode 100644 index 000000000000..74043c097af8 --- /dev/null +++ b/target/linux/rtl838x/dts/rtl8382_d-link_dgs-1210.dtsi @@ -0,0 +1,84 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "rtl838x.dtsi" + +#include +#include + +/ { + aliases { + led-boot = &led_power; + led-failsafe = &led_power; + led-running = &led_power; + led-upgrade = &led_power; + }; + + chosen { + bootargs = "console=ttyS0,115200"; + }; + + leds { + compatible = "gpio-leds"; + + led_power: power { + label = "green:power"; + gpios = <&gpio0 24 GPIO_ACTIVE_LOW>; + }; + }; +}; + +&gpio0 { + indirect-access-bus-id = <0>; +}; + +&spi0 { + status = "okay"; + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <10000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x00000000 0x80000>; + read-only; + }; + partition@80000 { + label = "u-boot-env"; + reg = <0x00080000 0x40000>; + read-only; + }; + partition@c0000 { + label = "u-boot-env2"; + reg = <0x000c0000 0x40000>; + read-only; + }; + partition@280000 { + label = "firmware"; + compatible = "denx,uimage"; + reg = <0x00100000 0xd80000>; + }; + partition@be80000 { + label = "kernel2"; + reg = <0x00e80000 0x180000>; + }; + partition@1000000 { + label = "sysinfo"; + reg = <0x01000000 0x40000>; + }; + partition@1040000 { + label = "rootfs2"; + reg = <0x01040000 0xc00000>; + }; + partition@1c40000 { + label = "jffs2"; + reg = <0x01c40000 0x3c0000>; + }; + }; + }; +}; diff --git a/target/linux/rtl838x/image/Makefile b/target/linux/rtl838x/image/Makefile index f490fa7ffe92..448f0b472606 100644 --- a/target/linux/rtl838x/image/Makefile +++ b/target/linux/rtl838x/image/Makefile @@ -41,21 +41,23 @@ define Device/allnet_all-sg8208m endef TARGET_DEVICES += allnet_all-sg8208m -define Device/d-link_dgs-1210-16 +define Device/d-link_dgs-1210 SOC := rtl8382 IMAGE_SIZE := 13824k DEVICE_VENDOR := D-Link - DEVICE_MODEL := DGS-1210-16 DEVICE_PACKAGES := ip-full ip-bridge ethtool tc endef + +define Device/d-link_dgs-1210-16 + $(Device/d-link_dgs-1210) + DEVICE_MODEL := DGS-1210-16 +endef TARGET_DEVICES += d-link_dgs-1210-16 define Device/d-link_dgs-1210-10p - SOC := rtl8382 - IMAGE_SIZE := 13824k - DEVICE_VENDOR := D-Link + $(Device/d-link_dgs-1210) DEVICE_MODEL := DGS-1210-10P - DEVICE_PACKAGES := ip-full ip-bridge ethtool tc lua-rs232 + DEVICE_PACKAGES += lua-rs232 endef TARGET_DEVICES += d-link_dgs-1210-10p From patchwork Wed Nov 4 12:10:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Petr_=C5=A0tetiar?= X-Patchwork-Id: 1393865 X-Patchwork-Delegate: ynezz@true.cz Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.openwrt.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=true.cz Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=JZVJGAcO; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CR5Bz5305z9sVK for ; Wed, 4 Nov 2020 23:12:59 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=38rqOpbyMt1zRmZYwE+gkDFjxqnh/x1q4SIZSVdzh08=; b=JZVJGAcOiNbp4qqww1CmU4ut5 14klB2LO3pim1ZwV32W/JsNkTLQ5IM0MrIfm7WiArGUWcvABSxopi5JTPwOOP/BoxCrGjeUsWEfHW fff0bXG60SXJMLF4dAr5yfN4LBxv+QVDzHd1b/DpUHFhnBfphi7XmT9IdsloJD+/LCCfip5bkDN6w 4C5H1DmwgYSyLrP/6LvT6+2Fqce+1DeU+17XZiiySsAzMW5RnvgAzGKcBOfJ6a9SmjgwM+K0l7JoW PX6CokHt+lWJmxLY+JYy1pK1nDYPEGC0Fj0yqFyC1JdryAXBuZr+DZx/dn+Dhe5ekEdhgy3naI9GI jp83dEs0Q==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kaHct-0003u8-Eo; Wed, 04 Nov 2020 12:10:55 +0000 Received: from smtp-out.xnet.cz ([178.217.244.18]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kaHcm-0003rq-9w for openwrt-devel@lists.openwrt.org; Wed, 04 Nov 2020 12:10:50 +0000 Received: from meh.true.cz (meh.true.cz [108.61.167.218]) (Authenticated sender: petr@true.cz) by smtp-out.xnet.cz (Postfix) with ESMTPSA id BB24A3F84; Wed, 4 Nov 2020 13:10:42 +0100 (CET) Received: by meh.true.cz (OpenSMTPD) with ESMTP id d8496846; Wed, 4 Nov 2020 13:10:25 +0100 (CET) From: =?utf-8?q?Petr_=C5=A0tetiar?= To: openwrt-devel@lists.openwrt.org Subject: [PATCH 3/3] rtl838x: add support for D-Link DGS-1210-28 Date: Wed, 4 Nov 2020 13:10:37 +0100 Message-Id: <20201104121037.5788-4-ynezz@true.cz> In-Reply-To: <20201104121037.5788-1-ynezz@true.cz> References: <20201104121037.5788-1-ynezz@true.cz> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201104_071048_602852_BF17289B X-CRM114-Status: GOOD ( 22.02 ) X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 SPF_NONE SPF: sender does not publish an SPF Record X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Petr_=C5=A0tetiar?= Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org Hardware specification ---------------------- * RTL8382M SoC, 1 MIPS 4KEc core @ 500MHz * 128MB DRAM * 32MB NOR Flash (MX25L25635E) * 24 x 10/100/1000BASE-T ports - Internal PHY with 8 ports (RTL8218B) - Two external PHYs with 8 ports each (RTL8218B) * 4 x Gigabit RJ45/SFP Combo ports - External PHY with 4 SFP ports (RTL8214FC) * Power LED * Reset button on front panel * UART (115200 8N1) via unpopulated standard 0.1" pin header marked J6 UART pinout ----------- [oooo]J3 [o]ooo|J6 | ^ ||`------ GND | | |`------- RX | | `-------- TX | `---------- Vcc (3V3) | `------------------ J3 is power input connector nearby J6 UART Boot initramfs image from U-Boot -------------------------------- 1. Press Escape key during `Hit Esc key to stop autoboot` prompt 2. Press CTRL+C keys to get into real U-Boot prompt 3. Init network with `rtk network on` command 4. Load image with `tftpboot 0x8f000000 openwrt-rtl838x-generic-d-link_dgs-1210-16-initramfs-kernel.bin` command 5. Boot the image with `bootm` command To install, upload the sysupgrade image to the OEM webpage or sysupgrade from the system running from initramfs image. It has been developed and tested on device with F1 revision. Signed-off-by: Petr Štetiar --- .../dts/rtl8382_d-link_dgs-1210-28.dts | 339 ++++++++++++++++++ target/linux/rtl838x/image/Makefile | 6 + 2 files changed, 345 insertions(+) create mode 100644 target/linux/rtl838x/dts/rtl8382_d-link_dgs-1210-28.dts diff --git a/target/linux/rtl838x/dts/rtl8382_d-link_dgs-1210-28.dts b/target/linux/rtl838x/dts/rtl8382_d-link_dgs-1210-28.dts new file mode 100644 index 000000000000..f154ca963d1c --- /dev/null +++ b/target/linux/rtl838x/dts/rtl8382_d-link_dgs-1210-28.dts @@ -0,0 +1,339 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "rtl8382_d-link_dgs-1210.dtsi" + +/ { + compatible = "d-link,dgs-1210-28", "realtek,rtl838x-soc"; + model = "D-Link DGS-1210-28"; +}; + +ðernet0 { + mdio: mdio-bus { + compatible = "realtek,rtl838x-mdio"; + regmap = <ðernet0>; + #address-cells = <1>; + #size-cells = <0>; + + /* External phy RTL8218B */ + phy0: ethernet-phy@0 { + reg = <0>; + compatible = "ethernet-phy-ieee802.3-c22"; + }; + phy1: ethernet-phy@1 { + reg = <1>; + compatible = "ethernet-phy-ieee802.3-c22"; + }; + phy2: ethernet-phy@2 { + reg = <2>; + compatible = "ethernet-phy-ieee802.3-c22"; + }; + phy3: ethernet-phy@3 { + reg = <3>; + compatible = "ethernet-phy-ieee802.3-c22"; + }; + phy4: ethernet-phy@4 { + reg = <4>; + compatible = "ethernet-phy-ieee802.3-c22"; + }; + phy5: ethernet-phy@5 { + reg = <5>; + compatible = "ethernet-phy-ieee802.3-c22"; + }; + phy6: ethernet-phy@6 { + reg = <6>; + compatible = "ethernet-phy-ieee802.3-c22"; + }; + phy7: ethernet-phy@7 { + reg = <7>; + compatible = "ethernet-phy-ieee802.3-c22"; + }; + + /* Internal phy RTL8218B */ + phy8: ethernet-phy@8 { + reg = <8>; + compatible = "ethernet-phy-ieee802.3-c22"; + phy-is-integrated; + }; + phy9: ethernet-phy@9 { + reg = <9>; + compatible = "ethernet-phy-ieee802.3-c22"; + phy-is-integrated; + }; + phy10: ethernet-phy@10 { + reg = <10>; + compatible = "ethernet-phy-ieee802.3-c22"; + phy-is-integrated; + }; + phy11: ethernet-phy@11 { + reg = <11>; + compatible = "ethernet-phy-ieee802.3-c22"; + phy-is-integrated; + }; + phy12: ethernet-phy@12 { + reg = <12>; + compatible = "ethernet-phy-ieee802.3-c22"; + phy-is-integrated; + }; + phy13: ethernet-phy@13 { + reg = <13>; + compatible = "ethernet-phy-ieee802.3-c22"; + phy-is-integrated; + }; + phy14: ethernet-phy@14 { + reg = <14>; + compatible = "ethernet-phy-ieee802.3-c22"; + phy-is-integrated; + }; + phy15: ethernet-phy@15 { + reg = <15>; + compatible = "ethernet-phy-ieee802.3-c22"; + phy-is-integrated; + }; + + /* External phy RTL8218B */ + phy16: ethernet-phy@16 { + reg = <16>; + compatible = "ethernet-phy-ieee802.3-c22"; + }; + phy17: ethernet-phy@17 { + reg = <17>; + compatible = "ethernet-phy-ieee802.3-c22"; + }; + phy18: ethernet-phy@18 { + reg = <18>; + compatible = "ethernet-phy-ieee802.3-c22"; + }; + phy19: ethernet-phy@19 { + reg = <19>; + compatible = "ethernet-phy-ieee802.3-c22"; + }; + phy20: ethernet-phy@20 { + reg = <20>; + compatible = "ethernet-phy-ieee802.3-c22"; + }; + phy21: ethernet-phy@21 { + reg = <21>; + compatible = "ethernet-phy-ieee802.3-c22"; + }; + phy22: ethernet-phy@22 { + reg = <22>; + compatible = "ethernet-phy-ieee802.3-c22"; + }; + phy23: ethernet-phy@23 { + reg = <23>; + compatible = "ethernet-phy-ieee802.3-c22"; + }; + + /* External phy: RTL8214FC */ + phy24: ethernet-phy@24 { + compatible = "ethernet-phy-ieee802.3-c22"; + sfp; + media = "fibre"; + reg = <24>; + }; + phy25: ethernet-phy@25 { + compatible = "ethernet-phy-ieee802.3-c22"; + sfp; + media = "fibre"; + reg = <25>; + }; + phy26: ethernet-phy@26 { + compatible = "ethernet-phy-ieee802.3-c22"; + sfp; + media = "fibre"; + reg = <26>; + }; + phy27: ethernet-phy@27 { + compatible = "ethernet-phy-ieee802.3-c22"; + sfp; + media = "fibre"; + reg = <27>; + }; + }; +}; + +&switch0 { + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + label = "lan1"; + phy-handle = <&phy0>; + phy-mode = "qsgmii"; + }; + port@1 { + reg = <1>; + label = "lan2"; + phy-handle = <&phy1>; + phy-mode = "qsgmii"; + }; + port@2 { + reg = <2>; + label = "lan3"; + phy-handle = <&phy2>; + phy-mode = "qsgmii"; + }; + port@3 { + reg = <3>; + label = "lan4"; + phy-handle = <&phy3>; + phy-mode = "qsgmii"; + }; + port@4 { + reg = <4>; + label = "lan5"; + phy-handle = <&phy4>; + phy-mode = "qsgmii"; + }; + port@5 { + reg = <5>; + label = "lan6"; + phy-handle = <&phy5>; + phy-mode = "qsgmii"; + }; + port@6 { + reg = <6>; + label = "lan7"; + phy-handle = <&phy6>; + phy-mode = "qsgmii"; + }; + port@7 { + reg = <7>; + label = "lan8"; + phy-handle = <&phy7>; + phy-mode = "qsgmii"; + }; + port@8 { + reg = <8>; + label = "lan9"; + phy-handle = <&phy8>; + phy-mode = "internal"; + }; + port@9 { + reg = <9>; + label = "lan10"; + phy-handle = <&phy9>; + phy-mode = "internal"; + }; + port@10 { + reg = <10>; + label = "lan11"; + phy-handle = <&phy10>; + phy-mode = "internal"; + }; + port@11 { + reg = <11>; + label = "lan12"; + phy-handle = <&phy11>; + phy-mode = "internal"; + }; + port@12 { + reg = <12>; + label = "lan13"; + phy-handle = <&phy12>; + phy-mode = "internal"; + }; + port@13 { + reg = <13>; + label = "lan14"; + phy-handle = <&phy13>; + phy-mode = "internal"; + }; + port@14 { + reg = <14>; + label = "lan15"; + phy-handle = <&phy14>; + phy-mode = "internal"; + }; + port@15 { + reg = <15>; + label = "lan16"; + phy-handle = <&phy15>; + phy-mode = "internal"; + }; + port@16 { + reg = <16>; + label = "lan17"; + phy-handle = <&phy16>; + phy-mode = "qsgmii"; + }; + port@17 { + reg = <17>; + label = "lan18"; + phy-handle = <&phy17>; + phy-mode = "qsgmii"; + }; + port@18 { + reg = <18>; + label = "lan19"; + phy-handle = <&phy18>; + phy-mode = "qsgmii"; + }; + port@19 { + reg = <19>; + label = "lan20"; + phy-handle = <&phy19>; + phy-mode = "qsgmii"; + }; + port@20 { + reg = <20>; + label = "lan21"; + phy-handle = <&phy20>; + phy-mode = "qsgmii"; + }; + port@21 { + reg = <21>; + label = "lan22"; + phy-handle = <&phy21>; + phy-mode = "qsgmii"; + }; + port@22 { + reg = <22>; + label = "lan23"; + phy-handle = <&phy22>; + phy-mode = "qsgmii"; + }; + port@23 { + reg = <23>; + label = "lan24"; + phy-handle = <&phy23>; + phy-mode = "qsgmii"; + }; + + port@24 { + reg = <24>; + label = "lan25"; + phy-handle = <&phy24>; + phy-mode = "qsgmii"; + }; + port@25 { + reg = <25>; + label = "lan26"; + phy-handle = <&phy25>; + phy-mode = "qsgmii"; + }; + port@26 { + reg = <26>; + label = "lan27"; + phy-handle = <&phy26>; + phy-mode = "qsgmii"; + }; + port@27 { + reg = <27>; + label = "lan28"; + phy-handle = <&phy27>; + phy-mode = "qsgmii"; + }; + port@28 { + ethernet = <ðernet0>; + reg = <28>; + phy-mode = "internal"; + fixed-link { + speed = <1000>; + full-duplex; + }; + }; + }; +}; diff --git a/target/linux/rtl838x/image/Makefile b/target/linux/rtl838x/image/Makefile index 448f0b472606..8c13b064446b 100644 --- a/target/linux/rtl838x/image/Makefile +++ b/target/linux/rtl838x/image/Makefile @@ -54,6 +54,12 @@ define Device/d-link_dgs-1210-16 endef TARGET_DEVICES += d-link_dgs-1210-16 +define Device/d-link_dgs-1210-28 + $(Device/d-link_dgs-1210) + DEVICE_MODEL := DGS-1210-28 +endef +TARGET_DEVICES += d-link_dgs-1210-28 + define Device/d-link_dgs-1210-10p $(Device/d-link_dgs-1210) DEVICE_MODEL := DGS-1210-10P