diff options
-rw-r--r-- | Documentation/powerpc/booting-without-of.txt | 171 | ||||
-rw-r--r-- | arch/powerpc/platforms/Kconfig | 11 | ||||
-rw-r--r-- | arch/powerpc/sysdev/fsl_soc.c | 2 |
3 files changed, 183 insertions, 1 deletions
diff --git a/Documentation/powerpc/booting-without-of.txt b/Documentation/powerpc/booting-without-of.txt index 20e0e6cb0347..a599f1a8a145 100644 --- a/Documentation/powerpc/booting-without-of.txt +++ b/Documentation/powerpc/booting-without-of.txt | |||
@@ -1510,7 +1510,10 @@ platforms are moved over to use the flattened-device-tree model. | |||
1510 | 1510 | ||
1511 | i) Freescale QUICC Engine module (QE) | 1511 | i) Freescale QUICC Engine module (QE) |
1512 | This represents qe module that is installed on PowerQUICC II Pro. | 1512 | This represents qe module that is installed on PowerQUICC II Pro. |
1513 | Hopefully it will merge backward compatibility with CPM/CPM2. | 1513 | |
1514 | NOTE: This is an interim binding; it should be updated to fit | ||
1515 | in with the CPM binding later in this document. | ||
1516 | |||
1514 | Basically, it is a bus of devices, that could act more or less | 1517 | Basically, it is a bus of devices, that could act more or less |
1515 | as a complete entity (UCC, USB etc ). All of them should be siblings on | 1518 | as a complete entity (UCC, USB etc ). All of them should be siblings on |
1516 | the "root" qe node, using the common properties from there. | 1519 | the "root" qe node, using the common properties from there. |
@@ -1848,6 +1851,172 @@ platforms are moved over to use the flattened-device-tree model. | |||
1848 | fsl,has-rstcr; | 1851 | fsl,has-rstcr; |
1849 | }; | 1852 | }; |
1850 | 1853 | ||
1854 | l) Freescale Communications Processor Module | ||
1855 | |||
1856 | NOTE: This is an interim binding, and will likely change slightly, | ||
1857 | as more devices are supported. The QE bindings especially are | ||
1858 | incomplete. | ||
1859 | |||
1860 | i) Root CPM node | ||
1861 | |||
1862 | Properties: | ||
1863 | - compatible : "fsl,cpm1", "fsl,cpm2", or "fsl,qe". | ||
1864 | - reg : The first resource is a 48-byte region beginning with | ||
1865 | CPCR. The second is the available general-purpose | ||
1866 | DPRAM. | ||
1867 | |||
1868 | Example: | ||
1869 | cpm@119c0 { | ||
1870 | #address-cells = <1>; | ||
1871 | #size-cells = <1>; | ||
1872 | #interrupt-cells = <2>; | ||
1873 | compatible = "fsl,mpc8272-cpm", "fsl,cpm2"; | ||
1874 | reg = <119c0 30 0 2000>; | ||
1875 | } | ||
1876 | |||
1877 | ii) Properties common to mulitple CPM/QE devices | ||
1878 | |||
1879 | - fsl,cpm-command : This value is ORed with the opcode and command flag | ||
1880 | to specify the device on which a CPM command operates. | ||
1881 | |||
1882 | - fsl,cpm-brg : Indicates which baud rate generator the device | ||
1883 | is associated with. If absent, an unused BRG | ||
1884 | should be dynamically allocated. If zero, the | ||
1885 | device uses an external clock rather than a BRG. | ||
1886 | |||
1887 | - reg : Unless otherwise specified, the first resource represents the | ||
1888 | scc/fcc/ucc registers, and the second represents the device's | ||
1889 | parameter RAM region (if it has one). | ||
1890 | |||
1891 | iii) Serial | ||
1892 | |||
1893 | Currently defined compatibles: | ||
1894 | - fsl,cpm1-smc-uart | ||
1895 | - fsl,cpm2-smc-uart | ||
1896 | - fsl,cpm1-scc-uart | ||
1897 | - fsl,cpm2-scc-uart | ||
1898 | - fsl,qe-uart | ||
1899 | |||
1900 | Example: | ||
1901 | |||
1902 | serial@11a00 { | ||
1903 | device_type = "serial"; | ||
1904 | compatible = "fsl,mpc8272-scc-uart", | ||
1905 | "fsl,cpm2-scc-uart"; | ||
1906 | reg = <11a00 20 8000 100>; | ||
1907 | interrupts = <28 8>; | ||
1908 | interrupt-parent = <&PIC>; | ||
1909 | fsl,cpm-brg = <1>; | ||
1910 | fsl,cpm-command = <00800000>; | ||
1911 | }; | ||
1912 | |||
1913 | iii) Network | ||
1914 | |||
1915 | Currently defined compatibles: | ||
1916 | - fsl,cpm1-scc-enet | ||
1917 | - fsl,cpm2-scc-enet | ||
1918 | - fsl,cpm1-fec-enet | ||
1919 | - fsl,cpm2-fcc-enet (third resource is GFEMR) | ||
1920 | - fsl,qe-enet | ||
1921 | |||
1922 | Example: | ||
1923 | |||
1924 | ethernet@11300 { | ||
1925 | device_type = "network"; | ||
1926 | compatible = "fsl,mpc8272-fcc-enet", | ||
1927 | "fsl,cpm2-fcc-enet"; | ||
1928 | reg = <11300 20 8400 100 11390 1>; | ||
1929 | local-mac-address = [ 00 00 00 00 00 00 ]; | ||
1930 | interrupts = <20 8>; | ||
1931 | interrupt-parent = <&PIC>; | ||
1932 | phy-handle = <&PHY0>; | ||
1933 | linux,network-index = <0>; | ||
1934 | fsl,cpm-command = <12000300>; | ||
1935 | }; | ||
1936 | |||
1937 | iv) MDIO | ||
1938 | |||
1939 | Currently defined compatibles: | ||
1940 | fsl,pq1-fec-mdio (reg is same as first resource of FEC device) | ||
1941 | fsl,cpm2-mdio-bitbang (reg is port C registers) | ||
1942 | |||
1943 | Properties for fsl,cpm2-mdio-bitbang: | ||
1944 | fsl,mdio-pin : pin of port C controlling mdio data | ||
1945 | fsl,mdc-pin : pin of port C controlling mdio clock | ||
1946 | |||
1947 | Example: | ||
1948 | |||
1949 | mdio@10d40 { | ||
1950 | device_type = "mdio"; | ||
1951 | compatible = "fsl,mpc8272ads-mdio-bitbang", | ||
1952 | "fsl,mpc8272-mdio-bitbang", | ||
1953 | "fsl,cpm2-mdio-bitbang"; | ||
1954 | reg = <10d40 14>; | ||
1955 | #address-cells = <1>; | ||
1956 | #size-cells = <0>; | ||
1957 | fsl,mdio-pin = <12>; | ||
1958 | fsl,mdc-pin = <13>; | ||
1959 | }; | ||
1960 | |||
1961 | v) Baud Rate Generators | ||
1962 | |||
1963 | Currently defined compatibles: | ||
1964 | fsl,cpm-brg | ||
1965 | fsl,cpm1-brg | ||
1966 | fsl,cpm2-brg | ||
1967 | |||
1968 | Properties: | ||
1969 | - reg : There may be an arbitrary number of reg resources; BRG | ||
1970 | numbers are assigned to these in order. | ||
1971 | - clock-frequency : Specifies the base frequency driving | ||
1972 | the BRG. | ||
1973 | |||
1974 | Example: | ||
1975 | |||
1976 | brg@119f0 { | ||
1977 | compatible = "fsl,mpc8272-brg", | ||
1978 | "fsl,cpm2-brg", | ||
1979 | "fsl,cpm-brg"; | ||
1980 | reg = <119f0 10 115f0 10>; | ||
1981 | clock-frequency = <d#25000000>; | ||
1982 | }; | ||
1983 | |||
1984 | vi) Interrupt Controllers | ||
1985 | |||
1986 | Currently defined compatibles: | ||
1987 | - fsl,cpm1-pic | ||
1988 | - only one interrupt cell | ||
1989 | - fsl,pq1-pic | ||
1990 | - fsl,cpm2-pic | ||
1991 | - second interrupt cell is level/sense: | ||
1992 | - 2 is falling edge | ||
1993 | - 8 is active low | ||
1994 | |||
1995 | Example: | ||
1996 | |||
1997 | interrupt-controller@10c00 { | ||
1998 | #interrupt-cells = <2>; | ||
1999 | interrupt-controller; | ||
2000 | reg = <10c00 80>; | ||
2001 | compatible = "mpc8272-pic", "fsl,cpm2-pic"; | ||
2002 | }; | ||
2003 | |||
2004 | vii) USB (Universal Serial Bus Controller) | ||
2005 | |||
2006 | Properties: | ||
2007 | - compatible : "fsl,cpm1-usb", "fsl,cpm2-usb", "fsl,qe-usb" | ||
2008 | |||
2009 | Example: | ||
2010 | usb@11bc0 { | ||
2011 | #address-cells = <1>; | ||
2012 | #size-cells = <0>; | ||
2013 | compatible = "fsl,cpm2-usb"; | ||
2014 | reg = <11b60 18 8b00 100>; | ||
2015 | interrupts = <b 8>; | ||
2016 | interrupt-parent = <&PIC>; | ||
2017 | fsl,cpm-command = <2e600000>; | ||
2018 | }; | ||
2019 | |||
1851 | More devices will be defined as this spec matures. | 2020 | More devices will be defined as this spec matures. |
1852 | 2021 | ||
1853 | VII - Specifying interrupt information for devices | 2022 | VII - Specifying interrupt information for devices |
diff --git a/arch/powerpc/platforms/Kconfig b/arch/powerpc/platforms/Kconfig index 92fcd6e35b51..8a62ca533b30 100644 --- a/arch/powerpc/platforms/Kconfig +++ b/arch/powerpc/platforms/Kconfig | |||
@@ -279,6 +279,17 @@ config CPM2 | |||
279 | you wish to build a kernel for a machine with a CPM2 coprocessor | 279 | you wish to build a kernel for a machine with a CPM2 coprocessor |
280 | on it (826x, 827x, 8560). | 280 | on it (826x, 827x, 8560). |
281 | 281 | ||
282 | config PPC_CPM_NEW_BINDING | ||
283 | bool | ||
284 | depends on CPM1 || CPM2 | ||
285 | help | ||
286 | Select this if your board has been converted to use the new | ||
287 | device tree bindings for CPM, and no longer needs the | ||
288 | ioport callbacks or the platform device glue code. | ||
289 | |||
290 | The fs_enet and cpm_uart drivers will be built as | ||
291 | of_platform devices. | ||
292 | |||
282 | config AXON_RAM | 293 | config AXON_RAM |
283 | tristate "Axon DDR2 memory device driver" | 294 | tristate "Axon DDR2 memory device driver" |
284 | depends on PPC_IBM_CELL_BLADE | 295 | depends on PPC_IBM_CELL_BLADE |
diff --git a/arch/powerpc/sysdev/fsl_soc.c b/arch/powerpc/sysdev/fsl_soc.c index 30523667df4e..b465b30c9547 100644 --- a/arch/powerpc/sysdev/fsl_soc.c +++ b/arch/powerpc/sysdev/fsl_soc.c | |||
@@ -665,6 +665,7 @@ err: | |||
665 | 665 | ||
666 | arch_initcall(fsl_usb_of_init); | 666 | arch_initcall(fsl_usb_of_init); |
667 | 667 | ||
668 | #ifndef CONFIG_PPC_CPM_NEW_BINDING | ||
668 | #ifdef CONFIG_CPM2 | 669 | #ifdef CONFIG_CPM2 |
669 | 670 | ||
670 | extern void init_scc_ioports(struct fs_uart_platform_info*); | 671 | extern void init_scc_ioports(struct fs_uart_platform_info*); |
@@ -1204,6 +1205,7 @@ err: | |||
1204 | arch_initcall(cpm_smc_uart_of_init); | 1205 | arch_initcall(cpm_smc_uart_of_init); |
1205 | 1206 | ||
1206 | #endif /* CONFIG_8xx */ | 1207 | #endif /* CONFIG_8xx */ |
1208 | #endif /* CONFIG_PPC_CPM_NEW_BINDING */ | ||
1207 | 1209 | ||
1208 | int __init fsl_spi_init(struct spi_board_info *board_infos, | 1210 | int __init fsl_spi_init(struct spi_board_info *board_infos, |
1209 | unsigned int num_board_infos, | 1211 | unsigned int num_board_infos, |