Message ID | 1491501735-1649-2-git-send-email-jagan@openedev.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Thu, Apr 06, 2017 at 11:32:07PM +0530, Jagan Teki wrote: > From: Jagan Teki <jagan@amarulasolutions.com> > > Add support for Sound card and related codec(via i2c1) nodes > on Engicam Is.IoT MX6UL variant module boards. > > Cc: Shawn Guo <shawnguo@kernel.org> > Cc: Matteo Lisi <matteo.lisi@engicam.com> > Cc: Michael Trimarchi <michael@amarulasolutions.com> > Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> > --- > Changes for v3: > - Replace fsl,imx-audio-sgtl5000 and use simple-audio-card > Changes for v2: > - Use proper [label:] node-name[@unit-address] for codec > - Remove incorrect codec property 'wlf,shared-lrclk' > - Remove 'gpr' from sound card node > > arch/arm/boot/dts/imx6ul-isiot-common.dtsi | 10 +++++++ > arch/arm/boot/dts/imx6ul-isiot.dtsi | 44 ++++++++++++++++++++++++++++++ Can you help me understand how these two files are related? Why is sgtl5000 added into one and sound node added into the other? Shawn > 2 files changed, 54 insertions(+) > > diff --git a/arch/arm/boot/dts/imx6ul-isiot-common.dtsi b/arch/arm/boot/dts/imx6ul-isiot-common.dtsi > index 2beaab6..d456080 100644 > --- a/arch/arm/boot/dts/imx6ul-isiot-common.dtsi > +++ b/arch/arm/boot/dts/imx6ul-isiot-common.dtsi > @@ -41,6 +41,16 @@ > */ > > &i2c1 { > + sgtl5000: codec@a { > + compatible = "fsl,sgtl5000"; > + reg = <0x0a>; > + clocks = <&clks IMX6UL_CLK_OSC>; > + clock-names = "mclk"; > + VDDA-supply = <®_3p3v>; > + VDDIO-supply = <®_3p3v>; > + VDDD-supply = <®_1p8v>; > + }; > + > stmpe811: gpio-expander@44 { > compatible = "st,stmpe811"; > reg = <0x44>; > diff --git a/arch/arm/boot/dts/imx6ul-isiot.dtsi b/arch/arm/boot/dts/imx6ul-isiot.dtsi > index ea30380..7e947e5 100644 > --- a/arch/arm/boot/dts/imx6ul-isiot.dtsi > +++ b/arch/arm/boot/dts/imx6ul-isiot.dtsi > @@ -69,6 +69,50 @@ > 100>; > default-brightness-level = <100>; > }; > + > + reg_1p8v: regulator-1p8v { > + compatible = "regulator-fixed"; > + regulator-name = "1P8V"; > + regulator-min-microvolt = <1800000>; > + regulator-max-microvolt = <1800000>; > + regulator-always-on; > + regulator-boot-on; > + }; > + > + reg_3p3v: regulator-3p3v { > + compatible = "regulator-fixed"; > + regulator-name = "3P3V"; > + regulator-min-microvolt = <3300000>; > + regulator-max-microvolt = <3300000>; > + regulator-always-on; > + regulator-boot-on; > + }; > + > + sound { > + compatible = "simple-audio-card"; > + simple-audio-card,name = "imx6ul-isiot-sgtl5000"; > + simple-audio-card,format = "i2s"; > + simple-audio-card,bitclock-master = <&dailink_master>; > + simple-audio-card,frame-master = <&dailink_master>; > + simple-audio-card,widgets = > + "Microphone", "Mic Jack", > + "Line", "Line In", > + "Line", "Line Out", > + "Headphone", "Headphone Jack"; > + simple-audio-card,routing = > + "MIC_IN", "Mic Jack", > + "Mic Jack", "Mic Bias", > + "Headphone Jack", "HP_OUT"; > + > + simple-audio-card,cpu { > + sound-dai = <&sai2>; > + }; > + > + dailink_master: simple-audio-card,codec { > + sound-dai = <&sgtl5000>; > + clocks = <&clks IMX6UL_CLK_SAI2>; > + }; > + }; > }; > > &i2c1 { > -- > 1.9.1 >
On Fri, Apr 7, 2017 at 6:46 PM, Shawn Guo <shawnguo@kernel.org> wrote: > On Thu, Apr 06, 2017 at 11:32:07PM +0530, Jagan Teki wrote: >> From: Jagan Teki <jagan@amarulasolutions.com> >> >> Add support for Sound card and related codec(via i2c1) nodes >> on Engicam Is.IoT MX6UL variant module boards. >> >> Cc: Shawn Guo <shawnguo@kernel.org> >> Cc: Matteo Lisi <matteo.lisi@engicam.com> >> Cc: Michael Trimarchi <michael@amarulasolutions.com> >> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> >> --- >> Changes for v3: >> - Replace fsl,imx-audio-sgtl5000 and use simple-audio-card >> Changes for v2: >> - Use proper [label:] node-name[@unit-address] for codec >> - Remove incorrect codec property 'wlf,shared-lrclk' >> - Remove 'gpr' from sound card node >> >> arch/arm/boot/dts/imx6ul-isiot-common.dtsi | 10 +++++++ >> arch/arm/boot/dts/imx6ul-isiot.dtsi | 44 ++++++++++++++++++++++++++++++ > > Can you help me understand how these two files are related? Why is > sgtl5000 added into one and sound node added into the other? lcdif, ts and sound card which may differ based on the base-board connected with SOM, So I moved these stuff which are related to Starter kit supported once's and used with SOM dts files. if some other board with same SOM can have different lcdif and etc so they can define locally to dts. thanks!
On Wed, Jun 14, 2017 at 08:17:04PM +0530, Jagan Teki wrote: > On Fri, Apr 7, 2017 at 6:46 PM, Shawn Guo <shawnguo@kernel.org> wrote: > > On Thu, Apr 06, 2017 at 11:32:07PM +0530, Jagan Teki wrote: > >> From: Jagan Teki <jagan@amarulasolutions.com> > >> > >> Add support for Sound card and related codec(via i2c1) nodes > >> on Engicam Is.IoT MX6UL variant module boards. > >> > >> Cc: Shawn Guo <shawnguo@kernel.org> > >> Cc: Matteo Lisi <matteo.lisi@engicam.com> > >> Cc: Michael Trimarchi <michael@amarulasolutions.com> > >> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> > >> --- > >> Changes for v3: > >> - Replace fsl,imx-audio-sgtl5000 and use simple-audio-card > >> Changes for v2: > >> - Use proper [label:] node-name[@unit-address] for codec > >> - Remove incorrect codec property 'wlf,shared-lrclk' > >> - Remove 'gpr' from sound card node > >> > >> arch/arm/boot/dts/imx6ul-isiot-common.dtsi | 10 +++++++ > >> arch/arm/boot/dts/imx6ul-isiot.dtsi | 44 ++++++++++++++++++++++++++++++ > > > > Can you help me understand how these two files are related? Why is > > sgtl5000 added into one and sound node added into the other? > > lcdif, ts and sound card which may differ based on the base-board > connected with SOM, So I moved these stuff which are related to > Starter kit supported once's and used with SOM dts files. if some > other board with same SOM can have different lcdif and etc so they can > define locally to dts. I do not follow how these stuff are organized. So far we have the following isiot dts files. - imx6ul-isiot-common.dtsi - imx6ul-isiot.dtsi - imx6ul-isiot-emmc.dts and imx6ul-isiot-nand.dts How are they mapping to SoM and base-board? Shawn
On Thu, Jun 15, 2017 at 7:50 AM, Shawn Guo <shawnguo@kernel.org> wrote: > On Wed, Jun 14, 2017 at 08:17:04PM +0530, Jagan Teki wrote: >> On Fri, Apr 7, 2017 at 6:46 PM, Shawn Guo <shawnguo@kernel.org> wrote: >> > On Thu, Apr 06, 2017 at 11:32:07PM +0530, Jagan Teki wrote: >> >> From: Jagan Teki <jagan@amarulasolutions.com> >> >> >> >> Add support for Sound card and related codec(via i2c1) nodes >> >> on Engicam Is.IoT MX6UL variant module boards. >> >> >> >> Cc: Shawn Guo <shawnguo@kernel.org> >> >> Cc: Matteo Lisi <matteo.lisi@engicam.com> >> >> Cc: Michael Trimarchi <michael@amarulasolutions.com> >> >> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> >> >> --- >> >> Changes for v3: >> >> - Replace fsl,imx-audio-sgtl5000 and use simple-audio-card >> >> Changes for v2: >> >> - Use proper [label:] node-name[@unit-address] for codec >> >> - Remove incorrect codec property 'wlf,shared-lrclk' >> >> - Remove 'gpr' from sound card node >> >> >> >> arch/arm/boot/dts/imx6ul-isiot-common.dtsi | 10 +++++++ >> >> arch/arm/boot/dts/imx6ul-isiot.dtsi | 44 ++++++++++++++++++++++++++++++ >> > >> > Can you help me understand how these two files are related? Why is >> > sgtl5000 added into one and sound node added into the other? >> >> lcdif, ts and sound card which may differ based on the base-board >> connected with SOM, So I moved these stuff which are related to >> Starter kit supported once's and used with SOM dts files. if some >> other board with same SOM can have different lcdif and etc so they can >> define locally to dts. > > I do not follow how these stuff are organized. So far we have the > following isiot dts files. > > - imx6ul-isiot-common.dtsi > - imx6ul-isiot.dtsi > - imx6ul-isiot-emmc.dts and imx6ul-isiot-nand.dts > > How are they mapping to SoM and base-board? isiot is a modules class, with that emmc and nand are two separate SOM's. the current support is for mounting these SOM's on Development base board[1]. So, for isiot module class we have imx6ul-isiot.dtsi and emmc and nand SOM's have imx6ul-isiot-emmc.dts and imx6ul-isiot-nand.dts. There are some Carrier boards[1] which were used with different lcdif and other changes, So imx6ul-isiot-common.dtsi have changes common across emmc and nand, instead of adding them into individual dts files I moved in -common.dtsi. So in future if isiot SOM mounted on carrier board which should have a separate dts and which may or may not use imx6ul-isiot-common.dtsi [1] https://www.engicam.com/vis-prod/101142 [2] https://www.engicam.com/vis-prod/101128 thanks!
On Thu, Jun 15, 2017 at 10:21:43AM +0530, Jagan Teki wrote: > On Thu, Jun 15, 2017 at 7:50 AM, Shawn Guo <shawnguo@kernel.org> wrote: > > On Wed, Jun 14, 2017 at 08:17:04PM +0530, Jagan Teki wrote: > >> On Fri, Apr 7, 2017 at 6:46 PM, Shawn Guo <shawnguo@kernel.org> wrote: > >> > On Thu, Apr 06, 2017 at 11:32:07PM +0530, Jagan Teki wrote: > >> >> From: Jagan Teki <jagan@amarulasolutions.com> > >> >> > >> >> Add support for Sound card and related codec(via i2c1) nodes > >> >> on Engicam Is.IoT MX6UL variant module boards. > >> >> > >> >> Cc: Shawn Guo <shawnguo@kernel.org> > >> >> Cc: Matteo Lisi <matteo.lisi@engicam.com> > >> >> Cc: Michael Trimarchi <michael@amarulasolutions.com> > >> >> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> > >> >> --- > >> >> Changes for v3: > >> >> - Replace fsl,imx-audio-sgtl5000 and use simple-audio-card > >> >> Changes for v2: > >> >> - Use proper [label:] node-name[@unit-address] for codec > >> >> - Remove incorrect codec property 'wlf,shared-lrclk' > >> >> - Remove 'gpr' from sound card node > >> >> > >> >> arch/arm/boot/dts/imx6ul-isiot-common.dtsi | 10 +++++++ > >> >> arch/arm/boot/dts/imx6ul-isiot.dtsi | 44 ++++++++++++++++++++++++++++++ > >> > > >> > Can you help me understand how these two files are related? Why is > >> > sgtl5000 added into one and sound node added into the other? > >> > >> lcdif, ts and sound card which may differ based on the base-board > >> connected with SOM, So I moved these stuff which are related to > >> Starter kit supported once's and used with SOM dts files. if some > >> other board with same SOM can have different lcdif and etc so they can > >> define locally to dts. > > > > I do not follow how these stuff are organized. So far we have the > > following isiot dts files. > > > > - imx6ul-isiot-common.dtsi > > - imx6ul-isiot.dtsi > > - imx6ul-isiot-emmc.dts and imx6ul-isiot-nand.dts > > > > How are they mapping to SoM and base-board? > > isiot is a modules class, with that emmc and nand are two separate > SOM's. the current support is for mounting these SOM's on Development > base board[1]. So, for isiot module class we have imx6ul-isiot.dtsi > and emmc and nand SOM's have imx6ul-isiot-emmc.dts and > imx6ul-isiot-nand.dts. There are some Carrier boards[1] which were > used with different lcdif and other changes, So > imx6ul-isiot-common.dtsi have changes common across emmc and nand, > instead of adding them into individual dts files I moved in > -common.dtsi. So in future if isiot SOM mounted on carrier board > which should have a separate dts and which may or may not use > imx6ul-isiot-common.dtsi So you are not sure if imx6ul-isiot-common.dtsi will be used by carrier board. Then what's the point to have it now? You are saying imx6ul-isiot-common.dtsi is created to accommodate the common things across emmc and nand SoMs, but it actually contains LCD and Touch such base-board level of stuff. Confusing. I feel the abstraction is wrong from the beginning. Ideally, we should have something like below. - imx6ul-isiot.dtsi - imx6ul-isiot-kit.dts and imx6ul-isiot-carrier.dts The -isiot should have everything on SoM and common stuff between -kit and -carrier boards, while -kit and -carrier include -isiot and contains the base-board specific things. The -isiot can have both emmc and nand devices with "disabled" status, and let firmware turn device on per SoM it boots. In that case, the abstraction level can be less and clearer. Thoughts? Shawn
Hi Shawn, On Thu, Jun 15, 2017 at 12:45 PM, Shawn Guo <shawnguo@kernel.org> wrote: > On Thu, Jun 15, 2017 at 10:21:43AM +0530, Jagan Teki wrote: >> On Thu, Jun 15, 2017 at 7:50 AM, Shawn Guo <shawnguo@kernel.org> wrote: >> > On Wed, Jun 14, 2017 at 08:17:04PM +0530, Jagan Teki wrote: >> >> On Fri, Apr 7, 2017 at 6:46 PM, Shawn Guo <shawnguo@kernel.org> wrote: >> >> > On Thu, Apr 06, 2017 at 11:32:07PM +0530, Jagan Teki wrote: >> >> >> From: Jagan Teki <jagan@amarulasolutions.com> >> >> >> >> >> >> Add support for Sound card and related codec(via i2c1) nodes >> >> >> on Engicam Is.IoT MX6UL variant module boards. >> >> >> >> >> >> Cc: Shawn Guo <shawnguo@kernel.org> >> >> >> Cc: Matteo Lisi <matteo.lisi@engicam.com> >> >> >> Cc: Michael Trimarchi <michael@amarulasolutions.com> >> >> >> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> >> >> >> --- >> >> >> Changes for v3: >> >> >> - Replace fsl,imx-audio-sgtl5000 and use simple-audio-card >> >> >> Changes for v2: >> >> >> - Use proper [label:] node-name[@unit-address] for codec >> >> >> - Remove incorrect codec property 'wlf,shared-lrclk' >> >> >> - Remove 'gpr' from sound card node >> >> >> >> >> >> arch/arm/boot/dts/imx6ul-isiot-common.dtsi | 10 +++++++ >> >> >> arch/arm/boot/dts/imx6ul-isiot.dtsi | 44 ++++++++++++++++++++++++++++++ >> >> > >> >> > Can you help me understand how these two files are related? Why is >> >> > sgtl5000 added into one and sound node added into the other? >> >> >> >> lcdif, ts and sound card which may differ based on the base-board >> >> connected with SOM, So I moved these stuff which are related to >> >> Starter kit supported once's and used with SOM dts files. if some >> >> other board with same SOM can have different lcdif and etc so they can >> >> define locally to dts. >> > >> > I do not follow how these stuff are organized. So far we have the >> > following isiot dts files. >> > >> > - imx6ul-isiot-common.dtsi >> > - imx6ul-isiot.dtsi >> > - imx6ul-isiot-emmc.dts and imx6ul-isiot-nand.dts >> > >> > How are they mapping to SoM and base-board? >> >> isiot is a modules class, with that emmc and nand are two separate >> SOM's. the current support is for mounting these SOM's on Development >> base board[1]. So, for isiot module class we have imx6ul-isiot.dtsi >> and emmc and nand SOM's have imx6ul-isiot-emmc.dts and >> imx6ul-isiot-nand.dts. There are some Carrier boards[1] which were >> used with different lcdif and other changes, So >> imx6ul-isiot-common.dtsi have changes common across emmc and nand, >> instead of adding them into individual dts files I moved in >> -common.dtsi. So in future if isiot SOM mounted on carrier board >> which should have a separate dts and which may or may not use >> imx6ul-isiot-common.dtsi > > So you are not sure if imx6ul-isiot-common.dtsi will be used by carrier > board. Then what's the point to have it now? > > You are saying imx6ul-isiot-common.dtsi is created to accommodate the > common things across emmc and nand SoMs, but it actually contains LCD > and Touch such base-board level of stuff. Confusing. > > I feel the abstraction is wrong from the beginning. Ideally, we should > have something like below. > > - imx6ul-isiot.dtsi > - imx6ul-isiot-kit.dts and imx6ul-isiot-carrier.dts > > The -isiot should have everything on SoM and common stuff between -kit > and -carrier boards, while -kit and -carrier include -isiot and contains > the base-board specific things. The -isiot can have both emmc and nand > devices with "disabled" status, and let firmware turn device on per SoM > it boots. In that case, the abstraction level can be less and clearer. > > Thoughts? So,even the common stuff (lcdif, ts and etc) should be in -isiot.dtsi and make it "disabled" and let them enabled on respective dts. this what you mentioned here? thank!
On Thu, Jun 15, 2017 at 01:01:22PM +0530, Jagan Teki wrote: > > I feel the abstraction is wrong from the beginning. Ideally, we should > > have something like below. > > > > - imx6ul-isiot.dtsi > > - imx6ul-isiot-kit.dts and imx6ul-isiot-carrier.dts > > > > The -isiot should have everything on SoM and common stuff between -kit > > and -carrier boards, while -kit and -carrier include -isiot and contains > > the base-board specific things. The -isiot can have both emmc and nand > > devices with "disabled" status, and let firmware turn device on per SoM > > it boots. In that case, the abstraction level can be less and clearer. > > > > Thoughts? > > So,even the common stuff (lcdif, ts and etc) should be in -isiot.dtsi Yes, anything common can be in -isiot.dtsi. > and make it "disabled" and let them enabled on respective dts. this > what you mentioned here? It doesn't matter. If the lcd/touch is same on -kit and -carrier, you can even have them enabled by default in -isiot.dtsi. The -kit.dts and -carrier.dts are there to accommodate base-board specific differences. Shawn
On Thu, Jun 15, 2017 at 1:21 PM, Shawn Guo <shawnguo@kernel.org> wrote: > On Thu, Jun 15, 2017 at 01:01:22PM +0530, Jagan Teki wrote: >> > I feel the abstraction is wrong from the beginning. Ideally, we should >> > have something like below. >> > >> > - imx6ul-isiot.dtsi >> > - imx6ul-isiot-kit.dts and imx6ul-isiot-carrier.dts >> > >> > The -isiot should have everything on SoM and common stuff between -kit >> > and -carrier boards, while -kit and -carrier include -isiot and contains >> > the base-board specific things. The -isiot can have both emmc and nand >> > devices with "disabled" status, and let firmware turn device on per SoM >> > it boots. In that case, the abstraction level can be less and clearer. >> > >> > Thoughts? >> >> So,even the common stuff (lcdif, ts and etc) should be in -isiot.dtsi > > Yes, anything common can be in -isiot.dtsi. > >> and make it "disabled" and let them enabled on respective dts. this >> what you mentioned here? > > It doesn't matter. If the lcd/touch is same on -kit and -carrier, you > can even have them enabled by default in -isiot.dtsi. The -kit.dts and > -carrier.dts are there to accommodate base-board specific differences. OK, thanks for the help. I'll resolve and send v4 changes by breaking this series for each respective modules. thanks!
diff --git a/arch/arm/boot/dts/imx6ul-isiot-common.dtsi b/arch/arm/boot/dts/imx6ul-isiot-common.dtsi index 2beaab6..d456080 100644 --- a/arch/arm/boot/dts/imx6ul-isiot-common.dtsi +++ b/arch/arm/boot/dts/imx6ul-isiot-common.dtsi @@ -41,6 +41,16 @@ */ &i2c1 { + sgtl5000: codec@a { + compatible = "fsl,sgtl5000"; + reg = <0x0a>; + clocks = <&clks IMX6UL_CLK_OSC>; + clock-names = "mclk"; + VDDA-supply = <®_3p3v>; + VDDIO-supply = <®_3p3v>; + VDDD-supply = <®_1p8v>; + }; + stmpe811: gpio-expander@44 { compatible = "st,stmpe811"; reg = <0x44>; diff --git a/arch/arm/boot/dts/imx6ul-isiot.dtsi b/arch/arm/boot/dts/imx6ul-isiot.dtsi index ea30380..7e947e5 100644 --- a/arch/arm/boot/dts/imx6ul-isiot.dtsi +++ b/arch/arm/boot/dts/imx6ul-isiot.dtsi @@ -69,6 +69,50 @@ 100>; default-brightness-level = <100>; }; + + reg_1p8v: regulator-1p8v { + compatible = "regulator-fixed"; + regulator-name = "1P8V"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-always-on; + regulator-boot-on; + }; + + reg_3p3v: regulator-3p3v { + compatible = "regulator-fixed"; + regulator-name = "3P3V"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + regulator-boot-on; + }; + + sound { + compatible = "simple-audio-card"; + simple-audio-card,name = "imx6ul-isiot-sgtl5000"; + simple-audio-card,format = "i2s"; + simple-audio-card,bitclock-master = <&dailink_master>; + simple-audio-card,frame-master = <&dailink_master>; + simple-audio-card,widgets = + "Microphone", "Mic Jack", + "Line", "Line In", + "Line", "Line Out", + "Headphone", "Headphone Jack"; + simple-audio-card,routing = + "MIC_IN", "Mic Jack", + "Mic Jack", "Mic Bias", + "Headphone Jack", "HP_OUT"; + + simple-audio-card,cpu { + sound-dai = <&sai2>; + }; + + dailink_master: simple-audio-card,codec { + sound-dai = <&sgtl5000>; + clocks = <&clks IMX6UL_CLK_SAI2>; + }; + }; }; &i2c1 {