Skip to contentSkip to conversation

arm: mvebu: Power up 2nd SATA port for Thecus N2350

PATCH Superseded Tony Dinh 2 participants 4 messages Feb 5, 2023 – Feb 7, 2023

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Tony Dinh

author
#0 lore raw

PATCH 1/1 arm: mvebu: Power up 2nd SATA port for Thecus N2350

Currently, only the 1st SATA port is powered up (by GPIO1 12). Add GPIO1 13 in board initialization to power up the 2nd SATA port.

Note that this patch depends on the initial add-support patch:
https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/

---

 board/thecus/n2350/n2350.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
board/thecus/n2350/n2350.c +1 -1
index 4cfdfba662..58028a0695 100644
@@ -25,7 +25,7 @@ DECLARE_GLOBAL_DATA_PTR;
 #define N2350_GPP_OUT_ENA_LOW	(~(BIT(20) | BIT(21) | BIT(24)))
 #define N2350_GPP_OUT_ENA_MID	(~(BIT(12) | BIT(13) | BIT(16) | BIT(19) | BIT(22)))
 #define N2350_GPP_OUT_VAL_LOW	0x1200000
-#define N2350_GPP_OUT_VAL_MID	0x1001
+#define N2350_GPP_OUT_VAL_MID	0x3001
 #define N2350_GPP_POL_LOW	0x0
 #define N2350_GPP_POL_MID	0x0
 
Signature · 1 line
2.30.2
#1 lore raw

Hi Tony,

Quoted 17 lines · Tony Dinh

Currently, only the 1st SATA port is powered up (by GPIO1 12). Add GPIO1 13 in board initialization to power up the 2nd SATA port.

Note that this patch depends on the initial add-support patch:
https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/

---

  board/thecus/n2350/n2350.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
board/thecus/n2350/n2350.c +0 -0
index 4cfdfba662..58028a0695 100644

board/thecus/n2350/n2350.c DECLARE_GLOBAL_DATA_PTR; · line 28

Quoted 5 lines
board/thecus/n2350/n2350.c +1 -1
@@ -25,7 +25,7 @@ DECLARE_GLOBAL_DATA_PTR;
  #define N2350_GPP_OUT_ENA_LOW	(~(BIT(20) | BIT(21) | BIT(24)))
  #define N2350_GPP_OUT_ENA_MID	(~(BIT(12) | BIT(13) | BIT(16) | BIT(19) | BIT(22)))
  #define N2350_GPP_OUT_VAL_LOW	0x1200000
-#define N2350_GPP_OUT_VAL_MID	0x1001
+#define N2350_GPP_OUT_VAL_MID	0x3001

It's perhaps better to use (BIT(12) | ...) here as well. This makes it easier to see, which GPIOs are used IMHO.

Thanks,
Stefan

author
#2 lore raw

Hi Stefan,

Quoted 16 lines · Stefan Roese

Hi Tony,

Quoted 12 lines · Tony Dinh

Currently, only the 1st SATA port is powered up (by GPIO1 12). Add GPIO1 13 in board initialization to power up the 2nd SATA port.

Note that this patch depends on the initial add-support patch:
https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/

---

  board/thecus/n2350/n2350.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 13 lines

board/thecus/n2350/n2350.c DECLARE_GLOBAL_DATA_PTR; · line 28

Quoted 10 lines
board/thecus/n2350/n2350.c +1 -1
index 4cfdfba662..58028a0695 100644
@@ -25,7 +25,7 @@ DECLARE_GLOBAL_DATA_PTR;
  #define N2350_GPP_OUT_ENA_LOW       (~(BIT(20) | BIT(21) | BIT(24)))
  #define N2350_GPP_OUT_ENA_MID       (~(BIT(12) | BIT(13) | BIT(16) | BIT(19) | BIT(22)))
  #define N2350_GPP_OUT_VAL_LOW       0x1200000
-#define N2350_GPP_OUT_VAL_MID        0x1001
+#define N2350_GPP_OUT_VAL_MID        0x3001

It's perhaps better to use (BIT(12) | ...) here as well. This makes it easier to see, which GPIOs are used IMHO.

Yes, I think so too, will send a V2 patch.

Thank,
Tony

author
#3 lore raw
In reply to Tony Dinh

Hi Stefan,

Looks like I botched this V2 patch :) I will resend it.

Thanks,
Tony

Quoted 29 lines · Tony Dinh

Currently, only the 1st SATA port is powered up (by GPIO1 12). Add GPIO1 13 in board initialization to power up the 2nd SATA port.

Note that this patch depends on the initial add-support patch:
https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/

---

 board/thecus/n2350/n2350.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
board/thecus/n2350/n2350.c +1 -2
index 4cfdfba662..58028a0695 100644
@@ -25,7 +25,7 @@ DECLARE_GLOBAL_DATA_PTR;
 #define N2350_GPP_OUT_ENA_LOW  (~(BIT(20) | BIT(21) | BIT(24)))
 #define N2350_GPP_OUT_ENA_MID  (~(BIT(12) | BIT(13) | BIT(16) | BIT(19) | BIT(22)))
 #define N2350_GPP_OUT_VAL_LOW  0x1200000
-#define N2350_GPP_OUT_VAL_MID  0x1001
+#define N2350_GPP_OUT_VAL_MID  0x3001
 #define N2350_GPP_POL_LOW      0x0
 #define N2350_GPP_POL_MID      0x0
 
--

2.30.2