Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5901239imu; Mon, 26 Nov 2018 06:41:10 -0800 (PST) X-Google-Smtp-Source: AFSGD/Uk+CgrWkPLozgEzGbvG0/tFLoRrvQTZcJnLRpVHgu6v4W7jMgsEUEcvHcK+DeD8q26EH/m X-Received: by 2002:a17:902:8d83:: with SMTP id v3-v6mr28032081plo.162.1543243270814; Mon, 26 Nov 2018 06:41:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543243270; cv=none; d=google.com; s=arc-20160816; b=dsou0nIMjP1A1meTSzPtTj283GKy3dl90xz2/GLEeByR5bjLga3a20gBnoHx1vyOFW Qyv+Sh9HiXpTLc7kqBr2lV1xsIFhNyfgZZbT2RZjtZl8CqjkvUEZOQTFed9EgeEhiZ9O HbgH/OAU6VZIHdJ/sPG9LBsAYkp4V5V+u/BVPrf1nT+OHbFNB3R1PgidqJK4xOTnoRNb cPU7HUfsFBlmUHCi6CVIDjJwdYxYqhK73ycUT8Mq6q9RBmO5EqvIWZwMRZCD3F4aSQ6R RsYRlkb286kSMbmHilkkMdhAIazMaJNk9qCO8pJeXEzmlpk91JccyqXmbKYs1Kb9ALfS qySQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=1S161nk4/5HZ/VZd+nTMzqR+YrouaIIb/epCtQom+N0=; b=O53kZq5NWWloFBb+ELsuzLLzbwO2tBrmuJz7tgWf1OtTSwoDNfEmI0Xe7H+h75bNgo af4Tnexr9oaM/ou8giU6tETRTF4uxeovYY/bJbzTFgvEW82FAUYqP4D5H2AFBYpHQpry voqFkdqfZJpC066M9lRg3vlVLVuXwVWxjK0Z7D+GoV/sz2QQFCtCTBh4CKvjzPnluq8L Jm8Y8Kvzc+2eq3RTryPNpUJ2VUYYUh/Nnu64fHQ/MtviHB8PlOMi5ONx3MI4tiQ3Vb1K JONC3KqgIBCrer9jnbPQx6LF85LytwyvdNDUSrdnywZvzLaNLAJIOu0wv1g17FIfFO7O xnpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=oanj4V+l; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n15si523675pgk.27.2018.11.26.06.40.38; Mon, 26 Nov 2018 06:41:10 -0800 (PST) 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=pass header.i=@kernel.org header.s=default header.b=oanj4V+l; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726812AbeK0BbC (ORCPT + 99 others); Mon, 26 Nov 2018 20:31:02 -0500 Received: from mail.kernel.org ([198.145.29.99]:42558 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726227AbeK0BbC (ORCPT ); Mon, 26 Nov 2018 20:31:02 -0500 Received: from dragon (61-216-91-114.HINET-IP.hinet.net [61.216.91.114]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B6D4F20817; Mon, 26 Nov 2018 14:36:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1543243003; bh=2tdgbdnNKOCYYkZMNe2C5qf+MplydxQgplLj1+sVJEU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=oanj4V+lm6jMsp2i0LaL4b6/ZwkR4/SczGqdCW8le4Y3rLlrKW8nUfpbo8Y7Zcob9 Z2jX+cblddTGfqpfyANX3+uPNftOUNPMyXjvCRtAwiuXh7IFL/QI+uG3Rm/VjMxrZb J1c4By+PnMJerdHyv6aO9h0TLG1J6dlxQeGRRnfQ= Date: Mon, 26 Nov 2018 22:36:22 +0800 From: Shawn Guo To: Lukasz Majewski Cc: Rob Herring , Mark Rutland , Sascha Hauer , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Pengutronix Kernel Team , Stefan Agner , Fabio Estevam , Fabio Estevam Subject: Re: [PATCH] ARM: dts: Provide support for reading ID code from MVB device (BK4) Message-ID: <20181126143619.GB31334@dragon> References: <20181113121213.14296-1-lukma@denx.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181113121213.14296-1-lukma@denx.de> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 13, 2018 at 01:12:13PM +0100, Lukasz Majewski wrote: > 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 A prefix like 'ARM: dts: vf610-bk4: ...' might be better. > --- > 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 { We recommend hyphen rather than underscore be used in node name. > + 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 { Please use a generic name for the node. Shawn > + 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 > -- > 2.11.0 >