Skip to content

Commit 1f3e25a

Browse files
lucaceresolilinusw
authored andcommitted
pinctrl: rockchip: fix RK3308 pinmux bits
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 <[email protected]> Reviewed-by: Heiko Stuebner <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Linus Walleij <[email protected]>
1 parent b3af859 commit 1f3e25a

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
@@ -457,95 +457,110 @@ static struct rockchip_mux_recalced_data rk3128_mux_recalced_data[] = {
457457

458458
static struct rockchip_mux_recalced_data rk3308_mux_recalced_data[] = {
459459
{
460+
/* gpio1b6_sel */
460461
.num = 1,
461462
.pin = 14,
462463
.reg = 0x28,
463464
.bit = 12,
464465
.mask = 0xf
465466
}, {
467+
/* gpio1b7_sel */
466468
.num = 1,
467469
.pin = 15,
468470
.reg = 0x2c,
469471
.bit = 0,
470472
.mask = 0x3
471473
}, {
474+
/* gpio1c2_sel */
472475
.num = 1,
473476
.pin = 18,
474477
.reg = 0x30,
475478
.bit = 4,
476479
.mask = 0xf
477480
}, {
481+
/* gpio1c3_sel */
478482
.num = 1,
479483
.pin = 19,
480484
.reg = 0x30,
481485
.bit = 8,
482486
.mask = 0xf
483487
}, {
488+
/* gpio1c4_sel */
484489
.num = 1,
485490
.pin = 20,
486491
.reg = 0x30,
487492
.bit = 12,
488493
.mask = 0xf
489494
}, {
495+
/* gpio1c5_sel */
490496
.num = 1,
491497
.pin = 21,
492498
.reg = 0x34,
493499
.bit = 0,
494500
.mask = 0xf
495501
}, {
502+
/* gpio1c6_sel */
496503
.num = 1,
497504
.pin = 22,
498505
.reg = 0x34,
499506
.bit = 4,
500507
.mask = 0xf
501508
}, {
509+
/* gpio1c7_sel */
502510
.num = 1,
503511
.pin = 23,
504512
.reg = 0x34,
505513
.bit = 8,
506514
.mask = 0xf
507515
}, {
516+
/* gpio3b4_sel */
508517
.num = 3,
509518
.pin = 12,
510519
.reg = 0x68,
511520
.bit = 8,
512521
.mask = 0xf
513522
}, {
523+
/* gpio3b5_sel */
514524
.num = 3,
515525
.pin = 13,
516526
.reg = 0x68,
517527
.bit = 12,
518528
.mask = 0xf
519529
}, {
530+
/* gpio2a2_sel */
520531
.num = 2,
521532
.pin = 2,
522-
.reg = 0x608,
523-
.bit = 0,
524-
.mask = 0x7
533+
.reg = 0x40,
534+
.bit = 4,
535+
.mask = 0x3
525536
}, {
537+
/* gpio2a3_sel */
526538
.num = 2,
527539
.pin = 3,
528-
.reg = 0x608,
529-
.bit = 4,
530-
.mask = 0x7
540+
.reg = 0x40,
541+
.bit = 6,
542+
.mask = 0x3
531543
}, {
544+
/* gpio2c0_sel */
532545
.num = 2,
533546
.pin = 16,
534-
.reg = 0x610,
535-
.bit = 8,
536-
.mask = 0x7
547+
.reg = 0x50,
548+
.bit = 0,
549+
.mask = 0x3
537550
}, {
551+
/* gpio3b2_sel */
538552
.num = 3,
539553
.pin = 10,
540-
.reg = 0x610,
541-
.bit = 0,
542-
.mask = 0x7
554+
.reg = 0x68,
555+
.bit = 4,
556+
.mask = 0x3
543557
}, {
558+
/* gpio3b3_sel */
544559
.num = 3,
545560
.pin = 11,
546-
.reg = 0x610,
547-
.bit = 4,
548-
.mask = 0x7
561+
.reg = 0x68,
562+
.bit = 6,
563+
.mask = 0x3
549564
},
550565
};
551566

0 commit comments

Comments
 (0)