Skip to contentSkip to conversation

ARM: BCM5301X: add Meraki MR32 series

PATCH Applied Christian Lamparter 2 participants 17 messages Aug 22, 2020 – Sep 11, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

v2 cover ARM: BCM5301X: add Meraki MR32 series

Hello,

I've been holding on to this devices dts' for a while now. But since the HW has been running with versions of these patches for more than a year, I do think I should make it available in upstream in order to move on.

Hardware-Info of the Meraki MR32:

This is a dual-band enterprise class 802.11ac access point. The unit was donated by Chris Blake. Thank you!

SoC:    Broadcom BCM53016A1 (1 GHz, 2 cores)
RAM:    128 MiB
NAND:   128 MiB Spansion S34ML01G2 (~114 MiB useable)
ETH:    1GBit Ethernet Port - PoE
WIFI1:  Broadcom BCM43520 an+ac (2x2:2 - id: 0x4352)
WIFI2:  Broadcom BCM43520 bgn (2x2:2 - id: 0x4352)
WIFI3:  Broadcom BCM43428 abgn (1x1:1 - id: 43428)

So far, the remaining TODOs center around the pinctrl, i2c and WIFI. The I2C is implemented with the bit-banged i2c-gpio driver as the SoC's I2C didn't budge after many hours of trying.

A patch that included the "meraki" vendor-prefix has been broken out of the series as recommended by Florian Fainelli. Here's the link:
<https://lists.ozlabs.org/pipermail/linuxppc-dev/2020-August/216949.html>

Cheers,
Christian

Christian Lamparter (6):
dt-bindings: ARM: add bindings for the Meraki MR32
ARM: dts: BCM5301X: Specify PWM in the DT
ARM: dts: BCM5301X: Specify uart2 in the DT
ARM: dts: BCM5301X: Specify pcie2 in the DT
MAINTAINERS: extend BCM5301X ARM ARCHITECTURE files
ARM: BCM5301X: Add DT for Meraki MR32

 .../bindings/arm/bcm/brcm,bcm4708.yaml        |   2 +
 MAINTAINERS                                   |   2 +-
 arch/arm/boot/dts/Makefile                    |   1 +
 arch/arm/boot/dts/bcm53016-meraki-mr32.dts    | 219 ++++++++++++++++++
 arch/arm/boot/dts/bcm5301x.dtsi               |  25 +-
 5 files changed, 246 insertions(+), 3 deletions(-)
 create mode 100644 arch/arm/boot/dts/bcm53016-meraki-mr32.dts
Signature · 7 lines
2.28.0


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#1 lore raw

PATCH v2 1/6 dt-bindings: ARM: add bindings for the Meraki MR32

mark the Meraki MR32 and its SoC (BCM53016) as supported in the bindings documentation file.

A quick look on Broadcom BCM5301x series umbrella website reveals:

<https://www.broadcom.com/products/embedded-and-networking-processors/communications/bcm5301x>

"BCM53012 and BCM53016 with dual-core Cortex-A9 CPU at 1 GHz, 256KB L2 cache,
16-bit DDR2 interface, USB3 integrated switch, GPHYs and packet accelerator".

As far as I can tell, Broadcom considers the SoC to be a version of the BCM53012.

---
v1 -> v2:
- reworked commit message (Scott Branden)

---
 Documentation/devicetree/bindings/arm/bcm/brcm,bcm4708.yaml | 2 ++
 1 file changed, 2 insertions(+)
Documentation/devicetree/bindings/arm/bcm/brcm,bcm4708.yaml +2 -0
index d48313c7ae45..988e0bbb2a62 100644
@@ -83,6 +83,8 @@ properties:
               - brcm,bcm953012er
               - brcm,bcm953012hr
               - brcm,bcm953012k
+              - meraki,mr32
           - const: brcm,brcm53012
+          - const: brcm,brcm53016
           - const: brcm,bcm4708
 ...
Signature · 7 lines
2.28.0


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#2 lore raw

Re: [PATCH v2 1/6] dt-bindings: ARM: add bindings for the Meraki MR32

Quoted 10 lines · Christian Lamparter

mark the Meraki MR32 and its SoC (BCM53016) as supported in the bindings documentation file.

A quick look on Broadcom BCM5301x series umbrella website reveals:

<https://www.broadcom.com/products/embedded-and-networking-processors/communications/bcm5301x>

"BCM53012 and BCM53016 with dual-core Cortex-A9 CPU at 1 GHz, 256KB L2 cache,
16-bit DDR2 interface, USB3 integrated switch, GPHYs and packet accelerator".

Quoted 6 lines

As far as I can tell, Broadcom considers the SoC to be a version of the BCM53012.

---

Applied to devicetree/next, thanks!
--
Florian

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#3 lore raw

PATCH v2 2/6 ARM: dts: BCM5301X: Specify PWM in the DT

In reply to Christian Lamparter

The BCM53016 in the Meraki MR32 uses the on-chip PWM controller to drive a tri-color RGB LED. Since I plan to use the PWM, I made a label for the pwm's pinmux node. This way, it can be easily referenced.... And Also included a label for the i2c since I'm going to need it in the future too.

---
v1 -> v2:
- added labels for pinmux

---
 arch/arm/boot/dts/bcm5301x.dtsi | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)
arch/arm/boot/dts/bcm5301x.dtsi +10 -2
index 2d9b4dd05830..45cd8c7411dd 100644
@@ -350,6 +350,14 @@ gmac3: ethernet@27000 {
 		};
 	};
 
+	pwm: pwm@18002000 {
+		compatible = "brcm,iproc-pwm";
+		reg = <0x18002000 0x28>;
+		clocks = <&osc>;
+		#pwm-cells = <3>;
+		status = "disabled";
+	};
+
 	mdio: mdio@18003000 {
 		compatible = "brcm,iproc-mdio";
 		reg = <0x18003000 0x8>;
@@ -417,12 +425,12 @@ spi-pins {
 					function = "spi";
 				};
 
-				i2c {
+				pinmux_i2c: i2c {
 					groups = "i2c_grp";
 					function = "i2c";
 				};
 
-				pwm {
+				pinmux_pwm: pwm {
 					groups = "pwm0_grp", "pwm1_grp",
 						 "pwm2_grp", "pwm3_grp";
 					function = "pwm";
Signature · 7 lines
2.28.0


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#4 lore raw

Re: [PATCH v2 2/6] ARM: dts: BCM5301X: Specify PWM in the DT

Quoted 11 lines · Christian Lamparter

The BCM53016 in the Meraki MR32 uses the on-chip PWM controller to drive a tri-color RGB LED. Since I plan to use the PWM, I made a label for the pwm's pinmux node. This way, it can be easily referenced.... And Also included a label for the i2c since I'm going to need it in the future too.

---

Applied to devicetree/next, thanks!
--
Florian

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#5 lore raw

PATCH v2 3/6 ARM: dts: BCM5301X: Specify uart2 in the DT

In reply to Christian Lamparter

The BCM53016 in the Meraki MR32 utilizes the third "uart2" to connect to a on-board Bluetooth-LE 4.0 BCM20732 chip.

---
 arch/arm/boot/dts/bcm5301x.dtsi | 9 +++++++++
 1 file changed, 9 insertions(+)
arch/arm/boot/dts/bcm5301x.dtsi +9 -0
index 45cd8c7411dd..eb1290fed235 100644
@@ -392,6 +392,15 @@ usb3_dmp: syscon@18105000 {
 		reg = <0x18105000 0x1000>;
 	};
 
+	uart2: serial@18008000 {
+		compatible = "ns16550a";
+		reg = <0x18008000 0x20>;
+		clocks = <&iprocslow>;
+		interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
+		reg-shift = <2>;
+		status = "disabled";
+	};
+
 	i2c0: i2c@18009000 {
 		compatible = "brcm,iproc-i2c";
 		reg = <0x18009000 0x50>;
Signature · 7 lines
2.28.0


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#6 lore raw

Re: [PATCH v2 3/6] ARM: dts: BCM5301X: Specify uart2 in the DT

Quoted 6 lines · Christian Lamparter

The BCM53016 in the Meraki MR32 utilizes the third "uart2" to connect to a on-board Bluetooth-LE 4.0 BCM20732 chip.

---

Applied to devicetree/next, thanks!
--
Florian

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#7 lore raw

PATCH v2 4/6 ARM: dts: BCM5301X: Specify pcie2 in the DT

In reply to Christian Lamparter

The SoC supports three pcie ports. Currently, only pcie0 and pcie1 are enabled. This patch adds the pcie2 port as well.

---
 arch/arm/boot/dts/bcm5301x.dtsi | 4 ++++
 1 file changed, 4 insertions(+)
arch/arm/boot/dts/bcm5301x.dtsi +4 -0
index eb1290fed235..9d9e8fe3f6ae 100644
@@ -252,6 +252,10 @@ pcie1: pcie@13000 {
 			reg = <0x00013000 0x1000>;
 		};
 
+		pcie2: pcie@14000 {
+			reg = <0x00014000 0x1000>;
+		};
+
 		usb2: usb2@21000 {
 			reg = <0x00021000 0x1000>;
 
Signature · 7 lines
2.28.0


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#8 lore raw

Re: [PATCH v2 4/6] ARM: dts: BCM5301X: Specify pcie2 in the DT

Quoted 7 lines · Christian Lamparter

The SoC supports three pcie ports. Currently, only pcie0 and pcie1 are enabled. This patch adds the pcie2 port as well.

---

Applied to devicetree/next, thanks!
--
Florian

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#9 lore raw

PATCH v2 5/6 MAINTAINERS: extend BCM5301X ARM ARCHITECTURE files

In reply to Christian Lamparter

This patch extends the existing entry for the "BROADCOM BCM5301X ARM ARCHITECTURE" to include files belonging to the BCM5301X.

---
 MAINTAINERS | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
MAINTAINERS +1 -1
index deaafb617361..eb9b551c5dd8 100644
@@ -3433,7 +3433,7 @@ M:	[email protected]
 L:	[email protected]
 S:	Maintained
 F:	arch/arm/boot/dts/bcm470*
-F:	arch/arm/boot/dts/bcm5301x*.dtsi
+F:	arch/arm/boot/dts/bcm5301*
 F:	arch/arm/boot/dts/bcm953012*
 F:	arch/arm/mach-bcm/bcm_5301x.c
 
Signature · 7 lines
2.28.0


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#10 lore raw

Re: [PATCH v2 5/6] MAINTAINERS: extend BCM5301X ARM ARCHITECTURE files

Quoted 7 lines · Christian Lamparter

This patch extends the existing entry for the "BROADCOM BCM5301X ARM ARCHITECTURE" to include files belonging to the BCM5301X.

---

Applied to maintainers/next, thanks!
--
Florian

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#11 lore raw

PATCH v2 6/6 ARM: BCM5301X: Add DT for Meraki MR32

In reply to Christian Lamparter

add support for the Cisco Meraki MR32.
This is a dual-band enterprise class 802.11ac access point. The unit was donated by Chris Blake. Thank you!

SoC:    Broadcom BCM53016A1 (1 GHz, 2 cores)
RAM:    128 MiB
NAND:   128 MiB Spansion S34ML01G2 (~114 MiB useable)
ETH:    1GBit Ethernet Port - PoE
WIFI1:  Broadcom BCM43520 an+ac (2x2:2 - id: 0x4352)
WIFI2:  Broadcom BCM43520 bgn (2x2:2 - id: 0x4352)
WIFI3:  Broadcom BCM43428 abgn (1x1:1 - id: 43428)
BLE:    Broadcom BCM20732 (ttyS1)
LEDS:   1 x Programmable RGB Status LED (driven by a PWM)
        1 x White LED (GPIO)
        1 x Orange LED Fault Indicator (GPIO)
        2 x LAN Activity / Speed LEDs (On the RJ45 Port)
BUTTON: one Reset button
MISC:   AT24C64 8KiB EEPROM (i2c - stores Ethernet MAC)

ina219 hardware monitor (i2c)
Kensington Lock

SERIAL:
WARNING: The serial port needs a TTL/RS-232 3V3 level converter! The Serial setting is 115200-8-N-1. The board has a populated right angle 1x4 0.1" pinheader.
The pinout is: VCC, RX, TX, GND.

Odd stuff:
- uart0 clock frequency is 62.5 MHz.
- The LEDs are labeled as SYS-LED1 through SYS-LED3 because of the silkscreen on the PCB.
- the original u-boot has been compiled with most functions and commands disabled. The u-boot env isn't setup properly either and as a result, the bcm47xxpart probing is not working. Hence, the nand partitions are specified through a "fixed-partition" binding.
- The "WICED SMART(TM)" Bluetooth LE 4.0 BCM20732 chip is connected to uart2 of the SoC. The BCM20732 does not provide a HCI. So the linux' bluetooth stack is useless. The mock-up node with the compatible binding and enable-gpios property is provided solely as documentation.

---

v1 -> v2:
- fixed order of boards in Makefile. (Scott Branden)
- added device_type to memory node. (Florian Fainelli)
- added hw i2c, although doesn't work. (Florian Fainelli)
- renamed gpio-keys to just keys.
- included pinmux configurations for i2c and pwm.

---
 arch/arm/boot/dts/Makefile                 |   1 +
 arch/arm/boot/dts/bcm53016-meraki-mr32.dts | 219 +++++++++++++++++++++
 2 files changed, 220 insertions(+)
 create mode 100644 arch/arm/boot/dts/bcm53016-meraki-mr32.dts
arch/arm/boot/dts/Makefile +1 -0
index 4572db3fa5ae..d254ca2a942d 100644
@@ -127,6 +127,7 @@ dtb-$(CONFIG_ARCH_BCM_5301X) += \
 	bcm47094-luxul-xwr-3150-v1.dtb \
 	bcm47094-netgear-r8500.dtb \
 	bcm47094-phicomm-k3.dtb \
+	bcm53016-meraki-mr32.dtb \
 	bcm94708.dtb \
 	bcm94709.dtb \
 	bcm953012er.dtb \
arch/arm/boot/dts/bcm53016-meraki-mr32.dts new file +219 -0

219 lines not on this page · raw message

Signature · 7 lines
2.28.0


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#12 lore raw

Re: [PATCH v2 6/6] ARM: BCM5301X: Add DT for Meraki MR32

Quoted 43 lines · Christian Lamparter

add support for the Cisco Meraki MR32.
This is a dual-band enterprise class 802.11ac access point. The unit was donated by Chris Blake. Thank you!

SoC:    Broadcom BCM53016A1 (1 GHz, 2 cores)
RAM:    128 MiB
NAND:   128 MiB Spansion S34ML01G2 (~114 MiB useable)
ETH:    1GBit Ethernet Port - PoE
WIFI1:  Broadcom BCM43520 an+ac (2x2:2 - id: 0x4352)
WIFI2:  Broadcom BCM43520 bgn (2x2:2 - id: 0x4352)
WIFI3:  Broadcom BCM43428 abgn (1x1:1 - id: 43428)
BLE:    Broadcom BCM20732 (ttyS1)
LEDS:   1 x Programmable RGB Status LED (driven by a PWM)
        1 x White LED (GPIO)
        1 x Orange LED Fault Indicator (GPIO)
        2 x LAN Activity / Speed LEDs (On the RJ45 Port)
BUTTON: one Reset button
MISC:   AT24C64 8KiB EEPROM (i2c - stores Ethernet MAC)

ina219 hardware monitor (i2c)
Kensington Lock

SERIAL:
WARNING: The serial port needs a TTL/RS-232 3V3 level converter! The Serial setting is 115200-8-N-1. The board has a populated right angle 1x4 0.1" pinheader.
The pinout is: VCC, RX, TX, GND.

Odd stuff:
- uart0 clock frequency is 62.5 MHz.
- The LEDs are labeled as SYS-LED1 through SYS-LED3 because of the silkscreen on the PCB.
- the original u-boot has been compiled with most functions and commands disabled. The u-boot env isn't setup properly either and as a result, the bcm47xxpart probing is not working. Hence, the nand partitions are specified through a "fixed-partition" binding.
- The "WICED SMART(TM)" Bluetooth LE 4.0 BCM20732 chip is connected to uart2 of the SoC. The BCM20732 does not provide a HCI. So the linux' bluetooth stack is useless. The mock-up node with the compatible binding and enable-gpios property is provided solely as documentation.

Quoted 3 lines

---

Applied to devicetree/next, thanks!
--
Florian

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#13 lore raw

Re: [PATCH v2 6/6] ARM: BCM5301X: Add DT for Meraki MR32

In reply to Christian Lamparter
Quoted 203 lines · Christian Lamparter

add support for the Cisco Meraki MR32.
This is a dual-band enterprise class 802.11ac access point. The unit was donated by Chris Blake. Thank you!

SoC:    Broadcom BCM53016A1 (1 GHz, 2 cores)
RAM:    128 MiB
NAND:   128 MiB Spansion S34ML01G2 (~114 MiB useable)
ETH:    1GBit Ethernet Port - PoE
WIFI1:  Broadcom BCM43520 an+ac (2x2:2 - id: 0x4352)
WIFI2:  Broadcom BCM43520 bgn (2x2:2 - id: 0x4352)
WIFI3:  Broadcom BCM43428 abgn (1x1:1 - id: 43428)
BLE:    Broadcom BCM20732 (ttyS1)
LEDS:   1 x Programmable RGB Status LED (driven by a PWM)
         1 x White LED (GPIO)
         1 x Orange LED Fault Indicator (GPIO)
         2 x LAN Activity / Speed LEDs (On the RJ45 Port)
BUTTON: one Reset button
MISC:   AT24C64 8KiB EEPROM (i2c - stores Ethernet MAC)

ina219 hardware monitor (i2c)
Kensington Lock

SERIAL:
WARNING: The serial port needs a TTL/RS-232 3V3 level converter!
The Serial setting is 115200-8-N-1. The board has a populated right angle 1x4 0.1" pinheader.
The pinout is: VCC, RX, TX, GND.

Odd stuff:
- uart0 clock frequency is 62.5 MHz.
- The LEDs are labeled as SYS-LED1 through SYS-LED3 because of the silkscreen on the PCB.
- the original u-boot has been compiled with most functions and commands disabled. The u-boot env isn't setup properly either and as a result, the bcm47xxpart probing is not working. Hence, the nand partitions are specified through a "fixed-partition" binding.
- The "WICED SMART(TM)" Bluetooth LE 4.0 BCM20732 chip is connected to uart2 of the SoC. The BCM20732 does not provide a HCI. So the linux' bluetooth stack is useless. The mock-up node with the compatible binding and enable-gpios property is provided solely as documentation.

---

v1 -> v2:
- fixed order of boards in Makefile. (Scott Branden)
- added device_type to memory node. (Florian Fainelli)
- added hw i2c, although doesn't work. (Florian Fainelli)
- renamed gpio-keys to just keys.
- included pinmux configurations for i2c and pwm.

---
  arch/arm/boot/dts/Makefile                 |   1 +
  arch/arm/boot/dts/bcm53016-meraki-mr32.dts | 219 +++++++++++++++++++++
  2 files changed, 220 insertions(+)

create mode 100644 arch/arm/boot/dts/bcm53016-meraki-mr32.dts

arch/arm/boot/dts/Makefile +1 -0
index 4572db3fa5ae..d254ca2a942d 100644
@@ -127,6 +127,7 @@ dtb-$(CONFIG_ARCH_BCM_5301X) += \
  	bcm47094-luxul-xwr-3150-v1.dtb \
  	bcm47094-netgear-r8500.dtb \
  	bcm47094-phicomm-k3.dtb \
+	bcm53016-meraki-mr32.dtb \
  	bcm94708.dtb \
  	bcm94709.dtb \
  	bcm953012er.dtb \
arch/arm/boot/dts/bcm53016-meraki-mr32.dts new file +126 -0
new file mode 100644
index 000000000000..7306df7ff704
@@ -0,0 +1,219 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+/*
+ * Broadcom BCM470X / BCM5301X ARM platform code.
+ * DTS for Meraki MR32 / Codename: Espresso
+ *
+ * Copyright (C) 2018-2020 Christian Lamparter <[email protected]>
+ */
+
+/dts-v1/;
+
+#include "bcm4708.dtsi"
+#include "bcm5301x-nand-cs0-bch8.dtsi"
+#include <dt-bindings/leds/common.h>
+
+/ {
+	compatible = "meraki,mr32", "brcm,brcm53016", "brcm,bcm4708";
+	model = "Meraki MR32";
+
+	chosen {
+		bootargs = " console=ttyS0,115200n8 earlycon";
+	};
+
+	memory {
+		reg = <0x00000000 0x08000000>;
+		device_type = "memory";
+	};
+
+	aliases {
+		serial1 = &uart2;
+	};
+
+	leds {
+		compatible = "gpio-leds";
+
+		sysled3 {
+			function = LED_FUNCTION_FAULT;
+			color = <LED_COLOR_ID_AMBER>;
+			gpios = <&chipcommon 18 GPIO_ACTIVE_LOW>;
+			panic-indicator;
+		};
+		sysled2 {
+			function = LED_FUNCTION_INDICATOR;
+			color = <LED_COLOR_ID_WHITE>;
+			gpios = <&chipcommon 19 GPIO_ACTIVE_HIGH>;
+		};
+	};
+
+	keys {
+		compatible = "gpio-keys";
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		restart {
+			label = "Reset";
+			linux,code = <KEY_RESTART>;
+			gpios = <&chipcommon 21 GPIO_ACTIVE_LOW>;
+		};
+	};
+
+	pwm-leds {
+		compatible = "pwm-leds";
+
+		red {
+			/* SYS-LED 1 - Tricolor */
+			function = LED_FUNCTION_INDICATOR;
+			color = <LED_COLOR_ID_RED>;
+			pwms = <&pwm 0 50000 0>;
+			max-brightness = <255>;
+		};
+
+		green {
+			/* SYS-LED 1 - Tricolor */
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_GREEN>;
+			pwms = <&pwm 1 50000 0>;
+			max-brightness = <255>;
+		};
+
+		blue {
+			/* SYS-LED 1 - Tricolor */
+			function = LED_FUNCTION_INDICATOR;
+			color = <LED_COLOR_ID_BLUE>;
+			pwms = <&pwm 2 50000 0>;
+			max-brightness = <255>;
+		};
+	};
+
+	i2c {
+		/*
+		 * The platform provided I2C does not budge.
+		 * This is a replacement until I can figure
+		 * out what are the missing bits...
+		 */
+
+		compatible = "i2c-gpio";
+		sda-gpios = <&chipcommon 5 GPIO_ACTIVE_HIGH>;
+		scl-gpios = <&chipcommon 4 GPIO_ACTIVE_HIGH>;
+		i2c-gpio,delay-us = <10>; /* close to 100 kHz */
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		current_sense: ina219@45 {
+			compatible = "ti,ina219";
+			reg = <0x45>;
+			shunt-resistor = <60000>; /* = 60 mOhms */
+		};
+
+		eeprom: eeprom@50 {
+			compatible = "atmel,24c64";
+			reg = <0x50>;
+			pagesize = <32>;
+			read-only;
+		};
+	};
+};
+
+&i2c0 {
+	/* status = "okay"; - can be enabled once it works. */
+
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinmux_i2c>;
+
+	clock-frequency = <100000>;
+
+	current_sense: ina219@45 {
+		compatible = "ti,ina219";

arch/arm/boot/dts/bcm53016-meraki-mr32.dts line 136

Quoted 10 lines
arch/arm/boot/dts/bcm53016-meraki-mr32.dts new file +10 -0
+		reg = <0x45>;
+		shunt-resistor = <60000>; /* = 60 mOhms */
+	};
+
+	eeprom: eeprom@50 {
+		compatible = "atmel,24c64";
+		reg = <0x50>;
+		pagesize = <32>;
+		read-only;
+	};

These would create duplicate labels which are hard errors per DTC, so I took out the entire &i2c0 override here into what I merged into devicetree/next.

This cannot have built for you unless you run dtc with the force flag, is that how OpenWrt does it?

Signature · 6 lines
Florian

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#14 lore raw

Re: [PATCH v2 6/6] ARM: BCM5301X: Add DT for Meraki MR32

Hello,

Quoted 7 lines · Florian Fainelli
Quoted 4 lines · Christian Lamparter

add support for the Cisco Meraki MR32.
This is a dual-band enterprise class 802.11ac access point. The unit was donated by Chris Blake. Thank you!

[...]

Quoted 54 lines
Quoted 40 lines
(quoted diff) +40 -0
+
+    i2c {
+        /*
+         * The platform provided I2C does not budge.
+         * This is a replacement until I can figure
+         * out what are the missing bits...
+         */
+
+        compatible = "i2c-gpio";
+        sda-gpios = <&chipcommon 5 GPIO_ACTIVE_HIGH>;
+        scl-gpios = <&chipcommon 4 GPIO_ACTIVE_HIGH>;
+        i2c-gpio,delay-us = <10>; /* close to 100 kHz */
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        current_sense: ina219@45 {
+            compatible = "ti,ina219";
+            reg = <0x45>;
+            shunt-resistor = <60000>; /* = 60 mOhms */
+        };
+
+        eeprom: eeprom@50 {
+            compatible = "atmel,24c64";
+            reg = <0x50>;
+            pagesize = <32>;
+            read-only;
+        };
+    };
+};
+
+&i2c0 {
+    /* status = "okay"; - can be enabled once it works. */
+
+    pinctrl-names = "default";
+    pinctrl-0 = <&pinmux_i2c>;
+
+    clock-frequency = <100000>;
+
+    current_sense: ina219@45 {
+        compatible = "ti,ina219";

Review

Quoted 10 lines
(quoted diff) +10 -0
+        reg = <0x45>;
+        shunt-resistor = <60000>; /* = 60 mOhms */
+    };
+
+    eeprom: eeprom@50 {
+        compatible = "atmel,24c64";
+        reg = <0x50>;
+        pagesize = <32>;
+        read-only;
+    };

These would create duplicate labels which are hard errors per DTC,
so I took out the entire &i2c0 override here into what I merged into devicetree/next.

Quoted 1 line

This cannot have built for you unless you run dtc with the force flag, is that how OpenWrt does it?

I'm sorry for my mistake. Yes, I looked at this now again and my tree had this uncommited change :(.

---

$ git diff
arch/arm/boot/dts/bcm53016-meraki-mr32.dts +2 -2
index 7306df7ff704..35e733b0db62 100644
@@ -122,13 +122,13 @@ &i2c0 {
 
        clock-frequency = <100000>;
 
-       current_sense: ina219@45 {
+       /* current_sense: */ ina219@45 {
                compatible = "ti,ina219";
                reg = <0x45>;
                shunt-resistor = <60000>; /* = 60 mOhms */
        };
 
-       eeprom: eeprom@50 {
+       /* eeprom: */ eeprom@50 {
                compatible = "atmel,24c64";
                reg = <0x50>;
                pagesize = <32>;

---

Didn't show up when running make.

In the OpenWrt version (As OpenWrt is currently using a patched 5.4) the labels on the non-functioning i2c node are commented-out.

<https://patchwork.ozlabs.org/project/openwrt/patch/c647ad56b4adb449cd448a2bc56d58058fd06e6f.1599346205.git.chunkeey@gmail.com/>

|++&i2c0 {
|[...] (Cut)
|++
|++	/* current_sense: */ ina219@45 {
|++		compatible = "ti,ina219";
|++		reg = <0x45>;
|++		shunt-resistor = <60000>; /* = 60 mOhms */
|++	};
|++
|++	/* eeprom: */ eeprom@50 {
|++		compatible = "atmel,24c64";
|++		reg = <0x50>;
|++		pagesize = <32>;
|++		read-only;
|++	};
|++};

Ok, I'll drop the &i2c node as well in my MR32 OpenWrt series. But I'll keep a patch with the i2c node in my openwrt staging tree.

(I can't find devicetree/next on https://git.kernel.org/ . Can you please tell me the link to it?)

Cheers,
Christian

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#15 lore raw

Re: [PATCH v2 6/6] ARM: BCM5301X: Add DT for Meraki MR32

Quoted 119 lines · Christian Lamparter

Hello,

Quoted 7 lines · Florian Fainelli
Quoted 4 lines · Christian Lamparter

add support for the Cisco Meraki MR32.
This is a dual-band enterprise class 802.11ac access point. The unit was donated by Chris Blake. Thank you!

[...]

Quoted 54 lines
Quoted 40 lines
(quoted diff) +40 -0
+
+    i2c {
+        /*
+         * The platform provided I2C does not budge.
+         * This is a replacement until I can figure
+         * out what are the missing bits...
+         */
+
+        compatible = "i2c-gpio";
+        sda-gpios = <&chipcommon 5 GPIO_ACTIVE_HIGH>;
+        scl-gpios = <&chipcommon 4 GPIO_ACTIVE_HIGH>;
+        i2c-gpio,delay-us = <10>; /* close to 100 kHz */
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        current_sense: ina219@45 {
+            compatible = "ti,ina219";
+            reg = <0x45>;
+            shunt-resistor = <60000>; /* = 60 mOhms */
+        };
+
+        eeprom: eeprom@50 {
+            compatible = "atmel,24c64";
+            reg = <0x50>;
+            pagesize = <32>;
+            read-only;
+        };
+    };
+};
+
+&i2c0 {
+    /* status = "okay"; - can be enabled once it works. */
+
+    pinctrl-names = "default";
+    pinctrl-0 = <&pinmux_i2c>;
+
+    clock-frequency = <100000>;
+
+    current_sense: ina219@45 {
+        compatible = "ti,ina219";

Review

Quoted 10 lines
(quoted diff) +10 -0
+        reg = <0x45>;
+        shunt-resistor = <60000>; /* = 60 mOhms */
+    };
+
+    eeprom: eeprom@50 {
+        compatible = "atmel,24c64";
+        reg = <0x50>;
+        pagesize = <32>;
+        read-only;
+    };

These would create duplicate labels which are hard errors per DTC,
so I took out the entire &i2c0 override here into what I merged into devicetree/next.

Quoted 1 line

This cannot have built for you unless you run dtc with the force flag, is that how OpenWrt does it?

I'm sorry for my mistake. Yes, I looked at this now again and my tree had this uncommited change :(.

---

$ git diff
arch/arm/boot/dts/bcm53016-meraki-mr32.dts +2 -3
index 7306df7ff704..35e733b0db62 100644
@@ -122,13 +122,13 @@ &i2c0 {
 
         clock-frequency = <100000>;
 
-       current_sense: ina219@45 {
+       /* current_sense: */ ina219@45 {
                 compatible = "ti,ina219";
                 reg = <0x45>;
                 shunt-resistor = <60000>; /* = 60 mOhms */
         };
 
-       eeprom: eeprom@50 {
+       /* eeprom: */ eeprom@50 {
                 compatible = "atmel,24c64";
                 reg = <0x50>;
                 pagesize = <32>;
---

Didn't show up when running make.

In the OpenWrt version (As OpenWrt is currently using a patched 5.4) the labels on the non-functioning i2c node are commented-out.

<https://patchwork.ozlabs.org/project/openwrt/patch/c647ad56b4adb449cd448a2bc56d58058fd06e6f.1599346205.git.chunkeey@gmail.com/>

|++&i2c0 {
|[...] (Cut)
|++
|++    /* current_sense: */ ina219@45 {
|++        compatible = "ti,ina219";
|++        reg = <0x45>;
|++        shunt-resistor = <60000>; /* = 60 mOhms */
|++    };
|++
|++    /* eeprom: */ eeprom@50 {
|++        compatible = "atmel,24c64";
|++        reg = <0x50>;
|++        pagesize = <32>;
|++        read-only;
|++    };
|++};
Quoted 5 lines

Ok, I'll drop the &i2c node as well in my MR32 OpenWrt series. But I'll keep a patch with the i2c node in my openwrt staging tree.

(I can't find devicetree/next on https://git.kernel.org/ . Can you please tell me the link to it?)

https://github.com/Broadcom/stblinux/commits/devicetree/next

Signature · 6 lines
Florian

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#16 lore raw
In reply to Christian Lamparter
Quoted 25 lines · Christian Lamparter

Hello,

I've been holding on to this devices dts' for a while now. But since the HW has been running with versions of these patches for more than a year, I do think I should make it available in upstream in order to move on.

Hardware-Info of the Meraki MR32:

This is a dual-band enterprise class 802.11ac access point. The unit was donated by Chris Blake. Thank you!

SoC:    Broadcom BCM53016A1 (1 GHz, 2 cores)
RAM:    128 MiB
NAND:   128 MiB Spansion S34ML01G2 (~114 MiB useable)
ETH:    1GBit Ethernet Port - PoE
WIFI1:  Broadcom BCM43520 an+ac (2x2:2 - id: 0x4352)
WIFI2:  Broadcom BCM43520 bgn (2x2:2 - id: 0x4352)
WIFI3:  Broadcom BCM43428 abgn (1x1:1 - id: 43428)

So far, the remaining TODOs center around the pinctrl, i2c and WIFI. The I2C is implemented with the bit-banged i2c-gpio driver as the SoC's I2C didn't budge after many hours of trying.

Quoted 4 lines

A patch that included the "meraki" vendor-prefix has been broken out of the series as recommended by Florian Fainelli. Here's the link:
<https://lists.ozlabs.org/pipermail/linuxppc-dev/2020-August/216949.html>

Series applied, thanks Christian, let's work separately on the pinctrl driver and using the hardware i2c controller. Thanks

Signature · 6 lines
Florian

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel