On Thu, Feb 27, 2020 at 7:43 PM Fabrizio Borrello
<[email protected]> wrote:
>
> Hi Robert,
>
> I apologize for having misunderstood your directions.
>
> I found the controller declaration and attached as a child  the gpio hog as 
> follow:
>
> gpio@44e07000 {
> compatible = "ti,omap4-gpio";
> ti,hwmods = "gpio1";
> gpio-controller;
> #gpio-cells = <0x2>;
> interrupt-controller;
> #interrupt-cells = <0x2>;
> reg = <0x44e07000 0x1000>;
> interrupts = <0x60>;
> gpio-line-names = "MDIO_DATA", "MDIO_CLK", "SPI0_SCLK", "SPI0_D0", "SPI0_D1", 
> "SPI0_CS0", "SPI0_CS1", "ECAP0_IN_PWM0_OUT", "LCD_DATA12", "LCD_DATA13", 
> "LCD_DATA14", "LCD_DATA15", "UART1_CTSN", "UART1_RTSN", "UART1_RXD", 
> "UART1_TXD", "GMII1_TXD3", "GMII1_TXD2", "USB0_DRVVBUS", "XDMA_EVENT_INTR0", 
> "XDMA_EVENT_INTR1", "GMII1_TXD1", "GPMC_AD8", "GPMC_AD9", "NC", "NC", 
> "GPMC_AD10", "GPMC_AD11", "GMII1_TXD0", "RMII1_REFCLK", "GPMC_WAIT0", 
> "GPMC_WPN";
> linux,phandle = <0x32>;
> phandle = <0x32>;
> };
>
> P9_11 {
> gpio-hog;
> gpios = <11 GPIO_ACTIVE_LOW>;
> output-low;
> };
>
> I am not sure about the value of 'gpios'.
> I read that: "gpios: Store the GPIO information (id, flags, ...). Shall 
> contain the number of cells specified in its parent node (GPIO controller 
> node)".
> In this case the parent node contains: "#gpio-cells = <0x2>;", but I have no 
> idea what to write in.

https://github.com/derekmolloy/boneDeviceTree/blob/master/docs/BeagleboneBlackP8HeaderTable.pdf
https://github.com/derekmolloy/boneDeviceTree/blob/master/docs/BeagleboneBlackP9HeaderTable.pdf

P9.11 = gpio0[30]

If you edit a base device tree you'd do:

&gpio0 {
        some_unique_name {
                gpio-hog;
                gpios = <30 GPIO_ACTIVE_HIGH>;
                output-low;
                line-name = "SOME_OTHER_UNIQUE_NAME";
        };
};

if your doing an overlay you'd do:

        fragment@15 {
                target = <&gpio0>;
                __overlay__ {
                        some_unique_name {
                                gpio-hog;
                                gpios = <30 GPIO_ACTIVE_HIGH>;
                                output-low;
                                line-name = "SOME_OTHER_UNIQUE_NAME";
                        };
                };
        };

Regards,

-- 
Robert Nelson
https://rcn-ee.com/

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/CAOCHtYj1DCrkVzs5B7F6uieUftr7tu_2v5cBNNzoLAumMaf9SQ%40mail.gmail.com.

Reply via email to