* [PATCH 1/2] arm64: dts: imx8mn-beacon: Migrate sound card to simple-audio-card
@ 2023-05-21 23:10 Adam Ford
2023-05-21 23:10 ` [PATCH 2/2] arm64: dts: imx8mn-beacon: Fix SPI CS pinmux Adam Ford
2023-05-27 12:32 ` [PATCH 1/2] arm64: dts: imx8mn-beacon: Migrate sound card to simple-audio-card Shawn Guo
0 siblings, 2 replies; 3+ messages in thread
From: Adam Ford @ 2023-05-21 23:10 UTC (permalink / raw)
To: linux-arm-kernel
Cc: aford, Adam Ford, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Shawn Guo, Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
NXP Linux Team, devicetree, linux-kernel
Instead of using a custom glue layer connecting the wm8962 CODEC
to the SAI3 sound-dai, migrate the sound card to simple-audio-card.
Signed-off-by: Adam Ford <aford173@gmail.com>
diff --git a/arch/arm64/boot/dts/freescale/imx8mn.dtsi b/arch/arm64/boot/dts/freescale/imx8mn.dtsi
index bd84db550053..8be8f090e8b8 100644
--- a/arch/arm64/boot/dts/freescale/imx8mn.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mn.dtsi
@@ -1069,13 +1069,6 @@ lcdif: lcdif@32e00000 {
<&clk IMX8MN_CLK_DISP_APB_ROOT>,
<&clk IMX8MN_CLK_DISP_AXI_ROOT>;
clock-names = "pix", "axi", "disp_axi";
- assigned-clocks = <&clk IMX8MN_CLK_DISP_PIXEL_ROOT>,
- <&clk IMX8MN_CLK_DISP_AXI>,
- <&clk IMX8MN_CLK_DISP_APB>;
- assigned-clock-parents = <&clk IMX8MN_CLK_DISP_PIXEL>,
- <&clk IMX8MN_SYS_PLL2_1000M>,
- <&clk IMX8MN_SYS_PLL1_800M>;
- assigned-clock-rates = <594000000>, <500000000>, <200000000>;
interrupts = <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>;
power-domains = <&disp_blk_ctrl IMX8MN_DISPBLK_PD_LCDIF>;
status = "disabled";
@@ -1093,12 +1086,6 @@ mipi_dsi: dsi@32e10000 {
clocks = <&clk IMX8MN_CLK_DSI_CORE>,
<&clk IMX8MN_CLK_DSI_PHY_REF>;
clock-names = "bus_clk", "sclk_mipi";
- assigned-clocks = <&clk IMX8MN_CLK_DSI_CORE>,
- <&clk IMX8MN_CLK_DSI_PHY_REF>;
- assigned-clock-parents = <&clk IMX8MN_SYS_PLL1_266M>,
- <&clk IMX8MN_CLK_24M>;
- assigned-clock-rates = <266000000>, <24000000>;
- samsung,pll-clock-frequency = <24000000>;
interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>;
power-domains = <&disp_blk_ctrl IMX8MN_DISPBLK_PD_MIPI_DSI>;
status = "disabled";
@@ -1142,6 +1129,21 @@ disp_blk_ctrl: blk-ctrl@32e28000 {
"lcdif-axi", "lcdif-apb", "lcdif-pix",
"dsi-pclk", "dsi-ref",
"csi-aclk", "csi-pclk";
+ assigned-clocks = <&clk IMX8MN_CLK_DSI_CORE>,
+ <&clk IMX8MN_CLK_DSI_PHY_REF>,
+ <&clk IMX8MN_CLK_DISP_PIXEL>,
+ <&clk IMX8MN_CLK_DISP_AXI>,
+ <&clk IMX8MN_CLK_DISP_APB>;
+ assigned-clock-parents = <&clk IMX8MN_SYS_PLL1_266M>,
+ <&clk IMX8MN_CLK_24M>,
+ <&clk IMX8MN_VIDEO_PLL1_OUT>,
+ <&clk IMX8MN_SYS_PLL2_1000M>,
+ <&clk IMX8MN_SYS_PLL1_800M>;
+ assigned-clock-rates = <266000000>,
+ <24000000>,
+ <594000000>,
+ <500000000>,
+ <200000000>;
#power-domain-cells = <1>;
};
--
2.39.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] 3+ messages in thread
* [PATCH 2/2] arm64: dts: imx8mn-beacon: Fix SPI CS pinmux
2023-05-21 23:10 [PATCH 1/2] arm64: dts: imx8mn-beacon: Migrate sound card to simple-audio-card Adam Ford
@ 2023-05-21 23:10 ` Adam Ford
2023-05-27 12:32 ` [PATCH 1/2] arm64: dts: imx8mn-beacon: Migrate sound card to simple-audio-card Shawn Guo
1 sibling, 0 replies; 3+ messages in thread
From: Adam Ford @ 2023-05-21 23:10 UTC (permalink / raw)
To: linux-arm-kernel
Cc: aford, Adam Ford, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Shawn Guo, Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
NXP Linux Team, devicetree, linux-kernel
The final production baseboard had a different chip select than
earlier prototype boards. When the newer board was released,
the SPI stopped working because the wrong pin was used in the device
tree and conflicted with the UART RTS. Fix the pinmux for
production boards.
Fixes: 36ca3c8ccb53 ("arm64: dts: imx: Add Beacon i.MX8M Nano development kit")
Signed-off-by: Adam Ford <aford173@gmail.com>
diff --git a/arch/arm64/boot/dts/freescale/imx8mn-beacon-baseboard.dtsi b/arch/arm64/boot/dts/freescale/imx8mn-beacon-baseboard.dtsi
index 9e82069c941f..d38745237d3c 100644
--- a/arch/arm64/boot/dts/freescale/imx8mn-beacon-baseboard.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mn-beacon-baseboard.dtsi
@@ -63,25 +63,35 @@ reg_usb_otg_vbus: regulator-usb {
enable-active-high;
};
- sound {
- compatible = "fsl,imx-audio-wm8962";
- model = "wm8962-audio";
- audio-cpu = <&sai3>;
- audio-codec = <&wm8962>;
- audio-routing =
- "Headphone Jack", "HPOUTL",
- "Headphone Jack", "HPOUTR",
- "Ext Spk", "SPKOUTL",
- "Ext Spk", "SPKOUTR",
- "AMIC", "MICBIAS",
- "IN3R", "AMIC";
+ sound-wm8962 {
+ compatible = "simple-audio-card";
+ simple-audio-card,name = "wm8962";
+ simple-audio-card,format = "i2s";
+ simple-audio-card,widgets = "Headphone", "Headphones",
+ "Microphone", "Headset Mic",
+ "Speaker", "Speaker";
+ simple-audio-card,routing = "Headphones", "HPOUTL",
+ "Headphones", "HPOUTR",
+ "Speaker", "SPKOUTL",
+ "Speaker", "SPKOUTR",
+ "Headset Mic", "MICBIAS",
+ "IN3R", "Headset Mic";
+ simple-audio-card,cpu {
+ sound-dai = <&sai3>;
+ };
+ simple-audio-card,codec {
+ sound-dai = <&wm8962>;
+ clocks = <&clk IMX8MN_CLK_SAI3_ROOT>;
+ frame-master;
+ bitclock-master;
+ };
};
};
&ecspi2 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_espi2>;
- cs-gpios = <&gpio5 9 GPIO_ACTIVE_LOW>;
+ cs-gpios = <&gpio5 13 GPIO_ACTIVE_LOW>;
status = "okay";
eeprom@0 {
@@ -142,6 +152,7 @@ wm8962: audio-codec@1a {
0x0000 /* 4:FN_DMICCDAT */
0x0000 /* 5:Default */
>;
+ #sound-dai-cells = <0>;
};
};
@@ -202,7 +213,7 @@ pinctrl_espi2: espi2grp {
MX8MN_IOMUXC_ECSPI2_SCLK_ECSPI2_SCLK 0x82
MX8MN_IOMUXC_ECSPI2_MOSI_ECSPI2_MOSI 0x82
MX8MN_IOMUXC_ECSPI2_MISO_ECSPI2_MISO 0x82
- MX8MN_IOMUXC_ECSPI1_SS0_GPIO5_IO9 0x41
+ MX8MN_IOMUXC_ECSPI2_SS0_GPIO5_IO13 0x41
>;
};
--
2.39.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] 3+ messages in thread
* Re: [PATCH 1/2] arm64: dts: imx8mn-beacon: Migrate sound card to simple-audio-card
2023-05-21 23:10 [PATCH 1/2] arm64: dts: imx8mn-beacon: Migrate sound card to simple-audio-card Adam Ford
2023-05-21 23:10 ` [PATCH 2/2] arm64: dts: imx8mn-beacon: Fix SPI CS pinmux Adam Ford
@ 2023-05-27 12:32 ` Shawn Guo
1 sibling, 0 replies; 3+ messages in thread
From: Shawn Guo @ 2023-05-27 12:32 UTC (permalink / raw)
To: Adam Ford
Cc: linux-arm-kernel, aford, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Sascha Hauer, Pengutronix Kernel Team,
Fabio Estevam, NXP Linux Team, devicetree, linux-kernel
On Sun, May 21, 2023 at 06:10:54PM -0500, Adam Ford wrote:
> Instead of using a custom glue layer connecting the wm8962 CODEC
> to the SAI3 sound-dai, migrate the sound card to simple-audio-card.
>
> Signed-off-by: Adam Ford <aford173@gmail.com>
Can you double check both patches? The changes do not seem to match
subject and commit log.
Shawn
>
> diff --git a/arch/arm64/boot/dts/freescale/imx8mn.dtsi b/arch/arm64/boot/dts/freescale/imx8mn.dtsi
> index bd84db550053..8be8f090e8b8 100644
> --- a/arch/arm64/boot/dts/freescale/imx8mn.dtsi
> +++ b/arch/arm64/boot/dts/freescale/imx8mn.dtsi
> @@ -1069,13 +1069,6 @@ lcdif: lcdif@32e00000 {
> <&clk IMX8MN_CLK_DISP_APB_ROOT>,
> <&clk IMX8MN_CLK_DISP_AXI_ROOT>;
> clock-names = "pix", "axi", "disp_axi";
> - assigned-clocks = <&clk IMX8MN_CLK_DISP_PIXEL_ROOT>,
> - <&clk IMX8MN_CLK_DISP_AXI>,
> - <&clk IMX8MN_CLK_DISP_APB>;
> - assigned-clock-parents = <&clk IMX8MN_CLK_DISP_PIXEL>,
> - <&clk IMX8MN_SYS_PLL2_1000M>,
> - <&clk IMX8MN_SYS_PLL1_800M>;
> - assigned-clock-rates = <594000000>, <500000000>, <200000000>;
> interrupts = <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>;
> power-domains = <&disp_blk_ctrl IMX8MN_DISPBLK_PD_LCDIF>;
> status = "disabled";
> @@ -1093,12 +1086,6 @@ mipi_dsi: dsi@32e10000 {
> clocks = <&clk IMX8MN_CLK_DSI_CORE>,
> <&clk IMX8MN_CLK_DSI_PHY_REF>;
> clock-names = "bus_clk", "sclk_mipi";
> - assigned-clocks = <&clk IMX8MN_CLK_DSI_CORE>,
> - <&clk IMX8MN_CLK_DSI_PHY_REF>;
> - assigned-clock-parents = <&clk IMX8MN_SYS_PLL1_266M>,
> - <&clk IMX8MN_CLK_24M>;
> - assigned-clock-rates = <266000000>, <24000000>;
> - samsung,pll-clock-frequency = <24000000>;
> interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>;
> power-domains = <&disp_blk_ctrl IMX8MN_DISPBLK_PD_MIPI_DSI>;
> status = "disabled";
> @@ -1142,6 +1129,21 @@ disp_blk_ctrl: blk-ctrl@32e28000 {
> "lcdif-axi", "lcdif-apb", "lcdif-pix",
> "dsi-pclk", "dsi-ref",
> "csi-aclk", "csi-pclk";
> + assigned-clocks = <&clk IMX8MN_CLK_DSI_CORE>,
> + <&clk IMX8MN_CLK_DSI_PHY_REF>,
> + <&clk IMX8MN_CLK_DISP_PIXEL>,
> + <&clk IMX8MN_CLK_DISP_AXI>,
> + <&clk IMX8MN_CLK_DISP_APB>;
> + assigned-clock-parents = <&clk IMX8MN_SYS_PLL1_266M>,
> + <&clk IMX8MN_CLK_24M>,
> + <&clk IMX8MN_VIDEO_PLL1_OUT>,
> + <&clk IMX8MN_SYS_PLL2_1000M>,
> + <&clk IMX8MN_SYS_PLL1_800M>;
> + assigned-clock-rates = <266000000>,
> + <24000000>,
> + <594000000>,
> + <500000000>,
> + <200000000>;
> #power-domain-cells = <1>;
> };
>
> --
> 2.39.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] 3+ messages in thread
end of thread, other threads:[~2023-05-27 12:33 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-21 23:10 [PATCH 1/2] arm64: dts: imx8mn-beacon: Migrate sound card to simple-audio-card Adam Ford
2023-05-21 23:10 ` [PATCH 2/2] arm64: dts: imx8mn-beacon: Fix SPI CS pinmux Adam Ford
2023-05-27 12:32 ` [PATCH 1/2] arm64: dts: imx8mn-beacon: Migrate sound card to simple-audio-card Shawn Guo
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).