From patchwork Wed Jul 31 07:56:33 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 11067217 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A40951395 for ; Wed, 31 Jul 2019 07:57:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8EFB1288CF for ; Wed, 31 Jul 2019 07:57:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 81AD7288D4; Wed, 31 Jul 2019 07:57:04 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED 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 094FA288CF for ; Wed, 31 Jul 2019 07:57:04 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=WfzvCxvQN5pElqq6FxRHVeoFYmb/8aPrp5aPF9nqR2o=; b=UAhE3Ci48jaMUo 8spFi7NPWaICAio0AKdo11ubmERx74E9PrdsZCNOzLUfPLgXY6RodZB32CGWINyZvfLmt70i8wtt4 CWnqP0JOcbN5McQm0ECgTyL557vooPhyR5lDay3dp6ERrAO0PxFOBOzMVCVJBXezVLXH26wiLHFx3 WOBLbK8qlAPMU/4NKAmPzjXAMnuBbUCCbZWVwsFrwkFdImvBKWBk4qOtGzHmdfSDm8Js/g0/TmMV5 ZC9hs1a/DlSoI2yEI9QC8ENSCGt1VLbaEST9HtMpwu+QMV6+R62CTh+CD6wCibZlvpHAA1EMk4eWc Y1VfnC1etOWlnLT04FHw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hsjTl-0003nN-KW; Wed, 31 Jul 2019 07:56:57 +0000 Received: from mail-wm1-f67.google.com ([209.85.128.67]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hsjTa-0003mw-Lh for linux-arm-kernel@lists.infradead.org; Wed, 31 Jul 2019 07:56:48 +0000 Received: by mail-wm1-f67.google.com with SMTP id u25so48534203wmc.4 for ; Wed, 31 Jul 2019 00:56:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=QU5L0vbXmLbZe0E3jBTU5NfJkkh9UqRqr6Mps/3EPOo=; b=esvgv1Hajh1iwxBnkvkMAq3iYMf5ayOTgxsWSvZVX7vSLlp4fnAWOpxR9I4vhF3NgK Lj2c7GMKrZs5MPvH4XnVlUNGdjXCbaOvIqHQkVxX3bWREzMNbjYpCjPTRUQNJTgHqRtT BbR9EbQuIu5vcVa+fXKKK3sJqozyasIJsQnLmopGF89SKXP1jFNIVOD8BaHxFGO4epQQ bKUCt3BPcOJLA0F8UmNqiGVyd4GbPHj+RBMl1NwGhfXijG6NvGCGzhrHYf9XvQ8+YZnL msJjvw0+ijOx6SX+igtazLLuoCYy+OsKHJwoOCcOSMV1OWP8+P8JxIjhrHNSYi+gr6wz 17+w== X-Gm-Message-State: APjAAAU0mX5IFrkwDj3a+e8UaPoGE5ct4HJcAbb3D/WtfaRKSnEqvYH/ rEVvNWYX4rPhOp3ZfB+dIsFSeLWYKBaUSguISGU= X-Google-Smtp-Source: APXvYqxI3SDVuWcUSNpHB6iYKBKkhycQn1kNJ3nJf+4smL6dxeHCwc7CUToIujG+dw8npCkbHpL8diEb42e4A0p/Wmg= X-Received: by 2002:a1c:1f4e:: with SMTP id f75mr106666180wmf.137.1564559804817; Wed, 31 Jul 2019 00:56:44 -0700 (PDT) MIME-Version: 1.0 References: <20190109140045.17449-1-marek.vasut@gmail.com> <20190109165822.tmj7qbho46f7clvg@verge.net.au> <1690279.yngTTxF0vm@avalon> <0d08d3c1-94ec-dcbe-ad3d-b079ab2ad17e@gmail.com> In-Reply-To: <0d08d3c1-94ec-dcbe-ad3d-b079ab2ad17e@gmail.com> From: Geert Uytterhoeven Date: Wed, 31 Jul 2019 09:56:33 +0200 Message-ID: Subject: DTC check_duplicate_node_names (was: Re: [PATCH] arm64: dts: renesas: r8a77990: ebisu: Fix backlight regulator numbering) To: Marek Vasut X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190731_005646_733505_17214E34 X-CRM114-Status: GOOD ( 20.86 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Laurent Pinchart , Rob Herring , Linux-Renesas , Wolfram Sang , Simon Horman , Laurent Pinchart , Frank Rowand , Linux ARM , Marek Vasut 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 Hi Marek, Bringing this to the attention of the DTC people... On Thu, Jan 10, 2019 at 3:38 PM Marek Vasut wrote: > On 1/10/19 1:59 PM, Laurent Pinchart wrote: > > On Wednesday, 9 January 2019 18:58:23 EET Simon Horman wrote: > >> On Wed, Jan 09, 2019 at 04:26:25PM +0100, Geert Uytterhoeven wrote: > >>> On Wed, Jan 9, 2019 at 3:01 PM wrote: > >>>> From: Marek Vasut > >>>> > >>>> There are two regulator1 nodes in the Ebisu DTS right now, one 3.3V for > >>>> the eMMC and one 12V for the backlight. This causes one to be > >>>> overwritten > >>>> by the other, ultimatelly resulting in inoperable eMMC, which depends on > >>>> the former. Fix this by renumbering the backlight regulator to > >>>> regulator2. > >>>> > >>>> Signed-off-by: Marek Vasut > >>>> Cc: Laurent Pinchart > >>>> Cc: Simon Horman > >>>> Cc: Wolfram Sang > >>>> Cc: linux-renesas-soc@vger.kernel.org > >>>> Reported-by: Simon Horman > >>>> Fixes: 9d16c4a10e07 ("arm64: dts: renesas: r8a77990: ebisu: Add > >>>> backlight") > >>> > >>> Reviewed-by: Geert Uytterhoeven > >>> > >>>> --- a/arch/arm64/boot/dts/renesas/r8a77990-ebisu.dts > >>>> +++ b/arch/arm64/boot/dts/renesas/r8a77990-ebisu.dts > >>>> @@ -191,7 +191,7 @@ > >>>> > >>>> clock-frequency = <24576000>; > >>>> > >>>> }; > >>>> > >>>> - reg_12p0v: regulator1 { > >>>> + reg_12p0v: regulator2 { > >>>> > >>>> compatible = "regulator-fixed"; > >>>> regulator-name = "D12.0V"; > >>>> regulator-min-microvolt = <12000000>; > >>> > >>> Perhaps the node name should get a more descriptive suffix > >>> (e.g. "regulator-12p0v"), like is already done for some of the other > >>> regulators? > >> > >> I think I would prefer that addressed in a follow-up patch. > > > > Agreed, but it would still be a very good idea. I think we need to standardize > > names for regulators, otherwise this is bound to happen again in the future. And so it did (patch sent for the same bug in r8a77995-draak.dts). > Isn't the YAML DT schema validator supposed to catch those problems ? > I'd even expect DTC to be able to catch such duplicate nodes and warn > about them. DTC indeed has check_duplicate_node_names. However, it only works for the base DTS, not for any later modifications in the board DTS. I.e. the original dup-nodename.dts in the DTC testsuite triggers an error, but the modified version below doesn't. Gr{oetje,eeting}s, Geert --- a/tests/dup-nodename.dts +++ b/tests/dup-nodename.dts @@ -1,8 +1,11 @@ /dts-v1/; +/ { +}; + / { node { }; node { }; };