Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp2643874lqo; Mon, 20 May 2024 11:43:19 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX6WFbbJm73BwoXfKnmV7EBT+PpSYCvD14s0mW/XOdqzG6aWpPEbYQDyTJH3A+nAMx3zNzgJnVWWEgfZlNj6y6MBci2CuWFZ33eQAskIQ== X-Google-Smtp-Source: AGHT+IEysrjFpPTKErZYDwFslkeVc4aXLWrsIm5Wnig8W3w8e2h4K8Ef9oN8AsmgCvROCey4iEOn X-Received: by 2002:a05:6a21:191:b0:1af:d148:b713 with SMTP id adf61e73a8af0-1afde0b5b22mr32817159637.1.1716230598801; Mon, 20 May 2024 11:43:18 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716230598; cv=pass; d=google.com; s=arc-20160816; b=v1eMCiWKjEGEUctINp5aKJC4/ti/FbeFcbeOxaFUjSZsrwmN6szkNkHz6T+h+tCAOx /BiOuAXgTvvt1rcjSwDCPgUJaRqqC57pll7DK1V4VoXVPV+iwBKDx284g5i04mh7QUTR +no5QlZqJ33pH7+5o0AorjpwJR4oq+PoDcsE6trcxV2YOGLUWfQjyMD/YbeuWdWZptE0 HbWLgKAv3ONLqDvfKnv5WucJjDRfty3lYvan0YAaprLs0oqAaiKIBMe1eswl8VNCt0VU C2FzL61Fvq/MBBjpoWgUYxRiPcPtqi8F0+rdwMF0RpknGF+F7nkt0PpvJfRd+mFazcX+ jxFQ== ARC-Message-Signature: i=2; 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:dkim-signature; bh=6DNNq24d7mxFNOs2ke3D1b/n+xhRg9qtLvnTihNfsp0=; fh=yMbvL2+eY37nqZfeZL1i+rgdgWV3syFHO/Fx73ayYNw=; b=CmcfrSYYHe8eC09eAl1fXxdLMmYZmSDvdL6yiczy+iZZ6zeIHAoIq713cv9VNr4eA7 NOSgpkMvMjsZelOYpDsOwDZld5Wh0o51ih55Sc4K4NrEHCa/iU8A7oxD5Da4eXC6wxAA en/v3VCUjD1zS6CNPTpraPjM6+xvP3S9paWjy46mfUtm3lRKizh6MppWxeSWKBA6IXyz NqXQeF4LT+12hA7vK+XbBHFsU+UTTmvLLXpeSgPm6KjP18DeDDaDSJoVKPBXSDX2U+kb UgYLunBPJNWZEV6t4QQAEoNYhcH4Ar+fwmrnuZLlajKASLVhrTULxA1KBnI8P/ZdDQ/1 ZyYA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=OJRIKev8; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-184072-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-184072-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id 41be03b00d2f7-65c34b354d6si3444097a12.149.2024.05.20.11.43.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 May 2024 11:43:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-184072-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=OJRIKev8; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-184072-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-184072-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 29A68B2188D for ; Mon, 20 May 2024 18:43:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3BDAE1386AF; Mon, 20 May 2024 18:43:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="OJRIKev8" Received: from mail-lf1-f53.google.com (mail-lf1-f53.google.com [209.85.167.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A441413848F; Mon, 20 May 2024 18:43:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.53 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716230582; cv=none; b=WaaJr7gXvRUS1al715tP+JC3+JGdeC64ZiO6R/C4UgEdozLoWgdpuIL8o16/H3KWWUmJJECULtGFMzlt8t23GoF1ZsvWrP0u/mer+ZeVjV8MYteL/m/UUMsBDPML9FZ87yz3PG+1M1oevrXDEIOwddv0KCJz/6r/GjimomLAwGg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716230582; c=relaxed/simple; bh=N+Zbm7Fm7DDc2Ynl23djjTgsVJ0SADNhJ3fgDS+rKOw=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=eV2tih7BxuP18wL6cAcPPfkaAPBMwiOugBE/AG4RPtFTbuOjgrufnxzt5B3pPmdFPQNxfCmZ+4v6qUc+tAcU1ojOpUu3oam5cE0mtbgBZbSqNCYLaDhX8ECcmwYgdSO82Ik2uL6I9PVH7RF5BNRNgEftzGpEqLRbon0ztS6pA0c= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=OJRIKev8; arc=none smtp.client-ip=209.85.167.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-lf1-f53.google.com with SMTP id 2adb3069b0e04-52327368e59so5158277e87.1; Mon, 20 May 2024 11:43:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1716230578; x=1716835378; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=6DNNq24d7mxFNOs2ke3D1b/n+xhRg9qtLvnTihNfsp0=; b=OJRIKev8+OB9Sosisd2r2jvtJ7P0N+XS3pir4so8db/aO/LC7tfudIJnfH2WVEpQhn zpcLwE0ViuG21A+bM28mQ8DjVPvs9FFTkY25oUCx9dq1khXJD4gpovDSq8WoG4FC+a1f 6j7oasfTu4++WU1M+7k5MWYfK2jAlzOKF+ZNYnVdUSWsFgw86MHLoLxROckIJ0LvM7nV qpb92fRSsM9Z6b/honZZD6qtsfizh7Kb7oQiLDuUqY+/or7K6ctvT2UgnAY8yjuiO7c4 h7455sK78eYC7eI5K9Zp8cA/tm7UT5EWVteqKs5ixOVl0fyH4PnDnwi/vK9ElxRr+3Gi 7OEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716230578; x=1716835378; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=6DNNq24d7mxFNOs2ke3D1b/n+xhRg9qtLvnTihNfsp0=; b=nyxYRnoEz2YueytseZg4+4hRXBfcwsKba3tZLlntV8VPitnD7alLKiznhTzg7k9zTz KVVLpMp/3kkL88Usz81GxsTo8qPtknIwc6m60ubiDCKkNYmXMDjjgwhAuP/g3jcNZO2u /QnH4N4ZWtk5rUKW51iqwo3TNHWGeKOTxqaJgVTSbUiH3I8t4toE8aYuI2sC2OBn3KEC X2uML0yqZyMmhkqJ0sM6jlMLfzNgDrUW8oG0EfE1vrTrNYnC5naA3qszZgdPDnCmUatq uSuKCCx9T8cpnCO7Tj6hz+3YbSaFlbLm2u6PSkzb4I6VpP9GSfNJiOPOlBMsOB5dTrB1 uUFQ== X-Forwarded-Encrypted: i=1; AJvYcCVV/QnFlYX1Vl5SLYvjx1yfmd1limcRum0SdB95ZFY6HfHe6Q6NxZNYiDLdl+NgXqB4N1yW/5gQ3wukgx6WVMITO3i7l8ScYNr8hScQcsN3tw04rqAXDPNvACdH5mvWTKxb1KMvVw== X-Gm-Message-State: AOJu0Ywxf6KZA8377QAOnuRUxgE9cAe6vly2P+i3yivxD0sAKh/RO3l8 1Pm1PpMHWWb2T+rtLfFUaZuxeVcxaqQugU5+leVrq7i1PI++e1XEGViGksaFSXgN X-Received: by 2002:ac2:5046:0:b0:522:80d:5dc6 with SMTP id 2adb3069b0e04-5220fd79fd6mr18401299e87.41.1716230578359; Mon, 20 May 2024 11:42:58 -0700 (PDT) Received: from localhost.localdomain ([188.162.49.81]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-521f38d335csm4368967e87.125.2024.05.20.11.42.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 May 2024 11:42:58 -0700 (PDT) From: Aleksandr Shubin To: linux-kernel@vger.kernel.org Cc: Aleksandr Shubin , Conor Dooley , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Paul Walmsley , Palmer Dabbelt , Albert Ou , Philipp Zabel , John Watts , Marc Kleine-Budde , Maksim Kiselev , Cheo Fusi , linux-pwm@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-riscv@lists.infradead.org Subject: [PATCH v9 1/3] dt-bindings: pwm: Add binding for Allwinner D1/T113-S3/R329 PWM controller Date: Mon, 20 May 2024 21:42:19 +0300 Message-Id: <20240520184227.120956-2-privatesub2@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240520184227.120956-1-privatesub2@gmail.com> References: <20240520184227.120956-1-privatesub2@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Allwinner's D1, T113-S3 and R329 SoCs have a new pwm controller witch is different from the previous pwm-sun4i. The D1 and T113 are identical in terms of peripherals, they differ only in the architecture of the CPU core, and even share the majority of their DT. Because of that, using the same compatible makes sense. The R329 is a different SoC though, and should have a different compatible string added, especially as there is a difference in the number of channels. D1 and T113s SoCs have one PWM controller with 8 channels. R329 SoC has two PWM controllers in both power domains, one of them has 9 channels (CPUX one) and the other has 6 (CPUS one). Add a device tree binding for them. Signed-off-by: Aleksandr Shubin Reviewed-by: Conor Dooley --- .../bindings/pwm/allwinner,sun20i-pwm.yaml | 84 +++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 Documentation/devicetree/bindings/pwm/allwinner,sun20i-pwm.yaml diff --git a/Documentation/devicetree/bindings/pwm/allwinner,sun20i-pwm.yaml b/Documentation/devicetree/bindings/pwm/allwinner,sun20i-pwm.yaml new file mode 100644 index 000000000000..89cebf7841a6 --- /dev/null +++ b/Documentation/devicetree/bindings/pwm/allwinner,sun20i-pwm.yaml @@ -0,0 +1,84 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/pwm/allwinner,sun20i-pwm.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Allwinner D1, T113-S3 and R329 PWM + +maintainers: + - Aleksandr Shubin + - Brandon Cheo Fusi + +properties: + compatible: + oneOf: + - const: allwinner,sun20i-d1-pwm + - items: + - const: allwinner,sun50i-r329-pwm + - const: allwinner,sun20i-d1-pwm + + reg: + maxItems: 1 + + "#pwm-cells": + const: 3 + + clocks: + items: + - description: Bus clock + - description: 24 MHz oscillator + - description: APB clock + + clock-names: + items: + - const: bus + - const: hosc + - const: apb + + resets: + maxItems: 1 + + allwinner,pwm-channels: + $ref: /schemas/types.yaml#/definitions/uint32 + description: The number of PWM channels configured for this instance + enum: [6, 9] + +allOf: + - $ref: pwm.yaml# + + - if: + properties: + compatible: + contains: + const: allwinner,sun50i-r329-pwm + + then: + required: + - allwinner,pwm-channels + +unevaluatedProperties: false + +required: + - compatible + - reg + - "#pwm-cells" + - clocks + - clock-names + - resets + +examples: + - | + #include + #include + + pwm: pwm@2000c00 { + compatible = "allwinner,sun20i-d1-pwm"; + reg = <0x02000c00 0x400>; + clocks = <&ccu CLK_BUS_PWM>, <&dcxo>, <&ccu CLK_APB0>; + clock-names = "bus", "hosc", "apb"; + resets = <&ccu RST_BUS_PWM>; + #pwm-cells = <0x3>; + }; + +... -- 2.25.1