From patchwork Fri Dec 22 09:45:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: William Qiu X-Patchwork-Id: 182599 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2483:b0:fb:cd0c:d3e with SMTP id q3csp948737dyi; Fri, 22 Dec 2023 01:47:01 -0800 (PST) X-Google-Smtp-Source: AGHT+IGI1tE6EfCt+jRreDJJ077WxyD7/vhoMuf+R+M9gu1ier0vT8ZJ/615qctYg+YbErA5frgN X-Received: by 2002:ac2:42c8:0:b0:50e:29c1:f82d with SMTP id n8-20020ac242c8000000b0050e29c1f82dmr249873lfl.126.1703238421400; Fri, 22 Dec 2023 01:47:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703238421; cv=none; d=google.com; s=arc-20160816; b=kkdixx7iEEpHS3wKbc9/TGpX5nE9ZBzHgEVll4dLB9uZrJ1Ws/SOvA04ctCi2syavA wedDTGZkj+26n9EFYhRnZ5ItNbE7d6wKRF6cXh5Dsebx3kgiVvPCGAhbJNFkoR0GGcxj F3FouKG91nYdVUlIoF5o8uQhqIRRCd0U1JFAUklk/H1ZULejUqQIp6m4EcSdpeLkBL6m /DE8+nKHtSs92NDqVPTl1fun7ij5cj1MKudXTJUwdYEmpGLU2/5iH3btR8diMRjiUymU HajMzUXqU0SOxTA2N9MqO/IssPFU4qFOSv3cwkZ41dCmS8EhE1sbsoIlRzUReCeVUECm ezcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=S5Xd4YK6e/DmBADAFXi0ydS/3g1z9QL5oe8agfR55e8=; fh=T4gzk7+hgrXGjSNvKGZTlbuKXCiuDaGkxvCBgfgONjs=; b=JDw48XcTZyw+1Dru7fBK6YOrpFAwj9TurTY8p6hkO7/RPqT2fh2m7W1XGLx1FCWo8e ucCPCmoAyrOGJ6PSZOsP3YW+267XwHCPG6Jkn4KNnZ6IMwKGeg2jJjbZtd40YgwkLlom 9qQOTQdhVW3H5o/nxpll7o3Ey6qGu/Ycl01Wkm5FhoZbTku7yAjBXAn7I5nPp/7K25NI RIZem316rD1U5Lq560CaBgDIzW6nGYdp9iGg0MqFCLqFvmD30QV+qzdbyZavdQ05Z4P5 g+F1msEhTlhaxpoKGQiAABUMrCfElReFZ+aTxMuPjzXgl0q6dW+DPQUoZfSHXW2yrMLE 1FtQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-9561-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-9561-ouuuleilei=gmail.com@vger.kernel.org" Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id wj6-20020a170907050600b00a2693a66d02si1581950ejb.251.2023.12.22.01.47.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Dec 2023 01:47:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-9561-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-9561-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-9561-ouuuleilei=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 066171F24E5E for ; Fri, 22 Dec 2023 09:47:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0BE961799B; Fri, 22 Dec 2023 09:46:03 +0000 (UTC) X-Original-To: linux-kernel@vger.kernel.org Received: from fd01.gateway.ufhost.com (fd01.gateway.ufhost.com [61.152.239.71]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EAFCEFBE2; Fri, 22 Dec 2023 09:45:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=starfivetech.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=starfivetech.com Received: from EXMBX166.cuchost.com (unknown [175.102.18.54]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "EXMBX166", Issuer "EXMBX166" (not verified)) by fd01.gateway.ufhost.com (Postfix) with ESMTP id E8C797FD3; Fri, 22 Dec 2023 17:45:50 +0800 (CST) Received: from EXMBX068.cuchost.com (172.16.6.68) by EXMBX166.cuchost.com (172.16.6.76) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Fri, 22 Dec 2023 17:45:50 +0800 Received: from williamqiu-virtual-machine.starfivetech.com (171.223.208.138) by EXMBX068.cuchost.com (172.16.6.68) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Fri, 22 Dec 2023 17:45:49 +0800 From: William Qiu To: , , , CC: Emil Renner Berthing , Rob Herring , Thierry Reding , Philipp Zabel , Krzysztof Kozlowski , Conor Dooley , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , "Hal Feng" , Paul Walmsley , Palmer Dabbelt , Albert Ou , William Qiu Subject: [PATCH v10 1/4] dt-bindings: pwm: Add bindings for OpenCores PWM Controller Date: Fri, 22 Dec 2023 17:45:45 +0800 Message-ID: <20231222094548.54103-2-william.qiu@starfivetech.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231222094548.54103-1-william.qiu@starfivetech.com> References: <20231222094548.54103-1-william.qiu@starfivetech.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: EXCAS062.cuchost.com (172.16.6.22) To EXMBX068.cuchost.com (172.16.6.68) X-YovoleRuleAgent: yovoleflag X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785974930974240468 X-GMAIL-MSGID: 1785974930974240468 Add bindings for OpenCores PWM Controller. Signed-off-by: William Qiu Reviewed-by: Hal Feng Reviewed-by: Conor Dooley Reviewed-by: Uwe Kleine-König Acked-by: Uwe Kleine-König --- .../bindings/pwm/opencores,pwm.yaml | 55 +++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 Documentation/devicetree/bindings/pwm/opencores,pwm.yaml diff --git a/Documentation/devicetree/bindings/pwm/opencores,pwm.yaml b/Documentation/devicetree/bindings/pwm/opencores,pwm.yaml new file mode 100644 index 000000000000..0b85dd861dfd --- /dev/null +++ b/Documentation/devicetree/bindings/pwm/opencores,pwm.yaml @@ -0,0 +1,55 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/pwm/opencores,pwm.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: OpenCores PWM controller + +maintainers: + - William Qiu + +description: + The OpenCores PTC ip core contains a PWM controller. When operating in PWM + mode, the PTC core generates binary signal with user-programmable low and + high periods. All PTC counters and registers are 32-bit. + +allOf: + - $ref: pwm.yaml# + +properties: + compatible: + items: + - enum: + - starfive,jh7100-pwm + - starfive,jh7110-pwm + - const: opencores,pwm-v1 + + reg: + maxItems: 1 + + clocks: + maxItems: 1 + + resets: + maxItems: 1 + + "#pwm-cells": + const: 3 + +required: + - compatible + - reg + - clocks + +additionalProperties: false + +examples: + - | + pwm@12490000 { + compatible = "starfive,jh7110-pwm", "opencores,pwm-v1"; + reg = <0x12490000 0x10000>; + clocks = <&clkgen 181>; + resets = <&rstgen 109>; + #pwm-cells = <3>; + };