From patchwork Mon Nov 25 13:59:03 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Niklas Cassel X-Patchwork-Id: 180155 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp3187859ilf; Mon, 25 Nov 2019 05:59:20 -0800 (PST) X-Google-Smtp-Source: APXvYqzxJzfsVf+0bCt2E1lGIXx0UjWFs8NxhjQP72/ipe7mRunB+QmYwtr/HdFEpg2Vvj7jfEVK X-Received: by 2002:a17:907:2070:: with SMTP id qp16mr37561874ejb.115.1574690360450; Mon, 25 Nov 2019 05:59:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574690360; cv=none; d=google.com; s=arc-20160816; b=BMEIYiPSQ8sPyTtpcXaws5g2V2onoHd0H1xhxV1fXNHo1MkMnl9ajECR0Vh+WuGfqi nmDKLtevkt4PK/s5QM+zC5ZhGO5Hr5eXDzHr8S10D8XaV/+/yntn0Lv//aoCWIpoFhob AION9soMgHnV37VL4ic4gUd8psZJD4hWlgP+X8aFTrWVSLtHmWIE29JDsnGBFqNsFYYU r4eoeH/80ryD+jfjldu6tv7RXjCsyQvlHcP0591/1S0Ltdg/toqktZp67kYuNqzPJovX k3QcKRK7kjB+LJwMIBZYIBwXhAxXpYg/ke8pydAzAXJV4wgP3ZtbBtPfxjOCjLPvwifI Tvrg== 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=lG/dEFJRZZJTFXBXNbPzSOBTEcwuaUVy4vDeRn16uLE=; b=m1DKzBHcP4jhN31hjlgTSbAH9RgyELc+uSAprI35BK6PmaZW0rnu4NUn+dgd5GsBGe 9qQ5pj5AfJKdoxzp6yB5ULazXGCOYjGL6gUEDUyLDbhRSeKkJpvxlurUBKajl7Vh22J/ 1PFqwqzJ/Lmy787Garj7GPG6B3gNrX3nasr7w1RGMMhp6zOdBPoYehj0B/JsNC8J08v3 eUrRh9TbsTAULvcEz2FNqPg+96rmE3+hEh2exmlah2q8QA/13L1fa1sNnyl064rJXWPf OrzTIMHOLM3ZgOmP14wrz01mjaZ8JVanOUOf6i9FeDrL6wltKrFGksbeJe0N9I1m1vFx utfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kV9PIvsT; 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 hh7si4535772ejb.57.2019.11.25.05.59.20; Mon, 25 Nov 2019 05:59:20 -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=kV9PIvsT; 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 S1727845AbfKYN7S (ORCPT + 26 others); Mon, 25 Nov 2019 08:59:18 -0500 Received: from mail-lj1-f193.google.com ([209.85.208.193]:41523 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727761AbfKYN7Q (ORCPT ); Mon, 25 Nov 2019 08:59:16 -0500 Received: by mail-lj1-f193.google.com with SMTP id m4so15958256ljj.8 for ; Mon, 25 Nov 2019 05:59:14 -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=lG/dEFJRZZJTFXBXNbPzSOBTEcwuaUVy4vDeRn16uLE=; b=kV9PIvsTpDEeeeHqrU+NlQGF4XNrp1onAZwFq0GJ859YcuVZqo6KJEB4xsj48nIiez T9wnQsCNszYN9h/W2hciuikxEUGQt+Nq/3zEWDwlxIPXFm7D1pdguMsfNYsa4TLqRQTJ 8loQxAFsJQwzhVRZGzBQLeYn+snDn8oGfzecVMzM8ZluF0oDUq2bbFQKQr2sx8++CuVp hEydHcpEsu1ruAZQiVu/zBDvn50rpeb7cHsfs2GYdv/9NezdQ1jfySrXD311n+6QpDvs Mmauq7PS4XYV5ud6cQw/N0wKpYI5QNHxCKSkJE5J/67OWxCwt/szeVRdEysRi3sHkq8s qqbw== 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=lG/dEFJRZZJTFXBXNbPzSOBTEcwuaUVy4vDeRn16uLE=; b=BXUeNo1Rd3SnuEDqBNe9qkPUGSUdnQ50zXIdyA1QXxhp5tf8EeBwXGZFxqO0CdjFcI fJia8DEvYyOxR4B98UL7ocxUbhJoptHtiZaVpOYkkvHu0bl4yPB0y4iyDh+11iD7fYVX kW/6qUrNPEeRUV+ENLB79UYR+9bn3enJq4M+JtFc6r0tsUsFIrt3akZsccdH6znFHAqG aQSI+y2NMzEizbMITAnY03lNGMMgM/ePS1vS51lqLKuMTvT5eP43NLakY/9vFJ/oYWzP pGVrnQ1PqLmSnfQ31ZwBn9f21w4a39/ccrHDscswT2j/ji3ZY4QRm1hd6uJE1m24g9qP 6PMg== X-Gm-Message-State: APjAAAW20IAzJucDFi8rymKOQX79ewzdMuVV12lDnauyQ8cGc4aqGSOj UsTQb9WXF/AiF433GZO0YGG1nA== X-Received: by 2002:a05:651c:238:: with SMTP id z24mr23019892ljn.36.1574690354127; Mon, 25 Nov 2019 05:59:14 -0800 (PST) Received: from centauri.lan (ua-84-217-220-205.bbcust.telenor.se. [84.217.220.205]) by smtp.gmail.com with ESMTPSA id w71sm4189705lff.0.2019.11.25.05.59.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Nov 2019 05:59:13 -0800 (PST) From: Niklas Cassel To: Andy Gross , Bjorn Andersson Cc: linux-arm-msm@vger.kernel.org, amit.kucheria@linaro.org, sboyd@kernel.org, Jorge Ramirez-Ortiz , Niklas Cassel , Rob Herring , Mark Rutland , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 1/7] dt-bindings: mailbox: qcom: Add clock-name optional property Date: Mon, 25 Nov 2019 14:59:03 +0100 Message-Id: <20191125135910.679310-2-niklas.cassel@linaro.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191125135910.679310-1-niklas.cassel@linaro.org> References: <20191125135910.679310-1-niklas.cassel@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 From: Jorge Ramirez-Ortiz When the APCS clock is registered (platform dependent), it retrieves its parent names from hardcoded values in the driver. The following commit allows the DT node to provide such clock names to the platform data based clock driver therefore avoiding having to explicitly embed those names in the clock driver source code. Co-developed-by: Niklas Cassel Signed-off-by: Niklas Cassel Signed-off-by: Jorge Ramirez-Ortiz Reviewed-by: Rob Herring Reviewed-by: Bjorn Andersson --- Changes since v2: -Swapped order of "pll" and "aux", in order to not break DT backwards compatibility (in case no clock-names are given). .../mailbox/qcom,apcs-kpss-global.txt | 24 ++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) -- 2.23.0 diff --git a/Documentation/devicetree/bindings/mailbox/qcom,apcs-kpss-global.txt b/Documentation/devicetree/bindings/mailbox/qcom,apcs-kpss-global.txt index 0278482af65c..beec612dbe6a 100644 --- a/Documentation/devicetree/bindings/mailbox/qcom,apcs-kpss-global.txt +++ b/Documentation/devicetree/bindings/mailbox/qcom,apcs-kpss-global.txt @@ -21,10 +21,11 @@ platforms. Usage: required Value type: Definition: must specify the base address and size of the global block + - clocks: - Usage: required if #clocks-cells property is present - Value type: - Definition: phandle to the input PLL, which feeds the APCS mux/divider + Usage: required if #clock-names property is present + Value type: + Definition: phandles to the two parent clocks of the clock driver. - #mbox-cells: Usage: required @@ -36,6 +37,12 @@ platforms. Value type: Definition: as described in clock.txt, must be 0 +- clock-names: + Usage: required if the platform data based clock driver needs to + retrieve the parent clock names from device tree. + This will requires two mandatory clocks to be defined. + Value type: + Definition: must be "pll" and "aux" = EXAMPLE The following example describes the APCS HMSS found in MSM8996 and part of the @@ -68,3 +75,14 @@ Below is another example of the APCS binding on MSM8916 platforms: clocks = <&a53pll>; #clock-cells = <0>; }; + +Below is another example of the APCS binding on QCS404 platforms: + + apcs_glb: mailbox@b011000 { + compatible = "qcom,qcs404-apcs-apps-global", "syscon"; + reg = <0x0b011000 0x1000>; + #mbox-cells = <1>; + clocks = <&apcs_hfpll>, <&gcc GCC_GPLL0_AO_OUT_MAIN>; + clock-names = "pll", "aux"; + #clock-cells = <0>; + };