From: Anton Vorontsov <avorontsov-hkdhdckH98+B+jHODAdFcQ@public.gmane.org>
To: Kumar Gala
<galak-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r@public.gmane.org>,
David Brownell
<dbrownell-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
Cc: linuxppc-dev-mnsaURCQ41sdnm+yROfE0A@public.gmane.org,
spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: [PATCH 7/7] powerpc/83xx: Add mmc-spi support via the device tree for MPC8323E-RDB
Date: Fri, 5 Dec 2008 23:10:43 +0300 [thread overview]
Message-ID: <20081205201043.GG19758@oksana.dev.rtsoft.ru> (raw)
In-Reply-To: <20081205200936.GA19137-wnGakbxT3iijyJ0x5qLZdcN33GVbZNy3@public.gmane.org>
- Add gpio-controller node to manage QE GPIO Bank D;
- Add mmc-spi node;
- Modify board file so that it won't use legacy SPI support with the new
device trees.
Signed-off-by: Anton Vorontsov <avorontsov-hkdhdckH98+B+jHODAdFcQ@public.gmane.org>
---
arch/powerpc/boot/dts/mpc832x_rdb.dts | 24 ++++++++++++++++++++++++
arch/powerpc/platforms/83xx/mpc832x_rdb.c | 6 ++++++
2 files changed, 30 insertions(+), 0 deletions(-)
diff --git a/arch/powerpc/boot/dts/mpc832x_rdb.dts b/arch/powerpc/boot/dts/mpc832x_rdb.dts
index dea3091..4319bd7 100644
--- a/arch/powerpc/boot/dts/mpc832x_rdb.dts
+++ b/arch/powerpc/boot/dts/mpc832x_rdb.dts
@@ -152,10 +152,21 @@
};
par_io@1400 {
+ #address-cells = <1>;
+ #size-cells = <1>;
reg = <0x1400 0x100>;
+ ranges = <3 0x1448 0x18>;
+ compatible = "fsl,mpc8323-qe-pario";
device_type = "par_io";
num-ports = <7>;
+ qe_pio_d: gpio-controller@1448 {
+ #gpio-cells = <2>;
+ compatible = "fsl,mpc8323-qe-pario-bank";
+ reg = <3 0x18>;
+ gpio-controller;
+ };
+
ucc2pio:ucc_pin@02 {
pio-map = <
/* port pin dir open_drain assignment has_irq */
@@ -225,12 +236,25 @@
};
spi@4c0 {
+ #address-cells = <1>;
+ #size-cells = <0>;
cell-index = <0>;
compatible = "fsl,spi";
reg = <0x4c0 0x40>;
interrupts = <2>;
interrupt-parent = <&qeic>;
+ gpios = <&qe_pio_d 13 0>;
mode = "cpu-qe";
+
+ mmc-slot@0 {
+ compatible = "fsl,mpc8323rdb-mmc-slot",
+ "mmc-spi-slot";
+ reg = <0>;
+ gpios = <&qe_pio_d 14 1
+ &qe_pio_d 15 0>;
+ voltage-ranges = <3300 3300>;
+ spi-max-frequency = <50000000>;
+ };
};
spi@500 {
diff --git a/arch/powerpc/platforms/83xx/mpc832x_rdb.c b/arch/powerpc/platforms/83xx/mpc832x_rdb.c
index 17abbd2..567ded7 100644
--- a/arch/powerpc/platforms/83xx/mpc832x_rdb.c
+++ b/arch/powerpc/platforms/83xx/mpc832x_rdb.c
@@ -175,6 +175,12 @@ static int __init mpc832x_spi_init(void)
par_io_config_pin(3, 14, 2, 0, 0, 0); /* SD_INSERT, I */
par_io_config_pin(3, 15, 2, 0, 0, 0); /* SD_PROTECT,I */
+ /*
+ * Don't bother with legacy stuff when device tree contains
+ * mmc-spi-slot node.
+ */
+ if (of_find_compatible_node(NULL, NULL, "mmc-spi-slot"))
+ return 0;
return fsl_spi_init(&mpc832x_spi_boardinfo, 1, mpc83xx_spi_cs_control);
}
machine_device_initcall(mpc832x_rdb, mpc832x_spi_init);
--
1.5.6.5
------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you. Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
WARNING: multiple messages have this Message-ID (diff)
From: Anton Vorontsov <avorontsov@ru.mvista.com>
To: Kumar Gala <galak@kernel.crashing.org>,
David Brownell <dbrownell@users.sourceforge.net>
Cc: linuxppc-dev@ozlabs.org, spi-devel-general@lists.sourceforge.net
Subject: [PATCH 7/7] powerpc/83xx: Add mmc-spi support via the device tree for MPC8323E-RDB
Date: Fri, 5 Dec 2008 23:10:43 +0300 [thread overview]
Message-ID: <20081205201043.GG19758@oksana.dev.rtsoft.ru> (raw)
In-Reply-To: <20081205200936.GA19137@oksana.dev.rtsoft.ru>
- Add gpio-controller node to manage QE GPIO Bank D;
- Add mmc-spi node;
- Modify board file so that it won't use legacy SPI support with the new
device trees.
Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
---
arch/powerpc/boot/dts/mpc832x_rdb.dts | 24 ++++++++++++++++++++++++
arch/powerpc/platforms/83xx/mpc832x_rdb.c | 6 ++++++
2 files changed, 30 insertions(+), 0 deletions(-)
diff --git a/arch/powerpc/boot/dts/mpc832x_rdb.dts b/arch/powerpc/boot/dts/mpc832x_rdb.dts
index dea3091..4319bd7 100644
--- a/arch/powerpc/boot/dts/mpc832x_rdb.dts
+++ b/arch/powerpc/boot/dts/mpc832x_rdb.dts
@@ -152,10 +152,21 @@
};
par_io@1400 {
+ #address-cells = <1>;
+ #size-cells = <1>;
reg = <0x1400 0x100>;
+ ranges = <3 0x1448 0x18>;
+ compatible = "fsl,mpc8323-qe-pario";
device_type = "par_io";
num-ports = <7>;
+ qe_pio_d: gpio-controller@1448 {
+ #gpio-cells = <2>;
+ compatible = "fsl,mpc8323-qe-pario-bank";
+ reg = <3 0x18>;
+ gpio-controller;
+ };
+
ucc2pio:ucc_pin@02 {
pio-map = <
/* port pin dir open_drain assignment has_irq */
@@ -225,12 +236,25 @@
};
spi@4c0 {
+ #address-cells = <1>;
+ #size-cells = <0>;
cell-index = <0>;
compatible = "fsl,spi";
reg = <0x4c0 0x40>;
interrupts = <2>;
interrupt-parent = <&qeic>;
+ gpios = <&qe_pio_d 13 0>;
mode = "cpu-qe";
+
+ mmc-slot@0 {
+ compatible = "fsl,mpc8323rdb-mmc-slot",
+ "mmc-spi-slot";
+ reg = <0>;
+ gpios = <&qe_pio_d 14 1
+ &qe_pio_d 15 0>;
+ voltage-ranges = <3300 3300>;
+ spi-max-frequency = <50000000>;
+ };
};
spi@500 {
diff --git a/arch/powerpc/platforms/83xx/mpc832x_rdb.c b/arch/powerpc/platforms/83xx/mpc832x_rdb.c
index 17abbd2..567ded7 100644
--- a/arch/powerpc/platforms/83xx/mpc832x_rdb.c
+++ b/arch/powerpc/platforms/83xx/mpc832x_rdb.c
@@ -175,6 +175,12 @@ static int __init mpc832x_spi_init(void)
par_io_config_pin(3, 14, 2, 0, 0, 0); /* SD_INSERT, I */
par_io_config_pin(3, 15, 2, 0, 0, 0); /* SD_PROTECT,I */
+ /*
+ * Don't bother with legacy stuff when device tree contains
+ * mmc-spi-slot node.
+ */
+ if (of_find_compatible_node(NULL, NULL, "mmc-spi-slot"))
+ return 0;
return fsl_spi_init(&mpc832x_spi_boardinfo, 1, mpc83xx_spi_cs_control);
}
machine_device_initcall(mpc832x_rdb, mpc832x_spi_init);
--
1.5.6.5
next prev parent reply other threads:[~2008-12-05 20:10 UTC|newest]
Thread overview: 71+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-05 20:09 [PATCH 0/7] OpenFirmware support for the spi_mpc83xx driver Anton Vorontsov
[not found] ` <20081205200936.GA19137-wnGakbxT3iijyJ0x5qLZdcN33GVbZNy3@public.gmane.org>
2008-12-05 20:10 ` [PATCH 1/7] powerpc: Implement get_brgfreq() and get_baudrate() stubs Anton Vorontsov
2008-12-05 20:10 ` Anton Vorontsov
2008-12-16 18:24 ` Kumar Gala
2008-12-05 20:10 ` [PATCH 2/7] spi_mpc83xx: Fix sparse warnings Anton Vorontsov
2008-12-05 20:10 ` Anton Vorontsov
2008-12-05 20:10 ` [PATCH 3/7] spi_mpc83xx: Rework chip selects handling Anton Vorontsov
2008-12-05 20:10 ` Anton Vorontsov
2008-12-05 20:10 ` [PATCH 4/7] spi_mpc83xx: Add OF platform driver bindings Anton Vorontsov
2008-12-05 20:10 ` Anton Vorontsov
2008-12-05 20:10 ` [PATCH 5/7] powerpc/fsl_soc: Isolate legacy fsl_spi support to mpc832x_rdb boards Anton Vorontsov
2008-12-05 20:10 ` Anton Vorontsov
2008-12-05 20:10 ` [PATCH 6/7] powerpc: Add mmc-spi-slot bindings Anton Vorontsov
2008-12-05 20:10 ` Anton Vorontsov
2008-12-05 20:10 ` Anton Vorontsov [this message]
2008-12-05 20:10 ` [PATCH 7/7] powerpc/83xx: Add mmc-spi support via the device tree for MPC8323E-RDB Anton Vorontsov
2008-12-18 18:33 ` [PATCH 0/7] OpenFirmware support for the spi_mpc83xx driver Anton Vorontsov
2008-12-18 18:33 ` Anton Vorontsov
2009-01-07 4:28 ` Kumar Gala
2009-01-07 4:28 ` Kumar Gala
[not found] ` <6DC0606C-1CDA-4549-8A63-E3F86010291B-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r@public.gmane.org>
2009-01-23 19:49 ` [PATCH resend 0/6] " Anton Vorontsov
2009-01-23 19:49 ` Anton Vorontsov
2009-01-23 19:49 ` Anton Vorontsov
[not found] ` <20090123194958.GA17355-wnGakbxT3iijyJ0x5qLZdcN33GVbZNy3@public.gmane.org>
2009-01-23 19:50 ` [PATCH 1/6] spi_mpc83xx: Fix sparse warnings Anton Vorontsov
2009-01-23 19:50 ` Anton Vorontsov
2009-01-23 19:50 ` Anton Vorontsov
2009-01-23 19:50 ` [PATCH 2/6] spi_mpc83xx: Rework chip selects handling Anton Vorontsov
2009-01-23 19:50 ` Anton Vorontsov
2009-01-23 19:50 ` Anton Vorontsov
2009-01-23 19:50 ` [PATCH 3/6] spi_mpc83xx: Add OF platform driver bindings Anton Vorontsov
2009-01-23 19:50 ` Anton Vorontsov
2009-01-23 19:50 ` Anton Vorontsov
2009-01-23 19:50 ` [PATCH 4/6] powerpc: Add mmc-spi-slot bindings Anton Vorontsov
2009-01-23 19:50 ` Anton Vorontsov
2009-01-23 19:50 ` Anton Vorontsov
2009-01-23 19:50 ` [PATCH 5/6] powerpc/83xx: Add mmc-spi support via the device tree for MPC8323E-RDB Anton Vorontsov
2009-01-23 19:50 ` Anton Vorontsov
2009-01-23 19:50 ` Anton Vorontsov
2009-01-23 19:50 ` [PATCH 6/6] powerpc/fsl_soc: Isolate legacy fsl_spi support to mpc832x_rdb boards Anton Vorontsov
2009-01-23 19:50 ` Anton Vorontsov
2009-01-23 19:50 ` Anton Vorontsov
2009-03-09 16:53 ` [PATCH resend 0/6] OpenFirmware support for the spi_mpc83xx driver Kumar Gala
2009-03-09 16:53 ` Kumar Gala
2009-03-09 16:53 ` Kumar Gala
-- strict thread matches above, loose matches on Subject: below --
2009-03-17 18:59 [PATCH v2 2/2] powerpc/83xx: Move gianfar mdio nodes under the ethernet nodes Anton Vorontsov
2009-03-18 13:21 ` Kumar Gala
2009-03-18 15:28 ` Anton Vorontsov
2009-03-18 15:43 ` Scott Wood
2009-03-18 15:50 ` Grant Likely
2009-03-19 1:20 ` David Gibson
2009-03-18 19:59 ` Anton Vorontsov
2009-03-18 20:00 ` [PATCH v3 1/4] powerpc/83xx: Add power management support for MPC837x boards Anton Vorontsov
2009-03-18 20:00 ` [PATCH v3 2/4] powerpc/83xx: Move gianfar mdio nodes under the ethernet nodes Anton Vorontsov
2009-03-18 20:00 ` [PATCH v3 3/4] powerpc/85xx: " Anton Vorontsov
2009-03-18 20:05 ` Scott Wood
2009-03-18 20:23 ` Anton Vorontsov
2009-03-18 20:27 ` Scott Wood
2009-03-18 20:29 ` Anton Vorontsov
2009-03-18 20:31 ` Scott Wood
2009-03-18 20:33 ` Anton Vorontsov
2009-03-18 20:35 ` Scott Wood
2009-03-18 20:39 ` Anton Vorontsov
2009-03-18 20:46 ` Scott Wood
2009-03-18 21:00 ` Anton Vorontsov
2009-03-18 20:00 ` [PATCH v3 4/4] powerpc/86xx: " Anton Vorontsov
2009-04-08 9:18 ` [PATCH 6/6] powerpc/fsl_soc: Isolate legacy fsl_spi support to mpc832x_rdb boards Peter Korsgaard
2009-04-08 9:18 ` Peter Korsgaard
2009-04-17 5:13 ` Peter Korsgaard
2009-04-17 5:13 ` Peter Korsgaard
2009-04-17 12:23 ` Anton Vorontsov
2009-04-17 12:23 ` Anton Vorontsov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20081205201043.GG19758@oksana.dev.rtsoft.ru \
--to=avorontsov-hkdhdckh98+b+jhodadfcq@public.gmane.org \
--cc=dbrownell-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
--cc=galak-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r@public.gmane.org \
--cc=linuxppc-dev-mnsaURCQ41sdnm+yROfE0A@public.gmane.org \
--cc=spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.