Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp814599pxu; Fri, 11 Dec 2020 15:20:49 -0800 (PST) X-Google-Smtp-Source: ABdhPJzxv+t1Y1PcJf2ThnnnX2+Lv79NPhhzhPl+mL0bspKv+WOsz7a5sYrq6OMuJ5omgruVif5j X-Received: by 2002:a17:906:3687:: with SMTP id a7mr13004306ejc.210.1607728849274; Fri, 11 Dec 2020 15:20:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607728849; cv=none; d=google.com; s=arc-20160816; b=l1u0tlZ544dbOfUm5AgyCIGXuynx8z3iRiHG2wHbj1x38BGvGoOg/FnkIuuVI+LsUy Ae8jonGrJiMny5RmbFxJOnBHZBRrkVvFpHYiJ5JOg3O7lh2Dfc4oXlIaj6L6P2MAcbyn S++YRsX5jqaw/ebvPCzxO2XROgF50x4NanNqXKVjAKoCglma9CDdHVbkv957l8O3z1qe xhEF17QGdj3NQWvGG87p6wrb920Kw4LL2mxQEST7vpY1ZeNMSgl0YWRrA2vHdoFaT/FO 7tnsCl1niw3/vHjfgaZ3xn+4F53Yv7mGN5zl0/T1aRxXzdMmgK68GKj5ia96JbHmP7ZA Y+OA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=h/LFEJxN+y9atuUh2I6JGG7R8Sn2KE2ON0GObfP+qI0=; b=r5JzPZydez58Pe2/7qHiLMyxOwHm8Ox3F0ftLEr9WPWd+KgjTZ3lmkhdFtYjIZx9qD ezdn8c+1OYeALBJmxU5xgvtS8+N3sIY0jbYGbHnfZRJ+Ik/2RYRwLspZJ1O+psKGGa4L 7ITvy1QGtUAuqkz+ImRmLJ2yKwDYzufzrXFdFjdsGTy5Lzkxx16hKHrOscsc/Zm1qDWS UM7HQ2oxEC9rAe7DCkegepfErOMBSqkuHfNErVwADgkPcXlO0byS49JFsPr5Sr9S7pns Q6ffkvbAmMRq2ETQcEORnLrGWBeuulO96U0YUAc/i/xlMjKVBGNh9qKil5uHCjbjPYWQ Z/IQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=nCSZf3v9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v10si5429420eja.441.2020.12.11.15.20.26; Fri, 11 Dec 2020 15:20:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=nCSZf3v9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390493AbgLJXZo (ORCPT + 99 others); Thu, 10 Dec 2020 18:25:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46794 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727291AbgLJXZi (ORCPT ); Thu, 10 Dec 2020 18:25:38 -0500 Received: from mail-io1-xd44.google.com (mail-io1-xd44.google.com [IPv6:2607:f8b0:4864:20::d44]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F39C9C0613CF; Thu, 10 Dec 2020 15:24:57 -0800 (PST) Received: by mail-io1-xd44.google.com with SMTP id r9so7564620ioo.7; Thu, 10 Dec 2020 15:24:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=h/LFEJxN+y9atuUh2I6JGG7R8Sn2KE2ON0GObfP+qI0=; b=nCSZf3v9Ju3JnlXSqOOHaHEnYtbG81gWsxenvNMhmFMmQQtny6NEL927rs7RvwJoBT fjF1weC2UeqTnzot4hgdP04HtUBt59B0H/r923IfSVvPmmPjZ8uHyAFMQtePe2a3P0fJ RVJCN6U7WbVuh5sku6B42oiO0iYAlF8OSf+ZgTqNRwoFliL3uBZ7lkLIN9JIp/MyD+Lu JKm6V4mDXFcTxxIUQcPMMCh/3uWFi5zDLA/2gWIDCM4j/4Q6uK+Jau+DK+rkfqlYrkgr 9leTIMSJgG3IKTviJWh/5E++A9cSObIJTqVtSaW59Re08tqdTuNvB7kGVezycjdBDw1y nKHQ== 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=h/LFEJxN+y9atuUh2I6JGG7R8Sn2KE2ON0GObfP+qI0=; b=YpRZL7E77S0T/E4EUr3jLRm0p+WH4vWSM1SmVSOFUYrn2jViCYJfQ48GOczcIPiItc 8MBm8xrqrI7ZPfzYFLJL0s50WjpiRwwlLPKjEN3FJTH/7vsQxxiP6RaKJ5KYZ9Luu5lZ hxqvx3gmPEsXsMadkPmVFFBmPSJkqVC91Ai7UeJJJ0sWvk1opyEfC/LX18uCEj69b0g5 3wABrLmUnyvXd8/FAOtl6ymth8W4DOut6QZVXoPQXRDYzWzWTDB2xzzwzmtFBXEcMVXQ ldiKfeIi4L18apfClOpdDUE/2maac/aICM5YhA432QQgLVL9CCP6LxFiJiVdutW7FHTz LKfQ== X-Gm-Message-State: AOAM530pjg7PBUf7ZxDsSITdCKF0KzENduULFISDRK4z9c0RZTDYV9lB zOPKZdDd/6tn4yvygOzY5bV4UjlHoZi8r8gm9AU= X-Received: by 2002:a6b:7501:: with SMTP id l1mr11166527ioh.92.1607642696883; Thu, 10 Dec 2020 15:24:56 -0800 (PST) MIME-Version: 1.0 References: <1607324004-12960-1-git-send-email-shengjiu.wang@nxp.com> <20201207132140.GA31982@kozik-lap> <20201207133221.GA32877@kozik-lap> In-Reply-To: <20201207133221.GA32877@kozik-lap> From: Adam Ford Date: Thu, 10 Dec 2020 17:24:45 -0600 Message-ID: Subject: Re: [PATCH] arm64: dts: imx8mn: Fix duplicate node name To: Krzysztof Kozlowski Cc: Shengjiu Wang , devicetree , Shawn Guo , Sascha Hauer , Linux Kernel Mailing List , Rob Herring , NXP Linux Team , Sascha Hauer , Fabio Estevam , arm-soc Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Dec 7, 2020 at 7:36 AM Krzysztof Kozlowski wrote: > > On Mon, Dec 07, 2020 at 02:21:40PM +0100, Krzysztof Kozlowski wrote: > > On Mon, Dec 07, 2020 at 02:53:24PM +0800, Shengjiu Wang wrote: > > > Error log: > > > sysfs: cannot create duplicate filename '/bus/platform/devices/30000000.bus' > > > > > > The spba bus name is duplicate with aips bus name. > > > Refine spba bus name to fix this issue. > > > > > > Fixes: 970406eaef3a ("arm64: dts: imx8mn: Enable Asynchronous Sample Rate Converter") > > > Signed-off-by: Shengjiu Wang > > > --- > > > arch/arm64/boot/dts/freescale/imx8mn.dtsi | 2 +- > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > diff --git a/arch/arm64/boot/dts/freescale/imx8mn.dtsi b/arch/arm64/boot/dts/freescale/imx8mn.dtsi > > > index fd669c0f3fe5..30762eb4f0a7 100644 > > > --- a/arch/arm64/boot/dts/freescale/imx8mn.dtsi > > > +++ b/arch/arm64/boot/dts/freescale/imx8mn.dtsi > > > @@ -246,7 +246,7 @@ aips1: bus@30000000 { > > > #size-cells = <1>; > > > ranges; > > > > > > - spba: bus@30000000 { > > > + spba: spba-bus@30000000 { I originally attempted to call it spba-bus@30000000, but I was told to switch it to 'bus' but all my testing was with the spba-bus name, so I didn't even notice the conflict. > > > > The proper node name is "bus" so basically you introduce wrong name to > > other problem. Introducing wrong names at least requires a comment. > > I just noticed that my message was barely understandable... so let me > fix it: > > The proper node name is "bus" so basically you introduce wrong name to > _fix_ other problem. Introducing wrong names at least requires a comment. > > > However the actual problem here is not in node names but in addresses: > > > > aips1: bus@30000000 { > > spba: bus@30000000 { > > > > You have to devices with the same unit address. How do you share the > > address space? > > > > I think this should be rather fixed. > > And again, hungry keyboard ate a letter, so: > > You have _two_ devices with the same unit address. How do you share the > address space? > I think this should be rather fixed. I am no expert on this driver, but from what I can tell, the SDMA driver searches for the memory range assigned to the bus associated with the spba so the DMA has an idea of which peripheral memory ranges are shared. from drivers/dma/imx-sdma.c: spba_bus = of_find_compatible_node(NULL, NULL, "fsl,spba-bus"); ret = of_address_to_resource(spba_bus, 0, &spba_res); if (!ret) { sdma->spba_start_addr = spba_res.start; sdma->spba_end_addr = spba_res.end; } Table 2-3 of the reference manual for the i.MX8M Nano shows the memory range from 3000_0000 - 300F_FFFF is defined as AIPS-1 (s_b_1, via SPBA) Glob. Module Enable which implies to me that the SPBA needs to start at the same place as the AIPS1, but AIPS1 goes from 3000_0000 to 303F_FFFF, so the spba-bus is a subset of the AIPS1. NXP/Freescale has a variety of SoC's that use the SPBA and in every instance, they do it this way. Having the spba-bus with the same starting address of its parent aips bus isn't unique to this SoC: imx6q.dtsi imx6sl.dtsi imx31.dtsi imx7s.dtsi imx6sll.dtsi imx51.dtsi imx6qdl.dtsi imx35.dtsi imx50.dtsi imx25.dtsi imx6sx.dtsi imx6ul.dtsi imx53.dtsi However, in each instance, the bus associated to the SPBA is called spba-bus and not just 'bus' adam > > Best regards, > Krzysztof > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel