Skip to content

Commit

Permalink
arm/dts: OMAP4: Add SPI controller nodes
Browse files Browse the repository at this point in the history
Add the 4 McSPI controller nodes present in an OMAP4 device.

Remove SPI static device initialisation if DT is populated.

Signed-off-by: Benoit Cousson <b-cousson@ti.com>
Cc: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Rob Herring <rob.herring@calxeda.com>
  • Loading branch information
Benoit Cousson committed Mar 12, 2012
1 parent 385a64b commit efcf1e5
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 1 deletion.
32 changes: 32 additions & 0 deletions arch/arm/boot/dts/omap4.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -209,5 +209,37 @@
#size-cells = <0>;
ti,hwmods = "i2c4";
};

mcspi1: spi@48098000 {
compatible = "ti,omap4-mcspi";
#address-cells = <1>;
#size-cells = <0>;
ti,hwmods = "mcspi1";
ti,spi-num-cs = <4>;
};

mcspi2: spi@4809a000 {
compatible = "ti,omap4-mcspi";
#address-cells = <1>;
#size-cells = <0>;
ti,hwmods = "mcspi2";
ti,spi-num-cs = <2>;
};

mcspi3: spi@480b8000 {
compatible = "ti,omap4-mcspi";
#address-cells = <1>;
#size-cells = <0>;
ti,hwmods = "mcspi3";
ti,spi-num-cs = <2>;
};

mcspi4: spi@480ba000 {
compatible = "ti,omap4-mcspi";
#address-cells = <1>;
#size-cells = <0>;
ti,hwmods = "mcspi4";
ti,spi-num-cs = <1>;
};
};
};
4 changes: 3 additions & 1 deletion arch/arm/mach-omap2/devices.c
Original file line number Diff line number Diff line change
Expand Up @@ -725,7 +725,9 @@ static int __init omap2_init_devices(void)
omap_init_dmic();
omap_init_camera();
omap_init_mbox();
omap_init_mcspi();
/* If dtb is there, the devices will be created dynamically */
if (!of_have_populated_dt())
omap_init_mcspi();
omap_init_pmu();
omap_hdq_init();
omap_init_sti();
Expand Down

0 comments on commit efcf1e5

Please sign in to comment.