mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/4] Add Mule NVRAM/ROM support
@ 2024-06-04 16:23 Farouk Bouabid
  2024-06-04 16:23 ` [PATCH 1/4] arm64: dts: rockchip: add mule nvram/rom to rk3399-puma Farouk Bouabid
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Farouk Bouabid @ 2024-06-04 16:23 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner
  Cc: devicetree, linux-arm-kernel, linux-rockchip, linux-kernel,
	Farouk Bouabid, quentin.schulz

Mule is an MCU that emulates a set of I2C devices which are reachable
through an I2C-mux that is implemented in a different patch-series[1].

Device #2 on the mux is an emulation of NVRAM (PCF8570 I2C interface)
with a size of 8 bytes.

Device #3 on the mux is an emulation of a read-only NVRAM (PCF8570 I2C
interface) with a size of 32 bytes. This memory contains information
relevant to the Mule firmware.

      +-----------------------------------------------+
      |  Mule                                         |
      |        +---------------+                      |
    ----+----->|Config register|                      |
      | |      +--------|------+                      |
      | |               |                             |
      | |               V                             |
      | |               __           +--------------+ |
      | |              |   \-------->| amc6821      | |
      | |              |   |         +--------------+ |
      | |              | M |-------->| PWM over I2C | |
      | +------------->| U |         +--------------+ |
      |                | X |-------->| NVRAM        | |
      |                |   |         +--------------+ |
      |                |   /-------->| ROM          | |
      |                |__/          +--------------+ |
      +-----------------------------------------------+

This patch-series adds support for the NVRAM and ROM on rk3399-puma-haikou,
px30-ringneck-haikou, rk3588-tiger-haikou and rk3588-jaguar boards.

This patch-series can only be merged after [1].

[1] https://lore.kernel.org/lkml/20240506-dev-mule-i2c-mux-v2-0-a91c954f65d7@cherry.de/

Signed-off-by: Farouk Bouabid <farouk.bouabid@cherry.de>
---
Farouk Bouabid (4):
      arm64: dts: rockchip: add mule nvram/rom to rk3399-puma
      arm64: dts: rockchip: add mule nvram/rom to px30-ringneck
      arm64: dts: rockchip: add mule nvram/rom to rk3588-tiger
      arm64: dts: rockchip: add mule nvram/rom to rk3588-jaguar

 arch/arm64/boot/dts/rockchip/px30-ringneck.dtsi | 45 +++++++++++++++++++++++++
 arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi   | 45 +++++++++++++++++++++++++
 arch/arm64/boot/dts/rockchip/rk3588-jaguar.dts  | 45 +++++++++++++++++++++++++
 arch/arm64/boot/dts/rockchip/rk3588-tiger.dtsi  | 45 +++++++++++++++++++++++++
 4 files changed, 180 insertions(+)
---
base-commit: 2917aef27decdfc367f37f599a613255c98c2c26
change-id: 20240531-nvmem-fd2902430de5

Best regards,
-- 
Farouk Bouabid <farouk.bouabid@cherry.de>


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

* [PATCH 1/4] arm64: dts: rockchip: add mule nvram/rom to rk3399-puma
  2024-06-04 16:23 [PATCH 0/4] Add Mule NVRAM/ROM support Farouk Bouabid
@ 2024-06-04 16:23 ` Farouk Bouabid
  2024-06-04 16:23 ` [PATCH 2/4] arm64: dts: rockchip: add mule nvram/rom to px30-ringneck Farouk Bouabid
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Farouk Bouabid @ 2024-06-04 16:23 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner
  Cc: devicetree, linux-arm-kernel, linux-rockchip, linux-kernel,
	Farouk Bouabid, quentin.schulz

Add mule NVRAM and ROM on the Mule I2C mux (0x18).

Signed-off-by: Farouk Bouabid <farouk.bouabid@cherry.de>
---
 arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi | 45 +++++++++++++++++++++++++++
 1 file changed, 45 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi
index 69b57cde7d78..7ab688c46a49 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi
@@ -11,6 +11,8 @@ / {
 	aliases {
 		ethernet0 = &gmac;
 		i2c10 = &i2c10;
+		i2c12 = &i2c12;
+		i2c13 = &i2c13;
 		mmc0 = &sdhci;
 	};
 
@@ -395,6 +397,49 @@ fan: fan@18 {
 				#cooling-cells = <2>;
 			};
 		};
+
+		i2c12: i2c@2 {
+			reg = <0x2>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			eeprom@18 {
+				compatible = "atmel,24c02";
+				reg = <0x18>;
+				size = <8>;
+			};
+		};
+
+		i2c13: i2c@3 {
+			reg = <0x3>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			eeprom@18 {
+				compatible = "atmel,24c02";
+				reg = <0x18>;
+				read-only;
+				size = <32>;
+
+				nvmem-layout {
+					compatible = "fixed-layout";
+					#address-cells = <1>;
+					#size-cells = <1>;
+
+					mule-variant@0 {
+						reg = <0x0 0x1>;
+					};
+
+					mule-bl-version@1 {
+						reg = <0x1 0x8>;
+					};
+
+					mule-version@9 {
+						reg = <0x9 0x8>;
+					};
+				};
+			};
+		};
 	};
 
 	rtc_twi: rtc@6f {

-- 
2.34.1


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

* [PATCH 2/4] arm64: dts: rockchip: add mule nvram/rom to px30-ringneck
  2024-06-04 16:23 [PATCH 0/4] Add Mule NVRAM/ROM support Farouk Bouabid
  2024-06-04 16:23 ` [PATCH 1/4] arm64: dts: rockchip: add mule nvram/rom to rk3399-puma Farouk Bouabid
@ 2024-06-04 16:23 ` Farouk Bouabid
  2024-06-04 16:23 ` [PATCH 3/4] arm64: dts: rockchip: add mule nvram/rom to rk3588-tiger Farouk Bouabid
  2024-06-04 16:23 ` [PATCH 4/4] arm64: dts: rockchip: add mule nvram/rom to rk3588-jaguar Farouk Bouabid
  3 siblings, 0 replies; 5+ messages in thread
From: Farouk Bouabid @ 2024-06-04 16:23 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner
  Cc: devicetree, linux-arm-kernel, linux-rockchip, linux-kernel,
	Farouk Bouabid, quentin.schulz

Add mule NVRAM and ROM on the Mule I2C mux (0x18).

Signed-off-by: Farouk Bouabid <farouk.bouabid@cherry.de>
---
 arch/arm64/boot/dts/rockchip/px30-ringneck.dtsi | 45 +++++++++++++++++++++++++
 1 file changed, 45 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/px30-ringneck.dtsi b/arch/arm64/boot/dts/rockchip/px30-ringneck.dtsi
index eea906379983..62591972df02 100644
--- a/arch/arm64/boot/dts/rockchip/px30-ringneck.dtsi
+++ b/arch/arm64/boot/dts/rockchip/px30-ringneck.dtsi
@@ -10,6 +10,8 @@
 / {
 	aliases {
 		i2c10 = &i2c10;
+		i2c12 = &i2c12;
+		i2c13 = &i2c13;
 		mmc0 = &emmc;
 		mmc1 = &sdio;
 		rtc0 = &rtc_twi;
@@ -309,6 +311,49 @@ fan: fan@18 {
 				#cooling-cells = <2>;
 			};
 		};
+
+		i2c12: i2c@2 {
+			reg = <0x2>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			eeprom@18 {
+				compatible = "atmel,24c02";
+				reg = <0x18>;
+				size = <8>;
+			};
+		};
+
+		i2c13: i2c@3 {
+			reg = <0x3>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			eeprom@18 {
+				compatible = "atmel,24c02";
+				reg = <0x18>;
+				read-only;
+				size = <32>;
+
+				nvmem-layout {
+					compatible = "fixed-layout";
+					#address-cells = <1>;
+					#size-cells = <1>;
+
+					mule-variant@0 {
+						reg = <0x0 0x1>;
+					};
+
+					mule-bl-version@1 {
+						reg = <0x1 0x8>;
+					};
+
+					mule-version@9 {
+						reg = <0x9 0x8>;
+					};
+				};
+			};
+		};
 	};
 
 	rtc_twi: rtc@6f {

-- 
2.34.1


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

* [PATCH 3/4] arm64: dts: rockchip: add mule nvram/rom to rk3588-tiger
  2024-06-04 16:23 [PATCH 0/4] Add Mule NVRAM/ROM support Farouk Bouabid
  2024-06-04 16:23 ` [PATCH 1/4] arm64: dts: rockchip: add mule nvram/rom to rk3399-puma Farouk Bouabid
  2024-06-04 16:23 ` [PATCH 2/4] arm64: dts: rockchip: add mule nvram/rom to px30-ringneck Farouk Bouabid
@ 2024-06-04 16:23 ` Farouk Bouabid
  2024-06-04 16:23 ` [PATCH 4/4] arm64: dts: rockchip: add mule nvram/rom to rk3588-jaguar Farouk Bouabid
  3 siblings, 0 replies; 5+ messages in thread
From: Farouk Bouabid @ 2024-06-04 16:23 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner
  Cc: devicetree, linux-arm-kernel, linux-rockchip, linux-kernel,
	Farouk Bouabid, quentin.schulz

Add mule NVRAM and ROM on the Mule I2C mux (0x18).

Signed-off-by: Farouk Bouabid <farouk.bouabid@cherry.de>
---
 arch/arm64/boot/dts/rockchip/rk3588-tiger.dtsi | 45 ++++++++++++++++++++++++++
 1 file changed, 45 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3588-tiger.dtsi b/arch/arm64/boot/dts/rockchip/rk3588-tiger.dtsi
index 5ed7d51717bb..7418bf86a618 100644
--- a/arch/arm64/boot/dts/rockchip/rk3588-tiger.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3588-tiger.dtsi
@@ -13,6 +13,8 @@ / {
 
 	aliases {
 		i2c10 = &i2c10;
+		i2c12 = &i2c12;
+		i2c13 = &i2c13;
 		mmc0 = &sdhci;
 		rtc0 = &rtc_twi;
 	};
@@ -228,6 +230,49 @@ fan: fan@18 {
 				#cooling-cells = <2>;
 			};
 		};
+
+		i2c12: i2c@2 {
+			reg = <0x2>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			eeprom@18 {
+				compatible = "atmel,24c02";
+				reg = <0x18>;
+				size = <8>;
+			};
+		};
+
+		i2c13: i2c@3 {
+			reg = <0x3>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			eeprom@18 {
+				compatible = "atmel,24c02";
+				reg = <0x18>;
+				read-only;
+				size = <32>;
+
+				nvmem-layout {
+					compatible = "fixed-layout";
+					#address-cells = <1>;
+					#size-cells = <1>;
+
+					mule-variant@0 {
+						reg = <0x0 0x1>;
+					};
+
+					mule-bl-version@1 {
+						reg = <0x1 0x8>;
+					};
+
+					mule-version@9 {
+						reg = <0x9 0x8>;
+					};
+				};
+			};
+		};
 	};
 
 	rtc_twi: rtc@6f {

-- 
2.34.1


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

* [PATCH 4/4] arm64: dts: rockchip: add mule nvram/rom to rk3588-jaguar
  2024-06-04 16:23 [PATCH 0/4] Add Mule NVRAM/ROM support Farouk Bouabid
                   ` (2 preceding siblings ...)
  2024-06-04 16:23 ` [PATCH 3/4] arm64: dts: rockchip: add mule nvram/rom to rk3588-tiger Farouk Bouabid
@ 2024-06-04 16:23 ` Farouk Bouabid
  3 siblings, 0 replies; 5+ messages in thread
From: Farouk Bouabid @ 2024-06-04 16:23 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner
  Cc: devicetree, linux-arm-kernel, linux-rockchip, linux-kernel,
	Farouk Bouabid, quentin.schulz

Add mule NVRAM and ROM on the Mule I2C mux (0x18).

Signed-off-by: Farouk Bouabid <farouk.bouabid@cherry.de>
---
 arch/arm64/boot/dts/rockchip/rk3588-jaguar.dts | 45 ++++++++++++++++++++++++++
 1 file changed, 45 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3588-jaguar.dts b/arch/arm64/boot/dts/rockchip/rk3588-jaguar.dts
index 14f1322c162f..7434771901c3 100644
--- a/arch/arm64/boot/dts/rockchip/rk3588-jaguar.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3588-jaguar.dts
@@ -33,6 +33,8 @@ button-bios-disable {
 	aliases {
 		ethernet0 = &gmac0;
 		i2c10 = &i2c10;
+		i2c12 = &i2c12;
+		i2c13 = &i2c13;
 		mmc0 = &sdhci;
 		mmc1 = &sdmmc;
 		rtc0 = &rtc_twi;
@@ -267,6 +269,49 @@ fan: fan@18 {
 				#cooling-cells = <2>;
 			};
 		};
+
+		i2c12: i2c@2 {
+			reg = <0x2>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			eeprom@18 {
+				compatible = "atmel,24c02";
+				reg = <0x18>;
+				size = <8>;
+			};
+		};
+
+		i2c13: i2c@3 {
+			reg = <0x3>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			eeprom@18 {
+				compatible = "atmel,24c02";
+				reg = <0x18>;
+				read-only;
+				size = <32>;
+
+				nvmem-layout {
+					compatible = "fixed-layout";
+					#address-cells = <1>;
+					#size-cells = <1>;
+
+					mule-variant@0 {
+						reg = <0x0 0x1>;
+					};
+
+					mule-bl-version@1 {
+						reg = <0x1 0x8>;
+					};
+
+					mule-version@9 {
+						reg = <0x9 0x8>;
+					};
+				};
+			};
+		};
 	};
 
 	vdd_npu_s0: regulator@42 {

-- 
2.34.1


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

end of thread, other threads:[~2024-06-04 16:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-04 16:23 [PATCH 0/4] Add Mule NVRAM/ROM support Farouk Bouabid
2024-06-04 16:23 ` [PATCH 1/4] arm64: dts: rockchip: add mule nvram/rom to rk3399-puma Farouk Bouabid
2024-06-04 16:23 ` [PATCH 2/4] arm64: dts: rockchip: add mule nvram/rom to px30-ringneck Farouk Bouabid
2024-06-04 16:23 ` [PATCH 3/4] arm64: dts: rockchip: add mule nvram/rom to rk3588-tiger Farouk Bouabid
2024-06-04 16:23 ` [PATCH 4/4] arm64: dts: rockchip: add mule nvram/rom to rk3588-jaguar Farouk Bouabid

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®