Received: by 10.213.65.68 with SMTP id h4csp115535imn; Mon, 12 Mar 2018 08:25:29 -0700 (PDT) X-Google-Smtp-Source: AG47ELvm45VeUuwFY4tCX1g/LX+uUF/AW3c8FiRtB4FfeLiBiA84pJxO34DNN+B6Edc3izbWxVQx X-Received: by 10.98.5.71 with SMTP id 68mr4120614pff.241.1520868329699; Mon, 12 Mar 2018 08:25:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520868329; cv=none; d=google.com; s=arc-20160816; b=Aum1iMt8TXGjVH+hs9TGZwOeXp3h+jwjRKjNnywUtwY8oU6Khhs5sCEUUdYmVAKheJ Kii6ttsPEN6xZ+ilv6QLlKsJRcITHx2opxqdFrDs1Mr1XFeSvUq2RrcPP74z22sSXrqZ PvUCFL58SsBNtH4Cygv5iAFVWmOXI9qJ9kFvl+IPjNIYDbZB9ZKcSmYusp++fHgItabL c6KDMCbQDr1yOttDBxvSg4bo2cH3Vo2OwMPFpG19QVuK3Tyeg505s0WHvJlNKXk42jLc A35hqQmoQB37mh2ixudpgNI11uLi2zah70U+/R6AV5MoOqU6Xt/E65sjS1Mc2eqkIRqP F0Qw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=N2HnLtEdzFlmdstKUwU3h9O23JDPMcmUAy4C8DI7TFc=; b=GQCb9klNyoLNXlugTsitZP6Ceu9Y9esdD6l8vIlyidikL5J6qeGn7of79OBbwMqZVx S7p/zv03BrpiqNgZEt1hKP6DTZSG3I7fG+cln7To7URUjKdDRBFp9INnUqg2XBGO8TTq +60YTRHdlNmRp4TOjYF9KEw7pkrHoVOMEUqWozOz7F9Qog2AgjMlFJbILMYSJWO+ujOO 9ul8md3Z8N0R4P6p23+zCHj0LP98kXLgxZqHm4BIHSdRHt9WMzrQwDUdKV3cWEOryY2i 2eQB3drjtYZCCJHB8bhYQ6dFy85dVYcZF0XY+ZkwO/jDEWAkOAinQI995dzruvpFk4C7 hdJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=CHj0bRmF; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id k1-v6si6360584pli.616.2018.03.12.08.25.15; Mon, 12 Mar 2018 08:25:29 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=CHj0bRmF; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S932190AbeCLPXM (ORCPT + 99 others); Mon, 12 Mar 2018 11:23:12 -0400 Received: from mail-io0-f193.google.com ([209.85.223.193]:43197 "EHLO mail-io0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751315AbeCLPXK (ORCPT ); Mon, 12 Mar 2018 11:23:10 -0400 Received: by mail-io0-f193.google.com with SMTP id l12so11858720ioc.10; Mon, 12 Mar 2018 08:23:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=N2HnLtEdzFlmdstKUwU3h9O23JDPMcmUAy4C8DI7TFc=; b=CHj0bRmFIe7cxgQ68mKZ61NIddMfpBua5qhfJgmUkX6CflH7ekvkfNZUqEynTIa20g I+sNO3zjQM/Valc0z/PsTHavLt+45kqOqRdIeylkWn0jlOEXSdCbJLx7qMSs6LrEBQe/ GQ3HaUhbJs6svomKxlZGC8cqidexxksYudw50k/SDKT38bDwi/g8J5Yc9ykiKxQ3jUbZ Bg9V2czFbiNkEkeL+JiT5QQ248DDQi4cN6EM0y+jPlB0JElMX/TFJz9tM15wENePeo/r wuiFuRR4eE6YdVJja27RfoSJqyLfaMyC2Dw5NKVmzDzUUlhe7eD6HCkWiOLPrBeU8f9t QT1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=N2HnLtEdzFlmdstKUwU3h9O23JDPMcmUAy4C8DI7TFc=; b=JEZP6YuPzNt9Elrm2d+ldSnJBq2B4xs1XS9KjXKMDcOVxuP+R3iitqzg4YuAXi/tGW Wmq2aoJBGgUDWtgB245okU04UMgohYquzkuGHnoXBg5xutMFkJj2fj3tt1r447cOqljX qifVPT+3NKpQPa5x0wRrZ5rJ9balzOA8Pj2oLwnPb5Tv8cDpraOiPyqhyWK2d5q2jNar aKwJhKNV0DYyicka/JAubCY3N8eQr+vSVQvoO3CaDTnolt1KeRxsls4o55X0DUr1VwH+ Ad7bqSu6R1wXjpNzVCKkfk2hjUIYDjT2x44HceofYJNDwy3RsKmnedVOMz03iBF72L6r LqpQ== X-Gm-Message-State: AElRT7FcEbjsNnMwHKTxk1nWol3nNUNky3nRvxN0oGDwwKXWKYxei9Pb zbTyjyROx5UDsJ42sZOQzw0//hWxqeeotHtz91gGcQ== X-Received: by 10.107.165.146 with SMTP id o140mr8696351ioe.52.1520868189155; Mon, 12 Mar 2018 08:23:09 -0700 (PDT) MIME-Version: 1.0 Received: by 10.2.183.17 with HTTP; Mon, 12 Mar 2018 08:23:08 -0700 (PDT) In-Reply-To: <20180216024011.189157-3-brendanhiggins@google.com> References: <20180216024011.189157-1-brendanhiggins@google.com> <20180216024011.189157-3-brendanhiggins@google.com> From: Tomer Maimon Date: Mon, 12 Mar 2018 17:23:08 +0200 Message-ID: Subject: Re: [PATCH v11 2/3] arm: dts: add Nuvoton NPCM750 device tree To: Brendan Higgins Cc: Rob Herring , Russell King - ARM Linux , Mark Rutland , Avi Fishman , julien.thierry@arm.com, pombredanne@nexb.com, Arnd Bergmann , olof@lixom.net, khilman@kernel.org, devicetree , OpenBMC Maillist , Linux Kernel Mailing List , Linux ARM Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 16 February 2018 at 04:40, Brendan Higgins wrote: > Add a common device tree for all Nuvoton NPCM750 BMCs and a board > specific device tree for the NPCM750 (Poleg) evaluation board. > > Signed-off-by: Brendan Higgins > Reviewed-by: Tomer Maimon > Reviewed-by: Avi Fishman > Reviewed-by: Joel Stanley > Reviewed-by: Rob Herring > Tested-by: Tomer Maimon > Tested-by: Avi Fishman > Tested-by: Joel Stanley > --- > .../arm/cpu-enable-method/nuvoton,npcm750-smp | 42 +++++ > .../devicetree/bindings/arm/npcm/npcm.txt | 6 + > arch/arm/boot/dts/Makefile | 2 + > arch/arm/boot/dts/nuvoton-npcm750-evb.dts | 35 ++++ > arch/arm/boot/dts/nuvoton-npcm750.dtsi | 165 ++++++++++++++++++ > 5 files changed, 250 insertions(+) > create mode 100644 Documentation/devicetree/bindings/arm/cpu-enable-method/nuvoton,npcm750-smp > create mode 100644 Documentation/devicetree/bindings/arm/npcm/npcm.txt > create mode 100644 arch/arm/boot/dts/nuvoton-npcm750-evb.dts > create mode 100644 arch/arm/boot/dts/nuvoton-npcm750.dtsi > > diff --git a/Documentation/devicetree/bindings/arm/cpu-enable-method/nuvoton,npcm750-smp b/Documentation/devicetree/bindings/arm/cpu-enable-method/nuvoton,npcm750-smp > new file mode 100644 > index 000000000000..8e043301e28e > --- /dev/null > +++ b/Documentation/devicetree/bindings/arm/cpu-enable-method/nuvoton,npcm750-smp > @@ -0,0 +1,42 @@ Rob, if will like to add new chip to enable the SMP (NPCM730). what will be the best way to add it to the binding documentation file? 1. Do I need to add new binding file nuvoton,npcm730-smp? 2. Add nuvoton,npcm730-smp option to the current nuvoton,npcm750-smp file? 3. Modify the nuvoton,npcm750-smp binding name to nuvoton,npcm7xx-smp and to describe both chips in it. > +========================================================= > +Secondary CPU enable-method "nuvoton,npcm750-smp" binding > +========================================================= > + > +To apply to all CPUs, a single "nuvoton,npcm750-smp" enable method should be > +defined in the "cpus" node. > + > +Enable method name: "nuvoton,npcm750-smp" > +Compatible machines: "nuvoton,npcm750" > +Compatible CPUs: "arm,cortex-a9" > +Related properties: (none) > + > +Note: > +This enable method needs valid nodes compatible with "arm,cortex-a9-scu" and > +"nuvoton,npcm750-gcr". > + > +Example: > + > + cpus { > + #address-cells = <1>; > + #size-cells = <0>; > + enable-method = "nuvoton,npcm750-smp"; > + > + cpu@0 { > + device_type = "cpu"; > + compatible = "arm,cortex-a9"; > + clocks = <&clk NPCM7XX_CLK_CPU>; > + clock-names = "clk_cpu"; > + reg = <0>; > + next-level-cache = <&L2>; > + }; > + > + cpu@1 { > + device_type = "cpu"; > + compatible = "arm,cortex-a9"; > + clocks = <&clk NPCM7XX_CLK_CPU>; > + clock-names = "clk_cpu"; > + reg = <1>; > + next-level-cache = <&L2>; > + }; > + }; > + > diff --git a/Documentation/devicetree/bindings/arm/npcm/npcm.txt b/Documentation/devicetree/bindings/arm/npcm/npcm.txt > new file mode 100644 > index 000000000000..2d87d9ecea85 > --- /dev/null > +++ b/Documentation/devicetree/bindings/arm/npcm/npcm.txt > @@ -0,0 +1,6 @@ > +NPCM Platforms Device Tree Bindings > +----------------------------------- > +NPCM750 SoC > +Required root node properties: > + - compatible = "nuvoton,npcm750"; > + > diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile > index ade7a38543dc..eeab5dac50ab 100644 > --- a/arch/arm/boot/dts/Makefile > +++ b/arch/arm/boot/dts/Makefile > @@ -304,6 +304,8 @@ dtb-$(CONFIG_ARCH_LPC18XX) += \ > dtb-$(CONFIG_ARCH_LPC32XX) += \ > lpc3250-ea3250.dtb \ > lpc3250-phy3250.dtb > +dtb-$(CONFIG_ARCH_NPCM750) += \ > + nuvoton-npcm750-evb.dtb > dtb-$(CONFIG_MACH_MESON6) += \ > meson6-atv1200.dtb > dtb-$(CONFIG_MACH_MESON8) += \ > diff --git a/arch/arm/boot/dts/nuvoton-npcm750-evb.dts b/arch/arm/boot/dts/nuvoton-npcm750-evb.dts > new file mode 100644 > index 000000000000..cabde3d5be8a > --- /dev/null > +++ b/arch/arm/boot/dts/nuvoton-npcm750-evb.dts > @@ -0,0 +1,35 @@ > +// SPDX-License-Identifier: GPL-2.0 > +// Copyright (c) 2018 Nuvoton Technology corporation. > +// Copyright 2018 Google, Inc. > + > +/dts-v1/; > +#include "nuvoton-npcm750.dtsi" > + > +/ { > + model = "Nuvoton npcm750 Development Board (Device Tree)"; > + compatible = "nuvoton,npcm750"; > + > + chosen { > + stdout-path = &serial3; > + }; > + > + memory { > + reg = <0 0x40000000>; > + }; > +}; > + > +&serial0 { > + status = "okay"; > +}; > + > +&serial1 { > + status = "okay"; > +}; > + > +&serial2 { > + status = "okay"; > +}; > + > +&serial3 { > + status = "okay"; > +}; > diff --git a/arch/arm/boot/dts/nuvoton-npcm750.dtsi b/arch/arm/boot/dts/nuvoton-npcm750.dtsi > new file mode 100644 > index 000000000000..839e45cfd695 > --- /dev/null > +++ b/arch/arm/boot/dts/nuvoton-npcm750.dtsi > @@ -0,0 +1,165 @@ > +// SPDX-License-Identifier: GPL-2.0 > +// Copyright (c) 2018 Nuvoton Technology corporation. > +// Copyright 2018 Google, Inc. > + > +#include > + > +/ { > + #address-cells = <1>; > + #size-cells = <1>; > + interrupt-parent = <&gic>; > + > + cpus { > + #address-cells = <1>; > + #size-cells = <0>; > + enable-method = "nuvoton,npcm750-smp"; > + > + cpu@0 { > + device_type = "cpu"; > + compatible = "arm,cortex-a9"; > + clocks = <&clk 10>; > + clock-names = "clk_cpu"; > + reg = <0>; > + next-level-cache = <&l2>; > + }; > + > + cpu@1 { > + device_type = "cpu"; > + compatible = "arm,cortex-a9"; > + clocks = <&clk 10>; > + clock-names = "clk_cpu"; > + reg = <1>; > + next-level-cache = <&l2>; > + }; > + }; > + > + /* external clock signal rg1refck, supplied by the phy */ > + clk-rg1refck { > + compatible = "fixed-clock"; > + #clock-cells = <0>; > + clock-frequency = <125000000>; > + }; > + > + /* external clock signal rg2refck, supplied by the phy */ > + clk-rg2refck { > + compatible = "fixed-clock"; > + #clock-cells = <0>; > + clock-frequency = <125000000>; > + }; > + > + clk-xin { > + compatible = "fixed-clock"; > + #clock-cells = <0>; > + clock-frequency = <50000000>; > + }; > + > + soc { > + #address-cells = <1>; > + #size-cells = <1>; > + compatible = "simple-bus"; > + interrupt-parent = <&gic>; > + ranges = <0x0 0xf0000000 0x00900000>; > + > + gcr: gcr@800000 { > + compatible = "nuvoton,npcm750-gcr", "syscon", > + "simple-mfd"; > + reg = <0x800000 0x1000>; > + }; > + > + scu: scu@3fe000 { > + compatible = "arm,cortex-a9-scu"; > + reg = <0x3fe000 0x1000>; > + }; > + > + l2: cache-controller@3fc000 { > + compatible = "arm,pl310-cache"; > + reg = <0x3fc000 0x1000>; > + interrupts = ; > + cache-unified; > + cache-level = <2>; > + clocks = <&clk 22>; > + arm,shared-override; > + }; > + > + gic: interrupt-controller@3ff000 { > + compatible = "arm,cortex-a9-gic"; > + interrupt-controller; > + #interrupt-cells = <3>; > + reg = <0x3ff000 0x1000>, > + <0x3fe100 0x100>; > + }; > + > + timer@3fe600 { > + compatible = "arm,cortex-a9-twd-timer"; > + reg = <0x3fe600 0x20>; > + interrupts = + IRQ_TYPE_LEVEL_HIGH)>; > + clocks = <&clk 15>; > + }; > + }; > + > + ahb { > + #address-cells = <1>; > + #size-cells = <1>; > + compatible = "simple-bus"; > + interrupt-parent = <&gic>; > + ranges; > + > + clk: clock-controller@f0801000 { > + compatible = "nuvoton,npcm750-clk"; > + #clock-cells = <1>; > + reg = <0xf0801000 0x1000>; > + }; > + > + apb { > + #address-cells = <1>; > + #size-cells = <1>; > + compatible = "simple-bus"; > + interrupt-parent = <&gic>; > + ranges = <0x0 0xf0000000 0x00300000>; > + > + timer0: timer@8000 { > + compatible = "nuvoton,npcm750-timer"; > + interrupts = ; > + reg = <0x8000 0x1000>; > + clocks = <&clk 15>; > + }; > + > + serial0: serial@1000 { > + compatible = "ns16550a"; > + reg = <0x1000 0x1000>; > + clocks = <&clk 14>; > + interrupts = ; > + reg-shift = <2>; > + status = "disabled"; > + }; > + > + serial1: serial@2000 { > + compatible = "ns16550a"; > + reg = <0x2000 0x1000>; > + clocks = <&clk 14>; > + interrupts = ; > + reg-shift = <2>; > + status = "disabled"; > + }; > + > + serial2: serial@3000 { > + compatible = "ns16550a"; > + reg = <0x3000 0x1000>; > + clocks = <&clk 14>; > + interrupts = ; > + reg-shift = <2>; > + status = "disabled"; > + }; > + > + serial3: serial@4000 { > + compatible = "ns16550a"; > + reg = <0x4000 0x1000>; > + clocks = <&clk 14>; > + interrupts = ; > + reg-shift = <2>; > + status = "disabled"; > + }; > + }; > + }; > +}; > -- > 2.16.1.291.g4437f3f132-goog > Thanks, Tomer