[U-Boot] [PATCH 1/6] rockchip: defconfig: puma-rk3399: enable RK808 support

On the RK3399-Q7, we need PMIC support (for the RK808) to enable HDMI output, as one of the required powerrails is not enabled on boot. For this, we need to enable the RK808 driver.
Signed-off-by: Philipp Tomsich philipp.tomsich@theobroma-systems.com
Version-changes: 3 - With the recent upstream changes to the RK808 (PMIC) driver, the associated configuration options have been renamed to RK8XX. Track this change in the RK3399-Q7 defconfig.
---
Changes in v2: None
configs/puma-rk3399_defconfig | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/configs/puma-rk3399_defconfig b/configs/puma-rk3399_defconfig index 7b4f595..ecc85bc 100644 --- a/configs/puma-rk3399_defconfig +++ b/configs/puma-rk3399_defconfig @@ -54,8 +54,11 @@ CONFIG_GMAC_ROCKCHIP=y CONFIG_PINCTRL=y CONFIG_SPL_PINCTRL=y CONFIG_PINCTRL_ROCKCHIP_RK3399=y +CONFIG_DM_PMIC=y +CONFIG_PMIC_RK8XX=y CONFIG_REGULATOR_PWM=y CONFIG_DM_REGULATOR_FIXED=y +CONFIG_REGULATOR_RK8XX=y CONFIG_PWM_ROCKCHIP=y CONFIG_RAM=y CONFIG_SPL_RAM=y

With HDMI output for the RK3399 working, this update the RK3399-Q7 (Puma) defconfig for the new functionality: 1. enables PMIC command (to check if the HDMI voltages are correct) +CONFIG_CMD_PMIC=y +CONFIG_CMD_REGULATOR=y 2. enables video-output (via HDMI) +CONFIG_DM_VIDEO=y +CONFIG_DISPLAY=y +CONFIG_VIDEO_ROCKCHIP=y +CONFIG_DISPLAY_ROCKCHIP_HDMI=y 3. turns on the 'dcache'-command (for a dcache flush) for our QA to fill the framebuffer using 'mw.l' +CONFIG_CMD_CACHE=y 4. turns on the 'bmp'-command +CONFIG_CMD_BMP=y
Signed-off-by: Philipp Tomsich philipp.tomsich@theobroma-systems.com
---
Changes in v2: - enable CMD_BMP in the puma-rk3399_defconfig (following a rebase to the upstream master after CMD_BMP was migrate to Kconfig)
configs/puma-rk3399_defconfig | 8 ++++++++ 1 file changed, 8 insertions(+)
diff --git a/configs/puma-rk3399_defconfig b/configs/puma-rk3399_defconfig index ecc85bc..e0f1821 100644 --- a/configs/puma-rk3399_defconfig +++ b/configs/puma-rk3399_defconfig @@ -29,7 +29,11 @@ CONFIG_CMD_SPI=y CONFIG_CMD_USB=y CONFIG_CMD_USB_MASS_STORAGE=y # CONFIG_CMD_SETEXPR is not set +CONFIG_CMD_BMP=y +CONFIG_CMD_CACHE=y CONFIG_CMD_TIME=y +CONFIG_CMD_PMIC=y +CONFIG_CMD_REGULATOR=y CONFIG_SPL_OF_CONTROL=y CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents" CONFIG_REGMAP=y @@ -82,4 +86,8 @@ CONFIG_USB_GADGET_DOWNLOAD=y CONFIG_G_DNL_MANUFACTURER="Theobroma Systems" CONFIG_G_DNL_VENDOR_NUM=0x2294 CONFIG_G_DNL_PRODUCT_NUM=0x3399 +CONFIG_DM_VIDEO=y +CONFIG_DISPLAY=y +CONFIG_VIDEO_ROCKCHIP=y +CONFIG_DISPLAY_ROCKCHIP_HDMI=y CONFIG_ERRNO_STR=y

On 31 May 2017 at 10:18, Philipp Tomsich philipp.tomsich@theobroma-systems.com wrote:
With HDMI output for the RK3399 working, this update the RK3399-Q7 (Puma) defconfig for the new functionality:
- enables PMIC command (to check if the HDMI voltages are correct) +CONFIG_CMD_PMIC=y +CONFIG_CMD_REGULATOR=y
- enables video-output (via HDMI) +CONFIG_DM_VIDEO=y +CONFIG_DISPLAY=y +CONFIG_VIDEO_ROCKCHIP=y +CONFIG_DISPLAY_ROCKCHIP_HDMI=y
- turns on the 'dcache'-command (for a dcache flush) for our QA to fill the framebuffer using 'mw.l' +CONFIG_CMD_CACHE=y
- turns on the 'bmp'-command +CONFIG_CMD_BMP=y
Signed-off-by: Philipp Tomsich philipp.tomsich@theobroma-systems.com
Changes in v2:
- enable CMD_BMP in the puma-rk3399_defconfig (following a rebase to the upstream master after CMD_BMP was migrate to Kconfig)
configs/puma-rk3399_defconfig | 8 ++++++++ 1 file changed, 8 insertions(+)
Reviewed-by: Simon Glass sjg@chromium.org

Hi Phlilpp,
On 1 June 2017 at 20:55, Simon Glass sjg@chromium.org wrote:
On 31 May 2017 at 10:18, Philipp Tomsich philipp.tomsich@theobroma-systems.com wrote:
With HDMI output for the RK3399 working, this update the RK3399-Q7 (Puma) defconfig for the new functionality:
- enables PMIC command (to check if the HDMI voltages are correct) +CONFIG_CMD_PMIC=y +CONFIG_CMD_REGULATOR=y
- enables video-output (via HDMI) +CONFIG_DM_VIDEO=y +CONFIG_DISPLAY=y +CONFIG_VIDEO_ROCKCHIP=y +CONFIG_DISPLAY_ROCKCHIP_HDMI=y
- turns on the 'dcache'-command (for a dcache flush) for our QA to fill the framebuffer using 'mw.l' +CONFIG_CMD_CACHE=y
- turns on the 'bmp'-command +CONFIG_CMD_BMP=y
Signed-off-by: Philipp Tomsich philipp.tomsich@theobroma-systems.com
Changes in v2:
- enable CMD_BMP in the puma-rk3399_defconfig (following a rebase to the upstream master after CMD_BMP was migrate to Kconfig)
configs/puma-rk3399_defconfig | 8 ++++++++ 1 file changed, 8 insertions(+)
Reviewed-by: Simon Glass sjg@chromium.org
Sadly another build error:
+drivers/video/rockchip/rk_hdmi.c:150: undefined reference to `rk_setreg' +drivers/video/rockchip/rk_hdmi.c:153: undefined reference to `rk_clrsetreg'

Simon,
This was only tested with the new RK3399 HDMI support in place. There’s a missing #include in the original rk_hdmi.c (before I submitted my patches for HDMI), which causes these functions to not be defined.
What’s the preferred way that you’d like this resolved: (a) wait until the HDMI-changes (in Anatolij’s tree) are merged to master, before applying this patch? (b) fix the issue in the older rk_hdmi.c (which doesn’t really have RK3399 support anyway) and deal with the conflict when the changeset from Anatolij’s tree trickled back down into the rockchip tree?
Thanks, Philipp.
On 05 Jun 2017, at 23:33, Simon Glass sjg@chromium.org wrote:
Hi Phlilpp,
On 1 June 2017 at 20:55, Simon Glass sjg@chromium.org wrote:
On 31 May 2017 at 10:18, Philipp Tomsich philipp.tomsich@theobroma-systems.com wrote:
With HDMI output for the RK3399 working, this update the RK3399-Q7 (Puma) defconfig for the new functionality:
- enables PMIC command (to check if the HDMI voltages are correct) +CONFIG_CMD_PMIC=y +CONFIG_CMD_REGULATOR=y
- enables video-output (via HDMI) +CONFIG_DM_VIDEO=y +CONFIG_DISPLAY=y +CONFIG_VIDEO_ROCKCHIP=y +CONFIG_DISPLAY_ROCKCHIP_HDMI=y
- turns on the 'dcache'-command (for a dcache flush) for our QA to
fill the framebuffer using 'mw.l' +CONFIG_CMD_CACHE=y 4. turns on the 'bmp'-command +CONFIG_CMD_BMP=y
Signed-off-by: Philipp Tomsich philipp.tomsich@theobroma-systems.com
Changes in v2:
- enable CMD_BMP in the puma-rk3399_defconfig (following a rebase to
the upstream master after CMD_BMP was migrate to Kconfig)
configs/puma-rk3399_defconfig | 8 ++++++++ 1 file changed, 8 insertions(+)
Reviewed-by: Simon Glass sjg@chromium.org
Sadly another build error:
+drivers/video/rockchip/rk_hdmi.c:150: undefined reference to `rk_setreg' +drivers/video/rockchip/rk_hdmi.c:153: undefined reference to `rk_clrsetreg'

Hi,
On Jun 5, 2017 17:01, "Dr. Philipp Tomsich" < philipp.tomsich@theobroma-systems.com> wrote:
Simon,
This was only tested with the new RK3399 HDMI support in place. There’s a missing #include in the original rk_hdmi.c (before I submitted my patches for HDMI), which causes these functions to not be defined.
What’s the preferred way that you’d like this resolved: (a) wait until the HDMI-changes (in Anatolij’s tree) are merged to master, before applying this patch? (b) fix the issue in the older rk_hdmi.c (which doesn’t really have RK3399 support anyway) and deal with the conflict when the changeset from Anatolij’s tree trickled back down into the rockchip tree?
Can you send your pending patches rebased to rockchip/master and add a new patch to add the missing header? Then it will eitherbgoba at in my rebased or be sorted out by Tom.
Regards, Simon
Thanks, Philipp.
On 05 Jun 2017, at 23:33, Simon Glass sjg@chromium.org wrote:
Hi Phlilpp,
On 1 June 2017 at 20:55, Simon Glass sjg@chromium.org wrote:
On 31 May 2017 at 10:18, Philipp Tomsich philipp.tomsich@theobroma-systems.com wrote:
With HDMI output for the RK3399 working, this update the RK3399-Q7 (Puma) defconfig for the new functionality:
- enables PMIC command (to check if the HDMI voltages are correct) +CONFIG_CMD_PMIC=y +CONFIG_CMD_REGULATOR=y
- enables video-output (via HDMI) +CONFIG_DM_VIDEO=y +CONFIG_DISPLAY=y +CONFIG_VIDEO_ROCKCHIP=y +CONFIG_DISPLAY_ROCKCHIP_HDMI=y
- turns on the 'dcache'-command (for a dcache flush) for our QA to
fill the framebuffer using 'mw.l' +CONFIG_CMD_CACHE=y 4. turns on the 'bmp'-command +CONFIG_CMD_BMP=y
Signed-off-by: Philipp Tomsich philipp.tomsich@theobroma-systems.com
Changes in v2:
- enable CMD_BMP in the puma-rk3399_defconfig (following a rebase to
the upstream master after CMD_BMP was migrate to Kconfig)
configs/puma-rk3399_defconfig | 8 ++++++++ 1 file changed, 8 insertions(+)
Reviewed-by: Simon Glass sjg@chromium.org
Sadly another build error:
+drivers/video/rockchip/rk_hdmi.c:150: undefined reference to `rk_setreg' +drivers/video/rockchip/rk_hdmi.c:153: undefined reference to
`rk_clrsetreg'

Simon,
On 06 Jun 2017, at 02:05, Simon Glass sjg@chromium.org wrote:
What’s the preferred way that you’d like this resolved: (a) wait until the HDMI-changes (in Anatolij’s tree) are merged to master, before applying this patch? (b) fix the issue in the older rk_hdmi.c (which doesn’t really have RK3399 support anyway) and deal with the conflict when the changeset from Anatolij’s tree trickled back down into the rockchip tree?
Can you send your pending patches rebased to rockchip/master and add a new patch to add the missing header? Then it will eitherbgoba at in my rebased or be sorted out by Tom.
I split this specific patch off into a new series that bundles this together with the fix for the ‘implicit definition’ warning for pre-RK3399 rk_hdmi.c. I hope that this will make tracking and resolving the eventual conflict a bit easier.
Regards, Philipp.

The RK3399-Q7 has a KSZ9031 GbE PHY. Enable support for it in defconfig.
Signed-off-by: Philipp Tomsich philipp.tomsich@theobroma-systems.com ---
Changes in v2: None
configs/puma-rk3399_defconfig | 1 + 1 file changed, 1 insertion(+)
diff --git a/configs/puma-rk3399_defconfig b/configs/puma-rk3399_defconfig index e0f1821..994aeac 100644 --- a/configs/puma-rk3399_defconfig +++ b/configs/puma-rk3399_defconfig @@ -52,6 +52,7 @@ CONFIG_MMC_SDHCI_ROCKCHIP=y CONFIG_SPI_FLASH=y CONFIG_SPI_FLASH_WINBOND=y CONFIG_PHY_MICREL=y +CONFIG_PHY_MICREL_KSZ9031=y CONFIG_DM_ETH=y CONFIG_ETH_DESIGNWARE=y CONFIG_GMAC_ROCKCHIP=y

On 31 May 2017 at 10:18, Philipp Tomsich philipp.tomsich@theobroma-systems.com wrote:
The RK3399-Q7 has a KSZ9031 GbE PHY. Enable support for it in defconfig.
Signed-off-by: Philipp Tomsich philipp.tomsich@theobroma-systems.com
Changes in v2: None
configs/puma-rk3399_defconfig | 1 + 1 file changed, 1 insertion(+)
Reviewed-by: Simon Glass sjg@chromium.org

On 31 May 2017 at 10:18, Philipp Tomsich philipp.tomsich@theobroma-systems.com wrote:
The RK3399-Q7 has a KSZ9031 GbE PHY. Enable support for it in defconfig.
Signed-off-by: Philipp Tomsich philipp.tomsich@theobroma-systems.com
Changes in v2: None
configs/puma-rk3399_defconfig | 1 + 1 file changed, 1 insertion(+)
Reviewed-by: Simon Glass sjg@chromium.org
Applied to u-boot-rockchip, thanks!

The RK3399-Q7 exposes I2C on its edge connector and uses it as one of the interfaces towards the on-module STM32 (for the emulated RTC and fan-controller).
Enable I2C and CMD_I2C support in the defconfig.
Signed-off-by: Philipp Tomsich philipp.tomsich@theobroma-systems.com ---
Changes in v2: None
configs/puma-rk3399_defconfig | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/configs/puma-rk3399_defconfig b/configs/puma-rk3399_defconfig index 994aeac..413d0ac 100644 --- a/configs/puma-rk3399_defconfig +++ b/configs/puma-rk3399_defconfig @@ -26,6 +26,7 @@ CONFIG_CMD_GPT=y CONFIG_CMD_MMC=y CONFIG_CMD_SF=y CONFIG_CMD_SPI=y +CONFIG_CMD_I2C=y CONFIG_CMD_USB=y CONFIG_CMD_USB_MASS_STORAGE=y # CONFIG_CMD_SETEXPR is not set @@ -43,6 +44,7 @@ CONFIG_SPL_SYSCON=y CONFIG_CLK=y CONFIG_SPL_CLK=y CONFIG_ROCKCHIP_GPIO=y +CONFIG_SYS_I2C_ROCKCHIP=y CONFIG_MISC=y CONFIG_ROCKCHIP_EFUSE=y CONFIG_MMC_DW=y

On 31 May 2017 at 10:18, Philipp Tomsich philipp.tomsich@theobroma-systems.com wrote:
The RK3399-Q7 exposes I2C on its edge connector and uses it as one of the interfaces towards the on-module STM32 (for the emulated RTC and fan-controller).
Enable I2C and CMD_I2C support in the defconfig.
Signed-off-by: Philipp Tomsich philipp.tomsich@theobroma-systems.com
Changes in v2: None
configs/puma-rk3399_defconfig | 2 ++ 1 file changed, 2 insertions(+)
Reviewed-by: Simon Glass sjg@chromium.org

On 31 May 2017 at 10:18, Philipp Tomsich philipp.tomsich@theobroma-systems.com wrote:
The RK3399-Q7 exposes I2C on its edge connector and uses it as one of the interfaces towards the on-module STM32 (for the emulated RTC and fan-controller).
Enable I2C and CMD_I2C support in the defconfig.
Signed-off-by: Philipp Tomsich philipp.tomsich@theobroma-systems.com
Changes in v2: None
configs/puma-rk3399_defconfig | 2 ++ 1 file changed, 2 insertions(+)
Reviewed-by: Simon Glass sjg@chromium.org
Applied to u-boot-rockchip, thanks!

For the RK3399-Q7 module, we use full OF_CONTROL (i.e. not OF_PLATDATA) for SPL. In this configuration, the rockchip_dw_mmc driver retrieves one of its clocks via clk_get_by_name and fails if this is not possible. For this reason, we can not filter clock-names from the device-tree nodes used for the configuration of the SPL stage.
Signed-off-by: Philipp Tomsich philipp.tomsich@theobroma-systems.com ---
Changes in v2: None
configs/puma-rk3399_defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configs/puma-rk3399_defconfig b/configs/puma-rk3399_defconfig index 413d0ac..ab49f27 100644 --- a/configs/puma-rk3399_defconfig +++ b/configs/puma-rk3399_defconfig @@ -36,7 +36,7 @@ CONFIG_CMD_TIME=y CONFIG_CMD_PMIC=y CONFIG_CMD_REGULATOR=y CONFIG_SPL_OF_CONTROL=y -CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents" +CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents" CONFIG_REGMAP=y CONFIG_SPL_REGMAP=y CONFIG_SYSCON=y

On 31 May 2017 at 10:18, Philipp Tomsich philipp.tomsich@theobroma-systems.com wrote:
For the RK3399-Q7 module, we use full OF_CONTROL (i.e. not OF_PLATDATA) for SPL. In this configuration, the rockchip_dw_mmc driver retrieves one of its clocks via clk_get_by_name and fails if this is not possible. For this reason, we can not filter clock-names from the device-tree nodes used for the configuration of the SPL stage.
Signed-off-by: Philipp Tomsich philipp.tomsich@theobroma-systems.com
Changes in v2: None
configs/puma-rk3399_defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Simon Glass sjg@chromium.org

On 31 May 2017 at 10:18, Philipp Tomsich philipp.tomsich@theobroma-systems.com wrote:
For the RK3399-Q7 module, we use full OF_CONTROL (i.e. not OF_PLATDATA) for SPL. In this configuration, the rockchip_dw_mmc driver retrieves one of its clocks via clk_get_by_name and fails if this is not possible. For this reason, we can not filter clock-names from the device-tree nodes used for the configuration of the SPL stage.
Signed-off-by: Philipp Tomsich philipp.tomsich@theobroma-systems.com
Changes in v2: None
configs/puma-rk3399_defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Simon Glass sjg@chromium.org
Applied to u-boot-rockchip, thanks!

With the merging of Andre's SPL_FIT support, the CONFIG_SPL_FIT option is no longer required for the RK3399-Q7. Remove it from the defconfig.
Signed-off-by: Philipp Tomsich philipp.tomsich@theobroma-systems.com ---
Changes in v2: None
configs/puma-rk3399_defconfig | 1 - 1 file changed, 1 deletion(-)
diff --git a/configs/puma-rk3399_defconfig b/configs/puma-rk3399_defconfig index ab49f27..8816886 100644 --- a/configs/puma-rk3399_defconfig +++ b/configs/puma-rk3399_defconfig @@ -10,7 +10,6 @@ CONFIG_SPL_SPI_SUPPORT=y CONFIG_SPL_STACK_R_ADDR=0x80000 CONFIG_DEFAULT_DEVICE_TREE="rk3399-puma" CONFIG_FIT=y -CONFIG_SPL_FIT=y CONFIG_SPL_LOAD_FIT=y CONFIG_SPL_FIT_SOURCE="board/theobroma-systems/puma_rk3399/fit_spl_atf.its" # CONFIG_DISPLAY_CPUINFO is not set

On 31 May 2017 at 10:18, Philipp Tomsich philipp.tomsich@theobroma-systems.com wrote:
With the merging of Andre's SPL_FIT support, the CONFIG_SPL_FIT option is no longer required for the RK3399-Q7. Remove it from the defconfig.
Signed-off-by: Philipp Tomsich philipp.tomsich@theobroma-systems.com
Changes in v2: None
configs/puma-rk3399_defconfig | 1 - 1 file changed, 1 deletion(-)
Reviewed-by: Simon Glass sjg@chromium.org

On 31 May 2017 at 10:18, Philipp Tomsich philipp.tomsich@theobroma-systems.com wrote:
With the merging of Andre's SPL_FIT support, the CONFIG_SPL_FIT option is no longer required for the RK3399-Q7. Remove it from the defconfig.
Signed-off-by: Philipp Tomsich philipp.tomsich@theobroma-systems.com
Changes in v2: None
configs/puma-rk3399_defconfig | 1 - 1 file changed, 1 deletion(-)
Reviewed-by: Simon Glass sjg@chromium.org
Applied to u-boot-rockchip, thanks!

On 31 May 2017 at 10:18, Philipp Tomsich philipp.tomsich@theobroma-systems.com wrote:
On the RK3399-Q7, we need PMIC support (for the RK808) to enable HDMI output, as one of the required powerrails is not enabled on boot. For this, we need to enable the RK808 driver.
Signed-off-by: Philipp Tomsich philipp.tomsich@theobroma-systems.com
Version-changes: 3
- With the recent upstream changes to the RK808 (PMIC) driver, the associated configuration options have been renamed to RK8XX. Track this change in the RK3399-Q7 defconfig.
Changes in v2: None
configs/puma-rk3399_defconfig | 3 +++ 1 file changed, 3 insertions(+)
Reviewed-by: Simon Glass sjg@chromium.org

On 31 May 2017 at 10:18, Philipp Tomsich philipp.tomsich@theobroma-systems.com wrote:
On the RK3399-Q7, we need PMIC support (for the RK808) to enable HDMI output, as one of the required powerrails is not enabled on boot. For this, we need to enable the RK808 driver.
Signed-off-by: Philipp Tomsich philipp.tomsich@theobroma-systems.com
Version-changes: 3
- With the recent upstream changes to the RK808 (PMIC) driver, the associated configuration options have been renamed to RK8XX. Track this change in the RK3399-Q7 defconfig.
Changes in v2: None
configs/puma-rk3399_defconfig | 3 +++ 1 file changed, 3 insertions(+)
Reviewed-by: Simon Glass sjg@chromium.org
Applied to u-boot-rockchip, thanks!
participants (4)
-
Dr. Philipp Tomsich
-
Philipp Tomsich
-
Simon Glass
-
sjg@google.com