Dear Sir/Madam,
I am trying to enable FEM support on zigbee/light bulb, and want to SKY66112-11 FEM working on Receive bypass mode. I set all pins at proper setting at initialzation state but I found all pins always at low level state and I can't change them.
dts:
nrf_radio_fem: fem_skyworks_node {
compatible = "skyworks,sky66112-11", "generic-fem-two-ctrl-pins";
ctx-gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>;
ctx-settle-time-us = <1>;
crx-gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>;
crx-settle-time-us = <1>;
csd-gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>; /* crx and csd connect together */
cps-gpios = <&gpio0 10 GPIO_ACTIVE_HIGH>;
ant-sel-gpios = <&gpio1 7 GPIO_ACTIVE_HIGH>;
rx-gain-db = <11>;
tx-gain-db = <22>;
};
&radio {
status = "okay";
fem = <&nrf_radio_fem>;
};
#if DT_NODE_HAS_PROP(DT_NODELABEL(nrf_radio_fem), ant_sel_gpios)
/* Configure ant_sel_gpios pin as active. */
err = gpio_pin_configure(
DEVICE_DT_GET(DT_GPIO_CTLR(DT_NODELABEL(nrf_radio_fem), ant_sel_gpios)),
DT_GPIO_PIN(DT_NODELABEL(nrf_radio_fem), ant_sel_gpios),
GPIO_OUTPUT_ACTIVE |
DT_GPIO_FLAGS(DT_NODELABEL(nrf_radio_fem), ant_sel_gpios));
LOG_DBG("Configure ant_sel_gpios pin as active.");
if (err) {
return err;
}
#endif
#if DT_NODE_HAS_PROP(DT_NODELABEL(nrf_radio_fem), csd_gpios)
/* Configure csd_gpios pin as active. */
err = gpio_pin_configure(
DEVICE_DT_GET(DT_GPIO_CTLR(DT_NODELABEL(nrf_radio_fem), csd_gpios)),
DT_GPIO_PIN(DT_NODELABEL(nrf_radio_fem), csd_gpios),
GPIO_OUTPUT_ACTIVE |
DT_GPIO_FLAGS(DT_NODELABEL(nrf_radio_fem), csd_gpios));
LOG_DBG("Configure csd_gpios pin as active.");
if (err) {
return err;
}
#endif
#if DT_NODE_HAS_PROP(DT_NODELABEL(nrf_radio_fem), cps_gpios)
/* Configure cps_gpios pin as active. */
err = gpio_pin_configure(
DEVICE_DT_GET(DT_GPIO_CTLR(DT_NODELABEL(nrf_radio_fem), cps_gpios)),
DT_GPIO_PIN(DT_NODELABEL(nrf_radio_fem), cps_gpios),
GPIO_OUTPUT_INACTIVE |
DT_GPIO_FLAGS(DT_NODELABEL(nrf_radio_fem), cps_gpios));
LOG_DBG("Configure cps_gpios pin as active.");
if (err) {
return err;
}
#endif
#if DT_NODE_HAS_PROP(DT_NODELABEL(nrf_radio_fem), crx_gpios)
/* Configure crx_gpios pin as active. */
err = gpio_pin_configure(
DEVICE_DT_GET(DT_GPIO_CTLR(DT_NODELABEL(nrf_radio_fem), crx_gpios)),
DT_GPIO_PIN(DT_NODELABEL(nrf_radio_fem), crx_gpios),
GPIO_OUTPUT_ACTIVE |
DT_GPIO_FLAGS(DT_NODELABEL(nrf_radio_fem), crx_gpios));
LOG_DBG("Configure crx_gpios pin as active.");
if (err) {
return err;
}
#endif
#if DT_NODE_HAS_PROP(DT_NODELABEL(nrf_radio_fem), ctx_gpios)
/* Configure ctx_gpios pin as inactive. */
err = gpio_pin_configure(
DEVICE_DT_GET(DT_GPIO_CTLR(DT_NODELABEL(nrf_radio_fem), ctx_gpios)),
DT_GPIO_PIN(DT_NODELABEL(nrf_radio_fem), ctx_gpios),
GPIO_OUTPUT_INACTIVE |
DT_GPIO_FLAGS(DT_NODELABEL(nrf_radio_fem), ctx_gpios));
LOG_DBG("Configure ctx_gpios pin as active.");
if (err) {
return err;
}
#endif