aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2023-03-10 19:09:59 -0500
committerTom Rini <trini@konsulko.com>2023-03-10 19:09:59 -0500
commit0e823300f5f74a31bc2b36443bbab117b77a7f1a (patch)
treee39df337bc3660b26254736c37ca2fb6f2662f21
parent6c1cdf158c4f3ccc8c5f9552f049a3386899dcd2 (diff)
parentae08097faac226a951f4258c481e3e62d6ed8ac2 (diff)
downloadu-boot-0e823300f5f74a31bc2b36443bbab117b77a7f1a.zip
u-boot-0e823300f5f74a31bc2b36443bbab117b77a7f1a.tar.gz
u-boot-0e823300f5f74a31bc2b36443bbab117b77a7f1a.tar.bz2
Merge https://source.denx.de/u-boot/custodians/u-boot-sh
Assorted Renesas fixes below, namely MMC clocking breakage fix, clock Kconfig fix, pin control unused symbols removal, and sysinfo fix and enablement on now fixed platforms.
-rw-r--r--arch/arm/dts/r8a77980-condor-u-boot.dts17
-rw-r--r--arch/arm/dts/r8a77995-draak-u-boot.dts19
-rw-r--r--configs/r8a77980_condor_defconfig5
-rw-r--r--configs/r8a77995_draak_defconfig5
-rw-r--r--drivers/clk/renesas/Kconfig1
-rw-r--r--drivers/mmc/renesas-sdhi.c30
-rw-r--r--drivers/pinctrl/renesas/sh_pfc.h15
-rw-r--r--drivers/sysinfo/rcar3.c19
8 files changed, 87 insertions, 24 deletions
diff --git a/arch/arm/dts/r8a77980-condor-u-boot.dts b/arch/arm/dts/r8a77980-condor-u-boot.dts
index 576a74e..530abdb 100644
--- a/arch/arm/dts/r8a77980-condor-u-boot.dts
+++ b/arch/arm/dts/r8a77980-condor-u-boot.dts
@@ -12,6 +12,23 @@
aliases {
spi0 = &rpc;
};
+
+ sysinfo {
+ compatible = "renesas,rcar-sysinfo";
+ i2c-eeprom = <&sysinfo_eeprom>;
+ u-boot,dm-pre-reloc;
+ };
+};
+
+&i2c0 {
+ u-boot,dm-pre-reloc;
+
+ sysinfo_eeprom: eeprom@50 {
+ compatible = "rohm,br24t01", "atmel,24c01";
+ reg = <0x50>;
+ pagesize = <8>;
+ u-boot,dm-pre-reloc;
+ };
};
&rpc {
diff --git a/arch/arm/dts/r8a77995-draak-u-boot.dts b/arch/arm/dts/r8a77995-draak-u-boot.dts
index 0ea2570..260bc5d 100644
--- a/arch/arm/dts/r8a77995-draak-u-boot.dts
+++ b/arch/arm/dts/r8a77995-draak-u-boot.dts
@@ -8,6 +8,25 @@
#include "r8a77995-draak.dts"
#include "r8a77995-u-boot.dtsi"
+/ {
+ sysinfo {
+ compatible = "renesas,rcar-sysinfo";
+ i2c-eeprom = <&sysinfo_eeprom>;
+ u-boot,dm-pre-reloc;
+ };
+};
+
+&i2c0 {
+ u-boot,dm-pre-reloc;
+
+ sysinfo_eeprom: eeprom@50 {
+ compatible = "rohm,br24t01", "atmel,24c01";
+ reg = <0x50>;
+ pagesize = <8>;
+ u-boot,dm-pre-reloc;
+ };
+};
+
&rpc {
reg = <0 0xee200000 0 0x100>, <0 0x08000000 0 0x04000000>;
status = "disabled";
diff --git a/configs/r8a77980_condor_defconfig b/configs/r8a77980_condor_defconfig
index 0c3493c..e1b3dc5 100644
--- a/configs/r8a77980_condor_defconfig
+++ b/configs/r8a77980_condor_defconfig
@@ -33,6 +33,7 @@ CONFIG_HUSH_PARSER=y
CONFIG_SYS_MAXARGS=64
CONFIG_SYS_PBSIZE=2068
CONFIG_CMD_BOOTZ=y
+CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS=10
CONFIG_CMD_DFU=y
CONFIG_CMD_GPIO=y
CONFIG_CMD_I2C=y
@@ -64,6 +65,9 @@ CONFIG_DFU_SF=y
CONFIG_RCAR_GPIO=y
CONFIG_DM_I2C=y
CONFIG_SYS_I2C_RCAR_I2C=y
+CONFIG_MISC=y
+CONFIG_I2C_EEPROM=y
+CONFIG_SYS_I2C_EEPROM_ADDR=0x50
CONFIG_MMC_IO_VOLTAGE=y
CONFIG_MMC_UHS_SUPPORT=y
CONFIG_MMC_HS200_SUPPORT=y
@@ -84,6 +88,7 @@ CONFIG_SCIF_CONSOLE=y
CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_RENESAS_RPC_SPI=y
+CONFIG_SYSINFO=y
CONFIG_TEE=y
CONFIG_OPTEE=y
CONFIG_USB=y
diff --git a/configs/r8a77995_draak_defconfig b/configs/r8a77995_draak_defconfig
index 4ddb66a..a09b33e 100644
--- a/configs/r8a77995_draak_defconfig
+++ b/configs/r8a77995_draak_defconfig
@@ -33,6 +33,7 @@ CONFIG_HUSH_PARSER=y
CONFIG_SYS_MAXARGS=64
CONFIG_SYS_PBSIZE=2068
CONFIG_CMD_BOOTZ=y
+CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS=10
CONFIG_CMD_DFU=y
CONFIG_CMD_GPIO=y
CONFIG_CMD_I2C=y
@@ -65,6 +66,9 @@ CONFIG_DFU_SF=y
CONFIG_RCAR_GPIO=y
CONFIG_DM_I2C=y
CONFIG_SYS_I2C_RCAR_I2C=y
+CONFIG_MISC=y
+CONFIG_I2C_EEPROM=y
+CONFIG_SYS_I2C_EEPROM_ADDR=0x50
CONFIG_MMC_IO_VOLTAGE=y
CONFIG_MMC_UHS_SUPPORT=y
CONFIG_MMC_HS200_SUPPORT=y
@@ -94,6 +98,7 @@ CONFIG_SCIF_CONSOLE=y
CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_RENESAS_RPC_SPI=y
+CONFIG_SYSINFO=y
CONFIG_TEE=y
CONFIG_OPTEE=y
CONFIG_USB=y
diff --git a/drivers/clk/renesas/Kconfig b/drivers/clk/renesas/Kconfig
index 1686410..d58e897 100644
--- a/drivers/clk/renesas/Kconfig
+++ b/drivers/clk/renesas/Kconfig
@@ -49,6 +49,7 @@ config CLK_RCAR_GEN3
def_bool y if RCAR_GEN3
depends on CLK_RENESAS
select CLK_RCAR_CPG_LIB
+ select DM_RESET
help
Enable this to support the clocks on Renesas RCar Gen3 SoC.
diff --git a/drivers/mmc/renesas-sdhi.c b/drivers/mmc/renesas-sdhi.c
index 4a1acce..34119f9 100644
--- a/drivers/mmc/renesas-sdhi.c
+++ b/drivers/mmc/renesas-sdhi.c
@@ -977,34 +977,50 @@ static int renesas_sdhi_probe(struct udevice *dev)
/* optional SDnH clock */
ret = clk_get_by_name(dev, "clkh", &priv->clkh);
- if (ret < 0)
+ if (ret < 0) {
dev_dbg(dev, "failed to get clkh\n");
+ } else {
+ ret = clk_set_rate(&priv->clkh, 800000000);
+ if (ret < 0) {
+ dev_err(dev, "failed to set rate for SDnH clock (%d)\n", ret);
+ goto err_clk;
+ }
+ }
/* set to max rate */
ret = clk_set_rate(&priv->clk, 200000000);
if (ret < 0) {
- dev_err(dev, "failed to set rate for host clock\n");
- clk_free(&priv->clk);
- return ret;
+ dev_err(dev, "failed to set rate for SDn clock (%d)\n", ret);
+ goto err_clkh;
}
ret = clk_enable(&priv->clk);
if (ret) {
- dev_err(dev, "failed to enable host clock\n");
- return ret;
+ dev_err(dev, "failed to enable SDn clock (%d)\n", ret);
+ goto err_clkh;
}
priv->quirks = quirks;
ret = tmio_sd_probe(dev, quirks);
+ if (ret)
+ goto err_tmio_probe;
renesas_sdhi_filter_caps(dev);
#if CONFIG_IS_ENABLED(MMC_UHS_SUPPORT) || \
CONFIG_IS_ENABLED(MMC_HS200_SUPPORT) || \
CONFIG_IS_ENABLED(MMC_HS400_SUPPORT)
- if (!ret && (priv->caps & TMIO_SD_CAP_RCAR_UHS))
+ if (priv->caps & TMIO_SD_CAP_RCAR_UHS)
renesas_sdhi_reset_tuning(priv);
#endif
+ return 0;
+
+err_tmio_probe:
+ clk_disable(&priv->clk);
+err_clkh:
+ clk_free(&priv->clkh);
+err_clk:
+ clk_free(&priv->clk);
return ret;
}
diff --git a/drivers/pinctrl/renesas/sh_pfc.h b/drivers/pinctrl/renesas/sh_pfc.h
index 59d447e..0ab743e 100644
--- a/drivers/pinctrl/renesas/sh_pfc.h
+++ b/drivers/pinctrl/renesas/sh_pfc.h
@@ -309,21 +309,6 @@ extern const struct sh_pfc_soc_info r8a77980_pinmux_info;
extern const struct sh_pfc_soc_info r8a77990_pinmux_info;
extern const struct sh_pfc_soc_info r8a77995_pinmux_info;
extern const struct sh_pfc_soc_info r8a779a0_pinmux_info;
-extern const struct sh_pfc_soc_info r8a779f0_pinmux_info;
-extern const struct sh_pfc_soc_info r8a779g0_pinmux_info;
-extern const struct sh_pfc_soc_info sh7203_pinmux_info;
-extern const struct sh_pfc_soc_info sh7264_pinmux_info;
-extern const struct sh_pfc_soc_info sh7269_pinmux_info;
-extern const struct sh_pfc_soc_info sh73a0_pinmux_info;
-extern const struct sh_pfc_soc_info sh7720_pinmux_info;
-extern const struct sh_pfc_soc_info sh7722_pinmux_info;
-extern const struct sh_pfc_soc_info sh7723_pinmux_info;
-extern const struct sh_pfc_soc_info sh7724_pinmux_info;
-extern const struct sh_pfc_soc_info sh7734_pinmux_info;
-extern const struct sh_pfc_soc_info sh7757_pinmux_info;
-extern const struct sh_pfc_soc_info sh7785_pinmux_info;
-extern const struct sh_pfc_soc_info sh7786_pinmux_info;
-extern const struct sh_pfc_soc_info shx3_pinmux_info;
/* -----------------------------------------------------------------------------
* Helper macros to create pin and port lists
diff --git a/drivers/sysinfo/rcar3.c b/drivers/sysinfo/rcar3.c
index c2f4ddf..7b12798 100644
--- a/drivers/sysinfo/rcar3.c
+++ b/drivers/sysinfo/rcar3.c
@@ -16,12 +16,14 @@
#define BOARD_SALVATOR_X 0x0
#define BOARD_KRIEK 0x1
#define BOARD_STARTER_KIT 0x2
+#define BOARD_EAGLE 0x3
#define BOARD_SALVATOR_XS 0x4
+#define BOARD_CONDOR 0x6
+#define BOARD_DRAAK 0x7
#define BOARD_EBISU 0x8
#define BOARD_STARTER_KIT_PRE 0xB
#define BOARD_EBISU_4D 0xD
-#define BOARD_DRAAK 0xE
-#define BOARD_EAGLE 0xF
+#define BOARD_CONDOR_I 0x10
/**
* struct sysinfo_rcar_priv - sysinfo private data
@@ -65,6 +67,7 @@ static void sysinfo_rcar_parse(struct sysinfo_rcar_priv *priv)
const u8 board_rev = priv->val & BOARD_REV_MASK;
bool salvator_xs = false;
bool ebisu_4d = false;
+ bool condor_i = false;
char rev_major = '?';
char rev_minor = '?';
@@ -138,6 +141,18 @@ static void sysinfo_rcar_parse(struct sysinfo_rcar_priv *priv)
"Renesas Kriek board rev %c.%c",
rev_major, rev_minor);
return;
+ case BOARD_CONDOR_I:
+ condor_i = true;
+ fallthrough;
+ case BOARD_CONDOR:
+ if (!board_rev) { /* Only rev 0 is valid */
+ rev_major = '1';
+ rev_minor = '0';
+ }
+ snprintf(priv->boardmodel, sizeof(priv->boardmodel),
+ "Renesas Condor%s board rev %c.%c",
+ condor_i ? "-I" : "", rev_major, rev_minor);
+ return;
default:
snprintf(priv->boardmodel, sizeof(priv->boardmodel),
"Renesas -Unknown- board rev ?.?");