Skip to content

Commit c57ad67

Browse files
danmoisbuha
authored andcommitted
drivers: navassa: Fix selecting port B on RX2
When using a profile with RX1 on port A and RX2 on port B, RX2 would still receive data on port A. As it turns out, we do have to call adi_adrv9001_Rx_PortSwitch_Configure() even if port switch is disabled. Annoyingly, we also need to put some valid values on the carrier intervals for making the API happy (even if the feature is disabled). Likely this is a bug in the device FW but for now, let's just workaround it like this. And being this a workaround, I'm not giving a Fixes tag. Signed-off-by: George Mois <[email protected]>
1 parent 8418568 commit c57ad67

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

drivers/rf-transceiver/navassa/adrv9002.c

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1716,11 +1716,18 @@ static int adrv9002_radio_init(struct adrv9002_rf_phy *phy)
17161716
if (ret)
17171717
return ret;
17181718

1719-
if (phy->port_switch.enable) {
1720-
ret = api_call(phy, adi_adrv9001_Rx_PortSwitch_Configure, &phy->port_switch);
1721-
if (ret)
1722-
return ret;
1723-
}
1719+
// Values required so that the adi_adrv9001_Rx_PortSwitch_Configure passes
1720+
// (these values are checked even if port switching is not enabled)
1721+
phy->port_switch.minFreqPortA_Hz = 890000000;
1722+
phy->port_switch.maxFreqPortA_Hz = 910000000;
1723+
phy->port_switch.minFreqPortB_Hz = 1890000000;
1724+
phy->port_switch.maxFreqPortB_Hz = 1910000000;
1725+
1726+
// Required to make sure we can properly select port B for RX2 while RX1 is on A
1727+
// or the other way around
1728+
ret = api_call(phy, adi_adrv9001_Rx_PortSwitch_Configure, &phy->port_switch);
1729+
if (ret)
1730+
return ret;
17241731

17251732
for (chan = 0; chan < NO_OS_ARRAY_SIZE(phy->channels); chan++) {
17261733
struct adrv9002_chan *c = phy->channels[chan];

0 commit comments

Comments
 (0)