From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 661A1C4332F for ; Wed, 16 Nov 2022 17:48:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=MIEWsIksFli0r/wXAi1TT8UjU6Pa+EPk7xfTmtY4lg8=; b=OdbiM9HskXuSfh EckSzSPb1pNxi9X+4Uwm/0jcj4UB3cviPdX9ykPPNXhf5vwmAe2Ax6kABrnlWxrp95iBI35IXqSM3 rZZYHlkSt9TXcgkBaFyZ8azDO9RHjLph92/jUtkA+YsmzF8Kk+Zwt/J1CUxMdhLhb0/+I2KIc2OPa yPQ/WfzTEtIfZWP4OBs0jfNg2gzH7/do14qyGMiXQ9FaqvJ7cttI+NMzkn2so5s0e0ShK/uqaucXy vPHPdTqmLOPfgK5Uv2hlTf6Z8G6UBSBWOvjAwvlku2geS/xcx+kmttHO03cefyoVeujMQwJZJwT8P 8zsk5mdvPCYmDj3DYjfg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ovMVP-006cZg-91; Wed, 16 Nov 2022 17:47:23 +0000 Received: from desiato.infradead.org ([90.155.92.199]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ovMVN-006cPh-93 for linux-arm-kernel@bombadil.infradead.org; Wed, 16 Nov 2022 17:47:21 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Transfer-Encoding: Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Sender:Reply-To:Content-ID:Content-Description; bh=u0aHWwdqWKvjf68O7GGCNZFTg5GEvXPm/cg6lj7q+VA=; b=WaZycq21+dx1S9ohq0V2wkOWZw vIsR1iP91ez7D/4ky+GR28ICPl2UD8GDIkx8//7K+jft8nZJlnTHjzEUZt3k5LuzXU3qmOxUWgeAV c/yfN2UvIINgXP4pjblBet0+S91LTsaYYZr4+WWl31QVevruZdUH/CJPzYtIMDdAXCP0NZ2KrS6iP nasVGAIa8EJgRfUYCaMe1Z4UT9cv9zAo4nNAmGN9SGG1Ur+VFQw8B29BwLBawADnUBncwEvmyByt8 e6Ssqkpt3+GK62UF9vOBOzY/pGXObIzg7CZ3FotPKs6QwET37gCYKc9k9wOROFXg3ct4uZ3z7MOkI UamtEfyA==; Received: from mail-oi1-f170.google.com ([209.85.167.170]) by desiato.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ovM6O-001Q4l-U1 for linux-arm-kernel@lists.infradead.org; Wed, 16 Nov 2022 17:21:36 +0000 Received: by mail-oi1-f170.google.com with SMTP id t62so19209199oib.12 for ; Wed, 16 Nov 2022 09:21:31 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=u0aHWwdqWKvjf68O7GGCNZFTg5GEvXPm/cg6lj7q+VA=; b=6ZTdGmYCWDXTEx0jEiwS9bAwYfMG7qYCn2mzK5pBdCI2SUISFtKG6DM/0QDnesW8Z0 E+WSIIJpIK5muZOzttTymHoycObKhcKuHOM4otPJHkRoYJccoQRQzF+4tWYRjirXMl3t W9hlFWhQGyYFkVUd3UIpajDF8upYrthWFdH2KRgyu/M6Hd+VYqfULKfl37/fK906ilRc A0cB0Og+eYsgmvfN6iag6lJmcEleZNW2JGuusanhWKByuxjK3Scetwg4PnJ1GwjxWLTW mIQtfCtRBkj3xnR4CCrCdHlTyvARL5XSWIG/tpvX0t6qVqs/7qSi/5rBAQEonoNLuUZ/ dCvg== X-Gm-Message-State: ANoB5plmpnNM3/lmLP38bVNT1oNR7KE41RHAIiMbyA8QO9Nr+oyVccAY uxCpnhMNBhvTaQBf9q6zVVE8zCSPWw== X-Google-Smtp-Source: AA0mqf6nGzisXh0hM36zvzwkmmNGXArbBmyM7V1+NM74TWMT5T+z1nIwTHkJbspJ92SV80qQ51+zAQ== X-Received: by 2002:aca:913:0:b0:359:568c:176 with SMTP id 19-20020aca0913000000b00359568c0176mr2084710oij.110.1668619290175; Wed, 16 Nov 2022 09:21:30 -0800 (PST) Received: from robh_at_kernel.org (66-90-144-107.dyn.grandenetworks.net. [66.90.144.107]) by smtp.gmail.com with ESMTPSA id f14-20020a9d5f0e000000b0066cc88749f8sm6798419oti.68.2022.11.16.09.21.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Nov 2022 09:21:29 -0800 (PST) Received: (nullmailer pid 460260 invoked by uid 1000); Wed, 16 Nov 2022 17:21:31 -0000 Date: Wed, 16 Nov 2022 11:21:31 -0600 From: Rob Herring To: Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= Cc: Philipp Zabel , Sascha Hauer , Krzysztof Kozlowski , Shawn Guo , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v1] dt-bindings: display: Convert fsl,imx-fb.txt to dt-schema Message-ID: <20221116172131.GA233356-robh@kernel.org> References: <20221110094945.191100-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20221110094945.191100-1-u.kleine-koenig@pengutronix.de> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221116_172133_032109_4F8C0EB0 X-CRM114-Status: GOOD ( 33.24 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Nov 10, 2022 at 10:49:45AM +0100, Uwe Kleine-K=F6nig wrote: > This is a straight forward conversion. Note that fsl,imx-lcdc was picked > as the new name as this is the compatible that should supersede the > legacy fb binding. > = > Signed-off-by: Uwe Kleine-K=F6nig > --- > Hello, > = > the eventual goal is to add drm support for this hardware. That one will > use a different (and more sensible) binding. However fsl,imx*-fb won't > go away directly, and Rob requested to describe both bindings in the > same file given that it describes a single hardware type. > = > As a first step I convert the old binding to yaml. I tried to put the > new binding on top of that but I'm not sure about a few things in this > patch and so post only this first patch and once it's accepted add the > new binding which I guess is less overall work. > = > What I'm unsure about is the description of the display node (Is there a > better description? I didn't find a schema for that.) That's going to be a challenge to describe because every panel binding = will need a reference to those custom properties. It's a similar problem = that spi-peripheral-props.yaml solved. But here, there may not be enough = instances to do such a general solution. Do the panels used even have = schemas yet? It's kind of a separate problem. You could start with just creating a = schema just listing the custom properties. > Further I didn't find documentation about additionalProperties and > unevaluatedProperties. Did I pick the right one here? example-schema.yaml talks about it some. In general, if there's a = $ref to other properties for a node not defined locally, then you need = unevaluatedProperties. Otherwise, additionalProperties is fine. > Best regards > Uwe > = > .../bindings/display/imx/fsl,imx-fb.txt | 57 --------- > .../bindings/display/imx/fsl,imx-lcdc.yaml | 110 ++++++++++++++++++ > 2 files changed, 110 insertions(+), 57 deletions(-) > delete mode 100644 Documentation/devicetree/bindings/display/imx/fsl,imx= -fb.txt > create mode 100644 Documentation/devicetree/bindings/display/imx/fsl,imx= -lcdc.yaml [...] > diff --git a/Documentation/devicetree/bindings/display/imx/fsl,imx-lcdc.y= aml b/Documentation/devicetree/bindings/display/imx/fsl,imx-lcdc.yaml > new file mode 100644 > index 000000000000..c3cf6f92a766 > --- /dev/null > +++ b/Documentation/devicetree/bindings/display/imx/fsl,imx-lcdc.yaml > @@ -0,0 +1,110 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/display/imx/fsl,imx-lcdc.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Freescale i.MX LCD Controller, found on i.MX1, i.MX21, i.MX25 and= i.MX27 > + > +maintainers: > + - Sascha Hauer > + - Pengutronix Kernel Team > + > +properties: > + compatible: > + oneOf: > + - items: > + - enum: > + - fsl,imx1-fb > + - fsl,imx21-fb > + - items: > + - enum: > + - fsl,imx25-fb > + - fsl,imx27-fb > + - const: fsl,imx21-fb > + > + clocks: > + maxItems: 3 > + > + clock-names: > + items: > + - const: ipg > + - const: ahb > + - const: per > + > + display: > + $ref: /schemas/types.yaml#/definitions/phandle > + description: | > + Display hardware node > + It needs to define the following properties: > + - bits-per-pixel > + - fsl,pcr: LCDC PCR value > + And optionally: > + - fsl,aus-mode: boolean to enable AUS mode (only for imx21) > + > + interrupts: > + maxItems: 1 > + > + reg: > + maxItems: 1 > + > + lcd-supply: > + description: > + Regulator for LCD supply voltage. > + > + fsl,dmacr: > + $ref: '/schemas/types.yaml#/definitions/uint32' Drop quotes. > + description: > + Override value for DMA Control Register > + > + fsl,lpccr: > + $ref: '/schemas/types.yaml#/definitions/uint32' Drop quotes. > + description: > + Contrast Control Register value. > + > + fsl,lscr1: > + $ref: '/schemas/types.yaml#/definitions/uint32' Drop quotes. > + description: > + LCDC Sharp Configuration Register value. > + > +required: > + - compatible > + - clocks > + - clock-names > + - display > + - interrupts > + - reg > + > +additionalProperties: false > + > +examples: > + - | > + imxfb: fb@10021000 { lcd-controller@... > + compatible =3D "fsl,imx21-fb"; > + interrupts =3D <61>; > + reg =3D <0x10021000 0x1000>; > + display =3D <&display0>; > + clocks =3D <&clks 103>, <&clks 49>, <&clks 66>; > + clock-names =3D "ipg", "ahb", "per"; > + }; > + > + display0: display0 { > + model =3D "Primeview-PD050VL1"; > + bits-per-pixel =3D <16>; > + fsl,pcr =3D <0xf0c88080>; /* non-standard but required */ > + > + display-timings { > + native-mode =3D <&timing_disp0>; > + timing_disp0: timing0 { > + hactive =3D <640>; > + vactive =3D <480>; > + hback-porch =3D <112>; > + hfront-porch =3D <36>; > + hsync-len =3D <32>; > + vback-porch =3D <33>; > + vfront-porch =3D <33>; > + vsync-len =3D <2>; > + clock-frequency =3D <25000000>; > + }; > + }; > + }; > -- = > 2.38.1 > = > = _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 58C17C4332F for ; Wed, 16 Nov 2022 17:21:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232915AbiKPRVl (ORCPT ); Wed, 16 Nov 2022 12:21:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37696 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233207AbiKPRVc (ORCPT ); Wed, 16 Nov 2022 12:21:32 -0500 Received: from mail-oi1-f177.google.com (mail-oi1-f177.google.com [209.85.167.177]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 06F7C2626 for ; Wed, 16 Nov 2022 09:21:31 -0800 (PST) Received: by mail-oi1-f177.google.com with SMTP id s206so19255589oie.3 for ; Wed, 16 Nov 2022 09:21:30 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=u0aHWwdqWKvjf68O7GGCNZFTg5GEvXPm/cg6lj7q+VA=; b=r3KomTTM3ROnuIbvjSZcAdxcKHn3HDT0sfYwy7TS3VcX5LWi55QctjUoE7dBy7mHl0 GnXp9yEn/ye22xo0i3ruSBMRK/iGOSqnfnBbpy5Um8LhnzR44WYIG0RIaZpvHBCfD7bi 26fqrPRZZQRqVQUAygQysb/7EX22+VQJm5MHg8VuLEAXZtDgU/RbZ9QdBEnYN/6cYJ+x C8UEhzvv6EWuerhXiuf9293QBpoVrPP1KnWQytKTpr2BplCrLmPd0HpZaIJv7vPoLxOd 2C8MM7qqJIzYmvd1QeUSw6wD65bFQFzi0AX8KPNLBlwY8rEbzS3NPndHqXbfNfbqfJIl RVjQ== X-Gm-Message-State: ANoB5pmjV/tk0hjRbMeEewvejwoZjgvC8HLtVkSGiaTmWCSB93TIUZQC ulpxBqFCmNu13t1Of2i+FA== X-Google-Smtp-Source: AA0mqf6nGzisXh0hM36zvzwkmmNGXArbBmyM7V1+NM74TWMT5T+z1nIwTHkJbspJ92SV80qQ51+zAQ== X-Received: by 2002:aca:913:0:b0:359:568c:176 with SMTP id 19-20020aca0913000000b00359568c0176mr2084710oij.110.1668619290175; Wed, 16 Nov 2022 09:21:30 -0800 (PST) Received: from robh_at_kernel.org (66-90-144-107.dyn.grandenetworks.net. [66.90.144.107]) by smtp.gmail.com with ESMTPSA id f14-20020a9d5f0e000000b0066cc88749f8sm6798419oti.68.2022.11.16.09.21.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Nov 2022 09:21:29 -0800 (PST) Received: (nullmailer pid 460260 invoked by uid 1000); Wed, 16 Nov 2022 17:21:31 -0000 Date: Wed, 16 Nov 2022 11:21:31 -0600 From: Rob Herring To: Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= Cc: Philipp Zabel , Sascha Hauer , Krzysztof Kozlowski , Shawn Guo , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v1] dt-bindings: display: Convert fsl,imx-fb.txt to dt-schema Message-ID: <20221116172131.GA233356-robh@kernel.org> References: <20221110094945.191100-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20221110094945.191100-1-u.kleine-koenig@pengutronix.de> Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On Thu, Nov 10, 2022 at 10:49:45AM +0100, Uwe Kleine-König wrote: > This is a straight forward conversion. Note that fsl,imx-lcdc was picked > as the new name as this is the compatible that should supersede the > legacy fb binding. > > Signed-off-by: Uwe Kleine-König > --- > Hello, > > the eventual goal is to add drm support for this hardware. That one will > use a different (and more sensible) binding. However fsl,imx*-fb won't > go away directly, and Rob requested to describe both bindings in the > same file given that it describes a single hardware type. > > As a first step I convert the old binding to yaml. I tried to put the > new binding on top of that but I'm not sure about a few things in this > patch and so post only this first patch and once it's accepted add the > new binding which I guess is less overall work. > > What I'm unsure about is the description of the display node (Is there a > better description? I didn't find a schema for that.) That's going to be a challenge to describe because every panel binding will need a reference to those custom properties. It's a similar problem that spi-peripheral-props.yaml solved. But here, there may not be enough instances to do such a general solution. Do the panels used even have schemas yet? It's kind of a separate problem. You could start with just creating a schema just listing the custom properties. > Further I didn't find documentation about additionalProperties and > unevaluatedProperties. Did I pick the right one here? example-schema.yaml talks about it some. In general, if there's a $ref to other properties for a node not defined locally, then you need unevaluatedProperties. Otherwise, additionalProperties is fine. > Best regards > Uwe > > .../bindings/display/imx/fsl,imx-fb.txt | 57 --------- > .../bindings/display/imx/fsl,imx-lcdc.yaml | 110 ++++++++++++++++++ > 2 files changed, 110 insertions(+), 57 deletions(-) > delete mode 100644 Documentation/devicetree/bindings/display/imx/fsl,imx-fb.txt > create mode 100644 Documentation/devicetree/bindings/display/imx/fsl,imx-lcdc.yaml [...] > diff --git a/Documentation/devicetree/bindings/display/imx/fsl,imx-lcdc.yaml b/Documentation/devicetree/bindings/display/imx/fsl,imx-lcdc.yaml > new file mode 100644 > index 000000000000..c3cf6f92a766 > --- /dev/null > +++ b/Documentation/devicetree/bindings/display/imx/fsl,imx-lcdc.yaml > @@ -0,0 +1,110 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/display/imx/fsl,imx-lcdc.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Freescale i.MX LCD Controller, found on i.MX1, i.MX21, i.MX25 and i.MX27 > + > +maintainers: > + - Sascha Hauer > + - Pengutronix Kernel Team > + > +properties: > + compatible: > + oneOf: > + - items: > + - enum: > + - fsl,imx1-fb > + - fsl,imx21-fb > + - items: > + - enum: > + - fsl,imx25-fb > + - fsl,imx27-fb > + - const: fsl,imx21-fb > + > + clocks: > + maxItems: 3 > + > + clock-names: > + items: > + - const: ipg > + - const: ahb > + - const: per > + > + display: > + $ref: /schemas/types.yaml#/definitions/phandle > + description: | > + Display hardware node > + It needs to define the following properties: > + - bits-per-pixel > + - fsl,pcr: LCDC PCR value > + And optionally: > + - fsl,aus-mode: boolean to enable AUS mode (only for imx21) > + > + interrupts: > + maxItems: 1 > + > + reg: > + maxItems: 1 > + > + lcd-supply: > + description: > + Regulator for LCD supply voltage. > + > + fsl,dmacr: > + $ref: '/schemas/types.yaml#/definitions/uint32' Drop quotes. > + description: > + Override value for DMA Control Register > + > + fsl,lpccr: > + $ref: '/schemas/types.yaml#/definitions/uint32' Drop quotes. > + description: > + Contrast Control Register value. > + > + fsl,lscr1: > + $ref: '/schemas/types.yaml#/definitions/uint32' Drop quotes. > + description: > + LCDC Sharp Configuration Register value. > + > +required: > + - compatible > + - clocks > + - clock-names > + - display > + - interrupts > + - reg > + > +additionalProperties: false > + > +examples: > + - | > + imxfb: fb@10021000 { lcd-controller@... > + compatible = "fsl,imx21-fb"; > + interrupts = <61>; > + reg = <0x10021000 0x1000>; > + display = <&display0>; > + clocks = <&clks 103>, <&clks 49>, <&clks 66>; > + clock-names = "ipg", "ahb", "per"; > + }; > + > + display0: display0 { > + model = "Primeview-PD050VL1"; > + bits-per-pixel = <16>; > + fsl,pcr = <0xf0c88080>; /* non-standard but required */ > + > + display-timings { > + native-mode = <&timing_disp0>; > + timing_disp0: timing0 { > + hactive = <640>; > + vactive = <480>; > + hback-porch = <112>; > + hfront-porch = <36>; > + hsync-len = <32>; > + vback-porch = <33>; > + vfront-porch = <33>; > + vsync-len = <2>; > + clock-frequency = <25000000>; > + }; > + }; > + }; > -- > 2.38.1 > > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B1925C4332F for ; Wed, 16 Nov 2022 17:21:38 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3CD9B10E4E5; Wed, 16 Nov 2022 17:21:36 +0000 (UTC) Received: from mail-oi1-f177.google.com (mail-oi1-f177.google.com [209.85.167.177]) by gabe.freedesktop.org (Postfix) with ESMTPS id 36EE110E4EA for ; Wed, 16 Nov 2022 17:21:31 +0000 (UTC) Received: by mail-oi1-f177.google.com with SMTP id c129so19308955oia.0 for ; Wed, 16 Nov 2022 09:21:31 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=u0aHWwdqWKvjf68O7GGCNZFTg5GEvXPm/cg6lj7q+VA=; b=Oovxv6890n/0VPBmz52+96CkEGRkpjERAnaTlC5MT5b9TjtJqh5HERoI5homzHN6du ORSYFRVN0EiDpc64qwD6VMHZP17Myc1C0lnvhFvTHtKUjeiVJoj1rSHrQv+kLzWgZmrX wt/6GHkUjKjlH82tEF6oYep9ZtyCr8Sns1OudUEN+n/vrBlRXV6LhBEV17BFMPTlj847 1gIEbl8KK4eUr9h9lxgmhvh4rvqleJiPX92L3nPJ9Pq7K9fvRuGNOcjluVk/YurY7k8x a1mE+DCjB9bST3fuJSv/Nre605K2Sq0TLS0lNRZUzPpRSsTqP5z3gJrujeS4ETyU9m2U DWHQ== X-Gm-Message-State: ANoB5pnmxuJi6Vdx0Sw3RYSWe3fknSYjja8mMk5CmqcSOfdIKSapKxnO v4XKfQNVw/EPiC4fNUu0xg== X-Google-Smtp-Source: AA0mqf6nGzisXh0hM36zvzwkmmNGXArbBmyM7V1+NM74TWMT5T+z1nIwTHkJbspJ92SV80qQ51+zAQ== X-Received: by 2002:aca:913:0:b0:359:568c:176 with SMTP id 19-20020aca0913000000b00359568c0176mr2084710oij.110.1668619290175; Wed, 16 Nov 2022 09:21:30 -0800 (PST) Received: from robh_at_kernel.org (66-90-144-107.dyn.grandenetworks.net. [66.90.144.107]) by smtp.gmail.com with ESMTPSA id f14-20020a9d5f0e000000b0066cc88749f8sm6798419oti.68.2022.11.16.09.21.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Nov 2022 09:21:29 -0800 (PST) Received: (nullmailer pid 460260 invoked by uid 1000); Wed, 16 Nov 2022 17:21:31 -0000 Date: Wed, 16 Nov 2022 11:21:31 -0600 From: Rob Herring To: Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= Subject: Re: [PATCH v1] dt-bindings: display: Convert fsl,imx-fb.txt to dt-schema Message-ID: <20221116172131.GA233356-robh@kernel.org> References: <20221110094945.191100-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20221110094945.191100-1-u.kleine-koenig@pengutronix.de> X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Krzysztof Kozlowski , Shawn Guo , Sascha Hauer , dri-devel@lists.freedesktop.org, NXP Linux Team , Pengutronix Kernel Team , linux-arm-kernel@lists.infradead.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Thu, Nov 10, 2022 at 10:49:45AM +0100, Uwe Kleine-König wrote: > This is a straight forward conversion. Note that fsl,imx-lcdc was picked > as the new name as this is the compatible that should supersede the > legacy fb binding. > > Signed-off-by: Uwe Kleine-König > --- > Hello, > > the eventual goal is to add drm support for this hardware. That one will > use a different (and more sensible) binding. However fsl,imx*-fb won't > go away directly, and Rob requested to describe both bindings in the > same file given that it describes a single hardware type. > > As a first step I convert the old binding to yaml. I tried to put the > new binding on top of that but I'm not sure about a few things in this > patch and so post only this first patch and once it's accepted add the > new binding which I guess is less overall work. > > What I'm unsure about is the description of the display node (Is there a > better description? I didn't find a schema for that.) That's going to be a challenge to describe because every panel binding will need a reference to those custom properties. It's a similar problem that spi-peripheral-props.yaml solved. But here, there may not be enough instances to do such a general solution. Do the panels used even have schemas yet? It's kind of a separate problem. You could start with just creating a schema just listing the custom properties. > Further I didn't find documentation about additionalProperties and > unevaluatedProperties. Did I pick the right one here? example-schema.yaml talks about it some. In general, if there's a $ref to other properties for a node not defined locally, then you need unevaluatedProperties. Otherwise, additionalProperties is fine. > Best regards > Uwe > > .../bindings/display/imx/fsl,imx-fb.txt | 57 --------- > .../bindings/display/imx/fsl,imx-lcdc.yaml | 110 ++++++++++++++++++ > 2 files changed, 110 insertions(+), 57 deletions(-) > delete mode 100644 Documentation/devicetree/bindings/display/imx/fsl,imx-fb.txt > create mode 100644 Documentation/devicetree/bindings/display/imx/fsl,imx-lcdc.yaml [...] > diff --git a/Documentation/devicetree/bindings/display/imx/fsl,imx-lcdc.yaml b/Documentation/devicetree/bindings/display/imx/fsl,imx-lcdc.yaml > new file mode 100644 > index 000000000000..c3cf6f92a766 > --- /dev/null > +++ b/Documentation/devicetree/bindings/display/imx/fsl,imx-lcdc.yaml > @@ -0,0 +1,110 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/display/imx/fsl,imx-lcdc.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Freescale i.MX LCD Controller, found on i.MX1, i.MX21, i.MX25 and i.MX27 > + > +maintainers: > + - Sascha Hauer > + - Pengutronix Kernel Team > + > +properties: > + compatible: > + oneOf: > + - items: > + - enum: > + - fsl,imx1-fb > + - fsl,imx21-fb > + - items: > + - enum: > + - fsl,imx25-fb > + - fsl,imx27-fb > + - const: fsl,imx21-fb > + > + clocks: > + maxItems: 3 > + > + clock-names: > + items: > + - const: ipg > + - const: ahb > + - const: per > + > + display: > + $ref: /schemas/types.yaml#/definitions/phandle > + description: | > + Display hardware node > + It needs to define the following properties: > + - bits-per-pixel > + - fsl,pcr: LCDC PCR value > + And optionally: > + - fsl,aus-mode: boolean to enable AUS mode (only for imx21) > + > + interrupts: > + maxItems: 1 > + > + reg: > + maxItems: 1 > + > + lcd-supply: > + description: > + Regulator for LCD supply voltage. > + > + fsl,dmacr: > + $ref: '/schemas/types.yaml#/definitions/uint32' Drop quotes. > + description: > + Override value for DMA Control Register > + > + fsl,lpccr: > + $ref: '/schemas/types.yaml#/definitions/uint32' Drop quotes. > + description: > + Contrast Control Register value. > + > + fsl,lscr1: > + $ref: '/schemas/types.yaml#/definitions/uint32' Drop quotes. > + description: > + LCDC Sharp Configuration Register value. > + > +required: > + - compatible > + - clocks > + - clock-names > + - display > + - interrupts > + - reg > + > +additionalProperties: false > + > +examples: > + - | > + imxfb: fb@10021000 { lcd-controller@... > + compatible = "fsl,imx21-fb"; > + interrupts = <61>; > + reg = <0x10021000 0x1000>; > + display = <&display0>; > + clocks = <&clks 103>, <&clks 49>, <&clks 66>; > + clock-names = "ipg", "ahb", "per"; > + }; > + > + display0: display0 { > + model = "Primeview-PD050VL1"; > + bits-per-pixel = <16>; > + fsl,pcr = <0xf0c88080>; /* non-standard but required */ > + > + display-timings { > + native-mode = <&timing_disp0>; > + timing_disp0: timing0 { > + hactive = <640>; > + vactive = <480>; > + hback-porch = <112>; > + hfront-porch = <36>; > + hsync-len = <32>; > + vback-porch = <33>; > + vfront-porch = <33>; > + vsync-len = <2>; > + clock-frequency = <25000000>; > + }; > + }; > + }; > -- > 2.38.1 > >