Skip to contentSkip to conversation

Meson8m2 (32-bit ARM) SoC support

PATCH Superseded Martin Blumenstingl 3 participants 13 messages May 6, 2018 – May 9, 2018

Subsystems (5)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Martin Blumenstingl

author reviewer
#0 lore raw

cover Meson8m2 (32-bit ARM) SoC support

This series adds support for the Meson8m2 SoC. This SoC is mostly compatible with Meson8 while using some peripherals from Meson8b. Patch #4 contains a list of (known) differences between the Meson8 and Meson8m2 SoCs.

The first supported board with Meson8m2 SoC is the "Tronsmart MXIII Plus" where Oleg contributed the initial .dts and heavily tested it (many thanks!). His testing also confirmed that the Meson8m2 SoC uses the same register layout for the Ethernet "glue registers (supported by the dwmac-meson8b driver) as Meson8b.

Martin Blumenstingl (5):
dt-bindings: arm: amlogic: add support for the Meson8m2 SoC
dt-bindings: arm: amlogic: add support for the Tronsmart MXIII Plus
ARM: meson: add support for the Meson8m2 SoCs
ARM: dts: meson: add support for the Meson8m2 SoC
ARM: dts: meson8: add the uart_A pins

Oleg Ivanov (1):
ARM: dts: meson8m2: add support for the Tronsmart MXIII Plus

 .../devicetree/bindings/arm/amlogic.txt       |   6 +
 arch/arm/boot/dts/Makefile                    |   2 +
 arch/arm/boot/dts/meson8.dtsi                 |  16 ++
 arch/arm/boot/dts/meson8m2-mxiii-plus.dts     | 244 ++++++++++++++++++
 arch/arm/boot/dts/meson8m2.dtsi               |  54 ++++
 arch/arm/mach-meson/Kconfig                   |   7 +
 arch/arm/mach-meson/meson.c                   |   1 +
 7 files changed, 330 insertions(+)
 create mode 100644 arch/arm/boot/dts/meson8m2-mxiii-plus.dts
 create mode 100644 arch/arm/boot/dts/meson8m2.dtsi
Signature · 1 line
2.17.0
author reviewer
#1 lore raw

PATCH 1/6 dt-bindings: arm: amlogic: add support for the Meson8m2 SoC

The Meson8m2 SoC is an updated version of the Meson8 SoC. Some of the peripherals are updated to be register-compatible with Meson8b.

---
 Documentation/devicetree/bindings/arm/amlogic.txt | 4 ++++
 1 file changed, 4 insertions(+)
Documentation/devicetree/bindings/arm/amlogic.txt +4 -0
index f747f47922c5..6c6642c69de3 100644
@@ -25,6 +25,10 @@ Boards with the Amlogic Meson8b SoC shall have the following properties:
   Required root node property:
     compatible: "amlogic,meson8b";
 
+Boards with the Amlogic Meson8m2 SoC shall have the following properties:
+  Required root node property:
+    compatible: "amlogic,meson8m2";
+
 Boards with the Amlogic Meson GXBaby SoC shall have the following properties:
   Required root node property:
     compatible: "amlogic,meson-gxbb";
Signature · 1 line
2.17.0
maintainer
#2 lore raw

PATCH 1/6 dt-bindings: arm: amlogic: add support for the Meson8m2 SoC

Quoted 7 lines · Martin Blumenstingl

The Meson8m2 SoC is an updated version of the Meson8 SoC. Some of the peripherals are updated to be register-compatible with Meson8b.

---
 Documentation/devicetree/bindings/arm/amlogic.txt | 4 ++++
 1 file changed, 4 insertions(+)
maintainer
#3 lore raw

PATCH 1/6 dt-bindings: arm: amlogic: add support for the Meson8m2 SoC

Quoted 10 lines · Rob Herring
Quoted 7 lines · Martin Blumenstingl

The Meson8m2 SoC is an updated version of the Meson8 SoC. Some of the peripherals are updated to be register-compatible with Meson8b.

---
 Documentation/devicetree/bindings/arm/amlogic.txt | 4 ++++
 1 file changed, 4 insertions(+)

Applied with tag from Rob,

Kevin

author reviewer
#4 lore raw

PATCH 2/6 dt-bindings: arm: amlogic: add support for the Tronsmart MXIII Plus

In reply to Martin Blumenstingl

Add the binding documentation for the Tronsmart MXIII Plus which is an Android TV box using the Amlogic S812 (Meson8m2) SoC.

---
 Documentation/devicetree/bindings/arm/amlogic.txt | 2 ++
 1 file changed, 2 insertions(+)
Documentation/devicetree/bindings/arm/amlogic.txt +2 -0
index 6c6642c69de3..69880560c0f0 100644
@@ -58,6 +58,8 @@ Board compatible values (alphabetically, grouped by SoC):
   - "hardkernel,odroid-c1" (Meson8b)
   - "tronfy,mxq" (Meson8b)
 
+  - "tronsmart,mxiii-plus" (Meson8m2)
+
   - "amlogic,p200" (Meson gxbb)
   - "amlogic,p201" (Meson gxbb)
   - "friendlyarm,nanopi-k2" (Meson gxbb)
Signature · 1 line
2.17.0
maintainer
#5 lore raw

PATCH 2/6 dt-bindings: arm: amlogic: add support for the Tronsmart MXIII Plus

Quoted 7 lines · Martin Blumenstingl

Add the binding documentation for the Tronsmart MXIII Plus which is an Android TV box using the Amlogic S812 (Meson8m2) SoC.

---
 Documentation/devicetree/bindings/arm/amlogic.txt | 2 ++
 1 file changed, 2 insertions(+)
maintainer
#6 lore raw

PATCH 2/6 dt-bindings: arm: amlogic: add support for the Tronsmart MXIII Plus

Quoted 10 lines · Rob Herring
Quoted 7 lines · Martin Blumenstingl

Add the binding documentation for the Tronsmart MXIII Plus which is an Android TV box using the Amlogic S812 (Meson8m2) SoC.

---
 Documentation/devicetree/bindings/arm/amlogic.txt | 2 ++
 1 file changed, 2 insertions(+)

Applied with tag from Rob,

Kevin

author reviewer
#7 lore raw

PATCH 3/6 ARM: meson: add support for the Meson8m2 SoCs

In reply to Martin Blumenstingl

Add a new Kconfig entry as well as the newly introduced compatible string for the Meson8m2 SoC.
The Kconfig entry selects the same drivers as Meson8b because Meson8m2 SoC is mostly compatible with Meson8 (both share the same pinctrl driver, so they also share the same GPIO IRQ settings. also the same Meson6 timer is used on Meson8m2).

---
 arch/arm/mach-meson/Kconfig | 7 +++++++
 arch/arm/mach-meson/meson.c | 1 +
 2 files changed, 8 insertions(+)
arch/arm/mach-meson/Kconfig +7 -0
index d90f61e6254f..44a489889bc1 100644
@@ -32,4 +32,11 @@ config MACH_MESON8B
 	select COMMON_CLK_MESON8B
 	select MESON_IRQ_GPIO
 
+config MACH_MESON8M2
+	bool "Amlogic Meson8m2 SoCs support"
+	default ARCH_MESON
+	select MESON6_TIMER
+	select COMMON_CLK_MESON8B
+	select MESON_IRQ_GPIO
+
 endif
arch/arm/mach-meson/meson.c +1 -0
index 4e2357178625..c8d99df32f9b 100644
@@ -20,6 +20,7 @@ static const char * const meson_common_board_compat[] = {
 	"amlogic,meson6",
 	"amlogic,meson8",
 	"amlogic,meson8b",
+	"amlogic,meson8m2",
 	NULL,
 };
 
Signature · 1 line
2.17.0
maintainer
#8 lore raw

PATCH 3/6 ARM: meson: add support for the Meson8m2 SoCs

Quoted 18 lines · Martin Blumenstingl

Add a new Kconfig entry as well as the newly introduced compatible string for the Meson8m2 SoC.
The Kconfig entry selects the same drivers as Meson8b because Meson8m2 SoC is mostly compatible with Meson8 (both share the same pinctrl driver, so they also share the same GPIO IRQ settings. also the same Meson6 timer is used on Meson8m2).

---
 arch/arm/mach-meson/Kconfig | 7 +++++++
 arch/arm/mach-meson/meson.c | 1 +
 2 files changed, 8 insertions(+)
arch/arm/mach-meson/Kconfig +0 -0
index d90f61e6254f..44a489889bc1 100644

arch/arm/mach-meson/Kconfig config MACH_MESON8B · line 40

Quoted 9 lines
arch/arm/mach-meson/Kconfig +6 -0
@@ -32,4 +32,11 @@ config MACH_MESON8B
 	select COMMON_CLK_MESON8B
 	select MESON_IRQ_GPIO
 
+config MACH_MESON8M2
+	bool "Amlogic Meson8m2 SoCs support"
+	default ARCH_MESON
+	select MESON6_TIMER
+	select COMMON_CLK_MESON8B
+	select MESON_IRQ_GPIO

I'd prefer to stop the proliferation of identical Kconfigs which are only used to select which DTB files to compile.

Instead, can you drop this new Kconfig as well as MACH_MESON8, and just make all the meson8* DTBs build based on MACH_MESON8?

I think it better to have fewer Kconfigs. The only cost is building a couple extra DTBs.

Thanks,

Kevin

Quoted 12 lines
arch/arm/mach-meson/Kconfig +0 -0
 endif
arch/arm/mach-meson/meson.c +1 -0
index 4e2357178625..c8d99df32f9b 100644
@@ -20,6 +20,7 @@ static const char * const meson_common_board_compat[] = {
 	"amlogic,meson6",
 	"amlogic,meson8",
 	"amlogic,meson8b",
+	"amlogic,meson8m2",
 	NULL,
 };
author reviewer
#9 lore raw

PATCH 3/6 ARM: meson: add support for the Meson8m2 SoCs

Hi Kevin,

Quoted 33 lines · Kevin Hilman
Quoted 18 lines · Martin Blumenstingl

Add a new Kconfig entry as well as the newly introduced compatible string for the Meson8m2 SoC.
The Kconfig entry selects the same drivers as Meson8b because Meson8m2 SoC is mostly compatible with Meson8 (both share the same pinctrl driver, so they also share the same GPIO IRQ settings. also the same Meson6 timer is used on Meson8m2).

---
 arch/arm/mach-meson/Kconfig | 7 +++++++
 arch/arm/mach-meson/meson.c | 1 +
 2 files changed, 8 insertions(+)
arch/arm/mach-meson/Kconfig +0 -0
index d90f61e6254f..44a489889bc1 100644

arch/arm/mach-meson/Kconfig config MACH_MESON8B · line 40

Quoted 9 lines
arch/arm/mach-meson/Kconfig +6 -0
@@ -32,4 +32,11 @@ config MACH_MESON8B
      select COMMON_CLK_MESON8B
      select MESON_IRQ_GPIO
 
+config MACH_MESON8M2
+     bool "Amlogic Meson8m2 SoCs support"
+     default ARCH_MESON
+     select MESON6_TIMER
+     select COMMON_CLK_MESON8B
+     select MESON_IRQ_GPIO

I'd prefer to stop the proliferation of identical Kconfigs which are only used to select which DTB files to compile.

Quoted 5 lines

Instead, can you drop this new Kconfig as well as MACH_MESON8, and just make all the meson8* DTBs build based on MACH_MESON8?

I think it better to have fewer Kconfigs. The only cost is building a couple extra DTBs.

sure, no problem - I'll re-send patches 3-6 in the next few days with this fixes

Regards
Martin

author reviewer
#10 lore raw

PATCH 4/6 ARM: dts: meson: add support for the Meson8m2 SoC

In reply to Martin Blumenstingl

This adds a meson8m2.dtsi which simply inherits meson8.dtsi as both SoCs share most peripherals.
The known differences are:
- Meson8m2's hardware video decoder additionally supports H.265 decoding
- Meson8m2 has the same Gigabit MAC as Meson8b (instead of the 10/100M MAC that Meson8 uses)
- Meson8m2 uses the same watchdog register layout/bits as Meson8b (using the Meson8 watchdog compatible leads to an infinite hang when rebooting the machine)
- Meson8m2 uses the same SAR ADC register layout/bits as Meson8b. However, it uses the temperature sensor calibration formula (and registers) Meson8b which differ from Meson8. This however is currently not supported by the meson-saradc driver yet.
- the pin controller is mostly compatible with Meson8, Meson8m2 has an additional function on eight pins and removes the "VGA" function. So there's a total of 10 pins which are slightly changed, which is why there's a separate compatible for the pin controller
- a separate compatible for the clock controller is used because at least the Mali clock tree (not supported yet) is the same as on GXBB while Meson8 and Meson8b have a reduced/older version of the Mali clock tree.

---
 arch/arm/boot/dts/meson8m2.dtsi | 54 +++++++++++++++++++++++++++++++++
 1 file changed, 54 insertions(+)
 create mode 100644 arch/arm/boot/dts/meson8m2.dtsi
arch/arm/boot/dts/meson8m2.dtsi new file +54 -0
new file mode 100644
index 000000000000..3e1f92273d7b
@@ -0,0 +1,54 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2017 Martin Blumenstingl <[email protected]>.
+ */
+
+#include "meson8.dtsi"
+
+/ {
+	model = "Amlogic Meson8m2 SoC";
+	compatible = "amlogic,meson8m2";
+}; /* end of / */
+
+&clkc {
+	compatible = "amlogic,meson8m2-clkc", "amlogic,meson8-clkc";
+};
+
+&ethmac {
+	compatible = "amlogic,meson8m2-dwmac", "snps,dwmac";
+	reg = <0xc9410000 0x10000
+		0xc1108140 0x8>;
+	clocks = <&clkc CLKID_ETH>,
+		 <&clkc CLKID_MPLL2>,
+		 <&clkc CLKID_MPLL2>;
+	clock-names = "stmmaceth", "clkin0", "clkin1";
+	resets = <&reset RESET_ETHERNET>;
+	reset-names = "stmmaceth";
+};
+
+&pinctrl_aobus {
+	compatible = "amlogic,meson8m2-aobus-pinctrl",
+		     "amlogic,meson8-aobus-pinctrl";
+};
+
+&pinctrl_cbus {
+	compatible = "amlogic,meson8m2-cbus-pinctrl",
+		     "amlogic,meson8-cbus-pinctrl";
+
+	eth_rgmii_pins: ethernet {
+		mux {
+			groups = "eth_tx_clk_50m", "eth_tx_en",
+				 "eth_txd3", "eth_txd2",
+				 "eth_txd1", "eth_txd0",
+				 "eth_rx_clk_in", "eth_rx_dv",
+				 "eth_rxd3", "eth_rxd2",
+				 "eth_rxd1", "eth_rxd0",
+				 "eth_mdio", "eth_mdc";
+			function = "ethernet";
+		};
+	};
+};
+
+&wdt {
+	compatible = "amlogic,meson8m2-wdt", "amlogic,meson8b-wdt";
+};
Signature · 1 line
2.17.0
author reviewer
#11 lore raw

PATCH 5/6 ARM: dts: meson8: add the uart_A pins

In reply to Martin Blumenstingl

This adds the pins for uart_A, which is used to connect to the Bluetooth module on some devices.

---
 arch/arm/boot/dts/meson8.dtsi | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
arch/arm/boot/dts/meson8.dtsi +16 -0
index 7b16ea61e914..d77dcf890cfc 100644
@@ -281,6 +281,22 @@
 				function = "pwm_e";
 			};
 		};
+
+		uart_a1_pins: uart-a1 {
+			mux {
+				groups = "uart_tx_a1",
+				       "uart_rx_a1";
+				function = "uart_a";
+			};
+		};
+
+		uart_a1_cts_rts_pins: uart-a1-cts-rts {
+			mux {
+				groups = "uart_cts_a1",
+				       "uart_rts_a1";
+				function = "uart_a";
+			};
+		};
 	};
 };
 
Signature · 1 line
2.17.0
author reviewer
#12 lore raw

PATCH 6/6 ARM: dts: meson8m2: add support for the Tronsmart MXIII Plus

In reply to Martin Blumenstingl

From: Oleg Ivanov <[email protected]>

The Tronsmart MXIII Plus is an Android TV box which uses the Amlogic S812 (Meson8m2) SoC. It uses a Realtek RTL8211F RGMII Ethernet PHY as well as a Ricoh RN5T618 system power controller. It also comes with an Ampak AP6330 SDIO wifi/Bluetooth combo chip (support for wifi and Bluetooth is currently not added because the Linux drivers currently only support one MMC controller and that is used for the SD card).

---
 arch/arm/boot/dts/Makefile                |   2 +
 arch/arm/boot/dts/meson8m2-mxiii-plus.dts | 244 ++++++++++++++++++++++
 2 files changed, 246 insertions(+)
 create mode 100644 arch/arm/boot/dts/meson8m2-mxiii-plus.dts
arch/arm/boot/dts/Makefile +2 -0
index 7e2424957809..b6d4fea16f50 100644
@@ -320,6 +320,8 @@ dtb-$(CONFIG_ARCH_MMP) += \
 dtb-$(CONFIG_MACH_MESON8B) += \
 	meson8b-mxq.dtb \
 	meson8b-odroidc1.dtb
+dtb-$(CONFIG_MACH_MESON8M2) += \
+	meson8m2-mxiii-plus.dtb
 dtb-$(CONFIG_ARCH_MPS2) += \
 	mps2-an385.dtb \
 	mps2-an399.dtb
arch/arm/boot/dts/meson8m2-mxiii-plus.dts new file +244 -0

244 lines not on this page · raw message

Signature · 1 line
2.17.0