Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp745091ybz; Fri, 17 Apr 2020 09:17:17 -0700 (PDT) X-Google-Smtp-Source: APiQypLjzxPLKN12QhVORDuPKTFvJxG+tyzb2XKBmHxwUmTr1tj7KP5x6eeC7p9agVgDNL5pRZ/c X-Received: by 2002:a17:906:c9c1:: with SMTP id hk1mr3880556ejb.215.1587140237260; Fri, 17 Apr 2020 09:17:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587140237; cv=none; d=google.com; s=arc-20160816; b=yUBJ/Y/JQGQqWGIe5BSdgP196olGV8nFh0Z02lrrl+5pAJuHh+vU0Mt0C3pG1TF3ZX tdWStRrUu8+h3xfS9BOWa7OOfzkW6Kh56nPX0gtDWMuGh6sXIF0tv9h7veviJUQvdcFP 6ehhMl5H4X3YMwbsQt4aFsFcNoOS5/6tpsG1pZ4TVXApw7MaeBILJyRrsmoISBbCKZGb Y7Hbc/bJCcEOC8QhFr59H2kV57O8Uy7U3tU+7mT/dqaZhLOOmcMukPP0Ufjv4EgOKhVW 3CDrM85i89qXH1jVl5JkxGJgBBoA3/vxcTnT5dj9wrIly7vGJfjs9OpGJ99EQ9He7nr/ Ypng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=HfJa/z+tVU6sOYULPF9eI8LvZ98HBAqHA26kvKT1zYo=; b=iz4PbkS3pD5hPSbtX4DSkJFcnIoz8VjrjzceFWGrQMUtv0lD326C5hKxb3f/9uFrEb jV7WsF1gfhqUMox45/9BGMtMvulq9YXh7SwDorl3HL7zNve5opo3j/BN9FQZ8V63BHmX cfDGTUnMPoM3EoU2WeLitBdh9lDcz8v4qVXu3a+urBZSE0/gnNk07VjNNfppzYW+AfCL xRyeii+VOO+zDZvKpk/RNMVckVsVBHq8IIP7WVZeXRRiJq+eW5o8pvm887AlGvNiGkg2 /WzMnKXCwSlSuLNbLVf5+mq49TmWGDYm466d1NwhoQLnjD+VZSGpD2cRr7GJm0DVNHg9 UA5A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=siol.net Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dn4si427996edb.239.2020.04.17.09.16.53; Fri, 17 Apr 2020 09:17:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=siol.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730000AbgDQQPY convert rfc822-to-8bit (ORCPT + 99 others); Fri, 17 Apr 2020 12:15:24 -0400 Received: from mailoutvs15.siol.net ([185.57.226.206]:45694 "EHLO mail.siol.net" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728105AbgDQQPY (ORCPT ); Fri, 17 Apr 2020 12:15:24 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.siol.net (Postfix) with ESMTP id 7E3B3524BB0; Fri, 17 Apr 2020 18:15:19 +0200 (CEST) X-Virus-Scanned: amavisd-new at psrvmta09.zcs-production.pri Received: from mail.siol.net ([127.0.0.1]) by localhost (psrvmta09.zcs-production.pri [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id 8zL-mRWm0sXI; Fri, 17 Apr 2020 18:15:19 +0200 (CEST) Received: from mail.siol.net (localhost [127.0.0.1]) by mail.siol.net (Postfix) with ESMTPS id 1358A524C5F; Fri, 17 Apr 2020 18:15:19 +0200 (CEST) Received: from jernej-laptop.localnet (cpe-194-152-20-232.static.triera.net [194.152.20.232]) (Authenticated sender: jernej.skrabec@siol.net) by mail.siol.net (Postfix) with ESMTPA id 03505524C64; Fri, 17 Apr 2020 18:15:17 +0200 (CEST) From: Jernej =?utf-8?B?xaBrcmFiZWM=?= To: robh+dt@kernel.org, andrew@lunn.ch, f.fainelli@gmail.com, Heiner Kallweit Cc: mripard@kernel.org, wens@csie.org, lee.jones@linaro.org, linux@armlinux.org.uk, davem@davemloft.net, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org Subject: Re: [RFC PATCH 2/4] net: phy: Add support for AC200 EPHY Date: Fri, 17 Apr 2020 18:15:17 +0200 Message-ID: <6176364.4vTCxPXJkl@jernej-laptop> In-Reply-To: <0340f85c-987f-900b-53c8-d29b4672a8fa@gmail.com> References: <20200416185758.1388148-1-jernej.skrabec@siol.net> <20200416185758.1388148-3-jernej.skrabec@siol.net> <0340f85c-987f-900b-53c8-d29b4672a8fa@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8BIT Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Dne Ĩetrtek, 16. april 2020 ob 22:18:52 CEST je Heiner Kallweit napisal(a): > On 16.04.2020 20:57, Jernej Skrabec wrote: > > AC200 MFD IC supports Fast Ethernet PHY. Add a driver for it. > > > > Signed-off-by: Jernej Skrabec > > --- > > > > drivers/net/phy/Kconfig | 7 ++ > > drivers/net/phy/Makefile | 1 + > > drivers/net/phy/ac200.c | 206 +++++++++++++++++++++++++++++++++++++++ > > 3 files changed, 214 insertions(+) > > create mode 100644 drivers/net/phy/ac200.c > > > > diff --git a/drivers/net/phy/Kconfig b/drivers/net/phy/Kconfig > > index 3fa33d27eeba..16af69f69eaf 100644 > > --- a/drivers/net/phy/Kconfig > > +++ b/drivers/net/phy/Kconfig > > @@ -288,6 +288,13 @@ config ADIN_PHY > > > > - ADIN1300 - Robust,Industrial, Low Latency 10/100/1000 Gigabit > > > > Ethernet PHY > > > > +config AC200_PHY > > + tristate "AC200 EPHY" > > + depends on NVMEM > > + depends on OF > > + help > > + Fast ethernet PHY as found in X-Powers AC200 multi-function device. > > + > > > > config AMD_PHY > > > > tristate "AMD PHYs" > > ---help--- > > > > diff --git a/drivers/net/phy/Makefile b/drivers/net/phy/Makefile > > index 2f5c7093a65b..b0c5b91900fa 100644 > > --- a/drivers/net/phy/Makefile > > +++ b/drivers/net/phy/Makefile > > @@ -53,6 +53,7 @@ obj-$(CONFIG_SFP) += sfp.o > > > > sfp-obj-$(CONFIG_SFP) += sfp-bus.o > > obj-y += $(sfp-obj-y) $(sfp-obj-m) > > > > +obj-$(CONFIG_AC200_PHY) += ac200.o > > > > obj-$(CONFIG_ADIN_PHY) += adin.o > > obj-$(CONFIG_AMD_PHY) += amd.o > > aquantia-objs += aquantia_main.o > > > > diff --git a/drivers/net/phy/ac200.c b/drivers/net/phy/ac200.c > > new file mode 100644 > > index 000000000000..3d7856ff8f91 > > --- /dev/null > > +++ b/drivers/net/phy/ac200.c > > @@ -0,0 +1,206 @@ > > +// SPDX-License-Identifier: GPL-2.0+ > > +/** > > + * Driver for AC200 Ethernet PHY > > + * > > + * Copyright (c) 2020 Jernej Skrabec > > + */ > > + > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > + > > +#define AC200_EPHY_ID 0x00441400 > > +#define AC200_EPHY_ID_MASK 0x0ffffff0 > > + > > You could use PHY_ID_MATCH_MODEL() here. Hm... This doesn't work with dynamically allocated memory, right? Best regards, Jernej