Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: dts: Add common mcpdm dts file for omap4

The mcpdm module found on omap4 and 5 needs pdmclk clock from
the pmic that may or may not be wired. Without this clock we
cannot read the registers for mcpdm at all. For the external
mcpdm clock to work, it needs to be muxed at the module level
for ti-sysc driver probe to mux it early enough for probe.

Let's set up a common file for it to make things a bit easier
to make l4 abe interconnect to probe with ti-sysc driver. Note
that this is not needed for omap5 as we can just update mcpdm
muxing in omap5-board-common.dtsi in later patches.

Cc: devicetree@vger.kernel.org
Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>

+42 -80
+1 -20
arch/arm/boot/dts/omap4-duovero.dtsi
··· 7 7 */ 8 8 9 9 #include "omap443x.dtsi" 10 + #include "omap4-mcpdm.dtsi" 10 11 11 12 / { 12 13 model = "Gumstix Duovero"; ··· 80 79 pinctrl-single,pins = < 81 80 OMAP4_IOPAD(0x166, PIN_OUTPUT | MUX_MODE3) /* usbb2_ulpitll_nxt.gpio_160 */ 82 81 OMAP4_IOPAD(0x1a0, PIN_INPUT | MUX_MODE0) /* sys_nirq2.sys_nirq2 */ 83 - >; 84 - }; 85 - 86 - mcpdm_pins: pinmux_mcpdm_pins { 87 - pinctrl-single,pins = < 88 - OMAP4_IOPAD(0x106, PIN_INPUT_PULLDOWN | MUX_MODE0) /* abe_pdm_ul_data.abe_pdm_ul_data */ 89 - OMAP4_IOPAD(0x108, PIN_INPUT_PULLDOWN | MUX_MODE0) /* abe_pdm_dl_data.abe_pdm_dl_data */ 90 - OMAP4_IOPAD(0x10a, PIN_INPUT_PULLUP | MUX_MODE0) /* abe_pdm_frame.abe_pdm_frame */ 91 - OMAP4_IOPAD(0x10c, PIN_INPUT_PULLDOWN | MUX_MODE0) /* abe_pdm_lb_clk.abe_pdm_lb_clk */ 92 - OMAP4_IOPAD(0x10e, PIN_INPUT_PULLDOWN | MUX_MODE0) /* abe_clks.abe_clks */ 93 82 >; 94 83 }; 95 84 ··· 198 207 &mcbsp1 { 199 208 pinctrl-names = "default"; 200 209 pinctrl-0 = <&mcbsp1_pins>; 201 - status = "okay"; 202 - }; 203 - 204 - &mcpdm { 205 - pinctrl-names = "default"; 206 - pinctrl-0 = <&mcpdm_pins>; 207 - 208 - clocks = <&twl6040>; 209 - clock-names = "pdmclk"; 210 - 211 210 status = "okay"; 212 211 }; 213 212
+38
arch/arm/boot/dts/omap4-mcpdm.dtsi
··· 1 + // SPDX-License-Identifier: GPL-2.0 2 + /* 3 + * Common omap4 mcpdm configuration 4 + * 5 + * Only include this file if your board has pdmclk wired from the 6 + * pmic to ABE as mcpdm uses an external clock for the module. 7 + */ 8 + 9 + &omap4_pmx_core { 10 + mcpdm_pins: pinmux_mcpdm_pins { 11 + pinctrl-single,pins = < 12 + /* 0x4a100106 abe_pdm_ul_data.abe_pdm_ul_data ag25 */ 13 + OMAP4_IOPAD(0x106, PIN_INPUT_PULLDOWN | MUX_MODE0) 14 + 15 + /* 0x4a100108 abe_pdm_dl_data.abe_pdm_dl_data af25 */ 16 + OMAP4_IOPAD(0x108, PIN_INPUT_PULLDOWN | MUX_MODE0) 17 + 18 + /* 0x4a10010a abe_pdm_frame.abe_pdm_frame ae25 */ 19 + OMAP4_IOPAD(0x10a, PIN_INPUT_PULLUP | MUX_MODE0) 20 + 21 + /* 0x4a10010c abe_pdm_lb_clk.abe_pdm_lb_clk af26 */ 22 + OMAP4_IOPAD(0x10c, PIN_INPUT_PULLDOWN | MUX_MODE0) 23 + 24 + /* 0x4a10010e abe_clks.abe_clks ah26 */ 25 + OMAP4_IOPAD(0x10e, PIN_INPUT_PULLDOWN | MUX_MODE0) 26 + >; 27 + }; 28 + }; 29 + 30 + &mcpdm { 31 + pinctrl-names = "default"; 32 + pinctrl-0 = <&mcpdm_pins>; 33 + 34 + clocks = <&twl6040>; 35 + clock-names = "pdmclk"; 36 + 37 + status = "okay"; 38 + };
+1 -20
arch/arm/boot/dts/omap4-panda-common.dtsi
··· 7 7 */ 8 8 #include <dt-bindings/input/input.h> 9 9 #include "elpida_ecb240abacn.dtsi" 10 + #include "omap4-mcpdm.dtsi" 10 11 11 12 / { 12 13 memory@80000000 { ··· 224 223 pinctrl-single,pins = < 225 224 OMAP4_IOPAD(0x120, PIN_OUTPUT | MUX_MODE3) /* hdq_sio.gpio_127 */ 226 225 OMAP4_IOPAD(0x1a0, PIN_INPUT | MUX_MODE0) /* sys_nirq2.sys_nirq2 */ 227 - >; 228 - }; 229 - 230 - mcpdm_pins: pinmux_mcpdm_pins { 231 - pinctrl-single,pins = < 232 - OMAP4_IOPAD(0x106, PIN_INPUT_PULLDOWN | MUX_MODE0) /* abe_pdm_ul_data.abe_pdm_ul_data */ 233 - OMAP4_IOPAD(0x108, PIN_INPUT_PULLDOWN | MUX_MODE0) /* abe_pdm_dl_data.abe_pdm_dl_data */ 234 - OMAP4_IOPAD(0x10a, PIN_INPUT_PULLUP | MUX_MODE0) /* abe_pdm_frame.abe_pdm_frame */ 235 - OMAP4_IOPAD(0x10c, PIN_INPUT_PULLDOWN | MUX_MODE0) /* abe_pdm_lb_clk.abe_pdm_lb_clk */ 236 - OMAP4_IOPAD(0x10e, PIN_INPUT_PULLDOWN | MUX_MODE0) /* abe_clks.abe_clks */ 237 226 >; 238 227 }; 239 228 ··· 497 506 &mcbsp1 { 498 507 pinctrl-names = "default"; 499 508 pinctrl-0 = <&mcbsp1_pins>; 500 - status = "okay"; 501 - }; 502 - 503 - &mcpdm { 504 - pinctrl-names = "default"; 505 - pinctrl-0 = <&mcpdm_pins>; 506 - 507 - clocks = <&twl6040>; 508 - clock-names = "pdmclk"; 509 - 510 509 status = "okay"; 511 510 }; 512 511
+1 -20
arch/arm/boot/dts/omap4-sdp.dts
··· 9 9 10 10 #include "omap443x.dtsi" 11 11 #include "elpida_ecb240abacn.dtsi" 12 + #include "omap4-mcpdm.dtsi" 12 13 13 14 / { 14 15 model = "TI OMAP4 SDP board"; ··· 244 243 pinctrl-single,pins = < 245 244 OMAP4_IOPAD(0x120, PIN_OUTPUT | MUX_MODE3) /* hdq_sio.gpio_127 */ 246 245 OMAP4_IOPAD(0x1a0, PIN_INPUT | MUX_MODE0) /* sys_nirq2.sys_nirq2 */ 247 - >; 248 - }; 249 - 250 - mcpdm_pins: pinmux_mcpdm_pins { 251 - pinctrl-single,pins = < 252 - OMAP4_IOPAD(0x106, PIN_INPUT_PULLDOWN | MUX_MODE0) /* abe_pdm_ul_data.abe_pdm_ul_data */ 253 - OMAP4_IOPAD(0x108, PIN_INPUT_PULLDOWN | MUX_MODE0) /* abe_pdm_dl_data.abe_pdm_dl_data */ 254 - OMAP4_IOPAD(0x10a, PIN_INPUT_PULLUP | MUX_MODE0) /* abe_pdm_frame.abe_pdm_frame */ 255 - OMAP4_IOPAD(0x10c, PIN_INPUT_PULLDOWN | MUX_MODE0) /* abe_pdm_lb_clk.abe_pdm_lb_clk */ 256 - OMAP4_IOPAD(0x10e, PIN_INPUT_PULLDOWN | MUX_MODE0) /* abe_clks.abe_clks */ 257 246 >; 258 247 }; 259 248 ··· 637 646 &dmic { 638 647 pinctrl-names = "default"; 639 648 pinctrl-0 = <&dmic_pins>; 640 - status = "okay"; 641 - }; 642 - 643 - &mcpdm { 644 - pinctrl-names = "default"; 645 - pinctrl-0 = <&mcpdm_pins>; 646 - 647 - clocks = <&twl6040>; 648 - clock-names = "pdmclk"; 649 - 650 649 status = "okay"; 651 650 }; 652 651
+1 -20
arch/arm/boot/dts/omap4-var-som-om44.dtsi
··· 7 7 * published by the Free Software Foundation. 8 8 */ 9 9 #include "omap4460.dtsi" 10 + #include "omap4-mcpdm.dtsi" 10 11 11 12 / { 12 13 model = "Variscite VAR-SOM-OM44"; ··· 72 71 pinctrl-single,pins = < 73 72 OMAP4_IOPAD(0x19c, PIN_OUTPUT | MUX_MODE3) /* fref_clk2_out.gpio_182 */ 74 73 OMAP4_IOPAD(0x1a0, PIN_INPUT | MUX_MODE0) /* sys_nirq2.sys_nirq2 */ 75 - >; 76 - }; 77 - 78 - mcpdm_pins: pinmux_mcpdm_pins { 79 - pinctrl-single,pins = < 80 - OMAP4_IOPAD(0x106, PIN_INPUT_PULLDOWN | MUX_MODE0) /* abe_pdm_ul_data.abe_pdm_ul_data */ 81 - OMAP4_IOPAD(0x108, PIN_INPUT_PULLDOWN | MUX_MODE0) /* abe_pdm_dl_data.abe_pdm_dl_data */ 82 - OMAP4_IOPAD(0x10a, PIN_INPUT_PULLUP | MUX_MODE0) /* abe_pdm_frame.abe_pdm_frame */ 83 - OMAP4_IOPAD(0x10c, PIN_INPUT_PULLDOWN | MUX_MODE0) /* abe_pdm_lb_clk.abe_pdm_lb_clk */ 84 - OMAP4_IOPAD(0x10e, PIN_INPUT_PULLDOWN | MUX_MODE0) /* abe_clks.abe_clks */ 85 74 >; 86 75 }; 87 76 ··· 240 249 241 250 &i2c4 { 242 251 status = "disabled"; 243 - }; 244 - 245 - &mcpdm { 246 - pinctrl-names = "default"; 247 - pinctrl-0 = <&mcpdm_pins>; 248 - 249 - clocks = <&twl6040>; 250 - clock-names = "pdmclk"; 251 - 252 - status = "okay"; 253 252 }; 254 253 255 254 &gpmc {