Я установил новый образ Ubuntu (14.04.2 LTS) на свою плату BeagleBone Black. Я обнаружил, что Cape Manager больше не поддерживается, поэтому
echo bone_eqep2b > /sys/devices/bone_capemgr.*/slots
не работает. Насколько я понял для загрузки оверлея дерева устройств мне нужно следующее:
- установить RSCM
- исправить
am335x-boneblack.dts
файл - запустить build.sh
- перезагрузить плату
Итак, я сомневаюсь по поводу пункта 2. Как правильно объединить bone_eqep2b.dts
и am335x-boneblack.dts
?
Я думаю, чтобы включить eqep2b, мне просто нужно изменить этот блок кода:
epwmss@48304000 {
compatible = "ti,am33xx-pwmss";
reg = <0x48304000 0x10>;
ti,hwmods = "epwmss2";
#address-cells = <0x1>;
#size-cells = <0x1>;
status = "disabled";
ranges = <0x48304100 0x48304100 0x80 0x48304180 0x48304180 0x80 0x48304200 0x4
8304200 0x80>;
ecap@48304100 {
compatible = "ti,am33xx-ecap";
#pwm-cells = <0x3>;
reg = <0x48304100 0x80>;
ti,hwmods = "ecap2";
status = "disabled";
};
ehrpwm@48304200 {
compatible = "ti,am33xx-ehrpwm";
#pwm-cells = <0x3>;
reg = <0x48304200 0x80>;
ti,hwmods = "ehrpwm2";
status = "disabled";
};
};
чем-то вроде
epwmss@48304000 {
compatible = "ti,am33xx-pwmss";
reg = <0x48304000 0x10>;
ti,hwmods = "epwmss2";
#address-cells = <0x1>;
#size-cells = <0x1>;
status = "okay";
count_mode = <0>; /* 0 - Quadrature mode, normal 90 phase offset cha & chb. 1 - Direction mode. cha input = clock, chb input = direction */
swap_inputs = <0>; /* Are channel A and channel B swapped? (0 - no, 1 - yes) */
invert_qa = <1>; /* Should we invert the channel A input? */
invert_qb = <1>; /* Should we invert the channel B input? I invert these because my encoder outputs drive transistors that pull down the pins */
invert_qi = <0>; /* Should we invert the index input? */
invert_qs = <0>; /* Should we invert the strobe input? */
status = "okay";
ranges = <0x48304100 0x48304100 0x80 0x48304180 0x48304180 0x80 0x48304200 0x4
8304200 0x80>;
ecap@48304100 {
compatible = "ti,am33xx-ecap";
#pwm-cells = <0x3>;
reg = <0x48304100 0x80>;
ti,hwmods = "ecap2";
status = "okay";
};
ehrpwm@48304200 {
compatible = "ti,am33xx-ehrpwm";
#pwm-cells = <0x3>;
reg = <0x48304200 0x80>;
ti,hwmods = "ehrpwm2";
status = "okay";
};
};
Верный?
Я не смог найти готовую версию, было бы здорово, если бы кто-нибудь уже исправил и мог бы поделиться.