From mboxrd@z Thu Jan 1 00:00:00 1970 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="OJRIKev8" 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-Google-Smtp-Source: AGHT+IEO4aSromU9C6oSddIXHc8xFrGRwBPnUP7EaMD4z8Yk2DobxFv1itZdDUx/ckVORlYAZQXfMg== 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-pwm@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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 20D70C04FFE for ; Mon, 20 May 2024 18:43:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=LDZyfO/Y1HF31mItGgv06/4vCRT82mvMp8vWySfXveg=; b=Ia0xGHsKxd7yoc YGKVzYPZNoOL79AIF2bJaLTs9ttFIq6FMnCdAhIuK5mmeBFgOcqmdpe96n6jSv8uimm5VjG6gKlcE hIiVZ7iGwWNLG1+EMoIMAnP358iBCuhPY/Pn3pitk0zSvvEBVbce9aD6B6Mj66U0kRi+bMtO6VeT2 LMuTPxY1+w1Sag8YMhTlD9kB501eHNJTgYIUZq5PI6WRw4aYjPf1UMKQWpf45ipMUOvbXsunnuzYR yWn1lmeXknNiqBPJywMo3xMt1XDr2w5dVEorJ0EVJCCGlO+E6BYRq+gi1Vex5cPNfc1N3blabfZv5 crPaJtQRUnx2bth+YSSQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s97yW-0000000FHfx-3pvr; Mon, 20 May 2024 18:43:09 +0000 Received: from mail-lf1-x136.google.com ([2a00:1450:4864:20::136]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s97yT-0000000FHb8-0aFw; Mon, 20 May 2024 18:43:06 +0000 Received: by mail-lf1-x136.google.com with SMTP id 2adb3069b0e04-52232d0e5ceso4240492e87.0; 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=lists.infradead.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=QjMbKN8ut1+BcOsQilkPEOoX2M0yTnd/aMVi/+mjLzLXu96d9Jwt0j+jNsi+yJir8r c1cdVGYU+bFjwGJ1+1Ls6UZAQcH6MxrUd3L6cdUJt5DodIJvVQG07NPl/uPjDAko8ywU XZNHdzxmN22pOtcpOCmnk61AT78SXNf3nQPDO+ydERo1SUEWldnNw7Vw1GV9yFlNf/6W sNgFObURW1I4oaEQqaXqyUwDJ8LyxIPA7TVlTU/aVdntV/srDGfKDCmOQxyr300sQIf9 XwHUBzWfLfM9HkIELzN2hcbApuRVXyuWLt7Izv81PkyDObBGxwnxThoNdh7rhvwHLS6f bnKg== 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=I9ktp+5/BJf7O2hErRtcLskS7bzd4xJiiYZjQGECfXBm9+ucPKIrgis61S6+yOFveL TGiEmqSgLxhXyXOMiCyCNIo/9U8LTyuwfyTNnvy+uCyR+TP9aW6UHsExzRLTajXDTR3e b/LoHnvdV6epkqCl+rjQOp9PTYWliALXx4jcagQUTOkvHBz78/mWazggORI7MNCSlRf3 DuKKyfYZ2ABzCb+dy/qWbs9Z/Ui+MVNHaQgUeW1nWwWLYxAc8i9koJ8zw+H5Qj9fXiF8 Z5Mgp41QQs/bKRhLhQrOeXo+ew6l6/Hpxrgzj3kXOVoQXdtFRh1BTtnQt7nekYKah1F3 8lXg== X-Forwarded-Encrypted: i=1; AJvYcCXl7DsZK8mI4Q+Tm0ZS9G3Hs8M6rQYna8ZDXq0A/MJJKE0K0/tzJoJad0ftTxB/5oeZ+2nijxNYOXp1Q71xyPcsNHobOnx5/D2kWTuNroeBLtyEiWEEgQ0X7j89QRmnJOPACcR/HVaYEbuXBjaN9Z/mBl20btU= X-Gm-Message-State: AOJu0YwMVu9GfBXpUlXK0zwk8/IHOUa75WfvQp7Y4+6omky1bo3d31UB 99qH0tEPyL4WmSGqYA9Z1dTCR0V2f7WfBdeJwGrfeYCRUaYaExU= X-Google-Smtp-Source: AGHT+IEO4aSromU9C6oSddIXHc8xFrGRwBPnUP7EaMD4z8Yk2DobxFv1itZdDUx/ckVORlYAZQXfMg== 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> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240520_114305_287988_E94AFDB6 X-CRM114-Status: GOOD ( 15.55 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org 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 _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A4AF2C25B7A for ; Mon, 20 May 2024 18:43:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=L1DdlR53NB0SyKOPQzZkf6RMTtIw+HB8FFF20ihn4OI=; b=PZDMRTCZ3f7D6W 8onuVEm9yt00+luYllszPxer0vYcMjge4USpWxw0v4UbOy1ZYxEZWcZQvgRSW51GXSX/rzArrhdzL M+52YvboxMBDrNOvG96lgKAXLGAVBmeAm58CCSWUmbnBkOZm4A9CIomZQw4/LRe2BiDxuOQ59c3JU CZKH6suAngGjm7//Z1ftqODwA7OhEFXC8rWBhWRTrpT3GMJHcX9votjoy+3kelowsQi6kon/lWMRC nNQT3tJfLJq10HAgpmkpS3sELcAwkZ8IAH8KRPxMieOE/iurOBvgZ9bBCWBwJ8WV1hj0vo0NMU8JK uCaJHmBWMfsxGlwVsN0Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s97yV-0000000FHf9-3MOp; Mon, 20 May 2024 18:43:07 +0000 Received: from mail-lf1-x136.google.com ([2a00:1450:4864:20::136]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s97yT-0000000FHb8-0aFw; Mon, 20 May 2024 18:43:06 +0000 Received: by mail-lf1-x136.google.com with SMTP id 2adb3069b0e04-52232d0e5ceso4240492e87.0; 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=lists.infradead.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=QjMbKN8ut1+BcOsQilkPEOoX2M0yTnd/aMVi/+mjLzLXu96d9Jwt0j+jNsi+yJir8r c1cdVGYU+bFjwGJ1+1Ls6UZAQcH6MxrUd3L6cdUJt5DodIJvVQG07NPl/uPjDAko8ywU XZNHdzxmN22pOtcpOCmnk61AT78SXNf3nQPDO+ydERo1SUEWldnNw7Vw1GV9yFlNf/6W sNgFObURW1I4oaEQqaXqyUwDJ8LyxIPA7TVlTU/aVdntV/srDGfKDCmOQxyr300sQIf9 XwHUBzWfLfM9HkIELzN2hcbApuRVXyuWLt7Izv81PkyDObBGxwnxThoNdh7rhvwHLS6f bnKg== 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=I9ktp+5/BJf7O2hErRtcLskS7bzd4xJiiYZjQGECfXBm9+ucPKIrgis61S6+yOFveL TGiEmqSgLxhXyXOMiCyCNIo/9U8LTyuwfyTNnvy+uCyR+TP9aW6UHsExzRLTajXDTR3e b/LoHnvdV6epkqCl+rjQOp9PTYWliALXx4jcagQUTOkvHBz78/mWazggORI7MNCSlRf3 DuKKyfYZ2ABzCb+dy/qWbs9Z/Ui+MVNHaQgUeW1nWwWLYxAc8i9koJ8zw+H5Qj9fXiF8 Z5Mgp41QQs/bKRhLhQrOeXo+ew6l6/Hpxrgzj3kXOVoQXdtFRh1BTtnQt7nekYKah1F3 8lXg== X-Forwarded-Encrypted: i=1; AJvYcCXl7DsZK8mI4Q+Tm0ZS9G3Hs8M6rQYna8ZDXq0A/MJJKE0K0/tzJoJad0ftTxB/5oeZ+2nijxNYOXp1Q71xyPcsNHobOnx5/D2kWTuNroeBLtyEiWEEgQ0X7j89QRmnJOPACcR/HVaYEbuXBjaN9Z/mBl20btU= X-Gm-Message-State: AOJu0YwMVu9GfBXpUlXK0zwk8/IHOUa75WfvQp7Y4+6omky1bo3d31UB 99qH0tEPyL4WmSGqYA9Z1dTCR0V2f7WfBdeJwGrfeYCRUaYaExU= X-Google-Smtp-Source: AGHT+IEO4aSromU9C6oSddIXHc8xFrGRwBPnUP7EaMD4z8Yk2DobxFv1itZdDUx/ckVORlYAZQXfMg== 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> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240520_114305_287988_E94AFDB6 X-CRM114-Status: GOOD ( 15.55 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel