1d2912cb1SThomas Gleixner /* SPDX-License-Identifier: GPL-2.0-only */
2f1d2b4d3SLarry Finger /*
3f1d2b4d3SLarry Finger * Radio tuning definitions for RTL8225 on RTL8187
4f1d2b4d3SLarry Finger *
5f1d2b4d3SLarry Finger * Copyright 2007 Michael Wu <flamingice@sourmilk.net>
6f1d2b4d3SLarry Finger * Copyright 2007 Andrea Merello <andrea.merello@gmail.com>
7f1d2b4d3SLarry Finger *
8f1d2b4d3SLarry Finger * Based on the r8187 driver, which is:
9f1d2b4d3SLarry Finger * Copyright 2005 Andrea Merello <andrea.merello@gmail.com>, et al.
10f1d2b4d3SLarry Finger */
11f1d2b4d3SLarry Finger
12f1d2b4d3SLarry Finger #ifndef RTL8187_RTL8225_H
13f1d2b4d3SLarry Finger #define RTL8187_RTL8225_H
14f1d2b4d3SLarry Finger
15f1d2b4d3SLarry Finger #define RTL8187_RTL8225_ANAPARAM_ON 0xa0000a59
16f1d2b4d3SLarry Finger #define RTL8187_RTL8225_ANAPARAM2_ON 0x860c7312
17f1d2b4d3SLarry Finger #define RTL8187_RTL8225_ANAPARAM_OFF 0xa00beb59
18f1d2b4d3SLarry Finger #define RTL8187_RTL8225_ANAPARAM2_OFF 0x840dec11
19f1d2b4d3SLarry Finger
20f1d2b4d3SLarry Finger #define RTL8187B_RTL8225_ANAPARAM_ON 0x45090658
21f1d2b4d3SLarry Finger #define RTL8187B_RTL8225_ANAPARAM2_ON 0x727f3f52
22f1d2b4d3SLarry Finger #define RTL8187B_RTL8225_ANAPARAM3_ON 0x00
23f1d2b4d3SLarry Finger #define RTL8187B_RTL8225_ANAPARAM_OFF 0x55480658
24f1d2b4d3SLarry Finger #define RTL8187B_RTL8225_ANAPARAM2_OFF 0x72003f50
25f1d2b4d3SLarry Finger #define RTL8187B_RTL8225_ANAPARAM3_OFF 0x00
26f1d2b4d3SLarry Finger
27f1d2b4d3SLarry Finger const struct rtl818x_rf_ops * rtl8187_detect_rf(struct ieee80211_hw *);
28f1d2b4d3SLarry Finger
rtl8225_write_phy_ofdm(struct ieee80211_hw * dev,u8 addr,u32 data)29f1d2b4d3SLarry Finger static inline void rtl8225_write_phy_ofdm(struct ieee80211_hw *dev,
30f1d2b4d3SLarry Finger u8 addr, u32 data)
31f1d2b4d3SLarry Finger {
32f1d2b4d3SLarry Finger rtl8187_write_phy(dev, addr, data);
33f1d2b4d3SLarry Finger }
34f1d2b4d3SLarry Finger
rtl8225_write_phy_cck(struct ieee80211_hw * dev,u8 addr,u32 data)35f1d2b4d3SLarry Finger static inline void rtl8225_write_phy_cck(struct ieee80211_hw *dev,
36f1d2b4d3SLarry Finger u8 addr, u32 data)
37f1d2b4d3SLarry Finger {
38f1d2b4d3SLarry Finger rtl8187_write_phy(dev, addr, data | 0x10000);
39f1d2b4d3SLarry Finger }
40f1d2b4d3SLarry Finger
41f1d2b4d3SLarry Finger #endif /* RTL8187_RTL8225_H */
42