From ec7cc27ed157a7323d08c31d73cada1dfe101642 Mon Sep 17 00:00:00 2001 From: Karl Beldan Date: Wed, 5 Oct 2016 15:05:31 +0200 Subject: ARM: davinci: da8xx-dt: add OF_DEV_AUXDATA entry for lcdc This is required for tilcdc to be able to acquire a functional clock on da850 SoCs. Signed-off-by: Karl Beldan [Bartosz: - added the commit description - changed the compatible string to 'ti,da850-tilcdc'] Signed-off-by: Bartosz Golaszewski Signed-off-by: Sekhar Nori --- arch/arm/mach-davinci/da8xx-dt.c | 1 + 1 file changed, 1 insertion(+) (limited to 'arch/arm/mach-davinci/da8xx-dt.c') diff --git a/arch/arm/mach-davinci/da8xx-dt.c b/arch/arm/mach-davinci/da8xx-dt.c index c9f7e9274aa8..697da3d86563 100644 --- a/arch/arm/mach-davinci/da8xx-dt.c +++ b/arch/arm/mach-davinci/da8xx-dt.c @@ -38,6 +38,7 @@ static struct of_dev_auxdata da850_auxdata_lookup[] __initdata = { NULL), OF_DEV_AUXDATA("ti,da830-mcasp-audio", 0x01d00000, "davinci-mcasp.0", NULL), OF_DEV_AUXDATA("ti,da850-aemif", 0x68000000, "ti-aemif", NULL), + OF_DEV_AUXDATA("ti,da850-tilcdc", 0x01e13000, "da8xx_lcdc.0", NULL), {} }; -- cgit From b08157a1b650773ab446ae173c908f8c9abdb9a4 Mon Sep 17 00:00:00 2001 From: David Lechner Date: Wed, 26 Oct 2016 19:18:16 -0500 Subject: ARM: davinci: da8xx: Add USB device names to clock lookup tables This adds device names for the SoC USB devices to the clock lookup tables in da830.c and da850.c. Also add the USB device names to the da850_auxdata_lookup[] table. Signed-off-by: David Lechner Signed-off-by: Sekhar Nori --- arch/arm/mach-davinci/da8xx-dt.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'arch/arm/mach-davinci/da8xx-dt.c') diff --git a/arch/arm/mach-davinci/da8xx-dt.c b/arch/arm/mach-davinci/da8xx-dt.c index 697da3d86563..0e45cbd57273 100644 --- a/arch/arm/mach-davinci/da8xx-dt.c +++ b/arch/arm/mach-davinci/da8xx-dt.c @@ -39,6 +39,8 @@ static struct of_dev_auxdata da850_auxdata_lookup[] __initdata = { OF_DEV_AUXDATA("ti,da830-mcasp-audio", 0x01d00000, "davinci-mcasp.0", NULL), OF_DEV_AUXDATA("ti,da850-aemif", 0x68000000, "ti-aemif", NULL), OF_DEV_AUXDATA("ti,da850-tilcdc", 0x01e13000, "da8xx_lcdc.0", NULL), + OF_DEV_AUXDATA("ti,da830-ohci", 0x01e25000, "ohci", NULL), + OF_DEV_AUXDATA("ti,da830-musb", 0x01e00000, "musb-da8xx", NULL), {} }; -- cgit From 3b996e5f8f4057b76eacae493a309215f3fd8485 Mon Sep 17 00:00:00 2001 From: David Lechner Date: Mon, 31 Oct 2016 15:47:19 -0500 Subject: ARM: davinci: da8xx-dt: add OF_DEV_AUXDATA entry for USB phy Add OF_DEV_AUXDATA() entry for USB phy. This is required for so that clock lookup will work for the USB PHY driver. Signed-off-by: David Lechner Signed-off-by: Sekhar Nori --- arch/arm/mach-davinci/da8xx-dt.c | 1 + 1 file changed, 1 insertion(+) (limited to 'arch/arm/mach-davinci/da8xx-dt.c') diff --git a/arch/arm/mach-davinci/da8xx-dt.c b/arch/arm/mach-davinci/da8xx-dt.c index 0e45cbd57273..5e67618180a7 100644 --- a/arch/arm/mach-davinci/da8xx-dt.c +++ b/arch/arm/mach-davinci/da8xx-dt.c @@ -41,6 +41,7 @@ static struct of_dev_auxdata da850_auxdata_lookup[] __initdata = { OF_DEV_AUXDATA("ti,da850-tilcdc", 0x01e13000, "da8xx_lcdc.0", NULL), OF_DEV_AUXDATA("ti,da830-ohci", 0x01e25000, "ohci", NULL), OF_DEV_AUXDATA("ti,da830-musb", 0x01e00000, "musb-da8xx", NULL), + OF_DEV_AUXDATA("ti,da830-usb-phy", 0x01c1417c, "da8xx-usb-phy", NULL), {} }; -- cgit From ced95ac0815501f47a6041548d70d8900400912d Mon Sep 17 00:00:00 2001 From: Axel Haslam Date: Mon, 31 Oct 2016 15:47:21 -0500 Subject: ARM: davinci: da8xx: register USB PHY clocks in the DT file The usb20_phy clock needs to be registered for the driver to be able to get and enable a clock. Currently the usb phy clocks are registered from board files, which will not be called during a device tree based boot. To be able to probe correctly usb form a device tree boot, register the usb phy clocks from the DT specific init. Unfortunately, davinci does not have proper clock support on device tree yet, so by registering the clock from the DT specific file we are forced to hardcode the parent clock, and cannot select refclkin as parent for any of the phy clocks of the da850 family. As none of the current da850 based boards currently in mainline use refclkin as source. I guess we can live with this limitation until clocks are correctly represented through CCF/device tree. Signed-off-by: Axel Haslam [Added error checking] Signed-off-by: David Lechner [nsekhar@ti.com: typo fixes in commit message] Signed-off-by: Sekhar Nori --- arch/arm/mach-davinci/da8xx-dt.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'arch/arm/mach-davinci/da8xx-dt.c') diff --git a/arch/arm/mach-davinci/da8xx-dt.c b/arch/arm/mach-davinci/da8xx-dt.c index 5e67618180a7..92ae093a2120 100644 --- a/arch/arm/mach-davinci/da8xx-dt.c +++ b/arch/arm/mach-davinci/da8xx-dt.c @@ -49,6 +49,17 @@ static struct of_dev_auxdata da850_auxdata_lookup[] __initdata = { static void __init da850_init_machine(void) { + int ret; + + ret = da8xx_register_usb20_phy_clk(false); + if (ret) + pr_warn("%s: registering USB 2.0 PHY clock failed: %d", + __func__, ret); + ret = da8xx_register_usb11_phy_clk(false); + if (ret) + pr_warn("%s: registering USB 1.1 PHY clock failed: %d", + __func__, ret); + of_platform_default_populate(NULL, da850_auxdata_lookup, NULL); } -- cgit From 7e431af8fa0b9ed9d74378c99514856211cb9db8 Mon Sep 17 00:00:00 2001 From: Kevin Hilman Date: Tue, 15 Nov 2016 11:54:21 -0800 Subject: ARM: davinci: PM: support da8xx DT platforms Add PM support for DA850 device-tree boot. Signed-off-by: Kevin Hilman Signed-off-by: Sekhar Nori --- arch/arm/mach-davinci/da8xx-dt.c | 1 + 1 file changed, 1 insertion(+) (limited to 'arch/arm/mach-davinci/da8xx-dt.c') diff --git a/arch/arm/mach-davinci/da8xx-dt.c b/arch/arm/mach-davinci/da8xx-dt.c index 92ae093a2120..e87ff2b66f12 100644 --- a/arch/arm/mach-davinci/da8xx-dt.c +++ b/arch/arm/mach-davinci/da8xx-dt.c @@ -61,6 +61,7 @@ static void __init da850_init_machine(void) __func__, ret); of_platform_default_populate(NULL, da850_auxdata_lookup, NULL); + davinci_pm_init(); } static const char *const da850_boards_compat[] __initconst = { -- cgit From 8439a1d77d07514fadc616a2691b5d130ce0b678 Mon Sep 17 00:00:00 2001 From: Axel Haslam Date: Thu, 3 Nov 2016 17:03:06 +0100 Subject: ARM: davinci: da8xx: Fix ohci device name While the clk lookup table is making reference to "ohci" other subsystems (such as phy) are trying to match "ohci.0" Since there is a single ohci instance, instead of changing the clk name, change the dev id to -1, and add the "-da8xx" postfix to match the driver name that will also be changed in a subsequent patch. Signed-off-by: Axel Haslam Signed-off-by: Sekhar Nori --- arch/arm/mach-davinci/da8xx-dt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/arm/mach-davinci/da8xx-dt.c') diff --git a/arch/arm/mach-davinci/da8xx-dt.c b/arch/arm/mach-davinci/da8xx-dt.c index e87ff2b66f12..3b169e4e6e2e 100644 --- a/arch/arm/mach-davinci/da8xx-dt.c +++ b/arch/arm/mach-davinci/da8xx-dt.c @@ -39,7 +39,7 @@ static struct of_dev_auxdata da850_auxdata_lookup[] __initdata = { OF_DEV_AUXDATA("ti,da830-mcasp-audio", 0x01d00000, "davinci-mcasp.0", NULL), OF_DEV_AUXDATA("ti,da850-aemif", 0x68000000, "ti-aemif", NULL), OF_DEV_AUXDATA("ti,da850-tilcdc", 0x01e13000, "da8xx_lcdc.0", NULL), - OF_DEV_AUXDATA("ti,da830-ohci", 0x01e25000, "ohci", NULL), + OF_DEV_AUXDATA("ti,da830-ohci", 0x01e25000, "ohci-da8xx", NULL), OF_DEV_AUXDATA("ti,da830-musb", 0x01e00000, "musb-da8xx", NULL), OF_DEV_AUXDATA("ti,da830-usb-phy", 0x01c1417c, "da8xx-usb-phy", NULL), {} -- cgit