From patchwork Mon Sep 11 01:44:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Delphine CC Chiu X-Patchwork-Id: 1832056 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=wiwynn.com header.i=@wiwynn.com header.a=rsa-sha256 header.s=selector2 header.b=wg5oIYeo; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=2404:9400:2:0:216:3eff:fee1:b9f1; helo=lists.ozlabs.org; envelope-from=openbmc-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=patchwork.ozlabs.org) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2404:9400:2:0:216:3eff:fee1:b9f1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RkV0S6xqyz1yhX for ; Mon, 11 Sep 2023 11:45:27 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=wiwynn.com header.i=@wiwynn.com header.a=rsa-sha256 header.s=selector2 header.b=wg5oIYeo; dkim-atps=neutral Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4RkV0Q3P4Jz3bdm for ; Mon, 11 Sep 2023 11:45:26 +1000 (AEST) X-Original-To: openbmc@lists.ozlabs.org Delivered-To: openbmc@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=wiwynn.com header.i=@wiwynn.com header.a=rsa-sha256 header.s=selector2 header.b=wg5oIYeo; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=wiwynn.com (client-ip=2a01:111:f400:feab::60b; helo=apc01-sg2-obe.outbound.protection.outlook.com; envelope-from=delphine_cc_chiu@wiwynn.com; receiver=lists.ozlabs.org) Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2060b.outbound.protection.outlook.com [IPv6:2a01:111:f400:feab::60b]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4RkV0004XWz2yPq for ; Mon, 11 Sep 2023 11:45:02 +1000 (AEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cqZcDvYpekmzqtypkbbZA4LCvQO4D41pE/68mvUTlUZvq0/Xsh0nggMyyg3Xr0iMj9XDptHOOiHR8T49eydsj+zeMR7Tyy8A99g/9eTLvesc0eU7WB98fD6GKBgSmBcbuexGMS/E4/hr3J+S1kw6IwglsRQ+gGOttvhMeBtqyOnovyVx/CSa9gX8+cDnMvQ1Ja5HvrtFJu/FlYJruL53sBNTI5KxIISnutKef2eV5bHbD1kbyXbu8WnP9YtX6cZ+j1oR7KUzhoIUaqBIeBeG2IiBEvs577wN2VRL12Sqiq932mjsBxuiUnkhDWvkBVjpWufwjYXen8naRp/z8xJAvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=1XKqgefudrMABioVXkEU9oU2IGFiv91uXSc9IuUuB/g=; b=NSe0rvKkjav7DHevJwy7JF+YV91jgRaslPCa7GaLqd5i8yMO/D6PFm2vamrHV81T5UZmeXgbbCpja1Cr+xTEDhe7SepUsqT01jwY6olc8UyuCaMRVfFgqZqkx3WiJjL9L0P4kee0Byr0eOwp+UB1uvmZa3HlOG88gP3NroQwxIapJXA6n+qMbXU/coygZ+MUrEyxVbKF3qDUl6GeeH3xvSv3lLmzrpR+RWyanwd51WmfDEnUTNDPMDehqGMYy+ijru7BVnHhbBc21Qt5vQ+Zk5olA+DXbbc+PmRKlFj9/vKGLMT/wcSL/4OVcW1BY4Ui0dnuCjs1DVY+UUjMjupwKQ== 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 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=1XKqgefudrMABioVXkEU9oU2IGFiv91uXSc9IuUuB/g=; b=wg5oIYeoykOXItgtxwEipvXNxQjBOTMk0qP92srR2nhu2yv7st/qFHPpOnQ0Wy+0lB1HSQot7Idnf6uNrsguwv4a0mpCRSjt6Iwzn/7e1x7SMXRaLfUi7vZL8a9fw7IbzbHzOBYxcpggi3SCJHrL9U+kZg3MiTWJEjxDMJyOCLbg2u/pDD3PTidmuJOJdPjYG0MP5nKfeJ8zUTHyq32FApZMkO1BJZvQTBh5G4RFzwOnP509NVo2STcMySOWYXlyDXYBmZWTS8kJcpFiHpHi4gPNMvOZDyNT+tgilZQ/F7bwN6xqXxdV4VqKk9NrzLGRsZkhgJ9kAzMQSyzOhdjPQA== Received: from SG2PR03CA0116.apcprd03.prod.outlook.com (2603:1096:4:91::20) by SEZPR04MB6623.apcprd04.prod.outlook.com (2603:1096:101:92::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6768.31; Mon, 11 Sep 2023 01:44:42 +0000 Received: from SG1PEPF000082E3.apcprd02.prod.outlook.com (2603:1096:4:91:cafe::97) by SG2PR03CA0116.outlook.office365.com (2603:1096:4:91::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6792.15 via Frontend Transport; Mon, 11 Sep 2023 01:44:42 +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 SG1PEPF000082E3.mail.protection.outlook.com (10.167.240.6) with Microsoft SMTP Server id 15.20.6792.16 via Frontend Transport; Mon, 11 Sep 2023 01:44:42 +0000 From: Delphine CC Chiu To: patrick@stwcx.xyz, joel@jms.id.au, openbmc@lists.ozlabs.org Subject: [PATCH linux dev-6.1 v2 1/2] ARM: dts: aspeed: yosemite4: Add i2c-mux/eeprom/pmbus devices and fan controller config Date: Mon, 11 Sep 2023 09:44:35 +0800 Message-Id: <20230911014436.2036176-2-Delphine_CC_Chiu@wiwynn.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230911014436.2036176-1-Delphine_CC_Chiu@wiwynn.com> References: <20230911014436.2036176-1-Delphine_CC_Chiu@wiwynn.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SG1PEPF000082E3:EE_|SEZPR04MB6623:EE_ X-MS-Office365-Filtering-Correlation-Id: 56149676-b652-4e82-141a-08dbb268ab6a X-MS-Exchange-AtpMessageProperties: SA X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: XzkEIUfxH9pg7887F9izUx1p8cozP1zYPsdzWlkDw60qgdnF2fT+493QgHGTQQbxvLpJREqfTSTwU/aE8DLd7mEUtRTsuTdr4Sxb/0F9GZg6F8qT2bbNPOs3Ax5h1qBNg3FMUvgjM6eT4v22Bv9ZhYLLRmzKis5vTwgKpP+2hsJeICOxR1oOH7YXQRjykkcyg0S2htGA5yNejXdH01WCfiQKp8D8NprDn8ybTCMls7tVO8SpoLFvgAX1JZy9R3oX4X+S8PibZzbdEKqKlGkzbNg9zbIcHfkxOjLjPs9EaAYhxMZGw8Hee31Ke9H/KMTmqMh7QCSaqBzkCgWrljNi8kAOenGcm+4Jua0eLi2h4Ppd0g72RUPe59pcj0cfUwwqsv+aB4cP9YEnnEeucGBvVhQPTs5bA7o0gGIHLJriowvjYWJ98MzEToEemBQ6ppm7JEP+hd0Pa3JMu9pOXoaWQxu25bOQ1Oj4kqcQ6GpZ+5a3Mn0xK7k+E5W6USwJqLYsXWvBFBX/CWAxgyVq6U3rTDif6zcPtqHWqeAFIlXSYiATASk9KBturlavojiZevwBnyLqch13q8G8HTNywoi5EMw3ai3a6CMJG2v8FOTDqL2v62iVNfXYxHyeOYJIxVdmFaVlm2KFR6CCfP5jJkhMKZ+dktZuhyUsN10TzdQ9ge+DWXhhHdqHXdulQK70v54DgvGC25xNyiiG9ZkiDUbQOQ== 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:(13230031)(6069001)(4636009)(39850400004)(346002)(396003)(136003)(376002)(82310400011)(186009)(1800799009)(451199024)(46966006)(36840700001)(6486002)(6506007)(6666004)(6512007)(478600001)(83380400001)(2906002)(107886003)(956004)(2616005)(1076003)(336012)(30864003)(26005)(36736006)(70206006)(316002)(70586007)(5660300002)(4326008)(8936002)(9316004)(8676002)(81166007)(40480700001)(47076005)(36860700001)(86362001)(36756003)(82740400003)(356005)(41300700001);DIR:OUT;SFP:1101; X-OriginatorOrg: wiwynn.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Sep 2023 01:44:42.2443 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 56149676-b652-4e82-141a-08dbb268ab6a 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: SG1PEPF000082E3.apcprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEZPR04MB6623 X-BeenThere: openbmc@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development list for OpenBMC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Delphine CC Chiu Errors-To: openbmc-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "openbmc" Revise Yosemite 4 devicetree for i2c-mux and eeprom, also add pmbus snesors config. Signed-off-by: Delphine CC Chiu --- Changelog: v2 - Add devicetree config for ina233 and max31790 v1 - Add imux configs for i2c-mux - Add gpio and eeprom devices - Add spi-gpio config for tpmdev - Remove temperature-sensor 11-004a and 11-004b - Change power-sensor ina230 to ina233 - Revise adc128d818 config for adc mode - Add vendor prefix for max31790 and remove redundant config --- .../dts/aspeed-bmc-facebook-yosemite4.dts | 560 ++++++++++++++++-- 1 file changed, 522 insertions(+), 38 deletions(-) diff --git a/arch/arm/boot/dts/aspeed-bmc-facebook-yosemite4.dts b/arch/arm/boot/dts/aspeed-bmc-facebook-yosemite4.dts index 1ef3ff849ec1..6c0f4c4c8be0 100644 --- a/arch/arm/boot/dts/aspeed-bmc-facebook-yosemite4.dts +++ b/arch/arm/boot/dts/aspeed-bmc-facebook-yosemite4.dts @@ -17,6 +17,25 @@ aliases { serial6 = &uart7; serial7 = &uart8; serial8 = &uart9; + + i2c16 = &imux16; + i2c17 = &imux17; + i2c18 = &imux18; + i2c19 = &imux19; + i2c20 = &imux20; + i2c21 = &imux21; + i2c22 = &imux22; + i2c23 = &imux23; + i2c24 = &imux24; + i2c25 = &imux25; + i2c26 = &imux26; + i2c27 = &imux27; + i2c28 = &imux28; + i2c29 = &imux29; + i2c30 = &imux30; + i2c31 = &imux31; + i2c32 = &imux32; + i2c33 = &imux33; }; chosen { @@ -34,6 +53,25 @@ iio-hwmon { <&adc0 4>, <&adc0 5>, <&adc0 6>, <&adc0 7>, <&adc1 0>, <&adc1 1>; }; + + spi_gpio: spi-gpio { + status = "okay"; + compatible = "spi-gpio"; + #address-cells = <1>; + #size-cells = <0>; + + gpio-sck = <&gpio0 ASPEED_GPIO(X, 3) GPIO_ACTIVE_HIGH>; + gpio-mosi = <&gpio0 ASPEED_GPIO(X, 4) GPIO_ACTIVE_HIGH>; + gpio-miso = <&gpio0 ASPEED_GPIO(X, 5) GPIO_ACTIVE_HIGH>; + num-chipselects = <1>; + cs-gpios = <&gpio0 ASPEED_GPIO(X, 0) GPIO_ACTIVE_LOW>; + + tpmdev@0 { + compatible = "tcg,tpm_tis-spi"; + spi-max-frequency = <33000000>; + reg = <0>; + }; + }; }; &uart1 { @@ -262,6 +300,186 @@ i2c-mux@70 { idle-state = <0>; i2c-mux-idle-disconnect; reg = <0x70>; + + imux16: i2c@0 { + #address-cells = <1>; + #size-cells = <0>; + reg = <0>; + gpio@20 { + compatible = "nxp,pca9506"; + reg = <0x20>; + }; + + gpio@21 { + compatible = "nxp,pca9506"; + reg = <0x21>; + }; + + gpio@22 { + compatible = "nxp,pca9506"; + reg = <0x22>; + }; + + gpio@23 { + compatible = "nxp,pca9506"; + reg = <0x23>; + }; + + gpio@49 { + compatible = "nxp,pca9537"; + reg = <0x49>; + }; + + eeprom@50 { + compatible = "atmel,24c128"; + reg = <0x50>; + }; + + eeprom@51 { + compatible = "atmel,24c128"; + reg = <0x51>; + }; + + eeprom@54 { + compatible = "atmel,24c128"; + reg = <0x54>; + }; + }; + + imux17: i2c@1 { + #address-cells = <1>; + #size-cells = <0>; + reg = <1>; + gpio@20 { + compatible = "nxp,pca9506"; + reg = <0x20>; + }; + + gpio@21 { + compatible = "nxp,pca9506"; + reg = <0x21>; + }; + + gpio@22 { + compatible = "nxp,pca9506"; + reg = <0x22>; + }; + + gpio@23 { + compatible = "nxp,pca9506"; + reg = <0x23>; + }; + + gpio@49 { + compatible = "nxp,pca9537"; + reg = <0x49>; + }; + + eeprom@50 { + compatible = "atmel,24c128"; + reg = <0x50>; + }; + + eeprom@51 { + compatible = "atmel,24c128"; + reg = <0x51>; + }; + + eeprom@54 { + compatible = "atmel,24c128"; + reg = <0x54>; + }; + }; + + imux18: i2c@2 { + #address-cells = <1>; + #size-cells = <0>; + reg = <2>; + gpio@20 { + compatible = "nxp,pca9506"; + reg = <0x20>; + }; + + gpio@21 { + compatible = "nxp,pca9506"; + reg = <0x21>; + }; + + gpio@22 { + compatible = "nxp,pca9506"; + reg = <0x22>; + }; + + gpio@23 { + compatible = "nxp,pca9506"; + reg = <0x23>; + }; + + gpio@49 { + compatible = "nxp,pca9537"; + reg = <0x49>; + }; + + eeprom@50 { + compatible = "atmel,24c128"; + reg = <0x50>; + }; + + eeprom@51 { + compatible = "atmel,24c128"; + reg = <0x51>; + }; + + eeprom@54 { + compatible = "atmel,24c128"; + reg = <0x54>; + }; + }; + + imux19: i2c@3 { + #address-cells = <1>; + #size-cells = <0>; + reg = <3>; + gpio@20 { + compatible = "nxp,pca9506"; + reg = <0x20>; + }; + + gpio@21 { + compatible = "nxp,pca9506"; + reg = <0x21>; + }; + + gpio@22 { + compatible = "nxp,pca9506"; + reg = <0x22>; + }; + + gpio@23 { + compatible = "nxp,pca9506"; + reg = <0x23>; + }; + + gpio@49 { + compatible = "nxp,pca9537"; + reg = <0x49>; + }; + + eeprom@50 { + compatible = "atmel,24c128"; + reg = <0x50>; + }; + + eeprom@51 { + compatible = "atmel,24c128"; + reg = <0x51>; + }; + + eeprom@54 { + compatible = "atmel,24c128"; + reg = <0x54>; + }; + }; }; }; @@ -273,12 +491,234 @@ i2c-mux@71 { idle-state = <0>; i2c-mux-idle-disconnect; reg = <0x71>; + + imux20: i2c@0 { + #address-cells = <1>; + #size-cells = <0>; + reg = <0>; + gpio@20 { + compatible = "nxp,pca9506"; + reg = <0x20>; + }; + + gpio@21 { + compatible = "nxp,pca9506"; + reg = <0x21>; + }; + + gpio@22 { + compatible = "nxp,pca9506"; + reg = <0x22>; + }; + + gpio@23 { + compatible = "nxp,pca9506"; + reg = <0x23>; + }; + + gpio@49 { + compatible = "nxp,pca9537"; + reg = <0x49>; + }; + + eeprom@50 { + compatible = "atmel,24c128"; + reg = <0x50>; + }; + + eeprom@51 { + compatible = "atmel,24c128"; + reg = <0x51>; + }; + + eeprom@54 { + compatible = "atmel,24c128"; + reg = <0x54>; + }; + }; + + imux21: i2c@1 { + #address-cells = <1>; + #size-cells = <0>; + reg = <1>; + gpio@20 { + compatible = "nxp,pca9506"; + reg = <0x20>; + }; + + gpio@21 { + compatible = "nxp,pca9506"; + reg = <0x21>; + }; + + gpio@22 { + compatible = "nxp,pca9506"; + reg = <0x22>; + }; + + gpio@23 { + compatible = "nxp,pca9506"; + reg = <0x23>; + }; + + gpio@49 { + compatible = "nxp,pca9537"; + reg = <0x49>; + }; + + eeprom@50 { + compatible = "atmel,24c128"; + reg = <0x50>; + }; + + eeprom@51 { + compatible = "atmel,24c128"; + reg = <0x51>; + }; + + eeprom@54 { + compatible = "atmel,24c128"; + reg = <0x54>; + }; + }; + + imux22: i2c@2 { + #address-cells = <1>; + #size-cells = <0>; + reg = <2>; + gpio@20 { + compatible = "nxp,pca9506"; + reg = <0x20>; + }; + + gpio@21 { + compatible = "nxp,pca9506"; + reg = <0x21>; + }; + + gpio@22 { + compatible = "nxp,pca9506"; + reg = <0x22>; + }; + + gpio@23 { + compatible = "nxp,pca9506"; + reg = <0x23>; + }; + + gpio@49 { + compatible = "nxp,pca9537"; + reg = <0x49>; + }; + + eeprom@50 { + compatible = "atmel,24c128"; + reg = <0x50>; + }; + + eeprom@51 { + compatible = "atmel,24c128"; + reg = <0x51>; + }; + + eeprom@54 { + compatible = "atmel,24c128"; + reg = <0x54>; + }; + }; + + imux23: i2c@3 { + #address-cells = <1>; + #size-cells = <0>; + reg = <3>; + gpio@20 { + compatible = "nxp,pca9506"; + reg = <0x20>; + }; + + gpio@21 { + compatible = "nxp,pca9506"; + reg = <0x21>; + }; + + gpio@22 { + compatible = "nxp,pca9506"; + reg = <0x22>; + }; + + gpio@23 { + compatible = "nxp,pca9506"; + reg = <0x23>; + }; + + gpio@49 { + compatible = "nxp,pca9537"; + reg = <0x49>; + }; + + eeprom@50 { + compatible = "atmel,24c128"; + reg = <0x50>; + }; + + eeprom@51 { + compatible = "atmel,24c128"; + reg = <0x51>; + }; + + eeprom@54 { + compatible = "atmel,24c128"; + reg = <0x54>; + }; + }; }; }; &i2c10 { status = "okay"; bus-frequency = <400000>; + i2c-mux@74 { + compatible = "nxp,pca9544"; + idle-state = <0>; + i2c-mux-idle-disconnect; + reg = <0x74>; + + imux28: i2c@0 { + #address-cells = <1>; + #size-cells = <0>; + reg = <0>; + }; + + imux29: i2c@1 { + #address-cells = <1>; + #size-cells = <0>; + reg = <1>; + gpio@20 { + compatible = "nxp,pca9506"; + reg = <0x20>; + }; + + gpio@21 { + compatible = "nxp,pca9506"; + reg = <0x21>; + }; + + gpio@22 { + compatible = "nxp,pca9506"; + reg = <0x22>; + }; + + gpio@23 { + compatible = "nxp,pca9506"; + reg = <0x23>; + }; + + gpio@24 { + compatible = "nxp,pca9506"; + reg = <0x24>; + }; + }; + }; }; &i2c11 { @@ -331,16 +771,6 @@ temperature-sensor@49 { reg = <0x49>; }; - temperature-sensor@4a { - compatible = "ti,tmp75"; - reg = <0x4a>; - }; - - temperature-sensor@4b { - compatible = "ti,tmp75"; - reg = <0x4b>; - }; - eeprom@54 { compatible = "atmel,24c256"; reg = <0x54>; @@ -361,6 +791,11 @@ eeprom@50 { reg = <0x50>; }; + eeprom@54 { + compatible = "atmel,24c64"; + reg = <0x54>; + }; + rtc@6f { compatible = "nuvoton,nct3018y"; reg = <0x6f>; @@ -370,6 +805,25 @@ rtc@6f { &i2c13 { status = "okay"; bus-frequency = <400000>; + gpio@20 { + compatible = "nxp,pca9506"; + reg = <0x20>; + }; + + gpio@21 { + compatible = "nxp,pca9506"; + reg = <0x21>; + }; + + gpio@22 { + compatible = "nxp,pca9506"; + reg = <0x22>; + }; + + gpio@23 { + compatible = "nxp,pca9506"; + reg = <0x23>; + }; }; &i2c14 { @@ -378,44 +832,54 @@ &i2c14 { adc@1d { compatible = "ti,adc128d818"; reg = <0x1d>; - ti,mode = /bits/ 8 <2>; + ti,mode = /bits/ 8 <1>; }; adc@35 { compatible = "ti,adc128d818"; reg = <0x35>; - ti,mode = /bits/ 8 <2>; + ti,mode = /bits/ 8 <1>; }; adc@37 { compatible = "ti,adc128d818"; reg = <0x37>; - ti,mode = /bits/ 8 <2>; + ti,mode = /bits/ 8 <1>; }; power-sensor@40 { - compatible = "ti,ina230"; + compatible = "ti,ina233"; reg = <0x40>; + resistor-calibration = /bits/ 16 <0x0a00>; + current-lsb= /bits/ 16 <0x0001>; }; power-sensor@41 { - compatible = "ti,ina230"; + compatible = "ti,ina233"; reg = <0x41>; + resistor-calibration = /bits/ 16 <0x0a00>; + current-lsb= /bits/ 16 <0x0001>; }; power-sensor@42 { - compatible = "ti,ina230"; + compatible = "ti,ina233"; reg = <0x42>; + resistor-calibration = /bits/ 16 <0x0a00>; + current-lsb= /bits/ 16 <0x0001>; }; power-sensor@43 { - compatible = "ti,ina230"; + compatible = "ti,ina233"; reg = <0x43>; + resistor-calibration = /bits/ 16 <0x0a00>; + current-lsb= /bits/ 16 <0x0001>; }; power-sensor@44 { - compatible = "ti,ina230"; + compatible = "ti,ina233"; reg = <0x44>; + resistor-calibration = /bits/ 16 <0x0a00>; + current-lsb= /bits/ 16 <0x0001>; }; temperature-sensor@4e { @@ -442,7 +906,7 @@ i2c-mux@71 { i2c-mux-idle-disconnect; reg = <0x71>; - i2c@0 { + imux30: i2c@0 { #address-cells = <1>; #size-cells = <0>; reg = <0>; @@ -450,14 +914,13 @@ i2c@0 { adc@1f { compatible = "ti,adc128d818"; reg = <0x1f>; - ti,mode = /bits/ 8 <2>; + ti,mode = /bits/ 8 <1>; }; pwm@20{ - compatible = "max31790"; + compatible = "maxim,max31790"; + pwm-as-tach = /bits/ 8 <4 5>; reg = <0x20>; - #address-cells = <1>; - #size-cells = <0>; }; gpio@22{ @@ -466,10 +929,9 @@ gpio@22{ }; pwm@23{ - compatible = "max31790"; + compatible = "maxim,max31790"; + pwm-as-tach = /bits/ 8 <4 5>; reg = <0x23>; - #address-cells = <1>; - #size-cells = <0>; }; adc@33 { @@ -492,22 +954,21 @@ gpio@61 { }; }; - i2c@1 { + imux31: i2c@1 { #address-cells = <1>; #size-cells = <0>; - reg = <0>; + reg = <1>; adc@1f { compatible = "ti,adc128d818"; reg = <0x1f>; - ti,mode = /bits/ 8 <2>; + ti,mode = /bits/ 8 <1>; }; pwm@20{ - compatible = "max31790"; + compatible = "maxim,max31790"; + pwm-as-tach = /bits/ 8 <4 5>; reg = <0x20>; - #address-cells = <1>; - #size-cells = <0>; }; gpio@22{ @@ -516,10 +977,9 @@ gpio@22{ }; pwm@23{ - compatible = "max31790"; + compatible = "maxim,max31790"; + pwm-as-tach = /bits/ 8 <4 5>; reg = <0x23>; - #address-cells = <1>; - #size-cells = <0>; }; adc@33 { @@ -552,7 +1012,7 @@ i2c-mux@73 { i2c-mux-idle-disconnect; reg = <0x73>; - i2c@0 { + imux32: i2c@0 { #address-cells = <1>; #size-cells = <0>; reg = <0>; @@ -563,10 +1023,10 @@ adc@35 { }; }; - i2c@1 { + imux33: i2c@1 { #address-cells = <1>; #size-cells = <0>; - reg = <0>; + reg = <1>; adc@35 { compatible = "maxim,max11617"; @@ -592,6 +1052,30 @@ i2c-mux@72 { idle-state = <0>; i2c-mux-idle-disconnect; reg = <0x72>; + + imux24: i2c@0 { + #address-cells = <1>; + #size-cells = <0>; + reg = <0>; + }; + + imux25: i2c@1 { + #address-cells = <1>; + #size-cells = <0>; + reg = <1>; + }; + + imux26: i2c@2 { + #address-cells = <1>; + #size-cells = <0>; + reg = <2>; + }; + + imux27: i2c@3 { + #address-cells = <1>; + #size-cells = <0>; + reg = <3>; + }; }; }; From patchwork Mon Sep 11 01:44:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Delphine CC Chiu X-Patchwork-Id: 1832058 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=wiwynn.com header.i=@wiwynn.com header.a=rsa-sha256 header.s=selector2 header.b=kHLeW1tC; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=112.213.38.117; helo=lists.ozlabs.org; envelope-from=openbmc-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=patchwork.ozlabs.org) Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RkV2Y2B5Nz1yhX for ; Mon, 11 Sep 2023 11:47:17 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=wiwynn.com header.i=@wiwynn.com header.a=rsa-sha256 header.s=selector2 header.b=kHLeW1tC; dkim-atps=neutral Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4RkV2W0nrpz3bY3 for ; Mon, 11 Sep 2023 11:47:15 +1000 (AEST) X-Original-To: openbmc@lists.ozlabs.org Delivered-To: openbmc@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=wiwynn.com header.i=@wiwynn.com header.a=rsa-sha256 header.s=selector2 header.b=kHLeW1tC; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=wiwynn.com (client-ip=2a01:111:f400:feab::609; helo=apc01-sg2-obe.outbound.protection.outlook.com; envelope-from=delphine_cc_chiu@wiwynn.com; receiver=lists.ozlabs.org) Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on20609.outbound.protection.outlook.com [IPv6:2a01:111:f400:feab::609]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4RkV020ztTz2yPq for ; Mon, 11 Sep 2023 11:45:06 +1000 (AEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kLV6NQwQ/n9cKdaBBBEb6FDRqwvhgRwWM53WF2ab0LeXvdHS2gfAQHzYZE1a7X0hNd2X1r+ipcPFT45Rs3g1ZCMRWVAlAVbmgt/W5hJ1dtwcBTJR+Zk8GXfoEmmQ9CIQ9RLb/6FvKWjeSnm/lo6E1NeQcQyE7J/cMUW1ukQ4IsT1eEZ9cV4cmPezjP3iMWna6Gi4NBbQnVPsZAERsFOzqXHx2cVimt4xpUMezWWdcikpDVn5Jg82Q/QjWj3RyrYSdd06nLkq3TKQTdbxX7hCzgIF3pVG1kkYubFmlx129lTIxF7c+8rPdqRkcmQh8zjKo5SU/pVNVH3+Bg6wTU3/MA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=8zIhFBBAEzYH5/9QKWua9/4N+LiGX0YtNFEK9QNnTHg=; b=c9fFMoHp014P2FPUM51ax4c3wIDA77PQSMsDikQVtrEk0OEHAAUUvgltIzDp6rCZQ87PL0U7Qcg2StII1TzT85A12f9AyaVG+uZVQKd6oruzOKfxLCcwdAAHqqlCiLkNPy608Nss3eImYRpJew/bhwwkIf+a4u1+522p9zAPGCcvwQ600Wn4nDaGi99VNQgjvksAOYW5o6cy4YF3jlLgcWOF4eLxgkKvAvW5TJlZNwb1cdiij920SX+CUALytC/YS0AAre1xb0jbK2hzTj+tVk6CQ/WuW/zy7ocFJg0f87CbR9vPt1i3pCSC/RsoIHEv9NAJJLUJ3cmn/bF69Lye6w== 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 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=8zIhFBBAEzYH5/9QKWua9/4N+LiGX0YtNFEK9QNnTHg=; b=kHLeW1tC5jbbfvbg+6bE2EHJgvWqGUUM92W8gKvN3Go8wp2oVzPluR/LCf4hSbvQfmAqi2BiMNfpDmlOdGK9jFm9c1LkBTQzwh0bSV8W5vaq6u/HI7wr3GwNIS78RJZu7Jpb0e4fGdsxJ5wWdjtCwgnfLYfjqQnE6wjyrbJqiJGr/RETbzcCjYJCuwFOTpS58E74UVdALEllqhSJrg/L9ErZaEPmqcM2beerih3H2kfOQZhOyph3TL7keMvpBsqni/0Dq6U8vTyWVTen5ocLNlbfslw1zJ6fJN93wdvxmBk+LmQsBaS9VbUKbu8JV3WyeZZZ8fMZ3lxBeCDYdOIzaw== Received: from SG2PR03CA0118.apcprd03.prod.outlook.com (2603:1096:4:91::22) by TY0PR04MB6328.apcprd04.prod.outlook.com (2603:1096:400:279::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6768.31; Mon, 11 Sep 2023 01:44:45 +0000 Received: from SG1PEPF000082E3.apcprd02.prod.outlook.com (2603:1096:4:91:cafe::1a) by SG2PR03CA0118.outlook.office365.com (2603:1096:4:91::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6792.16 via Frontend Transport; Mon, 11 Sep 2023 01:44:45 +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 SG1PEPF000082E3.mail.protection.outlook.com (10.167.240.6) with Microsoft SMTP Server id 15.20.6792.16 via Frontend Transport; Mon, 11 Sep 2023 01:44:44 +0000 From: Delphine CC Chiu To: patrick@stwcx.xyz, joel@jms.id.au, openbmc@lists.ozlabs.org Subject: [PATCH linux dev-6.1 v2 2/2] dt-bindings: hwmon: add MAX31790 and INA233 binding documents Date: Mon, 11 Sep 2023 09:44:36 +0800 Message-Id: <20230911014436.2036176-3-Delphine_CC_Chiu@wiwynn.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230911014436.2036176-1-Delphine_CC_Chiu@wiwynn.com> References: <20230911014436.2036176-1-Delphine_CC_Chiu@wiwynn.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SG1PEPF000082E3:EE_|TY0PR04MB6328:EE_ X-MS-Office365-Filtering-Correlation-Id: 9096cf7c-b29b-4183-b51f-08dbb268acee X-MS-Exchange-AtpMessageProperties: SA X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: qUvGhzLcy5Ih0ZB6eXiI2q5Fu9M1n5KQwWK5z7IW3UycTsLh5IgJO54v0ViHVR+pB10ncFNqiZmMsOWeV4cR/s4jiT0JXgAwaMvXTjFk5FgK/Lo789lk+81g+RyOWKZ7QUl9r/fsYSpLq3N/hM5jSLeiMdXL/xvfeM5lruIM8YA17WL7CxOnsr9lk76J9ty0k9WsXpeSp9UYmOtwzgy14UQ6v33rO7Ggivi66teT7iM9buwQLperPKe3EdyUuoPkYrZTrkSURQsHm3NN62wD3BcQais0b0j91oqExpSSVWCTO+MEZaiHhj73lp/PRVPtxQnlPTll02IAVDNvDjCv2POEghgWZGsNbKdct1eKUxTlDD2rgkFBqkaahAE8mnDkh3H+IK2qMgYiWokI5BQ8UCm4t6pcspqUNStHIeKP7diOzpe3RBQLc9qzfaI57CGhOF8TEnWfM78lgTPoPDaZTfEB+RuSKz/kERIj2dJ1WEPFNGSwGstdVFRmGwg+s5/LRATJVPMg08pu2tDEJvz3ahFK9YEHq+iXkEuHwt1cv+MopfrN59vsTkgxgUAKNQzkOm/+3NkYZz/hzXCSBQ2fPI4I43dgjSRQT2qITEJzja2t1u6KU6VIT2QPr9HJqOLGjBptOYZF6O8mya+0LzKIqsbR5A7Rw5tNqM6A6CCv0ffBcUCeMy1MMWs7z0oHnAxwjHI2Fd2zH5EXm+OMYxr+KN+aQh/pzPQpq88nQ64KILSwdFNqKe9KdGS+tjWtPLjO 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:(13230031)(6069001)(4636009)(136003)(39850400004)(396003)(376002)(346002)(186009)(451199024)(1800799009)(82310400011)(36840700001)(46966006)(41300700001)(36736006)(316002)(1076003)(26005)(40480700001)(107886003)(336012)(8676002)(2906002)(8936002)(70206006)(4326008)(70586007)(5660300002)(478600001)(6666004)(6486002)(6506007)(6512007)(36756003)(36860700001)(47076005)(956004)(2616005)(9316004)(81166007)(86362001)(82740400003)(356005);DIR:OUT;SFP:1101; X-OriginatorOrg: wiwynn.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Sep 2023 01:44:44.7912 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9096cf7c-b29b-4183-b51f-08dbb268acee 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: SG1PEPF000082E3.apcprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY0PR04MB6328 X-BeenThere: openbmc@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development list for OpenBMC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Delphine CC Chiu Errors-To: openbmc-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "openbmc" Add MAX31790 and INA233 binding documents for Yosemite V4 config. The drivers' code change will be soonly contributed. Signed-off-by: Delphine CC Chiu Changelog: v2 - Add binding documents for ina233 and max31790 --- .../devicetree/bindings/hwmon/ina233.txt | 27 +++++++++++++++++++ .../devicetree/bindings/hwmon/max31790.txt | 25 +++++++++++++++++ MAINTAINERS | 12 +++++++++ 3 files changed, 64 insertions(+) create mode 100644 Documentation/devicetree/bindings/hwmon/ina233.txt create mode 100644 Documentation/devicetree/bindings/hwmon/max31790.txt diff --git a/Documentation/devicetree/bindings/hwmon/ina233.txt b/Documentation/devicetree/bindings/hwmon/ina233.txt new file mode 100644 index 000000000000..a1067788ec0c --- /dev/null +++ b/Documentation/devicetree/bindings/hwmon/ina233.txt @@ -0,0 +1,27 @@ +Bindings for the Maxim MAX31790 Intelligent Fan Controller +========================================================== + +Reference: + +https://pdf1.alldatasheet.com/datasheet-pdf/view/930928/TI1/INA233.html + +The INA233 device is a current, voltage and power monitor with an I2C-, SMBus-,and PMBus-compatible interface +that is compliant with digital bus voltages from 1.8 V to 5.0 V. +The device monitors and reports values for current, voltage and power. +The integrated power accumulator can be used for energy or average power calculations. +Programmable calibration value, conversion times and averaging when combined with an internal multiplier +enable direct readouts of current in amperes and power in watts. + +Required properties: +- compatible : ti,ina233 +- reg : I2C address +- resistor-calibration : MFR_CALIBRATION which will be set into register 0xd4 +- current-lsb : Current_LSB for calibration +Example: + + ina233@45 { + compatible = "ti,ina233"; + reg = <0x45>; + resistor-calibration = /bits/ 16 <0x0a00>; + current-lsb= /bits/ 16 <0x0001>; + }; diff --git a/Documentation/devicetree/bindings/hwmon/max31790.txt b/Documentation/devicetree/bindings/hwmon/max31790.txt new file mode 100644 index 000000000000..e00060ddfe15 --- /dev/null +++ b/Documentation/devicetree/bindings/hwmon/max31790.txt @@ -0,0 +1,25 @@ +Bindings for the Maxim MAX31790 Intelligent Fan Controller +========================================================== + +Reference: + +https://datasheets.maximintegrated.com/en/ds/MAX31790.pdf + +The MAX31790 controls the speeds of up to six fans +using six independent PWM outputs. The desired fan +speeds (or PWM duty cycles) are written through the I2C +interface. The outputs drive “4-wire” fans directly, or can +be used to modulate the fan’s power terminals using an +external pass transistor + +Required properties: +- compatible : maxim,max31790 +- reg : I2C address +- pwm-as-tach : config PWM outputs as tachometer inputs +Example: + + fans@52 { + compatible = "maxim,max31790"; + reg = <0x20>; + pwm-as-tach = /bits/ 8 <4 5>; + }; diff --git a/MAINTAINERS b/MAINTAINERS index ccf8d060cd22..6baad9c10669 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1362,6 +1362,12 @@ F: Documentation/devicetree/bindings/hwmon/adi,max31760.yaml F: Documentation/hwmon/max31760.rst F: drivers/hwmon/max31760.c +ANALOG DEVICES INC MAX31790 DRIVER +M: Delphine CC Chiu +S: Odd Fixes +F: Documentation/devicetree/bindings/hwmon/max31790.txt +F: drivers/hwmon/max31790.c + ANALOGBITS PLL LIBRARIES M: Paul Walmsley S: Supported @@ -10034,6 +10040,12 @@ F: Documentation/devicetree/bindings/hwmon/ti,ina2xx.yaml F: Documentation/hwmon/ina209.rst F: drivers/hwmon/ina209.c +INA233 HARDWARE MONITOR DRIVER +M: Delphine CC Chiu +S: Odd Fixes +F: Documentation/devicetree/bindings/hwmon/ina233.txt +F: drivers/hwmon/ina222.c + INA2XX HARDWARE MONITOR DRIVER M: Guenter Roeck L: linux-hwmon@vger.kernel.org