dts: Clock control for RT600, LPC54xxx, LPC55xxx

Use the clock control driver to get flexcomm clock
frequency

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
This commit is contained in:
Mahesh Mahadevan 2020-08-25 16:15:03 -05:00 committed by Kumar Gala
parent f025700d8f
commit c2a40a8c66
5 changed files with 97 additions and 2 deletions

View File

@ -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>
@ -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>;
@ -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 {
@ -85,6 +93,7 @@
compatible = "nxp,lpc-flexcomm";
reg = <0x40086000 0x1000>;
interrupts = <14 0>;
clocks = <&syscon MCUX_FLEXCOMM0_CLK>;
label = "FLEXCOMM_0";
status = "disabled";
};
@ -93,6 +102,7 @@
compatible = "nxp,lpc-flexcomm";
reg = <0x40087000 0x1000>;
interrupts = <15 0>;
clocks = <&syscon MCUX_FLEXCOMM1_CLK>;
label = "FLEXCOMM_1";
status = "disabled";
};
@ -101,6 +111,7 @@
compatible = "nxp,lpc-flexcomm";
reg = <0x40088000 0x1000>;
interrupts = <16 0>;
clocks = <&syscon MCUX_FLEXCOMM2_CLK>;
label = "FLEXCOMM_2";
status = "disabled";
};
@ -109,6 +120,7 @@
compatible = "nxp,lpc-flexcomm";
reg = <0x40089000 0x1000>;
interrupts = <17 0>;
clocks = <&syscon MCUX_FLEXCOMM3_CLK>;
label = "FLEXCOMM_3";
status = "disabled";
};
@ -117,6 +129,7 @@
compatible = "nxp,lpc-flexcomm";
reg = <0x4008a000 0x1000>;
interrupts = <18 0>;
clocks = <&syscon MCUX_FLEXCOMM4_CLK>;
label = "FLEXCOMM_4";
status = "disabled";
};
@ -125,6 +138,7 @@
compatible = "nxp,lpc-flexcomm";
reg = <0x40096000 0x1000>;
interrupts = <19 0>;
clocks = <&syscon MCUX_FLEXCOMM5_CLK>;
label = "FLEXCOMM_5";
status = "disabled";
};
@ -133,6 +147,7 @@
compatible = "nxp,lpc-flexcomm";
reg = <0x40097000 0x1000>;
interrupts = <20 0>;
clocks = <&syscon MCUX_FLEXCOMM6_CLK>;
label = "FLEXCOMM_6";
status = "disabled";
};
@ -141,6 +156,7 @@
compatible = "nxp,lpc-flexcomm";
reg = <0x40098000 0x1000>;
interrupts = <21 0>;
clocks = <&syscon MCUX_FLEXCOMM7_CLK>;
label = "FLEXCOMM_7";
status = "disabled";
};

View File

@ -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>
@ -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";
@ -118,6 +126,7 @@
compatible = "nxp,lpc-flexcomm";
reg = <0x86000 0x1000>;
interrupts = <14 0>;
clocks = <&syscon MCUX_FLEXCOMM0_CLK>;
label = "FLEXCOMM_0";
status = "disabled";
};
@ -126,6 +135,7 @@
compatible = "nxp,lpc-flexcomm";
reg = <0x87000 0x1000>;
interrupts = <15 0>;
clocks = <&syscon MCUX_FLEXCOMM1_CLK>;
label = "FLEXCOMM_1";
status = "disabled";
};
@ -134,6 +144,7 @@
compatible = "nxp,lpc-flexcomm";
reg = <0x88000 0x1000>;
interrupts = <16 0>;
clocks = <&syscon MCUX_FLEXCOMM2_CLK>;
label = "FLEXCOMM_2";
status = "disabled";
};
@ -142,6 +153,7 @@
compatible = "nxp,lpc-flexcomm";
reg = <0x89000 0x1000>;
interrupts = <17 0>;
clocks = <&syscon MCUX_FLEXCOMM3_CLK>;
label = "FLEXCOMM_3";
status = "disabled";
};
@ -150,6 +162,7 @@
compatible = "nxp,lpc-flexcomm";
reg = <0x8a000 0x1000>;
interrupts = <18 0>;
clocks = <&syscon MCUX_FLEXCOMM4_CLK>;
label = "FLEXCOMM_4";
status = "disabled";
};
@ -158,6 +171,7 @@
compatible = "nxp,lpc-flexcomm";
reg = <0x96000 0x1000>;
interrupts = <19 0>;
clocks = <&syscon MCUX_FLEXCOMM5_CLK>;
label = "FLEXCOMM_5";
status = "disabled";
};
@ -166,6 +180,7 @@
compatible = "nxp,lpc-flexcomm";
reg = <0x97000 0x1000>;
interrupts = <20 0>;
clocks = <&syscon MCUX_FLEXCOMM6_CLK>;
label = "FLEXCOMM_6";
status = "disabled";
};
@ -174,6 +189,7 @@
compatible = "nxp,lpc-flexcomm";
reg = <0x98000 0x1000>;
interrupts = <21 0>;
clocks = <&syscon MCUX_FLEXCOMM7_CLK>;
label = "FLEXCOMM_7";
status = "disabled";
};
@ -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>;

View File

@ -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>
@ -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";
@ -131,6 +139,7 @@
compatible = "nxp,lpc-flexcomm";
reg = <0x86000 0x1000>;
interrupts = <14 0>;
clocks = <&syscon MCUX_FLEXCOMM0_CLK>;
label = "FLEXCOMM_0";
status = "disabled";
};
@ -139,6 +148,7 @@
compatible = "nxp,lpc-flexcomm";
reg = <0x87000 0x1000>;
interrupts = <15 0>;
clocks = <&syscon MCUX_FLEXCOMM1_CLK>;
label = "FLEXCOMM_1";
status = "disabled";
};
@ -147,6 +157,7 @@
compatible = "nxp,lpc-flexcomm";
reg = <0x88000 0x1000>;
interrupts = <16 0>;
clocks = <&syscon MCUX_FLEXCOMM2_CLK>;
label = "FLEXCOMM_2";
status = "disabled";
};
@ -155,6 +166,7 @@
compatible = "nxp,lpc-flexcomm";
reg = <0x89000 0x1000>;
interrupts = <17 0>;
clocks = <&syscon MCUX_FLEXCOMM3_CLK>;
label = "FLEXCOMM_3";
status = "disabled";
};
@ -163,6 +175,7 @@
compatible = "nxp,lpc-flexcomm";
reg = <0x8a000 0x1000>;
interrupts = <18 0>;
clocks = <&syscon MCUX_FLEXCOMM4_CLK>;
label = "FLEXCOMM_4";
status = "disabled";
};
@ -171,6 +184,7 @@
compatible = "nxp,lpc-flexcomm";
reg = <0x96000 0x1000>;
interrupts = <19 0>;
clocks = <&syscon MCUX_FLEXCOMM5_CLK>;
label = "FLEXCOMM_5";
status = "disabled";
};
@ -179,6 +193,7 @@
compatible = "nxp,lpc-flexcomm";
reg = <0x97000 0x1000>;
interrupts = <20 0>;
clocks = <&syscon MCUX_FLEXCOMM6_CLK>;
label = "FLEXCOMM_6";
status = "disabled";
};
@ -187,6 +202,7 @@
compatible = "nxp,lpc-flexcomm";
reg = <0x98000 0x1000>;
interrupts = <21 0>;
clocks = <&syscon MCUX_FLEXCOMM7_CLK>;
label = "FLEXCOMM_7";
status = "disabled";
};
@ -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>;

View File

@ -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>
@ -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>;
@ -79,6 +94,7 @@
compatible = "nxp,lpc-flexcomm";
reg = <0x106000 0x1000>;
interrupts = <14 0>;
clocks = <&clkctl1 MCUX_FLEXCOMM0_CLK>;
label = "FLEXCOMM_0";
status = "disabled";
};
@ -87,6 +103,7 @@
compatible = "nxp,lpc-flexcomm";
reg = <0x107000 0x1000>;
interrupts = <15 0>;
clocks = <&clkctl1 MCUX_FLEXCOMM1_CLK>;
label = "FLEXCOMM_1";
status = "disabled";
};
@ -95,6 +112,7 @@
compatible = "nxp,lpc-flexcomm";
reg = <0x108000 0x1000>;
interrupts = <16 0>;
clocks = <&clkctl1 MCUX_FLEXCOMM2_CLK>;
label = "FLEXCOMM_2";
status = "disabled";
};
@ -103,6 +121,7 @@
compatible = "nxp,lpc-flexcomm";
reg = <0x109000 0x1000>;
interrupts = <17 0>;
clocks = <&clkctl1 MCUX_FLEXCOMM3_CLK>;
label = "FLEXCOMM_3";
status = "disabled";
};
@ -111,6 +130,7 @@
compatible = "nxp,lpc-flexcomm";
reg = <0x122000 0x1000>;
interrupts = <18 0>;
clocks = <&clkctl1 MCUX_FLEXCOMM4_CLK>;
label = "FLEXCOMM_4";
status = "disabled";
};
@ -119,6 +139,7 @@
compatible = "nxp,lpc-flexcomm";
reg = <0x123000 0x1000>;
interrupts = <19 0>;
clocks = <&clkctl1 MCUX_FLEXCOMM5_CLK>;
label = "FLEXCOMM_5";
status = "disabled";
};
@ -128,6 +149,7 @@
reg = <0x124000 0x1000>;
interrupts = <43 0>;
label = "FLEXCOMM_6";
clocks = <&clkctl1 MCUX_FLEXCOMM6_CLK>;
status = "disabled";
};
@ -136,6 +158,7 @@
reg = <0x125000 0x1000>;
interrupts = <44 0>;
label = "FLEXCOMM_7";
clocks = <&clkctl1 MCUX_FLEXCOMM7_CLK>;
status = "disabled";
};
@ -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>;

View File

@ -0,0 +1,21 @@
# Copyright (c) 2020, NXP
# SPDX-License-Identifier: Apache-2.0
description: LPC SYSCON & CLKCTL IP node
compatible: "nxp,lpc-syscon"
include: [clock-controller.yaml, base.yaml]
properties:
reg:
required: true
label:
required: true
"#clock-cells":
const: 1
clock-cells:
- name