linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] MIPS: ralink: Add rt3352 SPI_CS1 pinmux
@ 2018-08-22 20:38 Mathias Kresin
  2018-08-30 20:27 ` Paul Burton
  0 siblings, 1 reply; 3+ messages in thread
From: Mathias Kresin @ 2018-08-22 20:38 UTC (permalink / raw)
  To: John Crispin, Ralf Baechle, James Hogan, linux-mips, linux-kernel

The rt3352 has a pin that can be used as second spi chip select,
watchdog reset or GPIO. The pinmux setup was missing the definition of
said pin.

The pin is configured via the same bit on rt5350, so reuse the existing
macro.

Signed-off-by: Mathias Kresin <dev@kresin.me>
---
 arch/mips/ralink/rt305x.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/mips/ralink/rt305x.c b/arch/mips/ralink/rt305x.c
index 93d472c..0f2264e 100644
--- a/arch/mips/ralink/rt305x.c
+++ b/arch/mips/ralink/rt305x.c
@@ -49,6 +49,10 @@ static struct rt2880_pmx_func rgmii_func[] = { FUNC("rgmii", 0, 40, 12) };
 static struct rt2880_pmx_func rt3352_lna_func[] = { FUNC("lna", 0, 36, 2) };
 static struct rt2880_pmx_func rt3352_pa_func[] = { FUNC("pa", 0, 38, 2) };
 static struct rt2880_pmx_func rt3352_led_func[] = { FUNC("led", 0, 40, 5) };
+static struct rt2880_pmx_func rt3352_cs1_func[] = {
+	FUNC("spi_cs1", 0, 45, 1),
+	FUNC("wdg_cs1", 1, 45, 1),
+};
 
 static struct rt2880_pmx_group rt3050_pinmux_data[] = {
 	GRP("i2c", i2c_func, 1, RT305X_GPIO_MODE_I2C),
@@ -75,6 +79,7 @@ static struct rt2880_pmx_group rt3352_pinmux_data[] = {
 	GRP("lna", rt3352_lna_func, 1, RT3352_GPIO_MODE_LNA),
 	GRP("pa", rt3352_pa_func, 1, RT3352_GPIO_MODE_PA),
 	GRP("led", rt3352_led_func, 1, RT5350_GPIO_MODE_PHY_LED),
+	GRP("spi_cs1", rt3352_cs1_func, 2, RT5350_GPIO_MODE_SPI_CS1),
 	{ 0 }
 };
 
-- 
2.7.4


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

* Re: [PATCH] MIPS: ralink: Add rt3352 SPI_CS1 pinmux
  2018-08-22 20:38 [PATCH] MIPS: ralink: Add rt3352 SPI_CS1 pinmux Mathias Kresin
@ 2018-08-30 20:27 ` Paul Burton
  0 siblings, 0 replies; 3+ messages in thread
From: Paul Burton @ 2018-08-30 20:27 UTC (permalink / raw)
  To: Mathias Kresin
  Cc: John Crispin, Ralf Baechle, James Hogan, linux-mips, linux-kernel

Hi Mathias,

On Wed, Aug 22, 2018 at 10:38:06PM +0200, Mathias Kresin wrote:
> The rt3352 has a pin that can be used as second spi chip select,
> watchdog reset or GPIO. The pinmux setup was missing the definition of
> said pin.
> 
> The pin is configured via the same bit on rt5350, so reuse the existing
> macro.
> 
> Signed-off-by: Mathias Kresin <dev@kresin.me>
> ---
>  arch/mips/ralink/rt305x.c | 5 +++++
>  1 file changed, 5 insertions(+)

Thanks, applied to mips-next for 4.20.

Paul

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

* [PATCH] MIPS: ralink: Add rt3352 SPI_CS1 pinmux
@ 2021-06-22  3:47 Liu Yu
  0 siblings, 0 replies; 3+ messages in thread
From: Liu Yu @ 2021-06-22  3:47 UTC (permalink / raw)
  To: c951
  Cc: Mathias Kresin, Paul Burton, John Crispin, Ralf Baechle,
	James Hogan, linux-mips, linux-kernel

From: Mathias Kresin <dev@kresin.me>

The rt3352 has a pin that can be used as second spi chip select,
watchdog reset or GPIO. The pinmux setup was missing the definition of
said pin.

The pin is configured via the same bit on rt5350, so reuse the existing
macro.

Signed-off-by: Mathias Kresin <dev@kresin.me>
Signed-off-by: Paul Burton <paul.burton@mips.com>
Patchwork: https://patchwork.linux-mips.org/patch/20301/
Cc: John Crispin <john@phrozen.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: James Hogan <jhogan@kernel.org>
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
---
 arch/mips/ralink/rt305x.c | 5 +++++
 1 file changed, 5 insertions(+)

--- a/arch/mips/ralink/rt305x.c
+++ b/arch/mips/ralink/rt305x.c
@@ -49,6 +49,10 @@ static struct rt2880_pmx_func rgmii_func
 static struct rt2880_pmx_func rt3352_lna_func[] = { FUNC("lna", 0, 36, 2) };
 static struct rt2880_pmx_func rt3352_pa_func[] = { FUNC("pa", 0, 38, 2) };
 static struct rt2880_pmx_func rt3352_led_func[] = { FUNC("led", 0, 40, 5) };
+static struct rt2880_pmx_func rt3352_cs1_func[] = {
+	FUNC("spi_cs1", 0, 45, 1),
+	FUNC("wdg_cs1", 1, 45, 1),
+};
 
 static struct rt2880_pmx_group rt3050_pinmux_data[] = {
 	GRP("i2c", i2c_func, 1, RT305X_GPIO_MODE_I2C),
@@ -75,6 +79,7 @@ static struct rt2880_pmx_group rt3352_pi
 	GRP("lna", rt3352_lna_func, 1, RT3352_GPIO_MODE_LNA),
 	GRP("pa", rt3352_pa_func, 1, RT3352_GPIO_MODE_PA),
 	GRP("led", rt3352_led_func, 1, RT5350_GPIO_MODE_PHY_LED),
+	GRP("spi_cs1", rt3352_cs1_func, 2, RT5350_GPIO_MODE_SPI_CS1),
 	{ 0 }
 };
 

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

end of thread, other threads:[~2021-06-22  3:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-22 20:38 [PATCH] MIPS: ralink: Add rt3352 SPI_CS1 pinmux Mathias Kresin
2018-08-30 20:27 ` Paul Burton
2021-06-22  3:47 Liu Yu

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).