From patchwork Tue Jan 10 23:47:43 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 90783 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp865511qgi; Tue, 10 Jan 2017 15:48:06 -0800 (PST) X-Received: by 10.84.210.228 with SMTP id a91mr8824812pli.0.1484092086143; Tue, 10 Jan 2017 15:48:06 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l5si3691003pfk.217.2017.01.10.15.48.05; Tue, 10 Jan 2017 15:48:06 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758525AbdAJXsE (ORCPT + 13 others); Tue, 10 Jan 2017 18:48:04 -0500 Received: from mail-lf0-f44.google.com ([209.85.215.44]:33650 "EHLO mail-lf0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758539AbdAJXsD (ORCPT ); Tue, 10 Jan 2017 18:48:03 -0500 Received: by mail-lf0-f44.google.com with SMTP id k86so126236393lfi.0 for ; Tue, 10 Jan 2017 15:48:02 -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; bh=38e6mvt7ewQfQs/7GHwjjVTDbS0aSXrZIc5G7ogH6HQ=; b=k0mJTrU6WT0t9Q9HkNkTX4LgkSNWKpN1Lg7FizhnNcUgbzZHIinP4GWhyNB5Cs5blO xTwrPz0KRR1hznjELxfI2tTTEpqMIakFAW1dFiXEOuxmu6T4aibcmv+uYSkwG8FDfdP4 qQHtrBVaIPUybdgrT1uVmO22JbQEJmr9WVYz0= 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; bh=38e6mvt7ewQfQs/7GHwjjVTDbS0aSXrZIc5G7ogH6HQ=; b=snyPpnqUBN7h1LrQb6XqYq3dkRkfXY6NNM011H5jpPJerZt2hKDk5i41HAnkwrdZt/ CZR5eJmbppRfE2tIEatvaIwObRvXMnw4MpyZmQIJTds8T1bE0Xei5CK6TKueYaLtx9Dk YlG2WM2e2ZFimmRbUlZgZQC+qAKeuAlAd5QT43Fqkt7Gqw86/cvsnjkY/9lc0ABK3F41 hJFelt0kmbZQllD0rQzn2qrgHctr1O05QtwnWbEw9zlRIg/knSeKc+MtMOQrBqh5R3Eo QukNm9oc8zC1rObCPWyW3V3tnx4lyQp8GbCvgdGOwwhCk7FhIdYX3fWgZAdkXO40Tdim liRw== X-Gm-Message-State: AIkVDXJVzf7kZy+gbZDOao45760/NdprR3NYbuChSZC91rcBopfVLKuOKp64W267Ig3a6Yxg X-Received: by 10.46.22.85 with SMTP id 21mr2201367ljw.13.1484092081157; Tue, 10 Jan 2017 15:48:01 -0800 (PST) Received: from localhost.localdomain (c-357171d5.014-348-6c756e10.cust.bredbandsbolaget.se. [213.113.113.53]) by smtp.gmail.com with ESMTPSA id 17sm832038ljn.5.2017.01.10.15.48.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 10 Jan 2017 15:48:00 -0800 (PST) From: Linus Walleij To: Lee Jones , Jonathan Cameron , linux-iio@vger.kernel.org, Sebastian Reichel , Guenter Roeck Cc: Mboumba Cedric Madianga , linux-pm@vger.kernel.org, linux-hwmon@vger.kernel.org, Linus Walleij Subject: [PATCH 5/7] mfd: ab8500: augment DT bindings Date: Wed, 11 Jan 2017 00:47:43 +0100 Message-Id: <20170110234745.29691-6-linus.walleij@linaro.org> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170110234745.29691-1-linus.walleij@linaro.org> References: <20170110234745.29691-1-linus.walleij@linaro.org> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org As we migrate the AB8500 GPADC driver to use IIO, we need to augment the bindings to account for defining the ADC channels in the device tree. Signed-off-by: Linus Walleij --- Documentation/devicetree/bindings/mfd/ab8500.txt | 119 +++++++++++++++++++++++ 1 file changed, 119 insertions(+) -- 2.9.3 -- To unsubscribe from this list: send the line "unsubscribe linux-pm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/Documentation/devicetree/bindings/mfd/ab8500.txt b/Documentation/devicetree/bindings/mfd/ab8500.txt index cd9e90c5d171..05d4b473c7c8 100644 --- a/Documentation/devicetree/bindings/mfd/ab8500.txt +++ b/Documentation/devicetree/bindings/mfd/ab8500.txt @@ -69,6 +69,18 @@ Required child device properties: - compatible : "stericsson,ab8500-[bm|btemp|charger|fg|gpadc|gpio|ponkey| pwm|regulator|rtc|sysctrl|usb]"; + A few child devices require ADC channels from the GPADC node. Those follow the + standard bindings from iio/iio-bindings.txt + + abx500-temp : io-channels "aux1" and "aux2" for measuring external + temperatures + ab8500_fg : io-channel "main_bat_v" for measuring main battery voltage + ab8500_btemp : io-channels "btemp_ball" and "bat_ctrl" for measuring the + battery voltage + ab8500_charger : io-channels "main_charger_v", "main_charger_c", "vbus_v", + "usb_charger_c" for measuring voltage and current of the + different charging supplies + Optional child device properties: - interrupts : contains the device IRQ(s) using the 2-cell format (see above) - interrupt-names : contains names of IRQ resource in the order in which they were @@ -102,8 +114,115 @@ ab8500 { 39 0x4>; interrupt-names = "HW_CONV_END", "SW_CONV_END"; vddadc-supply = <&ab8500_ldo_tvout_reg>; + #address-cells = <1>; + #size-cells = <0>; + #io-channel-cells = <1>; + + /* GPADC channels */ + bat_ctrl: adc-channel@01 { + reg = <0x01>; + }; + btemp_ball: adc-channel@02 { + reg = <0x02>; + }; + main_charger_v: adc-channel@03 { + reg = <0x03>; + }; + acc_detect1: adc-channel@04 { + reg = <0x04>; + }; + acc_detect2: adc-channel@05 { + reg = <0x05>; + }; + adc_aux1: adc-channel@06 { + reg = <0x06>; + }; + adc_aux2: adc-channel@07 { + reg = <0x07>; + }; + main_batt_v: adc-channel@08 { + reg = <0x08>; + }; + vbus_v: adc-channel@09 { + reg = <0x09>; + }; + main_charger_c: adc-channel@0a { + reg = <0x0a>; + }; + usb_charger_c: adc-channel@0b { + reg = <0x0b>; + }; + bk_bat_v: adc-channel@0c { + reg = <0x0c>; + }; + die_temp: adc-channel@0d { + reg = <0x0d>; + }; + usb_id: adc-channel@0e { + reg = <0x0e>; + }; + xtal_temp: adc-channel@12 { + reg = <0x12>; + }; + vbat_true_meas: adc-channel@13 { + reg = <0x13>; + }; + bat_ctrl_and_ibat: adc-channel@1c { + reg = <0x1c>; + }; + vbat_meas_and_ibat: adc-channel@1d { + reg = <0x1d>; + }; + vbat_true_meas_and_ibat: adc-channel@1e { + reg = <0x1e>; + }; + bat_temp_and_ibat: adc-channel@1f { + reg = <0x1f>; + }; }; + ab8500_temp { + compatible = "stericsson,abx500-temp"; + io-channels = <&gpadc 0x06>, + <&gpadc 0x07>; + io-channel-name = "aux1", "aux2"; + }; + + ab8500_battery: ab8500_battery { + stericsson,battery-type = "LIPO"; + thermistor-on-batctrl; + }; + + ab8500_fg { + compatible = "stericsson,ab8500-fg"; + battery = <&ab8500_battery>; + io-channels = <&gpadc 0x08>; + io-channel-name = "main_bat_v"; + }; + + ab8500_btemp { + compatible = "stericsson,ab8500-btemp"; + battery = <&ab8500_battery>; + io-channels = <&gpadc 0x02>, + <&gpadc 0x01>; + io-channel-name = "btemp_ball", + "bat_ctrl"; + }; + + ab8500_charger { + compatible = "stericsson,ab8500-charger"; + battery = <&ab8500_battery>; + vddadc-supply = <&ab8500_ldo_tvout_reg>; + io-channels = <&gpadc 0x03>, + <&gpadc 0x0a>, + <&gpadc 0x09>, + <&gpadc 0x0b>; + io-channel-name = "main_charger_v", + "main_charger_c", + "vbus_v", + "usb_charger_c"; + }; + ab8500-usb { compatible = "stericsson,ab8500-usb"; interrupts = < 90 0x4