All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH u-boot v2019.04-aspeed-openbmc v2] pinctrl: ast2400: add support for RGMII1 and RGMII2
@ 2022-05-11 22:04 Zev Weiss
  2022-05-12  4:39 ` Joel Stanley
  0 siblings, 1 reply; 2+ messages in thread
From: Zev Weiss @ 2022-05-11 22:04 UTC (permalink / raw)
  To: Joel Stanley, openbmc; +Cc: Andrew Jeffery, Ryan Chen, Zev Weiss

The bits configured by these pinctrl groups are set to the same values
as their reset defaults, so RGMII functionality would likely work
anyway, but it seems good to make it explicit instead of relying on
that.

Signed-off-by: Zev Weiss <zev@bewilderbeest.net>
---

Changes since v1 [0]:
 - Added RGMII1 group [Joel]

[0] https://lore.kernel.org/openbmc/20220414205950.26406-1-zev@bewilderbeest.net/

 drivers/pinctrl/aspeed/pinctrl_ast2400.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/pinctrl/aspeed/pinctrl_ast2400.c b/drivers/pinctrl/aspeed/pinctrl_ast2400.c
index a8a5ff517108..531e116c7967 100644
--- a/drivers/pinctrl/aspeed/pinctrl_ast2400.c
+++ b/drivers/pinctrl/aspeed/pinctrl_ast2400.c
@@ -133,6 +133,14 @@ static struct aspeed_sig_desc rxd3_link[] = {
 	{ 0x80, BIT(23), 0},
 };
 
+static struct aspeed_sig_desc rgmii1_link[] = {
+	{ 0xa0, GENMASK(17, 12) | GENMASK(5, 0), 1 },
+};
+
+static struct aspeed_sig_desc rgmii2_link[] = {
+	{ 0xa0, GENMASK(23, 18) | GENMASK(11, 6), 1 },
+};
+
 static const struct aspeed_group_config ast2400_groups[] = {
 	{ "MAC1LINK", 1, mac1_link },
 	{ "MAC2LINK", 1, mac2_link },
@@ -156,6 +164,8 @@ static const struct aspeed_group_config ast2400_groups[] = {
 	{ "SPI1CS1", 1, spi1cs1_link},
 	{ "TXD3", 1, txd3_link },
 	{ "RXD3", 1, rxd3_link },
+	{ "RGMII1", 1, rgmii1_link },
+	{ "RGMII2", 1, rgmii2_link },
 };
 
 static int ast2400_pinctrl_get_groups_count(struct udevice *dev)
-- 
2.35.3


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH u-boot v2019.04-aspeed-openbmc v2] pinctrl: ast2400: add support for RGMII1 and RGMII2
  2022-05-11 22:04 [PATCH u-boot v2019.04-aspeed-openbmc v2] pinctrl: ast2400: add support for RGMII1 and RGMII2 Zev Weiss
@ 2022-05-12  4:39 ` Joel Stanley
  0 siblings, 0 replies; 2+ messages in thread
From: Joel Stanley @ 2022-05-12  4:39 UTC (permalink / raw)
  To: Zev Weiss; +Cc: Andrew Jeffery, OpenBMC Maillist, Ryan Chen

On Wed, 11 May 2022 at 22:05, Zev Weiss <zev@bewilderbeest.net> wrote:
>
> The bits configured by these pinctrl groups are set to the same values
> as their reset defaults, so RGMII functionality would likely work
> anyway, but it seems good to make it explicit instead of relying on
> that.
>
> Signed-off-by: Zev Weiss <zev@bewilderbeest.net>
> ---
>
> Changes since v1 [0]:
>  - Added RGMII1 group [Joel]

Thanks, applied.

>
> [0] https://lore.kernel.org/openbmc/20220414205950.26406-1-zev@bewilderbeest.net/
>
>  drivers/pinctrl/aspeed/pinctrl_ast2400.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)
>
> diff --git a/drivers/pinctrl/aspeed/pinctrl_ast2400.c b/drivers/pinctrl/aspeed/pinctrl_ast2400.c
> index a8a5ff517108..531e116c7967 100644
> --- a/drivers/pinctrl/aspeed/pinctrl_ast2400.c
> +++ b/drivers/pinctrl/aspeed/pinctrl_ast2400.c
> @@ -133,6 +133,14 @@ static struct aspeed_sig_desc rxd3_link[] = {
>         { 0x80, BIT(23), 0},
>  };
>
> +static struct aspeed_sig_desc rgmii1_link[] = {
> +       { 0xa0, GENMASK(17, 12) | GENMASK(5, 0), 1 },
> +};
> +
> +static struct aspeed_sig_desc rgmii2_link[] = {
> +       { 0xa0, GENMASK(23, 18) | GENMASK(11, 6), 1 },
> +};
> +
>  static const struct aspeed_group_config ast2400_groups[] = {
>         { "MAC1LINK", 1, mac1_link },
>         { "MAC2LINK", 1, mac2_link },
> @@ -156,6 +164,8 @@ static const struct aspeed_group_config ast2400_groups[] = {
>         { "SPI1CS1", 1, spi1cs1_link},
>         { "TXD3", 1, txd3_link },
>         { "RXD3", 1, rxd3_link },
> +       { "RGMII1", 1, rgmii1_link },
> +       { "RGMII2", 1, rgmii2_link },
>  };
>
>  static int ast2400_pinctrl_get_groups_count(struct udevice *dev)
> --
> 2.35.3
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-05-12  4:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-11 22:04 [PATCH u-boot v2019.04-aspeed-openbmc v2] pinctrl: ast2400: add support for RGMII1 and RGMII2 Zev Weiss
2022-05-12  4:39 ` Joel Stanley

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.