From 1e8f246563df822becdf909919d5e7667165f70f Mon Sep 17 00:00:00 2001 From: Vignesh Raghavendra Date: Tue, 9 Feb 2021 13:38:48 +0530 Subject: [PATCH 1/6] ARM: dts: k3-j7200-common-proc-board-u-boot: Fix broken ethernet Since commit 6239cc8c4e ("arm: dts: k3-j7200: Sync Linux v5.11-rc6 dts into U-Boot") ranges have been added to CPSW node which results in U-Boot CPSW driver failing to acquire phy_gmii_sel register range and thus failing to configure GMII mode correctly. Fix this by deleting ranges in -u-boot-dtsi just like its done for other K3 platforms. Fixes: 6239cc8c4e ("arm: dts: k3-j7200: Sync Linux v5.11-rc6 dts into U-Boot") Signed-off-by: Vignesh Raghavendra --- arch/arm/dts/k3-j7200-common-proc-board-u-boot.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/dts/k3-j7200-common-proc-board-u-boot.dtsi b/arch/arm/dts/k3-j7200-common-proc-board-u-boot.dtsi index e52f7e1e86..bd037be350 100644 --- a/arch/arm/dts/k3-j7200-common-proc-board-u-boot.dtsi +++ b/arch/arm/dts/k3-j7200-common-proc-board-u-boot.dtsi @@ -114,6 +114,7 @@ reg = <0x0 0x46000000 0x0 0x200000>, <0x0 0x40f00200 0x0 0x8>; reg-names = "cpsw_nuss", "mac_efuse"; + /delete-property/ ranges; cpsw-phy-sel@40f04040 { compatible = "ti,am654-cpsw-phy-sel"; From f43d9e904db2c882dbd824b7bcd5f0502b3dc7ab Mon Sep 17 00:00:00 2001 From: Dario Binacchi Date: Sat, 13 Feb 2021 12:00:45 +0100 Subject: [PATCH 2/6] arm: dts: sync am33xx gpio nodes with Linux 5.9-rc7 Move gpio controller nodes from am33xx.dtsi to am33xx-l4.dtsi. Now both files are more similar to those found in Linux 5.9-rc7. To be fully operational as before it was also necessary to fix the am33xx-clock.dtsi file. It too is now almost the same as the Linux kernel. Signed-off-by: Dario Binacchi --- arch/arm/dts/am33xx-clocks.dtsi | 2 +- arch/arm/dts/am33xx-l4.dtsi | 64 +++++++++++++++++++++++++++++++++ arch/arm/dts/am33xx.dtsi | 44 ----------------------- 3 files changed, 65 insertions(+), 45 deletions(-) diff --git a/arch/arm/dts/am33xx-clocks.dtsi b/arch/arm/dts/am33xx-clocks.dtsi index 87c4410ee2..5640ce40c4 100644 --- a/arch/arm/dts/am33xx-clocks.dtsi +++ b/arch/arm/dts/am33xx-clocks.dtsi @@ -604,7 +604,7 @@ l4_wkup_clkctrl: l4-wkup-clkctrl@0 { compatible = "ti,clkctrl"; - reg = <0x4 0x10>, <0xb4 0x24>; + reg = <0x0 0x10>, <0xb4 0x24>; #clock-cells = <2>; }; diff --git a/arch/arm/dts/am33xx-l4.dtsi b/arch/arm/dts/am33xx-l4.dtsi index 257991e2ad..e678673317 100644 --- a/arch/arm/dts/am33xx-l4.dtsi +++ b/arch/arm/dts/am33xx-l4.dtsi @@ -148,6 +148,28 @@ #address-cells = <1>; #size-cells = <1>; ranges = <0x0 0x7000 0x1000>; + + gpio0: gpio@0 { + compatible = "ti,omap4-gpio"; + gpio-ranges = <&am33xx_pinmux 0 82 8>, + <&am33xx_pinmux 8 52 4>, + <&am33xx_pinmux 12 94 4>, + <&am33xx_pinmux 16 71 2>, + <&am33xx_pinmux 18 135 1>, + <&am33xx_pinmux 19 108 2>, + <&am33xx_pinmux 21 73 1>, + <&am33xx_pinmux 22 8 2>, + <&am33xx_pinmux 26 10 2>, + <&am33xx_pinmux 28 74 1>, + <&am33xx_pinmux 29 81 1>, + <&am33xx_pinmux 30 28 2>; + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + reg = <0x0 0x1000>; + interrupts = <96>; + }; }; target-module@9000 { /* 0x44e09000, ap 16 04.0 */ @@ -1200,6 +1222,20 @@ #address-cells = <1>; #size-cells = <1>; ranges = <0x0 0x4c000 0x1000>; + + gpio1: gpio@0 { + compatible = "ti,omap4-gpio"; + gpio-ranges = <&am33xx_pinmux 0 0 8>, + <&am33xx_pinmux 8 90 4>, + <&am33xx_pinmux 12 12 16>, + <&am33xx_pinmux 28 30 4>; + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + reg = <0x0 0x1000>; + interrupts = <98>; + }; }; target-module@50000 { /* 0x48050000, ap 34 2c.0 */ @@ -1570,6 +1606,19 @@ #address-cells = <1>; #size-cells = <1>; ranges = <0x0 0xac000 0x1000>; + + gpio2: gpio@0 { + compatible = "ti,omap4-gpio"; + gpio-ranges = <&am33xx_pinmux 0 34 18>, + <&am33xx_pinmux 18 77 4>, + <&am33xx_pinmux 22 56 10>; + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + reg = <0x0 0x1000>; + interrupts = <32>; + }; }; target-module@ae000 { /* 0x481ae000, ap 56 3a.0 */ @@ -1593,6 +1642,21 @@ #address-cells = <1>; #size-cells = <1>; ranges = <0x0 0xae000 0x1000>; + + gpio3: gpio@0 { + compatible = "ti,omap4-gpio"; + gpio-ranges = <&am33xx_pinmux 0 66 5>, + <&am33xx_pinmux 5 98 2>, + <&am33xx_pinmux 7 75 2>, + <&am33xx_pinmux 13 141 1>, + <&am33xx_pinmux 14 100 8>; + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + reg = <0x0 0x1000>; + interrupts = <62>; + }; }; target-module@b0000 { /* 0x481b0000, ap 58 50.0 */ diff --git a/arch/arm/dts/am33xx.dtsi b/arch/arm/dts/am33xx.dtsi index 3e5ed00aae..ce07cec846 100644 --- a/arch/arm/dts/am33xx.dtsi +++ b/arch/arm/dts/am33xx.dtsi @@ -301,50 +301,6 @@ }; }; - gpio0: gpio@44e07000 { - compatible = "ti,omap4-gpio"; - ti,hwmods = "gpio1"; - gpio-controller; - #gpio-cells = <2>; - interrupt-controller; - #interrupt-cells = <2>; - reg = <0x44e07000 0x1000>; - interrupts = <96>; - }; - - gpio1: gpio@4804c000 { - compatible = "ti,omap4-gpio"; - ti,hwmods = "gpio2"; - gpio-controller; - #gpio-cells = <2>; - interrupt-controller; - #interrupt-cells = <2>; - reg = <0x4804c000 0x1000>; - interrupts = <98>; - }; - - gpio2: gpio@481ac000 { - compatible = "ti,omap4-gpio"; - ti,hwmods = "gpio3"; - gpio-controller; - #gpio-cells = <2>; - interrupt-controller; - #interrupt-cells = <2>; - reg = <0x481ac000 0x1000>; - interrupts = <32>; - }; - - gpio3: gpio@481ae000 { - compatible = "ti,omap4-gpio"; - ti,hwmods = "gpio4"; - gpio-controller; - #gpio-cells = <2>; - interrupt-controller; - #interrupt-cells = <2>; - reg = <0x481ae000 0x1000>; - interrupts = <62>; - }; - i2c0: i2c@44e0b000 { compatible = "ti,omap4-i2c"; #address-cells = <1>; From d242a14533742563a02ebb52925d0774695593ea Mon Sep 17 00:00:00 2001 From: Dario Binacchi Date: Sat, 13 Feb 2021 12:02:30 +0100 Subject: [PATCH 3/6] clk: ti: improve debug messages for clkctrl driver The previous version printed the same debug message for both the enable and disable routines without highlighting whether you were enabling or disabling the module. It is now clear whether you are enabling or disabling the module. Signed-off-by: Dario Binacchi --- drivers/clk/ti/clk-ctrl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/clk/ti/clk-ctrl.c b/drivers/clk/ti/clk-ctrl.c index 3c6195b208..8ac085ee4f 100644 --- a/drivers/clk/ti/clk-ctrl.c +++ b/drivers/clk/ti/clk-ctrl.c @@ -49,7 +49,7 @@ static int clk_ti_ctrl_disable(struct clk *clk) } clk_modules[0] = (u32 *)(offs); - dev_dbg(clk->dev, "module address=%p\n", clk_modules[0]); + dev_dbg(clk->dev, "disable module @ %p\n", clk_modules[0]); do_disable_clocks(NULL, clk_modules, 1); return 0; } @@ -69,7 +69,7 @@ static int clk_ti_ctrl_enable(struct clk *clk) } clk_modules[0] = (u32 *)(offs); - dev_dbg(clk->dev, "module address=%p\n", clk_modules[0]); + dev_dbg(clk->dev, "enable module @ %p\n", clk_modules[0]); do_enable_clocks(NULL, clk_modules, 1); return 0; } From 252ee3c5b98ad3e06921f2794126860b2c65fbf3 Mon Sep 17 00:00:00 2001 From: Dario Binacchi Date: Sat, 13 Feb 2021 12:09:19 +0100 Subject: [PATCH 4/6] arm: dts: sync am33xx-clocks with Linux 5.9-rc7 The commit 6337d53fdf45 ("arm: dts: sync am33xx with Linux 5.9-rc7") synchronized the am33xx-clocks.dtsi file with Linux 5.9-rc7 with the exception of two nodes. I think I was wrong and it is better to keep the two files similar and possibly make changes to the *-u-boot.dtsi files. Signed-off-by: Dario Binacchi --- arch/arm/dts/am33xx-clocks.dtsi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arm/dts/am33xx-clocks.dtsi b/arch/arm/dts/am33xx-clocks.dtsi index 5640ce40c4..9221824390 100644 --- a/arch/arm/dts/am33xx-clocks.dtsi +++ b/arch/arm/dts/am33xx-clocks.dtsi @@ -539,7 +539,7 @@ }; &prcm { - l4_per_cm: l4_per-cm@0 { + per_cm: per-cm@0 { compatible = "ti,omap4-cm"; reg = <0x0 0x400>; #address-cells = <1>; @@ -670,9 +670,9 @@ #size-cells = <1>; ranges = <0 0xa00 0x100>; - l4_cefuse_clkctrl: clk@20 { + l4_cefuse_clkctrl: l4-cefuse-clkctrl@0 { compatible = "ti,clkctrl"; - reg = <0x20 0x4>; + reg = <0x0 0x24>; #clock-cells = <2>; }; }; From ecec33faa107692011f759d35da507f8dd13f6e8 Mon Sep 17 00:00:00 2001 From: Dario Binacchi Date: Sun, 14 Feb 2021 15:17:42 +0100 Subject: [PATCH 5/6] clk: remove a redundant header The linux/err.h header file was included twice. Signed-off-by: Dario Binacchi Reviewed-by: Simon Glass --- include/linux/clk-provider.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h index c871ea646d..cc9c430512 100644 --- a/include/linux/clk-provider.h +++ b/include/linux/clk-provider.h @@ -12,7 +12,6 @@ #include #include #include -#include struct udevice; From d67da448ff2d433f3ad651314a50b9ea42b2e2ae Mon Sep 17 00:00:00 2001 From: Dario Binacchi Date: Sun, 14 Feb 2021 15:17:43 +0100 Subject: [PATCH 6/6] arch: sandbox: fix typo in clk.h Fix the 'devivce' typo in arch/sandbox/include/asm/clk.h. Signed-off-by: Dario Binacchi Reviewed-by: Simon Glass --- arch/sandbox/include/asm/clk.h | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/arch/sandbox/include/asm/clk.h b/arch/sandbox/include/asm/clk.h index 0294baee27..68a8687f57 100644 --- a/arch/sandbox/include/asm/clk.h +++ b/arch/sandbox/include/asm/clk.h @@ -74,7 +74,7 @@ int sandbox_clk_query_requested(struct udevice *dev, int id); * sandbox_clk_test_get - Ask the sandbox clock test device to request its * clocks. * - * @dev: The sandbox clock test (client) devivce. + * @dev: The sandbox clock test (client) device. * @return: 0 if OK, or a negative error code. */ int sandbox_clk_test_get(struct udevice *dev); @@ -83,7 +83,7 @@ int sandbox_clk_test_get(struct udevice *dev); * sandbox_clk_test_devm_get - Ask the sandbox clock test device to request its * clocks using the managed API. * - * @dev: The sandbox clock test (client) devivce. + * @dev: The sandbox clock test (client) device. * @return: 0 if OK, or a negative error code. */ int sandbox_clk_test_devm_get(struct udevice *dev); @@ -92,7 +92,7 @@ int sandbox_clk_test_devm_get(struct udevice *dev); * sandbox_clk_test_get_bulk - Ask the sandbox clock test device to request its * clocks with the bulk clk API. * - * @dev: The sandbox clock test (client) devivce. + * @dev: The sandbox clock test (client) device. * @return: 0 if OK, or a negative error code. */ int sandbox_clk_test_get_bulk(struct udevice *dev); @@ -100,7 +100,7 @@ int sandbox_clk_test_get_bulk(struct udevice *dev); * sandbox_clk_test_get_rate - Ask the sandbox clock test device to query a * clock's rate. * - * @dev: The sandbox clock test (client) devivce. + * @dev: The sandbox clock test (client) device. * @id: The test device's clock ID to query. * @return: The rate of the clock. */ @@ -118,7 +118,7 @@ ulong sandbox_clk_test_round_rate(struct udevice *dev, int id, ulong rate); * sandbox_clk_test_set_rate - Ask the sandbox clock test device to set a * clock's rate. * - * @dev: The sandbox clock test (client) devivce. + * @dev: The sandbox clock test (client) device. * @id: The test device's clock ID to configure. * @return: The new rate of the clock. */ @@ -127,7 +127,7 @@ ulong sandbox_clk_test_set_rate(struct udevice *dev, int id, ulong rate); * sandbox_clk_test_enable - Ask the sandbox clock test device to enable a * clock. * - * @dev: The sandbox clock test (client) devivce. + * @dev: The sandbox clock test (client) device. * @id: The test device's clock ID to configure. * @return: 0 if OK, or a negative error code. */ @@ -136,7 +136,7 @@ int sandbox_clk_test_enable(struct udevice *dev, int id); * sandbox_clk_test_enable_bulk - Ask the sandbox clock test device to enable * all clocks in it's clock bulk struct. * - * @dev: The sandbox clock test (client) devivce. + * @dev: The sandbox clock test (client) device. * @return: 0 if OK, or a negative error code. */ int sandbox_clk_test_enable_bulk(struct udevice *dev); @@ -144,7 +144,7 @@ int sandbox_clk_test_enable_bulk(struct udevice *dev); * sandbox_clk_test_disable - Ask the sandbox clock test device to disable a * clock. * - * @dev: The sandbox clock test (client) devivce. + * @dev: The sandbox clock test (client) device. * @id: The test device's clock ID to configure. * @return: 0 if OK, or a negative error code. */ @@ -153,7 +153,7 @@ int sandbox_clk_test_disable(struct udevice *dev, int id); * sandbox_clk_test_disable_bulk - Ask the sandbox clock test device to disable * all clocks in it's clock bulk struct. * - * @dev: The sandbox clock test (client) devivce. + * @dev: The sandbox clock test (client) device. * @return: 0 if OK, or a negative error code. */ int sandbox_clk_test_disable_bulk(struct udevice *dev); @@ -161,7 +161,7 @@ int sandbox_clk_test_disable_bulk(struct udevice *dev); * sandbox_clk_test_free - Ask the sandbox clock test device to free its * clocks. * - * @dev: The sandbox clock test (client) devivce. + * @dev: The sandbox clock test (client) device. * @return: 0 if OK, or a negative error code. */ int sandbox_clk_test_free(struct udevice *dev); @@ -169,7 +169,7 @@ int sandbox_clk_test_free(struct udevice *dev); * sandbox_clk_test_release_bulk - Ask the sandbox clock test device to release * all clocks in it's clock bulk struct. * - * @dev: The sandbox clock test (client) devivce. + * @dev: The sandbox clock test (client) device. * @return: 0 if OK, or a negative error code. */ int sandbox_clk_test_release_bulk(struct udevice *dev); @@ -177,7 +177,7 @@ int sandbox_clk_test_release_bulk(struct udevice *dev); * sandbox_clk_test_valid - Ask the sandbox clock test device to check its * clocks are valid. * - * @dev: The sandbox clock test (client) devivce. + * @dev: The sandbox clock test (client) device. * @return: 0 if OK, or a negative error code. */ int sandbox_clk_test_valid(struct udevice *dev); @@ -185,7 +185,7 @@ int sandbox_clk_test_valid(struct udevice *dev); * sandbox_clk_test_valid - Ask the sandbox clock test device to check its * clocks are valid. * - * @dev: The sandbox clock test (client) devivce. + * @dev: The sandbox clock test (client) device. * @return: 0 if OK, or a negative error code. */ struct clk *sandbox_clk_test_get_devm_clk(struct udevice *dev, int id);