Skip to content

Commit 5ef6914

Browse files
EHfivelinusw
authored andcommitted
pinctrl: rockchip: fix pinmux bits for RK3328 GPIO3-B pins
The pinmux bits for GPIO3-B1 to GPIO3-B6 pins are not explicitly specified in RK3328 TRM, however we can get hint from pad name and its correspinding IOMUX setting for pins in interface descriptions. The correspinding IOMIX settings for these pins can be found in the same row next to occurrences of following pad names in RK3328 TRM. GPIO3-B1: IO_TSPd5m0_CIFdata5m0_GPIO3B1vccio6 GPIO3-B2: IO_TSPd6m0_CIFdata6m0_GPIO3B2vccio6 GPIO3-B3: IO_TSPd7m0_CIFdata7m0_GPIO3B3vccio6 GPIO3-B4: IO_CARDclkm0_GPIO3B4vccio6 GPIO3-B5: IO_CARDrstm0_GPIO3B5vccio6 GPIO3-B6: IO_CARDdetm0_GPIO3B6vccio6 Add pinmux data to rk3328_mux_recalced_data as mux register offset for these pins does not follow rockchip convention. Signed-off-by: Huang-Huang Bao <[email protected]> Reviewed-by: Heiko Stuebner <[email protected]> Fixes: 3818e4a ("pinctrl: rockchip: Add rk3328 pinctrl support") Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Linus Walleij <[email protected]>
1 parent e8448a6 commit 5ef6914

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed

drivers/pinctrl/pinctrl-rockchip.c

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -634,17 +634,68 @@ static struct rockchip_mux_recalced_data rk3308_mux_recalced_data[] = {
634634

635635
static struct rockchip_mux_recalced_data rk3328_mux_recalced_data[] = {
636636
{
637+
/* gpio2_b7_sel */
637638
.num = 2,
638639
.pin = 15,
639640
.reg = 0x28,
640641
.bit = 0,
641642
.mask = 0x7
642643
}, {
644+
/* gpio2_c7_sel */
643645
.num = 2,
644646
.pin = 23,
645647
.reg = 0x30,
646648
.bit = 14,
647649
.mask = 0x3
650+
}, {
651+
/* gpio3_b1_sel */
652+
.num = 3,
653+
.pin = 9,
654+
.reg = 0x44,
655+
.bit = 2,
656+
.mask = 0x3
657+
}, {
658+
/* gpio3_b2_sel */
659+
.num = 3,
660+
.pin = 10,
661+
.reg = 0x44,
662+
.bit = 4,
663+
.mask = 0x3
664+
}, {
665+
/* gpio3_b3_sel */
666+
.num = 3,
667+
.pin = 11,
668+
.reg = 0x44,
669+
.bit = 6,
670+
.mask = 0x3
671+
}, {
672+
/* gpio3_b4_sel */
673+
.num = 3,
674+
.pin = 12,
675+
.reg = 0x44,
676+
.bit = 8,
677+
.mask = 0x3
678+
}, {
679+
/* gpio3_b5_sel */
680+
.num = 3,
681+
.pin = 13,
682+
.reg = 0x44,
683+
.bit = 10,
684+
.mask = 0x3
685+
}, {
686+
/* gpio3_b6_sel */
687+
.num = 3,
688+
.pin = 14,
689+
.reg = 0x44,
690+
.bit = 12,
691+
.mask = 0x3
692+
}, {
693+
/* gpio3_b7_sel */
694+
.num = 3,
695+
.pin = 15,
696+
.reg = 0x44,
697+
.bit = 14,
698+
.mask = 0x3
648699
},
649700
};
650701

0 commit comments

Comments
 (0)