linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wenli Looi <wlooi@ucalgary.ca>
To: "Toke Høiland-Jørgensen" <toke@toke.dk>
Cc: Kalle Valo <kvalo@kernel.org>,
	linux-wireless@vger.kernel.org, ath9k-devel@qca.qualcomm.com,
	Wenli Looi <wlooi@ucalgary.ca>
Subject: [PATCH 1/9] ath9k: add QCN550x device IDs
Date: Mon, 18 Apr 2022 00:13:05 -0700	[thread overview]
Message-ID: <20220418071313.882179-2-wlooi@ucalgary.ca> (raw)
In-Reply-To: <20220418071313.882179-1-wlooi@ucalgary.ca>

Signed-off-by: Wenli Looi <wlooi@ucalgary.ca>
---
 drivers/net/wireless/ath/ath9k/ahb.c | 4 ++++
 drivers/net/wireless/ath/ath9k/hw.c  | 6 ++++++
 drivers/net/wireless/ath/ath9k/hw.h  | 1 +
 drivers/net/wireless/ath/ath9k/reg.h | 5 ++++-
 4 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/ath9k/ahb.c b/drivers/net/wireless/ath/ath9k/ahb.c
index 9cd12b20b..1835b4469 100644
--- a/drivers/net/wireless/ath/ath9k/ahb.c
+++ b/drivers/net/wireless/ath/ath9k/ahb.c
@@ -47,6 +47,10 @@ static const struct platform_device_id ath9k_platform_id_table[] = {
 		.name = "qca956x_wmac",
 		.driver_data = AR9300_DEVID_QCA956X,
 	},
+	{
+		.name = "qcn550x_wmac",
+		.driver_data = AR9300_DEVID_QCN550X,
+	},
 	{},
 };
 
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
index 172081ffe..047512ce1 100644
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -282,6 +282,9 @@ static bool ath9k_hw_read_revisions(struct ath_hw *ah)
 	case AR9300_DEVID_QCA956X:
 		ah->hw_version.macVersion = AR_SREV_VERSION_9561;
 		return true;
+	case AR9300_DEVID_QCN550X:
+		ah->hw_version.macVersion = AR_SREV_VERSION_5502;
+		return true;
 	}
 
 	srev = REG_READ(ah, AR_SREV);
@@ -592,6 +595,7 @@ static int __ath9k_hw_init(struct ath_hw *ah)
 	case AR_SREV_VERSION_9565:
 	case AR_SREV_VERSION_9531:
 	case AR_SREV_VERSION_9561:
+	case AR_SREV_VERSION_5502:
 		break;
 	default:
 		ath_err(common,
@@ -688,6 +692,7 @@ int ath9k_hw_init(struct ath_hw *ah)
 	case AR9300_DEVID_AR9565:
 	case AR9300_DEVID_AR953X:
 	case AR9300_DEVID_QCA956X:
+	case AR9300_DEVID_QCN550X:
 		break;
 	default:
 		if (common->bus_ops->ath_bus_type == ATH_USB)
@@ -3315,6 +3320,7 @@ static struct {
 	{ AR_SREV_VERSION_9565,         "9565" },
 	{ AR_SREV_VERSION_9531,         "9531" },
 	{ AR_SREV_VERSION_9561,         "9561" },
+	{ AR_SREV_VERSION_5502,         "5502" },
 };
 
 /* For devices with external radios */
diff --git a/drivers/net/wireless/ath/ath9k/hw.h b/drivers/net/wireless/ath/ath9k/hw.h
index 096a206f4..759a5991a 100644
--- a/drivers/net/wireless/ath/ath9k/hw.h
+++ b/drivers/net/wireless/ath/ath9k/hw.h
@@ -56,6 +56,7 @@
 #define AR9300_DEVID_AR9565     0x0036
 #define AR9300_DEVID_AR953X     0x003d
 #define AR9300_DEVID_QCA956X    0x003f
+#define AR9300_DEVID_QCN550X    0x0040
 
 #define AR5416_AR9100_DEVID	0x000b
 
diff --git a/drivers/net/wireless/ath/ath9k/reg.h b/drivers/net/wireless/ath/ath9k/reg.h
index 8983ea6fc..5a07cf7d8 100644
--- a/drivers/net/wireless/ath/ath9k/reg.h
+++ b/drivers/net/wireless/ath/ath9k/reg.h
@@ -825,6 +825,7 @@
 #define AR_SREV_REVISION_9531_11        1
 #define AR_SREV_REVISION_9531_20        2
 #define AR_SREV_VERSION_9561            0x600
+#define AR_SREV_VERSION_5502            0x700
 
 #define AR_SREV_5416(_ah) \
 	(((_ah)->hw_version.macVersion == AR_SREV_VERSION_5416_PCI) || \
@@ -992,10 +993,12 @@
 
 #define AR_SREV_9561(_ah) \
 	(((_ah)->hw_version.macVersion == AR_SREV_VERSION_9561))
+#define AR_SREV_5502(_ah) \
+	(((_ah)->hw_version.macVersion == AR_SREV_VERSION_5502))
 
 #define AR_SREV_SOC(_ah) \
 	(AR_SREV_9340(_ah) || AR_SREV_9531(_ah) || AR_SREV_9550(_ah) || \
-	 AR_SREV_9561(_ah))
+	 AR_SREV_9561(_ah) || AR_SREV_5502(_ah))
 
 /* NOTE: When adding chips newer than Peacock, add chip check here */
 #define AR_SREV_9580_10_OR_LATER(_ah) \
-- 
2.25.1


  reply	other threads:[~2022-04-18  7:20 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-18  7:13 [PATCH 0/9] ath9k: add support for QCN550x Wenli Looi
2022-04-18  7:13 ` Wenli Looi [this message]
2022-04-20 12:00   ` [PATCH 1/9] ath9k: add QCN550x device IDs Kalle Valo
2022-04-18  7:13 ` [PATCH 2/9] ath9k: basic support for QCN550x Wenli Looi
2022-04-20 12:01   ` Kalle Valo
2022-04-18  7:13 ` [PATCH 3/9] ath9k: add QCN550x initvals Wenli Looi
2022-04-18  7:13 ` [PATCH 4/9] ath9k: implement QCN550x rx Wenli Looi
2022-04-18  7:13 ` [PATCH 5/9] ath9k: implement QCN550x tx Wenli Looi
2022-04-18  7:13 ` [PATCH 6/9] ath9k: group some ar9300 eeprom functions at the top Wenli Looi
2022-04-18  7:13 ` [PATCH 7/9] ath9k: add abstractions over ar9300 eeprom Wenli Looi
2022-04-18  7:13 ` [PATCH 8/9] ath9k: rename ar9300_eeprom to ar9300_eeprom_v1 Wenli Looi
2022-04-18  7:13 ` [PATCH 9/9] ath9k: add ar9300_eeprom_v2 Wenli Looi
2022-05-10 18:39 ` [PATCH 0/9] ath9k: add support for QCN550x Wenli Looi
2022-05-11  4:39   ` Kalle Valo
2022-05-11  9:54     ` Toke Høiland-Jørgensen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220418071313.882179-2-wlooi@ucalgary.ca \
    --to=wlooi@ucalgary.ca \
    --cc=ath9k-devel@qca.qualcomm.com \
    --cc=kvalo@kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=toke@toke.dk \
    --subject='Re: [PATCH 1/9] ath9k: add QCN550x device IDs' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).