LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH 0/3] openrisc/litex: Add liteeth support
@ 2021-08-26 13:29 Joel Stanley
  2021-08-26 13:29 ` [PATCH 1/3] openrisc/litex: Update uart address Joel Stanley
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Joel Stanley @ 2021-08-26 13:29 UTC (permalink / raw)
  To: Stafford Horne; +Cc: openrisc, linux-kernel

Hello Stafford,

Here are some changes so that the openrisc kernel can boot with ethernet
support with the in-tree device tree.

I have also updated the address of the serial device to match recent
litex. I realise this may keep changing, but it does make it easier to
test upstream kernels if the basics work.

Joel Stanley (3):
  openrisc/litex: Update uart address
  openrisc/litex: Add ethernet device
  openrisc/litex: Update defconfig

 arch/openrisc/boot/dts/or1klitex.dts      | 13 ++++++++++--
 arch/openrisc/configs/or1klitex_defconfig | 26 ++++++++++++++---------
 2 files changed, 27 insertions(+), 12 deletions(-)

-- 
2.33.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 1/3] openrisc/litex: Update uart address
  2021-08-26 13:29 [PATCH 0/3] openrisc/litex: Add liteeth support Joel Stanley
@ 2021-08-26 13:29 ` Joel Stanley
  2021-08-26 13:29 ` [PATCH 2/3] openrisc/litex: Add ethernet device Joel Stanley
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 7+ messages in thread
From: Joel Stanley @ 2021-08-26 13:29 UTC (permalink / raw)
  To: Stafford Horne; +Cc: openrisc, linux-kernel

Recent litex socs will place the UART at 0xe0006800.

Signed-off-by: Joel Stanley <joel@jms.id.au>
---
 arch/openrisc/boot/dts/or1klitex.dts | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/openrisc/boot/dts/or1klitex.dts b/arch/openrisc/boot/dts/or1klitex.dts
index 3f9867aa3844..baba4f49fa6b 100644
--- a/arch/openrisc/boot/dts/or1klitex.dts
+++ b/arch/openrisc/boot/dts/or1klitex.dts
@@ -41,10 +41,10 @@ pic: pic {
 		interrupt-controller;
 	};
 
-	serial0: serial@e0002000 {
+	serial0: serial@e0006800 {
 		device_type = "serial";
 		compatible = "litex,liteuart";
-		reg = <0xe0002000 0x100>;
+		reg = <0xe0006800 0x100>;
 	};
 
 	soc_ctrl0: soc_controller@e0000000 {
-- 
2.33.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 2/3] openrisc/litex: Add ethernet device
  2021-08-26 13:29 [PATCH 0/3] openrisc/litex: Add liteeth support Joel Stanley
  2021-08-26 13:29 ` [PATCH 1/3] openrisc/litex: Update uart address Joel Stanley
@ 2021-08-26 13:29 ` Joel Stanley
  2021-08-26 13:29 ` [PATCH 3/3] openrisc/litex: Update defconfig Joel Stanley
  2021-08-30  0:17 ` [PATCH 0/3] openrisc/litex: Add liteeth support Stafford Horne
  3 siblings, 0 replies; 7+ messages in thread
From: Joel Stanley @ 2021-08-26 13:29 UTC (permalink / raw)
  To: Stafford Horne; +Cc: openrisc, linux-kernel

Add the liteeth ethernet device.

Signed-off-by: Joel Stanley <joel@jms.id.au>
---
 arch/openrisc/boot/dts/or1klitex.dts | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/arch/openrisc/boot/dts/or1klitex.dts b/arch/openrisc/boot/dts/or1klitex.dts
index baba4f49fa6b..91c7173c50e6 100644
--- a/arch/openrisc/boot/dts/or1klitex.dts
+++ b/arch/openrisc/boot/dts/or1klitex.dts
@@ -52,4 +52,13 @@ soc_ctrl0: soc_controller@e0000000 {
 			reg = <0xe0000000 0xc>;
 			status = "okay";
 	};
+
+	ethernet@e0001000 {
+		compatible = "litex,liteeth";
+		reg = <0xe0001000 0x7c>,
+		      <0xe0001800 0x0a>,
+		      <0x80000000 0x2000>;
+		reg-names = "mac", "mdio", "buffer";
+		interrupts = <2>;
+	};
 };
-- 
2.33.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 3/3] openrisc/litex: Update defconfig
  2021-08-26 13:29 [PATCH 0/3] openrisc/litex: Add liteeth support Joel Stanley
  2021-08-26 13:29 ` [PATCH 1/3] openrisc/litex: Update uart address Joel Stanley
  2021-08-26 13:29 ` [PATCH 2/3] openrisc/litex: Add ethernet device Joel Stanley
@ 2021-08-26 13:29 ` Joel Stanley
  2021-08-30  0:17 ` [PATCH 0/3] openrisc/litex: Add liteeth support Stafford Horne
  3 siblings, 0 replies; 7+ messages in thread
From: Joel Stanley @ 2021-08-26 13:29 UTC (permalink / raw)
  To: Stafford Horne; +Cc: openrisc, linux-kernel

Add the liteeth network device and basic network options, and update the
options by doing a savedefconfig.

Signed-off-by: Joel Stanley <joel@jms.id.au>
---
 arch/openrisc/configs/or1klitex_defconfig | 26 ++++++++++++++---------
 1 file changed, 16 insertions(+), 10 deletions(-)

diff --git a/arch/openrisc/configs/or1klitex_defconfig b/arch/openrisc/configs/or1klitex_defconfig
index 3c2c70d3d740..d695879a4d26 100644
--- a/arch/openrisc/configs/or1klitex_defconfig
+++ b/arch/openrisc/configs/or1klitex_defconfig
@@ -1,18 +1,24 @@
 CONFIG_BLK_DEV_INITRD=y
-CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=y
-CONFIG_BUG_ON_DATA_CORRUPTION=y
 CONFIG_CC_OPTIMIZE_FOR_SIZE=y
-CONFIG_DEVTMPFS=y
-CONFIG_DEVTMPFS_MOUNT=y
 CONFIG_EMBEDDED=y
+CONFIG_OPENRISC_BUILTIN_DTB="or1klitex"
 CONFIG_HZ_100=y
-CONFIG_INITRAMFS_SOURCE="openrisc-rootfs.cpio.gz"
+CONFIG_NET=y
+CONFIG_PACKET=y
+CONFIG_UNIX=y
+CONFIG_INET=y
+CONFIG_DEVTMPFS=y
+CONFIG_DEVTMPFS_MOUNT=y
 CONFIG_OF_OVERLAY=y
-CONFIG_OPENRISC_BUILTIN_DTB="or1klitex"
-CONFIG_PANIC_ON_OOPS=y
-CONFIG_PRINTK_TIME=y
-CONFIG_LITEX_SOC_CONTROLLER=y
+CONFIG_NETDEVICES=y
+CONFIG_LITEX_LITEETH=y
 CONFIG_SERIAL_LITEUART=y
 CONFIG_SERIAL_LITEUART_CONSOLE=y
-CONFIG_SOFTLOCKUP_DETECTOR=y
 CONFIG_TTY_PRINTK=y
+CONFIG_LITEX_SOC_CONTROLLER=y
+CONFIG_TMPFS=y
+CONFIG_PRINTK_TIME=y
+CONFIG_PANIC_ON_OOPS=y
+CONFIG_SOFTLOCKUP_DETECTOR=y
+CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=y
+CONFIG_BUG_ON_DATA_CORRUPTION=y
-- 
2.33.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 0/3] openrisc/litex: Add liteeth support
  2021-08-26 13:29 [PATCH 0/3] openrisc/litex: Add liteeth support Joel Stanley
                   ` (2 preceding siblings ...)
  2021-08-26 13:29 ` [PATCH 3/3] openrisc/litex: Update defconfig Joel Stanley
@ 2021-08-30  0:17 ` Stafford Horne
  2021-08-30  1:41   ` Joel Stanley
  3 siblings, 1 reply; 7+ messages in thread
From: Stafford Horne @ 2021-08-30  0:17 UTC (permalink / raw)
  To: Joel Stanley; +Cc: openrisc, linux-kernel

On Thu, Aug 26, 2021 at 10:59:43PM +0930, Joel Stanley wrote:
> Hello Stafford,
> 
> Here are some changes so that the openrisc kernel can boot with ethernet
> support with the in-tree device tree.
> 
> I have also updated the address of the serial device to match recent
> litex. I realise this may keep changing, but it does make it easier to
> test upstream kernels if the basics work.
> 
> Joel Stanley (3):
>   openrisc/litex: Update uart address
>   openrisc/litex: Add ethernet device
>   openrisc/litex: Update defconfig
> 
>  arch/openrisc/boot/dts/or1klitex.dts      | 13 ++++++++++--
>  arch/openrisc/configs/or1klitex_defconfig | 26 ++++++++++++++---------
>  2 files changed, 27 insertions(+), 12 deletions(-)

Hi,

These all look fine to me.  Note, I have just using the autogenerated .dts file
created by the litex build, so I don't usually use this one other than for some
basic testing.  I know auto generated one has it's quirks but it does work.

It's good to have these here though.

I will queue these after the ehternet driver is queued.  Are you planning me to
queue the ethernet driver?  Or will someone else be taking that in?

-Stafford

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 0/3] openrisc/litex: Add liteeth support
  2021-08-30  0:17 ` [PATCH 0/3] openrisc/litex: Add liteeth support Stafford Horne
@ 2021-08-30  1:41   ` Joel Stanley
  2021-08-31 13:38     ` Stafford Horne
  0 siblings, 1 reply; 7+ messages in thread
From: Joel Stanley @ 2021-08-30  1:41 UTC (permalink / raw)
  To: Stafford Horne; +Cc: openrisc, Linux Kernel Mailing List

On Mon, 30 Aug 2021 at 00:17, Stafford Horne <shorne@gmail.com> wrote:
>
> On Thu, Aug 26, 2021 at 10:59:43PM +0930, Joel Stanley wrote:
> > Hello Stafford,
> >
> > Here are some changes so that the openrisc kernel can boot with ethernet
> > support with the in-tree device tree.
> >
> > I have also updated the address of the serial device to match recent
> > litex. I realise this may keep changing, but it does make it easier to
> > test upstream kernels if the basics work.
> >
> > Joel Stanley (3):
> >   openrisc/litex: Update uart address
> >   openrisc/litex: Add ethernet device
> >   openrisc/litex: Update defconfig
> >
> >  arch/openrisc/boot/dts/or1klitex.dts      | 13 ++++++++++--
> >  arch/openrisc/configs/or1klitex_defconfig | 26 ++++++++++++++---------
> >  2 files changed, 27 insertions(+), 12 deletions(-)
>
> Hi,
>
> These all look fine to me.  Note, I have just using the autogenerated .dts file
> created by the litex build, so I don't usually use this one other than for some
> basic testing.  I know auto generated one has it's quirks but it does work.
>
> It's good to have these here though.

Agreed.

The auto generated ones need a lot of work to be relevant outside of
the vexriscv CPU (I tried to build for rocket, a different riscv, and
the script blew up...).

In the future it would be good to have this one support the drivers
that are merged upstream.

>
> I will queue these after the ehternet driver is queued.  Are you planning me to
> queue the ethernet driver?  Or will someone else be taking that in?

I should have mentioned that the driver and bindings were merged
through the network tree last week. You can see them in Friday's
linux-next.

Cheers,

Joel

---------- Forwarded message ---------
From: <patchwork-bot+netdevbpf@kernel.org>
Date: Thu, 26 Aug 2021 at 11:30
Subject: Re: [PATCH v4 0/2] net: Add LiteETH network driver
To: Joel Stanley <joel@jms.id.au>
Cc: <davem@davemloft.net>, <kuba@kernel.org>, <robh+dt@kernel.org>,
<kgugala@antmicro.com>, <mholenko@antmicro.com>,
<devicetree@vger.kernel.org>, <florent@enjoy-digital.fr>,
<gsomlo@gmail.com>, <netdev@vger.kernel.org>,
<linux-kernel@vger.kernel.org>


Hello:

This series was applied to netdev/net-next.git (refs/heads/master):

On Thu, 26 Aug 2021 07:51:04 +0930 you wrote:
> This adds a driver for the LiteX network device, LiteEth.
>
> v4 Fixes the bindings and adds r-b tags from Gabriel and Rob.
>
> v3 Updates the bindings to describe the slots in a way that makes more
> sense for the hardware, instead of trying to fit some existing
> properties. The driver is updated to use these bindings, and fix some
> issues pointed out by Gabriel.
>
> [...]

Here is the summary with links:
  - [v4,1/2] dt-bindings: net: Add bindings for LiteETH
    https://git.kernel.org/netdev/net-next/c/b0f8d3077f8f
  - [v4,2/2] net: Add driver for LiteX's LiteETH network interface
    https://git.kernel.org/netdev/net-next/c/ee7da21ac4c3

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html





>
> -Stafford

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 0/3] openrisc/litex: Add liteeth support
  2021-08-30  1:41   ` Joel Stanley
@ 2021-08-31 13:38     ` Stafford Horne
  0 siblings, 0 replies; 7+ messages in thread
From: Stafford Horne @ 2021-08-31 13:38 UTC (permalink / raw)
  To: Joel Stanley; +Cc: openrisc, Linux Kernel Mailing List

On Mon, Aug 30, 2021 at 01:41:26AM +0000, Joel Stanley wrote:
> On Mon, 30 Aug 2021 at 00:17, Stafford Horne <shorne@gmail.com> wrote:
> >
> > On Thu, Aug 26, 2021 at 10:59:43PM +0930, Joel Stanley wrote:
> > > Hello Stafford,
> > >
> > > Here are some changes so that the openrisc kernel can boot with ethernet
> > > support with the in-tree device tree.
> > >
> > > I have also updated the address of the serial device to match recent
> > > litex. I realise this may keep changing, but it does make it easier to
> > > test upstream kernels if the basics work.
> > >
> > > Joel Stanley (3):
> > >   openrisc/litex: Update uart address
> > >   openrisc/litex: Add ethernet device
> > >   openrisc/litex: Update defconfig
> > >
> > >  arch/openrisc/boot/dts/or1klitex.dts      | 13 ++++++++++--
> > >  arch/openrisc/configs/or1klitex_defconfig | 26 ++++++++++++++---------
> > >  2 files changed, 27 insertions(+), 12 deletions(-)
> >
> > Hi,
> >
> > These all look fine to me.  Note, I have just using the autogenerated .dts file
> > created by the litex build, so I don't usually use this one other than for some
> > basic testing.  I know auto generated one has it's quirks but it does work.
> >
> > It's good to have these here though.
> 
> Agreed.
> 
> The auto generated ones need a lot of work to be relevant outside of
> the vexriscv CPU (I tried to build for rocket, a different riscv, and
> the script blew up...).
> 
> In the future it would be good to have this one support the drivers
> that are merged upstream.
> 
> >
> > I will queue these after the ehternet driver is queued.  Are you planning me to
> > queue the ethernet driver?  Or will someone else be taking that in?
> 
> I should have mentioned that the driver and bindings were merged
> through the network tree last week. You can see them in Friday's
> linux-next.

Alright, in that case I am adding them now.

-Stafford


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-08-31 13:38 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-26 13:29 [PATCH 0/3] openrisc/litex: Add liteeth support Joel Stanley
2021-08-26 13:29 ` [PATCH 1/3] openrisc/litex: Update uart address Joel Stanley
2021-08-26 13:29 ` [PATCH 2/3] openrisc/litex: Add ethernet device Joel Stanley
2021-08-26 13:29 ` [PATCH 3/3] openrisc/litex: Update defconfig Joel Stanley
2021-08-30  0:17 ` [PATCH 0/3] openrisc/litex: Add liteeth support Stafford Horne
2021-08-30  1:41   ` Joel Stanley
2021-08-31 13:38     ` Stafford Horne

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).