All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/9] MIPS: xilfpga: Intc and various peripherals
@ 2016-08-15 13:55 ` Zubair Lutfullah Kakakhel
  0 siblings, 0 replies; 28+ messages in thread
From: Zubair Lutfullah Kakakhel @ 2016-08-15 13:55 UTC (permalink / raw)
  To: monstr, ralf, tglx
  Cc: jason, marc.zyngier, Zubair.Kakakhel, linux-mips, linux-kernel, netdev

Hi,

The MIPS based Xilfpga platform uses the axi interrupt controller
daisy chained to the MIPS microAptiv cpu interrupt controller.

This patch series moves the axi interrupt controller driver out
of arch/microblaze to drivers/irqchip. This makes it usable by
MIPS.

The rest of the series basically enables drivers and adds dt nodes.

Would make sense for this to go via the MIPS tree.
Hence, ACKs from microblaze. irqchip and net welcome.

Regards,
ZubairLK

Note: Compile tested on microblaze only!

Based on v4.8-rc2

Zubair Lutfullah Kakakhel (9):
  microblaze: irqchip: Move intc driver to irqchip
  irqchip: xilinx: Add support for parent intc
  MIPS: xilfpga: Use irqchip_init instead of the legacy way
  MIPS: xilfpga: Use Xilinx AXI Interrupt Controller
  MIPS: xilfpga: Update DT node and specify uart irq
  MIPS: Xilfpga: Add DT node for AXI I2C
  net: ethernet: xilinx: Enable emaclite for MIPS
  MIPS: xilfpga: Add DT node for AXI emaclite
  MIPS: xilfpga: Update defconfig

 arch/microblaze/Kconfig                            |  1 +
 arch/microblaze/kernel/Makefile                    |  2 +-
 arch/mips/Kconfig                                  |  1 +
 arch/mips/boot/dts/xilfpga/nexys4ddr.dts           | 64 ++++++++++++++++++++++
 arch/mips/configs/xilfpga_defconfig                | 37 ++++++++++++-
 arch/mips/xilfpga/intc.c                           |  7 +--
 drivers/irqchip/Kconfig                            |  4 ++
 drivers/irqchip/Makefile                           |  1 +
 .../kernel/intc.c => drivers/irqchip/irq-xilinx.c  | 28 +++++++++-
 drivers/net/ethernet/xilinx/Kconfig                |  4 +-
 10 files changed, 139 insertions(+), 10 deletions(-)
 rename arch/microblaze/kernel/intc.c => drivers/irqchip/irq-xilinx.c (90%)

-- 
1.9.1

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

* [PATCH 0/9] MIPS: xilfpga: Intc and various peripherals
@ 2016-08-15 13:55 ` Zubair Lutfullah Kakakhel
  0 siblings, 0 replies; 28+ messages in thread
From: Zubair Lutfullah Kakakhel @ 2016-08-15 13:55 UTC (permalink / raw)
  To: monstr, ralf, tglx
  Cc: jason, marc.zyngier, Zubair.Kakakhel, linux-mips, linux-kernel, netdev

Hi,

The MIPS based Xilfpga platform uses the axi interrupt controller
daisy chained to the MIPS microAptiv cpu interrupt controller.

This patch series moves the axi interrupt controller driver out
of arch/microblaze to drivers/irqchip. This makes it usable by
MIPS.

The rest of the series basically enables drivers and adds dt nodes.

Would make sense for this to go via the MIPS tree.
Hence, ACKs from microblaze. irqchip and net welcome.

Regards,
ZubairLK

Note: Compile tested on microblaze only!

Based on v4.8-rc2

Zubair Lutfullah Kakakhel (9):
  microblaze: irqchip: Move intc driver to irqchip
  irqchip: xilinx: Add support for parent intc
  MIPS: xilfpga: Use irqchip_init instead of the legacy way
  MIPS: xilfpga: Use Xilinx AXI Interrupt Controller
  MIPS: xilfpga: Update DT node and specify uart irq
  MIPS: Xilfpga: Add DT node for AXI I2C
  net: ethernet: xilinx: Enable emaclite for MIPS
  MIPS: xilfpga: Add DT node for AXI emaclite
  MIPS: xilfpga: Update defconfig

 arch/microblaze/Kconfig                            |  1 +
 arch/microblaze/kernel/Makefile                    |  2 +-
 arch/mips/Kconfig                                  |  1 +
 arch/mips/boot/dts/xilfpga/nexys4ddr.dts           | 64 ++++++++++++++++++++++
 arch/mips/configs/xilfpga_defconfig                | 37 ++++++++++++-
 arch/mips/xilfpga/intc.c                           |  7 +--
 drivers/irqchip/Kconfig                            |  4 ++
 drivers/irqchip/Makefile                           |  1 +
 .../kernel/intc.c => drivers/irqchip/irq-xilinx.c  | 28 +++++++++-
 drivers/net/ethernet/xilinx/Kconfig                |  4 +-
 10 files changed, 139 insertions(+), 10 deletions(-)
 rename arch/microblaze/kernel/intc.c => drivers/irqchip/irq-xilinx.c (90%)

-- 
1.9.1

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

* [PATCH 1/9] microblaze: irqchip: Move intc driver to irqchip
@ 2016-08-15 13:55   ` Zubair Lutfullah Kakakhel
  0 siblings, 0 replies; 28+ messages in thread
From: Zubair Lutfullah Kakakhel @ 2016-08-15 13:55 UTC (permalink / raw)
  To: monstr, ralf, tglx
  Cc: jason, marc.zyngier, Zubair.Kakakhel, linux-mips, linux-kernel, netdev

The Xilinx AXI Interrupt Controller IP block is used by the MIPS
based xilfpga platform.

Move the interrupt controller code out of arch/microblaze so that
it can be used by everyone

Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
---
 arch/microblaze/Kconfig                                       | 1 +
 arch/microblaze/kernel/Makefile                               | 2 +-
 drivers/irqchip/Kconfig                                       | 4 ++++
 drivers/irqchip/Makefile                                      | 1 +
 arch/microblaze/kernel/intc.c => drivers/irqchip/irq-xilinx.c | 0
 5 files changed, 7 insertions(+), 1 deletion(-)
 rename arch/microblaze/kernel/intc.c => drivers/irqchip/irq-xilinx.c (100%)

diff --git a/arch/microblaze/Kconfig b/arch/microblaze/Kconfig
index 86f6572..198e921 100644
--- a/arch/microblaze/Kconfig
+++ b/arch/microblaze/Kconfig
@@ -27,6 +27,7 @@ config MICROBLAZE
 	select HAVE_MEMBLOCK_NODE_MAP
 	select HAVE_OPROFILE
 	select IRQ_DOMAIN
+	select XILINX_IRQ
 	select MODULES_USE_ELF_RELA
 	select OF
 	select OF_EARLY_FLATTREE
diff --git a/arch/microblaze/kernel/Makefile b/arch/microblaze/kernel/Makefile
index f08baca..e098381 100644
--- a/arch/microblaze/kernel/Makefile
+++ b/arch/microblaze/kernel/Makefile
@@ -15,7 +15,7 @@ endif
 extra-y := head.o vmlinux.lds
 
 obj-y += dma.o exceptions.o \
-	hw_exception_handler.o intc.o irq.o \
+	hw_exception_handler.o irq.o \
 	platform.o process.o prom.o ptrace.o \
 	reset.o setup.o signal.o sys_microblaze.o timer.o traps.o unwind.o
 
diff --git a/drivers/irqchip/Kconfig b/drivers/irqchip/Kconfig
index 7f87289..b5e40ee 100644
--- a/drivers/irqchip/Kconfig
+++ b/drivers/irqchip/Kconfig
@@ -203,6 +203,10 @@ config XTENSA_MX
 	bool
 	select IRQ_DOMAIN
 
+config XILINX_IRQ
+	bool
+	select IRQ_DOMAIN
+
 config IRQ_CROSSBAR
 	bool
 	help
diff --git a/drivers/irqchip/Makefile b/drivers/irqchip/Makefile
index 4c203b6..2bd833d 100644
--- a/drivers/irqchip/Makefile
+++ b/drivers/irqchip/Makefile
@@ -51,6 +51,7 @@ obj-$(CONFIG_TB10X_IRQC)		+= irq-tb10x.o
 obj-$(CONFIG_TS4800_IRQ)		+= irq-ts4800.o
 obj-$(CONFIG_XTENSA)			+= irq-xtensa-pic.o
 obj-$(CONFIG_XTENSA_MX)			+= irq-xtensa-mx.o
+obj-$(CONFIG_XILINX_IRQ)		+= irq-xilinx.o
 obj-$(CONFIG_IRQ_CROSSBAR)		+= irq-crossbar.o
 obj-$(CONFIG_SOC_VF610)			+= irq-vf610-mscm-ir.o
 obj-$(CONFIG_BCM6345_L1_IRQ)		+= irq-bcm6345-l1.o
diff --git a/arch/microblaze/kernel/intc.c b/drivers/irqchip/irq-xilinx.c
similarity index 100%
rename from arch/microblaze/kernel/intc.c
rename to drivers/irqchip/irq-xilinx.c
-- 
1.9.1

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

* [PATCH 1/9] microblaze: irqchip: Move intc driver to irqchip
@ 2016-08-15 13:55   ` Zubair Lutfullah Kakakhel
  0 siblings, 0 replies; 28+ messages in thread
From: Zubair Lutfullah Kakakhel @ 2016-08-15 13:55 UTC (permalink / raw)
  To: monstr, ralf, tglx
  Cc: jason, marc.zyngier, Zubair.Kakakhel, linux-mips, linux-kernel, netdev

The Xilinx AXI Interrupt Controller IP block is used by the MIPS
based xilfpga platform.

Move the interrupt controller code out of arch/microblaze so that
it can be used by everyone

Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
---
 arch/microblaze/Kconfig                                       | 1 +
 arch/microblaze/kernel/Makefile                               | 2 +-
 drivers/irqchip/Kconfig                                       | 4 ++++
 drivers/irqchip/Makefile                                      | 1 +
 arch/microblaze/kernel/intc.c => drivers/irqchip/irq-xilinx.c | 0
 5 files changed, 7 insertions(+), 1 deletion(-)
 rename arch/microblaze/kernel/intc.c => drivers/irqchip/irq-xilinx.c (100%)

diff --git a/arch/microblaze/Kconfig b/arch/microblaze/Kconfig
index 86f6572..198e921 100644
--- a/arch/microblaze/Kconfig
+++ b/arch/microblaze/Kconfig
@@ -27,6 +27,7 @@ config MICROBLAZE
 	select HAVE_MEMBLOCK_NODE_MAP
 	select HAVE_OPROFILE
 	select IRQ_DOMAIN
+	select XILINX_IRQ
 	select MODULES_USE_ELF_RELA
 	select OF
 	select OF_EARLY_FLATTREE
diff --git a/arch/microblaze/kernel/Makefile b/arch/microblaze/kernel/Makefile
index f08baca..e098381 100644
--- a/arch/microblaze/kernel/Makefile
+++ b/arch/microblaze/kernel/Makefile
@@ -15,7 +15,7 @@ endif
 extra-y := head.o vmlinux.lds
 
 obj-y += dma.o exceptions.o \
-	hw_exception_handler.o intc.o irq.o \
+	hw_exception_handler.o irq.o \
 	platform.o process.o prom.o ptrace.o \
 	reset.o setup.o signal.o sys_microblaze.o timer.o traps.o unwind.o
 
diff --git a/drivers/irqchip/Kconfig b/drivers/irqchip/Kconfig
index 7f87289..b5e40ee 100644
--- a/drivers/irqchip/Kconfig
+++ b/drivers/irqchip/Kconfig
@@ -203,6 +203,10 @@ config XTENSA_MX
 	bool
 	select IRQ_DOMAIN
 
+config XILINX_IRQ
+	bool
+	select IRQ_DOMAIN
+
 config IRQ_CROSSBAR
 	bool
 	help
diff --git a/drivers/irqchip/Makefile b/drivers/irqchip/Makefile
index 4c203b6..2bd833d 100644
--- a/drivers/irqchip/Makefile
+++ b/drivers/irqchip/Makefile
@@ -51,6 +51,7 @@ obj-$(CONFIG_TB10X_IRQC)		+= irq-tb10x.o
 obj-$(CONFIG_TS4800_IRQ)		+= irq-ts4800.o
 obj-$(CONFIG_XTENSA)			+= irq-xtensa-pic.o
 obj-$(CONFIG_XTENSA_MX)			+= irq-xtensa-mx.o
+obj-$(CONFIG_XILINX_IRQ)		+= irq-xilinx.o
 obj-$(CONFIG_IRQ_CROSSBAR)		+= irq-crossbar.o
 obj-$(CONFIG_SOC_VF610)			+= irq-vf610-mscm-ir.o
 obj-$(CONFIG_BCM6345_L1_IRQ)		+= irq-bcm6345-l1.o
diff --git a/arch/microblaze/kernel/intc.c b/drivers/irqchip/irq-xilinx.c
similarity index 100%
rename from arch/microblaze/kernel/intc.c
rename to drivers/irqchip/irq-xilinx.c
-- 
1.9.1

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

* [PATCH 2/9] irqchip: xilinx: Add support for parent intc
@ 2016-08-15 13:55   ` Zubair Lutfullah Kakakhel
  0 siblings, 0 replies; 28+ messages in thread
From: Zubair Lutfullah Kakakhel @ 2016-08-15 13:55 UTC (permalink / raw)
  To: monstr, ralf, tglx
  Cc: jason, marc.zyngier, Zubair.Kakakhel, linux-mips, linux-kernel, netdev

The MIPS based xilfpga platform has the following IRQ structure

Peripherals --> xilinx_intcontroller -> mips_cpu_int controller

Add support for the driver to chain the irq handler

Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
---
 drivers/irqchip/irq-xilinx.c | 28 +++++++++++++++++++++++++++-
 1 file changed, 27 insertions(+), 1 deletion(-)

diff --git a/drivers/irqchip/irq-xilinx.c b/drivers/irqchip/irq-xilinx.c
index 90bec7d..a0be6fa 100644
--- a/drivers/irqchip/irq-xilinx.c
+++ b/drivers/irqchip/irq-xilinx.c
@@ -15,6 +15,7 @@
 #include <linux/of_address.h>
 #include <linux/io.h>
 #include <linux/bug.h>
+#include <linux/of_irq.h>
 
 static void __iomem *intc_baseaddr;
 
@@ -135,11 +136,26 @@ static const struct irq_domain_ops xintc_irq_domain_ops = {
 	.map = xintc_map,
 };
 
+static void xil_intc_irq_handler(struct irq_desc *desc)
+{
+	u32 pending = get_irq();
+
+	if (pending != -1U) {
+		while (true) {
+			pending = get_irq();
+			generic_handle_irq(pending);
+			if (pending == -1U)
+				break;
+		}
+	}
+}
+
 static int __init xilinx_intc_of_init(struct device_node *intc,
 					     struct device_node *parent)
 {
 	u32 nr_irq, intr_mask;
-	int ret;
+	int ret, irq;
+	struct device_node *parent_node;
 
 	intc_baseaddr = of_iomap(intc, 0);
 	BUG_ON(!intc_baseaddr);
@@ -188,6 +204,16 @@ static int __init xilinx_intc_of_init(struct device_node *intc,
 	root_domain = irq_domain_add_linear(intc, nr_irq, &xintc_irq_domain_ops,
 							(void *)intr_mask);
 
+	parent_node = of_irq_find_parent(intc);
+	if (parent_node) {
+		irq = irq_of_parse_and_map(intc, 0);
+		if (irq)
+			irq_set_chained_handler_and_data(irq,
+							 xil_intc_irq_handler,
+							 root_domain);
+
+	}
+
 	irq_set_default_host(root_domain);
 
 	return 0;
-- 
1.9.1

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

* [PATCH 2/9] irqchip: xilinx: Add support for parent intc
@ 2016-08-15 13:55   ` Zubair Lutfullah Kakakhel
  0 siblings, 0 replies; 28+ messages in thread
From: Zubair Lutfullah Kakakhel @ 2016-08-15 13:55 UTC (permalink / raw)
  To: monstr, ralf, tglx
  Cc: jason, marc.zyngier, Zubair.Kakakhel, linux-mips, linux-kernel, netdev

The MIPS based xilfpga platform has the following IRQ structure

Peripherals --> xilinx_intcontroller -> mips_cpu_int controller

Add support for the driver to chain the irq handler

Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
---
 drivers/irqchip/irq-xilinx.c | 28 +++++++++++++++++++++++++++-
 1 file changed, 27 insertions(+), 1 deletion(-)

diff --git a/drivers/irqchip/irq-xilinx.c b/drivers/irqchip/irq-xilinx.c
index 90bec7d..a0be6fa 100644
--- a/drivers/irqchip/irq-xilinx.c
+++ b/drivers/irqchip/irq-xilinx.c
@@ -15,6 +15,7 @@
 #include <linux/of_address.h>
 #include <linux/io.h>
 #include <linux/bug.h>
+#include <linux/of_irq.h>
 
 static void __iomem *intc_baseaddr;
 
@@ -135,11 +136,26 @@ static const struct irq_domain_ops xintc_irq_domain_ops = {
 	.map = xintc_map,
 };
 
+static void xil_intc_irq_handler(struct irq_desc *desc)
+{
+	u32 pending = get_irq();
+
+	if (pending != -1U) {
+		while (true) {
+			pending = get_irq();
+			generic_handle_irq(pending);
+			if (pending == -1U)
+				break;
+		}
+	}
+}
+
 static int __init xilinx_intc_of_init(struct device_node *intc,
 					     struct device_node *parent)
 {
 	u32 nr_irq, intr_mask;
-	int ret;
+	int ret, irq;
+	struct device_node *parent_node;
 
 	intc_baseaddr = of_iomap(intc, 0);
 	BUG_ON(!intc_baseaddr);
@@ -188,6 +204,16 @@ static int __init xilinx_intc_of_init(struct device_node *intc,
 	root_domain = irq_domain_add_linear(intc, nr_irq, &xintc_irq_domain_ops,
 							(void *)intr_mask);
 
+	parent_node = of_irq_find_parent(intc);
+	if (parent_node) {
+		irq = irq_of_parse_and_map(intc, 0);
+		if (irq)
+			irq_set_chained_handler_and_data(irq,
+							 xil_intc_irq_handler,
+							 root_domain);
+
+	}
+
 	irq_set_default_host(root_domain);
 
 	return 0;
-- 
1.9.1

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

* [PATCH 3/9] MIPS: xilfpga: Use irqchip_init instead of the legacy way
@ 2016-08-15 13:55   ` Zubair Lutfullah Kakakhel
  0 siblings, 0 replies; 28+ messages in thread
From: Zubair Lutfullah Kakakhel @ 2016-08-15 13:55 UTC (permalink / raw)
  To: monstr, ralf, tglx
  Cc: jason, marc.zyngier, Zubair.Kakakhel, linux-mips, linux-kernel, netdev

This prepares the code use the Xilinx AXI Interrupt Controller
driver now available in drivers/irqchip/irq-xilinx.c

Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
---
 arch/mips/xilfpga/intc.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/arch/mips/xilfpga/intc.c b/arch/mips/xilfpga/intc.c
index c4d1a71..a127cca 100644
--- a/arch/mips/xilfpga/intc.c
+++ b/arch/mips/xilfpga/intc.c
@@ -11,15 +11,12 @@
 
 #include <linux/of.h>
 #include <linux/of_irq.h>
+#include <linux/irqchip.h>
 
 #include <asm/irq_cpu.h>
 
-static struct of_device_id of_irq_ids[] __initdata = {
-	{ .compatible = "mti,cpu-interrupt-controller", .data = mips_cpu_irq_of_init },
-	{},
-};
 
 void __init arch_init_irq(void)
 {
-	of_irq_init(of_irq_ids);
+	irqchip_init();
 }
-- 
1.9.1

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

* [PATCH 3/9] MIPS: xilfpga: Use irqchip_init instead of the legacy way
@ 2016-08-15 13:55   ` Zubair Lutfullah Kakakhel
  0 siblings, 0 replies; 28+ messages in thread
From: Zubair Lutfullah Kakakhel @ 2016-08-15 13:55 UTC (permalink / raw)
  To: monstr, ralf, tglx
  Cc: jason, marc.zyngier, Zubair.Kakakhel, linux-mips, linux-kernel, netdev

This prepares the code use the Xilinx AXI Interrupt Controller
driver now available in drivers/irqchip/irq-xilinx.c

Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
---
 arch/mips/xilfpga/intc.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/arch/mips/xilfpga/intc.c b/arch/mips/xilfpga/intc.c
index c4d1a71..a127cca 100644
--- a/arch/mips/xilfpga/intc.c
+++ b/arch/mips/xilfpga/intc.c
@@ -11,15 +11,12 @@
 
 #include <linux/of.h>
 #include <linux/of_irq.h>
+#include <linux/irqchip.h>
 
 #include <asm/irq_cpu.h>
 
-static struct of_device_id of_irq_ids[] __initdata = {
-	{ .compatible = "mti,cpu-interrupt-controller", .data = mips_cpu_irq_of_init },
-	{},
-};
 
 void __init arch_init_irq(void)
 {
-	of_irq_init(of_irq_ids);
+	irqchip_init();
 }
-- 
1.9.1

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

* [PATCH 4/9] MIPS: xilfpga: Use Xilinx AXI Interrupt Controller
@ 2016-08-15 13:55   ` Zubair Lutfullah Kakakhel
  0 siblings, 0 replies; 28+ messages in thread
From: Zubair Lutfullah Kakakhel @ 2016-08-15 13:55 UTC (permalink / raw)
  To: monstr, ralf, tglx
  Cc: jason, marc.zyngier, Zubair.Kakakhel, linux-mips, linux-kernel, netdev

IRQs from peripherals such as i2c/uart/ethernet come via
the AXI Interrupt controller.

Select it in Kconfig for xilfpga and add the DT node

Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
---
 arch/mips/Kconfig                        |  1 +
 arch/mips/boot/dts/xilfpga/nexys4ddr.dts | 12 ++++++++++++
 2 files changed, 13 insertions(+)

diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index 2638856..42ecf40 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -426,6 +426,7 @@ config MACH_XILFPGA
 	select SYS_SUPPORTS_ZBOOT_UART16550
 	select USE_OF
 	select USE_GENERIC_EARLY_PRINTK_8250
+	select XILINX_IRQ
 	help
 	  This enables support for the IMG University Program MIPSfpga platform.
 
diff --git a/arch/mips/boot/dts/xilfpga/nexys4ddr.dts b/arch/mips/boot/dts/xilfpga/nexys4ddr.dts
index 48d2112..8db660b 100644
--- a/arch/mips/boot/dts/xilfpga/nexys4ddr.dts
+++ b/arch/mips/boot/dts/xilfpga/nexys4ddr.dts
@@ -17,6 +17,18 @@
 		compatible = "mti,cpu-interrupt-controller";
 	};
 
+	axi_intc: interrupt-controller@10200000 {
+		#interrupt-cells = <1>;
+		compatible = "xlnx,xps-intc-1.00.a";
+		interrupt-controller;
+		reg = <0x10200000 0x10000>;
+		xlnx,kind-of-intr = <0x0>;
+		xlnx,num-intr-inputs = <0x6>;
+
+		interrupt-parent = <&cpuintc>;
+		interrupts = <6>;
+	};
+
 	axi_gpio: gpio@10600000 {
 		#gpio-cells = <1>;
 		compatible = "xlnx,xps-gpio-1.00.a";
-- 
1.9.1

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

* [PATCH 4/9] MIPS: xilfpga: Use Xilinx AXI Interrupt Controller
@ 2016-08-15 13:55   ` Zubair Lutfullah Kakakhel
  0 siblings, 0 replies; 28+ messages in thread
From: Zubair Lutfullah Kakakhel @ 2016-08-15 13:55 UTC (permalink / raw)
  To: monstr, ralf, tglx
  Cc: jason, marc.zyngier, Zubair.Kakakhel, linux-mips, linux-kernel, netdev

IRQs from peripherals such as i2c/uart/ethernet come via
the AXI Interrupt controller.

Select it in Kconfig for xilfpga and add the DT node

Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
---
 arch/mips/Kconfig                        |  1 +
 arch/mips/boot/dts/xilfpga/nexys4ddr.dts | 12 ++++++++++++
 2 files changed, 13 insertions(+)

diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index 2638856..42ecf40 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -426,6 +426,7 @@ config MACH_XILFPGA
 	select SYS_SUPPORTS_ZBOOT_UART16550
 	select USE_OF
 	select USE_GENERIC_EARLY_PRINTK_8250
+	select XILINX_IRQ
 	help
 	  This enables support for the IMG University Program MIPSfpga platform.
 
diff --git a/arch/mips/boot/dts/xilfpga/nexys4ddr.dts b/arch/mips/boot/dts/xilfpga/nexys4ddr.dts
index 48d2112..8db660b 100644
--- a/arch/mips/boot/dts/xilfpga/nexys4ddr.dts
+++ b/arch/mips/boot/dts/xilfpga/nexys4ddr.dts
@@ -17,6 +17,18 @@
 		compatible = "mti,cpu-interrupt-controller";
 	};
 
+	axi_intc: interrupt-controller@10200000 {
+		#interrupt-cells = <1>;
+		compatible = "xlnx,xps-intc-1.00.a";
+		interrupt-controller;
+		reg = <0x10200000 0x10000>;
+		xlnx,kind-of-intr = <0x0>;
+		xlnx,num-intr-inputs = <0x6>;
+
+		interrupt-parent = <&cpuintc>;
+		interrupts = <6>;
+	};
+
 	axi_gpio: gpio@10600000 {
 		#gpio-cells = <1>;
 		compatible = "xlnx,xps-gpio-1.00.a";
-- 
1.9.1

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

* [PATCH 5/9] MIPS: xilfpga: Update DT node and specify uart irq
@ 2016-08-15 13:55   ` Zubair Lutfullah Kakakhel
  0 siblings, 0 replies; 28+ messages in thread
From: Zubair Lutfullah Kakakhel @ 2016-08-15 13:55 UTC (permalink / raw)
  To: monstr, ralf, tglx
  Cc: jason, marc.zyngier, Zubair.Kakakhel, linux-mips, linux-kernel, netdev

Update the DT node with the UART irq

Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
---
 arch/mips/boot/dts/xilfpga/nexys4ddr.dts | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/mips/boot/dts/xilfpga/nexys4ddr.dts b/arch/mips/boot/dts/xilfpga/nexys4ddr.dts
index 8db660b..d285c8d 100644
--- a/arch/mips/boot/dts/xilfpga/nexys4ddr.dts
+++ b/arch/mips/boot/dts/xilfpga/nexys4ddr.dts
@@ -50,6 +50,9 @@
 		reg-offset = <0x1000>;
 
 		clocks	= <&ext>;
+
+		interrupt-parent = <&axi_intc>;
+		interrupts = <0>;
 	};
 };
 
-- 
1.9.1

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

* [PATCH 5/9] MIPS: xilfpga: Update DT node and specify uart irq
@ 2016-08-15 13:55   ` Zubair Lutfullah Kakakhel
  0 siblings, 0 replies; 28+ messages in thread
From: Zubair Lutfullah Kakakhel @ 2016-08-15 13:55 UTC (permalink / raw)
  To: monstr, ralf, tglx
  Cc: jason, marc.zyngier, Zubair.Kakakhel, linux-mips, linux-kernel, netdev

Update the DT node with the UART irq

Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
---
 arch/mips/boot/dts/xilfpga/nexys4ddr.dts | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/mips/boot/dts/xilfpga/nexys4ddr.dts b/arch/mips/boot/dts/xilfpga/nexys4ddr.dts
index 8db660b..d285c8d 100644
--- a/arch/mips/boot/dts/xilfpga/nexys4ddr.dts
+++ b/arch/mips/boot/dts/xilfpga/nexys4ddr.dts
@@ -50,6 +50,9 @@
 		reg-offset = <0x1000>;
 
 		clocks	= <&ext>;
+
+		interrupt-parent = <&axi_intc>;
+		interrupts = <0>;
 	};
 };
 
-- 
1.9.1

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

* [PATCH 6/9] MIPS: Xilfpga: Add DT node for AXI I2C
@ 2016-08-15 13:55   ` Zubair Lutfullah Kakakhel
  0 siblings, 0 replies; 28+ messages in thread
From: Zubair Lutfullah Kakakhel @ 2016-08-15 13:55 UTC (permalink / raw)
  To: monstr, ralf, tglx
  Cc: jason, marc.zyngier, Zubair.Kakakhel, linux-mips, linux-kernel, netdev

The xilfpga platform has an AXI I2C Bus master with a temperature
sensor connected to it.

Add the device tree node to use them.

Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
---
 arch/mips/boot/dts/xilfpga/nexys4ddr.dts | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/arch/mips/boot/dts/xilfpga/nexys4ddr.dts b/arch/mips/boot/dts/xilfpga/nexys4ddr.dts
index d285c8d..3658e21 100644
--- a/arch/mips/boot/dts/xilfpga/nexys4ddr.dts
+++ b/arch/mips/boot/dts/xilfpga/nexys4ddr.dts
@@ -54,6 +54,28 @@
 		interrupt-parent = <&axi_intc>;
 		interrupts = <0>;
 	};
+
+	axi_i2c: i2c@10A00000 {
+	    compatible = "xlnx,xps-iic-2.00.a";
+	    interrupt-parent = <&axi_intc>;
+	    interrupts = <4>;
+	    reg = < 0x10A00000 0x10000 >;
+	    clocks = <&ext>;
+	    xlnx,clk-freq = <0x5f5e100>;
+	    xlnx,family = "Artix7";
+	    xlnx,gpo-width = <0x1>;
+	    xlnx,iic-freq = <0x186a0>;
+	    xlnx,scl-inertial-delay = <0x0>;
+	    xlnx,sda-inertial-delay = <0x0>;
+	    xlnx,ten-bit-adr = <0x0>;
+	    #address-cells = <1>;
+	    #size-cells = <0>;
+
+	    ad7420@4B {
+		compatible = "adt7420";
+		reg = <0x4B>;
+	    };
+	} ;
 };
 
 &ext {
-- 
1.9.1

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

* [PATCH 6/9] MIPS: Xilfpga: Add DT node for AXI I2C
@ 2016-08-15 13:55   ` Zubair Lutfullah Kakakhel
  0 siblings, 0 replies; 28+ messages in thread
From: Zubair Lutfullah Kakakhel @ 2016-08-15 13:55 UTC (permalink / raw)
  To: monstr, ralf, tglx
  Cc: jason, marc.zyngier, Zubair.Kakakhel, linux-mips, linux-kernel, netdev

The xilfpga platform has an AXI I2C Bus master with a temperature
sensor connected to it.

Add the device tree node to use them.

Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
---
 arch/mips/boot/dts/xilfpga/nexys4ddr.dts | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/arch/mips/boot/dts/xilfpga/nexys4ddr.dts b/arch/mips/boot/dts/xilfpga/nexys4ddr.dts
index d285c8d..3658e21 100644
--- a/arch/mips/boot/dts/xilfpga/nexys4ddr.dts
+++ b/arch/mips/boot/dts/xilfpga/nexys4ddr.dts
@@ -54,6 +54,28 @@
 		interrupt-parent = <&axi_intc>;
 		interrupts = <0>;
 	};
+
+	axi_i2c: i2c@10A00000 {
+	    compatible = "xlnx,xps-iic-2.00.a";
+	    interrupt-parent = <&axi_intc>;
+	    interrupts = <4>;
+	    reg = < 0x10A00000 0x10000 >;
+	    clocks = <&ext>;
+	    xlnx,clk-freq = <0x5f5e100>;
+	    xlnx,family = "Artix7";
+	    xlnx,gpo-width = <0x1>;
+	    xlnx,iic-freq = <0x186a0>;
+	    xlnx,scl-inertial-delay = <0x0>;
+	    xlnx,sda-inertial-delay = <0x0>;
+	    xlnx,ten-bit-adr = <0x0>;
+	    #address-cells = <1>;
+	    #size-cells = <0>;
+
+	    ad7420@4B {
+		compatible = "adt7420";
+		reg = <0x4B>;
+	    };
+	} ;
 };
 
 &ext {
-- 
1.9.1

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

* [PATCH 7/9] net: ethernet: xilinx: Enable emaclite for MIPS
@ 2016-08-15 13:55   ` Zubair Lutfullah Kakakhel
  0 siblings, 0 replies; 28+ messages in thread
From: Zubair Lutfullah Kakakhel @ 2016-08-15 13:55 UTC (permalink / raw)
  To: monstr, ralf, tglx
  Cc: jason, marc.zyngier, Zubair.Kakakhel, linux-mips, linux-kernel, netdev

The MIPS based xilfpga platform uses this driver.
Enable it for MIPS

Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
---
 drivers/net/ethernet/xilinx/Kconfig | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/xilinx/Kconfig b/drivers/net/ethernet/xilinx/Kconfig
index 4f5c024..ae5c404 100644
--- a/drivers/net/ethernet/xilinx/Kconfig
+++ b/drivers/net/ethernet/xilinx/Kconfig
@@ -5,7 +5,7 @@
 config NET_VENDOR_XILINX
 	bool "Xilinx devices"
 	default y
-	depends on PPC || PPC32 || MICROBLAZE || ARCH_ZYNQ
+	depends on PPC || PPC32 || MICROBLAZE || ARCH_ZYNQ || MIPS
 	---help---
 	  If you have a network (Ethernet) card belonging to this class, say Y.
 
@@ -18,7 +18,7 @@ if NET_VENDOR_XILINX
 
 config XILINX_EMACLITE
 	tristate "Xilinx 10/100 Ethernet Lite support"
-	depends on (PPC32 || MICROBLAZE || ARCH_ZYNQ)
+	depends on (PPC32 || MICROBLAZE || ARCH_ZYNQ || MIPS)
 	select PHYLIB
 	---help---
 	  This driver supports the 10/100 Ethernet Lite from Xilinx.
-- 
1.9.1

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

* [PATCH 7/9] net: ethernet: xilinx: Enable emaclite for MIPS
@ 2016-08-15 13:55   ` Zubair Lutfullah Kakakhel
  0 siblings, 0 replies; 28+ messages in thread
From: Zubair Lutfullah Kakakhel @ 2016-08-15 13:55 UTC (permalink / raw)
  To: monstr, ralf, tglx
  Cc: jason, marc.zyngier, Zubair.Kakakhel, linux-mips, linux-kernel, netdev

The MIPS based xilfpga platform uses this driver.
Enable it for MIPS

Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
---
 drivers/net/ethernet/xilinx/Kconfig | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/xilinx/Kconfig b/drivers/net/ethernet/xilinx/Kconfig
index 4f5c024..ae5c404 100644
--- a/drivers/net/ethernet/xilinx/Kconfig
+++ b/drivers/net/ethernet/xilinx/Kconfig
@@ -5,7 +5,7 @@
 config NET_VENDOR_XILINX
 	bool "Xilinx devices"
 	default y
-	depends on PPC || PPC32 || MICROBLAZE || ARCH_ZYNQ
+	depends on PPC || PPC32 || MICROBLAZE || ARCH_ZYNQ || MIPS
 	---help---
 	  If you have a network (Ethernet) card belonging to this class, say Y.
 
@@ -18,7 +18,7 @@ if NET_VENDOR_XILINX
 
 config XILINX_EMACLITE
 	tristate "Xilinx 10/100 Ethernet Lite support"
-	depends on (PPC32 || MICROBLAZE || ARCH_ZYNQ)
+	depends on (PPC32 || MICROBLAZE || ARCH_ZYNQ || MIPS)
 	select PHYLIB
 	---help---
 	  This driver supports the 10/100 Ethernet Lite from Xilinx.
-- 
1.9.1

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

* [PATCH 8/9] MIPS: xilfpga: Add DT node for AXI emaclite
@ 2016-08-15 13:55   ` Zubair Lutfullah Kakakhel
  0 siblings, 0 replies; 28+ messages in thread
From: Zubair Lutfullah Kakakhel @ 2016-08-15 13:55 UTC (permalink / raw)
  To: monstr, ralf, tglx
  Cc: jason, marc.zyngier, Zubair.Kakakhel, linux-mips, linux-kernel, netdev

The xilfpga platform has a Xilinx AXI emaclite block.

Add the DT node to use it.

Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
---
 arch/mips/boot/dts/xilfpga/nexys4ddr.dts | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/arch/mips/boot/dts/xilfpga/nexys4ddr.dts b/arch/mips/boot/dts/xilfpga/nexys4ddr.dts
index 3658e21..58bc62f 100644
--- a/arch/mips/boot/dts/xilfpga/nexys4ddr.dts
+++ b/arch/mips/boot/dts/xilfpga/nexys4ddr.dts
@@ -42,6 +42,33 @@
 		xlnx,tri-default = <0xffffffff>;
 	} ;
 
+	axi_ethernetlite: ethernet@10e00000 {
+		compatible = "xlnx,xps-ethernetlite-3.00.a";
+		device_type = "network";
+		interrupt-parent = <&axi_intc>;
+		interrupts = <1>;
+		local-mac-address = [08 86 4C 0D F7 09];
+		phy-handle = <&phy0>;
+		reg = <0x10e00000 0x10000>;
+		xlnx,duplex = <0x1>;
+		xlnx,include-global-buffers = <0x1>;
+		xlnx,include-internal-loopback = <0x0>;
+		xlnx,include-mdio = <0x1>;
+		xlnx,instance = "axi_ethernetlite_inst";
+		xlnx,rx-ping-pong = <0x1>;
+		xlnx,s-axi-id-width = <0x1>;
+		xlnx,tx-ping-pong = <0x1>;
+		xlnx,use-internal = <0x0>;
+		mdio {
+			#address-cells = <1>;
+			#size-cells = <0>;
+			phy0: phy@1 {
+				device_type = "ethernet-phy";
+				reg = <1>;
+			};
+		};
+	};
+
 	axi_uart16550: serial@10400000 {
 		compatible = "ns16550a";
 		reg = <0x10400000 0x10000>;
-- 
1.9.1

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

* [PATCH 8/9] MIPS: xilfpga: Add DT node for AXI emaclite
@ 2016-08-15 13:55   ` Zubair Lutfullah Kakakhel
  0 siblings, 0 replies; 28+ messages in thread
From: Zubair Lutfullah Kakakhel @ 2016-08-15 13:55 UTC (permalink / raw)
  To: monstr, ralf, tglx
  Cc: jason, marc.zyngier, Zubair.Kakakhel, linux-mips, linux-kernel, netdev

The xilfpga platform has a Xilinx AXI emaclite block.

Add the DT node to use it.

Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
---
 arch/mips/boot/dts/xilfpga/nexys4ddr.dts | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/arch/mips/boot/dts/xilfpga/nexys4ddr.dts b/arch/mips/boot/dts/xilfpga/nexys4ddr.dts
index 3658e21..58bc62f 100644
--- a/arch/mips/boot/dts/xilfpga/nexys4ddr.dts
+++ b/arch/mips/boot/dts/xilfpga/nexys4ddr.dts
@@ -42,6 +42,33 @@
 		xlnx,tri-default = <0xffffffff>;
 	} ;
 
+	axi_ethernetlite: ethernet@10e00000 {
+		compatible = "xlnx,xps-ethernetlite-3.00.a";
+		device_type = "network";
+		interrupt-parent = <&axi_intc>;
+		interrupts = <1>;
+		local-mac-address = [08 86 4C 0D F7 09];
+		phy-handle = <&phy0>;
+		reg = <0x10e00000 0x10000>;
+		xlnx,duplex = <0x1>;
+		xlnx,include-global-buffers = <0x1>;
+		xlnx,include-internal-loopback = <0x0>;
+		xlnx,include-mdio = <0x1>;
+		xlnx,instance = "axi_ethernetlite_inst";
+		xlnx,rx-ping-pong = <0x1>;
+		xlnx,s-axi-id-width = <0x1>;
+		xlnx,tx-ping-pong = <0x1>;
+		xlnx,use-internal = <0x0>;
+		mdio {
+			#address-cells = <1>;
+			#size-cells = <0>;
+			phy0: phy@1 {
+				device_type = "ethernet-phy";
+				reg = <1>;
+			};
+		};
+	};
+
 	axi_uart16550: serial@10400000 {
 		compatible = "ns16550a";
 		reg = <0x10400000 0x10000>;
-- 
1.9.1

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

* [PATCH 9/9] MIPS: xilfpga: Update defconfig
@ 2016-08-15 13:55   ` Zubair Lutfullah Kakakhel
  0 siblings, 0 replies; 28+ messages in thread
From: Zubair Lutfullah Kakakhel @ 2016-08-15 13:55 UTC (permalink / raw)
  To: monstr, ralf, tglx
  Cc: jason, marc.zyngier, Zubair.Kakakhel, linux-mips, linux-kernel, netdev

Update defconfig to enable emaclite, i2c, temp sensor found on the
xilfpga platform

Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
---
 arch/mips/configs/xilfpga_defconfig | 37 ++++++++++++++++++++++++++++++++++++-
 1 file changed, 36 insertions(+), 1 deletion(-)

diff --git a/arch/mips/configs/xilfpga_defconfig b/arch/mips/configs/xilfpga_defconfig
index ed1dce3..829c637 100644
--- a/arch/mips/configs/xilfpga_defconfig
+++ b/arch/mips/configs/xilfpga_defconfig
@@ -7,6 +7,12 @@ CONFIG_EMBEDDED=y
 CONFIG_SLAB=y
 # CONFIG_BLOCK is not set
 # CONFIG_SUSPEND is not set
+CONFIG_NET=y
+CONFIG_PACKET=y
+CONFIG_UNIX=y
+CONFIG_INET=y
+# CONFIG_IPV6 is not set
+# CONFIG_WIRELESS is not set
 # CONFIG_UEVENT_HELPER is not set
 CONFIG_DEVTMPFS=y
 CONFIG_DEVTMPFS_MOUNT=y
@@ -14,6 +20,30 @@ CONFIG_DEVTMPFS_MOUNT=y
 # CONFIG_PREVENT_FIRMWARE_BUILD is not set
 # CONFIG_FW_LOADER is not set
 # CONFIG_ALLOW_DEV_COREDUMP is not set
+CONFIG_NETDEVICES=y
+# CONFIG_NET_CORE is not set
+# CONFIG_NET_VENDOR_ARC is not set
+# CONFIG_NET_CADENCE is not set
+# CONFIG_NET_VENDOR_BROADCOM is not set
+# CONFIG_NET_VENDOR_EZCHIP is not set
+# CONFIG_NET_VENDOR_INTEL is not set
+# CONFIG_NET_VENDOR_MARVELL is not set
+# CONFIG_NET_VENDOR_MICREL is not set
+# CONFIG_NET_VENDOR_NATSEMI is not set
+# CONFIG_NET_VENDOR_NETRONOME is not set
+# CONFIG_NET_VENDOR_QUALCOMM is not set
+# CONFIG_NET_VENDOR_RENESAS is not set
+# CONFIG_NET_VENDOR_ROCKER is not set
+# CONFIG_NET_VENDOR_SAMSUNG is not set
+# CONFIG_NET_VENDOR_SEEQ is not set
+# CONFIG_NET_VENDOR_SMSC is not set
+# CONFIG_NET_VENDOR_STMICRO is not set
+# CONFIG_NET_VENDOR_SYNOPSYS is not set
+# CONFIG_NET_VENDOR_VIA is not set
+# CONFIG_NET_VENDOR_WIZNET is not set
+CONFIG_XILINX_EMACLITE=y
+CONFIG_SMSC_PHY=y
+# CONFIG_WLAN is not set
 # CONFIG_INPUT_MOUSEDEV is not set
 # CONFIG_INPUT_KEYBOARD is not set
 # CONFIG_INPUT_MOUSE is not set
@@ -25,13 +55,18 @@ CONFIG_SERIAL_8250=y
 CONFIG_SERIAL_8250_CONSOLE=y
 CONFIG_SERIAL_OF_PLATFORM=y
 # CONFIG_HW_RANDOM is not set
+CONFIG_I2C=y
+CONFIG_I2C_CHARDEV=y
+# CONFIG_I2C_HELPER_AUTO is not set
+CONFIG_I2C_XILINX=y
 CONFIG_GPIO_SYSFS=y
 CONFIG_GPIO_XILINX=y
-# CONFIG_HWMON is not set
+CONFIG_SENSORS_ADT7410=y
 # CONFIG_USB_SUPPORT is not set
 # CONFIG_MIPS_PLATFORM_DEVICES is not set
 # CONFIG_IOMMU_SUPPORT is not set
 # CONFIG_PROC_PAGE_MONITOR is not set
+CONFIG_TMPFS=y
 # CONFIG_MISC_FILESYSTEMS is not set
 CONFIG_PANIC_ON_OOPS=y
 # CONFIG_SCHED_DEBUG is not set
-- 
1.9.1

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

* [PATCH 9/9] MIPS: xilfpga: Update defconfig
@ 2016-08-15 13:55   ` Zubair Lutfullah Kakakhel
  0 siblings, 0 replies; 28+ messages in thread
From: Zubair Lutfullah Kakakhel @ 2016-08-15 13:55 UTC (permalink / raw)
  To: monstr, ralf, tglx
  Cc: jason, marc.zyngier, Zubair.Kakakhel, linux-mips, linux-kernel, netdev

Update defconfig to enable emaclite, i2c, temp sensor found on the
xilfpga platform

Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
---
 arch/mips/configs/xilfpga_defconfig | 37 ++++++++++++++++++++++++++++++++++++-
 1 file changed, 36 insertions(+), 1 deletion(-)

diff --git a/arch/mips/configs/xilfpga_defconfig b/arch/mips/configs/xilfpga_defconfig
index ed1dce3..829c637 100644
--- a/arch/mips/configs/xilfpga_defconfig
+++ b/arch/mips/configs/xilfpga_defconfig
@@ -7,6 +7,12 @@ CONFIG_EMBEDDED=y
 CONFIG_SLAB=y
 # CONFIG_BLOCK is not set
 # CONFIG_SUSPEND is not set
+CONFIG_NET=y
+CONFIG_PACKET=y
+CONFIG_UNIX=y
+CONFIG_INET=y
+# CONFIG_IPV6 is not set
+# CONFIG_WIRELESS is not set
 # CONFIG_UEVENT_HELPER is not set
 CONFIG_DEVTMPFS=y
 CONFIG_DEVTMPFS_MOUNT=y
@@ -14,6 +20,30 @@ CONFIG_DEVTMPFS_MOUNT=y
 # CONFIG_PREVENT_FIRMWARE_BUILD is not set
 # CONFIG_FW_LOADER is not set
 # CONFIG_ALLOW_DEV_COREDUMP is not set
+CONFIG_NETDEVICES=y
+# CONFIG_NET_CORE is not set
+# CONFIG_NET_VENDOR_ARC is not set
+# CONFIG_NET_CADENCE is not set
+# CONFIG_NET_VENDOR_BROADCOM is not set
+# CONFIG_NET_VENDOR_EZCHIP is not set
+# CONFIG_NET_VENDOR_INTEL is not set
+# CONFIG_NET_VENDOR_MARVELL is not set
+# CONFIG_NET_VENDOR_MICREL is not set
+# CONFIG_NET_VENDOR_NATSEMI is not set
+# CONFIG_NET_VENDOR_NETRONOME is not set
+# CONFIG_NET_VENDOR_QUALCOMM is not set
+# CONFIG_NET_VENDOR_RENESAS is not set
+# CONFIG_NET_VENDOR_ROCKER is not set
+# CONFIG_NET_VENDOR_SAMSUNG is not set
+# CONFIG_NET_VENDOR_SEEQ is not set
+# CONFIG_NET_VENDOR_SMSC is not set
+# CONFIG_NET_VENDOR_STMICRO is not set
+# CONFIG_NET_VENDOR_SYNOPSYS is not set
+# CONFIG_NET_VENDOR_VIA is not set
+# CONFIG_NET_VENDOR_WIZNET is not set
+CONFIG_XILINX_EMACLITE=y
+CONFIG_SMSC_PHY=y
+# CONFIG_WLAN is not set
 # CONFIG_INPUT_MOUSEDEV is not set
 # CONFIG_INPUT_KEYBOARD is not set
 # CONFIG_INPUT_MOUSE is not set
@@ -25,13 +55,18 @@ CONFIG_SERIAL_8250=y
 CONFIG_SERIAL_8250_CONSOLE=y
 CONFIG_SERIAL_OF_PLATFORM=y
 # CONFIG_HW_RANDOM is not set
+CONFIG_I2C=y
+CONFIG_I2C_CHARDEV=y
+# CONFIG_I2C_HELPER_AUTO is not set
+CONFIG_I2C_XILINX=y
 CONFIG_GPIO_SYSFS=y
 CONFIG_GPIO_XILINX=y
-# CONFIG_HWMON is not set
+CONFIG_SENSORS_ADT7410=y
 # CONFIG_USB_SUPPORT is not set
 # CONFIG_MIPS_PLATFORM_DEVICES is not set
 # CONFIG_IOMMU_SUPPORT is not set
 # CONFIG_PROC_PAGE_MONITOR is not set
+CONFIG_TMPFS=y
 # CONFIG_MISC_FILESYSTEMS is not set
 CONFIG_PANIC_ON_OOPS=y
 # CONFIG_SCHED_DEBUG is not set
-- 
1.9.1

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

* Re: [PATCH 1/9] microblaze: irqchip: Move intc driver to irqchip
  2016-08-15 13:55   ` Zubair Lutfullah Kakakhel
  (?)
@ 2016-08-15 15:06   ` Jason Cooper
  -1 siblings, 0 replies; 28+ messages in thread
From: Jason Cooper @ 2016-08-15 15:06 UTC (permalink / raw)
  To: Zubair Lutfullah Kakakhel
  Cc: monstr, ralf, tglx, marc.zyngier, linux-mips, linux-kernel, netdev

Hi Zubair,

On Mon, Aug 15, 2016 at 02:55:27PM +0100, Zubair Lutfullah Kakakhel wrote:
> The Xilinx AXI Interrupt Controller IP block is used by the MIPS
> based xilfpga platform.
> 
> Move the interrupt controller code out of arch/microblaze so that
> it can be used by everyone
> 
> Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
> ---
>  arch/microblaze/Kconfig                                       | 1 +
>  arch/microblaze/kernel/Makefile                               | 2 +-
>  drivers/irqchip/Kconfig                                       | 4 ++++
>  drivers/irqchip/Makefile                                      | 1 +
>  arch/microblaze/kernel/intc.c => drivers/irqchip/irq-xilinx.c | 0
>  5 files changed, 7 insertions(+), 1 deletion(-)
>  rename arch/microblaze/kernel/intc.c => drivers/irqchip/irq-xilinx.c (100%)

How about irq-axi-intc.c?

> diff --git a/arch/microblaze/Kconfig b/arch/microblaze/Kconfig
> index 86f6572..198e921 100644
> --- a/arch/microblaze/Kconfig
> +++ b/arch/microblaze/Kconfig
> @@ -27,6 +27,7 @@ config MICROBLAZE
>  	select HAVE_MEMBLOCK_NODE_MAP
>  	select HAVE_OPROFILE
>  	select IRQ_DOMAIN
> +	select XILINX_IRQ
>  	select MODULES_USE_ELF_RELA
>  	select OF
>  	select OF_EARLY_FLATTREE
> diff --git a/arch/microblaze/kernel/Makefile b/arch/microblaze/kernel/Makefile
> index f08baca..e098381 100644
> --- a/arch/microblaze/kernel/Makefile
> +++ b/arch/microblaze/kernel/Makefile
> @@ -15,7 +15,7 @@ endif
>  extra-y := head.o vmlinux.lds
>  
>  obj-y += dma.o exceptions.o \
> -	hw_exception_handler.o intc.o irq.o \
> +	hw_exception_handler.o irq.o \
>  	platform.o process.o prom.o ptrace.o \
>  	reset.o setup.o signal.o sys_microblaze.o timer.o traps.o unwind.o
>  
> diff --git a/drivers/irqchip/Kconfig b/drivers/irqchip/Kconfig
> index 7f87289..b5e40ee 100644
> --- a/drivers/irqchip/Kconfig
> +++ b/drivers/irqchip/Kconfig
> @@ -203,6 +203,10 @@ config XTENSA_MX
>  	bool
>  	select IRQ_DOMAIN
>  
> +config XILINX_IRQ

XILINX_AXI_INTC ?

thx,

Jason.

> +	bool
> +	select IRQ_DOMAIN
> +
>  config IRQ_CROSSBAR
>  	bool
>  	help
> diff --git a/drivers/irqchip/Makefile b/drivers/irqchip/Makefile
> index 4c203b6..2bd833d 100644
> --- a/drivers/irqchip/Makefile
> +++ b/drivers/irqchip/Makefile
> @@ -51,6 +51,7 @@ obj-$(CONFIG_TB10X_IRQC)		+= irq-tb10x.o
>  obj-$(CONFIG_TS4800_IRQ)		+= irq-ts4800.o
>  obj-$(CONFIG_XTENSA)			+= irq-xtensa-pic.o
>  obj-$(CONFIG_XTENSA_MX)			+= irq-xtensa-mx.o
> +obj-$(CONFIG_XILINX_IRQ)		+= irq-xilinx.o
>  obj-$(CONFIG_IRQ_CROSSBAR)		+= irq-crossbar.o
>  obj-$(CONFIG_SOC_VF610)			+= irq-vf610-mscm-ir.o
>  obj-$(CONFIG_BCM6345_L1_IRQ)		+= irq-bcm6345-l1.o
> diff --git a/arch/microblaze/kernel/intc.c b/drivers/irqchip/irq-xilinx.c
> similarity index 100%
> rename from arch/microblaze/kernel/intc.c
> rename to drivers/irqchip/irq-xilinx.c
> -- 
> 1.9.1
> 

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

* Re: [PATCH 4/9] MIPS: xilfpga: Use Xilinx AXI Interrupt Controller
  2016-08-15 13:55   ` Zubair Lutfullah Kakakhel
  (?)
@ 2016-08-15 15:12   ` Jason Cooper
  -1 siblings, 0 replies; 28+ messages in thread
From: Jason Cooper @ 2016-08-15 15:12 UTC (permalink / raw)
  To: Zubair Lutfullah Kakakhel
  Cc: monstr, ralf, tglx, marc.zyngier, linux-mips, linux-kernel, netdev

Hi Zubair,

On Mon, Aug 15, 2016 at 02:55:30PM +0100, Zubair Lutfullah Kakakhel wrote:
> IRQs from peripherals such as i2c/uart/ethernet come via
> the AXI Interrupt controller.
> 
> Select it in Kconfig for xilfpga and add the DT node
> 
> Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
> ---
>  arch/mips/Kconfig                        |  1 +
>  arch/mips/boot/dts/xilfpga/nexys4ddr.dts | 12 ++++++++++++
>  2 files changed, 13 insertions(+)
> 
> diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
> index 2638856..42ecf40 100644
> --- a/arch/mips/Kconfig
> +++ b/arch/mips/Kconfig
> @@ -426,6 +426,7 @@ config MACH_XILFPGA
>  	select SYS_SUPPORTS_ZBOOT_UART16550
>  	select USE_OF
>  	select USE_GENERIC_EARLY_PRINTK_8250
> +	select XILINX_IRQ
>  	help
>  	  This enables support for the IMG University Program MIPSfpga platform.

Please split dt changes from code changes.

> diff --git a/arch/mips/boot/dts/xilfpga/nexys4ddr.dts b/arch/mips/boot/dts/xilfpga/nexys4ddr.dts
> index 48d2112..8db660b 100644
> --- a/arch/mips/boot/dts/xilfpga/nexys4ddr.dts
> +++ b/arch/mips/boot/dts/xilfpga/nexys4ddr.dts
> @@ -17,6 +17,18 @@
>  		compatible = "mti,cpu-interrupt-controller";
>  	};
>  
> +	axi_intc: interrupt-controller@10200000 {
> +		#interrupt-cells = <1>;
> +		compatible = "xlnx,xps-intc-1.00.a";

This compatible string isn't documented, mind adding it?  Please make
sure to Cc the devicetree maintainers on it.

thx,

Jason.

> +		interrupt-controller;
> +		reg = <0x10200000 0x10000>;
> +		xlnx,kind-of-intr = <0x0>;
> +		xlnx,num-intr-inputs = <0x6>;
> +
> +		interrupt-parent = <&cpuintc>;
> +		interrupts = <6>;
> +	};
> +
>  	axi_gpio: gpio@10600000 {
>  		#gpio-cells = <1>;
>  		compatible = "xlnx,xps-gpio-1.00.a";
> -- 
> 1.9.1
> 

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

* Re: [PATCH 8/9] MIPS: xilfpga: Add DT node for AXI emaclite
  2016-08-15 13:55   ` Zubair Lutfullah Kakakhel
  (?)
@ 2016-08-15 15:17   ` Jason Cooper
  2016-08-18 10:01       ` Zubair Lutfullah Kakakhel
  -1 siblings, 1 reply; 28+ messages in thread
From: Jason Cooper @ 2016-08-15 15:17 UTC (permalink / raw)
  To: Zubair Lutfullah Kakakhel
  Cc: monstr, ralf, tglx, marc.zyngier, linux-mips, linux-kernel, netdev

Hi Zubair,

On Mon, Aug 15, 2016 at 02:55:34PM +0100, Zubair Lutfullah Kakakhel wrote:
> The xilfpga platform has a Xilinx AXI emaclite block.
> 
> Add the DT node to use it.
> 
> Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
> ---
>  arch/mips/boot/dts/xilfpga/nexys4ddr.dts | 27 +++++++++++++++++++++++++++
>  1 file changed, 27 insertions(+)
> 
> diff --git a/arch/mips/boot/dts/xilfpga/nexys4ddr.dts b/arch/mips/boot/dts/xilfpga/nexys4ddr.dts
> index 3658e21..58bc62f 100644
> --- a/arch/mips/boot/dts/xilfpga/nexys4ddr.dts
> +++ b/arch/mips/boot/dts/xilfpga/nexys4ddr.dts
> @@ -42,6 +42,33 @@
>  		xlnx,tri-default = <0xffffffff>;
>  	} ;
>  
> +	axi_ethernetlite: ethernet@10e00000 {
> +		compatible = "xlnx,xps-ethernetlite-3.00.a";

This one also isn't documented.

> +		device_type = "network";
> +		interrupt-parent = <&axi_intc>;
> +		interrupts = <1>;
> +		local-mac-address = [08 86 4C 0D F7 09];

I'm pretty sure you don't want this in the mainline dts file.

thx,

Jason.

> +		phy-handle = <&phy0>;
> +		reg = <0x10e00000 0x10000>;
> +		xlnx,duplex = <0x1>;
> +		xlnx,include-global-buffers = <0x1>;
> +		xlnx,include-internal-loopback = <0x0>;
> +		xlnx,include-mdio = <0x1>;
> +		xlnx,instance = "axi_ethernetlite_inst";
> +		xlnx,rx-ping-pong = <0x1>;
> +		xlnx,s-axi-id-width = <0x1>;
> +		xlnx,tx-ping-pong = <0x1>;
> +		xlnx,use-internal = <0x0>;
> +		mdio {
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +			phy0: phy@1 {
> +				device_type = "ethernet-phy";
> +				reg = <1>;
> +			};
> +		};
> +	};
> +
>  	axi_uart16550: serial@10400000 {
>  		compatible = "ns16550a";
>  		reg = <0x10400000 0x10000>;
> -- 
> 1.9.1
> 

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

* Re: [PATCH 1/9] microblaze: irqchip: Move intc driver to irqchip
  2016-08-15 13:55   ` Zubair Lutfullah Kakakhel
  (?)
  (?)
@ 2016-08-15 15:22   ` Jason Cooper
  2016-08-18  9:59       ` Zubair Lutfullah Kakakhel
  -1 siblings, 1 reply; 28+ messages in thread
From: Jason Cooper @ 2016-08-15 15:22 UTC (permalink / raw)
  To: Zubair Lutfullah Kakakhel
  Cc: monstr, ralf, tglx, marc.zyngier, linux-mips, linux-kernel, netdev

Hi Zubair,

On Mon, Aug 15, 2016 at 02:55:27PM +0100, Zubair Lutfullah Kakakhel wrote:
> The Xilinx AXI Interrupt Controller IP block is used by the MIPS
> based xilfpga platform.
> 
> Move the interrupt controller code out of arch/microblaze so that
> it can be used by everyone
> 
> Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
> ---
>  arch/microblaze/Kconfig                                       | 1 +
>  arch/microblaze/kernel/Makefile                               | 2 +-
>  drivers/irqchip/Kconfig                                       | 4 ++++
>  drivers/irqchip/Makefile                                      | 1 +
>  arch/microblaze/kernel/intc.c => drivers/irqchip/irq-xilinx.c | 0
>  5 files changed, 7 insertions(+), 1 deletion(-)
>  rename arch/microblaze/kernel/intc.c => drivers/irqchip/irq-xilinx.c (100%)

When you send the next version, please disable rename detection.  The
driver looks pretty straight forward, but I'd like to take the
opportunity to clean up the abstraction around read and write.  As well
as making it easier for everyone to review on-list.

thx,

Jason.

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

* Re: [PATCH 1/9] microblaze: irqchip: Move intc driver to irqchip
@ 2016-08-18  9:59       ` Zubair Lutfullah Kakakhel
  0 siblings, 0 replies; 28+ messages in thread
From: Zubair Lutfullah Kakakhel @ 2016-08-18  9:59 UTC (permalink / raw)
  To: Jason Cooper
  Cc: monstr, ralf, tglx, marc.zyngier, linux-mips, linux-kernel, netdev

Hi,

On 08/15/2016 04:22 PM, Jason Cooper wrote:
> Hi Zubair,
>
> On Mon, Aug 15, 2016 at 02:55:27PM +0100, Zubair Lutfullah Kakakhel wrote:
>> The Xilinx AXI Interrupt Controller IP block is used by the MIPS
>> based xilfpga platform.
>>
>> Move the interrupt controller code out of arch/microblaze so that
>> it can be used by everyone
>>
>> Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
>> ---
>>  arch/microblaze/Kconfig                                       | 1 +
>>  arch/microblaze/kernel/Makefile                               | 2 +-
>>  drivers/irqchip/Kconfig                                       | 4 ++++
>>  drivers/irqchip/Makefile                                      | 1 +
>>  arch/microblaze/kernel/intc.c => drivers/irqchip/irq-xilinx.c | 0
>>  5 files changed, 7 insertions(+), 1 deletion(-)
>>  rename arch/microblaze/kernel/intc.c => drivers/irqchip/irq-xilinx.c (100%)
>
> When you send the next version, please disable rename detection.  The
> driver looks pretty straight forward, but I'd like to take the
> opportunity to clean up the abstraction around read and write.  As well
> as making it easier for everyone to review on-list.

Thanks for the review.

I'll send the v2 in a while.

Regards,
ZubairLK

>
> thx,
>
> Jason.
>

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

* Re: [PATCH 1/9] microblaze: irqchip: Move intc driver to irqchip
@ 2016-08-18  9:59       ` Zubair Lutfullah Kakakhel
  0 siblings, 0 replies; 28+ messages in thread
From: Zubair Lutfullah Kakakhel @ 2016-08-18  9:59 UTC (permalink / raw)
  To: Jason Cooper
  Cc: monstr, ralf, tglx, marc.zyngier, linux-mips, linux-kernel, netdev

Hi,

On 08/15/2016 04:22 PM, Jason Cooper wrote:
> Hi Zubair,
>
> On Mon, Aug 15, 2016 at 02:55:27PM +0100, Zubair Lutfullah Kakakhel wrote:
>> The Xilinx AXI Interrupt Controller IP block is used by the MIPS
>> based xilfpga platform.
>>
>> Move the interrupt controller code out of arch/microblaze so that
>> it can be used by everyone
>>
>> Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
>> ---
>>  arch/microblaze/Kconfig                                       | 1 +
>>  arch/microblaze/kernel/Makefile                               | 2 +-
>>  drivers/irqchip/Kconfig                                       | 4 ++++
>>  drivers/irqchip/Makefile                                      | 1 +
>>  arch/microblaze/kernel/intc.c => drivers/irqchip/irq-xilinx.c | 0
>>  5 files changed, 7 insertions(+), 1 deletion(-)
>>  rename arch/microblaze/kernel/intc.c => drivers/irqchip/irq-xilinx.c (100%)
>
> When you send the next version, please disable rename detection.  The
> driver looks pretty straight forward, but I'd like to take the
> opportunity to clean up the abstraction around read and write.  As well
> as making it easier for everyone to review on-list.

Thanks for the review.

I'll send the v2 in a while.

Regards,
ZubairLK

>
> thx,
>
> Jason.
>

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

* Re: [PATCH 8/9] MIPS: xilfpga: Add DT node for AXI emaclite
@ 2016-08-18 10:01       ` Zubair Lutfullah Kakakhel
  0 siblings, 0 replies; 28+ messages in thread
From: Zubair Lutfullah Kakakhel @ 2016-08-18 10:01 UTC (permalink / raw)
  To: Jason Cooper
  Cc: monstr, ralf, tglx, marc.zyngier, linux-mips, linux-kernel, netdev

Hi,

On 08/15/2016 04:17 PM, Jason Cooper wrote:
> Hi Zubair,
>
> On Mon, Aug 15, 2016 at 02:55:34PM +0100, Zubair Lutfullah Kakakhel wrote:
>> The xilfpga platform has a Xilinx AXI emaclite block.
>>
>> Add the DT node to use it.
>>
>> Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
>> ---
>>  arch/mips/boot/dts/xilfpga/nexys4ddr.dts | 27 +++++++++++++++++++++++++++
>>  1 file changed, 27 insertions(+)
>>
>> diff --git a/arch/mips/boot/dts/xilfpga/nexys4ddr.dts b/arch/mips/boot/dts/xilfpga/nexys4ddr.dts
>> index 3658e21..58bc62f 100644
>> --- a/arch/mips/boot/dts/xilfpga/nexys4ddr.dts
>> +++ b/arch/mips/boot/dts/xilfpga/nexys4ddr.dts
>> @@ -42,6 +42,33 @@
>>  		xlnx,tri-default = <0xffffffff>;
>>  	} ;
>>
>> +	axi_ethernetlite: ethernet@10e00000 {
>> +		compatible = "xlnx,xps-ethernetlite-3.00.a";
>
> This one also isn't documented.

These are sort of documented. Although checkpatch probably won't find them.

Xilinx IP blocks follow a generic DT style as documented here.

http://lxr.free-electrons.com/source/Documentation/devicetree/bindings/xilinx.txt

>
>> +		device_type = "network";
>> +		interrupt-parent = <&axi_intc>;
>> +		interrupts = <1>;
>> +		local-mac-address = [08 86 4C 0D F7 09];
>
> I'm pretty sure you don't want this in the mainline dts file.

Oops. Sorry. I'll remove it.

Thanks
ZubairLK

>
> thx,
>
> Jason.
>
>> +		phy-handle = <&phy0>;
>> +		reg = <0x10e00000 0x10000>;
>> +		xlnx,duplex = <0x1>;
>> +		xlnx,include-global-buffers = <0x1>;
>> +		xlnx,include-internal-loopback = <0x0>;
>> +		xlnx,include-mdio = <0x1>;
>> +		xlnx,instance = "axi_ethernetlite_inst";
>> +		xlnx,rx-ping-pong = <0x1>;
>> +		xlnx,s-axi-id-width = <0x1>;
>> +		xlnx,tx-ping-pong = <0x1>;
>> +		xlnx,use-internal = <0x0>;
>> +		mdio {
>> +			#address-cells = <1>;
>> +			#size-cells = <0>;
>> +			phy0: phy@1 {
>> +				device_type = "ethernet-phy";
>> +				reg = <1>;
>> +			};
>> +		};
>> +	};
>> +
>>  	axi_uart16550: serial@10400000 {
>>  		compatible = "ns16550a";
>>  		reg = <0x10400000 0x10000>;
>> --
>> 1.9.1
>>

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

* Re: [PATCH 8/9] MIPS: xilfpga: Add DT node for AXI emaclite
@ 2016-08-18 10:01       ` Zubair Lutfullah Kakakhel
  0 siblings, 0 replies; 28+ messages in thread
From: Zubair Lutfullah Kakakhel @ 2016-08-18 10:01 UTC (permalink / raw)
  To: Jason Cooper
  Cc: monstr, ralf, tglx, marc.zyngier, linux-mips, linux-kernel, netdev

Hi,

On 08/15/2016 04:17 PM, Jason Cooper wrote:
> Hi Zubair,
>
> On Mon, Aug 15, 2016 at 02:55:34PM +0100, Zubair Lutfullah Kakakhel wrote:
>> The xilfpga platform has a Xilinx AXI emaclite block.
>>
>> Add the DT node to use it.
>>
>> Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
>> ---
>>  arch/mips/boot/dts/xilfpga/nexys4ddr.dts | 27 +++++++++++++++++++++++++++
>>  1 file changed, 27 insertions(+)
>>
>> diff --git a/arch/mips/boot/dts/xilfpga/nexys4ddr.dts b/arch/mips/boot/dts/xilfpga/nexys4ddr.dts
>> index 3658e21..58bc62f 100644
>> --- a/arch/mips/boot/dts/xilfpga/nexys4ddr.dts
>> +++ b/arch/mips/boot/dts/xilfpga/nexys4ddr.dts
>> @@ -42,6 +42,33 @@
>>  		xlnx,tri-default = <0xffffffff>;
>>  	} ;
>>
>> +	axi_ethernetlite: ethernet@10e00000 {
>> +		compatible = "xlnx,xps-ethernetlite-3.00.a";
>
> This one also isn't documented.

These are sort of documented. Although checkpatch probably won't find them.

Xilinx IP blocks follow a generic DT style as documented here.

http://lxr.free-electrons.com/source/Documentation/devicetree/bindings/xilinx.txt

>
>> +		device_type = "network";
>> +		interrupt-parent = <&axi_intc>;
>> +		interrupts = <1>;
>> +		local-mac-address = [08 86 4C 0D F7 09];
>
> I'm pretty sure you don't want this in the mainline dts file.

Oops. Sorry. I'll remove it.

Thanks
ZubairLK

>
> thx,
>
> Jason.
>
>> +		phy-handle = <&phy0>;
>> +		reg = <0x10e00000 0x10000>;
>> +		xlnx,duplex = <0x1>;
>> +		xlnx,include-global-buffers = <0x1>;
>> +		xlnx,include-internal-loopback = <0x0>;
>> +		xlnx,include-mdio = <0x1>;
>> +		xlnx,instance = "axi_ethernetlite_inst";
>> +		xlnx,rx-ping-pong = <0x1>;
>> +		xlnx,s-axi-id-width = <0x1>;
>> +		xlnx,tx-ping-pong = <0x1>;
>> +		xlnx,use-internal = <0x0>;
>> +		mdio {
>> +			#address-cells = <1>;
>> +			#size-cells = <0>;
>> +			phy0: phy@1 {
>> +				device_type = "ethernet-phy";
>> +				reg = <1>;
>> +			};
>> +		};
>> +	};
>> +
>>  	axi_uart16550: serial@10400000 {
>>  		compatible = "ns16550a";
>>  		reg = <0x10400000 0x10000>;
>> --
>> 1.9.1
>>

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

end of thread, other threads:[~2016-08-18 10:17 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-15 13:55 [PATCH 0/9] MIPS: xilfpga: Intc and various peripherals Zubair Lutfullah Kakakhel
2016-08-15 13:55 ` Zubair Lutfullah Kakakhel
2016-08-15 13:55 ` [PATCH 1/9] microblaze: irqchip: Move intc driver to irqchip Zubair Lutfullah Kakakhel
2016-08-15 13:55   ` Zubair Lutfullah Kakakhel
2016-08-15 15:06   ` Jason Cooper
2016-08-15 15:22   ` Jason Cooper
2016-08-18  9:59     ` Zubair Lutfullah Kakakhel
2016-08-18  9:59       ` Zubair Lutfullah Kakakhel
2016-08-15 13:55 ` [PATCH 2/9] irqchip: xilinx: Add support for parent intc Zubair Lutfullah Kakakhel
2016-08-15 13:55   ` Zubair Lutfullah Kakakhel
2016-08-15 13:55 ` [PATCH 3/9] MIPS: xilfpga: Use irqchip_init instead of the legacy way Zubair Lutfullah Kakakhel
2016-08-15 13:55   ` Zubair Lutfullah Kakakhel
2016-08-15 13:55 ` [PATCH 4/9] MIPS: xilfpga: Use Xilinx AXI Interrupt Controller Zubair Lutfullah Kakakhel
2016-08-15 13:55   ` Zubair Lutfullah Kakakhel
2016-08-15 15:12   ` Jason Cooper
2016-08-15 13:55 ` [PATCH 5/9] MIPS: xilfpga: Update DT node and specify uart irq Zubair Lutfullah Kakakhel
2016-08-15 13:55   ` Zubair Lutfullah Kakakhel
2016-08-15 13:55 ` [PATCH 6/9] MIPS: Xilfpga: Add DT node for AXI I2C Zubair Lutfullah Kakakhel
2016-08-15 13:55   ` Zubair Lutfullah Kakakhel
2016-08-15 13:55 ` [PATCH 7/9] net: ethernet: xilinx: Enable emaclite for MIPS Zubair Lutfullah Kakakhel
2016-08-15 13:55   ` Zubair Lutfullah Kakakhel
2016-08-15 13:55 ` [PATCH 8/9] MIPS: xilfpga: Add DT node for AXI emaclite Zubair Lutfullah Kakakhel
2016-08-15 13:55   ` Zubair Lutfullah Kakakhel
2016-08-15 15:17   ` Jason Cooper
2016-08-18 10:01     ` Zubair Lutfullah Kakakhel
2016-08-18 10:01       ` Zubair Lutfullah Kakakhel
2016-08-15 13:55 ` [PATCH 9/9] MIPS: xilfpga: Update defconfig Zubair Lutfullah Kakakhel
2016-08-15 13:55   ` Zubair Lutfullah Kakakhel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.