2014-11-04 11:41:58

by Bhuvanchandra DV

[permalink] [raw]
Subject: [PATCH 0/2] Add I2C and enable M41T0M6 RTC

Add I2C support on Colibri VFxx moduels and enable M41T0M6 RTC
available on Colibri carrier boards.

Bhuvanchandra DV (2):
ARM: dts: vf-colibri: Add I2C support
ARM: dts: vf-colibri-eval-v3.dts: Enable ST-M41T0M6 RTC

arch/arm/boot/dts/vf-colibri-eval-v3.dtsi | 13 ++++++++++++-
arch/arm/boot/dts/vf-colibri.dtsi | 13 +++++++++++++
2 files changed, 25 insertions(+), 1 deletion(-)

--
1.7.9.5


2014-11-04 11:42:03

by Bhuvanchandra DV

[permalink] [raw]
Subject: [PATCH 1/2] ARM: dts: vf-colibri: Add I2C support


Signed-off-by: Bhuvanchandra DV <[email protected]>
---
arch/arm/boot/dts/vf-colibri-eval-v3.dtsi | 7 ++++++-
arch/arm/boot/dts/vf-colibri.dtsi | 13 +++++++++++++
2 files changed, 19 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/vf-colibri-eval-v3.dtsi b/arch/arm/boot/dts/vf-colibri-eval-v3.dtsi
index 80e8fbc..0251e6c 100644
--- a/arch/arm/boot/dts/vf-colibri-eval-v3.dtsi
+++ b/arch/arm/boot/dts/vf-colibri-eval-v3.dtsi
@@ -33,6 +33,11 @@
status = "okay";
};

+&i2c0 {
+ clock-frequency = <400000>;
+ status = "okay";
+};
+
&pwm0 {
status = "okay";
};
@@ -51,4 +56,4 @@

&uart2 {
status = "okay";
-};
\ No newline at end of file
+};
diff --git a/arch/arm/boot/dts/vf-colibri.dtsi b/arch/arm/boot/dts/vf-colibri.dtsi
index ab40367..471eec0 100644
--- a/arch/arm/boot/dts/vf-colibri.dtsi
+++ b/arch/arm/boot/dts/vf-colibri.dtsi
@@ -39,6 +39,12 @@
pinctrl-0 = <&pinctrl_fec1>;
};

+&i2c0 {
+ clock-frequency = <400000>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_i2c0>;
+};
+
&pwm0 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_pwm0>;
@@ -102,6 +108,13 @@
>;
};

+ pinctrl_i2c0: i2c0grp {
+ fsl,pins = <
+ VF610_PAD_PTB14__I2C0_SCL 0x37ff
+ VF610_PAD_PTB15__I2C0_SDA 0x37ff
+ >;
+ };
+
pinctrl_pwm0: pwm0grp {
fsl,pins = <
VF610_PAD_PTB0__FTM0_CH0 0x1182
--
1.7.9.5

2014-11-04 11:42:01

by Bhuvanchandra DV

[permalink] [raw]
Subject: [PATCH 2/2] ARM: dts: vf-colibri-eval-v3.dts: Enable ST-M41T0M6 RTC

ST-M41T0M6 is available on Colibri carrier boards.
Hence enable M41T0M6 RTC.

Signed-off-by: Bhuvanchandra DV <[email protected]>
---
arch/arm/boot/dts/vf-colibri-eval-v3.dtsi | 6 ++++++
1 file changed, 6 insertions(+)

diff --git a/arch/arm/boot/dts/vf-colibri-eval-v3.dtsi b/arch/arm/boot/dts/vf-colibri-eval-v3.dtsi
index 0251e6c..f807b5b 100644
--- a/arch/arm/boot/dts/vf-colibri-eval-v3.dtsi
+++ b/arch/arm/boot/dts/vf-colibri-eval-v3.dtsi
@@ -36,6 +36,12 @@
&i2c0 {
clock-frequency = <400000>;
status = "okay";
+
+ /* M41T0M6 real time clock on carrier board */
+ rtc: m41t0m6@68 {
+ compatible = "st,m41t00";
+ reg = <0x68>;
+ };
};

&pwm0 {
--
1.7.9.5

2014-11-05 08:45:32

by Stefan Agner

[permalink] [raw]
Subject: Re: [PATCH 1/2] ARM: dts: vf-colibri: Add I2C support

Am 2014-11-04 12:22, schrieb Bhuvanchandra DV:
> Signed-off-by: Bhuvanchandra DV <[email protected]>
> ---
> arch/arm/boot/dts/vf-colibri-eval-v3.dtsi | 7 ++++++-
> arch/arm/boot/dts/vf-colibri.dtsi | 13 +++++++++++++
> 2 files changed, 19 insertions(+), 1 deletion(-)
>
> diff --git a/arch/arm/boot/dts/vf-colibri-eval-v3.dtsi
> b/arch/arm/boot/dts/vf-colibri-eval-v3.dtsi
> index 80e8fbc..0251e6c 100644
> --- a/arch/arm/boot/dts/vf-colibri-eval-v3.dtsi
> +++ b/arch/arm/boot/dts/vf-colibri-eval-v3.dtsi
> @@ -33,6 +33,11 @@
> status = "okay";
> };
>
> +&i2c0 {
> + clock-frequency = <400000>;
> + status = "okay";
> +};
> +
> &pwm0 {
> status = "okay";
> };
> @@ -51,4 +56,4 @@
>
> &uart2 {
> status = "okay";
> -};
> \ No newline at end of file
> +};
> diff --git a/arch/arm/boot/dts/vf-colibri.dtsi
> b/arch/arm/boot/dts/vf-colibri.dtsi
> index ab40367..471eec0 100644
> --- a/arch/arm/boot/dts/vf-colibri.dtsi
> +++ b/arch/arm/boot/dts/vf-colibri.dtsi
> @@ -39,6 +39,12 @@
> pinctrl-0 = <&pinctrl_fec1>;
> };
>
> +&i2c0 {
> + clock-frequency = <400000>;

There is no need to overwrite the clock frequency again on carrier board
level here.

But other than that.

Acked-by: Stefan Agner <[email protected]>

> + pinctrl-names = "default";
> + pinctrl-0 = <&pinctrl_i2c0>;
> +};
> +
> &pwm0 {
> pinctrl-names = "default";
> pinctrl-0 = <&pinctrl_pwm0>;
> @@ -102,6 +108,13 @@
> >;
> };
>
> + pinctrl_i2c0: i2c0grp {
> + fsl,pins = <
> + VF610_PAD_PTB14__I2C0_SCL 0x37ff
> + VF610_PAD_PTB15__I2C0_SDA 0x37ff
> + >;
> + };
> +
> pinctrl_pwm0: pwm0grp {
> fsl,pins = <
> VF610_PAD_PTB0__FTM0_CH0 0x1182

2014-11-05 08:50:50

by Stefan Agner

[permalink] [raw]
Subject: Re: [PATCH 2/2] ARM: dts: vf-colibri-eval-v3.dts: Enable ST-M41T0M6 RTC

Am 2014-11-04 12:22, schrieb Bhuvanchandra DV:
> ST-M41T0M6 is available on Colibri carrier boards.
> Hence enable M41T0M6 RTC.
>
> Signed-off-by: Bhuvanchandra DV <[email protected]>
> ---
> arch/arm/boot/dts/vf-colibri-eval-v3.dtsi | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/arch/arm/boot/dts/vf-colibri-eval-v3.dtsi
> b/arch/arm/boot/dts/vf-colibri-eval-v3.dtsi
> index 0251e6c..f807b5b 100644
> --- a/arch/arm/boot/dts/vf-colibri-eval-v3.dtsi
> +++ b/arch/arm/boot/dts/vf-colibri-eval-v3.dtsi
> @@ -36,6 +36,12 @@
> &i2c0 {
> clock-frequency = <400000>;
> status = "okay";
> +
> + /* M41T0M6 real time clock on carrier board */
> + rtc: m41t0m6@68 {
> + compatible = "st,m41t00";
> + reg = <0x68>;
> + };
> };
>
> &pwm0 {

Acked-by: Stefan Agner <[email protected]>