1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
/*
* The CDS9K currently lives on an SPI bus, and comprises different IP blocks
* in different applications. For this reason the top level driver does nothing
* more than expose a regmap on top of its parent bus.
* As children of this top-level cds9k driver, each copy of each IP block has
* an entry in the DT for it, and a separate driver is registered for each
*
* The sample DTS segment here exposes a CDS9K loaded with at least the
* following IP blocks:
*
* address | IP block | compatible
* --------+-------------+---------
* 0x4 | Fan control | david,cds9k-fan
* 0x6 | LED control | david,cds9k-led
* 0x8 | GPIO | david,cds9k-gpio
* 0xa | GPIO | david,cds9k-gpio
* 0xc | Reset | david,cds9k-reset
*/
&spi0 {
// ...
cds9k: cds9k@0 {
compatible = "david,cds9k";
status = "okay";
reg = <0>;
spi-max-frequency = <1000000>;
#address-cells = <1>;
#size-cells = <0>;
cds9k_fan0: cds9k-fan@4 {
compatible = "david,cds9k-fan";
status = "okay";
reg = <0x4>;
};
// ...
cds9k_led0: cds9k-led@6 {
compatible = "david,cds9k-led";
status = "okay";
reg = <0x6>;
color = <LED_COLOR_ID_WHITE>;
function = LED_FUNCTION_DEBUG;
};
// ...
cds9k_gpio0: cds9k-gpio@8 {
compatible = "david,cds9k-gpio";
status = "okay";
reg = <0x8>;
gpio-controller;
#gpio-cells = <2>;
};
cds9k_gpio1: cds9k-gpio@a {
compatible = "david,cds9k-gpio";
status = "okay";
reg = <0xa>;
gpio-controller;
#gpio-cells = <2>;
};
reset_thing: cds9k-reset@c {
compatible = "david,cds9k-reset";
status = "okay";
reg = <0xc>;
#reset-cells = <0>;
};
};
};
|