All of lore.kernel.org
 help / color / mirror / Atom feed
From: CF Studelec <cfoissac@studelec-sa.com>
To: linuxppc-dev@lists.ozlabs.org
Subject: MPC5121e, Linux, simple IO ports
Date: Thu, 21 Mar 2013 09:54:46 +0100	[thread overview]
Message-ID: <514ACAD6.6010909@studelec-sa.com> (raw)

Hello,

This is a simple board base on mpc5121e MCU.


Gpio is detected: kernel is compiled with its support - i got
gpiochip_find_base: found new base @224 in dmesg - on kernel 3.0.4.

 
But i'm unable to access it through /sys/class/gpio. I can successfully
export a pin (ie, if i type cat 224 > export, gpio224 is created), but i
can't successfully control it:

 

echo "out" > /sys/class/gpio/gpio224/direction

cat /sys/class/gpio/gpio224/value

0

echo 1 > /sys/class/gpio/gpio224/value

cat /sys/class/gpio/gpio224/value

0

 

My need is a simple chipselect (well, 3 chipselect exactly ), for a
custom design. Running linux is mandatory. I suspect the MPC5121e to be
in the bad function mode, so:

- does anyone knows how to change mode ? What register can i acces and
how ? does it worths a try ?

- does anyone successfully performed simple IO control ?

 

Last thing, i have tryed to access internal registers through /dev/mem,
but no success. There are very few ressources available for this
microcontroler, but i'm stick to it. Perhaps anybody knows how to access
(read) internal registers with /proc or sys-fs ?

 

Thank you for your help.

             reply	other threads:[~2013-03-21  9:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-21  8:54 CF Studelec [this message]
2013-03-21 13:44 ` MPC5121e, Linux, simple IO ports CF Studelec
2013-03-31  9:51 ` Anatolij Gustschin

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=514ACAD6.6010909@studelec-sa.com \
    --to=cfoissac@studelec-sa.com \
    --cc=linuxppc-dev@lists.ozlabs.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.