From patchwork Thu Jul 19 19:48:13 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 10535257 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id CB998600D0 for ; Thu, 19 Jul 2018 19:49:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BB81129D6A for ; Thu, 19 Jul 2018 19:49:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AFD2329D7A; Thu, 19 Jul 2018 19:49:17 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 1695C29D6A for ; Thu, 19 Jul 2018 19:49:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=J0QEMMC1CylxjGB7Xugkv3Zay7tZjndWHbufIYzHY24=; b=akl A/ZLSI+qR1m25B58m63phIEJdpRDOLqlGRNcBzIw5gAx5+PBzpfXdqcJRkcRCYrvtJKIbcMAWnudZ TRhRe3kpydW1o48FUa+jryBfBBGBIeJMQeGVOrPbd1KHFDXq6cQpWo+BAXex0KkmnbHnx2Xy8Qgf/ NFIkxNLMP900viIXDwUAtwX4wVS5ohGeMZRsMcfkqnOqGAuPwRK2vuCHgMgWkMyOmwX7hP1mH2WZ4 s++Lyp0mmKOLLnctnx13Y9RqoL+T/t0itNuElREVo9ygj7u+6w2f6LFpY/icQPQVvSfEzURBqJUC+ 19sj8SIcx0WIHUxteHeTQoiDZDiDUHw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fgEvI-000296-6T; Thu, 19 Jul 2018 19:49:12 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fgEvG-00028c-9h for linux-arm-kernel@bombadil.infradead.org; Thu, 19 Jul 2018 19:49:10 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Message-Id:Date:Subject:Cc:To:From: Sender:Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=n9Ic4JG7DXsZdaBlDen4GY6OcAZTBFNiv+u+wpP35cU=; b=TnmvnJSTwFOc0B2T4Zr8hjcZa ICslUWtFkfR40jDlzhtAVpLmvg6jqk0nGhQuBSRe2g0O2uP4cF3BuvYFaQooO+rO6I+mE13Y2EaeX WaVafZOHg+5oTobPPhquEEMuB4+NZsW9xB1jxKcx4bLzPNdMKCrfpztJ4Jrlt1/MUm+xBU5cvMRPm 9d1s0q3TTeQopgvgT99EQ2OCU6uF7QMk0K1lmZmYZaoGBpb/KNXzd9v5dE8EgrRGtKy1bVm312eLg 1499xTNDOy3+ViBtRFRTSth39ZHiS2srW+LgpAwWB3mLLwLHHQlXo19BFS7l/kP7BITH494l2Ztr6 Kfw4xHswQ==; Received: from relay10.mail.gandi.net ([217.70.178.230]) by casper.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fgEvD-0004Sg-3v for linux-arm-kernel@lists.infradead.org; Thu, 19 Jul 2018 19:49:08 +0000 Received: from w540.lan (2-224-242-101.ip172.fastwebnet.it [2.224.242.101]) (Authenticated sender: jacopo@jmondi.org) by relay10.mail.gandi.net (Postfix) with ESMTPSA id 9DDF924000B; Thu, 19 Jul 2018 19:48:22 +0000 (UTC) From: Jacopo Mondi To: shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, fabio.estevam@nxp.com, p.zabel@pengutronix.de Subject: [RFC] ARM: imx6q: add ENET_CLK_SEL mux option Date: Thu, 19 Jul 2018 21:48:13 +0200 Message-Id: <1532029693-22764-1-git-send-email-jacopo@jmondi.org> X-Mailer: git-send-email 2.7.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180719_204907_174912_D59E7092 X-CRM114-Status: GOOD ( 18.24 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jacopo Mondi , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This is just an attempt to set IOMUX_GPR1[21] bit... Not-Signed-off-by: Jacopo Mondi --- Hello imx people (recipients list comes from get_maintainer script) I'm very new to this platform, so pardon me if I'm asking a question here, more than sending an actual patch. Context: I have a board that needs bit 21 of register IOMUX_GPR1 set. This basically tells the SoC to use an internally generated clock as clock reference for the external PHY chip. I dug a bit in the imx pincontroller driver and in the imx6q/dl device trees, and I've found out that mmio-mux is used to control the IOMUX_GPR* registers. So I've copied what has been done here by Philipp in commit bc97e88ecd and added a new entry to the "mux-reg-masks" property and then referenced it with a new sub-node of the mmio-mux node. So far, I think I got it properly. Question is, how do I trigger the actual writing of that bit? Do I need to reference the newly introduced "enet_clk_mux" sub-node from the fec device node? Does the fec driver support muxes as the video-mux.c driver does? It doesn't seems to me :( Thanks for your time in replying to this j also: I know it's wrong adding this to imx6q.dtsi, please bear with it for now. --- arch/arm/boot/dts/imx6q.dtsi | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) -- 2.7.4 diff --git a/arch/arm/boot/dts/imx6q.dtsi b/arch/arm/boot/dts/imx6q.dtsi index 70483ce..4dd4d42 100644 --- a/arch/arm/boot/dts/imx6q.dtsi +++ b/arch/arm/boot/dts/imx6q.dtsi @@ -317,6 +317,11 @@ }; }; }; + + enet_clk_mux { + compatible = "enet-mux"; + mux-controls = <&mux 7>; + }; }; &hdmi { @@ -452,7 +457,8 @@ <0x0c 0x000000c0>, /* LVDS0_MUX_CTL */ <0x0c 0x00000300>, /* LVDS1_MUX_CTL */ <0x28 0x00000003>, /* DCIC1_MUX_CTL */ - <0x28 0x0000000c>; /* DCIC2_MUX_CTL */ + <0x28 0x0000000c>, /* DCIC2_MUX_CTL */ + <0x04 0x00200000>; /* ENET_CLK_SEL */ }; &vpu {