From patchwork Sun Jan 29 10:33:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Slawomir Stepien X-Patchwork-Id: 9543913 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 0471D604AA for ; Sun, 29 Jan 2017 10:33:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D5E7726E4F for ; Sun, 29 Jan 2017 10:33:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B7BE628391; Sun, 29 Jan 2017 10:33:11 +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=-1.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, FREEMAIL_FROM,T_DKIM_INVALID autolearn=no 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 822E426E4F for ; Sun, 29 Jan 2017 10:33:10 +0000 (UTC) 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 1cXmn8-0007PD-3H; Sun, 29 Jan 2017 10:33:02 +0000 Received: from smtpo.poczta.interia.pl ([217.74.65.206]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cXmn2-0007NW-Bf for linux-amlogic@lists.infradead.org; Sun, 29 Jan 2017 10:33:00 +0000 X-Interia-R: Interia X-Interia-R-IP: 188.121.17.172 X-Interia-R-Helo: Received: from x220.localdomain (unknown [188.121.17.172]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by www.poczta.fm (INTERIA.PL) with ESMTPSA for ; Sun, 29 Jan 2017 11:32:25 +0100 (CET) Date: Sun, 29 Jan 2017 11:33:26 +0100 From: Slawomir Stepien To: linux-amlogic@lists.infradead.org Subject: [RFC] spi-gpio on Odroid-C2 board Message-ID: <20170129103326.GA26547@x220.localdomain> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.7.2 (2016-11-26) X-Interia-Antivirus: OK DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=interia.pl; s=biztos; t=1485685945; bh=d5MouCN7zDP32J6L0VdRTaK4iuZKMQbC9+5Kac5qKeE=; h=X-Interia-R:X-Interia-R-IP:X-Interia-R-Helo:Date:From:To:Subject: Message-ID:MIME-Version:Content-Type:Content-Disposition: User-Agent:X-Interia-Antivirus; b=GspPrbjdmuKd1LlhZrKYNxXEUsKPbPRszZ2Gqm/5bDOyQuukKKz+gCV/4k+CcQYjc dZtpxVKB+fBI+LrdMc73wBmA/Dn+Ueg3m5LHHS6836sHyXC5EtBxoryksSblhiJESq +Fg7IejdCJ55Loe0G+WLAyVVzi0DR4gUy9RSNzgs= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170129_023256_769201_80F509F7 X-CRM114-Status: UNSURE ( 6.72 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Hi Are there any issues regarding using spi-gpio on Odroid-C2 board dts file? I would like to use it but from what I can see dts still doesn't have it? I tested something like this and is seems to works: diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts index 5d28e1cdc998..62104dcd48a6 100644 --- a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts +++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts @@ -135,6 +135,18 @@ compatible = "mmc-pwrseq-emmc"; reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>; }; + + spi-gpio { + compatible = "spi-gpio"; + #address-cells = <1>; + #size-cells = <0>; + gpio-sck = <&gpio GPIOX_2 GPIO_ACTIVE_HIGH>; + gpio-miso = <&gpio GPIOX_4 GPIO_ACTIVE_HIGH>; + gpio-mosi = <&gpio GPIOX_7 GPIO_ACTIVE_HIGH>; + cs-gpios = <&gpio GPIOX_1 GPIO_ACTIVE_HIGH + &gpio GPIOY_14 GPIO_ACTIVE_HIGH>; + num-chipselects = <2>; + }; }; &scpi_clocks {