From patchwork Thu Jun 10 21:09:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cristian Ciocaltea X-Patchwork-Id: 12313993 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BB66DC48BDF for ; Thu, 10 Jun 2021 21:12:32 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 8B4A2613E9 for ; Thu, 10 Jun 2021 21:12:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8B4A2613E9 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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=qx8OgQp/DnCXJlL8jJSHH2Crk6lzyXD28m2l5Xisb58=; b=4FQNZJnc/9mLHy x1158bJnKnDjeeYM+tRf6AxqRHto4Ao1BpugquP5TB6w9UUaiOtCOj3kcAlHrx2YK/bjntCKUKVwS C4UygHQhrrWsdB7S15OPXBXf/4sjC2vgzTU2BXwUJMhm2EYQoHtQrvVy+p4yHYeLvxY81YOZEF/ov UG1HImHd6qGtVzW4O41yShmVhzjL0lQyHmV3Y8UyC6nfS0BRTjXXw9Ybo4SU1cgybbKOuVzC1in3q eKVFv/xSLMLzjVeKLKKeQIqKnbKMu+DEt47pezroRA7uLmODKc4oUJ38MLgB3rV4ZlndOKWYgMHms inIkRJi03a3rWUBe2AyA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lrRx6-002Vj6-5o; Thu, 10 Jun 2021 21:11:00 +0000 Received: from mail-ej1-f41.google.com ([209.85.218.41]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lrRwa-002Vai-PA; Thu, 10 Jun 2021 21:10:30 +0000 Received: by mail-ej1-f41.google.com with SMTP id my49so1249782ejc.7; Thu, 10 Jun 2021 14:10:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=3DSsWL8igEPr3XsSaRV6tsgY1sxYBksVy0aJLHD4Dpg=; b=Lk8u8mOjmOFP5ph4LrY0UIoPaa7SPLhQB7jsRExRrHmZ4npjYhr79H4TdvmT1oA1pC 3u7Crot1msu7y5Vmqvnv1v7+zf8Vn3pF+gsuFX87waBJK4PtyiIB/RbQq5xwNttzRWMC Ml8qVzjwe+fhHUuYbk6IeUO4wvvY9fy220zVyRois1AZKrN/9b3RREp/hRsiat0O5tyA zVQKOJzN47n9T9D9ZanMonUdsAsdF+2m9K0y+N4vRJUwBpJrSQpa17zVgLETU5nMl4yO 74k7QTTYmuwLy9X7F4hxLZxdZWEVh0rOay22iqurDlpW9kayRKFwwqMEkjlqQObNwVPQ TjMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=3DSsWL8igEPr3XsSaRV6tsgY1sxYBksVy0aJLHD4Dpg=; b=LcTQ8pQOodDG6AceBVm9TnIu8rMhwExMHeA+fjXA8kKtk6lgQ8LMhsugyQEeBtU8SQ 1OczfHvgDOe6eLEAlhm7vZ8igJ5sWllMQIycB889Mgb16WMcDVlpLR1Ns7cTbmgnhe7B hZirr5PShiw8znFt2DAWTFPCGKQrTzPAg9kLgMvL405Wt0n+XuoRghCLsyKK04OCP+8j UpNcqGW5KaSqln8x1FCaYdFBu2cSB6Tp9lmPELCgw8YOn84nq9aum1n3JuDLA2Hxy8Vf LlCNOVx4+4s4UJpXz3AkDO6NKUxECz/Ev/bVFTNaNoUdm6c1HUYReRTVqlPWpKeu+vec 0+sg== X-Gm-Message-State: AOAM532LOgpbwDOWEpqFcmEjbLtXZHktfRSg/WEebQBBt9Q7xO/AIxaq Xem6O4YQ6ZEkoQERgQQ5BP8= X-Google-Smtp-Source: ABdhPJxD8ATFqrWNRiGeKpNXhq+ubzKZHpzB1hfOXuOifAIySR95ieYsL01BQyAVhZQ+pSpq/Lemxg== X-Received: by 2002:a17:906:5407:: with SMTP id q7mr473466ejo.158.1623359366982; Thu, 10 Jun 2021 14:09:26 -0700 (PDT) Received: from localhost.localdomain ([188.24.178.25]) by smtp.gmail.com with ESMTPSA id c18sm1836294edt.97.2021.06.10.14.09.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Jun 2021 14:09:26 -0700 (PDT) From: Cristian Ciocaltea To: Rob Herring , =?utf-8?q?Andreas_F=C3=A4rber?= , Manivannan Sadhasivam Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-actions@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] ARM: dts: owl-s500-roseapplepi: Add ethernet support Date: Fri, 11 Jun 2021 00:09:22 +0300 Message-Id: <632e12c445ced7f10e6d7240162484ae5afc148e.1623358117.git.cristian.ciocaltea@gmail.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210610_141028_853261_CB87E791 X-CRM114-Status: GOOD ( 11.04 ) 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 Add pinctrl configuration for enabling the Ethernet MAC on RoseapplePi SBC. Additionally, provide the necessary properties for the generic S500 ethernet node in order to setup PHY and MDIO. Signed-off-by: Cristian Ciocaltea --- arch/arm/boot/dts/owl-s500-roseapplepi.dts | 56 ++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/arch/arm/boot/dts/owl-s500-roseapplepi.dts b/arch/arm/boot/dts/owl-s500-roseapplepi.dts index b8c5db2344aa..bffabc7eaa50 100644 --- a/arch/arm/boot/dts/owl-s500-roseapplepi.dts +++ b/arch/arm/boot/dts/owl-s500-roseapplepi.dts @@ -225,6 +225,38 @@ bias1-pinconf { bias-pull-down; }; }; + + ethernet_pins: ethernet-pins { + txd01-pinmux { + groups = "rmii_txd0_mfp", "rmii_txd1_mfp"; + function = "eth_rmii"; + }; + + rxd01-pinmux { + groups = "rmii_rxd0_mfp", "rmii_rxd1_mfp"; + function = "eth_rmii"; + }; + + txen_rxer-pinmux { + groups = "rmii_txen_mfp", "rmii_rxen_mfp"; + function = "eth_rmii"; + }; + + crs_dv_ref_clk-pinmux { + groups = "rmii_crs_dv_mfp", "rmii_ref_clk_mfp"; + function = "eth_rmii"; + }; + + ref_clk-pinconf { + groups = "rmii_ref_clk_drv"; + drive-strength = <2>; + }; + + phy_clk-pinmux { + groups = "clko_25m_mfp"; + function = "clko_25m"; + }; + }; }; /* uSD */ @@ -241,6 +273,30 @@ &mmc0 { vqmmc-supply = <&sd_vcc>; }; +ðernet { + pinctrl-names = "default"; + pinctrl-0 = <ðernet_pins>; + phy-mode = "rmii"; + phy-handle = <ð_phy>; + status = "okay"; + + mdio { + #address-cells = <1>; + #size-cells = <0>; + + reset-gpios = <&pinctrl 88 GPIO_ACTIVE_LOW>; /* GPIOC24 */ + reset-delay-us = <10000>; + reset-post-delay-us = <150000>; + + eth_phy: ethernet-phy@3 { + reg = <0x3>; + max-speed = <100>; + interrupt-parent = <&sirq>; + interrupts = <0 IRQ_TYPE_LEVEL_LOW>; + }; + }; +}; + &twd_timer { status = "okay"; };