From patchwork Mon Sep 11 23:22:22 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Moritz Fischer X-Patchwork-Id: 9948201 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A58826024A for ; Mon, 11 Sep 2017 23:23:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9C52F28D57 for ; Mon, 11 Sep 2017 23:23:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8FBF028D6E; Mon, 11 Sep 2017 23:23:51 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D9E7A28D57 for ; Mon, 11 Sep 2017 23:23:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=IQDR+ccsZEj1EyNeAQWDqYiO6FmD07drn4Jy5gxoWRQ=; b=Vnf ylLCKrz4DpzuJ+r9osKEzTyaI7SiQGN/bDoEANfZDCfBqf5evzu/AwxJTKjg14bmNWIJHiF8+PsQg t8vRfSTybRa2aJYVehP6VB1q6Dbtp9g/9lBhdSZX0gd80uryyIRFUW30ybDnrEC2JBS0nrF3ovbI9 O7bP78hFzWr1NY7P3q0SKpzlHzm0CnQSkGfxT5Fl9yQ6yqaZudXITh6Hsf/gtTbuyTksQQgDlmXzT 28AMvREov1hL5Uzd5TnNAgmQpeWavVLSYuVvOATRbucA/cnR55OQrTplBUiLGGNtCtNA+E1q0ijJ5 G0w/l001OhgzZKY2EOoqsxEO5XF3hLg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1drY3I-0004v0-K8; Mon, 11 Sep 2017 23:23:40 +0000 Received: from mail-pg0-f46.google.com ([74.125.83.46]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1drY3D-0004r8-K8 for linux-arm-kernel@lists.infradead.org; Mon, 11 Sep 2017 23:23:37 +0000 Received: by mail-pg0-f46.google.com with SMTP id 188so18010959pgb.2 for ; Mon, 11 Sep 2017 16:23:14 -0700 (PDT) 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; bh=tPta/y9mj0wFESIzcE3mgptgmDDKzCIjzS3h88No3Q0=; b=Lxc37Dj9YWLH9BhMWkaK50JjNgPwH7Sro/pNl32THn28PlFvBLJDcrX0jqw9C6ZxPS cDJLieq/H8IAHzEch8004diQTDIXJKRenmoM7CeHhRKv4mjp9mint8OCCfC/KMjIBEjP H33y+5Rt2USH7K8/EYvpq+fNe6tmSGkNogP/FCIckPz5v37y6qeAWcB5+Pa//uO5tQTw ab1y9AyiOFRg0TooGQTINdqw3NYA3RXMqEPQ5fT05HOeO8Hv3FUjdNA2j0xHjzW5VL4a Oovs5nNeK4+JQ5URYLAKCkPZcy0uLMZurKw9WXYGhW3T9Y+MnlKlqjn0mm9QLOvPRbnl G+sA== X-Gm-Message-State: AHPjjUhImpjJHbMPiCDjpFb5Ob3yK9i9cMoCLdllYAm6iLOqtkflcLsG vJhFYJqMQ0dECcuS X-Google-Smtp-Source: ADKCNb4e1mazmNtT3R1uHOlc2337WGegbX6vj6SVG0pF0998JJ3rrEmoRzTUnuMf5EV9leMGooNXlg== X-Received: by 10.84.216.87 with SMTP id f23mr4244713plj.307.1505172193710; Mon, 11 Sep 2017 16:23:13 -0700 (PDT) Received: from localhost (rrcs-67-52-142-5.west.biz.rr.com. [67.52.142.5]) by smtp.gmail.com with ESMTPSA id c193sm15911875pfc.139.2017.09.11.16.23.11 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 11 Sep 2017 16:23:12 -0700 (PDT) From: Moritz Fischer To: devicetree@vger.kernel.org Subject: [PATCH 1/2] arm: dts: Add support for National Instruments Project Sulfur SDRs Date: Mon, 11 Sep 2017 16:22:22 -0700 Message-Id: <20170911232223.91894-1-mdf@kernel.org> X-Mailer: git-send-email 2.14.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170911_162335_702549_15844391 X-CRM114-Status: GOOD ( 13.58 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mark.rutland@arm.com, linux-kernel@vger.kernel.org, gregkh@linuxfoundation.org, linux@armlinux.org.uk, michal.simek@xilinx.com, robh+dt@kernel.org, Moritz Fischer , davem@davemloft.net, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Add support for the National Instruments Project Sulfur SDR motherboards Rev 2,3 and 4. Signed-off-by: Moritz Fischer Acked-by: Philip Balister --- arch/arm/boot/dts/Makefile | 3 + arch/arm/boot/dts/zynq-ni-sulfur-rev2.dts | 84 +++++++++++++++++++ arch/arm/boot/dts/zynq-ni-sulfur-rev3.dts | 118 ++++++++++++++++++++++++++ arch/arm/boot/dts/zynq-ni-sulfur-rev4.dts | 26 ++++++ arch/arm/boot/dts/zynq-ni-sulfur.dtsi | 133 ++++++++++++++++++++++++++++++ 5 files changed, 364 insertions(+) create mode 100644 arch/arm/boot/dts/zynq-ni-sulfur-rev2.dts create mode 100644 arch/arm/boot/dts/zynq-ni-sulfur-rev3.dts create mode 100644 arch/arm/boot/dts/zynq-ni-sulfur-rev4.dts create mode 100644 arch/arm/boot/dts/zynq-ni-sulfur.dtsi diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index 4b17f35dc9a7..9c3317c00aee 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile @@ -991,6 +991,9 @@ dtb-$(CONFIG_ARCH_VT8500) += \ dtb-$(CONFIG_ARCH_ZYNQ) += \ zynq-microzed.dtb \ zynq-parallella.dtb \ + zynq-ni-sulfur-rev2.dtb \ + zynq-ni-sulfur-rev3.dtb \ + zynq-ni-sulfur-rev4.dtb \ zynq-zc702.dtb \ zynq-zc706.dtb \ zynq-zed.dtb \ diff --git a/arch/arm/boot/dts/zynq-ni-sulfur-rev2.dts b/arch/arm/boot/dts/zynq-ni-sulfur-rev2.dts new file mode 100644 index 000000000000..8b7c54fe9c59 --- /dev/null +++ b/arch/arm/boot/dts/zynq-ni-sulfur-rev2.dts @@ -0,0 +1,84 @@ +/* + * Copyright (c) 2016,2017 National Instruments Corp. + * + * SPDX-License-Identifier: (GPL-2.0 OR X11) + */ + +/dts-v1/; +#include +#include +#include +#include "zynq-ni-sulfur.dtsi" + +/ { + model = "NI/Ettus Research Project Sulfur SDR Rev2"; + compatible = "ettus,zynq-sulfur-rev2", "xlnx,zynq-7000"; + + gpio-poweroff { + compatible = "gpio-poweroff"; + gpios = <&gpio0 4 GPIO_ACTIVE_LOW>; + }; +}; + +&i2c_switch0 { + reset-gpios = <&gpio0 3 GPIO_ACTIVE_LOW>; + + i2c@4 { + #address-cells = <1>; + #size-cells = <0>; + reg = <4>; + + tpm: tpm@20 { + compatible = "infineon,slb9645tt"; + reg = <0x20>; + + interrupts = <1 IRQ_TYPE_LEVEL_LOW>; + interrupt-parent = <&gpio0>; + + reset-gpios = <&gpio0 2 GPIO_ACTIVE_LOW>; + }; + }; + +}; + +&spi1 { + status = "okay"; + + cros_ec: ec@0 { + compatible = "google,cros-ec-spi"; + reg = <0>; + google,cros-ec-spi-msg-delay = <200>; + google,cros-ec-spi-pre-delay = <60>; + google,has-vbc-nvram; + spi-max-frequency = <3000000>; + + interrupts = <5 IRQ_TYPE_LEVEL_LOW>; + interrupt-parent = <&gpio0>; + + tun: i2c-tunnel { + compatible = "google,cros-ec-i2c-tunnel"; + #address-cells = <1>; + #size-cells = <0>; + google,remote-bus = <1>; + clock-frequency = <50000>; + + nvmem0: eeprom@50 { + compatible = "atmel,24c256"; + reg = <0x50>; + }; + + rtc0: rtc@68 { + compatible = "dallas,ds1374"; + reg = <0x68>; + }; + }; + }; +}; + +ðernet_phy0 { + reset-gpios = <&gpio0 6 GPIO_ACTIVE_LOW>; +}; + +&usb_phy0 { + reset-gpios = <&gpio0 7 GPIO_ACTIVE_LOW>; +}; diff --git a/arch/arm/boot/dts/zynq-ni-sulfur-rev3.dts b/arch/arm/boot/dts/zynq-ni-sulfur-rev3.dts new file mode 100644 index 000000000000..fff3a40b507b --- /dev/null +++ b/arch/arm/boot/dts/zynq-ni-sulfur-rev3.dts @@ -0,0 +1,118 @@ +/* + * Copyright (c) 2016,2017 National Instruments Corp. + * + * SPDX-License-Identifier: (GPL-2.0 OR X11) + */ + +/dts-v1/; +#include +#include +#include "zynq-ni-sulfur.dtsi" + +/ { + model = "NI/Ettus Research Project Sulfur SDR Rev3"; + compatible = "ettus,zynq-sulfur-rev3", "xlnx,zynq-7000"; + + gpio-keys { + compatible = "gpio-keys"; + #address-cells = <1>; + #size-cells = <0>; + + power-button { + label = "Power Button"; + linux,code = ; + gpios = <&gpio0 1 GPIO_ACTIVE_HIGH>; + }; + }; + + gpio-poweroff { + compatible = "gpio-poweroff"; + gpios = <&gpio0 3 GPIO_ACTIVE_LOW>; + }; + + leds { + led0 { + label = "sulfur:ledn"; + gpios = <&gpio0 4 GPIO_ACTIVE_LOW>; + linux,default-trigger = "heartbeat"; + }; + }; +}; + +&i2c_switch0 { + reset-gpios = <&gpio0 7 GPIO_ACTIVE_LOW>; + + i2c@3 { + reg = <3>; + #address-cells = <1>; + #size-cells = <0>; + + gpio1: gpio@22 { + compatible = "ti,tca6424"; + reg = <0x22>; + gpio-controller; + #gpio-cells = <2>; + }; + }; + + i2c@5 { + reg = <5>; + status = "okay"; + #address-cells = <1>; + #size-cells = <0>; + + rtc0: rtc@68 { + compatible = "dallas,ds1374"; + reg = <0x68>; + }; + }; + +}; + +&i2c1 { + clock-frequency = <400000>; + status = "okay"; + + embedded-controller@1e { + reg = <0x1e>; + compatible = "google,cros-ec-i2c"; + interrupts = <0 IRQ_TYPE_LEVEL_LOW>; + interrupt-parent = <&gpio0>; + google,has-vbc-nvram; + + wakeup-source; + + tun: i2c-tunnel { + compatible = "google,cros-ec-i2c-tunnel"; + #address-cells = <1>; + #size-cells = <0>; + google,remote-bus = <0>; + clock-frequency = <50000>; + + nvmem0: eeprom@50 { + compatible = "atmel,24c02"; + reg = <0x50>; + }; + }; + }; +}; + +&gpio0 { + ledp { + gpio-hog; + gpios = <5 GPIO_ACTIVE_HIGH>; + output-high; + }; +}; + +ðernet_phy0 { + reset-gpios = <&gpio0 50 GPIO_ACTIVE_LOW>; +}; + +&usb_phy0 { + reset-gpios = <&gpio0 51 GPIO_ACTIVE_LOW>; +}; + +&clkc { + ps-clk-frequency = <33333333>; +}; diff --git a/arch/arm/boot/dts/zynq-ni-sulfur-rev4.dts b/arch/arm/boot/dts/zynq-ni-sulfur-rev4.dts new file mode 100644 index 000000000000..2a5b21549e68 --- /dev/null +++ b/arch/arm/boot/dts/zynq-ni-sulfur-rev4.dts @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2016,2017 National Instruments Corp. + * + * SPDX-License-Identifier: (GPL-2.0 OR X11) + */ + +/dts-v1/; +#include "zynq-ni-sulfur-rev3.dts" + +/ { + model = "NI/Ettus Research Project Sulfur SDR Rev4"; + compatible = "ettus,zynq-sulfur-rev4", "xlnx,zynq-7000"; +}; + +&i2c_switch0 { + i2c@4 { + reg = <4>; + #address-cells = <1>; + #size-cells = <0>; + + tpm: tpm@29 { + compatible = "atmel,at97sc3204t"; + reg = <0x29>; + }; + }; +}; diff --git a/arch/arm/boot/dts/zynq-ni-sulfur.dtsi b/arch/arm/boot/dts/zynq-ni-sulfur.dtsi new file mode 100644 index 000000000000..4bf63f09c81a --- /dev/null +++ b/arch/arm/boot/dts/zynq-ni-sulfur.dtsi @@ -0,0 +1,133 @@ +/* + * Copyright (c) 2016,2017 National Instruments Corp. + * + * SPDX-License-Identifier: (GPL-2.0 OR X11) + */ + +/dts-v1/; + +#include +#include "zynq-7000.dtsi" + +/ { + aliases { + ethernet0 = &gem0; + serial0 = &uart0; + serial1 = &uart1; + spi0 = &spi0; + spi1 = &spi1; + gpio0 = &gpio0; + i2c0 = &i2c0; + i2c1 = &i2c1; + i2c20 = &tun; + i2c706 = &usrpio_i2c0; + i2c707 = &usrpio_i2c1; + }; + + memory { + device_type = "memory"; + reg = <0x0 0x40000000>; + }; + + chosen { + stdout-path = "serial0:115200n8"; + }; + + usb_phy0: phy0 { + compatible = "usb-nop-xceiv"; + #phy-cells = <0>; + }; +}; + +&cpu0 { + operating-points = <800000 1000000>; +}; + +&clkc { + ps-clk-frequency = <33333333>; +}; + +&sdhci0 { + status = "okay"; +}; + +&uart0 { + status = "okay"; +}; + +&uart1 { + status = "okay"; +}; + +/* we use the ARM global timer */ +&ttc0 { + status = "disabled"; +}; + +/* we use the ARM global timer */ +&ttc1 { + status = "disabled"; +}; + +&i2c0 { + status = "okay"; + clock-frequency = <400000>; + + i2c_switch0: i2cswitch@70 { + compatible = "nxp,pca9548"; + #address-cells = <1>; + #size-cells = <0>; + reg = <0x70>; + + usrpio_i2c0: i2c@6 { + #address-cells = <1>; + #size-cells = <0>; + reg = <6>; + + nvmem2: eeprom@50 { + compatible = "atmel,24c256"; + reg = <0x50>; + }; + + }; + + usrpio_i2c1: i2c@7 { + #address-cells = <1>; + #size-cells = <0>; + reg = <6>; + + nvmem3: eeprom@50 { + compatible = "atmel,24c256"; + reg = <0x50>; + }; + }; + + }; +}; + +&gpio0 { + status = "okay"; +}; + +&gem0 { + phy-mode = "rgmii-id"; + phy-handle = <ðernet_phy0>; + status = "okay"; + + ethernet_phy0: ethernet-phy@0 { + reg = <0>; + }; +}; + +&usb0 { + usb-phy = <&usb_phy0>; + dr_mode = "otg"; + status = "okay"; +}; + +&amba { + ocm: sram@fffc0000 { + compatible = "mmio-sram"; + reg = <0xfffc0000 0x10000>; + }; +};