All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/4] Meson8m2 (32-bit ARM) SoC support
@ 2018-05-09 23:50 ` Martin Blumenstingl
  0 siblings, 0 replies; 14+ messages in thread
From: Martin Blumenstingl @ 2018-05-09 23:50 UTC (permalink / raw)
  To: linux-amlogic, khilman, carlo; +Cc: devicetree, balbes-150, 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.


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

-- 
2.17.0


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH v2 0/4] Meson8m2 (32-bit ARM) SoC support
@ 2018-05-09 23:50 ` Martin Blumenstingl
  0 siblings, 0 replies; 14+ messages in thread
From: Martin Blumenstingl @ 2018-05-09 23:50 UTC (permalink / raw)
  To: linus-amlogic

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

-- 
2.17.0

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH v2 1/4] ARM: meson: add support for the Meson8m2 SoCs
  2018-05-09 23:50 ` Martin Blumenstingl
@ 2018-05-09 23:50   ` Martin Blumenstingl
  -1 siblings, 0 replies; 14+ messages in thread
From: Martin Blumenstingl @ 2018-05-09 23:50 UTC (permalink / raw)
  To: linux-amlogic, khilman, carlo; +Cc: devicetree, balbes-150, Martin Blumenstingl

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).

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
---
 arch/arm/mach-meson/Kconfig | 2 +-
 arch/arm/mach-meson/meson.c | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm/mach-meson/Kconfig b/arch/arm/mach-meson/Kconfig
index d90f61e6254f..2bc630471beb 100644
--- a/arch/arm/mach-meson/Kconfig
+++ b/arch/arm/mach-meson/Kconfig
@@ -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
diff --git a/arch/arm/mach-meson/meson.c b/arch/arm/mach-meson/meson.c
index 4e2357178625..c8d99df32f9b 100644
--- a/arch/arm/mach-meson/meson.c
+++ b/arch/arm/mach-meson/meson.c
@@ -20,6 +20,7 @@ static const char * const meson_common_board_compat[] = {
 	"amlogic,meson6",
 	"amlogic,meson8",
 	"amlogic,meson8b",
+	"amlogic,meson8m2",
 	NULL,
 };
 
-- 
2.17.0


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH v2 1/4] ARM: meson: add support for the Meson8m2 SoCs
@ 2018-05-09 23:50   ` Martin Blumenstingl
  0 siblings, 0 replies; 14+ messages in thread
From: Martin Blumenstingl @ 2018-05-09 23:50 UTC (permalink / raw)
  To: linus-amlogic

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).

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
---
 arch/arm/mach-meson/Kconfig | 2 +-
 arch/arm/mach-meson/meson.c | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm/mach-meson/Kconfig b/arch/arm/mach-meson/Kconfig
index d90f61e6254f..2bc630471beb 100644
--- a/arch/arm/mach-meson/Kconfig
+++ b/arch/arm/mach-meson/Kconfig
@@ -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
diff --git a/arch/arm/mach-meson/meson.c b/arch/arm/mach-meson/meson.c
index 4e2357178625..c8d99df32f9b 100644
--- a/arch/arm/mach-meson/meson.c
+++ b/arch/arm/mach-meson/meson.c
@@ -20,6 +20,7 @@ static const char * const meson_common_board_compat[] = {
 	"amlogic,meson6",
 	"amlogic,meson8",
 	"amlogic,meson8b",
+	"amlogic,meson8m2",
 	NULL,
 };
 
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH v2 2/4] ARM: dts: meson: add support for the Meson8m2 SoC
  2018-05-09 23:50 ` Martin Blumenstingl
@ 2018-05-09 23:50   ` Martin Blumenstingl
  -1 siblings, 0 replies; 14+ messages in thread
From: Martin Blumenstingl @ 2018-05-09 23:50 UTC (permalink / raw)
  To: linux-amlogic, khilman, carlo; +Cc: devicetree, balbes-150, 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.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
---
 arch/arm/boot/dts/meson8m2.dtsi | 54 +++++++++++++++++++++++++++++++++
 1 file changed, 54 insertions(+)
 create mode 100644 arch/arm/boot/dts/meson8m2.dtsi

diff --git a/arch/arm/boot/dts/meson8m2.dtsi b/arch/arm/boot/dts/meson8m2.dtsi
new file mode 100644
index 000000000000..3e1f92273d7b
--- /dev/null
+++ b/arch/arm/boot/dts/meson8m2.dtsi
@@ -0,0 +1,54 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2017 Martin Blumenstingl <martin.blumenstingl@googlemail.com>.
+ */
+
+#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";
+};
-- 
2.17.0


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH v2 2/4] ARM: dts: meson: add support for the Meson8m2 SoC
@ 2018-05-09 23:50   ` Martin Blumenstingl
  0 siblings, 0 replies; 14+ messages in thread
From: Martin Blumenstingl @ 2018-05-09 23:50 UTC (permalink / raw)
  To: linus-amlogic

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.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
---
 arch/arm/boot/dts/meson8m2.dtsi | 54 +++++++++++++++++++++++++++++++++
 1 file changed, 54 insertions(+)
 create mode 100644 arch/arm/boot/dts/meson8m2.dtsi

diff --git a/arch/arm/boot/dts/meson8m2.dtsi b/arch/arm/boot/dts/meson8m2.dtsi
new file mode 100644
index 000000000000..3e1f92273d7b
--- /dev/null
+++ b/arch/arm/boot/dts/meson8m2.dtsi
@@ -0,0 +1,54 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2017 Martin Blumenstingl <martin.blumenstingl@googlemail.com>.
+ */
+
+#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";
+};
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH v2 3/4] ARM: dts: meson8: add the uart_A pins
  2018-05-09 23:50 ` Martin Blumenstingl
@ 2018-05-09 23:50   ` Martin Blumenstingl
  -1 siblings, 0 replies; 14+ messages in thread
From: Martin Blumenstingl @ 2018-05-09 23:50 UTC (permalink / raw)
  To: linux-amlogic, khilman, carlo; +Cc: devicetree, balbes-150, Martin Blumenstingl

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

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
---
 arch/arm/boot/dts/meson8.dtsi | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/arch/arm/boot/dts/meson8.dtsi b/arch/arm/boot/dts/meson8.dtsi
index 7b16ea61e914..d77dcf890cfc 100644
--- a/arch/arm/boot/dts/meson8.dtsi
+++ b/arch/arm/boot/dts/meson8.dtsi
@@ -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";
+			};
+		};
 	};
 };
 
-- 
2.17.0


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH v2 3/4] ARM: dts: meson8: add the uart_A pins
@ 2018-05-09 23:50   ` Martin Blumenstingl
  0 siblings, 0 replies; 14+ messages in thread
From: Martin Blumenstingl @ 2018-05-09 23:50 UTC (permalink / raw)
  To: linus-amlogic

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

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
---
 arch/arm/boot/dts/meson8.dtsi | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/arch/arm/boot/dts/meson8.dtsi b/arch/arm/boot/dts/meson8.dtsi
index 7b16ea61e914..d77dcf890cfc 100644
--- a/arch/arm/boot/dts/meson8.dtsi
+++ b/arch/arm/boot/dts/meson8.dtsi
@@ -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";
+			};
+		};
 	};
 };
 
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH v2 4/4] ARM: dts: meson8m2: add support for the Tronsmart MXIII Plus
  2018-05-09 23:50 ` Martin Blumenstingl
@ 2018-05-09 23:50   ` Martin Blumenstingl
  -1 siblings, 0 replies; 14+ messages in thread
From: Martin Blumenstingl @ 2018-05-09 23:50 UTC (permalink / raw)
  To: linux-amlogic, khilman, carlo; +Cc: devicetree, balbes-150, Martin Blumenstingl

From: Oleg Ivanov <balbes-150@yandex.ru>

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).

Signed-off-by: Oleg Ivanov <balbes-150@yandex.ru>
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
---
 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

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 7e2424957809..4300e86049ee 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -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 \
diff --git a/arch/arm/boot/dts/meson8m2-mxiii-plus.dts b/arch/arm/boot/dts/meson8m2-mxiii-plus.dts
new file mode 100644
index 000000000000..f5853610b20b
--- /dev/null
+++ b/arch/arm/boot/dts/meson8m2-mxiii-plus.dts
@@ -0,0 +1,244 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2018 Oleg Ivanov <balbes-150@yandex.ru>
+ * Copyright (c) 2018 Martin Blumenstingl <martin.blumenstingl@googlemail.com>
+ */
+
+/dts-v1/;
+
+#include "meson8m2.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+	model = "Tronsmart MXIII Plus";
+	compatible = "tronsmart,mxiii-plus", "amlogic,meson8m2";
+
+	aliases {
+		ethernet0 = &ethmac;
+		i2c0 = &i2c_AO;
+		serial0 = &uart_AO;
+		serial1 = &uart_A;
+		mmc0 = &sd_card_slot;
+	};
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+	};
+
+	memory {
+		reg = <0x40000000 0x80000000>;
+	};
+
+	adc-keys {
+		compatible = "adc-keys";
+		io-channels = <&saradc 0>;
+		io-channel-names = "buttons";
+		keyup-threshold-microvolt = <1710000>;
+
+		button-function {
+			label = "Function";
+			linux,code = <KEY_FN>;
+			press-threshold-microvolt = <10000>;
+		};
+	};
+
+	vcc_3v3: regulator-vcc3v3 {
+		compatible = "regulator-fixed";
+		regulator-name = "VCC3V3";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+	};
+};
+
+&cpu0 {
+	cpu-supply = <&vcck>;
+};
+
+&ethmac {
+	status = "okay";
+
+	pinctrl-0 = <&eth_rgmii_pins>;
+	pinctrl-names = "default";
+
+	phy-handle = <&eth_phy0>;
+	phy-mode = "rgmii";
+
+	amlogic,tx-delay-ns = <4>;
+
+	snps,reset-gpio = <&gpio GPIOH_4 0>;
+	snps,reset-delays-us = <0 10000 1000000>;
+	snps,reset-active-low;
+
+	mdio {
+		compatible = "snps,dwmac-mdio";
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		eth_phy0: ethernet-phy@0 {
+			/* Realtek RTL8211F (0x001cc916) */
+			reg = <0>;
+		};
+	};
+};
+
+&ir_receiver {
+	status = "okay";
+	pinctrl-0 = <&ir_recv_pins>;
+	pinctrl-names = "default";
+};
+
+&i2c_AO {
+	status = "okay";
+	pinctrl-0 = <&i2c_ao_pins>;
+	pinctrl-names = "default";
+
+	pmic@32 {
+		compatible = "ricoh,rn5t618";
+		reg = <0x32>;
+		system-power-controller;
+
+		regulators {
+			vcck: DCDC1 {
+				regulator-name = "VCCK";
+				regulator-min-microvolt = <825000>;
+				regulator-max-microvolt = <1150000>;
+				regulator-boot-on;
+				regulator-always-on;
+			};
+
+			DCDC2 {
+				regulator-name = "VDDAO";
+				regulator-min-microvolt = <950000>;
+				regulator-max-microvolt = <1150000>;
+				regulator-boot-on;
+				regulator-always-on;
+			};
+
+			DCDC3 {
+				regulator-name = "VDD_DDR";
+				regulator-min-microvolt = <1500000>;
+				regulator-max-microvolt = <1500000>;
+				regulator-boot-on;
+				regulator-always-on;
+			};
+
+			LDO1 {
+				regulator-name = "VDDIO_AO28";
+				regulator-min-microvolt = <2900000>;
+				regulator-max-microvolt = <2900000>;
+				regulator-boot-on;
+				regulator-always-on;
+			};
+
+			vddio_ao1v8: LDO2 {
+				regulator-name = "VDDIO_AO18";
+				regulator-min-microvolt = <1800000>;
+				regulator-max-microvolt = <1800000>;
+				regulator-boot-on;
+				regulator-always-on;
+			};
+
+			LDO3 {
+				regulator-name = "VCC1V8";
+				regulator-min-microvolt = <1800000>;
+				regulator-max-microvolt = <1800000>;
+				regulator-boot-on;
+				regulator-always-on;
+			};
+
+			LDO4 {
+				regulator-name = "VCC2V8";
+				regulator-min-microvolt = <2850000>;
+				regulator-max-microvolt = <2850000>;
+				regulator-boot-on;
+				regulator-always-on;
+			};
+
+			LDO5 {
+				regulator-name = "AVDD1V8";
+				regulator-min-microvolt = <1800000>;
+				regulator-max-microvolt = <1800000>;
+				regulator-boot-on;
+				regulator-always-on;
+			};
+
+			LDORTC1 {
+				regulator-name = "VDD_LDO";
+				regulator-min-microvolt = <2700000>;
+				regulator-max-microvolt = <2700000>;
+				regulator-boot-on;
+				regulator-always-on;
+			};
+
+			LDORTC2 {
+				regulator-name = "RTC_0V9";
+				regulator-min-microvolt = <900000>;
+				regulator-max-microvolt = <900000>;
+				regulator-boot-on;
+				regulator-always-on;
+			};
+		};
+	};
+};
+
+&saradc {
+	status = "okay";
+	vref-supply = <&vddio_ao1v8>;
+};
+
+&sdio {
+	status = "okay";
+
+	pinctrl-0 = <&sd_b_pins>;
+	pinctrl-names = "default";
+
+	/* SD card */
+	sd_card_slot: slot@1 {
+		compatible = "mmc-slot";
+		reg = <1>;
+		status = "okay";
+
+		bus-width = <4>;
+		no-sdio;
+		cap-mmc-highspeed;
+		cap-sd-highspeed;
+		disable-wp;
+
+		cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_HIGH>;
+		cd-inverted;
+
+		vmmc-supply = <&vcc_3v3>;
+	};
+};
+
+/* connected to the Bluetooth module */
+&uart_A {
+	status = "okay";
+	pinctrl-0 = <&uart_a1_pins>, <&uart_a1_cts_rts_pins>;
+	pinctrl-names = "default";
+	uart-has-rtscts;
+};
+
+&uart_AO {
+	status = "okay";
+	pinctrl-0 = <&uart_ao_a_pins>;
+	pinctrl-names = "default";
+};
+
+&usb0 {
+	status = "okay";
+};
+
+&usb1 {
+	status = "okay";
+};
+
+&usb0_phy {
+	status = "okay";
+};
+
+&usb1_phy {
+	status = "okay";
+};
-- 
2.17.0


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH v2 4/4] ARM: dts: meson8m2: add support for the Tronsmart MXIII Plus
@ 2018-05-09 23:50   ` Martin Blumenstingl
  0 siblings, 0 replies; 14+ messages in thread
From: Martin Blumenstingl @ 2018-05-09 23:50 UTC (permalink / raw)
  To: linus-amlogic

From: Oleg Ivanov <balbes-150@yandex.ru>

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).

Signed-off-by: Oleg Ivanov <balbes-150@yandex.ru>
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
---
 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

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 7e2424957809..4300e86049ee 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -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 \
diff --git a/arch/arm/boot/dts/meson8m2-mxiii-plus.dts b/arch/arm/boot/dts/meson8m2-mxiii-plus.dts
new file mode 100644
index 000000000000..f5853610b20b
--- /dev/null
+++ b/arch/arm/boot/dts/meson8m2-mxiii-plus.dts
@@ -0,0 +1,244 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2018 Oleg Ivanov <balbes-150@yandex.ru>
+ * Copyright (c) 2018 Martin Blumenstingl <martin.blumenstingl@googlemail.com>
+ */
+
+/dts-v1/;
+
+#include "meson8m2.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+	model = "Tronsmart MXIII Plus";
+	compatible = "tronsmart,mxiii-plus", "amlogic,meson8m2";
+
+	aliases {
+		ethernet0 = &ethmac;
+		i2c0 = &i2c_AO;
+		serial0 = &uart_AO;
+		serial1 = &uart_A;
+		mmc0 = &sd_card_slot;
+	};
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+	};
+
+	memory {
+		reg = <0x40000000 0x80000000>;
+	};
+
+	adc-keys {
+		compatible = "adc-keys";
+		io-channels = <&saradc 0>;
+		io-channel-names = "buttons";
+		keyup-threshold-microvolt = <1710000>;
+
+		button-function {
+			label = "Function";
+			linux,code = <KEY_FN>;
+			press-threshold-microvolt = <10000>;
+		};
+	};
+
+	vcc_3v3: regulator-vcc3v3 {
+		compatible = "regulator-fixed";
+		regulator-name = "VCC3V3";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+	};
+};
+
+&cpu0 {
+	cpu-supply = <&vcck>;
+};
+
+&ethmac {
+	status = "okay";
+
+	pinctrl-0 = <&eth_rgmii_pins>;
+	pinctrl-names = "default";
+
+	phy-handle = <&eth_phy0>;
+	phy-mode = "rgmii";
+
+	amlogic,tx-delay-ns = <4>;
+
+	snps,reset-gpio = <&gpio GPIOH_4 0>;
+	snps,reset-delays-us = <0 10000 1000000>;
+	snps,reset-active-low;
+
+	mdio {
+		compatible = "snps,dwmac-mdio";
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		eth_phy0: ethernet-phy at 0 {
+			/* Realtek RTL8211F (0x001cc916) */
+			reg = <0>;
+		};
+	};
+};
+
+&ir_receiver {
+	status = "okay";
+	pinctrl-0 = <&ir_recv_pins>;
+	pinctrl-names = "default";
+};
+
+&i2c_AO {
+	status = "okay";
+	pinctrl-0 = <&i2c_ao_pins>;
+	pinctrl-names = "default";
+
+	pmic at 32 {
+		compatible = "ricoh,rn5t618";
+		reg = <0x32>;
+		system-power-controller;
+
+		regulators {
+			vcck: DCDC1 {
+				regulator-name = "VCCK";
+				regulator-min-microvolt = <825000>;
+				regulator-max-microvolt = <1150000>;
+				regulator-boot-on;
+				regulator-always-on;
+			};
+
+			DCDC2 {
+				regulator-name = "VDDAO";
+				regulator-min-microvolt = <950000>;
+				regulator-max-microvolt = <1150000>;
+				regulator-boot-on;
+				regulator-always-on;
+			};
+
+			DCDC3 {
+				regulator-name = "VDD_DDR";
+				regulator-min-microvolt = <1500000>;
+				regulator-max-microvolt = <1500000>;
+				regulator-boot-on;
+				regulator-always-on;
+			};
+
+			LDO1 {
+				regulator-name = "VDDIO_AO28";
+				regulator-min-microvolt = <2900000>;
+				regulator-max-microvolt = <2900000>;
+				regulator-boot-on;
+				regulator-always-on;
+			};
+
+			vddio_ao1v8: LDO2 {
+				regulator-name = "VDDIO_AO18";
+				regulator-min-microvolt = <1800000>;
+				regulator-max-microvolt = <1800000>;
+				regulator-boot-on;
+				regulator-always-on;
+			};
+
+			LDO3 {
+				regulator-name = "VCC1V8";
+				regulator-min-microvolt = <1800000>;
+				regulator-max-microvolt = <1800000>;
+				regulator-boot-on;
+				regulator-always-on;
+			};
+
+			LDO4 {
+				regulator-name = "VCC2V8";
+				regulator-min-microvolt = <2850000>;
+				regulator-max-microvolt = <2850000>;
+				regulator-boot-on;
+				regulator-always-on;
+			};
+
+			LDO5 {
+				regulator-name = "AVDD1V8";
+				regulator-min-microvolt = <1800000>;
+				regulator-max-microvolt = <1800000>;
+				regulator-boot-on;
+				regulator-always-on;
+			};
+
+			LDORTC1 {
+				regulator-name = "VDD_LDO";
+				regulator-min-microvolt = <2700000>;
+				regulator-max-microvolt = <2700000>;
+				regulator-boot-on;
+				regulator-always-on;
+			};
+
+			LDORTC2 {
+				regulator-name = "RTC_0V9";
+				regulator-min-microvolt = <900000>;
+				regulator-max-microvolt = <900000>;
+				regulator-boot-on;
+				regulator-always-on;
+			};
+		};
+	};
+};
+
+&saradc {
+	status = "okay";
+	vref-supply = <&vddio_ao1v8>;
+};
+
+&sdio {
+	status = "okay";
+
+	pinctrl-0 = <&sd_b_pins>;
+	pinctrl-names = "default";
+
+	/* SD card */
+	sd_card_slot: slot at 1 {
+		compatible = "mmc-slot";
+		reg = <1>;
+		status = "okay";
+
+		bus-width = <4>;
+		no-sdio;
+		cap-mmc-highspeed;
+		cap-sd-highspeed;
+		disable-wp;
+
+		cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_HIGH>;
+		cd-inverted;
+
+		vmmc-supply = <&vcc_3v3>;
+	};
+};
+
+/* connected to the Bluetooth module */
+&uart_A {
+	status = "okay";
+	pinctrl-0 = <&uart_a1_pins>, <&uart_a1_cts_rts_pins>;
+	pinctrl-names = "default";
+	uart-has-rtscts;
+};
+
+&uart_AO {
+	status = "okay";
+	pinctrl-0 = <&uart_ao_a_pins>;
+	pinctrl-names = "default";
+};
+
+&usb0 {
+	status = "okay";
+};
+
+&usb1 {
+	status = "okay";
+};
+
+&usb0_phy {
+	status = "okay";
+};
+
+&usb1_phy {
+	status = "okay";
+};
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [PATCH v2 0/4] Meson8m2 (32-bit ARM) SoC support
  2018-05-09 23:50 ` Martin Blumenstingl
@ 2018-05-11  0:33   ` Kevin Hilman
  -1 siblings, 0 replies; 14+ messages in thread
From: Kevin Hilman @ 2018-05-11  0:33 UTC (permalink / raw)
  To: Martin Blumenstingl; +Cc: linux-amlogic, carlo, devicetree, balbes-150

Martin Blumenstingl <martin.blumenstingl@googlemail.com> writes:

> 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")

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

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH v2 0/4] Meson8m2 (32-bit ARM) SoC support
@ 2018-05-11  0:33   ` Kevin Hilman
  0 siblings, 0 replies; 14+ messages in thread
From: Kevin Hilman @ 2018-05-11  0:33 UTC (permalink / raw)
  To: linus-amlogic

Martin Blumenstingl <martin.blumenstingl@googlemail.com> writes:

> 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")

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

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v2 0/4] Meson8m2 (32-bit ARM) SoC support
  2018-05-11  0:33   ` Kevin Hilman
@ 2018-05-14 20:55     ` Martin Blumenstingl
  -1 siblings, 0 replies; 14+ messages in thread
From: Martin Blumenstingl @ 2018-05-14 20:55 UTC (permalink / raw)
  To: Kevin Hilman; +Cc: linux-amlogic, carlo, devicetree, balbes-150

On Fri, May 11, 2018 at 2:33 AM, Kevin Hilman <khilman@baylibre.com> wrote:
> Martin Blumenstingl <martin.blumenstingl@googlemail.com> writes:
>
>> 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")
>
> Applied to v4.18/dt.
thank you!

> 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?
I put that on my TODO-list, I'll send a patch before my next batch of
32-bit dt updates


Regards
Martin

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH v2 0/4] Meson8m2 (32-bit ARM) SoC support
@ 2018-05-14 20:55     ` Martin Blumenstingl
  0 siblings, 0 replies; 14+ messages in thread
From: Martin Blumenstingl @ 2018-05-14 20:55 UTC (permalink / raw)
  To: linus-amlogic

On Fri, May 11, 2018 at 2:33 AM, Kevin Hilman <khilman@baylibre.com> wrote:
> Martin Blumenstingl <martin.blumenstingl@googlemail.com> writes:
>
>> 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")
>
> Applied to v4.18/dt.
thank you!

> 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?
I put that on my TODO-list, I'll send a patch before my next batch of
32-bit dt updates


Regards
Martin

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2018-05-14 20:56 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-09 23:50 [PATCH v2 0/4] Meson8m2 (32-bit ARM) SoC support Martin Blumenstingl
2018-05-09 23:50 ` Martin Blumenstingl
2018-05-09 23:50 ` [PATCH v2 1/4] ARM: meson: add support for the Meson8m2 SoCs Martin Blumenstingl
2018-05-09 23:50   ` Martin Blumenstingl
2018-05-09 23:50 ` [PATCH v2 2/4] ARM: dts: meson: add support for the Meson8m2 SoC Martin Blumenstingl
2018-05-09 23:50   ` Martin Blumenstingl
2018-05-09 23:50 ` [PATCH v2 3/4] ARM: dts: meson8: add the uart_A pins Martin Blumenstingl
2018-05-09 23:50   ` Martin Blumenstingl
2018-05-09 23:50 ` [PATCH v2 4/4] ARM: dts: meson8m2: add support for the Tronsmart MXIII Plus Martin Blumenstingl
2018-05-09 23:50   ` Martin Blumenstingl
2018-05-11  0:33 ` [PATCH v2 0/4] Meson8m2 (32-bit ARM) SoC support Kevin Hilman
2018-05-11  0:33   ` Kevin Hilman
2018-05-14 20:55   ` Martin Blumenstingl
2018-05-14 20:55     ` Martin Blumenstingl

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.