Skip to content

Commit

Permalink
dts: Clock control for RT600, LPC54xxx, LPC55xxx
Browse files Browse the repository at this point in the history
Use the clock control driver to get flexcomm clock
frequency

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
  • Loading branch information
mmahadevan108 authored and galak committed Oct 15, 2020
1 parent f025700 commit c2a40a8
Show file tree
Hide file tree
Showing 5 changed files with 97 additions and 2 deletions.
20 changes: 18 additions & 2 deletions dts/arm/nxp/nxp_lpc54xxx.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

#include <dt-bindings/clock/mcux_lpc_syscon_clock.h>
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/i2c/i2c.h>

Expand All @@ -30,6 +31,13 @@
};

soc {
syscon: syscon@40000000 {
compatible = "nxp,lpc-syscon";
reg = <0x40000000 0x4000>;
label = "SYSCON";
#clock-cells = <1>;
};

sram0:memory@20000000 {
compatible = "mmio-sram";
reg = <0x20000000 0x10000>;
Expand All @@ -45,9 +53,9 @@
reg = <0x20020000 0x8000>;
};

sramx:memory@40000000{
sramx:memory@4000000{
compatible = "mmio-sram";
reg = <0x40000000 0x8000>;
reg = <0x4000000 0x8000>;
};

flash0:flash@0 {
Expand Down Expand Up @@ -85,6 +93,7 @@
compatible = "nxp,lpc-flexcomm";
reg = <0x40086000 0x1000>;
interrupts = <14 0>;
clocks = <&syscon MCUX_FLEXCOMM0_CLK>;
label = "FLEXCOMM_0";
status = "disabled";
};
Expand All @@ -93,6 +102,7 @@
compatible = "nxp,lpc-flexcomm";
reg = <0x40087000 0x1000>;
interrupts = <15 0>;
clocks = <&syscon MCUX_FLEXCOMM1_CLK>;
label = "FLEXCOMM_1";
status = "disabled";
};
Expand All @@ -101,6 +111,7 @@
compatible = "nxp,lpc-flexcomm";
reg = <0x40088000 0x1000>;
interrupts = <16 0>;
clocks = <&syscon MCUX_FLEXCOMM2_CLK>;
label = "FLEXCOMM_2";
status = "disabled";
};
Expand All @@ -109,6 +120,7 @@
compatible = "nxp,lpc-flexcomm";
reg = <0x40089000 0x1000>;
interrupts = <17 0>;
clocks = <&syscon MCUX_FLEXCOMM3_CLK>;
label = "FLEXCOMM_3";
status = "disabled";
};
Expand All @@ -117,6 +129,7 @@
compatible = "nxp,lpc-flexcomm";
reg = <0x4008a000 0x1000>;
interrupts = <18 0>;
clocks = <&syscon MCUX_FLEXCOMM4_CLK>;
label = "FLEXCOMM_4";
status = "disabled";
};
Expand All @@ -125,6 +138,7 @@
compatible = "nxp,lpc-flexcomm";
reg = <0x40096000 0x1000>;
interrupts = <19 0>;
clocks = <&syscon MCUX_FLEXCOMM5_CLK>;
label = "FLEXCOMM_5";
status = "disabled";
};
Expand All @@ -133,6 +147,7 @@
compatible = "nxp,lpc-flexcomm";
reg = <0x40097000 0x1000>;
interrupts = <20 0>;
clocks = <&syscon MCUX_FLEXCOMM6_CLK>;
label = "FLEXCOMM_6";
status = "disabled";
};
Expand All @@ -141,6 +156,7 @@
compatible = "nxp,lpc-flexcomm";
reg = <0x40098000 0x1000>;
interrupts = <21 0>;
clocks = <&syscon MCUX_FLEXCOMM7_CLK>;
label = "FLEXCOMM_7";
status = "disabled";
};
Expand Down
17 changes: 17 additions & 0 deletions dts/arm/nxp/nxp_lpc55S1x_common.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
*/

#include <arm/armv8-m.dtsi>
#include <dt-bindings/clock/mcux_lpc_syscon_clock.h>
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/i2c/i2c.h>
#include <mem.h>
Expand Down Expand Up @@ -69,6 +70,13 @@
#address-cells = <1>;
#size-cells = <1>;

syscon: syscon@0 {
compatible = "nxp,lpc-syscon";
reg = <0x0 0x4000>;
label = "SYSCON";
#clock-cells = <1>;
};

iap: flash-controller@34000 {
compatible = "nxp,lpc-iap";
label = "FLASH_IAP";
Expand Down Expand Up @@ -118,6 +126,7 @@
compatible = "nxp,lpc-flexcomm";
reg = <0x86000 0x1000>;
interrupts = <14 0>;
clocks = <&syscon MCUX_FLEXCOMM0_CLK>;
label = "FLEXCOMM_0";
status = "disabled";
};
Expand All @@ -126,6 +135,7 @@
compatible = "nxp,lpc-flexcomm";
reg = <0x87000 0x1000>;
interrupts = <15 0>;
clocks = <&syscon MCUX_FLEXCOMM1_CLK>;
label = "FLEXCOMM_1";
status = "disabled";
};
Expand All @@ -134,6 +144,7 @@
compatible = "nxp,lpc-flexcomm";
reg = <0x88000 0x1000>;
interrupts = <16 0>;
clocks = <&syscon MCUX_FLEXCOMM2_CLK>;
label = "FLEXCOMM_2";
status = "disabled";
};
Expand All @@ -142,6 +153,7 @@
compatible = "nxp,lpc-flexcomm";
reg = <0x89000 0x1000>;
interrupts = <17 0>;
clocks = <&syscon MCUX_FLEXCOMM3_CLK>;
label = "FLEXCOMM_3";
status = "disabled";
};
Expand All @@ -150,6 +162,7 @@
compatible = "nxp,lpc-flexcomm";
reg = <0x8a000 0x1000>;
interrupts = <18 0>;
clocks = <&syscon MCUX_FLEXCOMM4_CLK>;
label = "FLEXCOMM_4";
status = "disabled";
};
Expand All @@ -158,6 +171,7 @@
compatible = "nxp,lpc-flexcomm";
reg = <0x96000 0x1000>;
interrupts = <19 0>;
clocks = <&syscon MCUX_FLEXCOMM5_CLK>;
label = "FLEXCOMM_5";
status = "disabled";
};
Expand All @@ -166,6 +180,7 @@
compatible = "nxp,lpc-flexcomm";
reg = <0x97000 0x1000>;
interrupts = <20 0>;
clocks = <&syscon MCUX_FLEXCOMM6_CLK>;
label = "FLEXCOMM_6";
status = "disabled";
};
Expand All @@ -174,6 +189,7 @@
compatible = "nxp,lpc-flexcomm";
reg = <0x98000 0x1000>;
interrupts = <21 0>;
clocks = <&syscon MCUX_FLEXCOMM7_CLK>;
label = "FLEXCOMM_7";
status = "disabled";
};
Expand All @@ -182,6 +198,7 @@
compatible = "nxp,lpc-spi";
reg = <0x9f000 0x1000>;
interrupts = <59 0>;
clocks = <&syscon MCUX_HS_SPI_CLK>;
label = "HS_LSPI";
status = "disabled";
#address-cells = <1>;
Expand Down
17 changes: 17 additions & 0 deletions dts/arm/nxp/nxp_lpc55S6x_common.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
*/

#include <mem.h>
#include <dt-bindings/clock/mcux_lpc_syscon_clock.h>
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/i2c/i2c.h>
#include <arm/armv8-m.dtsi>
Expand Down Expand Up @@ -83,6 +84,13 @@
#address-cells = <1>;
#size-cells = <1>;

syscon: syscon@0 {
compatible = "nxp,lpc-syscon";
reg = <0x0 0x4000>;
label = "SYSCON";
#clock-cells = <1>;
};

iap: flash-controller@34000 {
compatible = "nxp,lpc-iap";
label = "FLASH_IAP";
Expand Down Expand Up @@ -131,6 +139,7 @@
compatible = "nxp,lpc-flexcomm";
reg = <0x86000 0x1000>;
interrupts = <14 0>;
clocks = <&syscon MCUX_FLEXCOMM0_CLK>;
label = "FLEXCOMM_0";
status = "disabled";
};
Expand All @@ -139,6 +148,7 @@
compatible = "nxp,lpc-flexcomm";
reg = <0x87000 0x1000>;
interrupts = <15 0>;
clocks = <&syscon MCUX_FLEXCOMM1_CLK>;
label = "FLEXCOMM_1";
status = "disabled";
};
Expand All @@ -147,6 +157,7 @@
compatible = "nxp,lpc-flexcomm";
reg = <0x88000 0x1000>;
interrupts = <16 0>;
clocks = <&syscon MCUX_FLEXCOMM2_CLK>;
label = "FLEXCOMM_2";
status = "disabled";
};
Expand All @@ -155,6 +166,7 @@
compatible = "nxp,lpc-flexcomm";
reg = <0x89000 0x1000>;
interrupts = <17 0>;
clocks = <&syscon MCUX_FLEXCOMM3_CLK>;
label = "FLEXCOMM_3";
status = "disabled";
};
Expand All @@ -163,6 +175,7 @@
compatible = "nxp,lpc-flexcomm";
reg = <0x8a000 0x1000>;
interrupts = <18 0>;
clocks = <&syscon MCUX_FLEXCOMM4_CLK>;
label = "FLEXCOMM_4";
status = "disabled";
};
Expand All @@ -171,6 +184,7 @@
compatible = "nxp,lpc-flexcomm";
reg = <0x96000 0x1000>;
interrupts = <19 0>;
clocks = <&syscon MCUX_FLEXCOMM5_CLK>;
label = "FLEXCOMM_5";
status = "disabled";
};
Expand All @@ -179,6 +193,7 @@
compatible = "nxp,lpc-flexcomm";
reg = <0x97000 0x1000>;
interrupts = <20 0>;
clocks = <&syscon MCUX_FLEXCOMM6_CLK>;
label = "FLEXCOMM_6";
status = "disabled";
};
Expand All @@ -187,6 +202,7 @@
compatible = "nxp,lpc-flexcomm";
reg = <0x98000 0x1000>;
interrupts = <21 0>;
clocks = <&syscon MCUX_FLEXCOMM7_CLK>;
label = "FLEXCOMM_7";
status = "disabled";
};
Expand All @@ -201,6 +217,7 @@
<&gpio1 26 GPIO_ACTIVE_LOW>; */
reg = <0x9f000 0x1000>;
interrupts = <59 0>;
clocks = <&syscon MCUX_HS_SPI_CLK>;
label = "HS_LSPI";
status = "disabled";
#address-cells = <1>;
Expand Down
24 changes: 24 additions & 0 deletions dts/arm/nxp/nxp_rt6xx_common.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

#include <mem.h>
#include <arm/armv8-m.dtsi>
#include <dt-bindings/clock/mcux_lpc_syscon_clock.h>
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/i2c/i2c.h>

Expand Down Expand Up @@ -48,6 +49,20 @@
#address-cells = <1>;
#size-cells = <1>;

clkctl0: clkctl@1000 {
compatible = "nxp,lpc-syscon";
reg = <0x1000 0x4000>;
label = "CLKCTL_0";
#clock-cells = <1>;
};

clkctl1: clkctl@21000 {
compatible = "nxp,lpc-syscon";
reg = <0x21000 0x4000>;
label = "CLKCTL_1";
#clock-cells = <1>;
};

gpio0: gpio@0 {
compatible = "nxp,lpc-gpio";
reg = <0x100000 0x4000>;
Expand Down Expand Up @@ -79,6 +94,7 @@
compatible = "nxp,lpc-flexcomm";
reg = <0x106000 0x1000>;
interrupts = <14 0>;
clocks = <&clkctl1 MCUX_FLEXCOMM0_CLK>;
label = "FLEXCOMM_0";
status = "disabled";
};
Expand All @@ -87,6 +103,7 @@
compatible = "nxp,lpc-flexcomm";
reg = <0x107000 0x1000>;
interrupts = <15 0>;
clocks = <&clkctl1 MCUX_FLEXCOMM1_CLK>;
label = "FLEXCOMM_1";
status = "disabled";
};
Expand All @@ -95,6 +112,7 @@
compatible = "nxp,lpc-flexcomm";
reg = <0x108000 0x1000>;
interrupts = <16 0>;
clocks = <&clkctl1 MCUX_FLEXCOMM2_CLK>;
label = "FLEXCOMM_2";
status = "disabled";
};
Expand All @@ -103,6 +121,7 @@
compatible = "nxp,lpc-flexcomm";
reg = <0x109000 0x1000>;
interrupts = <17 0>;
clocks = <&clkctl1 MCUX_FLEXCOMM3_CLK>;
label = "FLEXCOMM_3";
status = "disabled";
};
Expand All @@ -111,6 +130,7 @@
compatible = "nxp,lpc-flexcomm";
reg = <0x122000 0x1000>;
interrupts = <18 0>;
clocks = <&clkctl1 MCUX_FLEXCOMM4_CLK>;
label = "FLEXCOMM_4";
status = "disabled";
};
Expand All @@ -119,6 +139,7 @@
compatible = "nxp,lpc-flexcomm";
reg = <0x123000 0x1000>;
interrupts = <19 0>;
clocks = <&clkctl1 MCUX_FLEXCOMM5_CLK>;
label = "FLEXCOMM_5";
status = "disabled";
};
Expand All @@ -128,6 +149,7 @@
reg = <0x124000 0x1000>;
interrupts = <43 0>;
label = "FLEXCOMM_6";
clocks = <&clkctl1 MCUX_FLEXCOMM6_CLK>;
status = "disabled";
};

Expand All @@ -136,6 +158,7 @@
reg = <0x125000 0x1000>;
interrupts = <44 0>;
label = "FLEXCOMM_7";
clocks = <&clkctl1 MCUX_FLEXCOMM7_CLK>;
status = "disabled";
};

Expand All @@ -149,6 +172,7 @@
<&gpio1 17 GPIO_ACTIVE_LOW>; */
reg = <0x126000 0x1000>;
interrupts = <20 0>;
clocks = <&clkctl1 MCUX_HS_SPI_CLK>;
label = "HS_LSPI";
status = "disabled";
#address-cells = <1>;
Expand Down
Loading

0 comments on commit c2a40a8

Please sign in to comment.