[v2] ARM: dts: lan966x: Enable sgpio on pcb8291

Message ID 20221026174303.702919-1-horatiu.vultur@microchip.com
State New
Headers
Series [v2] ARM: dts: lan966x: Enable sgpio on pcb8291 |

Commit Message

Horatiu Vultur Oct. 26, 2022, 5:43 p.m. UTC
  Enable sgpio node on pcb8291 as this is needed to be able to control
the LEDs on this board. Otherwise the LEDs support on the board will
not be available.
On the other board pcb8309 the sgpio is already enabled because it
needed to access the SFP ports.

Fixes: 0b7baa1a307f ("ARM: dts: lan966x: add led configuration")
Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>

---
v1->v2:
- add fixes tag
---
 arch/arm/boot/dts/lan966x-pcb8291.dts | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
  

Comments

Claudiu Beznea Oct. 31, 2022, 8:37 a.m. UTC | #1
On 26.10.2022 20:43, Horatiu Vultur wrote:
> Enable sgpio node on pcb8291 as this is needed to be able to control
> the LEDs on this board. Otherwise the LEDs support on the board will
> not be available.
> On the other board pcb8309 the sgpio is already enabled because it
> needed to access the SFP ports.
> 
> Fixes: 0b7baa1a307f ("ARM: dts: lan966x: add led configuration")
> Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>

Applied to at91-fixes, thanks!

> 
> ---
> v1->v2:
> - add fixes tag
> ---
>  arch/arm/boot/dts/lan966x-pcb8291.dts | 20 ++++++++++++++++++++
>  1 file changed, 20 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/lan966x-pcb8291.dts b/arch/arm/boot/dts/lan966x-pcb8291.dts
> index f4f054cdf2a87..3a3d76af86122 100644
> --- a/arch/arm/boot/dts/lan966x-pcb8291.dts
> +++ b/arch/arm/boot/dts/lan966x-pcb8291.dts
> @@ -69,6 +69,12 @@ can0_b_pins:  can0-b-pins {
>  		pins = "GPIO_35", "GPIO_36";
>  		function = "can0_b";
>  	};
> +
> +	sgpio_a_pins: sgpio-a-pins {
> +		/* SCK, D0, D1, LD */
> +		pins = "GPIO_32", "GPIO_33", "GPIO_34", "GPIO_35";
> +		function = "sgpio_a";
> +	};
>  };
>  
>  &can0 {
> @@ -118,6 +124,20 @@ &serdes {
>  	status = "okay";
>  };
>  
> +&sgpio {
> +	pinctrl-0 = <&sgpio_a_pins>;
> +	pinctrl-names = "default";
> +	microchip,sgpio-port-ranges = <0 3>, <8 11>;
> +	status = "okay";
> +
> +	gpio@0 {
> +		ngpios = <64>;
> +	};
> +	gpio@1 {
> +		ngpios = <64>;
> +	};
> +};
> +
>  &switch {
>  	status = "okay";
>  };
  

Patch

diff --git a/arch/arm/boot/dts/lan966x-pcb8291.dts b/arch/arm/boot/dts/lan966x-pcb8291.dts
index f4f054cdf2a87..3a3d76af86122 100644
--- a/arch/arm/boot/dts/lan966x-pcb8291.dts
+++ b/arch/arm/boot/dts/lan966x-pcb8291.dts
@@ -69,6 +69,12 @@  can0_b_pins:  can0-b-pins {
 		pins = "GPIO_35", "GPIO_36";
 		function = "can0_b";
 	};
+
+	sgpio_a_pins: sgpio-a-pins {
+		/* SCK, D0, D1, LD */
+		pins = "GPIO_32", "GPIO_33", "GPIO_34", "GPIO_35";
+		function = "sgpio_a";
+	};
 };
 
 &can0 {
@@ -118,6 +124,20 @@  &serdes {
 	status = "okay";
 };
 
+&sgpio {
+	pinctrl-0 = <&sgpio_a_pins>;
+	pinctrl-names = "default";
+	microchip,sgpio-port-ranges = <0 3>, <8 11>;
+	status = "okay";
+
+	gpio@0 {
+		ngpios = <64>;
+	};
+	gpio@1 {
+		ngpios = <64>;
+	};
+};
+
 &switch {
 	status = "okay";
 };