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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <91d61e1a-abb0-4b31-aa22-aff72d582ebe@amd.com>
Date:   Fri, 13 Oct 2023 13:22:44 +0200
From:   Michal Simek <michal.simek@....com>
To:     Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>,
        "Praveen Teja Kundanala" <praveen.teja.kundanala@....com>,
        <srinivas.kandagatla@...aro.org>, <robh+dt@...nel.org>,
        <krzysztof.kozlowski+dt@...aro.org>, <conor+dt@...nel.org>,
        <devicetree@...r.kernel.org>,
        <linux-arm-kernel@...ts.infradead.org>
CC:     <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/5] dt-bindings: nvmem: Convert xlnx,zynqmp-nvmem.txt to
 yaml



On 10/13/23 12:30, Krzysztof Kozlowski wrote:
> On 13/10/2023 12:14, Praveen Teja Kundanala wrote:
>> Convert the xlnx,zynqmp-nvmem.txt to yaml.
>>
>> Signed-off-by: Praveen Teja Kundanala <praveen.teja.kundanala@....com>
>> ---
>>   .../bindings/nvmem/xlnx,zynqmp-nvmem.txt      | 46 ---------------
>>   .../bindings/nvmem/xlnx,zynqmp-nvmem.yaml     | 59 +++++++++++++++++++
>>   2 files changed, 59 insertions(+), 46 deletions(-)
>>   delete mode 100644 Documentation/devicetree/bindings/nvmem/xlnx,zynqmp-nvmem.txt
>>   create mode 100644 Documentation/devicetree/bindings/nvmem/xlnx,zynqmp-nvmem.yaml
>>
>> diff --git a/Documentation/devicetree/bindings/nvmem/xlnx,zynqmp-nvmem.txt b/Documentation/devicetree/bindings/nvmem/xlnx,zynqmp-nvmem.txt
>> deleted file mode 100644
>> index 4881561b3a02..000000000000
>> --- a/Documentation/devicetree/bindings/nvmem/xlnx,zynqmp-nvmem.txt
>> +++ /dev/null
>> @@ -1,46 +0,0 @@
>> ---------------------------------------------------------------------------
>> -=  Zynq UltraScale+ MPSoC nvmem firmware driver binding =
>> ---------------------------------------------------------------------------
>> -The nvmem_firmware node provides access to the hardware related data
>> -like soc revision, IDCODE... etc, By using the firmware interface.
>> -
>> -Required properties:
>> -- compatible: should be "xlnx,zynqmp-nvmem-fw"
>> -
>> -= Data cells =
>> -Are child nodes of silicon id, bindings of which as described in
>> -bindings/nvmem/nvmem.txt
>> -
>> --------
>> - Example
>> --------
>> -firmware {
>> -	zynqmp_firmware: zynqmp-firmware {
>> -		compatible = "xlnx,zynqmp-firmware";
>> -		method = "smc";
>> -
>> -		nvmem_firmware {
>> -			compatible = "xlnx,zynqmp-nvmem-fw";
>> -			#address-cells = <1>;
>> -			#size-cells = <1>;
>> -
>> -			/* Data cells */
>> -			soc_revision: soc_revision {
>> -				reg = <0x0 0x4>;
>> -			};
>> -		};
>> -	};
>> -};
>> -
>> -= Data consumers =
>> -Are device nodes which consume nvmem data cells.
>> -
>> -For example:
>> -	pcap {
>> -		...
>> -
>> -		nvmem-cells = <&soc_revision>;
>> -		nvmem-cell-names = "soc_revision";
>> -
>> -		...
>> -	};
>> diff --git a/Documentation/devicetree/bindings/nvmem/xlnx,zynqmp-nvmem.yaml b/Documentation/devicetree/bindings/nvmem/xlnx,zynqmp-nvmem.yaml
>> new file mode 100644
>> index 000000000000..e03ed8c32537
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/nvmem/xlnx,zynqmp-nvmem.yaml
>> @@ -0,0 +1,59 @@
>> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
>> +%YAML 1.2
>> +---
>> +$id: http://devicetree.org/schemas/nvmem/xlnx,zynqmp-nvmem.yaml#
>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>> +
>> +title: Zynq UltraScale+ MPSoC Non Volatile Memory interface
>> +
>> +description: |
>> +    The ZynqMP MPSoC provides access to the hardware related data
>> +    like SOC revision, IDCODE.
>> +
>> +maintainers:
>> +  - Kalyani Akula <kalyani.akula@....com>
>> +  - Praveen Teja Kundanala <praveen.teja.kundanala@....com>
>> +
>> +allOf:
>> +  - $ref: "nvmem.yaml#"
> 
> Drop quotes.
> 
>> +
>> +properties:
>> +  compatible:
>> +    const: xlnx,zynqmp-nvmem-fw
>> +
>> +  '#address-cells':
>> +    const: 1
> 
> Drop
> 
>> +
>> +  '#size-cells':
>> +    const: 1
> 
> Drop
> 
>> +
>> +required:
>> +  - compatible
> 
> required: block goes after patternProperties: block
> 
>> +
>> +patternProperties:
>> +  "^soc_revision@0$":
> 
> Why do you define individual memory cells? Is this part of a binding?
> IOW, OS/Linux requires this?

nvmem has in kernel interface where you can reference to nodes. nvmem_cell_get() 
calls. It means you should be able to describe internal layout that's why names 
are used. And address in name is there because of reg property is used to 
describe base offset and size.

Thanks,
Michal


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ