From 568113c0a9053cdb14aa87e93bf4c7f2835a4497 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Spockeli?= Date: Mon, 11 Jan 2021 21:33:23 +0100 Subject: [PATCH] Bluetooth: controller: Add Kconfig options for nRF21540 PDN and CSN pins MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added Kconfig options for nRF21540 PDN and CSN pins. Signed-off-by: Bjørn Spockeli Signed-off-by: Vinayak Kariappa Chettimada --- .../bluetooth/controller/Kconfig.ll_sw_split | 71 +++++++++++++++++-- 1 file changed, 67 insertions(+), 4 deletions(-) diff --git a/subsys/bluetooth/controller/Kconfig.ll_sw_split b/subsys/bluetooth/controller/Kconfig.ll_sw_split index bc2763f6529..ed1b8d3da65 100644 --- a/subsys/bluetooth/controller/Kconfig.ll_sw_split +++ b/subsys/bluetooth/controller/Kconfig.ll_sw_split @@ -649,9 +649,9 @@ config BT_CTLR_GPIO_PA_POL_INV config BT_CTLR_GPIO_PA_OFFSET int "Time from PA ON to Tx ready" default 5 - range 0 10 + range 0 15 help - Time before Tx ready to turn on PA. + Time before Tx ready to turn on PA in micro seconds. endif # BT_CTLR_GPIO_PA @@ -680,12 +680,57 @@ config BT_CTLR_GPIO_LNA_POL_INV config BT_CTLR_GPIO_LNA_OFFSET int "Time from LNA ON to Rx ready" default 5 - range 0 10 + range 0 15 help - Time before Rx ready to turn on LNA. + Time before Rx ready to turn on LNA in micro seconds. endif # BT_CTLR_GPIO_LNA +menuconfig BT_CTLR_FEM_NRF21540 + bool "nRF21540 GPIO interface" + depends on !SOC_SERIES_NRF51X + select BT_CTLR_GPIO_PA + select BT_CTLR_GPIO_LNA + help + Enable PDN and CSN GPIO interface for the nRF21540. This allows + hardware designs using the nRF21540 to let the controller toggle + their state based on radio activity. + +if BT_CTLR_FEM_NRF21540 + +config BT_CTLR_GPIO_PDN_PIN + int "FEM PDN pin number" + range 0 47 if SOC_NRF52840 || SOC_NRF5340_CPUNET + range 0 31 + help + GPIO Pin number connected to the PDN pin of the nRF21540 FEM. + +config BT_CTLR_GPIO_PDN_POL_INV + bool "Inverted polarity for the PDN pin" + help + Enable inverted polarity (active low) for the PDN pin. + +config BT_CTLR_GPIO_CSN_PIN + int "FEM CSN pin number" + range 0 47 if SOC_NRF52840 || SOC_NRF5340_CPUNET + range 0 31 + help + GPIO Pin number connected to the CSN pin of the nRF21540 FEM. + +config BT_CTLR_GPIO_CSN_POL_INV + bool "Inverted polarity for the CSN pin" + default y + help + Enable inverted polarity (active low) for the CSN pin. + +config BT_CTLR_GPIO_PDN_CSN_OFFSET + int "Time from PDN and CSN toggle to PA/LNA pin toggle" + range 0 20 + help + Time from PDN and CSN toggle to PA/LNA pin toggle in micro seconds. + +endif # BT_CTLR_FEM_NRF21540 + config BT_CTLR_PA_LNA_GPIOTE_CHAN # Hidden "nRF5 GPIO PA/LNA GPIOTE Channel" int @@ -695,6 +740,24 @@ config BT_CTLR_PA_LNA_GPIOTE_CHAN help Select the nRF5 GPIOTE channel to use for PA/LNA GPIO feature. +config BT_CTLR_PDN_GPIOTE_CHAN + # Hidden "nRF5 GPIO FEM PDN GPIOTE Channel" + int + depends on SOC_FAMILY_NRF && BT_CTLR_FEM_NRF21540 + default 4 if PWM_NRF5_SW + default 1 + help + Select the nRF5 GPIOTE channel to use for FEM PDN GPIO pin toggle. + +config BT_CTLR_CSN_GPIOTE_CHAN + # Hidden "nRF5 GPIO FEM CSN GPIOTE Channel" + int + depends on SOC_FAMILY_NRF && BT_CTLR_FEM_NRF21540 + default 5 if PWM_NRF5_SW + default 2 + help + Select the nRF5 GPIOTE channel to use for FEM CSN GPIO pin toggle. + comment "BLE Controller debug configuration" config BT_CTLR_PROFILE_ISR