Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp5648003rwi; Tue, 18 Oct 2022 02:02:24 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4YGY5gBWgfxS92bGciaeT0NlmPhZmLrzKs59iw2yG9hMMSjDtqWZM8nwdUvevYzgAkBxBK X-Received: by 2002:a17:907:a047:b0:78d:b8ac:765d with SMTP id gz7-20020a170907a04700b0078db8ac765dmr1521239ejc.631.1666083744086; Tue, 18 Oct 2022 02:02:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666083744; cv=none; d=google.com; s=arc-20160816; b=PfDWMiJTZl7EsAbSWUz5Yo0Zcqx5CWgxgsRLPC2LiDyh7/CbS/Q33HOW5KEVQhbUV0 j/SGe6wqJtoRHGv4KG6IGnILdjZDxNcL0jCYRK57TP4CbueFDMaK9h3op7SvnHFGVjy2 3L5QNySeanqe22PtlKkUXvyawdzg8YXnOYLd514GnaRGcSbEJFpXbL1mtxcl7m+w/huh x33YGxYD8p99eKhVGcCBVmcBomMsDMNjtw9FLj1f7GNHccC9ZlX4bg9YLUGv87zQ2zCw Y0ufizcfWfhveT5P+uyt4+B2MTFv2dLznqjkaTT/9PpeBxpJsCqVPnhswsA39EnlK7Nn XROQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=bIyVP0S98Q+cV6lYX+CKx/3vm13O8g2H7ynwT5bXbMk=; b=Cwc+vPNVwDmLjKRh8NPS0OIzubcZoqJFlWncih3aan+RQXqN0Ro9S/U5WL3y34Whdt EDRv5BBdYKSRfwBqBFtAWMP/Lv9PR3QexdrvaDFsQLPFg2/NtOcj6jL5MlQNyKZocSeg yENm1cTa+4etECwPjnQryfx0qn2Wyyi9uyR5dlwL9BMCXFBWhfm2HJ5vKqM+gHMc+yQW mRQfvmysrk+Zb84S11pNHga4afN9zxRd60XOl6ZtLrxs2b3iEvJWP8szRJqVcBdxSBaP VBnpIyxoeQofz5PLlJsjXb10ZxEp3215mqxM5ELgyVrGP0i3wnLRcj04723jzD7otCj9 8vLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=IjA9NDUE; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q13-20020a056402518d00b0045e00384e8asi896790edd.380.2022.10.18.02.01.57; Tue, 18 Oct 2022 02:02:24 -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=@ti.com header.s=ti-com-17Q1 header.b=IjA9NDUE; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230426AbiJRIoI (ORCPT + 99 others); Tue, 18 Oct 2022 04:44:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41042 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231130AbiJRIoB (ORCPT ); Tue, 18 Oct 2022 04:44:01 -0400 Received: from lelv0143.ext.ti.com (lelv0143.ext.ti.com [198.47.23.248]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CB0D33D591; Tue, 18 Oct 2022 01:44:00 -0700 (PDT) Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 29I8hnPo039205; Tue, 18 Oct 2022 03:43:49 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1666082629; bh=bIyVP0S98Q+cV6lYX+CKx/3vm13O8g2H7ynwT5bXbMk=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=IjA9NDUEWYjKjA58f6Zbfdx/IlPhGdhXbWNmOkju7Gpe9sagl5C9IA4/xTp9PsG3I sOLaX1Va/LCXCiNmGcIPguzP7Uw6PwYyvjsWrpf1+BRpgMbdt63Ckoohb1j/upLZec zxKJpCQSI8sM11PtlnwVa0jUM89Ng56nrP7fHfSE= Received: from DFLE106.ent.ti.com (dfle106.ent.ti.com [10.64.6.27]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 29I8hn5g007242 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 18 Oct 2022 03:43:49 -0500 Received: from DFLE107.ent.ti.com (10.64.6.28) by DFLE106.ent.ti.com (10.64.6.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.6; Tue, 18 Oct 2022 03:43:49 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) by DFLE107.ent.ti.com (10.64.6.28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.6 via Frontend Transport; Tue, 18 Oct 2022 03:43:49 -0500 Received: from uda0492258.dhcp.ti.com (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id 29I8hXCS076871; Tue, 18 Oct 2022 03:43:45 -0500 From: Siddharth Vadapalli To: , , , , , , , CC: , , , , Subject: [PATCH v2 3/3] phy: ti: gmii-sel: Add support for CPSW9G GMII SEL in J721e Date: Tue, 18 Oct 2022 14:13:33 +0530 Message-ID: <20221018084333.149790-4-s-vadapalli@ti.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221018084333.149790-1-s-vadapalli@ti.com> References: <20221018084333.149790-1-s-vadapalli@ti.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS 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 Each of the CPSW9G ports in J721e support additional modes like QSGMII. Add a new compatible for J721e to support the additional modes. In TI's J721e, each of the CPSW9G ethernet interfaces can act as a QSGMII main or QSGMII-SUB port. The QSGMII main interface is responsible for performing auto-negotiation between the MAC and the PHY while the rest of the interfaces are designated as QSGMII-SUB interfaces, indicating that they will not be taking part in the auto-negotiation process. Signed-off-by: Siddharth Vadapalli --- drivers/phy/ti/phy-gmii-sel.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/drivers/phy/ti/phy-gmii-sel.c b/drivers/phy/ti/phy-gmii-sel.c index c8f30d2e1f46..8c667819c39a 100644 --- a/drivers/phy/ti/phy-gmii-sel.c +++ b/drivers/phy/ti/phy-gmii-sel.c @@ -218,6 +218,15 @@ struct phy_gmii_sel_soc_data phy_gmii_sel_cpsw5g_soc_j7200 = { .num_qsgmii_main_ports = 1, }; +static const +struct phy_gmii_sel_soc_data phy_gmii_sel_cpsw9g_soc_j721e = { + .use_of_data = true, + .regfields = phy_gmii_sel_fields_am654, + .extra_modes = BIT(PHY_INTERFACE_MODE_QSGMII), + .num_ports = 8, + .num_qsgmii_main_ports = 2, +}; + static const struct of_device_id phy_gmii_sel_id_table[] = { { .compatible = "ti,am3352-phy-gmii-sel", @@ -243,6 +252,10 @@ static const struct of_device_id phy_gmii_sel_id_table[] = { .compatible = "ti,j7200-cpsw5g-phy-gmii-sel", .data = &phy_gmii_sel_cpsw5g_soc_j7200, }, + { + .compatible = "ti,j721e-cpsw9g-phy-gmii-sel", + .data = &phy_gmii_sel_cpsw9g_soc_j721e, + }, {} }; MODULE_DEVICE_TABLE(of, phy_gmii_sel_id_table); -- 2.25.1