Merge tag 'arm-soc/for-4.20/devicetree' of https://github.com/Broadcom/stblinux into...
authorOlof Johansson <olof@lixom.net>
Sun, 23 Sep 2018 13:24:28 +0000 (06:24 -0700)
committerOlof Johansson <olof@lixom.net>
Sun, 23 Sep 2018 13:24:28 +0000 (06:24 -0700)
This pull request contains Broadcom ARM-based SoCs Device Tree changes
for 4.20, please pull the following:

- Rafal updates the Broadcom BCM5301x (Northstar) DTS files to use the
  new style partition parser and removes the unsupported/undocumented
  linux,part-probe properties that were previously introduced

- Stefan adds supports for the Raspberry Pi Compute Module 3/3Lite, he
  also updates the Raspberry Pi 3B+ USB Ethernet adapter to have proper
  LED configuration

- Rob fixes a bunch of SPI bus warnings in the Northstar Plus and
  Hurricane 2 DTS files

- Florian documents the Broadcom roboswitch Switch Register Access Block
  (SRAB) interrupts, adds the switch interrupts to the Northstar Plus
  DTS include file and finally updates the BCM958625HR reference board to
  have the proper SFP module definition

* tag 'arm-soc/for-4.20/devicetree' of https://github.com/Broadcom/stblinux:
  ARM: dts: bcm: Fix SPI bus warnings
  ARM: dts: NSP: Wire up switch interrupts
  dt-bindings: net: dsa: Document B53 SRAB interrupts and registers
  ARM: dts: NSP: Enable SFP on bcm958625hr
  ARM: dts: bcm283x-rpi-lan7515: Enable Ethernet LEDs
  ARM: dts: BCM5301X: Specify flash partitions
  ARM: dts: add Raspberry Pi Compute Module 3 and IO board
  dt-bindings: bcm: Add Raspberry Pi CM3 and CM3L

Signed-off-by: Olof Johansson <olof@lixom.net>
14 files changed:
Documentation/devicetree/bindings/arm/bcm/brcm,bcm2835.txt
Documentation/devicetree/bindings/net/dsa/b53.txt
arch/arm/boot/dts/Makefile
arch/arm/boot/dts/bcm-hr2.dtsi
arch/arm/boot/dts/bcm-nsp.dtsi
arch/arm/boot/dts/bcm2837-rpi-cm3-io3.dts [new file with mode: 0644]
arch/arm/boot/dts/bcm2837-rpi-cm3.dtsi [new file with mode: 0644]
arch/arm/boot/dts/bcm283x-rpi-lan7515.dtsi
arch/arm/boot/dts/bcm47081-tplink-archer-c5-v2.dts
arch/arm/boot/dts/bcm4709-asus-rt-ac87u.dts
arch/arm/boot/dts/bcm4709-tplink-archer-c9-v1.dts
arch/arm/boot/dts/bcm5301x-nand-cs0.dtsi
arch/arm/boot/dts/bcm5301x.dtsi
arch/arm/boot/dts/bcm958625hr.dts

index 1e3e29a545e263470fff686f036361ddaf48abfa..0dcc3ea5adff4d5aea7402bc3f3d235a1744f298 100644 (file)
@@ -42,6 +42,14 @@ Raspberry Pi Compute Module
 Required root node properties:
 compatible = "raspberrypi,compute-module", "brcm,bcm2835";
 
+Raspberry Pi Compute Module 3
+Required root node properties:
+compatible = "raspberrypi,3-compute-module", "brcm,bcm2837";
+
+Raspberry Pi Compute Module 3 Lite
+Required root node properties:
+compatible = "raspberrypi,3-compute-module-lite", "brcm,bcm2837";
+
 Raspberry Pi Zero
 Required root node properties:
 compatible = "raspberrypi,model-zero", "brcm,bcm2835";
index 1811e1972a7a1c9a162d51b5997bf36279a8a3ac..5201bc15fdd67c1df1ba1b49715d4563cc14dbbd 100644 (file)
@@ -46,6 +46,42 @@ Required properties:
       "brcm,bcm6328-switch"
       "brcm,bcm6368-switch" and the mandatory "brcm,bcm63xx-switch"
 
+Required properties for BCM585xx/586xx/88312 SoCs:
+
+ - reg: a total of 3 register base addresses, the first one must be the
+   Switch Register Access block base, the second is the port 5/4 mux
+   configuration register and the third one is the SGMII configuration
+   and status register base address.
+
+ - interrupts: a total of 13 interrupts must be specified, in the following
+   order: port 0-5, 7-8 link status change, then the integrated PHY interrupt,
+   then the timestamping interrupt and the sleep timer interrupts for ports
+   5,7,8.
+
+Optional properties for BCM585xx/586xx/88312 SoCs:
+
+  - reg-names: a total of 3 names matching the 3 base register address, must
+    be in the following order:
+       "srab"
+       "mux_config"
+       "sgmii_config"
+
+  - interrupt-names: a total of 13 names matching the 13 interrupts specified
+    must be in the following order:
+       "link_state_p0"
+       "link_state_p1"
+       "link_state_p2"
+       "link_state_p3"
+       "link_state_p4"
+       "link_state_p5"
+       "link_state_p7"
+       "link_state_p8"
+       "phy"
+       "ts"
+       "imp_sleep_timer_p5"
+       "imp_sleep_timer_p7"
+       "imp_sleep_timer_p8"
+
 See Documentation/devicetree/bindings/net/dsa/dsa.txt for a list of additional
 required and optional properties.
 
index 1036d396da83673eaed788039b16bd20be7e1a06..4009fc30aa31cc1c7fc75167efb75f2d33c6c282 100644 (file)
@@ -81,6 +81,7 @@ dtb-$(CONFIG_ARCH_BCM2835) += \
        bcm2836-rpi-2-b.dtb \
        bcm2837-rpi-3-b.dtb \
        bcm2837-rpi-3-b-plus.dtb \
+       bcm2837-rpi-cm3-io3.dtb \
        bcm2835-rpi-zero.dtb \
        bcm2835-rpi-zero-w.dtb
 dtb-$(CONFIG_ARCH_BCM_5301X) += \
index 3084a7c957339f0edc2fef97d203b08635c96790..e4d49731287f693ae94c39239b5d51bac1bfc46c 100644 (file)
                        reg = <0x33000 0x14>;
                };
 
-               qspi: qspi@27200 {
+               qspi: spi@27200 {
                        compatible = "brcm,spi-bcm-qspi", "brcm,spi-nsp-qspi";
                        reg = <0x027200 0x184>,
                              <0x027000 0x124>,
index 09ba8504632284532e3b17c6d1531e2d732fadc4..2fd111d9d59c56e087fc1af317806a2d1f438435 100644 (file)
                        brcm,nand-has-wp;
                };
 
-               qspi: qspi@27200 {
+               qspi: spi@27200 {
                        compatible = "brcm,spi-bcm-qspi", "brcm,spi-nsp-qspi";
                        reg = <0x027200 0x184>,
                              <0x027000 0x124>,
 
                srab: srab@36000 {
                        compatible = "brcm,nsp-srab";
-                       reg = <0x36000 0x1000>;
+                       reg = <0x36000 0x1000>,
+                             <0x3f308 0x8>,
+                             <0x3f410 0xc>;
+                       reg-names = "srab", "mux_config", "sgmii";
+                       interrupts = <GIC_SPI 95 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupt-names = "link_state_p0",
+                                         "link_state_p1",
+                                         "link_state_p2",
+                                         "link_state_p3",
+                                         "link_state_p4",
+                                         "link_state_p5",
+                                         "link_state_p7",
+                                         "link_state_p8",
+                                         "phy",
+                                         "ts",
+                                         "imp_sleep_timer_p5",
+                                         "imp_sleep_timer_p7",
+                                         "imp_sleep_timer_p8";
                        #address-cells = <1>;
                        #size-cells = <0>;
 
diff --git a/arch/arm/boot/dts/bcm2837-rpi-cm3-io3.dts b/arch/arm/boot/dts/bcm2837-rpi-cm3-io3.dts
new file mode 100644 (file)
index 0000000..6c8233a
--- /dev/null
@@ -0,0 +1,87 @@
+// SPDX-License-Identifier: GPL-2.0
+/dts-v1/;
+#include "bcm2837-rpi-cm3.dtsi"
+#include "bcm283x-rpi-usb-host.dtsi"
+
+/ {
+       compatible = "raspberrypi,3-compute-module", "brcm,bcm2837";
+       model = "Raspberry Pi Compute Module 3 IO board V3.0";
+};
+
+&gpio {
+       /*
+        * This is based on the official GPU firmware DT blob.
+        *
+        * Legend:
+        * "NC" = not connected (no rail from the SoC)
+        * "FOO" = GPIO line named "FOO" on the schematic
+        * "FOO_N" = GPIO line named "FOO" on schematic, active low
+        */
+       gpio-line-names = "GPIO0",
+                         "GPIO1",
+                         "GPIO2",
+                         "GPIO3",
+                         "GPIO4",
+                         "GPIO5",
+                         "GPIO6",
+                         "GPIO7",
+                         "GPIO8",
+                         "GPIO9",
+                         "GPIO10",
+                         "GPIO11",
+                         "GPIO12",
+                         "GPIO13",
+                         "GPIO14",
+                         "GPIO15",
+                         "GPIO16",
+                         "GPIO17",
+                         "GPIO18",
+                         "GPIO19",
+                         "GPIO20",
+                         "GPIO21",
+                         "GPIO22",
+                         "GPIO23",
+                         "GPIO24",
+                         "GPIO25",
+                         "GPIO26",
+                         "GPIO27",
+                         "GPIO28",
+                         "GPIO29",
+                         "GPIO30",
+                         "GPIO31",
+                         "GPIO32",
+                         "GPIO33",
+                         "GPIO34",
+                         "GPIO35",
+                         "GPIO36",
+                         "GPIO37",
+                         "GPIO38",
+                         "GPIO39",
+                         "GPIO40",
+                         "GPIO41",
+                         "GPIO42",
+                         "GPIO43",
+                         "GPIO44",
+                         "GPIO45",
+                         "GPIO46",
+                         "GPIO47",
+                         /* Used by eMMC */
+                         "SD_CLK_R",
+                         "SD_CMD_R",
+                         "SD_DATA0_R",
+                         "SD_DATA1_R",
+                         "SD_DATA2_R",
+                         "SD_DATA3_R";
+
+       pinctrl-0 = <&gpioout &alt0>;
+};
+
+&hdmi {
+       hpd-gpios = <&expgpio 1 GPIO_ACTIVE_LOW>;
+};
+
+&uart0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart0_gpio14>;
+       status = "okay";
+};
diff --git a/arch/arm/boot/dts/bcm2837-rpi-cm3.dtsi b/arch/arm/boot/dts/bcm2837-rpi-cm3.dtsi
new file mode 100644 (file)
index 0000000..7b7ab6a
--- /dev/null
@@ -0,0 +1,52 @@
+// SPDX-License-Identifier: GPL-2.0
+/dts-v1/;
+#include "bcm2837.dtsi"
+#include "bcm2835-rpi.dtsi"
+
+/ {
+       memory {
+               reg = <0 0x40000000>;
+       };
+
+       reg_3v3: fixed-regulator {
+               compatible = "regulator-fixed";
+               regulator-name = "3V3";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+               regulator-always-on;
+       };
+
+       reg_1v8: fixed-regulator {
+               compatible = "regulator-fixed";
+               regulator-name = "1V8";
+               regulator-min-microvolt = <1800000>;
+               regulator-max-microvolt = <1800000>;
+               regulator-always-on;
+       };
+};
+
+&firmware {
+       expgpio: gpio {
+               compatible = "raspberrypi,firmware-gpio";
+               gpio-controller;
+               #gpio-cells = <2>;
+               gpio-line-names = "HDMI_HPD_N",
+                                 "EMMC_EN_N",
+                                 "NC",
+                                 "NC",
+                                 "NC",
+                                 "NC",
+                                 "NC",
+                                 "NC";
+               status = "okay";
+       };
+};
+
+&sdhost {
+       pinctrl-names = "default";
+       pinctrl-0 = <&sdhost_gpio48>;
+       bus-width = <4>;
+       vmmc-supply = <&reg_3v3>;
+       vqmmc-supply = <&reg_1v8>;
+       status = "okay";
+};
index 9403da0990d07b8f021096ff01b86d660aa36efb..70bece63f9a741d5f4cc4f501905bcab46b8b9c1 100644 (file)
@@ -1,4 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0
+#include <dt-bindings/net/microchip-lan78xx.h>
+
 / {
        aliases {
                ethernet0 = &ethernet;
                        ethernet: ethernet@1 {
                                compatible = "usb424,7800";
                                reg = <1>;
+
+                               mdio {
+                                       #address-cells = <0x1>;
+                                       #size-cells = <0x0>;
+                                       eth_phy: ethernet-phy@1 {
+                                               reg = <1>;
+                                               microchip,led-modes = <
+                                                       LAN78XX_LINK_1000_ACTIVITY
+                                                       LAN78XX_LINK_10_100_ACTIVITY
+                                               >;
+                                       };
+                               };
                        };
                };
        };
index 5f663f848db1fabb66c0fd8eb376f9601481296a..189cc3dcd6ef869065ea3dc9b633d92d062c6efd 100644 (file)
 
 &spi_nor {
        status = "okay";
+
+       partitions {
+               compatible = "fixed-partitions";
+               #address-cells = <1>;
+               #size-cells = <1>;
+
+               boot@0 {
+                       label = "boot";
+                       reg = <0x000000 0x040000>;
+                       read-only;
+               };
+
+               os-image@100000 {
+                       label = "os-image";
+                       reg = <0x040000 0x200000>;
+                       compatible = "brcm,trx";
+               };
+
+               rootfs@240000 {
+                       label = "rootfs";
+                       reg = <0x240000 0xc00000>;
+               };
+
+               nvram@ff0000 {
+                       label = "nvram";
+                       reg = <0xff0000 0x010000>;
+               };
+       };
 };
 
 &usb2 {
index 2033411240c78ce9ffdf0c70d36a7b9b3dbfb703..4cb10f88a95eafc1e51c501d4591704a4256a971 100644 (file)
 &usb3_phy {
        status = "okay";
 };
+
+&nandcs {
+       partitions {
+               compatible = "fixed-partitions";
+               #address-cells = <1>;
+               #size-cells = <1>;
+
+               boot@0 {
+                       label = "boot";
+                       reg = <0x00000000 0x00080000>;
+                       read-only;
+               };
+
+               nvram@80000 {
+                       label = "nvram";
+                       reg = <0x00080000 0x00180000>;
+               };
+
+               firmware@200000 {
+                       label = "firmware";
+                       reg = <0x00200000 0x07cc0000>;
+                       compatible = "brcm,trx";
+               };
+
+               asus@7ec0000 {
+                       label = "asus";
+                       reg = <0x07ec0000 0x00140000>;
+                       read-only;
+               };
+       };
+};
index c7143a9daa1a961c1c013ec688c5c15c9dd4d127..b527d2ff987ed36b4564245974375b84b9617f06 100644 (file)
 
 &spi_nor {
        status = "okay";
+
+       partitions {
+               compatible = "fixed-partitions";
+               #address-cells = <1>;
+               #size-cells = <1>;
+
+               boot@0 {
+                       label = "boot";
+                       reg = <0x000000 0x040000>;
+                       read-only;
+               };
+
+               os-image@100000 {
+                       label = "os-image";
+                       reg = <0x040000 0x200000>;
+                       compatible = "brcm,trx";
+               };
+
+               rootfs@240000 {
+                       label = "rootfs";
+                       reg = <0x240000 0xc00000>;
+               };
+
+               nvram@ff0000 {
+                       label = "nvram";
+                       reg = <0xff0000 0x010000>;
+               };
+       };
 };
 
 &usb3_phy {
index e5a2d62daf9267c990c9a79bc9ae466568f1bd9a..925a7c9ce5b7f42bdd21525b566bd3bc5c7aa240 100644 (file)
                        reg = <0>;
                        #address-cells = <1>;
                        #size-cells = <1>;
+
+                       partitions {
+                               compatible = "brcm,bcm947xx-cfe-partitions";
+                       };
                };
        };
 };
index bc607d11eef8e958f654ced7c22e7a409a5fbdff..7a5c188c2676a140aeb542750b25463b0c2d71b3 100644 (file)
                        compatible = "jedec,spi-nor";
                        reg = <0>;
                        spi-max-frequency = <20000000>;
-                       linux,part-probe = "ofpart", "bcm47xxpart";
                        status = "disabled";
+
+                       partitions {
+                               compatible = "brcm,bcm947xx-cfe-partitions";
+                       };
                };
        };
 
index ea3fc194f8f37ea4bea411922372eac32e82852e..a53a2f629d74198a5c3f4e5d27f0ba5954c0950a 100644 (file)
                open-source;
                priority = <200>;
        };
+
+       /* Hardware I2C block cannot do more than 63 bytes per transfer,
+        * which would prevent reading from a SFP's EEPROM (256 byte).
+        */
+       i2c1: i2c {
+               compatible = "i2c-gpio";
+               sda-gpios = <&gpioa 5 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+               scl-gpios = <&gpioa 4 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+       };
+
+       sfp: sfp {
+               compatible = "sff,sfp";
+               i2c-bus = <&i2c1>;
+               mod-def0-gpios = <&gpioa 28 GPIO_ACTIVE_LOW>;
+               los-gpios = <&gpioa 24 GPIO_ACTIVE_HIGH>;
+               tx-fault-gpios = <&gpioa 30 GPIO_ACTIVE_HIGH>;
+               tx-disable-gpios = <&gpioa 26 GPIO_ACTIVE_HIGH>;
+       };
 };
 
 &amac0 {
                        reg = <4>;
                };
 
+               port@5 {
+                       label = "sfp";
+                       phy-mode = "sgmii";
+                       reg = <5>;
+                       sfp = <&sfp>;
+                       managed = "in-band-status";
+               };
+
                port@8 {
                        ethernet = <&amac2>;
                        label = "cpu";