linux-amlogic.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] arm64: dts: meson: g12a: add mmc B and C
@ 2019-05-14  9:16 Jerome Brunet
  2019-05-14  9:16 ` [PATCH 1/3] arm64: dts: meson: g12a: add mmc nodes Jerome Brunet
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Jerome Brunet @ 2019-05-14  9:16 UTC (permalink / raw)
  To: Kevin Hilman; +Cc: devicetree, linux-amlogic, linux-kernel, Jerome Brunet

This patchset adds the MMC controller B and C to the g12a SoC as well
as the u200 and sei510 boards.

MMC controller A has been left out on purpose. This controller is
special on this SoC family and will be added later on.

Notice the use of the pinconf DT property 'drive-strength-microamp'.
Support for this property is not yet merged in meson pinctrl driver but
the DT part as been acked by the DT maintainer [0] so it should be safe
to use.

[0]: https://lkml.kernel.org/r/20190513152451.GA25690@bogus

Jerome Brunet (3):
  arm64: dts: meson: g12a: add mmc nodes
  arm64: dts: meson: u200: add sd and emmc
  arm64: dts: meson: sei510: add sd and emmc

 .../boot/dts/amlogic/meson-g12a-sei510.dts    |  42 ++++++
 .../boot/dts/amlogic/meson-g12a-u200.dts      |  42 ++++++
 arch/arm64/boot/dts/amlogic/meson-g12a.dtsi   | 124 ++++++++++++++++++
 3 files changed, 208 insertions(+)

-- 
2.20.1


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

* [PATCH 1/3] arm64: dts: meson: g12a: add mmc nodes
  2019-05-14  9:16 [PATCH 0/3] arm64: dts: meson: g12a: add mmc B and C Jerome Brunet
@ 2019-05-14  9:16 ` Jerome Brunet
  2019-05-14 18:29   ` Martin Blumenstingl
  2019-05-14  9:16 ` [PATCH 2/3] arm64: dts: meson: u200: add sd and emmc Jerome Brunet
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 9+ messages in thread
From: Jerome Brunet @ 2019-05-14  9:16 UTC (permalink / raw)
  To: Kevin Hilman; +Cc: devicetree, linux-amlogic, linux-kernel, Jerome Brunet

Add port B (sdcard) and port C (eMMC) pinctrl and controllers nodes to
the g12a DT.

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

diff --git a/arch/arm64/boot/dts/amlogic/meson-g12a.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12a.dtsi
index 2f4f4dd54cba..b2f08fc96568 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12a.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-g12a.dtsi
@@ -185,6 +185,48 @@
 						};
 					};
 
+					emmc_pins: emmc {
+						mux-0 {
+							groups = "emmc_nand_d0",
+								 "emmc_nand_d1",
+								 "emmc_nand_d2",
+								 "emmc_nand_d3",
+								 "emmc_nand_d4",
+								 "emmc_nand_d5",
+								 "emmc_nand_d6",
+								 "emmc_nand_d7",
+								 "emmc_cmd";
+							function = "emmc";
+							bias-pull-up;
+							drive-strength-microamp = <4000>;
+						};
+
+						mux-1 {
+							groups = "emmc_clk";
+							function = "emmc";
+							bias-disable;
+							drive-strength-microamp = <4000>;
+						};
+					};
+
+					emmc_ds_pins: emmc-ds {
+						mux {
+							groups = "emmc_nand_ds";
+							function = "emmc";
+							bias-pull-down;
+							drive-strength-microamp = <4000>;
+						};
+					};
+
+					emmc_clk_gate_pins: emmc_clk_gate {
+						mux {
+							groups = "BOOT_8";
+							function = "gpio_periphs";
+							bias-pull-down;
+							drive-strength-microamp = <4000>;
+						};
+					};
+
 					hdmitx_ddc_pins: hdmitx_ddc {
 						mux {
 							groups = "hdmitx_sda",
@@ -290,6 +332,64 @@
 						};
 					};
 
+					sdcard_c_pins: sdcard_c {
+						mux-0 {
+							groups = "sdcard_d0_c",
+								 "sdcard_d1_c",
+								 "sdcard_d2_c",
+								 "sdcard_d3_c",
+								 "sdcard_cmd_c";
+							function = "sdcard";
+							bias-pull-up;
+							drive-strength-microamp = <4000>;
+						};
+
+						mux-1 {
+							groups = "sdcard_clk_c";
+							function = "sdcard";
+							bias-disable;
+							drive-strength-microamp = <4000>;
+						};
+					};
+
+					sdcard_clk_gate_c_pins: sdcard_clk_gate_c {
+						mux {
+							groups = "GPIOC_4";
+							function = "gpio_periphs";
+							bias-pull-down;
+							drive-strength-microamp = <4000>;
+						};
+					};
+
+					sdcard_z_pins: sdcard_z {
+						mux-0 {
+							groups = "sdcard_d0_z",
+								 "sdcard_d1_z",
+								 "sdcard_d2_z",
+								 "sdcard_d3_z",
+								 "sdcard_cmd_z";
+							function = "sdcard";
+							bias-pull-up;
+							drive-strength-microamp = <4000>;
+						};
+
+						mux-1 {
+							groups = "sdcard_clk_z";
+							function = "sdcard";
+							bias-disable;
+							drive-strength-microamp = <4000>;
+						};
+					};
+
+					sdcard_clk_gate_z_pins: sdcard_clk_gate_z {
+						mux {
+							groups = "GPIOZ_6";
+							function = "gpio_periphs";
+							bias-pull-down;
+							drive-strength-microamp = <4000>;
+						};
+					};
+
 					uart_a_pins: uart-a {
 						mux {
 							groups = "uart_a_tx",
@@ -759,6 +859,30 @@
 			};
 		};
 
+		sd_emmc_b: sd@ffe05000 {
+			compatible = "amlogic,meson-axg-mmc";
+			reg = <0x0 0xffe05000 0x0 0x800>;
+			interrupts = <GIC_SPI 190 IRQ_TYPE_EDGE_RISING>;
+			status = "disabled";
+			clocks = <&clkc CLKID_SD_EMMC_B>,
+				 <&clkc CLKID_SD_EMMC_B_CLK0>,
+				 <&clkc CLKID_FCLK_DIV2>;
+			clock-names = "core", "clkin0", "clkin1";
+			resets = <&reset RESET_SD_EMMC_B>;
+		};
+
+		sd_emmc_c: mmc@ffe07000 {
+			compatible = "amlogic,meson-axg-mmc";
+			reg = <0x0 0xffe07000 0x0 0x800>;
+			interrupts = <GIC_SPI 191 IRQ_TYPE_EDGE_RISING>;
+			status = "disabled";
+			clocks = <&clkc CLKID_SD_EMMC_C>,
+				 <&clkc CLKID_SD_EMMC_C_CLK0>,
+				 <&clkc CLKID_FCLK_DIV2>;
+			clock-names = "core", "clkin0", "clkin1";
+			resets = <&reset RESET_SD_EMMC_C>;
+		};
+
 		usb: usb@ffe09000 {
 			status = "disabled";
 			compatible = "amlogic,meson-g12a-usb-ctrl";
-- 
2.20.1


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

* [PATCH 2/3] arm64: dts: meson: u200: add sd and emmc
  2019-05-14  9:16 [PATCH 0/3] arm64: dts: meson: g12a: add mmc B and C Jerome Brunet
  2019-05-14  9:16 ` [PATCH 1/3] arm64: dts: meson: g12a: add mmc nodes Jerome Brunet
@ 2019-05-14  9:16 ` Jerome Brunet
  2019-05-14 18:24   ` Martin Blumenstingl
  2019-05-14  9:16 ` [PATCH 3/3] arm64: dts: meson: sei510: " Jerome Brunet
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 9+ messages in thread
From: Jerome Brunet @ 2019-05-14  9:16 UTC (permalink / raw)
  To: Kevin Hilman; +Cc: devicetree, linux-amlogic, linux-kernel, Jerome Brunet

Enable eMMC and SDCard on the g12a u200 board

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
---
 .../boot/dts/amlogic/meson-g12a-u200.dts      | 42 +++++++++++++++++++
 1 file changed, 42 insertions(+)

diff --git a/arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts b/arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts
index 7cc3e2d6a4f1..972926121beb 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts
@@ -31,6 +31,11 @@
 		};
 	};
 
+	emmc_pwrseq: emmc-pwrseq {
+		compatible = "mmc-pwrseq-emmc";
+		reset-gpios = <&gpio BOOT_12 GPIO_ACTIVE_LOW>;
+	};
+
 	hdmi-connector {
 		compatible = "hdmi-connector";
 		type = "a";
@@ -164,6 +169,43 @@
 	pinctrl-names = "default";
 };
 
+/* 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 = <50000000>;
+	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;
+	mmc-ddr-1_8v;
+	mmc-hs200-1_8v;
+	max-frequency = <200000000>;
+	non-removable;
+	disable-wp;
+
+	mmc-pwrseq = <&emmc_pwrseq>;
+	vmmc-supply = <&vcc_3v3>;
+	vqmmc-supply = <&flash_1v8>;
+};
+
 &uart_AO {
 	status = "okay";
 	pinctrl-0 = <&uart_ao_a_pins>;
-- 
2.20.1


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

* [PATCH 3/3] arm64: dts: meson: sei510: add sd and emmc
  2019-05-14  9:16 [PATCH 0/3] arm64: dts: meson: g12a: add mmc B and C Jerome Brunet
  2019-05-14  9:16 ` [PATCH 1/3] arm64: dts: meson: g12a: add mmc nodes Jerome Brunet
  2019-05-14  9:16 ` [PATCH 2/3] arm64: dts: meson: u200: add sd and emmc Jerome Brunet
@ 2019-05-14  9:16 ` Jerome Brunet
  2019-05-14 18:24   ` Martin Blumenstingl
  2019-05-14 10:21 ` [PATCH 0/3] arm64: dts: meson: g12a: add mmc B and C Neil Armstrong
  2019-05-15  0:23 ` Kevin Hilman
  4 siblings, 1 reply; 9+ messages in thread
From: Jerome Brunet @ 2019-05-14  9:16 UTC (permalink / raw)
  To: Kevin Hilman; +Cc: devicetree, linux-amlogic, linux-kernel, Jerome Brunet

Enable eMMC and SDCard on the g12a sei510 board

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
---
 .../boot/dts/amlogic/meson-g12a-sei510.dts    | 42 +++++++++++++++++++
 1 file changed, 42 insertions(+)

diff --git a/arch/arm64/boot/dts/amlogic/meson-g12a-sei510.dts b/arch/arm64/boot/dts/amlogic/meson-g12a-sei510.dts
index 61fb30047d7f..bb45e3577ff5 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12a-sei510.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-g12a-sei510.dts
@@ -45,6 +45,11 @@
 		};
 	};
 
+	emmc_pwrseq: emmc-pwrseq {
+		compatible = "mmc-pwrseq-emmc";
+		reset-gpios = <&gpio BOOT_12 GPIO_ACTIVE_LOW>;
+	};
+
 	hdmi-connector {
 		compatible = "hdmi-connector";
 		type = "a";
@@ -161,6 +166,43 @@
 	vref-supply = <&vddio_ao1v8>;
 };
 
+/* 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 = <50000000>;
+	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;
+	mmc-ddr-1_8v;
+	mmc-hs200-1_8v;
+	max-frequency = <200000000>;
+	non-removable;
+	disable-wp;
+
+	mmc-pwrseq = <&emmc_pwrseq>;
+	vmmc-supply = <&vddao_3v3>;
+	vqmmc-supply = <&emmc_1v8>;
+};
+
 &uart_A {
 	status = "okay";
 	pinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>;
-- 
2.20.1


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

* Re: [PATCH 0/3] arm64: dts: meson: g12a: add mmc B and C
  2019-05-14  9:16 [PATCH 0/3] arm64: dts: meson: g12a: add mmc B and C Jerome Brunet
                   ` (2 preceding siblings ...)
  2019-05-14  9:16 ` [PATCH 3/3] arm64: dts: meson: sei510: " Jerome Brunet
@ 2019-05-14 10:21 ` Neil Armstrong
  2019-05-15  0:23 ` Kevin Hilman
  4 siblings, 0 replies; 9+ messages in thread
From: Neil Armstrong @ 2019-05-14 10:21 UTC (permalink / raw)
  To: Jerome Brunet, Kevin Hilman; +Cc: devicetree, linux-kernel, linux-amlogic

On 14/05/2019 11:16, Jerome Brunet wrote:
> This patchset adds the MMC controller B and C to the g12a SoC as well
> as the u200 and sei510 boards.
> 
> MMC controller A has been left out on purpose. This controller is
> special on this SoC family and will be added later on.
> 
> Notice the use of the pinconf DT property 'drive-strength-microamp'.
> Support for this property is not yet merged in meson pinctrl driver but
> the DT part as been acked by the DT maintainer [0] so it should be safe
> to use.
> 
> [0]: https://lkml.kernel.org/r/20190513152451.GA25690@bogus
> 
> Jerome Brunet (3):
>   arm64: dts: meson: g12a: add mmc nodes
>   arm64: dts: meson: u200: add sd and emmc
>   arm64: dts: meson: sei510: add sd and emmc
> 
>  .../boot/dts/amlogic/meson-g12a-sei510.dts    |  42 ++++++
>  .../boot/dts/amlogic/meson-g12a-u200.dts      |  42 ++++++
>  arch/arm64/boot/dts/amlogic/meson-g12a.dtsi   | 124 ++++++++++++++++++
>  3 files changed, 208 insertions(+)
> 

Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

* Re: [PATCH 3/3] arm64: dts: meson: sei510: add sd and emmc
  2019-05-14  9:16 ` [PATCH 3/3] arm64: dts: meson: sei510: " Jerome Brunet
@ 2019-05-14 18:24   ` Martin Blumenstingl
  0 siblings, 0 replies; 9+ messages in thread
From: Martin Blumenstingl @ 2019-05-14 18:24 UTC (permalink / raw)
  To: Jerome Brunet; +Cc: Kevin Hilman, linux-amlogic, linux-kernel, devicetree

On Tue, May 14, 2019 at 11:16 AM Jerome Brunet <jbrunet@baylibre.com> wrote:
>
> Enable eMMC and SDCard on the g12a sei510 board
>
> Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
I compared the GPIOs with the Odroid-N2 schematics because I'm
assuming that they will be the same on all G12A/G12B boards:
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

* Re: [PATCH 2/3] arm64: dts: meson: u200: add sd and emmc
  2019-05-14  9:16 ` [PATCH 2/3] arm64: dts: meson: u200: add sd and emmc Jerome Brunet
@ 2019-05-14 18:24   ` Martin Blumenstingl
  0 siblings, 0 replies; 9+ messages in thread
From: Martin Blumenstingl @ 2019-05-14 18:24 UTC (permalink / raw)
  To: Jerome Brunet; +Cc: Kevin Hilman, linux-amlogic, linux-kernel, devicetree

On Tue, May 14, 2019 at 11:16 AM Jerome Brunet <jbrunet@baylibre.com> wrote:
>
> Enable eMMC and SDCard on the g12a u200 board
>
> Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
I compared the GPIOs with the Odroid-N2 schematics because I'm
assuming that they will be the same on all G12A/G12B boards:
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

* Re: [PATCH 1/3] arm64: dts: meson: g12a: add mmc nodes
  2019-05-14  9:16 ` [PATCH 1/3] arm64: dts: meson: g12a: add mmc nodes Jerome Brunet
@ 2019-05-14 18:29   ` Martin Blumenstingl
  0 siblings, 0 replies; 9+ messages in thread
From: Martin Blumenstingl @ 2019-05-14 18:29 UTC (permalink / raw)
  To: Jerome Brunet; +Cc: Kevin Hilman, linux-amlogic, linux-kernel, devicetree

On Tue, May 14, 2019 at 11:16 AM Jerome Brunet <jbrunet@baylibre.com> wrote:
>
> Add port B (sdcard) and port C (eMMC) pinctrl and controllers nodes to
> the g12a DT.
I assume port A is missing due to the controller bug (missing DDR
access) for which Neil has sent a fix. this shouldn't stop us from
adding SD card and eMMC support though

first I was surprised to see that the MMC controllers are not part of any bus.
however, the public S922X datasheet mentions the MMC controllers
directly in the memory map (on page 83), so Jerome is doing the right
thing here as far as I can tell

> Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

* Re: [PATCH 0/3] arm64: dts: meson: g12a: add mmc B and C
  2019-05-14  9:16 [PATCH 0/3] arm64: dts: meson: g12a: add mmc B and C Jerome Brunet
                   ` (3 preceding siblings ...)
  2019-05-14 10:21 ` [PATCH 0/3] arm64: dts: meson: g12a: add mmc B and C Neil Armstrong
@ 2019-05-15  0:23 ` Kevin Hilman
  4 siblings, 0 replies; 9+ messages in thread
From: Kevin Hilman @ 2019-05-15  0:23 UTC (permalink / raw)
  To: Jerome Brunet; +Cc: devicetree, linux-amlogic, linux-kernel, Jerome Brunet

Jerome Brunet <jbrunet@baylibre.com> writes:

> This patchset adds the MMC controller B and C to the g12a SoC as well
> as the u200 and sei510 boards.
>
> MMC controller A has been left out on purpose. This controller is
> special on this SoC family and will be added later on.
>
> Notice the use of the pinconf DT property 'drive-strength-microamp'.
> Support for this property is not yet merged in meson pinctrl driver but
> the DT part as been acked by the DT maintainer [0] so it should be safe
> to use.
>
> [0]: https://lkml.kernel.org/r/20190513152451.GA25690@bogus

Queued for v5.3 with tags from Neil and Martin,

Kevin

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

end of thread, other threads:[~2019-05-15  0:24 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-14  9:16 [PATCH 0/3] arm64: dts: meson: g12a: add mmc B and C Jerome Brunet
2019-05-14  9:16 ` [PATCH 1/3] arm64: dts: meson: g12a: add mmc nodes Jerome Brunet
2019-05-14 18:29   ` Martin Blumenstingl
2019-05-14  9:16 ` [PATCH 2/3] arm64: dts: meson: u200: add sd and emmc Jerome Brunet
2019-05-14 18:24   ` Martin Blumenstingl
2019-05-14  9:16 ` [PATCH 3/3] arm64: dts: meson: sei510: " Jerome Brunet
2019-05-14 18:24   ` Martin Blumenstingl
2019-05-14 10:21 ` [PATCH 0/3] arm64: dts: meson: g12a: add mmc B and C Neil Armstrong
2019-05-15  0:23 ` Kevin Hilman

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