diff mbox

[RFC,2/3] dts: arm: genmai: Add MAXDESREF4x spidev

Message ID 1480693434-9415-3-git-send-email-jacopo@jmondi.org (mailing list archive)
State RFC
Delegated to: Simon Horman
Headers show

Commit Message

Jacopo Mondi Dec. 2, 2016, 3:43 p.m. UTC
Add device node for the MAX11100 evaluation board connected to Genmai's
CN2.
The evaluation kit is connected to 4 GPIO lines configured ad bitbanged
SPI master interface

Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
---
 arch/arm/boot/dts/r7s72100-genmai.dts | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

Comments

Geert Uytterhoeven Dec. 2, 2016, 7:23 p.m. UTC | #1
Hi Jacopo,

On Fri, Dec 2, 2016 at 4:43 PM, Jacopo Mondi <jacopo@jmondi.org> wrote:
> Add device node for the MAX11100 evaluation board connected to Genmai's
> CN2.
> The evaluation kit is connected to 4 GPIO lines configured ad bitbanged

3 GPIO lines?

configured as

> SPI master interface
>
> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
> ---
>  arch/arm/boot/dts/r7s72100-genmai.dts | 22 ++++++++++++++++++++++
>  1 file changed, 22 insertions(+)
>
> diff --git a/arch/arm/boot/dts/r7s72100-genmai.dts b/arch/arm/boot/dts/r7s72100-genmai.dts
> index 233908b..89a1977 100644
> --- a/arch/arm/boot/dts/r7s72100-genmai.dts
> +++ b/arch/arm/boot/dts/r7s72100-genmai.dts
> @@ -46,6 +46,24 @@
>                 };
>         };
>
> +       spi-gpio {
> +               compatible = "spi-gpio";
> +               #address-cells = <1>;
> +               #size-cells = <0>;
> +               pinctrl-names = "default";

Why do you need pinctrl-names?
You have no pinctrl configuration.

> +
> +               gpio-miso = <&port11 10 GPIO_ACTIVE_HIGH>;
> +               gpio-sck = <&port11  9 GPIO_ACTIVE_HIGH>;
> +               num-chipselects = <1>;
> +               cs-gpios = <&port11 11 GPIO_ACTIVE_HIGH>;
> +               status = "ok";
> +
> +               maxrefdes4x {

Missing unit address "@0"

> +                       compatible = "linux,spidev";

These days you should use "maxim,max11100", and at that compatible
value to drivers/spi/spidev.c

> +                       reg = <0>;
> +                       spi-max-frequency = <240000>;
> +               };
> +       };
>  };

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
Geert Uytterhoeven Dec. 3, 2016, 10:29 a.m. UTC | #2
On Fri, Dec 2, 2016 at 8:23 PM, Geert Uytterhoeven <geert@linux-m68k.org> wrote:
>> +                       compatible = "linux,spidev";
>
> These days you should use "maxim,max11100", and at that compatible

s/at/add/, of course

> value to drivers/spi/spidev.c

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
diff mbox

Patch

diff --git a/arch/arm/boot/dts/r7s72100-genmai.dts b/arch/arm/boot/dts/r7s72100-genmai.dts
index 233908b..89a1977 100644
--- a/arch/arm/boot/dts/r7s72100-genmai.dts
+++ b/arch/arm/boot/dts/r7s72100-genmai.dts
@@ -46,6 +46,24 @@ 
 		};
 	};
 
+	spi-gpio {
+		compatible = "spi-gpio";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		pinctrl-names = "default";
+
+		gpio-miso = <&port11 10 GPIO_ACTIVE_HIGH>;
+		gpio-sck = <&port11  9 GPIO_ACTIVE_HIGH>;
+		num-chipselects = <1>;
+		cs-gpios = <&port11 11 GPIO_ACTIVE_HIGH>;
+		status = "ok";
+
+		maxrefdes4x {
+			compatible = "linux,spidev";
+			reg = <0>;
+			spi-max-frequency = <240000>;
+		};
+	};
 };
 
 &extal_clk {
@@ -123,3 +141,7 @@ 
 		spi-max-frequency = <5000000>;
 	};
 };
+
+&port11 {
+	status = "okay";
+};