sun6i: Add A31s (pinctrl) support
Subsystems (8)
cover sun6i: Add A31s (pinctrl) support
Hi Maxime and Linus,
Here is a patch series for the A31s, a variant of the already supported A31 with less pins.
As such this patch-set introduces pinctrl support for it + a dtsi + the first board using it.
I'm not sure if sunxi pinctrl patches go through Maxime's tree or Linus' tree, so I'll leave figuring out who takes what patches to you two.
Regards,
Hans
PATCH 1/5 pinctrl: sun6i: Add some missing functions, fix i2c3 muxing
While working on pinctrl for the A31s, I noticed that function 4 of PA15 - PA18 was missing, add these.
I also noticed that i2c3 sck / sda got assigned to PB5 & PB6, this should be PB4 & PB5, fix this as well.
--- drivers/pinctrl/sunxi/pinctrl-sun6i-a31.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
drivers/pinctrl/sunxi/pinctrl-sun6i-a31.c +7 -2
@@ -134,24 +134,28 @@ static const struct sunxi_desc_pin sun6i_a31_pins[] = { SUNXI_FUNCTION(0x1, "gpio_out"), SUNXI_FUNCTION(0x2, "gmac"), /* RXD4 */ SUNXI_FUNCTION(0x3, "lcd1"), /* D15 */ + SUNXI_FUNCTION(0x4, "clk_a_out"), SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 15)), /* PA_EINT15 */SUNXI_PIN (SUNXI_PINCTRL_PIN (A ,16 ),SUNXI_FUNCTION (0x0 ,"gpio_in" ),SUNXI_FUNCTION (0x1 ,"gpio_out" ),SUNXI_FUNCTION (0x2 ,"gmac" ),/* RXD5 */ SUNXI_FUNCTION (0x3 ,"lcd1" ),/* D16 */ +SUNXI_FUNCTION (0x4 ,"dmic" ),/* CLK */ SUNXI_FUNCTION_IRQ_BANK (0x6 ,0 ,16 )),/* PA_EINT16 */ SUNXI_PIN (SUNXI_PINCTRL_PIN (A ,17 ),SUNXI_FUNCTION (0x0 ,"gpio_in" ),SUNXI_FUNCTION (0x1 ,"gpio_out" ),SUNXI_FUNCTION (0x2 ,"gmac" ),/* RXD6 */ SUNXI_FUNCTION (0x3 ,"lcd1" ),/* D17 */ +SUNXI_FUNCTION (0x4 ,"dmic" ),/* DIN */ SUNXI_FUNCTION_IRQ_BANK (0x6 ,0 ,17 )),/* PA_EINT17 */ SUNXI_PIN (SUNXI_PINCTRL_PIN (A ,18 ),SUNXI_FUNCTION (0x0 ,"gpio_in" ),SUNXI_FUNCTION (0x1 ,"gpio_out" ),SUNXI_FUNCTION (0x2 ,"gmac" ),/* RXD7 */ SUNXI_FUNCTION (0x3 ,"lcd1" ),/* D18 */ +SUNXI_FUNCTION (0x4 ,"clk_b_out" ),SUNXI_FUNCTION_IRQ_BANK (0x6 ,0 ,18 )),/* PA_EINT18 */ SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 19), SUNXI_FUNCTION(0x0, "gpio_in"),
@@ -207,6 +211,7 @@ static const struct sunxi_desc_pin sun6i_a31_pins[] = { SUNXI_FUNCTION(0x1, "gpio_out"), SUNXI_FUNCTION(0x2, "gmac"), /* MDC */ SUNXI_FUNCTION(0x3, "lcd1"), /* HSYNC */ + SUNXI_FUNCTION(0x4, "clk_c_out"), SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 26)), /* PA_EINT26 */ SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 27), SUNXI_FUNCTION(0x0, "gpio_in"),
@@ -242,20 +247,20 @@ static const struct sunxi_desc_pin sun6i_a31_pins[] = { SUNXI_FUNCTION(0x1, "gpio_out"), SUNXI_FUNCTION(0x2, "i2s0"), /* DO1 */ SUNXI_FUNCTION(0x3, "uart3"), /* RTS */ + SUNXI_FUNCTION(0x4, "i2c3"), /* SCK */ SUNXI_FUNCTION_IRQ_BANK(0x6, 1, 4)), /* PB_EINT4 */SUNXI_PIN (SUNXI_PINCTRL_PIN (B ,5 ),SUNXI_FUNCTION (0x0 ,"gpio_in" ),SUNXI_FUNCTION (0x1 ,"gpio_out" ),SUNXI_FUNCTION (0x2 ,"i2s0" ),/* DO2 */ SUNXI_FUNCTION (0x3 ,"uart3" ),/* TX */ -SUNXI_FUNCTION (0x4 ,"i2c3" ),/* SCK */ +SUNXI_FUNCTION (0x4 ,"i2c3" ),/* SDA */ SUNXI_FUNCTION_IRQ_BANK (0x6 ,1 ,5 )),/* PB_EINT5 */ SUNXI_PIN (SUNXI_PINCTRL_PIN (B ,6 ),SUNXI_FUNCTION (0x0 ,"gpio_in" ),SUNXI_FUNCTION (0x1 ,"gpio_out" ),SUNXI_FUNCTION (0x2 ,"i2s0" ),/* DO3 */ SUNXI_FUNCTION (0x3 ,"uart3" ),/* RX */ -SUNXI_FUNCTION (0x4 ,"i2c3" ),/* SDA */ SUNXI_FUNCTION_IRQ_BANK (0x6 ,1 ,6 )),/* PB_EINT6 */ SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 7), SUNXI_FUNCTION(0x0, "gpio_in"),
Signature · 1 line
2.1.0
PATCH 1/5 pinctrl: sun6i: Add some missing functions, fix i2c3 muxing
Hi,
Quoted 16 lines · Hans de Goede
While working on pinctrl for the A31s, I noticed that function 4 of PA15 - PA18 was missing, add these.
I also noticed that i2c3 sck / sda got assigned to PB5 & PB6, this should be PB4 & PB5, fix this as well.
Signed-off-by Hans de Goede <[email protected]>--- drivers/pinctrl/sunxi/pinctrl-sun6i-a31.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)drivers/pinctrl/sunxi/pinctrl-sun6i-a31.c +0
-0
drivers/pinctrl/sunxi/pinctrl-sun6i-a31.c static const struct sunxi_desc_pin sun6i_a31_pins[] = { · line 137
Quoted 4 lines
drivers/pinctrl/sunxi/pinctrl-sun6i-a31.c +1
-0@@ -134,24 +134,28 @@ static const struct sunxi_desc_pin sun6i_a31_pins[] = {SUNXI_FUNCTION (0x1 ,"gpio_out" ),SUNXI_FUNCTION (0x2 ,"gmac" ),/* RXD4 */ SUNXI_FUNCTION (0x3 ,"lcd1" ),/* D15 */ + SUNXI_FUNCTION(0x4, "clk_a_out"),
It's called clk_out_a on the A20, I'd rather stick with the same scheme here.
Quoted 42 lines
drivers/pinctrl/sunxi/pinctrl-sun6i-a31.c +5
-0SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 15)), /* PA_EINT15 */SUNXI_PIN (SUNXI_PINCTRL_PIN (A ,16 ),SUNXI_FUNCTION (0x0 ,"gpio_in" ),SUNXI_FUNCTION (0x1 ,"gpio_out" ),SUNXI_FUNCTION (0x2 ,"gmac" ),/* RXD5 */ SUNXI_FUNCTION (0x3 ,"lcd1" ),/* D16 */ +SUNXI_FUNCTION (0x4 ,"dmic" ),/* CLK */ SUNXI_FUNCTION_IRQ_BANK (0x6 ,0 ,16 )),/* PA_EINT16 */ SUNXI_PIN (SUNXI_PINCTRL_PIN (A ,17 ),SUNXI_FUNCTION (0x0 ,"gpio_in" ),SUNXI_FUNCTION (0x1 ,"gpio_out" ),SUNXI_FUNCTION (0x2 ,"gmac" ),/* RXD6 */ SUNXI_FUNCTION (0x3 ,"lcd1" ),/* D17 */ +SUNXI_FUNCTION (0x4 ,"dmic" ),/* DIN */ SUNXI_FUNCTION_IRQ_BANK (0x6 ,0 ,17 )),/* PA_EINT17 */ SUNXI_PIN (SUNXI_PINCTRL_PIN (A ,18 ),SUNXI_FUNCTION (0x0 ,"gpio_in" ),SUNXI_FUNCTION (0x1 ,"gpio_out" ),SUNXI_FUNCTION (0x2 ,"gmac" ),/* RXD7 */ SUNXI_FUNCTION (0x3 ,"lcd1" ),/* D18 */ +SUNXI_FUNCTION (0x4 ,"clk_b_out" ),SUNXI_FUNCTION_IRQ_BANK (0x6 ,0 ,18 )),/* PA_EINT18 */ SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 19), SUNXI_FUNCTION(0x0, "gpio_in"),@@ -207,6 +211,7 @@ static const struct sunxi_desc_pin sun6i_a31_pins[] = { SUNXI_FUNCTION(0x1, "gpio_out"), SUNXI_FUNCTION(0x2, "gmac"), /* MDC */ SUNXI_FUNCTION(0x3, "lcd1"), /* HSYNC */ + SUNXI_FUNCTION(0x4, "clk_c_out"), SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 26)), /* PA_EINT26 */ SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 27), SUNXI_FUNCTION(0x0, "gpio_in"),@@ -242,20 +247,20 @@ static const struct sunxi_desc_pin sun6i_a31_pins[] = { SUNXI_FUNCTION(0x1, "gpio_out"), SUNXI_FUNCTION(0x2, "i2s0"), /* DO1 */ SUNXI_FUNCTION(0x3, "uart3"), /* RTS */ + SUNXI_FUNCTION(0x4, "i2c3"), /* SCK */ SUNXI_FUNCTION_IRQ_BANK(0x6, 1, 4)), /* PB_EINT4 */ SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 5), SUNXI_FUNCTION(0x0, "gpio_in"), SUNXI_FUNCTION(0x1, "gpio_out"), SUNXI_FUNCTION(0x2, "i2s0"), /* DO2 */
drivers/pinctrl/sunxi/pinctrl-sun6i-a31.c static const struct sunxi_desc_pin sun6i_a31_pins[] = { · line 258
Quoted 10 lines
drivers/pinctrl/sunxi/pinctrl-sun6i-a31.c +1
-2SUNXI_FUNCTION(0x3, "uart3"), /* TX */ - SUNXI_FUNCTION(0x4, "i2c3"), /* SCK */ + SUNXI_FUNCTION(0x4, "i2c3"), /* SDA */ SUNXI_FUNCTION_IRQ_BANK(0x6, 1, 5)), /* PB_EINT5 */ SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 6), SUNXI_FUNCTION(0x0, "gpio_in"), SUNXI_FUNCTION(0x1, "gpio_out"), SUNXI_FUNCTION(0x2, "i2s0"), /* DO3 */ SUNXI_FUNCTION(0x3, "uart3"), /* RX */ - SUNXI_FUNCTION(0x4, "i2c3"), /* SDA */
Where did you get that info from? The datasheet still reports that information.
Maxime
Signature · 10 lines
Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20141125/dddf3a17/attachment.sig>
PATCH 1/5 pinctrl: sun6i: Add some missing functions, fix i2c3 muxing
Hi,
Quoted 14 lines · Maxime Ripard
Hi,
Quoted 11 lines · Hans de Goede
While working on pinctrl for the A31s, I noticed that function 4 of PA15 - PA18 was missing, add these.
I also noticed that i2c3 sck / sda got assigned to PB5 & PB6, this should be PB4 & PB5, fix this as well.
Signed-off-by Hans de Goede <[email protected]>--- drivers/pinctrl/sunxi/pinctrl-sun6i-a31.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
Quoted 12 lines
drivers/pinctrl/sunxi/pinctrl-sun6i-a31.c static const struct sunxi_desc_pin sun6i_a31_pins[] = { · line 137
Quoted 9 lines
drivers/pinctrl/sunxi/pinctrl-sun6i-a31.c +1
-0@@ -134,24 +134,28 @@ static const struct sunxi_desc_pin sun6i_a31_pins[] = {SUNXI_FUNCTION (0x1 ,"gpio_out" ),SUNXI_FUNCTION (0x2 ,"gmac" ),/* RXD4 */ SUNXI_FUNCTION (0x3 ,"lcd1" ),/* D15 */ + SUNXI_FUNCTION(0x4, "clk_a_out"),It's called
clk_out_aon the A20, I'd rather stick with the same scheme here.
Will fix.
Quoted 47 lines
Quoted 47 lines
drivers/pinctrl/sunxi/pinctrl-sun6i-a31.c +6
-1SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 15)), /* PA_EINT15 */SUNXI_PIN (SUNXI_PINCTRL_PIN (A ,16 ),SUNXI_FUNCTION (0x0 ,"gpio_in" ),SUNXI_FUNCTION (0x1 ,"gpio_out" ),SUNXI_FUNCTION (0x2 ,"gmac" ),/* RXD5 */ SUNXI_FUNCTION (0x3 ,"lcd1" ),/* D16 */ +SUNXI_FUNCTION (0x4 ,"dmic" ),/* CLK */ SUNXI_FUNCTION_IRQ_BANK (0x6 ,0 ,16 )),/* PA_EINT16 */ SUNXI_PIN (SUNXI_PINCTRL_PIN (A ,17 ),SUNXI_FUNCTION (0x0 ,"gpio_in" ),SUNXI_FUNCTION (0x1 ,"gpio_out" ),SUNXI_FUNCTION (0x2 ,"gmac" ),/* RXD6 */ SUNXI_FUNCTION (0x3 ,"lcd1" ),/* D17 */ +SUNXI_FUNCTION (0x4 ,"dmic" ),/* DIN */ SUNXI_FUNCTION_IRQ_BANK (0x6 ,0 ,17 )),/* PA_EINT17 */ SUNXI_PIN (SUNXI_PINCTRL_PIN (A ,18 ),SUNXI_FUNCTION (0x0 ,"gpio_in" ),SUNXI_FUNCTION (0x1 ,"gpio_out" ),SUNXI_FUNCTION (0x2 ,"gmac" ),/* RXD7 */ SUNXI_FUNCTION (0x3 ,"lcd1" ),/* D18 */ +SUNXI_FUNCTION (0x4 ,"clk_b_out" ),SUNXI_FUNCTION_IRQ_BANK (0x6 ,0 ,18 )),/* PA_EINT18 */ SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 19), SUNXI_FUNCTION(0x0, "gpio_in"),@@ -207,6 +211,7 @@ static const struct sunxi_desc_pin sun6i_a31_pins[] = { SUNXI_FUNCTION(0x1, "gpio_out"), SUNXI_FUNCTION(0x2, "gmac"), /* MDC */ SUNXI_FUNCTION(0x3, "lcd1"), /* HSYNC */ + SUNXI_FUNCTION(0x4, "clk_c_out"), SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 26)), /* PA_EINT26 */ SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 27), SUNXI_FUNCTION(0x0, "gpio_in"),@@ -242,20 +247,20 @@ static const struct sunxi_desc_pin sun6i_a31_pins[] = { SUNXI_FUNCTION(0x1, "gpio_out"), SUNXI_FUNCTION(0x2, "i2s0"), /* DO1 */ SUNXI_FUNCTION(0x3, "uart3"), /* RTS */ + SUNXI_FUNCTION(0x4, "i2c3"), /* SCK */ SUNXI_FUNCTION_IRQ_BANK(0x6, 1, 4)), /* PB_EINT4 */SUNXI_PIN (SUNXI_PINCTRL_PIN (B ,5 ),SUNXI_FUNCTION (0x0 ,"gpio_in" ),SUNXI_FUNCTION (0x1 ,"gpio_out" ),SUNXI_FUNCTION (0x2 ,"i2s0" ),/* DO2 */ SUNXI_FUNCTION (0x3 ,"uart3" ),/* TX */ -SUNXI_FUNCTION (0x4 ,"i2c3" ),/* SCK */ +SUNXI_FUNCTION (0x4 ,"i2c3" ),/* SDA */ SUNXI_FUNCTION_IRQ_BANK (0x6 ,1 ,5 )),/* PB_EINT5 */ SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 6),
Quoted 8 lines
drivers/pinctrl/sunxi/pinctrl-sun6i-a31.c static const struct sunxi_desc_pin sun6i_a31_pins[] = { · line 258
Quoted 5 lines
drivers/pinctrl/sunxi/pinctrl-sun6i-a31.c +0
-1SUNXI_FUNCTION (0x0 ,"gpio_in" ),SUNXI_FUNCTION (0x1 ,"gpio_out" ),SUNXI_FUNCTION (0x2 ,"i2s0" ),/* DO3 */ SUNXI_FUNCTION(0x3, "uart3"), /* RX */ - SUNXI_FUNCTION(0x4, "i2c3"), /* SDA */Where did you get that info from? The datasheet still reports that information.
I assume with the datasheet you mean "A31 User Manual V1.20.pdf", which was last updated on September 20, 2013. I did not check that one, now I see where the original pinctrl code from.
So I've done some more digging:
"A31 Datasheet - v1.00 (2012-12-24).pdf" also has twi3 sck / sda on pin PB5 / PB6 like the current pinctrl code.
But "A31 Datasheet V1.40.pdf" which has the following in its revision log:
"1.4 Dec 10,2013 Modify Pin Description"
Moves them to PB4 / PB5 and that is where I got this from (and was the only place I initially looked), I think that this is an intentional change, and that PB4 / PB5 are the correct pins.
I will ask Allwinner which is correct, so that we know for sure.
Regards,
Hans
PATCH 1/5 pinctrl: sun6i: Add some missing functions, fix i2c3 muxing
Quoted 97 lines · Hans de Goede
Hi,
Quoted 14 lines · Maxime Ripard
Hi,
Quoted 11 lines · Hans de Goede
While working on pinctrl for the A31s, I noticed that function 4 of PA15 - PA18 was missing, add these.
I also noticed that i2c3 sck / sda got assigned to PB5 & PB6, this should be PB4 & PB5, fix this as well.
Signed-off-by Hans de Goede <[email protected]>--- drivers/pinctrl/sunxi/pinctrl-sun6i-a31.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)Quoted 12 lines
drivers/pinctrl/sunxi/pinctrl-sun6i-a31.c static const struct sunxi_desc_pin sun6i_a31_pins[] = { · line 137
Quoted 9 lines
drivers/pinctrl/sunxi/pinctrl-sun6i-a31.c +1
-0@@ -134,24 +134,28 @@ static const struct sunxi_desc_pin sun6i_a31_pins[] = {SUNXI_FUNCTION (0x1 ,"gpio_out" ),SUNXI_FUNCTION (0x2 ,"gmac" ),/* RXD4 */ SUNXI_FUNCTION (0x3 ,"lcd1" ),/* D15 */ + SUNXI_FUNCTION(0x4, "clk_a_out"),It's called
clk_out_aon the A20, I'd rather stick with the same scheme here.Will fix.
Quoted 47 lines
Quoted 47 lines
drivers/pinctrl/sunxi/pinctrl-sun6i-a31.c +6
-1SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 15)), /* PA_EINT15 */SUNXI_PIN (SUNXI_PINCTRL_PIN (A ,16 ),SUNXI_FUNCTION (0x0 ,"gpio_in" ),SUNXI_FUNCTION (0x1 ,"gpio_out" ),SUNXI_FUNCTION (0x2 ,"gmac" ),/* RXD5 */ SUNXI_FUNCTION (0x3 ,"lcd1" ),/* D16 */ +SUNXI_FUNCTION (0x4 ,"dmic" ),/* CLK */ SUNXI_FUNCTION_IRQ_BANK (0x6 ,0 ,16 )),/* PA_EINT16 */ SUNXI_PIN (SUNXI_PINCTRL_PIN (A ,17 ),SUNXI_FUNCTION (0x0 ,"gpio_in" ),SUNXI_FUNCTION (0x1 ,"gpio_out" ),SUNXI_FUNCTION (0x2 ,"gmac" ),/* RXD6 */ SUNXI_FUNCTION (0x3 ,"lcd1" ),/* D17 */ +SUNXI_FUNCTION (0x4 ,"dmic" ),/* DIN */ SUNXI_FUNCTION_IRQ_BANK (0x6 ,0 ,17 )),/* PA_EINT17 */ SUNXI_PIN (SUNXI_PINCTRL_PIN (A ,18 ),SUNXI_FUNCTION (0x0 ,"gpio_in" ),SUNXI_FUNCTION (0x1 ,"gpio_out" ),SUNXI_FUNCTION (0x2 ,"gmac" ),/* RXD7 */ SUNXI_FUNCTION (0x3 ,"lcd1" ),/* D18 */ +SUNXI_FUNCTION (0x4 ,"clk_b_out" ),SUNXI_FUNCTION_IRQ_BANK (0x6 ,0 ,18 )),/* PA_EINT18 */ SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 19), SUNXI_FUNCTION(0x0, "gpio_in"),@@ -207,6 +211,7 @@ static const struct sunxi_desc_pin sun6i_a31_pins[] = { SUNXI_FUNCTION(0x1, "gpio_out"), SUNXI_FUNCTION(0x2, "gmac"), /* MDC */ SUNXI_FUNCTION(0x3, "lcd1"), /* HSYNC */ + SUNXI_FUNCTION(0x4, "clk_c_out"), SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 26)), /* PA_EINT26 */ SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 27), SUNXI_FUNCTION(0x0, "gpio_in"),@@ -242,20 +247,20 @@ static const struct sunxi_desc_pin sun6i_a31_pins[] = { SUNXI_FUNCTION(0x1, "gpio_out"), SUNXI_FUNCTION(0x2, "i2s0"), /* DO1 */ SUNXI_FUNCTION(0x3, "uart3"), /* RTS */ + SUNXI_FUNCTION(0x4, "i2c3"), /* SCK */ SUNXI_FUNCTION_IRQ_BANK(0x6, 1, 4)), /* PB_EINT4 */SUNXI_PIN (SUNXI_PINCTRL_PIN (B ,5 ),SUNXI_FUNCTION (0x0 ,"gpio_in" ),SUNXI_FUNCTION (0x1 ,"gpio_out" ),SUNXI_FUNCTION (0x2 ,"i2s0" ),/* DO2 */ SUNXI_FUNCTION (0x3 ,"uart3" ),/* TX */ -SUNXI_FUNCTION (0x4 ,"i2c3" ),/* SCK */ +SUNXI_FUNCTION (0x4 ,"i2c3" ),/* SDA */ SUNXI_FUNCTION_IRQ_BANK (0x6 ,1 ,5 )),/* PB_EINT5 */ SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 6),Quoted 8 lines
drivers/pinctrl/sunxi/pinctrl-sun6i-a31.c static const struct sunxi_desc_pin sun6i_a31_pins[] = { · line 258
Quoted 5 lines
drivers/pinctrl/sunxi/pinctrl-sun6i-a31.c +0
-1SUNXI_FUNCTION (0x0 ,"gpio_in" ),SUNXI_FUNCTION (0x1 ,"gpio_out" ),SUNXI_FUNCTION (0x2 ,"i2s0" ),/* DO3 */ SUNXI_FUNCTION(0x3, "uart3"), /* RX */ - SUNXI_FUNCTION(0x4, "i2c3"), /* SDA */Where did you get that info from? The datasheet still reports that information.
I assume with the datasheet you mean "A31 User Manual V1.20.pdf", which was last updated on September 20, 2013. I did not check that one, now I see where the original pinctrl code from.
So I've done some more digging:
"A31 Datasheet - v1.00 (2012-12-24).pdf" also has twi3 sck / sda on pin PB5 / PB6 like the current pinctrl code.
Quoted 6 lines
But "A31 Datasheet V1.40.pdf" which has the following in its revision log:
"1.4 Dec 10,2013 Modify Pin Description"Moves them to PB4 / PB5 and that is where I got this from (and was the only place I initially looked), I think that this is an intentional change, and that PB4 / PB5 are the correct pins.
Funny, I was looking at the A31 datasheet v1.4 from 10/12/2013 that is in the allwinner's repo, and that's where I got this from (or some earlier version of it)
https://github.com/allwinner-zh/documents/blob/master/A31/A31%20datasheet%20V1.4%2020131210.pdf
Something's weird here :)
Quoted 1 line
I will ask Allwinner which is correct, so that we know for sure.
Yep, I saw that, thanks for clearing that up.
Maxime
Signature · 10 lines
Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20141126/a6b869b9/attachment.sig>
PATCH 1/5 pinctrl: sun6i: Add some missing functions, fix i2c3 muxing
Hi,
Quoted 105 lines · Maxime Ripard
Quoted 97 lines · Hans de Goede
Hi,
Quoted 14 lines · Maxime Ripard
Hi,
Quoted 11 lines · Hans de Goede
While working on pinctrl for the A31s, I noticed that function 4 of PA15 - PA18 was missing, add these.
I also noticed that i2c3 sck / sda got assigned to PB5 & PB6, this should be PB4 & PB5, fix this as well.
Signed-off-by Hans de Goede <[email protected]>--- drivers/pinctrl/sunxi/pinctrl-sun6i-a31.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)Quoted 12 lines
drivers/pinctrl/sunxi/pinctrl-sun6i-a31.c static const struct sunxi_desc_pin sun6i_a31_pins[] = { · line 137
Quoted 9 lines
drivers/pinctrl/sunxi/pinctrl-sun6i-a31.c +1
-0@@ -134,24 +134,28 @@ static const struct sunxi_desc_pin sun6i_a31_pins[] = {SUNXI_FUNCTION (0x1 ,"gpio_out" ),SUNXI_FUNCTION (0x2 ,"gmac" ),/* RXD4 */ SUNXI_FUNCTION (0x3 ,"lcd1" ),/* D15 */ + SUNXI_FUNCTION(0x4, "clk_a_out"),It's called
clk_out_aon the A20, I'd rather stick with the same scheme here.Will fix.
Quoted 47 lines
Quoted 47 lines
drivers/pinctrl/sunxi/pinctrl-sun6i-a31.c +6
-1SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 15)), /* PA_EINT15 */SUNXI_PIN (SUNXI_PINCTRL_PIN (A ,16 ),SUNXI_FUNCTION (0x0 ,"gpio_in" ),SUNXI_FUNCTION (0x1 ,"gpio_out" ),SUNXI_FUNCTION (0x2 ,"gmac" ),/* RXD5 */ SUNXI_FUNCTION (0x3 ,"lcd1" ),/* D16 */ +SUNXI_FUNCTION (0x4 ,"dmic" ),/* CLK */ SUNXI_FUNCTION_IRQ_BANK (0x6 ,0 ,16 )),/* PA_EINT16 */ SUNXI_PIN (SUNXI_PINCTRL_PIN (A ,17 ),SUNXI_FUNCTION (0x0 ,"gpio_in" ),SUNXI_FUNCTION (0x1 ,"gpio_out" ),SUNXI_FUNCTION (0x2 ,"gmac" ),/* RXD6 */ SUNXI_FUNCTION (0x3 ,"lcd1" ),/* D17 */ +SUNXI_FUNCTION (0x4 ,"dmic" ),/* DIN */ SUNXI_FUNCTION_IRQ_BANK (0x6 ,0 ,17 )),/* PA_EINT17 */ SUNXI_PIN (SUNXI_PINCTRL_PIN (A ,18 ),SUNXI_FUNCTION (0x0 ,"gpio_in" ),SUNXI_FUNCTION (0x1 ,"gpio_out" ),SUNXI_FUNCTION (0x2 ,"gmac" ),/* RXD7 */ SUNXI_FUNCTION (0x3 ,"lcd1" ),/* D18 */ +SUNXI_FUNCTION (0x4 ,"clk_b_out" ),SUNXI_FUNCTION_IRQ_BANK (0x6 ,0 ,18 )),/* PA_EINT18 */ SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 19), SUNXI_FUNCTION(0x0, "gpio_in"),@@ -207,6 +211,7 @@ static const struct sunxi_desc_pin sun6i_a31_pins[] = { SUNXI_FUNCTION(0x1, "gpio_out"), SUNXI_FUNCTION(0x2, "gmac"), /* MDC */ SUNXI_FUNCTION(0x3, "lcd1"), /* HSYNC */ + SUNXI_FUNCTION(0x4, "clk_c_out"), SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 26)), /* PA_EINT26 */ SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 27), SUNXI_FUNCTION(0x0, "gpio_in"),@@ -242,20 +247,20 @@ static const struct sunxi_desc_pin sun6i_a31_pins[] = { SUNXI_FUNCTION(0x1, "gpio_out"), SUNXI_FUNCTION(0x2, "i2s0"), /* DO1 */ SUNXI_FUNCTION(0x3, "uart3"), /* RTS */ + SUNXI_FUNCTION(0x4, "i2c3"), /* SCK */ SUNXI_FUNCTION_IRQ_BANK(0x6, 1, 4)), /* PB_EINT4 */SUNXI_PIN (SUNXI_PINCTRL_PIN (B ,5 ),SUNXI_FUNCTION (0x0 ,"gpio_in" ),SUNXI_FUNCTION (0x1 ,"gpio_out" ),SUNXI_FUNCTION (0x2 ,"i2s0" ),/* DO2 */ SUNXI_FUNCTION (0x3 ,"uart3" ),/* TX */ -SUNXI_FUNCTION (0x4 ,"i2c3" ),/* SCK */ +SUNXI_FUNCTION (0x4 ,"i2c3" ),/* SDA */ SUNXI_FUNCTION_IRQ_BANK (0x6 ,1 ,5 )),/* PB_EINT5 */ SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 6),Quoted 8 lines
drivers/pinctrl/sunxi/pinctrl-sun6i-a31.c static const struct sunxi_desc_pin sun6i_a31_pins[] = { · line 258
Quoted 5 lines
drivers/pinctrl/sunxi/pinctrl-sun6i-a31.c +0
-1SUNXI_FUNCTION (0x0 ,"gpio_in" ),SUNXI_FUNCTION (0x1 ,"gpio_out" ),SUNXI_FUNCTION (0x2 ,"i2s0" ),/* DO3 */ SUNXI_FUNCTION(0x3, "uart3"), /* RX */ - SUNXI_FUNCTION(0x4, "i2c3"), /* SDA */Where did you get that info from? The datasheet still reports that information.
I assume with the datasheet you mean "A31 User Manual V1.20.pdf", which was last updated on September 20, 2013. I did not check that one, now I see where the original pinctrl code from.
So I've done some more digging:
"A31 Datasheet - v1.00 (2012-12-24).pdf" also has twi3 sck / sda on pin PB5 / PB6 like the current pinctrl code.
Quoted 6 lines
But "A31 Datasheet V1.40.pdf" which has the following in its revision log:
"1.4 Dec 10,2013 Modify Pin Description"Moves them to PB4 / PB5 and that is where I got this from (and was the only place I initially looked), I think that this is an intentional change, and that PB4 / PB5 are the correct pins.
Quoted 7 lines
Funny, I was looking at the A31 datasheet v1.4 from 10/12/2013 that is in the allwinner's repo, and that's where I got this from (or some earlier version of it)
https://github.com/allwinner-zh/documents/blob/master/A31/A31%20datasheet%20V1.4%2020131210.pdf
Something's weird here :)
Oh, on double checking my "A31 Datasheet V1.40.pdf" also has the ins at PB5/6, only the A31s data sheet V1.4 has them at PB4/5.
Quoted 3 lines
Quoted 1 line
I will ask Allwinner which is correct, so that we know for sure.
Yep, I saw that, thanks for clearing that up.
So lets wait for their answer.
Regards,
Hans
PATCH 2/5 pinctrl: sun6i: Add A31s pinctrl support
In reply to Hans de GoedeThe A31s is a stripped down version of the A31, as such it is missing some pins and some functions on some pins.
The new pinctrl-sun6i-a31s.c this commit adds is a copy of pinctrl-sun6i-a31s.c with the missing pins and functions removed.
Note there is no a31s specific version of pinctrl-sun6i-a31-r.c, as the prcm pins are identical between the A31 and the A31s.
--- .../bindings/pinctrl/allwinner,sunxi-pinctrl.txt | 1 + drivers/pinctrl/sunxi/Kconfig | 4 + drivers/pinctrl/sunxi/Makefile | 1 + drivers/pinctrl/sunxi/pinctrl-sun6i-a31s.c | 814 +++++++++++++++++++++ 4 files changed, 820 insertions(+) create mode 100644 drivers/pinctrl/sunxi/pinctrl-sun6i-a31s.c
Documentation/devicetree/bindings/pinctrl/allwinner,sunxi-pinctrl.txt +1 -0
@@ -11,6 +11,7 @@ Required properties: "allwinner,sun5i-a10s-pinctrl" "allwinner,sun5i-a13-pinctrl" "allwinner,sun6i-a31-pinctrl" + "allwinner,sun6i-a31s-pinctrl" "allwinner,sun6i-a31-r-pinctrl" "allwinner,sun7i-a20-pinctrl" "allwinner,sun8i-a23-pinctrl"
drivers/pinctrl/sunxi/Kconfig +4 -0
@@ -21,6 +21,10 @@ config PINCTRL_SUN6I_A31 def_bool MACH_SUN6I select PINCTRL_SUNXI_COMMON +config PINCTRL_SUN6I_A31S + def_bool MACH_SUN6I + select PINCTRL_SUNXI_COMMON + config PINCTRL_SUN6I_A31_R def_bool MACH_SUN6I depends on RESET_CONTROLLER
drivers/pinctrl/sunxi/Makefile +1 -0
@@ -6,6 +6,7 @@ obj-$(CONFIG_PINCTRL_SUN4I_A10) += pinctrl-sun4i-a10.o obj-$(CONFIG_PINCTRL_SUN5I_A10S) += pinctrl-sun5i-a10s.o obj-$(CONFIG_PINCTRL_SUN5I_A13) += pinctrl-sun5i-a13.o obj-$(CONFIG_PINCTRL_SUN6I_A31) += pinctrl-sun6i-a31.o +obj-$(CONFIG_PINCTRL_SUN6I_A31S) += pinctrl-sun6i-a31s.o obj-$(CONFIG_PINCTRL_SUN6I_A31_R) += pinctrl-sun6i-a31-r.o obj-$(CONFIG_PINCTRL_SUN7I_A20) += pinctrl-sun7i-a20.o obj-$(CONFIG_PINCTRL_SUN8I_A23) += pinctrl-sun8i-a23.o
drivers/pinctrl/sunxi/pinctrl-sun6i-a31s.c new file +814 -0
814 lines not on this page · raw message
Signature · 1 line
2.1.0
PATCH 2/5 pinctrl: sun6i: Add A31s pinctrl support
Quoted 63 lines · Hans de Goede
The A31s is a stripped down version of the A31, as such it is missing some pins and some functions on some pins.
The new
pinctrl-sun6i-a31s.cthis commit adds is a copy ofpinctrl-sun6i-a31s.cwith the missing pins and functions removed.Note there is no a31s specific version of
pinctrl-sun6i-a31-r.c, as the prcm pins are identical between the A31 and the A31s.Signed-off-by Hans de Goede <[email protected]>--- .../bindings/pinctrl/allwinner,sunxi-pinctrl.txt | 1 + drivers/pinctrl/sunxi/Kconfig | 4 + drivers/pinctrl/sunxi/Makefile | 1 + drivers/pinctrl/sunxi/pinctrl-sun6i-a31s.c | 814 +++++++++++++++++++++ 4 files changed, 820 insertions(+) create mode 100644 drivers/pinctrl/sunxi/pinctrl-sun6i-a31s.cDocumentation/devicetree/bindings/pinctrl/allwinner,sunxi-pinctrl.txt +1
-0@@ -11,6 +11,7 @@ Required properties: "allwinner,sun5i-a10s-pinctrl" "allwinner,sun5i-a13-pinctrl" "allwinner,sun6i-a31-pinctrl" + "allwinner,sun6i-a31s-pinctrl" "allwinner,sun6i-a31-r-pinctrl" "allwinner,sun7i-a20-pinctrl" "allwinner,sun8i-a23-pinctrl"drivers/pinctrl/sunxi/Kconfig +4
-0@@ -21,6 +21,10 @@ config PINCTRL_SUN6I_A31 def_bool MACH_SUN6I select PINCTRL_SUNXI_COMMON +config PINCTRL_SUN6I_A31S + def_bool MACH_SUN6I + select PINCTRL_SUNXI_COMMON + config PINCTRL_SUN6I_A31_R def_bool MACH_SUN6I depends on RESET_CONTROLLERdrivers/pinctrl/sunxi/Makefile +1
-0@@ -6,6 +6,7 @@ obj-$(CONFIG_PINCTRL_SUN4I_A10) += pinctrl-sun4i-a10.o obj-$(CONFIG_PINCTRL_SUN5I_A10S) += pinctrl-sun5i-a10s.o obj-$(CONFIG_PINCTRL_SUN5I_A13) += pinctrl-sun5i-a13.o obj-$(CONFIG_PINCTRL_SUN6I_A31) += pinctrl-sun6i-a31.o +obj-$(CONFIG_PINCTRL_SUN6I_A31S) += pinctrl-sun6i-a31s.o obj-$(CONFIG_PINCTRL_SUN6I_A31_R) += pinctrl-sun6i-a31-r.o obj-$(CONFIG_PINCTRL_SUN7I_A20) += pinctrl-sun7i-a20.o obj-$(CONFIG_PINCTRL_SUN8I_A23) += pinctrl-sun8i-a23.odrivers/pinctrl/sunxi/pinctrl-sun6i-a31s.c new file +0
-0
drivers/pinctrl/sunxi/pinctrl-sun6i-a31s.c line 2
Quoted 2 lines
drivers/pinctrl/sunxi/pinctrl-sun6i-a31s.c new file +2
-0@@ -0,0 +1,814 @@ +/* +* Allwinner A31 SoCs pinctrl driver.
^ A31s
drivers/pinctrl/sunxi/pinctrl-sun6i-a31s.c line 6
Quoted 4 lines
drivers/pinctrl/sunxi/pinctrl-sun6i-a31s.c new file +4
-0+* +* Copyright (C) 2014 Maxime Ripard +* +* Maxime Ripard <[email protected]>
And I guess your copyright would be more appropriate here.
Quoted 797 lines
drivers/pinctrl/sunxi/pinctrl-sun6i-a31s.c new file +797
-0+* +* This file is licensed under the terms of the GNU General Public +* License version 2. This program is licensed "as is" without any +* warranty of any kind, whether express or implied. +*/ + +#include <linux/module.h> +#include <linux/platform_device.h> +#include <linux/of.h> +#include <linux/of_device.h> +#include <linux/pinctrl/pinctrl.h> + +#include "pinctrl-sunxi.h" + +static const struct sunxi_desc_pin sun6i_a31s_pins[] = { +SUNXI_PIN (SUNXI_PINCTRL_PIN (A ,0 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"gmac" ),/* TXD0 */ +SUNXI_FUNCTION (0x4 ,"uart1" ),/* DTR */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,0 ,0 )),/* PA_EINT0 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (A ,1 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"gmac" ),/* TXD1 */ +SUNXI_FUNCTION (0x4 ,"uart1" ),/* DSR */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,0 ,1 )),/* PA_EINT1 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (A ,2 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"gmac" ),/* TXD2 */ +SUNXI_FUNCTION (0x4 ,"uart1" ),/* DCD */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,0 ,2 )),/* PA_EINT2 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (A ,3 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"gmac" ),/* TXD3 */ +SUNXI_FUNCTION (0x4 ,"uart1" ),/* RING */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,0 ,3 )),/* PA_EINT3 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (A ,4 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"gmac" ),/* TXD4 */ +SUNXI_FUNCTION (0x4 ,"uart1" ),/* TX */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,0 ,4 )),/* PA_EINT4 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (A ,5 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"gmac" ),/* TXD5 */ +SUNXI_FUNCTION (0x4 ,"uart1" ),/* RX */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,0 ,5 )),/* PA_EINT5 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (A ,6 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"gmac" ),/* TXD6 */ +SUNXI_FUNCTION (0x4 ,"uart1" ),/* RTS */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,0 ,6 )),/* PA_EINT6 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (A ,7 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"gmac" ),/* TXD7 */ +SUNXI_FUNCTION (0x4 ,"uart1" ),/* CTS */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,0 ,7 )),/* PA_EINT7 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (A ,8 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"gmac" ),/* TXCLK */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,0 ,8 )),/* PA_EINT8 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (A ,9 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"gmac" ),/* TXEN */ +SUNXI_FUNCTION (0x4 ,"mmc3" ),/* CMD */ +SUNXI_FUNCTION (0x5 ,"mmc2" ),/* CMD */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,0 ,9 )),/* PA_EINT9 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (A ,10 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"gmac" ),/* GTXCLK */ +SUNXI_FUNCTION (0x4 ,"mmc3" ),/* CLK */ +SUNXI_FUNCTION (0x5 ,"mmc2" ),/* CLK */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,0 ,10 )),/* PA_EINT10 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (A ,11 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"gmac" ),/* RXD0 */ +SUNXI_FUNCTION (0x4 ,"mmc3" ),/* D0 */ +SUNXI_FUNCTION (0x5 ,"mmc2" ),/* D0 */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,0 ,11 )),/* PA_EINT11 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (A ,12 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"gmac" ),/* RXD1 */ +SUNXI_FUNCTION (0x4 ,"mmc3" ),/* D1 */ +SUNXI_FUNCTION (0x5 ,"mmc2" ),/* D1 */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,0 ,12 )),/* PA_EINT12 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (A ,13 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"gmac" ),/* RXD2 */ +SUNXI_FUNCTION (0x4 ,"mmc3" ),/* D2 */ +SUNXI_FUNCTION (0x5 ,"mmc2" ),/* D2 */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,0 ,13 )),/* PA_EINT13 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (A ,14 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"gmac" ),/* RXD3 */ +SUNXI_FUNCTION (0x4 ,"mmc3" ),/* D3 */ +SUNXI_FUNCTION (0x5 ,"mmc2" ),/* D3 */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,0 ,14 )),/* PA_EINT14 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (A ,15 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"gmac" ),/* RXD4 */ +SUNXI_FUNCTION (0x4 ,"clk_a_out" ), +SUNXI_FUNCTION_IRQ_BANK (0x6 ,0 ,15 )),/* PA_EINT15 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (A ,16 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"gmac" ),/* RXD5 */ +SUNXI_FUNCTION (0x4 ,"dmic" ),/* CLK */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,0 ,16 )),/* PA_EINT16 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (A ,17 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"gmac" ),/* RXD6 */ +SUNXI_FUNCTION (0x4 ,"dmic" ),/* DIN */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,0 ,17 )),/* PA_EINT17 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (A ,18 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"gmac" ),/* RXD7 */ +SUNXI_FUNCTION (0x4 ,"clk_b_out" ), +SUNXI_FUNCTION_IRQ_BANK (0x6 ,0 ,18 )),/* PA_EINT18 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (A ,19 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"gmac" ),/* RXDV */ +SUNXI_FUNCTION (0x4 ,"pwm3" ),/* Positive */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,0 ,19 )),/* PA_EINT19 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (A ,20 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"gmac" ),/* RXCLK */ +SUNXI_FUNCTION (0x4 ,"pwm3" ),/* Negative */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,0 ,20 )),/* PA_EINT20 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (A ,21 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"gmac" ),/* TXERR */ +SUNXI_FUNCTION (0x4 ,"spi3" ),/* CS0 */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,0 ,21 )),/* PA_EINT21 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (A ,22 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"gmac" ),/* RXERR */ +SUNXI_FUNCTION (0x4 ,"spi3" ),/* CLK */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,0 ,22 )),/* PA_EINT22 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (A ,23 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"gmac" ),/* COL */ +SUNXI_FUNCTION (0x4 ,"spi3" ),/* MOSI */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,0 ,23 )),/* PA_EINT23 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (A ,24 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"gmac" ),/* CRS */ +SUNXI_FUNCTION (0x4 ,"spi3" ),/* MISO */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,0 ,24 )),/* PA_EINT24 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (A ,25 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"gmac" ),/* CLKIN */ +SUNXI_FUNCTION (0x4 ,"spi3" ),/* CS1 */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,0 ,25 )),/* PA_EINT25 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (A ,26 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"gmac" ),/* MDC */ +SUNXI_FUNCTION (0x4 ,"clk_c_out" ), +SUNXI_FUNCTION_IRQ_BANK (0x6 ,0 ,26 )),/* PA_EINT26 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (A ,27 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"gmac" ),/* MDIO */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,0 ,27 )),/* PA_EINT27 */ +/* Hole */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (B ,0 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"i2s0" ),/* MCLK */ +SUNXI_FUNCTION (0x3 ,"uart3" ),/* CTS */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,1 ,0 )),/* PB_EINT0 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (B ,1 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"i2s0" ),/* BCLK */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,1 ,1 )),/* PB_EINT1 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (B ,2 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"i2s0" ),/* LRCK */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,1 ,2 )),/* PB_EINT2 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (B ,3 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"i2s0" ),/* DO0 */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,1 ,3 )),/* PB_EINT3 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (B ,4 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"i2s0" ),/* DO1 */ +SUNXI_FUNCTION (0x3 ,"uart3" ),/* RTS */ +SUNXI_FUNCTION (0x4 ,"i2c3" ),/* SCK */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,1 ,4 )),/* PB_EINT4 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (B ,5 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"i2s0" ),/* DO2 */ +SUNXI_FUNCTION (0x3 ,"uart3" ),/* TX */ +SUNXI_FUNCTION (0x4 ,"i2c3" ),/* SDA */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,1 ,5 )),/* PB_EINT5 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (B ,6 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"i2s0" ),/* DO3 */ +SUNXI_FUNCTION (0x3 ,"uart3" ),/* RX */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,1 ,6 )),/* PB_EINT6 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (B ,7 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x3 ,"i2s0" ),/* DI */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,1 ,7 )),/* PB_EINT7 */ +/* Hole */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (C ,0 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"nand0" ),/* WE */ +SUNXI_FUNCTION (0x3 ,"spi0" )),/* MOSI */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (C ,1 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"nand0" ),/* ALE */ +SUNXI_FUNCTION (0x3 ,"spi0" )),/* MISO */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (C ,2 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"nand0" ),/* CLE */ +SUNXI_FUNCTION (0x3 ,"spi0" )),/* CLK */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (C ,3 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"nand0" )),/* CE1 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (C ,4 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"nand0" )),/* CE0 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (C ,5 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"nand0" )),/* RE */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (C ,6 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"nand0" ),/* RB0 */ +SUNXI_FUNCTION (0x3 ,"mmc2" ),/* CMD */ +SUNXI_FUNCTION (0x4 ,"mmc3" )),/* CMD */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (C ,7 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"nand0" ),/* RB1 */ +SUNXI_FUNCTION (0x3 ,"mmc2" ),/* CLK */ +SUNXI_FUNCTION (0x4 ,"mmc3" )),/* CLK */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (C ,8 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"nand0" ),/* DQ0 */ +SUNXI_FUNCTION (0x3 ,"mmc2" ),/* D0 */ +SUNXI_FUNCTION (0x4 ,"mmc3" )),/* D0 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (C ,9 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"nand0" ),/* DQ1 */ +SUNXI_FUNCTION (0x3 ,"mmc2" ),/* D1 */ +SUNXI_FUNCTION (0x4 ,"mmc3" )),/* D1 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (C ,10 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"nand0" ),/* DQ2 */ +SUNXI_FUNCTION (0x3 ,"mmc2" ),/* D2 */ +SUNXI_FUNCTION (0x4 ,"mmc3" )),/* D2 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (C ,11 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"nand0" ),/* DQ3 */ +SUNXI_FUNCTION (0x3 ,"mmc2" ),/* D3 */ +SUNXI_FUNCTION (0x4 ,"mmc3" )),/* D3 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (C ,12 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"nand0" ),/* DQ4 */ +SUNXI_FUNCTION (0x3 ,"mmc2" ),/* D4 */ +SUNXI_FUNCTION (0x4 ,"mmc3" )),/* D4 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (C ,13 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"nand0" ),/* DQ5 */ +SUNXI_FUNCTION (0x3 ,"mmc2" ),/* D5 */ +SUNXI_FUNCTION (0x4 ,"mmc3" )),/* D5 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (C ,14 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"nand0" ),/* DQ6 */ +SUNXI_FUNCTION (0x3 ,"mmc2" ),/* D6 */ +SUNXI_FUNCTION (0x4 ,"mmc3" )),/* D6 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (C ,15 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"nand0" ),/* DQ7 */ +SUNXI_FUNCTION (0x3 ,"mmc2" ),/* D7 */ +SUNXI_FUNCTION (0x4 ,"mmc3" )),/* D7 */ +/* Hole in pin numbering ! */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (C ,24 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"nand0" ),/* DQS */ +SUNXI_FUNCTION (0x3 ,"mmc2" ),/* RST */ +SUNXI_FUNCTION (0x4 ,"mmc3" )),/* RST */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (C ,25 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"nand0" )),/* CE2 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (C ,26 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"nand0" )),/* CE3 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (C ,27 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x3 ,"spi0" )),/* CS0 */ +/* Hole */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (D ,0 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"lcd0" ),/* D0 */ +SUNXI_FUNCTION (0x3 ,"lvds0" )),/* VP0 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (D ,1 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"lcd0" ),/* D1 */ +SUNXI_FUNCTION (0x3 ,"lvds0" )),/* VN0 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (D ,2 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"lcd0" ),/* D2 */ +SUNXI_FUNCTION (0x3 ,"lvds0" )),/* VP1 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (D ,3 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"lcd0" ),/* D3 */ +SUNXI_FUNCTION (0x3 ,"lvds0" )),/* VN1 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (D ,4 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"lcd0" ),/* D4 */ +SUNXI_FUNCTION (0x3 ,"lvds0" )),/* VP2 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (D ,5 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"lcd0" ),/* D5 */ +SUNXI_FUNCTION (0x3 ,"lvds0" )),/* VN2 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (D ,6 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"lcd0" ),/* D6 */ +SUNXI_FUNCTION (0x3 ,"lvds0" )),/* VPC */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (D ,7 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"lcd0" ),/* D7 */ +SUNXI_FUNCTION (0x3 ,"lvds0" )),/* VNC */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (D ,8 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"lcd0" ),/* D8 */ +SUNXI_FUNCTION (0x3 ,"lvds0" )),/* VP3 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (D ,9 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"lcd0" ),/* D9 */ +SUNXI_FUNCTION (0x3 ,"lvds0" )),/* VN3 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (D ,10 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"lcd0" )),/* D10 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (D ,11 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"lcd0" )),/* D11 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (D ,12 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"lcd0" )),/* D12 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (D ,13 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"lcd0" )),/* D13 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (D ,14 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"lcd0" )),/* D14 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (D ,15 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"lcd0" )),/* D15 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (D ,16 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"lcd0" )),/* D16 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (D ,17 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"lcd0" )),/* D17 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (D ,18 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"lcd0" )),/* D18 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (D ,19 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"lcd0" )),/* D19 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (D ,20 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"lcd0" )),/* D20 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (D ,21 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"lcd0" )),/* D21 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (D ,22 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"lcd0" )),/* D22 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (D ,23 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"lcd0" )),/* D23 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (D ,24 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"lcd0" )),/* CLK */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (D ,25 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"lcd0" )),/* DE */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (D ,26 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"lcd0" )),/* HSYNC */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (D ,27 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"lcd0" )),/* VSYNC */ +/* Hole */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (E ,0 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"csi" ),/* PCLK */ +SUNXI_FUNCTION (0x3 ,"ts" ),/* CLK */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,2 ,0 )),/* PE_EINT0 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (E ,1 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"csi" ),/* MCLK */ +SUNXI_FUNCTION (0x3 ,"ts" ),/* ERR */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,2 ,1 )),/* PE_EINT1 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (E ,2 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"csi" ),/* HSYNC */ +SUNXI_FUNCTION (0x3 ,"ts" ),/* SYNC */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,2 ,2 )),/* PE_EINT2 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (E ,3 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"csi" ),/* VSYNC */ +SUNXI_FUNCTION (0x3 ,"ts" ),/* DVLD */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,2 ,3 )),/* PE_EINT3 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (E ,4 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"csi" ),/* D0 */ +SUNXI_FUNCTION (0x3 ,"uart5" ),/* TX */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,2 ,4 )),/* PE_EINT4 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (E ,5 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"csi" ),/* D1 */ +SUNXI_FUNCTION (0x3 ,"uart5" ),/* RX */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,2 ,5 )),/* PE_EINT5 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (E ,6 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"csi" ),/* D2 */ +SUNXI_FUNCTION (0x3 ,"uart5" ),/* RTS */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,2 ,6 )),/* PE_EINT6 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (E ,7 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"csi" ),/* D3 */ +SUNXI_FUNCTION (0x3 ,"uart5" ),/* CTS */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,2 ,7 )),/* PE_EINT7 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (E ,8 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"csi" ),/* D4 */ +SUNXI_FUNCTION (0x3 ,"ts" ),/* D0 */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,2 ,8 )),/* PE_EINT8 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (E ,9 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"csi" ),/* D5 */ +SUNXI_FUNCTION (0x3 ,"ts" ),/* D1 */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,2 ,9 )),/* PE_EINT9 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (E ,10 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"csi" ),/* D6 */ +SUNXI_FUNCTION (0x3 ,"ts" ),/* D2 */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,2 ,10 )),/* PE_EINT10 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (E ,11 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"csi" ),/* D7 */ +SUNXI_FUNCTION (0x3 ,"ts" ),/* D3 */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,2 ,11 )),/* PE_EINT11 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (E ,12 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"csi" ),/* D8 */ +SUNXI_FUNCTION (0x3 ,"ts" ),/* D4 */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,2 ,12 )),/* PE_EINT12 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (E ,13 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"csi" ),/* D9 */ +SUNXI_FUNCTION (0x3 ,"ts" ),/* D5 */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,2 ,13 )),/* PE_EINT13 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (E ,14 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"csi" ),/* D10 */ +SUNXI_FUNCTION (0x3 ,"ts" ),/* D6 */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,2 ,14 )),/* PE_EINT14 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (E ,15 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"csi" ),/* D11 */ +SUNXI_FUNCTION (0x3 ,"ts" ),/* D7 */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,2 ,15 )),/* PE_EINT15 */ +/* Hole */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (F ,0 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"mmc0" ),/* D1 */ +SUNXI_FUNCTION (0x4 ,"jtag" )),/* MS1 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (F ,1 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"mmc0" ),/* D0 */ +SUNXI_FUNCTION (0x4 ,"jtag" )),/* DI1 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (F ,2 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"mmc0" ),/* CLK */ +SUNXI_FUNCTION (0x4 ,"uart0" )),/* TX */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (F ,3 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"mmc0" ),/* CMD */ +SUNXI_FUNCTION (0x4 ,"jtag" )),/* DO1 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (F ,4 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"mmc0" ),/* D3 */ +SUNXI_FUNCTION (0x4 ,"uart0" )),/* RX */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (F ,5 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"mmc0" ),/* D2 */ +SUNXI_FUNCTION (0x4 ,"jtag" )),/* CK1 */ +/* Hole */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (G ,0 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"mmc1" ),/* CLK */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,3 ,0 )),/* PG_EINT0 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (G ,1 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"mmc1" ),/* CMD */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,3 ,1 )),/* PG_EINT1 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (G ,2 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"mmc1" ),/* D0 */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,3 ,2 )),/* PG_EINT2 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (G ,3 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"mmc1" ),/* D1 */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,3 ,3 )),/* PG_EINT3 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (G ,4 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"mmc1" ),/* D2 */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,3 ,4 )),/* PG_EINT4 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (G ,5 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"mmc1" ),/* D3 */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,3 ,5 )),/* PG_EINT5 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (G ,6 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"uart2" ),/* TX */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,3 ,6 )),/* PG_EINT6 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (G ,7 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"uart2" ),/* RX */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,3 ,7 )),/* PG_EINT7 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (G ,8 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"uart2" ),/* RTS */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,3 ,8 )),/* PG_EINT8 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (G ,9 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"uart2" ),/* CTS */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,3 ,9 )),/* PG_EINT9 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (G ,10 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"i2c3" ),/* SCK */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,3 ,10 )),/* PG_EINT10 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (G ,11 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"i2c3" ),/* SDA */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,3 ,11 )),/* PG_EINT11 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (G ,12 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"spi1" ),/* CS1 */ +SUNXI_FUNCTION (0x3 ,"i2s1" ),/* MCLK */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,3 ,12 )),/* PG_EINT12 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (G ,13 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"spi1" ),/* CS0 */ +SUNXI_FUNCTION (0x3 ,"i2s1" ),/* BCLK */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,3 ,13 )),/* PG_EINT13 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (G ,14 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"spi1" ),/* CLK */ +SUNXI_FUNCTION (0x3 ,"i2s1" ),/* LRCK */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,3 ,14 )),/* PG_EINT14 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (G ,15 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"spi1" ),/* MOSI */ +SUNXI_FUNCTION (0x3 ,"i2s1" ),/* DIN */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,3 ,15 )),/* PG_EINT15 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (G ,16 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"spi1" ),/* MISO */ +SUNXI_FUNCTION (0x3 ,"i2s1" ),/* DOUT */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,3 ,16 )),/* PG_EINT16 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (G ,17 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"uart4" ),/* TX */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,3 ,17 )),/* PG_EINT17 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (G ,18 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"uart4" ),/* RX */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,3 ,18 )),/* PG_EINT18 */ +/* Hole, note H starts at pin 9 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (H ,9 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"spi2" ),/* CS0 */ +SUNXI_FUNCTION (0x3 ,"jtag" ),/* MS0 */ +SUNXI_FUNCTION (0x4 ,"pwm1" )),/* Positive */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (H ,10 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"spi2" ),/* CLK */ +SUNXI_FUNCTION (0x3 ,"jtag" ),/* CK0 */ +SUNXI_FUNCTION (0x4 ,"pwm1" )),/* Negative */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (H ,11 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"spi2" ),/* MOSI */ +SUNXI_FUNCTION (0x3 ,"jtag" ),/* DO0 */ +SUNXI_FUNCTION (0x4 ,"pwm2" )),/* Positive */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (H ,12 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"spi2" ),/* MISO */ +SUNXI_FUNCTION (0x3 ,"jtag" ),/* DI0 */ +SUNXI_FUNCTION (0x4 ,"pwm2" )),/* Negative */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (H ,13 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"pwm0" )), +SUNXI_PIN (SUNXI_PINCTRL_PIN (H ,14 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"i2c0" )),/* SCK */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (H ,15 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"i2c0" )),/* SDA */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (H ,16 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"i2c1" )),/* SCK */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (H ,17 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"i2c1" )),/* SDA */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (H ,18 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"i2c2" )),/* SCK */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (H ,19 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"i2c2" )),/* SDA */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (H ,20 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"uart0" )),/* TX */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (H ,21 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"uart0" )),/* RX */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (H ,22 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" )), +SUNXI_PIN (SUNXI_PINCTRL_PIN (H ,23 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" )), +SUNXI_PIN (SUNXI_PINCTRL_PIN (H ,24 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" )), +SUNXI_PIN (SUNXI_PINCTRL_PIN (H ,25 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" )), +SUNXI_PIN (SUNXI_PINCTRL_PIN (H ,26 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" )), +SUNXI_PIN (SUNXI_PINCTRL_PIN (H ,27 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" )), +SUNXI_PIN (SUNXI_PINCTRL_PIN (H ,28 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" )), +}; + +static const struct sunxi_pinctrl_desc sun6i_a31s_pinctrl_data = { + .pins = sun6i_a31s_pins, + .npins =ARRAY_SIZE (sun6i_a31s_pins), + .irq_banks =4 , +}; + +static int sun6i_a31s_pinctrl_probe (struct platform_device *pdev) +{ +return sunxi_pinctrl_init (pdev, + &sun6i_a31s_pinctrl_data); +} + +static struct of_device_id sun6i_a31s_pinctrl_match[] = { + { .compatible ="allwinner,sun6i-a31s-pinctrl" , }, + {} +}; +MODULE_DEVICE_TABLE (of, sun6i_a31s_pinctrl_match); + +static struct platform_driver sun6i_a31s_pinctrl_driver = { + .probe = sun6i_a31s_pinctrl_probe,
drivers/pinctrl/sunxi/pinctrl-sun6i-a31s.c line 813
Quoted 10 lines
drivers/pinctrl/sunxi/pinctrl-sun6i-a31s.c new file +10
-0+ .driver = { + .name = "sun6i-a31s-pinctrl", + .owner = THIS_MODULE, + .of_match_table = sun6i_a31s_pinctrl_match, + }, +}; +module_platform_driver (sun6i_a31s_pinctrl_driver); + +MODULE_AUTHOR ("Maxime Ripard <[email protected]" ); +MODULE_DESCRIPTION ("Allwinner A31 pinctrl driver" );
s/A31/A31s/
It looks fine otherwise. Once these very minor issues fixed, you can add my Acked-by.
Maxime
Signature · 10 lines
Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20141125/05862d6c/attachment-0001.sig>
PATCH 2/5 pinctrl: sun6i: Add A31s pinctrl support
Hi,
Quoted 60 lines · Maxime Ripard
Quoted 59 lines · Hans de Goede
The A31s is a stripped down version of the A31, as such it is missing some pins and some functions on some pins.
The new
pinctrl-sun6i-a31s.cthis commit adds is a copy ofpinctrl-sun6i-a31s.cwith the missing pins and functions removed.Note there is no a31s specific version of
pinctrl-sun6i-a31-r.c, as the prcm pins are identical between the A31 and the A31s.Signed-off-by Hans de Goede <[email protected]>--- .../bindings/pinctrl/allwinner,sunxi-pinctrl.txt | 1 + drivers/pinctrl/sunxi/Kconfig | 4 + drivers/pinctrl/sunxi/Makefile | 1 + drivers/pinctrl/sunxi/pinctrl-sun6i-a31s.c | 814 +++++++++++++++++++++ 4 files changed, 820 insertions(+)create mode 100644
drivers/pinctrl/sunxi/pinctrl-sun6i-a31s.cDocumentation/devicetree/bindings/pinctrl/allwinner,sunxi-pinctrl.txt +1
-0@@ -11,6 +11,7 @@ Required properties: "allwinner,sun5i-a10s-pinctrl" "allwinner,sun5i-a13-pinctrl" "allwinner,sun6i-a31-pinctrl" + "allwinner,sun6i-a31s-pinctrl" "allwinner,sun6i-a31-r-pinctrl" "allwinner,sun7i-a20-pinctrl" "allwinner,sun8i-a23-pinctrl"drivers/pinctrl/sunxi/Kconfig +4
-0@@ -21,6 +21,10 @@ config PINCTRL_SUN6I_A31 def_bool MACH_SUN6I select PINCTRL_SUNXI_COMMON +config PINCTRL_SUN6I_A31S + def_bool MACH_SUN6I + select PINCTRL_SUNXI_COMMON + config PINCTRL_SUN6I_A31_R def_bool MACH_SUN6I depends on RESET_CONTROLLERdrivers/pinctrl/sunxi/Makefile +1
-0@@ -6,6 +6,7 @@ obj-$(CONFIG_PINCTRL_SUN4I_A10) += pinctrl-sun4i-a10.o obj-$(CONFIG_PINCTRL_SUN5I_A10S) += pinctrl-sun5i-a10s.o obj-$(CONFIG_PINCTRL_SUN5I_A13) += pinctrl-sun5i-a13.o obj-$(CONFIG_PINCTRL_SUN6I_A31) += pinctrl-sun6i-a31.o +obj-$(CONFIG_PINCTRL_SUN6I_A31S) += pinctrl-sun6i-a31s.o obj-$(CONFIG_PINCTRL_SUN6I_A31_R) += pinctrl-sun6i-a31-r.o obj-$(CONFIG_PINCTRL_SUN7I_A20) += pinctrl-sun7i-a20.o obj-$(CONFIG_PINCTRL_SUN8I_A23) += pinctrl-sun8i-a23.odrivers/pinctrl/sunxi/pinctrl-sun6i-a31s.c new file +0
-0
Quoted 9 lines
drivers/pinctrl/sunxi/pinctrl-sun6i-a31s.c line 2
Quoted 6 lines
index 0000000..42ee373
drivers/pinctrl/sunxi/pinctrl-sun6i-a31s.c new file +2
-0@@ -0,0 +1,814 @@ +/* +* Allwinner A31 SoCs pinctrl driver. ^ A31s
Good one.
Quoted 6 lines
drivers/pinctrl/sunxi/pinctrl-sun6i-a31s.c line 6
Quoted 4 lines
drivers/pinctrl/sunxi/pinctrl-sun6i-a31s.c new file +4
-0+* +* Copyright (C) 2014 Maxime Ripard +* +* Maxime Ripard <[email protected]> And I guess your copyright would be more appropriate here.
It is a copy of a file you authored, with some lines removed, so I deliberately left this as is.
Quoted 801 lines
Quoted 801 lines
drivers/pinctrl/sunxi/pinctrl-sun6i-a31s.c new file +801
-0+* +* This file is licensed under the terms of the GNU General Public +* License version 2. This program is licensed "as is" without any +* warranty of any kind, whether express or implied. +*/ + +#include <linux/module.h> +#include <linux/platform_device.h> +#include <linux/of.h> +#include <linux/of_device.h> +#include <linux/pinctrl/pinctrl.h> + +#include "pinctrl-sunxi.h" + +static const struct sunxi_desc_pin sun6i_a31s_pins[] = { +SUNXI_PIN (SUNXI_PINCTRL_PIN (A ,0 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"gmac" ),/* TXD0 */ +SUNXI_FUNCTION (0x4 ,"uart1" ),/* DTR */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,0 ,0 )),/* PA_EINT0 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (A ,1 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"gmac" ),/* TXD1 */ +SUNXI_FUNCTION (0x4 ,"uart1" ),/* DSR */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,0 ,1 )),/* PA_EINT1 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (A ,2 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"gmac" ),/* TXD2 */ +SUNXI_FUNCTION (0x4 ,"uart1" ),/* DCD */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,0 ,2 )),/* PA_EINT2 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (A ,3 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"gmac" ),/* TXD3 */ +SUNXI_FUNCTION (0x4 ,"uart1" ),/* RING */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,0 ,3 )),/* PA_EINT3 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (A ,4 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"gmac" ),/* TXD4 */ +SUNXI_FUNCTION (0x4 ,"uart1" ),/* TX */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,0 ,4 )),/* PA_EINT4 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (A ,5 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"gmac" ),/* TXD5 */ +SUNXI_FUNCTION (0x4 ,"uart1" ),/* RX */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,0 ,5 )),/* PA_EINT5 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (A ,6 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"gmac" ),/* TXD6 */ +SUNXI_FUNCTION (0x4 ,"uart1" ),/* RTS */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,0 ,6 )),/* PA_EINT6 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (A ,7 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"gmac" ),/* TXD7 */ +SUNXI_FUNCTION (0x4 ,"uart1" ),/* CTS */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,0 ,7 )),/* PA_EINT7 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (A ,8 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"gmac" ),/* TXCLK */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,0 ,8 )),/* PA_EINT8 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (A ,9 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"gmac" ),/* TXEN */ +SUNXI_FUNCTION (0x4 ,"mmc3" ),/* CMD */ +SUNXI_FUNCTION (0x5 ,"mmc2" ),/* CMD */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,0 ,9 )),/* PA_EINT9 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (A ,10 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"gmac" ),/* GTXCLK */ +SUNXI_FUNCTION (0x4 ,"mmc3" ),/* CLK */ +SUNXI_FUNCTION (0x5 ,"mmc2" ),/* CLK */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,0 ,10 )),/* PA_EINT10 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (A ,11 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"gmac" ),/* RXD0 */ +SUNXI_FUNCTION (0x4 ,"mmc3" ),/* D0 */ +SUNXI_FUNCTION (0x5 ,"mmc2" ),/* D0 */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,0 ,11 )),/* PA_EINT11 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (A ,12 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"gmac" ),/* RXD1 */ +SUNXI_FUNCTION (0x4 ,"mmc3" ),/* D1 */ +SUNXI_FUNCTION (0x5 ,"mmc2" ),/* D1 */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,0 ,12 )),/* PA_EINT12 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (A ,13 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"gmac" ),/* RXD2 */ +SUNXI_FUNCTION (0x4 ,"mmc3" ),/* D2 */ +SUNXI_FUNCTION (0x5 ,"mmc2" ),/* D2 */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,0 ,13 )),/* PA_EINT13 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (A ,14 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"gmac" ),/* RXD3 */ +SUNXI_FUNCTION (0x4 ,"mmc3" ),/* D3 */ +SUNXI_FUNCTION (0x5 ,"mmc2" ),/* D3 */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,0 ,14 )),/* PA_EINT14 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (A ,15 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"gmac" ),/* RXD4 */ +SUNXI_FUNCTION (0x4 ,"clk_a_out" ), +SUNXI_FUNCTION_IRQ_BANK (0x6 ,0 ,15 )),/* PA_EINT15 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (A ,16 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"gmac" ),/* RXD5 */ +SUNXI_FUNCTION (0x4 ,"dmic" ),/* CLK */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,0 ,16 )),/* PA_EINT16 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (A ,17 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"gmac" ),/* RXD6 */ +SUNXI_FUNCTION (0x4 ,"dmic" ),/* DIN */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,0 ,17 )),/* PA_EINT17 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (A ,18 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"gmac" ),/* RXD7 */ +SUNXI_FUNCTION (0x4 ,"clk_b_out" ), +SUNXI_FUNCTION_IRQ_BANK (0x6 ,0 ,18 )),/* PA_EINT18 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (A ,19 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"gmac" ),/* RXDV */ +SUNXI_FUNCTION (0x4 ,"pwm3" ),/* Positive */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,0 ,19 )),/* PA_EINT19 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (A ,20 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"gmac" ),/* RXCLK */ +SUNXI_FUNCTION (0x4 ,"pwm3" ),/* Negative */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,0 ,20 )),/* PA_EINT20 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (A ,21 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"gmac" ),/* TXERR */ +SUNXI_FUNCTION (0x4 ,"spi3" ),/* CS0 */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,0 ,21 )),/* PA_EINT21 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (A ,22 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"gmac" ),/* RXERR */ +SUNXI_FUNCTION (0x4 ,"spi3" ),/* CLK */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,0 ,22 )),/* PA_EINT22 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (A ,23 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"gmac" ),/* COL */ +SUNXI_FUNCTION (0x4 ,"spi3" ),/* MOSI */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,0 ,23 )),/* PA_EINT23 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (A ,24 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"gmac" ),/* CRS */ +SUNXI_FUNCTION (0x4 ,"spi3" ),/* MISO */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,0 ,24 )),/* PA_EINT24 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (A ,25 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"gmac" ),/* CLKIN */ +SUNXI_FUNCTION (0x4 ,"spi3" ),/* CS1 */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,0 ,25 )),/* PA_EINT25 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (A ,26 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"gmac" ),/* MDC */ +SUNXI_FUNCTION (0x4 ,"clk_c_out" ), +SUNXI_FUNCTION_IRQ_BANK (0x6 ,0 ,26 )),/* PA_EINT26 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (A ,27 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"gmac" ),/* MDIO */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,0 ,27 )),/* PA_EINT27 */ +/* Hole */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (B ,0 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"i2s0" ),/* MCLK */ +SUNXI_FUNCTION (0x3 ,"uart3" ),/* CTS */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,1 ,0 )),/* PB_EINT0 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (B ,1 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"i2s0" ),/* BCLK */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,1 ,1 )),/* PB_EINT1 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (B ,2 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"i2s0" ),/* LRCK */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,1 ,2 )),/* PB_EINT2 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (B ,3 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"i2s0" ),/* DO0 */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,1 ,3 )),/* PB_EINT3 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (B ,4 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"i2s0" ),/* DO1 */ +SUNXI_FUNCTION (0x3 ,"uart3" ),/* RTS */ +SUNXI_FUNCTION (0x4 ,"i2c3" ),/* SCK */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,1 ,4 )),/* PB_EINT4 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (B ,5 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"i2s0" ),/* DO2 */ +SUNXI_FUNCTION (0x3 ,"uart3" ),/* TX */ +SUNXI_FUNCTION (0x4 ,"i2c3" ),/* SDA */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,1 ,5 )),/* PB_EINT5 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (B ,6 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"i2s0" ),/* DO3 */ +SUNXI_FUNCTION (0x3 ,"uart3" ),/* RX */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,1 ,6 )),/* PB_EINT6 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (B ,7 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x3 ,"i2s0" ),/* DI */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,1 ,7 )),/* PB_EINT7 */ +/* Hole */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (C ,0 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"nand0" ),/* WE */ +SUNXI_FUNCTION (0x3 ,"spi0" )),/* MOSI */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (C ,1 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"nand0" ),/* ALE */ +SUNXI_FUNCTION (0x3 ,"spi0" )),/* MISO */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (C ,2 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"nand0" ),/* CLE */ +SUNXI_FUNCTION (0x3 ,"spi0" )),/* CLK */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (C ,3 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"nand0" )),/* CE1 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (C ,4 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"nand0" )),/* CE0 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (C ,5 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"nand0" )),/* RE */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (C ,6 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"nand0" ),/* RB0 */ +SUNXI_FUNCTION (0x3 ,"mmc2" ),/* CMD */ +SUNXI_FUNCTION (0x4 ,"mmc3" )),/* CMD */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (C ,7 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"nand0" ),/* RB1 */ +SUNXI_FUNCTION (0x3 ,"mmc2" ),/* CLK */ +SUNXI_FUNCTION (0x4 ,"mmc3" )),/* CLK */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (C ,8 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"nand0" ),/* DQ0 */ +SUNXI_FUNCTION (0x3 ,"mmc2" ),/* D0 */ +SUNXI_FUNCTION (0x4 ,"mmc3" )),/* D0 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (C ,9 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"nand0" ),/* DQ1 */ +SUNXI_FUNCTION (0x3 ,"mmc2" ),/* D1 */ +SUNXI_FUNCTION (0x4 ,"mmc3" )),/* D1 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (C ,10 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"nand0" ),/* DQ2 */ +SUNXI_FUNCTION (0x3 ,"mmc2" ),/* D2 */ +SUNXI_FUNCTION (0x4 ,"mmc3" )),/* D2 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (C ,11 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"nand0" ),/* DQ3 */ +SUNXI_FUNCTION (0x3 ,"mmc2" ),/* D3 */ +SUNXI_FUNCTION (0x4 ,"mmc3" )),/* D3 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (C ,12 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"nand0" ),/* DQ4 */ +SUNXI_FUNCTION (0x3 ,"mmc2" ),/* D4 */ +SUNXI_FUNCTION (0x4 ,"mmc3" )),/* D4 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (C ,13 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"nand0" ),/* DQ5 */ +SUNXI_FUNCTION (0x3 ,"mmc2" ),/* D5 */ +SUNXI_FUNCTION (0x4 ,"mmc3" )),/* D5 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (C ,14 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"nand0" ),/* DQ6 */ +SUNXI_FUNCTION (0x3 ,"mmc2" ),/* D6 */ +SUNXI_FUNCTION (0x4 ,"mmc3" )),/* D6 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (C ,15 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"nand0" ),/* DQ7 */ +SUNXI_FUNCTION (0x3 ,"mmc2" ),/* D7 */ +SUNXI_FUNCTION (0x4 ,"mmc3" )),/* D7 */ +/* Hole in pin numbering ! */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (C ,24 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"nand0" ),/* DQS */ +SUNXI_FUNCTION (0x3 ,"mmc2" ),/* RST */ +SUNXI_FUNCTION (0x4 ,"mmc3" )),/* RST */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (C ,25 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"nand0" )),/* CE2 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (C ,26 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"nand0" )),/* CE3 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (C ,27 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x3 ,"spi0" )),/* CS0 */ +/* Hole */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (D ,0 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"lcd0" ),/* D0 */ +SUNXI_FUNCTION (0x3 ,"lvds0" )),/* VP0 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (D ,1 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"lcd0" ),/* D1 */ +SUNXI_FUNCTION (0x3 ,"lvds0" )),/* VN0 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (D ,2 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"lcd0" ),/* D2 */ +SUNXI_FUNCTION (0x3 ,"lvds0" )),/* VP1 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (D ,3 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"lcd0" ),/* D3 */ +SUNXI_FUNCTION (0x3 ,"lvds0" )),/* VN1 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (D ,4 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"lcd0" ),/* D4 */ +SUNXI_FUNCTION (0x3 ,"lvds0" )),/* VP2 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (D ,5 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"lcd0" ),/* D5 */ +SUNXI_FUNCTION (0x3 ,"lvds0" )),/* VN2 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (D ,6 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"lcd0" ),/* D6 */ +SUNXI_FUNCTION (0x3 ,"lvds0" )),/* VPC */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (D ,7 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"lcd0" ),/* D7 */ +SUNXI_FUNCTION (0x3 ,"lvds0" )),/* VNC */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (D ,8 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"lcd0" ),/* D8 */ +SUNXI_FUNCTION (0x3 ,"lvds0" )),/* VP3 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (D ,9 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"lcd0" ),/* D9 */ +SUNXI_FUNCTION (0x3 ,"lvds0" )),/* VN3 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (D ,10 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"lcd0" )),/* D10 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (D ,11 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"lcd0" )),/* D11 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (D ,12 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"lcd0" )),/* D12 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (D ,13 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"lcd0" )),/* D13 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (D ,14 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"lcd0" )),/* D14 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (D ,15 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"lcd0" )),/* D15 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (D ,16 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"lcd0" )),/* D16 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (D ,17 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"lcd0" )),/* D17 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (D ,18 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"lcd0" )),/* D18 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (D ,19 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"lcd0" )),/* D19 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (D ,20 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"lcd0" )),/* D20 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (D ,21 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"lcd0" )),/* D21 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (D ,22 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"lcd0" )),/* D22 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (D ,23 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"lcd0" )),/* D23 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (D ,24 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"lcd0" )),/* CLK */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (D ,25 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"lcd0" )),/* DE */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (D ,26 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"lcd0" )),/* HSYNC */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (D ,27 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"lcd0" )),/* VSYNC */ +/* Hole */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (E ,0 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"csi" ),/* PCLK */ +SUNXI_FUNCTION (0x3 ,"ts" ),/* CLK */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,2 ,0 )),/* PE_EINT0 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (E ,1 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"csi" ),/* MCLK */ +SUNXI_FUNCTION (0x3 ,"ts" ),/* ERR */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,2 ,1 )),/* PE_EINT1 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (E ,2 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"csi" ),/* HSYNC */ +SUNXI_FUNCTION (0x3 ,"ts" ),/* SYNC */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,2 ,2 )),/* PE_EINT2 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (E ,3 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"csi" ),/* VSYNC */ +SUNXI_FUNCTION (0x3 ,"ts" ),/* DVLD */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,2 ,3 )),/* PE_EINT3 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (E ,4 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"csi" ),/* D0 */ +SUNXI_FUNCTION (0x3 ,"uart5" ),/* TX */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,2 ,4 )),/* PE_EINT4 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (E ,5 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"csi" ),/* D1 */ +SUNXI_FUNCTION (0x3 ,"uart5" ),/* RX */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,2 ,5 )),/* PE_EINT5 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (E ,6 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"csi" ),/* D2 */ +SUNXI_FUNCTION (0x3 ,"uart5" ),/* RTS */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,2 ,6 )),/* PE_EINT6 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (E ,7 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"csi" ),/* D3 */ +SUNXI_FUNCTION (0x3 ,"uart5" ),/* CTS */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,2 ,7 )),/* PE_EINT7 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (E ,8 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"csi" ),/* D4 */ +SUNXI_FUNCTION (0x3 ,"ts" ),/* D0 */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,2 ,8 )),/* PE_EINT8 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (E ,9 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"csi" ),/* D5 */ +SUNXI_FUNCTION (0x3 ,"ts" ),/* D1 */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,2 ,9 )),/* PE_EINT9 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (E ,10 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"csi" ),/* D6 */ +SUNXI_FUNCTION (0x3 ,"ts" ),/* D2 */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,2 ,10 )),/* PE_EINT10 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (E ,11 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"csi" ),/* D7 */ +SUNXI_FUNCTION (0x3 ,"ts" ),/* D3 */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,2 ,11 )),/* PE_EINT11 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (E ,12 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"csi" ),/* D8 */ +SUNXI_FUNCTION (0x3 ,"ts" ),/* D4 */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,2 ,12 )),/* PE_EINT12 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (E ,13 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"csi" ),/* D9 */ +SUNXI_FUNCTION (0x3 ,"ts" ),/* D5 */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,2 ,13 )),/* PE_EINT13 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (E ,14 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"csi" ),/* D10 */ +SUNXI_FUNCTION (0x3 ,"ts" ),/* D6 */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,2 ,14 )),/* PE_EINT14 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (E ,15 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"csi" ),/* D11 */ +SUNXI_FUNCTION (0x3 ,"ts" ),/* D7 */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,2 ,15 )),/* PE_EINT15 */ +/* Hole */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (F ,0 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"mmc0" ),/* D1 */ +SUNXI_FUNCTION (0x4 ,"jtag" )),/* MS1 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (F ,1 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"mmc0" ),/* D0 */ +SUNXI_FUNCTION (0x4 ,"jtag" )),/* DI1 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (F ,2 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"mmc0" ),/* CLK */ +SUNXI_FUNCTION (0x4 ,"uart0" )),/* TX */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (F ,3 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"mmc0" ),/* CMD */ +SUNXI_FUNCTION (0x4 ,"jtag" )),/* DO1 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (F ,4 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"mmc0" ),/* D3 */ +SUNXI_FUNCTION (0x4 ,"uart0" )),/* RX */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (F ,5 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"mmc0" ),/* D2 */ +SUNXI_FUNCTION (0x4 ,"jtag" )),/* CK1 */ +/* Hole */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (G ,0 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"mmc1" ),/* CLK */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,3 ,0 )),/* PG_EINT0 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (G ,1 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"mmc1" ),/* CMD */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,3 ,1 )),/* PG_EINT1 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (G ,2 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"mmc1" ),/* D0 */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,3 ,2 )),/* PG_EINT2 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (G ,3 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"mmc1" ),/* D1 */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,3 ,3 )),/* PG_EINT3 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (G ,4 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"mmc1" ),/* D2 */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,3 ,4 )),/* PG_EINT4 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (G ,5 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"mmc1" ),/* D3 */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,3 ,5 )),/* PG_EINT5 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (G ,6 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"uart2" ),/* TX */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,3 ,6 )),/* PG_EINT6 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (G ,7 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"uart2" ),/* RX */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,3 ,7 )),/* PG_EINT7 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (G ,8 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"uart2" ),/* RTS */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,3 ,8 )),/* PG_EINT8 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (G ,9 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"uart2" ),/* CTS */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,3 ,9 )),/* PG_EINT9 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (G ,10 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"i2c3" ),/* SCK */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,3 ,10 )),/* PG_EINT10 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (G ,11 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"i2c3" ),/* SDA */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,3 ,11 )),/* PG_EINT11 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (G ,12 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"spi1" ),/* CS1 */ +SUNXI_FUNCTION (0x3 ,"i2s1" ),/* MCLK */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,3 ,12 )),/* PG_EINT12 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (G ,13 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"spi1" ),/* CS0 */ +SUNXI_FUNCTION (0x3 ,"i2s1" ),/* BCLK */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,3 ,13 )),/* PG_EINT13 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (G ,14 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"spi1" ),/* CLK */ +SUNXI_FUNCTION (0x3 ,"i2s1" ),/* LRCK */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,3 ,14 )),/* PG_EINT14 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (G ,15 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"spi1" ),/* MOSI */ +SUNXI_FUNCTION (0x3 ,"i2s1" ),/* DIN */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,3 ,15 )),/* PG_EINT15 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (G ,16 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"spi1" ),/* MISO */ +SUNXI_FUNCTION (0x3 ,"i2s1" ),/* DOUT */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,3 ,16 )),/* PG_EINT16 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (G ,17 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"uart4" ),/* TX */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,3 ,17 )),/* PG_EINT17 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (G ,18 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"uart4" ),/* RX */ +SUNXI_FUNCTION_IRQ_BANK (0x6 ,3 ,18 )),/* PG_EINT18 */ +/* Hole, note H starts at pin 9 */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (H ,9 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"spi2" ),/* CS0 */ +SUNXI_FUNCTION (0x3 ,"jtag" ),/* MS0 */ +SUNXI_FUNCTION (0x4 ,"pwm1" )),/* Positive */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (H ,10 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"spi2" ),/* CLK */ +SUNXI_FUNCTION (0x3 ,"jtag" ),/* CK0 */ +SUNXI_FUNCTION (0x4 ,"pwm1" )),/* Negative */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (H ,11 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"spi2" ),/* MOSI */ +SUNXI_FUNCTION (0x3 ,"jtag" ),/* DO0 */ +SUNXI_FUNCTION (0x4 ,"pwm2" )),/* Positive */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (H ,12 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"spi2" ),/* MISO */ +SUNXI_FUNCTION (0x3 ,"jtag" ),/* DI0 */ +SUNXI_FUNCTION (0x4 ,"pwm2" )),/* Negative */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (H ,13 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"pwm0" )), +SUNXI_PIN (SUNXI_PINCTRL_PIN (H ,14 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"i2c0" )),/* SCK */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (H ,15 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"i2c0" )),/* SDA */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (H ,16 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"i2c1" )),/* SCK */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (H ,17 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"i2c1" )),/* SDA */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (H ,18 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"i2c2" )),/* SCK */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (H ,19 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"i2c2" )),/* SDA */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (H ,20 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"uart0" )),/* TX */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (H ,21 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" ), +SUNXI_FUNCTION (0x2 ,"uart0" )),/* RX */ +SUNXI_PIN (SUNXI_PINCTRL_PIN (H ,22 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" )), +SUNXI_PIN (SUNXI_PINCTRL_PIN (H ,23 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" )), +SUNXI_PIN (SUNXI_PINCTRL_PIN (H ,24 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" )), +SUNXI_PIN (SUNXI_PINCTRL_PIN (H ,25 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" )), +SUNXI_PIN (SUNXI_PINCTRL_PIN (H ,26 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" )), +SUNXI_PIN (SUNXI_PINCTRL_PIN (H ,27 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" )), +SUNXI_PIN (SUNXI_PINCTRL_PIN (H ,28 ), +SUNXI_FUNCTION (0x0 ,"gpio_in" ), +SUNXI_FUNCTION (0x1 ,"gpio_out" )), +}; + +static const struct sunxi_pinctrl_desc sun6i_a31s_pinctrl_data = { + .pins = sun6i_a31s_pins, + .npins =ARRAY_SIZE (sun6i_a31s_pins), + .irq_banks =4 , +}; + +static int sun6i_a31s_pinctrl_probe (struct platform_device *pdev) +{ +return sunxi_pinctrl_init (pdev, + &sun6i_a31s_pinctrl_data); +} + +static struct of_device_id sun6i_a31s_pinctrl_match[] = { + { .compatible ="allwinner,sun6i-a31s-pinctrl" , }, + {} +}; +MODULE_DEVICE_TABLE (of, sun6i_a31s_pinctrl_match); + +static struct platform_driver sun6i_a31s_pinctrl_driver = { + .probe = sun6i_a31s_pinctrl_probe, + .driver = { + .name ="sun6i-a31s-pinctrl" , + .owner =THIS_MODULE , + .of_match_table = sun6i_a31s_pinctrl_match,
Quoted 8 lines
drivers/pinctrl/sunxi/pinctrl-sun6i-a31s.c line 813
Quoted 6 lines
drivers/pinctrl/sunxi/pinctrl-sun6i-a31s.c new file +6
-0+ }, +}; +module_platform_driver (sun6i_a31s_pinctrl_driver); + +MODULE_AUTHOR ("Maxime Ripard <[email protected]" ); +MODULE_DESCRIPTION ("Allwinner A31 pinctrl driver" );s/A31/A31s/
Will fix.
Quoted 2 lines
It looks fine otherwise. Once these very minor issues fixed, you can add my Acked-by.
Ok, let me know what you want to do about the copyright header and I'll fix the other 2 issues.
Regards,
Hans
PATCH 2/5 pinctrl: sun6i: Add A31s pinctrl support
Quoted 80 lines · Hans de Goede
Hi,
Quoted 60 lines · Maxime Ripard
Quoted 59 lines · Hans de Goede
The A31s is a stripped down version of the A31, as such it is missing some pins and some functions on some pins.
The new
pinctrl-sun6i-a31s.cthis commit adds is a copy ofpinctrl-sun6i-a31s.cwith the missing pins and functions removed.Note there is no a31s specific version of
pinctrl-sun6i-a31-r.c, as the prcm pins are identical between the A31 and the A31s.Signed-off-by Hans de Goede <[email protected]>--- .../bindings/pinctrl/allwinner,sunxi-pinctrl.txt | 1 + drivers/pinctrl/sunxi/Kconfig | 4 + drivers/pinctrl/sunxi/Makefile | 1 + drivers/pinctrl/sunxi/pinctrl-sun6i-a31s.c | 814 +++++++++++++++++++++ 4 files changed, 820 insertions(+) create mode 100644 drivers/pinctrl/sunxi/pinctrl-sun6i-a31s.cDocumentation/devicetree/bindings/pinctrl/allwinner,sunxi-pinctrl.txt +1
-0@@ -11,6 +11,7 @@ Required properties: "allwinner,sun5i-a10s-pinctrl" "allwinner,sun5i-a13-pinctrl" "allwinner,sun6i-a31-pinctrl" + "allwinner,sun6i-a31s-pinctrl" "allwinner,sun6i-a31-r-pinctrl" "allwinner,sun7i-a20-pinctrl" "allwinner,sun8i-a23-pinctrl"drivers/pinctrl/sunxi/Kconfig +4
-0@@ -21,6 +21,10 @@ config PINCTRL_SUN6I_A31 def_bool MACH_SUN6I select PINCTRL_SUNXI_COMMON +config PINCTRL_SUN6I_A31S + def_bool MACH_SUN6I + select PINCTRL_SUNXI_COMMON + config PINCTRL_SUN6I_A31_R def_bool MACH_SUN6I depends on RESET_CONTROLLERdrivers/pinctrl/sunxi/Makefile +1
-0@@ -6,6 +6,7 @@ obj-$(CONFIG_PINCTRL_SUN4I_A10) += pinctrl-sun4i-a10.o obj-$(CONFIG_PINCTRL_SUN5I_A10S) += pinctrl-sun5i-a10s.o obj-$(CONFIG_PINCTRL_SUN5I_A13) += pinctrl-sun5i-a13.o obj-$(CONFIG_PINCTRL_SUN6I_A31) += pinctrl-sun6i-a31.o +obj-$(CONFIG_PINCTRL_SUN6I_A31S) += pinctrl-sun6i-a31s.o obj-$(CONFIG_PINCTRL_SUN6I_A31_R) += pinctrl-sun6i-a31-r.o obj-$(CONFIG_PINCTRL_SUN7I_A20) += pinctrl-sun7i-a20.o obj-$(CONFIG_PINCTRL_SUN8I_A23) += pinctrl-sun8i-a23.odrivers/pinctrl/sunxi/pinctrl-sun6i-a31s.c new file +0
-0Quoted 9 lines
drivers/pinctrl/sunxi/pinctrl-sun6i-a31s.c line 2
Quoted 6 lines
index 0000000..42ee373
drivers/pinctrl/sunxi/pinctrl-sun6i-a31s.c new file +2
-0@@ -0,0 +1,814 @@ +/* +* Allwinner A31 SoCs pinctrl driver. ^ A31sGood one.
Quoted 5 lines
Quoted 4 lines
drivers/pinctrl/sunxi/pinctrl-sun6i-a31s.c new file +4
-0+* +* Copyright (C) 2014 Maxime Ripard +* +* Maxime Ripard <[email protected]>
Quoted 4 lines
Quoted 1 line
And I guess your copyright would be more appropriate here.
It is a copy of a file you authored, with some lines removed, so I deliberately left this as is.
I'd feel more confortable with at least listing you as the author and copyright owner, you did more work than I on this one, but it's your call.
Maxime
Signature · 10 lines
Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20141126/5b8e3369/attachment.sig>
PATCH 3/5 ARM: sunxi: Add "allwinner,sun6i-a31s" to mach-sunxi
In reply to Hans de GoedeSo fat the A31s is 100% compatible with the A31, still lets do the same as what we've done for the A13 / A10s and give it its own compatible string, in case need to differentiate later.
--- arch/arm/mach-sunxi/platsmp.c | 3 ++- arch/arm/mach-sunxi/sunxi.c | 1 + drivers/clk/sunxi/clk-sunxi.c | 1 + 3 files changed, 4 insertions(+), 1 deletion(-)
arch/arm/mach-sunxi/platsmp.c +2 -1
@@ -120,4 +120,5 @@ struct smp_operations sun6i_smp_ops __initdata = { .smp_prepare_cpus = sun6i_smp_prepare_cpus, .smp_boot_secondary = sun6i_smp_boot_secondary, }; -CPU_METHOD_OF_DECLARE (sun6i_smp,"allwinner,sun6i-a31" , &sun6i_smp_ops); +CPU_METHOD_OF_DECLARE (sun6i_a31_smp,"allwinner,sun6i-a31" , &sun6i_smp_ops); +CPU_METHOD_OF_DECLARE (sun6i_a31s_smp,"allwinner,sun6i-a31s" , &sun6i_smp_ops);
arch/arm/mach-sunxi/sunxi.c +1 -0
@@ -29,6 +29,7 @@ MACHINE_ENDstatic const char *const sun6i_board_dt_compat[] = {"allwinner,sun6i-a31" , +"allwinner,sun6i-a31s" ,NULL , };
drivers/clk/sunxi/clk-sunxi.c +1 -0
@@ -1200,4 +1200,5 @@ static void __init sun6i_init_clocks(struct device_node *node) ARRAY_SIZE(sun6i_critical_clocks)); }CLK_OF_DECLARE (sun6i_a31_clk_init,"allwinner,sun6i-a31" , sun6i_init_clocks); +CLK_OF_DECLARE (sun6i_a31s_clk_init,"allwinner,sun6i-a31s" , sun6i_init_clocks);CLK_OF_DECLARE (sun8i_a23_clk_init,"allwinner,sun8i-a23" , sun6i_init_clocks);
Signature · 1 line
2.1.0
PATCH 3/5 ARM: sunxi: Add "allwinner,sun6i-a31s" to mach-sunxi
Quoted 5 lines · Hans de Goede
So fat the A31s is 100% compatible with the A31, still lets do the same as what we've done for the A13 / A10s and give it its own compatible string, in case need to differentiate later.
Signed-off-by Hans de Goede <[email protected]>
Thanks a lot for this. It's been a long awaited addition.
I don't have any comment on this patch, except that you should also update Documentation/arm/sunxi/README to reflect this newly supported SoC.
That can go through another patch though.
Thanks!
Maxime
Signature · 10 lines
Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20141125/de81b3c5/attachment.sig>
PATCH 4/5 ARM: dts: sun6i: Add sun6i-a31s.dtsi
In reply to Hans de GoedeAdd a dtsi file for A31s based boards. This is a copy of sun6i-a31.dtsi, with:
-The main pinctrl compatible changed to allwinner,sun6i-a31s.dtsi -The ohci2 controller is present according to the data-sheet, but not routed
to the outside, so remove it from the dtsi as having an always disabled node is not useful.
All the other nodes present in the original sun6i-a31.dtsi are present in the A31s too, and are 100% compatible.
--- arch/arm/boot/dts/sun6i-a31s.dtsi | 925 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 925 insertions(+) create mode 100644 arch/arm/boot/dts/sun6i-a31s.dtsi
arch/arm/boot/dts/sun6i-a31s.dtsi new file +925 -0
@@ -0,0 +1,925 @@ +/* + * Copyright 2013 Maxime Ripard + * + * Maxime Ripard <[email protected]> + * + * This file is dual-licensed: you can use it either under the terms + * of the GPL or the X11 license, at your option. Note that this dual + * licensing only applies to this file, and not this project as a + * whole. + * + * a) This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this library; if not, write to the Free + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + * MA 02110-1301 USA + * + * Or, alternatively, + * + * b) Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ + +/include/ "skeleton.dtsi" + +/ { + interrupt-parent = <&gic>; + + aliases { + serial0 = &uart0; + serial1 = &uart1; + serial2 = &uart2; + serial3 = &uart3; + serial4 = &uart4; + serial5 = &uart5; + ethernet0 = &gmac; + }; + + chosen { + #address-cells = <1>; + #size-cells = <1>; + ranges; + + framebuffer at 0 { + compatible = "allwinner,simple-framebuffer", "simple-framebuffer"; + allwinner,pipeline = "de_be0-lcd0-hdmi"; + clocks = <&pll6>; + status = "disabled"; + }; + }; + + cpus { + enable-method = "allwinner,sun6i-a31"; + #address-cells = <1>; + #size-cells = <0>; + + cpu at 0 { + compatible = "arm,cortex-a7"; + device_type = "cpu"; + reg = <0>; + }; + + cpu at 1 { + compatible = "arm,cortex-a7"; + device_type = "cpu"; + reg = <1>; + }; + + cpu at 2 { + compatible = "arm,cortex-a7"; + device_type = "cpu"; + reg = <2>; + }; + + cpu at 3 { + compatible = "arm,cortex-a7"; + device_type = "cpu"; + reg = <3>; + }; + }; + + memory { + reg = <0x40000000 0x80000000>; + }; + + pmu { + compatible = "arm,cortex-a7-pmu", "arm,cortex-a15-pmu"; + interrupts = <0 120 4>, + <0 121 4>, + <0 122 4>, + <0 123 4>; + }; + + clocks { + #address-cells = <1>; + #size-cells = <1>; + ranges; + + osc24M: osc24M { + #clock-cells = <0>; + compatible = "fixed-clock"; + clock-frequency = <24000000>; + }; + + osc32k: clk at 0 { + #clock-cells = <0>; + compatible = "fixed-clock"; + clock-frequency = <32768>; + clock-output-names = "osc32k"; + }; + + pll1: clk at 01c20000 { + #clock-cells = <0>; + compatible = "allwinner,sun6i-a31-pll1-clk"; + reg = <0x01c20000 0x4>; + clocks = <&osc24M>; + clock-output-names = "pll1"; + }; + + pll6: clk at 01c20028 { + #clock-cells = <0>; + compatible = "allwinner,sun6i-a31-pll6-clk"; + reg = <0x01c20028 0x4>; + clocks = <&osc24M>; + clock-output-names = "pll6"; + }; + + cpu: cpu at 01c20050 { + #clock-cells = <0>; + compatible = "allwinner,sun4i-a10-cpu-clk"; + reg = <0x01c20050 0x4>; + + /* + * PLL1 is listed twice here. + * While it looks suspicious, it's actually documented + * that way both in the datasheet and in the code from + * Allwinner. + */ + clocks = <&osc32k>, <&osc24M>, <&pll1>, <&pll1>; + clock-output-names = "cpu"; + }; + + axi: axi at 01c20050 { + #clock-cells = <0>; + compatible = "allwinner,sun4i-a10-axi-clk"; + reg = <0x01c20050 0x4>; + clocks = <&cpu>; + clock-output-names = "axi"; + }; + + ahb1_mux: ahb1_mux at 01c20054 { + #clock-cells = <0>; + compatible = "allwinner,sun6i-a31-ahb1-mux-clk"; + reg = <0x01c20054 0x4>; + clocks = <&osc32k>, <&osc24M>, <&axi>, <&pll6>; + clock-output-names = "ahb1_mux"; + }; + + ahb1: ahb1 at 01c20054 { + #clock-cells = <0>; + compatible = "allwinner,sun4i-a10-ahb-clk"; + reg = <0x01c20054 0x4>; + clocks = <&ahb1_mux>; + clock-output-names = "ahb1"; + }; + + ahb1_gates: clk at 01c20060 { + #clock-cells = <1>; + compatible = "allwinner,sun6i-a31-ahb1-gates-clk"; + reg = <0x01c20060 0x8>; + clocks = <&ahb1>; + clock-output-names = "ahb1_mipidsi", "ahb1_ss", + "ahb1_dma", "ahb1_mmc0", "ahb1_mmc1", + "ahb1_mmc2", "ahb1_mmc3", "ahb1_nand1", + "ahb1_nand0", "ahb1_sdram", + "ahb1_gmac", "ahb1_ts", "ahb1_hstimer", + "ahb1_spi0", "ahb1_spi1", "ahb1_spi2", + "ahb1_spi3", "ahb1_otg", "ahb1_ehci0", + "ahb1_ehci1", "ahb1_ohci0", + "ahb1_ohci1", "ahb1_ohci2", "ahb1_ve", + "ahb1_lcd0", "ahb1_lcd1", "ahb1_csi", + "ahb1_hdmi", "ahb1_de0", "ahb1_de1", + "ahb1_fe0", "ahb1_fe1", "ahb1_mp", + "ahb1_gpu", "ahb1_deu0", "ahb1_deu1", + "ahb1_drc0", "ahb1_drc1"; + }; + + apb1: apb1 at 01c20054 { + #clock-cells = <0>; + compatible = "allwinner,sun4i-a10-apb0-clk"; + reg = <0x01c20054 0x4>; + clocks = <&ahb1>; + clock-output-names = "apb1"; + }; + + apb1_gates: clk at 01c20068 { + #clock-cells = <1>; + compatible = "allwinner,sun6i-a31-apb1-gates-clk"; + reg = <0x01c20068 0x4>; + clocks = <&apb1>; + clock-output-names = "apb1_codec", "apb1_digital_mic", + "apb1_pio", "apb1_daudio0", + "apb1_daudio1"; + }; + + apb2_mux: apb2_mux at 01c20058 { + #clock-cells = <0>; + compatible = "allwinner,sun4i-a10-apb1-mux-clk"; + reg = <0x01c20058 0x4>; + clocks = <&osc32k>, <&osc24M>, <&pll6>, <&pll6>; + clock-output-names = "apb2_mux"; + }; + + apb2: apb2 at 01c20058 { + #clock-cells = <0>; + compatible = "allwinner,sun6i-a31-apb2-div-clk"; + reg = <0x01c20058 0x4>; + clocks = <&apb2_mux>; + clock-output-names = "apb2"; + }; + + apb2_gates: clk at 01c2006c { + #clock-cells = <1>; + compatible = "allwinner,sun6i-a31-apb2-gates-clk"; + reg = <0x01c2006c 0x4>; + clocks = <&apb2>; + clock-output-names = "apb2_i2c0", "apb2_i2c1", + "apb2_i2c2", "apb2_i2c3", "apb2_uart0", + "apb2_uart1", "apb2_uart2", "apb2_uart3", + "apb2_uart4", "apb2_uart5"; + }; + + mmc0_clk: clk at 01c20088 { + #clock-cells = <0>; + compatible = "allwinner,sun4i-a10-mod0-clk"; + reg = <0x01c20088 0x4>; + clocks = <&osc24M>, <&pll6>; + clock-output-names = "mmc0"; + }; + + mmc1_clk: clk at 01c2008c { + #clock-cells = <0>; + compatible = "allwinner,sun4i-a10-mod0-clk"; + reg = <0x01c2008c 0x4>; + clocks = <&osc24M>, <&pll6>; + clock-output-names = "mmc1"; + }; + + mmc2_clk: clk at 01c20090 { + #clock-cells = <0>; + compatible = "allwinner,sun4i-a10-mod0-clk"; + reg = <0x01c20090 0x4>; + clocks = <&osc24M>, <&pll6>; + clock-output-names = "mmc2"; + }; + + mmc3_clk: clk at 01c20094 { + #clock-cells = <0>; + compatible = "allwinner,sun4i-a10-mod0-clk"; + reg = <0x01c20094 0x4>; + clocks = <&osc24M>, <&pll6>; + clock-output-names = "mmc3"; + }; + + spi0_clk: clk at 01c200a0 { + #clock-cells = <0>; + compatible = "allwinner,sun4i-a10-mod0-clk"; + reg = <0x01c200a0 0x4>; + clocks = <&osc24M>, <&pll6>; + clock-output-names = "spi0"; + }; + + spi1_clk: clk at 01c200a4 { + #clock-cells = <0>; + compatible = "allwinner,sun4i-a10-mod0-clk"; + reg = <0x01c200a4 0x4>; + clocks = <&osc24M>, <&pll6>; + clock-output-names = "spi1"; + }; + + spi2_clk: clk at 01c200a8 { + #clock-cells = <0>; + compatible = "allwinner,sun4i-a10-mod0-clk"; + reg = <0x01c200a8 0x4>; + clocks = <&osc24M>, <&pll6>; + clock-output-names = "spi2"; + }; + + spi3_clk: clk at 01c200ac { + #clock-cells = <0>; + compatible = "allwinner,sun4i-a10-mod0-clk"; + reg = <0x01c200ac 0x4>; + clocks = <&osc24M>, <&pll6>; + clock-output-names = "spi3"; + }; + + usb_clk: clk at 01c200cc { + #clock-cells = <1>; + #reset-cells = <1>; + compatible = "allwinner,sun6i-a31-usb-clk"; + reg = <0x01c200cc 0x4>; + clocks = <&osc24M>; + clock-output-names = "usb_phy0", "usb_phy1", "usb_phy2", + "usb_ohci0", "usb_ohci1", + "usb_ohci2"; + }; + + /* + * The following two are dummy clocks, placeholders used in the gmac_tx + * clock. The gmac driver will choose one parent depending on the PHY + * interface mode, using clk_set_rate auto-reparenting. + * The actual TX clock rate is not controlled by the gmac_tx clock. + */ + mii_phy_tx_clk: clk at 1 { + #clock-cells = <0>; + compatible = "fixed-clock"; + clock-frequency = <25000000>; + clock-output-names = "mii_phy_tx"; + }; + + gmac_int_tx_clk: clk at 2 { + #clock-cells = <0>; + compatible = "fixed-clock"; + clock-frequency = <125000000>; + clock-output-names = "gmac_int_tx"; + }; + + gmac_tx_clk: clk at 01c200d0 { + #clock-cells = <0>; + compatible = "allwinner,sun7i-a20-gmac-clk"; + reg = <0x01c200d0 0x4>; + clocks = <&mii_phy_tx_clk>, <&gmac_int_tx_clk>; + clock-output-names = "gmac_tx"; + }; + }; + + soc at 01c00000 { + compatible = "simple-bus"; + #address-cells = <1>; + #size-cells = <1>; + ranges; + + dma: dma-controller at 01c02000 { + compatible = "allwinner,sun6i-a31-dma"; + reg = <0x01c02000 0x1000>; + interrupts = <0 50 4>; + clocks = <&ahb1_gates 6>; + resets = <&ahb1_rst 6>; + #dma-cells = <1>; + }; + + mmc0: mmc at 01c0f000 { + compatible = "allwinner,sun5i-a13-mmc"; + reg = <0x01c0f000 0x1000>; + clocks = <&ahb1_gates 8>, <&mmc0_clk>; + clock-names = "ahb", "mmc"; + resets = <&ahb1_rst 8>; + reset-names = "ahb"; + interrupts = <0 60 4>; + status = "disabled"; + }; + + mmc1: mmc at 01c10000 { + compatible = "allwinner,sun5i-a13-mmc"; + reg = <0x01c10000 0x1000>; + clocks = <&ahb1_gates 9>, <&mmc1_clk>; + clock-names = "ahb", "mmc"; + resets = <&ahb1_rst 9>; + reset-names = "ahb"; + interrupts = <0 61 4>; + status = "disabled"; + }; + + mmc2: mmc at 01c11000 { + compatible = "allwinner,sun5i-a13-mmc"; + reg = <0x01c11000 0x1000>; + clocks = <&ahb1_gates 10>, <&mmc2_clk>; + clock-names = "ahb", "mmc"; + resets = <&ahb1_rst 10>; + reset-names = "ahb"; + interrupts = <0 62 4>; + status = "disabled"; + }; + + mmc3: mmc at 01c12000 { + compatible = "allwinner,sun5i-a13-mmc"; + reg = <0x01c12000 0x1000>; + clocks = <&ahb1_gates 11>, <&mmc3_clk>; + clock-names = "ahb", "mmc"; + resets = <&ahb1_rst 11>; + reset-names = "ahb"; + interrupts = <0 63 4>; + status = "disabled"; + }; + + usbphy: phy at 01c19400 { + compatible = "allwinner,sun6i-a31-usb-phy"; + reg = <0x01c19400 0x10>, + <0x01c1a800 0x4>, + <0x01c1b800 0x4>; + reg-names = "phy_ctrl", + "pmu1", + "pmu2"; + clocks = <&usb_clk 8>, + <&usb_clk 9>, + <&usb_clk 10>; + clock-names = "usb0_phy", + "usb1_phy", + "usb2_phy"; + resets = <&usb_clk 0>, + <&usb_clk 1>, + <&usb_clk 2>; + reset-names = "usb0_reset", + "usb1_reset", + "usb2_reset"; + status = "disabled"; + #phy-cells = <1>; + }; + + ehci0: usb at 01c1a000 { + compatible = "allwinner,sun6i-a31-ehci", "generic-ehci"; + reg = <0x01c1a000 0x100>; + interrupts = <0 72 4>; + clocks = <&ahb1_gates 26>; + resets = <&ahb1_rst 26>; + phys = <&usbphy 1>; + phy-names = "usb"; + status = "disabled"; + }; + + ohci0: usb at 01c1a400 { + compatible = "allwinner,sun6i-a31-ohci", "generic-ohci"; + reg = <0x01c1a400 0x100>; + interrupts = <0 73 4>; + clocks = <&ahb1_gates 29>, <&usb_clk 16>; + resets = <&ahb1_rst 29>; + phys = <&usbphy 1>; + phy-names = "usb"; + status = "disabled"; + }; + + ehci1: usb at 01c1b000 { + compatible = "allwinner,sun6i-a31-ehci", "generic-ehci"; + reg = <0x01c1b000 0x100>; + interrupts = <0 74 4>; + clocks = <&ahb1_gates 27>; + resets = <&ahb1_rst 27>; + phys = <&usbphy 2>; + phy-names = "usb"; + status = "disabled"; + }; + + ohci1: usb at 01c1b400 { + compatible = "allwinner,sun6i-a31-ohci", "generic-ohci"; + reg = <0x01c1b400 0x100>; + interrupts = <0 75 4>; + clocks = <&ahb1_gates 30>, <&usb_clk 17>; + resets = <&ahb1_rst 30>; + phys = <&usbphy 2>; + phy-names = "usb"; + status = "disabled"; + }; + + pio: pinctrl at 01c20800 { + compatible = "allwinner,sun6i-a31s-pinctrl"; + reg = <0x01c20800 0x400>; + interrupts = <0 11 4>, + <0 15 4>, + <0 16 4>, + <0 17 4>; + clocks = <&apb1_gates 5>; + gpio-controller; + interrupt-controller; + #interrupt-cells = <2>; + #size-cells = <0>; + #gpio-cells = <3>; + + uart0_pins_a: uart0 at 0 { + allwinner,pins = "PH20", "PH21"; + allwinner,function = "uart0"; + allwinner,drive = <0>; + allwinner,pull = <0>; + }; + + i2c0_pins_a: i2c0 at 0 { + allwinner,pins = "PH14", "PH15"; + allwinner,function = "i2c0"; + allwinner,drive = <0>; + allwinner,pull = <0>; + }; + + i2c1_pins_a: i2c1 at 0 { + allwinner,pins = "PH16", "PH17"; + allwinner,function = "i2c1"; + allwinner,drive = <0>; + allwinner,pull = <0>; + }; + + i2c2_pins_a: i2c2 at 0 { + allwinner,pins = "PH18", "PH19"; + allwinner,function = "i2c2"; + allwinner,drive = <0>; + allwinner,pull = <0>; + }; + + mmc0_pins_a: mmc0 at 0 { + allwinner,pins = "PF0","PF1","PF2","PF3","PF4","PF5"; + allwinner,function = "mmc0"; + allwinner,drive = <2>; + allwinner,pull = <0>; + }; + + gmac_pins_mii_a: gmac_mii at 0 { + allwinner,pins = "PA0", "PA1", "PA2", "PA3", + "PA8", "PA9", "PA11", + "PA12", "PA13", "PA14", "PA19", + "PA20", "PA21", "PA22", "PA23", + "PA24", "PA26", "PA27"; + allwinner,function = "gmac"; + allwinner,drive = <0>; + allwinner,pull = <0>; + }; + + gmac_pins_gmii_a: gmac_gmii at 0 { + allwinner,pins = "PA0", "PA1", "PA2", "PA3", + "PA4", "PA5", "PA6", "PA7", + "PA8", "PA9", "PA10", "PA11", + "PA12", "PA13", "PA14", "PA15", + "PA16", "PA17", "PA18", "PA19", + "PA20", "PA21", "PA22", "PA23", + "PA24", "PA25", "PA26", "PA27"; + allwinner,function = "gmac"; + /* + * data lines in GMII mode run at 125MHz and + * might need a higher signal drive strength + */ + allwinner,drive = <2>; + allwinner,pull = <0>; + }; + + gmac_pins_rgmii_a: gmac_rgmii at 0 { + allwinner,pins = "PA0", "PA1", "PA2", "PA3", + "PA9", "PA10", "PA11", + "PA12", "PA13", "PA14", "PA19", + "PA20", "PA25", "PA26", "PA27"; + allwinner,function = "gmac"; + /* + * data lines in RGMII mode use DDR mode + * and need a higher signal drive strength + */ + allwinner,drive = <3>; + allwinner,pull = <0>; + }; + }; + + ahb1_rst: reset at 01c202c0 { + #reset-cells = <1>; + compatible = "allwinner,sun6i-a31-ahb1-reset"; + reg = <0x01c202c0 0xc>; + }; + + apb1_rst: reset at 01c202d0 { + #reset-cells = <1>; + compatible = "allwinner,sun6i-a31-clock-reset"; + reg = <0x01c202d0 0x4>; + }; + + apb2_rst: reset at 01c202d8 { + #reset-cells = <1>; + compatible = "allwinner,sun6i-a31-clock-reset"; + reg = <0x01c202d8 0x4>; + }; + + timer at 01c20c00 { + compatible = "allwinner,sun4i-a10-timer"; + reg = <0x01c20c00 0xa0>; + interrupts = <0 18 4>, + <0 19 4>, + <0 20 4>, + <0 21 4>, + <0 22 4>; + clocks = <&osc24M>; + }; + + wdt1: watchdog at 01c20ca0 { + compatible = "allwinner,sun6i-a31-wdt"; + reg = <0x01c20ca0 0x20>; + }; + + uart0: serial at 01c28000 { + compatible = "snps,dw-apb-uart"; + reg = <0x01c28000 0x400>; + interrupts = <0 0 4>; + reg-shift = <2>; + reg-io-width = <4>; + clocks = <&apb2_gates 16>; + resets = <&apb2_rst 16>; + dmas = <&dma 6>, <&dma 6>; + dma-names = "rx", "tx"; + status = "disabled"; + }; + + uart1: serial at 01c28400 { + compatible = "snps,dw-apb-uart"; + reg = <0x01c28400 0x400>; + interrupts = <0 1 4>; + reg-shift = <2>; + reg-io-width = <4>; + clocks = <&apb2_gates 17>; + resets = <&apb2_rst 17>; + dmas = <&dma 7>, <&dma 7>; + dma-names = "rx", "tx"; + status = "disabled"; + }; + + uart2: serial at 01c28800 { + compatible = "snps,dw-apb-uart"; + reg = <0x01c28800 0x400>; + interrupts = <0 2 4>; + reg-shift = <2>; + reg-io-width = <4>; + clocks = <&apb2_gates 18>; + resets = <&apb2_rst 18>; + dmas = <&dma 8>, <&dma 8>; + dma-names = "rx", "tx"; + status = "disabled"; + }; + + uart3: serial at 01c28c00 { + compatible = "snps,dw-apb-uart"; + reg = <0x01c28c00 0x400>; + interrupts = <0 3 4>; + reg-shift = <2>; + reg-io-width = <4>; + clocks = <&apb2_gates 19>; + resets = <&apb2_rst 19>; + dmas = <&dma 9>, <&dma 9>; + dma-names = "rx", "tx"; + status = "disabled"; + }; + + uart4: serial at 01c29000 { + compatible = "snps,dw-apb-uart"; + reg = <0x01c29000 0x400>; + interrupts = <0 4 4>; + reg-shift = <2>; + reg-io-width = <4>; + clocks = <&apb2_gates 20>; + resets = <&apb2_rst 20>; + dmas = <&dma 10>, <&dma 10>; + dma-names = "rx", "tx"; + status = "disabled"; + }; + + uart5: serial at 01c29400 { + compatible = "snps,dw-apb-uart"; + reg = <0x01c29400 0x400>; + interrupts = <0 5 4>; + reg-shift = <2>; + reg-io-width = <4>; + clocks = <&apb2_gates 21>; + resets = <&apb2_rst 21>; + dmas = <&dma 22>, <&dma 22>; + dma-names = "rx", "tx"; + status = "disabled"; + }; + + i2c0: i2c at 01c2ac00 { + compatible = "allwinner,sun6i-a31-i2c"; + reg = <0x01c2ac00 0x400>; + interrupts = <0 6 4>; + clocks = <&apb2_gates 0>; + resets = <&apb2_rst 0>; + status = "disabled"; + #address-cells = <1>; + #size-cells = <0>; + }; + + i2c1: i2c at 01c2b000 { + compatible = "allwinner,sun6i-a31-i2c"; + reg = <0x01c2b000 0x400>; + interrupts = <0 7 4>; + clocks = <&apb2_gates 1>; + resets = <&apb2_rst 1>; + status = "disabled"; + #address-cells = <1>; + #size-cells = <0>; + }; + + i2c2: i2c at 01c2b400 { + compatible = "allwinner,sun6i-a31-i2c"; + reg = <0x01c2b400 0x400>; + interrupts = <0 8 4>; + clocks = <&apb2_gates 2>; + resets = <&apb2_rst 2>; + status = "disabled"; + #address-cells = <1>; + #size-cells = <0>; + }; + + i2c3: i2c at 01c2b800 { + compatible = "allwinner,sun6i-a31-i2c"; + reg = <0x01c2b800 0x400>; + interrupts = <0 9 4>; + clocks = <&apb2_gates 3>; + resets = <&apb2_rst 3>; + status = "disabled"; + #address-cells = <1>; + #size-cells = <0>; + }; + + gmac: ethernet at 01c30000 { + compatible = "allwinner,sun7i-a20-gmac"; + reg = <0x01c30000 0x1054>; + interrupts = <0 82 4>; + interrupt-names = "macirq"; + clocks = <&ahb1_gates 17>, <&gmac_tx_clk>; + clock-names = "stmmaceth", "allwinner_gmac_tx"; + resets = <&ahb1_rst 17>; + reset-names = "stmmaceth"; + snps,pbl = <2>; + snps,fixed-burst; + snps,force_sf_dma_mode; + status = "disabled"; + #address-cells = <1>; + #size-cells = <0>; + }; + + timer at 01c60000 { + compatible = "allwinner,sun6i-a31-hstimer", "allwinner,sun7i-a20-hstimer"; + reg = <0x01c60000 0x1000>; + interrupts = <0 51 4>, + <0 52 4>, + <0 53 4>, + <0 54 4>; + clocks = <&ahb1_gates 19>; + resets = <&ahb1_rst 19>; + }; + + spi0: spi at 01c68000 { + compatible = "allwinner,sun6i-a31-spi"; + reg = <0x01c68000 0x1000>; + interrupts = <0 65 4>; + clocks = <&ahb1_gates 20>, <&spi0_clk>; + clock-names = "ahb", "mod"; + dmas = <&dma 23>, <&dma 23>; + dma-names = "rx", "tx"; + resets = <&ahb1_rst 20>; + status = "disabled"; + }; + + spi1: spi at 01c69000 { + compatible = "allwinner,sun6i-a31-spi"; + reg = <0x01c69000 0x1000>; + interrupts = <0 66 4>; + clocks = <&ahb1_gates 21>, <&spi1_clk>; + clock-names = "ahb", "mod"; + dmas = <&dma 24>, <&dma 24>; + dma-names = "rx", "tx"; + resets = <&ahb1_rst 21>; + status = "disabled"; + }; + + spi2: spi at 01c6a000 { + compatible = "allwinner,sun6i-a31-spi"; + reg = <0x01c6a000 0x1000>; + interrupts = <0 67 4>; + clocks = <&ahb1_gates 22>, <&spi2_clk>; + clock-names = "ahb", "mod"; + dmas = <&dma 25>, <&dma 25>; + dma-names = "rx", "tx"; + resets = <&ahb1_rst 22>; + status = "disabled"; + }; + + spi3: spi at 01c6b000 { + compatible = "allwinner,sun6i-a31-spi"; + reg = <0x01c6b000 0x1000>; + interrupts = <0 68 4>; + clocks = <&ahb1_gates 23>, <&spi3_clk>; + clock-names = "ahb", "mod"; + dmas = <&dma 26>, <&dma 26>; + dma-names = "rx", "tx"; + resets = <&ahb1_rst 23>; + status = "disabled"; + }; + + gic: interrupt-controller at 01c81000 { + compatible = "arm,cortex-a7-gic", "arm,cortex-a15-gic"; + reg = <0x01c81000 0x1000>, + <0x01c82000 0x1000>, + <0x01c84000 0x2000>, + <0x01c86000 0x2000>; + interrupt-controller; + #interrupt-cells = <3>; + interrupts = <1 9 0xf04>; + }; + + rtc: rtc at 01f00000 { + compatible = "allwinner,sun6i-a31-rtc"; + reg = <0x01f00000 0x54>; + interrupts = <0 40 4>, <0 41 4>; + }; + + nmi_intc: interrupt-controller at 01f00c0c { + compatible = "allwinner,sun6i-a31-sc-nmi"; + interrupt-controller; + #interrupt-cells = <2>; + reg = <0x01f00c0c 0x38>; + interrupts = <0 32 4>; + }; + + prcm at 01f01400 { + compatible = "allwinner,sun6i-a31-prcm"; + reg = <0x01f01400 0x200>; + + ar100: ar100_clk { + compatible = "allwinner,sun6i-a31-ar100-clk"; + #clock-cells = <0>; + clocks = <&osc32k>, <&osc24M>, <&pll6>, <&pll6>; + clock-output-names = "ar100"; + }; + + ahb0: ahb0_clk { + compatible = "fixed-factor-clock"; + #clock-cells = <0>; + clock-div = <1>; + clock-mult = <1>; + clocks = <&ar100>; + clock-output-names = "ahb0"; + }; + + apb0: apb0_clk { + compatible = "allwinner,sun6i-a31-apb0-clk"; + #clock-cells = <0>; + clocks = <&ahb0>; + clock-output-names = "apb0"; + }; + + apb0_gates: apb0_gates_clk { + compatible = "allwinner,sun6i-a31-apb0-gates-clk"; + #clock-cells = <1>; + clocks = <&apb0>; + clock-output-names = "apb0_pio", "apb0_ir", + "apb0_timer", "apb0_p2wi", + "apb0_uart", "apb0_1wire", + "apb0_i2c"; + }; + + ir_clk: ir_clk { + #clock-cells = <0>; + compatible = "allwinner,sun6i-a31-ir-clk"; + clocks = <&osc32k>, <&osc24M>; + clock-output-names = "ir"; + }; + + apb0_rst: apb0_rst { + compatible = "allwinner,sun6i-a31-clock-reset"; + #reset-cells = <1>; + }; + }; + + cpucfg at 01f01c00 { + compatible = "allwinner,sun6i-a31-cpuconfig"; + reg = <0x01f01c00 0x300>; + }; + + ir at 01f02000 { + compatible = "allwinner,sun5i-a13-ir"; + clocks = <&apb0_gates 1>, <&ir_clk>; + clock-names = "apb", "ir"; + resets = <&apb0_rst 1>; + interrupts = <0 37 4>; + reg = <0x01f02000 0x40>; + status = "disabled"; + }; + + r_pio: pinctrl at 01f02c00 { + compatible = "allwinner,sun6i-a31-r-pinctrl"; + reg = <0x01f02c00 0x400>; + interrupts = <0 45 4>, + <0 46 4>; + clocks = <&apb0_gates 0>; + resets = <&apb0_rst 0>; + gpio-controller; + interrupt-controller; + #interrupt-cells = <2>; + #size-cells = <0>; + #gpio-cells = <3>; + + ir_pins_a: ir at 0 { + allwinner,pins = "PL4"; + allwinner,function = "s_ir"; + allwinner,drive = <0>; + allwinner,pull = <0>; + }; + }; + }; +};
Signature · 1 line
2.1.0
PATCH 4/5 ARM: dts: sun6i: Add sun6i-a31s.dtsi
Hi,
Quoted 9 lines · Hans de Goede
Add a dtsi file for A31s based boards. This is a copy of
sun6i-a31.dtsi, with:(quoted diff) +0
-2-The main pinctrl compatible changed to allwinner,sun6i-a31s.dtsi -The ohci2 controller is present according to the data-sheet, but not routed to the outside, so remove it from the dtsi as having an always disabled node is not useful.All the other nodes present in the original
sun6i-a31.dtsiare present in the A31s too, and are 100% compatible.
Then maybe duplicating the DT isn't worth it then.
Creating a sun6i.dtsi and including that from both the A31 and A31s seems more like an appropriate solution.
Quoted 13 lines
Signed-off-by Hans de Goede <[email protected]>--- arch/arm/boot/dts/sun6i-a31s.dtsi | 925 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 925 insertions(+) create mode 100644 arch/arm/boot/dts/sun6i-a31s.dtsiarch/arm/boot/dts/sun6i-a31s.dtsi new file +0
-0
arch/arm/boot/dts/sun6i-a31s.dtsi line 4
Quoted 4 lines
arch/arm/boot/dts/sun6i-a31s.dtsi new file +4
-0@@ -0,0 +1,925 @@ +/* + * Copyright 2013 Maxime Ripard + * + * Maxime Ripard <[email protected]>
It should be your copyright here.
Quoted 10 lines
arch/arm/boot/dts/sun6i-a31s.dtsi new file +10
-0+ * + * This file is dual-licensed: you can use it either under the terms + * of the GPL or the X11 license, at your option. Note that this dual + * licensing only applies to this file, and not this project as a + * whole. + * + * a) This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version.
arch/arm/boot/dts/sun6i-a31s.dtsi line 24
Quoted 10 lines
arch/arm/boot/dts/sun6i-a31s.dtsi new file +10
-0+ * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this library; if not, write to the Free + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + * MA 02110-1301 USA
There was an issue with the wording of the license, s/library/file/
Quoted 39 lines
arch/arm/boot/dts/sun6i-a31s.dtsi new file +39
-0+ * + * Or, alternatively, + * + * b) Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ + +/include/ "skeleton.dtsi" + +/ { + interrupt-parent = <&gic>; + + aliases { + serial0 = &uart0; + serial1 = &uart1; + serial2 = &uart2; + serial3 = &uart3; + serial4 = &uart4; + serial5 = &uart5; + ethernet0 = &gmac; + };
arch/arm/boot/dts/sun6i-a31s.dtsi line 73
Quoted 10 lines
arch/arm/boot/dts/sun6i-a31s.dtsi new file +10
-0+ + chosen { + #address-cells = <1>; + #size-cells = <1>; + ranges; + + framebuffer at 0 { + compatible = "allwinner,simple-framebuffer", "simple-framebuffer"; + allwinner,pipeline = "de_be0-lcd0-hdmi"; + clocks = <&pll6>;
pll6 uses an argument now
arch/arm/boot/dts/sun6i-a31s.dtsi line 79
Quoted 6 lines
arch/arm/boot/dts/sun6i-a31s.dtsi new file +6
-0+ status = "disabled"; + }; + }; + + cpus { + enable-method = "allwinner,sun6i-a31";
allwinner,sun6i-a31s I guess?
Quoted 123 lines
arch/arm/boot/dts/sun6i-a31s.dtsi new file +123
-0+ #address-cells = <1>; + #size-cells = <0>; + + cpu at 0 { + compatible = "arm,cortex-a7"; + device_type = "cpu"; + reg = <0>; + }; + + cpu at 1 { + compatible = "arm,cortex-a7"; + device_type = "cpu"; + reg = <1>; + }; + + cpu at 2 { + compatible = "arm,cortex-a7"; + device_type = "cpu"; + reg = <2>; + }; + + cpu at 3 { + compatible = "arm,cortex-a7"; + device_type = "cpu"; + reg = <3>; + }; + }; + + memory { + reg = <0x40000000 0x80000000>; + }; + + pmu { + compatible = "arm,cortex-a7-pmu", "arm,cortex-a15-pmu"; + interrupts = <0 120 4>, + <0 121 4>, + <0 122 4>, + <0 123 4>; + }; + + clocks { + #address-cells = <1>; + #size-cells = <1>; + ranges; + + osc24M: osc24M { + #clock-cells = <0>; + compatible = "fixed-clock"; + clock-frequency = <24000000>; + }; + + osc32k: clk at 0 { + #clock-cells = <0>; + compatible = "fixed-clock"; + clock-frequency = <32768>; + clock-output-names = "osc32k"; + }; + + pll1: clk at 01c20000 { + #clock-cells = <0>; + compatible = "allwinner,sun6i-a31-pll1-clk"; + reg = <0x01c20000 0x4>; + clocks = <&osc24M>; + clock-output-names = "pll1"; + }; + + pll6: clk at 01c20028 { + #clock-cells = <0>; + compatible = "allwinner,sun6i-a31-pll6-clk"; + reg = <0x01c20028 0x4>; + clocks = <&osc24M>; + clock-output-names = "pll6"; + }; + + cpu: cpu at 01c20050 { + #clock-cells = <0>; + compatible = "allwinner,sun4i-a10-cpu-clk"; + reg = <0x01c20050 0x4>; + + /* + * PLL1 is listed twice here. + * While it looks suspicious, it's actually documented + * that way both in the datasheet and in the code from + * Allwinner. + */ + clocks = <&osc32k>, <&osc24M>, <&pll1>, <&pll1>; + clock-output-names = "cpu"; + }; + + axi: axi at 01c20050 { + #clock-cells = <0>; + compatible = "allwinner,sun4i-a10-axi-clk"; + reg = <0x01c20050 0x4>; + clocks = <&cpu>; + clock-output-names = "axi"; + }; + + ahb1_mux: ahb1_mux at 01c20054 { + #clock-cells = <0>; + compatible = "allwinner,sun6i-a31-ahb1-mux-clk"; + reg = <0x01c20054 0x4>; + clocks = <&osc32k>, <&osc24M>, <&axi>, <&pll6>; + clock-output-names = "ahb1_mux"; + }; + + ahb1: ahb1 at 01c20054 { + #clock-cells = <0>; + compatible = "allwinner,sun4i-a10-ahb-clk"; + reg = <0x01c20054 0x4>; + clocks = <&ahb1_mux>; + clock-output-names = "ahb1"; + }; + + ahb1_gates: clk at 01c20060 { + #clock-cells = <1>; + compatible = "allwinner,sun6i-a31-ahb1-gates-clk"; + reg = <0x01c20060 0x8>; + clocks = <&ahb1>; + clock-output-names = "ahb1_mipidsi", "ahb1_ss", + "ahb1_dma", "ahb1_mmc0", "ahb1_mmc1", + "ahb1_mmc2", "ahb1_mmc3", "ahb1_nand1", + "ahb1_nand0", "ahb1_sdram", + "ahb1_gmac", "ahb1_ts", "ahb1_hstimer",
arch/arm/boot/dts/sun6i-a31s.dtsi line 212
Quoted 10 lines
arch/arm/boot/dts/sun6i-a31s.dtsi new file +10
-0+ "ahb1_spi0", "ahb1_spi1", "ahb1_spi2", + "ahb1_spi3", "ahb1_otg", "ahb1_ehci0", + "ahb1_ehci1", "ahb1_ohci0", + "ahb1_ohci1", "ahb1_ohci2", "ahb1_ve", + "ahb1_lcd0", "ahb1_lcd1", "ahb1_csi", + "ahb1_hdmi", "ahb1_de0", "ahb1_de1", + "ahb1_fe0", "ahb1_fe1", "ahb1_mp", + "ahb1_gpu", "ahb1_deu0", "ahb1_deu1", + "ahb1_drc0", "ahb1_drc1"; + };
Are the gates really identical?
As in not even stripped down?
Quoted 310 lines
arch/arm/boot/dts/sun6i-a31s.dtsi new file +310
-0+ apb1: apb1 at 01c20054 { + #clock-cells = <0>; + compatible = "allwinner,sun4i-a10-apb0-clk"; + reg = <0x01c20054 0x4>; + clocks = <&ahb1>; + clock-output-names = "apb1"; + }; + + apb1_gates: clk at 01c20068 { + #clock-cells = <1>; + compatible = "allwinner,sun6i-a31-apb1-gates-clk"; + reg = <0x01c20068 0x4>; + clocks = <&apb1>; + clock-output-names = "apb1_codec", "apb1_digital_mic", + "apb1_pio", "apb1_daudio0", + "apb1_daudio1"; + }; + + apb2_mux: apb2_mux at 01c20058 { + #clock-cells = <0>; + compatible = "allwinner,sun4i-a10-apb1-mux-clk"; + reg = <0x01c20058 0x4>; + clocks = <&osc32k>, <&osc24M>, <&pll6>, <&pll6>; + clock-output-names = "apb2_mux"; + }; + + apb2: apb2 at 01c20058 { + #clock-cells = <0>; + compatible = "allwinner,sun6i-a31-apb2-div-clk"; + reg = <0x01c20058 0x4>; + clocks = <&apb2_mux>; + clock-output-names = "apb2"; + }; + + apb2_gates: clk at 01c2006c { + #clock-cells = <1>; + compatible = "allwinner,sun6i-a31-apb2-gates-clk"; + reg = <0x01c2006c 0x4>; + clocks = <&apb2>; + clock-output-names = "apb2_i2c0", "apb2_i2c1", + "apb2_i2c2", "apb2_i2c3", "apb2_uart0", + "apb2_uart1", "apb2_uart2", "apb2_uart3", + "apb2_uart4", "apb2_uart5"; + }; + + mmc0_clk: clk at 01c20088 { + #clock-cells = <0>; + compatible = "allwinner,sun4i-a10-mod0-clk"; + reg = <0x01c20088 0x4>; + clocks = <&osc24M>, <&pll6>; + clock-output-names = "mmc0"; + }; + + mmc1_clk: clk at 01c2008c { + #clock-cells = <0>; + compatible = "allwinner,sun4i-a10-mod0-clk"; + reg = <0x01c2008c 0x4>; + clocks = <&osc24M>, <&pll6>; + clock-output-names = "mmc1"; + }; + + mmc2_clk: clk at 01c20090 { + #clock-cells = <0>; + compatible = "allwinner,sun4i-a10-mod0-clk"; + reg = <0x01c20090 0x4>; + clocks = <&osc24M>, <&pll6>; + clock-output-names = "mmc2"; + }; + + mmc3_clk: clk at 01c20094 { + #clock-cells = <0>; + compatible = "allwinner,sun4i-a10-mod0-clk"; + reg = <0x01c20094 0x4>; + clocks = <&osc24M>, <&pll6>; + clock-output-names = "mmc3"; + }; + + spi0_clk: clk at 01c200a0 { + #clock-cells = <0>; + compatible = "allwinner,sun4i-a10-mod0-clk"; + reg = <0x01c200a0 0x4>; + clocks = <&osc24M>, <&pll6>; + clock-output-names = "spi0"; + }; + + spi1_clk: clk at 01c200a4 { + #clock-cells = <0>; + compatible = "allwinner,sun4i-a10-mod0-clk"; + reg = <0x01c200a4 0x4>; + clocks = <&osc24M>, <&pll6>; + clock-output-names = "spi1"; + }; + + spi2_clk: clk at 01c200a8 { + #clock-cells = <0>; + compatible = "allwinner,sun4i-a10-mod0-clk"; + reg = <0x01c200a8 0x4>; + clocks = <&osc24M>, <&pll6>; + clock-output-names = "spi2"; + }; + + spi3_clk: clk at 01c200ac { + #clock-cells = <0>; + compatible = "allwinner,sun4i-a10-mod0-clk"; + reg = <0x01c200ac 0x4>; + clocks = <&osc24M>, <&pll6>; + clock-output-names = "spi3"; + }; + + usb_clk: clk at 01c200cc { + #clock-cells = <1>; + #reset-cells = <1>; + compatible = "allwinner,sun6i-a31-usb-clk"; + reg = <0x01c200cc 0x4>; + clocks = <&osc24M>; + clock-output-names = "usb_phy0", "usb_phy1", "usb_phy2", + "usb_ohci0", "usb_ohci1", + "usb_ohci2"; + }; + + /* + * The following two are dummy clocks, placeholders used in the gmac_tx + * clock. The gmac driver will choose one parent depending on the PHY + * interface mode, using clk_set_rate auto-reparenting. + * The actual TX clock rate is not controlled by the gmac_tx clock. + */ + mii_phy_tx_clk: clk at 1 { + #clock-cells = <0>; + compatible = "fixed-clock"; + clock-frequency = <25000000>; + clock-output-names = "mii_phy_tx"; + }; + + gmac_int_tx_clk: clk at 2 { + #clock-cells = <0>; + compatible = "fixed-clock"; + clock-frequency = <125000000>; + clock-output-names = "gmac_int_tx"; + }; + + gmac_tx_clk: clk at 01c200d0 { + #clock-cells = <0>; + compatible = "allwinner,sun7i-a20-gmac-clk"; + reg = <0x01c200d0 0x4>; + clocks = <&mii_phy_tx_clk>, <&gmac_int_tx_clk>; + clock-output-names = "gmac_tx"; + }; + }; + + soc at 01c00000 { + compatible = "simple-bus"; + #address-cells = <1>; + #size-cells = <1>; + ranges; + + dma: dma-controller at 01c02000 { + compatible = "allwinner,sun6i-a31-dma"; + reg = <0x01c02000 0x1000>; + interrupts = <0 50 4>; + clocks = <&ahb1_gates 6>; + resets = <&ahb1_rst 6>; + #dma-cells = <1>; + }; + + mmc0: mmc at 01c0f000 { + compatible = "allwinner,sun5i-a13-mmc"; + reg = <0x01c0f000 0x1000>; + clocks = <&ahb1_gates 8>, <&mmc0_clk>; + clock-names = "ahb", "mmc"; + resets = <&ahb1_rst 8>; + reset-names = "ahb"; + interrupts = <0 60 4>; + status = "disabled"; + }; + + mmc1: mmc at 01c10000 { + compatible = "allwinner,sun5i-a13-mmc"; + reg = <0x01c10000 0x1000>; + clocks = <&ahb1_gates 9>, <&mmc1_clk>; + clock-names = "ahb", "mmc"; + resets = <&ahb1_rst 9>; + reset-names = "ahb"; + interrupts = <0 61 4>; + status = "disabled"; + }; + + mmc2: mmc at 01c11000 { + compatible = "allwinner,sun5i-a13-mmc"; + reg = <0x01c11000 0x1000>; + clocks = <&ahb1_gates 10>, <&mmc2_clk>; + clock-names = "ahb", "mmc"; + resets = <&ahb1_rst 10>; + reset-names = "ahb"; + interrupts = <0 62 4>; + status = "disabled"; + }; + + mmc3: mmc at 01c12000 { + compatible = "allwinner,sun5i-a13-mmc"; + reg = <0x01c12000 0x1000>; + clocks = <&ahb1_gates 11>, <&mmc3_clk>; + clock-names = "ahb", "mmc"; + resets = <&ahb1_rst 11>; + reset-names = "ahb"; + interrupts = <0 63 4>; + status = "disabled"; + }; + + usbphy: phy at 01c19400 { + compatible = "allwinner,sun6i-a31-usb-phy"; + reg = <0x01c19400 0x10>, + <0x01c1a800 0x4>, + <0x01c1b800 0x4>; + reg-names = "phy_ctrl", + "pmu1", + "pmu2"; + clocks = <&usb_clk 8>, + <&usb_clk 9>, + <&usb_clk 10>; + clock-names = "usb0_phy", + "usb1_phy", + "usb2_phy"; + resets = <&usb_clk 0>, + <&usb_clk 1>, + <&usb_clk 2>; + reset-names = "usb0_reset", + "usb1_reset", + "usb2_reset"; + status = "disabled"; + #phy-cells = <1>; + }; + + ehci0: usb at 01c1a000 { + compatible = "allwinner,sun6i-a31-ehci", "generic-ehci"; + reg = <0x01c1a000 0x100>; + interrupts = <0 72 4>; + clocks = <&ahb1_gates 26>; + resets = <&ahb1_rst 26>; + phys = <&usbphy 1>; + phy-names = "usb"; + status = "disabled"; + }; + + ohci0: usb at 01c1a400 { + compatible = "allwinner,sun6i-a31-ohci", "generic-ohci"; + reg = <0x01c1a400 0x100>; + interrupts = <0 73 4>; + clocks = <&ahb1_gates 29>, <&usb_clk 16>; + resets = <&ahb1_rst 29>; + phys = <&usbphy 1>; + phy-names = "usb"; + status = "disabled"; + }; + + ehci1: usb at 01c1b000 { + compatible = "allwinner,sun6i-a31-ehci", "generic-ehci"; + reg = <0x01c1b000 0x100>; + interrupts = <0 74 4>; + clocks = <&ahb1_gates 27>; + resets = <&ahb1_rst 27>; + phys = <&usbphy 2>; + phy-names = "usb"; + status = "disabled"; + }; + + ohci1: usb at 01c1b400 { + compatible = "allwinner,sun6i-a31-ohci", "generic-ohci"; + reg = <0x01c1b400 0x100>; + interrupts = <0 75 4>; + clocks = <&ahb1_gates 30>, <&usb_clk 17>; + resets = <&ahb1_rst 30>; + phys = <&usbphy 2>; + phy-names = "usb"; + status = "disabled"; + }; + + pio: pinctrl at 01c20800 { + compatible = "allwinner,sun6i-a31s-pinctrl"; + reg = <0x01c20800 0x400>; + interrupts = <0 11 4>, + <0 15 4>, + <0 16 4>, + <0 17 4>; + clocks = <&apb1_gates 5>; + gpio-controller; + interrupt-controller; + #interrupt-cells = <2>; + #size-cells = <0>; + #gpio-cells = <3>; + + uart0_pins_a: uart0 at 0 { + allwinner,pins = "PH20", "PH21"; + allwinner,function = "uart0"; + allwinner,drive = <0>; + allwinner,pull = <0>; + }; + + i2c0_pins_a: i2c0 at 0 { + allwinner,pins = "PH14", "PH15"; + allwinner,function = "i2c0"; + allwinner,drive = <0>; + allwinner,pull = <0>; + }; + + i2c1_pins_a: i2c1 at 0 { + allwinner,pins = "PH16", "PH17"; + allwinner,function = "i2c1"; + allwinner,drive = <0>; + allwinner,pull = <0>; + };
arch/arm/boot/dts/sun6i-a31s.dtsi line 533
Quoted 10 lines
arch/arm/boot/dts/sun6i-a31s.dtsi new file +10
-0+ + i2c2_pins_a: i2c2 at 0 { + allwinner,pins = "PH18", "PH19"; + allwinner,function = "i2c2"; + allwinner,drive = <0>; + allwinner,pull = <0>; + }; + + mmc0_pins_a: mmc0 at 0 { + allwinner,pins = "PF0","PF1","PF2","PF3","PF4","PF5";
Spaces after the comma, and I guess that would be better on two lines.
Quoted 338 lines
arch/arm/boot/dts/sun6i-a31s.dtsi new file +338
-0+ allwinner,function = "mmc0"; + allwinner,drive = <2>; + allwinner,pull = <0>; + }; + + gmac_pins_mii_a: gmac_mii at 0 { + allwinner,pins = "PA0", "PA1", "PA2", "PA3", + "PA8", "PA9", "PA11", + "PA12", "PA13", "PA14", "PA19", + "PA20", "PA21", "PA22", "PA23", + "PA24", "PA26", "PA27"; + allwinner,function = "gmac"; + allwinner,drive = <0>; + allwinner,pull = <0>; + }; + + gmac_pins_gmii_a: gmac_gmii at 0 { + allwinner,pins = "PA0", "PA1", "PA2", "PA3", + "PA4", "PA5", "PA6", "PA7", + "PA8", "PA9", "PA10", "PA11", + "PA12", "PA13", "PA14", "PA15", + "PA16", "PA17", "PA18", "PA19", + "PA20", "PA21", "PA22", "PA23", + "PA24", "PA25", "PA26", "PA27"; + allwinner,function = "gmac"; + /* + * data lines in GMII mode run at 125MHz and + * might need a higher signal drive strength + */ + allwinner,drive = <2>; + allwinner,pull = <0>; + }; + + gmac_pins_rgmii_a: gmac_rgmii at 0 { + allwinner,pins = "PA0", "PA1", "PA2", "PA3", + "PA9", "PA10", "PA11", + "PA12", "PA13", "PA14", "PA19", + "PA20", "PA25", "PA26", "PA27"; + allwinner,function = "gmac"; + /* + * data lines in RGMII mode use DDR mode + * and need a higher signal drive strength + */ + allwinner,drive = <3>; + allwinner,pull = <0>; + }; + }; + + ahb1_rst: reset at 01c202c0 { + #reset-cells = <1>; + compatible = "allwinner,sun6i-a31-ahb1-reset"; + reg = <0x01c202c0 0xc>; + }; + + apb1_rst: reset at 01c202d0 { + #reset-cells = <1>; + compatible = "allwinner,sun6i-a31-clock-reset"; + reg = <0x01c202d0 0x4>; + }; + + apb2_rst: reset at 01c202d8 { + #reset-cells = <1>; + compatible = "allwinner,sun6i-a31-clock-reset"; + reg = <0x01c202d8 0x4>; + }; + + timer at 01c20c00 { + compatible = "allwinner,sun4i-a10-timer"; + reg = <0x01c20c00 0xa0>; + interrupts = <0 18 4>, + <0 19 4>, + <0 20 4>, + <0 21 4>, + <0 22 4>; + clocks = <&osc24M>; + }; + + wdt1: watchdog at 01c20ca0 { + compatible = "allwinner,sun6i-a31-wdt"; + reg = <0x01c20ca0 0x20>; + }; + + uart0: serial at 01c28000 { + compatible = "snps,dw-apb-uart"; + reg = <0x01c28000 0x400>; + interrupts = <0 0 4>; + reg-shift = <2>; + reg-io-width = <4>; + clocks = <&apb2_gates 16>; + resets = <&apb2_rst 16>; + dmas = <&dma 6>, <&dma 6>; + dma-names = "rx", "tx"; + status = "disabled"; + }; + + uart1: serial at 01c28400 { + compatible = "snps,dw-apb-uart"; + reg = <0x01c28400 0x400>; + interrupts = <0 1 4>; + reg-shift = <2>; + reg-io-width = <4>; + clocks = <&apb2_gates 17>; + resets = <&apb2_rst 17>; + dmas = <&dma 7>, <&dma 7>; + dma-names = "rx", "tx"; + status = "disabled"; + }; + + uart2: serial at 01c28800 { + compatible = "snps,dw-apb-uart"; + reg = <0x01c28800 0x400>; + interrupts = <0 2 4>; + reg-shift = <2>; + reg-io-width = <4>; + clocks = <&apb2_gates 18>; + resets = <&apb2_rst 18>; + dmas = <&dma 8>, <&dma 8>; + dma-names = "rx", "tx"; + status = "disabled"; + }; + + uart3: serial at 01c28c00 { + compatible = "snps,dw-apb-uart"; + reg = <0x01c28c00 0x400>; + interrupts = <0 3 4>; + reg-shift = <2>; + reg-io-width = <4>; + clocks = <&apb2_gates 19>; + resets = <&apb2_rst 19>; + dmas = <&dma 9>, <&dma 9>; + dma-names = "rx", "tx"; + status = "disabled"; + }; + + uart4: serial at 01c29000 { + compatible = "snps,dw-apb-uart"; + reg = <0x01c29000 0x400>; + interrupts = <0 4 4>; + reg-shift = <2>; + reg-io-width = <4>; + clocks = <&apb2_gates 20>; + resets = <&apb2_rst 20>; + dmas = <&dma 10>, <&dma 10>; + dma-names = "rx", "tx"; + status = "disabled"; + }; + + uart5: serial at 01c29400 { + compatible = "snps,dw-apb-uart"; + reg = <0x01c29400 0x400>; + interrupts = <0 5 4>; + reg-shift = <2>; + reg-io-width = <4>; + clocks = <&apb2_gates 21>; + resets = <&apb2_rst 21>; + dmas = <&dma 22>, <&dma 22>; + dma-names = "rx", "tx"; + status = "disabled"; + }; + + i2c0: i2c at 01c2ac00 { + compatible = "allwinner,sun6i-a31-i2c"; + reg = <0x01c2ac00 0x400>; + interrupts = <0 6 4>; + clocks = <&apb2_gates 0>; + resets = <&apb2_rst 0>; + status = "disabled"; + #address-cells = <1>; + #size-cells = <0>; + }; + + i2c1: i2c at 01c2b000 { + compatible = "allwinner,sun6i-a31-i2c"; + reg = <0x01c2b000 0x400>; + interrupts = <0 7 4>; + clocks = <&apb2_gates 1>; + resets = <&apb2_rst 1>; + status = "disabled"; + #address-cells = <1>; + #size-cells = <0>; + }; + + i2c2: i2c at 01c2b400 { + compatible = "allwinner,sun6i-a31-i2c"; + reg = <0x01c2b400 0x400>; + interrupts = <0 8 4>; + clocks = <&apb2_gates 2>; + resets = <&apb2_rst 2>; + status = "disabled"; + #address-cells = <1>; + #size-cells = <0>; + }; + + i2c3: i2c at 01c2b800 { + compatible = "allwinner,sun6i-a31-i2c"; + reg = <0x01c2b800 0x400>; + interrupts = <0 9 4>; + clocks = <&apb2_gates 3>; + resets = <&apb2_rst 3>; + status = "disabled"; + #address-cells = <1>; + #size-cells = <0>; + }; + + gmac: ethernet at 01c30000 { + compatible = "allwinner,sun7i-a20-gmac"; + reg = <0x01c30000 0x1054>; + interrupts = <0 82 4>; + interrupt-names = "macirq"; + clocks = <&ahb1_gates 17>, <&gmac_tx_clk>; + clock-names = "stmmaceth", "allwinner_gmac_tx"; + resets = <&ahb1_rst 17>; + reset-names = "stmmaceth"; + snps,pbl = <2>; + snps,fixed-burst; + snps,force_sf_dma_mode; + status = "disabled"; + #address-cells = <1>; + #size-cells = <0>; + }; + + timer at 01c60000 { + compatible = "allwinner,sun6i-a31-hstimer", "allwinner,sun7i-a20-hstimer"; + reg = <0x01c60000 0x1000>; + interrupts = <0 51 4>, + <0 52 4>, + <0 53 4>, + <0 54 4>; + clocks = <&ahb1_gates 19>; + resets = <&ahb1_rst 19>; + }; + + spi0: spi at 01c68000 { + compatible = "allwinner,sun6i-a31-spi"; + reg = <0x01c68000 0x1000>; + interrupts = <0 65 4>; + clocks = <&ahb1_gates 20>, <&spi0_clk>; + clock-names = "ahb", "mod"; + dmas = <&dma 23>, <&dma 23>; + dma-names = "rx", "tx"; + resets = <&ahb1_rst 20>; + status = "disabled"; + }; + + spi1: spi at 01c69000 { + compatible = "allwinner,sun6i-a31-spi"; + reg = <0x01c69000 0x1000>; + interrupts = <0 66 4>; + clocks = <&ahb1_gates 21>, <&spi1_clk>; + clock-names = "ahb", "mod"; + dmas = <&dma 24>, <&dma 24>; + dma-names = "rx", "tx"; + resets = <&ahb1_rst 21>; + status = "disabled"; + }; + + spi2: spi at 01c6a000 { + compatible = "allwinner,sun6i-a31-spi"; + reg = <0x01c6a000 0x1000>; + interrupts = <0 67 4>; + clocks = <&ahb1_gates 22>, <&spi2_clk>; + clock-names = "ahb", "mod"; + dmas = <&dma 25>, <&dma 25>; + dma-names = "rx", "tx"; + resets = <&ahb1_rst 22>; + status = "disabled"; + }; + + spi3: spi at 01c6b000 { + compatible = "allwinner,sun6i-a31-spi"; + reg = <0x01c6b000 0x1000>; + interrupts = <0 68 4>; + clocks = <&ahb1_gates 23>, <&spi3_clk>; + clock-names = "ahb", "mod"; + dmas = <&dma 26>, <&dma 26>; + dma-names = "rx", "tx"; + resets = <&ahb1_rst 23>; + status = "disabled"; + }; + + gic: interrupt-controller at 01c81000 { + compatible = "arm,cortex-a7-gic", "arm,cortex-a15-gic"; + reg = <0x01c81000 0x1000>, + <0x01c82000 0x1000>, + <0x01c84000 0x2000>, + <0x01c86000 0x2000>; + interrupt-controller; + #interrupt-cells = <3>; + interrupts = <1 9 0xf04>; + }; + + rtc: rtc at 01f00000 { + compatible = "allwinner,sun6i-a31-rtc"; + reg = <0x01f00000 0x54>; + interrupts = <0 40 4>, <0 41 4>; + }; + + nmi_intc: interrupt-controller at 01f00c0c { + compatible = "allwinner,sun6i-a31-sc-nmi"; + interrupt-controller; + #interrupt-cells = <2>; + reg = <0x01f00c0c 0x38>; + interrupts = <0 32 4>; + }; + + prcm at 01f01400 { + compatible = "allwinner,sun6i-a31-prcm"; + reg = <0x01f01400 0x200>; + + ar100: ar100_clk { + compatible = "allwinner,sun6i-a31-ar100-clk"; + #clock-cells = <0>; + clocks = <&osc32k>, <&osc24M>, <&pll6>, <&pll6>; + clock-output-names = "ar100"; + }; + + ahb0: ahb0_clk { + compatible = "fixed-factor-clock"; + #clock-cells = <0>; + clock-div = <1>; + clock-mult = <1>; + clocks = <&ar100>; + clock-output-names = "ahb0"; + }; + + apb0: apb0_clk { + compatible = "allwinner,sun6i-a31-apb0-clk"; + #clock-cells = <0>; + clocks = <&ahb0>; + clock-output-names = "apb0"; + }; + + apb0_gates: apb0_gates_clk { + compatible = "allwinner,sun6i-a31-apb0-gates-clk"; + #clock-cells = <1>; + clocks = <&apb0>; + clock-output-names = "apb0_pio", "apb0_ir", + "apb0_timer", "apb0_p2wi",
arch/arm/boot/dts/sun6i-a31s.dtsi line 881
Quoted 10 lines
arch/arm/boot/dts/sun6i-a31s.dtsi new file +10
-0+ "apb0_uart", "apb0_1wire", + "apb0_i2c"; + }; + + ir_clk: ir_clk { + #clock-cells = <0>; + compatible = "allwinner,sun6i-a31-ir-clk"; + clocks = <&osc32k>, <&osc24M>; + clock-output-names = "ir"; + };
This is yet to be agreed on....
Quoted 47 lines
arch/arm/boot/dts/sun6i-a31s.dtsi new file +44
-0+ + apb0_rst: apb0_rst { + compatible = "allwinner,sun6i-a31-clock-reset"; + #reset-cells = <1>; + }; + }; + + cpucfg at 01f01c00 { + compatible = "allwinner,sun6i-a31-cpuconfig"; + reg = <0x01f01c00 0x300>; + }; + + ir at 01f02000 { + compatible = "allwinner,sun5i-a13-ir"; + clocks = <&apb0_gates 1>, <&ir_clk>; + clock-names = "apb", "ir"; + resets = <&apb0_rst 1>; + interrupts = <0 37 4>; + reg = <0x01f02000 0x40>; + status = "disabled"; + }; + + r_pio: pinctrl at 01f02c00 { + compatible = "allwinner,sun6i-a31-r-pinctrl"; + reg = <0x01f02c00 0x400>; + interrupts = <0 45 4>, + <0 46 4>; + clocks = <&apb0_gates 0>; + resets = <&apb0_rst 0>; + gpio-controller; + interrupt-controller; + #interrupt-cells = <2>; + #size-cells = <0>; + #gpio-cells = <3>; + + ir_pins_a: ir at 0 { + allwinner,pins = "PL4"; + allwinner,function = "s_ir"; + allwinner,drive = <0>; + allwinner,pull = <0>; + }; + }; + }; +};Signature · 1 line
2.1.0
Signature · 10 lines
Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20141125/51037df9/attachment-0001.sig>
PATCH 4/5 ARM: dts: sun6i: Add sun6i-a31s.dtsi
Quoted 258 lines · Maxime Ripard
Hi,
Quoted 9 lines · Hans de Goede
Add a dtsi file for A31s based boards. This is a copy of
sun6i-a31.dtsi, with:(quoted diff) +0
-2-The main pinctrl compatible changed to allwinner,sun6i-a31s.dtsi -The ohci2 controller is present according to the data-sheet, but not routed to the outside, so remove it from the dtsi as having an always disabled node is not useful.All the other nodes present in the original
sun6i-a31.dtsiare present in the A31s too, and are 100% compatible.Then maybe duplicating the DT isn't worth it then.
Creating a
sun6i.dtsiand including that from both the A31 and A31s seems more like an appropriate solution.Quoted 13 lines
Signed-off-by Hans de Goede <[email protected]>--- arch/arm/boot/dts/sun6i-a31s.dtsi | 925 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 925 insertions(+) create mode 100644 arch/arm/boot/dts/sun6i-a31s.dtsiarch/arm/boot/dts/sun6i-a31s.dtsi new file +0
-0arch/arm/boot/dts/sun6i-a31s.dtsi line 4
Quoted 4 lines
arch/arm/boot/dts/sun6i-a31s.dtsi new file +4
-0@@ -0,0 +1,925 @@ +/* + * Copyright 2013 Maxime Ripard + * + * Maxime Ripard <[email protected]>It should be your copyright here.
Quoted 10 lines
arch/arm/boot/dts/sun6i-a31s.dtsi new file +10
-0+ * + * This file is dual-licensed: you can use it either under the terms + * of the GPL or the X11 license, at your option. Note that this dual + * licensing only applies to this file, and not this project as a + * whole. + * + * a) This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version.arch/arm/boot/dts/sun6i-a31s.dtsi line 24
Quoted 10 lines
arch/arm/boot/dts/sun6i-a31s.dtsi new file +10
-0+ * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this library; if not, write to the Free + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + * MA 02110-1301 USAThere was an issue with the wording of the license, s/library/file/
Quoted 39 lines
arch/arm/boot/dts/sun6i-a31s.dtsi new file +39
-0+ * + * Or, alternatively, + * + * b) Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ + +/include/ "skeleton.dtsi" + +/ { + interrupt-parent = <&gic>; + + aliases { + serial0 = &uart0; + serial1 = &uart1; + serial2 = &uart2; + serial3 = &uart3; + serial4 = &uart4; + serial5 = &uart5; + ethernet0 = &gmac; + };arch/arm/boot/dts/sun6i-a31s.dtsi line 73
Quoted 10 lines
arch/arm/boot/dts/sun6i-a31s.dtsi new file +10
-0+ + chosen { + #address-cells = <1>; + #size-cells = <1>; + ranges; + + framebuffer at 0 { + compatible = "allwinner,simple-framebuffer", "simple-framebuffer"; + allwinner,pipeline = "de_be0-lcd0-hdmi"; + clocks = <&pll6>;pll6 uses an argument now
arch/arm/boot/dts/sun6i-a31s.dtsi line 79
Quoted 6 lines
arch/arm/boot/dts/sun6i-a31s.dtsi new file +6
-0+ status = "disabled"; + }; + }; + + cpus { + enable-method = "allwinner,sun6i-a31";allwinner,sun6i-a31s I guess?
Quoted 123 lines
arch/arm/boot/dts/sun6i-a31s.dtsi new file +123
-0+ #address-cells = <1>; + #size-cells = <0>; + + cpu at 0 { + compatible = "arm,cortex-a7"; + device_type = "cpu"; + reg = <0>; + }; + + cpu at 1 { + compatible = "arm,cortex-a7"; + device_type = "cpu"; + reg = <1>; + }; + + cpu at 2 { + compatible = "arm,cortex-a7"; + device_type = "cpu"; + reg = <2>; + }; + + cpu at 3 { + compatible = "arm,cortex-a7"; + device_type = "cpu"; + reg = <3>; + }; + }; + + memory { + reg = <0x40000000 0x80000000>; + }; + + pmu { + compatible = "arm,cortex-a7-pmu", "arm,cortex-a15-pmu"; + interrupts = <0 120 4>, + <0 121 4>, + <0 122 4>, + <0 123 4>; + }; + + clocks { + #address-cells = <1>; + #size-cells = <1>; + ranges; + + osc24M: osc24M { + #clock-cells = <0>; + compatible = "fixed-clock"; + clock-frequency = <24000000>; + }; + + osc32k: clk at 0 { + #clock-cells = <0>; + compatible = "fixed-clock"; + clock-frequency = <32768>; + clock-output-names = "osc32k"; + }; + + pll1: clk at 01c20000 { + #clock-cells = <0>; + compatible = "allwinner,sun6i-a31-pll1-clk"; + reg = <0x01c20000 0x4>; + clocks = <&osc24M>; + clock-output-names = "pll1"; + }; + + pll6: clk at 01c20028 { + #clock-cells = <0>; + compatible = "allwinner,sun6i-a31-pll6-clk"; + reg = <0x01c20028 0x4>; + clocks = <&osc24M>; + clock-output-names = "pll6"; + }; + + cpu: cpu at 01c20050 { + #clock-cells = <0>; + compatible = "allwinner,sun4i-a10-cpu-clk"; + reg = <0x01c20050 0x4>; + + /* + * PLL1 is listed twice here. + * While it looks suspicious, it's actually documented + * that way both in the datasheet and in the code from + * Allwinner. + */ + clocks = <&osc32k>, <&osc24M>, <&pll1>, <&pll1>; + clock-output-names = "cpu"; + }; + + axi: axi at 01c20050 { + #clock-cells = <0>; + compatible = "allwinner,sun4i-a10-axi-clk"; + reg = <0x01c20050 0x4>; + clocks = <&cpu>; + clock-output-names = "axi"; + }; + + ahb1_mux: ahb1_mux at 01c20054 { + #clock-cells = <0>; + compatible = "allwinner,sun6i-a31-ahb1-mux-clk"; + reg = <0x01c20054 0x4>; + clocks = <&osc32k>, <&osc24M>, <&axi>, <&pll6>; + clock-output-names = "ahb1_mux"; + }; + + ahb1: ahb1 at 01c20054 { + #clock-cells = <0>; + compatible = "allwinner,sun4i-a10-ahb-clk"; + reg = <0x01c20054 0x4>; + clocks = <&ahb1_mux>; + clock-output-names = "ahb1"; + }; + + ahb1_gates: clk at 01c20060 { + #clock-cells = <1>; + compatible = "allwinner,sun6i-a31-ahb1-gates-clk"; + reg = <0x01c20060 0x8>; + clocks = <&ahb1>; + clock-output-names = "ahb1_mipidsi", "ahb1_ss", + "ahb1_dma", "ahb1_mmc0", "ahb1_mmc1", + "ahb1_mmc2", "ahb1_mmc3", "ahb1_nand1", + "ahb1_nand0", "ahb1_sdram", + "ahb1_gmac", "ahb1_ts", "ahb1_hstimer",arch/arm/boot/dts/sun6i-a31s.dtsi line 212
Quoted 10 lines
arch/arm/boot/dts/sun6i-a31s.dtsi new file +10
-0+ "ahb1_spi0", "ahb1_spi1", "ahb1_spi2", + "ahb1_spi3", "ahb1_otg", "ahb1_ehci0", + "ahb1_ehci1", "ahb1_ohci0", + "ahb1_ohci1", "ahb1_ohci2", "ahb1_ve", + "ahb1_lcd0", "ahb1_lcd1", "ahb1_csi", + "ahb1_hdmi", "ahb1_de0", "ahb1_de1", + "ahb1_fe0", "ahb1_fe1", "ahb1_mp", + "ahb1_gpu", "ahb1_deu0", "ahb1_deu1", + "ahb1_drc0", "ahb1_drc1"; + };Are the gates really identical?
Quoted 1 line
As in not even stripped down?
According to the user manuals, the AHB1 gates on the A31s don't have GMAC (or EMAC in the manual) and MIPI DSI listed. Though it seems a lot of A31s hardware out there actually use GMAC.
The APB1 and APB2 gates are the same.
Quoted 314 lines
Quoted 314 lines
arch/arm/boot/dts/sun6i-a31s.dtsi new file +314
-0+ apb1: apb1 at 01c20054 { + #clock-cells = <0>; + compatible = "allwinner,sun4i-a10-apb0-clk"; + reg = <0x01c20054 0x4>; + clocks = <&ahb1>; + clock-output-names = "apb1"; + }; + + apb1_gates: clk at 01c20068 { + #clock-cells = <1>; + compatible = "allwinner,sun6i-a31-apb1-gates-clk"; + reg = <0x01c20068 0x4>; + clocks = <&apb1>; + clock-output-names = "apb1_codec", "apb1_digital_mic", + "apb1_pio", "apb1_daudio0", + "apb1_daudio1"; + }; + + apb2_mux: apb2_mux at 01c20058 { + #clock-cells = <0>; + compatible = "allwinner,sun4i-a10-apb1-mux-clk"; + reg = <0x01c20058 0x4>; + clocks = <&osc32k>, <&osc24M>, <&pll6>, <&pll6>; + clock-output-names = "apb2_mux"; + }; + + apb2: apb2 at 01c20058 { + #clock-cells = <0>; + compatible = "allwinner,sun6i-a31-apb2-div-clk"; + reg = <0x01c20058 0x4>; + clocks = <&apb2_mux>; + clock-output-names = "apb2"; + }; + + apb2_gates: clk at 01c2006c { + #clock-cells = <1>; + compatible = "allwinner,sun6i-a31-apb2-gates-clk"; + reg = <0x01c2006c 0x4>; + clocks = <&apb2>; + clock-output-names = "apb2_i2c0", "apb2_i2c1", + "apb2_i2c2", "apb2_i2c3", "apb2_uart0", + "apb2_uart1", "apb2_uart2", "apb2_uart3", + "apb2_uart4", "apb2_uart5"; + }; + + mmc0_clk: clk at 01c20088 { + #clock-cells = <0>; + compatible = "allwinner,sun4i-a10-mod0-clk"; + reg = <0x01c20088 0x4>; + clocks = <&osc24M>, <&pll6>; + clock-output-names = "mmc0"; + }; + + mmc1_clk: clk at 01c2008c { + #clock-cells = <0>; + compatible = "allwinner,sun4i-a10-mod0-clk"; + reg = <0x01c2008c 0x4>; + clocks = <&osc24M>, <&pll6>; + clock-output-names = "mmc1"; + }; + + mmc2_clk: clk at 01c20090 { + #clock-cells = <0>; + compatible = "allwinner,sun4i-a10-mod0-clk"; + reg = <0x01c20090 0x4>; + clocks = <&osc24M>, <&pll6>; + clock-output-names = "mmc2"; + }; + + mmc3_clk: clk at 01c20094 { + #clock-cells = <0>; + compatible = "allwinner,sun4i-a10-mod0-clk"; + reg = <0x01c20094 0x4>; + clocks = <&osc24M>, <&pll6>; + clock-output-names = "mmc3"; + }; + + spi0_clk: clk at 01c200a0 { + #clock-cells = <0>; + compatible = "allwinner,sun4i-a10-mod0-clk"; + reg = <0x01c200a0 0x4>; + clocks = <&osc24M>, <&pll6>; + clock-output-names = "spi0"; + }; + + spi1_clk: clk at 01c200a4 { + #clock-cells = <0>; + compatible = "allwinner,sun4i-a10-mod0-clk"; + reg = <0x01c200a4 0x4>; + clocks = <&osc24M>, <&pll6>; + clock-output-names = "spi1"; + }; + + spi2_clk: clk at 01c200a8 { + #clock-cells = <0>; + compatible = "allwinner,sun4i-a10-mod0-clk"; + reg = <0x01c200a8 0x4>; + clocks = <&osc24M>, <&pll6>; + clock-output-names = "spi2"; + }; + + spi3_clk: clk at 01c200ac { + #clock-cells = <0>; + compatible = "allwinner,sun4i-a10-mod0-clk"; + reg = <0x01c200ac 0x4>; + clocks = <&osc24M>, <&pll6>; + clock-output-names = "spi3"; + }; + + usb_clk: clk at 01c200cc { + #clock-cells = <1>; + #reset-cells = <1>; + compatible = "allwinner,sun6i-a31-usb-clk"; + reg = <0x01c200cc 0x4>; + clocks = <&osc24M>; + clock-output-names = "usb_phy0", "usb_phy1", "usb_phy2", + "usb_ohci0", "usb_ohci1", + "usb_ohci2"; + }; + + /* + * The following two are dummy clocks, placeholders used in the gmac_tx + * clock. The gmac driver will choose one parent depending on the PHY + * interface mode, using clk_set_rate auto-reparenting. + * The actual TX clock rate is not controlled by the gmac_tx clock. + */ + mii_phy_tx_clk: clk at 1 { + #clock-cells = <0>; + compatible = "fixed-clock"; + clock-frequency = <25000000>; + clock-output-names = "mii_phy_tx"; + }; + + gmac_int_tx_clk: clk at 2 { + #clock-cells = <0>; + compatible = "fixed-clock"; + clock-frequency = <125000000>; + clock-output-names = "gmac_int_tx"; + }; + + gmac_tx_clk: clk at 01c200d0 { + #clock-cells = <0>; + compatible = "allwinner,sun7i-a20-gmac-clk"; + reg = <0x01c200d0 0x4>; + clocks = <&mii_phy_tx_clk>, <&gmac_int_tx_clk>; + clock-output-names = "gmac_tx"; + }; + }; + + soc at 01c00000 { + compatible = "simple-bus"; + #address-cells = <1>; + #size-cells = <1>; + ranges; + + dma: dma-controller at 01c02000 { + compatible = "allwinner,sun6i-a31-dma"; + reg = <0x01c02000 0x1000>; + interrupts = <0 50 4>; + clocks = <&ahb1_gates 6>; + resets = <&ahb1_rst 6>; + #dma-cells = <1>; + }; + + mmc0: mmc at 01c0f000 { + compatible = "allwinner,sun5i-a13-mmc"; + reg = <0x01c0f000 0x1000>; + clocks = <&ahb1_gates 8>, <&mmc0_clk>; + clock-names = "ahb", "mmc"; + resets = <&ahb1_rst 8>; + reset-names = "ahb"; + interrupts = <0 60 4>; + status = "disabled"; + }; + + mmc1: mmc at 01c10000 { + compatible = "allwinner,sun5i-a13-mmc"; + reg = <0x01c10000 0x1000>; + clocks = <&ahb1_gates 9>, <&mmc1_clk>; + clock-names = "ahb", "mmc"; + resets = <&ahb1_rst 9>; + reset-names = "ahb"; + interrupts = <0 61 4>; + status = "disabled"; + }; + + mmc2: mmc at 01c11000 { + compatible = "allwinner,sun5i-a13-mmc"; + reg = <0x01c11000 0x1000>; + clocks = <&ahb1_gates 10>, <&mmc2_clk>; + clock-names = "ahb", "mmc"; + resets = <&ahb1_rst 10>; + reset-names = "ahb"; + interrupts = <0 62 4>; + status = "disabled"; + }; + + mmc3: mmc at 01c12000 { + compatible = "allwinner,sun5i-a13-mmc"; + reg = <0x01c12000 0x1000>; + clocks = <&ahb1_gates 11>, <&mmc3_clk>; + clock-names = "ahb", "mmc"; + resets = <&ahb1_rst 11>; + reset-names = "ahb"; + interrupts = <0 63 4>; + status = "disabled"; + }; + + usbphy: phy at 01c19400 { + compatible = "allwinner,sun6i-a31-usb-phy"; + reg = <0x01c19400 0x10>, + <0x01c1a800 0x4>, + <0x01c1b800 0x4>; + reg-names = "phy_ctrl", + "pmu1", + "pmu2"; + clocks = <&usb_clk 8>, + <&usb_clk 9>, + <&usb_clk 10>; + clock-names = "usb0_phy", + "usb1_phy", + "usb2_phy"; + resets = <&usb_clk 0>, + <&usb_clk 1>, + <&usb_clk 2>; + reset-names = "usb0_reset", + "usb1_reset", + "usb2_reset"; + status = "disabled"; + #phy-cells = <1>; + }; + + ehci0: usb at 01c1a000 { + compatible = "allwinner,sun6i-a31-ehci", "generic-ehci"; + reg = <0x01c1a000 0x100>; + interrupts = <0 72 4>; + clocks = <&ahb1_gates 26>; + resets = <&ahb1_rst 26>; + phys = <&usbphy 1>; + phy-names = "usb"; + status = "disabled"; + }; + + ohci0: usb at 01c1a400 { + compatible = "allwinner,sun6i-a31-ohci", "generic-ohci"; + reg = <0x01c1a400 0x100>; + interrupts = <0 73 4>; + clocks = <&ahb1_gates 29>, <&usb_clk 16>; + resets = <&ahb1_rst 29>; + phys = <&usbphy 1>; + phy-names = "usb"; + status = "disabled"; + }; + + ehci1: usb at 01c1b000 { + compatible = "allwinner,sun6i-a31-ehci", "generic-ehci"; + reg = <0x01c1b000 0x100>; + interrupts = <0 74 4>; + clocks = <&ahb1_gates 27>; + resets = <&ahb1_rst 27>; + phys = <&usbphy 2>; + phy-names = "usb"; + status = "disabled"; + }; + + ohci1: usb at 01c1b400 { + compatible = "allwinner,sun6i-a31-ohci", "generic-ohci"; + reg = <0x01c1b400 0x100>; + interrupts = <0 75 4>; + clocks = <&ahb1_gates 30>, <&usb_clk 17>; + resets = <&ahb1_rst 30>; + phys = <&usbphy 2>; + phy-names = "usb"; + status = "disabled"; + }; + + pio: pinctrl at 01c20800 { + compatible = "allwinner,sun6i-a31s-pinctrl"; + reg = <0x01c20800 0x400>; + interrupts = <0 11 4>, + <0 15 4>, + <0 16 4>, + <0 17 4>; + clocks = <&apb1_gates 5>; + gpio-controller; + interrupt-controller; + #interrupt-cells = <2>; + #size-cells = <0>; + #gpio-cells = <3>; + + uart0_pins_a: uart0 at 0 { + allwinner,pins = "PH20", "PH21"; + allwinner,function = "uart0"; + allwinner,drive = <0>; + allwinner,pull = <0>; + }; + + i2c0_pins_a: i2c0 at 0 { + allwinner,pins = "PH14", "PH15"; + allwinner,function = "i2c0"; + allwinner,drive = <0>; + allwinner,pull = <0>; + }; + + i2c1_pins_a: i2c1 at 0 { + allwinner,pins = "PH16", "PH17"; + allwinner,function = "i2c1"; + allwinner,drive = <0>; + allwinner,pull = <0>; + }; + + i2c2_pins_a: i2c2 at 0 { + allwinner,pins = "PH18", "PH19"; + allwinner,function = "i2c2";
Quoted 8 lines
arch/arm/boot/dts/sun6i-a31s.dtsi line 533
Quoted 6 lines
arch/arm/boot/dts/sun6i-a31s.dtsi new file +6
-0+ allwinner,drive = <0>; + allwinner,pull = <0>; + }; + + mmc0_pins_a: mmc0 at 0 { + allwinner,pins = "PF0","PF1","PF2","PF3","PF4","PF5";Spaces after the comma, and I guess that would be better on two lines.
This is in the other dtsi. We should probably fix the styling there as well.
Quoted 398 lines
Quoted 338 lines
arch/arm/boot/dts/sun6i-a31s.dtsi new file +338
-0+ allwinner,function = "mmc0"; + allwinner,drive = <2>; + allwinner,pull = <0>; + }; + + gmac_pins_mii_a: gmac_mii at 0 { + allwinner,pins = "PA0", "PA1", "PA2", "PA3", + "PA8", "PA9", "PA11", + "PA12", "PA13", "PA14", "PA19", + "PA20", "PA21", "PA22", "PA23", + "PA24", "PA26", "PA27"; + allwinner,function = "gmac"; + allwinner,drive = <0>; + allwinner,pull = <0>; + }; + + gmac_pins_gmii_a: gmac_gmii at 0 { + allwinner,pins = "PA0", "PA1", "PA2", "PA3", + "PA4", "PA5", "PA6", "PA7", + "PA8", "PA9", "PA10", "PA11", + "PA12", "PA13", "PA14", "PA15", + "PA16", "PA17", "PA18", "PA19", + "PA20", "PA21", "PA22", "PA23", + "PA24", "PA25", "PA26", "PA27"; + allwinner,function = "gmac"; + /* + * data lines in GMII mode run at 125MHz and + * might need a higher signal drive strength + */ + allwinner,drive = <2>; + allwinner,pull = <0>; + }; + + gmac_pins_rgmii_a: gmac_rgmii at 0 { + allwinner,pins = "PA0", "PA1", "PA2", "PA3", + "PA9", "PA10", "PA11", + "PA12", "PA13", "PA14", "PA19", + "PA20", "PA25", "PA26", "PA27"; + allwinner,function = "gmac"; + /* + * data lines in RGMII mode use DDR mode + * and need a higher signal drive strength + */ + allwinner,drive = <3>; + allwinner,pull = <0>; + }; + }; + + ahb1_rst: reset at 01c202c0 { + #reset-cells = <1>; + compatible = "allwinner,sun6i-a31-ahb1-reset"; + reg = <0x01c202c0 0xc>; + }; + + apb1_rst: reset at 01c202d0 { + #reset-cells = <1>; + compatible = "allwinner,sun6i-a31-clock-reset"; + reg = <0x01c202d0 0x4>; + }; + + apb2_rst: reset at 01c202d8 { + #reset-cells = <1>; + compatible = "allwinner,sun6i-a31-clock-reset"; + reg = <0x01c202d8 0x4>; + }; + + timer at 01c20c00 { + compatible = "allwinner,sun4i-a10-timer"; + reg = <0x01c20c00 0xa0>; + interrupts = <0 18 4>, + <0 19 4>, + <0 20 4>, + <0 21 4>, + <0 22 4>; + clocks = <&osc24M>; + }; + + wdt1: watchdog at 01c20ca0 { + compatible = "allwinner,sun6i-a31-wdt"; + reg = <0x01c20ca0 0x20>; + }; + + uart0: serial at 01c28000 { + compatible = "snps,dw-apb-uart"; + reg = <0x01c28000 0x400>; + interrupts = <0 0 4>; + reg-shift = <2>; + reg-io-width = <4>; + clocks = <&apb2_gates 16>; + resets = <&apb2_rst 16>; + dmas = <&dma 6>, <&dma 6>; + dma-names = "rx", "tx"; + status = "disabled"; + }; + + uart1: serial at 01c28400 { + compatible = "snps,dw-apb-uart"; + reg = <0x01c28400 0x400>; + interrupts = <0 1 4>; + reg-shift = <2>; + reg-io-width = <4>; + clocks = <&apb2_gates 17>; + resets = <&apb2_rst 17>; + dmas = <&dma 7>, <&dma 7>; + dma-names = "rx", "tx"; + status = "disabled"; + }; + + uart2: serial at 01c28800 { + compatible = "snps,dw-apb-uart"; + reg = <0x01c28800 0x400>; + interrupts = <0 2 4>; + reg-shift = <2>; + reg-io-width = <4>; + clocks = <&apb2_gates 18>; + resets = <&apb2_rst 18>; + dmas = <&dma 8>, <&dma 8>; + dma-names = "rx", "tx"; + status = "disabled"; + }; + + uart3: serial at 01c28c00 { + compatible = "snps,dw-apb-uart"; + reg = <0x01c28c00 0x400>; + interrupts = <0 3 4>; + reg-shift = <2>; + reg-io-width = <4>; + clocks = <&apb2_gates 19>; + resets = <&apb2_rst 19>; + dmas = <&dma 9>, <&dma 9>; + dma-names = "rx", "tx"; + status = "disabled"; + }; + + uart4: serial at 01c29000 { + compatible = "snps,dw-apb-uart"; + reg = <0x01c29000 0x400>; + interrupts = <0 4 4>; + reg-shift = <2>; + reg-io-width = <4>; + clocks = <&apb2_gates 20>; + resets = <&apb2_rst 20>; + dmas = <&dma 10>, <&dma 10>; + dma-names = "rx", "tx"; + status = "disabled"; + }; + + uart5: serial at 01c29400 { + compatible = "snps,dw-apb-uart"; + reg = <0x01c29400 0x400>; + interrupts = <0 5 4>; + reg-shift = <2>; + reg-io-width = <4>; + clocks = <&apb2_gates 21>; + resets = <&apb2_rst 21>; + dmas = <&dma 22>, <&dma 22>; + dma-names = "rx", "tx"; + status = "disabled"; + }; + + i2c0: i2c at 01c2ac00 { + compatible = "allwinner,sun6i-a31-i2c"; + reg = <0x01c2ac00 0x400>; + interrupts = <0 6 4>; + clocks = <&apb2_gates 0>; + resets = <&apb2_rst 0>; + status = "disabled"; + #address-cells = <1>; + #size-cells = <0>; + }; + + i2c1: i2c at 01c2b000 { + compatible = "allwinner,sun6i-a31-i2c"; + reg = <0x01c2b000 0x400>; + interrupts = <0 7 4>; + clocks = <&apb2_gates 1>; + resets = <&apb2_rst 1>; + status = "disabled"; + #address-cells = <1>; + #size-cells = <0>; + }; + + i2c2: i2c at 01c2b400 { + compatible = "allwinner,sun6i-a31-i2c"; + reg = <0x01c2b400 0x400>; + interrupts = <0 8 4>; + clocks = <&apb2_gates 2>; + resets = <&apb2_rst 2>; + status = "disabled"; + #address-cells = <1>; + #size-cells = <0>; + }; + + i2c3: i2c at 01c2b800 { + compatible = "allwinner,sun6i-a31-i2c"; + reg = <0x01c2b800 0x400>; + interrupts = <0 9 4>; + clocks = <&apb2_gates 3>; + resets = <&apb2_rst 3>; + status = "disabled"; + #address-cells = <1>; + #size-cells = <0>; + }; + + gmac: ethernet at 01c30000 { + compatible = "allwinner,sun7i-a20-gmac"; + reg = <0x01c30000 0x1054>; + interrupts = <0 82 4>; + interrupt-names = "macirq"; + clocks = <&ahb1_gates 17>, <&gmac_tx_clk>; + clock-names = "stmmaceth", "allwinner_gmac_tx"; + resets = <&ahb1_rst 17>; + reset-names = "stmmaceth"; + snps,pbl = <2>; + snps,fixed-burst; + snps,force_sf_dma_mode; + status = "disabled"; + #address-cells = <1>; + #size-cells = <0>; + }; + + timer at 01c60000 { + compatible = "allwinner,sun6i-a31-hstimer", "allwinner,sun7i-a20-hstimer"; + reg = <0x01c60000 0x1000>; + interrupts = <0 51 4>, + <0 52 4>, + <0 53 4>, + <0 54 4>; + clocks = <&ahb1_gates 19>; + resets = <&ahb1_rst 19>; + }; + + spi0: spi at 01c68000 { + compatible = "allwinner,sun6i-a31-spi"; + reg = <0x01c68000 0x1000>; + interrupts = <0 65 4>; + clocks = <&ahb1_gates 20>, <&spi0_clk>; + clock-names = "ahb", "mod"; + dmas = <&dma 23>, <&dma 23>; + dma-names = "rx", "tx"; + resets = <&ahb1_rst 20>; + status = "disabled"; + }; + + spi1: spi at 01c69000 { + compatible = "allwinner,sun6i-a31-spi"; + reg = <0x01c69000 0x1000>; + interrupts = <0 66 4>; + clocks = <&ahb1_gates 21>, <&spi1_clk>; + clock-names = "ahb", "mod"; + dmas = <&dma 24>, <&dma 24>; + dma-names = "rx", "tx"; + resets = <&ahb1_rst 21>; + status = "disabled"; + }; + + spi2: spi at 01c6a000 { + compatible = "allwinner,sun6i-a31-spi"; + reg = <0x01c6a000 0x1000>; + interrupts = <0 67 4>; + clocks = <&ahb1_gates 22>, <&spi2_clk>; + clock-names = "ahb", "mod"; + dmas = <&dma 25>, <&dma 25>; + dma-names = "rx", "tx"; + resets = <&ahb1_rst 22>; + status = "disabled"; + }; + + spi3: spi at 01c6b000 { + compatible = "allwinner,sun6i-a31-spi"; + reg = <0x01c6b000 0x1000>; + interrupts = <0 68 4>; + clocks = <&ahb1_gates 23>, <&spi3_clk>; + clock-names = "ahb", "mod"; + dmas = <&dma 26>, <&dma 26>; + dma-names = "rx", "tx"; + resets = <&ahb1_rst 23>; + status = "disabled"; + }; + + gic: interrupt-controller at 01c81000 { + compatible = "arm,cortex-a7-gic", "arm,cortex-a15-gic"; + reg = <0x01c81000 0x1000>, + <0x01c82000 0x1000>, + <0x01c84000 0x2000>, + <0x01c86000 0x2000>; + interrupt-controller; + #interrupt-cells = <3>; + interrupts = <1 9 0xf04>; + }; + + rtc: rtc at 01f00000 { + compatible = "allwinner,sun6i-a31-rtc"; + reg = <0x01f00000 0x54>; + interrupts = <0 40 4>, <0 41 4>; + }; + + nmi_intc: interrupt-controller at 01f00c0c { + compatible = "allwinner,sun6i-a31-sc-nmi"; + interrupt-controller; + #interrupt-cells = <2>; + reg = <0x01f00c0c 0x38>; + interrupts = <0 32 4>; + }; + + prcm at 01f01400 { + compatible = "allwinner,sun6i-a31-prcm"; + reg = <0x01f01400 0x200>; + + ar100: ar100_clk { + compatible = "allwinner,sun6i-a31-ar100-clk"; + #clock-cells = <0>; + clocks = <&osc32k>, <&osc24M>, <&pll6>, <&pll6>; + clock-output-names = "ar100"; + }; + + ahb0: ahb0_clk { + compatible = "fixed-factor-clock"; + #clock-cells = <0>; + clock-div = <1>; + clock-mult = <1>; + clocks = <&ar100>; + clock-output-names = "ahb0"; + }; + + apb0: apb0_clk { + compatible = "allwinner,sun6i-a31-apb0-clk"; + #clock-cells = <0>; + clocks = <&ahb0>; + clock-output-names = "apb0"; + }; + + apb0_gates: apb0_gates_clk { + compatible = "allwinner,sun6i-a31-apb0-gates-clk"; + #clock-cells = <1>; + clocks = <&apb0>; + clock-output-names = "apb0_pio", "apb0_ir", + "apb0_timer", "apb0_p2wi",arch/arm/boot/dts/sun6i-a31s.dtsi line 881
Quoted 10 lines
arch/arm/boot/dts/sun6i-a31s.dtsi new file +10
-0+ "apb0_uart", "apb0_1wire", + "apb0_i2c"; + }; + + ir_clk: ir_clk { + #clock-cells = <0>; + compatible = "allwinner,sun6i-a31-ir-clk"; + clocks = <&osc32k>, <&osc24M>; + clock-output-names = "ir"; + };This is yet to be agreed on....
Quoted 47 lines
arch/arm/boot/dts/sun6i-a31s.dtsi new file +44
-1+ + apb0_rst: apb0_rst { + compatible = "allwinner,sun6i-a31-clock-reset"; + #reset-cells = <1>; + }; + }; + + cpucfg at 01f01c00 { + compatible = "allwinner,sun6i-a31-cpuconfig"; + reg = <0x01f01c00 0x300>; + }; + + ir at 01f02000 { + compatible = "allwinner,sun5i-a13-ir"; + clocks = <&apb0_gates 1>, <&ir_clk>; + clock-names = "apb", "ir"; + resets = <&apb0_rst 1>; + interrupts = <0 37 4>; + reg = <0x01f02000 0x40>; + status = "disabled"; + }; + + r_pio: pinctrl at 01f02c00 { + compatible = "allwinner,sun6i-a31-r-pinctrl"; + reg = <0x01f02c00 0x400>; + interrupts = <0 45 4>, + <0 46 4>; + clocks = <&apb0_gates 0>; + resets = <&apb0_rst 0>; + gpio-controller; + interrupt-controller; + #interrupt-cells = <2>; + #size-cells = <0>; + #gpio-cells = <3>; + + ir_pins_a: ir at 0 { + allwinner,pins = "PL4"; + allwinner,function = "s_ir"; + allwinner,drive = <0>; + allwinner,pull = <0>; + }; + }; + }; +}; --2.1.0
PATCH 4/5 ARM: dts: sun6i: Add sun6i-a31s.dtsi
Hi,
Quoted 1 line · Chen-Yu Tsai
On Wed, Nov 26, 2014 at 2:18 AM, Maxime Ripard
<snip>
Quoted 21 lines
Quoted 21 lines
Quoted 20 lines
arch/arm/boot/dts/sun6i-a31s.dtsi new file +20
-0+ ahb1_gates: clk at 01c20060 { + #clock-cells = <1>; + compatible = "allwinner,sun6i-a31-ahb1-gates-clk"; + reg = <0x01c20060 0x8>; + clocks = <&ahb1>; + clock-output-names = "ahb1_mipidsi", "ahb1_ss", + "ahb1_dma", "ahb1_mmc0", "ahb1_mmc1", + "ahb1_mmc2", "ahb1_mmc3", "ahb1_nand1", + "ahb1_nand0", "ahb1_sdram", + "ahb1_gmac", "ahb1_ts", "ahb1_hstimer", + "ahb1_spi0", "ahb1_spi1", "ahb1_spi2", + "ahb1_spi3", "ahb1_otg", "ahb1_ehci0", + "ahb1_ehci1", "ahb1_ohci0", + "ahb1_ohci1", "ahb1_ohci2", "ahb1_ve", + "ahb1_lcd0", "ahb1_lcd1", "ahb1_csi", + "ahb1_hdmi", "ahb1_de0", "ahb1_de1", + "ahb1_fe0", "ahb1_fe1", "ahb1_mp", + "ahb1_gpu", "ahb1_deu0", "ahb1_deu1", + "ahb1_drc0", "ahb1_drc1"; + };
Quoted 7 lines
Quoted 3 lines
Are the gates really identical?
As in not even stripped down?
According to the user manuals, the AHB1 gates on the A31s don't have GMAC (or EMAC in the manual) and MIPI DSI listed. Though it seems a lot of A31s hardware out there actually use GMAC.
Hmm, interesting I was focussing on the ohci2 gate when comparing them as the ohci2 is not listed in the pinmux.
The GMAC clock gate definitely actually is there, as I've an A31s based board with a working GMAC.
Also Allwinner has confirmed to me that the A31 and A31s are the same die, so there is no reason to differentiate between the 2 at this level. Either we do no differentiation at all, or only at the pinmux level to reflect that certain pins are simply just not there.
My vote goes to differentiating at the pinmux level.
Regards,
Hans
PATCH 4/5 ARM: dts: sun6i: Add sun6i-a31s.dtsi
Hi,
Quoted 66 lines · Hans de Goede
Hi,
Quoted 2 lines · Chen-Yu Tsai
On Wed, Nov 26, 2014 at 2:18 AM, Maxime Ripard
<snip>
Quoted 31 lines
Quoted 31 lines
Quoted 29 lines
arch/arm/boot/dts/sun6i-a31s.dtsi new file +7
-0+ ahb1_gates: clk at 01c20060 { + #clock-cells = <1>; + compatible = "allwinner,sun6i-a31-ahb1-gates-clk"; + reg = <0x01c20060 0x8>; + clocks = <&ahb1>; + clock-output-names = "ahb1_mipidsi", "ahb1_ss", + "ahb1_dma", "ahb1_mmc0","
ahb1_mmc1",
+ "ahb1_mmc2", "ahb1_mmc3",
"ahb1_nand1",(quoted diff) +2
-0+ "ahb1_nand0", "ahb1_sdram", + "ahb1_gmac", "ahb1_ts","
ahb1_hstimer",
+ "ahb1_spi0", "ahb1_spi1",
"ahb1_spi2",
+ "ahb1_spi3", "ahb1_otg",
"ahb1_ehci0",(quoted diff) +2
-0+ "ahb1_ehci1", "ahb1_ohci0", + "ahb1_ohci1", "ahb1_ohci2","
ahb1_ve",
+ "ahb1_lcd0", "ahb1_lcd1",
"ahb1_csi",
+ "ahb1_hdmi", "ahb1_de0",
"ahb1_de1",(quoted diff) +2
-0+ "ahb1_fe0", "ahb1_fe1", "ahb1_mp", + "ahb1_gpu", "ahb1_deu0","
ahb1_deu1",(quoted diff) +2
-0+ "ahb1_drc0", "ahb1_drc1"; + };Quoted 8 lines
Quoted 3 lines
Are the gates really identical?
As in not even stripped down?
According to the user manuals, the AHB1 gates on the A31s don't have GMAC (or EMAC in the manual) and MIPI DSI listed. Though it seems a lot of A31s hardware out there actually use GMAC.
Hmm, interesting I was focussing on the ohci2 gate when comparing them as the ohci2 is not listed in the pinmux.
The GMAC clock gate definitely actually is there, as I've an A31s based board
with a working GMAC.Also Allwinner has confirmed to me that the A31 and A31s are the same die, so
there is no reason to differentiate between the 2 at this level. Either we do
no differentiation at all, or only at the pinmux level to reflect that certain
pins are simply just not there.
Quoted 1 line
My vote goes to differentiating at the pinmux level.
I agree. Since it is confirmed the dies are the same, the hardware description should be the same as well, except for the external differences (pinmux). Only downside is a slightly bloated DTB containing nodes we will never use on the a31s.
IIRC, Allwinner's kernel treats them as the same as well.
ChenYu
PATCH 4/5 ARM: dts: sun6i: Add sun6i-a31s.dtsi
Quoted 25 lines · Chen-Yu Tsai
Quoted 25 lines
Quoted 8 lines
Quoted 3 lines
Are the gates really identical?
As in not even stripped down?
According to the user manuals, the AHB1 gates on the A31s don't have GMAC (or EMAC in the manual) and MIPI DSI listed. Though it seems a lot of A31s hardware out there actually use GMAC.
Hmm, interesting I was focussing on the ohci2 gate when comparing them as the ohci2 is not listed in the pinmux.
The GMAC clock gate definitely actually is there, as I've an A31s based board
with a working GMAC.Also Allwinner has confirmed to me that the A31 and A31s are the same die, so
there is no reason to differentiate between the 2 at this level. Either we do
no differentiation at all, or only at the pinmux level to reflect that certain
pins are simply just not there.
Quoted 6 lines
Quoted 1 line
My vote goes to differentiating at the pinmux level.
I agree. Since it is confirmed the dies are the same, the hardware description should be the same as well, except for the external differences (pinmux). Only downside is a slightly bloated DTB containing nodes we will never use on the a31s.
Or we can have a sun6i.dtsi that lists all the hardware, and have the sun6i-a31.dtsi and sun6i-a31s.dtsi that only define the various pinmuxes.
That way we would avoid duplication, especially if they are identical, while reducing the useless bloat too.
Maxime
Signature · 10 lines
Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20141204/314dc822/attachment.sig>
[linux-sunxi] Re: [PATCH 4/5] ARM: dts: sun6i: Add sun6i-a31s.dtsi
In reply to Maxime RipardHi,
Quoted 10 lines · Maxime Ripard
Hi,
Quoted 7 lines · Hans de Goede
Add a dtsi file for A31s based boards. This is a copy of
sun6i-a31.dtsi, with:(quoted diff) +0
-2-The main pinctrl compatible changed to allwinner,sun6i-a31s.dtsi -The ohci2 controller is present according to the data-sheet, but not routed to the outside, so remove it from the dtsi as having an always disabled node is not useful.
Quoted 7 lines
Quoted 2 lines
All the other nodes present in the original
sun6i-a31.dtsiare present in the A31s too, and are 100% compatible.Then maybe duplicating the DT isn't worth it then.
Creating a
sun6i.dtsiand including that from both the A31 and A31s seems more like an appropriate solution.
So to be clear, we would get:
sun6i.dtsi, which has everything which is currently in sun6i-a31.dtsi, minus the compatible for the main pinctrl node.
sun6i-a31.dtsi, which includes sun6i.dtsi, and sets the compatible for the main pinctrl node.
sun6i-a31s.dtsi, idem.
BTW as for the 100% compatible thing, I've gotten confirmation from Allwinner that the A31 and A31s are the same die in a different package.
This also explains why when working on DRAM controller support for the A31s I noticed that the auto-detect code for the A31 worked fine, and figured out there was only one channel without any issues, the second channel actually is there, it is just not routed to the outside.
Which brings us to the question should we differentiate between them at all ? I think that from a pinctrl pov it makes sense to differentiate, and that for the rest we should try not to needlessly differentiate.
Quoted 8 lines
Quoted 8 lines
Signed-off-by Hans de Goede <[email protected]>--- arch/arm/boot/dts/sun6i-a31s.dtsi | 925 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 925 insertions(+)create mode 100644
arch/arm/boot/dts/sun6i-a31s.dtsi
Quoted 12 lines
arch/arm/boot/dts/sun6i-a31s.dtsi line 4
Quoted 10 lines
arch/arm/boot/dts/sun6i-a31s.dtsi new file +4
-0@@ -0,0 +1,925 @@ +/* + * Copyright 2013 Maxime Ripard + * + * Maxime Ripard <[email protected]>It should be your copyright here.
Same discussion as before, if I copy a file you authored it still is yours _copy_right wise :)
Quoted 22 lines
Quoted 11 lines
arch/arm/boot/dts/sun6i-a31s.dtsi new file +10
-0+ * + * This file is dual-licensed: you can use it either under the terms + * of the GPL or the X11 license, at your option. Note that this dual + * licensing only applies to this file, and not this project as a + * whole. + * + * a) This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version.arch/arm/boot/dts/sun6i-a31s.dtsi line 24
Quoted 10 lines
arch/arm/boot/dts/sun6i-a31s.dtsi new file +10
-0+ * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this library; if not, write to the Free + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + * MA 02110-1301 USA
Quoted 1 line
There was an issue with the wording of the license, s/library/file/
Ok. Is this already fixed in dts-for-3.19 ? Currently this patch-set is based on 3.18 + some cherry picked patches from dts-for-3.19, if this is fixed there, I guess I need to cherry pick some more to avoid conflicts.
Quoted 53 lines
Quoted 40 lines
arch/arm/boot/dts/sun6i-a31s.dtsi new file +39
-0+ * + * Or, alternatively, + * + * b) Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ + +/include/ "skeleton.dtsi" + +/ { + interrupt-parent = <&gic>; + + aliases { + serial0 = &uart0; + serial1 = &uart1; + serial2 = &uart2; + serial3 = &uart3; + serial4 = &uart4; + serial5 = &uart5; + ethernet0 = &gmac; + };arch/arm/boot/dts/sun6i-a31s.dtsi line 73
Quoted 10 lines
arch/arm/boot/dts/sun6i-a31s.dtsi new file +10
-0+ + chosen { + #address-cells = <1>; + #size-cells = <1>; + ranges; + + framebuffer at 0 { + compatible = "allwinner,simple-framebuffer", "simple-framebuffer"; + allwinner,pipeline = "de_be0-lcd0-hdmi"; + clocks = <&pll6>;pll6 uses an argument now
Quoted 8 lines
arch/arm/boot/dts/sun6i-a31s.dtsi line 79
Quoted 6 lines
arch/arm/boot/dts/sun6i-a31s.dtsi new file +6
-0+ status = "disabled"; + }; + }; + + cpus { + enable-method = "allwinner,sun6i-a31";allwinner,sun6i-a31s I guess?
Although this is not a "compatible" I would like to treat it as such and just keep this as "allwinner,sun6i-a31", as it is 100% compatible.
Quoted 128 lines
Quoted 128 lines
arch/arm/boot/dts/sun6i-a31s.dtsi new file +127
-0+ #address-cells = <1>; + #size-cells = <0>; + + cpu at 0 { + compatible = "arm,cortex-a7"; + device_type = "cpu"; + reg = <0>; + }; + + cpu at 1 { + compatible = "arm,cortex-a7"; + device_type = "cpu"; + reg = <1>; + }; + + cpu at 2 { + compatible = "arm,cortex-a7"; + device_type = "cpu"; + reg = <2>; + }; + + cpu at 3 { + compatible = "arm,cortex-a7"; + device_type = "cpu"; + reg = <3>; + }; + }; + + memory { + reg = <0x40000000 0x80000000>; + }; + + pmu { + compatible = "arm,cortex-a7-pmu", "arm,cortex-a15-pmu"; + interrupts = <0 120 4>, + <0 121 4>, + <0 122 4>, + <0 123 4>; + }; + + clocks { + #address-cells = <1>; + #size-cells = <1>; + ranges; + + osc24M: osc24M { + #clock-cells = <0>; + compatible = "fixed-clock"; + clock-frequency = <24000000>; + }; + + osc32k: clk at 0 { + #clock-cells = <0>; + compatible = "fixed-clock"; + clock-frequency = <32768>; + clock-output-names = "osc32k"; + }; + + pll1: clk at 01c20000 { + #clock-cells = <0>; + compatible = "allwinner,sun6i-a31-pll1-clk"; + reg = <0x01c20000 0x4>; + clocks = <&osc24M>; + clock-output-names = "pll1"; + }; + + pll6: clk at 01c20028 { + #clock-cells = <0>; + compatible = "allwinner,sun6i-a31-pll6-clk"; + reg = <0x01c20028 0x4>; + clocks = <&osc24M>; + clock-output-names = "pll6"; + }; + + cpu: cpu at 01c20050 { + #clock-cells = <0>; + compatible = "allwinner,sun4i-a10-cpu-clk"; + reg = <0x01c20050 0x4>; + + /* + * PLL1 is listed twice here. + * While it looks suspicious, it's actually documented + * that way both in the datasheet and in the code from + * Allwinner. + */ + clocks = <&osc32k>, <&osc24M>, <&pll1>, <&pll1>; + clock-output-names = "cpu"; + }; + + axi: axi at 01c20050 { + #clock-cells = <0>; + compatible = "allwinner,sun4i-a10-axi-clk"; + reg = <0x01c20050 0x4>; + clocks = <&cpu>; + clock-output-names = "axi"; + }; + + ahb1_mux: ahb1_mux at 01c20054 { + #clock-cells = <0>; + compatible = "allwinner,sun6i-a31-ahb1-mux-clk"; + reg = <0x01c20054 0x4>; + clocks = <&osc32k>, <&osc24M>, <&axi>, <&pll6>; + clock-output-names = "ahb1_mux"; + }; + + ahb1: ahb1 at 01c20054 { + #clock-cells = <0>; + compatible = "allwinner,sun4i-a10-ahb-clk"; + reg = <0x01c20054 0x4>; + clocks = <&ahb1_mux>; + clock-output-names = "ahb1"; + }; + + ahb1_gates: clk at 01c20060 { + #clock-cells = <1>; + compatible = "allwinner,sun6i-a31-ahb1-gates-clk"; + reg = <0x01c20060 0x8>; + clocks = <&ahb1>; + clock-output-names = "ahb1_mipidsi", "ahb1_ss", + "ahb1_dma", "ahb1_mmc0", "ahb1_mmc1", + "ahb1_mmc2", "ahb1_mmc3", "ahb1_nand1", + "ahb1_nand0", "ahb1_sdram", + "ahb1_gmac", "ahb1_ts", "ahb1_hstimer", + "ahb1_spi0", "ahb1_spi1", "ahb1_spi2", + "ahb1_spi3", "ahb1_otg", "ahb1_ehci0", + "ahb1_ehci1", "ahb1_ohci0", + "ahb1_ohci1", "ahb1_ohci2", "ahb1_ve",
Quoted 8 lines
arch/arm/boot/dts/sun6i-a31s.dtsi line 212
Quoted 6 lines
arch/arm/boot/dts/sun6i-a31s.dtsi new file +6
-0+ "ahb1_lcd0", "ahb1_lcd1", "ahb1_csi", + "ahb1_hdmi", "ahb1_de0", "ahb1_de1", + "ahb1_fe0", "ahb1_fe1", "ahb1_mp", + "ahb1_gpu", "ahb1_deu0", "ahb1_deu1", + "ahb1_drc0", "ahb1_drc1"; + };Are the gates really identical?
According to the user manual, yes.
Quoted 1 line
As in not even stripped down?
Yep, it is the same die.
Quoted 315 lines
Quoted 315 lines
arch/arm/boot/dts/sun6i-a31s.dtsi new file +314
-0+ apb1: apb1 at 01c20054 { + #clock-cells = <0>; + compatible = "allwinner,sun4i-a10-apb0-clk"; + reg = <0x01c20054 0x4>; + clocks = <&ahb1>; + clock-output-names = "apb1"; + }; + + apb1_gates: clk at 01c20068 { + #clock-cells = <1>; + compatible = "allwinner,sun6i-a31-apb1-gates-clk"; + reg = <0x01c20068 0x4>; + clocks = <&apb1>; + clock-output-names = "apb1_codec", "apb1_digital_mic", + "apb1_pio", "apb1_daudio0", + "apb1_daudio1"; + }; + + apb2_mux: apb2_mux at 01c20058 { + #clock-cells = <0>; + compatible = "allwinner,sun4i-a10-apb1-mux-clk"; + reg = <0x01c20058 0x4>; + clocks = <&osc32k>, <&osc24M>, <&pll6>, <&pll6>; + clock-output-names = "apb2_mux"; + }; + + apb2: apb2 at 01c20058 { + #clock-cells = <0>; + compatible = "allwinner,sun6i-a31-apb2-div-clk"; + reg = <0x01c20058 0x4>; + clocks = <&apb2_mux>; + clock-output-names = "apb2"; + }; + + apb2_gates: clk at 01c2006c { + #clock-cells = <1>; + compatible = "allwinner,sun6i-a31-apb2-gates-clk"; + reg = <0x01c2006c 0x4>; + clocks = <&apb2>; + clock-output-names = "apb2_i2c0", "apb2_i2c1", + "apb2_i2c2", "apb2_i2c3", "apb2_uart0", + "apb2_uart1", "apb2_uart2", "apb2_uart3", + "apb2_uart4", "apb2_uart5"; + }; + + mmc0_clk: clk at 01c20088 { + #clock-cells = <0>; + compatible = "allwinner,sun4i-a10-mod0-clk"; + reg = <0x01c20088 0x4>; + clocks = <&osc24M>, <&pll6>; + clock-output-names = "mmc0"; + }; + + mmc1_clk: clk at 01c2008c { + #clock-cells = <0>; + compatible = "allwinner,sun4i-a10-mod0-clk"; + reg = <0x01c2008c 0x4>; + clocks = <&osc24M>, <&pll6>; + clock-output-names = "mmc1"; + }; + + mmc2_clk: clk at 01c20090 { + #clock-cells = <0>; + compatible = "allwinner,sun4i-a10-mod0-clk"; + reg = <0x01c20090 0x4>; + clocks = <&osc24M>, <&pll6>; + clock-output-names = "mmc2"; + }; + + mmc3_clk: clk at 01c20094 { + #clock-cells = <0>; + compatible = "allwinner,sun4i-a10-mod0-clk"; + reg = <0x01c20094 0x4>; + clocks = <&osc24M>, <&pll6>; + clock-output-names = "mmc3"; + }; + + spi0_clk: clk at 01c200a0 { + #clock-cells = <0>; + compatible = "allwinner,sun4i-a10-mod0-clk"; + reg = <0x01c200a0 0x4>; + clocks = <&osc24M>, <&pll6>; + clock-output-names = "spi0"; + }; + + spi1_clk: clk at 01c200a4 { + #clock-cells = <0>; + compatible = "allwinner,sun4i-a10-mod0-clk"; + reg = <0x01c200a4 0x4>; + clocks = <&osc24M>, <&pll6>; + clock-output-names = "spi1"; + }; + + spi2_clk: clk at 01c200a8 { + #clock-cells = <0>; + compatible = "allwinner,sun4i-a10-mod0-clk"; + reg = <0x01c200a8 0x4>; + clocks = <&osc24M>, <&pll6>; + clock-output-names = "spi2"; + }; + + spi3_clk: clk at 01c200ac { + #clock-cells = <0>; + compatible = "allwinner,sun4i-a10-mod0-clk"; + reg = <0x01c200ac 0x4>; + clocks = <&osc24M>, <&pll6>; + clock-output-names = "spi3"; + }; + + usb_clk: clk at 01c200cc { + #clock-cells = <1>; + #reset-cells = <1>; + compatible = "allwinner,sun6i-a31-usb-clk"; + reg = <0x01c200cc 0x4>; + clocks = <&osc24M>; + clock-output-names = "usb_phy0", "usb_phy1", "usb_phy2", + "usb_ohci0", "usb_ohci1", + "usb_ohci2"; + }; + + /* + * The following two are dummy clocks, placeholders used in the gmac_tx + * clock. The gmac driver will choose one parent depending on the PHY + * interface mode, using clk_set_rate auto-reparenting. + * The actual TX clock rate is not controlled by the gmac_tx clock. + */ + mii_phy_tx_clk: clk at 1 { + #clock-cells = <0>; + compatible = "fixed-clock"; + clock-frequency = <25000000>; + clock-output-names = "mii_phy_tx"; + }; + + gmac_int_tx_clk: clk at 2 { + #clock-cells = <0>; + compatible = "fixed-clock"; + clock-frequency = <125000000>; + clock-output-names = "gmac_int_tx"; + }; + + gmac_tx_clk: clk at 01c200d0 { + #clock-cells = <0>; + compatible = "allwinner,sun7i-a20-gmac-clk"; + reg = <0x01c200d0 0x4>; + clocks = <&mii_phy_tx_clk>, <&gmac_int_tx_clk>; + clock-output-names = "gmac_tx"; + }; + }; + + soc at 01c00000 { + compatible = "simple-bus"; + #address-cells = <1>; + #size-cells = <1>; + ranges; + + dma: dma-controller at 01c02000 { + compatible = "allwinner,sun6i-a31-dma"; + reg = <0x01c02000 0x1000>; + interrupts = <0 50 4>; + clocks = <&ahb1_gates 6>; + resets = <&ahb1_rst 6>; + #dma-cells = <1>; + }; + + mmc0: mmc at 01c0f000 { + compatible = "allwinner,sun5i-a13-mmc"; + reg = <0x01c0f000 0x1000>; + clocks = <&ahb1_gates 8>, <&mmc0_clk>; + clock-names = "ahb", "mmc"; + resets = <&ahb1_rst 8>; + reset-names = "ahb"; + interrupts = <0 60 4>; + status = "disabled"; + }; + + mmc1: mmc at 01c10000 { + compatible = "allwinner,sun5i-a13-mmc"; + reg = <0x01c10000 0x1000>; + clocks = <&ahb1_gates 9>, <&mmc1_clk>; + clock-names = "ahb", "mmc"; + resets = <&ahb1_rst 9>; + reset-names = "ahb"; + interrupts = <0 61 4>; + status = "disabled"; + }; + + mmc2: mmc at 01c11000 { + compatible = "allwinner,sun5i-a13-mmc"; + reg = <0x01c11000 0x1000>; + clocks = <&ahb1_gates 10>, <&mmc2_clk>; + clock-names = "ahb", "mmc"; + resets = <&ahb1_rst 10>; + reset-names = "ahb"; + interrupts = <0 62 4>; + status = "disabled"; + }; + + mmc3: mmc at 01c12000 { + compatible = "allwinner,sun5i-a13-mmc"; + reg = <0x01c12000 0x1000>; + clocks = <&ahb1_gates 11>, <&mmc3_clk>; + clock-names = "ahb", "mmc"; + resets = <&ahb1_rst 11>; + reset-names = "ahb"; + interrupts = <0 63 4>; + status = "disabled"; + }; + + usbphy: phy at 01c19400 { + compatible = "allwinner,sun6i-a31-usb-phy"; + reg = <0x01c19400 0x10>, + <0x01c1a800 0x4>, + <0x01c1b800 0x4>; + reg-names = "phy_ctrl", + "pmu1", + "pmu2"; + clocks = <&usb_clk 8>, + <&usb_clk 9>, + <&usb_clk 10>; + clock-names = "usb0_phy", + "usb1_phy", + "usb2_phy"; + resets = <&usb_clk 0>, + <&usb_clk 1>, + <&usb_clk 2>; + reset-names = "usb0_reset", + "usb1_reset", + "usb2_reset"; + status = "disabled"; + #phy-cells = <1>; + }; + + ehci0: usb at 01c1a000 { + compatible = "allwinner,sun6i-a31-ehci", "generic-ehci"; + reg = <0x01c1a000 0x100>; + interrupts = <0 72 4>; + clocks = <&ahb1_gates 26>; + resets = <&ahb1_rst 26>; + phys = <&usbphy 1>; + phy-names = "usb"; + status = "disabled"; + }; + + ohci0: usb at 01c1a400 { + compatible = "allwinner,sun6i-a31-ohci", "generic-ohci"; + reg = <0x01c1a400 0x100>; + interrupts = <0 73 4>; + clocks = <&ahb1_gates 29>, <&usb_clk 16>; + resets = <&ahb1_rst 29>; + phys = <&usbphy 1>; + phy-names = "usb"; + status = "disabled"; + }; + + ehci1: usb at 01c1b000 { + compatible = "allwinner,sun6i-a31-ehci", "generic-ehci"; + reg = <0x01c1b000 0x100>; + interrupts = <0 74 4>; + clocks = <&ahb1_gates 27>; + resets = <&ahb1_rst 27>; + phys = <&usbphy 2>; + phy-names = "usb"; + status = "disabled"; + }; + + ohci1: usb at 01c1b400 { + compatible = "allwinner,sun6i-a31-ohci", "generic-ohci"; + reg = <0x01c1b400 0x100>; + interrupts = <0 75 4>; + clocks = <&ahb1_gates 30>, <&usb_clk 17>; + resets = <&ahb1_rst 30>; + phys = <&usbphy 2>; + phy-names = "usb"; + status = "disabled"; + }; + + pio: pinctrl at 01c20800 { + compatible = "allwinner,sun6i-a31s-pinctrl"; + reg = <0x01c20800 0x400>; + interrupts = <0 11 4>, + <0 15 4>, + <0 16 4>, + <0 17 4>; + clocks = <&apb1_gates 5>; + gpio-controller; + interrupt-controller; + #interrupt-cells = <2>; + #size-cells = <0>; + #gpio-cells = <3>; + + uart0_pins_a: uart0 at 0 { + allwinner,pins = "PH20", "PH21"; + allwinner,function = "uart0"; + allwinner,drive = <0>; + allwinner,pull = <0>; + }; + + i2c0_pins_a: i2c0 at 0 { + allwinner,pins = "PH14", "PH15"; + allwinner,function = "i2c0"; + allwinner,drive = <0>; + allwinner,pull = <0>; + }; + + i2c1_pins_a: i2c1 at 0 { + allwinner,pins = "PH16", "PH17"; + allwinner,function = "i2c1"; + allwinner,drive = <0>; + allwinner,pull = <0>; + }; + + i2c2_pins_a: i2c2 at 0 { + allwinner,pins = "PH18", "PH19"; + allwinner,function = "i2c2";
Quoted 8 lines
arch/arm/boot/dts/sun6i-a31s.dtsi line 533
Quoted 6 lines
arch/arm/boot/dts/sun6i-a31s.dtsi new file +6
-0+ allwinner,drive = <0>; + allwinner,pull = <0>; + }; + + mmc0_pins_a: mmc0 at 0 { + allwinner,pins = "PF0","PF1","PF2","PF3","PF4","PF5";Spaces after the comma, and I guess that would be better on two lines.
Erm, as said in the commit message this is a copy, with all the shortcomings of the orginal. Anyways this become mute if we just rename sun6i-a31.dtsi to sun6i.dtsi as discussed, then we avoid the whole having 2 copies dance.
Quoted 343 lines
Quoted 343 lines
arch/arm/boot/dts/sun6i-a31s.dtsi new file +342
-0+ allwinner,function = "mmc0"; + allwinner,drive = <2>; + allwinner,pull = <0>; + }; + + gmac_pins_mii_a: gmac_mii at 0 { + allwinner,pins = "PA0", "PA1", "PA2", "PA3", + "PA8", "PA9", "PA11", + "PA12", "PA13", "PA14", "PA19", + "PA20", "PA21", "PA22", "PA23", + "PA24", "PA26", "PA27"; + allwinner,function = "gmac"; + allwinner,drive = <0>; + allwinner,pull = <0>; + }; + + gmac_pins_gmii_a: gmac_gmii at 0 { + allwinner,pins = "PA0", "PA1", "PA2", "PA3", + "PA4", "PA5", "PA6", "PA7", + "PA8", "PA9", "PA10", "PA11", + "PA12", "PA13", "PA14", "PA15", + "PA16", "PA17", "PA18", "PA19", + "PA20", "PA21", "PA22", "PA23", + "PA24", "PA25", "PA26", "PA27"; + allwinner,function = "gmac"; + /* + * data lines in GMII mode run at 125MHz and + * might need a higher signal drive strength + */ + allwinner,drive = <2>; + allwinner,pull = <0>; + }; + + gmac_pins_rgmii_a: gmac_rgmii at 0 { + allwinner,pins = "PA0", "PA1", "PA2", "PA3", + "PA9", "PA10", "PA11", + "PA12", "PA13", "PA14", "PA19", + "PA20", "PA25", "PA26", "PA27"; + allwinner,function = "gmac"; + /* + * data lines in RGMII mode use DDR mode + * and need a higher signal drive strength + */ + allwinner,drive = <3>; + allwinner,pull = <0>; + }; + }; + + ahb1_rst: reset at 01c202c0 { + #reset-cells = <1>; + compatible = "allwinner,sun6i-a31-ahb1-reset"; + reg = <0x01c202c0 0xc>; + }; + + apb1_rst: reset at 01c202d0 { + #reset-cells = <1>; + compatible = "allwinner,sun6i-a31-clock-reset"; + reg = <0x01c202d0 0x4>; + }; + + apb2_rst: reset at 01c202d8 { + #reset-cells = <1>; + compatible = "allwinner,sun6i-a31-clock-reset"; + reg = <0x01c202d8 0x4>; + }; + + timer at 01c20c00 { + compatible = "allwinner,sun4i-a10-timer"; + reg = <0x01c20c00 0xa0>; + interrupts = <0 18 4>, + <0 19 4>, + <0 20 4>, + <0 21 4>, + <0 22 4>; + clocks = <&osc24M>; + }; + + wdt1: watchdog at 01c20ca0 { + compatible = "allwinner,sun6i-a31-wdt"; + reg = <0x01c20ca0 0x20>; + }; + + uart0: serial at 01c28000 { + compatible = "snps,dw-apb-uart"; + reg = <0x01c28000 0x400>; + interrupts = <0 0 4>; + reg-shift = <2>; + reg-io-width = <4>; + clocks = <&apb2_gates 16>; + resets = <&apb2_rst 16>; + dmas = <&dma 6>, <&dma 6>; + dma-names = "rx", "tx"; + status = "disabled"; + }; + + uart1: serial at 01c28400 { + compatible = "snps,dw-apb-uart"; + reg = <0x01c28400 0x400>; + interrupts = <0 1 4>; + reg-shift = <2>; + reg-io-width = <4>; + clocks = <&apb2_gates 17>; + resets = <&apb2_rst 17>; + dmas = <&dma 7>, <&dma 7>; + dma-names = "rx", "tx"; + status = "disabled"; + }; + + uart2: serial at 01c28800 { + compatible = "snps,dw-apb-uart"; + reg = <0x01c28800 0x400>; + interrupts = <0 2 4>; + reg-shift = <2>; + reg-io-width = <4>; + clocks = <&apb2_gates 18>; + resets = <&apb2_rst 18>; + dmas = <&dma 8>, <&dma 8>; + dma-names = "rx", "tx"; + status = "disabled"; + }; + + uart3: serial at 01c28c00 { + compatible = "snps,dw-apb-uart"; + reg = <0x01c28c00 0x400>; + interrupts = <0 3 4>; + reg-shift = <2>; + reg-io-width = <4>; + clocks = <&apb2_gates 19>; + resets = <&apb2_rst 19>; + dmas = <&dma 9>, <&dma 9>; + dma-names = "rx", "tx"; + status = "disabled"; + }; + + uart4: serial at 01c29000 { + compatible = "snps,dw-apb-uart"; + reg = <0x01c29000 0x400>; + interrupts = <0 4 4>; + reg-shift = <2>; + reg-io-width = <4>; + clocks = <&apb2_gates 20>; + resets = <&apb2_rst 20>; + dmas = <&dma 10>, <&dma 10>; + dma-names = "rx", "tx"; + status = "disabled"; + }; + + uart5: serial at 01c29400 { + compatible = "snps,dw-apb-uart"; + reg = <0x01c29400 0x400>; + interrupts = <0 5 4>; + reg-shift = <2>; + reg-io-width = <4>; + clocks = <&apb2_gates 21>; + resets = <&apb2_rst 21>; + dmas = <&dma 22>, <&dma 22>; + dma-names = "rx", "tx"; + status = "disabled"; + }; + + i2c0: i2c at 01c2ac00 { + compatible = "allwinner,sun6i-a31-i2c"; + reg = <0x01c2ac00 0x400>; + interrupts = <0 6 4>; + clocks = <&apb2_gates 0>; + resets = <&apb2_rst 0>; + status = "disabled"; + #address-cells = <1>; + #size-cells = <0>; + }; + + i2c1: i2c at 01c2b000 { + compatible = "allwinner,sun6i-a31-i2c"; + reg = <0x01c2b000 0x400>; + interrupts = <0 7 4>; + clocks = <&apb2_gates 1>; + resets = <&apb2_rst 1>; + status = "disabled"; + #address-cells = <1>; + #size-cells = <0>; + }; + + i2c2: i2c at 01c2b400 { + compatible = "allwinner,sun6i-a31-i2c"; + reg = <0x01c2b400 0x400>; + interrupts = <0 8 4>; + clocks = <&apb2_gates 2>; + resets = <&apb2_rst 2>; + status = "disabled"; + #address-cells = <1>; + #size-cells = <0>; + }; + + i2c3: i2c at 01c2b800 { + compatible = "allwinner,sun6i-a31-i2c"; + reg = <0x01c2b800 0x400>; + interrupts = <0 9 4>; + clocks = <&apb2_gates 3>; + resets = <&apb2_rst 3>; + status = "disabled"; + #address-cells = <1>; + #size-cells = <0>; + }; + + gmac: ethernet at 01c30000 { + compatible = "allwinner,sun7i-a20-gmac"; + reg = <0x01c30000 0x1054>; + interrupts = <0 82 4>; + interrupt-names = "macirq"; + clocks = <&ahb1_gates 17>, <&gmac_tx_clk>; + clock-names = "stmmaceth", "allwinner_gmac_tx"; + resets = <&ahb1_rst 17>; + reset-names = "stmmaceth"; + snps,pbl = <2>; + snps,fixed-burst; + snps,force_sf_dma_mode; + status = "disabled"; + #address-cells = <1>; + #size-cells = <0>; + }; + + timer at 01c60000 { + compatible = "allwinner,sun6i-a31-hstimer", "allwinner,sun7i-a20-hstimer"; + reg = <0x01c60000 0x1000>; + interrupts = <0 51 4>, + <0 52 4>, + <0 53 4>, + <0 54 4>; + clocks = <&ahb1_gates 19>; + resets = <&ahb1_rst 19>; + }; + + spi0: spi at 01c68000 { + compatible = "allwinner,sun6i-a31-spi"; + reg = <0x01c68000 0x1000>; + interrupts = <0 65 4>; + clocks = <&ahb1_gates 20>, <&spi0_clk>; + clock-names = "ahb", "mod"; + dmas = <&dma 23>, <&dma 23>; + dma-names = "rx", "tx"; + resets = <&ahb1_rst 20>; + status = "disabled"; + }; + + spi1: spi at 01c69000 { + compatible = "allwinner,sun6i-a31-spi"; + reg = <0x01c69000 0x1000>; + interrupts = <0 66 4>; + clocks = <&ahb1_gates 21>, <&spi1_clk>; + clock-names = "ahb", "mod"; + dmas = <&dma 24>, <&dma 24>; + dma-names = "rx", "tx"; + resets = <&ahb1_rst 21>; + status = "disabled"; + }; + + spi2: spi at 01c6a000 { + compatible = "allwinner,sun6i-a31-spi"; + reg = <0x01c6a000 0x1000>; + interrupts = <0 67 4>; + clocks = <&ahb1_gates 22>, <&spi2_clk>; + clock-names = "ahb", "mod"; + dmas = <&dma 25>, <&dma 25>; + dma-names = "rx", "tx"; + resets = <&ahb1_rst 22>; + status = "disabled"; + }; + + spi3: spi at 01c6b000 { + compatible = "allwinner,sun6i-a31-spi"; + reg = <0x01c6b000 0x1000>; + interrupts = <0 68 4>; + clocks = <&ahb1_gates 23>, <&spi3_clk>; + clock-names = "ahb", "mod"; + dmas = <&dma 26>, <&dma 26>; + dma-names = "rx", "tx"; + resets = <&ahb1_rst 23>; + status = "disabled"; + }; + + gic: interrupt-controller at 01c81000 { + compatible = "arm,cortex-a7-gic", "arm,cortex-a15-gic"; + reg = <0x01c81000 0x1000>, + <0x01c82000 0x1000>, + <0x01c84000 0x2000>, + <0x01c86000 0x2000>; + interrupt-controller; + #interrupt-cells = <3>; + interrupts = <1 9 0xf04>; + }; + + rtc: rtc at 01f00000 { + compatible = "allwinner,sun6i-a31-rtc"; + reg = <0x01f00000 0x54>; + interrupts = <0 40 4>, <0 41 4>; + }; + + nmi_intc: interrupt-controller at 01f00c0c { + compatible = "allwinner,sun6i-a31-sc-nmi"; + interrupt-controller; + #interrupt-cells = <2>; + reg = <0x01f00c0c 0x38>; + interrupts = <0 32 4>; + }; + + prcm at 01f01400 { + compatible = "allwinner,sun6i-a31-prcm"; + reg = <0x01f01400 0x200>; + + ar100: ar100_clk { + compatible = "allwinner,sun6i-a31-ar100-clk"; + #clock-cells = <0>; + clocks = <&osc32k>, <&osc24M>, <&pll6>, <&pll6>; + clock-output-names = "ar100"; + }; + + ahb0: ahb0_clk { + compatible = "fixed-factor-clock"; + #clock-cells = <0>; + clock-div = <1>; + clock-mult = <1>; + clocks = <&ar100>; + clock-output-names = "ahb0"; + }; + + apb0: apb0_clk { + compatible = "allwinner,sun6i-a31-apb0-clk"; + #clock-cells = <0>; + clocks = <&ahb0>; + clock-output-names = "apb0"; + }; + + apb0_gates: apb0_gates_clk { + compatible = "allwinner,sun6i-a31-apb0-gates-clk"; + #clock-cells = <1>; + clocks = <&apb0>; + clock-output-names = "apb0_pio", "apb0_ir", + "apb0_timer", "apb0_p2wi", + "apb0_uart", "apb0_1wire", + "apb0_i2c"; + }; +
Quoted 8 lines
arch/arm/boot/dts/sun6i-a31s.dtsi line 881
Quoted 6 lines
arch/arm/boot/dts/sun6i-a31s.dtsi new file +6
-0+ ir_clk: ir_clk { + #clock-cells = <0>; + compatible = "allwinner,sun6i-a31-ir-clk"; + clocks = <&osc32k>, <&osc24M>; + clock-output-names = "ir"; + };This is yet to be agreed on....
Ack, copy / paste error, will drop.
Quoted 40 lines
Quoted 40 lines
arch/arm/boot/dts/sun6i-a31s.dtsi new file +39
-0+ + apb0_rst: apb0_rst { + compatible = "allwinner,sun6i-a31-clock-reset"; + #reset-cells = <1>; + }; + }; + + cpucfg at 01f01c00 { + compatible = "allwinner,sun6i-a31-cpuconfig"; + reg = <0x01f01c00 0x300>; + }; + + ir at 01f02000 { + compatible = "allwinner,sun5i-a13-ir"; + clocks = <&apb0_gates 1>, <&ir_clk>; + clock-names = "apb", "ir"; + resets = <&apb0_rst 1>; + interrupts = <0 37 4>; + reg = <0x01f02000 0x40>; + status = "disabled"; + }; + + r_pio: pinctrl at 01f02c00 { + compatible = "allwinner,sun6i-a31-r-pinctrl"; + reg = <0x01f02c00 0x400>; + interrupts = <0 45 4>, + <0 46 4>; + clocks = <&apb0_gates 0>; + resets = <&apb0_rst 0>; + gpio-controller; + interrupt-controller; + #interrupt-cells = <2>; + #size-cells = <0>; + #gpio-cells = <3>; + + ir_pins_a: ir at 0 { + allwinner,pins = "PL4"; + allwinner,function = "s_ir"; + allwinner,drive = <0>;
Quoted 9 lines
Quoted 8 lines
arch/arm/boot/dts/sun6i-a31s.dtsi new file +5
-1+ allwinner,pull = <0>; + }; + }; + }; +}; --2.1.0
Regards,
Hans
PATCH 5/5 ARM: dts: sun6i: Add dts file for CSQ CS908 board
In reply to Hans de GoedeThe CSQ CS908 is an A31s based top-set box, with 1G RAM, 8G NAND, rtl8188etv usb wifi, 2 USB A receptacles (1 connected through the OTG controller), ethernet, 3.5 mm jack with a/v out and hdmi out:
Note it has no sdcard slot and therefore can only be fel booted.
--- arch/arm/boot/dts/Makefile | 3 +- arch/arm/boot/dts/sun6i-a31s-cs908.dts | 109 +++++++++++++++++++++++++++++++++ 2 files changed, 111 insertions(+), 1 deletion(-) create mode 100644 arch/arm/boot/dts/sun6i-a31s-cs908.dts
arch/arm/boot/dts/Makefile +2 -1
@@ -434,7 +434,8 @@ dtb-$(CONFIG_MACH_SUN6I) += \ sun6i-a31-app4-evb1.dtb \ sun6i-a31-colombus.dtb \ sun6i-a31-hummingbird.dtb \ - sun6i-a31-m9.dtb + sun6i-a31-m9.dtb \ + sun6i-a31s-cs908.dtb dtb-$(CONFIG_MACH_SUN7I) += \ sun7i-a20-bananapi.dtb \ sun7i-a20-cubieboard2.dtb \
arch/arm/boot/dts/sun6i-a31s-cs908.dts new file +109 -0
109 lines not on this page · raw message
Signature · 1 line
2.1.0
PATCH 5/5 ARM: dts: sun6i: Add dts file for CSQ CS908 board
Quoted 7 lines · Hans de Goede
The CSQ CS908 is an A31s based top-set box, with 1G RAM, 8G NAND, rtl8188etv usb wifi, 2 USB A receptacles (1 connected through the OTG controller), ethernet, 3.5 mm jack with a/v out and hdmi out:
Note it has no sdcard slot and therefore can only be fel booted.
Thanks a lot for working on this!
I also bought another board with an A31s, but it ended up having neither USB OTG or MMC, which rendered it pretty useless.
I wonder wether to put URL in the commit log is the right thing though. It's most likely to be dead in a very near future. The cover letter would be a better fit for that.
Quoted 39 lines
Signed-off-by Hans de Goede <[email protected]>--- arch/arm/boot/dts/Makefile | 3 +- arch/arm/boot/dts/sun6i-a31s-cs908.dts | 109 +++++++++++++++++++++++++++++++++ 2 files changed, 111 insertions(+), 1 deletion(-) create mode 100644 arch/arm/boot/dts/sun6i-a31s-cs908.dtsarch/arm/boot/dts/Makefile +2
-1@@ -434,7 +434,8 @@ dtb-$(CONFIG_MACH_SUN6I) += \ sun6i-a31-app4-evb1.dtb \ sun6i-a31-colombus.dtb \ sun6i-a31-hummingbird.dtb \ - sun6i-a31-m9.dtb + sun6i-a31-m9.dtb \ + sun6i-a31s-cs908.dtb dtb-$(CONFIG_MACH_SUN7I) += \ sun7i-a20-bananapi.dtb \ sun7i-a20-cubieboard2.dtb \arch/arm/boot/dts/sun6i-a31s-cs908.dts new file +12
-0@@ -0,0 +1,109 @@ +/* + * Copyright 2014 Hans de Goede <[email protected]> + * + * This file is dual-licensed: you can use it either under the terms + * of the GPL or the X11 license, at your option. Note that this dual + * licensing only applies to this file, and not this project as a + * whole. + * + * a) This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version.
arch/arm/boot/dts/sun6i-a31s-cs908.dts line 22
Quoted 10 lines
arch/arm/boot/dts/sun6i-a31s-cs908.dts new file +10
-0+ * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this library; if not, write to the Free + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + * MA 02110-1301 USA
s/library/file/
Quoted 20 lines
arch/arm/boot/dts/sun6i-a31s-cs908.dts new file +20
-0+ * + * Or, alternatively, + * + * b) Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
arch/arm/boot/dts/sun6i-a31s-cs908.dts line 52
Quoted 10 lines
arch/arm/boot/dts/sun6i-a31s-cs908.dts new file +10
-0+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ + +/dts-v1/; +/include/ "sun6i-a31s.dtsi" + +/ { + model = "CSQ CS908 top set box";
Shouldn't it be Set Top Box instead?
Quoted 60 lines
arch/arm/boot/dts/sun6i-a31s-cs908.dts new file +57
-0+ compatible = "csq,cs908", "allwinner,sun6i-a31s"; + + chosen { + bootargs = "earlyprintk console=ttyS0,115200"; + }; + + soc at 01c00000 { + usbphy: phy at 01c19400 { + status = "okay"; + }; + + ehci0: usb at 01c1a000 { + status = "okay"; + }; + + ehci1: usb at 01c1b000 { + status = "okay"; + }; + + ohci1: usb at 01c1b400 { + status = "okay"; + }; + + pio: pinctrl at 01c20800 { + usb1_vbus_pin_csq908: usb1_vbus_pin at 0 { + allwinner,pins = "PC27"; + allwinner,function = "gpio_out"; + allwinner,drive = <0>; + allwinner,pull = <0>; + }; + }; + + uart0: serial at 01c28000 { + pinctrl-names = "default"; + pinctrl-0 = <&uart0_pins_a>; + status = "okay"; + }; + + gmac: ethernet at 01c30000 { + pinctrl-names = "default"; + pinctrl-0 = <&gmac_pins_mii_a>; + phy = <&phy1>; + phy-mode = "mii"; + status = "okay"; + + phy1: ethernet-phy at 1 { + reg = <1>; + }; + }; + + ir at 01f02000 { + pinctrl-names = "default"; + pinctrl-0 = <&ir_pins_a>; + status = "okay"; + }; + }; +};Signature · 1 line
2.1.0
Signature · 10 lines
Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20141125/bbfb9e7d/attachment.sig>
PATCH 5/5 ARM: dts: sun6i: Add dts file for CSQ CS908 board
Hi,
Quoted 5 lines · Maxime Ripard
Quoted 4 lines · Hans de Goede
The CSQ CS908 is an A31s based top-set box, with 1G RAM, 8G NAND, rtl8188etv usb wifi, 2 USB A receptacles (1 connected through the OTG controller), ethernet, 3.5 mm jack with a/v out and hdmi out:
Quoted 8 lines
Quoted 3 lines
Note it has no sdcard slot and therefore can only be fel booted.
Thanks a lot for working on this!
I also bought another board with an A31s, but it ended up having neither USB OTG or MMC, which rendered it pretty useless.
Are you sure ? The cs908 also does not have an otg connector, as said it has 2 usb-a receptacles, with the following usb "routing":
usb0 (otg): usb-a receptacle 1 (labeled 1 on the box, 0 on the print) usb1 (ehci): routed to internal wifi
usb2 (ehci): usb-a receptacle 2 (labeled 2 on both the box and the print)
I'm using fel mode with an usb-a <-> usb-a cable connected to usb0 on the cs908. The cs908 has no fel button, so I've hooked up the serial console, and then keep 2 pressed on the serial console while inserting the usb-a into the PC (which will also power the board). boot0 from the nand will then jump into fel mode when it sees the 2 keypress.
This was an interesting exercise to confirm that everything on the A31s just works with A31 code, but now that is confirms A31s devices are not all that interesting anymore :)
Quoted 3 lines
I wonder wether to put URL in the commit log is the right thing though. It's most likely to be dead in a very near future. The cover letter would be a better fit for that.
Ok, I'll drop it from the commit message.
Regards,
Hans
Quoted 147 lines
Quoted 40 lines
Signed-off-by Hans de Goede <[email protected]>--- arch/arm/boot/dts/Makefile | 3 +- arch/arm/boot/dts/sun6i-a31s-cs908.dts | 109 +++++++++++++++++++++++++++++++++ 2 files changed, 111 insertions(+), 1 deletion(-)create mode 100644
arch/arm/boot/dts/sun6i-a31s-cs908.dtsarch/arm/boot/dts/Makefile +2
-1@@ -434,7 +434,8 @@ dtb-$(CONFIG_MACH_SUN6I) += \ sun6i-a31-app4-evb1.dtb \ sun6i-a31-colombus.dtb \ sun6i-a31-hummingbird.dtb \ - sun6i-a31-m9.dtb + sun6i-a31-m9.dtb \ + sun6i-a31s-cs908.dtb dtb-$(CONFIG_MACH_SUN7I) += \ sun7i-a20-bananapi.dtb \ sun7i-a20-cubieboard2.dtb \arch/arm/boot/dts/sun6i-a31s-cs908.dts new file +12
-0@@ -0,0 +1,109 @@ +/* + * Copyright 2014 Hans de Goede <[email protected]> + * + * This file is dual-licensed: you can use it either under the terms + * of the GPL or the X11 license, at your option. Note that this dual + * licensing only applies to this file, and not this project as a + * whole. + * + * a) This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version.arch/arm/boot/dts/sun6i-a31s-cs908.dts line 22
Quoted 10 lines
arch/arm/boot/dts/sun6i-a31s-cs908.dts new file +10
-0+ * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this library; if not, write to the Free + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + * MA 02110-1301 USAs/library/file/
Quoted 20 lines
arch/arm/boot/dts/sun6i-a31s-cs908.dts new file +20
-0+ * + * Or, alternatively, + * + * b) Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,arch/arm/boot/dts/sun6i-a31s-cs908.dts line 52
Quoted 10 lines
arch/arm/boot/dts/sun6i-a31s-cs908.dts new file +10
-0+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ + +/dts-v1/; +/include/ "sun6i-a31s.dtsi" + +/ { + model = "CSQ CS908 top set box";Shouldn't it be Set Top Box instead?
Quoted 60 lines
arch/arm/boot/dts/sun6i-a31s-cs908.dts new file +57
-1+ compatible = "csq,cs908", "allwinner,sun6i-a31s"; + + chosen { + bootargs = "earlyprintk console=ttyS0,115200"; + }; + + soc at 01c00000 { + usbphy: phy at 01c19400 { + status = "okay"; + }; + + ehci0: usb at 01c1a000 { + status = "okay"; + }; + + ehci1: usb at 01c1b000 { + status = "okay"; + }; + + ohci1: usb at 01c1b400 { + status = "okay"; + }; + + pio: pinctrl at 01c20800 { + usb1_vbus_pin_csq908: usb1_vbus_pin at 0 { + allwinner,pins = "PC27"; + allwinner,function = "gpio_out"; + allwinner,drive = <0>; + allwinner,pull = <0>; + }; + }; + + uart0: serial at 01c28000 { + pinctrl-names = "default"; + pinctrl-0 = <&uart0_pins_a>; + status = "okay"; + }; + + gmac: ethernet at 01c30000 { + pinctrl-names = "default"; + pinctrl-0 = <&gmac_pins_mii_a>; + phy = <&phy1>; + phy-mode = "mii"; + status = "okay"; + + phy1: ethernet-phy at 1 { + reg = <1>; + }; + }; + + ir at 01f02000 { + pinctrl-names = "default"; + pinctrl-0 = <&ir_pins_a>; + status = "okay"; + }; + }; +}; --2.1.0
PATCH 5/5 ARM: dts: sun6i: Add dts file for CSQ CS908 board
Hi,
Quoted 30 lines · Hans de Goede
Hi,
Quoted 5 lines · Maxime Ripard
Quoted 4 lines · Hans de Goede
The CSQ CS908 is an A31s based top-set box, with 1G RAM, 8G NAND, rtl8188etv usb wifi, 2 USB A receptacles (1 connected through the OTG controller), ethernet, 3.5 mm jack with a/v out and hdmi out:
Quoted 8 lines
Quoted 3 lines
Note it has no sdcard slot and therefore can only be fel booted.
Thanks a lot for working on this!
I also bought another board with an A31s, but it ended up having neither USB OTG or MMC, which rendered it pretty useless.
Are you sure ? The cs908 also does not have an otg connector, as said it has 2 usb-a receptacles, with the following usb "routing":
usb0 (otg): usb-a receptacle 1 (labeled 1 on the box, 0 on the print) usb1 (ehci): routed to internal wifi
usb2 (ehci): usb-a receptacle 2 (labeled 2 on both the box and the print)I'm using fel mode with an usb-a <-> usb-a cable connected to usb0 on the cs908. The cs908 has no fel button, so I've hooked up the serial console, and then keep 2 pressed on the serial console while inserting the usb-a into the PC (which will also power the board). boot0 from the nand will then jump into fel mode when it sees the 2 keypress.
Quoted 3 lines
This was an interesting exercise to confirm that everything on the A31s just works with A31 code, but now that is confirms A31s devices are not all that interesting anymore :)
Ah, that's very interesting... I'll dig this board out then, and try both USB-A connector. It might very well be just that.
Thanks!
Maxime
Signature · 10 lines
Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20141204/c7df56da/attachment.sig>
A message that is not in the archive (sent off-list or not yet received): [email protected]
Re: Re: [PATCH 5/5] ARM: dts: sun6i: Add dts file for CSQ CS908 board
Quoted 5 lines
usb0 (otg): usb-a receptacle 1 (labeled 1 on the box, 0 on the print) usb1 (ehci): routed to internal wifi
usb2 (ehci): usb-a receptacle 2 (labeled 2 on both the box and the print)
Quoted 9 lines
I'm using fel mode with an usb-a <-> usb-a cable connected to usb0 on the cs908. The cs908 has no fel button, so I've hooked up the serial console,
and then keep 2 pressed on the serial console while inserting the usb-a into
the PC (which will also power the board). boot0 from the nand will then jump
into fel mode when it sees the 2 keypress.
Hi Hans,
I'm looking to try this on my vidon box which like the cs908 doesn't have OTG
or a fel button. Just would like to confirm the wiring on the usb-a 2 usb-a male
cable. Are they connected one to one i.e. 5v <-> 5v, D+ <-> D+ etc or are the
data lines twisted. i.e. D+ <-> D- and vice versa?.
Good work with the A31 and A23 deliveries.
Thanks,
CK
Quoted 18 lines
This was an interesting exercise to confirm that everything on the A31s just
works with A31 code, but now that is confirms A31s devices are not all that interesting anymore :)I wonder wether to put URL in the commit log is the right thing
Quoted 3 lines
though. It's most likely to be dead in a very near future. The cover letter would be a better fit for that.
Ok, I'll drop it from the commit message.
Regards,
Hans
Signature · 3 lines
You received this message because you are subscribed to the Google Groups "linux-sunxi" group. To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/[email protected] For more options, visit https://groups.google.com/d/optout.
A message that is not in the archive (sent off-list or not yet received): CAEKpxBnm2w9pcuf_T1HaO8ACz+94U9G3MeYKNhtzph+9fPtPWg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org
Re: Re: [PATCH 5/5] ARM: dts: sun6i: Add dts file for CSQ CS908 board
Hi,
Quoted 17 lines · Code Kipper
Quoted 5 lines
usb0 (otg): usb-a receptacle 1 (labeled 1 on the box, 0 on the print) usb1 (ehci): routed to internal wifi
usb2 (ehci): usb-a receptacle 2 (labeled 2 on both the box and the print)Quoted 9 lines
I'm using fel mode with an usb-a <-> usb-a cable connected to usb0 on the cs908. The cs908 has no fel button, so I've hooked up the serial console,
and then keep 2 pressed on the serial console while inserting the usb-a into
the PC (which will also power the board). boot0 from the nand will then jump
into fel mode when it sees the 2 keypress.Hi Hans,
Quoted 7 lines
I'm looking to try this on my vidon box which like the cs908 doesn't have OTG
or a fel button. Just would like to confirm the wiring on the usb-a 2 usb-a male
cable. Are they connected one to one i.e. 5v <-> 5v, D+ <-> D+ etc or are the
data lines twisted. i.e. D+ <-> D- and vice versa?.
I don't know, I just picked a A <-> A cable out of my box with usb cables (some regular usb devices actually ship with an A receptacle instead of a B) used that and things just worked. So I would say whatever standard A <-> A cables are using.
Regards,
Hans
cover sun6i: Add A31s (pinctrl) support
In reply to Hans de GoedeQuoted 2 lines · Hans de Goede
I'm not sure if sunxi pinctrl patches go through Maxime's tree or Linus' tree, so I'll leave figuring out who takes what patches to you two.
The changes in drivers/pinctrl and arch/* are usually orthogonal (just Kconfig symbols and DTS changes, no cross calls or header files that break compilation etc) and then they can be applied orthogonally. I just put the pinctrl patch in my tree and the rest in the platform tree.
Yours,
Linus Walleij
cover sun6i: Add A31s (pinctrl) support
Hi,
Quoted 10 lines · Linus Walleij
Quoted 2 lines · Hans de Goede
I'm not sure if sunxi pinctrl patches go through Maxime's tree or Linus' tree, so I'll leave figuring out who takes what patches to you two.
The changes in
drivers/pinctrlandarch/*are usually orthogonal (justKconfigsymbols and DTS changes, no cross calls or header files that break compilation etc) and then they can be applied orthogonally. I just put the pinctrl patch in my tree and the rest in the platform tree.
Ok, note in case it was not clear there will be a v2, so please do not merge v1.
Thanks,
Hans