All of lore.kernel.org
 help / color / mirror / Atom feed
From: snijsure@grid-net.com (Subodh Nijsure)
To: linux-arm-kernel@lists.infradead.org
Subject: Can one  set GPIO direction in pinmux definition?
Date: Wed, 22 Aug 2012 08:37:22 -0700	[thread overview]
Message-ID: <5034FCB2.5040709@grid-net.com> (raw)


For a MX28 based hardware I am working with I need to use AUART4

I need to configure this AUART4 as uart only when necessary and at all 
other times pins associated with AUART4 need to be configured as inputs.

I am using following DT definitions to setup AUART4 mux  but can't 
figure out how to setup pin direction via DT, can it be done or I need 
to do it in C code?

         apb at 80000000 {
                 apbh at 80000000 {
                                 auart4_pins_a: auart4 at 0 {
                                         reg = <0>;
                                         fsl,pinmux-ids = <
                                                 0x3142 /* 
MX28_PAD_SAIF0_MCLK__AUART4_CTS */
                                                 0x3152 /* 
MX28_PAD_SAIF0_LRCLK__AUART4_RTS */
                                                 0x3162 /* 
MX28_PAD_SAIF0_BITCLK__AUART4_RX */
                                                 0x3172 /* 
MX28_PAD_SAIF0_SDATA0__AUART4_TX */
                                         >;
                                         fsl,drive-strength = <0>;
                                         fsl,voltage = <1>;
                                         fsl,pull-up = <0>;
                                 };
                                 auart4_highz_pins: auart4-gpio at 0 {
                                         reg = <0>;
                                         fsl,pinmux-ids = <
                                                 0x3143 /* 
MX28_PAD_SAIF0_MCLK__GPIO_3_20 */
                                                 0x3153 /* 
MX28_PAD_SAIF0_LRCLK__GPIO_3_21 */
                                                 0x3163 /* 
MX28_PAD_SAIF0_BITCLK__GPIO_3_22 */
                                                 0x3173 /* 
MX28_PAD_SAIF0_SDATA0__GPIO_3_23 */
                                         >;
                                         fsl,drive-strength = <0>;
                                         fsl,voltage = <1>;
                                         fsl,pull-up = <0>;
                                 };
                  };
           };

                 apbx at 80040000 {
                         auart4: serial at 80072000 {
                                 pinctrl-names = "default", "auart";
                                 pinctrl-0 = <&auart4_highz_pins>;
                                 pinctrl-1 = <&auart4_pins_a>;
                                 status = "okay";
                         };
                };

WARNING: multiple messages have this Message-ID (diff)
From: Subodh Nijsure <snijsure@grid-net.com>
To: linux-arm-kernel@lists.infradead.org
Cc: devicetree-discuss@lists.ozlabs.org
Subject: Can one  set GPIO direction in pinmux definition?
Date: Wed, 22 Aug 2012 08:37:22 -0700	[thread overview]
Message-ID: <5034FCB2.5040709@grid-net.com> (raw)


For a MX28 based hardware I am working with I need to use AUART4

I need to configure this AUART4 as uart only when necessary and at all 
other times pins associated with AUART4 need to be configured as inputs.

I am using following DT definitions to setup AUART4 mux  but can't 
figure out how to setup pin direction via DT, can it be done or I need 
to do it in C code?

         apb@80000000 {
                 apbh@80000000 {
                                 auart4_pins_a: auart4@0 {
                                         reg = <0>;
                                         fsl,pinmux-ids = <
                                                 0x3142 /* 
MX28_PAD_SAIF0_MCLK__AUART4_CTS */
                                                 0x3152 /* 
MX28_PAD_SAIF0_LRCLK__AUART4_RTS */
                                                 0x3162 /* 
MX28_PAD_SAIF0_BITCLK__AUART4_RX */
                                                 0x3172 /* 
MX28_PAD_SAIF0_SDATA0__AUART4_TX */
                                         >;
                                         fsl,drive-strength = <0>;
                                         fsl,voltage = <1>;
                                         fsl,pull-up = <0>;
                                 };
                                 auart4_highz_pins: auart4-gpio@0 {
                                         reg = <0>;
                                         fsl,pinmux-ids = <
                                                 0x3143 /* 
MX28_PAD_SAIF0_MCLK__GPIO_3_20 */
                                                 0x3153 /* 
MX28_PAD_SAIF0_LRCLK__GPIO_3_21 */
                                                 0x3163 /* 
MX28_PAD_SAIF0_BITCLK__GPIO_3_22 */
                                                 0x3173 /* 
MX28_PAD_SAIF0_SDATA0__GPIO_3_23 */
                                         >;
                                         fsl,drive-strength = <0>;
                                         fsl,voltage = <1>;
                                         fsl,pull-up = <0>;
                                 };
                  };
           };

                 apbx@80040000 {
                         auart4: serial@80072000 {
                                 pinctrl-names = "default", "auart";
                                 pinctrl-0 = <&auart4_highz_pins>;
                                 pinctrl-1 = <&auart4_pins_a>;
                                 status = "okay";
                         };
                };

             reply	other threads:[~2012-08-22 15:37 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-22 15:37 Subodh Nijsure [this message]
2012-08-22 15:37 ` Can one set GPIO direction in pinmux definition? Subodh Nijsure
2012-08-22 19:52 ` Stephen Warren
2012-08-22 19:52   ` Stephen Warren
2012-08-22 22:10   ` Subodh Nijsure
2012-08-22 22:10     ` Subodh Nijsure
2012-08-22 23:18     ` Stephen Warren
2012-08-22 23:18       ` Stephen Warren
2012-08-23  1:32     ` Shawn Guo
2012-08-23  1:32       ` Shawn Guo
2012-08-23  0:17 ` Matt Sealey
2012-08-23  0:17   ` Matt Sealey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5034FCB2.5040709@grid-net.com \
    --to=snijsure@grid-net.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.