Re: FW: help with setting up dwxe on orange pi one (h3)

2017-12-13 Thread Stephen Graf
Yes that works. Thank you for the update. -Original Message- From: Mark Kettenis [mailto:mark.kette...@xs4all.nl] Sent: Wednesday, December 13, 2017 2:40 AM To: s_g...@telus.net Cc: j...@jsg.id.au; arm@openbsd.org; patr...@blueri.se Subject: Re: FW: help with setting up dwxe on orange

Re: FW: help with setting up dwxe on orange pi one (h3)

2017-12-13 Thread Mark Kettenis
> From: "Stephen Graf" > Date: Tue, 12 Dec 2017 11:30:59 -0800 > > I tested the new code on my orange pi one (H3) and it works for the most > part. The communications works but the yellow LED that indicates line speed > (I think) does not light up. I compared the code to my working version and

Re: FW: help with setting up dwxe on orange pi one (h3)

2017-12-12 Thread Stephen Graf
er-...@openbsd.org] On Behalf Of Mark Kettenis Sent: Sunday, December 10, 2017 4:30 AM To: s_g...@telus.net Cc: j...@jsg.id.au; mark.kette...@xs4all.nl; arm@openbsd.org Subject: Re: FW: help with setting up dwxe on orange pi one (h3) > From: "Stephen Graf" > Date: Thu, 30 No

Re: FW: help with setting up dwxe on orange pi one (h3)

2017-12-10 Thread Mark Kettenis
N_H3_EPHY_SHUTDOWN; > +syscon |= SYSCON_H3_EPHY_SELECT|SYSCON_H3_EPHY_CLK_SEL; > +if (OF_getproplen(sc->sc_node, "allwinner,leds-active-low") > >= 0) > +syscon |= SYSCON_H3_EPHY_LED_POL; > +

Re: FW: help with setting up dwxe on orange pi one (h3)

2017-11-30 Thread Stephen Graf
syscon |= SYSCON_H3_EPHY_LED_POL; +else + syscon &= ~SYSCON_H3_EPHY_LED_POL; + syscon &= ~(SYSCON_H3_EPHY_ADDR_MASK << SYSCON_H3_EPHY_ADDR_SHIFT); + syscon |= sc->sc_phyloc << SYSCON_H3_EPHY_ADDR_SHIFT;

Re: FW: help with setting up dwxe on orange pi one (h3)

2017-11-27 Thread Jonathan Gray
On Thu, Sep 28, 2017 at 04:09:36PM +0200, Mark Kettenis wrote: > Jonathan Gray schreef op 2017-09-28 09:51: > > On Thu, Sep 28, 2017 at 09:34:49AM +0200, Mark Kettenis wrote: > > > Jonathan Gray schreef op 2017-09-28 05:02: > > > > On Wed, Sep 27, 2017 at 10:56:44PM +0200, Patrick Wildt wrote: > >

Re: FW: help with setting up dwxe on orange pi one (h3)

2017-09-28 Thread Stephen Graf
#size-cells = <0x0>; cpu@0 { compatible = "arm,cortex-a7"; device_type = "cpu"; reg = <0x0>; }; cpu@1 { compatib

Re: FW: help with setting up dwxe on orange pi one (h3)

2017-09-28 Thread Mark Kettenis
Jonathan Gray schreef op 2017-09-28 09:51: On Thu, Sep 28, 2017 at 09:34:49AM +0200, Mark Kettenis wrote: Jonathan Gray schreef op 2017-09-28 05:02: > On Wed, Sep 27, 2017 at 10:56:44PM +0200, Patrick Wildt wrote: > > So, first of all copying the dtb entries is not a good idea. The > > reason >

Re: FW: help with setting up dwxe on orange pi one (h3)

2017-09-28 Thread Jonathan Gray
On Thu, Sep 28, 2017 at 09:34:49AM +0200, Mark Kettenis wrote: > Jonathan Gray schreef op 2017-09-28 05:02: > > On Wed, Sep 27, 2017 at 10:56:44PM +0200, Patrick Wildt wrote: > > > So, first of all copying the dtb entries is not a good idea. The > > > reason > > > is that the phandles are gonna be

Re: FW: help with setting up dwxe on orange pi one (h3)

2017-09-28 Thread Mark Kettenis
Patrick Wildt schreef op 2017-09-27 23:11: If you got your device tree correctly set up, maybe try this diff: diff --git a/sys/dev/fdt/if_dwxe.c b/sys/dev/fdt/if_dwxe.c index 85c5098af31..ce6a4e0f338 100644 --- a/sys/dev/fdt/if_dwxe.c +++ b/sys/dev/fdt/if_dwxe.c @@ -236,6 +236,7 @@ struct dwxe_d

Re: FW: help with setting up dwxe on orange pi one (h3)

2017-09-28 Thread Mark Kettenis
Jonathan Gray schreef op 2017-09-28 05:02: On Wed, Sep 27, 2017 at 10:56:44PM +0200, Patrick Wildt wrote: So, first of all copying the dtb entries is not a good idea. The reason is that the phandles are gonna be all wrong and overriden, because those are _generated_ on compile time. As you c

Re: FW: help with setting up dwxe on orange pi one (h3)

2017-09-27 Thread Jonathan Gray
On Wed, Sep 27, 2017 at 10:56:44PM +0200, Patrick Wildt wrote: > So, first of all copying the dtb entries is not a good idea. The reason > is that the phandles are gonna be all wrong and overriden, because those > are _generated_ on compile time. As you can see, the ethernet > controller referenc

Re: FW: help with setting up dwxe on orange pi one (h3)

2017-09-27 Thread Patrick Wildt
If you got your device tree correctly set up, maybe try this diff: diff --git a/sys/dev/fdt/if_dwxe.c b/sys/dev/fdt/if_dwxe.c index 85c5098af31..ce6a4e0f338 100644 --- a/sys/dev/fdt/if_dwxe.c +++ b/sys/dev/fdt/if_dwxe.c @@ -236,6 +236,7 @@ struct dwxe_desc { #define SYSCON_H3_EPHY_LED_POL

Re: FW: help with setting up dwxe on orange pi one (h3)

2017-09-27 Thread Patrick Wildt
So, first of all copying the dtb entries is not a good idea. The reason is that the phandles are gonna be all wrong and overriden, because those are _generated_ on compile time. As you can see, the ethernet controller references phy handle 0x7, but the phy has a phandle of 0x47. Something is wron