From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3F4DF13AD3F; Mon, 26 Aug 2024 08:12:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724659971; cv=none; b=npSpMevM02TizRkXUMnMSGED5H83JbYX7CrYuO0GJZ9kwAm85X8LhpqMIZHFlPRnAXARBBUAzWC+zXJdM3oSFLlB9yonvwh5EqbIA9gzEF6gLPFc+cbl1mx7wJD8T8iVWBu8dhisSgvXISKpp8hZPIxve2omTjoBq7dIxQx49lM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724659971; c=relaxed/simple; bh=GJX8WMOWMde/kMse+6fBcih9AFB2KaEoktYH4eL1+BA=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=R/1rpeFYNNHotIL6LZdGn4qPqLMam+Ul4Bzs9Elv+iULMM3EA3GmYbPQ0qNSJ87nlPL5h6crVl/a2tPClghspt/AfxH5Lp7PVmxh4Qvysk5Qv4uVTIzUB15LA7Cr3iNyXhsuIDogvOyHfuaLNV67ONX/4+qUQlVQNfMMge6T6h4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=SVDE35Cj; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="SVDE35Cj" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 75CC1C8CDC1; Mon, 26 Aug 2024 08:12:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1724659970; bh=GJX8WMOWMde/kMse+6fBcih9AFB2KaEoktYH4eL1+BA=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=SVDE35Cjmxr+/k2lBwT0mCM/tQSt4AuGzZgpMcyv8Shf9SYBF7nhdme/Ll1iQQWA+ puftrSTyIixn36Wj4DWynLOF35Mf9qaeHI+QTh79ynJc5YPUNMpGlowGZMGgxtNWMA Q2zq3ANCYyBARU5UdNjuHzs53JS8jQG79whJ5IBQr3xKp4oyGf/XdX/NbSmt+tpMDA +Vi+v2e7qvO0f4fH8Td8hza6DMlH5p/Uw292IyYHS5wvPnYWeTbg7YK5ULNR22Wfh4 OB3y8lLOY6Ko7ycvHnx1Tdess462qragDPDLXbVak9PHsZdzuDO8KDe21RVM/jLlKV YpudVOMX4+/MQ== Message-ID: Date: Mon, 26 Aug 2024 10:12:39 +0200 Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 2/4] dt-bindings: display: ti: Add schema for AM625 OLDI Transmitter To: Aradhya Bhatia , Aradhya Bhatia , Tomi Valkeinen , Jyri Sarha , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Laurent Pinchart , David Airlie , Daniel Vetter , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: DRI Development List , Devicetree List , Linux Kernel List , Nishanth Menon , Vignesh Raghavendra , Praneeth Bajjuri , Udit Kumar , Francesco Dolcini , Alexander Sverdlin , Randolph Sapp , Devarsh Thakkar , Jayesh Choudhary , Jai Luthra References: <20240716084248.1393666-1-a-bhatia1@ti.com> <20240716084248.1393666-3-a-bhatia1@ti.com> <0144d9b4-e830-44b0-95cd-4d49d5051155@kernel.org> <2c1afef7-fed9-4685-bf07-b9f3d44a0077@linux.dev> From: Krzysztof Kozlowski Content-Language: en-US Autocrypt: addr=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1hHFVKmvl3VBHIsBv0oDcsQWXqY+NaFahT0lRPjYtrTa1v3tem/ JoFzZ4B0p27K+qQCF2R96hVvuEyjzBmdq2esyE6zIqftdo4MOJho8uctOiWbwNNq2U9pPWmu 4vXVFBYIGmpyNPYzRm0QPwARAQABwsF8BBgBCgAmAhsMFiEEm9B+DgxR+NWWd7dUG5NDfTtB YpsFAmA872oFCRRflLYACgkQG5NDfTtBYpvScw/9GrqBrVLuJoJ52qBBKUBDo4E+5fU1bjt0 Gv0nh/hNJuecuRY6aemU6HOPNc2t8QHMSvwbSF+Vp9ZkOvrM36yUOufctoqON+wXrliEY0J4 ksR89ZILRRAold9Mh0YDqEJc1HmuxYLJ7lnbLYH1oui8bLbMBM8S2Uo9RKqV2GROLi44enVt vdrDvo+CxKj2K+d4cleCNiz5qbTxPUW/cgkwG0lJc4I4sso7l4XMDKn95c7JtNsuzqKvhEVS oic5by3fbUnuI0cemeizF4QdtX2uQxrP7RwHFBd+YUia7zCcz0//rv6FZmAxWZGy5arNl6Vm lQqNo7/Poh8WWfRS+xegBxc6hBXahpyUKphAKYkah+m+I0QToCfnGKnPqyYIMDEHCS/RfqA5 t8F+O56+oyLBAeWX7XcmyM6TGeVfb+OZVMJnZzK0s2VYAuI0Rl87FBFYgULdgqKV7R7WHzwD uZwJCLykjad45hsWcOGk3OcaAGQS6NDlfhM6O9aYNwGL6tGt/6BkRikNOs7VDEa4/HlbaSJo 7FgndGw1kWmkeL6oQh7wBvYll2buKod4qYntmNKEicoHGU+x91Gcan8mCoqhJkbqrL7+nXG2 5Q/GS5M9RFWS+nYyJh+c3OcfKqVcZQNANItt7+ULzdNJuhvTRRdC3g9hmCEuNSr+CLMdnRBY fv0= In-Reply-To: <2c1afef7-fed9-4685-bf07-b9f3d44a0077@linux.dev> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 26/08/2024 07:47, Aradhya Bhatia wrote: > Hi Krzysztof, > > Thank you for the reviewing the patches. > > > On 7/21/24 21:06, Krzysztof Kozlowski wrote: >> On 16/07/2024 10:42, Aradhya Bhatia wrote: >>> The OLDI (transmitters) TXes do not have registers of their own, and are >>> dependent on the source video-ports from the DSS to provide >>> configuration data. This hardware doesn't directly sit on the internal >>> bus of the SoC, but does so via the DSS. Hence, the OLDI TXes are >>> supposed to be child nodes under the DSS, and not independent devices. >>> >>> Two of the OLDI TXes can function in tandem to output dual-link OLDI >>> output, or cloned single-link outputs. In these cases, one OLDI will be >>> the primary OLDI, and the other one, a companion. >>> >>> The OLDI functionality is further supported by a system-control module, >>> which contains a few registers to control OLDI IO power and >>> characteristics. >>> >>> Add devicetree binding schema for AM625 OLDI TXes. >>> >>> Signed-off-by: Aradhya Bhatia >>> --- >>> .../bindings/display/ti/ti,am625-oldi.yaml | 153 ++++++++++++++++++ >>> MAINTAINERS | 1 + >>> 2 files changed, 154 insertions(+) >>> create mode 100644 Documentation/devicetree/bindings/display/ti/ti,am625-oldi.yaml >>> >>> diff --git a/Documentation/devicetree/bindings/display/ti/ti,am625-oldi.yaml b/Documentation/devicetree/bindings/display/ti/ti,am625-oldi.yaml >>> new file mode 100644 >>> index 000000000000..0a96e600bc0b >>> --- /dev/null >>> +++ b/Documentation/devicetree/bindings/display/ti/ti,am625-oldi.yaml >>> @@ -0,0 +1,153 @@ >>> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) >>> +%YAML 1.2 >>> +--- >>> +$id: http://devicetree.org/schemas/display/ti/ti,am625-oldi.yaml# >>> +$schema: http://devicetree.org/meta-schemas/core.yaml# >>> + >>> +title: Texas Instruments AM625 OLDI Transmitter >>> + >>> +maintainers: >>> + - Tomi Valkeinen >>> + - Aradhya Bhatia >>> + >>> +description: | >> >> Do not need '|' unless you need to preserve formatting. > > Okay! > >> >>> + The AM625 TI Keystone OpenLDI transmitter (OLDI TX) supports serialized RGB >>> + pixel data transmission between host and flat panel display over LVDS (Low >>> + Voltage Differential Sampling) interface. The OLDI TX consists of 7-to-1 data >>> + serializers, and 4-data and 1-clock LVDS outputs. It supports the LVDS output >>> + formats "jeida-18", "jeida-24" and "vesa-18", and can accept 24-bit RGB or >>> + padded and un-padded 18-bit RGB bus formats as input. >>> + >>> +properties: >>> + reg: >>> + maxItems: 1 >>> + >> >> How does it even work without compatible? How is this schema selected? >> If by part of your next patch, then this is not a proper split - this >> patch itself is noop. Squash the patches. >> > > Yes, it is supposed to be picked like the next patch does it. I can > squash these both. > >>> + clocks: >>> + maxItems: 1 >>> + description: serial clock input for the OLDI transmitters >>> + >>> + clock-names: >>> + const: s_clk >> >> Drop _clk or name it correctly. > > Alright! > >> >>> + >>> + ti,companion-oldi: >>> + $ref: /schemas/types.yaml#/definitions/phandle >>> + description: >>> + phandle to companion OLDI transmitter. This property is mandatory for the >>> + primarty OLDI TX if the OLDI TXes are expected to work either in dual-lvds >>> + mode or in clone mode. This property should point to the secondary OLDI >>> + TX. >>> + >>> + ti,secondary-oldi: >>> + type: boolean >>> + description: Boolean property to mark an OLDI TX as secondary node. >> >> Why? Lack companion tells it, doesn't it? > > A lack of companion doesn't mean secondary-OLDI automatically, actually. > > There is also a possible configuration where 2 OLDI TXes could be > individually connected to 2 different sources => 2x single Link > configuration. The OLDI TXes would then work independently. You are responding for something month old. I am not in the context anymore. Probably you miss proper graphs here, not such property. > >> >>> + >>> + ti,oldi-io-ctrl: >>> + $ref: /schemas/types.yaml#/definitions/phandle >>> + description: >>> + phandle to syscon device node mapping OLDI IO_CTRL registers found in the >>> + control MMR region. This property is needed for OLDI interface to work. >> >> "This property is needed for OLDI interface to work." tells nothing. >> Everything is needed for everything to work. Be specific. >> > > Yes! Will fix this. > >>> + >>> + ports: >>> + $ref: /schemas/graph.yaml#/properties/ports >>> + >>> + properties: >>> + port@0: >>> + $ref: /schemas/graph.yaml#/properties/port >>> + description: Parallel RGB input port >>> + >>> + port@1: >>> + $ref: /schemas/graph.yaml#/properties/port >>> + description: LVDS output port >>> + >>> + required: >>> + - port@0 >>> + - port@1 >>> + >>> +allOf: >>> + - if: >>> + properties: >>> + ti,secondary-oldi: true >> >> This does not work... Test your schema. >> > > I tested again just now. At least the schema check didn't report any > error. I used the v2024.05 dtschema too. No, test your condition. Come with DTS with exercises this if. You will see this DOES NOT WORK. This is just no-op, does not perform any useful work. So test the code that it actually performs what you want it to do. > > This github gist[0] captures all details of this test. > > Could you instead please elaborate what maybe wrong here, and I will try > to fix that. Look at example-schema or any of my talks with useful references. > > >>> + then: >>> + properties: >>> + ti,companion-oldi: false >>> + ti,oldi-io-ctrl: false >>> + clocks: false >>> + clock-names: false >>> + >>> + else: >>> + required: >>> + - ti,oldi-io-ctrl >>> + - clocks >>> + - clock-names >>> + >>> +required: >>> + - reg >>> + - ports >>> + >>> +additionalProperties: false >>> + >>> +examples: >>> + - | >>> + #include >>> + >>> + oldi_txes { >> >> No underscores in node names. >> >> Node names should be generic. See also an explanation and list of >> examples (not exhaustive) in DT specification: >> https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation > > Right. Will make the name generic. > >> >> >>> + #address-cells = <1>; >>> + #size-cells = <0>; >>> + oldi: oldi@0 { >> What is the "reg" for? > > The reg is for indexing purposes so that the driver can distinguish > between which OLDI TX is under question. Since, the syscon controller > has different power control registers and bits for different OLDIs - its > important for the driver to be able to tell one from another. Again, not sure, not in context. Patch is not even in the inbox anymore. Best regards, Krzysztof