Received: by 2002:a05:6500:1b45:b0:1f5:f2ab:c469 with SMTP id cz5csp833758lqb; Wed, 17 Apr 2024 12:03:40 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU7EazhE5WAph7uwYyHCE1nZiuUh7mWZbgHCoBC5ue29JRE5VYuEKRd46Hg7Fl9waXW0NQ/D8QAehtbCn9eH42BWYm0jn9gdv6j5PxBog== X-Google-Smtp-Source: AGHT+IG4cdpSY9raCRywic10vMogd1oxjW82AAimTjqqfErLgVsO9FbbvSuHxMGVxbVHo2F23Iwa X-Received: by 2002:a50:d695:0:b0:570:5b70:3407 with SMTP id r21-20020a50d695000000b005705b703407mr385205edi.10.1713380620767; Wed, 17 Apr 2024 12:03:40 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713380620; cv=pass; d=google.com; s=arc-20160816; b=kzFuEr7N3m4v9dlKq/Ge/s80upQfSW/R4FCzMN3/THV627nhBMkNTdJm61KQxDuVwv iQzynrd/hTPeEk5jR8YqARYTDeCvN98+Vpy8ujDQFFCWbTMK9qeGYQ7gkW5ByxbRDlMY vplyeWQEDKEiMKG77eBYmUgxkKV9q+bgBkpDphgaB8BAK6bOAIlW36UhPYmpAcLOZcc0 PErTJIqu5VIgtP39J9GX9JJDKjfj80S2VAc4NPfZWubR7T6UhEfbbgyK/SqKHoo21HYj 0rDbFaFvjjJ9ZiIC5Ouos52jRcLJYQOf/GLXaalGCIljPV93pSvRB9VscinPQcmHuI9W bsnw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=tRAGvkWYeFbgN6PviC8fItBfko0DzvHH5NgHz3avreg=; fh=2aq2pRitIMaymHGyOizhcBGy6eqT6Z4xMrDlSvlUMkA=; b=klouFeiAMTfe78WETvxwPNIX7lBSS6zFSYl/AMbdpqLqEuTE8UCXhahKfXVlkvjDO1 j9CBONmIg4uXmhyWTU0zreeKyK4HMrY59+r3Luk0YtU+5vXb0VJ9DOpfnSgZf3VYPtrW 9KXf5gGDykhf7C1c5ex2540HnwJUKIfxbIJfG77jSikc8vNsw3NAYUvkpm54rg0U7DnS n3fyHgOVXDwQ+bZjFjO+fpws8Stw1zal2+HFSLK4SHL5Jam66ZqmD36daFvhkvuT0uwB l9pkIUM2gJIf/cvYZdFOi1bW6LXde8jv5jh/HRjBO1jpvAC9Xh7xBl5A+FGtG+Em+Gw5 MPJQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="K/1M7mpB"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-149099-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-149099-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id e5-20020a50a685000000b005705b9b0537si1005564edc.326.2024.04.17.12.03.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Apr 2024 12:03:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-149099-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="K/1M7mpB"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-149099-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-149099-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 542B31F2253B for ; Wed, 17 Apr 2024 19:03:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 233F02134B; Wed, 17 Apr 2024 19:03:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="K/1M7mpB" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 118D8F9C1; Wed, 17 Apr 2024 19:03:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713380612; cv=none; b=Hw267BxOFGjGkSpRGvf6x8ijRnDJ2BVXgkUyvEQSC/GcJzJbrswM9SDFbOTwn/sY3GUXjXszDxI6wBi3oK9ucr3IkSyGC0k0GBQsRoPRcsMQIvLqqrC9u4EoM2+3m7u5/pc7LggLNw+yn/ZOJzrqwt7pTQGaI/sq6VTjcimhWik= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713380612; c=relaxed/simple; bh=rqO2Ru3dY8VMhtda5fd5IM1MOREemN1MWx0xvhbwL/M=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=bFdPPYJZHBZY6DWR6+5GPfVFN5NxHtzz3jAzgKyfTmdkJVwRd0C7ILPf/q1F459FEP81Ah7lL6vrzu0jROFUUu0IAl9lXIwLGDc/FYC/sVboQLqklEdniK6uEUhnFa3BVbliMGR1kKQFM8gvol8g1sWctzG+tdUb+rCTlZ8UfXs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=K/1M7mpB; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 42D94C072AA; Wed, 17 Apr 2024 19:03:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713380611; bh=rqO2Ru3dY8VMhtda5fd5IM1MOREemN1MWx0xvhbwL/M=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=K/1M7mpBQsIWBu7KuvdQ4t4AOkr4TQs7DEfnCg0RAgV9LTvEbtdBr8yBpiKyYpWog bS5LQv02WWzM5O5QlseVzwRhsHzt04wB3u4UWd+0MwbuEra9cy4t7TSiXSjqWHBLzC kscSNWC92xAQJSnj5dxGr1O5DHwy7DcSHG35QnhAwsTWr6ScEcoIgJrTsCpiNXwB9z 5WnqbDNx4A5Vq/Oz+6ZETDNBBYuVjOImEPLtP0rQ0Qy450L59GZOYKMOv4kxoyquml 6LIFUa5DOzlZioPnX6AKCqJNEjQmSI5ozyvhbmgezGYMFkNp+cWNphgGicxp7VWifi 1F32Gq8gOUl5Q== Message-ID: <8a5a494c-48db-4f4d-a310-0103cef7d7ac@kernel.org> Date: Wed, 17 Apr 2024 21:03:29 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 3/4] ARM: dts: BCM5301X: Add DT for ASUS RT-AC3200 To: Florian Fainelli , =?UTF-8?B?QXLEsW7DpyDDnE5BTA==?= , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Hauke Mehrtens , Rafal Milecki , Broadcom internal kernel review list Cc: Tom Brautaset , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org References: <20240414-for-soc-asus-rt-ac3200-ac5300-v1-0-118c90bae6e5@arinc9.com> <20240414-for-soc-asus-rt-ac3200-ac5300-v1-3-118c90bae6e5@arinc9.com> <85261d11-d6cb-4718-88d9-95a7efe5c0ab@arinc9.com> <335cdd4b-7309-4633-9b4f-6487c72c395c@arinc9.com> <07c9c5f5-c4b9-44d6-b909-5aa306f56898@kernel.org> <00ba4593-d720-419a-a97d-37c402c91e44@arinc9.com> <7b465ddb-2b18-4e7f-8b03-d4e51006e1cb@broadcom.com> <48b2e0fd-4d7f-4bb6-aadd-804847e3250c@kernel.org> Content-Language: en-US From: Krzysztof Kozlowski Autocrypt: addr=krzk@kernel.org; keydata= xsFNBFVDQq4BEAC6KeLOfFsAvFMBsrCrJ2bCalhPv5+KQF2PS2+iwZI8BpRZoV+Bd5kWvN79 cFgcqTTuNHjAvxtUG8pQgGTHAObYs6xeYJtjUH0ZX6ndJ33FJYf5V3yXqqjcZ30FgHzJCFUu JMp7PSyMPzpUXfU12yfcRYVEMQrmplNZssmYhiTeVicuOOypWugZKVLGNm0IweVCaZ/DJDIH gNbpvVwjcKYrx85m9cBVEBUGaQP6AT7qlVCkrf50v8bofSIyVa2xmubbAwwFA1oxoOusjPIE J3iadrwpFvsZjF5uHAKS+7wHLoW9hVzOnLbX6ajk5Hf8Pb1m+VH/E8bPBNNYKkfTtypTDUCj NYcd27tjnXfG+SDs/EXNUAIRefCyvaRG7oRYF3Ec+2RgQDRnmmjCjoQNbFrJvJkFHlPeHaeS BosGY+XWKydnmsfY7SSnjAzLUGAFhLd/XDVpb1Een2XucPpKvt9ORF+48gy12FA5GduRLhQU vK4tU7ojoem/G23PcowM1CwPurC8sAVsQb9KmwTGh7rVz3ks3w/zfGBy3+WmLg++C2Wct6nM Pd8/6CBVjEWqD06/RjI2AnjIq5fSEH/BIfXXfC68nMp9B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7XcmyM6TGeVfb+OZVMJnZzK0s2VYAuI0Rl87FBFYgULdgqKV7R7WHzwD uZwJCLykjad45hsWcOGk3OcaAGQS6NDlfhM6O9aYNwGL6tGt/6BkRikNOs7VDEa4/HlbaSJo 7FgndGw1kWmkeL6oQh7wBvYll2buKod4qYntmNKEicoHGU+x91Gcan8mCoqhJkbqrL7+nXG2 5Q/GS5M9RFWS+nYyJh+c3OcfKqVcZQNANItt7+ULzdNJuhvTRRdC3g9hmCEuNSr+CLMdnRBY fv0= In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On 17/04/2024 18:47, Florian Fainelli wrote: > > > On 4/17/2024 6:23 AM, Krzysztof Kozlowski wrote: >> On 17/04/2024 05:15, Florian Fainelli wrote: >>> >>> >>> On 4/15/2024 2:10 AM, Arınç ÜNAL wrote: >>>> On 15.04.2024 10:57, Krzysztof Kozlowski wrote: >>>>> On 14/04/2024 22:21, Arınç ÜNAL wrote: >>>>>> NVRAM is described as both flash device partition and memory mapped >>>>>> NVMEM. >>>>>> This platform stores NVRAM on flash but makes it also memory accessible. >>>>>> >>>>>> As device partitions are described in board DTS, the nvram node must >>>>>> also >>>>> >>>>> Sorry, but we do not talk about partitions. Partitions are indeed board >>>>> property. But the piece of hardware, so NVMEM, is provided by SoC. >>>>> >>>>>> be defined there as its address and size will be different by board. >>>>>> It has >>>>>> been widely described on at least bcm4709 and bcm47094 SoC board DTS >>>>>> files >>>>>> here. >>>>> >>>>> These not proper arguments. What you are saying here is that SoC does no >>>>> have nvram at address 0x1c08000. Instead you are saying there some sort >>>>> of bus going out of SoC to the board and on the board physically there >>>>> is some NVRAM sort of memory attached to this bus. >>>> >>>> Yes that is the case. NVRAM is stored on a partition on the flash. On the >>>> Broadcom NorthStar platform, the NAND flash base is 0x1c000000, the NOR >>>> flash base is 0x1e000000. >>>> >>>> For the board in this patch, the flash is a NAND flash. The NVRAM partition >>>> starts at address 0x00080000. Therefore, the NVRAM component's address is >>>> 0x1c080000. >>> >>> Because the flash is memory mapped into the CPU's address space, a >>> separate node was defined since it is not part of the "soc" node which >>> describes the bridge that connects all of the peripherals. >>> >>> Whether we should create an additional bus node which describes the >>> bridge being used to access the flash devices using the MMIO windows is >>> debatable. Rafal, what do you think? >> >> Sorry guys, I don't get. I don't know the addresses neither the names >> like Broadcom Northstar, so this does not clarify me at all. > > Northstar is just a code name for the BCM5301X SoC family. The SoC > memory map looks like this: > > 0x0000_0000 ~ 0x07FF_FFFF - DDR > 0x0800_0000 ~ 0x0FFF_FFFF - PCIe0 > 0x1800_0000 ~ 0x180F_FFFF - Core registers (that is > chipcommon-a-bus@18000000 and axi@18000000 in DT) > 0x1810_0000 ~ 0x181F_FFFF - IDM registers > 0x1900_0000 ~ 0x190F_FFFF - ARMCore registers (that is > mpcore-bus@19000000 in DT) > 0x1C00_0000 ~ 0x1DFF_FFFF - NAND flash > 0x1E00_0000 ~ 0x1FFF_FFFF - SPI-NOR flash > 0x4000_0000 ~ 0x47FF_FFFF - PCIe1 > 0x4800_0000 ~ 0x4FFF_FFFF - PCIe2 > 0x8000_0000 ~ 0xBFFF_FFFF - DDR > > From the system diagram the CPU has 3 AXI ports to the NIC301 AXI > fabric, which itself has separate AXI ports to the NAND and SPI-NOR MMIO > interface and then different AXI and APB ports to various other peripherals. > > This information was not accessible to Rafal at the time, so it would > not have been reasonable to expect from him to know such details. Sure. > >> >> Please answer the simple questions: >> 1. Is NAND flash part of SoC? >> 2. If not, is NAND flash provided by Broadcom or anyone else? > > The NAND flash is external to the SoC it is not manufactured by Broadcom > we have boards with Spansion, Micron, Macronix, Toshiba flashes etc. Thanks, then this explains why this is no part of SoC and my concerns are addressed. I have only one remaining question - you use "brcm,nvram" compatible, which kind of suggests the NVRAM controller or part itself is coming from Broadcom. Driver looks like software construct, but it is so widely used that I guess that ship has sailed. Best regards, Krzysztof