netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/6] Updates for Marvell Switch SoCs
@ 2017-02-07 20:28 Chris Packham
  2017-02-07 20:28 ` [PATCH v2 2/6] ARM: dts: armada-xp-98dx3236: combine dfx server nodes Chris Packham
  0 siblings, 1 reply; 6+ messages in thread
From: Chris Packham @ 2017-02-07 20:28 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: Chris Packham, Rob Herring, Mark Rutland, Michael Turquette,
	Stephen Boyd, Jason Cooper, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Russell King, Thomas Petazzoni, devicetree,
	linux-kernel, linux-clk, netdev

Shortly after I posted my last series I got access to a more recent
Marvell SDK which had some device tree support for the switch SoCs I'd
been wanting. It was still based on an older kernel but it was a huge
improvement over what came before.

Patch 1/6 is a typo I noticed after my initial series was applied.

Patch 2/6 is a bit of a cleanup. I did initially struggle with how to
access individual parts of the DFX block as well as retaining a handle on
the entire thing for the switch driver to use.

Patch 3/6 is a re-jig of the dtsi files which is needed by 5/6. This is
required because I need to use the coreclk label on a different node. It
also means I don't have to disable nodes for blocks that only exist on
the Armada-XP.

Patch 4/6, 5/6 and 6/6 are ported from the Marvell Linux kernel. I've tested
them on the hardware I have access to and things look pretty good.

Chris Packham (6):
  ARM: dts: Fix typo in armada-xp-98dx4251
    Changes in v2:
    - new
  ARM: dts: armada-xp-98dx3236: combine dfx server nodes
    Changes in v2:
    - none
  ARM: dts: Use armada-370-xp as a base for armada-xp-98dx3236
    Changes in v2:
    - Update root compatible strings in armada-xp-98dx3336.dtsi,
      armada-xp-98dx4251.dtsi, armada-xp-db-dxbc2.dts and
      armada-xp-db-xc3-24g4xg.dts
  ARM: mvebu: Add mv98dx3236-soc-id
    Changes in v2:
    - none
  ARM: dts: mvebu: Move mv98dx3236 clock bindings
    Changes in v2:
    - New. Split out from "clk: mvebu: Expand mv98dx3236-core-clock support"
  clk: mvebu: Expand mv98dx3236-core-clock support
    Changes in v2:
    - split dts updates into separate patch
    - add 98DX4251 specific support

 .../bindings/arm/marvell/mv98dx3236-soc-id.txt     |  14 ++
 .../devicetree/bindings/clock/mvebu-core-clock.txt |   7 +
 .../bindings/clock/mvebu-gated-clock.txt           |  11 ++
 .../devicetree/bindings/net/marvell,prestera.txt   |  13 +-
 arch/arm/boot/dts/armada-xp-98dx3236.dtsi          | 211 ++++++++++++++++-----
 arch/arm/boot/dts/armada-xp-98dx3336.dtsi          |   2 +-
 arch/arm/boot/dts/armada-xp-98dx4251.dtsi          |   2 +-
 arch/arm/boot/dts/armada-xp-db-dxbc2.dts           |   2 +-
 arch/arm/boot/dts/armada-xp-db-xc3-24g4xg.dts      |   2 +-
 arch/arm/mach-mvebu/mvebu-soc-id.c                 |  43 ++++-
 drivers/clk/mvebu/Makefile                         |   2 +-
 drivers/clk/mvebu/armada-xp.c                      |  13 --
 drivers/clk/mvebu/mv98dx3236.c                     | 180 ++++++++++++++++++
 13 files changed, 422 insertions(+), 80 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/arm/marvell/mv98dx3236-soc-id.txt
 create mode 100644 drivers/clk/mvebu/mv98dx3236.c

-- 
2.11.0.24.ge6920cf

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

* [PATCH v2 2/6] ARM: dts: armada-xp-98dx3236: combine dfx server nodes
  2017-02-07 20:28 [PATCH v2 0/6] Updates for Marvell Switch SoCs Chris Packham
@ 2017-02-07 20:28 ` Chris Packham
  2017-02-15 22:40   ` Rob Herring
  0 siblings, 1 reply; 6+ messages in thread
From: Chris Packham @ 2017-02-07 20:28 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: Chris Packham, Rob Herring, Mark Rutland, Jason Cooper,
	Andrew Lunn, Gregory Clement, Sebastian Hesselbarth, Russell King,
	netdev, devicetree, linux-kernel

Rather than having a separate node for the dfx server add a reg property
to the parent node. This give somes compatibility with the Marvell
supplied SDK.

Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
---

Notes:
    Changes in v2:
    - none

 Documentation/devicetree/bindings/net/marvell,prestera.txt | 13 +++++--------
 arch/arm/boot/dts/armada-xp-98dx3236.dtsi                  |  8 ++------
 2 files changed, 7 insertions(+), 14 deletions(-)

diff --git a/Documentation/devicetree/bindings/net/marvell,prestera.txt b/Documentation/devicetree/bindings/net/marvell,prestera.txt
index 5fbab29718e8..c329608fa887 100644
--- a/Documentation/devicetree/bindings/net/marvell,prestera.txt
+++ b/Documentation/devicetree/bindings/net/marvell,prestera.txt
@@ -32,19 +32,16 @@ DFX Server bindings
 -------------------
 
 Required properties:
-- compatible: must be "marvell,dfx-server"
+- compatible: must be "marvell,dfx-server", "simple-bus"
+- ranges: describes the address mapping of a memory-mapped bus.
 - reg: address and length of the register set for the device.
 
 Example:
 
-dfx-registers {
-	compatible = "simple-bus";
+dfx-server {
+	compatible = "marvell,dfx-server", "simple-bus";
 	#address-cells = <1>;
 	#size-cells = <1>;
 	ranges = <0 MBUS_ID(0x08, 0x00) 0 0x100000>;
-
-	dfx: dfx@0 {
-		compatible = "marvell,dfx-server";
-		reg = <0 0x100000>;
-	};
+	reg = <MBUS_ID(0x08, 0x00) 0 0x100000>;
 };
diff --git a/arch/arm/boot/dts/armada-xp-98dx3236.dtsi b/arch/arm/boot/dts/armada-xp-98dx3236.dtsi
index f6a03dcee5ef..bd8261fdec81 100644
--- a/arch/arm/boot/dts/armada-xp-98dx3236.dtsi
+++ b/arch/arm/boot/dts/armada-xp-98dx3236.dtsi
@@ -195,11 +195,12 @@
 			};
 		};
 
-		dfxr: dfx-registers@ac000000 {
+		dfx: dfx-server@ac000000 {
 			compatible = "simple-bus";
 			#address-cells = <1>;
 			#size-cells = <1>;
 			ranges = <0 MBUS_ID(0x08, 0x00) 0 0x100000>;
+			reg = <MBUS_ID(0x08, 0x00) 0 0x100000>;
 
 			dfx_coredivclk: corediv-clock@f8268 {
 				compatible = "marvell,mv98dx3236-corediv-clock";
@@ -208,11 +209,6 @@
 				clocks = <&mainpll>;
 				clock-output-names = "nand";
 			};
-
-			dfx: dfx@0 {
-				compatible = "marvell,dfx-server";
-				reg = <0 0x100000>;
-			};
 		};
 
 		switch: switch@a8000000 {
-- 
2.11.0.24.ge6920cf

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

* Re: [PATCH v2 2/6] ARM: dts: armada-xp-98dx3236: combine dfx server nodes
  2017-02-07 20:28 ` [PATCH v2 2/6] ARM: dts: armada-xp-98dx3236: combine dfx server nodes Chris Packham
@ 2017-02-15 22:40   ` Rob Herring
  0 siblings, 0 replies; 6+ messages in thread
From: Rob Herring @ 2017-02-15 22:40 UTC (permalink / raw)
  To: Chris Packham
  Cc: linux-arm-kernel, Mark Rutland, Jason Cooper, Andrew Lunn,
	Gregory Clement, Sebastian Hesselbarth, Russell King, netdev,
	devicetree, linux-kernel

On Wed, Feb 08, 2017 at 09:28:11AM +1300, Chris Packham wrote:
> Rather than having a separate node for the dfx server add a reg property
> to the parent node. This give somes compatibility with the Marvell
> supplied SDK.

But breaks upstream compatibility. Need to explain why that's okay.

> 
> Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
> ---
> 
> Notes:
>     Changes in v2:
>     - none
> 
>  Documentation/devicetree/bindings/net/marvell,prestera.txt | 13 +++++--------
>  arch/arm/boot/dts/armada-xp-98dx3236.dtsi                  |  8 ++------
>  2 files changed, 7 insertions(+), 14 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/net/marvell,prestera.txt b/Documentation/devicetree/bindings/net/marvell,prestera.txt
> index 5fbab29718e8..c329608fa887 100644
> --- a/Documentation/devicetree/bindings/net/marvell,prestera.txt
> +++ b/Documentation/devicetree/bindings/net/marvell,prestera.txt
> @@ -32,19 +32,16 @@ DFX Server bindings
>  -------------------
>  
>  Required properties:
> -- compatible: must be "marvell,dfx-server"
> +- compatible: must be "marvell,dfx-server", "simple-bus"
> +- ranges: describes the address mapping of a memory-mapped bus.
>  - reg: address and length of the register set for the device.
>  
>  Example:
>  
> -dfx-registers {
> -	compatible = "simple-bus";
> +dfx-server {
> +	compatible = "marvell,dfx-server", "simple-bus";
>  	#address-cells = <1>;
>  	#size-cells = <1>;
>  	ranges = <0 MBUS_ID(0x08, 0x00) 0 0x100000>;
> -
> -	dfx: dfx@0 {
> -		compatible = "marvell,dfx-server";
> -		reg = <0 0x100000>;
> -	};
> +	reg = <MBUS_ID(0x08, 0x00) 0 0x100000>;
>  };
> diff --git a/arch/arm/boot/dts/armada-xp-98dx3236.dtsi b/arch/arm/boot/dts/armada-xp-98dx3236.dtsi
> index f6a03dcee5ef..bd8261fdec81 100644
> --- a/arch/arm/boot/dts/armada-xp-98dx3236.dtsi
> +++ b/arch/arm/boot/dts/armada-xp-98dx3236.dtsi
> @@ -195,11 +195,12 @@
>  			};
>  		};
>  
> -		dfxr: dfx-registers@ac000000 {
> +		dfx: dfx-server@ac000000 {
>  			compatible = "simple-bus";

Missing marvell,dfx-server?

>  			#address-cells = <1>;
>  			#size-cells = <1>;
>  			ranges = <0 MBUS_ID(0x08, 0x00) 0 0x100000>;
> +			reg = <MBUS_ID(0x08, 0x00) 0 0x100000>;
>  
>  			dfx_coredivclk: corediv-clock@f8268 {
>  				compatible = "marvell,mv98dx3236-corediv-clock";
> @@ -208,11 +209,6 @@
>  				clocks = <&mainpll>;
>  				clock-output-names = "nand";
>  			};
> -
> -			dfx: dfx@0 {
> -				compatible = "marvell,dfx-server";
> -				reg = <0 0x100000>;
> -			};
>  		};
>  
>  		switch: switch@a8000000 {
> -- 
> 2.11.0.24.ge6920cf
> 

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

* [PATCH v2 0/6] Updates for Marvell Switch SoCs
@ 2017-02-16  8:50 Chris Packham
  2017-03-07 17:10 ` Gregory CLEMENT
  0 siblings, 1 reply; 6+ messages in thread
From: Chris Packham @ 2017-02-16  8:50 UTC (permalink / raw)
  To: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
  Cc: Chris Packham, Rob Herring, Mark Rutland, Michael Turquette,
	Stephen Boyd, Jason Cooper, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Russell King,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-clk-u79uwXL29TY76Z2rM5mHXA, netdev-u79uwXL29TY76Z2rM5mHXA

Shortly after I posted my last series I got access to a more recent
Marvell SDK which had some device tree support for the switch SoCs I'd
been wanting. It was still based on an older kernel but it was a huge
improvement over what came before.

Patch 1/6 is a typo I noticed after my initial series was applied.

Patch 2/6 is a bit of a cleanup. I did initially struggle with how to
access individual parts of the DFX block as well as retaining a handle on
the entire thing for the switch driver to use.

Patch 3/6 is a re-jig of the dtsi files which is needed by 5/6. This is
required because I need to use the coreclk label on a different node. It
also means I don't have to disable nodes for blocks that only exist on
the Armada-XP.

Patch 4/6, 5/6 are split from the previous versions.

Patch 6/6 is the device tree portion of a change already in clk-next.

Chris Packham (6):
  ARM: dts: Fix typo in armada-xp-98dx4251
    Changes in v2
    - new
    Changes in v3:
    - none
  ARM: dts: armada-xp-98dx3236: combine dfx server nodes
    Changes in v2:
    - none
    Changes in v3:
    - none
  ARM: dts: Use armada-370-xp as a base for armada-xp-98dx3236
    Changes in v2:
    - Update root compatible strings in armada-xp-98dx3336.dtsi,
      armada-xp-98dx4251.dtsi, armada-xp-db-dxbc2.dts and
      armada-xp-db-xc3-24g4xg.dts
    Changes in v3:
    - none
  ARM: dts: mvebu: Add binding for mv98dx3236-soc-id
    Changes in v3:
    - new, split from driver
  ARM: mvebu: Add driver for mv98dx3236-soc-id
    Changes in v2:
    - none
    Changes in v3:
    - split from dts changes
  ARM: dts: mvebu: Move mv98dx3236 clock bindings
    Changes in v2:
    - New. Split out from "clk: mvebu: Expand mv98dx3236-core-clock support"
    Changes in v3:
    - Clarify why the old location was wrong (but worked).


 .../bindings/arm/marvell/mv98dx3236-soc-id.txt     |  14 ++
 .../devicetree/bindings/clock/mvebu-core-clock.txt |   7 +
 .../bindings/clock/mvebu-gated-clock.txt           |  11 ++
 .../devicetree/bindings/net/marvell,prestera.txt   |  13 +-
 arch/arm/boot/dts/armada-xp-98dx3236.dtsi          | 213 ++++++++++++++++-----
 arch/arm/boot/dts/armada-xp-98dx3336.dtsi          |   2 +-
 arch/arm/boot/dts/armada-xp-98dx4251.dtsi          |   2 +-
 arch/arm/boot/dts/armada-xp-db-dxbc2.dts           |   2 +-
 arch/arm/boot/dts/armada-xp-db-xc3-24g4xg.dts      |   2 +-
 arch/arm/mach-mvebu/mvebu-soc-id.c                 |  43 ++++-
 10 files changed, 242 insertions(+), 67 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/arm/marvell/mv98dx3236-soc-id.txt

-- 
2.11.0.24.ge6920cf
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH v2 0/6] Updates for Marvell Switch SoCs
  2017-02-16  8:50 [PATCH v2 0/6] Updates for Marvell Switch SoCs Chris Packham
@ 2017-03-07 17:10 ` Gregory CLEMENT
  2017-03-07 19:38   ` Chris Packham
  0 siblings, 1 reply; 6+ messages in thread
From: Gregory CLEMENT @ 2017-03-07 17:10 UTC (permalink / raw)
  To: Chris Packham
  Cc: Mark Rutland, Andrew Lunn, Jason Cooper, devicetree, netdev,
	Michael Turquette, Stephen Boyd, Russell King, linux-kernel,
	Rob Herring, linux-clk, linux-arm-kernel, Sebastian Hesselbarth

Hi Chris,
 
 On jeu., févr. 16 2017, Chris Packham <chris.packham@alliedtelesis.co.nz> wrote:

> Shortly after I posted my last series I got access to a more recent
> Marvell SDK which had some device tree support for the switch SoCs I'd
> been wanting. It was still based on an older kernel but it was a huge
> improvement over what came before.
>
> Patch 1/6 is a typo I noticed after my initial series was applied.
>
> Patch 2/6 is a bit of a cleanup. I did initially struggle with how to
> access individual parts of the DFX block as well as retaining a handle on
> the entire thing for the switch driver to use.
>
> Patch 3/6 is a re-jig of the dtsi files which is needed by 5/6. This is
> required because I need to use the coreclk label on a different node. It
> also means I don't have to disable nodes for blocks that only exist on
> the Armada-XP.
>
> Patch 4/6, 5/6 are split from the previous versions.
>
> Patch 6/6 is the device tree portion of a change already in clk-next.


I applied patches 2, 3 and 6 on mvebu/dt with the acked-by from Rob when
he gave it.

Patch 1 is already part of 4.11-rc1.

For patch 4 and 5 I understand that either we don't need it or it should
be a updated version so I skipped them.

Thanks,

Gregory

>
> Chris Packham (6):
>   ARM: dts: Fix typo in armada-xp-98dx4251
>     Changes in v2
>     - new
>     Changes in v3:
>     - none
>   ARM: dts: armada-xp-98dx3236: combine dfx server nodes
>     Changes in v2:
>     - none
>     Changes in v3:
>     - none
>   ARM: dts: Use armada-370-xp as a base for armada-xp-98dx3236
>     Changes in v2:
>     - Update root compatible strings in armada-xp-98dx3336.dtsi,
>       armada-xp-98dx4251.dtsi, armada-xp-db-dxbc2.dts and
>       armada-xp-db-xc3-24g4xg.dts
>     Changes in v3:
>     - none
>   ARM: dts: mvebu: Add binding for mv98dx3236-soc-id
>     Changes in v3:
>     - new, split from driver
>   ARM: mvebu: Add driver for mv98dx3236-soc-id
>     Changes in v2:
>     - none
>     Changes in v3:
>     - split from dts changes
>   ARM: dts: mvebu: Move mv98dx3236 clock bindings
>     Changes in v2:
>     - New. Split out from "clk: mvebu: Expand mv98dx3236-core-clock support"
>     Changes in v3:
>     - Clarify why the old location was wrong (but worked).
>
>
>  .../bindings/arm/marvell/mv98dx3236-soc-id.txt     |  14 ++
>  .../devicetree/bindings/clock/mvebu-core-clock.txt |   7 +
>  .../bindings/clock/mvebu-gated-clock.txt           |  11 ++
>  .../devicetree/bindings/net/marvell,prestera.txt   |  13 +-
>  arch/arm/boot/dts/armada-xp-98dx3236.dtsi          | 213 ++++++++++++++++-----
>  arch/arm/boot/dts/armada-xp-98dx3336.dtsi          |   2 +-
>  arch/arm/boot/dts/armada-xp-98dx4251.dtsi          |   2 +-
>  arch/arm/boot/dts/armada-xp-db-dxbc2.dts           |   2 +-
>  arch/arm/boot/dts/armada-xp-db-xc3-24g4xg.dts      |   2 +-
>  arch/arm/mach-mvebu/mvebu-soc-id.c                 |  43 ++++-
>  10 files changed, 242 insertions(+), 67 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/arm/marvell/mv98dx3236-soc-id.txt
>
> -- 
> 2.11.0.24.ge6920cf

-- 
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH v2 0/6] Updates for Marvell Switch SoCs
  2017-03-07 17:10 ` Gregory CLEMENT
@ 2017-03-07 19:38   ` Chris Packham
  0 siblings, 0 replies; 6+ messages in thread
From: Chris Packham @ 2017-03-07 19:38 UTC (permalink / raw)
  To: Gregory CLEMENT
  Cc: Mark Rutland, Andrew Lunn, Jason Cooper,
	devicetree@vger.kernel.org, netdev@vger.kernel.org,
	Michael Turquette, Stephen Boyd, Russell King,
	linux-kernel@vger.kernel.org, Rob Herring,
	linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	Sebastian Hesselbarth

Hi Gregory,

On 08/03/17 06:10, Gregory CLEMENT wrote:
> Hi Chris,
>
>  On jeu., févr. 16 2017, Chris Packham <chris.packham@alliedtelesis.co.nz> wrote:
>
>> Shortly after I posted my last series I got access to a more recent
>> Marvell SDK which had some device tree support for the switch SoCs I'd
>> been wanting. It was still based on an older kernel but it was a huge
>> improvement over what came before.
>>
>> Patch 1/6 is a typo I noticed after my initial series was applied.
>>
>> Patch 2/6 is a bit of a cleanup. I did initially struggle with how to
>> access individual parts of the DFX block as well as retaining a handle on
>> the entire thing for the switch driver to use.
>>
>> Patch 3/6 is a re-jig of the dtsi files which is needed by 5/6. This is
>> required because I need to use the coreclk label on a different node. It
>> also means I don't have to disable nodes for blocks that only exist on
>> the Armada-XP.
>>
>> Patch 4/6, 5/6 are split from the previous versions.
>>
>> Patch 6/6 is the device tree portion of a change already in clk-next.
>
>
> I applied patches 2, 3 and 6 on mvebu/dt with the acked-by from Rob when
> he gave it.
>
> Patch 1 is already part of 4.11-rc1.
>
> For patch 4 and 5 I understand that either we don't need it or it should
> be a updated version so I skipped them.
>

That's correct, thanks.

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

end of thread, other threads:[~2017-03-07 19:38 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-07 20:28 [PATCH v2 0/6] Updates for Marvell Switch SoCs Chris Packham
2017-02-07 20:28 ` [PATCH v2 2/6] ARM: dts: armada-xp-98dx3236: combine dfx server nodes Chris Packham
2017-02-15 22:40   ` Rob Herring
  -- strict thread matches above, loose matches on Subject: below --
2017-02-16  8:50 [PATCH v2 0/6] Updates for Marvell Switch SoCs Chris Packham
2017-03-07 17:10 ` Gregory CLEMENT
2017-03-07 19:38   ` Chris Packham

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).