From mboxrd@z Thu Jan 1 00:00:00 1970 From: sunil at amarulasolutions.com Date: Fri, 22 May 2020 23:33:25 +0530 Subject: [PATCH 2/5] roc-pc-rk3399: Enable I2C in SPL for add-on board detection In-Reply-To: <1590170608-12229-1-git-send-email-sunil@amarulasolutions.com> References: <1590170608-12229-1-git-send-email-sunil@amarulasolutions.com> Message-ID: <1590170608-12229-3-git-send-email-sunil@amarulasolutions.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de From: Suniel Mahesh This patch enables I2C in SPL for any add-on board detection at run time. Signed-off-by: Suniel Mahesh Signed-off-by: Jagan Teki --- arch/arm/dts/rk3399-roc-pc-u-boot.dtsi | 13 +++++++++++++ configs/roc-pc-rk3399_defconfig | 5 ++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/arch/arm/dts/rk3399-roc-pc-u-boot.dtsi b/arch/arm/dts/rk3399-roc-pc-u-boot.dtsi index 141dd0b..6de30d4 100644 --- a/arch/arm/dts/rk3399-roc-pc-u-boot.dtsi +++ b/arch/arm/dts/rk3399-roc-pc-u-boot.dtsi @@ -56,3 +56,16 @@ &vcc_sdio { regulator-always-on; }; + +&pcfg_pull_none_12ma { + u-boot,dm-pre-reloc; +}; + +&i2c2 { + u-boot,dm-pre-reloc; + status= "okay"; +}; + +&i2c2_xfer { + u-boot,dm-pre-reloc; +}; diff --git a/configs/roc-pc-rk3399_defconfig b/configs/roc-pc-rk3399_defconfig index 76e76c1..4d1a077 100644 --- a/configs/roc-pc-rk3399_defconfig +++ b/configs/roc-pc-rk3399_defconfig @@ -13,19 +13,22 @@ CONFIG_DISPLAY_BOARDINFO_LATE=y # CONFIG_SPL_RAW_IMAGE_SUPPORT is not set CONFIG_SPL_STACK_R=y CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN=0x10000 +CONFIG_SPL_I2C_SUPPORT=y CONFIG_TPL=y CONFIG_TPL_GPIO_SUPPORT=y CONFIG_CMD_BOOTZ=y CONFIG_CMD_GPT=y +CONFIG_CMD_I2C=y CONFIG_CMD_MMC=y CONFIG_CMD_USB=y # CONFIG_CMD_SETEXPR is not set CONFIG_CMD_TIME=y CONFIG_SPL_OF_CONTROL=y CONFIG_DEFAULT_DEVICE_TREE="rk3399-roc-pc" -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="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents" CONFIG_ENV_IS_IN_MMC=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y +CONFIG_SPL_DM_SEQ_ALIAS=y CONFIG_ROCKCHIP_GPIO=y CONFIG_SYS_I2C_ROCKCHIP=y CONFIG_MISC=y -- 2.7.4