Skip to contentSkip to conversation

arm64: dts: rockchip: fix probe of analog sound card on rock-3a

PATCH Applied Jonas Karlman 4 participants 7 messages Jan 15, 2023 – Jan 19, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm64: dts: rockchip: fix probe of analog sound card on rock-3a

The following was observed on my Radxa ROCK 3 Model A board:

rockchip-pinctrl pinctrl: pin gpio1-9 already requested by vcc-cam-regulator; cannot claim for fe410000.i2s
...
platform rk809-sound: deferred probe pending

Fix this by supplying a board specific pinctrl with the i2s1 pins used by pmic codec according to the schematic [1].

[1] https://dl.radxa.com/rock3/docs/hw/3a/ROCK-3A-V1.3-SCH.pdf

---
 arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts | 2 ++
 1 file changed, 2 insertions(+)
arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts +2 -0
index 00d873a03cfe..a149c8b83f94 100644
@@ -573,6 +573,8 @@ &i2s0_8ch {
 };
 
 &i2s1_8ch {
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2s1m0_sclktx &i2s1m0_lrcktx &i2s1m0_sdi0 &i2s1m0_sdo0>;
 	rockchip,trcm-sync-tx-only;
 	status = "okay";
 };
Signature · 7 lines
2.39.0


_______________________________________________
Linux-rockchip mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-rockchip
#1 lore raw

Hi Jonas,

Quoted 6 lines · Jonas Karlman

The following was observed on my Radxa ROCK 3 Model A board:

rockchip-pinctrl pinctrl: pin gpio1-9 already requested by vcc-cam-regulator; cannot claim for fe410000.i2s
...
platform rk809-sound: deferred probe pending

Quoted 6 lines

Fix this by supplying a board specific pinctrl with the i2s1 pins used by pmic codec according to the schematic [1].

[1] https://dl.radxa.com/rock3/docs/hw/3a/ROCK-3A-V1.3-SCH.pdf

Makes sense to me, but...

Quoted 9 lines
---
 arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts | 2 ++
 1 file changed, 2 insertions(+)
arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts +0 -0
index 00d873a03cfe..a149c8b83f94 100644

arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts &i2s0_8ch { · line 577

Quoted 5 lines
arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts +2 -0
@@ -573,6 +573,8 @@ &i2s0_8ch {
 };
 
 &i2s1_8ch {
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2s1m0_sclktx &i2s1m0_lrcktx &i2s1m0_sdi0 &i2s1m0_sdo0>;

... shouldn't this include i2s1m0_mclk as well?

For some reason this has been omitted in the pinctrl defined in rk356x.dtsi. But then rk356x.dtsi also claims
- both i2s1m0_sdo1 and i2s1m0_sdi3
- both i2s1m0_sdo2 and i2s1m0_sdi2
- both i2s1m0_sdo3 and i2s1m0_sdi1
which are mapped to the same respective pins. Therefore it seems that there might be something wrong with this pinctrl altogether.

Cc Nicolas Frattaroli, maybe he can provide some clarification.

Best regards,
Michael

Quoted 3 lines
arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts +0 -0
 	rockchip,trcm-sync-tx-only;
 	status = "okay";
 };
#2 lore raw

Hi Michael,

Quoted 29 lines · Michael Riesch

Hi Jonas,

Quoted 6 lines · Jonas Karlman

The following was observed on my Radxa ROCK 3 Model A board:

rockchip-pinctrl pinctrl: pin gpio1-9 already requested by vcc-cam-regulator; cannot claim for fe410000.i2s
...
platform rk809-sound: deferred probe pending

Quoted 6 lines

Fix this by supplying a board specific pinctrl with the i2s1 pins used by pmic codec according to the schematic [1].

[1] https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdl.radxa.com%2Frock3%2Fdocs%2Fhw%2F3a%2FROCK-3A-V1.3-SCH.pdf&data=05%7C01%7C%7Cb09a8096d417409ca0c108daf79d85f2%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638094553170941885%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=upix1Lqcu1y5vYkPtcB5Ao5TA04brBcecCS0LX2ipe4%3D&reserved=0

Makes sense to me, but...

Quoted 11 lines
---
  arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts | 2 ++
  1 file changed, 2 insertions(+)
arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts +0 -0
index 00d873a03cfe..a149c8b83f94 100644
@@ -573,6 +573,8 @@ &i2s0_8ch {
  };
 
Quoted 5 lines

arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts &i2s0_8ch { · line 577

Quoted 3 lines
arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts +2 -0
  &i2s1_8ch {
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2s1m0_sclktx &i2s1m0_lrcktx &i2s1m0_sdi0 &i2s1m0_sdo0>;

... shouldn't this include i2s1m0_mclk as well?

i2s1m0_mclk is already included in the pmic/rk809 pinctrl, so it was omitted from the i2s1_8ch pinctrl.

Best regards,
Jonas

Quoted 9 lines

For some reason this has been omitted in the pinctrl defined in rk356x.dtsi. But then rk356x.dtsi also claims
- both i2s1m0_sdo1 and i2s1m0_sdi3
- both i2s1m0_sdo2 and i2s1m0_sdi2
- both i2s1m0_sdo3 and i2s1m0_sdi1
which are mapped to the same respective pins. Therefore it seems that there might be something wrong with this pinctrl altogether.

Quoted 8 lines
Cc Nicolas Frattaroli, maybe he can provide some clarification.

Best regards,
Michael

Quoted 3 lines
arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts +0 -0
  	rockchip,trcm-sync-tx-only;
  	status = "okay";
  };

_______________________________________________
Linux-rockchip mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-rockchip

#3 lore raw

Hi Jonas,

Quoted 41 lines · Jonas Karlman

Hi Michael,

Quoted 24 lines · Michael Riesch

Hi Jonas,

Quoted 7 lines · Jonas Karlman

The following was observed on my Radxa ROCK 3 Model A board:

   rockchip-pinctrl pinctrl: pin gpio1-9 already requested by vcc-cam-regulator; cannot claim for fe410000.i2s
   ...
   platform rk809-sound: deferred probe pending

Quoted 7 lines

Fix this by supplying a board specific pinctrl with the i2s1 pins used by pmic codec according to the schematic [1].

[1]
https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdl.radxa.com%2Frock3%2Fdocs%2Fhw%2F3a%2FROCK-3A-V1.3-SCH.pdf&data=05%7C01%7C%7Cb09a8096d417409ca0c108daf79d85f2%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638094553170941885%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=upix1Lqcu1y5vYkPtcB5Ao5TA04brBcecCS0LX2ipe4%3D&reserved=0

Makes sense to me, but...

Quoted 4 lines

---
  arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts | 2 ++

  1 file changed, 2 insertions(+)
Quoted 13 lines

arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts &i2s0_8ch { · line 577

Quoted 11 lines
arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts +2 -0
index 00d873a03cfe..a149c8b83f94 100644
@@ -573,6 +573,8 @@ &i2s0_8ch {
   };
     &i2s1_8ch {
+    pinctrl-names = "default";
+    pinctrl-0 = <&i2s1m0_sclktx &i2s1m0_lrcktx &i2s1m0_sdi0
 &i2s1m0_sdo0>;

... shouldn't this include i2s1m0_mclk as well?

Quoted 2 lines

i2s1m0_mclk is already included in the pmic/rk809 pinctrl, so it was omitted from the i2s1_8ch pinctrl.

ah ok! In this case:

Best regards,
Michael

Quoted 22 lines

Best regards,
Jonas

Quoted 17 lines

For some reason this has been omitted in the pinctrl defined in rk356x.dtsi. But then rk356x.dtsi also claims
  - both i2s1m0_sdo1 and i2s1m0_sdi3
  - both i2s1m0_sdo2 and i2s1m0_sdi2
  - both i2s1m0_sdo3 and i2s1m0_sdi1
which are mapped to the same respective pins. Therefore it seems that there might be something wrong with this pinctrl altogether.

Cc Nicolas Frattaroli, maybe he can provide some clarification.

Best regards,
Michael

Quoted 3 lines
arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts +0 -0
       rockchip,trcm-sync-tx-only;
       status = "okay";
   };

_______________________________________________
Linux-rockchip mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-rockchip

#4 lore raw
In reply to Michael Riesch
Quoted 29 lines · On Monday, 16 January 2023 09:41:50 CET Michael Riesch wrote:

Hi Jonas,

Quoted 11 lines · Jonas Karlman

The following was observed on my Radxa ROCK 3 Model A board:
rockchip-pinctrl pinctrl: pin gpio1-9 already requested by vcc-cam-regulator; cannot claim for fe410000.i2s ... platform rk809-sound: deferred probe pending

Fix this by supplying a board specific pinctrl with the i2s1 pins used by pmic codec according to the schematic [1].

[1] https://dl.radxa.com/rock3/docs/hw/3a/ROCK-3A-V1.3-SCH.pdf

Makes sense to me, but...

Quoted 12 lines

---

 arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts | 2 ++
 1 file changed, 2 insertions(+)
(quoted diff) +0 -0

b/arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts index 00d873a03cfe..a149c8b83f94 100644

arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts +0 -0
@@ -573,6 +573,8 @@ &i2s0_8ch {
 
Quoted 6 lines

arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts &i2s0_8ch {

Quoted 6 lines
arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts +2 -0
 };
 
 &i2s1_8ch {
 
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2s1m0_sclktx &i2s1m0_lrcktx &i2s1m0_sdi0 

&i2s1m0_sdo0>;

Quoted 2 lines

... shouldn't this include i2s1m0_mclk as well?

You can totally use i2s without an mclk, but I don't have a specific explanation as to why this is lacking in this particular pinctrl, as I cargo-culted it from downstream.

Quoted 7 lines

For some reason this has been omitted in the pinctrl defined in rk356x.dtsi. But then rk356x.dtsi also claims
- both i2s1m0_sdo1 and i2s1m0_sdi3
- both i2s1m0_sdo2 and i2s1m0_sdi2
- both i2s1m0_sdo3 and i2s1m0_sdi1
which are mapped to the same respective pins. Therefore it seems that there might be something wrong with this pinctrl altogether.

This is actually correct, I believe. The driver has a feature called "io multiplex" which fiddles with the GRF to dynamically set the pin directions depending on the hardware parameters. As it happens, for example sdo1 and sdi3 are on the same pin mux, and can be switched between like this.

I don't know how well that meshes with upstream's understanding of pinctrl but in this case the two functions really can use the same pin.

Quoted 10 lines
Cc Nicolas Frattaroli, maybe he can provide some clarification.

Best regards,
Michael

Quoted 4 lines
arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts +0 -0
 	rockchip,trcm-sync-tx-only;

status = "okay";

};

Cheers,
Nicolas Frattaroli

_______________________________________________
Linux-rockchip mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-rockchip

#5 lore raw

Hi Nicolas,

Quoted 58 lines · Nicolas Frattaroli
Quoted 29 lines · On Monday, 16 January 2023 09:41:50 CET Michael Riesch wrote:

Hi Jonas,

Quoted 11 lines · Jonas Karlman

The following was observed on my Radxa ROCK 3 Model A board:
rockchip-pinctrl pinctrl: pin gpio1-9 already requested by vcc-cam-regulator; cannot claim for fe410000.i2s ... platform rk809-sound: deferred probe pending

Fix this by supplying a board specific pinctrl with the i2s1 pins used by pmic codec according to the schematic [1].

[1] https://dl.radxa.com/rock3/docs/hw/3a/ROCK-3A-V1.3-SCH.pdf

Makes sense to me, but...

Quoted 12 lines

---

 arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts | 2 ++
 1 file changed, 2 insertions(+)
(quoted diff) +0 -0

b/arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts index 00d873a03cfe..a149c8b83f94 100644

arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts +0 -0
@@ -573,6 +573,8 @@ &i2s0_8ch {
 
Quoted 6 lines

arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts &i2s0_8ch {

Quoted 6 lines
arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts +2 -0
 };
 
 &i2s1_8ch {
 
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2s1m0_sclktx &i2s1m0_lrcktx &i2s1m0_sdi0 

&i2s1m0_sdo0>;

Quoted 2 lines

... shouldn't this include i2s1m0_mclk as well?

You can totally use i2s without an mclk, but I don't have a specific explanation as to why this is lacking in this particular pinctrl, as I cargo-culted it from downstream.

Quoted 7 lines

For some reason this has been omitted in the pinctrl defined in rk356x.dtsi. But then rk356x.dtsi also claims
- both i2s1m0_sdo1 and i2s1m0_sdi3
- both i2s1m0_sdo2 and i2s1m0_sdi2
- both i2s1m0_sdo3 and i2s1m0_sdi1
which are mapped to the same respective pins. Therefore it seems that there might be something wrong with this pinctrl altogether.

This is actually correct, I believe. The driver has a feature called "io multiplex" which fiddles with the GRF to dynamically set the pin directions depending on the hardware parameters. As it happens, for example sdo1 and sdi3 are on the same pin mux, and can be switched between like this.

Quoted 3 lines

I don't know how well that meshes with upstream's understanding of pinctrl but in this case the two functions really can use the same pin.

Ah, fancy stuff! Thanks for the clarification!

Best regards,
Michael

Quoted 7 lines
Quoted 7 lines
Cc Nicolas Frattaroli, maybe he can provide some clarification.

Best regards,
Michael

Quoted 11 lines
Quoted 4 lines
Quoted 4 lines
arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts +0 -0
 	rockchip,trcm-sync-tx-only;

status = "okay";

};

Cheers,
Nicolas Frattaroli

_______________________________________________
Linux-rockchip mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-rockchip

maintainer Applied
#6 lore raw
In reply to Jonas Karlman
Quoted 10 lines · Jonas Karlman

The following was observed on my Radxa ROCK 3 Model A board:

rockchip-pinctrl pinctrl: pin gpio1-9 already requested by vcc-cam-regulator; cannot claim for fe410000.i2s
...
platform rk809-sound: deferred probe pending

Fix this by supplying a board specific pinctrl with the i2s1 pins used by pmic codec according to the schematic [1].

[...]

Applied, thanks!

[1/1] arm64: dts: rockchip: fix probe of analog sound card on rock-3a

      commit: 1104693cdfcd337e73ab585a225f05445ff7a864

Best regards,

Signature · 6 lines
Heiko Stuebner <[email protected]>

_______________________________________________
Linux-rockchip mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-rockchip