From patchwork Tue Oct 5 19:40:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Fertser X-Patchwork-Id: 1536901 X-Patchwork-Delegate: ynezz@true.cz Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=nPPngdU8; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=fcN6YUVC; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (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 bilbo.ozlabs.org (Postfix) with ESMTPS id 4HP7Ks6bN7z9sPB for ; Wed, 6 Oct 2021 06:43:13 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=HMT4Acb+MMuriZ8b2qf7Tya5FqC14D+n3pZvZ1w5Aeo=; b=nPPngdU82aWL5w GSCKbDAZ8liGWoEb4apf/0Fz+WQY6opjX6Q+0XO4gyDCsCLlZ37BVBl4hq0RF5BKdUj9V8e5cGFaU 9q45YpIpAb+M7QFIEF+tIoOiz7HhdO7McTX+Jc7MqqUxkGlcMQkcXE6aec83K5n1VPCDctVmSEqX+ ruU65Op1LkCM4uZCgwM6ieC3vqdiudlTK9n5OSmVY/5egy9+/+rQNipv7oS+XqnGsrTYOhpJr+RLg E3nmafYWFGaOa+zeJQaa2uyQZzIGxUS9luiD9E9+RXIbNhtFzRw3f/WytqA982rxMw9cQj2+/BrP4 UyTnzpr4Ytg1XxNXOAlA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mXqJE-00Bfb7-Mc; Tue, 05 Oct 2021 19:41:04 +0000 Received: from mail-lf1-x12e.google.com ([2a00:1450:4864:20::12e]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mXqJ0-00BfYq-5D for openwrt-devel@lists.openwrt.org; Tue, 05 Oct 2021 19:40:51 +0000 Received: by mail-lf1-x12e.google.com with SMTP id j5so478081lfg.8 for ; Tue, 05 Oct 2021 12:40:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=71XXVgkeIBW0AbUFR2bHpJkr4JeAN6m8w6RP/icqGk8=; b=fcN6YUVCDBymKym86EjRUbZ5qmsW5aV1Qn//Y7b8gGrWMTFJ1It/Y4wn4s3/crTSA3 hrzOlg+5XMdxJUk8Tj52gZzEaWQkw6B+miIVZ775tea/mXUE/fFIXBHfUlrxk939o7a6 fDtKSEniBhGtQ5+ES0N77L4qi71aL/2MXMzPxXcxzvWHRofbTSOPxOqmfhN6Y0thD9Nx +sxY1OmSURtrGk7sxu93grllbCpH+rYX29aR8yb+Ka2qHjfe+0xztlbmyCSjh8y+YEOM 9knrcBQw6RCiFLC7Wlv5PLZO8DFmfa4J3H/2ux+6of2/qqHsPXKoeDY2upOrEuAFmG5D bjRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=71XXVgkeIBW0AbUFR2bHpJkr4JeAN6m8w6RP/icqGk8=; b=xOol2YrNyvG3yN0+y1jikXdmK3ZWwq/cUD7OKYgh00S8SSpAlWrnFWqf2KrSfzJ8/o 6yf4EY3gp8AorXQWgvwS6LssxSC4Ob2JLxfGiPiyN9sn7zqBUOec5ZdaUS5LHkV1IcBv 0gskJXw2vJX0LnaU0QcrJE4pJ/2DUnKjjdEZ3b+x4D2g+1xrAaF8yBwHN/uCqbIAXBk2 0mo/cusUKvQBMAxNsP616NVTF1TM+yg85PEIGycWmAJAtTpxfum7PKk/8j7sZZlPB87J JfdrNpRt2DawLNnQ8rLY1yadbqYMbdT9JnbwY3yp/nLYbCE/XrNtaGwHHvAp+8Q4F7r3 6Pow== X-Gm-Message-State: AOAM532x8d6ujvzDo27XCcW8tWPvRrYWxVJx0C3ROCsikp32KhE7xTLA vxMGGhKw0jQmLQDyoAhpB40KUAyjqp4= X-Google-Smtp-Source: ABdhPJz5dvDowP8HihUIsd8dimKuhVWVSlIe/Fjxg5YxhwNa+smNFPr56ePwJ4aFvBa71rt9+TiSRg== X-Received: by 2002:ac2:41d4:: with SMTP id d20mr5427079lfi.598.1633462848587; Tue, 05 Oct 2021 12:40:48 -0700 (PDT) Received: from home.paul.comp (paulfertser.info. [2001:470:26:54b:226:9eff:fe70:80c2]) by smtp.gmail.com with ESMTPSA id o3sm152961lfo.31.2021.10.05.12.40.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Oct 2021 12:40:47 -0700 (PDT) Received: from home.paul.comp (home.paul.comp [IPv6:0:0:0:0:0:0:0:1]) by home.paul.comp (8.15.2/8.15.2/Debian-14~deb10u1) with ESMTP id 195JejDw031954; Tue, 5 Oct 2021 22:40:46 +0300 Received: (from paul@localhost) by home.paul.comp (8.15.2/8.15.2/Submit) id 195JejAf031953; Tue, 5 Oct 2021 22:40:45 +0300 From: Paul Fertser To: openwrt-devel@lists.openwrt.org Cc: Paul Fertser Subject: [RFT 1/5] realtek: split DGS-1210-10P DTS Date: Tue, 5 Oct 2021 22:40:20 +0300 Message-Id: <20211005194024.31909-2-fercerpav@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20211005194024.31909-1-fercerpav@gmail.com> References: <20211005194024.31909-1-fercerpav@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211005_124050_224046_3C3666EF X-CRM114-Status: GOOD ( 13.29 ) X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: In preparations to add support for more similar boards the common part is split into a DTSI. The model that's currently supported is known to be revision F1 so mark it accordingly and provide appropriate compatible string for sysupgrade to work. Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:12e listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [fercerpav[at]gmail.com] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org In preparations to add support for more similar boards the common part is split into a DTSI. The model that's currently supported is known to be revision F1 so mark it accordingly and provide appropriate compatible string for sysupgrade to work. Signed-off-by: Paul Fertser --- ...0p.dts => rtl8380_d-link_dgs-1210-10.dtsi} | 60 ----------------- .../rtl8380_d-link_dgs-1210-10p-f1.dts | 66 +++++++++++++++++++ target/linux/realtek/image/Makefile | 7 +- 3 files changed, 71 insertions(+), 62 deletions(-) rename target/linux/realtek/dts-5.10/{rtl8382_d-link_dgs-1210-10p.dts => rtl8380_d-link_dgs-1210-10.dtsi} (60%) create mode 100644 target/linux/realtek/dts-5.10/rtl8380_d-link_dgs-1210-10p-f1.dts diff --git a/target/linux/realtek/dts-5.10/rtl8382_d-link_dgs-1210-10p.dts b/target/linux/realtek/dts-5.10/rtl8380_d-link_dgs-1210-10.dtsi similarity index 60% rename from target/linux/realtek/dts-5.10/rtl8382_d-link_dgs-1210-10p.dts rename to target/linux/realtek/dts-5.10/rtl8380_d-link_dgs-1210-10.dtsi index 119eaadc16e6..c465e7354872 100644 --- a/target/linux/realtek/dts-5.10/rtl8382_d-link_dgs-1210-10p.dts +++ b/target/linux/realtek/dts-5.10/rtl8380_d-link_dgs-1210-10.dtsi @@ -6,9 +6,6 @@ #include / { - compatible = "d-link,dgs-1210-10p", "realtek,rtl838x-soc"; - model = "D-Link DGS-1210-10P"; - aliases { led-boot = &led_power; led-failsafe = &led_power; @@ -20,11 +17,6 @@ bootargs = "console=ttyS0,115200"; }; - memory@0 { - device_type = "memory"; - reg = <0x0 0x8000000>; - }; - leds { pinctrl-names = "default"; pinctrl-0 = <&pinmux_disable_sys_led>; @@ -50,58 +42,6 @@ }; }; - -&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>; - }; - 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>; - }; - }; - }; -}; - &uart1 { status = "okay"; }; diff --git a/target/linux/realtek/dts-5.10/rtl8380_d-link_dgs-1210-10p-f1.dts b/target/linux/realtek/dts-5.10/rtl8380_d-link_dgs-1210-10p-f1.dts new file mode 100644 index 000000000000..9a301adb935c --- /dev/null +++ b/target/linux/realtek/dts-5.10/rtl8380_d-link_dgs-1210-10p-f1.dts @@ -0,0 +1,66 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "rtl8380_d-link_dgs-1210-10.dtsi" + +/ { + compatible = "d-link,dgs-1210-10p-f1", "realtek,rtl838x-soc"; + model = "D-Link DGS-1210-10P F1"; + + memory@0 { + device_type = "memory"; + reg = <0x0 0x8000000>; + }; +}; + + +&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>; + }; + 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/realtek/image/Makefile b/target/linux/realtek/image/Makefile index 5e4b4cde800d..c1e47f719f3a 100644 --- a/target/linux/realtek/image/Makefile +++ b/target/linux/realtek/image/Makefile @@ -53,12 +53,15 @@ define Device/d-link_dgs-1210 DEVICE_VENDOR := D-Link endef -define Device/d-link_dgs-1210-10p +define Device/d-link_dgs-1210-10p-f1 $(Device/d-link_dgs-1210) + SOC := rtl8380 DEVICE_MODEL := DGS-1210-10P + DEVICE_VARIANT := F1 + SUPPORTED_DEVICES += d-link,dgs-1210-10p DEVICE_PACKAGES += lua-rs232 endef -TARGET_DEVICES += d-link_dgs-1210-10p +TARGET_DEVICES += d-link_dgs-1210-10p-f1 define Device/d-link_dgs-1210-16 $(Device/d-link_dgs-1210) From patchwork Tue Oct 5 19:40:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Fertser X-Patchwork-Id: 1536902 X-Patchwork-Delegate: ynezz@true.cz Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=Ip+Stkjm; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=aPC1ycxS; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (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 bilbo.ozlabs.org (Postfix) with ESMTPS id 4HP7Ks5SJHz9sP7 for ; Wed, 6 Oct 2021 06:43:13 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=jmXIwEad5ad8L1oJbOObqCtN+6oQ38M8Je7OFVvX1UA=; b=Ip+StkjmMR7Li4 m9nXUptIif6IrtWZEseXV0fSYkxzuo6wds8djlWPRomdph2ylhSgPhEdXr4rV5Y1NRxCBhSQrwBrM gvAcUIoYh11IVHEZQJQ2sMLVlc/esI2EcFGA7pvgGXTzkUFRgGdeb9kkFsRymS9z38xpHYlGnYj4i Xka+bNkq9cML1yknNdfIg2+OjiH4o3j9lwbdTcpPboh4VWEx8hkdAgULCJj5tPYcQ25bFKfVPlpSR EspiZ/aHYh6GeqLKSH3nGE8WqVcX2Q5RK/ugWKte/052EekLf+idOPJOGNh7Kvz9cD5gHaayfR3Uq xYV8uI6F/d8nsi7//99Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mXqJR-00BfdD-E1; Tue, 05 Oct 2021 19:41:17 +0000 Received: from mail-lf1-x12e.google.com ([2a00:1450:4864:20::12e]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mXqJ0-00BfYr-Mx for openwrt-devel@lists.openwrt.org; Tue, 05 Oct 2021 19:40:52 +0000 Received: by mail-lf1-x12e.google.com with SMTP id i24so368631lfj.13 for ; Tue, 05 Oct 2021 12:40:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=10ltc0ncQjsoZpIRdb460ghLYyDqSvrk8Z5wlW/f3h4=; b=aPC1ycxSkPK7wx+j18oCPV0OyhY77/FdIPTxooya5Vq6cRoTF7zEfSb5S/HU3pruvB 1RUEJ7+IrQ6kSOYltTKuj4KuKWlDd3xAOXxzpxrisSV9tIUIhnQGV0fjkp6eF/U7NCRK aoekd5lJQjEVBIctYj+NGwCCuvmu8l4b4zdLrC7O4XZVtMCq9gNDR5z7I1NE6R8fM60u Mw1jukmF5XDDEIbHtz0tEUJ0CT+tndmge37ZUvAAbpuLnr/QG2EO7J+njhksCUvYejvb r1dSuAejA/iDAzYq9Px3wBP2I+SNGjlkuJsNM16nKG7M5RrU5dj0ph7GpsWJjnFJGhKT 5LAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=10ltc0ncQjsoZpIRdb460ghLYyDqSvrk8Z5wlW/f3h4=; b=3J/DlkXgIDAPH6G3Od37a7LQ4gVgtquR2njUWl9NMZKm1doYtZMrD7crcuo1SL43MR fksPASBxNulYXVd94MEmcDOvR2OcCNbFiIcIeO+wX9MRIomj8u/BQyL1seRhD7R0BouK Y+MQUGSiE7A+yl3A9LarpLkMxX29bkh3I/cmsYFqhsRJERW2Gg3CMZKrMPx7kIWajV6j aysXIh6uYRA3s5RME9PVli5AH/tEg/qif/Bxq3zkqBbaf3sbdu4cAAjPpTFyeOaM3ZC9 6STvN067VeFeUvMYkayifaNjheV/8PO1OQUuKpTHZ4kc33nxIZC2bP31CVFOm37ou3jO bpbA== X-Gm-Message-State: AOAM532KMHrj+HZeGR6oeARUiL6LWUh3nV34LKKbbEC1rYVqQHHrzUkB dNUJOdiz20m7Cz80+99Xh3adt1JzcC0= X-Google-Smtp-Source: ABdhPJy4zcbLczqtGwhlPjZOmoR0zenw2znlpCusnvvM+m4BUHfRA8yqsuGMi/LR7ckmZWHqkwAzaQ== X-Received: by 2002:a2e:8011:: with SMTP id j17mr23710944ljg.145.1633462849432; Tue, 05 Oct 2021 12:40:49 -0700 (PDT) Received: from home.paul.comp (paulfertser.info. [2001:470:26:54b:226:9eff:fe70:80c2]) by smtp.gmail.com with ESMTPSA id n22sm1156410lfe.235.2021.10.05.12.40.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Oct 2021 12:40:49 -0700 (PDT) Received: from home.paul.comp (home.paul.comp [IPv6:0:0:0:0:0:0:0:1]) by home.paul.comp (8.15.2/8.15.2/Debian-14~deb10u1) with ESMTP id 195Jekk9031958; Tue, 5 Oct 2021 22:40:47 +0300 Received: (from paul@localhost) by home.paul.comp (8.15.2/8.15.2/Submit) id 195JekQc031957; Tue, 5 Oct 2021 22:40:46 +0300 From: Paul Fertser To: openwrt-devel@lists.openwrt.org Cc: Paul Fertser Subject: [RFT 2/5] realtek: add all LEDs, buttons and SFP signals to DGS-1210-10 Date: Tue, 5 Oct 2021 22:40:21 +0300 Message-Id: <20211005194024.31909-3-fercerpav@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20211005194024.31909-1-fercerpav@gmail.com> References: <20211005194024.31909-1-fercerpav@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211005_124050_769199_6EC4C315 X-CRM114-Status: GOOD ( 12.33 ) X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: These GPIO numbers were obtained by physically inspecting a DGS-1210-10P R1 board but should be common for other devices based on same PCB layout. Signed-off-by: Paul Fertser --- .../dts-5.10/rtl8380_d-link_dgs-1210-10.dtsi | 88 +++++++++++++++++-- 1 file changed, 83 insertions(+), 5 deletions(-) Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:12e listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [fercerpav[at]gmail.com] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org These GPIO numbers were obtained by physically inspecting a DGS-1210-10P R1 board but should be common for other devices based on same PCB layout. Signed-off-by: Paul Fertser --- .../dts-5.10/rtl8380_d-link_dgs-1210-10.dtsi | 88 +++++++++++++++++-- 1 file changed, 83 insertions(+), 5 deletions(-) diff --git a/target/linux/realtek/dts-5.10/rtl8380_d-link_dgs-1210-10.dtsi b/target/linux/realtek/dts-5.10/rtl8380_d-link_dgs-1210-10.dtsi index c465e7354872..0e9aebda91a9 100644 --- a/target/linux/realtek/dts-5.10/rtl8380_d-link_dgs-1210-10.dtsi +++ b/target/linux/realtek/dts-5.10/rtl8380_d-link_dgs-1210-10.dtsi @@ -23,25 +23,90 @@ compatible = "gpio-leds"; led_power: power { - // GPIO 0 seems to provide power to the leds label = "green:power"; gpios = <&gpio0 0 GPIO_ACTIVE_LOW>; }; + + poe_max { + label = "yellow:poe_max"; + gpios = <&gpio1 27 GPIO_ACTIVE_LOW>; + }; + + link { + label = "green:link"; + gpios = <&gpio1 28 GPIO_ACTIVE_LOW>; + }; + + poe { + label = "green:poe"; + gpios = <&gpio1 29 GPIO_ACTIVE_LOW>; + }; }; keys { compatible = "gpio-keys-polled"; poll-interval = <20>; - /* is this pin 30 on the external RTL8231 (&gpio1)? */ - /*mode { + mode { + label = "mode"; + gpios = <&gpio1 30 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + reset { label = "reset"; - gpios = <&gpio0 94 GPIO_ACTIVE_LOW>; + gpios = <&gpio1 33 GPIO_ACTIVE_LOW>; linux,code = ; - };*/ + }; + }; + + gpio-restart { + compatible = "gpio-restart"; + gpios = <&gpio1 34 GPIO_ACTIVE_LOW>; + open-source; + }; + + /* i2c of the left SFP cage: port 9 */ + i2c0: i2c-gpio-0 { + compatible = "i2c-gpio"; + sda-gpios = <&gpio1 6 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; + scl-gpios = <&gpio1 7 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; + i2c-gpio,delay-us = <2>; + #address-cells = <1>; + #size-cells = <0>; + }; + + sfp0: sfp-p9 { + compatible = "sff,sfp"; + i2c-bus = <&i2c0>; + los-gpio = <&gpio1 9 GPIO_ACTIVE_HIGH>; + mod-def0-gpio = <&gpio1 8 GPIO_ACTIVE_LOW>; + tx-disable-gpio = <&gpio1 11 GPIO_ACTIVE_HIGH>; + }; + + /* i2c of the right SFP cage: port 10 */ + i2c1: i2c-gpio-1 { + compatible = "i2c-gpio"; + sda-gpios = <&gpio1 1 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; + scl-gpios = <&gpio1 2 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; + i2c-gpio,delay-us = <2>; + #address-cells = <1>; + #size-cells = <0>; + }; + + sfp1: sfp-p10 { + compatible = "sff,sfp"; + i2c-bus = <&i2c1>; + los-gpio = <&gpio1 4 GPIO_ACTIVE_HIGH>; + mod-def0-gpio = <&gpio1 3 GPIO_ACTIVE_LOW>; + tx-disable-gpio = <&gpio1 12 GPIO_ACTIVE_HIGH>; }; }; +&gpio1 { + status = "okay"; +}; + &uart1 { status = "okay"; }; @@ -86,6 +151,7 @@ ethernet = <ðernet0>; reg = <28>; phy-mode = "internal"; + fixed-link { speed = <1000>; full-duplex; @@ -93,3 +159,15 @@ }; }; }; + +&switch0 { + ports { + port@24 { + sfp = <&sfp0>; + }; + + port@26 { + sfp = <&sfp1>; + }; + }; +}; From patchwork Tue Oct 5 19:40:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Fertser X-Patchwork-Id: 1536903 X-Patchwork-Delegate: ynezz@true.cz Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=qnt51TQ5; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=HIGGwXui; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (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 bilbo.ozlabs.org (Postfix) with ESMTPS id 4HP7Ky1Tpgz9sP7 for ; Wed, 6 Oct 2021 06:43:18 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=pYCgMjiDddx3uIY9T6YSpROEGI4q2ZPgHRQCN0fbvRU=; b=qnt51TQ5IT42nq c91uMeN3urq6Mh1wMQHKZE65ZuzCzT+QDnNJ1kXBRCs2oCnSmp4P/eRZbf4/ID9WCCQzLdW/sfFMO qB8iMXb8d2ZPCcie+ZYd0EGO8MFN62Ja852fprSoBwqwkr7p0fFZ3Mqa+x5wG8dOMclhuXVqUK6JJ KwouASkXknN4zDoZ/tfT7231Y0NUw3oE0e8/Mq7h7KNHbTG10zH/MEN3znGK3afmtovSILLNxsU0d smS9YRSVDn61PrY5cC3XYhMJwDdSy9Cy1DMuLS8OVbx5CNFKkTDYe0VajZzdJ4otwTr5wX25doIgG viqbqVqgGy+wEEf1fs3w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mXqJf-00BffT-DN; Tue, 05 Oct 2021 19:41:31 +0000 Received: from mail-lf1-x12e.google.com ([2a00:1450:4864:20::12e]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mXqJ2-00BfZR-9y for openwrt-devel@lists.openwrt.org; Tue, 05 Oct 2021 19:40:54 +0000 Received: by mail-lf1-x12e.google.com with SMTP id i4so563903lfv.4 for ; Tue, 05 Oct 2021 12:40:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=yXmQl1R9y3HYlNA3FyrSvDthjP4bFGIRNNnbYEgD7Po=; b=HIGGwXuiv+o4EGX4m/T3m6ndpQGsEXUiAv7u1WuKHgwfi7yFGs3fdDBRjgaEdbmdKy xHBvZD1R6xMI/iTwtmuUvbkS/oqBcfxeMtMSH8gGUcNvMgoxokx7iZVo2NBPfxuIxDX9 lMkFuecn/VV79qV11FtT9giVGHmpD8SNdK8eZPnO3ExjNXGvb9iu97VMFX3tiQVv9iiS nQpnBLCErJdPctLG6V1hIyEM3QxK+58alI7arAkdnI8Z5ed5gszZM4YLQwZObPo1MtGY +idq9t4jTjWuTgy/IjObj8EsarKQt+sKuMrqx0AXCHFpunqOiNyX3kgfJEEEkvmBIlxG ZiYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=yXmQl1R9y3HYlNA3FyrSvDthjP4bFGIRNNnbYEgD7Po=; b=qQ5yq6VzYj1mVIXNZCsD2qYa/x89YN668c2l35rOEmTVUWOY24XzmVXXhhqjxcfRae anb5Zd1ZMmdJSCvpmYYmzPhUv9qEJXfomdqSkmWW/45hZc5SRK1Er+gY6aEwp8na/L0W wQ7Of5lAyHWYWT/vFzVFz6F7DePQkypMrZbU6SBt5s3Wu8YjCRyAbWg+tksZY/qHLdhR K8Lh1IKMWM9Gd7P7nqGQk/PYEoEW82hWtMl/OsgE8cDyzeRWuDyutA2INl171adaNAvb YLCUOXyqDzDEGT16OyN9+bWhmAQxP5wWMzXZSDjWsaIJ+pwb6IclN+8ZGj5P64ffnyE/ vO8A== X-Gm-Message-State: AOAM531VpTYA+9WwySMoZyv+q87rkdtruCuZJSuLbaDZZHObSqgxxdmk hPMFcgAQS+cYxyvJqf40FINm68vTbJ8= X-Google-Smtp-Source: ABdhPJxz3InibzrLUYShYDpN2jWg3H2G/qhR5pSC+DdD5ARdJCosOv9mGzwZDTOqeIcfe1VP5proVg== X-Received: by 2002:a05:6512:455:: with SMTP id y21mr5474897lfk.548.1633462850936; Tue, 05 Oct 2021 12:40:50 -0700 (PDT) Received: from home.paul.comp (paulfertser.info. [2001:470:26:54b:226:9eff:fe70:80c2]) by smtp.gmail.com with ESMTPSA id m4sm1760493ljq.4.2021.10.05.12.40.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Oct 2021 12:40:50 -0700 (PDT) Received: from home.paul.comp (home.paul.comp [IPv6:0:0:0:0:0:0:0:1]) by home.paul.comp (8.15.2/8.15.2/Debian-14~deb10u1) with ESMTP id 195Jel1W031962; Tue, 5 Oct 2021 22:40:48 +0300 Received: (from paul@localhost) by home.paul.comp (8.15.2/8.15.2/Submit) id 195Jel5d031961; Tue, 5 Oct 2021 22:40:47 +0300 From: Paul Fertser To: openwrt-devel@lists.openwrt.org Cc: Paul Fertser Subject: [RFT 3/5] realtek: add non-PoE version of DGS-1210-10 F1 Date: Tue, 5 Oct 2021 22:40:22 +0300 Message-Id: <20211005194024.31909-4-fercerpav@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20211005194024.31909-1-fercerpav@gmail.com> References: <20211005194024.31909-1-fercerpav@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211005_124052_371193_A794B7DE X-CRM114-Status: GOOD ( 13.72 ) X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Signed-off-by: Paul Fertser --- .../rtl8380_d-link_dgs-1210-10-f1.dts | 8 +++ .../rtl8380_d-link_dgs-1210-10-f1.dtsi | 61 +++++++++++++++++++ .../rtl8380_d-link_dgs-1210-10p-f1.dts | 60 + [...] Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:12e listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [fercerpav[at]gmail.com] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org Signed-off-by: Paul Fertser --- .../rtl8380_d-link_dgs-1210-10-f1.dts | 8 +++ .../rtl8380_d-link_dgs-1210-10-f1.dtsi | 61 +++++++++++++++++++ .../rtl8380_d-link_dgs-1210-10p-f1.dts | 60 +----------------- target/linux/realtek/image/Makefile | 10 ++- 4 files changed, 78 insertions(+), 61 deletions(-) create mode 100644 target/linux/realtek/dts-5.10/rtl8380_d-link_dgs-1210-10-f1.dts create mode 100644 target/linux/realtek/dts-5.10/rtl8380_d-link_dgs-1210-10-f1.dtsi diff --git a/target/linux/realtek/dts-5.10/rtl8380_d-link_dgs-1210-10-f1.dts b/target/linux/realtek/dts-5.10/rtl8380_d-link_dgs-1210-10-f1.dts new file mode 100644 index 000000000000..39e76bf470ea --- /dev/null +++ b/target/linux/realtek/dts-5.10/rtl8380_d-link_dgs-1210-10-f1.dts @@ -0,0 +1,8 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "rtl8380_d-link_dgs-1210-10-f1.dtsi" + +/ { + compatible = "d-link,dgs-1210-10-f1", "realtek,rtl838x-soc"; + model = "D-Link DGS-1210-10 F1"; +}; diff --git a/target/linux/realtek/dts-5.10/rtl8380_d-link_dgs-1210-10-f1.dtsi b/target/linux/realtek/dts-5.10/rtl8380_d-link_dgs-1210-10-f1.dtsi new file mode 100644 index 000000000000..c9dd5e77deb6 --- /dev/null +++ b/target/linux/realtek/dts-5.10/rtl8380_d-link_dgs-1210-10-f1.dtsi @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "rtl8380_d-link_dgs-1210-10.dtsi" + +/ { + memory@0 { + device_type = "memory"; + reg = <0x0 0x8000000>; + }; +}; + +&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>; + }; + 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/realtek/dts-5.10/rtl8380_d-link_dgs-1210-10p-f1.dts b/target/linux/realtek/dts-5.10/rtl8380_d-link_dgs-1210-10p-f1.dts index 9a301adb935c..a59dc6b60cc7 100644 --- a/target/linux/realtek/dts-5.10/rtl8380_d-link_dgs-1210-10p-f1.dts +++ b/target/linux/realtek/dts-5.10/rtl8380_d-link_dgs-1210-10p-f1.dts @@ -1,66 +1,8 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT -#include "rtl8380_d-link_dgs-1210-10.dtsi" +#include "rtl8380_d-link_dgs-1210-10-f1.dtsi" / { compatible = "d-link,dgs-1210-10p-f1", "realtek,rtl838x-soc"; model = "D-Link DGS-1210-10P F1"; - - memory@0 { - device_type = "memory"; - reg = <0x0 0x8000000>; - }; -}; - - -&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>; - }; - 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/realtek/image/Makefile b/target/linux/realtek/image/Makefile index c1e47f719f3a..903ad3815690 100644 --- a/target/linux/realtek/image/Makefile +++ b/target/linux/realtek/image/Makefile @@ -53,11 +53,17 @@ define Device/d-link_dgs-1210 DEVICE_VENDOR := D-Link endef -define Device/d-link_dgs-1210-10p-f1 +define Device/d-link_dgs-1210-10-f1 $(Device/d-link_dgs-1210) SOC := rtl8380 - DEVICE_MODEL := DGS-1210-10P + DEVICE_MODEL := DGS-1210-10 DEVICE_VARIANT := F1 +endef +TARGET_DEVICES += d-link_dgs-1210-10-f1 + +define Device/d-link_dgs-1210-10p-f1 + $(Device/d-link_dgs-1210-10-f1) + DEVICE_MODEL := DGS-1210-10P SUPPORTED_DEVICES += d-link,dgs-1210-10p DEVICE_PACKAGES += lua-rs232 endef From patchwork Tue Oct 5 19:40:23 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Fertser X-Patchwork-Id: 1536904 X-Patchwork-Delegate: ynezz@true.cz Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=DnMrNr0R; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=bl7BWpGx; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (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 bilbo.ozlabs.org (Postfix) with ESMTPS id 4HP7LN4zQCz9sP7 for ; Wed, 6 Oct 2021 06:43:40 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=cRe3t1q8R1lzQ9P8BK4xjDnwbugqr5Pk3G1rvWLWCuY=; b=DnMrNr0RGkrtsv l90uFUv3tVqAemymYGVMiG3/eKWI/v5ALdaOJgeF4b2G4DXg6Rro+H0UwV1yjvMGOZjfW6psd6qQ6 EFMez7UdITPA4JwRL3BoL+oidpSrZobMHwyaA63HSLkwAEvnGzPGRyQhu3vsN8dG36e+1H4j2w/rV mosn/Sv+bpIp9hfQGdeB5LX5y6Ye7Dab7dkx6CjALblffzT0hu9uWyjQjtx9uRF/LNvEJOpqgiMGW GG2A2POuTmVFUNMCu4HlC8AUk6Y2MZKlCp/59PzjDoEL4U2LXMxylnDJOB5g7ezuzBgh/utWwf3hz ZBY/scLc4cGyAs4ifBHg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mXqJw-00Bfjx-Ui; Tue, 05 Oct 2021 19:41:49 +0000 Received: from mail-lf1-x130.google.com ([2a00:1450:4864:20::130]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mXqJ3-00BfZu-Vo for openwrt-devel@lists.openwrt.org; Tue, 05 Oct 2021 19:40:55 +0000 Received: by mail-lf1-x130.google.com with SMTP id b20so584899lfv.3 for ; Tue, 05 Oct 2021 12:40:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=NxZ53kuXN1Qzlnq2pOy7oHvr3Wys0XR/R5bk1ac/nQ8=; b=bl7BWpGxBuLYFa7SDwOheKUXG+wc5bNXl0uMlexEzM+vnj+INfomyz/mdMxY0TWPRq HrE1v30iBJqILesKQ5+CawnG4aiY1cP2wFN77TuWqyYN7lv/0HQSM7P2kaEBclGh9igb TWfNtBgjEIQeZfdtJgYNUSoWVNGdPoPyCwmlxDtsIEyUcV6SsSUvQnKMzslReZli5u9I eme/Sd0cz8ZPe2YZJ23J95ZbWuvknIudd5IObBNHCo4YEMmQHZ4gtHeH/cwdHDLn43yR sDsGbBvh2qqjn8gRJ2BmOo0l0Y4515hD4sGIePmyZzvQ4VEwIIZbc+wwg0H8al9kjqTX U2lw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=NxZ53kuXN1Qzlnq2pOy7oHvr3Wys0XR/R5bk1ac/nQ8=; b=dk4RhnnpocWXG8E5VoCgmYrisSYCajgoxwClzcxWVYX+GkVe/M6XyoIgL//ueZX6MR uB9/9MUQBtmYmS1nsQa61If0T67qGUI0fjwFXA693GVtSiRoQXa2+bN9XfAcvCwT32XK nWa6gHDYHG+wAJ1BcZkFaSxLGsm0VZ3nAC9xrI/hvSxTLbnMGnyPH8kM77e07pI5XXXW t5IHw0FoQu/Bj+SIRtnRYPumJiRFhR0XPAL5BbKgPQW31EWK9EbKKvDiOCs4JrYOk02Q 6I0iSBLBxDfBFgZ6YQj/AMgIiP9CCKn6x7aShijPWIGRd/NzjCmiqqrKrk+j6xae8g52 L48g== X-Gm-Message-State: AOAM5336KIAIUkL65bCBV2ZHQXBxyKxydtcSKJxKCxesOR5/BiqLzTKl SPMietp/gzXH8ncxNOXHVclonbj/h50= X-Google-Smtp-Source: ABdhPJwq37RtY/o5C+734NXm03WwJD1xVs3UHsqDkmQVbcY+UIVJQxSV37rmtLi7ViS+uRkoAiSjsw== X-Received: by 2002:ac2:4c51:: with SMTP id o17mr5296087lfk.457.1633462852287; Tue, 05 Oct 2021 12:40:52 -0700 (PDT) Received: from home.paul.comp (paulfertser.info. [2001:470:26:54b:226:9eff:fe70:80c2]) by smtp.gmail.com with ESMTPSA id h9sm903879lfl.42.2021.10.05.12.40.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Oct 2021 12:40:51 -0700 (PDT) Received: from home.paul.comp (home.paul.comp [IPv6:0:0:0:0:0:0:0:1]) by home.paul.comp (8.15.2/8.15.2/Debian-14~deb10u1) with ESMTP id 195JenmD031966; Tue, 5 Oct 2021 22:40:50 +0300 Received: (from paul@localhost) by home.paul.comp (8.15.2/8.15.2/Submit) id 195JenQJ031965; Tue, 5 Oct 2021 22:40:49 +0300 From: Paul Fertser To: openwrt-devel@lists.openwrt.org Cc: Paul Fertser Subject: [RFT 4/5] realtek: support D-Link DGS-1210-10P H/W:R1 Date: Tue, 5 Oct 2021 22:40:23 +0300 Message-Id: <20211005194024.31909-5-fercerpav@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20211005194024.31909-1-fercerpav@gmail.com> References: <20211005194024.31909-1-fercerpav@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211005_124054_049006_6A5C7F07 X-CRM114-Status: GOOD ( 16.49 ) X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: This is an 8 port 1000BASE-T + 2 1000BASE-X SFP gigabit switch with PoE+ support, 65 W budget (using 54 V * 1.574 A = 85 W power supply). In order to manipulate the PoE+ one needs the realtek-poe package [0]. Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:130 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [fercerpav[at]gmail.com] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org This is an 8 port 1000BASE-T + 2 1000BASE-X SFP gigabit switch with PoE+ support, 65 W budget (using 54 V * 1.574 A = 85 W power supply). In order to manipulate the PoE+ one needs the realtek-poe package [0]. Specifications -------------- * SoC: Realtek RTL8380M 500 MHz MIPS 4KEc * Flash: Macronix MX25L25645GMI-08G 32 MiB * RAM: Nanya NT5CC256M8JQ-EK 256 MiB DDR3(L) SDRAM * Ethernet: 8x 10/100/1000 1000BASE-T 2x 1000BASE-X SFP * PoE+: Broadcom BCM59121B0KMLG (IEEE 802.3at-2009 compliant) Controlled by Nuvoton M0516LDE MCU talking undocumented protocol to the Realtek's second UART * Buttons: Mode ("lights_toggle") and Reset * LEDs: Power, PoE Max, Link and PoE software-controlled; per-port link indication LEDs hardware-controlled * UART: 2.54 mm header with populated standard pin connector J8 Pin 1: Vcc (3.3 V) Pin 2: Tx Pin 3: Rx Pin 4: GND Baud and framing: 115200 8n1 Installation ------------ * Configure your client with static 10.90.90.91/24 address. * Set up a TFTP server on your client and make it serve the initramfs image. Connect it to port 1 of the switch. * Connect serial, power up the switch, interrupt U-boot by hitting Escape after seeing "Power on self test" message * Download the image onto the device and boot from it: > tftpboot 0x8f000000 10.90.90.91:openwrt-realtek-generic-d-link_dgs-1210-10p-r1-initramfs-kernel.bin > bootm * Once OpenWrt has booted reconfigure your client to use VID 100 and DHCP, scp the sysupgrade image to /tmp and run sysupgrade. [0] https://patchwork.ozlabs.org/project/openwrt/patch/20210511152243.1167160-1-john@phrozen.org/ Signed-off-by: Paul Fertser --- .../realtek/base-files/etc/board.d/02_network | 7 ++ .../rtl8380_d-link_dgs-1210-10p-r1.dts | 67 +++++++++++++++++++ target/linux/realtek/image/Makefile | 11 +++ 3 files changed, 85 insertions(+) create mode 100644 target/linux/realtek/dts-5.10/rtl8380_d-link_dgs-1210-10p-r1.dts diff --git a/target/linux/realtek/base-files/etc/board.d/02_network b/target/linux/realtek/base-files/etc/board.d/02_network index 58461c9c995f..e7c45de92328 100644 --- a/target/linux/realtek/base-files/etc/board.d/02_network +++ b/target/linux/realtek/base-files/etc/board.d/02_network @@ -48,6 +48,13 @@ done [ -n "$label_mac" ] && ucidef_set_label_macaddr $label_mac case $board in +d-link,dgs-1210-10p-f1|\ +d-link,dgs-1210-10p-r1) + ucidef_set_poe 65 "$lan_list" + # once PoE board data is standardised it should also include + # max per-port power: 30 W + # PoE id numbers: inversed, e.g. lan2 is id 7 + ;; netgear,gs110tpp-v1) ucidef_set_poe 130 "$lan_list" ;; diff --git a/target/linux/realtek/dts-5.10/rtl8380_d-link_dgs-1210-10p-r1.dts b/target/linux/realtek/dts-5.10/rtl8380_d-link_dgs-1210-10p-r1.dts new file mode 100644 index 000000000000..379e0140bdf0 --- /dev/null +++ b/target/linux/realtek/dts-5.10/rtl8380_d-link_dgs-1210-10p-r1.dts @@ -0,0 +1,67 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "rtl8380_d-link_dgs-1210-10.dtsi" + +/ { + compatible = "d-link,dgs-1210-10p-r1", "realtek,rtl838x-soc"; + model = "D-Link DGS-1210-10P R1"; + + memory@0 { + device_type = "memory"; + reg = <0x0 0x10000000>; + }; +}; + +&spi0 { + status = "okay"; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <50000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x00000000 0x0080000>; + read-only; + }; + + partition@80000 { + label = "u-boot-env"; + reg = <0x00080000 0x0040000>; + read-only; + }; + + partition@c0000 { + label = "u-boot-env2"; + reg = <0x000c0000 0x0040000>; + }; + + partition@100000 { + label = "firmware"; + compatible = "denx,uimage"; + reg = <0x00100000 0x0e80000>; + }; + + partition@f80000 { + label = "kernel2"; + reg = <0x00f80000 0x0180000>; + }; + + partition@1100000 { + label = "rootfs2"; + reg = <0x01100000 0x0d00000>; + }; + + partition@1e00000 { + label = "jffs2"; + reg = <0x01e00000 0x0200000>; + }; + }; + }; +}; diff --git a/target/linux/realtek/image/Makefile b/target/linux/realtek/image/Makefile index 903ad3815690..c7238494606e 100644 --- a/target/linux/realtek/image/Makefile +++ b/target/linux/realtek/image/Makefile @@ -69,6 +69,17 @@ define Device/d-link_dgs-1210-10p-f1 endef TARGET_DEVICES += d-link_dgs-1210-10p-f1 +define Device/d-link_dgs-1210-10p-r1 + $(Device/d-link_dgs-1210) + SOC := rtl8380 + IMAGE_SIZE := 14848k + DEVICE_MODEL := DGS-1210-10P + DEVICE_VARIANT := R1 + # TODO + # DEVICE_PACKAGES += realtek-poe +endef +TARGET_DEVICES += d-link_dgs-1210-10p-r1 + define Device/d-link_dgs-1210-16 $(Device/d-link_dgs-1210) DEVICE_MODEL := DGS-1210-16 From patchwork Tue Oct 5 19:40:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Fertser X-Patchwork-Id: 1536905 X-Patchwork-Delegate: ynezz@true.cz Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=MNytX74c; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=VYl83yK1; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (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 bilbo.ozlabs.org (Postfix) with ESMTPS id 4HP7Lz39Nvz9sP7 for ; Wed, 6 Oct 2021 06:44:11 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=a7GFUeM4AOf24F1GeplnB/TfE48JEflxkuWylL5qx1E=; b=MNytX74cs6D3wR g/9K8s/rGNht6BjnLV+hujoBiJ6r3A2KdIChgl4l9p1NNkTLS7nA1djDkiZb/51OrVoBzB3mbiTgg KEfsv93K2x9+8h11eXBuF5VuJzXqPhf9EEOhk3qV2/71Pwbaviw6thlA/HHAYWOLeI3ujUmqHbvGL /lcZ9KVcPj4rSRroOlsLjIlQ2PBllCFmyxfg8esBoRomgVlxwSsaXqoWk1eZ1s6/j2XZ5U+PcAvZi 0mTT0vcq5VUiFMe0CS2xfUJ1iZsZMBlNItNZ3+kEvrtyF6URtQ6gcXxiarboYaZmdprtQPO46lSz7 J1KZWb5M6IYhOhvcVOmA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mXqKK-00Bfrm-SE; Tue, 05 Oct 2021 19:42:13 +0000 Received: from mail-lf1-x130.google.com ([2a00:1450:4864:20::130]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mXqJ5-00BfaC-5P for openwrt-devel@lists.openwrt.org; Tue, 05 Oct 2021 19:40:56 +0000 Received: by mail-lf1-x130.google.com with SMTP id y15so497376lfk.7 for ; Tue, 05 Oct 2021 12:40:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=bXh6rMQEywjN5dW7Gbk/rJS237h4dHmCgcyhPlbyZLU=; b=VYl83yK15vFRzdck2VlpMB/rf7qimmKCJllNiwGRVeGCqALsbSClhSMkRNrlUmGRaM WB8TXs6nRmQft2xxzYy21k4SR77Gvy04k+KCbWZzhFefXqD2ZdkVcLzV7z8N2RhaXyUw 3ojPFAbbeBg6dFOtetdB/N2K7iJHS4gKg6voTZFuA2lxb5tGq7OyLm76y1lFpqGTRHjq vWiYyP26urCW6XeWAekw8oK6QQxnx/ZQmVain2Cftd7tguZytzVsY7JWmiYrjm2lM5F2 8EIoo+C+q3otP54GbqqZn1DtfwzZC2ZXUtmau4bs93GvlRzBc+RQewDg2vj9tpkqZhAF nuGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=bXh6rMQEywjN5dW7Gbk/rJS237h4dHmCgcyhPlbyZLU=; b=oTreUfioNncV5zeAd9L0jwOqx601FbCV+okzcqu2AjzPqhnfjQI+Dh6yauq4gJmvoP iDWomzKgcC/Dx5ODjYw9Jsiq0lEtC/JDWdyFLLC5OKth5xQYgc6sQHWlBbELssNWf6Y1 h3Bld4NzVSSQO1CL8SYC6a+CIMDczP1CLVm3BdtNcT54JefglYLlh1YZ19BMRYS34MqU 89aZWO2diQuKNbdeNR7upZ6Vg5OeRsecJlTa9Mk8PCH4L/dE8Jx6dqigJyKiaPSIoKl2 +1H/nzSVlbkrHI40cA1pZpRD25D0mgW9VeMzTXr0iW/pvStuu7G8A4VUJcYb5rM0AwaI cj1Q== X-Gm-Message-State: AOAM533/LU8k2sqb4gQt3npwnU0Sn6ppqSVyQ5zI/ynlmhtQBs/lbXqE DSnDNX4eu1GT+MTtiso8Ef6BmB+5Aso= X-Google-Smtp-Source: ABdhPJyDe9MZdrReuOKQk1K8OMxRoTkGYDvvM3AcYq/PkGGYwhgtffK/miF/hrRg/69xsve3kG6LMQ== X-Received: by 2002:a05:6512:3d26:: with SMTP id d38mr5192011lfv.474.1633462853892; Tue, 05 Oct 2021 12:40:53 -0700 (PDT) Received: from home.paul.comp (paulfertser.info. [2001:470:26:54b:226:9eff:fe70:80c2]) by smtp.gmail.com with ESMTPSA id v24sm2049467lfo.269.2021.10.05.12.40.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Oct 2021 12:40:53 -0700 (PDT) Received: from home.paul.comp (home.paul.comp [IPv6:0:0:0:0:0:0:0:1]) by home.paul.comp (8.15.2/8.15.2/Debian-14~deb10u1) with ESMTP id 195JeonN031970; Tue, 5 Oct 2021 22:40:51 +0300 Received: (from paul@localhost) by home.paul.comp (8.15.2/8.15.2/Submit) id 195Jeojo031969; Tue, 5 Oct 2021 22:40:50 +0300 From: Paul Fertser To: openwrt-devel@lists.openwrt.org Cc: Paul Fertser Subject: [RFT 5/5] realtek: support Trendnet TPE-082WS V1 Date: Tue, 5 Oct 2021 22:40:24 +0300 Message-Id: <20211005194024.31909-6-fercerpav@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20211005194024.31909-1-fercerpav@gmail.com> References: <20211005194024.31909-1-fercerpav@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211005_124055_231083_63B30471 X-CRM114-Status: GOOD ( 12.91 ) X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: According to photos and specs for Trendnet TPE-082WS V1.2R it should be the same as D-Link DGS-1210-10P R1 but with more powerful PSU (90 W) so the PoE budget is specified as 75 W. Signed-off-by: Paul Fertser --- .../realtek/base-files/etc/board.d/02_network | 3 + .../rtl8380_trendnet_tpe-082ws-v1.dts | 67 +++++++++++++++++++ target/linux/realtek/image/Makefile | 11 +++ 3 file [...] Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:130 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [fercerpav[at]gmail.com] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org According to photos and specs for Trendnet TPE-082WS V1.2R it should be the same as D-Link DGS-1210-10P R1 but with more powerful PSU (90 W) so the PoE budget is specified as 75 W. Signed-off-by: Paul Fertser --- .../realtek/base-files/etc/board.d/02_network | 3 + .../rtl8380_trendnet_tpe-082ws-v1.dts | 67 +++++++++++++++++++ target/linux/realtek/image/Makefile | 11 +++ 3 files changed, 81 insertions(+) create mode 100644 target/linux/realtek/dts-5.10/rtl8380_trendnet_tpe-082ws-v1.dts diff --git a/target/linux/realtek/base-files/etc/board.d/02_network b/target/linux/realtek/base-files/etc/board.d/02_network index e7c45de92328..f8e06aea3510 100644 --- a/target/linux/realtek/base-files/etc/board.d/02_network +++ b/target/linux/realtek/base-files/etc/board.d/02_network @@ -61,6 +61,9 @@ netgear,gs110tpp-v1) netgear,gs310tp-v1) ucidef_set_poe 55 "$lan_list" ;; +trendnet,tpe-082ws-v1) + ucidef_set_poe 75 "$lan_list" + ;; zyxel,gs1900-10hp) ucidef_set_poe 77 "$lan_list" ;; diff --git a/target/linux/realtek/dts-5.10/rtl8380_trendnet_tpe-082ws-v1.dts b/target/linux/realtek/dts-5.10/rtl8380_trendnet_tpe-082ws-v1.dts new file mode 100644 index 000000000000..9b61da7ffccf --- /dev/null +++ b/target/linux/realtek/dts-5.10/rtl8380_trendnet_tpe-082ws-v1.dts @@ -0,0 +1,67 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "rtl8380_d-link_dgs-1210-10.dtsi" + +/ { + compatible = "trendnet,tpe-082ws-v1", "realtek,rtl838x-soc"; + model = "Trendnet TPE-082WS V1"; + + memory@0 { + device_type = "memory"; + reg = <0x0 0x10000000>; + }; +}; + +&spi0 { + status = "okay"; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <50000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x00000000 0x0080000>; + read-only; + }; + + partition@80000 { + label = "u-boot-env"; + reg = <0x00080000 0x0040000>; + read-only; + }; + + partition@c0000 { + label = "u-boot-env2"; + reg = <0x000c0000 0x0040000>; + }; + + partition@100000 { + label = "firmware"; + compatible = "denx,uimage"; + reg = <0x00100000 0x0e80000>; + }; + + partition@f80000 { + label = "kernel2"; + reg = <0x00f80000 0x0180000>; + }; + + partition@1100000 { + label = "rootfs2"; + reg = <0x01100000 0x0d00000>; + }; + + partition@1e00000 { + label = "jffs2"; + reg = <0x01e00000 0x0200000>; + }; + }; + }; +}; diff --git a/target/linux/realtek/image/Makefile b/target/linux/realtek/image/Makefile index c7238494606e..94f4d91a089a 100644 --- a/target/linux/realtek/image/Makefile +++ b/target/linux/realtek/image/Makefile @@ -80,6 +80,17 @@ define Device/d-link_dgs-1210-10p-r1 endef TARGET_DEVICES += d-link_dgs-1210-10p-r1 +define Device/trendnet_tpe-082ws-v1 + SOC := rtl8380 + IMAGE_SIZE := 14848k + DEVICE_VENDOR := Trendnet + DEVICE_MODEL := TPE-082WS + DEVICE_VARIANT := V1 + # TODO + # DEVICE_PACKAGES += realtek-poe +endef +TARGET_DEVICES += trendnet_tpe-082ws-v1 + define Device/d-link_dgs-1210-16 $(Device/d-link_dgs-1210) DEVICE_MODEL := DGS-1210-16