From patchwork Mon Dec 26 09:57:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aradhya Bhatia X-Patchwork-Id: 36585 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp831729wrt; Mon, 26 Dec 2022 01:59:10 -0800 (PST) X-Google-Smtp-Source: AMrXdXtPIu6mOa5ccTp2CxLAZGwegAmdf6MP/rO0kRWaoiK9VtKv3qAlurGtKu599c+kNLPRkJHh X-Received: by 2002:a17:906:d963:b0:83d:97fd:d421 with SMTP id rp3-20020a170906d96300b0083d97fdd421mr14093064ejb.38.1672048750269; Mon, 26 Dec 2022 01:59:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672048750; cv=none; d=google.com; s=arc-20160816; b=mgfnN7KBEe5KbXexIpFw4KM3migqxRzqDZhkhwgneyngn6gbHW1pM9IsTVNoD7CJ8i fYplxeDcAqL1bKM4TCG9ijxs1/2Fnc1Sh6wdqBkdmLy3RdJetW+HQ5hm/j0DCXZPs6SY U4ZN/WVm94t/SjGA+TlxkILARxOp8vyZkdYmVKuf5UwrmJuUUKPu4OtSsgSdW3aWXVgg GaeTKNaL00855sN6/oUw4o+BFDlq4heZjToOqFk7mRhhBZR6qXm+rwoJlq3YswBt9+JP hQ/BDRhAE9hMwAJ0V1xQg9ddTGwyMi8iXWtxwYux+SDEPkOu8kc7/pdSfaXGiXXDPYWY qADQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=JxQrW/7JjDKzWfRlSNStXWL3EAObEqOtkObrTh1wfmw=; b=xfy7sJyu9chhMnn5qtxgIY1tdj/He2zRU/mZ9thaRerWEnJ1wnkNwJB8BmbO5cBL1M 76L1+RFGNs8iEkbu2C2D9EUAtTJBpPGvM3fQQfW9HKUqWs2ItRWIXnHokeP9Dkdee1BC BuotTY/s/CalBc8zHMx8xs9Ze2U8k/RuWjiZs5TthrNhPegsV874ChE3W+hcITdGFb74 zo0L8BOVXMyTRhZaBi/mRhvoADkPmZC73jGsqo71il2UlzQf5HAnc5JY0MMJqnvmEsU6 RWIkS27eU5xeS1WmIe5q38EosdX00moaYyRzwnruPQLZd56hA9kyd7CkHoXwMV0QdFfP zxTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=KkPTznZD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id oz31-20020a1709077d9f00b007c0b03b23b5si8546320ejc.542.2022.12.26.01.58.46; Mon, 26 Dec 2022 01:59:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=KkPTznZD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231789AbiLZJ6G (ORCPT + 99 others); Mon, 26 Dec 2022 04:58:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39534 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229500AbiLZJ6E (ORCPT ); Mon, 26 Dec 2022 04:58:04 -0500 Received: from lelv0143.ext.ti.com (lelv0143.ext.ti.com [198.47.23.248]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0636525FF; Mon, 26 Dec 2022 01:58:02 -0800 (PST) Received: from fllv0035.itg.ti.com ([10.64.41.0]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 2BQ9vmxU036128; Mon, 26 Dec 2022 03:57:48 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1672048668; bh=JxQrW/7JjDKzWfRlSNStXWL3EAObEqOtkObrTh1wfmw=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=KkPTznZDXIvrWMHoyy7qRz4kPc2nIrdoUciqKGf/ExhN3OP6HcwsoKDEOea+Mbf2J FztuOm1e4Av7DrpEm936xA9uSsgld/3A9dbhRYOHkF/6ES6/WvJfIbYStGOIpyyzRW jw492YUbjwRb+vjft7iQ12NpsDkk29P2p9zJeIbc= Received: from DFLE105.ent.ti.com (dfle105.ent.ti.com [10.64.6.26]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 2BQ9vm8q126041 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 26 Dec 2022 03:57:48 -0600 Received: from DFLE112.ent.ti.com (10.64.6.33) by DFLE105.ent.ti.com (10.64.6.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16; Mon, 26 Dec 2022 03:57:47 -0600 Received: from lelv0326.itg.ti.com (10.180.67.84) by DFLE112.ent.ti.com (10.64.6.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16 via Frontend Transport; Mon, 26 Dec 2022 03:57:48 -0600 Received: from localhost (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id 2BQ9vlvx003621; Mon, 26 Dec 2022 03:57:47 -0600 From: Aradhya Bhatia To: Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski CC: Tomi Valkeinen , Samuel Holland , Maxime Ripard , Linux Clock List , Devicetree List , Linux Kernel List , Nishanth Menon , Vignesh Raghavendra , Devarsh Thakkar , Jai Luthra , Aradhya Bhatia Subject: [PATCH 1/2] dt-bindings: clock: fixed-factor: Add TI AM62 SoC OLDI clock Date: Mon, 26 Dec 2022 15:27:44 +0530 Message-ID: <20221226095745.19757-2-a-bhatia1@ti.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20221226095745.19757-1-a-bhatia1@ti.com> References: <20221226095745.19757-1-a-bhatia1@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1753270190570735690?= X-GMAIL-MSGID: =?utf-8?q?1753270190570735690?= Add "ti,k3-am62-oldi-clk-div" to the fixed factor clock compatible enum list. "ti,k3-am62-oldi-clk-div" is a fixed-factor clock that helps the TI display subsystem request a pixel clock for itself and a corresponding serial clock for its OLDI Transmitters. The serial clock is 7 times the pixel clock. This clock needs the clock set rate request to be propagated to the parent clock provider. Signed-off-by: Aradhya Bhatia Acked-by: Rob Herring --- Documentation/devicetree/bindings/clock/fixed-factor-clock.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/clock/fixed-factor-clock.yaml b/Documentation/devicetree/bindings/clock/fixed-factor-clock.yaml index 8f71ab300470..0696237530f7 100644 --- a/Documentation/devicetree/bindings/clock/fixed-factor-clock.yaml +++ b/Documentation/devicetree/bindings/clock/fixed-factor-clock.yaml @@ -14,6 +14,7 @@ properties: compatible: enum: - fixed-factor-clock + - ti,k3-am62-oldi-clk-div "#clock-cells": const: 0 From patchwork Mon Dec 26 09:57:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aradhya Bhatia X-Patchwork-Id: 36586 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp832437wrt; Mon, 26 Dec 2022 02:01:06 -0800 (PST) X-Google-Smtp-Source: AMrXdXthxI8y+AQO4dpHrQzWkjWQWZdvkSOZ2LGmhz3zu7Xo7L9/+vmIc1BmiAHfeU91qJXJLBo6 X-Received: by 2002:a17:906:3f97:b0:83f:41a2:a68b with SMTP id b23-20020a1709063f9700b0083f41a2a68bmr14515888ejj.30.1672048866575; Mon, 26 Dec 2022 02:01:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672048866; cv=none; d=google.com; s=arc-20160816; b=nBTYBWvz2NA8x3ZlOqFmCSdBoDRX43Uouli6tAPHpU5KYFaXxdt88RYl7F8rGpthSW 84Vf/oti0Qedm3DuuJ57rNsEER2ETcv2t82q4YV1UXcrToapnT2DGC1KeeQzOI8Mi+A2 yiEgH7qWmBN7FlW0wo/98AV0mHi0+Rog3Z46Y6efJ24KFwpQvlmRaCcGUw2NFi8PkLu9 rldnSjNLXZwRJ38R1/2UOUo4NTLdLWKRvt5ELz52Fuy4bm7SP9gENrOh/lYHrJGrYRTO fQeiI5RtMMRHIQ/YNg8MM7tAMNK8R7TV9EL2GxPVH9/X8aZ3+eE1+OWovBSLB3+iMeZx x3Cw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=EhrgxjMr+d+cFtBbp3yJIKjSN0BrfSAFflBEkgd14AM=; b=ixj6jE3H1soVkhJrOymOqHpSQ5HYpByYBqM4aopeMsp/mg0j3lI+u6zDXaxeaoRYHb grYl8Z1D/kG91PwHqPDzcMLaiB9Gy2gE+KuTcPvY9Df0NQ3UYmQq6Ee7lAbsrn1B6C8Y ffA/5c0cEyFSY3DjbzXxM22y/BjlITtmmqk6k2Y8JEdvJcJYEW719c+jnsFDryWJxO/e zVlehm84JE45Fz4lXyXSyriyeeUn67TRUv9Wkxx+nPALWXTEmTzcSn3AguOZu70ytUUM ai7Sjxr+7JGyxUl8jXKibh5wWgymtA/uJBKcbFaXygkNAx7VrZLixKnJcdrYEx8RYirg 8H7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=ioqaHRLu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id rh16-20020a17090720f000b007c4fe4301b2si6473576ejb.949.2022.12.26.02.00.38; Mon, 26 Dec 2022 02:01:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=ioqaHRLu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231859AbiLZJ6M (ORCPT + 99 others); Mon, 26 Dec 2022 04:58:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39538 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229556AbiLZJ6F (ORCPT ); Mon, 26 Dec 2022 04:58:05 -0500 Received: from fllv0016.ext.ti.com (fllv0016.ext.ti.com [198.47.19.142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 417D5267F; Mon, 26 Dec 2022 01:58:04 -0800 (PST) Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 2BQ9vo1x078249; Mon, 26 Dec 2022 03:57:50 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1672048670; bh=EhrgxjMr+d+cFtBbp3yJIKjSN0BrfSAFflBEkgd14AM=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=ioqaHRLumQfn/Offg7Xgn+W2uwYO0hj9QnivKsZ6QFOM01hDCaEKMd07+XHMx4U80 D+2u1yaROj7PfOHgNHD+33Za7ghzqg2Rx87VW8Zwfi4h9N5383AS2jpyeZ/cRvhOFo qkhUvXEJ+/6K7VxCUqZBXgyLiF2lOA55+2Js0BAo= Received: from DLEE100.ent.ti.com (dlee100.ent.ti.com [157.170.170.30]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 2BQ9voZV126102 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 26 Dec 2022 03:57:50 -0600 Received: from DLEE102.ent.ti.com (157.170.170.32) by DLEE100.ent.ti.com (157.170.170.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16; Mon, 26 Dec 2022 03:57:49 -0600 Received: from lelv0327.itg.ti.com (10.180.67.183) 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.16 via Frontend Transport; Mon, 26 Dec 2022 03:57:49 -0600 Received: from localhost (ileaxei01-snat.itg.ti.com [10.180.69.5]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id 2BQ9vmbc088703; Mon, 26 Dec 2022 03:57:49 -0600 From: Aradhya Bhatia To: Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski CC: Tomi Valkeinen , Samuel Holland , Maxime Ripard , Linux Clock List , Devicetree List , Linux Kernel List , Nishanth Menon , Vignesh Raghavendra , Devarsh Thakkar , Jai Luthra , Aradhya Bhatia Subject: [PATCH 2/2] clk: fixed-factor: Re-introduce support for clocks to set parent clock-rate Date: Mon, 26 Dec 2022 15:27:45 +0530 Message-ID: <20221226095745.19757-3-a-bhatia1@ti.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20221226095745.19757-1-a-bhatia1@ti.com> References: <20221226095745.19757-1-a-bhatia1@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1753270312114721237?= X-GMAIL-MSGID: =?utf-8?q?1753270312114721237?= Add support for the clock "ti,k3-am62-oldi-clk-div". Also add support for this clock to propagate the clock set request to its parent clock, by setting the CLK_SET_RATE_PARENT flag. Signed-off-by: Aradhya Bhatia --- drivers/clk/clk-fixed-factor.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/drivers/clk/clk-fixed-factor.c b/drivers/clk/clk-fixed-factor.c index f734e34735a9..1a78e2d870dd 100644 --- a/drivers/clk/clk-fixed-factor.c +++ b/drivers/clk/clk-fixed-factor.c @@ -245,10 +245,16 @@ struct clk_hw *devm_clk_hw_register_fixed_factor(struct device *dev, EXPORT_SYMBOL_GPL(devm_clk_hw_register_fixed_factor); #ifdef CONFIG_OF +static const struct of_device_id set_rate_parent_matches[] = { + { .compatible = "ti,k3-am62-oldi-clk-div" }, + { /* Sentinel */ }, +}; + static struct clk_hw *_of_fixed_factor_clk_setup(struct device_node *node) { struct clk_hw *hw; const char *clk_name = node->name; + unsigned long flags = 0; u32 div, mult; int ret; @@ -264,10 +270,13 @@ static struct clk_hw *_of_fixed_factor_clk_setup(struct device_node *node) return ERR_PTR(-EIO); } + if (of_match_node(set_rate_parent_matches, node)) + flags |= CLK_SET_RATE_PARENT; + of_property_read_string(node, "clock-output-names", &clk_name); hw = __clk_hw_register_fixed_factor(NULL, node, clk_name, NULL, NULL, 0, - 0, mult, div, false); + flags, mult, div, false); if (IS_ERR(hw)) { /* * Clear OF_POPULATED flag so that clock registration can be