|
7 | 7 | # few instances were we can actually just match on a property.
|
8 | 8 | - name: gpio-controller
|
9 | 9 | rules:
|
10 |
| - - type: has_prop |
11 |
| - value: gpio-controller |
| 10 | + - !HasProp gpio-controller |
12 | 11 | actions:
|
13 |
| - - type: instance |
14 |
| - value: |
15 |
| - raw: |
16 |
| - type: myself |
| 12 | + - !Instance |
| 13 | + raw: !Myself |
17 | 14 | device: crate::device::gpio::Gpio
|
18 | 15 | static_type: crate::device::gpio::GpioStatic
|
19 | 16 |
|
|
22 | 19 | # with each gpio.
|
23 | 20 | - name: gpio-leds
|
24 | 21 | rules:
|
25 |
| - - type: compatible |
26 |
| - value: |
27 |
| - names: |
28 |
| - - gpio-leds |
| 22 | + - !Compatible |
| 23 | + names: [gpio-leds] |
29 | 24 | level: 1
|
30 | 25 | actions:
|
31 |
| - - type: instance |
32 |
| - value: |
33 |
| - raw: |
34 |
| - type: phandle |
35 |
| - value: gpios |
| 26 | + - !Instance |
| 27 | + raw: !Phandle gpios |
36 | 28 | device: crate::device::gpio::GpioPin
|
37 | 29 |
|
38 | 30 | # Hook up the gpio-keys as gpio pins as well
|
39 | 31 | - name: gpio-keys
|
40 | 32 | rules:
|
41 |
| - - type: compatible |
42 |
| - value: |
| 33 | + - !Compatible |
43 | 34 | names:
|
44 |
| - - gpio-keys |
| 35 | + - gpio-keys |
45 | 36 | level: 1
|
46 | 37 | actions:
|
47 |
| - - type: instance |
48 |
| - value: |
49 |
| - raw: |
50 |
| - type: phandle |
51 |
| - value: gpios |
| 38 | + - !Instance |
| 39 | + raw: !Phandle gpios |
52 | 40 | device: crate::device::gpio::GpioPin
|
53 | 41 |
|
54 | 42 | # Flash controllers don't have any particular property to identify them, so we need a list of
|
55 | 43 | # compatible values that should match.
|
56 | 44 | - name: flash-controller
|
57 | 45 | rules:
|
58 |
| - - type: compatible |
59 |
| - value: |
| 46 | + - !Compatible |
60 | 47 | names:
|
61 |
| - - "nordic,nrf52-flash-controller" |
62 |
| - - "nordic,nrf51-flash-controller" |
63 |
| - - "raspberrypi,pico-flash-controller" |
64 |
| - - "st,stm32g4-flash-controller" |
65 |
| - - "st,stm32l5-flash-controller" |
66 |
| - - "zephyr,sim-flash" |
| 48 | + - "nordic,nrf52-flash-controller" |
| 49 | + - "nordic,nrf51-flash-controller" |
| 50 | + - "raspberrypi,pico-flash-controller" |
| 51 | + - "st,stm32g4-flash-controller" |
| 52 | + - "st,stm32l5-flash-controller" |
| 53 | + - "zephyr,sim-flash" |
67 | 54 | level: 0
|
68 | 55 | actions:
|
69 |
| - - type: instance |
70 |
| - value: |
71 |
| - raw: |
72 |
| - type: myself |
| 56 | + - !Instance |
| 57 | + raw: !Myself |
73 | 58 | device: crate::device::flash::FlashController
|
74 | 59 |
|
75 | 60 | # Flash partitions exist as children of a node compatible with "soc-nv-flash" that itself is a child
|
76 | 61 | # of the controller itself.
|
77 | 62 | # TODO: Get the write and erase property from the DT if present.
|
78 | 63 | - name: flash-partition
|
79 | 64 | rules:
|
80 |
| - - type: compatible |
81 |
| - value: |
| 65 | + - !Compatible |
82 | 66 | names:
|
83 |
| - - "fixed-partitions" |
| 67 | + - "fixed-partitions" |
84 | 68 | level: 1
|
85 |
| - - type: compatible |
86 |
| - value: |
| 69 | + - !Compatible |
87 | 70 | names:
|
88 |
| - - "soc-nv-flash" |
| 71 | + - "soc-nv-flash" |
89 | 72 | level: 2
|
90 | 73 | actions:
|
91 |
| - - type: instance |
92 |
| - value: |
93 |
| - raw: |
94 |
| - type: parent |
95 |
| - value: |
96 |
| - level: 3 |
97 |
| - args: |
98 |
| - - type: reg |
| 74 | + - !Instance |
| 75 | + raw: !Parent |
| 76 | + level: 3 |
| 77 | + args: |
| 78 | + - !Reg |
99 | 79 | device: "crate::device::flash::FlashPartition"
|
100 | 80 |
|
101 | 81 | # I2C.
|
102 | 82 | - name: i2c
|
103 | 83 | rules:
|
104 |
| - - type: compatible |
105 |
| - value: |
106 |
| - names: |
107 |
| - - "snps,designware-i2c" |
108 |
| - level: 0 |
| 84 | + - !Compatible |
| 85 | + names: |
| 86 | + - "snps,designware-i2c" |
| 87 | + level: 0 |
109 | 88 | actions:
|
110 |
| - - type: instance |
111 |
| - value: |
112 |
| - raw: |
113 |
| - type: myself |
114 |
| - device: crate::device::i2c::I2C |
| 89 | + - !Instance |
| 90 | + raw: !Myself |
| 91 | + device: crate::device::i2c::I2C |
115 | 92 |
|
116 | 93 | # Generate a pseudo node that matches all of the labels across the tree with their nodes.
|
117 | 94 | - name: labels
|
118 |
| - rules: |
119 |
| - - type: root |
| 95 | + rules: !Root |
120 | 96 | actions:
|
121 |
| - - type: labels |
122 |
| - |
| 97 | + - !Labels |
0 commit comments