Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1412893 > unrolled thread
| Started by | Álvaro Fernández Rojas <noltari@gmail.com> |
|---|---|
| First post | 2016-06-03 10:20 +0200 |
| Last post | 2016-06-06 16:00 +0200 |
| Articles | 4 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH 1/3] MIPS: BMIPS: Add device tree example for BCM63268 Álvaro Fernández Rojas <noltari@gmail.com> - 2016-06-03 10:20 +0200
[PATCH 2/3] MIPS: BMIPS: Add BCM6345 support Álvaro Fernández Rojas <noltari@gmail.com> - 2016-06-03 10:20 +0200
Re: [PATCH 2/3] MIPS: BMIPS: Add BCM6345 support Jonas Gorski <jogo@openwrt.org> - 2016-06-03 13:50 +0200
Re: [PATCH 2/3] MIPS: BMIPS: Add BCM6345 support Rob Herring <robh@kernel.org> - 2016-06-06 16:00 +0200
| From | Álvaro Fernández Rojas <noltari@gmail.com> |
|---|---|
| Date | 2016-06-03 10:20 +0200 |
| Subject | [PATCH 1/3] MIPS: BMIPS: Add device tree example for BCM63268 |
| Message-ID | <rFSuJ-Jx-15@gated-at.bofh.it> |
This adds a device tree example for Comtrend VR-3032u, which
also serves as a real example for brcm,bcm6328-leds.
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
---
arch/mips/bmips/Kconfig | 4 +
arch/mips/boot/dts/brcm/Makefile | 2 +
arch/mips/boot/dts/brcm/bcm63268.dtsi | 134 +++++++++++++++++++++++++++
arch/mips/boot/dts/brcm/bcm963268vr3032u.dts | 107 +++++++++++++++++++++
4 files changed, 247 insertions(+)
create mode 100644 arch/mips/boot/dts/brcm/bcm63268.dtsi
create mode 100644 arch/mips/boot/dts/brcm/bcm963268vr3032u.dts
diff --git a/arch/mips/bmips/Kconfig b/arch/mips/bmips/Kconfig
index 264328d..14f4b4c 100644
--- a/arch/mips/bmips/Kconfig
+++ b/arch/mips/bmips/Kconfig
@@ -21,6 +21,10 @@ config DT_BCM93384WVG_VIPER
bool "BCM93384WVG Viper CPU (EXPERIMENTAL)"
select BUILTIN_DTB
+config DT_BCM963268VR3032U
+ bool "BCM963268VR3032U"
+ select BUILTIN_DTB
+
config DT_BCM96358NB4SER
bool "BCM96358NB4SER"
select BUILTIN_DTB
diff --git a/arch/mips/boot/dts/brcm/Makefile b/arch/mips/boot/dts/brcm/Makefile
index fda9d38..2060e70 100644
--- a/arch/mips/boot/dts/brcm/Makefile
+++ b/arch/mips/boot/dts/brcm/Makefile
@@ -1,5 +1,6 @@
dtb-$(CONFIG_DT_BCM93384WVG) += bcm93384wvg.dtb
dtb-$(CONFIG_DT_BCM93384WVG_VIPER) += bcm93384wvg_viper.dtb
+dtb-$(CONFIG_DT_BCM963268VR3032U) += bcm963268vr3032u.dtb
dtb-$(CONFIG_DT_BCM96358NB4SER) += bcm96358nb4ser.dtb
dtb-$(CONFIG_DT_BCM96368MVWG) += bcm96368mvwg.dtb
dtb-$(CONFIG_DT_BCM9EJTAGPRB) += bcm9ejtagprb.dtb
@@ -15,6 +16,7 @@ dtb-$(CONFIG_DT_BCM97435SVMB) += bcm97435svmb.dtb
dtb-$(CONFIG_DT_NONE) += \
bcm93384wvg.dtb \
bcm93384wvg_viper.dtb \
+ bcm963268vr3032u.dtb \
bcm96358nb4ser.dtb \
bcm96368mvwg.dtb \
bcm9ejtagprb.dtb \
diff --git a/arch/mips/boot/dts/brcm/bcm63268.dtsi b/arch/mips/boot/dts/brcm/bcm63268.dtsi
new file mode 100644
index 0000000..7e6bf2c
--- /dev/null
+++ b/arch/mips/boot/dts/brcm/bcm63268.dtsi
@@ -0,0 +1,134 @@
+/ {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ compatible = "brcm,bcm63268";
+
+ cpus {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ mips-hpt-frequency = <200000000>;
+
+ cpu@0 {
+ compatible = "brcm,bmips4350";
+ device_type = "cpu";
+ reg = <0>;
+ };
+
+ cpu@1 {
+ compatible = "brcm,bmips4350";
+ device_type = "cpu";
+ reg = <1>;
+ };
+ };
+
+ clocks {
+ periph_clk: periph-clk {
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ clock-frequency = <50000000>;
+ };
+ };
+
+ aliases {
+ serial0 = &uart0;
+ serial1 = &uart1;
+ };
+
+ cpu_intc: interrupt-controller {
+ #address-cells = <0>;
+ compatible = "mti,cpu-interrupt-controller";
+
+ interrupt-controller;
+ #interrupt-cells = <1>;
+ };
+
+ ubus {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ compatible = "simple-bus";
+ ranges;
+
+ periph_cntl: syscon@10000000 {
+ compatible = "syscon";
+ reg = <0x10000000 0x14>;
+ native-endian;
+ };
+
+ reboot: syscon-reboot@10000008 {
+ compatible = "syscon-reboot";
+ regmap = <&periph_cntl>;
+ offset = <0x8>;
+ mask = <0x1>;
+ };
+
+ periph_intc: interrupt-controller@10000020 {
+ compatible = "brcm,bcm6345-l1-intc";
+ reg = <0x10000020 0x20>,
+ <0x10000040 0x20>;
+
+ interrupt-controller;
+ #interrupt-cells = <1>;
+
+ interrupt-parent = <&cpu_intc>;
+ interrupts = <2>, <3>;
+ };
+
+ uart0: serial@10000180 {
+ compatible = "brcm,bcm6345-uart";
+ reg = <0x10000180 0x18>;
+
+ interrupt-parent = <&periph_intc>;
+ interrupts = <5>;
+
+ clocks = <&periph_clk>;
+
+ status = "disabled";
+ };
+
+ uart1: serial@100001a0 {
+ compatible = "brcm,bcm6345-uart";
+ reg = <0x100001a0 0x18>;
+
+ interrupt-parent = <&periph_intc>;
+ interrupts = <34>;
+
+ clocks = <&periph_clk>;
+
+ status = "disabled";
+ };
+
+ leds0: led-controller@10001900 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ compatible = "brcm,bcm6328-leds";
+ reg = <0x10001900 0x24>;
+
+ status = "disabled";
+ };
+
+ ehci: usb@10002500 {
+ compatible = "brcm,bcm63268-ehci", "generic-ehci";
+ reg = <0x10002500 0x100>;
+ big-endian;
+
+ interrupt-parent = <&periph_intc>;
+ interrupts = <10>;
+
+ status = "disabled";
+ };
+
+ ohci: usb@10002600 {
+ compatible = "brcm,bcm63268-ohci", "generic-ohci";
+ reg = <0x10002600 0x100>;
+ big-endian;
+ no-big-frame-no;
+
+ interrupt-parent = <&periph_intc>;
+ interrupts = <9>;
+
+ status = "disabled";
+ };
+ };
+};
diff --git a/arch/mips/boot/dts/brcm/bcm963268vr3032u.dts b/arch/mips/boot/dts/brcm/bcm963268vr3032u.dts
new file mode 100644
index 0000000..930726f
--- /dev/null
+++ b/arch/mips/boot/dts/brcm/bcm963268vr3032u.dts
@@ -0,0 +1,107 @@
+/dts-v1/;
+
+/include/ "bcm63268.dtsi"
+
+/ {
+ compatible = "comtrend,vr-3032u", "brcm,bcm63268";
+ model = "Comtrend VR-3032u";
+
+ memory@0 {
+ device_type = "memory";
+ reg = <0x00000000 0x04000000>;
+ };
+
+ chosen {
+ stdout-path = &uart0;
+ };
+};
+
+&leds0 {
+ status = "ok";
+ brcm,serial-leds;
+ brcm,serial-dat-low;
+ brcm,serial-shift-inv;
+
+ led@0 {
+ reg = <0>;
+ brcm,hardware-controlled;
+ brcm,link-signal-sources = <0>;
+ /* GPHY0 Speed 0 */
+ };
+ led@1 {
+ reg = <1>;
+ brcm,hardware-controlled;
+ brcm,link-signal-sources = <1>;
+ /* GPHY0 Speed 1 */
+ };
+ led@2 {
+ reg = <2>;
+ active-low;
+ label = "vr-3032u:red:inet";
+ };
+ led@3 {
+ reg = <3>;
+ active-low;
+ label = "vr-3032u:green:dsl";
+ };
+ led@4 {
+ reg = <4>;
+ active-low;
+ label = "vr-3032u:green:usb";
+ };
+ led@7 {
+ reg = <7>;
+ active-low;
+ label = "vr-3032u:green:wps";
+ };
+ led@8 {
+ reg = <8>;
+ active-low;
+ label = "vr-3032u:green:inet";
+ };
+ led@9 {
+ reg = <9>;
+ brcm,hardware-controlled;
+ /* EPHY0 Activity */
+ };
+ led@10 {
+ reg = <10>;
+ brcm,hardware-controlled;
+ /* EPHY1 Activity */
+ };
+ led@11 {
+ reg = <11>;
+ brcm,hardware-controlled;
+ /* EPHY2 Activity */
+ };
+ led@12 {
+ reg = <12>;
+ brcm,hardware-controlled;
+ /* GPHY0 Activity */
+ };
+ led@13 {
+ reg = <13>;
+ brcm,hardware-controlled;
+ /* EPHY0 Speed */
+ };
+ led@14 {
+ reg = <14>;
+ brcm,hardware-controlled;
+ /* EPHY1 Speed */
+ };
+ led@15 {
+ reg = <15>;
+ brcm,hardware-controlled;
+ /* EPHY2 Speed */
+ };
+ led@20 {
+ reg = <20>;
+ active-low;
+ label = "vr-3032u:green:power";
+ default-state = "on";
+ };
+};
+
+&uart0 {
+ status = "okay";
+};
--
2.1.4
[toc] | [next] | [standalone]
| From | Álvaro Fernández Rojas <noltari@gmail.com> |
|---|---|
| Date | 2016-06-03 10:20 +0200 |
| Subject | [PATCH 2/3] MIPS: BMIPS: Add BCM6345 support |
| Message-ID | <rFSuK-Jx-23@gated-at.bofh.it> |
| In reply to | #1412893 |
BCM6345 has only one CPU, so SMP support must be disabled.
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
---
Documentation/devicetree/bindings/mips/brcm/soc.txt | 2 +-
arch/mips/bmips/setup.c | 9 +++++++++
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/mips/brcm/soc.txt b/Documentation/devicetree/bindings/mips/brcm/soc.txt
index 4a7e030..1936e8a 100644
--- a/Documentation/devicetree/bindings/mips/brcm/soc.txt
+++ b/Documentation/devicetree/bindings/mips/brcm/soc.txt
@@ -4,7 +4,7 @@ Required properties:
- compatible: "brcm,bcm3384", "brcm,bcm33843"
"brcm,bcm3384-viper", "brcm,bcm33843-viper"
- "brcm,bcm6328", "brcm,bcm6358", "brcm,bcm6368",
+ "brcm,bcm6328", "brcm,bcm6345", "brcm,bcm6358", "brcm,bcm6368",
"brcm,bcm63168", "brcm,bcm63268",
"brcm,bcm7125", "brcm,bcm7346", "brcm,bcm7358", "brcm,bcm7360",
"brcm,bcm7362", "brcm,bcm7420", "brcm,bcm7425"
diff --git a/arch/mips/bmips/setup.c b/arch/mips/bmips/setup.c
index f146d12..b0d339d 100644
--- a/arch/mips/bmips/setup.c
+++ b/arch/mips/bmips/setup.c
@@ -95,6 +95,14 @@ static void bcm6328_quirks(void)
bcm63xx_fixup_cpu1();
}
+static void bcm6345_quirks(void)
+{
+ /*
+ * BCM6345 has only one CPU and no SMP support
+ */
+ bmips_smp_enabled = 0;
+}
+
static void bcm6358_quirks(void)
{
/*
@@ -113,6 +121,7 @@ static const struct bmips_quirk bmips_quirk_list[] = {
{ "brcm,bcm3384-viper", &bcm3384_viper_quirks },
{ "brcm,bcm33843-viper", &bcm3384_viper_quirks },
{ "brcm,bcm6328", &bcm6328_quirks },
+ { "brcm,bcm6345", &bcm6345_quirks },
{ "brcm,bcm6358", &bcm6358_quirks },
{ "brcm,bcm6368", &bcm6368_quirks },
{ "brcm,bcm63168", &bcm6368_quirks },
--
2.1.4
[toc] | [prev] | [next] | [standalone]
| From | Jonas Gorski <jogo@openwrt.org> |
|---|---|
| Date | 2016-06-03 13:50 +0200 |
| Subject | Re: [PATCH 2/3] MIPS: BMIPS: Add BCM6345 support |
| Message-ID | <rFVLX-2AV-11@gated-at.bofh.it> |
| In reply to | #1412894 |
Hi,
On 3 June 2016 at 10:12, Álvaro Fernández Rojas <noltari@gmail.com> wrote:
> BCM6345 has only one CPU, so SMP support must be disabled.
>
> Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
> ---
> Documentation/devicetree/bindings/mips/brcm/soc.txt | 2 +-
> arch/mips/bmips/setup.c | 9 +++++++++
> 2 files changed, 10 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/devicetree/bindings/mips/brcm/soc.txt b/Documentation/devicetree/bindings/mips/brcm/soc.txt
> index 4a7e030..1936e8a 100644
> --- a/Documentation/devicetree/bindings/mips/brcm/soc.txt
> +++ b/Documentation/devicetree/bindings/mips/brcm/soc.txt
> @@ -4,7 +4,7 @@ Required properties:
>
> - compatible: "brcm,bcm3384", "brcm,bcm33843"
> "brcm,bcm3384-viper", "brcm,bcm33843-viper"
> - "brcm,bcm6328", "brcm,bcm6358", "brcm,bcm6368",
> + "brcm,bcm6328", "brcm,bcm6345", "brcm,bcm6358", "brcm,bcm6368",
> "brcm,bcm63168", "brcm,bcm63268",
> "brcm,bcm7125", "brcm,bcm7346", "brcm,bcm7358", "brcm,bcm7360",
> "brcm,bcm7362", "brcm,bcm7420", "brcm,bcm7425"
This is reasonable.
> diff --git a/arch/mips/bmips/setup.c b/arch/mips/bmips/setup.c
> index f146d12..b0d339d 100644
> --- a/arch/mips/bmips/setup.c
> +++ b/arch/mips/bmips/setup.c
> @@ -95,6 +95,14 @@ static void bcm6328_quirks(void)
> bcm63xx_fixup_cpu1();
> }
>
> +static void bcm6345_quirks(void)
> +{
> + /*
> + * BCM6345 has only one CPU and no SMP support
> + */
> + bmips_smp_enabled = 0;
> +}
> +
> static void bcm6358_quirks(void)
> {
> /*
> @@ -113,6 +121,7 @@ static const struct bmips_quirk bmips_quirk_list[] = {
> { "brcm,bcm3384-viper", &bcm3384_viper_quirks },
> { "brcm,bcm33843-viper", &bcm3384_viper_quirks },
> { "brcm,bcm6328", &bcm6328_quirks },
> + { "brcm,bcm6345", &bcm6345_quirks },
> { "brcm,bcm6358", &bcm6358_quirks },
> { "brcm,bcm6368", &bcm6368_quirks },
> { "brcm,bcm63168", &bcm6368_quirks },
This part is unnecessary, as cpu-bmips will only try to enable smp for
bmips4350 and higher. but not for bmips32/bmips3300.
Jonas
[toc] | [prev] | [next] | [standalone]
| From | Rob Herring <robh@kernel.org> |
|---|---|
| Date | 2016-06-06 16:00 +0200 |
| Subject | Re: [PATCH 2/3] MIPS: BMIPS: Add BCM6345 support |
| Message-ID | <rH3ep-5FP-15@gated-at.bofh.it> |
| In reply to | #1412894 |
On Fri, Jun 03, 2016 at 10:12:03AM +0200, Álvaro Fernández Rojas wrote: > BCM6345 has only one CPU, so SMP support must be disabled. > > Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> > --- > Documentation/devicetree/bindings/mips/brcm/soc.txt | 2 +- > arch/mips/bmips/setup.c | 9 +++++++++ > 2 files changed, 10 insertions(+), 1 deletion(-) > > diff --git a/Documentation/devicetree/bindings/mips/brcm/soc.txt b/Documentation/devicetree/bindings/mips/brcm/soc.txt > index 4a7e030..1936e8a 100644 > --- a/Documentation/devicetree/bindings/mips/brcm/soc.txt > +++ b/Documentation/devicetree/bindings/mips/brcm/soc.txt > @@ -4,7 +4,7 @@ Required properties: > > - compatible: "brcm,bcm3384", "brcm,bcm33843" > "brcm,bcm3384-viper", "brcm,bcm33843-viper" > - "brcm,bcm6328", "brcm,bcm6358", "brcm,bcm6368", > + "brcm,bcm6328", "brcm,bcm6345", "brcm,bcm6358", "brcm,bcm6368", > "brcm,bcm63168", "brcm,bcm63268", > "brcm,bcm7125", "brcm,bcm7346", "brcm,bcm7358", "brcm,bcm7360", > "brcm,bcm7362", "brcm,bcm7420", "brcm,bcm7425" Are these all mutually exclusive? Please make that clear.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web