Meson8m2 (32-bit ARM) SoC support
Subsystems (5)
Martin Blumenstingl
reviewerv2 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.
changes since v1 at [0]:
- do not create a new MACH_MESON8M2 Kconfig entry as suggested by Kevin (MACH_MESON8 is re-used instead). This affects patch #1 (which was patch #3 in v1) and patch #4 (which was patch #6 in v1)
- dropped patches #1 and #2 from v1 because Kevin already applied these ("dt-bindings: arm: amlogic: add support for the Meson8m2 SoC" and "dt-bindings: arm: amlogic: add support for the Tronsmart MXIII Plus")
[0] http://lists.infradead.org/pipermail/linux-amlogic/2018-May/007303.html
Martin Blumenstingl (3):
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
arch/arm/boot/dts/Makefile | 3 +- 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 | 2 +- arch/arm/mach-meson/meson.c | 1 + 6 files changed, 318 insertions(+), 2 deletions(-) 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
Martin Blumenstingl
reviewerPATCH v2 1/4 ARM: meson: add support for the Meson8m2 SoCs
Add the newly introduced compatible string for the Meson8m2 SoC. The existing Meson8 Kconfig entry is updated to also provide support for the Meson8m2 SoCs. The Meson8m2 SoC is mostly identical to the Meson8 SoC with just a few peripherals being updated. Both SoCs currently share the same pinctrl, clock and GPIO IRQ bindings. Thus the existing Kconfig entry is re-used to avoid duplication (the only cost is building a few extra DTBs).
--- arch/arm/mach-meson/Kconfig | 2 +- arch/arm/mach-meson/meson.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-)
arch/arm/mach-meson/Kconfig +1 -1
@@ -19,7 +19,7 @@ config MACH_MESON6 select MESON6_TIMER config MACH_MESON8 - bool "Amlogic Meson8 SoCs support" + bool "Amlogic Meson8 and Meson8m2 SoCs support" default ARCH_MESON select MESON6_TIMER select COMMON_CLK_MESON8B
arch/arm/mach-meson/meson.c +1 -0
@@ -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
Martin Blumenstingl
reviewerPATCH v2 2/4 ARM: dts: meson: add support for the Meson8m2 SoC
In reply to Martin BlumenstinglThis 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
@@ -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"; +}; + +ðmac { + 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
Martin Blumenstingl
reviewerPATCH v2 3/4 ARM: dts: meson8: add the uart_A pins
In reply to Martin BlumenstinglThis 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
@@ -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
Martin Blumenstingl
reviewerPATCH v2 4/4 ARM: dts: meson8m2: add support for the Tronsmart MXIII Plus
In reply to Martin BlumenstinglFrom: 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 | 3 +- arch/arm/boot/dts/meson8m2-mxiii-plus.dts | 244 ++++++++++++++++++++++ 2 files changed, 246 insertions(+), 1 deletion(-) create mode 100644 arch/arm/boot/dts/meson8m2-mxiii-plus.dts
arch/arm/boot/dts/Makefile +2 -1
@@ -312,7 +312,8 @@ dtb-$(CONFIG_ARCH_NPCM7XX) += \ dtb-$(CONFIG_MACH_MESON6) += \ meson6-atv1200.dtb dtb-$(CONFIG_MACH_MESON8) += \ - meson8-minix-neo-x8.dtb + meson8-minix-neo-x8.dtb \ + meson8m2-mxiii-plus.dtb dtb-$(CONFIG_ARCH_MMP) += \ pxa168-aspenite.dtb \ pxa910-dkb.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
v2 cover Meson8m2 (32-bit ARM) SoC support
In reply to Martin BlumenstinglQuoted 11 lines · Martin Blumenstingl
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.
Quoted 7 lines
changes since v1 at [0]:
- do not create a newMACH_MESON8M2Kconfigentry as suggested by Kevin (MACH_MESON8is re-used instead). This affects patch #1 (which was patch #3 in v1) and patch #4 (which was patch #6 in v1)
- dropped patches #1 and #2 from v1 because Kevin already applied these ("dt-bindings: arm: amlogic: add support for the Meson8m2 SoC" and "dt-bindings: arm: amlogic: add support for the Tronsmart MXIII Plus")
Applied to v4.18/dt.
One more request: Could you send one more patch (on top of my v4.18/dt) that gets rid of the Kconfig for the 8B also?
Thanks,
Kevin
Martin Blumenstingl
reviewerv2 cover Meson8m2 (32-bit ARM) SoC support
Quoted 21 lines · Kevin Hilman
Quoted 11 lines · Martin Blumenstingl
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.
Quoted 7 lines
changes since v1 at [0]:
- do not create a newMACH_MESON8M2Kconfigentry as suggested by Kevin (MACH_MESON8is re-used instead). This affects patch #1 (which was patch #3 in v1) and patch #4 (which was patch #6 in v1)
- dropped patches #1 and #2 from v1 because Kevin already applied these ("dt-bindings: arm: amlogic: add support for the Meson8m2 SoC" and "dt-bindings: arm: amlogic: add support for the Tronsmart MXIII Plus")
Quoted 1 line
Applied to v4.18/dt.
thank you!
Quoted 2 lines
One more request: Could you send one more patch (on top of my v4.18/dt) that gets rid of the
Kconfigfor the 8B also?
I put that on my TODO-list, I'll send a patch before my next batch of 32-bit dt updates
Regards
Martin