Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp2124908pxu; Fri, 9 Oct 2020 08:32:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyJJyCbvzPsq8Hp14+yHDJrgQVI+cRW92mF2na1crZGcGkUnVIflgGMipbuVfyYkla6pFeK X-Received: by 2002:a17:906:a985:: with SMTP id jr5mr15468108ejb.549.1602257553770; Fri, 09 Oct 2020 08:32:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602257553; cv=none; d=google.com; s=arc-20160816; b=Eew4eFtkHC8hJ5SjFpfjdNRGiO9/KoXQLsP/zF/Om4ZXnNb4/xdZWukUPCes869ghN txF2U71XZUcWrkpt77atidbDKv6F6u9AXEA7dgqLDZZjxdHain5o2aE/WzmRyWndQKJH z64BJKHnwXPsEdhnM77yFxFo6mDJajM7r5yETL2ZXRWQ+Jyw27RV2ENaR3EnCsHwbWPk oRQv74HpamS9RgkJ3OriB7htijugLOnN6reaexc3KMYtIS1xteXEfh9MVVDBjujHGl0W i5J9Q5iJo4EhTnmr0zmstDHmammJQtibFB3QfQp3o8+0EGTTp1ps3q47jk4bbfj7AGHI 4rzQ== 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=1taCynHpgLcbnbg9ED/zkgiBEjWMgf0mpZBFZzF2VGM=; b=YYKqGjxEIlk63buFHQEivOfxBVvZPGScSu8+VVSMeNtchHowFh7Z8LQ5Q5VlNb0ZP5 0+kjM7cO2+9KxXnDrrVD5hqQR85CwjRSceW6Dkjdd9ySOumUjqALsM+jeqifqhjFzB1G mDHP8VLYPqJQtqabz8PJdyWMo46QXYFx2pvPZoiGojOJ7+c+7tKSKKz3VUeBRWARK1mE vfwcw/NrW0jR0ilHJheS0aik2q+ey0n3+mFs10m0GLPeO+RwrCbmPt34ULSJqNf96wPn FMcFiPpOsRh358nh4ZVF1SNkdnJ3T/p/QTnuWKmj4MJQQpyRxxPaWOHja4i3CoGQWSyl zQ6g== 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 m26si6198026edq.372.2020.10.09.08.32.08; Fri, 09 Oct 2020 08:32:33 -0700 (PDT) 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 S2389325AbgJIPay (ORCPT + 99 others); Fri, 9 Oct 2020 11:30:54 -0400 Received: from mx2.suse.de ([195.135.220.15]:34414 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389135AbgJIPat (ORCPT ); Fri, 9 Oct 2020 11:30:49 -0400 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 B52CAAD63; Fri, 9 Oct 2020 15:30:47 +0000 (UTC) From: Nicolas Saenz Julienne To: f.fainelli@gmail.com, linux@roeck-us.net, jdelvare@suse.com, wahrenst@gmx.net, =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , Eric Anholt , bcm-kernel-feedback-list@broadcom.com, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-pwm@vger.kernel.org, Ray Jui , Scott Branden , Nicolas Saenz Julienne Cc: linux-hwmon@vger.kernel.org, robh+dt@kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/3] dt-bindings: pwm: Add binding for RPi firmware PWM bus Date: Fri, 9 Oct 2020 17:30:28 +0200 Message-Id: <20201009153031.986-2-nsaenzjulienne@suse.de> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201009153031.986-1-nsaenzjulienne@suse.de> References: <20201009153031.986-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 --- .../arm/bcm/raspberrypi,bcm2835-firmware.yaml | 21 +++++++++++++++++++ .../pwm/raspberrypi,firmware-pwm.h | 13 ++++++++++++ 2 files changed, 34 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..dcaf00e8602e 100644 --- a/Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835-firmware.yaml +++ b/Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835-firmware.yaml @@ -64,6 +64,22 @@ properties: - compatible - "#reset-cells" + pwm: + type: object + + properties: + compatible: + const: raspberrypi,firmware-pwm + + "#pwm-cells": + const: 1 + description: > + The argument is the PWM bus number. + + required: + - compatible + - "#pwm-cells" + additionalProperties: false required: @@ -87,5 +103,10 @@ examples: compatible = "raspberrypi,firmware-reset"; #reset-cells = <1>; }; + + pwm: pwm { + compatible = "raspberrypi,firmware-pwm"; + #pwm-cells = <1>; + }; }; ... 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.28.0