From patchwork Thu May 5 13:55:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= X-Patchwork-Id: 12839629 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 14B76C433EF for ; Thu, 5 May 2022 13:57:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=rGy8s2aGYYavPOd+DGC/4sKBnBcMNJs/W3+bjwasXYU=; b=A+yw6iRP72p8mm h4nEK7lreQiaEnToWBBTej1A5P7RZD5O3lSzEZC2G45aZwYNWUn4Ni/vmoThcfdmm9kT5iN3GNDFC 9EhX6dqUT1AiCd6LcGFiEfdaI0EksG8ZviKsgmzKLtW0scl199x7SviVp138T0LUFXsS+MrcgPFc8 rNuNRMnyX9wSiV1aQaZXFr96VuiLjSkQjBMpIc9JxWnrU3U9KL7aWHAUVqHu3mfrnMSbWWZl0mQhC gmM3karmbRDkcTeNyuxc4R5XrshApGVDhaBh1buVgl+jseCpFRjf5+s2LWpu0ZlI3mLYTdv/nLCag x7dxF6DMn0tW7c2UpfQQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nmby5-00GDC5-14; Thu, 05 May 2022 13:56:33 +0000 Received: from mail-ej1-x629.google.com ([2a00:1450:4864:20::629]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nmbwy-00GCZd-5n for linux-arm-kernel@lists.infradead.org; Thu, 05 May 2022 13:55:25 +0000 Received: by mail-ej1-x629.google.com with SMTP id i27so8873510ejd.9 for ; Thu, 05 May 2022 06:55:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=6jGlMaGnRuy7SzW1gLK1rbP4ej3ug9RnCTQFRGlHRyo=; b=UUjXmrWy0gc/YOU7UeZa/CBI2LHDiPBYI52bgE+CbxJBhcB5C29lQYCzJli3U7TlfI VSIZSLABxigpDo0RK/fTgnO11zb2Hxbg3dpSIYqdXFuy1HyLNlLCPsVM3/4p7ChNQraL ip5Kp/VrhE6bSHlbuvdOYCniW3gznAqfI6urKJ7S6u3wV93iQ+MRNtObs9iBk+/4eZcr eDjAKYbd3TbhgERHeDSzzliH5C2D9f5OE6DqXm7BTHHND2xq2F99vOTp4Rt9kIFtB3CY 3TZb+4+EbCQrFdFzj987cHw2xs19Y7zrWXG9LJwsL3+w5oTI5TWjGTNui7nbsnwk6MSk 713Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=6jGlMaGnRuy7SzW1gLK1rbP4ej3ug9RnCTQFRGlHRyo=; b=DcWczWwJSxB93PtUfobIY8rl3SwIiQ9B3q3yOLdc2/Trc265Bd980AKeq6sXHNDXyg +t4fL1BfwTpg/eHXeNeQidms6xrAYJtn+3O3k3IHrgtNoB4JhHEdCDogeLI2BHsykw1m GSBuAF19yq9vcION+kFuV2Z2FSxlxovlf4LEJAv2iw5bNU4h2bgsFkbBQB1uG2HjpYHZ p8aipJt/OgBQKfuwLcI5AlzinZjO2ko0W+QJNPr1zRNfLaW8FRbIhmOh2YiRZBYexa81 aiogBvxV3tXn9btWYwvfwNXnvwYA3q3FEpiXTZEjBjRjua/Htpa4yj+y58roHqCvocfo gZ/w== X-Gm-Message-State: AOAM533+gwd/Fssom3DKJml02egHnnBM8/R7qlYJBvfCbn+IQS1tkrlr ihKsjZX16KE2NdJisXa/PSw= X-Google-Smtp-Source: ABdhPJwRXqicutb+lLbMz0m+5wqMzInuLtPPN4SwqVojZi82lcp2HvixDpRomdqZLM07KxrlmZbQVw== X-Received: by 2002:a17:907:6e2a:b0:6f4:69bb:7ef6 with SMTP id sd42-20020a1709076e2a00b006f469bb7ef6mr17152406ejc.0.1651758922083; Thu, 05 May 2022 06:55:22 -0700 (PDT) Received: from localhost.lan (ip-194-187-74-233.konfederacka.maverick.com.pl. [194.187.74.233]) by smtp.gmail.com with ESMTPSA id e15-20020a50e44f000000b0042617ba63c7sm877949edm.81.2022.05.05.06.55.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 May 2022 06:55:21 -0700 (PDT) From: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= To: Rob Herring , Krzysztof Kozlowski Cc: Pavel Machek , "David S . Miller" , Jakub Kicinski , Paolo Abeni , Florian Fainelli , Hauke Mehrtens , Jacek Anaszewski , devicetree@vger.kernel.org, netdev@vger.kernel.org, linux-leds@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com, ansuelsmth@gmail.com, andrew@lunn.ch, vivien.didelot@gmail.com, Vladimir Oltean , Jonathan Corbet , John Crispin , linux-doc@vger.kernel.org, =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= Subject: [PATCH RESEND 1/5] dt-bindings: net: add bitfield defines for Ethernet speeds Date: Thu, 5 May 2022 15:55:08 +0200 Message-Id: <20220505135512.3486-2-zajec5@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220505135512.3486-1-zajec5@gmail.com> References: <20220505135512.3486-1-zajec5@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220505_065524_259148_885AB542 X-CRM114-Status: GOOD ( 14.19 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Rafał Miłecki This allows specifying multiple Ethernet speeds in a single DT uint32 value. Signed-off-by: Rafał Miłecki --- include/dt-bindings/net/eth.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 include/dt-bindings/net/eth.h diff --git a/include/dt-bindings/net/eth.h b/include/dt-bindings/net/eth.h new file mode 100644 index 000000000000..89caff09179b --- /dev/null +++ b/include/dt-bindings/net/eth.h @@ -0,0 +1,27 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* + * Device Tree constants for the Ethernet + */ + +#ifndef _DT_BINDINGS_ETH_H +#define _DT_BINDINGS_ETH_H + +#define SPEED_UNSPEC 0 +#define SPEED_10 (1 << 0) +#define SPEED_100 (1 << 1) +#define SPEED_1000 (1 << 2) +#define SPEED_2000 (1 << 3) +#define SPEED_2500 (1 << 4) +#define SPEED_5000 (1 << 5) +#define SPEED_10000 (1 << 6) +#define SPEED_14000 (1 << 7) +#define SPEED_20000 (1 << 8) +#define SPEED_25000 (1 << 9) +#define SPEED_40000 (1 << 10) +#define SPEED_50000 (1 << 11) +#define SPEED_56000 (1 << 12) +#define SPEED_100000 (1 << 13) +#define SPEED_200000 (1 << 14) +#define SPEED_400000 (1 << 15) + +#endif