Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3680217imu; Mon, 28 Jan 2019 08:58:00 -0800 (PST) X-Google-Smtp-Source: ALg8bN6lSZHKSphoBTvYjCLsDzaE3oDN/e/3B6gfuW7d7TqDn94e91JJsti3Y3PANdfISCF2PytV X-Received: by 2002:a63:5f89:: with SMTP id t131mr20837553pgb.26.1548694680809; Mon, 28 Jan 2019 08:58:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548694680; cv=none; d=google.com; s=arc-20160816; b=VM31JcdFVcHk6GMJmriFDtQqrvyWydq9LXnZKf97rRk1kctFXk3A2usA4DO7NHMxCr e++DVmlceuVFARin7GRJV7z1PN0q/lc+g/5IHv12f6RUvAMKNIWjYqQ4C0dLXRv84/Q0 gX/NdgSR78aZZKCYyYsrDi7FeGayAT42k5MAKGUqdrwh2vkMxFeupOoEhXuh/v3aQ+Yj Y2yCHNNHPOhMlKlfYNMTQA4J6OgaulLFib7xywJAVQbh/fqTfWtpQFIDhwOt/fo6W/+m qckBJBxuzXSvzNpS75s5EOJTzBsMLh+KT3Gq9fE1yDtTjKGcXMJJ3CjY2qXZUlv1qt5I lgcg== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=rS+wAcs7Bm9avy47VNmDitmIRYGpaJ2bjTxZr6/JDT4=; b=is2/349aScXT8IHZCvCPw56ncwcVs5OyCjP8BIbMWZe08Nlr8V6pLwyMlCI5Gt/m3X wAQsU7h5Mxf5+VJIIU/cJ9ZUZ2bdyjPxOEwWT3MyI/oTHo9DUAjgb/fir3GMV54KHuJX ptW2hfhIgaj3NIvOqhXTn8HZEcHq79ZF19a8KQIokdPmPeDAZgejEIWteZ4A6l8mRIg7 5TCYD245cCN7Winz+jaaW6A35Bntn+vP6EdPBjNCO9rj81Y25PzAJ9aCqbl89WijSGPj Hg+ewBNMJVpx/rkHx4rPAjqZ2mDrRpxZCaQnLq1dWnF3KsO+v5aIXNYITXcExQHJXJhg 4RMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="a1/6DBmz"; 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 v9si28321111pfl.45.2019.01.28.08.57.45; Mon, 28 Jan 2019 08:58:00 -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="a1/6DBmz"; 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 S2388590AbfA1Q5n (ORCPT + 99 others); Mon, 28 Jan 2019 11:57:43 -0500 Received: from mail-wr1-f67.google.com ([209.85.221.67]:44266 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388466AbfA1Q5k (ORCPT ); Mon, 28 Jan 2019 11:57:40 -0500 Received: by mail-wr1-f67.google.com with SMTP id z5so18839473wrt.11 for ; Mon, 28 Jan 2019 08:57:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=rS+wAcs7Bm9avy47VNmDitmIRYGpaJ2bjTxZr6/JDT4=; b=a1/6DBmzwfklGZu4CiYz1qm0dTUW3dVYXKYbq1cpqfR9zs1eWHbMQ98T6Y3zTOgTxH DozADrfGsN79RbRa1xJusVor5jnGmKM3wKBcYpDwh0DPSbmvqcEeAj1t0g+axmRbnLJr Sqprrjb2gh7Bg1ibtLfWI1qepyxURoR5oJbQc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=rS+wAcs7Bm9avy47VNmDitmIRYGpaJ2bjTxZr6/JDT4=; b=hjvIaNTydWD3+KerERUdEg5pOj+yy05hP+XzcDqkaqIawYbtMkXa7B1mLU/maOaCqE uuNHHQSQWl89YSTNwirV09rIhFlW7kRgytJJOIkC4mGlgAUkRMkNcZeoV3mWf9AfCVY9 HQFqxQSSv74vg2H6isZe6ePjkk9OD6gbDKe61vHFTFkr+9i1oTHPI9N8luQOaWFJsnlH wcYc0XwPby1VlITdoExTfX0GXjRXtaWnpngPvky/X/amcuM+pJrkmBnqGmByu7tkchQN phmlG4laJsPHXG7pHyu9ix9B5eiwogyRZs2HpaW2ViSBdZP4+hyQyvH02fYKC4aC5y6T RyFA== X-Gm-Message-State: AJcUukeZWLzuqWNnC4D9Zs5oZQRLWUk+0bgSRlQStHGlu2b+kdglxIBx 3x7wCXHr3p5o5KZX50oxGlR9gg== X-Received: by 2002:adf:e78f:: with SMTP id n15mr22889580wrm.115.1548694658292; Mon, 28 Jan 2019 08:57:38 -0800 (PST) Received: from [192.168.1.2] (233.red-81-47-145.staticip.rima-tde.net. [81.47.145.233]) by smtp.gmail.com with ESMTPSA id m4sm170300wmi.3.2019.01.28.08.57.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 28 Jan 2019 08:57:37 -0800 (PST) Subject: Re: [PATCH 04/13] dt-bindings: mailbox: qcom: Add clock-name optional property To: Bjorn Andersson Cc: robh+dt@kernel.org, mark.rutland@arm.com, andy.gross@linaro.org, david.brown@linaro.org, sboyd@kernel.org, will.deacon@arm.com, mturquette@baylibre.com, jassisinghbrar@gmail.com, vkoul@kernel.org, niklas.cassel@linaro.org, sibis@codeaurora.org, georgi.djakov@linaro.org, arnd@arndb.de, horms+renesas@verge.net.au, heiko@sntech.de, enric.balletbo@collabora.com, jagan@amarulasolutions.com, olof@lixom.net, amit.kucheria@linaro.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org References: <1545039990-19984-1-git-send-email-jorge.ramirez-ortiz@linaro.org> <1545039990-19984-5-git-send-email-jorge.ramirez-ortiz@linaro.org> <20190117064411.GK25498@builder> From: Jorge Ramirez Message-ID: <83e77b69-9a22-641f-ada9-7dac565160e1@linaro.org> Date: Mon, 28 Jan 2019 17:57:35 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <20190117064411.GK25498@builder> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 1/17/19 07:44, Bjorn Andersson wrote: > On Mon 17 Dec 01:46 PST 2018, Jorge Ramirez-Ortiz wrote: > >> 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 >> --- >> .../bindings/mailbox/qcom,apcs-kpss-global.txt | 21 +++++++++++++++++++++ >> 1 file changed, 21 insertions(+) >> >> diff --git a/Documentation/devicetree/bindings/mailbox/qcom,apcs-kpss-global.txt b/Documentation/devicetree/bindings/mailbox/qcom,apcs-kpss-global.txt >> index 1232fc9..f252439 100644 >> --- a/Documentation/devicetree/bindings/mailbox/qcom,apcs-kpss-global.txt >> +++ b/Documentation/devicetree/bindings/mailbox/qcom,apcs-kpss-global.txt >> @@ -23,6 +23,10 @@ platforms. >> 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. > > I presume you meant to replace the existing definition of "clocks"? I am sorry didn't reply to this earlier. Yes this is not very clear. This is required as an extension to the apcs-msm8916.c driver also used on the qcs404; since it is an extension, the previous definition should still be applicable. In the case of the msm8916 the #clock-names property is NOT necessary (it would be ignored by the driver), so having it should not mean that we need to have #clocks. In the case of the qcs404, having clock-names means that we do need to have #clocks (hence the additional if) and not quite sure how to word this condition in the bindings.. I am going to post v2 with some updates and if required will post a v3 with more clarifications. > > I think the purpose of "required if #clock-cells" comes from that > meaning that it represents a clock-controller if #clock-cells is > specified, in which case it requires the upstream clock(s). > > Regards, > Bjorn > >> + >> - #mbox-cells: >> Usage: required >> Value type: >> @@ -33,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 "aux" and "pll" >> >> = EXAMPLE >> The following example describes the APCS HMSS found in MSM8996 and part of the >> @@ -65,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 = <&gcc GCC_GPLL0_AO_OUT_MAIN>, <&apcs_hfpll>; >> + clock-names = "aux", "pll"; >> + #clock-cells = <0>; >> + }; >> -- >> 2.7.4 >> >