linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] arm64: dts: meson-g12a: mmc updates
@ 2019-06-03 10:03 Neil Armstrong
  2019-06-03 10:03 ` [PATCH 1/4] arm64: dts: meson: g12a: add SDIO controller Neil Armstrong
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Neil Armstrong @ 2019-06-03 10:03 UTC (permalink / raw)
  To: khilman; +Cc: linux-amlogic, linux-arm-kernel, linux-kernel, Neil Armstrong

This patchset :
- adds the SDIO controller node using the dram-access-quirk
- adds SDCard, eMMC & SDIO support to X96
- Add SDIO support to SEI510

Guillaume La Roque (1):
  arm64: dts: meson-g12a-x96-max: add support for sdcard and emmc

Jerome Brunet (1):
  arm64: dts: meson: g12a: add SDIO controller

Neil Armstrong (2):
  arm64: dts: meson-g12a-x96-max: Enable Wifi SDIO Module
  arm64: dts: meson-g12a-sei510: Enable Wifi SDIO module

 .../boot/dts/amlogic/meson-g12a-sei510.dts    | 48 ++++++++++
 .../boot/dts/amlogic/meson-g12a-x96-max.dts   | 88 +++++++++++++++++++
 arch/arm64/boot/dts/amlogic/meson-g12a.dtsi   | 37 ++++++++
 3 files changed, 173 insertions(+)

-- 
2.21.0


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 1/4] arm64: dts: meson: g12a: add SDIO controller
  2019-06-03 10:03 [PATCH 0/4] arm64: dts: meson-g12a: mmc updates Neil Armstrong
@ 2019-06-03 10:03 ` Neil Armstrong
  2019-06-03 23:31   ` Kevin Hilman
  2019-06-03 10:03 ` [PATCH 2/4] arm64: dts: meson-g12a-x96-max: add support for sdcard and emmc Neil Armstrong
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 10+ messages in thread
From: Neil Armstrong @ 2019-06-03 10:03 UTC (permalink / raw)
  To: khilman
  Cc: linux-amlogic, linux-arm-kernel, linux-kernel, Jerome Brunet,
	Neil Armstrong

From: Jerome Brunet <jbrunet@baylibre.com>

The Amlogic G12A SDIO Controller has a bug preventing direct DDR access,
add the port A (SDIO) pinctrl and controller nodes and mark this specific
controller with the amlogic,dram-access-quirk property.

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
---
 arch/arm64/boot/dts/amlogic/meson-g12a.dtsi | 37 +++++++++++++++++++++
 1 file changed, 37 insertions(+)

diff --git a/arch/arm64/boot/dts/amlogic/meson-g12a.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12a.dtsi
index 840dab606110..9139913387ab 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12a.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-g12a.dtsi
@@ -1313,6 +1313,30 @@
 						};
 					};
 
+					sdio_pins: sdio {
+						mux {
+							groups = "sdio_d0",
+								 "sdio_d1",
+								 "sdio_d2",
+								 "sdio_d3",
+								 "sdio_cmd",
+								 "sdio_clk";
+							function = "sdio";
+							bias-disable;
+							drive-strength-microamp = <4000>;
+						};
+					};
+
+					sdio_clk_gate_pins: sdio_clk_gate {
+						mux {
+							groups = "GPIOX_4";
+							function = "gpio_periphs";
+							bias-pull-down;
+							drive-strength-microamp = <4000>;
+						};
+					};
+
+
 					uart_a_pins: uart-a {
 						mux {
 							groups = "uart_a_tx",
@@ -2303,6 +2327,19 @@
 			resets = <&reset RESET_SD_EMMC_C>;
 		};
 
+		sd_emmc_a: sd@ffe03000 {
+			compatible = "amlogic,meson-axg-mmc";
+			reg = <0x0 0xffe03000 0x0 0x800>;
+			interrupts = <GIC_SPI 189 IRQ_TYPE_EDGE_RISING>;
+			status = "disabled";
+			clocks = <&clkc CLKID_SD_EMMC_A>,
+				 <&clkc CLKID_SD_EMMC_A_CLK0>,
+				 <&clkc CLKID_FCLK_DIV2>;
+			clock-names = "core", "clkin0", "clkin1";
+			resets = <&reset RESET_SD_EMMC_A>;
+			amlogic,dram-access-quirk;
+		};
+
 		usb: usb@ffe09000 {
 			status = "disabled";
 			compatible = "amlogic,meson-g12a-usb-ctrl";
-- 
2.21.0


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 2/4] arm64: dts: meson-g12a-x96-max: add support for sdcard and emmc
  2019-06-03 10:03 [PATCH 0/4] arm64: dts: meson-g12a: mmc updates Neil Armstrong
  2019-06-03 10:03 ` [PATCH 1/4] arm64: dts: meson: g12a: add SDIO controller Neil Armstrong
@ 2019-06-03 10:03 ` Neil Armstrong
  2019-06-06 19:56   ` Martin Blumenstingl
  2019-06-03 10:03 ` [PATCH 3/4] arm64: dts: meson-g12a-x96-max: Enable Wifi SDIO Module Neil Armstrong
  2019-06-03 10:03 ` [PATCH 4/4] arm64: dts: meson-g12a-sei510: Enable Wifi SDIO module Neil Armstrong
  3 siblings, 1 reply; 10+ messages in thread
From: Neil Armstrong @ 2019-06-03 10:03 UTC (permalink / raw)
  To: khilman
  Cc: linux-amlogic, linux-arm-kernel, linux-kernel,
	Guillaume La Roque, Neil Armstrong

From: Guillaume La Roque <glaroque@baylibre.com>

Add nodes to support SDCard and onboard eMMC on the X96 Max.

Signed-off-by: Guillaume La Roque <glaroque@baylibre.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
---
 .../boot/dts/amlogic/meson-g12a-x96-max.dts   | 40 +++++++++++++++++++
 1 file changed, 40 insertions(+)

diff --git a/arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts b/arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts
index 5cdc263b03e6..69aae6c03dc5 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts
@@ -45,6 +45,11 @@
 		};
 	};
 
+	emmc_pwrseq: emmc-pwrseq {
+		compatible = "mmc-pwrseq-emmc";
+		reset-gpios = <&gpio BOOT_12 GPIO_ACTIVE_LOW>;
+	};
+
 	flash_1v8: regulator-flash_1v8 {
 		compatible = "regulator-fixed";
 		regulator-name = "FLASH_1V8";
@@ -172,3 +177,38 @@
 	status = "okay";
 	dr_mode = "host";
 };
+
+/* SD card */
+&sd_emmc_b {
+	status = "okay";
+	pinctrl-0 = <&sdcard_c_pins>;
+	pinctrl-1 = <&sdcard_clk_gate_c_pins>;
+	pinctrl-names = "default", "clk-gate";
+
+	bus-width = <4>;
+	cap-sd-highspeed;
+	max-frequency = <100000000>;
+	disable-wp;
+
+	cd-gpios = <&gpio GPIOC_6 GPIO_ACTIVE_LOW>;
+	vmmc-supply = <&vddao_3v3>;
+	vqmmc-supply = <&vddao_3v3>;
+};
+
+/* eMMC */
+&sd_emmc_c {
+	status = "okay";
+	pinctrl-0 = <&emmc_pins>, <&emmc_ds_pins>;
+	pinctrl-1 = <&emmc_clk_gate_pins>;
+	pinctrl-names = "default", "clk-gate";
+
+	bus-width = <8>;
+	cap-mmc-highspeed;
+	max-frequency = <100000000>;
+	non-removable;
+	disable-wp;
+
+	mmc-pwrseq = <&emmc_pwrseq>;
+	vmmc-supply = <&vcc_3v3>;
+	vqmmc-supply = <&flash_1v8>;
+};
-- 
2.21.0


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 3/4] arm64: dts: meson-g12a-x96-max: Enable Wifi SDIO Module
  2019-06-03 10:03 [PATCH 0/4] arm64: dts: meson-g12a: mmc updates Neil Armstrong
  2019-06-03 10:03 ` [PATCH 1/4] arm64: dts: meson: g12a: add SDIO controller Neil Armstrong
  2019-06-03 10:03 ` [PATCH 2/4] arm64: dts: meson-g12a-x96-max: add support for sdcard and emmc Neil Armstrong
@ 2019-06-03 10:03 ` Neil Armstrong
  2019-06-06 19:45   ` Martin Blumenstingl
  2019-06-03 10:03 ` [PATCH 4/4] arm64: dts: meson-g12a-sei510: Enable Wifi SDIO module Neil Armstrong
  3 siblings, 1 reply; 10+ messages in thread
From: Neil Armstrong @ 2019-06-03 10:03 UTC (permalink / raw)
  To: khilman; +Cc: linux-amlogic, linux-arm-kernel, linux-kernel, Neil Armstrong

The X96 Max embeds an AP6398S SDIO module, let's add the
corresponding SDIO, PWM clock and mmc-pwrseq nodes.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
---
 .../boot/dts/amlogic/meson-g12a-x96-max.dts   | 48 +++++++++++++++++++
 1 file changed, 48 insertions(+)

diff --git a/arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts b/arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts
index 69aae6c03dc5..8b263ec1e7a2 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts
@@ -50,6 +50,13 @@
 		reset-gpios = <&gpio BOOT_12 GPIO_ACTIVE_LOW>;
 	};
 
+	sdio_pwrseq: sdio-pwrseq {
+		compatible = "mmc-pwrseq-simple";
+		reset-gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>;
+		clocks = <&wifi32k>;
+		clock-names = "ext_clock";
+	};
+
 	flash_1v8: regulator-flash_1v8 {
 		compatible = "regulator-fixed";
 		regulator-name = "FLASH_1V8";
@@ -114,6 +121,13 @@
 		vin-supply = <&dc_in>;
 		regulator-always-on;
 	};
+
+	wifi32k: wifi32k {
+		compatible = "pwm-clock";
+		#clock-cells = <0>;
+		clock-frequency = <32768>;
+		pwms = <&pwm_ef 0 30518 0>; /* PWM_E at 32.768KHz */
+	};
 };
 
 &cec_AO {
@@ -155,6 +169,12 @@
 	pinctrl-names = "default";
 };
 
+&pwm_ef {
+	status = "okay";
+	pinctrl-0 = <&pwm_e_pins>;
+	pinctrl-names = "default";
+};
+
 &uart_A {
 	status = "okay";
 	pinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>;
@@ -178,6 +198,34 @@
 	dr_mode = "host";
 };
 
+/* SDIO */
+&sd_emmc_a {
+	status = "okay";
+	pinctrl-0 = <&sdio_pins>;
+	pinctrl-1 = <&sdio_clk_gate_pins>;
+	pinctrl-names = "default", "clk-gate";
+	#address-cells = <1>;
+	#size-cells = <0>;
+
+	bus-width = <4>;
+	cap-sd-highspeed;
+	sd-uhs-sdr50;
+	max-frequency = <100000000>;
+
+	non-removable;
+	disable-wp;
+
+	mmc-pwrseq = <&sdio_pwrseq>;
+
+	vmmc-supply = <&vddao_3v3>;
+	vqmmc-supply = <&vddao_1v8>;
+
+	brcmf: wifi@1 {
+		reg = <1>;
+		compatible = "brcm,bcm4329-fmac";
+	};
+};
+
 /* SD card */
 &sd_emmc_b {
 	status = "okay";
-- 
2.21.0


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 4/4] arm64: dts: meson-g12a-sei510: Enable Wifi SDIO module
  2019-06-03 10:03 [PATCH 0/4] arm64: dts: meson-g12a: mmc updates Neil Armstrong
                   ` (2 preceding siblings ...)
  2019-06-03 10:03 ` [PATCH 3/4] arm64: dts: meson-g12a-x96-max: Enable Wifi SDIO Module Neil Armstrong
@ 2019-06-03 10:03 ` Neil Armstrong
  2019-06-06 19:46   ` Martin Blumenstingl
  3 siblings, 1 reply; 10+ messages in thread
From: Neil Armstrong @ 2019-06-03 10:03 UTC (permalink / raw)
  To: khilman; +Cc: linux-amlogic, linux-arm-kernel, linux-kernel, Neil Armstrong

The SEI510 embeds an AP6398S SDIO module, let's add the
corresponding SDIO, PWM clock and mmc-pwrseq nodes.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
---
 .../boot/dts/amlogic/meson-g12a-sei510.dts    | 48 +++++++++++++++++++
 1 file changed, 48 insertions(+)

diff --git a/arch/arm64/boot/dts/amlogic/meson-g12a-sei510.dts b/arch/arm64/boot/dts/amlogic/meson-g12a-sei510.dts
index be1d9ed6d521..5a97379f2417 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12a-sei510.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-g12a-sei510.dts
@@ -128,6 +128,20 @@
 			no-map;
 		};
 	};
+
+	sdio_pwrseq: sdio-pwrseq {
+		compatible = "mmc-pwrseq-simple";
+		reset-gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>;
+		clocks = <&wifi32k>;
+		clock-names = "ext_clock";
+	};
+
+	wifi32k: wifi32k {
+		compatible = "pwm-clock";
+		#clock-cells = <0>;
+		clock-frequency = <32768>;
+		pwms = <&pwm_ef 0 30518 0>; /* PWM_E at 32.768KHz */
+	};
 };
 
 &cec_AO {
@@ -174,11 +188,45 @@
 	pinctrl-names = "default";
 };
 
+&pwm_ef {
+	status = "okay";
+	pinctrl-0 = <&pwm_e_pins>;
+	pinctrl-names = "default";
+};
+
 &saradc {
 	status = "okay";
 	vref-supply = <&vddio_ao1v8>;
 };
 
+/* SDIO */
+&sd_emmc_a {
+	status = "okay";
+	pinctrl-0 = <&sdio_pins>;
+	pinctrl-1 = <&sdio_clk_gate_pins>;
+	pinctrl-names = "default", "clk-gate";
+	#address-cells = <1>;
+	#size-cells = <0>;
+
+	bus-width = <4>;
+	cap-sd-highspeed;
+	sd-uhs-sdr50;
+	max-frequency = <100000000>;
+
+	non-removable;
+	disable-wp;
+
+	mmc-pwrseq = <&sdio_pwrseq>;
+
+	vmmc-supply = <&vddao_3v3>;
+	vqmmc-supply = <&vddio_ao1v8>;
+
+	brcmf: wifi@1 {
+		reg = <1>;
+		compatible = "brcm,bcm4329-fmac";
+	};
+};
+
 /* SD card */
 &sd_emmc_b {
 	status = "okay";
-- 
2.21.0


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH 1/4] arm64: dts: meson: g12a: add SDIO controller
  2019-06-03 10:03 ` [PATCH 1/4] arm64: dts: meson: g12a: add SDIO controller Neil Armstrong
@ 2019-06-03 23:31   ` Kevin Hilman
  2019-06-05  7:33     ` Neil Armstrong
  0 siblings, 1 reply; 10+ messages in thread
From: Kevin Hilman @ 2019-06-03 23:31 UTC (permalink / raw)
  To: Neil Armstrong
  Cc: linux-amlogic, linux-arm-kernel, linux-kernel, Jerome Brunet,
	Neil Armstrong

Neil Armstrong <narmstrong@baylibre.com> writes:

> From: Jerome Brunet <jbrunet@baylibre.com>
>
> The Amlogic G12A SDIO Controller has a bug preventing direct DDR access,
> add the port A (SDIO) pinctrl and controller nodes and mark this specific
> controller with the amlogic,dram-access-quirk property.
>
> Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>

I'm assuming this one should replace the one that was already sent with
the MMC quirks series?  Or maybe they identical (other than diff context?)

Kevin

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 1/4] arm64: dts: meson: g12a: add SDIO controller
  2019-06-03 23:31   ` Kevin Hilman
@ 2019-06-05  7:33     ` Neil Armstrong
  0 siblings, 0 replies; 10+ messages in thread
From: Neil Armstrong @ 2019-06-05  7:33 UTC (permalink / raw)
  To: Kevin Hilman; +Cc: linux-amlogic, linux-arm-kernel, linux-kernel, Jerome Brunet

On 04/06/2019 01:31, Kevin Hilman wrote:
> Neil Armstrong <narmstrong@baylibre.com> writes:
> 
>> From: Jerome Brunet <jbrunet@baylibre.com>
>>
>> The Amlogic G12A SDIO Controller has a bug preventing direct DDR access,
>> add the port A (SDIO) pinctrl and controller nodes and mark this specific
>> controller with the amlogic,dram-access-quirk property.
>>
>> Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
>> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
> 
> I'm assuming this one should replace the one that was already sent with
> the MMC quirks series?  Or maybe they identical (other than diff context?)
> 
> Kevin
> 

It's the same one but rebased on v5.3/dt64

Neil

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 3/4] arm64: dts: meson-g12a-x96-max: Enable Wifi SDIO Module
  2019-06-03 10:03 ` [PATCH 3/4] arm64: dts: meson-g12a-x96-max: Enable Wifi SDIO Module Neil Armstrong
@ 2019-06-06 19:45   ` Martin Blumenstingl
  0 siblings, 0 replies; 10+ messages in thread
From: Martin Blumenstingl @ 2019-06-06 19:45 UTC (permalink / raw)
  To: Neil Armstrong; +Cc: khilman, linux-amlogic, linux-kernel, linux-arm-kernel

Hi Neil,

On Mon, Jun 3, 2019 at 12:04 PM Neil Armstrong <narmstrong@baylibre.com> wrote:
>
> The X96 Max embeds an AP6398S SDIO module, let's add the
> corresponding SDIO, PWM clock and mmc-pwrseq nodes.
>
> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
with the comment below addressed:
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>

[...]
> @@ -155,6 +169,12 @@
>         pinctrl-names = "default";
>  };
>
> +&pwm_ef {
> +       status = "okay";
> +       pinctrl-0 = <&pwm_e_pins>;
> +       pinctrl-names = "default";
on the other boards we list the input clock explicitly here (I assume
to avoid jitter due to a less precise parent which may be the chip
default or set by the bootloader)

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 4/4] arm64: dts: meson-g12a-sei510: Enable Wifi SDIO module
  2019-06-03 10:03 ` [PATCH 4/4] arm64: dts: meson-g12a-sei510: Enable Wifi SDIO module Neil Armstrong
@ 2019-06-06 19:46   ` Martin Blumenstingl
  0 siblings, 0 replies; 10+ messages in thread
From: Martin Blumenstingl @ 2019-06-06 19:46 UTC (permalink / raw)
  To: Neil Armstrong; +Cc: khilman, linux-amlogic, linux-kernel, linux-arm-kernel

Hi Neil,

On Mon, Jun 3, 2019 at 12:04 PM Neil Armstrong <narmstrong@baylibre.com> wrote:
>
> The SEI510 embeds an AP6398S SDIO module, let's add the
> corresponding SDIO, PWM clock and mmc-pwrseq nodes.
>
> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
with the comment below addressed:
Acked-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>

[...]
> +&pwm_ef {
> +       status = "okay";
> +       pinctrl-0 = <&pwm_e_pins>;
> +       pinctrl-names = "default";
> +};
on the other boards we list the input clock explicitly here (I assume
to avoid jitter due to a less precise parent which may be the chip
default or set by the bootloader)

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 2/4] arm64: dts: meson-g12a-x96-max: add support for sdcard and emmc
  2019-06-03 10:03 ` [PATCH 2/4] arm64: dts: meson-g12a-x96-max: add support for sdcard and emmc Neil Armstrong
@ 2019-06-06 19:56   ` Martin Blumenstingl
  0 siblings, 0 replies; 10+ messages in thread
From: Martin Blumenstingl @ 2019-06-06 19:56 UTC (permalink / raw)
  To: Neil Armstrong
  Cc: khilman, linux-amlogic, Guillaume La Roque, linux-kernel,
	linux-arm-kernel

On Mon, Jun 3, 2019 at 12:04 PM Neil Armstrong <narmstrong@baylibre.com> wrote:
>
> From: Guillaume La Roque <glaroque@baylibre.com>
>
> Add nodes to support SDCard and onboard eMMC on the X96 Max.
>
> Signed-off-by: Guillaume La Roque <glaroque@baylibre.com>
> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2019-06-06 19:57 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-03 10:03 [PATCH 0/4] arm64: dts: meson-g12a: mmc updates Neil Armstrong
2019-06-03 10:03 ` [PATCH 1/4] arm64: dts: meson: g12a: add SDIO controller Neil Armstrong
2019-06-03 23:31   ` Kevin Hilman
2019-06-05  7:33     ` Neil Armstrong
2019-06-03 10:03 ` [PATCH 2/4] arm64: dts: meson-g12a-x96-max: add support for sdcard and emmc Neil Armstrong
2019-06-06 19:56   ` Martin Blumenstingl
2019-06-03 10:03 ` [PATCH 3/4] arm64: dts: meson-g12a-x96-max: Enable Wifi SDIO Module Neil Armstrong
2019-06-06 19:45   ` Martin Blumenstingl
2019-06-03 10:03 ` [PATCH 4/4] arm64: dts: meson-g12a-sei510: Enable Wifi SDIO module Neil Armstrong
2019-06-06 19:46   ` Martin Blumenstingl

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).