Re: [PATCH 2/4] arm64: dts: imx8mn: add spba bus node

2021-03-31 Thread Adam Ford
On Tue, Dec 29, 2020 at 8:34 PM Peng Fan  wrote:
>
> > Subject: Re: [PATCH 2/4] arm64: dts: imx8mn: add spba bus node
> >
> > On Tue, Dec 29, 2020 at 06:26:41AM -0600, Adam Ford wrote:
> > > On Tue, Dec 29, 2020 at 6:15 AM  wrote:
> > > >
> > > > From: Peng Fan 
> > > >
> > > > According to RM, there is a spba bus inside aips3 and aips1, add it.
> > > >
> > > > Signed-off-by: Peng Fan 
> > > > ---
> > > >  arch/arm64/boot/dts/freescale/imx8mm.dtsi | 362
> > > > +++---
> > > >  1 file changed, 189 insertions(+), 173 deletions(-)
> > > >
> > > > diff --git a/arch/arm64/boot/dts/freescale/imx8mm.dtsi
> > > > b/arch/arm64/boot/dts/freescale/imx8mm.dtsi
> > > > index c824f2615fe8..91f85b8cee9a 100644
> > > > --- a/arch/arm64/boot/dts/freescale/imx8mm.dtsi
> > > > +++ b/arch/arm64/boot/dts/freescale/imx8mm.dtsi
> > > > @@ -269,117 +269,125 @@ aips1: bus@3000 {
> > > > #size-cells = <1>;
> > > > ranges = <0x3000 0x3000
> > 0x40>;
> > > >
> > > > -   sai1: sai@3001 {
> > > > -   #sound-dai-cells = <0>;
> > > > -   compatible = "fsl,imx8mm-sai",
> > "fsl,imx8mq-sai";
> > > > -   reg = <0x3001 0x1>;
> > > > -   interrupts =  > IRQ_TYPE_LEVEL_HIGH>;
> > > > -   clocks = <
> > IMX8MM_CLK_SAI1_IPG>,
> > > > -<
> > IMX8MM_CLK_SAI1_ROOT>,
> > > > -<
> > IMX8MM_CLK_DUMMY>, < IMX8MM_CLK_DUMMY>;
> > > > -   clock-names = "bus", "mclk1",
> > "mclk2", "mclk3";
> > > > -   dmas = < 0 2 0>, <
> > 1 2 0>;
> > > > -   dma-names = "rx", "tx";
> > > > -   status = "disabled";
> > > > -   };
> > > > +   bus@3000 {
> > >
> > > There is already a bus@3000 (aips1), and I think the system
> > > doesn't like it when there are multiple busses with the same name.
> > >
> > > There was some discussion on fixing the 8mn [1], but it doesn't look
> > > like it went anywhere.
> > >
> > > I am guessing the Mini will need something similar to the nano.
> > >
> > > [1] -
> > > https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpatc
> > >
> > hwork.kernel.org%2Fproject%2Flinux-arm-kernel%2Fpatch%2F1607324004-1
> > 29
> > >
> > 60-1-git-send-email-shengjiu.wang%40nxp.com%2Fdata=04%7C01%7
> > Cpeng
> > > .fan%40nxp.com%7C970d320f3ef7413296ed08d8ac1486f9%7C686ea1d3bc
> > 2b4c6fa9
> > >
> > 2cd99c5c301635%7C0%7C0%7C637448551481206715%7CUnknown%7CTW
> > FpbGZsb3d8ey
> > >
> > JWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D
> > %7C200
> > >
> > 0sdata=xKgYHCDyitbUyTPKVuwQV%2FCoJvepCbdBJ1MD9vP%2B6MY
> > %3Dres
> > > erved=0
> >
> > Several replies from S.j. Wang are missing from LKML (and maybe
> > patchwork?) but we reached a conclusion:
>
> Thanks for the pointing, I'll give a look. If S.J take it, I'll leave it to 
> S.J.

Peng or S.J,

I don't see this was ever finished.  On the Nano, there is an spba-bus
under the aips1 bus, but I am not seeing anything on aips3 yet.   It
appears to have been abandoned.  The NXP kernel doesn't show either
spba-bus on the imx8m Mini either, but the documentation for the Mini
makes it look like it should work.  Do you want me to submit a patch
for any of this?

adam
>
> Thanks,
> Peng.
>
> > https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flore.ke
> > rnel.org%2Flinux-arm-kernel%2F20201208090601.GA8347%40kozik-lap%2F&
> > amp;data=04%7C01%7Cpeng.fan%40nxp.com%7C970d320f3ef7413296ed08
> > d8ac1486f9%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C63744
> > 8551481206715%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiL
> > CJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000sdata=nk
> > t0J5RtzA%2B29nK4aPnd434FNQV8MUZ%2F8Aq64o6hl6I%3Dreserved
> > =0
> >
> > Either you do some remapping of address space or just rename the "bus"
> > nodes (e.g. generic bus-1 or a specific spba-bus).
> >
> > Best regards,
> > Krzysztof


RE: [PATCH 2/4] arm64: dts: imx8mn: add spba bus node

2020-12-29 Thread Peng Fan
> Subject: Re: [PATCH 2/4] arm64: dts: imx8mn: add spba bus node
> 
> On Tue, Dec 29, 2020 at 06:26:41AM -0600, Adam Ford wrote:
> > On Tue, Dec 29, 2020 at 6:15 AM  wrote:
> > >
> > > From: Peng Fan 
> > >
> > > According to RM, there is a spba bus inside aips3 and aips1, add it.
> > >
> > > Signed-off-by: Peng Fan 
> > > ---
> > >  arch/arm64/boot/dts/freescale/imx8mm.dtsi | 362
> > > +++---
> > >  1 file changed, 189 insertions(+), 173 deletions(-)
> > >
> > > diff --git a/arch/arm64/boot/dts/freescale/imx8mm.dtsi
> > > b/arch/arm64/boot/dts/freescale/imx8mm.dtsi
> > > index c824f2615fe8..91f85b8cee9a 100644
> > > --- a/arch/arm64/boot/dts/freescale/imx8mm.dtsi
> > > +++ b/arch/arm64/boot/dts/freescale/imx8mm.dtsi
> > > @@ -269,117 +269,125 @@ aips1: bus@3000 {
> > > #size-cells = <1>;
> > > ranges = <0x3000 0x3000
> 0x40>;
> > >
> > > -   sai1: sai@3001 {
> > > -   #sound-dai-cells = <0>;
> > > -   compatible = "fsl,imx8mm-sai",
> "fsl,imx8mq-sai";
> > > -   reg = <0x3001 0x1>;
> > > -   interrupts =  IRQ_TYPE_LEVEL_HIGH>;
> > > -   clocks = <
> IMX8MM_CLK_SAI1_IPG>,
> > > -<
> IMX8MM_CLK_SAI1_ROOT>,
> > > -<
> IMX8MM_CLK_DUMMY>, < IMX8MM_CLK_DUMMY>;
> > > -   clock-names = "bus", "mclk1",
> "mclk2", "mclk3";
> > > -   dmas = < 0 2 0>, <
> 1 2 0>;
> > > -   dma-names = "rx", "tx";
> > > -   status = "disabled";
> > > -   };
> > > +   bus@3000 {
> >
> > There is already a bus@3000 (aips1), and I think the system
> > doesn't like it when there are multiple busses with the same name.
> >
> > There was some discussion on fixing the 8mn [1], but it doesn't look
> > like it went anywhere.
> >
> > I am guessing the Mini will need something similar to the nano.
> >
> > [1] -
> > https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpatc
> >
> hwork.kernel.org%2Fproject%2Flinux-arm-kernel%2Fpatch%2F1607324004-1
> 29
> >
> 60-1-git-send-email-shengjiu.wang%40nxp.com%2Fdata=04%7C01%7
> Cpeng
> > .fan%40nxp.com%7C970d320f3ef7413296ed08d8ac1486f9%7C686ea1d3bc
> 2b4c6fa9
> >
> 2cd99c5c301635%7C0%7C0%7C637448551481206715%7CUnknown%7CTW
> FpbGZsb3d8ey
> >
> JWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D
> %7C200
> >
> 0sdata=xKgYHCDyitbUyTPKVuwQV%2FCoJvepCbdBJ1MD9vP%2B6MY
> %3Dres
> > erved=0
> 
> Several replies from S.j. Wang are missing from LKML (and maybe
> patchwork?) but we reached a conclusion:

Thanks for the pointing, I'll give a look. If S.J take it, I'll leave it to S.J.

Thanks,
Peng. 

> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flore.ke
> rnel.org%2Flinux-arm-kernel%2F20201208090601.GA8347%40kozik-lap%2F&
> amp;data=04%7C01%7Cpeng.fan%40nxp.com%7C970d320f3ef7413296ed08
> d8ac1486f9%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C63744
> 8551481206715%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiL
> CJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000sdata=nk
> t0J5RtzA%2B29nK4aPnd434FNQV8MUZ%2F8Aq64o6hl6I%3Dreserved
> =0
> 
> Either you do some remapping of address space or just rename the "bus"
> nodes (e.g. generic bus-1 or a specific spba-bus).
> 
> Best regards,
> Krzysztof


Re: [PATCH 2/4] arm64: dts: imx8mn: add spba bus node

2020-12-29 Thread Krzysztof Kozlowski
On Tue, Dec 29, 2020 at 06:26:41AM -0600, Adam Ford wrote:
> On Tue, Dec 29, 2020 at 6:15 AM  wrote:
> >
> > From: Peng Fan 
> >
> > According to RM, there is a spba bus inside aips3 and aips1, add it.
> >
> > Signed-off-by: Peng Fan 
> > ---
> >  arch/arm64/boot/dts/freescale/imx8mm.dtsi | 362 +++---
> >  1 file changed, 189 insertions(+), 173 deletions(-)
> >
> > diff --git a/arch/arm64/boot/dts/freescale/imx8mm.dtsi 
> > b/arch/arm64/boot/dts/freescale/imx8mm.dtsi
> > index c824f2615fe8..91f85b8cee9a 100644
> > --- a/arch/arm64/boot/dts/freescale/imx8mm.dtsi
> > +++ b/arch/arm64/boot/dts/freescale/imx8mm.dtsi
> > @@ -269,117 +269,125 @@ aips1: bus@3000 {
> > #size-cells = <1>;
> > ranges = <0x3000 0x3000 0x40>;
> >
> > -   sai1: sai@3001 {
> > -   #sound-dai-cells = <0>;
> > -   compatible = "fsl,imx8mm-sai", 
> > "fsl,imx8mq-sai";
> > -   reg = <0x3001 0x1>;
> > -   interrupts =  > IRQ_TYPE_LEVEL_HIGH>;
> > -   clocks = < IMX8MM_CLK_SAI1_IPG>,
> > -< IMX8MM_CLK_SAI1_ROOT>,
> > -< IMX8MM_CLK_DUMMY>, < 
> > IMX8MM_CLK_DUMMY>;
> > -   clock-names = "bus", "mclk1", "mclk2", 
> > "mclk3";
> > -   dmas = < 0 2 0>, < 1 2 0>;
> > -   dma-names = "rx", "tx";
> > -   status = "disabled";
> > -   };
> > +   bus@3000 {
> 
> There is already a bus@3000 (aips1), and I think the system
> doesn't like it when there are multiple busses with the same name.
> 
> There was some discussion on fixing the 8mn [1], but it doesn't look
> like it went anywhere.
> 
> I am guessing the Mini will need something similar to the nano.
> 
> [1] - 
> https://patchwork.kernel.org/project/linux-arm-kernel/patch/1607324004-12960-1-git-send-email-shengjiu.w...@nxp.com/

Several replies from S.j. Wang are missing from LKML (and maybe
patchwork?) but we reached a conclusion:
https://lore.kernel.org/linux-arm-kernel/20201208090601.GA8347@kozik-lap/

Either you do some remapping of address space or just rename the "bus"
nodes (e.g. generic bus-1 or a specific spba-bus).

Best regards,
Krzysztof


Re: [PATCH 2/4] arm64: dts: imx8mn: add spba bus node

2020-12-29 Thread Adam Ford
On Tue, Dec 29, 2020 at 6:15 AM  wrote:
>
> From: Peng Fan 
>
> According to RM, there is a spba bus inside aips3 and aips1, add it.
>
> Signed-off-by: Peng Fan 
> ---
>  arch/arm64/boot/dts/freescale/imx8mm.dtsi | 362 +++---
>  1 file changed, 189 insertions(+), 173 deletions(-)
>
> diff --git a/arch/arm64/boot/dts/freescale/imx8mm.dtsi 
> b/arch/arm64/boot/dts/freescale/imx8mm.dtsi
> index c824f2615fe8..91f85b8cee9a 100644
> --- a/arch/arm64/boot/dts/freescale/imx8mm.dtsi
> +++ b/arch/arm64/boot/dts/freescale/imx8mm.dtsi
> @@ -269,117 +269,125 @@ aips1: bus@3000 {
> #size-cells = <1>;
> ranges = <0x3000 0x3000 0x40>;
>
> -   sai1: sai@3001 {
> -   #sound-dai-cells = <0>;
> -   compatible = "fsl,imx8mm-sai", 
> "fsl,imx8mq-sai";
> -   reg = <0x3001 0x1>;
> -   interrupts = ;
> -   clocks = < IMX8MM_CLK_SAI1_IPG>,
> -< IMX8MM_CLK_SAI1_ROOT>,
> -< IMX8MM_CLK_DUMMY>, < 
> IMX8MM_CLK_DUMMY>;
> -   clock-names = "bus", "mclk1", "mclk2", 
> "mclk3";
> -   dmas = < 0 2 0>, < 1 2 0>;
> -   dma-names = "rx", "tx";
> -   status = "disabled";
> -   };
> +   bus@3000 {

There is already a bus@3000 (aips1), and I think the system
doesn't like it when there are multiple busses with the same name.

There was some discussion on fixing the 8mn [1], but it doesn't look
like it went anywhere.

I am guessing the Mini will need something similar to the nano.

[1] - 
https://patchwork.kernel.org/project/linux-arm-kernel/patch/1607324004-12960-1-git-send-email-shengjiu.w...@nxp.com/

adam



> +   compatible = "fsl,spba-bus", "simple-bus";
> +   #address-cells = <1>;
> +   #size-cells = <1>;
> +   reg = <0x3000 0x10>;
> +   ranges;
> +
> +   sai1: sai@3001 {
> +   #sound-dai-cells = <0>;
> +   compatible = "fsl,imx8mm-sai", 
> "fsl,imx8mq-sai";
> +   reg = <0x3001 0x1>;
> +   interrupts =  IRQ_TYPE_LEVEL_HIGH>;
> +   clocks = < IMX8MM_CLK_SAI1_IPG>,
> +< IMX8MM_CLK_SAI1_ROOT>,
> +< IMX8MM_CLK_DUMMY>, 
> < IMX8MM_CLK_DUMMY>;
> +   clock-names = "bus", "mclk1", 
> "mclk2", "mclk3";
> +   dmas = < 0 2 0>, < 1 2 0>;
> +   dma-names = "rx", "tx";
> +   status = "disabled";
> +   };
>
> -   sai2: sai@3002 {
> -   #sound-dai-cells = <0>;
> -   compatible = "fsl,imx8mm-sai", 
> "fsl,imx8mq-sai";
> -   reg = <0x3002 0x1>;
> -   interrupts = ;
> -   clocks = < IMX8MM_CLK_SAI2_IPG>,
> -   < IMX8MM_CLK_SAI2_ROOT>,
> -   < IMX8MM_CLK_DUMMY>, < 
> IMX8MM_CLK_DUMMY>;
> -   clock-names = "bus", "mclk1", "mclk2", 
> "mclk3";
> -   dmas = < 2 2 0>, < 3 2 0>;
> -   dma-names = "rx", "tx";
> -   status = "disabled";
> -   };
> +   sai2: sai@3002 {
> +   #sound-dai-cells = <0>;
> +   compatible = "fsl,imx8mm-sai", 
> "fsl,imx8mq-sai";
> +   reg = <0x3002 0x1>;
> +   interrupts =  IRQ_TYPE_LEVEL_HIGH>;
> +   clocks = < IMX8MM_CLK_SAI2_IPG>,
> +   < IMX8MM_CLK_SAI2_ROOT>,
> +   < IMX8MM_CLK_DUMMY>, 
> < IMX8MM_CLK_DUMMY>;
> +   clock-names = "bus", "mclk1", 
> "mclk2", "mclk3";
> +   dmas = < 2 2 0>, < 3 2 0>;
> +   dma-names = "rx", "tx";
> +   status = "disabled";
> +   };
>
> -   

[PATCH 2/4] arm64: dts: imx8mn: add spba bus node

2020-12-29 Thread peng . fan
From: Peng Fan 

According to RM, there is a spba bus inside aips3 and aips1, add it.

Signed-off-by: Peng Fan 
---
 arch/arm64/boot/dts/freescale/imx8mm.dtsi | 362 +++---
 1 file changed, 189 insertions(+), 173 deletions(-)

diff --git a/arch/arm64/boot/dts/freescale/imx8mm.dtsi 
b/arch/arm64/boot/dts/freescale/imx8mm.dtsi
index c824f2615fe8..91f85b8cee9a 100644
--- a/arch/arm64/boot/dts/freescale/imx8mm.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mm.dtsi
@@ -269,117 +269,125 @@ aips1: bus@3000 {
#size-cells = <1>;
ranges = <0x3000 0x3000 0x40>;
 
-   sai1: sai@3001 {
-   #sound-dai-cells = <0>;
-   compatible = "fsl,imx8mm-sai", "fsl,imx8mq-sai";
-   reg = <0x3001 0x1>;
-   interrupts = ;
-   clocks = < IMX8MM_CLK_SAI1_IPG>,
-< IMX8MM_CLK_SAI1_ROOT>,
-< IMX8MM_CLK_DUMMY>, < 
IMX8MM_CLK_DUMMY>;
-   clock-names = "bus", "mclk1", "mclk2", "mclk3";
-   dmas = < 0 2 0>, < 1 2 0>;
-   dma-names = "rx", "tx";
-   status = "disabled";
-   };
+   bus@3000 {
+   compatible = "fsl,spba-bus", "simple-bus";
+   #address-cells = <1>;
+   #size-cells = <1>;
+   reg = <0x3000 0x10>;
+   ranges;
+
+   sai1: sai@3001 {
+   #sound-dai-cells = <0>;
+   compatible = "fsl,imx8mm-sai", 
"fsl,imx8mq-sai";
+   reg = <0x3001 0x1>;
+   interrupts = ;
+   clocks = < IMX8MM_CLK_SAI1_IPG>,
+< IMX8MM_CLK_SAI1_ROOT>,
+< IMX8MM_CLK_DUMMY>, < 
IMX8MM_CLK_DUMMY>;
+   clock-names = "bus", "mclk1", "mclk2", 
"mclk3";
+   dmas = < 0 2 0>, < 1 2 0>;
+   dma-names = "rx", "tx";
+   status = "disabled";
+   };
 
-   sai2: sai@3002 {
-   #sound-dai-cells = <0>;
-   compatible = "fsl,imx8mm-sai", "fsl,imx8mq-sai";
-   reg = <0x3002 0x1>;
-   interrupts = ;
-   clocks = < IMX8MM_CLK_SAI2_IPG>,
-   < IMX8MM_CLK_SAI2_ROOT>,
-   < IMX8MM_CLK_DUMMY>, < 
IMX8MM_CLK_DUMMY>;
-   clock-names = "bus", "mclk1", "mclk2", "mclk3";
-   dmas = < 2 2 0>, < 3 2 0>;
-   dma-names = "rx", "tx";
-   status = "disabled";
-   };
+   sai2: sai@3002 {
+   #sound-dai-cells = <0>;
+   compatible = "fsl,imx8mm-sai", 
"fsl,imx8mq-sai";
+   reg = <0x3002 0x1>;
+   interrupts = ;
+   clocks = < IMX8MM_CLK_SAI2_IPG>,
+   < IMX8MM_CLK_SAI2_ROOT>,
+   < IMX8MM_CLK_DUMMY>, < 
IMX8MM_CLK_DUMMY>;
+   clock-names = "bus", "mclk1", "mclk2", 
"mclk3";
+   dmas = < 2 2 0>, < 3 2 0>;
+   dma-names = "rx", "tx";
+   status = "disabled";
+   };
 
-   sai3: sai@3003 {
-   #sound-dai-cells = <0>;
-   compatible = "fsl,imx8mm-sai", "fsl,imx8mq-sai";
-   reg = <0x3003 0x1>;
-   interrupts = ;
-   clocks = < IMX8MM_CLK_SAI3_IPG>,
-< IMX8MM_CLK_SAI3_ROOT>,
-< IMX8MM_CLK_DUMMY>, < 
IMX8MM_CLK_DUMMY>;
-   clock-names = "bus", "mclk1", "mclk2", "mclk3";
-   dmas = < 4 2 0>, < 5 2 0>;
-   dma-names = "rx", "tx";
-