From patchwork Wed Apr 29 20:16:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Blumenstingl X-Patchwork-Id: 1279647 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=quarantine dis=none) header.from=googlemail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlemail.com header.i=@googlemail.com header.a=rsa-sha256 header.s=20161025 header.b=SaXueIiN; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by ozlabs.org (Postfix) with ESMTP id 49C8wC1W2cz9sRY for ; Thu, 30 Apr 2020 06:18:19 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727027AbgD2URO (ORCPT ); Wed, 29 Apr 2020 16:17:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59632 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726456AbgD2URO (ORCPT ); Wed, 29 Apr 2020 16:17:14 -0400 Received: from mail-wr1-x441.google.com (mail-wr1-x441.google.com [IPv6:2a00:1450:4864:20::441]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E4241C03C1AE; Wed, 29 Apr 2020 13:17:13 -0700 (PDT) Received: by mail-wr1-x441.google.com with SMTP id g13so4093814wrb.8; Wed, 29 Apr 2020 13:17:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=oSdaUU1sAQef6HcUSlubHrtLR7VgXha8CU0+FaZLEz4=; b=SaXueIiNlafjvD/L5DRZ40ZBfjU7ncCWTZkp82EZdq2RqTSNwG7DO4yhKv9xT0JM4P gsZrGU0i07myKAk+AnJNw0gTgKFRU99AnstjmFZPK7epxkXLSbeBwU8eNYsodEhe7sYI DvL3E/tVrmqM+ydY/VIa8nLA9TCpTk+VLj5Vd5CTg8Ml7z2gpXzoa/mE9+wH04jZy9mi fI7IAbV2ZiNa+vGGrFLoiS+026khr3JVcyb1ifh8K15U/gwTshSrxUfZE6qeIxwrB4jk Jm1/QcuefdJJHVNY3g0t/kP2bpaA0Gglpc+O6bShUOa/wcEMEL5eRj4ZmAC6YENCNxXT BxJQ== 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=oSdaUU1sAQef6HcUSlubHrtLR7VgXha8CU0+FaZLEz4=; b=ne2cd3cDk2rrL9CBN+d5seOU47/qwib6QtEnzs7xj9q58BuIRFhWwpK5BNx37AChFq 5hJkY3iLBTgh/uHurg/KnV9p+sX+PQVBrNB777PwhNST+m20HAxdg2lnKhUtSsuiRSFr qxJ5rRWKynV4+6z7gxKX2rAUds9mNkfl5LoxTHgagzIf0hewGbHljQuQKoZedorpggor s7hOKaZyMa25RQ6yTuicSwlMTfUERjbazPfjMcq8KQxgzMXGZkEvT4WThKG8CboFZZ9i eSseXKz+ZDjW0L6ekVdjxLWvTnLvXgYvGl3qd8uIjyuxpiN0d4/sCM8g+OtTG1TqfXtE HXlg== X-Gm-Message-State: AGi0PubLTZotU1uuBiQ5tRCgu5SWHWk/Op3uPabUDzAQdsw/PBixOaPj EWSAFeuEzNzNnuU400Rop+U= X-Google-Smtp-Source: APiQypJ5wuI3iaT4ZvqzR/XFA5k+Bl12wp/s80x5ZiluHZdu39PD2o3yNiGqS7Qh2P4c8ATUDZp5Ag== X-Received: by 2002:adf:fe44:: with SMTP id m4mr43579071wrs.188.1588191432566; Wed, 29 Apr 2020 13:17:12 -0700 (PDT) Received: from localhost.localdomain (p200300F137142E00428D5CFFFEB99DB8.dip0.t-ipconnect.de. [2003:f1:3714:2e00:428d:5cff:feb9:9db8]) by smtp.googlemail.com with ESMTPSA id q143sm9923623wme.31.2020.04.29.13.17.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Apr 2020 13:17:11 -0700 (PDT) From: Martin Blumenstingl To: robh+dt@kernel.org, andrew@lunn.ch, f.fainelli@gmail.com, linux-amlogic@lists.infradead.org, devicetree@vger.kernel.org Cc: jianxin.pan@amlogic.com, davem@davemloft.net, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Martin Blumenstingl Subject: [PATCH RFC v2 01/11] dt-bindings: net: meson-dwmac: Add the amlogic,rx-delay-ns property Date: Wed, 29 Apr 2020 22:16:34 +0200 Message-Id: <20200429201644.1144546-2-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200429201644.1144546-1-martin.blumenstingl@googlemail.com> References: <20200429201644.1144546-1-martin.blumenstingl@googlemail.com> MIME-Version: 1.0 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org The PRG_ETHERNET registers on Meson8b and newer SoCs can add an RX delay. Add a property with the known supported values so it can be configured according to the board layout. Signed-off-by: Martin Blumenstingl Reviewed-by: Andrew Lunn --- .../bindings/net/amlogic,meson-dwmac.yaml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Documentation/devicetree/bindings/net/amlogic,meson-dwmac.yaml b/Documentation/devicetree/bindings/net/amlogic,meson-dwmac.yaml index ae91aa9d8616..8d851f59d9f2 100644 --- a/Documentation/devicetree/bindings/net/amlogic,meson-dwmac.yaml +++ b/Documentation/devicetree/bindings/net/amlogic,meson-dwmac.yaml @@ -67,6 +67,19 @@ allOf: PHY and MAC are adding a delay). Any configuration is ignored when the phy-mode is set to "rmii". + amlogic,rx-delay-ns: + $ref: /schemas/types.yaml#definitions/uint32 + enum: + - 0 + - 2 + description: + The internal RGMII RX clock delay (provided by this IP block) in + nanoseconds. When phy-mode is set to "rgmii" then the RX delay + should be explicitly configured. When not configured a fallback of + 0ns is used. When the phy-mode is set to either "rgmii-id" or + "rgmii-rxid" the RX clock delay is already provided by the PHY. + Any configuration is ignored when the phy-mode is set to "rmii". + properties: compatible: additionalItems: true From patchwork Wed Apr 29 20:16:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Blumenstingl X-Patchwork-Id: 1279646 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=quarantine dis=none) header.from=googlemail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlemail.com header.i=@googlemail.com header.a=rsa-sha256 header.s=20161025 header.b=CHODodNm; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by ozlabs.org (Postfix) with ESMTP id 49C8w71gnQz9sSM for ; Thu, 30 Apr 2020 06:18:15 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727098AbgD2URS (ORCPT ); Wed, 29 Apr 2020 16:17:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59634 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727073AbgD2URP (ORCPT ); Wed, 29 Apr 2020 16:17:15 -0400 Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 07273C03C1AE; Wed, 29 Apr 2020 13:17:15 -0700 (PDT) Received: by mail-wr1-x443.google.com with SMTP id d17so4076988wrg.11; Wed, 29 Apr 2020 13:17:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=70PGPQVXxWkWt5bMu/YYfSXZfY8zmYWnV1uR/DOx3oI=; b=CHODodNmsuW+chZgMSL/aU4EnarAaDIB7eXBAjMvlsonq+wuNDVGUJCixVrpFPVHv0 eLe7iQE0b6IVK9woGS4WRHgp1pIDNyiU/pvax4e/hFhd8Tg+XuRQDhxcWP8g+hESasfG 0PvoOjleMGc/VhEHapA/nrVQIz+u3cU4WKukUCaPObHXRo4oVjyNp/dma6TvvoKJBSv1 UHFO/dN7/7fOEoicRBiobhcCPrV9VPlDGDJ0bcuHdimr4jBLKUBuXsqV3K6RVjdpryfB NHeEkJE9MD54wgSGOsu79UcZVkVL2erbRs5xdDHnHc7otZm23Z9/6PHRNiGJkv0mCM5U H4jQ== 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=70PGPQVXxWkWt5bMu/YYfSXZfY8zmYWnV1uR/DOx3oI=; b=EPFAHS6MLHzJGwGiGGa76EZlVLh7maVpFJD2V286nrSqYiolVu/zf50ebR5TUuR2mE QYcKrdhC14wjg9nf5ToiecGdPq1XdXpZ273LsDu3+fuVJOAZJ+qWptFjoKTFRwSxjjRK WDobGcSvNQk+wXVBlKta+/mlSo84fN5Fm1CCYiecehWA1dQgPcZOtagARsR/3P5TfUeQ PmqKt2u+lV5np4ELaipM+jdMCuDqu54CoL7SYrDSYIpajV20SnmtJRTeLZs3bbSUAh5v QYdun0Yaja9yYu658ytAu/joffa2t28lFPr176HbWmwnC4gRpsL2+g0Nb+FG71Zh4dqg x4WA== X-Gm-Message-State: AGi0PuZlqo57XW+3uYNrvsCOUc3TxJDxZgNpW2dX8nHDWSFLHB6cSS5U Sm5X14TRPiIqtfqPYCCa2gA= X-Google-Smtp-Source: APiQypJtmwbq9B5dWA8SnCuu/BSQvt25+h0Lxx4pGLSnoOKCcBACToJY8vRY4FM4aHun8MA3Wxv0vg== X-Received: by 2002:adf:f343:: with SMTP id e3mr39846693wrp.51.1588191433642; Wed, 29 Apr 2020 13:17:13 -0700 (PDT) Received: from localhost.localdomain (p200300F137142E00428D5CFFFEB99DB8.dip0.t-ipconnect.de. [2003:f1:3714:2e00:428d:5cff:feb9:9db8]) by smtp.googlemail.com with ESMTPSA id q143sm9923623wme.31.2020.04.29.13.17.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Apr 2020 13:17:13 -0700 (PDT) From: Martin Blumenstingl To: robh+dt@kernel.org, andrew@lunn.ch, f.fainelli@gmail.com, linux-amlogic@lists.infradead.org, devicetree@vger.kernel.org Cc: jianxin.pan@amlogic.com, davem@davemloft.net, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Martin Blumenstingl Subject: [PATCH RFC v2 02/11] dt-bindings: net: dwmac-meson: Document the "timing-adjustment" clock Date: Wed, 29 Apr 2020 22:16:35 +0200 Message-Id: <20200429201644.1144546-3-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200429201644.1144546-1-martin.blumenstingl@googlemail.com> References: <20200429201644.1144546-1-martin.blumenstingl@googlemail.com> MIME-Version: 1.0 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org The PRG_ETHERNET registers can add an RX delay in RGMII mode. This requires an internal re-timing circuit whose input clock is called "timing adjustment clock". Document this clock input so the clock can be enabled as needed. Signed-off-by: Martin Blumenstingl Reviewed-by: Andrew Lunn --- .../devicetree/bindings/net/amlogic,meson-dwmac.yaml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Documentation/devicetree/bindings/net/amlogic,meson-dwmac.yaml b/Documentation/devicetree/bindings/net/amlogic,meson-dwmac.yaml index 8d851f59d9f2..2bc0e8b0d25b 100644 --- a/Documentation/devicetree/bindings/net/amlogic,meson-dwmac.yaml +++ b/Documentation/devicetree/bindings/net/amlogic,meson-dwmac.yaml @@ -40,18 +40,22 @@ allOf: then: properties: clocks: + minItems: 3 + maxItems: 4 items: - description: GMAC main clock - description: First parent clock of the internal mux - description: Second parent clock of the internal mux + - description: The clock which drives the timing adjustment logic clock-names: minItems: 3 - maxItems: 3 + maxItems: 4 items: - const: stmmaceth - const: clkin0 - const: clkin1 + - const: timing-adjustment amlogic,tx-delay-ns: $ref: /schemas/types.yaml#definitions/uint32 @@ -120,7 +124,7 @@ examples: reg = <0xc9410000 0x10000>, <0xc8834540 0x8>; interrupts = <8>; interrupt-names = "macirq"; - clocks = <&clk_eth>, <&clkc_fclk_div2>, <&clk_mpll2>; - clock-names = "stmmaceth", "clkin0", "clkin1"; + clocks = <&clk_eth>, <&clk_fclk_div2>, <&clk_mpll2>, <&clk_fclk_div2>; + clock-names = "stmmaceth", "clkin0", "clkin1", "timing-adjustment"; phy-mode = "rgmii"; };