From patchwork Thu May 23 23:15:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Judith Mendez X-Patchwork-Id: 13672439 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 71A3FC25B79 for ; Thu, 23 May 2024 23:16:59 +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=lElcV3kgM1n3ZXoDsmVqij/LiLBKrOXUSyHT+HOkOcg=; b=x9PaYq0oFr0/oc hyADvNKvcqAdwv77aWH3E+2o0DfjSkZUA2pBuuLqJ3sBzbawJZZ73d/EmTZdJNWexboo1hC0edvWb 6lEbAPK4KzOSUtzI8i/kKuKfd/iD5BmlixSuCQ1CuqaX5yjR3f7x0Xze6g3YX42rk+Qy1RQep7jaT 7S5Jz+XBrbpnWqf3n/6IKiUVuXZGh7h9jWCR29ru8b6zVXrRNZ58h3r37Z1O/SOi6d6ZJQ2Z5uHaC lZokXLVHDfkl+/Fe6QghrfMsP5xkehUvsb5pxs1QG5Fvyega9xtGiPiiy1iHr4qrkS3CigJyM9Oq0 UowiZC7luithEe/nVyXA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sAHfy-00000007YN9-4BZL; Thu, 23 May 2024 23:16:47 +0000 Received: from lelv0142.ext.ti.com ([198.47.23.249]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sAHfa-00000007Y3O-0bwJ for linux-arm-kernel@lists.infradead.org; Thu, 23 May 2024 23:16:25 +0000 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 44NNFGZN117075; Thu, 23 May 2024 18:15:16 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1716506116; bh=5kbdjIH/ML8iAwsZorBTaSmYVbL7B/CuMu+J8qO8tbw=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=yPKHXumlaY/2MYgecu1nB0JiT3JAR5RZDi4tICk/JlYHfXkwo6KK9LLia/ey7MZiZ Rtg58MDos3COKSXzXyhcv40207wSP1JMYddtnycno19sFZnrPo94ueiB8irE0vHm1F h8JozC0GfWmr1jdCbJMT9AvlfT09PubNUjgXxPbg= Received: from DLEE102.ent.ti.com (dlee102.ent.ti.com [157.170.170.32]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 44NNFGjk022501 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 23 May 2024 18:15:16 -0500 Received: from DLEE106.ent.ti.com (157.170.170.36) by DLEE102.ent.ti.com (157.170.170.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Thu, 23 May 2024 18:15:16 -0500 Received: from lelvsmtp6.itg.ti.com (10.180.75.249) by DLEE106.ent.ti.com (157.170.170.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Thu, 23 May 2024 18:15:16 -0500 Received: from judy-hp.dhcp.ti.com (judy-hp.dhcp.ti.com [128.247.81.105]) by lelvsmtp6.itg.ti.com (8.15.2/8.15.2) with ESMTP id 44NNFGqM008143; Thu, 23 May 2024 18:15:16 -0500 From: Judith Mendez To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Catalin Marinas , Will Deacon , William Breathitt Gray CC: David Lechner , , , , , Nishanth Menon , Vignesh Raghavendra Subject: [PATCH v2 2/8] dt-bindings: counter: Add new ti,am62-eqep compatible Date: Thu, 23 May 2024 18:15:10 -0500 Message-ID: <20240523231516.545085-3-jm@ti.com> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240523231516.545085-1-jm@ti.com> References: <20240523231516.545085-1-jm@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240523_161622_661207_9D39C5D1 X-CRM114-Status: GOOD ( 13.24 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add new compatible ti,am62-eqep for TI K3 devices. If a device uses this compatible, require power-domains property. Since there is only one functional and interface clock for eqep, clock-names is not really required. The clock-name also changed for TI K3 SoCs so make clock-names optional for the new compatible since there is only one clock that is routed to the IP. While we are here, add an example using ti,am62-eqep compatible. Signed-off-by: Judith Mendez Acked-by: Conor Dooley --- Changes since v1: - Fix eqep binding for new compatible, require power-domains for new compatible --- .../devicetree/bindings/counter/ti-eqep.yaml | 53 +++++++++++++++++-- 1 file changed, 48 insertions(+), 5 deletions(-) diff --git a/Documentation/devicetree/bindings/counter/ti-eqep.yaml b/Documentation/devicetree/bindings/counter/ti-eqep.yaml index 85f1ff83afe72..c4bb0231f166a 100644 --- a/Documentation/devicetree/bindings/counter/ti-eqep.yaml +++ b/Documentation/devicetree/bindings/counter/ti-eqep.yaml @@ -11,7 +11,9 @@ maintainers: properties: compatible: - const: ti,am3352-eqep + enum: + - ti,am3352-eqep + - ti,am62-eqep reg: maxItems: 1 @@ -21,19 +23,43 @@ properties: maxItems: 1 clocks: - description: The clock that determines the SYSCLKOUT rate for the eQEP - peripheral. + description: The functional and interface clock that determines the clock + rate for the eQEP peripheral. maxItems: 1 clock-names: - const: sysclkout + enum: + - sysclkout + - fck + + power-domains: + maxItems: 1 + +allOf: + - if: + properties: + compatible: + contains: + enum: + - ti,am3352-eqep + then: + required: + - clock-names + - if: + properties: + compatible: + contains: + enum: + - ti,am62-eqep + then: + required: + - power-domains required: - compatible - reg - interrupts - clocks - - clock-names additionalProperties: false @@ -47,4 +73,21 @@ examples: interrupts = <79>; }; + - | + #include + #include + #include + + bus { + #address-cells = <2>; + #size-cells = <2>; + eqep1: counter@23210000 { + compatible = "ti,am62-eqep"; + reg = <0x00 0x23210000 0x00 0x100>; + power-domains = <&k3_pds 60 TI_SCI_PD_EXCLUSIVE>; + clocks = <&k3_clks 60 0>; + interrupts = ; + status = "disabled"; + }; + }; ...