From: Marc Dietrich <marvin24@gmx.de>
To: "devicetree@vger.kernel.org" <devicetree@vger.kernel.org>
Cc: linux-tegra@vger.kernel.org,
Stephen Warren <swarren@wwwdotorg.org>,
Andrey Danin <danindrey@mail.ru>
Subject: [RFC] binding for nvec mfd device
Date: Sat, 27 Jul 2013 15:23:20 +0200 [thread overview]
Message-ID: <1416005.VvfEeGuSWa@ax5200p> (raw)
Hi,
this is an RFC for an mfd device introduced here [1]. I didn't got much
response, except from Stephen, but that bothered me enough already ;-)
I'm going describe the hw again shortly, for a more complete description, see
[1]. What we have here is an EC which communicates to the host cpu (NVIDIA
Tegra) via I2C. The unusual part is that the EC is I2C master while the host
cpu is the slave. The EC has several ports to connect peripherals like
keyboard, mouse, ... and also to control some system states (suspend, low bat,
power key, ...). Ok, so much for the hardware description, now the binding. I
think I integrated all comments made by Stephen in [2].
i2c-slave@7000c500 {
compatible = "nvidia,tegra20-i2c-slave", "simple-bus";
reg = <0x7000c500 0x100>;
interrupts = <0 92 0x04>;
#address-cells = <1>;
#size-cells = <0>;
clock-frequency = <80000>;
clocks = <&tegra_car 67>, <&tegra_car 124>;
clock-names = "div-clk", "fast-clk";
nvec@87 {
compatible = "nvidia,nvec", "simple-bus";
reg = <0x87>;
request-gpios = <&gpio 170 0>; /* gpio PV2 */
keyboard {
compatible = "nvidia,nvec-keyboard";
...
<insert key mappings here>
...
};
ps2 {
compatible = "nvidia,nvec-ps2";
packet-size = 6; /* for the ac100 tp */
};
events {
compatible = "nvidia,nvec-events";
...
<add some system events here,
e.g. lid switch, power button>
...
};
charger: ac {
compatible = "nvidia,nvec-ac";
};
battery {
compatible = "nvidia,nvec-battery";
charger = <&charger>;
};
oem {
compatible = "compal,nvec-paz00";
/* ac100 specific extentions to the protocol */
};
};
};
For multi-slave capable SoCs, there can be more than one master connected to
the i2c slave controller of the host cpu. Therefore I added "simple-bus"
property here. Does "simple-bus" imply bus addresses? The EC registers with
the slave controller by supplying the protocol (e.g. smbus or i2c) and an
optional gpio.
I left out the binding description for now because the properties are pretty
much self-describing. The current driver is in staging so everything is still
in flux.
Marc
[1] http://www.mail-archive.com/devicetree-
discuss@lists.ozlabs.org/msg35636.html
[2] http://u-boot.10912.n7.nabble.com/PATCH-0-3-ARM-tegra-add-nvec-keyboard-
support-for-paz00-td159690.html
next reply other threads:[~2013-07-27 13:24 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-27 13:23 Marc Dietrich [this message]
2013-07-29 21:59 ` [RFC] binding for nvec mfd device Stephen Warren
2013-07-31 14:13 ` Mark Rutland
2013-07-31 14:57 ` Marc Dietrich
2013-07-31 15:33 ` Mark Rutland
2013-07-31 16:52 ` Marc Dietrich
2013-07-31 21:03 ` Stephen Warren
[not found] ` <51F97B92.1040707-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-09-17 7:53 ` Marc Dietrich
[not found] ` <17687182.lGWlO75r41-D3pzGp0ZKuDWZbiwp4sFPyrtisivX6KghOMvlBiLbJSELgA04lAiVw@public.gmane.org>
2013-09-17 21:48 ` Stephen Warren
[not found] ` <5238CE1C.3050107-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-09-23 14:52 ` Marc Dietrich
[not found] ` <2112732.zfJtNyCk0i-D3pzGp0ZKuDWZbiwp4sFPyrtisivX6KghOMvlBiLbJSELgA04lAiVw@public.gmane.org>
2013-09-23 16:36 ` Stephen Warren
[not found] ` <52406E1E.5040005-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-09-24 7:39 ` Andrey Danin
2013-09-24 9:33 ` Marc Dietrich
[not found] ` <1597574.dB5YEoR44o-D3pzGp0ZKuDWZbiwp4sFPyrtisivX6KghOMvlBiLbJSELgA04lAiVw@public.gmane.org>
2013-09-24 17:19 ` Stephen Warren
[not found] ` <CAMRQQz-ri99PcK5=-Rzw-fmLoyvzxbd1whUWdqASx1Pi+2GNnQ@mail.gmail.com>
[not found] ` <CAMRQQz-ri99PcK5=-Rzw-fmLoyvzxbd1whUWdqASx1Pi+2GNnQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-09-24 17:04 ` Stephen Warren
2013-09-18 17:28 ` Wolfram Sang
2013-07-31 20:57 ` Stephen Warren
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=1416005.VvfEeGuSWa@ax5200p \
--to=marvin24@gmx.de \
--cc=danindrey@mail.ru \
--cc=devicetree@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=swarren@wwwdotorg.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).