* [PATCH] pinctrl: sh-pfc: r8a7795: Add SATA pins, groups, and functions
@ 2017-12-20 21:59 Wolfram Sang
2017-12-21 9:07 ` Geert Uytterhoeven
0 siblings, 1 reply; 3+ messages in thread
From: Wolfram Sang @ 2017-12-20 21:59 UTC (permalink / raw)
To: linux-gpio; +Cc: linux-renesas-soc, Geert Uytterhoeven, Wolfram Sang
Tested with a Salvator-XS and H3 ES2.0.
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
Note: To repeat the test you must:
a) switch pin7 from SW12 to OFF
b) set an external GPIO to 0 by using these commands:
i2cset -y 4 0x20 3 0x7f (set pin to output)
i2cset -y 4 0x20 1 0x7f (set pin to 0)
drivers/pinctrl/sh-pfc/pfc-r8a7795.c | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/drivers/pinctrl/sh-pfc/pfc-r8a7795.c b/drivers/pinctrl/sh-pfc/pfc-r8a7795.c
index 7eddd0f2f84713..18aeee592fdcf2 100644
--- a/drivers/pinctrl/sh-pfc/pfc-r8a7795.c
+++ b/drivers/pinctrl/sh-pfc/pfc-r8a7795.c
@@ -3227,6 +3227,22 @@ static const unsigned int pwm6_b_mux[] = {
PWM6_B_MARK,
};
+/* - SATA --------------------------------------------------------------------*/
+static const unsigned int sata0_devslp_a_pins[] = {
+ /* DEVSLP */
+ RCAR_GP_PIN(6, 16),
+};
+static const unsigned int sata0_devslp_a_mux[] = {
+ SATA_DEVSLP_A_MARK,
+};
+static const unsigned int sata0_devslp_b_pins[] = {
+ /* DEVSLP */
+ RCAR_GP_PIN(4, 6),
+};
+static const unsigned int sata0_devslp_b_mux[] = {
+ SATA_DEVSLP_B_MARK,
+};
+
/* - SCIF0 ------------------------------------------------------------------ */
static const unsigned int scif0_data_pins[] = {
/* RX, TX */
@@ -4092,6 +4108,8 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {
SH_PFC_PIN_GROUP(pwm5_b),
SH_PFC_PIN_GROUP(pwm6_a),
SH_PFC_PIN_GROUP(pwm6_b),
+ SH_PFC_PIN_GROUP(sata0_devslp_a),
+ SH_PFC_PIN_GROUP(sata0_devslp_b),
SH_PFC_PIN_GROUP(scif0_data),
SH_PFC_PIN_GROUP(scif0_clk),
SH_PFC_PIN_GROUP(scif0_ctrl),
@@ -4500,6 +4518,11 @@ static const char * const pwm6_groups[] = {
"pwm6_b",
};
+static const char * const sata0_groups[] = {
+ "sata0_devslp_a",
+ "sata0_devslp_b",
+};
+
static const char * const scif0_groups[] = {
"scif0_data",
"scif0_clk",
@@ -4669,6 +4692,7 @@ static const struct sh_pfc_function pinmux_functions[] = {
SH_PFC_FUNCTION(pwm4),
SH_PFC_FUNCTION(pwm5),
SH_PFC_FUNCTION(pwm6),
+ SH_PFC_FUNCTION(sata0),
SH_PFC_FUNCTION(scif0),
SH_PFC_FUNCTION(scif1),
SH_PFC_FUNCTION(scif2),
--
2.11.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] pinctrl: sh-pfc: r8a7795: Add SATA pins, groups, and functions
2017-12-20 21:59 [PATCH] pinctrl: sh-pfc: r8a7795: Add SATA pins, groups, and functions Wolfram Sang
@ 2017-12-21 9:07 ` Geert Uytterhoeven
2017-12-21 11:52 ` Wolfram Sang
0 siblings, 1 reply; 3+ messages in thread
From: Geert Uytterhoeven @ 2017-12-21 9:07 UTC (permalink / raw)
To: Wolfram Sang; +Cc: linux-gpio, Linux-Renesas
Hi Wolfram,
On Wed, Dec 20, 2017 at 10:59 PM, Wolfram Sang
<wsa+renesas@sang-engineering.com> wrote:
> Tested with a Salvator-XS and H3 ES2.0.
Thanks for your patch!
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
i.e. will queue in sh-pfc-for-v4.16.
> Note: To repeat the test you must:
> a) switch pin7 from SW12 to OFF
Funny how the relation of MD12 to SATA is mentioned only in the Salvator-XS
hardware manual, but not in the R-Car Gen3 User's Manual? Or did I miss it?
> b) set an external GPIO to 0 by using these commands:
> i2cset -y 4 0x20 3 0x7f (set pin to output)
> i2cset -y 4 0x20 1 0x7f (set pin to 0)
Time to add the PCA9654 to the DTS, so users can use a gpio-hog instead?
Thanks!
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] pinctrl: sh-pfc: r8a7795: Add SATA pins, groups, and functions
2017-12-21 9:07 ` Geert Uytterhoeven
@ 2017-12-21 11:52 ` Wolfram Sang
0 siblings, 0 replies; 3+ messages in thread
From: Wolfram Sang @ 2017-12-21 11:52 UTC (permalink / raw)
To: Geert Uytterhoeven; +Cc: Wolfram Sang, linux-gpio, Linux-Renesas
[-- Attachment #1: Type: text/plain, Size: 832 bytes --]
Hi Geert,
> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
> i.e. will queue in sh-pfc-for-v4.16.
Thanks for the fast review!
>
> > Note: To repeat the test you must:
> > a) switch pin7 from SW12 to OFF
>
> Funny how the relation of MD12 to SATA is mentioned only in the Salvator-XS
> hardware manual, but not in the R-Car Gen3 User's Manual? Or did I miss it?
I just followed the XS manual, to be honest.
> > b) set an external GPIO to 0 by using these commands:
> > i2cset -y 4 0x20 3 0x7f (set pin to output)
> > i2cset -y 4 0x20 1 0x7f (set pin to 0)
>
> Time to add the PCA9654 to the DTS, so users can use a gpio-hog instead?
Yes, I'll send some patches (with questions) in a minute. Just wanted to
check if this one is OK.
See you in a minute ;)
Wolfram
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-12-21 11:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-20 21:59 [PATCH] pinctrl: sh-pfc: r8a7795: Add SATA pins, groups, and functions Wolfram Sang
2017-12-21 9:07 ` Geert Uytterhoeven
2017-12-21 11:52 ` Wolfram Sang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).