* [PATCH v1 0/2] ARM: dts: at91: Fixes for AT91SAM9G20-EK audio DTS
@ 2022-03-25 15:27 Mark Brown
2022-03-25 15:27 ` [PATCH v1 1/2] ARM: dts: at91: Map MCLK for wm8731 on at91sam9g20ek Mark Brown
2022-03-25 15:27 ` [PATCH v1 2/2] ARM: dts: at91: Describe regulators " Mark Brown
0 siblings, 2 replies; 5+ messages in thread
From: Mark Brown @ 2022-03-25 15:27 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 both the WM8731 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.
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 | 42 +++++++++++++++++++++
1 file changed, 42 insertions(+)
base-commit: f443e374ae131c168a065ea1748feac6b2e76613
--
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 [flat|nested] 5+ messages in thread
* [PATCH v1 1/2] ARM: dts: at91: Map MCLK for wm8731 on at91sam9g20ek
2022-03-25 15:27 [PATCH v1 0/2] ARM: dts: at91: Fixes for AT91SAM9G20-EK audio DTS Mark Brown
@ 2022-03-25 15:27 ` Mark Brown
2022-03-30 13:09 ` Claudiu.Beznea
2022-03-25 15:27 ` [PATCH v1 2/2] ARM: dts: at91: Describe regulators " Mark Brown
1 sibling, 1 reply; 5+ messages in thread
From: Mark Brown @ 2022-03-25 15:27 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>
---
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
_______________________________________________
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] 5+ messages in thread
* [PATCH v1 2/2] ARM: dts: at91: Describe regulators on at91sam9g20ek
2022-03-25 15:27 [PATCH v1 0/2] ARM: dts: at91: Fixes for AT91SAM9G20-EK audio DTS Mark Brown
2022-03-25 15:27 ` [PATCH v1 1/2] ARM: dts: at91: Map MCLK for wm8731 on at91sam9g20ek Mark Brown
@ 2022-03-25 15:27 ` Mark Brown
2022-03-30 13:09 ` Claudiu.Beznea
1 sibling, 1 reply; 5+ messages in thread
From: Mark Brown @ 2022-03-25 15:27 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 | 36 +++++++++++++++++++++
1 file changed, 36 insertions(+)
diff --git a/arch/arm/boot/dts/at91sam9g20ek_common.dtsi b/arch/arm/boot/dts/at91sam9g20ek_common.dtsi
index ca03685f0f08..88cf3ab40aa6 100644
--- a/arch/arm/boot/dts/at91sam9g20ek_common.dtsi
+++ b/arch/arm/boot/dts/at91sam9g20ek_common.dtsi
@@ -225,6 +225,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 +265,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
_______________________________________________
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] 5+ messages in thread
* Re: [PATCH v1 1/2] ARM: dts: at91: Map MCLK for wm8731 on at91sam9g20ek
2022-03-25 15:27 ` [PATCH v1 1/2] ARM: dts: at91: Map MCLK for wm8731 on at91sam9g20ek Mark Brown
@ 2022-03-30 13:09 ` Claudiu.Beznea
0 siblings, 0 replies; 5+ messages in thread
From: Claudiu.Beznea @ 2022-03-30 13:09 UTC (permalink / raw)
To: broonie, Nicolas.Ferre, alexandre.belloni, Codrin.Ciubotariu,
robh+dt
Cc: devicetree, linux-arm-kernel
On 25.03.2022 17:27, Mark Brown wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
>
> 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
>
_______________________________________________
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] 5+ messages in thread
* Re: [PATCH v1 2/2] ARM: dts: at91: Describe regulators on at91sam9g20ek
2022-03-25 15:27 ` [PATCH v1 2/2] ARM: dts: at91: Describe regulators " Mark Brown
@ 2022-03-30 13:09 ` Claudiu.Beznea
0 siblings, 0 replies; 5+ messages in thread
From: Claudiu.Beznea @ 2022-03-30 13:09 UTC (permalink / raw)
To: broonie, Nicolas.Ferre, alexandre.belloni, Codrin.Ciubotariu,
robh+dt
Cc: devicetree, linux-arm-kernel
On 25.03.2022 17:27, Mark Brown wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
>
> 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>
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
> ---
> arch/arm/boot/dts/at91sam9g20ek_common.dtsi | 36 +++++++++++++++++++++
> 1 file changed, 36 insertions(+)
>
> diff --git a/arch/arm/boot/dts/at91sam9g20ek_common.dtsi b/arch/arm/boot/dts/at91sam9g20ek_common.dtsi
> index ca03685f0f08..88cf3ab40aa6 100644
> --- a/arch/arm/boot/dts/at91sam9g20ek_common.dtsi
> +++ b/arch/arm/boot/dts/at91sam9g20ek_common.dtsi
> @@ -225,6 +225,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 +265,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
>
_______________________________________________
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] 5+ messages in thread
end of thread, other threads:[~2022-03-30 13:11 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-25 15:27 [PATCH v1 0/2] ARM: dts: at91: Fixes for AT91SAM9G20-EK audio DTS Mark Brown
2022-03-25 15:27 ` [PATCH v1 1/2] ARM: dts: at91: Map MCLK for wm8731 on at91sam9g20ek Mark Brown
2022-03-30 13:09 ` Claudiu.Beznea
2022-03-25 15:27 ` [PATCH v1 2/2] ARM: dts: at91: Describe regulators " Mark Brown
2022-03-30 13:09 ` Claudiu.Beznea
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).