* [PATCH] arm64: dts: rockchip: analog audio on Orange Pi 5
@ 2024-10-08 3:14 Jimmy Hon
2024-10-08 14:56 ` Rob Herring (Arm)
2024-10-22 14:12 ` Heiko Stuebner
0 siblings, 2 replies; 6+ messages in thread
From: Jimmy Hon @ 2024-10-08 3:14 UTC (permalink / raw)
To: Heiko Stuebner; +Cc: linux-rockchip, Jimmy Hon
Analog audio using es8388 codec via the headset jack and onboard mic
Signed-off-by: Jimmy Hon <honyuenkwun@gmail.com>
---
.../boot/dts/rockchip/rk3588s-orangepi-5.dts | 64 +++++++++++++++++++
1 file changed, 64 insertions(+)
diff --git a/arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5.dts b/arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5.dts
index ef3a721d1fc7..c2d1a2f5e5af 100644
--- a/arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5.dts
@@ -36,6 +36,39 @@ button-recovery {
};
};
+ analog-sound {
+ compatible = "simple-audio-card";
+ pinctrl-names = "default";
+ pinctrl-0 = <&hp_detect>;
+ simple-audio-card,name = "rockchip,es8388";
+ simple-audio-card,bitclock-master = <&masterdai>;
+ simple-audio-card,format = "i2s";
+ simple-audio-card,frame-master = <&masterdai>;
+ simple-audio-card,hp-det-gpios = <&gpio1 RK_PD5 GPIO_ACTIVE_LOW>;
+ simple-audio-card,mclk-fs = <256>;
+ simple-audio-card,pin-switches = "Headphones";
+ simple-audio-card,routing =
+ "Headphones", "LOUT1",
+ "Headphones", "ROUT1",
+ "LINPUT1", "Microphone Jack",
+ "RINPUT1", "Microphone Jack",
+ "LINPUT2", "Onboard Microphone",
+ "RINPUT2", "Onboard Microphone";
+ simple-audio-card,widgets =
+ "Microphone", "Microphone Jack",
+ "Microphone", "Onboard Microphone",
+ "Headphone", "Headphones";
+
+ simple-audio-card,cpu {
+ sound-dai = <&i2s1_8ch>;
+ };
+
+ masterdai: simple-audio-card,codec {
+ sound-dai = <&es8388>;
+ system-clock-frequency = <12288000>;
+ };
+ };
+
leds {
compatible = "gpio-leds";
pinctrl-names = "default";
@@ -218,6 +251,19 @@ &i2c6 {
pinctrl-0 = <&i2c6m3_xfer>;
status = "okay";
+ es8388: audio-codec@10 {
+ compatible = "everest,es8388";
+ reg = <0x10>;
+ clocks = <&cru I2S1_8CH_MCLKOUT>;
+ AVDD-supply = <&vcc_3v3_s0>;
+ DVDD-supply = <&vcc_1v8_s0>;
+ HPVDD-supply = <&vcc_3v3_s0>;
+ PVDD-supply = <&vcc_3v3_s0>;
+ assigned-clocks = <&cru I2S1_8CH_MCLKOUT>;
+ assigned-clock-rates = <12288000>;
+ #sound-dai-cells = <0>;
+ };
+
usbc0: usb-typec@22 {
compatible = "fcs,fusb302";
reg = <0x22>;
@@ -281,6 +327,18 @@ hym8563: rtc@51 {
};
};
+&i2s1_8ch {
+ rockchip,i2s-tx-route = <3 2 1 0>;
+ rockchip,i2s-rx-route = <1 3 2 0>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2s1m0_sclk
+ &i2s1m0_mclk
+ &i2s1m0_lrck
+ &i2s1m0_sdi1
+ &i2s1m0_sdo3>;
+ status = "okay";
+};
+
&mdio1 {
rgmii_phy1: ethernet-phy@1 {
compatible = "ethernet-phy-ieee802.3-c22";
@@ -314,6 +372,12 @@ hym8563_int: hym8563-int {
};
};
+ sound {
+ hp_detect: hp-detect {
+ rockchip,pins = <1 RK_PD5 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
+
usb-typec {
usbc0_int: usbc0-int {
rockchip,pins = <0 RK_PD3 RK_FUNC_GPIO &pcfg_pull_up>;
--
2.46.2
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH] arm64: dts: rockchip: analog audio on Orange Pi 5
2024-10-08 3:14 [PATCH] arm64: dts: rockchip: analog audio on Orange Pi 5 Jimmy Hon
@ 2024-10-08 14:56 ` Rob Herring (Arm)
2024-10-22 14:01 ` Heiko Stuebner
2024-10-22 14:12 ` Heiko Stuebner
1 sibling, 1 reply; 6+ messages in thread
From: Rob Herring (Arm) @ 2024-10-08 14:56 UTC (permalink / raw)
To: Jimmy Hon; +Cc: linux-rockchip, Heiko Stuebner
On Mon, 07 Oct 2024 22:14:29 -0500, Jimmy Hon wrote:
> Analog audio using es8388 codec via the headset jack and onboard mic
>
> Signed-off-by: Jimmy Hon <honyuenkwun@gmail.com>
> ---
> .../boot/dts/rockchip/rk3588s-orangepi-5.dts | 64 +++++++++++++++++++
> 1 file changed, 64 insertions(+)
>
My bot found new DTB warnings on the .dts files added or changed in this
series.
Some warnings may be from an existing SoC .dtsi. Or perhaps the warnings
are fixed by another series. Ultimately, it is up to the platform
maintainer whether these warnings are acceptable or not. No need to reply
unless the platform maintainer has comments.
If you already ran DT checks and didn't see these error(s), then
make sure dt-schema is up to date:
pip3 install dtschema --upgrade
New warnings running 'make CHECK_DTBS=y rockchip/rk3588s-orangepi-5.dtb' for 20241008031429.2410-1-honyuenkwun@gmail.com:
arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5.dtb: gpio-func: leds-gpio: {'rockchip,pins': [[0, 2, 0, 243]], 'phandle': 256} is not of type 'array'
from schema $id: http://devicetree.org/schemas/gpio/gpio-consumer.yaml#
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] arm64: dts: rockchip: analog audio on Orange Pi 5
2024-10-08 14:56 ` Rob Herring (Arm)
@ 2024-10-22 14:01 ` Heiko Stuebner
2024-10-22 15:56 ` Jimmy Hon
0 siblings, 1 reply; 6+ messages in thread
From: Heiko Stuebner @ 2024-10-22 14:01 UTC (permalink / raw)
To: Jimmy Hon, Rob Herring (Arm); +Cc: linux-rockchip
Am Dienstag, 8. Oktober 2024, 16:56:41 CEST schrieb Rob Herring (Arm):
>
> On Mon, 07 Oct 2024 22:14:29 -0500, Jimmy Hon wrote:
> > Analog audio using es8388 codec via the headset jack and onboard mic
> >
> > Signed-off-by: Jimmy Hon <honyuenkwun@gmail.com>
> > ---
> > .../boot/dts/rockchip/rk3588s-orangepi-5.dts | 64 +++++++++++++++++++
> > 1 file changed, 64 insertions(+)
> >
>
>
> My bot found new DTB warnings on the .dts files added or changed in this
> series.
>
> Some warnings may be from an existing SoC .dtsi. Or perhaps the warnings
> are fixed by another series. Ultimately, it is up to the platform
> maintainer whether these warnings are acceptable or not. No need to reply
> unless the platform maintainer has comments.
>
> If you already ran DT checks and didn't see these error(s), then
> make sure dt-schema is up to date:
>
> pip3 install dtschema --upgrade
>
>
> New warnings running 'make CHECK_DTBS=y rockchip/rk3588s-orangepi-5.dtb' for 20241008031429.2410-1-honyuenkwun@gmail.com:
>
> arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5.dtb: gpio-func: leds-gpio: {'rockchip,pins': [[0, 2, 0, 243]], 'phandle': 256} is not of type 'array'
> from schema $id: http://devicetree.org/schemas/gpio/gpio-consumer.yaml#
the error is predating this patch but should be fixed
nevertheless.
@Jimmy: can you check if the schematics for your board provide
an alternative name for the pin that is "leds-gpio" currently
in the orangepi-5 ?
Or just rename it to something like status_pin or something?
Thanks
Heiko
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] arm64: dts: rockchip: analog audio on Orange Pi 5
2024-10-22 14:01 ` Heiko Stuebner
@ 2024-10-22 15:56 ` Jimmy Hon
2024-10-22 20:39 ` Heiko Stübner
0 siblings, 1 reply; 6+ messages in thread
From: Jimmy Hon @ 2024-10-22 15:56 UTC (permalink / raw)
To: Heiko Stuebner; +Cc: Rob Herring (Arm), linux-rockchip
> > New warnings running 'make CHECK_DTBS=y rockchip/rk3588s-orangepi-5.dtb' for 20241008031429.2410-1-honyuenkwun@gmail.com:
> >
> > arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5.dtb: gpio-func: leds-gpio: {'rockchip,pins': [[0, 2, 0, 243]], 'phandle': 256} is not of type 'array'
> > from schema $id: http://devicetree.org/schemas/gpio/gpio-consumer.yaml#
>
> the error is predating this patch but should be fixed
> nevertheless.
>
> @Jimmy: can you check if the schematics for your board provide
> an alternative name for the pin that is "leds-gpio" currently
> in the orangepi-5 ?
>
> Or just rename it to something like status_pin or something?
>
> Thanks
> Heiko
>
>
The schematic calls the pin PWM0_LED.
The schematic for the LED RUN led on the Orange Pi 5 looks a lot like
Orange Pi 5 Plus's PWM_LED0 which is being driven by the "pwm-leds".
Unlike the PWM_LED1 which is not connected to a PWM capable pin.
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-plus.dts#n97
I'll try to switch it over to the pwm-leds and use "pwm0_led_pin",
otherwise I'll just relabel it to run_led_pin or green_led_pin.
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] arm64: dts: rockchip: analog audio on Orange Pi 5
2024-10-22 15:56 ` Jimmy Hon
@ 2024-10-22 20:39 ` Heiko Stübner
0 siblings, 0 replies; 6+ messages in thread
From: Heiko Stübner @ 2024-10-22 20:39 UTC (permalink / raw)
To: Jimmy Hon; +Cc: Rob Herring (Arm), linux-rockchip
Am Dienstag, 22. Oktober 2024, 17:56:44 CEST schrieb Jimmy Hon:
> > > New warnings running 'make CHECK_DTBS=y rockchip/rk3588s-orangepi-5.dtb' for 20241008031429.2410-1-honyuenkwun@gmail.com:
> > >
> > > arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5.dtb: gpio-func: leds-gpio: {'rockchip,pins': [[0, 2, 0, 243]], 'phandle': 256} is not of type 'array'
> > > from schema $id: http://devicetree.org/schemas/gpio/gpio-consumer.yaml#
> >
> > the error is predating this patch but should be fixed
> > nevertheless.
> >
> > @Jimmy: can you check if the schematics for your board provide
> > an alternative name for the pin that is "leds-gpio" currently
> > in the orangepi-5 ?
> >
> > Or just rename it to something like status_pin or something?
> >
> > Thanks
> > Heiko
> >
> >
> The schematic calls the pin PWM0_LED.
> The schematic for the LED RUN led on the Orange Pi 5 looks a lot like
> Orange Pi 5 Plus's PWM_LED0 which is being driven by the "pwm-leds".
> Unlike the PWM_LED1 which is not connected to a PWM capable pin.
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-plus.dts#n97
>
> I'll try to switch it over to the pwm-leds and use "pwm0_led_pin",
> otherwise I'll just relabel it to run_led_pin or green_led_pin.
Thanks a lot for looking into that :-)
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] arm64: dts: rockchip: analog audio on Orange Pi 5
2024-10-08 3:14 [PATCH] arm64: dts: rockchip: analog audio on Orange Pi 5 Jimmy Hon
2024-10-08 14:56 ` Rob Herring (Arm)
@ 2024-10-22 14:12 ` Heiko Stuebner
1 sibling, 0 replies; 6+ messages in thread
From: Heiko Stuebner @ 2024-10-22 14:12 UTC (permalink / raw)
To: Jimmy Hon; +Cc: Heiko Stuebner, linux-rockchip
On Mon, 7 Oct 2024 22:14:29 -0500, Jimmy Hon wrote:
> Analog audio using es8388 codec via the headset jack and onboard mic
>
>
Applied, thanks!
[1/1] arm64: dts: rockchip: analog audio on Orange Pi 5
commit: ae46756faff88f26aca8aba28397a6ab30d229c2
Best regards,
--
Heiko Stuebner <heiko@sntech.de>
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-10-22 20:39 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-08 3:14 [PATCH] arm64: dts: rockchip: analog audio on Orange Pi 5 Jimmy Hon
2024-10-08 14:56 ` Rob Herring (Arm)
2024-10-22 14:01 ` Heiko Stuebner
2024-10-22 15:56 ` Jimmy Hon
2024-10-22 20:39 ` Heiko Stübner
2024-10-22 14:12 ` Heiko Stuebner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox