From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932985AbcKHKPa (ORCPT ); Tue, 8 Nov 2016 05:15:30 -0500 Received: from mail-qk0-f182.google.com ([209.85.220.182]:34988 "EHLO mail-qk0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932477AbcKHKP0 (ORCPT ); Tue, 8 Nov 2016 05:15:26 -0500 MIME-Version: 1.0 In-Reply-To: <58201401.8050805@nvidia.com> References: <1478077742-25437-1-git-send-email-ldewangan@nvidia.com> <1478077742-25437-3-git-send-email-ldewangan@nvidia.com> <58201401.8050805@nvidia.com> From: Linus Walleij Date: Tue, 8 Nov 2016 11:15:24 +0100 Message-ID: Subject: Re: [PATCH 2/2] pinctrl: tegra: Add driver to configure voltage and power of io pads To: Laxman Dewangan Cc: "thierry.reding@gmail.com" , Stephen Warren , Rob Herring , Mark Rutland , Jon Hunter , Masahiro Yamada , "linux-gpio@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-tegra@vger.kernel.org" , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 7, 2016 at 6:41 AM, Laxman Dewangan wrote: > On Saturday 05 November 2016 03:54 AM, Linus Walleij wrote: >> On Wed, Nov 2, 2016 at 10:09 AM, Laxman Dewangan (....) >>> On Tegra124, the IO power rail source is auto detected by SoC and hence >>> it is only require to configure in low power mode if IO pads are not >>> used. >>> >>> On T210 onwards, the auto-detection is removed from SoC and hence SW >>> must configure the PMC register explicitly to set proper voltage in >>> IO pads based on IO rail power source voltage. (...) >>> +static const struct pinconf_generic_params tegra_io_pads_cfg_params[] = >>> { >>> + { >>> + .property = "nvidia,power-source-voltage", >>> + .param = TEGRA_IO_PAD_POWER_SOURCE_VOLTAGE, >>> + }, >>> +}; >> >> Why can you not use the standard power-source binding >> from Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt >> instead of inventing this nvidia,* variant? > > > Per binding doc, > power-source - select between different power supplies > > So actually it selects the different source of power supply. > In my case, I will have same supply but voltage of that supply get changed. > So here property is for the power-supply-voltage. I doubt that seriously. Are you sure? Then the commit message is misleading because it is talking about different power rails. The usual design of such IP is that there is a switch that select a voltage from several available rails and this is what the commit message seems to be saying, and that is what the binding is for. If you could actually change the voltage it would change for all other pins using the same voltage source as well, would it not? Unless there is one voltage regulator per pin, which seems like a very expensive and chip surface consuming solution. (Albeit theoretically possible.) If you can *actually* change the volatage, it needs to be modeled as a (fixed voltage?) regulator, not as a custom property for the pin control attributes. I guess you definiately need the regulator framework to accumulate and infer the different consumer requirements anyway in that case. Yours, Linus Walleij