| /* |
| * Copyright (c) 2020 Nordic Semiconductor ASA |
| * |
| * SPDX-License-Identifier: Apache-2.0 |
| * |
| * Application overlay for testing the legacy devicetree macros can |
| * be migrated to the devicetree.h API. |
| * |
| * Names in this file should be chosen in a way that won't conflict |
| * with real-world devicetree nodes, to allow these tests to run on |
| * (and be extended to test) real hardware. |
| */ |
| #include <dt-bindings/gpio/gpio.h> |
| |
| /* |
| * The "start-after..." and "end-before..." comments are because |
| * this file is included in the migration HOWTO. |
| */ |
| |
| /* start-after-here */ |
| / { |
| aliases { |
| mgr-gpio = &migration_gpio; |
| mgr-serial = &migration_serial; |
| mgr-i2c-dev = &mgr_i2c_device; |
| mgr-spi-dev = &mgr_spi_device; |
| }; |
| |
| migration { |
| #address-cells = <0x1>; |
| #size-cells = <0x1>; |
| interrupt-parent = <&migration_intc>; |
| |
| migration_gpio: gpio@1000 { |
| compatible = "vnd,gpio"; |
| gpio-controller; |
| reg = <0x1000 0x2000>; |
| interrupts = <0 1>; |
| #gpio-cells = <0x2>; |
| label = "MGR_GPIO"; |
| }; |
| |
| migration_serial: serial@3000 { |
| compatible = "vnd,serial"; |
| reg = <0x3000 0x1000>; |
| interrupts = <2 1>; |
| label = "MGR_SERIAL"; |
| baud-rate = <115200>; |
| }; |
| |
| i2c@10000 { |
| #address-cells = <1>; |
| #size-cells = <0>; |
| compatible = "vnd,i2c"; |
| reg = < 0x10000 0x1000 >; |
| label = "MGR_I2C"; |
| clock-frequency = <100000>; |
| interrupts = <10 1>; |
| |
| mgr_i2c_device: i2c-dev@10 { |
| compatible = "vnd,i2c-device"; |
| label = "MGR_I2C_DEV"; |
| reg = <0x10>; |
| }; |
| }; |
| |
| spi@20000 { |
| #address-cells = < 1 >; |
| #size-cells = < 0 >; |
| compatible = "vnd,spi"; |
| reg = <0x20000 0x1000>; |
| interrupts = <20 1>; |
| label = "MGR_SPI"; |
| clock-frequency = <2000000>; |
| |
| cs-gpios = <&migration_gpio 17 GPIO_ACTIVE_LOW>; |
| |
| mgr_spi_device: spi-dev@0 { |
| compatible = "vnd,spi-device"; |
| label = "MGR_SPI_DEV"; |
| reg = <0>; |
| spi-max-frequency = <2000000>; |
| }; |
| }; |
| |
| migration_intc: interrupt-controller@30000 { |
| compatible = "vnd,intc"; |
| reg = <0x30000 0x1000>; |
| label = "MGR_INTC"; |
| interrupt-controller; |
| #interrupt-cells = <2>; |
| }; |
| }; |
| }; |
| /* end-before-here */ |