From patchwork Sat Dec 7 20:36:02 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 180953 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp2472946ile; Sat, 7 Dec 2019 12:36:42 -0800 (PST) X-Google-Smtp-Source: APXvYqy/uAE9yZ3vRUmajsleRyIIDdlOklLfAWfPE33Xj4ICwxPKy4oVv+9Fy7YrS7HcZDVLI1Mz X-Received: by 2002:a05:6830:1689:: with SMTP id k9mr10819392otr.311.1575751001924; Sat, 07 Dec 2019 12:36:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575751001; cv=none; d=google.com; s=arc-20160816; b=Yr+rF5uIJ0GAjjoQ1UsuDbPnEsPALPkbhE9EBeV/kCxcNWZ00OHu3nT78O3SIietTt hTsCUJ7zDmb0dAMOdhlRVC88bRtSa9LJFi4qOwZFPwPfW6ac7byNGoXBp7fCMbF2C4eM A7bex+CNiAcXkxIWgvnQuh7nfs8rt0cLjh+cKaEjoqADZLQ6AfdIcxXFFejySIupSrt/ 7mlSvANufadI9AxvBBvR7xpx+n6LgQDIwrECOdhb0xyEEARDmWUUwqury3HobfQR+s4/ p2LBakcDMNIM3KgMSs4BbnBcdKdsSXaCdx76tMZDLLaNgBJldVXX2p5K3AwS5oBSrBBI 979Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=y5s38wz/6dk76o2wu93apOYv5A1m/3RpeMLEd54gKHA=; b=ebs6P8pqDfHrQVWXQm10LyRU6JWJjlxqaepDX34En6nlPPBHK+okdRLPO9NAKTQOpL 4wPCqflRmgNvsdPZ8VmBnJgrZOxzjcRpkFnGLzW0mtUZ29DEtRqMhOc9j/2DffZKVXpS g+tojHTQHC7cxkjXexX0alXFiSFdu7elo4s3lfuLdKXKwMv09vu6pR2mfX8SzAedUBEQ zPf+UBEq+Bfc7NXBbxjxGrrvN75fYPnCwiTbEKwoIzWRzDftv7SIkn8yZ/z1KRFPSsXe XlgH3JXKO1whU5BZgIf5W3baq5HY7Ug2ZeaABW8c1CulMJz2zAqiF1ySbHuH213TPCmT Hy7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=s5bZeDr0; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u190si9539827oie.117.2019.12.07.12.36.41; Sat, 07 Dec 2019 12:36:41 -0800 (PST) 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; dkim=pass header.i=@linaro.org header.s=google header.b=s5bZeDr0; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727000AbfLGUgf (ORCPT + 27 others); Sat, 7 Dec 2019 15:36:35 -0500 Received: from mail-pg1-f193.google.com ([209.85.215.193]:46279 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726951AbfLGUgc (ORCPT ); Sat, 7 Dec 2019 15:36:32 -0500 Received: by mail-pg1-f193.google.com with SMTP id z124so5055634pgb.13 for ; Sat, 07 Dec 2019 12:36:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=y5s38wz/6dk76o2wu93apOYv5A1m/3RpeMLEd54gKHA=; b=s5bZeDr0Sln+9g/a0EciNEuzuvps+Nd8eSHR6z8G3Ycx0YyHpqr46Js6YGYw7nPhr9 N2/9cpqmyhIf1JnmNWUN+m+HPBXc6M7Qszc44JENP5u7QgwkD95SjIJE7pr4InM6WYfQ X0OlPgXFDJWR3GyD0VXGKwow5ut5scco33KtrJdQVrPCHNv4pAylg6wh7vM/3zS9Skcr eSoqV8ar331KUVaLm5vpS2iQOyTlDQymKNY9NCuQnRKN0gYLe6qLoDfrGb6eHamR9FMK CUZ0/oWQqk1zHLx4M9guPBwTOlUgdKznrz+z9m90DmzAT7uXI6mOihy4zS+012FGj3u/ 2Vkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=y5s38wz/6dk76o2wu93apOYv5A1m/3RpeMLEd54gKHA=; b=M0mlWKANZT1SSFAne6P3Lruj0P2FVV99yHmaqbk8VypFFDlOnpXzIuckFJfRLCabon DzoFHQ7Yihx3iSSGhJO9vXoGjndy2cPIuLwgB8P7VBY2G1igxSgw6pQREFlk9A4FvnX1 sjqgdmo5K3bOrc3R2mdSWjeUoWvkJQKmFRxEm2Tk5m8h2159Qcd7LzLpbDnUJA3uZ1yP NS2Vbt/HgbwhN5sPt2y2ghRQsAMSvTylHTG1ZsGC2A/NFjP1Y00v74jp1rBOGTdamRab 1O97g+Ctbtl9qF1Of+ameBqqKjo27ASvf0p0Cs2rdn0icvh65DOlCHrgZfqH4gTx28Eq /ewQ== X-Gm-Message-State: APjAAAWJGJdmkWnsnrXdpBEXjLkK+A70CMj4+8fB7/2sTBM7984SWmox ZHlJUlWpfX+o2OPXyMCH1ifd4w== X-Received: by 2002:aa7:9118:: with SMTP id 24mr22439749pfh.182.1575750991839; Sat, 07 Dec 2019 12:36:31 -0800 (PST) Received: from localhost.localdomain (104-188-17-28.lightspeed.sndgca.sbcglobal.net. [104.188.17.28]) by smtp.gmail.com with ESMTPSA id d14sm22982186pfq.117.2019.12.07.12.36.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 07 Dec 2019 12:36:31 -0800 (PST) From: Bjorn Andersson To: Michael Turquette , Stephen Boyd , Rob Herring , Mark Rutland Cc: Andy Gross , linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Paolo Pisati Subject: [PATCH 1/2] clk: qcom: gcc-msm8996: Fix parent for CLKREF clocks Date: Sat, 7 Dec 2019 12:36:02 -0800 Message-Id: <20191207203603.2314424-2-bjorn.andersson@linaro.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191207203603.2314424-1-bjorn.andersson@linaro.org> References: <20191207203603.2314424-1-bjorn.andersson@linaro.org> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The CLKREF clocks are all fed by the clock signal on the CXO2 pad on the SoC. Update the definition of these clocks to allow this to be wired up to the appropriate clock source. Retain "xo" as the global named parent to make the change a nop in the event that DT doesn't carry the necessary clocks definition. Signed-off-by: Bjorn Andersson --- .../devicetree/bindings/clock/qcom,gcc.yaml | 6 ++-- drivers/clk/qcom/gcc-msm8996.c | 35 +++++++++++++++---- 2 files changed, 32 insertions(+), 9 deletions(-) -- 2.24.0 diff --git a/Documentation/devicetree/bindings/clock/qcom,gcc.yaml b/Documentation/devicetree/bindings/clock/qcom,gcc.yaml index e73a56fb60ca..f8bd902d4e6d 100644 --- a/Documentation/devicetree/bindings/clock/qcom,gcc.yaml +++ b/Documentation/devicetree/bindings/clock/qcom,gcc.yaml @@ -41,19 +41,21 @@ properties: clocks: minItems: 1 - maxItems: 3 + maxItems: 4 items: - description: Board XO source - description: Board active XO source - description: Sleep clock source + - description: Second XO source clock-names: minItems: 1 - maxItems: 3 + maxItems: 4 items: - const: bi_tcxo - const: bi_tcxo_ao - const: sleep_clk + - const: cxo2 '#clock-cells': const: 1 diff --git a/drivers/clk/qcom/gcc-msm8996.c b/drivers/clk/qcom/gcc-msm8996.c index d004cdaa0e39..3c3a7ff04562 100644 --- a/drivers/clk/qcom/gcc-msm8996.c +++ b/drivers/clk/qcom/gcc-msm8996.c @@ -3046,7 +3046,10 @@ static struct clk_branch gcc_usb3_clkref_clk = { .enable_mask = BIT(0), .hw.init = &(struct clk_init_data){ .name = "gcc_usb3_clkref_clk", - .parent_names = (const char *[]){ "xo" }, + .parent_data = &(const struct clk_parent_data){ + .fw_name = "cxo2", + .name = "xo", + }, .num_parents = 1, .ops = &clk_branch2_ops, }, @@ -3060,7 +3063,10 @@ static struct clk_branch gcc_hdmi_clkref_clk = { .enable_mask = BIT(0), .hw.init = &(struct clk_init_data){ .name = "gcc_hdmi_clkref_clk", - .parent_names = (const char *[]){ "xo" }, + .parent_data = &(const struct clk_parent_data){ + .fw_name = "cxo2", + .name = "xo", + }, .num_parents = 1, .ops = &clk_branch2_ops, }, @@ -3074,7 +3080,10 @@ static struct clk_branch gcc_edp_clkref_clk = { .enable_mask = BIT(0), .hw.init = &(struct clk_init_data){ .name = "gcc_edp_clkref_clk", - .parent_names = (const char *[]){ "xo" }, + .parent_data = &(const struct clk_parent_data){ + .fw_name = "cxo2", + .name = "xo", + }, .num_parents = 1, .ops = &clk_branch2_ops, }, @@ -3088,7 +3097,10 @@ static struct clk_branch gcc_ufs_clkref_clk = { .enable_mask = BIT(0), .hw.init = &(struct clk_init_data){ .name = "gcc_ufs_clkref_clk", - .parent_names = (const char *[]){ "xo" }, + .parent_data = &(const struct clk_parent_data){ + .fw_name = "cxo2", + .name = "xo", + }, .num_parents = 1, .ops = &clk_branch2_ops, }, @@ -3102,7 +3114,10 @@ static struct clk_branch gcc_pcie_clkref_clk = { .enable_mask = BIT(0), .hw.init = &(struct clk_init_data){ .name = "gcc_pcie_clkref_clk", - .parent_names = (const char *[]){ "xo" }, + .parent_data = &(const struct clk_parent_data){ + .fw_name = "cxo2", + .name = "xo", + }, .num_parents = 1, .ops = &clk_branch2_ops, }, @@ -3116,7 +3131,10 @@ static struct clk_branch gcc_rx2_usb2_clkref_clk = { .enable_mask = BIT(0), .hw.init = &(struct clk_init_data){ .name = "gcc_rx2_usb2_clkref_clk", - .parent_names = (const char *[]){ "xo" }, + .parent_data = &(const struct clk_parent_data){ + .fw_name = "cxo2", + .name = "xo", + }, .num_parents = 1, .ops = &clk_branch2_ops, }, @@ -3130,7 +3148,10 @@ static struct clk_branch gcc_rx1_usb2_clkref_clk = { .enable_mask = BIT(0), .hw.init = &(struct clk_init_data){ .name = "gcc_rx1_usb2_clkref_clk", - .parent_names = (const char *[]){ "xo" }, + .parent_data = &(const struct clk_parent_data){ + .fw_name = "cxo2", + .name = "xo", + }, .num_parents = 1, .ops = &clk_branch2_ops, },