Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1404328pxu; Sat, 12 Dec 2020 11:38:16 -0800 (PST) X-Google-Smtp-Source: ABdhPJy6/0wUMoTaLUprPUCGDYMg+jiITnChBVkVeXF0Um/83uoFvSUEzrvMRvrARC8ku7T9g3IZ X-Received: by 2002:a17:906:4348:: with SMTP id z8mr16703122ejm.119.1607801896182; Sat, 12 Dec 2020 11:38:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607801896; cv=none; d=google.com; s=arc-20160816; b=pwWEAIgVbG3fE3HMkcHMsaVByWQJUkIXioziljhUi0oU3LfMgtfNHt/mr78AZtTXxN OtRcWBqi1azmlosLtC2+3sfWCayg/2fGTaA24pO82sF6FUmK6WF8XMJNN0ZLx+Rf3s+8 k9w1lGW1sfAxEJLDQRWEYM3d+Hzstxpk/OT4M243WUj92D5qZxfqZsbFlLN+ubJiNH5Z d5mY1ptSVNKqU4IP8Ki3gjJTQcOeolSP7d+jmSUxDz+i0qE8M7Dh6PDWxWybwUCnlIbS 81Ldkt60a6RIW58S86ucA5C0laBdPZBdii05XSuEI2R5l8e0/K30K9x8fc7ElfcI7yB5 dHQg== 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=vRjYb94sIIup6WLpQCjhpCW/o0x5vLJUrWv8/YgE3dE=; b=xr8jbKnHnSiHQJ7L156VcJIx7A5oxl+Min+ZllS1H+aLOzEyHa73qjQzVA9EoW0qem MS1ykxOmANEZ+13CE7NF341duXFy9koW/fy48qq1qCZVu/A7FB3Vea4ix9QzhUzK+wjb 0rPfmJeohRjOZ9kV/GP06XzaG6u+EW8im9Yxt/Fh1ZGJB2d0WC6eRukNESYzSFGDNAM5 N6OC1DecxGiWnyXMeFjCwNd5iYEnBTKkmFhF9XODVvW6FPPubP6+MQwmJJmKgGkcRQJy +xJPmXHP3iMX2PpqlKTEx8OedRqNXHU9F4BhtQu4+qbmMaLEFafJc2LPm3DGOInv87VY PD7A== 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 k23si7557389ejk.521.2020.12.12.11.37.53; Sat, 12 Dec 2020 11:38:16 -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 S2391830AbgLKQvz (ORCPT + 99 others); Fri, 11 Dec 2020 11:51:55 -0500 Received: from mx2.suse.de ([195.135.220.15]:34848 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390286AbgLKQtf (ORCPT ); Fri, 11 Dec 2020 11:49:35 -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 620BAB293; Fri, 11 Dec 2020 16:48:19 +0000 (UTC) From: Nicolas Saenz Julienne To: u.kleine-koenig@pengutronix.de, linux-kernel@vger.kernel.org, Florian Fainelli , Ray Jui , Scott Branden , bcm-kernel-feedback-list@broadcom.com, Nicolas Saenz Julienne , 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 v6 09/11] dt-bindings: pwm: Add binding for RPi firmware PWM bus Date: Fri, 11 Dec 2020 17:47:58 +0100 Message-Id: <20201211164801.7838-10-nsaenzjulienne@suse.de> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201211164801.7838-1-nsaenzjulienne@suse.de> References: <20201211164801.7838-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 v4: - Rename compatible string to be more explicit with the bus' limitations 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-poe-pwm.h | 13 ++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 include/dt-bindings/pwm/raspberrypi,firmware-poe-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..e3664eab0f6a 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-poe-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-poe-pwm"; + #pwm-cells = <2>; + }; }; ... diff --git a/include/dt-bindings/pwm/raspberrypi,firmware-poe-pwm.h b/include/dt-bindings/pwm/raspberrypi,firmware-poe-pwm.h new file mode 100644 index 000000000000..27c5ce68847b --- /dev/null +++ b/include/dt-bindings/pwm/raspberrypi,firmware-poe-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