Received: by 2002:ab2:69cc:0:b0:1f4:be93:e15a with SMTP id n12csp1919356lqp; Tue, 16 Apr 2024 01:33:13 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUAFmt/flonkC/GTeziK2pxOmv1j3DEgasMfgcHrbYm7ZREZFontAsMpcnMAyEqOYkhJSxZUF61CohktZeg6aaG4M/FcXp187f1fhQm9w== X-Google-Smtp-Source: AGHT+IEbLRkP1idUs7oFQ8G5h1Vu6rM+GchEJUkqDI7DRaZSM70PbxGAtnKIteEQ76M0iAwUo0Mt X-Received: by 2002:a05:6808:1448:b0:3c3:de8e:5411 with SMTP id x8-20020a056808144800b003c3de8e5411mr16851048oiv.38.1713256393734; Tue, 16 Apr 2024 01:33:13 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713256393; cv=pass; d=google.com; s=arc-20160816; b=mqBLf4eKvdi1fqiofhvzIWDIWOzT1CGK/XL5NAq3JKsDmSOCECdEDqTrWDhbmWoPe/ Fju3oRQ9qj8kwMFOvuQuC5767uKvmSVIQrBpIvrWsuN+iQEsHG9oVV9IEfftobGzc3I4 1/1Vj5cLBmPeMgk4TG9PMEnLAvIONzwP3g9IB8h0GM4KwY5t/UyW5nxF56OxOxXWBp0i +qtf9rmsyxJH6Yy25VGOkx8aRkQo9Zpg7D3eVUvtRSUqtOqeNAczt95ePygNin4zoDXu AIvqk/hcDJ/dNdlxbNlxdVJPJ/+EX2++LVSVeb3+q/Qz6oXBlOC3FaWoxU2wZ4iFBlzK 4iBQ== 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=m566RVi6Hjc4VyINZc6IMhS42+xhOl1ARnyrIuF1SbM=; fh=Cd/JtOmwlZDRZgr00E2WUf3w2HLPbgHmMDPrriza8EQ=; b=mqkN76aPp46cty7VIkKrlbA1D7jTQx8vyfGYVsHrTS6DC7n8dSMDQNWBudj16o1N3h 8fOKPvWUvm/ZPa549qR6r9C45053kMZKliUVpKip58jbp36leF9cW6387qeRu81FHASD pUxA28C4WLuVjB3TagMiJuXN0/eXFqr06GS5rz/ndZEw6ffqFxuWg5Dt2KNPixe4O3ER oH1NFq0sOgMRUZPE3elKkx4QeZUtrP0Iv713x5IRK+tLpo/IrFf4XoFd+V5LcyRC8zlP of2htE/PtVjvhor+L9q6s93UP6LfD0jpqD8mplsj1SPxZ1rjxcUL87eLJKkzl/PZlHIC b5Fg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@arinc9.com header.s=gm1 header.b=SXiPD9tA; arc=pass (i=1 spf=pass spfdomain=arinc9.com dkim=pass dkdomain=arinc9.com dmarc=pass fromdomain=arinc9.com); spf=pass (google.com: domain of linux-kernel+bounces-146500-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-146500-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arinc9.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 b22-20020a637156000000b005dbefa1fb3asi9660799pgn.578.2024.04.16.01.33.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Apr 2024 01:33:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-146500-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=@arinc9.com header.s=gm1 header.b=SXiPD9tA; arc=pass (i=1 spf=pass spfdomain=arinc9.com dkim=pass dkdomain=arinc9.com dmarc=pass fromdomain=arinc9.com); spf=pass (google.com: domain of linux-kernel+bounces-146500-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-146500-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arinc9.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 6513F281A71 for ; Tue, 16 Apr 2024 08:33:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A122A82D82; Tue, 16 Apr 2024 08:33:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=arinc9.com header.i=@arinc9.com header.b="SXiPD9tA" Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [217.70.183.197]) (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 3314B3EA7B; Tue, 16 Apr 2024 08:32:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.197 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713256384; cv=none; b=PDIIhO58g48SNRnQ0xD/0BV3ig8mv0oBae5L5aUrzd7Ur6W/yJdckC7jGQt1LSBQ+hI2JZV5IdrPTLCRuqszxrC+b6tnS3cPawXmyGoGwapTszzEOp3XSdj0Pj7eWRox4D8b9opShE9E0bMnD/1LSV6oqwOjGi0/05rv4FtbLpI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713256384; c=relaxed/simple; bh=lflb0pIufUXxyIEvkfnw/gPvn4JiT4OjGBMvQmX6qxk=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=n94Bjpl5jAblhaCbpUY7CDmAJikp4NoeYYN6f0DxQTKSFItDPgyMQjxqv+YejL5hB44ZdXA+ZGIhJ5teXyvGQBlxsVxg4T9OxyM+5M3ydAScrkDTWfMMcdEevlxEPdwsIjnCkl+XWtCCB5tpLSf0+ZglMxKUs7F1t1bL8WCQfdU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arinc9.com; spf=pass smtp.mailfrom=arinc9.com; dkim=pass (2048-bit key) header.d=arinc9.com header.i=@arinc9.com header.b=SXiPD9tA; arc=none smtp.client-ip=217.70.183.197 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arinc9.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arinc9.com Received: by mail.gandi.net (Postfix) with ESMTPSA id EE1FD1C0009; Tue, 16 Apr 2024 08:32:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arinc9.com; s=gm1; t=1713256375; 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=m566RVi6Hjc4VyINZc6IMhS42+xhOl1ARnyrIuF1SbM=; b=SXiPD9tA3i+YVZj1nSoulZISksMVUPC9CQbgwO1PiVLiguE+LcuIS0qBfzixGRc6j1xhi8 uHlSIWDTTgF9NgPoZmZVWz3UbBplGE0SEwWD8uV/dz1mJu2vgjF/uiboHYWpd7dkgcNdRf WtN3t/O3N9yp+lfpAQUvgCmhXpe9ofeAPmn8o9JGkoOiyR82NwHPluSG1W/ARFWQ/IUAZU RyxVW7rNmzpEU1pZvtOnNXCSpcisSn0AnWaZDO3/CwnLH7Qcyo7NgQJQ7l3O/9WtY3MX2r T/8TcK3bBxBkX140iMJJHuBG3qUoOZERTbl3FFLHznSEszmBgZZjXcFWdMI7HQ== Message-ID: <7d0ded52-14f0-4f6a-b639-72f537603be8@arinc9.com> Date: Tue, 16 Apr 2024 11:32:49 +0300 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 v2 1/2] net: dsa: mt7530-mdio: read PHY address of switch from device tree Content-Language: en-US To: Florian Fainelli , Daniel Golle , DENG Qingfang , Sean Wang , Andrew Lunn , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Matthias Brugger , AngeloGioacchino Del Regno Cc: Bartel Eerdekens , mithat.guner@xeront.com, erkin.bozoglu@xeront.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org References: <20240414-b4-for-netnext-mt7530-phy-addr-from-dt-and-simplify-core-ops-v2-0-1a7649c4d3b6@arinc9.com> <20240414-b4-for-netnext-mt7530-phy-addr-from-dt-and-simplify-core-ops-v2-1-1a7649c4d3b6@arinc9.com> <459b31bd-64b3-4804-bc5a-c8ffd145e055@gmail.com> From: =?UTF-8?B?QXLEsW7DpyDDnE5BTA==?= In-Reply-To: <459b31bd-64b3-4804-bc5a-c8ffd145e055@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-GND-Sasl: arinc.unal@arinc9.com On 15/04/2024 18:30, Florian Fainelli wrote: > > > On 4/13/2024 11:07 PM, Arınç ÜNAL via B4 Relay wrote: >> From: Arınç ÜNAL >> >> Read the PHY address the switch listens on from the reg property of the >> switch node on the device tree. This change brings support for MT7530 >> switches on boards with such bootstrapping configuration where the switch >> listens on a different PHY address than the hardcoded PHY address on the >> driver, 31. >> >> As described on the "MT7621 Programming Guide v0.4" document, the MT7530 >> switch and its PHYs can be configured to listen on the range of 7-12, >> 15-20, 23-28, and 31 and 0-4 PHY addresses. >> >> There are operations where the switch PHY registers are used. For the PHY >> address of the control PHY, transform the MT753X_CTRL_PHY_ADDR constant >> into a macro and use it. The PHY address for the control PHY is 0 when the >> switch listens on 31. In any other case, it is one greater than the PHY >> address the switch listens on. >> >> Reviewed-by: Daniel Golle >> Tested-by: Daniel Golle >> Signed-off-by: Arınç ÜNAL > > Reviewed-by: Florian Fainelli > > I would go a step further and name phy_addr switch_mdio_addr, or something along those lines to clearly denote this is not a per-port PHY address neither a proper PHY device, but we've already had a similar discussion before about spelling this out clearly as a "pseudo PHY".... I am fine with calling the switch operating on an MDIO bus a psuedo-PHY. But I don't believe this grants making up names on our own instead of using the name described in IEEE Std 802.3-2022. The switch listens on a PHY address on the MDIO bus. The description for the phy_addr member of the mt753x_info structure clearly explains that so I don't see a reason to change the variable name. Arınç