RE: Help needed USB hub disconnected at resume

2014-03-05 Thread Marc Murphy
 -Original Message-
 From: Felipe Balbi [mailto:ba...@ti.com]
 Sent: 04 March 2014 23:43
 To: Marc Murphy
 Cc: 'ba...@ti.com'; 'Igor Grinberg'; Roger Quadros; linux-
 o...@vger.kernel.org
 Subject: Re: Help needed USB hub disconnected at resume
 
 On Tue, Mar 04, 2014 at 11:05:58PM +, Marc Murphy wrote:
   -Original Message-
   From: Felipe Balbi [mailto:ba...@ti.com]
   Sent: 04 March 2014 22:44
   To: Marc Murphy
   Cc: 'Igor Grinberg'; Roger Quadros; linux-omap@vger.kernel.org
   Subject: Re: Help needed USB hub disconnected at resume
  
   Hi,
  
   On Tue, Mar 04, 2014 at 10:34:56PM +, Marc Murphy wrote:
static __init void tam3517_ehci_init(void) {
/* Configure GPIO for EHCI port */
omap_mux_init_gpio(TAM3517_EHCI_RESET, OMAP_PIN_OUTPUT);
   
gpio_request(TAM3517_EHCI_RESET, USB_RESET);
gpio_direction_output(TAM3517_EHCI_RESET, 1);
gpio_export(TAM3517_EHCI_RESET, 0);
  
   why are you exporting this gpio ?
 
 
  It makes no difference whether I configure the GPIO or not.
 
 gpio_export() is only to expose the gpio to sysfs. Check if that pin is active
 high or active low. Then what you need, most likely, is something like below:
 
 gpio_direction_output(RESET, HIGH);
 usleep_range(5, 200);
 gpio_set_value(RESET, LOW);
 
 (assuming active high here)

Thanks, the export was for sysfs so that I could toggle the state myself to 
debug.  The reference has now been removed and the toggling left to the driver 
(ehci)

Igor, I have been looking at the ehci driver and the reset pin of the 3320 is 
toggled at initialisation but there is no resetting when resuming from sleep.  
I have created a resume function;

static void ehci_hcd_omap_resume(struct platform_device *pdev)
{
struct device *dev  = pdev-dev;
struct usb_hcd *hcd = dev_get_drvdata(dev);
struct ehci_hcd_omap_platform_data *pdata   = dev-platform_data;


if (pdata-phy_reset) {
if (gpio_is_valid(pdata-reset_gpio_port[0]))
gpio_set_value(pdata-reset_gpio_port[0], 0);

if (gpio_is_valid(pdata-reset_gpio_port[1]))
gpio_set_value(pdata-reset_gpio_port[1], 0);

/* Hold the PHY in RESET for enough time till DIR is high */
udelay(100);
}

if (pdata-phy_reset) {
/* Hold the PHY in RESET for enough time till
 * PHY is settled and ready
 */
udelay(10);

if (gpio_is_valid(pdata-reset_gpio_port[0]))
gpio_set_value(pdata-reset_gpio_port[0], 1);

if (gpio_is_valid(pdata-reset_gpio_port[1]))
gpio_set_value(pdata-reset_gpio_port[1], 1);
}
}

And linked in the static struct platform_driver ehci_hcd_omap_driver = {
.resume = ehci_hcd_omap_resume,

It calls the function at resume and I can see the line toggle on the scope but 
still the same response from the driver of disconnecting the hub.

I have even stepped through ehci_bus_resume (struct usb_hcd *hcd) and it all 
seems to be OK with the bringup.

Is there any way to enable more debug so that I can see the path through the pm 
and hci code ?

I have enabled dynamic debug in the kernel but when I pass the dyndbg modules 
on the command line I don't seem to get any additional output... e.g.
rootfstype=nfs ip=dhcp nohlt no_console_suspend=1 dyndbg= module ehci_hcd +p ; 
module uhci_hcd +p ; module ohci_hcd +p rw


Marc
 
 --
 balbi
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: Help needed USB hub disconnected at resume

2014-03-04 Thread Marc Murphy



 Hi Igor

 The Hub is a Microchip USB2513B-AEZG and is connected to EHCI controller 
 port via the DUP_P and DUP_N pins.  There is a reset applied to the chip at 
 power on.


If the reset signal is sw controllable, you might want to toggle it
before the EHCI controller resumes.

The reset control is currently connected to the system reset signal that is 
generated at power up.  I will disconnect it and try mapping it to a GPIO.

There is also a USB phy on the way from EHCI controller to the hub.
You might also want to check if the phy resumes correctly.
Which phy do you use and how is it reset?

From what I can see the USB2513B IC has the Phy built in and is connected 
directly to the AM3517.  I am having the hardware engineer look into it but 
from what I can see on the circuit diagram its a direct connection.

Regards
Marc
 Regards
 Marc
 
 From: Igor Grinberg [grinb...@compulab.co.il]
 Sent: 03 March 2014 12:16
 To: Roger Quadros; Marc Murphy; linux-omap@vger.kernel.org
 Subject: Re: Help needed USB hub disconnected at resume

 On 03/03/14 13:06, Roger Quadros wrote:
 Hi Marc,

 On 03/03/2014 12:04 PM, Marc Murphy wrote:
 Hi,
 I am using the latest stable 3.4.80 kernel with some changes to get the 
 EMAC Phy to initialise correctly after a suspend/resume.  The platform is 
 AM3517 with most of the system working nice and smoothly. I have 1 issue 
 though and need some advice/help to get the system to use the USB hub I 
 have connected to the EHCI controller after a suspend to memory and resume.

 At boot all is recognised;

 [1.486816] usbcore: registered new interface driver cdc_ether
 [1.493255] usbcore: registered new interface driver cdc_ncm
 [1.499450] usbcore: registered new interface driver qmi_wwan
 [1.506622] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
 [1.513580] ehci-omap.0 supply hsusb0 not found, using dummy regulator
 [2.521881] ehci-omap ehci-omap.0: OMAP-EHCI Host Controller
 [2.528411] ehci-omap ehci-omap.0: new USB bus registered, assigned bus 
 number 1
 [2.536468] ehci-omap ehci-omap.0: irq 77, io mem 0x48064800
 [2.553070] ehci-omap ehci-omap.0: USB 2.0 started, EHCI 1.00
 [2.559295] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
 [2.566436] usb usb1: New USB device strings: Mfr=3, Product=2, 
 SerialNumber=1
 [2.574035] usb usb1: Product: OMAP-EHCI Host Controller
 [2.579620] usb usb1: Manufacturer: Linux 3.4.80 ehci_hcd
 [2.585296] usb usb1: SerialNumber: ehci-omap.0
 [2.591278] hub 1-0:1.0: USB hub found
 [2.595306] hub 1-0:1.0: 3 ports detected

 And I can see everything OK.

 # lsusb
 Bus 001 Device 002: ID 0424:2513 Standard Microsystems Corp. 2.0 Hub
 Bus 002 Device 002: ID 05e3:0718 Genesys Logic, Inc. IDE/SATA Adapter
 Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
 Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
 Bus 001 Device 003: ID 1199:68a2 Sierra Wireless, Inc.
 #
 #
 # echo mem  /sys/power/state
 [   73.736572] PM: Syncing filesystems ... done.
 [   73.743530] Freezing user space processes ... (elapsed 0.01 seconds) 
 done.
 [   73.766784] Freezing remaining freezable tasks ... (elapsed 0.02 
 seconds) done.
 [   73.959289] davinci_mdio davinci_mdio.0: timed out waiting for idle
 [   73.968872] PM: suspend of devices complete after 170.410 msecs
 [   73.975433] PM: late suspend of devices complete after 0.305 msecs
 [   73.982635] PM: noirq suspend of devices complete after 0.732 msecs
 [   83.430450] Powerdomain (core_pwrdm) didn't enter target state 1
 [   83.436737] Could not enter target state in pm_suspend
 [   83.443176] PM: noirq resume of devices complete after 0.915 msecs
  [   83.450164] PM: early resume of devices complete after 0.274 msecs
 [   83.457336] 6Waiting for PHY clock good...
 [   83.463287] davinci_mdio davinci_mdio.0: resetting idled controller
 [   83.471343] net eth0: attached PHY driver [SMSC LAN8710/LAN8720] 
 (mii_bus:phy_addr=davinci_mdio-0:00, id=7c0f1)
 [   84.771881] PM: resume of devices complete after 1315.185 msecs
 [   84.778472] Restarting tasks ...
 [   84.782379] usb 1-1: USB disconnect, device number 2
 [   84.790557] done.
 [   84.792938] mmc0: mmc_rescan_try_freq: trying to init card at 40 Hz
 sh: write error:[   84.800781] usb 1-1.1: USB disconnect, device number 3
  Operation not p[   84.808349] qmi_wwan 1-1.1:1.8: wwan0: unregister 
 'qmi_wwan' usb-ehci-omap.0-1.1, Sierra Wireless wwan/QMI device
 ermitted
 [   84.859191] mmc1: mmc_rescan_try_freq: trying to init card at 40 Hz
 [   86.490356] PHY: davinci_mdio-0:00 - Link is Up - 100/Full
 #
 #
 # lsusb
 Bus 002 Device 002: ID 05e3:0718 Genesys Logic, Inc. IDE/SATA Adapter
 Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
 Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
 #

 Is there any relevant patch out there that would address the issue that I 
 see ?

 Does

RE: Help needed USB hub disconnected at resume

2014-03-04 Thread Marc Murphy
 -Original Message-
 From: linux-omap-ow...@vger.kernel.org [mailto:linux-omap-
 ow...@vger.kernel.org] On Behalf Of Igor Grinberg
 Sent: 04 March 2014 06:44
 To: Marc Murphy; Roger Quadros; linux-omap@vger.kernel.org
 Subject: Re: Help needed USB hub disconnected at resume
 
 On 03/03/14 16:11, Marc Murphy wrote:
  Hi Igor
 
  The Hub is a Microchip USB2513B-AEZG and is connected to EHCI controller
 port via the DUP_P and DUP_N pins.  There is a reset applied to the chip at
 power on.
 
 
 If the reset signal is sw controllable, you might want to toggle it before the
 EHCI controller resumes.

 There is also a USB phy on the way from EHCI controller to the hub.
 You might also want to check if the phy resumes correctly.
 Which phy do you use and how is it reset?

I have now had a look with the schematics and the hardware engineer.  
The AM3517 has a PHY connected and it is a SMSC USB3320.  The device has a 
reset connection via GPIO_25.

I have it configured as follows

#define TAM3517_EHCI_RESET  25

static const struct usbhs_omap_board_data tam3517_ehci_pdata __initconst = {
.port_mode[0] = OMAP_EHCI_PORT_MODE_PHY,
.port_mode[1] = OMAP_USBHS_PORT_MODE_UNUSED,
.port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED,

.phy_reset  = true,
.reset_gpio_port[0]  = TAM3517_EHCI_RESET,
.reset_gpio_port[1]  = -EINVAL,
.reset_gpio_port[2]  = -EINVAL
};

static __init void tam3517_ehci_init(void)
{
/* Configure GPIO for EHCI port */
omap_mux_init_gpio(TAM3517_EHCI_RESET, OMAP_PIN_OUTPUT);

gpio_request(TAM3517_EHCI_RESET, USB_RESET);
gpio_direction_output(TAM3517_EHCI_RESET, 1);
gpio_export(TAM3517_EHCI_RESET, 0);
msleep(100);
gpio_set_value(TAM3517_EHCI_RESET, 1);

usbhs_init(tam3517_ehci_pdata);
}

I have tried without the phy reset control but stull get the same behaviour.

I have asked for some tap wires onto the control signals for the Phy and I will 
 have a look with a scope to make sure the pin is toggled correctly.

If you see anything wrong with the initialisation then please let me know.

Thanks
Marc

 
  Regards
  Marc
  
  From: Igor Grinberg [grinb...@compulab.co.il]
  Sent: 03 March 2014 12:16
  To: Roger Quadros; Marc Murphy; linux-omap@vger.kernel.org
  Subject: Re: Help needed USB hub disconnected at resume
 
  On 03/03/14 13:06, Roger Quadros wrote:
  Hi Marc,
 
  On 03/03/2014 12:04 PM, Marc Murphy wrote:
  Hi,
  I am using the latest stable 3.4.80 kernel with some changes to get the
 EMAC Phy to initialise correctly after a suspend/resume.  The platform is
 AM3517 with most of the system working nice and smoothly. I have 1 issue
 though and need some advice/help to get the system to use the USB hub I
 have connected to the EHCI controller after a suspend to memory and
 resume.
 
  At boot all is recognised;
 
  [1.486816] usbcore: registered new interface driver cdc_ether
  [1.493255] usbcore: registered new interface driver cdc_ncm
  [1.499450] usbcore: registered new interface driver qmi_wwan
  [1.506622] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
  [1.513580] ehci-omap.0 supply hsusb0 not found, using dummy
 regulator
  [2.521881] ehci-omap ehci-omap.0: OMAP-EHCI Host Controller
  [2.528411] ehci-omap ehci-omap.0: new USB bus registered, assigned
 bus number 1
  [2.536468] ehci-omap ehci-omap.0: irq 77, io mem 0x48064800
  [2.553070] ehci-omap ehci-omap.0: USB 2.0 started, EHCI 1.00
  [2.559295] usb usb1: New USB device found, idVendor=1d6b,
 idProduct=0002
  [2.566436] usb usb1: New USB device strings: Mfr=3, Product=2,
 SerialNumber=1
  [2.574035] usb usb1: Product: OMAP-EHCI Host Controller
  [2.579620] usb usb1: Manufacturer: Linux 3.4.80 ehci_hcd
  [2.585296] usb usb1: SerialNumber: ehci-omap.0
  [2.591278] hub 1-0:1.0: USB hub found
  [2.595306] hub 1-0:1.0: 3 ports detected
 
  And I can see everything OK.
 
  # lsusb
  Bus 001 Device 002: ID 0424:2513 Standard Microsystems Corp. 2.0 Hub
  Bus 002 Device 002: ID 05e3:0718 Genesys Logic, Inc. IDE/SATA
  Adapter Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root
  hub Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
  Bus 001 Device 003: ID 1199:68a2 Sierra Wireless, Inc.
  #
  #
  # echo mem  /sys/power/state
  [   73.736572] PM: Syncing filesystems ... done.
  [   73.743530] Freezing user space processes ... (elapsed 0.01 seconds)
 done.
  [   73.766784] Freezing remaining freezable tasks ... (elapsed 0.02
 seconds) done.
  [   73.959289] davinci_mdio davinci_mdio.0: timed out waiting for idle
  [   73.968872] PM: suspend of devices complete after 170.410 msecs
  [   73.975433] PM: late suspend of devices complete after 0.305 msecs
  [   73.982635] PM: noirq suspend of devices complete after 0.732 msecs
  [   83.430450] Powerdomain (core_pwrdm) didn't enter target state 1
  [   83.436737] Could not enter target state in pm_suspend

Help needed USB hub disconnected at resume

2014-03-03 Thread Marc Murphy
Hi,
I am using the latest stable 3.4.80 kernel with some changes to get the EMAC 
Phy to initialise correctly after a suspend/resume.  The platform is AM3517 
with most of the system working nice and smoothly. I have 1 issue though and 
need some advice/help to get the system to use the USB hub I have connected to 
the EHCI controller after a suspend to memory and resume.

At boot all is recognised;

[1.486816] usbcore: registered new interface driver cdc_ether
[1.493255] usbcore: registered new interface driver cdc_ncm
[1.499450] usbcore: registered new interface driver qmi_wwan
[1.506622] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[1.513580] ehci-omap.0 supply hsusb0 not found, using dummy regulator
[2.521881] ehci-omap ehci-omap.0: OMAP-EHCI Host Controller
[2.528411] ehci-omap ehci-omap.0: new USB bus registered, assigned bus 
number 1
[2.536468] ehci-omap ehci-omap.0: irq 77, io mem 0x48064800
[2.553070] ehci-omap ehci-omap.0: USB 2.0 started, EHCI 1.00
[2.559295] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[2.566436] usb usb1: New USB device strings: Mfr=3, Product=2, 
SerialNumber=1
[2.574035] usb usb1: Product: OMAP-EHCI Host Controller
[2.579620] usb usb1: Manufacturer: Linux 3.4.80 ehci_hcd
[2.585296] usb usb1: SerialNumber: ehci-omap.0
[2.591278] hub 1-0:1.0: USB hub found
[2.595306] hub 1-0:1.0: 3 ports detected

And I can see everything OK.

# lsusb
Bus 001 Device 002: ID 0424:2513 Standard Microsystems Corp. 2.0 Hub
Bus 002 Device 002: ID 05e3:0718 Genesys Logic, Inc. IDE/SATA Adapter
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 1199:68a2 Sierra Wireless, Inc.
#
#
# echo mem  /sys/power/state
[   73.736572] PM: Syncing filesystems ... done.
[   73.743530] Freezing user space processes ... (elapsed 0.01 seconds) done.
[   73.766784] Freezing remaining freezable tasks ... (elapsed 0.02 seconds) 
done.
[   73.959289] davinci_mdio davinci_mdio.0: timed out waiting for idle
[   73.968872] PM: suspend of devices complete after 170.410 msecs
[   73.975433] PM: late suspend of devices complete after 0.305 msecs
[   73.982635] PM: noirq suspend of devices complete after 0.732 msecs
[   83.430450] Powerdomain (core_pwrdm) didn't enter target state 1
[   83.436737] Could not enter target state in pm_suspend
[   83.443176] PM: noirq resume of devices complete after 0.915 msecs
 [   83.450164] PM: early resume of devices complete after 0.274 msecs
[   83.457336] 6Waiting for PHY clock good...
[   83.463287] davinci_mdio davinci_mdio.0: resetting idled controller
[   83.471343] net eth0: attached PHY driver [SMSC LAN8710/LAN8720] 
(mii_bus:phy_addr=davinci_mdio-0:00, id=7c0f1)
[   84.771881] PM: resume of devices complete after 1315.185 msecs
[   84.778472] Restarting tasks ...
[   84.782379] usb 1-1: USB disconnect, device number 2
[   84.790557] done.
[   84.792938] mmc0: mmc_rescan_try_freq: trying to init card at 40 Hz
sh: write error:[   84.800781] usb 1-1.1: USB disconnect, device number 3
 Operation not p[   84.808349] qmi_wwan 1-1.1:1.8: wwan0: unregister 'qmi_wwan' 
usb-ehci-omap.0-1.1, Sierra Wireless wwan/QMI device
ermitted
[   84.859191] mmc1: mmc_rescan_try_freq: trying to init card at 40 Hz
[   86.490356] PHY: davinci_mdio-0:00 - Link is Up - 100/Full
#
#
# lsusb
Bus 002 Device 002: ID 05e3:0718 Genesys Logic, Inc. IDE/SATA Adapter
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
#

Is there any relevant patch out there that would address the issue that I see ?

Kind Regards
Marc
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: Help needed USB hub disconnected at resume

2014-03-03 Thread Marc Murphy
Hi Igor

The Hub is a Microchip USB2513B-AEZG and is connected to EHCI controller port 
via the DUP_P and DUP_N pins.  There is a reset applied to the chip at power on.

Regards
Marc

From: Igor Grinberg [grinb...@compulab.co.il]
Sent: 03 March 2014 12:16
To: Roger Quadros; Marc Murphy; linux-omap@vger.kernel.org
Subject: Re: Help needed USB hub disconnected at resume

On 03/03/14 13:06, Roger Quadros wrote:
 Hi Marc,

 On 03/03/2014 12:04 PM, Marc Murphy wrote:
 Hi,
 I am using the latest stable 3.4.80 kernel with some changes to get the EMAC 
 Phy to initialise correctly after a suspend/resume.  The platform is AM3517 
 with most of the system working nice and smoothly. I have 1 issue though and 
 need some advice/help to get the system to use the USB hub I have connected 
 to the EHCI controller after a suspend to memory and resume.

 At boot all is recognised;

 [1.486816] usbcore: registered new interface driver cdc_ether
 [1.493255] usbcore: registered new interface driver cdc_ncm
 [1.499450] usbcore: registered new interface driver qmi_wwan
 [1.506622] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
 [1.513580] ehci-omap.0 supply hsusb0 not found, using dummy regulator
 [2.521881] ehci-omap ehci-omap.0: OMAP-EHCI Host Controller
 [2.528411] ehci-omap ehci-omap.0: new USB bus registered, assigned bus 
 number 1
 [2.536468] ehci-omap ehci-omap.0: irq 77, io mem 0x48064800
 [2.553070] ehci-omap ehci-omap.0: USB 2.0 started, EHCI 1.00
 [2.559295] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
 [2.566436] usb usb1: New USB device strings: Mfr=3, Product=2, 
 SerialNumber=1
 [2.574035] usb usb1: Product: OMAP-EHCI Host Controller
 [2.579620] usb usb1: Manufacturer: Linux 3.4.80 ehci_hcd
 [2.585296] usb usb1: SerialNumber: ehci-omap.0
 [2.591278] hub 1-0:1.0: USB hub found
 [2.595306] hub 1-0:1.0: 3 ports detected

 And I can see everything OK.

 # lsusb
 Bus 001 Device 002: ID 0424:2513 Standard Microsystems Corp. 2.0 Hub
 Bus 002 Device 002: ID 05e3:0718 Genesys Logic, Inc. IDE/SATA Adapter
 Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
 Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
 Bus 001 Device 003: ID 1199:68a2 Sierra Wireless, Inc.
 #
 #
 # echo mem  /sys/power/state
 [   73.736572] PM: Syncing filesystems ... done.
 [   73.743530] Freezing user space processes ... (elapsed 0.01 seconds) done.
 [   73.766784] Freezing remaining freezable tasks ... (elapsed 0.02 seconds) 
 done.
 [   73.959289] davinci_mdio davinci_mdio.0: timed out waiting for idle
 [   73.968872] PM: suspend of devices complete after 170.410 msecs
 [   73.975433] PM: late suspend of devices complete after 0.305 msecs
 [   73.982635] PM: noirq suspend of devices complete after 0.732 msecs
 [   83.430450] Powerdomain (core_pwrdm) didn't enter target state 1
 [   83.436737] Could not enter target state in pm_suspend
 [   83.443176] PM: noirq resume of devices complete after 0.915 msecs
  [   83.450164] PM: early resume of devices complete after 0.274 msecs
 [   83.457336] 6Waiting for PHY clock good...
 [   83.463287] davinci_mdio davinci_mdio.0: resetting idled controller
 [   83.471343] net eth0: attached PHY driver [SMSC LAN8710/LAN8720] 
 (mii_bus:phy_addr=davinci_mdio-0:00, id=7c0f1)
 [   84.771881] PM: resume of devices complete after 1315.185 msecs
 [   84.778472] Restarting tasks ...
 [   84.782379] usb 1-1: USB disconnect, device number 2
 [   84.790557] done.
 [   84.792938] mmc0: mmc_rescan_try_freq: trying to init card at 40 Hz
 sh: write error:[   84.800781] usb 1-1.1: USB disconnect, device number 3
  Operation not p[   84.808349] qmi_wwan 1-1.1:1.8: wwan0: unregister 
 'qmi_wwan' usb-ehci-omap.0-1.1, Sierra Wireless wwan/QMI device
 ermitted
 [   84.859191] mmc1: mmc_rescan_try_freq: trying to init card at 40 Hz
 [   86.490356] PHY: davinci_mdio-0:00 - Link is Up - 100/Full
 #
 #
 # lsusb
 Bus 002 Device 002: ID 05e3:0718 Genesys Logic, Inc. IDE/SATA Adapter
 Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
 Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
 #

 Is there any relevant patch out there that would address the issue that I 
 see ?

 Does this happen because of OFF mode?
 Can you please try the tests with off mode disabled?

 e.g.
 mount -t debugfs none /sys/kernel/debug
 echo 0  /sys/kernel/debug/pm_debug/enable_off_mode
 suspend  resume

AFAIK, AM3517 does not have OFF mode.
We had something similar with runtime pm...
It might be useful to know which hub is this and how is it connected...


 Also please send the output of /sys/kernel/debug/pm_debug/count
 before suspend and after resume. Thanks.



--
Regards,
Igor.
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


USB hub disconnected at resume ???

2014-02-27 Thread Marc Murphy
Hello All,
I have had an interesting journey getting my AM3517 system to reliably use the 
suspend to RAM and resume from a GPIO signal.
After a lot of investigation and some patches I now have a stable kernel 
booting and coming in and out of suspend.

The kernel is latest stable 3.4.80 with some changes to get the EMAC Phy to 
initialise correctly after a suspend/resume.

I have 1 issue though and need some advice/help to get the system to use the 
USB hub I have connected to the EHCI controller.  At boot all is recognised;

[1.486816] usbcore: registered new interface driver cdc_ether
[1.493255] usbcore: registered new interface driver cdc_ncm
[1.499450] usbcore: registered new interface driver qmi_wwan
[1.506622] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[1.513580] ehci-omap.0 supply hsusb0 not found, using dummy regulator
[2.521881] ehci-omap ehci-omap.0: OMAP-EHCI Host Controller
[2.528411] ehci-omap ehci-omap.0: new USB bus registered, assigned bus 
number 1
[2.536468] ehci-omap ehci-omap.0: irq 77, io mem 0x48064800
[2.553070] ehci-omap ehci-omap.0: USB 2.0 started, EHCI 1.00
[2.559295] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[2.566436] usb usb1: New USB device strings: Mfr=3, Product=2, 
SerialNumber=1
[2.574035] usb usb1: Product: OMAP-EHCI Host Controller
[2.579620] usb usb1: Manufacturer: Linux 3.4.80 ehci_hcd
[2.585296] usb usb1: SerialNumber: ehci-omap.0
[2.591278] hub 1-0:1.0: USB hub found
[2.595306] hub 1-0:1.0: 3 ports detected

And I can see everything OK.

# lsusb
Bus 001 Device 002: ID 0424:2513 Standard Microsystems Corp. 2.0 Hub
Bus 002 Device 002: ID 05e3:0718 Genesys Logic, Inc. IDE/SATA Adapter
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 1199:68a2 Sierra Wireless, Inc.
#
#
# echo mem  /sys/power/state
[   73.736572] PM: Syncing filesystems ... done.
[   73.743530] Freezing user space processes ... (elapsed 0.01 seconds) done.
[   73.766784] Freezing remaining freezable tasks ... (elapsed 0.02 seconds) 
done.
[   73.959289] davinci_mdio davinci_mdio.0: timed out waiting for idle
[   73.968872] PM: suspend of devices complete after 170.410 msecs
[   73.975433] PM: late suspend of devices complete after 0.305 msecs
[   73.982635] PM: noirq suspend of devices complete after 0.732 msecs
[   83.430450] Powerdomain (core_pwrdm) didn't enter target state 1
[   83.436737] Could not enter target state in pm_suspend
[   83.443176] PM: noirq resume of devices complete after 0.915 msecs
 [   83.450164] PM: early resume of devices complete after 0.274 msecs
[   83.457336] 6Waiting for PHY clock good...
[   83.463287] davinci_mdio davinci_mdio.0: resetting idled controller
[   83.471343] net eth0: attached PHY driver [SMSC LAN8710/LAN8720] 
(mii_bus:phy_addr=davinci_mdio-0:00, id=7c0f1)
[   84.771881] PM: resume of devices complete after 1315.185 msecs
[   84.778472] Restarting tasks ...
[   84.782379] usb 1-1: USB disconnect, device number 2
[   84.790557] done.
[   84.792938] mmc0: mmc_rescan_try_freq: trying to init card at 40 Hz
sh: write error:[   84.800781] usb 1-1.1: USB disconnect, device number 3
 Operation not p[   84.808349] qmi_wwan 1-1.1:1.8: wwan0: unregister 'qmi_wwan' 
usb-ehci-omap.0-1.1, Sierra Wireless wwan/QMI device
ermitted
[   84.859191] mmc1: mmc_rescan_try_freq: trying to init card at 40 Hz
[   86.490356] PHY: davinci_mdio-0:00 - Link is Up - 100/Full
#
#
# lsusb
Bus 002 Device 002: ID 05e3:0718 Genesys Logic, Inc. IDE/SATA Adapter
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
#

Is there any relevant patch out there that would address the issue that I see ?

Kind Regards
Marc
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


AM3517 EVM

2014-02-06 Thread Marc Murphy
I have been trying to get the WFI working on my AM3517 and wondering about the 
nohlt command I have in the boot args and wondering if I should be able to boot 
3.6.11 kernel on the AM3517EVM without the nohlt arg ?

What config should I use (omap2plus_defconfig and then select the AM3517EVM 
option) ?

I would like to get the EVM system working properly with the sleep and wake 
before I apply the changes to my AM3517 system.

Thanks for any feedback

Marc





--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: Issues with GPIO and wake from sleep

2014-02-05 Thread Marc Murphy
I have now stepped through most of the system as it goes into the sleep state.  
It will transition into omap34xx_cpu_suspend and eventually work itself into an 
endless loop.

I have then taken a step back to see the config of the system and all kernel 
options seem to be correct with power management. 

I then looked at the boot line, I am running tftp which should be a problem for 
the suspend to ram, and there is an option of nohlt :
setenv bootargs console=${console},115200n8 ${mem_size} mpurate=${mpurate} 
${video_mode} ${extra_options} root=${nfsroot} rootfstype=nfs ip=dhcp nohlt rw

I was informed I needed to do this quite some time ago when I was having issue 
with the system booting.  Upon reading the kernel-paramters doc I see that the 
description is what I am experiencing;
nohlt   [BUGS=ARM,SH] Tells the kernel that the sleep(SH) or
wfi(ARM) instruction doesn't work correctly and not to
use it. This is also useful when using JTAG debugger.

OK so WFI doesn't work correctly, I have no WFI operating.  If I remove the 
nohlt from the boot line the system freezes;
[2.833587] voltdm_scale: No voltage scale API registered for vdd_core
[2.840454] PM: no software I/O chain control; some wakeups may be lost
[2.856536] davinci_emac davinci_emac.0: using random MAC addr: 
86:2d:4d:a4:87:3e


If I put it back in then the system boots;
[2.826354] voltdm_scale: No voltage scale API registered for vdd_mpu_iva
[2.833587] voltdm_scale: No voltage scale API registered for vdd_core
[2.840454] PM: no software I/O chain control; some wakeups may be lost
[2.856536] davinci_emac davinci_emac.0: using random MAC addr: 
86:2d:4d:a4:87:3e
[2.867065] rtc-ds1307 2-0068: setting system clock to 2000-01-01 02:55:38 
UTC (946695338)
[2.877655] davinci_mdio davinci_mdio.0: resetting idled controller
[2.884490] net eth0: attached PHY driver [SMSC LAN8710/LAN8720] 
(mii_bus:phy_addr=davinci_mdio-0:00, id=7c0f1)
[2.976226] usb 1-1: new high-speed USB device number 2 using ehci-omap
[3.132904] usb 1-1: New USB device found, idVendor=0424, idProduct=2513
[3.139953] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[3.149200] hub 1-1:1.0: USB hub found
[3.153289] hub 1-1:1.0: 3 ports detected
[5.882629] libphy: davinci_mdio-0:00 - Link is Up - 100/Full
[5.913726] Sending DHCP requests ., OK
[5.929779] IP-Config: Got DHCP answer from 0.0.0.0, my address is 10.0.0.74
[5.937744] IP-Config: Complete:
[5.941131]  device=eth0, addr=10.0.0.74, mask=255.255.255.0, gw=10.0.0.1

Surely this must be related as to why I cannot get the WFI to work ?

Is there any patch required to stop the halting of boot when not using the 
nohlt option ?

Thanks in advance

Marc


-Original Message-
From: linux-omap-ow...@vger.kernel.org 
[mailto:linux-omap-ow...@vger.kernel.org] On Behalf Of Marc Murphy
Sent: 04 February 2014 22:48
To: Tony Lindgren
Cc: linux-omap@vger.kernel.org
Subject: RE: Issues with GPIO and wake from sleep

I have been looking more into the issue I am having and it looks like the 
system isnt even entering a fully suspended state;

Tracing through the suspend sequence it looks like it is having trouble with 
void omap_sram_idle(void)

The return from pwrm_read_next is 3 (PWRDM_POWER_ON) surely the next power 
state should be 0 (PWRDM_POWER_OFF)
mpu_next_state = pwrdm_read_next_pwrst(mpu_pwrdm);


All the remaining checks are then invalid as it thinks the power domain needs 
to be on for all;
/* NEON control */
if (pwrdm_read_pwrst(neon_pwrdm) == PWRDM_POWER_ON)
pwrdm_set_next_pwrst(neon_pwrdm, mpu_next_state);

/* Enable IO-PAD and IO-CHAIN wakeups */
per_next_state = pwrdm_read_next_pwrst(per_pwrdm);
core_next_state = pwrdm_read_next_pwrst(core_pwrdm);

pwrdm_pre_transition(NULL);

/* PER */
if (per_next_state  PWRDM_POWER_ON) {
per_going_off = (per_next_state == PWRDM_POWER_OFF) ? 1 : 0;
omap2_gpio_prepare_for_idle(per_going_off);
}

/* CORE */
if (core_next_state  PWRDM_POWER_ON) {
if (core_next_state == PWRDM_POWER_OFF) {
omap3_core_save_context();
omap3_cm_save_context();
}
}

omap3_intc_prepare_idle();

Is there anywhere I can find out what omap3_pm_suspend()  is supposed to be 
doing when it traverses through the list of power domains ? 
static int omap3_pm_suspend(void)
{
struct power_state *pwrst;
int state, ret = 0;

/* Read current next_pwrsts */
list_for_each_entry(pwrst, pwrst_list, node)
pwrst-saved_state = pwrdm_read_next_pwrst(pwrst-pwrdm);
/* Set ones wanted by suspend */
list_for_each_entry(pwrst, pwrst_list, node

RE: Issues with GPIO and wake from sleep

2014-02-04 Thread Marc Murphy
I have been looking more into the issue I am having and it looks like the 
system isnt even entering a fully suspended state;

Tracing through the suspend sequence it looks like it is having trouble with
void omap_sram_idle(void)

The return from pwrm_read_next is 3 (PWRDM_POWER_ON) surely the next power 
state should be 0 (PWRDM_POWER_OFF)
mpu_next_state = pwrdm_read_next_pwrst(mpu_pwrdm);


All the remaining checks are then invalid as it thinks the power domain needs 
to be on for all;
/* NEON control */
if (pwrdm_read_pwrst(neon_pwrdm) == PWRDM_POWER_ON)
pwrdm_set_next_pwrst(neon_pwrdm, mpu_next_state);

/* Enable IO-PAD and IO-CHAIN wakeups */
per_next_state = pwrdm_read_next_pwrst(per_pwrdm);
core_next_state = pwrdm_read_next_pwrst(core_pwrdm);

pwrdm_pre_transition(NULL);

/* PER */
if (per_next_state  PWRDM_POWER_ON) {
per_going_off = (per_next_state == PWRDM_POWER_OFF) ? 1 : 0;
omap2_gpio_prepare_for_idle(per_going_off);
}

/* CORE */
if (core_next_state  PWRDM_POWER_ON) {
if (core_next_state == PWRDM_POWER_OFF) {
omap3_core_save_context();
omap3_cm_save_context();
}
}

omap3_intc_prepare_idle();

Is there anywhere I can find out what omap3_pm_suspend()  is supposed to be 
doing when it traverses through the list of power domains ? 
static int omap3_pm_suspend(void)
{
struct power_state *pwrst;
int state, ret = 0;

/* Read current next_pwrsts */
list_for_each_entry(pwrst, pwrst_list, node)
pwrst-saved_state = pwrdm_read_next_pwrst(pwrst-pwrdm);
/* Set ones wanted by suspend */
list_for_each_entry(pwrst, pwrst_list, node) {
if (omap_set_pwrdm_state(pwrst-pwrdm, pwrst-next_state))
goto restore;
if (pwrdm_clear_all_prev_pwrst(pwrst-pwrdm))
goto restore;
}

omap3_intc_suspend();

omap_sram_idle();

I think the problem lies in the system thinking it is going from an ON state to 
an ON state maybe ??

Kind Regards
Marc



-Original Message-
From: linux-omap-ow...@vger.kernel.org 
[mailto:linux-omap-ow...@vger.kernel.org] On Behalf Of Marc Murphy
Sent: 23 January 2014 09:45
To: Tony Lindgren
Cc: linux-omap@vger.kernel.org
Subject: RE: Issues with GPIO and wake from sleep

I have tried all sorts of configurations now and still cannot get the system to 
wake from GPIO.

The confusing thing is that if I use the power managements tests via debugfs I 
can make the system sleep and wakeup using the timer, so the suspend and wake 
is configured and working.

Using either method of configuring the GPIO to be an interrupt and wakeup 
source OR a GPIO key with wakeup capability results in the system just sitting 
there in the suspended state.
I know the GPIO and IRQ is working as I see the count increment in 
/proc/interrupts

I have tried debugging with JTAG but not having any luck because the core 
enters a power down state so therefore disconnects the JTAG and the debug 
session hangs.

I have also removed all devices going back to a very basic system thinking 
drivers are causing the suspend resume issue but still it stays in the sleep 
state.

All the references I can find online do not assist in getting a solution for me.

Is there anyone out there that has managed to successfully get the wake from 
suspend to memory working via a GPIO on a 3.x kernel ?

i am getting close to running out of options to make this system work.

Help appreciated and may help others out there with a similar issue.

Kind Regards
Marc


From: Tony Lindgren [t...@atomide.com]
Sent: 17 January 2014 17:39
To: Marc Murphy
Cc: linux-omap@vger.kernel.org
Subject: Re: Issues with GPIO and wake from sleep

* Marc Murphy marcm...@marcm.co.uk [140117 04:32]:
 I have resisted contacting the list with regards to an issue I am having 
 trying to get what should be a simple part of my system working but I cannot 
 find any documentation or other posts to help.

 I am using 3.6 kernel but have tried 3.12 to see if the issue has been 
 addressed in that but its exactly the same.

 I am attempting to get a GPIO to wake my AM3517 system up from a 
 suspend to memory.  I have tried with a few different options for GPIO's I 
 have available GPIO-10, GPIO-28 and GPIO-30.

 I started by using GPIO-28 and that would configure nicely and I set 
 up the interrupt handler and could see my debug when triggering the 
 input (brilliant) but for some reason I cannot use it  to wake the 
 system as it is not in the correct group for wakeup.  There is a note 
 in the Tech Ref Man -

 Only gpio_1, gpio_9, gpio_10, gpio_11, gpio_30, and gpio_31 can be used to 
 generate a direct wake-up event.

 So have to use

RE: Issues with GPIO and wake from sleep

2014-01-23 Thread Marc Murphy
I have tried all sorts of configurations now and still cannot get the system to 
wake from GPIO.

The confusing thing is that if I use the power managements tests via debugfs I 
can make the system sleep and wakeup using the timer, so the suspend and wake 
is configured and working.

Using either method of configuring the GPIO to be an interrupt and wakeup 
source OR a GPIO key with wakeup capability results in the system just sitting 
there in the suspended state.
I know the GPIO and IRQ is working as I see the count increment in 
/proc/interrupts

I have tried debugging with JTAG but not having any luck because the core 
enters a power down state so therefore disconnects the JTAG and the debug 
session hangs.

I have also removed all devices going back to a very basic system thinking 
drivers are causing the suspend resume issue but still it stays in the sleep 
state.

All the references I can find online do not assist in getting a solution for me.

Is there anyone out there that has managed to successfully get the wake from 
suspend to memory working via a GPIO on a 3.x kernel ?

i am getting close to running out of options to make this system work.

Help appreciated and may help others out there with a similar issue.

Kind Regards
Marc


From: Tony Lindgren [t...@atomide.com]
Sent: 17 January 2014 17:39
To: Marc Murphy
Cc: linux-omap@vger.kernel.org
Subject: Re: Issues with GPIO and wake from sleep

* Marc Murphy marcm...@marcm.co.uk [140117 04:32]:
 I have resisted contacting the list with regards to an issue I am having 
 trying to get what should be a simple part of my system working but I cannot 
 find any documentation or other posts to help.

 I am using 3.6 kernel but have tried 3.12 to see if the issue has been 
 addressed in that but its exactly the same.

 I am attempting to get a GPIO to wake my AM3517 system up from a suspend to 
 memory.  I have tried with a few different options for GPIO’s
 I have available GPIO-10, GPIO-28 and GPIO-30.

 I started by using GPIO-28 and that would configure nicely and I set up the 
 interrupt handler and could see my debug when triggering the input 
 (brilliant) but for some reason I cannot use it  to wake the system as it is 
 not in the correct group for wakeup.  There is a note in the Tech Ref Man -

 Only gpio_1, gpio_9, gpio_10, gpio_11, gpio_30, and gpio_31 can be used to 
 generate a direct wake-up event.

 So have to use a different one. GPIO-30 cannot be used as that holds the 
 system in reset, so all that is left is GPIO-10.
 All seems to be good for initialisation;

I think you don't need the mux wake-up bits for the first GPIO bank, it's
always powered. So just setting gpio10 as an interrupt should keep it
working through suspend. The GPIO driver has it's own idle handling for
the first bank, see _set_gpio_wakeup().

Maybe you just need to do set_irq_wake() in the interrupt number
for gpio10?

Regards,

Tony
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Issues with GPIO and wake from sleep

2014-01-17 Thread Marc Murphy
I have resisted contacting the list with regards to an issue I am having trying 
to get what should be a simple part of my system working but I cannot find any 
documentation or other posts to help.
 
I am using 3.6 kernel but have tried 3.12 to see if the issue has been 
addressed in that but its exactly the same.
 
I am attempting to get a GPIO to wake my AM3517 system up from a suspend to 
memory.  I have tried with a few different options for GPIO’s
I have available GPIO-10, GPIO-28 and GPIO-30.
 
I started by using GPIO-28 and that would configure nicely and I set up the 
interrupt handler and could see my debug when triggering the input (brilliant) 
but for some reason I cannot use it  to wake the system as it is not in the 
correct group for wakeup.  There is a note in the Tech Ref Man -

Only gpio_1, gpio_9, gpio_10, gpio_11, gpio_30, and gpio_31 can be used to 
generate a direct wake-up event.

So have to use a different one. GPIO-30 cannot be used as that holds the system 
in reset, so all that is left is GPIO-10.
All seems to be good for initialisation;
 
In the omap_board_mux I define
 
OMAP3_MUX(SYS_CLKOUT1, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLUP |
  OMAP_PIN_OFF_INPUT_PULLUP | OMAP_PIN_OFF_OUTPUT_LOW |
  OMAP_PIN_OFF_WAKEUPENABLE),
 
Then the init function and interrupt handler;
 
/
*
* Board wakeup interrupt
*
/
#define IGNITION_GPIO 10
 
static irqreturn_t detect_irq(int irq, void *_data)
{
printk(%s: irq\n, __func__);
 
return IRQ_HANDLED;
}
 
static void enable_board_wakeup_source(void)
{
int irq;
int ret;
/* GPIO_10 interrupt line */
 
gpio_request(IGNITION_GPIO, gpio_10);
gpio_direction_input(IGNITION_GPIO);
omap_mux_init_gpio(IGNITION_GPIO, OMAP_PIN_INPUT_PULLUP |
   OMAP_PIN_OFF_WAKEUPENABLE);
 
   irq = gpio_to_irq(IGNITION_GPIO);
if (request_irq(irq, detect_irq, IRQF_TRIGGER_RISING, ignition,
NULL)) {
pr_err(* %s: request_irq() failed\n, __func__);
return;
}
 
if (enable_irq_wake(irq)) {
pr_err(* %s: irq_set_irq_wake() failed\n, __func__);
return;
}
 
pr_err(** %s: set irq %u\n, __func__, irq);
}
 
But when I try and trigger the input there is no IRQ handled and I also cannot 
export the gpio in sys/class/
 
If I have a look at the mux it seems to be OK
# cd /debug/omap_mux/
# cat sys_clkout1
name: sys_clkout1.gpio_10 (0x48002a1a/0x9ea = 0x411c), b ag25, t NA
mode: OMAP_PIN_INPUT_PULLUP | OMAP_PIN_OFF_WAKEUPENABLE | OMAP_MUX_MODE4
signals: sys_clkout1 | NA | NA | NA | gpio_10 | NA | NA | safe_mode
 
There is definitely a problem as when I look at the state it says its high, 
when the input is definitely 0V
# cat /debug/gpio
GPIOs 0-31, gpio:
gpio-0   (mpu6050-irq ) in  lo
gpio-10  (gpio_10 ) in  hi
gpio-25  (USB1 PHY reset  ) out hi
 
I think there is something else taking over the pin, maybe the clock setup for 
sys_clkout1.
 
Is there any way to make it just work for my config or make GPIO-28 work to 
wake the system ?
 
Hope you have seen this before.
 
Kind Regards
Marc--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: AM35xx i2c3 issues

2013-06-29 Thread Marc Murphy
Hi Grygorii
I tried the three patches but they didn't seem to make a difference. So I put 
the JTAG on and had a look at all the register settings for i2c2 and i2c3 and 
they are all fine.

I thought to switch from the new platform I am bringing up back to the dev 
platform (Technexion twister AM3517) and try and replicate the same connections 
that I have on the target platform and i2c3 is coming up, I can talk to the rtc 
chip.

I think I will need to get the board back to the hardware guys to get them to 
check the bus for shorts or at least, what I think is the mpu6050 has been 
fitted incorrectly so it's taking the bus down.

Sorry to have raised the non i2c3 channel as an issue, it looks like it's all 
working fine.

Kind Regards
Marc

-Original Message-
From: linux-omap-ow...@vger.kernel.org 
[mailto:linux-omap-ow...@vger.kernel.org] On Behalf Of Grygorii Strashko
Sent: 27 June 2013 12:13
To: Marc Murphy
Cc: Michael Trimarchi; linux-omap@vger.kernel.org
Subject: Re: AM35xx i2c3 issues

Hi Marc,

Could you try these patches first:
https://patchwork.kernel.org/patch/2685541/
http://patchwork.ozlabs.org/patch/252639/

Then try this patch alone:
https://patchwork.kernel.org/patch/2689171/

Also could you provide your .config?  Do you have lm75 (or any other hwmon 
devices) enabled?

-grygorii

On 06/27/2013 12:15 PM, Marc Murphy wrote:
 Hi Michael,
 The bus is correctly terminated with 2.2k pullups on SCL and SDA lines.

 Kind Regards
 Marc

 
 From: Michael Trimarchi [mich...@amarulasolutions.com]
 Sent: 27 June 2013 09:46
 To: Marc Murphy
 Cc: linux-omap@vger.kernel.org
 Subject: Re: AM35xx i2c3 issues

 Hi

 On Thu, Jun 27, 2013 at 08:29:05AM +, Marc Murphy wrote:
 Hello Grygorii/All,

 I have been trying to address an issue I am having with 3.6rc6 kernel and 
 even with the latest 3.9 and trying to use i2c3 channel on an AM3517.

 I see that there has been some work done on the OMAP4 and issues with i2c 
 which looks like the controller being suspended during boot.

 I would like to know how I can enable the debug so I can see the messages 
 for warning and debug and whether anyone has tested i2c3 channel on an 
 AM3517 ?

 I find the problem a little confusing as the system initializes the 
 interfaces 1-3

 [0.168182] omap_i2c omap_i2c.1: bus 1 rev1.3.12 at 400 kHz
 [0.169830] VDCDC1: 1200 -- 1600 mV at 1200 mV normal
 [0.169830] VDCDC1: Voltage range but no REGULATOR_CHANGE_VOLTAGE
 [0.170684] VDCDC2: 3300 mV normal
 [0.171264] VDCDC3: 1800 mV normal
 [0.171905] LDO1: 1800 mV normal
 [0.172729] LDO2: 3300 mV normal
 [0.174102] omap_i2c omap_i2c.2: bus 2 rev1.3.12 at 400 kHz
 [0.187530] omap_i2c omap_i2c.3: bus 3 rev1.3.12 at 400 kHz

 But when it comes to probe the i2c3 interface for the mpu6050 that is 
 connected it fails

 [3.896606] omap_i2c omap_i2c.3: timeout waiting for bus ready
 [3.902832] inv-mpu6050: probe of 3-0068 failed with error -110


 Can you check if your bus is correctly pull up on the line?

 Michael

 If I move the mpu6050 onto the i2c2 channel it's OK so its not an issue with 
 the core omap_i2c.

 I also have a scope connected to the scl line and see no activity.  I have 
 proved to myself that the pin is connected and working by configuring as a 
 GPIO output and toggling 0/1/0 and I can see the output changing on the 
 scope.

 The mux is configured correctly from what I can see using debugfs #  
 cat /sys/kernel/debug/omap_mux/i2c3_scl
 name: i2c3_scl.i2c3_scl (0x480021c2/0x192 = 0x0100), b af14, t NA
 mode: OMAP_PIN_INPUT | OMAP_MUX_MODE0
 signals: i2c3_scl | NA | NA | NA | gpio_184 | NA | NA | safe_mode

 #  cat /sys/kernel/debug/omap_mux/i2c3_sda
 name: i2c3_sda.i2c3_sda (0x480021c4/0x194 = 0x0100), b ag14, t NA
 mode: OMAP_PIN_INPUT | OMAP_MUX_MODE0
 signals: i2c3_sda | NA | NA | NA | gpio_185 | NA | NA | safe_mode


 If I probe with i2cdetect for all 3 buses there is only an issue with 
 i2c3 # i2cdetect -r 1 WARNING! This program can confuse your I2C bus, 
 cause data loss and worse!
 I will probe file /dev/i2c-1 using read byte commands.
 I will probe address range 0x03-0x77.
 Continue? [Y/n]
   0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
 00:  -- -- -- -- -- -- -- -- -- -- -- -- --
 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
 40: -- -- -- -- -- -- -- -- UU -- -- -- -- -- -- --
 50: 50 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
 70: -- -- -- -- -- -- -- --

 # i2cdetect -r 2
 WARNING! This program can confuse your I2C bus, cause data loss and worse!
 I will probe file /dev/i2c-2 using read byte commands.
 I will probe address range 0x03-0x77.
 Continue? [Y/n]
   0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
 00:  -- -- -- -- -- -- -- -- -- -- -- -- --
 10

AM35xx i2c3 issues

2013-06-27 Thread Marc Murphy
Hello Grygorii/All,

I have been trying to address an issue I am having with 3.6rc6 kernel and even 
with the latest 3.9 and trying to use i2c3 channel on an AM3517.

I see that there has been some work done on the OMAP4 and issues with i2c which 
looks like the controller being suspended during boot.

I would like to know how I can enable the debug so I can see the messages for 
warning and debug and whether anyone has tested i2c3 channel on an AM3517 ?

I find the problem a little confusing as the system initializes the interfaces 
1-3

[0.168182] omap_i2c omap_i2c.1: bus 1 rev1.3.12 at 400 kHz
[0.169830] VDCDC1: 1200 -- 1600 mV at 1200 mV normal
[0.169830] VDCDC1: Voltage range but no REGULATOR_CHANGE_VOLTAGE
[0.170684] VDCDC2: 3300 mV normal
[0.171264] VDCDC3: 1800 mV normal
[0.171905] LDO1: 1800 mV normal
[0.172729] LDO2: 3300 mV normal
[0.174102] omap_i2c omap_i2c.2: bus 2 rev1.3.12 at 400 kHz
[0.187530] omap_i2c omap_i2c.3: bus 3 rev1.3.12 at 400 kHz

But when it comes to probe the i2c3 interface for the mpu6050 that is connected 
it fails

[3.896606] omap_i2c omap_i2c.3: timeout waiting for bus ready
[3.902832] inv-mpu6050: probe of 3-0068 failed with error -110

If I move the mpu6050 onto the i2c2 channel it’s OK so its not an issue with 
the core omap_i2c.

I also have a scope connected to the scl line and see no activity.  I have 
proved to myself that the pin is connected and working by configuring as a GPIO 
output and toggling 0/1/0 and I can see the output changing on the scope.

The mux is configured correctly from what I can see using debugfs
#  cat /sys/kernel/debug/omap_mux/i2c3_scl
name: i2c3_scl.i2c3_scl (0x480021c2/0x192 = 0x0100), b af14, t NA
mode: OMAP_PIN_INPUT | OMAP_MUX_MODE0
signals: i2c3_scl | NA | NA | NA | gpio_184 | NA | NA | safe_mode

#  cat /sys/kernel/debug/omap_mux/i2c3_sda
name: i2c3_sda.i2c3_sda (0x480021c4/0x194 = 0x0100), b ag14, t NA
mode: OMAP_PIN_INPUT | OMAP_MUX_MODE0
signals: i2c3_sda | NA | NA | NA | gpio_185 | NA | NA | safe_mode


If I probe with i2cdetect for all 3 buses there is only an issue with i2c3
# i2cdetect -r 1
WARNING! This program can confuse your I2C bus, cause data loss and worse!
I will probe file /dev/i2c-1 using read byte commands.
I will probe address range 0x03-0x77.
Continue? [Y/n]
 0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:  -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- UU -- -- -- -- -- -- --
50: 50 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --

# i2cdetect -r 2
WARNING! This program can confuse your I2C bus, cause data loss and worse!
I will probe file /dev/i2c-2 using read byte commands.
I will probe address range 0x03-0x77.
Continue? [Y/n]
 0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:  -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --

# i2cdetect -r 3
WARNING! This program can confuse your I2C bus, cause data loss and worse!
I will probe file /dev/i2c-3 using read byte commands.
I will probe address range 0x03-0x77.
Continue? [Y/n]
 0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:  [  837.943481] omap_i2c omap_i2c.3: timeout waiting for bus ready
-- [  838.958984] omap_i2c omap_i2c.3: timeout waiting for bus ready
-- [  839.974731] omap_i2c omap_i2c.3: timeout waiting for bus ready


Any pointers/help appreciated as I have the accelerometer and RTC chip 
connected on i2c3 but cannot get anything working.

Kind Regards

Marc
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: AM35xx i2c3 issues

2013-06-27 Thread Marc Murphy
Hi Michael,
The bus is correctly terminated with 2.2k pullups on SCL and SDA lines.

Kind Regards
Marc


From: Michael Trimarchi [mich...@amarulasolutions.com]
Sent: 27 June 2013 09:46
To: Marc Murphy
Cc: linux-omap@vger.kernel.org
Subject: Re: AM35xx i2c3 issues

Hi

On Thu, Jun 27, 2013 at 08:29:05AM +, Marc Murphy wrote:
 Hello Grygorii/All,

 I have been trying to address an issue I am having with 3.6rc6 kernel and 
 even with the latest 3.9 and trying to use i2c3 channel on an AM3517.

 I see that there has been some work done on the OMAP4 and issues with i2c 
 which looks like the controller being suspended during boot.

 I would like to know how I can enable the debug so I can see the messages for 
 warning and debug and whether anyone has tested i2c3 channel on an AM3517 ?

 I find the problem a little confusing as the system initializes the 
 interfaces 1-3

 [0.168182] omap_i2c omap_i2c.1: bus 1 rev1.3.12 at 400 kHz
 [0.169830] VDCDC1: 1200 -- 1600 mV at 1200 mV normal
 [0.169830] VDCDC1: Voltage range but no REGULATOR_CHANGE_VOLTAGE
 [0.170684] VDCDC2: 3300 mV normal
 [0.171264] VDCDC3: 1800 mV normal
 [0.171905] LDO1: 1800 mV normal
 [0.172729] LDO2: 3300 mV normal
 [0.174102] omap_i2c omap_i2c.2: bus 2 rev1.3.12 at 400 kHz
 [0.187530] omap_i2c omap_i2c.3: bus 3 rev1.3.12 at 400 kHz

 But when it comes to probe the i2c3 interface for the mpu6050 that is 
 connected it fails

 [3.896606] omap_i2c omap_i2c.3: timeout waiting for bus ready
 [3.902832] inv-mpu6050: probe of 3-0068 failed with error -110


Can you check if your bus is correctly pull up on the line?

Michael

 If I move the mpu6050 onto the i2c2 channel it’s OK so its not an issue with 
 the core omap_i2c.

 I also have a scope connected to the scl line and see no activity.  I have 
 proved to myself that the pin is connected and working by configuring as a 
 GPIO output and toggling 0/1/0 and I can see the output changing on the scope.

 The mux is configured correctly from what I can see using debugfs
 #  cat /sys/kernel/debug/omap_mux/i2c3_scl
 name: i2c3_scl.i2c3_scl (0x480021c2/0x192 = 0x0100), b af14, t NA
 mode: OMAP_PIN_INPUT | OMAP_MUX_MODE0
 signals: i2c3_scl | NA | NA | NA | gpio_184 | NA | NA | safe_mode

 #  cat /sys/kernel/debug/omap_mux/i2c3_sda
 name: i2c3_sda.i2c3_sda (0x480021c4/0x194 = 0x0100), b ag14, t NA
 mode: OMAP_PIN_INPUT | OMAP_MUX_MODE0
 signals: i2c3_sda | NA | NA | NA | gpio_185 | NA | NA | safe_mode


 If I probe with i2cdetect for all 3 buses there is only an issue with i2c3
 # i2cdetect -r 1
 WARNING! This program can confuse your I2C bus, cause data loss and worse!
 I will probe file /dev/i2c-1 using read byte commands.
 I will probe address range 0x03-0x77.
 Continue? [Y/n]
  0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
 00:  -- -- -- -- -- -- -- -- -- -- -- -- --
 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
 40: -- -- -- -- -- -- -- -- UU -- -- -- -- -- -- --
 50: 50 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
 70: -- -- -- -- -- -- -- --

 # i2cdetect -r 2
 WARNING! This program can confuse your I2C bus, cause data loss and worse!
 I will probe file /dev/i2c-2 using read byte commands.
 I will probe address range 0x03-0x77.
 Continue? [Y/n]
  0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
 00:  -- -- -- -- -- -- -- -- -- -- -- -- --
 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
 70: -- -- -- -- -- -- -- --

 # i2cdetect -r 3
 WARNING! This program can confuse your I2C bus, cause data loss and worse!
 I will probe file /dev/i2c-3 using read byte commands.
 I will probe address range 0x03-0x77.
 Continue? [Y/n]
  0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
 00:  [  837.943481] omap_i2c omap_i2c.3: timeout waiting for bus ready
 -- [  838.958984] omap_i2c omap_i2c.3: timeout waiting for bus ready
 -- [  839.974731] omap_i2c omap_i2c.3: timeout waiting for bus ready


 Any pointers/help appreciated as I have the accelerometer and RTC chip 
 connected on i2c3 but cannot get anything working.

 Kind Regards

 Marc
 --
 To unsubscribe from this list: send the line unsubscribe linux-omap in
 the body of a message to majord...@vger.kernel.org
 More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


AM3517 USB and OTG issues 3.9-rc1 kernel.

2013-03-30 Thread Marc Murphy
Hello All,
I have a question about the updates/changes that have been made to the USB OTG 
support in the latest 3.9-rc1 kernel

My platform is using an AM3517 processor and I am in the progress of moving 
from 3.6 to 3.9 kernel because I need some of the iio support in the latest 3.9 
kernel.
The last hurdle I have is in trying to get the USB OTG support working in HOST 
mode, as I am using it to connect a storage device to.

If I configure the kernel in the same way as I do for 3.6 it doesn't bring the 
interface up.
The log output is ;
[0.897552] usbcore: registered new interface driver carl9170
[0.903900] usbcore: registered new interface driver cdc_ether
[0.910400] usbcore: registered new interface driver cdc_ncm
[0.917327] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[0.924499] ehci-omap.0 supply hsusb0 not found, using dummy regulator
[0.931549] ehci-omap ehci-omap.0: OMAP-EHCI Host Controller
[0.937927] ehci-omap ehci-omap.0: new USB bus registered, assigned bus 
number 1
[1.949218] ehci-omap ehci-omap.0: irq 93, io mem 0x48064800
[1.968811] ehci-omap ehci-omap.0: USB 2.0 started, EHCI 1.00
[1.975067] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[1.982269] usb usb1: New USB device strings: Mfr=3, Product=2, 
SerialNumber=1
[1.989929] usb usb1: Product: OMAP-EHCI Host Controller
[1.995544] usb usb1: Manufacturer: Linux 3.9.0-rc1 ehci_hcd
[2.001556] usb usb1: SerialNumber: ehci-omap.0
[2.007507] hub 1-0:1.0: USB hub found
[2.011596] hub 1-0:1.0: 3 ports detected
[2.016967] usbcore: registered new interface driver cdc_wdm
[2.023010] Initializing USB Mass Storage driver...
[2.028472] usbcore: registered new interface driver usb-storage
[2.034851] USB Mass Storage support registered.
[2.040283] usbcore: registered new interface driver usbserial
[2.046447] musb-hdrc: version 6.0, ?dma?, otg (peripheral+host)
[2.054107] 6Waiting for PHY clock good...
[2.070343] mousedev: PS/2 mouse device common for all mice

The output from 3.6 shows usb2 being initialised and recognising the connected 
device.
[1.369934] usbcore: registered new interface driver cdc_ether
[1.376373] usbcore: registered new interface driver cdc_ncm
[1.383361] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[1.390380] ehci-omap.0 supply hsusb0 not found, using dummy regulator
[1.397399] ehci-omap ehci-omap.0: OMAP-EHCI Host Controller
[1.403717] ehci-omap ehci-omap.0: new USB bus registered, assigned bus 
number 1
[2.443176] ehci-omap ehci-omap.0: irq 77, io mem 0x48064800
[2.458770] ehci-omap ehci-omap.0: USB 2.0 started, EHCI 1.00
[2.464935] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[2.472106] usb usb1: New USB device strings: Mfr=3, Product=2, 
SerialNumber=1
[2.479675] usb usb1: Product: OMAP-EHCI Host Controller
[2.485290] usb usb1: Manufacturer: Linux 3.6.0-rc6 ehci_hcd
[2.491241] usb usb1: SerialNumber: ehci-omap.0
[2.497039] hub 1-0:1.0: USB hub found
[2.501098] hub 1-0:1.0: 3 ports detected
[2.506134] usbcore: registered new interface driver cdc_wdm
[2.512329] usbcore: registered new interface driver uas
[2.517913] Initializing USB Mass Storage driver...
[2.523345] usbcore: registered new interface driver usb-storage
[2.529663] USB Mass Storage support registered.
[2.534484] musb-hdrc: version 6.0, ?dma?, otg (peripheral+host)
[2.541778] 6Waiting for PHY clock good...
[2.560424] musb-hdrc musb-hdrc: MUSB HDRC host driver
[2.566223] musb-hdrc musb-hdrc: new USB bus registered, assigned bus number 
2
[2.574035] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002
[2.581176] usb usb2: New USB device strings: Mfr=3, Product=2, 
SerialNumber=1
[2.588775] usb usb2: Product: MUSB HDRC host driver
[2.593994] usb usb2: Manufacturer: Linux 3.6.0-rc6 musb-hcd
[2.599945] usb usb2: SerialNumber: musb-hdrc
[2.605651] hub 2-0:1.0: USB hub found
[2.609680] hub 2-0:1.0: 1 port detected
[2.614166] musb-hdrc musb-hdrc: USB Host mode controller at d080e000 using 
PIO, IRQ 71
[2.623504] mousedev: PS/2 mouse device common for all mice

Is there a known issue with the HOST support for OTG ? Or could there be 
something missing from the config ?
I have looked but can't see anything obvious.

Any help greatly appreciated.

Thanks
Marc


--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Direct IP and USB modem

2012-10-15 Thread Marc Murphy
Hello,
I have been transitioning from 2.6.37 kernel to 3.6-rc6 and have most things 
running that I had previously.

Next hurdle is the Sierra Wireless 8705 card.  I have tried the kernel drivers 
for this device and the latest from the Sierra Wireless site but both result in 
the same.  When I try to setup the PDP context, which is needed for the setup 
of the wwan0 interface I get the following error;

Going to send : AT!SCACT=1,1
[   77.037811] sierra_net 1-1.3:1.7: wwan0: Link type unsupported: 0xff
[   77.044433] sierra_net 1-1.3:1.7: wwan0: Invalid LSI
AT!SCACT=1,1
ERROR

I have had a look in the sierra_net code and the return for Link type 
unsupported and for some reason its not configured;
    /* Validate the link type */
   if ((lsi-link_type != SIERRA_NET_AS_LINK_TYPE_IPv4) 
    (lsi-link_type != SIERRA_NET_AS_LINK_TYPE_IPv6)) {

And then the Invalid LSI is in response again to the device structure not being 
configured.

I was hoping someone out there has knowledge about additional components that 
might be needed to get this to work, or what might have changed from 2.6.37 
that needs implementing in the latest driver ?

I have also searched for other issues and it may be related, when the device is 
detected and installed there is a complaint about invalid interface number;
[   28.232543] usb 1-1.3: new high-speed USB device number 4 using ehci-omap
[   28.358734] usb 1-1.3: config 1 has an invalid interface number: 7 but max 
is 5
[   28.366424] usb 1-1.3: config 1 has no interface number 5
[   28.374114] usb 1-1.3: New USB device found, idVendor=1199, idProduct=68a3
[   28.381317] usb 1-1.3: New USB device strings: Mfr=3, Product=2, 
SerialNumber=4
[   28.388977] usb 1-1.3: Product: MC8705
[   28.392883] usb 1-1.3: Manufacturer: Sierra Wireless, Incorporated
[   28.399353] usb 1-1.3: SerialNumber: 353567040114127
[   28.466918] usbcore: registered new interface driver usbserial
[   28.473114] usbcore: registered new interface driver usbserial_generic
[   28.518005] USB Serial support registered for generic
[   28.523559] usbserial: USB Serial Driver core
[   28.531127] usbcore: registered new interface driver sierra
[   28.547454] sierra_net 1-1.3:1.7: wwan0: register 'sierra_net' at 
usb-ehci-omap.0-1.3, Sierra Wireless USB-to-WWAN Modem, a6:3d:31:a8:01:07
[   28.561248] USB Serial support registered for Sierra USB modem
[   28.573669] sierra 1-1.3:1.0: Sierra USB modem converter detected
[   28.580841] usbcore: registered new interface driver sierra_net
[   28.596099] usb 1-1.3: Sierra USB modem converter now attached to ttyUSB0
[   28.626525] sierra 1-1.3:1.1: Sierra USB modem converter detected
[   28.693054] usb 1-1.3: Sierra USB modem converter now attached to ttyUSB1
[   28.740051] sierra 1-1.3:1.2: Sierra USB modem converter detected
[   28.776702] usb 1-1.3: Sierra USB modem converter now attached to ttyUSB2
[   28.818206] sierra 1-1.3:1.3: Sierra USB modem converter detected
[   28.849243] usb 1-1.3: Sierra USB modem converter now attached to ttyUSB3
[   28.888488] sierra 1-1.3:1.4: Sierra USB modem converter detected
[   28.913116] usb 1-1.3: Sierra USB modem converter now attached to ttyUSB4

Hope someone can help.

Regards
Marc
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: Initialising omapfb on AM3517 issues

2012-09-22 Thread Marc Murphy
Hi Tomi,
Thank you for those hints... I now have the LCD displaying the bootup logo, so 
it’s a good start.

How do I push the patch for the new panel ?

/* HannStar HSD043i9W1*/
{
{
.x_res  = 480,
.y_res  = 272,

.pixel_clock= 9000,

.hsw= 41,
.hfp= 2,
.hbp= 2,

.vsw= 10,
.vfp= 2,
.vbp= 2,

.vsync_level= OMAPDSS_SIG_ACTIVE_HIGH,
.hsync_level= OMAPDSS_SIG_ACTIVE_HIGH,
.data_pclk_edge = OMAPDSS_DRIVE_SIG_RISING_EDGE,
.de_level   = OMAPDSS_SIG_ACTIVE_HIGH,
.sync_pclk_edge = OMAPDSS_DRIVE_SIG_OPPOSITE_EDGES,
},
.name   = hannstar_hsd043i9w1,
},

Regards
Marc


-Original Message-
From: Tomi Valkeinen [mailto:tomi.valkei...@ti.com] 
Sent: 19 September 2012 08:24
To: Marc Murphy
Cc: 'linux-omap@vger.kernel.org'
Subject: Re: Initialising omapfb on AM3517 issues

Hi,

On Tue, 2012-09-18 at 16:41 +, Marc Murphy wrote:
 Hello all,
 I have been moving from the ti 2.6.37 BSP to the 3.x kernel with quite a bit 
 of success, the main issue I have at the moment is trying to get the frame 
 buffer and any displays I have initialised.
 
 [2.805358] omapfb omapfb: no driver for display: lcd
 [2.810729] omapfb omapfb: no displays
 [2.814666] omapfb omapfb: failed to setup omapfb
 
 I have tried a few versions of release and none of them will 
 initialise;
 
 Currently on
 [0.00] Linux version 3.6.0-rc3
 
 I have started with board-am3517evm display config and even that doesn't 
 initialise.  Is there something I am missing with the configs or is there a 
 patch required to get the feature to work.
 
 My current config options use;
 #
 # Graphics support
 #
 CONFIG_DRM=y

omapdrm and omapfb cannot be used at the same time. That said, you don't seem 
to enable omapdrm, only the core drm support, so it shouldn't matter. But you 
don't need CONFIG_DRM if you use omapfb.

 CONFIG_FB=y
 CONFIG_FB_CFB_FILLRECT=y
 CONFIG_FB_CFB_COPYAREA=y
 CONFIG_FB_CFB_IMAGEBLIT=y
 
 #
 # Frame buffer hardware drivers
 #
 CONFIG_OMAP2_VRAM=y
 CONFIG_OMAP2_VRFB=y
 CONFIG_OMAP2_DSS=y
 CONFIG_OMAP2_VRAM_SIZE=12
 CONFIG_OMAP2_DSS_DPI=y
 CONFIG_OMAP2_DSS_VENC=y
 CONFIG_OMAP2_DSS_DSI=y
 CONFIG_OMAP2_DSS_MIN_FCK_PER_PCK=1
 CONFIG_OMAP2_DSS_SLEEP_AFTER_VENC_RESET=y
 CONFIG_FB_OMAP2=y
 CONFIG_FB_OMAP2_NUM_FBS=3
 
 #
 # OMAP2/3 Display Device Drivers
 #
 CONFIG_PANEL_GENERIC_DPI=y
 CONFIG_PANEL_SHARP_LS037V7DW01=y
 CONFIG_BACKLIGHT_LCD_SUPPORT=y
 CONFIG_LCD_CLASS_DEVICE=y
 CONFIG_BACKLIGHT_CLASS_DEVICE=y
 CONFIG_BACKLIGHT_GENERIC=y
 
 And the init structs are
 static int am3517_evm_panel_enable_lcd(struct omap_dss_device *dssdev) 
 {
 gpio_set_value(TAM3517_DVI_PON_GPIO, 0);
 gpio_set_value(TAM3517_LCD_ENVDD_GPIO, 0);
 gpio_set_value(TAM3517_LCD_PON_GPIO, 1);
 printk(LCD voltage on\n);
   return 0;
 }
 
 static void am3517_evm_panel_disable_lcd(struct omap_dss_device 
 *dssdev) {
 gpio_set_value(TAM3517_LCD_ENVDD_GPIO, 1);
 gpio_set_value(TAM3517_LCD_PON_GPIO, 0); }
 
 static struct panel_generic_dpi_data lcd_panel = {
 //.name   = generic_dpi_panel,

You need to define name for the panel you have. You can see the list of 
supported panels in drivers/video/omap2/displays/panel-generic-dpi.c. If you 
don't give a name, the panel driver doesn't start.

There's also a problem with the vdds_dsi regulator. Search the list for 
[PATCH] OMAPDSS: Do not require a VDDS_DSI regulator on am35xx. The patch to 
fix it hasn't been merged yet.

 Tomi

N�r��yb�X��ǧv�^�)޺{.n�+{��f��{ay�ʇڙ�,j��f���h���z��w���
���j:+v���w�j�mzZ+�ݢj��!�i

Initialising omapfb on AM3517 issues

2012-09-18 Thread Marc Murphy
Hello all,
I have been moving from the ti 2.6.37 BSP to the 3.x kernel with quite a bit of 
success, the main issue I have at the moment is trying to get the frame buffer 
and any displays I have initialised.

[2.805358] omapfb omapfb: no driver for display: lcd
[2.810729] omapfb omapfb: no displays
[2.814666] omapfb omapfb: failed to setup omapfb

I have tried a few versions of release and none of them will initialise;

Currently on
[0.00] Linux version 3.6.0-rc3

I have started with board-am3517evm display config and even that doesn't 
initialise.  Is there something I am missing with the configs or is there a 
patch required to get the feature to work.

My current config options use;
#
# Graphics support
#
CONFIG_DRM=y
CONFIG_FB=y
CONFIG_FB_CFB_FILLRECT=y
CONFIG_FB_CFB_COPYAREA=y
CONFIG_FB_CFB_IMAGEBLIT=y

#
# Frame buffer hardware drivers
#
CONFIG_OMAP2_VRAM=y
CONFIG_OMAP2_VRFB=y
CONFIG_OMAP2_DSS=y
CONFIG_OMAP2_VRAM_SIZE=12
CONFIG_OMAP2_DSS_DPI=y
CONFIG_OMAP2_DSS_VENC=y
CONFIG_OMAP2_DSS_DSI=y
CONFIG_OMAP2_DSS_MIN_FCK_PER_PCK=1
CONFIG_OMAP2_DSS_SLEEP_AFTER_VENC_RESET=y
CONFIG_FB_OMAP2=y
CONFIG_FB_OMAP2_NUM_FBS=3

#
# OMAP2/3 Display Device Drivers
#
CONFIG_PANEL_GENERIC_DPI=y
CONFIG_PANEL_SHARP_LS037V7DW01=y
CONFIG_BACKLIGHT_LCD_SUPPORT=y
CONFIG_LCD_CLASS_DEVICE=y
CONFIG_BACKLIGHT_CLASS_DEVICE=y
CONFIG_BACKLIGHT_GENERIC=y

And the init structs are
static int am3517_evm_panel_enable_lcd(struct omap_dss_device *dssdev)
{
gpio_set_value(TAM3517_DVI_PON_GPIO, 0);
gpio_set_value(TAM3517_LCD_ENVDD_GPIO, 0);
gpio_set_value(TAM3517_LCD_PON_GPIO, 1);
printk(LCD voltage on\n);
return 0;
}

static void am3517_evm_panel_disable_lcd(struct omap_dss_device *dssdev)
{
gpio_set_value(TAM3517_LCD_ENVDD_GPIO, 1);
gpio_set_value(TAM3517_LCD_PON_GPIO, 0);
}

static struct panel_generic_dpi_data lcd_panel = {
//.name = generic_dpi_panel,
.platform_enable= am3517_evm_panel_enable_lcd,
.platform_disable   = am3517_evm_panel_disable_lcd,
};

static struct omap_dss_device am3517_evm_lcd_device = {
.type   = OMAP_DISPLAY_TYPE_DPI,
.name   = lcd,
.driver_name= generic_dpi_panel,
.data   = lcd_panel,
.phy.dpi.data_lines = 16,
};

static int am3517_evm_panel_enable_tv(struct omap_dss_device *dssdev)
{
return 0;
}

static void am3517_evm_panel_disable_tv(struct omap_dss_device *dssdev)
{
}

static struct omap_dss_device am3517_evm_tv_device = {
.type   = OMAP_DISPLAY_TYPE_VENC,
.name   = tv,
.driver_name= venc,
.phy.venc.type  = OMAP_DSS_VENC_TYPE_SVIDEO,
.platform_enable= am3517_evm_panel_enable_tv,
.platform_disable   = am3517_evm_panel_disable_tv,
};

static struct tfp410_platform_data dvi_panel = {
.power_down_gpio= -1,
};

static struct omap_dss_device am3517_evm_dvi_device = {
.type   = OMAP_DISPLAY_TYPE_DPI,
.name   = dvi,
.driver_name= tfp410,
.data   = dvi_panel,
.phy.dpi.data_lines = 24,
}; 

static struct omap_dss_device *am3517_evm_dss_devices[] = {
am3517_evm_lcd_device,
//  am3517_evm_tv_device,
//  am3517_evm_dvi_device,
};

static struct omap_dss_board_info am3517_evm_dss_data = {
.num_devices= ARRAY_SIZE(am3517_evm_dss_devices),
.devices= am3517_evm_dss_devices,
.default_device = am3517_evm_lcd_device,
};

And the device initialised with 
omap_display_init(am3517_evm_dss_data);


Any help feedback appreciated.

Thanks
Marc
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html