devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 00/10] Marvell Berlin full clock support
  2014-05-11 20:24 [PATCH 0/8] " Sebastian Hesselbarth
@ 2014-05-14 20:15 ` Sebastian Hesselbarth
  0 siblings, 0 replies; 9+ messages in thread
From: Sebastian Hesselbarth @ 2014-05-14 20:15 UTC (permalink / raw)
  To: Sebastian Hesselbarth
  Cc: Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
	Randy Dunlap, Mike Turquette, Alexandre Belloni, Jisheng Zhang,
	devicetree, linux-doc, linux-arm-kernel, linux-kernel

This is version 2 of a patch set to bring proper DT based clocks to
Marvell Berlin SoCs.

The overall changes are:

* Dropped of_clk_create_name() helper
Booting into an initramfs rootfs revealed that the unique clock names
created with that helper clash with the way of_clk_get_parent_name()
resolves the clock specifier to get the correct clock name. Anyway,
I still consider the helper a good idea and postpone it to the next
cycle when I have more time to look at the details.

* Added BG2Q core clock driver and dtsi changes
Alexandre just provided them, so I added them to this patch set.

The single patch overview now is:

Patch 1 adds the whole binding documentation for all clock related IP
found on BG2, BG2CD, and BG2Q.

Patch 2 adds corresponding dt-binding includes for the core clock
indices to be used in both DT and the driver.

Patches 3, 4, and 5 add clock drivers for the Audio/Video PLL, simple
PLLs, and complex clock divider cells found on Berlin SoCs. Where
required, currently known differences between BG2/BG2CD and BG2Q are
taken care of.

Patches 6 and 7 add core clock drivers for the remaining clocks of
BG2/BG2CD and BG2Q. The register set dealing with it, is shared among
input and bypass muxes, clock dividers and clock gates.

Patches 8, 9, and 10 finally convert the DT SoC includes for BG2,
BG2CD, and BG2Q to make use of the new clock related DT nodes.

Alexandre Belloni (4):
  clk: berlin: add driver for BG2x simple PLLs
  clk: berlin: add driver for BG2x complex divider cells
  clk: berlin: add core clock driver for BG2Q
  ARM: dts: berlin: convert BG2Q to DT clock nodes

Sebastian Hesselbarth (6):
  dt-binding: clk: add clock binding docs for Marvell Berlin2 SoCs
  clk: berlin: add binding include for BG2/BG2CD clock ids
  clk: berlin: add driver for BG2x audio/video PLL
  clk: berlin: add core clock driver for BG2/BG2CD
  ARM: dts: berlin: convert BG2CD to DT clock nodes
  ARM: dts: berlin: convert BG2 to DT clock nodes

 .../devicetree/bindings/clock/berlin2-clock.txt    | 195 ++++++++
 arch/arm/boot/dts/berlin2.dtsi                     | 207 +++++++--
 arch/arm/boot/dts/berlin2cd.dtsi                   | 205 +++++++--
 arch/arm/boot/dts/berlin2q.dtsi                    |  80 +++-
 drivers/clk/Makefile                               |   1 +
 drivers/clk/berlin/Makefile                        |   4 +
 drivers/clk/berlin/berlin2-avpll.c                 | 368 +++++++++++++++
 drivers/clk/berlin/berlin2-div.c                   | 324 +++++++++++++
 drivers/clk/berlin/berlin2-div.h                   |  80 ++++
 drivers/clk/berlin/berlin2-pll.c                   | 168 +++++++
 drivers/clk/berlin/bg2.c                           | 502 +++++++++++++++++++++
 drivers/clk/berlin/bg2q.c                          | 269 +++++++++++
 include/dt-bindings/clock/berlin2.h                |  35 ++
 include/dt-bindings/clock/berlin2q.h               |  28 ++
 14 files changed, 2385 insertions(+), 81 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/clock/berlin2-clock.txt
 create mode 100644 drivers/clk/berlin/Makefile
 create mode 100644 drivers/clk/berlin/berlin2-avpll.c
 create mode 100644 drivers/clk/berlin/berlin2-div.c
 create mode 100644 drivers/clk/berlin/berlin2-div.h
 create mode 100644 drivers/clk/berlin/berlin2-pll.c
 create mode 100644 drivers/clk/berlin/bg2.c
 create mode 100644 drivers/clk/berlin/bg2q.c
 create mode 100644 include/dt-bindings/clock/berlin2.h
 create mode 100644 include/dt-bindings/clock/berlin2q.h

---
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Pawel Moll <pawel.moll@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Ian Campbell <ijc+devicetree@hellion.org.uk>
Cc: Kumar Gala <galak@codeaurora.org>
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: Mike Turquette <mturquette@linaro.org>
Cc: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Cc: Jisheng Zhang <jszhang@marvell.com>
Cc: devicetree@vger.kernel.org
Cc: linux-doc@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
-- 
1.9.1


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

* [PATCH v2 00/10] Marvell Berlin full clock support
@ 2014-05-19 16:43 Sebastian Hesselbarth
  2014-05-19 16:43 ` [PATCH v2 01/10] dt-binding: ARM: add clock binding docs for Marvell Berlin2 SoCs Sebastian Hesselbarth
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Sebastian Hesselbarth @ 2014-05-19 16:43 UTC (permalink / raw)
  To: Sebastian Hesselbarth
  Cc: Mark Rutland, Jisheng Zhang, Mike Turquette, Pawel Moll,
	Ian Campbell, Randy Dunlap, linux-doc, linux-kernel, devicetree,
	Rob Herring, Alexandre Belloni, Kumar Gala, linux-arm-kernel

Mike,

this is v2 of the Berlin SoC clock driver [1] but with a reworked DT
binding as requested [2]. We decided to not even try to split up the chip
control registers that deal with pinmux, padmux, clock, reset, and evil
stuff we haven't even looked at. Instead we keep a single node that clock
driver will remap early, while proper platform_drivers use a regmap
instead. Although clock and other drivers share the same register range,
they use individual registers exclusively.

There are some functional fixes in the single clock drivers, I noticed
while retesting each individial driver. There will be more to fixup but
without any drivers actually using the clocks, it is hard to tell what
isn't working now.

Anyway, the current binding should match what you requested and having
a clock driver for v3.16 will really be a huge benefit for us to work
on more driver support.

If you are fine with it, please take patches 2-7 and I'll pick up
1,8-10 in berlin branch.

Sebastian

[1] https://lkml.kernel.org/r/1399839881-29895-1-git-send-email-sebastian.hesselbarth@gmail.com
[2] https://lkml.kernel.org/r/20140515044106.19795.57249@quantum

Alexandre Belloni (4):
  clk: berlin: add driver for BG2x simple PLLs
  clk: berlin: add driver for BG2x complex divider cells
  clk: berlin: add core clock driver for BG2Q
  ARM: dts: berlin: convert BG2Q to DT clock nodes

Sebastian Hesselbarth (6):
  dt-binding: ARM: add clock binding docs for Marvell Berlin2 SoCs
  clk: berlin: add binding include for Berlin SoC clock ids
  clk: berlin: add driver for BG2x audio/video PLL
  clk: berlin: add core clock driver for BG2/BG2CD
  ARM: dts: berlin: convert BG2CD to DT clock nodes
  ARM: dts: berlin: convert BG2 to DT clock nodes

 .../devicetree/bindings/arm/marvell,berlin.txt     |  47 ++
 arch/arm/boot/dts/berlin2.dtsi                     |  56 +-
 arch/arm/boot/dts/berlin2cd.dtsi                   |  53 +-
 arch/arm/boot/dts/berlin2q.dtsi                    |  54 +-
 drivers/clk/Makefile                               |   1 +
 drivers/clk/berlin/Makefile                        |   4 +
 drivers/clk/berlin/berlin2-avpll.c                 | 393 ++++++++++++
 drivers/clk/berlin/berlin2-avpll.h                 |  36 ++
 drivers/clk/berlin/berlin2-div.c                   | 265 ++++++++
 drivers/clk/berlin/berlin2-div.h                   |  89 +++
 drivers/clk/berlin/berlin2-pll.c                   | 117 ++++
 drivers/clk/berlin/berlin2-pll.h                   |  37 ++
 drivers/clk/berlin/bg2.c                           | 691 +++++++++++++++++++++
 drivers/clk/berlin/bg2q.c                          | 389 ++++++++++++
 drivers/clk/berlin/common.h                        |  29 +
 include/dt-bindings/clock/berlin2.h                |  45 ++
 include/dt-bindings/clock/berlin2q.h               |  31 +
 17 files changed, 2240 insertions(+), 97 deletions(-)
 create mode 100644 drivers/clk/berlin/Makefile
 create mode 100644 drivers/clk/berlin/berlin2-avpll.c
 create mode 100644 drivers/clk/berlin/berlin2-avpll.h
 create mode 100644 drivers/clk/berlin/berlin2-div.c
 create mode 100644 drivers/clk/berlin/berlin2-div.h
 create mode 100644 drivers/clk/berlin/berlin2-pll.c
 create mode 100644 drivers/clk/berlin/berlin2-pll.h
 create mode 100644 drivers/clk/berlin/bg2.c
 create mode 100644 drivers/clk/berlin/bg2q.c
 create mode 100644 drivers/clk/berlin/common.h
 create mode 100644 include/dt-bindings/clock/berlin2.h
 create mode 100644 include/dt-bindings/clock/berlin2q.h

---
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Pawel Moll <pawel.moll@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Ian Campbell <ijc+devicetree@hellion.org.uk>
Cc: Kumar Gala <galak@codeaurora.org>
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: Mike Turquette <mturquette@linaro.org>
Cc: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Cc: Jisheng Zhang <jszhang@marvell.com>
Cc: devicetree@vger.kernel.org
Cc: linux-doc@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
-- 
1.9.1

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

* [PATCH v2 01/10] dt-binding: ARM: add clock binding docs for Marvell Berlin2 SoCs
  2014-05-19 16:43 [PATCH v2 00/10] Marvell Berlin full clock support Sebastian Hesselbarth
@ 2014-05-19 16:43 ` Sebastian Hesselbarth
  2014-05-19 21:05   ` Alexandre Belloni
  2014-05-19 16:43 ` [PATCH v2 02/10] clk: berlin: add binding include for Berlin SoC clock ids Sebastian Hesselbarth
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 9+ messages in thread
From: Sebastian Hesselbarth @ 2014-05-19 16:43 UTC (permalink / raw)
  To: Sebastian Hesselbarth
  Cc: Mark Rutland, Jisheng Zhang, Mike Turquette, Pawel Moll,
	Ian Campbell, Randy Dunlap, linux-doc, linux-kernel, devicetree,
	Rob Herring, Alexandre Belloni, Kumar Gala, linux-arm-kernel

This adds mandatory device tree binding documentation for the clock related
IP found on Marvell Berlin2 (BG2, BG2CD, and BG2Q) SoCs to the Berlin SoC
binding documentation.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
---
Changelog:
v1->v2:
- typo fixed (Reported by Alexandre Belloni)
- reworked binding to not represent individual clocks but chip control
  IP/registers instead (Suggested by Mike Turquette)
- dropped clock indices, refer to the include instead (Requested by Mike
  Turquette)
- moved the documentation from bindings/clock to Marvell Berlin SoC
  binding, as there will be more functions (e.g. pinctrl) to describe

Cc: Rob Herring <robh+dt@kernel.org>
Cc: Pawel Moll <pawel.moll@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Ian Campbell <ijc+devicetree@hellion.org.uk>
Cc: Kumar Gala <galak@codeaurora.org>
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: Mike Turquette <mturquette@linaro.org>
Cc: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Cc: Jisheng Zhang <jszhang@marvell.com>
Cc: devicetree@vger.kernel.org
Cc: linux-doc@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
---
 .../devicetree/bindings/arm/marvell,berlin.txt     | 47 ++++++++++++++++++++++
 1 file changed, 47 insertions(+)

diff --git a/Documentation/devicetree/bindings/arm/marvell,berlin.txt b/Documentation/devicetree/bindings/arm/marvell,berlin.txt
index 0677003e1476..744a7ea569d4 100644
--- a/Documentation/devicetree/bindings/arm/marvell,berlin.txt
+++ b/Documentation/devicetree/bindings/arm/marvell,berlin.txt
@@ -23,3 +23,50 @@ SoC and board used. Currently known SoC compatibles are:
 
 	...
 }
+
+* Marvell Berlin2 chip control binding
+
+Marvell Berlin SoCs have a chip control register set providing several
+individual registers dealing with pinmux, padmux, clock, reset, and secondary
+CPU boot address. Unfortunately, the individual registers are spread among the
+chip control registers, so there should be a single DT node only providing the
+different functions which are described below.
+
+Required properties:
+- compatible: shall be one of
+	"marvell,berlin2-chip-ctrl" for BG2
+	"marvell,berlin2cd-chip-ctrl" for BG2CD
+	"marvell,berlin2q-chip-ctrl" for BG2Q
+- reg: address and length of following register sets for
+  BG2/BG2CD: chip control register set
+  BG2Q: chip control register set and cpu pll registers
+
+* Clock provider binding
+
+As clock related registers are spread among the chip control registers, the
+chip control node also provides the clocks. Marvell Berlin2 (BG2, BG2CD, BG2Q)
+SoCs share the same IP for PLLs and clocks, with some minor differences in
+features and register layout.
+
+Required properties:
+- #clock-cells: shall be set to 1
+- clocks: clock specifiers referencing the core clock input clocks
+- clock-names: array of strings describing the input clock specifiers above.
+    Allowed clock-names for the reference clocks are
+      "refclk" for the SoCs osciallator input on all SoCs,
+    and SoC-specific input clocks for
+      BG2/BG2CD: "video_ext0" for the external video clock input
+
+Clocks provided by core clocks shall be referenced by a clock specifier
+indexing one of the provided clocks. Refer to dt-bindings/clock/berlin<soc>.h
+for the corresponding index mapping.
+
+Example:
+
+chip: chip-control@ea0000 {
+	compatible = "marvell,berlin2-chip-ctrl";
+	#clock-cells = <1>;
+	reg = <0xea0000 0x400>;
+	clocks = <&refclk>, <&externaldev 0>;
+	clock-names = "refclk", "video_ext0";
+};
-- 
1.9.1

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

* [PATCH v2 02/10] clk: berlin: add binding include for Berlin SoC clock ids
  2014-05-19 16:43 [PATCH v2 00/10] Marvell Berlin full clock support Sebastian Hesselbarth
  2014-05-19 16:43 ` [PATCH v2 01/10] dt-binding: ARM: add clock binding docs for Marvell Berlin2 SoCs Sebastian Hesselbarth
@ 2014-05-19 16:43 ` Sebastian Hesselbarth
  2014-05-19 19:46 ` [PATCH v2 00/10] Marvell Berlin full clock support Sebastian Hesselbarth
  2014-05-29  0:07 ` Mike Turquette
  3 siblings, 0 replies; 9+ messages in thread
From: Sebastian Hesselbarth @ 2014-05-19 16:43 UTC (permalink / raw)
  To: Sebastian Hesselbarth
  Cc: Mark Rutland, Jisheng Zhang, Mike Turquette, Pawel Moll,
	Ian Campbell, linux-kernel, devicetree, Rob Herring,
	Alexandre Belloni, Kumar Gala, linux-arm-kernel

This adds a dt-binding include for Marvell Berlin BG2/BG2CD and BG2Q
core clock IDs.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
---
Changelog:
v1->v2:
- separate patch to allow to use it in the driver (Suggested by Alexandre
  Belloni)

Cc: Rob Herring <robh+dt@kernel.org>
Cc: Pawel Moll <pawel.moll@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Ian Campbell <ijc+devicetree@hellion.org.uk>
Cc: Kumar Gala <galak@codeaurora.org>
Cc: Mike Turquette <mturquette@linaro.org>
Cc: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Cc: Jisheng Zhang <jszhang@marvell.com>
Cc: devicetree@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
---
 include/dt-bindings/clock/berlin2.h  | 45 ++++++++++++++++++++++++++++++++++++
 include/dt-bindings/clock/berlin2q.h | 31 +++++++++++++++++++++++++
 2 files changed, 76 insertions(+)
 create mode 100644 include/dt-bindings/clock/berlin2.h
 create mode 100644 include/dt-bindings/clock/berlin2q.h

diff --git a/include/dt-bindings/clock/berlin2.h b/include/dt-bindings/clock/berlin2.h
new file mode 100644
index 000000000000..0c30800175df
--- /dev/null
+++ b/include/dt-bindings/clock/berlin2.h
@@ -0,0 +1,45 @@
+/*
+ * Berlin2 BG2/BG2CD clock tree IDs
+ */
+
+#define CLKID_SYS		0
+#define CLKID_CPU		1
+#define CLKID_DRMFIGO		2
+#define CLKID_CFG		3
+#define CLKID_GFX		4
+#define CLKID_ZSP		5
+#define CLKID_PERIF		6
+#define CLKID_PCUBE		7
+#define CLKID_VSCOPE		8
+#define CLKID_NFC_ECC		9
+#define CLKID_VPP		10
+#define CLKID_APP		11
+#define CLKID_AUDIO0		12
+#define CLKID_AUDIO2		13
+#define CLKID_AUDIO3		14
+#define CLKID_AUDIO1		15
+#define CLKID_GFX3D_CORE	16
+#define CLKID_GFX3D_SYS		17
+#define CLKID_ARC		18
+#define CLKID_VIP		19
+#define CLKID_SDIO0XIN		20
+#define CLKID_SDIO1XIN		21
+#define CLKID_GFX3D_EXTRA	22
+#define CLKID_GC360		23
+#define CLKID_SDIO_DLLMST	24
+#define CLKID_GETH0		25
+#define CLKID_GETH1		26
+#define CLKID_SATA		27
+#define CLKID_AHBAPB		28
+#define CLKID_USB0		29
+#define CLKID_USB1		30
+#define CLKID_PBRIDGE		31
+#define CLKID_SDIO0		32
+#define CLKID_SDIO1		33
+#define CLKID_NFC		34
+#define CLKID_SMEMC		35
+#define CLKID_AUDIOHD		36
+#define CLKID_VIDEO0		37
+#define CLKID_VIDEO1		38
+#define CLKID_VIDEO2		39
+#define CLKID_TWD		40
diff --git a/include/dt-bindings/clock/berlin2q.h b/include/dt-bindings/clock/berlin2q.h
new file mode 100644
index 000000000000..287fc3b4afb2
--- /dev/null
+++ b/include/dt-bindings/clock/berlin2q.h
@@ -0,0 +1,31 @@
+/*
+ * Berlin2 BG2Q clock tree IDs
+ */
+
+#define CLKID_SYS		0
+#define CLKID_DRMFIGO		1
+#define CLKID_CFG		2
+#define CLKID_GFX2D		3
+#define CLKID_ZSP		4
+#define CLKID_PERIF		5
+#define CLKID_PCUBE		6
+#define CLKID_VSCOPE		7
+#define CLKID_NFC_ECC		8
+#define CLKID_VPP		9
+#define CLKID_APP		10
+#define CLKID_SDIO0XIN		11
+#define CLKID_SDIO1XIN		12
+#define CLKID_GFX2DAXI		13
+#define CLKID_GETH0		14
+#define CLKID_SATA		15
+#define CLKID_AHBAPB		16
+#define CLKID_USB0		17
+#define CLKID_USB1		18
+#define CLKID_USB2		19
+#define CLKID_USB3		20
+#define CLKID_PBRIDGE		21
+#define CLKID_SDIO		22
+#define CLKID_NFC		23
+#define CLKID_SMEMC		24
+#define CLKID_PCIE		25
+#define CLKID_TWD		26
-- 
1.9.1

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

* Re: [PATCH v2 00/10] Marvell Berlin full clock support
  2014-05-19 16:43 [PATCH v2 00/10] Marvell Berlin full clock support Sebastian Hesselbarth
  2014-05-19 16:43 ` [PATCH v2 01/10] dt-binding: ARM: add clock binding docs for Marvell Berlin2 SoCs Sebastian Hesselbarth
  2014-05-19 16:43 ` [PATCH v2 02/10] clk: berlin: add binding include for Berlin SoC clock ids Sebastian Hesselbarth
@ 2014-05-19 19:46 ` Sebastian Hesselbarth
  2014-05-29  0:07 ` Mike Turquette
  3 siblings, 0 replies; 9+ messages in thread
From: Sebastian Hesselbarth @ 2014-05-19 19:46 UTC (permalink / raw)
  Cc: Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
	Randy Dunlap, Mike Turquette, Alexandre Belloni, Jisheng Zhang,
	devicetree, linux-doc, linux-arm-kernel, linux-kernel

On 05/19/2014 06:43 PM, Sebastian Hesselbarth wrote:
> Mike,
> 
> this is v2 of the Berlin SoC clock driver [1] but with a reworked DT
> binding as requested [2]. We decided to not even try to split up the chip
> control registers that deal with pinmux, padmux, clock, reset, and evil
> stuff we haven't even looked at. Instead we keep a single node that clock
> driver will remap early, while proper platform_drivers use a regmap
> instead. Although clock and other drivers share the same register range,
> they use individual registers exclusively.
> 
> There are some functional fixes in the single clock drivers, I noticed
> while retesting each individial driver. There will be more to fixup but
> without any drivers actually using the clocks, it is hard to tell what
> isn't working now.
> 
> Anyway, the current binding should match what you requested and having
> a clock driver for v3.16 will really be a huge benefit for us to work
> on more driver support.
> 
> If you are fine with it, please take patches 2-7 and I'll pick up
> 1,8-10 in berlin branch.

nit: I also take patch 2 as it is the required DT include. Makes 3-7
to pick up for you.

Sebastian

> [1] https://lkml.kernel.org/r/1399839881-29895-1-git-send-email-sebastian.hesselbarth@gmail.com
> [2] https://lkml.kernel.org/r/20140515044106.19795.57249@quantum
> 
> Alexandre Belloni (4):
>   clk: berlin: add driver for BG2x simple PLLs
>   clk: berlin: add driver for BG2x complex divider cells
>   clk: berlin: add core clock driver for BG2Q
>   ARM: dts: berlin: convert BG2Q to DT clock nodes
> 
> Sebastian Hesselbarth (6):
>   dt-binding: ARM: add clock binding docs for Marvell Berlin2 SoCs
>   clk: berlin: add binding include for Berlin SoC clock ids
>   clk: berlin: add driver for BG2x audio/video PLL
>   clk: berlin: add core clock driver for BG2/BG2CD
>   ARM: dts: berlin: convert BG2CD to DT clock nodes
>   ARM: dts: berlin: convert BG2 to DT clock nodes
> 
>  .../devicetree/bindings/arm/marvell,berlin.txt     |  47 ++
>  arch/arm/boot/dts/berlin2.dtsi                     |  56 +-
>  arch/arm/boot/dts/berlin2cd.dtsi                   |  53 +-
>  arch/arm/boot/dts/berlin2q.dtsi                    |  54 +-
>  drivers/clk/Makefile                               |   1 +
>  drivers/clk/berlin/Makefile                        |   4 +
>  drivers/clk/berlin/berlin2-avpll.c                 | 393 ++++++++++++
>  drivers/clk/berlin/berlin2-avpll.h                 |  36 ++
>  drivers/clk/berlin/berlin2-div.c                   | 265 ++++++++
>  drivers/clk/berlin/berlin2-div.h                   |  89 +++
>  drivers/clk/berlin/berlin2-pll.c                   | 117 ++++
>  drivers/clk/berlin/berlin2-pll.h                   |  37 ++
>  drivers/clk/berlin/bg2.c                           | 691 +++++++++++++++++++++
>  drivers/clk/berlin/bg2q.c                          | 389 ++++++++++++
>  drivers/clk/berlin/common.h                        |  29 +
>  include/dt-bindings/clock/berlin2.h                |  45 ++
>  include/dt-bindings/clock/berlin2q.h               |  31 +
>  17 files changed, 2240 insertions(+), 97 deletions(-)
>  create mode 100644 drivers/clk/berlin/Makefile
>  create mode 100644 drivers/clk/berlin/berlin2-avpll.c
>  create mode 100644 drivers/clk/berlin/berlin2-avpll.h
>  create mode 100644 drivers/clk/berlin/berlin2-div.c
>  create mode 100644 drivers/clk/berlin/berlin2-div.h
>  create mode 100644 drivers/clk/berlin/berlin2-pll.c
>  create mode 100644 drivers/clk/berlin/berlin2-pll.h
>  create mode 100644 drivers/clk/berlin/bg2.c
>  create mode 100644 drivers/clk/berlin/bg2q.c
>  create mode 100644 drivers/clk/berlin/common.h
>  create mode 100644 include/dt-bindings/clock/berlin2.h
>  create mode 100644 include/dt-bindings/clock/berlin2q.h
> 
> ---
> Cc: Rob Herring <robh+dt@kernel.org>
> Cc: Pawel Moll <pawel.moll@arm.com>
> Cc: Mark Rutland <mark.rutland@arm.com>
> Cc: Ian Campbell <ijc+devicetree@hellion.org.uk>
> Cc: Kumar Gala <galak@codeaurora.org>
> Cc: Randy Dunlap <rdunlap@infradead.org>
> Cc: Mike Turquette <mturquette@linaro.org>
> Cc: Alexandre Belloni <alexandre.belloni@free-electrons.com>
> Cc: Jisheng Zhang <jszhang@marvell.com>
> Cc: devicetree@vger.kernel.org
> Cc: linux-doc@vger.kernel.org
> Cc: linux-arm-kernel@lists.infradead.org
> Cc: linux-kernel@vger.kernel.org
> 


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

* Re: [PATCH v2 01/10] dt-binding: ARM: add clock binding docs for Marvell Berlin2 SoCs
  2014-05-19 16:43 ` [PATCH v2 01/10] dt-binding: ARM: add clock binding docs for Marvell Berlin2 SoCs Sebastian Hesselbarth
@ 2014-05-19 21:05   ` Alexandre Belloni
  0 siblings, 0 replies; 9+ messages in thread
From: Alexandre Belloni @ 2014-05-19 21:05 UTC (permalink / raw)
  To: Sebastian Hesselbarth
  Cc: Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
	Randy Dunlap, Mike Turquette, Jisheng Zhang, devicetree,
	linux-doc, linux-arm-kernel, linux-kernel

On 19/05/2014 at 18:43:22 +0200, Sebastian Hesselbarth wrote :
> This adds mandatory device tree binding documentation for the clock related
> IP found on Marvell Berlin2 (BG2, BG2CD, and BG2Q) SoCs to the Berlin SoC
> binding documentation.
> 
> Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>

Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
> ---
> Changelog:
> v1->v2:
> - typo fixed (Reported by Alexandre Belloni)
> - reworked binding to not represent individual clocks but chip control
>   IP/registers instead (Suggested by Mike Turquette)
> - dropped clock indices, refer to the include instead (Requested by Mike
>   Turquette)
> - moved the documentation from bindings/clock to Marvell Berlin SoC
>   binding, as there will be more functions (e.g. pinctrl) to describe
> 
> Cc: Rob Herring <robh+dt@kernel.org>
> Cc: Pawel Moll <pawel.moll@arm.com>
> Cc: Mark Rutland <mark.rutland@arm.com>
> Cc: Ian Campbell <ijc+devicetree@hellion.org.uk>
> Cc: Kumar Gala <galak@codeaurora.org>
> Cc: Randy Dunlap <rdunlap@infradead.org>
> Cc: Mike Turquette <mturquette@linaro.org>
> Cc: Alexandre Belloni <alexandre.belloni@free-electrons.com>
> Cc: Jisheng Zhang <jszhang@marvell.com>
> Cc: devicetree@vger.kernel.org
> Cc: linux-doc@vger.kernel.org
> Cc: linux-arm-kernel@lists.infradead.org
> Cc: linux-kernel@vger.kernel.org
> ---
>  .../devicetree/bindings/arm/marvell,berlin.txt     | 47 ++++++++++++++++++++++
>  1 file changed, 47 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/arm/marvell,berlin.txt b/Documentation/devicetree/bindings/arm/marvell,berlin.txt
> index 0677003e1476..744a7ea569d4 100644
> --- a/Documentation/devicetree/bindings/arm/marvell,berlin.txt
> +++ b/Documentation/devicetree/bindings/arm/marvell,berlin.txt
> @@ -23,3 +23,50 @@ SoC and board used. Currently known SoC compatibles are:
>  
>  	...
>  }
> +
> +* Marvell Berlin2 chip control binding
> +
> +Marvell Berlin SoCs have a chip control register set providing several
> +individual registers dealing with pinmux, padmux, clock, reset, and secondary
> +CPU boot address. Unfortunately, the individual registers are spread among the
> +chip control registers, so there should be a single DT node only providing the
> +different functions which are described below.
> +
> +Required properties:
> +- compatible: shall be one of
> +	"marvell,berlin2-chip-ctrl" for BG2
> +	"marvell,berlin2cd-chip-ctrl" for BG2CD
> +	"marvell,berlin2q-chip-ctrl" for BG2Q
> +- reg: address and length of following register sets for
> +  BG2/BG2CD: chip control register set
> +  BG2Q: chip control register set and cpu pll registers
> +
> +* Clock provider binding
> +
> +As clock related registers are spread among the chip control registers, the
> +chip control node also provides the clocks. Marvell Berlin2 (BG2, BG2CD, BG2Q)
> +SoCs share the same IP for PLLs and clocks, with some minor differences in
> +features and register layout.
> +
> +Required properties:
> +- #clock-cells: shall be set to 1
> +- clocks: clock specifiers referencing the core clock input clocks
> +- clock-names: array of strings describing the input clock specifiers above.
> +    Allowed clock-names for the reference clocks are
> +      "refclk" for the SoCs osciallator input on all SoCs,
> +    and SoC-specific input clocks for
> +      BG2/BG2CD: "video_ext0" for the external video clock input
> +
> +Clocks provided by core clocks shall be referenced by a clock specifier
> +indexing one of the provided clocks. Refer to dt-bindings/clock/berlin<soc>.h
> +for the corresponding index mapping.
> +
> +Example:
> +
> +chip: chip-control@ea0000 {
> +	compatible = "marvell,berlin2-chip-ctrl";
> +	#clock-cells = <1>;
> +	reg = <0xea0000 0x400>;
> +	clocks = <&refclk>, <&externaldev 0>;
> +	clock-names = "refclk", "video_ext0";
> +};
> -- 
> 1.9.1
> 

-- 
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

* Re: [PATCH v2 00/10] Marvell Berlin full clock support
  2014-05-19 16:43 [PATCH v2 00/10] Marvell Berlin full clock support Sebastian Hesselbarth
                   ` (2 preceding siblings ...)
  2014-05-19 19:46 ` [PATCH v2 00/10] Marvell Berlin full clock support Sebastian Hesselbarth
@ 2014-05-29  0:07 ` Mike Turquette
  2014-05-29  9:20   ` Sebastian Hesselbarth
  3 siblings, 1 reply; 9+ messages in thread
From: Mike Turquette @ 2014-05-29  0:07 UTC (permalink / raw)
  To: Sebastian Hesselbarth
  Cc: Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
	Randy Dunlap, Alexandre Belloni, Jisheng Zhang, devicetree,
	linux-doc, linux-arm-kernel, linux-kernel

Quoting Sebastian Hesselbarth (2014-05-19 09:43:21)
> Mike,
> 
> this is v2 of the Berlin SoC clock driver [1] but with a reworked DT
> binding as requested [2]. We decided to not even try to split up the chip
> control registers that deal with pinmux, padmux, clock, reset, and evil
> stuff we haven't even looked at. Instead we keep a single node that clock
> driver will remap early, while proper platform_drivers use a regmap
> instead. Although clock and other drivers share the same register range,
> they use individual registers exclusively.
> 
> There are some functional fixes in the single clock drivers, I noticed
> while retesting each individial driver. There will be more to fixup but
> without any drivers actually using the clocks, it is hard to tell what
> isn't working now.
> 
> Anyway, the current binding should match what you requested and having
> a clock driver for v3.16 will really be a huge benefit for us to work
> on more driver support.
> 
> If you are fine with it, please take patches 2-7 and I'll pick up
> 1,8-10 in berlin branch.

Patches #2-7 applied to clk-next.

Thanks!
Mike

> 
> Sebastian
> 
> [1] https://lkml.kernel.org/r/1399839881-29895-1-git-send-email-sebastian.hesselbarth@gmail.com
> [2] https://lkml.kernel.org/r/20140515044106.19795.57249@quantum
> 
> Alexandre Belloni (4):
>   clk: berlin: add driver for BG2x simple PLLs
>   clk: berlin: add driver for BG2x complex divider cells
>   clk: berlin: add core clock driver for BG2Q
>   ARM: dts: berlin: convert BG2Q to DT clock nodes
> 
> Sebastian Hesselbarth (6):
>   dt-binding: ARM: add clock binding docs for Marvell Berlin2 SoCs
>   clk: berlin: add binding include for Berlin SoC clock ids
>   clk: berlin: add driver for BG2x audio/video PLL
>   clk: berlin: add core clock driver for BG2/BG2CD
>   ARM: dts: berlin: convert BG2CD to DT clock nodes
>   ARM: dts: berlin: convert BG2 to DT clock nodes
> 
>  .../devicetree/bindings/arm/marvell,berlin.txt     |  47 ++
>  arch/arm/boot/dts/berlin2.dtsi                     |  56 +-
>  arch/arm/boot/dts/berlin2cd.dtsi                   |  53 +-
>  arch/arm/boot/dts/berlin2q.dtsi                    |  54 +-
>  drivers/clk/Makefile                               |   1 +
>  drivers/clk/berlin/Makefile                        |   4 +
>  drivers/clk/berlin/berlin2-avpll.c                 | 393 ++++++++++++
>  drivers/clk/berlin/berlin2-avpll.h                 |  36 ++
>  drivers/clk/berlin/berlin2-div.c                   | 265 ++++++++
>  drivers/clk/berlin/berlin2-div.h                   |  89 +++
>  drivers/clk/berlin/berlin2-pll.c                   | 117 ++++
>  drivers/clk/berlin/berlin2-pll.h                   |  37 ++
>  drivers/clk/berlin/bg2.c                           | 691 +++++++++++++++++++++
>  drivers/clk/berlin/bg2q.c                          | 389 ++++++++++++
>  drivers/clk/berlin/common.h                        |  29 +
>  include/dt-bindings/clock/berlin2.h                |  45 ++
>  include/dt-bindings/clock/berlin2q.h               |  31 +
>  17 files changed, 2240 insertions(+), 97 deletions(-)
>  create mode 100644 drivers/clk/berlin/Makefile
>  create mode 100644 drivers/clk/berlin/berlin2-avpll.c
>  create mode 100644 drivers/clk/berlin/berlin2-avpll.h
>  create mode 100644 drivers/clk/berlin/berlin2-div.c
>  create mode 100644 drivers/clk/berlin/berlin2-div.h
>  create mode 100644 drivers/clk/berlin/berlin2-pll.c
>  create mode 100644 drivers/clk/berlin/berlin2-pll.h
>  create mode 100644 drivers/clk/berlin/bg2.c
>  create mode 100644 drivers/clk/berlin/bg2q.c
>  create mode 100644 drivers/clk/berlin/common.h
>  create mode 100644 include/dt-bindings/clock/berlin2.h
>  create mode 100644 include/dt-bindings/clock/berlin2q.h
> 
> ---
> Cc: Rob Herring <robh+dt@kernel.org>
> Cc: Pawel Moll <pawel.moll@arm.com>
> Cc: Mark Rutland <mark.rutland@arm.com>
> Cc: Ian Campbell <ijc+devicetree@hellion.org.uk>
> Cc: Kumar Gala <galak@codeaurora.org>
> Cc: Randy Dunlap <rdunlap@infradead.org>
> Cc: Mike Turquette <mturquette@linaro.org>
> Cc: Alexandre Belloni <alexandre.belloni@free-electrons.com>
> Cc: Jisheng Zhang <jszhang@marvell.com>
> Cc: devicetree@vger.kernel.org
> Cc: linux-doc@vger.kernel.org
> Cc: linux-arm-kernel@lists.infradead.org
> Cc: linux-kernel@vger.kernel.org
> -- 
> 1.9.1
> 

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

* Re: [PATCH v2 00/10] Marvell Berlin full clock support
  2014-05-29  0:07 ` Mike Turquette
@ 2014-05-29  9:20   ` Sebastian Hesselbarth
  2014-05-29 16:30     ` Mike Turquette
  0 siblings, 1 reply; 9+ messages in thread
From: Sebastian Hesselbarth @ 2014-05-29  9:20 UTC (permalink / raw)
  To: Mike Turquette
  Cc: Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
	Randy Dunlap, Alexandre Belloni, Jisheng Zhang, devicetree,
	linux-doc, linux-arm-kernel, linux-kernel

On 05/29/2014 02:07 AM, Mike Turquette wrote:
> Quoting Sebastian Hesselbarth (2014-05-19 09:43:21)
>> Mike,
>>
>> this is v2 of the Berlin SoC clock driver [1] but with a reworked DT
>> binding as requested [2]. We decided to not even try to split up the chip
>> control registers that deal with pinmux, padmux, clock, reset, and evil
>> stuff we haven't even looked at. Instead we keep a single node that clock
>> driver will remap early, while proper platform_drivers use a regmap
>> instead. Although clock and other drivers share the same register range,
>> they use individual registers exclusively.
>>
>> There are some functional fixes in the single clock drivers, I noticed
>> while retesting each individial driver. There will be more to fixup but
>> without any drivers actually using the clocks, it is hard to tell what
>> isn't working now.
>>
>> Anyway, the current binding should match what you requested and having
>> a clock driver for v3.16 will really be a huge benefit for us to work
>> on more driver support.
>>
>> If you are fine with it, please take patches 2-7 and I'll pick up
>> 1,8-10 in berlin branch.
> 
> Patches #2-7 applied to clk-next.

Thanks Mike, but please drop patch #2
  ("clk: berlin: add binding include for Berlin SoC clock ids")
before you push your clk-next branch, it already went through arm-soc.

Sorry,
  Sebastian

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

* Re: [PATCH v2 00/10] Marvell Berlin full clock support
  2014-05-29  9:20   ` Sebastian Hesselbarth
@ 2014-05-29 16:30     ` Mike Turquette
  0 siblings, 0 replies; 9+ messages in thread
From: Mike Turquette @ 2014-05-29 16:30 UTC (permalink / raw)
  To: Sebastian Hesselbarth
  Cc: Mark Rutland, Jisheng Zhang, Pawel Moll, Ian Campbell,
	Randy Dunlap, linux-doc, linux-kernel, devicetree, Rob Herring,
	Alexandre Belloni, Kumar Gala, linux-arm-kernel

Quoting Sebastian Hesselbarth (2014-05-29 02:20:03)
> On 05/29/2014 02:07 AM, Mike Turquette wrote:
> > Quoting Sebastian Hesselbarth (2014-05-19 09:43:21)
> >> Mike,
> >>
> >> this is v2 of the Berlin SoC clock driver [1] but with a reworked DT
> >> binding as requested [2]. We decided to not even try to split up the chip
> >> control registers that deal with pinmux, padmux, clock, reset, and evil
> >> stuff we haven't even looked at. Instead we keep a single node that clock
> >> driver will remap early, while proper platform_drivers use a regmap
> >> instead. Although clock and other drivers share the same register range,
> >> they use individual registers exclusively.
> >>
> >> There are some functional fixes in the single clock drivers, I noticed
> >> while retesting each individial driver. There will be more to fixup but
> >> without any drivers actually using the clocks, it is hard to tell what
> >> isn't working now.
> >>
> >> Anyway, the current binding should match what you requested and having
> >> a clock driver for v3.16 will really be a huge benefit for us to work
> >> on more driver support.
> >>
> >> If you are fine with it, please take patches 2-7 and I'll pick up
> >> 1,8-10 in berlin branch.
> > 
> > Patches #2-7 applied to clk-next.
> 
> Thanks Mike, but please drop patch #2
>   ("clk: berlin: add binding include for Berlin SoC clock ids")
> before you push your clk-next branch, it already went through arm-soc.

Thanks for the heads-up. I've dropped the patch.

Regards,
Mike

> 
> Sorry,
>   Sebastian

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

end of thread, other threads:[~2014-05-29 16:30 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-19 16:43 [PATCH v2 00/10] Marvell Berlin full clock support Sebastian Hesselbarth
2014-05-19 16:43 ` [PATCH v2 01/10] dt-binding: ARM: add clock binding docs for Marvell Berlin2 SoCs Sebastian Hesselbarth
2014-05-19 21:05   ` Alexandre Belloni
2014-05-19 16:43 ` [PATCH v2 02/10] clk: berlin: add binding include for Berlin SoC clock ids Sebastian Hesselbarth
2014-05-19 19:46 ` [PATCH v2 00/10] Marvell Berlin full clock support Sebastian Hesselbarth
2014-05-29  0:07 ` Mike Turquette
2014-05-29  9:20   ` Sebastian Hesselbarth
2014-05-29 16:30     ` Mike Turquette
  -- strict thread matches above, loose matches on Subject: below --
2014-05-11 20:24 [PATCH 0/8] " Sebastian Hesselbarth
2014-05-14 20:15 ` [PATCH v2 00/10] " Sebastian Hesselbarth

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