From patchwork Tue Nov 13 12:12:13 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukasz Majewski X-Patchwork-Id: 10680433 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D866D13B5 for ; Tue, 13 Nov 2018 12:13:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C606E2985A for ; Tue, 13 Nov 2018 12:13:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B9E4E2A3E9; Tue, 13 Nov 2018 12:13:05 +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=-3.4 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.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 59A932985A for ; Tue, 13 Nov 2018 12:13:02 +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=32YhSGfc1pjJ5F1GoQoC7CeLuArANjoeckAlIwYSRvk=; b=oq3 6lOickudrcK82riIytScBvMwnLmw0rF/Ce6qPEIZ7DqRd0CAasOE1GVHdjtv96hM0ILAhXCo2mG0r f8VFJgkOuqaXMP5tHj/OlaH/OD/M7zimvlw3D0NhJJS0KgFXZLTDrDPSSQ8kPh1h3z03Mgo8j2mFn NsNvAP4B7gFEB0iA1dRmu6xVEUbe/qMvCEZWjmhEVYzsX+203BYqTKr+VJ9EhwgmsiBRQokgI0a6t ubPX/LqDqjEYh6AMHqT6jS2JAEAXtv5ihD4f4lZeTRKLipDec9iscC12Bpi62TivC6eBDG2ERoPT/ su94Vio9+oDPD3g2kC3yoQEPupfj1pQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gMXYx-0002Jv-Th; Tue, 13 Nov 2018 12:12:59 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gMXYw-0002Jo-Cm for linux-arm-kernel@bombadil.infradead.org; Tue, 13 Nov 2018 12:12:58 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=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:In-Reply-To:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=QXVxtjtRR9q4tIxX5fGFr01sDJ9eWKp1+N5yDsS8DHc=; b=HE6lwC/24dI/CfcVkEB909p1P nR/cV1VsC+tiD//Fcec9ucXZCrEhHZPNm63+4deqjQxgzXfV7Cz3V+wJS04Df9VVH44LW1J06m0b3 a21YbKd46IYDogfnBaqM8oaFdxKnD+GZYX1FThvE4GKmGQijM5qdUaT7F58suLQtk9+LYXQy1AgPa XdgtczpCjDvfEeRr3vHaatGQTqOFveLmqAdwRM66F0pK886yGxFXwMr5NqggNixPXrB4TwDRmaybn QpoA+Ve/4Oym0ZOTTXHQrh1LAQGeEsV52l/iQuRY9McH/6Nmhwb/mvx4XEhy1R+PMxZc0d/gB7bce wtgyOC7lA==; Received: from mail-out.m-online.net ([212.18.0.9]) by merlin.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gMXYs-0004JR-AX for linux-arm-kernel@lists.infradead.org; Tue, 13 Nov 2018 12:12:56 +0000 Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 42vRMn3dnYz1qxQJ; Tue, 13 Nov 2018 13:12:37 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 42vRMn1qmCz1qqkb; Tue, 13 Nov 2018 13:12:37 +0100 (CET) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id huRONACpOkaa; Tue, 13 Nov 2018 13:12:35 +0100 (CET) X-Auth-Info: R6XyVSsqWD7gnt4bau0atOGbviHh6AlYBmU1XBBADI0= Received: from localhost.localdomain (85-222-111-42.dynamic.chello.pl [85.222.111.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Tue, 13 Nov 2018 13:12:35 +0100 (CET) From: Lukasz Majewski To: Shawn Guo , Rob Herring , Mark Rutland Subject: [PATCH] ARM: dts: Provide support for reading ID code from MVB device (BK4) Date: Tue, 13 Nov 2018 13:12:13 +0100 Message-Id: <20181113121213.14296-1-lukma@denx.de> X-Mailer: git-send-email 2.11.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181113_071254_525435_9B5473D2 X-CRM114-Status: GOOD ( 12.17 ) 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: devicetree@vger.kernel.org, Sascha Hauer , linux-kernel@vger.kernel.org, Stefan Agner , Lukasz Majewski , Pengutronix Kernel Team , Fabio Estevam , Fabio Estevam , 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 The procedure to read this ID value is as follows: rmmod spi_fsl_dspi insmod spi-gpio.ko echo 504 > /sys/class/gpio/export cat /sys/class/gpio/gpio504/value ... echo 511 > /sys/class/gpio/export cat /sys/class/gpio/gpio511/value rmmod spi-gpio.ko insmod spi_fsl_dspi Signed-off-by: Lukasz Majewski --- arch/arm/boot/dts/vf610-bk4.dts | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/arch/arm/boot/dts/vf610-bk4.dts b/arch/arm/boot/dts/vf610-bk4.dts index cab95714c058..f01c735807ae 100644 --- a/arch/arm/boot/dts/vf610-bk4.dts +++ b/arch/arm/boot/dts/vf610-bk4.dts @@ -59,6 +59,29 @@ regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; }; + + spi_gpio { + compatible = "spi-gpio"; + pinctrl-0 = <&pinctrl_gpio_spi>; + pinctrl-names = "default"; + #address-cells = <1>; + #size-cells = <0>; + /* PTD12 ->RPIO[91] */ + sck-gpios = <&gpio2 27 GPIO_ACTIVE_LOW>; + /* PTD10 ->RPIO[89] */ + miso-gpios = <&gpio2 25 GPIO_ACTIVE_HIGH>; + num-chipselects = <0>; + + 72xx165@0 { + compatible = "pisosr-gpio"; + reg = <0>; + gpio-controller; + #gpio-cells = <2>; + /* PTB18 -> RGPIO[40] */ + load-gpios = <&gpio1 8 GPIO_ACTIVE_LOW>; + spi-max-frequency = <100000>; + }; + }; }; &adc0 { @@ -430,6 +453,14 @@ >; }; + pinctrl_gpio_spi: pinctrl-gpio-spi { + fsl,pins = < + VF610_PAD_PTB18__GPIO_40 0x1183 + VF610_PAD_PTD10__GPIO_89 0x1183 + VF610_PAD_PTD12__GPIO_91 0x1183 + >; + }; + pinctrl_i2c2: i2c2grp { fsl,pins = < VF610_PAD_PTA22__I2C2_SCL 0x34df