Device tree on Kernel 4.x

Started by splite, September 07, 2015, 08:18:48 PM

Previous topic - Next topic

splite

Hey,

I'm giving a try to Kernel 4.x on Lime2 and I have to deal with device tree instead of Fex file.

Does anybody managed to modify correctly LED and battery management ?

The documentation over Internet is really poor and I could not find a way of doing this simple thing, change the green heartbeat LED on PH2 to GPIO PH20...

                        led_pins@0 {
                                allwinner,pins = "PH2";
                                allwinner,function = "gpio_out";
                                allwinner,drive = <0x1>;
                                allwinner,pull = <0x0>;
                                linux,phandle = <0x35>;
                                phandle = <0x35>;
                        };

        leds {
                compatible = "gpio-leds";
                pinctrl-names = "default";
                pinctrl-0 = <0x35>;

                green {
                        label = "a20-olinuxino-lime2:green:usr";
                        gpios = <0x1a 0x7 0x2 0x0>;
                        default-state = "on";
                };


It seems I have to do something with 0x1a 0x7 0x2 0x0 to tell that I want to use GPIO PH20, but I don't know how to translate this in hexa code
gpios = <0x1a 0x7 0x2 0x0>;

Any help would be great
Thank