ARM: dts: at91: Fixes for AT91SAM9G20-EK DTS
Subsystems (2)
v2 cover ARM: dts: at91: Fixes for AT91SAM9G20-EK 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 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
Signature · 1 line
2.30.2
PATCH v2 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 · 1 line
2.30.2
PATCH v2 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 | 37 +++++++++++++++++++++ 1 file changed, 37 insertions(+)
arch/arm/boot/dts/at91sam9g20ek_common.dtsi +37 -0
@@ -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>; + }; };
Signature · 1 line
2.30.2
Quoted 15 lines · Mark Brown
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.
Quoted 7 lines
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:
I'm gonna queue these patches for 5.18 "fixes".
Thanks a lot Mark, that's really appreciated!
Best regards,
Nicolas
Quoted 9 lines
arch/arm/boot/dts/at91sam9g20ek_common.dtsi | 43 +++++++++++++++++++++ 1 file changed, 43 insertions(+)base-commit:
3123109284176b1532874591f7c81f3837bbdc17--
2.30.2
Signature · 1 line
Nicolas Ferre