pinctrl: sunxi: Fix H616 I2S3 pin data
Subsystems (3)
PATCH 1/1 pinctrl: sunxi: Fix H616 I2S3 pin data
Two bugs have sneaked in the H616 pinctrl data:
- PH9 uses the mux value of 0x3 twice (one should be 0x5 instead)
- PH8 and PH9 use the "i2s3" function name twice in each pin
For the double pin name we use the same trick we pulled for i2s0: append the pin function to the group name to designate the special function.
--- drivers/pinctrl/sunxi/pinctrl-sun50i-h616.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/pinctrl/sunxi/pinctrl-sun50i-h616.c +4 -4
@@ -363,16 +363,16 @@ static const struct sunxi_desc_pin h616_pins[] = { SUNXI_FUNCTION(0x0, "gpio_in"), SUNXI_FUNCTION(0x1, "gpio_out"), SUNXI_FUNCTION(0x2, "uart2"), /* CTS */ - SUNXI_FUNCTION(0x3, "i2s3"), /* DO0 */ + SUNXI_FUNCTION(0x3, "i2s3_dout0"), /* DO0 */ SUNXI_FUNCTION(0x4, "spi1"), /* MISO */ - SUNXI_FUNCTION(0x5, "i2s3"), /* DI1 */ + SUNXI_FUNCTION(0x5, "i2s3_din1"), /* DI1 */ SUNXI_FUNCTION_IRQ_BANK(0x6, 6, 8)), /* PH_EINT8 */SUNXI_PIN (SUNXI_PINCTRL_PIN (H ,9 ),SUNXI_FUNCTION (0x0 ,"gpio_in" ),SUNXI_FUNCTION (0x1 ,"gpio_out" ), -SUNXI_FUNCTION (0x3 ,"i2s3" ),/* DI0 */ +SUNXI_FUNCTION (0x3 ,"i2s3_din0" ),/* DI0 */ SUNXI_FUNCTION (0x4 ,"spi1" ),/* CS1 */ -SUNXI_FUNCTION (0x3 ,"i2s3" ),/* DO1 */ +SUNXI_FUNCTION (0x5 ,"i2s3_dout1" ),/* DO1 */ SUNXI_FUNCTION_IRQ_BANK (0x6 ,6 ,9 )),/* PH_EINT9 */ SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 10), SUNXI_FUNCTION(0x0, "gpio_in"),
Signature · 1 line
2.17.6
Quoted 10 lines · Andre Przywara
Two bugs have sneaked in the H616 pinctrl data:
- PH9 uses the mux value of0x3twice (one should be0x5instead)
- PH8 and PH9 use the "i2s3" function name twice in each pinFor the double pin name we use the same trick we pulled for i2s0: append the pin function to the group name to designate the special function.
Fixes 25adc29407fb ("pinctrl: sunxi: Add support for the Allwinner H616 pin controller")Reported-by SASANO Takayoshi <[email protected]>Signed-off-by Andre Przywara <[email protected]>
Verified against the manual, which ironically also has the function numbers
wrong: it lists two function 4's (and no function 5) for each pin in port H.
Quoted 30 lines
--- drivers/pinctrl/sunxi/pinctrl-sun50i-h616.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)drivers/pinctrl/sunxi/pinctrl-sun50i-h616.c +4
-4@@ -363,16 +363,16 @@ static const struct sunxi_desc_pin h616_pins[] = { SUNXI_FUNCTION(0x0, "gpio_in"), SUNXI_FUNCTION(0x1, "gpio_out"), SUNXI_FUNCTION(0x2, "uart2"), /* CTS */ - SUNXI_FUNCTION(0x3, "i2s3"), /* DO0 */ + SUNXI_FUNCTION(0x3, "i2s3_dout0"), /* DO0 */ SUNXI_FUNCTION(0x4, "spi1"), /* MISO */ - SUNXI_FUNCTION(0x5, "i2s3"), /* DI1 */ + SUNXI_FUNCTION(0x5, "i2s3_din1"), /* DI1 */ SUNXI_FUNCTION_IRQ_BANK(0x6, 6, 8)), /* PH_EINT8 */SUNXI_PIN (SUNXI_PINCTRL_PIN (H ,9 ),SUNXI_FUNCTION (0x0 ,"gpio_in" ),SUNXI_FUNCTION (0x1 ,"gpio_out" ), -SUNXI_FUNCTION (0x3 ,"i2s3" ),/* DI0 */ +SUNXI_FUNCTION (0x3 ,"i2s3_din0" ),/* DI0 */ SUNXI_FUNCTION (0x4 ,"spi1" ),/* CS1 */ -SUNXI_FUNCTION (0x3 ,"i2s3" ),/* DO1 */ +SUNXI_FUNCTION (0x5 ,"i2s3_dout1" ),/* DO1 */ SUNXI_FUNCTION_IRQ_BANK (0x6 ,6 ,9 )),/* PH_EINT9 */ SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 10), SUNXI_FUNCTION(0x0, "gpio_in"),
Hi Andre!
Dne sreda, 05. januar 2022 ob 18:29:52 CET je Andre Przywara napisal(a):
Quoted 10 lines
Two bugs have sneaked in the H616 pinctrl data:
- PH9 uses the mux value of0x3twice (one should be0x5instead)
- PH8 and PH9 use the "i2s3" function name twice in each pinFor the double pin name we use the same trick we pulled for i2s0: append the pin function to the group name to designate the special function.
Fixes 25adc29407fb ("pinctrl: sunxi: Add support for the Allwinner H616 pincontroller") Reported-by: SASANO Takayoshi <[email protected]>
Signed-off-by Andre Przywara <[email protected]>
Best regards,
Jernej
Quoted 10 lines · Andre Przywara
Two bugs have sneaked in the H616 pinctrl data:
- PH9 uses the mux value of0x3twice (one should be0x5instead)
- PH8 and PH9 use the "i2s3" function name twice in each pinFor the double pin name we use the same trick we pulled for i2s0: append the pin function to the group name to designate the special function.
Fixes 25adc29407fb ("pinctrl: sunxi: Add support for the Allwinner H616 pin controller")Reported-by SASANO Takayoshi <[email protected]>Signed-off-by Andre Przywara <[email protected]>
Patch applied for fixes.
Yours,
Linus Walleij