Changes

Jump to: navigation, search

Physical devices mapping (BELK/BXELK)

2,253 bytes added, 15:23, 5 July 2023
no edit summary
{{Applies To Bora}}
{{Applies To BoraX}}
{{Applies To BoraLite}}
{{InfoBoxBottom}}
This article details how physical devices are handled by the Linux kernel in the context of the [[Bora_Embedded_Linux_Kit_(BELK)|BELK]] and [[BoraX_Embedded_Linux_Kit_(BXELK)|BXELK]] kits.
 
== History ==
{| class="wikitable" border="1"
!Version
!Date
!BELK/BXELK version
!Notes
|-
|{{oldid|8547|1.0.0}}
|Apr 2019
|[[BELK/BXELK_software_components#BELK_3.0.2_.2F_BXELK_1.0.1|3.0.0]]
|BELK 3.0.0
|-
|2.0.0
|Jan 2020
|[[BELK/BXELK_software_components#BELK_4.1.0|4.1.0]]
|Updated for BELK/BXELK 4.1.0
|-
|}
 
<section begin=Console/>
==Console UART==
{| class="wikitable"
|-
|}
<section end=Console/>
<section begin=Ethernet/>
==Ethernet==
Ethernet port is associated to <code>eth0</code> interface on the J8 connector. It can be managed with standard Linux commands. See for example http://www.tecmint.com/ifconfig-command-examples/.
 
=== LED ===
The two LEDs, connected to the ethernet PHY are configured as ''Tri-color dual-LED mode'' (see more info in the [https://ww1.microchip.com/downloads/en/DeviceDoc/00002117F.pdf#page=24 KSZ9031 datasheet]): link/activity for 100mbit/s and link/activity/ for 1000mbit/s.
 
<section end=Ethernet/>
 
<section begin=micro SD/>
==microSD card==
root@bora:~#
</pre>
<section end=micro SD/>
<section begin=NOR_NAND/>
==NOR and NAND flash==
{{ImportantMessage|text=NOR and NAND flash memories cannot be accessed at the same time because they shares some Zynq pins. In U-boot the switching between accesses to NOR and NAND is automatically done by U-boot itself. By default in kernel only NAND flash can be accessed. For NOR support in kernel please contact [mailto:support-bora@dave.eu technical support].}}
NOR and NAND flashes are managed as [[Memory_Tecnology_Device_(MTD)|MTD devices]].
Generally speaking, NAND flash memory is partitons partitions are defined using the kernel command line:<pre>Bora> pri mtdpartsmtdparts=mtdparts=pl35x-nand:256K(spl),768K(uboot),256K(env1),256K(env2),6M(fpga),512K(fdt),8M(kernel),-(nand-ubi)Bora></pre>adding <code>addmisc</code> to the <code>bootargs</code> parameters list. The kernel ''dmesg'' will configure the NAND partitions in the devitetreefollowing way
<pre>
partition@[ 1.148350] Creating 8 MTD partitions on "pl35x-nand":[ 1.153486] 0x000000000000-partition-table { label = 0x000000040000 : "nand-SPLspl"; reg = <0x0 0x80000>; }; partition@nand[ 1.170502] 0x000000040000-uboot { label = 0x000000100000 : "nand-uboot"; reg = <0x80000 0x80000>; }; partition@nand-uboot[ 1.186404] 0x000000100000-env1 { label = 0x000000140000 : "nand-uboot-env1"; reg = <0x100000 0x40000>; }; partition@nand-uboot[ 1.202301] 0x000000140000-env2 { label = 0x000000180000 : "nand-uboot-env2"; reg = <0x140000 0x40000>; }; partition@nand[ 1.218170] 0x000000180000-bitstream { label = 0x000000780000 : "nand-bitstreamfpga"; reg = <0x180000 0x440000>; }; partition@nand-device[ 1.229456] 0x000000780000-tree { label = 0x000000800000 : "nand-device-treefdt"; reg = <0x5C0000 0x40000>; }; partition@nand[ 1.237981] 0x000000800000-linux { label = 0x000001000000 : "nand-linuxkernel"; reg = <0x600000 0x400000>; }; partition@nand[ 1.244063] 0x000001000000-rootfs { label = 0x000040000000 : "nand-rootfsubi"; reg = <0xA00000 0x1F600000>; };
</pre>
defines these partitions:
<pre>
root@bora:~# cat /proc/mtd
dev: size erasesize name
mtd0: 00080000 00040000 00020000 "nand-SPLspl"mtd1: 00080000 000c0000 00020000 "nand-uboot"mtd2: 00040000 00020000 "nand-uboot-env1"mtd3: 00040000 00020000 "nand-uboot-env2"mtd4: 00440000 00600000 00020000 "nand-bitstreamfpga"mtd5: 00040000 00080000 00020000 "nand-device-treefdt"mtd6: 00400000 00800000 00020000 "nand-linuxkernel"mtd7: 1f600000 3f000000 00020000 "nand-rootfsubi"
</pre>
<section end=NOR_NAND/>
<section begin=USB OTG/>
==USB OTG==
===Host mode===
On PC side, BoraEVB (or BoraXEVB) is detected as a common USB mass storage device.
<section end=USB OTG/>
<section begin=CAN/>
==CAN==
See [[BoraXEVB#CAN_-_J24 BORA_Xpress_SOM/BORA_Xpress_Evaluation_Kit/Interfaces_and_Connectors/CAN | CAN Pinout]] page and [[Creating_and_building_example_Vivado_project_(BORA_SOM/BELK-L/Development/BXELK) Creating_and_building_a_Vivado_example | BXELK Vivado project]] for more details.
{| class="wikitable"
----
In case <code>canutils</code> package is missing, user can install it directly from DAVE's [[TODO|http://yocto.dave.eu/belk-latest/ BORA package server]] using <code>smart update && smart install canutils</code> commands: 
<pre>
[..snip..]
</pre>
 
See [[BORA_SOM/BELK-L/Development/Advanced_use_of_Yocto_build_system | Advanced use of Yocto build system]] for more information about using Yocto packages and <code>smart</code>
<section end=CAN/>
 
<section begin=UART0/>
==UART0==
UART0 is a spare UART device available on the JP17 PMOD connector. This device is routed through the PL.
See [[Creating_and_building_example_Vivado_project_(BORA_SOM/BELK-L/Development/BXELK) Creating_and_building_a_Vivado_example | BXELK Vivado project]] for more details.
{| class="wikitable"
|-
|}
<section end=UART0/>
 
<section begin=Temperature sensors/>
== Temperature sensor sensors ==
Bora SOM has a [http://www.ti.com/lit/ds/symlink/tmp422.pdf TMP421AIDCN] temperature sensor onboard.
echo "Cpu Temp: ${TEMP}"
</pre>
<section end=Temperature sensors/>
 
<section begin=Power meter/>
 
== Power consumption ==
 
Power consumption measure can be performed accessing the [https://www.ti.com/lit/ds/symlink/ina226.pdf INA226] device connected to the I2C bus in the BoraEVB (U3). The following commands can be saved as a shell script (e.g. read_power_values) and run to collect the measurements data:
 
<pre>
root@bora:~# cat read_power_values.sh
#!/bin/sh
 
path_dev=/sys/class/hwmon/hwmon0
 
IN1=`cat $path_dev/in1_input`
IN0=`cat $path_dev/in0_input`
VOLTAGE=`awk "BEGIN {print ($IN1-$IN0)/1000}"`
CURRENT=`cat $path_dev/curr1_input`
CURRENT=`awk "BEGIN {print ($CURRENT)/1000}"`
POWER=`cat $path_dev/power1_input`
POWER=`awk "BEGIN {print ($POWER)/1000000}"`
echo "Voltage: ${VOLTAGE}, Current: ${CURRENT}, Power:${POWER}"
</pre>
 
<pre>
root@bora:~# ./read_power_values.sh
Voltage: 3.308, Current: 0.64, Power:2.175
root@bora:~#
</pre>
 
<section end=Power meter/>
8,183
edits

Navigation menu