* MXS getting AUART to work with DT.
@ 2012-06-13 1:42 Subodh Nijsure
2012-06-14 1:23 ` Fabio Estevam
` (2 more replies)
0 siblings, 3 replies; 12+ messages in thread
From: Subodh Nijsure @ 2012-06-13 1:42 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
I am testing my mx28 hardware with arm-soc/for-next branch. I have made
additions shown below to my dt file.
What I see is only ttyAPP0 device gets created but not the ttyAPP1, do
folks who know DT much better than I, see any issues with this DT
definition below?
auart0_pins_a: auart0 at 0 {
reg = <0>;
fsl,pinmux-ids = <0x3000 0x3010 0x3020 0x3030>;
fsl,drive-strength = <0>;
fsl,voltage = <1>;
fsl,pull-up = <0>;
};
auart1_pins_a: auart1 at 0 {
reg = <0>;
fsl,pinmux-ids = <0x3040 0x3050>;
fsl,drive-strength = <0>;
fsl,voltage = <1>;
fsl,pull-up = <0>;
};
auart0: serial at 8006a000 {
pinctrl-names = "default";
pinctrl-0 = <&auart0_pins_a>;
status = "okay";
};
auart1: serial at 8006c000 {
pinctrl-names = "default";
pinctrl-0 = <&auart1_pins_a>;
status = "okay";
};
-Subodh
^ permalink raw reply [flat|nested] 12+ messages in thread
* MXS getting AUART to work with DT.
2012-06-13 1:42 MXS getting AUART to work with DT Subodh Nijsure
@ 2012-06-14 1:23 ` Fabio Estevam
2012-06-14 1:32 ` Marek Vasut
2012-06-14 1:34 ` Marek Vasut
2012-06-14 2:57 ` Fabio Estevam
2 siblings, 1 reply; 12+ messages in thread
From: Fabio Estevam @ 2012-06-14 1:23 UTC (permalink / raw)
To: linux-arm-kernel
Hi Subodh,
On Tue, Jun 12, 2012 at 10:42 PM, Subodh Nijsure <snijsure@grid-net.com> wrote:
> Hi,
>
> I am testing my mx28 hardware with arm-soc/for-next branch. I have made
> ?additions shown below to my dt file.
>
> What I see is only ttyAPP0 device gets created but not the ttyAPP1, do folks
> who know DT much better than I, see any issues with this DT definition
> below?
I just enabled CONFIG_SERIAL_MXS_AUART and booted my mx28evk (non-DT
case) that registers
auart0 and auart2, but I don't see any ttyAPPx node.
Is there anything I am missing?
I would like to get ttyAPP0/2 working first on non-DT case.
Thanks,
Fabio Estevam
^ permalink raw reply [flat|nested] 12+ messages in thread
* MXS getting AUART to work with DT.
2012-06-14 1:23 ` Fabio Estevam
@ 2012-06-14 1:32 ` Marek Vasut
2012-06-14 2:33 ` Fabio Estevam
0 siblings, 1 reply; 12+ messages in thread
From: Marek Vasut @ 2012-06-14 1:32 UTC (permalink / raw)
To: linux-arm-kernel
Dear Fabio Estevam,
> Hi Subodh,
>
> On Tue, Jun 12, 2012 at 10:42 PM, Subodh Nijsure <snijsure@grid-net.com>
wrote:
> > Hi,
> >
> > I am testing my mx28 hardware with arm-soc/for-next branch. I have made
> > additions shown below to my dt file.
> >
> > What I see is only ttyAPP0 device gets created but not the ttyAPP1, do
> > folks who know DT much better than I, see any issues with this DT
> > definition below?
>
> I just enabled CONFIG_SERIAL_MXS_AUART and booted my mx28evk (non-DT
> case) that registers
> auart0 and auart2, but I don't see any ttyAPPx node.
>
> Is there anything I am missing?
>
> I would like to get ttyAPP0/2 working first on non-DT case.
I think the kernel for non-DT case is already FUBAR ... just do a simple DT
conversion :-(
> Thanks,
>
> Fabio Estevam
Best regards,
your utmost DT supporter and friend
Marek Vasut
^ permalink raw reply [flat|nested] 12+ messages in thread
* MXS getting AUART to work with DT.
2012-06-13 1:42 MXS getting AUART to work with DT Subodh Nijsure
2012-06-14 1:23 ` Fabio Estevam
@ 2012-06-14 1:34 ` Marek Vasut
2012-06-14 2:57 ` Fabio Estevam
2 siblings, 0 replies; 12+ messages in thread
From: Marek Vasut @ 2012-06-14 1:34 UTC (permalink / raw)
To: linux-arm-kernel
Dear Subodh Nijsure,
> Hi,
>
> I am testing my mx28 hardware with arm-soc/for-next branch. I have made
> additions shown below to my dt file.
>
> What I see is only ttyAPP0 device gets created but not the ttyAPP1, do
> folks who know DT much better than I, see any issues with this DT
> definition below?
Last time I checked, it wasn't that easy to get AUART flipped over to DT. Did
someone do that already?
>
> auart0_pins_a: auart0 at 0 {
> reg = <0>;
> fsl,pinmux-ids = <0x3000 0x3010 0x3020 0x3030>;
> fsl,drive-strength = <0>;
> fsl,voltage = <1>;
> fsl,pull-up = <0>;
> };
> auart1_pins_a: auart1 at 0 {
> reg = <0>;
> fsl,pinmux-ids = <0x3040 0x3050>;
> fsl,drive-strength = <0>;
> fsl,voltage = <1>;
> fsl,pull-up = <0>;
> };
> auart0: serial at 8006a000 {
> pinctrl-names = "default";
> pinctrl-0 = <&auart0_pins_a>;
> status = "okay";
> };
> auart1: serial at 8006c000 {
> pinctrl-names = "default";
> pinctrl-0 = <&auart1_pins_a>;
> status = "okay";
> };
>
> -Subodh
Best regards,
Marek Vasut
^ permalink raw reply [flat|nested] 12+ messages in thread
* MXS getting AUART to work with DT.
2012-06-14 1:32 ` Marek Vasut
@ 2012-06-14 2:33 ` Fabio Estevam
2012-06-14 4:23 ` Fabio Estevam
0 siblings, 1 reply; 12+ messages in thread
From: Fabio Estevam @ 2012-06-14 2:33 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, Jun 13, 2012 at 10:32 PM, Marek Vasut <marex@denx.de> wrote:
> I think the kernel for non-DT case is already FUBAR ... just do a simple DT
> conversion :-(
So does it mean mxs-auart has never been used?
^ permalink raw reply [flat|nested] 12+ messages in thread
* MXS getting AUART to work with DT.
2012-06-13 1:42 MXS getting AUART to work with DT Subodh Nijsure
2012-06-14 1:23 ` Fabio Estevam
2012-06-14 1:34 ` Marek Vasut
@ 2012-06-14 2:57 ` Fabio Estevam
2012-06-14 4:40 ` Subodh Nijsure
2 siblings, 1 reply; 12+ messages in thread
From: Fabio Estevam @ 2012-06-14 2:57 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, Jun 12, 2012 at 10:42 PM, Subodh Nijsure <snijsure@grid-net.com> wrote:
> Hi,
>
> I am testing my mx28 hardware with arm-soc/for-next branch. I have made
> ?additions shown below to my dt file.
>
> What I see is only ttyAPP0 device gets created but not the ttyAPP1, do folks
> who know DT much better than I, see any issues with this DT definition
> below?
Would something like the patch below be needed?
---
arch/arm/boot/dts/imx28.dtsi | 5 +++++
drivers/tty/serial/mxs-auart.c | 9 +++++++++
2 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/arch/arm/boot/dts/imx28.dtsi b/arch/arm/boot/dts/imx28.dtsi
index 4634cb8..d524377 100644
--- a/arch/arm/boot/dts/imx28.dtsi
+++ b/arch/arm/boot/dts/imx28.dtsi
@@ -404,30 +404,35 @@
};
auart0: serial at 8006a000 {
+ compatible = "fsl,mxs-auart";
reg = <0x8006a000 0x2000>;
interrupts = <112 70 71>;
status = "disabled";
};
auart1: serial at 8006c000 {
+ compatible = "fsl,mxs-auart";
reg = <0x8006c000 0x2000>;
interrupts = <113 72 73>;
status = "disabled";
};
auart2: serial at 8006e000 {
+ compatible = "fsl,mxs-auart";
reg = <0x8006e000 0x2000>;
interrupts = <114 74 75>;
status = "disabled";
};
auart3: serial at 80070000 {
+ compatible = "fsl,mxs-auart";
reg = <0x80070000 0x2000>;
interrupts = <115 76 77>;
status = "disabled";
};
auart4: serial at 80072000 {
+ compatible = "fsl,mxs-auart";
reg = <0x80072000 0x2000>;
interrupts = <116 78 79>;
status = "disabled";
diff --git a/drivers/tty/serial/mxs-auart.c b/drivers/tty/serial/mxs-auart.c
index ec56d83..6540f28 100644
--- a/drivers/tty/serial/mxs-auart.c
+++ b/drivers/tty/serial/mxs-auart.c
@@ -33,6 +33,8 @@
#include <linux/delay.h>
#include <linux/io.h>
#include <linux/pinctrl/consumer.h>
+#include <linux/of.h>
+#include <linux/of_address.h>
#include <asm/cacheflush.h>
@@ -769,12 +771,19 @@ static int __devexit mxs_auart_remove(struct
platform_device *pdev)
return 0;
}
+static struct of_device_id mxs_auart_dt_ids[] = {
+ {.compatible = "fsl,mxs-auart", },
+ { /* sentinel */ }
+};
+MODULE_DEVICE_TABLE(of, mxs_auart_of_match);
+
static struct platform_driver mxs_auart_driver = {
.probe = mxs_auart_probe,
.remove = __devexit_p(mxs_auart_remove),
.driver = {
.name = "mxs-auart",
.owner = THIS_MODULE,
+ .of_match_table = of_match_ptr(mxs_auart_dt_ids),
},
};
--
1.7.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* MXS getting AUART to work with DT.
2012-06-14 2:33 ` Fabio Estevam
@ 2012-06-14 4:23 ` Fabio Estevam
2012-06-14 10:54 ` Marek Vasut
0 siblings, 1 reply; 12+ messages in thread
From: Fabio Estevam @ 2012-06-14 4:23 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, Jun 13, 2012 at 11:33 PM, Fabio Estevam <festevam@gmail.com> wrote:
> On Wed, Jun 13, 2012 at 10:32 PM, Marek Vasut <marex@denx.de> wrote:
>
>> I think the kernel for non-DT case is already FUBAR ... just do a simple DT
>> conversion :-(
>
> So does it mean mxs-auart has never been used?
Ok, just tested a 3.4.2 (non-DT kernel) and I see:
[ 0.570000] mxs-auart.0: ttyAPP0 at MMIO 0x8006a000 (irq = 112) is
a mxs-auart.0
[ 0.580000] mxs-auart mxs-auart.0: Found APPUART 3.1.0
[ 0.590000] mxs-auart.3: ttyAPP3 at MMIO 0x80070000 (irq = 115) is
a mxs-auart.3
[ 0.600000] mxs-auart mxs-auart.3: Found APPUART 3.1.0
,so it means that something broke mxs-auart on 3.5-rc.
Will look more on this tomorrow.
^ permalink raw reply [flat|nested] 12+ messages in thread
* MXS getting AUART to work with DT.
2012-06-14 2:57 ` Fabio Estevam
@ 2012-06-14 4:40 ` Subodh Nijsure
2012-06-14 4:54 ` Fabio Estevam
0 siblings, 1 reply; 12+ messages in thread
From: Subodh Nijsure @ 2012-06-14 4:40 UTC (permalink / raw)
To: linux-arm-kernel
On 06/13/2012 07:57 PM, Fabio Estevam wrote:
> On Tue, Jun 12, 2012 at 10:42 PM, Subodh Nijsure<snijsure@grid-net.com> wrote:
>> Hi,
>>
>> I am testing my mx28 hardware with arm-soc/for-next branch. I have made
>> additions shown below to my dt file.
>>
>> What I see is only ttyAPP0 device gets created but not the ttyAPP1, do folks
>> who know DT much better than I, see any issues with this DT definition
>> below?
> Would something like the patch below be needed?
>
> ---
> arch/arm/boot/dts/imx28.dtsi | 5 +++++
> drivers/tty/serial/mxs-auart.c | 9 +++++++++
> 2 files changed, 14 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/boot/dts/imx28.dtsi b/arch/arm/boot/dts/imx28.dtsi
> index 4634cb8..d524377 100644
> --- a/arch/arm/boot/dts/imx28.dtsi
> +++ b/arch/arm/boot/dts/imx28.dtsi
> @@ -404,30 +404,35 @@
> };
>
> auart0: serial at 8006a000 {
> + compatible = "fsl,mxs-auart";
> reg =<0x8006a000 0x2000>;
> interrupts =<112 70 71>;
> status = "disabled";
> };
>
> auart1: serial at 8006c000 {
> + compatible = "fsl,mxs-auart";
> reg =<0x8006c000 0x2000>;
> interrupts =<113 72 73>;
> status = "disabled";
> };
>
> auart2: serial at 8006e000 {
> + compatible = "fsl,mxs-auart";
> reg =<0x8006e000 0x2000>;
> interrupts =<114 74 75>;
> status = "disabled";
> };
>
> auart3: serial at 80070000 {
> + compatible = "fsl,mxs-auart";
> reg =<0x80070000 0x2000>;
> interrupts =<115 76 77>;
> status = "disabled";
> };
>
> auart4: serial at 80072000 {
> + compatible = "fsl,mxs-auart";
> reg =<0x80072000 0x2000>;
> interrupts =<116 78 79>;
> status = "disabled";
> diff --git a/drivers/tty/serial/mxs-auart.c b/drivers/tty/serial/mxs-auart.c
> index ec56d83..6540f28 100644
> --- a/drivers/tty/serial/mxs-auart.c
> +++ b/drivers/tty/serial/mxs-auart.c
> @@ -33,6 +33,8 @@
> #include<linux/delay.h>
> #include<linux/io.h>
> #include<linux/pinctrl/consumer.h>
> +#include<linux/of.h>
> +#include<linux/of_address.h>
>
> #include<asm/cacheflush.h>
>
> @@ -769,12 +771,19 @@ static int __devexit mxs_auart_remove(struct
> platform_device *pdev)
> return 0;
> }
>
> +static struct of_device_id mxs_auart_dt_ids[] = {
> + {.compatible = "fsl,mxs-auart", },
> + { /* sentinel */ }
> +};
> +MODULE_DEVICE_TABLE(of, mxs_auart_of_match);
> +
> static struct platform_driver mxs_auart_driver = {
> .probe = mxs_auart_probe,
> .remove = __devexit_p(mxs_auart_remove),
> .driver = {
> .name = "mxs-auart",
> .owner = THIS_MODULE,
> + .of_match_table = of_match_ptr(mxs_auart_dt_ids),
> },
> };
>
With this change you will only see AUART0 being created all subsequent
attempts fail. I think we need to have dt specific probe, my colleague
Matt Burtch has implemented that dt specific probe for AUART will
request him to send his diff tomorrow AM.
I think something is broken in 3.5 as far as I can tell AUART goes it
had worked for me in 3.4, I am novice at device-tree and was not sure if
its because of DT or something else.
-Subodh
^ permalink raw reply [flat|nested] 12+ messages in thread
* MXS getting AUART to work with DT.
2012-06-14 4:40 ` Subodh Nijsure
@ 2012-06-14 4:54 ` Fabio Estevam
2012-06-14 16:49 ` Matt Burtch
0 siblings, 1 reply; 12+ messages in thread
From: Fabio Estevam @ 2012-06-14 4:54 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, Jun 14, 2012 at 1:40 AM, Subodh Nijsure <snijsure@grid-net.com> wrote:
> With this change you will only see AUART0 being created all subsequent
> attempts fail. ?I think we need to have dt specific probe, my colleague Matt
> Burtch has implemented that dt specific probe for AUART will request him to
> send his diff tomorrow AM.
>
> I think something is broken in 3.5 as far as I can tell AUART goes it had
> worked for me in 3.4, I am novice at device-tree and was not sure if its
> because of DT or something else.
Ok, just tested linux-next and I see that mxs-auart probes correctly
for the non-dt kernel.
We need to fix mxs-auart for dt now.
Regards,
Fabio Estevam
^ permalink raw reply [flat|nested] 12+ messages in thread
* MXS getting AUART to work with DT.
2012-06-14 4:23 ` Fabio Estevam
@ 2012-06-14 10:54 ` Marek Vasut
0 siblings, 0 replies; 12+ messages in thread
From: Marek Vasut @ 2012-06-14 10:54 UTC (permalink / raw)
To: linux-arm-kernel
Dear Fabio Estevam,
> On Wed, Jun 13, 2012 at 11:33 PM, Fabio Estevam <festevam@gmail.com> wrote:
> > On Wed, Jun 13, 2012 at 10:32 PM, Marek Vasut <marex@denx.de> wrote:
> >> I think the kernel for non-DT case is already FUBAR ... just do a simple
> >> DT conversion :-(
> >
> > So does it mean mxs-auart has never been used?
>
> Ok, just tested a 3.4.2 (non-DT kernel) and I see:
>
> [ 0.570000] mxs-auart.0: ttyAPP0 at MMIO 0x8006a000 (irq = 112) is
> a mxs-auart.0
> [ 0.580000] mxs-auart mxs-auart.0: Found APPUART 3.1.0
> [ 0.590000] mxs-auart.3: ttyAPP3 at MMIO 0x80070000 (irq = 115) is
> a mxs-auart.3
> [ 0.600000] mxs-auart mxs-auart.3: Found APPUART 3.1.0
>
> ,so it means that something broke mxs-auart on 3.5-rc.
I tested it on 3.4-rc6, it worked back there with non-DT kernel.
> Will look more on this tomorrow.
Best regards,
Marek Vasut
^ permalink raw reply [flat|nested] 12+ messages in thread
* MXS getting AUART to work with DT.
2012-06-14 4:54 ` Fabio Estevam
@ 2012-06-14 16:49 ` Matt Burtch
2012-06-15 1:38 ` Fabio Estevam
0 siblings, 1 reply; 12+ messages in thread
From: Matt Burtch @ 2012-06-14 16:49 UTC (permalink / raw)
To: linux-arm-kernel
Here is the patch I put together to get the AUART recognized with the dt. I'm pretty new to dt development, so this was a quick first pass. I'm sure there are more proper ways to get the device id and pass literals between the dt and probe function...but this works for now.
Regards,
-Matt Burtch
________________________________________
From: Fabio Estevam [festevam at gmail.com]
Sent: Wednesday, June 13, 2012 9:54 PM
To: Subodh Nijsure
Cc: linux-arm-kernel at lists.infradead.org; Marek Va?ut; Shawn Guo; Matt Burtch
Subject: Re: MXS getting AUART to work with DT.
On Thu, Jun 14, 2012 at 1:40 AM, Subodh Nijsure <snijsure@grid-net.com> wrote:
> With this change you will only see AUART0 being created all subsequent
> attempts fail. I think we need to have dt specific probe, my colleague Matt
> Burtch has implemented that dt specific probe for AUART will request him to
> send his diff tomorrow AM.
>
> I think something is broken in 3.5 as far as I can tell AUART goes it had
> worked for me in 3.4, I am novice at device-tree and was not sure if its
> because of DT or something else.
Ok, just tested linux-next and I see that mxs-auart probes correctly
for the non-dt kernel.
We need to fix mxs-auart for dt now.
Regards,
Fabio Estevam
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mxs-auart.patch
Type: text/x-patch
Size: 3155 bytes
Desc: mxs-auart.patch
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20120614/9fae73f8/attachment-0001.bin>
^ permalink raw reply [flat|nested] 12+ messages in thread
* MXS getting AUART to work with DT.
2012-06-14 16:49 ` Matt Burtch
@ 2012-06-15 1:38 ` Fabio Estevam
0 siblings, 0 replies; 12+ messages in thread
From: Fabio Estevam @ 2012-06-15 1:38 UTC (permalink / raw)
To: linux-arm-kernel
Hi Matt,
On Thu, Jun 14, 2012 at 1:49 PM, Matt Burtch <matt@grid-net.com> wrote:
> Here is the patch I put together to get the AUART recognized with the dt. ?I'm pretty new to dt development, so this was a quick first pass. I'm sure there are more proper ways to get the device id and pass literals between the dt and probe function...but this works for now.
Ok, I managed to fix it properly now.
Will submit the patches tomorrow.
Regards,
Fabio Estevam
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2012-06-15 1:38 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-13 1:42 MXS getting AUART to work with DT Subodh Nijsure
2012-06-14 1:23 ` Fabio Estevam
2012-06-14 1:32 ` Marek Vasut
2012-06-14 2:33 ` Fabio Estevam
2012-06-14 4:23 ` Fabio Estevam
2012-06-14 10:54 ` Marek Vasut
2012-06-14 1:34 ` Marek Vasut
2012-06-14 2:57 ` Fabio Estevam
2012-06-14 4:40 ` Subodh Nijsure
2012-06-14 4:54 ` Fabio Estevam
2012-06-14 16:49 ` Matt Burtch
2012-06-15 1:38 ` Fabio Estevam
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).