This article talks about how to use the echo command in user space to implement GPIO for a device tree driver.
For related subjects, please refer to the SOC Table of Contents.
We will now start testing and configuring the system. We can start by mounting both the SD card partitions.
mount /dev/mmcblk0p1 /mnt/sd_1
mount /dev/mmcblk0p2 /mnt/sd_2
As we can see, both the partitions are now successfully mounted and accessible.
We can now test to see if the /dev directory has successfully loaded the fii-dt-driver driver by executing the following:
ls -l /dev/fii-dt-driver
If it exists, it means that the driver was successfully loaded.
Next, we will go on to set up the DDR by using the following commands:
echo d 0000 > /dev/fii-dt-driver