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.