From patchwork Mon Apr 17 21:39:37 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Blumenstingl X-Patchwork-Id: 9684587 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C281C60326 for ; Mon, 17 Apr 2017 21:40:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B1ED820072 for ; Mon, 17 Apr 2017 21:40:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A68ED282E2; Mon, 17 Apr 2017 21:40:45 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id DE18020072 for ; Mon, 17 Apr 2017 21:40:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=oDt8EeD2rW6wSEXdAC93vlo0PWAQpJdSsIoDVqomTw4=; b=Uk0kECOqth8bO24g5Jw1L3H6ib LSYIcyBe6Mms2umu9FrnFRkDF16bo34P+job/BCWSZSWmhUi+9wexwewnveYp+kcuIs6F3SQliSjG p6WTazxwH9Izh+E6sH+Q4LJzXleEHXSC3b36Vrx8bfRxVqfpkUZSK7iJmaIJChQRiQUfqH5TEsr0l J6M3Awd7NF5p0ToJ7A1XVTyM0DXQSxpqfYw62XrSF+zfW0TDk6KgqfOZac6jRu6n1mL9bCxP2+w2M CRSWFqcxxMLbQHSv5wtXdeghhW2Ga5k0rv+FlxWCXlpSivTVtlAtqPqpZ9lYTN7u3hYbBXnIGixXt 8JgemFfQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1d0EO4-0003mW-2L; Mon, 17 Apr 2017 21:40:44 +0000 Received: from mail-wr0-x241.google.com ([2a00:1450:400c:c0c::241]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1d0ENX-0001zZ-LN; Mon, 17 Apr 2017 21:40:15 +0000 Received: by mail-wr0-x241.google.com with SMTP id u18so22199431wrc.1; Mon, 17 Apr 2017 14:39:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=UJD57ynb/EQ+KU+yHZu0FeHQAj48/owe3L+jpRcmxBw=; b=vVJjaE/iJTTeIA7lw79IAX4rjcP6qDjn/MwLYjLlsBTA6zAwG7y7Qd3lbqVVbzLUbY QUnI14jGHTFj0SmPqbCuR3/FuJeYv2FckhtevTNvWf0i3g25nCzFJsQnUavnYqlCTLEK V8hzVm9z3rlU8EGGgorEPJ+MFPP7+oF67SGCUGnKiFLEO+Y52qbKZooVJY/IfWHu6+g1 2/W8AfxNRfzRYLUDzGENVqWNB8XmSf3+xymy5FrsaziA6+ze/JL+RR227+W2cGyP249B Y+T4Zl2XLLuW2/N9eGNMjagzwv/u83zDZ86y9wEZp+7VPK3oMK63dKsvQ0Jghk0RxeZ7 L3/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=UJD57ynb/EQ+KU+yHZu0FeHQAj48/owe3L+jpRcmxBw=; b=YLolwzTHRe8NHfzG8PYps+63bWeCJNtzVWapyxrPexTYJX3XQJnkSTUxvalrLxIW4h s/7c3GlYQey8tPoPxl2Qie3E5CNkX6SJ1W01IIHBECo94eMhO23fpvg7LfJfaNRcdxNz 2oo2SnbxjgtHWmx1Qzb+gPopOVCleI0W7TzO29ZfZJl0EnUB9niJAYoO+RI1Ruo0Z3H2 X6pZnGw282N4cyMCpvm4n3uUG60jJgFab4tE92/VWY7oBwHPZULt0e/I52yWxkNyQJIn 0NsBh4gVVJ8u0vO/6aC/BEeA0ma/UaxZm1QbwgMMLZ+qtaIhCW7bxT/1eVS2pdJTUipd q55A== X-Gm-Message-State: AN3rC/4VhBtHJ3o0XiVMja82+D682rYZQyLcGOBCRIrYxEhfkilRHtT7 211mVl+S8rQC1A== X-Received: by 10.223.154.206 with SMTP id a72mr19500000wrc.192.1492465189764; Mon, 17 Apr 2017 14:39:49 -0700 (PDT) Received: from blackbox.darklights.net (p200300DCD3CA7E045886EFA6B17A7A33.dip0.t-ipconnect.de. [2003:dc:d3ca:7e04:5886:efa6:b17a:7a33]) by smtp.googlemail.com with ESMTPSA id l141sm12139679wma.32.2017.04.17.14.39.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 17 Apr 2017 14:39:48 -0700 (PDT) From: Martin Blumenstingl To: linux-amlogic@lists.infradead.org, khilman@baylibre.com, carlo@caione.org, mark.rutland@arm.com, robh+dt@kernel.org Subject: [PATCH 1/2] ARM: dts: meson: organize devices in their corresponding busses Date: Mon, 17 Apr 2017 23:39:37 +0200 Message-Id: <20170417213938.22626-2-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170417213938.22626-1-martin.blumenstingl@googlemail.com> References: <20170417213938.22626-1-martin.blumenstingl@googlemail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170417_144012_010200_DF252AF8 X-CRM114-Status: GOOD ( 12.27 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Martin Blumenstingl , devicetree@vger.kernel.org, linux@armlinux.org.uk, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The Amlogic Meson SoCs have most of the internal peripherals organized in busses. Use them to make the dts easier to read and to avoid duplicated register (bus) offset definitions. The bus information is taken from the vendor kernel: #define IO_CBUS_PHY_BASE 0xc1100000 ///2M #define IO_AOBUS_PHY_BASE 0xc8100000 ///1M There are more internal busses (such as the abp bus which seems to contain audio, HDMI and Mali registers), but since we don't have drivers for them yet these are not added (yet). Signed-off-by: Martin Blumenstingl --- arch/arm/boot/dts/meson.dtsi | 180 ++++++++++++++++++++++-------------------- arch/arm/boot/dts/meson6.dtsi | 2 - arch/arm/boot/dts/meson8.dtsi | 116 ++++++++++++++++++--------- 3 files changed, 171 insertions(+), 127 deletions(-) diff --git a/arch/arm/boot/dts/meson.dtsi b/arch/arm/boot/dts/meson.dtsi index 8c77c87660cd..9701bd1bc298 100644 --- a/arch/arm/boot/dts/meson.dtsi +++ b/arch/arm/boot/dts/meson.dtsi @@ -65,110 +65,116 @@ #interrupt-cells = <3>; }; - timer@c1109940 { - compatible = "amlogic,meson6-timer"; - reg = <0xc1109940 0x18>; - interrupts = <0 10 1>; - }; - soc { compatible = "simple-bus"; #address-cells = <1>; #size-cells = <1>; ranges; - wdt: watchdog@c1109900 { - compatible = "amlogic,meson6-wdt"; - reg = <0xc1109900 0x8>; - interrupts = <0 0 1>; - }; - - uart_AO: serial@c81004c0 { - compatible = "amlogic,meson-uart"; - reg = <0xc81004c0 0x18>; - interrupts = <0 90 1>; - clocks = <&clk81>; - status = "disabled"; - }; - - uart_A: serial@c11084c0 { - compatible = "amlogic,meson-uart"; - reg = <0xc11084c0 0x18>; - interrupts = <0 26 1>; - clocks = <&clk81>; - status = "disabled"; - }; - - uart_B: serial@c11084dc { - compatible = "amlogic,meson-uart"; - reg = <0xc11084dc 0x18>; - interrupts = <0 75 1>; - clocks = <&clk81>; - status = "disabled"; - }; - - uart_C: serial@c1108700 { - compatible = "amlogic,meson-uart"; - reg = <0xc1108700 0x18>; - interrupts = <0 93 1>; - clocks = <&clk81>; - status = "disabled"; - }; - - i2c_AO: i2c@c8100500 { - compatible = "amlogic,meson6-i2c"; - reg = <0xc8100500 0x20>; - interrupts = <0 92 1>; - clocks = <&clk81>; - #address-cells = <1>; - #size-cells = <0>; - status = "disabled"; - }; - - i2c_A: i2c@c1108500 { - compatible = "amlogic,meson6-i2c"; - reg = <0xc1108500 0x20>; - interrupts = <0 21 1>; - clocks = <&clk81>; - #address-cells = <1>; - #size-cells = <0>; - status = "disabled"; - }; - - i2c_B: i2c@c11087c0 { - compatible = "amlogic,meson6-i2c"; - reg = <0xc11087c0 0x20>; - interrupts = <0 128 1>; - clocks = <&clk81>; + cbus: cbus@c1100000 { + compatible = "simple-bus"; + reg = <0xc1100000 0x200000>; #address-cells = <1>; - #size-cells = <0>; - status = "disabled"; + #size-cells = <1>; + ranges = <0x0 0xc1100000 0x200000>; + + uart_A: serial@84c0 { + compatible = "amlogic,meson-uart"; + reg = <0x84c0 0x18>; + interrupts = <0 26 1>; + status = "disabled"; + }; + + uart_B: serial@84dc { + compatible = "amlogic,meson-uart"; + reg = <0x84dc 0x18>; + interrupts = <0 75 1>; + status = "disabled"; + }; + + i2c_A: i2c@8500 { + compatible = "amlogic,meson6-i2c"; + reg = <0x8500 0x20>; + interrupts = <0 21 1>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + + uart_C: serial@8700 { + compatible = "amlogic,meson-uart"; + reg = <0x8700 0x18>; + interrupts = <0 93 1>; + status = "disabled"; + }; + + i2c_B: i2c@87c0 { + compatible = "amlogic,meson6-i2c"; + reg = <0x87c0 0x20>; + interrupts = <0 128 1>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + + spifc: spi@8c80 { + compatible = "amlogic,meson6-spifc"; + reg = <0x8c80 0x80>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + + wdt: watchdog@9900 { + compatible = "amlogic,meson6-wdt"; + reg = <0x9900 0x8>; + interrupts = <0 0 1>; + }; + + timer@9940 { + compatible = "amlogic,meson6-timer"; + reg = <0x9940 0x18>; + interrupts = <0 10 1>; + }; }; - ir_receiver: ir-receiver@c8100480 { - compatible= "amlogic,meson6-ir"; - reg = <0xc8100480 0x20>; - interrupts = <0 15 1>; - status = "disabled"; - }; - - spifc: spi@c1108c80 { - compatible = "amlogic,meson6-spifc"; - reg = <0xc1108c80 0x80>; + aobus: aobus@c8100000 { + compatible = "simple-bus"; + reg = <0xc8100000 0x100000>; #address-cells = <1>; - #size-cells = <0>; - clocks = <&clk81>; - status = "disabled"; + #size-cells = <1>; + ranges = <0x0 0xc8100000 0x100000>; + + ir_receiver: ir-receiver@480 { + compatible= "amlogic,meson6-ir"; + reg = <0x480 0x20>; + interrupts = <0 15 1>; + status = "disabled"; + }; + + uart_AO: serial@4c0 { + compatible = "amlogic,meson-uart"; + reg = <0x4c0 0x18>; + interrupts = <0 90 1>; + status = "disabled"; + }; + + i2c_AO: i2c@500 { + compatible = "amlogic,meson6-i2c"; + reg = <0x500 0x20>; + interrupts = <0 92 1>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; }; ethmac: ethernet@c9410000 { compatible = "amlogic,meson6-dwmac", "snps,dwmac"; reg = <0xc9410000 0x10000 - 0xc1108108 0x4>; + 0xc1108108 0x4>; interrupts = <0 8 1>; interrupt-names = "macirq"; - clocks = <&clk81>; - clock-names = "stmmaceth"; status = "disabled"; }; }; diff --git a/arch/arm/boot/dts/meson6.dtsi b/arch/arm/boot/dts/meson6.dtsi index 8b33be15af94..b0fc91ffd6a1 100644 --- a/arch/arm/boot/dts/meson6.dtsi +++ b/arch/arm/boot/dts/meson6.dtsi @@ -51,8 +51,6 @@ model = "Amlogic Meson6 SoC"; compatible = "amlogic,meson6"; - interrupt-parent = <&gic>; - cpus { #address-cells = <1>; #size-cells = <0>; diff --git a/arch/arm/boot/dts/meson8.dtsi b/arch/arm/boot/dts/meson8.dtsi index ebc763eab195..5eaaf067c76a 100644 --- a/arch/arm/boot/dts/meson8.dtsi +++ b/arch/arm/boot/dts/meson8.dtsi @@ -50,8 +50,6 @@ model = "Amlogic Meson8 SoC"; compatible = "amlogic,meson8"; - interrupt-parent = <&gic>; - cpus { #address-cells = <1>; #size-cells = <0>; @@ -91,18 +89,55 @@ clock-frequency = <141666666>; }; - pinctrl_cbus: pinctrl@c1109880 { +}; /* end of / */ + +&aobus { + pinctrl_aobus: pinctrl@84 { + compatible = "amlogic,meson8-aobus-pinctrl"; + reg = <0x84 0xc>; + #address-cells = <1>; + #size-cells = <1>; + ranges; + + gpio_ao: ao-bank@14 { + reg = <0x14 0x4>, + <0x2c 0x4>, + <0x24 0x8>; + reg-names = "mux", "pull", "gpio"; + gpio-controller; + #gpio-cells = <2>; + gpio-ranges = <&pinctrl_aobus 0 120 16>; + }; + + uart_ao_a_pins: uart_ao_a { + mux { + groups = "uart_tx_ao_a", "uart_rx_ao_a"; + function = "uart_ao"; + }; + }; + + i2c_ao_pins: i2c_mst_ao { + mux { + groups = "i2c_mst_sck_ao", "i2c_mst_sda_ao"; + function = "i2c_mst_ao"; + }; + }; + }; +}; + +&cbus { + pinctrl_cbus: pinctrl@9880 { compatible = "amlogic,meson8-cbus-pinctrl"; - reg = <0xc1109880 0x10>; + reg = <0x9880 0x10>; #address-cells = <1>; #size-cells = <1>; ranges; - gpio: banks@c11080b0 { - reg = <0xc11080b0 0x28>, - <0xc11080e8 0x18>, - <0xc1108120 0x18>, - <0xc1108030 0x30>; + gpio: banks@80b0 { + reg = <0x80b0 0x28>, + <0x80e8 0x18>, + <0x8120 0x18>, + <0x8030 0x30>; reg-names = "mux", "pull", "pull-enable", "gpio"; gpio-controller; #gpio-cells = <2>; @@ -134,36 +169,41 @@ }; }; }; +}; - pinctrl_aobus: pinctrl@c8100084 { - compatible = "amlogic,meson8-aobus-pinctrl"; - reg = <0xc8100084 0xc>; - #address-cells = <1>; - #size-cells = <1>; - ranges; +ðmac { + clocks = <&clk81>; + clock-names = "stmmaceth"; +}; - gpio_ao: ao-bank@c1108030 { - reg = <0xc8100014 0x4>, - <0xc810002c 0x4>, - <0xc8100024 0x8>; - reg-names = "mux", "pull", "gpio"; - gpio-controller; - #gpio-cells = <2>; - gpio-ranges = <&pinctrl_aobus 0 120 16>; - }; +&i2c_AO { + clocks = <&clk81>; +}; - uart_ao_a_pins: uart_ao_a { - mux { - groups = "uart_tx_ao_a", "uart_rx_ao_a"; - function = "uart_ao"; - }; - }; +&i2c_A { + clocks = <&clk81>; +}; - i2c_ao_pins: i2c_mst_ao { - mux { - groups = "i2c_mst_sck_ao", "i2c_mst_sda_ao"; - function = "i2c_mst_ao"; - }; - }; - }; -}; /* end of / */ +&i2c_B { + clocks = <&clk81>; +}; + +&spifc { + clocks = <&clk81>; +}; + +&uart_AO { + clocks = <&clk81>; +}; + +&uart_A { + clocks = <&clk81>; +}; + +&uart_B { + clocks = <&clk81>; +}; + +&uart_C { + clocks = <&clk81>; +};