ARM: dts: at91: Fixes for AT91SAM9G20-EK audio DTS
Subsystems (2)
cover ARM: dts: at91: Fixes for AT91SAM9G20-EK audio DTS
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
Signature · 7 lines
2.30.2 _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
PATCH 1/2 ARM: dts: at91: Map MCLK for wm8731 on at91sam9g20ek
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.
--- arch/arm/boot/dts/at91sam9g20ek_common.dtsi | 6 ++++++ 1 file changed, 6 insertions(+)
arch/arm/boot/dts/at91sam9g20ek_common.dtsi +6 -0
@@ -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>; }; };
Signature · 7 lines
2.30.2 _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Re: [PATCH v1 1/2] ARM: dts: at91: Map MCLK for wm8731 on at91sam9g20ek
Quoted 10 lines · Mark Brown
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 <[email protected]>
Quoted 24 lines
--- arch/arm/boot/dts/at91sam9g20ek_common.dtsi | 6 ++++++ 1 file changed, 6 insertions(+)arch/arm/boot/dts/at91sam9g20ek_common.dtsi +6
-1@@ -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
PATCH 2/2 ARM: dts: at91: Describe regulators on at91sam9g20ek
In reply to Mark BrownThe 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.
--- arch/arm/boot/dts/at91sam9g20ek_common.dtsi | 36 +++++++++++++++++++++ 1 file changed, 36 insertions(+)
arch/arm/boot/dts/at91sam9g20ek_common.dtsi +36 -0
@@ -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>; + }; };
Signature · 7 lines
2.30.2 _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Re: [PATCH v1 2/2] ARM: dts: at91: Describe regulators on at91sam9g20ek
Quoted 8 lines · Mark Brown
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 <[email protected]>
Quoted 59 lines
--- arch/arm/boot/dts/at91sam9g20ek_common.dtsi | 36 +++++++++++++++++++++ 1 file changed, 36 insertions(+)arch/arm/boot/dts/at91sam9g20ek_common.dtsi +36
-1@@ -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