BeagleBone黑色设备树覆盖不会改变pinmux

时间:2014-05-10 09:01:54

标签: beagleboard gpio beagleboneblack device-tree

我最近开始使用BeagleBone Black工作,我面临一些问题,要应用设备树覆盖来修改pinmux以便使用一些gpios。我找到了很多关于设备树覆盖的教程,但我很难应用配置。我需要一些帮助。

以下是我使用的dts文件:(BBB-CAM-00A0.dts)

/dts-v1/;
/plugin/;

/ {

compatible = "ti,beaglebone", "ti,beaglebone-black";

/* identification */
part-number = "BB-CAM";
version = "00A0";

exclusive-use =
/* the pin header uses */
        "P8.07",
        "P8.08",
        "P8.09",
        "P8.10",
        "P8.11",
        "P8.12",
        "P8.13",
        "P8.14",
        "P8.15",
        "P8.16",
        "P8.17",
        "P8.18",
        "P8.19",
        "P9.11",
        "P9.12",
        "P9.13",
        "P9.14";

fragment@0 {
        target = <&am33xx_pinmux>;
        __overlay__ {
                pinctrl_test: pinctrl_test_0_pins {
                        pinctrl-single,pins = <
                                0x090 0x07
                                0x094 0x07
                                0x09c 0x07
                                0x098 0x07
                                0x034 0x07
                                0x030 0x07
                                0x024 0x07
                                0x028 0x07
                                0x03c 0x07
                                0x038 0x07
                                0x02c 0x07
                                0x08c 0x07
                                0x020 0x07
                                0x070 0x07
                                0x078 0x07
                                0x074 0x07
                                0x048 0x07
                        >;
                };
        };
};

fragment@1 {
        target = <&ocp>;
        __overlay__ {
                        test_helper: helper {
                                status = "okay";
                                pinctrl-names = "default";
                                pinctrl-0 = <&pinctrl_test>;
                        };
                };
        };
};

我使用的所有引脚都没有使用过另一个覆盖层,所有引脚都是:

pin xx (44e10xxx): (MUX UNCLAIMED) (GPIO UNCLAIMED)

我使用:

编译dts
dtc -O dtb -o BBB-CAM-00A0.dtbo -b O -@ BBB-CAM-00A0.dts

然后:

cp BBB-CAM-00A0.dtbo /lib/firmware/

然后:

echo BBB-CAM > /sys/devices/bone_capemgr.*/slots

此时,叠加层似乎被接受了:

 0: 54:PF---
 1: 55:PF---
 2: 56:PF---
 3: 57:PF---
 4: ff:P-O-L Bone-LT-eMMC-2G,00A0,Texas Instrument,BB-BONE-EMMC-2G
 5: ff:P-O-L Bone-Black-HDMI,00A0,Texas Instrument,BB-BONELT-HDMI
 7: ff:P-O-L Override Board Name,00A0,Override Manuf,BBB-CAM

但pinmux似乎没有改变:

root@beaglebone:~/Desktop# cat $PINS |grep 890
pin 36 (44e10890) 00000037 pinctrl-single
root@beaglebone:~/Desktop# cat $PINS |grep 894
pin 37 (44e10894) 00000037 pinctrl-single
root@beaglebone:~/Desktop# cat $PINS |grep 89c
pin 39 (44e1089c) 00000037 pinctrl-single
root@beaglebone:~/Desktop# cat $PINS |grep 898
pin 38 (44e10898) 00000037 pinctrl-single
root@beaglebone:~/Desktop# cat $PINS |grep 834
pin 13 (44e10834) 00000027 pinctrl-single
root@beaglebone:~/Desktop# cat $PINS |grep 830
pin 12 (44e10830) 00000027 pinctrl-single
root@beaglebone:~/Desktop# cat $PINS |grep 824
pin 9 (44e10824) 00000027 pinctrl-single
root@beaglebone:~/Desktop# cat $PINS |grep 828
pin 10 (44e10828) 00000027 pinctrl-single
root@beaglebone:~/Desktop# cat $PINS |grep 83c
pin 15 (44e1083c) 00000027 pinctrl-single

dmesg不会返回任何相关信息。

有关信息,这是我未更改的内核:

Linux beaglebone 3.8.13 #1 SMP Wed Sep 4 09:09:32 CEST 2013 armv7l GNU/Linux

我真的不知道如何处理这个问题,有什么建议吗?

非常感谢

1 个答案:

答案 0 :(得分:0)

确定。问题解决了,我重新安装了Angstrom