From owner-svn-src-head@freebsd.org Tue Aug 27 17:59:10 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7F551DB689; Tue, 27 Aug 2019 17:59:10 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46HxTB1wx3z48W3; Tue, 27 Aug 2019 17:59:10 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1EE98226F7; Tue, 27 Aug 2019 17:59:10 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x7RHx9K1021541; Tue, 27 Aug 2019 17:59:09 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7RHx9WL021540; Tue, 27 Aug 2019 17:59:09 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201908271759.x7RHx9WL021540@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Tue, 27 Aug 2019 17:59:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351551 - head/sys/arm64/rockchip X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/sys/arm64/rockchip X-SVN-Commit-Revision: 351551 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Aug 2019 17:59:10 -0000 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, };