From mboxrd@z Thu Jan 1 00:00:00 1970 From: k.kozlowski@samsung.com (Krzysztof Kozlowski) Date: Mon, 13 Jul 2015 16:31:05 +0900 Subject: [PATCH 3/6] mfd: devicetree: bindings: 88pm800: Add DT property for 32KHz output enable In-Reply-To: <55A367BE.6040103@linaro.org> References: <1436442431-3471-1-git-send-email-vaibhav.hiremath@linaro.org> <1436442431-3471-4-git-send-email-vaibhav.hiremath@linaro.org> <55A0C1B8.4030402@samsung.com> <55A367BE.6040103@linaro.org> Message-ID: <55A36939.7070607@samsung.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On 13.07.2015 16:24, Vaibhav Hiremath wrote: > > > On Saturday 11 July 2015 12:41 PM, Krzysztof Kozlowski wrote: >> W dniu 09.07.2015 o 20:47, Vaibhav Hiremath pisze: >>> 88PM800 family of device supports output of 32KHz clock (low jitter) >>> on CLK32K2/3 pin which can be supplied to other peripherals on the >>> board. >>> >>> This patch adds the devicetree binding to enable this feature. >>> >>> Signed-off-by: Vaibhav Hiremath >>> --- >>> Documentation/devicetree/bindings/mfd/88pm800.txt | 6 ++++++ >>> 1 file changed, 6 insertions(+) >>> >>> diff --git a/Documentation/devicetree/bindings/mfd/88pm800.txt >>> b/Documentation/devicetree/bindings/mfd/88pm800.txt >>> index dec842f..ae1311c 100644 >>> --- a/Documentation/devicetree/bindings/mfd/88pm800.txt >>> +++ b/Documentation/devicetree/bindings/mfd/88pm800.txt >>> @@ -9,6 +9,12 @@ Required parent device properties: >>> - #interrupt-cells : should be 1. >>> The cell is the 88pm80x local IRQ number >>> >>> +Optional properties : >>> + - marvell,88pm800-32khz-xolj-out-en : If set, driver will enable >>> low jitter >>> + version of 32Khz clock output on >> >> I am not sure if I understand it correctly. The hardware always has such >> clocks and you only want to enable/disable it in DT? Any reasons why >> these should not be enabled always? >> > > Small amount of Power savings... > Although currently I do not have power numbers to justify this. > > As per spec, (it only talks about power consumption in power down state) > > Power-down State => VSYS > 2.8 => 4.5 ?A > CLK32K2 = 0 => 18 ?W This would be a power saving if it could be enabled/disabled runtime. But with DT you will either: 1. enable it always so there won't be any power saving, 2. disable it always so there won't be such clock. I can find a use case - when on some boards the clock output is not wired to anything so it cannot be used. In other cases (there is some potential user) this should be triggered per-use (runtime enabled/disabled). Do you have such case? I mean boards where this is not connected at all and boards where this is used? >> Enabling it in DT does not look like a job for DT. Maybe you there >> should be just a clock driver (clock provider)? >> > > It's init time (and one time) settings, wouldn't clock-provider > be overkill for this? The clock provider would be a proper way to do it and some PMICs I know do this. Examples are max77686 and s5m8767/s2mps11. These are PMICs used for Samsung SoCs. They have two or three 32kHz clocks. Best regards, Krzysztof From mboxrd@z Thu Jan 1 00:00:00 1970 From: Krzysztof Kozlowski Subject: Re: [PATCH 3/6] mfd: devicetree: bindings: 88pm800: Add DT property for 32KHz output enable Date: Mon, 13 Jul 2015 16:31:05 +0900 Message-ID: <55A36939.7070607@samsung.com> References: <1436442431-3471-1-git-send-email-vaibhav.hiremath@linaro.org> <1436442431-3471-4-git-send-email-vaibhav.hiremath@linaro.org> <55A0C1B8.4030402@samsung.com> <55A367BE.6040103@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: In-reply-to: <55A367BE.6040103-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Vaibhav Hiremath , linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, sameo-VuQAYsv1563Yd54FQh9/CA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org, lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org List-Id: devicetree@vger.kernel.org On 13.07.2015 16:24, Vaibhav Hiremath wrote: >=20 >=20 > On Saturday 11 July 2015 12:41 PM, Krzysztof Kozlowski wrote: >> W dniu 09.07.2015 o 20:47, Vaibhav Hiremath pisze: >>> 88PM800 family of device supports output of 32KHz clock (low jitter= ) >>> on CLK32K2/3 pin which can be supplied to other peripherals on the >>> board. >>> >>> This patch adds the devicetree binding to enable this feature. >>> >>> Signed-off-by: Vaibhav Hiremath >>> --- >>> Documentation/devicetree/bindings/mfd/88pm800.txt | 6 ++++++ >>> 1 file changed, 6 insertions(+) >>> >>> diff --git a/Documentation/devicetree/bindings/mfd/88pm800.txt >>> b/Documentation/devicetree/bindings/mfd/88pm800.txt >>> index dec842f..ae1311c 100644 >>> --- a/Documentation/devicetree/bindings/mfd/88pm800.txt >>> +++ b/Documentation/devicetree/bindings/mfd/88pm800.txt >>> @@ -9,6 +9,12 @@ Required parent device properties: >>> - #interrupt-cells : should be 1. >>> The cell is the 88pm80x local IRQ number >>> >>> +Optional properties : >>> + - marvell,88pm800-32khz-xolj-out-en : If set, driver will enab= le >>> low jitter >>> + version of 32Khz clock output on >> >> I am not sure if I understand it correctly. The hardware always has = such >> clocks and you only want to enable/disable it in DT? Any reasons why >> these should not be enabled always? >> >=20 > Small amount of Power savings... > Although currently I do not have power numbers to justify this. >=20 > As per spec, (it only talks about power consumption in power down sta= te) >=20 > Power-down State =3D> VSYS > 2.8 =3D> 4.5 =CE=BCA > CLK32K2 =3D 0 =3D> 18 =CE=BCW This would be a power saving if it could be enabled/disabled runtime. But with DT you will either: 1. enable it always so there won't be any power saving, 2. disable it always so there won't be such clock. I can find a use case - when on some boards the clock output is not wired to anything so it cannot be used. In other cases (there is some potential user) this should be triggered per-use (runtime enabled/disab= led). Do you have such case? I mean boards where this is not connected at all and boards where this is used? >> Enabling it in DT does not look like a job for DT. Maybe you there >> should be just a clock driver (clock provider)? >> >=20 > It's init time (and one time) settings, wouldn't clock-provider > be overkill for this? The clock provider would be a proper way to do it and some PMICs I know do this. Examples are max77686 and s5m8767/s2mps11. These are PMICs use= d for Samsung SoCs. They have two or three 32kHz clocks. Best regards, Krzysztof -- To unsubscribe from this list: send the line "unsubscribe devicetree" i= n the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751551AbbGMHbN (ORCPT ); Mon, 13 Jul 2015 03:31:13 -0400 Received: from mailout3.w1.samsung.com ([210.118.77.13]:27265 "EHLO mailout3.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751096AbbGMHbM (ORCPT ); Mon, 13 Jul 2015 03:31:12 -0400 MIME-version: 1.0 Content-type: text/plain; charset=utf-8 X-AuditID: cbfec7f5-f794b6d000001495-49-55a3693c4f68 Content-transfer-encoding: 8BIT Message-id: <55A36939.7070607@samsung.com> Date: Mon, 13 Jul 2015 16:31:05 +0900 From: Krzysztof Kozlowski User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 To: Vaibhav Hiremath , linux-arm-kernel@lists.infradead.org Cc: devicetree@vger.kernel.org, sameo@linux.intel.com, linux-kernel@vger.kernel.org, robh+dt@kernel.org, lee.jones@linaro.org Subject: Re: [PATCH 3/6] mfd: devicetree: bindings: 88pm800: Add DT property for 32KHz output enable References: <1436442431-3471-1-git-send-email-vaibhav.hiremath@linaro.org> <1436442431-3471-4-git-send-email-vaibhav.hiremath@linaro.org> <55A0C1B8.4030402@samsung.com> <55A367BE.6040103@linaro.org> In-reply-to: <55A367BE.6040103@linaro.org> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrLLMWRmVeSWpSXmKPExsVy+t/xy7o2mYtDDfb8MbKYf+Qcq8XrF4YW 978eZbTY9Pgaq8XlXXPYLFr3HmG3ON3NanH96kYWBw6PTas62TzuXNvD5jHvZKDH5iX1Hn1b VjF6fN4kF8AWxWWTkpqTWZZapG+XwJWx+dkWxoJm0Yp3W7axNjBeEuhi5OCQEDCR2PMjtouR E8gUk7hwbz1bFyMXh5DAUkaJ36ub2UASvAKCEj8m32MBqWcWkJc4cikbwlSXmDIlF6L8KaPE xkMtLBDlWhKtCx4zgtgsAqoSLds3gcXZBIwlNi9fAjZSVCBC4u3lk0wgtohAlMSufWfZQWxm gXqJY+tWga0SFkiTWLq+DmL+KUaJbXOvgc3hBJr/++lm5gmMArOQXDcL4bpZCNctYGRexSia WppcUJyUnmukV5yYW1yal66XnJ+7iRES6F93MC49ZnWIUYCDUYmHt2HLolAh1sSy4srcQ4wS HMxKIryfzwKFeFMSK6tSi/Lji0pzUosPMUpzsCiJ887c9T5ESCA9sSQ1OzW1ILUIJsvEwSnV wMjXKCj8qCzs/K/shtd8nf8i1Vn8K1tTwibdOa3pEswo72JpFHxP333Fe/NrtTVBcxNNpLmC 5mgqr2hbfqrUlfmBYHawVG1l+JveYpb/ke94XackvbkUVnYi54m74+nvpSd2TD4w6VTd1qja A+81fEwDZ3psTjn3h3+1EWvlu+vrBDW8fwWJKLEUZyQaajEXFScCAPSFJWBwAgAA Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 13.07.2015 16:24, Vaibhav Hiremath wrote: > > > On Saturday 11 July 2015 12:41 PM, Krzysztof Kozlowski wrote: >> W dniu 09.07.2015 o 20:47, Vaibhav Hiremath pisze: >>> 88PM800 family of device supports output of 32KHz clock (low jitter) >>> on CLK32K2/3 pin which can be supplied to other peripherals on the >>> board. >>> >>> This patch adds the devicetree binding to enable this feature. >>> >>> Signed-off-by: Vaibhav Hiremath >>> --- >>> Documentation/devicetree/bindings/mfd/88pm800.txt | 6 ++++++ >>> 1 file changed, 6 insertions(+) >>> >>> diff --git a/Documentation/devicetree/bindings/mfd/88pm800.txt >>> b/Documentation/devicetree/bindings/mfd/88pm800.txt >>> index dec842f..ae1311c 100644 >>> --- a/Documentation/devicetree/bindings/mfd/88pm800.txt >>> +++ b/Documentation/devicetree/bindings/mfd/88pm800.txt >>> @@ -9,6 +9,12 @@ Required parent device properties: >>> - #interrupt-cells : should be 1. >>> The cell is the 88pm80x local IRQ number >>> >>> +Optional properties : >>> + - marvell,88pm800-32khz-xolj-out-en : If set, driver will enable >>> low jitter >>> + version of 32Khz clock output on >> >> I am not sure if I understand it correctly. The hardware always has such >> clocks and you only want to enable/disable it in DT? Any reasons why >> these should not be enabled always? >> > > Small amount of Power savings... > Although currently I do not have power numbers to justify this. > > As per spec, (it only talks about power consumption in power down state) > > Power-down State => VSYS > 2.8 => 4.5 μA > CLK32K2 = 0 => 18 μW This would be a power saving if it could be enabled/disabled runtime. But with DT you will either: 1. enable it always so there won't be any power saving, 2. disable it always so there won't be such clock. I can find a use case - when on some boards the clock output is not wired to anything so it cannot be used. In other cases (there is some potential user) this should be triggered per-use (runtime enabled/disabled). Do you have such case? I mean boards where this is not connected at all and boards where this is used? >> Enabling it in DT does not look like a job for DT. Maybe you there >> should be just a clock driver (clock provider)? >> > > It's init time (and one time) settings, wouldn't clock-provider > be overkill for this? The clock provider would be a proper way to do it and some PMICs I know do this. Examples are max77686 and s5m8767/s2mps11. These are PMICs used for Samsung SoCs. They have two or three 32kHz clocks. Best regards, Krzysztof