diff mbox series

[RFC,v4,2/6] Bindings: nvmem: add bindings for JZ4780 efuse

Message ID 86b78db4d607e0bdda6def018bc7f73207ce82e8.1581958529.git.hns@goldelico.com (mailing list archive)
State Superseded
Headers show
Series MIPS: CI20: Add efuse driver for Ingenic JZ4780 and attach to DM9000 for stable MAC addresses | expand

Commit Message

H. Nikolaus Schaller Feb. 17, 2020, 4:55 p.m. UTC
From: PrasannaKumar Muralidharan <prasannatsmkumar@gmail.com>

This patch brings support for the JZ4780 efuse. Currently it only expose
a read only access to the entire 8K bits efuse memory.

Tested-by: Mathieu Malaterre <malat@debian.org>
Signed-off-by: PrasannaKumar Muralidharan <prasannatsmkumar@gmail.com>
Signed-off-by: Mathieu Malaterre <malat@debian.org>
Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
---
 .../bindings/nvmem/ingenic,jz4780-efuse.txt     | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/nvmem/ingenic,jz4780-efuse.txt

Comments

Rob Herring (Arm) Feb. 18, 2020, 9:26 p.m. UTC | #1
On Mon, Feb 17, 2020 at 05:55:26PM +0100, H. Nikolaus Schaller wrote:
> From: PrasannaKumar Muralidharan <prasannatsmkumar@gmail.com>
> 
> This patch brings support for the JZ4780 efuse. Currently it only expose
> a read only access to the entire 8K bits efuse memory.
> 
> Tested-by: Mathieu Malaterre <malat@debian.org>
> Signed-off-by: PrasannaKumar Muralidharan <prasannatsmkumar@gmail.com>
> Signed-off-by: Mathieu Malaterre <malat@debian.org>
> Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
> ---
>  .../bindings/nvmem/ingenic,jz4780-efuse.txt     | 17 +++++++++++++++++
>  1 file changed, 17 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/nvmem/ingenic,jz4780-efuse.txt

Please convert to a DT schema.

> diff --git a/Documentation/devicetree/bindings/nvmem/ingenic,jz4780-efuse.txt b/Documentation/devicetree/bindings/nvmem/ingenic,jz4780-efuse.txt
> new file mode 100644
> index 000000000000..339e74daa9a9
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/nvmem/ingenic,jz4780-efuse.txt
> @@ -0,0 +1,17 @@
> +Ingenic JZ EFUSE driver bindings
> +
> +Required properties:
> +- "compatible"		Must be set to "ingenic,jz4780-efuse"
> +- "reg"			Register location and length
> +- "clocks"		Handle for the ahb clock for the efuse.
> +- "clock-names"		Must be "bus_clk"

'clk' is redundant. How about 'ahb'?

> +
> +Example:
> +
> +efuse: efuse@134100d0 {
> +	compatible = "ingenic,jz4780-efuse";
> +	reg = <0x134100d0 0x2c>;
> +
> +	clocks = <&cgu JZ4780_CLK_AHB2>;
> +	clock-names = "bus_clk";
> +};
> -- 
> 2.23.0
>
H. Nikolaus Schaller Feb. 19, 2020, 5:48 a.m. UTC | #2
> Am 18.02.2020 um 22:26 schrieb Rob Herring <robh@kernel.org>:
> 
> On Mon, Feb 17, 2020 at 05:55:26PM +0100, H. Nikolaus Schaller wrote:
>> From: PrasannaKumar Muralidharan <prasannatsmkumar@gmail.com>
>> 
>> This patch brings support for the JZ4780 efuse. Currently it only expose
>> a read only access to the entire 8K bits efuse memory.
>> 
>> Tested-by: Mathieu Malaterre <malat@debian.org>
>> Signed-off-by: PrasannaKumar Muralidharan <prasannatsmkumar@gmail.com>
>> Signed-off-by: Mathieu Malaterre <malat@debian.org>
>> Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
>> ---
>> .../bindings/nvmem/ingenic,jz4780-efuse.txt     | 17 +++++++++++++++++
>> 1 file changed, 17 insertions(+)
>> create mode 100644 Documentation/devicetree/bindings/nvmem/ingenic,jz4780-efuse.txt
> 
> Please convert to a DT schema.

Is there someone of you who can help to do that?

DT schemas are still like a Chinese dialect for me (i.e. I can decipher with help but neither speak nor write).

BR and thanks,
Nikolaus

> 
>> diff --git a/Documentation/devicetree/bindings/nvmem/ingenic,jz4780-efuse.txt b/Documentation/devicetree/bindings/nvmem/ingenic,jz4780-efuse.txt
>> new file mode 100644
>> index 000000000000..339e74daa9a9
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/nvmem/ingenic,jz4780-efuse.txt
>> @@ -0,0 +1,17 @@
>> +Ingenic JZ EFUSE driver bindings
>> +
>> +Required properties:
>> +- "compatible"		Must be set to "ingenic,jz4780-efuse"
>> +- "reg"			Register location and length
>> +- "clocks"		Handle for the ahb clock for the efuse.
>> +- "clock-names"		Must be "bus_clk"
> 
> 'clk' is redundant. How about 'ahb'?
> 
>> +
>> +Example:
>> +
>> +efuse: efuse@134100d0 {
>> +	compatible = "ingenic,jz4780-efuse";
>> +	reg = <0x134100d0 0x2c>;
>> +
>> +	clocks = <&cgu JZ4780_CLK_AHB2>;
>> +	clock-names = "bus_clk";
>> +};
>> -- 
>> 2.23.0
>>
Zhou Yanjie Feb. 19, 2020, 10:38 a.m. UTC | #3
Hi Nikolaus,

On 2020年02月19日 13:48, H. Nikolaus Schaller wrote:
>> Am 18.02.2020 um 22:26 schrieb Rob Herring <robh@kernel.org>:
>>
>> On Mon, Feb 17, 2020 at 05:55:26PM +0100, H. Nikolaus Schaller wrote:
>>> From: PrasannaKumar Muralidharan <prasannatsmkumar@gmail.com>
>>>
>>> This patch brings support for the JZ4780 efuse. Currently it only expose
>>> a read only access to the entire 8K bits efuse memory.
>>>
>>> Tested-by: Mathieu Malaterre <malat@debian.org>
>>> Signed-off-by: PrasannaKumar Muralidharan <prasannatsmkumar@gmail.com>
>>> Signed-off-by: Mathieu Malaterre <malat@debian.org>
>>> Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
>>> ---
>>> .../bindings/nvmem/ingenic,jz4780-efuse.txt     | 17 +++++++++++++++++
>>> 1 file changed, 17 insertions(+)
>>> create mode 100644 Documentation/devicetree/bindings/nvmem/ingenic,jz4780-efuse.txt
>> Please convert to a DT schema.
> Is there someone of you who can help to do that?
>
> DT schemas are still like a Chinese dialect for me (i.e. I can decipher with help but neither speak nor write).
>
> BR and thanks,
> Nikolaus

I am also suffering from this, and I am going to ask Paul for advice.

>
>>> diff --git a/Documentation/devicetree/bindings/nvmem/ingenic,jz4780-efuse.txt b/Documentation/devicetree/bindings/nvmem/ingenic,jz4780-efuse.txt
>>> new file mode 100644
>>> index 000000000000..339e74daa9a9
>>> --- /dev/null
>>> +++ b/Documentation/devicetree/bindings/nvmem/ingenic,jz4780-efuse.txt
>>> @@ -0,0 +1,17 @@
>>> +Ingenic JZ EFUSE driver bindings
>>> +
>>> +Required properties:
>>> +- "compatible"		Must be set to "ingenic,jz4780-efuse"
>>> +- "reg"			Register location and length
>>> +- "clocks"		Handle for the ahb clock for the efuse.
>>> +- "clock-names"		Must be "bus_clk"
>> 'clk' is redundant. How about 'ahb'?

How about replace "bus_clk" with "efuse"? Other SoCs (like T21, X1000, 
X1500, X1830, X2000) has a dedicated bit in the CLKGR register to 
control the EFUSE clock.
A corresponding "XXX_CLK_EFUSE" is provided in the "xxx-cgu.c" driver.

Thanks and best regards!

>>> +
>>> +Example:
>>> +
>>> +efuse: efuse@134100d0 {
>>> +	compatible = "ingenic,jz4780-efuse";
>>> +	reg = <0x134100d0 0x2c>;
>>> +
>>> +	clocks = <&cgu JZ4780_CLK_AHB2>;
>>> +	clock-names = "bus_clk";
>>> +};
>>> -- 
>>> 2.23.0
>>>
Srinivas Kandagatla Feb. 19, 2020, 11:03 a.m. UTC | #4
On 19/02/2020 05:48, H. Nikolaus Schaller wrote:
>>> .../bindings/nvmem/ingenic,jz4780-efuse.txt     | 17 +++++++++++++++++
>>> 1 file changed, 17 insertions(+)
>>> create mode 100644 Documentation/devicetree/bindings/nvmem/ingenic,jz4780-efuse.txt
>> Please convert to a DT schema.
> Is there someone of you who can help to do that?
> 
> DT schemas are still like a Chinese dialect for me (i.e. I can decipher with help but neither speak nor write).


Have a look at an example here:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/nvmem/allwinner,sun4i-a10-sid.yaml?h=v5.6-rc2

Some documentation:
https://lwn.net/Articles/771621/


--srini

> 
> BR and thanks,
> Nikolaus
>
Jiaxun Yang Feb. 20, 2020, 1:56 p.m. UTC | #5
--
Jiaxun Yang

 ---- 在 星期三, 2020-02-19 13:48:56 H. Nikolaus Schaller <hns@goldelico.com> 撰写 ----
 > 
 > > Am 18.02.2020 um 22:26 schrieb Rob Herring <robh@kernel.org>:
 > > 
 > > On Mon, Feb 17, 2020 at 05:55:26PM +0100, H. Nikolaus Schaller wrote:
 > >> From: PrasannaKumar Muralidharan <prasannatsmkumar@gmail.com>
 > >> 
 > >> This patch brings support for the JZ4780 efuse. Currently it only expose
 > >> a read only access to the entire 8K bits efuse memory.
 > >> 
 > >> Tested-by: Mathieu Malaterre <malat@debian.org>
 > >> Signed-off-by: PrasannaKumar Muralidharan <prasannatsmkumar@gmail.com>
 > >> Signed-off-by: Mathieu Malaterre <malat@debian.org>
 > >> Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
 > >> ---
 > >> .../bindings/nvmem/ingenic,jz4780-efuse.txt     | 17 +++++++++++++++++
 > >> 1 file changed, 17 insertions(+)
 > >> create mode 100644 Documentation/devicetree/bindings/nvmem/ingenic,jz4780-efuse.txt
 > > 
 > > Please convert to a DT schema.
 > 
 > Is there someone of you who can help to do that?
 > 
 > DT schemas are still like a Chinese dialect for me (i.e. I can decipher with help but neither speak nor write).

I just had a try.

https://paste.ubuntu.com/p/xgDdmwnGsz/

Not sure if it's correct.

Thanks.

 --
Jiaxun Yang
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/nvmem/ingenic,jz4780-efuse.txt b/Documentation/devicetree/bindings/nvmem/ingenic,jz4780-efuse.txt
new file mode 100644
index 000000000000..339e74daa9a9
--- /dev/null
+++ b/Documentation/devicetree/bindings/nvmem/ingenic,jz4780-efuse.txt
@@ -0,0 +1,17 @@ 
+Ingenic JZ EFUSE driver bindings
+
+Required properties:
+- "compatible"		Must be set to "ingenic,jz4780-efuse"
+- "reg"			Register location and length
+- "clocks"		Handle for the ahb clock for the efuse.
+- "clock-names"		Must be "bus_clk"
+
+Example:
+
+efuse: efuse@134100d0 {
+	compatible = "ingenic,jz4780-efuse";
+	reg = <0x134100d0 0x2c>;
+
+	clocks = <&cgu JZ4780_CLK_AHB2>;
+	clock-names = "bus_clk";
+};