mbox series

[v13,0/8] Exynos5 Dynamic Memory Controller driver

Message ID 20190821104303.32079-1-l.luba@partner.samsung.com (mailing list archive)
Headers show
Series Exynos5 Dynamic Memory Controller driver | expand

Message

Lukasz Luba Aug. 21, 2019, 10:42 a.m. UTC
Hi all,

This is v13 which makes cosmetic changes. It is based on current mainline
(v5.3-rc5) with with devfreq/for-next where there is a PPMU patch [1].

The patch set adds support of Dynamic Memory Controller for Exynos5422 SoC.
The driver supports Dynamic Voltage and Frequency Scaling
for the DMC and DRAM. It also provides needed timings for different
speed operations of the DRAM memory.
There is also new generic code in of_memory and headers which allows to parse
LPDDR3 memories defined in device-tree.

Here are the last changes suggested by Krzysztof during his review.
For the previous changes in older revisions please refer to [2], there is
more detailed change log.

changes:
v13:
- skipped patch with chipID changes in DT, since it is not used anymore,
- removed license comment in of_memory.c since SPDX has been merged,
- aligned comment to the current fields in the structure,
- changed printed warning when timings are not found,

Regards,
Lukasz Luba

[1] https://git.kernel.org/pub/scm/linux/kernel/git/mzx/devfreq.git/commit/?h=for-next&id=b617376df8f01c975dee66802f4da16291f92079
[2] https://lkml.org/lkml/2019/7/22/251


Lukasz Luba (8):
  dt-bindings: ddr: rename lpddr2 directory
  dt-bindings: ddr: add LPDDR3 memories
  drivers: memory: extend of_memory by LPDDR3 support
  dt-bindings: memory-controllers: add Exynos5422 DMC device description
  drivers: memory: add DMC driver for Exynos5422
  ARM: dts: exynos: add syscon to clock compatible
  ARM: dts: exynos: add DMC device for exynos5422
  ARM: exynos_defconfig: enable DMC driver

 .../{lpddr2 => ddr}/lpddr2-timings.txt        |    0
 .../bindings/{lpddr2 => ddr}/lpddr2.txt       |    2 +-
 .../bindings/ddr/lpddr3-timings.txt           |   58 +
 .../devicetree/bindings/ddr/lpddr3.txt        |   97 ++
 .../memory-controllers/exynos5422-dmc.txt     |   73 +
 MAINTAINERS                                   |    8 +
 arch/arm/boot/dts/exynos5420.dtsi             |   73 +-
 arch/arm/boot/dts/exynos5422-odroid-core.dtsi |  116 ++
 arch/arm/boot/dts/exynos5800.dtsi             |    2 +-
 arch/arm/configs/exynos_defconfig             |    1 +
 drivers/memory/jedec_ddr.h                    |   61 +
 drivers/memory/of_memory.c                    |  149 ++
 drivers/memory/of_memory.h                    |   18 +
 drivers/memory/samsung/Kconfig                |   13 +
 drivers/memory/samsung/Makefile               |    1 +
 drivers/memory/samsung/exynos5422-dmc.c       | 1257 +++++++++++++++++
 16 files changed, 1926 insertions(+), 3 deletions(-)
 rename Documentation/devicetree/bindings/{lpddr2 => ddr}/lpddr2-timings.txt (100%)
 rename Documentation/devicetree/bindings/{lpddr2 => ddr}/lpddr2.txt (96%)
 create mode 100644 Documentation/devicetree/bindings/ddr/lpddr3-timings.txt
 create mode 100644 Documentation/devicetree/bindings/ddr/lpddr3.txt
 create mode 100644 Documentation/devicetree/bindings/memory-controllers/exynos5422-dmc.txt
 create mode 100644 drivers/memory/samsung/exynos5422-dmc.c

Comments

Krzysztof Kozlowski Sept. 4, 2019, 10:16 a.m. UTC | #1
On Wed, 21 Aug 2019 at 12:43, Lukasz Luba <l.luba@partner.samsung.com> wrote:
>
> Hi all,
>
> This is v13 which makes cosmetic changes. It is based on current mainline
> (v5.3-rc5) with with devfreq/for-next where there is a PPMU patch [1].
>
> The patch set adds support of Dynamic Memory Controller for Exynos5422 SoC.
> The driver supports Dynamic Voltage and Frequency Scaling
> for the DMC and DRAM. It also provides needed timings for different
> speed operations of the DRAM memory.
> There is also new generic code in of_memory and headers which allows to parse
> LPDDR3 memories defined in device-tree.
>
> Here are the last changes suggested by Krzysztof during his review.
> For the previous changes in older revisions please refer to [2], there is
> more detailed change log.
>
> changes:
> v13:
> - skipped patch with chipID changes in DT, since it is not used anymore,
> - removed license comment in of_memory.c since SPDX has been merged,
> - aligned comment to the current fields in the structure,
> - changed printed warning when timings are not found,
>
> Regards,
> Lukasz Luba
>
> [1] https://git.kernel.org/pub/scm/linux/kernel/git/mzx/devfreq.git/commit/?h=for-next&id=b617376df8f01c975dee66802f4da16291f92079
> [2] https://lkml.org/lkml/2019/7/22/251
>

Hi Lukasz,

Thanks for the effort and work on this patchset. The text-based
bindings are slowly converted to JSON-schema but your patches were
developed some time ago and have Rob's review. It would be nice if you
or someone converted it to JSON schema later.
Anyway, I'll pick up everything today evening either for this merge
window or eventually postponed till next one. It is quite late in the
cycle and I want the patches to sit in linux-next for some time.

Best regards,
Krzysztof
Lukasz Luba Sept. 4, 2019, 2:59 p.m. UTC | #2
Hi Krzysztof,

On 9/4/19 12:16 PM, Krzysztof Kozlowski wrote:
> On Wed, 21 Aug 2019 at 12:43, Lukasz Luba <l.luba@partner.samsung.com> wrote:
>>
>> Hi all,
>>
>> This is v13 which makes cosmetic changes. It is based on current mainline
>> (v5.3-rc5) with with devfreq/for-next where there is a PPMU patch [1].
>>
>> The patch set adds support of Dynamic Memory Controller for Exynos5422 SoC.
>> The driver supports Dynamic Voltage and Frequency Scaling
>> for the DMC and DRAM. It also provides needed timings for different
>> speed operations of the DRAM memory.
>> There is also new generic code in of_memory and headers which allows to parse
>> LPDDR3 memories defined in device-tree.
>>
>> Here are the last changes suggested by Krzysztof during his review.
>> For the previous changes in older revisions please refer to [2], there is
>> more detailed change log.
>>
>> changes:
>> v13:
>> - skipped patch with chipID changes in DT, since it is not used anymore,
>> - removed license comment in of_memory.c since SPDX has been merged,
>> - aligned comment to the current fields in the structure,
>> - changed printed warning when timings are not found,
>>
>> Regards,
>> Lukasz Luba
>>
>> [1] https://git.kernel.org/pub/scm/linux/kernel/git/mzx/devfreq.git/commit/?h=for-next&id=b617376df8f01c975dee66802f4da16291f92079
>> [2] https://lkml.org/lkml/2019/7/22/251
>>
> 
> Hi Lukasz,
> 
> Thanks for the effort and work on this patchset. The text-based
> bindings are slowly converted to JSON-schema but your patches were
> developed some time ago and have Rob's review. It would be nice if you
> or someone converted it to JSON schema later.
> Anyway, I'll pick up everything today evening either for this merge
> window or eventually postponed till next one. It is quite late in the
> cycle and I want the patches to sit in linux-next for some time.
Thank you for taking the patches.
OK, I will convert the bindings to JSON format later, when the patches
land into mainline.

Regards,
Lukasz Luba
> 
> Best regards,
> Krzysztof
> 
>
Krzysztof Kozlowski Sept. 4, 2019, 6:40 p.m. UTC | #3
On Wed, Aug 21, 2019 at 12:42:55PM +0200, Lukasz Luba wrote:
> Hi all,
> 
> This is v13 which makes cosmetic changes. It is based on current mainline
> (v5.3-rc5) with with devfreq/for-next where there is a PPMU patch [1].
> 
> The patch set adds support of Dynamic Memory Controller for Exynos5422 SoC.
> The driver supports Dynamic Voltage and Frequency Scaling
> for the DMC and DRAM. It also provides needed timings for different
> speed operations of the DRAM memory.
> There is also new generic code in of_memory and headers which allows to parse
> LPDDR3 memories defined in device-tree.
> 
> Here are the last changes suggested by Krzysztof during his review.
> For the previous changes in older revisions please refer to [2], there is
> more detailed change log.
> 
> changes:
> v13:
> - skipped patch with chipID changes in DT, since it is not used anymore,
> - removed license comment in of_memory.c since SPDX has been merged,
> - aligned comment to the current fields in the structure,
> - changed printed warning when timings are not found,
> 
> Regards,
> Lukasz Luba
> 
> [1] https://git.kernel.org/pub/scm/linux/kernel/git/mzx/devfreq.git/commit/?h=for-next&id=b617376df8f01c975dee66802f4da16291f92079
> [2] https://lkml.org/lkml/2019/7/22/251
> 

Thanks, applied entire set (except last defconfig patch) to two topic
branches, either for v5.4 or for v5.5 (it is quite late). I'll take the
last defconfig separately.

Automated tools found few issues to fix, please send incremental
patches.

In general, for new drivers always run automated checks - Smatch and
Sparse. Coccinelle is also recommended. Checkpatch pointed missing
compatible documentation - need to be fixed (see
https://elixir.bootlin.com/linux/v5.3-rc7/source/Documentation/devicetree/bindings/eeprom/at25.txt
as an example).

Best regards,
Krzysztof
Lukasz Luba Sept. 6, 2019, 8:47 a.m. UTC | #4
On 9/4/19 8:40 PM, Krzysztof Kozlowski wrote:
> On Wed, Aug 21, 2019 at 12:42:55PM +0200, Lukasz Luba wrote:
>> Hi all,
>>
>> This is v13 which makes cosmetic changes. It is based on current mainline
>> (v5.3-rc5) with with devfreq/for-next where there is a PPMU patch [1].
>>
>> The patch set adds support of Dynamic Memory Controller for Exynos5422 SoC.
>> The driver supports Dynamic Voltage and Frequency Scaling
>> for the DMC and DRAM. It also provides needed timings for different
>> speed operations of the DRAM memory.
>> There is also new generic code in of_memory and headers which allows to parse
>> LPDDR3 memories defined in device-tree.
>>
>> Here are the last changes suggested by Krzysztof during his review.
>> For the previous changes in older revisions please refer to [2], there is
>> more detailed change log.
>>
>> changes:
>> v13:
>> - skipped patch with chipID changes in DT, since it is not used anymore,
>> - removed license comment in of_memory.c since SPDX has been merged,
>> - aligned comment to the current fields in the structure,
>> - changed printed warning when timings are not found,
>>
>> Regards,
>> Lukasz Luba
>>
>> [1] https://git.kernel.org/pub/scm/linux/kernel/git/mzx/devfreq.git/commit/?h=for-next&id=b617376df8f01c975dee66802f4da16291f92079
>> [2] https://lkml.org/lkml/2019/7/22/251
>>
> 
> Thanks, applied entire set (except last defconfig patch) to two topic
> branches, either for v5.4 or for v5.5 (it is quite late). I'll take the
> last defconfig separately.
> 
> Automated tools found few issues to fix, please send incremental
> patches.
OK, there will be around 3 patches with fixes.
> 
> In general, for new drivers always run automated checks - Smatch and
> Sparse. Coccinelle is also recommended. Checkpatch pointed missing
> compatible documentation - need to be fixed (see
> https://elixir.bootlin.com/linux/v5.3-rc7/source/Documentation/devicetree/bindings/eeprom/at25.txt
> as an example).
As I have responded in my previous email, I ignored it since Elpida
lpddr2 does not have bindings documentation. I will create the needed
documentation file in the follow up patch.

Regards,
Lukasz
Krzysztof Kozlowski Oct. 1, 2019, 7:29 p.m. UTC | #5
On Wed, Aug 21, 2019 at 12:42:55PM +0200, Lukasz Luba wrote:
> Hi all,
> 
> This is v13 which makes cosmetic changes. It is based on current mainline
> (v5.3-rc5) with with devfreq/for-next where there is a PPMU patch [1].
> 
> The patch set adds support of Dynamic Memory Controller for Exynos5422 SoC.
> The driver supports Dynamic Voltage and Frequency Scaling
> for the DMC and DRAM. It also provides needed timings for different
> speed operations of the DRAM memory.
> There is also new generic code in of_memory and headers which allows to parse
> LPDDR3 memories defined in device-tree.
> 
> Here are the last changes suggested by Krzysztof during his review.
> For the previous changes in older revisions please refer to [2], there is
> more detailed change log.
> 
> changes:
> v13:
> - skipped patch with chipID changes in DT, since it is not used anymore,
> - removed license comment in of_memory.c since SPDX has been merged,
> - aligned comment to the current fields in the structure,
> - changed printed warning when timings are not found,
> 
> Regards,
> Lukasz Luba
> 
> [1] https://git.kernel.org/pub/scm/linux/kernel/git/mzx/devfreq.git/commit/?h=for-next&id=b617376df8f01c975dee66802f4da16291f92079
> [2] https://lkml.org/lkml/2019/7/22/251
> 
> 
> Lukasz Luba (8):
>   dt-bindings: ddr: rename lpddr2 directory
>   dt-bindings: ddr: add LPDDR3 memories
>   drivers: memory: extend of_memory by LPDDR3 support
>   dt-bindings: memory-controllers: add Exynos5422 DMC device description
>   drivers: memory: add DMC driver for Exynos5422
>   ARM: dts: exynos: add syscon to clock compatible
>   ARM: dts: exynos: add DMC device for exynos5422
>   ARM: exynos_defconfig: enable DMC driver
>

Just to let you know:

I applied the set some days ago but this did not make to merge window.
Now, I put it on for-next branch so will appear on linux-next soon. I
also applied the fixes sent later.

I'll take also the latest work with interrupt mode for DMC (after minor
fix in bindings).

Best regards,
Krzysztof
Lukasz Luba Oct. 2, 2019, 6:01 a.m. UTC | #6
On 10/1/19 9:29 PM, Krzysztof Kozlowski wrote:
> On Wed, Aug 21, 2019 at 12:42:55PM +0200, Lukasz Luba wrote:
>> Hi all,
>>
>> This is v13 which makes cosmetic changes. It is based on current mainline
>> (v5.3-rc5) with with devfreq/for-next where there is a PPMU patch [1].
>>
>> The patch set adds support of Dynamic Memory Controller for Exynos5422 SoC.
>> The driver supports Dynamic Voltage and Frequency Scaling
>> for the DMC and DRAM. It also provides needed timings for different
>> speed operations of the DRAM memory.
>> There is also new generic code in of_memory and headers which allows to parse
>> LPDDR3 memories defined in device-tree.
>>
>> Here are the last changes suggested by Krzysztof during his review.
>> For the previous changes in older revisions please refer to [2], there is
>> more detailed change log.
>>
>> changes:
>> v13:
>> - skipped patch with chipID changes in DT, since it is not used anymore,
>> - removed license comment in of_memory.c since SPDX has been merged,
>> - aligned comment to the current fields in the structure,
>> - changed printed warning when timings are not found,
>>
>> Regards,
>> Lukasz Luba
>>
>> [1] https://git.kernel.org/pub/scm/linux/kernel/git/mzx/devfreq.git/commit/?h=for-next&id=b617376df8f01c975dee66802f4da16291f92079
>> [2] https://protect2.fireeye.com/url?k=76a66a31f783ea89.76a7e17e-142fcaf2360aff73&u=https://lkml.org/lkml/2019/7/22/251
>>
>>
>> Lukasz Luba (8):
>>    dt-bindings: ddr: rename lpddr2 directory
>>    dt-bindings: ddr: add LPDDR3 memories
>>    drivers: memory: extend of_memory by LPDDR3 support
>>    dt-bindings: memory-controllers: add Exynos5422 DMC device description
>>    drivers: memory: add DMC driver for Exynos5422
>>    ARM: dts: exynos: add syscon to clock compatible
>>    ARM: dts: exynos: add DMC device for exynos5422
>>    ARM: exynos_defconfig: enable DMC driver
>>
> 
> Just to let you know:
> 
> I applied the set some days ago but this did not make to merge window.
> Now, I put it on for-next branch so will appear on linux-next soon. I
> also applied the fixes sent later.

Thank you Krzysztof!

> 
> I'll take also the latest work with interrupt mode for DMC (after minor
> fix in bindings).
> 

I will send the latest IRQ mode version with this binding IRQ names
description in a minute.

Regards,
Lukasz