MXS: Add DT binding support into stmp3xxx-rtc
PATCH v2 1/1 MXS: Add DT binding support into stmp3xxx-rtc
Add simple binding for the stmp3xxx-rtc.
--- .../devicetree/bindings/rtc/stmp3xxx-rtc.txt | 19 +++++++++++++++++++ arch/arm/boot/dts/imx28.dtsi | 1 + drivers/rtc/rtc-stmp3xxx.c | 7 +++++++ 3 files changed, 27 insertions(+) create mode 100644 Documentation/devicetree/bindings/rtc/stmp3xxx-rtc.txt
V2: Fix typos, remove fsl,imx28-rtc
Documentation/devicetree/bindings/rtc/stmp3xxx-rtc.txt new file +19 -0
@@ -0,0 +1,19 @@ +* STMP3xxx/i.MX28 Time Clock controller + +Required properties: +- compatible: should be one of the following. + * "fsl,stmp3xxx-rtc" +- reg: physical base address of the controller and length of memory mapped + region. +- interrupts: Two interrupt numbers to the cpu should be specified. First + interrupt number is the rtc tick interrupt and second interrupt number + is the rtc alarm interrupt. The number of cells representing a interrupt + depends on the parent interrupt controller. + +Example: + + rtc at 80056000 { + compatible = "fsl,stmp3xxx-rtc"; + reg = <0x80056000 2000>; + interrupts = <28 29>; + };
arch/arm/boot/dts/imx28.dtsi +1 -0
@@ -387,6 +387,7 @@ }; rtc at 80056000 { + compatible = "fsl,imx28-rtc", "fsl,stmp3xxx-rtc"; reg = <0x80056000 2000>; interrupts = <28 29>; status = "disabled";
drivers/rtc/rtc-stmp3xxx.c +7 -0
@@ -25,6 +25,7 @@#include <linux/interrupt.h> #include <linux/rtc.h> #include <linux/slab.h> +#include <linux/of_device.h> #include <mach/common.h>
@@ -265,6 +266,11 @@ static int stmp3xxx_rtc_resume(struct platform_device *dev)#define stmp3xxx_rtc_resume NULL#endif +static const struct of_device_id rtc_dt_ids[] = { + { .compatible ="fsl,stmp3xxx-rtc" , }, + {/* sentinel */ } +}; +static struct platform_driver stmp3xxx_rtcdrv = { .probe = stmp3xxx_rtc_probe, .remove = stmp3xxx_rtc_remove,
@@ -273,6 +279,7 @@ static struct platform_driver stmp3xxx_rtcdrv = { .driver = { .name = "stmp3xxx-rtc", .owner = THIS_MODULE, + .of_match_table = rtc_dt_ids, }, };
Signature · 1 line
1.7.10
PATCH v2 1/1 MXS: Add DT binding support into stmp3xxx-rtc
Quoted 10 lines · Marek Vasut
Add simple binding for the stmp3xxx-rtc.
Signed-off-by Marek Vasut <[email protected]>Cc Alessandro Zummo <[email protected]>Cc devicetree-discuss at lists.ozlabs.orgCc Grant Likely <[email protected]>Cc Rob Herring <[email protected]>Cc rtc-linux at googlegroups.comCc Shawn Guo <[email protected]>---
Quoted 77 lines
.../devicetree/bindings/rtc/stmp3xxx-rtc.txt | 19 +++++++++++++++++++ arch/arm/boot/dts/imx28.dtsi | 1 + drivers/rtc/rtc-stmp3xxx.c | 7 +++++++ 3 files changed, 27 insertions(+) create mode 100644 Documentation/devicetree/bindings/rtc/stmp3xxx-rtc.txtV2: Fix typos, remove fsl,imx28-rtc
Documentation/devicetree/bindings/rtc/stmp3xxx-rtc.txt new file +19
-0@@ -0,0 +1,19 @@ +* STMP3xxx/i.MX28 Time Clock controller + +Required properties: +- compatible: should be one of the following. + * "fsl,stmp3xxx-rtc" +- reg: physical base address of the controller and length of memory mapped + region. +- interrupts: Two interrupt numbers to the cpu should be specified. First + interrupt number is the rtc tick interrupt and second interrupt number + is the rtc alarm interrupt. The number of cells representing a interrupt + depends on the parent interrupt controller. + +Example: + + rtc at 80056000 { + compatible = "fsl,stmp3xxx-rtc"; + reg = <0x80056000 2000>; + interrupts = <28 29>; + };arch/arm/boot/dts/imx28.dtsi +1
-0@@ -387,6 +387,7 @@ }; rtc at 80056000 { + compatible = "fsl,imx28-rtc", "fsl,stmp3xxx-rtc"; reg = <0x80056000 2000>; interrupts = <28 29>; status = "disabled";drivers/rtc/rtc-stmp3xxx.c +7
-0@@ -25,6 +25,7 @@#include <linux/interrupt.h> #include <linux/rtc.h> #include <linux/slab.h> +#include <linux/of_device.h> #include <mach/common.h> @@ -265,6 +266,11 @@ static int stmp3xxx_rtc_resume(struct platform_device *dev)#define stmp3xxx_rtc_resume NULL#endif +static const struct of_device_id rtc_dt_ids[] = { + { .compatible ="fsl,stmp3xxx-rtc" , }, + {/* sentinel */ } +}; +static struct platform_driver stmp3xxx_rtcdrv = { .probe = stmp3xxx_rtc_probe, .remove = stmp3xxx_rtc_remove,@@ -273,6 +279,7 @@ static struct platform_driver stmp3xxx_rtcdrv = { .driver = { .name = "stmp3xxx-rtc", .owner = THIS_MODULE, + .of_match_table = rtc_dt_ids, }, };
PATCH v2 1/1 MXS: Add DT binding support into stmp3xxx-rtc
In reply to Marek VasutQuoted 9 lines · Marek Vasut
Add simple binding for the stmp3xxx-rtc.
Signed-off-by Marek Vasut <[email protected]>Cc Alessandro Zummo <[email protected]>Cc devicetree-discuss at lists.ozlabs.orgCc Grant Likely <[email protected]>Cc Rob Herring <[email protected]>Cc rtc-linux at googlegroups.comCc Shawn Guo <[email protected]>
PATCH v2 1/1 MXS: Add DT binding support into stmp3xxx-rtc
In reply to Marek VasutQuoted 4 lines · Marek Vasut
Add simple binding for the stmp3xxx-rtc.
Signed-off-by Marek Vasut <[email protected]>Cc Alessandro Zummo <[email protected]>
Hi Alessandro,
The patch has some changes on arch/arm/boot/dts/imx28.dtsi, and also we need the patch to convert some board files over to device tree. May I have your ack to queue the patch on my tree?
Regards,
Shawn
Quoted 86 lines
Cc devicetree-discuss at lists.ozlabs.orgCc Grant Likely <[email protected]>Cc Rob Herring <[email protected]>Cc rtc-linux at googlegroups.comCc Shawn Guo <[email protected]>--- .../devicetree/bindings/rtc/stmp3xxx-rtc.txt | 19 +++++++++++++++++++ arch/arm/boot/dts/imx28.dtsi | 1 + drivers/rtc/rtc-stmp3xxx.c | 7 +++++++ 3 files changed, 27 insertions(+) create mode 100644 Documentation/devicetree/bindings/rtc/stmp3xxx-rtc.txtV2: Fix typos, remove fsl,imx28-rtc
Documentation/devicetree/bindings/rtc/stmp3xxx-rtc.txt new file +19
-0@@ -0,0 +1,19 @@ +* STMP3xxx/i.MX28 Time Clock controller + +Required properties: +- compatible: should be one of the following. + * "fsl,stmp3xxx-rtc" +- reg: physical base address of the controller and length of memory mapped + region. +- interrupts: Two interrupt numbers to the cpu should be specified. First + interrupt number is the rtc tick interrupt and second interrupt number + is the rtc alarm interrupt. The number of cells representing a interrupt + depends on the parent interrupt controller. + +Example: + + rtc at 80056000 { + compatible = "fsl,stmp3xxx-rtc"; + reg = <0x80056000 2000>; + interrupts = <28 29>; + };arch/arm/boot/dts/imx28.dtsi +1
-0@@ -387,6 +387,7 @@ }; rtc at 80056000 { + compatible = "fsl,imx28-rtc", "fsl,stmp3xxx-rtc"; reg = <0x80056000 2000>; interrupts = <28 29>; status = "disabled";drivers/rtc/rtc-stmp3xxx.c +7
-0@@ -25,6 +25,7 @@#include <linux/interrupt.h> #include <linux/rtc.h> #include <linux/slab.h> +#include <linux/of_device.h> #include <mach/common.h> @@ -265,6 +266,11 @@ static int stmp3xxx_rtc_resume(struct platform_device *dev)#define stmp3xxx_rtc_resume NULL#endif +static const struct of_device_id rtc_dt_ids[] = { + { .compatible ="fsl,stmp3xxx-rtc" , }, + {/* sentinel */ } +}; +static struct platform_driver stmp3xxx_rtcdrv = { .probe = stmp3xxx_rtc_probe, .remove = stmp3xxx_rtc_remove,@@ -273,6 +279,7 @@ static struct platform_driver stmp3xxx_rtcdrv = { .driver = { .name = "stmp3xxx-rtc", .owner = THIS_MODULE, + .of_match_table = rtc_dt_ids, }, };Signature · 1 line
1.7.10
PATCH v2 1/1 MXS: Add DT binding support into stmp3xxx-rtc
Quoted 11 lines · Shawn Guo
Quoted 4 lines · Marek Vasut
Add simple binding for the stmp3xxx-rtc.
Signed-off-by Marek Vasut <[email protected]>Cc Alessandro Zummo <[email protected]>Hi Alessandro,
The patch has some changes on
arch/arm/boot/dts/imx28.dtsi, and also we need the patch to convert some board files over to device tree. May I have your ack to queue the patch on my tree?
The interrupt numbers are not as the driver expects them..
Quoted 27 lines
Regards,
ShawnQuoted 23 lines
Cc devicetree-discuss at lists.ozlabs.orgCc Grant Likely <[email protected]>Cc Rob Herring <[email protected]>Cc rtc-linux at googlegroups.comCc Shawn Guo <[email protected]>--- .../devicetree/bindings/rtc/stmp3xxx-rtc.txt | 19 +++++++++++++++++++ arch/arm/boot/dts/imx28.dtsi | 1 + drivers/rtc/rtc-stmp3xxx.c | 7 +++++++ 3 files changed, 27 insertions(+) create mode 100644 Documentation/devicetree/bindings/rtc/stmp3xxx-rtc.txtV2: Fix typos, remove fsl,imx28-rtc
Documentation/devicetree/bindings/rtc/stmp3xxx-rtc.txt new file +3
-0@@ -0,0 +1,19 @@ +* STMP3xxx/i.MX28 Time Clock controller + +Required properties:
Quoted 8 lines
Documentation/devicetree/bindings/rtc/stmp3xxx-rtc.txt line 11
Quoted 8 lines
Documentation/devicetree/bindings/rtc/stmp3xxx-rtc.txt new file +8
-0+- compatible: should be one of the following. + * "fsl,stmp3xxx-rtc" +- reg: physical base address of the controller and length of memory mapped + region. +- interrupts: Two interrupt numbers to the cpu should be specified. First + interrupt number is the rtc tick interrupt and second interrupt number + is the rtc alarm interrupt. The number of cells representing a interrupt + depends on the parent interrupt controller.
The driver expects the first interrupt to the the alarm interrupt, the event interrupt is not use, yet.
Quoted 15 lines
Quoted 15 lines
Documentation/devicetree/bindings/rtc/stmp3xxx-rtc.txt new file +8
-0+ +Example: + + rtc at 80056000 { + compatible = "fsl,stmp3xxx-rtc"; + reg = <0x80056000 2000>; + interrupts = <28 29>; + };arch/arm/boot/dts/imx28.dtsi +0
-0@@ -387,6 +387,7 @@ };
Quoted 4 lines
arch/arm/boot/dts/imx28.dtsi line 392
Quoted 4 lines
arch/arm/boot/dts/imx28.dtsi +1
-0rtc at 80056000 { + compatible = "fsl,imx28-rtc", "fsl,stmp3xxx-rtc"; reg = <0x80056000 2000>; interrupts = <28 29>;
should be:
<29 28>
Quoted 33 lines
Quoted 33 lines
arch/arm/boot/dts/imx28.dtsi +0
-0status = "disabled";drivers/rtc/rtc-stmp3xxx.c +7
-0@@ -25,6 +25,7 @@#include <linux/interrupt.h> #include <linux/rtc.h> #include <linux/slab.h> +#include <linux/of_device.h> #include <mach/common.h> @@ -265,6 +266,11 @@ static int stmp3xxx_rtc_resume(struct platform_device *dev)#define stmp3xxx_rtc_resume NULL#endif +static const struct of_device_id rtc_dt_ids[] = { + { .compatible ="fsl,stmp3xxx-rtc" , }, + {/* sentinel */ } +}; +static struct platform_driver stmp3xxx_rtcdrv = { .probe = stmp3xxx_rtc_probe, .remove = stmp3xxx_rtc_remove,@@ -273,6 +279,7 @@ static struct platform_driver stmp3xxx_rtcdrv = { .driver = { .name = "stmp3xxx-rtc", .owner = THIS_MODULE, + .of_match_table = rtc_dt_ids, }, };
Quoted 9 lines
Quoted 3 lines
Signature · 1 line
1.7.10_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Marc
Signature · 12 lines
Pengutronix e.K. | Marc Kleine-Budde | Industrial Linux Solutions | Phone: +49-231-2826-924 | Vertretung West/Dortmund | Fax: +49-5121-206917-5555 | Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de | -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 262 bytes Desc: OpenPGP digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20120629/1e8f68eb/attachment.sig>
PATCH v2 1/1 MXS: Add DT binding support into stmp3xxx-rtc
Quoted 7 lines · Marc Kleine-Budde
Quoted 6 lines · Shawn Guo
Quoted 4 lines · Marek Vasut
Add simple binding for the stmp3xxx-rtc.
Signed-off-by Marek Vasut <[email protected]>Cc Alessandro Zummo <[email protected]>
Quoted 8 lines
Quoted 5 lines
Hi Alessandro,
The patch has some changes on
arch/arm/boot/dts/imx28.dtsi, and also we need the patch to convert some board files over to device tree. May I have your ack to queue the patch on my tree?The interrupt numbers are not as the driver expects them..
Right. I sent a v3 fixing it.
http://article.gmane.org/gmane.linux.drivers.devicetree/17133
Signature · 2 lines
Regards, Shawn
PATCH v2 1/1 MXS: Add DT binding support into stmp3xxx-rtc
Quoted 10 lines · Shawn Guo
Quoted 9 lines · Marc Kleine-Budde
Quoted 8 lines · Shawn Guo
Quoted 4 lines · Marek Vasut
Add simple binding for the stmp3xxx-rtc.
Signed-off-by Marek Vasut <[email protected]>Cc Alessandro Zummo <[email protected]>Hi Alessandro,
Quoted 7 lines
Quoted 6 lines
Quoted 3 lines
The patch has some changes on
arch/arm/boot/dts/imx28.dtsi, and also we need the patch to convert some board files over to device tree. May I have your ack to queue the patch on my tree?The interrupt numbers are not as the driver expects them..
Right. I sent a v3 fixing it.
Oh, I missed that.
Sorry for the noise,
Marc
Signature · 12 lines
Pengutronix e.K. | Marc Kleine-Budde | Industrial Linux Solutions | Phone: +49-231-2826-924 | Vertretung West/Dortmund | Fax: +49-5121-206917-5555 | Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de | -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 262 bytes Desc: OpenPGP digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20120629/24fe8d28/attachment.sig>