hc
2024-03-22 a0752693d998599af469473b8dc239ef973a012f
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
// SPDX-License-Identifier: GPL-2.0+
/*
 * Copyright (C) 2018 Marvell International Ltd.
 */
 
#define GPIO_ACTIVE_HIGH 0
#define GPIO_ACTIVE_LOW  1
 
#include "cn9130.dtsi" /* include SoC device tree */
 
/ {
        model = "DB-CN-9130";
        compatible = "marvell,cn9130", "marvell,armada-ap807-quad",
                     "marvell,armada-ap807";
 
        cp0_reg_usb3_vbus0: cp0_usb3_vbus@0 {
                compatible = "regulator-fixed";
                regulator-name = "cp0-xhci0-vbus";
                regulator-min-microvolt = <5000000>;
                regulator-max-microvolt = <5000000>;
                enable-active-high;
                gpio = <&expander0 0 GPIO_ACTIVE_HIGH>;
        };
 
        cp0_usb3_0_phy0: cp0_usb3_phy0 {
                compatible = "usb-nop-xceiv";
                vcc-supply = <&cp0_reg_usb3_vbus0>;
        };
 
        cp0_reg_usb3_vbus1: cp0_usb3_vbus@1 {
                compatible = "regulator-fixed";
                regulator-name = "cp0-xhci1-vbus";
                regulator-min-microvolt = <5000000>;
                regulator-max-microvolt = <5000000>;
                enable-active-high;
                gpio = <&expander0 1 GPIO_ACTIVE_HIGH>;
        };
 
        cp0_usb3_0_phy1: cp0_usb3_phy1 {
                compatible = "usb-nop-xceiv";
                vcc-supply = <&cp0_reg_usb3_vbus1>;
        };
 
        cp0_reg_sd_vccq: cp0_sd_vccq@0 {
                compatible = "regulator-gpio";
                regulator-name = "cp0_sd_vccq";
                regulator-min-microvolt = <1800000>;
                regulator-max-microvolt = <3300000>;
                gpios = <&expander0 15 GPIO_ACTIVE_HIGH>;
                states = <1800000 0x1
                          3300000 0x0>;
        };
 
        ap0_reg_sd_vccq: ap0_sd_vccq@0 {
                compatible = "regulator-gpio";
                regulator-name = "ap0_sd_vccq";
                regulator-min-microvolt = <1800000>;
                regulator-max-microvolt = <3300000>;
                gpios = <&expander0 8 GPIO_ACTIVE_HIGH>;
                states = <1800000 0x1
                          3300000 0x0>;
        };
 
        cp0_reg_sd_vcc: cp0_sd_vcc@0 {
                compatible = "regulator-fixed";
                regulator-name = "cp0_sd_vcc";
                regulator-min-microvolt = <3300000>;
                regulator-max-microvolt = <3300000>;
                gpio = <&expander0 14 GPIO_ACTIVE_HIGH>;
                enable-active-high;
                regulator-always-on;
        };
 
        cp0_sfp_eth0: sfp-eth0 {
                compatible = "sff,sfp";
                i2c-bus = <&cp0_sfpp0_i2c>;
                los-gpio = <&cp0_moudle_expander1 11 GPIO_ACTIVE_HIGH>;
                mod-def0-gpio = <&cp0_moudle_expander1 10 GPIO_ACTIVE_LOW>;
                tx-disable-gpio = <&cp0_moudle_expander1 9 GPIO_ACTIVE_HIGH>;
                tx-fault-gpio = <&cp0_moudle_expander1 8 GPIO_ACTIVE_HIGH>;
                status = "disabled";
        };
};
 
/*
 * CP0
 */
&cp0_i2c0 {
        clock-frequency = <100000>;
 
        /* U36 */
        expander0: pca953x@21 {
                compatible = "nxp,pca9555";
                pinctrl-names = "default";
                gpio-controller;
                #gpio-cells = <2>;
                reg = <0x21>;
                status = "okay";
        };
 
        /* U42 */
        eeprom0: eeprom@50 {
                compatible = "atmel,24c64";
                reg = <0x50>;
                pagesize = <0x20>;
        };
 
        /* U38 */
        eeprom1: eeprom@57 {
                compatible = "atmel,24c64";
                reg = <0x57>;
                pagesize = <0x20>;
        };
};
 
&cp0_i2c1 {
        clock-frequency = <100000>;
 
        /* SLM-1521-V2 - U3 */
        i2c-mux@72 { /* verify address - depends on dpr */
                compatible = "nxp,pca9544";
                #address-cells = <1>;
                #size-cells = <0>;
                reg = <0x72>;
                cp0_sfpp0_i2c: i2c@0 {
                        #address-cells = <1>;
                        #size-cells = <0>;
                        reg = <0>;
                };
 
                i2c@1 {
                        #address-cells = <1>;
                        #size-cells = <0>;
                        reg = <1>;
                        /* U12 */
                        cp0_moudle_expander1: pca9555@21 {
                                compatible = "nxp,pca9555";
                                pinctrl-names = "default";
                                gpio-controller;
                                #gpio-cells = <2>;
                                reg = <0x21>;
                        };
 
                };
        };
};
 
 
&cp0_sdhci0 {
        pinctrl-names = "default";
        pinctrl-0 = <&cp0_sdhci_pins>;
        bus-width = <4>;
        no-1-8-v;
        vqmmc-supply = <&cp0_reg_sd_vccq>;
        vmmc-supply = <&cp0_reg_sd_vcc>;
};
 
&cp0_usb3_0 {
        status = "okay";
        usb-phy = <&cp0_usb3_0_phy0>;
        phy-names = "usb";
};
 
&cp0_usb3_1 {
        status = "okay";
        usb-phy = <&cp0_usb3_0_phy1>;
        phy-names = "usb";
};