From patchwork Tue Jan 8 16:29:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinod Koul X-Patchwork-Id: 154994 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp5072375jaa; Tue, 8 Jan 2019 08:32:21 -0800 (PST) X-Google-Smtp-Source: ALg8bN4q45+n40iRRhtd3spJFeCLKOQsg28NSUxUgo2XulsGQZ4b6E633csfHbWKaHI4AUkJkp7h X-Received: by 2002:a65:65c9:: with SMTP id y9mr2153825pgv.438.1546965141218; Tue, 08 Jan 2019 08:32:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546965141; cv=none; d=google.com; s=arc-20160816; b=XQQpb0DdArg5I1zR73KZhKw6OjAXIDDSvA2t6N4CZ7kNU3y2+XgUrYeooDQb//hT7L yRmJAIkgXHoyjm07CL7OqrT5sUM31L9dHKvVs2mL3bdAyLazyZo4R4elU8H4m5lvW1c3 WjiIWtuaXNWI8rdB8LaYB6ed3PYKDfwu+XEVTUByxNCKNbynPknJ3kjE1IEp+j941TWE rNqp+hTjfc1H+yFW5y7jW0lj2Jcq0H2jM1dAoqs6ZvRBIvo0K1WCRqweOeKRwNhKGHwz gMxglpeA19je+C+QQzkfy9Su+elchW9gP72sPApOB0oZZ9UGpA51r1j447CywhG1/xxS bmkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=AnX3v0XOJhNpPhTn/CVO+KayJuKKX6nM1M4NgS+nfp4=; b=isQgSxHgvo1LgOfmv+HUB1uVIV6TJWKRqdyH4LotXofJar99yTD/SmLzGGmyrpqh4L TXiFUJvKkVzvj0Zhe2BNo0Y3Htuj2xXsog1vFgK/7KEKoTke3truzV11NPjxwUi3E3FV Ix9LeVRM7pD2C6t3oCbef9Jp86OZ2cCUEJW2prgpFkA56CQFaStab0/yJoO2xpFStneT UVvjbv4fXJf67CD1xj1HYO0NZLsNKdv35hu9HELZdW24+30uoyUoWBTmjAyXTYQ9Y5ys 7wGHCT+N1XZvLXDxU426uI2I7mitj6+KVGF9DE+7JeEVKdUXBDRjGvCb1yhD5qGKPuvc TTGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=tEiH815Z; spf=pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x9si4072917pll.131.2019.01.08.08.32.21; Tue, 08 Jan 2019 08:32:21 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=tEiH815Z; spf=pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729657AbfAHQcS (ORCPT + 10 others); Tue, 8 Jan 2019 11:32:18 -0500 Received: from mail.kernel.org ([198.145.29.99]:39820 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729376AbfAHQcR (ORCPT ); Tue, 8 Jan 2019 11:32:17 -0500 Received: from localhost.localdomain (unknown [171.76.109.220]) (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 F1BAC20883; Tue, 8 Jan 2019 16:32:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1546965136; bh=GJrWXaDrF7MCrfR/he0FmFSyY/AYG7o5A3f5HPLA+LY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tEiH815ZwBrJGTN98YjzauSSNcQCcY5WGQQXQaLEfa1RuAEMtIWAsql5OOvi/hDfE wJaHJnxGrgXacgn4E0sElRtrEHBspJeOrxOAsRQba6BOAlB4S26mLtlQw15u5xnVzI DrP3hCZwge1f7t3PBkcwqHi4onS2VfCpytkilW4Y= From: Vinod Koul To: David S Miller Cc: netdev@vger.kernel.org, linux-arm-msm@vger.kernel.org, Niklas Cassel , Bjorn Andersson , Vinod Koul , Rob Herring , Mark Rutland , devicetree@vger.kernel.org Subject: [PATCH v2 1/5] dt-bindings: net: Add Qualcomm ethqos binding Date: Tue, 8 Jan 2019 21:59:22 +0530 Message-Id: <20190108162926.17806-2-vkoul@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190108162926.17806-1-vkoul@kernel.org> References: <20190108162926.17806-1-vkoul@kernel.org> MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Add support for Qualcomm ethqos found in some SoCs like QCS404. Signed-off-by: Vinod Koul --- .../devicetree/bindings/net/qcom,dwmac.txt | 129 ++++++++++++++++++ 1 file changed, 129 insertions(+) create mode 100644 Documentation/devicetree/bindings/net/qcom,dwmac.txt -- 2.20.1 diff --git a/Documentation/devicetree/bindings/net/qcom,dwmac.txt b/Documentation/devicetree/bindings/net/qcom,dwmac.txt new file mode 100644 index 000000000000..652d2213c3ac --- /dev/null +++ b/Documentation/devicetree/bindings/net/qcom,dwmac.txt @@ -0,0 +1,129 @@ +Qualcomm Ethernet ETHQOS device + +This device has following properties: + +Required properties: + +- compatible: Should be qcom,ethqos-qcs404" + +- reg: Address and length of the register set for the device + +- reg-names: Should contain register names "stmmaceth", "rgmii" + +- clocks: Should contain phandle to clocks + +- clock-names: Should contain clock names "stmmaceth", "pclk", + "ptp_ref", "rgmii" + +- interrupts: Should contain phandle to interrupts + +- interrupt-names: Should contain interrupt names "macirq", "eth_lpi" + +Rest of the properties are defined in stmmac.txt file in same directory + + +Example: + +ethernet: ethernet@7a80000 { + compatible = "qcom,ethqos-qcs404"; + 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,reset-gpio = <&tlmm 60 GPIO_ACTIVE_LOW>; + snps,reset-active-low; + 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; + + phy-handle = <&phy1>; + phy-mode = "rgmii"; + + stmmac_axi_setup: stmmac-axi-config { + snps,wr_osr_lmt = <15>; + snps,rd_osr_lmt = <15>; + snps,blen = <256 128 64 32 0 0 0>; + }; + + mtl_rx_setup: rx-queues-config { + snps,rx-queues-to-use = <4>; + snps,rx-sched-sp; + queue0 { + snps,dcb-algorithm; + snps,map-to-dma-channel = <0x0>; + snps,priority = <0x0>; + }; + queue1 { + snps,dcb-algorithm; + snps,map-to-dma-channel = <0x1>; + snps,priority = <0x1>; + }; + queue2 { + snps,dcb-algorithm; + snps,map-to-dma-channel = <0x2>; + snps,priority = <0x1>; + }; + queue3 { + snps,dcb-algorithm; + snps,map-to-dma-channel = <0x3>; + snps,priority = <0x1>; + }; + }; + + mtl_tx_setup: tx-queues-config { + snps,tx-queues-to-use = <4>; + snps,tx-sched-wrr; + queue0 { + snps,weight = <0x10>; + snps,dcb-algorithm; + snps,priority = <0x0>; + }; + queue1 { + snps,avb-algorithm; + snps,send_slope = <0x1000>; + snps,idle_slope = <0x1000>; + snps,high_credit = <0x3E800>; + snps,low_credit = <0xFFC18000>; + snps,priority = <0x1>; + }; + queue2 { + snps,avb-algorithm; + snps,send_slope = <0x1000>; + snps,idle_slope = <0x1000>; + snps,high_credit = <0x3E800>; + snps,low_credit = <0xFFC18000>; + snps,priority = <0x1>; + }; + queue3 { + snps,avb-algorithm; + snps,send_slope = <0x1000>; + snps,idle_slope = <0x1000>; + snps,high_credit = <0x3E800>; + snps,low_credit = <0xFFC18000>; + snps,priority = <0x1>; + }; + }; + + mdio { + #address-cells = <0x1>; + #size-cells = <0x0>; + compatible = "snps,dwmac-mdio"; + phy1: phy@4 { + device_type = "ethernet-phy"; + reg = <0x4>; + }; + }; + +};