Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp3034473rdb; Tue, 13 Feb 2024 05:10:51 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVTxhCcmFv8VmwJ6q8usqPDY4l5VDAjSZDlJka6Cts/JQm5LGKzRuoJpyp4JuF/1KpviLwyB21yZRVeTuEQqGrN7grWGWLix0qgisRa9Q== X-Google-Smtp-Source: AGHT+IH6fs5Hsx32kMfQ0WMthq005MvDFBNM/raZAwU9jZdJS6zVTw0SpY1t8HSCx3NJwu2IfH4o X-Received: by 2002:a17:906:ae96:b0:a3d:25e3:d455 with SMTP id md22-20020a170906ae9600b00a3d25e3d455mr36921ejb.43.1707829851617; Tue, 13 Feb 2024 05:10:51 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707829851; cv=pass; d=google.com; s=arc-20160816; b=a7ASsVTfUUMG388+w5G79TF+M4WzE1uF4vZlxOUKEMQAPmn04V5xV2z/nSubMDH4tW CaYnvXvbglVA19UMIsrsjlXRB6kQp+BEJcgFWF+M2rOztlDDRysYaviB7LOzfmYvG2Bx LrBG83WALXQZHynqz/+tqzt63ex4DJTt2ByS17Bnm2DyNOVgiPQ47U8djYG2QJAPDtEX +evWgurCA7UpAw0aiTHwM8VQd72OHyst3qEO0ufKX8Mv73168nEgTbqddfvOg3aB9NG8 DtJUF8G2RSxfbTbG6YVi2ah5TpxwGM7ciPz0AV557TOAZWmVo+V32fsuR2RsDbuO3cXV XCfw== 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=3ig8/hoTtbhy80ogS8uSOp9SFFQKfTzlGTZZfEqeCAg=; fh=/s0183WfDp3BMBk42XUdR9nLzStEk1jyM2KemAavwyA=; b=A6/xDoONDp8rLAuM1gz2mp8pbJmo9BS0vQYp6fa8vwVxaaTKAv67Rkz3qUmQ0NU9j5 eqN7NpMsZsPqO7y+NMKYiLy14qMPjUuzp1q0g9xayJo/+2TJbwcDeIK5YdILOeh/JD6F ZFVYuw5Q4rDGZ+hTIL8a/i5yjSxHmrsSuu2AEo/MGsc1ON3Pxh/9Jh5gLYRCOVoX4TE+ gQfngUz4DrvLnX1wi4t5KQIDf4H6MEVdEDVN4bsS5zztCDc3vAT9jib5bUwmodzXzUGy axQFOsoifEyzVZrTaRm26eOxcc4esGUu2DjKpQzsRTEtjP56sufXSzwSTXWfgr2KR8Ao KpAg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=uKlKkjZm; 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-63565-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-63565-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch X-Forwarded-Encrypted: i=2; AJvYcCW4T3bmfLAoZF13J1gldRGkqpuyoS1XeDhfx7+I/my93J0eWNOb+72XaggBhw6QZMtb1AgnE+BSZkw0qnhSd6mtGsj7ZLJob1K+iwCz1g== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id bq22-20020a170906d0d600b00a3c5f79bb13si1187429ejb.503.2024.02.13.05.10.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Feb 2024 05:10:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-63565-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=uKlKkjZm; 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-63565-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-63565-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 5CADB1F283B8 for ; Tue, 13 Feb 2024 13:10:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D06A253E13; Tue, 13 Feb 2024 13:10:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="uKlKkjZm" 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 591F253813; Tue, 13 Feb 2024 13:10:41 +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=1707829843; cv=none; b=UkS2jeXmTPxIuNmMUHx4ViU0cCrWS6i+GmOFtiAEtmzL1QbNrSbUzKKl/opGfdT+gW2E5Ln9rb7rglMKOG7EMaJgFLay7P6jpDrYgz8/tNHwd9NgJEe3eNZLd2s/rvNyxcApGrgvp07EjryHbl0jim3stgihSbFuhbHkfrJcYXY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707829843; c=relaxed/simple; bh=ErfgDXhiipWo6UTfivgIO33Glx/+fm68/fY8BAz0NFQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=OGtZAAIALb0WWagDCitn0PIhHaQRRcm7QtlYaEq1VLDSVG3QKAyPXPh8UX5b/SJbYGCtouUBVdOLu5z+Ra4yxVRemjtBtIJinoH/zjjI1JySuvrUdnhMblaQ9Rhe/p7RYzbS1LKVmri91rGwOD2uN2i8olJ81jeid2UJYb0oRVk= 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=uKlKkjZm; 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=3ig8/hoTtbhy80ogS8uSOp9SFFQKfTzlGTZZfEqeCAg=; b=uK lKkjZmcr48PGWo0prm69OS16580SSdihn5yY4dqMcSNq2Ce1aSuVQ0N57nQ+wI+0MqYsDqqZPE22W +vCLS+cssvlk3cEJoJYb/NXQqDJFZcIbWyk3uzq05eiKvBL90iWuzilfpWHD8uZvMjEgSOdMIvSnv u9X4i2Dr5aIclHw=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1rZsYc-007g8X-7T; Tue, 13 Feb 2024 14:10:42 +0100 Date: Tue, 13 Feb 2024 14:10:42 +0100 From: Andrew Lunn To: Michal =?utf-8?B?Vm9rw6HEjQ==?= Cc: Shawn Guo , Fabio Estevam , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Sascha Hauer , Pengutronix Kernel Team , NXP Linux Team , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Jonathan McDowell Subject: Re: [PATCH 1/2] ARM: dts: imx6dl-yapp4: Fix the QCA switch register address Message-ID: References: <1707751422-31517-1-git-send-email-michal.vokac@ysoft.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=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Tue, Feb 13, 2024 at 01:20:44PM +0100, Michal Vokáč wrote: > On 12. 02. 24 17:08, Andrew Lunn wrote: > > On Mon, Feb 12, 2024 at 04:23:41PM +0100, Michal Vokáč wrote: > > > The switch address in the node name is in hex while the address in the reg > > > property is decimal which is wrong. Fix that and write the reg address > > > as a hexadecimal number. > > > > This feels the wrong way around. The reg value is used by the kernel, > > where as the node name is not. If the reg value was wrong, the switch > > would not be found. If this file was tested, why did somebody not > > notice the switch was missing? > > > > Do you have the hardware? Can you confirm is really does not work > > without this patch? Was 15b43e497ffd never actually tested? > Yes, I have bunch of these boards all around my desk - we manufacture > them. I am pretty sure I tested all the patches I have ever sent to > the mailing list regarding these boards. > > The fact is that the switch actually works regardless of the reg value. > It worked prior to the 15b43e497ffd commit with address 0, it worked > later on with the reg value 10 and it works now with reg value 0x10. Ah, so that is the missing piece of information from the commit message. That the reg value does not actually matter. Hence it is safe to change it. Please reword the commit message. > I admit that my understanding of the MDIO bus and addressing of > the connected external/internal devices is pretty limited. I have no > answer to why it works like that but as you brought up your questions > I would actually like to know as well. My guess is, the switch assumes it has full access to all the addresses on the bus. It probably uses a subset, but that subset is hard coded. But the MDIO DT binding requires a valid reg value, so something has to be used. There are some devices which use a single address on the bus. The mv88e6xxx can be strapped into such a mode, so you can have multiple switches on the bus. The reg value is then used. But you can also strap it so it takes over the whole bus, and uses #num_ports + 3 addresses on the bus, and those addresses are hard coded in the silicon, so the reg value is ignored. Andrew --- pw-bot: cr