From patchwork Fri Feb 1 18:03:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinod Koul X-Patchwork-Id: 10793501 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8C8A46C2 for ; Fri, 1 Feb 2019 18:05:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 80B5E3237E for ; Fri, 1 Feb 2019 18:05:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7487232A0D; Fri, 1 Feb 2019 18:05:16 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1677F3237E for ; Fri, 1 Feb 2019 18:05:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728360AbfBASFP (ORCPT ); Fri, 1 Feb 2019 13:05:15 -0500 Received: from mail.kernel.org ([198.145.29.99]:33548 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726808AbfBASFO (ORCPT ); Fri, 1 Feb 2019 13:05:14 -0500 Received: from localhost.localdomain (unknown [171.76.100.40]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A765C21872; Fri, 1 Feb 2019 18:05:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1549044314; bh=CwdNbaKSzzTGX/J5bbLXcGWkix8okboEI50IpUPA+h0=; h=From:To:Cc:Subject:Date:From; b=c/yAURIUvsMoPHy8mddTVfQ/hlsjNp229kMOHkzewzVS/TDNOx/GjSOaR5cBa/em7 IFq3J/+MJutSYJWz5pOQ8eGNuyHZzAVwbzDYbtkwpu0UfkAUaM6EuazRWNCPTR5sC/ p+12aHuJUwvCV4hRelo1/hpG75TYxbj7khKvby3I= From: Vinod Koul To: Andy Gross , David Brown Cc: Vinod Koul , Rob Herring , Mark Rutland , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, Bjorn Andersson , Niklas Cassel Subject: [PATCH v2 1/2] arm64: dts: qcom: qcs404: Add Ethernet node Date: Fri, 1 Feb 2019 23:33:30 +0530 Message-Id: <20190201180331.6960-1-vkoul@kernel.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add the ethernet node found in QCS404 platform. Co-developed-by: Niklas Cassel Signed-off-by: Niklas Cassel Signed-off-by: Vinod Koul --- changes in v2: - add queues and mtl config arch/arm64/boot/dts/qcom/qcs404.dtsi | 71 ++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/qcs404.dtsi b/arch/arm64/boot/dts/qcom/qcs404.dtsi index 76699435c8bd..e4f6bba0c7f2 100644 --- a/arch/arm64/boot/dts/qcom/qcs404.dtsi +++ b/arch/arm64/boot/dts/qcom/qcs404.dtsi @@ -646,6 +646,77 @@ status = "disabled"; }; + ethernet: ethernet@7a80000 { + compatible = "qcom,qcs404-ethqos"; + reg = <0x07a80000 0x10000>, + <0x07a96000 0x100>; + reg-names = "stmmaceth", "rgmii"; + clock-names = "stmmaceth", "pclk", "ptp_ref", "rgmii"; + clocks = <&gcc GCC_ETH_AXI_CLK>, + <&gcc GCC_ETH_SLAVE_AHB_CLK>, + <&gcc GCC_ETH_PTP_CLK>, + <&gcc GCC_ETH_RGMII_CLK>; + interrupts = , + ; + interrupt-names = "macirq", "eth_lpi"; + + snps,axi-config = <&stmmac_axi_setup>; + snps,mtl-rx-config = <&mtl_rx_setup>; + snps,mtl-tx-config = <&mtl_tx_setup>; + + snps,txpbl = <8>; + snps,rxpbl = <2>; + snps,aal; + snps,tso; + rx-fifo-depth = <16384>; + tx-fifo-depth = <20480>; + + status = "disabled"; + + stmmac_axi_setup: stmmac-axi-setup { + snps,rd_osr_lmt = <2>; + snps,blen = <0 0 0 0 16 8 4>; + }; + + mtl_rx_setup: rx-queues-config { + snps,rx-queues-to-use = <0x4>; + snps,rx-sched-sp; + + queue0 { + snps,dcb-algorithm; + }; + queue1 { + snps,dcb-algorithm; + }; + queue2 { + snps,dcb-algorithm; + }; + queue3 { + snps,dcb-algorithm; + }; + }; + mtl_tx_setup: tx-queues-config { + snps,tx-queues-to-use = <0x5>; + snps,tx-sched-sp; + + queue0 { + snps,dcb-algorithm; + }; + queue1 { + snps,dcb-algorithm; + }; + queue2 { + snps,dcb-algorithm; + }; + queue3 { + snps,dcb-algorithm; + }; + queue4 { + snps,dcb-algorithm; + }; + }; + }; + blsp2_dma: dma@7ac4000 { compatible = "qcom,bam-v1.7.0"; reg = <0x07ac4000 0x17000>; From patchwork Fri Feb 1 18:03:31 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinod Koul X-Patchwork-Id: 10793503 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7F392922 for ; Fri, 1 Feb 2019 18:05:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 734CA3237E for ; Fri, 1 Feb 2019 18:05:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 671C732A0D; Fri, 1 Feb 2019 18:05:19 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0BCB73237E for ; Fri, 1 Feb 2019 18:05:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730520AbfBASFS (ORCPT ); Fri, 1 Feb 2019 13:05:18 -0500 Received: from mail.kernel.org ([198.145.29.99]:33612 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726808AbfBASFS (ORCPT ); Fri, 1 Feb 2019 13:05:18 -0500 Received: from localhost.localdomain (unknown [171.76.100.40]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E6DFA218AF; Fri, 1 Feb 2019 18:05:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1549044317; bh=7heSKks7ia4Bt07oZq2U/ZCuDKFaoYKYr8GZhTvRvcw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=2pnAp7ykH2dhW/7v1vDnf6SUWHlhz73QjIDsj1Cqdyk26IkukY5AnUDuIv0wF2nMf SqpCTRTGsLMRZVy4Mp1vmEGRlf4mInP253ETazHWsE7ABsff+uhBjRE1rLvgYxAIdX sJ/3IKKT1oSsMZGycZa0gkKUDpubP6HZ0uELqjOw= From: Vinod Koul To: Andy Gross , David Brown Cc: Vinod Koul , Rob Herring , Mark Rutland , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, Bjorn Andersson , Niklas Cassel Subject: [PATCH v2 2/2] arm64: dts: qcom: qcs404: Enable ethernet for EVB-4000 Date: Fri, 1 Feb 2019 23:33:31 +0530 Message-Id: <20190201180331.6960-2-vkoul@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190201180331.6960-1-vkoul@kernel.org> References: <20190201180331.6960-1-vkoul@kernel.org> MIME-Version: 1.0 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP EVB-4000 comes with ethernet so enable it and add pinctrl bindings. Co-developed-by: Niklas Cassel Signed-off-by: Niklas Cassel Signed-off-by: Vinod Koul --- Changes in v2: squash patch2 and 3 add ethernet-phy-ieee802.3-c22 compatible arch/arm64/boot/dts/qcom/qcs404-evb-4000.dts | 82 ++++++++++++++++++++ 1 file changed, 82 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/qcs404-evb-4000.dts b/arch/arm64/boot/dts/qcom/qcs404-evb-4000.dts index 11269ad3de0d..8234cff414de 100644 --- a/arch/arm64/boot/dts/qcom/qcs404-evb-4000.dts +++ b/arch/arm64/boot/dts/qcom/qcs404-evb-4000.dts @@ -3,9 +3,91 @@ /dts-v1/; +#include #include "qcs404-evb.dtsi" / { model = "Qualcomm Technologies, Inc. QCS404 EVB 4000"; compatible = "qcom,qcs404-evb"; }; + +ðernet { + status = "ok"; + + snps,reset-gpio = <&tlmm 60 GPIO_ACTIVE_LOW>; + snps,reset-active-low; + snps,reset-delays-us = <0 10000 10000>; + + pinctrl-names = "default"; + pinctrl-0 = <ðernet_defaults>; + + phy-handle = <&phy1>; + phy-mode = "rgmii"; + mdio { + #address-cells = <0x1>; + #size-cells = <0x0>; + compatible = "snps,dwmac-mdio"; + phy1: phy@4 { + compatible = "ethernet-phy-ieee802.3-c22"; + device_type = "ethernet-phy"; + reg = <0x4>; + }; + }; +}; + +&tlmm { + ethernet_defaults: ethernet-defaults { + int { + pins = "gpio61"; + function = "rgmii_int"; + bias-disable; + drive-strength = <2>; + }; + mdc { + pins = "gpio76"; + function = "rgmii_mdc"; + bias-pull-up; + }; + mdio { + pins = "gpio75"; + function = "rgmii_mdio"; + bias-pull-up; + }; + tx { + pins = "gpio67", "gpio66", "gpio65", "gpio64"; + function = "rgmii_tx"; + bias-pull-up; + drive-strength = <16>; + }; + rx { + pins = "gpio73", "gpio72", "gpio71", "gpio70"; + function = "rgmii_rx"; + bias-disable; + drive-strength = <2>; + }; + tx-ctl { + pins = "gpio68"; + function = "rgmii_ctl"; + bias-pull-up; + drive-strength = <16>; + }; + rx-ctl { + pins = "gpio74"; + function = "rgmii_ctl"; + bias-disable; + drive-strength = <2>; + }; + tx-ck { + pins = "gpio63"; + function = "rgmii_ck"; + bias-pull-up; + drive-strength = <16>; + }; + rx-ck { + pins = "gpio69"; + function = "rgmii_ck"; + bias-disable; + drive-strength = <2>; + }; + }; +};