From patchwork Thu Apr 4 13:11:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Brunet X-Patchwork-Id: 161798 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp1585231jan; Thu, 4 Apr 2019 06:12:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqyZEGuumAWOJUm+6zg/+U0Y77VGzKWqTIU2URzH14S7Jc5EUX+wWPbjRk360upBe8ZXwZgd X-Received: by 2002:a63:9dc4:: with SMTP id i187mr5406951pgd.259.1554383539114; Thu, 04 Apr 2019 06:12:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554383539; cv=none; d=google.com; s=arc-20160816; b=PtNXdl48lKKDJ1hUJP26ZvGmkw6iI4SgpMgJTrUWjPCXMx5uqdkkgorXl5B0AkzZ6M Fxrr2YQPBss0oMrZrpYvQ0hyN9cyW6h4vp6jRU74elJL6zw4+p+ON9ySF/pZEoUVKb5u De1d7NvXqI2oHrT5MT6D3Ly8hfE3b4gz3f4qZ+39YbFGexCbE02VRBf8PuAYA2WIWfYp j1Pj2921QN0MQIJ+MGV906C2xFrRxO+Jbo1yemfw5L2WGAB2VawKhY7Nl5iBzgyBq+Au 8g+soTeVWIYEfbwovBlZTRWUpMM3LBsPbSZcz7bW2NUrMlmk0yfZXJ6KkM8iaB1OpPcS FnAg== 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 :dkim-signature; bh=R4J+VyhzRh+NhhZy6AkI12ey+VNbuJcXhpbxSA+8ah8=; b=afz986twih+hMz9sutrSlJiPUT1tR2Ie4j19PhHJ0Qw3iknteiYDLrEoaQ/EfWZhFY VMQDyLYSgvv7vn0vFQtVXRInKt5i87IP9msc2o1sBBBpuo0PD0aqurxAMqElvlsNuL7/ AvfVdTAzCwBUAOAVMKoa/Rm3I8MheSZmpb5LxoH6kvPI2jJnG+xQJASTrqI98y7qizo3 VTQ4A9cNdmPdW/XCJaej1W1MMf5qEiQAGUObOH8R+vOMUDsFQMSSeA5DlPUQMnT38IXH /YTJBq0bYehFINSTxa9He3O3EeYCN00iKFlnjub9UHRax1vTdmDR9eL1ImGQrJDztjcv qdyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=WrHX2k1M; spf=pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o185si10548576pga.164.2019.04.04.06.12.18; Thu, 04 Apr 2019 06:12:19 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=WrHX2k1M; spf=pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729964AbfDDNMS (ORCPT + 9 others); Thu, 4 Apr 2019 09:12:18 -0400 Received: from mail-wm1-f65.google.com ([209.85.128.65]:55302 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729556AbfDDNMC (ORCPT ); Thu, 4 Apr 2019 09:12:02 -0400 Received: by mail-wm1-f65.google.com with SMTP id o25so2989566wmf.5 for ; Thu, 04 Apr 2019 06:12:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=R4J+VyhzRh+NhhZy6AkI12ey+VNbuJcXhpbxSA+8ah8=; b=WrHX2k1M7DQscuoYArwoPfw+g2BKLwNmNNsfOw7tTQ/IHltBnwKB7AnfSQKn+p75CK 1a/Wl7b/9V3FXXaIOlVJpexBmCFky93l+yxpXvyZJj+iGmLzEk4vuBe/lCdbt3SzdgPI i9+syrihCo6BISLUaj1lsBg1Yw8OYXewl+BYz2t9p7eToeZHrRq6NNdoq3MfGDn1mGoj SUKi2QoAnQLIntRdoST/PvqK3baxQScpmd9bfOFMYT0s16TZtPjAs3eMI8ZmITa461fH H2gJNZGj9N4uLNaQl9fWPRTbA6Cv7KMhw2ypGsNhtfDXJZs9uoI7AmD8V1UaVPnSQ0vP Fr7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=R4J+VyhzRh+NhhZy6AkI12ey+VNbuJcXhpbxSA+8ah8=; b=iMSWdkexuAHKtyWwjQIIQWiNc5/ESyN4hgL9/qVay96mFmOGGTReG3lEQdCT3IheLZ ZHB0BERR0WtQU4sOVlkzhhlgVrcvbaexTrz59V6YVp+NSWqaRMu5h3A8+IZJBO9pic9I dZMgUAwtu68tinI8b4UzKsTuss5XKb/M/BBBgiMICJUhBFUhzjOjWxEanh0c8oTza94o YjEy1puPW1/4J+bfWkcD4vujnw8GWVRbh8lWs8dhdhYebuy+L8fu18dNeF4jzM4DTIZX VjuG8tj3LMkUumfMXsPqEZXEzpFmbCwX6EzntKklscluB084WmndXZne7xByK6e2CXJd Deiw== X-Gm-Message-State: APjAAAUUf2l9XbielqKuhADoMVSn8nKHaCPs1F9HW1Qq3rkOsuaD1uoD ITY0WmGWhz7DGmVmwxbpO72dgg== X-Received: by 2002:a05:600c:211a:: with SMTP id u26mr4302195wml.74.1554383521016; Thu, 04 Apr 2019 06:12:01 -0700 (PDT) Received: from boomer.local ([2a01:e34:eeb6:4690:106b:bae3:31ed:7561]) by smtp.googlemail.com with ESMTPSA id y133sm21984923wmd.2.2019.04.04.06.11.59 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 04 Apr 2019 06:12:00 -0700 (PDT) From: Jerome Brunet To: Andrew Lunn , Florian Fainelli , Heiner Kallweit , "David S. Miller" , Kevin Hilman Cc: Jerome Brunet , netdev@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH net-next v3 3/4] net: phy: meson-gxl: add g12a support Date: Thu, 4 Apr 2019 15:11:46 +0200 Message-Id: <20190404131147.31156-4-jbrunet@baylibre.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190404131147.31156-1-jbrunet@baylibre.com> References: <20190404131147.31156-1-jbrunet@baylibre.com> MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org The g12a SoC family uses the type of internal PHY that was used on the gxl family. The quirks of gxl family, like the LPA register corruption, appear to have been resolved on this new SoC generation. Signed-off-by: Jerome Brunet --- drivers/net/phy/meson-gxl.c | 11 +++++++++++ 1 file changed, 11 insertions(+) -- 2.20.1 diff --git a/drivers/net/phy/meson-gxl.c b/drivers/net/phy/meson-gxl.c index 0eec2913c289..2033c93a46ca 100644 --- a/drivers/net/phy/meson-gxl.c +++ b/drivers/net/phy/meson-gxl.c @@ -237,11 +237,22 @@ static struct phy_driver meson_gxl_phy[] = { .config_intr = meson_gxl_config_intr, .suspend = genphy_suspend, .resume = genphy_resume, + }, { + PHY_ID_MATCH_EXACT(0x01803301), + .name = "Meson G12A Internal PHY", + .features = PHY_BASIC_FEATURES, + .flags = PHY_IS_INTERNAL, + .soft_reset = genphy_soft_reset, + .ack_interrupt = meson_gxl_ack_interrupt, + .config_intr = meson_gxl_config_intr, + .suspend = genphy_suspend, + .resume = genphy_resume, }, }; static struct mdio_device_id __maybe_unused meson_gxl_tbl[] = { { 0x01814400, 0xfffffff0 }, + { PHY_ID_MATCH_VENDOR(0x01803301) }, { } }; From patchwork Thu Apr 4 13:11:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Brunet X-Patchwork-Id: 161797 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp1584987jan; Thu, 4 Apr 2019 06:12:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqyiY/USvrPUC7e3uJ2y8GDhRmuFOAGcaiU9W7S5vwSkkV0l+4cGh58dmoc59i6OxPKCoMtT X-Received: by 2002:a63:4e5b:: with SMTP id o27mr5857512pgl.204.1554383527568; Thu, 04 Apr 2019 06:12:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554383527; cv=none; d=google.com; s=arc-20160816; b=BVq08lga/QZ9ywa+/nQ2cDRjblSNCsOkUAMiDZx7I+yR/VEJ8qWeY9wKw8bxc/MMnb 74HmtPQWe4A7jMa+9faZEMUGJgaTISm7TAtIeAf/PmfGB0sbuICYvetl12o2gd/Lo1zb XO7R903QE393U8e8zYLzSv2FCmDXLiD9NcCXG6yE4C2EmUOoiMxGewzrjCiB0f0HA95g waMgJnAJc3lsBpYeG/tbEoZvMRPlliSrgxyCn4++5QurbM06KCw08gLbZwyd9hfhkkCy GUQuXy9ZvV3K08oCUM4fojKXRDGHM4+Ohqe2JSEcOPwfP9f0/Hg8OfTtXBPO6kPPa7c+ fWOQ== 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 :dkim-signature; bh=C2Np36jjJb1WgC3/59cWHoAfdL0+gseCwYoNIkBU+7U=; b=TuJQiliU0NNecOEUduUM0PawOFctWzpb49AxdMXcZiO0v7NOaSBMv6rbB6OOZBgAbN +kZb63vL/P61MqeyrQBC0Sw85ydRFnbDLipyxIe9ekHcGHFmg9eQpjzrHgD8BhQmQAvc 1Tf7KqoBVlgkEtqzs2RYiJQ013eqFJ/cUXBPqAdm4RkNnVQ14n4vMyFeVC3COrlDoJM8 af3JLbvRBzZcB6LowWNHqMNW8T4Kn1hGSELtIhIY4FopBjHXrLH2timSsFo21ReBEafY 3sbUdFYf5jjjD1/nReJPb5pqc83bYL4xm743nZsYmRgqHxCMhBeMjuhf3oHTtiKdoW8S FS3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=NQgQuCht; spf=pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b9si16048066pgn.457.2019.04.04.06.12.07; Thu, 04 Apr 2019 06:12:07 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=NQgQuCht; spf=pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729833AbfDDNMG (ORCPT + 9 others); Thu, 4 Apr 2019 09:12:06 -0400 Received: from mail-wr1-f66.google.com ([209.85.221.66]:45816 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729768AbfDDNME (ORCPT ); Thu, 4 Apr 2019 09:12:04 -0400 Received: by mail-wr1-f66.google.com with SMTP id s15so3685733wra.12 for ; Thu, 04 Apr 2019 06:12:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=C2Np36jjJb1WgC3/59cWHoAfdL0+gseCwYoNIkBU+7U=; b=NQgQuChtIdoSiqdDUI/JiMdfrin2nesP+nHhGvk7kbC8hVW7tOFo7cOHjEqyYBu10j Va0SyZVG9PAwkJCupFCpS2uqNbIkfkCl7XnE9VF8jiwnwH4Q+iAyanKMbDjKLy76Czgm tpOvsR49SukQ45ZGP9bqs9qCzynO2LUR3o23VOoX37jFlnHDTh6bxn8cbAK2ufyvKKFx x75UloYi0jXPXonR6xZjZHhyRCLisJGzReG2UqZMayZeqEITcr0Zy72yuTu0DYqCHPAT +gu1fDKbnRPy3GUV1Z1Lb1UI2vk8Eqmrlesu0vA2Q4Mx8KFsuN68o9WkmO0LPbwPyyeN 7e2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=C2Np36jjJb1WgC3/59cWHoAfdL0+gseCwYoNIkBU+7U=; b=L2t6KlGsLS2QZ7VdoJVU7UIKR7tc+1MXem42zke9SCyx1RVyzjgxCuE0tl80P4kzqa uzpMDVUMjM9jgqwKSifnCrE6pB+RAge2T91h3TxiJ8wBDVK16OQYF3csIhTmGb4dqNu3 NJj220JRtVpuYZcduHzb8/hUBLeygaNK37EKg+ItnD5fH5rnQ4Rwv/UqMIuUuu+NRqWb YxA2XyhQ8upOBwcmlPpI8Ax7U+rBPnw39m7mI16XLdpiUOAh0c1rFOZvFe+R9rD7v+2O jqINYblWl+CJXjDURQGmm7+w2TeKeLuqJFlK7/HQPMF2F+8041lEgMlTkwYbmOWPp4oV LEYA== X-Gm-Message-State: APjAAAX1OVIpVXPTUctTvV/A4maY426tR2Yd2jczRgiMNvsjekHlXtER dqSwFrt9VC17CETavVwartf85w== X-Received: by 2002:a5d:6181:: with SMTP id j1mr4239923wru.11.1554383522488; Thu, 04 Apr 2019 06:12:02 -0700 (PDT) Received: from boomer.local ([2a01:e34:eeb6:4690:106b:bae3:31ed:7561]) by smtp.googlemail.com with ESMTPSA id y133sm21984923wmd.2.2019.04.04.06.12.01 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 04 Apr 2019 06:12:01 -0700 (PDT) From: Jerome Brunet To: Andrew Lunn , Florian Fainelli , Heiner Kallweit , "David S. Miller" , Kevin Hilman Cc: Jerome Brunet , netdev@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH net-next v3 4/4] net: phy: meson-gxl: clean-up gxl variant driver Date: Thu, 4 Apr 2019 15:11:47 +0200 Message-Id: <20190404131147.31156-5-jbrunet@baylibre.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190404131147.31156-1-jbrunet@baylibre.com> References: <20190404131147.31156-1-jbrunet@baylibre.com> MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org The purpose of this change is to align the gxl and g12a driver declaration. Like on the g12a variant, remove genphy_aneg_done() from the driver declaration as the net phy framework will default to it anyway. Also, the gxl phy id should be an exact match as well, so let's change this and use the macro provided. Signed-off-by: Jerome Brunet --- drivers/net/phy/meson-gxl.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) -- 2.20.1 diff --git a/drivers/net/phy/meson-gxl.c b/drivers/net/phy/meson-gxl.c index 2033c93a46ca..6d4a8c508ec0 100644 --- a/drivers/net/phy/meson-gxl.c +++ b/drivers/net/phy/meson-gxl.c @@ -224,14 +224,12 @@ static int meson_gxl_config_intr(struct phy_device *phydev) static struct phy_driver meson_gxl_phy[] = { { - .phy_id = 0x01814400, - .phy_id_mask = 0xfffffff0, + PHY_ID_MATCH_EXACT(0x01814400), .name = "Meson GXL Internal PHY", .features = PHY_BASIC_FEATURES, .flags = PHY_IS_INTERNAL, .soft_reset = genphy_soft_reset, .config_init = meson_gxl_config_init, - .aneg_done = genphy_aneg_done, .read_status = meson_gxl_read_status, .ack_interrupt = meson_gxl_ack_interrupt, .config_intr = meson_gxl_config_intr, @@ -251,7 +249,7 @@ static struct phy_driver meson_gxl_phy[] = { }; static struct mdio_device_id __maybe_unused meson_gxl_tbl[] = { - { 0x01814400, 0xfffffff0 }, + { PHY_ID_MATCH_VENDOR(0x01814400) }, { PHY_ID_MATCH_VENDOR(0x01803301) }, { } };