From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.154.123]) (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 DDD703F0775; Tue, 10 Mar 2026 21:23:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=68.232.154.123 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773177812; cv=none; b=MFQOW8kJVT2hcbGjjAegKFIYirxwGl8HSdEpj+EbQ1WRWzuUrt3w/prJ/gxjjZ2F6t6WsiVLTa5a+rQnqhaAfiECE32+INxZfndlLzFUyIcegeU8nAmdyi3xUHkPt5gnEBEaFQHl2g2Zrc20woDudKU9EG3O9Rj1rDFlCrcVoas= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773177812; c=relaxed/simple; bh=VVyrO46ggUtH5dYSmpUwCJwPzHoFuASF4LLfOrCMNKA=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=rWtZZZQW8Ehe1Gyydhg5HqrcBJL26AxXMcFZbJMQ1uHlRvafkSW1p+azuKsaJULWYmlQEsa/Ny9xtqSIPHuQLTZWvJ1gBU/sQIWOLSaLP0vEmCcDbxIbJ8Cs4aY4+ybOosLeaDM2YioP3DfWHCf55z3L0rFJXxtaJlqgDqcd6zc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=microchip.com; spf=pass smtp.mailfrom=microchip.com; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b=J/M7YFWl; arc=none smtp.client-ip=68.232.154.123 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=microchip.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=microchip.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b="J/M7YFWl" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1773177806; x=1804713806; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=VVyrO46ggUtH5dYSmpUwCJwPzHoFuASF4LLfOrCMNKA=; b=J/M7YFWlACbqnE4J+Bfmf7hhg7okviNOfCbCNm/gpopnpgNArJC8JIjl M5SISm6OXTlzzugibEhZx97ZnAnDOGNmjxWDxl1DwYvCp7HhQn+hzKuZt tdai1QeusrjrZmcKpC3Dx0Oh1tPCiG4bgWKA0olUpnVNzr7NTdqavI/Pz soR+BUFmtRXL9hwbxlJx4VTXA3I6Eq6q2oVSlCAYlwgYh+vZk4Bdl7tRi rvJHQDUHOlJJnDGuBU9qkz2E39/fyidDFfF2MDo9C71MAKQyxgutdlkBy XoLIhrEw8oC+YN2usOfUXK2RAJ2AGkaOd2+v9ARX57UzsRTquPVjvH4Fw w==; X-CSE-ConnectionGUID: A5M1IvIGR8Kc/SXjbvrhaA== X-CSE-MsgGUID: QeXzYW+zREyCHHMlD36xCA== X-IronPort-AV: E=Sophos;i="6.23,112,1770620400"; d="scan'208";a="54912637" X-Amp-Result: SKIPPED(no attachment in message) Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa2.microchip.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 10 Mar 2026 14:23:17 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.85.144) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.58; Tue, 10 Mar 2026 14:22:59 -0700 Received: from bby-cbu-swbuild03.eng.microchip.com (10.10.85.11) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server id 15.1.2507.58 via Frontend Transport; Tue, 10 Mar 2026 14:22:59 -0700 From: Charles Perry To: CC: Charles Perry , Simon Horman , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Nicolas Ferre , "Claudiu Beznea" , , Subject: [PATCH net-next v2 3/3] net: macb: add support for Microchip pic64hpsc ethernet endpoint Date: Tue, 10 Mar 2026 14:22:02 -0700 Message-ID: <20260310212202.3991199-4-charles.perry@microchip.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260310212202.3991199-1-charles.perry@microchip.com> References: <20260310212202.3991199-1-charles.perry@microchip.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain pic64hpsc doesn't have the USRIO register so MACB_CAPS_USRIO_DISABLED is used. pic64hpsc does support PTP and has the timestamping unit so MACB_CAPS_GEM_HAS_PTP is used. jumbo_max_len is set to 16383 (0x3FFF) as reported by the DCFG2 register bits 0..13. The JML register also has a default value of 0x3FFF. dma_burst_length is set to 16 because that's what most other platforms use and it worked for me so far. There is one other mode where bursts of up to 256 are allowed but this might impact negatively other masters on the NOC. The register default value is 4 (bursts up to 4). Signed-off-by: Charles Perry Reviewed-by: Simon Horman --- drivers/net/ethernet/cadence/macb_main.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c index 96e15f58e173..d1fc6a9b9fe5 100644 --- a/drivers/net/ethernet/cadence/macb_main.c +++ b/drivers/net/ethernet/cadence/macb_main.c @@ -5414,6 +5414,15 @@ static const struct macb_config raspberrypi_rp1_config = { .jumbo_max_len = 10240, }; +static const struct macb_config pic64hpsc_config = { + .caps = MACB_CAPS_GIGABIT_MODE_AVAILABLE | MACB_CAPS_JUMBO | + MACB_CAPS_GEM_HAS_PTP | MACB_CAPS_USRIO_DISABLED, + .dma_burst_length = 16, + .clk_init = macb_clk_init, + .init = init_reset_optional, + .jumbo_max_len = 16383, +}; + static const struct of_device_id macb_dt_ids[] = { { .compatible = "cdns,at91sam9260-macb", .data = &at91sam9260_config }, { .compatible = "cdns,macb" }, @@ -5432,6 +5441,7 @@ static const struct of_device_id macb_dt_ids[] = { { .compatible = "cdns,zynq-gem", .data = &zynq_config }, /* deprecated */ { .compatible = "sifive,fu540-c000-gem", .data = &fu540_c000_config }, { .compatible = "microchip,mpfs-macb", .data = &mpfs_config }, + { .compatible = "microchip,pic64hpsc-gem", .data = &pic64hpsc_config}, { .compatible = "microchip,sama7g5-gem", .data = &sama7g5_gem_config }, { .compatible = "microchip,sama7g5-emac", .data = &sama7g5_emac_config }, { .compatible = "mobileye,eyeq5-gem", .data = &eyeq5_config }, -- 2.47.3