]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
ARM: dts: bcm283x: Move BCM2835/6/7 specific to bcm2835-common.dtsi
authorStefan Wahren <wahrenst@gmx.net>
Sat, 17 Aug 2019 16:08:09 +0000 (18:08 +0200)
committerStefan Wahren <wahrenst@gmx.net>
Thu, 10 Oct 2019 17:13:02 +0000 (19:13 +0200)
As preparation we want all common BCM2711 + BCM2835/6/7 functions in
bcm283x.dtsi and all BCM2835/6/7 specific in the new
bcm2835-common.dtsi. Since i2c2 is BCM2835 specific, we also need
to move it to bcm2835-common.dtsi.

Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
Acked-by: Eric Anholt <eric@anholt.net>
arch/arm/boot/dts/bcm2835-common.dtsi [new file with mode: 0644]
arch/arm/boot/dts/bcm2835-rpi.dtsi
arch/arm/boot/dts/bcm2835.dtsi
arch/arm/boot/dts/bcm2836.dtsi
arch/arm/boot/dts/bcm2837.dtsi
arch/arm/boot/dts/bcm283x.dtsi

diff --git a/arch/arm/boot/dts/bcm2835-common.dtsi b/arch/arm/boot/dts/bcm2835-common.dtsi
new file mode 100644 (file)
index 0000000..fe1ab40
--- /dev/null
@@ -0,0 +1,194 @@
+// SPDX-License-Identifier: GPL-2.0
+
+/* This include file covers the common peripherals and configuration between
+ * bcm2835, bcm2836 and bcm2837 implementations.
+ */
+
+/ {
+       interrupt-parent = <&intc>;
+
+       soc {
+               dma: dma@7e007000 {
+                       compatible = "brcm,bcm2835-dma";
+                       reg = <0x7e007000 0xf00>;
+                       interrupts = <1 16>,
+                                    <1 17>,
+                                    <1 18>,
+                                    <1 19>,
+                                    <1 20>,
+                                    <1 21>,
+                                    <1 22>,
+                                    <1 23>,
+                                    <1 24>,
+                                    <1 25>,
+                                    <1 26>,
+                                    /* dma channel 11-14 share one irq */
+                                    <1 27>,
+                                    <1 27>,
+                                    <1 27>,
+                                    <1 27>,
+                                    /* unused shared irq for all channels */
+                                    <1 28>;
+                       interrupt-names = "dma0",
+                                         "dma1",
+                                         "dma2",
+                                         "dma3",
+                                         "dma4",
+                                         "dma5",
+                                         "dma6",
+                                         "dma7",
+                                         "dma8",
+                                         "dma9",
+                                         "dma10",
+                                         "dma11",
+                                         "dma12",
+                                         "dma13",
+                                         "dma14",
+                                         "dma-shared-all";
+                       #dma-cells = <1>;
+                       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>;
+                       #reset-cells = <1>;
+                       reg = <0x7e100000 0x114>,
+                             <0x7e00a000 0x24>;
+                       clocks = <&clocks BCM2835_CLOCK_V3D>,
+                                <&clocks BCM2835_CLOCK_PERI_IMAGE>,
+                                <&clocks BCM2835_CLOCK_H264>,
+                                <&clocks BCM2835_CLOCK_ISP>;
+                       clock-names = "v3d", "peri_image", "h264", "isp";
+                       system-power-controller;
+               };
+
+               pixelvalve@7e206000 {
+                       compatible = "brcm,bcm2835-pixelvalve0";
+                       reg = <0x7e206000 0x100>;
+                       interrupts = <2 13>; /* pwa0 */
+               };
+
+               pixelvalve@7e207000 {
+                       compatible = "brcm,bcm2835-pixelvalve1";
+                       reg = <0x7e207000 0x100>;
+                       interrupts = <2 14>; /* pwa1 */
+               };
+
+               thermal: thermal@7e212000 {
+                       compatible = "brcm,bcm2835-thermal";
+                       reg = <0x7e212000 0x8>;
+                       clocks = <&clocks BCM2835_CLOCK_TSENS>;
+                       #thermal-sensor-cells = <0>;
+                       status = "disabled";
+               };
+
+               i2c2: i2c@7e805000 {
+                       compatible = "brcm,bcm2835-i2c";
+                       reg = <0x7e805000 0x1000>;
+                       interrupts = <2 21>;
+                       clocks = <&clocks BCM2835_CLOCK_VPU>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       status = "okay";
+               };
+
+               pixelvalve@7e807000 {
+                       compatible = "brcm,bcm2835-pixelvalve2";
+                       reg = <0x7e807000 0x100>;
+                       interrupts = <2 10>; /* pixelvalve */
+               };
+
+               hdmi: hdmi@7e902000 {
+                       compatible = "brcm,bcm2835-hdmi";
+                       reg = <0x7e902000 0x600>,
+                             <0x7e808000 0x100>;
+                       interrupts = <2 8>, <2 9>;
+                       ddc = <&i2c2>;
+                       clocks = <&clocks BCM2835_PLLH_PIX>,
+                                <&clocks BCM2835_CLOCK_HSM>;
+                       clock-names = "pixel", "hdmi";
+                       dmas = <&dma 17>;
+                       dma-names = "audio-rx";
+                       status = "disabled";
+               };
+
+               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";
+               };
+       };
+};
+
+&cpu_thermal {
+       thermal-sensors = <&thermal>;
+};
+
+&gpio {
+       i2c_slave_gpio18: i2c_slave_gpio18 {
+               brcm,pins = <18 19 20 21>;
+               brcm,function = <BCM2835_FSEL_ALT3>;
+       };
+
+       jtag_gpio4: jtag_gpio4 {
+               brcm,pins = <4 5 6 12 13>;
+               brcm,function = <BCM2835_FSEL_ALT5>;
+       };
+
+       pwm0_gpio12: pwm0_gpio12 {
+               brcm,pins = <12>;
+               brcm,function = <BCM2835_FSEL_ALT0>;
+       };
+       pwm0_gpio18: pwm0_gpio18 {
+               brcm,pins = <18>;
+               brcm,function = <BCM2835_FSEL_ALT5>;
+       };
+       pwm0_gpio40: pwm0_gpio40 {
+               brcm,pins = <40>;
+               brcm,function = <BCM2835_FSEL_ALT0>;
+       };
+       pwm1_gpio13: pwm1_gpio13 {
+               brcm,pins = <13>;
+               brcm,function = <BCM2835_FSEL_ALT0>;
+       };
+       pwm1_gpio19: pwm1_gpio19 {
+               brcm,pins = <19>;
+               brcm,function = <BCM2835_FSEL_ALT5>;
+       };
+       pwm1_gpio41: pwm1_gpio41 {
+               brcm,pins = <41>;
+               brcm,function = <BCM2835_FSEL_ALT0>;
+       };
+       pwm1_gpio45: pwm1_gpio45 {
+               brcm,pins = <45>;
+               brcm,function = <BCM2835_FSEL_ALT0>;
+       };
+};
+
+&i2s {
+       dmas = <&dma 2>, <&dma 3>;
+       dma-names = "tx", "rx";
+};
+
+&sdhost {
+       dmas = <&dma 13>;
+       dma-names = "rx-tx";
+};
+
+&spi {
+       dmas = <&dma 6>, <&dma 7>;
+       dma-names = "tx", "rx";
+};
index 6c6a7f620d8b746b14a7706396b3c3f5fad165ec..394c8a71b13be30a8f8604b1936bc3ed95fe30eb 100644 (file)
@@ -59,10 +59,6 @@ &i2c1 {
        clock-frequency = <100000>;
 };
 
-&i2c2 {
-       status = "okay";
-};
-
 &usb {
        power-domains = <&power RPI_POWER_DOMAIN_USB>;
 };
index a5c3824c80563cf3222f77af9a6ffe39e22b1e0f..53bf4579cc224df45ba0d0a406353453d505aa40 100644 (file)
@@ -1,5 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0
 #include "bcm283x.dtsi"
+#include "bcm2835-common.dtsi"
 
 / {
        compatible = "brcm,bcm2835";
index c933e841388421045d908e0147012d0fca0ae670..82d6c4662ae49b355930d9ee04f3eb49dbf837d7 100644 (file)
@@ -1,5 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0
 #include "bcm283x.dtsi"
+#include "bcm2835-common.dtsi"
 
 / {
        compatible = "brcm,bcm2836";
index beb6c502dadc7bc09537f37e6d7b12e44ec466b7..9e95fee78e192229552a08d4832c6148281eaa3b 100644 (file)
@@ -1,4 +1,5 @@
 #include "bcm283x.dtsi"
+#include "bcm2835-common.dtsi"
 
 / {
        compatible = "brcm,bcm2837";
index ae8296f2f1af3778ac1137974428c4afaebf6447..addf3bea15c9ec28bf04ee74650eca5e212b820d 100644 (file)
@@ -18,7 +18,6 @@
 / {
        compatible = "brcm,bcm2835";
        model = "BCM2835";
-       interrupt-parent = <&intc>;
        #address-cells = <1>;
        #size-cells = <1>;
 
@@ -36,8 +35,6 @@ cpu_thermal: cpu-thermal {
                        polling-delay-passive = <0>;
                        polling-delay = <1000>;
 
-                       thermal-sensors = <&thermal>;
-
                        trips {
                                cpu-crit {
                                        temperature     = <80000>;
@@ -73,68 +70,6 @@ txp@7e004000 {
                        interrupts = <1 11>;
                };
 
-               dma: dma@7e007000 {
-                       compatible = "brcm,bcm2835-dma";
-                       reg = <0x7e007000 0xf00>;
-                       interrupts = <1 16>,
-                                    <1 17>,
-                                    <1 18>,
-                                    <1 19>,
-                                    <1 20>,
-                                    <1 21>,
-                                    <1 22>,
-                                    <1 23>,
-                                    <1 24>,
-                                    <1 25>,
-                                    <1 26>,
-                                    /* dma channel 11-14 share one irq */
-                                    <1 27>,
-                                    <1 27>,
-                                    <1 27>,
-                                    <1 27>,
-                                    /* unused shared irq for all channels */
-                                    <1 28>;
-                       interrupt-names = "dma0",
-                                         "dma1",
-                                         "dma2",
-                                         "dma3",
-                                         "dma4",
-                                         "dma5",
-                                         "dma6",
-                                         "dma7",
-                                         "dma8",
-                                         "dma9",
-                                         "dma10",
-                                         "dma11",
-                                         "dma12",
-                                         "dma13",
-                                         "dma14",
-                                         "dma-shared-all";
-                       #dma-cells = <1>;
-                       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>;
-                       #reset-cells = <1>;
-                       reg = <0x7e100000 0x114>,
-                             <0x7e00a000 0x24>;
-                       clocks = <&clocks BCM2835_CLOCK_V3D>,
-                                <&clocks BCM2835_CLOCK_PERI_IMAGE>,
-                                <&clocks BCM2835_CLOCK_H264>,
-                                <&clocks BCM2835_CLOCK_ISP>;
-                       clock-names = "v3d", "peri_image", "h264", "isp";
-                       system-power-controller;
-               };
-
                clocks: cprman@7e101000 {
                        compatible = "brcm,bcm2835-cprman";
                        #clock-cells = <1>;
@@ -184,8 +119,7 @@ gpio: gpio@7e200000 {
                        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 +197,7 @@ i2c1_gpio44: i2c1_gpio44 {
                                brcm,pins = <44 45>;
                                brcm,function = <BCM2835_FSEL_ALT2>;
                        };
-                       i2c_slave_gpio18: i2c_slave_gpio18 {
-                               brcm,pins = <18 19 20 21>;
-                               brcm,function = <BCM2835_FSEL_ALT3>;
-                       };
 
-                       jtag_gpio4: jtag_gpio4 {
-                               brcm,pins = <4 5 6 12 13>;
-                               brcm,function = <BCM2835_FSEL_ALT5>;
-                       };
                        jtag_gpio22: jtag_gpio22 {
                                brcm,pins = <22 23 24 25 26 27>;
                                brcm,function = <BCM2835_FSEL_ALT4>;
@@ -286,35 +212,6 @@ pcm_gpio28: pcm_gpio28 {
                                brcm,function = <BCM2835_FSEL_ALT2>;
                        };
 
-                       pwm0_gpio12: pwm0_gpio12 {
-                               brcm,pins = <12>;
-                               brcm,function = <BCM2835_FSEL_ALT0>;
-                       };
-                       pwm0_gpio18: pwm0_gpio18 {
-                               brcm,pins = <18>;
-                               brcm,function = <BCM2835_FSEL_ALT5>;
-                       };
-                       pwm0_gpio40: pwm0_gpio40 {
-                               brcm,pins = <40>;
-                               brcm,function = <BCM2835_FSEL_ALT0>;
-                       };
-                       pwm1_gpio13: pwm1_gpio13 {
-                               brcm,pins = <13>;
-                               brcm,function = <BCM2835_FSEL_ALT0>;
-                       };
-                       pwm1_gpio19: pwm1_gpio19 {
-                               brcm,pins = <19>;
-                               brcm,function = <BCM2835_FSEL_ALT5>;
-                       };
-                       pwm1_gpio41: pwm1_gpio41 {
-                               brcm,pins = <41>;
-                               brcm,function = <BCM2835_FSEL_ALT0>;
-                       };
-                       pwm1_gpio45: pwm1_gpio45 {
-                               brcm,pins = <45>;
-                               brcm,function = <BCM2835_FSEL_ALT0>;
-                       };
-
                        sdhost_gpio48: sdhost_gpio48 {
                                brcm,pins = <48 49 50 51 52 53>;
                                brcm,function = <BCM2835_FSEL_ALT0>;
@@ -410,8 +307,6 @@ sdhost: mmc@7e202000 {
                        reg = <0x7e202000 0x100>;
                        interrupts = <2 24>;
                        clocks = <&clocks BCM2835_CLOCK_VPU>;
-                       dmas = <&dma 13>;
-                       dma-names = "rx-tx";
                        status = "disabled";
                };
 
@@ -419,10 +314,6 @@ i2s: i2s@7e203000 {
                        compatible = "brcm,bcm2835-i2s";
                        reg = <0x7e203000 0x24>;
                        clocks = <&clocks BCM2835_CLOCK_PCM>;
-
-                       dmas = <&dma 2>,
-                              <&dma 3>;
-                       dma-names = "tx", "rx";
                        status = "disabled";
                };
 
@@ -431,8 +322,6 @@ spi: spi@7e204000 {
                        reg = <0x7e204000 0x200>;
                        interrupts = <2 22>;
                        clocks = <&clocks BCM2835_CLOCK_VPU>;
-                       dmas = <&dma 6>, <&dma 7>;
-                       dma-names = "tx", "rx";
                        #address-cells = <1>;
                        #size-cells = <0>;
                        status = "disabled";
@@ -448,18 +337,6 @@ i2c0: i2c@7e205000 {
                        status = "disabled";
                };
 
-               pixelvalve@7e206000 {
-                       compatible = "brcm,bcm2835-pixelvalve0";
-                       reg = <0x7e206000 0x100>;
-                       interrupts = <2 13>; /* pwa0 */
-               };
-
-               pixelvalve@7e207000 {
-                       compatible = "brcm,bcm2835-pixelvalve1";
-                       reg = <0x7e207000 0x100>;
-                       interrupts = <2 14>; /* pwa1 */
-               };
-
                dpi: dpi@7e208000 {
                        compatible = "brcm,bcm2835-dpi";
                        reg = <0x7e208000 0x8c>;
@@ -490,14 +367,6 @@ dsi0: dsi@7e209000 {
 
                };
 
-               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>;
@@ -587,16 +456,6 @@ i2c1: i2c@7e804000 {
                        status = "disabled";
                };
 
-               i2c2: i2c@7e805000 {
-                       compatible = "brcm,bcm2835-i2c";
-                       reg = <0x7e805000 0x1000>;
-                       interrupts = <2 21>;
-                       clocks = <&clocks BCM2835_CLOCK_VPU>;
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-                       status = "disabled";
-               };
-
                vec: vec@7e806000 {
                        compatible = "brcm,bcm2835-vec";
                        reg = <0x7e806000 0x1000>;
@@ -605,26 +464,6 @@ vec: vec@7e806000 {
                        status = "disabled";
                };
 
-               pixelvalve@7e807000 {
-                       compatible = "brcm,bcm2835-pixelvalve2";
-                       reg = <0x7e807000 0x100>;
-                       interrupts = <2 10>; /* pixelvalve */
-               };
-
-               hdmi: hdmi@7e902000 {
-                       compatible = "brcm,bcm2835-hdmi";
-                       reg = <0x7e902000 0x600>,
-                             <0x7e808000 0x100>;
-                       interrupts = <2 8>, <2 9>;
-                       ddc = <&i2c2>;
-                       clocks = <&clocks BCM2835_PLLH_PIX>,
-                                <&clocks BCM2835_CLOCK_HSM>;
-                       clock-names = "pixel", "hdmi";
-                       dmas = <&dma 17>;
-                       dma-names = "audio-rx";
-                       status = "disabled";
-               };
-
                usb: usb@7e980000 {
                        compatible = "brcm,bcm2835-usb";
                        reg = <0x7e980000 0x10000>;
@@ -636,17 +475,6 @@ usb: usb@7e980000 {
                        phys = <&usbphy>;
                        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";
-               };
        };
 
        clocks {