From patchwork Sun Mar 14 12:14:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 1452662 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=kyeNyE9M; 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 4Dyz670d6Mz9sRR for ; Sun, 14 Mar 2021 23:15:43 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id F263D828DC; Sun, 14 Mar 2021 13: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=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="kyeNyE9M"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 0C02082829; Sun, 14 Mar 2021 13:15:24 +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,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pj1-x1036.google.com (mail-pj1-x1036.google.com [IPv6:2607:f8b0:4864:20::1036]) (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 8CE8382829 for ; Sun, 14 Mar 2021 13:15:20 +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-x1036.google.com with SMTP id ha17so6604371pjb.2 for ; Sun, 14 Mar 2021 05:15:20 -0700 (PDT) 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=RVSoLgX1KjlsudZs2k8Si4ZBOBwzGlsm43NzXSY9PwI=; b=kyeNyE9MNfQ1l4zcJpMyYNaSSv5rk8sOC8CINDuB8Uod0G6vz9yUK/evo2Vak6MGON qtyF38zCyPM+Bw5/3zxeuC8zvAOWYm0bTNhUERPJko3zkQXrxzCORRpIuRHN+b4XSgmJ oE05daOWPA9IWhG47DvcnRsx2llggh5IfK5UpctW6RqEC7hyW/h09Bzng3k2dUzp5ctF RTXStfWmn4JMnmQcnS4BcLU6K+pr4B/NTjfShYJvcHQ23N+rHQqenMQY4VqMD1PcuBVe vhMl470AhR5069OzecxBSeTyShChkukJmL5959cAidwyUHuQ5CmFhGqdzYBNR8HlSzj5 io+w== 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=RVSoLgX1KjlsudZs2k8Si4ZBOBwzGlsm43NzXSY9PwI=; b=pPugiw/oedR2qf7LRZygLTybNMitHOiWA+lnL/4+824oJ/fl5jQm3U7v59FLPepHA1 X8+/iQ96kMSENQCwwgv2dcKj037b+YdAt2WKyH4k6Qis0v1LD6ckwhnNVegLDbvsxt8F c4MpjhzLlRa9MUeJkYU46/bH3Vb8zZ6KnrC9sAVzGqNiPwyKqLH9+49tdPGa6VhGTJpu LcqI62Wrt/MebZ+8rlbTTuBVTvGxfxPwCR2tN9h0ibHq13kXg9ZuZ70TIBMbimVg8DLW lL1SRsSOQs8m3Fko9g0tAWBi64tw0Nb2VOePOQ0zDUidLTm/+i9mibhOFlohwdVLpWSJ CDVA== X-Gm-Message-State: AOAM5313sWkCA3lVo/4BuZlIS8ZNDByfwdB8DbgPrgb7Pezg0gHPn/r6 4lL+2ZAupFUWLw8TOjpp4xs= X-Google-Smtp-Source: ABdhPJxr6mFv9933nYzl0idUFFQT6/Jvuoc5bRA2214niHai/mo3QCuYuCguBLdTUpEK90Rh5d6f/Q== X-Received: by 2002:a17:902:da8d:b029:e5:c7d9:81f2 with SMTP id j13-20020a170902da8db02900e5c7d981f2mr6733078plx.21.1615724118964; Sun, 14 Mar 2021 05:15:18 -0700 (PDT) Received: from i9-aorus-gtx1080.localdomain (144.168.56.201.16clouds.com. [144.168.56.201]) by smtp.gmail.com with ESMTPSA id 2sm10504325pfi.116.2021.03.14.05.15.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 14 Mar 2021 05:15:18 -0700 (PDT) From: Bin Meng To: Priyanka Jain , Ramon Fried , Simon Glass , u-boot@lists.denx.de Cc: Tom Rini , Vladimir Oltean , Bin Meng Subject: [PATCH v4 01/22] dt-bindings: net: Add the old DT bindings for "fixed-link" Date: Sun, 14 Mar 2021 20:14:45 +0800 Message-Id: <20210314121506.18303-2-bmeng.cn@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210314121506.18303-1-bmeng.cn@gmail.com> References: <20210314121506.18303-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 --- (no changes since v3) 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>; + ... +};