Message ID | 20230315100421.133428-2-changhuang.liang@starfivetech.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp2240645wrd; Wed, 15 Mar 2023 03:12:45 -0700 (PDT) X-Google-Smtp-Source: AK7set/hrwDIecqYrecnfyyMByJ+/9q1AXMUZIl6rG1CYa/3yk6suM9lqcbHuHDMp2fZmxN8w21H X-Received: by 2002:a17:902:fb43:b0:19f:35df:5d60 with SMTP id lf3-20020a170902fb4300b0019f35df5d60mr2112138plb.22.1678875164806; Wed, 15 Mar 2023 03:12:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678875164; cv=none; d=google.com; s=arc-20160816; b=WXDhWIxiRv6XTGkBrjH9BC69QnozOP8xOIXeCHx9Kf8/AuKlmNRg9uYOTbVkLsNKA0 CpePlZaFhHXRMmKxlThOohNA/GVdLCoBj+pYl8121MY1jUnLlzQNxr1yIHEPuoND6asf vle9VTN+fe3BCoa1n5SRH+ijyi9uSOQEwLKqaJhE+DvSaq8Q7Gd15UbJsTc3JO1seZkc SGidkjPoDYLKlvahul5JoKcJuUSQfflN/xmQWMAlz8BZYuChX2GA3ufmJzSbj8POUN3j frk0rOaiLuZ0SG9ueoHPq9vIKzdt+gecAg6snodCuBqXoFMXIr80OLgZb6vHJqS3CdFI ddJQ== 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=KKvezFvPVQsXXdPzwsDnsldYa6LOos3/sN5zLnEnAC8=; b=w9sKuFhIshsIugTf8NSFWAZq4qucdOE1+vTwEWl7TXPvQr8tI8szEiEkrf4hCPaBuM MEBpx9MQG8o2LT0wX3pY8xOcwOsfMe59X5wf3HNc9IqqHhWWTPpaVLhXC44f6fP6b1UE TnDxwDE3lRez3BZ5i9veWgfbohN6Sn6npWODBsYAxLhCW56W55es3XA6lmt4K19x8Ej7 OMkGP/1Lo+Jj2ArXXoau1XX+BJjKuuo+oVUAcsc7uiX3TJoolZUT0R4sKjxq3oB7+fc1 wWH6Wj7LgBjfqtzeeP6GV48oauHpD3Tnr2h1IpFC2oI0deQrxYC1vi4Z65negM62JvmH vCfw== 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 b8-20020a170903228800b001a04bde6843si5299667plh.259.2023.03.15.03.12.28; Wed, 15 Mar 2023 03:12:44 -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 S232129AbjCOKFr convert rfc822-to-8bit (ORCPT <rfc822;realc9580@gmail.com> + 99 others); Wed, 15 Mar 2023 06:05:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56190 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229556AbjCOKFY (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 15 Mar 2023 06:05:24 -0400 Received: from ex01.ufhost.com (ex01.ufhost.com [61.152.239.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 75E483866B; Wed, 15 Mar 2023 03:04:40 -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 4F49524E1EC; Wed, 15 Mar 2023 18:04:26 +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, 15 Mar 2023 18:04:26 +0800 Received: from ubuntu.localdomain (113.72.145.194) by EXMBX162.cuchost.com (172.16.6.72) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Wed, 15 Mar 2023 18:04:25 +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 v3 1/3] dt-bindings: phy: Add starfive,jh7110-dphy-rx Date: Wed, 15 Mar 2023 03:04:19 -0700 Message-ID: <20230315100421.133428-2-changhuang.liang@starfivetech.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230315100421.133428-1-changhuang.liang@starfivetech.com> References: <20230315100421.133428-1-changhuang.liang@starfivetech.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [113.72.145.194] 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?1760428204762316088?= X-GMAIL-MSGID: =?utf-8?q?1760428204762316088?= |
Series |
Add JH7110 MIPI DPHY RX support
|
|
Commit Message
Changhuang Liang
March 15, 2023, 10:04 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 | 77 +++++++++++++++++++
1 file changed, 77 insertions(+)
create mode 100644 Documentation/devicetree/bindings/phy/starfive,jh7110-dphy-rx.yaml
Comments
On Wed, Mar 15, 2023 at 03:04:19AM -0700, 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. > > Signed-off-by: Changhuang Liang <changhuang.liang@starfivetech.com> > --- > .../bindings/phy/starfive,jh7110-dphy-rx.yaml | 77 +++++++++++++++++++ > 1 file changed, 77 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..b72ac44bc29d > --- /dev/null > +++ b/Documentation/devicetree/bindings/phy/starfive,jh7110-dphy-rx.yaml > @@ -0,0 +1,77 @@ > +# 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 > + > + starfive,aon-syscon: > + $ref: /schemas/types.yaml#/definitions/phandle-array > + items: > + - items: > + - description: phandle of AON SYSCON > + - description: register offset > + description: The power of dphy rx is configured by AON SYSCON > + in this property. Sounds like AON SYSCON should be a power-domains provider. Custom phandle links are for things which don't fit standard bindings. > + > + "#phy-cells": > + const: 0 > + > +required: > + - compatible > + - reg > + - clocks > + - clock-names > + - resets > + - starfive,aon-syscon > + - "#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>; > + starfive,aon-syscon = <&aon_syscon 0x00>; > + #phy-cells = <0>; > + }; > -- > 2.25.1 >
On 2023/3/20 23:14, Rob Herring wrote: > On Wed, Mar 15, 2023 at 03:04:19AM -0700, Changhuang Liang wrote: >> [...] >> + resets: >> + items: >> + - description: DPHY_HW reset >> + - description: DPHY_B09_ALWAYS_ON reset >> + >> + starfive,aon-syscon: >> + $ref: /schemas/types.yaml#/definitions/phandle-array >> + items: >> + - items: >> + - description: phandle of AON SYSCON >> + - description: register offset >> + description: The power of dphy rx is configured by AON SYSCON >> + in this property. > > Sounds like AON SYSCON should be a power-domains provider. Custom > phandle links are for things which don't fit standard bindings. > Hi, Rob In starfive jh7110 SoC,we have achieved the power-domains provider as follow: https://patchwork.kernel.org/project/linux-pm/cover/20230119094447.21939-1-walker.chen@starfivetech.com/ But this AON SYSCON is a miscellaneous register. It different offsets configure the different functions of the different modules. So we don't make a framework fot it. What do you think? Thanks >> + >> + "#phy-cells": >> + const: 0 >> + >> +required: >> + - compatible >> + - reg >> + - clocks >> + - clock-names >> + - resets >> + - starfive,aon-syscon >> + - "#phy-cells" >> [...] >>
On 2023/3/20 23:14, Rob Herring wrote: > On Wed, Mar 15, 2023 at 03:04:19AM -0700, 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. >> >> Signed-off-by: Changhuang Liang <changhuang.liang@starfivetech.com> >> --- >> .../bindings/phy/starfive,jh7110-dphy-rx.yaml | 77 +++++++++++++++++++ >> 1 file changed, 77 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..b72ac44bc29d >> --- /dev/null >> +++ b/Documentation/devicetree/bindings/phy/starfive,jh7110-dphy-rx.yaml >> @@ -0,0 +1,77 @@ >> +# 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 >> + >> + starfive,aon-syscon: >> + $ref: /schemas/types.yaml#/definitions/phandle-array >> + items: >> + - items: >> + - description: phandle of AON SYSCON >> + - description: register offset >> + description: The power of dphy rx is configured by AON SYSCON >> + in this property. > > Sounds like AON SYSCON should be a power-domains provider. Custom > phandle links are for things which don't fit standard bindings. > Hi, Rob, On visionfive2 jh7110 SoC, this AON SYSCON is the Secondary power switch to the DPHY Rx. When we open the pmic switch, we also need to configure the AON SYSCON register to turn on the switch, it is used to link the pmic and the DPHY Rx, So I think it just use syscon framework is enought. What about your comments. I am looking forward to your reply. thanks, >> + >> + "#phy-cells": >> + const: 0 >> + >> +required: >> + - compatible >> + - reg >> + - clocks >> + - clock-names >> + - resets >> + - starfive,aon-syscon >> + - "#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>; >> + starfive,aon-syscon = <&aon_syscon 0x00>; >> + #phy-cells = <0>; >> + }; >> -- >> 2.25.1 >>
On 07/04/2023 08:51, Changhuang Liang wrote: >>> + >>> + resets: >>> + items: >>> + - description: DPHY_HW reset >>> + - description: DPHY_B09_ALWAYS_ON reset >>> + >>> + starfive,aon-syscon: >>> + $ref: /schemas/types.yaml#/definitions/phandle-array >>> + items: >>> + - items: >>> + - description: phandle of AON SYSCON >>> + - description: register offset >>> + description: The power of dphy rx is configured by AON SYSCON >>> + in this property. >> >> Sounds like AON SYSCON should be a power-domains provider. Custom >> phandle links are for things which don't fit standard bindings. >> > > Hi, Rob, > > On visionfive2 jh7110 SoC, this AON SYSCON is the Secondary power switch to the DPHY Rx. > When we open the pmic switch, we also need to configure the AON SYSCON register to turn > on the switch, it is used to link the pmic and the DPHY Rx, So I think it just use syscon > framework is enought. What about your comments. Which sounds exactly like power domain provider... Best regards, Krzysztof
On 2023/4/7 14:54, Krzysztof Kozlowski wrote: > On 07/04/2023 08:51, Changhuang Liang wrote: >>>> + >>>> + resets: >>>> + items: >>>> + - description: DPHY_HW reset >>>> + - description: DPHY_B09_ALWAYS_ON reset >>>> + >>>> + starfive,aon-syscon: >>>> + $ref: /schemas/types.yaml#/definitions/phandle-array >>>> + items: >>>> + - items: >>>> + - description: phandle of AON SYSCON >>>> + - description: register offset >>>> + description: The power of dphy rx is configured by AON SYSCON >>>> + in this property. >>> >>> Sounds like AON SYSCON should be a power-domains provider. Custom >>> phandle links are for things which don't fit standard bindings. >>> >> >> Hi, Rob, >> >> On visionfive2 jh7110 SoC, this AON SYSCON is the Secondary power switch to the DPHY Rx. >> When we open the pmic switch, we also need to configure the AON SYSCON register to turn >> on the switch, it is used to link the pmic and the DPHY Rx, So I think it just use syscon >> framework is enought. What about your comments. > > Which sounds exactly like power domain provider... > OK, thanks for your comment, I will try to use power domain framework in next patch. > Best regards, > Krzysztof >
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..b72ac44bc29d --- /dev/null +++ b/Documentation/devicetree/bindings/phy/starfive,jh7110-dphy-rx.yaml @@ -0,0 +1,77 @@ +# 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 + + starfive,aon-syscon: + $ref: /schemas/types.yaml#/definitions/phandle-array + items: + - items: + - description: phandle of AON SYSCON + - description: register offset + description: The power of dphy rx is configured by AON SYSCON + in this property. + + "#phy-cells": + const: 0 + +required: + - compatible + - reg + - clocks + - clock-names + - resets + - starfive,aon-syscon + - "#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>; + starfive,aon-syscon = <&aon_syscon 0x00>; + #phy-cells = <0>; + };