* [PATCH 1/2] arm64: dts: rockchip: enable work led on rk3568-evb1
@ 2022-02-22 17:50 Michael Riesch
2022-02-22 17:50 ` [PATCH 2/2] arm64: dts: rockchip: enable rk809 audio codec on the rk3568 evb1 Michael Riesch
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Michael Riesch @ 2022-02-22 17:50 UTC (permalink / raw)
To: devicetree, linux-arm-kernel, linux-rockchip, linux-kernel
Cc: Rob Herring, Heiko Stuebner, Michael Riesch, Liang Chen, frank-w
Enable the blue work LED on the Rockchip RK3568 EVB1.
Signed-off-by: Michael Riesch <michael.riesch@wolfvision.net>
---
.../boot/dts/rockchip/rk3568-evb1-v10.dts | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/arch/arm64/boot/dts/rockchip/rk3568-evb1-v10.dts b/arch/arm64/boot/dts/rockchip/rk3568-evb1-v10.dts
index 39c495ff0157..aaf7b4bed24b 100644
--- a/arch/arm64/boot/dts/rockchip/rk3568-evb1-v10.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3568-evb1-v10.dts
@@ -33,6 +33,18 @@ dc_12v: dc-12v {
regulator-max-microvolt = <12000000>;
};
+ leds {
+ compatible = "gpio-leds";
+
+ led_work: led-work {
+ gpios = <&gpio0 RK_PC0 GPIO_ACTIVE_HIGH>;
+ label = "led_work";
+ linux,default-trigger = "heartbeat";
+ pinctrl-names = "default";
+ pinctrl-0 = <&led_work_en>;
+ };
+ };
+
vcc3v3_sys: vcc3v3-sys {
compatible = "regulator-fixed";
regulator-name = "vcc3v3_sys";
@@ -404,6 +416,12 @@ vcc3v3_lcd1_n_en: vcc3v3_lcd1_n_en {
};
};
+ leds {
+ led_work_en: led_work_en {
+ rockchip,pins = <0 RK_PC0 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
+
pmic {
pmic_int: pmic_int {
rockchip,pins =
--
2.30.2
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 6+ messages in thread* [PATCH 2/2] arm64: dts: rockchip: enable rk809 audio codec on the rk3568 evb1 2022-02-22 17:50 [PATCH 1/2] arm64: dts: rockchip: enable work led on rk3568-evb1 Michael Riesch @ 2022-02-22 17:50 ` Michael Riesch 2022-02-22 23:11 ` Heiko Stuebner 2022-02-22 23:27 ` (subset) [PATCH 1/2] arm64: dts: rockchip: enable work led on rk3568-evb1 Heiko Stuebner 2022-02-23 23:44 ` Heiko Stuebner 2 siblings, 1 reply; 6+ messages in thread From: Michael Riesch @ 2022-02-22 17:50 UTC (permalink / raw) To: devicetree, linux-arm-kernel, linux-rockchip, linux-kernel Cc: Rob Herring, Heiko Stuebner, Michael Riesch, Liang Chen, frank-w Enable the Rockchip RK809 audio codec on the Rockchip RK3568 EVB1. This requires the VCCIO_ACODEC voltage regulator to be set to always on. Signed-off-by: Michael Riesch <michael.riesch@wolfvision.net> --- .../boot/dts/rockchip/rk3568-evb1-v10.dts | 31 ++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/rockchip/rk3568-evb1-v10.dts b/arch/arm64/boot/dts/rockchip/rk3568-evb1-v10.dts index aaf7b4bed24b..1ed92531e626 100644 --- a/arch/arm64/boot/dts/rockchip/rk3568-evb1-v10.dts +++ b/arch/arm64/boot/dts/rockchip/rk3568-evb1-v10.dts @@ -45,6 +45,20 @@ led_work: led-work { }; }; + rk809-sound { + compatible = "simple-audio-card"; + simple-audio-card,format = "i2s"; + simple-audio-card,name = "Analog RK809"; + simple-audio-card,mclk-fs = <256>; + + simple-audio-card,cpu { + sound-dai = <&i2s1_8ch>; + }; + simple-audio-card,codec { + sound-dai = <&rk809>; + }; + }; + vcc3v3_sys: vcc3v3-sys { compatible = "regulator-fixed"; regulator-name = "vcc3v3_sys"; @@ -165,10 +179,15 @@ rk809: pmic@20 { reg = <0x20>; interrupt-parent = <&gpio0>; interrupts = <RK_PA3 IRQ_TYPE_LEVEL_LOW>; + assigned-clocks = <&cru I2S1_MCLKOUT_TX>; + assigned-clock-parents = <&cru CLK_I2S1_8CH_TX>; #clock-cells = <1>; + clock-names = "mclk"; + clocks = <&cru I2S1_MCLKOUT_TX>; pinctrl-names = "default"; - pinctrl-0 = <&pmic_int>; + pinctrl-0 = <&pmic_int>, <&i2s1m0_mclk>; rockchip,system-power-controller; + #sound-dai-cells = <0>; vcc1-supply = <&vcc3v3_sys>; vcc2-supply = <&vcc3v3_sys>; vcc3-supply = <&vcc3v3_sys>; @@ -282,6 +301,7 @@ regulator-state-mem { vccio_acodec: LDO_REG4 { regulator-name = "vccio_acodec"; + regulator-always-on; regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; @@ -366,6 +386,10 @@ regulator-state-mem { }; }; }; + + codec { + mic-in-differential; + }; }; }; @@ -386,6 +410,11 @@ touchscreen0: goodix@14 { }; }; +&i2s1_8ch { + rockchip,trcm-sync-tx-only; + status = "okay"; +}; + &mdio0 { rgmii_phy0: ethernet-phy@0 { compatible = "ethernet-phy-ieee802.3-c22"; -- 2.30.2 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] arm64: dts: rockchip: enable rk809 audio codec on the rk3568 evb1 2022-02-22 17:50 ` [PATCH 2/2] arm64: dts: rockchip: enable rk809 audio codec on the rk3568 evb1 Michael Riesch @ 2022-02-22 23:11 ` Heiko Stuebner 2022-02-23 8:41 ` Michael Riesch 0 siblings, 1 reply; 6+ messages in thread From: Heiko Stuebner @ 2022-02-22 23:11 UTC (permalink / raw) To: devicetree, linux-arm-kernel, linux-rockchip, linux-kernel, Michael Riesch Cc: Rob Herring, Michael Riesch, Liang Chen, frank-w Hi, Am Dienstag, 22. Februar 2022, 18:50:04 CET schrieb Michael Riesch: > Enable the Rockchip RK809 audio codec on the Rockchip RK3568 > EVB1. This requires the VCCIO_ACODEC voltage regulator to be set > to always on. > > Signed-off-by: Michael Riesch <michael.riesch@wolfvision.net> [...] > @@ -282,6 +301,7 @@ regulator-state-mem { > > vccio_acodec: LDO_REG4 { > regulator-name = "vccio_acodec"; > + regulator-always-on; As this seems to supply the codec (in the rk809?) shouldn't the sound part model that relationship and handle regulators instead of requiring an arbitary regulator to be always on? Heiko > regulator-min-microvolt = <3300000>; > regulator-max-microvolt = <3300000>; > > @@ -366,6 +386,10 @@ regulator-state-mem { > }; > }; > }; > + > + codec { > + mic-in-differential; > + }; > }; > }; > > @@ -386,6 +410,11 @@ touchscreen0: goodix@14 { > }; > }; > > +&i2s1_8ch { > + rockchip,trcm-sync-tx-only; > + status = "okay"; > +}; > + > &mdio0 { > rgmii_phy0: ethernet-phy@0 { > compatible = "ethernet-phy-ieee802.3-c22"; > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] arm64: dts: rockchip: enable rk809 audio codec on the rk3568 evb1 2022-02-22 23:11 ` Heiko Stuebner @ 2022-02-23 8:41 ` Michael Riesch 0 siblings, 0 replies; 6+ messages in thread From: Michael Riesch @ 2022-02-23 8:41 UTC (permalink / raw) To: Heiko Stuebner, devicetree, linux-arm-kernel, linux-rockchip, linux-kernel Cc: Rob Herring, Liang Chen, frank-w Hello Heiko, On 2/23/22 00:11, Heiko Stuebner wrote: > Hi, > > Am Dienstag, 22. Februar 2022, 18:50:04 CET schrieb Michael Riesch: >> Enable the Rockchip RK809 audio codec on the Rockchip RK3568 >> EVB1. This requires the VCCIO_ACODEC voltage regulator to be set >> to always on. >> >> Signed-off-by: Michael Riesch <michael.riesch@wolfvision.net> > > [...] > >> @@ -282,6 +301,7 @@ regulator-state-mem { >> >> vccio_acodec: LDO_REG4 { >> regulator-name = "vccio_acodec"; >> + regulator-always-on; > > As this seems to supply the codec (in the rk809?) shouldn't the > sound part model that relationship and handle regulators > instead of requiring an arbitary regulator to be always on? To be honest, I am not entirely sure. VCCIO_ACODEC is supplied by the (LDO regulator part of the) RK809. As far as I can tell, the audio codec part of the RK809 is powered internally. There is indeed a note "IO Power = LDO4" (which corresponds to VCCIO_ACODEC) at the I2S interface, which would make the RK809 the producer and a consumer of this voltage. This could be modeled in the driver, but seeing that the rk808 driver and the codec driver are directly coupled I think it would not change much. I admit that I am going for the low-effort solution here, but it is done in similar fashion on other boards. What do you think? As to the other consumers of VCCIO_ACODEC: The microphone requires this voltage, but is there a representation of an analog microphone? And of course the voltage serves as supply for one of the PMU IO (voltage) domains (vccio1). But I think here the principle is that the IO voltage is only turned on if there is a peer on the other end, which (most likely) consumes this voltage as well. If you decide to accept the change as is, could you please fix up the commit message "rk3568 evb1" -> "rk3568-evb1-v10" for consistency? This did not occur to me when I sent the patches, sorry! Best regards, Michael > > > Heiko > >> regulator-min-microvolt = <3300000>; >> regulator-max-microvolt = <3300000>; >> >> @@ -366,6 +386,10 @@ regulator-state-mem { >> }; >> }; >> }; >> + >> + codec { >> + mic-in-differential; >> + }; >> }; >> }; >> >> @@ -386,6 +410,11 @@ touchscreen0: goodix@14 { >> }; >> }; >> >> +&i2s1_8ch { >> + rockchip,trcm-sync-tx-only; >> + status = "okay"; >> +}; >> + >> &mdio0 { >> rgmii_phy0: ethernet-phy@0 { >> compatible = "ethernet-phy-ieee802.3-c22"; >> > > > > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: (subset) [PATCH 1/2] arm64: dts: rockchip: enable work led on rk3568-evb1 2022-02-22 17:50 [PATCH 1/2] arm64: dts: rockchip: enable work led on rk3568-evb1 Michael Riesch 2022-02-22 17:50 ` [PATCH 2/2] arm64: dts: rockchip: enable rk809 audio codec on the rk3568 evb1 Michael Riesch @ 2022-02-22 23:27 ` Heiko Stuebner 2022-02-23 23:44 ` Heiko Stuebner 2 siblings, 0 replies; 6+ messages in thread From: Heiko Stuebner @ 2022-02-22 23:27 UTC (permalink / raw) To: linux-rockchip, linux-arm-kernel, devicetree, Michael Riesch, linux-kernel Cc: Heiko Stuebner, Liang Chen, frank-w, Rob Herring On Tue, 22 Feb 2022 18:50:03 +0100, Michael Riesch wrote: > Enable the blue work LED on the Rockchip RK3568 EVB1. Applied, thanks! [1/2] arm64: dts: rockchip: enable work led on rk3568-evb1 commit: e2bcb9477e48ff7c10d0d3508cd16f0a10e81dd8 - Renamed the node to led-0 (according to binding) - dropped label (deprecated) and instead moved to color and function properties (to try them out) Best regards, -- Heiko Stuebner <heiko@sntech.de> _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: (subset) [PATCH 1/2] arm64: dts: rockchip: enable work led on rk3568-evb1 2022-02-22 17:50 [PATCH 1/2] arm64: dts: rockchip: enable work led on rk3568-evb1 Michael Riesch 2022-02-22 17:50 ` [PATCH 2/2] arm64: dts: rockchip: enable rk809 audio codec on the rk3568 evb1 Michael Riesch 2022-02-22 23:27 ` (subset) [PATCH 1/2] arm64: dts: rockchip: enable work led on rk3568-evb1 Heiko Stuebner @ 2022-02-23 23:44 ` Heiko Stuebner 2 siblings, 0 replies; 6+ messages in thread From: Heiko Stuebner @ 2022-02-23 23:44 UTC (permalink / raw) To: linux-rockchip, Michael Riesch, devicetree, linux-arm-kernel, linux-kernel Cc: Heiko Stuebner, frank-w, Rob Herring, Liang Chen On Tue, 22 Feb 2022 18:50:03 +0100, Michael Riesch wrote: > Enable the blue work LED on the Rockchip RK3568 EVB1. Applied, thanks! [2/2] arm64: dts: rockchip: enable rk809 audio codec on the rk3568 evb1 commit: 3e4c629ca680785af2cd6bfd688e958b03db921e Best regards, -- Heiko Stuebner <heiko@sntech.de> _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-02-23 23:45 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2022-02-22 17:50 [PATCH 1/2] arm64: dts: rockchip: enable work led on rk3568-evb1 Michael Riesch 2022-02-22 17:50 ` [PATCH 2/2] arm64: dts: rockchip: enable rk809 audio codec on the rk3568 evb1 Michael Riesch 2022-02-22 23:11 ` Heiko Stuebner 2022-02-23 8:41 ` Michael Riesch 2022-02-22 23:27 ` (subset) [PATCH 1/2] arm64: dts: rockchip: enable work led on rk3568-evb1 Heiko Stuebner 2022-02-23 23:44 ` Heiko Stuebner
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox