mbox series

[v5,0/2] Mediatek SCP dt-binding tweaks

Message ID 20220511195452.871897-1-nfraprado@collabora.com
Headers show
Series Mediatek SCP dt-binding tweaks | expand

Message

Nícolas F. R. A. Prado May 11, 2022, 7:54 p.m. UTC
Two simple patches for the Mediatek SCP dt-binding. The first fixes the
reg/reg-names property while the second adds a new optional
memory-region property.

v4: https://lore.kernel.org/all/20220506213226.257859-1-nfraprado@collabora.com
v3: https://lore.kernel.org/all/20220503211114.2656099-1-nfraprado@collabora.com
v2: https://lore.kernel.org/all/20220502192420.2548512-1-nfraprado@collabora.com
v1: https://lore.kernel.org/all/20220429211111.2214119-1-nfraprado@collabora.com

Changes in v5:
- Made l1tcm optional for mt8192/mt8195
- Greatly simplified the constraints override in the if:then:

Changes in v4:
- Reworked presence of l1tcm reg to be if:then: based and present only
  on mt8192/mt8195

Changes in v3:
- Made the cfg reg required again. After looking again into the mtk-scp
  driver, only l1tcm is optional.

Changes in v2:
- Dropped type and description from memory-region since it's a
  well-known property
- Set memory-region maxItems to 1

Nícolas F. R. A. Prado (2):
  dt-bindings: remoteproc: mediatek: Make l1tcm reg exclusive to mt819x
  dt-bindings: remoteproc: mediatek: Add optional memory-region to
    mtk,scp

 .../bindings/remoteproc/mtk,scp.yaml          | 47 +++++++++++++------
 1 file changed, 33 insertions(+), 14 deletions(-)

Comments

Krzysztof Kozlowski May 13, 2022, 8:15 a.m. UTC | #1
On 11/05/2022 21:54, Nícolas F. R. A. Prado wrote:

Thank you for your patch. There is something to discuss/improve.

>  
> -if:
> -  properties:
> -    compatible:
> -      enum:
> -        - mediatek,mt8183-scp
> -        - mediatek,mt8192-scp
> -then:
> -  required:
> -    - clocks
> -    - clock-names
> +allOf:
> +  - if:
> +      properties:
> +        compatible:
> +          enum:
> +            - mediatek,mt8183-scp
> +            - mediatek,mt8192-scp
> +    then:
> +      required:
> +        - clocks
> +        - clock-names
> +
> +  - if:
> +      properties:
> +        compatible:
> +          enum:
> +            - mediatek,mt8183-scp
> +            - mediatek,mt8186-scp
> +    then:
> +      properties:
> +        reg:
> +          maxItems: 2
> +        reg-names:
> +          maxItems: 2

Isn't l1tcm required on mt819x? Now it is left optional.


Best regards,
Krzysztof
Krzysztof Kozlowski May 16, 2022, 2:48 p.m. UTC | #2
On 11/05/2022 21:54, Nícolas F. R. A. Prado wrote:
> Commit ca23ecfdbd44 ("remoteproc/mediatek: support L1TCM") added support
> for the l1tcm memory region on the MT8192 SCP, adding a new da_to_va
> callback that handles l1tcm while keeping the old one for
> back-compatibility with MT8183. However, since the mt8192 compatible was
> missing from the dt-binding, the accompanying dt-binding commit
> 503c64cc42f1 ("dt-bindings: remoteproc: mediatek: add L1TCM memory region")
> mistakenly added this reg as if it were for mt8183. And later
> it became common to all platforms as their compatibles were added.
> 
> Fix the dt-binding so that the l1tcm reg can be present only on the
> supported platforms: mt8192 and mt8195.
> 
> Fixes: 503c64cc42f1 ("dt-bindings: remoteproc: mediatek: add L1TCM memory region")
> Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
> 
> ---
> 
> Changes in v5:
> - Made l1tcm optional for mt8192/mt8195
> - Greatly simplified the constraints override in the if:then:
> - Updated commit message
> 


Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>


Best regards,
Krzysztof