Message ID | 20230809165752.46133-1-afd@ti.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c44e:0:b0:3f2:4152:657d with SMTP id w14csp3017219vqr; Wed, 9 Aug 2023 12:13:12 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGPpc1xKZgTxDQLGGjgfD1i/mu2+uLE6MpttQrXFqREyxDLfnQ/DY/5DdHiGf5Y43EXuXLm X-Received: by 2002:a17:906:53d6:b0:993:22a2:8158 with SMTP id p22-20020a17090653d600b0099322a28158mr4773ejo.61.1691608392151; Wed, 09 Aug 2023 12:13:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691608392; cv=none; d=google.com; s=arc-20160816; b=DoRGkv4+lcB95HyFOUd1DcdBqZCAlELOTfuIqyDUKwo8v8dqC5/yBnSLYlSewJnVc7 ZYeoJbo7lQQyuPxSZ6RqI0egt3kuCnxXvTdcgBY5ybe5YpU2BNqPcRgE3bKeHBv6ySvH vKwinUlfF+MHYz5HAZN4GAmGsLz+Bw3riy9w8XoZ/662ThJbesjTNFH4GQy3lGhYIBLP j1UwyoyeTLPrucFv/j6qE6jAhvrfPIcXPaOCZMP1tgxQegtFTb5ktZTXJGLdq1ABxqIM CzFk+Jsa3dAJV9fQdhfK7RIImFm+qRm/5hLZLsKp/C7zmr7YVr0aVmPTPhEE8/TKEMGr +sfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=9vOZa3nHlwdIplk+7X097P36xJ/bMu8wt3cevAMYPwg=; fh=8pFCDClKKTv3TWPySeUKtQydpFZOHVQXHrTKWef88/Q=; b=XJxZIFS7KyjK6ZkyVPPmV2fb5gi+4d8IhxVEOgvsAtoyyNkz6jlv2EPCI6Z78iq5Ae ZIUoOKtbHR0jm2lRn2os//r9UvEDgW0G9q7KwAWgth5HEPVRDgazFx/J/i61sm4NLnsw hSFfW+op/1Gd1YLDp8gG++ymqwn7kBvLDHx9VwGlgFmE58ZNiP0LwHb8L/bHOSpE4QUb azio2BELILAqxOiKDBhFR1Uwx+NrQipaKDoqI/Zgk+Bx1Hxku6Ep9KJjSmoCjuGfZcvk NxNPPXtAQr3ubTtcYXpLIoEXYJ6PLtEihyZi4ZWH1S15jMFeSJqhNFwhIHLeVEeq74aW fvZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=sEZ6kRNW; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qc27-20020a170906d8bb00b0099b5445ceb7si9160124ejb.614.2023.08.09.12.12.47; Wed, 09 Aug 2023 12:13:12 -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=@ti.com header.s=ti-com-17Q1 header.b=sEZ6kRNW; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232122AbjHIQ6H (ORCPT <rfc822;craechal@gmail.com> + 99 others); Wed, 9 Aug 2023 12:58:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50908 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232072AbjHIQ6G (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 9 Aug 2023 12:58:06 -0400 Received: from lelv0143.ext.ti.com (lelv0143.ext.ti.com [198.47.23.248]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F08601FCC; Wed, 9 Aug 2023 09:58:04 -0700 (PDT) Received: from lelv0266.itg.ti.com ([10.180.67.225]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 379Gvs1Q105940; Wed, 9 Aug 2023 11:57:54 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1691600274; bh=9vOZa3nHlwdIplk+7X097P36xJ/bMu8wt3cevAMYPwg=; h=From:To:CC:Subject:Date; b=sEZ6kRNWS4FaLJ88Bbq0G2GwGyWbDApIUc8NTfYdiIeF0iXL/ONlXUsGm7hUlQnmM ac2kCQJMYpJqF2GAHzz2glv1ymEbekU5eptPiVvnhFePTFkamN/2NL99XWVRptfrSq imRdJqzkv3i+sxBuVf8V3RmESGNT3ihu8rFQE/Z0= Received: from DLEE107.ent.ti.com (dlee107.ent.ti.com [157.170.170.37]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 379Gvs8C052242 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 9 Aug 2023 11:57:54 -0500 Received: from DLEE112.ent.ti.com (157.170.170.23) by DLEE107.ent.ti.com (157.170.170.37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Wed, 9 Aug 2023 11:57:54 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DLEE112.ent.ti.com (157.170.170.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Wed, 9 Aug 2023 11:57:54 -0500 Received: from lelv0327.itg.ti.com (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id 379Gvris023520; Wed, 9 Aug 2023 11:57:53 -0500 From: Andrew Davis <afd@ti.com> To: Lee Jones <lee@kernel.org>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Conor Dooley <conor+dt@kernel.org>, Nishanth Menon <nm@ti.com>, Vignesh Raghavendra <vigneshr@ti.com>, Tero Kristo <kristo@kernel.org>, Aradhya Bhatia <a-bhatia1@ti.com> CC: <devicetree@vger.kernel.org>, <linux-arm-kernel@lists.infradead.org>, <linux-kernel@vger.kernel.org>, Andrew Davis <afd@ti.com> Subject: [PATCH 1/2] dt-bindings: mfd: syscon: Add ti,dss-oldi-io-ctrl compatible Date: Wed, 9 Aug 2023 11:57:51 -0500 Message-ID: <20230809165752.46133-1-afd@ti.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,SPF_PASS,URIBL_BLOCKED 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773779960960810919 X-GMAIL-MSGID: 1773779960960810919 |
Series |
[1/2] dt-bindings: mfd: syscon: Add ti,dss-oldi-io-ctrl compatible
|
|
Commit Message
Andrew Davis
Aug. 9, 2023, 4:57 p.m. UTC
Add TI DSS OLDI-IO control registers compatible. This is a region of 5
32bit registers found in the TI AM65 CTRL_MMR0 register space[0]. They
are used to control the characteristics of the OLDI DATA/CLK IO as needed
by the DSS display controller node.
[0] https://www.ti.com/lit/pdf/spruid7
Signed-off-by: Andrew Davis <afd@ti.com>
---
Documentation/devicetree/bindings/mfd/syscon.yaml | 1 +
1 file changed, 1 insertion(+)
Comments
Hi Andrew, Thank you for quickly whipping up these patches! =) On 09-Aug-23 22:27, Andrew Davis wrote: > Add TI DSS OLDI-IO control registers compatible. This is a region of 5 > 32bit registers found in the TI AM65 CTRL_MMR0 register space[0]. They > are used to control the characteristics of the OLDI DATA/CLK IO as needed > by the DSS display controller node. As long as the driver takes care of it, we can reuse the same compatible even when OLDI IO Ctrl registers change from SoC to SoC, (in this case, AM65 to AM62), right? Regards Aradhya > > [0] https://www.ti.com/lit/pdf/spruid7 > > Signed-off-by: Andrew Davis <afd@ti.com> > --- > Documentation/devicetree/bindings/mfd/syscon.yaml | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/Documentation/devicetree/bindings/mfd/syscon.yaml b/Documentation/devicetree/bindings/mfd/syscon.yaml > index 8103154bbb529..5029abd6d6411 100644 > --- a/Documentation/devicetree/bindings/mfd/syscon.yaml > +++ b/Documentation/devicetree/bindings/mfd/syscon.yaml > @@ -69,6 +69,7 @@ properties: > - rockchip,rk3588-qos > - rockchip,rv1126-qos > - starfive,jh7100-sysmain > + - ti,dss-oldi-io-ctrl > > - const: syscon >
On 8/9/23 12:39 PM, Aradhya Bhatia wrote: > Hi Andrew, > > Thank you for quickly whipping up these patches! =) > > On 09-Aug-23 22:27, Andrew Davis wrote: >> Add TI DSS OLDI-IO control registers compatible. This is a region of 5 >> 32bit registers found in the TI AM65 CTRL_MMR0 register space[0]. They >> are used to control the characteristics of the OLDI DATA/CLK IO as needed >> by the DSS display controller node. > > As long as the driver takes care of it, we can reuse the same compatible > even when OLDI IO Ctrl registers change from SoC to SoC, (in this case, > AM65 to AM62), right? > That depends, is the register space still "compatible" with the AM65 version of this space? If not then we would want to qualify these with their SoC versions. A quick check of the documentation shows the register space is still 5 registers, 4 DATA and 1 CLK. The contents are different though, but since this compatible string is not used to match with a driver that would care (that is handled by the DSS node which does have different compatibles for each device), I'm actually not sure. Guess we can leave that decision to the DT binding maintainers.. Andrew > Regards > Aradhya > >> >> [0] https://www.ti.com/lit/pdf/spruid7 >> >> Signed-off-by: Andrew Davis <afd@ti.com> >> --- >> Documentation/devicetree/bindings/mfd/syscon.yaml | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/Documentation/devicetree/bindings/mfd/syscon.yaml b/Documentation/devicetree/bindings/mfd/syscon.yaml >> index 8103154bbb529..5029abd6d6411 100644 >> --- a/Documentation/devicetree/bindings/mfd/syscon.yaml >> +++ b/Documentation/devicetree/bindings/mfd/syscon.yaml >> @@ -69,6 +69,7 @@ properties: >> - rockchip,rk3588-qos >> - rockchip,rv1126-qos >> - starfive,jh7100-sysmain >> + - ti,dss-oldi-io-ctrl >> >> - const: syscon >>
On 09-Aug-23 23:29, Andrew Davis wrote: > On 8/9/23 12:39 PM, Aradhya Bhatia wrote: >> Hi Andrew, >> >> Thank you for quickly whipping up these patches! =) >> >> On 09-Aug-23 22:27, Andrew Davis wrote: >>> Add TI DSS OLDI-IO control registers compatible. This is a region of 5 >>> 32bit registers found in the TI AM65 CTRL_MMR0 register space[0]. They >>> are used to control the characteristics of the OLDI DATA/CLK IO as >>> needed >>> by the DSS display controller node. >> >> As long as the driver takes care of it, we can reuse the same compatible >> even when OLDI IO Ctrl registers change from SoC to SoC, (in this case, >> AM65 to AM62), right? >> > > That depends, is the register space still "compatible" with the AM65 > version of this space? If not then we would want to qualify these > with their SoC versions. It is certainly not compatible. More on this below. > > A quick check of the documentation shows the register space is still > 5 registers, 4 DATA and 1 CLK. The contents are different though, but > since this compatible string is not used to match with a driver that > would care (that is handled by the DSS node which does have different > compatibles for each device), I'm actually not sure. Guess we can leave > that decision to the DT binding maintainers.. Exactly. The DSS driver in our, as you like to call, evil-vendor-tree uses the compatible information to decide which register offsets to write to, and what to write. On the register compatibility situation... AM62 OLDI IO Ctrl has, in total, 12 registers (as opposed to 5 in AM65). There are 4 Data and 1 Clk registers (per OLDI). And there are 2 OLDI transmitters in AM62. However, their contents are different as you noted. There are 2 more registers in AM62 (unlike AM65), that control power-down and loop-back. And it is the power-down register, that will be primarily used by the driver. Regards Aradhya > > Andrew > >> Regards >> Aradhya >> >>> >>> [0] https://www.ti.com/lit/pdf/spruid7 >>> >>> Signed-off-by: Andrew Davis <afd@ti.com> >>> --- >>> Documentation/devicetree/bindings/mfd/syscon.yaml | 1 + >>> 1 file changed, 1 insertion(+) >>> >>> diff --git a/Documentation/devicetree/bindings/mfd/syscon.yaml >>> b/Documentation/devicetree/bindings/mfd/syscon.yaml >>> index 8103154bbb529..5029abd6d6411 100644 >>> --- a/Documentation/devicetree/bindings/mfd/syscon.yaml >>> +++ b/Documentation/devicetree/bindings/mfd/syscon.yaml >>> @@ -69,6 +69,7 @@ properties: >>> - rockchip,rk3588-qos >>> - rockchip,rv1126-qos >>> - starfive,jh7100-sysmain >>> + - ti,dss-oldi-io-ctrl >>> - const: syscon >>>
On Thu, Aug 10, 2023 at 12:30:03AM +0530, Aradhya Bhatia wrote: > > > On 09-Aug-23 23:29, Andrew Davis wrote: > > On 8/9/23 12:39 PM, Aradhya Bhatia wrote: > >> Hi Andrew, > >> > >> Thank you for quickly whipping up these patches! =) > >> > >> On 09-Aug-23 22:27, Andrew Davis wrote: > >>> Add TI DSS OLDI-IO control registers compatible. This is a region of 5 > >>> 32bit registers found in the TI AM65 CTRL_MMR0 register space[0]. They > >>> are used to control the characteristics of the OLDI DATA/CLK IO as > >>> needed > >>> by the DSS display controller node. > >> > >> As long as the driver takes care of it, we can reuse the same compatible > >> even when OLDI IO Ctrl registers change from SoC to SoC, (in this case, > >> AM65 to AM62), right? > >> > > > > That depends, is the register space still "compatible" with the AM65 > > version of this space? If not then we would want to qualify these > > with their SoC versions. Even if they are compatible, having soc-specific compatibles with a fallback to the common oldi compatible string would be ideal. > It is certainly not compatible. More on this below. But as they're not compatible, that's kinda moot anyway. > > A quick check of the documentation shows the register space is still > > 5 registers, 4 DATA and 1 CLK. The contents are different though, but > > since this compatible string is not used to match with a driver that > > would care (that is handled by the DSS node which does have different > > compatibles for each device), I'm actually not sure. > > Guess we can leave > > that decision to the DT binding maintainers.. I'm not 100% sure what this decision actually is. Could you elaborate? > Exactly. The DSS driver in our, as you like to call, evil-vendor-tree > uses the compatible information to decide which register offsets to > write to, and what to write. > > > On the register compatibility situation... > > AM62 OLDI IO Ctrl has, in total, 12 registers (as opposed to 5 in AM65). > > There are 4 Data and 1 Clk registers (per OLDI). And there are 2 OLDI > transmitters in AM62. However, their contents are different as you > noted. > > There are 2 more registers in AM62 (unlike AM65), that control > power-down and loop-back. And it is the power-down register, that will > be primarily used by the driver. > >>> [0] https://www.ti.com/lit/pdf/spruid7 > >>> > >>> Signed-off-by: Andrew Davis <afd@ti.com> > >>> --- > >>> Documentation/devicetree/bindings/mfd/syscon.yaml | 1 + > >>> 1 file changed, 1 insertion(+) > >>> > >>> diff --git a/Documentation/devicetree/bindings/mfd/syscon.yaml > >>> b/Documentation/devicetree/bindings/mfd/syscon.yaml > >>> index 8103154bbb529..5029abd6d6411 100644 > >>> --- a/Documentation/devicetree/bindings/mfd/syscon.yaml > >>> +++ b/Documentation/devicetree/bindings/mfd/syscon.yaml > >>> @@ -69,6 +69,7 @@ properties: > >>> - rockchip,rk3588-qos > >>> - rockchip,rv1126-qos > >>> - starfive,jh7100-sysmain > >>> + - ti,dss-oldi-io-ctrl So it sounds like this compatible, that appears to be generic, should instead be soc-specific as the register layout is different between SoCs? Apologies if I have misunderstood. Thanks, Conor. > >>> - const: syscon > >>> >
On 8/9/23 4:31 PM, Conor Dooley wrote: > On Thu, Aug 10, 2023 at 12:30:03AM +0530, Aradhya Bhatia wrote: >> >> >> On 09-Aug-23 23:29, Andrew Davis wrote: >>> On 8/9/23 12:39 PM, Aradhya Bhatia wrote: >>>> Hi Andrew, >>>> >>>> Thank you for quickly whipping up these patches! =) >>>> >>>> On 09-Aug-23 22:27, Andrew Davis wrote: >>>>> Add TI DSS OLDI-IO control registers compatible. This is a region of 5 >>>>> 32bit registers found in the TI AM65 CTRL_MMR0 register space[0]. They >>>>> are used to control the characteristics of the OLDI DATA/CLK IO as >>>>> needed >>>>> by the DSS display controller node. >>>> >>>> As long as the driver takes care of it, we can reuse the same compatible >>>> even when OLDI IO Ctrl registers change from SoC to SoC, (in this case, >>>> AM65 to AM62), right? >>>> >>> >>> That depends, is the register space still "compatible" with the AM65 >>> version of this space? If not then we would want to qualify these >>> with their SoC versions. > > Even if they are compatible, having soc-specific compatibles with a > fallback to the common oldi compatible string would be ideal. > >> It is certainly not compatible. More on this below. > > But as they're not compatible, that's kinda moot anyway. > >>> A quick check of the documentation shows the register space is still >>> 5 registers, 4 DATA and 1 CLK. The contents are different though, but >>> since this compatible string is not used to match with a driver that >>> would care (that is handled by the DSS node which does have different >>> compatibles for each device), I'm actually not sure. > >>> Guess we can leave >>> that decision to the DT binding maintainers.. > > I'm not 100% sure what this decision actually is. Could you elaborate? > I was not exactly aware of the extent of the incompatibilities. If they are not compatible, then there is really no decision needed, they must have different strings. > >> Exactly. The DSS driver in our, as you like to call, evil-vendor-tree >> uses the compatible information to decide which register offsets to >> write to, and what to write. >> >> >> On the register compatibility situation... >> >> AM62 OLDI IO Ctrl has, in total, 12 registers (as opposed to 5 in AM65). >> >> There are 4 Data and 1 Clk registers (per OLDI). And there are 2 OLDI >> transmitters in AM62. However, their contents are different as you >> noted. >> >> There are 2 more registers in AM62 (unlike AM65), that control >> power-down and loop-back. And it is the power-down register, that will >> be primarily used by the driver. > >>>>> [0] https://www.ti.com/lit/pdf/spruid7 >>>>> >>>>> Signed-off-by: Andrew Davis <afd@ti.com> >>>>> --- >>>>> Documentation/devicetree/bindings/mfd/syscon.yaml | 1 + >>>>> 1 file changed, 1 insertion(+) >>>>> >>>>> diff --git a/Documentation/devicetree/bindings/mfd/syscon.yaml >>>>> b/Documentation/devicetree/bindings/mfd/syscon.yaml >>>>> index 8103154bbb529..5029abd6d6411 100644 >>>>> --- a/Documentation/devicetree/bindings/mfd/syscon.yaml >>>>> +++ b/Documentation/devicetree/bindings/mfd/syscon.yaml >>>>> @@ -69,6 +69,7 @@ properties: >>>>> - rockchip,rk3588-qos >>>>> - rockchip,rv1126-qos >>>>> - starfive,jh7100-sysmain >>>>> + - ti,dss-oldi-io-ctrl > > So it sounds like this compatible, that appears to be generic, should > instead be soc-specific as the register layout is different between > SoCs? > Sounds like it, I'll go and make this soc-specific. Thanks, Andrew > Apologies if I have misunderstood. > > Thanks, > Conor. > >>>>> - const: syscon >>>>> >>
diff --git a/Documentation/devicetree/bindings/mfd/syscon.yaml b/Documentation/devicetree/bindings/mfd/syscon.yaml index 8103154bbb529..5029abd6d6411 100644 --- a/Documentation/devicetree/bindings/mfd/syscon.yaml +++ b/Documentation/devicetree/bindings/mfd/syscon.yaml @@ -69,6 +69,7 @@ properties: - rockchip,rk3588-qos - rockchip,rv1126-qos - starfive,jh7100-sysmain + - ti,dss-oldi-io-ctrl - const: syscon