From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CE313C433FE for ; Tue, 8 Dec 2020 09:11:41 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6E57823A7F for ; Tue, 8 Dec 2020 09:11:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6E57823A7F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=via3wCCcZc+lA4qCqS3q2NYmMRpurggrBxMm8rcHu3A=; b=yVqe3UAhfMdwWtUbxYBpaSsCG ia+AC2Em0uWMdPkG+U3sigF5FaDN1Z0JBtotiV8qVLFZWoJXAkTKER1RYlLT1XKgQGj+1B0JVwglT ASdRkVyu2MLn9ZtvJsKRXy8PcKIPX55Bffa8Hrt6e1M6nf5PHbT9Y+L6+DSU/E+B0E24OlPTYC5g/ 90llO4YpXJwSQPuKv3dJ2nkd7JdgeX3mzIO8Rw9p/lqyNV9wk940nG9c9TfSdaTugnJcIa0gw3+Xf //hZY8bCjBDxFhEUKKW3iV4P6s6mMvJBwfcWfhTQQSNrZ+bmFX5wL6akdjuwcWGEoKS0S+8CoOCQF 4avzVFPDA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kmYzZ-0004K5-Mp; Tue, 08 Dec 2020 09:09:05 +0000 Received: from mail-wm1-f65.google.com ([209.85.128.65]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kmYwg-0002bO-Da for linux-arm-kernel@lists.infradead.org; Tue, 08 Dec 2020 09:06:07 +0000 Received: by mail-wm1-f65.google.com with SMTP id q75so1663656wme.2 for ; Tue, 08 Dec 2020 01:06:05 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=Yp6QbU20dThiZX55YMgwP3N0UblwKDOB7By25gccL7c=; b=YNiJ4/L6tnrxTCl/buLyBeSjPnHUUh92UlJhwrEJFrGieRoCWCmIMb+gf/6UOqtJzZ +7sq4sUuBs03Wv4vU3lAFb6Y8vYP0PgvpxglEQFQrBLWGW3XOg7aMJ9yP6PhQPE5tozC wrpAZuwgyjCkM/25pVdkN2eI1W7ZbngcEnXYVob1Zj1W5O3OB+eaGrQcS589TIlXoEsW JHOxEQQHFww88Gt4Sls4Coc/yVVr3TX8MyiSTeMwz/iwqfV1aKTlSY5E5R05DcjuIr7o CNn62p3dtzTkZ2sCcJ36HFC/UMUnwgn1cS8eHdaC87JAYXvBJ9/HkSoPOPZtmLNeGRH/ qCrQ== X-Gm-Message-State: AOAM532E25RINK93uGUNcYKaw3pSzqiAVs9soqGF8LViR1idOEQkBXn4 0zjBPILwkXhI0cgqRHr5YPbhqi1WNOk= X-Google-Smtp-Source: ABdhPJy9qWTsAHTIyarbSwMqk6HSg5nF0G3ha8z2BhOwMciZ8zVRzeZ0zOwuEFo3aEIZXSVCkNduYg== X-Received: by 2002:a1c:4843:: with SMTP id v64mr2900420wma.186.1607418364268; Tue, 08 Dec 2020 01:06:04 -0800 (PST) Received: from kozik-lap (adsl-84-226-167-205.adslplus.ch. [84.226.167.205]) by smtp.googlemail.com with ESMTPSA id i11sm19196228wrm.1.2020.12.08.01.06.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Dec 2020 01:06:03 -0800 (PST) Date: Tue, 8 Dec 2020 10:06:01 +0100 From: Krzysztof Kozlowski To: "S.j. Wang" Subject: Re: [PATCH] arm64: dts: imx8mn: Fix duplicate node name Message-ID: <20201208090601.GA8347@kozik-lap> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201208_040606_504777_EF5A6821 X-CRM114-Status: GOOD ( 39.40 ) 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: "devicetree@vger.kernel.org" , "shawnguo@kernel.org" , "s.hauer@pengutronix.de" , "linux-kernel@vger.kernel.org" , "robh+dt@kernel.org" , dl-linux-imx , "kernel@pengutronix.de" , "festevam@gmail.com" , "linux-arm-kernel@lists.infradead.org" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Dec 08, 2020 at 08:57:49AM +0000, S.j. Wang wrote: > > On Tue, Dec 08, 2020 at 08:44:51AM +0000, S.j. Wang 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 { > > > > > > > > > > > > > > > > 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. > > > > > > > > > > > > > > > > > > > spba is the first block of aips1 space, so it has same start > > > > > > address as aips1. > > > > > > > > > > The reference manual describes it "Reserved for SDMA2 internal > > > > > memory", so indeed it is first address but does it have to be mapped? > > > > > Anyway, why don't you use ranges to remove the conflict? > > > > > > > > The IO address space remapping could be a solution but there is > > > > another problem - the hardware representation in DT does not match > > > > what reference manual is saying. > > > > > > > > The AIPS bus @30000000 has several IPs: > > > > - SAI2@30020000 > > > > - ... > > > > - GPIO1@30200000 > > > > > > > > However in DTS you will find additional SPBA bus for 30000000 - > > 300c0000. > > > > It's not really the SDMA, as SDMA is at different address. It is > > > > rather an address space which SDMA should map... but it is not a bus > > with children. > > > > Adding spba-bus@30000000 with its children does not look like > > > > correct representation of HW in DTS. > > > > > > > > > > In the RM, it says AIPS-1 (s_b_1, via SPBA) Glob. Module Enable. > > > Range is (30000000 - 300FFFFF) > > > > No, AIPS-1 is till 303F_FFFF. > > Yes, AIPSA-1 is till 303F_FFFF, but it is divided to 2 parts. > (30000000 - 300FFFFF) is the first part. > > Please go to table 2-3 AIPS1 memory map in RM. In the "region" column, > There is " AIPS-1 (s_b_1, via SPBA) Glob. Module Enable". It means > This part is connect to SPBA bus. Thanks, I see it now. Indeed you have two buses which start at the same address space. You can: 1. Remap addresses, 2. Rename APIS and SPBA to bus-1 and bus-2, 3. Add specific (non-generic) name to spba-bus which you did initially. All of these are rather workarounds so I don't mind your approach (3). Best regards, Krzysztof _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel