Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1568255 > unrolled thread
| Started by | Gerd Hoffmann <kraxel@redhat.com> |
|---|---|
| First post | 2017-01-27 12:50 +0100 |
| Last post | 2017-01-30 09:30 +0100 |
| Articles | 6 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH 0/4] mmc: bcm2835: Add new driver for the internal SD controller. Gerd Hoffmann <kraxel@redhat.com> - 2017-01-27 12:50 +0100
[PATCH 4/4] ARM: dts: bcm283x: switch from &sdhci to &sdhost Gerd Hoffmann <kraxel@redhat.com> - 2017-01-27 12:50 +0100
[PATCH 3/4] mmc: bcm2835: add internal SD controller to devicetree Gerd Hoffmann <kraxel@redhat.com> - 2017-01-27 12:50 +0100
Re: [PATCH 2/4] mmc: bcm2835: Add new driver for the internal SD controller. Ulf Hansson <ulf.hansson@linaro.org> - 2017-01-27 16:40 +0100
Re: [PATCH 2/4] mmc: bcm2835: Add new driver for the internal SD controller. Stefan Wahren <stefan.wahren@i2se.com> - 2017-01-27 17:20 +0100
Re: [PATCH 2/4] mmc: bcm2835: Add new driver for the internal SD controller. Ulf Hansson <ulf.hansson@linaro.org> - 2017-01-30 09:30 +0100
| From | Gerd Hoffmann <kraxel@redhat.com> |
|---|---|
| Date | 2017-01-27 12:50 +0100 |
| Subject | [PATCH 0/4] mmc: bcm2835: Add new driver for the internal SD controller. |
| Message-ID | <t4dct-3zE-3@gated-at.bofh.it> |
Hi, Here comes the bcm2835 sdhost driver, with all cleanups squashed in, so you see just the final result without all the inividual cleanup steps. Patch #2 is the actual driver, commit message has some more info on the driver. Patches 1+3 add the device tree bits. Patch #4 is the big red switch which activates the driver. Tested on a rpi2 so far, and in PIO mode only. Will looking at enabling DMA next, and fixing whatever comes up in review of course. please review & test, Gerd Eric Anholt (2): dt-bindings: Add binding for brcm,bcm2835-sdhost. mmc: bcm2835: Add new driver for the internal SD controller. Gerd Hoffmann (2): mmc: bcm2835: add internal SD controller to devicetree ARM: dts: bcm283x: switch from &sdhci to &sdhost .../bindings/mmc/brcm,bcm2835-sdhost.txt | 24 + arch/arm/boot/dts/bcm2835-rpi.dtsi | 6 + arch/arm/boot/dts/bcm283x.dtsi | 8 + drivers/mmc/host/Kconfig | 9 + drivers/mmc/host/Makefile | 1 + drivers/mmc/host/bcm2835.c | 1495 ++++++++++++++++++++ 6 files changed, 1543 insertions(+) create mode 100644 Documentation/devicetree/bindings/mmc/brcm,bcm2835-sdhost.txt create mode 100644 drivers/mmc/host/bcm2835.c -- 1.8.3.1
[toc] | [next] | [standalone]
| From | Gerd Hoffmann <kraxel@redhat.com> |
|---|---|
| Date | 2017-01-27 12:50 +0100 |
| Subject | [PATCH 4/4] ARM: dts: bcm283x: switch from &sdhci to &sdhost |
| Message-ID | <t4dcw-3zE-79@gated-at.bofh.it> |
| In reply to | #1568255 |
This flips the switch from (iproc-driven) sdhci controller to the custom
sdhost controller.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
arch/arm/boot/dts/bcm2835-rpi.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/boot/dts/bcm2835-rpi.dtsi b/arch/arm/boot/dts/bcm2835-rpi.dtsi
index 7d89af2..e6beecb 100644
--- a/arch/arm/boot/dts/bcm2835-rpi.dtsi
+++ b/arch/arm/boot/dts/bcm2835-rpi.dtsi
@@ -65,13 +65,13 @@
&sdhci {
pinctrl-names = "default";
pinctrl-0 = <&emmc_gpio48>;
- status = "okay";
bus-width = <4>;
};
&sdhost {
pinctrl-names = "default";
pinctrl-0 = <&sdhost_gpio48>;
+ status = "okay";
bus-width = <4>;
};
--
1.8.3.1
[toc] | [prev] | [next] | [standalone]
| From | Gerd Hoffmann <kraxel@redhat.com> |
|---|---|
| Date | 2017-01-27 12:50 +0100 |
| Subject | [PATCH 3/4] mmc: bcm2835: add internal SD controller to devicetree |
| Message-ID | <t4dcw-3zE-73@gated-at.bofh.it> |
| In reply to | #1568255 |
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
arch/arm/boot/dts/bcm2835-rpi.dtsi | 6 ++++++
arch/arm/boot/dts/bcm283x.dtsi | 8 ++++++++
2 files changed, 14 insertions(+)
diff --git a/arch/arm/boot/dts/bcm2835-rpi.dtsi b/arch/arm/boot/dts/bcm2835-rpi.dtsi
index 0b73f9c..7d89af2 100644
--- a/arch/arm/boot/dts/bcm2835-rpi.dtsi
+++ b/arch/arm/boot/dts/bcm2835-rpi.dtsi
@@ -69,6 +69,12 @@
bus-width = <4>;
};
+&sdhost {
+ pinctrl-names = "default";
+ pinctrl-0 = <&sdhost_gpio48>;
+ bus-width = <4>;
+};
+
&pwm {
pinctrl-names = "default";
pinctrl-0 = <&pwm0_gpio40 &pwm1_gpio45>;
diff --git a/arch/arm/boot/dts/bcm283x.dtsi b/arch/arm/boot/dts/bcm283x.dtsi
index a3106aa..2024f9b 100644
--- a/arch/arm/boot/dts/bcm283x.dtsi
+++ b/arch/arm/boot/dts/bcm283x.dtsi
@@ -450,6 +450,14 @@
status = "disabled";
};
+ sdhost: sdhost@7e202000 {
+ compatible = "brcm,bcm2835-sdhost";
+ reg = <0x7e202000 0x100>;
+ interrupts = <2 24>;
+ clocks = <&clocks BCM2835_CLOCK_VPU>;
+ status = "disabled";
+ };
+
hvs@7e400000 {
compatible = "brcm,bcm2835-hvs";
reg = <0x7e400000 0x6000>;
--
1.8.3.1
[toc] | [prev] | [next] | [standalone]
| From | Ulf Hansson <ulf.hansson@linaro.org> |
|---|---|
| Date | 2017-01-27 16:40 +0100 |
| Subject | Re: [PATCH 2/4] mmc: bcm2835: Add new driver for the internal SD controller. |
| Message-ID | <t4gN5-5TS-43@gated-at.bofh.it> |
| In reply to | #1568255 |
On 27 January 2017 at 12:36, Gerd Hoffmann <kraxel@redhat.com> wrote: > From: Eric Anholt <eric@anholt.net> > > The 2835 has two SD controllers: The Arasan SDHCI controller (supported > by the iproc driver) and a custom SD controller. This patch adds a > driver for the custom SD controller. > > The custom controller runs faster, and driving the sdcard with the > custom controller also allows to drive the rpi3 wifi with the iproc > driver. > I don't understand this relationship. Is this somewhat configurable in runtime? Is the WIFI module a removable SDIO card? So you can decide which controller that is best suited to use? No? Kind regards Uffe
[toc] | [prev] | [next] | [standalone]
| From | Stefan Wahren <stefan.wahren@i2se.com> |
|---|---|
| Date | 2017-01-27 17:20 +0100 |
| Subject | Re: [PATCH 2/4] mmc: bcm2835: Add new driver for the internal SD controller. |
| Message-ID | <t4hpM-6ni-23@gated-at.bofh.it> |
| In reply to | #1568456 |
Am 27.01.2017 um 16:27 schrieb Ulf Hansson: > On 27 January 2017 at 12:36, Gerd Hoffmann <kraxel@redhat.com> wrote: >> From: Eric Anholt <eric@anholt.net> >> >> The 2835 has two SD controllers: The Arasan SDHCI controller (supported >> by the iproc driver) and a custom SD controller. This patch adds a >> driver for the custom SD controller. >> >> The custom controller runs faster, and driving the sdcard with the >> custom controller also allows to drive the rpi3 wifi with the iproc >> driver. >> > I don't understand this relationship. Is this somewhat configurable in runtime? The configuration is done by devicetree via pin muxing. AFAIK both SD controller are available on the same pins (2 pin groups = pin 22 to 27 + pin 48 to 53). So it's possible to use both SD controllers at the same time with different pin groups. This is necessary to use Wifi via SDIO on the RPi 3 while the other controller handles SD card with the rootfs. > > Is the WIFI module a removable SDIO card? No > So you can decide which > controller that is best suited to use? Yes, but it requires also both drivers. > > Kind regards > Uffe
[toc] | [prev] | [next] | [standalone]
| From | Ulf Hansson <ulf.hansson@linaro.org> |
|---|---|
| Date | 2017-01-30 09:30 +0100 |
| Subject | Re: [PATCH 2/4] mmc: bcm2835: Add new driver for the internal SD controller. |
| Message-ID | <t5fvz-1Gg-7@gated-at.bofh.it> |
| In reply to | #1568480 |
On 27 January 2017 at 17:04, Stefan Wahren <stefan.wahren@i2se.com> wrote: > Am 27.01.2017 um 16:27 schrieb Ulf Hansson: >> On 27 January 2017 at 12:36, Gerd Hoffmann <kraxel@redhat.com> wrote: >>> From: Eric Anholt <eric@anholt.net> >>> >>> The 2835 has two SD controllers: The Arasan SDHCI controller (supported >>> by the iproc driver) and a custom SD controller. This patch adds a >>> driver for the custom SD controller. >>> >>> The custom controller runs faster, and driving the sdcard with the >>> custom controller also allows to drive the rpi3 wifi with the iproc >>> driver. >>> >> I don't understand this relationship. Is this somewhat configurable in runtime? > > The configuration is done by devicetree via pin muxing. AFAIK both SD > controller are available on the same pins (2 pin groups = pin 22 to 27 + > pin 48 to 53). So it's possible to use both SD controllers at the same > time with different pin groups. This is necessary to use Wifi via SDIO > on the RPi 3 while the other controller handles SD card with the rootfs. > >> >> Is the WIFI module a removable SDIO card? > > No > >> So you can decide which >> controller that is best suited to use? > > Yes, but it requires also both drivers. > Okay, thanks for clarifying - I will go on with the review. If a re-spin of the series is needed, please make sure to update the coverletter with some information from above, so I don't get confused again. :-) Kind regards Uffe
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web