Skip to contentSkip to conversation

pinctrl: airoha: fix wrong value for PCIe reset pin

PATCH In review Christian Marangi 4 participants 4 messages Aug 5 – Aug 7

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

PATCH 1/1 pinctrl: airoha: fix wrong value for PCIe reset pin

The PCIe reset pin actually require the bit to be set as 0 to work as PCIe reset pin. When the bit is set as 1, then the PCIe reset pin act as a GPIO for GPIO44, GPIO45 and GPIO46.

Fixes 1c8ace2d0725 ("pinctrl: airoha: Add support for EN7581 SoC")
---
 drivers/pinctrl/airoha/pinctrl-airoha.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/pinctrl/airoha/pinctrl-airoha.c +3 -3
index 04b4424c688b..6409572c0a4b 100644
@@ -1412,7 +1412,7 @@ static const struct airoha_pinctrl_func_group pcie_reset_func_group[] = {
 			AIROHA_FUNC_MUX,
 			REG_GPIO_PON_MODE,
 			GPIO_PCIE_RESET0_MASK,
-			GPIO_PCIE_RESET0_MASK
+			0
 		},
 		.regmap_size = 1,
 	}, {
@@ -1421,7 +1421,7 @@ static const struct airoha_pinctrl_func_group pcie_reset_func_group[] = {
 			AIROHA_FUNC_MUX,
 			REG_GPIO_PON_MODE,
 			GPIO_PCIE_RESET1_MASK,
-			GPIO_PCIE_RESET1_MASK
+			0
 		},
 		.regmap_size = 1,
 	}, {
@@ -1430,7 +1430,7 @@ static const struct airoha_pinctrl_func_group pcie_reset_func_group[] = {
 			AIROHA_FUNC_MUX,
 			REG_GPIO_PON_MODE,
 			GPIO_PCIE_RESET2_MASK,
-			GPIO_PCIE_RESET2_MASK
+			0
 		},
 		.regmap_size = 1,
 	},
Signature · 1 line
2.53.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 34 lines · Christian Marangi

The PCIe reset pin actually require the bit to be set as 0 to work as PCIe reset pin. When the bit is set as 1, then the PCIe reset pin act as a GPIO for GPIO44, GPIO45 and GPIO46.

Fixes 1c8ace2d0725 ("pinctrl: airoha: Add support for EN7581 SoC")
---
  drivers/pinctrl/airoha/pinctrl-airoha.c | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)
drivers/pinctrl/airoha/pinctrl-airoha.c +2 -2
index 04b4424c688b..6409572c0a4b 100644
@@ -1412,7 +1412,7 @@ static const struct airoha_pinctrl_func_group pcie_reset_func_group[] = {
  			AIROHA_FUNC_MUX,
  			REG_GPIO_PON_MODE,
  			GPIO_PCIE_RESET0_MASK,
-			GPIO_PCIE_RESET0_MASK
+			0
  		},
  		.regmap_size = 1,
  	}, {
@@ -1421,7 +1421,7 @@ static const struct airoha_pinctrl_func_group pcie_reset_func_group[] = {
  			AIROHA_FUNC_MUX,
  			REG_GPIO_PON_MODE,
  			GPIO_PCIE_RESET1_MASK,
-			GPIO_PCIE_RESET1_MASK
+			0
  		},
  		.regmap_size = 1,
  	}, {

drivers/pinctrl/airoha/pinctrl-airoha.c static const struct airoha_pinctrl_func_group pcie_reset_func_group[] = { · line 1436

Quoted 8 lines
drivers/pinctrl/airoha/pinctrl-airoha.c +1 -1
@@ -1430,7 +1430,7 @@ static const struct airoha_pinctrl_func_group pcie_reset_func_group[] = {
  			AIROHA_FUNC_MUX,
  			REG_GPIO_PON_MODE,
  			GPIO_PCIE_RESET2_MASK,
-			GPIO_PCIE_RESET2_MASK
+			0
  		},
  		.regmap_size = 1,
  	},

MvH
Benjamin Larsson

maintainer Acked-by on v1 1/1
#2 lore raw
In reply to Christian Marangi
Quoted 7 lines

The PCIe reset pin actually require the bit to be set as 0 to work as PCIe reset pin. When the bit is set as 1, then the PCIe reset pin act as a GPIO for GPIO44, GPIO45 and GPIO46.

Fixes 1c8ace2d0725 ("pinctrl: airoha: Add support for EN7581 SoC")
Quoted 38 lines
---
 drivers/pinctrl/airoha/pinctrl-airoha.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/pinctrl/airoha/pinctrl-airoha.c +3 -3
index 04b4424c688b..6409572c0a4b 100644
@@ -1412,7 +1412,7 @@ static const struct airoha_pinctrl_func_group pcie_reset_func_group[] = {
 			AIROHA_FUNC_MUX,
 			REG_GPIO_PON_MODE,
 			GPIO_PCIE_RESET0_MASK,
-			GPIO_PCIE_RESET0_MASK
+			0
 		},
 		.regmap_size = 1,
 	}, {
@@ -1421,7 +1421,7 @@ static const struct airoha_pinctrl_func_group pcie_reset_func_group[] = {
 			AIROHA_FUNC_MUX,
 			REG_GPIO_PON_MODE,
 			GPIO_PCIE_RESET1_MASK,
-			GPIO_PCIE_RESET1_MASK
+			0
 		},
 		.regmap_size = 1,
 	}, {
@@ -1430,7 +1430,7 @@ static const struct airoha_pinctrl_func_group pcie_reset_func_group[] = {
 			AIROHA_FUNC_MUX,
 			REG_GPIO_PON_MODE,
 			GPIO_PCIE_RESET2_MASK,
-			GPIO_PCIE_RESET2_MASK
+			0
 		},
 		.regmap_size = 1,
 	},
Signature · 1 line
2.53.0
maintainer
#3 lore raw
In reply to Christian Marangi

Hi Christian,

Quoted 7 lines · Christian Marangi

The PCIe reset pin actually require the bit to be set as 0 to work as PCIe reset pin. When the bit is set as 1, then the PCIe reset pin act as a GPIO for GPIO44, GPIO45 and GPIO46.

Fixes 1c8ace2d0725 ("pinctrl: airoha: Add support for EN7581 SoC")

Is this already fixed in the big Airoha patch set from Mikhail that I just applied?

If this is *not* fixed in what is currently in my tree I need a rebased version of this for mainline.

If it *is* fixed in what is currently in my tree, this can be sent separately to the stable tree as a backport once Torvalds has pulled my changes.

Yours,
Linus Walleij