From patchwork Tue Jul 16 13:37:49 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Gherzan X-Patchwork-Id: 1132771 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="CDSvJKFV"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 45p1lm2ht7z9sN4 for ; Tue, 16 Jul 2019 23:41:56 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 4CC6AC21E47; Tue, 16 Jul 2019 13:39:55 +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=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 8FE98C21EF2; Tue, 16 Jul 2019 13:38:57 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 2994BC21E47; Tue, 16 Jul 2019 13:38:10 +0000 (UTC) Received: from mail-wm1-f65.google.com (mail-wm1-f65.google.com [209.85.128.65]) by lists.denx.de (Postfix) with ESMTPS id ABB2DC21E34 for ; Tue, 16 Jul 2019 13:38:10 +0000 (UTC) Received: by mail-wm1-f65.google.com with SMTP id 207so18723109wma.1 for ; Tue, 16 Jul 2019 06:38:10 -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=N/bL2xKZsC6fird3kyj/JJ27rQYF8/s3+WKDQjX4VC0=; b=CDSvJKFVK3nPMAUk/x6heAARs/MoIPfsp1QzADE+/R+U9vl+A4CPG1IBM+LxW+ToSl 5PewRdz9OlW4hBsetJNXJVvsu/jwY3fUYmB12Aqf5E+vL9PaDjvou9ebiN5RJS29qL7V fFMqvICeG8hvSNekGiKmzLXSop8b06dAvIozqi0kzV+YStPiuxIZ2+Pdx/uD0rpp/oyW /zNZTyLwO94w7+BnibducUlE/IisaEmyU5ynYdnDyo/do/ZMOf8WuJcWSamzYmi0PaC/ x0C4ky2K/UqyJyNl3MVv4EoWUw0igWpJK6lwrf4NMs/rA/CYKtW2k24V3yV8fYpETIHb Y0yA== 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=N/bL2xKZsC6fird3kyj/JJ27rQYF8/s3+WKDQjX4VC0=; b=uZBwqf1M1dtmnX+hYaRSLZOcTZ7eh/H8v4yaUv2icoS0WNIwMdr7lBMfKHWJRdQ4BP YcPN0KRM18eZsfA2PhkRS2Bm+GMXQiJI8YZyw2ewb3TbjVexIjXVdaCdp4dK7tridXqz p889/vLCp2AsQfnxUpAoJwPzaKPzi/elT9TmA4RpNMTa/LPBLnKdDN4SL+gN1b3jJhRs OjuM8GIGO8/2ShdASciNlqrWKxUUK+NYCg7cXnCS6/S61NMXyvSb6pAvbU7Il/T2DplQ a9mud3W2pANA/jnA9EH6UZnZeoxJYxC0V37BcO3Q7d37HgxPtjUF8ncULdZNBYlXmbJC JCCg== X-Gm-Message-State: APjAAAXNninMQ5Q1MC0tFXifxGPhF1kylKPfDK9nzcWVyrBotNOnQ+6y 1mfpggihRSI3e1CjV1w6dJSJeQ/G X-Google-Smtp-Source: APXvYqwiSF3ZlP/1Jd3oMhG/FMv2+t495RoTBy8nP0wr5Kr9G0d2n3Hb2mB/tOJXa+HSt70bkx8yBw== X-Received: by 2002:a1c:a6c8:: with SMTP id p191mr29246529wme.99.1563284289802; Tue, 16 Jul 2019 06:38:09 -0700 (PDT) Received: from localhost.localdomain ([212.36.34.46]) by smtp.gmail.com with ESMTPSA id e5sm21450292wro.41.2019.07.16.06.38.09 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Tue, 16 Jul 2019 06:38:09 -0700 (PDT) From: andrei@gherzan.ro To: u-boot@lists.denx.de Date: Tue, 16 Jul 2019 14:37:49 +0100 Message-Id: <20190716133803.1174-3-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 02/16] dts: Add initial support for bcm2838 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 Signed-off-by: Andrei Gherzan --- arch/arm/dts/Makefile | 4 +- arch/arm/dts/bcm2838-rpi-4-b.dts | 56 ++++++++ arch/arm/dts/bcm2838.dtsi | 237 +++++++++++++++++++++++++++++++ 3 files changed, 296 insertions(+), 1 deletion(-) create mode 100644 arch/arm/dts/bcm2838-rpi-4-b.dts create mode 100644 arch/arm/dts/bcm2838.dtsi diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index 20dbc2ff84..16790af1e1 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile @@ -749,7 +749,9 @@ dtb-$(CONFIG_ARCH_BCM283X) += \ bcm2837-rpi-3-a-plus.dtb \ bcm2837-rpi-3-b.dtb \ bcm2837-rpi-3-b-plus.dtb \ - bcm2837-rpi-cm3-io3.dtb + bcm2837-rpi-cm3-io3.dtb \ + bcm2837-rpi-3-b.dtb \ + bcm2838-rpi-4-b.dtb dtb-$(CONFIG_ARCH_BCM63158) += \ bcm963158.dtb diff --git a/arch/arm/dts/bcm2838-rpi-4-b.dts b/arch/arm/dts/bcm2838-rpi-4-b.dts new file mode 100644 index 0000000000..07e9a78e8d --- /dev/null +++ b/arch/arm/dts/bcm2838-rpi-4-b.dts @@ -0,0 +1,56 @@ +/dts-v1/; +#include "bcm2838.dtsi" + +/ { + compatible = "raspberrypi,4-model-b","brcm,bcm2838","brcm,bcm2837"; + model = "Raspberry Pi 4 Model B"; + + memory { + reg = <0 0 0x40000000>; + }; + + leds { + act { + gpios = <&gpio 47 0>; + }; + }; +}; + +/* uart0 communicates with the BT module */ +&uart0 { + pinctrl-names = "default"; + pinctrl-0 = <&uart0_gpio32 &gpclk2_gpio43>; + status = "okay"; +}; + +/* uart1 is mapped to the pin header */ +&uart1 { + pinctrl-names = "default"; + pinctrl-0 = <&uart1_pins>; + status = "okay"; +}; + +/* SDHCI is used to control the SDIO for wireless */ +&sdhci { + pinctrl-names = "default"; + pinctrl-0 = <&emmc_gpio34>; + status = "okay"; + bus-width = <4>; + non-removable; +}; + +/* SDHOST is used to drive the SD card */ +&sdhost { + pinctrl-names = "default"; + pinctrl-0 = <&sdhost_gpio48>; + status = "okay"; + bus-width = <4>; +}; + +&gpio { + uart1_pins: uart1_pins { + brcm,pins; + brcm,function; + brcm,pull; + }; +}; diff --git a/arch/arm/dts/bcm2838.dtsi b/arch/arm/dts/bcm2838.dtsi new file mode 100644 index 0000000000..19b2d7b905 --- /dev/null +++ b/arch/arm/dts/bcm2838.dtsi @@ -0,0 +1,237 @@ +#include "bcm283x.dtsi" +#include +#include + +/ { + compatible = "brcm,bcm2838"; + + #address-cells = <2>; + #size-cells = <1>; + + interrupt-parent = <&gic>; + + soc { + ranges = <0x7e000000 0x0 0xfe000000 0x01800000>, + <0x7c000000 0x0 0xfc000000 0x02000000>, + <0x40000000 0x0 0xff800000 0x00800000>; + dma-ranges = <0xc0000000 0x0 0x00000000 0x3c000000>; + + gic: gic400@40041000 { + interrupt-controller; + #interrupt-cells = <3>; + compatible = "arm,gic-400"; + reg = <0x40041000 0x1000>, + <0x40042000 0x2000>, + <0x40044000 0x2000>, + <0x40046000 0x2000>; + }; + + thermal: thermal@7d5d2200 { + compatible = "brcm,avs-tmon-bcm2838"; + reg = <0x7d5d2200 0x2c>; + interrupts = ; + interrupt-names = "tmon"; + clocks = <&clocks BCM2835_CLOCK_TSENS>; + #thermal-sensor-cells = <0>; + status = "okay"; + }; + + spi@7e204000 { + reg = <0x7e204000 0x0200>; + interrupts = ; + }; + + pixelvalve@7e206000 { + interrupts = ; + }; + + pixelvalve@7e207000 { + interrupts = ; + }; + + hvs@7e400000 { + interrupts = ; + }; + + emmc2: emmc2@7e340000 { + compatible = "brcm,bcm2711-emmc2"; + status = "okay"; + interrupts = ; + clocks = <&clocks BCM2838_CLOCK_EMMC2>; + reg = <0x7e340000 0x100>; + }; + + pixelvalve@7e807000 { + interrupts = ; + }; + + }; + + arm-pmu { + /* + * N.B. the A72 PMU support only exists in arch/arm64, hence + * the fallback to the A53 version. + */ + compatible = "arm,cortex-a72-pmu", "arm,cortex-a53-pmu"; + interrupts = , + , + , + ; + }; + + timer { + compatible = "arm,armv7-timer"; + interrupts = , + , + , + ; + arm,cpu-registers-not-fw-configured; + always-on; + }; + + cpus: cpus { + #address-cells = <1>; + #size-cells = <0>; + enable-method = "brcm,bcm2836-smp"; // for ARM 32-bit + + cpu0: cpu@0 { + device_type = "cpu"; + compatible = "arm,cortex-a72"; + reg = <0>; + enable-method = "spin-table"; + cpu-release-addr = <0x0 0x000000d8>; + }; + + cpu1: cpu@1 { + device_type = "cpu"; + compatible = "arm,cortex-a72"; + reg = <1>; + enable-method = "spin-table"; + cpu-release-addr = <0x0 0x000000e0>; + }; + + cpu2: cpu@2 { + device_type = "cpu"; + compatible = "arm,cortex-a72"; + reg = <2>; + enable-method = "spin-table"; + cpu-release-addr = <0x0 0x000000e8>; + }; + + cpu3: cpu@3 { + device_type = "cpu"; + compatible = "arm,cortex-a72"; + reg = <3>; + enable-method = "spin-table"; + cpu-release-addr = <0x0 0x000000f0>; + }; + }; +}; + +&clk_osc { + clock-frequency = <54000000>; +}; + +&clocks { + compatible = "brcm,bcm2838-cprman"; +}; + +&cpu_thermal { + coefficients = <(-487) 410040>; +}; + +&dsi0 { + interrupts = ; +}; + +&dsi1 { + interrupts = ; +}; + +&gpio { + compatible = "brcm,bcm2838-gpio", "brcm,bcm2835-gpio"; + interrupts = , + , + , + ; +}; + +&vec { + interrupts = ; +}; + +&usb { + interrupts = ; +}; + +&hdmi { + interrupts = , + ; +}; + +&uart1 { + interrupts = ; +}; + +&spi1 { + interrupts = ; +}; + +&spi2 { + interrupts = ; +}; + +&i2c0 { + interrupts = ; +}; + +&i2c1 { + interrupts = ; +}; + +&i2c2 { + interrupts = ; +}; + +&mailbox { + interrupts = ; +}; + +&sdhost { + interrupts = ; +}; + +&uart0 { + interrupts = ; +}; + +&dma { + reg = <0x7e007000 0xb00>; + interrupts = , + , + , + , + , + , + , + , /* dmalite 7 */ + , /* dmalite 8 */ + , /* dmalite 9 */ + ; /* dmalite 10 */ + interrupt-names = "dma0", + "dma1", + "dma2", + "dma3", + "dma4", + "dma5", + "dma6", + "dma7", + "dma8", + "dma9", + "dma10"; + brcm,dma-channel-mask = <0x07f5>; +};