Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp61886ioo; Wed, 25 May 2022 20:49:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxZkBobCU5p5Esecx4GXsXWzWkihHoQuWAfoXK/sJ+5JAi/zGDDJVGPuT8tt7o0Bpdlezl3 X-Received: by 2002:a17:907:da1:b0:6fe:a1a5:36b9 with SMTP id go33-20020a1709070da100b006fea1a536b9mr28517035ejc.728.1653536943150; Wed, 25 May 2022 20:49:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653536943; cv=none; d=google.com; s=arc-20160816; b=GHhFpmPHM4ggkGeTBkt9Yhq2JG3Ro4AE4RxJM9W2P0jo/7/I8155epPr8eOQfDUhQs xsbm+1DIghEWuX4We+vuKQT64J3QhZl76hOeS4ylxk81F4f6qXmd0ShxzjAxTGE5kH+S u68M/sQPSkp0wUB83GGmdmxPlyNJ0mH1YtUhKJysK9E2BtceY9Oed0BfBfx5WXywebLn qexeESWNLevJeGgFT2CQvdXPf8+hwJ32lxCJxWgXmMcnqFgsYBodX2raKFusgvMRtBup BTSAk1wFm9pGDwtsWOX6mUi5FqaFoNhabSXWyQsoJqWUJoeJQQ+T50DZsQ4VMPONJmQq bFrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=wF+L0t2wRIaaaI1lJov+tUBwt/Mh7JkYRN+V3RLqN2w=; b=swYnDn0gjxaf0PG6qYhARg98NUitcXYhCtXhl0+3QIJUmm+dfzh9xcMMkx6T3WWgn5 0j7Tvnspq3rUnaxG5fqaqKLdG2H+rhlChyx+jaK8B3RFa7NSSiwUWr1jNZFWha8R6+sn ykxGSkCADY/9kjrLMlTq2Rp9yqyiiaBxQwWMsiVfkdzL45c1iDw3DMiuW3FS09Y0CfJB qlBsOZW9+mW4xdb3UCadBrCGrD6lippKy/mzyRASd0sQFQcFk1pBCVhLo1NLar79JxFA HS2uO1FT7/V1a5a1BOhZ9LOSF0/m6FH0W4hNvvr+IOKeJVAsrYRKvlHy8calOVhQaJMQ M2Lg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=XiLCHHbH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sa1-20020a1709076d0100b006fe94057025si386004ejc.454.2022.05.25.20.48.37; Wed, 25 May 2022 20:49:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=XiLCHHbH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240636AbiEYPan (ORCPT + 99 others); Wed, 25 May 2022 11:30:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34910 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230417AbiEYPak (ORCPT ); Wed, 25 May 2022 11:30:40 -0400 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [46.235.227.227]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8E1082F03F; Wed, 25 May 2022 08:30:39 -0700 (PDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: kholk11) with ESMTPSA id 9C1F61F450E4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1653492638; bh=mGX881tfLiNKIMFbpkJ51Yg+RQ+F9f5Vkk6XOh4uNGc=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=XiLCHHbHnd1Of9D/ytssYwCUsRsP+P8gc8sVErDFW2KN0nriCpd0EnGi8pD+i7k4K xEcmVmjE6akfuOKNi5dPUssQ1UQIMYMVW1VlWa8IkEUWQofaE3Qau4yswACMZT/YGR wiCDrQ++snvDecCL/AL48FhDsVlYmvgGmQyhh4Z10Pf6eIGiCecdncslLCBuW/w8qA H1x7wi6Wf8tWIBmV53OjicRhpeMB0HttD0TeyXge4RNnx2x8cyzglTtwlepmhgN3o9 TkxwHho3xnEiQxK/eXPcxX/pWdv806oz0wMRAGjIiScBpjm1TgQM/0YEzRgGLRj3t3 RXWyV6ddLadRA== Message-ID: Date: Wed, 25 May 2022 17:30:33 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 Subject: Re: [PATCH v10 02/21] dt-bindings: mediatek,dp: Add Display Port binding Content-Language: en-US To: Guillaume Ranquet , Chun-Kuang Hu , Philipp Zabel , David Airlie , Daniel Vetter , Rob Herring , Krzysztof Kozlowski , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Matthias Brugger , Chunfeng Yun , Kishon Vijay Abraham I , Vinod Koul , Helge Deller , CK Hu , Jitao shi Cc: Markus Schneider-Pargmann , dri-devel@lists.freedesktop.org, linux-mediatek@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-phy@lists.infradead.org, linux-fbdev@vger.kernel.org References: <20220523104758.29531-1-granquet@baylibre.com> <20220523104758.29531-3-granquet@baylibre.com> From: AngeloGioacchino Del Regno In-Reply-To: <20220523104758.29531-3-granquet@baylibre.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Il 23/05/22 12:47, Guillaume Ranquet ha scritto: > From: Markus Schneider-Pargmann > > This controller is present on several mediatek hardware. Currently > mt8195 and mt8395 have this controller without a functional difference, > so only one compatible field is added. > > The controller can have two forms, as a normal display port and as an > embedded display port. > > Signed-off-by: Markus Schneider-Pargmann > Signed-off-by: Guillaume Ranquet > --- > .../display/mediatek/mediatek,dp.yaml | 99 +++++++++++++++++++ > 1 file changed, 99 insertions(+) > create mode 100644 Documentation/devicetree/bindings/display/mediatek/mediatek,dp.yaml > > diff --git a/Documentation/devicetree/bindings/display/mediatek/mediatek,dp.yaml b/Documentation/devicetree/bindings/display/mediatek/mediatek,dp.yaml > new file mode 100644 > index 000000000000..36ae0a6df299 > --- /dev/null > +++ b/Documentation/devicetree/bindings/display/mediatek/mediatek,dp.yaml > @@ -0,0 +1,99 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/display/mediatek/mediatek,dp.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: MediaTek Display Port Controller > + > +maintainers: > + - CK Hu > + - Jitao shi > + > +description: | > + Device tree bindings for the MediaTek (embedded) Display Port controller > + present on some MediaTek SoCs. > + > +properties: > + compatible: > + enum: > + - mediatek,mt8195-dp-tx > + > + reg: > + maxItems: 1 > + > + interrupts: > + maxItems: 1 > + > + clocks: > + items: > + - description: faxi clock > + > + clock-names: > + items: > + - const: faxi > + > + power-domains: > + maxItems: 1 > + > + ports: > + $ref: /schemas/graph.yaml#/properties/ports > + properties: > + port@0: > + $ref: /schemas/graph.yaml#/properties/port > + description: Input endpoint of the controller, usually dp_intf > + > + port@1: > + $ref: /schemas/graph.yaml#/properties/port > + description: Output endpoint of the controller > + You should add port@0 (and port@1, probably) as required... with what you've done here, you're saying that "ports" is required, but you're allowing it to be empty.. ports: $ref: /schemas/graph.yaml#/properties/ports properties: port@0: $ref: /schemas/graph.yaml#/properties/port description: Input endpoint of the controller, usually dp_intf port@1: $ref: /schemas/graph.yaml#/properties/port description: Output endpoint of the controller required: - port@0 - port@1 ^^^ that's how it should look. > + max-lanes: > + maxItems: 1 > + description: maximum number of lanes supported by the hardware > + > + max-linkrate: > + maxItems: 1 > + description: maximum link rate supported by the hardware As you've put it (in the example below), the max-linkrate property wants a value that corresponds to what you find in the HW registers... this is wrong. Devicetree bindings should be generic and devicetrees shouldn't have hardware specific bits inside, hence, please change this property to accept a link rate specified in Mbps and also specify that in the description. Thanks, Angelo > + > +required: > + - compatible > + - reg > + - interrupts > + - ports > + - max-lanes > + - max-linkrate > + > +additionalProperties: false > + > +examples: > + - | > + #include > + #include > + edp_tx: edp_tx@1c500000 { > + compatible = "mediatek,mt8195-dp-tx"; > + reg = <0 0x1c500000 0 0x8000>; > + interrupts = ; > + power-domains = <&spm MT8195_POWER_DOMAIN_EPD_TX>; > + pinctrl-names = "default"; > + pinctrl-0 = <&edp_pin>; > + max-lanes = /bits/ 8 <4>; > + max-linkrate = /bits/ 8 <0x1e>; > + > + ports { > + #address-cells = <1>; > + #size-cells = <0>; > + > + port@0 { > + reg = <0>; > + edp_in: endpoint { > + remote-endpoint = <&dp_intf0_out>; > + }; > + }; > + port@1 { > + reg = <1>; > + edp_out: endpoint { > + remote-endpoint = <&panel_in>; > + }; > + }; > + }; > + };