diff mbox

[3/3] ARM: bcm2835: Add the auxiliary clocks to the device tree.

Message ID 1441923750-19404-4-git-send-email-eric@anholt.net (mailing list archive)
State New, archived
Headers show

Commit Message

Eric Anholt Sept. 10, 2015, 10:22 p.m. UTC
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(+)

Comments

Stephen Warren Sept. 22, 2015, 2:12 a.m. UTC | #1
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>
Stephen Warren Sept. 22, 2015, 2:19 a.m. UTC | #2
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.
Eric Anholt Sept. 28, 2015, 7:26 p.m. UTC | #3
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?
Stephen Warren Sept. 28, 2015, 7:49 p.m. UTC | #4
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>
diff mbox

Patch

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>;