brcm2708: update linux 4.4 patches to latest version
[openwrt/staging/dedeckeh.git] / target / linux / brcm2708 / patches-4.4 / 0136-BCM270X_DT-Add-sdio_overclock-parameter-to-sdio-over.patch
1 From 263629c941a7da06b8cce7f73fe8d8d20d1357b7 Mon Sep 17 00:00:00 2001
2 From: Phil Elwell <phil@raspberrypi.org>
3 Date: Mon, 25 Jan 2016 09:12:06 +0000
4 Subject: [PATCH 136/381] BCM270X_DT: Add sdio_overclock parameter to sdio
5 overlay
6
7 The sdio_overclock parameter is like the overclock_50 parameter, i.e.
8 it sets an alternate frequency (in MHz) to use when the MMC framework
9 requests 50MHz, except that it applies to the SDIO bus.
10
11 Be aware that the actual frequencies achievable are limited to even integer
12 divisions of 250MHz, and that the driver will round up to include fractions
13 (e.g. 62 will include 62.5) but then round down to the nearest frequency.
14 In other words, the chosen frequency is the highest possible that is less than
15 the parameter value + 1. In practise this means that 62 is the only sensible
16 value.
17
18 Examples:
19 250MHz/4 = 62.5MHz (sdio_overclock=62)
20 250MHz/2 = 125MHz (sdio_overclock=125) # Too fast
21 ---
22 arch/arm/boot/dts/overlays/README | 9 ++++++---
23 arch/arm/boot/dts/overlays/sdio-overlay.dts | 2 ++
24 2 files changed, 8 insertions(+), 3 deletions(-)
25
26 --- a/arch/arm/boot/dts/overlays/README
27 +++ b/arch/arm/boot/dts/overlays/README
28 @@ -53,8 +53,8 @@ have its contents deleted (or commented
29 Using Overlays
30 ==============
31
32 -Overlays are loaded using the "dtoverlay" directive. As an example, consider the
33 -popular lirc-rpi module, the Linux Infrared Remote Control driver. In the
34 +Overlays are loaded using the "dtoverlay" directive. As an example, consider
35 +the popular lirc-rpi module, the Linux Infrared Remote Control driver. In the
36 pre-DT world this would be loaded from /etc/modules, with an explicit
37 "modprobe lirc-rpi" command, or programmatically by lircd. With DT enabled,
38 this becomes a line in config.txt:
39 @@ -621,9 +621,12 @@ Name: sdio
40 Info: Selects the bcm2835-sdhost SD/MMC driver, optionally with overclock,
41 and enables SDIO via GPIOs 22-27.
42 Load: dtoverlay=sdio,<param>=<val>
43 -Params: overclock_50 Clock (in MHz) to use when the MMC framework
44 +Params: overclock_50 SD Clock (in MHz) to use when the MMC framework
45 requests 50MHz
46
47 + sdio_overclock SDIO Clock (in MHz) to use when the MMC
48 + framework requests 50MHz
49 +
50 force_pio Disable DMA support (default off)
51
52 pio_limit Number of blocks above which to use DMA
53 --- a/arch/arm/boot/dts/overlays/sdio-overlay.dts
54 +++ b/arch/arm/boot/dts/overlays/sdio-overlay.dts
55 @@ -12,6 +12,7 @@
56 pinctrl-0 = <&sdio_pins>;
57 non-removable;
58 bus-width = <4>;
59 + brcm,overclock-50 = <0>;
60 status = "okay";
61 };
62 };
63 @@ -30,5 +31,6 @@
64 __overrides__ {
65 poll_once = <&sdio_mmc>,"non-removable?";
66 bus_width = <&sdio_mmc>,"bus-width:0";
67 + sdio_overclock = <&sdio_mmc>,"brcm,overclock-50:0";
68 };
69 };