簡體   English   中英

為 Beaglebone Black linux 4.14-ti 啟用設備樹覆蓋

[英]Enable Device Tree Overlay for Beaglebone Black linux 4.14-ti

我有 Devicetree 覆蓋的問題。 我的覆蓋文件在這里;

/{
    compatible = "ti,beaglebone", "ti,beaglebone-black";
    
/* Identification */
part_number = "GPIO_Overlays";

/* Version */
version = "00A0";

exclusive-use =
"P9.31",
"P9.17",
"P9.29",
"P9.18",
"P9.28",
"P9.27",
"P9.30",
"P9.24",
"P9.26",
"P9.20";
/* To be Continue */
/*
 * Free up the pins used by the cape from the pinmux helpers.
 */
fragment@0{
    target = <&ocp>;
    __overlay__{
        P9_31_pinmux { status = "disabled"; };
        P9_17_pinmux { status = "disabled"; };
        P9_29_pinmux { status = "disabled"; };
        P9_18_pinmux { status = "disabled"; };
        P9_28_pinmux { status = "disabled"; };
        P9_27_pinmux { status = "disabled"; };
        P9_30_pinmux { status = "disabled"; };
        P9_24_pinmux { status = "disabled"; };
        P9_26_pinmux { status = "disabled"; };
        P9_20_pinmux { status = "disabled"; };
    };
};

/*
* Free up the gpios used by the cape-universal gpio helpers.
*/
fragment@1 {
    target = <&ocp>;
    __overlay__{
        cape-universal { status = "disabled"; };
    };
};

/*
* Setting up to gpio pins.
*/
fragment@2{
    target = <&am33xx_pinmux>;
    __overlay__{
        GPIO_Overlays: GPIO_Overlays{
            pinctrl-single,pins = <

            0x190 0x37      /* Input_PullUp | Mode 7 */
            0x15C 0x37      /* Input_PullUp | Mode 7 */
            0x194 0x37      /* Input_PullUp | Mode 7 */
            0x158 0x17      /* Output_PullUp | Mode 7 */
            0x19C 0x37      /* Input_PullUp | Mode 7 */
            0x1a4 0x37      /* Input_PullUp | Mode 7 */
            0x198 0x17      /* Output_PullUp | Mode 7 */
            0x184 0x17      /* Output_PullUp | Mode 7 */
            0x180 0x17      /* Output_PullUp | Mode 7 */
            0x178 0x17      /* Output_PullUp | Mode 7 */ 
            /* BONE_P9_20 (PIN_OUTPUT_PULLDOWN | MUX_MODE7) */

            >;
        };
    };
};

fragment@3{
    target = <&ocp>;
        __overlay__{
            GPIO{
                compatible = "gpio-keys";
                status = "okay";
                pinctrl-names = "default";
                pinctrl-0 = <&GPIO_Overlays>;
            };
    };
};};

然后我將此 .dts 文件添加到lib/firmware 我已經編譯了這個 .dts 文件。 輸出是.dtbo file

我的編譯方法在這里;

dtc -O dtb -o /lib/firmware/GPIO_Overlays-00A0.dtbo -b 0 -@ /lib/firmware/GPIO_Overlays-00A0.dts

當我重新啟動 BBB 時,這些引腳恢復到原來的狀態。

什么是wearg? 我無法解決這個問題。 誰能幫我?

注意:我使用的是 linux-4.14-rt 和 debian 9.5。

編輯:當我重新啟動 BBB 時,出現此錯誤。

[0.717426] pinctrl-single 44e10800.pinmux:ocp:helper 已經請求了 pin13; 不能申請 ocp:P8_11_pinmux

[0.728435] pinctrl-single 44e10800.pinmux: pin-13 (ocp:P8_11_pinmux) 狀態-22

[0.736399] pinctrl-single 44e10800.pinmux:無法從設備 pinctrl-single 上的 pinmux_P8_11_default_pin 組請求 pin 13 (PIN13)

[0.750487]bone-pinmux-helper ocp:P8_11_pinmux:應用設置出錯,將事情反轉回來

請參見此處: https : //github.com/beagleboard/BeagleBoard-DeviceTrees

在那里您可以看到他們如何生成特定的 .dts 文件,然后您可以將他們的整個 .dts 文件存檔重建到一些您changed收藏夾中。

另外,我認為要在克隆后構建,只需在目錄中輸入 make 即可。

所以:

  1. git 克隆https://github.com/beagleboard/BeagleBoard-DeviceTrees
  2. cd BeagleBoard-DeviceTrees
  3. src/armsrc/arm/overlays環顧四周
  4. 改變你認為可能需要改變的東西,然后……
  5. 制作

這可能會治愈你的后顧之憂。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM