susheel pandey
susheel pandey

Reputation: 3

Embedded Linux: Move Pin configuration from Kernel files to DTS file

I am working on ARM platform ,I am trying to move pin configurations in kernel files to board/SOC specific DTS|DTSI files.. can somebody in light me , how can I achieve this... or any link where ican get some help ?

Upvotes: 0

Views: 501

Answers (1)

Anton Glukhov
Anton Glukhov

Reputation: 3707

Just to clarify your answer... You have some board with pin configuration parts in its machine file? And now you want to move to device tree way to work with your board?

If so, then:

  1. Read doc from kernel tree: Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt
  2. Read doc from kernel tree: Documentation/devicetree/bindings/pinctrl/YOU_PLATFORM_OR_SOC

And finally, you can find many examples or even DTS files for your platform in the path: arch/arm/boot/dts/

Small example of pinctrl configuration:

&am33xx_pinmux {
    pinctrl-names = "default";
    pinctrl-0 = <&misc_pins>;

    misc_pins: misc_pins {
        pinctrl-single,pins = <
            0x15c (PIN_OUTPUT | MUX_MODE7)  /* spi0_cs0.gpio0_5 */
        >;
    };
};

P.S. If you specify your platform I will give you more details.

Upvotes: 4

Related Questions