Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp1009172imm; Thu, 31 May 2018 13:27:42 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIA1KJBJ5TV6a646FbRp5jgE9T8KE94H8aUC07FRdmsk/s+6zCAxUs2L8zq1bhlDtWTsNyD X-Received: by 2002:a62:2f44:: with SMTP id v65-v6mr8097427pfv.83.1527798462431; Thu, 31 May 2018 13:27:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527798462; cv=none; d=google.com; s=arc-20160816; b=kX+tjqi7i0h1zs2fVfSM26oRdvJDC7sIeCjUQ4gTMEsnI7kaXhi1pIz+GuuBwkA5Wi rWJ0D8BKsuxJQ2Zn2rzptug/TyuIfa5pi2BjJQOnE+FT5tHre9Ukx0LsgSbm01cKwXkw woRTKCNSRrymiZfrKVlaZuGJe5sYtEl5P69eRWTGtk6ZUwnuK7bhiqfpMne3NnQ6xNt3 mGmhKTrPmbJbVNj9U1n6cKNt8QN5E/uHCynyIkw0AabaSpZnPzdIM4aIwdYskqvDF90O 0TJzwn8LX2xCE/cL0DSMdS7SAX91fnwzQ31MWpOSzRQOaVccsgI7jl+zhB/0HvolhP2U rT6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=beWdSCiLmzEArjPRFlqjE10CSs8psT44JFM85DJUCkE=; b=xirQ/I9h3m2csZGfGuBR8l9Zl72ijgdAm6F+6Gb22lagqDkyi9TffnNG+23AfXRYFA a7cRRAg30AK5dR5yeUFYsnutx1nOwT06UpwiHcM52aCMEPLwo7VB/e9UX/LiF7d64VO+ kl/eUKQtkbQBQ0/G7E2kFBla2vreo2TLpfWCzBBN3inyUm2H7fbmpii8nN0t9adBhumx o/OUr36D1uZWUdqrdekETknAjdeQBZebClyOSJygNXL6VsT62jVgbRRYNcoR90VlPxnU jBgwnILanvAU3cUjJeHY0PVMHdKFEa1QT0NN675funh5ql1YGZoeu+HyEFtxKnngfiTb P7qQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@lechnology.com header.s=default header.b=zxIYFaAh; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j3-v6si37340306pld.300.2018.05.31.13.27.28; Thu, 31 May 2018 13:27:42 -0700 (PDT) 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=fail header.i=@lechnology.com header.s=default header.b=zxIYFaAh; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754634AbeEaU0T (ORCPT + 99 others); Thu, 31 May 2018 16:26:19 -0400 Received: from vern.gendns.com ([206.190.152.46]:41420 "EHLO vern.gendns.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754523AbeEaU0O (ORCPT ); Thu, 31 May 2018 16:26:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lechnology.com; s=default; h=References:In-Reply-To:Message-Id:Date:Subject :Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=beWdSCiLmzEArjPRFlqjE10CSs8psT44JFM85DJUCkE=; b=zxIYFaAhcXMz1zt3h9ecmVtdH tt+A02Z/rGTWB0NnxfpGKb1IJrnjs0r96TwGQ/3C0MK+3aGZHpzhL272Hnqr4AFBKYSPLIf4FIO4Q 5UyJn548N63Fk/isFw+x/QKeWdX65/QT1aV0Vysd5g0mMNREyw6DSEtU+OHefwyEG3ivU9O37SWEW uTaHJ13csSTbOKHwnokyjuiBfEp/MWij3goB+3tUpC3QpvLxaaxvQ4xQwzh2W371dY91I2ssiWkn4 AlqBnzTNXcc0aQ0acbQBNCq43QxoWFJrwXith9OPmvbV88hNN9sxpD2HDdsfmrIet7GnBJZRuLHCS c0Bww0+qw==; Received: from 108-198-5-147.lightspeed.okcbok.sbcglobal.net ([108.198.5.147]:33766 helo=freyr.lechnology.com) by vern.gendns.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.89_1) (envelope-from ) id 1fOU9E-00HRFI-Ok; Thu, 31 May 2018 16:26:12 -0400 From: David Lechner To: linux-arm-kernel@lists.infradead.org Cc: David Lechner , Sekhar Nori , Kevin Hilman , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] ARM: dts: da850-lego-ev3: Add Bluetooth nodes Date: Thu, 31 May 2018 15:25:48 -0500 Message-Id: <20180531202549.11255-2-david@lechnology.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180531202549.11255-1-david@lechnology.com> References: <20180531202549.11255-1-david@lechnology.com> X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - vern.gendns.com X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - lechnology.com X-Get-Message-Sender-Via: vern.gendns.com: authenticated_id: davidmain+lechnology.com/only user confirmed/virtual account not confirmed X-Authenticated-Sender: vern.gendns.com: davidmain@lechnology.com X-Source: X-Source-Args: X-Source-Dir: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This adds nodes for describing the Bluetooth chip and connections on LEGO MINDSTORMS EV3 to da850-lego-ev3.dts. Signed-off-by: David Lechner --- arch/arm/boot/dts/da850-lego-ev3.dts | 82 ++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) diff --git a/arch/arm/boot/dts/da850-lego-ev3.dts b/arch/arm/boot/dts/da850-lego-ev3.dts index bef42dc78817..fe4cc87394b9 100644 --- a/arch/arm/boot/dts/da850-lego-ev3.dts +++ b/arch/arm/boot/dts/da850-lego-ev3.dts @@ -187,6 +187,15 @@ rechargeable-gpios = <&gpio 136 GPIO_ACTIVE_LOW>; }; + bt_slow_clk: bt-clock { + pinctrl-names = "default"; + pinctrl-0 = <&ecap2_pins>, <&bt_clock_bias>; + compatible = "pwm-clock"; + #clock-cells = <0>; + clock-frequency = <32768>; + pwms = <&ecap2 0 30518 0>; + }; + /* ARM local RAM */ memory@ffff0000 { compatible = "syscon", "simple-mfd"; @@ -251,6 +260,20 @@ bias-disable; }; }; + + bt_clock_bias: bt-clock-bias-groups { + disable { + groups = "cp2"; + bias-disable; + }; + }; + + bt_pic_bias: bt-pic-bias-groups { + disable { + groups = "cp20"; + bias-disable; + }; + }; }; /* Input port 1 */ @@ -260,6 +283,22 @@ pinctrl-0 = <&serial1_rxtx_pins>; }; +&serial2 { + pinctrl-names = "default"; + pinctrl-0 = <&serial2_rxtx_pins>, <&serial2_rtscts_pins>, <&bt_pic_bias>; + status = "okay"; + + bluetooth { + compatible = "ti,cc2560"; + clocks = <&bt_slow_clk>; + clock-names = "ext_clock"; + enable-gpios = <&gpio 73 GPIO_ACTIVE_HIGH>; + max-speed = <2000000>; + nvmem-cells = <&bdaddr>; + nvmem-cell-names = "bd-address"; + }; +}; + &rtc0 { status = "okay"; }; @@ -278,6 +317,12 @@ pagesize = <64>; read-only; reg = <0x50>; + #address-cells = <1>; + #size-cells = <1>; + + bdaddr: bdaddr@3f06 { + reg = <0x3f06 0x06>; + }; }; }; @@ -362,6 +407,10 @@ }; }; +&ecap2 { + status = "okay"; +}; + &ehrpwm0 { status = "okay"; }; @@ -375,6 +424,39 @@ gpios = <6 GPIO_ACTIVE_HIGH>; output-high; }; + + /* Don't impede Bluetooth clock signal */ + bt_clock_en { + gpio-hog; + gpios = <5 GPIO_ACTIVE_HIGH>; + input; + }; + + /* + * There is a PIC microcontroller for interfacing with an Apple MFi + * chip. This interferes with normal Bluetooth operation, so we need + * to make sure it is turned off. Note: The publicly available + * schematics from LEGO don't show that these pins are connected to + * anything, but they are present in the source code from LEGO. + */ + + bt_pic_en { + gpio-hog; + gpios = <51 GPIO_ACTIVE_HIGH>; + output-low; + }; + + bt_pic_rst { + gpio-hog; + gpios = <78 GPIO_ACTIVE_HIGH>; + output-high; + }; + + bt_pic_cts { + gpio-hog; + gpios = <87 GPIO_ACTIVE_HIGH>; + input; + }; }; &usb_phy { -- 2.17.0