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