[net-next,1/3] dt-bindings: net: ipq4019-mdio: document now supported clock-frequency
Message ID | 20240124213640.7582-2-ansuelsmth@gmail.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-37701-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2553:b0:103:945f:af90 with SMTP id p19csp1267838dyi; Wed, 24 Jan 2024 13:37:52 -0800 (PST) X-Google-Smtp-Source: AGHT+IGVVl+02alhDUr1je5NKiG4wrJ4ZPKMMFBzanRqIuHF7oJiQsG7tutjugUawWRgu8C2hVZP X-Received: by 2002:a9d:4d12:0:b0:6e0:ee22:3630 with SMTP id n18-20020a9d4d12000000b006e0ee223630mr2337162otf.33.1706132272101; Wed, 24 Jan 2024 13:37:52 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706132272; cv=pass; d=google.com; s=arc-20160816; b=bKchUQHwrNDpzfxY0P9Yf4SaEpR07cKVzewRHu5jlO+hzEgrZG6fKpZGD472uL7O7A e5qtaX2D0dRlhoQmxdKw7DpD1INDu38o4icIEdnq/VL3Q5WtrsF/JjjU0IlO+XicVw2f lwa4ljplREPsy3jYlNUt9vGwU3dcprSjnfX3c7hEgLk5ZztfgvKOfDHXIYRLlRGSmxrm WWwqREpFGPkJKE3U3qhA7qFJ1UXQzOTzDJdGwTJhw7KeiRgJ12mC8WEH+U7BeesH/aSH rZVVjJrFOBDD5CMoqDjgqku0pAbPL8HihKHU6OmkV0pOC49ePmvyn48gYHpXT8NvXJEx Bzag== 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=GfBInK070elHEyd7RCJMLjds2r5H4aJYPkSFaIcdwCY=; fh=CCe5LV3srAvHWzapy9l7dzrUxIw0G29Ydx3kFkGCqgE=; b=Imj6ql68WvrTD0ggt3hVmfa7xVCMPiIooOZrBDFsDaMqrasJlE5Jsy8CJXO9+PW3B4 LiKwfRVhb1y1HXyJdm5ncuJ3OC/yMV7607DYlYXZlV9pGZTs5O9hQuUAxO97edu8FcX2 CenagWJ6TKAaB3GngrHccWhpjkWdRQzB/CsE6IFjY8D9D5XaEGqLWscl1AjvI50fq/iU KcVJhc84civ4UfZBTK2+elHcb/WnQlrT51/KtzGT2qx7niIS6IbAbPsXI5p5E51hpO6z Cn64IBYedNtZ5tTFqzcn6L1LYJ30H4qMCEvU5i8DpMvtp9qXbrEDkhnWB8zhU0rrrGZa Oktg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=jFPBcz8b; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-37701-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-37701-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id y9-20020ac85f49000000b0042a2feee267si10881621qta.503.2024.01.24.13.37.51 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Jan 2024 13:37:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-37701-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=@gmail.com header.s=20230601 header.b=jFPBcz8b; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-37701-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-37701-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.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 DEC201C23CED for <ouuuleilei@gmail.com>; Wed, 24 Jan 2024 21:37:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0DE3E13665A; Wed, 24 Jan 2024 21:37:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="jFPBcz8b" Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B0D6E811E4; Wed, 24 Jan 2024 21:36:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.43 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706132219; cv=none; b=PN2SjXyP3ImAaCbzJv7ZqxjF2jk85vHncDGsrYebCtRJyY2FfVGrtQwk362HFJtTPypgh31dQn9mx0y73lDRYxHYUzAWDX6FcQ3XU7WJhDyP83K8jG+fAbRY82J6xrAaC2eW63xZ6kwXi6Jrr16MO/4VNhPZGI9qs+O8a4BF/g0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706132219; c=relaxed/simple; bh=LkgiOKbVbZHSpnFJNp18qgcVvmZ/V59WoL8f6sQ6vis=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=RTJYTcbRniVJ83kaY/Gj+riUlXvRtpaXfhRpzMXFloPEr+LHoA7slVhHaB17AOyDjPPxi4yQODNdRM8d6R5+v12gHtE1ZyWg2bT2fv22svBnWOOd7V7lXE856bxddT6k8Inx0D0n0Ikk0zDEpx1heSowMdvkopTtdcxpmKsYKuU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=jFPBcz8b; arc=none smtp.client-ip=209.85.128.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wm1-f43.google.com with SMTP id 5b1f17b1804b1-40e76109cdeso66154695e9.0; Wed, 24 Jan 2024 13:36:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706132216; x=1706737016; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=GfBInK070elHEyd7RCJMLjds2r5H4aJYPkSFaIcdwCY=; b=jFPBcz8bIC9mM1tWiihj92WeTSoUrjgiq68lQMKdq7DZaKDUpps/pGfgKVe4hG4Q9O i4yxv99NFneoviBccueuh/X6gZDqtuh8nxoUcsgf5xRq3F1ngYnZ3ZhkYLugBfwMyhRB ScKyQf7QWG+OeH6UkU6eAgxLsnU83CVzTd2C15ouA1GGtB7IN3cKNxreKPl7rDnj5R0N 1SMfQ/81Mij3xvMv7mbf7BIxL702ylFD6SVEVLBWSOrI0CVb6pcrJPjNxgfKbiPj/1nC bi2/zNMa+bIDOf0A5LxNruNU46uiHTO4VNT8U8hWvsRvVfdKHdwM3izDzhIDsJjWzbXo R/DQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706132216; x=1706737016; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=GfBInK070elHEyd7RCJMLjds2r5H4aJYPkSFaIcdwCY=; b=WM7udRUwOyyY3YPIUtE476Jk3iKr9l8YNY9gDHmEkarqNNEN4c6XLrnS7adq/NXXNk nKg3ZJpaPkH9D0apyKg6VJeuLt7LUzfSWVFIJoeGFZRVuVSgga4eMgVcSj2jXqErLUS8 mDOvStaLyLhKXmgrmDtvUkDyDBtdvqmnJOaVZ4JWv4wOuvuDlHnQQH8moucK1wT2KuiS UHHbuJ94NM7HaFhAS3CxGpCxWR03Ua+tWicjK15OotVa+Hg1BDAupDSfmpkYngMVxAML 71aKUge+7H89Tfaq7Idrr3iIUU5UOT05eb1jzckUkoRwQv6iOYydJ2w5FjY/3nA+TAOH igRA== X-Gm-Message-State: AOJu0YxC0SB0Lr5k0rLatSt1jn5vVei4OeTMzKBayMJUqC0o3vR7XO+1 3Kiz74evEoRD+8KxnhVdOuajMKp6EUwlrlj7wweuYVCaqGM+qDwG X-Received: by 2002:a05:600c:a03:b0:40e:7485:daee with SMTP id z3-20020a05600c0a0300b0040e7485daeemr1576328wmp.90.1706132215817; Wed, 24 Jan 2024 13:36:55 -0800 (PST) Received: from localhost.localdomain (93-34-89-13.ip49.fastwebnet.it. [93.34.89.13]) by smtp.googlemail.com with ESMTPSA id q13-20020a05600c46cd00b0040e89ade84bsm339466wmo.4.2024.01.24.13.36.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Jan 2024 13:36:55 -0800 (PST) From: Christian Marangi <ansuelsmth@gmail.com> To: Andy Gross <agross@kernel.org>, Bjorn Andersson <andersson@kernel.org>, Konrad Dybcio <konrad.dybcio@linaro.org>, "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Conor Dooley <conor+dt@kernel.org>, Andrew Lunn <andrew@lunn.ch>, Heiner Kallweit <hkallweit1@gmail.com>, Russell King <linux@armlinux.org.uk>, Robert Marko <robert.marko@sartura.hr>, linux-arm-msm@vger.kernel.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Christian Marangi <ansuelsmth@gmail.com> Subject: [net-next PATCH 1/3] dt-bindings: net: ipq4019-mdio: document now supported clock-frequency Date: Wed, 24 Jan 2024 22:36:31 +0100 Message-ID: <20240124213640.7582-2-ansuelsmth@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240124213640.7582-1-ansuelsmth@gmail.com> References: <20240124213640.7582-1-ansuelsmth@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789009352857280004 X-GMAIL-MSGID: 1789009352857280004 |
Series |
net: mdio-ipq4019: fix wrong default MDC rate
|
|
Commit Message
Christian Marangi
Jan. 24, 2024, 9:36 p.m. UTC
Document support for clock-frequency and add details on why this
property is needed and what values are supported.
From internal documentation, while other values are supported, the
correct function of the MDIO bus is not assured hence add only the
suggested supported values to the property enum.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
---
.../devicetree/bindings/net/qcom,ipq4019-mdio.yaml | 10 ++++++++++
1 file changed, 10 insertions(+)
Comments
> + clock-frequency: > + description: > + The MDIO bus clock that must be output by the MDIO bus hardware, if > + absent, the default hardware values are used. > + > + MDC rate is feed by an external clock (fixed 100MHz) and is divider > + internally. The default divider is /256 resulting in the default rate > + applied of 390KHz. > + enum: [ 390625, 781250, 1562500, 3125000, 6250000, 12500000 ] Hi Christian 802.3 says the clock should be up to 2.5MHz by default. So the nearest would be 1562500. Please document that if not set, it defaults to this. And make the driver actually default to that. Andrew
On Wed, Jan 24, 2024 at 11:23:05PM +0100, Andrew Lunn wrote: > > + clock-frequency: > > + description: > > + The MDIO bus clock that must be output by the MDIO bus hardware, if > > + absent, the default hardware values are used. > > + > > + MDC rate is feed by an external clock (fixed 100MHz) and is divider > > + internally. The default divider is /256 resulting in the default rate > > + applied of 390KHz. > > + enum: [ 390625, 781250, 1562500, 3125000, 6250000, 12500000 ] > > Hi Christian > > 802.3 says the clock should be up to 2.5MHz by default. So the nearest > would be 1562500. Please document that if not set, it defaults to > this. And make the driver actually default to that. > As I said, this is very fk up and default value is 390KHz unless anyone in the chain sets it (sometime uboot does it but it's not that common... default qsdk uboot doesn't do that for example)... Ok I have to change this to default to 1562500.
On Wed, Jan 24, 2024 at 11:27:20PM +0100, Christian Marangi wrote: > On Wed, Jan 24, 2024 at 11:23:05PM +0100, Andrew Lunn wrote: > > > + clock-frequency: > > > + description: > > > + The MDIO bus clock that must be output by the MDIO bus hardware, if > > > + absent, the default hardware values are used. > > > + > > > + MDC rate is feed by an external clock (fixed 100MHz) and is divider > > > + internally. The default divider is /256 resulting in the default rate > > > + applied of 390KHz. > > > + enum: [ 390625, 781250, 1562500, 3125000, 6250000, 12500000 ] > > > > Hi Christian > > > > 802.3 says the clock should be up to 2.5MHz by default. So the nearest > > would be 1562500. Please document that if not set, it defaults to > > this. And make the driver actually default to that. > > > > As I said, this is very fk up and default value is 390KHz unless anyone > in the chain sets it (sometime uboot does it but it's not that common... > default qsdk uboot doesn't do that for example)... Ok I have to change > this to default to 1562500. I doubt you will cause any regression by defaulting to 2.5HHz instead. That is what the standard says it should be. All devices on the bus should support that. Andrew
On 24/01/2024 22:36, Christian Marangi wrote: > Document support for clock-frequency and add details on why this > property is needed and what values are supported. .. > + clock-frequency: > + description: > + The MDIO bus clock that must be output by the MDIO bus hardware, if > + absent, the default hardware values are used. > + > + MDC rate is feed by an external clock (fixed 100MHz) and is divider > + internally. The default divider is /256 resulting in the default rate > + applied of 390KHz. > + enum: [ 390625, 781250, 1562500, 3125000, 6250000, 12500000 ] default: 390625 Best regards, Krzysztof
diff --git a/Documentation/devicetree/bindings/net/qcom,ipq4019-mdio.yaml b/Documentation/devicetree/bindings/net/qcom,ipq4019-mdio.yaml index 3407e909e8a7..603dbfb95ac9 100644 --- a/Documentation/devicetree/bindings/net/qcom,ipq4019-mdio.yaml +++ b/Documentation/devicetree/bindings/net/qcom,ipq4019-mdio.yaml @@ -44,6 +44,16 @@ properties: items: - const: gcc_mdio_ahb_clk + clock-frequency: + description: + The MDIO bus clock that must be output by the MDIO bus hardware, if + absent, the default hardware values are used. + + MDC rate is feed by an external clock (fixed 100MHz) and is divider + internally. The default divider is /256 resulting in the default rate + applied of 390KHz. + enum: [ 390625, 781250, 1562500, 3125000, 6250000, 12500000 ] + required: - compatible - reg