diff mbox series

[3/3] dt-bindings: ddr: Add bindings for Samsung LPDDR3 memories

Message ID 20190906101344.3535-4-l.luba@partner.samsung.com (mailing list archive)
State Superseded
Headers show
Series Exynos5 DMC minor fixes | expand

Commit Message

Lukasz Luba Sept. 6, 2019, 10:13 a.m. UTC
Add description of bindings for Samsung k3qf2f20db LPDDR3 memory.
Minor fixes in the old documentation.

Signed-off-by: Lukasz Luba <l.luba@partner.samsung.com>
---
 .../devicetree/bindings/ddr/lpddr3.txt        | 29 +++++++++++++++++--
 1 file changed, 27 insertions(+), 2 deletions(-)

Comments

Krzysztof Kozlowski Sept. 6, 2019, 10:56 a.m. UTC | #1
On Fri, 6 Sep 2019 at 12:14, Lukasz Luba <l.luba@partner.samsung.com> wrote:
>
> Add description of bindings for Samsung k3qf2f20db LPDDR3 memory.
> Minor fixes in the old documentation.
>
> Signed-off-by: Lukasz Luba <l.luba@partner.samsung.com>
> ---
>  .../devicetree/bindings/ddr/lpddr3.txt        | 29 +++++++++++++++++--
>  1 file changed, 27 insertions(+), 2 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/ddr/lpddr3.txt b/Documentation/devicetree/bindings/ddr/lpddr3.txt
> index 3b2485b84b3f..de0905239767 100644
> --- a/Documentation/devicetree/bindings/ddr/lpddr3.txt
> +++ b/Documentation/devicetree/bindings/ddr/lpddr3.txt
> @@ -40,10 +40,34 @@ Child nodes:
>    a given speed-bin. Please see Documentation/devicetree/
>    bindings/ddr/lpddr3-timings.txt for more information on "lpddr3-timings"
>
> +Samsung K3QF2F20DB LPDDR3 memory
> +------------------------------------------------------------
> +
> +This binding uses the LPDDR3 binding (described above)
> +
> +Required properties:
> +- compatible:  Should be:
> +               "samsung,K3QF2F20DB"
> +               followed by "jedec,lpddr3"
> +- density  : <u32> representing density in Mb (Mega bits)
> +- io-width : <u32> representing bus width. Possible value 32
> +- #address-cells: Must be set to 1
> +- #size-cells: Must be set to 0

If you decided to repeat all properties again, then it deserves its
own bindings file. However I though about simpler solution - just
document compatible. Exactly the same as AT24 or AT25 EEPROM bindings.
There is not much benefit from copying all these properties.

Best regards,
Krzysztof
Lukasz Luba Sept. 6, 2019, 11:39 a.m. UTC | #2
Hi Krzysztof,

On 9/6/19 12:56 PM, Krzysztof Kozlowski wrote:
> On Fri, 6 Sep 2019 at 12:14, Lukasz Luba <l.luba@partner.samsung.com> wrote:
>>
>> Add description of bindings for Samsung k3qf2f20db LPDDR3 memory.
>> Minor fixes in the old documentation.
>>
>> Signed-off-by: Lukasz Luba <l.luba@partner.samsung.com>
>> ---
>>   .../devicetree/bindings/ddr/lpddr3.txt        | 29 +++++++++++++++++--
>>   1 file changed, 27 insertions(+), 2 deletions(-)
>>
>> diff --git a/Documentation/devicetree/bindings/ddr/lpddr3.txt b/Documentation/devicetree/bindings/ddr/lpddr3.txt
>> index 3b2485b84b3f..de0905239767 100644
>> --- a/Documentation/devicetree/bindings/ddr/lpddr3.txt
>> +++ b/Documentation/devicetree/bindings/ddr/lpddr3.txt
>> @@ -40,10 +40,34 @@ Child nodes:
>>     a given speed-bin. Please see Documentation/devicetree/
>>     bindings/ddr/lpddr3-timings.txt for more information on "lpddr3-timings"
>>
>> +Samsung K3QF2F20DB LPDDR3 memory
>> +------------------------------------------------------------
>> +
>> +This binding uses the LPDDR3 binding (described above)
>> +
>> +Required properties:
>> +- compatible:  Should be:
>> +               "samsung,K3QF2F20DB"
>> +               followed by "jedec,lpddr3"
>> +- density  : <u32> representing density in Mb (Mega bits)
>> +- io-width : <u32> representing bus width. Possible value 32
>> +- #address-cells: Must be set to 1
>> +- #size-cells: Must be set to 0
> 
> If you decided to repeat all properties again, then it deserves its
> own bindings file. However I though about simpler solution - just
> document compatible. Exactly the same as AT24 or AT25 EEPROM bindings.
> There is not much benefit from copying all these properties.
OK, I see. I will add only 'compatible' and skip the rest then.
So the lpddr3.txt file will get this addition:

+Samsung K3QF2F20DB LPDDR3 memory
+------------------------------------------------------------
+
+This binding uses the LPDDR3 binding (described above)
+
+Required properties:
+- compatible:  Should be:
+               "samsung,K3QF2F20DB"
+               followed by "jedec,lpddr3"
+
+Optional properties:
+
+The optional properties are the same as in the LPDDR3 generic bindings and
+values should be taken from the data-sheet. Detailed bindings are described
+above.
+
+Child nodes:
+
+Detailed bindings are described in LPDDR3 generic bindings described above.
+

Is it OK?

Regards,
Lukasz
Krzysztof Kozlowski Sept. 6, 2019, 11:50 a.m. UTC | #3
On Fri, 6 Sep 2019 at 13:39, Lukasz Luba <l.luba@partner.samsung.com> wrote:
>
> Hi Krzysztof,
>
> On 9/6/19 12:56 PM, Krzysztof Kozlowski wrote:
> > On Fri, 6 Sep 2019 at 12:14, Lukasz Luba <l.luba@partner.samsung.com> wrote:
> >>
> >> Add description of bindings for Samsung k3qf2f20db LPDDR3 memory.
> >> Minor fixes in the old documentation.
> >>
> >> Signed-off-by: Lukasz Luba <l.luba@partner.samsung.com>
> >> ---
> >>   .../devicetree/bindings/ddr/lpddr3.txt        | 29 +++++++++++++++++--
> >>   1 file changed, 27 insertions(+), 2 deletions(-)
> >>
> >> diff --git a/Documentation/devicetree/bindings/ddr/lpddr3.txt b/Documentation/devicetree/bindings/ddr/lpddr3.txt
> >> index 3b2485b84b3f..de0905239767 100644
> >> --- a/Documentation/devicetree/bindings/ddr/lpddr3.txt
> >> +++ b/Documentation/devicetree/bindings/ddr/lpddr3.txt
> >> @@ -40,10 +40,34 @@ Child nodes:
> >>     a given speed-bin. Please see Documentation/devicetree/
> >>     bindings/ddr/lpddr3-timings.txt for more information on "lpddr3-timings"
> >>
> >> +Samsung K3QF2F20DB LPDDR3 memory
> >> +------------------------------------------------------------
> >> +
> >> +This binding uses the LPDDR3 binding (described above)
> >> +
> >> +Required properties:
> >> +- compatible:  Should be:
> >> +               "samsung,K3QF2F20DB"
> >> +               followed by "jedec,lpddr3"
> >> +- density  : <u32> representing density in Mb (Mega bits)
> >> +- io-width : <u32> representing bus width. Possible value 32
> >> +- #address-cells: Must be set to 1
> >> +- #size-cells: Must be set to 0
> >
> > If you decided to repeat all properties again, then it deserves its
> > own bindings file. However I though about simpler solution - just
> > document compatible. Exactly the same as AT24 or AT25 EEPROM bindings.
> > There is not much benefit from copying all these properties.
> OK, I see. I will add only 'compatible' and skip the rest then.
> So the lpddr3.txt file will get this addition:
>
> +Samsung K3QF2F20DB LPDDR3 memory
> +------------------------------------------------------------
> +
> +This binding uses the LPDDR3 binding (described above)
> +
> +Required properties:
> +- compatible:  Should be:
> +               "samsung,K3QF2F20DB"
> +               followed by "jedec,lpddr3"
> +
> +Optional properties:
> +
> +The optional properties are the same as in the LPDDR3 generic bindings and
> +values should be taken from the data-sheet. Detailed bindings are described
> +above.
> +
> +Child nodes:
> +
> +Detailed bindings are described in LPDDR3 generic bindings described above.
> +
>
> Is it OK?

To me it is still a lot of text just for one compatible and I can
image more of such entries for other memories... However I do not mind
and anyway, YAML will simplify it. If you're in doubt, wait for Rob's
reply as this is his part.

Best regards,
Krzysztof
Lukasz Luba Sept. 6, 2019, 12:14 p.m. UTC | #4
On 9/6/19 1:50 PM, Krzysztof Kozlowski wrote:
> On Fri, 6 Sep 2019 at 13:39, Lukasz Luba <l.luba@partner.samsung.com> wrote:
>>
>> Hi Krzysztof,
>>
>> On 9/6/19 12:56 PM, Krzysztof Kozlowski wrote:
>>> On Fri, 6 Sep 2019 at 12:14, Lukasz Luba <l.luba@partner.samsung.com> wrote:
>>>>
>>>> Add description of bindings for Samsung k3qf2f20db LPDDR3 memory.
>>>> Minor fixes in the old documentation.
>>>>
>>>> Signed-off-by: Lukasz Luba <l.luba@partner.samsung.com>
>>>> ---
>>>>    .../devicetree/bindings/ddr/lpddr3.txt        | 29 +++++++++++++++++--
>>>>    1 file changed, 27 insertions(+), 2 deletions(-)
>>>>
>>>> diff --git a/Documentation/devicetree/bindings/ddr/lpddr3.txt b/Documentation/devicetree/bindings/ddr/lpddr3.txt
>>>> index 3b2485b84b3f..de0905239767 100644
>>>> --- a/Documentation/devicetree/bindings/ddr/lpddr3.txt
>>>> +++ b/Documentation/devicetree/bindings/ddr/lpddr3.txt
>>>> @@ -40,10 +40,34 @@ Child nodes:
>>>>      a given speed-bin. Please see Documentation/devicetree/
>>>>      bindings/ddr/lpddr3-timings.txt for more information on "lpddr3-timings"
>>>>
>>>> +Samsung K3QF2F20DB LPDDR3 memory
>>>> +------------------------------------------------------------
>>>> +
>>>> +This binding uses the LPDDR3 binding (described above)
>>>> +
>>>> +Required properties:
>>>> +- compatible:  Should be:
>>>> +               "samsung,K3QF2F20DB"
>>>> +               followed by "jedec,lpddr3"
>>>> +- density  : <u32> representing density in Mb (Mega bits)
>>>> +- io-width : <u32> representing bus width. Possible value 32
>>>> +- #address-cells: Must be set to 1
>>>> +- #size-cells: Must be set to 0
>>>
>>> If you decided to repeat all properties again, then it deserves its
>>> own bindings file. However I though about simpler solution - just
>>> document compatible. Exactly the same as AT24 or AT25 EEPROM bindings.
>>> There is not much benefit from copying all these properties.
>> OK, I see. I will add only 'compatible' and skip the rest then.
>> So the lpddr3.txt file will get this addition:
>>
>> +Samsung K3QF2F20DB LPDDR3 memory
>> +------------------------------------------------------------
>> +
>> +This binding uses the LPDDR3 binding (described above)
>> +
>> +Required properties:
>> +- compatible:  Should be:
>> +               "samsung,K3QF2F20DB"
>> +               followed by "jedec,lpddr3"
>> +
>> +Optional properties:
>> +
>> +The optional properties are the same as in the LPDDR3 generic bindings and
>> +values should be taken from the data-sheet. Detailed bindings are described
>> +above.
>> +
>> +Child nodes:
>> +
>> +Detailed bindings are described in LPDDR3 generic bindings described above.
>> +
>>
>> Is it OK?
> 
> To me it is still a lot of text just for one compatible and I can
> image more of such entries for other memories... However I do not mind
> and anyway, YAML will simplify it. If you're in doubt, wait for Rob's
> reply as this is his part.

You are definitely right, YAML will simplify this.
I will wait a few days with the v2 series, maybe Rob would like to see
something different. If not, I will send v2 with the above change.
Thank you for your comments.

Regards,
Lukasz
Rob Herring Sept. 13, 2019, 2:36 p.m. UTC | #5
On Fri, Sep 06, 2019 at 01:50:26PM +0200, Krzysztof Kozlowski wrote:
> On Fri, 6 Sep 2019 at 13:39, Lukasz Luba <l.luba@partner.samsung.com> wrote:
> >
> > Hi Krzysztof,
> >
> > On 9/6/19 12:56 PM, Krzysztof Kozlowski wrote:
> > > On Fri, 6 Sep 2019 at 12:14, Lukasz Luba <l.luba@partner.samsung.com> wrote:
> > >>
> > >> Add description of bindings for Samsung k3qf2f20db LPDDR3 memory.
> > >> Minor fixes in the old documentation.
> > >>
> > >> Signed-off-by: Lukasz Luba <l.luba@partner.samsung.com>
> > >> ---
> > >>   .../devicetree/bindings/ddr/lpddr3.txt        | 29 +++++++++++++++++--
> > >>   1 file changed, 27 insertions(+), 2 deletions(-)
> > >>
> > >> diff --git a/Documentation/devicetree/bindings/ddr/lpddr3.txt b/Documentation/devicetree/bindings/ddr/lpddr3.txt
> > >> index 3b2485b84b3f..de0905239767 100644
> > >> --- a/Documentation/devicetree/bindings/ddr/lpddr3.txt
> > >> +++ b/Documentation/devicetree/bindings/ddr/lpddr3.txt
> > >> @@ -40,10 +40,34 @@ Child nodes:
> > >>     a given speed-bin. Please see Documentation/devicetree/
> > >>     bindings/ddr/lpddr3-timings.txt for more information on "lpddr3-timings"
> > >>
> > >> +Samsung K3QF2F20DB LPDDR3 memory
> > >> +------------------------------------------------------------
> > >> +
> > >> +This binding uses the LPDDR3 binding (described above)
> > >> +
> > >> +Required properties:
> > >> +- compatible:  Should be:
> > >> +               "samsung,K3QF2F20DB"
> > >> +               followed by "jedec,lpddr3"
> > >> +- density  : <u32> representing density in Mb (Mega bits)
> > >> +- io-width : <u32> representing bus width. Possible value 32
> > >> +- #address-cells: Must be set to 1
> > >> +- #size-cells: Must be set to 0
> > >
> > > If you decided to repeat all properties again, then it deserves its
> > > own bindings file. However I though about simpler solution - just
> > > document compatible. Exactly the same as AT24 or AT25 EEPROM bindings.
> > > There is not much benefit from copying all these properties.
> > OK, I see. I will add only 'compatible' and skip the rest then.
> > So the lpddr3.txt file will get this addition:
> >
> > +Samsung K3QF2F20DB LPDDR3 memory
> > +------------------------------------------------------------
> > +
> > +This binding uses the LPDDR3 binding (described above)
> > +
> > +Required properties:
> > +- compatible:  Should be:
> > +               "samsung,K3QF2F20DB"
> > +               followed by "jedec,lpddr3"
> > +
> > +Optional properties:
> > +
> > +The optional properties are the same as in the LPDDR3 generic bindings and
> > +values should be taken from the data-sheet. Detailed bindings are described
> > +above.
> > +
> > +Child nodes:
> > +
> > +Detailed bindings are described in LPDDR3 generic bindings described above.
> > +
> >
> > Is it OK?
> 
> To me it is still a lot of text just for one compatible and I can
> image more of such entries for other memories... However I do not mind
> and anyway, YAML will simplify it. If you're in doubt, wait for Rob's
> reply as this is his part.

We can't have multiple (top-level) schema in one file, so better to add 
in where the existing compatible strings are.

Rob
Lukasz Luba Sept. 16, 2019, 9:49 a.m. UTC | #6
Hi Rob,

On 9/13/19 4:36 PM, Rob Herring wrote:
> On Fri, Sep 06, 2019 at 01:50:26PM +0200, Krzysztof Kozlowski wrote:
>> On Fri, 6 Sep 2019 at 13:39, Lukasz Luba <l.luba@partner.samsung.com> wrote:
>>>
>>> Hi Krzysztof,
>>>
>>> On 9/6/19 12:56 PM, Krzysztof Kozlowski wrote:
>>>> On Fri, 6 Sep 2019 at 12:14, Lukasz Luba <l.luba@partner.samsung.com> wrote:
>>>>>
>>>>> Add description of bindings for Samsung k3qf2f20db LPDDR3 memory.
>>>>> Minor fixes in the old documentation.
>>>>>
>>>>> Signed-off-by: Lukasz Luba <l.luba@partner.samsung.com>
>>>>> ---
>>>>>    .../devicetree/bindings/ddr/lpddr3.txt        | 29 +++++++++++++++++--
>>>>>    1 file changed, 27 insertions(+), 2 deletions(-)
>>>>>
>>>>> diff --git a/Documentation/devicetree/bindings/ddr/lpddr3.txt b/Documentation/devicetree/bindings/ddr/lpddr3.txt
>>>>> index 3b2485b84b3f..de0905239767 100644
>>>>> --- a/Documentation/devicetree/bindings/ddr/lpddr3.txt
>>>>> +++ b/Documentation/devicetree/bindings/ddr/lpddr3.txt
>>>>> @@ -40,10 +40,34 @@ Child nodes:
>>>>>      a given speed-bin. Please see Documentation/devicetree/
>>>>>      bindings/ddr/lpddr3-timings.txt for more information on "lpddr3-timings"
>>>>>
>>>>> +Samsung K3QF2F20DB LPDDR3 memory
>>>>> +------------------------------------------------------------
>>>>> +
>>>>> +This binding uses the LPDDR3 binding (described above)
>>>>> +
>>>>> +Required properties:
>>>>> +- compatible:  Should be:
>>>>> +               "samsung,K3QF2F20DB"
>>>>> +               followed by "jedec,lpddr3"
>>>>> +- density  : <u32> representing density in Mb (Mega bits)
>>>>> +- io-width : <u32> representing bus width. Possible value 32
>>>>> +- #address-cells: Must be set to 1
>>>>> +- #size-cells: Must be set to 0
>>>>
>>>> If you decided to repeat all properties again, then it deserves its
>>>> own bindings file. However I though about simpler solution - just
>>>> document compatible. Exactly the same as AT24 or AT25 EEPROM bindings.
>>>> There is not much benefit from copying all these properties.
>>> OK, I see. I will add only 'compatible' and skip the rest then.
>>> So the lpddr3.txt file will get this addition:
>>>
>>> +Samsung K3QF2F20DB LPDDR3 memory
>>> +------------------------------------------------------------
>>> +
>>> +This binding uses the LPDDR3 binding (described above)
>>> +
>>> +Required properties:
>>> +- compatible:  Should be:
>>> +               "samsung,K3QF2F20DB"
>>> +               followed by "jedec,lpddr3"
>>> +
>>> +Optional properties:
>>> +
>>> +The optional properties are the same as in the LPDDR3 generic bindings and
>>> +values should be taken from the data-sheet. Detailed bindings are described
>>> +above.
>>> +
>>> +Child nodes:
>>> +
>>> +Detailed bindings are described in LPDDR3 generic bindings described above.
>>> +
>>>
>>> Is it OK?
>>
>> To me it is still a lot of text just for one compatible and I can
>> image more of such entries for other memories... However I do not mind
>> and anyway, YAML will simplify it. If you're in doubt, wait for Rob's
>> reply as this is his part.
> 
> We can't have multiple (top-level) schema in one file, so better to add
> in where the existing compatible strings are.

Thank you for your comment. I will add the needed string into existing
compatible then.

Regards,
Lukasz
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/ddr/lpddr3.txt b/Documentation/devicetree/bindings/ddr/lpddr3.txt
index 3b2485b84b3f..de0905239767 100644
--- a/Documentation/devicetree/bindings/ddr/lpddr3.txt
+++ b/Documentation/devicetree/bindings/ddr/lpddr3.txt
@@ -40,10 +40,34 @@  Child nodes:
   a given speed-bin. Please see Documentation/devicetree/
   bindings/ddr/lpddr3-timings.txt for more information on "lpddr3-timings"
 
+Samsung K3QF2F20DB LPDDR3 memory
+------------------------------------------------------------
+
+This binding uses the LPDDR3 binding (described above)
+
+Required properties:
+- compatible:	Should be:
+		"samsung,K3QF2F20DB"
+		followed by "jedec,lpddr3"
+- density  : <u32> representing density in Mb (Mega bits)
+- io-width : <u32> representing bus width. Possible value 32
+- #address-cells: Must be set to 1
+- #size-cells: Must be set to 0
+
+Optional properties:
+
+The optional properties are the same as in the LPDDR3 generic bindings and
+values should be taken from the data-sheet. Detailed bindings are described
+above.
+
+Child nodes:
+
+Detailed bindings are described in LPDDR3 generic bindings described above.
+
 Example:
 
 samsung_K3QF2F20DB: lpddr3 {
-	compatible	= "Samsung,K3QF2F20DB", "jedec,lpddr3";
+	compatible	= "samsung,K3QF2F20DB", "jedec,lpddr3";
 	density		= <16384>;
 	io-width	= <32>;
 	#address-cells	= <1>;
@@ -73,7 +97,8 @@  samsung_K3QF2F20DB: lpddr3 {
 
 	timings_samsung_K3QF2F20DB_800mhz: lpddr3-timings@800000000 {
 		compatible	= "jedec,lpddr3-timings";
-		reg		= <800000000>; /* workaround: it shows max-freq */
+		/* workaround: 'reg' shows max-freq */
+		reg		= <800000000>;
 		min-freq	= <100000000>;
 		tRFC		= <65000>;
 		tRRD		= <6000>;