dts: describe GPIO

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

dts: describe GPIO

1,697 次查看
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/

标签 (2)
标记 (2)
0 项奖励
回复
2 回复数

1,423 次查看
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 项奖励
回复

1,423 次查看
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 项奖励
回复