[PATCH 4/7] ARM: dts: aspeed: mtmitchell: Add LEDs

Chanh Nguyen posted 7 patches 2 years, 3 months ago
There is a newer version of this series
[PATCH 4/7] ARM: dts: aspeed: mtmitchell: Add LEDs
Posted by Chanh Nguyen 2 years, 3 months ago
Use gpio-leds to configure GPIOW5 to GPIO_ACTIVE_HIGH and
GPIO_TRANSITORY flags as a bmc ready led. The GPIOW5 pin
is reset when watchdog timeout occurs.

Configure the GPIOS3 to GPIO_ACTIVE_HIGH as an identify led.

Signed-off-by: Chanh Nguyen <chanh@os.amperecomputing.com>
---
 .../dts/aspeed/aspeed-bmc-ampere-mtmitchell.dts     | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/arch/arm/boot/dts/aspeed/aspeed-bmc-ampere-mtmitchell.dts b/arch/arm/boot/dts/aspeed/aspeed-bmc-ampere-mtmitchell.dts
index b7c4f7cfad07..88693c2b2dbe 100644
--- a/arch/arm/boot/dts/aspeed/aspeed-bmc-ampere-mtmitchell.dts
+++ b/arch/arm/boot/dts/aspeed/aspeed-bmc-ampere-mtmitchell.dts
@@ -51,6 +51,19 @@
 		};
 	};
 
+	leds {
+		compatible = "gpio-leds";
+
+		bmc-ready {
+			gpios = <&gpio0 ASPEED_GPIO(W, 5) (GPIO_ACTIVE_HIGH |
+			 GPIO_TRANSITORY)>;
+		};
+
+		identify {
+			gpios = <&gpio0 ASPEED_GPIO(S, 3) GPIO_ACTIVE_HIGH>;
+		};
+	};
+
 	voltage_mon_reg: voltage-mon-regulator {
 		compatible = "regulator-fixed";
 		regulator-name = "ltc2497_reg";
-- 
2.17.1
Re: [PATCH 4/7] ARM: dts: aspeed: mtmitchell: Add LEDs
Posted by Krzysztof Kozlowski 2 years, 2 months ago
On 05/10/2023 05:55, Chanh Nguyen wrote:
> Use gpio-leds to configure GPIOW5 to GPIO_ACTIVE_HIGH and
> GPIO_TRANSITORY flags as a bmc ready led. The GPIOW5 pin
> is reset when watchdog timeout occurs.
> 
> Configure the GPIOS3 to GPIO_ACTIVE_HIGH as an identify led.
> 
> Signed-off-by: Chanh Nguyen <chanh@os.amperecomputing.com>
> ---
>  .../dts/aspeed/aspeed-bmc-ampere-mtmitchell.dts     | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/aspeed/aspeed-bmc-ampere-mtmitchell.dts b/arch/arm/boot/dts/aspeed/aspeed-bmc-ampere-mtmitchell.dts
> index b7c4f7cfad07..88693c2b2dbe 100644
> --- a/arch/arm/boot/dts/aspeed/aspeed-bmc-ampere-mtmitchell.dts
> +++ b/arch/arm/boot/dts/aspeed/aspeed-bmc-ampere-mtmitchell.dts
> @@ -51,6 +51,19 @@
>  		};
>  	};
>  
> +	leds {
> +		compatible = "gpio-leds";
> +
> +		bmc-ready {

Missing led name.

It does not look like you tested the DTS against bindings. Please run
`make dtbs_check W=1` (see
Documentation/devicetree/bindings/writing-schema.rst or
https://www.linaro.org/blog/tips-and-tricks-for-validating-devicetree-sources-with-the-devicetree-schema/
for instructions).

Best regards,
Krzysztof
Re: [PATCH 4/7] ARM: dts: aspeed: mtmitchell: Add LEDs
Posted by Chanh Nguyen 2 years, 2 months ago

On 05/10/2023 14:31, Krzysztof Kozlowski wrote:
> On 05/10/2023 05:55, Chanh Nguyen wrote:
>> Use gpio-leds to configure GPIOW5 to GPIO_ACTIVE_HIGH and
>> GPIO_TRANSITORY flags as a bmc ready led. The GPIOW5 pin
>> is reset when watchdog timeout occurs.
>>
>> Configure the GPIOS3 to GPIO_ACTIVE_HIGH as an identify led.
>>
>> Signed-off-by: Chanh Nguyen <chanh@os.amperecomputing.com>
>> ---
>>   .../dts/aspeed/aspeed-bmc-ampere-mtmitchell.dts     | 13 +++++++++++++
>>   1 file changed, 13 insertions(+)
>>
>> diff --git a/arch/arm/boot/dts/aspeed/aspeed-bmc-ampere-mtmitchell.dts b/arch/arm/boot/dts/aspeed/aspeed-bmc-ampere-mtmitchell.dts
>> index b7c4f7cfad07..88693c2b2dbe 100644
>> --- a/arch/arm/boot/dts/aspeed/aspeed-bmc-ampere-mtmitchell.dts
>> +++ b/arch/arm/boot/dts/aspeed/aspeed-bmc-ampere-mtmitchell.dts
>> @@ -51,6 +51,19 @@
>>   		};
>>   	};
>>   
>> +	leds {
>> +		compatible = "gpio-leds";
>> +
>> +		bmc-ready {
> 
> Missing led name.
> 
> It does not look like you tested the DTS against bindings. Please run
> `make dtbs_check W=1` (see
> Documentation/devicetree/bindings/writing-schema.rst or
> https://www.linaro.org/blog/tips-and-tricks-for-validating-devicetree-sources-with-the-devicetree-schema/
> for instructions).
> 
> Best regards,
> Krzysztof
> 

Thank Krzysztof! I'll test the DTS against bindings and update it in 
patch series v2.