From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753176AbdK1Skk (ORCPT ); Tue, 28 Nov 2017 13:40:40 -0500 Received: from mail-qt0-f196.google.com ([209.85.216.196]:40472 "EHLO mail-qt0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752236AbdK1Ski (ORCPT ); Tue, 28 Nov 2017 13:40:38 -0500 X-Google-Smtp-Source: AGs4zMZNuuubxYW+gctfcDb9Yy0XW2Faeib882xAFWfqx13IQXek/2dYZ7OcefsO+ymEXffb9uAOUA== Subject: Re: [PATCH 10/13] MIPS: mscc: add ocelot dtsi To: Alexandre Belloni , Ralf Baechle Cc: linux-mips@linux-mips.org, linux-kernel@vger.kernel.org References: <20171128152643.20463-1-alexandre.belloni@free-electrons.com> <20171128152643.20463-11-alexandre.belloni@free-electrons.com> From: Florian Fainelli Message-ID: <0596b316-f3a3-6d06-75f4-acad4fde3b5f@gmail.com> Date: Tue, 28 Nov 2017 10:40:31 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <20171128152643.20463-11-alexandre.belloni@free-electrons.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/28/2017 07:26 AM, Alexandre Belloni wrote: > Add a device tree include file for the Microsemi Ocelot SoC. > > Signed-off-by: Alexandre Belloni > --- > + ahb { > + compatible = "simple-bus"; > + #address-cells = <1>; > + #size-cells = <1>; > + ranges; You could provide the base address and size of the bus range, such that your nodes all become relative to that base address, e.g: ranges = <0 0x70000000 0x10000>; What a strange physical address to place registers on a MIPS system though... > + > + interrupt-parent = <&intc>; > + > + cpu_ctrl: syscon@70000000 { > + compatible = "syscon"; > + reg = <0x70000000 0x2c>; > + }; Then this becomes: syscon@0 { compatible = "syscon"; reg = <0x0 0x2c>; }; etc. > + > + intc: interrupt-controller@70000070 { > + compatible = "mscc,ocelot-icpu-intr"; > + reg = <0x70000070 0x70>; > + #interrupt-cells = <1>; > + interrupt-controller; > + interrupt-parent = <&cpuintc>; > + interrupts = <2>; > + }; > + > + uart0: serial@70100000 { > + pinctrl-0 = <&uart_pins>; > + pinctrl-names = "default"; > + compatible = "ns16550a"; > + reg = <0x70100000 0x20>; > + interrupts = <6>; > + clocks = <&ahb_clk>; > + reg-io-width = <4>; > + reg-shift = <2>; > + > + status = "disabled"; > + }; > + > + uart2: serial@70100800 { > + pinctrl-0 = <&uart2_pins>; > + pinctrl-names = "default"; > + compatible = "ns16550a"; > + reg = <0x70100800 0x20>; > + interrupts = <7>; > + clocks = <&ahb_clk>; > + reg-io-width = <4>; > + reg-shift = <2>; > + > + status = "disabled"; > + }; > + > + chip_regs: syscon@71070000 { > + compatible = "simple-mfd", "syscon"; > + reg = <0x71070000 0x1c>; > + > + reset { > + compatible = "mscc,ocelot-chip-reset"; > + mscc,cpucontrol = <&cpu_ctrl>; > + }; > + }; > + > + gpio: pinctrl@71070034 { > + compatible = "mscc,ocelot-pinctrl"; > + reg = <0x71070034 0x28>; > + gpio-controller; > + #gpio-cells = <2>; > + gpio-ranges = <&gpio 0 0 22>; > + > + uart_pins: uart-pins { > + pins = "GPIO_6", "GPIO_7"; > + function = "uart"; > + }; > + > + uart2_pins: uart2-pins { > + pins = "GPIO_12", "GPIO_13"; > + function = "uart2"; > + }; > + }; > + }; > +}; > -- Florian