diff mbox series

[v3,4/4] ARM: dts: at91: sama5d27_wlsom1: add wifi device

Message ID 20210820092803.78523-5-claudiu.beznea@microchip.com
State New
Headers show
Series mmc: pwrseq: sd8787: add support wilc1000 devices | expand

Commit Message

Claudiu Beznea Aug. 20, 2021, 9:28 a.m. UTC
From: Eugen Hristev <eugen.hristev@microchip.com>

SAMA5D27 WLSOM1 boards has a WILC3000 device soldered. Add proper
device tree nodes for this.

[eugen.hristev: original author of this code]
Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
[nicolas.ferre: original author of this code]
Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
---
 arch/arm/boot/dts/at91-sama5d27_wlsom1.dtsi | 71 +++++++++++++++++++++
 1 file changed, 71 insertions(+)

Comments

Rob Herring (Arm) Aug. 24, 2021, 12:23 p.m. UTC | #1
On Fri, Aug 20, 2021 at 12:28:03PM +0300, Claudiu Beznea wrote:
> From: Eugen Hristev <eugen.hristev@microchip.com>
> 
> SAMA5D27 WLSOM1 boards has a WILC3000 device soldered. Add proper
> device tree nodes for this.
> 
> [eugen.hristev: original author of this code]
> Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
> [nicolas.ferre: original author of this code]
> Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com>
> Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
> ---
>  arch/arm/boot/dts/at91-sama5d27_wlsom1.dtsi | 71 +++++++++++++++++++++
>  1 file changed, 71 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/at91-sama5d27_wlsom1.dtsi b/arch/arm/boot/dts/at91-sama5d27_wlsom1.dtsi
> index 025a78310e3a..c7bcfd3ce91d 100644
> --- a/arch/arm/boot/dts/at91-sama5d27_wlsom1.dtsi
> +++ b/arch/arm/boot/dts/at91-sama5d27_wlsom1.dtsi
> @@ -30,6 +30,15 @@ main_xtal {
>  			clock-frequency = <24000000>;
>  		};
>  	};
> +
> +	wifi_pwrseq: wifi_pwrseq {
> +		compatible = "mmc-pwrseq-wilc1000";
> +		reset-gpios = <&pioA PIN_PA27 GPIO_ACTIVE_HIGH>;
> +		powerdown-gpios = <&pioA PIN_PA29 GPIO_ACTIVE_HIGH>;
> +		pinctrl-0 = <&pinctrl_wilc_pwrseq>;
> +		pinctrl-names = "default";
> +		status = "okay";

'okay' is the default, so you can drop this.

> +	};
>  };
>  
>  &flx1 {
> @@ -310,5 +319,67 @@ pinctrl_qspi1_default: qspi1_default {
>  			 <PIN_PB10__QSPI1_IO3>;
>  		bias-pull-up;
>  	};
> +
> +	pinctrl_sdmmc1_default: sdmmc1_default {
> +		cmd-data {
> +			pinmux = <PIN_PA28__SDMMC1_CMD>,
> +				 <PIN_PA18__SDMMC1_DAT0>,
> +				 <PIN_PA19__SDMMC1_DAT1>,
> +				 <PIN_PA20__SDMMC1_DAT2>,
> +				 <PIN_PA21__SDMMC1_DAT3>;
> +			bias-disable;
> +		};
> +
> +		conf-ck {
> +			pinmux = <PIN_PA22__SDMMC1_CK>;
> +			bias-disable;
> +		};
> +	};
> +
> +	pinctrl_wilc_default: wilc_default {
> +		conf-irq {
> +			pinmux = <PIN_PB25__GPIO>;
> +			bias-disable;
> +		};
> +	};
> +
> +	pinctrl_wilc_pwrseq: wilc_pwrseq {
> +		conf-ce-nrst {
> +			pinmux = <PIN_PA27__GPIO>,
> +				 <PIN_PA29__GPIO>;
> +			bias-disable;
> +		};
> +
> +		conf-rtcclk {
> +			pinmux = <PIN_PB13__PCK1>;
> +			bias-disable;
> +		};
> +	};
> +};
> +
> +&sdmmc1 {
> +	#address-cells = <1>;
> +	#size-cells = <0>;
> +	bus-width = <4>;
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&pinctrl_sdmmc1_default>;
> +	mmc-pwrseq = <&wifi_pwrseq>;
> +	no-1-8-v;
> +	non-removable;
> +	status = "okay";
> +
> +	wilc: wilc@0 {

wifi@0

> +		reg = <0>;
> +		bus-width = <4>;
> +		compatible = "microchip,wilc3000", "microchip,wilc1000";
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&pinctrl_wilc_default>;
> +		irq-gpios = <&pioA PIN_PB25 GPIO_ACTIVE_LOW>;
> +		clocks = <&pmc PMC_TYPE_SYSTEM 9>;
> +		clock-names = "rtc";
> +		assigned-clocks = <&pmc PMC_TYPE_SYSTEM 9>;
> +		assigned-clock-rates = <32768>;
> +		status = "okay";

Again, that's the default so drop.

Did you run validation (make dtbs_check) on your changes because I see 
multiple problems.

Rob
Claudiu Beznea Aug. 24, 2021, 3:26 p.m. UTC | #2
On 24.08.2021 15:23, Rob Herring wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe

> 

> On Fri, Aug 20, 2021 at 12:28:03PM +0300, Claudiu Beznea wrote:

>> From: Eugen Hristev <eugen.hristev@microchip.com>

>>

>> SAMA5D27 WLSOM1 boards has a WILC3000 device soldered. Add proper

>> device tree nodes for this.

>>

>> [eugen.hristev: original author of this code]

>> Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>

>> [nicolas.ferre: original author of this code]

>> Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com>

>> Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>

>> ---

>>  arch/arm/boot/dts/at91-sama5d27_wlsom1.dtsi | 71 +++++++++++++++++++++

>>  1 file changed, 71 insertions(+)

>>

>> diff --git a/arch/arm/boot/dts/at91-sama5d27_wlsom1.dtsi b/arch/arm/boot/dts/at91-sama5d27_wlsom1.dtsi

>> index 025a78310e3a..c7bcfd3ce91d 100644

>> --- a/arch/arm/boot/dts/at91-sama5d27_wlsom1.dtsi

>> +++ b/arch/arm/boot/dts/at91-sama5d27_wlsom1.dtsi

>> @@ -30,6 +30,15 @@ main_xtal {

>>                       clock-frequency = <24000000>;

>>               };

>>       };

>> +

>> +     wifi_pwrseq: wifi_pwrseq {

>> +             compatible = "mmc-pwrseq-wilc1000";

>> +             reset-gpios = <&pioA PIN_PA27 GPIO_ACTIVE_HIGH>;

>> +             powerdown-gpios = <&pioA PIN_PA29 GPIO_ACTIVE_HIGH>;

>> +             pinctrl-0 = <&pinctrl_wilc_pwrseq>;

>> +             pinctrl-names = "default";

>> +             status = "okay";

> 

> 'okay' is the default, so you can drop this.

> 

>> +     };

>>  };

>>

>>  &flx1 {

>> @@ -310,5 +319,67 @@ pinctrl_qspi1_default: qspi1_default {

>>                        <PIN_PB10__QSPI1_IO3>;

>>               bias-pull-up;

>>       };

>> +

>> +     pinctrl_sdmmc1_default: sdmmc1_default {

>> +             cmd-data {

>> +                     pinmux = <PIN_PA28__SDMMC1_CMD>,

>> +                              <PIN_PA18__SDMMC1_DAT0>,

>> +                              <PIN_PA19__SDMMC1_DAT1>,

>> +                              <PIN_PA20__SDMMC1_DAT2>,

>> +                              <PIN_PA21__SDMMC1_DAT3>;

>> +                     bias-disable;

>> +             };

>> +

>> +             conf-ck {

>> +                     pinmux = <PIN_PA22__SDMMC1_CK>;

>> +                     bias-disable;

>> +             };

>> +     };

>> +

>> +     pinctrl_wilc_default: wilc_default {

>> +             conf-irq {

>> +                     pinmux = <PIN_PB25__GPIO>;

>> +                     bias-disable;

>> +             };

>> +     };

>> +

>> +     pinctrl_wilc_pwrseq: wilc_pwrseq {

>> +             conf-ce-nrst {

>> +                     pinmux = <PIN_PA27__GPIO>,

>> +                              <PIN_PA29__GPIO>;

>> +                     bias-disable;

>> +             };

>> +

>> +             conf-rtcclk {

>> +                     pinmux = <PIN_PB13__PCK1>;

>> +                     bias-disable;

>> +             };

>> +     };

>> +};

>> +

>> +&sdmmc1 {

>> +     #address-cells = <1>;

>> +     #size-cells = <0>;

>> +     bus-width = <4>;

>> +     pinctrl-names = "default";

>> +     pinctrl-0 = <&pinctrl_sdmmc1_default>;

>> +     mmc-pwrseq = <&wifi_pwrseq>;

>> +     no-1-8-v;

>> +     non-removable;

>> +     status = "okay";

>> +

>> +     wilc: wilc@0 {

> 

> wifi@0

> 

>> +             reg = <0>;

>> +             bus-width = <4>;

>> +             compatible = "microchip,wilc3000", "microchip,wilc1000";

>> +             pinctrl-names = "default";

>> +             pinctrl-0 = <&pinctrl_wilc_default>;

>> +             irq-gpios = <&pioA PIN_PB25 GPIO_ACTIVE_LOW>;

>> +             clocks = <&pmc PMC_TYPE_SYSTEM 9>;

>> +             clock-names = "rtc";

>> +             assigned-clocks = <&pmc PMC_TYPE_SYSTEM 9>;

>> +             assigned-clock-rates = <32768>;

>> +             status = "okay";

> 

> Again, that's the default so drop.

> 

> Did you run validation (make dtbs_check) on your changes because I see

> multiple problems.


No, I haven't. Apologies! I'll do the proper adjustments in v3.

Thank you for your review,
Claudiu Beznea

> 

> Rob

>
diff mbox series

Patch

diff --git a/arch/arm/boot/dts/at91-sama5d27_wlsom1.dtsi b/arch/arm/boot/dts/at91-sama5d27_wlsom1.dtsi
index 025a78310e3a..c7bcfd3ce91d 100644
--- a/arch/arm/boot/dts/at91-sama5d27_wlsom1.dtsi
+++ b/arch/arm/boot/dts/at91-sama5d27_wlsom1.dtsi
@@ -30,6 +30,15 @@  main_xtal {
 			clock-frequency = <24000000>;
 		};
 	};
+
+	wifi_pwrseq: wifi_pwrseq {
+		compatible = "mmc-pwrseq-wilc1000";
+		reset-gpios = <&pioA PIN_PA27 GPIO_ACTIVE_HIGH>;
+		powerdown-gpios = <&pioA PIN_PA29 GPIO_ACTIVE_HIGH>;
+		pinctrl-0 = <&pinctrl_wilc_pwrseq>;
+		pinctrl-names = "default";
+		status = "okay";
+	};
 };
 
 &flx1 {
@@ -310,5 +319,67 @@  pinctrl_qspi1_default: qspi1_default {
 			 <PIN_PB10__QSPI1_IO3>;
 		bias-pull-up;
 	};
+
+	pinctrl_sdmmc1_default: sdmmc1_default {
+		cmd-data {
+			pinmux = <PIN_PA28__SDMMC1_CMD>,
+				 <PIN_PA18__SDMMC1_DAT0>,
+				 <PIN_PA19__SDMMC1_DAT1>,
+				 <PIN_PA20__SDMMC1_DAT2>,
+				 <PIN_PA21__SDMMC1_DAT3>;
+			bias-disable;
+		};
+
+		conf-ck {
+			pinmux = <PIN_PA22__SDMMC1_CK>;
+			bias-disable;
+		};
+	};
+
+	pinctrl_wilc_default: wilc_default {
+		conf-irq {
+			pinmux = <PIN_PB25__GPIO>;
+			bias-disable;
+		};
+	};
+
+	pinctrl_wilc_pwrseq: wilc_pwrseq {
+		conf-ce-nrst {
+			pinmux = <PIN_PA27__GPIO>,
+				 <PIN_PA29__GPIO>;
+			bias-disable;
+		};
+
+		conf-rtcclk {
+			pinmux = <PIN_PB13__PCK1>;
+			bias-disable;
+		};
+	};
+};
+
+&sdmmc1 {
+	#address-cells = <1>;
+	#size-cells = <0>;
+	bus-width = <4>;
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_sdmmc1_default>;
+	mmc-pwrseq = <&wifi_pwrseq>;
+	no-1-8-v;
+	non-removable;
+	status = "okay";
+
+	wilc: wilc@0 {
+		reg = <0>;
+		bus-width = <4>;
+		compatible = "microchip,wilc3000", "microchip,wilc1000";
+		pinctrl-names = "default";
+		pinctrl-0 = <&pinctrl_wilc_default>;
+		irq-gpios = <&pioA PIN_PB25 GPIO_ACTIVE_LOW>;
+		clocks = <&pmc PMC_TYPE_SYSTEM 9>;
+		clock-names = "rtc";
+		assigned-clocks = <&pmc PMC_TYPE_SYSTEM 9>;
+		assigned-clock-rates = <32768>;
+		status = "okay";
+	};
 };