Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp3520744pxb; Mon, 4 Apr 2022 19:43:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxfDNiZlMGXtOZJAqNyt6CPykO+WuPjuO06p2eIKYBelAULqaA2v3E1cC2BluPsf4vOV5LE X-Received: by 2002:a17:90b:4c09:b0:1c6:f64a:dd0 with SMTP id na9-20020a17090b4c0900b001c6f64a0dd0mr1454293pjb.45.1649126622406; Mon, 04 Apr 2022 19:43:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649126622; cv=none; d=google.com; s=arc-20160816; b=W3y8Lv8OW5p/zf5V8DRWQq8rMt+J4l5+gEqdLtt+fe4nvXkz1H1KpHB6ZrzPgioqVK IIjOyqDMep3jv7eDhkyNEtqKhqpGoVE7UbYUob83Fl4DEoarzJtPMBXG02SzpMJfEfwp OuChMkrTvenZnesov19kNqsIam8ggBSbR2A+PjND1SlAbYLOz7qX+jDV/i7KhIOhssUL JkedOtmcofMNROWSd+hvKEicc+aWfhGAv/vTzHRfBy5GvAEXjk3NSTzhdB8DMlq6tKN5 u28qohFq1800x2JUs1gqyrW1HeQRXD2flbVBP7SCFhyDwujXJ68H3KN5ZfeEfKlAtjd8 p21A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=rVlsNMjXQQ4jdCL0TbPne+ht1OtgQ3f4+EzKpSKvrX8=; b=dv/5ErQs3uauEaGl3T+aOxWMb1KR/+5wubWje34DqLO4PZzAZc4u8rvEUQfyfmmPlG +JvisyZIWZr8uGFIzy8yEmvGLrpmUmbJkJ6hWOxehcPAWhetyyNs5Kq70RCC4BA5PCuE NTI1bc96j9qiW81hKRx2dYZaHu8bs3l3OGSr4n0UKZO4yovT+emy/anDaCiRt1/QHa2s tj673bzK7nZAGjs/MTyYl9+qJuT+4jH47abSd/wCbx9uxsOvtFNLF/DUUNCp1/8VIFw3 BQPWCcSTvBmejWOfTCM7liman5aZeZp1M6WOn/Hs/Qa1xwfT9fRNUGMRxTss1QKgMNUL qosg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mailerdienst.de header.s=20200217 header.b="laU5/8ab"; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id 28-20020a63175c000000b00398068c628fsi11922357pgx.132.2022.04.04.19.43.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Apr 2022 19:43:42 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@mailerdienst.de header.s=20200217 header.b="laU5/8ab"; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 4B6C7434A3; Mon, 4 Apr 2022 18:07:06 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347185AbiDBKpv (ORCPT + 99 others); Sat, 2 Apr 2022 06:45:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39662 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229988AbiDBKpu (ORCPT ); Sat, 2 Apr 2022 06:45:50 -0400 Received: from mxout3.routing.net (mxout3.routing.net [IPv6:2a03:2900:1:a::8]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 076A22AE24; Sat, 2 Apr 2022 03:43:54 -0700 (PDT) Received: from mxbox1.masterlogin.de (unknown [192.168.10.88]) by mxout3.routing.net (Postfix) with ESMTP id D0527604DC; Sat, 2 Apr 2022 10:43:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1648896233; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=rVlsNMjXQQ4jdCL0TbPne+ht1OtgQ3f4+EzKpSKvrX8=; b=laU5/8abs7BHEJiXUVOxX/fh85mUVBUDwAH9+jDMwO/f9mGWpiSwt4ZUrFPAE7KGkMKUPJ +mjsNSrOTgI4P7PHHnQFwRQaKd2LIZ1e8BKJcuGqj/CqcnlPd5FHYEJ4923KdR1LiMCHUz PpzFTTQEDyx4yiYhKUuefvKK8dq8ugE= Received: from localhost.localdomain (fttx-pool-80.245.79.107.bambit.de [80.245.79.107]) by mxbox1.masterlogin.de (Postfix) with ESMTPSA id 21652403AC; Sat, 2 Apr 2022 10:43:52 +0000 (UTC) From: Frank Wunderlich To: linux-rockchip@lists.infradead.org Cc: Frank Wunderlich , Rob Herring , Krzysztof Kozlowski , Heiko Stuebner , Peter Geis , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v1 2/2] arm64: dts: rockchip: Add gmac1 and change network settings Date: Sat, 2 Apr 2022 12:43:12 +0200 Message-Id: <20220402104313.100333-3-linux@fw-web.de> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220402104313.100333-1-linux@fw-web.de> References: <20220402104313.100333-1-linux@fw-web.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Mail-ID: 9004292b-8e73-4ef7-931d-e37bf50c2a4b X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Frank Wunderlich New Version (v1.0) of R2 pro has swapped gmacs compared to the v00. WAN-Port is now on gmac1 (RTL8211F) and lan-ports on gmac0 with mt7531 switch. There is already a mt7531 dsa driver in mainline, but it needs to be modified to work for this board. Fixes: f901aaadaa2a ("arm64: dts: rockchip: Add Bananapi R2 Pro") Signed-off-by: Frank Wunderlich --- .../boot/dts/rockchip/rk3568-bpi-r2-pro.dts | 36 +++++++++++++++++-- 1 file changed, 33 insertions(+), 3 deletions(-) diff --git a/arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts b/arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts index a0388ff85ddf..067fe4a6b178 100644 --- a/arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts +++ b/arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts @@ -16,6 +16,7 @@ / { aliases { ethernet0 = &gmac0; + ethernet1 = &gmac1; mmc0 = &sdmmc0; mmc1 = &sdhci; }; @@ -78,7 +79,6 @@ &gmac0 { assigned-clocks = <&cru SCLK_GMAC0_RX_TX>, <&cru SCLK_GMAC0>; assigned-clock-parents = <&cru SCLK_GMAC0_RGMII_SPEED>, <&cru CLK_MAC0_2TOP>; clock_in_out = "input"; - phy-handle = <&rgmii_phy0>; phy-mode = "rgmii"; pinctrl-names = "default"; pinctrl-0 = <&gmac0_miim @@ -90,8 +90,38 @@ &gmac0_rgmii_clk snps,reset-active-low; /* Reset time is 20ms, 100ms for rtl8211f */ snps,reset-delays-us = <0 20000 100000>; + tx_delay = <0x4f>; + rx_delay = <0x0f>; + status = "okay"; + + fixed-link { + speed = <1000>; + full-duplex; + pause; + }; +}; + +&gmac1 { + assigned-clocks = <&cru SCLK_GMAC1_RX_TX>, <&cru SCLK_GMAC1>; + assigned-clock-parents = <&cru SCLK_GMAC1_RGMII_SPEED>, <&cru CLK_MAC1_2TOP>; + clock_in_out = "output"; + phy-handle = <&rgmii_phy1>; + phy-mode = "rgmii"; + pinctrl-names = "default"; + pinctrl-0 = <&gmac1m1_miim + &gmac1m1_tx_bus2 + &gmac1m1_rx_bus2 + &gmac1m1_rgmii_clk + &gmac1m1_rgmii_bus>; + + snps,reset-gpio = <&gpio3 RK_PB0 GPIO_ACTIVE_LOW>; + snps,reset-active-low; + /* Reset time is 20ms, 100ms for rtl8211f */ + snps,reset-delays-us = <0 20000 100000>; + tx_delay = <0x3c>; rx_delay = <0x2f>; + status = "okay"; }; @@ -315,8 +345,8 @@ &i2c5 { status = "disabled"; }; -&mdio0 { - rgmii_phy0: ethernet-phy@0 { +&mdio1 { + rgmii_phy1: ethernet-phy@0 { compatible = "ethernet-phy-ieee802.3-c22"; reg = <0x0>; }; -- 2.25.1