Skip to contentSkip to conversation

arm64: Select HAVE_SHARED_GPIOS for ARCH_MXC

PATCH Applied Marek Vasut 3 participants 7 messages Aug 10 – Sep 2

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 arm64: Select HAVE_SHARED_GPIOS for ARCH_MXC

Some NXP i.MX platforms use shared GPIOs. Enable support for them by selecting the Kconfig switch provided by GPIOLIB.

---
Cc: Bartosz Golaszewski <[email protected]>
Cc: Catalin Marinas <[email protected]>
Cc: Conor Dooley <[email protected]>
Cc: Fabio Estevam <[email protected]>
Cc: Fedor Ross <[email protected]>
Cc: Frank Li <[email protected]>
Cc: Krzysztof Kozlowski <[email protected]>
Cc: Linus Walleij <[email protected]>
Cc: Mark Rutland <[email protected]>
Cc: Rob Herring <[email protected]>
Cc: Will Deacon <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]

---
 arch/arm64/Kconfig.platforms | 1 +
 1 file changed, 1 insertion(+)
arch/arm64/Kconfig.platforms +1 -0
index d2acfac730037..bc279b864d3cb 100644
@@ -275,6 +275,7 @@ config ARCH_MXC
 	bool "NXP i.MX SoC family"
 	select ARM64_ERRATUM_843419
 	select ARM64_ERRATUM_845719 if COMPAT
+	select HAVE_SHARED_GPIOS
 	select IMX_GPCV2
 	select IMX_GPCV2_PM_DOMAINS
 	select PM
Signature · 1 line
2.53.0
#1 lore raw

PATCH 2/2 arm64: dts: imx8mn: Expand EEPROM description on ifm VHIP4 EvalBoard

Describe the EEPROM write protect GPIOs and labels on VHIP4 EvalBoard.

---
Cc: Bartosz Golaszewski <[email protected]>
Cc: Catalin Marinas <[email protected]>
Cc: Conor Dooley <[email protected]>
Cc: Fabio Estevam <[email protected]>
Cc: Fedor Ross <[email protected]>
Cc: Frank Li <[email protected]>
Cc: Krzysztof Kozlowski <[email protected]>
Cc: Linus Walleij <[email protected]>
Cc: Mark Rutland <[email protected]>
Cc: Rob Herring <[email protected]>
Cc: Will Deacon <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]

---
 .../imx8mn-vhip4-evalboard-common.dtsi        |  3 +-
 .../freescale/imx8mn-vhip4-evalboard-v1.dts   |  8 ++++++
 .../freescale/imx8mn-vhip4-evalboard-v2.dts   | 28 ++++++++++++++++---
 3 files changed, 34 insertions(+), 5 deletions(-)
arch/arm64/boot/dts/freescale/imx8mn-vhip4-evalboard-common.dtsi +2 -1
index aaf9761703aaf..73b1ed2632a39 100644
@@ -142,8 +142,9 @@ &i2c1 {
 	pinctrl-0 = <&pinctrl_i2c1>;
 	pinctrl-1 = <&pinctrl_i2c1_gpio>;
 
-	eeprom@51 {
+	cfg_eeprom: eeprom@51 {
 		compatible = "atmel,24c128";
+		label = "ifm-deviceinfo";
 		reg = <0x51>;
 	};
 
arch/arm64/boot/dts/freescale/imx8mn-vhip4-evalboard-v1.dts +8 -0
index a8f7c226a61f8..98dd241a9d5ce 100644
@@ -13,6 +13,11 @@ / {
 		     "ifm,imx8mn-vhip4", "fsl,imx8mn";
 };
 
+&cfg_eeprom {
+	/* Shared with logging EEPROM on v1 hardware */
+	wp-gpios = <&gpio5 20 GPIO_ACTIVE_HIGH>;
+};
+
 &ifm_led {
 	pinctrl-1 = <&pinctrl_gpio_led_v1>;
 
@@ -90,7 +95,10 @@ temperature-sensor@48 {
 
 	eeprom@50 {
 		compatible = "atmel,24c128";
+		label = "ifm-logging";
 		reg = <0x50>;
+		/* Shared with configuration EEPROM on v1 hardware */
+		wp-gpios = <&gpio5 20 GPIO_ACTIVE_HIGH>;
 	};
 };
 
arch/arm64/boot/dts/freescale/imx8mn-vhip4-evalboard-v2.dts +24 -4
index 43fd4d0041ef3..04fa43b12d2b5 100644
@@ -20,6 +20,12 @@ multi-led {
 	};
 };
 
+&cfg_eeprom {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_cfgeeprom>;
+	wp-gpios = <&gpio2 11 GPIO_ACTIVE_HIGH>;
+};
+
 &ifm_led {
 	pinctrl-1 = <&pinctrl_gpio_led_v2>;
 
@@ -87,7 +93,11 @@ temperature-sensor@48 {
 
 	eeprom@54 {
 		compatible = "atmel,24c128";
+		pinctrl-names = "default";
+		pinctrl-0 = <&pinctrl_logeeprom>;
+		label = "ifm-logging";
 		reg = <0x54>;
+		wp-gpios = <&gpio5 3 GPIO_ACTIVE_HIGH>;
 	};
 };
 
@@ -103,6 +113,13 @@ &ifm_pmic {
 };
 
 &iomuxc {
+	pinctrl_cfgeeprom: cfgeeprom-grp {
+		fsl,pins = <
+			/* CFG_EEPROM_WP */
+			MX8MN_IOMUXC_SD1_STROBE_GPIO2_IO11		0x140
+		>;
+	};
+
 	pinctrl_ecspi1_cs: ecspi1-cs-grp {
 		fsl,pins = <
 			/* KS8794 nCS */
@@ -143,12 +160,8 @@ pinctrl_i2c1_gpio: i2c1-gpio-grp {
 		fsl,pins = <
 			MX8MN_IOMUXC_SD1_DATA4_GPIO2_IO6		0x56
 			MX8MN_IOMUXC_SD1_DATA5_GPIO2_IO7		0xd6
-			/* CFG_EEPROM_WP */
-			MX8MN_IOMUXC_SD1_STROBE_GPIO2_IO11		0x140
 			/* RTC_nIRQ */
 			MX8MN_IOMUXC_SPDIF_EXT_CLK_GPIO5_IO5		0x116
-			/* LOG_EE_WP */
-			MX8MN_IOMUXC_SPDIF_TX_GPIO5_IO3			0x140
 		>;
 	};
 
@@ -166,6 +179,13 @@ MX8MN_IOMUXC_I2C3_SDA_GPIO5_IO19		0xd6
 		>;
 	};
 
+	pinctrl_logeeprom: logeeprom-grp {
+		fsl,pins = <
+			/* LOG_EE_WP */
+			MX8MN_IOMUXC_SPDIF_TX_GPIO5_IO3			0x140
+		>;
+	};
+
 	pinctrl_mcp2518: mcp2518-grp {
 		fsl,pins = <
 			/* CAN0_CLKO */
Signature · 1 line
2.53.0
#3 lore raw
In reply to Marek Vasut
Quoted 5 lines · Marek Vasut

Some NXP i.MX platforms use shared GPIOs. Enable support for them by selecting the Kconfig switch provided by GPIOLIB.

---

Haibo have similar patch
https://lore.kernel.org/imx/[email protected]/

But I hope the SoC maintainer provide review/ack-by tags

Frank

Quoted 35 lines
Cc Bartosz Golaszewski <[email protected]>
Cc Catalin Marinas <[email protected]>
Cc Conor Dooley <[email protected]>
Cc Fabio Estevam <[email protected]>
Cc Fedor Ross <[email protected]>
Cc Frank Li <[email protected]>
Cc Krzysztof Kozlowski <[email protected]>
Cc Linus Walleij <[email protected]>
Cc Mark Rutland <[email protected]>
Cc Rob Herring <[email protected]>
Cc Will Deacon <[email protected]>
---
 arch/arm64/Kconfig.platforms | 1 +
 1 file changed, 1 insertion(+)
arch/arm64/Kconfig.platforms +1 -1
index d2acfac730037..bc279b864d3cb 100644
@@ -275,6 +275,7 @@ config ARCH_MXC
 	bool "NXP i.MX SoC family"
 	select ARM64_ERRATUM_843419
 	select ARM64_ERRATUM_845719 if COMPAT
+	select HAVE_SHARED_GPIOS
 	select IMX_GPCV2
 	select IMX_GPCV2_PM_DOMAINS
 	select PM
--

2.53.0

#4 lore raw
Quoted 11 lines · Frank Li
Quoted 5 lines · Marek Vasut

Some NXP i.MX platforms use shared GPIOs. Enable support for them by selecting the Kconfig switch provided by GPIOLIB.

---

Haibo have similar patch
https://lore.kernel.org/imx/[email protected]/

But I hope the SoC maintainer provide review/ack-by tags

This patch keeps the list of select-ed Kconfig symbols sorted, the one from Haibo does not. But with that fixed, the patches are equivalent.

Reviewed-by on v1 1/2
#5 lore raw
In reply to Marek Vasut
Quoted 37 lines · Marek Vasut

Some NXP i.MX platforms use shared GPIOs. Enable support for them by selecting the Kconfig switch provided by GPIOLIB.

---
Cc: Bartosz Golaszewski <[email protected]>
Cc: Catalin Marinas <[email protected]>
Cc: Conor Dooley <[email protected]>
Cc: Fabio Estevam <[email protected]>
Cc: Fedor Ross <[email protected]>
Cc: Frank Li <[email protected]>
Cc: Krzysztof Kozlowski <[email protected]>
Cc: Linus Walleij <[email protected]>
Cc: Mark Rutland <[email protected]>
Cc: Rob Herring <[email protected]>
Cc: Will Deacon <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]

---
 arch/arm64/Kconfig.platforms | 1 +
 1 file changed, 1 insertion(+)
arch/arm64/Kconfig.platforms +1 -1
index d2acfac730037..bc279b864d3cb 100644
@@ -275,6 +275,7 @@ config ARCH_MXC
 	bool "NXP i.MX SoC family"
 	select ARM64_ERRATUM_843419
 	select ARM64_ERRATUM_845719 if COMPAT
+	select HAVE_SHARED_GPIOS
 	select IMX_GPCV2
 	select IMX_GPCV2_PM_DOMAINS
 	select PM
--
Quoted 3 lines

2.53.0

#6 lore raw

Re: (subset) [PATCH 1/2] arm64: Select HAVE_SHARED_GPIOS for ARCH_MXC

In reply to Marek Vasut

From: Frank Li <[email protected]>

Quoted 2 lines · Marek Vasut

Some NXP i.MX platforms use shared GPIOs. Enable support for them by selecting the Kconfig switch provided by GPIOLIB.

Applied, thanks!

[2/2] arm64: dts: imx8mn: Expand EEPROM description on ifm VHIP4 EvalBoard

      commit: 5c67d91ae29a3923fe170845ae3800e4d11225e1

Move reg as second property

Best regards,
--
Frank Li <[email protected]>