lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d05fcac3-1054-6b52-e9d8-15baba424863@linaro.org>
Date:   Tue, 18 Jul 2023 20:12:07 +0200
From:   Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
To:     Nikunj Kela <quic_nkela@...cinc.com>, sudeep.holla@....com
Cc:     cristian.marussi@....com, robh+dt@...nel.org,
        krzysztof.kozlowski+dt@...aro.org, conor+dt@...nel.org,
        agross@...nel.org, andersson@...nel.org, konrad.dybcio@...aro.org,
        linux-arm-kernel@...ts.infradead.org, devicetree@...r.kernel.org,
        linux-kernel@...r.kernel.org, linux-arm-msm@...r.kernel.org
Subject: Re: [PATCH 1/2] dt-bindings: arm: Add qcom specific hvc transport for
 SCMI

On 18/07/2023 18:08, Nikunj Kela wrote:
> Introduce compatible "qcom,scmi-hvc-shmem" for SCMI
> transport channel for Qualcomm virtual platforms.
> The compatible mandates a shared memory channel.
> 
> Signed-off-by: Nikunj Kela <quic_nkela@...cinc.com>
> ---
>  .../bindings/firmware/arm,scmi.yaml           | 69 +++++++++++++++++++
>  1 file changed, 69 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/firmware/arm,scmi.yaml b/Documentation/devicetree/bindings/firmware/arm,scmi.yaml
> index b138f3d23df8..605b1e997a85 100644
> --- a/Documentation/devicetree/bindings/firmware/arm,scmi.yaml
> +++ b/Documentation/devicetree/bindings/firmware/arm,scmi.yaml
> @@ -45,6 +45,9 @@ properties:
>        - description: SCMI compliant firmware with OP-TEE transport
>          items:
>            - const: linaro,scmi-optee
> +      - description: SCMI compliant firmware with Qualcomm hvc/shmem transport
> +        items:
> +          - const: qcom,scmi-hvc-shmem
>  
>    interrupts:
>      description:
> @@ -321,6 +324,16 @@ else:
>        required:
>          - linaro,optee-channel-id
>  
> +    else:
> +      if:
> +        properties:
> +          compatible:
> +            contains:
> +              const: qcom,scmi-hvc-shmem
> +      then:
> +        required:
> +          - shmem

Unfortunately this pattern if-else-if-else-if-else does not scale well.
Please convert all entries first to allOf:if:then,if:then,if:then (in
new patch), and then add new if:then:

> +
>  examples:
>    - |
>      firmware {
> @@ -444,6 +457,62 @@ examples:
>          };
>      };
>  
> +  - |
> +    firmware {
> +        scmi_dpu {

No underscores in node names.

Node names should be generic. See also an explanation and list of
examples (not exhaustive) in DT specification:
https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation



> +            compatible = "qcom,scmi-hvc-shmem";
> +            shmem = <&shmem_dpu>;
> +
> +            #address-cells = <1>;
> +            #size-cells = <0>;
> +
> +            scmi_pd_dpu: protocol@11 {
> +                reg = <0x11>;
> +                #power-domain-cells = <1>;
> +            };
> +        };
> +

Add only one example, but then only if it differs significantly. I see
no differences - except compatible - so maybe no point of examples.


> +        scmi_gpu {
> +            compatible = "qcom,scmi-hvc-shmem";
> +            shmem = <&shmem_gpu>;

This example for sure is not needed - you duplicate above.

> +
> +            interrupts = <GIC_SPI 931 IRQ_TYPE_EDGE_RISING>;
> +            interrupt-names = "a2p";
> +
> +            #address-cells = <1>;
> +            #size-cells = <0>;
> +
> +            scmi_pd_gpu: protocol@11 {
> +                reg = <0x11>;
> +                #power-domain-cells = <1>;
> +            };
> +        };
> +    };
> +
> +    soc {
> +        #address-cells = <1>;
> +        #size-cells = <1>;
> +
> +        sram@...00000 {
> +            compatible = "mmio-sram";
> +            reg = <0x95c00000 0x10000>;
> +
> +            #address-cells = <1>;
> +            #size-cells = <1>;
> +            ranges;
> +
> +            shmem_dpu: scmi-sram-dpu@...00000 {
> +                compatible = "arm,scmi-shmem";
> +                reg = <0x95c00000 0x3f0>;
> +            };

How does these differ from existing example?

Best regards,
Krzysztof

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ