@@ -55,137 +55,159 @@ properties:
5555 Identifying i2c pins pull up/down type which is RSEL. It can support
5656 RSEL define or si unit value(ohm) to set different resistance.
5757
58- # PIN CONFIGURATION NODES
58+ # PIN CONFIGURATION NODES
5959patternProperties :
6060 ' -pins$ ' :
6161 type : object
62- description : |
63- A pinctrl node should contain at least one subnodes representing the
64- pinctrl groups available on the machine. Each subnode will list the
65- pins it needs, and how they should be configured, with regard to muxer
66- configuration, pullups, drive strength, input enable/disable and
67- input schmitt.
68- An example of using macro:
69- pincontroller {
70- /* GPIO0 set as multifunction GPIO0 */
71- gpio_pin {
72- pinmux = <PINMUX_GPIO0__FUNC_GPIO0>;
73- };
74- /* GPIO8 set as multifunction SDA0 */
75- i2c0_pin {
76- pinmux = <PINMUX_GPIO8__FUNC_SDA0>;
77- };
78- };
79- $ref : " pinmux-node.yaml"
80-
81- properties :
82- pinmux :
83- description : |
84- Integer array, represents gpio pin number and mux setting.
85- Supported pin number and mux varies for different SoCs, and are defined
86- as macros in dt-bindings/pinctrl/<soc>-pinfunc.h directly.
87-
88- drive-strength :
89- enum : [2, 4, 6, 8, 10, 12, 14, 16]
90-
91- bias-pull-down :
92- description : |
93- For pull down type is normal, it don't need add RSEL & R1R0 define
94- and resistance value.
95- For pull down type is PUPD/R0/R1 type, it can add R1R0 define to
96- set different resistance. It can support "MTK_PUPD_SET_R1R0_00" &
97- "MTK_PUPD_SET_R1R0_01" & "MTK_PUPD_SET_R1R0_10" & "MTK_PUPD_SET_R1R0_11"
98- define in mt8195.
99- For pull down type is RSEL, it can add RSEL define & resistance value(ohm)
100- to set different resistance by identifying property "mediatek,rsel_resistance_in_si_unit".
101- It can support "MTK_PULL_SET_RSEL_000" & "MTK_PULL_SET_RSEL_001"
102- & "MTK_PULL_SET_RSEL_010" & "MTK_PULL_SET_RSEL_011" & "MTK_PULL_SET_RSEL_100"
103- & "MTK_PULL_SET_RSEL_101" & "MTK_PULL_SET_RSEL_110" & "MTK_PULL_SET_RSEL_111"
104- define in mt8195. It can also support resistance value(ohm) "75000" & "5000" in mt8195.
105- oneOf:
106- - enum: [100, 101, 102, 103]
107- - description: mt8195 pull down PUPD/R0/R1 type define value.
108- - enum: [200, 201, 202, 203, 204, 205, 206, 207]
109- - description: mt8195 pull down RSEL type define value.
110- - enum: [75000, 5000]
111- - description: mt8195 pull down RSEL type si unit value(ohm).
112-
113- An example of using RSEL define:
114- pincontroller {
115- i2c0_pin {
116- pinmux = <PINMUX_GPIO8__FUNC_SDA0>;
117- bias-pull-down = <MTK_PULL_SET_RSEL_001>;
118- };
119- };
120- An example of using si unit resistance value(ohm):
121- &pio {
122- mediatek,rsel_resistance_in_si_unit;
123- }
124- pincontroller {
125- i2c0_pin {
126- pinmux = <PINMUX_GPIO8__FUNC_SDA0>;
127- bias-pull-down = <75000>;
128- };
129- };
130-
131- bias-pull-up :
62+ additionalProperties : false
63+ patternProperties :
64+ ' ^pins ' :
65+ type : object
66+ additionalProperties : false
13267 description : |
133- For pull up type is normal, it don't need add RSEL & R1R0 define
134- and resistance value.
135- For pull up type is PUPD/R0/R1 type, it can add R1R0 define to
136- set different resistance. It can support "MTK_PUPD_SET_R1R0_00" &
137- "MTK_PUPD_SET_R1R0_01" & "MTK_PUPD_SET_R1R0_10" & "MTK_PUPD_SET_R1R0_11"
138- define in mt8195.
139- For pull up type is RSEL, it can add RSEL define & resistance value(ohm)
140- to set different resistance by identifying property "mediatek,rsel_resistance_in_si_unit".
141- It can support "MTK_PULL_SET_RSEL_000" & "MTK_PULL_SET_RSEL_001"
142- & "MTK_PULL_SET_RSEL_010" & "MTK_PULL_SET_RSEL_011" & "MTK_PULL_SET_RSEL_100"
143- & "MTK_PULL_SET_RSEL_101" & "MTK_PULL_SET_RSEL_110" & "MTK_PULL_SET_RSEL_111"
144- define in mt8195. It can also support resistance value(ohm)
145- "1000" & "1500" & "2000" & "3000" & "4000" & "5000" & "10000" & "75000" in mt8195.
146- oneOf:
147- - enum: [100, 101, 102, 103]
148- - description: mt8195 pull up PUPD/R0/R1 type define value.
149- - enum: [200, 201, 202, 203, 204, 205, 206, 207]
150- - description: mt8195 pull up RSEL type define value.
151- - enum: [1000, 1500, 2000, 3000, 4000, 5000, 10000, 75000]
152- - description: mt8195 pull up RSEL type si unit value(ohm).
153- An example of using RSEL define:
68+ A pinctrl node should contain at least one subnodes representing the
69+ pinctrl groups available on the machine. Each subnode will list the
70+ pins it needs, and how they should be configured, with regard to muxer
71+ configuration, pullups, drive strength, input enable/disable and
72+ input schmitt.
73+ An example of using macro:
15474 pincontroller {
155- i2c0_pin {
156- pinmux = <PINMUX_GPIO8__FUNC_SDA0>;
157- bias-pull-up = <MTK_PULL_SET_RSEL_001>;
75+ /* GPIO0 set as multifunction GPIO0 */
76+ gpio-pins {
77+ pins {
78+ pinmux = <PINMUX_GPIO0__FUNC_GPIO0>;
79+ }
15880 };
159- };
160- An example of using si unit resistance value(ohm):
161- &pio {
162- mediatek,rsel_resistance_in_si_unit;
163- }
164- pincontroller {
165- i2c0_pin {
166- pinmux = <PINMUX_GPIO8__FUNC_SDA0>;
167- bias-pull-up = <1000>;
81+ /* GPIO8 set as multifunction SDA0 */
82+ i2c0-pins {
83+ pins {
84+ pinmux = <PINMUX_GPIO8__FUNC_SDA0>;
85+ }
16886 };
16987 };
170-
171- bias-disable : true
172-
173- output-high : true
174-
175- output-low : true
176-
177- input-enable : true
178-
179- input-disable : true
180-
181- input-schmitt-enable : true
182-
183- input-schmitt-disable : true
184-
185- required :
186- - pinmux
187-
188- additionalProperties : false
88+ $ref : " pinmux-node.yaml"
89+
90+ properties :
91+ pinmux :
92+ description : |
93+ Integer array, represents gpio pin number and mux setting.
94+ Supported pin number and mux varies for different SoCs, and are
95+ defined as macros in dt-bindings/pinctrl/<soc>-pinfunc.h
96+ directly.
97+
98+ drive-strength :
99+ enum : [2, 4, 6, 8, 10, 12, 14, 16]
100+
101+ bias-pull-down :
102+ description : |
103+ For pull down type is normal, it don't need add RSEL & R1R0 define
104+ and resistance value.
105+ For pull down type is PUPD/R0/R1 type, it can add R1R0 define to
106+ set different resistance. It can support "MTK_PUPD_SET_R1R0_00" &
107+ "MTK_PUPD_SET_R1R0_01" & "MTK_PUPD_SET_R1R0_10" &
108+ "MTK_PUPD_SET_R1R0_11" define in mt8195.
109+ For pull down type is RSEL, it can add RSEL define & resistance
110+ value(ohm) to set different resistance by identifying property
111+ "mediatek,rsel_resistance_in_si_unit".
112+ It can support "MTK_PULL_SET_RSEL_000" & "MTK_PULL_SET_RSEL_001"
113+ & "MTK_PULL_SET_RSEL_010" & "MTK_PULL_SET_RSEL_011"
114+ & "MTK_PULL_SET_RSEL_100" & "MTK_PULL_SET_RSEL_101"
115+ & "MTK_PULL_SET_RSEL_110" & "MTK_PULL_SET_RSEL_111"
116+ define in mt8195. It can also support resistance value(ohm)
117+ "75000" & "5000" in mt8195.
118+ oneOf:
119+ - enum: [100, 101, 102, 103]
120+ - description: mt8195 pull down PUPD/R0/R1 type define value.
121+ - enum: [200, 201, 202, 203, 204, 205, 206, 207]
122+ - description: mt8195 pull down RSEL type define value.
123+ - enum: [75000, 5000]
124+ - description: mt8195 pull down RSEL type si unit value(ohm).
125+
126+ An example of using RSEL define:
127+ pincontroller {
128+ i2c0_pin {
129+ pins {
130+ pinmux = <PINMUX_GPIO8__FUNC_SDA0>;
131+ bias-pull-down = <MTK_PULL_SET_RSEL_001>;
132+ }
133+ };
134+ };
135+ An example of using si unit resistance value(ohm):
136+ &pio {
137+ mediatek,rsel_resistance_in_si_unit;
138+ }
139+ pincontroller {
140+ i2c0_pin {
141+ pins {
142+ pinmux = <PINMUX_GPIO8__FUNC_SDA0>;
143+ bias-pull-down = <75000>;
144+ }
145+ };
146+ };
147+
148+ bias-pull-up :
149+ description : |
150+ For pull up type is normal, it don't need add RSEL & R1R0 define
151+ and resistance value.
152+ For pull up type is PUPD/R0/R1 type, it can add R1R0 define to
153+ set different resistance. It can support "MTK_PUPD_SET_R1R0_00" &
154+ "MTK_PUPD_SET_R1R0_01" & "MTK_PUPD_SET_R1R0_10" &
155+ "MTK_PUPD_SET_R1R0_11" define in mt8195.
156+ For pull up type is RSEL, it can add RSEL define & resistance
157+ value(ohm) to set different resistance by identifying property
158+ "mediatek,rsel_resistance_in_si_unit".
159+ It can support "MTK_PULL_SET_RSEL_000" & "MTK_PULL_SET_RSEL_001"
160+ & "MTK_PULL_SET_RSEL_010" & "MTK_PULL_SET_RSEL_011"
161+ & "MTK_PULL_SET_RSEL_100" & "MTK_PULL_SET_RSEL_101"
162+ & "MTK_PULL_SET_RSEL_110" & "MTK_PULL_SET_RSEL_111"
163+ define in mt8195. It can also support resistance value(ohm)
164+ "1000" & "1500" & "2000" & "3000" & "4000" & "5000" & "10000" &
165+ "75000" in mt8195.
166+ oneOf:
167+ - enum: [100, 101, 102, 103]
168+ - description: mt8195 pull up PUPD/R0/R1 type define value.
169+ - enum: [200, 201, 202, 203, 204, 205, 206, 207]
170+ - description: mt8195 pull up RSEL type define value.
171+ - enum: [1000, 1500, 2000, 3000, 4000, 5000, 10000, 75000]
172+ - description: mt8195 pull up RSEL type si unit value(ohm).
173+ An example of using RSEL define:
174+ pincontroller {
175+ i2c0-pins {
176+ pins {
177+ pinmux = <PINMUX_GPIO8__FUNC_SDA0>;
178+ bias-pull-up = <MTK_PULL_SET_RSEL_001>;
179+ }
180+ };
181+ };
182+ An example of using si unit resistance value(ohm):
183+ &pio {
184+ mediatek,rsel_resistance_in_si_unit;
185+ }
186+ pincontroller {
187+ i2c0-pins {
188+ pins {
189+ pinmux = <PINMUX_GPIO8__FUNC_SDA0>;
190+ bias-pull-up = <1000>;
191+ }
192+ };
193+ };
194+
195+ bias-disable : true
196+
197+ output-high : true
198+
199+ output-low : true
200+
201+ input-enable : true
202+
203+ input-disable : true
204+
205+ input-schmitt-enable : true
206+
207+ input-schmitt-disable : true
208+
209+ required :
210+ - pinmux
189211
190212allOf :
191213 - $ref : " pinctrl.yaml#"
@@ -204,30 +226,46 @@ additionalProperties: false
204226
205227examples :
206228 - |
207- #include <dt-bindings/pinctrl/mt8195-pinfunc.h>
208- #include <dt-bindings/interrupt-controller/arm-gic.h>
209- pio: pinctrl@10005000 {
210- compatible = "mediatek,mt8195-pinctrl";
211- reg = <0x10005000 0x1000>,
212- <0x11d10000 0x1000>,
213- <0x11d30000 0x1000>,
214- <0x11d40000 0x1000>,
215- <0x11e20000 0x1000>,
216- <0x11eb0000 0x1000>,
217- <0x11f40000 0x1000>,
218- <0x1000b000 0x1000>;
219- reg-names = "iocfg0", "iocfg_bm", "iocfg_bl",
220- "iocfg_br", "iocfg_lm", "iocfg_rb",
221- "iocfg_tl", "eint";
222- gpio-controller;
223- #gpio-cells = <2>;
224- gpio-ranges = <&pio 0 0 144>;
225- interrupt-controller;
226- interrupts = <GIC_SPI 225 IRQ_TYPE_LEVEL_HIGH 0>;
227- #interrupt-cells = <2>;
228-
229- pio-pins {
230- pinmux = <PINMUX_GPIO0__FUNC_GPIO0>;
231- output-low;
232- };
233- };
229+ #include <dt-bindings/pinctrl/mt8195-pinfunc.h>
230+ #include <dt-bindings/interrupt-controller/arm-gic.h>
231+ #
232+ pio: pinctrl@10005000 {
233+ compatible = "mediatek,mt8195-pinctrl";
234+ reg = <0x10005000 0x1000>,
235+ <0x11d10000 0x1000>,
236+ <0x11d30000 0x1000>,
237+ <0x11d40000 0x1000>,
238+ <0x11e20000 0x1000>,
239+ <0x11eb0000 0x1000>,
240+ <0x11f40000 0x1000>,
241+ <0x1000b000 0x1000>;
242+ reg-names = "iocfg0", "iocfg_bm", "iocfg_bl",
243+ "iocfg_br", "iocfg_lm", "iocfg_rb",
244+ "iocfg_tl", "eint";
245+ gpio-controller;
246+ #gpio-cells = <2>;
247+ gpio-ranges = <&pio 0 0 144>;
248+ interrupt-controller;
249+ interrupts = <GIC_SPI 225 IRQ_TYPE_LEVEL_HIGH 0>;
250+ #interrupt-cells = <2>;
251+
252+ pio-pins {
253+ pins {
254+ pinmux = <PINMUX_GPIO0__FUNC_GPIO0>;
255+ output-low;
256+ };
257+ };
258+
259+ spi0-pins {
260+ pins-spi {
261+ pinmux = <PINMUX_GPIO132__FUNC_SPIM0_CSB>,
262+ <PINMUX_GPIO134__FUNC_SPIM0_MO>,
263+ <PINMUX_GPIO133__FUNC_SPIM0_CLK>;
264+ bias-disable;
265+ };
266+ pins-spi-mi {
267+ pinmux = <PINMUX_GPIO135__FUNC_SPIM0_MI>;
268+ bias-pull-down;
269+ };
270+ };
271+ };
0 commit comments