Message ID | 20210217161052.877877-2-adrien.grassein@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Add peripheral support for imx8mm-nitrogen-r2 board | expand |
On Wed, Feb 17, 2021 at 05:10:45PM +0100, Adrien Grassein wrote: > Add usdhc3 description which corresponds to the wifi/bt chip > > Signed-off-by: Adrien Grassein <adrien.grassein@gmail.com> > --- > .../boot/dts/freescale/imx8mm-nitrogen-r2.dts | 31 +++++++++++++++++++ > 1 file changed, 31 insertions(+) > > diff --git a/arch/arm64/boot/dts/freescale/imx8mm-nitrogen-r2.dts b/arch/arm64/boot/dts/freescale/imx8mm-nitrogen-r2.dts > index c0c384d76147..212dc9e5e85d 100644 > --- a/arch/arm64/boot/dts/freescale/imx8mm-nitrogen-r2.dts > +++ b/arch/arm64/boot/dts/freescale/imx8mm-nitrogen-r2.dts > @@ -9,6 +9,17 @@ > / { > model = "Boundary Devices i.MX8MMini Nitrogen8MM Rev2"; > compatible = "boundary,imx8mm-nitrogen8mm", "fsl,imx8mm"; > + > + reg_wlan_vmmc: regulator-wlan-vmmc { > + compatible = "regulator-fixed"; > + pinctrl-names = "default"; > + pinctrl-0 = <&pinctrl_reg_wlan_vmmc>; > + regulator-name = "reg_wlan_vmmc"; > + regulator-min-microvolt = <3300000>; > + regulator-max-microvolt = <3300000>; > + gpio = <&gpio3 20 GPIO_ACTIVE_HIGH>; > + enable-active-high; > + }; > }; > > &A53_0 { > @@ -206,6 +217,20 @@ &usdhc2 { > status = "okay"; > }; > > +/* wlan */ > +&usdhc3 { > + bus-width = <4>; > + sdhci-caps-mask = <0x2 0x0>; > + non-removable; > + pinctrl-names = "default", "state_100mhz", "state_200mhz"; > + pinctrl-0 = <&pinctrl_usdhc3>; > + pinctrl-1 = <&pinctrl_usdhc3_100mhz>; > + pinctrl-2 = <&pinctrl_usdhc3_200mhz>; > + vmmc-supply = <®_wlan_vmmc>; > + vqmmc-1-8-v; There is no such property in the bindings. Best regards, Krzysztof
Le ven. 19 févr. 2021 à 14:18, Krzysztof Kozlowski <krzk@kernel.org> a écrit : > > On Wed, Feb 17, 2021 at 05:10:45PM +0100, Adrien Grassein wrote: > > Add usdhc3 description which corresponds to the wifi/bt chip > > > > Signed-off-by: Adrien Grassein <adrien.grassein@gmail.com> > > --- > > .../boot/dts/freescale/imx8mm-nitrogen-r2.dts | 31 +++++++++++++++++++ > > 1 file changed, 31 insertions(+) > > > > diff --git a/arch/arm64/boot/dts/freescale/imx8mm-nitrogen-r2.dts b/arch/arm64/boot/dts/freescale/imx8mm-nitrogen-r2.dts > > index c0c384d76147..212dc9e5e85d 100644 > > --- a/arch/arm64/boot/dts/freescale/imx8mm-nitrogen-r2.dts > > +++ b/arch/arm64/boot/dts/freescale/imx8mm-nitrogen-r2.dts > > @@ -9,6 +9,17 @@ > > / { > > model = "Boundary Devices i.MX8MMini Nitrogen8MM Rev2"; > > compatible = "boundary,imx8mm-nitrogen8mm", "fsl,imx8mm"; > > + > > + reg_wlan_vmmc: regulator-wlan-vmmc { > > + compatible = "regulator-fixed"; > > + pinctrl-names = "default"; > > + pinctrl-0 = <&pinctrl_reg_wlan_vmmc>; > > + regulator-name = "reg_wlan_vmmc"; > > + regulator-min-microvolt = <3300000>; > > + regulator-max-microvolt = <3300000>; > > + gpio = <&gpio3 20 GPIO_ACTIVE_HIGH>; > > + enable-active-high; > > + }; > > }; > > > > &A53_0 { > > @@ -206,6 +217,20 @@ &usdhc2 { > > status = "okay"; > > }; > > > > +/* wlan */ > > +&usdhc3 { > > + bus-width = <4>; > > + sdhci-caps-mask = <0x2 0x0>; > > + non-removable; > > + pinctrl-names = "default", "state_100mhz", "state_200mhz"; > > + pinctrl-0 = <&pinctrl_usdhc3>; > > + pinctrl-1 = <&pinctrl_usdhc3_100mhz>; > > + pinctrl-2 = <&pinctrl_usdhc3_200mhz>; > > + vmmc-supply = <®_wlan_vmmc>; > > + vqmmc-1-8-v; > > There is no such property in the bindings. > Sorry, I copied a property from the FSL kernel. I will fix this with a "fixed-regulator". > Best regards, > Krzysztof Thanks, Adrien
On Fri, Feb 19, 2021 at 03:03:55PM +0100, Adrien Grassein wrote: > Le ven. 19 févr. 2021 à 14:18, Krzysztof Kozlowski <krzk@kernel.org> a écrit : > > > > On Wed, Feb 17, 2021 at 05:10:45PM +0100, Adrien Grassein wrote: > > > Add usdhc3 description which corresponds to the wifi/bt chip > > > > > > Signed-off-by: Adrien Grassein <adrien.grassein@gmail.com> > > > --- > > > .../boot/dts/freescale/imx8mm-nitrogen-r2.dts | 31 +++++++++++++++++++ > > > 1 file changed, 31 insertions(+) > > > > > > diff --git a/arch/arm64/boot/dts/freescale/imx8mm-nitrogen-r2.dts b/arch/arm64/boot/dts/freescale/imx8mm-nitrogen-r2.dts > > > index c0c384d76147..212dc9e5e85d 100644 > > > --- a/arch/arm64/boot/dts/freescale/imx8mm-nitrogen-r2.dts > > > +++ b/arch/arm64/boot/dts/freescale/imx8mm-nitrogen-r2.dts > > > @@ -9,6 +9,17 @@ > > > / { > > > model = "Boundary Devices i.MX8MMini Nitrogen8MM Rev2"; > > > compatible = "boundary,imx8mm-nitrogen8mm", "fsl,imx8mm"; > > > + > > > + reg_wlan_vmmc: regulator-wlan-vmmc { > > > + compatible = "regulator-fixed"; > > > + pinctrl-names = "default"; > > > + pinctrl-0 = <&pinctrl_reg_wlan_vmmc>; > > > + regulator-name = "reg_wlan_vmmc"; > > > + regulator-min-microvolt = <3300000>; > > > + regulator-max-microvolt = <3300000>; > > > + gpio = <&gpio3 20 GPIO_ACTIVE_HIGH>; > > > + enable-active-high; > > > + }; > > > }; > > > > > > &A53_0 { > > > @@ -206,6 +217,20 @@ &usdhc2 { > > > status = "okay"; > > > }; > > > > > > +/* wlan */ > > > +&usdhc3 { > > > + bus-width = <4>; > > > + sdhci-caps-mask = <0x2 0x0>; > > > + non-removable; > > > + pinctrl-names = "default", "state_100mhz", "state_200mhz"; > > > + pinctrl-0 = <&pinctrl_usdhc3>; > > > + pinctrl-1 = <&pinctrl_usdhc3_100mhz>; > > > + pinctrl-2 = <&pinctrl_usdhc3_200mhz>; > > > + vmmc-supply = <®_wlan_vmmc>; > > > + vqmmc-1-8-v; > > > > There is no such property in the bindings. > > > > Sorry, I copied a property from the FSL kernel. > I will fix this with a "fixed-regulator". I would assume this goes from PMIC, so check your schematics. There is little point in adding a fixed regulator which is non-controllable. I think bindings don't require it. Best regards, Krzysztof
Le sam. 20 févr. 2021 à 20:19, Krzysztof Kozlowski <krzk@kernel.org> a écrit : > > On Fri, Feb 19, 2021 at 03:03:55PM +0100, Adrien Grassein wrote: > > Le ven. 19 févr. 2021 à 14:18, Krzysztof Kozlowski <krzk@kernel.org> a écrit : > > > > > > On Wed, Feb 17, 2021 at 05:10:45PM +0100, Adrien Grassein wrote: > > > > Add usdhc3 description which corresponds to the wifi/bt chip > > > > > > > > Signed-off-by: Adrien Grassein <adrien.grassein@gmail.com> > > > > --- > > > > .../boot/dts/freescale/imx8mm-nitrogen-r2.dts | 31 +++++++++++++++++++ > > > > 1 file changed, 31 insertions(+) > > > > > > > > diff --git a/arch/arm64/boot/dts/freescale/imx8mm-nitrogen-r2.dts b/arch/arm64/boot/dts/freescale/imx8mm-nitrogen-r2.dts > > > > index c0c384d76147..212dc9e5e85d 100644 > > > > --- a/arch/arm64/boot/dts/freescale/imx8mm-nitrogen-r2.dts > > > > +++ b/arch/arm64/boot/dts/freescale/imx8mm-nitrogen-r2.dts > > > > @@ -9,6 +9,17 @@ > > > > / { > > > > model = "Boundary Devices i.MX8MMini Nitrogen8MM Rev2"; > > > > compatible = "boundary,imx8mm-nitrogen8mm", "fsl,imx8mm"; > > > > + > > > > + reg_wlan_vmmc: regulator-wlan-vmmc { > > > > + compatible = "regulator-fixed"; > > > > + pinctrl-names = "default"; > > > > + pinctrl-0 = <&pinctrl_reg_wlan_vmmc>; > > > > + regulator-name = "reg_wlan_vmmc"; > > > > + regulator-min-microvolt = <3300000>; > > > > + regulator-max-microvolt = <3300000>; > > > > + gpio = <&gpio3 20 GPIO_ACTIVE_HIGH>; > > > > + enable-active-high; > > > > + }; > > > > }; > > > > > > > > &A53_0 { > > > > @@ -206,6 +217,20 @@ &usdhc2 { > > > > status = "okay"; > > > > }; > > > > > > > > +/* wlan */ > > > > +&usdhc3 { > > > > + bus-width = <4>; > > > > + sdhci-caps-mask = <0x2 0x0>; > > > > + non-removable; > > > > + pinctrl-names = "default", "state_100mhz", "state_200mhz"; > > > > + pinctrl-0 = <&pinctrl_usdhc3>; > > > > + pinctrl-1 = <&pinctrl_usdhc3_100mhz>; > > > > + pinctrl-2 = <&pinctrl_usdhc3_200mhz>; > > > > + vmmc-supply = <®_wlan_vmmc>; > > > > + vqmmc-1-8-v; > > > > > > There is no such property in the bindings. > > > > > > > Sorry, I copied a property from the FSL kernel. > > I will fix this with a "fixed-regulator". > > I would assume this goes from PMIC, so check your schematics. There is > little point in adding a fixed regulator which is non-controllable. No, the 1.8V is issued directly from the alimentation stage. So we can't control it. > I think bindings don't require it. After reading some code, I can say that vqmmc is not mandatory but it helped to find out the caps of the mmc host. In this case, we only support 1.8V on vqmmc. It avoids driver to guess it (and avoid bad behaviour on any future change). > > Best regards, > Krzysztof > Thanks, Adrien
On Mon, 22 Feb 2021 at 00:47, Adrien Grassein <adrien.grassein@gmail.com> wrote: > > Le sam. 20 févr. 2021 à 20:19, Krzysztof Kozlowski <krzk@kernel.org> a écrit : > > > > On Fri, Feb 19, 2021 at 03:03:55PM +0100, Adrien Grassein wrote: > > > Le ven. 19 févr. 2021 à 14:18, Krzysztof Kozlowski <krzk@kernel.org> a écrit : > > > > > > > > On Wed, Feb 17, 2021 at 05:10:45PM +0100, Adrien Grassein wrote: > > > > > Add usdhc3 description which corresponds to the wifi/bt chip > > > > > > > > > > Signed-off-by: Adrien Grassein <adrien.grassein@gmail.com> > > > > > --- > > > > > .../boot/dts/freescale/imx8mm-nitrogen-r2.dts | 31 +++++++++++++++++++ > > > > > 1 file changed, 31 insertions(+) > > > > > > > > > > diff --git a/arch/arm64/boot/dts/freescale/imx8mm-nitrogen-r2.dts b/arch/arm64/boot/dts/freescale/imx8mm-nitrogen-r2.dts > > > > > index c0c384d76147..212dc9e5e85d 100644 > > > > > --- a/arch/arm64/boot/dts/freescale/imx8mm-nitrogen-r2.dts > > > > > +++ b/arch/arm64/boot/dts/freescale/imx8mm-nitrogen-r2.dts > > > > > @@ -9,6 +9,17 @@ > > > > > / { > > > > > model = "Boundary Devices i.MX8MMini Nitrogen8MM Rev2"; > > > > > compatible = "boundary,imx8mm-nitrogen8mm", "fsl,imx8mm"; > > > > > + > > > > > + reg_wlan_vmmc: regulator-wlan-vmmc { > > > > > + compatible = "regulator-fixed"; > > > > > + pinctrl-names = "default"; > > > > > + pinctrl-0 = <&pinctrl_reg_wlan_vmmc>; > > > > > + regulator-name = "reg_wlan_vmmc"; > > > > > + regulator-min-microvolt = <3300000>; > > > > > + regulator-max-microvolt = <3300000>; > > > > > + gpio = <&gpio3 20 GPIO_ACTIVE_HIGH>; > > > > > + enable-active-high; > > > > > + }; > > > > > }; > > > > > > > > > > &A53_0 { > > > > > @@ -206,6 +217,20 @@ &usdhc2 { > > > > > status = "okay"; > > > > > }; > > > > > > > > > > +/* wlan */ > > > > > +&usdhc3 { > > > > > + bus-width = <4>; > > > > > + sdhci-caps-mask = <0x2 0x0>; > > > > > + non-removable; > > > > > + pinctrl-names = "default", "state_100mhz", "state_200mhz"; > > > > > + pinctrl-0 = <&pinctrl_usdhc3>; > > > > > + pinctrl-1 = <&pinctrl_usdhc3_100mhz>; > > > > > + pinctrl-2 = <&pinctrl_usdhc3_200mhz>; > > > > > + vmmc-supply = <®_wlan_vmmc>; > > > > > + vqmmc-1-8-v; > > > > > > > > There is no such property in the bindings. > > > > > > > > > > Sorry, I copied a property from the FSL kernel. > > > I will fix this with a "fixed-regulator". > > > > I would assume this goes from PMIC, so check your schematics. There is > > little point in adding a fixed regulator which is non-controllable. > > No, the 1.8V is issued directly from the alimentation stage. > So we can't control it. > > > I think bindings don't require it. > After reading some code, I can say that vqmmc is not mandatory but it > helped to find out > the caps of the mmc host. In this case, we only support 1.8V on vqmmc. > It avoids driver to guess it (and avoid bad behaviour on any future change). If the supply (hardware) is really 1.8 V then indeed your approach is good. So let's keep that one. Best regards, Krzysztof
Le lun. 22 févr. 2021 à 19:40, Krzysztof Kozlowski <krzk@kernel.org> a écrit : > > On Mon, 22 Feb 2021 at 00:47, Adrien Grassein <adrien.grassein@gmail.com> wrote: > > > > Le sam. 20 févr. 2021 à 20:19, Krzysztof Kozlowski <krzk@kernel.org> a écrit : > > > > > > On Fri, Feb 19, 2021 at 03:03:55PM +0100, Adrien Grassein wrote: > > > > Le ven. 19 févr. 2021 à 14:18, Krzysztof Kozlowski <krzk@kernel.org> a écrit : > > > > > > > > > > On Wed, Feb 17, 2021 at 05:10:45PM +0100, Adrien Grassein wrote: > > > > > > Add usdhc3 description which corresponds to the wifi/bt chip > > > > > > > > > > > > Signed-off-by: Adrien Grassein <adrien.grassein@gmail.com> > > > > > > --- > > > > > > .../boot/dts/freescale/imx8mm-nitrogen-r2.dts | 31 +++++++++++++++++++ > > > > > > 1 file changed, 31 insertions(+) > > > > > > > > > > > > diff --git a/arch/arm64/boot/dts/freescale/imx8mm-nitrogen-r2.dts b/arch/arm64/boot/dts/freescale/imx8mm-nitrogen-r2.dts > > > > > > index c0c384d76147..212dc9e5e85d 100644 > > > > > > --- a/arch/arm64/boot/dts/freescale/imx8mm-nitrogen-r2.dts > > > > > > +++ b/arch/arm64/boot/dts/freescale/imx8mm-nitrogen-r2.dts > > > > > > @@ -9,6 +9,17 @@ > > > > > > / { > > > > > > model = "Boundary Devices i.MX8MMini Nitrogen8MM Rev2"; > > > > > > compatible = "boundary,imx8mm-nitrogen8mm", "fsl,imx8mm"; > > > > > > + > > > > > > + reg_wlan_vmmc: regulator-wlan-vmmc { > > > > > > + compatible = "regulator-fixed"; > > > > > > + pinctrl-names = "default"; > > > > > > + pinctrl-0 = <&pinctrl_reg_wlan_vmmc>; > > > > > > + regulator-name = "reg_wlan_vmmc"; > > > > > > + regulator-min-microvolt = <3300000>; > > > > > > + regulator-max-microvolt = <3300000>; > > > > > > + gpio = <&gpio3 20 GPIO_ACTIVE_HIGH>; > > > > > > + enable-active-high; > > > > > > + }; > > > > > > }; > > > > > > > > > > > > &A53_0 { > > > > > > @@ -206,6 +217,20 @@ &usdhc2 { > > > > > > status = "okay"; > > > > > > }; > > > > > > > > > > > > +/* wlan */ > > > > > > +&usdhc3 { > > > > > > + bus-width = <4>; > > > > > > + sdhci-caps-mask = <0x2 0x0>; > > > > > > + non-removable; > > > > > > + pinctrl-names = "default", "state_100mhz", "state_200mhz"; > > > > > > + pinctrl-0 = <&pinctrl_usdhc3>; > > > > > > + pinctrl-1 = <&pinctrl_usdhc3_100mhz>; > > > > > > + pinctrl-2 = <&pinctrl_usdhc3_200mhz>; > > > > > > + vmmc-supply = <®_wlan_vmmc>; > > > > > > + vqmmc-1-8-v; > > > > > > > > > > There is no such property in the bindings. > > > > > > > > > > > > > Sorry, I copied a property from the FSL kernel. > > > > I will fix this with a "fixed-regulator". > > > > > > I would assume this goes from PMIC, so check your schematics. There is > > > little point in adding a fixed regulator which is non-controllable. > > > > No, the 1.8V is issued directly from the alimentation stage. > > So we can't control it. > > > > > I think bindings don't require it. > > After reading some code, I can say that vqmmc is not mandatory but it > > helped to find out > > the caps of the mmc host. In this case, we only support 1.8V on vqmmc. > > It avoids driver to guess it (and avoid bad behaviour on any future change). > > If the supply (hardware) is really 1.8 V then indeed your approach is > good. So let's keep that one. > To be sure to understand well: should I keep the fixed regulator? Thanks, > Best regards, > Krzysztof Best regards, Adrien
On Tue, 23 Feb 2021 at 11:45, Adrien Grassein <adrien.grassein@gmail.com> wrote: > > > > > > > > I would assume this goes from PMIC, so check your schematics. There is > > > > little point in adding a fixed regulator which is non-controllable. > > > > > > No, the 1.8V is issued directly from the alimentation stage. > > > So we can't control it. > > > > > > > I think bindings don't require it. > > > After reading some code, I can say that vqmmc is not mandatory but it > > > helped to find out > > > the caps of the mmc host. In this case, we only support 1.8V on vqmmc. > > > It avoids driver to guess it (and avoid bad behaviour on any future change). > > > > If the supply (hardware) is really 1.8 V then indeed your approach is > > good. So let's keep that one. > > > > To be sure to understand well: should I keep the fixed regulator? > Thanks, Yes, keep it, at least I am fine with it. Best regards, Krzysztof
diff --git a/arch/arm64/boot/dts/freescale/imx8mm-nitrogen-r2.dts b/arch/arm64/boot/dts/freescale/imx8mm-nitrogen-r2.dts index c0c384d76147..212dc9e5e85d 100644 --- a/arch/arm64/boot/dts/freescale/imx8mm-nitrogen-r2.dts +++ b/arch/arm64/boot/dts/freescale/imx8mm-nitrogen-r2.dts @@ -9,6 +9,17 @@ / { model = "Boundary Devices i.MX8MMini Nitrogen8MM Rev2"; compatible = "boundary,imx8mm-nitrogen8mm", "fsl,imx8mm"; + + reg_wlan_vmmc: regulator-wlan-vmmc { + compatible = "regulator-fixed"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_reg_wlan_vmmc>; + regulator-name = "reg_wlan_vmmc"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + gpio = <&gpio3 20 GPIO_ACTIVE_HIGH>; + enable-active-high; + }; }; &A53_0 { @@ -206,6 +217,20 @@ &usdhc2 { status = "okay"; }; +/* wlan */ +&usdhc3 { + bus-width = <4>; + sdhci-caps-mask = <0x2 0x0>; + non-removable; + pinctrl-names = "default", "state_100mhz", "state_200mhz"; + pinctrl-0 = <&pinctrl_usdhc3>; + pinctrl-1 = <&pinctrl_usdhc3_100mhz>; + pinctrl-2 = <&pinctrl_usdhc3_200mhz>; + vmmc-supply = <®_wlan_vmmc>; + vqmmc-1-8-v; + status = "okay"; +}; + &wdog1 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_wdog>; @@ -264,6 +289,12 @@ MX8MM_IOMUXC_SAI2_RXC_GPIO4_IO22 0x1c0 >; }; + pinctrl_reg_wlan_vmmc: reg-wlan-vmmcgrp { + fsl,pins = < + MX8MM_IOMUXC_SAI5_RXC_GPIO3_IO20 0x16 + >; + }; + pinctrl_uart2: uart2grp { fsl,pins = < MX8MM_IOMUXC_UART2_RXD_UART2_DCE_RX 0x140
Add usdhc3 description which corresponds to the wifi/bt chip Signed-off-by: Adrien Grassein <adrien.grassein@gmail.com> --- .../boot/dts/freescale/imx8mm-nitrogen-r2.dts | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+)