Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp351214rdh; Thu, 23 Nov 2023 05:50:47 -0800 (PST) X-Google-Smtp-Source: AGHT+IHRyPJUmFkabYc1BanWletYGkZcmlVbPH3N07XZCFMw+YhHMxHwjQhd/yGU1kQ8tQVQOEGN X-Received: by 2002:a17:90a:1951:b0:280:a01a:906a with SMTP id 17-20020a17090a195100b00280a01a906amr5697765pjh.5.1700747446787; Thu, 23 Nov 2023 05:50:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700747446; cv=none; d=google.com; s=arc-20160816; b=VzFnzZeP6WhaUD20jOASFpbXQ5t1a3xP/pWoSr0Xd8Q/e4J8JNoSF6QozC1ALZpZxm 72cICXbprMtgTzvrD619eCNxFNGU2tWK1WBDU7ube4KaNp4EABYWE5y2jjZJj7en5b3Y h8JW5qDlHxlvRxLXp/rkDPTkdE7F+M7RbcyDB0n/Eh6ljeX5kmHsuIEyLkR6uZL8Vzbb USc3LSFGcYfIkdA/TW2CGff+DK6VLGSHsguqAq63rPNFFsbLdiJNRd49nkkANDdCaDUY XsADFtE/dyXCi8qMTmdLCKwaRemaGcQThW4i4Q1Zwju1st41XRtP8KikVqTuqgNtWZgj bOUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=6HDmUWHoV/d+5kwt+BMpRMCcQ4EU+NPmBrVnqKEpBkk=; fh=Ro4G+9lvn+KGg51C9N8KXvAXm3ZGou9+X/eOgDc9YmQ=; b=Q1ZjZUTQJJ7OHj9E7ES/WyP8D07noEbwfdsDnEkbJ0DcWZF0F4RZkxqL67pFqhgHda hLcNPn68icR3MM4T0Z3Tuy3eVltoKwGMXYzyiN3kG+UPMsIvhY9e1geaLuxuL6fQ32RD Z06GIzP5QhOjzR6o12WuuGCHAsw5oiPJOITPcklbjpXZ2+3C/JOTO5xLTZ54n522cG8a n6iHjjS0qBxSS94kMZXd5IDrPm2ef8etnJfFn/POvfaeFsgeyIo+dC40kPtF+YQOGIhs aSZckXD8yE1iNkQ56W7pDN62MfmgO1OGNYMkCcievLSXsgJ+51lZCFs92IYX0woOka8J XeDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=fCsbMuea; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 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 morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id r60-20020a17090a43c200b0028511909e15si1791816pjg.136.2023.11.23.05.50.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Nov 2023 05:50:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=fCsbMuea; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 9A06C808725E; Thu, 23 Nov 2023 05:50:38 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345612AbjKWNuW (ORCPT + 99 others); Thu, 23 Nov 2023 08:50:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39608 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345594AbjKWNuU (ORCPT ); Thu, 23 Nov 2023 08:50:20 -0500 Received: from mail-yw1-x1132.google.com (mail-yw1-x1132.google.com [IPv6:2607:f8b0:4864:20::1132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DE634BA; Thu, 23 Nov 2023 05:50:26 -0800 (PST) Received: by mail-yw1-x1132.google.com with SMTP id 00721157ae682-5cd2f1a198cso7138267b3.0; Thu, 23 Nov 2023 05:50:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700747426; x=1701352226; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=6HDmUWHoV/d+5kwt+BMpRMCcQ4EU+NPmBrVnqKEpBkk=; b=fCsbMueaAqe4vmewoSW6onWlFPkdA2U7h8HtTHIvasxQCHpbOH41yE81KU0z+UTwfT Q6v6Ixzn3SnDphaewcWX/b5CVS7iRGkd4+PgbrYMFTBp4I1i2TLcIghXOQobf4igitVD VsjKcv3Ez9P3JuWLtAJiPNLOd5uuKBFFKjPNt3h0QEsCZqkDuhqdrAeexZT7iUKtVxuC bJxWmaiuddbgNd8Mmc/r8j/ujlPyDLwj56ItH5UOQmklq4wcaDDlUV4FiTN+p1cYLcVw ylw68GL8/87oG0ke43GUgNufcMHWrue4CFFbJ9Fe4pYALzNtw9DA42Cfb/6VI9CSsi7i g3EA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700747426; x=1701352226; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=6HDmUWHoV/d+5kwt+BMpRMCcQ4EU+NPmBrVnqKEpBkk=; b=Ly75E3m+s6TILhOAXuM8xDQflO2gP111O635uanFSq/gn92Ge3KSyrCqoH4JZ63p9e 6C92VpD6WL/+R+PTQKIfiT6bPpvbQ+qhVjS4mgGW8wa709RMu6UE2W+xi/RWpj1qKD+r oM+viHAxovI7+5neqCCo1qRWZF8cECJYuwY+6PlHpCXM59/kT0AhkhhhRIdopVqIMBcC OfaPonhaa9VChjd+7vGntIpVLh1w+/OofOJFhyjaV/jDkw+EMqa9AhVseTxR+S9kgMLF RU2jzrELfjqLo+VKF+zGEafYghsk5F+DQWKCiSvUDk0QWT8LUxV5YpgOZNhIvqpsDumT iryQ== X-Gm-Message-State: AOJu0Yyk9sfRcDKhWwFPBh6y0KJ9GklvwFD+X9mzGYsg2bu5RcikNWJQ rvOO8fWPu3Ab2tF0vREBXp1G/Z9D0RbqK4ijqTc= X-Received: by 2002:a25:3409:0:b0:da0:3535:41f4 with SMTP id b9-20020a253409000000b00da0353541f4mr5712007yba.7.1700747426043; Thu, 23 Nov 2023 05:50:26 -0800 (PST) MIME-Version: 1.0 References: <20231121151733.2015384-1-tmaimon77@gmail.com> <20231121151733.2015384-3-tmaimon77@gmail.com> <6aeb28f5-04c2-4723-9da2-d168025c307c@lunn.ch> <9ad42fef-b210-496a-aafc-eb2a7416c4df@lunn.ch> In-Reply-To: <9ad42fef-b210-496a-aafc-eb2a7416c4df@lunn.ch> From: Tomer Maimon Date: Thu, 23 Nov 2023 15:50:14 +0200 Message-ID: Subject: Re: [PATCH v1 2/2] net: stmmac: Add NPCM support To: Andrew Lunn Cc: alexandre.torgue@foss.st.com, tali.perry1@gmail.com, edumazet@google.com, krzysztof.kozlowski+dt@linaro.org, linux-stm32@st-md-mailman.stormreply.com, benjaminfair@google.com, openbmc@lists.ozlabs.org, joabreu@synopsys.com, joel@jms.id.au, devicetree@vger.kernel.org, j.neuschaefer@gmx.net, robh+dt@kernel.org, peppe.cavallaro@st.com, linux-arm-kernel@lists.infradead.org, avifishman70@gmail.com, venture@google.com, linux-kernel@vger.kernel.org, mcoquelin.stm32@gmail.com, netdev@vger.kernel.org, davem@davemloft.net Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Thu, 23 Nov 2023 05:50:38 -0800 (PST) Hi Andrew, On Wed, 22 Nov 2023 at 20:45, Andrew Lunn wrote: > > On Wed, Nov 22, 2023 at 07:50:57PM +0200, Tomer Maimon wrote: > > Hi Andrew, > > > > Thanks for your comments > > > > On Tue, 21 Nov 2023 at 18:42, Andrew Lunn wrote: > > > > > > > +void npcm_dwmac_pcs_init(struct npcm_dwmac *dwmac, struct device *dev, > > > > + struct plat_stmmacenet_data *plat_dat) > > > > +{ > > > > + u16 val; > > > > + > > > > + iowrite16((u16)(SR_MII_CTRL >> 9), dwmac->reg + IND_AC_BA_REG); > > > > + val = ioread16(dwmac->reg + PCS_SR_MII_CTRL_REG); > > > > + val |= PCS_RST; > > > > + iowrite16(val, dwmac->reg + PCS_SR_MII_CTRL_REG); > > > > + > > > > + while (val & PCS_RST) > > > > + val = ioread16(dwmac->reg + PCS_SR_MII_CTRL_REG); > > > > + > > > > + val &= ~(PCS_AN_ENABLE); > > > > + iowrite16(val, dwmac->reg + PCS_SR_MII_CTRL_REG); > > > > +} > > > > > > Is this a licensed PCS implementation? Or home grown? If its been > > > licensed from somebody, it maybe should live in driver/net/pcs, so > > > others can reuse it when they license the same core. > > > we are using DWC PCS, I don't see support for DWC PCS and I am not > > sure it is supposed to be supported at /drivers/net/pcs > > I've not followed the naming used by Synopsys. Is DWC PCS the same as > XPCS? Does Synopsys have multiple PCS implementations? > > > I do see a patch set to support DWC PCS but I don't think it answers my needs > > https://patchwork.ozlabs.org/project/netdev/patch/1559674736-2190-3-git-send-email-weifeng.voon@intel.com/ > > I _think_ this patch eventually got turned into > driver/net/pcs/pcs-xpcs.c > > What exactly does it not do for you? Thanks for pointing me to Synopsys (DWC) PCS in pcs-xpcs.c I need to check if the driver follows all our SGMII needs > > Andrew Best regards, Tomer