All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Jon Hunter <jonathanh@nvidia.com>
Cc: Thierry Reding <thierry.reding@gmail.com>,
	David Airlie <airlied@linux.ie>,
	Stephen Warren <swarren@wwwdotorg.org>,
	Alexandre Courbot <gnurou@gmail.com>,
	Wolfram Sang <wsa@the-dreams.de>,
	Linus Walleij <linus.walleij@linaro.org>,
	Mark Rutland <mark.rutland@arm.com>,
	dri-devel@lists.freedesktop.org, linux-tegra@vger.kernel.org,
	linux-i2c@vger.kernel.org, linux-gpio@vger.kernel.org,
	devicetree@vger.kernel.org
Subject: Re: [PATCH 09/12] dt-bindings: Add bindings for Tegra DPAUX pinctrl driver
Date: Fri, 24 Jun 2016 14:27:15 -0500	[thread overview]
Message-ID: <20160624192715.GA29382@rob-hp-laptop> (raw)
In-Reply-To: <1466697545-11868-10-git-send-email-jonathanh@nvidia.com>

On Thu, Jun 23, 2016 at 04:59:02PM +0100, Jon Hunter wrote:
> On Tegra124, Tegra132 and Tegra210 devices the pads used by the Display
> Port Auxiliary (DPAUX) channel are multiplexed such that they can also
> be used by one of the internal I2C controllers. Note that this is
> different from I2C-over-AUX supported by the DPAUX controller. The
> register that configures these pads is part of the DPAUX controllers
> register set and so a pinctrl driver is being added for the DPAUX device
> to share these pads. Add the device-tree binding documentation for the
> DPAUX pad controller.
> 
> Although there is only one group of pads associated with the DPAUX that
> can be multiplexed, the group still needs to be described by the binding.
> If the 'groups' property is not present in the binding, then the pads
> will not be allocated by the pinctrl core for a client and this would
> allow another client to re-configure the same pads that may already be
> in-use.
> 
> Please note that although the "off" function for the DPAUX pads is not
> technically a pin-mux setting but more of a pin-conf setting it is
> simpler to expose these as a function so that the user can simply select
> either "aux", "i2c" or "off" as the current function/mode.
> 
> Update the main DPAUX binding documentation to reference the DPAUX pad
> controller binding document and add the 'i2c-bus' subnode. The 'i2c-bus'
> subnode is used for populating I2C slaves for the DPAUX device so that
> the I2C driver core does not attempt to add the DPAUX pad controller
> nodes as I2C slaves.
> 
> Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
> ---
>  .../display/tegra/nvidia,tegra20-host1x.txt        |  6 +++
>  .../pinctrl/nvidia,tegra124-dpaux-padctl.txt       | 60 ++++++++++++++++++++++
>  2 files changed, 66 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/pinctrl/nvidia,tegra124-dpaux-padctl.txt
> 
> diff --git a/Documentation/devicetree/bindings/display/tegra/nvidia,tegra20-host1x.txt b/Documentation/devicetree/bindings/display/tegra/nvidia,tegra20-host1x.txt
> index 275f45680892..d0f1dc62550a 100644
> --- a/Documentation/devicetree/bindings/display/tegra/nvidia,tegra20-host1x.txt
> +++ b/Documentation/devicetree/bindings/display/tegra/nvidia,tegra20-host1x.txt
> @@ -241,6 +241,12 @@ of the following host1x client modules:
>    - reset-names: Must include the following entries:
>      - dpaux
>    - vdd-supply: phandle of a supply that powers the DisplayPort link
> +  - i2c-bus: Subnode where I2C slave devices are listed. This subnode
> +    must be always present. If there are no I2C slave devices, an empty
> +    node should be added. See ../../i2c/i2c.txt for more information.
> +
> +  See ../pinctrl/nvidia,tegra124-dpaux-padctl.txt for information
> +  regarding the DPAUX pad controller bindings.
>  
>  Example:
>  
> diff --git a/Documentation/devicetree/bindings/pinctrl/nvidia,tegra124-dpaux-padctl.txt b/Documentation/devicetree/bindings/pinctrl/nvidia,tegra124-dpaux-padctl.txt
> new file mode 100644
> index 000000000000..656e0a04be8f
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/pinctrl/nvidia,tegra124-dpaux-padctl.txt
> @@ -0,0 +1,60 @@
> +Device tree binding for NVIDIA Tegra DPAUX pad controller
> +========================================================
> +
> +The Tegra Display Port Auxiliary (DPAUX) pad controller manages two pins
> +which can be assigned to either the DPAUX channel or to an I2C
> +controller.
> +
> +This document defines the device-specific binding for the DPAUX pad
> +controller. Refer to pinctrl-bindings.txt in this directory for generic
> +information about pin controller device tree bindings. Please refer to
> +the binding document ../display/tegra/nvidia,tegra20-host1x.txt for more
> +details on the DPAUX binding.
> +
> +Pin muxing:
> +-----------
> +
> +Child nodes contain the pinmux configurations following the conventions
> +from the pinctrl-bindings.txt document.
> +
> +Since only three configurations are possible, only three child nodes are
> +needed to describe the pin mux'ing options for the DPAUX pads.
> +Furthermore, given that the pad functions are only applicable to a
> +single set of pads, the child nodes only need to describe the pad group
> +the functions are being applied to rather than the individual pads.
> +
> +Required properties:
> +- groups: Must be "dpaux-io"
> +- function: Must be either "aux", "i2c" or "off".
> +
> +Example:
> +--------
> +
> +	dpaux@545c0000 {
> +		...
> +
> +		state_dpaux_aux: pinmux_aux {

Use '-' for node names. With that:

Acked-by: Rob Herring <robh@kernel.org>

> +			groups = "dpaux-io";
> +			function = "aux";
> +		};
> +
> +		state_dpaux_i2c: pinmux_i2c {
> +			groups = "dpaux-io";
> +			function = "i2c";
> +		};
> +
> +		state_dpaux_off: pinmux_off {
> +			groups = "dpaux-io";
> +			function = "off";
> +		};
> +	};
> +
> +	...
> +
> +	i2c@7000d100 {
> +		...
> +		pinctrl-0 = <&state_dpaux_i2c>;
> +		pinctrl-1 = <&state_dpaux_off>;
> +		pinctrl-names = "default", "idle";
> +		status = "disabled";
> +	};
> -- 
> 2.1.4
> 

  reply	other threads:[~2016-06-24 19:27 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-23 15:58 [PATCH 00/12] Add support for Tegra DPAUX pinctrl Jon Hunter
2016-06-23 15:58 ` [PATCH 01/12] soc/tegra: pmc: Initialise resets associated with a power partition Jon Hunter
2016-06-23 15:58 ` [PATCH 02/12] drm/tegra: Clean-up if probing DPAUX fails Jon Hunter
2016-06-23 15:58 ` [PATCH 04/12] dt-bindings: display: Update Tegra DPAUX documentation Jon Hunter
2016-06-24 19:22   ` Rob Herring
2016-06-23 15:58 ` [PATCH 05/12] drm/tegra: Prepare DPAUX for supporting generic PM domains Jon Hunter
     [not found] ` <1466697545-11868-1-git-send-email-jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-06-23 15:58   ` [PATCH 03/12] drm/tegra: Add helper functions for setting up DPAUX pads Jon Hunter
2016-06-23 15:58   ` [PATCH 06/12] pinctrl: pinconf: Add generic helper function for freeing mappings Jon Hunter
2016-06-23 15:59   ` [PATCH 09/12] dt-bindings: Add bindings for Tegra DPAUX pinctrl driver Jon Hunter
2016-06-24 19:27     ` Rob Herring [this message]
2016-06-23 15:59   ` [PATCH 12/12] arm64: tegra: Add DPAUX pinctrl bindings Jon Hunter
2016-06-23 15:59 ` [PATCH 07/12] dt-bindings: i2c: Add support for 'i2c-bus' subnode Jon Hunter
2016-06-24 19:23   ` Rob Herring
2016-06-27 12:04   ` Peter Rosin
2016-06-28  8:21     ` Jon Hunter
2016-06-28 10:20       ` Peter Rosin
     [not found]   ` <1466697545-11868-8-git-send-email-jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-06-28 21:32     ` Wolfram Sang
2016-06-29  8:05       ` Jon Hunter
2016-06-23 15:59 ` [PATCH 08/12] i2c: core: " Jon Hunter
     [not found]   ` <1466697545-11868-9-git-send-email-jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-06-28 21:10     ` Thierry Reding
     [not found]       ` <20160628210952.GA1760-+E7KM1FDEuO2P7RxrfNFTMXXUOn6P5/W@public.gmane.org>
2016-06-28 21:33         ` Wolfram Sang
2016-08-02  6:26   ` Tomeu Vizoso
     [not found]     ` <CAAObsKDGVz0XCxeqt+W31RZ-KEvqPnQaH0dkTUj2zL9oFZrPBw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-08-02  6:49       ` Jon Hunter
2016-08-04  6:25         ` Tomeu Vizoso
2016-06-23 15:59 ` [PATCH 10/12] drm/tegra: Add pinctrl support for DPAUX Jon Hunter
2016-06-23 15:59 ` [PATCH 11/12] arm64: tegra: Add SOR power-domain node Jon Hunter

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=20160624192715.GA29382@rob-hp-laptop \
    --to=robh@kernel.org \
    --cc=airlied@linux.ie \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gnurou@gmail.com \
    --cc=jonathanh@nvidia.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=swarren@wwwdotorg.org \
    --cc=thierry.reding@gmail.com \
    --cc=wsa@the-dreams.de \
    /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.