May 06, 2024, 11:58:37 PM

Recent posts

#81
A20 / Re: LIME2 Rev.L lock-up freeze...
Last post by LubOlimex - April 04, 2024, 08:23:35 AM
Do you boot from the eMMC?

Can you check what is the revision of the stable board?

Is your Linux image based on Olimage?

How do you power the board and do you have a Li-Po battery?

Differences between revision K and latest L1 had been quite significant. Most notably the eMMC and the RAM are different, so it is probably something about support of those two in your image. You can check hardware changes here:

https://github.com/OLIMEX/OLINUXINO/blob/master/HARDWARE/A20-OLinuXino-LIME2/hardware_revision_changes_log.txt
#82
ESP32 / Re: Help with Hardware
Last post by LubOlimex - April 04, 2024, 08:13:25 AM
GPIO36 is not GPIO regarding the ESP32 board, it is only input hence the name in our documentation GPI36. So maybe swap 3 and 8.
#83
A20 / Re: LIME2 Rev.L lock-up freeze...
Last post by faraz - April 04, 2024, 07:12:09 AM
So, more people are facing the same issue. I am not alone.
What solved my problems partially, was I masked the reboot and shutdown commands.
I have good uptime on one site and issues on the other.
Not sure what revision board is on the site that's been up (uptime almost a year now). The site that's going off is using Rev L boards.

I am going to implement the scaling option suggested above and see if that helps. and also learn how I can configure a watchdog to reboot the system.
I am also logging current_now, voltage_now and Temperature_now values.
#84
A20 / Re: Booting LIME2 from the eMM...
Last post by Oscarhoughton - April 03, 2024, 05:40:24 PM
Thank you for your questions and answers. I have fixed my problem
#85
ESP32 / Re: Help with Hardware
Last post by geertv - April 03, 2024, 05:23:55 PM
Hi, seems I am exactly looking into the same thing.
The RF module is the CC1101, which is available as a board E07-M1101D-SMA compatible with ESP32.
This should be the pin reference for E07-M1101D:
Pin   Description      ESP Pin
1   GND         GND
2   VCC         3v3
3   GDO0 - This is the TX Pin   GPIO 04
4   CSN         GPIO 13
5   SCK         GPIO 14
6   MOSI         GPIO 15
7   MISO         GPIO 16
8   GDO2 - This is the RX pin   GPIO 36

Would a UEXT module be an option ?
#86
A20 / Disable USB HOST Port
Last post by dlombardo - April 03, 2024, 02:50:55 PM
Hi,

In Jessie (Kernel 3.4) Image USB ports can be easily controlled using GPIO port for controlling its SY6280.

Example:
# USB port 1 (higher) - max 1000 mA
# Init
echo 66 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio66_ph6/direction
# Turn ON
echo 1 > /sys/class/gpio/gpio66_ph6/value
# Turn OFF
echo 0 > /sys/class/gpio/gpio66_ph6/value

# USB port 2 (lower) - max. 523 mA
# Init
echo 67 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio67_ph3/direction
# Turn ON
echo 1 > /sys/class/gpio/gpio67_ph3/value
# Turn OFF
echo 1 > /sys/class/gpio/gpio67_ph3/value


In current Debian 11 Bullseye image the USB ports are no longer easy to control.

The GPIO ports are taken by USB (vbus) driver
# cat /sys/kernel/debug/gpio | grep -i usb
 gpio-41  (                    |usb0-vbus           ) out lo
 gpio-227 (                    |usb2-vbus           ) out hi
 gpio-228 (                    |usb0_id_det         ) in  hi IRQ
 gpio-229 (                    |usb0_vbus_det       ) in  lo IRQ
 gpio-230 (                    |usb1-vbus           ) out hi

and I can only temporary disable USB port by using unbind example for USB port 2
echo "4-1" > /sys/bus/usb/drivers/usb/unbind

The problem is this can allow USB device to 'wakeup' and gets auto bind again e.g. USB screen upon touching.

I would like the device to be disabled until I make manual bind
echo "4-1" > /sys/bus/usb/drivers/usb/bind

This might not happen with initial setup I had done with image in 2021 (Ubuntu), when I discovered and tested unbind/bind with USB Touch device but I have upgraded the system and now I can confirm the USB Touch device gets auto bind upon touch and unbind is no longer usefull, except maybe for device reset request.

I have this behaviour with latest Debian Bullseye image and one I have from 2022.

Can I get control over USB Host GPIO control again in Mainline linux Image?

I do not find any setup for USB in the Olimex Device Tree overlays - https://github.com/OLIMEX/olinuxino-overlays.git


#87
A20 / Re: Interrupt EINT31(PI19)
Last post by LubOlimex - April 03, 2024, 09:05:29 AM
It is similar to this:

https://www.olimex.com/forum/index.php?topic=4400.0

EINT are already supported in older sunxi images, and can be used as described in here:

https://github.com/OLIMEX/OLINUXINO/blob/master/SOFTWARE/A20/A20-build-3.4.103-release-7/USAGE-AND-COMMON-PRACTICEs-A20-Olimex_kernel_3.4.103%2B_Jessie_rel_3.txt

Older sunxi images can be found at our FTP.
#88
STMP1 / Re: Olimex STMP1 SOM - Error s...
Last post by LubOlimex - April 03, 2024, 08:42:46 AM
Yes, we are working on it. As I wrote previously: "Currently, we are prototyping a number of test boards around the AXP209 to exhaust all hardware scenarios." These PCBs were manufactured and tests are currently carried away. This can't be done very quick since there is a lot of hardware tinkering and soldering and empirical testing to reach to the bottom of the issue.
#89
A20 / Re: Interrupt EINT31(PI19)
Last post by Starkafan - April 03, 2024, 08:04:43 AM
Quote from: LubOlimex on March 29, 2024, 10:18:50 AMWhat image do you use? For older images you need to edit the fex/bin and define it is for that function (and remove the pin from other usages). It is similar for newer Olimage images but instead of fex/bin you need to change the DTS.

Thank You! I'm use DTS (sun7i-a20-olinuxino-lime2.dts).
1. What to write in dts?
2. How to enable an interrupt in a C program?
#90
A20 / Re: Disable backlight on LCD
Last post by dlombardo - April 03, 2024, 01:10:19 AM
It might be good for closure if somebody is searching for the same.

The LCD control of brightness and backlight power is possible on both legacy Kernel 3.4 and mainline Kernel 5.10 Debian 11 Bullseye images.

For dimming the LCD I have posted a solution in forum reply https://www.olimex.com/forum/index.php?topic=2862.0
Where also the final standby - turning off the LCD is described.

On Kernel 3.4 the monitor power is managed by GPIO and if GPIO is not enabled, then it must be enabled by setting the script.fex -> script.bin file.

On mainline Debian 11 Bullseye image I have managed to controll Display standby / power by either:
  • Disabling power-manager in XFCE and using xset dpms
  • Controlling GPIO by updating Device Tree
but the first option is less demanding and works great once you know what to do :)

For the later option of changing the Device Tree some notes for reference.

Initially Olimex overlay is using LCD enable GPIO in a way that it can not be controlled by setting its value.

Firstly we need to get the Device Tree source and Device Tree Compiler [dtc]
Tested in Ubuntu 18.04 and 20.04.


git clone --depth 1 --recurse-submodules --shallow-submodules https://github.com/OLIMEX/olinuxino-overlays.git
sudo apt-get install device-tree-compiler

Setting up the Device Tree source
cd olinuxino-overlays/sun7i-a20/A20-OLinuXino-Micro
vi micro-lcd-olinuxino-10.dts
where reference to GPIO can be commented out and thus disables default control
enable-gpios = <&pio 7 8 0>;
change to
// Disabling for manual control (DL 20211014) enable-gpios = <&pio 7 8 0>;

Build only this Device tree (dont mind the warnings :o as default Olimex makefile builds with -q (quiet) anyways)
dtc -@ -I dts -O dtb -o micro-lcd-olinuxino-10.dtbo micro-lcd-olinuxino-10.dts

micro-lcd-olinuxino-10.dtbo: Warning (reg_format): "reg" property in /fragment@3/__overlay__/endpoint@0 has invalid length (4 bytes) (#address-cells == 2, #size-cells == 1)
micro-lcd-olinuxino-10.dtbo: Warning (unit_address_vs_reg): Node /fragment@0 has a unit name, but no reg property
micro-lcd-olinuxino-10.dtbo: Warning (unit_address_vs_reg): Node /fragment@1 has a unit name, but no reg property
micro-lcd-olinuxino-10.dtbo: Warning (unit_address_vs_reg): Node /fragment@2 has a unit name, but no reg property
micro-lcd-olinuxino-10.dtbo: Warning (unit_address_vs_reg): Node /fragment@3 has a unit name, but no reg property
micro-lcd-olinuxino-10.dtbo: Warning (pci_device_reg): Failed prerequisite 'reg_format'
micro-lcd-olinuxino-10.dtbo: Warning (pci_device_bus_num): Failed prerequisite 'reg_format'
micro-lcd-olinuxino-10.dtbo: Warning (simple_bus_reg): Failed prerequisite 'reg_format'
micro-lcd-olinuxino-10.dtbo: Warning (avoid_default_addr_size): Relying on default #address-cells value for /fragment@3/__overlay__/endpoint@0
micro-lcd-olinuxino-10.dtbo: Warning (avoid_default_addr_size): Relying on default #size-cells value for /fragment@3/__overlay__/endpoint@0
micro-lcd-olinuxino-10.dtbo: Warning (pwms_property): Property 'pwms', cell 2 is not a phandle reference in /fragment@0/__overlay__/backlight
micro-lcd-olinuxino-10.dtbo: Warning (pwms_property): Could not get phandle node for /fragment@0/__overlay__/backlight:pwms(cell 2)

and upload to the A20
scp micro-lcd-olinuxino-10.dtbo root@192.168.2.105:/usr/lib/olinuxino-overlays/sun7i-a20/micro-lcd-olinuxino-10.dtbo

After reboot, the LCD only blinks (as usually) but then does not turn on anymore.

Review of reserved GPIO shows the GPIO is free to use
cat /sys/kernel/debug/gpio
gpiochip0: GPIOs 0-287, parent: platform/1c20800.pinctrl, 1c20800.pinctrl:
 gpio-40  (                    |ahci-5v             ) out hi
 gpio-41  (                    |usb0-vbus           ) out lo
 gpio-225 (                    |cd                  ) in  lo IRQ ACTIVE LOW
 gpio-226 (                    |a20-olinuxino-micro:) out hi
 gpio-227 (                    |usb2-vbus           ) out hi
 gpio-228 (                    |usb0_id_det         ) in  hi IRQ
 gpio-229 (                    |usb0_vbus_det       ) in  lo IRQ
 gpio-230 (                    |usb1-vbus           ) out hi
 gpio-235 (                    |cd                  ) in  hi IRQ ACTIVE LOW

gpiochip1: GPIOs 413-415, parent: platform/axp20x-gpio, axp20x-gpio, can sleep:

Manual control of the LCD power is then available using standard GPIO control
# INIT
echo 232 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio232/direction

# TURN ON
echo 1 > /sys/class/gpio/gpio232/value

# Control Brightness
echo 10 > /sys/class/backlight/backlight/brightness

# TURN OFF
echo 0 > /sys/class/gpio/gpio232/value