From patchwork Thu Feb 8 23:24:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabrizio Castro X-Patchwork-Id: 198688 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:50ea:b0:106:860b:bbdd with SMTP id r10csp520334dyd; Thu, 8 Feb 2024 15:40:42 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVS4Hico5E7w5poyYQh34zGVW7YQCV6IX/fJdnBBfPqZhH00V9xftbTd66fWcb6zRrPPfMZeUQqExxsI+rQjgevCtjP9g== X-Google-Smtp-Source: AGHT+IFjJqmAaSwDpgmcA6IA5OiAsmyNgUpNUpoPlVIEpFhGu5ZyUvc+VHq5S3cVImC4vkLZzWF2 X-Received: by 2002:a05:6870:b620:b0:219:7915:e995 with SMTP id cm32-20020a056870b62000b002197915e995mr1026536oab.19.1707435642042; Thu, 08 Feb 2024 15:40:42 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707435642; cv=pass; d=google.com; s=arc-20160816; b=duUHDPhBD0IuXhyDPHd2r0cf3qbM7VstW4kAg7/va9r+ZB8vmr6Gh9CnD+0d1pgZ+T 1HN9D/YgX6BNGTnD7UAd7AWLlQV+Rq1PT63ucupA9ql1Hgi2MAXH32QT4qzdMWvRa93a aOeLI68KUzVXDveaGXk3GLEYZp8T46ptOJnu4VyfBdZcr69rv6/0rUhu9gXvxOVh7hGV hITipAJ2RRT4a83iqPzmaCE2ADNy/H8njYdLAslmKfwDbiWapaKPIrIXsFHRJ+6kXYNr Un8iQDOZtkcs0IK33b5HAFhNtlHGa0qmStWDaHHqZZhz4HRBF7jns9EyloCInPtF4OUP 2Fuw== 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; bh=Zc2O4R3NreHlCFqE2KxmbNjhr7n4s9YJIJqv7elcQ1g=; fh=UJKybl+JFTC2XccHgapG7P8xHXCkiurAqWtLqNXkdBw=; b=dU7sG2H1tdD/MPA/iE0+Stds/br1QfusSIH3K8VM68Gz6EgD8tfpUYcx78O6vPNe42 XvBDt18ejkkXm4uLzALsLqTM9xy/BLArzbTvnB4sYFchgH6QDsVZD2Gc0gTEUr9SqPbm 2eSUDlbQuogbZyUacgCzFQb65giUlN43efFeJfrQ7e9V8sGSfdgo8exHrGqXhnnumEPW uo5Xb1Q+Pxgu4R+W/H4idMquU1le8NG6tU5AHzzDmCg4QNSD88g55DBsW2Yiy7o5broR zQbifDWxgzle2cbA2dNxMvOT6H3vUSD8TYjsgv82i5WbqkeLA9y8Z5RX9fxgKSJLWjna UTvA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=renesas.com dmarc=pass fromdomain=renesas.com); spf=pass (google.com: domain of linux-kernel+bounces-58867-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-58867-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=renesas.com X-Forwarded-Encrypted: i=2; AJvYcCXGV9txVMb1pUTDHc+/TEbYZvUGJmJz2bpo/h9hBxMm1L6vJEKU3iY5Q/bMu/gt3ic/Nk51jWiW6GE98XvZxoVi9B6qdg== Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id v202-20020a6361d3000000b005d8bb95ce76si586655pgb.285.2024.02.08.15.40.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Feb 2024 15:40:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-58867-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=renesas.com dmarc=pass fromdomain=renesas.com); spf=pass (google.com: domain of linux-kernel+bounces-58867-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-58867-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=renesas.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 sv.mirrors.kernel.org (Postfix) with ESMTPS id EAEC02881D3 for ; Thu, 8 Feb 2024 23:39:45 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D862D55C2E; Thu, 8 Feb 2024 23:24:56 +0000 (UTC) Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6A8C655798; Thu, 8 Feb 2024 23:24:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=210.160.252.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707434695; cv=none; b=pXBq/SYe5hCEAlKqnKxH0hjseld4/svR0NA3DyjZYQhX2QQP/1q2f0xLSOlKn5l+fEhEnCMkxwrpiO9E9CmEx4OCihcGwZVeuR9/XsIgWp1s89Ollm6txL6kriyeWyYzhuUyd4bRUi0266e/MH4tkf8GDh/wFcE3M1szhUEoXxs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707434695; c=relaxed/simple; bh=svvyA2OoPQBEnjShQYCWi04NK7mkxjERO0s6YZk0HkM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=nLKaXQ3Wp785pkKfZ2CFj2siQ9Cfs0HmBsOxGn1/9LKJvoiGgpIkKw1PI/ks+T2AoMm1uD3cuMvYsMWCiJLCCZObRT6IyZjcoNWi27SXbGLPy1+MFX6b8/ETpTlx/oCXVAstzVAZ5TEQzrlvf+M9sW/dGZtnBeEYs2I28Y587Fg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=renesas.com; spf=pass smtp.mailfrom=renesas.com; arc=none smtp.client-ip=210.160.252.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=renesas.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=renesas.com X-IronPort-AV: E=Sophos;i="6.05,255,1701097200"; d="scan'208";a="197291926" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie6.idc.renesas.com with ESMTP; 09 Feb 2024 08:24:52 +0900 Received: from mulinux.home (unknown [10.226.92.227]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 1E00E4009BDC; Fri, 9 Feb 2024 08:24:47 +0900 (JST) From: Fabrizio Castro To: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Geert Uytterhoeven Cc: Biju Das , Magnus Damm , linux-pwm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Fabrizio Castro , Krzysztof Kozlowski Subject: [PATCH v6 1/4] dt-bindings: pwm: Add RZ/V2M PWM binding Date: Thu, 8 Feb 2024 23:24:08 +0000 Message-Id: <20240208232411.316936-2-fabrizio.castro.jz@renesas.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240208232411.316936-1-fabrizio.castro.jz@renesas.com> References: <20240208232411.316936-1-fabrizio.castro.jz@renesas.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790376035851695101 X-GMAIL-MSGID: 1790376035851695101 From: Biju Das Add device tree bindings for the RZ/V2{M, MA} PWM Timer (PWM). Signed-off-by: Biju Das Reviewed-by: Krzysztof Kozlowski Reviewed-by: Geert Uytterhoeven --- v5->v6: * No change v4->v5: * No change v3->v4: * No change v2->v3: * Added Rb tag from Geert. v1->v2: * Added Rb tag from Krzysztof and the keep the Rb tag as the below * changes are trivial * Updated the description for APB clock * Added resets required property * Updated the example with resets property .../bindings/pwm/renesas,rzv2m-pwm.yaml | 90 +++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 Documentation/devicetree/bindings/pwm/renesas,rzv2m-pwm.yaml diff --git a/Documentation/devicetree/bindings/pwm/renesas,rzv2m-pwm.yaml b/Documentation/devicetree/bindings/pwm/renesas,rzv2m-pwm.yaml new file mode 100644 index 000000000000..ddeed7550923 --- /dev/null +++ b/Documentation/devicetree/bindings/pwm/renesas,rzv2m-pwm.yaml @@ -0,0 +1,90 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/pwm/renesas,rzv2m-pwm.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Renesas RZ/V2{M, MA} PWM Timer (PWM) + +maintainers: + - Biju Das + +description: | + The RZ/V2{M, MA} PWM Timer (PWM) composed of 16 channels. It supports the + following functions + * The PWM has 24-bit counters which operate at PWM_CLK (48 MHz). + * The frequency division ratio for internal counter operation is selectable + as PWM_CLK divided by 1, 16, 256, or 2048. + * The period as well as the duty cycle is adjustable. + * The low-level and high-level order of the PWM signals can be inverted. + * The duty cycle of the PWM signal is selectable in the range from 0 to 100%. + * The minimum resolution is 20.83 ns. + * Three interrupt sources: Rising and falling edges of the PWM signal and + clearing of the counter + * Counter operation and the bus interface are asynchronous and both can + operate independently of the magnitude relationship of the respective + clock periods. + +properties: + compatible: + items: + - enum: + - renesas,r9a09g011-pwm # RZ/V2M + - renesas,r9a09g055-pwm # RZ/V2MA + - const: renesas,rzv2m-pwm + + reg: + maxItems: 1 + + '#pwm-cells': + const: 2 + + interrupts: + maxItems: 1 + + clocks: + items: + - description: APB clock + - description: PWM clock + + clock-names: + items: + - const: apb + - const: pwm + + power-domains: + maxItems: 1 + + resets: + maxItems: 1 + +required: + - compatible + - reg + - interrupts + - clocks + - clock-names + - power-domains + - resets + +allOf: + - $ref: pwm.yaml# + +additionalProperties: false + +examples: + - | + #include + #include + + pwm8: pwm@a4010400 { + compatible = "renesas,r9a09g011-pwm", "renesas,rzv2m-pwm"; + reg = <0xa4010400 0x80>; + interrupts = ; + clocks = <&cpg CPG_MOD R9A09G011_CPERI_GRPF_PCLK>, + <&cpg CPG_MOD R9A09G011_PWM8_CLK>; + clock-names = "apb", "pwm"; + power-domains = <&cpg>; + resets = <&cpg R9A09G011_PWM_GPF_PRESETN>; + #pwm-cells = <2>; + }; From patchwork Thu Feb 8 23:24:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Fabrizio Castro X-Patchwork-Id: 198686 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:50ea:b0:106:860b:bbdd with SMTP id r10csp520053dyd; Thu, 8 Feb 2024 15:40:03 -0800 (PST) X-Google-Smtp-Source: AGHT+IEGkZAiHch2lrLBRCFbJyJCPhqJQI+h+nl1BeOWclBuU3gckR+02fl7SQeO1b/GGbQpFKg3 X-Received: by 2002:a17:906:7d6:b0:a38:3701:8ad0 with SMTP id m22-20020a17090607d600b00a3837018ad0mr554621ejc.16.1707435602970; Thu, 08 Feb 2024 15:40:02 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707435602; cv=pass; d=google.com; s=arc-20160816; b=b2OKiv+Wam7h8268bTT+4zzC7AqIYw1dnWLaqzNyt6rqGQPikL8Ony6Vc4PhCnhZhR vgMTlr7c4AdkSYaQRapZPrGfx3LqcmmlECIUDMwqF8B0V36vp8eGmGeMQ88qOKbOtSZg qeE4D+SaBP23HNVfa5LOIufW0h9S8TCiiqKIIMBfkgN4pJPfLnh3fqxae0/qNEvVstew qhDRhHqCIlZoEkH3lX4k3Q5dcOd+WwBQCujz962hTu2PC81VtpOQp6FADOIztcLN6HPb NoP6SIFI27jMMWkQxNGwErNu+RsL5o4GS25Gw8wJBU3aCDeAPcxzezJlbYDmMMuD+zEW zjFg== 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; bh=P3UdA/mFLsnyfSbboMOTpVW2S2AdlV3tvpcwnaZpujc=; fh=p7w5yabxL/aZ+fP/t3U/YrO6GXAfTvW8ZNbmOWqSJsE=; b=P3H7EcGW0+49CUQWFTTEuQJPcuyhRN8S3l0CdlpJKyjz6MqRI6fpr9U077Ch087MEO 0s7M73FEFvedzXH5J86KdeRVJ5dcQUlBPJXv8oIfgf6CvhoVaPpb502XNdWY4oHskZUF 3Crg3LbprMT5qH3xI4z9Y2Fvb3bRvg4Wen+ww6XXbNgxtbNeixCHkFCx8vgwvD/g0uAw bZlpXWUtVOh+qYUgRJb+yrBytSFydwH2Mr1it4f1hz6Cx1lyKP2QglXy8tm/iGHw5RHH I0lHZyU0SWQS1llRekLiKPgJ0vzNgBaCl+X2Jj9JGkYHP3fGt2HOdy0sbrIl37hwNoky Iq8g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=renesas.com dmarc=pass fromdomain=renesas.com); spf=pass (google.com: domain of linux-kernel+bounces-58868-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-58868-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=renesas.com X-Forwarded-Encrypted: i=2; AJvYcCX1Ar1EQpbIgpdC5RQJSR921uTrlRdTQfnEQTAUqQgyosI+GNCtBf7s0gWb7gu4L73cfq3ESsZLGDXTWdi0MCpWgwMpPw== Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id x11-20020a170906134b00b00a3934bc6349si162381ejb.715.2024.02.08.15.40.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Feb 2024 15:40:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-58868-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=renesas.com dmarc=pass fromdomain=renesas.com); spf=pass (google.com: domain of linux-kernel+bounces-58868-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-58868-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=renesas.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 am.mirrors.kernel.org (Postfix) with ESMTPS id 683B81F2451C for ; Thu, 8 Feb 2024 23:40:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 66D6B55E54; Thu, 8 Feb 2024 23:25:05 +0000 (UTC) Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F358255C0A; Thu, 8 Feb 2024 23:24:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=210.160.252.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707434700; cv=none; b=dYP5pR0JX5j/1iqwegatuj2phsY7fENfX9jh9m6327Rrp/Rs+VrzuJ6Q0uV80K1g0ai6nzI+FsivTcf4Kgh2Qmca9Jn2ViKmwQAq7gPBU6Nb7x+sizvr+B44fpjI8IAZyCpWGRWj+10r+v1IrAZL8aqzL6HTYOJoxo2fFsAvKn0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707434700; c=relaxed/simple; bh=WBaTzJzhM55xdVCvz86FKgtFn3EQiv0Ts6ceDlSKVNg=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=TK6D/3Fl3DFQwHrrsLNqFA0kJ0gVnLFD0QxoShkTy3wS1Cc6mLOWn3yV0+3dIiumS62kNV5vvIXE6nfxV6CKYAHcoAAAtoDtz0gGgwVR4Sfy5P6FtsDdDRF6iJcoXdRjItMtmT7yyiUVBVt7RwLgQkYmZjEiV69bEyLQMg0Cbts= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=renesas.com; spf=pass smtp.mailfrom=renesas.com; arc=none smtp.client-ip=210.160.252.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=renesas.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=renesas.com X-IronPort-AV: E=Sophos;i="6.05,255,1701097200"; d="scan'208";a="197291931" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie6.idc.renesas.com with ESMTP; 09 Feb 2024 08:24:57 +0900 Received: from mulinux.home (unknown [10.226.92.227]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id CD10A4009BDC; Fri, 9 Feb 2024 08:24:54 +0900 (JST) From: Fabrizio Castro To: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Philipp Zabel , Geert Uytterhoeven Cc: Biju Das , Magnus Damm , linux-kernel@vger.kernel.org, linux-pwm@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Fabrizio Castro Subject: [PATCH v6 2/4] pwm: Add support for RZ/V2M PWM driver Date: Thu, 8 Feb 2024 23:24:09 +0000 Message-Id: <20240208232411.316936-3-fabrizio.castro.jz@renesas.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240208232411.316936-1-fabrizio.castro.jz@renesas.com> References: <20240208232411.316936-1-fabrizio.castro.jz@renesas.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790375995169522224 X-GMAIL-MSGID: 1790375995169522224 From: Biju Das The RZ/V2{M, MA} PWM Timer supports the following functions: * The PWM has 24-bit counters which operate at PWM_CLK (48 MHz). * The frequency division ratio for internal counter operation is selectable as PWM_CLK divided by 1, 16, 256, or 2048. * The period as well as the duty cycle is adjustable. * The low-level and high-level order of the PWM signals can be inverted. * The duty cycle of the PWM signal is selectable in the range from 0 to 100%. * The minimum resolution is 20.83 ns. * Three interrupt sources: Rising and falling edges of the PWM signal and clearing of the counter * Counter operation and the bus interface are asynchronous and both can operate independently of the magnitude relationship of the respective clock periods. Signed-off-by: Biju Das Signed-off-by: Fabrizio Castro --- v5->v6: * Added Fab's Signed-off-by. * Updated copyright year to 2024. * Added include of limits.h. * Added variable max_period to rzv2m_pwm_chip. * Simplified the calculations by calculating max_period during probe, based on the numerical limits of the formula and the u64 data type. * Added rzv2m_pwm_mul_u64_u64_div_u64_roundup. * Added rzv2m_pwm_prescale_to_shift to fix the calculation of the frequency divider. * Improved the calculations and the variable names of rzv2m_pwm_get_state. * Improved the calculations of rzv2m_pwm_config. * Removed .owner from rzv2m_pwm_ops. * Improved rzv2m_pwm_pm_runtime_resume and renamed its err variable to ret. * Removed of_match_ptr. * Added Fab as module author. v4->v5: * Sorted KConfig file * Sorted Make file * Updated copyright header 2022->2023. * Updated limitation section. * Replaced the variable chip->rzv2m_pwm in rzv2m_pwm_wait_delay() * Replaced polarity logic as per HW manual dutycycle = Ton/Ton+Toff, so eventhough native polarity is inverted from period point of view it is correct. * Added logic for supporting 0% , 100% and remaining duty cycle. * On config() replaced * pm_runtime_resume_and_get()->pm_runtime_get_sync() * Counter is stopped while updating period/polarity to avoid glitches. * Added error check for clk_prepare_enable() * Introduced is_ch_enabled variable to cache channel enable status. * clk_get_rate is called after enabling the clock and * clk_rate_exclusive_get() * Added comment for delay * Replaced 1000000000UL->NSEC_PER_SEC. * Improved error handling in probe(). v3->v4: * Documented the hardware properties in "Limitations" section * Dropped the macros F2CYCLE_NSEC, U24_MASK and U24_MAX. * Added RZV2M_PWMCYC_PERIOD macro for U24_MAX * Dropped rzv2m_pwm_freq_div variable and started using 1 << (4 * i) for calculating divider as it is power of 16. * Reordered the functions to have rzv2m_pwm_config() directly before rzv2m_pwm_apply(). * Improved the logic for calculating period and duty cycle in config() * Merged multiple RZV2M_PWMCTR register writes to a single write in * config() * replaced pwm_is_enabled()->pwm->state.enabled * Avoided assigning bit value as enum pwm_polarity instead used enum * constant. * Fixed various issues in probe error path. * Updated the logic for PWM cycle setting register * A 100% duty cycle is only possible with PWMLOW > PWMCYC. So restricting PWMCYC values < 0xffffff * The native polarity of the hardware is inverted (i.e. it starts with the low part). So switched the inversion bit handling. v2->v3: * Added return code for rzv2m_pwm_get_state() * Added comment in rzv2m_pwm_reset_assert_pm_disable() v1->v2: * Replaced devm_reset_control_get_optional_shared->devm_reset_control_get_shared drivers/pwm/Kconfig | 11 + drivers/pwm/Makefile | 1 + drivers/pwm/pwm-rzv2m.c | 469 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 481 insertions(+) create mode 100644 drivers/pwm/pwm-rzv2m.c diff --git a/drivers/pwm/Kconfig b/drivers/pwm/Kconfig index 4b956d661755..55d46e6183a2 100644 --- a/drivers/pwm/Kconfig +++ b/drivers/pwm/Kconfig @@ -524,6 +524,17 @@ config PWM_RZ_MTU3 To compile this driver as a module, choose M here: the module will be called pwm-rz-mtu3. +config PWM_RZV2M + tristate "Renesas RZ/V2M PWM support" + depends on ARCH_R9A09G011 || COMPILE_TEST + depends on HAS_IOMEM + help + This driver exposes the PWM controller found in Renesas + RZ/V2M like chips through the PWM API. + + To compile this driver as a module, choose M here: the module + will be called pwm-rzv2m. + config PWM_SAMSUNG tristate "Samsung PWM support" depends on PLAT_SAMSUNG || ARCH_S5PV210 || ARCH_EXYNOS || COMPILE_TEST diff --git a/drivers/pwm/Makefile b/drivers/pwm/Makefile index c5ec9e168ee7..cf5a4a1c3b1a 100644 --- a/drivers/pwm/Makefile +++ b/drivers/pwm/Makefile @@ -48,6 +48,7 @@ obj-$(CONFIG_PWM_RCAR) += pwm-rcar.o obj-$(CONFIG_PWM_RENESAS_TPU) += pwm-renesas-tpu.o obj-$(CONFIG_PWM_ROCKCHIP) += pwm-rockchip.o obj-$(CONFIG_PWM_RZ_MTU3) += pwm-rz-mtu3.o +obj-$(CONFIG_PWM_RZV2M) += pwm-rzv2m.o obj-$(CONFIG_PWM_SAMSUNG) += pwm-samsung.o obj-$(CONFIG_PWM_SIFIVE) += pwm-sifive.o obj-$(CONFIG_PWM_SL28CPLD) += pwm-sl28cpld.o diff --git a/drivers/pwm/pwm-rzv2m.c b/drivers/pwm/pwm-rzv2m.c new file mode 100644 index 000000000000..7aa07576a3c8 --- /dev/null +++ b/drivers/pwm/pwm-rzv2m.c @@ -0,0 +1,469 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Renesas RZ/V2M PWM Timer (PWM) driver + * + * Copyright (C) 2024 Renesas Electronics Corporation + * + * Hardware manual for this IP can be found here + * https://www.renesas.com/in/en/document/mah/rzv2m-users-manual-hardware?language=en + * + * Limitations: + * - Changes to the duty cycle configuration get effective only after the next + * period end. + * - The duty cycle can be changed only by modifying the PWMLOW register + *   value and changing the pulse width at low level. The duty cycle becomes + *   0% for the low width when the value of the PWMLOW register is 0x0h + *   and 100% for the low width when the value of the PWMLOW > PWMCYC. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define RZV2M_PWMCTR 0x0 +#define RZV2M_PWMCYC 0x4 +#define RZV2M_PWMLOW 0x8 +#define RZV2M_PWMCNT 0xc + +#define RZV2M_PWMCTR_PWMPS GENMASK(17, 16) +#define RZV2M_PWMCTR_PWMHL BIT(3) +#define RZV2M_PWMCTR_PWMTM BIT(2) +#define RZV2M_PWMCTR_PWME BIT(1) + +#define RZV2M_PWMCYC_PERIOD GENMASK(23, 0) +#define RZV2M_PWMLOW_PERIOD GENMASK(23, 0) + +struct rzv2m_pwm_chip { + u64 max_period; + struct pwm_chip chip; + void __iomem *mmio; + struct reset_control *rstc; + struct clk *apb_clk; + struct clk *pwm_clk; + unsigned long rate; + unsigned long delay; + unsigned long pwm_cyc; + enum pwm_polarity polarity; + bool is_ch_enabled; +}; + +static inline u64 rzv2m_pwm_mul_u64_u64_div_u64_roundup(u64 a, u64 b, u64 c) +{ + u64 ab = a * b; + + return ab / c + (ab % c ? 1 : 0); +} + +static inline struct rzv2m_pwm_chip *to_rzv2m_pwm_chip(struct pwm_chip *chip) +{ + return container_of(chip, struct rzv2m_pwm_chip, chip); +} + +static void rzv2m_pwm_wait_delay(struct rzv2m_pwm_chip *rzv2m_pwm) +{ + /* delay timer when change the setting register */ + ndelay(rzv2m_pwm->delay); +} + +static void rzv2m_pwm_write(struct rzv2m_pwm_chip *rzv2m_pwm, u32 reg, u32 data) +{ + writel(data, rzv2m_pwm->mmio + reg); +} + +static u32 rzv2m_pwm_read(struct rzv2m_pwm_chip *rzv2m_pwm, u32 reg) +{ + return readl(rzv2m_pwm->mmio + reg); +} + +static void rzv2m_pwm_modify(struct rzv2m_pwm_chip *rzv2m_pwm, u32 reg, u32 clr, + u32 set) +{ + rzv2m_pwm_write(rzv2m_pwm, reg, + (rzv2m_pwm_read(rzv2m_pwm, reg) & ~clr) | set); +} + +static u8 rzv2m_pwm_calculate_prescale(struct rzv2m_pwm_chip *rzv2m_pwm, + u64 period_cycles) +{ + u32 prescaled_period_cycles; + u8 prescale; + + prescaled_period_cycles = period_cycles >> 24; + if (prescaled_period_cycles >= 256) + prescale = 3; + else + prescale = (fls(prescaled_period_cycles) + 3) / 4; + + return prescale; +} + +static inline int rzv2m_pwm_prescale_to_shift(u8 prescale) +{ + return prescale == 3 ? 11 : prescale * 4; +} + +static int rzv2m_pwm_enable(struct rzv2m_pwm_chip *rzv2m_pwm) +{ + int rc; + + rc = pm_runtime_resume_and_get(rzv2m_pwm->chip.dev); + if (rc) + return rc; + + rzv2m_pwm_modify(rzv2m_pwm, RZV2M_PWMCTR, RZV2M_PWMCTR_PWME, + RZV2M_PWMCTR_PWME); + rzv2m_pwm_wait_delay(rzv2m_pwm); + rzv2m_pwm->is_ch_enabled = true; + + return 0; +} + +static void rzv2m_pwm_disable(struct rzv2m_pwm_chip *rzv2m_pwm) +{ + rzv2m_pwm_modify(rzv2m_pwm, RZV2M_PWMCTR, RZV2M_PWMCTR_PWME, 0); + rzv2m_pwm_wait_delay(rzv2m_pwm); + pm_runtime_put_sync(rzv2m_pwm->chip.dev); + rzv2m_pwm->is_ch_enabled = false; +} + +static int rzv2m_pwm_get_state(struct pwm_chip *chip, struct pwm_device *pwm, + struct pwm_state *state) +{ + struct rzv2m_pwm_chip *rzv2m_pwm = to_rzv2m_pwm_chip(chip); + u16 frequency_divisor; + u32 ctr, cyc, low; + u8 prescale; + + pm_runtime_get_sync(chip->dev); + ctr = rzv2m_pwm_read(rzv2m_pwm, RZV2M_PWMCTR); + state->enabled = FIELD_GET(RZV2M_PWMCTR_PWME, ctr); + state->polarity = FIELD_GET(RZV2M_PWMCTR_PWMHL, ctr) ? + PWM_POLARITY_INVERSED : PWM_POLARITY_NORMAL; + prescale = FIELD_GET(RZV2M_PWMCTR_PWMPS, ctr); + frequency_divisor = 1 << rzv2m_pwm_prescale_to_shift(prescale); + + cyc = rzv2m_pwm_read(rzv2m_pwm, RZV2M_PWMCYC); + state->period = rzv2m_pwm_mul_u64_u64_div_u64_roundup(cyc + 1, + NSEC_PER_SEC * frequency_divisor, + rzv2m_pwm->rate); + + low = rzv2m_pwm_read(rzv2m_pwm, RZV2M_PWMLOW); + state->duty_cycle = rzv2m_pwm_mul_u64_u64_div_u64_roundup(cyc + 1 - low, + NSEC_PER_SEC * frequency_divisor, + rzv2m_pwm->rate); + + return pm_runtime_put(chip->dev); +} + +static int rzv2m_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm, + const struct pwm_state *state) +{ + struct rzv2m_pwm_chip *rzv2m_pwm = to_rzv2m_pwm_chip(chip); + u64 period = state->period, duty_cycle = state->duty_cycle; + u16 frequency_divisor; + u64 pwm_cyc, pwm_low; + u8 prescale; + u32 pwm_ctr; + + /* + * Clamp period and duty cycle to their maximum values for our current + * configuration rather than letting our calculations overflow. + */ + if (period > rzv2m_pwm->max_period) { + period = rzv2m_pwm->max_period; + if (duty_cycle > rzv2m_pwm->max_period) + duty_cycle = period; + } + + /* + * Formula for calculating PWM Cycle Setting Register: + * PWM cycle = (PWM period(ns) / (PWM_CLK period(ns) × Div ratio)) - 1 + */ + pwm_cyc = (period * rzv2m_pwm->rate) / NSEC_PER_SEC; + pwm_cyc = pwm_cyc ? pwm_cyc : 1; + + prescale = rzv2m_pwm_calculate_prescale(rzv2m_pwm, pwm_cyc - 1); + frequency_divisor = 1 << rzv2m_pwm_prescale_to_shift(prescale); + if (frequency_divisor > 1) { + pwm_cyc = (period * rzv2m_pwm->rate) / + (NSEC_PER_SEC * frequency_divisor); + pwm_cyc = pwm_cyc ? pwm_cyc : 1; + } + + if (pwm_cyc && !FIELD_FIT(RZV2M_PWMCYC_PERIOD, pwm_cyc - 1)) + pwm_cyc = RZV2M_PWMCYC_PERIOD + 1; + + /* + * Formula for calculating PWMLOW register: + * PWMLOW register = PWM cycle * Low pulse width ratio (%) + */ + pwm_low = (duty_cycle * rzv2m_pwm->rate) / + (NSEC_PER_SEC * frequency_divisor); + + pwm_low = pwm_cyc - pwm_low; + if (!FIELD_FIT(RZV2M_PWMLOW_PERIOD, pwm_low)) + pwm_low = RZV2M_PWMLOW_PERIOD; + + pwm_cyc--; + + /* + * If the PWM channel is disabled, make sure to turn on the clock + * before writing the register. + */ + if (!pwm->state.enabled) + pm_runtime_get_sync(rzv2m_pwm->chip.dev); + + /* + * To change the setting value of the PWM cycle setting register + * (PWMm_PWMCYC) or polarity, set the PWME bit of the PWM control + * register (PWMm_PWMCTR) to 0b and stop the counter operation. + */ + if (rzv2m_pwm->polarity != state->polarity || rzv2m_pwm->pwm_cyc != pwm_cyc) { + rzv2m_pwm_modify(rzv2m_pwm, RZV2M_PWMCTR, RZV2M_PWMCTR_PWME, 0); + rzv2m_pwm_wait_delay(rzv2m_pwm); + } + + rzv2m_pwm_write(rzv2m_pwm, RZV2M_PWMCYC, pwm_cyc); + rzv2m_pwm_write(rzv2m_pwm, RZV2M_PWMLOW, pwm_low); + + pwm_ctr = FIELD_PREP(RZV2M_PWMCTR_PWMPS, prescale); + if (state->polarity == PWM_POLARITY_INVERSED) + pwm_ctr |= RZV2M_PWMCTR_PWMHL; + + rzv2m_pwm_modify(rzv2m_pwm, RZV2M_PWMCTR, RZV2M_PWMCTR_PWMTM | + RZV2M_PWMCTR_PWMPS | RZV2M_PWMCTR_PWMHL, pwm_ctr); + + if (rzv2m_pwm->polarity != state->polarity || rzv2m_pwm->pwm_cyc != pwm_cyc) { + rzv2m_pwm->polarity = state->polarity; + rzv2m_pwm->pwm_cyc = pwm_cyc; + rzv2m_pwm_modify(rzv2m_pwm, RZV2M_PWMCTR, RZV2M_PWMCTR_PWME, + RZV2M_PWMCTR_PWME); + } + + rzv2m_pwm_wait_delay(rzv2m_pwm); + + /* If the PWM is not enabled, turn the clock off again to save power. */ + if (!pwm->state.enabled) + pm_runtime_put(rzv2m_pwm->chip.dev); + + return 0; +} + +static int rzv2m_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm, + const struct pwm_state *state) +{ + struct rzv2m_pwm_chip *rzv2m_pwm = to_rzv2m_pwm_chip(chip); + bool enabled = pwm->state.enabled; + int ret; + + if (!state->enabled) { + if (enabled) + rzv2m_pwm_disable(rzv2m_pwm); + + return 0; + } + + ret = rzv2m_pwm_config(chip, pwm, state); + if (ret) + return ret; + + if (!enabled) + ret = rzv2m_pwm_enable(rzv2m_pwm); + + return ret; +} + +static const struct pwm_ops rzv2m_pwm_ops = { + .get_state = rzv2m_pwm_get_state, + .apply = rzv2m_pwm_apply, +}; + +static int rzv2m_pwm_pm_runtime_suspend(struct device *dev) +{ + struct rzv2m_pwm_chip *rzv2m_pwm = dev_get_drvdata(dev); + + clk_disable_unprepare(rzv2m_pwm->pwm_clk); + clk_disable_unprepare(rzv2m_pwm->apb_clk); + + return 0; +} + +static int rzv2m_pwm_pm_runtime_resume(struct device *dev) +{ + struct rzv2m_pwm_chip *rzv2m_pwm = dev_get_drvdata(dev); + int ret; + + ret = clk_prepare_enable(rzv2m_pwm->apb_clk); + if (ret) + return ret; + + ret = clk_prepare_enable(rzv2m_pwm->pwm_clk); + if (ret) + clk_disable_unprepare(rzv2m_pwm->apb_clk); + + return ret; +} + +static DEFINE_RUNTIME_DEV_PM_OPS(rzv2m_pwm_pm_ops, + rzv2m_pwm_pm_runtime_suspend, + rzv2m_pwm_pm_runtime_resume, NULL); + +static void rzv2m_pwm_reset_assert_pm_disable(void *data) +{ + struct rzv2m_pwm_chip *rzv2m_pwm = data; + + /* + * The below check is for making balanced PM usage count in probe/remove + * eg: boot loader is turning on PWM and probe increments the PM usage + * count. Before apply, if there is unbind/remove callback we need to + * decrement the PM usage count. + */ + if (rzv2m_pwm->is_ch_enabled) + pm_runtime_put(rzv2m_pwm->chip.dev); + + clk_rate_exclusive_put(rzv2m_pwm->pwm_clk); + clk_rate_exclusive_put(rzv2m_pwm->apb_clk); + pm_runtime_disable(rzv2m_pwm->chip.dev); + pm_runtime_set_suspended(rzv2m_pwm->chip.dev); + reset_control_assert(rzv2m_pwm->rstc); +} + +static int rzv2m_pwm_probe(struct platform_device *pdev) +{ + struct rzv2m_pwm_chip *rzv2m_pwm; + unsigned long apb_clk_rate; + int ret; + + rzv2m_pwm = devm_kzalloc(&pdev->dev, sizeof(*rzv2m_pwm), GFP_KERNEL); + if (!rzv2m_pwm) + return -ENOMEM; + + rzv2m_pwm->mmio = devm_platform_ioremap_resource(pdev, 0); + if (IS_ERR(rzv2m_pwm->mmio)) + return PTR_ERR(rzv2m_pwm->mmio); + + rzv2m_pwm->apb_clk = devm_clk_get(&pdev->dev, "apb"); + if (IS_ERR(rzv2m_pwm->apb_clk)) + return dev_err_probe(&pdev->dev, PTR_ERR(rzv2m_pwm->apb_clk), + "cannot get apb clock\n"); + + rzv2m_pwm->pwm_clk = devm_clk_get(&pdev->dev, "pwm"); + if (IS_ERR(rzv2m_pwm->pwm_clk)) + return dev_err_probe(&pdev->dev, PTR_ERR(rzv2m_pwm->pwm_clk), + "cannot get pwm clock\n"); + + rzv2m_pwm->rstc = devm_reset_control_get_shared(&pdev->dev, NULL); + if (IS_ERR(rzv2m_pwm->rstc)) + return dev_err_probe(&pdev->dev, PTR_ERR(rzv2m_pwm->rstc), + "get reset failed\n"); + + platform_set_drvdata(pdev, rzv2m_pwm); + ret = reset_control_deassert(rzv2m_pwm->rstc); + if (ret) { + return dev_err_probe(&pdev->dev, ret, + "cannot deassert reset control\n"); + } + + ret = clk_prepare_enable(rzv2m_pwm->apb_clk); + if (ret < 0) + goto err_reset; + + ret = clk_prepare_enable(rzv2m_pwm->pwm_clk); + if (ret < 0) + goto disable_apb_clk; + + clk_rate_exclusive_get(rzv2m_pwm->apb_clk); + clk_rate_exclusive_get(rzv2m_pwm->pwm_clk); + apb_clk_rate = clk_get_rate(rzv2m_pwm->apb_clk); + if (!apb_clk_rate) + goto err_rate_put; + + rzv2m_pwm->rate = clk_get_rate(rzv2m_pwm->pwm_clk); + if (!rzv2m_pwm->rate) + goto err_rate_put; + rzv2m_pwm->max_period = U64_MAX / rzv2m_pwm->rate; + + /* + * The registers other than the PWM interrupt register (PWMINT) are + * always synchronized with PWM_CLK at regular intervals. It takes some + * time (Min: 2 × PCLK + 4 × PWM_CLK to Max: 6 × PCLK + 9 × PWM_CLK) for + * the value set in the register to be reflected in the PWM circuit + * because there is a synchronizer between the register and the PWM + * circuit. + */ + rzv2m_pwm->delay = 6 * DIV_ROUND_UP(NSEC_PER_SEC, apb_clk_rate) + + 9 * DIV_ROUND_UP(NSEC_PER_SEC, rzv2m_pwm->rate); + + pm_runtime_set_active(&pdev->dev); + pm_runtime_enable(&pdev->dev); + + /* + * We need to keep the clock on, in case the bootloader has enabled the + * PWM and is running during probe(). + */ + if (!!(rzv2m_pwm_read(rzv2m_pwm, RZV2M_PWMCTR) & RZV2M_PWMCTR_PWME)) { + u32 val; + + pm_runtime_get_sync(&pdev->dev); + rzv2m_pwm->is_ch_enabled = true; + rzv2m_pwm->pwm_cyc = rzv2m_pwm_read(rzv2m_pwm, RZV2M_PWMCYC); + val = rzv2m_pwm_read(rzv2m_pwm, RZV2M_PWMCTR); + rzv2m_pwm->polarity = FIELD_GET(RZV2M_PWMCTR_PWMHL, val) ? + PWM_POLARITY_NORMAL : PWM_POLARITY_INVERSED; + } + + rzv2m_pwm->chip.dev = &pdev->dev; + ret = devm_add_action_or_reset(&pdev->dev, + rzv2m_pwm_reset_assert_pm_disable, + rzv2m_pwm); + if (ret) + return ret; + + rzv2m_pwm->chip.ops = &rzv2m_pwm_ops; + rzv2m_pwm->chip.npwm = 1; + ret = devm_pwmchip_add(&pdev->dev, &rzv2m_pwm->chip); + if (ret) + return dev_err_probe(&pdev->dev, ret, "failed to add PWM chip\n"); + + pm_runtime_idle(&pdev->dev); + + return 0; + +err_rate_put: + clk_rate_exclusive_put(rzv2m_pwm->pwm_clk); + clk_rate_exclusive_put(rzv2m_pwm->apb_clk); + clk_disable_unprepare(rzv2m_pwm->pwm_clk); +disable_apb_clk: + clk_disable_unprepare(rzv2m_pwm->apb_clk); +err_reset: + reset_control_assert(rzv2m_pwm->rstc); + return ret; +} + +static const struct of_device_id rzv2m_pwm_of_table[] = { + { .compatible = "renesas,rzv2m-pwm", }, + { /* Sentinel */ } +}; +MODULE_DEVICE_TABLE(of, rzv2m_pwm_of_table); + +static struct platform_driver rzv2m_pwm_driver = { + .driver = { + .name = "pwm-rzv2m", + .pm = pm_ptr(&rzv2m_pwm_pm_ops), + .of_match_table = rzv2m_pwm_of_table, + }, + .probe = rzv2m_pwm_probe, +}; +module_platform_driver(rzv2m_pwm_driver); + +MODULE_AUTHOR("Biju Das "); +MODULE_AUTHOR("Fabrizio Castro "); +MODULE_DESCRIPTION("Renesas RZ/V2M PWM Timer Driver"); +MODULE_LICENSE("GPL"); From patchwork Thu Feb 8 23:24:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabrizio Castro X-Patchwork-Id: 198687 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:50ea:b0:106:860b:bbdd with SMTP id r10csp520185dyd; Thu, 8 Feb 2024 15:40:23 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVdxE4rIF1rNoAFxkZA2DR4G+ecWbIBwxTZij43HJvj/W/fGHd6QbtmTBEI7SBPDln2pKNaWTFWnq698lR2JEgIkq8Kvw== X-Google-Smtp-Source: AGHT+IGZUUimQc3n5+4/vPwmvaxZDgszCpdfc1I8zFrrOorC3IUYOa76Wxoi8qF9xER4jURLuyYW X-Received: by 2002:a05:620a:1030:b0:785:a7fe:c14f with SMTP id a16-20020a05620a103000b00785a7fec14fmr19663qkk.21.1707435623233; Thu, 08 Feb 2024 15:40:23 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707435623; cv=pass; d=google.com; s=arc-20160816; b=olAEGzpXuraN0jM2Hch5xaRoOYKtJZY7yIs8E+qdnq2xdeaEpiwJXzH2Dj8nQFWAn7 BUGx8fjUePePcNqilb1EHjPbgEh2TfVhVZ2b152NhSNcDLuHM1glQjgqc1Jxtsr8EuHH YjW7++tqmpp5VM+INI00fMLwjw6phOWFC3ZRwTtVESclEEP/kHw7RRiF8jgYWP8ykZm4 rbWH09VCD4a6lb0vrJ6x6+8ccV4vFWyyQAGvkAwj1NgyVsoN1Js2JqZOYOV9TEXdpjCY MvtjYHvHILR8lX4MVeMJ37S+99GtUPIrMY5bafOZ+HQBwnQm7w6B09bMDd7sHITyGCkS 0JDw== 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; bh=y/GqI8ieWYnXyZEKjCMrQ0iyYoj7E7rIOoJdDwxuHAQ=; fh=8X8/MSy0xc7P+68EnJvdt6bFUzF8drRSEdLZ9MYxgbg=; b=XAzh6QcIue4LG9VhRNwi6ZtUpFVYojSRiHyHrri4DsWGG6EbdG+UwTjKNDgXs8JI+U INlR8Hag5oTy8OOXJECig//9XwV/GwzpTzxoufN8Uz5NwcviqG1HItv5I9g1vG/KX+le teO6jsoeCys3u+oz9KQdbJV56mqkS7IvRF2/hhDuA/oAo/XnxrLEFQ3CEdKcT4vruxoN CwKsvmX4E1ws9us88hjHLxsNGxXXpH98bqEFy5qpOR0o6XaEGH1Um1+7QbEcwfy4JePs 8BU8MRZObDQsWOjofT92MEChiI2IHlDjzLggwLPLH6sC0sZxPWU76EtuUVKNdRPgjbOW 9mkw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=renesas.com dmarc=pass fromdomain=renesas.com); spf=pass (google.com: domain of linux-kernel+bounces-58869-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-58869-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=renesas.com X-Forwarded-Encrypted: i=2; AJvYcCUPGQDAvnuzLcX4EYK3HsFFyCdVgnNu+3gYbOBFVYpYLvFNlxe7h48tf5GWEsLdcQfELyq5gaQ9FPLlnsFY+sLaw7x/Xg== Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id d5-20020a05620a166500b007847b274ea0si712875qko.298.2024.02.08.15.40.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Feb 2024 15:40:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-58869-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=renesas.com dmarc=pass fromdomain=renesas.com); spf=pass (google.com: domain of linux-kernel+bounces-58869-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-58869-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=renesas.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 ny.mirrors.kernel.org (Postfix) with ESMTPS id DDDCF1C245A7 for ; Thu, 8 Feb 2024 23:40:17 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id ACB4B56452; Thu, 8 Feb 2024 23:25:14 +0000 (UTC) Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DF98455E64; Thu, 8 Feb 2024 23:25:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=210.160.252.171 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707434713; cv=none; b=aCQO5pu6r6RYsOzB9unr+vvUdCaC+ohMIgUZm1d2Ir0YOoJriewC1HLOF4/sQ5yc5mgvwnBu3JGRF9iBdXDyhIALYC9yBAdpw6/Sav1Nqlu5JudNEQ/t6rnowl+MlM1aqO3rczzUxavSIH1CTkCnSsanQ/sNu0SySLweaWcv52s= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707434713; c=relaxed/simple; bh=NuN1mxlRgAizqoNK4SmyoLdJd2EHPH4LHxe6CQ0ptu0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=u0HUWXKWIB0kfKqHzz95AOTqQD6nw99m5zH0FeGLSVcs17jVqMfpWu2gMFYWJ5dGlXjdSllzYTLqUzrvZJZFEbTK0ZC319Xx3iz9tauZW/jyaw4v/XeZFM/735DoOO6X+1IRbUxTyfEiSK+HrgmdvZXczefcG7SUE3q9ij2Kl3M= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=renesas.com; spf=pass smtp.mailfrom=renesas.com; arc=none smtp.client-ip=210.160.252.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=renesas.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=renesas.com X-IronPort-AV: E=Sophos;i="6.05,255,1701097200"; d="scan'208";a="193379754" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie5.idc.renesas.com with ESMTP; 09 Feb 2024 08:25:03 +0900 Received: from mulinux.home (unknown [10.226.92.227]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id DEA944007F23; Fri, 9 Feb 2024 08:24:59 +0900 (JST) From: Fabrizio Castro To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Geert Uytterhoeven Cc: Biju Das , Magnus Damm , linux-renesas-soc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Fabrizio Castro Subject: [PATCH v6 3/4] arm64: dts: renesas: r9a09g011: Add pwm nodes Date: Thu, 8 Feb 2024 23:24:10 +0000 Message-Id: <20240208232411.316936-4-fabrizio.castro.jz@renesas.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240208232411.316936-1-fabrizio.castro.jz@renesas.com> References: <20240208232411.316936-1-fabrizio.castro.jz@renesas.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790376015882290536 X-GMAIL-MSGID: 1790376015882290536 From: Biju Das Add device nodes for the pwm timer channels that are not assigned to the ISP. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven --- v5->v6: * No change. v4->v5: * No change. v3->v4: * No change v2->v3: * Added Rb tag from Geert v1->v2: * Added resets property arch/arm64/boot/dts/renesas/r9a09g011.dtsi | 98 ++++++++++++++++++++++ 1 file changed, 98 insertions(+) diff --git a/arch/arm64/boot/dts/renesas/r9a09g011.dtsi b/arch/arm64/boot/dts/renesas/r9a09g011.dtsi index 50ed66d42a24..bb006772e31e 100644 --- a/arch/arm64/boot/dts/renesas/r9a09g011.dtsi +++ b/arch/arm64/boot/dts/renesas/r9a09g011.dtsi @@ -236,6 +236,104 @@ sys: system-controller@a3f03000 { reg = <0 0xa3f03000 0 0x400>; }; + pwm8: pwm@a4010400 { + compatible = "renesas,r9a09g011-pwm", + "renesas,rzv2m-pwm"; + reg = <0 0xa4010400 0 0x80>; + interrupts = ; + clocks = <&cpg CPG_MOD R9A09G011_CPERI_GRPF_PCLK>, + <&cpg CPG_MOD R9A09G011_PWM8_CLK>; + clock-names = "apb", "pwm"; + resets = <&cpg R9A09G011_PWM_GPF_PRESETN>; + power-domains = <&cpg>; + #pwm-cells = <2>; + status = "disabled"; + }; + + pwm9: pwm@a4010480 { + compatible = "renesas,r9a09g011-pwm", + "renesas,rzv2m-pwm"; + reg = <0 0xa4010480 0 0x80>; + interrupts = ; + clocks = <&cpg CPG_MOD R9A09G011_CPERI_GRPF_PCLK>, + <&cpg CPG_MOD R9A09G011_PWM9_CLK>; + clock-names = "apb", "pwm"; + resets = <&cpg R9A09G011_PWM_GPF_PRESETN>; + power-domains = <&cpg>; + #pwm-cells = <2>; + status = "disabled"; + }; + + pwm10: pwm@a4010500 { + compatible = "renesas,r9a09g011-pwm", + "renesas,rzv2m-pwm"; + reg = <0 0xa4010500 0 0x80>; + interrupts = ; + clocks = <&cpg CPG_MOD R9A09G011_CPERI_GRPF_PCLK>, + <&cpg CPG_MOD R9A09G011_PWM10_CLK>; + clock-names = "apb", "pwm"; + resets = <&cpg R9A09G011_PWM_GPF_PRESETN>; + power-domains = <&cpg>; + #pwm-cells = <2>; + status = "disabled"; + }; + + pwm11: pwm@a4010580 { + compatible = "renesas,r9a09g011-pwm", + "renesas,rzv2m-pwm"; + reg = <0 0xa4010580 0 0x80>; + interrupts = ; + clocks = <&cpg CPG_MOD R9A09G011_CPERI_GRPF_PCLK>, + <&cpg CPG_MOD R9A09G011_PWM11_CLK>; + clock-names = "apb", "pwm"; + resets = <&cpg R9A09G011_PWM_GPF_PRESETN>; + power-domains = <&cpg>; + #pwm-cells = <2>; + status = "disabled"; + }; + + pwm12: pwm@a4010600 { + compatible = "renesas,r9a09g011-pwm", + "renesas,rzv2m-pwm"; + reg = <0 0xa4010600 0 0x80>; + interrupts = ; + clocks = <&cpg CPG_MOD R9A09G011_CPERI_GRPF_PCLK>, + <&cpg CPG_MOD R9A09G011_PWM12_CLK>; + clock-names = "apb", "pwm"; + resets = <&cpg R9A09G011_PWM_GPF_PRESETN>; + power-domains = <&cpg>; + #pwm-cells = <2>; + status = "disabled"; + }; + + pwm13: pwm@a4010680 { + compatible = "renesas,r9a09g011-pwm", + "renesas,rzv2m-pwm"; + reg = <0 0xa4010680 0 0x80>; + interrupts = ; + clocks = <&cpg CPG_MOD R9A09G011_CPERI_GRPF_PCLK>, + <&cpg CPG_MOD R9A09G011_PWM13_CLK>; + clock-names = "apb", "pwm"; + resets = <&cpg R9A09G011_PWM_GPF_PRESETN>; + power-domains = <&cpg>; + #pwm-cells = <2>; + status = "disabled"; + }; + + pwm14: pwm@a4010700 { + compatible = "renesas,r9a09g011-pwm", + "renesas,rzv2m-pwm"; + reg = <0 0xa4010700 0 0x80>; + interrupts = ; + clocks = <&cpg CPG_MOD R9A09G011_CPERI_GRPF_PCLK>, + <&cpg CPG_MOD R9A09G011_PWM14_CLK>; + clock-names = "apb", "pwm"; + resets = <&cpg R9A09G011_PWM_GPF_PRESETN>; + power-domains = <&cpg>; + #pwm-cells = <2>; + status = "disabled"; + }; + csi0: spi@a4020000 { compatible = "renesas,rzv2m-csi"; reg = <0 0xa4020000 0 0x80>; From patchwork Thu Feb 8 23:24:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabrizio Castro X-Patchwork-Id: 198689 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:50ea:b0:106:860b:bbdd with SMTP id r10csp520577dyd; Thu, 8 Feb 2024 15:41:16 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVGawUbbfcCZnezW+nAP5k9Q21SaCaEQMjMYmmsM3pfgtKZB1FVSFU5H6od1yh4zhTPKIrWHAMy87I6+31bW6h4VRmdWQ== X-Google-Smtp-Source: AGHT+IHzXHZLCTOroowaOpYYxo5GpZYO6XdZVNSNGlkpiSkUk3w+jXnWAu3Rv/4nq/pIotiv0LKK X-Received: by 2002:a05:6a20:10a9:b0:199:d9c9:2b65 with SMTP id w41-20020a056a2010a900b00199d9c92b65mr74739pze.55.1707435675979; Thu, 08 Feb 2024 15:41:15 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707435675; cv=pass; d=google.com; s=arc-20160816; b=f0Ebvw3RxlFcyTyqbGhBeoMWoytvhQAnS3O3IbAOs24tlxBjuiyGTj+Yjp9XK2g3hQ 7Uw5PxCH+FUW/iCgCINNDU1XPU9+YhPZanXD6AVNDZtFLo3Va8LY/58sHfAPS0Zc3kQ4 ND1dl8TRAz4fCb+M5THC4QiZNjkcabqLO7C9ojMNoYfbNZG+l1EN+Ev036PHopH3Pfny tibRvUJQwwHdAykAslNFGnpMu/1B+XXFr1HcuW3Ajl4cZxuhuegXuoHEVJSJ0tcZEpFX mKL4e0MViJSGZgIyKf7wX08U3g/mzYopRUrBrIReSAbSwU2i8z5Gj34uscait/yj5Gu+ 6uAw== 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; bh=IYPtNcN61rwQFVdNdn9WTbzQQDF6QZ567DEA1mPq6oc=; fh=kgzeL7rfCgJLWQqqih7bOPPwSis2vVErjH+w8cDJ/ME=; b=UfRomL8gId5HUyNwaOfwMwnR35yMRcQXH/LjEKKIk8g5zWWzaV7fRLJqAaPj2v76mJ NY3H8gY0jjGMe0Whn34RlrMFpZlz4ch/+Pn6UPj7lId9+tqUGv+vOQX+I/bEGRbcHhvB LqEYF9MUbrxHSQ7StBIXOShgeXAQ/V/35B4+HRfPYMZXNHCblBzdTpzj2Xno4h6g2nwb nE+dQ3pQEcFc8jpD40tbIxgSsI4/Oc3Kt9XyIRYMbRZF5Y1WjTsp8upHvBm6j9Ryx+68 BCDI4Fp2KtzHWtqm9i9ICp2+sDEe2lgLgYDZ4ggo32AusIVzHKseXUCcMd+nwD1TGl0o Y8Iw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=renesas.com dmarc=pass fromdomain=renesas.com); spf=pass (google.com: domain of linux-kernel+bounces-58870-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-58870-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=renesas.com X-Forwarded-Encrypted: i=2; AJvYcCUUNZzSjMILWVI+TkIw61fA+9C6qtUlJFH9h28ERZq4l6Kko1P49dioqckLpegrY/CPb3YpZ3AX3Eb+1Ji5YEhnF3atMA== Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id i12-20020aa787cc000000b006e0442b5da3si486902pfo.214.2024.02.08.15.41.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Feb 2024 15:41:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-58870-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=renesas.com dmarc=pass fromdomain=renesas.com); spf=pass (google.com: domain of linux-kernel+bounces-58870-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-58870-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=renesas.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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 5FD942851B5 for ; Thu, 8 Feb 2024 23:40:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EFDD85647A; Thu, 8 Feb 2024 23:25:16 +0000 (UTC) Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6270555E6C; Thu, 8 Feb 2024 23:25:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=210.160.252.171 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707434715; cv=none; b=l/wqy7PxBvxJb8elSVjUwo074hA/1M8JH6QXAfcKCkdGH/SE2TxOE51kYmqTShOmnnkY3WAVKis4IcNQHI7QKh4eAplP5CjvHRM+SIKS8DPG/Pg5IpNpvgowWq+Y3zMWctj0hj96sKOb4v0wkK4+LCjDRgfoe1vHVEpF8RtxvhA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707434715; c=relaxed/simple; bh=syoVVf9VMb64NoUsLBQVCQqnSHZWsX5SLQZaMft+iQM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=MnXd4alCZvbvsrDTMHEajxkKXS8JAXISYCWccdtQ0n0iT8sbzCy/rxvesV73Nhp4MDxLY4+aS+7aVAPOw4vGhRyJWwMKIlbMY4GSfhCIebir61mSsDGO5Tysetha0nzZaL7t0UCBA9etOv2Bvw8ltt7EiOc0PNjgU4eA8no4GtE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=renesas.com; spf=pass smtp.mailfrom=renesas.com; arc=none smtp.client-ip=210.160.252.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=renesas.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=renesas.com X-IronPort-AV: E=Sophos;i="6.05,255,1701097200"; d="scan'208";a="193379771" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie5.idc.renesas.com with ESMTP; 09 Feb 2024 08:25:08 +0900 Received: from mulinux.home (unknown [10.226.92.227]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 130E04009BDC; Fri, 9 Feb 2024 08:25:04 +0900 (JST) From: Fabrizio Castro To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Geert Uytterhoeven Cc: Biju Das , Magnus Damm , linux-renesas-soc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Fabrizio Castro Subject: [PATCH v6 4/4] arm64: dts: renesas: rzv2m evk: Enable pwm Date: Thu, 8 Feb 2024 23:24:11 +0000 Message-Id: <20240208232411.316936-5-fabrizio.castro.jz@renesas.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240208232411.316936-1-fabrizio.castro.jz@renesas.com> References: <20240208232411.316936-1-fabrizio.castro.jz@renesas.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790376071363633116 X-GMAIL-MSGID: 1790376071363633116 From: Biju Das Enable pwm{8..14} on RZ/V2M EVK. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven --- v5->v6: * No change. v4->v5: * No change v3->v4: * No change v2->v3: * Added Rb tag from Geert. v1->v2: * No change .../boot/dts/renesas/r9a09g011-v2mevk2.dts | 70 +++++++++++++++++++ 1 file changed, 70 insertions(+) diff --git a/arch/arm64/boot/dts/renesas/r9a09g011-v2mevk2.dts b/arch/arm64/boot/dts/renesas/r9a09g011-v2mevk2.dts index 39fe3f94991e..6e636ac2d190 100644 --- a/arch/arm64/boot/dts/renesas/r9a09g011-v2mevk2.dts +++ b/arch/arm64/boot/dts/renesas/r9a09g011-v2mevk2.dts @@ -196,6 +196,34 @@ i2c2_pins: i2c2 { ; /* SCL */ }; + pwm8_pins: pwm8 { + pinmux = ; /* PM8 */ + }; + + pwm9_pins: pwm9 { + pinmux = ; /* PM9 */ + }; + + pwm10_pins: pwm10 { + pinmux = ; /* PM10 */ + }; + + pwm11_pins: pwm11 { + pinmux = ; /* PM11 */ + }; + + pwm12_pins: pwm12 { + pinmux = ; /* PM12 */ + }; + + pwm13_pins: pwm13 { + pinmux = ; /* PM13 */ + }; + + pwm14_pins: pwm14 { + pinmux = ; /* PM14 */ + }; + sdhi0_pins: sd0 { data { pinmux = , /* SD0DAT0 */ @@ -251,6 +279,48 @@ &pwc { status = "okay"; }; +&pwm8 { + pinctrl-0 = <&pwm8_pins>; + pinctrl-names = "default"; + status = "okay"; +}; + +&pwm9 { + pinctrl-0 = <&pwm9_pins>; + pinctrl-names = "default"; + status = "okay"; +}; + +&pwm10 { + pinctrl-0 = <&pwm10_pins>; + pinctrl-names = "default"; + status = "okay"; +}; + +&pwm11 { + pinctrl-0 = <&pwm11_pins>; + pinctrl-names = "default"; + status = "okay"; +}; + +&pwm12 { + pinctrl-0 = <&pwm12_pins>; + pinctrl-names = "default"; + status = "okay"; +}; + +&pwm13 { + pinctrl-0 = <&pwm13_pins>; + pinctrl-names = "default"; + status = "okay"; +}; + +&pwm14 { + pinctrl-0 = <&pwm14_pins>; + pinctrl-names = "default"; + status = "okay"; +}; + &sdhi0 { pinctrl-0 = <&sdhi0_pins>; pinctrl-1 = <&sdhi0_pins_uhs>;