All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Alexander Shiyan" <shc_work@mail.ru>
To: "Stephen Warren" <swarren@wwwdotorg.org>
Cc: linux-serial@vger.kernel.org,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Jiri Slaby" <jslaby@suse.cz>,
	devicetree@vger.kernel.org,
	"Rob Herring" <rob.herring@calxeda.com>,
	"Pawel Moll" <pawel.moll@arm.com>,
	"Mark Rutland" <mark.rutland@arm.com>,
	"Ian Campbell" <ian.campbell@citrix.com>,
	"Grant Likely" <grant.likely@linaro.org>
Subject: Re: [PATCH 4/4] serial: sccnxp: Add DT support
Date: Thu, 01 Aug 2013 11:51:13 +0400	[thread overview]
Message-ID: <1375343473.135835596@f377.i.mail.ru> (raw)
In-Reply-To: <51F98562.9080307@wwwdotorg.org>

> On 07/31/2013 04:55 AM, Alexander Shiyan wrote:
> > Add DT support to the SCCNCP serial driver.
> 
> > diff --git a/Documentation/devicetree/bindings/tty/serial/sccnxp-serial.txt b/Documentation/devicetree/bindings/tty/serial/sccnxp-serial.txt
> 
> > +Optional properties:
> 
> > +- poll-interval: Poll interval time in nanoseconds.
> 
> Is this a standard/common property? If not, then it'd be best if the
> property name included the vendor-prefix "nxp,".

I am not sure about this, At least this property is used in gpio-keys-polled.

> > +- nxp,sccnxp-io-cfg: Array contains values for the emulated modem signals.
> > +  The number of values depends on the UART-number in the selected chip.
> > +  Each value should be composed according to the following rules:
> > +  (LINE1 << SIGNAL1) | ... | (LINEX << SIGNALX), where:
> > +   LINE - VALUE:
> > +    OP0 - 1
> ...
> > +    IP6 - 15
> > +   SIGNAL - VALUE:
> > +    DTR - 0
> ...
> > +    DIR - 24
> 
> I wonder that shouldn't be implemented using standard pinctrl bindings.
> I could see someone wanting to create a pinmuxing-based serial port
> multiplexing device, which would then need to rely on this node acting
> as a standard pin controller...

In this case pin-controller cannot be applied here.
The device has several lines of general purpose inputs and outputs, there is
no functional purpose of these lines as a modem signals. In the driver realized
only an emulation of these signals. That is, this property describes the trick.
I have no idea how to do this trick in another way.

> > +Example (Dual UART with direction control on OP0 & OP1):
> > +sc2892@10100000 {
> > +	compatible = "nxp,sc2892";
> > +	reg = <0x10100000 0x10>;
> > +	poll-interval = <10000>;
> > +	clocks = <&sc2892_clk>;
> > +	vcc-supply = <&sc2892_reg>;
> > +	nxp,sccnxp-io-cfg = <0x01000000 0x02000000>;
> 
> Why two cells for io-cfg when the shifts above imply everything fits
> into a single cell?
> 
> Oh I guess that "The number of values depends on the UART-number" means
> "number of UARTs in the chip", whereas I read it as "the ID of the UART
> within the chip"..
> 
> When there are multiple UARTs in the chip, should each UART have its own
> separate DT node? If not, how could you refer to each individual UART
> e.g. in order to set up the /aliases node?

This is my translation inaccuracies: io-cfg count should be == UART count.
Driver initializes all ports simultaneously (1 or 2). I cannot separate ports,
because IC registers mixed in one address space.

As variant, I can make the io-configuration of a single variable u64.
Or, at this stage, remove this option to add later.
Thanks.

---

  reply	other threads:[~2013-08-01  7:51 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-31 10:55 [PATCH 4/4] serial: sccnxp: Add DT support Alexander Shiyan
2013-07-31 21:45 ` Stephen Warren
2013-08-01  7:51   ` Alexander Shiyan [this message]
2013-08-01 16:31     ` Stephen Warren
2013-08-02 10:14       ` Alexander Shiyan
2013-08-01  9:54 ` Mark Rutland
2013-08-01 10:53   ` Alexander Shiyan
2013-08-01 14:14     ` Mark Rutland
2013-08-02  6:27       ` Alexander Shiyan
2013-08-02  7:29         ` Greg Kroah-Hartman

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=1375343473.135835596@f377.i.mail.ru \
    --to=shc_work@mail.ru \
    --cc=devicetree@vger.kernel.org \
    --cc=grant.likely@linaro.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=ian.campbell@citrix.com \
    --cc=jslaby@suse.cz \
    --cc=linux-serial@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=pawel.moll@arm.com \
    --cc=rob.herring@calxeda.com \
    --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 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.