Jump to content

PaddleStroke

Members
  • Posts

    70
  • Joined

  • Last visited

Reputation Activity

  1. Like
    PaddleStroke reacted to martinayotte in Reading A20 LRADC0 and LRADC1 values   
    You can try a workaround by doing "cp /usr/bin/python /usr/bin/python-sudo ; chmod a+s /usr/bin/python-sudo" so that execution will be done as root.
  2. Like
    PaddleStroke reacted to martinayotte in Reading A20 LRADC0 and LRADC1 values   
    Using /dev/mem, you can poke control register at 0x01C22800 to be in continuous mode, and then peek data register to read ADC values at 0x01C2280C or 0x01C2280D, depending if LRADC0 or LRADC1.
  3. Like
    PaddleStroke reacted to martinayotte in Reading A20 LRADC0 and LRADC1 values   
    Right, but don't forget to initialize Control Register first by setting Continuous Rate and Continuous Mode...
  4. Like
    PaddleStroke reacted to martinayotte in Reading A20 LRADC0 and LRADC1 values   
    Download this UserGuide : http://dl.linux-sunxi.org/A20/A20 User Manual 2013-03-22.pdf
    Read the LRADC chapter starting at page 192.
    You will see the description of the ControlRegister at page 193-194.
    You need your /dev/mem to be "O_RDWR", not "R+" to allow writing into ControlRegister.
  5. Like
    PaddleStroke reacted to jernej in Orange pi lite - HDMI output   
    That is unfortunate. The only other solution I know is this:
    sudo su cd /sys/kernel/debug/dispdbg/ echo "switch" > command echo "disp" > name echo "0 5" > param echo "1" > start Actually, second number for "param" could be anything. If you want to reenable, then you should write "4 5" to param, where 4 means HDMI output and 5 is wanted resolution, the same number as it is used in script.bin and with h3disp utility (most commonly 10 for 1080p60 and 5 for 720p60) .
  6. Like
    PaddleStroke reacted to jernej in AV/HDMI switch and display rotation   
    Address is correct.
     
    I would suggest you first find devmem2 program (source is all over the net). It does almost exactly what you want, but universally (you give it physical address on command line which you want to read).
  7. Like
    PaddleStroke got a reaction from guidol in Custom H3 prototypes, not starting   
    Found the problem. It was a hardware issue on  SD card detect line. A resistor that should not have been there...
    The units are booting correctly.
     
  8. Like
    PaddleStroke reacted to jernej in AV/HDMI switch and display rotation   
    That can work only if /dev/mem (or kmem?) access is permissive, i.e. it is allowed to access device memory regions from userspace. Additionally, daemon has to be run as root (maybe you can drop priviliges later?).
     
    That being said, it can work. HDMI PHY status register is 32 bit wide, located at 0x01ef0038 and as you can see from above snippet, you have to check bit 19.
  9. Like
    PaddleStroke reacted to jernej in AV/HDMI switch and display rotation   
    Probably, but it is not HW accelerated on H3.
     
    About other things, something can be done, IF you rebuild kernel with CONFIG_SWITCH or CONFIG_ANDROID_SWITCH enabled. That way you will get few files, which will have different content, based on TV or HDMI hot plug detection status. Not sure where those files will be located, but it will be probably somewhere in /sys or /proc. Code for that is located here:
    https://github.com/armbian/linux/blob/sun8i/drivers/video/sunxi/disp2/hdmi/drv_hdmi.c#L491-L510
    https://github.com/armbian/linux/blob/sun8i/drivers/video/sunxi/disp2/tv/drv_tv.c#L31-L82
     
    In script.bin you would need enabled both, hdmi and tv, or else you won't get status notification. Final step would be writing simple daemon, which will monitor aforementioned files and react on content change accordingly. There is simple way how to enable/disable TV/HDMI display from userspace on running system, but you would need root access. Since you already need to recompile the kernel, you should patch this part of code to have access rights 0666, so root rights are not needed The procedure how to turn on/off hdmi/tv can be found here Just instead "disp" use "disp0" and "disp1" respectively. There is another procedure if this doesn't work.
     
    I'm not sure if work described above is worth the hassle, but your strategy may work.
  10. Like
    PaddleStroke reacted to TonyMac32 in Custom H3 prototypes, not starting   
    http://pcbway.com
  11. Like
    PaddleStroke got a reaction from guidol in Custom H3 prototypes, not starting   
    That was the trick! Added a pull up resistor to AP-RESET# it was enought. The boards are booting now. Starting boot at least  
    I'll have to modify few things I guess
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines