Genna

  • Posts

    6
  • Joined

  • Last visited

Community Answers

  1. Genna's post in Odroid HC4 enable RTC clock was marked as the answer   
    Have you tried adding it as a user overlay?
    Basically create a folder '/boot/overlay-user'. Compile your plugin with the usual 'dtc -I dts -O dtb [your file] -o [output name].dtbo' and put it into the created directory. Then edit '/boot/armbianEnv.txt' and add the line 'user_overlays=[output name]'. That is what worked for me every time so far.
     
     
  2. Genna's post in Missing access to all PWM outputs was marked as the answer   
    If you just want to get PWM running do the following:
     
    create a file (lets name it pwm_cd.dts) with this contents
    /dts-v1/; /plugin/; /{ fragment@0 { target = <&pwm_cd>; __overlay__{ status = "okay"; pinctrl-names = "default"; pinctrl-0 = <&pwm_c_x5_pins &pwm_d_x3_pins>; }; }; };  
    compile that file with
    dtc -I dts -O dtb pwm_cd.dts -o pwm_cd.dtbo  
    create a directory for user overlays and move that file there
    mkdir /boot/overlay-user cp pwm_cd.dtbo /boot/overlay-user/  
    edit /boot/armbianEnv.txt and add the following line
    user_overlays=pwm_cd then do a reboot and you should be able to use PWM_C and PWM_D with sysfs like
     
    cd /sys/class/pwm/pwmchip-2/ echo 0 > export echo 1000000 > pwm0/period echo 50000 > pwm0/duty_cycle echo 1 > pwm0/enable  
    This can be done for the other PWM's as well. You'll just have to figure out which pinctrl-names you have to use by comparing the files from odroid (overlays and dtb) with the dtb from armbian.