Open main menu

DAVE Developer's Wiki β

Changes

DESK-MP1-L/Peripherals/DWS

369 bytes added, 8 January
no edit summary
!colspan="4" style="width:100%; text-align:left"; border-bottom:solid 2px #ededed"|History
|-
!style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#73B2C7; padding:5px; color:white"|ID#
!style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#73B2C7; padding:5px; color:white"|Issue Date
!style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#73B2C7; padding:5px; color:white"|Notes
|-
|style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000"|X.Y.Z{{oldid|style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000"18197|012023/08/202301}}
|style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000"|DESK-MP1-L-1.0.0 release
|-
!style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#ededed; padding:5px; color:#000000"|2023/08/31
!style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#ededed; padding:5px; color:#000000"|DESK-MP1-L-1.0.1 release
|-
|}
<section begin=Body/>
== Pheripheral DWS ==
The [[DWS_ADD-ON | DWS add-on module]] present on [[ETRA_SOM/ETRA_Evaluation_Kit | ETRA EVK ]] it used to have the Wireless and Bluetooth connection.
The binary provided in the kit and the downloadable binary [[mirror:desk-mp1-l/desk-mp1-l-1.0.01/desk-image-qt5-openstlinux-weston-desk-mp1.wic.bz2 | desk-image-qt5-openstlinux-weston-desk-mp1.wic.bz2]], if the DWS module is present, the drivers for the wireless and Bluetooth connection will automatically start.
The Bluetooth and the wireless connection are managed with <code>rfkill</code>.
=== Rfkill Device tree configuration === The wireless connection module is automatically added among the rfkill devices, it does not need a configuration on the device tree Instead for has three sections devoted to the Bluetooth driver it is necessary to set a wireless subsystems configuration, i.e. <code>rfkill_gpiowifi</code>, device tree configuration: <precode>....../{ ... ... bt_rfkill { compatible = "net,rfkill-gpio"; name = "bt_rfkill"; type = "bluetooth"; reset-gpios = <&gpioe 7 GPIO_ACTIVE_HIGH>; }; ... ...};......</precodeKernel message at boot: , <pre class="workstation-terminal"code>[ 2.527639] rfkill_gpio bt_rfkill: bt_rfkill device registered.rfkill</precode>
device managed with rfkill: <pre class="workstation-terminal">root@desk-mp1:~# rfkillID TYPE DEVICE SOFT HARD 0 bluetooth bt_rfkill unblocked unblocked 1 wlan phy0 unblocked unblocked</pre> === Wireless connection Wifi ====
The wireless driver is a module built out of tree, the source is present only in the bsp, the module in question therefore cannot be built having only the kernel source code
The communication bus used is the one destined for the sdmmc3.
Kernel device tree: <pre class="workstation-terminal">
...
...
</pre>
Kernel message ==== Bluetooth ===={{ImportantMessage|text='''Bluetooth hardware configuration has shared pins in conflict with the NOR memory option''' The gpios used for the serial bus to use Bluetooth in the DWS are shared with the SPI bus to communicate with the NOR. If the BT interface is required the NOR memory cannot be used and vice versa}} <pre class>....../ { ... ... aliases{ ... ... serial3 = &uart7; ... ... }; ... ...};......&pinctrl{ uart7_pins_mx: uart7_mx-0 { pins1 { pinmux = <STM32_PINMUX('F', 6, AF7)>, /* UART7_RX */ <STM32_PINMUX('F', 9, AF7)>; /* UART7_CTS */ bias-disable; }; pins2 { pinmux = <STM32_PINMUX('F', 7, AF7)>, /* UART7_TX */ <STM32_PINMUX('F', 8, AF7)>; /* UART7_RTS */ bias-disable; drive-push-pull; slew-rate = <0>; }; };  uart7_sleep_pins_mx: uart7_sleep_mx-0 { pins { pinmux = <STM32_PINMUX('F', 6, ANALOG)>, /* UART7_RX */ <STM32_PINMUX('F', 7, ANALOG)>, /* UART7_TX */ <STM32_PINMUX('F', 8, ANALOG)>, /* UART7_RTS */ <STM32_PINMUX('F', 9, ANALOG)>; /* UART7_CTS */ }; }; };......&qspi{ ... ... status = "disabled"; ... ...};......&uart7{ pinctrl-names = "default", "sleep"; pinctrl-0 = <&uart7_pins_mx>; pinctrl-1 = <&uart7_sleep_pins_mx>; status = "okay";  /* USER CODE BEGIN uart7 */ /delete-property/dmas; /delete-property/dma-names; uart-has-rtscts; /* USER CODE END uart7 */};......</pre> ==== rfkill ==== For the Bluetooth driver it is necessary to add a <code>rfkill_gpio</code> node in the device tree: <pre>....../{ ... ... bt_rfkill { compatible = "net,rfkill-gpio"; name = "bt_rfkill"; type = "bluetooth"; reset-gpios = <&gpioe 7 GPIO_ACTIVE_HIGH>; }; ... ...};......</pre> ===Accessing the peripheral=== ==== rfkill =========Linux messages at boottime===== <pre class="workstation-terminal">[ 2.527639] rfkill_gpio bt_rfkill: bt_rfkill device registered.</pre> ===== Usage ===== <pre class="workstation-terminal">root@desk-mp1:~# rfkillID TYPE DEVICE SOFT HARD 0 bluetooth bt_rfkill unblocked unblocked 1 wlan phy0 unblocked unblocked</pre> So, for example, for enabling the wlan interface: <pre class="workstation-terminal">root@desk-mp1:~# rfkill unblock wlan</pre>  ==== Wifi ==== =====Linux messages at boot time=====
<pre class="workstation-terminal">
</pre>
Use module for connect to a wireless ===== Usage with wpa_supplicant===== Wireless connection with using <code>wpa_supplicant</code>
<pre class="workstation-terminal">
</pre>
There are It is possible to use also the <code>iw</code> commandsapplication:
<pre class="workstation-terminal">
</pre>
==== Bluetooth ==== ===== Usage with ''hci'' =====First of all it is required to open the serial interface to the BT device: <pre class="workstation-terminal">root@desk-mp1:~# stty -F /dev/ttySTM3 3000000 -echo -echoe crtscts</pre> <pre class="workstation-terminal">root@desk-mp1:~# hciattach /dev/ttySTM3 qca 3000000 -t120 flow [...] root@desk-mp1:~# hciconfig hci0 uproot@desk-mp1:~# hcitool devDevices: hci0 00:21:7E:33:1D:5Croot@desk-mp1:~# bluetoothctlAgent registered[CHG] Controller 00:21:7E:33:1D:5C Pairable: yes[bluetooth]# scan onDiscovery started[CHG] Controller 00:21:7E:33:1D:5C Discovering: yes[NEW] Device 61:39:85:BD:57:71 61-39-85-BD-57-71[NEW] Device D4:CA:6E:C1:0E:E8 NINA-B1-C10EE8[CHG] Device 61:39:85:BD:57:71 RSSI: -75[CHG] Device 61:39:85:BD:57:71 ManufacturerData Key: 0x004c[CHG] Device 61:39:85:BD:57:71 ManufacturerData Value: 10 05 2e 18 00 b2 00 .......[NEW] Device 08:97:98:34:48:2C Cat S52 Fox[DEL] Device 61:39:85:BD:57:71 61-39-85-BD-57-71[bluetooth]# scan offDiscovery stopped[CHG] Device 08:97:98:34:48:2C RSSI is nil[CHG] Device D4:CA:6E:C1:0E:E8 TxPower is nil[CHG] Device D4:CA:6E:C1:0E:E8 RSSI is nil[CHG] Controller 00:21:7E:33:1D:5C Discovering: no[bluetooth]# exitroot@desk-mp1:~#</pre> === Boot via NFS ====
If booted via NFS with the RFS present in the supplied MVM, the wireless driver module is present but not mounted automatically, to mount the driver run the command:
ID TYPE DEVICE SOFT HARD
0 bluetooth bt_rfkill unblocked unblocked
root@desk-mp1:~# insmod /lib/modules/5.15.67-desk-mp1-l-1.0.01/extra/wlan.ko
root@desk-mp1:~# dmesg | tail -n 20
[ 21.280405] dwc2 49000000.usb-otg: bound driver configfs-gadget
0 bluetooth bt_rfkill unblocked unblocked
1 wlan phy0 unblocked unblocked
</pre>
 
=== Bluetooth connection ===
 
{{ImportantMessage|text='''Bluetooth conflict with NOR memory'''
 
The gpios used for the serial bus to use Bluetooth in the DWS are shared with the spi bus to communicate with the NOR, bluetooth excludes the possibility of having NOR memory on the board and vice versa, if you want NOR you cannot have bluetooth}}
 
Kernel device tree:
 
<pre class="workstation-terminal">
...
...
/ {
...
...
aliases{
...
...
serial3 = &uart7;
...
...
};
...
...
};
...
...
&pinctrl{
uart7_pins_mx: uart7_mx-0 {
pins1 {
pinmux = <STM32_PINMUX('F', 6, AF7)>, /* UART7_RX */
<STM32_PINMUX('F', 9, AF7)>; /* UART7_CTS */
bias-disable;
};
pins2 {
pinmux = <STM32_PINMUX('F', 7, AF7)>, /* UART7_TX */
<STM32_PINMUX('F', 8, AF7)>; /* UART7_RTS */
bias-disable;
drive-push-pull;
slew-rate = <0>;
};
};
 
uart7_sleep_pins_mx: uart7_sleep_mx-0 {
pins {
pinmux = <STM32_PINMUX('F', 6, ANALOG)>, /* UART7_RX */
<STM32_PINMUX('F', 7, ANALOG)>, /* UART7_TX */
<STM32_PINMUX('F', 8, ANALOG)>, /* UART7_RTS */
<STM32_PINMUX('F', 9, ANALOG)>; /* UART7_CTS */
};
};
 
};
...
...
&qspi{
...
...
status = "disabled";
...
...
};
...
...
&uart7{
pinctrl-names = "default", "sleep";
pinctrl-0 = <&uart7_pins_mx>;
pinctrl-1 = <&uart7_sleep_pins_mx>;
status = "okay";
 
/* USER CODE BEGIN uart7 */
/delete-property/dmas;
/delete-property/dma-names;
uart-has-rtscts;
/* USER CODE END uart7 */
};
...
...
</pre>
 
Example use bluetooth:
 
<pre class="workstation-terminal">
root@desk-mp1:~# gpioset gpiochip4 7=1
root@desk-mp1:~# stty -F /dev/ttySTM3 3000000 -echo -echoe crtscts
root@desk-mp1:~# hciattach /dev/ttySTM3 qca 3000000 -t120 flow
 
[...]
 
root@desk-mp1:~# hciconfig hci0 up
root@desk-mp1:~# hcitool dev
Devices:
hci0 00:21:7E:33:1D:5C
root@desk-mp1:~# bluetoothctl
Agent registered
[CHG] Controller 00:21:7E:33:1D:5C Pairable: yes
[bluetooth]# scan on
Discovery started
[CHG] Controller 00:21:7E:33:1D:5C Discovering: yes
[NEW] Device 61:39:85:BD:57:71 61-39-85-BD-57-71
[NEW] Device D4:CA:6E:C1:0E:E8 NINA-B1-C10EE8
[CHG] Device 61:39:85:BD:57:71 RSSI: -75
[CHG] Device 61:39:85:BD:57:71 ManufacturerData Key: 0x004c
[CHG] Device 61:39:85:BD:57:71 ManufacturerData Value:
10 05 2e 18 00 b2 00 .......
[NEW] Device 08:97:98:34:48:2C Cat S52 Fox
[DEL] Device 61:39:85:BD:57:71 61-39-85-BD-57-71
[bluetooth]# scan off
Discovery stopped
[CHG] Device 08:97:98:34:48:2C RSSI is nil
[CHG] Device D4:CA:6E:C1:0E:E8 TxPower is nil
[CHG] Device D4:CA:6E:C1:0E:E8 RSSI is nil
[CHG] Controller 00:21:7E:33:1D:5C Discovering: no
[bluetooth]# exit
root@desk-mp1:~#
</pre>
----
[[Category:ETRA]] [[Category:ETRA_SBC]]
8,286
edits