Re: [PATCH 00/18] Add audio support for the MediaTek Genio 350-evk board

2024-03-12 Thread Alexandre Mergnat
On 27/02/2024 16:06, Mark Brown wrote: On Mon, Feb 26, 2024 at 03:01:38PM +0100, Alexandre Mergnat wrote: This serie aim to add the following audio support for the Genio 350-evk: - Playback - 2ch Headset Jack (Earphone) - 1ch Line-out Jack (Speaker) - 8ch HDMI Tx - Capture - 1ch

Re: [PATCH 12/18] ASoC: codecs: mt6357: add MT6357 codec

2024-03-12 Thread Alexandre Mergnat
On 26/02/2024 16:25, AngeloGioacchino Del Regno wrote: +    if (enable) { +    /* set gpio mosi mode */ +    regmap_write(priv->regmap, MT6357_GPIO_MODE2_CLR, GPIO_MODE2_CLEAR_ALL); +    regmap_write(priv->regmap, MT6357_GPIO_MODE2_SET, GPIO8_MODE_SET_AUD_CLK_MOSI | +   

Re: [PATCH 12/18] ASoC: codecs: mt6357: add MT6357 codec

2024-03-12 Thread Alexandre Mergnat
On 26/02/2024 17:09, Mark Brown wrote: On Mon, Feb 26, 2024 at 03:01:50PM +0100, amerg...@baylibre.com wrote: index ..13e95c227114 --- /dev/null +++ b/sound/soc/codecs/mt6357.c @@ -0,0 +1,1805 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * MT6357 ALSA SoC audio codec driver + *

Re: [PATCH 12/18] ASoC: codecs: mt6357: add MT6357 codec

2024-03-13 Thread Alexandre Mergnat
On 26/02/2024 17:09, Mark Brown wrote: index ..13e95c227114 --- /dev/null +++ b/sound/soc/codecs/mt6357.c @@ -0,0 +1,1805 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * MT6357 ALSA SoC audio codec driver + * Please use a C++ comment for the whole comment to make it clearer that t

Re: [PATCH 12/18] ASoC: codecs: mt6357: add MT6357 codec

2024-03-15 Thread Alexandre Mergnat
On 13/03/2024 18:23, Mark Brown wrote: On Tue, Mar 12, 2024 at 07:03:25PM +0100, Alexandre Mergnat wrote: On 26/02/2024 17:09, Mark Brown wrote: + case MT6357_ZCD_CON2: + regmap_read(priv->regmap, MT6357_ZCD_CON2, ®); + priv->ana_gain[ANALOG_VOLUME_

Re: [PATCH 12/18] ASoC: codecs: mt6357: add MT6357 codec

2024-03-15 Thread Alexandre Mergnat
On 15/03/2024 15:30, Mark Brown wrote: On Fri, Mar 15, 2024 at 12:01:12PM +0100, Alexandre Mergnat wrote: On 13/03/2024 18:23, Mark Brown wrote: On Tue, Mar 12, 2024 at 07:03:25PM +0100, Alexandre Mergnat wrote: Actually you must save the values because the gain selected by the user will

Re: [PATCH 00/18] Add audio support for the MediaTek Genio 350-evk board

2024-03-15 Thread Alexandre Mergnat
On 15/03/2024 15:38, Mark Brown wrote: On Tue, Mar 12, 2024 at 09:58:05AM +0100, Alexandre Mergnat wrote: I'm a bit lost for mixer-test and pcm-test. Currently, I cross-compile the alsa lib project to be able to build the tests and put it on my board. I can execute it, but I still h

Re: [PATCH 12/18] ASoC: codecs: mt6357: add MT6357 codec

2024-03-15 Thread Alexandre Mergnat
On 15/03/2024 16:15, Mark Brown wrote: On Fri, Mar 15, 2024 at 04:05:21PM +0100, Alexandre Mergnat wrote: On 15/03/2024 15:30, Mark Brown wrote: Let me know, when you change de gain to do a ramp down (start from user gain to gain=-40db), next time for the ramp up, how/where do you find

[PATCH 00/18] Add display support for the MT8365-EVK board

2023-10-23 Thread Alexandre Mergnat
drivers are also improved. Regards, Alex Signed-off-by: Alexandre Mergnat --- Alexandre Mergnat (14): dt-bindings: display: mediatek: aal: add binding for MT8365 SoC dt-bindings: display: mediatek: ccorr: add binding for MT8365 SoC dt-bindings: display: mediatek: color: add

[PATCH 01/18] dt-bindings: display: mediatek: aal: add binding for MT8365 SoC

2023-10-23 Thread Alexandre Mergnat
Display Adaptive Ambient Light for MT8365 is compatible with another SoC. Then, add MT8365 binding along with MT8183 SoC. Signed-off-by: Alexandre Mergnat --- Documentation/devicetree/bindings/display/mediatek/mediatek,aal.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation

[PATCH 10/18] dt-bindings: display: mediatek: rdma: add binding for MT8365 SoC

2023-10-23 Thread Alexandre Mergnat
Display Data Path Read DMA for MT8365 is compatible with another SoC. Then, add MT8365 binding along with MT8183 SoC. Signed-off-by: Alexandre Mergnat --- Documentation/devicetree/bindings/display/mediatek/mediatek,rdma.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation

[PATCH 05/18] dt-bindings: display: mediatek: dsi: add binding for MT8365 SoC

2023-10-23 Thread Alexandre Mergnat
Display Serial Interface for MT8365 is compatible with another SoC. Then, add MT8365 binding along with MT8183 SoC. Signed-off-by: Alexandre Mergnat --- Documentation/devicetree/bindings/display/mediatek/mediatek,dsi.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation

[PATCH 11/18] dt-bindings: pwm: add power-domains property

2023-10-23 Thread Alexandre Mergnat
According to the Mediatek datasheet, the display PWM block has a power domain. Signed-off-by: Alexandre Mergnat --- Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml | 8 1 file changed, 8 insertions(+) diff --git a/Documentation/devicetree/bindings/pwm/mediatek,pwm

[PATCH 04/18] dt-bindings: display: mediatek: dither: add binding for MT8365 SoC

2023-10-23 Thread Alexandre Mergnat
Display Dither for MT8365 is compatible with another SoC. Then, add MT8365 binding along with MT8183 SoC. Signed-off-by: Alexandre Mergnat --- Documentation/devicetree/bindings/display/mediatek/mediatek,dither.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree

[PATCH 16/18] arm64: defconfig: enable display connector support

2023-10-23 Thread Alexandre Mergnat
Enable this feature for the i350-evk HDMI connector support. Signed-off-by: Alexandre Mergnat --- arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig index 5315789f4868..0a60e7616abe 100644 --- a/arch/arm64

[PATCH 09/18] dt-bindings: display: mediatek: ovl: add binding for MT8365 SoC

2023-10-23 Thread Alexandre Mergnat
Display Overlay for MT8365 is compatible with another SoC. Then, add MT8365 binding along with MT8192 SoC. Signed-off-by: Alexandre Mergnat --- Documentation/devicetree/bindings/display/mediatek/mediatek,ovl.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree

[PATCH 03/18] dt-bindings: display: mediatek: color: add binding for MT8365 SoC

2023-10-23 Thread Alexandre Mergnat
Display Color for MT8365 is compatible with another SoC. Then, add MT8365 binding along with MT8183 SoC. Signed-off-by: Alexandre Mergnat --- Documentation/devicetree/bindings/display/mediatek/mediatek,color.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree

[PATCH 17/18] arm64: dts: mediatek: add display blocks support for the MT8365 SoC

2023-10-23 Thread Alexandre Mergnat
) Signed-off-by: Alexandre Mergnat --- arch/arm64/boot/dts/mediatek/mt8365.dtsi | 146 +++ 1 file changed, 146 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8365.dtsi b/arch/arm64/boot/dts/mediatek/mt8365.dtsi index 24581f7410aa..6096358f7d07 100644 --- a/arch

[PATCH 08/18] dt-bindings: display: mediatek: gamma: add binding for MT8365 SoC

2023-10-23 Thread Alexandre Mergnat
Display GAMMA for MT8365 is compatible with another SoC. Then, add MT8365 binding along with MT8183 SoC. Signed-off-by: Alexandre Mergnat --- Documentation/devicetree/bindings/display/mediatek/mediatek,gamma.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree

[PATCH 12/18] dt-bindings: pwm: add binding for mt8365 SoC

2023-10-23 Thread Alexandre Mergnat
Display PWM for MT8365 is compatible with MT8183. Then, add MT8365 binding along with MT8183 SoC. Signed-off-by: Alexandre Mergnat --- Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/pwm/mediatek

[PATCH 13/18] drm/mediatek: dsi: Improves the DSI lane setup robustness

2023-10-23 Thread Alexandre Mergnat
. Signed-off-by: Alexandre Mergnat --- drivers/gpu/drm/mediatek/mtk_dsi.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c b/drivers/gpu/drm/mediatek/mtk_dsi.c index d8bfc2cce54d..81cf0ddcc399 100644 --- a/drivers/gpu/drm/mediatek/mtk_dsi.c +++ b/drivers/gpu/drm

[PATCH 02/18] dt-bindings: display: mediatek: ccorr: add binding for MT8365 SoC

2023-10-23 Thread Alexandre Mergnat
Display Color Correction for MT8365 is compatible with another SoC. Then, add MT8365 binding along with MT8183 SoC. Signed-off-by: Alexandre Mergnat --- Documentation/devicetree/bindings/display/mediatek/mediatek,ccorr.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Documentation

[PATCH 18/18] arm64: dts: mediatek: add display support for mt8365-evk

2023-10-23 Thread Alexandre Mergnat
;ite,it66121" HDMI bridge support, driven by I2C1. - Setup the Display Parallel Interface. Signed-off-by: Alexandre Mergnat --- arch/arm64/boot/dts/mediatek/mt8365-evk.dts | 183 1 file changed, 183 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8365-

Re: [PATCH 11/18] dt-bindings: pwm: add power-domains property

2023-10-24 Thread Alexandre Mergnat
Hello Conor On 23/10/2023 19:38, Conor Dooley wrote: Yo, On Mon, Oct 23, 2023 at 04:40:11PM +0200, Alexandre Mergnat wrote: According to the Mediatek datasheet, the display PWM block has a power domain. Datasheet for which soc? The mt8173? Is it valid for all devices in this binding? I

Re: [PATCH 03/18] dt-bindings: display: mediatek: color: add binding for MT8365 SoC

2023-10-24 Thread Alexandre Mergnat
On 24/10/2023 11:40, Chen-Yu Tsai wrote: On Mon, Oct 23, 2023 at 10:40 PM Alexandre Mergnat wrote: Display Color for MT8365 is compatible with another SoC. Then, add MT8365 binding along with MT8183 SoC. This unfortunately doesn't match what the patch is doing. Yeah, I fixed it f

Re: [PATCH 05/18] dt-bindings: display: mediatek: dsi: add binding for MT8365 SoC

2023-10-25 Thread Alexandre Mergnat
On 24/10/2023 22:30, Rob Herring wrote: On Mon, Oct 23, 2023 at 04:40:05PM +0200, Alexandre Mergnat wrote: Display Serial Interface for MT8365 is compatible with another SoC. Then, add MT8365 binding along with MT8183 SoC. Signed-off-by: Alexandre Mergnat --- Documentation/devicetree

Re: [PATCH v6 12/16] ASoC: codecs: add MT6357 support

2024-07-19 Thread Alexandre Mergnat
On 21/06/2024 14:44, Mark Brown wrote: On Wed, Jun 19, 2024 at 04:46:48PM +0200, amerg...@baylibre.com wrote: + /* gain default values*/ + regmap_update_bits(priv->regmap, MT6357_AUDENC_ANA_CON0, MT6357_AUDPREAMPLGAIN_MASK, + UL_GAIN_0DB << MT6357_AUDPRE

[PATCH v7 01/16] ASoC: dt-bindings: mediatek,mt8365-afe: Add audio afe document

2024-07-21 Thread Alexandre Mergnat
Add MT8365 audio front-end bindings Reviewed-by: Krzysztof Kozlowski Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Alexandre Mergnat --- .../bindings/sound/mediatek,mt8365-afe.yaml| 130 + 1 file changed, 130 insertions(+) diff --git a/Documentation

[PATCH v7 02/16] ASoC: dt-bindings: mediatek,mt8365-mt6357: Add audio sound card document

2024-07-21 Thread Alexandre Mergnat
Add soundcard bindings for the MT8365 SoC with the MT6357 audio codec. Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Krzysztof Kozlowski Signed-off-by: Alexandre Mergnat --- .../bindings/sound/mediatek,mt8365-mt6357.yaml | 107 + 1 file changed, 107 insertions

[PATCH v7 00/16] Add audio support for the MediaTek Genio 350-evk board

2024-07-21 Thread Alexandre Mergnat
mits/sound/for-next/add-i350-audio-support Signed-off-by: Alexandre Mergnat --- Changes in v7: - Rebase to "sound/for-6.11" branch. - Move audio-codec properties to the parent node - Remove gain values change at init to keep HW default values. - Remove spurious function by inlining

[PATCH v7 04/16] ASoC: mediatek: mt8365: Add common header

2024-07-21 Thread Alexandre Mergnat
Add header files for register definition and structure. Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Alexandre Mergnat --- sound/soc/mediatek/mt8365/mt8365-afe-common.h | 449 sound/soc/mediatek/mt8365/mt8365-reg.h| 991 ++ 2 files

[PATCH v7 05/16] ASoC: mediatek: mt8365: Add audio clock control support

2024-07-21 Thread Alexandre Mergnat
Add audio clock wrapper and audio tuner control. Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Alexandre Mergnat --- sound/soc/mediatek/mt8365/mt8365-afe-clk.c | 421 + sound/soc/mediatek/mt8365/mt8365-afe-clk.h | 32 +++ 2 files changed, 453 insertions

[PATCH v7 03/16] dt-bindings: mfd: mediatek: Add codec property for MT6357 PMIC

2024-07-21 Thread Alexandre Mergnat
sub-device. Signed-off-by: Alexandre Mergnat --- .../devicetree/bindings/mfd/mediatek,mt6357.yaml| 21 + 1 file changed, 21 insertions(+) diff --git a/Documentation/devicetree/bindings/mfd/mediatek,mt6357.yaml b/Documentation/devicetree/bindings/mfd/mediatek,mt6357.yaml

[PATCH v7 08/16] ASoC: mediatek: mt8365: Add DMIC DAI support

2024-07-21 Thread Alexandre Mergnat
Add Digital Micro Device Audio Interface support for MT8365 SoC. Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Alexandre Mergnat --- sound/soc/mediatek/mt8365/mt8365-dai-dmic.c | 340 1 file changed, 340 insertions(+) diff --git a/sound/soc/mediatek

[PATCH v7 06/16] ASoC: mediatek: mt8365: Add I2S DAI support

2024-07-21 Thread Alexandre Mergnat
Add I2S Device Audio Interface support for MT8365 SoC. Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Alexandre Mergnat --- sound/soc/mediatek/mt8365/mt8365-dai-i2s.c | 850 + 1 file changed, 850 insertions(+) diff --git a/sound/soc/mediatek/mt8365/mt8365

[PATCH v7 11/16] ASoC: mediatek: mt8365: Add the AFE driver support

2024-07-21 Thread Alexandre Mergnat
Add a driver for the Audio Front End (AFE) PCM to provide Audio Uplink (UL) and Downlink (DL) paths. Use the ALSA SoC Dynamic Audio Power Management to add widget and kcontrol supports. Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Alexandre Mergnat --- sound/soc/mediatek/mt8365

[PATCH v7 09/16] ASoC: mediatek: mt8365: Add PCM DAI support

2024-07-21 Thread Alexandre Mergnat
Add Pulse Code Modulation Device Audio Interface support for MT8365 SoC. Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Alexandre Mergnat --- sound/soc/mediatek/mt8365/mt8365-dai-pcm.c | 293 + 1 file changed, 293 insertions(+) diff --git a/sound/soc

[PATCH v7 13/16] ASoC: mediatek: Add MT8365 support

2024-07-21 Thread Alexandre Mergnat
- Add specific config to enable: - MT8365 sound support - MT6357 audio codec support - Add the mt8365 directory and all drivers under it. Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Alexandre Mergnat --- sound/soc/mediatek/Kconfig | 20 sound/soc

[PATCH v7 07/16] ASoC: mediatek: mt8365: Add ADDA DAI support

2024-07-21 Thread Alexandre Mergnat
Add ADDA Device Audio Interface support for MT8365 SoC. Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Alexandre Mergnat --- sound/soc/mediatek/mt8365/mt8365-dai-adda.c | 311 1 file changed, 311 insertions(+) diff --git a/sound/soc/mediatek/mt8365/mt8365

[PATCH v7 15/16] arm64: dts: mediatek: add afe support for mt8365 SoC

2024-07-21 Thread Alexandre Mergnat
Add audio front end support of MT8365 SoC. Update the file header. Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Alexandre Mergnat --- arch/arm64/boot/dts/mediatek/mt8365.dtsi | 43 ++-- 1 file changed, 41 insertions(+), 2 deletions(-) diff --git a/arch

[PATCH v7 14/16] arm64: defconfig: enable mt8365 sound

2024-07-21 Thread Alexandre Mergnat
Enable the MediaTek MT8365-EVK sound support. The audio feature is handled by the MT8365 SoC and the MT6357 PMIC codec audio. Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Alexandre Mergnat --- arch/arm64/configs/defconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch

[PATCH v7 16/16] arm64: dts: mediatek: add audio support for mt8365-evk

2024-07-21 Thread Alexandre Mergnat
Add the sound node which is linked to the MT8365 SoC AFE and the MT6357 audio codec. Update the file header. Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Alexandre Mergnat --- arch/arm64/boot/dts/mediatek/mt8365-evk.dts | 86 + 1 file changed, 86

Re: [PATCH v7 00/16] Add audio support for the MediaTek Genio 350-evk board

2024-08-14 Thread Alexandre Mergnat
Hi guys ! Simple gentle ping, the serie seems ready to be applied. Thanks -- Regards, Alexandre

[PATCH 01/18] ASoC: dt-bindings: mediatek,mt8365-afe: Add audio afe document

2024-02-26 Thread Alexandre Mergnat
Add MT8365 audio front-end bindings Signed-off-by: Alexandre Mergnat --- .../bindings/sound/mediatek,mt8365-afe.yaml| 164 + 1 file changed, 164 insertions(+) diff --git a/Documentation/devicetree/bindings/sound/mediatek,mt8365-afe.yaml b/Documentation/devicetree

[PATCH 00/18] Add audio support for the MediaTek Genio 350-evk board

2024-02-26 Thread Alexandre Mergnat
Analogic Microphone) Of course, HDMI playback need the MT8365 display patches [1] and a DTS change documented in "mediatek,mt8365-mt6357.yaml". [1]: https://lore.kernel.org/all/20231023-display-support-v1-0-5c860ed5c...@baylibre.com/ Signed-off-by: Alexandre Mergnat --- Alexandre M

[PATCH 06/18] ASoC: mediatek: mt8365: Add I2S DAI support

2024-02-26 Thread Alexandre Mergnat
Add I2S Device Audio Interface support for MT8365 SoC. Signed-off-by: Alexandre Mergnat --- sound/soc/mediatek/mt8365/mt8365-dai-i2s.c | 901 + 1 file changed, 901 insertions(+) diff --git a/sound/soc/mediatek/mt8365/mt8365-dai-i2s.c b/sound/soc/mediatek/mt8365

[PATCH 05/18] SoC: mediatek: mt8365: support audio clock control

2024-02-26 Thread Alexandre Mergnat
Add audio clock wrapper and audio tuner control. Signed-off-by: Alexandre Mergnat --- sound/soc/mediatek/mt8365/mt8365-afe-clk.c | 455 + sound/soc/mediatek/mt8365/mt8365-afe-clk.h | 55 2 files changed, 510 insertions(+) diff --git a/sound/soc/mediatek/mt8365

[PATCH 11/18] ASoC: mediatek: mt8365: Add platform driver

2024-02-26 Thread Alexandre Mergnat
Add mt8365 platform driver. Signed-off-by: Alexandre Mergnat --- sound/soc/mediatek/mt8365/mt8365-afe-pcm.c | 2347 1 file changed, 2347 insertions(+) diff --git a/sound/soc/mediatek/mt8365/mt8365-afe-pcm.c b/sound/soc/mediatek/mt8365/mt8365-afe-pcm.c new file

[PATCH 04/18] ASoC: mediatek: mt8365: Add common header

2024-02-26 Thread Alexandre Mergnat
Add header files for register definition and structure. Signed-off-by: Alexandre Mergnat --- sound/soc/mediatek/mt8365/mt8365-afe-common.h | 495 + sound/soc/mediatek/mt8365/mt8365-reg.h| 987 ++ 2 files changed, 1482 insertions(+) diff --git a/sound

[PATCH 07/18] ASoC: mediatek: mt8365: Add ADDA DAI support

2024-02-26 Thread Alexandre Mergnat
Add ADDA Device Audio Interface support for MT8365 SoC. Signed-off-by: Alexandre Mergnat --- sound/soc/mediatek/mt8365/mt8365-dai-adda.c | 355 1 file changed, 355 insertions(+) diff --git a/sound/soc/mediatek/mt8365/mt8365-dai-adda.c b/sound/soc/mediatek/mt8365

[PATCH 08/18] ASoC: mediatek: mt8365: Add DMIC DAI support

2024-02-26 Thread Alexandre Mergnat
Add Digital Micro Device Audio Interface support for MT8365 SoC. Signed-off-by: Alexandre Mergnat --- sound/soc/mediatek/mt8365/mt8365-dai-dmic.c | 475 1 file changed, 475 insertions(+) diff --git a/sound/soc/mediatek/mt8365/mt8365-dai-dmic.c b/sound/soc/mediatek

[PATCH 02/18] ASoC: dt-bindings: mediatek,mt8365-mt6357: Add audio sound card document

2024-02-26 Thread Alexandre Mergnat
Add soundcard bindings for the MT8365 SoC with the MT6357 audio codec. Signed-off-by: Alexandre Mergnat --- .../bindings/sound/mediatek,mt8365-mt6357.yaml | 127 + 1 file changed, 127 insertions(+) diff --git a/Documentation/devicetree/bindings/sound/mediatek,mt8365

[PATCH 14/18] ASoC: mediatek: Add MT8365 support

2024-02-26 Thread Alexandre Mergnat
- Add specific config to enable: - MT8365 sound support - MT6357 audio codec support - Add the mt8365 directory and all drivers under it. Signed-off-by: Alexandre Mergnat --- sound/soc/mediatek/Kconfig | 20 sound/soc/mediatek/Makefile| 1 + sound/soc

[PATCH 17/18] arm64: dts: mediatek: add afe support for mt8365 SoC

2024-02-26 Thread Alexandre Mergnat
Add audio front end support of MT8365 SoC. Update the file header. Signed-off-by: Alexandre Mergnat --- arch/arm64/boot/dts/mediatek/mt8365.dtsi | 47 ++-- 1 file changed, 44 insertions(+), 3 deletions(-) diff --git a/arch/arm64/boot/dts/mediatek/mt8365.dtsi b/arch

[PATCH 18/18] arm64: dts: mediatek: add audio support for mt8365-evk

2024-02-26 Thread Alexandre Mergnat
Add the sound node which is linked to the MT8365 SoC AFE and the MT6357 audio codec. Update the file header. Signed-off-by: Alexandre Mergnat --- arch/arm64/boot/dts/mediatek/mt8365-evk.dts | 95 +++-- 1 file changed, 91 insertions(+), 4 deletions(-) diff --git a/arch

[PATCH 03/18] dt-bindings: mfd: mediatek: Add codec property for MT6357 PMIC

2024-02-26 Thread Alexandre Mergnat
Add the codec property along with the mt6357.c codec driver support. Signed-off-by: Alexandre Mergnat --- Documentation/devicetree/bindings/mfd/mediatek,mt6357.yaml | 11 +++ 1 file changed, 11 insertions(+) diff --git a/Documentation/devicetree/bindings/mfd/mediatek,mt6357.yaml b

[PATCH 09/18] ASoC: mediatek: mt8365: Add PCM DAI support

2024-02-26 Thread Alexandre Mergnat
Add Pulse Code Modulation Device Audio Interface support for MT8365 SoC. Signed-off-by: Alexandre Mergnat --- sound/soc/mediatek/mt8365/mt8365-dai-pcm.c | 298 + 1 file changed, 298 insertions(+) diff --git a/sound/soc/mediatek/mt8365/mt8365-dai-pcm.c b/sound/soc

[PATCH 15/18] arm64: defconfig: enable mt8365 sound

2024-02-26 Thread Alexandre Mergnat
Enable the MediaTek MT8365-EVK sound support. The audio feature is handled by the MT8365 SoC and the MT6357 PMIC codec audio. Signed-off-by: Alexandre Mergnat --- arch/arm64/configs/defconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm64/configs/defconfig b/arch/arm64

[PATCH 16/18] arm64: dts: mediatek: add mt6357 audio codec support

2024-02-26 Thread Alexandre Mergnat
Add audio codec support of MT6357 PMIC. Update the file header. Signed-off-by: Alexandre Mergnat --- arch/arm64/boot/dts/mediatek/mt6357.dtsi | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/mediatek/mt6357.dtsi b/arch/arm64/boot/dts/mediatek/mt6357

Re: [PATCH 02/18] ASoC: dt-bindings: mediatek,mt8365-mt6357: Add audio sound card document

2024-02-27 Thread Alexandre Mergnat
On 26/02/2024 16:30, AngeloGioacchino Del Regno wrote: Il 26/02/24 15:01, Alexandre Mergnat ha scritto: Add soundcard bindings for the MT8365 SoC with the MT6357 audio codec. Signed-off-by: Alexandre Mergnat ---   .../bindings/sound/mediatek,mt8365-mt6357.yaml | 127

Re: [PATCH 01/18] ASoC: dt-bindings: mediatek,mt8365-afe: Add audio afe document

2024-02-27 Thread Alexandre Mergnat
On 27/02/2024 10:01, Krzysztof Kozlowski wrote: On 26/02/2024 15:01, Alexandre Mergnat wrote: Add MT8365 audio front-end bindings Signed-off-by: Alexandre Mergnat --- .../bindings/sound/mediatek,mt8365-afe.yaml| 164 + 1 file changed, 164 insertions(+) diff

Re: [PATCH 02/18] ASoC: dt-bindings: mediatek,mt8365-mt6357: Add audio sound card document

2024-02-28 Thread Alexandre Mergnat
On 27/02/2024 13:38, AngeloGioacchino Del Regno wrote: Il 27/02/24 11:23, Alexandre Mergnat ha scritto: On 26/02/2024 16:30, AngeloGioacchino Del Regno wrote: Il 26/02/24 15:01, Alexandre Mergnat ha scritto: Add soundcard bindings for the MT8365 SoC with the MT6357 audio codec. Signed

Re: [PATCH 01/18] ASoC: dt-bindings: mediatek,mt8365-afe: Add audio afe document

2024-02-28 Thread Alexandre Mergnat
onfig because the driver implement its usage like a one-time-setup -_-' Thanks for the explanations, that help. Regards, Alexandre On 28/02/2024 08:28, Krzysztof Kozlowski wrote: On 27/02/2024 16:18, Alexandre Mergnat wrote: +type: boolean + + mediatek,dmic-iir-on: +d

Re: [PATCH 01/18] ASoC: dt-bindings: mediatek,mt8365-afe: Add audio afe document

2024-02-28 Thread Alexandre Mergnat
On 28/02/2024 11:25, AngeloGioacchino Del Regno wrote: Il 28/02/24 10:57, Alexandre Mergnat ha scritto: I think I got it. - mediatek,i2s-shared-clock: will be remove from DT - mediatek,dmic-iir-on: will be remove from DT - mediatek,dmic-irr-mode: will be remove from DT - mediatek,dmic-two

Re: [PATCH v4 1/9] drm/mediatek: dsi: Use GENMASK() for register mask definitions

2024-02-06 Thread Alexandre Mergnat
On 06/02/2024 13:07, AngeloGioacchino Del Regno wrote: Change magic numerical masks with usage of the GENMASK() macro to improve readability. While at it, also fix the DSI_PS_SEL mask to include all bits instead of just a subset of them. This commit brings no functional changes. Signed-off-

Re: [PATCH v4 2/9] drm/mediatek: dsi: Fix DSI RGB666 formats and definitions

2024-02-06 Thread Alexandre Mergnat
Reviewed-by: Alexandre Mergnat On 06/02/2024 13:07, AngeloGioacchino Del Regno wrote: The register bits definitions for RGB666 formats are wrong in multiple ways: first, in the DSI_PS_SEL bits region, the Packed 18-bits RGB666 format is selected with bit 1, while the Loosely Packed one is bit

Re: [PATCH v4 3/9] drm/mediatek: dsi: Cleanup functions mtk_dsi_ps_control{_vact}()

2024-02-06 Thread Alexandre Mergnat
Reviewed-by: Alexandre Mergnat On 06/02/2024 13:07, AngeloGioacchino Del Regno wrote: Function mtk_dsi_ps_control() is a subset of mtk_dsi_ps_control_vact(): merge the two in one mtk_dsi_ps_control() function by adding one function parameter `config_vact` which, when true, writes the VACT

Re: [PATCH v4 4/9] drm/mediatek: dsi: Use bitfield macros where useful

2024-02-06 Thread Alexandre Mergnat
Reviewed-by: Alexandre Mergnat On 06/02/2024 13:07, AngeloGioacchino Del Regno wrote: Instead of open coding bitshifting for various register fields, use the bitfield macro FIELD_PREP(): this allows to enhance the human readability, decrease likeliness of mistakes (and register field

Re: [PATCH v4 5/9] drm/mediatek: dsi: Replace open-coded instance of HZ_PER_MHZ

2024-02-06 Thread Alexandre Mergnat
Reviewed-by: Alexandre Mergnat On 06/02/2024 13:07, AngeloGioacchino Del Regno wrote: In mtk_dsi_phy_timconfig(), we're dividing the `data_rate` variable, expressed in Hz to retrieve a value in MHz: instead of open-coding, use the HZ_PER_MHZ definition, available in linux/units.h. -- Re

Re: [PATCH v4 6/9] drm/mediatek: dsi: Register DSI host after acquiring clocks and PHY

2024-02-06 Thread Alexandre Mergnat
e(s) and clocks before even initializing those is too fragile. Register the DSI host after getting clocks, iospace and PHY. This wil also allow to simplify the error paths in a later commit. wil => will Reviewed-by: Alexandre Mergnat -- Regards, Alexandre

Re: [PATCH v4 7/9] drm/mediatek: dsi: Simplify with dev_err_probe and remove gotos

2024-02-06 Thread Alexandre Mergnat
Reviewed-by: Alexandre Mergnat On 06/02/2024 13:07, AngeloGioacchino Del Regno wrote: Most of the functions that are called in the probe callback are devm managed, or all but mipi_dsi_host_register(): simplify the probe function's error paths with dev_err_probe() and remove the lonely ins

Re: [PATCH v4 8/9] drm/mediatek: dsi: Compress of_device_id entries and add sentinel

2024-02-06 Thread Alexandre Mergnat
Reviewed-by: Alexandre Mergnat On 06/02/2024 13:07, AngeloGioacchino Del Regno wrote: All entries fit in 82 columns, which is acceptable: compress all of the mtk_dsi_of_match[] entries to a single line for each. While at it, also add the usual sentinel comment to the last entry. -- Regards

Re: [PATCH v4 9/9] drm/mediatek: dsi: Use mipi_dsi_pixel_format_to_bpp() helper function

2024-02-06 Thread Alexandre Mergnat
Reviewed-by: Alexandre Mergnat On 06/02/2024 13:07, AngeloGioacchino Del Regno wrote: Instead of open coding, use the mipi_dsi_pixel_format_to_bpp() helper function from drm_mipi_dsi.h in mtk_dsi_poweron() and for validation in mtk_dsi_bridge_mode_valid(). Note that this function changes the

Re: [PATCH v4 1/9] drm/mediatek: dsi: Use GENMASK() for register mask definitions

2024-02-07 Thread Alexandre Mergnat
0 => GENMASK(17, 16) Alexandre, the reason for that is in the commit description :-P "While at it, also fix the DSI_PS_SEL mask to include all bits instead of just a subset of them." Oh sorry... Reviewed-by: Alexandre Mergnat -- Regards, Alexandre

Re: [PATCH v2 0/3] drm/mediatek: Add support for OF graphs

2024-05-14 Thread Alexandre Mergnat
Hi Angelo, Gentle ping because I'm stuck if I rebase my serie on top of yours. On 02/05/2024 18:53, Alexandre Mergnat wrote: On 30/04/2024 13:33, AngeloGioacchino Del Regno wrote: Il 30/04/24 12:17, Alexandre Mergnat ha scritto: Hi Angelo, On 09/04/2024 14:02, AngeloGioacchino Del

Re: [PATCH v4 2/3] dt-bindings: arm: mediatek: mmsys: Add OF graph support for board path

2024-05-19 Thread Alexandre Mergnat
Hi Angelo, On 16/05/2024 10:11, AngeloGioacchino Del Regno wrote: +oneOf: + - required: + - endpoint@0 + - required: + - endpoint@1 + - required: + - endpoint@2 I'm not sure this is what you expect because I must remove this part to pass the dt-va

Re: [PATCH v4 2/3] dt-bindings: arm: mediatek: mmsys: Add OF graph support for board path

2024-05-20 Thread Alexandre Mergnat
On 20/05/2024 12:53, AngeloGioacchino Del Regno wrote: So, I don't know how you want to manage multiple display, but IMHO there are 2 ways: - removing the current "oneOf". ...eh I think this should be anyOf instead :-) I'll check later and send a v5. "anyOf" behavior works as expected on

Re: [PATCH v4 2/3] dt-bindings: arm: mediatek: mmsys: Add OF graph support for board path

2024-05-20 Thread Alexandre Mergnat
On 20/05/2024 13:55, AngeloGioacchino Del Regno wrote: Il 20/05/24 13:49, Alexandre Mergnat ha scritto: On 20/05/2024 12:53, AngeloGioacchino Del Regno wrote: So, I don't know how you want to manage multiple display, but IMHO there are 2 ways: - removing the current "oneOf&q

Re: [PATCH v4 1/3] dt-bindings: display: mediatek: Add OF graph support for board path

2024-05-20 Thread Alexandre Mergnat
Reviewed-by: Alexandre Mergnat Tested-by: Alexandre Mergnat On 16/05/2024 10:11, AngeloGioacchino Del Regno wrote: The display IPs in MediaTek SoCs support being interconnected with different instances of DDP IPs (for example, merge0 or merge1) and/or with different DDP IPs (for example, rdma

Re: [PATCH v4 3/3] drm/mediatek: Implement OF graphs support for display paths

2024-05-20 Thread Alexandre Mergnat
Reviewed-by: Alexandre Mergnat Tested-by: Alexandre Mergnat On 16/05/2024 10:11, AngeloGioacchino Del Regno wrote: It is impossible to add each and every possible DDP path combination for each and every possible combination of SoC and board: right now, this driver hardcodes configuration for

Re: [PATCH v4 07/16] ASoC: mediatek: mt8365: Add ADDA DAI support

2024-05-22 Thread Alexandre Mergnat
On 20/05/2024 12:27, AngeloGioacchino Del Regno wrote: +int mt8365_dai_disable_adda_on(struct mtk_base_afe *afe) +{ +    unsigned long flags; +    struct mt8365_afe_private *afe_priv = afe->platform_priv; + +    spin_lock_irqsave(&afe_priv->afe_ctrl_lock, flags); + +    adda_afe_on_ref_cnt--;

[PATCH v5 00/16] Add audio support for the MediaTek Genio 350-evk board

2024-05-23 Thread Alexandre Mergnat
mits/sound/for-next/add-i350-audio-support Signed-off-by: Alexandre Mergnat --- Changes in v5: - Rebase to "next-20240523" branch. - bindings: power supply property moved to the parent node - Replace "SoC" by "ASoC" in the patch title (5/16) - Move and rename DAI I2S&

[PATCH v5 03/16] dt-bindings: mfd: mediatek: Add codec property for MT6357 PMIC

2024-05-23 Thread Alexandre Mergnat
sub-device. Signed-off-by: Alexandre Mergnat --- .../devicetree/bindings/mfd/mediatek,mt6357.yaml | 33 ++ 1 file changed, 33 insertions(+) diff --git a/Documentation/devicetree/bindings/mfd/mediatek,mt6357.yaml b/Documentation/devicetree/bindings/mfd/mediatek,mt6357.yaml

[PATCH v5 05/16] ASoC: mediatek: mt8365: Add audio clock control support

2024-05-23 Thread Alexandre Mergnat
Add audio clock wrapper and audio tuner control. Signed-off-by: Alexandre Mergnat --- sound/soc/mediatek/mt8365/mt8365-afe-clk.c | 429 + sound/soc/mediatek/mt8365/mt8365-afe-clk.h | 32 +++ 2 files changed, 461 insertions(+) diff --git a/sound/soc/mediatek/mt8365

[PATCH v5 01/16] ASoC: dt-bindings: mediatek,mt8365-afe: Add audio afe document

2024-05-23 Thread Alexandre Mergnat
Add MT8365 audio front-end bindings Reviewed-by: Krzysztof Kozlowski Signed-off-by: Alexandre Mergnat --- .../bindings/sound/mediatek,mt8365-afe.yaml| 130 + 1 file changed, 130 insertions(+) diff --git a/Documentation/devicetree/bindings/sound/mediatek,mt8365

[PATCH v5 02/16] ASoC: dt-bindings: mediatek,mt8365-mt6357: Add audio sound card document

2024-05-23 Thread Alexandre Mergnat
Add soundcard bindings for the MT8365 SoC with the MT6357 audio codec. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Alexandre Mergnat --- .../bindings/sound/mediatek,mt8365-mt6357.yaml | 107 + 1 file changed, 107 insertions(+) diff --git a/Documentation/devicetree

[PATCH v5 07/16] ASoC: mediatek: mt8365: Add ADDA DAI support

2024-05-23 Thread Alexandre Mergnat
Add ADDA Device Audio Interface support for MT8365 SoC. Signed-off-by: Alexandre Mergnat --- sound/soc/mediatek/mt8365/mt8365-dai-adda.c | 311 1 file changed, 311 insertions(+) diff --git a/sound/soc/mediatek/mt8365/mt8365-dai-adda.c b/sound/soc/mediatek/mt8365

[PATCH v5 06/16] ASoC: mediatek: mt8365: Add I2S DAI support

2024-05-23 Thread Alexandre Mergnat
Add I2S Device Audio Interface support for MT8365 SoC. Signed-off-by: Alexandre Mergnat --- sound/soc/mediatek/mt8365/mt8365-dai-i2s.c | 850 + 1 file changed, 850 insertions(+) diff --git a/sound/soc/mediatek/mt8365/mt8365-dai-i2s.c b/sound/soc/mediatek/mt8365

[PATCH v5 08/16] ASoC: mediatek: mt8365: Add DMIC DAI support

2024-05-23 Thread Alexandre Mergnat
Add Digital Micro Device Audio Interface support for MT8365 SoC. Signed-off-by: Alexandre Mergnat --- sound/soc/mediatek/mt8365/mt8365-dai-dmic.c | 340 1 file changed, 340 insertions(+) diff --git a/sound/soc/mediatek/mt8365/mt8365-dai-dmic.c b/sound/soc/mediatek

[PATCH v5 04/16] ASoC: mediatek: mt8365: Add common header

2024-05-23 Thread Alexandre Mergnat
Add header files for register definition and structure. Signed-off-by: Alexandre Mergnat --- sound/soc/mediatek/mt8365/mt8365-afe-common.h | 491 + sound/soc/mediatek/mt8365/mt8365-reg.h| 991 ++ 2 files changed, 1482 insertions(+) diff --git a/sound

[PATCH v5 11/16] ASoC: mediatek: mt8365: Add the AFE driver support

2024-05-23 Thread Alexandre Mergnat
Add a driver for the Audio Front End (AFE) PCM to provide Audio Uplink (UL) and Downlink (DL) paths. Use the ALSA SoC Dynamic Audio Power Management to add widget and kcontrol supports. Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Alexandre Mergnat --- sound/soc/mediatek/mt8365

[PATCH v5 14/16] arm64: defconfig: enable mt8365 sound

2024-05-23 Thread Alexandre Mergnat
Enable the MediaTek MT8365-EVK sound support. The audio feature is handled by the MT8365 SoC and the MT6357 PMIC codec audio. Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Alexandre Mergnat --- arch/arm64/configs/defconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch

[PATCH v5 13/16] ASoC: mediatek: Add MT8365 support

2024-05-23 Thread Alexandre Mergnat
- Add specific config to enable: - MT8365 sound support - MT6357 audio codec support - Add the mt8365 directory and all drivers under it. Signed-off-by: Alexandre Mergnat --- sound/soc/mediatek/Kconfig | 20 sound/soc/mediatek/Makefile| 1 + sound/soc

[PATCH v5 15/16] arm64: dts: mediatek: add afe support for mt8365 SoC

2024-05-23 Thread Alexandre Mergnat
Add audio front end support of MT8365 SoC. Update the file header. Signed-off-by: Alexandre Mergnat --- arch/arm64/boot/dts/mediatek/mt8365.dtsi | 43 ++-- 1 file changed, 41 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/mediatek/mt8365.dtsi b/arch

[PATCH v5 09/16] ASoC: mediatek: mt8365: Add PCM DAI support

2024-05-23 Thread Alexandre Mergnat
Add Pulse Code Modulation Device Audio Interface support for MT8365 SoC. Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Alexandre Mergnat --- sound/soc/mediatek/mt8365/mt8365-dai-pcm.c | 293 + 1 file changed, 293 insertions(+) diff --git a/sound/soc

[PATCH v5 16/16] arm64: dts: mediatek: add audio support for mt8365-evk

2024-05-23 Thread Alexandre Mergnat
Add the sound node which is linked to the MT8365 SoC AFE and the MT6357 audio codec. Update the file header. Signed-off-by: Alexandre Mergnat --- arch/arm64/boot/dts/mediatek/mt8365-evk.dts | 89 + 1 file changed, 89 insertions(+) diff --git a/arch/arm64/boot/dts

[PATCH v4 00/15] Add display support for the MT8365-EVK board

2024-05-23 Thread Alexandre Mergnat
drivers are also improved. The series is rebased on top of Angelo's series [1] to use the OF graphs support. Regards, Alex Signed-off-by: Alexandre Mergnat --- Changes in v4: - Rebase to "next-20240523" branch. - Patch merged, then removed from the series: - dt-bindings: di

[PATCH v4 01/15] dt-bindings: display: mediatek: aal: add compatible for MT8365 SoC

2024-05-23 Thread Alexandre Mergnat
Document the display Adaptive Ambient Light on MT8365, which is compatible with that of the MT8183. Reviewed-by: AngeloGioacchino Del Regno Acked-by: Rob Herring (Arm) Signed-off-by: Alexandre Mergnat --- Documentation/devicetree/bindings/display/mediatek/mediatek,aal.yaml | 1 + 1 file

[PATCH v4 03/15] dt-bindings: display: mediatek: color: add compatible for MT8365 SoC

2024-05-23 Thread Alexandre Mergnat
Document the display Color on MT8365, which is compatible with that of the MT8173. Acked-by: Rob Herring (Arm) Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Alexandre Mergnat --- Documentation/devicetree/bindings/display/mediatek/mediatek,color.yaml | 1 + 1 file changed, 1

[PATCH v4 02/15] dt-bindings: display: mediatek: ccorr: add compatible for MT8365 SoC

2024-05-23 Thread Alexandre Mergnat
Document the display Color Correction on MT8365, which is compatible with that of the MT8183. Acked-by: Rob Herring (Arm) Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Alexandre Mergnat --- Documentation/devicetree/bindings/display/mediatek/mediatek,ccorr.yaml | 3 +++ 1 file

<    1   2   3   4   >