All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: Peter Ujfalusi <peter.ujfalusi@ti.com>
Cc: linux-omap <linux-omap@vger.kernel.org>,
	"Cousson, Benoit" <b-cousson@ti.com>,
	"devicetree-discuss@lists.ozlabs.org"
	<devicetree-discuss@lists.ozlabs.org>,
	Grant Likely <grant.likely@secretlab.ca>
Subject: Re: OMAP: Configuring CONTROL_DEVCONF0 register via DT with pinctrl
Date: Tue, 7 Aug 2012 04:10:42 -0700	[thread overview]
Message-ID: <20120807111041.GY11011@atomide.com> (raw)
In-Reply-To: <501262B5.1080004@ti.com>

* Peter Ujfalusi <peter.ujfalusi@ti.com> [120727 02:47]:
> Hello,
> 
> I need to find a solution to control 2 bits in CONTROL_DEVCONF0 on OMAP2/3 for
> McBSP1 CLKR/FSR signal routing.
> In boards using McBSP1 we might need to change bit 3 and 4 based on the audio
> setup (how the board has been wired).
> 
> So far I have come up with the following idea to handle to but not really sure
> if it is the correct way (I have taken the idea from the arm/dts: Add AM33XX
> basic pinctrl support series).

You need to also consider that CONTROL_DEVCONF0 has the MMC/SDIO module input
clock selection. So pinctrl-single binding would have to be expanded to also
support one-bit-per-mux type registers in addition to one-register-per-mux
registers. And then this could also be used for the MMC/SDIO module input clock.

> In .dtsi file of the SoC:
> 
> control_devconf0: pinmux@48002274 {
> 	compatible = "pinctrl-single";
> 	reg = <0x48002274 4>;	/* Single register */
> 	#address-cells = <1>;
> 	#size-cells = <0>;
> 	pinctrl-single,register-width = <32>;
> 	pinctrl-single,function-mask = <0x5F>;
> };

The pinctrl-single,function-mask is for all the registers in the range,
we also need something to specify the device specific mux bits.

> In the .dts file of the board which needs to change the CLKR/FSR configuration:
> 
> &control_devconf0 {
> 	pinctrl-names = "default";
> 	pinctrl-0 = <&mcbsp1_pins>;
> 
> 	mcbsp1_pins: pinmux_mcbsp1_pins {
> 		pinctrl-single,pins = <0x00 0x18>; /* CLKR/FSR from CLKX/FSX
> 						    * pin */
> 	};
> 
> };

I think adding support for one-bit-per-mux would require adding something
like this for the binding:

 	mcbsp1_pins: pinmux_mcbsp1_pins {
		/*                   offset bits mask */
 		pinctrl-single,bits = <0x00 0x18 0x18>;
	};

As otherwise you would not know which bits to clear for alternative
named modes. Or got any better ideas?

Regards,

Tony

  reply	other threads:[~2012-08-07 11:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-27  9:43 OMAP: Configuring CONTROL_DEVCONF0 register via DT with pinctrl Peter Ujfalusi
2012-08-07 11:10 ` Tony Lindgren [this message]
2012-08-08 11:53   ` Peter Ujfalusi
2012-08-09  6:36     ` Tony Lindgren

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=20120807111041.GY11011@atomide.com \
    --to=tony@atomide.com \
    --cc=b-cousson@ti.com \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=grant.likely@secretlab.ca \
    --cc=linux-omap@vger.kernel.org \
    --cc=peter.ujfalusi@ti.com \
    /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.