OpenglMan

Members
  • Content Count

    23
  • Joined

  • Last visited

  1. I think i have found a dirty and very different solution but it works: I have created a service in systemd that is run before reboot.target The service created is: [Unit] Description=test Before=reboot.target DefaultDependencies=no [Service] ExecStart=/path_to_your_bash_file/file.sh Type=oneshot RemainAfterExit=yes [Install] WantedBy=reboot.target In the file.sh i activate a digital gpio pin for runnig a HW reset using the voltage regulators.
  2. Hello, I have the following problem: A custom board (H5) doesn't reboot using the reboot command. Same problem from u-boot using reset command. If you check the log, all is normal for the halt or power off proccess. The problem happens when the board is going to make the power on, it hangs, and you can't see anything using the debug serial. As a solution, i can reset the voltage regulators using a digital GPIO pin. Of this way i am able to reset the board. But i need a soft solution, and of course, if linux itself makes a reboot it should activate the digital GPIO pin in this custom board. So my question is: Would it be possible to recompile reboot.c or other file for activating a digital pin as last action of the reboot proccess? Thanks a lot in advance
  3. Hello, For a custom board using the H5 or H3 SoC, i would like to make the Calibration of the DDR3 chip. I think that the available information is very little. I will report here the steps I am taking. Anyway, I would greatly appreciate any information that could be provided to me. Thanks in advance
  4. Hello, For a custom board using the H5 or H3 SoC, i would like to make the Calibration of the DDR3 chip. I think that the available information is very little. I will report here the steps I am taking. Anyway, I would greatly appreciate any information that could be provided to me. Thanks in advance
  5. Solution for MIC not working in H5 Boards For H5 boards with Armbian Mainline Kernel, 4.19.67-sunxi64 #5.94 SMP Sun Aug 18 14:35:13 EDT 2019 aarch64 GNU/Linux The solution can be found at the end of this other following post... https://forum.armbian.com/topic/7216-orange-pi-zero-problem-with-onboard-soundcard/
  6. I have the same problem. Besides i have a LIME1 and Cubieboard2, and i have the same problem in both boards. Armbian mainline Kernel It seems an important fail. A solution can be to use Pulse. With Pulse installed, you can see Master and Capture controls if you type 'amixer' I also think there is probably an error with the devicetree definition. If not, maybe there is a problem in the driver sun4i_codec In 3.4 kernel, i can see: Simple mixer control 'Master',0 Capabilities: pvolume pvolume-joined penum Playback channels: Mono Limits: Playback 0 - 63 Mono: Playback 63 [100%] Simple mixer control 'Master Capture Mute',0 Capabilities: pswitch pswitch-joined penum Playback channels: Mono Mono: Playback [on] Simple mixer control 'LineL',0 Capabilities: pswitch pswitch-joined penum Playback channels: Mono Mono: Playback [on] Simple mixer control 'LineR',0 Capabilities: pswitch pswitch-joined penum Playback channels: Mono Mono: Playback [on] Simple mixer control 'Linein Pre-AMP',0 Capabilities: volume volume-joined penum Playback channels: Mono Capture channels: Mono Limits: 0 - 7 Mono: 4 [57%] Simple mixer control 'Mic Input Mux',0 Capabilities: volume volume-joined penum Playback channels: Mono Capture channels: Mono Limits: 0 - 15 Mono: 0 [0%] Simple mixer control 'Mic Power',0 Capabilities: pswitch pswitch-joined penum Playback channels: Mono Mono: Playback [off] Simple mixer control 'Mic1 Boost',0 Capabilities: pswitch pswitch-joined penum Playback channels: Mono Mono: Playback [on] Simple mixer control 'Mic1 gain',0 Capabilities: volume volume-joined penum Playback channels: Mono Capture channels: Mono Limits: 0 - 3 Mono: 0 [0%] Simple mixer control 'Mic2 Boost',0 Capabilities: pswitch pswitch-joined penum Playback channels: Mono Mono: Playback [off] Simple mixer control 'Mic2 gain',0 Capabilities: volume volume-joined penum Playback channels: Mono Capture channels: Mono Limits: 0 - 7 Mono: 4 [57%] Simple mixer control 'MicL',0 Capabilities: volume volume-joined penum Playback channels: Mono Capture channels: Mono Limits: 0 - 3 Mono: 1 [33%] Simple mixer control 'MicR',0 Capabilities: volume volume-joined penum Playback channels: Mono Capture channels: Mono Limits: 0 - 3 Mono: 3 [100%] Simple mixer control 'Playback',0 Capabilities: pswitch pswitch-joined penum Playback channels: Mono Mono: Playback [off] Simple mixer control 'Capture',0 Capabilities: cvolume cvolume-joined penum Capture channels: Mono Limits: Capture 0 - 7 Mono: Capture 6 [86%] Simple mixer control 'ADC Input Mux',0 Capabilities: volume volume-joined penum Playback channels: Mono Capture channels: Mono Limits: 0 - 7 Mono: 2 [29%] Simple mixer control 'Fm output',0 Capabilities: volume volume-joined penum Playback channels: Mono Capture channels: Mono Limits: 0 - 7 Mono: 3 [43%] Simple mixer control 'FmL',0 Capabilities: pswitch pswitch-joined penum Playback channels: Mono Mono: Playback [on] Simple mixer control 'FmR',0 Capabilities: pswitch pswitch-joined penum Playback channels: Mono Mono: Playback [on] Simple mixer control 'LINEIN APM',0 Capabilities: volume volume-joined penum Playback channels: Mono Capture channels: Mono Limits: 0 - 7 Mono: 0 [0%] Simple mixer control 'Ldac Left Mixer',0 Capabilities: pswitch pswitch-joined penum Playback channels: Mono Mono: Playback [on] Simple mixer control 'Ldac Right Mixer',0 Capabilities: pswitch pswitch-joined penum Playback channels: Mono Mono: Playback [on] Simple mixer control 'Left Capture Mute',0 Capabilities: pswitch pswitch-joined penum Playback channels: Mono Mono: Playback [off] Simple mixer control 'MIC output volume',0 Capabilities: volume volume-joined penum Playback channels: Mono Capture channels: Mono Limits: 0 - 7 Mono: 3 [43%] Simple mixer control 'Rdac Right Mixer',0 Capabilities: pswitch pswitch-joined penum Playback channels: Mono Mono: Playback [on] Simple mixer control 'Right Capture Mute',0 Capabilities: pswitch pswitch-joined penum Playback channels: Mono Mono: Playback [off] In mainline kernel I can see: Simple mixer control 'Left Mixer Left DAC',0 Capabilities: pswitch pswitch-joined Playback channels: Mono Mono: Playback [off] Simple mixer control 'Power Amplifier',0 Capabilities: volume volume-joined Playback channels: Mono Capture channels: Mono Limits: 0 - 63 Mono: 45 [71%] [-18.00dB] Simple mixer control 'Power Amplifier DAC',0 Capabilities: pswitch pswitch-joined Playback channels: Mono Mono: Playback [on] Simple mixer control 'Power Amplifier Mixer',0 Capabilities: pswitch pswitch-joined Playback channels: Mono Mono: Playback [on] Simple mixer control 'Power Amplifier Mute',0 Capabilities: pswitch pswitch-joined Playback channels: Mono Mono: Playback [on] Simple mixer control 'Right Mixer Left DAC',0 Capabilities: pswitch pswitch-joined Playback channels: Mono Mono: Playback [off] Simple mixer control 'Right Mixer Right DAC',0 Capabilities: pswitch pswitch-joined Playback channels: Mono Mono: Playback [off] Maybe the following link is related to this error: http://lists.infradead.org/pipermail/linux-arm-kernel/2015-December/392419.html
  7. Hello, If you don't want to use HDMI, what configuration should be done in armbianEnv.txt or boot.cmd ? Thanks in advance
  8. Thank you guidol, I was running armbianmonitor -u, when Igor answered. Thank you very much Igor, it solved the problem with the sound card Regards
  9. Hello, After I run apt-get update and upgrade, I lose the sound card: aplay -l aplay: device_list:268: no soundcards found... If I check my upgrade history, I can see the following: cat /var/log/apt/history.log Start-Date: 2018-03-16 22:33:12 Commandline: apt-get upgrade Upgrade: libgssapi-krb5-2:armhf (1.12.1+dfsg-19+deb8u2, 1.12.1+dfsg-19+deb8u4), tzdata:armhf (2017b-0+deb8u1, 2018c-0+deb8u1), ncurses-term:armhf (5.9+20140913-1, 5.9+20140913-1+deb8u2), libkrb5-3:armhf (1.12.1+dfsg-19+deb8u2, 1.12.1+dfsg-19+deb8u4), libk5crypto3:armhf (1.12.1+dfsg-19+deb8u2, 1.12.1+dfsg-19+deb8u4), linux-image-next-sunxi:armhf (5.34, 5.41), armbian-firmware:armhf (5.34, 5.38), libcurl3:armhf (7.38.0-4+deb8u9, 7.38.0-4+deb8u10), openssh-sftp-server:armhf (6.7p1-5+deb8u3, 6.7p1-5+deb8u4), sudo:armhf (1.8.10p3-1+deb8u4, 1.8.10p3-1+deb8u5), linux-u-boot-lime-next:armhf (5.34, 5.38), openssh-server:armhf (6.7p1-5+deb8u3, 6.7p1-5+deb8u4), libkrb5support0:armhf (1.12.1+dfsg-19+deb8u2, 1.12.1+dfsg-19+deb8u4), hostapd:armhf (2.6-4~armbian5.34.171017+1, 2.6-4~armbian5.38+1), curl:armhf (7.38.0-4+deb8u9, 7.38.0-4+deb8u10), base-files:armhf (8+deb8u9, 8+deb8u10), libdb5.3:armhf (5.3.28-9, 5.3.28-9+deb8u1), ncurses-bin:armhf (5.9+20140913-1+b1, 5.9+20140913-1+deb8u2), linux-dtb-next-sunxi:armhf (5.34, 5.41), openssh-client:armhf (6.7p1-5+deb8u3, 6.7p1-5+deb8u4), libcurl3-gnutls:armhf (7.38.0-4+deb8u9, 7.38.0-4+deb8u10), armbian-tools-jessie:armhf (5.34, 5.38), sunxi-tools:armhf (1.4.2-1~armbian5.34.171017+1, 1.4.2-2~armbian5.38+1), libicu52:armhf (52.1-8+deb8u5, 52.1-8+deb8u6), linux-jessie-root-next-lime:armhf (5.34, 5.38), libtinfo5:armhf (5.9+20140913-1+b1, 5.9+20140913-1+deb8u2), libncursesw5:armhf (5.9+20140913-1+b1, 5.9+20140913-1+deb8u2), libncurses5:armhf (5.9+20140913-1+b1, 5.9+20140913-1+deb8u2), ncurses-base:armhf (5.9+20140913-1, 5.9+20140913-1+deb8u2) End-Date: 2018-03-16 22:36:11 In the following pictures you can see the modules of the system, before and after the upgrade process Why have I lost the sun4i_codec and snd_soc_core ? what can I do to enable the sound card again ? Thanks a lot in advance, Regards
  10. Check this: sudo cat /sys/kernel/debug/pinctrl/1c20800.pinctrl/pinmux-pins 1c20800.pinctrl maybe different in your system. Please check: sudo ls /sys/kernel/debug/pinctrl/ A good book about GPIO in Linux: GNU-Linux-Rapid-Embedded-Programming
  11. Thank you martinayotte for your answer. However i have found an alternative solution in PHP language that works pretty well. It barely consumes CPU. The code is very simple. Anyway I will try the code in c language that you indicated in your previous post. I imagine that the internal functioning will be similar in both solutions. If anyone is interested, check the following link: https://github.com/PacktPublishing/GNU-Linux-Rapid-Embedded-Programming/blob/master/Chapter06/gpio-poll.php Regards
  12. If you want to design a custom board you should use the A20 Soc or the H3 soc. Check the following useful link: http://linux-sunxi.org/Linux_mainlining_effort
  13. Hello, I need to use an IRQ interruption with a button. I mean, I push a button, and then a code is executed. Some information: The PIN is PH19, EINT19. and the board A20 SOM. Armbian SO, kernel 4.13 Firstly i configure the digital pin and IRQ from user space: echo 243 > /sys/class/gpio/export echo "in" > /sys/class/gpio/gpio243/direction echo "falling" > /sys/class/gpio/gpio243/edge Now, when I push the button, I can monitoring the IRQ and the counter related to cat /proc/interrupts But now, how can I run a program when the interruption event happens ? I have seen this useful link http://linux-sunxi.org/External_interrupts How can i use it? I think there is very few information about this issue. I executed a bash script with while true , and polling the digital pin, but the disadvantage is that it consumes a lot of cpu. I hope you can help me. Thank you very much in advance Regards
  14. Thank you very much, the whole process worked correctly
  15. Hello Igor, According to the previous link, i add the following code segment to the dts : &codec { status = "okay"; }; The dts file is located in: build/cache/sources/linux-mainline/linux-4.13.y/arch/arm/boot/dts/sun7i-a20-olinuxino-lime.dts After that, i run compile.sh , but if i check the dts file again, i can't see the code segment that i added. So, how can i modify the device tree of the lime board or any other board? (mainline kernel) Thank you very much in advance