From: Boris Brezillon <boris.brezillon@bootlin.com>
To: Sam Ravnborg <sam@ravnborg.org>
Cc: Mark Rutland <mark.rutland@arm.com>,
devicetree@vger.kernel.org,
Alexandre Belloni <alexandre.belloni@bootlin.com>,
linux-pwm@vger.kernel.org,
Boris Brezillon <boris.brezillon@free-electrons.com>,
Nicolas Ferre <nicolas.ferre@microchip.com>,
dri-devel@lists.freedesktop.org, Rob Herring <robh+dt@kernel.org>,
Lee Jones <lee.jones@linaro.org>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v1 2/7] dt-binding: add bindings for Atmel LCDC mfd
Date: Fri, 24 Aug 2018 10:45:17 +0200 [thread overview]
Message-ID: <20180824104517.29f24f44@bbrezillon> (raw)
In-Reply-To: <20180812184629.3808-2-sam@ravnborg.org>
On Sun, 12 Aug 2018 20:46:24 +0200
Sam Ravnborg <sam@ravnborg.org> wrote:
> The LCDC IP used by some Atmel SOC's have a
> multifunction device that include two sub-devices:
> - pwm
> - display controller
>
> This binding describe the multi function device
> that act as root for the sub-devices
>
> The Atmel SOC's are at91sam9 etc.
>
> The compatible name is intentionally
> prefixed with -mfd to avoid clash with existing
> compatible entries.
>
> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
> Cc: Lee Jones <lee.jones@linaro.org>
> Cc: Boris Brezillon <boris.brezillon@free-electrons.com>
> ---
> .../devicetree/bindings/mfd/atmel-lcdc.txt | 75 ++++++++++++++++++++++
> 1 file changed, 75 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/mfd/atmel-lcdc.txt
>
> diff --git a/Documentation/devicetree/bindings/mfd/atmel-lcdc.txt b/Documentation/devicetree/bindings/mfd/atmel-lcdc.txt
> new file mode 100644
> index 000000000000..70e9b7bda6c7
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/mfd/atmel-lcdc.txt
> @@ -0,0 +1,75 @@
> +Device-Tree bindings for Atmel's LCDC (LCD Controller) MFD driver
> +
> +Required properties:
> + - compatible: value should be one of the following:
> + "atmel,at91sam9261-lcdc-mfd"
> + "atmel,at91sam9263-lcdc-mfd"
> + "atmel,at91sam9g10-lcdc-mfd"
> + "atmel,at91sam9g45-lcdc-mfd"
> + "atmel,at91sam9g46-lcdc-mfd"
> + "atmel,at91sam9m10-lcdc-mfd"
> + "atmel,at91sam9m11-lcdc-mfd"
> + "atmel,at91sam9rl-lcdc-mfd"
I'm pretty sure we don't want the -mfd suffix in the compatible. I know
it's here to avoid clashes with the old binding, so maybe we can find
name.
> + - reg: base address and size of the LCDC device registers.
> + - clock-names: the name of the 2 clocks requested by the LCDC device.
> + Should contain "lcdc_clk", and "hclk".
> + - clocks: should contain the 2 clocks requested by the LCDC device.
> + May specify the same clock twice is there is no need to enable
> + "hclk" to use the display.
> + - interrupts: should contain the description of the LCDC interrupt line
> +
> +The LCDC IP exposes two subdevices:
> + - a PWM chip: see ../pwm/atmel-lcdc-pwm.txt
> + - a Display Controller: see ../display/atmel/lcdc-display-controller.txt
> +
> +Example:
> + lcdc0: lcdc@700000 {
> + compatible = "atmel,at91sam9263-lcdc-mfd";
> + reg = <0x700000 0x1000>;
> + interrupts = <26 IRQ_TYPE_LEVEL_HIGH 3>;
> + clocks = <&lcd_clk>, <&lcd_clk>;
> + clock-names = "lcdc_clk", "hclk";
> +
> + lcdc-display-controller {
> + compatible = "atmel,lcdc-display-controller";
> + lcd-supply = <&lcdc_reg>;
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + port@0 {
> + reg = <0>;
> + #address-cells = <1>;
> + #size-cells = <0>;
> + lcdc_panel_output: endpoint@0 {
> + reg = <0>;
> + remote-endpoint = <&panel_input>;
> + };
> + };
> + };
> +
> + lcdc_pwm: lcdc-pwm {
> + compatible = "atmel,lcdc-pwm";
> + pinctrl-names = "default";
> + pinctrl-0 = <&pinctrl_lcdc_pwm>;
> + #pwm-cells = <3>;
> + };
> +
> + };
Also, I don't remember why I decided to declare distinct nodes for the
PWM and display controller, but you should probably try to only declare
the lcdc node. Something like that:
lcdc0: lcdc@700000 {
compatible = "atmel,at91sam9263-lcdc";
reg = <0x700000 0x1000>;
interrupts = <26 IRQ_TYPE_LEVEL_HIGH 3>;
clocks = <&lcd_clk>, <&lcd_clk>;
clock-names = "lcdc_clk", "hclk";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_lcdc_pwm ...>;
#pwm-cells = <3>;
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
#address-cells = <1>;
#size-cells = <0>;
lcdc_panel_output: endpoint@0 {
reg = <0>;
remote-endpoint = <&panel_input>;
};
};
};
Note that this representation does not prevent us from having an MFD
which declares the PWM and Display Engine, it's just that all devs will
point to the same of_node.
> +
> + lcdc-display-controller {
> + compatible = "atmel,lcdc-display-controller";
> + lcd-supply = <&lcdc_reg>;
Hm, is this a regulator for the LCD controller or the LCD? If it's for
the LCD it should be placed under the panel node.
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + port@0 {
> + reg = <0>;
> + #address-cells = <1>;
> + #size-cells = <0>;
> + lcdc_panel_output: endpoint@0 {
> + reg = <0>;
> + remote-endpoint = <&panel_input>;
> + };
> + };
> + };
> +
> + lcdc_pwm: lcdc-pwm {
> + compatible = "atmel,lcdc-pwm";
> + pinctrl-names = "default";
> + pinctrl-0 = <&pinctrl_lcdc_pwm>;
> + #pwm-cells = <3>;
> + };
> +
> + };
> +
> + panel: panel {
> + compatible = "logictechnologies,lttd800480070-l2rt", "simple-panel";
> + backlight = <&backlight>;
> + power-supply = <&panel_reg>;
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + port@0 {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + panel_input: endpoint@0 {
> + reg = <0>;
> + remote-endpoint = <&lcdc_panel_output>;
> + };
> + };
> + };
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2018-08-24 8:45 UTC|newest]
Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-12 18:41 [RFC PATCH 0/7] add at91sam9 LCDC DRM driver Sam Ravnborg
2018-08-12 18:46 ` [PATCH v1 1/7] atmel-hlcdc: renamed directory to drm/atmel/ Sam Ravnborg
2018-08-14 8:39 ` Daniel Vetter
2018-08-14 16:19 ` Sam Ravnborg
2018-08-16 7:41 ` Daniel Vetter
2018-08-22 20:09 ` Sam Ravnborg
2018-08-22 20:22 ` Daniel Vetter
2018-08-24 8:28 ` Boris Brezillon
2018-08-24 15:43 ` Sam Ravnborg
2018-08-12 18:46 ` [PATCH v1 2/7] dt-binding: add bindings for Atmel LCDC mfd Sam Ravnborg
2018-08-24 8:45 ` Boris Brezillon [this message]
2018-08-24 15:58 ` Sam Ravnborg
2018-08-12 18:46 ` [PATCH v1 3/7] mfd: add atmel-lcdc driver Sam Ravnborg
2018-08-14 11:09 ` kbuild test robot
2018-08-15 5:24 ` Lee Jones
2018-08-15 20:40 ` Sam Ravnborg
2018-08-16 8:28 ` Nicolas Ferre
2018-08-16 8:42 ` Lee Jones
2018-08-24 8:37 ` Boris Brezillon
2018-08-24 8:15 ` Boris Brezillon
2018-08-24 10:58 ` Lee Jones
2018-08-15 8:11 ` kbuild test robot
2018-08-24 8:48 ` Boris Brezillon
2018-08-12 18:46 ` [PATCH v1 4/7] dt-bindings: add bindings for Atmel LCDC pwm Sam Ravnborg
2018-08-12 18:46 ` [PATCH v1 5/7] pwm: add pwm-atmel-lcdc driver Sam Ravnborg
2018-08-12 18:46 ` [PATCH v1 6/7] dt-bindings: add bindings for Atmel lcdc-display-controller Sam Ravnborg
2018-08-12 18:46 ` [PATCH v1 7/7] drm: add Atmel LCDC display controller support Sam Ravnborg
2018-08-24 12:31 ` Boris Brezillon
2018-08-26 18:41 ` Sam Ravnborg
2018-08-26 14:28 ` Noralf Trønnes
2018-08-26 14:58 ` Sam Ravnborg
2018-08-12 19:55 ` [RFC PATCH 0/7] add at91sam9 LCDC DRM driver Sam Ravnborg
2018-08-13 14:47 ` Nicolas Ferre
2018-08-14 8:41 ` Daniel Vetter
2018-08-22 20:12 ` Sam Ravnborg
2018-08-23 6:16 ` Daniel Vetter
2018-08-13 15:54 ` Nicolas Ferre
2018-08-13 18:18 ` Sam Ravnborg
2018-08-13 22:04 ` Rob Herring
2018-08-14 16:43 ` Sam Ravnborg
2018-08-14 22:42 ` Rob Herring
2018-08-15 4:48 ` Sam Ravnborg
2018-08-15 14:45 ` Rob Herring
2018-08-15 15:04 ` Daniel Vetter
2018-08-15 15:41 ` Peter Rosin
2018-08-15 20:48 ` Sam Ravnborg
2018-08-14 14:36 ` Alexandre Belloni
2018-08-14 16:16 ` Sam Ravnborg
2018-08-24 8:22 ` Boris Brezillon
2018-08-24 15:52 ` Sam Ravnborg
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=20180824104517.29f24f44@bbrezillon \
--to=boris.brezillon@bootlin.com \
--cc=alexandre.belloni@bootlin.com \
--cc=boris.brezillon@free-electrons.com \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=lee.jones@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-pwm@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=nicolas.ferre@microchip.com \
--cc=robh+dt@kernel.org \
--cc=sam@ravnborg.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).