Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp757631ybz; Fri, 17 Apr 2020 09:30:40 -0700 (PDT) X-Google-Smtp-Source: APiQypKZRqh3teQ18PFcbJjE6G6AOgBV3vCUXkQ8/x49WKTxYriihFapBO6XUa0yc4A0E+AYOXHS X-Received: by 2002:aa7:ca55:: with SMTP id j21mr3628353edt.86.1587141040441; Fri, 17 Apr 2020 09:30:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587141040; cv=none; d=google.com; s=arc-20160816; b=oFdyVnJMfM7dOql6gpRYbc0R3yzcNFZvQnl5kOhBzaqtn5N7l6QseTFZMN7dfk/nIw mmPI9Oyi+GmpRaqnnD9QnNW3TQwU3woOA6mV39/gUwp+Z5epj2pTmEO5RFaF64W8b7eG mUwoBun0+ujUGdpcx71lfoNERL+kDk1jB0/d0KKbC3S3n5MulVWXoFHudCWuqwBRUusa k/T/OFYgp+VhoTsQydeMKU0VIqlKj0vfiyfqsgeu8s7SxVpRnxaGyi4jKK0/h7pqSlp3 xuBI1O8kHrBOG7tqNIObVHsrvha501DB1rGS1w21XkJInHJ/TPRJSFy9aU7IPKcz2Re7 YkIg== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=NofTrmVDYyLBbejpdgwinjWSh4mIkTyrqtoNVevMhns=; b=yoDYh2vodfarfM1TsopD1e163LHhc3EtbWatkOtf7vniSVKn+4ydbyuDIRi8bEtWa8 Q4DWT7K/Jhk5gqkZqpUEIf33MHw3NCE1R3oof77nc+5HVrKKeNIZ5O/SER96TpxUjF6Y t94OomdGfIQ4YVErDpYmv1yy5bo2FqF11L3lZZH4Xfc2WXfP5pHpswJYmia0Dgokuw6Y drkkiN/e/8be1uQ8JcIHzd8C5yXBkm6H/gtZCJEm0RN16d+ISZGaGpD25HaWoW5y8W4S plkDEKXyyljo6paf2XQcRS0BKZdlWF9d+WSqn7IDHjDG0s6JQ6mjb4lBPH4rnZ42M49m OunA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=b6VVxgJv; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n22si7619786ejd.119.2020.04.17.09.30.17; Fri, 17 Apr 2020 09:30:40 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=b6VVxgJv; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726498AbgDQQ3P (ORCPT + 99 others); Fri, 17 Apr 2020 12:29:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53982 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726366AbgDQQ3N (ORCPT ); Fri, 17 Apr 2020 12:29:13 -0400 Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7507FC061A0C; Fri, 17 Apr 2020 09:29:13 -0700 (PDT) Received: by mail-wr1-x442.google.com with SMTP id t14so3705797wrw.12; Fri, 17 Apr 2020 09:29:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=NofTrmVDYyLBbejpdgwinjWSh4mIkTyrqtoNVevMhns=; b=b6VVxgJvRatmHpf5Q7+LxH5xFXkKequl3/2X2cT9330vCyrosv3/sdyjJp37+49EoK sFfJeFrPLIFw1j1sDY7LDT3mfK25BZNOndqhj5Qc3nh24Z8UWmoZtM/L9DjN91TChI52 3lzjvEmYYByE0KktCbphxTXfB5oEe+i0YHz8UHn0wb9AdpAeNMRQ21OcV7mnVZpDvfef Yc9F5Jw06dZNV8wKw3kyW5TJj0Cmpp1kP107I71hkCqAWv3gMLTvwPf5rXIhJG9+e/OM 6dznA8huU48ssmubIHcxa6XYpDjAluuiOQ5nvmbGbKazyv0rmrxqcwnCaYBbDZr1T6/Q R0Mw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=NofTrmVDYyLBbejpdgwinjWSh4mIkTyrqtoNVevMhns=; b=kPNX8VNyI61QnWHmNL1PxcBW1QTD/Iu2WbPiJL25sSJnA4Wj10LVNDgCFo0Es+LAB9 j8Dgm/7zlQbmwbE88gWfCQoadrNv/xKPn1bLQ6u+5bGKnVnc2VEb+l5eboZ+pUMv9MRg 96UgTow1B57PvwJBm2YwH/gfveHRief1QRp9xLDA11sITQ6rjfxTqL2CJgC0e2jp6FSX iE1SwChwNpo5TdHagt7ebWvNVOWNwvF86jD0BEND6JeB1CnWvEDyL+Dpa7v5YIcodimG 86yYoJqr5eLveoUD+IQ6ZM05pRPDibuyxhRDyJmPgDdQcsHj+PmP29LAo69cgXZLy4CF aiRA== X-Gm-Message-State: AGi0Pubo6X2+sUK72lYTKyiVme8pwHz9fvF8nNcxm+cTOS8juYg9swQn Tu2aM5WlbRvkzpee12hEZEwWUwBZ X-Received: by 2002:adf:ee4c:: with SMTP id w12mr5273583wro.347.1587140951993; Fri, 17 Apr 2020 09:29:11 -0700 (PDT) Received: from ?IPv6:2003:ea:8f29:6000:adc2:161e:aba7:d360? (p200300EA8F296000ADC2161EABA7D360.dip0.t-ipconnect.de. [2003:ea:8f29:6000:adc2:161e:aba7:d360]) by smtp.googlemail.com with ESMTPSA id k133sm8953987wma.0.2020.04.17.09.29.10 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 17 Apr 2020 09:29:11 -0700 (PDT) Subject: Re: [RFC PATCH 2/4] net: phy: Add support for AC200 EPHY To: =?UTF-8?Q?Jernej_=c5=a0krabec?= , robh+dt@kernel.org, andrew@lunn.ch, f.fainelli@gmail.com 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 References: <20200416185758.1388148-1-jernej.skrabec@siol.net> <20200416185758.1388148-3-jernej.skrabec@siol.net> <0340f85c-987f-900b-53c8-d29b4672a8fa@gmail.com> <6176364.4vTCxPXJkl@jernej-laptop> From: Heiner Kallweit Message-ID: <74ab97a9-adbc-6a50-d710-eb50017aa47b@gmail.com> Date: Fri, 17 Apr 2020 18:16:20 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <6176364.4vTCxPXJkl@jernej-laptop> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 17.04.2020 18:15, Jernej Škrabec wrote: > 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? > Right .. > Best regards, > Jernej > >