[U-Boot] [PATCH v2 0/3] rockchip: dts: rk3399-puma: add support for all three DDR3 speed-grades (1333/1600/1866) on the RK3399-Q7

The RK3399-Q7 was validated for three different speed grades of DDR3 (1333MT/s, 1600MT/s, 1866MT/s) to allow for some flexibility in assembly.
This series adds three different DTS variants for the board (which use a common DTSI and only differ in what DRAM timings they include in addition to this common DTSI) and makes the DDR3-1600 timing the default.
*Note* that this is rebased against u-boot-rockchip/master@2b19b2f (which is the same base used for the major RK3399-Q7 DTS update that syncs the U-Boot DTS with the one used in our Linux tree) and will cause a small conflict in merging rk3399-puma.{dts,dtsi}.
Changes in v2: - changed implementation from Kconfig and C preprocessor macros in the DTS to using one DTS per DRAM timing that contains only two includes: one for the common board-level definitions and one for the DRAM timings - added rk3399-puma-ddr1333 for DDR3-1333 timing (replacing the #ifdef implementation) - added rk3399-puma-ddr1866 DTS file for the DDR3-1866 implementation (replacing the #ifdef implementation)
Philipp Tomsich (3): rockchip: dts: rk3399-puma: refactor and rename (default) DDR3-1600 DTS rockchip: dts: rk3399-puma: add DTS for the DDR3-1333 timing rockchip: dts: rk3399-puma: add DTS for the DDR3-1866 timing
arch/arm/dts/Makefile | 4 +++- arch/arm/dts/rk3399-puma-ddr1333.dts | 11 +++++++++++ arch/arm/dts/rk3399-puma-ddr1600.dts | 11 +++++++++++ arch/arm/dts/rk3399-puma-ddr1866.dts | 11 +++++++++++ arch/arm/dts/{rk3399-puma.dts => rk3399-puma.dtsi} | 2 -- configs/puma-rk3399_defconfig | 2 +- 6 files changed, 37 insertions(+), 4 deletions(-) create mode 100644 arch/arm/dts/rk3399-puma-ddr1333.dts create mode 100644 arch/arm/dts/rk3399-puma-ddr1600.dts create mode 100644 arch/arm/dts/rk3399-puma-ddr1866.dts rename arch/arm/dts/{rk3399-puma.dts => rk3399-puma.dtsi} (98%)

To better support different RAM timings (DDR3-1333 and DDR3-1866 are assembly options for the RK3399-Q7), this refactors the DTS support and renames the default DTS variant from rk3399-puma to rk3399-puma-ddr1600: - changes the rk3399-puma DTS into a board-specific DTSI by removing the inclusion of the DRAM timings - adds a new rk3399-puma-ddr1600.dts, which includes the (new) common board DTSI and the DDR3-1600 timing DTSI - wires this up from arch/arm/dts/Makefile and configs/puma-rk3399_defconfig
Signed-off-by: Philipp Tomsich philipp.tomsich@theobroma-systems.com
---
Changes in v2: - changed implementation from Kconfig and C preprocessor macros in the DTS to using one DTS per DRAM timing that contains only two includes: one for the common board-level definitions and one for the DRAM timings
arch/arm/dts/Makefile | 2 +- arch/arm/dts/rk3399-puma-ddr1600.dts | 11 +++++++++++ arch/arm/dts/{rk3399-puma.dts => rk3399-puma.dtsi} | 2 -- configs/puma-rk3399_defconfig | 2 +- 4 files changed, 13 insertions(+), 4 deletions(-) create mode 100644 arch/arm/dts/rk3399-puma-ddr1600.dts rename arch/arm/dts/{rk3399-puma.dts => rk3399-puma.dtsi} (98%)
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index 86066a3..d9bb7f8 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile @@ -43,7 +43,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += \ rk3328-evb.dtb \ rk3399-evb.dtb \ rk3399-firefly.dtb \ - rk3399-puma.dtb \ + rk3399-puma-ddr1600.dtb \ rv1108-evb.dtb dtb-$(CONFIG_ARCH_MESON) += \ meson-gxbb-odroidc2.dtb diff --git a/arch/arm/dts/rk3399-puma-ddr1600.dts b/arch/arm/dts/rk3399-puma-ddr1600.dts new file mode 100644 index 0000000..31aaf70 --- /dev/null +++ b/arch/arm/dts/rk3399-puma-ddr1600.dts @@ -0,0 +1,11 @@ +/* + * (C) Copyright 2017 Theobroma Systems Design und Consulting GmbH + * + * SPDX-License-Identifier: GPL-2.0+ X11 + */ + +/dts-v1/; + +#include "rk3399-puma.dtsi" +#include "rk3399-sdram-ddr3-1600.dtsi" + diff --git a/arch/arm/dts/rk3399-puma.dts b/arch/arm/dts/rk3399-puma.dtsi similarity index 98% rename from arch/arm/dts/rk3399-puma.dts rename to arch/arm/dts/rk3399-puma.dtsi index c04a853..5544f14 100644 --- a/arch/arm/dts/rk3399-puma.dts +++ b/arch/arm/dts/rk3399-puma.dtsi @@ -4,10 +4,8 @@ * SPDX-License-Identifier: GPL-2.0+ X11 */
-/dts-v1/; #include <dt-bindings/pwm/pwm.h> #include "rk3399.dtsi" -#include "rk3399-sdram-ddr3-1600.dtsi"
/ { model = "Theobroma Systems RK3399-Q7 SoM"; diff --git a/configs/puma-rk3399_defconfig b/configs/puma-rk3399_defconfig index 577aa02..e07afdc 100644 --- a/configs/puma-rk3399_defconfig +++ b/configs/puma-rk3399_defconfig @@ -8,7 +8,7 @@ CONFIG_TARGET_PUMA_RK3399=y CONFIG_SPL_SPI_FLASH_SUPPORT=y CONFIG_SPL_SPI_SUPPORT=y CONFIG_SPL_STACK_R_ADDR=0x80000 -CONFIG_DEFAULT_DEVICE_TREE="rk3399-puma" +CONFIG_DEFAULT_DEVICE_TREE="rk3399-puma-ddr1600" CONFIG_FIT=y CONFIG_SPL_LOAD_FIT=y # CONFIG_DISPLAY_CPUINFO is not set

On 6 June 2017 at 12:44, Philipp Tomsich philipp.tomsich@theobroma-systems.com wrote:
To better support different RAM timings (DDR3-1333 and DDR3-1866 are assembly options for the RK3399-Q7), this refactors the DTS support and renames the default DTS variant from rk3399-puma to rk3399-puma-ddr1600:
- changes the rk3399-puma DTS into a board-specific DTSI by removing the inclusion of the DRAM timings
- adds a new rk3399-puma-ddr1600.dts, which includes the (new) common board DTSI and the DDR3-1600 timing DTSI
- wires this up from arch/arm/dts/Makefile and configs/puma-rk3399_defconfig
Signed-off-by: Philipp Tomsich philipp.tomsich@theobroma-systems.com
Changes in v2:
- changed implementation from Kconfig and C preprocessor macros in the DTS to using one DTS per DRAM timing that contains only two includes: one for the common board-level definitions and one for the DRAM timings
arch/arm/dts/Makefile | 2 +- arch/arm/dts/rk3399-puma-ddr1600.dts | 11 +++++++++++ arch/arm/dts/{rk3399-puma.dts => rk3399-puma.dtsi} | 2 -- configs/puma-rk3399_defconfig | 2 +- 4 files changed, 13 insertions(+), 4 deletions(-) create mode 100644 arch/arm/dts/rk3399-puma-ddr1600.dts rename arch/arm/dts/{rk3399-puma.dts => rk3399-puma.dtsi} (98%)
Acked-by: Simon Glass sjg@chromium.org

On 6 June 2017 at 12:44, Philipp Tomsich philipp.tomsich@theobroma-systems.com wrote:
To better support different RAM timings (DDR3-1333 and DDR3-1866 are assembly options for the RK3399-Q7), this refactors the DTS support and renames the default DTS variant from rk3399-puma to rk3399-puma-ddr1600:
- changes the rk3399-puma DTS into a board-specific DTSI by removing the inclusion of the DRAM timings
- adds a new rk3399-puma-ddr1600.dts, which includes the (new) common board DTSI and the DDR3-1600 timing DTSI
- wires this up from arch/arm/dts/Makefile and configs/puma-rk3399_defconfig
Signed-off-by: Philipp Tomsich philipp.tomsich@theobroma-systems.com
Changes in v2:
- changed implementation from Kconfig and C preprocessor macros in the DTS to using one DTS per DRAM timing that contains only two includes: one for the common board-level definitions and one for the DRAM timings
arch/arm/dts/Makefile | 2 +- arch/arm/dts/rk3399-puma-ddr1600.dts | 11 +++++++++++ arch/arm/dts/{rk3399-puma.dts => rk3399-puma.dtsi} | 2 -- configs/puma-rk3399_defconfig | 2 +- 4 files changed, 13 insertions(+), 4 deletions(-) create mode 100644 arch/arm/dts/rk3399-puma-ddr1600.dts rename arch/arm/dts/{rk3399-puma.dts => rk3399-puma.dtsi} (98%)
Acked-by: Simon Glass sjg@chromium.org
Applied to u-boot-rockchip, thanks!

This adds the DDR3-1333 timing via its own DTS and wires it up. This is not the default timing for the RK3399-Q7 and should be selected explicitly via the config (CONFIG_DEFAULT_DEVICE_TREE).
Signed-off-by: Philipp Tomsich philipp.tomsich@theobroma-systems.com
---
Changes in v2: - added rk3399-puma-ddr1333 for DDR3-1333 timing (replacing the #ifdef implementation)
arch/arm/dts/Makefile | 1 + arch/arm/dts/rk3399-puma-ddr1333.dts | 11 +++++++++++ 2 files changed, 12 insertions(+) create mode 100644 arch/arm/dts/rk3399-puma-ddr1333.dts
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index d9bb7f8..37962e2 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile @@ -43,6 +43,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += \ rk3328-evb.dtb \ rk3399-evb.dtb \ rk3399-firefly.dtb \ + rk3399-puma-ddr1333.dtb \ rk3399-puma-ddr1600.dtb \ rv1108-evb.dtb dtb-$(CONFIG_ARCH_MESON) += \ diff --git a/arch/arm/dts/rk3399-puma-ddr1333.dts b/arch/arm/dts/rk3399-puma-ddr1333.dts new file mode 100644 index 0000000..564de91 --- /dev/null +++ b/arch/arm/dts/rk3399-puma-ddr1333.dts @@ -0,0 +1,11 @@ +/* + * (C) Copyright 2017 Theobroma Systems Design und Consulting GmbH + * + * SPDX-License-Identifier: GPL-2.0+ X11 + */ + +/dts-v1/; + +#include "rk3399-puma.dtsi" +#include "rk3399-sdram-ddr3-1333.dtsi" +

On 6 June 2017 at 12:44, Philipp Tomsich philipp.tomsich@theobroma-systems.com wrote:
This adds the DDR3-1333 timing via its own DTS and wires it up. This is not the default timing for the RK3399-Q7 and should be selected explicitly via the config (CONFIG_DEFAULT_DEVICE_TREE).
Signed-off-by: Philipp Tomsich philipp.tomsich@theobroma-systems.com
Changes in v2:
- added rk3399-puma-ddr1333 for DDR3-1333 timing (replacing the #ifdef implementation)
arch/arm/dts/Makefile | 1 + arch/arm/dts/rk3399-puma-ddr1333.dts | 11 +++++++++++ 2 files changed, 12 insertions(+) create mode 100644 arch/arm/dts/rk3399-puma-ddr1333.dts
Acked-by: Simon Glass sjg@chromium.org

On 6 June 2017 at 12:44, Philipp Tomsich philipp.tomsich@theobroma-systems.com wrote:
This adds the DDR3-1333 timing via its own DTS and wires it up. This is not the default timing for the RK3399-Q7 and should be selected explicitly via the config (CONFIG_DEFAULT_DEVICE_TREE).
Signed-off-by: Philipp Tomsich philipp.tomsich@theobroma-systems.com
Changes in v2:
- added rk3399-puma-ddr1333 for DDR3-1333 timing (replacing the #ifdef implementation)
arch/arm/dts/Makefile | 1 + arch/arm/dts/rk3399-puma-ddr1333.dts | 11 +++++++++++ 2 files changed, 12 insertions(+) create mode 100644 arch/arm/dts/rk3399-puma-ddr1333.dts
Acked-by: Simon Glass sjg@chromium.org
Applied to u-boot-rockchip, thanks!

This adds the DDR3-1866 timing via its own DTS and wires it up. This (currently) is not the default timing for the RK3399-Q7 and should be selected explicitly via the config (CONFIG_DEFAULT_DEVICE_TREE).
Signed-off-by: Philipp Tomsich philipp.tomsich@theobroma-systems.com
---
Changes in v2: - added rk3399-puma-ddr1866 DTS file for the DDR3-1866 implementation (replacing the #ifdef implementation)
arch/arm/dts/Makefile | 1 + arch/arm/dts/rk3399-puma-ddr1866.dts | 11 +++++++++++ 2 files changed, 12 insertions(+) create mode 100644 arch/arm/dts/rk3399-puma-ddr1866.dts
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index 37962e2..16ee8f2 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile @@ -45,6 +45,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += \ rk3399-firefly.dtb \ rk3399-puma-ddr1333.dtb \ rk3399-puma-ddr1600.dtb \ + rk3399-puma-ddr1866.dtb \ rv1108-evb.dtb dtb-$(CONFIG_ARCH_MESON) += \ meson-gxbb-odroidc2.dtb diff --git a/arch/arm/dts/rk3399-puma-ddr1866.dts b/arch/arm/dts/rk3399-puma-ddr1866.dts new file mode 100644 index 0000000..4eec8e7 --- /dev/null +++ b/arch/arm/dts/rk3399-puma-ddr1866.dts @@ -0,0 +1,11 @@ +/* + * (C) Copyright 2017 Theobroma Systems Design und Consulting GmbH + * + * SPDX-License-Identifier: GPL-2.0+ X11 + */ + +/dts-v1/; + +#include "rk3399-puma.dtsi" +#include "rk3399-sdram-ddr3-1866.dtsi" +

On 6 June 2017 at 12:44, Philipp Tomsich philipp.tomsich@theobroma-systems.com wrote:
This adds the DDR3-1866 timing via its own DTS and wires it up. This (currently) is not the default timing for the RK3399-Q7 and should be selected explicitly via the config (CONFIG_DEFAULT_DEVICE_TREE).
Signed-off-by: Philipp Tomsich philipp.tomsich@theobroma-systems.com
Changes in v2:
- added rk3399-puma-ddr1866 DTS file for the DDR3-1866 implementation (replacing the #ifdef implementation)
arch/arm/dts/Makefile | 1 + arch/arm/dts/rk3399-puma-ddr1866.dts | 11 +++++++++++ 2 files changed, 12 insertions(+) create mode 100644 arch/arm/dts/rk3399-puma-ddr1866.dts
Acked-by: Simon Glass sjg@chromium.org

On 6 June 2017 at 12:44, Philipp Tomsich philipp.tomsich@theobroma-systems.com wrote:
This adds the DDR3-1866 timing via its own DTS and wires it up. This (currently) is not the default timing for the RK3399-Q7 and should be selected explicitly via the config (CONFIG_DEFAULT_DEVICE_TREE).
Signed-off-by: Philipp Tomsich philipp.tomsich@theobroma-systems.com
Changes in v2:
- added rk3399-puma-ddr1866 DTS file for the DDR3-1866 implementation (replacing the #ifdef implementation)
arch/arm/dts/Makefile | 1 + arch/arm/dts/rk3399-puma-ddr1866.dts | 11 +++++++++++ 2 files changed, 12 insertions(+) create mode 100644 arch/arm/dts/rk3399-puma-ddr1866.dts
Acked-by: Simon Glass sjg@chromium.org
Applied to u-boot-rockchip, thanks!
participants (3)
-
Philipp Tomsich
-
Simon Glass
-
sjg@google.com