From patchwork Thu Aug 22 08:48:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chanh Nguyen X-Patchwork-Id: 13773015 Received: from BN1PR04CU002.outbound.protection.outlook.com (mail-eastus2azon11020118.outbound.protection.outlook.com [52.101.56.118]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7E5BF282EA; Thu, 22 Aug 2024 08:48:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.56.118 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724316527; cv=fail; b=KlSvdCMcKmG5EnD6ZY2UBO8wzNWHsGYF6FHMWrI7ZgL0WXsV+MrCHJAJNHxAINTcTpkb6HFwAInyl9SpX7xEXqesXZ+29KUgNoXVyu/n9/6z7sXtRQeyMxmXGYILlfQvH0OEbCH6/IWZ/EI8BZtvtO7VR56DF9BVg16GpE7oRbE= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724316527; c=relaxed/simple; bh=QAvx8dE8UG2cMAQWRI4d1uKh84oubxsRtJZqgc0sdhI=; h=From:To:Cc:Subject:Date:Message-ID:Content-Type:MIME-Version; b=Hi6PA55EyNmxEAx3xI2yWm6eDOWx7jHrsmHvQqBzdruLoVU8PklTKLmXviyE5uH7vaxRKJfTyJmrTfP5YN+/1zqpzvgOg74+eMt7RALNvIvRbnDRo3xYUXY5GNy5AJVcCk7wceHV4SYMULFCOpq0DEbhxML6lUh0vm0qpOQUA7U= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=os.amperecomputing.com; spf=pass smtp.mailfrom=os.amperecomputing.com; dkim=pass (1024-bit key) header.d=os.amperecomputing.com header.i=@os.amperecomputing.com header.b=Pg6cCUhZ; arc=fail smtp.client-ip=52.101.56.118 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=os.amperecomputing.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=os.amperecomputing.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=os.amperecomputing.com header.i=@os.amperecomputing.com header.b="Pg6cCUhZ" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=RJaSeZxP2pLZ14AXhoMaQLOlj/Al3IhSzii6Z4vddLKyy7WnDgguVsh/ayHSrz9ldUtTH5Wq8JXLY0LImyWX0NC9x6oJagJLB+JPzlWN1+oBuZsXV4SE2sboriofq4zL/jEGmbdSjqG1cyQ+cxqiKEJAUjstrjkfiNHAo4hMlnk1zLWxqggrD99LvBV3n/N8pXrUsYrAYM8dA078bITByZj4Klkw6NQn57yH11CVRGwRXe5Q6zKau5TosOWujZYq79b8gC0dxM54Zj40Uy+juPa9zP1gL1BvmMDhebLmY6wp6oPnvXo3RAyhd1vma56/2JjjgydH9S9U6t+Tjuy/JA== 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=AAYSBkKhV6aYFHU10poPXcyMm/nVrJf6MD9nx8xUg58=; b=skseJMdlaW7Bn9oaUwfsvE3HyvLntm5Y5lUyCaGot/hmPuPdHPtD6UiMVqXrbg5A9/wr5TswExbkLDJ52XIDS470WboCj9HWZaYmvK62Cz+6tXa/CTrA+2eL5OEt8CnvKroL8YUgGq84w02L/V2Afq/LI5pOPXiqkmNRApg2azjyL+8ck1T/XFntVkIHrCvpn+t0jaRU/2onZtfYSJIwaW4HPrNqYpx12TORVXYJX6k4U5wLrp2EMDe+3fjeaiCC2yDr+CSQljGN591oKSmwqvf9XpckNNepuIIC+n294l6TOc+LKYro24C96Ka4ODNoHRyDKBczbz7JC6nEGwdhYQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=os.amperecomputing.com; dmarc=pass action=none header.from=os.amperecomputing.com; dkim=pass header.d=os.amperecomputing.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=os.amperecomputing.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=AAYSBkKhV6aYFHU10poPXcyMm/nVrJf6MD9nx8xUg58=; b=Pg6cCUhZdpMGct8C3KPGYMYl578hUesPPvTW83ULtcQ7RWFgA3fqjir/LLm+L8LdkW78GTmhiCFTVrl6AKI3uepXTEmibw4RwCKU7i9+kOKI+cPFco6IGSSYJDNmZ0bcH6sWSWhHN68ciYO3Nn1/bKOJVYpga6dQnPHvf6oqoqk= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=os.amperecomputing.com; Received: from BL3PR01MB7057.prod.exchangelabs.com (2603:10b6:208:35c::16) by CH7PR01MB8882.prod.exchangelabs.com (2603:10b6:610:24b::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7875.19; Thu, 22 Aug 2024 08:48:39 +0000 Received: from BL3PR01MB7057.prod.exchangelabs.com ([fe80::b69e:5684:ed7c:4d09]) by BL3PR01MB7057.prod.exchangelabs.com ([fe80::b69e:5684:ed7c:4d09%4]) with mapi id 15.20.7875.019; Thu, 22 Aug 2024 08:48:39 +0000 From: Chanh Nguyen To: Jean Delvare , Guenter Roeck , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Justin Ledford , devicetree@vger.kernel.org, linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org, OpenBMC Maillist , Open Source Submission Cc: Phong Vo , Thang Nguyen , Quan Nguyen , Khanh Pham , Chanh Nguyen , Krzysztof Kozlowski Subject: [PATCH v4] dt-bindings: hwmon: Add maxim max31790 Date: Thu, 22 Aug 2024 08:48:08 +0000 Message-ID: <20240822084808.299884-1-chanh@os.amperecomputing.com> X-Mailer: git-send-email 2.43.0 X-ClientProxiedBy: SI2PR02CA0006.apcprd02.prod.outlook.com (2603:1096:4:194::8) To BL3PR01MB7057.prod.exchangelabs.com (2603:10b6:208:35c::16) Precedence: bulk X-Mailing-List: linux-hwmon@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL3PR01MB7057:EE_|CH7PR01MB8882:EE_ X-MS-Office365-Filtering-Correlation-Id: 3ea5f676-a0aa-4a28-75fb-08dcc2873760 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|366016|1800799024|7416014|52116014|921020|38350700014; X-Microsoft-Antispam-Message-Info: Lhp5ymdLMcKFkeiSln7vXBwRdwxZWqPW/EIjcpDmkIom9Tj6teVzMNGWxIXnen10HmNB1x6Kg+pJj8TYMRztX36ueMSR+yxuYUxaEr/lWYMF36bqUfPWcFRtdPIE7IYfdrP3lRmc8javF8wvCm3mKe6yuijqmmxsslucBwTtVDGofmkTKSGWJMtfTPi7xQFZt0Z9qYQsYNkRnU7WnEXteBJdkZFZ2mjaAnI9yqrlBxA2NCrQqxSA7RLzwsA43hf6Ql4HWm7N0/mSQi7LIteIooL/euqtEdau+0k4Jlu3OUWvGQefvPsGq5lcjeK9hl0mm1d+0yjVJ9LT4gypybTPfr0gim18AoNpuPnCfc8W7c83FamgDkIdvLjrFvzg0/TljMkgqRZOlinuxiUQSpyyWTOTvKmpoqZM8EcFaoTOj/+La+j1dyX4HTdVqYfaPL11CrrvFUGZKuxMz5F0/57R+u/XHz3GKpUKFOdIuCyFH/+gKRmUTyyt/kklW+314/kRgdmjjSO8a5+WMTgEVd7w24wkedFfeSibvHpCSAx+Jxt7O47QUUUb4WPpT8BU6CDGgZ1XzyYkc3fNaztM3wJsmvaKnVfAf2vKonbKpC5azlnF96rcXKFxbd/lLkDBJ0HBImQlTACAnVSTQHCkEGSp21f34K8AWtRd/WGHznsYKeL8uY1C6YvUJTMqCEI2yBLgUT9Fhv8bOP92JeUphY5TXN3evsQEd6/PBEJA4li8TwyKpVURhVuY1T4ogphC5QFJKghXBLkTly6lF2t6TMHiS3zq4k7FiaYwTk99mNN2TeAvngLIqNppBlsmiEP8NctUzDB5YazX6VPyqwveofq+Rqm2rTybEUj5OC2Q8WdZ4BtW1JbtvYlTpRM1uBob1rfWm3KN2iNo/WLWXwIulVXDRWxTKL1zt3gMFRnS9VX1RkH8Fwr0iRZaaQWbTgtzqid0qS67+ykqds7oEpvqH2QKVfO8/dcH2iyfU2fgKIFI0uBYcsjgxtCB46P6+7mU/iIaCx2o1/xKpNdvXXTknJAheV+xY2z3sUlGi7SihsvrtP+8g8ERi5JAAO7rPhnLFGANCUm6hndUYIkTrXKIIKPgB+wFmvkwahlZFWrHkKLsZ0axXC+dR7u21NA8+hCRpM9tJXSLUi5uGuEVsXpN51AFC0yNEDnaZ6uTaX4sQTJ8nOA83/vJVvoZgeRFwtNZ85sDaSD9ls9WazchtRU+7XoNfFfpKnh80dUP48LgeaJym3CQ9scTfnf6H6ndInJcEndN1XwtWhWHZMOfxOwFK5Ww8Ol5a1RvYtOZDk4DtNjJ7l+XCjQuRru4nMNka3a5EMzFANpVG5ZKsGHmyGi5g6q3517kXDk+L3o8PELLGKtecPM= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BL3PR01MB7057.prod.exchangelabs.com;PTR:;CAT:NONE;SFS:(13230040)(376014)(366016)(1800799024)(7416014)(52116014)(921020)(38350700014);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-Mess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ciP5LX72jJxFQWDAH1HBp7CDwvMFZZ5V5i5adZqmDByXTabmI3I7rYJuD2+tEb4ihizxXAJzIMFfnEKqNBX2uVW16QnqvQIeQFSERxq+bLiXDYmOOf/J04A5P9F+zywQAG4xjJ3XCMAEtXCGw0LtXjTE+CdY/n+zOC7hJUe5o8d3hFmttcIsuT9rr7hwtJ1hx8HGZc81Pjn9i7/obdrzlhFLY257k/Gc7sL+VBFicG3fqN/qMrIeY/RwdiY7ZLzC9NqlQrrF86ziiAT/avF3N1cfRLeT6uZsvPTU7SGr0TSY4LovJ+SwABk+GK6C/T3TjIAMK/Mk0IDGRKN/fUCaAGU7kxzxXbzNNCnhJL3TM5dPXeEIW3O/+szZBjCEjKGX0k1A/hdkK6iVgFFMaKh7w1FDCttPVX3xRji1MgCchvTnaMTIy+N0l266m2KbxcUU9EUW3J+SOwGbi3Yya6I3F73aNlJxhllN0Wg588/heMLdp6MuEb9Ry/rWLZKHSBb8tLBgg+82q0HMm9sMZ4hJxg+Hz20ji49ktyS0bDzKO0tLpXN0pCF+jrzgMsfnr8= X-OriginatorOrg: os.amperecomputing.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3ea5f676-a0aa-4a28-75fb-08dcc2873760 X-MS-Exchange-CrossTenant-AuthSource: BL3PR01MB7057.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Aug 2024 08:48:39.1412 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3bc2b170-fd94-476d-b0ce-4229bdc904a7 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: TvUEzY5S6U8qWZ/UIOECVdHA6pl/VPghtBgiOeaVKcBgl6oVICaOWkNmjVwO+i1dUX5WqTSJnu/lueo9VmvgWcW/kjOUOiLBkpgv5k1T5C+JRWv8ERf3Crm4d6G0h8DS X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH7PR01MB8882 Add device tree bindings and an example for max31790 device. Signed-off-by: Chanh Nguyen Reviewed-by: Krzysztof Kozlowski --- Changes in v2: - Update filename of the maxim,max31790.yaml [Krzysztof] - Add the common fan schema to $ref [Krzysztof] - Update the node name to "fan-controller" in maxim,max31790.yaml [Krzysztof] - Drop "driver" in commit title [Krzysztof] Changes in v3: - Drop redundant "bindings" in commit title [Krzysztof] - Add the clocks and resets property in example [Krzysztof] - Add child node refer to fan-common.yaml [Krzysztof, Conor] Changes in v4: - Add Chanh Nguyen to maintainers list [Chanh] - Drop incomplete example [Krzysztof, Conor] - Drop the cover letter because only a patch existed [Chanh] --- .../bindings/hwmon/maxim,max31790.yaml | 70 +++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 Documentation/devicetree/bindings/hwmon/maxim,max31790.yaml diff --git a/Documentation/devicetree/bindings/hwmon/maxim,max31790.yaml b/Documentation/devicetree/bindings/hwmon/maxim,max31790.yaml new file mode 100644 index 000000000000..b1ff496f87f9 --- /dev/null +++ b/Documentation/devicetree/bindings/hwmon/maxim,max31790.yaml @@ -0,0 +1,70 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/hwmon/maxim,max31790.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: The Maxim MAX31790 Fan Controller + +maintainers: + - Guenter Roeck + - Chanh Nguyen + +description: > + 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. + + Datasheets: + https://datasheets.maximintegrated.com/en/ds/MAX31790.pdf + +properties: + compatible: + const: maxim,max31790 + + reg: + maxItems: 1 + + clocks: + maxItems: 1 + + resets: + maxItems: 1 + + "#pwm-cells": + const: 1 + +patternProperties: + "^fan-[0-9]+$": + $ref: fan-common.yaml# + unevaluatedProperties: false + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + + pwm_provider: fan-controller@20 { + compatible = "maxim,max31790"; + reg = <0x20>; + clocks = <&sys_clk>; + resets = <&reset 0>; + #pwm-cells = <1>; + + fan-0 { + pwms = <&pwm_provider 1>; + }; + + fan-1 { + pwms = <&pwm_provider 2>; + }; + }; + }; +