Message ID | 20230412084540.295411-2-changhuang.liang@starfivetech.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp180839vqo; Wed, 12 Apr 2023 02:16:47 -0700 (PDT) X-Google-Smtp-Source: AKy350aoJ1rC/NmwDhieqQog1bR6iTVAmjOqzusbe8PTVXUlu7hNtGtWxS/anEuLzHUMWuGrk8mr X-Received: by 2002:a17:906:7309:b0:94b:869b:267 with SMTP id di9-20020a170906730900b0094b869b0267mr1544732ejc.28.1681291007218; Wed, 12 Apr 2023 02:16:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681291007; cv=none; d=google.com; s=arc-20160816; b=N4UsthDHICEAUQ9OS9WkaDUqeAqnnCPNzElD5pLlePQJw9f3Pwg9AmvifJjA23CWjX oFa3KfMurJ0ryNj+OfZjviCGVW94WV7jqIF/smWSe5hIso9xOavprLAX8BuDCMU98m2y hjYDt7zbvhnNK3/wfvdAPFq1uh55T9ppF/bUuZcVoZwHVA5INiiUBHBb40mMnhOLhFGM USCE+zCJFQQPK4k239l/wGZqhquLN6S6Rh+uyz5Rd27vVteKmTCosRNS7FQozMWkWvTR My9+YPwtottjY0dgjDVmJyzlnm30vC3WzH9Mv5xoxWCI/t4fj3IUeNNTRIGr5AWMjv+0 k+QQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=i+Cs9Q8UP9feGL6r9IqFAK71+PAcc3tUcbRyGEha9tc=; b=AKElqUrE35plpC8iRxIzbr6lqkNTkAuqgGfvuSIfKpQfvJfp+1LFrDC409O4Bd9+Xb a9Fb6eMvMmLZ+cXmZiydHpdSXdlBObTwCwbbbvCxWaJnnJdQJA8HyyQcgcYstqn7OtfA 8EuBKkpfGxhy3avJY41WULiClHWL0LLv2ygJMlfTbCTcatejpXTsrGn92vTaE/c+wDaY cTZC5B8uq84/IpUaatRnIqaHAs+QChHbNwyWaaeMRxaic2SoUByqSXp01JR/Pdw4907F 5WQp/nhCk5/WQsFHfKXqkNupHNBfKNNbCdAUTjSJxCTINyDjoABxMPimgiBLG+1OsIaV eFGg== ARC-Authentication-Results: i=1; mx.google.com; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p13-20020a1709066a8d00b0094a0ee39504si1230251ejr.1029.2023.04.12.02.16.23; Wed, 12 Apr 2023 02:16:47 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231220AbjDLIrI convert rfc822-to-8bit (ORCPT <rfc822;peter110.wang@gmail.com> + 99 others); Wed, 12 Apr 2023 04:47:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60434 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230353AbjDLIq6 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 12 Apr 2023 04:46:58 -0400 Received: from ex01.ufhost.com (ex01.ufhost.com [61.152.239.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4F7C393FD; Wed, 12 Apr 2023 01:46:36 -0700 (PDT) Received: from EXMBX165.cuchost.com (unknown [175.102.18.54]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "EXMBX165", Issuer "EXMBX165" (not verified)) by ex01.ufhost.com (Postfix) with ESMTP id 09DA424E1A4; Wed, 12 Apr 2023 16:45:43 +0800 (CST) Received: from EXMBX162.cuchost.com (172.16.6.72) by EXMBX165.cuchost.com (172.16.6.75) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Wed, 12 Apr 2023 16:45:42 +0800 Received: from ubuntu.localdomain (113.72.145.176) by EXMBX162.cuchost.com (172.16.6.72) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Wed, 12 Apr 2023 16:45:41 +0800 From: Changhuang Liang <changhuang.liang@starfivetech.com> To: Vinod Koul <vkoul@kernel.org>, Kishon Vijay Abraham I <kishon@kernel.org>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Emil Renner Berthing <kernel@esmil.dk>, Conor Dooley <conor@kernel.org>, Paul Walmsley <paul.walmsley@sifive.com>, Palmer Dabbelt <palmer@dabbelt.com>, Albert Ou <aou@eecs.berkeley.edu>, Philipp Zabel <p.zabel@pengutronix.de> CC: Jack Zhu <jack.zhu@starfivetech.com>, Changhuang Liang <changhuang.liang@starfivetech.com>, <linux-phy@lists.infradead.org>, <devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>, <linux-riscv@lists.infradead.org> Subject: [PATCH v4 1/3] dt-bindings: phy: Add starfive,jh7110-dphy-rx Date: Wed, 12 Apr 2023 01:45:38 -0700 Message-ID: <20230412084540.295411-2-changhuang.liang@starfivetech.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230412084540.295411-1-changhuang.liang@starfivetech.com> References: <20230412084540.295411-1-changhuang.liang@starfivetech.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [113.72.145.176] X-ClientProxiedBy: EXCAS066.cuchost.com (172.16.6.26) To EXMBX162.cuchost.com (172.16.6.72) X-YovoleRuleAgent: yovoleflag Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, 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: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762961399024410625?= X-GMAIL-MSGID: =?utf-8?q?1762961399024410625?= |
Series |
Add JH7110 MIPI DPHY RX support
|
|
Commit Message
Changhuang Liang
April 12, 2023, 8:45 a.m. UTC
StarFive SoCs like the jh7110 use a MIPI D-PHY RX controller based on
a M31 IP. Add a binding for it.
Signed-off-by: Changhuang Liang <changhuang.liang@starfivetech.com>
---
.../bindings/phy/starfive,jh7110-dphy-rx.yaml | 85 +++++++++++++++++++
1 file changed, 85 insertions(+)
create mode 100644 Documentation/devicetree/bindings/phy/starfive,jh7110-dphy-rx.yaml
Comments
On 12/04/2023 10:45, Changhuang Liang wrote: > StarFive SoCs like the jh7110 use a MIPI D-PHY RX controller based on > a M31 IP. Add a binding for it. So this is D-PHY? Or the other patch is D-PHY? The naming is quite confusing and your commit msgs are not helping here. Also the power domain phandle here adds to the confusion. > > Signed-off-by: Changhuang Liang <changhuang.liang@starfivetech.com> > --- > .../bindings/phy/starfive,jh7110-dphy-rx.yaml | 85 +++++++++++++++++++ > 1 file changed, 85 insertions(+) > create mode 100644 Documentation/devicetree/bindings/phy/starfive,jh7110-dphy-rx.yaml > > diff --git a/Documentation/devicetree/bindings/phy/starfive,jh7110-dphy-rx.yaml b/Documentation/devicetree/bindings/phy/starfive,jh7110-dphy-rx.yaml > new file mode 100644 > index 000000000000..5fb2f14af816 > --- /dev/null > +++ b/Documentation/devicetree/bindings/phy/starfive,jh7110-dphy-rx.yaml > @@ -0,0 +1,85 @@ > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/phy/starfive,jh7110-dphy-rx.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: StarFive SoC MIPI D-PHY Rx Controller > + > +maintainers: > + - Jack Zhu <jack.zhu@starfivetech.com> > + - Changhuang Liang <changhuang.liang@starfivetech.com> > + > +description: > + The StarFive SoC uses the MIPI CSI D-PHY based on M31 IP to transfer > + CSI camera data. > + > +properties: > + compatible: > + const: starfive,jh7110-dphy-rx > + > + reg: > + maxItems: 1 > + > + clocks: > + items: > + - description: config clock > + - description: reference clock > + - description: escape mode transmit clock > + > + clock-names: > + items: > + - const: cfg > + - const: ref > + - const: tx > + > + resets: > + items: > + - description: DPHY_HW reset > + - description: DPHY_B09_ALWAYS_ON reset > + > + power-domains: > + maxItems: 1 > + > + lane_maps: Why did this appear? Underscores are not allowed. It looks like you re-implement some standard property. > + $ref: /schemas/types.yaml#/definitions/uint8-array > + description: > + D-PHY rx controller physical lanes and logic lanes mapping table. > + items: > + - description: logic lane index point to physical lane clock lane 0 > + - description: logic lane index point to physical lane data lane 0 > + - description: logic lane index point to physical lane data lane 1 > + - description: logic lane index point to physical lane data lane 2 > + - description: logic lane index point to physical lane data lane 3 > + - description: logic lane index point to physical lane clock lane 1 > + Best regards, Krzysztof
On 2023/4/12 19:34, Krzysztof Kozlowski wrote: > On 12/04/2023 10:45, Changhuang Liang wrote: >> StarFive SoCs like the jh7110 use a MIPI D-PHY RX controller based on >> a M31 IP. Add a binding for it. > > So this is D-PHY? Or the other patch is D-PHY? The naming is quite > confusing and your commit msgs are not helping here. > > Also the power domain phandle here adds to the confusion. > Yes, this is DPHY, DPHY has rx and tx, and last version we are discussing that use power domain replace syscon: https://lore.kernel.org/all/5dc4ddc2-9d15-ebb2-38bc-8a544ca67e0d@starfivetech.com/ >> >> Signed-off-by: Changhuang Liang <changhuang.liang@starfivetech.com> >> --- >> .../bindings/phy/starfive,jh7110-dphy-rx.yaml | 85 +++++++++++++++++++ >> 1 file changed, 85 insertions(+) >> create mode 100644 Documentation/devicetree/bindings/phy/starfive,jh7110-dphy-rx.yaml >> [...] >> + >> + power-domains: >> + maxItems: 1 >> + >> + lane_maps: > > Why did this appear? Underscores are not allowed. It looks like you > re-implement some standard property. > Will change to lane-maps. Yes, according to Vinod advice, lane mapping table use device tree to parse makes sense. >> + $ref: /schemas/types.yaml#/definitions/uint8-array >> + description: >> + D-PHY rx controller physical lanes and logic lanes mapping table. >> + items: >> + - description: logic lane index point to physical lane clock lane 0 >> + - description: logic lane index point to physical lane data lane 0 >> + - description: logic lane index point to physical lane data lane 1 >> + - description: logic lane index point to physical lane data lane 2 >> + - description: logic lane index point to physical lane data lane 3 >> + - description: logic lane index point to physical lane clock lane 1 >> + > > > Best regards, > Krzysztof >
On 12/04/2023 14:42, Changhuang Liang wrote: > > > On 2023/4/12 19:34, Krzysztof Kozlowski wrote: >> On 12/04/2023 10:45, Changhuang Liang wrote: >>> StarFive SoCs like the jh7110 use a MIPI D-PHY RX controller based on >>> a M31 IP. Add a binding for it. >> >> So this is D-PHY? Or the other patch is D-PHY? The naming is quite >> confusing and your commit msgs are not helping here. >> >> Also the power domain phandle here adds to the confusion. >> > > Yes, this is DPHY, DPHY has rx and tx, and last version we are discussing that > use power domain replace syscon: > https://lore.kernel.org/all/5dc4ddc2-9d15-ebb2-38bc-8a544ca67e0d@starfivetech.com/ The other patch - DPHY PMU - is confusing. Instead of writing short commits, explain more. > >>> >>> Signed-off-by: Changhuang Liang <changhuang.liang@starfivetech.com> >>> --- >>> .../bindings/phy/starfive,jh7110-dphy-rx.yaml | 85 +++++++++++++++++++ >>> 1 file changed, 85 insertions(+) >>> create mode 100644 Documentation/devicetree/bindings/phy/starfive,jh7110-dphy-rx.yaml >>> > [...] >>> + >>> + power-domains: >>> + maxItems: 1 >>> + >>> + lane_maps: >> >> Why did this appear? Underscores are not allowed. It looks like you >> re-implement some standard property. >> > > Will change to lane-maps. > Yes, according to Vinod advice, lane mapping table use device tree > to parse makes sense. Hm, I have a feeling that I saw such property, so you should dig into existing and in-flight bindings. Best regards, Krzysztof
On 2023/4/13 0:55, Krzysztof Kozlowski wrote: > On 12/04/2023 14:42, Changhuang Liang wrote: >> >> >> On 2023/4/12 19:34, Krzysztof Kozlowski wrote: >>> On 12/04/2023 10:45, Changhuang Liang wrote: >>>> StarFive SoCs like the jh7110 use a MIPI D-PHY RX controller based on >>>> a M31 IP. Add a binding for it. >>> >>> So this is D-PHY? Or the other patch is D-PHY? The naming is quite >>> confusing and your commit msgs are not helping here. >>> >>> Also the power domain phandle here adds to the confusion. >>> >> >> Yes, this is DPHY, DPHY has rx and tx, and last version we are discussing that >> use power domain replace syscon: >> https://lore.kernel.org/all/5dc4ddc2-9d15-ebb2-38bc-8a544ca67e0d@starfivetech.com/ > > The other patch - DPHY PMU - is confusing. Instead of writing short > commits, explain more. > OK, I will add more commit message in DPHY PMU dt-binding patch, for example: dt-bindings: power: Add JH7110 DPHY PMU support. Add DPHY PMU for StarFive JH7110 SoC, it can be used to turn on/off DPHY rx/tx power switch, and it don't need the reg and interrupt properties. I think this commit message will helpful for you to distinguish them. >> >>>> >>>> Signed-off-by: Changhuang Liang <changhuang.liang@starfivetech.com> >>>> --- >>>> .../bindings/phy/starfive,jh7110-dphy-rx.yaml | 85 +++++++++++++++++++ >>>> 1 file changed, 85 insertions(+) >>>> create mode 100644 Documentation/devicetree/bindings/phy/starfive,jh7110-dphy-rx.yaml >>>> >> [...] >>>> + >>>> + power-domains: >>>> + maxItems: 1 >>>> + >>>> + lane_maps: >>> >>> Why did this appear? Underscores are not allowed. It looks like you >>> re-implement some standard property. >>> >> >> Will change to lane-maps. >> Yes, according to Vinod advice, lane mapping table use device tree >> to parse makes sense. > > Hm, I have a feeling that I saw such property, so you should dig into > existing and in-flight bindings. > > Best regards, > Krzysztof >
On 2023/4/13 0:55, Krzysztof Kozlowski wrote: > On 12/04/2023 14:42, Changhuang Liang wrote: [...] >>>> >>>> Signed-off-by: Changhuang Liang <changhuang.liang@starfivetech.com> >>>> --- >>>> .../bindings/phy/starfive,jh7110-dphy-rx.yaml | 85 +++++++++++++++++++ >>>> 1 file changed, 85 insertions(+) >>>> create mode 100644 Documentation/devicetree/bindings/phy/starfive,jh7110-dphy-rx.yaml >>>> >> [...] >>>> + >>>> + power-domains: >>>> + maxItems: 1 >>>> + >>>> + lane_maps: >>> >>> Why did this appear? Underscores are not allowed. It looks like you >>> re-implement some standard property. >>> >> >> Will change to lane-maps. >> Yes, according to Vinod advice, lane mapping table use device tree >> to parse makes sense. > > Hm, I have a feeling that I saw such property, so you should dig into > existing and in-flight bindings. > > Best regards, > Krzysztof > A standard property? Like "clocks" or "resets"?
On 13/04/2023 04:34, Changhuang Liang wrote: >>>>> + lane_maps: >>>> >>>> Why did this appear? Underscores are not allowed. It looks like you >>>> re-implement some standard property. >>>> >>> >>> Will change to lane-maps. >>> Yes, according to Vinod advice, lane mapping table use device tree >>> to parse makes sense. >> >> Hm, I have a feeling that I saw such property, so you should dig into >> existing and in-flight bindings. >> >> Best regards, >> Krzysztof >> > > A standard property? Like "clocks" or "resets"? Like lane-polarities now submitted to one MIPI. Anyway it does not look like a property of a board. You said it is fixed per SoC, so it should be implied from the compatible. Otherwise please explain in description and provide some rationale. Best regards, Krzysztof
On 2023/4/13 16:41, Krzysztof Kozlowski wrote: > On 13/04/2023 04:34, Changhuang Liang wrote: >>>>>> + lane_maps: >>>>> >>>>> Why did this appear? Underscores are not allowed. It looks like you >>>>> re-implement some standard property. >>>>> >>>> >>>> Will change to lane-maps. >>>> Yes, according to Vinod advice, lane mapping table use device tree >>>> to parse makes sense. >>> >>> Hm, I have a feeling that I saw such property, so you should dig into >>> existing and in-flight bindings. >>> >>> Best regards, >>> Krzysztof >>> >> >> A standard property? Like "clocks" or "resets"? > > Like lane-polarities now submitted to one MIPI. > > Anyway it does not look like a property of a board. You said it is fixed > per SoC, so it should be implied from the compatible. Otherwise please > explain in description and provide some rationale. > > Best regards, > Krzysztof > This property is the only one used for this IP, I have compared this IP with other DPHY rx module, DPHY modules form the other manufacturers not have this configure. And we also have a SoC called JH7100. It DPHY rx module is the same as JH7110. But we don't do the upstream work on it. If it use this lane-maps will be configure as "lane_maps = /bits/ 8 <0 1 2 3 4 5>;". So what do you think? Can this configure be implemented into a property?
On 13/04/2023 11:02, Changhuang Liang wrote: > > > On 2023/4/13 16:41, Krzysztof Kozlowski wrote: >> On 13/04/2023 04:34, Changhuang Liang wrote: >>>>>>> + lane_maps: >>>>>> >>>>>> Why did this appear? Underscores are not allowed. It looks like you >>>>>> re-implement some standard property. >>>>>> >>>>> >>>>> Will change to lane-maps. >>>>> Yes, according to Vinod advice, lane mapping table use device tree >>>>> to parse makes sense. >>>> >>>> Hm, I have a feeling that I saw such property, so you should dig into >>>> existing and in-flight bindings. >>>> >>>> Best regards, >>>> Krzysztof >>>> >>> >>> A standard property? Like "clocks" or "resets"? >> >> Like lane-polarities now submitted to one MIPI. >> >> Anyway it does not look like a property of a board. You said it is fixed >> per SoC, so it should be implied from the compatible. Otherwise please >> explain in description and provide some rationale. >> >> Best regards, >> Krzysztof >> > > This property is the only one used for this IP, I have compared this IP with > other DPHY rx module, DPHY modules form the other manufacturers not have this > configure. > And we also have a SoC called JH7100. It DPHY rx module is the same as JH7110. > But we don't do the upstream work on it. If it use this lane-maps will be > configure as "lane_maps = /bits/ 8 <0 1 2 3 4 5>;". And JH7100 is different SoC, so you have different compatible. Again - is this board specific? If not, looks like SoC specific, thus imply it from compatible. Best regards, Krzysztof
On 2023/4/17 1:29, Krzysztof Kozlowski wrote: > On 13/04/2023 11:02, Changhuang Liang wrote: >> >> >> On 2023/4/13 16:41, Krzysztof Kozlowski wrote: >>> On 13/04/2023 04:34, Changhuang Liang wrote: >>>>>>>> + lane_maps: >>>>>>> >>>>>>> Why did this appear? Underscores are not allowed. It looks like you >>>>>>> re-implement some standard property. >>>>>>> >>>>>> >>>>>> Will change to lane-maps. >>>>>> Yes, according to Vinod advice, lane mapping table use device tree >>>>>> to parse makes sense. >>>>> >>>>> Hm, I have a feeling that I saw such property, so you should dig into >>>>> existing and in-flight bindings. >>>>> >>>>> Best regards, >>>>> Krzysztof >>>>> >>>> >>>> A standard property? Like "clocks" or "resets"? >>> >>> Like lane-polarities now submitted to one MIPI. >>> >>> Anyway it does not look like a property of a board. You said it is fixed >>> per SoC, so it should be implied from the compatible. Otherwise please >>> explain in description and provide some rationale. >>> >>> Best regards, >>> Krzysztof >>> >> >> This property is the only one used for this IP, I have compared this IP with >> other DPHY rx module, DPHY modules form the other manufacturers not have this >> configure. >> And we also have a SoC called JH7100. It DPHY rx module is the same as JH7110. >> But we don't do the upstream work on it. If it use this lane-maps will be >> configure as "lane_maps = /bits/ 8 <0 1 2 3 4 5>;". > > And JH7100 is different SoC, so you have different compatible. Again - > is this board specific? If not, looks like SoC specific, thus imply it > from compatible. > > > Best regards, > Krzysztof > Hi, Vinod I agree with Krzysztof. What about your comments? Best regards, Changhuang
On Thu, Apr 13, 2023 at 10:41:23AM +0200, Krzysztof Kozlowski wrote: > On 13/04/2023 04:34, Changhuang Liang wrote: > >>>>> + lane_maps: > >>>> > >>>> Why did this appear? Underscores are not allowed. It looks like you > >>>> re-implement some standard property. > >>>> > >>> > >>> Will change to lane-maps. > >>> Yes, according to Vinod advice, lane mapping table use device tree > >>> to parse makes sense. > >> > >> Hm, I have a feeling that I saw such property, so you should dig into > >> existing and in-flight bindings. > >> > >> Best regards, > >> Krzysztof > >> > > > > A standard property? Like "clocks" or "resets"? > > Like lane-polarities now submitted to one MIPI. > data-lanes perhaps? Rob
On Tue, Apr 18, 2023 at 1:42 PM Rob Herring <robh@kernel.org> wrote: > > On Thu, Apr 13, 2023 at 10:41:23AM +0200, Krzysztof Kozlowski wrote: > > On 13/04/2023 04:34, Changhuang Liang wrote: > > >>>>> + lane_maps: > > >>>> > > >>>> Why did this appear? Underscores are not allowed. It looks like you > > >>>> re-implement some standard property. > > >>>> > > >>> > > >>> Will change to lane-maps. > > >>> Yes, according to Vinod advice, lane mapping table use device tree > > >>> to parse makes sense. > > >> > > >> Hm, I have a feeling that I saw such property, so you should dig into > > >> existing and in-flight bindings. > > >> > > >> Best regards, > > >> Krzysztof > > >> > > > > > > A standard property? Like "clocks" or "resets"? > > > > Like lane-polarities now submitted to one MIPI. > > > > data-lanes perhaps? Except that is for the controller's endpoint rather than the phy. Presumably if the controller knows the mapping, then it can tell the phy if it needs the information. IOW, don't just copy 'data-lanes' to the phy. Follow the normal patterns. Rob
On 2023/4/19 2:46, Rob Herring wrote: > On Tue, Apr 18, 2023 at 1:42 PM Rob Herring <robh@kernel.org> wrote: >> >> On Thu, Apr 13, 2023 at 10:41:23AM +0200, Krzysztof Kozlowski wrote: >>> On 13/04/2023 04:34, Changhuang Liang wrote: >>>>>>>> + lane_maps: >>>>>>> >>>>>>> Why did this appear? Underscores are not allowed. It looks like you >>>>>>> re-implement some standard property. >>>>>>> >>>>>> >>>>>> Will change to lane-maps. >>>>>> Yes, according to Vinod advice, lane mapping table use device tree >>>>>> to parse makes sense. >>>>> >>>>> Hm, I have a feeling that I saw such property, so you should dig into >>>>> existing and in-flight bindings. >>>>> >>>>> Best regards, >>>>> Krzysztof >>>>> >>>> >>>> A standard property? Like "clocks" or "resets"? >>> >>> Like lane-polarities now submitted to one MIPI. >>> >> >> data-lanes perhaps? > > Except that is for the controller's endpoint rather than the phy. > Presumably if the controller knows the mapping, then it can tell the > phy if it needs the information. IOW, don't just copy 'data-lanes' to > the phy. Follow the normal patterns. > > Rob I am not sure if phy can fetch from the other controller's endpoint. In addition, like our JH7110 SoC, it have data-lanes configure (data-lanes = <1 2>) in csi2rx controller, but this data-lanes configure is not appropriate to phy, maybe they are independent.
On 2023/4/17 1:29, Krzysztof Kozlowski wrote: >>>> A standard property? Like "clocks" or "resets"? >>> >>> Like lane-polarities now submitted to one MIPI. >>> >>> Anyway it does not look like a property of a board. You said it is fixed >>> per SoC, so it should be implied from the compatible. Otherwise please >>> explain in description and provide some rationale. >>> >>> Best regards, >>> Krzysztof >>> >> >> This property is the only one used for this IP, I have compared this IP with >> other DPHY rx module, DPHY modules form the other manufacturers not have this >> configure. >> And we also have a SoC called JH7100. It DPHY rx module is the same as JH7110. >> But we don't do the upstream work on it. If it use this lane-maps will be >> configure as "lane_maps = /bits/ 8 <0 1 2 3 4 5>;". > > And JH7100 is different SoC, so you have different compatible. Again - > is this board specific? If not, looks like SoC specific, thus imply it > from compatible. > > > Best regards, > Krzysztof > Vinod, Hi, could you give me some suggestions about Krzysztof's comment? Thanks for your time. Best regards, Changhuang
diff --git a/Documentation/devicetree/bindings/phy/starfive,jh7110-dphy-rx.yaml b/Documentation/devicetree/bindings/phy/starfive,jh7110-dphy-rx.yaml new file mode 100644 index 000000000000..5fb2f14af816 --- /dev/null +++ b/Documentation/devicetree/bindings/phy/starfive,jh7110-dphy-rx.yaml @@ -0,0 +1,85 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/phy/starfive,jh7110-dphy-rx.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: StarFive SoC MIPI D-PHY Rx Controller + +maintainers: + - Jack Zhu <jack.zhu@starfivetech.com> + - Changhuang Liang <changhuang.liang@starfivetech.com> + +description: + The StarFive SoC uses the MIPI CSI D-PHY based on M31 IP to transfer + CSI camera data. + +properties: + compatible: + const: starfive,jh7110-dphy-rx + + reg: + maxItems: 1 + + clocks: + items: + - description: config clock + - description: reference clock + - description: escape mode transmit clock + + clock-names: + items: + - const: cfg + - const: ref + - const: tx + + resets: + items: + - description: DPHY_HW reset + - description: DPHY_B09_ALWAYS_ON reset + + power-domains: + maxItems: 1 + + lane_maps: + $ref: /schemas/types.yaml#/definitions/uint8-array + description: + D-PHY rx controller physical lanes and logic lanes mapping table. + items: + - description: logic lane index point to physical lane clock lane 0 + - description: logic lane index point to physical lane data lane 0 + - description: logic lane index point to physical lane data lane 1 + - description: logic lane index point to physical lane data lane 2 + - description: logic lane index point to physical lane data lane 3 + - description: logic lane index point to physical lane clock lane 1 + + "#phy-cells": + const: 0 + +required: + - compatible + - reg + - clocks + - clock-names + - resets + - power-domains + - lane_maps + - "#phy-cells" + +additionalProperties: false + +examples: + - | + phy@19820000 { + compatible = "starfive,jh7110-dphy-rx"; + reg = <0x19820000 0x10000>; + clocks = <&ispcrg 3>, + <&ispcrg 4>, + <&ispcrg 5>; + clock-names = "cfg", "ref", "tx"; + resets = <&ispcrg 2>, + <&ispcrg 3>; + power-domains = <&dphy_pwrc 1>; + lane_maps = /bits/ 8 <4 0 1 2 3 5>; + #phy-cells = <0>; + };