Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp4035092rwb; Tue, 16 Aug 2022 13:11:24 -0700 (PDT) X-Google-Smtp-Source: AA6agR4L/3ueMDl9LWViijoMLA4WHeg29YjhDUqylLy53zN7kOWTNhEd4K3LZz2Lf0o47gbvg0WT X-Received: by 2002:a17:90b:1b01:b0:1f7:3e2c:7ea7 with SMTP id nu1-20020a17090b1b0100b001f73e2c7ea7mr236278pjb.59.1660680684295; Tue, 16 Aug 2022 13:11:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660680684; cv=none; d=google.com; s=arc-20160816; b=iB2caGoV7ZaizlwxosE2SjQYA4LGiw+Z9Or+i5trv9mGKL0ELwKWt9JyzB1IXIxGx5 HzvCdAHUXZaEAenpf5Em6k42RYk7bfy5wKBpZqdSiS3/rCDYgpyw3Am46c2ZV4F9ujpE EsLADiLrFQIQkVuaBbS/nCeGdHbMsjeXiCHlsXR2oQc0uOeX/R4g2iSOqhf45yKcXafj lVGJuXICbUus6+Jz6Q2GXpSFeEmFdQE8GCtphwPd3GWEfheReCbVMC8HgV/1zxy6++w4 CYj3cnR3a1uzx0SYXrxpz5tCAtht5WLGOEpknkRIYy/hWZDaexw7wKzlRRQMbw1SpNxT eFYg== 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=+lQMoGBR7YMUGFQP1uiSFLtd0MupXbssfmgl8Lus5Oo=; b=ipexPVd57SdW+O3PwVSm9D+EsQZ3J/Oa6/F8Jbru4I6e3qqRtER6vXFld0VHi29x6w DLilE61Fhd8eHsCoSIzaX6dZCnN2u8gAcX+TxH3tRjbCcIbT5E8uDHm5bumTyqqQgiGn 1jwiJBxjEZlUAckD+RCkIPD1ZAy/GoZRkdK3rEAnq4jvHvQogBUTleSSQJZFH+Aj/Gf9 sFCE/eYvpLO5qxHz2Zr18achSBoTK8AbrLGOk/9EUWQ2CbDJVxBZKo9NkslE/Gku34bK D64QOJluVGipaoWh7xn7yKJ0D+C0ShM6OABL5KG+oieSGB19d4AP/xQVIVCexrcb4bqH fvwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=fgcc95d6; 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=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q11-20020a170902eb8b00b001714352fc5asi12666988plg.404.2022.08.16.13.11.09; Tue, 16 Aug 2022 13:11:24 -0700 (PDT) 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=@collabora.com header.s=mail header.b=fgcc95d6; 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=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237194AbiHPTdS (ORCPT + 99 others); Tue, 16 Aug 2022 15:33:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59958 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237200AbiHPTdM (ORCPT ); Tue, 16 Aug 2022 15:33:12 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7E26A326; Tue, 16 Aug 2022 12:33:07 -0700 (PDT) Received: from notapiano.myfiosgateway.com (unknown [70.107.189.129]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: nfraprado) by madras.collabora.co.uk (Postfix) with ESMTPSA id 8B3F3660159E; Tue, 16 Aug 2022 20:33:04 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1660678386; bh=3Atu3UpSZ4NSwkk/RpeysbRl/HDbYyNWeDk1tmMm5o4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fgcc95d6bWLpL2xDmRdqaQW5J4WH8gXjJRycYLzE/iJzXIWBvMcrkyZVwDdARwqan 0VknMxD1CyUu8X33QvQRInyTC0WzTqt0V5gzryo//tE4IfvUIjgTQ6IngvvkzzpaR5 vvf1fjTzQoRl8cDC9jmRmnMqxwYiBg6CDtFXWS/K2sCtHDn5QLohxSEHlagRn1dhs5 5hBU9puHmaWM8qssGcT9OtLku5Hl1roGncbqQcLUkY+APDSQlwV2aR5AYv7NKqjPbi NktevX7MkbWtzoMzVllc2Zg4VofrS/H80VtTYP2JZuIiX1gK0ivCy0QxtMHwrvzsz4 7r7/cs9yoCnJg== From: =?UTF-8?q?N=C3=ADcolas=20F=2E=20R=2E=20A=2E=20Prado?= To: Michael Turquette Cc: Bo-Chen Chen , AngeloGioacchino Del Regno , =?UTF-8?q?N=C3=ADcolas=20F=20=2E=20R=20=2E=20A=20=2E=20Prado?= , Chen-Yu Tsai , Matthias Brugger , Miles Chen , Stephen Boyd , linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org Subject: [RESEND PATCH v3 2/2] clk: mediatek: clk-mt8195-vdo1: Reparent and set rate on vdo1_dpintf's parent Date: Tue, 16 Aug 2022 15:32:56 -0400 Message-Id: <20220816193257.658487-3-nfraprado@collabora.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220816193257.658487-1-nfraprado@collabora.com> References: <20220816193257.658487-1-nfraprado@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE 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 From: AngeloGioacchino Del Regno Like it was done for the vdo0_dp_intf0_dp_intf clock (used for eDP), add the CLK_SET_RATE_PARENT flag to CLK_VDO1_DPINTF (used for DP) and also fix its parent clock name as it has to be "top_dp" for two reasons: - This is its real parent! - Likewise to eDP/VDO0 counterpart, we need clock source selection on CLK_TOP_DP. Fixes: 269987505ba9 ("clk: mediatek: Add MT8195 vdosys1 clock support") Signed-off-by: AngeloGioacchino Del Regno Tested-by: Bo-Chen Chen Reviewed-by: Bo-Chen Chen Signed-off-by: NĂ­colas F. R. A. Prado --- drivers/clk/mediatek/clk-mt8195-vdo1.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/clk/mediatek/clk-mt8195-vdo1.c b/drivers/clk/mediatek/clk-mt8195-vdo1.c index 3378487d2c90..d54d7726d186 100644 --- a/drivers/clk/mediatek/clk-mt8195-vdo1.c +++ b/drivers/clk/mediatek/clk-mt8195-vdo1.c @@ -43,6 +43,10 @@ static const struct mtk_gate_regs vdo1_3_cg_regs = { #define GATE_VDO1_2(_id, _name, _parent, _shift) \ GATE_MTK(_id, _name, _parent, &vdo1_2_cg_regs, _shift, &mtk_clk_gate_ops_setclr) +#define GATE_VDO1_2_FLAGS(_id, _name, _parent, _shift, _flags) \ + GATE_MTK_FLAGS(_id, _name, _parent, &vdo1_2_cg_regs, _shift, \ + &mtk_clk_gate_ops_setclr, _flags) + #define GATE_VDO1_3(_id, _name, _parent, _shift) \ GATE_MTK(_id, _name, _parent, &vdo1_3_cg_regs, _shift, &mtk_clk_gate_ops_setclr) @@ -99,7 +103,7 @@ static const struct mtk_gate vdo1_clks[] = { GATE_VDO1_2(CLK_VDO1_DISP_MONITOR_DPI0, "vdo1_disp_monitor_dpi0", "top_vpp", 1), GATE_VDO1_2(CLK_VDO1_DPI1, "vdo1_dpi1", "top_vpp", 8), GATE_VDO1_2(CLK_VDO1_DISP_MONITOR_DPI1, "vdo1_disp_monitor_dpi1", "top_vpp", 9), - GATE_VDO1_2(CLK_VDO1_DPINTF, "vdo1_dpintf", "top_vpp", 16), + GATE_VDO1_2_FLAGS(CLK_VDO1_DPINTF, "vdo1_dpintf", "top_dp", 16, CLK_SET_RATE_PARENT), GATE_VDO1_2(CLK_VDO1_DISP_MONITOR_DPINTF, "vdo1_disp_monitor_dpintf", "top_vpp", 17), /* VDO1_3 */ GATE_VDO1_3(CLK_VDO1_26M_SLOW, "vdo1_26m_slow", "clk26m", 8), -- 2.37.1