Skip to contentSkip to conversation

Add Stinger96 and IoT Box board support

PATCH Superseded [email protected] 2 participants 9 messages Apr 20, 2020 – Apr 29, 2020

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover Add Stinger96 and IoT Box board support

From: Manivannan Sadhasivam <[email protected]>

Hello,

This series adds Stinger96 and IoT Box board support. These boards are based on STM32MP157A SoC, designed and manufactured by Shiratech solutions.

The Stinger96 is a base board (96Boards IoT Extended edition) while IoT Box adds one mezzanine on top of it and sold as a gateway device.

This series depends on below patchsets already submitted and gone through reviews:

[PATCH v3 0/3] Add Reset and Wakeup support for CCS811 [PATCH v3 0/2] Add CTS/RTS gpio support to STM32 UART

More information about these boards can be found in below links:

https://www.shiratech-solutions.com/products/stinger96/
https://www.shiratech-solutions.com/products/iot-box/

Thanks,
Mani

Manivannan Sadhasivam (6):
dt-bindings: Add vendor prefix for Shiratech Solutions
ARM: dts: Add missing pinctrl entries for STM32MP15
dt-bindings: arm: stm32: Document Stinger96 compatible
ARM: dts: stm32mp1: Add Stinger96 board support
dt-bindings: arm: stm32: Document IoT Box compatible
ARM: dts: stm32mp1: Add IoT Box board support

 .../devicetree/bindings/arm/stm32/stm32.yaml  |   2 +
 .../devicetree/bindings/vendor-prefixes.yaml  |   2 +
 arch/arm/boot/dts/Makefile                    |   2 +
 arch/arm/boot/dts/stm32mp15-pinctrl.dtsi      |  64 ++++
 arch/arm/boot/dts/stm32mp157a-iot-box.dts     |  92 +++++
 arch/arm/boot/dts/stm32mp157a-stinger96.dts   |  12 +
 arch/arm/boot/dts/stm32mp157a-stinger96.dtsi  | 342 ++++++++++++++++++
 7 files changed, 516 insertions(+)
 create mode 100644 arch/arm/boot/dts/stm32mp157a-iot-box.dts
 create mode 100644 arch/arm/boot/dts/stm32mp157a-stinger96.dts
 create mode 100644 arch/arm/boot/dts/stm32mp157a-stinger96.dtsi
Signature · 1 line
2.17.1
#1 lore raw

PATCH 1/6 dt-bindings: Add vendor prefix for Shiratech Solutions

From: Manivannan Sadhasivam <[email protected]>

This commit adds devicetree vendor prefix for Shiratech solutions, a SOM/embedded board manufacturing company.

https://www.shiratech-solutions.com/

---
 Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++
 1 file changed, 2 insertions(+)
Documentation/devicetree/bindings/vendor-prefixes.yaml +2 -0
index e3f1b06d12ae..48ad8f954f33 100644
@@ -902,6 +902,8 @@ patternProperties:
     description: Sharp Corporation
   "^shimafuji,.*":
     description: Shimafuji Electric, Inc.
+  "^shiratech,.*":
+    description: Shiratech Solutions
   "^si-en,.*":
     description: Si-En Technology Ltd.
   "^si-linux,.*":
Signature · 1 line
2.17.1
#2 lore raw

PATCH 2/6 ARM: dts: Add missing pinctrl entries for STM32MP15

In reply to [email protected]

From: Manivannan Sadhasivam <[email protected]>

These pinctrl definitions will be used by Stinger96/IoTBox boards from Shiratech.

---
 arch/arm/boot/dts/stm32mp15-pinctrl.dtsi | 64 ++++++++++++++++++++++++
 1 file changed, 64 insertions(+)
arch/arm/boot/dts/stm32mp15-pinctrl.dtsi +64 -0
index aeddcaadb829..858c83038e5a 100644
@@ -1519,6 +1519,30 @@
 		};
 	};
 
+	usart2_pins_b: usart2-1 {
+		pins1 {
+			pinmux = <STM32_PINMUX('F', 5, AF7)>, /* USART2_TX */
+				 <STM32_PINMUX('A', 1, AF7)>; /* USART2_RTS */
+			bias-disable;
+			drive-push-pull;
+			slew-rate = <0>;
+		};
+		pins2 {
+			pinmux = <STM32_PINMUX('F', 4, AF7)>, /* USART2_RX */
+				 <STM32_PINMUX('E', 15, AF7)>; /* USART2_CTS_NSS */
+			bias-disable;
+		};
+	};
+
+	usart2_sleep_pins_b: usart2-sleep-1 {
+		pins {
+			pinmux = <STM32_PINMUX('F', 5, ANALOG)>, /* USART2_TX */
+				 <STM32_PINMUX('A', 1, ANALOG)>, /* USART2_RTS */
+				 <STM32_PINMUX('F', 4, ANALOG)>, /* USART2_RX */
+				 <STM32_PINMUX('E', 15, ANALOG)>; /* USART2_CTS_NSS */
+		};
+	};
+
 	usart3_pins_a: usart3-0 {
 		pins1 {
 			pinmux = <STM32_PINMUX('B', 10, AF7)>; /* USART3_TX */
@@ -1558,6 +1582,19 @@
 		};
 	};
 
+	uart4_pins_c: uart4-2 {
+		pins1 {
+			pinmux = <STM32_PINMUX('G', 11, AF6)>; /* UART4_TX */
+			bias-disable;
+			drive-push-pull;
+			slew-rate = <0>;
+		};
+		pins2 {
+			pinmux = <STM32_PINMUX('B', 2, AF8)>; /* UART4_RX */
+			bias-disable;
+		};
+	};
+
 	uart7_pins_a: uart7-0 {
 		pins1 {
 			pinmux = <STM32_PINMUX('E', 8, AF7)>; /* UART4_TX */
@@ -1573,6 +1610,19 @@
 		};
 	};
 
+	uart7_pins_b: uart7-1 {
+		pins1 {
+			pinmux = <STM32_PINMUX('F', 7, AF7)>; /* UART7_TX */
+			bias-disable;
+			drive-push-pull;
+			slew-rate = <0>;
+		};
+		pins2 {
+			pinmux = <STM32_PINMUX('F', 6, AF7)>; /* UART7_RX */
+			bias-disable;
+		};
+	};
+
 	uart8_pins_a: uart8-0 {
 		pins1 {
 			pinmux = <STM32_PINMUX('E', 1, AF8)>; /* UART8_TX */
@@ -1647,4 +1697,18 @@
 			bias-disable;
 		};
 	};
+
+	spi4_pins_a: spi4-0 {
+		pins {
+			pinmux = <STM32_PINMUX('E', 12, AF5)>, /* SPI4_SCK */
+				 <STM32_PINMUX('E', 6, AF5)>;  /* SPI4_MOSI */
+			bias-disable;
+			drive-push-pull;
+			slew-rate = <1>;
+		};
+		pins2 {
+			pinmux = <STM32_PINMUX('E', 13, AF5)>; /* SPI4_MISO */
+			bias-disable;
+		};
+	};
 };
Signature · 1 line
2.17.1
#3 lore raw

Re: [PATCH 2/6] ARM: dts: Add missing pinctrl entries for STM32MP15

Hi Mani

Commit title should be ARM: dts: stm32 ...
otherwise it's good.

regards
alex

Quoted 105 lines · On 4/20/20 7:31 PM, [email protected] wrote:

From: Manivannan Sadhasivam <[email protected]>

These pinctrl definitions will be used by Stinger96/IoTBox boards from Shiratech.

---
  arch/arm/boot/dts/stm32mp15-pinctrl.dtsi | 64 ++++++++++++++++++++++++
  1 file changed, 64 insertions(+)
arch/arm/boot/dts/stm32mp15-pinctrl.dtsi +64 -0
index aeddcaadb829..858c83038e5a 100644
@@ -1519,6 +1519,30 @@
  		};
  	};
 
+	usart2_pins_b: usart2-1 {
+		pins1 {
+			pinmux = <STM32_PINMUX('F', 5, AF7)>, /* USART2_TX */
+				 <STM32_PINMUX('A', 1, AF7)>; /* USART2_RTS */
+			bias-disable;
+			drive-push-pull;
+			slew-rate = <0>;
+		};
+		pins2 {
+			pinmux = <STM32_PINMUX('F', 4, AF7)>, /* USART2_RX */
+				 <STM32_PINMUX('E', 15, AF7)>; /* USART2_CTS_NSS */
+			bias-disable;
+		};
+	};
+
+	usart2_sleep_pins_b: usart2-sleep-1 {
+		pins {
+			pinmux = <STM32_PINMUX('F', 5, ANALOG)>, /* USART2_TX */
+				 <STM32_PINMUX('A', 1, ANALOG)>, /* USART2_RTS */
+				 <STM32_PINMUX('F', 4, ANALOG)>, /* USART2_RX */
+				 <STM32_PINMUX('E', 15, ANALOG)>; /* USART2_CTS_NSS */
+		};
+	};
+
  	usart3_pins_a: usart3-0 {
  		pins1 {
  			pinmux = <STM32_PINMUX('B', 10, AF7)>; /* USART3_TX */
@@ -1558,6 +1582,19 @@
  		};
  	};
 
+	uart4_pins_c: uart4-2 {
+		pins1 {
+			pinmux = <STM32_PINMUX('G', 11, AF6)>; /* UART4_TX */
+			bias-disable;
+			drive-push-pull;
+			slew-rate = <0>;
+		};
+		pins2 {
+			pinmux = <STM32_PINMUX('B', 2, AF8)>; /* UART4_RX */
+			bias-disable;
+		};
+	};
+
  	uart7_pins_a: uart7-0 {
  		pins1 {
  			pinmux = <STM32_PINMUX('E', 8, AF7)>; /* UART4_TX */
@@ -1573,6 +1610,19 @@
  		};
  	};
 
+	uart7_pins_b: uart7-1 {
+		pins1 {
+			pinmux = <STM32_PINMUX('F', 7, AF7)>; /* UART7_TX */
+			bias-disable;
+			drive-push-pull;
+			slew-rate = <0>;
+		};
+		pins2 {
+			pinmux = <STM32_PINMUX('F', 6, AF7)>; /* UART7_RX */
+			bias-disable;
+		};
+	};
+
  	uart8_pins_a: uart8-0 {
  		pins1 {
  			pinmux = <STM32_PINMUX('E', 1, AF8)>; /* UART8_TX */
@@ -1647,4 +1697,18 @@
  			bias-disable;
  		};
  	};
+
+	spi4_pins_a: spi4-0 {
+		pins {
+			pinmux = <STM32_PINMUX('E', 12, AF5)>, /* SPI4_SCK */
+				 <STM32_PINMUX('E', 6, AF5)>;  /* SPI4_MOSI */
+			bias-disable;
+			drive-push-pull;
+			slew-rate = <1>;
+		};
+		pins2 {
+			pinmux = <STM32_PINMUX('E', 13, AF5)>; /* SPI4_MISO */
+			bias-disable;
+		};
+	};
  };
#4 lore raw

PATCH 3/6 dt-bindings: arm: stm32: Document Stinger96 compatible

In reply to [email protected]

From: Manivannan Sadhasivam <[email protected]>

Document devicetree compatible of Shiratech Stinger96 board.

---
 Documentation/devicetree/bindings/arm/stm32/stm32.yaml | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/arm/stm32/stm32.yaml +1 -0
index 71ea3f04ab9c..3849f1d0e03e 100644
@@ -39,6 +39,7 @@ properties:
           - enum:
               - arrow,stm32mp157a-avenger96 # Avenger96
               - lxa,stm32mp157c-mc1
+              - shiratech,stm32mp157a-stinger96 # Stinger96
               - st,stm32mp157c-ed1
               - st,stm32mp157a-dk1
               - st,stm32mp157c-dk2
Signature · 1 line
2.17.1
#5 lore raw

PATCH 4/6 ARM: dts: stm32mp1: Add Stinger96 board support

In reply to [email protected]

From: Manivannan Sadhasivam <[email protected]>

Stinger96 is a 96Boards IoT Extended edition board designed and manufactured by Shiratech solutions based on STM32MP1 SoC. Following are the features of this board:

* 256MB DDR
* 125MB NAND Flash
* Onboard BG96 modem
* 1x uSD
* 2x USB (1 available as external connector and another connected to BG96)
* 1x SPI
* 1x PCM
* 2x UART (apart from serial console)
* 2x I2C (apart from one connected to PMIC)

Following peripherals are tested and known to work:

* BG96 modem
* 1x I2C (LS-I2C0)
* 1x SPI
* 1x UART (LS-UART0)
* USB (Only Gadget mode)
* uSD

More information about this board can be found in Shiratech website:
https://www.shiratech-solutions.com/products/stinger96/

---
 arch/arm/boot/dts/Makefile                   |   1 +
 arch/arm/boot/dts/stm32mp157a-stinger96.dts  |  12 +
 arch/arm/boot/dts/stm32mp157a-stinger96.dtsi | 342 +++++++++++++++++++
 3 files changed, 355 insertions(+)
 create mode 100644 arch/arm/boot/dts/stm32mp157a-stinger96.dts
 create mode 100644 arch/arm/boot/dts/stm32mp157a-stinger96.dtsi
arch/arm/boot/dts/Makefile +1 -0
index f43467b02bcd..966b81dfffd6 100644
@@ -1030,6 +1030,7 @@ dtb-$(CONFIG_ARCH_STM32) += \
 	stm32h743i-disco.dtb \
 	stm32mp157a-avenger96.dtb \
 	stm32mp157a-dk1.dtb \
+	stm32mp157a-stinger96.dtb \
 	stm32mp157c-dhcom-pdk2.dtb \
 	stm32mp157c-dk2.dtb \
 	stm32mp157c-ed1.dtb \
arch/arm/boot/dts/stm32mp157a-stinger96.dts new file +12 -0
new file mode 100644
index 000000000000..249a53877512
@@ -0,0 +1,12 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (C) 2020 Manivannan Sadhasivam
+ */
+
+/dts-v1/;
+#include "stm32mp157a-stinger96.dtsi"
+
+/ {
+	model = "Shiratech STM32MP157A Stinger96 board";
+	compatible = "shiratech,stm32mp157a-stinger96", "st,stm32mp157";
+};
arch/arm/boot/dts/stm32mp157a-stinger96.dtsi new file +342 -0

342 lines not on this page · raw message

Signature · 1 line
2.17.1
#6 lore raw

PATCH 5/6 dt-bindings: arm: stm32: Document IoT Box compatible

In reply to [email protected]

From: Manivannan Sadhasivam <[email protected]>

Document devicetree compatible of Shiratech IoT Box.

---
 Documentation/devicetree/bindings/arm/stm32/stm32.yaml | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/arm/stm32/stm32.yaml +1 -0
index 3849f1d0e03e..790e6dd48e34 100644
@@ -39,6 +39,7 @@ properties:
           - enum:
               - arrow,stm32mp157a-avenger96 # Avenger96
               - lxa,stm32mp157c-mc1
+              - shiratech,stm32mp157a-iot-box # IoT Box
               - shiratech,stm32mp157a-stinger96 # Stinger96
               - st,stm32mp157c-ed1
               - st,stm32mp157a-dk1
Signature · 1 line
2.17.1
#7 lore raw

PATCH 6/6 ARM: dts: stm32mp1: Add IoT Box board support

In reply to [email protected]

From: Manivannan Sadhasivam <[email protected]>

IoT Box is an IoT gateway device based on Stinger96 board powered by STM32MP1 SoC, designed and manufactured by Shiratech Solutions. This device makes use of Stinger96 board by having it as a base board with one additional mezzanine on top.

Following are the features exposed by this device in addition to the Stinger96 board:

* WiFi/BT
* CCS811 VOC sensor
* 2x Digital microphones IM69D130
* 12x WS2812B LEDs

Following peripherals are tested and known to work:

* WiFi/BT
* CCS811

More information about this device can be found in Shiratech website:
https://www.shiratech-solutions.com/products/iot-box/

---
 arch/arm/boot/dts/Makefile                |  1 +
 arch/arm/boot/dts/stm32mp157a-iot-box.dts | 92 +++++++++++++++++++++++
 2 files changed, 93 insertions(+)
 create mode 100644 arch/arm/boot/dts/stm32mp157a-iot-box.dts
arch/arm/boot/dts/Makefile +1 -0
index 966b81dfffd6..455ec6eb6303 100644
@@ -1030,6 +1030,7 @@ dtb-$(CONFIG_ARCH_STM32) += \
 	stm32h743i-disco.dtb \
 	stm32mp157a-avenger96.dtb \
 	stm32mp157a-dk1.dtb \
+	stm32mp157a-iot-box.dtb \
 	stm32mp157a-stinger96.dtb \
 	stm32mp157c-dhcom-pdk2.dtb \
 	stm32mp157c-dk2.dtb \
arch/arm/boot/dts/stm32mp157a-iot-box.dts new file +92 -0

92 lines not on this page · raw message

Signature · 1 line
2.17.1
#8 lore raw

Re: [PATCH 6/6] ARM: dts: stm32mp1: Add IoT Box board support

Hi Mani

Quoted 72 lines · On 4/20/20 7:31 PM, [email protected] wrote:

From: Manivannan Sadhasivam <[email protected]>

IoT Box is an IoT gateway device based on Stinger96 board powered by STM32MP1 SoC, designed and manufactured by Shiratech Solutions. This device makes use of Stinger96 board by having it as a base board with one additional mezzanine on top.

Following are the features exposed by this device in addition to the Stinger96 board:

* WiFi/BT
* CCS811 VOC sensor
* 2x Digital microphones IM69D130
* 12x WS2812B LEDs

Following peripherals are tested and known to work:

* WiFi/BT
* CCS811

More information about this device can be found in Shiratech website:
https://www.shiratech-solutions.com/products/iot-box/

---
  arch/arm/boot/dts/Makefile                |  1 +
  arch/arm/boot/dts/stm32mp157a-iot-box.dts | 92 +++++++++++++++++++++++
  2 files changed, 93 insertions(+)

create mode 100644 arch/arm/boot/dts/stm32mp157a-iot-box.dts

arch/arm/boot/dts/Makefile +1 -0
index 966b81dfffd6..455ec6eb6303 100644
@@ -1030,6 +1030,7 @@ dtb-$(CONFIG_ARCH_STM32) += \
  	stm32h743i-disco.dtb \
  	stm32mp157a-avenger96.dtb \
  	stm32mp157a-dk1.dtb \
+	stm32mp157a-iot-box.dtb \
  	stm32mp157a-stinger96.dtb \
  	stm32mp157c-dhcom-pdk2.dtb \
  	stm32mp157c-dk2.dtb \
arch/arm/boot/dts/stm32mp157a-iot-box.dts new file +24 -0
new file mode 100644
index 000000000000..fa1c006ce531
@@ -0,0 +1,92 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (C) 2020 Manivannan Sadhasivam
+ */
+
+/dts-v1/;
+#include "stm32mp157a-stinger96.dtsi"
+
+/ {
+	model = "Shiratech STM32MP157A IoT Box";
+	compatible = "shiratech,stm32mp157a-iot-box", "st,stm32mp157";
+
+	wlan_pwr: regulator-wlan {
+		compatible = "regulator-fixed";
+
+		regulator-name = "wl-reg";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+
+		gpios = <&gpiog 3 GPIO_ACTIVE_HIGH>;
+		enable-active-high;
+	};
+};
+

arch/arm/boot/dts/stm32mp157a-iot-box.dts line 34

Quoted 10 lines
arch/arm/boot/dts/stm32mp157a-iot-box.dts new file +10 -0
+&i2c2 {
+	ccs811@5b {
+		compatible = "ams,ccs811";
+		reg = <0x5b>;
+		wakeup-gpios = <&gpioa 12 GPIO_ACTIVE_LOW>;
+		reset-gpios = <&gpioa 11 GPIO_ACTIVE_LOW>;
+	};
+};
+
+&pinctrl {

Currently all pinmux definition are done in stm32mp15-pinctrl.dtsi file. Can you move it ?

Otherwise (except commit title) it is ok for me.

thanks
alex

Quoted 49 lines
arch/arm/boot/dts/stm32mp157a-iot-box.dts new file +48 -0
+	/*
+	 * Note: The SDMMC2 pins lack external pullups on data lines. Hence,
+	 * we need to enable it in the SoC.
+	 */
+	sdmmc2_b4_pins_pull: sdmmc2-b4-pull {
+		pins1 {
+			pinmux = <STM32_PINMUX('B', 14, AF9)>, /* SDMMC2_D0 */
+				 <STM32_PINMUX('B', 15, AF9)>, /* SDMMC2_D1 */
+				 <STM32_PINMUX('B', 3, AF9)>, /* SDMMC2_D2 */
+				 <STM32_PINMUX('B', 4, AF9)>, /* SDMMC2_D3 */
+				 <STM32_PINMUX('G', 6, AF10)>; /* SDMMC2_CMD */
+			slew-rate = <1>;
+			bias-pull-up;
+		};
+		pins2 {
+			pinmux = <STM32_PINMUX('E', 3, AF9)>; /* SDMMC2_CK */
+			slew-rate = <2>;
+			drive-push-pull;
+			bias-disable;
+		};
+	};
+};
+
+/* WiFi */
+&sdmmc2 {
+	pinctrl-names = "default", "opendrain", "sleep";
+	pinctrl-0 = <&sdmmc2_b4_pins_pull>;
+	pinctrl-1 = <&sdmmc2_b4_od_pins_b>;
+	pinctrl-2 = <&sdmmc2_b4_sleep_pins_a>;
+	broken-cd;
+	non-removable;
+	st,neg-edge;
+	bus-width = <1>;
+	vmmc-supply = <&wlan_pwr>;
+	status = "okay";
+
+	#address-cells = <1>;
+	#size-cells = <0>;
+	brcmf: bcrmf@1 {
+		reg = <1>;
+		compatible = "brcm,bcm4329-fmac";
+	};
+};
+
+/* Bluetooth */
+&uart4 {
+	/* Note: HW flow control is broken, hence using custom CTS/RTS gpios */
+	/delete-property/st,hw-flow-ctrl;

arch/arm/boot/dts/stm32mp157a-iot-box.dts line 92

Quoted 10 lines
arch/arm/boot/dts/stm32mp157a-iot-box.dts new file +10 -0
+	cts-gpios = <&gpioa 15 GPIO_ACTIVE_LOW>;
+	rts-gpios = <&gpiob 0 GPIO_ACTIVE_LOW>;
+	status = "okay";
+
+	bluetooth {
+		shutdown-gpios = <&gpiog 2 GPIO_ACTIVE_HIGH>;
+		compatible = "brcm,bcm43438-bt";
+		max-speed = <115200>;
+	};
+};

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