diff options
author | Arnd Bergmann <arnd@arndb.de> | 2015-12-31 10:24:09 -0500 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2015-12-31 11:36:39 -0500 |
commit | ed1c7848dcadba2be07057e6810eb5825d0080d7 (patch) | |
tree | 3391d179cc950375d5d91209a7de71724884d6da /arch/arm/mach-omap2/omap_hwmod_81xx_data.c | |
parent | d6de5b0294d74aefa16f78d050d1bcf6d5af84a7 (diff) | |
parent | f53850b5dc625ca37ae84b47f4f92b1d55df2aa0 (diff) |
Merge tag 'omap-for-v4.5/81xx-soc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/soc
Pull "reworked soc changes for ti81xx devices and minimal dra62x
j5ec-evm support" from Tony Lindgren:
Add minimal SoC support for dra62x also known as j5eco. As it's closely
related to dm814x, we can treat it as a dm814x variant for now and do
rest of the configuration with DTS just files. And let's add hwmod
support for MMC and USB on dm814x and dra62x.
* tag 'omap-for-v4.5/81xx-soc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
ARM: OMAP2+: Add support for dm814x and dra62x usb
ARM: OMAP2+: Add mmc hwmod entries for dm814x
ARM: OMAP2+: Update 81xx clock and power domains for default, active and sgx
ARM: OMAP2+: Fix SoC detection for dra62x j5-eco
Diffstat (limited to 'arch/arm/mach-omap2/omap_hwmod_81xx_data.c')
-rw-r--r-- | arch/arm/mach-omap2/omap_hwmod_81xx_data.c | 131 |
1 files changed, 112 insertions, 19 deletions
diff --git a/arch/arm/mach-omap2/omap_hwmod_81xx_data.c b/arch/arm/mach-omap2/omap_hwmod_81xx_data.c index 275b16c7c417..27f4e197d949 100644 --- a/arch/arm/mach-omap2/omap_hwmod_81xx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_81xx_data.c | |||
@@ -104,8 +104,8 @@ | |||
104 | * The default .clkctrl_offs field is offset from CM_DEFAULT, that's | 104 | * The default .clkctrl_offs field is offset from CM_DEFAULT, that's |
105 | * TRM 18.7.6 CM_DEFAULT device register values minus 0x500 | 105 | * TRM 18.7.6 CM_DEFAULT device register values minus 0x500 |
106 | */ | 106 | */ |
107 | #define DM816X_CM_DEFAULT_OFFSET 0x500 | 107 | #define DM81XX_CM_DEFAULT_OFFSET 0x500 |
108 | #define DM816X_CM_DEFAULT_USB_CLKCTRL (0x558 - DM816X_CM_DEFAULT_OFFSET) | 108 | #define DM81XX_CM_DEFAULT_USB_CLKCTRL (0x558 - DM81XX_CM_DEFAULT_OFFSET) |
109 | 109 | ||
110 | /* L3 Interconnect entries clocked at 125, 250 and 500MHz */ | 110 | /* L3 Interconnect entries clocked at 125, 250 and 500MHz */ |
111 | static struct omap_hwmod dm81xx_alwon_l3_slow_hwmod = { | 111 | static struct omap_hwmod dm81xx_alwon_l3_slow_hwmod = { |
@@ -557,22 +557,42 @@ static struct omap_hwmod_class dm81xx_usbotg_class = { | |||
557 | .sysc = &dm81xx_usbhsotg_sysc, | 557 | .sysc = &dm81xx_usbhsotg_sysc, |
558 | }; | 558 | }; |
559 | 559 | ||
560 | static struct omap_hwmod dm81xx_usbss_hwmod = { | 560 | static struct omap_hwmod dm814x_usbss_hwmod = { |
561 | .name = "usb_otg_hs", | ||
562 | .clkdm_name = "default_l3_slow_clkdm", | ||
563 | .main_clk = "pll260dcoclkldo", /* 481c5260.adpll.dcoclkldo */ | ||
564 | .prcm = { | ||
565 | .omap4 = { | ||
566 | .clkctrl_offs = DM81XX_CM_DEFAULT_USB_CLKCTRL, | ||
567 | .modulemode = MODULEMODE_SWCTRL, | ||
568 | }, | ||
569 | }, | ||
570 | .class = &dm81xx_usbotg_class, | ||
571 | }; | ||
572 | |||
573 | static struct omap_hwmod_ocp_if dm814x_default_l3_slow__usbss = { | ||
574 | .master = &dm81xx_default_l3_slow_hwmod, | ||
575 | .slave = &dm814x_usbss_hwmod, | ||
576 | .clk = "sysclk6_ck", | ||
577 | .user = OCP_USER_MPU, | ||
578 | }; | ||
579 | |||
580 | static struct omap_hwmod dm816x_usbss_hwmod = { | ||
561 | .name = "usb_otg_hs", | 581 | .name = "usb_otg_hs", |
562 | .clkdm_name = "default_l3_slow_clkdm", | 582 | .clkdm_name = "default_l3_slow_clkdm", |
563 | .main_clk = "sysclk6_ck", | 583 | .main_clk = "sysclk6_ck", |
564 | .prcm = { | 584 | .prcm = { |
565 | .omap4 = { | 585 | .omap4 = { |
566 | .clkctrl_offs = DM816X_CM_DEFAULT_USB_CLKCTRL, | 586 | .clkctrl_offs = DM81XX_CM_DEFAULT_USB_CLKCTRL, |
567 | .modulemode = MODULEMODE_SWCTRL, | 587 | .modulemode = MODULEMODE_SWCTRL, |
568 | }, | 588 | }, |
569 | }, | 589 | }, |
570 | .class = &dm81xx_usbotg_class, | 590 | .class = &dm81xx_usbotg_class, |
571 | }; | 591 | }; |
572 | 592 | ||
573 | static struct omap_hwmod_ocp_if dm81xx_default_l3_slow__usbss = { | 593 | static struct omap_hwmod_ocp_if dm816x_default_l3_slow__usbss = { |
574 | .master = &dm81xx_default_l3_slow_hwmod, | 594 | .master = &dm81xx_default_l3_slow_hwmod, |
575 | .slave = &dm81xx_usbss_hwmod, | 595 | .slave = &dm816x_usbss_hwmod, |
576 | .clk = "sysclk6_ck", | 596 | .clk = "sysclk6_ck", |
577 | .user = OCP_USER_MPU, | 597 | .user = OCP_USER_MPU, |
578 | }; | 598 | }; |
@@ -912,7 +932,7 @@ static struct omap_hwmod_ocp_if dm816x_l4_hs__emac1 = { | |||
912 | .user = OCP_USER_MPU, | 932 | .user = OCP_USER_MPU, |
913 | }; | 933 | }; |
914 | 934 | ||
915 | static struct omap_hwmod_class_sysconfig dm816x_mmc_sysc = { | 935 | static struct omap_hwmod_class_sysconfig dm81xx_mmc_sysc = { |
916 | .rev_offs = 0x0, | 936 | .rev_offs = 0x0, |
917 | .sysc_offs = 0x110, | 937 | .sysc_offs = 0x110, |
918 | .syss_offs = 0x114, | 938 | .syss_offs = 0x114, |
@@ -923,24 +943,94 @@ static struct omap_hwmod_class_sysconfig dm816x_mmc_sysc = { | |||
923 | .sysc_fields = &omap_hwmod_sysc_type1, | 943 | .sysc_fields = &omap_hwmod_sysc_type1, |
924 | }; | 944 | }; |
925 | 945 | ||
926 | static struct omap_hwmod_class dm816x_mmc_class = { | 946 | static struct omap_hwmod_class dm81xx_mmc_class = { |
927 | .name = "mmc", | 947 | .name = "mmc", |
928 | .sysc = &dm816x_mmc_sysc, | 948 | .sysc = &dm81xx_mmc_sysc, |
929 | }; | 949 | }; |
930 | 950 | ||
931 | static struct omap_hwmod_opt_clk dm816x_mmc1_opt_clks[] = { | 951 | static struct omap_hwmod_opt_clk dm81xx_mmc_opt_clks[] = { |
932 | { .role = "dbck", .clk = "sysclk18_ck", }, | 952 | { .role = "dbck", .clk = "sysclk18_ck", }, |
933 | }; | 953 | }; |
934 | 954 | ||
935 | static struct omap_hsmmc_dev_attr mmc1_dev_attr = { | 955 | static struct omap_hsmmc_dev_attr mmc_dev_attr = { |
936 | .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT, | 956 | }; |
957 | |||
958 | static struct omap_hwmod dm814x_mmc1_hwmod = { | ||
959 | .name = "mmc1", | ||
960 | .clkdm_name = "alwon_l3s_clkdm", | ||
961 | .opt_clks = dm81xx_mmc_opt_clks, | ||
962 | .opt_clks_cnt = ARRAY_SIZE(dm81xx_mmc_opt_clks), | ||
963 | .main_clk = "sysclk8_ck", | ||
964 | .prcm = { | ||
965 | .omap4 = { | ||
966 | .clkctrl_offs = DM814X_CM_ALWON_MMCHS_0_CLKCTRL, | ||
967 | .modulemode = MODULEMODE_SWCTRL, | ||
968 | }, | ||
969 | }, | ||
970 | .dev_attr = &mmc_dev_attr, | ||
971 | .class = &dm81xx_mmc_class, | ||
972 | }; | ||
973 | |||
974 | static struct omap_hwmod_ocp_if dm814x_l4_ls__mmc1 = { | ||
975 | .master = &dm81xx_l4_ls_hwmod, | ||
976 | .slave = &dm814x_mmc1_hwmod, | ||
977 | .clk = "sysclk6_ck", | ||
978 | .user = OCP_USER_MPU, | ||
979 | .flags = OMAP_FIREWALL_L4 | ||
980 | }; | ||
981 | |||
982 | static struct omap_hwmod dm814x_mmc2_hwmod = { | ||
983 | .name = "mmc2", | ||
984 | .clkdm_name = "alwon_l3s_clkdm", | ||
985 | .opt_clks = dm81xx_mmc_opt_clks, | ||
986 | .opt_clks_cnt = ARRAY_SIZE(dm81xx_mmc_opt_clks), | ||
987 | .main_clk = "sysclk8_ck", | ||
988 | .prcm = { | ||
989 | .omap4 = { | ||
990 | .clkctrl_offs = DM814X_CM_ALWON_MMCHS_1_CLKCTRL, | ||
991 | .modulemode = MODULEMODE_SWCTRL, | ||
992 | }, | ||
993 | }, | ||
994 | .dev_attr = &mmc_dev_attr, | ||
995 | .class = &dm81xx_mmc_class, | ||
996 | }; | ||
997 | |||
998 | static struct omap_hwmod_ocp_if dm814x_l4_ls__mmc2 = { | ||
999 | .master = &dm81xx_l4_ls_hwmod, | ||
1000 | .slave = &dm814x_mmc2_hwmod, | ||
1001 | .clk = "sysclk6_ck", | ||
1002 | .user = OCP_USER_MPU, | ||
1003 | .flags = OMAP_FIREWALL_L4 | ||
1004 | }; | ||
1005 | |||
1006 | static struct omap_hwmod dm814x_mmc3_hwmod = { | ||
1007 | .name = "mmc3", | ||
1008 | .clkdm_name = "alwon_l3_med_clkdm", | ||
1009 | .opt_clks = dm81xx_mmc_opt_clks, | ||
1010 | .opt_clks_cnt = ARRAY_SIZE(dm81xx_mmc_opt_clks), | ||
1011 | .main_clk = "sysclk8_ck", | ||
1012 | .prcm = { | ||
1013 | .omap4 = { | ||
1014 | .clkctrl_offs = DM814X_CM_ALWON_MMCHS_2_CLKCTRL, | ||
1015 | .modulemode = MODULEMODE_SWCTRL, | ||
1016 | }, | ||
1017 | }, | ||
1018 | .dev_attr = &mmc_dev_attr, | ||
1019 | .class = &dm81xx_mmc_class, | ||
1020 | }; | ||
1021 | |||
1022 | static struct omap_hwmod_ocp_if dm814x_alwon_l3_med__mmc3 = { | ||
1023 | .master = &dm81xx_alwon_l3_med_hwmod, | ||
1024 | .slave = &dm814x_mmc3_hwmod, | ||
1025 | .clk = "sysclk4_ck", | ||
1026 | .user = OCP_USER_MPU, | ||
937 | }; | 1027 | }; |
938 | 1028 | ||
939 | static struct omap_hwmod dm816x_mmc1_hwmod = { | 1029 | static struct omap_hwmod dm816x_mmc1_hwmod = { |
940 | .name = "mmc1", | 1030 | .name = "mmc1", |
941 | .clkdm_name = "alwon_l3s_clkdm", | 1031 | .clkdm_name = "alwon_l3s_clkdm", |
942 | .opt_clks = dm816x_mmc1_opt_clks, | 1032 | .opt_clks = dm81xx_mmc_opt_clks, |
943 | .opt_clks_cnt = ARRAY_SIZE(dm816x_mmc1_opt_clks), | 1033 | .opt_clks_cnt = ARRAY_SIZE(dm81xx_mmc_opt_clks), |
944 | .main_clk = "sysclk10_ck", | 1034 | .main_clk = "sysclk10_ck", |
945 | .prcm = { | 1035 | .prcm = { |
946 | .omap4 = { | 1036 | .omap4 = { |
@@ -948,8 +1038,8 @@ static struct omap_hwmod dm816x_mmc1_hwmod = { | |||
948 | .modulemode = MODULEMODE_SWCTRL, | 1038 | .modulemode = MODULEMODE_SWCTRL, |
949 | }, | 1039 | }, |
950 | }, | 1040 | }, |
951 | .dev_attr = &mmc1_dev_attr, | 1041 | .dev_attr = &mmc_dev_attr, |
952 | .class = &dm816x_mmc_class, | 1042 | .class = &dm81xx_mmc_class, |
953 | }; | 1043 | }; |
954 | 1044 | ||
955 | static struct omap_hwmod_ocp_if dm816x_l4_ls__mmc1 = { | 1045 | static struct omap_hwmod_ocp_if dm816x_l4_ls__mmc1 = { |
@@ -1267,8 +1357,6 @@ static struct omap_hwmod_ocp_if dm81xx_tptc3__alwon_l3_fast = { | |||
1267 | * dm81xx_l4_ls__gpio1 | 1357 | * dm81xx_l4_ls__gpio1 |
1268 | * dm81xx_l4_ls__gpio2 | 1358 | * dm81xx_l4_ls__gpio2 |
1269 | * dm81xx_l4_ls__mailbox | 1359 | * dm81xx_l4_ls__mailbox |
1270 | * dm81xx_alwon_l3_slow__gpmc | ||
1271 | * dm81xx_default_l3_slow__usbss | ||
1272 | * | 1360 | * |
1273 | * Also note that some devices share a single clkctrl_offs.. | 1361 | * Also note that some devices share a single clkctrl_offs.. |
1274 | * For example, i2c1 and 3 share one, and i2c2 and 4 share one. | 1362 | * For example, i2c1 and 3 share one, and i2c2 and 4 share one. |
@@ -1286,6 +1374,8 @@ static struct omap_hwmod_ocp_if *dm814x_hwmod_ocp_ifs[] __initdata = { | |||
1286 | &dm81xx_l4_ls__i2c2, | 1374 | &dm81xx_l4_ls__i2c2, |
1287 | &dm81xx_l4_ls__elm, | 1375 | &dm81xx_l4_ls__elm, |
1288 | &dm81xx_l4_ls__mcspi1, | 1376 | &dm81xx_l4_ls__mcspi1, |
1377 | &dm814x_l4_ls__mmc1, | ||
1378 | &dm814x_l4_ls__mmc2, | ||
1289 | &dm81xx_alwon_l3_fast__tpcc, | 1379 | &dm81xx_alwon_l3_fast__tpcc, |
1290 | &dm81xx_alwon_l3_fast__tptc0, | 1380 | &dm81xx_alwon_l3_fast__tptc0, |
1291 | &dm81xx_alwon_l3_fast__tptc1, | 1381 | &dm81xx_alwon_l3_fast__tptc1, |
@@ -1299,6 +1389,9 @@ static struct omap_hwmod_ocp_if *dm814x_hwmod_ocp_ifs[] __initdata = { | |||
1299 | &dm814x_l4_ls__timer2, | 1389 | &dm814x_l4_ls__timer2, |
1300 | &dm814x_l4_hs__cpgmac0, | 1390 | &dm814x_l4_hs__cpgmac0, |
1301 | &dm814x_cpgmac0__mdio, | 1391 | &dm814x_cpgmac0__mdio, |
1392 | &dm81xx_alwon_l3_slow__gpmc, | ||
1393 | &dm814x_default_l3_slow__usbss, | ||
1394 | &dm814x_alwon_l3_med__mmc3, | ||
1302 | NULL, | 1395 | NULL, |
1303 | }; | 1396 | }; |
1304 | 1397 | ||
@@ -1346,7 +1439,7 @@ static struct omap_hwmod_ocp_if *dm816x_hwmod_ocp_ifs[] __initdata = { | |||
1346 | &dm81xx_tptc2__alwon_l3_fast, | 1439 | &dm81xx_tptc2__alwon_l3_fast, |
1347 | &dm81xx_tptc3__alwon_l3_fast, | 1440 | &dm81xx_tptc3__alwon_l3_fast, |
1348 | &dm81xx_alwon_l3_slow__gpmc, | 1441 | &dm81xx_alwon_l3_slow__gpmc, |
1349 | &dm81xx_default_l3_slow__usbss, | 1442 | &dm816x_default_l3_slow__usbss, |
1350 | NULL, | 1443 | NULL, |
1351 | }; | 1444 | }; |
1352 | 1445 | ||