From patchwork Tue Jul 16 13:37:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Gherzan X-Patchwork-Id: 1132768 X-Patchwork-Delegate: matthias.bgg@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=gherzan.ro Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=gherzan.ro header.i=@gherzan.ro header.b="TG5sK2xT"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 45p1hX59f2z9sN4 for ; Tue, 16 Jul 2019 23:39:08 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 32F73C21F5E; Tue, 16 Jul 2019 13:38:58 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_IN_MSPIKE_H2, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 4826EC21E47; Tue, 16 Jul 2019 13:38:56 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id BAA1AC21E5B; Tue, 16 Jul 2019 13:38:09 +0000 (UTC) Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by lists.denx.de (Postfix) with ESMTPS id 67BBEC21E47 for ; Tue, 16 Jul 2019 13:38:09 +0000 (UTC) Received: by mail-wr1-f68.google.com with SMTP id z1so20963213wru.13 for ; Tue, 16 Jul 2019 06:38:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gherzan.ro; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=sripBuNDmo08SBMWDGtwqhw8nJzj0nSlSLOrf+gqh+I=; b=TG5sK2xTS+4eIchVV8bAoiYsE8+MVayJwYQgldJPjdv3C43bQUIfO8kernfy0YaUyH vSjlWxypdYA/5Nm/eESctHNMe92XjpzVhoX2wem99ns6UAyMqHqPoNv5/OQzIStNuH0c MjK+YHDNqR4PtgdbHkpDHRmVjCspqOnMuUv2GljuI/izmHiaMBxzgtWVRiPF7hR2PE/Q m8TOOLBqRyfCBUmEXhao65TRH2FS63SpjQQwFmA4FYLnLN1uePgQ/2m3qbjVgb0yM3+D XicWE803ay0bgEsH2qW7kEZTO7qe6JRujukzZQCxdrc4/cUz0WOgdPYKA0ue2jeDJcWA cANg== 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:mime-version:content-transfer-encoding; bh=sripBuNDmo08SBMWDGtwqhw8nJzj0nSlSLOrf+gqh+I=; b=gO5DBj6n/lXGoVWDl4AvKpHyROd/SeArQHkxwgsASnnflLrahwSRSfRbmppHlRpjLJ BBMHKiyiRa0LP2FMOnQQ8K5avpVrl4E1p1KHFJIYrYN/Pr0pTSCZyMENr3FOdYHql54R MUNFbVfSU1iT9u/I4pDs1TpCm2QJxHq5/7bIjObZiIJJ0uJxjyaXHnhD7OX1+ur5W8c8 xYJybUgoAJ/fFuPKn3s4XW2CSiw1ATZZQqzaodIXaLa+V7Px3e//aBSIOyoN9igUBn/K wTQzsc65hDR+6YvHFgvWMnplZwXzCgve9m9xIq5bRwW6+ODU7MskdpLl4r1+QOtOeEBz WzXA== X-Gm-Message-State: APjAAAVyaQ/n5IipQdeetmN3dQA+BrKjQMcKXFoN7yVx9vwvXbdOumPi cohSu3QOaMjRoSOMf+LH25Sjrf8/ X-Google-Smtp-Source: APXvYqzrDhsfkz8g0lzUYLircXXdW3laOHtITTUVovTeOj7co/9HZOmCBuch2YGp7LXCSfcA49MaxA== X-Received: by 2002:adf:80e1:: with SMTP id 88mr35285559wrl.127.1563284288647; Tue, 16 Jul 2019 06:38:08 -0700 (PDT) Received: from localhost.localdomain ([212.36.34.46]) by smtp.gmail.com with ESMTPSA id e5sm21450292wro.41.2019.07.16.06.38.08 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Tue, 16 Jul 2019 06:38:08 -0700 (PDT) From: andrei@gherzan.ro To: u-boot@lists.denx.de Date: Tue, 16 Jul 2019 14:37:48 +0100 Message-Id: <20190716133803.1174-2-andrei@gherzan.ro> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190716133803.1174-1-andrei@gherzan.ro> References: <20190716133803.1174-1-andrei@gherzan.ro> MIME-Version: 1.0 X-Mailman-Approved-At: Tue, 16 Jul 2019 13:38:53 +0000 Cc: Andrei Gherzan Subject: [U-Boot] [PATCH 01/16] dts: Create a dtsi for BCM2835/6/7 specific configuration X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" From: Andrei Gherzan This follows a similar change in kernel[1]. The change moves configuration that was not applicable for all bcm2835/6/7/8 out of bcm283x.dtsi. The new file is bcm2835-common.dtsi and contains conifguration that is common for bcm2835/6/7 (not bcm2838). [1] https://github.com/raspberrypi/linux/commit/769a7330aa5bebcc98b1ff12ecb767db4e5c644d#diff-5979fba23a5bab2cf66dde09db872dfc Signed-off-by: Andrei Gherzan --- arch/arm/dts/bcm2835-common.dtsi | 53 ++++++++++++++++++++++++++++++++ arch/arm/dts/bcm2835.dtsi | 1 + arch/arm/dts/bcm2836.dtsi | 1 + arch/arm/dts/bcm2837.dtsi | 1 + arch/arm/dts/bcm283x.dtsi | 45 +-------------------------- 5 files changed, 57 insertions(+), 44 deletions(-) create mode 100644 arch/arm/dts/bcm2835-common.dtsi diff --git a/arch/arm/dts/bcm2835-common.dtsi b/arch/arm/dts/bcm2835-common.dtsi new file mode 100644 index 0000000000..17771730a3 --- /dev/null +++ b/arch/arm/dts/bcm2835-common.dtsi @@ -0,0 +1,53 @@ +// SPDX-License-Identifier: GPL-2.0 + +/* This include file covers the common peripherals and configuration between + * bcm2835, bcm2836 and bcm2837 implementations. + */ + +/ { + soc { + timer@7e003000 { + compatible = "brcm,bcm2835-system-timer"; + reg = <0x7e003000 0x1000>; + interrupts = <1 0>, <1 1>, <1 2>, <1 3>; + /* This could be a reference to BCM2835_CLOCK_TIMER, + * but we don't have the driver using the common clock + * support yet. + */ + clock-frequency = <1000000>; + }; + + intc: interrupt-controller@7e00b200 { + compatible = "brcm,bcm2835-armctrl-ic"; + reg = <0x7e00b200 0x200>; + interrupt-controller; + #interrupt-cells = <2>; + }; + + thermal: thermal@7e212000 { + compatible = "brcm,bcm2835-thermal"; + reg = <0x7e212000 0x8>; + clocks = <&clocks BCM2835_CLOCK_TSENS>; + #thermal-sensor-cells = <0>; + status = "disabled"; + }; + + v3d: v3d@7ec00000 { + compatible = "brcm,bcm2835-v3d"; + reg = <0x7ec00000 0x1000>; + interrupts = <1 10>; + }; + }; +}; + +&gpio { + i2c_slave_gpio18: i2c_slave_gpio18 { + brcm,pins = <18 19 20 21>; + brcm,function = ; + }; + + jtag_gpio4: jtag_gpio4 { + brcm,pins = <4 5 6 12 13>; + brcm,function = ; + }; +}; diff --git a/arch/arm/dts/bcm2835.dtsi b/arch/arm/dts/bcm2835.dtsi index a5c3824c80..53bf4579cc 100644 --- a/arch/arm/dts/bcm2835.dtsi +++ b/arch/arm/dts/bcm2835.dtsi @@ -1,5 +1,6 @@ // SPDX-License-Identifier: GPL-2.0 #include "bcm283x.dtsi" +#include "bcm2835-common.dtsi" / { compatible = "brcm,bcm2835"; diff --git a/arch/arm/dts/bcm2836.dtsi b/arch/arm/dts/bcm2836.dtsi index c933e84138..82d6c4662a 100644 --- a/arch/arm/dts/bcm2836.dtsi +++ b/arch/arm/dts/bcm2836.dtsi @@ -1,5 +1,6 @@ // SPDX-License-Identifier: GPL-2.0 #include "bcm283x.dtsi" +#include "bcm2835-common.dtsi" / { compatible = "brcm,bcm2836"; diff --git a/arch/arm/dts/bcm2837.dtsi b/arch/arm/dts/bcm2837.dtsi index beb6c502da..9e95fee78e 100644 --- a/arch/arm/dts/bcm2837.dtsi +++ b/arch/arm/dts/bcm2837.dtsi @@ -1,4 +1,5 @@ #include "bcm283x.dtsi" +#include "bcm2835-common.dtsi" / { compatible = "brcm,bcm2837"; diff --git a/arch/arm/dts/bcm283x.dtsi b/arch/arm/dts/bcm283x.dtsi index 9777644c6c..a024727e4d 100644 --- a/arch/arm/dts/bcm283x.dtsi +++ b/arch/arm/dts/bcm283x.dtsi @@ -56,17 +56,6 @@ #address-cells = <1>; #size-cells = <1>; - timer@7e003000 { - compatible = "brcm,bcm2835-system-timer"; - reg = <0x7e003000 0x1000>; - interrupts = <1 0>, <1 1>, <1 2>, <1 3>; - /* This could be a reference to BCM2835_CLOCK_TIMER, - * but we don't have the driver using the common clock - * support yet. - */ - clock-frequency = <1000000>; - }; - txp@7e004000 { compatible = "brcm,bcm2835-txp"; reg = <0x7e004000 0x20>; @@ -114,13 +103,6 @@ brcm,dma-channel-mask = <0x7f35>; }; - intc: interrupt-controller@7e00b200 { - compatible = "brcm,bcm2835-armctrl-ic"; - reg = <0x7e00b200 0x200>; - interrupt-controller; - #interrupt-cells = <2>; - }; - pm: watchdog@7e100000 { compatible = "brcm,bcm2835-pm", "brcm,bcm2835-pm-wdt"; #power-domain-cells = <1>; @@ -184,8 +166,7 @@ interrupt-controller; #interrupt-cells = <2>; - /* Defines pin muxing groups according to - * BCM2835-ARM-Peripherals.pdf page 102. + /* Defines common pin muxing groups * * While each pin can have its mux selected * for various functions individually, some @@ -263,15 +244,6 @@ brcm,pins = <44 45>; brcm,function = ; }; - i2c_slave_gpio18: i2c_slave_gpio18 { - brcm,pins = <18 19 20 21>; - brcm,function = ; - }; - - jtag_gpio4: jtag_gpio4 { - brcm,pins = <4 5 6 12 13>; - brcm,function = ; - }; jtag_gpio22: jtag_gpio22 { brcm,pins = <22 23 24 25 26 27>; brcm,function = ; @@ -488,14 +460,6 @@ }; - thermal: thermal@7e212000 { - compatible = "brcm,bcm2835-thermal"; - reg = <0x7e212000 0x8>; - clocks = <&clocks BCM2835_CLOCK_TSENS>; - #thermal-sensor-cells = <0>; - status = "disabled"; - }; - aux: aux@7e215000 { compatible = "brcm,bcm2835-aux"; #clock-cells = <1>; @@ -635,13 +599,6 @@ phy-names = "usb2-phy"; }; - v3d: v3d@7ec00000 { - compatible = "brcm,bcm2835-v3d"; - reg = <0x7ec00000 0x1000>; - interrupts = <1 10>; - power-domains = <&pm BCM2835_POWER_DOMAIN_GRAFX_V3D>; - }; - vc4: gpu { compatible = "brcm,bcm2835-vc4"; };