diff mbox

[1/2] dt-bindings: Add mtk-systimer bindings

Message ID 1529910601-15005-2-git-send-email-stanley.chu@mediatek.com (mailing list archive)
State New, archived
Headers show

Commit Message

Stanley Chu June 25, 2018, 7:10 a.m. UTC
Add binding documentation for the System Timer driver of
the Mediatek SoCs.

Signed-off-by: Stanley Chu <stanley.chu@mediatek.com>
---
 .../bindings/timer/mediatek,mtk-systimer.txt       |   18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/timer/mediatek,mtk-systimer.txt

Comments

Daniel Lezcano June 25, 2018, 9:53 p.m. UTC | #1
On 25/06/2018 09:10, Stanley Chu wrote:
> Add binding documentation for the System Timer driver of
> the Mediatek SoCs.
> 
> Signed-off-by: Stanley Chu <stanley.chu@mediatek.com>
> ---
>  .../bindings/timer/mediatek,mtk-systimer.txt       |   18 ++++++++++++++++++
>  1 file changed, 18 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/timer/mediatek,mtk-systimer.txt
> 
> diff --git a/Documentation/devicetree/bindings/timer/mediatek,mtk-systimer.txt b/Documentation/devicetree/bindings/timer/mediatek,mtk-systimer.txt
> new file mode 100644
> index 0000000..735a6fd
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/timer/mediatek,mtk-systimer.txt
> @@ -0,0 +1,18 @@
> +Mediatek System Timers
> +----------------------
> +
> +Required properties:
> +- compatible: should contain
> +	"mediatek,sys_timer" for those platforms which support system timer.
> +- reg: Mandatory. The location and length for system timer registers.
> +- clock-frequency: Optional. If not assigned specifically, default
> +	value 13000000 (means 13 MHz) would be applied.

The driver tells there is an error if it is not defined, so it can't be
optional.

> +Examples:
> +
> +	sys_timer@10017000 {
> +		compatible = "mediatek,sys_timer";
> +		reg = <0 0x10017000 0 0x1000>;
> +		interrupts = <GIC_SPI 194 IRQ_TYPE_LEVEL_HIGH>;
> +		clock-frequency = <13000000>;

Replace it by a phandle to a 'fixed-clock'.

eg.

clocks = <&myclk>;


> +	};

myclk: myclk {
	#clock-cells = <0>;
	compatible = "fixed-clock";
        clock-frequency = <13000000>;
};

Thanks

  -- DAniel
Stanley Chu June 26, 2018, 6:36 a.m. UTC | #2
On Mon, 2018-06-25 at 23:53 +0200, Daniel Lezcano wrote:
> On 25/06/2018 09:10, Stanley Chu wrote:
> > Add binding documentation for the System Timer driver of
> > the Mediatek SoCs.
> > 
> > Signed-off-by: Stanley Chu <stanley.chu@mediatek.com>
> > ---
> >  .../bindings/timer/mediatek,mtk-systimer.txt       |   18 ++++++++++++++++++
> >  1 file changed, 18 insertions(+)
> >  create mode 100644 Documentation/devicetree/bindings/timer/mediatek,mtk-systimer.txt
> > 
> > diff --git a/Documentation/devicetree/bindings/timer/mediatek,mtk-systimer.txt b/Documentation/devicetree/bindings/timer/mediatek,mtk-systimer.txt
> > new file mode 100644
> > index 0000000..735a6fd
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/timer/mediatek,mtk-systimer.txt
> > @@ -0,0 +1,18 @@
> > +Mediatek System Timers
> > +----------------------
> > +
> > +Required properties:
> > +- compatible: should contain
> > +	"mediatek,sys_timer" for those platforms which support system timer.
> > +- reg: Mandatory. The location and length for system timer registers.
> > +- clock-frequency: Optional. If not assigned specifically, default
> > +	value 13000000 (means 13 MHz) would be applied.
> 
> The driver tells there is an error if it is not defined, so it can't be
> optional.
> 
> > +Examples:
> > +
> > +	sys_timer@10017000 {
> > +		compatible = "mediatek,sys_timer";
> > +		reg = <0 0x10017000 0 0x1000>;
> > +		interrupts = <GIC_SPI 194 IRQ_TYPE_LEVEL_HIGH>;
> > +		clock-frequency = <13000000>;
> 
> Replace it by a phandle to a 'fixed-clock'.
> 
> eg.
> 
> clocks = <&myclk>;
> 
> 
> > +	};
> 
> myclk: myclk {
> 	#clock-cells = <0>;
> 	compatible = "fixed-clock";
>         clock-frequency = <13000000>;
> };
> 
> Thanks
> 
>   -- DAniel
> 
> 
> 
> 
Hi Daniel,

13 MHz clock is necessary. We will fix it in v2 by using system's
fixed-clock.

Thanks.
Stanley Chu
diff mbox

Patch

diff --git a/Documentation/devicetree/bindings/timer/mediatek,mtk-systimer.txt b/Documentation/devicetree/bindings/timer/mediatek,mtk-systimer.txt
new file mode 100644
index 0000000..735a6fd
--- /dev/null
+++ b/Documentation/devicetree/bindings/timer/mediatek,mtk-systimer.txt
@@ -0,0 +1,18 @@ 
+Mediatek System Timers
+----------------------
+
+Required properties:
+- compatible: should contain
+	"mediatek,sys_timer" for those platforms which support system timer.
+- reg: Mandatory. The location and length for system timer registers.
+- clock-frequency: Optional. If not assigned specifically, default
+	value 13000000 (means 13 MHz) would be applied.
+
+Examples:
+
+	sys_timer@10017000 {
+		compatible = "mediatek,sys_timer";
+		reg = <0 0x10017000 0 0x1000>;
+		interrupts = <GIC_SPI 194 IRQ_TYPE_LEVEL_HIGH>;
+		clock-frequency = <13000000>;
+	};