@@ -649,9 +649,9 @@ config BT_CTLR_GPIO_PA_POL_INV
649649config BT_CTLR_GPIO_PA_OFFSET
650650 int "Time from PA ON to Tx ready"
651651 default 5
652- range 0 10
652+ range 0 15
653653 help
654- Time before Tx ready to turn on PA.
654+ Time before Tx ready to turn on PA in micro seconds .
655655
656656endif # BT_CTLR_GPIO_PA
657657
@@ -680,12 +680,57 @@ config BT_CTLR_GPIO_LNA_POL_INV
680680config BT_CTLR_GPIO_LNA_OFFSET
681681 int "Time from LNA ON to Rx ready"
682682 default 5
683- range 0 10
683+ range 0 15
684684 help
685- Time before Rx ready to turn on LNA.
685+ Time before Rx ready to turn on LNA in micro seconds .
686686
687687endif # BT_CTLR_GPIO_LNA
688688
689+ menuconfig BT_CTLR_FEM_NRF21540
690+ bool "nRF21540 GPIO interface"
691+ depends on !SOC_SERIES_NRF51X
692+ select BT_CTLR_GPIO_PA
693+ select BT_CTLR_GPIO_LNA
694+ help
695+ Enable PDN and CSN GPIO interface for the nRF21540. This allows
696+ hardware designs using the nRF21540 to let the controller toggle
697+ their state based on radio activity.
698+
699+ if BT_CTLR_FEM_NRF21540
700+
701+ config BT_CTLR_GPIO_PDN_PIN
702+ int "FEM PDN pin number"
703+ range 0 47 if SOC_NRF52840 || SOC_NRF5340_CPUNET
704+ range 0 31
705+ help
706+ GPIO Pin number connected to the PDN pin of the nRF21540 FEM.
707+
708+ config BT_CTLR_GPIO_PDN_POL_INV
709+ bool "Inverted polarity for the PDN pin"
710+ help
711+ Enable inverted polarity (active low) for the PDN pin.
712+
713+ config BT_CTLR_GPIO_CSN_PIN
714+ int "FEM CSN pin number"
715+ range 0 47 if SOC_NRF52840 || SOC_NRF5340_CPUNET
716+ range 0 31
717+ help
718+ GPIO Pin number connected to the CSN pin of the nRF21540 FEM.
719+
720+ config BT_CTLR_GPIO_CSN_POL_INV
721+ bool "Inverted polarity for the CSN pin"
722+ default y
723+ help
724+ Enable inverted polarity (active low) for the CSN pin.
725+
726+ config BT_CTLR_GPIO_PDN_CSN_OFFSET
727+ int "Time from PDN and CSN toggle to PA/LNA pin toggle"
728+ range 0 20
729+ help
730+ Time from PDN and CSN toggle to PA/LNA pin toggle in micro seconds.
731+
732+ endif # BT_CTLR_FEM_NRF21540
733+
689734config BT_CTLR_PA_LNA_GPIOTE_CHAN
690735 # Hidden "nRF5 GPIO PA/LNA GPIOTE Channel"
691736 int
@@ -695,6 +740,24 @@ config BT_CTLR_PA_LNA_GPIOTE_CHAN
695740 help
696741 Select the nRF5 GPIOTE channel to use for PA/LNA GPIO feature.
697742
743+ config BT_CTLR_PDN_GPIOTE_CHAN
744+ # Hidden "nRF5 GPIO FEM PDN GPIOTE Channel"
745+ int
746+ depends on SOC_FAMILY_NRF && BT_CTLR_FEM_NRF21540
747+ default 4 if PWM_NRF5_SW
748+ default 1
749+ help
750+ Select the nRF5 GPIOTE channel to use for FEM PDN GPIO pin toggle.
751+
752+ config BT_CTLR_CSN_GPIOTE_CHAN
753+ # Hidden "nRF5 GPIO FEM CSN GPIOTE Channel"
754+ int
755+ depends on SOC_FAMILY_NRF && BT_CTLR_FEM_NRF21540
756+ default 5 if PWM_NRF5_SW
757+ default 2
758+ help
759+ Select the nRF5 GPIOTE channel to use for FEM CSN GPIO pin toggle.
760+
698761comment "BLE Controller debug configuration"
699762
700763config BT_CTLR_PROFILE_ISR
0 commit comments