Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753843AbbKWIVV (ORCPT ); Mon, 23 Nov 2015 03:21:21 -0500 Received: from mx0a-0016f401.pphosted.com ([67.231.148.174]:62978 "EHLO mx0a-0016f401.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753701AbbKWIVT (ORCPT ); Mon, 23 Nov 2015 03:21:19 -0500 Date: Mon, 23 Nov 2015 16:17:13 +0800 From: Jisheng Zhang To: Sebastian Hesselbarth CC: , , , , , , , , , Subject: Re: [PATCH 2/2] arm64: dts: berlin4ct: enable all i2c nodes for the STB board Message-ID: <20151123161713.509b3294@xhacker> In-Reply-To: <5652CA62.50602@gmail.com> References: <1448012821-7413-1-git-send-email-jszhang@marvell.com> <1448012821-7413-3-git-send-email-jszhang@marvell.com> <564F8E64.7020606@gmail.com> <20151123104958.09420cee@xhacker> <5652CA62.50602@gmail.com> X-Mailer: Claws Mail 3.13.0 (GTK+ 2.24.28; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2015-11-23_04:,, signatures=0 X-Proofpoint-Spam-Details: rule=inbound_notspam policy=inbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1507310000 definitions=main-1511230157 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2714 Lines: 74 On Mon, 23 Nov 2015 09:12:18 +0100 Sebastian Hesselbarth wrote: > On 23.11.2015 03:49, Jisheng Zhang wrote: > > On Fri, 20 Nov 2015 22:19:32 +0100 > > Sebastian Hesselbarth wrote: > >> On 20.11.2015 10:47, Jisheng Zhang wrote: > >>> Enable all i2c nodes for the Marvell berlin BG4CT STB board. > >>> > >>> Signed-off-by: Jisheng Zhang > >>> --- > >>> arch/arm64/boot/dts/marvell/berlin4ct-stb.dts | 50 +++++++++++++++++++++++++++ > >>> 1 file changed, 50 insertions(+) > >>> > >>> diff --git a/arch/arm64/boot/dts/marvell/berlin4ct-stb.dts b/arch/arm64/boot/dts/marvell/berlin4ct-stb.dts > >>> index 348c37e..9e8e2e0 100644 > >>> --- a/arch/arm64/boot/dts/marvell/berlin4ct-stb.dts > >>> +++ b/arch/arm64/boot/dts/marvell/berlin4ct-stb.dts > >>> @@ -61,6 +61,56 @@ > >>> }; > >>> }; > >>> > >>> +&avio_pinctrl { > >>> + twsi1_pmux: twsi1-pmux { > >>> + groups = "TX_EDDC_SCL", "TX_EDDC_SDA"; > >>> + function = "tx_eddc"; > >>> + }; > >> > >> Please keep the pinmux sub-nodes in the SoC dtsi as long > >> as they are not strictly board specific, i.e. gpios. > > > > Hmm, seems all boards configure this pin for EDDC usage, so it's fine > > to move to soc > > > >> > >>> +}; > >>> + > >>> +&i2c0 { > >>> + status = "okay"; > >>> + pinctrl-0 = <&twsi0_pmux>; > >>> + pinctrl-names = "default"; > >> > >> If there is only one (or a default) pinctrl-0 option for i2c0, > >> you can also move it to the SoC dtsi. > > > > Some board may not use i2c0, i2c2, i2c3 host and use the pin as gpio for other > > purpose. Considering the above twsi1_pmux usage, what's the better solution? > > move twsi1_pmux to soc's dtsi and leave i2c0, i2c2, i2c3 pinctrl in board dts? > > If some boards don't use i2cN, they do not enable the node in their > board dts. That is sufficient to not configure the pinmux as it will > only be set if a driver is loaded for that node. > > If there is only one or two different pinmux settings for a specific > function _always_ move the pinmux setting into SoC dtsi. If there is > a well known default out of two or more possible settings, we may also > have that pinmux as a default in the i2c node and only overwrite it > when we have a board that uses a different setting. Got it. Thanks for the detailed explanations. > > So, for i2c: Move all pinctrl/pinctrl-names properties to the SoC > dtsi. Will do in v2 when clk stuff is accepted. Thanks, Jisheng -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/