Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp3073050rdb; Tue, 13 Feb 2024 06:14:48 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVy8uY5S+OWw7mYSv4u8idp9QFmbkFu2KgDV/jbA1Ci50L+zHAY/pvK6BPqO75CfbsrEGXwBwdsLTueC9/ibj4me3EyNIHPktQiZ46SkA== X-Google-Smtp-Source: AGHT+IEoyno/VTicIuPn/N77hpcToB4XoVhtDNL3DmFSDUGusKdihDIlkzXYks4H9EV8cc4/WMJM X-Received: by 2002:a0c:f30a:0:b0:68e:f6c3:dc0f with SMTP id j10-20020a0cf30a000000b0068ef6c3dc0fmr630210qvl.3.1707833688097; Tue, 13 Feb 2024 06:14:48 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707833688; cv=pass; d=google.com; s=arc-20160816; b=BHqNH0CFUCbxSrEMYcV83jt3bC97fkhv1gTgyp0/DElvt7GHRR4c6cFB1+SjqAGKIC LrUtHq/dgZdcAxt93CdQs0JhOPTmsQ0CW0HUEVLFhBrfQOVhHfdIMb5/HH9bhXrZTRch mgRzZtM9LS9Op7mjH7r+wopwluUA3QkJJ+CQUsCPaOave/tZZfZjJOBEJ0uomAG6uB4a WZwOL041Nwm8ouXug+uZ0rx+kwlbQK9yEviWkrwNvpdgW/k9jvD01T1uxaB/5KyUe6Ys 7pmlL6J7x57VrO4vEZmCABSBZbbyYMFWDYxyf2aIjVsy3cJBDrnmPSOV0bcuEfKsaJv1 BopA== 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:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=fZ0nzxrMD3UebTkjOZJU+F8PQH7/KEhE5YGFJr9E2uw=; fh=xJogJCH8+KJzDBI1UJLSU4LClTrQpiDlSYdmqWDq9TU=; b=ovFQgBMNVO83YTY6tNmTXqGN4xEEIrKEJhKpU7au7j7rgcw4qhN0g+TxVIAAcL4Kzl 8QBwQPRk0glDWrmm9L7gqUfFDge1r5f71rs7T76lKd34MQrn54+5AC8KOXqc0zPhxkx/ qbmpC/eawQx6jQGHhvMY5RTnd/HPYCKqI8Q45HfNibZRv0yuoHi5mhQqc56/AKDvle4f bu6Q92F9ZmzGHYuFF3FnL3WuQA24ygmM2wrcZnKJVH097rRrBiAPJUQfy8QfFcXtgrNV UyrFhz7LmMFX2nKBRa9YfelSTAE9ZR5Ypow3KiLXTLGU8UyATyRrAqcxsgoOv/ydcz90 358Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass (test mode) header.i=@ysoft.com header.s=20160406-ysoft-com header.b=ge547K3M; arc=pass (i=1 spf=pass spfdomain=ysoft.com dkim=pass dkdomain=ysoft.com dmarc=pass fromdomain=ysoft.com); spf=pass (google.com: domain of linux-kernel+bounces-63650-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-63650-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=ysoft.com X-Forwarded-Encrypted: i=2; AJvYcCV/DP5MVio5/pnhqQVKtIIKXNzaZ2edAA0Ngd8ScU1tVaBqZe/XDtyFzSdrhBqLdtQXIK0lSbiQSudqiwbm0B8fh9OZPhFbHHXbYcJR4A== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id j8-20020a05621419c800b0068c897ab66asi3040794qvc.165.2024.02.13.06.14.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Feb 2024 06:14:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-63650-linux.lists.archive=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 (test mode) header.i=@ysoft.com header.s=20160406-ysoft-com header.b=ge547K3M; arc=pass (i=1 spf=pass spfdomain=ysoft.com dkim=pass dkdomain=ysoft.com dmarc=pass fromdomain=ysoft.com); spf=pass (google.com: domain of linux-kernel+bounces-63650-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-63650-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=ysoft.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 D04561C24371 for ; Tue, 13 Feb 2024 14:14:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1CDDE5786B; Tue, 13 Feb 2024 14:14:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ysoft.com header.i=@ysoft.com header.b="ge547K3M" Received: from uho.ysoft.cz (uho.ysoft.cz [81.19.3.130]) (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 A9BA856476; Tue, 13 Feb 2024 14:14:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=81.19.3.130 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707833680; cv=none; b=u1XGd+gGUA2lFuwKr3XNGywXfIgZQpmhKSPVWgTXNP+aqQ7M5U3UBiSVESSbdyynYO6UvD5fgOdSkbyCtaVOtUDgm1Hr2yDBq0N7leXY4JfYIj+31r9LeiTAJlxZaqDK/thlQ0qp6ZQISxpZdfEwmdz0/KI+VsicvE+tDDovJK4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707833680; c=relaxed/simple; bh=dN+V2m6PMzxOOJ+eizEB3r3qhqBSFvqLxJESCTceKKw=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=TLTZHw0iNZUaLklrYL7mZC6WaDOSHICtv6igErBrwdTBawReedXzK0yRw6N/MFSKKYkveLNTQPqdT+JNEZWwcr//OCfxCcEvXEj2bFuK2LqSWz4+M7G05cscZMJYMGM/UnIxx702kN/1cDdI8nagvAbQIiDRdjOwb/RS3JZgBIE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ysoft.com; spf=pass smtp.mailfrom=ysoft.com; dkim=pass (1024-bit key) header.d=ysoft.com header.i=@ysoft.com header.b=ge547K3M; arc=none smtp.client-ip=81.19.3.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ysoft.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ysoft.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ysoft.com; s=20160406-ysoft-com; t=1707833676; bh=fZ0nzxrMD3UebTkjOZJU+F8PQH7/KEhE5YGFJr9E2uw=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=ge547K3MJ+bSAVnWd+AHahqVdOUnCd9H9oxO0u7DxnHGxtMMyO2RrzAUfqeCtY4X8 uTS1cferz/R1aRiOlCc33b7HmwqufPOR2Rhcua3Ay9ezp7E2PkL6pZ+l3+vaA/Nmny BYXifV8JvzHE7NF8oKTBe1LNc4FB00Wgz4c2hK04= Received: from [10.1.8.111] (unknown [10.1.8.111]) by uho.ysoft.cz (Postfix) with ESMTP id 74626A0522; Tue, 13 Feb 2024 15:14:36 +0100 (CET) Message-ID: Date: Tue, 13 Feb 2024 15:14:36 +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 1/2] ARM: dts: imx6dl-yapp4: Fix the QCA switch register address To: Andrew Lunn 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 References: <1707751422-31517-1-git-send-email-michal.vokac@ysoft.com> Content-Language: en-US From: =?UTF-8?B?TWljaGFsIFZva8OhxI0=?= In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 13. 02. 24 14:10, Andrew Lunn wrote: > 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 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. OK, I will do so. >> 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. That makes sense. The problem is that the MDIO access and addressing of the QCA8K switch is not well documented in the datasheet. > 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. Ah, yes I am actually aware of that feature on the mv88e6xxx. We use it on newer board revisions. AFAIK the switch is by default strapped to the single chip addressing mode by internal pull-ups. Thank you very much for shedding some light to that topic! Michal