Date: Tue, 27 Aug 2019 17:59:09 +0000 (UTC) From: Emmanuel Vadot <manu@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351551 - head/sys/arm64/rockchip Message-ID: <201908271759.x7RHx9WL021540@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: manu Date: Tue Aug 27 17:59:09 2019 New Revision: 351551 URL: https://svnweb.freebsd.org/changeset/base/351551 Log: arm64: rk3328: pinctrl: Add gpio banks and fix iomux Since r351187 the pinctrl driver need to know the gpio bank as it directly attach the gpio driver to handle some setup that might be present in the dts, add the gpio banks table for rk3328. While here fix some IOMUX definition that prevented to boot on RK3328 as pinctrl wasn't configured correctly. Submitted by: mmel (original version) MFC after: 2 weeks MFC With: r351187 Modified: head/sys/arm64/rockchip/rk_pinctrl.c Modified: head/sys/arm64/rockchip/rk_pinctrl.c ============================================================================== --- head/sys/arm64/rockchip/rk_pinctrl.c Tue Aug 27 16:41:06 2019 (r351550) +++ head/sys/arm64/rockchip/rk_pinctrl.c Tue Aug 27 17:59:09 2019 (r351551) @@ -384,6 +384,13 @@ struct rk_pinctrl_conf rk3288_conf = { .get_syscon = rk3288_get_syscon, }; +static struct rk_pinctrl_gpio rk3328_gpio_bank[] = { + RK_GPIO(0, "gpio0"), + RK_GPIO(1, "gpio1"), + RK_GPIO(2, "gpio2"), + RK_GPIO(3, "gpio3"), +}; + static struct rk_pinctrl_bank rk3328_iomux_bank[] = { /* bank sub offs nbits */ RK_IOMUX(0, 0, 0x0000, 2), @@ -394,18 +401,14 @@ static struct rk_pinctrl_bank rk3328_iomux_bank[] = { RK_IOMUX(1, 1, 0x0014, 2), RK_IOMUX(1, 2, 0x0018, 2), RK_IOMUX(1, 3, 0x001C, 2), - RK_IOMUX(2, 0, 0xE000, 2), - RK_IOMUX(2, 1, 0xE004, 2), - RK_IOMUX(2, 2, 0xE008, 2), - RK_IOMUX(2, 3, 0xE00C, 2), - RK_IOMUX(3, 0, 0xE010, 2), - RK_IOMUX(3, 1, 0xE014, 2), - RK_IOMUX(3, 2, 0xE018, 2), - RK_IOMUX(3, 3, 0xE01C, 2), - RK_IOMUX(4, 0, 0xE020, 2), - RK_IOMUX(4, 1, 0xE024, 2), - RK_IOMUX(4, 2, 0xE028, 2), - RK_IOMUX(4, 3, 0xE02C, 2), + RK_IOMUX(2, 0, 0x0020, 2), + RK_IOMUX(2, 1, 0x0024, 3), + RK_IOMUX(2, 2, 0x002c, 3), + RK_IOMUX(2, 3, 0x0034, 2), + RK_IOMUX(3, 0, 0x0038, 3), + RK_IOMUX(3, 1, 0x0040, 3), + RK_IOMUX(3, 2, 0x0048, 2), + RK_IOMUX(3, 3, 0x004c, 2), }; static struct rk_pinctrl_pin_fixup rk3328_pin_fixup[] = { @@ -518,6 +521,8 @@ struct rk_pinctrl_conf rk3328_conf = { .npin_fixup = nitems(rk3328_pin_fixup), .pin_drive = rk3328_pin_drive, .npin_drive = nitems(rk3328_pin_drive), + .gpio_bank = rk3328_gpio_bank, + .ngpio_bank = nitems(rk3328_gpio_bank), .get_pd_offset = rk3328_get_pd_offset, .get_syscon = rk3328_get_syscon, };
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201908271759.x7RHx9WL021540>