* [PATCH v2] pinctrl: sun4i: add spdif to pin description
@ 2015-08-12 17:27 codekipper at gmail.com
2015-08-12 17:27 ` codekipper at gmail.com
0 siblings, 1 reply; 4+ messages in thread
From: codekipper at gmail.com @ 2015-08-12 17:27 UTC (permalink / raw)
To: linux-arm-kernel
From: Marcus Cooper <codekipper@gmail.com>
The Allwinner A20(sun7i) SoC is pin to pin compatible with the Allwinner
A10(sun4i) SoC. However the user manual for the A10 devices does not make
any reference to the SPDIF whereas the pins, clocks, DMAs and Interrupts
are mentioned in the A20 documentation.
As products exist based on the A10 with an SPDIF transmitter and with the
code exposed then it is safe to assume that we can include SPDIF in the
pin definitions.
We can also look at the fex file of such a device where the SPDIF pin is
defined.
For example
https://github.com/linux-sunxi/sunxi-boards/blob/master/sys_config/a10/mele_a1000.fex#L822
shows
spdif_dout = port:PB13<4><1><default><default>.
Referring to the http://sunxi.org/Fex_Guide#Port_Definitions this shows
that the spdif out pin is PB13 using multiplex function 4. The enabling
of the pull up will be done in the device tree includes and this will be
delivered in a future patch series.
Changes in v2:
-Add comments to highlight that the spdif pins are not officially documented.
Marcus Cooper (1):
pinctrl: sun4i: add spdif to pin description.
drivers/pinctrl/sunxi/pinctrl-sun4i-a10.c | 17 ++++++++++++++---
1 file changed, 14 insertions(+), 3 deletions(-)
--
2.5.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v2] pinctrl: sun4i: add spdif to pin description.
2015-08-12 17:27 [PATCH v2] pinctrl: sun4i: add spdif to pin description codekipper at gmail.com
@ 2015-08-12 17:27 ` codekipper at gmail.com
2015-08-13 8:58 ` [linux-sunxi] " Hans de Goede
2015-08-13 14:06 ` Linus Walleij
0 siblings, 2 replies; 4+ messages in thread
From: codekipper at gmail.com @ 2015-08-12 17:27 UTC (permalink / raw)
To: linux-arm-kernel
From: Marcus Cooper <codekipper@gmail.com>
Signed-off-by: Marcus Cooper <codekipper@gmail.com>
---
drivers/pinctrl/sunxi/pinctrl-sun4i-a10.c | 17 ++++++++++++++---
1 file changed, 14 insertions(+), 3 deletions(-)
diff --git a/drivers/pinctrl/sunxi/pinctrl-sun4i-a10.c b/drivers/pinctrl/sunxi/pinctrl-sun4i-a10.c
index 7376a97..862a096 100644
--- a/drivers/pinctrl/sunxi/pinctrl-sun4i-a10.c
+++ b/drivers/pinctrl/sunxi/pinctrl-sun4i-a10.c
@@ -135,7 +135,14 @@ static const struct sunxi_desc_pin sun4i_a10_pins[] = {
SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 3),
SUNXI_FUNCTION(0x0, "gpio_in"),
SUNXI_FUNCTION(0x1, "gpio_out"),
- SUNXI_FUNCTION(0x2, "ir0")), /* TX */
+ SUNXI_FUNCTION(0x2, "ir0"), /* TX */
+ /*
+ * The SPDIF block is not referenced at all in the A10 user
+ * manual. However it is described in the code leaked and the
+ * pin descriptions are declared in the A20 user manual which
+ * is pin compatible with this device.
+ */
+ SUNXI_FUNCTION(0x4, "spdif")), /* SPDIF MCLK */
SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 4),
SUNXI_FUNCTION(0x0, "gpio_in"),
SUNXI_FUNCTION(0x1, "gpio_out"),
@@ -176,11 +183,15 @@ static const struct sunxi_desc_pin sun4i_a10_pins[] = {
SUNXI_FUNCTION(0x0, "gpio_in"),
SUNXI_FUNCTION(0x1, "gpio_out"),
SUNXI_FUNCTION(0x2, "i2s"), /* DI */
- SUNXI_FUNCTION(0x3, "ac97")), /* DI */
+ SUNXI_FUNCTION(0x3, "ac97"), /* DI */
+ /* Undocumented mux function - See SPDIF MCLK above */
+ SUNXI_FUNCTION(0x4, "spdif")), /* SPDIF IN */
SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 13),
SUNXI_FUNCTION(0x0, "gpio_in"),
SUNXI_FUNCTION(0x1, "gpio_out"),
- SUNXI_FUNCTION(0x2, "spi2")), /* CS1 */
+ SUNXI_FUNCTION(0x2, "spi2"), /* CS1 */
+ /* Undocumented mux function - See SPDIF MCLK above */
+ SUNXI_FUNCTION(0x4, "spdif")), /* SPDIF OUT */
SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 14),
SUNXI_FUNCTION(0x0, "gpio_in"),
SUNXI_FUNCTION(0x1, "gpio_out"),
--
2.5.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [linux-sunxi] [PATCH v2] pinctrl: sun4i: add spdif to pin description.
2015-08-12 17:27 ` codekipper at gmail.com
@ 2015-08-13 8:58 ` Hans de Goede
2015-08-13 14:06 ` Linus Walleij
1 sibling, 0 replies; 4+ messages in thread
From: Hans de Goede @ 2015-08-13 8:58 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
On 12-08-15 19:27, codekipper at gmail.com wrote:
> From: Marcus Cooper <codekipper@gmail.com>
>
> Signed-off-by: Marcus Cooper <codekipper@gmail.com>
LGTM:
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Regards,
Hans
> ---
> drivers/pinctrl/sunxi/pinctrl-sun4i-a10.c | 17 ++++++++++++++---
> 1 file changed, 14 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/pinctrl/sunxi/pinctrl-sun4i-a10.c b/drivers/pinctrl/sunxi/pinctrl-sun4i-a10.c
> index 7376a97..862a096 100644
> --- a/drivers/pinctrl/sunxi/pinctrl-sun4i-a10.c
> +++ b/drivers/pinctrl/sunxi/pinctrl-sun4i-a10.c
> @@ -135,7 +135,14 @@ static const struct sunxi_desc_pin sun4i_a10_pins[] = {
> SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 3),
> SUNXI_FUNCTION(0x0, "gpio_in"),
> SUNXI_FUNCTION(0x1, "gpio_out"),
> - SUNXI_FUNCTION(0x2, "ir0")), /* TX */
> + SUNXI_FUNCTION(0x2, "ir0"), /* TX */
> + /*
> + * The SPDIF block is not referenced at all in the A10 user
> + * manual. However it is described in the code leaked and the
> + * pin descriptions are declared in the A20 user manual which
> + * is pin compatible with this device.
> + */
> + SUNXI_FUNCTION(0x4, "spdif")), /* SPDIF MCLK */
> SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 4),
> SUNXI_FUNCTION(0x0, "gpio_in"),
> SUNXI_FUNCTION(0x1, "gpio_out"),
> @@ -176,11 +183,15 @@ static const struct sunxi_desc_pin sun4i_a10_pins[] = {
> SUNXI_FUNCTION(0x0, "gpio_in"),
> SUNXI_FUNCTION(0x1, "gpio_out"),
> SUNXI_FUNCTION(0x2, "i2s"), /* DI */
> - SUNXI_FUNCTION(0x3, "ac97")), /* DI */
> + SUNXI_FUNCTION(0x3, "ac97"), /* DI */
> + /* Undocumented mux function - See SPDIF MCLK above */
> + SUNXI_FUNCTION(0x4, "spdif")), /* SPDIF IN */
> SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 13),
> SUNXI_FUNCTION(0x0, "gpio_in"),
> SUNXI_FUNCTION(0x1, "gpio_out"),
> - SUNXI_FUNCTION(0x2, "spi2")), /* CS1 */
> + SUNXI_FUNCTION(0x2, "spi2"), /* CS1 */
> + /* Undocumented mux function - See SPDIF MCLK above */
> + SUNXI_FUNCTION(0x4, "spdif")), /* SPDIF OUT */
> SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 14),
> SUNXI_FUNCTION(0x0, "gpio_in"),
> SUNXI_FUNCTION(0x1, "gpio_out"),
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v2] pinctrl: sun4i: add spdif to pin description.
2015-08-12 17:27 ` codekipper at gmail.com
2015-08-13 8:58 ` [linux-sunxi] " Hans de Goede
@ 2015-08-13 14:06 ` Linus Walleij
1 sibling, 0 replies; 4+ messages in thread
From: Linus Walleij @ 2015-08-13 14:06 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, Aug 12, 2015 at 7:27 PM, <codekipper@gmail.com> wrote:
> From: Marcus Cooper <codekipper@gmail.com>
>
> Signed-off-by: Marcus Cooper <codekipper@gmail.com>
Patch applied with Hans' ACK.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-08-13 14:06 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-12 17:27 [PATCH v2] pinctrl: sun4i: add spdif to pin description codekipper at gmail.com
2015-08-12 17:27 ` codekipper at gmail.com
2015-08-13 8:58 ` [linux-sunxi] " Hans de Goede
2015-08-13 14:06 ` Linus Walleij
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).