Received: by 10.192.165.156 with SMTP id m28csp152155imm; Sun, 15 Apr 2018 19:34:01 -0700 (PDT) X-Google-Smtp-Source: AIpwx48ZcBTPG6IASe3+QUPFhfV3Rn+bZIy/MsGAcb4OgGBiscJPE1Ac0JbXqo8vuFApCsxzdRVE X-Received: by 10.101.77.145 with SMTP id p17mr11499773pgq.275.1523846041655; Sun, 15 Apr 2018 19:34:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523846041; cv=none; d=google.com; s=arc-20160816; b=ApCyXKcfVOPIH776/NF0SH3OZ6muwBy32d9z1UPYq13JCtDJHZWEp8AIFMK19EE4Rx bbYd6nn+oc292MsL3LF2YarAPY3iA23FUGKJN+Tos5+ekW1utAuO4TSY5hSWh+/N1MgY 4J+Yl5w8ZLCORjxNfo4RKoxiQKCJYEQqrWgzTIIpLhMiPsJUgcFJzTu+FxQQ/efr8mRG iMthnRcq43Hqhgi6iCSkZs+0YtqQVH//H2ZtqoCzSwEpLyl3erxuk4V3signIgtKTLH1 rL25z+N/xWtL51oI2covOER0pyShiPbNBuNzDKphxsKED/RJJ62wZxADZ/WocESNgTnz 2fiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from:arc-authentication-results; bh=4xEZO34T7EI3S6jsR1w0CmUN8V6gRz3IXCM+xlnCifY=; b=SF7yPjp5RJSO0/dwqgxNT3OiSDNwK5y8S1brmQ7ZP6k4mk4uXuU8O2jyBmgBOF5VNQ TB6ZuJm438CZDiJ+bDdlMgGRfqa7clZ8hpv++UH4PTDQDuWbQaUVGw/RtWiUlHx2F0Jp Lp10vN2Il9hoJ28jsGSwADn9ntFmiR7vqAJrg6HrqrackUngzUMmPnymdK8C2r0Y8Zxe Iqw54vS1sQlYa3qYJV5S5yhT53bosn39BgCBGGLhdBmG6OL6u9Wq8RT81GgjlNde0+Sk Y2L2a3Uo1cdBVBA4cOV9UkoIvO+hJsDJvQA1Nx22vU5TkfflfLLEXWq9iWe3p/3ZP7Wj tisA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k2si5688225pgs.4.2018.04.15.19.33.47; Sun, 15 Apr 2018 19:34:01 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752972AbeDPCcU (ORCPT + 99 others); Sun, 15 Apr 2018 22:32:20 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:9955 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1752806AbeDPCcS (ORCPT ); Sun, 15 Apr 2018 22:32:18 -0400 X-UUID: cf9d7ab804fc4c90978d5b470ad8a305-20180416 Received: from mtkcas06.mediatek.inc [(172.21.101.30)] by mailgw02.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 1364318178; Mon, 16 Apr 2018 10:32:14 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by mtkmbs08n1.mediatek.inc (172.21.101.55) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Mon, 16 Apr 2018 10:32:12 +0800 Received: from mtkslt306.mediatek.inc (10.21.14.136) by mtkcas08.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1210.3 via Frontend Transport; Mon, 16 Apr 2018 10:32:12 +0800 From: Ryder Lee To: Stephen Boyd CC: Matthias Brugger , chunhui dai , , , , , Ryder Lee Subject: [PATCH] clk: mediatek: correct the clocks for MT2701 HDMI PHY module Date: Mon, 16 Apr 2018 10:31:58 +0800 Message-ID: X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 Content-Type: text/plain X-MTK: N Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The hdmitx_dig_cts clock signal is not a child of clk26m, and the actual output of the PLL block is derived from the tvdpll via a configurable PLL post-divider. It is used as the PLL reference input to the HDMI PHY module. Signed-off-by: Chunhui Dai Signed-off-by: Ryder Lee --- drivers/clk/mediatek/clk-mt2701.c | 8 ++++++-- include/dt-bindings/clock/mt2701-clk.h | 16 ++++++++-------- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/drivers/clk/mediatek/clk-mt2701.c b/drivers/clk/mediatek/clk-mt2701.c index deca752..4dda898 100644 --- a/drivers/clk/mediatek/clk-mt2701.c +++ b/drivers/clk/mediatek/clk-mt2701.c @@ -46,8 +46,6 @@ 340 * MHZ), FIXED_CLK(CLK_TOP_HDMI_0_PLL340M, "hdmi_0_pll340m", "clk26m", 340 * MHZ), - FIXED_CLK(CLK_TOP_HDMITX_CLKDIG_CTS, "hdmitx_dig_cts", "clk26m", - 300 * MHZ), FIXED_CLK(CLK_TOP_HADDS2_FB, "hadds2_fbclk", "clk26m", 27 * MHZ), FIXED_CLK(CLK_TOP_WBG_DIG_416M, "wbg_dig_ck_416m", "clk26m", @@ -977,6 +975,10 @@ static int mtk_pericfg_init(struct platform_device *pdev) 21, 0x2d0, 4, 0x0, 0x2d4, 0), }; +static const struct mtk_fixed_factor apmixed_fixed_divs[] = { + FACTOR(CLK_APMIXED_HDMI_REF, "hdmi_ref", "tvdpll", 1, 1), +}; + static int mtk_apmixedsys_init(struct platform_device *pdev) { struct clk_onecell_data *clk_data; @@ -988,6 +990,8 @@ static int mtk_apmixedsys_init(struct platform_device *pdev) mtk_clk_register_plls(node, apmixed_plls, ARRAY_SIZE(apmixed_plls), clk_data); + mtk_clk_register_factors(apmixed_fixed_divs, ARRAY_SIZE(apmixed_fixed_divs), + clk_data); return of_clk_add_provider(node, of_clk_src_onecell_get, clk_data); } diff --git a/include/dt-bindings/clock/mt2701-clk.h b/include/dt-bindings/clock/mt2701-clk.h index 24e93df..1956ebb 100644 --- a/include/dt-bindings/clock/mt2701-clk.h +++ b/include/dt-bindings/clock/mt2701-clk.h @@ -171,13 +171,12 @@ #define CLK_TOP_8BDAC 151 #define CLK_TOP_WBG_DIG_416M 152 #define CLK_TOP_DPI 153 -#define CLK_TOP_HDMITX_CLKDIG_CTS 154 -#define CLK_TOP_DSI0_LNTC_DSI 155 -#define CLK_TOP_AUD_EXT1 156 -#define CLK_TOP_AUD_EXT2 157 -#define CLK_TOP_NFI1X_PAD 158 -#define CLK_TOP_AXISEL_D4 159 -#define CLK_TOP_NR 160 +#define CLK_TOP_DSI0_LNTC_DSI 154 +#define CLK_TOP_AUD_EXT1 155 +#define CLK_TOP_AUD_EXT2 156 +#define CLK_TOP_NFI1X_PAD 157 +#define CLK_TOP_AXISEL_D4 158 +#define CLK_TOP_NR 159 /* APMIXEDSYS */ @@ -194,7 +193,8 @@ #define CLK_APMIXED_HADDS2PLL 11 #define CLK_APMIXED_AUD2PLL 12 #define CLK_APMIXED_TVD2PLL 13 -#define CLK_APMIXED_NR 14 +#define CLK_APMIXED_HDMI_REF 14 +#define CLK_APMIXED_NR 15 /* DDRPHY */ -- 1.9.1