Re: [PATCH 13/13] ARM: dts: blanche: add Ethernet support

2016-06-02 Thread Sergei Shtylyov

On 06/01/2016 03:27 PM, Geert Uytterhoeven wrote:


--- renesas.orig/arch/arm/boot/dts/r8a7792-blanche.dts
+++ renesas/arch/arm/boot/dts/r8a7792-blanche.dts



+   ethernet@1800 {
+   compatible = "smsc,lan89218", "smsc,lan9115";



The "smsc,lan89218" needs to be documented in the device tree bindings.


   Have you looked at those bindings?


Now I did.


Google couldn't find any evidence you submitted a patch for that.


   Because the bindings document *any* LAN9115 compatible chip already.


Ah, generic wildcard, not listing valid values. Hence checkpatch complained...


   Note that it doesn't complain about "smsc,lan9220" though that is only 
mentioned in the example.



Google predict-while-you-type suggests "lan89218aq"? Should you use that?


   No, my googling shows that the suffix can be different, and the Microchip 
(the new owner?) has it without the suffix on their site.



BTW, that's why we always want to document all valid values...



Gr{oetje,eeting}s,

Geert


MBR, Sergei



Re: [PATCH 13/13] ARM: dts: blanche: add Ethernet support

2016-06-01 Thread Geert Uytterhoeven
Hi Sergei,

On Wed, Jun 1, 2016 at 2:16 PM, Sergei Shtylyov
 wrote:
> On 6/1/2016 11:22 AM, Geert Uytterhoeven wrote:
>>> --- renesas.orig/arch/arm/boot/dts/r8a7792-blanche.dts
>>> +++ renesas/arch/arm/boot/dts/r8a7792-blanche.dts
>>
>>> +   ethernet@1800 {
>>> +   compatible = "smsc,lan89218", "smsc,lan9115";
>>
>>
>> The "smsc,lan89218" needs to be documented in the device tree bindings.
>
>Have you looked at those bindings?

Now I did.

>> Google couldn't find any evidence you submitted a patch for that.
>
>Because the bindings document *any* LAN9115 compatible chip already.

Ah, generic wildcard, not listing valid values. Hence checkpatch complained...

Google predict-while-you-type suggests "lan89218aq"? Should you use that?
BTW, that's why we always want to document all valid values...

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@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


Re: [PATCH 13/13] ARM: dts: blanche: add Ethernet support

2016-06-01 Thread Sergei Shtylyov

Hello.

On 6/1/2016 11:22 AM, Geert Uytterhoeven wrote:


--- renesas.orig/arch/arm/boot/dts/r8a7792-blanche.dts
+++ renesas/arch/arm/boot/dts/r8a7792-blanche.dts



+   ethernet@1800 {
+   compatible = "smsc,lan89218", "smsc,lan9115";


The "smsc,lan89218" needs to be documented in the device tree bindings.


   Have you looked at those bindings?


Google couldn't find any evidence you submitted a patch for that.


   Because the bindings document *any* LAN9115 compatible chip already.


Gr{oetje,eeting}s,

Geert


MBR, Sergei



Re: [PATCH 13/13] ARM: dts: blanche: add Ethernet support

2016-06-01 Thread Geert Uytterhoeven
Hi Sergei,

On Wed, Jun 1, 2016 at 12:33 AM, Sergei Shtylyov
 wrote:
> --- renesas.orig/arch/arm/boot/dts/r8a7792-blanche.dts
> +++ renesas/arch/arm/boot/dts/r8a7792-blanche.dts

> +   ethernet@1800 {
> +   compatible = "smsc,lan89218", "smsc,lan9115";

The "smsc,lan89218" needs to be documented in the device tree bindings.
Google couldn't find any evidence you submitted a patch for that.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@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


[PATCH 13/13] ARM: dts: blanche: add Ethernet support

2016-05-31 Thread Sergei Shtylyov
R8A7792  SoC  doesn't have the EtherMAC core, so SMSC  LAN89218  Ethernet
chip was used instead on the Blanche board; this chip  is compatible with
SMSC LAN9115  for  which there's a (device tree aware) driver. Describe
the  chip in  the  Blanche device tree;  enable DHCP and NFS root in the
kernel command line for the kernel booting.

Signed-off-by: Sergei Shtylyov 

---
 arch/arm/boot/dts/r8a7792-blanche.dts |   23 ++-
 1 file changed, 22 insertions(+), 1 deletion(-)

Index: renesas/arch/arm/boot/dts/r8a7792-blanche.dts
===
--- renesas.orig/arch/arm/boot/dts/r8a7792-blanche.dts
+++ renesas/arch/arm/boot/dts/r8a7792-blanche.dts
@@ -21,7 +21,7 @@
};
 
chosen {
-   bootargs = "ignore_loglevel";
+   bootargs = "ignore_loglevel rw root=/dev/nfs ip=dhcp";
stdout-path = "serial0:115200n8";
};
 
@@ -29,6 +29,27 @@
device_type = "memory";
reg = <0 0x4000 0 0x4000>;
};
+
+   d3_3v: regulator-3v3 {
+   compatible = "regulator-fixed";
+   regulator-name = "D3.3V";
+   regulator-min-microvolt = <330>;
+   regulator-max-microvolt = <330>;
+   regulator-boot-on;
+   regulator-always-on;
+   };
+
+   ethernet@1800 {
+   compatible = "smsc,lan89218", "smsc,lan9115";
+   reg = <0 0x1800 0 0x100>;
+   phy-mode = "mii";
+   interrupt-parent = <>;
+   interrupts = <0 IRQ_TYPE_EDGE_FALLING>;
+   smsc,irq-push-pull;
+   reg-io-width = <4>;
+   vddvario-supply = <_3v>;
+   vdd33a-supply = <_3v>;
+   };
 };
 
 _clk {