All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH RESUBMIT 1/2] ARM: dts: NSP: MX6X: get mac-address from eeprom
@ 2022-02-23 23:50 ` Matthew Hagan
  0 siblings, 0 replies; 8+ messages in thread
From: Matthew Hagan @ 2022-02-23 23:50 UTC (permalink / raw)
  Cc: Florian Fainelli, Matthew Hagan, Rob Herring, Ray Jui,
	Scott Branden, bcm-kernel-feedback-list, devicetree,
	linux-arm-kernel, linux-kernel

The MAC address on the MX64/MX65 series is located on the AT24 EEPROM.
This is the same as other Meraki devices such as the MR32 [1].

[1] https://lore.kernel.org/linux-arm-kernel/fa8271d02ef74a687f365cebe5c55ec846963ab7.1631986106.git.chunkeey@gmail.com/

Signed-off-by: Matthew Hagan <mnhagan88@gmail.com>
---
 arch/arm/boot/dts/bcm958625-meraki-mx6x-common.dtsi | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/arch/arm/boot/dts/bcm958625-meraki-mx6x-common.dtsi b/arch/arm/boot/dts/bcm958625-meraki-mx6x-common.dtsi
index 6519b7c61af1..5de727de6a4b 100644
--- a/arch/arm/boot/dts/bcm958625-meraki-mx6x-common.dtsi
+++ b/arch/arm/boot/dts/bcm958625-meraki-mx6x-common.dtsi
@@ -39,6 +39,8 @@ led-3 {
 
 &amac2 {
 	status = "okay";
+	nvmem-cells = <&mac_address>;
+	nvmem-cell-names = "mac-address";
 };
 
 &ehci0 {
@@ -53,6 +55,12 @@ eeprom@50 {
 		reg = <0x50>;
 		pagesize = <32>;
 		read-only;
+		#address-cells = <1>;
+		#size-cells = <1>;
+
+		mac_address: mac-address@66 {
+			reg = <0x66 0x6>;
+		};
 	};
 };
 
-- 
2.27.0


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

* [PATCH RESUBMIT 1/2] ARM: dts: NSP: MX6X: get mac-address from eeprom
@ 2022-02-23 23:50 ` Matthew Hagan
  0 siblings, 0 replies; 8+ messages in thread
From: Matthew Hagan @ 2022-02-23 23:50 UTC (permalink / raw)
  Cc: Florian Fainelli, Matthew Hagan, Rob Herring, Ray Jui,
	Scott Branden, bcm-kernel-feedback-list, devicetree,
	linux-arm-kernel, linux-kernel

The MAC address on the MX64/MX65 series is located on the AT24 EEPROM.
This is the same as other Meraki devices such as the MR32 [1].

[1] https://lore.kernel.org/linux-arm-kernel/fa8271d02ef74a687f365cebe5c55ec846963ab7.1631986106.git.chunkeey@gmail.com/

Signed-off-by: Matthew Hagan <mnhagan88@gmail.com>
---
 arch/arm/boot/dts/bcm958625-meraki-mx6x-common.dtsi | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/arch/arm/boot/dts/bcm958625-meraki-mx6x-common.dtsi b/arch/arm/boot/dts/bcm958625-meraki-mx6x-common.dtsi
index 6519b7c61af1..5de727de6a4b 100644
--- a/arch/arm/boot/dts/bcm958625-meraki-mx6x-common.dtsi
+++ b/arch/arm/boot/dts/bcm958625-meraki-mx6x-common.dtsi
@@ -39,6 +39,8 @@ led-3 {
 
 &amac2 {
 	status = "okay";
+	nvmem-cells = <&mac_address>;
+	nvmem-cell-names = "mac-address";
 };
 
 &ehci0 {
@@ -53,6 +55,12 @@ eeprom@50 {
 		reg = <0x50>;
 		pagesize = <32>;
 		read-only;
+		#address-cells = <1>;
+		#size-cells = <1>;
+
+		mac_address: mac-address@66 {
+			reg = <0x66 0x6>;
+		};
 	};
 };
 
-- 
2.27.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 2/2] ARM: dts: NSP: MX6X: correct LED function types
  2022-02-23 23:50 ` Matthew Hagan
@ 2022-02-23 23:50   ` Matthew Hagan
  -1 siblings, 0 replies; 8+ messages in thread
From: Matthew Hagan @ 2022-02-23 23:50 UTC (permalink / raw)
  Cc: Florian Fainelli, Matthew Hagan, Rob Herring, Ray Jui,
	Scott Branden, bcm-kernel-feedback-list, devicetree,
	linux-arm-kernel, linux-kernel

Currently, the amber LED will remain always on. This is due to a
misinterpretation of the LED sub-node properties, where-by "default-state"
was used to indicate the initial state when powering on the device. When in
use, however, this resulted in the amber LED always being on. Instead change
this to only indicate a fault state.

Assign LED_FUNCTION_POWER to the green PWM LED.

These changes bring the MX64/65 in line with the MR32's devicetree.

Signed-off-by: Matthew Hagan <mnhagan88@gmail.com>
---
 arch/arm/boot/dts/bcm958625-meraki-alamo.dtsi       | 3 +--
 arch/arm/boot/dts/bcm958625-meraki-kingpin.dtsi     | 3 +--
 arch/arm/boot/dts/bcm958625-meraki-mx6x-common.dtsi | 2 +-
 3 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/arch/arm/boot/dts/bcm958625-meraki-alamo.dtsi b/arch/arm/boot/dts/bcm958625-meraki-alamo.dtsi
index ba01054a76cf..58b7d9fc7574 100644
--- a/arch/arm/boot/dts/bcm958625-meraki-alamo.dtsi
+++ b/arch/arm/boot/dts/bcm958625-meraki-alamo.dtsi
@@ -57,10 +57,9 @@ led-3 {
 
 		led-4 {
 			/* amber:power */
-			function = LED_FUNCTION_POWER;
+			function = LED_FUNCTION_FAULT;
 			color = <LED_COLOR_ID_AMBER>;
 			gpios = <&gpioa 3 GPIO_ACTIVE_HIGH>;
-			default-state = "on";
 		};
 
 		led-5 {
diff --git a/arch/arm/boot/dts/bcm958625-meraki-kingpin.dtsi b/arch/arm/boot/dts/bcm958625-meraki-kingpin.dtsi
index 7c487c74fd10..576cfc52567b 100644
--- a/arch/arm/boot/dts/bcm958625-meraki-kingpin.dtsi
+++ b/arch/arm/boot/dts/bcm958625-meraki-kingpin.dtsi
@@ -106,10 +106,9 @@ led-9 {
 
 		led-a {
 			/* amber:power */
-			function = LED_FUNCTION_POWER;
+			function = LED_FUNCTION_FAULT;
 			color = <LED_COLOR_ID_AMBER>;
 			gpios = <&gpioa 0 GPIO_ACTIVE_LOW>;
-			default-state = "on";
 		};
 
 		led-b {
diff --git a/arch/arm/boot/dts/bcm958625-meraki-mx6x-common.dtsi b/arch/arm/boot/dts/bcm958625-meraki-mx6x-common.dtsi
index 5de727de6a4b..b0854d881ac6 100644
--- a/arch/arm/boot/dts/bcm958625-meraki-mx6x-common.dtsi
+++ b/arch/arm/boot/dts/bcm958625-meraki-mx6x-common.dtsi
@@ -22,7 +22,7 @@ led-1 {
 		};
 
 		led-2 {
-			function = LED_FUNCTION_INDICATOR;
+			function = LED_FUNCTION_POWER;
 			color = <LED_COLOR_ID_GREEN>;
 			pwms = <&pwm 2 50000>;
 			max-brightness = <255>;
-- 
2.27.0


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

* [PATCH 2/2] ARM: dts: NSP: MX6X: correct LED function types
@ 2022-02-23 23:50   ` Matthew Hagan
  0 siblings, 0 replies; 8+ messages in thread
From: Matthew Hagan @ 2022-02-23 23:50 UTC (permalink / raw)
  Cc: Florian Fainelli, Matthew Hagan, Rob Herring, Ray Jui,
	Scott Branden, bcm-kernel-feedback-list, devicetree,
	linux-arm-kernel, linux-kernel

Currently, the amber LED will remain always on. This is due to a
misinterpretation of the LED sub-node properties, where-by "default-state"
was used to indicate the initial state when powering on the device. When in
use, however, this resulted in the amber LED always being on. Instead change
this to only indicate a fault state.

Assign LED_FUNCTION_POWER to the green PWM LED.

These changes bring the MX64/65 in line with the MR32's devicetree.

Signed-off-by: Matthew Hagan <mnhagan88@gmail.com>
---
 arch/arm/boot/dts/bcm958625-meraki-alamo.dtsi       | 3 +--
 arch/arm/boot/dts/bcm958625-meraki-kingpin.dtsi     | 3 +--
 arch/arm/boot/dts/bcm958625-meraki-mx6x-common.dtsi | 2 +-
 3 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/arch/arm/boot/dts/bcm958625-meraki-alamo.dtsi b/arch/arm/boot/dts/bcm958625-meraki-alamo.dtsi
index ba01054a76cf..58b7d9fc7574 100644
--- a/arch/arm/boot/dts/bcm958625-meraki-alamo.dtsi
+++ b/arch/arm/boot/dts/bcm958625-meraki-alamo.dtsi
@@ -57,10 +57,9 @@ led-3 {
 
 		led-4 {
 			/* amber:power */
-			function = LED_FUNCTION_POWER;
+			function = LED_FUNCTION_FAULT;
 			color = <LED_COLOR_ID_AMBER>;
 			gpios = <&gpioa 3 GPIO_ACTIVE_HIGH>;
-			default-state = "on";
 		};
 
 		led-5 {
diff --git a/arch/arm/boot/dts/bcm958625-meraki-kingpin.dtsi b/arch/arm/boot/dts/bcm958625-meraki-kingpin.dtsi
index 7c487c74fd10..576cfc52567b 100644
--- a/arch/arm/boot/dts/bcm958625-meraki-kingpin.dtsi
+++ b/arch/arm/boot/dts/bcm958625-meraki-kingpin.dtsi
@@ -106,10 +106,9 @@ led-9 {
 
 		led-a {
 			/* amber:power */
-			function = LED_FUNCTION_POWER;
+			function = LED_FUNCTION_FAULT;
 			color = <LED_COLOR_ID_AMBER>;
 			gpios = <&gpioa 0 GPIO_ACTIVE_LOW>;
-			default-state = "on";
 		};
 
 		led-b {
diff --git a/arch/arm/boot/dts/bcm958625-meraki-mx6x-common.dtsi b/arch/arm/boot/dts/bcm958625-meraki-mx6x-common.dtsi
index 5de727de6a4b..b0854d881ac6 100644
--- a/arch/arm/boot/dts/bcm958625-meraki-mx6x-common.dtsi
+++ b/arch/arm/boot/dts/bcm958625-meraki-mx6x-common.dtsi
@@ -22,7 +22,7 @@ led-1 {
 		};
 
 		led-2 {
-			function = LED_FUNCTION_INDICATOR;
+			function = LED_FUNCTION_POWER;
 			color = <LED_COLOR_ID_GREEN>;
 			pwms = <&pwm 2 50000>;
 			max-brightness = <255>;
-- 
2.27.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH RESUBMIT 1/2] ARM: dts: NSP: MX6X: get mac-address from eeprom
  2022-02-23 23:50 ` Matthew Hagan
@ 2022-02-25  0:46   ` Florian Fainelli
  -1 siblings, 0 replies; 8+ messages in thread
From: Florian Fainelli @ 2022-02-25  0:46 UTC (permalink / raw)
  To: bcm-kernel-feedback-list, Matthew Hagan
  Cc: Rob Herring, Ray Jui, Scott Branden, devicetree,
	linux-arm-kernel, linux-kernel

On Wed, 23 Feb 2022 23:50:39 +0000, Matthew Hagan <mnhagan88@gmail.com> wrote:
> The MAC address on the MX64/MX65 series is located on the AT24 EEPROM.
> This is the same as other Meraki devices such as the MR32 [1].
> 
> [1] https://lore.kernel.org/linux-arm-kernel/fa8271d02ef74a687f365cebe5c55ec846963ab7.1631986106.git.chunkeey@gmail.com/
> 
> Signed-off-by: Matthew Hagan <mnhagan88@gmail.com>
> ---

Applied to https://github.com/Broadcom/stblinux/commits/devicetree/next, thanks!
--
Florian

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

* Re: [PATCH RESUBMIT 1/2] ARM: dts: NSP: MX6X: get mac-address from eeprom
@ 2022-02-25  0:46   ` Florian Fainelli
  0 siblings, 0 replies; 8+ messages in thread
From: Florian Fainelli @ 2022-02-25  0:46 UTC (permalink / raw)
  To: bcm-kernel-feedback-list, Matthew Hagan
  Cc: Rob Herring, Ray Jui, Scott Branden, devicetree,
	linux-arm-kernel, linux-kernel

On Wed, 23 Feb 2022 23:50:39 +0000, Matthew Hagan <mnhagan88@gmail.com> wrote:
> The MAC address on the MX64/MX65 series is located on the AT24 EEPROM.
> This is the same as other Meraki devices such as the MR32 [1].
> 
> [1] https://lore.kernel.org/linux-arm-kernel/fa8271d02ef74a687f365cebe5c55ec846963ab7.1631986106.git.chunkeey@gmail.com/
> 
> Signed-off-by: Matthew Hagan <mnhagan88@gmail.com>
> ---

Applied to https://github.com/Broadcom/stblinux/commits/devicetree/next, thanks!
--
Florian

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 2/2] ARM: dts: NSP: MX6X: correct LED function types
  2022-02-23 23:50   ` Matthew Hagan
@ 2022-02-25  0:47     ` Florian Fainelli
  -1 siblings, 0 replies; 8+ messages in thread
From: Florian Fainelli @ 2022-02-25  0:47 UTC (permalink / raw)
  To: bcm-kernel-feedback-list, Matthew Hagan
  Cc: Rob Herring, Ray Jui, Scott Branden, devicetree,
	linux-arm-kernel, linux-kernel

On Wed, 23 Feb 2022 23:50:40 +0000, Matthew Hagan <mnhagan88@gmail.com> wrote:
> Currently, the amber LED will remain always on. This is due to a
> misinterpretation of the LED sub-node properties, where-by "default-state"
> was used to indicate the initial state when powering on the device. When in
> use, however, this resulted in the amber LED always being on. Instead change
> this to only indicate a fault state.
> 
> Assign LED_FUNCTION_POWER to the green PWM LED.
> 
> These changes bring the MX64/65 in line with the MR32's devicetree.
> 
> Signed-off-by: Matthew Hagan <mnhagan88@gmail.com>
> ---

Applied to https://github.com/Broadcom/stblinux/commits/devicetree/next, thanks!
--
Florian

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

* Re: [PATCH 2/2] ARM: dts: NSP: MX6X: correct LED function types
@ 2022-02-25  0:47     ` Florian Fainelli
  0 siblings, 0 replies; 8+ messages in thread
From: Florian Fainelli @ 2022-02-25  0:47 UTC (permalink / raw)
  To: bcm-kernel-feedback-list, Matthew Hagan
  Cc: Rob Herring, Ray Jui, Scott Branden, devicetree,
	linux-arm-kernel, linux-kernel

On Wed, 23 Feb 2022 23:50:40 +0000, Matthew Hagan <mnhagan88@gmail.com> wrote:
> Currently, the amber LED will remain always on. This is due to a
> misinterpretation of the LED sub-node properties, where-by "default-state"
> was used to indicate the initial state when powering on the device. When in
> use, however, this resulted in the amber LED always being on. Instead change
> this to only indicate a fault state.
> 
> Assign LED_FUNCTION_POWER to the green PWM LED.
> 
> These changes bring the MX64/65 in line with the MR32's devicetree.
> 
> Signed-off-by: Matthew Hagan <mnhagan88@gmail.com>
> ---

Applied to https://github.com/Broadcom/stblinux/commits/devicetree/next, thanks!
--
Florian

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2022-02-25  0:48 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-23 23:50 [PATCH RESUBMIT 1/2] ARM: dts: NSP: MX6X: get mac-address from eeprom Matthew Hagan
2022-02-23 23:50 ` Matthew Hagan
2022-02-23 23:50 ` [PATCH 2/2] ARM: dts: NSP: MX6X: correct LED function types Matthew Hagan
2022-02-23 23:50   ` Matthew Hagan
2022-02-25  0:47   ` Florian Fainelli
2022-02-25  0:47     ` Florian Fainelli
2022-02-25  0:46 ` [PATCH RESUBMIT 1/2] ARM: dts: NSP: MX6X: get mac-address from eeprom Florian Fainelli
2022-02-25  0:46   ` Florian Fainelli

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.