[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20181126143619.GB31334@dragon>
Date: Mon, 26 Nov 2018 22:36:22 +0800
From: Shawn Guo <shawnguo@...nel.org>
To: Lukasz Majewski <lukma@...x.de>
Cc: Rob Herring <robh+dt@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Sascha Hauer <s.hauer@...gutronix.de>,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org,
Pengutronix Kernel Team <kernel@...gutronix.de>,
Stefan Agner <stefan@...er.ch>,
Fabio Estevam <festevam@...il.com>,
Fabio Estevam <fabio.estevam@....com>
Subject: Re: [PATCH] ARM: dts: Provide support for reading ID code from MVB
device (BK4)
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 <lukma@...x.de>
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
>
Powered by blists - more mailing lists