From patchwork Tue Feb 27 09:39:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bastien Curutchet X-Patchwork-Id: 207106 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp2589005dyb; Tue, 27 Feb 2024 01:42:35 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXizAQRSiutdqDPSZotY+zYvv4CuxUbjdWG0dQSRit29Q8iI9V2FsDppcVZJNn/ZFq6NfCSTxK2/9WfFrWmwSar1gZL+w== X-Google-Smtp-Source: AGHT+IH3lZcs4uYY4xyDeesrSUy36t3dm790QuWqAxADAUzDfnQymgfYibHmqAOYTa4LZ/tqx+Ju X-Received: by 2002:ac8:7dd6:0:b0:42e:a139:3ea9 with SMTP id c22-20020ac87dd6000000b0042ea1393ea9mr570904qte.51.1709026955535; Tue, 27 Feb 2024 01:42:35 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709026955; cv=pass; d=google.com; s=arc-20160816; b=BPLLnEu027VIrGu/klvTv8lDv5xsGRenz9aXG4NmGxqKHNZYm509BI1c8In+u57LgS fmPNwJBlce/u+vL+iMd1QQQgnlwbUkV5WQy03o5BLslnhJgbesdTfWDnyneiDzlW3N75 sksNzuh+NsJa6+6frUwm8RN/48VOrWUgX4qhIB5yfmlzKJcAka5Zh/f47GpGSTm6KbgO WMYTIxrRaazUGmA0tRS6Ovc+0RClFCcnTkWBFAsV+SIP0yxEXE8dr/9mYGQDaBA7PPop Hnm249F8piCZ6nCJOpehrZ4TB8cnxb8JGMDmRJysXC4u/ofeV8eXlQzmHGtzPrU9FDYc pw5Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=lvm6/L2WXUvtdtliXYOUV1u9RT8vkw9obusEbpY4LHk=; fh=leM6McOwUD8a7DalviW4Yv/21HOmqHPF/ma7EySur/M=; b=kvONpT/zMOmIsW/Qcwyq2a9vi7IIinBWP9WMs0phWJ1Cscr5ZrAInStSONPDuO6AGC WDN2/aJTWjQ6SuPmTGujJ736iBR0o4uPCzPGWY6w5k4wLOV215Ce8/vwgbOAkEoAR5yj Ghzl48rdVzn2A5pTqw+aoP6a1uGa6QabP22H6h1tSi2pUr/SfdgV56U5KRhfJW/r9Dax ZsuK+KnhhpGducBJSNmN1DEpPb1T6sZ2zPE+Bw9f/sczxAwU9udWiQNixreVDIHXL9Q2 iC5Wn16fJM4uYpPNa/VTySinZZ/fC9ZHSBGRBvWeh9Of0dMt4W/UUwfx5IS5dW7yUfEO VIew==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b="l/BJeXbo"; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-82976-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-82976-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id jr13-20020a05622a800d00b0042e5cc4c2c3si6849737qtb.146.2024.02.27.01.42.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Feb 2024 01:42:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-82976-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b="l/BJeXbo"; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-82976-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-82976-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id CE0D61C21BF2 for ; Tue, 27 Feb 2024 09:41:45 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BA7D6139570; Tue, 27 Feb 2024 09:40:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="l/BJeXbo" Received: from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net [217.70.183.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 60A691369A0; Tue, 27 Feb 2024 09:40:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709026814; cv=none; b=gllcxbkZktgQ/wxF8vDbhcZ/TnoIvzlNk+pIVx7IiQDLlv2ho6fq6R+0MnmGATyAfkza4VAdj/xQNGvzr2Jcl+FUMmEVyAd7Pu+N4C9YPzkz0sJ+StBz4DSoTPCIb1ayFT1mQAU8zjlhPF/z92klqIcUtEtpuQQuAuyaDcacxuE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709026814; c=relaxed/simple; bh=9JjvHERcZ8YVK7b/Q4VF9ZW0OhQYLZLE7HJA4c4oEVs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=gwO2nhf6+57jlIi6SJpSEGxGLxVqWLHgd/5CUrm0slzSb3lJNjjOy5X2AF6AiTG/FZ3O2JQwL5JdM4tbXioTSEu1YwD0k2F8WCIZz/tl0YL+l6cThvfRmc/8lr9YTCfUgQc6B43Z2xPXYp4pCyjcMAodM1LyyZjiNYubVxCFfKA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=l/BJeXbo; arc=none smtp.client-ip=217.70.183.201 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Received: by mail.gandi.net (Postfix) with ESMTPA id 5FCE91BF20C; Tue, 27 Feb 2024 09:40:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1709026804; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=lvm6/L2WXUvtdtliXYOUV1u9RT8vkw9obusEbpY4LHk=; b=l/BJeXboAzq1t4BjFnD2es++LHkbZFXWmgrkX0aR4REVIzt4KMJ5FAFxCYspEGps/FbXDy Z3bMV2puAky55syDyN/tQZVqDlJpRTClyqH5iFYlBOJaCZBIX2PJPZmXtg61O8ySCmGKUw aBbY3IjojuuJORbqxR494qk/k86uhWSvZVcMHnTjmsU90YfnEomj6el5YsvqSQchk9Zj5b +jbQkP78Uc3nBa/LDHnV6mqGpCQ8EkU3negzntm/hxKfo1pCZF7KNimfktC50nDvopfo+9 7ndMdXlLbiekglz8oPiJ5u98zOkFZptaU+VIJsYuTXCrhmH+FRzjWWy8RFdmYQ== From: Bastien Curutchet To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Pavel Machek , Lee Jones , Richard Cochran , Andrew Lunn , Heiner Kallweit , Russell King , Bastien Curutchet Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-leds@vger.kernel.org, Thomas Petazzoni , herve.codina@bootlin.com, maxime.chevallier@bootlin.com, christophercordahi@nanometrics.ca Subject: [PATCH v2 1/6] dt-bindings: net: Add bindings for PHY DP83640 Date: Tue, 27 Feb 2024 10:39:40 +0100 Message-ID: <20240227093945.21525-2-bastien.curutchet@bootlin.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240227093945.21525-1-bastien.curutchet@bootlin.com> References: <20240227093945.21525-1-bastien.curutchet@bootlin.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-GND-Sasl: bastien.curutchet@bootlin.com X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1792044648831975309 X-GMAIL-MSGID: 1792044648831975309 The DP83640 is a PTP PHY. Some of his features can be enabled by hardware straps. There is not binding yet. Add a device tree binding to be able to override the hardware strap configuration when needed. Signed-off-by: Bastien Curutchet Reviewed-by: Conor Dooley --- .../devicetree/bindings/net/ti,dp83640.yaml | 77 +++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 Documentation/devicetree/bindings/net/ti,dp83640.yaml diff --git a/Documentation/devicetree/bindings/net/ti,dp83640.yaml b/Documentation/devicetree/bindings/net/ti,dp83640.yaml new file mode 100644 index 000000000000..db1dc909d5cb --- /dev/null +++ b/Documentation/devicetree/bindings/net/ti,dp83640.yaml @@ -0,0 +1,77 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +# Copyright 2024 Nanometrics Inc +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/net/ti,dp83640.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: TI DP83640 ethernet PHY + +allOf: + - $ref: ethernet-controller.yaml# + +maintainers: + - Bastien Curutchet + +description: | + The DP83640 Precision PHYTER device is an Ethernet PHY providing PTP + capabilities based on IEEE 1588 standard. + + This device interfaces directly to the MAC layer through the + IEEE 802.3 Standard Media Independent Interface (MII), or Reduced MII (RMII). + + Specifications about the Ethernet PHY can be found at: + https://www.ti.com/lit/gpn/dp83640 + +properties: + reg: + maxItems: 1 + + ti,fiber-mode: + $ref: /schemas/types.yaml#/definitions/string + enum: [ disable, enable ] + description: | + If present, enables or disables the FX Fiber Mode. + - disable = FX Fiber Mode disabled + - enable = FX Fiber Mode enabled + Fiber mode enabling can also be strapped. If the strap pin is not set + correctly or not set at all then this can be used to configure it. + + leds: + type: object + $ref: /schemas/leds/common.yaml# + description: | + Describes the three LEDs of the PHY. + +required: + - reg + +unevaluatedProperties: false + +examples: + - | + mdio0 { + #address-cells = <1>; + #size-cells = <0>; + ethphy0: ethernet-phy@0 { + reg = <0>; + ti,fiber-mode = "disable"; + leds { + #address-cells = <1>; + #size-cells = <0>; + + led@0 { + reg = <0>; + label = "activity"; + }; + led@1 { + reg = <1>; + label = "link"; + }; + led@2 { + reg = <2>; + label = "speed"; + }; + }; + }; + };