Received: by 2002:ab2:3b09:0:b0:1ed:14ea:9113 with SMTP id b9csp156750lqc; Thu, 29 Feb 2024 13:13:13 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWa+A0ubcjFDXAxAn0lKUVCTi7dIh/iE0RdZznIv4ZOiT0KMSo/1AenoIacZnk/oKBwttzrBoptLYMzALOIAgkbbjbPKbcXrBJ7RgYiTw== X-Google-Smtp-Source: AGHT+IFI0s1dUF7tmKbS+RhqXW/gOr1+IPcnUGeD9RLnHch+U7WGM8YQ67xaFfF3KxkT79dAVKf4 X-Received: by 2002:a17:902:a3c9:b0:1dc:b008:f678 with SMTP id q9-20020a170902a3c900b001dcb008f678mr3347658plb.18.1709241193026; Thu, 29 Feb 2024 13:13:13 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709241193; cv=pass; d=google.com; s=arc-20160816; b=Sg/UspVRBNYWXHfpFk3j5t6P5T0ON3NSEyD4BtawHHwXLrVFg7ym+90baYkw1VX3bM oT4/YQUutR8cQYkui0NUk8BAQ97SVAfP/Paga+udU5QaLsQpWhcGZVuxLQCoQnswuCSV F6F9M1pAvfPC5phde4/96ksTWfLc+eXvq1Of1i2sRqDQydoo9SE+2KW9z+0tXOgXxu+R VY3NRNnag72Y9Nf5XwnBcJYL8Aj6BB76PGBCpCvd6adNQ3Az3TVY2NCYzrRl/Niyb5n7 earbpFOvR+CeoHk5obq39NIed6FDnQs48Bbhr4+Of2KNJjDSlQJwVvrIlhUaGmgvSjAB nxDQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=2yC2KEk65Ak+51VQmZ/7ETdOjptWIvVuBFVWdWXcNv0=; fh=wda3IjMwqJSay8NevluNZtLumu26Bz1LwBqQtsOnA6U=; b=Qw7Ft9jwpymrA2EYDv1wWeXZ9mwTPXKYMaAGnjN/svYTWsrpPxXS8uGQ34lt/CvoDc xKVZSPsE6rFzj+PRQRjMKtIKS8EjCL2VMOlIvrEa6ssU371rfcBQtvB7z/D5OJD4dbrj ClIciAlSlKWua8UFHdrt8ztJDd3dwSce64wxUOcPBnHcul6QrCKILCOC4/J3AJXN97oC S4eLIQexrr3pGcq/HrH28qaG9v6EwQraqMP7A9ZvPsYowScle0lFCrt0PeAYDJymgKPa ugGuUqhqdOu4t3YgVFwXSEbWFuduhjp85y3Q9ikY5RxqBA6PrS0JoZ16ocI0E+CG+Lln L5oQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=iXg3gcke; 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-87527-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-87527-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id c7-20020a170902d48700b001db43c36b64si2022913plg.467.2024.02.29.13.13.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Feb 2024 13:13:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-87527-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=iXg3gcke; 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-87527-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-87527-linux.lists.archive=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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 2E0EE28A39D for ; Thu, 29 Feb 2024 21:04:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7A3FA14A4CE; Thu, 29 Feb 2024 20:46:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="iXg3gcke" Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [217.70.183.198]) (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 393831428FC; Thu, 29 Feb 2024 20:46:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.198 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709239586; cv=none; b=Fh9fb713hHEJ5gOnxdiCvFDw9k+cdwcdiHlAC0zGsSprjLoyEV18Y1y0LMqxLbjkjNb3TYu+Sgl0d8xjgYrC/E1hODcGwBb/Gfn454/kTh6wp1+LcdUbYsw6s+8CLypeaRojCKKBoM4eG+EDiMPwlIwxCpksV/0HYiTX22XYIpU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709239586; c=relaxed/simple; bh=CQx3KA2MK3LEfTY+Hogj/IbqUR7C0EreWLbSRWcjetE=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=ljFYra1fD5OLjWy3ssrc5gE6NSjom5U4jvlrOMag1MJXm6ABsk4/Ys/5xDvRmkiGSRexWeg4k9LV6FHO1NKtaD03iTZkkoYVuL48JrPQW+JyfeCwnzU73K2SZ2z391KmDXFrHlsCLDP/n4D/AwxHi+ZqZUM9BHAU9aZhl6di89w= 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=iXg3gcke; arc=none smtp.client-ip=217.70.183.198 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 ESMTPSA id 3CEC6C0003; Thu, 29 Feb 2024 20:46:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1709239575; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2yC2KEk65Ak+51VQmZ/7ETdOjptWIvVuBFVWdWXcNv0=; b=iXg3gckeA+D8GH8kI4v8U3j0+bfu1iHOWuJtk5jarRNr/NgM0PDJ4S2oQ3F6WaS7CrSvV2 8dBJhguouJNfQB/IzuGqHhXyBkk9820M7UZkdY/abhHDqncX1F6EzrknR9OKDE1nnR3G+B 3w5z7vVKLv5Y2NcGCexFa3HZolQAfYnNPHKB6kTsPEikSZFuIn7pBp7W8Cv/0O1ylSZlyi Vex4u1xlJP5CMcZxE89tOUcz/exHS2v9pwyNxp8CTC2TPDfT3ohwLmBqhCvNkx+ahJ9mng CDoP7BYzrC3Bwsk76Gf2+YdV6apZLRie7MpqDDEllVSxTz1dh1YMcuE8TQsuIA== Message-ID: <860648fa-11f5-4e0d-ac4e-e81ea111ef31@bootlin.com> Date: Thu, 29 Feb 2024 21:46:12 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH net-next 1/3] dt-bindings: net: dp83822: support configuring RMII master/slave mode Content-Language: en-US To: Andrew Lunn Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Heiner Kallweit , Russell King , Andrew Davis , netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Thomas Petazzoni , =?UTF-8?Q?Miqu=C3=A8l_Raynal?= , Yen-Mei Goh , Maxime Chevallier References: <20240222103117.526955-1-jeremie.dautheribes@bootlin.com> <20240222103117.526955-2-jeremie.dautheribes@bootlin.com> From: =?UTF-8?B?SsOpcsOpbWllIERhdXRoZXJpYmVz?= In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-GND-Sasl: jeremie.dautheribes@bootlin.com Hi Andrew, On 26/02/2024 16:28, Andrew Lunn wrote: > On Thu, Feb 22, 2024 at 11:31:15AM +0100, Jérémie Dautheribes wrote: >> Add property ti,rmii-mode to support selecting the RMII operation mode >> between: >> - master mode (PHY operates from a 25MHz clock reference) >> - slave mode (PHY operates from a 50MHz clock reference) >> >> If not set, the operation mode is configured by hardware straps. >> >> Signed-off-by: Jérémie Dautheribes >> --- >> .../devicetree/bindings/net/ti,dp83822.yaml | 16 ++++++++++++++++ >> 1 file changed, 16 insertions(+) >> >> diff --git a/Documentation/devicetree/bindings/net/ti,dp83822.yaml b/Documentation/devicetree/bindings/net/ti,dp83822.yaml >> index 8f4350be689c..8f23254c0458 100644 >> --- a/Documentation/devicetree/bindings/net/ti,dp83822.yaml >> +++ b/Documentation/devicetree/bindings/net/ti,dp83822.yaml >> @@ -80,6 +80,22 @@ properties: >> 10625, 11250, 11875, 12500, 13125, 13750, 14375, 15000] >> default: 10000 >> >> + ti,rmii-mode: >> + description: | >> + If present, select the RMII operation mode. Two modes are >> + available: >> + - RMII master, where the PHY operates from a 25MHz clock reference, >> + provided by a crystal or a CMOS-level oscillator >> + - RMII slave, where the PHY operates from a 50MHz clock reference, >> + provided by a CMOS-level oscillator > > What has master and slave got to do with this? > > Sometimes, the MAC provides a clock to the PHY, and all data transfer > over the RMII bus is timed by that. > > Sometimes, the PHY provides a clock to the MAC, and all data transfer > over the RMII bus is timed by that. > > Here there is a clear master/slave relationship, who is providing the > clock, who is consuming the clock. However, what you describe does not > fit that. Maybe look at other PHY bindings, and copy what they do for > clocks. In fact, I hesitated a lot before choosing this master/slave designation because of the same reasoning as you. But the TI DP83826 datasheet [1] uses this name for two orthogonal yet connected meanings, here's a copy of the corresponding § (in section 9.3.10): "The DP83826 offers two types of RMII operations: RMII Slave and RMII Master. In RMII Master operation, the DP83826 operates from either a 25-MHz CMOS-level oscillator connected to XI pin, a 25-MHz crystal connected across XI and XO pins. A 50-MHz output clock referenced from DP83826 can be connected to the MAC. In RMII Slave operation, the DP83826 operates from a 50-MHz CMOS-level oscillator connected to the XI pin and shares the same clock as the MAC. Alternatively, in RMII slave mode, the PHY can operate from a 50-MHz clock provided by the Host MAC." So it seems that in some cases this also fits the master/slave relationship you describe. That said, would you like me to include this description (or some parts) in the binding in addition to what I've already written? Or would you prefer me to use a more meaningful property name? BTW, this series has already been merged into the net-next tree, I'm not sure what procedure to follow in such cases. Best regards, Jérémie [1] https://www.ti.com/lit/ds/symlink/dp83826i.pdf?ts=1708075771406&ref_url=https%253A%252F%252Fwww.ti.com%252Fproduct%252FDP83826I