Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1222414 > unrolled thread

BCM2835 auxiliary peripheral clocks.

Started byEric Anholt <eric@anholt.net>
First post2015-09-11 00:30 +0200
Last post2015-09-11 00:30 +0200
Articles 7 — 2 participants

Back to article view | Back to linux.kernel


Contents

  BCM2835 auxiliary peripheral clocks. Eric Anholt <eric@anholt.net> - 2015-09-11 00:30 +0200
    [PATCH 3/3] ARM: bcm2835: Add the auxiliary clocks to the device tree. Eric Anholt <eric@anholt.net> - 2015-09-11 00:30 +0200
      Re: [PATCH 3/3] ARM: bcm2835: Add the auxiliary clocks to the device  tree. Stephen Warren <swarren@wwwdotorg.org> - 2015-09-22 04:20 +0200
        Re: [PATCH 3/3] ARM: bcm2835: Add the auxiliary clocks to the device tree. Eric Anholt <eric@anholt.net> - 2015-09-28 21:30 +0200
          Re: [PATCH 3/3] ARM: bcm2835: Add the auxiliary clocks to the device  tree. Stephen Warren <swarren@wwwdotorg.org> - 2015-09-28 21:50 +0200
      Re: [PATCH 3/3] ARM: bcm2835: Add the auxiliary clocks to the device  tree. Stephen Warren <swarren@wwwdotorg.org> - 2015-09-22 04:20 +0200
    [PATCH 1/3] clk: bcm2835: Add bindings for the auxiliary peripheral clock gates. Eric Anholt <eric@anholt.net> - 2015-09-11 00:30 +0200

#1222414 — BCM2835 auxiliary peripheral clocks.

FromEric Anholt <eric@anholt.net>
Date2015-09-11 00:30 +0200
SubjectBCM2835 auxiliary peripheral clocks.
Message-ID<q7ivU-6Gg-13@gated-at.bofh.it>
This is a followup to the main audio domain clocks series I just
posted.  There's a clock gate register controlling the clocks for a
few extra peripherals, and Martin Sperl has been working on the SPI
driver for 2/3 of them (the other is a simple UART).  This gives those
drivers the clock gate enable they need to access their registers.

The full series is available for testing at:

https://github.com/anholt/linux/tree/bcm2385-clock-aux

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1222418 — [PATCH 3/3] ARM: bcm2835: Add the auxiliary clocks to the device tree.

FromEric Anholt <eric@anholt.net>
Date2015-09-11 00:30 +0200
Subject[PATCH 3/3] ARM: bcm2835: Add the auxiliary clocks to the device tree.
Message-ID<q7ivV-6Gg-37@gated-at.bofh.it>
In reply to#1222414
These will be used for enabling UART1, SPI1, and SPI2.

Signed-off-by: Eric Anholt <eric@anholt.net>
---
 arch/arm/boot/dts/bcm2835.dtsi | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/arch/arm/boot/dts/bcm2835.dtsi b/arch/arm/boot/dts/bcm2835.dtsi
index a6a55b7..7c37956 100644
--- a/arch/arm/boot/dts/bcm2835.dtsi
+++ b/arch/arm/boot/dts/bcm2835.dtsi
@@ -73,6 +73,13 @@
 			clocks = <&clk_osc>;
 		};
 
+		aux_clocks: aux-clocks@0x7e215004 {
+			compatible = "brcm,bcm2835-aux-clock";
+			#clock-cells = <1>;
+			reg = <0x7e215004 0x4>;
+			clocks = <&clocks BCM2835_CLOCK_VPU>;
+		};
+
 		rng@7e104000 {
 			compatible = "brcm,bcm2835-rng";
 			reg = <0x7e104000 0x10>;
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1229880 — Re: [PATCH 3/3] ARM: bcm2835: Add the auxiliary clocks to the device tree.

FromStephen Warren <swarren@wwwdotorg.org>
Date2015-09-22 04:20 +0200
SubjectRe: [PATCH 3/3] ARM: bcm2835: Add the auxiliary clocks to the device tree.
Message-ID<qbllv-8sA-1@gated-at.bofh.it>
In reply to#1222418
On 09/10/2015 03:22 PM, Eric Anholt wrote:
> These will be used for enabling UART1, SPI1, and SPI2.

> diff --git a/arch/arm/boot/dts/bcm2835.dtsi b/arch/arm/boot/dts/bcm2835.dtsi

> +		aux_clocks: aux-clocks@0x7e215004 {
> +			compatible = "brcm,bcm2835-aux-clock";
> +			#clock-cells = <1>;
> +			reg = <0x7e215004 0x4>;

Actually, I take back the ack on this patch. This HW module has two
registers. The reg property should include both of those registers so
that if SW needs to start using the other register at some time in the
future, the entire set of registers is already represented in DT.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1234370 — Re: [PATCH 3/3] ARM: bcm2835: Add the auxiliary clocks to the device tree.

FromEric Anholt <eric@anholt.net>
Date2015-09-28 21:30 +0200
SubjectRe: [PATCH 3/3] ARM: bcm2835: Add the auxiliary clocks to the device tree.
Message-ID<qdMhA-gH-33@gated-at.bofh.it>
In reply to#1229880

[Multipart message — attachments visible in raw view] — view raw

Stephen Warren <swarren@wwwdotorg.org> writes:

> On 09/10/2015 03:22 PM, Eric Anholt wrote:
>> These will be used for enabling UART1, SPI1, and SPI2.
>
>> diff --git a/arch/arm/boot/dts/bcm2835.dtsi b/arch/arm/boot/dts/bcm2835.dtsi
>
>> +		aux_clocks: aux-clocks@0x7e215004 {
>> +			compatible = "brcm,bcm2835-aux-clock";
>> +			#clock-cells = <1>;
>> +			reg = <0x7e215004 0x4>;
>
> Actually, I take back the ack on this patch. This HW module has two
> registers. The reg property should include both of those registers so
> that if SW needs to start using the other register at some time in the
> future, the entire set of registers is already represented in DT.

If I changed it to "reg = <0x7e215000 0x8>" and use a #define for the
clock register offset in patch 2/3, would I then have your ack?

[toc] | [prev] | [next] | [standalone]


#1234396 — Re: [PATCH 3/3] ARM: bcm2835: Add the auxiliary clocks to the device tree.

FromStephen Warren <swarren@wwwdotorg.org>
Date2015-09-28 21:50 +0200
SubjectRe: [PATCH 3/3] ARM: bcm2835: Add the auxiliary clocks to the device tree.
Message-ID<qdMAW-Dy-23@gated-at.bofh.it>
In reply to#1234370
On 09/28/2015 01:26 PM, Eric Anholt wrote:
> Stephen Warren <swarren@wwwdotorg.org> writes:
>
>> On 09/10/2015 03:22 PM, Eric Anholt wrote:
>>> These will be used for enabling UART1, SPI1, and SPI2.
>>
>>> diff --git a/arch/arm/boot/dts/bcm2835.dtsi b/arch/arm/boot/dts/bcm2835.dtsi
>>
>>> +		aux_clocks: aux-clocks@0x7e215004 {
>>> +			compatible = "brcm,bcm2835-aux-clock";
>>> +			#clock-cells = <1>;
>>> +			reg = <0x7e215004 0x4>;
>>
>> Actually, I take back the ack on this patch. This HW module has two
>> registers. The reg property should include both of those registers so
>> that if SW needs to start using the other register at some time in the
>> future, the entire set of registers is already represented in DT.
>
> If I changed it to "reg = <0x7e215000 0x8>" and use a #define for the
> clock register offset in patch 2/3, would I then have your ack?

I suspect the compatible should then be "brcm,bcm2835-aux" (or similar) 
since the node would represent the entire aux module, not just the clock 
gate feature of the module (assuming there are other features in the aux 
module besides just the clock gate).

With the reg change and the compatible change if appropriate, you can 
have my ack,
Acked-by: Stephen Warren <swarren@wwwdotorg.org>

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1229882 — Re: [PATCH 3/3] ARM: bcm2835: Add the auxiliary clocks to the device tree.

FromStephen Warren <swarren@wwwdotorg.org>
Date2015-09-22 04:20 +0200
SubjectRe: [PATCH 3/3] ARM: bcm2835: Add the auxiliary clocks to the device tree.
Message-ID<qbllv-8sA-5@gated-at.bofh.it>
In reply to#1222418
On 09/10/2015 03:22 PM, Eric Anholt wrote:
> These will be used for enabling UART1, SPI1, and SPI2.

Patches 1, 3,
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1222419 — [PATCH 1/3] clk: bcm2835: Add bindings for the auxiliary peripheral clock gates.

FromEric Anholt <eric@anholt.net>
Date2015-09-11 00:30 +0200
Subject[PATCH 1/3] clk: bcm2835: Add bindings for the auxiliary peripheral clock gates.
Message-ID<q7ivV-6Gg-41@gated-at.bofh.it>
In reply to#1222414
These will be used for enabling UART1, SPI1, and SPI2.

Signed-off-by: Eric Anholt <eric@anholt.net>
---
 .../bindings/clock/brcm,bcm2835-aux-clock.txt      | 30 ++++++++++++++++++++++
 include/dt-bindings/clock/bcm2835-aux.h            | 17 ++++++++++++
 2 files changed, 47 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/clock/brcm,bcm2835-aux-clock.txt
 create mode 100644 include/dt-bindings/clock/bcm2835-aux.h

diff --git a/Documentation/devicetree/bindings/clock/brcm,bcm2835-aux-clock.txt b/Documentation/devicetree/bindings/clock/brcm,bcm2835-aux-clock.txt
new file mode 100644
index 0000000..f5ce80a
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/brcm,bcm2835-aux-clock.txt
@@ -0,0 +1,30 @@
+Broadcom BCM2835 auxiliary peripheral clocks
+
+This binding uses the common clock binding:
+    Documentation/devicetree/bindings/clock/clock-bindings.txt
+
+This controls the clock gating for the BCM2835 auxiliary peripherals
+(UART, SPI1, and SPI2).
+
+Required properties:
+- compatible:	Should be "brcm,bcm2835-aux-clock"
+- #clock-cells:	Should be <1>. The permitted clock-specifier values can be
+		  found in include/dt-bindings/clock/bcm2835-aux.h
+- reg:		Specifies base physical address and size of the gate register
+- clocks:	The parent clock phandle
+
+Example:
+
+	clocks: cprman@7e101000 {
+		compatible = "brcm,bcm2835-cprman";
+		#clock-cells = <1>;
+		reg = <0x7e101000 0x2000>;
+		clocks = <&clk_osc>;
+	};
+
+	aux_clocks: aux-clocks@0x7e215004 {
+		compatible = "brcm,bcm2835-aux-clock";
+		#clock-cells = <1>;
+		reg = <0x7e215004 0x4>;
+		clocks = <&clocks BCM2835_CLOCK_VPU>;
+	};
diff --git a/include/dt-bindings/clock/bcm2835-aux.h b/include/dt-bindings/clock/bcm2835-aux.h
new file mode 100644
index 0000000..d91156e
--- /dev/null
+++ b/include/dt-bindings/clock/bcm2835-aux.h
@@ -0,0 +1,17 @@
+/*
+ * Copyright (C) 2015 Broadcom Corporation
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation version 2.
+ *
+ * This program is distributed "as is" WITHOUT ANY WARRANTY of any
+ * kind, whether express or implied; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+#define BCM2835_AUX_CLOCK_UART		0
+#define BCM2835_AUX_CLOCK_SPI1		1
+#define BCM2835_AUX_CLOCK_SPI2		2
+#define BCM2835_AUX_CLOCK_COUNT		3
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web