Skip to contentSkip to conversation

ARM: tegra: paz00: add clocks required for usboperation

PATCH Superseded Marc Dietrich 4 participants 8 messages Aug 9, 2011 – Aug 10, 2011 Tegra architecture support

v2 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw
Quoted 18 lines · On Tuesday 09 August 2011 20:35:45 you wrote:

Marc Dietrich wrote at Tuesday, August 09, 2011 12:29 PM:

Quoted 17 lines

These clocks are required for usb operation.
---

 arch/arm/mach-tegra/board-paz00.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
(quoted diff) +0 -0

b/arch/arm/mach-tegra/board-paz00.c index 45111f6..89a3dda 100644

arch/arm/mach-tegra/board-paz00.c +0 -0
@@ -145,6 +145,12 @@ static __initdata struct tegra_clk_init_table
 paz00_clk_init_table[] = {
 
 	/* name		parent		rate		enabled */
 	{ "uarta",	"pll_p",	216000000,	true },
 	{ "uartd",	"pll_p",	216000000,	true },
 
Quoted 5 lines

arch/arm/mach-tegra/board-paz00.c static __initdata struct tegra_clk_init_table · line 152

Quoted 2 lines
arch/arm/mach-tegra/board-paz00.c +2 -0
+
+	{ "pll_p_out4",	"pll_p",	24000000,	true },

Do you need the pll_p_out4 entry? What's that driving? Check in /sys/kernel/debug/clock/clock_tree (/sys/kernel/debug is debugfs).

I think it is only required to setup the correct (non-standard?) frequency. Seems all other boards use 108 MHz which cause one of the ports to fail. Don't ask me for details ...

Here is the clock tree (as it is for 3.1):

root@ac100:~# cat /sys/kernel/debug/clock/clock_tree 
   clock                          state  ref div      rate
--------------------------------------------------------------
   cdev2                          on     1            26000000  
  *cdev1                          off    0            26000000  
   clk_m                          on     9            12000000  
     *pcie_xclk                   off    0   1        12000000  
     *afi                         off    0   1        12000000  
     *pex                         off    0   1        12000000  
     *csus                        off    0   1        12000000  
     *isp                         off    0   1        12000000  
      usb3                        on     1   1        12000000  
      usb2                        on     2   1        12000000  
      usbd                        on     1   1        12000000  
     *disp2                       off    0   1        12000000  
     *tvdac                       off    0   1        12000000  
     *hdmi                        off    0   1        12000000  
     *tvo                         off    0   1        12000000  
     *cve                         off    0   1        12000000  
     *uarte                       off    0   1        12000000  
     *uartc                       off    0   1        12000000  
     *uartb                       off    0   1        12000000  
      dvc                         off    0   4        3000000   
     *i2c3                        on     0   15       800000    
      i2c2                        off    0   4        3000000   
      i2c1                        off    0   4        3000000   
     *mipi                        off    0   1        12000000  
     *nor                         off    0   1        12000000  
     *owr                         off    0   1        12000000  
     *la                          off    0   1        12000000  
     *bsev                        off    0   1        12000000  
     *bsea                        off    0   1        12000000  
     *vcp                         off    0   1        12000000  
     *sdmmc3                      off    0   1        12000000  
     *sdmmc2                      off    0   1        12000000  
      sdmmc1                      on     1   1        12000000  
     *vfir                        off    0   1        12000000  
     *ndflash                     off    0   1        12000000  
     *ide                         off    0   1        12000000  
     *sbc4                        off    0   1        12000000  
     *sbc3                        off    0   1        12000000  
     *sbc2                        off    0   1        12000000  
     *sbc1                        off    0   1        12000000  
     *twc                         off    0   1        12000000  
     *xio                         off    0   1        12000000  
     *spi                         off    0   1        12000000  
     *spdif_out                   off    0   1        12000000  
     *i2s2                        off    0   1        12000000  
     *i2s1                        off    0   1        12000000  
      timer                       on     1   1        12000000  
     *clk_d                       on     0   x2       24000000  
     *pll_e                       off    0   x100     1200000000
      pll_x                       off    0   x26      312000000 
      pll_u                       on     2   x40      480000000 
     *pll_d                       off    0   12       1000000   
        *dsi                      off    0   1        1000000   
        *pll_d_out0               off    0   2        500000    
      pll_p                       on     10  x18      216000000 
        *disp1                    on     0   1        216000000 
        *host1x                   off    0   2        108000000 
         uartd                    on     1   1        216000000 
         uarta                    on     1   1        216000000 
         csite                    on     1   1.5      144000000 
         sdmmc4                   on     1   4.5      48000000  
        *pwm                      on     0   128.5    1680933   
        *spdif_in                 off    0   6        36000000  
         cclk                     on     1            216000000 
            cpu                   on     3            216000000 
         pll_p_out4               on     3   9        24000000  
            sclk                  on     2            24000000  
               avp.sclk           off    0            24000000  
               cop                on     1            24000000  
               hclk               on     2   1        24000000  
                  pclk            on     2   2        12000000  
                     apbdma       on     1   1        12000000  
         pll_p_out3               on     4   3        72000000  
           *csi                   off    0   1        72000000  
            dvc_i2c               on     1   1        72000000  
           *i2c3_i2c              on     0   1        72000000  
            i2c2_i2c              on     1   1        72000000  
            i2c1_i2c              on     1   1        72000000  
         pll_p_out2               on     1   4.5      48000000  
         pll_p_out1               on     1   7.5      28800000  
           *pll_a                 on     0   x1.9..   56448000  
              *pll_a_out0         on     0   5        11289600  
                 *audio           on     0            11289600  
                    *audio_2x     off    0   x2       22579200  
     *pll_c                       on     0   x50      600000000 
        *vde                      off    0   2.5      240000000 
        *pll_c_out1               on     0   2.5      240000000 
      pll_m                       on     1   x55.5    666000000 
        *mpe                      off    0   6        111000000 
        *epp                      off    0   6        111000000 
        *vi_sensor                off    0   6        111000000 
        *vi                       off    0   6        111000000 
        *2d                       off    0   6        111000000 
        *3d                       off    0   6        111000000 
         emc                      on     3   1        666000000 
            usb3.emc              off    0            666000000 
            usb2.emc              on     1            666000000 
            usb1.emc              off    0            666000000 
            usbd.emc              off    0            666000000 
            host.emc              off    0            666000000 
            hdmi.emc              off    0            666000000 
            disp2.emc             off    0            666000000 
            disp1.emc             off    0            666000000 
            cpu.emc               on     2            666000000 
            avp.emc               off    0            666000000 
        *pll_m_out1               on     0   3        222000000 
   clk_32k                        on     2            32768     
      rtc                         on     1   1        32768     
     *blink                       off    0   393208   0         
     *pll_s                       off    0   1        32768   
#1 lore raw

PATCH v2 4/5 ARM: tegra: paz00: add clocks required for usboperation

Marc Dietrich wrote at Tuesday, August 09, 2011 1:26 PM:

Quoted 28 lines · On Tuesday 09 August 2011 20:35:45 you wrote:
Quoted 18 lines

Marc Dietrich wrote at Tuesday, August 09, 2011 12:29 PM:

Quoted 17 lines

These clocks are required for usb operation.
---

 arch/arm/mach-tegra/board-paz00.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
(quoted diff) +0 -0

b/arch/arm/mach-tegra/board-paz00.c index 45111f6..89a3dda 100644

arch/arm/mach-tegra/board-paz00.c +0 -0
@@ -145,6 +145,12 @@ static __initdata struct tegra_clk_init_table
 paz00_clk_init_table[] = {
 
 	/* name		parent		rate		enabled */
 	{ "uarta",	"pll_p",	216000000,	true },
 	{ "uartd",	"pll_p",	216000000,	true },
 
Quoted 5 lines

arch/arm/mach-tegra/board-paz00.c static __initdata struct tegra_clk_init_table · line 152

Quoted 2 lines
arch/arm/mach-tegra/board-paz00.c +2 -0
+
+	{ "pll_p_out4",	"pll_p",	24000000,	true },

Do you need the pll_p_out4 entry? What's that driving? Check in /sys/kernel/debug/clock/clock_tree (/sys/kernel/debug is debugfs).

I think it is only required to setup the correct (non-standard?) frequency. Seems all other boards use 108 MHz which cause one of the ports to fail. Don't ask me for details ...

...

Quoted 4 lines

root at ac100:~# cat /sys/kernel/debug/clock/clock_tree
clock state ref div rate
--------------------------------------------------------------
clk_m on 9 12000000

...

Quoted 1 line

pll_p on 10 x18 216000000

...

Quoted 7 lines
         pll_p_out4               on     3   9        24000000
            sclk                  on     2            24000000
               avp.sclk           off    0            24000000
               cop                on     1            24000000
               hclk               on     2   1        24000000
                  pclk            on     2   2        12000000
                     apbdma       on     1   1        12000000

Hmm. That's pretty odd.

With the standard kernel the device ships with, what does the clock tree under pll_p_out4 look like? It'd be very interesting to compare that. If that setup is the same as what this patch sets up, the patch seems fine.

As far as I know all the clocks there are both unrelated to USB, and internal to the device, so the board shouldn't have any effect. In particular, avp.sclk/cop are for the internal media CPU/DSP, hclk/pclk are the internal AHB/APB bus clocks, and apbdma is for an internal DMA engine, currently only used for audio in the mainline kernel at least.

I guess I'll ask a few people internally to see if they have a clue why your change might be necessary.

For reference, here's Harmony on something roughly like linux-next:

clk_m on 7 12000000
...
pll_p on 9 x18 216000000
...

         pll_p_out4               on     2   2        108000000 
            sclk                  on     2            108000000 
               avp.sclk           off    0            108000000 
               cop                on     1            108000000 
               hclk               on     2   1        108000000 
                  pclk            on     2   2        54000000  
                     apbdma       on     1   1        54000000
Signature · 1 line
nvpublic
#2 lore raw

PATCH v2 4/5 ARM: tegra: paz00: add clocks required forusboperation

Hi Stephen,

Quoted 36 lines

Marc Dietrich wrote at Tuesday, August 09, 2011 1:26 PM:

Quoted 8 lines · On Tuesday 09 August 2011 20:35:45 you wrote:
Quoted 3 lines

[...]
Do you need the pll_p_out4 entry? What's that driving? Check in /sys/kernel/debug/clock/clock_tree (/sys/kernel/debug is debugfs).

I think it is only required to setup the correct (non-standard?) frequency. Seems all other boards use 108 MHz which cause one of the ports to fail. Don't ask me for details ...

...

Quoted 7 lines

root at ac100:~# cat /sys/kernel/debug/clock/clock_tree

clock state ref div rate

--------------------------------------------------------------

clk_m on 9 12000000

...

Quoted 1 line

pll_p on 10 x18 216000000

...

Quoted 10 lines

pll_p_out4 on 3 9 24000000

sclk on 2 24000000

avp.sclk off 0 24000000
cop on 1 24000000
hclk on 2 1 24000000

pclk on 2 2 12000000

Quoted 7 lines
Quoted 1 line

apbdma on 1 1 12000000

Hmm. That's pretty odd.

With the standard kernel the device ships with, what does the clock tree under pll_p_out4 look like? It'd be very interesting to compare that. If that setup is the same as what this patch sets up, the patch seems fine.

unfortunately, there is no such think in .32 kernel (the kernel deliverd with the device), and I don't think I can port it over.

Quoted 5 lines

As far as I know all the clocks there are both unrelated to USB, and internal to the device, so the board shouldn't have any effect. In particular, avp.sclk/cop are for the internal media CPU/DSP, hclk/pclk are the internal AHB/APB bus clocks, and apbdma is for an internal DMA engine, currently only used for audio in the mainline kernel at least.

Does this mean that the internal busses you mentioned are also running at low speed? Would this be a hugh performance penality?

Quoted 3 lines

I guess I'll ask a few people internally to see if they have a clue why your change might be necessary.

Also take a look at seaboard, it has the same clock setting and especially commit dfb625f934dd40baf29ee6c43e4f130b524411a1 in the chromeos kernel:

commit dfb625f934dd40baf29ee6c43e4f130b524411a1

Author: Vincent Palatin <[email protected]>
Date:   Wed Apr 13 07:26:08 2011 -0400

CHROMIUM: tegra: seaboard: fix ULPI transceiver clock

On our seaboard-based platforms, pll_p_out4 is used to clock (through DAP_MCLK2) the external USB ULPI transceiver between the USB2 port to mini-PCIe modem. And it needs to be set at 24Mhz for the tranceiver to work correctly.
Revert the sclk parent to pll_c out1 (as it was before the last change) since it needs to stay clocked at 108MHz.

BUG=chrome-os-partner:3167
TEST=Check that the Gobi modem is appearing in lsusb listing Use the kaen DVT for browsing and suspending

Review URL: http://codereview.chromium.org/6825076

Change-Id: Ia9b1bbc7860da732fb8edbbcf0bce60e82d6d8ed

Thanks!

Marc

Quoted 13 lines

For reference, here's Harmony on something roughly like linux-next:

clk_m on 7 12000000
...
pll_p on 9 x18 216000000
...

         pll_p_out4               on     2   2        108000000
            sclk                  on     2            108000000
               avp.sclk           off    0            108000000
               cop                on     1            108000000
               hclk               on     2   1        108000000
                  pclk            on     2   2        54000000
                     apbdma       on     1   1        54000000
#3 lore raw

PATCH v2 4/5 ARM: tegra: paz00: add clocks requiredforusboperation

Quoted 47 lines
Quoted 36 lines

Marc Dietrich wrote at Tuesday, August 09, 2011 1:26 PM:

Quoted 8 lines · On Tuesday 09 August 2011 20:35:45 you wrote:
Quoted 3 lines

[...]
Do you need the pll_p_out4 entry? What's that driving? Check in /sys/kernel/debug/clock/clock_tree (/sys/kernel/debug is debugfs).

I think it is only required to setup the correct (non-standard?) frequency. Seems all other boards use 108 MHz which cause one of the ports to fail. Don't ask me for details ...

...

Quoted 7 lines

root at ac100:~# cat /sys/kernel/debug/clock/clock_tree

clock state ref div rate

--------------------------------------------------------------

clk_m on 9 12000000

...

Quoted 1 line

pll_p on 10 x18 216000000

...

Quoted 10 lines

pll_p_out4 on 3 9 24000000

sclk on 2 24000000

avp.sclk off 0 24000000
cop on 1 24000000
hclk on 2 1 24000000

pclk on 2 2 12000000

Quoted 7 lines
Quoted 1 line

apbdma on 1 1 12000000

Hmm. That's pretty odd.

With the standard kernel the device ships with, what does the clock tree under pll_p_out4 look like? It'd be very interesting to compare that. If that setup is the same as what this patch sets up, the patch seems fine.

unfortunately, there is no such think in .32 kernel (the kernel deliverd with the device), and I don't think I can port it over.

Quoted 8 lines
Quoted 5 lines

As far as I know all the clocks there are both unrelated to USB, and internal to the device, so the board shouldn't have any effect. In particular, avp.sclk/cop are for the internal media CPU/DSP, hclk/pclk are the internal AHB/APB bus clocks, and apbdma is for an internal DMA engine, currently only used for audio in the mainline kernel at least.

Does this mean that the internal busses you mentioned are also running at low speed? Would this be a hugh performance penality?

maybe this is why in the commit mentioned below sclk is bind to pll_c_out1 and set to 108 MHz again.

But I cannot see this change in the current seaboard clock table (optimized away?). Maybe someone with a seaboard could check this.

Marc

Quoted 54 lines
Quoted 2 lines

I guess I'll ask a few people internally to see if they have a clue why your change might be necessary.

Also take a look at seaboard, it has the same clock setting and especially commit dfb625f934dd40baf29ee6c43e4f130b524411a1 in the chromeos kernel:

commit dfb625f934dd40baf29ee6c43e4f130b524411a1

Author: Vincent Palatin <[email protected]>
Date:   Wed Apr 13 07:26:08 2011 -0400

CHROMIUM: tegra: seaboard: fix ULPI transceiver clock

On our seaboard-based platforms, pll_p_out4 is used to clock (through DAP_MCLK2) the external USB ULPI transceiver between the USB2 port to mini-PCIe modem. And it needs to be set at 24Mhz for the tranceiver to work correctly.
Revert the sclk parent to pll_c out1 (as it was before the last change) since it needs to stay clocked at 108MHz.

BUG=chrome-os-partner:3167
TEST=Check that the Gobi modem is appearing in lsusb listing Use the kaen DVT for browsing and suspending

Review URL: http://codereview.chromium.org/6825076

Change-Id: Ia9b1bbc7860da732fb8edbbcf0bce60e82d6d8ed

Thanks!

Marc

Quoted 20 lines

For reference, here's Harmony on something roughly like linux-next:
clk_m on 7 12000000

...

pll_p on 9 x18 216000000

...

pll_p_out4 on 2 2 108000000

sclk on 2 108000000

avp.sclk off 0 108000000
cop on 1 108000000
hclk on 2 1 108000000

pclk on 2 2 54000000

apbdma on 1 1 54000000

#4 lore raw

PATCH v2 4/5 ARM: tegra: paz00: add clocks requiredforusboperation

Quoted 53 lines · Marc Dietich
Quoted 53 lines
Quoted 36 lines

Marc Dietrich wrote at Tuesday, August 09, 2011 1:26 PM:

Quoted 8 lines · On Tuesday 09 August 2011 20:35:45 you wrote:
Quoted 3 lines

[...]
Do you need the pll_p_out4 entry? What's that driving? Check in /sys/kernel/debug/clock/clock_tree (/sys/kernel/debug is debugfs).

I think it is only required to setup the correct (non-standard?) frequency. Seems all other boards use 108 MHz which cause one of the ports to fail. Don't ask me for details ...

...

Quoted 7 lines

root at ac100:~# cat /sys/kernel/debug/clock/clock_tree

? ?clock ? ? ? ? ? ? ? ? ? ? ? ? ?state ?ref div ? ? ?rate

--------------------------------------------------------------

? ?clk_m ? ? ? ? ? ? ? ? ? ? ? ? ?on ? ? 9 ? ? ? ? ? ?12000000

...

Quoted 1 line

? ? ? pll_p ? ? ? ? ? ? ? ? ? ? ? on ? ? 10 ?x18 ? ? ?216000000

...

Quoted 10 lines

? ? ? ? ?pll_p_out4 ? ? ? ? ? ? ? on ? ? 3 ? 9 ? ? ? ?24000000

? ? ? ? ? ? sclk ? ? ? ? ? ? ? ? ?on ? ? 2 ? ? ? ? ? ?24000000

? ? ? ? ? ? ? ?avp.sclk ? ? ? ? ? off ? ?0 ? ? ? ? ? ?24000000 ? ? ? ? ? ? ? ?cop ? ? ? ? ? ? ? ?on ? ? 1 ? ? ? ? ? ?24000000 ? ? ? ? ? ? ? ?hclk ? ? ? ? ? ? ? on ? ? 2 ? 1 ? ? ? ?24000000

? ? ? ? ? ? ? ? ? pclk ? ? ? ? ? ?on ? ? 2 ? 2 ? ? ? ?12000000

Quoted 7 lines
Quoted 1 line

? ? ? ? ? ? ? ? ? ? ?apbdma ? ? ? on ? ? 1 ? 1 ? ? ? ?12000000

Hmm. That's pretty odd.

With the standard kernel the device ships with, what does the clock tree under pll_p_out4 look like? It'd be very interesting to compare that. If that setup is the same as what this patch sets up, the patch seems fine.

unfortunately, there is no such think in .32 kernel (the kernel deliverd with the device), and I don't think I can port it over.

Quoted 5 lines

As far as I know all the clocks there are both unrelated to USB, and internal to the device, so the board shouldn't have any effect. In particular, avp.sclk/cop are for the internal media CPU/DSP, hclk/pclk are the internal AHB/APB bus clocks, and apbdma is for an internal DMA engine, currently only used for audio in the mainline kernel at least.

Quoted 8 lines
Quoted 2 lines

Does this mean that the internal busses you mentioned are also running at low speed? Would this be a hugh performance penality?

maybe this is why in the commit mentioned below sclk is bind to pll_c_out1 and set to 108 MHz again.

But I cannot see this change in the current seaboard clock table (optimized away?). Maybe someone with a seaboard could check this.

We moved some of this to common.c, and should be posting those patches in a while. It doesn't make sense to run sclk on pll_m, since that one scales with memory clock scaling.

-Olof

#5 lore raw

PATCH v2 4/5 ARM: tegra: paz00: add clocks requiredforusboperation

Quoted 61 lines · Marc Dietich
Quoted 60 lines
Quoted 48 lines
Quoted 36 lines

Marc Dietrich wrote at Tuesday, August 09, 2011 1:26 PM:

Quoted 8 lines · On Tuesday 09 August 2011 20:35:45 you wrote:
Quoted 3 lines

[...]
Do you need the pll_p_out4 entry? What's that driving? Check in /sys/kernel/debug/clock/clock_tree (/sys/kernel/debug is debugfs).

I think it is only required to setup the correct (non-standard?) frequency. Seems all other boards use 108 MHz which cause one of the ports to fail. Don't ask me for details ...

...

Quoted 7 lines

root at ac100:~# cat /sys/kernel/debug/clock/clock_tree

clock state ref div rate

--------------------------------------------------------------

clk_m on 9 12000000

...

Quoted 1 line

pll_p on 10 x18 216000000

...

Quoted 10 lines

pll_p_out4 on 3 9 24000000

sclk on 2 24000000

avp.sclk off 0 24000000
cop on 1 24000000
hclk on 2 1 24000000

pclk on 2 2 12000000

Quoted 8 lines
Quoted 1 line

apbdma on 1 1 12000000

Hmm. That's pretty odd.

With the standard kernel the device ships with, what does the clock tree under pll_p_out4 look like? It'd be very interesting to compare that. If that setup is the same as what this patch sets up, the patch seems fine.

unfortunately, there is no such think in .32 kernel (the kernel deliverd with the device), and I don't think I can port it over.

Quoted 8 lines
Quoted 5 lines

As far as I know all the clocks there are both unrelated to USB, and internal to the device, so the board shouldn't have any effect. In particular, avp.sclk/cop are for the internal media CPU/DSP, hclk/pclk are the internal AHB/APB bus clocks, and apbdma is for an internal DMA engine, currently only used for audio in the mainline kernel at least.

Does this mean that the internal busses you mentioned are also running at low speed? Would this be a hugh performance penality?

maybe this is why in the commit mentioned below sclk is bind to pll_c_out1 and set to 108 MHz again.

Quoted 6 lines
Quoted 2 lines

But I cannot see this change in the current seaboard clock table (optimized away?). Maybe someone with a seaboard could check this.

We moved some of this to common.c, and should be posting those patches in a while. It doesn't make sense to run sclk on pll_m, since that one scales with memory clock scaling.

Olof,

ok, I see. In .38 sclk is bound to pll_c_out1 running at 120 MHz. So we need no further change, just wait for the patch to arrive.

Thanks!

Marc

#6 lore raw

PATCH v2 4/5 ARM: tegra: paz00: add clocks required forusboperation

In reply to Marc Dietich

Marc Dietich wrote at Wednesday, August 10, 2011 2:25 AM:

Quoted 11 lines

Hi Stephen,

Quoted 9 lines

Marc Dietrich wrote at Tuesday, August 09, 2011 1:26 PM:

Quoted 8 lines · On Tuesday 09 August 2011 20:35:45 you wrote:
Quoted 3 lines

[...]
Do you need the pll_p_out4 entry? What's that driving? Check in /sys/kernel/debug/clock/clock_tree (/sys/kernel/debug is debugfs).

I think it is only required to setup the correct (non-standard?) frequency. Seems all other boards use 108 MHz which cause one of the ports to fail. Don't ask me for details ...

...

Quoted 8 lines
Quoted 5 lines

As far as I know all the clocks there are both unrelated to USB, and internal to the device, so the board shouldn't have any effect. In particular, avp.sclk/cop are for the internal media CPU/DSP, hclk/pclk are the internal AHB/APB bus clocks, and apbdma is for an internal DMA engine, currently only used for audio in the mainline kernel at least.

Does this mean that the internal busses you mentioned are also running at low speed? Would this be a hugh performance penality?

Yes, I think this will cause a lower bus speed. I don't know how much performance impact this will have; probably mainly just peripheral register accesses, so not too much of a big deal.

Quoted 5 lines
Quoted 2 lines

I guess I'll ask a few people internally to see if they have a clue why your change might be necessary.

Also take a look at seaboard, it has the same clock setting and especially commit dfb625f934dd40baf29ee6c43e4f130b524411a1 in the chromeos kernel:

Ah yes, DAP_MCLK1/2 don't show up in the clock table. That certainly explains everything. So, I withdraw any objections to this patch. Do you want to follow it up with one that reparents sclk? I can test that on Harmony, Seaboard, and TrimSlice if you want. If not, I'll see if I can work on that a little later...

Quoted 22 lines

commit dfb625f934dd40baf29ee6c43e4f130b524411a1

Author: Vincent Palatin <[email protected]>
Date:   Wed Apr 13 07:26:08 2011 -0400

CHROMIUM: tegra: seaboard: fix ULPI transceiver clock

On our seaboard-based platforms, pll_p_out4 is used to clock (through DAP_MCLK2) the external USB ULPI transceiver between the USB2 port to mini-PCIe modem. And it needs to be set at 24Mhz for the tranceiver to work correctly.
Revert the sclk parent to pll_c out1 (as it was before the last change) since it needs to stay clocked at 108MHz.

BUG=chrome-os-partner:3167
TEST=Check that the Gobi modem is appearing in lsusb listing Use the kaen DVT for browsing and suspending

Review URL: http://codereview.chromium.org/6825076

Change-Id: Ia9b1bbc7860da732fb8edbbcf0bce60e82d6d8ed

Signature · 1 line
nvpublic
#7 lore raw

PATCH v2 4/5 ARM: tegra: paz00: add clocks requiredforusboperation

Quoted 34 lines · On Wednesday 10 August 2011 17:24:46 Stephen Warren wrote:

Marc Dietich wrote at Wednesday, August 10, 2011 2:25 AM:

Quoted 11 lines

Hi Stephen,

Quoted 9 lines

Marc Dietrich wrote at Tuesday, August 09, 2011 1:26 PM:

Quoted 8 lines · On Tuesday 09 August 2011 20:35:45 you wrote:
Quoted 3 lines

[...]
Do you need the pll_p_out4 entry? What's that driving? Check in /sys/kernel/debug/clock/clock_tree (/sys/kernel/debug is debugfs).

I think it is only required to setup the correct (non-standard?) frequency. Seems all other boards use 108 MHz which cause one of the ports to fail. Don't ask me for details ...

...

Quoted 8 lines
Quoted 5 lines

As far as I know all the clocks there are both unrelated to USB, and internal to the device, so the board shouldn't have any effect. In particular, avp.sclk/cop are for the internal media CPU/DSP, hclk/pclk are the internal AHB/APB bus clocks, and apbdma is for an internal DMA engine, currently only used for audio in the mainline kernel at least.

Does this mean that the internal busses you mentioned are also running at low speed? Would this be a hugh performance penality?

Yes, I think this will cause a lower bus speed. I don't know how much performance impact this will have; probably mainly just peripheral register accesses, so not too much of a big deal.

Quoted 5 lines
Quoted 2 lines

I guess I'll ask a few people internally to see if they have a clue why your change might be necessary.

Also take a look at seaboard, it has the same clock setting and especially

Quoted 6 lines
Quoted 1 line

commit dfb625f934dd40baf29ee6c43e4f130b524411a1 in the chromeos kernel:

Ah yes, DAP_MCLK1/2 don't show up in the clock table. That certainly explains everything. So, I withdraw any objections to this patch. Do you want to follow it up with one that reparents sclk? I can test that on Harmony, Seaboard, and TrimSlice if you want. If not, I'll see if I can work on that a little later...

Stephen,

I think Olof will send a patch later on regarding the sclk change in common.c (see his last comment), so we can test it when it arrives. In the mean time I posted V4 which should be really the final version.

Thanks!

Marc

Quoted 22 lines
Quoted 22 lines

commit dfb625f934dd40baf29ee6c43e4f130b524411a1

Author: Vincent Palatin <[email protected]>
Date:   Wed Apr 13 07:26:08 2011 -0400

CHROMIUM: tegra: seaboard: fix ULPI transceiver clock

On our seaboard-based platforms, pll_p_out4 is used to clock (through DAP_MCLK2) the external USB ULPI transceiver between the USB2 port to mini-PCIe modem. And it needs to be set at 24Mhz for the tranceiver to work correctly.
Revert the sclk parent to pll_c out1 (as it was before the last change) since it needs to stay clocked at 108MHz.

BUG=chrome-os-partner:3167
TEST=Check that the Gobi modem is appearing in lsusb listing Use the kaen DVT for browsing and suspending

Review URL: http://codereview.chromium.org/6825076

Change-Id: Ia9b1bbc7860da732fb8edbbcf0bce60e82d6d8ed