diff options
author | Tom Rini <trini@konsulko.com> | 2018-02-17 16:06:59 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2018-02-17 16:06:59 -0500 |
commit | 02b0895c215e252cff50d9edf53a972d2bbbfd30 (patch) | |
tree | 5b466b914ccb2eb740bdc1740986c6c9c91ec892 | |
parent | bd650cd404b6dc870b6cc220025f35da4b31d0f4 (diff) | |
parent | 25f6dc8955bdf97bfb16ef19de7ce4abe76aaee4 (diff) |
Merge git://git.denx.de/u-boot-sh
-rw-r--r-- | arch/arm/dts/r8a7791-porter-u-boot.dts | 4 | ||||
-rw-r--r-- | arch/arm/dts/r8a7791-porter.dts | 6 | ||||
-rw-r--r-- | board/renesas/porter/porter.c | 31 | ||||
-rw-r--r-- | configs/porter_defconfig | 6 | ||||
-rw-r--r-- | drivers/i2c/Kconfig | 2 | ||||
-rw-r--r-- | include/configs/porter.h | 16 |
6 files changed, 44 insertions, 21 deletions
diff --git a/arch/arm/dts/r8a7791-porter-u-boot.dts b/arch/arm/dts/r8a7791-porter-u-boot.dts index 987d0e4035..922024883c 100644 --- a/arch/arm/dts/r8a7791-porter-u-boot.dts +++ b/arch/arm/dts/r8a7791-porter-u-boot.dts @@ -8,3 +8,7 @@ #include "r8a7791-porter.dts" #include "r8a7791-u-boot.dtsi" + +&scif0 { + u-boot,dm-pre-reloc; +}; diff --git a/arch/arm/dts/r8a7791-porter.dts b/arch/arm/dts/r8a7791-porter.dts index 3d47daa08b..0592aa7f49 100644 --- a/arch/arm/dts/r8a7791-porter.dts +++ b/arch/arm/dts/r8a7791-porter.dts @@ -214,7 +214,6 @@ &scif0 { pinctrl-0 = <&scif0_pins>; pinctrl-names = "default"; - u-boot,dm-pre-reloc; status = "okay"; }; @@ -352,6 +351,11 @@ }; }; +&i2c6 { + status = "okay"; + clock-frequency = <400000>; +}; + &sata0 { status = "okay"; }; diff --git a/board/renesas/porter/porter.c b/board/renesas/porter/porter.c index bd0080d210..320841f27b 100644 --- a/board/renesas/porter/porter.c +++ b/board/renesas/porter/porter.c @@ -65,11 +65,19 @@ int board_early_init_f(void) return 0; } +#define ETHERNET_PHY_RESET 176 /* GPIO 5 22 */ + int board_init(void) { /* adress of boot parameters */ gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100; + /* Force ethernet PHY out of reset */ + gpio_request(ETHERNET_PHY_RESET, "phy_reset"); + gpio_direction_output(ETHERNET_PHY_RESET, 0); + mdelay(10); + gpio_direction_output(ETHERNET_PHY_RESET, 1); + return 0; } @@ -108,12 +116,25 @@ const struct rmobile_sysinfo sysinfo = { void reset_cpu(ulong addr) { - u8 val; + struct udevice *dev; + const u8 pmic_bus = 6; + const u8 pmic_addr = 0x5a; + u8 data; + int ret; + + ret = i2c_get_chip_for_busnum(pmic_bus, pmic_addr, 1, &dev); + if (ret) + hang(); + + ret = dm_i2c_read(dev, 0x13, &data, 1); + if (ret) + hang(); + + data |= BIT(1); - i2c_set_bus_num(2); /* PowerIC connected to ch2 */ - i2c_read(CONFIG_SYS_I2C_POWERIC_ADDR, 0x13, 1, &val, 1); - val |= 0x02; - i2c_write(CONFIG_SYS_I2C_POWERIC_ADDR, 0x13, 1, &val, 1); + ret = dm_i2c_write(dev, 0x13, &data, 1); + if (ret) + hang(); } #ifdef CONFIG_SPL_BUILD diff --git a/configs/porter_defconfig b/configs/porter_defconfig index 0fa308b584..736576c78e 100644 --- a/configs/porter_defconfig +++ b/configs/porter_defconfig @@ -11,6 +11,7 @@ CONFIG_SPL_SERIAL_SUPPORT=y CONFIG_SPL_SPI_FLASH_SUPPORT=y CONFIG_SPL_SPI_SUPPORT=y CONFIG_DEFAULT_DEVICE_TREE="r8a7791-porter-u-boot" +CONFIG_FIT=y CONFIG_BOOTDELAY=3 CONFIG_VERSION_VARIABLE=y CONFIG_SPL=y @@ -31,6 +32,8 @@ CONFIG_CMD_USB=y CONFIG_CMD_DHCP=y CONFIG_CMD_MII=y CONFIG_CMD_PING=y +CONFIG_CMD_CACHE=y +CONFIG_CMD_TIME=y CONFIG_CMD_EXT2=y CONFIG_CMD_EXT4=y CONFIG_CMD_EXT4_WRITE=y @@ -47,6 +50,8 @@ CONFIG_SPL_CLK=y CONFIG_CLK_RENESAS=y CONFIG_DM_GPIO=y CONFIG_RCAR_GPIO=y +CONFIG_DM_I2C=y +CONFIG_SYS_I2C_RCAR_IIC=y CONFIG_DM_MMC=y CONFIG_MMC_UNIPHIER=y CONFIG_SPI_FLASH=y @@ -72,4 +77,3 @@ CONFIG_DM_USB=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_EHCI_PCI=y CONFIG_USB_STORAGE=y -CONFIG_SPL_FRAMEWORK=y diff --git a/drivers/i2c/Kconfig b/drivers/i2c/Kconfig index 7dbec775df..9d43690503 100644 --- a/drivers/i2c/Kconfig +++ b/drivers/i2c/Kconfig @@ -178,7 +178,7 @@ endif config SYS_I2C_RCAR_IIC bool "Renesas RCar Gen3 IIC driver" - depends on RCAR_GEN3 && DM_I2C + depends on (RCAR_GEN3 || RCAR_GEN2) && DM_I2C help Support for Renesas RCar Gen3 IIC controller. diff --git a/include/configs/porter.h b/include/configs/porter.h index 758ed21c15..eb28d1afcc 100644 --- a/include/configs/porter.h +++ b/include/configs/porter.h @@ -49,19 +49,9 @@ #define CONFIG_SYS_TMU_CLK_DIV 4 -/* i2c */ -#define CONFIG_SYS_I2C -#define CONFIG_SYS_I2C_SH -#define CONFIG_SYS_I2C_SLAVE 0x7F -#define CONFIG_SYS_I2C_SH_NUM_CONTROLLERS 3 -#define CONFIG_SYS_I2C_SH_SPEED0 400000 -#define CONFIG_SYS_I2C_SH_SPEED1 400000 -#define CONFIG_SYS_I2C_SH_SPEED2 400000 -#define CONFIG_SH_I2C_DATA_HIGH 4 -#define CONFIG_SH_I2C_DATA_LOW 5 -#define CONFIG_SH_I2C_CLOCK 10000000 - -#define CONFIG_SYS_I2C_POWERIC_ADDR 0x58 /* da9063 */ +#define CONFIG_EXTRA_ENV_SETTINGS \ + "fdt_high=0xffffffff\0" \ + "initrd_high=0xffffffff\0" /* SPL support */ #define CONFIG_SPL_TEXT_BASE 0xe6304000 |