From patchwork Thu Jun 10 21:09:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cristian Ciocaltea X-Patchwork-Id: 12313941 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 84301C48BD1 for ; Thu, 10 Jun 2021 21:12:12 +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 4E879613E9 for ; Thu, 10 Jun 2021 21:12:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4E879613E9 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=QuPzgPdof0OxuXC/INm4doCDddaqrtbHLucxo2OTGjs=; b=Rc6A4WIwnIgAqp d93zaYH/U+FC28o7cD/ZRTEztpJta1XKHixrDJmu/CUmZ8Up6yYyd10wJ29FA28mZkh/X7VY9S1jM Tq2PvuvdhvP19WH/4g6zmsVfD1aa/Vi7MDI0ZGBfjLXbud31FvNgfvnItDP8LZgLg1RLgpnjKy1FV Ojko56rIStggm9egV+Q/lbsekr7FiSfc5Q+EnrC0BXPDcKic9AYB1vu5wbNkWpqppBwhT3CbK+xLY YWwDrkuSUt9PJg8tynoyd5m1pNai8X6FC9yZo1aMtQ5zJA6cxy10wLscYrMee9+GMBUEVyuAQlDW7 4PZwEuTVcP/KOkxy7Cjw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lrRwq-002Vf4-MO; Thu, 10 Jun 2021 21:10:44 +0000 Received: from mail-ej1-f54.google.com ([209.85.218.54]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lrRwZ-002Va3-MW; Thu, 10 Jun 2021 21:10:28 +0000 Received: by mail-ej1-f54.google.com with SMTP id he7so1208583ejc.13; Thu, 10 Jun 2021 14:10:26 -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=RAZcz+DwiPgsJv8w/JODrV0BpE2FfY50vdCDOY0uLFE=; b=mAAzYoXggxf6zO3nrr8Z6cRU2Z5ht1Z0FpXUA/0lFucbR/d3i+y4DC6W+nMal5Bxr0 ILSxVhJ7vxeBbr7Jqj+LB79xmsVWrg0kPCTHwocG7oowki21U+02BTUjntlrwjumQJgb VdHWP6QwGFpLxta0UjqPOIhbvmvZ4kUi2iEg9HpNwBw/XLE917cfZqd0eRVzuV5SZTj1 Bug7+E9EKvdwtW3pXfDWiAUAwaxLvs+VVyvkuUggIH1Z/DcDOr3jeWSw+fNPRqxK8n7X FDh0b0KtkRWkJRUoBcUxBjGtFH6Uh5NZbBiK83XTBzbtt1wuouWQPUVKdg/XlTYoee33 Gryg== 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=RAZcz+DwiPgsJv8w/JODrV0BpE2FfY50vdCDOY0uLFE=; b=ukQsp66TKgIjATTVWtGad5pWkK9ikfwT5+M5oHV3ga0K0q8Pmk0CLJ68GCiDbQAprE eqd7iNgz9UE4Pv+a87aPOP7RpQ1bSoFxCmr4PKknJWAFLwapINch2UtXgkIc5tEA4RmJ +3KqhioJCApngl0PtygeT4tBPsOTB5lbzyBrBmTa3fmQcRJo/wBTIpM4zC+EIBq933Cx pHhdisr5wMxmUmIyc6rtTS7h3WevlbWsHaqdp5u5PkHvCzUdlaRJBzpxZJzjss52i/gL jvQ6Y89k/AZ/f//yX50/M5Ya3z8eEauayZfz3FkzF7GJhd8vbmubjF8m6WEbZRie2bk9 CNmg== X-Gm-Message-State: AOAM533PI2a7BtQ6pgU5bOUCy1pkd6uqjltdZrLmRRL7LIPcYFpzMFNg 7Fdt3lzW9D2fR/fwKLmKmkE= X-Google-Smtp-Source: ABdhPJxWvYXXeJzoNiHFJZ0cXn8JWB1fnf6okrGg5W2EtzXq+DmAHe8KY+QxFf1nBDi4/z53Km4zfQ== X-Received: by 2002:a17:906:8345:: with SMTP id b5mr460073ejy.14.1623359365911; Thu, 10 Jun 2021 14:09:25 -0700 (PDT) Received: from localhost.localdomain ([188.24.178.25]) by smtp.gmail.com with ESMTPSA id c18sm1836294edt.97.2021.06.10.14.09.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Jun 2021 14:09:25 -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 1/2] ARM: dts: owl-s500: Add ethernet support Date: Fri, 11 Jun 2021 00:09:21 +0300 Message-Id: <926456e8a3700b257605534cf711a0bfb667fc36.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_141027_788908_927E5B66 X-CRM114-Status: GOOD ( 10.03 ) 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 Ethernet MAC device tree node for Actions Semi S500 SoC. Signed-off-by: Cristian Ciocaltea Reviewed-by: Manivannan Sadhasivam --- arch/arm/boot/dts/owl-s500.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/arch/arm/boot/dts/owl-s500.dtsi b/arch/arm/boot/dts/owl-s500.dtsi index cd635f222d26..739b4b9cec8c 100644 --- a/arch/arm/boot/dts/owl-s500.dtsi +++ b/arch/arm/boot/dts/owl-s500.dtsi @@ -324,5 +324,15 @@ mmc2: mmc@b0238000 { dma-names = "mmc"; status = "disabled"; }; + + ethernet: ethernet@b0310000 { + compatible = "actions,s500-emac", "actions,owl-emac"; + reg = <0xb0310000 0x10000>; + interrupts = ; + clocks = <&cmu CLK_ETHERNET>, <&cmu CLK_RMII_REF>; + clock-names = "eth", "rmii"; + resets = <&cmu RESET_ETHERNET>; + status = "disabled"; + }; }; }; 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"; };