2018-10-29 09:43:41

by Manivannan Sadhasivam

[permalink] [raw]
Subject: [PATCH v3 0/7] Standardize onboard LED support for 96Boards

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

green:user1 default-trigger: heartbeat
green:user2 default-trigger: mmc0/disk-activity (onboard-storage)
green:user3 default-trigger: mmc1 (SD card)
green:user4 default-trigger: none, panic-indicator
yellow:wlan default-trigger: phy0tx
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

Changes in v3:

* Added missing Signed-off-by tag for APQ8016 patch
* Added Acked-by from Amit
* Fixed user LED node names for HiKey board

Changes in v2:

* Removed device-name from LED labels as per the suggestion from Simon
and Pavel
* Adopted APQ8016 SBC (Dragonboard410c)
* Tested the Ficus patch on Ficus V1.1 board
* CCed LED mailing list

Manivannan Sadhasivam (7):
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
arm64: dts: qcom: apq8016-sbc: Standardize LED labels

.../boot/dts/hisilicon/hi3660-hikey960.dts | 18 ++---
.../boot/dts/hisilicon/hi3798cv200-poplar.dts | 13 +--
.../arm64/boot/dts/hisilicon/hi6220-hikey.dts | 25 +++---
arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi | 12 +--
arch/arm64/boot/dts/rockchip/rk3399-ficus.dts | 78 ++++++++++++++++++
.../boot/dts/rockchip/rk3399-rock960.dts | 79 +++++++++++++++++++
.../boot/dts/xilinx/zynqmp-zcu100-revC.dts | 15 ++--
7 files changed, 200 insertions(+), 40 deletions(-)

--
2.17.1



2018-10-29 09:43:59

by Manivannan Sadhasivam

[permalink] [raw]
Subject: [PATCH v3 1/7] arm64: dts: rockchip: ficus: Add on-board LED support

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

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

Signed-off-by: Manivannan Sadhasivam <[email protected]>
---
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..027d428917b8 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 = "red:user1";
+ gpios = <&gpio4 25 0>;
+ linux,default-trigger = "heartbeat";
+ };
+
+ user_led2 {
+ label = "red:user2";
+ gpios = <&gpio4 26 0>;
+ linux,default-trigger = "mmc0";
+ };
+
+ user_led3 {
+ label = "red:user3";
+ gpios = <&gpio4 30 0>;
+ linux,default-trigger = "mmc1";
+ };
+
+ user_led4 {
+ label = "red:user4";
+ gpios = <&gpio1 0 0>;
+ panic-indicator;
+ linux,default-trigger = "none";
+ };
+
+ wlan_active_led {
+ label = "red:wlan";
+ gpios = <&gpio1 1 0>;
+ linux,default-trigger = "phy0tx";
+ default-state = "off";
+ };
+
+ bt_active_led {
+ label = "red:bt";
+ gpios = <&gpio1 4 0>;
+ linux,default-trigger = "hci0-power";
+ default-state = "off";
+ };
+ };
};

&gmac {
@@ -66,6 +112,38 @@
<4 27 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
+
+ leds {
+ user_led1: user_led1 {
+ rockchip,pins =
+ <4 25 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+
+ user_led2: user_led2 {
+ rockchip,pins =
+ <4 26 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+
+ user_led3: user_led3 {
+ rockchip,pins =
+ <4 30 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+
+ user_led4: user_led4 {
+ rockchip,pins =
+ <1 0 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+
+ wlan_led: wlan_led {
+ rockchip,pins =
+ <1 1 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+
+ bt_led: bt_led {
+ rockchip,pins =
+ <1 4 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
};

&usbdrd_dwc3_0 {
--
2.17.1


2018-10-29 09:44:13

by Manivannan Sadhasivam

[permalink] [raw]
Subject: [PATCH v3 2/7] arm64: dts: rockchip: rock960: Add on-board LED support

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

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

Signed-off-by: Manivannan Sadhasivam <[email protected]>
---
.../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..12285c51cceb 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 = "green:user1";
+ gpios = <&gpio4 RK_PC2 0>;
+ linux,default-trigger = "heartbeat";
+ };
+
+ user_led2 {
+ label = "green:user2";
+ gpios = <&gpio4 RK_PC6 0>;
+ linux,default-trigger = "mmc0";
+ };
+
+ user_led3 {
+ label = "green:user3";
+ gpios = <&gpio4 RK_PD0 0>;
+ linux,default-trigger = "mmc1";
+ };
+
+ user_led4 {
+ label = "green:user4";
+ gpios = <&gpio4 RK_PD4 0>;
+ panic-indicator;
+ linux,default-trigger = "none";
+ };
+
+ wlan_active_led {
+ label = "yellow:wlan";
+ gpios = <&gpio4 RK_PD5 0>;
+ linux,default-trigger = "phy0tx";
+ default-state = "off";
+ };
+
+ bt_active_led {
+ label = "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


2018-10-29 09:44:32

by Manivannan Sadhasivam

[permalink] [raw]
Subject: [PATCH v3 3/7] arm64: dts: hisilicon: hikey: Standardize LED labels and triggers

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

green:user1 default-trigger: heartbeat
green:user2 default-trigger: mmc0/disk-activity(onboard-storage)
green:user3 default-trigger: mmc1 (SD-card)
green:user4 default-trigger: none, panic-indicator
yellow:wlan default-trigger: phy0tx
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 <[email protected]>
---
.../arm64/boot/dts/hisilicon/hi6220-hikey.dts | 25 ++++++++++---------
1 file changed, 13 insertions(+), 12 deletions(-)

diff --git a/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts b/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts
index f4964bee6a1a..610235028cc7 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";
+
+ user_led1 {
+ label = "green:user1";
gpios = <&gpio4 0 0>; /* <&gpio_user_led_1>; */
linux,default-trigger = "heartbeat";
};

- user_led3 {
- label = "user_led3";
+ user_led2 {
+ label = "green:user2";
gpios = <&gpio4 1 0>; /* <&gpio_user_led_2>; */
linux,default-trigger = "mmc0";
};

- user_led2 {
- label = "user_led2";
+ user_led3 {
+ label = "green:user3";
gpios = <&gpio4 2 0>; /* <&gpio_user_led_3>; */
linux,default-trigger = "mmc1";
};

- user_led1 {
- label = "user_led1";
+ user_led4 {
+ label = "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 = "yellow:wlan";
gpios = <&gpio3 5 0>; /* <&gpio_wlan_active_led>; */
linux,default-trigger = "phy0tx";
default-state = "off";
};

bt_active_led {
- label = "bt_active";
+ label = "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


2018-10-29 09:45:12

by Manivannan Sadhasivam

[permalink] [raw]
Subject: [PATCH v3 6/7] arm64: dts: xilinx: ultra96: Standardize LED labels and triggers

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

green:user1 default-trigger: heartbeat
green:user2 default-trigger: mmc0/disk-activity(onboard-storage)
green:user3 default-trigger: mmc1 (SD-card)
green:user4 default-trigger: none, panic-indicator
yellow:wlan default-trigger: phy0tx
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 <[email protected]>
---
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..c08a8753215b 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 = "green:user1";
gpios = <&gpio 20 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "heartbeat";
};

ds3 {
- label = "ds3";
+ label = "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 = "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 = "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


2018-10-29 09:45:27

by Manivannan Sadhasivam

[permalink] [raw]
Subject: [PATCH v3 5/7] arm64: dts: hisilicon: poplar: Standardize LED labels and triggers

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

green:user1 default-trigger: heartbeat
green:user2 default-trigger: mmc0/disk-activity(onboard-storage)
green:user3 default-trigger: mmc1 (SD-card)
green:user4 default-trigger: none, panic-indicator
yellow:wlan default-trigger: phy0tx
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 <[email protected]>
---
.../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..32716c96b457 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 = "green:user1";
gpios = <&gpio6 3 GPIO_ACTIVE_LOW>;
linux,default-trigger = "heartbeat";
default-state = "off";
};

user-led1 {
- label = "USER-LED1";
+ label = "green:user2";
gpios = <&gpio5 1 GPIO_ACTIVE_LOW>;
linux,default-trigger = "mmc0";
default-state = "off";
};

user-led2 {
- label = "USER-LED2";
+ label = "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 = "green:user4";
gpios = <&gpio10 6 GPIO_ACTIVE_LOW>;
- linux,default-trigger = "cpu0";
+ linux,default-trigger = "none";
+ panic-indicator;
default-state = "off";
};
};
--
2.17.1


2018-10-29 09:46:00

by Manivannan Sadhasivam

[permalink] [raw]
Subject: [PATCH v3 4/7] arm64: dts: hisilicon: hikey960: Standardize LED labels and triggers

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

green:user1 default-trigger: heartbeat
green:user2 default-trigger: mmc0/disk-activity(onboard-storage)
green:user3 default-trigger: mmc1 (SD-card)
green:user4 default-trigger: none, panic-indicator
yellow:wlan default-trigger: phy0tx
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 <[email protected]>
---
.../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..46435466f1ab 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 = "green:user1";
/* gpio_150_user_led1 */
gpios = <&gpio18 6 0>;
linux,default-trigger = "heartbeat";
};

user_led2 {
- label = "user_led2";
+ label = "green:user2";
/* gpio_151_user_led2 */
gpios = <&gpio18 7 0>;
- linux,default-trigger = "mmc0";
+ linux,default-trigger = "none";
};

user_led3 {
- label = "user_led3";
+ label = "green:user3";
/* gpio_189_user_led3 */
gpios = <&gpio23 5 0>;
- default-state = "off";
+ linux,default-trigger = "mmc0";
};

user_led4 {
- label = "user_led4";
+ label = "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 = "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 = "blue:bt";
gpios = <&gpio25 7 0>;
/* gpio_207_user_led1 */
linux,default-trigger = "hci0-power";
--
2.17.1


2018-10-29 09:46:33

by Manivannan Sadhasivam

[permalink] [raw]
Subject: [PATCH v3 7/7] arm64: dts: qcom: apq8016-sbc: Standardize LED labels

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

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

So lets adopt the same for APQ8016 SBC (Dragonboard410c), which is
one of the 96Boards CE platform.

Signed-off-by: Manivannan Sadhasivam <[email protected]>
Acked-by: Amit Kucheria <[email protected]>
---
arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi b/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi
index 46feedf7c989..35f95154316b 100644
--- a/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi
+++ b/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi
@@ -300,28 +300,28 @@
compatible = "gpio-leds";

led@1 {
- label = "apq8016-sbc:green:user1";
+ label = "green:user1";
gpios = <&msmgpio 21 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "heartbeat";
default-state = "off";
};

led@2 {
- label = "apq8016-sbc:green:user2";
+ label = "green:user2";
gpios = <&msmgpio 120 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "mmc0";
default-state = "off";
};

led@3 {
- label = "apq8016-sbc:green:user3";
+ label = "green:user3";
gpios = <&pm8916_gpios 1 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "mmc1";
default-state = "off";
};

led@4 {
- label = "apq8016-sbc:green:user4";
+ label = "green:user4";
gpios = <&pm8916_gpios 2 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "none";
panic-indicator;
@@ -329,14 +329,14 @@
};

led@5 {
- label = "apq8016-sbc:yellow:wlan";
+ label = "yellow:wlan";
gpios = <&pm8916_mpps 2 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "phy0tx";
default-state = "off";
};

led@6 {
- label = "apq8016-sbc:blue:bt";
+ label = "blue:bt";
gpios = <&pm8916_mpps 3 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "bluetooth-power";
default-state = "off";
--
2.17.1


2018-10-31 13:39:56

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH v3 0/7] Standardize onboard LED support for 96Boards

On Mon, Oct 29, 2018 at 10:43 AM Manivannan Sadhasivam
<[email protected]> wrote:

> This patchset standardizes the onboard LEDs on 96Boards by maintaining
> common labels and triggers as below:
>
> green:user1 default-trigger: heartbeat
> green:user2 default-trigger: mmc0/disk-activity (onboard-storage)
> green:user3 default-trigger: mmc1 (SD card)
> green:user4 default-trigger: none, panic-indicator
> yellow:wlan default-trigger: phy0tx
> 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.

This series:
Reviewed-by: Linus Walleij <[email protected]>

It makes a lot of sense to try to unify the userspace ABI so we get
some kind of order here instead of trying to counteract it with
per-device kludges in userspace. It definately makes things better!

Yours,
Linus Walleij

2018-10-31 21:18:30

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH v3 0/7] Standardize onboard LED support for 96Boards

On Wed, Oct 31, 2018 at 4:47 PM Michal Simek <[email protected]> wrote:

> No doubt about it that this is good. If this is there from day 1 all will be good.
> I am just saying that we are all the time
> saying that we shouldn't break userspace. Right now if there is single application
> which uses existing names we are breaking it.

Yeah that's the problem, the approach is usually that if a tree falls
in the forest and noone is there to hear it, then it doesn't make a
sound.

But we can't assume someone is there as the safe default either.

I'd say apply it and see what happens, people are supposed to test.

Yours,
Linus Walleij

2018-11-01 10:50:20

by Heiko Stuebner

[permalink] [raw]
Subject: Re: [PATCH v3 0/7] Standardize onboard LED support for 96Boards

Am Mittwoch, 31. Oktober 2018, 22:17:29 CET schrieb Linus Walleij:
> On Wed, Oct 31, 2018 at 4:47 PM Michal Simek <[email protected]> wrote:
> > No doubt about it that this is good. If this is there from day 1 all will
> > be good. I am just saying that we are all the time
> > saying that we shouldn't break userspace. Right now if there is single
> > application which uses existing names we are breaking it.
>
> Yeah that's the problem, the approach is usually that if a tree falls
> in the forest and noone is there to hear it, then it doesn't make a
> sound.
>
> But we can't assume someone is there as the safe default either.
>
> I'd say apply it and see what happens, people are supposed to test.

At least for the Rockchip boards I'm somewhat confident, that they should
be new enough to not have anybody building cludges - especially as I think
LEDs might not be the most interesting device on such boards :-) .

So while I can apply the Rockchip patches, I'm still hoping for some
kind of consensus beforehand, least we roll it back after the fact ;-) .

Heiko



2018-11-29 15:43:54

by Wei Xu

[permalink] [raw]
Subject: Re: [PATCH v3 0/7] Standardize onboard LED support for 96Boards

Hi Manivannan,

On 2018/10/31 13:38, Linus Walleij wrote:
> On Mon, Oct 29, 2018 at 10:43 AM Manivannan Sadhasivam
> <[email protected]> wrote:
>
>> This patchset standardizes the onboard LEDs on 96Boards by maintaining
>> common labels and triggers as below:
>>
>> green:user1 default-trigger: heartbeat
>> green:user2 default-trigger: mmc0/disk-activity (onboard-storage)
>> green:user3 default-trigger: mmc1 (SD card)
>> green:user4 default-trigger: none, panic-indicator
>> yellow:wlan default-trigger: phy0tx
>> 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.
>
> This series:
> Reviewed-by: Linus Walleij <[email protected]>
>
> It makes a lot of sense to try to unify the userspace ABI so we get
> some kind of order here instead of trying to counteract it with
> per-device kludges in userspace. It definately makes things better!
>
> Yours,
> Linus Walleij
>
> .
>

Applied hisilicon part(patch 3,4 and 5) to the hisilicon soc dt tree.
Thanks!

Best Regards,
Wei


2018-12-11 19:13:05

by Heiko Stuebner

[permalink] [raw]
Subject: Re: [PATCH v3 1/7] arm64: dts: rockchip: ficus: Add on-board LED support

Am Montag, 29. Oktober 2018, 10:42:39 CET schrieb Manivannan Sadhasivam:
> Add on-board LED support for Ficus board based on the following
> standard used by other 96Boards:
>
> red:user1 default-trigger: heartbeat
> red:user2 default-trigger: mmc0/disk-activity (onboard-storage)
> red:user3 default-trigger: mmc1 (SD-card)
> red:user4 default-trigger: none, panic-indicator
> red:wlan default-trigger: phy0tx
> red:bt default-trigger: hci0-power
>
> Signed-off-by: Manivannan Sadhasivam <[email protected]>

applied for 4.21

Thanks
Heiko



2018-12-11 19:13:16

by Heiko Stuebner

[permalink] [raw]
Subject: Re: [PATCH v3 2/7] arm64: dts: rockchip: rock960: Add on-board LED support

Am Montag, 29. Oktober 2018, 10:42:40 CET schrieb Manivannan Sadhasivam:
> Add on-board LED support for Rock960 board based on the following
> standard used by rest of the 96Boards:
>
> green:user1 default-trigger: heartbeat
> green:user2 default-trigger: mmc0/disk-activity(onboard-storage)
> green:user3 default-trigger: mmc1 (SD-card)
> green:user4 default-trigger: none, panic-indicator
> yellow:wlan default-trigger: phy0tx
> blue:bt default-trigger: hci0-power
>
> Signed-off-by: Manivannan Sadhasivam <[email protected]>

applied for 4.21

Thanks
Heiko



2018-12-21 08:38:47

by Manivannan Sadhasivam

[permalink] [raw]
Subject: Re: [PATCH v3 7/7] arm64: dts: qcom: apq8016-sbc: Standardize LED labels

On Mon, Oct 29, 2018 at 03:12:45PM +0530, Manivannan Sadhasivam wrote:
> For all 96Boards, the following standard is used for onboard LEDs.
>
> green:user1 default-trigger: heartbeat
> green:user2 default-trigger: mmc0/disk-activity(onboard-storage)
> green:user3 default-trigger: mmc1 (SD-card)
> green:user4 default-trigger: none, panic-indicator
> yellow:wlan default-trigger: phy0tx
> blue:bt default-trigger: hci0-power
>
> So lets adopt the same for APQ8016 SBC (Dragonboard410c), which is
> one of the 96Boards CE platform.
>

Hello,

Any update on this patch?

Regards,
Mani

> Signed-off-by: Manivannan Sadhasivam <[email protected]>
> Acked-by: Amit Kucheria <[email protected]>
> ---
> arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi b/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi
> index 46feedf7c989..35f95154316b 100644
> --- a/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi
> +++ b/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi
> @@ -300,28 +300,28 @@
> compatible = "gpio-leds";
>
> led@1 {
> - label = "apq8016-sbc:green:user1";
> + label = "green:user1";
> gpios = <&msmgpio 21 GPIO_ACTIVE_HIGH>;
> linux,default-trigger = "heartbeat";
> default-state = "off";
> };
>
> led@2 {
> - label = "apq8016-sbc:green:user2";
> + label = "green:user2";
> gpios = <&msmgpio 120 GPIO_ACTIVE_HIGH>;
> linux,default-trigger = "mmc0";
> default-state = "off";
> };
>
> led@3 {
> - label = "apq8016-sbc:green:user3";
> + label = "green:user3";
> gpios = <&pm8916_gpios 1 GPIO_ACTIVE_HIGH>;
> linux,default-trigger = "mmc1";
> default-state = "off";
> };
>
> led@4 {
> - label = "apq8016-sbc:green:user4";
> + label = "green:user4";
> gpios = <&pm8916_gpios 2 GPIO_ACTIVE_HIGH>;
> linux,default-trigger = "none";
> panic-indicator;
> @@ -329,14 +329,14 @@
> };
>
> led@5 {
> - label = "apq8016-sbc:yellow:wlan";
> + label = "yellow:wlan";
> gpios = <&pm8916_mpps 2 GPIO_ACTIVE_HIGH>;
> linux,default-trigger = "phy0tx";
> default-state = "off";
> };
>
> led@6 {
> - label = "apq8016-sbc:blue:bt";
> + label = "blue:bt";
> gpios = <&pm8916_mpps 3 GPIO_ACTIVE_HIGH>;
> linux,default-trigger = "bluetooth-power";
> default-state = "off";
> --
> 2.17.1
>

2018-12-21 08:59:41

by Michal Simek

[permalink] [raw]
Subject: Re: [PATCH v3 6/7] arm64: dts: xilinx: ultra96: Standardize LED labels and triggers

On 21. 12. 18 3:37, Manivannan Sadhasivam wrote:
> On Mon, Oct 29, 2018 at 03:12:44PM +0530, Manivannan Sadhasivam wrote:
>> For all 96Boards, the following standard is used for onboard LEDs.
>>
>> green:user1 default-trigger: heartbeat
>> green:user2 default-trigger: mmc0/disk-activity(onboard-storage)
>> green:user3 default-trigger: mmc1 (SD-card)
>> green:user4 default-trigger: none, panic-indicator
>> yellow:wlan default-trigger: phy0tx
>> 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.
>>
>
> Hello,
>
> Any update on this patch?

I am still waiting for reaction from Rob.
We are keep trying to keep backward compatibility and this patch is
breaking it that's why I want to know DT guys reaction on this change.

Thanks,
Michal

2018-12-21 13:43:20

by Manivannan Sadhasivam

[permalink] [raw]
Subject: Re: [PATCH v3 6/7] arm64: dts: xilinx: ultra96: Standardize LED labels and triggers

On Mon, Oct 29, 2018 at 03:12:44PM +0530, Manivannan Sadhasivam wrote:
> For all 96Boards, the following standard is used for onboard LEDs.
>
> green:user1 default-trigger: heartbeat
> green:user2 default-trigger: mmc0/disk-activity(onboard-storage)
> green:user3 default-trigger: mmc1 (SD-card)
> green:user4 default-trigger: none, panic-indicator
> yellow:wlan default-trigger: phy0tx
> 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.
>

Hello,

Any update on this patch?

Regards,
Mani

> Signed-off-by: Manivannan Sadhasivam <[email protected]>
> ---
> 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..c08a8753215b 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 = "green:user1";
> gpios = <&gpio 20 GPIO_ACTIVE_HIGH>;
> linux,default-trigger = "heartbeat";
> };
>
> ds3 {
> - label = "ds3";
> + label = "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 = "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 = "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
>

2019-01-24 16:51:41

by Rob Herring

[permalink] [raw]
Subject: Re: [PATCH v3 6/7] arm64: dts: xilinx: ultra96: Standardize LED labels and triggers

On Fri, Dec 21, 2018 at 12:51 AM Michal Simek <[email protected]> wrote:
>
> On 21. 12. 18 3:37, Manivannan Sadhasivam wrote:
> > On Mon, Oct 29, 2018 at 03:12:44PM +0530, Manivannan Sadhasivam wrote:
> >> For all 96Boards, the following standard is used for onboard LEDs.
> >>
> >> green:user1 default-trigger: heartbeat
> >> green:user2 default-trigger: mmc0/disk-activity(onboard-storage)
> >> green:user3 default-trigger: mmc1 (SD-card)
> >> green:user4 default-trigger: none, panic-indicator
> >> yellow:wlan default-trigger: phy0tx
> >> 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.
> >>
> >
> > Hello,
> >
> > Any update on this patch?
>
> I am still waiting for reaction from Rob.
> We are keep trying to keep backward compatibility and this patch is
> breaking it that's why I want to know DT guys reaction on this change.

dts changes and backwards compatibility are ultimately up to the
platform maintainers. Your users can yell at you if they care. I only
ask that changes that break compatibility are documented as doing so.

Personally, I'm in favor of this change. I'd rather seem uniformity
across boards and this is just a dev board and LED functions won't
affect booting.

Rob

2019-01-29 13:19:38

by Michal Simek

[permalink] [raw]
Subject: Re: [PATCH v3 6/7] arm64: dts: xilinx: ultra96: Standardize LED labels and triggers

On 24. 01. 19 17:49, Rob Herring wrote:
> On Fri, Dec 21, 2018 at 12:51 AM Michal Simek <[email protected]> wrote:
>>
>> On 21. 12. 18 3:37, Manivannan Sadhasivam wrote:
>>> On Mon, Oct 29, 2018 at 03:12:44PM +0530, Manivannan Sadhasivam wrote:
>>>> For all 96Boards, the following standard is used for onboard LEDs.
>>>>
>>>> green:user1 default-trigger: heartbeat
>>>> green:user2 default-trigger: mmc0/disk-activity(onboard-storage)
>>>> green:user3 default-trigger: mmc1 (SD-card)
>>>> green:user4 default-trigger: none, panic-indicator
>>>> yellow:wlan default-trigger: phy0tx
>>>> 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.
>>>>
>>>
>>> Hello,
>>>
>>> Any update on this patch?
>>
>> I am still waiting for reaction from Rob.
>> We are keep trying to keep backward compatibility and this patch is
>> breaking it that's why I want to know DT guys reaction on this change.
>
> dts changes and backwards compatibility are ultimately up to the
> platform maintainers. Your users can yell at you if they care. I only
> ask that changes that break compatibility are documented as doing so.
>
> Personally, I'm in favor of this change. I'd rather seem uniformity
> across boards and this is just a dev board and LED functions won't
> affect booting.

Ok.

Then please fix the patch and do it in a way

label = "green:user1"; /* ds2 */

ds2 reflects name on schematics.

in ds4 case default trigger is changes to mmc1. It suggests sd/emmc but
on ultra96 it is sd slot and wifi on second slot.

ds5 - linux,default-trigger = "none"; looks weird. None trigger should
be simply ensured by removing that line.

Thanks,
Michal

2019-02-05 19:06:41

by Nicolas Dechesne

[permalink] [raw]
Subject: Re: [PATCH v3 7/7] arm64: dts: qcom: apq8016-sbc: Standardize LED labels

Hey Mani,

thanks for sending this out, it should have been just like that in the
first place ;)

On Fri, Dec 21, 2018 at 3:36 AM Manivannan Sadhasivam
<[email protected]> wrote:
>
> On Mon, Oct 29, 2018 at 03:12:45PM +0530, Manivannan Sadhasivam wrote:
> > For all 96Boards, the following standard is used for onboard LEDs.
> >
> > green:user1 default-trigger: heartbeat
> > green:user2 default-trigger: mmc0/disk-activity(onboard-storage)
> > green:user3 default-trigger: mmc1 (SD-card)
> > green:user4 default-trigger: none, panic-indicator
> > yellow:wlan default-trigger: phy0tx
> > blue:bt default-trigger: hci0-power
> >
> > So lets adopt the same for APQ8016 SBC (Dragonboard410c), which is
> > one of the 96Boards CE platform.
> >
>
> Hello,
>
> Any update on this patch?

Reviewed-by: Nicolas Dechesne <[email protected]>

>
> Regards,
> Mani
>
> > Signed-off-by: Manivannan Sadhasivam <[email protected]>
> > Acked-by: Amit Kucheria <[email protected]>
> > ---
> > arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi | 12 ++++++------
> > 1 file changed, 6 insertions(+), 6 deletions(-)
> >
> > diff --git a/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi b/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi
> > index 46feedf7c989..35f95154316b 100644
> > --- a/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi
> > +++ b/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi
> > @@ -300,28 +300,28 @@
> > compatible = "gpio-leds";
> >
> > led@1 {
> > - label = "apq8016-sbc:green:user1";
> > + label = "green:user1";
> > gpios = <&msmgpio 21 GPIO_ACTIVE_HIGH>;
> > linux,default-trigger = "heartbeat";
> > default-state = "off";
> > };
> >
> > led@2 {
> > - label = "apq8016-sbc:green:user2";
> > + label = "green:user2";
> > gpios = <&msmgpio 120 GPIO_ACTIVE_HIGH>;
> > linux,default-trigger = "mmc0";
> > default-state = "off";
> > };
> >
> > led@3 {
> > - label = "apq8016-sbc:green:user3";
> > + label = "green:user3";
> > gpios = <&pm8916_gpios 1 GPIO_ACTIVE_HIGH>;
> > linux,default-trigger = "mmc1";
> > default-state = "off";
> > };
> >
> > led@4 {
> > - label = "apq8016-sbc:green:user4";
> > + label = "green:user4";
> > gpios = <&pm8916_gpios 2 GPIO_ACTIVE_HIGH>;
> > linux,default-trigger = "none";
> > panic-indicator;
> > @@ -329,14 +329,14 @@
> > };
> >
> > led@5 {
> > - label = "apq8016-sbc:yellow:wlan";
> > + label = "yellow:wlan";
> > gpios = <&pm8916_mpps 2 GPIO_ACTIVE_HIGH>;
> > linux,default-trigger = "phy0tx";
> > default-state = "off";
> > };
> >
> > led@6 {
> > - label = "apq8016-sbc:blue:bt";
> > + label = "blue:bt";
> > gpios = <&pm8916_mpps 3 GPIO_ACTIVE_HIGH>;
> > linux,default-trigger = "bluetooth-power";
> > default-state = "off";
> > --
> > 2.17.1
> >

2019-02-05 20:00:21

by Bjorn Andersson

[permalink] [raw]
Subject: Re: [PATCH v3 7/7] arm64: dts: qcom: apq8016-sbc: Standardize LED labels

On Tue 05 Feb 11:00 PST 2019, Nicolas Dechesne wrote:

> Hey Mani,
>
> thanks for sending this out, it should have been just like that in the
> first place ;)
>

Thanks Nico for the confirmation, I will queue this for v5.2

Regards,
Bjorn

> On Fri, Dec 21, 2018 at 3:36 AM Manivannan Sadhasivam
> <[email protected]> wrote:
> >
> > On Mon, Oct 29, 2018 at 03:12:45PM +0530, Manivannan Sadhasivam wrote:
> > > For all 96Boards, the following standard is used for onboard LEDs.
> > >
> > > green:user1 default-trigger: heartbeat
> > > green:user2 default-trigger: mmc0/disk-activity(onboard-storage)
> > > green:user3 default-trigger: mmc1 (SD-card)
> > > green:user4 default-trigger: none, panic-indicator
> > > yellow:wlan default-trigger: phy0tx
> > > blue:bt default-trigger: hci0-power
> > >
> > > So lets adopt the same for APQ8016 SBC (Dragonboard410c), which is
> > > one of the 96Boards CE platform.
> > >
> >
> > Hello,
> >
> > Any update on this patch?
>
> Reviewed-by: Nicolas Dechesne <[email protected]>
>
> >
> > Regards,
> > Mani
> >
> > > Signed-off-by: Manivannan Sadhasivam <[email protected]>
> > > Acked-by: Amit Kucheria <[email protected]>
> > > ---
> > > arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi | 12 ++++++------
> > > 1 file changed, 6 insertions(+), 6 deletions(-)
> > >
> > > diff --git a/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi b/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi
> > > index 46feedf7c989..35f95154316b 100644
> > > --- a/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi
> > > +++ b/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi
> > > @@ -300,28 +300,28 @@
> > > compatible = "gpio-leds";
> > >
> > > led@1 {
> > > - label = "apq8016-sbc:green:user1";
> > > + label = "green:user1";
> > > gpios = <&msmgpio 21 GPIO_ACTIVE_HIGH>;
> > > linux,default-trigger = "heartbeat";
> > > default-state = "off";
> > > };
> > >
> > > led@2 {
> > > - label = "apq8016-sbc:green:user2";
> > > + label = "green:user2";
> > > gpios = <&msmgpio 120 GPIO_ACTIVE_HIGH>;
> > > linux,default-trigger = "mmc0";
> > > default-state = "off";
> > > };
> > >
> > > led@3 {
> > > - label = "apq8016-sbc:green:user3";
> > > + label = "green:user3";
> > > gpios = <&pm8916_gpios 1 GPIO_ACTIVE_HIGH>;
> > > linux,default-trigger = "mmc1";
> > > default-state = "off";
> > > };
> > >
> > > led@4 {
> > > - label = "apq8016-sbc:green:user4";
> > > + label = "green:user4";
> > > gpios = <&pm8916_gpios 2 GPIO_ACTIVE_HIGH>;
> > > linux,default-trigger = "none";
> > > panic-indicator;
> > > @@ -329,14 +329,14 @@
> > > };
> > >
> > > led@5 {
> > > - label = "apq8016-sbc:yellow:wlan";
> > > + label = "yellow:wlan";
> > > gpios = <&pm8916_mpps 2 GPIO_ACTIVE_HIGH>;
> > > linux,default-trigger = "phy0tx";
> > > default-state = "off";
> > > };
> > >
> > > led@6 {
> > > - label = "apq8016-sbc:blue:bt";
> > > + label = "blue:bt";
> > > gpios = <&pm8916_mpps 3 GPIO_ACTIVE_HIGH>;
> > > linux,default-trigger = "bluetooth-power";
> > > default-state = "off";
> > > --
> > > 2.17.1
> > >