Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1064381pxu; Mon, 23 Nov 2020 10:40:53 -0800 (PST) X-Google-Smtp-Source: ABdhPJxni6Rkan5wSOoXxsONnVpDL0rHAvCvkEdAFV3L3p+gA+iRRL5emHyJvVE+D2HR4F5K9TpB X-Received: by 2002:a05:6402:104d:: with SMTP id e13mr512860edu.179.1606156853261; Mon, 23 Nov 2020 10:40:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606156853; cv=none; d=google.com; s=arc-20160816; b=yNCjyFHh2pZDYO1D21Pm8OE9MgylwF0MysLDoVAvtGa8fZVE4a4la1JL2mDuiDV4w0 hvE74KEGhPz0Mcf/PoQ5XU48RWfP0m/UYnY71cJPCLVMyOkKCKejFCNpsG7x23QY5Om/ /C9KZrB3GkXdmRu+lytCsqGPSjZ98cYrfG1OAHR0UEP1gG+VInPf8/V1DM1ODyVYaDhu RD78stoh1tiELj5LbN2p5jkJAjx+vKAowO4MIxHbI09efD2c3SU4h8Eme1HhAxQVqSf2 HWi2OCUVdZgpL/XP08P4IJHavfWy4WHAuo4mLuQ74pUZYijClj2f18nq1Po8Kt3E/Feq iztw== 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=hYlydzly73fy2A8wxnS5jm1FZTXG8sgqbYIXp8xY9MQ=; b=nAlo/EmPwHEOicWjcDVKMz7kYqGu1blGYQo0rLjq3UQ0eCHj1VXkfEuW6OxtXS1rxw eu5JijA+oXg0WoolxNDrDjh90Uk+2MC8EDMpMXWBDYa/lfOetu1TKMfx5Ugno56/1PUn mTFjW+6d7S6eqweWDSNPTJcgkOWmlEI4mS8zs0u43HFxxo+HYkaffDmNKWhPxw4joN68 A1MCXEe5CKcqDwh8Io1w0KgyLeDGSSWUAvqGEJZRwiEZ5gwtqrtvVSnEVIG6UJmpRoUA r+OvxpyfsuGuFDMjdJK01QPitDoPvI5fKJIOQ+hviG9ag8oLA49R5gHSHZ8HvDsxo5si tuvg== 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 y18si7153677ejb.408.2020.11.23.10.40.30; Mon, 23 Nov 2020 10:40:53 -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 S2388220AbgKWSi4 (ORCPT + 99 others); Mon, 23 Nov 2020 13:38:56 -0500 Received: from mx2.suse.de ([195.135.220.15]:59432 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387920AbgKWSix (ORCPT ); Mon, 23 Nov 2020 13:38:53 -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 903E3ACA2; Mon, 23 Nov 2020 18:38:51 +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 v5 09/11] dt-bindings: pwm: Add binding for RPi firmware PWM bus Date: Mon, 23 Nov 2020 19:38:30 +0100 Message-Id: <20201123183833.18750-10-nsaenzjulienne@suse.de> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201123183833.18750-1-nsaenzjulienne@suse.de> References: <20201123183833.18750-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