All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ARM: at91/dt: sama5d2 Xplained: add phy address and IRQ for macb0
@ 2016-01-22 11:29 ` Nicolas Ferre
  0 siblings, 0 replies; 4+ messages in thread
From: Nicolas Ferre @ 2016-01-22 11:29 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: linux-kernel, Alexandre Belloni,
	Jean-Christophe PLAGNIOL-VILLARD, Ludovic Desroches, Wenyou Yang,
	Songjun Wu, Nicolas Ferre

After 57a38effa598 (net: phy: micrel: disable broadcast for KSZ8081/KSZ8091)
the macb0 interface have difficulties to come back from power saving mode if
address not explicitely set up.
As the micrel phy on the board is actually configured to show up at address 1
we use this explicitly.
Adding the phy node and its real address fixes the issue.

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
---
 arch/arm/boot/dts/at91-sama5d2_xplained.dts | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/at91-sama5d2_xplained.dts b/arch/arm/boot/dts/at91-sama5d2_xplained.dts
index 77ddff036409..e683856c507c 100644
--- a/arch/arm/boot/dts/at91-sama5d2_xplained.dts
+++ b/arch/arm/boot/dts/at91-sama5d2_xplained.dts
@@ -114,9 +114,15 @@
 
 			macb0: ethernet@f8008000 {
 				pinctrl-names = "default";
-				pinctrl-0 = <&pinctrl_macb0_default>;
+				pinctrl-0 = <&pinctrl_macb0_default &pinctrl_macb0_phy_irq>;
 				phy-mode = "rmii";
 				status = "okay";
+
+				ethernet-phy@1 {
+					reg = <0x1>;
+					interrupt-parent = <&pioA>;
+					interrupts = <73 IRQ_TYPE_LEVEL_LOW>;
+				};
 			};
 
 			pdmic@f8018000 {
@@ -300,6 +306,10 @@
 					bias-disable;
 				};
 
+				pinctrl_macb0_phy_irq: macb0_phy_irq {
+					pinmux = <PIN_PC9__GPIO>;
+				};
+
 				pinctrl_pdmic_default: pdmic_default {
 					pinmux = <PIN_PB26__PDMIC_DAT>,
 						<PIN_PB27__PDMIC_CLK>;
-- 
2.1.3

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

* [PATCH] ARM: at91/dt: sama5d2 Xplained: add phy address and IRQ for macb0
@ 2016-01-22 11:29 ` Nicolas Ferre
  0 siblings, 0 replies; 4+ messages in thread
From: Nicolas Ferre @ 2016-01-22 11:29 UTC (permalink / raw)
  To: linux-arm-kernel

After 57a38effa598 (net: phy: micrel: disable broadcast for KSZ8081/KSZ8091)
the macb0 interface have difficulties to come back from power saving mode if
address not explicitely set up.
As the micrel phy on the board is actually configured to show up at address 1
we use this explicitly.
Adding the phy node and its real address fixes the issue.

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
---
 arch/arm/boot/dts/at91-sama5d2_xplained.dts | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/at91-sama5d2_xplained.dts b/arch/arm/boot/dts/at91-sama5d2_xplained.dts
index 77ddff036409..e683856c507c 100644
--- a/arch/arm/boot/dts/at91-sama5d2_xplained.dts
+++ b/arch/arm/boot/dts/at91-sama5d2_xplained.dts
@@ -114,9 +114,15 @@
 
 			macb0: ethernet at f8008000 {
 				pinctrl-names = "default";
-				pinctrl-0 = <&pinctrl_macb0_default>;
+				pinctrl-0 = <&pinctrl_macb0_default &pinctrl_macb0_phy_irq>;
 				phy-mode = "rmii";
 				status = "okay";
+
+				ethernet-phy at 1 {
+					reg = <0x1>;
+					interrupt-parent = <&pioA>;
+					interrupts = <73 IRQ_TYPE_LEVEL_LOW>;
+				};
 			};
 
 			pdmic at f8018000 {
@@ -300,6 +306,10 @@
 					bias-disable;
 				};
 
+				pinctrl_macb0_phy_irq: macb0_phy_irq {
+					pinmux = <PIN_PC9__GPIO>;
+				};
+
 				pinctrl_pdmic_default: pdmic_default {
 					pinmux = <PIN_PB26__PDMIC_DAT>,
 						<PIN_PB27__PDMIC_CLK>;
-- 
2.1.3

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

* Re: [PATCH] ARM: at91/dt: sama5d2 Xplained: add phy address and IRQ for macb0
  2016-01-22 11:29 ` Nicolas Ferre
@ 2016-01-22 11:48   ` Alexandre Belloni
  -1 siblings, 0 replies; 4+ messages in thread
From: Alexandre Belloni @ 2016-01-22 11:48 UTC (permalink / raw)
  To: Nicolas Ferre
  Cc: linux-arm-kernel, linux-kernel, Jean-Christophe PLAGNIOL-VILLARD,
	Ludovic Desroches, Wenyou Yang, Songjun Wu

On 22/01/2016 at 12:29:34 +0100, Nicolas Ferre wrote :
> After 57a38effa598 (net: phy: micrel: disable broadcast for KSZ8081/KSZ8091)
> the macb0 interface have difficulties to come back from power saving mode if
has

> address not explicitely set up.

explicitly

> As the micrel phy on the board is actually configured to show up at address 1
> we use this explicitly.
> Adding the phy node and its real address fixes the issue.


Maybe you should add that this also add the proper pinmuxing for the
IRQ.
> 
> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
> ---
>  arch/arm/boot/dts/at91-sama5d2_xplained.dts | 12 +++++++++++-
>  1 file changed, 11 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm/boot/dts/at91-sama5d2_xplained.dts b/arch/arm/boot/dts/at91-sama5d2_xplained.dts
> index 77ddff036409..e683856c507c 100644
> --- a/arch/arm/boot/dts/at91-sama5d2_xplained.dts
> +++ b/arch/arm/boot/dts/at91-sama5d2_xplained.dts
> @@ -114,9 +114,15 @@
>  
>  			macb0: ethernet@f8008000 {
>  				pinctrl-names = "default";
> -				pinctrl-0 = <&pinctrl_macb0_default>;
> +				pinctrl-0 = <&pinctrl_macb0_default &pinctrl_macb0_phy_irq>;
>  				phy-mode = "rmii";
>  				status = "okay";
> +
> +				ethernet-phy@1 {
> +					reg = <0x1>;
> +					interrupt-parent = <&pioA>;
> +					interrupts = <73 IRQ_TYPE_LEVEL_LOW>;
> +				};
>  			};
>  
>  			pdmic@f8018000 {
> @@ -300,6 +306,10 @@
>  					bias-disable;
>  				};
>  
> +				pinctrl_macb0_phy_irq: macb0_phy_irq {
> +					pinmux = <PIN_PC9__GPIO>;
> +				};
> +
>  				pinctrl_pdmic_default: pdmic_default {
>  					pinmux = <PIN_PB26__PDMIC_DAT>,
>  						<PIN_PB27__PDMIC_CLK>;
> -- 
> 2.1.3
> 

-- 
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

* [PATCH] ARM: at91/dt: sama5d2 Xplained: add phy address and IRQ for macb0
@ 2016-01-22 11:48   ` Alexandre Belloni
  0 siblings, 0 replies; 4+ messages in thread
From: Alexandre Belloni @ 2016-01-22 11:48 UTC (permalink / raw)
  To: linux-arm-kernel

On 22/01/2016 at 12:29:34 +0100, Nicolas Ferre wrote :
> After 57a38effa598 (net: phy: micrel: disable broadcast for KSZ8081/KSZ8091)
> the macb0 interface have difficulties to come back from power saving mode if
has

> address not explicitely set up.

explicitly

> As the micrel phy on the board is actually configured to show up at address 1
> we use this explicitly.
> Adding the phy node and its real address fixes the issue.


Maybe you should add that this also add the proper pinmuxing for the
IRQ.
> 
> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
> ---
>  arch/arm/boot/dts/at91-sama5d2_xplained.dts | 12 +++++++++++-
>  1 file changed, 11 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm/boot/dts/at91-sama5d2_xplained.dts b/arch/arm/boot/dts/at91-sama5d2_xplained.dts
> index 77ddff036409..e683856c507c 100644
> --- a/arch/arm/boot/dts/at91-sama5d2_xplained.dts
> +++ b/arch/arm/boot/dts/at91-sama5d2_xplained.dts
> @@ -114,9 +114,15 @@
>  
>  			macb0: ethernet at f8008000 {
>  				pinctrl-names = "default";
> -				pinctrl-0 = <&pinctrl_macb0_default>;
> +				pinctrl-0 = <&pinctrl_macb0_default &pinctrl_macb0_phy_irq>;
>  				phy-mode = "rmii";
>  				status = "okay";
> +
> +				ethernet-phy at 1 {
> +					reg = <0x1>;
> +					interrupt-parent = <&pioA>;
> +					interrupts = <73 IRQ_TYPE_LEVEL_LOW>;
> +				};
>  			};
>  
>  			pdmic at f8018000 {
> @@ -300,6 +306,10 @@
>  					bias-disable;
>  				};
>  
> +				pinctrl_macb0_phy_irq: macb0_phy_irq {
> +					pinmux = <PIN_PC9__GPIO>;
> +				};
> +
>  				pinctrl_pdmic_default: pdmic_default {
>  					pinmux = <PIN_PB26__PDMIC_DAT>,
>  						<PIN_PB27__PDMIC_CLK>;
> -- 
> 2.1.3
> 

-- 
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

end of thread, other threads:[~2016-01-22 11:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-22 11:29 [PATCH] ARM: at91/dt: sama5d2 Xplained: add phy address and IRQ for macb0 Nicolas Ferre
2016-01-22 11:29 ` Nicolas Ferre
2016-01-22 11:48 ` Alexandre Belloni
2016-01-22 11:48   ` Alexandre Belloni

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.