Skip to contentSkip to conversation

dt-bindings: Add pxa1928 clock binding

PATCH Superseded Rob Herring 2 participants 6 messages May 1, 2015 – May 7, 2015

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Rob Herring

author maintainer
#0 lore raw

PATCH 1/2 dt-bindings: Add pxa1928 clock binding

This adds the clock binding documentation for the Marvell PXA1928 SOC. The PXA1928 has 3 clock control blocks for different subsystems of the chip.

Cc Pawel Moll <[email protected]>
Cc Mark Rutland <[email protected]>
Cc Ian Campbell <[email protected]>
Cc Kumar Gala <[email protected]>
---
 .../devicetree/bindings/clock/marvell,pxa1928.txt  | 21 ++++++++
 include/dt-bindings/clock/marvell,pxa1928.h        | 57 ++++++++++++++++++++++
 2 files changed, 78 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/clock/marvell,pxa1928.txt
 create mode 100644 include/dt-bindings/clock/marvell,pxa1928.h
Documentation/devicetree/bindings/clock/marvell,pxa1928.txt new file +21 -0
new file mode 100644
index 0000000..809c5a2
@@ -0,0 +1,21 @@
+* Marvell PXA1928 Clock Controllers
+
+The PXA1928 clock subsystem generates and supplies clock to various
+controllers within the PXA1928 SoC. The PXA1928 contains 3 clock controller
+blocks called APMU, MPMU, and APBC roughly corresponding to internal buses.
+
+Required Properties:
+
+- compatible: should be one of the following.
+  - "marvell,pxa1928-apmu" - APMU controller compatible
+  - "marvell,pxa1928-mpmu" - MPMU controller compatible
+  - "marvell,pxa1928-apbc" - APBC controller compatible
+- reg: physical base address of the clock controller and length of memory mapped
+  region.
+- #clock-cells: should be 1.
+- #reset-cells: should be 1.
+
+Each clock is assigned an identifier and client nodes use the clock controller
+phandle and this identifier to specify the clock which they consume.
+
+All these identifiers can be found in <dt-bindings/clock/marvell,pxa1928.h>.
include/dt-bindings/clock/marvell,pxa1928.h new file +57 -0

57 lines not on this page · raw message

Signature · 1 line
2.1.0
author maintainer
#1 lore raw

PATCH 2/2 clk: mmp: add PXA1928 clock support

Add initial clock support for Marvell PXA1928. The PXA1928 is a mobile SOC and is similar to other MMP/PXA series of SOCs, so a lot of the existing infrastructure is reused here.

Currently the PLLs are just fixed clocks, and not all leaf clocks are implemented.

Cc Mike Turquette <[email protected]>
Cc Stephen Boyd <[email protected]>
---
 drivers/clk/mmp/Makefile         |   2 +
 drivers/clk/mmp/clk-of-pxa1928.c | 265 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 267 insertions(+)
 create mode 100644 drivers/clk/mmp/clk-of-pxa1928.c
drivers/clk/mmp/Makefile +2 -0
index 3caaf7c..9d4bc41 100644
@@ -12,3 +12,5 @@ obj-$(CONFIG_MACH_MMP2_DT) += clk-of-mmp2.o
 obj-$(CONFIG_CPU_PXA168) += clk-pxa168.o
 obj-$(CONFIG_CPU_PXA910) += clk-pxa910.o
 obj-$(CONFIG_CPU_MMP2) += clk-mmp2.o
+
+obj-y += clk-of-pxa1928.o
drivers/clk/mmp/clk-of-pxa1928.c new file +265 -0

265 lines not on this page · raw message

Signature · 1 line
2.1.0
#3 lore raw
In reply to Rob Herring
Quoted 17 lines · Rob Herring
Documentation/devicetree/bindings/clock/marvell,pxa1928.txt new file +11 -0
new file mode 100644
index 0000000..809c5a2
@@ -0,0 +1,21 @@
+* Marvell PXA1928 Clock Controllers
+
+The PXA1928 clock subsystem generates and supplies clock to various
+controllers within the PXA1928 SoC. The PXA1928 contains 3 clock controller
+blocks called APMU, MPMU, and APBC roughly corresponding to internal buses.
+
+Required Properties:
+
+- compatible: should be one of the following.
+  - "marvell,pxa1928-apmu" - APMU controller compatible
+  - "marvell,pxa1928-mpmu" - MPMU controller compatible

Documentation/devicetree/bindings/clock/marvell,pxa1928.txt line 21

Quoted 10 lines
Documentation/devicetree/bindings/clock/marvell,pxa1928.txt new file +10 -0
+  - "marvell,pxa1928-apbc" - APBC controller compatible
+- reg: physical base address of the clock controller and length of memory mapped
+  region.
+- #clock-cells: should be 1.
+- #reset-cells: should be 1.
+
+Each clock is assigned an identifier and client nodes use the clock controller
+phandle and this identifier to specify the clock which they consume.
+
+All these identifiers can be found in <dt-bindings/clock/marvell,pxa1928.h>.

No example?

Quoted 6 lines
include/dt-bindings/clock/marvell,pxa1928.h new file +0 -0
new file mode 100644
index 0000000..c393ca2

include/dt-bindings/clock/marvell,pxa1928.h line 8

Quoted 8 lines
include/dt-bindings/clock/marvell,pxa1928.h new file +8 -0
@@ -0,0 +1,57 @@
+#ifndef __DTS_MARVELL_PXA1928_CLOCK_H
+#define __DTS_MARVELL_PXA1928_CLOCK_H
+
+/*
+ * Clock ID values here correspond to the control register offset/4.
+ */
+
+/* apb periphrals */

s/periphrals/peripherals/ ?

include/dt-bindings/clock/marvell,pxa1928.h line 18

Quoted 10 lines
include/dt-bindings/clock/marvell,pxa1928.h new file +10 -0
+#define PXA1928_CLK_RTC			0
+#define PXA1928_CLK_TWSI0		1
+#define PXA1928_CLK_TWSI1		2
+#define PXA1928_CLK_TWSI2		3
+#define PXA1928_CLK_TWSI3		4
+#define PXA1928_CLK_OWIRE		5
+#define PXA1928_CLK_KPC			6
+#define PXA1928_CLK_TB_ROTARY		7
+#define PXA1928_CLK_SW_JTAG		8
+#define PXA1928_CLK_TIMER1		9

This is really nitpicky, but I find the jump from decimal to hex odd. Is there any reason why we don't just use decimal or hex throughout? Perhaps it's related to why there are holes in the number space?

Quoted 13 lines
include/dt-bindings/clock/marvell,pxa1928.h new file +13 -0
+#define PXA1928_CLK_UART0		0xb
+#define PXA1928_CLK_UART1		0xc
+#define PXA1928_CLK_UART2		0xd
+#define PXA1928_CLK_GPIO		0xe
+#define PXA1928_CLK_PWM0		0xf
+#define PXA1928_CLK_PWM1		0x10
+#define PXA1928_CLK_PWM2		0x11
+#define PXA1928_CLK_PWM3		0x12
+#define PXA1928_CLK_SSP0		0x13
+#define PXA1928_CLK_SSP1		0x14
+#define PXA1928_CLK_SSP2		0x15
+
+#define PXA1928_CLK_TWSI4		0x1f

include/dt-bindings/clock/marvell,pxa1928.h line 41

Quoted 10 lines
include/dt-bindings/clock/marvell,pxa1928.h new file +10 -0
+#define PXA1928_CLK_TWSI5		0x20
+#define PXA1928_CLK_UART3		0x22
+#define PXA1928_CLK_THSENS_GLOB		0x24
+#define PXA1928_CLK_THSENS_CPU		0x26
+#define PXA1928_CLK_THSENS_VPU		0x27
+#define PXA1928_CLK_THSENS_GC		0x28
+#define PXA1928_APBC_NR_CLKS		0x30
+
+
+/* axi periphrals */

s/periphrals/peripherals/ ?

Quoted 16 lines
include/dt-bindings/clock/marvell,pxa1928.h new file +16 -0
+#define PXA1928_CLK_SDH0		0x15
+#define PXA1928_CLK_SDH1		0x16
+#define PXA1928_CLK_USB			0x17
+#define PXA1928_CLK_NAND		0x18
+#define PXA1928_CLK_DMA			0x19
+
+#define PXA1928_CLK_SDH2		0x3a
+#define PXA1928_CLK_SDH3		0x3b
+#define PXA1928_CLK_HSIC		0x3e
+#define PXA1928_CLK_SDH4		0x57
+#define PXA1928_CLK_GC3D		0x5d
+#define PXA1928_CLK_GC2D		0x5f
+
+#define PXA1928_APMU_NR_CLKS		0x60
+
+#endif
Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
#2 lore raw

Re: [PATCH 2/2] clk: mmp: add PXA1928 clock support

In reply to Rob Herring
Quoted 6 lines · Rob Herring
drivers/clk/mmp/clk-of-pxa1928.c new file +0 -0
new file mode 100644
index 0000000..b7cb540b

drivers/clk/mmp/clk-of-pxa1928.c line 10

Quoted 10 lines
drivers/clk/mmp/clk-of-pxa1928.c new file +10 -0
@@ -0,0 +1,265 @@
+/*
+ * pxa1928 clock framework source file
+ *
+ * Copyright (C) 2015 Linaro, Ltd.
+ * Rob Herring <[email protected]>
+ *
+ * Based on drivers/clk/mmp/clk-of-mmp2.c:
+ * Copyright (C) 2012 Marvell
+ * Chao Xie <[email protected]>
+ *

Any reason to leave Chao off Cc?

drivers/clk/mmp/clk-of-pxa1928.c line 15

Quoted 5 lines
drivers/clk/mmp/clk-of-pxa1928.c new file +5 -0
+ * This file is licensed under the terms of the GNU General Public
+ * License version 2. This program is licensed "as is" without any
+ * warranty of any kind, whether express or implied.
+ */
+#include <linux/module.h>

This include is unused?

drivers/clk/mmp/clk-of-pxa1928.c line 19

Quoted 4 lines
drivers/clk/mmp/clk-of-pxa1928.c new file +4 -0
+#include <linux/kernel.h>
+#include <linux/spinlock.h>
+#include <linux/io.h>
+#include <linux/of_address.h>

#include <linux/slab.h> ?

drivers/clk/mmp/clk-of-pxa1928.c line 22

Quoted 3 lines
drivers/clk/mmp/clk-of-pxa1928.c new file +3 -0
+
+#include <dt-bindings/clock/marvell,pxa1928.h>
+

Otherwise looks ok to me.

Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
author maintainer
#4 lore raw
In reply to Stephen Boyd
Quoted 22 lines · Stephen Boyd
Quoted 21 lines · Rob Herring
Documentation/devicetree/bindings/clock/marvell,pxa1928.txt new file +15 -0
new file mode 100644
index 0000000..809c5a2
@@ -0,0 +1,21 @@
+* Marvell PXA1928 Clock Controllers
+
+The PXA1928 clock subsystem generates and supplies clock to various
+controllers within the PXA1928 SoC. The PXA1928 contains 3 clock controller
+blocks called APMU, MPMU, and APBC roughly corresponding to internal buses.
+
+Required Properties:
+
+- compatible: should be one of the following.
+  - "marvell,pxa1928-apmu" - APMU controller compatible
+  - "marvell,pxa1928-mpmu" - MPMU controller compatible
+  - "marvell,pxa1928-apbc" - APBC controller compatible
+- reg: physical base address of the clock controller and length of memory mapped
+  region.
+- #clock-cells: should be 1.
Quoted 8 lines

Documentation/devicetree/bindings/clock/marvell,pxa1928.txt line 21

Quoted 6 lines
Documentation/devicetree/bindings/clock/marvell,pxa1928.txt new file +6 -0
+- #reset-cells: should be 1.
+
+Each clock is assigned an identifier and client nodes use the clock controller
+phandle and this identifier to specify the clock which they consume.
+
+All these identifiers can be found in <dt-bindings/clock/marvell,pxa1928.h>.

No example?

There's nothing really special about this binding to show.

Quoted 8 lines
Quoted 8 lines
include/dt-bindings/clock/marvell,pxa1928.h new file +2 -0
new file mode 100644
index 0000000..c393ca2
@@ -0,0 +1,57 @@
+#ifndef __DTS_MARVELL_PXA1928_CLOCK_H
+#define __DTS_MARVELL_PXA1928_CLOCK_H
Quoted 8 lines

include/dt-bindings/clock/marvell,pxa1928.h line 8

Quoted 6 lines
include/dt-bindings/clock/marvell,pxa1928.h new file +6 -0
+
+/*
+ * Clock ID values here correspond to the control register offset/4.
+ */
+
+/* apb periphrals */

s/periphrals/peripherals/ ?

Uhh, cut-n-paste from marvell,mmp2.h...

Quoted 15 lines

include/dt-bindings/clock/marvell,pxa1928.h line 18

Quoted 11 lines
include/dt-bindings/clock/marvell,pxa1928.h new file +10 -0
+#define PXA1928_CLK_RTC                      0
+#define PXA1928_CLK_TWSI0            1
+#define PXA1928_CLK_TWSI1            2
+#define PXA1928_CLK_TWSI2            3
+#define PXA1928_CLK_TWSI3            4
+#define PXA1928_CLK_OWIRE            5
+#define PXA1928_CLK_KPC                      6
+#define PXA1928_CLK_TB_ROTARY                7
+#define PXA1928_CLK_SW_JTAG          8
+#define PXA1928_CLK_TIMER1           9

This is really nitpicky, but I find the jump from decimal to hex odd. Is there any reason why we don't just use decimal or hex throughout? Perhaps it's related to why there are holes in the number space?

What is 9 in hex? ;) I'll prefix them. It's hard to convert decimal to register values.

Quoted 1 line

include/dt-bindings/clock/marvell,pxa1928.h line 19

Quoted 1 line
include/dt-bindings/clock/marvell,pxa1928.h new file +1 -0
+#define PXA1928_CLK_UART0            0xb

Rob

#5 lore raw
Quoted 30 lines · Rob Herring
Quoted 21 lines · Stephen Boyd
Quoted 20 lines · Rob Herring
Documentation/devicetree/bindings/clock/marvell,pxa1928.txt new file +14 -0
new file mode 100644
index 0000000..809c5a2
@@ -0,0 +1,21 @@
+* Marvell PXA1928 Clock Controllers
+
+The PXA1928 clock subsystem generates and supplies clock to various
+controllers within the PXA1928 SoC. The PXA1928 contains 3 clock controller
+blocks called APMU, MPMU, and APBC roughly corresponding to internal buses.
+
+Required Properties:
+
+- compatible: should be one of the following.
+  - "marvell,pxa1928-apmu" - APMU controller compatible
+  - "marvell,pxa1928-mpmu" - MPMU controller compatible
+  - "marvell,pxa1928-apbc" - APBC controller compatible
+- reg: physical base address of the clock controller and length of memory mapped
+  region.
Quoted 8 lines

Documentation/devicetree/bindings/clock/marvell,pxa1928.txt line 21

Quoted 7 lines
Documentation/devicetree/bindings/clock/marvell,pxa1928.txt new file +7 -0
+- #clock-cells: should be 1.
+- #reset-cells: should be 1.
+
+Each clock is assigned an identifier and client nodes use the clock controller
+phandle and this identifier to specify the clock which they consume.
+
+All these identifiers can be found in <dt-bindings/clock/marvell,pxa1928.h>.

No example?

Quoted 1 line

There's nothing really special about this binding to show.

Ok.

Quoted 30 lines
Quoted 16 lines
Quoted 7 lines
include/dt-bindings/clock/marvell,pxa1928.h new file +0 -0
new file mode 100644
index 0000000..c393ca2

include/dt-bindings/clock/marvell,pxa1928.h line 8

Quoted 8 lines
include/dt-bindings/clock/marvell,pxa1928.h new file +8 -0
@@ -0,0 +1,57 @@
+#ifndef __DTS_MARVELL_PXA1928_CLOCK_H
+#define __DTS_MARVELL_PXA1928_CLOCK_H
+
+/*
+ * Clock ID values here correspond to the control register offset/4.
+ */
+
+/* apb periphrals */

s/periphrals/peripherals/ ?

Uhh, cut-n-paste from marvell,mmp2.h...

Quoted 5 lines
Quoted 5 lines
include/dt-bindings/clock/marvell,pxa1928.h new file +5 -0
+#define PXA1928_CLK_RTC                      0
+#define PXA1928_CLK_TWSI0            1
+#define PXA1928_CLK_TWSI1            2
+#define PXA1928_CLK_TWSI2            3
+#define PXA1928_CLK_TWSI3            4
Quoted 8 lines

include/dt-bindings/clock/marvell,pxa1928.h line 18

Quoted 5 lines
include/dt-bindings/clock/marvell,pxa1928.h new file +5 -0
+#define PXA1928_CLK_OWIRE            5
+#define PXA1928_CLK_KPC                      6
+#define PXA1928_CLK_TB_ROTARY                7
+#define PXA1928_CLK_SW_JTAG          8
+#define PXA1928_CLK_TIMER1           9

This is really nitpicky, but I find the jump from decimal to hex odd. Is there any reason why we don't just use decimal or hex throughout? Perhaps it's related to why there are holes in the number space?

Quoted 3 lines

What is 9 in hex? ;) I'll prefix them. It's hard to convert decimal to register values.

:) Thanks.

Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project