From patchwork Fri Jun 13 18:13:33 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Anderson X-Patchwork-Id: 4351361 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id CFF189F3B4 for ; Fri, 13 Jun 2014 18:17:50 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 85BE120211 for ; Fri, 13 Jun 2014 18:17:49 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E46652015A for ; Fri, 13 Jun 2014 18:17:47 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WvVzY-0001GK-5h; Fri, 13 Jun 2014 18:14:20 +0000 Received: from mail-ob0-f202.google.com ([209.85.214.202]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WvVzW-00015G-4K for linux-arm-kernel@lists.infradead.org; Fri, 13 Jun 2014 18:14:19 +0000 Received: by mail-ob0-f202.google.com with SMTP id va2so597482obc.5 for ; Fri, 13 Jun 2014 11:13:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=bGwaU0zsbx+JbmkjEqCYDt0aabweIk7SQ9Ra6odgmhM=; b=HPf+3J3/N1CZYlr2qtsvoH1cT35ogg6gae1R7u487hRMfDQqV8+jW/T/8+kUw2vrWi w3t36PrZIfrZ+yzta8i0p9hI9XBPOuuaoHXR97/xQpHSr0pK8An0fyFO5Ki74rZr6Hlo QcpIoG/vIzBCNNKYwYrQYXJfmE5RPcAGoW1t7/E98r0l2DR9aHhk38A00qOoLfB//9R7 zkETxxW05hYReDJIZWgheH21EsBo8UZUblxmM4jPuYe9UD+JEYCRGuYzCV+97WhIW7vr M0OSuvTtKLTtR7u4jowmMMfDKsxmss085lsmTfXPy4/fggNVGXOl6jnsGmPzpv+h4DCZ iFDQ== X-Gm-Message-State: ALoCoQlWYVu3lhHtyJcq3qwZFyh9+i33NggeCaKsMrKa97R6Oz6Ijs34yYorkK5Z4Jg/EZ70R+qi X-Received: by 10.50.55.35 with SMTP id o3mr1443515igp.6.1402683236799; Fri, 13 Jun 2014 11:13:56 -0700 (PDT) Received: from corp2gmr1-1.hot.corp.google.com (corp2gmr1-1.hot.corp.google.com [172.24.189.92]) by gmr-mx.google.com with ESMTPS id t4si363107yhm.0.2014.06.13.11.13.56 for (version=TLSv1.1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 13 Jun 2014 11:13:56 -0700 (PDT) Received: from tictac.mtv.corp.google.com (tictac.mtv.corp.google.com [172.22.72.141]) by corp2gmr1-1.hot.corp.google.com (Postfix) with ESMTP id 8CA1931C10D; Fri, 13 Jun 2014 11:13:56 -0700 (PDT) Received: by tictac.mtv.corp.google.com (Postfix, from userid 121310) id 33D6A803A7; Fri, 13 Jun 2014 11:13:56 -0700 (PDT) From: Doug Anderson To: Samuel Ortiz , Lee Jones , Kukjin Kim Subject: [PATCH 2/2] ARM: dts: Add cros_ec to exynos5420-peach-pit and exynos5800-peach-pi Date: Fri, 13 Jun 2014 11:13:33 -0700 Message-Id: <1402683213-23120-2-git-send-email-dianders@chromium.org> X-Mailer: git-send-email 2.0.0.526.g5318336 In-Reply-To: <1402683213-23120-1-git-send-email-dianders@chromium.org> References: <1402683213-23120-1-git-send-email-dianders@chromium.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140613_111418_291660_76CED705 X-CRM114-Status: GOOD ( 13.27 ) X-Spam-Score: -1.4 (-) Cc: mark.rutland@arm.com, Tomasz Figa , linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux@arm.linux.org.uk, ijc+devicetree@hellion.org.uk, devicetree@vger.kernel.org, khilman@linaro.org, pawel.moll@arm.com, swarren@wwwdotorg.org, tushar.b@samsung.com, olof@lixom.net, robh+dt@kernel.org, ben-linux@fluff.org, ch.naveen@samsung.com, linux-arm-kernel@lists.infradead.org, rahul.sharma@samsung.com, sjg@chromium.org, Doug Anderson , broonie@kernel.org, galak@codeaurora.org, ajaynumb@gmail.com, javier.martinez@collabora.co.uk X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This adds cros_ec to exynos5420-peach-pit and exynos5800-peach-pi, including: * The keyboard * The i2c tunnel * The tps65090 under the i2c tunnel * The battery under the i2c tunnel To add extra motivation, it should be noted that tps65090 is one of the things needed to get display-related FETs turned on for pit and pi. Note that this relies on a few outstanding changes: * Needs "cros-ec-keyboard.dtsi" in order to compile properly. See (ARM: dts: Create a cros-ec-keyboard fragment) at . * Needs (mfd: cros_ec: spi: Fix end of transfer on devices with no spi-msg-delay) from this series to work properly. * Needs (spi: s3c64xx: fix broken "cs_gpios" usage in the driver) and (spi: s3c64xx: for DT platofrms always get the chipselect info from DT node) to work properly and match the documented bindings. See and Signed-off-by: Doug Anderson Tested-by: Javier Martinez Canillas --- arch/arm/boot/dts/exynos5420-peach-pit.dts | 146 +++++++++++++++++++++++++++++ arch/arm/boot/dts/exynos5800-peach-pi.dts | 146 +++++++++++++++++++++++++++++ 2 files changed, 292 insertions(+) diff --git a/arch/arm/boot/dts/exynos5420-peach-pit.dts b/arch/arm/boot/dts/exynos5420-peach-pit.dts index 1c5b8f9..67b7c32 100644 --- a/arch/arm/boot/dts/exynos5420-peach-pit.dts +++ b/arch/arm/boot/dts/exynos5420-peach-pit.dts @@ -25,6 +25,11 @@ "google,pit", "google,peach","samsung,exynos5420", "samsung,exynos5"; + aliases { + /* Assign 20 so we don't get confused w/ builtin ones */ + i2c20 = "/spi@12d40000/cros-ec@0/i2c-tunnel"; + }; + memory { reg = <0x20000000 0x80000000>; }; @@ -87,6 +92,13 @@ pinctrl-0 = <&usb301_vbus_en>; enable-active-high; }; + + vbat: fixed-regulator { + compatible = "regulator-fixed"; + regulator-name = "vbat-supply"; + regulator-boot-on; + regulator-always-on; + }; }; &pinctrl_0 { @@ -111,6 +123,20 @@ samsung,pin-drv = <0>; }; + ec_irq: ec-irq { + samsung,pins = "gpx1-5"; + samsung,pin-function = <0>; + samsung,pin-pud = <0>; + samsung,pin-drv = <0>; + }; + + tps65090_irq: tps65090-irq { + samsung,pins = "gpx2-5"; + samsung,pin-function = <0>; + samsung,pin-pud = <0>; + samsung,pin-drv = <0>; + }; + hdmi_hpd_irq: hdmi-hpd-irq { samsung,pins = "gpx3-7"; samsung,pin-function = <0>; @@ -127,6 +153,19 @@ }; &pinctrl_3 { + /* Drive SPI lines at x2 for better integrity */ + spi2-bus { + samsung,pin-drv = <2>; + }; + + /* Drive SPI chip select at x2 for better integrity */ + ec_spi_cs: ec-spi-cs { + samsung,pins = "gpb1-2"; + samsung,pin-function = <1>; + samsung,pin-pud = <0>; + samsung,pin-drv = <2>; + }; + usb300_vbus_en: usb300-vbus-en { samsung,pins = "gph0-0"; samsung,pin-function = <1>; @@ -189,6 +228,111 @@ }; }; +&spi_2 { + status = "okay"; + num-cs = <1>; + samsung,spi-src-clk = <0>; + cs-gpios = <&gpb1 2 0>; + + cros_ec: cros-ec@0 { + compatible = "google,cros-ec-spi"; + interrupt-parent = <&gpx1>; + interrupts = <5 0>; + pinctrl-names = "default"; + pinctrl-0 = <&ec_spi_cs &ec_irq>; + reg = <0>; + spi-max-frequency = <3125000>; + + controller-data { + samsung,spi-feedback-delay = <1>; + }; + + i2c-tunnel { + compatible = "google,cros-ec-i2c-tunnel"; + #address-cells = <1>; + #size-cells = <0>; + google,remote-bus = <0>; + + battery: sbs-battery@b { + compatible = "sbs,sbs-battery"; + reg = <0xb>; + sbs,poll-retry-count = <1>; + sbs,i2c-retry-count = <2>; + }; + + power-regulator@48 { + compatible = "ti,tps65090"; + reg = <0x48>; + + /* + * Config irq to disable internal pulls + * even though we run in polling mode. + */ + pinctrl-names = "default"; + pinctrl-0 = <&tps65090_irq>; + + vsys1-supply = <&vbat>; + vsys2-supply = <&vbat>; + vsys3-supply = <&vbat>; + infet1-supply = <&vbat>; + infet2-supply = <&vbat>; + infet3-supply = <&vbat>; + infet4-supply = <&vbat>; + infet5-supply = <&vbat>; + infet6-supply = <&vbat>; + infet7-supply = <&vbat>; + vsys-l1-supply = <&vbat>; + vsys-l2-supply = <&vbat>; + + regulators { + dcdc1 { + ti,enable-ext-control; + }; + dcdc2 { + ti,enable-ext-control; + }; + dcdc3 { + ti,enable-ext-control; + }; + fet1 { + regulator-name = "vcd_led"; + }; + tps65090_fet2: fet2 { + regulator-name = "video_mid"; + regulator-always-on; + }; + fet3 { + regulator-name = "wwan_r"; + regulator-always-on; + }; + fet4 { + regulator-name = "sdcard"; + regulator-always-on; + }; + fet5 { + regulator-name = "camout"; + }; + fet6 { + regulator-name = "lcd_vdd"; + }; + tps65090_fet7: fet7 { + regulator-name = "video_mid_1a"; + regulator-always-on; + }; + ldo1 { + }; + ldo2 { + }; + }; + + charger { + compatible = "ti,tps65090-charger"; + }; + }; + }; + }; +}; + &hsi2c_7 { status = "okay"; @@ -285,3 +429,5 @@ }; }; }; + +#include "cros-ec-keyboard.dtsi" diff --git a/arch/arm/boot/dts/exynos5800-peach-pi.dts b/arch/arm/boot/dts/exynos5800-peach-pi.dts index f3af207..b33f548 100644 --- a/arch/arm/boot/dts/exynos5800-peach-pi.dts +++ b/arch/arm/boot/dts/exynos5800-peach-pi.dts @@ -23,6 +23,11 @@ "google,pi", "google,peach", "samsung,exynos5800", "samsung,exynos5"; + aliases { + /* Assign 20 so we don't get confused w/ builtin ones */ + i2c20 = "/spi@12d40000/cros-ec@0/i2c-tunnel"; + }; + memory { reg = <0x20000000 0x80000000>; }; @@ -78,6 +83,13 @@ pinctrl-0 = <&usb301_vbus_en>; enable-active-high; }; + + vbat: fixed-regulator { + compatible = "regulator-fixed"; + regulator-name = "vbat-supply"; + regulator-boot-on; + regulator-always-on; + }; }; &pinctrl_0 { @@ -102,6 +114,20 @@ samsung,pin-drv = <0>; }; + ec_irq: ec-irq { + samsung,pins = "gpx1-5"; + samsung,pin-function = <0>; + samsung,pin-pud = <0>; + samsung,pin-drv = <0>; + }; + + tps65090_irq: tps65090-irq { + samsung,pins = "gpx2-5"; + samsung,pin-function = <0>; + samsung,pin-pud = <0>; + samsung,pin-drv = <0>; + }; + hdmi_hpd_irq: hdmi-hpd-irq { samsung,pins = "gpx3-7"; samsung,pin-function = <0>; @@ -111,6 +137,19 @@ }; &pinctrl_3 { + /* Drive SPI lines at x2 for better integrity */ + spi2-bus { + samsung,pin-drv = <2>; + }; + + /* Drive SPI chip select at x2 for better integrity */ + ec_spi_cs: ec-spi-cs { + samsung,pins = "gpb1-2"; + samsung,pin-function = <1>; + samsung,pin-pud = <0>; + samsung,pin-drv = <2>; + }; + usb300_vbus_en: usb300-vbus-en { samsung,pins = "gph0-0"; samsung,pin-function = <1>; @@ -173,6 +212,111 @@ }; }; +&spi_2 { + status = "okay"; + num-cs = <1>; + samsung,spi-src-clk = <0>; + cs-gpios = <&gpb1 2 0>; + + cros_ec: cros-ec@0 { + compatible = "google,cros-ec-spi"; + interrupt-parent = <&gpx1>; + interrupts = <5 0>; + pinctrl-names = "default"; + pinctrl-0 = <&ec_spi_cs &ec_irq>; + reg = <0>; + spi-max-frequency = <3125000>; + + controller-data { + samsung,spi-feedback-delay = <1>; + }; + + i2c-tunnel { + compatible = "google,cros-ec-i2c-tunnel"; + #address-cells = <1>; + #size-cells = <0>; + google,remote-bus = <0>; + + battery: sbs-battery@b { + compatible = "sbs,sbs-battery"; + reg = <0xb>; + sbs,poll-retry-count = <1>; + sbs,i2c-retry-count = <2>; + }; + + power-regulator@48 { + compatible = "ti,tps65090"; + reg = <0x48>; + + /* + * Config irq to disable internal pulls + * even though we run in polling mode. + */ + pinctrl-names = "default"; + pinctrl-0 = <&tps65090_irq>; + + vsys1-supply = <&vbat>; + vsys2-supply = <&vbat>; + vsys3-supply = <&vbat>; + infet1-supply = <&vbat>; + infet2-supply = <&vbat>; + infet3-supply = <&vbat>; + infet4-supply = <&vbat>; + infet5-supply = <&vbat>; + infet6-supply = <&vbat>; + infet7-supply = <&vbat>; + vsys-l1-supply = <&vbat>; + vsys-l2-supply = <&vbat>; + + regulators { + dcdc1 { + ti,enable-ext-control; + }; + dcdc2 { + ti,enable-ext-control; + }; + dcdc3 { + ti,enable-ext-control; + }; + fet1 { + regulator-name = "vcd_led"; + }; + tps65090_fet2: fet2 { + regulator-name = "video_mid"; + regulator-always-on; + }; + fet3 { + regulator-name = "wwan_r"; + regulator-always-on; + }; + fet4 { + regulator-name = "sdcard"; + regulator-always-on; + }; + fet5 { + regulator-name = "camout"; + }; + fet6 { + regulator-name = "lcd_vdd"; + }; + tps65090_fet7: fet7 { + regulator-name = "video_mid_1a"; + regulator-always-on; + }; + ldo1 { + }; + ldo2 { + }; + }; + + charger { + compatible = "ti,tps65090-charger"; + }; + }; + }; + }; +}; + &dp { status = "okay"; pinctrl-names = "default"; @@ -251,3 +395,5 @@ &watchdog { timeout-sec = <32>; }; + +#include "cros-ec-keyboard.dtsi"