linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: fnkl.kernel@gmail.com, Hector Martin <marcan@marcan.st>,
	Sven Peter <sven@svenpeter.dev>,
	Alyssa Rosenzweig <alyssa@rosenzweig.io>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Maxime Ripard <mripard@kernel.org>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Neil Armstrong <neil.armstrong@linaro.org>,
	Jessica Zhang <quic_jesszhan@quicinc.com>,
	asahi@lists.linux.dev
Cc: linux-arm-kernel@lists.infradead.org,
	dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/5] dt-bindings: display: Add Apple pre-DCP display controller bindings
Date: Tue, 26 Nov 2024 17:46:37 +0100	[thread overview]
Message-ID: <050d1398-cfc2-4921-b82a-95eecbcddba4@kernel.org> (raw)
In-Reply-To: <20241126-adpdrm-v2-1-c90485336c09@gmail.com>

On 26/11/2024 17:34, Sasha Finkelstein via B4 Relay wrote:
> From: Sasha Finkelstein <fnkl.kernel@gmail.com>
> 
> Add bindings for a secondary display controller present on certain
> Apple laptops.
> 

A nit, subject: drop second/last, redundant "bindings". The
"dt-bindings" prefix is already stating that these are bindings.
See also:
https://elixir.bootlin.com/linux/v6.7-rc8/source/Documentation/devicetree/bindings/submitting-patches.rst#L18


> Signed-off-by: Sasha Finkelstein <fnkl.kernel@gmail.com>
> ---
>  .../display/apple,h7-display-pipe-mipi.yaml        | 89 ++++++++++++++++++++++
>  .../bindings/display/apple,h7-display-pipe.yaml    | 77 +++++++++++++++++++
>  .../bindings/display/panel/apple,summit.yaml       | 58 ++++++++++++++
>  3 files changed, 224 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/display/apple,h7-display-pipe-mipi.yaml b/Documentation/devicetree/bindings/display/apple,h7-display-pipe-mipi.yaml
> new file mode 100644
> index 0000000000000000000000000000000000000000..2cf2f50e9fc7329a5b424d5ddf8c34cad2ebb6be
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/display/apple,h7-display-pipe-mipi.yaml
> @@ -0,0 +1,89 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/display/apple,h7-display-pipe-mipi.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Apple pre-DCP display controller MIPI interface.

Drop final stop, that's a title so it could be capitalized, but anyway
it is not a sentence

> +
> +maintainers:
> +  - asahi@lists.linux.dev

Drop, maintainer boxes are not allowed for bindings.

> +  - Sasha Finkelstein <fnkl.kernel@gmail.com>
> +
> +description:
> +  The MIPI controller part of the pre-DCP Apple display controller
> +
> +allOf:
> +  - $ref: dsi-controller.yaml#
> +
> +properties:
> +  compatible:
> +    items:
> +      - enum:
> +          - apple,t8112-display-pipe-mipi
> +          - apple,t8103-display-pipe-mipi
> +      - const: apple,h7-display-pipe-mipi
> +
> +  reg:
> +    maxItems: 1
> +
> +  reg-names:
> +    const: mipi
> +
> +  power-domains:
> +    maxItems: 1
> +
> +  ports:
> +    $ref: /schemas/graph.yaml#/properties/ports
> +
> +    properties:
> +      port@0:
> +        $ref: /schemas/graph.yaml#/properties/port
> +
> +      port@1:
> +        $ref: /schemas/graph.yaml#/properties/port
> +
> +    required:
> +      - port@0
> +      - port@1

Please take a look how other bindings define ports. You miss here
several items and more important - description what are these ports for.

> +
> +  '#address-cells': true
> +
> +  '#size-cells': true
> +
> +patternProperties:
> +  "^panel@[0-3]$": true

These look unusual. Is this a DSI controller? If so, then reference
dsi-controller. See other bindings how this is done.


> +
> +required:
> +  - compatible
> +  - reg
> +  - ports
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    display_dfr: dsi@228200000 {

Drop unused label

> +    	compatible = "apple,t8103-display-pipe-mipi", "apple,h7-display-pipe-mipi";
> +    	reg-names = "mipi";
> +    	reg = <0x28200000 0xc000>;

Order fields according to DTS coding style.

> +    	power-domains = <&ps_dispdfr_mipi>;
> +
> +    	ports {
> +    		#address-cells = <1>;

Messed indentation. Use 4 spaces for example indentation.


> +    		#size-cells = <0>;
> +
> +    		dfr_mipi_in: port@0 {
> +    			#address-cells = <1>;
> +    			#size-cells = <0>;
> +    			reg = <0>;
> +    		};
> +
> +    		dfr_mipi_out: port@1 {
> +    			#address-cells = <1>;
> +    			#size-cells = <0>;
> +    			reg = <1>;
> +    		};
> +    	};
> +    };
> +...
> diff --git a/Documentation/devicetree/bindings/display/apple,h7-display-pipe.yaml b/Documentation/devicetree/bindings/display/apple,h7-display-pipe.yaml
> new file mode 100644
> index 0000000000000000000000000000000000000000..98982da9c5f672167d67e4cd3b47e1fbdafc9510
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/display/apple,h7-display-pipe.yaml
> @@ -0,0 +1,77 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/display/apple,h7-display-pipe.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Apple pre-DCP display controller.
> +
> +maintainers:
> +  - asahi@lists.linux.dev
> +  - Sasha Finkelstein <fnkl.kernel@gmail.com>
> +
> +description:
> +  A secondary display controller used to drive the "touchbar" on certain Apple laptops.

Please wrap code according to coding style (checkpatch is not a coding
style description, but only a tool).


> +
> +properties:
> +  compatible:
> +    items:
> +      - enum:
> +          - apple,t8112-display-pipe
> +          - apple,t8103-display-pipe
> +      - const: apple,h7-display-pipe
> +
> +  reg:
> +    maxItems: 2

List and describe the items instead, because be and fe are a bit cryptic.

> +
> +  reg-names:
> +    items:
> +      - const: be
> +      - const: fe
> +
> +  power-domains:
> +    maxItems: 2

Need to list the items instead.

> +
> +  interrupts:
> +    maxItems: 2

Ditto

> +
> +  interrupt-names:
> +    items:
> +      - const: be
> +      - const: fe
> +
> +  iommus:
> +    maxItems: 1
> +
> +  port:
> +    $ref: /schemas/graph.yaml#/properties/port
> +
> +required:
> +  - compatible
> +  - reg
> +  - interrupts
> +  - port
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/interrupt-controller/apple-aic.h>
> +    display_dfr: display-pipe@228200000 {

Drop unused label.

> +    	compatible = "apple,t8103-display-pipe", "apple,h7-display-pipe";
> +    	reg-names = "be", "fe";
> +    	reg = <0x28200000 0xc000>,
> +    		<0x28400000 0x4000>;

Messed alignment, in other places as well.

> +    	power-domains = <&ps_dispdfr_fe>, <&ps_dispdfr_be>;
> +    	interrupt-parent = <&aic>;
> +    	interrupts = <AIC_IRQ 502 IRQ_TYPE_LEVEL_HIGH>,
> +    		<AIC_IRQ 506 IRQ_TYPE_LEVEL_HIGH>;
> +    	interrupt-names = "be", "fe";
> +    	iommus = <&displaydfr_dart 0>;
> +    	port {
> +    		dfr_adp_out_mipi: endpoint {

Messed indentation.

> +    			remote-endpoint = <&dfr_mipi_in_adp>;
> +    		};
> +    	};
> +    };
> +...
> diff --git a/Documentation/devicetree/bindings/display/panel/apple,summit.yaml b/Documentation/devicetree/bindings/display/panel/apple,summit.yaml
> new file mode 100644
> index 0000000000000000000000000000000000000000..db14f7af3787076c84ccdda08fedeb8912d5514d
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/display/panel/apple,summit.yaml
> @@ -0,0 +1,58 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/display/panel/apple,summit.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Apple "Summit" display panel.
> +
> +maintainers:
> +  - asahi@lists.linux.dev
> +  - Sasha Finkelstein <fnkl.kernel@gmail.com>
> +
> +allOf:
> +  - $ref: panel-common.yaml#
> +  - $ref: /schemas/leds/backlight/common.yaml#
> +
> +properties:
> +  compatible:
> +    items:
> +      - enum:
> +          - apple,j293-summit
> +          - apple,j493-summit
> +      - const: apple,summit

Summit tells me nothing - no description, title repeats it, so I suggest
using device specific compatible.

> +
> +  reg:
> +    maxItems: 1
> +
> +  max-brightness: true
> +
> +  port: true

No, these cannot be true without definition. Again, please open existing
bindings and use them as example. You probably miss here some reference,
but max-brightness for panel is a bit confusing. I asked already and did
not get answer: isn't this backlight property? What is this device -
backlight or panel? If panel, then what bus?


Best regards,
Krzysztof


  reply	other threads:[~2024-11-26 16:47 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-26 16:34 [PATCH v2 0/5] Driver for pre-DCP apple display controller Sasha Finkelstein via B4 Relay
2024-11-26 16:34 ` [PATCH v2 1/5] dt-bindings: display: Add Apple pre-DCP display controller bindings Sasha Finkelstein via B4 Relay
2024-11-26 16:46   ` Krzysztof Kozlowski [this message]
2024-11-26 16:54     ` Krzysztof Kozlowski
2024-11-26 17:00     ` Sasha Finkelstein
2024-11-26 17:20       ` Krzysztof Kozlowski
2024-11-26 18:24         ` Hector Martin
2024-11-26 18:33     ` Sasha Finkelstein
2024-11-26 18:25   ` Nick Chan
2024-11-26 16:34 ` [PATCH v2 2/5] drm: adp: Add Apple Display Pipe driver Sasha Finkelstein via B4 Relay
2024-11-26 21:00   ` Alyssa Ross
2024-11-26 16:34 ` [PATCH v2 3/5] drm: panel: Add a panel driver for the Summit display Sasha Finkelstein via B4 Relay
2024-11-30  9:29   ` Dmitry Baryshkov
2024-11-30 11:15     ` Sasha Finkelstein
2024-11-30 11:36       ` Dmitry Baryshkov
2025-01-12 20:27         ` Sasha Finkelstein
2024-11-26 16:34 ` [PATCH v2 4/5] arm64: dts: apple: Add touchbar screen nodes Sasha Finkelstein via B4 Relay
2024-11-26 16:47   ` Krzysztof Kozlowski
2024-11-26 16:34 ` [PATCH v2 5/5] MAINTAINERS: Add entries for touchbar display driver Sasha Finkelstein via B4 Relay

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=050d1398-cfc2-4921-b82a-95eecbcddba4@kernel.org \
    --to=krzk@kernel.org \
    --cc=airlied@gmail.com \
    --cc=alyssa@rosenzweig.io \
    --cc=asahi@lists.linux.dev \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=fnkl.kernel@gmail.com \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=marcan@marcan.st \
    --cc=mripard@kernel.org \
    --cc=neil.armstrong@linaro.org \
    --cc=quic_jesszhan@quicinc.com \
    --cc=robh@kernel.org \
    --cc=simona@ffwll.ch \
    --cc=sven@svenpeter.dev \
    --cc=tzimmermann@suse.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 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).