From patchwork Fri Sep 6 09:24:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Delphine CC Chiu X-Patchwork-Id: 13793742 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 011B5CE7AF8 for ; Fri, 6 Sep 2024 09:29:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type: Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-Id:Date :Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=1JYXMuufNP+1KFHLCDGDnx6vheVaZ9RhKwZf/5q2z1w=; b=JxULEjNaOzKywfITmNqZpuYf/C b57ESZdiCBHLOrVonVInzB6VGZ/DmiTHVtenKIEPGa+lAKlHAD+pf0XBWgKJ1vuJuBCpDelY7n1s1 rxZ8bqVwLaBIv2PQnkuuGcdQqVKPoq1GdBtdCaoINEQaiJpvU0fG5QvPHL5u/SomuuNEBXrepcZtj Ff879ZJYa9G6VB/reBggPLiqXWIOEVPsQ+BtvQn++HgK0MDm1Qd3rBdbRl+uYJNA14+Q7LSNeuqMz rGcBdhYlXpS5MTarJpxXlI1etquw/EyYBTBfTOmru7cLnJigvdRxy3gNJbpJRzSuPkv0mkba9A6F2 nAJ7C2+Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1smVH4-0000000BVqz-2NNW; Fri, 06 Sep 2024 09:29:02 +0000 Received: from mail-eastasiaazlp170100000.outbound.protection.outlook.com ([2a01:111:f403:c400::] helo=HK2PR02CU002.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1smVDF-0000000BUgc-28KG for linux-arm-kernel@lists.infradead.org; Fri, 06 Sep 2024 09:25:08 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=bcrJAlE+vCgtatPlHxecTQxJgcoTN84uymsT021U6OjqCTp3T5xSWu5KuCPOnjyJ9PJKRXY0+1Ujg6FF/Sb67v+a2kfecAzmma6GUArp4ZhiKPx9SFDQd8Yk5YYNIPe2GlFZMBKv3x1g5vOymh5odnQLP83KA3nAM8iwks3jYd23KqqWV4l3MONVQ2HUv1j/Z+1xcSyJ1nHcMP6vOUkh25uWI5retsuTZjcplh8nP7FrCPfi+PHDnRPWJeSftyI+X37Ep/EW8ue0i0Xa3qTdmeaAxI2XKZ6RIInOkXKkFFpzyXNhJRwUrjOX0Chkd2JAiUN7myyxRqCMVyd7NJfJMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=1JYXMuufNP+1KFHLCDGDnx6vheVaZ9RhKwZf/5q2z1w=; b=qyPnQfvEc3DRAku5FAD0Qc+dEZrky26v2CFl0z/+Rz+shvqmjQPPSyUqu2np8bzXKvTThkgwFwEKRWXJBMwwd7/3x0oQ40R8KkaJIX8O2htqiWed2dKMGq/okZzAX+j+PeyaVdH7GmLIMsXc5Teth+4kPq/ljylHjAUEv7anQfKCQmdj6Jh0+SM8ISrDwxHvZUKN4nzsMIbJsmeGtzC+WpiqkqxNdSvR7hBRQ83cpitoqCV24NVD/xQGJcUJWYi2dU1TD0OXfibS5r6cUZgJQEyeK/1zxvRVucuhbA+gafRXdhCyJaf8Qz/DUQGpe9a5wlArIwviOTdBHDVqp8mURw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=fail (sender ip is 211.20.1.79) smtp.rcpttodomain=stwcx.xyz smtp.mailfrom=wiwynn.com; dmarc=fail (p=quarantine sp=quarantine pct=100) action=quarantine header.from=wiwynn.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wiwynn.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=1JYXMuufNP+1KFHLCDGDnx6vheVaZ9RhKwZf/5q2z1w=; b=wIZq7F0OLjoeYgY674Ylz1+YHuHMxQegf8WvxzrFK7wRXAwWYU1K0YrgyuD71UV57CufT9ooRMkCrNgxKoTkI/g5Ad88mtiGgfgdGu8mEf0buZfS82BmZeI84UcgV5m4T/kK7XSfdO/I3W4TPKcIPH0YstRkrqVqecUeRyOmG781Q9kqVY1XZIRtx3bw987NJTZOyFJV2xeJApTMPZOghGWN8waBAa06O/IpiL6qlu9igpIGw0495qcfsQfYrJMwUvW0JSuN4b5JwF+GVzHwKtq19v+X+oa+A5SVlYC04Eo4VshG0A5e+isodithA8CW6m3ciu7agpa73CpG5tRrNA== Received: from SI1PR02CA0022.apcprd02.prod.outlook.com (2603:1096:4:1f4::16) by OSQPR04MB7958.apcprd04.prod.outlook.com (2603:1096:604:294::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7918.27; Fri, 6 Sep 2024 09:24:54 +0000 Received: from SG2PEPF000B66C9.apcprd03.prod.outlook.com (2603:1096:4:1f4:cafe::f8) by SI1PR02CA0022.outlook.office365.com (2603:1096:4:1f4::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7939.17 via Frontend Transport; Fri, 6 Sep 2024 09:24:53 +0000 X-MS-Exchange-Authentication-Results: spf=fail (sender IP is 211.20.1.79) smtp.mailfrom=wiwynn.com; dkim=none (message not signed) header.d=none;dmarc=fail action=quarantine header.from=wiwynn.com; Received-SPF: Fail (protection.outlook.com: domain of wiwynn.com does not designate 211.20.1.79 as permitted sender) receiver=protection.outlook.com; client-ip=211.20.1.79; helo=localhost.localdomain; Received: from localhost.localdomain (211.20.1.79) by SG2PEPF000B66C9.mail.protection.outlook.com (10.167.240.20) with Microsoft SMTP Server id 15.20.7918.13 via Frontend Transport; Fri, 6 Sep 2024 09:24:52 +0000 From: Delphine CC Chiu To: patrick@stwcx.xyz, Rob Herring , Krzysztof Kozlowski , Conor Dooley , Joel Stanley , Andrew Jeffery Cc: Ricky CX Wu , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-aspeed@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: [PATCH v16 3/3] ARM: dts: aspeed: yosemite4: add fan led config Date: Fri, 6 Sep 2024 17:24:37 +0800 Message-Id: <20240906092438.1047225-4-Delphine_CC_Chiu@wiwynn.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240906092438.1047225-1-Delphine_CC_Chiu@wiwynn.com> References: <20240906092438.1047225-1-Delphine_CC_Chiu@wiwynn.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SG2PEPF000B66C9:EE_|OSQPR04MB7958:EE_ X-MS-Office365-Filtering-Correlation-Id: 826a4673-ab51-4248-33f0-08dcce55c402 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|82310400026|7416014|1800799024|376014|36860700013; X-Microsoft-Antispam-Message-Info: jwG7dLiNm9ZCd6WWFh7c1EfGs1lpenvUAN/UotDK05MURPS5kdBppGX8N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BTbTHcFs0ssHWqOrPpVsW2LEsRRRVpBMFR9vLjZu+zChOJ1RT1S6/x1QwjyulLQ4V447blZGu/+h/aPKi4M3TOqrLo+yCXQkN2JcKYgrgYOV20D0dsuUrnjx9ERxhoEEvFB6TqGeoTHSMR9sePtT7JobmYcby4rMn0K3Smm6zTmrBMcqRq1sbVstKz1BcR45JcJRyLlRBDOURJxnr5uzEiKV6PxBbBNhtvvs2ZaCGOxu50v1vkV3DLtGxu6FRknp8UxUWh01b/6DpDec5O67qvMSauMWgI1VUSkAvfP3mdwcGIisDZlDYp/YCoIS3rUdBUpG/4+zbAC/1u6APEvoc3F X-Forefront-Antispam-Report: CIP:211.20.1.79;CTRY:TW;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:localhost.localdomain;PTR:211-20-1-79.hinet-ip.hinet.net;CAT:NONE;SFS:(13230040)(82310400026)(7416014)(1800799024)(376014)(36860700013);DIR:OUT;SFP:1101; X-OriginatorOrg: wiwynn.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Sep 2024 09:24:52.9538 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 826a4673-ab51-4248-33f0-08dcce55c402 X-MS-Exchange-CrossTenant-Id: da6e0628-fc83-4caf-9dd2-73061cbab167 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=da6e0628-fc83-4caf-9dd2-73061cbab167;Ip=[211.20.1.79];Helo=[localhost.localdomain] X-MS-Exchange-CrossTenant-AuthSource: SG2PEPF000B66C9.apcprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: OSQPR04MB7958 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240906_022505_719771_3AFEFE61 X-CRM114-Status: UNSURE ( 9.82 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Ricky CX Wu Set fan led config in yosemite4 DTS so that BMC could set different color LED according to the status of the Fan. Signed-off-by: Ricky CX Wu --- .../aspeed/aspeed-bmc-facebook-yosemite4.dts | 177 +++++++++++++++++- 1 file changed, 175 insertions(+), 2 deletions(-) diff --git a/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-yosemite4.dts b/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-yosemite4.dts index 9ddeccf650cd..6d64d87bf144 100644 --- a/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-yosemite4.dts +++ b/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-yosemite4.dts @@ -4,6 +4,7 @@ /dts-v1/; #include "aspeed-g6.dtsi" #include +#include #include #include @@ -57,6 +58,178 @@ iio-hwmon { <&adc0 4>, <&adc0 5>, <&adc0 6>, <&adc0 7>, <&adc1 0>, <&adc1 1>; }; + + leds { + compatible = "gpio-leds"; + + led-fan0-blue { + color = ; + retain-state-shutdown; + default-state = "on"; + gpios = <&led_gpio0 4 GPIO_ACTIVE_HIGH>; + }; + + led-fan0-amber { + color = ; + retain-state-shutdown; + default-state = "off"; + gpios = <&led_gpio0 5 GPIO_ACTIVE_HIGH>; + }; + + led-fan1-blue { + color = ; + retain-state-shutdown; + default-state = "on"; + gpios = <&led_gpio0 10 GPIO_ACTIVE_HIGH>; + }; + + led-fan1-amber { + color = ; + retain-state-shutdown; + default-state = "off"; + gpios = <&led_gpio0 11 GPIO_ACTIVE_HIGH>; + }; + + led-fan2-blue { + color = ; + retain-state-shutdown; + default-state = "on"; + gpios = <&led_gpio1 4 GPIO_ACTIVE_HIGH>; + }; + + led-fan2-amber { + color = ; + retain-state-shutdown; + default-state = "off"; + gpios = <&led_gpio1 5 GPIO_ACTIVE_HIGH>; + }; + + led-fan3-blue { + color = ; + retain-state-shutdown; + default-state = "on"; + gpios = <&led_gpio1 10 GPIO_ACTIVE_HIGH>; + }; + + led-fan3-amber { + color = ; + retain-state-shutdown; + default-state = "off"; + gpios = <&led_gpio1 11 GPIO_ACTIVE_HIGH>; + }; + + led-fan4-blue { + color = ; + retain-state-shutdown; + default-state = "on"; + gpios = <&led_gpio0 2 GPIO_ACTIVE_HIGH>; + }; + + led-fan4-amber { + color = ; + retain-state-shutdown; + default-state = "off"; + gpios = <&led_gpio0 3 GPIO_ACTIVE_HIGH>; + }; + + led-fan5-blue { + color = ; + retain-state-shutdown; + default-state = "on"; + gpios = <&led_gpio0 8 GPIO_ACTIVE_HIGH>; + }; + + led-fan5-amber { + color = ; + retain-state-shutdown; + default-state = "off"; + gpios = <&led_gpio0 9 GPIO_ACTIVE_HIGH>; + }; + + led-fan6-blue { + color = ; + retain-state-shutdown; + default-state = "on"; + gpios = <&led_gpio1 2 GPIO_ACTIVE_HIGH>; + }; + + led-fan6-amber { + color = ; + retain-state-shutdown; + default-state = "off"; + gpios = <&led_gpio1 3 GPIO_ACTIVE_HIGH>; + }; + + led-fan7-blue { + color = ; + retain-state-shutdown; + default-state = "on"; + gpios = <&led_gpio1 8 GPIO_ACTIVE_HIGH>; + }; + + led-fan7-amber { + color = ; + retain-state-shutdown; + default-state = "off"; + gpios = <&led_gpio1 9 GPIO_ACTIVE_HIGH>; + }; + + led-fan8-blue { + color = ; + retain-state-shutdown; + default-state = "on"; + gpios = <&led_gpio0 0 GPIO_ACTIVE_HIGH>; + }; + + led-fan8-amber { + color = ; + retain-state-shutdown; + default-state = "off"; + gpios = <&led_gpio0 1 GPIO_ACTIVE_HIGH>; + }; + + led-fan9-blue { + color = ; + retain-state-shutdown; + default-state = "on"; + gpios = <&led_gpio0 6 GPIO_ACTIVE_HIGH>; + }; + + led-fan9-amber { + color = ; + retain-state-shutdown; + default-state = "off"; + gpios = <&led_gpio0 7 GPIO_ACTIVE_HIGH>; + }; + + led-fan10-blue { + color = ; + retain-state-shutdown; + default-state = "on"; + gpios = <&led_gpio1 0 GPIO_ACTIVE_HIGH>; + }; + + led-fan10-amber { + color = ; + retain-state-shutdown; + default-state = "off"; + gpios = <&led_gpio1 1 GPIO_ACTIVE_HIGH>; + }; + + led-fan11-blue { + color = ; + retain-state-shutdown; + default-state = "on"; + gpios = <&led_gpio1 6 GPIO_ACTIVE_HIGH>; + }; + + led-fan11-amber { + color = ; + retain-state-shutdown; + default-state = "off"; + gpios = <&led_gpio1 7 GPIO_ACTIVE_HIGH>; + }; + }; }; &uart1 { @@ -822,7 +995,7 @@ eeprom@52 { reg = <0x52>; }; - gpio@61 { + led_gpio1: gpio@61 { compatible = "nxp,pca9552"; reg = <0x61>; #address-cells = <1>; @@ -874,7 +1047,7 @@ eeprom@52 { reg = <0x52>; }; - gpio@61 { + led_gpio0: gpio@61 { compatible = "nxp,pca9552"; reg = <0x61>; #address-cells = <1>;