* [PATCH v2 0/2] ARM: dts: at91: Fixes for AT91SAM9G20-EK DTS
@ 2022-04-04 10:28 Mark Brown
2022-04-04 10:28 ` [PATCH v2 1/2] ARM: dts: at91: Map MCLK for wm8731 on at91sam9g20ek Mark Brown
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Mark Brown @ 2022-04-04 10:28 UTC (permalink / raw)
To: Nicolas Ferre, Alexandre Belloni, Claudiu Beznea,
Codrin Ciubotariu, Rob Herring
Cc: devicetree, linux-arm-kernel, Mark Brown
The DT description for the audio subsystem on the AT91SAM9G20-EK
reference board is a bit bitrotted, the clocking for the WM8731 audio
CODEC is not described. Previously this was handled in the machine
driver but at some point in the transition to the common clock framework
that code was broken and rendered mostly redundant so the first patch
adds a mapping of the MCLK on the CODEC which is used via existing code
in it's driver.
We also have some warnings on the WM8731, EEPROM and the MMC from the
regulator framework since the supplies on the board aren't described.
These don't fundamentally matter since they are fixed voltage regulators
and not controlled by software at runtime but it's nicer to fix them.
v2:
- Rebase onto v5.18-rc1.
- Also cover the serial EEPROM supply which is requested by that driver.
Mark Brown (2):
ARM: dts: at91: Map MCLK for wm8731 on at91sam9g20ek
ARM: dts: at91: Describe regulators on at91sam9g20ek
arch/arm/boot/dts/at91sam9g20ek_common.dtsi | 43 +++++++++++++++++++++
1 file changed, 43 insertions(+)
base-commit: 3123109284176b1532874591f7c81f3837bbdc17
--
2.30.2
^ permalink raw reply [flat|nested] 4+ messages in thread* [PATCH v2 1/2] ARM: dts: at91: Map MCLK for wm8731 on at91sam9g20ek
2022-04-04 10:28 [PATCH v2 0/2] ARM: dts: at91: Fixes for AT91SAM9G20-EK DTS Mark Brown
@ 2022-04-04 10:28 ` Mark Brown
2022-04-04 10:28 ` [PATCH v2 2/2] ARM: dts: at91: Describe regulators " Mark Brown
2022-04-13 16:45 ` [PATCH v2 0/2] ARM: dts: at91: Fixes for AT91SAM9G20-EK DTS Nicolas Ferre
2 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2022-04-04 10:28 UTC (permalink / raw)
To: Nicolas Ferre, Alexandre Belloni, Claudiu Beznea,
Codrin Ciubotariu, Rob Herring
Cc: devicetree, linux-arm-kernel, Mark Brown
The MCLK of the WM8731 on the AT91SAM9G20-EK board is connected to the
PCK0 output of the SoC and is expected to be set to 12MHz. Previously
this was mapped using pre-common clock API calls in the audio machine
driver but the conversion to the common clock framework broke that so
describe things in the DT instead.
Fixes: ff78a189b0ae55f ("ARM: at91: remove old at91-specific clock driver")
Signed-off-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
---
arch/arm/boot/dts/at91sam9g20ek_common.dtsi | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/arch/arm/boot/dts/at91sam9g20ek_common.dtsi b/arch/arm/boot/dts/at91sam9g20ek_common.dtsi
index 87bb39060e8b..ca03685f0f08 100644
--- a/arch/arm/boot/dts/at91sam9g20ek_common.dtsi
+++ b/arch/arm/boot/dts/at91sam9g20ek_common.dtsi
@@ -219,6 +219,12 @@ i2c-gpio-0 {
wm8731: wm8731@1b {
compatible = "wm8731";
reg = <0x1b>;
+
+ /* PCK0 at 12MHz */
+ clocks = <&pmc PMC_TYPE_SYSTEM 8>;
+ clock-names = "mclk";
+ assigned-clocks = <&pmc PMC_TYPE_SYSTEM 8>;
+ assigned-clock-rates = <12000000>;
};
};
--
2.30.2
^ permalink raw reply related [flat|nested] 4+ messages in thread* [PATCH v2 2/2] ARM: dts: at91: Describe regulators on at91sam9g20ek
2022-04-04 10:28 [PATCH v2 0/2] ARM: dts: at91: Fixes for AT91SAM9G20-EK DTS Mark Brown
2022-04-04 10:28 ` [PATCH v2 1/2] ARM: dts: at91: Map MCLK for wm8731 on at91sam9g20ek Mark Brown
@ 2022-04-04 10:28 ` Mark Brown
2022-04-13 16:45 ` [PATCH v2 0/2] ARM: dts: at91: Fixes for AT91SAM9G20-EK DTS Nicolas Ferre
2 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2022-04-04 10:28 UTC (permalink / raw)
To: Nicolas Ferre, Alexandre Belloni, Claudiu Beznea,
Codrin Ciubotariu, Rob Herring
Cc: devicetree, linux-arm-kernel, Mark Brown
The at91sam9g20ek has no software controllable regulators, only some fixed
discrete regulators, but they are there and currently the wm8731 driver
does try to use them. Show the supplies in the DT and map them for the
wm8731 so things start up cleanly.
Signed-off-by: Mark Brown <broonie@kernel.org>
---
arch/arm/boot/dts/at91sam9g20ek_common.dtsi | 37 +++++++++++++++++++++
1 file changed, 37 insertions(+)
diff --git a/arch/arm/boot/dts/at91sam9g20ek_common.dtsi b/arch/arm/boot/dts/at91sam9g20ek_common.dtsi
index ca03685f0f08..6978ccb0cb26 100644
--- a/arch/arm/boot/dts/at91sam9g20ek_common.dtsi
+++ b/arch/arm/boot/dts/at91sam9g20ek_common.dtsi
@@ -214,6 +214,7 @@ i2c-gpio-0 {
24c512@50 {
compatible = "atmel,24c512";
reg = <0x50>;
+ vcc-supply = <®_3v3>;
};
wm8731: wm8731@1b {
@@ -225,6 +226,11 @@ wm8731: wm8731@1b {
clock-names = "mclk";
assigned-clocks = <&pmc PMC_TYPE_SYSTEM 8>;
assigned-clock-rates = <12000000>;
+
+ HPVDD-supply = <&vcc_dac>;
+ AVDD-supply = <&vcc_dac>;
+ DCVDD-supply = <®_3v3>;
+ DBVDD-supply = <®_3v3>;
};
};
@@ -260,4 +266,35 @@ sound {
atmel,ssc-controller = <&ssc0>;
atmel,audio-codec = <&wm8731>;
};
+
+ reg_5v: fixedregulator0 {
+ compatible = "regulator-fixed";
+ regulator-name = "5V";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ };
+
+ reg_3v3: fixedregulator1 {
+ compatible = "regulator-fixed";
+ regulator-name = "3V3";
+ vin-supply = <®_5v>;
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ };
+
+ reg_1v: fixedregulator2 {
+ compatible = "regulator-fixed";
+ regulator-name = "1V";
+ vin-supply = <®_5v>;
+ regulator-min-microvolt = <1000000>;
+ regulator-max-microvolt = <1000000>;
+ };
+
+ vcc_dac: fixedregulator3 {
+ compatible = "regulator-fixed";
+ regulator-name = "VCC_DAC";
+ vin-supply = <®_3v3>;
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ };
};
--
2.30.2
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH v2 0/2] ARM: dts: at91: Fixes for AT91SAM9G20-EK DTS
2022-04-04 10:28 [PATCH v2 0/2] ARM: dts: at91: Fixes for AT91SAM9G20-EK DTS Mark Brown
2022-04-04 10:28 ` [PATCH v2 1/2] ARM: dts: at91: Map MCLK for wm8731 on at91sam9g20ek Mark Brown
2022-04-04 10:28 ` [PATCH v2 2/2] ARM: dts: at91: Describe regulators " Mark Brown
@ 2022-04-13 16:45 ` Nicolas Ferre
2 siblings, 0 replies; 4+ messages in thread
From: Nicolas Ferre @ 2022-04-13 16:45 UTC (permalink / raw)
To: Mark Brown, Alexandre Belloni, Claudiu Beznea, Codrin Ciubotariu,
Rob Herring
Cc: devicetree, linux-arm-kernel
On 04/04/2022 at 12:28, Mark Brown wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
>
> The DT description for the audio subsystem on the AT91SAM9G20-EK
> reference board is a bit bitrotted, the clocking for the WM8731 audio
> CODEC is not described. Previously this was handled in the machine
> driver but at some point in the transition to the common clock framework
> that code was broken and rendered mostly redundant so the first patch
> adds a mapping of the MCLK on the CODEC which is used via existing code
> in it's driver.
>
> We also have some warnings on the WM8731, EEPROM and the MMC from the
> regulator framework since the supplies on the board aren't described.
> These don't fundamentally matter since they are fixed voltage regulators
> and not controlled by software at runtime but it's nicer to fix them.
>
> v2:
> - Rebase onto v5.18-rc1.
> - Also cover the serial EEPROM supply which is requested by that driver.
>
> Mark Brown (2):
> ARM: dts: at91: Map MCLK for wm8731 on at91sam9g20ek
> ARM: dts: at91: Describe regulators on at91sam9g20ek
For the whole series:
Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>
I'm gonna queue these patches for 5.18 "fixes".
Thanks a lot Mark, that's really appreciated!
Best regards,
Nicolas
>
> arch/arm/boot/dts/at91sam9g20ek_common.dtsi | 43 +++++++++++++++++++++
> 1 file changed, 43 insertions(+)
>
>
> base-commit: 3123109284176b1532874591f7c81f3837bbdc17
> --
> 2.30.2
>
--
Nicolas Ferre
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-04-13 16:45 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-04 10:28 [PATCH v2 0/2] ARM: dts: at91: Fixes for AT91SAM9G20-EK DTS Mark Brown
2022-04-04 10:28 ` [PATCH v2 1/2] ARM: dts: at91: Map MCLK for wm8731 on at91sam9g20ek Mark Brown
2022-04-04 10:28 ` [PATCH v2 2/2] ARM: dts: at91: Describe regulators " Mark Brown
2022-04-13 16:45 ` [PATCH v2 0/2] ARM: dts: at91: Fixes for AT91SAM9G20-EK DTS Nicolas Ferre
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).