diff mbox series

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

Message ID 20230205212829.28392-1-mibodhi@gmail.com
State Superseded
Delegated to: Stefan Roese
Headers show
Series arm: mvebu: Power up 2nd SATA port for Thecus N2350 | expand

Commit Message

Tony Dinh Feb. 5, 2023, 9:28 p.m. UTC
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/20230201231306.7010-1-mibodhi@gmail.com/

Signed-off-by: Tony Dinh <mibodhi@gmail.com>
---

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

Comments

Stefan Roese Feb. 6, 2023, 10:01 a.m. UTC | #1
Hi Tony,

On 2/5/23 22:28, Tony Dinh wrote:
> 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/20230201231306.7010-1-mibodhi@gmail.com/
> 
> Signed-off-by: Tony Dinh <mibodhi@gmail.com>
> ---
> 
>   board/thecus/n2350/n2350.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/board/thecus/n2350/n2350.c b/board/thecus/n2350/n2350.c
> index 4cfdfba662..58028a0695 100644
> --- a/board/thecus/n2350/n2350.c
> +++ b/board/thecus/n2350/n2350.c
> @@ -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
Tony Dinh Feb. 6, 2023, 8:51 p.m. UTC | #2
Hi Stefan,

On Mon, Feb 6, 2023 at 2:01 AM Stefan Roese <sr@denx.de> wrote:
>
> Hi Tony,
>
> On 2/5/23 22:28, Tony Dinh wrote:
> > 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/20230201231306.7010-1-mibodhi@gmail.com/
> >
> > Signed-off-by: Tony Dinh <mibodhi@gmail.com>
> > ---
> >
> >   board/thecus/n2350/n2350.c | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/board/thecus/n2350/n2350.c b/board/thecus/n2350/n2350.c
> > index 4cfdfba662..58028a0695 100644
> > --- a/board/thecus/n2350/n2350.c
> > +++ b/board/thecus/n2350/n2350.c
> > @@ -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
Tony Dinh Feb. 7, 2023, midnight UTC | #3
Hi Stefan,

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

Thanks,
Tony

On Sun, Feb 5, 2023 at 1:29 PM Tony Dinh <mibodhi@gmail.com> wrote:
>
> 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/20230201231306.7010-1-mibodhi@gmail.com/
>
> Signed-off-by: Tony Dinh <mibodhi@gmail.com>
> ---
>
>  board/thecus/n2350/n2350.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/board/thecus/n2350/n2350.c b/board/thecus/n2350/n2350.c
> index 4cfdfba662..58028a0695 100644
> --- a/board/thecus/n2350/n2350.c
> +++ b/board/thecus/n2350/n2350.c
> @@ -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
>
diff mbox series

Patch

diff --git a/board/thecus/n2350/n2350.c b/board/thecus/n2350/n2350.c
index 4cfdfba662..58028a0695 100644
--- a/board/thecus/n2350/n2350.c
+++ b/board/thecus/n2350/n2350.c
@@ -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