From patchwork Mon Feb 8 14:08:05 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Serge Semin X-Patchwork-Id: 379927 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.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED autolearn=unavailable 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 7842DC4332B for ; Mon, 8 Feb 2021 14:18:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3366564E2E for ; Mon, 8 Feb 2021 14:18:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232950AbhBHOSK (ORCPT ); Mon, 8 Feb 2021 09:18:10 -0500 Received: from mail.baikalelectronics.com ([87.245.175.226]:57558 "EHLO mail.baikalelectronics.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231458AbhBHOJJ (ORCPT ); Mon, 8 Feb 2021 09:09:09 -0500 From: Serge Semin To: Rob Herring , Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , "David S. Miller" , Jakub Kicinski CC: Serge Semin , Serge Semin , Alexey Malahov , Pavel Parkhomenko , Vyacheslav Mitrofanov , Maxime Coquelin , , , , , Subject: [PATCH 01/16] dt-bindings: net: dwmac: Add DW GMAC GPIOs properties Date: Mon, 8 Feb 2021 17:08:05 +0300 Message-ID: <20210208140820.10410-2-Sergey.Semin@baikalelectronics.ru> In-Reply-To: <20210208140820.10410-1-Sergey.Semin@baikalelectronics.ru> References: <20210208140820.10410-1-Sergey.Semin@baikalelectronics.ru> MIME-Version: 1.0 X-ClientProxiedBy: MAIL.baikal.int (192.168.51.25) To mail (192.168.51.25) Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Synopsys DesignWare Ethernet controllers can be synthesized with General-Purpose IOs support. GPIOs can work either as inputs or as outputs thus belong to the gpi_i and gpo_o ports respectively. The ports width (number of possible inputs/outputs) and the configuration registers layout depend on the IP-core version. For instance, DW GMAC can have from 0 to 4 GPIs and from 0 to 4 GPOs, while DW xGMAC have a wider ports width up to 16 pins of each one. So the DW MAC DT-node can be equipped with "ngpios" property, which can't have a value greater than 32, standard GPIO-related properties like "gpio-controller" and "#gpio-cells", and, if GPIs are supposed to be detected, IRQ-controller related properties. Signed-off-by: Serge Semin --- .../devicetree/bindings/net/snps,dwmac.yaml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/Documentation/devicetree/bindings/net/snps,dwmac.yaml b/Documentation/devicetree/bindings/net/snps,dwmac.yaml index bdc437b14878..fcca23d3727e 100644 --- a/Documentation/devicetree/bindings/net/snps,dwmac.yaml +++ b/Documentation/devicetree/bindings/net/snps,dwmac.yaml @@ -110,6 +110,23 @@ properties: reset-names: const: stmmaceth + ngpios: + description: + Total number of GPIOs the MAC supports. The property shall include both + the GPI and GPO ports width. + minimum: 1 + maximum: 32 + + gpio-controller: true + + "#gpio-cells": + const: 2 + + interrupt-controller: true + + "#interrupt-cells": + const: 2 + mac-mode: $ref: ethernet-controller.yaml#/properties/phy-connection-type description: