Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp28084rwn; Wed, 14 Sep 2022 15:21:04 -0700 (PDT) X-Google-Smtp-Source: AA6agR5Jt+kuDau/RrWDL2GL+BO0A/iEl2+Ni7KAeEIem4+5QrDiuoEJngj0U1u4tGAh+PfbyPyn X-Received: by 2002:a05:6402:1d48:b0:44e:c6cf:778 with SMTP id dz8-20020a0564021d4800b0044ec6cf0778mr33193294edb.421.1663194063937; Wed, 14 Sep 2022 15:21:03 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1663194063; cv=pass; d=google.com; s=arc-20160816; b=NdXlHomfrf+4CTbZRz1dRzx8UTn5yUTtcKdF+mn2LJyGsW1CAJe6vqWgpw46fbgQuL zQW26qkTUuA/GFwfkh8uvr0FeaqGjVGsoPUWi9VGgBTFVjfyVChj5vGit+WDai3U2rLl +F1Prpq1nOqySZlN1jyqmMw8bTC9i0ZpwZHa0XoU/T2GKz+6/XoLIhtWEkvAOxfjq1kx fX+TB4lPR3laxrOXYfh+rFPixzjp2ZmPDnC0weAdWh8S/dylMhbhjw4cZqm5HST7gO6Y NEdWSDr3mGe+kS/PKmDxHavqBzCV2x71G44B4fvPsUk6t664obXjSe6fpANrnuOdGeEr Z4Bg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:subject:from:to :content-language:user-agent:mime-version:date:message-id :dkim-signature; bh=wT2zYWTahB2Hz1fERK10MZ0PBJ20Nx8YM0Tg8v/iXO4=; b=CgbdpD8LNNI2bn2vFilhv3BYmu4YAkRG/ep2GL814yq1CGDAGnt8driPjQuPI1LXcG GEsn6TCUNMETLV7792cHVGQPmevmXT3ryxDlVGcpRtBTE71izFYU3B3eeFThIr+L1mcX bcJdeTYQMvyHsf0lfhQ/FJitSsrCqozwskDWno1N2qYYwg1H3gBWBbEImwzLNyih97Hr tbes3Tux0N44AzxUJfjWV/OISDuiYqkWM2Gk9Sb168Uaq3pUL73sqxvjKsngx1fA+RIa JXQBPSspsC41JV/AcGxwSRgTjZrlYKf1qi6Y8MV59tnJbSxWCN3vPp6eU4Wpo7ICq8QF Rm3Q== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@arinc9.com header.s=zmail header.b=GcPHFdRo; 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-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d24-20020a056402401800b00448db2ab374si12190900eda.596.2022.09.14.15.20.27; Wed, 14 Sep 2022 15:21:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@arinc9.com header.s=zmail header.b=GcPHFdRo; 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-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229601AbiINWHx (ORCPT + 99 others); Wed, 14 Sep 2022 18:07:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42872 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229528AbiINWHw (ORCPT ); Wed, 14 Sep 2022 18:07:52 -0400 Received: from sender4-op-o14.zoho.com (sender4-op-o14.zoho.com [136.143.188.14]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8DA7261B21; Wed, 14 Sep 2022 15:07:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663193240; cv=none; d=zohomail.com; s=zohoarc; b=ntOIGx6DEiNzbOLb4pSvnlDrwadQx/sqQvkTn0B01mZTh5t+v9tkVAbcGOx10bKe0KDBgDHTbBAU2aKzAYQQyQhwu+D6mMiTF6UnDbW5wG4epmz5WGFWz/GZ8ZI1c/qP2pCY/TKmE2p5spoPghm4DGO/ewU/Q5lJngj1BCN1Pdo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1663193240; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:MIME-Version:Message-ID:Subject:To; bh=wT2zYWTahB2Hz1fERK10MZ0PBJ20Nx8YM0Tg8v/iXO4=; b=ghcw1E29GCXXpZMrL0P4FNH40Iy3EmC841VXMfXPQPzyX8HAGkjobnmIq7WH7V61/I5AC7ju/ZSQVFApJKaH7Aep1vLRtylc8/SCXsFEK16h9S6AapgyVWKFe98KTpriS1Zni11tM8cdv5TBUXREff87CqJPR2+yGDFV0+r0MN0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=arinc9.com; spf=pass smtp.mailfrom=arinc.unal@arinc9.com; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1663193240; s=zmail; d=arinc9.com; i=arinc.unal@arinc9.com; h=Message-ID:Date:Date:MIME-Version:To:To:From:From:Subject:Subject:Cc:Cc:Content-Type:Content-Transfer-Encoding:Message-Id:Reply-To; bh=wT2zYWTahB2Hz1fERK10MZ0PBJ20Nx8YM0Tg8v/iXO4=; b=GcPHFdRoV+srWMetz2fvUwz4hW4rIha7SCrpohTy+nBygwDsseG4/Lc/HKZgabvJ YA7ppvK0hhNea41lGeKlTBqr6FMd/Woo87LyH/1S0rGfUge3MJdpUPZ83B/saXUlH7t 5T7x/gLYKnvRkd8U1cTVIE7BeKQhbAImM6E99pRI= Received: from [10.10.10.3] (37.120.152.236 [37.120.152.236]) by mx.zohomail.com with SMTPS id 1663193239443950.6869432993643; Wed, 14 Sep 2022 15:07:19 -0700 (PDT) Message-ID: <0e3ca573-2190-57b0-0e98-7f5b890d328e@arinc9.com> Date: Thu, 15 Sep 2022 01:07:13 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Content-Language: en-US To: netdev , Linux ARM , "moderated list:ARM/Mediatek SoC support" , linux-kernel From: =?UTF-8?B?QXLEsW7DpyDDnE5BTA==?= Subject: Move MT7530 phy muxing from DSA to PHY driver Cc: Thibaut , Andrew Lunn , Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Sean Wang , Landen Chao , DENG Qingfang , Vivien Didelot , Florian Fainelli , Vladimir Oltean , Matthias Brugger , Philipp Zabel , Sergio Paracuellos Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-ZohoMailClient: External X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello folks. MediaTek MT7530 switch has got 5 phys and 7 gmacs. gmac5 and gmac6 are treated as CPU ports. This switch has got a feature which phy0 or phy4 can be muxed to gmac5 of the switch. This allows an ethernet mac connected to gmac5 to directly connect to the phy. PHY muxing works by looking for the compatible string "mediatek,eth-mac" then the mac address to find the gmac1 node. Then, it checks the mdio address on the node which "phy-handle" on the gmac1 node points to. If the mdio address is 0, phy0 is muxed to gmac5 of the switch. If it's 4, phy4 is muxed. https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/tree/drivers/net/dsa/mt7530.c?id=1f9a6abecf538cc73635f6082677a2f4dc9c89a4#n2238 Because that DSA probes the switch before muxing the phy, this won't work on devices which only use a single switch phy because probing will fail. I'd like this operation to be done from the MediaTek Gigabit PHY driver instead. The motives for this change are that we solve the behaviour above, liberate the need to use DSA for this operation and get rid of the DSA overhead. Would a change like this make sense and be accepted into netdev? Arınç