linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Govindraj <govindraj.ti@gmail.com>
To: Peter Ujfalusi <peter.ujfalusi@ti.com>
Cc: Richard Watts <rrw@kynesim.co.uk>, Kevin Hilman <khilman@ti.com>,
	linux-omap <linux-omap@vger.kernel.org>,
	balbi@ti.com
Subject: Re: help: BeagleBoard xM RevC ethernet port
Date: Tue, 28 Feb 2012 19:34:05 +0530	[thread overview]
Message-ID: <CAAL8m4x=6--5irPBPdW4n0dtYuMm_UThqWEuCSyTtsm+cEx4jQ@mail.gmail.com> (raw)
In-Reply-To: <4F4B9405.9070702@ti.com>

[-- Attachment #1: Type: text/plain, Size: 6002 bytes --]

Hi Peter,

On Mon, Feb 27, 2012 at 8:02 PM, Peter Ujfalusi <peter.ujfalusi@ti.com> wrote:
> Hi,
>
> On 02/23/2012 12:23 PM, Richard Watts wrote:
>> On 22/02/12 22:00, Kevin Hilman wrote:
>>> The first thing I try when I see these regulator failures is to add
>>> CONFIG_REGULATOR_DUMMY=y to the .config to see if that helps.  If so,
>>> then the board file needs some help configuring the right regulators.
>
> Thanks for the hint Kevin
>
>>  Apologies for the malformed patch, but I don't have time to clean it up
>> this morning (or test it in its cleaned state); however, the following
>> fixes the problem for me.
>>
>>  It used to be masked because u-boot turns the regulator on to activate
>> ethernet on Beagle xM and no-one ever turns it off again, but some versions
>> of u-boot don't identify xM rev C correctly, so never turn it on ..
>>
>>  Anyway, it's neater for the kernel to know what it's doing. And removes
>> a whole two lines of kernel startup output :-)
>
> I have did similar thing as well, but it did not helped. The two line
> complaining about the regulator was gone, but still neither the ethernet
> nor the USB ports were working.
> The LED between the USB ports are lit, shich indicates that the LAN9514
> should have the needed power.
> With the REGULATOR_DUMMY enabled I have this in the kernel log:
>
> beagle-gentoo ~ # dmesg | grep ehci-omap
> [    1.443420] _regulator_get: ehci-omap.0 supply hsusb0 not found,
> using dummy regulator
> [    1.452026] _regulator_get: ehci-omap.0 supply hsusb1 not found,
> using dummy regulator
> [    2.465637] ehci-omap ehci-omap.0: phy reset operation timed out
> [    3.473449] ehci-omap ehci-omap.0: phy reset operation timed out
> [    3.479766] ehci-omap ehci-omap.0: reset hcs_params 0x1313 dbg=0 cc=1
> pcc=3 ordered ports=3
> [    3.488586] ehci-omap ehci-omap.0: reset hcc_params 0016 thresh 1
> uframes 256/512/1024 park
> [    3.497436] ehci-omap ehci-omap.0: reset command 0080b02  park=3
> ithresh=8 period=1024 Reset HALT
> [    3.506774] ehci-omap ehci-omap.0: OMAP-EHCI Host Controller
> [    3.524871] ehci-omap ehci-omap.0: new USB bus registered, assigned
> bus number 1
> [    3.532806] ehci-omap ehci-omap.0: park 0
> [    3.537139] ehci-omap ehci-omap.0: irq 77, io mem 0x48064800
> [    3.543121] ehci-omap ehci-omap.0: init command 0010005 (park)=0
> ithresh=1 period=512 RUN
> [    3.567260] ehci-omap ehci-omap.0: USB 2.0 started, EHCI 1.00
> [    3.609771] usb usb1: SerialNumber: ehci-omap.0
> [    3.690460] ehci-omap ehci-omap.0: ...powerup ports...
>
> I have a faint recollection that the ethernet port along with the USB
> ports were working in some ancient kernel (2.6.3x) - I think it was the
> distro which come with board...
>
> It might be that I have everything built into the kernel?
> Will debug this further when time allows...

The issue seems to a mux conflict issue, uart2_rx mux is been taken
by uart init and gpio_147 needed for usb phy init is not in mux mode4
as set by bootloader.

On beagle I see no other uarts being used other than uart3 as console_uart.
So I think it should be okay to init only uart3 from beagle board data.
Here is the patch [1] to do the same. (Tested on Beagle Xm Rev.C)

(Any other approach is welcome)

[1]:


>From f1b43f983a2926c637e6bc6ab5d1e5044339ffd3 Mon Sep 17 00:00:00 2001
From: "Govindraj.R" <govindraj.raja@ti.com>
Date: Tue, 28 Feb 2012 19:16:33 +0530
Subject: [PATCH] omap3_beagle: Init only uart3 used for console

On beagle some of uart mux lines are used for other
purpose so init only uart3.

Uart2 rx line clashes with gpio_147 used for usb ehci
phy reset.

Signed-off-by: Govindraj.R <govindraj.raja@ti.com>
---
 arch/arm/mach-omap2/board-omap3beagle.c |   50 ++++++++++++++++++++++++++++++-
 1 files changed, 49 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-omap2/board-omap3beagle.c
b/arch/arm/mach-omap2/board-omap3beagle.c
index 817be06..a2e0052 100644
--- a/arch/arm/mach-omap2/board-omap3beagle.c
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
@@ -493,6 +493,54 @@ static const struct usbhs_omap_board_data
usbhs_bdata __initconst = {
 static struct omap_board_mux board_mux[] __initdata = {
 	{ .reg_offset = OMAP_MUX_TERMINATOR },
 };
+
+static struct omap_device_pad uart3_pads[] __initdata = {
+	{
+		.name	= "uart3_cts_rctx.uart3_cts_rctx",
+		.enable	= OMAP_PIN_INPUT_PULLUP | OMAP_MUX_MODE0,
+	},
+	{
+		.name	= "uart3_rts_sd.uart3_rts_sd",
+		.enable	= OMAP_PIN_OUTPUT | OMAP_MUX_MODE0,
+	},
+	{
+		.name	= "uart3_tx_irtx.uart3_tx_irtx",
+		.enable	= OMAP_PIN_OUTPUT | OMAP_MUX_MODE0,
+	},
+	{
+		.name	= "uart3_rx_irrx.uart3_rx_irrx",
+		.flags	= OMAP_DEVICE_PAD_REMUX | OMAP_DEVICE_PAD_WAKEUP,
+		.enable	= OMAP_PIN_INPUT | OMAP_MUX_MODE0,
+		.idle	= OMAP_PIN_INPUT | OMAP_MUX_MODE0,
+	},
+};
+
+static inline void board_serial_init(void)
+{
+	struct omap_board_data uart3_bdata;
+	uart3_bdata.flags     = 0;
+	uart3_bdata.pads      = uart3_pads;
+	uart3_bdata.pads_cnt  = ARRAY_SIZE(uart3_pads);
+	uart3_bdata.id        = 2;
+
+	/*
+	 * Init only uart3 used as console
+	 * don't init other uarts as uart mux lines
+	 * might be used for other purpose on beagle board
+	 * ex: uart2_rx used by gpio_147 for usb_ehci phy reset.
+	 */
+	omap_serial_init_port(&uart3_bdata, NULL);
+}
+#else
+
+/*
+ * If mux is disabled from kernel probably we
+ * are relying on boot-loaders so we init all uarts
+ */
+static inline void board_serial_init(void)
+{
+	omap_serial_init();
+}
 #endif

 static void __init beagle_opp_init(void)
@@ -549,7 +597,7 @@ static void __init omap3_beagle_init(void)
 	platform_add_devices(omap3_beagle_devices,
 			ARRAY_SIZE(omap3_beagle_devices));
 	omap_display_init(&beagle_dss_data);
-	omap_serial_init();
+	board_serial_init();
 	omap_sdrc_init(mt46h32m32lf6_sdrc_params,
 				  mt46h32m32lf6_sdrc_params);

-- 
1.7.5.4

[-- Attachment #2: 0001-omap3_beagle-Init-only-uart3-used-for-console.patch --]
[-- Type: application/octet-stream, Size: 2584 bytes --]

From f1b43f983a2926c637e6bc6ab5d1e5044339ffd3 Mon Sep 17 00:00:00 2001
From: "Govindraj.R" <govindraj.raja@ti.com>
Date: Tue, 28 Feb 2012 19:16:33 +0530
Subject: [PATCH] omap3_beagle: Init only uart3 used for console

On beagle some of uart mux lines are used for other
purpose so init only uart3.

Uart2 rx line clashes with gpio_147 used for usb ehci
phy reset.

Signed-off-by: Govindraj.R <govindraj.raja@ti.com>
---
 arch/arm/mach-omap2/board-omap3beagle.c |   50 ++++++++++++++++++++++++++++++-
 1 files changed, 49 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
index 817be06..a2e0052 100644
--- a/arch/arm/mach-omap2/board-omap3beagle.c
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
@@ -493,6 +493,54 @@ static const struct usbhs_omap_board_data usbhs_bdata __initconst = {
 static struct omap_board_mux board_mux[] __initdata = {
 	{ .reg_offset = OMAP_MUX_TERMINATOR },
 };
+
+static struct omap_device_pad uart3_pads[] __initdata = {
+	{
+		.name	= "uart3_cts_rctx.uart3_cts_rctx",
+		.enable	= OMAP_PIN_INPUT_PULLUP | OMAP_MUX_MODE0,
+	},
+	{
+		.name	= "uart3_rts_sd.uart3_rts_sd",
+		.enable	= OMAP_PIN_OUTPUT | OMAP_MUX_MODE0,
+	},
+	{
+		.name	= "uart3_tx_irtx.uart3_tx_irtx",
+		.enable	= OMAP_PIN_OUTPUT | OMAP_MUX_MODE0,
+	},
+	{
+		.name	= "uart3_rx_irrx.uart3_rx_irrx",
+		.flags	= OMAP_DEVICE_PAD_REMUX | OMAP_DEVICE_PAD_WAKEUP,
+		.enable	= OMAP_PIN_INPUT | OMAP_MUX_MODE0,
+		.idle	= OMAP_PIN_INPUT | OMAP_MUX_MODE0,
+	},
+};
+
+static inline void board_serial_init(void)
+{
+	struct omap_board_data uart3_bdata;
+	uart3_bdata.flags     = 0;
+	uart3_bdata.pads      = uart3_pads;
+	uart3_bdata.pads_cnt  = ARRAY_SIZE(uart3_pads);
+	uart3_bdata.id        = 2;
+
+	/*
+	 * Init only uart3 used as console
+	 * don't init other uarts as uart mux lines
+	 * might be used for other purpose on beagle board
+	 * ex: uart2_rx used by gpio_147 for usb_ehci phy reset.
+	 */
+	omap_serial_init_port(&uart3_bdata, NULL);
+}
+#else
+
+/*
+ * If mux is disabled from kernel probably we
+ * are relying on boot-loaders so we init all uarts
+ */
+static inline void board_serial_init(void)
+{
+	omap_serial_init();
+}
 #endif
 
 static void __init beagle_opp_init(void)
@@ -549,7 +597,7 @@ static void __init omap3_beagle_init(void)
 	platform_add_devices(omap3_beagle_devices,
 			ARRAY_SIZE(omap3_beagle_devices));
 	omap_display_init(&beagle_dss_data);
-	omap_serial_init();
+	board_serial_init();
 	omap_sdrc_init(mt46h32m32lf6_sdrc_params,
 				  mt46h32m32lf6_sdrc_params);
 
-- 
1.7.5.4


  reply	other threads:[~2012-02-28 14:04 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-17  8:24 help: BeagleBoard xM RevC ethernet port Peter Ujfalusi
2012-02-22 22:00 ` Kevin Hilman
2012-02-23 10:23   ` Richard Watts
2012-02-27 14:32     ` Peter Ujfalusi
2012-02-28 14:04       ` Govindraj [this message]
2012-02-28 15:37         ` Robert Nelson
2012-02-29 18:06           ` Brian Austin
2012-03-01  7:22             ` Govindraj
2012-03-07 20:48               ` Brian Austin
2012-03-07 20:56                 ` Brian Austin
2012-03-08  6:13                   ` Govindraj
2012-03-05  9:52         ` Peter Ujfalusi
2012-03-05 18:28           ` Tony Lindgren

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAAL8m4x=6--5irPBPdW4n0dtYuMm_UThqWEuCSyTtsm+cEx4jQ@mail.gmail.com' \
    --to=govindraj.ti@gmail.com \
    --cc=balbi@ti.com \
    --cc=khilman@ti.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=peter.ujfalusi@ti.com \
    --cc=rrw@kynesim.co.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).