[PATCH 2/2] clk: bcm2835: Add PWM clock support
Stefan Wahren
info at lategoodbye.de
Sat Nov 28 04:15:07 PST 2015
Hi Remi,
here are my comments before you submit a new version of the devicetree
changes.
Am 05.11.2015 um 03:17 schrieb Eric Anholt:
> Remi Pommarel <repk at triplefau.lt> writes:
>
>> Register the pwm clock for bcm2835.
>> This patch also adds the ability to set a clock default rate.
>
> I don't think we should be setting a default clock rate. That should be
> up to the thing that uses the clock. If we need a standard rate set on
> all Raspberry Pis, other than what is set at boot, then we could put it
> in the bcm2835-pwm dt block (I think the "Assigned clock parents and
> rates" part of clock-bindings.txt gives a way to do so).
>
>> Signed-off-by: Remi Pommarel <repk at triplefau.lt>
>> ---
>> arch/arm/boot/dts/bcm2835.dtsi | 8 ++++++++
>> drivers/clk/bcm/clk-bcm2835.c | 28 +++++++++++++++++++++++++++-
>> include/dt-bindings/clock/bcm2835.h | 3 ++-
>> 3 files changed, 37 insertions(+), 2 deletions(-)
>
> Submitting DT changes is super awkward. You'd need to put the bcm2835.h
> and driver change in one patch with this subject. The clk maintainers
> would pull that patch. You'd then have a second patch that covers just
> the .dtsi change, which I would pull once I had a stable branch to put
> it onto that had the bcm2835.h change.
>
>> diff --git a/arch/arm/boot/dts/bcm2835.dtsi b/arch/arm/boot/dts/bcm2835.dtsi
>> index aef64de..0736de3 100644
>> --- a/arch/arm/boot/dts/bcm2835.dtsi
>> +++ b/arch/arm/boot/dts/bcm2835.dtsi
>> @@ -177,6 +177,14 @@
>> status = "disabled";
>> };
>>
>> + pwm: pwm at 7e20c000 {
Please take care of the order. All nodes should be ordered by register
address.
>> + compatible = "brcm,bcm2835-pwm";
>> + reg = <0x7e20c000 0x28>;
>> + clocks = <&clocks BCM2835_CLOCK_PWM>;
>> + #address-cells = <1>;
>> + #size-cells = <0>;
According to Documentation/devicetree/bindings/pwm/pwm-bcm2835.txt there
is no need for address-cells and size-cells, but it misses pwm-cells.
Additionally it would be necessary to disable the status.
Best regards
Stefan
>> + };
>> +
>> usb at 7e980000 {
>> compatible = "brcm,bcm2835-usb";
>> reg = <0x7e980000 0x10000>;
>
More information about the linux-rpi-kernel
mailing list