Received: by 2002:ab2:3b09:0:b0:1ed:14ea:9113 with SMTP id b9csp167818lqc; Thu, 29 Feb 2024 13:36:53 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWRd1snGQf1DmTY0ixloX9X1Aa/qbOtwCTPsYYzRyO57KNp+Ty9MlP8epqoDgCVzmKyBZWVc++fZLnuoHbiyUxJFwnkyioR3UNIscJVFA== X-Google-Smtp-Source: AGHT+IGxGWGMfNz/mZFKM4VyxwILomBi4ReUCeuaeyrlMngXEN05kZDdmqwCswZjBJPA0AIzAoT2 X-Received: by 2002:a17:902:f687:b0:1db:4746:5fdd with SMTP id l7-20020a170902f68700b001db47465fddmr3604662plg.43.1709242613280; Thu, 29 Feb 2024 13:36:53 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709242613; cv=pass; d=google.com; s=arc-20160816; b=vInJoCCIVDVmkCPUA/RHoSQvsQAIql5VisTAudMovDnb4jHrl75VJiLIxrmYBf1JvV lA10J8yxGcvv1rZ9PNMjIXMyV74SgCKt3LzPOO8MnO6i0AXjx0rbzwm+cGpzT+w6dxe1 YkJq+yOPQcmz2/VrJVMpbWn40rTA8vrQ41LIocTlGqsAwIYzIBulLzg8Bx+FGDx1ENAs 0VMW2Nm3Kre8WZrcVJvDoQUPuuKhwEWentaotN8M0B+kUEkKsesJXBucAJp65FattZrk ME1pLARDaCAsOXzTgPz9htYRoIqI05ba3DGHbZ9MLty5ctNy/+6t3eKNUDzu9EggXDc9 H08A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=WV/j6Y5N6otWN1tEplJm/8ekXe3vxnN6/ZPGGpf+w6U=; fh=KsSJivdssjCiEIVo6bnmS+KeN4Nx87nG7zWndI/ee3U=; b=TRogFgYOAn9TQmUjtj5t9V4xCccOvn9kfVjyHL8VLql4GoA/EMFPc8aDifNLrkofA1 llprNHV2WKzcZXXMBCkb0S/4hMi9aIs2YRlcf5ai3xWvZW1PlrZLr6qZc/O2NKjNx/d9 gFfRb5xspMAPaq73VwPGI4UffhBJsTc9wPWrIWgskyF9EZ0XhUMYyXKYcYjHcRG1sG0a 0G4GJKjr1xo4e+BY1I1Wdwl5ysdtNR+32/CDvbnp9WzHkDHoakr55u0HvrZ+g8W6Q3Kq dhuhkNY+O83H7WrU7WfMop6CbRI0FpeSs7ylgIBLqB+eydoHJ8lfJ89bV36zKkvuxUzG I+AQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=Dj8QYvH1; arc=pass (i=1 spf=pass spfdomain=lunn.ch dkim=pass dkdomain=lunn.ch dmarc=pass fromdomain=lunn.ch); spf=pass (google.com: domain of linux-kernel+bounces-87573-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-87573-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id a18-20020a170902ecd200b001d9d44403bbsi2166323plh.583.2024.02.29.13.36.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Feb 2024 13:36:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-87573-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=Dj8QYvH1; arc=pass (i=1 spf=pass spfdomain=lunn.ch dkim=pass dkdomain=lunn.ch dmarc=pass fromdomain=lunn.ch); spf=pass (google.com: domain of linux-kernel+bounces-87573-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-87573-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 7272CB23262 for ; Thu, 29 Feb 2024 21:23:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8174016FF59; Thu, 29 Feb 2024 21:23:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="Dj8QYvH1" Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) (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 6BAA016FF29; Thu, 29 Feb 2024 21:23:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=156.67.10.101 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709241804; cv=none; b=F97uurudg30h4ZVWfEh4yTp6bHI8XgGO8atKbH/p8oLqGf1FPZnuLJLDOkGYMKZt8WqONZj60MO2oNdvOxX1NuTPTdXTYvP6KYNMIfeIBurv3fEHIvrCdfPPazY+VPmTviStSyjr8pk7LoTQSnzz0ftWmlyGjUZvLSkAmAvpffY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709241804; c=relaxed/simple; bh=dr2CETLPDzvOjfQ+4hzjizFIOCRZWKH7BMDF5xNDmVU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=t4jEtRJFgpMh3AK1mPN9FWazMoiUuODpTmrd7KhsSyBwlmkR2AcWI7GuNeHjKom9RG5qYh7O0dt/Fq19/kIGeECfZVllomqCiXkGleX+qbArTYOi4BMT2PXbgCFNSVYLDX4uN4yfLe+CbS3c+pEaK3U+hk/xmBXOtI/bGMhI9uo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch; spf=pass smtp.mailfrom=lunn.ch; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b=Dj8QYvH1; arc=none smtp.client-ip=156.67.10.101 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lunn.ch DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Transfer-Encoding:Content-Disposition: Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:From: Sender:Reply-To:Subject:Date:Message-ID:To:Cc:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Content-Disposition: In-Reply-To:References; bh=WV/j6Y5N6otWN1tEplJm/8ekXe3vxnN6/ZPGGpf+w6U=; b=Dj 8QYvH1CsV06IW27X93TYnqspsw8At9LX7YmY9g02ojJYhZ/sAkNZIeV+PLXzWsijdZLjujg45/JAa l46mK7WWfEvLzGG+J3rBMyelnG3levKWyzWgilnVHaSo2jI18G3Dru47kP9brEN94JpD4VNrfEqnc Ce0PcYvCybZ6IrA=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1rfnsH-0095Hf-8S; Thu, 29 Feb 2024 22:23:29 +0100 Date: Thu, 29 Feb 2024 22:23:29 +0100 From: Andrew Lunn To: =?iso-8859-1?Q?J=E9r=E9mie?= Dautheribes 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 , =?iso-8859-1?Q?Miqu=E8l?= Raynal , Yen-Mei Goh , Maxime Chevallier Subject: Re: [PATCH net-next 1/3] dt-bindings: net: dp83822: support configuring RMII master/slave mode Message-ID: <68112ecb-532f-4799-912d-16d6ceb9a6f3@lunn.ch> References: <20240222103117.526955-1-jeremie.dautheribes@bootlin.com> <20240222103117.526955-2-jeremie.dautheribes@bootlin.com> <860648fa-11f5-4e0d-ac4e-e81ea111ef31@bootlin.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <860648fa-11f5-4e0d-ac4e-e81ea111ef31@bootlin.com> > > > --- 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. We are normally interested in this 50Mhz reference clock. So i would drop all references to 25Mhz. It is not relevant to the binding, since it is nothing to do with connecting the PHY to the MAC, and it has a fixed value. So you can simplify this down to: RMII Master: Outputs a 50Mhz Reference clock which can be connected to the MAC. RMII Slave: Expects a 50MHz Reference clock input, shared with the MAC. > 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? We don't really have any vendor agnostic consistent naming. dp83867 and dp83869 seems to call this ti,clk-output-sel. Since this is another dp83xxx device, it would be nice if there was consistency between all these TI devices. So could you check if the concept is the same, and if so, change dp83826 to follow what other TI devices do. > BTW, this series has already been merged into the net-next tree, I'm not > sure what procedure to follow in such cases. KAPI don't become fixed until published as a release kernel. We can rework bindings until then. So just submit patches on top of what is already in net-next. Andrew