All of lore.kernel.org
 help / color / mirror / Atom feed
From: matthew.gerlach@linux.intel.com
To: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Cc: dinguyen@kernel.org, robh+dt@kernel.org,
	linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
	krzysztof.kozlowski+dt@linaro.org
Subject: Re: [PATCH v2 1/3] dt-bindings: misc: add bindings for Intel HPS Copy Engine
Date: Wed, 4 May 2022 15:41:20 -0700 (PDT)	[thread overview]
Message-ID: <alpine.DEB.2.22.394.2205041425230.2669897@rhweight-WRK1> (raw)
In-Reply-To: <17407fe7-b11d-2ba8-acca-3e71cf1a3b2f@linaro.org>



On Wed, 4 May 2022, Krzysztof Kozlowski wrote:

> On 03/05/2022 21:45, matthew.gerlach@linux.intel.com wrote:
>> From: Matthew Gerlach <matthew.gerlach@linux.intel.com>
>>
>> Add device tree bindings documentation for the Intel Hard
>> Processor System (HPS) Copy Engine.
>>
>> Signed-off-by: Matthew Gerlach <matthew.gerlach@linux.intel.com>
>> ---
>>  .../bindings/misc/intel,hps-copy-engine.yaml  | 48 +++++++++++++++++++
>>  1 file changed, 48 insertions(+)
>>  create mode 100644 Documentation/devicetree/bindings/misc/intel,hps-copy-engine.yaml
>>
>> diff --git a/Documentation/devicetree/bindings/misc/intel,hps-copy-engine.yaml b/Documentation/devicetree/bindings/misc/intel,hps-copy-engine.yaml
>> new file mode 100644
>> index 000000000000..74e7da9002f4
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/misc/intel,hps-copy-engine.yaml
>
> Please find appropriate directory matching this hardware, not "misc". As
> a fallback SoC related bindings end up in "soc".

I thought misc seemed appropriate because it is a very specific IP block 
in the FPGA connected to the HPS.  It does perform a simple DMA function; 
so I considered putting it in the dma directory, but it also has some
hand-shaking registers between the HPS and a host processor connected to the
FPGA via PCIe; so I thought misc.  Since the HPS "soc" accesses the 
component, I can put it in the "soc" directory, unless there is a better 
suggestion.

>
>> @@ -0,0 +1,48 @@
>> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
>> +# Copyright (C) 2022, Intel Corporation
>> +%YAML 1.2
>> +---
>> +$id: "http://devicetree.org/schemas/misc/intel,hps-copy-engine.yaml#"
>> +$schema: "http://devicetree.org/meta-schemas/core.yaml#"
>> +
>> +title: Intel HPS Copy Engine
>> +
>> +maintainers:
>> +  - Matthew Gerlach <matthew.gerlach@linux.intel.com>
>> +
>> +description: |
>> +  The Intel Hard Processor System (HPS) Copy Engine is an IP block used to copy
>> +  a bootable image from host memory to HPS DDR.  Additionally, there is a
>> +  register the HPS can use to indicate the state of booting the copied image as
>> +  well as a keep-a-live indication to the host.
>> +
>> +properties:
>> +  compatible:
>> +    items:
>
> No "items", you have just one item.

Got it.  I will change it in v3.
>
>> +      - const: intel,hps-copy-engine
>> +
>> +  reg:
>> +    maxItems: 1
>> +
>> +required:
>> +  - compatible
>> +  - reg
>> +
>> +additionalProperties: false
>> +
>> +examples:
>> +  - |
>> +    agilex_hps_bridges: bus@80000000 {
>
> Unused label...

I will remove unused label in v3.

>
>> +        compatible = "simple-bus";
>> +        reg = <0x80000000 0x60000000>,
>> +              <0xf9000000 0x00100000>;
>> +        reg-names = "axi_h2f", "axi_h2f_lw";
>> +        #address-cells = <0x2>;
>
> $ git grep address-cell
> Do not use inconsistent coding. The same applies to your DTS.

Is the inconsistency the use of '0x' in the values of #address-cells and 
#size-cells, or is the consistency having different values for 
#address-cells and #size-cells or both?

>
>> +        #size-cells = <0x1>;
>> +        ranges = <0x00000000 0x00000000 0xf9000000 0x00001000>;
>
> Why do you even need the simple-bus above and cannot put the device
> directly on the bus?

On an Agilex chip, the HPS is connected to the FPGA via two bridges, 
referred as the "HPS to FPGA bridge" and the "Lightweight HPS to FPGA 
bridge".  An IP block in the FPGA could be connected to one or both of 
these bridges.  I am anticipating device tree overlays being applied for 
other IP blocks instantiated in the FPGA.

>
>> +
>> +        hps_cp_eng@0 {
>
> No underscores in node names. Generic node name.

I understand.  I am considering dma@0 for the generic node name.

>
>> +            compatible = "intel,hps-copy-engine";
>> +            reg = <0x00000000 0x00000000 0x00001000>;
>> +        };
>> +    };
>
>
> Best regards,
> Krzysztof
>

Thank you for the review,
Matthew

  reply	other threads:[~2022-05-04 22:41 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-03 19:45 [PATCH v2 0/3] Add device tree for Intel n6000 matthew.gerlach
2022-05-03 19:45 ` [PATCH v2 1/3] dt-bindings: misc: add bindings for Intel HPS Copy Engine matthew.gerlach
2022-05-04 15:04   ` Krzysztof Kozlowski
2022-05-04 22:41     ` matthew.gerlach [this message]
2022-05-05  8:18       ` Krzysztof Kozlowski
2022-05-05 17:18         ` matthew.gerlach
2022-05-03 19:45 ` [PATCH v2 2/3] dt-bindings: intel: add binding for Intel n6000 matthew.gerlach
2022-05-04 14:54   ` Krzysztof Kozlowski
2022-05-04 21:09     ` matthew.gerlach
2022-05-03 19:45 ` [PATCH v2 3/3] arm64: dts: intel: add device tree for n6000 matthew.gerlach
2022-05-04 14:56   ` Krzysztof Kozlowski
2022-05-04 21:14     ` matthew.gerlach
2022-05-04 15:02   ` Krzysztof Kozlowski
2022-05-04 21:22     ` matthew.gerlach
2022-05-05  6:42       ` Krzysztof Kozlowski
2022-05-05 17:16         ` matthew.gerlach

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=alpine.DEB.2.22.394.2205041425230.2669897@rhweight-WRK1 \
    --to=matthew.gerlach@linux.intel.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dinguyen@kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.