Hi NXP,
Per the i.MX6ULL EVK schematic, BT_nPWD is routed to a serial-in-and-parallel-out register.
I am using the default imx6ull-14x14-evk.dts for NXP's i.MX6ULL EVK board.
Is there a way for me to toggle the state of this signal (BT_nPwD) via a Linux's user-space command during run-time?
I guess the alternative is to re-purpose (rewire) the BT_DISABLE, which I don't need for my Bluetooth module.
Thanks!
Dawei
Solved! Go to Solution.
Hi Dawei
in general it is possible as for example below
SPI Example: olinuxino GPIO expander
Best regards
igor
Hi Dawei
BT_nPwD is controlled by 74LV595PW U2101 serial-out shift register
and I am afraid it not can be used directly through linux user-space commands.
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Igor,
Thank you for the clarification.
Is there a way to toggle the state of the signal? (understand it can't be changed via a user-space command.)
dawei
It looks like it can be changed through the DTS file.
gpio_spi: gpio_spi@0 {
compatible = "fairchild,74hc595";
gpio-controller;
#gpio-cells = <2>;
reg = <0>;
registers-number = <1>;
registers-default = /bits/ 8 <0x57>;
spi-max-frequency = <100000>;
Hi Dawei
it is necessary to send to 74LV595 data sequence
for changing that signal. One can look at 74LV595 datasheet
for more details. One can find on web helpful tutorials for gpio expanders, like:
Interfacing an I2C GPIO expander (MCP23017) to the Raspberry Pi using C++ (i2cdev) · Hertaville.com
Best regards
igor
Hi Igor,
I would like to do something quick.
Would I be able to export BT_DISABLE (SNVS_TAMPER1) to sysfs and toggle the state by using the echo command?
If so, would you be able to tell my the correspond GPIO number?
Example:
echo 106 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio106/direction
echo 0 > /sys/class/gpio/gpio106/value
Thanks,
dawei
Hi Dawei
in general it is possible as for example below
SPI Example: olinuxino GPIO expander
Best regards
igor
Thank you very much, Igor.
I was able to export the gpio508 to sysfs and toggle the discrete output (BT_nPWD) state.
By doing an "ls -la" command in the /sys/class/gpio directory command, I was able to see the spi-gpio expander starts with gpio number 504.