dts: describe GPIO

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

dts: describe GPIO

663 Views
BrilliantovKiri
Senior Contributor I

Hello!

I work with iMX287 and linux-3.18.7, now I write dts file for my board and I have to configure GPIO.

pinctrl@80018000 {

    gpio0_0: gpio0_0@0 {

        reg = <0>;

        fsl,pinmux-ids = <MX28_PAD_GPMI_D00__GPMI_D0>;

     };

    gpio0_1: gpio0_1@0 {

        reg = <0>;

        fsl,pinmux-ids = <MX28_PAD_GPMI_D01__GPMI_D1 >;

    };

};

But I don't know how should I describe fsl,drive-strength, fsl,voltage and fsl,pull-up if:

- GPIO0_0 is input and hight in normal

- GPIO0_1 is output

Can you help me?

Thank you and excuse my bad english/

Labels (2)
Tags (2)
0 Kudos
2 Replies

389 Views
lategoodbye
Senior Contributor I

Hi Kirill,

pinmux ids in your devicetree source are wrong if you want to use them as GPIO.

You will need to use MX28_PAD_GPMI_D00__GPIO_0_0 and MX28_PAD_GPMI_D01__GPIO_0_1 instead.

Please look at MX28 reference manual for more details about pincontrol.

0 Kudos

389 Views
igorpadykov
NXP Employee
NXP Employee

Hi Kirill

one can look at p.39 below tutorial

http://events.linuxfoundation.org/sites/events/files/slides/petazzoni-device-tree-dummies.pdf

Best regards

igor

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

0 Kudos