[PATCH v3] dt-bindings: crypto: convert rockchip-crypto to yaml

Krzysztof Kozlowski krzysztof.kozlowski at canonical.com
Wed Feb 23 05:14:48 PST 2022


On 23/02/2022 14:05, LABBE Corentin wrote:
> Le Tue, Feb 15, 2022 at 03:07:56PM +0100, Johan Jonker a écrit :
>> Hi Heiko,
>>
>> On 2/11/22 12:59, Corentin Labbe wrote:
>>> Convert rockchip-crypto to yaml
>>>
>>> Signed-off-by: Corentin Labbe <clabbe at baylibre.com>
>>> ---
>>> Changes since v1:
>>> - fixed example
>>> - renamed to a new name
>>> - fixed some maxItems
>>>
>>> Change since v2:
>>> - Fixed maintainers section
>>>
>>>  .../crypto/rockchip,rk3288-crypto.yaml        | 66 +++++++++++++++++++
>>>  .../bindings/crypto/rockchip-crypto.txt       | 28 --------
>>>  2 files changed, 66 insertions(+), 28 deletions(-)
>>>  create mode 100644 Documentation/devicetree/bindings/crypto/rockchip,rk3288-crypto.yaml
>>
>> rockchip,crypto.yaml
> 
> 
> Hello
> 
> DT maintainer asked for rockchip,rk3288-crypto, so I will keep it.

I don't insist on keeping rk32880crypto name. It depends whether the
bindings are for a family of devices or rather specific one or few
devices. Based on comments here, it is quite possible that all Rockchip
crypto blocks will fit into this bindings, so the name could be generic.

Having a specific name, even if it contains multiple devices, is also fine.

What I would prefer to avoid is to have a generic name
"rockchip,crypto.yaml" and then in two months one more generic
"rockchip,crypto2.yaml", and then add third...

> 
>>
>>>  delete mode 100644 Documentation/devicetree/bindings/crypto/rockchip-crypto.txt
>>>
>>> diff --git a/Documentation/devicetree/bindings/crypto/rockchip,rk3288-crypto.yaml b/Documentation/devicetree/bindings/crypto/rockchip,rk3288-crypto.yaml
>>> new file mode 100644
>>> index 000000000000..2e1e9fa711c4
>>> --- /dev/null
>>> +++ b/Documentation/devicetree/bindings/crypto/rockchip,rk3288-crypto.yaml
>>> @@ -0,0 +1,66 @@
>>> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
>>> +%YAML 1.2
>>> +---
>>> +$id: http://devicetree.org/schemas/crypto/rockchip,rk3288-crypto.yaml#
>>
>> rockchip,crypto.yaml
>>
>>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>>> +
>>> +title: Rockchip Electronics And Security Accelerator
>>> +
>>> +maintainers:
>>> +  - Heiko Stuebner <heiko at sntech.de>
>>> +
>>> +properties:
>>> +  compatible:
>>
>>     oneOf:
>>       - const: rockchip,rk3288-crypto
>>       - items:
>>           - enum:
>>               - rockchip,rk3228-crypto
>>               - rockchip,rk3328-crypto
>>               - rockchip,rk3368-crypto
>>               - rockchip,rk3399-crypto
>>           - const: rockchip,rk3288-crypto
>>
>> rk3288 was the first in line that had support, so we use that as fall
>> back string.
> 
> I will dont add compatible which are not handled by the driver unless DT maintainer said I should.

They could be added for completeness because bindings describe rather
hardware, not Linux driver state, but there is no such must. It can also
be added later by another contributor.


Best regards,
Krzysztof



More information about the Linux-rockchip mailing list