ARM: tegra: paz00: Fix board pinmux table.
Subsystems (3)
PATCH 1/1 ARM: tegra: paz00: Fix board pinmux table.
This fix updates the CDEV1 pinmux for the paz00 board to be as in the Harmony board. Paz00 board is originally based on Harmony design.
--- arch/arm/mach-tegra/board-paz00-pinmux.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/mach-tegra/board-paz00-pinmux.c +1 -1
@@ -27,7 +27,7 @@ static struct tegra_pingroup_config paz00_pinmux[] = { {TEGRA_PINGROUP_ATC, TEGRA_MUX_GMI, TEGRA_PUPD_NORMAL, TEGRA_TRI_NORMAL}, {TEGRA_PINGROUP_ATD, TEGRA_MUX_GMI, TEGRA_PUPD_NORMAL, TEGRA_TRI_NORMAL}, {TEGRA_PINGROUP_ATE, TEGRA_MUX_GMI, TEGRA_PUPD_NORMAL, TEGRA_TRI_NORMAL}, - {TEGRA_PINGROUP_CDEV1, TEGRA_MUX_PLLA_OUT, TEGRA_PUPD_PULL_DOWN, TEGRA_TRI_TRISTATE}, + {TEGRA_PINGROUP_CDEV1, TEGRA_MUX_PLLA_OUT, TEGRA_PUPD_NORMAL, TEGRA_TRI_NORMAL}, {TEGRA_PINGROUP_CDEV2, TEGRA_MUX_PLLP_OUT4, TEGRA_PUPD_PULL_DOWN, TEGRA_TRI_NORMAL}, {TEGRA_PINGROUP_CRTP, TEGRA_MUX_CRT, TEGRA_PUPD_NORMAL, TEGRA_TRI_TRISTATE}, {TEGRA_PINGROUP_CSUS, TEGRA_MUX_PLLC_OUT1, TEGRA_PUPD_PULL_DOWN, TEGRA_TRI_TRISTATE},
Signature · 1 line
1.7.3.4
Hi Leon,
Am Samstag 15 Oktober 2011, 17:18:33 schrieb Leon Romanovsky:
Quoted 2 lines
This fix updates the CDEV1 pinmux for the paz00 board to be as in the Harmony board. Paz00 board is originally based on Harmony design.
the fact that this patch makes sound work on paz00 does not necessary mean that this is the "right thing" to do. First, the initial state should be TRISTATE, because sound layer should switch between NORMAL/TRISTATE automaticly to save some power. Second, Android has TEGRA_PUPD_PULL_DOWN with sound working and I didn't found out yet why this also works.
So there is something strange going on and we should first find out what it is. Furthermore, there is no codec (ALC5632) and no glue for paz00 yet in the mainline kernel (and of course no board support for it) so this can still wait IMHO.
I will include your patch in the series which will add sound support once the fog has lifted a bit.
Thanks
Marc
Quoted 19 lines
Signed-off-by Leon Romanovsky <leon-2ukJVAZIZ/[email protected]>--- arch/arm/mach-tegra/board-paz00-pinmux.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)arch/arm/mach-tegra/board-paz00-pinmux.c +1
-1@@ -27,7 +27,7 @@ static struct tegra_pingroup_config paz00_pinmux[] = { {TEGRA_PINGROUP_ATC, TEGRA_MUX_GMI, TEGRA_PUPD_NORMAL, TEGRA_TRI_NORMAL}, {TEGRA_PINGROUP_ATD, TEGRA_MUX_GMI, TEGRA_PUPD_NORMAL, TEGRA_TRI_NORMAL}, {TEGRA_PINGROUP_ATE, TEGRA_MUX_GMI, TEGRA_PUPD_NORMAL, TEGRA_TRI_NORMAL}, - {TEGRA_PINGROUP_CDEV1, TEGRA_MUX_PLLA_OUT, TEGRA_PUPD_PULL_DOWN, TEGRA_TRI_TRISTATE}, + {TEGRA_PINGROUP_CDEV1, TEGRA_MUX_PLLA_OUT, TEGRA_PUPD_NORMAL, TEGRA_TRI_NORMAL}, {TEGRA_PINGROUP_CDEV2, TEGRA_MUX_PLLP_OUT4, TEGRA_PUPD_PULL_DOWN, TEGRA_TRI_NORMAL}, {TEGRA_PINGROUP_CRTP, TEGRA_MUX_CRT, TEGRA_PUPD_NORMAL, TEGRA_TRI_TRISTATE}, {TEGRA_PINGROUP_CSUS, TEGRA_MUX_PLLC_OUT1, TEGRA_PUPD_PULL_DOWN, TEGRA_TRI_TRISTATE},
Quoted 9 lines
Am Samstag 15 Oktober 2011, 17:18:33 schrieb Leon Romanovsky:
Quoted 2 lines
This fix updates the CDEV1 pinmux for the paz00 board to be as in the Harmony board. Paz00 board is originally based on Harmony design.
the fact that this patch makes sound work on paz00 does not necessary mean that this is the "right thing" to do. First, the initial state should be TRISTATE, because sound layer should switch between NORMAL/TRISTATE automaticly to save some power. Second, Android has
TEGRA_PUPD_PULL_DOWNwith sound working and I didn't found out yet why this also works.
I already said before, but will say again. Our board has many commons to the Harmony board, so our reference is arch/arm/mach-tegra/board-harmony-pinmux.c
http://git.kernel.org/?p=linux/kernel/git/olof/tegra.git;a=history;f=arch/arm/mach-tegra/board-harmony-pinmux.c;hb=103e1e14441ea86454921cdaf552c9f5c1f7c7c1
In the initial commit (42a7bf4d2686145bea03ff9b87d83868cc514f47) pushed by Colin, the CDEV1 indeed has TEGRA_PUPD_PULL_DOWN and TEGRA_TRI_TRISTATE
(http://git.kernel.org/?p=linux/kernel/git/olof/tegra.git;a=blob;f=arch/arm/mach-tegra/board-harmony-pinmux.c;h=50b15d500cacc73817258202178b0b79fc42478b;hb=42a7bf4d2686145bea03ff9b87d83868cc514f47#l28),
but later in the commit (ef2b1a0f1eb299c2d00addfee3a2631395d9bdb5) pushed by Stephen, the CDEV1 was changed.
I did the same.
Quoted 5 lines
So there is something strange going on and we should first find out what it is. Furthermore, there is no codec (ALC5632) and no glue for paz00 yet in the mainline kernel (and of course no board support for it) so this can still wait IMHO.
I have a different view on it. For me, everything that fixes incorrect behavior and doesn't brake anything, must be included as soon as possible.possible.
Quoted 13 lines
I will include your patch in the series which will add sound support once the fog has lifted a bit.
Thanks
Marc
Quoted 5 lines
Signed-off-by Leon Romanovsky <leon-2ukJVAZIZ/[email protected]>---
arch/arm/mach-tegra/board-paz00-pinmux.c | 2 +-1 files changed, 1 insertions(+), 1 deletions(-)
Quoted 15 lines
Quoted 6 lines
arch/arm/mach-tegra/board-paz00-pinmux.c +0
-0arch/arm/mach-tegra/board-paz00-pinmux.c static struct tegra_pingroup_config paz00_pinmux[] = { · line 33
Quoted 8 lines
arch/arm/mach-tegra/board-paz00-pinmux.c +1
-1@@ -27,7 +27,7 @@ static struct tegra_pingroup_config paz00_pinmux[] = { {TEGRA_PINGROUP_ATC, TEGRA_MUX_GMI, TEGRA_PUPD_NORMAL, TEGRA_TRI_NORMAL}, {TEGRA_PINGROUP_ATD, TEGRA_MUX_GMI, TEGRA_PUPD_NORMAL, TEGRA_TRI_NORMAL}, {TEGRA_PINGROUP_ATE, TEGRA_MUX_GMI, TEGRA_PUPD_NORMAL, TEGRA_TRI_NORMAL}, - {TEGRA_PINGROUP_CDEV1, TEGRA_MUX_PLLA_OUT, TEGRA_PUPD_PULL_DOWN, TEGRA_TRI_TRISTATE}, + {TEGRA_PINGROUP_CDEV1, TEGRA_MUX_PLLA_OUT, TEGRA_PUPD_NORMAL, TEGRA_TRI_NORMAL}, {TEGRA_PINGROUP_CDEV2, TEGRA_MUX_PLLP_OUT4, TEGRA_PUPD_PULL_DOWN, TEGRA_TRI_NORMAL}, {TEGRA_PINGROUP_CRTP, TEGRA_MUX_CRT, TEGRA_PUPD_NORMAL, TEGRA_TRI_TRISTATE}, {TEGRA_PINGROUP_CSUS, TEGRA_MUX_PLLC_OUT1, TEGRA_PUPD_PULL_DOWN, TEGRA_TRI_TRISTATE},
--
Leon Romanovsky | Independent Linux Consultant www.leon.nu | leon-2ukJVAZIZ/[email protected]
Marc Dietrich wrote at Saturday, October 15, 2011 10:34 AM:
Quoted 10 lines
Am Samstag 15 Oktober 2011, 17:18:33 schrieb Leon Romanovsky:
Quoted 2 lines
This fix updates the CDEV1 pinmux for the paz00 board to be as in the Harmony board. Paz00 board is originally based on Harmony design.
the fact that this patch makes sound work on paz00 does not necessary mean that this is the "right thing" to do.
First, the initial state should be
TRISTATE, because sound layer should switch between NORMAL/TRISTATE automaticly to save some power.
None of the other boards do that, and the drivers don't support it. I believe the clock would need to be started as soon as the audio driver module were loaded, and kept running as long as it was loaded, so there's not much chance of optimizing power here at the moment.
Quoted 2 lines
Second, Android has
TEGRA_PUPD_PULL_DOWN
with sound working and I didn't found out yet why this also works.
I don't know why there's a pull-down there in the Android kernel; there's no need as far as I know, since it's a clock signal. I'd go so far as to believe that a pull-down would distort the clock signal slightly.
But yes, it probably makes sense to include this patch in a series that enables audio on PAZ00 whenever that appears.
Signature · 1 line
nvpublic
Quoted 8 lines · On Monday 17 October 2011 08:29:01 Stephen Warren wrote:
Marc Dietrich wrote at Saturday, October 15, 2011 10:34 AM:
Quoted 6 lines
Am Samstag 15 Oktober 2011, 17:18:33 schrieb Leon Romanovsky:
Quoted 2 lines
This fix updates the CDEV1 pinmux for the paz00 board to be as in the Harmony board. Paz00 board is originally based on Harmony design.
the fact that this patch makes sound work on paz00 does not necessary mean that this is the "right thing" to do.
Quoted 8 lines
Quoted 3 lines
First, the initial state should be
TRISTATE, because sound layer should switch between NORMAL/TRISTATE automaticly to save some power.None of the other boards do that, and the drivers don't support it. I believe the clock would need to be started as soon as the audio driver module were loaded, and kept running as long as it was loaded, so there's not much chance of optimizing power here at the moment.
Which driver? I guess this could be done by the board specific code e.g. in in sound/soc/tegra/paz00.c I haven't checked if the clock is disabled, because the whole clock setup is a bit confusing...
Here is androids pinmux diff "without and with music":
pinmux_with_music.txt renamed from pinmux_no_music.txt +2 -2
@@ -3,11 +3,11 @@ {TEGRA_PINGROUP_ATC, TEGRA_MUX_GMI, TEGRA_PUPD_NORMAL, TEGRA_TRI_NORMAL}, {TEGRA_PINGROUP_ATD, TEGRA_MUX_GMI, TEGRA_PUPD_NORMAL, TEGRA_TRI_NORMAL}, {TEGRA_PINGROUP_ATE, TEGRA_MUX_GMI, TEGRA_PUPD_NORMAL, TEGRA_TRI_NORMAL}, - {TEGRA_PINGROUP_CDEV1, TEGRA_MUX_PLLA_OUT, TEGRA_PUPD_PULL_DOWN, TEGRA_TRI_TRISTATE}, + {TEGRA_PINGROUP_CDEV1, TEGRA_MUX_PLLA_OUT, TEGRA_PUPD_PULL_DOWN, TEGRA_TRI_NORMAL}, {TEGRA_PINGROUP_CDEV2, TEGRA_MUX_PLLP_OUT4, TEGRA_PUPD_PULL_DOWN, TEGRA_TRI_NORMAL}, {TEGRA_PINGROUP_CRTP, TEGRA_MUX_CRT, TEGRA_PUPD_NORMAL, TEGRA_TRI_TRISTATE}, {TEGRA_PINGROUP_CSUS, TEGRA_MUX_PLLC_OUT1, TEGRA_PUPD_PULL_DOWN, TEGRA_TRI_TRISTATE}, - {TEGRA_PINGROUP_DAP1, TEGRA_MUX_DAP1, TEGRA_PUPD_NORMAL, TEGRA_TRI_TRISTATE}, + {TEGRA_PINGROUP_DAP1, TEGRA_MUX_DAP1, TEGRA_PUPD_NORMAL, TEGRA_TRI_NORMAL}, {TEGRA_PINGROUP_DAP2, TEGRA_MUX_GMI, TEGRA_PUPD_NORMAL, TEGRA_TRI_NORMAL}, {TEGRA_PINGROUP_DAP3, TEGRA_MUX_DAP3, TEGRA_PUPD_NORMAL, TEGRA_TRI_TRISTATE}, {TEGRA_PINGROUP_DAP4, TEGRA_MUX_GMI, TEGRA_PUPD_NORMAL, TEGRA_TRI_TRISTATE},
Quoted 6 lines
Quoted 2 lines
Second, Android has
TEGRA_PUPD_PULL_DOWN
with sound working and I didn't found out yet why this also works.I don't know why there's a pull-down there in the Android kernel; there's no need as far as I know, since it's a clock signal. I'd go so far as to believe that a pull-down would distort the clock signal slightly.
Is there some docu somewhere about what PUPD_NORMAL and POPD_PULL_DOWN means? I know the meaning of TRISTATE and PULL_DOWN/UP from electronics, but that does not define what the NORMAL state is.
I also don't see why you can't get a nice clock signal out of a pull down pin. If inactive, the pin is high (e.g. +3.3V), while when active it is pulled to zero (ok, it's logical inverted).
Marc
Quoted 2 lines
But yes, it probably makes sense to include this patch in a series that enables audio on PAZ00 whenever that appears.
Marc Dietrich wrote at Tuesday, October 18, 2011 9:50 AM:
Quoted 13 lines · On Monday 17 October 2011 08:29:01 Stephen Warren wrote:
Quoted 12 lines
Marc Dietrich wrote at Saturday, October 15, 2011 10:34 AM:
Quoted 10 lines
Am Samstag 15 Oktober 2011, 17:18:33 schrieb Leon Romanovsky:
Quoted 2 lines
This fix updates the CDEV1 pinmux for the paz00 board to be as in the Harmony board. Paz00 board is originally based on Harmony design.
the fact that this patch makes sound work on paz00 does not necessary mean that this is the "right thing" to do.
First, the initial state should be
TRISTATE, because sound layer should switch between NORMAL/TRISTATE automaticly to save some power.
Quoted 6 lines
Quoted 4 lines
None of the other boards do that, and the drivers don't support it. I believe the clock would need to be started as soon as the audio driver module were loaded, and kept running as long as it was loaded, so there's not much chance of optimizing power here at the moment.
Which driver?
The whole ASoC driver stack. It may depend on the codec, but I assume that CDEV1 clock output should be running the whole time the ASoC codec driver is active. Alsa-devel would be the best place to ask about that kind of thing.
...
Quoted 7 lines
Quoted 3 lines
I don't know why there's a pull-down there in the Android kernel; there's no need as far as I know, since it's a clock signal. I'd go so far as to believe that a pull-down would distort the clock signal slightly.
Is there some docu somewhere about what
PUPD_NORMALandPOPD_PULL_DOWNmeans? I know the meaning of TRISTATE and PULL_DOWN/UP from electronics, but that does not define what the NORMAL state is.
"NORMAL" means no pull-up or pull-down, or not tri-stated. It's badly named.
Quoted 3 lines
I also don't see why you can't get a nice clock signal out of a pull down pin. If inactive, the pin is high (e.g. +3.3V), while when active it is pulled to zero (ok, it's logical inverted).
Well, I may be wrong, but the pin will attempt to drive a nice symmetric signal, yet with a pull-up/down, there will be some slight drive on the wire that'll tend to pull the signal towards 0v/3.3v the whole time which will distort it. Whether this is a problem for this particular signal, pull-up/down strength, etc. is something I don't know. Certainly, the pull isn't actually needed AFAIK, so it may as well be removed.
Signature · 1 line
nvpublic
Quoted 14 lines · Stephen Warren
Marc Dietrich wrote at Tuesday, October 18, 2011 9:50 AM:
Quoted 13 lines · On Monday 17 October 2011 08:29:01 Stephen Warren wrote:
Quoted 11 lines
Marc Dietrich wrote at Saturday, October 15, 2011 10:34 AM:
Quoted 6 lines
Am Samstag 15 Oktober 2011, 17:18:33 schrieb Leon Romanovsky:
Quoted 2 lines
This fix updates the CDEV1 pinmux for the paz00 board to be as in the Harmony board. Paz00 board is originally based on Harmony design.
the fact that this patch makes sound work on paz00 does not necessary mean that this is the "right thing" to do.
None of the other boards do that, and the drivers don't support it. I believe the clock would need to be started as soon as the audio driver module were loaded, and kept running as long as it was loaded, so there's not much chance of optimizing power here at the moment.
Quoted 6 lines
Quoted 1 line
Which driver?
The whole ASoC driver stack. It may depend on the codec, but I assume that CDEV1 clock output should be running the whole time the ASoC codec driver is active. Alsa-devel would be the best place to ask about that kind of thing.
Let's summarize, we agree that it is a correct way to handle CDEV1, and it is a correct patch.
I believe it is a good time to merge the patch before we start to merge the codec itself.
Signature · 2 lines
Leon Romanovsky | Independent Linux Consultant www.leon.nu | leon-2ukJVAZIZ/[email protected]
Hi,
Quoted 22 lines · Leon Romanovsky
Quoted 14 lines · Stephen Warren
Marc Dietrich wrote at Tuesday, October 18, 2011 9:50 AM:
Quoted 13 lines · On Monday 17 October 2011 08:29:01 Stephen Warren wrote:
Quoted 11 lines
Marc Dietrich wrote at Saturday, October 15, 2011 10:34 AM:
Quoted 6 lines
Am Samstag 15 Oktober 2011, 17:18:33 schrieb Leon Romanovsky:
Quoted 2 lines
This fix updates the CDEV1 pinmux for the paz00 board to be as in the Harmony board. Paz00 board is originally based on Harmony design.
the fact that this patch makes sound work on paz00 does not necessary mean that this is the "right thing" to do.
None of the other boards do that, and the drivers don't support it. I believe the clock would need to be started as soon as the audio driver module were loaded, and kept running as long as it was loaded, so there's not much chance of optimizing power here at the moment.
Quoted 6 lines
Quoted 1 line
Which driver?
The whole ASoC driver stack. It may depend on the codec, but I assume that CDEV1 clock output should be running the whole time the ASoC codec driver is active. Alsa-devel would be the best place to ask about that kind of thing.
Quoted 4 lines
Let's summarize, we agree that it is a correct way to handle CDEV1, and it is a correct patch.
I believe it is a good time to merge the patch before we start to merge the codec itself.
It'll be staged for 3.3 when I start those branches, which should be soon.
We're close to the merge window, it's not a regression fix and you need other changes on top of it anyway to get anything useful out of it -- so it can wait.
Thank you for posting it early though, and I'll make sure it makes it into linux-next quickly so you can use that as a base for your codec work.
-Olof
Quoted 3 lines · Olof Johansson
Thank you for posting it early though, and I'll make sure it makes it into linux-next quickly so you can use that as a base for your codec work.
Thanks
Quoted 2 lines
-Olof
Signature · 2 lines
Leon Romanovsky | Independent Linux Consultant www.leon.nu | leon-2ukJVAZIZ/[email protected]