From patchwork Sun Mar 14 05:14:49 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 1452618 X-Patchwork-Delegate: priyanka.jain@nxp.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=LUWxOGh6; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Dynnb3HGRz9sRR for ; Sun, 14 Mar 2021 16:15:47 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id BFED78283E; Sun, 14 Mar 2021 06:15:30 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="LUWxOGh6"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id B10B3827FA; Sun, 14 Mar 2021 06:15:29 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pj1-x1034.google.com (mail-pj1-x1034.google.com [IPv6:2607:f8b0:4864:20::1034]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 41B4E827FA for ; Sun, 14 Mar 2021 06:15:26 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=bmeng.cn@gmail.com Received: by mail-pj1-x1034.google.com with SMTP id q2-20020a17090a2e02b02900bee668844dso12682824pjd.3 for ; Sat, 13 Mar 2021 21:15:26 -0800 (PST) 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=3mVes3wX/HiTO4zQaSiK2n71rq/r/L8nVTh5+YnMNsI=; b=LUWxOGh6qY3FcHpaLrGjd03mkx8Ox2QSUkw3mHdTxVgtu0Y92O0/vLFYRfI582eFhe jR8wzYNOc27Qd2MG18OzRc6Dl4nPAEAHZLqkPwzxKQRv4GO8VyFJN2tKdHcticZwX+hw OiBVaVPywElqXgV7JAQbDSMx0wlTKR9eKwx2BIQxdrq4XSJIjvrDzc1CDqpNpJhdZ8f0 aBRZ1IntEt9ed5kTNXMABhzlogbS0tqe3rOGIAsi/nYbmF7KUB2wGExgbyhCyiku5cVh tciOxepa3uq8JLkDwpL4yBevu7ZDdlFJLxvLqby7HTP/cXUrChA4D5TZua+nPCX6WyE4 GpqQ== 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=3mVes3wX/HiTO4zQaSiK2n71rq/r/L8nVTh5+YnMNsI=; b=FvsN7gEyNTdcMXY8CbfbPoobdw11tQQRmXF5oAuWlgXM7MeJrlD/Kvmw8or5A3gblZ xSH9tr7x5dxDiYxISuxm2B33xzc41RV2ko+DYl+vTRYTWw29sybr8Gnr/KZydbG7wQH0 LRKLAvH+Y+WVKpJjW8lbnLN8UUz/CeboaqSBIWvlpnWWuSkyQ0wC0QxjpAJySV6HMBOA iV5EWgQ23t2+VkSQ4qIh79jkiQafqxlWX1FH6zGbs+4mLaQ5mIryuiVIQ6ZbBnuRN+jG wsh6JJHnOe0wiz6AlxbSgxObFVMvkhbVEnwsgMAgpZmuyJM8g4H+6HsFG4VJ2U7d3mN6 vqbA== X-Gm-Message-State: AOAM530xsoprhkb9RtCBMTLy7ZJpc5/BVWgcJVQ3mgFXy9MCPvQFbYeX kEm5iyzyPNQsFVvndK/iKJQ= X-Google-Smtp-Source: ABdhPJx/m46uEFBplDRxCmLgzCPDcDBmFRe7cfHWEzN74LhvPnWooXF4ZCugEbc1KWzPB3zUzDY5EQ== X-Received: by 2002:a17:902:8c97:b029:e2:8c58:153f with SMTP id t23-20020a1709028c97b02900e28c58153fmr6171176plo.79.1615698924859; Sat, 13 Mar 2021 21:15:24 -0800 (PST) Received: from i9-aorus-gtx1080.localdomain (144.168.56.201.16clouds.com. [144.168.56.201]) by smtp.gmail.com with ESMTPSA id 186sm10497309pfb.143.2021.03.13.21.15.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 13 Mar 2021 21:15:24 -0800 (PST) From: Bin Meng To: Priyanka Jain , Ramon Fried , Simon Glass , u-boot@lists.denx.de Cc: Tom Rini , Vladimir Oltean , Bin Meng Subject: [PATCH v3 01/22] dt-bindings: net: Add the old DT bindings for "fixed-link" Date: Sun, 14 Mar 2021 13:14:49 +0800 Message-Id: <20210314051510.26628-2-bmeng.cn@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210314051510.26628-1-bmeng.cn@gmail.com> References: <20210314051510.26628-1-bmeng.cn@gmail.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.4 at phobos.denx.de X-Virus-Status: Clean Per the upstream Linux kernel doc: Documentation/devicetree/bindings/net/ethernet-controller.yaml There are two ways to describe a fixed PHY attached to an Ethernet device. This updates our dt-bindings doc to add the old DT bindings. Signed-off-by: Bin Meng Reviewed-by: Ramon Fried Reviewed-by: Vladimir Oltean --- Changes in v3: - mention that U-Boot deliberately ignores the 'phy_id' and unconditionally uses PHY_FIXED_ID doc/device-tree-bindings/net/fixed-link.txt | 48 +++++++++++++++------ 1 file changed, 36 insertions(+), 12 deletions(-) diff --git a/doc/device-tree-bindings/net/fixed-link.txt b/doc/device-tree-bindings/net/fixed-link.txt index 5829bd81a2..5efeeb6fc5 100644 --- a/doc/device-tree-bindings/net/fixed-link.txt +++ b/doc/device-tree-bindings/net/fixed-link.txt @@ -5,21 +5,37 @@ Some Ethernet MACs have a "fixed link", and are not connected to a normal MDIO-managed PHY device. For those situations, a Device Tree binding allows to describe a "fixed link". -Such a fixed link situation is described by creating a 'fixed-link' -sub-node of the Ethernet MAC device node, with the following -properties: - -* 'speed' (integer, mandatory), to indicate the link speed. Accepted - values are 10, 100 and 1000 -* 'full-duplex' (boolean, optional), to indicate that full duplex is - used. When absent, half duplex is assumed. -* 'pause' (boolean, optional), to indicate that pause should be - enabled. -* 'asym-pause' (boolean, optional), to indicate that asym_pause should - be enabled. +Note there are two ways to describe a fixed PHY attached to an +Ethernet device: + +- The new DT binding, where 'fixed-link' is a sub-node of the Ethernet + MAC device node, with the following properties: + + * 'speed' (integer, mandatory), to indicate the link speed. Accepted + values are 10, 100 and 1000 + * 'full-duplex' (boolean, optional), to indicate that full duplex is + used. When absent, half duplex is assumed. + * 'pause' (boolean, optional), to indicate that pause should be + enabled. + * 'asym-pause' (boolean, optional), to indicate that asym_pause should + be enabled. + +- The old DT binding, where 'fixed-link' is a property with 5 cells + encoding various information about the fixed PHY, in the form of + . + + * 'phy_id', emulated PHY ID, choose any but unique to the all specified + fixed-links. Note U-Boot deliberately ignores the 'phy_id' and + unconditionally uses PHY_FIXED_ID. + * 'full-duplex', 0 for half duplex or 1 for full duplex + * 'speed', link speed in Mbits/sec, accepts only 10, 100 and 1000 + * 'pause', 0 for no pause, 1 for pause + * 'asym-pause', 0 for no asymmetric pause, 1 for asymmetric pause Examples: +The new binding: + ethernet@0 { ... fixed-link { @@ -28,3 +44,11 @@ ethernet@0 { }; ... }; + +The old binding: + +ethernet@0 { + ... + fixed-link = <0 1 1000 0 0>; + ... +};