Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2624385pxb; Sun, 17 Oct 2021 20:50:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzN2J8NfVulAMjweBQm2rJBP12m+81PSRbQ1VPqZwQY9gwKOOTuiDamfxydBCG5ZTRYvR90 X-Received: by 2002:a17:902:e282:b0:13f:c086:be03 with SMTP id o2-20020a170902e28200b0013fc086be03mr2206807plc.18.1634529007594; Sun, 17 Oct 2021 20:50:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634529007; cv=none; d=google.com; s=arc-20160816; b=Q7NjbdtPhSDsgZnkz83ZKpoA0Vs7rdCvLqX/lW5LYLx5o81Dnibu6VdKinz8BTSzx4 5RVcrUVlbE2Z/KDeG6rBxE+z6J6hm4UfcfXnXz7+81qSexC81oL1koxKPDgjNADeGtHI fMZzz7D2CKHgnCPzONaNVIqlibz93TAAgqtC+r20KjovVTAO+9c/IT3wLQRt58EI32XY Lniwz/COB+GneZJBK6GYzHFjV2g33njbQnROWVjJqIif0eEnrSlarJ89wnI2XrIpUroy flAF0JUNFAPG8Blo0jzTDISdbB/UFTTIh3MgvwA6wzI0+4wiQ56/BsnEs1RFt5JsEpuy 3Izg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:dmarc-filter:sender:dkim-signature; bh=uQcX8n5hvkr6mH49VwNlRaBf4pz8d+pa+r5TqsPRV6w=; b=G3uduFr71tGhXQNXk6feFwnStFBUZPs/SLnsliuoTOJcddTPgVI+erBpj9XZ6dw/03 QHo2jm4V8G7K5mVH7QokTk+kjVCCggd723125VHU9XeG9RSgDhyKNXJ8TaloaIouBwuX QE33x9tv4qM0Ecx5vH+QSjYLhqPfhIW3nNDxzKBOLLPOs8AsMS012kVukHZ85gY6Fnc7 oDqdz67FRB2Z9IiSBosYOxVKqr5chp6tZVBMd6EANBok7nMx6mgHojJG2yfuzQUOJ6w5 wPPmKpy+9eUmjal1JyBskr+WzNQwKoXiwi3fzg6FFJQtgZ3B1+7NUa+zOZKfo6hb4bO1 CWJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=lPXGEGTp; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c3si9973900pll.154.2021.10.17.20.49.55; Sun, 17 Oct 2021 20:50:07 -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=@mg.codeaurora.org header.s=smtp header.b=lPXGEGTp; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231911AbhJRDg2 (ORCPT + 99 others); Sun, 17 Oct 2021 23:36:28 -0400 Received: from m43-7.mailgun.net ([69.72.43.7]:16022 "EHLO m43-7.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231827AbhJRDgU (ORCPT ); Sun, 17 Oct 2021 23:36:20 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1634528050; h=References: In-Reply-To: Message-Id: Date: Subject: Cc: To: From: Sender; bh=uQcX8n5hvkr6mH49VwNlRaBf4pz8d+pa+r5TqsPRV6w=; b=lPXGEGTpEv7VxcoQ+UMKHuqaBs2+BiZbIHUoty0vfAQbtR0AQZ9GBac1q4qnKI+DeyJYjxUu Ua2jisugFJlR7i3yeODnc9oNweOrYY7VTkbLNOzDa1lN1YA30qk0J0E5wgoAYrjgv3bTTYJj 3HE8PbRJpWOfZsHqJinzd80bD8M= X-Mailgun-Sending-Ip: 69.72.43.7 X-Mailgun-Sid: WyI0MWYwYSIsICJsaW51eC1rZXJuZWxAdmdlci5rZXJuZWwub3JnIiwgImJlOWU0YSJd Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n07.prod.us-east-1.postgun.com with SMTP id 616ceb2d835b7947c1077f3f (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Mon, 18 Oct 2021 03:34:05 GMT Sender: luoj=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id AAE66C43619; Mon, 18 Oct 2021 03:34:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=ALL_TRUSTED,BAYES_00,SPF_FAIL autolearn=no autolearn_force=no version=3.4.0 Received: from akronite-sh-dev02.qualcomm.com (unknown [180.166.53.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: luoj) by smtp.codeaurora.org (Postfix) with ESMTPSA id A08FDC43460; Mon, 18 Oct 2021 03:34:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 smtp.codeaurora.org A08FDC43460 Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=fail smtp.mailfrom=codeaurora.org From: Luo Jie To: andrew@lunn.ch, hkallweit1@gmail.com, linux@armlinux.org.uk, davem@davemloft.net, kuba@kernel.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, sricharan@codeaurora.org, Luo Jie Subject: [PATCH v3 05/13] net: phy: add qca8081 ethernet phy driver Date: Mon, 18 Oct 2021 11:33:25 +0800 Message-Id: <20211018033333.17677-6-luoj@codeaurora.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20211018033333.17677-1-luoj@codeaurora.org> References: <20211018033333.17677-1-luoj@codeaurora.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org qca8081 is a single port ethernet phy chip that supports 10/100/1000/2500 Mbps mode. Add the basic phy driver features, and reuse the at803x phy driver functions. Signed-off-by: Luo Jie --- drivers/net/phy/at803x.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/drivers/net/phy/at803x.c b/drivers/net/phy/at803x.c index 0b69e77a0510..0df474628461 100644 --- a/drivers/net/phy/at803x.c +++ b/drivers/net/phy/at803x.c @@ -155,6 +155,8 @@ #define QCA8337_PHY_ID 0x004dd036 #define QCA8K_PHY_ID_MASK 0xffffffff +#define QCA8081_PHY_ID 0x004dd101 + #define QCA8K_DEVFLAGS_REVISION_MASK GENMASK(2, 0) #define AT803X_PAGE_FIBER 0 @@ -164,7 +166,7 @@ #define AT803X_KEEP_PLL_ENABLED BIT(0) #define AT803X_DISABLE_SMARTEEE BIT(1) -MODULE_DESCRIPTION("Qualcomm Atheros AR803x PHY driver"); +MODULE_DESCRIPTION("Qualcomm Atheros AR803x and QCA808X PHY driver"); MODULE_AUTHOR("Matus Ujhelyi"); MODULE_LICENSE("GPL"); @@ -1431,6 +1433,18 @@ static struct phy_driver at803x_driver[] = { .get_sset_count = at803x_get_sset_count, .get_strings = at803x_get_strings, .get_stats = at803x_get_stats, +}, { + /* Qualcomm QCA8081 */ + PHY_ID_MATCH_EXACT(QCA8081_PHY_ID), + .name = "Qualcomm QCA8081", + .config_intr = at803x_config_intr, + .handle_interrupt = at803x_handle_interrupt, + .get_tunable = at803x_get_tunable, + .set_tunable = at803x_set_tunable, + .set_wol = at803x_set_wol, + .get_wol = at803x_get_wol, + .suspend = genphy_suspend, + .resume = genphy_resume, }, }; module_phy_driver(at803x_driver); @@ -1441,6 +1455,7 @@ static struct mdio_device_id __maybe_unused atheros_tbl[] = { { PHY_ID_MATCH_EXACT(ATH8032_PHY_ID) }, { PHY_ID_MATCH_EXACT(ATH8035_PHY_ID) }, { PHY_ID_MATCH_EXACT(ATH9331_PHY_ID) }, + { PHY_ID_MATCH_EXACT(QCA8081_PHY_ID) }, { } }; -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project