From patchwork Sat Mar 25 07:40:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tianling Shen X-Patchwork-Id: 13187661 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E15D9C6FD1C for ; Sat, 25 Mar 2023 07:41:24 +0000 (UTC) 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=JCjXe38M8Z0JSVMKtPlbA9QRazPK3ACi7eXmFyZICDo=; b=BsMM0XiO53TpAS /oJ+2RMUz2wUu97NPYcJ3hckdnP45wnYHTV6s9RO5eKMnSw02jeaC6IFVS5crKS+a4VHjfDKqFJsA HXKmK1W3meL5BY/khiFby+PIoToQbz2CFnWa/F/qzuvV8307RWm7VMRHwHRf8PEFMAuU0+mNx1AaA SDw3jaVNT+g8O+1ZS4TuDjSJF8zh2BDMIRiI1oMxqZYruUPBeNks5wkjdLqiQTNCN4wfEneaSyTLj 9obrWik3DT4+cO+UMKpmSWCEfNkQ3Q4GQUrcVFZO4LhxZ63usVxFKnFQKj5SR9Xcfxjr2usgv7M9n dw/EE5uqKHfkMfxSutCw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pfyW0-006NUs-1S; Sat, 25 Mar 2023 07:40:40 +0000 Received: from mail-yb1-xb2d.google.com ([2607:f8b0:4864:20::b2d]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pfyVq-006NQV-0p; Sat, 25 Mar 2023 07:40:31 +0000 Received: by mail-yb1-xb2d.google.com with SMTP id i7so4899100ybt.0; Sat, 25 Mar 2023 00:40:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679730029; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=eOjM89dV+f1cFPNk0j8IHVhvMB89HUV+FlvJghSUjlQ=; b=gfRyBqIuHNtuwisQ4ZSxroEKvFZoJbr3nas9/f7xD74gwOPMMD6Xvf204czxNB20Xv Tja2SvkYzR002rDfUvE94qoNlZHiXFXwhvWjfEq+GhEuMMGjF4F9zkWCFPK4Teyia7Z+ xOSa9ujsTkL0zAKj2i1lrWLeyD9Ai6nCsXHH85j3FdQXMah0lY45iFdRdSjxnyy69Jkm fUN2TTiJnCLmnzIeSbGwPZHJdlbsbllJNDqH5zRL0ID4Oq690uz2L6vt/VNOB+cvvXei SoM3x1UgGz8/2F7+Ju8oj1P+zfqELz43wzXZEHCUwjPsGp9cDqJM811Nx48yUNtbStrd yV1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679730029; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=eOjM89dV+f1cFPNk0j8IHVhvMB89HUV+FlvJghSUjlQ=; b=mlkZevFP/gZLIlupUXXindyfZRDs54s9LiuQf6nFuP9hZ+LR8/HaxjjlJw+RW7Hb/F daLATEpm8+XwoD/PPVDy3SOHqGHBkEfSqqvsAMuNXIMNjwf4HOrgm6paSq0wUIpsHaVa PsT+bfgnKqoGy0vJmglOT807HSGnLiYCCkgxzEYMBLJkV/4HR5CaPvy60kZI0A1NzzXg aqVN9wIDFU+rPLv9ecxvp2/whkXKFbXuClz37QngU4q2jV65UaTzyvjcIaveWiXyRg8h tkIu4jLJNd1qspsjftkQCOGyNGfTde8uGLEKXEfQlJtmhVaURNr7BCM5z9RuB4v14K4U tDSA== X-Gm-Message-State: AAQBX9dxivwy2b0rwlllELNk9hBCwhXoCZWjIp+PdQXyzxDoJDbSgfz1 THuo6VTPt9sn2SztOB10Kgo= X-Google-Smtp-Source: AKy350bKgQHX0o/LdQ5YecW3frRWq3nWQ5rIjUiyBiF+dynqiC4j/ODd0gT0jo7b766gNsbVe/fwHQ== X-Received: by 2002:a05:6902:154f:b0:b72:571d:f6cc with SMTP id r15-20020a056902154f00b00b72571df6ccmr926484ybu.4.1679730028858; Sat, 25 Mar 2023 00:40:28 -0700 (PDT) Received: from localhost.localdomain (tunnel785484-pt.tunnel.tserv9.chi1.ipv6.he.net. [2001:470:1f10:aed::2]) by smtp.googlemail.com with ESMTPSA id w20-20020a25c714000000b00b7767ca7498sm969629ybe.53.2023.03.25.00.40.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 Mar 2023 00:40:28 -0700 (PDT) From: Tianling Shen To: Rob Herring , Krzysztof Kozlowski , Heiko Stuebner , Jagan Teki , Tianling Shen , Andy Yan , Peter Geis , Brian Norris , Chris Morgan , Andrew Lunn , Michael Riesch , Maya Matuszczyk , Vincent Legoll Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 2/4] arm64: dts: rockchip: Add FriendlyARM NanoPi R2C Date: Sat, 25 Mar 2023 15:40:20 +0800 Message-Id: <20230325074022.9818-3-cnsztl@gmail.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230325074022.9818-1-cnsztl@gmail.com> References: <20230325074022.9818-1-cnsztl@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230325_004030_291264_A990CB79 X-CRM114-Status: GOOD ( 14.53 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The NanoPi R2C is a minor variant of NanoPi R2S with the on-board NIC chip changed from rtl8211e to yt8521s, and otherwise identical to R2S. Signed-off-by: Tianling Shen --- arch/arm64/boot/dts/rockchip/Makefile | 1 + .../boot/dts/rockchip/rk3328-nanopi-r2c.dts | 40 +++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2c.dts diff --git a/arch/arm64/boot/dts/rockchip/Makefile b/arch/arm64/boot/dts/rockchip/Makefile index a315a8117b0f..0bdcddd221f8 100644 --- a/arch/arm64/boot/dts/rockchip/Makefile +++ b/arch/arm64/boot/dts/rockchip/Makefile @@ -14,6 +14,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3326-odroid-go2-v11.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3326-odroid-go3.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-a1.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-evb.dtb +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-nanopi-r2c.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-nanopi-r2s.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-orangepi-r1-plus.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-rock64.dtb diff --git a/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2c.dts b/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2c.dts new file mode 100644 index 000000000000..a07a26b944a0 --- /dev/null +++ b/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2c.dts @@ -0,0 +1,40 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/* + * Copyright (c) 2021 FriendlyElec Computer Tech. Co., Ltd. + * (http://www.friendlyarm.com) + * + * Copyright (c) 2021-2023 Tianling Shen + */ + +/dts-v1/; +#include "rk3328-nanopi-r2s.dts" + +/ { + model = "FriendlyElec NanoPi R2C"; + compatible = "friendlyarm,nanopi-r2c", "rockchip,rk3328"; +}; + +&gmac2io { + phy-handle = <&yt8521s>; + tx_delay = <0x22>; + rx_delay = <0x12>; + + mdio { + /delete-node/ ethernet-phy@1; + + yt8521s: ethernet-phy@3 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <3>; + + motorcomm,clk-out-frequency-hz = <125000000>; + motorcomm,keep-pll-enabled; + motorcomm,auto-sleep-disabled; + + pinctrl-0 = <ð_phy_reset_pin>; + pinctrl-names = "default"; + reset-assert-us = <10000>; + reset-deassert-us = <50000>; + reset-gpios = <&gpio1 RK_PC2 GPIO_ACTIVE_LOW>; + }; + }; +};