Audio and other peripherals on Orange Pi Zero
Subsystems (2)
v3 cover Audio and other peripherals on Orange Pi Zero
---
Changes in v3:
- Fix name of orangepi-zero-plus2 in patch title
- Link to v2: https://lore.kernel.org/r/[email protected]
Changes in v2:
- Rebase on (almost) 6.17-rc1
- Disable audio pins by default
- Provide separate DT overlay for the Orange Pi Zero Interface Board
- Link to v1: https://lore.kernel.org/r/[email protected]
---
J. Neuschäfer (3):
ARM: dts: allwinner: orangepi-zero: Add default audio routing
ARM: dts: allwinner: orangepi-zero-plus2: Add default audio routing
ARM: dts: allwinner: Add Orange Pi Zero Interface Board overlay
arch/arm/boot/dts/allwinner/Makefile | 7 ++++ .../dts/allwinner/sun8i-h2-plus-orangepi-zero.dts | 14 +++++++ .../dts/allwinner/sun8i-h3-orangepi-zero-plus2.dts | 14 +++++++ .../sun8i-orangepi-zero-interface-board.dtso | 46 ++++++++++++++++++++++ 4 files changed, 81 insertions(+)
---
base-commit: 29fdda97f8d5797b160aa8ad1c7248710bb8ffda
change-id: 20250417-opz-audio-890849c8bb2e
Best regards,
Signature · 1 line
J. Neuschäfer <[email protected]>
PATCH v3 1/3 ARM: dts: allwinner: orangepi-zero: Add default audio routing
Line out playback and microphone capture work, after enabling the corresponding ALSA controls. Tested with the Orange Pi Zero interface board.
---
v3:
- no change
v2:
- Add an explanatory comment
--- .../arm/boot/dts/allwinner/sun8i-h2-plus-orangepi-zero.dts | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
arch/arm/boot/dts/allwinner/sun8i-h2-plus-orangepi-zero.dts +14 -0
@@ -112,6 +112,20 @@ wifi_pwrseq: pwrseq { }; }; +/* + * Audio input/output is exposed on the 13-pin header and can't be used for + * anything else. However, adapter boards may use different audio routing. + * - https://linux-sunxi.org/Xunlong_Orange_Pi_Zero#Expansion_Port + * - Allwinner H3 Datasheet, section 3.1. Pin Characteristics + */ +&codec { + allwinner,audio-routing = + "Line Out", "LINEOUT", + "MIC1", "Mic", + "Mic", "MBIAS"; + status = "disabled"; +}; + &cpu0 { cpu-supply = <®_vdd_cpux>; };
Signature · 1 line
2.48.0.rc1.219.gb6b6757d772
PATCH v3 2/3 ARM: dts: allwinner: orangepi-zero-plus2: Add default audio routing
In reply to J. NeuschäferThe Orange Pi Zero Plus 2 has the same pinout[1] as the Orange Pi Zero[2] (with the possible exception of line-out left/right being swapped), and the Orange Pi Zero Interface Board is sold[3] as compatible with both of them. We can thus use the same audio routing.
[1]: http://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/details/Orange-Pi-Zero-Plus-2.html
[2]: https://linux-sunxi.org/Xunlong_Orange_Pi_Zero#Expansion_Port
[3]: https://orangepi.com/index.php?route=product/product&product_id=871
---
v3:
- Fix board name in commit title, as reported by Chen-Yu Tsai
v2:
- new patch
--- .../boot/dts/allwinner/sun8i-h3-orangepi-zero-plus2.dts | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
arch/arm/boot/dts/allwinner/sun8i-h3-orangepi-zero-plus2.dts +14 -0
@@ -99,6 +99,20 @@ wifi_pwrseq: pwrseq { }; }; +/* + * Audio input/output is exposed on the 13-pin header and can't be used for + * anything else. However, adapter boards may use different audio routing. + * - http://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/details/Orange-Pi-Zero-Plus-2.html + * - Allwinner H3 Datasheet, section 3.1. Pin Characteristics + */ +&codec { + allwinner,audio-routing = + "Line Out", "LINEOUT", + "MIC1", "Mic", + "Mic", "MBIAS"; + status = "disabled"; +}; + &de { status = "okay"; };
Signature · 1 line
2.48.0.rc1.219.gb6b6757d772
PATCH v3 3/3 ARM: dts: allwinner: Add Orange Pi Zero Interface Board overlay
In reply to J. NeuschäferThe Orange Pi Zero interface board is a (mostly) passive adapter from the 13-pin header of the Orange Pi Zero and Orange Pi Zero Plus2 to standard connectors (2x USB A, 1x Audio/Video output, 1x built-in microphone, 1x infrared input). Headphones, microphone, infrared (CIR) input, and USB have been tested with the Orange Pi Zero.
CVBS output is currently not supported.
https://orangepi.com/index.php?route=product/product&product_id=871
---
v3:
- no change
v2:
- new patch
--- arch/arm/boot/dts/allwinner/Makefile | 7 ++++ .../sun8i-orangepi-zero-interface-board.dtso | 46 ++++++++++++++++++++++ 2 files changed, 53 insertions(+)
arch/arm/boot/dts/allwinner/Makefile +7 -0
@@ -182,6 +182,7 @@ dtb-$(CONFIG_MACH_SUN7I) += \ sun7i-a20-wits-pro-a20-dkt.dtb # Enables support for device-tree overlays for all pis +DTC_FLAGS_sun8i-h2-plus-orangepi-zero := -@ DTC_FLAGS_sun8i-h3-orangepi-lite := -@ DTC_FLAGS_sun8i-h3-bananapi-m2-plus := -@ DTC_FLAGS_sun8i-h3-nanopi-m1-plus := -@
@@ -225,6 +226,7 @@ dtb-$(CONFIG_MACH_SUN8I) += \ sun8i-h2-plus-libretech-all-h3-cc.dtb \ sun8i-h2-plus-orangepi-r1.dtb \ sun8i-h2-plus-orangepi-zero.dtb \ + sun8i-h2-plus-orangepi-zero-interface-board.dtb \ sun8i-h3-bananapi-m2-plus.dtb \ sun8i-h3-bananapi-m2-plus-v1.2.dtb \ sun8i-h3-beelink-x2.dtb \
@@ -244,6 +246,7 @@ dtb-$(CONFIG_MACH_SUN8I) += \ sun8i-h3-orangepi-plus.dtb \ sun8i-h3-orangepi-plus2e.dtb \ sun8i-h3-orangepi-zero-plus2.dtb \ + sun8i-h3-orangepi-zero-plus2-interface-board.dtb \ sun8i-h3-rervision-dvk.dtb \ sun8i-h3-zeropi.dtb \ sun8i-h3-emlid-neutis-n5h3-devboard.dtb \
@@ -264,6 +267,10 @@ dtb-$(CONFIG_MACH_SUN8I) += \ sun8i-v3s-licheepi-zero-dock.dtb \ sun8i-v3s-netcube-kumquat.dtb \ sun8i-v40-bananapi-m2-berry.dtb +sun8i-h2-plus-orangepi-zero-interface-board-dtbs += \ + sun8i-h2-plus-orangepi-zero.dtb sun8i-orangepi-zero-interface-board.dtbo +sun8i-h3-orangepi-zero-plus2-interface-board-dtbs += \ + sun8i-h3-orangepi-zero-plus2.dtb sun8i-orangepi-zero-interface-board.dtbo dtb-$(CONFIG_MACH_SUN9I) += \ sun9i-a80-optimus.dtb \ sun9i-a80-cubieboard4.dtb
arch/arm/boot/dts/allwinner/sun8i-orangepi-zero-interface-board.dtso new file +46 -0
46 lines not on this page · raw message
Signature · 1 line
2.48.0.rc1.219.gb6b6757d772
Quoted 1 line · J. Neuschäfer
Applied to sunxi/dt-for-6.18 in local tree, thanks!
[1/3] ARM: dts: allwinner: orangepi-zero: Add default audio routing
commit: 3173a760021b9340923831aa5edc5530d61a6b9b
[2/3] ARM: dts: allwinner: orangepi-zero-plus2: Add default audio routing
commit: fd5c7bf8ddb51373a6c9456865b3af99f53642a2
[3/3] ARM: dts: allwinner: Add Orange Pi Zero Interface Board overlay
commit: b65ee02e77cb14486cf30709e978430e91f74d2eBest regards,
Signature · 1 line
Chen-Yu Tsai <[email protected]>