02-05-2020, 10:58 PM
I am using the latest stable ayufan bionic
I need to use a few of the gpio pins as input interrupts. In an RPI that is a simple is setting a line the the /boot/firmware/config.txt file.
ex. gpio=9,10,24,4=pd to set pins 0.10,24,4 as pulldowns
But I guess that method has not been copied in the ayufan image.
That leaves me to rebuild the kernel (not wanting to do that) or use a DTO which I understand is a way to add functionality to the kernel without a complete recompile.
So I gotta believe someone has had a need of pins as interrupts on the rock64 and already has a working dts file.
Besides being some pretty arcane syntax I can find no docs on this that pertain specifically to the rock64 let alone a sample dts file.
Can anyone help out here with a working dts file and some details about how to compile/register it so it gets picked up at boot.
here for example is a beagle black dts file about all I could find.
I need to use a few of the gpio pins as input interrupts. In an RPI that is a simple is setting a line the the /boot/firmware/config.txt file.
ex. gpio=9,10,24,4=pd to set pins 0.10,24,4 as pulldowns
But I guess that method has not been copied in the ayufan image.
That leaves me to rebuild the kernel (not wanting to do that) or use a DTO which I understand is a way to add functionality to the kernel without a complete recompile.
So I gotta believe someone has had a need of pins as interrupts on the rock64 and already has a working dts file.
Besides being some pretty arcane syntax I can find no docs on this that pertain specifically to the rock64 let alone a sample dts file.
Can anyone help out here with a working dts file and some details about how to compile/register it so it gets picked up at boot.
here for example is a beagle black dts file about all I could find.
Code:
/*
* Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Purpose License Version 2 as
* published by the Free Software Foundation
*
* Original from: github.com/jadonk/validation-scripts/blob/master/test-capemgr/
*
* Modified by Derek Molloy for the example on www.derekmolloy.ie
* that maps GPIO pins for the example
*/
/dts-v1/;
/plugin/;
/{
compatible = "ti,beaglebone", "ti,beaglebone-black";
part-number = "WEIGU1";
version = "00A0";
fragment@0 {
target = <&am33xx_pinmux>;
__overlay__ {
pinctrl_test: DM_GPIO_Test_Pins {
pinctrl-single,pins = <
0x044 0x07 /* P9_23 49 OUTPUT MODE7 - MUXA */
0x040 0x07 /* P9_15 48 OUTPUT MODE7 - MUXB */
0x1ac 0x07 /* P9_25 117 OUTPUT MODE7 - MUXT conflict mcasp0! */
0x0a4 0x07 /* P8_46 71 OUTPUT MODE7 - RTS conflict hdmi_bonelt! */
/* OUTPUT GPIO(mode7) 0x07 pulldown, 0x17 pullup, 0x?f no pullup/down */
/* INPUT GPIO(mode7) 0x27 pulldown, 0x37 pullup, 0x?f no pullup/down */
>;
};
};
};
fragment@1 {
target = <&ocp>;
__overlay__ {
test_helper: helper {
compatible = "bone-pinmux-helper";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_test>;
status = "okay";
};
};
};
};