Skip to content

Commit 157b604

Browse files
lucaceresoliSasha Levin
authored andcommitted
pinctrl: rockchip: fix RK3308 pinmux bits
[ Upstream commit 1f3e25a ] Some of the pinmuxing bits described in rk3308_mux_recalced_data are wrong, pointing to non-existing registers. Fix the entire table. Also add a comment in front of each entry with the same string that appears in the datasheet to make the table easier to compare with the docs. This fix has been tested on real hardware for the gpio3b3_sel entry. Fixes: 7825aeb ("pinctrl: rockchip: add rk3308 SoC support") Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Reviewed-by: Heiko Stuebner <heiko@sntech.de> Link: https://lore.kernel.org/r/20220420142432.248565-1-luca.ceresoli@bootlin.com Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent ead8a76 commit 157b604

File tree

1 file changed

+30
-15
lines changed

1 file changed

+30
-15
lines changed

drivers/pinctrl/pinctrl-rockchip.c

Lines changed: 30 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -663,95 +663,110 @@ static struct rockchip_mux_recalced_data rk3128_mux_recalced_data[] = {
663663

664664
static struct rockchip_mux_recalced_data rk3308_mux_recalced_data[] = {
665665
{
666+
/* gpio1b6_sel */
666667
.num = 1,
667668
.pin = 14,
668669
.reg = 0x28,
669670
.bit = 12,
670671
.mask = 0xf
671672
}, {
673+
/* gpio1b7_sel */
672674
.num = 1,
673675
.pin = 15,
674676
.reg = 0x2c,
675677
.bit = 0,
676678
.mask = 0x3
677679
}, {
680+
/* gpio1c2_sel */
678681
.num = 1,
679682
.pin = 18,
680683
.reg = 0x30,
681684
.bit = 4,
682685
.mask = 0xf
683686
}, {
687+
/* gpio1c3_sel */
684688
.num = 1,
685689
.pin = 19,
686690
.reg = 0x30,
687691
.bit = 8,
688692
.mask = 0xf
689693
}, {
694+
/* gpio1c4_sel */
690695
.num = 1,
691696
.pin = 20,
692697
.reg = 0x30,
693698
.bit = 12,
694699
.mask = 0xf
695700
}, {
701+
/* gpio1c5_sel */
696702
.num = 1,
697703
.pin = 21,
698704
.reg = 0x34,
699705
.bit = 0,
700706
.mask = 0xf
701707
}, {
708+
/* gpio1c6_sel */
702709
.num = 1,
703710
.pin = 22,
704711
.reg = 0x34,
705712
.bit = 4,
706713
.mask = 0xf
707714
}, {
715+
/* gpio1c7_sel */
708716
.num = 1,
709717
.pin = 23,
710718
.reg = 0x34,
711719
.bit = 8,
712720
.mask = 0xf
713721
}, {
722+
/* gpio3b4_sel */
714723
.num = 3,
715724
.pin = 12,
716725
.reg = 0x68,
717726
.bit = 8,
718727
.mask = 0xf
719728
}, {
729+
/* gpio3b5_sel */
720730
.num = 3,
721731
.pin = 13,
722732
.reg = 0x68,
723733
.bit = 12,
724734
.mask = 0xf
725735
}, {
736+
/* gpio2a2_sel */
726737
.num = 2,
727738
.pin = 2,
728-
.reg = 0x608,
729-
.bit = 0,
730-
.mask = 0x7
739+
.reg = 0x40,
740+
.bit = 4,
741+
.mask = 0x3
731742
}, {
743+
/* gpio2a3_sel */
732744
.num = 2,
733745
.pin = 3,
734-
.reg = 0x608,
735-
.bit = 4,
736-
.mask = 0x7
746+
.reg = 0x40,
747+
.bit = 6,
748+
.mask = 0x3
737749
}, {
750+
/* gpio2c0_sel */
738751
.num = 2,
739752
.pin = 16,
740-
.reg = 0x610,
741-
.bit = 8,
742-
.mask = 0x7
753+
.reg = 0x50,
754+
.bit = 0,
755+
.mask = 0x3
743756
}, {
757+
/* gpio3b2_sel */
744758
.num = 3,
745759
.pin = 10,
746-
.reg = 0x610,
747-
.bit = 0,
748-
.mask = 0x7
760+
.reg = 0x68,
761+
.bit = 4,
762+
.mask = 0x3
749763
}, {
764+
/* gpio3b3_sel */
750765
.num = 3,
751766
.pin = 11,
752-
.reg = 0x610,
753-
.bit = 4,
754-
.mask = 0x7
767+
.reg = 0x68,
768+
.bit = 6,
769+
.mask = 0x3
755770
},
756771
};
757772

0 commit comments

Comments
 (0)