Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp498482pxb; Thu, 12 Nov 2020 08:51:07 -0800 (PST) X-Google-Smtp-Source: ABdhPJz6dGTYNwfPkezKphA/yrLHSAWzcdhwSnlXwxXRNvtajl9OKzbCCsMpHwztlHe5I0Ka/o9f X-Received: by 2002:a17:906:b53:: with SMTP id v19mr199151ejg.136.1605199866955; Thu, 12 Nov 2020 08:51:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605199866; cv=none; d=google.com; s=arc-20160816; b=Jo7ct7Sl60QJeUlT76ZPqo+EKmQaSdg+fW/yp287zDztUKsgvggs17xMP2dXEGQiTK 37y13S0FaMHDpryVve0w6TS4APP1EUtcRGhtPyYbtmL26ValIfyEIGFXuXxUqQJAM4NH yqXu45esW7FOUAEbovDwJszU/HFAb6h77w7luxFZ4x9BFFxqsmscE3XwdRqJcwxiY94U XXtsIo6HIDf6mLOfWCiaEp/6VoX5OiXh/ro0oHsya0h6I6ljeG7h8Rqjyse8KWNwiwvn HVrHJVymdL9PuoYL+1WrdEhwSYERY7m4p0V4ZLpB5MxQ33GFdr5yuTC97psici3IsI8U AdHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=FPo5GUANh/vMXfsG+DSuUGwvdVmIz3n63XCjYTQnvqo=; b=gYdQrqwJ+mJPoJTatpkdoDQtN5yvnu1OA+31u6akyON+uQzcWbBOeJS8EPhHpMTNQ+ Rj+LfNCXzfzlyjP+6aSCpkNNsf7Nlhs18pnjDSCnTDXO3kq7p8k7UJwLw+kORU8rtl4m NcjaqXi9sXfrDhNne9aAJgxFwAdztDuX1K5ckNX6y3+WxLp7cLpeS9++D45ktIFBu1VX RrxBKi6br5aPdpteDxarDTXpBwU0iYbFliqH5C/M8AufLg+9ZTSE+FYsIIdJUp20EDi9 o92TtDoHBS4PXkmSe87S3u9FLBwoaYRZa/qsivRhdDckETziZ6phs5koPSn3ZR4Fg5UQ O4+g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r1si4228287ejz.334.2020.11.12.08.50.43; Thu, 12 Nov 2020 08:51:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729128AbgKLQrL (ORCPT + 99 others); Thu, 12 Nov 2020 11:47:11 -0500 Received: from mx2.suse.de ([195.135.220.15]:52330 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728487AbgKLQrL (ORCPT ); Thu, 12 Nov 2020 11:47:11 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id BD74CAEA3; Thu, 12 Nov 2020 16:47:08 +0000 (UTC) From: Nicolas Saenz Julienne To: u.kleine-koenig@pengutronix.de, linux-kernel@vger.kernel.org, Nicolas Saenz Julienne , Florian Fainelli , Ray Jui , Scott Branden , bcm-kernel-feedback-list@broadcom.com, Eric Anholt , Stefan Wahren Cc: linux-pwm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-input@vger.kernel.org, dmitry.torokhov@gmail.com, gregkh@linuxfoundation.org, devel@driverdev.osuosl.org, p.zabel@pengutronix.de, linux-gpio@vger.kernel.org, linus.walleij@linaro.org, linux-clk@vger.kernel.org, sboyd@kernel.org, linux-rpi-kernel@lists.infradead.org, bgolaszewski@baylibre.com, andy.shevchenko@gmail.com, Rob Herring , Rob Herring Subject: [PATCH v4 09/11] dt-bindings: pwm: Add binding for RPi firmware PWM bus Date: Thu, 12 Nov 2020 17:36:27 +0100 Message-Id: <20201112163630.17177-10-nsaenzjulienne@suse.de> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201112163630.17177-1-nsaenzjulienne@suse.de> References: <20201112163630.17177-1-nsaenzjulienne@suse.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The PWM bus controlling the fan in RPi's official PoE hat can only be controlled by the board's co-processor. Signed-off-by: Nicolas Saenz Julienne Reviewed-by: Rob Herring --- Changes since v3: - Fix example Changes since v1: - Update bindings to use 2 #pwm-cells .../arm/bcm/raspberrypi,bcm2835-firmware.yaml | 20 +++++++++++++++++++ .../pwm/raspberrypi,firmware-pwm.h | 13 ++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 include/dt-bindings/pwm/raspberrypi,firmware-pwm.h diff --git a/Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835-firmware.yaml b/Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835-firmware.yaml index a2c63c8b1d10..38be3ff69609 100644 --- a/Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835-firmware.yaml +++ b/Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835-firmware.yaml @@ -64,6 +64,21 @@ properties: - compatible - "#reset-cells" + pwm: + type: object + + properties: + compatible: + const: raspberrypi,firmware-pwm + + "#pwm-cells": + # See pwm.yaml in this directory for a description of the cells format. + const: 2 + + required: + - compatible + - "#pwm-cells" + additionalProperties: false required: @@ -87,5 +102,10 @@ examples: compatible = "raspberrypi,firmware-reset"; #reset-cells = <1>; }; + + pwm: pwm { + compatible = "raspberrypi,firmware-pwm"; + #pwm-cells = <2>; + }; }; ... diff --git a/include/dt-bindings/pwm/raspberrypi,firmware-pwm.h b/include/dt-bindings/pwm/raspberrypi,firmware-pwm.h new file mode 100644 index 000000000000..27c5ce68847b --- /dev/null +++ b/include/dt-bindings/pwm/raspberrypi,firmware-pwm.h @@ -0,0 +1,13 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (c) 2020 Nicolas Saenz Julienne + * Author: Nicolas Saenz Julienne + */ + +#ifndef _DT_BINDINGS_RASPBERRYPI_FIRMWARE_PWM_H +#define _DT_BINDINGS_RASPBERRYPI_FIRMWARE_PWM_H + +#define RASPBERRYPI_FIRMWARE_PWM_POE 0 +#define RASPBERRYPI_FIRMWARE_PWM_NUM 1 + +#endif -- 2.29.2