Commit graph

37 commits

Author SHA1 Message Date
Kumar Gala 7a15afc1d4 drivers: flash: replace DT_FLASH_DEV_NAME with DT macro
Replace DT_FLASH_DEV_NAME with DT_CHOSEN_ZEPHYR_FLASH_CONTROLLER_LABEL.
We now set zephyr,flash-controller in the chosen node of the device
tree to the flash controller device.

NOTE: For a SoCs with on die flash, this points to the controller and
      not the 'soc-nv-flash' node.  Typically the controller is the
      parent of the 'soc-nv-flash' node).

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-27 18:43:20 -05:00
Kumar Gala 22e65cb9ba gpio: mcux: Convert convert to DT_INST defines
Convert driver to use DT_INST_ defines.  As part of this conversion we
remove the Kconfig options for per GPIO controller enables and instead
get that information from device tree.  This means we now disable each
GPIO controller by default in the DTS and have each board dts enable the
GPIO controller ports it needs.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-23 17:07:41 -05:00
Kumar Gala 35f0cfc4cb dts: arm: nxp: kw4x: rename nodelabels to match SoC docs
Have nodelabels match the SoC docs so when a nodelabel reference is
made in the code its easier to relate to the SoC.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-17 09:49:03 -05:00
Kumar Gala 43a7d26603 drivers: entropy: replace CONFIG_ENTROPY_NAME with DT macro
Replace CONFIG_ENTROPY_NAME with DT_CHOSEN_ZEPHYR_ENTROPY_LABEL.  We now
set zephyr,entropy in the chosen node of the device tree to the entropy
device.

This allows us to remove CONFIG_ENTROPY_NAME from dts_fixup.h.  Also
remove any other stale ENTROPY related defines in dts_fixup.h files.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-13 09:14:21 -05:00
Kumar Gala 3f2bee6013 dts: nxp: kinetis: Update nxp,kinetis-gpio binding for port connection
Add a property to the nxp,kinetis-gpio binding that related the GPIO
node to the pinmux PORT node.

For the kl25z we add the pinmux nodes as well since they didn't exist.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-03-16 14:54:23 -05:00
Maureen Helm 519661748e dts: boards: Define dts aliases at soc level for kinetis socs
Defines device tree aliases for on-chip peripherals at the soc level
instead of the board level for all kinetis socs. The eliminates some
duplicate code in the board level device trees, and will allow drivers
to use device-tree generated macros directly instead of through dts
fixups.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2020-01-13 08:30:53 -06:00
Kumar Gala 051630607b dts: nxp: remove unused pinmux
We've never used the pinctrl from dts so remove it as we hopefully
replace it with something useful.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-11-06 17:32:50 -08:00
Kumar Gala e8524965c5 dts: Add io-channel details to ADC nodes/bindings
Update the ADC bindings to include #io-channel-cells and update the
related dts files to set #io-channel-cells.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-09-07 10:25:02 -05:00
Kumar Gala 226b3381f9 dts: nxp: cleanup remove system-clock-frequency
Remove unused "system-clock-frequency" property, we don't have this
defined in various bindings and thus aren't using it.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-08-09 14:56:20 -05:00
Kumar Gala b52b1b2222 dts: arm: Remove device_type = "memory" from SRAM nodes
The true mmio-sram nodes should not have had a 'device_type' property.
Remove it from the cases that we clearly know are SRAM.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-08-06 08:59:22 -04:00
Ulf Magnusson 583226a833 dts: nxp: Remove unused 'clock-source' properties
These are not declared in any binding and do not generate any output.

Trying to get rid of properties that appear on device tree nodes but
aren't declared in bindings.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-08-01 11:11:43 +02:00
Kumar Gala bb324616bd dts: remove unused clock-controller property
The 'clock-controller' property isn't specified and not used for any
generation.  Lets remove it.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-06-28 07:23:31 -05:00
Ulf Magnusson a84ded74ea dts: Replace status = "ok" with status = "okay"
The DT spec. only has "okay" and not "ok". The Linux kernel has around
12k "okay"s and 300 "ok"s.

The scripts/dts scripts only check for "disabled", so should be safe re.
those at least.

The replacement was done with

    git ls-files | xargs sed -i 's/status\s*=\s*"ok"/status = "okay"/'

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-06-14 19:51:13 -05:00
Anas Nashif 3ae52624ff license: cleanup: add SPDX Apache-2.0 license identifier
Update the files which contain no license information with the
'Apache-2.0' SPDX license identifier.  Many source files in the tree are
missing licensing information, which makes it harder for compliance
tools to determine the correct license.

By default all files without license information are under the default
license of Zephyr, which is Apache version 2.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-04-07 08:45:22 -04:00
Maureen Helm 417d349727 dts: nxp: Disable kw40/41 gpiob interrupts
Ports B and C share a common interrupt vector on kw40 and kw41z socs,
but we don't currently have a way to express this in device tree. A
check was added in commit 77cb942a97 that
correctly causes build errors on kw40/41 boards when both ports are
enabled.

Disable the port b interrupt for now until we have a better way to
handle this.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2019-04-03 08:32:56 -04:00
Kumar Gala 4bdd9822ba dts: arm: nxp: Cleanup SPI node on K6X, KW4{0,1}Z
The SPI0 node had a property called 'cs' which wasn't used or defined as
part of the binding yaml.  So let's remove it.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-01-24 07:28:38 -06:00
Kumar Gala bfc4281cc0 arm: kinetis: Add basic DTS support for TRNG
Add dts binding and info for TRNG device and enable basic support to
get the device name from DTS.  We leave for now the base addresses
coming from the MCUX HAL.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-11-06 08:49:50 -06:00
Maureen Helm 22fc6008ea dts/nxp: Fix dtc v1.4.6 warning: Missing property '#clock-cells' in node
Replaces #clocks-cells with #clock-cell property in kinetis and i.mx rt
socs.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2018-05-23 15:16:44 -05:00
Maureen Helm d2d4cea02d dts: nxp_kinetis: Add spi bindings for kinetis dspi and update soc nodes
Adds dts spi bindings for the kinetis dspi controller, and updates the
k64, kw2xd, kw40z, kw41z dts nodes accordingly.

Updates the dts interrupt priorities to match the board defconfigs
(e.g., boards/arm/frdm_k64f/Kconfig.defconfig)

For k64, fixes an error in the spi1 interrupt number and adds a third
instance (spi2).

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2018-05-10 15:43:42 -05:00
Maureen Helm 22955b83fd dts: Add gpio labels to all kinetis socs
Adds gpio labels to all kinetis socs in preparation for refactoring the
mcux gpio driver to dts. The kl25z was missing gpio nodes altogether, so
they are added.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2018-04-20 08:54:11 -05:00
Kumar Gala 0c45b84ce1 dts: nxp: Add add addr/size cell to spi nodes
The spi nodes should have #address-cells and #size-cells properties much
like i2c does.  Add these missing properties.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-02-21 11:14:59 -06:00
Maureen Helm f633c0f997 dts: bindings: Introduce flash erase-block-size property
Adds a new optional dts property to define the erase block size of a
flash device. This will be used by the mcux flash driver to implement
the flash page layout function.

The value is set for all kinetis devices to match
FSL_FEATURE_FLASH_PFLASH_BLOCK_SECTOR_SIZE.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2018-01-31 16:43:40 -06:00
Kumar Gala b8173d960e drivers: flash: NXP KL2X/KW4xZ: Add device tree support
Add device tree support for the "nxp,kinetis-ftfa" flash controller used
on the NXP KL2X and KW4xZ SoCs.

Fixes: #5788

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-01-29 16:34:49 -06:00
Kumar Gala 68d826ce93 dts: flash: arm: nxp: Add write-block-size properties
On the various NXP Kinetis SoCs add the write-block-size property and
set it to match FSL_FEATURE_FLASH_PFLASH_BLOCK_WRITE_UNIT_SIZE for the
given SoC.

Fixes: #5788

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-01-29 16:34:49 -06:00
Kumar Gala 37d72bf0d6 dts: Update soc-nv-flash nodes
Where missing add compatible = "soc-nv-flash".  Also added a label for
all the soc-nv-flash that we might use in the future.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-01-23 12:16:53 -06:00
Maureen Helm 3291735d11 dts: Add Kinetis SIM clock bindings
Adds device tree bindings for the Kinetis System Integration Module
(SIM), and defines peripheral source clocks (e.g., system clock or bus
clock) and clock gates for all Kinetis SoCs.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2017-10-20 12:28:11 -05:00
Kumar Gala 54933b3833 i2c: mcux: Remove usage of CONFIG_I2C_x_DEFAULT_CFG
Stop using CONFIG_I2C_x_DEFAULT_CFG to get the initial value.  Since we
only support master mode we always default to it for initial config and
we get the bitrate from the device tree.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-08-16 10:03:34 -05:00
Yannis Damigos 1a652e3ef1 dts: Remove memory node from skeleton dtsi file
Remove memory node from skeleton dtsi and add device_type
property in every memory node in soc dtsi files

Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2017-07-21 12:20:49 -05:00
Yannis Damigos 399a6bec0f dts: arm: Add unit-address component to memory and flash nodes
This patch add the unit-address component to memory and flash
nodes. According to the DT specification, the unit-address of
a node must match the first address specified in the reg
property of the node.

Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2017-07-21 12:20:49 -05:00
Kumar Gala 563f8f1464 i2c: mcux: Convert to supporting device tree
Update the MCUX I2C driver and related platforms to get their I2C
information from the device tree.  We also updated a few of the sensor
drivers found on the FRDM & Hexiwear boards to get their I2C bus name
from the device tree instead of directly from Kconfig.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-07-19 14:28:08 -05:00
Yannis Damigos 941ffb017b dts: Add cpus and cpu nodes missing properties
This patch adds #address-cell, #size-cell properties to
cpus container node and device_type, reg properties to
cpu node.

Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2017-07-19 14:28:08 -05:00
Maureen Helm 7bf0df3aec dts: Generate Kinetis adc settings from device tree
Adds common and Kinetis-specific adc device tree properties, and updates
all Kinetis SoC and board dts files to include adc nodes.

Jira: ZEP-1396

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2017-07-19 14:28:08 -05:00
Maureen Helm 28c2c627e5 dts: Rename k64f-gpio to kinetis-gpio
Multiple Kinetis SoCs have the same gpio hardware as the k64 and can use
the same mcux driver, so rename the dts to be more generic.

Also fixes some stranded references to kw41z-gpio to the new
kinetis-gpio.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2017-06-23 15:05:10 -05:00
Maureen Helm 0dd852bc3c dts: Rename k64f-pinmux to kinetis-pinmux
Multiple Kinetis SoCs have the same pinmux hardware as the k64 and can
use the same mcux driver, so rename the dts to be more generic.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2017-06-23 15:05:10 -05:00
Maureen Helm 8f07f1ab61 dts: Rename kw41z-lpuart to kinetis-lpuart
Multiple Kinetis SoCs have the same lpuart hardware as the kw41z and can
use the same mcux driver, so rename the dts to be more generic.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2017-06-23 15:05:10 -05:00
Kumar Gala a746bcd56d arm: nxp_kinetis: dts: use label to generate NXP Kinetis uart name
Now that we can utilize label in the device tree we can convert to
getting the device name for the NXP Kinetis UART out of the device tree
instead of from Kconfig.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-05-19 10:06:48 -04:00
Maureen Helm f487b208dd kw40z: Add kw40z SoC
Adds initial support for the kw40z SoC. This SoC has all the same
peripherals as the kw41z but with less flash and ram, so the defconfig
and dts are nearly the same.

Jira: ZEP-1388
Change-Id: Ib804451e8c2c71c4ff7d342bf23f6567d1542a2d
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2017-04-14 05:56:53 -05:00