Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp1673976rwl; Sun, 26 Mar 2023 07:09:33 -0700 (PDT) X-Google-Smtp-Source: AKy350Z+2lC89d7ojSjjuMrdLV6Uw7sGZ+QBn62WBblWuDn8ASbjsDYuWgZHRoyRc1kbB7h2fNO7 X-Received: by 2002:a17:902:cec1:b0:1a1:aa28:e67a with SMTP id d1-20020a170902cec100b001a1aa28e67amr10843142plg.48.1679839772861; Sun, 26 Mar 2023 07:09:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679839772; cv=none; d=google.com; s=arc-20160816; b=op66xU0jPSkNpCWl3WRHe4r48eoDn0kVPGZvDTCiTk+tDKzyJwNlen4+tbW5WJ4yHd OjYCT1a+VLyzgSo4NFqelLfbB9uLIOAYMeW/K8TbQBpieLfNsxYAPnAyy/TOYSn5tA1M aViZLyKu33kEZksrY5HxF/RAn0nxRzupl67amjdGzu/0NN4KfPYfTuyJlz/pvho7Aanx 1KMNAy+0HtlhgRL8uqyFJoAC5Fja80VYT7fKP9cVgO55YgAb+CNpdR1hX8KfWG1yL1pg x9Z2wbn2yMiT9yxwFSPBDWa60qaN7+276pqwmmni19o1ApZq0W3p+2DKqEq96E8OA2ke RyJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=haZ/N5nW5Plmc5DWgnjdDixWfP9wBSD924tPnZWCLZY=; b=XLkGZdEiH1XX7eGfcFjg26Gw3r7U+wEiAm4gfpk3M7jGozNtQh/U+2+kYreInsXvHY OeXDrHSV01vNioFjNj13MijQLoCR6zR60dkbxQ8sG/Z4NgtAISdi8xo5tdPaewthgOPD Sn9YBlmmmq5ex44zkrNhNx7gAttvDGGULGtCTkG2Y8kKoT8euZCwyd7e2w7f5c4mm5fp zMdwh5401ShY/7H6EcVeIXeZIOTe337hRTx8pxygGWROQgyxjoEcJHFp04Hruf7ba3Wv UeDqpgXIUhI+GNJt2gY69o/P9AgRaGkF3/okczTP7wJuH37Tv8fFXq71OFmOLzcvodlD TeIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=KucRiVZK; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n16-20020a170902d2d000b001a206785ee3si7897705plc.462.2023.03.26.07.09.21; Sun, 26 Mar 2023 07:09:32 -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=@gmail.com header.s=20210112 header.b=KucRiVZK; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230312AbjCZOI3 (ORCPT + 99 others); Sun, 26 Mar 2023 10:08:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41040 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229771AbjCZOI2 (ORCPT ); Sun, 26 Mar 2023 10:08:28 -0400 Received: from mail-qv1-xf2e.google.com (mail-qv1-xf2e.google.com [IPv6:2607:f8b0:4864:20::f2e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 774FC1FE3; Sun, 26 Mar 2023 07:08:27 -0700 (PDT) Received: by mail-qv1-xf2e.google.com with SMTP id m16so5026773qvi.12; Sun, 26 Mar 2023 07:08:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679839706; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=haZ/N5nW5Plmc5DWgnjdDixWfP9wBSD924tPnZWCLZY=; b=KucRiVZKGuHD9i5gaGDTj2xSbZILOQZV1N1mWfqtpS1NCJ+27lQ1bokAIsc0qSTeo8 7rX6aOdI0sIVLoK12RmCm54E3zEIbzmssCpIPNNdqhvIXfc23rzMt7cdNQi0DH1lyBly iKI4Bxrc5ViufogV6StNXc/+yfdHrRxruihgsczl5vWVzxOoH+tt0KSed1/8C71hpGyt Bhl4OrnRSWmsdnMxzK7F4phiRPDPzF9bl270sT5c5A2i79xpY97ZPP3oA+HJMNbGWonW mFMRISxOQd7j0YDu5EO2CX8UncmMDEOOHnFbtzbXGGeEqOrNZAMU2Pe/ZBlSipo8RWG0 uJ6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679839706; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=haZ/N5nW5Plmc5DWgnjdDixWfP9wBSD924tPnZWCLZY=; b=vyRvsUf5FkBxw9MWHcBnwH/h3JNP/V09TKbvqe4xxalIxM9wqD1FqMVl4beZQxcMQS 3jNW/qRmp5zL0QD+HEUrbFNsU9g3ZNO3hBLyHwXYvIimbzZEssPKYeHL7//Yi1fX8pHM indG9f9UwBOsM9ZwdcqurnHIRZO366P2bH7CwE5EqORjcFNm+IDCFdRod5iT9kqArkFC gw56QN/xUDbGwxSMyisiT0T0CWocUymUuZHcVNkKh9Iu9k2chAXbI2rSnWZJsEYMppyA Iv5bzOQOjCDsbEVMSzi+7djv5m/0vTJM/wrv+sb9/+ZIvSqoIHTu4lJkvDdM5/MM8G/0 uzIA== X-Gm-Message-State: AAQBX9fc0sY8ucWKJnMSlj/myQy31abMV+UhxhSHd7LlGgecmSQzwrXC FoCnjdsGRymMLisOiAx7IJM= X-Received: by 2002:ad4:5b82:0:b0:5b7:9d44:8dd8 with SMTP id 2-20020ad45b82000000b005b79d448dd8mr14559105qvp.20.1679839706435; Sun, 26 Mar 2023 07:08:26 -0700 (PDT) Received: from arinc9-PC.lan ([149.91.1.15]) by smtp.gmail.com with ESMTPSA id j5-20020a0ce6a5000000b005dd8b93458esm2212220qvn.38.2023.03.26.07.08.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Mar 2023 07:08:26 -0700 (PDT) From: arinc9.unal@gmail.com X-Google-Original-From: arinc.unal@arinc9.com To: Sean Wang , Landen Chao , DENG Qingfang , Andrew Lunn , Florian Fainelli , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Matthias Brugger , AngeloGioacchino Del Regno , Russell King , =?UTF-8?q?Ren=C3=A9=20van=20Dorst?= Cc: Russell King , Landen Chao , Ilya Lipnitskiy , Richard van Schagen , Richard van Schagen , Frank Wunderlich , =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= , erkin.bozoglu@xeront.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: [PATCH 0/7] net: dsa: mt7530: fix port 5 phylink, phy muxing, and port 6 Date: Sun, 26 Mar 2023 17:08:11 +0300 Message-Id: <20230326140818.246575-1-arinc.unal@arinc9.com> X-Mailer: git-send-email 2.37.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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! This patch series is mainly focused on fixing the support for port 5 and setting up port 6. The only missing piece to properly support port 5 as a CPU port is the fixes [0] [1] [2] from Richard. Russell, looking forward to your review regarding phylink. I have very thoroughly tested the patch series with every possible mode to use. I'll let the name of the dtb files speak for themselves. MT7621 Unielec: only-gmac0-mt7621-unielec-u7621-06-16m.dtb rgmii-only-gmac0-mt7621-unielec-u7621-06-16m.dtb only-gmac1-mt7621-unielec-u7621-06-16m.dtb gmac0-and-gmac1-mt7621-unielec-u7621-06-16m.dtb phy0-muxing-mt7621-unielec-u7621-06-16m.dtb phy4-muxing-mt7621-unielec-u7621-06-16m.dtb port5-as-user-mt7621-unielec-u7621-06-16m.dtb tftpboot 0x80008000 mips-uzImage.bin; tftpboot 0x83000000 mips-rootfs.cpio.uboot; tftpboot 0x83f00000 $dtb; bootm 0x80008000 0x83000000 0x83f00000 MT7623 Bananapi: only-gmac0-mt7623n-bananapi-bpi-r2.dtb rgmii-only-gmac0-mt7623n-bananapi-bpi-r2.dtb only-gmac1-mt7623n-bananapi-bpi-r2.dtb gmac0-and-gmac1-mt7623n-bananapi-bpi-r2.dtb phy0-muxing-mt7623n-bananapi-bpi-r2.dtb phy4-muxing-mt7623n-bananapi-bpi-r2.dtb port5-as-user-mt7623n-bananapi-bpi-r2.dtb tftpboot 0x80008000 arm-uImage; tftpboot 0x83000000 arm-rootfs.cpio.uboot; tftpboot 0x83f00000 $dtb; bootm 0x80008000 0x83000000 0x83f00000 Current CPU ports setup of MT7530: mt7530_setup() -> mt7530_setup_port5() mt753x_phylink_mac_config() -> mt753x_mac_config() -> mt7530_mac_config() -> mt7530_setup_port5() -> mt753x_pad_setup() -> mt7530_pad_clk_setup() sets up port 6, rename to mt7530_setup_port6() How it will be with the patch series: mt7530_setup() -> mt7530_setup_port5() runs if the port is not used as a CPU or user port mt753x_phylink_mac_config() -> mt753x_mac_config() -> mt7530_mac_config() -> mt7530_setup_port5() -> mt7530_setup_port6() CPU ports setup of MT7531 for reference: mt7531_setup() -> mt753x_cpu_port_enable() -> mt7531_cpu_port_config() -> mt7531_mac_config() -> mt7531_rgmii_setup() -> mt7531_sgmii_setup_mode_an() -> etc. mt753x_phylink_mac_config() -> mt753x_mac_config() -> mt7531_mac_config() -> mt7531_rgmii_setup() -> mt7531_sgmii_setup_mode_an() -> etc. [0] https://lore.kernel.org/netdev/20230212213949.672443-1-richard@routerhints.com/ [1] https://lore.kernel.org/netdev/20230212215152.673221-1-richard@routerhints.com/ [2] https://lore.kernel.org/netdev/20230212214027.672501-1-richard@routerhints.com/ Arınç Arınç ÜNAL (7): net: dsa: mt7530: fix comments regarding port 5 and 6 for both switches net: dsa: mt7530: fix phylink for port 5 and fix port 5 modes net: dsa: mt7530: do not run mt7530_setup_port5() if port 5 is disabled net: dsa: mt7530: set both CPU port interfaces to PHY_INTERFACE_MODE_NA net: dsa: mt7530: set up port 5 before CPU ports are enabled net: dsa: mt7530: call port 6 setup from mt7530_mac_config() net: dsa: mt7530: remove pad_setup function pointer drivers/net/dsa/mt7530.c | 154 +++++++++++++++++++----------------------- drivers/net/dsa/mt7530.h | 3 - 2 files changed, 70 insertions(+), 87 deletions(-)