linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/6] Standardize onboard LED support for 96Boards
@ 2018-10-09 14:05 Manivannan Sadhasivam
  2018-10-09 14:05 ` [PATCH 1/6] arm64: dts: rockchip: ficus: Add on-board LED support Manivannan Sadhasivam
                   ` (5 more replies)
  0 siblings, 6 replies; 13+ messages in thread
From: Manivannan Sadhasivam @ 2018-10-09 14:05 UTC (permalink / raw)
  To: robh+dt, heiko, ezequiel, xuwei5, michal.simek
  Cc: devicetree, linux-arm-kernel, linux-kernel, linux-rockchip,
	daniel.thompson, amit.kucheria, linus.walleij, koen.kooi,
	Manivannan Sadhasivam

This patchset standardizes the onboard LEDs on 96Boards by maintaining
common labels and triggers as below:

device-name:green:user1  default-trigger: heartbeat
device-name:green:user2  default-trigger: mmc0/disk-activity (onboard-storage)
device-name:green:user3  default-trigger: mmc1 (SD card)
device-name:green:user4  default-trigger: none, panic-indicator
device-name:yellow:wlan  default-trigger: phy0tx
device-name:blue:bt      default-trigger: hci0-power

This standardization is required to provide a common behaviour of LEDs
across all mainline supported 96Boards and also making it easier to
control it using an userspace library like MRAA.

For Rock960 and Ficus boards, the LED support is added in this patchset.
Rest of the boards are converted to adopt the standard.

Note: Since there is no UFS trigger available for now, user2 LED trigger
is set to none on HiKey960.

Thanks,
Mani

Manivannan Sadhasivam (6):
  arm64: dts: rockchip: ficus: Add on-board LED support
  arm64: dts: rockchip: rock960: Add on-board LED support
  arm64: dts: hisilicon: hikey: Standardize LED labels and triggers
  arm64: dts: hisilicon: hikey960: Standardize LED labels and triggers
  arm64: dts: hisilicon: poplar: Standardize LED labels and triggers
  arm64: dts: xilinx: ultra96: Standardize LED labels and triggers

 .../boot/dts/hisilicon/hi3660-hikey960.dts    | 18 ++---
 .../boot/dts/hisilicon/hi3798cv200-poplar.dts | 13 +--
 .../arm64/boot/dts/hisilicon/hi6220-hikey.dts | 17 ++--
 arch/arm64/boot/dts/rockchip/rk3399-ficus.dts | 78 ++++++++++++++++++
 .../boot/dts/rockchip/rk3399-rock960.dts      | 79 +++++++++++++++++++
 .../boot/dts/xilinx/zynqmp-zcu100-revC.dts    | 15 ++--
 6 files changed, 190 insertions(+), 30 deletions(-)

-- 
2.17.1


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

* [PATCH 1/6] arm64: dts: rockchip: ficus: Add on-board LED support
  2018-10-09 14:05 [PATCH 0/6] Standardize onboard LED support for 96Boards Manivannan Sadhasivam
@ 2018-10-09 14:05 ` Manivannan Sadhasivam
  2018-10-09 14:05 ` [PATCH 2/6] arm64: dts: rockchip: rock960: " Manivannan Sadhasivam
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 13+ messages in thread
From: Manivannan Sadhasivam @ 2018-10-09 14:05 UTC (permalink / raw)
  To: robh+dt, heiko, ezequiel, xuwei5, michal.simek
  Cc: devicetree, linux-arm-kernel, linux-kernel, linux-rockchip,
	daniel.thompson, amit.kucheria, linus.walleij, koen.kooi,
	Manivannan Sadhasivam

Add on-board LED support for Ficus board based on the following
standard used by other 96Boards:

device-name:green:user1  default-trigger: heartbeat
device-name:green:user2  default-trigger: mmc0/disk-activity
                                          (onboard-storage)
device-name:green:user3  default-trigger: mmc1 (SD-card)
device-name:green:user4  default-trigger: none, panic-indicator
device-name:yellow:wlan  default-trigger: phy0tx
device-name:blue:bt      default-trigger: hci0-power

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
---
 arch/arm64/boot/dts/rockchip/rk3399-ficus.dts | 78 +++++++++++++++++++
 1 file changed, 78 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3399-ficus.dts b/arch/arm64/boot/dts/rockchip/rk3399-ficus.dts
index cce266da28cd..10a4d3882dd8 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-ficus.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3399-ficus.dts
@@ -23,6 +23,52 @@
 		clock-output-names = "clkin_gmac";
 		#clock-cells = <0>;
 	};
+
+	leds {
+		compatible = "gpio-leds";
+		pinctrl-names = "default";
+		pinctrl-0 = <&user_led1>, <&user_led2>, <&user_led3>,
+			    <&user_led4>, <&wlan_led>, <&bt_led>;
+
+		user_led1 {
+			label = "rk3399-ficus:green:user1";
+			gpios = <&gpio4 RK_PD1 0>;
+			linux,default-trigger = "heartbeat";
+		};
+
+		user_led2 {
+			label = "rk3399-ficus:green:user2";
+			gpios = <&gpio4 RK_PD2 0>;
+			linux,default-trigger = "mmc0";
+		};
+
+		user_led3 {
+			label = "rk3399-ficus:green:user3";
+			gpios = <&gpio4 RK_PD6 0>;
+			linux,default-trigger = "mmc1";
+		};
+
+		user_led4 {
+			label = "rk3399-ficus:green:user4";
+			gpios = <&gpio1 RK_PA0 0>;
+			panic-indicator;
+			linux,default-trigger = "none";
+		};
+
+		wlan_active_led {
+			label = "rk3399-ficus:yellow:wlan";
+			gpios = <&gpio1 RK_PA1 0>;
+			linux,default-trigger = "phy0tx";
+			default-state = "off";
+		};
+
+		bt_active_led {
+			label = "rk3399-ficus:blue:bt";
+			gpios = <&gpio1 RK_PA4 0>;
+			linux,default-trigger = "hci0-power";
+			default-state = "off";
+		};
+	};
 };
 
 &gmac {
@@ -53,6 +99,38 @@
 		};
 	};
 
+	leds {
+		user_led1: user_led1 {
+			rockchip,pins =
+				<4 RK_PD1 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+
+		user_led2: user_led2 {
+			rockchip,pins =
+				<4 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+
+		user_led3: user_led3 {
+			rockchip,pins =
+				<4 RK_PD6 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+
+		user_led4: user_led4 {
+			rockchip,pins =
+				<1 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+
+		wlan_led: wlan_led {
+			rockchip,pins =
+				<1 RK_PA1 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+
+		bt_led: bt_led {
+			rockchip,pins =
+				<1 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+	};
+
 	pcie {
 		pcie_drv: pcie-drv {
 			rockchip,pins =
-- 
2.17.1


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

* [PATCH 2/6] arm64: dts: rockchip: rock960: Add on-board LED support
  2018-10-09 14:05 [PATCH 0/6] Standardize onboard LED support for 96Boards Manivannan Sadhasivam
  2018-10-09 14:05 ` [PATCH 1/6] arm64: dts: rockchip: ficus: Add on-board LED support Manivannan Sadhasivam
@ 2018-10-09 14:05 ` Manivannan Sadhasivam
  2018-10-09 14:05 ` [PATCH 3/6] arm64: dts: hisilicon: hikey: Standardize LED labels and triggers Manivannan Sadhasivam
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 13+ messages in thread
From: Manivannan Sadhasivam @ 2018-10-09 14:05 UTC (permalink / raw)
  To: robh+dt, heiko, ezequiel, xuwei5, michal.simek
  Cc: devicetree, linux-arm-kernel, linux-kernel, linux-rockchip,
	daniel.thompson, amit.kucheria, linus.walleij, koen.kooi,
	Manivannan Sadhasivam

Add on-board LED support for Rock960 board based on the following
standard used by rest of the 96Boards:

device-name:green:user1  default-trigger: heartbeat
device-name:green:user2  default-trigger: mmc0/disk-activity
                                          (onboard-storage)
device-name:green:user3  default-trigger: mmc1 (SD-card)
device-name:green:user4  default-trigger: none, panic-indicator
device-name:yellow:wlan  default-trigger: phy0tx
device-name:blue:bt      default-trigger: hci0-power

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
---
 .../boot/dts/rockchip/rk3399-rock960.dts      | 79 +++++++++++++++++++
 1 file changed, 79 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3399-rock960.dts b/arch/arm64/boot/dts/rockchip/rk3399-rock960.dts
index 3c3308daec98..7d0d1c69c3a8 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-rock960.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3399-rock960.dts
@@ -13,6 +13,53 @@
 	chosen {
 		stdout-path = "serial2:1500000n8";
 	};
+
+	leds {
+		compatible = "gpio-leds";
+		pinctrl-names = "default";
+		pinctrl-0 = <&user_led1>, <&user_led2>, <&user_led3>,
+			    <&user_led4>, <&wlan_led>, <&bt_led>;
+
+		user_led1 {
+			label = "rk3399-rock960:green:user1";
+			gpios = <&gpio4 RK_PC2 0>;
+			linux,default-trigger = "heartbeat";
+		};
+
+		user_led2 {
+			label = "rk3399-rock960:green:user2";
+			gpios = <&gpio4 RK_PC6 0>;
+			linux,default-trigger = "mmc0";
+		};
+
+		user_led3 {
+			label = "rk3399-rock960:green:user3";
+			gpios = <&gpio4 RK_PD0 0>;
+			linux,default-trigger = "mmc1";
+	};
+
+		user_led4 {
+			label = "rk3399-rock960:green:user4";
+			gpios = <&gpio4 RK_PD4 0>;
+			panic-indicator;
+			linux,default-trigger = "none";
+		};
+
+		wlan_active_led {
+			label = "rk3399-rock960:yellow:wlan";
+			gpios = <&gpio4 RK_PD5 0>;
+			linux,default-trigger = "phy0tx";
+			default-state = "off";
+		};
+
+		bt_active_led {
+			label = "rk3399-rock960:blue:bt";
+			gpios = <&gpio4 RK_PD6 0>;
+			linux,default-trigger = "hci0-power";
+			default-state = "off";
+		};
+	};
+
 };
 
 &pcie0 {
@@ -20,6 +67,38 @@
 };
 
 &pinctrl {
+	leds {
+		user_led1: user_led1 {
+			rockchip,pins =
+				<4 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+
+		user_led2: user_led2 {
+			rockchip,pins =
+				<4 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+
+		user_led3: user_led3 {
+			rockchip,pins =
+				<4 RK_PD0 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+
+		user_led4: user_led4 {
+			rockchip,pins =
+				<4 RK_PD4 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+
+		wlan_led: wlan_led {
+			rockchip,pins =
+				<4 RK_PD5 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+
+		bt_led: bt_led {
+			rockchip,pins =
+				<4 RK_PD6 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+	};
+
 	pcie {
 		pcie_drv: pcie-drv {
 			rockchip,pins =
-- 
2.17.1


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

* [PATCH 3/6] arm64: dts: hisilicon: hikey: Standardize LED labels and triggers
  2018-10-09 14:05 [PATCH 0/6] Standardize onboard LED support for 96Boards Manivannan Sadhasivam
  2018-10-09 14:05 ` [PATCH 1/6] arm64: dts: rockchip: ficus: Add on-board LED support Manivannan Sadhasivam
  2018-10-09 14:05 ` [PATCH 2/6] arm64: dts: rockchip: rock960: " Manivannan Sadhasivam
@ 2018-10-09 14:05 ` Manivannan Sadhasivam
  2018-10-09 14:05 ` [PATCH 4/6] arm64: dts: hisilicon: hikey960: " Manivannan Sadhasivam
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 13+ messages in thread
From: Manivannan Sadhasivam @ 2018-10-09 14:05 UTC (permalink / raw)
  To: robh+dt, heiko, ezequiel, xuwei5, michal.simek
  Cc: devicetree, linux-arm-kernel, linux-kernel, linux-rockchip,
	daniel.thompson, amit.kucheria, linus.walleij, koen.kooi,
	Manivannan Sadhasivam

For all 96Boards, the following standard is used for onboard LEDs.

device-name:green:user1  default-trigger: heartbeat
device-name:green:user2  default-trigger: mmc0/disk-activity
                                          (onboard-storage)
device-name:green:user3  default-trigger: mmc1 (SD-card)
device-name:green:user4  default-trigger: none, panic-indicator
device-name:yellow:wlan  default-trigger: phy0tx
device-name:blue:bt      default-trigger: hci0-power

So lets adopt the same for HiKey, which is one of the 96Boards
CE platform.

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
---
 arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts b/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts
index f4964bee6a1a..3dd9543da0b6 100644
--- a/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts
+++ b/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts
@@ -340,42 +340,43 @@
 
 	leds {
 		compatible = "gpio-leds";
+
 		user_led4 {
-			label = "user_led4";
+			label = "hi6220-hikey:green:user1";
 			gpios = <&gpio4 0 0>; /* <&gpio_user_led_1>; */
 			linux,default-trigger = "heartbeat";
 		};
 
 		user_led3 {
-			label = "user_led3";
+			label = "hi6220-hikey:green:user2";
 			gpios = <&gpio4 1 0>; /* <&gpio_user_led_2>; */
 			linux,default-trigger = "mmc0";
 		};
 
 		user_led2 {
-			label = "user_led2";
+			label = "hi6220-hikey:green:user3";
 			gpios = <&gpio4 2 0>; /* <&gpio_user_led_3>; */
 			linux,default-trigger = "mmc1";
 		};
 
 		user_led1 {
-			label = "user_led1";
+			label = "hi6220-hikey:green:user4";
 			gpios = <&gpio4 3 0>; /* <&gpio_user_led_4>; */
 			panic-indicator;
-			linux,default-trigger = "cpu0";
+			linux,default-trigger = "none";
 		};
 
 		wlan_active_led {
-			label = "wifi_active";
+			label = "hi6220-hikey:yellow:wlan";
 			gpios = <&gpio3 5 0>; /* <&gpio_wlan_active_led>; */
 			linux,default-trigger = "phy0tx";
 			default-state = "off";
 		};
 
 		bt_active_led {
-			label = "bt_active";
+			label = "hi6220-hikey:blue:bt";
 			gpios = <&gpio4 7 0>; /* <&gpio_bt_active_led>; */
-			linux,default-trigger = "hci0rx";
+			linux,default-trigger = "hci0-power";
 			default-state = "off";
 		};
 	};
-- 
2.17.1


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

* [PATCH 4/6] arm64: dts: hisilicon: hikey960: Standardize LED labels and triggers
  2018-10-09 14:05 [PATCH 0/6] Standardize onboard LED support for 96Boards Manivannan Sadhasivam
                   ` (2 preceding siblings ...)
  2018-10-09 14:05 ` [PATCH 3/6] arm64: dts: hisilicon: hikey: Standardize LED labels and triggers Manivannan Sadhasivam
@ 2018-10-09 14:05 ` Manivannan Sadhasivam
  2018-10-09 14:05 ` [PATCH 5/6] arm64: dts: hisilicon: poplar: " Manivannan Sadhasivam
  2018-10-09 14:05 ` [PATCH 6/6] arm64: dts: xilinx: ultra96: " Manivannan Sadhasivam
  5 siblings, 0 replies; 13+ messages in thread
From: Manivannan Sadhasivam @ 2018-10-09 14:05 UTC (permalink / raw)
  To: robh+dt, heiko, ezequiel, xuwei5, michal.simek
  Cc: devicetree, linux-arm-kernel, linux-kernel, linux-rockchip,
	daniel.thompson, amit.kucheria, linus.walleij, koen.kooi,
	Manivannan Sadhasivam

For all 96Boards, the following standard is used for onboard LEDs.

device-name:green:user1  default-trigger: heartbeat
device-name:green:user2  default-trigger: mmc0/disk-activity
                                          (onboard-storage)
device-name:green:user3  default-trigger: mmc1 (SD-card)
device-name:green:user4  default-trigger: none, panic-indicator
device-name:yellow:wlan  default-trigger: phy0tx
device-name:blue:bt      default-trigger: hci0-power

So lets adopt the same for HiKey960 which is one of the 96Boards
CE platform.

Since there is no trigger available for onboard-storage UFS now, user2
trigger is set to none.

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
---
 .../boot/dts/hisilicon/hi3660-hikey960.dts     | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dts b/arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dts
index c98bcbc8dfba..35ce460b3ed4 100644
--- a/arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dts
+++ b/arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dts
@@ -85,36 +85,36 @@
 		compatible = "gpio-leds";
 
 		user_led1 {
-			label = "user_led1";
+			label = "hi3660-hikey960:green:user1";
 			/* gpio_150_user_led1 */
 			gpios = <&gpio18 6 0>;
 			linux,default-trigger = "heartbeat";
 		};
 
 		user_led2 {
-			label = "user_led2";
+			label = "hi3660-hikey960:green:user2";
 			/* gpio_151_user_led2 */
 			gpios = <&gpio18 7 0>;
-			linux,default-trigger = "mmc0";
+			linux,default-trigger = "none";
 		};
 
 		user_led3 {
-			label = "user_led3";
+			label = "hi3660-hikey960:green:user3";
 			/* gpio_189_user_led3 */
 			gpios = <&gpio23 5 0>;
-			default-state = "off";
+			linux,default-trigger = "mmc0";
 		};
 
 		user_led4 {
-			label = "user_led4";
+			label = "hi3660-hikey960:green:user4";
 			/* gpio_190_user_led4 */
 			gpios = <&gpio23 6 0>;
 			panic-indicator;
-			linux,default-trigger = "cpu0";
+			linux,default-trigger = "none";
 		};
 
 		wlan_active_led {
-			label = "wifi_active";
+			label = "hi3660-hikey960:yellow:wlan";
 			/* gpio_205_wifi_active */
 			gpios = <&gpio25 5 0>;
 			linux,default-trigger = "phy0tx";
@@ -122,7 +122,7 @@
 		};
 
 		bt_active_led {
-			label = "bt_active";
+			label = "hi3660-hikey960:blue:bt";
 			gpios = <&gpio25 7 0>;
 			/* gpio_207_user_led1 */
 			linux,default-trigger = "hci0-power";
-- 
2.17.1


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

* [PATCH 5/6] arm64: dts: hisilicon: poplar: Standardize LED labels and triggers
  2018-10-09 14:05 [PATCH 0/6] Standardize onboard LED support for 96Boards Manivannan Sadhasivam
                   ` (3 preceding siblings ...)
  2018-10-09 14:05 ` [PATCH 4/6] arm64: dts: hisilicon: hikey960: " Manivannan Sadhasivam
@ 2018-10-09 14:05 ` Manivannan Sadhasivam
  2018-10-09 14:05 ` [PATCH 6/6] arm64: dts: xilinx: ultra96: " Manivannan Sadhasivam
  5 siblings, 0 replies; 13+ messages in thread
From: Manivannan Sadhasivam @ 2018-10-09 14:05 UTC (permalink / raw)
  To: robh+dt, heiko, ezequiel, xuwei5, michal.simek
  Cc: devicetree, linux-arm-kernel, linux-kernel, linux-rockchip,
	daniel.thompson, amit.kucheria, linus.walleij, koen.kooi,
	Manivannan Sadhasivam

For all 96Boards, the following standard is used for onboard LEDs.

device-name:green:user1  default-trigger: heartbeat
device-name:green:user2  default-trigger: mmc0/disk-activity
                                          (onboard-storage)
device-name:green:user3  default-trigger: mmc1 (SD-card)
device-name:green:user4  default-trigger: none, panic-indicator
device-name:yellow:wlan  default-trigger: phy0tx
device-name:blue:bt      default-trigger: hci0-power

So lets adopt the same for Poplar, which is one of the 96Boards
Enterprise edition platform.

Due to absence of WLAN and BT support, corresponding LED nodes are not
considered.

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
---
 .../arm64/boot/dts/hisilicon/hi3798cv200-poplar.dts | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/arch/arm64/boot/dts/hisilicon/hi3798cv200-poplar.dts b/arch/arm64/boot/dts/hisilicon/hi3798cv200-poplar.dts
index d30f6eb8a5ee..f6f3e928a54e 100644
--- a/arch/arm64/boot/dts/hisilicon/hi3798cv200-poplar.dts
+++ b/arch/arm64/boot/dts/hisilicon/hi3798cv200-poplar.dts
@@ -35,30 +35,31 @@
 		compatible = "gpio-leds";
 
 		user-led0 {
-			label = "USER-LED0";
+			label = "hi3798cv200-poplar:green:user1";
 			gpios = <&gpio6 3 GPIO_ACTIVE_LOW>;
 			linux,default-trigger = "heartbeat";
 			default-state = "off";
 		};
 
 		user-led1 {
-			label = "USER-LED1";
+			label = "hi3798cv200-poplar:green:user2";
 			gpios = <&gpio5 1 GPIO_ACTIVE_LOW>;
 			linux,default-trigger = "mmc0";
 			default-state = "off";
 		};
 
 		user-led2 {
-			label = "USER-LED2";
+			label = "hi3798cv200-poplar:green:user3";
 			gpios = <&gpio5 2 GPIO_ACTIVE_LOW>;
-			linux,default-trigger = "none";
+			linux,default-trigger = "mmc1";
 			default-state = "off";
 		};
 
 		user-led3 {
-			label = "USER-LED3";
+			label = "hi3798cv200-poplar:green:user4";
 			gpios = <&gpio10 6 GPIO_ACTIVE_LOW>;
-			linux,default-trigger = "cpu0";
+			linux,default-trigger = "none";
+			panic-indicator;
 			default-state = "off";
 		};
 	};
-- 
2.17.1


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

* [PATCH 6/6] arm64: dts: xilinx: ultra96: Standardize LED labels and triggers
  2018-10-09 14:05 [PATCH 0/6] Standardize onboard LED support for 96Boards Manivannan Sadhasivam
                   ` (4 preceding siblings ...)
  2018-10-09 14:05 ` [PATCH 5/6] arm64: dts: hisilicon: poplar: " Manivannan Sadhasivam
@ 2018-10-09 14:05 ` Manivannan Sadhasivam
  2018-10-10  7:25   ` Michal Simek
  5 siblings, 1 reply; 13+ messages in thread
From: Manivannan Sadhasivam @ 2018-10-09 14:05 UTC (permalink / raw)
  To: robh+dt, heiko, ezequiel, xuwei5, michal.simek
  Cc: devicetree, linux-arm-kernel, linux-kernel, linux-rockchip,
	daniel.thompson, amit.kucheria, linus.walleij, koen.kooi,
	Manivannan Sadhasivam

For all 96Boards, the following standard is used for onboard LEDs.

device-name:green:user1  default-trigger: heartbeat
device-name:green:user2  default-trigger: mmc0/disk-activity
                                          (onboard-storage)
device-name:green:user3  default-trigger: mmc1 (SD-card)
device-name:green:user4  default-trigger: none, panic-indicator
device-name:yellow:wlan  default-trigger: phy0tx
device-name:blue:bt      default-trigger: hci0-power

So lets adopt the same for Ultra96, which is one of the 96Boards
CE and AI platform. Since the WLAN and BT LEDs are hardwired onboard,
consolidate only User LEDs.

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
---
 arch/arm64/boot/dts/xilinx/zynqmp-zcu100-revC.dts | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/arch/arm64/boot/dts/xilinx/zynqmp-zcu100-revC.dts b/arch/arm64/boot/dts/xilinx/zynqmp-zcu100-revC.dts
index eb5e8bddb610..565ceb390f99 100644
--- a/arch/arm64/boot/dts/xilinx/zynqmp-zcu100-revC.dts
+++ b/arch/arm64/boot/dts/xilinx/zynqmp-zcu100-revC.dts
@@ -57,29 +57,30 @@
 	leds {
 		compatible = "gpio-leds";
 		ds2 {
-			label = "ds2";
+			label = "zynqmp-zcu100-revC:green:user1";
 			gpios = <&gpio 20 GPIO_ACTIVE_HIGH>;
 			linux,default-trigger = "heartbeat";
 		};
 
 		ds3 {
-			label = "ds3";
+			label = "zynqmp-zcu100-revC:green:user2";
 			gpios = <&gpio 19 GPIO_ACTIVE_HIGH>;
-			linux,default-trigger = "phy0tx"; /* WLAN tx */
+			linux,default-trigger = "mmc0";
 			default-state = "off";
 		};
 
 		ds4 {
-			label = "ds4";
+			label = "zynqmp-zcu100-revC:green:user3";
 			gpios = <&gpio 18 GPIO_ACTIVE_HIGH>;
-			linux,default-trigger = "phy0rx"; /* WLAN rx */
+			linux,default-trigger = "mmc1";
 			default-state = "off";
 		};
 
 		ds5 {
-			label = "ds5";
+			label = "zynqmp-zcu100-revC:green:user4";
 			gpios = <&gpio 17 GPIO_ACTIVE_HIGH>;
-			linux,default-trigger = "bluetooth-power";
+			linux,default-trigger = "none";
+			panic-indicator;
 		};
 
 		vbus_det { /* U5 USB5744 VBUS detection via MIO25 */
-- 
2.17.1


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

* Re: [PATCH 6/6] arm64: dts: xilinx: ultra96: Standardize LED labels and triggers
  2018-10-09 14:05 ` [PATCH 6/6] arm64: dts: xilinx: ultra96: " Manivannan Sadhasivam
@ 2018-10-10  7:25   ` Michal Simek
  2018-10-10  7:35     ` Manivannan Sadhasivam
  2018-10-15 19:56     ` Pavel Machek
  0 siblings, 2 replies; 13+ messages in thread
From: Michal Simek @ 2018-10-10  7:25 UTC (permalink / raw)
  To: Manivannan Sadhasivam, robh+dt, heiko, ezequiel, xuwei5, michal.simek
  Cc: devicetree, linux-arm-kernel, linux-kernel, linux-rockchip,
	daniel.thompson, amit.kucheria, linus.walleij, koen.kooi

On 9.10.2018 16:05, Manivannan Sadhasivam wrote:
> For all 96Boards, the following standard is used for onboard LEDs.
> 
> device-name:green:user1  default-trigger: heartbeat
> device-name:green:user2  default-trigger: mmc0/disk-activity
>                                           (onboard-storage)
> device-name:green:user3  default-trigger: mmc1 (SD-card)
> device-name:green:user4  default-trigger: none, panic-indicator
> device-name:yellow:wlan  default-trigger: phy0tx
> device-name:blue:bt      default-trigger: hci0-power
> 
> So lets adopt the same for Ultra96, which is one of the 96Boards
> CE and AI platform. Since the WLAN and BT LEDs are hardwired onboard,
> consolidate only User LEDs.
> 
> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> ---
>  arch/arm64/boot/dts/xilinx/zynqmp-zcu100-revC.dts | 15 ++++++++-------
>  1 file changed, 8 insertions(+), 7 deletions(-)
> 
> diff --git a/arch/arm64/boot/dts/xilinx/zynqmp-zcu100-revC.dts b/arch/arm64/boot/dts/xilinx/zynqmp-zcu100-revC.dts
> index eb5e8bddb610..565ceb390f99 100644
> --- a/arch/arm64/boot/dts/xilinx/zynqmp-zcu100-revC.dts
> +++ b/arch/arm64/boot/dts/xilinx/zynqmp-zcu100-revC.dts
> @@ -57,29 +57,30 @@
>  	leds {
>  		compatible = "gpio-leds";
>  		ds2 {
> -			label = "ds2";
> +			label = "zynqmp-zcu100-revC:green:user1";

The purpose of this series should be standardize Led labels that's why I
would expect that leds will be called in the same way on all these
boards that's why I am not getting why there is board name.

green:user1 or just user1 should be enough.

Thanks,
Michal

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

* Re: [PATCH 6/6] arm64: dts: xilinx: ultra96: Standardize LED labels and triggers
  2018-10-10  7:25   ` Michal Simek
@ 2018-10-10  7:35     ` Manivannan Sadhasivam
  2018-10-10  7:40       ` Michal Simek
  2018-10-15 19:56     ` Pavel Machek
  1 sibling, 1 reply; 13+ messages in thread
From: Manivannan Sadhasivam @ 2018-10-10  7:35 UTC (permalink / raw)
  To: Michal Simek
  Cc: robh+dt, heiko, ezequiel, xuwei5, devicetree, linux-arm-kernel,
	linux-kernel, linux-rockchip, daniel.thompson, amit.kucheria,
	linus.walleij, koen.kooi

Hi Michal,

On Wed, Oct 10, 2018 at 09:25:24AM +0200, Michal Simek wrote:
> On 9.10.2018 16:05, Manivannan Sadhasivam wrote:
> > For all 96Boards, the following standard is used for onboard LEDs.
> > 
> > device-name:green:user1  default-trigger: heartbeat
> > device-name:green:user2  default-trigger: mmc0/disk-activity
> >                                           (onboard-storage)
> > device-name:green:user3  default-trigger: mmc1 (SD-card)
> > device-name:green:user4  default-trigger: none, panic-indicator
> > device-name:yellow:wlan  default-trigger: phy0tx
> > device-name:blue:bt      default-trigger: hci0-power
> > 
> > So lets adopt the same for Ultra96, which is one of the 96Boards
> > CE and AI platform. Since the WLAN and BT LEDs are hardwired onboard,
> > consolidate only User LEDs.
> > 
> > Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> > ---
> >  arch/arm64/boot/dts/xilinx/zynqmp-zcu100-revC.dts | 15 ++++++++-------
> >  1 file changed, 8 insertions(+), 7 deletions(-)
> > 
> > diff --git a/arch/arm64/boot/dts/xilinx/zynqmp-zcu100-revC.dts b/arch/arm64/boot/dts/xilinx/zynqmp-zcu100-revC.dts
> > index eb5e8bddb610..565ceb390f99 100644
> > --- a/arch/arm64/boot/dts/xilinx/zynqmp-zcu100-revC.dts
> > +++ b/arch/arm64/boot/dts/xilinx/zynqmp-zcu100-revC.dts
> > @@ -57,29 +57,30 @@
> >  	leds {
> >  		compatible = "gpio-leds";
> >  		ds2 {
> > -			label = "ds2";
> > +			label = "zynqmp-zcu100-revC:green:user1";
> 
> The purpose of this series should be standardize Led labels that's why I
> would expect that leds will be called in the same way on all these
> boards that's why I am not getting why there is board name.
> 
> green:user1 or just user1 should be enough.
> 

Hmm. That's a good point. My proposal to standardize the labels is inspired from
Dragonboard410c dts [1]. They had the device name in label and I decided to
go with that. But as you said, the board name is not needed and just 
`color:led-name` should be fine.

Will modify this in next interation.

Thanks,
Mani

[1] https://github.com/torvalds/linux/blob/master/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi#L294

> Thanks,
> Michal

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

* Re: [PATCH 6/6] arm64: dts: xilinx: ultra96: Standardize LED labels and triggers
  2018-10-10  7:35     ` Manivannan Sadhasivam
@ 2018-10-10  7:40       ` Michal Simek
  2018-10-10  7:46         ` Manivannan Sadhasivam
  0 siblings, 1 reply; 13+ messages in thread
From: Michal Simek @ 2018-10-10  7:40 UTC (permalink / raw)
  To: Manivannan Sadhasivam, Michal Simek
  Cc: robh+dt, heiko, ezequiel, xuwei5, devicetree, linux-arm-kernel,
	linux-kernel, linux-rockchip, daniel.thompson, amit.kucheria,
	linus.walleij, koen.kooi

On 10.10.2018 09:35, Manivannan Sadhasivam wrote:
> Hi Michal,
> 
> On Wed, Oct 10, 2018 at 09:25:24AM +0200, Michal Simek wrote:
>> On 9.10.2018 16:05, Manivannan Sadhasivam wrote:
>>> For all 96Boards, the following standard is used for onboard LEDs.
>>>
>>> device-name:green:user1  default-trigger: heartbeat
>>> device-name:green:user2  default-trigger: mmc0/disk-activity
>>>                                           (onboard-storage)
>>> device-name:green:user3  default-trigger: mmc1 (SD-card)
>>> device-name:green:user4  default-trigger: none, panic-indicator
>>> device-name:yellow:wlan  default-trigger: phy0tx
>>> device-name:blue:bt      default-trigger: hci0-power
>>>
>>> So lets adopt the same for Ultra96, which is one of the 96Boards
>>> CE and AI platform. Since the WLAN and BT LEDs are hardwired onboard,
>>> consolidate only User LEDs.
>>>
>>> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
>>> ---
>>>  arch/arm64/boot/dts/xilinx/zynqmp-zcu100-revC.dts | 15 ++++++++-------
>>>  1 file changed, 8 insertions(+), 7 deletions(-)
>>>
>>> diff --git a/arch/arm64/boot/dts/xilinx/zynqmp-zcu100-revC.dts b/arch/arm64/boot/dts/xilinx/zynqmp-zcu100-revC.dts
>>> index eb5e8bddb610..565ceb390f99 100644
>>> --- a/arch/arm64/boot/dts/xilinx/zynqmp-zcu100-revC.dts
>>> +++ b/arch/arm64/boot/dts/xilinx/zynqmp-zcu100-revC.dts
>>> @@ -57,29 +57,30 @@
>>>  	leds {
>>>  		compatible = "gpio-leds";
>>>  		ds2 {
>>> -			label = "ds2";
>>> +			label = "zynqmp-zcu100-revC:green:user1";
>>
>> The purpose of this series should be standardize Led labels that's why I
>> would expect that leds will be called in the same way on all these
>> boards that's why I am not getting why there is board name.
>>
>> green:user1 or just user1 should be enough.
>>
> 
> Hmm. That's a good point. My proposal to standardize the labels is inspired from
> Dragonboard410c dts [1]. They had the device name in label and I decided to
> go with that. But as you said, the board name is not needed and just 
> `color:led-name` should be fine.
> 
> Will modify this in next interation.

The second part of this is that all current DTSes are using some names
and by changing it you will break compatibility which is something what
you should avoid.
That's why it is really a question if this change should be accepted.

Thanks,
Michal


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

* Re: [PATCH 6/6] arm64: dts: xilinx: ultra96: Standardize LED labels and triggers
  2018-10-10  7:40       ` Michal Simek
@ 2018-10-10  7:46         ` Manivannan Sadhasivam
  0 siblings, 0 replies; 13+ messages in thread
From: Manivannan Sadhasivam @ 2018-10-10  7:46 UTC (permalink / raw)
  To: Michal Simek, robh+dt
  Cc: heiko, ezequiel, xuwei5, devicetree, linux-arm-kernel,
	linux-kernel, linux-rockchip, daniel.thompson, amit.kucheria,
	linus.walleij, koen.kooi

On Wed, Oct 10, 2018 at 09:40:22AM +0200, Michal Simek wrote:
> On 10.10.2018 09:35, Manivannan Sadhasivam wrote:
> > Hi Michal,
> > 
> > On Wed, Oct 10, 2018 at 09:25:24AM +0200, Michal Simek wrote:
> >> On 9.10.2018 16:05, Manivannan Sadhasivam wrote:
> >>> For all 96Boards, the following standard is used for onboard LEDs.
> >>>
> >>> device-name:green:user1  default-trigger: heartbeat
> >>> device-name:green:user2  default-trigger: mmc0/disk-activity
> >>>                                           (onboard-storage)
> >>> device-name:green:user3  default-trigger: mmc1 (SD-card)
> >>> device-name:green:user4  default-trigger: none, panic-indicator
> >>> device-name:yellow:wlan  default-trigger: phy0tx
> >>> device-name:blue:bt      default-trigger: hci0-power
> >>>
> >>> So lets adopt the same for Ultra96, which is one of the 96Boards
> >>> CE and AI platform. Since the WLAN and BT LEDs are hardwired onboard,
> >>> consolidate only User LEDs.
> >>>
> >>> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> >>> ---
> >>>  arch/arm64/boot/dts/xilinx/zynqmp-zcu100-revC.dts | 15 ++++++++-------
> >>>  1 file changed, 8 insertions(+), 7 deletions(-)
> >>>
> >>> diff --git a/arch/arm64/boot/dts/xilinx/zynqmp-zcu100-revC.dts b/arch/arm64/boot/dts/xilinx/zynqmp-zcu100-revC.dts
> >>> index eb5e8bddb610..565ceb390f99 100644
> >>> --- a/arch/arm64/boot/dts/xilinx/zynqmp-zcu100-revC.dts
> >>> +++ b/arch/arm64/boot/dts/xilinx/zynqmp-zcu100-revC.dts
> >>> @@ -57,29 +57,30 @@
> >>>  	leds {
> >>>  		compatible = "gpio-leds";
> >>>  		ds2 {
> >>> -			label = "ds2";
> >>> +			label = "zynqmp-zcu100-revC:green:user1";
> >>
> >> The purpose of this series should be standardize Led labels that's why I
> >> would expect that leds will be called in the same way on all these
> >> boards that's why I am not getting why there is board name.
> >>
> >> green:user1 or just user1 should be enough.
> >>
> > 
> > Hmm. That's a good point. My proposal to standardize the labels is inspired from
> > Dragonboard410c dts [1]. They had the device name in label and I decided to
> > go with that. But as you said, the board name is not needed and just 
> > `color:led-name` should be fine.
> > 
> > Will modify this in next interation.
> 
> The second part of this is that all current DTSes are using some names
> and by changing it you will break compatibility which is something what
> you should avoid.
> That's why it is really a question if this change should be accepted.
>

You mean userspace compatibility? If yes, then the affected boards are using
MRAA library for providing the userspace access and I will ensure that it will
get updated to the new labels.

But for other userspace scripts which users might be depending on, it will
break for sure. So, I would like to get some feedback here from Rob.

Thanks,
Mani
 
> Thanks,
> Michal
> 

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

* Re: [PATCH 6/6] arm64: dts: xilinx: ultra96: Standardize LED labels and triggers
  2018-10-10  7:25   ` Michal Simek
  2018-10-10  7:35     ` Manivannan Sadhasivam
@ 2018-10-15 19:56     ` Pavel Machek
  2018-10-22  6:50       ` Manivannan Sadhasivam
  1 sibling, 1 reply; 13+ messages in thread
From: Pavel Machek @ 2018-10-15 19:56 UTC (permalink / raw)
  To: Michal Simek
  Cc: Manivannan Sadhasivam, robh+dt, heiko, ezequiel, xuwei5,
	devicetree, linux-arm-kernel, linux-kernel, linux-rockchip,
	daniel.thompson, amit.kucheria, linus.walleij, koen.kooi

[-- Attachment #1: Type: text/plain, Size: 1651 bytes --]

On Wed 2018-10-10 09:25:24, Michal Simek wrote:
> On 9.10.2018 16:05, Manivannan Sadhasivam wrote:
> > For all 96Boards, the following standard is used for onboard LEDs.
> > 
> > device-name:green:user1  default-trigger: heartbeat
> > device-name:green:user2  default-trigger: mmc0/disk-activity
> >                                           (onboard-storage)
> > device-name:green:user3  default-trigger: mmc1 (SD-card)
> > device-name:green:user4  default-trigger: none, panic-indicator

Actually, having one LED as heartbeat and second as panic indicator
only... Could those be merged and remaining LED used to something
useful?

> > Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> > ---

> > index eb5e8bddb610..565ceb390f99 100644
> > --- a/arch/arm64/boot/dts/xilinx/zynqmp-zcu100-revC.dts
> > +++ b/arch/arm64/boot/dts/xilinx/zynqmp-zcu100-revC.dts
> > @@ -57,29 +57,30 @@
> >  	leds {
> >  		compatible = "gpio-leds";
> >  		ds2 {
> > -			label = "ds2";
> > +			label = "zynqmp-zcu100-revC:green:user1";
> 
> The purpose of this series should be standardize Led labels that's why I
> would expect that leds will be called in the same way on all these
> boards that's why I am not getting why there is board name.
> 
> green:user1 or just user1 should be enough.

green:user1 is better. Also... I guess this should go to the LEDs
list... and if you want to make names standard, maybe there's better
naming than user1..user4?

									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

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

* Re: [PATCH 6/6] arm64: dts: xilinx: ultra96: Standardize LED labels and triggers
  2018-10-15 19:56     ` Pavel Machek
@ 2018-10-22  6:50       ` Manivannan Sadhasivam
  0 siblings, 0 replies; 13+ messages in thread
From: Manivannan Sadhasivam @ 2018-10-22  6:50 UTC (permalink / raw)
  To: Pavel Machek
  Cc: Michal Simek, robh+dt, heiko, ezequiel, xuwei5, devicetree,
	linux-arm-kernel, linux-kernel, linux-rockchip, daniel.thompson,
	amit.kucheria, linus.walleij, koen.kooi

Hi Pavel,

Sorry for the late reply! Not sure why your resonse was filtered by the
Spam filter :\

On Mon, Oct 15, 2018 at 09:56:01PM +0200, Pavel Machek wrote:
> On Wed 2018-10-10 09:25:24, Michal Simek wrote:
> > On 9.10.2018 16:05, Manivannan Sadhasivam wrote:
> > > For all 96Boards, the following standard is used for onboard LEDs.
> > > 
> > > device-name:green:user1  default-trigger: heartbeat
> > > device-name:green:user2  default-trigger: mmc0/disk-activity
> > >                                           (onboard-storage)
> > > device-name:green:user3  default-trigger: mmc1 (SD-card)
> > > device-name:green:user4  default-trigger: none, panic-indicator
> 
> Actually, having one LED as heartbeat and second as panic indicator
> only... Could those be merged and remaining LED used to something
> useful?
>

No. Our intention is to leave one LED as a panic indicator and a dedicated
LED for heartbeat. If user wants to override the defaults, he can always do
with any LEDs.
 
> > > Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> > > ---
> 
> > > index eb5e8bddb610..565ceb390f99 100644
> > > --- a/arch/arm64/boot/dts/xilinx/zynqmp-zcu100-revC.dts
> > > +++ b/arch/arm64/boot/dts/xilinx/zynqmp-zcu100-revC.dts
> > > @@ -57,29 +57,30 @@
> > >  	leds {
> > >  		compatible = "gpio-leds";
> > >  		ds2 {
> > > -			label = "ds2";
> > > +			label = "zynqmp-zcu100-revC:green:user1";
> > 
> > The purpose of this series should be standardize Led labels that's why I
> > would expect that leds will be called in the same way on all these
> > boards that's why I am not getting why there is board name.
> > 
> > green:user1 or just user1 should be enough.
> 
> green:user1 is better. Also... I guess this should go to the LEDs
> list... and if you want to make names standard, maybe there's better
> naming than user1..user4?
> 

These are user LEDs and that's why the `userN` naming convention comes into
place. Here I agree to move with "green:user1" format and sending it to the
LEDs list.

Thanks,
Mani

> 									Pavel
> -- 
> (english) http://www.livejournal.com/~pavelmachek
> (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html



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

end of thread, other threads:[~2018-10-22  6:50 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-09 14:05 [PATCH 0/6] Standardize onboard LED support for 96Boards Manivannan Sadhasivam
2018-10-09 14:05 ` [PATCH 1/6] arm64: dts: rockchip: ficus: Add on-board LED support Manivannan Sadhasivam
2018-10-09 14:05 ` [PATCH 2/6] arm64: dts: rockchip: rock960: " Manivannan Sadhasivam
2018-10-09 14:05 ` [PATCH 3/6] arm64: dts: hisilicon: hikey: Standardize LED labels and triggers Manivannan Sadhasivam
2018-10-09 14:05 ` [PATCH 4/6] arm64: dts: hisilicon: hikey960: " Manivannan Sadhasivam
2018-10-09 14:05 ` [PATCH 5/6] arm64: dts: hisilicon: poplar: " Manivannan Sadhasivam
2018-10-09 14:05 ` [PATCH 6/6] arm64: dts: xilinx: ultra96: " Manivannan Sadhasivam
2018-10-10  7:25   ` Michal Simek
2018-10-10  7:35     ` Manivannan Sadhasivam
2018-10-10  7:40       ` Michal Simek
2018-10-10  7:46         ` Manivannan Sadhasivam
2018-10-15 19:56     ` Pavel Machek
2018-10-22  6:50       ` Manivannan Sadhasivam

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