[RFC 3/5] dt: bcm2835: add mmc node

Stephen Warren swarren at wwwdotorg.org
Tue Oct 28 19:04:33 PDT 2014

On 10/28/2014 06:04 PM, Piotr Król wrote:
> Add MMC node, increase clk_mmc frequency and use bcm2835-mmc instead of
> bcm2835-sdhci.

Per comments on the previous patches, this isn't the right way to go.

> diff --git a/arch/arm/boot/dts/bcm2835-rpi-b.dts b/arch/arm/boot/dts/bcm2835-rpi-b.dts

> -&sdhci {
> +&mmc {

Is there a real need to rename the label this points at?

> diff --git a/arch/arm/boot/dts/bcm2835.dtsi b/arch/arm/boot/dts/bcm2835.dtsi

> +		mmc: mmc at 7e300000 {
> +			compatible = "brcm,bcm2835-mmc";

If you did do this, the other node should have been removed...

> @@ -160,7 +171,7 @@
>  			reg = <0>;
>  			#clock-cells = <0>;
>  			clock-output-names = "mmc";
> -	-		clock-frequency = <100000000>;
> +			clock-frequency = <250000000>;

Better would be to add a real clock provider which communicates with the
VC firmware so it can dynamically get the actual rate.

I chose 100000000 as the clock frequency to match the default frequency
for this clock as set by the VC firmware. Changing the DT in no way
affects how the clock is actually programmed in HW.

Perhaps this default rate has changed since I wrote the DT? That'd be
annoying since it would mean changes to SW-visible behavior of the firmware.

More information about the linux-rpi-kernel mailing list