Skip to contentSkip to conversation

arm64: meson-sm1: add support for Banana PI BPI-M5

PATCH Superseded Neil Armstrong 2 participants 6 messages May 5, 2021 – May 14, 2021

Subsystems (2)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

v2 cover arm64: meson-sm1: add support for Banana PI BPI-M5

Banana Pi BPI-M5 is a credit card format SBC with the following features:
- Amlogic S905X3 quad core Cortex-A55
- Mali-G31 GPU
- 4GB LPDDR4
- 16GB eMMC flash
- 4 USB 3.0
- 1 GbE ethernet
- HDMI output
- 2x LEDS
- SDCard
- 2.5mm Jack with Stereo Audio + CVBS
- Infrared Received
- ADC Button
- GPIO Button
- 40 pins header + 3pins debug header

This also adds the missing toacodec node to enable internal audio codec.

Changes since v1 at [1]:
- fixed bad compatible for sm1 toacodec node
- removed tab in bindings (but kept martin's review tag)
- renamed adc key node
- renamed flash_1v8 regulator to match schematics
- fixed vddcpu regulator voltages
- fixed ethmac rgmii-txid and checked it still worked
- added missing GPIO lines names (thanks martin !) -

[1] https://lore.kernel.org/r/[email protected]

Neil Armstrong (3):
arm64: dts: meson-sm1: add toacodec node
dt-bindings: arm: amlogic: add Banana PI M5 bindings
arm64: dts: meson-sm1: add Banana PI BPI-M5 board dts

 .../devicetree/bindings/arm/amlogic.yaml      |   1 +
 arch/arm64/boot/dts/amlogic/Makefile          |   1 +
 .../dts/amlogic/meson-sm1-bananapi-m5.dts     | 646 ++++++++++++++++++
 arch/arm64/boot/dts/amlogic/meson-sm1.dtsi    |  10 +
 4 files changed, 658 insertions(+)
 create mode 100644 arch/arm64/boot/dts/amlogic/meson-sm1-bananapi-m5.dts
Signature · 1 line
2.25.1
#1 lore raw

PATCH v2 1/3 arm64: dts: meson-sm1: add toacodec node

Add toacodec node for Amlogic SM1 SoCs.

---
 arch/arm64/boot/dts/amlogic/meson-sm1.dtsi | 10 ++++++++++
 1 file changed, 10 insertions(+)
arch/arm64/boot/dts/amlogic/meson-sm1.dtsi +10 -0
index c309517abae3..3d8b1f4f2001 100644
@@ -401,6 +401,16 @@ tdmout_c: audio-controller@580 {
 			status = "disabled";
 		};
 
+		toacodec: audio-controller@740 {
+			compatible = "amlogic,sm1-toacodec",
+				     "amlogic,g12a-toacodec";
+			reg = <0x0 0x740 0x0 0x4>;
+			#sound-dai-cells = <1>;
+			sound-name-prefix = "TOACODEC";
+			resets = <&clkc_audio AUD_RESET_TOACODEC>;
+			status = "disabled";
+		};
+
 		tohdmitx: audio-controller@744 {
 			compatible = "amlogic,sm1-tohdmitx",
 				     "amlogic,g12a-tohdmitx";
Signature · 1 line
2.25.1
#2 lore raw

PATCH v2 2/3 dt-bindings: arm: amlogic: add Banana PI M5 bindings

In reply to Neil Armstrong

Add bindings for the Banana PI M5 board.

---
 Documentation/devicetree/bindings/arm/amlogic.yaml | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/arm/amlogic.yaml +1 -0
index 5f6769bf45bd..d81a20f66415 100644
@@ -164,6 +164,7 @@ properties:
       - description: Boards with the Amlogic Meson SM1 S905X3/D3/Y3 SoC
         items:
           - enum:
+              - bananapi,bpi-m5
               - hardkernel,odroid-c4
               - hardkernel,odroid-hc4
               - khadas,vim3l
Signature · 1 line
2.25.1
#3 lore raw

PATCH v2 3/3 arm64: dts: meson-sm1: add Banana PI BPI-M5 board dts

In reply to Neil Armstrong

Banana Pi BPI-M5 is a credit card format SBC with the following features:
- Amlogic S905X3 quad core Cortex-A55
- Mali-G31 GPU
- 4GB LPDDR4
- 16GB eMMC flash
- 4 USB 3.0
- 1 GbE ethernet
- HDMI output
- 2x LEDS
- SDCard
- 2.5mm Jack with Stereo Audio + CVBS
- Infrared Received
- ADC Button
- GPIO Button
- 40 pins header + 3pins debug header

---
 arch/arm64/boot/dts/amlogic/Makefile          |   1 +
 .../dts/amlogic/meson-sm1-bananapi-m5.dts     | 646 ++++++++++++++++++
 2 files changed, 647 insertions(+)
 create mode 100644 arch/arm64/boot/dts/amlogic/meson-sm1-bananapi-m5.dts
arch/arm64/boot/dts/amlogic/Makefile +1 -0
index 78a569d7fa20..3cf6699b4f30 100644
@@ -45,6 +45,7 @@ dtb-$(CONFIG_ARCH_MESON) += meson-gxm-rbox-pro.dtb
 dtb-$(CONFIG_ARCH_MESON) += meson-gxm-s912-libretech-pc.dtb
 dtb-$(CONFIG_ARCH_MESON) += meson-gxm-vega-s96.dtb
 dtb-$(CONFIG_ARCH_MESON) += meson-gxm-wetek-core2.dtb
+dtb-$(CONFIG_ARCH_MESON) += meson-sm1-bananapi-m5.dtb
 dtb-$(CONFIG_ARCH_MESON) += meson-sm1-khadas-vim3l.dtb
 dtb-$(CONFIG_ARCH_MESON) += meson-sm1-odroid-c4.dtb
 dtb-$(CONFIG_ARCH_MESON) += meson-sm1-odroid-hc4.dtb
arch/arm64/boot/dts/amlogic/meson-sm1-bananapi-m5.dts new file +646 -0

646 lines not on this page · raw message

Signature · 1 line
2.25.1
reviewer Reviewed-by on v2 3/3
#4 lore raw

Re: [PATCH v2 3/3] arm64: dts: meson-sm1: add Banana PI BPI-M5 board dts

Hi Neil,

Quoted 17 lines · Neil Armstrong

Banana Pi BPI-M5 is a credit card format SBC with the following features:
- Amlogic S905X3 quad core Cortex-A55
- Mali-G31 GPU
- 4GB LPDDR4
- 16GB eMMC flash
- 4 USB 3.0
- 1 GbE ethernet
- HDMI output
- 2x LEDS
- SDCard
- 2.5mm Jack with Stereo Audio + CVBS
- Infrared Received
- ADC Button
- GPIO Button
- 40 pins header + 3pins debug header

Quoted 1 line

one nit-pick below, but still this gets my:

[...]

arch/arm64/boot/dts/amlogic/meson-sm1-bananapi-m5.dts line 477

Quoted 2 lines
arch/arm64/boot/dts/amlogic/meson-sm1-bananapi-m5.dts new file +2 -0
+       /*
+        * WARNING: The USB Hub on the BPI-M54 needs a reset signal

s/BPI-M5/BPI-M54/
I am hoping that Kevin can fix this while applying

Best regards,
Martin

#5 lore raw

Re: [PATCH v2 3/3] arm64: dts: meson-sm1: add Banana PI BPI-M5 board dts

Quoted 21 lines · Martin Blumenstingl

Hi Neil,

Quoted 17 lines · Neil Armstrong

Banana Pi BPI-M5 is a credit card format SBC with the following features:
- Amlogic S905X3 quad core Cortex-A55
- Mali-G31 GPU
- 4GB LPDDR4
- 16GB eMMC flash
- 4 USB 3.0
- 1 GbE ethernet
- HDMI output
- 2x LEDS
- SDCard
- 2.5mm Jack with Stereo Audio + CVBS
- Infrared Received
- ADC Button
- GPIO Button
- 40 pins header + 3pins debug header

Quoted 1 line
Quoted 8 lines

one nit-pick below, but still this gets my:

[...]

arch/arm64/boot/dts/amlogic/meson-sm1-bananapi-m5.dts line 477

Quoted 2 lines
arch/arm64/boot/dts/amlogic/meson-sm1-bananapi-m5.dts new file +2 -0
+       /*
+        * WARNING: The USB Hub on the BPI-M54 needs a reset signal

s/BPI-M5/BPI-M54/
I am hoping that Kevin can fix this while applying

I'll send a v3 since I forgot to CC DT maintainers for patch 2 anyway..

Neil

Quoted 5 lines

Best regards,
Martin