From patchwork Mon Sep 9 10:54:18 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: 13796639 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 F0B8CECE579 for ; Mon, 9 Sep 2024 10:59:08 +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=nzg41NePDkge44MLYYd7mKZW1SvxZnqJAzXlq5UwtC0=; b=G/atmVCuJJXC9vl3PlLPwELLPm ntRpCTZpKIyWOd6BnP2pA0OA1XC/kQxF+yPuKRUsphArkv/0OcYW4T/4Eu7EZdAFbJoSRhtPjrWXM TLCBrr6ss9s8Wr0v7C+X7hWQMHCXKaIaBgsWqWbdOP+K6VppRPUuou7Ze10ntH7einrWV5kmzZRP3 M3QqSnKZgceGoF4qfIoslyWJpBDJ1v5Mdt0zEIke2UKieN4DV78toqNW2UWaR2gdjCSVBXoxtIJTI g2mFBXp/OaRRMn3w9TaKNxtkrKCSm8KahgqpCgAf8K0gGF/2voXQYfYMLyfgY7CTIar/kfARVIWKU BQouu5iw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1snc6k-00000001aIO-2LCA; Mon, 09 Sep 2024 10:58:58 +0000 Received: from mail-tyzapc01on20628.outbound.protection.outlook.com ([2a01:111:f403:2011::628] helo=APC01-TYZ-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1snc2b-00000001Z9Y-23mW for linux-arm-kernel@lists.infradead.org; Mon, 09 Sep 2024 10:54:42 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=mOQK57rp/aIY2gRsVGI5OELoY0CqcW/I6t9p366esDDC6RkY54Q6brLozeiYHl6L06keI9kJiJSZvNw5aHh7/SLwijsbRmFPLPw/CAk5IcS+5AZ7ijRkMzN8aYN0p49RpPijpFR1zCWkmkan8FTQUpcwuBcS5WzoGKuO4hJhAwtzmuukma0YDC+4xkeSm/qUUJBD8fqy7SRcd//SGUTryQqx5ubr3m1XmmIOhw+H7fVDlXKQaO95X+9Y+VOwAN9R5X6/ZMEBnVyiWwzE5tu5006+z4KJ6vplscoFzvnSuykeZTbGachQdDPVX54WMNIj0MSHqG919TTjmo4Y25Te0Q== 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=nzg41NePDkge44MLYYd7mKZW1SvxZnqJAzXlq5UwtC0=; b=rWkeW1+y3yJGmxz0AXdi8Afm24zRnjwYpGONEHmCqqx/W4Yv+YqBo7OvE5iKyd1vTWY+u6uTZR2MMBkUnRTDCcr3NZTRHRcLS4KFKIILsmm+e9Uyq40aLATCc81+B6w07PLrHNtT/NCQAmetFwJJNSIZFPnWcTjziSmoFNLQb42c8G9VAvz8cuBq6NmyydG8Kvrq6En4AdG5c0tseAKS/nR8A4+fU03N4mAG+nWXvem60qyGckE/qQNpYS6SvSeT9AphUpxtGSVptCGRsJCR+Ja5bZZHvZXDyfmDYmNkEH0UQs3oDvUz7pXsfFubmaHluLTMukm7PbCSbF1W3LHOUA== 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=nzg41NePDkge44MLYYd7mKZW1SvxZnqJAzXlq5UwtC0=; b=nlznQLXvjP6UYlIekV2HiMtQo8/LkWZVCzanLXdSIkjlNlzjMx4d6UXCQfcz64T5piUz2spN1rFsCf1/oH9cty349j64DLbR6378oaQz25SKASjqKSoye9+H+v9EgE91rhjjg/IcY81GQK0sOaVWeZMuRjgYG78y5O7gx6zjHSya5H9QUciX4LHfROIT2sjac6VrMSR5h2qIj+vsIaUwsVY1Hbk8e/ykSAk9zcA8QGWTBx6vHgLc3E6n9dqs7wfj7x0VM0CKo7JQBERoOAhq5w7OHWsr3YjBLcvwzt3iIWYTdT6L11N7uGgZzyae+Dh1Ov7hoxMKPErKC2FS1Fgrgw== Received: from SG2PR06CA0212.apcprd06.prod.outlook.com (2603:1096:4:68::20) by SEZPR04MB7339.apcprd04.prod.outlook.com (2603:1096:101:19d::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7939.23; Mon, 9 Sep 2024 10:54:31 +0000 Received: from HK2PEPF00006FB2.apcprd02.prod.outlook.com (2603:1096:4:68:cafe::f4) by SG2PR06CA0212.outlook.office365.com (2603:1096:4:68::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7939.23 via Frontend Transport; Mon, 9 Sep 2024 10:54:31 +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 HK2PEPF00006FB2.mail.protection.outlook.com (10.167.8.8) with Microsoft SMTP Server id 15.20.7918.13 via Frontend Transport; Mon, 9 Sep 2024 10:54:30 +0000 From: Delphine CC Chiu To: patrick@stwcx.xyz, Rob Herring , Krzysztof Kozlowski , Conor Dooley , Joel Stanley , Andrew Jeffery Cc: Ricky CX Wu , Delphine CC Chiu , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-aspeed@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: [PATCH v18 3/3] ARM: dts: aspeed: yosemite4: add fan led config Date: Mon, 9 Sep 2024 18:54:18 +0800 Message-Id: <20240909105420.441607-4-Delphine_CC_Chiu@wiwynn.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240909105420.441607-1-Delphine_CC_Chiu@wiwynn.com> References: <20240909105420.441607-1-Delphine_CC_Chiu@wiwynn.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: HK2PEPF00006FB2:EE_|SEZPR04MB7339:EE_ X-MS-Office365-Filtering-Correlation-Id: 5f388f8f-4435-40ec-fcda-08dcd0bdc862 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|376014|7416014|36860700013|82310400026; X-Microsoft-Antispam-Message-Info: 3nBnj19E940faTzbITKIseCdB6+ErvHVTTc5SAIMK3Gp4BXLhIqurxe1L0NMjdpm5wHWzb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LmZwtDWX3UGNfbiZAY2ztoiFuVOwJz3lcRh7H8488PKHDi0gVHBHSh3fyshkGY2Otso7Ya6vAPwa28r4lxw3LznQdUYMKDZ4/AXEfsq59Lis7vql829HpmV9GukIynCNXMRbtPVm1VuXN4Qpjvvvs7Lc6VTBrRfbL63YUjbspS4Y8E73bFBZnJB7RzrC0bpi00THaIq9q7f3iDM5tF/zSVIexoeUPaY7752i9TTKRdbkm5YNbDm5fzOcbBpdMTDEGVI63dVTJ/aNSWH2z8rc2a+pC28HOJY4yNYysdSE97MBAnSV2wxYQl7IkRT 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)(1800799024)(376014)(7416014)(36860700013)(82310400026);DIR:OUT;SFP:1101; X-OriginatorOrg: wiwynn.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Sep 2024 10:54:30.6750 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5f388f8f-4435-40ec-fcda-08dcd0bdc862 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: HK2PEPF00006FB2.apcprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEZPR04MB7339 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240909_035441_569834_6FF4E952 X-CRM114-Status: GOOD ( 10.31 ) 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 Signed-off-by: Delphine CC Chiu --- .../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 7898c4c94b9f..5399fe22e3ae 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 { @@ -840,7 +1013,7 @@ eeprom@52 { reg = <0x52>; }; - gpio@61 { + led_gpio1: gpio@61 { compatible = "nxp,pca9552"; reg = <0x61>; #address-cells = <1>; @@ -892,7 +1065,7 @@ eeprom@52 { reg = <0x52>; }; - gpio@61 { + led_gpio0: gpio@61 { compatible = "nxp,pca9552"; reg = <0x61>; #address-cells = <1>;