All of lore.kernel.org
 help / color / mirror / Atom feed
From: laurent.pinchart@ideasonboard.com (Laurent Pinchart)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 11/18] dt-bindings: display: Add Allwinner MIPI-DSI bindings
Date: Tue, 18 Jul 2017 13:18:42 +0300	[thread overview]
Message-ID: <4634787.BNPAe4WyE2@avalon> (raw)
In-Reply-To: <20170717184149.sv4xdspjwnhmctog@rob-hp-laptop>

On Monday 17 Jul 2017 13:41:49 Rob Herring wrote:
> On Thu, Jul 13, 2017 at 04:13:06PM +0200, Maxime Ripard wrote:
> > The Allwinner SoCs usually come with a DSI encoder. Add a binding for it.
> > 
> > Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
> > ---
> > 
> >  Documentation/devicetree/bindings/display/sunxi/sun6i-dsi.txt | 85
> >  +++++++-
> >  1 file changed, 85 insertions(+)
> >  create mode 100644
> >  Documentation/devicetree/bindings/display/sunxi/sun6i-dsi.txt> 
> > diff --git a/Documentation/devicetree/bindings/display/sunxi/sun6i-dsi.txt
> > b/Documentation/devicetree/bindings/display/sunxi/sun6i-dsi.txt new file
> > mode 100644
> > index 000000000000..2e7c5aa7020f
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/display/sunxi/sun6i-dsi.txt
> > @@ -0,0 +1,85 @@
> > +Allwinner A31 DSI Encoder
> > +=========================
> > +
> > +The DSI pipeline consists of two separate blocks: the DSI controller
> > +itself, and its associated D-PHY.
> > +
> > +DSI Encoder
> > +-----------
> > +
> > +The DSI Encoder generates the DSI signal from the TCON's.
> > +
> > +Required properties:
> > +  - compatible: value must be one of:
> > +    * allwinner,sun6i-a31-mipi-dsi
> > +  - reg: base address and size of memory-mapped region
> > +  - interrupts: interrupt associated to this IP
> > +  - clocks: phandles to the clocks feeding the DSI encoder
> > +    * bus: the DSI interface clock
> > +    * mod: the DSI module clock
> > +  - clock-names: the clock names mentioned above
> > +  - phys: phandle to the D-PHY
> > +  - phy-names: must be "dphy"
> > +  - resets: phandle to the reset controller driving the encoder
> > +
> > +  - ports: A ports node with endpoint definitions as defined in
> > +    Documentation/devicetree/bindings/media/video-interfaces.txt. The
> > +    port should be the input endpoint, usually coming from the
> > +    associated TCON.
> 
> Output port for bridge/panel?
> 
> > +
> > +D-PHY
> > +-----
> > +
> > +Required properties:
> > +  - compatible: value must be one of:
> > +    * allwinner,sun6i-a31-mipi-dphy
> > +  - reg: base address and size of memory-mapped region
> > +  - clocks: phandles to the clocks feeding the DSI encoder
> > +    * bus: the DSI interface clock
> > +    * mod: the DSI module clock
> > +  - clock-names: the clock names mentioned above
> > +  - resets: phandle to the reset controller driving the encoder
> > +
> > +Example:
> > +
> > +dsi0: dsi at 01ca0000 {
> 
> Drop the leading 0.
> 
> > +	compatible = "allwinner,sun6i-a31-mipi-dsi";
> > +	reg = <0x01ca0000 0x1000>;
> > +	interrupts = <GIC_SPI 89 IRQ_TYPE_LEVEL_HIGH>;
> > +	clocks = <&ccu CLK_BUS_MIPI_DSI>,
> > +		 <&ccu CLK_DSI_SCLK>;
> > +	clock-names = "bus", "mod";
> > +	resets = <&ccu RST_BUS_MIPI_DSI>;
> > +	phys = <&dphy0>;
> > +	phy-names = "dphy";
> > 
> > +	#address-cells = <1>;
> > +	#size-cells = <0>;
> 
> Not needed.
> 
> > +
> > +	ports {
> > +		#address-cells = <1>;
> > +		#size-cells = <0>;
> > +
> > +		dsi0_in: port at 0 {

I don't think the label for the port is needed, you should only reference the 
endpoint.

> > +			#address-cells = <1>;
> > +			#size-cells = <0>;
> > +			reg = <0>;
> > +
> > +			dsi0_in_tcon0: endpoint at 0 {
> > +				reg = <0>;
> 
> Don't need reg when there's only 1 endpoint.

And no reg for the port name either when there's a single port. This can all 
be simplified to

dsi0: dsi at 1ca0000 {
	compatible = "allwinner,sun6i-a31-mipi-dsi";
	reg = <0x01ca0000 0x1000>;
	interrupts = <GIC_SPI 89 IRQ_TYPE_LEVEL_HIGH>;
	clocks = <&ccu CLK_BUS_MIPI_DSI>,
		 <&ccu CLK_DSI_SCLK>;
	clock-names = "bus", "mod";
	resets = <&ccu RST_BUS_MIPI_DSI>;
	phys = <&dphy0>;
	phy-names = "dphy";

	port {
		dsi0_in_tcon0: endpoint {
			remote-endpoint = <&tcon0_out_dsi0>;
		};
	};
};

> > +				remote-endpoint = <&tcon0_out_dsi0>;
> > +			};
> > +		};
> > +	};
> > +};

[snip]

-- 
Regards,

Laurent Pinchart

WARNING: multiple messages have this Message-ID (diff)
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Rob Herring <robh@kernel.org>
Cc: Maxime Ripard <maxime.ripard@free-electrons.com>,
	Mark Brown <broonie@kernel.org>,
	Thierry Reding <thierry.reding@gmail.com>,
	Chen-Yu Tsai <wens@csie.org>,
	dri-devel@lists.freedesktop.org,
	Daniel Vetter <daniel.vetter@intel.com>,
	David Airlie <airlied@linux.ie>,
	Mark Rutland <mark.rutland@arm.com>,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org,
	Boris Brezillon <boris.brezillon@free-electrons.com>,
	Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Subject: Re: [PATCH 11/18] dt-bindings: display: Add Allwinner MIPI-DSI bindings
Date: Tue, 18 Jul 2017 13:18:42 +0300	[thread overview]
Message-ID: <4634787.BNPAe4WyE2@avalon> (raw)
In-Reply-To: <20170717184149.sv4xdspjwnhmctog@rob-hp-laptop>

On Monday 17 Jul 2017 13:41:49 Rob Herring wrote:
> On Thu, Jul 13, 2017 at 04:13:06PM +0200, Maxime Ripard wrote:
> > The Allwinner SoCs usually come with a DSI encoder. Add a binding for it.
> > 
> > Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
> > ---
> > 
> >  Documentation/devicetree/bindings/display/sunxi/sun6i-dsi.txt | 85
> >  +++++++-
> >  1 file changed, 85 insertions(+)
> >  create mode 100644
> >  Documentation/devicetree/bindings/display/sunxi/sun6i-dsi.txt> 
> > diff --git a/Documentation/devicetree/bindings/display/sunxi/sun6i-dsi.txt
> > b/Documentation/devicetree/bindings/display/sunxi/sun6i-dsi.txt new file
> > mode 100644
> > index 000000000000..2e7c5aa7020f
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/display/sunxi/sun6i-dsi.txt
> > @@ -0,0 +1,85 @@
> > +Allwinner A31 DSI Encoder
> > +=========================
> > +
> > +The DSI pipeline consists of two separate blocks: the DSI controller
> > +itself, and its associated D-PHY.
> > +
> > +DSI Encoder
> > +-----------
> > +
> > +The DSI Encoder generates the DSI signal from the TCON's.
> > +
> > +Required properties:
> > +  - compatible: value must be one of:
> > +    * allwinner,sun6i-a31-mipi-dsi
> > +  - reg: base address and size of memory-mapped region
> > +  - interrupts: interrupt associated to this IP
> > +  - clocks: phandles to the clocks feeding the DSI encoder
> > +    * bus: the DSI interface clock
> > +    * mod: the DSI module clock
> > +  - clock-names: the clock names mentioned above
> > +  - phys: phandle to the D-PHY
> > +  - phy-names: must be "dphy"
> > +  - resets: phandle to the reset controller driving the encoder
> > +
> > +  - ports: A ports node with endpoint definitions as defined in
> > +    Documentation/devicetree/bindings/media/video-interfaces.txt. The
> > +    port should be the input endpoint, usually coming from the
> > +    associated TCON.
> 
> Output port for bridge/panel?
> 
> > +
> > +D-PHY
> > +-----
> > +
> > +Required properties:
> > +  - compatible: value must be one of:
> > +    * allwinner,sun6i-a31-mipi-dphy
> > +  - reg: base address and size of memory-mapped region
> > +  - clocks: phandles to the clocks feeding the DSI encoder
> > +    * bus: the DSI interface clock
> > +    * mod: the DSI module clock
> > +  - clock-names: the clock names mentioned above
> > +  - resets: phandle to the reset controller driving the encoder
> > +
> > +Example:
> > +
> > +dsi0: dsi@01ca0000 {
> 
> Drop the leading 0.
> 
> > +	compatible = "allwinner,sun6i-a31-mipi-dsi";
> > +	reg = <0x01ca0000 0x1000>;
> > +	interrupts = <GIC_SPI 89 IRQ_TYPE_LEVEL_HIGH>;
> > +	clocks = <&ccu CLK_BUS_MIPI_DSI>,
> > +		 <&ccu CLK_DSI_SCLK>;
> > +	clock-names = "bus", "mod";
> > +	resets = <&ccu RST_BUS_MIPI_DSI>;
> > +	phys = <&dphy0>;
> > +	phy-names = "dphy";
> > 
> > +	#address-cells = <1>;
> > +	#size-cells = <0>;
> 
> Not needed.
> 
> > +
> > +	ports {
> > +		#address-cells = <1>;
> > +		#size-cells = <0>;
> > +
> > +		dsi0_in: port@0 {

I don't think the label for the port is needed, you should only reference the 
endpoint.

> > +			#address-cells = <1>;
> > +			#size-cells = <0>;
> > +			reg = <0>;
> > +
> > +			dsi0_in_tcon0: endpoint@0 {
> > +				reg = <0>;
> 
> Don't need reg when there's only 1 endpoint.

And no reg for the port name either when there's a single port. This can all 
be simplified to

dsi0: dsi@1ca0000 {
	compatible = "allwinner,sun6i-a31-mipi-dsi";
	reg = <0x01ca0000 0x1000>;
	interrupts = <GIC_SPI 89 IRQ_TYPE_LEVEL_HIGH>;
	clocks = <&ccu CLK_BUS_MIPI_DSI>,
		 <&ccu CLK_DSI_SCLK>;
	clock-names = "bus", "mod";
	resets = <&ccu RST_BUS_MIPI_DSI>;
	phys = <&dphy0>;
	phy-names = "dphy";

	port {
		dsi0_in_tcon0: endpoint {
			remote-endpoint = <&tcon0_out_dsi0>;
		};
	};
};

> > +				remote-endpoint = <&tcon0_out_dsi0>;
> > +			};
> > +		};
> > +	};
> > +};

[snip]

-- 
Regards,

Laurent Pinchart

  reply	other threads:[~2017-07-18 10:18 UTC|newest]

Thread overview: 148+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-13 14:12 [PATCH 00/18] drm/sun4i: Allwinner MIPI-DSI support Maxime Ripard
2017-07-13 14:12 ` Maxime Ripard
2017-07-13 14:12 ` Maxime Ripard
2017-07-13 14:12 ` [PATCH 01/18] regmap: mmio: Add function to attach a clock Maxime Ripard
2017-07-13 14:12   ` Maxime Ripard
2017-07-13 14:12   ` Maxime Ripard
2017-07-13 16:01   ` Mark Brown
2017-07-13 16:01     ` Mark Brown
2017-07-13 16:01     ` Mark Brown
2017-07-17  9:01     ` Maxime Ripard
2017-07-17  9:01       ` Maxime Ripard
2017-07-17  9:01       ` Maxime Ripard
2017-07-18 13:21       ` Mark Brown
2017-07-18 13:21         ` Mark Brown
2017-07-18 13:21         ` Mark Brown
2017-07-20 14:44         ` Maxime Ripard
2017-07-20 14:44           ` Maxime Ripard
2017-07-20 14:44           ` Maxime Ripard
2017-07-13 14:12 ` [PATCH 02/18] drm/sun4i: Add if statement instead of depends on Maxime Ripard
2017-07-13 14:12   ` Maxime Ripard
2017-07-13 14:12   ` Maxime Ripard
2017-07-14  3:09   ` Chen-Yu Tsai
2017-07-14  3:09     ` Chen-Yu Tsai
2017-07-17  8:45     ` Maxime Ripard
2017-07-17  8:45       ` Maxime Ripard
2017-07-17  8:45       ` Maxime Ripard
2017-07-13 14:12 ` [PATCH 03/18] drm/sun4i: Realign Makefile padding and reorder it Maxime Ripard
2017-07-13 14:12   ` Maxime Ripard
2017-07-13 14:12   ` Maxime Ripard
2017-07-14  3:13   ` Chen-Yu Tsai
2017-07-14  3:13     ` Chen-Yu Tsai
2017-07-14  3:13     ` Chen-Yu Tsai
2017-07-20 13:08     ` Maxime Ripard
2017-07-20 13:08       ` Maxime Ripard
2017-07-20 13:08       ` Maxime Ripard
2017-07-13 14:12 ` [PATCH 04/18] drm/sun4i: Remove useless atomic_check Maxime Ripard
2017-07-13 14:12   ` Maxime Ripard
2017-07-13 14:12   ` Maxime Ripard
2017-07-14  3:15   ` Chen-Yu Tsai
2017-07-14  3:15     ` Chen-Yu Tsai
2017-07-17  8:47     ` Maxime Ripard
2017-07-17  8:47       ` Maxime Ripard
2017-07-17  8:47       ` Maxime Ripard
2017-07-13 14:13 ` [PATCH 05/18] drm/sun4i: tcon: remove unused function Maxime Ripard
2017-07-13 14:13   ` Maxime Ripard
2017-07-13 14:13   ` Maxime Ripard
2017-07-14  3:16   ` Chen-Yu Tsai
2017-07-14  3:16     ` Chen-Yu Tsai
2017-07-14  3:16     ` Chen-Yu Tsai
2017-07-13 14:13 ` [PATCH 06/18] drm/sun4i: tcon: Don't rely on encoders to enable the TCON Maxime Ripard
2017-07-13 14:13   ` Maxime Ripard
2017-07-13 14:13   ` Maxime Ripard
2017-07-14  3:40   ` Chen-Yu Tsai
2017-07-14  3:40     ` Chen-Yu Tsai
2017-07-14  3:40     ` Chen-Yu Tsai
2017-07-20 13:20     ` Maxime Ripard
2017-07-20 13:20       ` Maxime Ripard
2017-07-20 13:20       ` Maxime Ripard
2017-07-13 14:13 ` [PATCH 07/18] drm/sun4i: tcon: Don't rely on encoders to set the TCON mode Maxime Ripard
2017-07-13 14:13   ` Maxime Ripard
2017-07-13 14:13   ` Maxime Ripard
2017-07-14  3:56   ` Chen-Yu Tsai
2017-07-14  3:56     ` Chen-Yu Tsai
2017-07-14  3:56     ` Chen-Yu Tsai
2017-07-20 13:34     ` Maxime Ripard
2017-07-20 13:34       ` Maxime Ripard
2017-07-20 13:34       ` Maxime Ripard
2017-07-13 14:13 ` [PATCH 08/18] drm/sun4i: tcon: Add TRI finish interrupt for vblank Maxime Ripard
2017-07-13 14:13   ` Maxime Ripard
2017-07-13 14:13   ` Maxime Ripard
2017-07-14  3:57   ` Chen-Yu Tsai
2017-07-14  3:57     ` Chen-Yu Tsai
2017-07-13 14:13 ` [PATCH 09/18] drm/sun4i: tcon: Adjust dotclock dividers range Maxime Ripard
2017-07-13 14:13   ` Maxime Ripard
2017-07-13 14:13   ` Maxime Ripard
2017-07-14  4:14   ` Chen-Yu Tsai
2017-07-14  4:14     ` Chen-Yu Tsai
2017-07-14  4:14     ` Chen-Yu Tsai
2017-07-20 14:55     ` Maxime Ripard
2017-07-20 14:55       ` Maxime Ripard
2017-07-20 14:55       ` Maxime Ripard
2017-07-20 15:16       ` Chen-Yu Tsai
2017-07-20 15:16         ` Chen-Yu Tsai
2017-07-20 15:16         ` Chen-Yu Tsai
2017-07-13 14:13 ` [PATCH 10/18] drm/sun4i: tcon: Move out the tcon0 common setup Maxime Ripard
2017-07-13 14:13   ` Maxime Ripard
2017-07-13 14:13   ` Maxime Ripard
2017-07-14  9:50   ` kbuild test robot
2017-07-14  9:50     ` kbuild test robot
2017-07-14  9:50     ` kbuild test robot
2017-07-18  3:41   ` Chen-Yu Tsai
2017-07-18  3:41     ` Chen-Yu Tsai
2017-07-20 13:55     ` Maxime Ripard
2017-07-20 13:55       ` Maxime Ripard
2017-07-20 13:55       ` Maxime Ripard
2017-07-13 14:13 ` [PATCH 11/18] dt-bindings: display: Add Allwinner MIPI-DSI bindings Maxime Ripard
2017-07-13 14:13   ` Maxime Ripard
2017-07-13 14:13   ` Maxime Ripard
2017-07-17 18:41   ` Rob Herring
2017-07-17 18:41     ` Rob Herring
2017-07-17 18:41     ` Rob Herring
2017-07-18 10:18     ` Laurent Pinchart [this message]
2017-07-18 10:18       ` Laurent Pinchart
2017-07-20 14:21       ` Maxime Ripard
2017-07-20 14:21         ` Maxime Ripard
2017-07-20 14:21         ` Maxime Ripard
2017-07-20 14:19     ` Maxime Ripard
2017-07-20 14:19       ` Maxime Ripard
2017-07-20 14:19       ` Maxime Ripard
2017-07-13 14:13 ` [PATCH 12/18] drm/sun4i: Add Allwinner A31 MIPI-DSI controller support Maxime Ripard
2017-07-13 14:13   ` Maxime Ripard
2017-07-13 14:13   ` Maxime Ripard
2017-07-14 10:15   ` kbuild test robot
2017-07-14 10:15     ` kbuild test robot
2017-07-14 10:15     ` kbuild test robot
2017-07-13 14:13 ` [PATCH 13/18] dt-bindings: vendor: Add Huarui Lighting Maxime Ripard
2017-07-13 14:13   ` Maxime Ripard
2017-07-13 14:13   ` Maxime Ripard
2017-07-14  7:53   ` Chen-Yu Tsai
2017-07-14  7:53     ` Chen-Yu Tsai
2017-07-20 13:37     ` Maxime Ripard
2017-07-20 13:37       ` Maxime Ripard
2017-07-13 14:13 ` [PATCH 14/18] dt-bindings: panel: Add Huarui LHR050H41 panel documentation Maxime Ripard
2017-07-13 14:13   ` Maxime Ripard
2017-07-13 14:13   ` Maxime Ripard
2017-07-17 18:44   ` Rob Herring
2017-07-17 18:44     ` Rob Herring
2017-07-17 18:44     ` Rob Herring
2017-07-13 14:13 ` [PATCH 15/18] drm/panel: Add Huarui LHR050H41 panel driver Maxime Ripard
2017-07-13 14:13   ` Maxime Ripard
2017-07-13 14:13   ` Maxime Ripard
2017-07-14  9:22   ` Andrzej Hajda
2017-07-14  9:22     ` Andrzej Hajda
2017-07-14  9:22     ` Andrzej Hajda
2017-07-13 14:13 ` [PATCH 16/18] arm: dts: sun8i: a33: Add the DSI-related nodes Maxime Ripard
2017-07-13 14:13   ` Maxime Ripard
2017-07-13 14:13   ` Maxime Ripard
2017-07-13 14:13 ` [PATCH 17/18] arm: dts: sun8i: Add BananaPI M2-Magic DTS Maxime Ripard
2017-07-13 14:13   ` Maxime Ripard
2017-07-13 14:13   ` Maxime Ripard
2017-07-14  4:40   ` Chen-Yu Tsai
2017-07-14  4:40     ` Chen-Yu Tsai
2017-07-14  4:40     ` Chen-Yu Tsai
2017-07-17  9:03     ` Maxime Ripard
2017-07-17  9:03       ` Maxime Ripard
2017-07-17  9:03       ` Maxime Ripard
2017-07-13 14:13 ` [PATCH 18/18] [DO NOT MERGE] arm: dts: sun8i: bpi-m2m: Add DSI display Maxime Ripard
2017-07-13 14:13   ` Maxime Ripard

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=4634787.BNPAe4WyE2@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=linux-arm-kernel@lists.infradead.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.