From owner-svn-src-head@freebsd.org Tue Oct 31 11:29:17 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4C1F3E56047; Tue, 31 Oct 2017 11:29:17 +0000 (UTC) (envelope-from mizhka@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 mx1.freebsd.org (Postfix) with ESMTPS id 1AEE46FF43; Tue, 31 Oct 2017 11:29:17 +0000 (UTC) (envelope-from mizhka@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v9VBTGIq030580; Tue, 31 Oct 2017 11:29:16 GMT (envelope-from mizhka@FreeBSD.org) Received: (from mizhka@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v9VBTG2a030578; Tue, 31 Oct 2017 11:29:16 GMT (envelope-from mizhka@FreeBSD.org) Message-Id: <201710311129.v9VBTG2a030578@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mizhka set sender to mizhka@FreeBSD.org using -f From: Michael Zhilin Date: Tue, 31 Oct 2017 11:29:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325231 - head/sys/mips/mediatek X-SVN-Group: head X-SVN-Commit-Author: mizhka X-SVN-Commit-Paths: head/sys/mips/mediatek X-SVN-Commit-Revision: 325231 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.23 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, 31 Oct 2017 11:29:17 -0000 Author: mizhka Date: Tue Oct 31 11:29:16 2017 New Revision: 325231 URL: https://svnweb.freebsd.org/changeset/base/325231 Log: [mips] Pin control configuration for MediaTek RT2880 RT2880 is MIPS4Kc SoC used in many SOHO routers. This commits adds GPIO pin control configuration of RT2880. Submitted by: Hiroki Mori Reviewed by: mizhka, sgalabov Differential Revision: https://reviews.freebsd.org/D12648 Modified: head/sys/mips/mediatek/mtk_pinctrl.c head/sys/mips/mediatek/mtk_pinctrl.h Modified: head/sys/mips/mediatek/mtk_pinctrl.c ============================================================================== --- head/sys/mips/mediatek/mtk_pinctrl.c Tue Oct 31 11:09:39 2017 (r325230) +++ head/sys/mips/mediatek/mtk_pinctrl.c Tue Oct 31 11:29:16 2017 (r325231) @@ -169,6 +169,9 @@ mtk_pinctrl_configure(device_t dev, phandle_t cfgxref) socid = mtk_soc_get_socid(); switch (socid) { + case MTK_SOC_RT2880: + pintable = rt2880_pintable; + break; case MTK_SOC_RT3050: /* fallthrough */ case MTK_SOC_RT3052: case MTK_SOC_RT3350: Modified: head/sys/mips/mediatek/mtk_pinctrl.h ============================================================================== --- head/sys/mips/mediatek/mtk_pinctrl.h Tue Oct 31 11:09:39 2017 (r325230) +++ head/sys/mips/mediatek/mtk_pinctrl.h Tue Oct 31 11:29:16 2017 (r325231) @@ -118,6 +118,14 @@ DECL_FUNC(gex_func) = { FUNC("ge1", 0), FUNC("ge2", 0), FUNC("gpio", 1) }; +DECL_FUNC(rt2880_uartf_func) = { + FUNC("uartf", 0), FUNC("gpio", 1) +}; + +DECL_FUNC(rt2880_pci_func) = { + FUNC("pci", 0), FUNC("gpio", 1) +}; + DECL_FUNC(rt3883_pci_func) = { FUNC("pci-dev", 0), FUNC("pci-host2", 1), FUNC("pci-host1", 2), FUNC("pci-fnc", 3), FUNC("gpio", 7) @@ -295,6 +303,18 @@ DECL_TABLE(mt7620_pintable) = { GROUP("nd_sd", SYSCTL_GPIOMODE, 18, 3, nd_sd_func), GROUP("pa", SYSCTL_GPIOMODE, 20, 1, pa_func), GROUP("wdt", SYSCTL_GPIOMODE, 21, 3, wdt_func), + GROUP_END +}; + +DECL_TABLE(rt2880_pintable) = { + GROUP("i2c", SYSCTL_GPIOMODE, 0, 1, i2c_func), + GROUP("uartf", SYSCTL_GPIOMODE, 1, 1, rt2880_uartf_func), + GROUP("spi", SYSCTL_GPIOMODE, 2, 1, spi_func), + GROUP("uartlite", SYSCTL_GPIOMODE, 3, 1, uartlite_func), + GROUP("jtag", SYSCTL_GPIOMODE, 4, 1, jtag_func), + GROUP("mdio", SYSCTL_GPIOMODE, 5, 1, mdio_func), + GROUP("sdram", SYSCTL_GPIOMODE, 6, 1, sdram_func), + GROUP("pci", SYSCTL_GPIOMODE, 7, 1, rt2880_pci_func), GROUP_END };