Jump to content

hellf

Members
  • Posts

    7
  • Joined

  • Last visited

Reputation Activity

  1. Like
    hellf reacted to chucklz in Armbian 5.25 on OrangePI PC: The gc2035 video camera doesn't work   
    Last time I investigated, csi is present in mainline, but does not support vfe_v4l2, which the existing gc2035 code relies on.  It is no small task to reverse engineer the driver code, so as to migrate it. The hardware datasheets provide the means, but the effort is enormous compared to replacing the gc2035 with ov56xx hardware, which is fully supported in mainline and legacy.  The driver code is probably something xunlong need to provide, but don't hold your breath.
  2. Like
    hellf got a reaction from OPUser in OrangePi ubuntu focal desktop dtb file issue (is OrangePi supported again?)   
    I took the original sources just for the device tree compilation, instructions from https://linux-sunxi.org/Mainline_Kernel_Howto
    git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git --depth=1 cd linux/ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- sunxi_defconfig edit arch/arm/boot/dts/sun7i-a20-orangepi.dts compile ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make -j4 dtbs copy arch/arm/boot/dts/sun7i-a20-orangepi.dtb to /boot/dtb/
     
    the patch file has more than just phy-mode = "rgmii-id";, I guess you missed it?
     
  3. Like
    hellf got a reaction from OPUser in OrangePi ubuntu focal desktop dtb file issue (is OrangePi supported again?)   
    see the patches https://github.com/armbian/build/pull/2750/commits/59797c3324e5f2db4a7727126a770049d274290c
     
  4. Like
    hellf reacted to Igor in OrangePi ubuntu focal desktop dtb file issue (is OrangePi supported again?)   
    Its never to late to learn something 
     
    1. https://docs.armbian.com/Developer-Guide_Build-Preparation/
    2. Run compilation with ./compile.sh CREATE_PATCHES="yes"
    3. Skip u-boot change prompt and wait for kernel change prompt.
    4. Open second terminal and edit file (under su):
     
    sudo nano  cache/sources/linux-mainline/orange-pi-5.10/arch/arm/boot/dts/sun7i-a20-orangepi.dts  
    also do this for its other variant
     
    sudo nano  cache/sources/linux-mainline/orange-pi-5.10/arch/arm/boot/dts/sun7i-a20-orangepi-mini.dts  
    and change those bits. Save and exit.
    4. When you are done go back to initial terminal and proceed with compilation.
    5. If everything went well, move patch from output/patch/ to patch/kernel/archive/sunxi-5.10/name_it_somehow.patch (you can also copy the same patch for sunx-5.11 since it will almost certainly work and its needed there too)
    6. Create a PR
     
    This might also help
    https://docs.armbian.com/Process_Contribute/
     
  5. Like
    hellf reacted to Madozu in K-worker problem on A20 based boards   
    I am running a headless cubietruck with Armbian standard kernel (5.10.4-sunxi as of now). System is Ubuntu Focal Fossa with "linux-focal-root-current-cubietruck 20.11.6" installed. Cubietruck has uboot and /boot  on SD-Card and the system is on a SATA-attached SSD. CPU load average over 20s (vmstat 20) is like this:
     
    procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu----- r b swpd free buff cache si so bi bo in cs us sy id wa st 0 0 0 1827484 18008 137776 0 0 0 0 121 78 0 5 94 0 0 1 0 0 1827484 18008 137772 0 0 0 0 109 70 0 5 95 0 0 0 0 0 1827232 18008 137776 0 0 0 0 96 57 0 5 95 0 0 1 0 0 1827232 18008 137776 0 0 0 0 102 56 0 5 95 0 0 1 0 0 1827232 18008 137776 0 0 0 0 109 72 0 5 95 0 0 1 0 0 1827232 18008 137776 0 0 0 0 92 49 0 5 95 0 0 2 0 0 1827232 18008 137776 0 0 0 0 95 49 0 5 95 0 0 1 0 0 1827232 18008 137776 0 0 0 0 112 75 0 5 95 0 0 0 0 0 1827232 18008 137776 0 0 0 0 92 52 0 5 95 0 0  
    This is better than what I saw with older (e.g. 4.x) kernels but still around 5% CPU usage coming from "kworker/1:3-events_freezable_power_". When removing the modules for ADC (sun4i_gpad and sun4i_gpad_iio) the CPU usage drops down to <1% in average:
    procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu----- r b swpd free buff cache si so bi bo in cs us sy id wa st 1 0 0 1826784 18020 137772 0 0 0 9 41 46 0 0 100 0 0 1 0 0 1826540 18020 137772 0 0 0 0 52 60 0 0 99 0 0 1 0 0 1826540 18020 137772 0 0 0 0 39 44 0 0 100 0 0 1 0 0 1826540 18020 137772 0 0 0 0 39 44 0 0 100 0 0 1 0 0 1826532 18020 137776 0 0 0 1 61 69 0 0 99 0 0 1 0 0 1826532 18020 137776 0 0 0 0 45 48 0 0 100 0 0 1 0 0 1826532 18020 137776 0 0 0 0 34 40 0 0 100 0 0 1 0 0 1826532 18020 137776 0 0 0 0 62 69 0 0 99 0 0 1 0 0 1826532 18020 137776 0 0 0 0 35 41 0 0 100 0 0 1 0 0 1826532 18020 137776 0 0 0 0 34 40 0 0 100 0 0  
    However as stated previously, removing those kernel modules breaks the CPU temp sensor display in the OS. What I recommend to do is running this command to remove the modules contributing to the CPU consumption:
    sudo rmmod sun4i_gpadc sun4i_gpadc_iio  
    If you're happy with the result, put the above statement into /etc/rc.local to run at every boot. Blacklisting the above modules in /etc/modprobe.d only partially works as module sun4i_gpadc is loaded anyway.
  6. Like
    hellf reacted to @lex in FFmpeg with Cedrus H264 HW Encoder (H3 - CMOS Camera)   
    I have managed to build FFmpeg with Cedrus on Armbian and it seems working.
    It would be nice to see some benchs and how would be the best use for this AW Encoder.
    I have not much experience with FFmpeg.
     
    You can test it:
    https://github.com/avafinger/ffmpeg_cedrus264_H3
     
     
    To grab video stream from the CMOS camera:
    sudo ./ffmpeg -f v4l2 -channel 0 -video_size 640x480 -i /dev/video0 -pix_fmt nv12 -r 30 -b:v 64k -c:v cedrus264 test.mp4
     
     
     
     
  7. Like
    hellf reacted to hatahata in ffmpeg on orange pi PC   
    RagnerBG's procedure is beyond amature.
     
    i only  do the followings on armbian of orange pi PC .
    it takes long time (over 60 minites )
     
    --------------------
    aptitude install  git  yasm  pkg-config
    cd Downloads
    git clone git://source.ffmpeg.org/ffmpeg.git ffmpeg
    cd ffmpeg
    ./configure
    make
    sudo make install
     
     
    ------------------------
    this procedure may lack something compared with RagnerBG's  because of too simplicity .
     
    ffmpeg -formats says ffmpeg version N-79121-gfe3de6b Copyright © 2000-2016 the FFmpeg developers   built with gcc 4.9.2 (Debian 4.9.2-10)   configuration:    libavutil      55. 19.100 / 55. 19.100   libavcodec     57. 30.100 / 57. 30.100   libavformat    57. 29.100 / 57. 29.100   libavdevice    57.  0.101 / 57.  0.101   libavfilter     6. 39.102 /  6. 39.102   libswscale      4.  0.100 /  4.  0.100   libswresample   2.  0.101 /  2.  0.101 File formats:  D. = Demuxing supported  .E = Muxing supported  --  D  3dostr          3DO STR   E 3g2             3GP2 (3GPP2 file format)   E 3gp             3GP (3GPP file format)  D  4xm             4X Technologies   E a64             a64 - video for Commodore 64  D  aa              Audible AA format files  D  aac             raw ADTS AAC (Advanced Audio Coding)  DE ac3             raw AC-3  D  acm             Interplay ACM  D  act             ACT Voice file format  D  adf             Artworx Data Format  D  adp             ADP  D  ads             Sony PS2 ADS   E adts            ADTS AAC (Advanced Audio Coding)  DE adx             CRI ADX  D  aea             MD STUDIO audio  D  afc             AFC  DE aiff            Audio IFF  DE alaw            PCM A-law  D  alias_pix       Alias/Wavefront PIX image  DE amr             3GPP AMR  D  anm             Deluxe Paint Animation  D  apc             CRYO APC  D  ape             Monkey's Audio  DE apng            Animated Portable Network Graphics  D  aqtitle         AQTitle subtitles  DE asf             ASF (Advanced / Active Streaming Format)  D  asf_o           ASF (Advanced / Active Streaming Format)   E asf_stream      ASF (Advanced / Active Streaming Format)  DE ass             SSA (SubStation Alpha) subtitle  DE ast             AST (Audio Stream)  DE au              Sun AU  DE avi             AVI (Audio Video Interleaved)   E avm2            SWF (ShockWave Flash) (AVM2)  D  avr             AVR (Audio Visual Research)  D  avs             AVS  D  bethsoftvid     Bethesda Softworks VID  D  bfi             Brute Force & Ignorance  D  bfstm           BFSTM (Binary Cafe Stream)  D  bin             Binary text  D  bink            Bink  DE bit             G.729 BIT file format  D  bmp_pipe        piped bmp sequence  D  bmv             Discworld II BMV  D  boa             Black Ops Audio  D  brender_pix     BRender PIX image  D  brstm           BRSTM (Binary Revolution Stream)  D  c93             Interplay C93  DE caf             Apple CAF (Core Audio Format)  DE cavsvideo       raw Chinese AVS (Audio Video Standard) video  D  cdg             CD Graphics  D  cdxl            Commodore CDXL video  D  cine            Phantom Cine  D  concat          Virtual concatenation script   E crc             CRC testing   E dash            DASH Muxer  DE data            raw data  DE daud            D-Cinema audio  D  dcstr           Sega DC STR  D  dds_pipe        piped dds sequence  D  dfa             Chronomaster DFA  DE dirac           raw Dirac  DE dnxhd           raw DNxHD (SMPTE VC-3)  D  dpx_pipe        piped dpx sequence  D  dsf             DSD Stream File (DSF)  D  dsicin          Delphine Software International CIN  D  dss             Digital Speech Standard (DSS)  DE dts             raw DTS  D  dtshd           raw DTS-HD  DE dv              DV (Digital Video)  D  dv1394          DV1394 A/V grab  D  dvbsub          raw dvbsub  D  dvbtxt          dvbtxt   E dvd             MPEG-2 PS (DVD VOB)  D  dxa             DXA  D  ea              Electronic Arts Multimedia  D  ea_cdata        Electronic Arts cdata  DE eac3            raw E-AC-3  D  epaf            Ensoniq Paris Audio File  D  exr_pipe        piped exr sequence  DE f32be           PCM 32-bit floating-point big-endian  DE f32le           PCM 32-bit floating-point little-endian   E f4v             F4V Adobe Flash Video  DE f64be           PCM 64-bit floating-point big-endian  DE f64le           PCM 64-bit floating-point little-endian  DE fbdev           Linux framebuffer  DE ffm             FFM (FFserver live feed)  DE ffmetadata      FFmpeg metadata in text  D  film_cpk        Sega FILM / CPK  DE filmstrip       Adobe Filmstrip  DE flac            raw FLAC  D  flic            FLI/FLC/FLX animation  DE flv             FLV (Flash Video)   E framecrc        framecrc testing   E framemd5        Per-frame MD5 testing  D  frm             Megalux Frame  D  fsb             FMOD Sample Bank  DE g722            raw G.722  DE g723_1          raw G.723.1  D  g729            G.729 raw format demuxer  D  genh            GENeric Header  DE gif             GIF Animation  D  gsm             raw GSM  DE gxf             GXF (General eXchange Format)  DE h261            raw H.261  DE h263            raw H.263  DE h264            raw H.264 video   E hds             HDS Muxer  DE hevc            raw HEVC video   E hls             Apple HTTP Live Streaming  D  hls,applehttp   Apple HTTP Live Streaming  D  hnm             Cryo HNM v4  DE ico             Microsoft Windows ICO  D  idcin           id Cinematic  D  idf             iCE Draw File  D  iff             IFF (Interchange File Format)  DE ilbc            iLBC storage  DE image2          image2 sequence  DE image2pipe      piped image2 sequence  D  ingenient       raw Ingenient MJPEG  D  ipmovie         Interplay MVE   E ipod            iPod H.264 MP4 (MPEG-4 Part 14)  DE ircam           Berkeley/IRCAM/CARL Sound Format   E ismv            ISMV/ISMA (Smooth Streaming)  D  iss             Funcom ISS  D  iv8             IndigoVision 8000 video  DE ivf             On2 IVF  D  ivr             IVR (Internet Video Recording)  D  j2k_pipe        piped j2k sequence  DE jacosub         JACOsub subtitle format  D  jpeg_pipe       piped jpeg sequence  D  jpegls_pipe     piped jpegls sequence  D  jv              Bitmap Brothers JV   E latm            LOAS/LATM  D  lavfi           Libavfilter virtual input device  D  live_flv        live RTMP FLV (Flash Video)  D  lmlm4           raw lmlm4  D  loas            LOAS AudioSyncStream  DE lrc             LRC lyrics  D  lvf             LVF  D  lxf             VR native stream (LXF)  DE m4v             raw MPEG-4 video   E matroska        Matroska  D  matroska,webm   Matroska / WebM   E md5             MD5 testing  D  mgsts           Metal Gear Solid: The Twin Snakes  DE microdvd        MicroDVD subtitle format  DE mjpeg           raw MJPEG video   E mkvtimestamp_v2 extract pts as timecode v2 format, as defined by mkvtoolnix  DE mlp             raw MLP  D  mlv             Magic Lantern Video (MLV)  D  mm              American Laser Games MM  DE mmf             Yamaha SMAF   E mov             QuickTime / MOV  D  mov,mp4,m4a,3gp,3g2,mj2 QuickTime / MOV   E mp2             MP2 (MPEG audio layer 2)  DE mp3             MP3 (MPEG audio layer 3)   E mp4             MP4 (MPEG-4 Part 14)  D  mpc             Musepack  D  mpc8            Musepack SV8  DE mpeg            MPEG-1 Systems / MPEG program stream   E mpeg1video      raw MPEG-1 video   E mpeg2video      raw MPEG-2 video  DE mpegts          MPEG-TS (MPEG-2 Transport Stream)  D  mpegtsraw       raw MPEG-TS (MPEG-2 Transport Stream)  D  mpegvideo       raw MPEG video  DE mpjpeg          MIME multipart JPEG  D  mpl2            MPL2 subtitles  D  mpsub           MPlayer subtitles  D  msf             Sony PS3 MSF  D  msnwctcp        MSN TCP Webcam stream  D  mtv             MTV  DE mulaw           PCM mu-law  D  mv              Silicon Graphics Movie  D  mvi             Motion Pixels MVI  DE mxf             MXF (Material eXchange Format)   E mxf_d10         MXF (Material eXchange Format) D-10 Mapping   E mxf_opatom      MXF (Material eXchange Format) Operational Pattern Atom  D  mxg             MxPEG clip  D  nc              NC camera feed  D  nistsphere      NIST SPeech HEader REsources  D  nsv             Nullsoft Streaming Video   E null            raw null video  DE nut             NUT  D  nuv             NuppelVideo   E oga             Ogg Audio  DE ogg             Ogg  DE oma             Sony OpenMG audio   E opus            Ogg Opus  DE oss             OSS (Open Sound System) playback  D  paf             Amazing Studio Packed Animation File  D  pcx_pipe        piped pcx sequence  D  pictor_pipe     piped pictor sequence  D  pjs             PJS (Phoenix Japanimation Society) subtitles  D  pmp             Playstation Portable PMP  D  png_pipe        piped png sequence   E psp             PSP MP4 (MPEG-4 Part 14)  D  psxstr          Sony Playstation STR  D  pva             TechnoTrend PVA  D  pvf             PVF (Portable Voice Format)  D  qcp             QCP  D  qdraw_pipe      piped qdraw sequence  D  r3d             REDCODE R3D  DE rawvideo        raw video  D  realtext        RealText subtitle format  D  redspark        RedSpark  D  rl2             RL2  DE rm              RealMedia  DE roq             raw id RoQ  D  rpl             RPL / ARMovie  D  rsd             GameCube RSD  DE rso             Lego Mindstorms RSO  DE rtp             RTP output   E rtp_mpegts      RTP/mpegts output format  DE rtsp            RTSP output  DE s16be           PCM signed 16-bit big-endian  DE s16le           PCM signed 16-bit little-endian  DE s24be           PCM signed 24-bit big-endian  DE s24le           PCM signed 24-bit little-endian  DE s32be           PCM signed 32-bit big-endian  DE s32le           PCM signed 32-bit little-endian  DE s8              PCM signed 8-bit  D  sami            SAMI subtitle format  DE sap             SAP output  D  sbg             SBaGen binaural beats script  D  sdp             SDP  D  sdr2            SDR2   E segment         segment  D  sgi_pipe        piped sgi sequence  D  shn             raw Shorten  D  siff            Beam Software SIFF   E singlejpeg      JPEG single image  D  sln             Asterisk raw pcm  DE smjpeg          Loki SDL MJPEG  D  smk             Smacker   E smoothstreaming Smooth Streaming Muxer  D  smush           LucasArts Smush  D  sol             Sierra SOL  DE sox             SoX native  DE spdif           IEC 61937 (used on S/PDIF - IEC958)   E spx             Ogg Speex  DE srt             SubRip subtitle  D  stl             Spruce subtitle format   E stream_segment,ssegment streaming segment muxer  D  subviewer       SubViewer subtitle format  D  subviewer1      SubViewer v1 subtitle format  D  sunrast_pipe    piped sunrast sequence  D  sup             raw HDMV Presentation Graphic Stream subtitles  D  svag            Konami PS2 SVAG   E svcd            MPEG-2 PS (SVCD)  DE swf             SWF (ShockWave Flash)  D  tak             raw TAK  D  tedcaptions     TED Talks captions   E tee             Multiple muxer tee  D  thp             THP  D  tiertexseq      Tiertex Limited SEQ  D  tiff_pipe       piped tiff sequence  D  tmv             8088flex TMV  DE truehd          raw TrueHD  D  tta             TTA (True Audio)  D  tty             Tele-typewriter  D  txd             Renderware TeXture Dictionary  DE u16be           PCM unsigned 16-bit big-endian  DE u16le           PCM unsigned 16-bit little-endian  DE u24be           PCM unsigned 24-bit big-endian  DE u24le           PCM unsigned 24-bit little-endian  DE u32be           PCM unsigned 32-bit big-endian  DE u32le           PCM unsigned 32-bit little-endian  DE u8              PCM unsigned 8-bit   E uncodedframecrc uncoded framecrc testing  D  v210            Uncompressed 4:2:2 10-bit  D  v210x           Uncompressed 4:2:2 10-bit   E v4l2            Video4Linux2 output device  D  vag             Sony PS2 VAG  DE vc1             raw VC-1 video  DE vc1test         VC-1 test bitstream   E vcd             MPEG-1 Systems / MPEG program stream (VCD)  D  video4linux2,v4l2 Video4Linux2 device grab  D  vivo            Vivo  D  vmd             Sierra VMD   E vob             MPEG-2 PS (VOB)  D  vobsub          VobSub subtitle format  DE voc             Creative Voice  D  vpk             Sony PS2 VPK  D  vplayer         VPlayer subtitles  D  vqf             Nippon Telegraph and Telephone Corporation (NTT) TwinVQ  DE w64             Sony Wave64  DE wav             WAV / WAVE (Waveform Audio)  D  wc3movie        Wing Commander III movie   E webm            WebM   E webm_chunk      WebM Chunk Muxer  DE webm_dash_manifest WebM DASH Manifest   E webp            WebP  D  webp_pipe       piped webp sequence  DE webvtt          WebVTT subtitle  D  wsaud           Westwood Studios audio  D  wsvqa           Westwood Studios VQA  DE wtv             Windows Television (WTV)  DE wv              raw WavPack  D  wve             Psion 3 audio  D  x11grab         X11 screen capture, using XCB  D  xa              Maxis XA  D  xbin            eXtended BINary text (XBIN)  D  xmv             Microsoft XMV   E xv              XV (XVideo) output device  D  xvag            Sony PS3 XVAG  D  xwma            Microsoft xWMA  D  yop             Psygnosis YOP  DE yuv4mpegpipe    YUV4MPEG pipe
  8. Like
    hellf reacted to hatahata in ffmpeg on orange pi PC   
    hi all .
     
    i found good URL  https://gist.github.com/xsukax/77c627d7274736408314
     
    aptitude install  git  yasm  pkg-config ,
    and
    then follow the URL , then i get ffmpeg .
    ----------------
    regards .
     
     
  9. Like
    hellf reacted to @lex in OV8865 - First Impression   
    This is my first impression with the ov8865, a 8MP sensor running on kernel 3.4.39 (linux-sunxi).
    I am running Banana Pi - M3 with the dual camera extension on Ubuntu Xenial rootfs and with the stock driver. The driver have not been touched because information is scarce and i asked @lvmc for some datasheet.
    This sensor is a 4 lane CSI2 (MIPI) that has a good performance at high resolution. I am able to get 30 FPS on all available win sizes.
     
    I have ran a small v4l2 application to have some benchmarks but  guvcview with some minor update is able to display video from the sensor just as we have for the ov5640:
    TEST 0 ( 3264 x 2448 ) ---- cap parameters ----- width: 3264 height: 2448 v4l2 buffers: 8 exposure: -999 hflip: -1 vflip: -1 Mode: V4L2_MODE_VIDEO Driver: "sunxi-vfe" Card: "sunxi-vfe" Bus: "sunxi_vfe sunxi_vfe.0" Version: 1.0 Capabilities: 05000001 Input: 0 V4L2 pixel formats: 0: [0x50323234] '422P' (planar YUV 422) 1: [0x32315559] 'YU12' (planar YUV 420) 2: [0x32315659] 'YV12' (planar YVU 420) 3: [0x3631564E] 'NV16' (planar YUV 422 UV combined) 4: [0x3231564E] 'NV12' (planar YUV 420 UV combined) 5: [0x3136564E] 'NV61' (planar YUV 422 VU combined) 6: [0x3132564E] 'NV21' (planar YUV 420 VU combined) 7: [0x32314D48] 'HM12' (MB YUV420) 8: [0x56595559] 'YUYV' (YUV422 YUYV) 9: [0x55595659] 'YVYU' (YUV422 YVYU) 10: [0x59565955] 'UYVY' (YUV422 UYVY) 11: [0x59555956] 'VYUY' (YUV422 VYUY) 12: [0x31384142] 'BA81' (RAW Bayer BGGR 8bit) 13: [0x47524247] 'GBRG' (RAW Bayer GBRG 8bit) 14: [0x47425247] 'GRBG' (RAW Bayer GRBG 8bit) 15: [0x47425247] 'GRBG' (RAW Bayer RGGB 8bit) 16: [0x30314742] 'BG10' (RAW Bayer BGGR 10bit) 17: [0x30314247] 'GB10' (RAW Bayer GBRG 10bit) 18: [0x30314142] 'BA10' (RAW Bayer GRBG 10bit) 19: [0x30314142] 'BA10' (RAW Bayer RGGB 10bit) 20: [0x32314742] 'BG12' (RAW Bayer BGGR 12bit) 21: [0x32314247] 'GB12' (RAW Bayer GBRG 12bit) 22: [0x32314142] 'BA12' (RAW Bayer GRBG 12bit) 23: [0x32314142] 'BA12' (RAW Bayer RGGB 12bit) V4L2 pixel sizes: ( 3264 x 2448 ) Pixels ( 3264 x 1836 ) Pixels ( 1920 x 1080 ) Pixels ( 1280 x 720 ) Pixels ( 1600 x 1200 ) Pixels ( 800 x 600 ) Pixels ( 640 x 480 ) Pixels Sensor size: 3264x2448 pixels Pixel Format: V4L2_PIX_FMT_YUV420 [0x32315559] Frame #10 will be saved! Length: 11993088 Bytesused: 11993088 Address: 0xc37f8 FPS[0]: 13.38 Length: 11993088 Bytesused: 11993088 Address: 0xc3800 FPS[1]: 30.12 Length: 11993088 Bytesused: 11993088 Address: 0xc3808 FPS[2]: 29.47 Length: 11993088 Bytesused: 11993088 Address: 0xc3810 FPS[3]: 30.10 Length: 11993088 Bytesused: 11993088 Address: 0xc3818 FPS[4]: 28.36 Length: 11993088 Bytesused: 11993088 Address: 0xc3820 FPS[5]: 28.52 Length: 11993088 Bytesused: 11993088 Address: 0xc3828 FPS[6]: 34.09 Length: 11993088 Bytesused: 11993088 Address: 0xc3830 FPS[7]: 30.11 Length: 11993088 Bytesused: 11993088 Address: 0xc37f8 FPS[8]: 30.02 Length: 11993088 Bytesused: 11993088 Address: 0xc3800 FPS[9]: 1.08 ------- Avg FPS: 30.10 -------- TEST 1 ( 3264 x 1836 ) ---- cap parameters ----- width: 3264 height: 1836 v4l2 buffers: 8 exposure: -999 hflip: -1 vflip: -1 Mode: V4L2_MODE_VIDEO Driver: "sunxi-vfe" Card: "sunxi-vfe" Bus: "sunxi_vfe sunxi_vfe.0" Version: 1.0 Capabilities: 05000001 Input: 0 V4L2 pixel formats: 0: [0x50323234] '422P' (planar YUV 422) 1: [0x32315559] 'YU12' (planar YUV 420) 2: [0x32315659] 'YV12' (planar YVU 420) 3: [0x3631564E] 'NV16' (planar YUV 422 UV combined) 4: [0x3231564E] 'NV12' (planar YUV 420 UV combined) 5: [0x3136564E] 'NV61' (planar YUV 422 VU combined) 6: [0x3132564E] 'NV21' (planar YUV 420 VU combined) 7: [0x32314D48] 'HM12' (MB YUV420) 8: [0x56595559] 'YUYV' (YUV422 YUYV) 9: [0x55595659] 'YVYU' (YUV422 YVYU) 10: [0x59565955] 'UYVY' (YUV422 UYVY) 11: [0x59555956] 'VYUY' (YUV422 VYUY) 12: [0x31384142] 'BA81' (RAW Bayer BGGR 8bit) 13: [0x47524247] 'GBRG' (RAW Bayer GBRG 8bit) 14: [0x47425247] 'GRBG' (RAW Bayer GRBG 8bit) 15: [0x47425247] 'GRBG' (RAW Bayer RGGB 8bit) 16: [0x30314742] 'BG10' (RAW Bayer BGGR 10bit) 17: [0x30314247] 'GB10' (RAW Bayer GBRG 10bit) 18: [0x30314142] 'BA10' (RAW Bayer GRBG 10bit) 19: [0x30314142] 'BA10' (RAW Bayer RGGB 10bit) 20: [0x32314742] 'BG12' (RAW Bayer BGGR 12bit) 21: [0x32314247] 'GB12' (RAW Bayer GBRG 12bit) 22: [0x32314142] 'BA12' (RAW Bayer GRBG 12bit) 23: [0x32314142] 'BA12' (RAW Bayer RGGB 12bit) V4L2 pixel sizes: ( 3264 x 2448 ) Pixels ( 3264 x 1836 ) Pixels ( 1920 x 1080 ) Pixels ( 1280 x 720 ) Pixels ( 1600 x 1200 ) Pixels ( 800 x 600 ) Pixels ( 640 x 480 ) Pixels Sensor size: 3264x1836 pixels Pixel Format: V4L2_PIX_FMT_YUV420 [0x32315559] Frame #10 will be saved! Length: 8994816 Bytesused: 8994816 Address: 0x1543c00 FPS[0]: 12.07 Length: 8994816 Bytesused: 8994816 Address: 0x1543c08 FPS[1]: 30.11 Length: 8994816 Bytesused: 8994816 Address: 0x1543c10 FPS[2]: 29.51 Length: 8994816 Bytesused: 8994816 Address: 0x1543c18 FPS[3]: 28.47 Length: 8994816 Bytesused: 8994816 Address: 0x1543c20 FPS[4]: 30.99 Length: 8994816 Bytesused: 8994816 Address: 0x1543c28 FPS[5]: 31.19 Length: 8994816 Bytesused: 8994816 Address: 0x1543c30 FPS[6]: 30.12 Length: 8994816 Bytesused: 8994816 Address: 0x1543c38 FPS[7]: 30.05 Length: 8994816 Bytesused: 8994816 Address: 0x1543c00 FPS[8]: 30.02 Length: 8994816 Bytesused: 8994816 Address: 0x1543c08 FPS[9]: 1.28 ------- Avg FPS: 30.06 -------- TEST 2 ( 1920 x 1080 ) ---- cap parameters ----- width: 1920 height: 1080 v4l2 buffers: 8 exposure: -999 hflip: -1 vflip: -1 Mode: V4L2_MODE_VIDEO Driver: "sunxi-vfe" Card: "sunxi-vfe" Bus: "sunxi_vfe sunxi_vfe.0" Version: 1.0 Capabilities: 05000001 Input: 0 V4L2 pixel formats: 0: [0x50323234] '422P' (planar YUV 422) 1: [0x32315559] 'YU12' (planar YUV 420) 2: [0x32315659] 'YV12' (planar YVU 420) 3: [0x3631564E] 'NV16' (planar YUV 422 UV combined) 4: [0x3231564E] 'NV12' (planar YUV 420 UV combined) 5: [0x3136564E] 'NV61' (planar YUV 422 VU combined) 6: [0x3132564E] 'NV21' (planar YUV 420 VU combined) 7: [0x32314D48] 'HM12' (MB YUV420) 8: [0x56595559] 'YUYV' (YUV422 YUYV) 9: [0x55595659] 'YVYU' (YUV422 YVYU) 10: [0x59565955] 'UYVY' (YUV422 UYVY) 11: [0x59555956] 'VYUY' (YUV422 VYUY) 12: [0x31384142] 'BA81' (RAW Bayer BGGR 8bit) 13: [0x47524247] 'GBRG' (RAW Bayer GBRG 8bit) 14: [0x47425247] 'GRBG' (RAW Bayer GRBG 8bit) 15: [0x47425247] 'GRBG' (RAW Bayer RGGB 8bit) 16: [0x30314742] 'BG10' (RAW Bayer BGGR 10bit) 17: [0x30314247] 'GB10' (RAW Bayer GBRG 10bit) 18: [0x30314142] 'BA10' (RAW Bayer GRBG 10bit) 19: [0x30314142] 'BA10' (RAW Bayer RGGB 10bit) 20: [0x32314742] 'BG12' (RAW Bayer BGGR 12bit) 21: [0x32314247] 'GB12' (RAW Bayer GBRG 12bit) 22: [0x32314142] 'BA12' (RAW Bayer GRBG 12bit) 23: [0x32314142] 'BA12' (RAW Bayer RGGB 12bit) V4L2 pixel sizes: ( 3264 x 2448 ) Pixels ( 3264 x 1836 ) Pixels ( 1920 x 1080 ) Pixels ( 1280 x 720 ) Pixels ( 1600 x 1200 ) Pixels ( 800 x 600 ) Pixels ( 640 x 480 ) Pixels Sensor size: 1920x1080 pixels Pixel Format: V4L2_PIX_FMT_YUV420 [0x32315559] Frame #10 will be saved! Length: 3117056 Bytesused: 3117056 Address: 0x1f0b6e0 FPS[0]: 14.37 Length: 3117056 Bytesused: 3117056 Address: 0x1f0b6e8 FPS[1]: 30.12 Length: 3117056 Bytesused: 3117056 Address: 0x1f0b6f0 FPS[2]: 29.51 Length: 3117056 Bytesused: 3117056 Address: 0x1f0b6f8 FPS[3]: 28.00 Length: 3117056 Bytesused: 3117056 Address: 0x1f0b700 FPS[4]: 31.51 Length: 3117056 Bytesused: 3117056 Address: 0x1f0b708 FPS[5]: 31.29 Length: 3117056 Bytesused: 3117056 Address: 0x1f0b710 FPS[6]: 30.03 Length: 3117056 Bytesused: 3117056 Address: 0x1f0b718 FPS[7]: 30.06 Length: 3117056 Bytesused: 3117056 Address: 0x1f0b6e0 FPS[8]: 30.04 Length: 3117056 Bytesused: 3117056 Address: 0x1f0b6e8 FPS[9]: 3.44 ------- Avg FPS: 30.07 -------- TEST 3 ( 1600 x 1200 ) ---- cap parameters ----- width: 1600 height: 1200 v4l2 buffers: 8 exposure: -999 hflip: -1 vflip: -1 Mode: V4L2_MODE_VIDEO Driver: "sunxi-vfe" Card: "sunxi-vfe" Bus: "sunxi_vfe sunxi_vfe.0" Version: 1.0 Capabilities: 05000001 Input: 0 V4L2 pixel formats: 0: [0x50323234] '422P' (planar YUV 422) 1: [0x32315559] 'YU12' (planar YUV 420) 2: [0x32315659] 'YV12' (planar YVU 420) 3: [0x3631564E] 'NV16' (planar YUV 422 UV combined) 4: [0x3231564E] 'NV12' (planar YUV 420 UV combined) 5: [0x3136564E] 'NV61' (planar YUV 422 VU combined) 6: [0x3132564E] 'NV21' (planar YUV 420 VU combined) 7: [0x32314D48] 'HM12' (MB YUV420) 8: [0x56595559] 'YUYV' (YUV422 YUYV) 9: [0x55595659] 'YVYU' (YUV422 YVYU) 10: [0x59565955] 'UYVY' (YUV422 UYVY) 11: [0x59555956] 'VYUY' (YUV422 VYUY) 12: [0x31384142] 'BA81' (RAW Bayer BGGR 8bit) 13: [0x47524247] 'GBRG' (RAW Bayer GBRG 8bit) 14: [0x47425247] 'GRBG' (RAW Bayer GRBG 8bit) 15: [0x47425247] 'GRBG' (RAW Bayer RGGB 8bit) 16: [0x30314742] 'BG10' (RAW Bayer BGGR 10bit) 17: [0x30314247] 'GB10' (RAW Bayer GBRG 10bit) 18: [0x30314142] 'BA10' (RAW Bayer GRBG 10bit) 19: [0x30314142] 'BA10' (RAW Bayer RGGB 10bit) 20: [0x32314742] 'BG12' (RAW Bayer BGGR 12bit) 21: [0x32314247] 'GB12' (RAW Bayer GBRG 12bit) 22: [0x32314142] 'BA12' (RAW Bayer GRBG 12bit) 23: [0x32314142] 'BA12' (RAW Bayer RGGB 12bit) V4L2 pixel sizes: ( 3264 x 2448 ) Pixels ( 3264 x 1836 ) Pixels ( 1920 x 1080 ) Pixels ( 1280 x 720 ) Pixels ( 1600 x 1200 ) Pixels ( 800 x 600 ) Pixels ( 640 x 480 ) Pixels Sensor size: 1600x1200 pixels Pixel Format: V4L2_PIX_FMT_YUV420 [0x32315559] Frame #10 will be saved! Length: 2887680 Bytesused: 2887680 Address: 0x1fc92a8 FPS[0]: 10.73 Length: 2887680 Bytesused: 2887680 Address: 0x1fc92b0 FPS[1]: 30.09 Length: 2887680 Bytesused: 2887680 Address: 0x1fc92b8 FPS[2]: 29.56 Length: 2887680 Bytesused: 2887680 Address: 0x1fc92c0 FPS[3]: 28.96 Length: 2887680 Bytesused: 2887680 Address: 0x1fc92c8 FPS[4]: 25.95 Length: 2887680 Bytesused: 2887680 Address: 0x1fc92d0 FPS[5]: 37.94 Length: 2887680 Bytesused: 2887680 Address: 0x1fc92d8 FPS[6]: 30.03 Length: 2887680 Bytesused: 2887680 Address: 0x1fc92e0 FPS[7]: 30.02 Length: 2887680 Bytesused: 2887680 Address: 0x1fc92a8 FPS[8]: 30.07 Length: 2887680 Bytesused: 2887680 Address: 0x1fc92b0 FPS[9]: 3.10 ------- Avg FPS: 30.33 -------- TEST 4 ( 1280 x 960 ) ---- cap parameters ----- width: 1280 height: 960 v4l2 buffers: 8 exposure: -999 hflip: -1 vflip: -1 Mode: V4L2_MODE_VIDEO Driver: "sunxi-vfe" Card: "sunxi-vfe" Bus: "sunxi_vfe sunxi_vfe.0" Version: 1.0 Capabilities: 05000001 Input: 0 V4L2 pixel formats: 0: [0x50323234] '422P' (planar YUV 422) 1: [0x32315559] 'YU12' (planar YUV 420) 2: [0x32315659] 'YV12' (planar YVU 420) 3: [0x3631564E] 'NV16' (planar YUV 422 UV combined) 4: [0x3231564E] 'NV12' (planar YUV 420 UV combined) 5: [0x3136564E] 'NV61' (planar YUV 422 VU combined) 6: [0x3132564E] 'NV21' (planar YUV 420 VU combined) 7: [0x32314D48] 'HM12' (MB YUV420) 8: [0x56595559] 'YUYV' (YUV422 YUYV) 9: [0x55595659] 'YVYU' (YUV422 YVYU) 10: [0x59565955] 'UYVY' (YUV422 UYVY) 11: [0x59555956] 'VYUY' (YUV422 VYUY) 12: [0x31384142] 'BA81' (RAW Bayer BGGR 8bit) 13: [0x47524247] 'GBRG' (RAW Bayer GBRG 8bit) 14: [0x47425247] 'GRBG' (RAW Bayer GRBG 8bit) 15: [0x47425247] 'GRBG' (RAW Bayer RGGB 8bit) 16: [0x30314742] 'BG10' (RAW Bayer BGGR 10bit) 17: [0x30314247] 'GB10' (RAW Bayer GBRG 10bit) 18: [0x30314142] 'BA10' (RAW Bayer GRBG 10bit) 19: [0x30314142] 'BA10' (RAW Bayer RGGB 10bit) 20: [0x32314742] 'BG12' (RAW Bayer BGGR 12bit) 21: [0x32314247] 'GB12' (RAW Bayer GBRG 12bit) 22: [0x32314142] 'BA12' (RAW Bayer GRBG 12bit) 23: [0x32314142] 'BA12' (RAW Bayer RGGB 12bit) V4L2 pixel sizes: ( 3264 x 2448 ) Pixels ( 3264 x 1836 ) Pixels ( 1920 x 1080 ) Pixels ( 1280 x 720 ) Pixels ( 1600 x 1200 ) Pixels ( 800 x 600 ) Pixels ( 640 x 480 ) Pixels Sensor size adjusted to: 800x600 pixels Pixel Format: V4L2_PIX_FMT_YUV420 [0x32315559] Frame #10 will be saved! Length: 724992 Bytesused: 724992 Address: 0x52f340 FPS[0]: 14.13 Length: 724992 Bytesused: 724992 Address: 0x52f348 FPS[1]: 33.46 Length: 724992 Bytesused: 724992 Address: 0x52f350 FPS[2]: 32.33 Length: 724992 Bytesused: 724992 Address: 0x52f358 FPS[3]: 27.94 Length: 724992 Bytesused: 724992 Address: 0x52f360 FPS[4]: 42.99 Length: 724992 Bytesused: 724992 Address: 0x52f368 FPS[5]: 33.27 Length: 724992 Bytesused: 724992 Address: 0x52f370 FPS[6]: 33.30 Length: 724992 Bytesused: 724992 Address: 0x52f378 FPS[7]: 33.30 Length: 724992 Bytesused: 724992 Address: 0x52f340 FPS[8]: 33.29 Length: 724992 Bytesused: 724992 Address: 0x52f348 FPS[9]: 8.38 ------- Avg FPS: 33.73 -------- TEST 5 ( 800 x 600 ) ---- cap parameters ----- width: 800 height: 600 v4l2 buffers: 8 exposure: -999 hflip: -1 vflip: -1 Mode: V4L2_MODE_VIDEO Driver: "sunxi-vfe" Card: "sunxi-vfe" Bus: "sunxi_vfe sunxi_vfe.0" Version: 1.0 Capabilities: 05000001 Input: 0 V4L2 pixel formats: 0: [0x50323234] '422P' (planar YUV 422) 1: [0x32315559] 'YU12' (planar YUV 420) 2: [0x32315659] 'YV12' (planar YVU 420) 3: [0x3631564E] 'NV16' (planar YUV 422 UV combined) 4: [0x3231564E] 'NV12' (planar YUV 420 UV combined) 5: [0x3136564E] 'NV61' (planar YUV 422 VU combined) 6: [0x3132564E] 'NV21' (planar YUV 420 VU combined) 7: [0x32314D48] 'HM12' (MB YUV420) 8: [0x56595559] 'YUYV' (YUV422 YUYV) 9: [0x55595659] 'YVYU' (YUV422 YVYU) 10: [0x59565955] 'UYVY' (YUV422 UYVY) 11: [0x59555956] 'VYUY' (YUV422 VYUY) 12: [0x31384142] 'BA81' (RAW Bayer BGGR 8bit) 13: [0x47524247] 'GBRG' (RAW Bayer GBRG 8bit) 14: [0x47425247] 'GRBG' (RAW Bayer GRBG 8bit) 15: [0x47425247] 'GRBG' (RAW Bayer RGGB 8bit) 16: [0x30314742] 'BG10' (RAW Bayer BGGR 10bit) 17: [0x30314247] 'GB10' (RAW Bayer GBRG 10bit) 18: [0x30314142] 'BA10' (RAW Bayer GRBG 10bit) 19: [0x30314142] 'BA10' (RAW Bayer RGGB 10bit) 20: [0x32314742] 'BG12' (RAW Bayer BGGR 12bit) 21: [0x32314247] 'GB12' (RAW Bayer GBRG 12bit) 22: [0x32314142] 'BA12' (RAW Bayer GRBG 12bit) 23: [0x32314142] 'BA12' (RAW Bayer RGGB 12bit) V4L2 pixel sizes: ( 3264 x 2448 ) Pixels ( 3264 x 1836 ) Pixels ( 1920 x 1080 ) Pixels ( 1280 x 720 ) Pixels ( 1600 x 1200 ) Pixels ( 800 x 600 ) Pixels ( 640 x 480 ) Pixels Sensor size: 800x600 pixels Pixel Format: V4L2_PIX_FMT_YUV420 [0x32315559] Frame #10 will be saved! Length: 724992 Bytesused: 724992 Address: 0x260368 FPS[0]: 19.52 Length: 724992 Bytesused: 724992 Address: 0x260370 FPS[1]: 33.59 Length: 724992 Bytesused: 724992 Address: 0x260378 FPS[2]: 32.32 Length: 724992 Bytesused: 724992 Address: 0x260380 FPS[3]: 31.84 Length: 724992 Bytesused: 724992 Address: 0x260388 FPS[4]: 33.39 Length: 724992 Bytesused: 724992 Address: 0x260390 FPS[5]: 35.97 Length: 724992 Bytesused: 724992 Address: 0x260398 FPS[6]: 33.34 Length: 724992 Bytesused: 724992 Address: 0x2603a0 FPS[7]: 33.30 Length: 724992 Bytesused: 724992 Address: 0x260368 FPS[8]: 33.30 Length: 724992 Bytesused: 724992 Address: 0x260370 FPS[9]: 6.94 ------- Avg FPS: 33.38 -------- TEST 6 ( 640 x 480 ) ---- cap parameters ----- width: 640 height: 480 v4l2 buffers: 8 exposure: -999 hflip: -1 vflip: -1 Mode: V4L2_MODE_VIDEO Driver: "sunxi-vfe" Card: "sunxi-vfe" Bus: "sunxi_vfe sunxi_vfe.0" Version: 1.0 Capabilities: 05000001 Input: 0 V4L2 pixel formats: 0: [0x50323234] '422P' (planar YUV 422) 1: [0x32315559] 'YU12' (planar YUV 420) 2: [0x32315659] 'YV12' (planar YVU 420) 3: [0x3631564E] 'NV16' (planar YUV 422 UV combined) 4: [0x3231564E] 'NV12' (planar YUV 420 UV combined) 5: [0x3136564E] 'NV61' (planar YUV 422 VU combined) 6: [0x3132564E] 'NV21' (planar YUV 420 VU combined) 7: [0x32314D48] 'HM12' (MB YUV420) 8: [0x56595559] 'YUYV' (YUV422 YUYV) 9: [0x55595659] 'YVYU' (YUV422 YVYU) 10: [0x59565955] 'UYVY' (YUV422 UYVY) 11: [0x59555956] 'VYUY' (YUV422 VYUY) 12: [0x31384142] 'BA81' (RAW Bayer BGGR 8bit) 13: [0x47524247] 'GBRG' (RAW Bayer GBRG 8bit) 14: [0x47425247] 'GRBG' (RAW Bayer GRBG 8bit) 15: [0x47425247] 'GRBG' (RAW Bayer RGGB 8bit) 16: [0x30314742] 'BG10' (RAW Bayer BGGR 10bit) 17: [0x30314247] 'GB10' (RAW Bayer GBRG 10bit) 18: [0x30314142] 'BA10' (RAW Bayer GRBG 10bit) 19: [0x30314142] 'BA10' (RAW Bayer RGGB 10bit) 20: [0x32314742] 'BG12' (RAW Bayer BGGR 12bit) 21: [0x32314247] 'GB12' (RAW Bayer GBRG 12bit) 22: [0x32314142] 'BA12' (RAW Bayer GRBG 12bit) 23: [0x32314142] 'BA12' (RAW Bayer RGGB 12bit) V4L2 pixel sizes: ( 3264 x 2448 ) Pixels ( 3264 x 1836 ) Pixels ( 1920 x 1080 ) Pixels ( 1280 x 720 ) Pixels ( 1600 x 1200 ) Pixels ( 800 x 600 ) Pixels ( 640 x 480 ) Pixels Sensor size: 640x480 pixels Pixel Format: V4L2_PIX_FMT_YUV420 [0x32315559] Frame #10 will be saved! Length: 466944 Bytesused: 466944 Address: 0xde03f8 FPS[0]: 12.74 Length: 466944 Bytesused: 466944 Address: 0xde0400 FPS[1]: 30.24 Length: 466944 Bytesused: 466944 Address: 0xde0408 FPS[2]: 29.19 Length: 466944 Bytesused: 466944 Address: 0xde0410 FPS[3]: 25.70 Length: 466944 Bytesused: 466944 Address: 0xde0418 FPS[4]: 31.95 Length: 466944 Bytesused: 466944 Address: 0xde0420 FPS[5]: 35.26 Length: 466944 Bytesused: 466944 Address: 0xde0428 FPS[6]: 30.04 Length: 466944 Bytesused: 466944 Address: 0xde0430 FPS[7]: 30.04 Length: 466944 Bytesused: 466944 Address: 0xde03f8 FPS[8]: 30.06 Length: 466944 Bytesused: 466944 Address: 0xde0400 FPS[9]: 6.26 ------- Avg FPS: 30.31 -------- Some output:

     

     

  10. Like
    hellf reacted to tkaiser in Marriage between A20 and H3, UPS mode, sunxi-pio utility   
    Some more knowledge today. A10, A13 (called R8 on the C.H.I.P.) and A20 are defined as tablet SoCs and got a PMIC/PMU (power management IC / unit) companion called AXP209. 
     
    AXP209 can deal with 3 different power sources:
    DC-IN (on the aforementioned Olimex Lime2 available as a barrel plug for 5.5/2.1 mm jacks and some circuitry to filter noisy power input) USB OTG (on the Lime2 in form of a Mini USB connector) Battery (on the Lime2 available as a small JHT header to be connected to a 3.7V LiPo battery) As already said the power design of the Olimex boards is made in a way that a connected SATA disk will also be powered when running from battery (the various Bananas for example do it differently and a SATA disk there is not powered through AXP209 but directly fed from DC-IN). AXP209 can be queried through I2C and when using Armbian the available data can be read out with both legacy and vanilla kernel (since Zador ported the necessary stuff to mainline kernel).
     
    Input voltage can be read out as well as amperage (AXP209 can deal with some ADC -- analog to digital converters). But not every powering method provides identical data. When the Lime2 is powered the preferrable way (DC-IN / barrel connector) then a SATA disk's consumption for example or consumers of the USB ports do not add to the amperage/consumption that can be readout. But if powered through Mini USB then it adds to the consumption and you get a more complete picture.
     
    Then it's the best idea to power Lime2 through the Mini USB connector? Nope for a couple of reasons:
    Olimex 'noise immune' filter circuitry is only available through the DC-IN barrel We might want to use the Mini USB port for data (either in OTG or host mode) Powering through USB has a major drawback: Most USB cable simply suck due to resistance way to high (leading to severe voltage drops under load -- see below) Therefore the best way is to use DC-IN for normal use cases and switch to USB OTG on AXP209 equipped boards only to test stuff out, eg. how a spinning disk, other peripherals or on-board components adds to the board's consumption.
     
    On the following graph Lime2 is powered through USB OTG first and the 2TB SATA disk is spinning. After a couple of minutes I sent the disk to sleep (hdparm -Y /dev/sda) and immediately consumption drops also. A minute later I plugged in the barrel jack into the DC-IN port and immediately AXP209 switches from USB OTG to DC-IN as main power source. But consumption is reported lower since SATA disk (and other components) are not added when powered this way. A few minutes later I woke up the disk but the DC-IN consumption graph remained the same.
     
    Then I unplugged DC-IN and AXP209 immediately switched back to USB OTG. At the same time I switched on the BPi M2+ that is powered from one of Lime2's USB type A ports and since the USB cable I used between Lime2's OTG port and the PSU is crap as most USB cables in this situation available voltage dropped below 4.8V and AXP209 decided to compensate by also using the battery partially. Later the disk went to sleep again and I shut the BPi M2+ down so consumption dropped as low as 350mA and available voltage on the OTG recovered back to 5.0V (that's the problem with bad USB cables: voltage drops only under load)
     

     
    This is Lime2 with power through USB OTG port and spinning SATA disk (voltage drops already down to 4.92V)
     

     
    Now the disk is in standby mode (sleep settings defined in /etc/rc.local), consumption drops and voltage is OK again:
     

     
    Now AXP209 chose the available DC-IN source (large PSU using good cable with low resistance). SATA disk is missing on consumption output:
     

     
    I let the SATA disk spin-up again and booted the USB powered BPi M2+, the crappy USB cable leads to voltage drops below 4.8V so AXP209 decides to rely also on battery:
     

     
    Consumption is back at normal level (both SATA disk and BPi M2+ idle) so AXP209 decides to re-charge the battery:
     

  11. Like
    hellf reacted to tkaiser in Marriage between A20 and H3, UPS mode, sunxi-pio utility   
    Let's start with a weird image first:
     

     
    In the plastic box is an Olimex A20-Lime2, a 2.5" HDD with 2TB and Olimex' largest battery with 6600mAh. Mounted on the top cover (box standing on the side) is a Banana Pi M2+ (to be replaced with NanoPi M1 or OPi One/PC in the future)
     
    Why Lime2? Since this board from our friends at Olimex is designed intelligently and provides DC-DC step-up converters on the board providing the ability to power also the connected SATA disk when running from battery (unlike most other A10/A20 boards that do only provide 5V on USB ports in battery mode but not to the disk!). And since A20 is perfectly supported by mainline kernel (I run 4.6.4 on it with btrfs on both SD card and connected SATA disk. Since the Lime2 is used as monitoring/rsyslog host btrfs compression is active and the 2TB HDD might store up to 20TB of raw log/monitoring data)
     
    Why BPi M2+? Since board was lying around and I have no other use for it (SinoVoip sent me a review sample a while ago). The idea to combine A20 with a H3 device was simply to add a camera capable and performant device that is ultra cheap (does not apply to BPi M2+ but to NanoPi M1 or OPi One for example). The H3 device will be used to off-load some stuff (eg. OpenVPN encryption), to capture images and do other hardware monitoring (eg. checking temperature in server racks using 1-Wire sensors)
     
    Both boards in this mode run up to 8 hours on battery (6h when the 2 TB disk is also always spinning -- but I use a large 64GB Samsung EVO in the Lime2 and wake up the HDD only from time to time to move data over from SD card). And in this special mode the Lime2 is acting as UPS for the H3 board too since BPi M2+ is powered through Micro USB from Lime2's left USB type A receptacle. The same USB connection is also used as a 'private' network utilizing Ethernet gadget driver on the H3 device.
     
    BPi M2+ is running our sun8i legacy kernel, g_ether module is active and configuration using a link local address as outlined in this thread. Therefore as soon as BPi M2+ boots and brings up his usb0 interface the board appears as Ethernet USB dongle on the Lime2 and can be used easily with the following settings as directly connected network device (providing ~120 Mbits/sec throughput over the USB cable):
     
     
     
    This USB connection can now be used as a directly wired network connection (BPI M2+ is 169.254.2.1 and Lime2 169.254.2.2 and both can interact through this connection or use it as 'heartbeat' connection to monitor network outages). And using BPi M2+ or NanoPi M1 or NEO the very same USB connection can also be used to power the H3 device (not with Oranges there a hardware mod is needed).
     
    Now the fun part: In case the USB powered H3 device freezes or is shut down and has to be restarted... how to do so? Some/most A10/A20 boards provide the 5V on their USB ports not directly from DC-IN but through their AXP209 PMU. And if the board is designed that way, power can be switched on/off on request. This is where the sunxi-pio tool gets interesting since with this tool you can query and switch pin state.
     
    In the above example BPi M2+ is powered through Lime2's left USB port. VDD_USB of this port can be controlled through PH06 pin. So to cut power from Lime2 to BPi M2+ all I have to do is
    sunxi-pio -m PH06'<default><default<default><0>' And to provide power again, it's the opposite:
    sunxi-pio -m PH06'<default><default<default><1>' (at least on my Lime2 the left USB port is more reliable than the right port that can be controlled through PH03 pin). To be able to use the sunxi-pio tool you need a recent sunxi-tools version. As Armbian user you don't have to care since we ship always the most recent version.
     
    Not all A10/A20 boards support this and pin mappings differ between different boards. So where to look? In the fex files (don't trust them blindly, some vendors horribly suck providing documentation for their own hardware, compare the pin mappings in bananapiprolcd7.fex and bananapipro.fex for example).
     
    EDIT: Checked with both Banana Pi and Banana Pro: The USB voltage pin mappings in the fex files are plain BS and do not work (obviously 'copy&paste gone wrong' when they copied all of CubieTech's work in the beginning)
     
    I let a script check the fex files of all Allwinner boards we currently support. Two H3 devices show the ability to switch USB voltage (OPi 2 and Plus/Plus2 -- the pin here most probably controls power for the internal Terminus USB hub) but all the others are A10/A20 based:
     
     
    Edit: But at least on H3 Orange Pi boards it's possible to toggle power available on Micro USB port from userspace.
     
    So if you want to switch power on the USB ports of a Banana Pro you would not use PH03/PH06 but PH00/PH01 instead (and yes, sunxi-pio works with exactly these settings/syntax even when the board runs vanilla/mainline kernel). Since we're talking about A20 Bananas now: These devices do not provide power to a connected SATA disk when running on battery unlike Olimex' boards. So in case you want to ensure that a connected SATA disk keeps spinning when DC-IN is not available then you have to DIY a cable solution taking power from the 2 USB ports and feeding SATA power this way (the SATA power connector on Banana boards is directly wired to the Micro USB DC-IN jack so you can both provide DC-IN here more reliably and have to keep in mind that battery/AXP209 is not involved at all)
     
    BTW: sunxi-pio can be used for more than just switching power on USB ports. Simply call it without arguments to get the idea / help text. Anyone trying to decrease consumption of his Allwinner board might love this tool since you're able to switch off on-board consumers from user space.
  12. Like
    hellf reacted to Klym in Marriage between A20 and H3, UPS mode, sunxi-pio utility   
    Banana PI M1+ is also working fine with battery backup:

    2x18650 3400mAh cells. ~5 hours with always-on 4TB HDD
     
     
  13. Like
    hellf reacted to Igor in After update for linux-image-sun8i (5.20) over (5.14) - My opione not work   
    .raw was renamed to .img in latest update. There is no other diff.
     
    If upgrading is failed, you don't reboot until you find out what's wrong ... I guess we need to write this somewhere since you are not the only one with this problem. Check for a solution:
     
    http://forum.armbian.com/index.php/topic/2058-upgrade-problem-with-520-on-xenial/
  14. Like
    hellf reacted to killwill in After update for linux-image-sun8i (5.20) over (5.14) - My opione not work   
    SOLVED  !!!   after dist-upgrade and before of reboot :   sudo apt-get install -f   be happy   thanks to   Igor and tkaiser
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines