ARM: zynq: add gem support
Subsystems (2)
PATCH 1/1 ARM: zynq: add gem support
The zynq includes a Cadence GEM IP core. This is compatible with the macb driver. Add it to the zynq-7000 DT.
--- arch/arm/boot/dts/zynq-7000.dtsi | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+)
arch/arm/boot/dts/zynq-7000.dtsi +36 -0
@@ -54,6 +54,26 @@ clocks = <&uart_clk 1>; }; + gem0: ethernet at e000b000 { + compatible = "cdns,gem"; + reg = <0xe000b000 0x4000>; + status = "disabled"; + interrupts = <0 22 4>; + clocks = <&gem0_clk 0>, <&gem0_clk 0>; + clock-names = "pclk", "hclk"; + phy-mode = "rgmii"; + }; + + gem1: ethernet at e000c000 { + compatible = "cdns,gem"; + reg = <0xe000c000 0x4000>; + status = "disabled"; + interrupts = <0 45 4>; + clocks = <&gem1_clk 0>, <&gem1_clk 0>; + clock-names = "pclk", "hclk"; + phy-mode = "rgmii"; + }; + slcr: slcr at f8000000 { compatible = "xlnx,zynq-slcr"; reg = <0xF8000000 0x1000>;
@@ -89,6 +109,22 @@ reg = <0x108 0x118>; clock-output-names = "iopll"; }; + gem0_clk: gem0_clk { + #clock-cells = <1>; + compatible = "xlnx,zynq-periph-clock"; + clocks = <&iopll &armpll &ddrpll>; + reg = <0x140>; + clock-output-names = "gem0_ref_clk1", + "gem0_ref_clk2"; + }; + gem1_clk: gem1_clk { + #clock-cells = <1>; + compatible = "xlnx,zynq-periph-clock"; + clocks = <&iopll &armpll &ddrpll>; + reg = <0x144>; + clock-output-names = "gem1_ref_clk1", + "gem1_ref_clk2"; + }; uart_clk: uart_clk { #clock-cells = <1>; compatible = "xlnx,zynq-periph-clock";
Signature · 1 line
1.8.2.rc2
PATCH 1/1 ARM: zynq: add gem support
2013/3/23 Steffen Trumtrar <[email protected]>:
Quoted 51 lines
The zynq includes a Cadence GEM IP core. This is compatible with the macb driver. Add it to the zynq-7000 DT.
Signed-off-by Steffen Trumtrar <[email protected]>Cc Michal Simek <[email protected]>Cc Josh Cartwright <[email protected]>--- arch/arm/boot/dts/zynq-7000.dtsi | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+)arch/arm/boot/dts/zynq-7000.dtsi +26
-0@@ -54,6 +54,26 @@ clocks = <&uart_clk 1>; }; + gem0: ethernet at e000b000 { + compatible = "cdns,gem"; + reg = <0xe000b000 0x4000>; + status = "disabled"; + interrupts = <0 22 4>; + clocks = <&gem0_clk 0>, <&gem0_clk 0>; + clock-names = "pclk", "hclk"; + phy-mode = "rgmii"; + }; + + gem1: ethernet at e000c000 { + compatible = "cdns,gem"; + reg = <0xe000c000 0x4000>; + status = "disabled"; + interrupts = <0 45 4>; + clocks = <&gem1_clk 0>, <&gem1_clk 0>; + clock-names = "pclk", "hclk"; + phy-mode = "rgmii"; + }; + slcr: slcr at f8000000 { compatible = "xlnx,zynq-slcr"; reg = <0xF8000000 0x1000>;@@ -89,6 +109,22 @@ reg = <0x108 0x118>; clock-output-names = "iopll"; }; + gem0_clk: gem0_clk { + #clock-cells = <1>; + compatible = "xlnx,zynq-periph-clock"; + clocks = <&iopll &armpll &ddrpll>; + reg = <0x140>; + clock-output-names = "gem0_ref_clk1",
arch/arm/boot/dts/zynq-7000.dtsi line 127
Quoted 10 lines
arch/arm/boot/dts/zynq-7000.dtsi +10
-0+ "gem0_ref_clk2"; + }; + gem1_clk: gem1_clk { + #clock-cells = <1>; + compatible = "xlnx,zynq-periph-clock"; + clocks = <&iopll &armpll &ddrpll>; + reg = <0x144>; + clock-output-names = "gem1_ref_clk1", + "gem1_ref_clk2"; + };
This is nice. Will look at it.
I have checked you have sent some macb related patches. Do I need them to apply them to get this to work?
Thanks,
Michal
Signature · 5 lines
Michal Simek, Ing. (M.Eng) w: www.monstr.eu p: +42-0-721842854 Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/ Maintainer of Linux kernel - Xilinx Zynq ARM architecture Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform
PATCH 1/1 ARM: zynq: add gem support
Quoted 58 lines · Michal Simek
2013/3/23 Steffen Trumtrar <[email protected]>:
Quoted 57 lines
The zynq includes a Cadence GEM IP core. This is compatible with the macb driver. Add it to the zynq-7000 DT.
Signed-off-by Steffen Trumtrar <[email protected]>Cc Michal Simek <[email protected]>Cc Josh Cartwright <[email protected]>--- arch/arm/boot/dts/zynq-7000.dtsi | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+)arch/arm/boot/dts/zynq-7000.dtsi +32
-0@@ -54,6 +54,26 @@ clocks = <&uart_clk 1>; }; + gem0: ethernet at e000b000 { + compatible = "cdns,gem"; + reg = <0xe000b000 0x4000>; + status = "disabled"; + interrupts = <0 22 4>; + clocks = <&gem0_clk 0>, <&gem0_clk 0>; + clock-names = "pclk", "hclk"; + phy-mode = "rgmii"; + }; + + gem1: ethernet at e000c000 { + compatible = "cdns,gem"; + reg = <0xe000c000 0x4000>; + status = "disabled"; + interrupts = <0 45 4>; + clocks = <&gem1_clk 0>, <&gem1_clk 0>; + clock-names = "pclk", "hclk"; + phy-mode = "rgmii"; + }; + slcr: slcr at f8000000 { compatible = "xlnx,zynq-slcr"; reg = <0xF8000000 0x1000>;@@ -89,6 +109,22 @@ reg = <0x108 0x118>; clock-output-names = "iopll"; }; + gem0_clk: gem0_clk { + #clock-cells = <1>; + compatible = "xlnx,zynq-periph-clock"; + clocks = <&iopll &armpll &ddrpll>; + reg = <0x140>; + clock-output-names = "gem0_ref_clk1", + "gem0_ref_clk2"; + }; + gem1_clk: gem1_clk { + #clock-cells = <1>; + compatible = "xlnx,zynq-periph-clock"; + clocks = <&iopll &armpll &ddrpll>;
Quoted 9 lines
arch/arm/boot/dts/zynq-7000.dtsi line 127
Quoted 4 lines
arch/arm/boot/dts/zynq-7000.dtsi +4
-0+ reg = <0x144>; + clock-output-names = "gem1_ref_clk1", + "gem1_ref_clk2"; + };This is nice. Will look at it.
I have checked you have sent some macb related patches. Do I need them to apply them to get this to work?
Yes. Those patches are necessary for the driver to work.
One fixes the endianess, without that patch all your packages will be bogus. And the ISR patch is needed, too.
Regards,
Steffen
Signature · 4 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |