From patchwork Wed Sep 7 13:12:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Romain Perier X-Patchwork-Id: 603519 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 72C3CC6FA89 for ; Wed, 7 Sep 2022 13:12:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229958AbiIGNMy (ORCPT ); Wed, 7 Sep 2022 09:12:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42646 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229703AbiIGNMu (ORCPT ); Wed, 7 Sep 2022 09:12:50 -0400 Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CF8267CAB3; Wed, 7 Sep 2022 06:12:48 -0700 (PDT) Received: by mail-wr1-x429.google.com with SMTP id c11so16103402wrp.11; Wed, 07 Sep 2022 06:12:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=ChvOmSu5GMdmA6vtxRRGmQLc6VAohBorLSB7RCrJOu8=; b=akGKdeXu89Uh6JyTP01iqJjWtIfb1YzVaMPl6uIA8nDO4WhVwYIF6fscB6M4WFNz1V +2aMhOQX39U5l1qNJ46YHpV2aHOZ6PirFJWivmk0cWAOrKjHaRjbDT3IzQYyQG4Z66EN Aoi/JpvemWPDWu4+zJclXOqksPRIljM1zK0v2KKW61LxGbJ5EZiwjig75NU8cMhuwws5 JYKWrTLrpz9mDfoAIloVIAbNAzilMwvRewj/9oBuIdqYHRJ/hpeTK2IwZ1uRF+vZV27D lXFtYvHBg/rtTTGNpOKwwXUSb08X45mA1PlrM2OYDy4j/4NllqMx7PWpRW7o8nb3hb/D Bm/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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; bh=ChvOmSu5GMdmA6vtxRRGmQLc6VAohBorLSB7RCrJOu8=; b=4DRTWdAsE8nndX+IM7Hfxqq4QDhs8krL7aeOhjuJgJeVh3jKncSBODBtlKQ+0FCyUT T4Qyz1jjrNYiNM8Bm3IEG8CyNTG1qJoShJx9mqykApu4aBzVAmlacMWIQgqHqjqJnLrN A3utv98MevJ4OVd0nJT4p27TfvO9TmIwK0rGsOgyOToHWrz07Mi6hdRABLAJ3GkIvp4K Hq4nOvPyB/U5wLRy1bgBAuDyUNjHNHEA/7QRn8HW+x3TRSk5kmWbtIKvCSQLfBBH/kRp jgrlYnnyv58uSw4AT4kyQ9SenlUeJi9xYU8CsBL6juN89Beo+KgUWzOVMqqGlK1g7U9w xGig== X-Gm-Message-State: ACgBeo2tTx0MidgeQ3fdyl8gsl2vuM5BHWgn/7qpBOTAn1prTaOYwQco ohD+q8loz+GLtd8I1vlqxlxsW2hsu8M= X-Google-Smtp-Source: AA6agR7F4oF9Ad/R2XJmtlXeddAaXEO1rNnkfG5wkXsaCDF4gY+KG0aQwBHya4Mr3b1EDa/759BhuQ== X-Received: by 2002:adf:b646:0:b0:221:76eb:b3ba with SMTP id i6-20020adfb646000000b0022176ebb3bamr2076477wre.237.1662556366956; Wed, 07 Sep 2022 06:12:46 -0700 (PDT) Received: from debby ([2a01:e0a:a6d:a8d0:7ff4:8f61:5574:9f95]) by smtp.gmail.com with ESMTPSA id m23-20020a05600c3b1700b003a5e7435190sm28667784wms.32.2022.09.07.06.12.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Sep 2022 06:12:46 -0700 (PDT) From: Romain Perier To: Thierry Reding , Lee Jones , Daniel Palmer , Romain Perier , Rob Herring Cc: linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-pwm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 1/5] dt-bindings: pwm: Add Mstar MSC313e PWM devicetree bindings documentation Date: Wed, 7 Sep 2022 15:12:37 +0200 Message-Id: <20220907131241.31941-2-romain.perier@gmail.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220907131241.31941-1-romain.perier@gmail.com> References: <20220907131241.31941-1-romain.perier@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org This adds the documentation for the devicetree bindings of the Mstar MSC313e PWM driver, it includes MSC313e SoCs and SSD20xd. Signed-off-by: Romain Perier Reviewed-by: Rob Herring --- .../bindings/pwm/mstar,msc313e-pwm.yaml | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 Documentation/devicetree/bindings/pwm/mstar,msc313e-pwm.yaml diff --git a/Documentation/devicetree/bindings/pwm/mstar,msc313e-pwm.yaml b/Documentation/devicetree/bindings/pwm/mstar,msc313e-pwm.yaml new file mode 100644 index 000000000000..07f3f576f21b --- /dev/null +++ b/Documentation/devicetree/bindings/pwm/mstar,msc313e-pwm.yaml @@ -0,0 +1,46 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/pwm/mstar,msc313e-pwm.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Mstar MSC313e PWM controller + +allOf: + - $ref: "pwm.yaml#" + +maintainers: + - Daniel Palmer + - Romain Perier + +properties: + compatible: + items: + - enum: + - mstar,msc313e-pwm + - mstar,ssd20xd-pwm + + reg: + maxItems: 1 + + clocks: + maxItems: 1 + + "#pwm-cells": + const: 2 + +required: + - compatible + - reg + - clocks + +additionalProperties: false + +examples: + - | + pwm: pwm@3400 { + compatible = "mstar,msc313e-pwm"; + reg = <0x3400 0x400>; + #pwm-cells = <2>; + clocks = <&xtal_div2>; + }; From patchwork Wed Sep 7 13:12:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Romain Perier X-Patchwork-Id: 603518 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3D3B5C6FA82 for ; Wed, 7 Sep 2022 13:12:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229640AbiIGNMz (ORCPT ); Wed, 7 Sep 2022 09:12:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42688 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229892AbiIGNMw (ORCPT ); Wed, 7 Sep 2022 09:12:52 -0400 Received: from mail-wr1-x435.google.com (mail-wr1-x435.google.com [IPv6:2a00:1450:4864:20::435]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E0BCB7F134; Wed, 7 Sep 2022 06:12:50 -0700 (PDT) Received: by mail-wr1-x435.google.com with SMTP id b17so6992085wrq.3; Wed, 07 Sep 2022 06:12:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=LwR7/AOTal+NwY86Mp0FPWEx+VIIdg+npTDhkz4uRZA=; b=j9qF+fk8yh03/leBQqIXtPMvvBhD5gSXNrahxJyOe9cRJ6n5TD/11Wq8it7YInP4Sq 9gBLObzPvIVgluWs5kKyquuPe1KuZVirw/j2xrUL5c3J6Bj8wlij7lYTMG/YKrdzgL6n VFKyBpEeMbBvsfI49oNtmBMQtvCTIz3+hk4OcHXlraNnOLc4xxMDEe+nID7kBgemXQ/m rQfeOhYr/0l9h83oswFfP40PPW8GAAB8Lt4cLHIMx0TFFKxzM1ci7zgPL84xlqmRw6zk pmcxGOmtUrpDQn8pPLj7SfRi4mGL3xiiup6KJIZkGqk+0O2QG35GoM+kP4kM0RS7oAto Fsjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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; bh=LwR7/AOTal+NwY86Mp0FPWEx+VIIdg+npTDhkz4uRZA=; b=lOtDU0kz93p/WxYgf3BJfPlhC1ZgY4BAzCdY3EzoIbBdkHxixdKo7yDlrf/YYRB1ii 36oUFGE2gEiY2AEn2cuHz8Zcl0oWaiN9s9SmCemgQ/q+AyTkaGq5tR8r1UYW1Eda66ly VwRpr0DVWFHZ/4ftg/M7BFs/aE9p6MK0BeN1l9D6Q3GqY8BdZwV1WLmmrZDWTGQv45LW mvsuZV4QN0qKB0Vp1g94NmS6+2TKkpFpot1CI8fvI4o7Foa6Yoy3cXPHRLmMW+KVf7td wWugN+RP+urUkPtlLMh9UhbMKvieVqvJGHAPsPAxI4OGTqDqs55Rnj2Vl5+zJeK01v8h G7WQ== X-Gm-Message-State: ACgBeo2HlgfsRE42+Pp5lqVPtEGfVVT+h2/HbUh910tYR4+SnwtiEGF5 imIG5GRvtPQFJymnxypYhnI+9LVwJzw= X-Google-Smtp-Source: AA6agR4V8GZNQUSgq/mg1BWNRizQZ43PEteRk2TrUnEBu3a9kle2wJbkTv937CeaDzNABkhdnSQ9jQ== X-Received: by 2002:a5d:6388:0:b0:228:c792:aabe with SMTP id p8-20020a5d6388000000b00228c792aabemr2041911wru.689.1662556369167; Wed, 07 Sep 2022 06:12:49 -0700 (PDT) Received: from debby ([2a01:e0a:a6d:a8d0:7ff4:8f61:5574:9f95]) by smtp.gmail.com with ESMTPSA id t4-20020a05600001c400b00228aea99efcsm10398230wrx.14.2022.09.07.06.12.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Sep 2022 06:12:48 -0700 (PDT) From: Romain Perier To: Thierry Reding , Lee Jones , Daniel Palmer , Romain Perier , Rob Herring Cc: linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-pwm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 3/5] ARM: dts: mstar: Add pwm device node to infinity Date: Wed, 7 Sep 2022 15:12:39 +0200 Message-Id: <20220907131241.31941-4-romain.perier@gmail.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220907131241.31941-1-romain.perier@gmail.com> References: <20220907131241.31941-1-romain.perier@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org This adds the definition of the pwm device node. The PWM being able to work with the oscillator at 12Mhz for now, it shares the same xtal than other devices (rtc or watchdog for instance). Signed-off-by: Romain Perier --- arch/arm/boot/dts/mstar-infinity.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/arch/arm/boot/dts/mstar-infinity.dtsi b/arch/arm/boot/dts/mstar-infinity.dtsi index 441a917b88ba..752f4c26b31c 100644 --- a/arch/arm/boot/dts/mstar-infinity.dtsi +++ b/arch/arm/boot/dts/mstar-infinity.dtsi @@ -38,6 +38,16 @@ opp-800000000 { }; }; +&soc { + pm_pwm: pwm@1f001da0 { + compatible = "mstar,msc313-pwm"; + reg = <0x1f001da0 0xc>; + #pwm-cells = <2>; + clocks = <&xtal_div2>; + status = "disabled"; + }; +}; + &cpu0 { operating-points-v2 = <&cpu0_opp_table>; }; From patchwork Wed Sep 7 13:12:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Romain Perier X-Patchwork-Id: 603517 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 81EE6C6FA89 for ; Wed, 7 Sep 2022 13:13:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230079AbiIGNNI (ORCPT ); Wed, 7 Sep 2022 09:13:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42830 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229746AbiIGNM6 (ORCPT ); Wed, 7 Sep 2022 09:12:58 -0400 Received: from mail-wr1-x42a.google.com (mail-wr1-x42a.google.com [IPv6:2a00:1450:4864:20::42a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 06E147E314; Wed, 7 Sep 2022 06:12:52 -0700 (PDT) Received: by mail-wr1-x42a.google.com with SMTP id t14so13045987wrx.8; Wed, 07 Sep 2022 06:12:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=XhHHfhBS4JEZS5T4Cqsky8UODYiFkR3zFwNbdfWOgRM=; b=cNPthfE851d7tnORcRK51E1iI5AqPMQEo0UIapDJ1GUAaS8Z4ZppZZ7rLg5TOY1tuS ZQK4JcssPZtZ+Kdff2MXU4oAn9W8OdKmOU47c4ciwwvc8VP5azQaVUJAe1PXJ4JAeNVJ NpWGMfDVf9SkB5y1Jf7d3M50H+FHDReUXNXtfON70iPH30Jr0e525XQLwBypbmfGG9kB DcCNrQwNETpxUHoco8WOnCDHLrYOt5wx2EdQUnsyo9+QtJbnCV5yED/uhhNjO0+/fHz8 cfgTeIlHOoCh9mMrKmIIkNc6du8op7r5JLownxHSaCuG26MzZ76XmnF4rXSsJlPTGjPh c39w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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; bh=XhHHfhBS4JEZS5T4Cqsky8UODYiFkR3zFwNbdfWOgRM=; b=AALWwaLBh/kYJ2zt2atQ6EYKBaXmK/B3z6IvOhNA/Bmbx15EuP5oDr3KkKEcB5wKE2 CzMiTDZhvIXx1/LEjCQpmTYIOA7yqtTqTTuBhOPjuRKWsk8OU2sGvNeUTzL9BBMJkJAQ UcHdyb6+p8C3+6hcIF5iozConXJut5piE5CnCPV60M0FKjWXHxr4PMQZKfjpX7et1VjL h7MbXmQdukHoLQ5LUHFGhqBChD5UuGwfM/qYOHwwB6ubAJP0SKoa80mmyBQa5Nz9j+PX gfx1l5VUR52QCVCAt0LISWh3jpKM/azJaPe5O9eywjAPcHk/EdI9j/a5j/xBH9MvSFyM /0HA== X-Gm-Message-State: ACgBeo1IbkYFp6lSmVoaAKz0rLldZpwi4U+jQue0dEHxADwZakaSh+pQ E5nGty56JDzvChKmAEKpHq6mbMt66vU= X-Google-Smtp-Source: AA6agR4RcR+HDYfOlSTd0KPvM/Pn5D6JH1gw1MsiVX4ajkgr5c2JDjkO5ziK3Y8MEQ6KyTtY0oTSDQ== X-Received: by 2002:adf:dbc4:0:b0:225:333d:8404 with SMTP id e4-20020adfdbc4000000b00225333d8404mr2215948wrj.671.1662556371220; Wed, 07 Sep 2022 06:12:51 -0700 (PDT) Received: from debby ([2a01:e0a:a6d:a8d0:7ff4:8f61:5574:9f95]) by smtp.gmail.com with ESMTPSA id d11-20020adffd8b000000b00228df23bd51sm3975325wrr.82.2022.09.07.06.12.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Sep 2022 06:12:50 -0700 (PDT) From: Romain Perier To: Thierry Reding , Lee Jones , Daniel Palmer , Romain Perier , Rob Herring Cc: linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-pwm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 5/5] ARM: dts: mstar: Add pwm device node to infinity2m Date: Wed, 7 Sep 2022 15:12:41 +0200 Message-Id: <20220907131241.31941-6-romain.perier@gmail.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220907131241.31941-1-romain.perier@gmail.com> References: <20220907131241.31941-1-romain.perier@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org This adds definition of the pwm device node, infinity2m has its own hardware variant, so use the one for ssd20xd. Signed-off-by: Romain Perier --- arch/arm/boot/dts/mstar-infinity2m.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/arm/boot/dts/mstar-infinity2m.dtsi b/arch/arm/boot/dts/mstar-infinity2m.dtsi index 1b485efd7156..70561e512483 100644 --- a/arch/arm/boot/dts/mstar-infinity2m.dtsi +++ b/arch/arm/boot/dts/mstar-infinity2m.dtsi @@ -32,6 +32,14 @@ cpu1: cpu@1 { }; &riu { + pwm: pwm@3400 { + compatible = "mstar,ssd20xd-pwm"; + reg = <0x3400 0x400>; + #pwm-cells = <2>; + clocks = <&xtal_div2>; + status = "disabled"; + }; + smpctrl: smpctrl@204000 { reg = <0x204000 0x200>; status = "disabled";