devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Conor Dooley <conor@kernel.org>
To: Chen Wang <unicornxw@gmail.com>
Cc: adrian.hunter@intel.com, aou@eecs.berkeley.edu,
	conor+dt@kernel.org, guoren@kernel.org, inochiama@outlook.com,
	jszhang@kernel.org, krzysztof.kozlowski+dt@linaro.org,
	palmer@dabbelt.com, paul.walmsley@sifive.com, robh@kernel.org,
	ulf.hansson@linaro.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-mmc@vger.kernel.org,
	linux-riscv@lists.infradead.org, chao.wei@sophgo.com,
	haijiao.liu@sophgo.com, xiaoguang.xing@sophgo.com,
	tingzhu.wang@sophgo.com, Chen Wang <unicorn_wang@outlook.com>
Subject: Re: [PATCH v5 6/8] dt-bindings: mmc: sdhci-of-dwcmhsc: Add Sophgo SG2042 support
Date: Fri, 19 Jul 2024 15:59:26 +0100	[thread overview]
Message-ID: <20240719-catnip-pushup-81d3e104de7b@spud> (raw)
In-Reply-To: <55bc60606bc9b2558eeddb00fd8b659d3fcd69ff.1721377374.git.unicorn_wang@outlook.com>

[-- Attachment #1: Type: text/plain, Size: 4033 bytes --]

On Fri, Jul 19, 2024 at 04:46:50PM +0800, Chen Wang wrote:
> From: Chen Wang <unicorn_wang@outlook.com>
> 
> SG2042 use Synopsys dwcnshc IP for SD/eMMC controllers.
> 
> SG2042 defines 3 clocks for SD/eMMC controllers.
> - EMMC_100M/SD_100M for cclk(Card clocks in DWC_mshc), so reuse
>   existing "core".
> - AXI_EMMC/AXI_SD for aclk/hclk(Bus interface clocks in DWC_mshc)
>   and blck(Core Base Clock in DWC_mshc), these 3 clocks share one
>   source, so reuse existing "bus".
> - 100K_EMMC/100K_SD for cqetmclk(Timer clocks in DWC_mshc), so reuse
>   existing "timer" which was added for rockchip specified.
> 
> Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
> ---
>  .../bindings/mmc/snps,dwcmshc-sdhci.yaml      | 60 +++++++++++++------
>  1 file changed, 43 insertions(+), 17 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/mmc/snps,dwcmshc-sdhci.yaml b/Documentation/devicetree/bindings/mmc/snps,dwcmshc-sdhci.yaml
> index 4d3031d9965f..80d50178d2e3 100644
> --- a/Documentation/devicetree/bindings/mmc/snps,dwcmshc-sdhci.yaml
> +++ b/Documentation/devicetree/bindings/mmc/snps,dwcmshc-sdhci.yaml
> @@ -10,9 +10,6 @@ maintainers:
>    - Ulf Hansson <ulf.hansson@linaro.org>
>    - Jisheng Zhang <Jisheng.Zhang@synaptics.com>
>  
> -allOf:
> -  - $ref: mmc-controller.yaml#
> -
>  properties:
>    compatible:
>      enum:
> @@ -21,6 +18,7 @@ properties:
>        - snps,dwcmshc-sdhci
>        - sophgo,cv1800b-dwcmshc
>        - sophgo,sg2002-dwcmshc
> +      - sophgo,sg2042-dwcmshc
>        - thead,th1520-dwcmshc
>  
>    reg:
> @@ -31,22 +29,11 @@ properties:
>  
>    clocks:
>      minItems: 1
> -    items:
> -      - description: core clock
> -      - description: bus clock for optional
> -      - description: axi clock for rockchip specified
> -      - description: block clock for rockchip specified
> -      - description: timer clock for rockchip specified

Does anyone know what "for rockchip specified" means? Is meant to be "for
rockchip specifically"? If it is, should probably be actually
constrained! Patch itself seems fine though and I don't think it's your
responsibility to fix that, so
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>

Cheers,
Conor.

> -
> +    maxItems: 5
>  
>    clock-names:
>      minItems: 1
> -    items:
> -      - const: core
> -      - const: bus
> -      - const: axi
> -      - const: block
> -      - const: timer
> +    maxItems: 5
>  
>    resets:
>      maxItems: 5
> @@ -63,7 +50,6 @@ properties:
>      description: Specify the number of delay for tx sampling.
>      $ref: /schemas/types.yaml#/definitions/uint8
>  
> -
>  required:
>    - compatible
>    - reg
> @@ -71,6 +57,46 @@ required:
>    - clocks
>    - clock-names
>  
> +allOf:
> +  - $ref: mmc-controller.yaml#
> +
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            const: sophgo,sg2042-dwcmshc
> +
> +    then:
> +      properties:
> +        clocks:
> +          items:
> +            - description: core clock
> +            - description: bus clock
> +            - description: timer clock
> +        clock-names:
> +          items:
> +            - const: core
> +            - const: bus
> +            - const: timer
> +    else:
> +      properties:
> +        clocks:
> +          minItems: 1
> +          items:
> +            - description: core clock
> +            - description: bus clock for optional
> +            - description: axi clock for rockchip specified
> +            - description: block clock for rockchip specified
> +            - description: timer clock for rockchip specified
> +        clock-names:
> +          minItems: 1
> +          items:
> +            - const: core
> +            - const: bus
> +            - const: axi
> +            - const: block
> +            - const: timer
> +
>  unevaluatedProperties: false
>  
>  examples:
> -- 
> 2.34.1
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

  reply	other threads:[~2024-07-19 14:59 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-19  8:44 [PATCH v5 0/8] mmc: sdhci-of-dwcmshc: Add Sophgo SG2042 support Chen Wang
2024-07-19  8:45 ` [PATCH v5 1/8] mmc: sdhci-of-dwcmshc: add common bulk optional clocks support Chen Wang
2024-07-19 13:22   ` Adrian Hunter
2024-07-19  8:45 ` [PATCH v5 2/8] mmc: sdhci-of-dwcmshc: move two rk35xx functions Chen Wang
2024-07-19  8:45 ` [PATCH v5 3/8] mmc: sdhci-of-dwcmshc: factor out code for th1520_init() Chen Wang
2024-07-24 21:09   ` Drew Fustini
2024-07-19  8:46 ` [PATCH v5 4/8] mmc: sdhci-of-dwcmshc: factor out code into dwcmshc_rk35xx_init Chen Wang
2024-07-19 13:23   ` Adrian Hunter
2024-07-19  8:46 ` [PATCH v5 5/8] mmc: sdhci-of-dwcmshc: add dwcmshc_pltfm_data Chen Wang
2024-07-19 13:26   ` Adrian Hunter
2024-07-19  8:46 ` [PATCH v5 6/8] dt-bindings: mmc: sdhci-of-dwcmhsc: Add Sophgo SG2042 support Chen Wang
2024-07-19 14:59   ` Conor Dooley [this message]
2024-07-19  8:47 ` [PATCH v5 7/8] mmc: sdhci-of-dwcmshc: Add support for Sophgo SG2042 Chen Wang
2024-07-19 13:27   ` Adrian Hunter
2024-07-19  8:47 ` [PATCH v5 8/8] riscv: sophgo: dts: add mmc controllers for SG2042 SoC Chen Wang
2024-07-31  7:58   ` Inochi Amaoto
2024-08-05  2:52     ` Chen Wang
2024-07-24 21:09 ` [PATCH v5 0/8] mmc: sdhci-of-dwcmshc: Add Sophgo SG2042 support Drew Fustini
2024-07-25  1:36   ` Chen Wang
2024-07-31  8:00 ` Inochi Amaoto
2024-08-05  2:53   ` Chen Wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240719-catnip-pushup-81d3e104de7b@spud \
    --to=conor@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=aou@eecs.berkeley.edu \
    --cc=chao.wei@sophgo.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=guoren@kernel.org \
    --cc=haijiao.liu@sophgo.com \
    --cc=inochiama@outlook.com \
    --cc=jszhang@kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=palmer@dabbelt.com \
    --cc=paul.walmsley@sifive.com \
    --cc=robh@kernel.org \
    --cc=tingzhu.wang@sophgo.com \
    --cc=ulf.hansson@linaro.org \
    --cc=unicorn_wang@outlook.com \
    --cc=unicornxw@gmail.com \
    --cc=xiaoguang.xing@sophgo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).