I have a problem with Devicetree overlay. My overlay file is here;
/{
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>;
};
};
};};
Then I add this .dts file to lib/firmware
.
I have compiled this .dts file. The output is .dtbo file
.
My compile method is here;
dtc -O dtb -o /lib/firmware/GPIO_Overlays-00A0.dtbo -b 0 -@ /lib/firmware/GPIO_Overlays-00A0.dts
When I reboot the BBB, These pins are reverting to their old state.
What is the worng? I couldn't solve this problem. Can anyone help me?
Note: I use the linux-4.14-rt and debian 9.5.