All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] ARM: dts: rmobile: Add sysinfo extras on R-Car Gen3
@ 2021-07-04 19:36 Marek Vasut
  2021-07-04 19:36 ` [PATCH 2/3] ARM: rmobile: Enable I2C EEPROM support " Marek Vasut
  2021-07-04 19:36 ` [PATCH 3/3] ARM: rmobile: Enable sysinfo " Marek Vasut
  0 siblings, 2 replies; 3+ messages in thread
From: Marek Vasut @ 2021-07-04 19:36 UTC (permalink / raw)
  To: u-boot; +Cc: Marek Vasut

Add sysinfo node and phandle to the board ID EEPROM on all boards
where this functionality is described in DT, which is Salvator-X(S),
ULCB and Ebisu. The u-boot,dm-pre-reloc is necessary here, since the
sysinfo must be available early during boot. The V3M and V3H boards
currently do not describe this board ID EEPROM in upstream DT, but
that could be easily added later, once the DTs contain the necessary
nodes.

ULCB and Ebisu needs the full EEPROM node in the u-boot extras DT,
since the EEPROM node is still missing in the upstream DTs. Ebisu
also needs extra compatible string override for the i2c_dvfs.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
---
 arch/arm/dts/r8a77950-salvator-x-u-boot.dts | 17 +++++++++++++++
 arch/arm/dts/r8a77950-ulcb-u-boot.dts       | 18 ++++++++++++++++
 arch/arm/dts/r8a77960-salvator-x-u-boot.dts | 17 +++++++++++++++
 arch/arm/dts/r8a77960-ulcb-u-boot.dts       | 18 ++++++++++++++++
 arch/arm/dts/r8a77965-salvator-x-u-boot.dts | 17 +++++++++++++++
 arch/arm/dts/r8a77965-ulcb-u-boot.dts       | 18 ++++++++++++++++
 arch/arm/dts/r8a77990-ebisu-u-boot.dts      | 23 +++++++++++++++++++++
 7 files changed, 128 insertions(+)

diff --git a/arch/arm/dts/r8a77950-salvator-x-u-boot.dts b/arch/arm/dts/r8a77950-salvator-x-u-boot.dts
index 36c8a44a90..bb83bc1d7b 100644
--- a/arch/arm/dts/r8a77950-salvator-x-u-boot.dts
+++ b/arch/arm/dts/r8a77950-salvator-x-u-boot.dts
@@ -8,6 +8,23 @@
 #include "r8a77950-salvator-x.dts"
 #include "r8a77950-u-boot.dtsi"
 
+/ {
+	sysinfo {
+		compatible = "renesas,rcar-sysinfo";
+		i2c-eeprom = <&sysinfo_eeprom>;
+		u-boot,dm-pre-reloc;
+	};
+};
+
+&i2c_dvfs {
+	u-boot,dm-pre-reloc;
+
+	sysinfo_eeprom: eeprom@50 {
+		u-boot,dm-pre-reloc;
+		status = "okay";
+	};
+};
+
 &rpc {
 	reg = <0 0xee200000 0 0x100>, <0 0x08000000 0 0x04000000>;
 	status = "okay";
diff --git a/arch/arm/dts/r8a77950-ulcb-u-boot.dts b/arch/arm/dts/r8a77950-ulcb-u-boot.dts
index d3191c55d5..16d9e38b70 100644
--- a/arch/arm/dts/r8a77950-ulcb-u-boot.dts
+++ b/arch/arm/dts/r8a77950-ulcb-u-boot.dts
@@ -17,6 +17,24 @@
 		gpio-miso = <&gpio6 10 0>;
 		gpio-sstbz = <&gpio2 3 0>;
 	};
+
+	sysinfo {
+		compatible = "renesas,rcar-sysinfo";
+		i2c-eeprom = <&sysinfo_eeprom>;
+		u-boot,dm-pre-reloc;
+	};
+};
+
+&i2c_dvfs {
+	u-boot,dm-pre-reloc;
+
+	sysinfo_eeprom: eeprom@50 {
+		compatible = "rohm,br24t01", "atmel,24c01";
+		reg = <0x50>;
+		pagesize = <8>;
+		u-boot,dm-pre-reloc;
+		status = "okay";
+	};
 };
 
 &rpc {
diff --git a/arch/arm/dts/r8a77960-salvator-x-u-boot.dts b/arch/arm/dts/r8a77960-salvator-x-u-boot.dts
index 439fd6c3ad..dda3567e9e 100644
--- a/arch/arm/dts/r8a77960-salvator-x-u-boot.dts
+++ b/arch/arm/dts/r8a77960-salvator-x-u-boot.dts
@@ -8,6 +8,23 @@
 #include "r8a77960-salvator-x.dts"
 #include "r8a77960-u-boot.dtsi"
 
+/ {
+	sysinfo {
+		compatible = "renesas,rcar-sysinfo";
+		i2c-eeprom = <&sysinfo_eeprom>;
+		u-boot,dm-pre-reloc;
+	};
+};
+
+&i2c_dvfs {
+	u-boot,dm-pre-reloc;
+
+	sysinfo_eeprom: eeprom@50 {
+		u-boot,dm-pre-reloc;
+		status = "okay";
+	};
+};
+
 &rpc {
 	reg = <0 0xee200000 0 0x100>, <0 0x08000000 0 0x04000000>;
 	status = "okay";
diff --git a/arch/arm/dts/r8a77960-ulcb-u-boot.dts b/arch/arm/dts/r8a77960-ulcb-u-boot.dts
index aab9c95931..e4f77ae262 100644
--- a/arch/arm/dts/r8a77960-ulcb-u-boot.dts
+++ b/arch/arm/dts/r8a77960-ulcb-u-boot.dts
@@ -17,6 +17,24 @@
 		gpio-miso = <&gpio6 10 0>;
 		gpio-sstbz = <&gpio2 3 0>;
 	};
+
+	sysinfo {
+		compatible = "renesas,rcar-sysinfo";
+		i2c-eeprom = <&sysinfo_eeprom>;
+		u-boot,dm-pre-reloc;
+	};
+};
+
+&i2c_dvfs {
+	u-boot,dm-pre-reloc;
+
+	sysinfo_eeprom: eeprom@50 {
+		compatible = "rohm,br24t01", "atmel,24c01";
+		reg = <0x50>;
+		pagesize = <8>;
+		u-boot,dm-pre-reloc;
+		status = "okay";
+	};
 };
 
 &rpc {
diff --git a/arch/arm/dts/r8a77965-salvator-x-u-boot.dts b/arch/arm/dts/r8a77965-salvator-x-u-boot.dts
index 8cbef83b9c..e651e889bc 100644
--- a/arch/arm/dts/r8a77965-salvator-x-u-boot.dts
+++ b/arch/arm/dts/r8a77965-salvator-x-u-boot.dts
@@ -8,6 +8,23 @@
 #include "r8a77965-salvator-x.dts"
 #include "r8a77965-u-boot.dtsi"
 
+/ {
+	sysinfo {
+		compatible = "renesas,rcar-sysinfo";
+		i2c-eeprom = <&sysinfo_eeprom>;
+		u-boot,dm-pre-reloc;
+	};
+};
+
+&i2c_dvfs {
+	u-boot,dm-pre-reloc;
+
+	sysinfo_eeprom: eeprom@50 {
+		u-boot,dm-pre-reloc;
+		status = "okay";
+	};
+};
+
 &rpc {
 	reg = <0 0xee200000 0 0x100>, <0 0x08000000 0 0x04000000>;
 	status = "okay";
diff --git a/arch/arm/dts/r8a77965-ulcb-u-boot.dts b/arch/arm/dts/r8a77965-ulcb-u-boot.dts
index 38966bf644..3574d6da6f 100644
--- a/arch/arm/dts/r8a77965-ulcb-u-boot.dts
+++ b/arch/arm/dts/r8a77965-ulcb-u-boot.dts
@@ -17,6 +17,24 @@
 		gpio-miso = <&gpio6 10 0>;
 		gpio-sstbz = <&gpio2 3 0>;
 	};
+
+	sysinfo {
+		compatible = "renesas,rcar-sysinfo";
+		i2c-eeprom = <&sysinfo_eeprom>;
+		u-boot,dm-pre-reloc;
+	};
+};
+
+&i2c_dvfs {
+	u-boot,dm-pre-reloc;
+
+	sysinfo_eeprom: eeprom@50 {
+		compatible = "rohm,br24t01", "atmel,24c01";
+		reg = <0x50>;
+		pagesize = <8>;
+		u-boot,dm-pre-reloc;
+		status = "okay";
+	};
 };
 
 &rpc {
diff --git a/arch/arm/dts/r8a77990-ebisu-u-boot.dts b/arch/arm/dts/r8a77990-ebisu-u-boot.dts
index 6afc0be66e..7022a2ba84 100644
--- a/arch/arm/dts/r8a77990-ebisu-u-boot.dts
+++ b/arch/arm/dts/r8a77990-ebisu-u-boot.dts
@@ -8,6 +8,29 @@
 #include "r8a77990-ebisu.dts"
 #include "r8a77990-u-boot.dtsi"
 
+/ {
+	sysinfo {
+		compatible = "renesas,rcar-sysinfo";
+		i2c-eeprom = <&sysinfo_eeprom>;
+		u-boot,dm-pre-reloc;
+	};
+};
+
+&i2c_dvfs {
+	compatible = "renesas,iic-r8a77990",
+		     "renesas,rcar-gen3-iic",
+		     "renesas,rmobile-iic";
+	u-boot,dm-pre-reloc;
+
+	sysinfo_eeprom: eeprom@50 {
+		compatible = "rohm,br24t01", "atmel,24c01";
+		reg = <0x50>;
+		pagesize = <8>;
+		u-boot,dm-pre-reloc;
+		status = "okay";
+	};
+};
+
 &pfc {
 	pinctrl-0 = <&scif_clk_pins>;
 	pinctrl-names = "default";
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/3] ARM: rmobile: Enable I2C EEPROM support on R-Car Gen3
  2021-07-04 19:36 [PATCH 1/3] ARM: dts: rmobile: Add sysinfo extras on R-Car Gen3 Marek Vasut
@ 2021-07-04 19:36 ` Marek Vasut
  2021-07-04 19:36 ` [PATCH 3/3] ARM: rmobile: Enable sysinfo " Marek Vasut
  1 sibling, 0 replies; 3+ messages in thread
From: Marek Vasut @ 2021-07-04 19:36 UTC (permalink / raw)
  To: u-boot; +Cc: Marek Vasut

Enable support for I2C EEPROM driver on supported Renesas R-Car Gen3 boards.
This is useful for accessing the board ID EEPROM.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
---
 configs/r8a77990_ebisu_defconfig   | 7 +++++++
 configs/rcar3_salvator-x_defconfig | 7 +++++++
 configs/rcar3_ulcb_defconfig       | 7 +++++++
 3 files changed, 21 insertions(+)

diff --git a/configs/r8a77990_ebisu_defconfig b/configs/r8a77990_ebisu_defconfig
index 15743c1a81..13ca814cbc 100644
--- a/configs/r8a77990_ebisu_defconfig
+++ b/configs/r8a77990_ebisu_defconfig
@@ -50,6 +50,13 @@ CONFIG_DFU_SF=y
 CONFIG_RCAR_GPIO=y
 CONFIG_DM_I2C=y
 CONFIG_SYS_I2C_RCAR_IIC=y
+CONFIG_MISC=y
+CONFIG_I2C_EEPROM=y
+CONFIG_SYS_I2C_EEPROM_ADDR=0x70
+CONFIG_SYS_I2C_EEPROM_BUS=7
+CONFIG_SYS_EEPROM_SIZE=128
+CONFIG_SYS_EEPROM_PAGE_WRITE_BITS=7
+CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS=10
 CONFIG_MMC_IO_VOLTAGE=y
 CONFIG_MMC_UHS_SUPPORT=y
 CONFIG_MMC_HS400_SUPPORT=y
diff --git a/configs/rcar3_salvator-x_defconfig b/configs/rcar3_salvator-x_defconfig
index efd6ca2da8..ef9775abfa 100644
--- a/configs/rcar3_salvator-x_defconfig
+++ b/configs/rcar3_salvator-x_defconfig
@@ -52,6 +52,13 @@ CONFIG_DFU_SF=y
 CONFIG_RCAR_GPIO=y
 CONFIG_DM_I2C=y
 CONFIG_SYS_I2C_RCAR_IIC=y
+CONFIG_MISC=y
+CONFIG_I2C_EEPROM=y
+CONFIG_SYS_I2C_EEPROM_ADDR=0x70
+CONFIG_SYS_I2C_EEPROM_BUS=7
+CONFIG_SYS_EEPROM_SIZE=128
+CONFIG_SYS_EEPROM_PAGE_WRITE_BITS=7
+CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS=10
 CONFIG_MMC_IO_VOLTAGE=y
 CONFIG_MMC_UHS_SUPPORT=y
 CONFIG_MMC_HS400_SUPPORT=y
diff --git a/configs/rcar3_ulcb_defconfig b/configs/rcar3_ulcb_defconfig
index a857e5bd1c..cfec485ec7 100644
--- a/configs/rcar3_ulcb_defconfig
+++ b/configs/rcar3_ulcb_defconfig
@@ -52,6 +52,13 @@ CONFIG_DFU_SF=y
 CONFIG_RCAR_GPIO=y
 CONFIG_DM_I2C=y
 CONFIG_SYS_I2C_RCAR_IIC=y
+CONFIG_MISC=y
+CONFIG_I2C_EEPROM=y
+CONFIG_SYS_I2C_EEPROM_ADDR=0x70
+CONFIG_SYS_I2C_EEPROM_BUS=7
+CONFIG_SYS_EEPROM_SIZE=128
+CONFIG_SYS_EEPROM_PAGE_WRITE_BITS=7
+CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS=10
 CONFIG_MMC_IO_VOLTAGE=y
 CONFIG_MMC_UHS_SUPPORT=y
 CONFIG_MMC_HS400_SUPPORT=y
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 3/3] ARM: rmobile: Enable sysinfo on R-Car Gen3
  2021-07-04 19:36 [PATCH 1/3] ARM: dts: rmobile: Add sysinfo extras on R-Car Gen3 Marek Vasut
  2021-07-04 19:36 ` [PATCH 2/3] ARM: rmobile: Enable I2C EEPROM support " Marek Vasut
@ 2021-07-04 19:36 ` Marek Vasut
  1 sibling, 0 replies; 3+ messages in thread
From: Marek Vasut @ 2021-07-04 19:36 UTC (permalink / raw)
  To: u-boot; +Cc: Marek Vasut

Enable support for sysinfo on supported R-Car Gen3 boards. The sysinfo
is used e.g. to access and decode board-specific information and then
in turn used by board-info to print those information. On R-Car Gen3
the sysinfo rcar3 driver is used to parse the board ID EEPROM, obtain
board type and revision from it, and let board-info print this
information on boot.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
---
 configs/r8a77990_ebisu_defconfig   | 1 +
 configs/rcar3_salvator-x_defconfig | 1 +
 configs/rcar3_ulcb_defconfig       | 1 +
 3 files changed, 3 insertions(+)

diff --git a/configs/r8a77990_ebisu_defconfig b/configs/r8a77990_ebisu_defconfig
index 13ca814cbc..69297fef66 100644
--- a/configs/r8a77990_ebisu_defconfig
+++ b/configs/r8a77990_ebisu_defconfig
@@ -83,6 +83,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/rcar3_salvator-x_defconfig b/configs/rcar3_salvator-x_defconfig
index ef9775abfa..150db3bff5 100644
--- a/configs/rcar3_salvator-x_defconfig
+++ b/configs/rcar3_salvator-x_defconfig
@@ -90,6 +90,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/rcar3_ulcb_defconfig b/configs/rcar3_ulcb_defconfig
index cfec485ec7..a6f806c3c3 100644
--- a/configs/rcar3_ulcb_defconfig
+++ b/configs/rcar3_ulcb_defconfig
@@ -86,6 +86,7 @@ CONFIG_SPI=y
 CONFIG_DM_SPI=y
 CONFIG_RENESAS_RPC_SPI=y
 CONFIG_SYSRESET=y
+CONFIG_SYSINFO=y
 CONFIG_TEE=y
 CONFIG_OPTEE=y
 CONFIG_USB=y
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-07-04 19:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-04 19:36 [PATCH 1/3] ARM: dts: rmobile: Add sysinfo extras on R-Car Gen3 Marek Vasut
2021-07-04 19:36 ` [PATCH 2/3] ARM: rmobile: Enable I2C EEPROM support " Marek Vasut
2021-07-04 19:36 ` [PATCH 3/3] ARM: rmobile: Enable sysinfo " Marek Vasut

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.