diff options
287 files changed, 13277 insertions, 13457 deletions
diff --git a/Documentation/devicetree/bindings/arm/mrvl/tauros2.txt b/Documentation/devicetree/bindings/arm/mrvl/tauros2.txt new file mode 100644 index 000000000000..31af1cbb60bd --- /dev/null +++ b/Documentation/devicetree/bindings/arm/mrvl/tauros2.txt | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | * Marvell Tauros2 Cache | ||
| 2 | |||
| 3 | Required properties: | ||
| 4 | - compatible : Should be "marvell,tauros2-cache". | ||
| 5 | - marvell,tauros2-cache-features : Specify the features supported for the | ||
| 6 | tauros2 cache. | ||
| 7 | The features including | ||
| 8 | CACHE_TAUROS2_PREFETCH_ON (1 << 0) | ||
| 9 | CACHE_TAUROS2_LINEFILL_BURST8 (1 << 1) | ||
| 10 | The definition can be found at | ||
| 11 | arch/arm/include/asm/hardware/cache-tauros2.h | ||
| 12 | |||
| 13 | Example: | ||
| 14 | L2: l2-cache { | ||
| 15 | compatible = "marvell,tauros2-cache"; | ||
| 16 | marvell,tauros2-cache-features = <0x3>; | ||
| 17 | }; | ||
diff --git a/Documentation/devicetree/bindings/arm/msm/timer.txt b/Documentation/devicetree/bindings/arm/msm/timer.txt new file mode 100644 index 000000000000..8c5907b9cae8 --- /dev/null +++ b/Documentation/devicetree/bindings/arm/msm/timer.txt | |||
| @@ -0,0 +1,38 @@ | |||
| 1 | * MSM Timer | ||
| 2 | |||
| 3 | Properties: | ||
| 4 | |||
| 5 | - compatible : Should at least contain "qcom,msm-timer". More specific | ||
| 6 | properties such as "qcom,msm-gpt" and "qcom,msm-dgt" specify a general | ||
| 7 | purpose timer and a debug timer respectively. | ||
| 8 | |||
| 9 | - interrupts : Interrupt indicating a match event. | ||
| 10 | |||
| 11 | - reg : Specifies the base address of the timer registers. The second region | ||
| 12 | specifies an optional register used to configure the clock divider. | ||
| 13 | |||
| 14 | - clock-frequency : The frequency of the timer in Hz. | ||
| 15 | |||
| 16 | Optional: | ||
| 17 | |||
| 18 | - cpu-offset : per-cpu offset used when the timer is accessed without the | ||
| 19 | CPU remapping facilities. The offset is cpu-offset * cpu-nr. | ||
| 20 | |||
| 21 | Example: | ||
| 22 | |||
| 23 | timer@200a004 { | ||
| 24 | compatible = "qcom,msm-gpt", "qcom,msm-timer"; | ||
| 25 | interrupts = <1 2 0x301>; | ||
| 26 | reg = <0x0200a004 0x10>; | ||
| 27 | clock-frequency = <32768>; | ||
| 28 | cpu-offset = <0x40000>; | ||
| 29 | }; | ||
| 30 | |||
| 31 | timer@200a024 { | ||
| 32 | compatible = "qcom,msm-dgt", "qcom,msm-timer"; | ||
| 33 | interrupts = <1 3 0x301>; | ||
| 34 | reg = <0x0200a024 0x10>, | ||
| 35 | <0x0200a034 0x4>; | ||
| 36 | clock-frequency = <6750000>; | ||
| 37 | cpu-offset = <0x40000>; | ||
| 38 | }; | ||
diff --git a/Documentation/devicetree/bindings/arm/vt8500.txt b/Documentation/devicetree/bindings/arm/vt8500.txt new file mode 100644 index 000000000000..d657832c6819 --- /dev/null +++ b/Documentation/devicetree/bindings/arm/vt8500.txt | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | VIA/Wondermedia VT8500 Platforms Device Tree Bindings | ||
| 2 | --------------------------------------- | ||
| 3 | |||
| 4 | Boards with the VIA VT8500 SoC shall have the following properties: | ||
| 5 | Required root node property: | ||
| 6 | compatible = "via,vt8500"; | ||
| 7 | |||
| 8 | Boards with the Wondermedia WM8505 SoC shall have the following properties: | ||
| 9 | Required root node property: | ||
| 10 | compatible = "wm,wm8505"; | ||
| 11 | |||
| 12 | Boards with the Wondermedia WM8650 SoC shall have the following properties: | ||
| 13 | Required root node property: | ||
| 14 | compatible = "wm,wm8650"; | ||
diff --git a/Documentation/devicetree/bindings/arm/vt8500/via,vt8500-intc.txt b/Documentation/devicetree/bindings/arm/vt8500/via,vt8500-intc.txt new file mode 100644 index 000000000000..0a4ce1051b02 --- /dev/null +++ b/Documentation/devicetree/bindings/arm/vt8500/via,vt8500-intc.txt | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | VIA/Wondermedia VT8500 Interrupt Controller | ||
| 2 | ----------------------------------------------------- | ||
| 3 | |||
| 4 | Required properties: | ||
| 5 | - compatible : "via,vt8500-intc" | ||
| 6 | - reg : Should contain 1 register ranges(address and length) | ||
| 7 | - #interrupt-cells : should be <1> | ||
| 8 | |||
| 9 | Example: | ||
| 10 | |||
| 11 | intc: interrupt-controller@d8140000 { | ||
| 12 | compatible = "via,vt8500-intc"; | ||
| 13 | interrupt-controller; | ||
| 14 | reg = <0xd8140000 0x10000>; | ||
| 15 | #interrupt-cells = <1>; | ||
| 16 | }; | ||
diff --git a/Documentation/devicetree/bindings/arm/vt8500/via,vt8500-pmc.txt b/Documentation/devicetree/bindings/arm/vt8500/via,vt8500-pmc.txt new file mode 100644 index 000000000000..521b9c7de933 --- /dev/null +++ b/Documentation/devicetree/bindings/arm/vt8500/via,vt8500-pmc.txt | |||
| @@ -0,0 +1,13 @@ | |||
| 1 | VIA/Wondermedia VT8500 Power Management Controller | ||
| 2 | ----------------------------------------------------- | ||
| 3 | |||
| 4 | Required properties: | ||
| 5 | - compatible : "via,vt8500-pmc" | ||
| 6 | - reg : Should contain 1 register ranges(address and length) | ||
| 7 | |||
| 8 | Example: | ||
| 9 | |||
| 10 | pmc@d8130000 { | ||
| 11 | compatible = "via,vt8500-pmc"; | ||
| 12 | reg = <0xd8130000 0x1000>; | ||
| 13 | }; | ||
diff --git a/Documentation/devicetree/bindings/arm/vt8500/via,vt8500-timer.txt b/Documentation/devicetree/bindings/arm/vt8500/via,vt8500-timer.txt new file mode 100644 index 000000000000..901c73f0d8ef --- /dev/null +++ b/Documentation/devicetree/bindings/arm/vt8500/via,vt8500-timer.txt | |||
| @@ -0,0 +1,15 @@ | |||
| 1 | VIA/Wondermedia VT8500 Timer | ||
| 2 | ----------------------------------------------------- | ||
| 3 | |||
| 4 | Required properties: | ||
| 5 | - compatible : "via,vt8500-timer" | ||
| 6 | - reg : Should contain 1 register ranges(address and length) | ||
| 7 | - interrupts : interrupt for the timer | ||
| 8 | |||
| 9 | Example: | ||
| 10 | |||
| 11 | timer@d8130100 { | ||
| 12 | compatible = "via,vt8500-timer"; | ||
| 13 | reg = <0xd8130100 0x28>; | ||
| 14 | interrupts = <36>; | ||
| 15 | }; | ||
diff --git a/Documentation/devicetree/bindings/clock/imx23-clock.txt b/Documentation/devicetree/bindings/clock/imx23-clock.txt new file mode 100644 index 000000000000..a0b867ef8d96 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/imx23-clock.txt | |||
| @@ -0,0 +1,76 @@ | |||
| 1 | * Clock bindings for Freescale i.MX23 | ||
| 2 | |||
| 3 | Required properties: | ||
| 4 | - compatible: Should be "fsl,imx23-clkctrl" | ||
| 5 | - reg: Address and length of the register set | ||
| 6 | - #clock-cells: Should be <1> | ||
| 7 | |||
| 8 | The clock consumer should specify the desired clock by having the clock | ||
| 9 | ID in its "clocks" phandle cell. The following is a full list of i.MX23 | ||
| 10 | clocks and IDs. | ||
| 11 | |||
| 12 | Clock ID | ||
| 13 | ------------------ | ||
| 14 | ref_xtal 0 | ||
| 15 | pll 1 | ||
| 16 | ref_cpu 2 | ||
| 17 | ref_emi 3 | ||
| 18 | ref_pix 4 | ||
| 19 | ref_io 5 | ||
| 20 | saif_sel 6 | ||
| 21 | lcdif_sel 7 | ||
| 22 | gpmi_sel 8 | ||
| 23 | ssp_sel 9 | ||
| 24 | emi_sel 10 | ||
| 25 | cpu 11 | ||
| 26 | etm_sel 12 | ||
| 27 | cpu_pll 13 | ||
| 28 | cpu_xtal 14 | ||
| 29 | hbus 15 | ||
| 30 | xbus 16 | ||
| 31 | lcdif_div 17 | ||
| 32 | ssp_div 18 | ||
| 33 | gpmi_div 19 | ||
| 34 | emi_pll 20 | ||
| 35 | emi_xtal 21 | ||
| 36 | etm_div 22 | ||
| 37 | saif_div 23 | ||
| 38 | clk32k_div 24 | ||
| 39 | rtc 25 | ||
| 40 | adc 26 | ||
| 41 | spdif_div 27 | ||
| 42 | clk32k 28 | ||
| 43 | dri 29 | ||
| 44 | pwm 30 | ||
| 45 | filt 31 | ||
| 46 | uart 32 | ||
| 47 | ssp 33 | ||
| 48 | gpmi 34 | ||
| 49 | spdif 35 | ||
| 50 | emi 36 | ||
| 51 | saif 37 | ||
| 52 | lcdif 38 | ||
| 53 | etm 39 | ||
| 54 | usb 40 | ||
| 55 | usb_pwr 41 | ||
| 56 | |||
| 57 | Examples: | ||
| 58 | |||
| 59 | clks: clkctrl@80040000 { | ||
| 60 | compatible = "fsl,imx23-clkctrl"; | ||
| 61 | reg = <0x80040000 0x2000>; | ||
| 62 | #clock-cells = <1>; | ||
| 63 | clock-output-names = | ||
| 64 | ... | ||
| 65 | "uart", /* 32 */ | ||
| 66 | ... | ||
| 67 | "end_of_list"; | ||
| 68 | }; | ||
| 69 | |||
| 70 | auart0: serial@8006c000 { | ||
| 71 | compatible = "fsl,imx23-auart"; | ||
| 72 | reg = <0x8006c000 0x2000>; | ||
| 73 | interrupts = <24 25 23>; | ||
| 74 | clocks = <&clks 32>; | ||
| 75 | status = "disabled"; | ||
| 76 | }; | ||
diff --git a/Documentation/devicetree/bindings/clock/imx28-clock.txt b/Documentation/devicetree/bindings/clock/imx28-clock.txt new file mode 100644 index 000000000000..aa2af2866fe8 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/imx28-clock.txt | |||
| @@ -0,0 +1,99 @@ | |||
| 1 | * Clock bindings for Freescale i.MX28 | ||
| 2 | |||
| 3 | Required properties: | ||
| 4 | - compatible: Should be "fsl,imx28-clkctrl" | ||
| 5 | - reg: Address and length of the register set | ||
| 6 | - #clock-cells: Should be <1> | ||
| 7 | |||
| 8 | The clock consumer should specify the desired clock by having the clock | ||
| 9 | ID in its "clocks" phandle cell. The following is a full list of i.MX28 | ||
| 10 | clocks and IDs. | ||
| 11 | |||
| 12 | Clock ID | ||
| 13 | ------------------ | ||
| 14 | ref_xtal 0 | ||
| 15 | pll0 1 | ||
| 16 | pll1 2 | ||
| 17 | pll2 3 | ||
| 18 | ref_cpu 4 | ||
| 19 | ref_emi 5 | ||
| 20 | ref_io0 6 | ||
| 21 | ref_io1 7 | ||
| 22 | ref_pix 8 | ||
| 23 | ref_hsadc 9 | ||
| 24 | ref_gpmi 10 | ||
| 25 | saif0_sel 11 | ||
| 26 | saif1_sel 12 | ||
| 27 | gpmi_sel 13 | ||
| 28 | ssp0_sel 14 | ||
| 29 | ssp1_sel 15 | ||
| 30 | ssp2_sel 16 | ||
| 31 | ssp3_sel 17 | ||
| 32 | emi_sel 18 | ||
| 33 | etm_sel 19 | ||
| 34 | lcdif_sel 20 | ||
| 35 | cpu 21 | ||
| 36 | ptp_sel 22 | ||
| 37 | cpu_pll 23 | ||
| 38 | cpu_xtal 24 | ||
| 39 | hbus 25 | ||
| 40 | xbus 26 | ||
| 41 | ssp0_div 27 | ||
| 42 | ssp1_div 28 | ||
| 43 | ssp2_div 29 | ||
| 44 | ssp3_div 30 | ||
| 45 | gpmi_div 31 | ||
| 46 | emi_pll 32 | ||
| 47 | emi_xtal 33 | ||
| 48 | lcdif_div 34 | ||
| 49 | etm_div 35 | ||
| 50 | ptp 36 | ||
| 51 | saif0_div 37 | ||
| 52 | saif1_div 38 | ||
| 53 | clk32k_div 39 | ||
| 54 | rtc 40 | ||
| 55 | lradc 41 | ||
| 56 | spdif_div 42 | ||
| 57 | clk32k 43 | ||
| 58 | pwm 44 | ||
| 59 | uart 45 | ||
| 60 | ssp0 46 | ||
| 61 | ssp1 47 | ||
| 62 | ssp2 48 | ||
| 63 | ssp3 49 | ||
| 64 | gpmi 50 | ||
| 65 | spdif 51 | ||
| 66 | emi 52 | ||
| 67 | saif0 53 | ||
| 68 | saif1 54 | ||
| 69 | lcdif 55 | ||
| 70 | etm 56 | ||
| 71 | fec 57 | ||
| 72 | can0 58 | ||
| 73 | can1 59 | ||
| 74 | usb0 60 | ||
| 75 | usb1 61 | ||
| 76 | usb0_pwr 62 | ||
| 77 | usb1_pwr 63 | ||
| 78 | enet_out 64 | ||
| 79 | |||
| 80 | Examples: | ||
| 81 | |||
| 82 | clks: clkctrl@80040000 { | ||
| 83 | compatible = "fsl,imx28-clkctrl"; | ||
| 84 | reg = <0x80040000 0x2000>; | ||
| 85 | #clock-cells = <1>; | ||
| 86 | clock-output-names = | ||
| 87 | ... | ||
| 88 | "uart", /* 45 */ | ||
| 89 | ... | ||
| 90 | "end_of_list"; | ||
| 91 | }; | ||
| 92 | |||
| 93 | auart0: serial@8006a000 { | ||
| 94 | compatible = "fsl,imx28-auart", "fsl,imx23-auart"; | ||
| 95 | reg = <0x8006a000 0x2000>; | ||
| 96 | interrupts = <112 70 71>; | ||
| 97 | clocks = <&clks 45>; | ||
| 98 | status = "disabled"; | ||
| 99 | }; | ||
diff --git a/Documentation/devicetree/bindings/clock/imx6q-clock.txt b/Documentation/devicetree/bindings/clock/imx6q-clock.txt new file mode 100644 index 000000000000..492bd991d52a --- /dev/null +++ b/Documentation/devicetree/bindings/clock/imx6q-clock.txt | |||
| @@ -0,0 +1,222 @@ | |||
| 1 | * Clock bindings for Freescale i.MX6 Quad | ||
| 2 | |||
| 3 | Required properties: | ||
| 4 | - compatible: Should be "fsl,imx6q-ccm" | ||
| 5 | - reg: Address and length of the register set | ||
| 6 | - interrupts: Should contain CCM interrupt | ||
| 7 | - #clock-cells: Should be <1> | ||
| 8 | |||
| 9 | The clock consumer should specify the desired clock by having the clock | ||
| 10 | ID in its "clocks" phandle cell. The following is a full list of i.MX6Q | ||
| 11 | clocks and IDs. | ||
| 12 | |||
| 13 | Clock ID | ||
| 14 | --------------------------- | ||
| 15 | dummy 0 | ||
| 16 | ckil 1 | ||
| 17 | ckih 2 | ||
| 18 | osc 3 | ||
| 19 | pll2_pfd0_352m 4 | ||
| 20 | pll2_pfd1_594m 5 | ||
| 21 | pll2_pfd2_396m 6 | ||
| 22 | pll3_pfd0_720m 7 | ||
| 23 | pll3_pfd1_540m 8 | ||
| 24 | pll3_pfd2_508m 9 | ||
| 25 | pll3_pfd3_454m 10 | ||
| 26 | pll2_198m 11 | ||
| 27 | pll3_120m 12 | ||
| 28 | pll3_80m 13 | ||
| 29 | pll3_60m 14 | ||
| 30 | twd 15 | ||
| 31 | step 16 | ||
| 32 | pll1_sw 17 | ||
| 33 | periph_pre 18 | ||
| 34 | periph2_pre 19 | ||
| 35 | periph_clk2_sel 20 | ||
| 36 | periph2_clk2_sel 21 | ||
| 37 | axi_sel 22 | ||
| 38 | esai_sel 23 | ||
| 39 | asrc_sel 24 | ||
| 40 | spdif_sel 25 | ||
| 41 | gpu2d_axi 26 | ||
| 42 | gpu3d_axi 27 | ||
| 43 | gpu2d_core_sel 28 | ||
| 44 | gpu3d_core_sel 29 | ||
| 45 | gpu3d_shader_sel 30 | ||
| 46 | ipu1_sel 31 | ||
| 47 | ipu2_sel 32 | ||
| 48 | ldb_di0_sel 33 | ||
| 49 | ldb_di1_sel 34 | ||
| 50 | ipu1_di0_pre_sel 35 | ||
| 51 | ipu1_di1_pre_sel 36 | ||
| 52 | ipu2_di0_pre_sel 37 | ||
| 53 | ipu2_di1_pre_sel 38 | ||
| 54 | ipu1_di0_sel 39 | ||
| 55 | ipu1_di1_sel 40 | ||
| 56 | ipu2_di0_sel 41 | ||
| 57 | ipu2_di1_sel 42 | ||
| 58 | hsi_tx_sel 43 | ||
| 59 | pcie_axi_sel 44 | ||
| 60 | ssi1_sel 45 | ||
| 61 | ssi2_sel 46 | ||
| 62 | ssi3_sel 47 | ||
| 63 | usdhc1_sel 48 | ||
| 64 | usdhc2_sel 49 | ||
| 65 | usdhc3_sel 50 | ||
| 66 | usdhc4_sel 51 | ||
| 67 | enfc_sel 52 | ||
| 68 | emi_sel 53 | ||
| 69 | emi_slow_sel 54 | ||
| 70 | vdo_axi_sel 55 | ||
| 71 | vpu_axi_sel 56 | ||
| 72 | cko1_sel 57 | ||
| 73 | periph 58 | ||
| 74 | periph2 59 | ||
| 75 | periph_clk2 60 | ||
| 76 | periph2_clk2 61 | ||
| 77 | ipg 62 | ||
| 78 | ipg_per 63 | ||
| 79 | esai_pred 64 | ||
| 80 | esai_podf 65 | ||
| 81 | asrc_pred 66 | ||
| 82 | asrc_podf 67 | ||
| 83 | spdif_pred 68 | ||
| 84 | spdif_podf 69 | ||
| 85 | can_root 70 | ||
| 86 | ecspi_root 71 | ||
| 87 | gpu2d_core_podf 72 | ||
| 88 | gpu3d_core_podf 73 | ||
| 89 | gpu3d_shader 74 | ||
| 90 | ipu1_podf 75 | ||
| 91 | ipu2_podf 76 | ||
| 92 | ldb_di0_podf 77 | ||
| 93 | ldb_di1_podf 78 | ||
| 94 | ipu1_di0_pre 79 | ||
| 95 | ipu1_di1_pre 80 | ||
| 96 | ipu2_di0_pre 81 | ||
| 97 | ipu2_di1_pre 82 | ||
| 98 | hsi_tx_podf 83 | ||
| 99 | ssi1_pred 84 | ||
| 100 | ssi1_podf 85 | ||
| 101 | ssi2_pred 86 | ||
| 102 | ssi2_podf 87 | ||
| 103 | ssi3_pred 88 | ||
| 104 | ssi3_podf 89 | ||
| 105 | uart_serial_podf 90 | ||
| 106 | usdhc1_podf 91 | ||
| 107 | usdhc2_podf 92 | ||
| 108 | usdhc3_podf 93 | ||
| 109 | usdhc4_podf 94 | ||
| 110 | enfc_pred 95 | ||
| 111 | enfc_podf 96 | ||
| 112 | emi_podf 97 | ||
| 113 | emi_slow_podf 98 | ||
| 114 | vpu_axi_podf 99 | ||
| 115 | cko1_podf 100 | ||
| 116 | axi 101 | ||
| 117 | mmdc_ch0_axi_podf 102 | ||
| 118 | mmdc_ch1_axi_podf 103 | ||
| 119 | arm 104 | ||
| 120 | ahb 105 | ||
| 121 | apbh_dma 106 | ||
| 122 | asrc 107 | ||
| 123 | can1_ipg 108 | ||
| 124 | can1_serial 109 | ||
| 125 | can2_ipg 110 | ||
| 126 | can2_serial 111 | ||
| 127 | ecspi1 112 | ||
| 128 | ecspi2 113 | ||
| 129 | ecspi3 114 | ||
| 130 | ecspi4 115 | ||
| 131 | ecspi5 116 | ||
| 132 | enet 117 | ||
| 133 | esai 118 | ||
| 134 | gpt_ipg 119 | ||
| 135 | gpt_ipg_per 120 | ||
| 136 | gpu2d_core 121 | ||
| 137 | gpu3d_core 122 | ||
| 138 | hdmi_iahb 123 | ||
| 139 | hdmi_isfr 124 | ||
| 140 | i2c1 125 | ||
| 141 | i2c2 126 | ||
| 142 | i2c3 127 | ||
| 143 | iim 128 | ||
| 144 | enfc 129 | ||
| 145 | ipu1 130 | ||
| 146 | ipu1_di0 131 | ||
| 147 | ipu1_di1 132 | ||
| 148 | ipu2 133 | ||
| 149 | ipu2_di0 134 | ||
| 150 | ldb_di0 135 | ||
| 151 | ldb_di1 136 | ||
| 152 | ipu2_di1 137 | ||
| 153 | hsi_tx 138 | ||
| 154 | mlb 139 | ||
| 155 | mmdc_ch0_axi 140 | ||
| 156 | mmdc_ch1_axi 141 | ||
| 157 | ocram 142 | ||
| 158 | openvg_axi 143 | ||
| 159 | pcie_axi 144 | ||
| 160 | pwm1 145 | ||
| 161 | pwm2 146 | ||
| 162 | pwm3 147 | ||
| 163 | pwm4 148 | ||
| 164 | per1_bch 149 | ||
| 165 | gpmi_bch_apb 150 | ||
| 166 | gpmi_bch 151 | ||
| 167 | gpmi_io 152 | ||
| 168 | gpmi_apb 153 | ||
| 169 | sata 154 | ||
| 170 | sdma 155 | ||
| 171 | spba 156 | ||
| 172 | ssi1 157 | ||
| 173 | ssi2 158 | ||
| 174 | ssi3 159 | ||
| 175 | uart_ipg 160 | ||
| 176 | uart_serial 161 | ||
| 177 | usboh3 162 | ||
| 178 | usdhc1 163 | ||
| 179 | usdhc2 164 | ||
| 180 | usdhc3 165 | ||
| 181 | usdhc4 166 | ||
| 182 | vdo_axi 167 | ||
| 183 | vpu_axi 168 | ||
| 184 | cko1 169 | ||
| 185 | pll1_sys 170 | ||
| 186 | pll2_bus 171 | ||
| 187 | pll3_usb_otg 172 | ||
| 188 | pll4_audio 173 | ||
| 189 | pll5_video 174 | ||
| 190 | pll6_mlb 175 | ||
| 191 | pll7_usb_host 176 | ||
| 192 | pll8_enet 177 | ||
| 193 | ssi1_ipg 178 | ||
| 194 | ssi2_ipg 179 | ||
| 195 | ssi3_ipg 180 | ||
| 196 | rom 181 | ||
| 197 | usbphy1 182 | ||
| 198 | usbphy2 183 | ||
| 199 | ldb_di0_div_3_5 184 | ||
| 200 | ldb_di1_div_3_5 185 | ||
| 201 | |||
| 202 | Examples: | ||
| 203 | |||
| 204 | clks: ccm@020c4000 { | ||
| 205 | compatible = "fsl,imx6q-ccm"; | ||
| 206 | reg = <0x020c4000 0x4000>; | ||
| 207 | interrupts = <0 87 0x04 0 88 0x04>; | ||
| 208 | #clock-cells = <1>; | ||
| 209 | clock-output-names = ... | ||
| 210 | "uart_ipg", | ||
| 211 | "uart_serial", | ||
| 212 | ...; | ||
| 213 | }; | ||
| 214 | |||
| 215 | uart1: serial@02020000 { | ||
| 216 | compatible = "fsl,imx6q-uart", "fsl,imx21-uart"; | ||
| 217 | reg = <0x02020000 0x4000>; | ||
| 218 | interrupts = <0 26 0x04>; | ||
| 219 | clocks = <&clks 160>, <&clks 161>; | ||
| 220 | clock-names = "ipg", "per"; | ||
| 221 | status = "disabled"; | ||
| 222 | }; | ||
diff --git a/Documentation/devicetree/bindings/clock/vt8500.txt b/Documentation/devicetree/bindings/clock/vt8500.txt new file mode 100644 index 000000000000..a880c70d0047 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/vt8500.txt | |||
| @@ -0,0 +1,72 @@ | |||
| 1 | Device Tree Clock bindings for arch-vt8500 | ||
| 2 | |||
| 3 | This binding uses the common clock binding[1]. | ||
| 4 | |||
| 5 | [1] Documentation/devicetree/bindings/clock/clock-bindings.txt | ||
| 6 | |||
| 7 | Required properties: | ||
| 8 | - compatible : shall be one of the following: | ||
| 9 | "via,vt8500-pll-clock" - for a VT8500/WM8505 PLL clock | ||
| 10 | "wm,wm8650-pll-clock" - for a WM8650 PLL clock | ||
| 11 | "via,vt8500-device-clock" - for a VT/WM device clock | ||
| 12 | |||
| 13 | Required properties for PLL clocks: | ||
| 14 | - reg : shall be the control register offset from PMC base for the pll clock. | ||
| 15 | - clocks : shall be the input parent clock phandle for the clock. This should | ||
| 16 | be the reference clock. | ||
| 17 | - #clock-cells : from common clock binding; shall be set to 0. | ||
| 18 | |||
| 19 | Required properties for device clocks: | ||
| 20 | - clocks : shall be the input parent clock phandle for the clock. This should | ||
| 21 | be a pll output. | ||
| 22 | - #clock-cells : from common clock binding; shall be set to 0. | ||
| 23 | |||
| 24 | |||
| 25 | Device Clocks | ||
| 26 | |||
| 27 | Device clocks are required to have one or both of the following sets of | ||
| 28 | properties: | ||
| 29 | |||
| 30 | |||
| 31 | Gated device clocks: | ||
| 32 | |||
| 33 | Required properties: | ||
| 34 | - enable-reg : shall be the register offset from PMC base for the enable | ||
| 35 | register. | ||
| 36 | - enable-bit : shall be the bit within enable-reg to enable/disable the clock. | ||
| 37 | |||
| 38 | |||
| 39 | Divisor device clocks: | ||
| 40 | |||
| 41 | Required property: | ||
| 42 | - divisor-reg : shall be the register offset from PMC base for the divisor | ||
| 43 | register. | ||
| 44 | Optional property: | ||
| 45 | - divisor-mask : shall be the mask for the divisor register. Defaults to 0x1f | ||
| 46 | if not specified. | ||
| 47 | |||
| 48 | |||
| 49 | For example: | ||
| 50 | |||
| 51 | ref25: ref25M { | ||
| 52 | #clock-cells = <0>; | ||
| 53 | compatible = "fixed-clock"; | ||
| 54 | clock-frequency = <25000000>; | ||
| 55 | }; | ||
| 56 | |||
| 57 | plla: plla { | ||
| 58 | #clock-cells = <0>; | ||
| 59 | compatible = "wm,wm8650-pll-clock"; | ||
| 60 | clocks = <&ref25>; | ||
| 61 | reg = <0x200>; | ||
| 62 | }; | ||
| 63 | |||
| 64 | sdhc: sdhc { | ||
| 65 | #clock-cells = <0>; | ||
| 66 | compatible = "via,vt8500-device-clock"; | ||
| 67 | clocks = <&pllb>; | ||
| 68 | divisor-reg = <0x328>; | ||
| 69 | divisor-mask = <0x3f>; | ||
| 70 | enable-reg = <0x254>; | ||
| 71 | enable-bit = <18>; | ||
| 72 | }; | ||
diff --git a/Documentation/devicetree/bindings/dma/mmp-dma.txt b/Documentation/devicetree/bindings/dma/mmp-dma.txt new file mode 100644 index 000000000000..a4fa4efa1d83 --- /dev/null +++ b/Documentation/devicetree/bindings/dma/mmp-dma.txt | |||
| @@ -0,0 +1,74 @@ | |||
| 1 | * MARVELL MMP DMA controller | ||
| 2 | |||
| 3 | Marvell Peripheral DMA Controller | ||
| 4 | Used platfroms: pxa688, pxa910, pxa3xx, etc | ||
| 5 | |||
| 6 | Required properties: | ||
| 7 | - compatible: Should be "marvell,pdma-1.0" | ||
| 8 | - reg: Should contain DMA registers location and length. | ||
| 9 | - interrupts: Either contain all of the per-channel DMA interrupts | ||
| 10 | or one irq for pdma device | ||
| 11 | - #dma-channels: Number of DMA channels supported by the controller. | ||
| 12 | |||
| 13 | "marvell,pdma-1.0" | ||
| 14 | Used platfroms: pxa25x, pxa27x, pxa3xx, pxa93x, pxa168, pxa910, pxa688. | ||
| 15 | |||
| 16 | Examples: | ||
| 17 | |||
| 18 | /* | ||
| 19 | * Each channel has specific irq | ||
| 20 | * ICU parse out irq channel from ICU register, | ||
| 21 | * while DMA controller may not able to distinguish the irq channel | ||
| 22 | * Using this method, interrupt-parent is required as demuxer | ||
| 23 | * For example, pxa688 icu register 0x128, bit 0~15 is PDMA channel irq, | ||
| 24 | * 18~21 is ADMA irq | ||
| 25 | */ | ||
| 26 | pdma: dma-controller@d4000000 { | ||
| 27 | compatible = "marvell,pdma-1.0"; | ||
| 28 | reg = <0xd4000000 0x10000>; | ||
| 29 | interrupts = <0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15>; | ||
| 30 | interrupt-parent = <&intcmux32>; | ||
| 31 | #dma-channels = <16>; | ||
| 32 | }; | ||
| 33 | |||
| 34 | /* | ||
| 35 | * One irq for all channels | ||
| 36 | * Dmaengine driver (DMA controller) distinguish irq channel via | ||
| 37 | * parsing internal register | ||
| 38 | */ | ||
| 39 | pdma: dma-controller@d4000000 { | ||
| 40 | compatible = "marvell,pdma-1.0"; | ||
| 41 | reg = <0xd4000000 0x10000>; | ||
| 42 | interrupts = <47>; | ||
| 43 | #dma-channels = <16>; | ||
| 44 | }; | ||
| 45 | |||
| 46 | |||
| 47 | Marvell Two Channel DMA Controller used specifically for audio | ||
| 48 | Used platfroms: pxa688, pxa910 | ||
| 49 | |||
| 50 | Required properties: | ||
| 51 | - compatible: Should be "marvell,adma-1.0" or "marvell,pxa910-squ" | ||
| 52 | - reg: Should contain DMA registers location and length. | ||
| 53 | - interrupts: Either contain all of the per-channel DMA interrupts | ||
| 54 | or one irq for dma device | ||
| 55 | |||
| 56 | "marvell,adma-1.0" used on pxa688 | ||
| 57 | "marvell,pxa910-squ" used on pxa910 | ||
| 58 | |||
| 59 | Examples: | ||
| 60 | |||
| 61 | /* each channel has specific irq */ | ||
| 62 | adma0: dma-controller@d42a0800 { | ||
| 63 | compatible = "marvell,adma-1.0"; | ||
| 64 | reg = <0xd42a0800 0x100>; | ||
| 65 | interrupts = <18 19>; | ||
| 66 | interrupt-parent = <&intcmux32>; | ||
| 67 | }; | ||
| 68 | |||
| 69 | /* One irq for all channels */ | ||
| 70 | squ: dma-controller@d42a0800 { | ||
| 71 | compatible = "marvell,pxa910-squ"; | ||
| 72 | reg = <0xd42a0800 0x100>; | ||
| 73 | interrupts = <46>; | ||
| 74 | }; | ||
diff --git a/Documentation/devicetree/bindings/gpio/gpio-samsung.txt b/Documentation/devicetree/bindings/gpio/gpio-samsung.txt index 5375625e8cd2..f1e5dfecf55d 100644 --- a/Documentation/devicetree/bindings/gpio/gpio-samsung.txt +++ b/Documentation/devicetree/bindings/gpio/gpio-samsung.txt | |||
| @@ -39,3 +39,46 @@ Example: | |||
| 39 | #gpio-cells = <4>; | 39 | #gpio-cells = <4>; |
| 40 | gpio-controller; | 40 | gpio-controller; |
| 41 | }; | 41 | }; |
| 42 | |||
| 43 | |||
| 44 | Samsung S3C24XX GPIO Controller | ||
| 45 | |||
| 46 | Required properties: | ||
| 47 | - compatible: Compatible property value should be "samsung,s3c24xx-gpio". | ||
| 48 | |||
| 49 | - reg: Physical base address of the controller and length of memory mapped | ||
| 50 | region. | ||
| 51 | |||
| 52 | - #gpio-cells: Should be 3. The syntax of the gpio specifier used by client nodes | ||
| 53 | should be the following with values derived from the SoC user manual. | ||
| 54 | <[phandle of the gpio controller node] | ||
| 55 | [pin number within the gpio controller] | ||
| 56 | [mux function] | ||
| 57 | [flags and pull up/down] | ||
| 58 | |||
| 59 | Values for gpio specifier: | ||
| 60 | - Pin number: depending on the controller a number from 0 up to 15. | ||
| 61 | - Mux function: Depending on the SoC and the gpio bank the gpio can be set | ||
| 62 | as input, output or a special function | ||
| 63 | - Flags and Pull Up/Down: the values to use differ for the individual SoCs | ||
| 64 | example S3C2416/S3C2450: | ||
| 65 | 0 - Pull Up/Down Disabled. | ||
| 66 | 1 - Pull Down Enabled. | ||
| 67 | 2 - Pull Up Enabled. | ||
| 68 | Bit 16 (0x00010000) - Input is active low. | ||
| 69 | Consult the user manual for the correct values of Mux and Pull Up/Down. | ||
| 70 | |||
| 71 | - gpio-controller: Specifies that the node is a gpio controller. | ||
| 72 | - #address-cells: should be 1. | ||
| 73 | - #size-cells: should be 1. | ||
| 74 | |||
| 75 | Example: | ||
| 76 | |||
| 77 | gpa: gpio-controller@56000000 { | ||
| 78 | #address-cells = <1>; | ||
| 79 | #size-cells = <1>; | ||
| 80 | compatible = "samsung,s3c24xx-gpio"; | ||
| 81 | reg = <0x56000000 0x10>; | ||
| 82 | #gpio-cells = <3>; | ||
| 83 | gpio-controller; | ||
| 84 | }; | ||
diff --git a/Documentation/devicetree/bindings/gpio/gpio-vt8500.txt b/Documentation/devicetree/bindings/gpio/gpio-vt8500.txt new file mode 100644 index 000000000000..f4dc5233167e --- /dev/null +++ b/Documentation/devicetree/bindings/gpio/gpio-vt8500.txt | |||
| @@ -0,0 +1,24 @@ | |||
| 1 | VIA/Wondermedia VT8500 GPIO Controller | ||
| 2 | ----------------------------------------------------- | ||
| 3 | |||
| 4 | Required properties: | ||
| 5 | - compatible : "via,vt8500-gpio", "wm,wm8505-gpio" | ||
| 6 | or "wm,wm8650-gpio" depending on your SoC | ||
| 7 | - reg : Should contain 1 register range (address and length) | ||
| 8 | - #gpio-cells : should be <3>. | ||
| 9 | 1) bank | ||
| 10 | 2) pin number | ||
| 11 | 3) flags - should be 0 | ||
| 12 | |||
| 13 | Example: | ||
| 14 | |||
| 15 | gpio: gpio-controller@d8110000 { | ||
| 16 | compatible = "via,vt8500-gpio"; | ||
| 17 | gpio-controller; | ||
| 18 | reg = <0xd8110000 0x10000>; | ||
| 19 | #gpio-cells = <3>; | ||
| 20 | }; | ||
| 21 | |||
| 22 | vibrate { | ||
| 23 | gpios = <&gpio 0 1 0>; /* Bank 0, Pin 1, No flags */ | ||
| 24 | }; | ||
diff --git a/Documentation/devicetree/bindings/mfd/ab8500.txt b/Documentation/devicetree/bindings/mfd/ab8500.txt index 69e757a657a0..ce83c8d3c00e 100644 --- a/Documentation/devicetree/bindings/mfd/ab8500.txt +++ b/Documentation/devicetree/bindings/mfd/ab8500.txt | |||
| @@ -23,6 +23,7 @@ Device IRQ Names Supply Names Description | |||
| 23 | ab8500-bm : : : Battery Manager | 23 | ab8500-bm : : : Battery Manager |
| 24 | ab8500-btemp : : : Battery Temperature | 24 | ab8500-btemp : : : Battery Temperature |
| 25 | ab8500-charger : : : Battery Charger | 25 | ab8500-charger : : : Battery Charger |
| 26 | ab8500-codec : : : Audio Codec | ||
| 26 | ab8500-fg : : : Fuel Gauge | 27 | ab8500-fg : : : Fuel Gauge |
| 27 | ab8500-gpadc : HW_CONV_END : vddadc : Analogue to Digital Converter | 28 | ab8500-gpadc : HW_CONV_END : vddadc : Analogue to Digital Converter |
| 28 | SW_CONV_END : : | 29 | SW_CONV_END : : |
| @@ -52,6 +53,14 @@ Optional child device properties: | |||
| 52 | supplied in the interrupts property | 53 | supplied in the interrupts property |
| 53 | - <supply_name>-supply : contains a phandle to the regulator supply node in Device Tree | 54 | - <supply_name>-supply : contains a phandle to the regulator supply node in Device Tree |
| 54 | 55 | ||
| 56 | Non-standard child device properties: | ||
| 57 | - Audio CODEC: | ||
| 58 | - stericsson,amic[1|2]-type-single-ended : Single-ended Analoge Mic (default: differential) | ||
| 59 | - stericsson,amic1a-bias-vamic2 : Analoge Mic wishes to use a non-standard Vamic | ||
| 60 | - stericsson,amic1b-bias-vamic2 : Analoge Mic wishes to use a non-standard Vamic | ||
| 61 | - stericsson,amic2-bias-vamic1 : Analoge Mic wishes to use a non-standard Vamic | ||
| 62 | - stericsson,earpeice-cmv : Earpeice voltage (only: 950 | 1100 | 1270 | 1580) | ||
| 63 | |||
| 55 | ab8500@5 { | 64 | ab8500@5 { |
| 56 | compatible = "stericsson,ab8500"; | 65 | compatible = "stericsson,ab8500"; |
| 57 | reg = <5>; /* mailbox 5 is i2c */ | 66 | reg = <5>; /* mailbox 5 is i2c */ |
| @@ -110,6 +119,12 @@ ab8500@5 { | |||
| 110 | compatible = "stericsson,ab8500-pwm"; | 119 | compatible = "stericsson,ab8500-pwm"; |
| 111 | }; | 120 | }; |
| 112 | 121 | ||
| 122 | codec: ab8500-codec { | ||
| 123 | compatible = "stericsson,ab8500-codec"; | ||
| 124 | |||
| 125 | stericsson,earpeice-cmv = <950>; /* Units in mV. */ | ||
| 126 | }; | ||
| 127 | |||
| 113 | ab8500-regulators { | 128 | ab8500-regulators { |
| 114 | compatible = "stericsson,ab8500-regulator"; | 129 | compatible = "stericsson,ab8500-regulator"; |
| 115 | 130 | ||
diff --git a/Documentation/devicetree/bindings/mtd/pxa3xx-nand.txt b/Documentation/devicetree/bindings/mtd/pxa3xx-nand.txt new file mode 100644 index 000000000000..f1421e2bbab7 --- /dev/null +++ b/Documentation/devicetree/bindings/mtd/pxa3xx-nand.txt | |||
| @@ -0,0 +1,31 @@ | |||
| 1 | PXA3xx NAND DT bindings | ||
| 2 | |||
| 3 | Required properties: | ||
| 4 | |||
| 5 | - compatible: Should be "marvell,pxa3xx-nand" | ||
| 6 | - reg: The register base for the controller | ||
| 7 | - interrupts: The interrupt to map | ||
| 8 | - #address-cells: Set to <1> if the node includes partitions | ||
| 9 | |||
| 10 | Optional properties: | ||
| 11 | |||
| 12 | - marvell,nand-enable-arbiter: Set to enable the bus arbiter | ||
| 13 | - marvell,nand-keep-config: Set to keep the NAND controller config as set | ||
| 14 | by the bootloader | ||
| 15 | - num-cs: Number of chipselect lines to usw | ||
| 16 | |||
| 17 | Example: | ||
| 18 | |||
| 19 | nand0: nand@43100000 { | ||
| 20 | compatible = "marvell,pxa3xx-nand"; | ||
| 21 | reg = <0x43100000 90>; | ||
| 22 | interrupts = <45>; | ||
| 23 | #address-cells = <1>; | ||
| 24 | |||
| 25 | marvell,nand-enable-arbiter; | ||
| 26 | marvell,nand-keep-config; | ||
| 27 | num-cs = <1>; | ||
| 28 | |||
| 29 | /* partitions (optional) */ | ||
| 30 | }; | ||
| 31 | |||
diff --git a/Documentation/devicetree/bindings/rtc/pxa-rtc.txt b/Documentation/devicetree/bindings/rtc/pxa-rtc.txt new file mode 100644 index 000000000000..8c6672a1b7d7 --- /dev/null +++ b/Documentation/devicetree/bindings/rtc/pxa-rtc.txt | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | * PXA RTC | ||
| 2 | |||
| 3 | PXA specific RTC driver. | ||
| 4 | |||
| 5 | Required properties: | ||
| 6 | - compatible : Should be "marvell,pxa-rtc" | ||
| 7 | |||
| 8 | Examples: | ||
| 9 | |||
| 10 | rtc@40900000 { | ||
| 11 | compatible = "marvell,pxa-rtc"; | ||
| 12 | reg = <0x40900000 0x3c>; | ||
| 13 | interrupts = <30 31>; | ||
| 14 | }; | ||
diff --git a/Documentation/devicetree/bindings/rtc/via,vt8500-rtc.txt b/Documentation/devicetree/bindings/rtc/via,vt8500-rtc.txt new file mode 100644 index 000000000000..3c0484c49582 --- /dev/null +++ b/Documentation/devicetree/bindings/rtc/via,vt8500-rtc.txt | |||
| @@ -0,0 +1,15 @@ | |||
| 1 | VIA/Wondermedia VT8500 Realtime Clock Controller | ||
| 2 | ----------------------------------------------------- | ||
| 3 | |||
| 4 | Required properties: | ||
| 5 | - compatible : "via,vt8500-rtc" | ||
| 6 | - reg : Should contain 1 register ranges(address and length) | ||
| 7 | - interrupts : alarm interrupt | ||
| 8 | |||
| 9 | Example: | ||
| 10 | |||
| 11 | rtc@d8100000 { | ||
| 12 | compatible = "via,vt8500-rtc"; | ||
| 13 | reg = <0xd8100000 0x10000>; | ||
| 14 | interrupts = <48>; | ||
| 15 | }; | ||
diff --git a/Documentation/devicetree/bindings/sound/ux500-mop500.txt b/Documentation/devicetree/bindings/sound/ux500-mop500.txt new file mode 100644 index 000000000000..48e071c96b46 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/ux500-mop500.txt | |||
| @@ -0,0 +1,39 @@ | |||
| 1 | * MOP500 Audio Machine Driver | ||
| 2 | |||
| 3 | This node is responsible for linking together all ux500 Audio Driver components. | ||
| 4 | |||
| 5 | Required properties: | ||
| 6 | - compatible : "stericsson,snd-soc-mop500" | ||
| 7 | |||
| 8 | Non-standard properties: | ||
| 9 | - stericsson,cpu-dai : Phandle to the CPU-side DAI | ||
| 10 | - stericsson,audio-codec : Phandle to the Audio CODEC | ||
| 11 | - stericsson,card-name : Over-ride default card name | ||
| 12 | |||
| 13 | Example: | ||
| 14 | |||
| 15 | sound { | ||
| 16 | compatible = "stericsson,snd-soc-mop500"; | ||
| 17 | |||
| 18 | stericsson,cpu-dai = <&msp1 &msp3>; | ||
| 19 | stericsson,audio-codec = <&codec>; | ||
| 20 | }; | ||
| 21 | |||
| 22 | msp1: msp@80124000 { | ||
| 23 | compatible = "stericsson,ux500-msp-i2s"; | ||
| 24 | reg = <0x80124000 0x1000>; | ||
| 25 | interrupts = <0 62 0x4>; | ||
| 26 | v-ape-supply = <&db8500_vape_reg>; | ||
| 27 | }; | ||
| 28 | |||
| 29 | msp3: msp@80125000 { | ||
| 30 | compatible = "stericsson,ux500-msp-i2s"; | ||
| 31 | reg = <0x80125000 0x1000>; | ||
| 32 | interrupts = <0 62 0x4>; | ||
| 33 | v-ape-supply = <&db8500_vape_reg>; | ||
| 34 | }; | ||
| 35 | |||
| 36 | codec: ab8500-codec { | ||
| 37 | compatible = "stericsson,ab8500-codec"; | ||
| 38 | stericsson,earpeice-cmv = <950>; /* Units in mV. */ | ||
| 39 | }; | ||
diff --git a/Documentation/devicetree/bindings/sound/ux500-msp.txt b/Documentation/devicetree/bindings/sound/ux500-msp.txt new file mode 100644 index 000000000000..99acd9c774e1 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/ux500-msp.txt | |||
| @@ -0,0 +1,43 @@ | |||
| 1 | * ux500 MSP (CPU-side Digital Audio Interface) | ||
| 2 | |||
| 3 | Required properties: | ||
| 4 | - compatible :"stericsson,ux500-msp-i2s" | ||
| 5 | - reg : Physical base address and length of the device's registers. | ||
| 6 | |||
| 7 | Optional properties: | ||
| 8 | - interrupts : The interrupt output from the device. | ||
| 9 | - interrupt-parent : The parent interrupt controller. | ||
| 10 | - <name>-supply : Phandle to the regulator <name> supply | ||
| 11 | |||
| 12 | Example: | ||
| 13 | |||
| 14 | sound { | ||
| 15 | compatible = "stericsson,snd-soc-mop500"; | ||
| 16 | |||
| 17 | stericsson,platform-pcm-dma = <&pcm>; | ||
| 18 | stericsson,cpu-dai = <&msp1 &msp3>; | ||
| 19 | stericsson,audio-codec = <&codec>; | ||
| 20 | }; | ||
| 21 | |||
| 22 | pcm: ux500-pcm { | ||
| 23 | compatible = "stericsson,ux500-pcm"; | ||
| 24 | }; | ||
| 25 | |||
| 26 | msp1: msp@80124000 { | ||
| 27 | compatible = "stericsson,ux500-msp-i2s"; | ||
| 28 | reg = <0x80124000 0x1000>; | ||
| 29 | interrupts = <0 62 0x4>; | ||
| 30 | v-ape-supply = <&db8500_vape_reg>; | ||
| 31 | }; | ||
| 32 | |||
| 33 | msp3: msp@80125000 { | ||
| 34 | compatible = "stericsson,ux500-msp-i2s"; | ||
| 35 | reg = <0x80125000 0x1000>; | ||
| 36 | interrupts = <0 62 0x4>; | ||
| 37 | v-ape-supply = <&db8500_vape_reg>; | ||
| 38 | }; | ||
| 39 | |||
| 40 | codec: ab8500-codec { | ||
| 41 | compatible = "stericsson,ab8500-codec"; | ||
| 42 | stericsson,earpeice-cmv = <950>; /* Units in mV. */ | ||
| 43 | }; | ||
diff --git a/Documentation/devicetree/bindings/tty/serial/via,vt8500-uart.txt b/Documentation/devicetree/bindings/tty/serial/via,vt8500-uart.txt new file mode 100644 index 000000000000..5feef1ef167d --- /dev/null +++ b/Documentation/devicetree/bindings/tty/serial/via,vt8500-uart.txt | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | VIA/Wondermedia VT8500 UART Controller | ||
| 2 | ----------------------------------------------------- | ||
| 3 | |||
| 4 | Required properties: | ||
| 5 | - compatible : "via,vt8500-uart" | ||
| 6 | - reg : Should contain 1 register ranges(address and length) | ||
| 7 | - interrupts : UART interrupt | ||
| 8 | - clocks : phandle to the uart source clock (usually a 24Mhz fixed clock) | ||
| 9 | |||
| 10 | Example: | ||
| 11 | |||
| 12 | uart@d8210000 { | ||
| 13 | compatible = "via,vt8500-uart"; | ||
| 14 | reg = <0xd8210000 0x1040>; | ||
| 15 | interrupts = <47>; | ||
| 16 | clocks = <&ref24>; | ||
| 17 | }; | ||
diff --git a/Documentation/devicetree/bindings/usb/platform-uhci.txt b/Documentation/devicetree/bindings/usb/platform-uhci.txt new file mode 100644 index 000000000000..a4fb0719d157 --- /dev/null +++ b/Documentation/devicetree/bindings/usb/platform-uhci.txt | |||
| @@ -0,0 +1,15 @@ | |||
| 1 | Generic Platform UHCI Controller | ||
| 2 | ----------------------------------------------------- | ||
| 3 | |||
| 4 | Required properties: | ||
| 5 | - compatible : "platform-uhci" | ||
| 6 | - reg : Should contain 1 register ranges(address and length) | ||
| 7 | - interrupts : UHCI controller interrupt | ||
| 8 | |||
| 9 | Example: | ||
| 10 | |||
| 11 | uhci@d8007b00 { | ||
| 12 | compatible = "platform-uhci"; | ||
| 13 | reg = <0xd8007b00 0x200>; | ||
| 14 | interrupts = <43>; | ||
| 15 | }; | ||
diff --git a/Documentation/devicetree/bindings/usb/via,vt8500-ehci.txt b/Documentation/devicetree/bindings/usb/via,vt8500-ehci.txt new file mode 100644 index 000000000000..17b3ad1d97e7 --- /dev/null +++ b/Documentation/devicetree/bindings/usb/via,vt8500-ehci.txt | |||
| @@ -0,0 +1,15 @@ | |||
| 1 | VIA/Wondermedia VT8500 EHCI Controller | ||
| 2 | ----------------------------------------------------- | ||
| 3 | |||
| 4 | Required properties: | ||
| 5 | - compatible : "via,vt8500-ehci" | ||
| 6 | - reg : Should contain 1 register ranges(address and length) | ||
| 7 | - interrupts : ehci controller interrupt | ||
| 8 | |||
| 9 | Example: | ||
| 10 | |||
| 11 | ehci@d8007900 { | ||
| 12 | compatible = "via,vt8500-ehci"; | ||
| 13 | reg = <0xd8007900 0x200>; | ||
| 14 | interrupts = <43>; | ||
| 15 | }; | ||
diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt index db4d3af3643c..5c63da29aa05 100644 --- a/Documentation/devicetree/bindings/vendor-prefixes.txt +++ b/Documentation/devicetree/bindings/vendor-prefixes.txt | |||
| @@ -47,5 +47,7 @@ sirf SiRF Technology, Inc. | |||
| 47 | st STMicroelectronics | 47 | st STMicroelectronics |
| 48 | stericsson ST-Ericsson | 48 | stericsson ST-Ericsson |
| 49 | ti Texas Instruments | 49 | ti Texas Instruments |
| 50 | via VIA Technologies, Inc. | ||
| 50 | wlf Wolfson Microelectronics | 51 | wlf Wolfson Microelectronics |
| 52 | wm Wondermedia Technologies, Inc. | ||
| 51 | xlnx Xilinx | 53 | xlnx Xilinx |
diff --git a/Documentation/devicetree/bindings/video/via,vt8500-fb.txt b/Documentation/devicetree/bindings/video/via,vt8500-fb.txt new file mode 100644 index 000000000000..c870b6478ec8 --- /dev/null +++ b/Documentation/devicetree/bindings/video/via,vt8500-fb.txt | |||
| @@ -0,0 +1,62 @@ | |||
| 1 | VIA VT8500 Framebuffer | ||
| 2 | ----------------------------------------------------- | ||
| 3 | |||
| 4 | Required properties: | ||
| 5 | - compatible : "via,vt8500-fb" | ||
| 6 | - reg : Should contain 1 register ranges(address and length) | ||
| 7 | - interrupts : framebuffer controller interrupt | ||
| 8 | - display: a phandle pointing to the display node | ||
| 9 | |||
| 10 | Required nodes: | ||
| 11 | - display: a display node is required to initialize the lcd panel | ||
| 12 | This should be in the board dts. | ||
| 13 | - default-mode: a videomode within the display with timing parameters | ||
| 14 | as specified below. | ||
| 15 | |||
| 16 | Example: | ||
| 17 | |||
| 18 | fb@d800e400 { | ||
| 19 | compatible = "via,vt8500-fb"; | ||
| 20 | reg = <0xd800e400 0x400>; | ||
| 21 | interrupts = <12>; | ||
| 22 | display = <&display>; | ||
| 23 | default-mode = <&mode0>; | ||
| 24 | }; | ||
| 25 | |||
| 26 | VIA VT8500 Display | ||
| 27 | ----------------------------------------------------- | ||
| 28 | Required properties (as per of_videomode_helper): | ||
| 29 | |||
| 30 | - hactive, vactive: Display resolution | ||
| 31 | - hfront-porch, hback-porch, hsync-len: Horizontal Display timing parameters | ||
| 32 | in pixels | ||
| 33 | vfront-porch, vback-porch, vsync-len: Vertical display timing parameters in | ||
| 34 | lines | ||
| 35 | - clock: displayclock in Hz | ||
| 36 | - bpp: lcd panel bit-depth. | ||
| 37 | <16> for RGB565, <32> for RGB888 | ||
| 38 | |||
| 39 | Optional properties (as per of_videomode_helper): | ||
| 40 | - width-mm, height-mm: Display dimensions in mm | ||
| 41 | - hsync-active-high (bool): Hsync pulse is active high | ||
| 42 | - vsync-active-high (bool): Vsync pulse is active high | ||
| 43 | - interlaced (bool): This is an interlaced mode | ||
| 44 | - doublescan (bool): This is a doublescan mode | ||
| 45 | |||
| 46 | Example: | ||
| 47 | display: display@0 { | ||
| 48 | modes { | ||
| 49 | mode0: mode@0 { | ||
| 50 | hactive = <800>; | ||
| 51 | vactive = <480>; | ||
| 52 | hback-porch = <88>; | ||
| 53 | hfront-porch = <40>; | ||
| 54 | hsync-len = <0>; | ||
| 55 | vback-porch = <32>; | ||
| 56 | vfront-porch = <11>; | ||
| 57 | vsync-len = <1>; | ||
| 58 | clock = <0>; /* unused but required */ | ||
| 59 | bpp = <16>; /* non-standard but required */ | ||
| 60 | }; | ||
| 61 | }; | ||
| 62 | }; | ||
diff --git a/Documentation/devicetree/bindings/video/wm,prizm-ge-rops.txt b/Documentation/devicetree/bindings/video/wm,prizm-ge-rops.txt new file mode 100644 index 000000000000..a850fa011f02 --- /dev/null +++ b/Documentation/devicetree/bindings/video/wm,prizm-ge-rops.txt | |||
| @@ -0,0 +1,13 @@ | |||
| 1 | VIA/Wondermedia Graphics Engine Controller | ||
| 2 | ----------------------------------------------------- | ||
| 3 | |||
| 4 | Required properties: | ||
| 5 | - compatible : "wm,prizm-ge-rops" | ||
| 6 | - reg : Should contain 1 register ranges(address and length) | ||
| 7 | |||
| 8 | Example: | ||
| 9 | |||
| 10 | ge_rops@d8050400 { | ||
| 11 | compatible = "wm,prizm-ge-rops"; | ||
| 12 | reg = <0xd8050400 0x100>; | ||
| 13 | }; | ||
diff --git a/Documentation/devicetree/bindings/video/wm,wm8505-fb.txt b/Documentation/devicetree/bindings/video/wm,wm8505-fb.txt new file mode 100644 index 000000000000..3d325e1d11ee --- /dev/null +++ b/Documentation/devicetree/bindings/video/wm,wm8505-fb.txt | |||
| @@ -0,0 +1,23 @@ | |||
| 1 | Wondermedia WM8505 Framebuffer | ||
| 2 | ----------------------------------------------------- | ||
| 3 | |||
| 4 | Required properties: | ||
| 5 | - compatible : "wm,wm8505-fb" | ||
| 6 | - reg : Should contain 1 register ranges(address and length) | ||
| 7 | - via,display: a phandle pointing to the display node | ||
| 8 | |||
| 9 | Required nodes: | ||
| 10 | - display: a display node is required to initialize the lcd panel | ||
| 11 | This should be in the board dts. See definition in | ||
| 12 | Documentation/devicetree/bindings/video/via,vt8500-fb.txt | ||
| 13 | - default-mode: a videomode node as specified in | ||
| 14 | Documentation/devicetree/bindings/video/via,vt8500-fb.txt | ||
| 15 | |||
| 16 | Example: | ||
| 17 | |||
| 18 | fb@d8050800 { | ||
| 19 | compatible = "wm,wm8505-fb"; | ||
| 20 | reg = <0xd8050800 0x200>; | ||
| 21 | display = <&display>; | ||
| 22 | default-mode = <&mode0>; | ||
| 23 | }; | ||
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 2f88d8d97701..1fd9bcd25b4d 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
| @@ -273,7 +273,7 @@ config ARCH_INTEGRATOR | |||
| 273 | select ARM_AMBA | 273 | select ARM_AMBA |
| 274 | select ARCH_HAS_CPUFREQ | 274 | select ARCH_HAS_CPUFREQ |
| 275 | select COMMON_CLK | 275 | select COMMON_CLK |
| 276 | select CLK_VERSATILE | 276 | select COMMON_CLK_VERSATILE |
| 277 | select HAVE_TCM | 277 | select HAVE_TCM |
| 278 | select ICST | 278 | select ICST |
| 279 | select GENERIC_CLOCKEVENTS | 279 | select GENERIC_CLOCKEVENTS |
| @@ -289,13 +289,12 @@ config ARCH_INTEGRATOR | |||
| 289 | config ARCH_REALVIEW | 289 | config ARCH_REALVIEW |
| 290 | bool "ARM Ltd. RealView family" | 290 | bool "ARM Ltd. RealView family" |
| 291 | select ARM_AMBA | 291 | select ARM_AMBA |
| 292 | select CLKDEV_LOOKUP | 292 | select COMMON_CLK |
| 293 | select HAVE_MACH_CLKDEV | 293 | select COMMON_CLK_VERSATILE |
| 294 | select ICST | 294 | select ICST |
| 295 | select GENERIC_CLOCKEVENTS | 295 | select GENERIC_CLOCKEVENTS |
| 296 | select ARCH_WANT_OPTIONAL_GPIOLIB | 296 | select ARCH_WANT_OPTIONAL_GPIOLIB |
| 297 | select PLAT_VERSATILE | 297 | select PLAT_VERSATILE |
| 298 | select PLAT_VERSATILE_CLOCK | ||
| 299 | select PLAT_VERSATILE_CLCD | 298 | select PLAT_VERSATILE_CLCD |
| 300 | select ARM_TIMER_SP804 | 299 | select ARM_TIMER_SP804 |
| 301 | select GPIO_PL061 if GPIOLIB | 300 | select GPIO_PL061 if GPIOLIB |
| @@ -413,7 +412,7 @@ config ARCH_PRIMA2 | |||
| 413 | select NO_IOPORT | 412 | select NO_IOPORT |
| 414 | select ARCH_REQUIRE_GPIOLIB | 413 | select ARCH_REQUIRE_GPIOLIB |
| 415 | select GENERIC_CLOCKEVENTS | 414 | select GENERIC_CLOCKEVENTS |
| 416 | select CLKDEV_LOOKUP | 415 | select COMMON_CLK |
| 417 | select GENERIC_IRQ_CHIP | 416 | select GENERIC_IRQ_CHIP |
| 418 | select MIGHT_HAVE_CACHE_L2X0 | 417 | select MIGHT_HAVE_CACHE_L2X0 |
| 419 | select PINCTRL | 418 | select PINCTRL |
| @@ -1005,6 +1004,10 @@ config ARCH_VT8500 | |||
| 1005 | select ARCH_HAS_CPUFREQ | 1004 | select ARCH_HAS_CPUFREQ |
| 1006 | select GENERIC_CLOCKEVENTS | 1005 | select GENERIC_CLOCKEVENTS |
| 1007 | select ARCH_REQUIRE_GPIOLIB | 1006 | select ARCH_REQUIRE_GPIOLIB |
| 1007 | select USE_OF | ||
| 1008 | select COMMON_CLK | ||
| 1009 | select HAVE_CLK | ||
| 1010 | select CLKDEV_LOOKUP | ||
| 1008 | help | 1011 | help |
| 1009 | Support for VIA/WonderMedia VT8500/WM85xx System-on-Chip. | 1012 | Support for VIA/WonderMedia VT8500/WM85xx System-on-Chip. |
| 1010 | 1013 | ||
| @@ -1129,8 +1132,6 @@ source "arch/arm/mach-versatile/Kconfig" | |||
| 1129 | source "arch/arm/mach-vexpress/Kconfig" | 1132 | source "arch/arm/mach-vexpress/Kconfig" |
| 1130 | source "arch/arm/plat-versatile/Kconfig" | 1133 | source "arch/arm/plat-versatile/Kconfig" |
| 1131 | 1134 | ||
| 1132 | source "arch/arm/mach-vt8500/Kconfig" | ||
| 1133 | |||
| 1134 | source "arch/arm/mach-w90x900/Kconfig" | 1135 | source "arch/arm/mach-w90x900/Kconfig" |
| 1135 | 1136 | ||
| 1136 | # Definitions to make life easier | 1137 | # Definitions to make life easier |
| @@ -1623,6 +1624,7 @@ config ARCH_NR_GPIO | |||
| 1623 | default 355 if ARCH_U8500 | 1624 | default 355 if ARCH_U8500 |
| 1624 | default 264 if MACH_H4700 | 1625 | default 264 if MACH_H4700 |
| 1625 | default 512 if SOC_OMAP5 | 1626 | default 512 if SOC_OMAP5 |
| 1627 | default 288 if ARCH_VT8500 | ||
| 1626 | default 0 | 1628 | default 0 |
| 1627 | help | 1629 | help |
| 1628 | Maximum number of GPIOs in the system. | 1630 | Maximum number of GPIOs in the system. |
diff --git a/arch/arm/boot/dts/db8500.dtsi b/arch/arm/boot/dts/dbx5x0.dtsi index 3180a9c588b9..748ba7aa746c 100644 --- a/arch/arm/boot/dts/db8500.dtsi +++ b/arch/arm/boot/dts/dbx5x0.dtsi | |||
| @@ -194,6 +194,8 @@ | |||
| 194 | interrupts = <0 47 0x4>; | 194 | interrupts = <0 47 0x4>; |
| 195 | #address-cells = <1>; | 195 | #address-cells = <1>; |
| 196 | #size-cells = <1>; | 196 | #size-cells = <1>; |
| 197 | interrupt-controller; | ||
| 198 | #interrupt-cells = <2>; | ||
| 197 | ranges; | 199 | ranges; |
| 198 | 200 | ||
| 199 | prcmu-timer-4@80157450 { | 201 | prcmu-timer-4@80157450 { |
| @@ -330,6 +332,7 @@ | |||
| 330 | ab8500@5 { | 332 | ab8500@5 { |
| 331 | compatible = "stericsson,ab8500"; | 333 | compatible = "stericsson,ab8500"; |
| 332 | reg = <5>; /* mailbox 5 is i2c */ | 334 | reg = <5>; /* mailbox 5 is i2c */ |
| 335 | interrupt-parent = <&intc>; | ||
| 333 | interrupts = <0 40 0x4>; | 336 | interrupts = <0 40 0x4>; |
| 334 | interrupt-controller; | 337 | interrupt-controller; |
| 335 | #interrupt-cells = <2>; | 338 | #interrupt-cells = <2>; |
| @@ -371,7 +374,7 @@ | |||
| 371 | }; | 374 | }; |
| 372 | 375 | ||
| 373 | ab8500-ponkey { | 376 | ab8500-ponkey { |
| 374 | compatible = "stericsson,ab8500-ponkey"; | 377 | compatible = "stericsson,ab8500-poweron-key"; |
| 375 | interrupts = <6 0x4 | 378 | interrupts = <6 0x4 |
| 376 | 7 0x4>; | 379 | 7 0x4>; |
| 377 | interrupt-names = "ONKEY_DBF", "ONKEY_DBR"; | 380 | interrupt-names = "ONKEY_DBF", "ONKEY_DBR"; |
| @@ -389,6 +392,12 @@ | |||
| 389 | compatible = "stericsson,ab8500-debug"; | 392 | compatible = "stericsson,ab8500-debug"; |
| 390 | }; | 393 | }; |
| 391 | 394 | ||
| 395 | codec: ab8500-codec { | ||
| 396 | compatible = "stericsson,ab8500-codec"; | ||
| 397 | |||
| 398 | stericsson,earpeice-cmv = <950>; /* Units in mV. */ | ||
| 399 | }; | ||
| 400 | |||
| 392 | ab8500-regulators { | 401 | ab8500-regulators { |
| 393 | compatible = "stericsson,ab8500-regulator"; | 402 | compatible = "stericsson,ab8500-regulator"; |
| 394 | 403 | ||
| @@ -471,48 +480,63 @@ | |||
| 471 | }; | 480 | }; |
| 472 | 481 | ||
| 473 | i2c@80004000 { | 482 | i2c@80004000 { |
| 474 | compatible = "stericsson,db8500-i2c", "st,nomadik-i2c"; | 483 | compatible = "stericsson,db8500-i2c", "st,nomadik-i2c", "arm,primecell"; |
| 475 | reg = <0x80004000 0x1000>; | 484 | reg = <0x80004000 0x1000>; |
| 476 | interrupts = <0 21 0x4>; | 485 | interrupts = <0 21 0x4>; |
| 477 | #address-cells = <1>; | 486 | #address-cells = <1>; |
| 478 | #size-cells = <0>; | 487 | #size-cells = <0>; |
| 488 | v-i2c-supply = <&db8500_vape_reg>; | ||
| 489 | |||
| 490 | clock-frequency = <400000>; | ||
| 479 | }; | 491 | }; |
| 480 | 492 | ||
| 481 | i2c@80122000 { | 493 | i2c@80122000 { |
| 482 | compatible = "stericsson,db8500-i2c", "st,nomadik-i2c"; | 494 | compatible = "stericsson,db8500-i2c", "st,nomadik-i2c", "arm,primecell"; |
| 483 | reg = <0x80122000 0x1000>; | 495 | reg = <0x80122000 0x1000>; |
| 484 | interrupts = <0 22 0x4>; | 496 | interrupts = <0 22 0x4>; |
| 485 | #address-cells = <1>; | 497 | #address-cells = <1>; |
| 486 | #size-cells = <0>; | 498 | #size-cells = <0>; |
| 499 | v-i2c-supply = <&db8500_vape_reg>; | ||
| 500 | |||
| 501 | clock-frequency = <400000>; | ||
| 487 | }; | 502 | }; |
| 488 | 503 | ||
| 489 | i2c@80128000 { | 504 | i2c@80128000 { |
| 490 | compatible = "stericsson,db8500-i2c", "st,nomadik-i2c"; | 505 | compatible = "stericsson,db8500-i2c", "st,nomadik-i2c", "arm,primecell"; |
| 491 | reg = <0x80128000 0x1000>; | 506 | reg = <0x80128000 0x1000>; |
| 492 | interrupts = <0 55 0x4>; | 507 | interrupts = <0 55 0x4>; |
| 493 | #address-cells = <1>; | 508 | #address-cells = <1>; |
| 494 | #size-cells = <0>; | 509 | #size-cells = <0>; |
| 510 | v-i2c-supply = <&db8500_vape_reg>; | ||
| 511 | |||
| 512 | clock-frequency = <400000>; | ||
| 495 | }; | 513 | }; |
| 496 | 514 | ||
| 497 | i2c@80110000 { | 515 | i2c@80110000 { |
| 498 | compatible = "stericsson,db8500-i2c", "st,nomadik-i2c"; | 516 | compatible = "stericsson,db8500-i2c", "st,nomadik-i2c", "arm,primecell"; |
| 499 | reg = <0x80110000 0x1000>; | 517 | reg = <0x80110000 0x1000>; |
| 500 | interrupts = <0 12 0x4>; | 518 | interrupts = <0 12 0x4>; |
| 501 | #address-cells = <1>; | 519 | #address-cells = <1>; |
| 502 | #size-cells = <0>; | 520 | #size-cells = <0>; |
| 521 | v-i2c-supply = <&db8500_vape_reg>; | ||
| 522 | |||
| 523 | clock-frequency = <400000>; | ||
| 503 | }; | 524 | }; |
| 504 | 525 | ||
| 505 | i2c@8012a000 { | 526 | i2c@8012a000 { |
| 506 | compatible = "stericsson,db8500-i2c", "st,nomadik-i2c"; | 527 | compatible = "stericsson,db8500-i2c", "st,nomadik-i2c", "arm,primecell"; |
| 507 | reg = <0x8012a000 0x1000>; | 528 | reg = <0x8012a000 0x1000>; |
| 508 | interrupts = <0 51 0x4>; | 529 | interrupts = <0 51 0x4>; |
| 509 | #address-cells = <1>; | 530 | #address-cells = <1>; |
| 510 | #size-cells = <0>; | 531 | #size-cells = <0>; |
| 532 | v-i2c-supply = <&db8500_vape_reg>; | ||
| 533 | |||
| 534 | clock-frequency = <400000>; | ||
| 511 | }; | 535 | }; |
| 512 | 536 | ||
| 513 | ssp@80002000 { | 537 | ssp@80002000 { |
| 514 | compatible = "arm,pl022", "arm,primecell"; | 538 | compatible = "arm,pl022", "arm,primecell"; |
| 515 | reg = <80002000 0x1000>; | 539 | reg = <0x80002000 0x1000>; |
| 516 | interrupts = <0 14 0x4>; | 540 | interrupts = <0 14 0x4>; |
| 517 | #address-cells = <1>; | 541 | #address-cells = <1>; |
| 518 | #size-cells = <0>; | 542 | #size-cells = <0>; |
| @@ -580,6 +604,39 @@ | |||
| 580 | status = "disabled"; | 604 | status = "disabled"; |
| 581 | }; | 605 | }; |
| 582 | 606 | ||
| 607 | msp0: msp@80123000 { | ||
| 608 | compatible = "stericsson,ux500-msp-i2s"; | ||
| 609 | reg = <0x80123000 0x1000>; | ||
| 610 | interrupts = <0 31 0x4>; | ||
| 611 | v-ape-supply = <&db8500_vape_reg>; | ||
| 612 | status = "disabled"; | ||
| 613 | }; | ||
| 614 | |||
| 615 | msp1: msp@80124000 { | ||
| 616 | compatible = "stericsson,ux500-msp-i2s"; | ||
| 617 | reg = <0x80124000 0x1000>; | ||
| 618 | interrupts = <0 62 0x4>; | ||
| 619 | v-ape-supply = <&db8500_vape_reg>; | ||
| 620 | status = "disabled"; | ||
| 621 | }; | ||
| 622 | |||
| 623 | // HDMI sound | ||
| 624 | msp2: msp@80117000 { | ||
| 625 | compatible = "stericsson,ux500-msp-i2s"; | ||
| 626 | reg = <0x80117000 0x1000>; | ||
| 627 | interrupts = <0 98 0x4>; | ||
| 628 | v-ape-supply = <&db8500_vape_reg>; | ||
| 629 | status = "disabled"; | ||
| 630 | }; | ||
| 631 | |||
| 632 | msp3: msp@80125000 { | ||
| 633 | compatible = "stericsson,ux500-msp-i2s"; | ||
| 634 | reg = <0x80125000 0x1000>; | ||
| 635 | interrupts = <0 62 0x4>; | ||
| 636 | v-ape-supply = <&db8500_vape_reg>; | ||
| 637 | status = "disabled"; | ||
| 638 | }; | ||
| 639 | |||
| 583 | external-bus@50000000 { | 640 | external-bus@50000000 { |
| 584 | compatible = "simple-bus"; | 641 | compatible = "simple-bus"; |
| 585 | reg = <0x50000000 0x4000000>; | 642 | reg = <0x50000000 0x4000000>; |
diff --git a/arch/arm/boot/dts/ea3250.dts b/arch/arm/boot/dts/ea3250.dts index d79b28d9c963..a4ba31b23c88 100644 --- a/arch/arm/boot/dts/ea3250.dts +++ b/arch/arm/boot/dts/ea3250.dts | |||
| @@ -166,9 +166,116 @@ | |||
| 166 | #size-cells = <0>; | 166 | #size-cells = <0>; |
| 167 | autorepeat; | 167 | autorepeat; |
| 168 | button@21 { | 168 | button@21 { |
| 169 | label = "GPIO Key UP"; | 169 | label = "Interrupt Key"; |
| 170 | linux,code = <103>; | 170 | linux,code = <103>; |
| 171 | gpios = <&gpio 4 1 0>; /* GPI_P3 1 */ | 171 | gpios = <&gpio 4 1 0>; /* GPI_P3 1 */ |
| 172 | }; | 172 | }; |
| 173 | key1 { | ||
| 174 | label = "KEY1"; | ||
| 175 | linux,code = <1>; | ||
| 176 | gpios = <&pca9532 0 0>; | ||
| 177 | }; | ||
| 178 | key2 { | ||
| 179 | label = "KEY2"; | ||
| 180 | linux,code = <2>; | ||
| 181 | gpios = <&pca9532 1 0>; | ||
| 182 | }; | ||
| 183 | key3 { | ||
| 184 | label = "KEY3"; | ||
| 185 | linux,code = <3>; | ||
| 186 | gpios = <&pca9532 2 0>; | ||
| 187 | }; | ||
| 188 | key4 { | ||
| 189 | label = "KEY4"; | ||
| 190 | linux,code = <4>; | ||
| 191 | gpios = <&pca9532 3 0>; | ||
| 192 | }; | ||
| 193 | joy0 { | ||
| 194 | label = "Joystick Key 0"; | ||
| 195 | linux,code = <10>; | ||
| 196 | gpios = <&gpio 2 0 0>; /* P2.0 */ | ||
| 197 | }; | ||
| 198 | joy1 { | ||
| 199 | label = "Joystick Key 1"; | ||
| 200 | linux,code = <11>; | ||
| 201 | gpios = <&gpio 2 1 0>; /* P2.1 */ | ||
| 202 | }; | ||
| 203 | joy2 { | ||
| 204 | label = "Joystick Key 2"; | ||
| 205 | linux,code = <12>; | ||
| 206 | gpios = <&gpio 2 2 0>; /* P2.2 */ | ||
| 207 | }; | ||
| 208 | joy3 { | ||
| 209 | label = "Joystick Key 3"; | ||
| 210 | linux,code = <13>; | ||
| 211 | gpios = <&gpio 2 3 0>; /* P2.3 */ | ||
| 212 | }; | ||
| 213 | joy4 { | ||
| 214 | label = "Joystick Key 4"; | ||
| 215 | linux,code = <14>; | ||
| 216 | gpios = <&gpio 2 4 0>; /* P2.4 */ | ||
| 217 | }; | ||
| 218 | }; | ||
| 219 | |||
| 220 | leds { | ||
| 221 | compatible = "gpio-leds"; | ||
| 222 | |||
| 223 | /* LEDs on OEM Board */ | ||
| 224 | |||
| 225 | led1 { | ||
| 226 | gpios = <&gpio 5 14 1>; /* GPO_P3 14, GPIO 93, active low */ | ||
| 227 | linux,default-trigger = "timer"; | ||
| 228 | default-state = "off"; | ||
| 229 | }; | ||
| 230 | |||
| 231 | led2 { | ||
| 232 | gpios = <&gpio 2 10 1>; /* P2.10, active low */ | ||
| 233 | default-state = "off"; | ||
| 234 | }; | ||
| 235 | |||
| 236 | led3 { | ||
| 237 | gpios = <&gpio 2 11 1>; /* P2.11, active low */ | ||
| 238 | default-state = "off"; | ||
| 239 | }; | ||
| 240 | |||
| 241 | led4 { | ||
| 242 | gpios = <&gpio 2 12 1>; /* P2.12, active low */ | ||
| 243 | default-state = "off"; | ||
| 244 | }; | ||
| 245 | |||
| 246 | /* LEDs on Base Board */ | ||
| 247 | |||
| 248 | lede1 { | ||
| 249 | gpios = <&pca9532 8 0>; | ||
| 250 | default-state = "off"; | ||
| 251 | }; | ||
| 252 | lede2 { | ||
| 253 | gpios = <&pca9532 9 0>; | ||
| 254 | default-state = "off"; | ||
| 255 | }; | ||
| 256 | lede3 { | ||
| 257 | gpios = <&pca9532 10 0>; | ||
| 258 | default-state = "off"; | ||
| 259 | }; | ||
| 260 | lede4 { | ||
| 261 | gpios = <&pca9532 11 0>; | ||
| 262 | default-state = "off"; | ||
| 263 | }; | ||
| 264 | lede5 { | ||
| 265 | gpios = <&pca9532 12 0>; | ||
| 266 | default-state = "off"; | ||
| 267 | }; | ||
| 268 | lede6 { | ||
| 269 | gpios = <&pca9532 13 0>; | ||
| 270 | default-state = "off"; | ||
| 271 | }; | ||
| 272 | lede7 { | ||
| 273 | gpios = <&pca9532 14 0>; | ||
| 274 | default-state = "off"; | ||
| 275 | }; | ||
| 276 | lede8 { | ||
| 277 | gpios = <&pca9532 15 0>; | ||
| 278 | default-state = "off"; | ||
| 279 | }; | ||
| 173 | }; | 280 | }; |
| 174 | }; | 281 | }; |
diff --git a/arch/arm/boot/dts/hrefv60plus.dts b/arch/arm/boot/dts/hrefv60plus.dts new file mode 100644 index 000000000000..2131d77dc9c9 --- /dev/null +++ b/arch/arm/boot/dts/hrefv60plus.dts | |||
| @@ -0,0 +1,95 @@ | |||
| 1 | /* | ||
| 2 | * Copyright 2012 ST-Ericsson AB | ||
| 3 | * | ||
| 4 | * The code contained herein is licensed under the GNU General Public | ||
| 5 | * License. You may obtain a copy of the GNU General Public License | ||
| 6 | * Version 2 or later at the following locations: | ||
| 7 | * | ||
| 8 | * http://www.opensource.org/licenses/gpl-license.html | ||
| 9 | * http://www.gnu.org/copyleft/gpl.html | ||
| 10 | */ | ||
| 11 | |||
| 12 | /dts-v1/; | ||
| 13 | /include/ "dbx5x0.dtsi" | ||
| 14 | |||
| 15 | / { | ||
| 16 | model = "ST-Ericsson HREF platform with Device Tree"; | ||
| 17 | compatible = "st-ericsson,hrefv60+"; | ||
| 18 | |||
| 19 | memory { | ||
| 20 | reg = <0x00000000 0x20000000>; | ||
| 21 | }; | ||
| 22 | |||
| 23 | soc-u9500 { | ||
| 24 | uart@80120000 { | ||
| 25 | status = "okay"; | ||
| 26 | }; | ||
| 27 | |||
| 28 | uart@80121000 { | ||
| 29 | status = "okay"; | ||
| 30 | }; | ||
| 31 | |||
| 32 | uart@80007000 { | ||
| 33 | status = "okay"; | ||
| 34 | }; | ||
| 35 | |||
| 36 | i2c@80004000 { | ||
| 37 | tc3589x@42 { | ||
| 38 | compatible = "tc3589x"; | ||
| 39 | reg = <0x42>; | ||
| 40 | interrupt-parent = <&gpio6>; | ||
| 41 | interrupts = <25 0x1>; | ||
| 42 | |||
| 43 | interrupt-controller; | ||
| 44 | #interrupt-cells = <2>; | ||
| 45 | |||
| 46 | tc3589x_gpio: tc3589x_gpio { | ||
| 47 | compatible = "tc3589x-gpio"; | ||
| 48 | interrupts = <0 0x1>; | ||
| 49 | |||
| 50 | interrupt-controller; | ||
| 51 | #interrupt-cells = <2>; | ||
| 52 | gpio-controller; | ||
| 53 | #gpio-cells = <2>; | ||
| 54 | }; | ||
| 55 | }; | ||
| 56 | |||
| 57 | tps61052@33 { | ||
| 58 | compatible = "tps61052"; | ||
| 59 | reg = <0x33>; | ||
| 60 | }; | ||
| 61 | }; | ||
| 62 | |||
| 63 | i2c@80128000 { | ||
| 64 | lp5521@0x33 { | ||
| 65 | compatible = "lp5521"; | ||
| 66 | reg = <0x33>; | ||
| 67 | }; | ||
| 68 | |||
| 69 | lp5521@0x34 { | ||
| 70 | compatible = "lp5521"; | ||
| 71 | reg = <0x34>; | ||
| 72 | }; | ||
| 73 | |||
| 74 | bh1780@0x29 { | ||
| 75 | compatible = "rohm,bh1780gli"; | ||
| 76 | reg = <0x33>; | ||
| 77 | }; | ||
| 78 | }; | ||
| 79 | |||
| 80 | sound { | ||
| 81 | compatible = "stericsson,snd-soc-mop500"; | ||
| 82 | |||
| 83 | stericsson,cpu-dai = <&msp1 &msp3>; | ||
| 84 | stericsson,audio-codec = <&codec>; | ||
| 85 | }; | ||
| 86 | |||
| 87 | msp1: msp@80124000 { | ||
| 88 | status = "okay"; | ||
| 89 | }; | ||
| 90 | |||
| 91 | msp3: msp@80125000 { | ||
| 92 | status = "okay"; | ||
| 93 | }; | ||
| 94 | }; | ||
| 95 | }; | ||
diff --git a/arch/arm/boot/dts/imx23-evk.dts b/arch/arm/boot/dts/imx23-evk.dts index e3486f486b40..035c13f9d3c0 100644 --- a/arch/arm/boot/dts/imx23-evk.dts +++ b/arch/arm/boot/dts/imx23-evk.dts | |||
| @@ -42,12 +42,13 @@ | |||
| 42 | pinctrl-names = "default"; | 42 | pinctrl-names = "default"; |
| 43 | pinctrl-0 = <&hog_pins_a>; | 43 | pinctrl-0 = <&hog_pins_a>; |
| 44 | 44 | ||
| 45 | hog_pins_a: hog-gpios@0 { | 45 | hog_pins_a: hog@0 { |
| 46 | reg = <0>; | 46 | reg = <0>; |
| 47 | fsl,pinmux-ids = < | 47 | fsl,pinmux-ids = < |
| 48 | 0x1123 /* MX23_PAD_LCD_RESET__GPIO_1_18 */ | 48 | 0x1123 /* MX23_PAD_LCD_RESET__GPIO_1_18 */ |
| 49 | 0x11d3 /* MX23_PAD_PWM3__GPIO_1_29 */ | 49 | 0x11d3 /* MX23_PAD_PWM3__GPIO_1_29 */ |
| 50 | 0x11e3 /* MX23_PAD_PWM4__GPIO_1_30 */ | 50 | 0x11e3 /* MX23_PAD_PWM4__GPIO_1_30 */ |
| 51 | 0x2010 /* MX23_PAD_SSP1_DETECT__SSP1_DETECT */ | ||
| 51 | >; | 52 | >; |
| 52 | fsl,drive-strength = <0>; | 53 | fsl,drive-strength = <0>; |
| 53 | fsl,voltage = <1>; | 54 | fsl,voltage = <1>; |
diff --git a/arch/arm/boot/dts/imx23-olinuxino.dts b/arch/arm/boot/dts/imx23-olinuxino.dts index 20912b1d8893..384d8b66f337 100644 --- a/arch/arm/boot/dts/imx23-olinuxino.dts +++ b/arch/arm/boot/dts/imx23-olinuxino.dts | |||
| @@ -31,6 +31,22 @@ | |||
| 31 | bus-width = <4>; | 31 | bus-width = <4>; |
| 32 | status = "okay"; | 32 | status = "okay"; |
| 33 | }; | 33 | }; |
| 34 | |||
| 35 | pinctrl@80018000 { | ||
| 36 | pinctrl-names = "default"; | ||
| 37 | pinctrl-0 = <&hog_pins_a>; | ||
| 38 | |||
| 39 | hog_pins_a: hog@0 { | ||
| 40 | reg = <0>; | ||
| 41 | fsl,pinmux-ids = < | ||
| 42 | 0x2013 /* MX23_PAD_SSP1_DETECT__GPIO_2_1 */ | ||
| 43 | 0x0113 /* MX23_PAD_GPMI_ALE__GPIO_0_17 */ | ||
| 44 | >; | ||
| 45 | fsl,drive-strength = <0>; | ||
| 46 | fsl,voltage = <1>; | ||
| 47 | fsl,pull-up = <0>; | ||
| 48 | }; | ||
| 49 | }; | ||
| 34 | }; | 50 | }; |
| 35 | 51 | ||
| 36 | apbx@80040000 { | 52 | apbx@80040000 { |
| @@ -39,6 +55,47 @@ | |||
| 39 | pinctrl-0 = <&duart_pins_a>; | 55 | pinctrl-0 = <&duart_pins_a>; |
| 40 | status = "okay"; | 56 | status = "okay"; |
| 41 | }; | 57 | }; |
| 58 | |||
| 59 | auart0: serial@8006c000 { | ||
| 60 | pinctrl-names = "default"; | ||
| 61 | pinctrl-0 = <&auart0_2pins_a>; | ||
| 62 | status = "okay"; | ||
| 63 | }; | ||
| 64 | |||
| 65 | usbphy0: usbphy@8007c000 { | ||
| 66 | status = "okay"; | ||
| 67 | }; | ||
| 68 | }; | ||
| 69 | }; | ||
| 70 | |||
| 71 | ahb@80080000 { | ||
| 72 | usb0: usb@80080000 { | ||
| 73 | vbus-supply = <®_usb0_vbus>; | ||
| 74 | status = "okay"; | ||
| 75 | }; | ||
| 76 | }; | ||
| 77 | |||
| 78 | regulators { | ||
| 79 | compatible = "simple-bus"; | ||
| 80 | |||
| 81 | reg_usb0_vbus: usb0_vbus { | ||
| 82 | compatible = "regulator-fixed"; | ||
| 83 | regulator-name = "usb0_vbus"; | ||
| 84 | regulator-min-microvolt = <5000000>; | ||
| 85 | regulator-max-microvolt = <5000000>; | ||
| 86 | enable-active-high; | ||
| 87 | startup-delay-us = <300>; /* LAN9215 requires a POR of 200us minimum */ | ||
| 88 | gpio = <&gpio0 17 0>; | ||
| 89 | }; | ||
| 90 | }; | ||
| 91 | |||
| 92 | leds { | ||
| 93 | compatible = "gpio-leds"; | ||
| 94 | |||
| 95 | user { | ||
| 96 | label = "green"; | ||
| 97 | gpios = <&gpio2 1 0>; | ||
| 98 | linux,default-trigger = "default-on"; | ||
| 42 | }; | 99 | }; |
| 43 | }; | 100 | }; |
| 44 | }; | 101 | }; |
diff --git a/arch/arm/boot/dts/imx23-stmp378x_devb.dts b/arch/arm/boot/dts/imx23-stmp378x_devb.dts index 757a327ff3e8..85c3864b6a56 100644 --- a/arch/arm/boot/dts/imx23-stmp378x_devb.dts +++ b/arch/arm/boot/dts/imx23-stmp378x_devb.dts | |||
| @@ -36,7 +36,7 @@ | |||
| 36 | pinctrl-names = "default"; | 36 | pinctrl-names = "default"; |
| 37 | pinctrl-0 = <&hog_pins_a>; | 37 | pinctrl-0 = <&hog_pins_a>; |
| 38 | 38 | ||
| 39 | hog_pins_a: hog-gpios@0 { | 39 | hog_pins_a: hog@0 { |
| 40 | reg = <0>; | 40 | reg = <0>; |
| 41 | fsl,pinmux-ids = < | 41 | fsl,pinmux-ids = < |
| 42 | 0x11d3 /* MX23_PAD_PWM3__GPIO_1_29 */ | 42 | 0x11d3 /* MX23_PAD_PWM3__GPIO_1_29 */ |
diff --git a/arch/arm/boot/dts/imx23.dtsi b/arch/arm/boot/dts/imx23.dtsi index e6138310e5ce..3f3b6fc229b3 100644 --- a/arch/arm/boot/dts/imx23.dtsi +++ b/arch/arm/boot/dts/imx23.dtsi | |||
| @@ -52,6 +52,7 @@ | |||
| 52 | dma-apbh@80004000 { | 52 | dma-apbh@80004000 { |
| 53 | compatible = "fsl,imx23-dma-apbh"; | 53 | compatible = "fsl,imx23-dma-apbh"; |
| 54 | reg = <0x80004000 0x2000>; | 54 | reg = <0x80004000 0x2000>; |
| 55 | clocks = <&clks 15>; | ||
| 55 | }; | 56 | }; |
| 56 | 57 | ||
| 57 | ecc@80008000 { | 58 | ecc@80008000 { |
| @@ -67,6 +68,7 @@ | |||
| 67 | reg-names = "gpmi-nand", "bch"; | 68 | reg-names = "gpmi-nand", "bch"; |
| 68 | interrupts = <13>, <56>; | 69 | interrupts = <13>, <56>; |
| 69 | interrupt-names = "gpmi-dma", "bch"; | 70 | interrupt-names = "gpmi-dma", "bch"; |
| 71 | clocks = <&clks 34>; | ||
| 70 | fsl,gpmi-dma-channel = <4>; | 72 | fsl,gpmi-dma-channel = <4>; |
| 71 | status = "disabled"; | 73 | status = "disabled"; |
| 72 | }; | 74 | }; |
| @@ -74,6 +76,7 @@ | |||
| 74 | ssp0: ssp@80010000 { | 76 | ssp0: ssp@80010000 { |
| 75 | reg = <0x80010000 0x2000>; | 77 | reg = <0x80010000 0x2000>; |
| 76 | interrupts = <15 14>; | 78 | interrupts = <15 14>; |
| 79 | clocks = <&clks 33>; | ||
| 77 | fsl,ssp-dma-channel = <1>; | 80 | fsl,ssp-dma-channel = <1>; |
| 78 | status = "disabled"; | 81 | status = "disabled"; |
| 79 | }; | 82 | }; |
| @@ -140,6 +143,17 @@ | |||
| 140 | fsl,pull-up = <0>; | 143 | fsl,pull-up = <0>; |
| 141 | }; | 144 | }; |
| 142 | 145 | ||
| 146 | auart0_2pins_a: auart0-2pins@0 { | ||
| 147 | reg = <0>; | ||
| 148 | fsl,pinmux-ids = < | ||
| 149 | 0x01e2 /* MX23_PAD_I2C_SCL__AUART1_TX */ | ||
| 150 | 0x01f2 /* MX23_PAD_I2C_SDA__AUART1_RX */ | ||
| 151 | >; | ||
| 152 | fsl,drive-strength = <0>; | ||
| 153 | fsl,voltage = <1>; | ||
| 154 | fsl,pull-up = <0>; | ||
| 155 | }; | ||
| 156 | |||
| 143 | gpmi_pins_a: gpmi-nand@0 { | 157 | gpmi_pins_a: gpmi-nand@0 { |
| 144 | reg = <0>; | 158 | reg = <0>; |
| 145 | fsl,pinmux-ids = < | 159 | fsl,pinmux-ids = < |
| @@ -183,7 +197,6 @@ | |||
| 183 | 0x2040 /* MX23_PAD_SSP1_DATA2__SSP1_DATA2 */ | 197 | 0x2040 /* MX23_PAD_SSP1_DATA2__SSP1_DATA2 */ |
| 184 | 0x2050 /* MX23_PAD_SSP1_DATA3__SSP1_DATA3 */ | 198 | 0x2050 /* MX23_PAD_SSP1_DATA3__SSP1_DATA3 */ |
| 185 | 0x2000 /* MX23_PAD_SSP1_CMD__SSP1_CMD */ | 199 | 0x2000 /* MX23_PAD_SSP1_CMD__SSP1_CMD */ |
| 186 | 0x2010 /* MX23_PAD_SSP1_DETECT__SSP1_DETECT */ | ||
| 187 | 0x2060 /* MX23_PAD_SSP1_SCK__SSP1_SCK */ | 200 | 0x2060 /* MX23_PAD_SSP1_SCK__SSP1_SCK */ |
| 188 | >; | 201 | >; |
| 189 | fsl,drive-strength = <1>; | 202 | fsl,drive-strength = <1>; |
| @@ -280,6 +293,7 @@ | |||
| 280 | dma-apbx@80024000 { | 293 | dma-apbx@80024000 { |
| 281 | compatible = "fsl,imx23-dma-apbx"; | 294 | compatible = "fsl,imx23-dma-apbx"; |
| 282 | reg = <0x80024000 0x2000>; | 295 | reg = <0x80024000 0x2000>; |
| 296 | clocks = <&clks 16>; | ||
| 283 | }; | 297 | }; |
| 284 | 298 | ||
| 285 | dcp@80028000 { | 299 | dcp@80028000 { |
| @@ -306,12 +320,14 @@ | |||
| 306 | compatible = "fsl,imx23-lcdif"; | 320 | compatible = "fsl,imx23-lcdif"; |
| 307 | reg = <0x80030000 2000>; | 321 | reg = <0x80030000 2000>; |
| 308 | interrupts = <46 45>; | 322 | interrupts = <46 45>; |
| 323 | clocks = <&clks 38>; | ||
| 309 | status = "disabled"; | 324 | status = "disabled"; |
| 310 | }; | 325 | }; |
| 311 | 326 | ||
| 312 | ssp1: ssp@80034000 { | 327 | ssp1: ssp@80034000 { |
| 313 | reg = <0x80034000 0x2000>; | 328 | reg = <0x80034000 0x2000>; |
| 314 | interrupts = <2 20>; | 329 | interrupts = <2 20>; |
| 330 | clocks = <&clks 33>; | ||
| 315 | fsl,ssp-dma-channel = <2>; | 331 | fsl,ssp-dma-channel = <2>; |
| 316 | status = "disabled"; | 332 | status = "disabled"; |
| 317 | }; | 333 | }; |
| @@ -329,9 +345,10 @@ | |||
| 329 | reg = <0x80040000 0x40000>; | 345 | reg = <0x80040000 0x40000>; |
| 330 | ranges; | 346 | ranges; |
| 331 | 347 | ||
| 332 | clkctl@80040000 { | 348 | clks: clkctrl@80040000 { |
| 349 | compatible = "fsl,imx23-clkctrl"; | ||
| 333 | reg = <0x80040000 0x2000>; | 350 | reg = <0x80040000 0x2000>; |
| 334 | status = "disabled"; | 351 | #clock-cells = <1>; |
| 335 | }; | 352 | }; |
| 336 | 353 | ||
| 337 | saif0: saif@80042000 { | 354 | saif0: saif@80042000 { |
| @@ -383,6 +400,7 @@ | |||
| 383 | pwm: pwm@80064000 { | 400 | pwm: pwm@80064000 { |
| 384 | compatible = "fsl,imx23-pwm"; | 401 | compatible = "fsl,imx23-pwm"; |
| 385 | reg = <0x80064000 0x2000>; | 402 | reg = <0x80064000 0x2000>; |
| 403 | clocks = <&clks 30>; | ||
| 386 | #pwm-cells = <2>; | 404 | #pwm-cells = <2>; |
| 387 | fsl,pwm-number = <5>; | 405 | fsl,pwm-number = <5>; |
| 388 | status = "disabled"; | 406 | status = "disabled"; |
| @@ -397,6 +415,7 @@ | |||
| 397 | compatible = "fsl,imx23-auart"; | 415 | compatible = "fsl,imx23-auart"; |
| 398 | reg = <0x8006c000 0x2000>; | 416 | reg = <0x8006c000 0x2000>; |
| 399 | interrupts = <24 25 23>; | 417 | interrupts = <24 25 23>; |
| 418 | clocks = <&clks 32>; | ||
| 400 | status = "disabled"; | 419 | status = "disabled"; |
| 401 | }; | 420 | }; |
| 402 | 421 | ||
| @@ -404,6 +423,7 @@ | |||
| 404 | compatible = "fsl,imx23-auart"; | 423 | compatible = "fsl,imx23-auart"; |
| 405 | reg = <0x8006e000 0x2000>; | 424 | reg = <0x8006e000 0x2000>; |
| 406 | interrupts = <59 60 58>; | 425 | interrupts = <59 60 58>; |
| 426 | clocks = <&clks 32>; | ||
| 407 | status = "disabled"; | 427 | status = "disabled"; |
| 408 | }; | 428 | }; |
| 409 | 429 | ||
| @@ -411,11 +431,15 @@ | |||
| 411 | compatible = "arm,pl011", "arm,primecell"; | 431 | compatible = "arm,pl011", "arm,primecell"; |
| 412 | reg = <0x80070000 0x2000>; | 432 | reg = <0x80070000 0x2000>; |
| 413 | interrupts = <0>; | 433 | interrupts = <0>; |
| 434 | clocks = <&clks 32>, <&clks 16>; | ||
| 435 | clock-names = "uart", "apb_pclk"; | ||
| 414 | status = "disabled"; | 436 | status = "disabled"; |
| 415 | }; | 437 | }; |
| 416 | 438 | ||
| 417 | usbphy@8007c000 { | 439 | usbphy0: usbphy@8007c000 { |
| 440 | compatible = "fsl,imx23-usbphy"; | ||
| 418 | reg = <0x8007c000 0x2000>; | 441 | reg = <0x8007c000 0x2000>; |
| 442 | clocks = <&clks 41>; | ||
| 419 | status = "disabled"; | 443 | status = "disabled"; |
| 420 | }; | 444 | }; |
| 421 | }; | 445 | }; |
| @@ -428,8 +452,12 @@ | |||
| 428 | reg = <0x80080000 0x80000>; | 452 | reg = <0x80080000 0x80000>; |
| 429 | ranges; | 453 | ranges; |
| 430 | 454 | ||
| 431 | usbctrl@80080000 { | 455 | usb0: usb@80080000 { |
| 456 | compatible = "fsl,imx23-usb", "fsl,imx27-usb"; | ||
| 432 | reg = <0x80080000 0x40000>; | 457 | reg = <0x80080000 0x40000>; |
| 458 | interrupts = <11>; | ||
| 459 | fsl,usbphy = <&usbphy0>; | ||
| 460 | clocks = <&clks 40>; | ||
| 433 | status = "disabled"; | 461 | status = "disabled"; |
| 434 | }; | 462 | }; |
| 435 | }; | 463 | }; |
diff --git a/arch/arm/boot/dts/imx27-phytec-phycore.dts b/arch/arm/boot/dts/imx27-phytec-phycore.dts index 2b0ff60247a4..777caa33cd85 100644 --- a/arch/arm/boot/dts/imx27-phytec-phycore.dts +++ b/arch/arm/boot/dts/imx27-phytec-phycore.dts | |||
| @@ -23,10 +23,6 @@ | |||
| 23 | soc { | 23 | soc { |
| 24 | aipi@10000000 { /* aipi */ | 24 | aipi@10000000 { /* aipi */ |
| 25 | 25 | ||
| 26 | wdog@10002000 { | ||
| 27 | status = "okay"; | ||
| 28 | }; | ||
| 29 | |||
| 30 | serial@1000a000 { | 26 | serial@1000a000 { |
| 31 | fsl,uart-has-rtscts; | 27 | fsl,uart-has-rtscts; |
| 32 | status = "okay"; | 28 | status = "okay"; |
diff --git a/arch/arm/boot/dts/imx27.dtsi b/arch/arm/boot/dts/imx27.dtsi index 5303ab680a34..3e54f1498841 100644 --- a/arch/arm/boot/dts/imx27.dtsi +++ b/arch/arm/boot/dts/imx27.dtsi | |||
| @@ -62,7 +62,6 @@ | |||
| 62 | compatible = "fsl,imx27-wdt", "fsl,imx21-wdt"; | 62 | compatible = "fsl,imx27-wdt", "fsl,imx21-wdt"; |
| 63 | reg = <0x10002000 0x4000>; | 63 | reg = <0x10002000 0x4000>; |
| 64 | interrupts = <27>; | 64 | interrupts = <27>; |
| 65 | status = "disabled"; | ||
| 66 | }; | 65 | }; |
| 67 | 66 | ||
| 68 | uart1: serial@1000a000 { | 67 | uart1: serial@1000a000 { |
diff --git a/arch/arm/boot/dts/imx28-apx4devkit.dts b/arch/arm/boot/dts/imx28-apx4devkit.dts index b383417a558f..5171667a7763 100644 --- a/arch/arm/boot/dts/imx28-apx4devkit.dts +++ b/arch/arm/boot/dts/imx28-apx4devkit.dts | |||
| @@ -37,7 +37,7 @@ | |||
| 37 | pinctrl-names = "default"; | 37 | pinctrl-names = "default"; |
| 38 | pinctrl-0 = <&hog_pins_a>; | 38 | pinctrl-0 = <&hog_pins_a>; |
| 39 | 39 | ||
| 40 | hog_pins_a: hog-gpios@0 { | 40 | hog_pins_a: hog@0 { |
| 41 | reg = <0>; | 41 | reg = <0>; |
| 42 | fsl,pinmux-ids = < | 42 | fsl,pinmux-ids = < |
| 43 | 0x0113 /* MX28_PAD_GPMI_CE1N__GPIO_0_17 */ | 43 | 0x0113 /* MX28_PAD_GPMI_CE1N__GPIO_0_17 */ |
diff --git a/arch/arm/boot/dts/imx28-cfa10049.dts b/arch/arm/boot/dts/imx28-cfa10049.dts new file mode 100644 index 000000000000..05c892e931e3 --- /dev/null +++ b/arch/arm/boot/dts/imx28-cfa10049.dts | |||
| @@ -0,0 +1,99 @@ | |||
| 1 | /* | ||
| 2 | * Copyright 2012 Free Electrons | ||
| 3 | * | ||
| 4 | * The code contained herein is licensed under the GNU General Public | ||
| 5 | * License. You may obtain a copy of the GNU General Public License | ||
| 6 | * Version 2 or later at the following locations: | ||
| 7 | * | ||
| 8 | * http://www.opensource.org/licenses/gpl-license.html | ||
| 9 | * http://www.gnu.org/copyleft/gpl.html | ||
| 10 | */ | ||
| 11 | |||
| 12 | /* | ||
| 13 | * The CFA-10049 is an expansion board for the CFA-10036 module, thus we | ||
| 14 | * need to include the CFA-10036 DTS. | ||
| 15 | */ | ||
| 16 | /include/ "imx28-cfa10036.dts" | ||
| 17 | |||
| 18 | / { | ||
| 19 | model = "Crystalfontz CFA-10049 Board"; | ||
| 20 | compatible = "crystalfontz,cfa10049", "crystalfontz,cfa10036", "fsl,imx28"; | ||
| 21 | |||
| 22 | apb@80000000 { | ||
| 23 | apbh@80000000 { | ||
| 24 | pinctrl@80018000 { | ||
| 25 | spi3_pins_cfa10049: spi3-cfa10049@0 { | ||
| 26 | reg = <0>; | ||
| 27 | fsl,pinmux-ids = < | ||
| 28 | 0x0181 /* MX28_PAD_GPMI_RDN__SSP3_SCK */ | ||
| 29 | 0x01c1 /* MX28_PAD_GPMI_RESETN__SSP3_CMD */ | ||
| 30 | 0x0111 /* MX28_PAD_GPMI_CE1N__SSP3_D3 */ | ||
| 31 | 0x01a2 /* MX28_PAD_GPMI_ALE__SSP3_D4 */ | ||
| 32 | >; | ||
| 33 | fsl,drive-strength = <1>; | ||
| 34 | fsl,voltage = <1>; | ||
| 35 | fsl,pull-up = <1>; | ||
| 36 | }; | ||
| 37 | }; | ||
| 38 | |||
| 39 | ssp3: ssp@80016000 { | ||
| 40 | compatible = "fsl,imx28-spi"; | ||
| 41 | pinctrl-names = "default"; | ||
| 42 | pinctrl-0 = <&spi3_pins_cfa10049>; | ||
| 43 | status = "okay"; | ||
| 44 | |||
| 45 | gpio5: gpio5@0 { | ||
| 46 | compatible = "fairchild,74hc595"; | ||
| 47 | gpio-controller; | ||
| 48 | #gpio-cells = <2>; | ||
| 49 | reg = <0>; | ||
| 50 | registers-number = <2>; | ||
| 51 | spi-max-frequency = <100000>; | ||
| 52 | }; | ||
| 53 | |||
| 54 | gpio6: gpio6@1 { | ||
| 55 | compatible = "fairchild,74hc595"; | ||
| 56 | gpio-controller; | ||
| 57 | #gpio-cells = <2>; | ||
| 58 | reg = <1>; | ||
| 59 | registers-number = <4>; | ||
| 60 | spi-max-frequency = <100000>; | ||
| 61 | }; | ||
| 62 | |||
| 63 | }; | ||
| 64 | }; | ||
| 65 | |||
| 66 | apbx@80040000 { | ||
| 67 | i2c1: i2c@8005a000 { | ||
| 68 | pinctrl-names = "default"; | ||
| 69 | pinctrl-0 = <&i2c1_pins_a>; | ||
| 70 | status = "okay"; | ||
| 71 | }; | ||
| 72 | |||
| 73 | usbphy1: usbphy@8007e000 { | ||
| 74 | status = "okay"; | ||
| 75 | }; | ||
| 76 | }; | ||
| 77 | }; | ||
| 78 | |||
| 79 | ahb@80080000 { | ||
| 80 | usb1: usb@80090000 { | ||
| 81 | vbus-supply = <®_usb1_vbus>; | ||
| 82 | pinctrl-0 = <&usbphy1_pins_a>; | ||
| 83 | pinctrl-names = "default"; | ||
| 84 | status = "okay"; | ||
| 85 | }; | ||
| 86 | }; | ||
| 87 | |||
| 88 | regulators { | ||
| 89 | compatible = "simple-bus"; | ||
| 90 | |||
| 91 | reg_usb1_vbus: usb1_vbus { | ||
| 92 | compatible = "regulator-fixed"; | ||
| 93 | regulator-name = "usb1_vbus"; | ||
| 94 | regulator-min-microvolt = <5000000>; | ||
| 95 | regulator-max-microvolt = <5000000>; | ||
| 96 | gpio = <&gpio0 7 1>; | ||
| 97 | }; | ||
| 98 | }; | ||
| 99 | }; | ||
diff --git a/arch/arm/boot/dts/imx28-evk.dts b/arch/arm/boot/dts/imx28-evk.dts index 773c0e84d1fb..a0ad71ca3a44 100644 --- a/arch/arm/boot/dts/imx28-evk.dts +++ b/arch/arm/boot/dts/imx28-evk.dts | |||
| @@ -46,11 +46,28 @@ | |||
| 46 | wp-gpios = <&gpio0 28 0>; | 46 | wp-gpios = <&gpio0 28 0>; |
| 47 | }; | 47 | }; |
| 48 | 48 | ||
| 49 | ssp2: ssp@80014000 { | ||
| 50 | #address-cells = <1>; | ||
| 51 | #size-cells = <0>; | ||
| 52 | compatible = "fsl,imx28-spi"; | ||
| 53 | pinctrl-names = "default"; | ||
| 54 | pinctrl-0 = <&spi2_pins_a>; | ||
| 55 | status = "okay"; | ||
| 56 | |||
| 57 | flash: m25p80@0 { | ||
| 58 | #address-cells = <1>; | ||
| 59 | #size-cells = <1>; | ||
| 60 | compatible = "sst,sst25vf016b"; | ||
| 61 | spi-max-frequency = <40000000>; | ||
| 62 | reg = <0>; | ||
| 63 | }; | ||
| 64 | }; | ||
| 65 | |||
| 49 | pinctrl@80018000 { | 66 | pinctrl@80018000 { |
| 50 | pinctrl-names = "default"; | 67 | pinctrl-names = "default"; |
| 51 | pinctrl-0 = <&hog_pins_a>; | 68 | pinctrl-0 = <&hog_pins_a>; |
| 52 | 69 | ||
| 53 | hog_pins_a: hog-gpios@0 { | 70 | hog_pins_a: hog@0 { |
| 54 | reg = <0>; | 71 | reg = <0>; |
| 55 | fsl,pinmux-ids = < | 72 | fsl,pinmux-ids = < |
| 56 | 0x20d3 /* MX28_PAD_SSP1_CMD__GPIO_2_13 */ | 73 | 0x20d3 /* MX28_PAD_SSP1_CMD__GPIO_2_13 */ |
| @@ -128,6 +145,10 @@ | |||
| 128 | status = "okay"; | 145 | status = "okay"; |
| 129 | }; | 146 | }; |
| 130 | 147 | ||
| 148 | lradc@80050000 { | ||
| 149 | status = "okay"; | ||
| 150 | }; | ||
| 151 | |||
| 131 | i2c0: i2c@80058000 { | 152 | i2c0: i2c@80058000 { |
| 132 | pinctrl-names = "default"; | 153 | pinctrl-names = "default"; |
| 133 | pinctrl-0 = <&i2c0_pins_a>; | 154 | pinctrl-0 = <&i2c0_pins_a>; |
| @@ -140,6 +161,12 @@ | |||
| 140 | VDDIO-supply = <®_3p3v>; | 161 | VDDIO-supply = <®_3p3v>; |
| 141 | 162 | ||
| 142 | }; | 163 | }; |
| 164 | |||
| 165 | at24@51 { | ||
| 166 | compatible = "at24,24c32"; | ||
| 167 | pagesize = <32>; | ||
| 168 | reg = <0x51>; | ||
| 169 | }; | ||
| 143 | }; | 170 | }; |
| 144 | 171 | ||
| 145 | pwm: pwm@80064000 { | 172 | pwm: pwm@80064000 { |
diff --git a/arch/arm/boot/dts/imx28-m28evk.dts b/arch/arm/boot/dts/imx28-m28evk.dts index 183a3fd2d859..3bab6b00c52d 100644 --- a/arch/arm/boot/dts/imx28-m28evk.dts +++ b/arch/arm/boot/dts/imx28-m28evk.dts | |||
| @@ -23,6 +23,8 @@ | |||
| 23 | apb@80000000 { | 23 | apb@80000000 { |
| 24 | apbh@80000000 { | 24 | apbh@80000000 { |
| 25 | gpmi-nand@8000c000 { | 25 | gpmi-nand@8000c000 { |
| 26 | #address-cells = <1>; | ||
| 27 | #size-cells = <1>; | ||
| 26 | pinctrl-names = "default"; | 28 | pinctrl-names = "default"; |
| 27 | pinctrl-0 = <&gpmi_pins_a &gpmi_status_cfg>; | 29 | pinctrl-0 = <&gpmi_pins_a &gpmi_status_cfg>; |
| 28 | status = "okay"; | 30 | status = "okay"; |
| @@ -61,19 +63,40 @@ | |||
| 61 | &mmc0_cd_cfg | 63 | &mmc0_cd_cfg |
| 62 | &mmc0_sck_cfg>; | 64 | &mmc0_sck_cfg>; |
| 63 | bus-width = <8>; | 65 | bus-width = <8>; |
| 64 | wp-gpios = <&gpio3 10 1>; | 66 | wp-gpios = <&gpio3 10 0>; |
| 67 | vmmc-supply = <®_vddio_sd0>; | ||
| 65 | status = "okay"; | 68 | status = "okay"; |
| 66 | }; | 69 | }; |
| 67 | 70 | ||
| 71 | ssp2: ssp@80014000 { | ||
| 72 | #address-cells = <1>; | ||
| 73 | #size-cells = <0>; | ||
| 74 | compatible = "fsl,imx28-spi"; | ||
| 75 | pinctrl-names = "default"; | ||
| 76 | pinctrl-0 = <&spi2_pins_a>; | ||
| 77 | status = "okay"; | ||
| 78 | |||
| 79 | flash: m25p80@0 { | ||
| 80 | #address-cells = <1>; | ||
| 81 | #size-cells = <1>; | ||
| 82 | compatible = "m25p80"; | ||
| 83 | spi-max-frequency = <40000000>; | ||
| 84 | reg = <0>; | ||
| 85 | }; | ||
| 86 | }; | ||
| 87 | |||
| 68 | pinctrl@80018000 { | 88 | pinctrl@80018000 { |
| 69 | pinctrl-names = "default"; | 89 | pinctrl-names = "default"; |
| 70 | pinctrl-0 = <&hog_pins_a>; | 90 | pinctrl-0 = <&hog_pins_a>; |
| 71 | 91 | ||
| 72 | hog_pins_a: hog-gpios@0 { | 92 | hog_pins_a: hog@0 { |
| 73 | reg = <0>; | 93 | reg = <0>; |
| 74 | fsl,pinmux-ids = < | 94 | fsl,pinmux-ids = < |
| 95 | 0x31c3 /* MX28_PAD_PWM3__GPIO_3_28 */ | ||
| 75 | 0x30a3 /* MX28_PAD_AUART2_CTS__GPIO_3_10 */ | 96 | 0x30a3 /* MX28_PAD_AUART2_CTS__GPIO_3_10 */ |
| 76 | 0x30b3 /* MX28_PAD_AUART2_RTS__GPIO_3_11 */ | 97 | 0x30b3 /* MX28_PAD_AUART2_RTS__GPIO_3_11 */ |
| 98 | 0x30c3 /* MX28_PAD_AUART3_RX__GPIO_3_12 */ | ||
| 99 | 0x30d3 /* MX28_PAD_AUART3_TX__GPIO_3_13 */ | ||
| 77 | >; | 100 | >; |
| 78 | fsl,drive-strength = <0>; | 101 | fsl,drive-strength = <0>; |
| 79 | fsl,voltage = <1>; | 102 | fsl,voltage = <1>; |
| @@ -129,6 +152,7 @@ | |||
| 129 | i2c0: i2c@80058000 { | 152 | i2c0: i2c@80058000 { |
| 130 | pinctrl-names = "default"; | 153 | pinctrl-names = "default"; |
| 131 | pinctrl-0 = <&i2c0_pins_a>; | 154 | pinctrl-0 = <&i2c0_pins_a>; |
| 155 | clock-frequency = <400000>; | ||
| 132 | status = "okay"; | 156 | status = "okay"; |
| 133 | 157 | ||
| 134 | sgtl5000: codec@0a { | 158 | sgtl5000: codec@0a { |
| @@ -151,32 +175,51 @@ | |||
| 151 | }; | 175 | }; |
| 152 | }; | 176 | }; |
| 153 | 177 | ||
| 178 | lradc@80050000 { | ||
| 179 | status = "okay"; | ||
| 180 | }; | ||
| 181 | |||
| 154 | duart: serial@80074000 { | 182 | duart: serial@80074000 { |
| 155 | pinctrl-names = "default"; | 183 | pinctrl-names = "default"; |
| 156 | pinctrl-0 = <&duart_pins_a>; | 184 | pinctrl-0 = <&duart_pins_a>; |
| 157 | status = "okay"; | 185 | status = "okay"; |
| 158 | }; | 186 | }; |
| 159 | 187 | ||
| 160 | auart0: serial@8006a000 { | 188 | usbphy0: usbphy@8007c000 { |
| 161 | pinctrl-names = "default"; | ||
| 162 | pinctrl-0 = <&auart0_2pins_a>; | ||
| 163 | status = "okay"; | 189 | status = "okay"; |
| 164 | }; | 190 | }; |
| 165 | 191 | ||
| 166 | auart3: serial@80070000 { | 192 | usbphy1: usbphy@8007e000 { |
| 193 | status = "okay"; | ||
| 194 | }; | ||
| 195 | |||
| 196 | auart0: serial@8006a000 { | ||
| 167 | pinctrl-names = "default"; | 197 | pinctrl-names = "default"; |
| 168 | pinctrl-0 = <&auart3_pins_a>; | 198 | pinctrl-0 = <&auart0_2pins_a>; |
| 169 | status = "okay"; | 199 | status = "okay"; |
| 170 | }; | 200 | }; |
| 171 | }; | 201 | }; |
| 172 | }; | 202 | }; |
| 173 | 203 | ||
| 174 | ahb@80080000 { | 204 | ahb@80080000 { |
| 205 | usb0: usb@80080000 { | ||
| 206 | vbus-supply = <®_usb0_vbus>; | ||
| 207 | pinctrl-names = "default"; | ||
| 208 | pinctrl-0 = <&usbphy0_pins_a>; | ||
| 209 | status = "okay"; | ||
| 210 | }; | ||
| 211 | |||
| 212 | usb1: usb@80090000 { | ||
| 213 | vbus-supply = <®_usb1_vbus>; | ||
| 214 | pinctrl-names = "default"; | ||
| 215 | pinctrl-0 = <&usbphy1_pins_a>; | ||
| 216 | status = "okay"; | ||
| 217 | }; | ||
| 218 | |||
| 175 | mac0: ethernet@800f0000 { | 219 | mac0: ethernet@800f0000 { |
| 176 | phy-mode = "rmii"; | 220 | phy-mode = "rmii"; |
| 177 | pinctrl-names = "default"; | 221 | pinctrl-names = "default"; |
| 178 | pinctrl-0 = <&mac0_pins_a>; | 222 | pinctrl-0 = <&mac0_pins_a>; |
| 179 | phy-reset-gpios = <&gpio3 11 0>; | ||
| 180 | status = "okay"; | 223 | status = "okay"; |
| 181 | }; | 224 | }; |
| 182 | 225 | ||
| @@ -198,6 +241,30 @@ | |||
| 198 | regulator-max-microvolt = <3300000>; | 241 | regulator-max-microvolt = <3300000>; |
| 199 | regulator-always-on; | 242 | regulator-always-on; |
| 200 | }; | 243 | }; |
| 244 | |||
| 245 | reg_vddio_sd0: vddio-sd0 { | ||
| 246 | compatible = "regulator-fixed"; | ||
| 247 | regulator-name = "vddio-sd0"; | ||
| 248 | regulator-min-microvolt = <3300000>; | ||
| 249 | regulator-max-microvolt = <3300000>; | ||
| 250 | gpio = <&gpio3 28 0>; | ||
| 251 | }; | ||
| 252 | |||
| 253 | reg_usb0_vbus: usb0_vbus { | ||
| 254 | compatible = "regulator-fixed"; | ||
| 255 | regulator-name = "usb0_vbus"; | ||
| 256 | regulator-min-microvolt = <5000000>; | ||
| 257 | regulator-max-microvolt = <5000000>; | ||
| 258 | gpio = <&gpio3 12 0>; | ||
| 259 | }; | ||
| 260 | |||
| 261 | reg_usb1_vbus: usb1_vbus { | ||
| 262 | compatible = "regulator-fixed"; | ||
| 263 | regulator-name = "usb1_vbus"; | ||
| 264 | regulator-min-microvolt = <5000000>; | ||
| 265 | regulator-max-microvolt = <5000000>; | ||
| 266 | gpio = <&gpio3 13 0>; | ||
| 267 | }; | ||
| 201 | }; | 268 | }; |
| 202 | 269 | ||
| 203 | sound { | 270 | sound { |
diff --git a/arch/arm/boot/dts/imx28-tx28.dts b/arch/arm/boot/dts/imx28-tx28.dts index 62bf767409a6..37be532f0055 100644 --- a/arch/arm/boot/dts/imx28-tx28.dts +++ b/arch/arm/boot/dts/imx28-tx28.dts | |||
| @@ -25,7 +25,7 @@ | |||
| 25 | pinctrl-names = "default"; | 25 | pinctrl-names = "default"; |
| 26 | pinctrl-0 = <&hog_pins_a>; | 26 | pinctrl-0 = <&hog_pins_a>; |
| 27 | 27 | ||
| 28 | hog_pins_a: hog-gpios@0 { | 28 | hog_pins_a: hog@0 { |
| 29 | reg = <0>; | 29 | reg = <0>; |
| 30 | fsl,pinmux-ids = < | 30 | fsl,pinmux-ids = < |
| 31 | 0x40a3 /* MX28_PAD_ENET0_RXD3__GPIO_4_10 */ | 31 | 0x40a3 /* MX28_PAD_ENET0_RXD3__GPIO_4_10 */ |
| @@ -34,6 +34,24 @@ | |||
| 34 | fsl,voltage = <1>; | 34 | fsl,voltage = <1>; |
| 35 | fsl,pull-up = <0>; | 35 | fsl,pull-up = <0>; |
| 36 | }; | 36 | }; |
| 37 | |||
| 38 | mac0_pins_gpio: mac0-gpio-mode@0 { | ||
| 39 | reg = <0>; | ||
| 40 | fsl,pinmux-ids = < | ||
| 41 | 0x4003 /* MX28_PAD_ENET0_MDC__GPIO_4_0 */ | ||
| 42 | 0x4013 /* MX28_PAD_ENET0_MDIO__GPIO_4_1 */ | ||
| 43 | 0x4023 /* MX28_PAD_ENET0_RX_EN__GPIO_4_2 */ | ||
| 44 | 0x4033 /* MX28_PAD_ENET0_RXD0__GPIO_4_3 */ | ||
| 45 | 0x4043 /* MX28_PAD_ENET0_RXD1__GPIO_4_4 */ | ||
| 46 | 0x4063 /* MX28_PAD_ENET0_TX_EN__GPIO_4_6 */ | ||
| 47 | 0x4073 /* MX28_PAD_ENET0_TXD0__GPIO_4_7 */ | ||
| 48 | 0x4083 /* MX28_PAD_ENET0_TXD1__GPIO_4_8 */ | ||
| 49 | 0x4103 /* MX28_PAD_ENET_CLK__GPIO_4_16 */ | ||
| 50 | >; | ||
| 51 | fsl,drive-strength = <0>; | ||
| 52 | fsl,voltage = <1>; | ||
| 53 | fsl,pull-up = <0>; | ||
| 54 | }; | ||
| 37 | }; | 55 | }; |
| 38 | }; | 56 | }; |
| 39 | 57 | ||
| @@ -72,8 +90,9 @@ | |||
| 72 | ahb@80080000 { | 90 | ahb@80080000 { |
| 73 | mac0: ethernet@800f0000 { | 91 | mac0: ethernet@800f0000 { |
| 74 | phy-mode = "rmii"; | 92 | phy-mode = "rmii"; |
| 75 | pinctrl-names = "default"; | 93 | pinctrl-names = "default", "gpio_mode"; |
| 76 | pinctrl-0 = <&mac0_pins_a>; | 94 | pinctrl-0 = <&mac0_pins_a>; |
| 95 | pinctrl-1 = <&mac0_pins_gpio>; | ||
| 77 | status = "okay"; | 96 | status = "okay"; |
| 78 | }; | 97 | }; |
| 79 | }; | 98 | }; |
diff --git a/arch/arm/boot/dts/imx28.dtsi b/arch/arm/boot/dts/imx28.dtsi index 3fa6d190fab4..724147eab84b 100644 --- a/arch/arm/boot/dts/imx28.dtsi +++ b/arch/arm/boot/dts/imx28.dtsi | |||
| @@ -27,6 +27,8 @@ | |||
| 27 | serial2 = &auart2; | 27 | serial2 = &auart2; |
| 28 | serial3 = &auart3; | 28 | serial3 = &auart3; |
| 29 | serial4 = &auart4; | 29 | serial4 = &auart4; |
| 30 | ethernet0 = &mac0; | ||
| 31 | ethernet1 = &mac1; | ||
| 30 | }; | 32 | }; |
| 31 | 33 | ||
| 32 | cpus { | 34 | cpus { |
| @@ -65,6 +67,7 @@ | |||
| 65 | dma-apbh@80004000 { | 67 | dma-apbh@80004000 { |
| 66 | compatible = "fsl,imx28-dma-apbh"; | 68 | compatible = "fsl,imx28-dma-apbh"; |
| 67 | reg = <0x80004000 0x2000>; | 69 | reg = <0x80004000 0x2000>; |
| 70 | clocks = <&clks 25>; | ||
| 68 | }; | 71 | }; |
| 69 | 72 | ||
| 70 | perfmon@80006000 { | 73 | perfmon@80006000 { |
| @@ -81,34 +84,47 @@ | |||
| 81 | reg-names = "gpmi-nand", "bch"; | 84 | reg-names = "gpmi-nand", "bch"; |
| 82 | interrupts = <88>, <41>; | 85 | interrupts = <88>, <41>; |
| 83 | interrupt-names = "gpmi-dma", "bch"; | 86 | interrupt-names = "gpmi-dma", "bch"; |
| 87 | clocks = <&clks 50>; | ||
| 84 | fsl,gpmi-dma-channel = <4>; | 88 | fsl,gpmi-dma-channel = <4>; |
| 85 | status = "disabled"; | 89 | status = "disabled"; |
| 86 | }; | 90 | }; |
| 87 | 91 | ||
| 88 | ssp0: ssp@80010000 { | 92 | ssp0: ssp@80010000 { |
| 93 | #address-cells = <1>; | ||
| 94 | #size-cells = <0>; | ||
| 89 | reg = <0x80010000 0x2000>; | 95 | reg = <0x80010000 0x2000>; |
| 90 | interrupts = <96 82>; | 96 | interrupts = <96 82>; |
| 97 | clocks = <&clks 46>; | ||
| 91 | fsl,ssp-dma-channel = <0>; | 98 | fsl,ssp-dma-channel = <0>; |
| 92 | status = "disabled"; | 99 | status = "disabled"; |
| 93 | }; | 100 | }; |
| 94 | 101 | ||
| 95 | ssp1: ssp@80012000 { | 102 | ssp1: ssp@80012000 { |
| 103 | #address-cells = <1>; | ||
| 104 | #size-cells = <0>; | ||
| 96 | reg = <0x80012000 0x2000>; | 105 | reg = <0x80012000 0x2000>; |
| 97 | interrupts = <97 83>; | 106 | interrupts = <97 83>; |
| 107 | clocks = <&clks 47>; | ||
| 98 | fsl,ssp-dma-channel = <1>; | 108 | fsl,ssp-dma-channel = <1>; |
| 99 | status = "disabled"; | 109 | status = "disabled"; |
| 100 | }; | 110 | }; |
| 101 | 111 | ||
| 102 | ssp2: ssp@80014000 { | 112 | ssp2: ssp@80014000 { |
| 113 | #address-cells = <1>; | ||
| 114 | #size-cells = <0>; | ||
| 103 | reg = <0x80014000 0x2000>; | 115 | reg = <0x80014000 0x2000>; |
| 104 | interrupts = <98 84>; | 116 | interrupts = <98 84>; |
| 117 | clocks = <&clks 48>; | ||
| 105 | fsl,ssp-dma-channel = <2>; | 118 | fsl,ssp-dma-channel = <2>; |
| 106 | status = "disabled"; | 119 | status = "disabled"; |
| 107 | }; | 120 | }; |
| 108 | 121 | ||
| 109 | ssp3: ssp@80016000 { | 122 | ssp3: ssp@80016000 { |
| 123 | #address-cells = <1>; | ||
| 124 | #size-cells = <0>; | ||
| 110 | reg = <0x80016000 0x2000>; | 125 | reg = <0x80016000 0x2000>; |
| 111 | interrupts = <99 85>; | 126 | interrupts = <99 85>; |
| 127 | clocks = <&clks 49>; | ||
| 112 | fsl,ssp-dma-channel = <3>; | 128 | fsl,ssp-dma-channel = <3>; |
| 113 | status = "disabled"; | 129 | status = "disabled"; |
| 114 | }; | 130 | }; |
| @@ -410,6 +426,28 @@ | |||
| 410 | fsl,pull-up = <1>; | 426 | fsl,pull-up = <1>; |
| 411 | }; | 427 | }; |
| 412 | 428 | ||
| 429 | i2c0_pins_b: i2c0@1 { | ||
| 430 | reg = <1>; | ||
| 431 | fsl,pinmux-ids = < | ||
| 432 | 0x3001 /* MX28_PAD_AUART0_RX__I2C0_SCL */ | ||
| 433 | 0x3011 /* MX28_PAD_AUART0_TX__I2C0_SDA */ | ||
| 434 | >; | ||
| 435 | fsl,drive-strength = <1>; | ||
| 436 | fsl,voltage = <1>; | ||
| 437 | fsl,pull-up = <1>; | ||
| 438 | }; | ||
| 439 | |||
| 440 | i2c1_pins_a: i2c1@0 { | ||
| 441 | reg = <0>; | ||
| 442 | fsl,pinmux-ids = < | ||
| 443 | 0x3101 /* MX28_PAD_PWM0__I2C1_SCL */ | ||
| 444 | 0x3111 /* MX28_PAD_PWM1__I2C1_SDA */ | ||
| 445 | >; | ||
| 446 | fsl,drive-strength = <1>; | ||
| 447 | fsl,voltage = <1>; | ||
| 448 | fsl,pull-up = <1>; | ||
| 449 | }; | ||
| 450 | |||
| 413 | saif0_pins_a: saif0@0 { | 451 | saif0_pins_a: saif0@0 { |
| 414 | reg = <0>; | 452 | reg = <0>; |
| 415 | fsl,pinmux-ids = < | 453 | fsl,pinmux-ids = < |
| @@ -453,6 +491,16 @@ | |||
| 453 | fsl,pull-up = <0>; | 491 | fsl,pull-up = <0>; |
| 454 | }; | 492 | }; |
| 455 | 493 | ||
| 494 | pwm4_pins_a: pwm4@0 { | ||
| 495 | reg = <0>; | ||
| 496 | fsl,pinmux-ids = < | ||
| 497 | 0x31d0 /* MX28_PAD_PWM4__PWM_4 */ | ||
| 498 | >; | ||
| 499 | fsl,drive-strength = <0>; | ||
| 500 | fsl,voltage = <1>; | ||
| 501 | fsl,pull-up = <0>; | ||
| 502 | }; | ||
| 503 | |||
| 456 | lcdif_24bit_pins_a: lcdif-24bit@0 { | 504 | lcdif_24bit_pins_a: lcdif-24bit@0 { |
| 457 | reg = <0>; | 505 | reg = <0>; |
| 458 | fsl,pinmux-ids = < | 506 | fsl,pinmux-ids = < |
| @@ -507,6 +555,49 @@ | |||
| 507 | fsl,voltage = <1>; | 555 | fsl,voltage = <1>; |
| 508 | fsl,pull-up = <0>; | 556 | fsl,pull-up = <0>; |
| 509 | }; | 557 | }; |
| 558 | |||
| 559 | spi2_pins_a: spi2@0 { | ||
| 560 | reg = <0>; | ||
| 561 | fsl,pinmux-ids = < | ||
| 562 | 0x2100 /* MX28_PAD_SSP2_SCK__SSP2_SCK */ | ||
| 563 | 0x2110 /* MX28_PAD_SSP2_MOSI__SSP2_CMD */ | ||
| 564 | 0x2120 /* MX28_PAD_SSP2_MISO__SSP2_D0 */ | ||
| 565 | 0x2130 /* MX28_PAD_SSP2_SS0__SSP2_D3 */ | ||
| 566 | >; | ||
| 567 | fsl,drive-strength = <1>; | ||
| 568 | fsl,voltage = <1>; | ||
| 569 | fsl,pull-up = <1>; | ||
| 570 | }; | ||
| 571 | |||
| 572 | usbphy0_pins_a: usbphy0@0 { | ||
| 573 | reg = <0>; | ||
| 574 | fsl,pinmux-ids = < | ||
| 575 | 0x2152 /* MX28_PAD_SSP2_SS2__USB0_OVERCURRENT */ | ||
| 576 | >; | ||
| 577 | fsl,drive-strength = <2>; | ||
| 578 | fsl,voltage = <1>; | ||
| 579 | fsl,pull-up = <0>; | ||
| 580 | }; | ||
| 581 | |||
| 582 | usbphy0_pins_b: usbphy0@1 { | ||
| 583 | reg = <1>; | ||
| 584 | fsl,pinmux-ids = < | ||
| 585 | 0x3061 /* MX28_PAD_AUART1_CTS__USB0_OVERCURRENT */ | ||
| 586 | >; | ||
| 587 | fsl,drive-strength = <2>; | ||
| 588 | fsl,voltage = <1>; | ||
| 589 | fsl,pull-up = <0>; | ||
| 590 | }; | ||
| 591 | |||
| 592 | usbphy1_pins_a: usbphy1@0 { | ||
| 593 | reg = <0>; | ||
| 594 | fsl,pinmux-ids = < | ||
| 595 | 0x2142 /* MX28_PAD_SSP2_SS1__USB1_OVERCURRENT */ | ||
| 596 | >; | ||
| 597 | fsl,drive-strength = <2>; | ||
| 598 | fsl,voltage = <1>; | ||
| 599 | fsl,pull-up = <0>; | ||
| 600 | }; | ||
| 510 | }; | 601 | }; |
| 511 | 602 | ||
| 512 | digctl@8001c000 { | 603 | digctl@8001c000 { |
| @@ -523,6 +614,7 @@ | |||
| 523 | dma-apbx@80024000 { | 614 | dma-apbx@80024000 { |
| 524 | compatible = "fsl,imx28-dma-apbx"; | 615 | compatible = "fsl,imx28-dma-apbx"; |
| 525 | reg = <0x80024000 0x2000>; | 616 | reg = <0x80024000 0x2000>; |
| 617 | clocks = <&clks 26>; | ||
| 526 | }; | 618 | }; |
| 527 | 619 | ||
| 528 | dcp@80028000 { | 620 | dcp@80028000 { |
| @@ -551,6 +643,7 @@ | |||
| 551 | compatible = "fsl,imx28-lcdif"; | 643 | compatible = "fsl,imx28-lcdif"; |
| 552 | reg = <0x80030000 0x2000>; | 644 | reg = <0x80030000 0x2000>; |
| 553 | interrupts = <38 86>; | 645 | interrupts = <38 86>; |
| 646 | clocks = <&clks 55>; | ||
| 554 | status = "disabled"; | 647 | status = "disabled"; |
| 555 | }; | 648 | }; |
| 556 | 649 | ||
| @@ -558,6 +651,8 @@ | |||
| 558 | compatible = "fsl,imx28-flexcan", "fsl,p1010-flexcan"; | 651 | compatible = "fsl,imx28-flexcan", "fsl,p1010-flexcan"; |
| 559 | reg = <0x80032000 0x2000>; | 652 | reg = <0x80032000 0x2000>; |
| 560 | interrupts = <8>; | 653 | interrupts = <8>; |
| 654 | clocks = <&clks 58>, <&clks 58>; | ||
| 655 | clock-names = "ipg", "per"; | ||
| 561 | status = "disabled"; | 656 | status = "disabled"; |
| 562 | }; | 657 | }; |
| 563 | 658 | ||
| @@ -565,6 +660,8 @@ | |||
| 565 | compatible = "fsl,imx28-flexcan", "fsl,p1010-flexcan"; | 660 | compatible = "fsl,imx28-flexcan", "fsl,p1010-flexcan"; |
| 566 | reg = <0x80034000 0x2000>; | 661 | reg = <0x80034000 0x2000>; |
| 567 | interrupts = <9>; | 662 | interrupts = <9>; |
| 663 | clocks = <&clks 59>, <&clks 59>; | ||
| 664 | clock-names = "ipg", "per"; | ||
| 568 | status = "disabled"; | 665 | status = "disabled"; |
| 569 | }; | 666 | }; |
| 570 | 667 | ||
| @@ -611,15 +708,17 @@ | |||
| 611 | reg = <0x80040000 0x40000>; | 708 | reg = <0x80040000 0x40000>; |
| 612 | ranges; | 709 | ranges; |
| 613 | 710 | ||
| 614 | clkctl@80040000 { | 711 | clks: clkctrl@80040000 { |
| 712 | compatible = "fsl,imx28-clkctrl"; | ||
| 615 | reg = <0x80040000 0x2000>; | 713 | reg = <0x80040000 0x2000>; |
| 616 | status = "disabled"; | 714 | #clock-cells = <1>; |
| 617 | }; | 715 | }; |
| 618 | 716 | ||
| 619 | saif0: saif@80042000 { | 717 | saif0: saif@80042000 { |
| 620 | compatible = "fsl,imx28-saif"; | 718 | compatible = "fsl,imx28-saif"; |
| 621 | reg = <0x80042000 0x2000>; | 719 | reg = <0x80042000 0x2000>; |
| 622 | interrupts = <59 80>; | 720 | interrupts = <59 80>; |
| 721 | clocks = <&clks 53>; | ||
| 623 | fsl,saif-dma-channel = <4>; | 722 | fsl,saif-dma-channel = <4>; |
| 624 | status = "disabled"; | 723 | status = "disabled"; |
| 625 | }; | 724 | }; |
| @@ -633,12 +732,16 @@ | |||
| 633 | compatible = "fsl,imx28-saif"; | 732 | compatible = "fsl,imx28-saif"; |
| 634 | reg = <0x80046000 0x2000>; | 733 | reg = <0x80046000 0x2000>; |
| 635 | interrupts = <58 81>; | 734 | interrupts = <58 81>; |
| 735 | clocks = <&clks 54>; | ||
| 636 | fsl,saif-dma-channel = <5>; | 736 | fsl,saif-dma-channel = <5>; |
| 637 | status = "disabled"; | 737 | status = "disabled"; |
| 638 | }; | 738 | }; |
| 639 | 739 | ||
| 640 | lradc@80050000 { | 740 | lradc@80050000 { |
| 741 | compatible = "fsl,imx28-lradc"; | ||
| 641 | reg = <0x80050000 0x2000>; | 742 | reg = <0x80050000 0x2000>; |
| 743 | interrupts = <10 14 15 16 17 18 19 | ||
| 744 | 20 21 22 23 24 25>; | ||
| 642 | status = "disabled"; | 745 | status = "disabled"; |
| 643 | }; | 746 | }; |
| 644 | 747 | ||
| @@ -677,6 +780,7 @@ | |||
| 677 | pwm: pwm@80064000 { | 780 | pwm: pwm@80064000 { |
| 678 | compatible = "fsl,imx28-pwm", "fsl,imx23-pwm"; | 781 | compatible = "fsl,imx28-pwm", "fsl,imx23-pwm"; |
| 679 | reg = <0x80064000 0x2000>; | 782 | reg = <0x80064000 0x2000>; |
| 783 | clocks = <&clks 44>; | ||
| 680 | #pwm-cells = <2>; | 784 | #pwm-cells = <2>; |
| 681 | fsl,pwm-number = <8>; | 785 | fsl,pwm-number = <8>; |
| 682 | status = "disabled"; | 786 | status = "disabled"; |
| @@ -691,6 +795,7 @@ | |||
| 691 | compatible = "fsl,imx28-auart", "fsl,imx23-auart"; | 795 | compatible = "fsl,imx28-auart", "fsl,imx23-auart"; |
| 692 | reg = <0x8006a000 0x2000>; | 796 | reg = <0x8006a000 0x2000>; |
| 693 | interrupts = <112 70 71>; | 797 | interrupts = <112 70 71>; |
| 798 | clocks = <&clks 45>; | ||
| 694 | status = "disabled"; | 799 | status = "disabled"; |
| 695 | }; | 800 | }; |
| 696 | 801 | ||
| @@ -698,6 +803,7 @@ | |||
| 698 | compatible = "fsl,imx28-auart", "fsl,imx23-auart"; | 803 | compatible = "fsl,imx28-auart", "fsl,imx23-auart"; |
| 699 | reg = <0x8006c000 0x2000>; | 804 | reg = <0x8006c000 0x2000>; |
| 700 | interrupts = <113 72 73>; | 805 | interrupts = <113 72 73>; |
| 806 | clocks = <&clks 45>; | ||
| 701 | status = "disabled"; | 807 | status = "disabled"; |
| 702 | }; | 808 | }; |
| 703 | 809 | ||
| @@ -705,6 +811,7 @@ | |||
| 705 | compatible = "fsl,imx28-auart", "fsl,imx23-auart"; | 811 | compatible = "fsl,imx28-auart", "fsl,imx23-auart"; |
| 706 | reg = <0x8006e000 0x2000>; | 812 | reg = <0x8006e000 0x2000>; |
| 707 | interrupts = <114 74 75>; | 813 | interrupts = <114 74 75>; |
| 814 | clocks = <&clks 45>; | ||
| 708 | status = "disabled"; | 815 | status = "disabled"; |
| 709 | }; | 816 | }; |
| 710 | 817 | ||
| @@ -712,6 +819,7 @@ | |||
| 712 | compatible = "fsl,imx28-auart", "fsl,imx23-auart"; | 819 | compatible = "fsl,imx28-auart", "fsl,imx23-auart"; |
| 713 | reg = <0x80070000 0x2000>; | 820 | reg = <0x80070000 0x2000>; |
| 714 | interrupts = <115 76 77>; | 821 | interrupts = <115 76 77>; |
| 822 | clocks = <&clks 45>; | ||
| 715 | status = "disabled"; | 823 | status = "disabled"; |
| 716 | }; | 824 | }; |
| 717 | 825 | ||
| @@ -719,6 +827,7 @@ | |||
| 719 | compatible = "fsl,imx28-auart", "fsl,imx23-auart"; | 827 | compatible = "fsl,imx28-auart", "fsl,imx23-auart"; |
| 720 | reg = <0x80072000 0x2000>; | 828 | reg = <0x80072000 0x2000>; |
| 721 | interrupts = <116 78 79>; | 829 | interrupts = <116 78 79>; |
| 830 | clocks = <&clks 45>; | ||
| 722 | status = "disabled"; | 831 | status = "disabled"; |
| 723 | }; | 832 | }; |
| 724 | 833 | ||
| @@ -726,18 +835,22 @@ | |||
| 726 | compatible = "arm,pl011", "arm,primecell"; | 835 | compatible = "arm,pl011", "arm,primecell"; |
| 727 | reg = <0x80074000 0x1000>; | 836 | reg = <0x80074000 0x1000>; |
| 728 | interrupts = <47>; | 837 | interrupts = <47>; |
| 838 | clocks = <&clks 45>, <&clks 26>; | ||
| 839 | clock-names = "uart", "apb_pclk"; | ||
| 729 | status = "disabled"; | 840 | status = "disabled"; |
| 730 | }; | 841 | }; |
| 731 | 842 | ||
| 732 | usbphy0: usbphy@8007c000 { | 843 | usbphy0: usbphy@8007c000 { |
| 733 | compatible = "fsl,imx28-usbphy", "fsl,imx23-usbphy"; | 844 | compatible = "fsl,imx28-usbphy", "fsl,imx23-usbphy"; |
| 734 | reg = <0x8007c000 0x2000>; | 845 | reg = <0x8007c000 0x2000>; |
| 846 | clocks = <&clks 62>; | ||
| 735 | status = "disabled"; | 847 | status = "disabled"; |
| 736 | }; | 848 | }; |
| 737 | 849 | ||
| 738 | usbphy1: usbphy@8007e000 { | 850 | usbphy1: usbphy@8007e000 { |
| 739 | compatible = "fsl,imx28-usbphy", "fsl,imx23-usbphy"; | 851 | compatible = "fsl,imx28-usbphy", "fsl,imx23-usbphy"; |
| 740 | reg = <0x8007e000 0x2000>; | 852 | reg = <0x8007e000 0x2000>; |
| 853 | clocks = <&clks 63>; | ||
| 741 | status = "disabled"; | 854 | status = "disabled"; |
| 742 | }; | 855 | }; |
| 743 | }; | 856 | }; |
| @@ -754,6 +867,7 @@ | |||
| 754 | compatible = "fsl,imx28-usb", "fsl,imx27-usb"; | 867 | compatible = "fsl,imx28-usb", "fsl,imx27-usb"; |
| 755 | reg = <0x80080000 0x10000>; | 868 | reg = <0x80080000 0x10000>; |
| 756 | interrupts = <93>; | 869 | interrupts = <93>; |
| 870 | clocks = <&clks 60>; | ||
| 757 | fsl,usbphy = <&usbphy0>; | 871 | fsl,usbphy = <&usbphy0>; |
| 758 | status = "disabled"; | 872 | status = "disabled"; |
| 759 | }; | 873 | }; |
| @@ -762,6 +876,7 @@ | |||
| 762 | compatible = "fsl,imx28-usb", "fsl,imx27-usb"; | 876 | compatible = "fsl,imx28-usb", "fsl,imx27-usb"; |
| 763 | reg = <0x80090000 0x10000>; | 877 | reg = <0x80090000 0x10000>; |
| 764 | interrupts = <92>; | 878 | interrupts = <92>; |
| 879 | clocks = <&clks 61>; | ||
| 765 | fsl,usbphy = <&usbphy1>; | 880 | fsl,usbphy = <&usbphy1>; |
| 766 | status = "disabled"; | 881 | status = "disabled"; |
| 767 | }; | 882 | }; |
| @@ -775,6 +890,8 @@ | |||
| 775 | compatible = "fsl,imx28-fec"; | 890 | compatible = "fsl,imx28-fec"; |
| 776 | reg = <0x800f0000 0x4000>; | 891 | reg = <0x800f0000 0x4000>; |
| 777 | interrupts = <101>; | 892 | interrupts = <101>; |
| 893 | clocks = <&clks 57>, <&clks 57>; | ||
| 894 | clock-names = "ipg", "ahb"; | ||
| 778 | status = "disabled"; | 895 | status = "disabled"; |
| 779 | }; | 896 | }; |
| 780 | 897 | ||
| @@ -782,6 +899,8 @@ | |||
| 782 | compatible = "fsl,imx28-fec"; | 899 | compatible = "fsl,imx28-fec"; |
| 783 | reg = <0x800f4000 0x4000>; | 900 | reg = <0x800f4000 0x4000>; |
| 784 | interrupts = <102>; | 901 | interrupts = <102>; |
| 902 | clocks = <&clks 57>, <&clks 57>; | ||
| 903 | clock-names = "ipg", "ahb"; | ||
| 785 | status = "disabled"; | 904 | status = "disabled"; |
| 786 | }; | 905 | }; |
| 787 | 906 | ||
diff --git a/arch/arm/boot/dts/imx51-babbage.dts b/arch/arm/boot/dts/imx51-babbage.dts index 59d9789e5508..cbd2b1c7487b 100644 --- a/arch/arm/boot/dts/imx51-babbage.dts +++ b/arch/arm/boot/dts/imx51-babbage.dts | |||
| @@ -25,23 +25,31 @@ | |||
| 25 | aips@70000000 { /* aips-1 */ | 25 | aips@70000000 { /* aips-1 */ |
| 26 | spba@70000000 { | 26 | spba@70000000 { |
| 27 | esdhc@70004000 { /* ESDHC1 */ | 27 | esdhc@70004000 { /* ESDHC1 */ |
| 28 | pinctrl-names = "default"; | ||
| 29 | pinctrl-0 = <&pinctrl_esdhc1_1>; | ||
| 28 | fsl,cd-controller; | 30 | fsl,cd-controller; |
| 29 | fsl,wp-controller; | 31 | fsl,wp-controller; |
| 30 | status = "okay"; | 32 | status = "okay"; |
| 31 | }; | 33 | }; |
| 32 | 34 | ||
| 33 | esdhc@70008000 { /* ESDHC2 */ | 35 | esdhc@70008000 { /* ESDHC2 */ |
| 36 | pinctrl-names = "default"; | ||
| 37 | pinctrl-0 = <&pinctrl_esdhc2_1>; | ||
| 34 | cd-gpios = <&gpio1 6 0>; | 38 | cd-gpios = <&gpio1 6 0>; |
| 35 | wp-gpios = <&gpio1 5 0>; | 39 | wp-gpios = <&gpio1 5 0>; |
| 36 | status = "okay"; | 40 | status = "okay"; |
| 37 | }; | 41 | }; |
| 38 | 42 | ||
| 39 | uart3: serial@7000c000 { | 43 | uart3: serial@7000c000 { |
| 44 | pinctrl-names = "default"; | ||
| 45 | pinctrl-0 = <&pinctrl_uart3_1>; | ||
| 40 | fsl,uart-has-rtscts; | 46 | fsl,uart-has-rtscts; |
| 41 | status = "okay"; | 47 | status = "okay"; |
| 42 | }; | 48 | }; |
| 43 | 49 | ||
| 44 | ecspi@70010000 { /* ECSPI1 */ | 50 | ecspi@70010000 { /* ECSPI1 */ |
| 51 | pinctrl-names = "default"; | ||
| 52 | pinctrl-0 = <&pinctrl_ecspi1_1>; | ||
| 45 | fsl,spi-num-chipselects = <2>; | 53 | fsl,spi-num-chipselects = <2>; |
| 46 | cs-gpios = <&gpio4 24 0>, <&gpio4 25 0>; | 54 | cs-gpios = <&gpio4 24 0>, <&gpio4 25 0>; |
| 47 | status = "okay"; | 55 | status = "okay"; |
| @@ -169,31 +177,43 @@ | |||
| 169 | }; | 177 | }; |
| 170 | }; | 178 | }; |
| 171 | 179 | ||
| 172 | wdog@73f98000 { /* WDOG1 */ | ||
| 173 | status = "okay"; | ||
| 174 | }; | ||
| 175 | |||
| 176 | iomuxc@73fa8000 { | 180 | iomuxc@73fa8000 { |
| 177 | compatible = "fsl,imx51-iomuxc-babbage"; | 181 | pinctrl-names = "default"; |
| 178 | reg = <0x73fa8000 0x4000>; | 182 | pinctrl-0 = <&pinctrl_hog>; |
| 183 | |||
| 184 | hog { | ||
| 185 | pinctrl_hog: hoggrp { | ||
| 186 | fsl,pins = < | ||
| 187 | 694 0x20d5 /* MX51_PAD_GPIO1_0__SD1_CD */ | ||
| 188 | 697 0x20d5 /* MX51_PAD_GPIO1_1__SD1_WP */ | ||
| 189 | 737 0x100 /* MX51_PAD_GPIO1_5__GPIO1_5 */ | ||
| 190 | 740 0x100 /* MX51_PAD_GPIO1_6__GPIO1_6 */ | ||
| 191 | 121 0x5 /* MX51_PAD_EIM_A27__GPIO2_21 */ | ||
| 192 | 402 0x85 /* MX51_PAD_CSPI1_SS0__GPIO4_24 */ | ||
| 193 | 405 0x85 /* MX51_PAD_CSPI1_SS1__GPIO4_25 */ | ||
| 194 | >; | ||
| 195 | }; | ||
| 196 | }; | ||
| 179 | }; | 197 | }; |
| 180 | 198 | ||
| 181 | uart1: serial@73fbc000 { | 199 | uart1: serial@73fbc000 { |
| 200 | pinctrl-names = "default"; | ||
| 201 | pinctrl-0 = <&pinctrl_uart1_1>; | ||
| 182 | fsl,uart-has-rtscts; | 202 | fsl,uart-has-rtscts; |
| 183 | status = "okay"; | 203 | status = "okay"; |
| 184 | }; | 204 | }; |
| 185 | 205 | ||
| 186 | uart2: serial@73fc0000 { | 206 | uart2: serial@73fc0000 { |
| 207 | pinctrl-names = "default"; | ||
| 208 | pinctrl-0 = <&pinctrl_uart2_1>; | ||
| 187 | status = "okay"; | 209 | status = "okay"; |
| 188 | }; | 210 | }; |
| 189 | }; | 211 | }; |
| 190 | 212 | ||
| 191 | aips@80000000 { /* aips-2 */ | 213 | aips@80000000 { /* aips-2 */ |
| 192 | sdma@83fb0000 { | ||
| 193 | fsl,sdma-ram-script-name = "imx/sdma/sdma-imx51.bin"; | ||
| 194 | }; | ||
| 195 | |||
| 196 | i2c@83fc4000 { /* I2C2 */ | 214 | i2c@83fc4000 { /* I2C2 */ |
| 215 | pinctrl-names = "default"; | ||
| 216 | pinctrl-0 = <&pinctrl_i2c2_1>; | ||
| 197 | status = "okay"; | 217 | status = "okay"; |
| 198 | 218 | ||
| 199 | sgtl5000: codec@0a { | 219 | sgtl5000: codec@0a { |
| @@ -206,10 +226,14 @@ | |||
| 206 | }; | 226 | }; |
| 207 | 227 | ||
| 208 | audmux@83fd0000 { | 228 | audmux@83fd0000 { |
| 229 | pinctrl-names = "default"; | ||
| 230 | pinctrl-0 = <&pinctrl_audmux_1>; | ||
| 209 | status = "okay"; | 231 | status = "okay"; |
| 210 | }; | 232 | }; |
| 211 | 233 | ||
| 212 | ethernet@83fec000 { | 234 | ethernet@83fec000 { |
| 235 | pinctrl-names = "default"; | ||
| 236 | pinctrl-0 = <&pinctrl_fec_1>; | ||
| 213 | phy-mode = "mii"; | 237 | phy-mode = "mii"; |
| 214 | status = "okay"; | 238 | status = "okay"; |
| 215 | }; | 239 | }; |
diff --git a/arch/arm/boot/dts/imx51.dtsi b/arch/arm/boot/dts/imx51.dtsi index aba28dc87fc8..2f71a91ca98e 100644 --- a/arch/arm/boot/dts/imx51.dtsi +++ b/arch/arm/boot/dts/imx51.dtsi | |||
| @@ -130,6 +130,34 @@ | |||
| 130 | }; | 130 | }; |
| 131 | }; | 131 | }; |
| 132 | 132 | ||
| 133 | usb@73f80000 { | ||
| 134 | compatible = "fsl,imx51-usb", "fsl,imx27-usb"; | ||
| 135 | reg = <0x73f80000 0x0200>; | ||
| 136 | interrupts = <18>; | ||
| 137 | status = "disabled"; | ||
| 138 | }; | ||
| 139 | |||
| 140 | usb@73f80200 { | ||
| 141 | compatible = "fsl,imx51-usb", "fsl,imx27-usb"; | ||
| 142 | reg = <0x73f80200 0x0200>; | ||
| 143 | interrupts = <14>; | ||
| 144 | status = "disabled"; | ||
| 145 | }; | ||
| 146 | |||
| 147 | usb@73f80400 { | ||
| 148 | compatible = "fsl,imx51-usb", "fsl,imx27-usb"; | ||
| 149 | reg = <0x73f80400 0x0200>; | ||
| 150 | interrupts = <16>; | ||
| 151 | status = "disabled"; | ||
| 152 | }; | ||
| 153 | |||
| 154 | usb@73f80600 { | ||
| 155 | compatible = "fsl,imx51-usb", "fsl,imx27-usb"; | ||
| 156 | reg = <0x73f80600 0x0200>; | ||
| 157 | interrupts = <17>; | ||
| 158 | status = "disabled"; | ||
| 159 | }; | ||
| 160 | |||
| 133 | gpio1: gpio@73f84000 { | 161 | gpio1: gpio@73f84000 { |
| 134 | compatible = "fsl,imx51-gpio", "fsl,imx35-gpio"; | 162 | compatible = "fsl,imx51-gpio", "fsl,imx35-gpio"; |
| 135 | reg = <0x73f84000 0x4000>; | 163 | reg = <0x73f84000 0x4000>; |
| @@ -174,7 +202,6 @@ | |||
| 174 | compatible = "fsl,imx51-wdt", "fsl,imx21-wdt"; | 202 | compatible = "fsl,imx51-wdt", "fsl,imx21-wdt"; |
| 175 | reg = <0x73f98000 0x4000>; | 203 | reg = <0x73f98000 0x4000>; |
| 176 | interrupts = <58>; | 204 | interrupts = <58>; |
| 177 | status = "disabled"; | ||
| 178 | }; | 205 | }; |
| 179 | 206 | ||
| 180 | wdog@73f9c000 { /* WDOG2 */ | 207 | wdog@73f9c000 { /* WDOG2 */ |
| @@ -184,6 +211,122 @@ | |||
| 184 | status = "disabled"; | 211 | status = "disabled"; |
| 185 | }; | 212 | }; |
| 186 | 213 | ||
| 214 | iomuxc@73fa8000 { | ||
| 215 | compatible = "fsl,imx51-iomuxc"; | ||
| 216 | reg = <0x73fa8000 0x4000>; | ||
| 217 | |||
| 218 | audmux { | ||
| 219 | pinctrl_audmux_1: audmuxgrp-1 { | ||
| 220 | fsl,pins = < | ||
| 221 | 384 0x80000000 /* MX51_PAD_AUD3_BB_TXD__AUD3_TXD */ | ||
| 222 | 386 0x80000000 /* MX51_PAD_AUD3_BB_RXD__AUD3_RXD */ | ||
| 223 | 389 0x80000000 /* MX51_PAD_AUD3_BB_CK__AUD3_TXC */ | ||
| 224 | 391 0x80000000 /* MX51_PAD_AUD3_BB_FS__AUD3_TXFS */ | ||
| 225 | >; | ||
| 226 | }; | ||
| 227 | }; | ||
| 228 | |||
| 229 | fec { | ||
| 230 | pinctrl_fec_1: fecgrp-1 { | ||
| 231 | fsl,pins = < | ||
| 232 | 128 0x80000000 /* MX51_PAD_EIM_EB2__FEC_MDIO */ | ||
| 233 | 134 0x80000000 /* MX51_PAD_EIM_EB3__FEC_RDATA1 */ | ||
| 234 | 146 0x80000000 /* MX51_PAD_EIM_CS2__FEC_RDATA2 */ | ||
| 235 | 152 0x80000000 /* MX51_PAD_EIM_CS3__FEC_RDATA3 */ | ||
| 236 | 158 0x80000000 /* MX51_PAD_EIM_CS4__FEC_RX_ER */ | ||
| 237 | 165 0x80000000 /* MX51_PAD_EIM_CS5__FEC_CRS */ | ||
| 238 | 206 0x80000000 /* MX51_PAD_NANDF_RB2__FEC_COL */ | ||
| 239 | 213 0x80000000 /* MX51_PAD_NANDF_RB3__FEC_RX_CLK */ | ||
| 240 | 293 0x80000000 /* MX51_PAD_NANDF_D9__FEC_RDATA0 */ | ||
| 241 | 298 0x80000000 /* MX51_PAD_NANDF_D8__FEC_TDATA0 */ | ||
| 242 | 225 0x80000000 /* MX51_PAD_NANDF_CS2__FEC_TX_ER */ | ||
| 243 | 231 0x80000000 /* MX51_PAD_NANDF_CS3__FEC_MDC */ | ||
| 244 | 237 0x80000000 /* MX51_PAD_NANDF_CS4__FEC_TDATA1 */ | ||
| 245 | 243 0x80000000 /* MX51_PAD_NANDF_CS5__FEC_TDATA2 */ | ||
| 246 | 250 0x80000000 /* MX51_PAD_NANDF_CS6__FEC_TDATA3 */ | ||
| 247 | 255 0x80000000 /* MX51_PAD_NANDF_CS7__FEC_TX_EN */ | ||
| 248 | 260 0x80000000 /* MX51_PAD_NANDF_RDY_INT__FEC_TX_CLK */ | ||
| 249 | >; | ||
| 250 | }; | ||
| 251 | }; | ||
| 252 | |||
| 253 | ecspi1 { | ||
| 254 | pinctrl_ecspi1_1: ecspi1grp-1 { | ||
| 255 | fsl,pins = < | ||
| 256 | 398 0x185 /* MX51_PAD_CSPI1_MISO__ECSPI1_MISO */ | ||
| 257 | 394 0x185 /* MX51_PAD_CSPI1_MOSI__ECSPI1_MOSI */ | ||
| 258 | 409 0x185 /* MX51_PAD_CSPI1_SCLK__ECSPI1_SCLK */ | ||
| 259 | >; | ||
| 260 | }; | ||
| 261 | }; | ||
| 262 | |||
| 263 | esdhc1 { | ||
| 264 | pinctrl_esdhc1_1: esdhc1grp-1 { | ||
| 265 | fsl,pins = < | ||
| 266 | 666 0x400020d5 /* MX51_PAD_SD1_CMD__SD1_CMD */ | ||
| 267 | 669 0x20d5 /* MX51_PAD_SD1_CLK__SD1_CLK */ | ||
| 268 | 672 0x20d5 /* MX51_PAD_SD1_DATA0__SD1_DATA0 */ | ||
| 269 | 678 0x20d5 /* MX51_PAD_SD1_DATA1__SD1_DATA1 */ | ||
| 270 | 684 0x20d5 /* MX51_PAD_SD1_DATA2__SD1_DATA2 */ | ||
| 271 | 691 0x20d5 /* MX51_PAD_SD1_DATA3__SD1_DATA3 */ | ||
| 272 | >; | ||
| 273 | }; | ||
| 274 | }; | ||
| 275 | |||
| 276 | esdhc2 { | ||
| 277 | pinctrl_esdhc2_1: esdhc2grp-1 { | ||
| 278 | fsl,pins = < | ||
| 279 | 704 0x400020d5 /* MX51_PAD_SD2_CMD__SD2_CMD */ | ||
| 280 | 707 0x20d5 /* MX51_PAD_SD2_CLK__SD2_CLK */ | ||
| 281 | 710 0x20d5 /* MX51_PAD_SD2_DATA0__SD2_DATA0 */ | ||
| 282 | 712 0x20d5 /* MX51_PAD_SD2_DATA1__SD2_DATA1 */ | ||
| 283 | 715 0x20d5 /* MX51_PAD_SD2_DATA2__SD2_DATA2 */ | ||
| 284 | 719 0x20d5 /* MX51_PAD_SD2_DATA3__SD2_DATA3 */ | ||
| 285 | >; | ||
| 286 | }; | ||
| 287 | }; | ||
| 288 | |||
| 289 | i2c2 { | ||
| 290 | pinctrl_i2c2_1: i2c2grp-1 { | ||
| 291 | fsl,pins = < | ||
| 292 | 449 0x400001ed /* MX51_PAD_KEY_COL4__I2C2_SCL */ | ||
| 293 | 454 0x400001ed /* MX51_PAD_KEY_COL5__I2C2_SDA */ | ||
| 294 | >; | ||
| 295 | }; | ||
| 296 | }; | ||
| 297 | |||
| 298 | uart1 { | ||
| 299 | pinctrl_uart1_1: uart1grp-1 { | ||
| 300 | fsl,pins = < | ||
| 301 | 413 0x1c5 /* MX51_PAD_UART1_RXD__UART1_RXD */ | ||
| 302 | 416 0x1c5 /* MX51_PAD_UART1_TXD__UART1_TXD */ | ||
| 303 | 418 0x1c5 /* MX51_PAD_UART1_RTS__UART1_RTS */ | ||
| 304 | 420 0x1c5 /* MX51_PAD_UART1_CTS__UART1_CTS */ | ||
| 305 | >; | ||
| 306 | }; | ||
| 307 | }; | ||
| 308 | |||
| 309 | uart2 { | ||
| 310 | pinctrl_uart2_1: uart2grp-1 { | ||
| 311 | fsl,pins = < | ||
| 312 | 423 0x1c5 /* MX51_PAD_UART2_RXD__UART2_RXD */ | ||
| 313 | 426 0x1c5 /* MX51_PAD_UART2_TXD__UART2_TXD */ | ||
| 314 | >; | ||
| 315 | }; | ||
| 316 | }; | ||
| 317 | |||
| 318 | uart3 { | ||
| 319 | pinctrl_uart3_1: uart3grp-1 { | ||
| 320 | fsl,pins = < | ||
| 321 | 54 0x1c5 /* MX51_PAD_EIM_D25__UART3_RXD */ | ||
| 322 | 59 0x1c5 /* MX51_PAD_EIM_D26__UART3_TXD */ | ||
| 323 | 65 0x1c5 /* MX51_PAD_EIM_D27__UART3_RTS */ | ||
| 324 | 49 0x1c5 /* MX51_PAD_EIM_D24__UART3_CTS */ | ||
| 325 | >; | ||
| 326 | }; | ||
| 327 | }; | ||
| 328 | }; | ||
| 329 | |||
| 187 | uart1: serial@73fbc000 { | 330 | uart1: serial@73fbc000 { |
| 188 | compatible = "fsl,imx51-uart", "fsl,imx21-uart"; | 331 | compatible = "fsl,imx51-uart", "fsl,imx21-uart"; |
| 189 | reg = <0x73fbc000 0x4000>; | 332 | reg = <0x73fbc000 0x4000>; |
| @@ -219,6 +362,7 @@ | |||
| 219 | compatible = "fsl,imx51-sdma", "fsl,imx35-sdma"; | 362 | compatible = "fsl,imx51-sdma", "fsl,imx35-sdma"; |
| 220 | reg = <0x83fb0000 0x4000>; | 363 | reg = <0x83fb0000 0x4000>; |
| 221 | interrupts = <6>; | 364 | interrupts = <6>; |
| 365 | fsl,sdma-ram-script-name = "imx/sdma/sdma-imx51.bin"; | ||
| 222 | }; | 366 | }; |
| 223 | 367 | ||
| 224 | cspi@83fc0000 { | 368 | cspi@83fc0000 { |
diff --git a/arch/arm/boot/dts/imx53-ard.dts b/arch/arm/boot/dts/imx53-ard.dts index da895e93a999..4be76f223526 100644 --- a/arch/arm/boot/dts/imx53-ard.dts +++ b/arch/arm/boot/dts/imx53-ard.dts | |||
| @@ -25,31 +25,66 @@ | |||
| 25 | aips@50000000 { /* AIPS1 */ | 25 | aips@50000000 { /* AIPS1 */ |
| 26 | spba@50000000 { | 26 | spba@50000000 { |
| 27 | esdhc@50004000 { /* ESDHC1 */ | 27 | esdhc@50004000 { /* ESDHC1 */ |
| 28 | pinctrl-names = "default"; | ||
| 29 | pinctrl-0 = <&pinctrl_esdhc1_2>; | ||
| 28 | cd-gpios = <&gpio1 1 0>; | 30 | cd-gpios = <&gpio1 1 0>; |
| 29 | wp-gpios = <&gpio1 9 0>; | 31 | wp-gpios = <&gpio1 9 0>; |
| 30 | status = "okay"; | 32 | status = "okay"; |
| 31 | }; | 33 | }; |
| 32 | }; | 34 | }; |
| 33 | 35 | ||
| 34 | wdog@53f98000 { /* WDOG1 */ | ||
| 35 | status = "okay"; | ||
| 36 | }; | ||
| 37 | |||
| 38 | iomuxc@53fa8000 { | 36 | iomuxc@53fa8000 { |
| 39 | compatible = "fsl,imx53-iomuxc-ard"; | 37 | pinctrl-names = "default"; |
| 40 | reg = <0x53fa8000 0x4000>; | 38 | pinctrl-0 = <&pinctrl_hog>; |
| 39 | |||
| 40 | hog { | ||
| 41 | pinctrl_hog: hoggrp { | ||
| 42 | fsl,pins = < | ||
| 43 | 1077 0x80000000 /* MX53_PAD_GPIO_1__GPIO1_1 */ | ||
| 44 | 1085 0x80000000 /* MX53_PAD_GPIO_9__GPIO1_9 */ | ||
| 45 | 486 0x80000000 /* MX53_PAD_EIM_EB3__GPIO2_31 */ | ||
| 46 | 739 0x80000000 /* MX53_PAD_GPIO_10__GPIO4_0 */ | ||
| 47 | 218 0x80000000 /* MX53_PAD_DISP0_DAT16__GPIO5_10 */ | ||
| 48 | 226 0x80000000 /* MX53_PAD_DISP0_DAT17__GPIO5_11 */ | ||
| 49 | 233 0x80000000 /* MX53_PAD_DISP0_DAT18__GPIO5_12 */ | ||
| 50 | 241 0x80000000 /* MX53_PAD_DISP0_DAT19__GPIO5_13 */ | ||
| 51 | 429 0x80000000 /* MX53_PAD_EIM_D16__EMI_WEIM_D_16 */ | ||
| 52 | 435 0x80000000 /* MX53_PAD_EIM_D17__EMI_WEIM_D_17 */ | ||
| 53 | 441 0x80000000 /* MX53_PAD_EIM_D18__EMI_WEIM_D_18 */ | ||
| 54 | 448 0x80000000 /* MX53_PAD_EIM_D19__EMI_WEIM_D_19 */ | ||
| 55 | 456 0x80000000 /* MX53_PAD_EIM_D20__EMI_WEIM_D_20 */ | ||
| 56 | 464 0x80000000 /* MX53_PAD_EIM_D21__EMI_WEIM_D_21 */ | ||
| 57 | 471 0x80000000 /* MX53_PAD_EIM_D22__EMI_WEIM_D_22 */ | ||
| 58 | 477 0x80000000 /* MX53_PAD_EIM_D23__EMI_WEIM_D_23 */ | ||
| 59 | 492 0x80000000 /* MX53_PAD_EIM_D24__EMI_WEIM_D_24 */ | ||
| 60 | 500 0x80000000 /* MX53_PAD_EIM_D25__EMI_WEIM_D_25 */ | ||
| 61 | 508 0x80000000 /* MX53_PAD_EIM_D26__EMI_WEIM_D_26 */ | ||
| 62 | 516 0x80000000 /* MX53_PAD_EIM_D27__EMI_WEIM_D_27 */ | ||
| 63 | 524 0x80000000 /* MX53_PAD_EIM_D28__EMI_WEIM_D_28 */ | ||
| 64 | 532 0x80000000 /* MX53_PAD_EIM_D29__EMI_WEIM_D_29 */ | ||
| 65 | 540 0x80000000 /* MX53_PAD_EIM_D30__EMI_WEIM_D_30 */ | ||
| 66 | 548 0x80000000 /* MX53_PAD_EIM_D31__EMI_WEIM_D_31 */ | ||
| 67 | 637 0x80000000 /* MX53_PAD_EIM_DA0__EMI_NAND_WEIM_DA_0 */ | ||
| 68 | 642 0x80000000 /* MX53_PAD_EIM_DA1__EMI_NAND_WEIM_DA_1 */ | ||
| 69 | 647 0x80000000 /* MX53_PAD_EIM_DA2__EMI_NAND_WEIM_DA_2 */ | ||
| 70 | 652 0x80000000 /* MX53_PAD_EIM_DA3__EMI_NAND_WEIM_DA_3 */ | ||
| 71 | 657 0x80000000 /* MX53_PAD_EIM_DA4__EMI_NAND_WEIM_DA_4 */ | ||
| 72 | 662 0x80000000 /* MX53_PAD_EIM_DA5__EMI_NAND_WEIM_DA_5 */ | ||
| 73 | 667 0x80000000 /* MX53_PAD_EIM_DA6__EMI_NAND_WEIM_DA_6 */ | ||
| 74 | 611 0x80000000 /* MX53_PAD_EIM_OE__EMI_WEIM_OE */ | ||
| 75 | 616 0x80000000 /* MX53_PAD_EIM_RW__EMI_WEIM_RW */ | ||
| 76 | 607 0x80000000 /* MX53_PAD_EIM_CS1__EMI_WEIM_CS_1 */ | ||
| 77 | >; | ||
| 78 | }; | ||
| 79 | }; | ||
| 41 | }; | 80 | }; |
| 42 | 81 | ||
| 43 | uart1: serial@53fbc000 { | 82 | uart1: serial@53fbc000 { |
| 83 | pinctrl-names = "default"; | ||
| 84 | pinctrl-0 = <&pinctrl_uart1_2>; | ||
| 44 | status = "okay"; | 85 | status = "okay"; |
| 45 | }; | 86 | }; |
| 46 | }; | 87 | }; |
| 47 | |||
| 48 | aips@60000000 { /* AIPS2 */ | ||
| 49 | sdma@63fb0000 { | ||
| 50 | fsl,sdma-ram-script-name = "imx/sdma/sdma-imx53.bin"; | ||
| 51 | }; | ||
| 52 | }; | ||
| 53 | }; | 88 | }; |
| 54 | 89 | ||
| 55 | eim-cs1@f4000000 { | 90 | eim-cs1@f4000000 { |
diff --git a/arch/arm/boot/dts/imx53-evk.dts b/arch/arm/boot/dts/imx53-evk.dts index 9c798034675e..a124d1e25258 100644 --- a/arch/arm/boot/dts/imx53-evk.dts +++ b/arch/arm/boot/dts/imx53-evk.dts | |||
| @@ -25,12 +25,16 @@ | |||
| 25 | aips@50000000 { /* AIPS1 */ | 25 | aips@50000000 { /* AIPS1 */ |
| 26 | spba@50000000 { | 26 | spba@50000000 { |
| 27 | esdhc@50004000 { /* ESDHC1 */ | 27 | esdhc@50004000 { /* ESDHC1 */ |
| 28 | pinctrl-names = "default"; | ||
| 29 | pinctrl-0 = <&pinctrl_esdhc1_1>; | ||
| 28 | cd-gpios = <&gpio3 13 0>; | 30 | cd-gpios = <&gpio3 13 0>; |
| 29 | wp-gpios = <&gpio3 14 0>; | 31 | wp-gpios = <&gpio3 14 0>; |
| 30 | status = "okay"; | 32 | status = "okay"; |
| 31 | }; | 33 | }; |
| 32 | 34 | ||
| 33 | ecspi@50010000 { /* ECSPI1 */ | 35 | ecspi@50010000 { /* ECSPI1 */ |
| 36 | pinctrl-names = "default"; | ||
| 37 | pinctrl-0 = <&pinctrl_ecspi1_1>; | ||
| 34 | fsl,spi-num-chipselects = <2>; | 38 | fsl,spi-num-chipselects = <2>; |
| 35 | cs-gpios = <&gpio2 30 0>, <&gpio3 19 0>; | 39 | cs-gpios = <&gpio2 30 0>, <&gpio3 19 0>; |
| 36 | status = "okay"; | 40 | status = "okay"; |
| @@ -56,32 +60,45 @@ | |||
| 56 | }; | 60 | }; |
| 57 | 61 | ||
| 58 | esdhc@50020000 { /* ESDHC3 */ | 62 | esdhc@50020000 { /* ESDHC3 */ |
| 63 | pinctrl-names = "default"; | ||
| 64 | pinctrl-0 = <&pinctrl_esdhc3_1>; | ||
| 59 | cd-gpios = <&gpio3 11 0>; | 65 | cd-gpios = <&gpio3 11 0>; |
| 60 | wp-gpios = <&gpio3 12 0>; | 66 | wp-gpios = <&gpio3 12 0>; |
| 61 | status = "okay"; | 67 | status = "okay"; |
| 62 | }; | 68 | }; |
| 63 | }; | 69 | }; |
| 64 | 70 | ||
| 65 | wdog@53f98000 { /* WDOG1 */ | ||
| 66 | status = "okay"; | ||
| 67 | }; | ||
| 68 | |||
| 69 | iomuxc@53fa8000 { | 71 | iomuxc@53fa8000 { |
| 70 | compatible = "fsl,imx53-iomuxc-evk"; | 72 | pinctrl-names = "default"; |
| 71 | reg = <0x53fa8000 0x4000>; | 73 | pinctrl-0 = <&pinctrl_hog>; |
| 74 | |||
| 75 | hog { | ||
| 76 | pinctrl_hog: hoggrp { | ||
| 77 | fsl,pins = < | ||
| 78 | 424 0x80000000 /* MX53_PAD_EIM_EB2__GPIO2_30 */ | ||
| 79 | 449 0x80000000 /* MX53_PAD_EIM_D19__GPIO3_19 */ | ||
| 80 | 693 0x80000000 /* MX53_PAD_EIM_DA11__GPIO3_11 */ | ||
| 81 | 697 0x80000000 /* MX53_PAD_EIM_DA12__GPIO3_12 */ | ||
| 82 | 701 0x80000000 /* MX53_PAD_EIM_DA13__GPIO3_13 */ | ||
| 83 | 705 0x80000000 /* MX53_PAD_EIM_DA14__GPIO3_14 */ | ||
| 84 | 868 0x80000000 /* MX53_PAD_PATA_DA_0__GPIO7_6 */ | ||
| 85 | 873 0x80000000 /* MX53_PAD_PATA_DA_1__GPIO7_7 */ | ||
| 86 | >; | ||
| 87 | }; | ||
| 88 | }; | ||
| 72 | }; | 89 | }; |
| 73 | 90 | ||
| 74 | uart1: serial@53fbc000 { | 91 | uart1: serial@53fbc000 { |
| 92 | pinctrl-names = "default"; | ||
| 93 | pinctrl-0 = <&pinctrl_uart1_1>; | ||
| 75 | status = "okay"; | 94 | status = "okay"; |
| 76 | }; | 95 | }; |
| 77 | }; | 96 | }; |
| 78 | 97 | ||
| 79 | aips@60000000 { /* AIPS2 */ | 98 | aips@60000000 { /* AIPS2 */ |
| 80 | sdma@63fb0000 { | ||
| 81 | fsl,sdma-ram-script-name = "imx/sdma/sdma-imx53.bin"; | ||
| 82 | }; | ||
| 83 | |||
| 84 | i2c@63fc4000 { /* I2C2 */ | 99 | i2c@63fc4000 { /* I2C2 */ |
| 100 | pinctrl-names = "default"; | ||
| 101 | pinctrl-0 = <&pinctrl_i2c2_1>; | ||
| 85 | status = "okay"; | 102 | status = "okay"; |
| 86 | 103 | ||
| 87 | pmic: mc13892@08 { | 104 | pmic: mc13892@08 { |
| @@ -96,6 +113,8 @@ | |||
| 96 | }; | 113 | }; |
| 97 | 114 | ||
| 98 | ethernet@63fec000 { | 115 | ethernet@63fec000 { |
| 116 | pinctrl-names = "default"; | ||
| 117 | pinctrl-0 = <&pinctrl_fec_1>; | ||
| 99 | phy-mode = "rmii"; | 118 | phy-mode = "rmii"; |
| 100 | phy-reset-gpios = <&gpio7 6 0>; | 119 | phy-reset-gpios = <&gpio7 6 0>; |
| 101 | status = "okay"; | 120 | status = "okay"; |
diff --git a/arch/arm/boot/dts/imx53-qsb.dts b/arch/arm/boot/dts/imx53-qsb.dts index 2d803a9a6949..08948af86d1a 100644 --- a/arch/arm/boot/dts/imx53-qsb.dts +++ b/arch/arm/boot/dts/imx53-qsb.dts | |||
| @@ -25,6 +25,8 @@ | |||
| 25 | aips@50000000 { /* AIPS1 */ | 25 | aips@50000000 { /* AIPS1 */ |
| 26 | spba@50000000 { | 26 | spba@50000000 { |
| 27 | esdhc@50004000 { /* ESDHC1 */ | 27 | esdhc@50004000 { /* ESDHC1 */ |
| 28 | pinctrl-names = "default"; | ||
| 29 | pinctrl-0 = <&pinctrl_esdhc1_1>; | ||
| 28 | cd-gpios = <&gpio3 13 0>; | 30 | cd-gpios = <&gpio3 13 0>; |
| 29 | status = "okay"; | 31 | status = "okay"; |
| 30 | }; | 32 | }; |
| @@ -35,32 +37,46 @@ | |||
| 35 | }; | 37 | }; |
| 36 | 38 | ||
| 37 | esdhc@50020000 { /* ESDHC3 */ | 39 | esdhc@50020000 { /* ESDHC3 */ |
| 40 | pinctrl-names = "default"; | ||
| 41 | pinctrl-0 = <&pinctrl_esdhc3_1>; | ||
| 38 | cd-gpios = <&gpio3 11 0>; | 42 | cd-gpios = <&gpio3 11 0>; |
| 39 | wp-gpios = <&gpio3 12 0>; | 43 | wp-gpios = <&gpio3 12 0>; |
| 40 | status = "okay"; | 44 | status = "okay"; |
| 41 | }; | 45 | }; |
| 42 | }; | 46 | }; |
| 43 | 47 | ||
| 44 | wdog@53f98000 { /* WDOG1 */ | ||
| 45 | status = "okay"; | ||
| 46 | }; | ||
| 47 | |||
| 48 | iomuxc@53fa8000 { | 48 | iomuxc@53fa8000 { |
| 49 | compatible = "fsl,imx53-iomuxc-qsb"; | 49 | pinctrl-names = "default"; |
| 50 | reg = <0x53fa8000 0x4000>; | 50 | pinctrl-0 = <&pinctrl_hog>; |
| 51 | |||
| 52 | hog { | ||
| 53 | pinctrl_hog: hoggrp { | ||
| 54 | fsl,pins = < | ||
| 55 | 1071 0x80000000 /* MX53_PAD_GPIO_0__CCM_SSI_EXT1_CLK */ | ||
| 56 | 1141 0x80000000 /* MX53_PAD_GPIO_8__GPIO1_8 */ | ||
| 57 | 982 0x80000000 /* MX53_PAD_PATA_DATA14__GPIO2_14 */ | ||
| 58 | 989 0x80000000 /* MX53_PAD_PATA_DATA15__GPIO2_15 */ | ||
| 59 | 693 0x80000000 /* MX53_PAD_EIM_DA11__GPIO3_11 */ | ||
| 60 | 697 0x80000000 /* MX53_PAD_EIM_DA12__GPIO3_12 */ | ||
| 61 | 701 0x80000000 /* MX53_PAD_EIM_DA13__GPIO3_13 */ | ||
| 62 | 868 0x80000000 /* MX53_PAD_PATA_DA_0__GPIO7_6 */ | ||
| 63 | 873 0x80000000 /* MX53_PAD_PATA_DA_1__GPIO7_7 */ | ||
| 64 | >; | ||
| 65 | }; | ||
| 66 | }; | ||
| 51 | }; | 67 | }; |
| 52 | 68 | ||
| 53 | uart1: serial@53fbc000 { | 69 | uart1: serial@53fbc000 { |
| 70 | pinctrl-names = "default"; | ||
| 71 | pinctrl-0 = <&pinctrl_uart1_1>; | ||
| 54 | status = "okay"; | 72 | status = "okay"; |
| 55 | }; | 73 | }; |
| 56 | }; | 74 | }; |
| 57 | 75 | ||
| 58 | aips@60000000 { /* AIPS2 */ | 76 | aips@60000000 { /* AIPS2 */ |
| 59 | sdma@63fb0000 { | ||
| 60 | fsl,sdma-ram-script-name = "imx/sdma/sdma-imx53.bin"; | ||
| 61 | }; | ||
| 62 | |||
| 63 | i2c@63fc4000 { /* I2C2 */ | 77 | i2c@63fc4000 { /* I2C2 */ |
| 78 | pinctrl-names = "default"; | ||
| 79 | pinctrl-0 = <&pinctrl_i2c2_1>; | ||
| 64 | status = "okay"; | 80 | status = "okay"; |
| 65 | 81 | ||
| 66 | sgtl5000: codec@0a { | 82 | sgtl5000: codec@0a { |
| @@ -72,6 +88,8 @@ | |||
| 72 | }; | 88 | }; |
| 73 | 89 | ||
| 74 | i2c@63fc8000 { /* I2C1 */ | 90 | i2c@63fc8000 { /* I2C1 */ |
| 91 | pinctrl-names = "default"; | ||
| 92 | pinctrl-0 = <&pinctrl_i2c1_1>; | ||
| 75 | status = "okay"; | 93 | status = "okay"; |
| 76 | 94 | ||
| 77 | accelerometer: mma8450@1c { | 95 | accelerometer: mma8450@1c { |
| @@ -158,10 +176,14 @@ | |||
| 158 | }; | 176 | }; |
| 159 | 177 | ||
| 160 | audmux@63fd0000 { | 178 | audmux@63fd0000 { |
| 179 | pinctrl-names = "default"; | ||
| 180 | pinctrl-0 = <&pinctrl_audmux_1>; | ||
| 161 | status = "okay"; | 181 | status = "okay"; |
| 162 | }; | 182 | }; |
| 163 | 183 | ||
| 164 | ethernet@63fec000 { | 184 | ethernet@63fec000 { |
| 185 | pinctrl-names = "default"; | ||
| 186 | pinctrl-0 = <&pinctrl_fec_1>; | ||
| 165 | phy-mode = "rmii"; | 187 | phy-mode = "rmii"; |
| 166 | phy-reset-gpios = <&gpio7 6 0>; | 188 | phy-reset-gpios = <&gpio7 6 0>; |
| 167 | status = "okay"; | 189 | status = "okay"; |
diff --git a/arch/arm/boot/dts/imx53-smd.dts b/arch/arm/boot/dts/imx53-smd.dts index 08091029168e..06c68580c842 100644 --- a/arch/arm/boot/dts/imx53-smd.dts +++ b/arch/arm/boot/dts/imx53-smd.dts | |||
| @@ -25,22 +25,30 @@ | |||
| 25 | aips@50000000 { /* AIPS1 */ | 25 | aips@50000000 { /* AIPS1 */ |
| 26 | spba@50000000 { | 26 | spba@50000000 { |
| 27 | esdhc@50004000 { /* ESDHC1 */ | 27 | esdhc@50004000 { /* ESDHC1 */ |
| 28 | pinctrl-names = "default"; | ||
| 29 | pinctrl-0 = <&pinctrl_esdhc1_1>; | ||
| 28 | cd-gpios = <&gpio3 13 0>; | 30 | cd-gpios = <&gpio3 13 0>; |
| 29 | wp-gpios = <&gpio4 11 0>; | 31 | wp-gpios = <&gpio4 11 0>; |
| 30 | status = "okay"; | 32 | status = "okay"; |
| 31 | }; | 33 | }; |
| 32 | 34 | ||
| 33 | esdhc@50008000 { /* ESDHC2 */ | 35 | esdhc@50008000 { /* ESDHC2 */ |
| 36 | pinctrl-names = "default"; | ||
| 37 | pinctrl-0 = <&pinctrl_esdhc2_1>; | ||
| 34 | non-removable; | 38 | non-removable; |
| 35 | status = "okay"; | 39 | status = "okay"; |
| 36 | }; | 40 | }; |
| 37 | 41 | ||
| 38 | uart3: serial@5000c000 { | 42 | uart3: serial@5000c000 { |
| 43 | pinctrl-names = "default"; | ||
| 44 | pinctrl-0 = <&pinctrl_uart3_1>; | ||
| 39 | fsl,uart-has-rtscts; | 45 | fsl,uart-has-rtscts; |
| 40 | status = "okay"; | 46 | status = "okay"; |
| 41 | }; | 47 | }; |
| 42 | 48 | ||
| 43 | ecspi@50010000 { /* ECSPI1 */ | 49 | ecspi@50010000 { /* ECSPI1 */ |
| 50 | pinctrl-names = "default"; | ||
| 51 | pinctrl-0 = <&pinctrl_ecspi1_1>; | ||
| 44 | fsl,spi-num-chipselects = <2>; | 52 | fsl,spi-num-chipselects = <2>; |
| 45 | cs-gpios = <&gpio2 30 0>, <&gpio3 19 0>; | 53 | cs-gpios = <&gpio2 30 0>, <&gpio3 19 0>; |
| 46 | status = "okay"; | 54 | status = "okay"; |
| @@ -72,35 +80,49 @@ | |||
| 72 | }; | 80 | }; |
| 73 | 81 | ||
| 74 | esdhc@50020000 { /* ESDHC3 */ | 82 | esdhc@50020000 { /* ESDHC3 */ |
| 83 | pinctrl-names = "default"; | ||
| 84 | pinctrl-0 = <&pinctrl_esdhc3_1>; | ||
| 75 | non-removable; | 85 | non-removable; |
| 76 | status = "okay"; | 86 | status = "okay"; |
| 77 | }; | 87 | }; |
| 78 | }; | 88 | }; |
| 79 | 89 | ||
| 80 | wdog@53f98000 { /* WDOG1 */ | ||
| 81 | status = "okay"; | ||
| 82 | }; | ||
| 83 | |||
| 84 | iomuxc@53fa8000 { | 90 | iomuxc@53fa8000 { |
| 85 | compatible = "fsl,imx53-iomuxc-smd"; | 91 | pinctrl-names = "default"; |
| 86 | reg = <0x53fa8000 0x4000>; | 92 | pinctrl-0 = <&pinctrl_hog>; |
| 93 | |||
| 94 | hog { | ||
| 95 | pinctrl_hog: hoggrp { | ||
| 96 | fsl,pins = < | ||
| 97 | 982 0x80000000 /* MX53_PAD_PATA_DATA14__GPIO2_14 */ | ||
| 98 | 989 0x80000000 /* MX53_PAD_PATA_DATA15__GPIO2_15 */ | ||
| 99 | 424 0x80000000 /* MX53_PAD_EIM_EB2__GPIO2_30 */ | ||
| 100 | 701 0x80000000 /* MX53_PAD_EIM_DA13__GPIO3_13 */ | ||
| 101 | 449 0x80000000 /* MX53_PAD_EIM_D19__GPIO3_19 */ | ||
| 102 | 43 0x80000000 /* MX53_PAD_KEY_ROW2__GPIO4_11 */ | ||
| 103 | 868 0x80000000 /* MX53_PAD_PATA_DA_0__GPIO7_6 */ | ||
| 104 | >; | ||
| 105 | }; | ||
| 106 | }; | ||
| 87 | }; | 107 | }; |
| 88 | 108 | ||
| 89 | uart1: serial@53fbc000 { | 109 | uart1: serial@53fbc000 { |
| 110 | pinctrl-names = "default"; | ||
| 111 | pinctrl-0 = <&pinctrl_uart1_1>; | ||
| 90 | status = "okay"; | 112 | status = "okay"; |
| 91 | }; | 113 | }; |
| 92 | 114 | ||
| 93 | uart2: serial@53fc0000 { | 115 | uart2: serial@53fc0000 { |
| 116 | pinctrl-names = "default"; | ||
| 117 | pinctrl-0 = <&pinctrl_uart2_1>; | ||
| 94 | status = "okay"; | 118 | status = "okay"; |
| 95 | }; | 119 | }; |
| 96 | }; | 120 | }; |
| 97 | 121 | ||
| 98 | aips@60000000 { /* AIPS2 */ | 122 | aips@60000000 { /* AIPS2 */ |
| 99 | sdma@63fb0000 { | ||
| 100 | fsl,sdma-ram-script-name = "imx/sdma/sdma-imx53.bin"; | ||
| 101 | }; | ||
| 102 | |||
| 103 | i2c@63fc4000 { /* I2C2 */ | 123 | i2c@63fc4000 { /* I2C2 */ |
| 124 | pinctrl-names = "default"; | ||
| 125 | pinctrl-0 = <&pinctrl_i2c2_1>; | ||
| 104 | status = "okay"; | 126 | status = "okay"; |
| 105 | 127 | ||
| 106 | codec: sgtl5000@0a { | 128 | codec: sgtl5000@0a { |
| @@ -120,6 +142,8 @@ | |||
| 120 | }; | 142 | }; |
| 121 | 143 | ||
| 122 | i2c@63fc8000 { /* I2C1 */ | 144 | i2c@63fc8000 { /* I2C1 */ |
| 145 | pinctrl-names = "default"; | ||
| 146 | pinctrl-0 = <&pinctrl_i2c1_1>; | ||
| 123 | status = "okay"; | 147 | status = "okay"; |
| 124 | 148 | ||
| 125 | accelerometer: mma8450@1c { | 149 | accelerometer: mma8450@1c { |
| @@ -139,6 +163,8 @@ | |||
| 139 | }; | 163 | }; |
| 140 | 164 | ||
| 141 | ethernet@63fec000 { | 165 | ethernet@63fec000 { |
| 166 | pinctrl-names = "default"; | ||
| 167 | pinctrl-0 = <&pinctrl_fec_1>; | ||
| 142 | phy-mode = "rmii"; | 168 | phy-mode = "rmii"; |
| 143 | phy-reset-gpios = <&gpio7 6 0>; | 169 | phy-reset-gpios = <&gpio7 6 0>; |
| 144 | status = "okay"; | 170 | status = "okay"; |
diff --git a/arch/arm/boot/dts/imx53.dtsi b/arch/arm/boot/dts/imx53.dtsi index cd37165edce5..221cf3321b0a 100644 --- a/arch/arm/boot/dts/imx53.dtsi +++ b/arch/arm/boot/dts/imx53.dtsi | |||
| @@ -135,6 +135,34 @@ | |||
| 135 | }; | 135 | }; |
| 136 | }; | 136 | }; |
| 137 | 137 | ||
| 138 | usb@53f80000 { | ||
| 139 | compatible = "fsl,imx53-usb", "fsl,imx27-usb"; | ||
| 140 | reg = <0x53f80000 0x0200>; | ||
| 141 | interrupts = <18>; | ||
| 142 | status = "disabled"; | ||
| 143 | }; | ||
| 144 | |||
| 145 | usb@53f80200 { | ||
| 146 | compatible = "fsl,imx53-usb", "fsl,imx27-usb"; | ||
| 147 | reg = <0x53f80200 0x0200>; | ||
| 148 | interrupts = <14>; | ||
| 149 | status = "disabled"; | ||
| 150 | }; | ||
| 151 | |||
| 152 | usb@53f80400 { | ||
| 153 | compatible = "fsl,imx53-usb", "fsl,imx27-usb"; | ||
| 154 | reg = <0x53f80400 0x0200>; | ||
| 155 | interrupts = <16>; | ||
| 156 | status = "disabled"; | ||
| 157 | }; | ||
| 158 | |||
| 159 | usb@53f80600 { | ||
| 160 | compatible = "fsl,imx53-usb", "fsl,imx27-usb"; | ||
| 161 | reg = <0x53f80600 0x0200>; | ||
| 162 | interrupts = <17>; | ||
| 163 | status = "disabled"; | ||
| 164 | }; | ||
| 165 | |||
| 138 | gpio1: gpio@53f84000 { | 166 | gpio1: gpio@53f84000 { |
| 139 | compatible = "fsl,imx53-gpio", "fsl,imx35-gpio"; | 167 | compatible = "fsl,imx53-gpio", "fsl,imx35-gpio"; |
| 140 | reg = <0x53f84000 0x4000>; | 168 | reg = <0x53f84000 0x4000>; |
| @@ -179,7 +207,6 @@ | |||
| 179 | compatible = "fsl,imx53-wdt", "fsl,imx21-wdt"; | 207 | compatible = "fsl,imx53-wdt", "fsl,imx21-wdt"; |
| 180 | reg = <0x53f98000 0x4000>; | 208 | reg = <0x53f98000 0x4000>; |
| 181 | interrupts = <58>; | 209 | interrupts = <58>; |
| 182 | status = "disabled"; | ||
| 183 | }; | 210 | }; |
| 184 | 211 | ||
| 185 | wdog@53f9c000 { /* WDOG2 */ | 212 | wdog@53f9c000 { /* WDOG2 */ |
| @@ -189,6 +216,161 @@ | |||
| 189 | status = "disabled"; | 216 | status = "disabled"; |
| 190 | }; | 217 | }; |
| 191 | 218 | ||
| 219 | iomuxc@53fa8000 { | ||
| 220 | compatible = "fsl,imx53-iomuxc"; | ||
| 221 | reg = <0x53fa8000 0x4000>; | ||
| 222 | |||
| 223 | audmux { | ||
| 224 | pinctrl_audmux_1: audmuxgrp-1 { | ||
| 225 | fsl,pins = < | ||
| 226 | 10 0x80000000 /* MX53_PAD_KEY_COL0__AUDMUX_AUD5_TXC */ | ||
| 227 | 17 0x80000000 /* MX53_PAD_KEY_ROW0__AUDMUX_AUD5_TXD */ | ||
| 228 | 23 0x80000000 /* MX53_PAD_KEY_COL1__AUDMUX_AUD5_TXFS */ | ||
| 229 | 30 0x80000000 /* MX53_PAD_KEY_ROW1__AUDMUX_AUD5_RXD */ | ||
| 230 | >; | ||
| 231 | }; | ||
| 232 | }; | ||
| 233 | |||
| 234 | fec { | ||
| 235 | pinctrl_fec_1: fecgrp-1 { | ||
| 236 | fsl,pins = < | ||
| 237 | 820 0x80000000 /* MX53_PAD_FEC_MDC__FEC_MDC */ | ||
| 238 | 779 0x80000000 /* MX53_PAD_FEC_MDIO__FEC_MDIO */ | ||
| 239 | 786 0x80000000 /* MX53_PAD_FEC_REF_CLK__FEC_TX_CLK */ | ||
| 240 | 791 0x80000000 /* MX53_PAD_FEC_RX_ER__FEC_RX_ER */ | ||
| 241 | 796 0x80000000 /* MX53_PAD_FEC_CRS_DV__FEC_RX_DV */ | ||
| 242 | 799 0x80000000 /* MX53_PAD_FEC_RXD1__FEC_RDATA_1 */ | ||
| 243 | 804 0x80000000 /* MX53_PAD_FEC_RXD0__FEC_RDATA_0 */ | ||
| 244 | 808 0x80000000 /* MX53_PAD_FEC_TX_EN__FEC_TX_EN */ | ||
| 245 | 811 0x80000000 /* MX53_PAD_FEC_TXD1__FEC_TDATA_1 */ | ||
| 246 | 816 0x80000000 /* MX53_PAD_FEC_TXD0__FEC_TDATA_0 */ | ||
| 247 | >; | ||
| 248 | }; | ||
| 249 | }; | ||
| 250 | |||
| 251 | ecspi1 { | ||
| 252 | pinctrl_ecspi1_1: ecspi1grp-1 { | ||
| 253 | fsl,pins = < | ||
| 254 | 433 0x80000000 /* MX53_PAD_EIM_D16__ECSPI1_SCLK */ | ||
| 255 | 439 0x80000000 /* MX53_PAD_EIM_D17__ECSPI1_MISO */ | ||
| 256 | 445 0x80000000 /* MX53_PAD_EIM_D18__ECSPI1_MOSI */ | ||
| 257 | >; | ||
| 258 | }; | ||
| 259 | }; | ||
| 260 | |||
| 261 | esdhc1 { | ||
| 262 | pinctrl_esdhc1_1: esdhc1grp-1 { | ||
| 263 | fsl,pins = < | ||
| 264 | 995 0x1d5 /* MX53_PAD_SD1_DATA0__ESDHC1_DAT0 */ | ||
| 265 | 1000 0x1d5 /* MX53_PAD_SD1_DATA1__ESDHC1_DAT1 */ | ||
| 266 | 1010 0x1d5 /* MX53_PAD_SD1_DATA2__ESDHC1_DAT2 */ | ||
| 267 | 1024 0x1d5 /* MX53_PAD_SD1_DATA3__ESDHC1_DAT3 */ | ||
| 268 | 1005 0x1d5 /* MX53_PAD_SD1_CMD__ESDHC1_CMD */ | ||
| 269 | 1018 0x1d5 /* MX53_PAD_SD1_CLK__ESDHC1_CLK */ | ||
| 270 | >; | ||
| 271 | }; | ||
| 272 | |||
| 273 | pinctrl_esdhc1_2: esdhc1grp-2 { | ||
| 274 | fsl,pins = < | ||
| 275 | 995 0x1d5 /* MX53_PAD_SD1_DATA0__ESDHC1_DAT0 */ | ||
| 276 | 1000 0x1d5 /* MX53_PAD_SD1_DATA1__ESDHC1_DAT1 */ | ||
| 277 | 1010 0x1d5 /* MX53_PAD_SD1_DATA2__ESDHC1_DAT2 */ | ||
| 278 | 1024 0x1d5 /* MX53_PAD_SD1_DATA3__ESDHC1_DAT3 */ | ||
| 279 | 941 0x1d5 /* MX53_PAD_PATA_DATA8__ESDHC1_DAT4 */ | ||
| 280 | 948 0x1d5 /* MX53_PAD_PATA_DATA9__ESDHC1_DAT5 */ | ||
| 281 | 955 0x1d5 /* MX53_PAD_PATA_DATA10__ESDHC1_DAT6 */ | ||
| 282 | 962 0x1d5 /* MX53_PAD_PATA_DATA11__ESDHC1_DAT7 */ | ||
| 283 | 1005 0x1d5 /* MX53_PAD_SD1_CMD__ESDHC1_CMD */ | ||
| 284 | 1018 0x1d5 /* MX53_PAD_SD1_CLK__ESDHC1_CLK */ | ||
| 285 | >; | ||
| 286 | }; | ||
| 287 | }; | ||
| 288 | |||
| 289 | esdhc2 { | ||
| 290 | pinctrl_esdhc2_1: esdhc2grp-1 { | ||
| 291 | fsl,pins = < | ||
| 292 | 1038 0x1d5 /* MX53_PAD_SD2_CMD__ESDHC2_CMD */ | ||
| 293 | 1032 0x1d5 /* MX53_PAD_SD2_CLK__ESDHC2_CLK */ | ||
| 294 | 1062 0x1d5 /* MX53_PAD_SD2_DATA0__ESDHC2_DAT0 */ | ||
| 295 | 1056 0x1d5 /* MX53_PAD_SD2_DATA1__ESDHC2_DAT1 */ | ||
| 296 | 1050 0x1d5 /* MX53_PAD_SD2_DATA2__ESDHC2_DAT2 */ | ||
| 297 | 1044 0x1d5 /* MX53_PAD_SD2_DATA3__ESDHC2_DAT3 */ | ||
| 298 | >; | ||
| 299 | }; | ||
| 300 | }; | ||
| 301 | |||
| 302 | esdhc3 { | ||
| 303 | pinctrl_esdhc3_1: esdhc3grp-1 { | ||
| 304 | fsl,pins = < | ||
| 305 | 943 0x1d5 /* MX53_PAD_PATA_DATA8__ESDHC3_DAT0 */ | ||
| 306 | 950 0x1d5 /* MX53_PAD_PATA_DATA9__ESDHC3_DAT1 */ | ||
| 307 | 957 0x1d5 /* MX53_PAD_PATA_DATA10__ESDHC3_DAT2 */ | ||
| 308 | 964 0x1d5 /* MX53_PAD_PATA_DATA11__ESDHC3_DAT3 */ | ||
| 309 | 893 0x1d5 /* MX53_PAD_PATA_DATA0__ESDHC3_DAT4 */ | ||
| 310 | 900 0x1d5 /* MX53_PAD_PATA_DATA1__ESDHC3_DAT5 */ | ||
| 311 | 906 0x1d5 /* MX53_PAD_PATA_DATA2__ESDHC3_DAT6 */ | ||
| 312 | 912 0x1d5 /* MX53_PAD_PATA_DATA3__ESDHC3_DAT7 */ | ||
| 313 | 857 0x1d5 /* MX53_PAD_PATA_RESET_B__ESDHC3_CMD */ | ||
| 314 | 863 0x1d5 /* MX53_PAD_PATA_IORDY__ESDHC3_CLK */ | ||
| 315 | >; | ||
| 316 | }; | ||
| 317 | }; | ||
| 318 | |||
| 319 | i2c1 { | ||
| 320 | pinctrl_i2c1_1: i2c1grp-1 { | ||
| 321 | fsl,pins = < | ||
| 322 | 333 0xc0000000 /* MX53_PAD_CSI0_DAT8__I2C1_SDA */ | ||
| 323 | 341 0xc0000000 /* MX53_PAD_CSI0_DAT9__I2C1_SCL */ | ||
| 324 | >; | ||
| 325 | }; | ||
| 326 | }; | ||
| 327 | |||
| 328 | i2c2 { | ||
| 329 | pinctrl_i2c2_1: i2c2grp-1 { | ||
| 330 | fsl,pins = < | ||
| 331 | 61 0xc0000000 /* MX53_PAD_KEY_ROW3__I2C2_SDA */ | ||
| 332 | 53 0xc0000000 /* MX53_PAD_KEY_COL3__I2C2_SCL */ | ||
| 333 | >; | ||
| 334 | }; | ||
| 335 | }; | ||
| 336 | |||
| 337 | uart1 { | ||
| 338 | pinctrl_uart1_1: uart1grp-1 { | ||
| 339 | fsl,pins = < | ||
| 340 | 346 0x1c5 /* MX53_PAD_CSI0_DAT10__UART1_TXD_MUX */ | ||
| 341 | 354 0x1c5 /* MX53_PAD_CSI0_DAT11__UART1_RXD_MUX */ | ||
| 342 | >; | ||
| 343 | }; | ||
| 344 | |||
| 345 | pinctrl_uart1_2: uart1grp-2 { | ||
| 346 | fsl,pins = < | ||
| 347 | 828 0x1c5 /* MX53_PAD_PATA_DIOW__UART1_TXD_MUX */ | ||
| 348 | 832 0x1c5 /* MX53_PAD_PATA_DMACK__UART1_RXD_MUX */ | ||
| 349 | >; | ||
| 350 | }; | ||
| 351 | }; | ||
| 352 | |||
| 353 | uart2 { | ||
| 354 | pinctrl_uart2_1: uart2grp-1 { | ||
| 355 | fsl,pins = < | ||
| 356 | 841 0x1c5 /* MX53_PAD_PATA_BUFFER_EN__UART2_RXD_MUX */ | ||
| 357 | 836 0x1c5 /* MX53_PAD_PATA_DMARQ__UART2_TXD_MUX */ | ||
| 358 | >; | ||
| 359 | }; | ||
| 360 | }; | ||
| 361 | |||
| 362 | uart3 { | ||
| 363 | pinctrl_uart3_1: uart3grp-1 { | ||
| 364 | fsl,pins = < | ||
| 365 | 884 0x1c5 /* MX53_PAD_PATA_CS_0__UART3_TXD_MUX */ | ||
| 366 | 888 0x1c5 /* MX53_PAD_PATA_CS_1__UART3_RXD_MUX */ | ||
| 367 | 875 0x1c5 /* MX53_PAD_PATA_DA_1__UART3_CTS */ | ||
| 368 | 880 0x1c5 /* MX53_PAD_PATA_DA_2__UART3_RTS */ | ||
| 369 | >; | ||
| 370 | }; | ||
| 371 | }; | ||
| 372 | }; | ||
| 373 | |||
| 192 | uart1: serial@53fbc000 { | 374 | uart1: serial@53fbc000 { |
| 193 | compatible = "fsl,imx53-uart", "fsl,imx21-uart"; | 375 | compatible = "fsl,imx53-uart", "fsl,imx21-uart"; |
| 194 | reg = <0x53fbc000 0x4000>; | 376 | reg = <0x53fbc000 0x4000>; |
| @@ -203,6 +385,20 @@ | |||
| 203 | status = "disabled"; | 385 | status = "disabled"; |
| 204 | }; | 386 | }; |
| 205 | 387 | ||
| 388 | can1: can@53fc8000 { | ||
| 389 | compatible = "fsl,imx53-flexcan", "fsl,p1010-flexcan"; | ||
| 390 | reg = <0x53fc8000 0x4000>; | ||
| 391 | interrupts = <82>; | ||
| 392 | status = "disabled"; | ||
| 393 | }; | ||
| 394 | |||
| 395 | can2: can@53fcc000 { | ||
| 396 | compatible = "fsl,imx53-flexcan", "fsl,p1010-flexcan"; | ||
| 397 | reg = <0x53fcc000 0x4000>; | ||
| 398 | interrupts = <83>; | ||
| 399 | status = "disabled"; | ||
| 400 | }; | ||
| 401 | |||
| 206 | gpio5: gpio@53fdc000 { | 402 | gpio5: gpio@53fdc000 { |
| 207 | compatible = "fsl,imx53-gpio", "fsl,imx35-gpio"; | 403 | compatible = "fsl,imx53-gpio", "fsl,imx35-gpio"; |
| 208 | reg = <0x53fdc000 0x4000>; | 404 | reg = <0x53fdc000 0x4000>; |
| @@ -277,6 +473,7 @@ | |||
| 277 | compatible = "fsl,imx53-sdma", "fsl,imx35-sdma"; | 473 | compatible = "fsl,imx53-sdma", "fsl,imx35-sdma"; |
| 278 | reg = <0x63fb0000 0x4000>; | 474 | reg = <0x63fb0000 0x4000>; |
| 279 | interrupts = <6>; | 475 | interrupts = <6>; |
| 476 | fsl,sdma-ram-script-name = "imx/sdma/sdma-imx53.bin"; | ||
| 280 | }; | 477 | }; |
| 281 | 478 | ||
| 282 | cspi@63fc0000 { | 479 | cspi@63fc0000 { |
diff --git a/arch/arm/boot/dts/imx6q-arm2.dts b/arch/arm/boot/dts/imx6q-arm2.dts index d792581672cc..15df4c105e89 100644 --- a/arch/arm/boot/dts/imx6q-arm2.dts +++ b/arch/arm/boot/dts/imx6q-arm2.dts | |||
| @@ -28,8 +28,27 @@ | |||
| 28 | status = "disabled"; /* gpmi nand conflicts with SD */ | 28 | status = "disabled"; /* gpmi nand conflicts with SD */ |
| 29 | }; | 29 | }; |
| 30 | 30 | ||
| 31 | aips-bus@02000000 { /* AIPS1 */ | ||
| 32 | iomuxc@020e0000 { | ||
| 33 | pinctrl-names = "default"; | ||
| 34 | pinctrl-0 = <&pinctrl_hog>; | ||
| 35 | |||
| 36 | hog { | ||
| 37 | pinctrl_hog: hoggrp { | ||
| 38 | fsl,pins = < | ||
| 39 | 176 0x80000000 /* MX6Q_PAD_EIM_D25__GPIO_3_25 */ | ||
| 40 | 1363 0x80000000 /* MX6Q_PAD_NANDF_CS0__GPIO_6_11 */ | ||
| 41 | 1369 0x80000000 /* MX6Q_PAD_NANDF_CS1__GPIO_6_14 */ | ||
| 42 | >; | ||
| 43 | }; | ||
| 44 | }; | ||
| 45 | }; | ||
| 46 | }; | ||
| 47 | |||
| 31 | aips-bus@02100000 { /* AIPS2 */ | 48 | aips-bus@02100000 { /* AIPS2 */ |
| 32 | ethernet@02188000 { | 49 | ethernet@02188000 { |
| 50 | pinctrl-names = "default"; | ||
| 51 | pinctrl-0 = <&pinctrl_enet_2>; | ||
| 33 | phy-mode = "rgmii"; | 52 | phy-mode = "rgmii"; |
| 34 | status = "okay"; | 53 | status = "okay"; |
| 35 | }; | 54 | }; |
| @@ -52,6 +71,8 @@ | |||
| 52 | }; | 71 | }; |
| 53 | 72 | ||
| 54 | uart4: serial@021f0000 { | 73 | uart4: serial@021f0000 { |
| 74 | pinctrl-names = "default"; | ||
| 75 | pinctrl-0 = <&pinctrl_uart4_1>; | ||
| 55 | status = "okay"; | 76 | status = "okay"; |
| 56 | }; | 77 | }; |
| 57 | }; | 78 | }; |
diff --git a/arch/arm/boot/dts/imx6q-sabrelite.dts b/arch/arm/boot/dts/imx6q-sabrelite.dts index 72f30f3e6171..d152328285a1 100644 --- a/arch/arm/boot/dts/imx6q-sabrelite.dts +++ b/arch/arm/boot/dts/imx6q-sabrelite.dts | |||
| @@ -46,15 +46,20 @@ | |||
| 46 | 46 | ||
| 47 | iomuxc@020e0000 { | 47 | iomuxc@020e0000 { |
| 48 | pinctrl-names = "default"; | 48 | pinctrl-names = "default"; |
| 49 | pinctrl-0 = <&pinctrl_gpio_hog>; | 49 | pinctrl-0 = <&pinctrl_hog>; |
| 50 | 50 | ||
| 51 | gpios { | 51 | hog { |
| 52 | pinctrl_gpio_hog: gpiohog { | 52 | pinctrl_hog: hoggrp { |
| 53 | fsl,pins = < | 53 | fsl,pins = < |
| 54 | 144 0x80000000 /* MX6Q_PAD_EIM_D22__GPIO_3_22 */ | 54 | 1450 0x80000000 /* MX6Q_PAD_NANDF_D6__GPIO_2_6 */ |
| 55 | 121 0x80000000 /* MX6Q_PAD_EIM_D19__GPIO_3_19 */ | 55 | 1458 0x80000000 /* MX6Q_PAD_NANDF_D7__GPIO_2_7 */ |
| 56 | 953 0x80000000 /* MX6Q_PAD_GPIO_0__CCM_CLKO */ | 56 | 121 0x80000000 /* MX6Q_PAD_EIM_D19__GPIO_3_19 */ |
| 57 | >; | 57 | 144 0x80000000 /* MX6Q_PAD_EIM_D22__GPIO_3_22 */ |
| 58 | 152 0x80000000 /* MX6Q_PAD_EIM_D23__GPIO_3_23 */ | ||
| 59 | 1262 0x80000000 /* MX6Q_PAD_SD3_DAT5__GPIO_7_0 */ | ||
| 60 | 1270 0x1f0b0 /* MX6Q_PAD_SD3_DAT4__GPIO_7_1 */ | ||
| 61 | 953 0x80000000 /* MX6Q_PAD_GPIO_0__CCM_CLKO */ | ||
| 62 | >; | ||
| 58 | }; | 63 | }; |
| 59 | }; | 64 | }; |
| 60 | }; | 65 | }; |
| @@ -63,6 +68,9 @@ | |||
| 63 | aips-bus@02100000 { /* AIPS2 */ | 68 | aips-bus@02100000 { /* AIPS2 */ |
| 64 | usb@02184000 { /* USB OTG */ | 69 | usb@02184000 { /* USB OTG */ |
| 65 | vbus-supply = <®_usb_otg_vbus>; | 70 | vbus-supply = <®_usb_otg_vbus>; |
| 71 | pinctrl-names = "default"; | ||
| 72 | pinctrl-0 = <&pinctrl_usbotg_1>; | ||
| 73 | disable-over-current; | ||
| 66 | status = "okay"; | 74 | status = "okay"; |
| 67 | }; | 75 | }; |
| 68 | 76 | ||
| @@ -71,12 +79,16 @@ | |||
| 71 | }; | 79 | }; |
| 72 | 80 | ||
| 73 | ethernet@02188000 { | 81 | ethernet@02188000 { |
| 82 | pinctrl-names = "default"; | ||
| 83 | pinctrl-0 = <&pinctrl_enet_1>; | ||
| 74 | phy-mode = "rgmii"; | 84 | phy-mode = "rgmii"; |
| 75 | phy-reset-gpios = <&gpio3 23 0>; | 85 | phy-reset-gpios = <&gpio3 23 0>; |
| 76 | status = "okay"; | 86 | status = "okay"; |
| 77 | }; | 87 | }; |
| 78 | 88 | ||
| 79 | usdhc@02198000 { /* uSDHC3 */ | 89 | usdhc@02198000 { /* uSDHC3 */ |
| 90 | pinctrl-names = "default"; | ||
| 91 | pinctrl-0 = <&pinctrl_usdhc3_2>; | ||
| 80 | cd-gpios = <&gpio7 0 0>; | 92 | cd-gpios = <&gpio7 0 0>; |
| 81 | wp-gpios = <&gpio7 1 0>; | 93 | wp-gpios = <&gpio7 1 0>; |
| 82 | vmmc-supply = <®_3p3v>; | 94 | vmmc-supply = <®_3p3v>; |
| @@ -84,6 +96,8 @@ | |||
| 84 | }; | 96 | }; |
| 85 | 97 | ||
| 86 | usdhc@0219c000 { /* uSDHC4 */ | 98 | usdhc@0219c000 { /* uSDHC4 */ |
| 99 | pinctrl-names = "default"; | ||
| 100 | pinctrl-0 = <&pinctrl_usdhc4_2>; | ||
| 87 | cd-gpios = <&gpio2 6 0>; | 101 | cd-gpios = <&gpio2 6 0>; |
| 88 | wp-gpios = <&gpio2 7 0>; | 102 | wp-gpios = <&gpio2 7 0>; |
| 89 | vmmc-supply = <®_3p3v>; | 103 | vmmc-supply = <®_3p3v>; |
| @@ -99,7 +113,7 @@ | |||
| 99 | uart2: serial@021e8000 { | 113 | uart2: serial@021e8000 { |
| 100 | status = "okay"; | 114 | status = "okay"; |
| 101 | pinctrl-names = "default"; | 115 | pinctrl-names = "default"; |
| 102 | pinctrl-0 = <&pinctrl_serial2_1>; | 116 | pinctrl-0 = <&pinctrl_uart2_1>; |
| 103 | }; | 117 | }; |
| 104 | 118 | ||
| 105 | i2c@021a0000 { /* I2C1 */ | 119 | i2c@021a0000 { /* I2C1 */ |
| @@ -111,6 +125,7 @@ | |||
| 111 | codec: sgtl5000@0a { | 125 | codec: sgtl5000@0a { |
| 112 | compatible = "fsl,sgtl5000"; | 126 | compatible = "fsl,sgtl5000"; |
| 113 | reg = <0x0a>; | 127 | reg = <0x0a>; |
| 128 | clocks = <&clks 169>; | ||
| 114 | VDDA-supply = <®_2p5v>; | 129 | VDDA-supply = <®_2p5v>; |
| 115 | VDDIO-supply = <®_3p3v>; | 130 | VDDIO-supply = <®_3p3v>; |
| 116 | }; | 131 | }; |
diff --git a/arch/arm/boot/dts/imx6q-sabresd.dts b/arch/arm/boot/dts/imx6q-sabresd.dts index 07509a181178..e596c28c214d 100644 --- a/arch/arm/boot/dts/imx6q-sabresd.dts +++ b/arch/arm/boot/dts/imx6q-sabresd.dts | |||
| @@ -22,28 +22,51 @@ | |||
| 22 | }; | 22 | }; |
| 23 | 23 | ||
| 24 | soc { | 24 | soc { |
| 25 | |||
| 26 | aips-bus@02000000 { /* AIPS1 */ | 25 | aips-bus@02000000 { /* AIPS1 */ |
| 27 | spba-bus@02000000 { | 26 | spba-bus@02000000 { |
| 28 | uart1: serial@02020000 { | 27 | uart1: serial@02020000 { |
| 28 | pinctrl-names = "default"; | ||
| 29 | pinctrl-0 = <&pinctrl_uart1_1>; | ||
| 29 | status = "okay"; | 30 | status = "okay"; |
| 30 | }; | 31 | }; |
| 31 | }; | 32 | }; |
| 33 | |||
| 34 | iomuxc@020e0000 { | ||
| 35 | pinctrl-names = "default"; | ||
| 36 | pinctrl-0 = <&pinctrl_hog>; | ||
| 37 | |||
| 38 | hog { | ||
| 39 | pinctrl_hog: hoggrp { | ||
| 40 | fsl,pins = < | ||
| 41 | 1402 0x80000000 /* MX6Q_PAD_NANDF_D0__GPIO_2_0 */ | ||
| 42 | 1410 0x80000000 /* MX6Q_PAD_NANDF_D1__GPIO_2_1 */ | ||
| 43 | 1418 0x80000000 /* MX6Q_PAD_NANDF_D2__GPIO_2_2 */ | ||
| 44 | 1426 0x80000000 /* MX6Q_PAD_NANDF_D3__GPIO_2_3 */ | ||
| 45 | >; | ||
| 46 | }; | ||
| 47 | }; | ||
| 48 | }; | ||
| 32 | }; | 49 | }; |
| 33 | 50 | ||
| 34 | aips-bus@02100000 { /* AIPS2 */ | 51 | aips-bus@02100000 { /* AIPS2 */ |
| 35 | ethernet@02188000 { | 52 | ethernet@02188000 { |
| 53 | pinctrl-names = "default"; | ||
| 54 | pinctrl-0 = <&pinctrl_enet_1>; | ||
| 36 | phy-mode = "rgmii"; | 55 | phy-mode = "rgmii"; |
| 37 | status = "okay"; | 56 | status = "okay"; |
| 38 | }; | 57 | }; |
| 39 | 58 | ||
| 40 | usdhc@02194000 { /* uSDHC2 */ | 59 | usdhc@02194000 { /* uSDHC2 */ |
| 60 | pinctrl-names = "default"; | ||
| 61 | pinctrl-0 = <&pinctrl_usdhc2_1>; | ||
| 41 | cd-gpios = <&gpio2 2 0>; | 62 | cd-gpios = <&gpio2 2 0>; |
| 42 | wp-gpios = <&gpio2 3 0>; | 63 | wp-gpios = <&gpio2 3 0>; |
| 43 | status = "okay"; | 64 | status = "okay"; |
| 44 | }; | 65 | }; |
| 45 | 66 | ||
| 46 | usdhc@02198000 { /* uSDHC3 */ | 67 | usdhc@02198000 { /* uSDHC3 */ |
| 68 | pinctrl-names = "default"; | ||
| 69 | pinctrl-0 = <&pinctrl_usdhc3_1>; | ||
| 47 | cd-gpios = <&gpio2 0 0>; | 70 | cd-gpios = <&gpio2 0 0>; |
| 48 | wp-gpios = <&gpio2 1 0>; | 71 | wp-gpios = <&gpio2 1 0>; |
| 49 | status = "okay"; | 72 | status = "okay"; |
diff --git a/arch/arm/boot/dts/imx6q.dtsi b/arch/arm/boot/dts/imx6q.dtsi index fd57079f71a9..35e5895ba3df 100644 --- a/arch/arm/boot/dts/imx6q.dtsi +++ b/arch/arm/boot/dts/imx6q.dtsi | |||
| @@ -97,18 +97,23 @@ | |||
| 97 | dma-apbh@00110000 { | 97 | dma-apbh@00110000 { |
| 98 | compatible = "fsl,imx6q-dma-apbh", "fsl,imx28-dma-apbh"; | 98 | compatible = "fsl,imx6q-dma-apbh", "fsl,imx28-dma-apbh"; |
| 99 | reg = <0x00110000 0x2000>; | 99 | reg = <0x00110000 0x2000>; |
| 100 | clocks = <&clks 106>; | ||
| 100 | }; | 101 | }; |
| 101 | 102 | ||
| 102 | gpmi-nand@00112000 { | 103 | gpmi-nand@00112000 { |
| 103 | compatible = "fsl,imx6q-gpmi-nand"; | 104 | compatible = "fsl,imx6q-gpmi-nand"; |
| 104 | #address-cells = <1>; | 105 | #address-cells = <1>; |
| 105 | #size-cells = <1>; | 106 | #size-cells = <1>; |
| 106 | reg = <0x00112000 0x2000>, <0x00114000 0x2000>; | 107 | reg = <0x00112000 0x2000>, <0x00114000 0x2000>; |
| 107 | reg-names = "gpmi-nand", "bch"; | 108 | reg-names = "gpmi-nand", "bch"; |
| 108 | interrupts = <0 13 0x04>, <0 15 0x04>; | 109 | interrupts = <0 13 0x04>, <0 15 0x04>; |
| 109 | interrupt-names = "gpmi-dma", "bch"; | 110 | interrupt-names = "gpmi-dma", "bch"; |
| 110 | fsl,gpmi-dma-channel = <0>; | 111 | clocks = <&clks 152>, <&clks 153>, <&clks 151>, |
| 111 | status = "disabled"; | 112 | <&clks 150>, <&clks 149>; |
| 113 | clock-names = "gpmi_io", "gpmi_apb", "gpmi_bch", | ||
| 114 | "gpmi_bch_apb", "per1_bch"; | ||
| 115 | fsl,gpmi-dma-channel = <0>; | ||
| 116 | status = "disabled"; | ||
| 112 | }; | 117 | }; |
| 113 | 118 | ||
| 114 | timer@00a00600 { | 119 | timer@00a00600 { |
| @@ -150,6 +155,8 @@ | |||
| 150 | compatible = "fsl,imx6q-ecspi", "fsl,imx51-ecspi"; | 155 | compatible = "fsl,imx6q-ecspi", "fsl,imx51-ecspi"; |
| 151 | reg = <0x02008000 0x4000>; | 156 | reg = <0x02008000 0x4000>; |
| 152 | interrupts = <0 31 0x04>; | 157 | interrupts = <0 31 0x04>; |
| 158 | clocks = <&clks 112>, <&clks 112>; | ||
| 159 | clock-names = "ipg", "per"; | ||
| 153 | status = "disabled"; | 160 | status = "disabled"; |
| 154 | }; | 161 | }; |
| 155 | 162 | ||
| @@ -159,6 +166,8 @@ | |||
| 159 | compatible = "fsl,imx6q-ecspi", "fsl,imx51-ecspi"; | 166 | compatible = "fsl,imx6q-ecspi", "fsl,imx51-ecspi"; |
| 160 | reg = <0x0200c000 0x4000>; | 167 | reg = <0x0200c000 0x4000>; |
| 161 | interrupts = <0 32 0x04>; | 168 | interrupts = <0 32 0x04>; |
| 169 | clocks = <&clks 113>, <&clks 113>; | ||
| 170 | clock-names = "ipg", "per"; | ||
| 162 | status = "disabled"; | 171 | status = "disabled"; |
| 163 | }; | 172 | }; |
| 164 | 173 | ||
| @@ -168,6 +177,8 @@ | |||
| 168 | compatible = "fsl,imx6q-ecspi", "fsl,imx51-ecspi"; | 177 | compatible = "fsl,imx6q-ecspi", "fsl,imx51-ecspi"; |
| 169 | reg = <0x02010000 0x4000>; | 178 | reg = <0x02010000 0x4000>; |
| 170 | interrupts = <0 33 0x04>; | 179 | interrupts = <0 33 0x04>; |
| 180 | clocks = <&clks 114>, <&clks 114>; | ||
| 181 | clock-names = "ipg", "per"; | ||
| 171 | status = "disabled"; | 182 | status = "disabled"; |
| 172 | }; | 183 | }; |
| 173 | 184 | ||
| @@ -177,6 +188,8 @@ | |||
| 177 | compatible = "fsl,imx6q-ecspi", "fsl,imx51-ecspi"; | 188 | compatible = "fsl,imx6q-ecspi", "fsl,imx51-ecspi"; |
| 178 | reg = <0x02014000 0x4000>; | 189 | reg = <0x02014000 0x4000>; |
| 179 | interrupts = <0 34 0x04>; | 190 | interrupts = <0 34 0x04>; |
| 191 | clocks = <&clks 115>, <&clks 115>; | ||
| 192 | clock-names = "ipg", "per"; | ||
| 180 | status = "disabled"; | 193 | status = "disabled"; |
| 181 | }; | 194 | }; |
| 182 | 195 | ||
| @@ -186,6 +199,8 @@ | |||
| 186 | compatible = "fsl,imx6q-ecspi", "fsl,imx51-ecspi"; | 199 | compatible = "fsl,imx6q-ecspi", "fsl,imx51-ecspi"; |
| 187 | reg = <0x02018000 0x4000>; | 200 | reg = <0x02018000 0x4000>; |
| 188 | interrupts = <0 35 0x04>; | 201 | interrupts = <0 35 0x04>; |
| 202 | clocks = <&clks 116>, <&clks 116>; | ||
| 203 | clock-names = "ipg", "per"; | ||
| 189 | status = "disabled"; | 204 | status = "disabled"; |
| 190 | }; | 205 | }; |
| 191 | 206 | ||
| @@ -193,6 +208,8 @@ | |||
| 193 | compatible = "fsl,imx6q-uart", "fsl,imx21-uart"; | 208 | compatible = "fsl,imx6q-uart", "fsl,imx21-uart"; |
| 194 | reg = <0x02020000 0x4000>; | 209 | reg = <0x02020000 0x4000>; |
| 195 | interrupts = <0 26 0x04>; | 210 | interrupts = <0 26 0x04>; |
| 211 | clocks = <&clks 160>, <&clks 161>; | ||
| 212 | clock-names = "ipg", "per"; | ||
| 196 | status = "disabled"; | 213 | status = "disabled"; |
| 197 | }; | 214 | }; |
| 198 | 215 | ||
| @@ -205,6 +222,7 @@ | |||
| 205 | compatible = "fsl,imx6q-ssi","fsl,imx21-ssi"; | 222 | compatible = "fsl,imx6q-ssi","fsl,imx21-ssi"; |
| 206 | reg = <0x02028000 0x4000>; | 223 | reg = <0x02028000 0x4000>; |
| 207 | interrupts = <0 46 0x04>; | 224 | interrupts = <0 46 0x04>; |
| 225 | clocks = <&clks 178>; | ||
| 208 | fsl,fifo-depth = <15>; | 226 | fsl,fifo-depth = <15>; |
| 209 | fsl,ssi-dma-events = <38 37>; | 227 | fsl,ssi-dma-events = <38 37>; |
| 210 | status = "disabled"; | 228 | status = "disabled"; |
| @@ -214,6 +232,7 @@ | |||
| 214 | compatible = "fsl,imx6q-ssi","fsl,imx21-ssi"; | 232 | compatible = "fsl,imx6q-ssi","fsl,imx21-ssi"; |
| 215 | reg = <0x0202c000 0x4000>; | 233 | reg = <0x0202c000 0x4000>; |
| 216 | interrupts = <0 47 0x04>; | 234 | interrupts = <0 47 0x04>; |
| 235 | clocks = <&clks 179>; | ||
| 217 | fsl,fifo-depth = <15>; | 236 | fsl,fifo-depth = <15>; |
| 218 | fsl,ssi-dma-events = <42 41>; | 237 | fsl,ssi-dma-events = <42 41>; |
| 219 | status = "disabled"; | 238 | status = "disabled"; |
| @@ -223,6 +242,7 @@ | |||
| 223 | compatible = "fsl,imx6q-ssi","fsl,imx21-ssi"; | 242 | compatible = "fsl,imx6q-ssi","fsl,imx21-ssi"; |
| 224 | reg = <0x02030000 0x4000>; | 243 | reg = <0x02030000 0x4000>; |
| 225 | interrupts = <0 48 0x04>; | 244 | interrupts = <0 48 0x04>; |
| 245 | clocks = <&clks 180>; | ||
| 226 | fsl,fifo-depth = <15>; | 246 | fsl,fifo-depth = <15>; |
| 227 | fsl,ssi-dma-events = <46 45>; | 247 | fsl,ssi-dma-events = <46 45>; |
| 228 | status = "disabled"; | 248 | status = "disabled"; |
| @@ -362,20 +382,22 @@ | |||
| 362 | compatible = "fsl,imx6q-wdt", "fsl,imx21-wdt"; | 382 | compatible = "fsl,imx6q-wdt", "fsl,imx21-wdt"; |
| 363 | reg = <0x020bc000 0x4000>; | 383 | reg = <0x020bc000 0x4000>; |
| 364 | interrupts = <0 80 0x04>; | 384 | interrupts = <0 80 0x04>; |
| 365 | status = "disabled"; | 385 | clocks = <&clks 0>; |
| 366 | }; | 386 | }; |
| 367 | 387 | ||
| 368 | wdog@020c0000 { /* WDOG2 */ | 388 | wdog@020c0000 { /* WDOG2 */ |
| 369 | compatible = "fsl,imx6q-wdt", "fsl,imx21-wdt"; | 389 | compatible = "fsl,imx6q-wdt", "fsl,imx21-wdt"; |
| 370 | reg = <0x020c0000 0x4000>; | 390 | reg = <0x020c0000 0x4000>; |
| 371 | interrupts = <0 81 0x04>; | 391 | interrupts = <0 81 0x04>; |
| 392 | clocks = <&clks 0>; | ||
| 372 | status = "disabled"; | 393 | status = "disabled"; |
| 373 | }; | 394 | }; |
| 374 | 395 | ||
| 375 | ccm@020c4000 { | 396 | clks: ccm@020c4000 { |
| 376 | compatible = "fsl,imx6q-ccm"; | 397 | compatible = "fsl,imx6q-ccm"; |
| 377 | reg = <0x020c4000 0x4000>; | 398 | reg = <0x020c4000 0x4000>; |
| 378 | interrupts = <0 87 0x04 0 88 0x04>; | 399 | interrupts = <0 87 0x04 0 88 0x04>; |
| 400 | #clock-cells = <1>; | ||
| 379 | }; | 401 | }; |
| 380 | 402 | ||
| 381 | anatop@020c8000 { | 403 | anatop@020c8000 { |
| @@ -472,12 +494,14 @@ | |||
| 472 | compatible = "fsl,imx6q-usbphy", "fsl,imx23-usbphy"; | 494 | compatible = "fsl,imx6q-usbphy", "fsl,imx23-usbphy"; |
| 473 | reg = <0x020c9000 0x1000>; | 495 | reg = <0x020c9000 0x1000>; |
| 474 | interrupts = <0 44 0x04>; | 496 | interrupts = <0 44 0x04>; |
| 497 | clocks = <&clks 182>; | ||
| 475 | }; | 498 | }; |
| 476 | 499 | ||
| 477 | usbphy2: usbphy@020ca000 { | 500 | usbphy2: usbphy@020ca000 { |
| 478 | compatible = "fsl,imx6q-usbphy", "fsl,imx23-usbphy"; | 501 | compatible = "fsl,imx6q-usbphy", "fsl,imx23-usbphy"; |
| 479 | reg = <0x020ca000 0x1000>; | 502 | reg = <0x020ca000 0x1000>; |
| 480 | interrupts = <0 45 0x04>; | 503 | interrupts = <0 45 0x04>; |
| 504 | clocks = <&clks 183>; | ||
| 481 | }; | 505 | }; |
| 482 | 506 | ||
| 483 | snvs@020cc000 { | 507 | snvs@020cc000 { |
| @@ -514,86 +538,207 @@ | |||
| 514 | /* shared pinctrl settings */ | 538 | /* shared pinctrl settings */ |
| 515 | audmux { | 539 | audmux { |
| 516 | pinctrl_audmux_1: audmux-1 { | 540 | pinctrl_audmux_1: audmux-1 { |
| 517 | fsl,pins = <18 0x80000000 /* MX6Q_PAD_SD2_DAT0__AUDMUX_AUD4_RXD */ | 541 | fsl,pins = < |
| 518 | 1586 0x80000000 /* MX6Q_PAD_SD2_DAT3__AUDMUX_AUD4_TXC */ | 542 | 18 0x80000000 /* MX6Q_PAD_SD2_DAT0__AUDMUX_AUD4_RXD */ |
| 519 | 11 0x80000000 /* MX6Q_PAD_SD2_DAT2__AUDMUX_AUD4_TXD */ | 543 | 1586 0x80000000 /* MX6Q_PAD_SD2_DAT3__AUDMUX_AUD4_TXC */ |
| 520 | 3 0x80000000>; /* MX6Q_PAD_SD2_DAT1__AUDMUX_AUD4_TXFS */ | 544 | 11 0x80000000 /* MX6Q_PAD_SD2_DAT2__AUDMUX_AUD4_TXD */ |
| 545 | 3 0x80000000 /* MX6Q_PAD_SD2_DAT1__AUDMUX_AUD4_TXFS */ | ||
| 546 | >; | ||
| 547 | }; | ||
| 548 | }; | ||
| 549 | |||
| 550 | ecspi1 { | ||
| 551 | pinctrl_ecspi1_1: ecspi1grp-1 { | ||
| 552 | fsl,pins = < | ||
| 553 | 101 0x100b1 /* MX6Q_PAD_EIM_D17__ECSPI1_MISO */ | ||
| 554 | 109 0x100b1 /* MX6Q_PAD_EIM_D18__ECSPI1_MOSI */ | ||
| 555 | 94 0x100b1 /* MX6Q_PAD_EIM_D16__ECSPI1_SCLK */ | ||
| 556 | >; | ||
| 557 | }; | ||
| 558 | }; | ||
| 559 | |||
| 560 | enet { | ||
| 561 | pinctrl_enet_1: enetgrp-1 { | ||
| 562 | fsl,pins = < | ||
| 563 | 695 0x1b0b0 /* MX6Q_PAD_ENET_MDIO__ENET_MDIO */ | ||
| 564 | 756 0x1b0b0 /* MX6Q_PAD_ENET_MDC__ENET_MDC */ | ||
| 565 | 24 0x1b0b0 /* MX6Q_PAD_RGMII_TXC__ENET_RGMII_TXC */ | ||
| 566 | 30 0x1b0b0 /* MX6Q_PAD_RGMII_TD0__ENET_RGMII_TD0 */ | ||
| 567 | 34 0x1b0b0 /* MX6Q_PAD_RGMII_TD1__ENET_RGMII_TD1 */ | ||
| 568 | 39 0x1b0b0 /* MX6Q_PAD_RGMII_TD2__ENET_RGMII_TD2 */ | ||
| 569 | 44 0x1b0b0 /* MX6Q_PAD_RGMII_TD3__ENET_RGMII_TD3 */ | ||
| 570 | 56 0x1b0b0 /* MX6Q_PAD_RGMII_TX_CTL__RGMII_TX_CTL */ | ||
| 571 | 702 0x1b0b0 /* MX6Q_PAD_ENET_REF_CLK__ENET_TX_CLK */ | ||
| 572 | 74 0x1b0b0 /* MX6Q_PAD_RGMII_RXC__ENET_RGMII_RXC */ | ||
| 573 | 52 0x1b0b0 /* MX6Q_PAD_RGMII_RD0__ENET_RGMII_RD0 */ | ||
| 574 | 61 0x1b0b0 /* MX6Q_PAD_RGMII_RD1__ENET_RGMII_RD1 */ | ||
| 575 | 66 0x1b0b0 /* MX6Q_PAD_RGMII_RD2__ENET_RGMII_RD2 */ | ||
| 576 | 70 0x1b0b0 /* MX6Q_PAD_RGMII_RD3__ENET_RGMII_RD3 */ | ||
| 577 | 48 0x1b0b0 /* MX6Q_PAD_RGMII_RX_CTL__RGMII_RX_CTL */ | ||
| 578 | >; | ||
| 579 | }; | ||
| 580 | |||
| 581 | pinctrl_enet_2: enetgrp-2 { | ||
| 582 | fsl,pins = < | ||
| 583 | 890 0x1b0b0 /* MX6Q_PAD_KEY_COL1__ENET_MDIO */ | ||
| 584 | 909 0x1b0b0 /* MX6Q_PAD_KEY_COL2__ENET_MDC */ | ||
| 585 | 24 0x1b0b0 /* MX6Q_PAD_RGMII_TXC__ENET_RGMII_TXC */ | ||
| 586 | 30 0x1b0b0 /* MX6Q_PAD_RGMII_TD0__ENET_RGMII_TD0 */ | ||
| 587 | 34 0x1b0b0 /* MX6Q_PAD_RGMII_TD1__ENET_RGMII_TD1 */ | ||
| 588 | 39 0x1b0b0 /* MX6Q_PAD_RGMII_TD2__ENET_RGMII_TD2 */ | ||
| 589 | 44 0x1b0b0 /* MX6Q_PAD_RGMII_TD3__ENET_RGMII_TD3 */ | ||
| 590 | 56 0x1b0b0 /* MX6Q_PAD_RGMII_TX_CTL__RGMII_TX_CTL */ | ||
| 591 | 702 0x1b0b0 /* MX6Q_PAD_ENET_REF_CLK__ENET_TX_CLK */ | ||
| 592 | 74 0x1b0b0 /* MX6Q_PAD_RGMII_RXC__ENET_RGMII_RXC */ | ||
| 593 | 52 0x1b0b0 /* MX6Q_PAD_RGMII_RD0__ENET_RGMII_RD0 */ | ||
| 594 | 61 0x1b0b0 /* MX6Q_PAD_RGMII_RD1__ENET_RGMII_RD1 */ | ||
| 595 | 66 0x1b0b0 /* MX6Q_PAD_RGMII_RD2__ENET_RGMII_RD2 */ | ||
| 596 | 70 0x1b0b0 /* MX6Q_PAD_RGMII_RD3__ENET_RGMII_RD3 */ | ||
| 597 | 48 0x1b0b0 /* MX6Q_PAD_RGMII_RX_CTL__RGMII_RX_CTL */ | ||
| 598 | >; | ||
| 521 | }; | 599 | }; |
| 522 | }; | 600 | }; |
| 523 | 601 | ||
| 524 | gpmi-nand { | 602 | gpmi-nand { |
| 525 | pinctrl_gpmi_nand_1: gpmi-nand-1 { | 603 | pinctrl_gpmi_nand_1: gpmi-nand-1 { |
| 526 | fsl,pins = <1328 0xb0b1 /* MX6Q_PAD_NANDF_CLE__RAWNAND_CLE */ | 604 | fsl,pins = < |
| 527 | 1336 0xb0b1 /* MX6Q_PAD_NANDF_ALE__RAWNAND_ALE */ | 605 | 1328 0xb0b1 /* MX6Q_PAD_NANDF_CLE__RAWNAND_CLE */ |
| 528 | 1344 0xb0b1 /* MX6Q_PAD_NANDF_WP_B__RAWNAND_RESETN */ | 606 | 1336 0xb0b1 /* MX6Q_PAD_NANDF_ALE__RAWNAND_ALE */ |
| 529 | 1352 0xb000 /* MX6Q_PAD_NANDF_RB0__RAWNAND_READY0 */ | 607 | 1344 0xb0b1 /* MX6Q_PAD_NANDF_WP_B__RAWNAND_RESETN */ |
| 530 | 1360 0xb0b1 /* MX6Q_PAD_NANDF_CS0__RAWNAND_CE0N */ | 608 | 1352 0xb000 /* MX6Q_PAD_NANDF_RB0__RAWNAND_READY0 */ |
| 531 | 1365 0xb0b1 /* MX6Q_PAD_NANDF_CS1__RAWNAND_CE1N */ | 609 | 1360 0xb0b1 /* MX6Q_PAD_NANDF_CS0__RAWNAND_CE0N */ |
| 532 | 1371 0xb0b1 /* MX6Q_PAD_NANDF_CS2__RAWNAND_CE2N */ | 610 | 1365 0xb0b1 /* MX6Q_PAD_NANDF_CS1__RAWNAND_CE1N */ |
| 533 | 1378 0xb0b1 /* MX6Q_PAD_NANDF_CS3__RAWNAND_CE3N */ | 611 | 1371 0xb0b1 /* MX6Q_PAD_NANDF_CS2__RAWNAND_CE2N */ |
| 534 | 1387 0xb0b1 /* MX6Q_PAD_SD4_CMD__RAWNAND_RDN */ | 612 | 1378 0xb0b1 /* MX6Q_PAD_NANDF_CS3__RAWNAND_CE3N */ |
| 535 | 1393 0xb0b1 /* MX6Q_PAD_SD4_CLK__RAWNAND_WRN */ | 613 | 1387 0xb0b1 /* MX6Q_PAD_SD4_CMD__RAWNAND_RDN */ |
| 536 | 1397 0xb0b1 /* MX6Q_PAD_NANDF_D0__RAWNAND_D0 */ | 614 | 1393 0xb0b1 /* MX6Q_PAD_SD4_CLK__RAWNAND_WRN */ |
| 537 | 1405 0xb0b1 /* MX6Q_PAD_NANDF_D1__RAWNAND_D1 */ | 615 | 1397 0xb0b1 /* MX6Q_PAD_NANDF_D0__RAWNAND_D0 */ |
| 538 | 1413 0xb0b1 /* MX6Q_PAD_NANDF_D2__RAWNAND_D2 */ | 616 | 1405 0xb0b1 /* MX6Q_PAD_NANDF_D1__RAWNAND_D1 */ |
| 539 | 1421 0xb0b1 /* MX6Q_PAD_NANDF_D3__RAWNAND_D3 */ | 617 | 1413 0xb0b1 /* MX6Q_PAD_NANDF_D2__RAWNAND_D2 */ |
| 540 | 1429 0xb0b1 /* MX6Q_PAD_NANDF_D4__RAWNAND_D4 */ | 618 | 1421 0xb0b1 /* MX6Q_PAD_NANDF_D3__RAWNAND_D3 */ |
| 541 | 1437 0xb0b1 /* MX6Q_PAD_NANDF_D5__RAWNAND_D5 */ | 619 | 1429 0xb0b1 /* MX6Q_PAD_NANDF_D4__RAWNAND_D4 */ |
| 542 | 1445 0xb0b1 /* MX6Q_PAD_NANDF_D6__RAWNAND_D6 */ | 620 | 1437 0xb0b1 /* MX6Q_PAD_NANDF_D5__RAWNAND_D5 */ |
| 543 | 1453 0xb0b1 /* MX6Q_PAD_NANDF_D7__RAWNAND_D7 */ | 621 | 1445 0xb0b1 /* MX6Q_PAD_NANDF_D6__RAWNAND_D6 */ |
| 544 | 1463 0x00b1>; /* MX6Q_PAD_SD4_DAT0__RAWNAND_DQS */ | 622 | 1453 0xb0b1 /* MX6Q_PAD_NANDF_D7__RAWNAND_D7 */ |
| 623 | 1463 0x00b1 /* MX6Q_PAD_SD4_DAT0__RAWNAND_DQS */ | ||
| 624 | >; | ||
| 545 | }; | 625 | }; |
| 546 | }; | 626 | }; |
| 547 | 627 | ||
| 548 | i2c1 { | 628 | i2c1 { |
| 549 | pinctrl_i2c1_1: i2c1grp-1 { | 629 | pinctrl_i2c1_1: i2c1grp-1 { |
| 550 | fsl,pins = <137 0x4001b8b1 /* MX6Q_PAD_EIM_D21__I2C1_SCL */ | 630 | fsl,pins = < |
| 551 | 196 0x4001b8b1>; /* MX6Q_PAD_EIM_D28__I2C1_SDA */ | 631 | 137 0x4001b8b1 /* MX6Q_PAD_EIM_D21__I2C1_SCL */ |
| 632 | 196 0x4001b8b1 /* MX6Q_PAD_EIM_D28__I2C1_SDA */ | ||
| 633 | >; | ||
| 634 | }; | ||
| 635 | }; | ||
| 636 | |||
| 637 | uart1 { | ||
| 638 | pinctrl_uart1_1: uart1grp-1 { | ||
| 639 | fsl,pins = < | ||
| 640 | 1140 0x1b0b1 /* MX6Q_PAD_CSI0_DAT10__UART1_TXD */ | ||
| 641 | 1148 0x1b0b1 /* MX6Q_PAD_CSI0_DAT11__UART1_RXD */ | ||
| 642 | >; | ||
| 552 | }; | 643 | }; |
| 553 | }; | 644 | }; |
| 554 | 645 | ||
| 555 | serial2 { | 646 | uart2 { |
| 556 | pinctrl_serial2_1: serial2grp-1 { | 647 | pinctrl_uart2_1: uart2grp-1 { |
| 557 | fsl,pins = <183 0x1b0b1 /* MX6Q_PAD_EIM_D26__UART2_TXD */ | 648 | fsl,pins = < |
| 558 | 191 0x1b0b1>; /* MX6Q_PAD_EIM_D27__UART2_RXD */ | 649 | 183 0x1b0b1 /* MX6Q_PAD_EIM_D26__UART2_TXD */ |
| 650 | 191 0x1b0b1 /* MX6Q_PAD_EIM_D27__UART2_RXD */ | ||
| 651 | >; | ||
| 652 | }; | ||
| 653 | }; | ||
| 654 | |||
| 655 | uart4 { | ||
| 656 | pinctrl_uart4_1: uart4grp-1 { | ||
| 657 | fsl,pins = < | ||
| 658 | 877 0x1b0b1 /* MX6Q_PAD_KEY_COL0__UART4_TXD */ | ||
| 659 | 885 0x1b0b1 /* MX6Q_PAD_KEY_ROW0__UART4_RXD */ | ||
| 660 | >; | ||
| 661 | }; | ||
| 662 | }; | ||
| 663 | |||
| 664 | usbotg { | ||
| 665 | pinctrl_usbotg_1: usbotggrp-1 { | ||
| 666 | fsl,pins = < | ||
| 667 | 1592 0x17059 /* MX6Q_PAD_GPIO_1__ANATOP_USBOTG_ID */ | ||
| 668 | >; | ||
| 669 | }; | ||
| 670 | }; | ||
| 671 | |||
| 672 | usdhc2 { | ||
| 673 | pinctrl_usdhc2_1: usdhc2grp-1 { | ||
| 674 | fsl,pins = < | ||
| 675 | 1577 0x17059 /* MX6Q_PAD_SD2_CMD__USDHC2_CMD */ | ||
| 676 | 1569 0x10059 /* MX6Q_PAD_SD2_CLK__USDHC2_CLK */ | ||
| 677 | 16 0x17059 /* MX6Q_PAD_SD2_DAT0__USDHC2_DAT0 */ | ||
| 678 | 0 0x17059 /* MX6Q_PAD_SD2_DAT1__USDHC2_DAT1 */ | ||
| 679 | 8 0x17059 /* MX6Q_PAD_SD2_DAT2__USDHC2_DAT2 */ | ||
| 680 | 1583 0x17059 /* MX6Q_PAD_SD2_DAT3__USDHC2_DAT3 */ | ||
| 681 | 1430 0x17059 /* MX6Q_PAD_NANDF_D4__USDHC2_DAT4 */ | ||
| 682 | 1438 0x17059 /* MX6Q_PAD_NANDF_D5__USDHC2_DAT5 */ | ||
| 683 | 1446 0x17059 /* MX6Q_PAD_NANDF_D6__USDHC2_DAT6 */ | ||
| 684 | 1454 0x17059 /* MX6Q_PAD_NANDF_D7__USDHC2_DAT7 */ | ||
| 685 | >; | ||
| 559 | }; | 686 | }; |
| 560 | }; | 687 | }; |
| 561 | 688 | ||
| 562 | usdhc3 { | 689 | usdhc3 { |
| 563 | pinctrl_usdhc3_1: usdhc3grp-1 { | 690 | pinctrl_usdhc3_1: usdhc3grp-1 { |
| 564 | fsl,pins = <1273 0x17059 /* MX6Q_PAD_SD3_CMD__USDHC3_CMD */ | 691 | fsl,pins = < |
| 565 | 1281 0x10059 /* MX6Q_PAD_SD3_CLK__USDHC3_CLK */ | 692 | 1273 0x17059 /* MX6Q_PAD_SD3_CMD__USDHC3_CMD */ |
| 566 | 1289 0x17059 /* MX6Q_PAD_SD3_DAT0__USDHC3_DAT0 */ | 693 | 1281 0x10059 /* MX6Q_PAD_SD3_CLK__USDHC3_CLK */ |
| 567 | 1297 0x17059 /* MX6Q_PAD_SD3_DAT1__USDHC3_DAT1 */ | 694 | 1289 0x17059 /* MX6Q_PAD_SD3_DAT0__USDHC3_DAT0 */ |
| 568 | 1305 0x17059 /* MX6Q_PAD_SD3_DAT2__USDHC3_DAT2 */ | 695 | 1297 0x17059 /* MX6Q_PAD_SD3_DAT1__USDHC3_DAT1 */ |
| 569 | 1312 0x17059 /* MX6Q_PAD_SD3_DAT3__USDHC3_DAT3 */ | 696 | 1305 0x17059 /* MX6Q_PAD_SD3_DAT2__USDHC3_DAT2 */ |
| 570 | 1265 0x17059 /* MX6Q_PAD_SD3_DAT4__USDHC3_DAT4 */ | 697 | 1312 0x17059 /* MX6Q_PAD_SD3_DAT3__USDHC3_DAT3 */ |
| 571 | 1257 0x17059 /* MX6Q_PAD_SD3_DAT5__USDHC3_DAT5 */ | 698 | 1265 0x17059 /* MX6Q_PAD_SD3_DAT4__USDHC3_DAT4 */ |
| 572 | 1249 0x17059 /* MX6Q_PAD_SD3_DAT6__USDHC3_DAT6 */ | 699 | 1257 0x17059 /* MX6Q_PAD_SD3_DAT5__USDHC3_DAT5 */ |
| 573 | 1241 0x17059>; /* MX6Q_PAD_SD3_DAT7__USDHC3_DAT7 */ | 700 | 1249 0x17059 /* MX6Q_PAD_SD3_DAT6__USDHC3_DAT6 */ |
| 701 | 1241 0x17059 /* MX6Q_PAD_SD3_DAT7__USDHC3_DAT7 */ | ||
| 702 | >; | ||
| 703 | }; | ||
| 704 | |||
| 705 | pinctrl_usdhc3_2: usdhc3grp-2 { | ||
| 706 | fsl,pins = < | ||
| 707 | 1273 0x17059 /* MX6Q_PAD_SD3_CMD__USDHC3_CMD */ | ||
| 708 | 1281 0x10059 /* MX6Q_PAD_SD3_CLK__USDHC3_CLK */ | ||
| 709 | 1289 0x17059 /* MX6Q_PAD_SD3_DAT0__USDHC3_DAT0 */ | ||
| 710 | 1297 0x17059 /* MX6Q_PAD_SD3_DAT1__USDHC3_DAT1 */ | ||
| 711 | 1305 0x17059 /* MX6Q_PAD_SD3_DAT2__USDHC3_DAT2 */ | ||
| 712 | 1312 0x17059 /* MX6Q_PAD_SD3_DAT3__USDHC3_DAT3 */ | ||
| 713 | >; | ||
| 574 | }; | 714 | }; |
| 575 | }; | 715 | }; |
| 576 | 716 | ||
| 577 | usdhc4 { | 717 | usdhc4 { |
| 578 | pinctrl_usdhc4_1: usdhc4grp-1 { | 718 | pinctrl_usdhc4_1: usdhc4grp-1 { |
| 579 | fsl,pins = <1386 0x17059 /* MX6Q_PAD_SD4_CMD__USDHC4_CMD */ | 719 | fsl,pins = < |
| 580 | 1392 0x10059 /* MX6Q_PAD_SD4_CLK__USDHC4_CLK */ | 720 | 1386 0x17059 /* MX6Q_PAD_SD4_CMD__USDHC4_CMD */ |
| 581 | 1462 0x17059 /* MX6Q_PAD_SD4_DAT0__USDHC4_DAT0 */ | 721 | 1392 0x10059 /* MX6Q_PAD_SD4_CLK__USDHC4_CLK */ |
| 582 | 1470 0x17059 /* MX6Q_PAD_SD4_DAT1__USDHC4_DAT1 */ | 722 | 1462 0x17059 /* MX6Q_PAD_SD4_DAT0__USDHC4_DAT0 */ |
| 583 | 1478 0x17059 /* MX6Q_PAD_SD4_DAT2__USDHC4_DAT2 */ | 723 | 1470 0x17059 /* MX6Q_PAD_SD4_DAT1__USDHC4_DAT1 */ |
| 584 | 1486 0x17059 /* MX6Q_PAD_SD4_DAT3__USDHC4_DAT3 */ | 724 | 1478 0x17059 /* MX6Q_PAD_SD4_DAT2__USDHC4_DAT2 */ |
| 585 | 1493 0x17059 /* MX6Q_PAD_SD4_DAT4__USDHC4_DAT4 */ | 725 | 1486 0x17059 /* MX6Q_PAD_SD4_DAT3__USDHC4_DAT3 */ |
| 586 | 1501 0x17059 /* MX6Q_PAD_SD4_DAT5__USDHC4_DAT5 */ | 726 | 1493 0x17059 /* MX6Q_PAD_SD4_DAT4__USDHC4_DAT4 */ |
| 587 | 1509 0x17059 /* MX6Q_PAD_SD4_DAT6__USDHC4_DAT6 */ | 727 | 1501 0x17059 /* MX6Q_PAD_SD4_DAT5__USDHC4_DAT5 */ |
| 588 | 1517 0x17059>; /* MX6Q_PAD_SD4_DAT7__USDHC4_DAT7 */ | 728 | 1509 0x17059 /* MX6Q_PAD_SD4_DAT6__USDHC4_DAT6 */ |
| 729 | 1517 0x17059 /* MX6Q_PAD_SD4_DAT7__USDHC4_DAT7 */ | ||
| 730 | >; | ||
| 589 | }; | 731 | }; |
| 590 | }; | ||
| 591 | 732 | ||
| 592 | ecspi1 { | 733 | pinctrl_usdhc4_2: usdhc4grp-2 { |
| 593 | pinctrl_ecspi1_1: ecspi1grp-1 { | 734 | fsl,pins = < |
| 594 | fsl,pins = <101 0x100b1 /* MX6Q_PAD_EIM_D17__ECSPI1_MISO */ | 735 | 1386 0x17059 /* MX6Q_PAD_SD4_CMD__USDHC4_CMD */ |
| 595 | 109 0x100b1 /* MX6Q_PAD_EIM_D18__ECSPI1_MOSI */ | 736 | 1392 0x10059 /* MX6Q_PAD_SD4_CLK__USDHC4_CLK */ |
| 596 | 94 0x100b1>; /* MX6Q_PAD_EIM_D16__ECSPI1_SCLK */ | 737 | 1462 0x17059 /* MX6Q_PAD_SD4_DAT0__USDHC4_DAT0 */ |
| 738 | 1470 0x17059 /* MX6Q_PAD_SD4_DAT1__USDHC4_DAT1 */ | ||
| 739 | 1478 0x17059 /* MX6Q_PAD_SD4_DAT2__USDHC4_DAT2 */ | ||
| 740 | 1486 0x17059 /* MX6Q_PAD_SD4_DAT3__USDHC4_DAT3 */ | ||
| 741 | >; | ||
| 597 | }; | 742 | }; |
| 598 | }; | 743 | }; |
| 599 | }; | 744 | }; |
| @@ -612,6 +757,9 @@ | |||
| 612 | compatible = "fsl,imx6q-sdma", "fsl,imx35-sdma"; | 757 | compatible = "fsl,imx6q-sdma", "fsl,imx35-sdma"; |
| 613 | reg = <0x020ec000 0x4000>; | 758 | reg = <0x020ec000 0x4000>; |
| 614 | interrupts = <0 2 0x04>; | 759 | interrupts = <0 2 0x04>; |
| 760 | clocks = <&clks 155>, <&clks 155>; | ||
| 761 | clock-names = "ipg", "ahb"; | ||
| 762 | fsl,sdma-ram-script-name = "imx/sdma/sdma-imx6q-to1.bin"; | ||
| 615 | }; | 763 | }; |
| 616 | }; | 764 | }; |
| 617 | 765 | ||
| @@ -635,7 +783,9 @@ | |||
| 635 | compatible = "fsl,imx6q-usb", "fsl,imx27-usb"; | 783 | compatible = "fsl,imx6q-usb", "fsl,imx27-usb"; |
| 636 | reg = <0x02184000 0x200>; | 784 | reg = <0x02184000 0x200>; |
| 637 | interrupts = <0 43 0x04>; | 785 | interrupts = <0 43 0x04>; |
| 786 | clocks = <&clks 162>; | ||
| 638 | fsl,usbphy = <&usbphy1>; | 787 | fsl,usbphy = <&usbphy1>; |
| 788 | fsl,usbmisc = <&usbmisc 0>; | ||
| 639 | status = "disabled"; | 789 | status = "disabled"; |
| 640 | }; | 790 | }; |
| 641 | 791 | ||
| @@ -643,7 +793,9 @@ | |||
| 643 | compatible = "fsl,imx6q-usb", "fsl,imx27-usb"; | 793 | compatible = "fsl,imx6q-usb", "fsl,imx27-usb"; |
| 644 | reg = <0x02184200 0x200>; | 794 | reg = <0x02184200 0x200>; |
| 645 | interrupts = <0 40 0x04>; | 795 | interrupts = <0 40 0x04>; |
| 796 | clocks = <&clks 162>; | ||
| 646 | fsl,usbphy = <&usbphy2>; | 797 | fsl,usbphy = <&usbphy2>; |
| 798 | fsl,usbmisc = <&usbmisc 1>; | ||
| 647 | status = "disabled"; | 799 | status = "disabled"; |
| 648 | }; | 800 | }; |
| 649 | 801 | ||
| @@ -651,6 +803,8 @@ | |||
| 651 | compatible = "fsl,imx6q-usb", "fsl,imx27-usb"; | 803 | compatible = "fsl,imx6q-usb", "fsl,imx27-usb"; |
| 652 | reg = <0x02184400 0x200>; | 804 | reg = <0x02184400 0x200>; |
| 653 | interrupts = <0 41 0x04>; | 805 | interrupts = <0 41 0x04>; |
| 806 | clocks = <&clks 162>; | ||
| 807 | fsl,usbmisc = <&usbmisc 2>; | ||
| 654 | status = "disabled"; | 808 | status = "disabled"; |
| 655 | }; | 809 | }; |
| 656 | 810 | ||
| @@ -658,13 +812,24 @@ | |||
| 658 | compatible = "fsl,imx6q-usb", "fsl,imx27-usb"; | 812 | compatible = "fsl,imx6q-usb", "fsl,imx27-usb"; |
| 659 | reg = <0x02184600 0x200>; | 813 | reg = <0x02184600 0x200>; |
| 660 | interrupts = <0 42 0x04>; | 814 | interrupts = <0 42 0x04>; |
| 815 | clocks = <&clks 162>; | ||
| 816 | fsl,usbmisc = <&usbmisc 3>; | ||
| 661 | status = "disabled"; | 817 | status = "disabled"; |
| 662 | }; | 818 | }; |
| 663 | 819 | ||
| 820 | usbmisc: usbmisc@02184800 { | ||
| 821 | #index-cells = <1>; | ||
| 822 | compatible = "fsl,imx6q-usbmisc"; | ||
| 823 | reg = <0x02184800 0x200>; | ||
| 824 | clocks = <&clks 162>; | ||
| 825 | }; | ||
| 826 | |||
| 664 | ethernet@02188000 { | 827 | ethernet@02188000 { |
| 665 | compatible = "fsl,imx6q-fec"; | 828 | compatible = "fsl,imx6q-fec"; |
| 666 | reg = <0x02188000 0x4000>; | 829 | reg = <0x02188000 0x4000>; |
| 667 | interrupts = <0 118 0x04 0 119 0x04>; | 830 | interrupts = <0 118 0x04 0 119 0x04>; |
| 831 | clocks = <&clks 117>, <&clks 117>; | ||
| 832 | clock-names = "ipg", "ahb"; | ||
| 668 | status = "disabled"; | 833 | status = "disabled"; |
| 669 | }; | 834 | }; |
| 670 | 835 | ||
| @@ -677,6 +842,8 @@ | |||
| 677 | compatible = "fsl,imx6q-usdhc"; | 842 | compatible = "fsl,imx6q-usdhc"; |
| 678 | reg = <0x02190000 0x4000>; | 843 | reg = <0x02190000 0x4000>; |
| 679 | interrupts = <0 22 0x04>; | 844 | interrupts = <0 22 0x04>; |
| 845 | clocks = <&clks 163>, <&clks 163>, <&clks 163>; | ||
| 846 | clock-names = "ipg", "ahb", "per"; | ||
| 680 | status = "disabled"; | 847 | status = "disabled"; |
| 681 | }; | 848 | }; |
| 682 | 849 | ||
| @@ -684,6 +851,8 @@ | |||
| 684 | compatible = "fsl,imx6q-usdhc"; | 851 | compatible = "fsl,imx6q-usdhc"; |
| 685 | reg = <0x02194000 0x4000>; | 852 | reg = <0x02194000 0x4000>; |
| 686 | interrupts = <0 23 0x04>; | 853 | interrupts = <0 23 0x04>; |
| 854 | clocks = <&clks 164>, <&clks 164>, <&clks 164>; | ||
| 855 | clock-names = "ipg", "ahb", "per"; | ||
| 687 | status = "disabled"; | 856 | status = "disabled"; |
| 688 | }; | 857 | }; |
| 689 | 858 | ||
| @@ -691,6 +860,8 @@ | |||
| 691 | compatible = "fsl,imx6q-usdhc"; | 860 | compatible = "fsl,imx6q-usdhc"; |
| 692 | reg = <0x02198000 0x4000>; | 861 | reg = <0x02198000 0x4000>; |
| 693 | interrupts = <0 24 0x04>; | 862 | interrupts = <0 24 0x04>; |
| 863 | clocks = <&clks 165>, <&clks 165>, <&clks 165>; | ||
| 864 | clock-names = "ipg", "ahb", "per"; | ||
| 694 | status = "disabled"; | 865 | status = "disabled"; |
| 695 | }; | 866 | }; |
| 696 | 867 | ||
| @@ -698,6 +869,8 @@ | |||
| 698 | compatible = "fsl,imx6q-usdhc"; | 869 | compatible = "fsl,imx6q-usdhc"; |
| 699 | reg = <0x0219c000 0x4000>; | 870 | reg = <0x0219c000 0x4000>; |
| 700 | interrupts = <0 25 0x04>; | 871 | interrupts = <0 25 0x04>; |
| 872 | clocks = <&clks 166>, <&clks 166>, <&clks 166>; | ||
| 873 | clock-names = "ipg", "ahb", "per"; | ||
| 701 | status = "disabled"; | 874 | status = "disabled"; |
| 702 | }; | 875 | }; |
| 703 | 876 | ||
| @@ -707,6 +880,7 @@ | |||
| 707 | compatible = "fsl,imx6q-i2c", "fsl,imx1-i2c"; | 880 | compatible = "fsl,imx6q-i2c", "fsl,imx1-i2c"; |
| 708 | reg = <0x021a0000 0x4000>; | 881 | reg = <0x021a0000 0x4000>; |
| 709 | interrupts = <0 36 0x04>; | 882 | interrupts = <0 36 0x04>; |
| 883 | clocks = <&clks 125>; | ||
| 710 | status = "disabled"; | 884 | status = "disabled"; |
| 711 | }; | 885 | }; |
| 712 | 886 | ||
| @@ -716,6 +890,7 @@ | |||
| 716 | compatible = "fsl,imx6q-i2c", "fsl,imx1-i2c"; | 890 | compatible = "fsl,imx6q-i2c", "fsl,imx1-i2c"; |
| 717 | reg = <0x021a4000 0x4000>; | 891 | reg = <0x021a4000 0x4000>; |
| 718 | interrupts = <0 37 0x04>; | 892 | interrupts = <0 37 0x04>; |
| 893 | clocks = <&clks 126>; | ||
| 719 | status = "disabled"; | 894 | status = "disabled"; |
| 720 | }; | 895 | }; |
| 721 | 896 | ||
| @@ -725,6 +900,7 @@ | |||
| 725 | compatible = "fsl,imx6q-i2c", "fsl,imx1-i2c"; | 900 | compatible = "fsl,imx6q-i2c", "fsl,imx1-i2c"; |
| 726 | reg = <0x021a8000 0x4000>; | 901 | reg = <0x021a8000 0x4000>; |
| 727 | interrupts = <0 38 0x04>; | 902 | interrupts = <0 38 0x04>; |
| 903 | clocks = <&clks 127>; | ||
| 728 | status = "disabled"; | 904 | status = "disabled"; |
| 729 | }; | 905 | }; |
| 730 | 906 | ||
| @@ -788,6 +964,8 @@ | |||
| 788 | compatible = "fsl,imx6q-uart", "fsl,imx21-uart"; | 964 | compatible = "fsl,imx6q-uart", "fsl,imx21-uart"; |
| 789 | reg = <0x021e8000 0x4000>; | 965 | reg = <0x021e8000 0x4000>; |
| 790 | interrupts = <0 27 0x04>; | 966 | interrupts = <0 27 0x04>; |
| 967 | clocks = <&clks 160>, <&clks 161>; | ||
| 968 | clock-names = "ipg", "per"; | ||
| 791 | status = "disabled"; | 969 | status = "disabled"; |
| 792 | }; | 970 | }; |
| 793 | 971 | ||
| @@ -795,6 +973,8 @@ | |||
| 795 | compatible = "fsl,imx6q-uart", "fsl,imx21-uart"; | 973 | compatible = "fsl,imx6q-uart", "fsl,imx21-uart"; |
| 796 | reg = <0x021ec000 0x4000>; | 974 | reg = <0x021ec000 0x4000>; |
| 797 | interrupts = <0 28 0x04>; | 975 | interrupts = <0 28 0x04>; |
| 976 | clocks = <&clks 160>, <&clks 161>; | ||
| 977 | clock-names = "ipg", "per"; | ||
| 798 | status = "disabled"; | 978 | status = "disabled"; |
| 799 | }; | 979 | }; |
| 800 | 980 | ||
| @@ -802,6 +982,8 @@ | |||
| 802 | compatible = "fsl,imx6q-uart", "fsl,imx21-uart"; | 982 | compatible = "fsl,imx6q-uart", "fsl,imx21-uart"; |
| 803 | reg = <0x021f0000 0x4000>; | 983 | reg = <0x021f0000 0x4000>; |
| 804 | interrupts = <0 29 0x04>; | 984 | interrupts = <0 29 0x04>; |
| 985 | clocks = <&clks 160>, <&clks 161>; | ||
| 986 | clock-names = "ipg", "per"; | ||
| 805 | status = "disabled"; | 987 | status = "disabled"; |
| 806 | }; | 988 | }; |
| 807 | 989 | ||
| @@ -809,6 +991,8 @@ | |||
| 809 | compatible = "fsl,imx6q-uart", "fsl,imx21-uart"; | 991 | compatible = "fsl,imx6q-uart", "fsl,imx21-uart"; |
| 810 | reg = <0x021f4000 0x4000>; | 992 | reg = <0x021f4000 0x4000>; |
| 811 | interrupts = <0 30 0x04>; | 993 | interrupts = <0 30 0x04>; |
| 994 | clocks = <&clks 160>, <&clks 161>; | ||
| 995 | clock-names = "ipg", "per"; | ||
| 812 | status = "disabled"; | 996 | status = "disabled"; |
| 813 | }; | 997 | }; |
| 814 | }; | 998 | }; |
diff --git a/arch/arm/boot/dts/mmp2.dtsi b/arch/arm/boot/dts/mmp2.dtsi index 80f74e256408..0514fb41627e 100644 --- a/arch/arm/boot/dts/mmp2.dtsi +++ b/arch/arm/boot/dts/mmp2.dtsi | |||
| @@ -26,6 +26,11 @@ | |||
| 26 | interrupt-parent = <&intc>; | 26 | interrupt-parent = <&intc>; |
| 27 | ranges; | 27 | ranges; |
| 28 | 28 | ||
| 29 | L2: l2-cache { | ||
| 30 | compatible = "marvell,tauros2-cache"; | ||
| 31 | marvell,tauros2-cache-features = <0x3>; | ||
| 32 | }; | ||
| 33 | |||
| 29 | axi@d4200000 { /* AXI */ | 34 | axi@d4200000 { /* AXI */ |
| 30 | compatible = "mrvl,axi-bus", "simple-bus"; | 35 | compatible = "mrvl,axi-bus", "simple-bus"; |
| 31 | #address-cells = <1>; | 36 | #address-cells = <1>; |
diff --git a/arch/arm/boot/dts/msm8660-surf.dts b/arch/arm/boot/dts/msm8660-surf.dts index 45bc4bb04e57..31f2157cd7d7 100644 --- a/arch/arm/boot/dts/msm8660-surf.dts +++ b/arch/arm/boot/dts/msm8660-surf.dts | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | compatible = "qcom,msm8660-surf", "qcom,msm8660"; | 7 | compatible = "qcom,msm8660-surf", "qcom,msm8660"; |
| 8 | interrupt-parent = <&intc>; | 8 | interrupt-parent = <&intc>; |
| 9 | 9 | ||
| 10 | intc: interrupt-controller@02080000 { | 10 | intc: interrupt-controller@2080000 { |
| 11 | compatible = "qcom,msm-8660-qgic"; | 11 | compatible = "qcom,msm-8660-qgic"; |
| 12 | interrupt-controller; | 12 | interrupt-controller; |
| 13 | #interrupt-cells = <3>; | 13 | #interrupt-cells = <3>; |
| @@ -15,6 +15,23 @@ | |||
| 15 | < 0x02081000 0x1000 >; | 15 | < 0x02081000 0x1000 >; |
| 16 | }; | 16 | }; |
| 17 | 17 | ||
| 18 | timer@2000004 { | ||
| 19 | compatible = "qcom,msm-gpt", "qcom,msm-timer"; | ||
| 20 | interrupts = <1 1 0x301>; | ||
| 21 | reg = <0x02000004 0x10>; | ||
| 22 | clock-frequency = <32768>; | ||
| 23 | cpu-offset = <0x40000>; | ||
| 24 | }; | ||
| 25 | |||
| 26 | timer@2000024 { | ||
| 27 | compatible = "qcom,msm-dgt", "qcom,msm-timer"; | ||
| 28 | interrupts = <1 0 0x301>; | ||
| 29 | reg = <0x02000024 0x10>, | ||
| 30 | <0x02000034 0x4>; | ||
| 31 | clock-frequency = <6750000>; | ||
| 32 | cpu-offset = <0x40000>; | ||
| 33 | }; | ||
| 34 | |||
| 18 | serial@19c400000 { | 35 | serial@19c400000 { |
| 19 | compatible = "qcom,msm-hsuart", "qcom,msm-uart"; | 36 | compatible = "qcom,msm-hsuart", "qcom,msm-uart"; |
| 20 | reg = <0x19c40000 0x1000>, | 37 | reg = <0x19c40000 0x1000>, |
diff --git a/arch/arm/boot/dts/msm8960-cdp.dts b/arch/arm/boot/dts/msm8960-cdp.dts new file mode 100644 index 000000000000..9e621b5ad3dd --- /dev/null +++ b/arch/arm/boot/dts/msm8960-cdp.dts | |||
| @@ -0,0 +1,41 @@ | |||
| 1 | /dts-v1/; | ||
| 2 | |||
| 3 | /include/ "skeleton.dtsi" | ||
| 4 | |||
| 5 | / { | ||
| 6 | model = "Qualcomm MSM8960 CDP"; | ||
| 7 | compatible = "qcom,msm8960-cdp", "qcom,msm8960"; | ||
| 8 | interrupt-parent = <&intc>; | ||
| 9 | |||
| 10 | intc: interrupt-controller@2000000 { | ||
| 11 | compatible = "qcom,msm-qgic2"; | ||
| 12 | interrupt-controller; | ||
| 13 | #interrupt-cells = <3>; | ||
| 14 | reg = < 0x02000000 0x1000 >, | ||
| 15 | < 0x02002000 0x1000 >; | ||
| 16 | }; | ||
| 17 | |||
| 18 | timer@200a004 { | ||
| 19 | compatible = "qcom,msm-gpt", "qcom,msm-timer"; | ||
| 20 | interrupts = <1 2 0x301>; | ||
| 21 | reg = <0x0200a004 0x10>; | ||
| 22 | clock-frequency = <32768>; | ||
| 23 | cpu-offset = <0x80000>; | ||
| 24 | }; | ||
| 25 | |||
| 26 | timer@200a024 { | ||
| 27 | compatible = "qcom,msm-dgt", "qcom,msm-timer"; | ||
| 28 | interrupts = <1 1 0x301>; | ||
| 29 | reg = <0x0200a024 0x10>, | ||
| 30 | <0x0200a034 0x4>; | ||
| 31 | clock-frequency = <6750000>; | ||
| 32 | cpu-offset = <0x80000>; | ||
| 33 | }; | ||
| 34 | |||
| 35 | serial@19c400000 { | ||
| 36 | compatible = "qcom,msm-hsuart", "qcom,msm-uart"; | ||
| 37 | reg = <0x16440000 0x1000>, | ||
| 38 | <0x16400000 0x1000>; | ||
| 39 | interrupts = <0 154 0x0>; | ||
| 40 | }; | ||
| 41 | }; | ||
diff --git a/arch/arm/boot/dts/phy3250.dts b/arch/arm/boot/dts/phy3250.dts index 802ec5b2fd00..a7ad85e4b8f9 100644 --- a/arch/arm/boot/dts/phy3250.dts +++ b/arch/arm/boot/dts/phy3250.dts | |||
| @@ -135,13 +135,11 @@ | |||
| 135 | ssp0: ssp@20084000 { | 135 | ssp0: ssp@20084000 { |
| 136 | #address-cells = <1>; | 136 | #address-cells = <1>; |
| 137 | #size-cells = <0>; | 137 | #size-cells = <0>; |
| 138 | pl022,num-chipselects = <1>; | 138 | num-cs = <1>; |
| 139 | cs-gpios = <&gpio 3 5 0>; | 139 | cs-gpios = <&gpio 3 5 0>; |
| 140 | 140 | ||
| 141 | eeprom: at25@0 { | 141 | eeprom: at25@0 { |
| 142 | pl022,hierarchy = <0>; | ||
| 143 | pl022,interface = <0>; | 142 | pl022,interface = <0>; |
| 144 | pl022,slave-tx-disable = <0>; | ||
| 145 | pl022,com-mode = <0>; | 143 | pl022,com-mode = <0>; |
| 146 | pl022,rx-level-trig = <1>; | 144 | pl022,rx-level-trig = <1>; |
| 147 | pl022,tx-level-trig = <1>; | 145 | pl022,tx-level-trig = <1>; |
diff --git a/arch/arm/boot/dts/prima2-cb.dts b/arch/arm/boot/dts/prima2-cb.dts deleted file mode 100644 index 34ae3a64ba25..000000000000 --- a/arch/arm/boot/dts/prima2-cb.dts +++ /dev/null | |||
| @@ -1,424 +0,0 @@ | |||
| 1 | /dts-v1/; | ||
| 2 | / { | ||
| 3 | model = "SiRF Prima2 eVB"; | ||
| 4 | compatible = "sirf,prima2-cb", "sirf,prima2"; | ||
| 5 | #address-cells = <1>; | ||
| 6 | #size-cells = <1>; | ||
| 7 | interrupt-parent = <&intc>; | ||
| 8 | |||
| 9 | memory { | ||
| 10 | reg = <0x00000000 0x20000000>; | ||
| 11 | }; | ||
| 12 | |||
| 13 | chosen { | ||
| 14 | bootargs = "mem=512M real_root=/dev/mmcblk0p2 console=ttyS0 panel=1 bootsplash=true bpp=16 androidboot.console=ttyS1"; | ||
| 15 | linux,stdout-path = &uart1; | ||
| 16 | }; | ||
| 17 | |||
| 18 | cpus { | ||
| 19 | #address-cells = <1>; | ||
| 20 | #size-cells = <0>; | ||
| 21 | |||
| 22 | cpu@0 { | ||
| 23 | reg = <0x0>; | ||
| 24 | d-cache-line-size = <32>; | ||
| 25 | i-cache-line-size = <32>; | ||
| 26 | d-cache-size = <32768>; | ||
| 27 | i-cache-size = <32768>; | ||
| 28 | /* from bootloader */ | ||
| 29 | timebase-frequency = <0>; | ||
| 30 | bus-frequency = <0>; | ||
| 31 | clock-frequency = <0>; | ||
| 32 | }; | ||
| 33 | }; | ||
| 34 | |||
| 35 | axi { | ||
| 36 | compatible = "simple-bus"; | ||
| 37 | #address-cells = <1>; | ||
| 38 | #size-cells = <1>; | ||
| 39 | ranges = <0x40000000 0x40000000 0x80000000>; | ||
| 40 | |||
| 41 | l2-cache-controller@80040000 { | ||
| 42 | compatible = "arm,pl310-cache", "sirf,prima2-pl310-cache"; | ||
| 43 | reg = <0x80040000 0x1000>; | ||
| 44 | interrupts = <59>; | ||
| 45 | arm,tag-latency = <1 1 1>; | ||
| 46 | arm,data-latency = <1 1 1>; | ||
| 47 | arm,filter-ranges = <0 0x40000000>; | ||
| 48 | }; | ||
| 49 | |||
| 50 | intc: interrupt-controller@80020000 { | ||
| 51 | #interrupt-cells = <1>; | ||
| 52 | interrupt-controller; | ||
| 53 | compatible = "sirf,prima2-intc"; | ||
| 54 | reg = <0x80020000 0x1000>; | ||
| 55 | }; | ||
| 56 | |||
| 57 | sys-iobg { | ||
| 58 | compatible = "simple-bus"; | ||
| 59 | #address-cells = <1>; | ||
| 60 | #size-cells = <1>; | ||
| 61 | ranges = <0x88000000 0x88000000 0x40000>; | ||
| 62 | |||
| 63 | clock-controller@88000000 { | ||
| 64 | compatible = "sirf,prima2-clkc"; | ||
| 65 | reg = <0x88000000 0x1000>; | ||
| 66 | interrupts = <3>; | ||
| 67 | }; | ||
| 68 | |||
| 69 | reset-controller@88010000 { | ||
| 70 | compatible = "sirf,prima2-rstc"; | ||
| 71 | reg = <0x88010000 0x1000>; | ||
| 72 | }; | ||
| 73 | |||
| 74 | rsc-controller@88020000 { | ||
| 75 | compatible = "sirf,prima2-rsc"; | ||
| 76 | reg = <0x88020000 0x1000>; | ||
| 77 | }; | ||
| 78 | }; | ||
| 79 | |||
| 80 | mem-iobg { | ||
| 81 | compatible = "simple-bus"; | ||
| 82 | #address-cells = <1>; | ||
| 83 | #size-cells = <1>; | ||
| 84 | ranges = <0x90000000 0x90000000 0x10000>; | ||
| 85 | |||
| 86 | memory-controller@90000000 { | ||
| 87 | compatible = "sirf,prima2-memc"; | ||
| 88 | reg = <0x90000000 0x10000>; | ||
| 89 | interrupts = <27>; | ||
| 90 | }; | ||
| 91 | }; | ||
| 92 | |||
| 93 | disp-iobg { | ||
| 94 | compatible = "simple-bus"; | ||
| 95 | #address-cells = <1>; | ||
| 96 | #size-cells = <1>; | ||
| 97 | ranges = <0x90010000 0x90010000 0x30000>; | ||
| 98 | |||
| 99 | display@90010000 { | ||
| 100 | compatible = "sirf,prima2-lcd"; | ||
| 101 | reg = <0x90010000 0x20000>; | ||
| 102 | interrupts = <30>; | ||
| 103 | }; | ||
| 104 | |||
| 105 | vpp@90020000 { | ||
| 106 | compatible = "sirf,prima2-vpp"; | ||
| 107 | reg = <0x90020000 0x10000>; | ||
| 108 | interrupts = <31>; | ||
| 109 | }; | ||
| 110 | }; | ||
| 111 | |||
| 112 | graphics-iobg { | ||
| 113 | compatible = "simple-bus"; | ||
| 114 | #address-cells = <1>; | ||
| 115 | #size-cells = <1>; | ||
| 116 | ranges = <0x98000000 0x98000000 0x8000000>; | ||
| 117 | |||
| 118 | graphics@98000000 { | ||
| 119 | compatible = "powervr,sgx531"; | ||
| 120 | reg = <0x98000000 0x8000000>; | ||
| 121 | interrupts = <6>; | ||
| 122 | }; | ||
| 123 | }; | ||
| 124 | |||
| 125 | multimedia-iobg { | ||
| 126 | compatible = "simple-bus"; | ||
| 127 | #address-cells = <1>; | ||
| 128 | #size-cells = <1>; | ||
| 129 | ranges = <0xa0000000 0xa0000000 0x8000000>; | ||
| 130 | |||
| 131 | multimedia@a0000000 { | ||
| 132 | compatible = "sirf,prima2-video-codec"; | ||
| 133 | reg = <0xa0000000 0x8000000>; | ||
| 134 | interrupts = <5>; | ||
| 135 | }; | ||
| 136 | }; | ||
| 137 | |||
| 138 | dsp-iobg { | ||
| 139 | compatible = "simple-bus"; | ||
| 140 | #address-cells = <1>; | ||
| 141 | #size-cells = <1>; | ||
| 142 | ranges = <0xa8000000 0xa8000000 0x2000000>; | ||
| 143 | |||
| 144 | dspif@a8000000 { | ||
| 145 | compatible = "sirf,prima2-dspif"; | ||
| 146 | reg = <0xa8000000 0x10000>; | ||
| 147 | interrupts = <9>; | ||
| 148 | }; | ||
| 149 | |||
| 150 | gps@a8010000 { | ||
| 151 | compatible = "sirf,prima2-gps"; | ||
| 152 | reg = <0xa8010000 0x10000>; | ||
| 153 | interrupts = <7>; | ||
| 154 | }; | ||
| 155 | |||
| 156 | dsp@a9000000 { | ||
| 157 | compatible = "sirf,prima2-dsp"; | ||
| 158 | reg = <0xa9000000 0x1000000>; | ||
| 159 | interrupts = <8>; | ||
| 160 | }; | ||
| 161 | }; | ||
| 162 | |||
| 163 | peri-iobg { | ||
| 164 | compatible = "simple-bus"; | ||
| 165 | #address-cells = <1>; | ||
| 166 | #size-cells = <1>; | ||
| 167 | ranges = <0xb0000000 0xb0000000 0x180000>; | ||
| 168 | |||
| 169 | timer@b0020000 { | ||
| 170 | compatible = "sirf,prima2-tick"; | ||
| 171 | reg = <0xb0020000 0x1000>; | ||
| 172 | interrupts = <0>; | ||
| 173 | }; | ||
| 174 | |||
| 175 | nand@b0030000 { | ||
| 176 | compatible = "sirf,prima2-nand"; | ||
| 177 | reg = <0xb0030000 0x10000>; | ||
| 178 | interrupts = <41>; | ||
| 179 | }; | ||
| 180 | |||
| 181 | audio@b0040000 { | ||
| 182 | compatible = "sirf,prima2-audio"; | ||
| 183 | reg = <0xb0040000 0x10000>; | ||
| 184 | interrupts = <35>; | ||
| 185 | }; | ||
| 186 | |||
| 187 | uart0: uart@b0050000 { | ||
| 188 | cell-index = <0>; | ||
| 189 | compatible = "sirf,prima2-uart"; | ||
| 190 | reg = <0xb0050000 0x10000>; | ||
| 191 | interrupts = <17>; | ||
| 192 | }; | ||
| 193 | |||
| 194 | uart1: uart@b0060000 { | ||
| 195 | cell-index = <1>; | ||
| 196 | compatible = "sirf,prima2-uart"; | ||
| 197 | reg = <0xb0060000 0x10000>; | ||
| 198 | interrupts = <18>; | ||
| 199 | }; | ||
| 200 | |||
| 201 | uart2: uart@b0070000 { | ||
| 202 | cell-index = <2>; | ||
| 203 | compatible = "sirf,prima2-uart"; | ||
| 204 | reg = <0xb0070000 0x10000>; | ||
| 205 | interrupts = <19>; | ||
| 206 | }; | ||
| 207 | |||
| 208 | usp0: usp@b0080000 { | ||
| 209 | cell-index = <0>; | ||
| 210 | compatible = "sirf,prima2-usp"; | ||
| 211 | reg = <0xb0080000 0x10000>; | ||
| 212 | interrupts = <20>; | ||
| 213 | }; | ||
| 214 | |||
| 215 | usp1: usp@b0090000 { | ||
| 216 | cell-index = <1>; | ||
| 217 | compatible = "sirf,prima2-usp"; | ||
| 218 | reg = <0xb0090000 0x10000>; | ||
| 219 | interrupts = <21>; | ||
| 220 | }; | ||
| 221 | |||
| 222 | usp2: usp@b00a0000 { | ||
| 223 | cell-index = <2>; | ||
| 224 | compatible = "sirf,prima2-usp"; | ||
| 225 | reg = <0xb00a0000 0x10000>; | ||
| 226 | interrupts = <22>; | ||
| 227 | }; | ||
| 228 | |||
| 229 | dmac0: dma-controller@b00b0000 { | ||
| 230 | cell-index = <0>; | ||
| 231 | compatible = "sirf,prima2-dmac"; | ||
| 232 | reg = <0xb00b0000 0x10000>; | ||
| 233 | interrupts = <12>; | ||
| 234 | }; | ||
| 235 | |||
| 236 | dmac1: dma-controller@b0160000 { | ||
| 237 | cell-index = <1>; | ||
| 238 | compatible = "sirf,prima2-dmac"; | ||
| 239 | reg = <0xb0160000 0x10000>; | ||
| 240 | interrupts = <13>; | ||
| 241 | }; | ||
| 242 | |||
| 243 | vip@b00C0000 { | ||
| 244 | compatible = "sirf,prima2-vip"; | ||
| 245 | reg = <0xb00C0000 0x10000>; | ||
| 246 | }; | ||
| 247 | |||
| 248 | spi0: spi@b00d0000 { | ||
| 249 | cell-index = <0>; | ||
| 250 | compatible = "sirf,prima2-spi"; | ||
| 251 | reg = <0xb00d0000 0x10000>; | ||
| 252 | interrupts = <15>; | ||
| 253 | }; | ||
| 254 | |||
| 255 | spi1: spi@b0170000 { | ||
| 256 | cell-index = <1>; | ||
| 257 | compatible = "sirf,prima2-spi"; | ||
| 258 | reg = <0xb0170000 0x10000>; | ||
| 259 | interrupts = <16>; | ||
| 260 | }; | ||
| 261 | |||
| 262 | i2c0: i2c@b00e0000 { | ||
| 263 | cell-index = <0>; | ||
| 264 | compatible = "sirf,prima2-i2c"; | ||
| 265 | reg = <0xb00e0000 0x10000>; | ||
| 266 | interrupts = <24>; | ||
| 267 | }; | ||
| 268 | |||
| 269 | i2c1: i2c@b00f0000 { | ||
| 270 | cell-index = <1>; | ||
| 271 | compatible = "sirf,prima2-i2c"; | ||
| 272 | reg = <0xb00f0000 0x10000>; | ||
| 273 | interrupts = <25>; | ||
| 274 | }; | ||
| 275 | |||
| 276 | tsc@b0110000 { | ||
| 277 | compatible = "sirf,prima2-tsc"; | ||
| 278 | reg = <0xb0110000 0x10000>; | ||
| 279 | interrupts = <33>; | ||
| 280 | }; | ||
| 281 | |||
| 282 | gpio: gpio-controller@b0120000 { | ||
| 283 | #gpio-cells = <2>; | ||
| 284 | #interrupt-cells = <2>; | ||
| 285 | compatible = "sirf,prima2-gpio-pinmux"; | ||
| 286 | reg = <0xb0120000 0x10000>; | ||
| 287 | gpio-controller; | ||
| 288 | interrupt-controller; | ||
| 289 | }; | ||
| 290 | |||
| 291 | pwm@b0130000 { | ||
| 292 | compatible = "sirf,prima2-pwm"; | ||
| 293 | reg = <0xb0130000 0x10000>; | ||
| 294 | }; | ||
| 295 | |||
| 296 | efusesys@b0140000 { | ||
| 297 | compatible = "sirf,prima2-efuse"; | ||
| 298 | reg = <0xb0140000 0x10000>; | ||
| 299 | }; | ||
| 300 | |||
| 301 | pulsec@b0150000 { | ||
| 302 | compatible = "sirf,prima2-pulsec"; | ||
| 303 | reg = <0xb0150000 0x10000>; | ||
| 304 | interrupts = <48>; | ||
| 305 | }; | ||
| 306 | |||
| 307 | pci-iobg { | ||
| 308 | compatible = "sirf,prima2-pciiobg", "simple-bus"; | ||
| 309 | #address-cells = <1>; | ||
| 310 | #size-cells = <1>; | ||
| 311 | ranges = <0x56000000 0x56000000 0x1b00000>; | ||
| 312 | |||
| 313 | sd0: sdhci@56000000 { | ||
| 314 | cell-index = <0>; | ||
| 315 | compatible = "sirf,prima2-sdhc"; | ||
| 316 | reg = <0x56000000 0x100000>; | ||
| 317 | interrupts = <38>; | ||
| 318 | }; | ||
| 319 | |||
| 320 | sd1: sdhci@56100000 { | ||
| 321 | cell-index = <1>; | ||
| 322 | compatible = "sirf,prima2-sdhc"; | ||
| 323 | reg = <0x56100000 0x100000>; | ||
| 324 | interrupts = <38>; | ||
| 325 | }; | ||
| 326 | |||
| 327 | sd2: sdhci@56200000 { | ||
| 328 | cell-index = <2>; | ||
| 329 | compatible = "sirf,prima2-sdhc"; | ||
| 330 | reg = <0x56200000 0x100000>; | ||
| 331 | interrupts = <23>; | ||
| 332 | }; | ||
| 333 | |||
| 334 | sd3: sdhci@56300000 { | ||
| 335 | cell-index = <3>; | ||
| 336 | compatible = "sirf,prima2-sdhc"; | ||
| 337 | reg = <0x56300000 0x100000>; | ||
| 338 | interrupts = <23>; | ||
| 339 | }; | ||
| 340 | |||
| 341 | sd4: sdhci@56400000 { | ||
| 342 | cell-index = <4>; | ||
| 343 | compatible = "sirf,prima2-sdhc"; | ||
| 344 | reg = <0x56400000 0x100000>; | ||
| 345 | interrupts = <39>; | ||
| 346 | }; | ||
| 347 | |||
| 348 | sd5: sdhci@56500000 { | ||
| 349 | cell-index = <5>; | ||
| 350 | compatible = "sirf,prima2-sdhc"; | ||
| 351 | reg = <0x56500000 0x100000>; | ||
| 352 | interrupts = <39>; | ||
| 353 | }; | ||
| 354 | |||
| 355 | pci-copy@57900000 { | ||
| 356 | compatible = "sirf,prima2-pcicp"; | ||
| 357 | reg = <0x57900000 0x100000>; | ||
| 358 | interrupts = <40>; | ||
| 359 | }; | ||
| 360 | |||
| 361 | rom-interface@57a00000 { | ||
| 362 | compatible = "sirf,prima2-romif"; | ||
| 363 | reg = <0x57a00000 0x100000>; | ||
| 364 | }; | ||
| 365 | }; | ||
| 366 | }; | ||
| 367 | |||
| 368 | rtc-iobg { | ||
| 369 | compatible = "sirf,prima2-rtciobg", "sirf-prima2-rtciobg-bus"; | ||
| 370 | #address-cells = <1>; | ||
| 371 | #size-cells = <1>; | ||
| 372 | reg = <0x80030000 0x10000>; | ||
| 373 | |||
| 374 | gpsrtc@1000 { | ||
| 375 | compatible = "sirf,prima2-gpsrtc"; | ||
| 376 | reg = <0x1000 0x1000>; | ||
| 377 | interrupts = <55 56 57>; | ||
| 378 | }; | ||
| 379 | |||
| 380 | sysrtc@2000 { | ||
| 381 | compatible = "sirf,prima2-sysrtc"; | ||
| 382 | reg = <0x2000 0x1000>; | ||
| 383 | interrupts = <52 53 54>; | ||
| 384 | }; | ||
| 385 | |||
| 386 | pwrc@3000 { | ||
| 387 | compatible = "sirf,prima2-pwrc"; | ||
| 388 | reg = <0x3000 0x1000>; | ||
| 389 | interrupts = <32>; | ||
| 390 | }; | ||
| 391 | }; | ||
| 392 | |||
| 393 | uus-iobg { | ||
| 394 | compatible = "simple-bus"; | ||
| 395 | #address-cells = <1>; | ||
| 396 | #size-cells = <1>; | ||
| 397 | ranges = <0xb8000000 0xb8000000 0x40000>; | ||
| 398 | |||
| 399 | usb0: usb@b00e0000 { | ||
| 400 | compatible = "chipidea,ci13611a-prima2"; | ||
| 401 | reg = <0xb8000000 0x10000>; | ||
| 402 | interrupts = <10>; | ||
| 403 | }; | ||
| 404 | |||
| 405 | usb1: usb@b00f0000 { | ||
| 406 | compatible = "chipidea,ci13611a-prima2"; | ||
| 407 | reg = <0xb8010000 0x10000>; | ||
| 408 | interrupts = <11>; | ||
| 409 | }; | ||
| 410 | |||
| 411 | sata@b00f0000 { | ||
| 412 | compatible = "synopsys,dwc-ahsata"; | ||
| 413 | reg = <0xb8020000 0x10000>; | ||
| 414 | interrupts = <37>; | ||
| 415 | }; | ||
| 416 | |||
| 417 | security@b00f0000 { | ||
| 418 | compatible = "sirf,prima2-security"; | ||
| 419 | reg = <0xb8030000 0x10000>; | ||
| 420 | interrupts = <42>; | ||
| 421 | }; | ||
| 422 | }; | ||
| 423 | }; | ||
| 424 | }; | ||
diff --git a/arch/arm/boot/dts/prima2-evb.dts b/arch/arm/boot/dts/prima2-evb.dts new file mode 100644 index 000000000000..57286b4e7b87 --- /dev/null +++ b/arch/arm/boot/dts/prima2-evb.dts | |||
| @@ -0,0 +1,37 @@ | |||
| 1 | /* | ||
| 2 | * DTS file for CSR SiRFprimaII Evaluation Board | ||
| 3 | * | ||
| 4 | * Copyright (c) 2012 Cambridge Silicon Radio Limited, a CSR plc group company. | ||
| 5 | * | ||
| 6 | * Licensed under GPLv2 or later. | ||
| 7 | */ | ||
| 8 | |||
| 9 | /dts-v1/; | ||
| 10 | |||
| 11 | /include/ "prima2.dtsi" | ||
| 12 | |||
| 13 | / { | ||
| 14 | model = "CSR SiRFprimaII Evaluation Board"; | ||
| 15 | compatible = "sirf,prima2", "sirf,prima2-cb"; | ||
| 16 | |||
| 17 | memory { | ||
| 18 | reg = <0x00000000 0x20000000>; | ||
| 19 | }; | ||
| 20 | |||
| 21 | axi { | ||
| 22 | peri-iobg { | ||
| 23 | uart@b0060000 { | ||
| 24 | pinctrl-names = "default"; | ||
| 25 | pinctrl-0 = <&uart1_pins_a>; | ||
| 26 | }; | ||
| 27 | spi@b00d0000 { | ||
| 28 | pinctrl-names = "default"; | ||
| 29 | pinctrl-0 = <&spi0_pins_a>; | ||
| 30 | }; | ||
| 31 | spi@b0170000 { | ||
| 32 | pinctrl-names = "default"; | ||
| 33 | pinctrl-0 = <&spi1_pins_a>; | ||
| 34 | }; | ||
| 35 | }; | ||
| 36 | }; | ||
| 37 | }; | ||
diff --git a/arch/arm/boot/dts/prima2.dtsi b/arch/arm/boot/dts/prima2.dtsi new file mode 100644 index 000000000000..055fca542120 --- /dev/null +++ b/arch/arm/boot/dts/prima2.dtsi | |||
| @@ -0,0 +1,640 @@ | |||
| 1 | /* | ||
| 2 | * DTS file for CSR SiRFprimaII SoC | ||
| 3 | * | ||
| 4 | * Copyright (c) 2012 Cambridge Silicon Radio Limited, a CSR plc group company. | ||
| 5 | * | ||
| 6 | * Licensed under GPLv2 or later. | ||
| 7 | */ | ||
| 8 | |||
| 9 | /include/ "skeleton.dtsi" | ||
| 10 | / { | ||
| 11 | compatible = "sirf,prima2"; | ||
| 12 | #address-cells = <1>; | ||
| 13 | #size-cells = <1>; | ||
| 14 | interrupt-parent = <&intc>; | ||
| 15 | |||
| 16 | cpus { | ||
| 17 | #address-cells = <1>; | ||
| 18 | #size-cells = <0>; | ||
| 19 | |||
| 20 | cpu@0 { | ||
| 21 | reg = <0x0>; | ||
| 22 | d-cache-line-size = <32>; | ||
| 23 | i-cache-line-size = <32>; | ||
| 24 | d-cache-size = <32768>; | ||
| 25 | i-cache-size = <32768>; | ||
| 26 | /* from bootloader */ | ||
| 27 | timebase-frequency = <0>; | ||
| 28 | bus-frequency = <0>; | ||
| 29 | clock-frequency = <0>; | ||
| 30 | }; | ||
| 31 | }; | ||
| 32 | |||
| 33 | axi { | ||
| 34 | compatible = "simple-bus"; | ||
| 35 | #address-cells = <1>; | ||
| 36 | #size-cells = <1>; | ||
| 37 | ranges = <0x40000000 0x40000000 0x80000000>; | ||
| 38 | |||
| 39 | l2-cache-controller@80040000 { | ||
| 40 | compatible = "arm,pl310-cache", "sirf,prima2-pl310-cache"; | ||
| 41 | reg = <0x80040000 0x1000>; | ||
| 42 | interrupts = <59>; | ||
| 43 | arm,tag-latency = <1 1 1>; | ||
| 44 | arm,data-latency = <1 1 1>; | ||
| 45 | arm,filter-ranges = <0 0x40000000>; | ||
| 46 | }; | ||
| 47 | |||
| 48 | intc: interrupt-controller@80020000 { | ||
| 49 | #interrupt-cells = <1>; | ||
| 50 | interrupt-controller; | ||
| 51 | compatible = "sirf,prima2-intc"; | ||
| 52 | reg = <0x80020000 0x1000>; | ||
| 53 | }; | ||
| 54 | |||
| 55 | sys-iobg { | ||
| 56 | compatible = "simple-bus"; | ||
| 57 | #address-cells = <1>; | ||
| 58 | #size-cells = <1>; | ||
| 59 | ranges = <0x88000000 0x88000000 0x40000>; | ||
| 60 | |||
| 61 | clock-controller@88000000 { | ||
| 62 | compatible = "sirf,prima2-clkc"; | ||
| 63 | reg = <0x88000000 0x1000>; | ||
| 64 | interrupts = <3>; | ||
| 65 | }; | ||
| 66 | |||
| 67 | reset-controller@88010000 { | ||
| 68 | compatible = "sirf,prima2-rstc"; | ||
| 69 | reg = <0x88010000 0x1000>; | ||
| 70 | }; | ||
| 71 | |||
| 72 | rsc-controller@88020000 { | ||
| 73 | compatible = "sirf,prima2-rsc"; | ||
| 74 | reg = <0x88020000 0x1000>; | ||
| 75 | }; | ||
| 76 | }; | ||
| 77 | |||
| 78 | mem-iobg { | ||
| 79 | compatible = "simple-bus"; | ||
| 80 | #address-cells = <1>; | ||
| 81 | #size-cells = <1>; | ||
| 82 | ranges = <0x90000000 0x90000000 0x10000>; | ||
| 83 | |||
| 84 | memory-controller@90000000 { | ||
| 85 | compatible = "sirf,prima2-memc"; | ||
| 86 | reg = <0x90000000 0x10000>; | ||
| 87 | interrupts = <27>; | ||
| 88 | }; | ||
| 89 | }; | ||
| 90 | |||
| 91 | disp-iobg { | ||
| 92 | compatible = "simple-bus"; | ||
| 93 | #address-cells = <1>; | ||
| 94 | #size-cells = <1>; | ||
| 95 | ranges = <0x90010000 0x90010000 0x30000>; | ||
| 96 | |||
| 97 | display@90010000 { | ||
| 98 | compatible = "sirf,prima2-lcd"; | ||
| 99 | reg = <0x90010000 0x20000>; | ||
| 100 | interrupts = <30>; | ||
| 101 | }; | ||
| 102 | |||
| 103 | vpp@90020000 { | ||
| 104 | compatible = "sirf,prima2-vpp"; | ||
| 105 | reg = <0x90020000 0x10000>; | ||
| 106 | interrupts = <31>; | ||
| 107 | }; | ||
| 108 | }; | ||
| 109 | |||
| 110 | graphics-iobg { | ||
| 111 | compatible = "simple-bus"; | ||
| 112 | #address-cells = <1>; | ||
| 113 | #size-cells = <1>; | ||
| 114 | ranges = <0x98000000 0x98000000 0x8000000>; | ||
| 115 | |||
| 116 | graphics@98000000 { | ||
| 117 | compatible = "powervr,sgx531"; | ||
| 118 | reg = <0x98000000 0x8000000>; | ||
| 119 | interrupts = <6>; | ||
| 120 | }; | ||
| 121 | }; | ||
| 122 | |||
| 123 | multimedia-iobg { | ||
| 124 | compatible = "simple-bus"; | ||
| 125 | #address-cells = <1>; | ||
| 126 | #size-cells = <1>; | ||
| 127 | ranges = <0xa0000000 0xa0000000 0x8000000>; | ||
| 128 | |||
| 129 | multimedia@a0000000 { | ||
| 130 | compatible = "sirf,prima2-video-codec"; | ||
| 131 | reg = <0xa0000000 0x8000000>; | ||
| 132 | interrupts = <5>; | ||
| 133 | }; | ||
| 134 | }; | ||
| 135 | |||
| 136 | dsp-iobg { | ||
| 137 | compatible = "simple-bus"; | ||
| 138 | #address-cells = <1>; | ||
| 139 | #size-cells = <1>; | ||
| 140 | ranges = <0xa8000000 0xa8000000 0x2000000>; | ||
| 141 | |||
| 142 | dspif@a8000000 { | ||
| 143 | compatible = "sirf,prima2-dspif"; | ||
| 144 | reg = <0xa8000000 0x10000>; | ||
| 145 | interrupts = <9>; | ||
| 146 | }; | ||
| 147 | |||
| 148 | gps@a8010000 { | ||
| 149 | compatible = "sirf,prima2-gps"; | ||
| 150 | reg = <0xa8010000 0x10000>; | ||
| 151 | interrupts = <7>; | ||
| 152 | }; | ||
| 153 | |||
| 154 | dsp@a9000000 { | ||
| 155 | compatible = "sirf,prima2-dsp"; | ||
| 156 | reg = <0xa9000000 0x1000000>; | ||
| 157 | interrupts = <8>; | ||
| 158 | }; | ||
| 159 | }; | ||
| 160 | |||
| 161 | peri-iobg { | ||
| 162 | compatible = "simple-bus"; | ||
| 163 | #address-cells = <1>; | ||
| 164 | #size-cells = <1>; | ||
| 165 | ranges = <0xb0000000 0xb0000000 0x180000>; | ||
| 166 | |||
| 167 | timer@b0020000 { | ||
| 168 | compatible = "sirf,prima2-tick"; | ||
| 169 | reg = <0xb0020000 0x1000>; | ||
| 170 | interrupts = <0>; | ||
| 171 | }; | ||
| 172 | |||
| 173 | nand@b0030000 { | ||
| 174 | compatible = "sirf,prima2-nand"; | ||
| 175 | reg = <0xb0030000 0x10000>; | ||
| 176 | interrupts = <41>; | ||
| 177 | }; | ||
| 178 | |||
| 179 | audio@b0040000 { | ||
| 180 | compatible = "sirf,prima2-audio"; | ||
| 181 | reg = <0xb0040000 0x10000>; | ||
| 182 | interrupts = <35>; | ||
| 183 | }; | ||
| 184 | |||
| 185 | uart0: uart@b0050000 { | ||
| 186 | cell-index = <0>; | ||
| 187 | compatible = "sirf,prima2-uart"; | ||
| 188 | reg = <0xb0050000 0x10000>; | ||
| 189 | interrupts = <17>; | ||
| 190 | }; | ||
| 191 | |||
| 192 | uart1: uart@b0060000 { | ||
| 193 | cell-index = <1>; | ||
| 194 | compatible = "sirf,prima2-uart"; | ||
| 195 | reg = <0xb0060000 0x10000>; | ||
| 196 | interrupts = <18>; | ||
| 197 | }; | ||
| 198 | |||
| 199 | uart2: uart@b0070000 { | ||
| 200 | cell-index = <2>; | ||
| 201 | compatible = "sirf,prima2-uart"; | ||
| 202 | reg = <0xb0070000 0x10000>; | ||
| 203 | interrupts = <19>; | ||
| 204 | }; | ||
| 205 | |||
| 206 | usp0: usp@b0080000 { | ||
| 207 | cell-index = <0>; | ||
| 208 | compatible = "sirf,prima2-usp"; | ||
| 209 | reg = <0xb0080000 0x10000>; | ||
| 210 | interrupts = <20>; | ||
| 211 | }; | ||
| 212 | |||
| 213 | usp1: usp@b0090000 { | ||
| 214 | cell-index = <1>; | ||
| 215 | compatible = "sirf,prima2-usp"; | ||
| 216 | reg = <0xb0090000 0x10000>; | ||
| 217 | interrupts = <21>; | ||
| 218 | }; | ||
| 219 | |||
| 220 | usp2: usp@b00a0000 { | ||
| 221 | cell-index = <2>; | ||
| 222 | compatible = "sirf,prima2-usp"; | ||
| 223 | reg = <0xb00a0000 0x10000>; | ||
| 224 | interrupts = <22>; | ||
| 225 | }; | ||
| 226 | |||
| 227 | dmac0: dma-controller@b00b0000 { | ||
| 228 | cell-index = <0>; | ||
| 229 | compatible = "sirf,prima2-dmac"; | ||
| 230 | reg = <0xb00b0000 0x10000>; | ||
| 231 | interrupts = <12>; | ||
| 232 | }; | ||
| 233 | |||
| 234 | dmac1: dma-controller@b0160000 { | ||
| 235 | cell-index = <1>; | ||
| 236 | compatible = "sirf,prima2-dmac"; | ||
| 237 | reg = <0xb0160000 0x10000>; | ||
| 238 | interrupts = <13>; | ||
| 239 | }; | ||
| 240 | |||
| 241 | vip@b00C0000 { | ||
| 242 | compatible = "sirf,prima2-vip"; | ||
| 243 | reg = <0xb00C0000 0x10000>; | ||
| 244 | }; | ||
| 245 | |||
| 246 | spi0: spi@b00d0000 { | ||
| 247 | cell-index = <0>; | ||
| 248 | compatible = "sirf,prima2-spi"; | ||
| 249 | reg = <0xb00d0000 0x10000>; | ||
| 250 | interrupts = <15>; | ||
| 251 | }; | ||
| 252 | |||
| 253 | spi1: spi@b0170000 { | ||
| 254 | cell-index = <1>; | ||
| 255 | compatible = "sirf,prima2-spi"; | ||
| 256 | reg = <0xb0170000 0x10000>; | ||
| 257 | interrupts = <16>; | ||
| 258 | }; | ||
| 259 | |||
| 260 | i2c0: i2c@b00e0000 { | ||
| 261 | cell-index = <0>; | ||
| 262 | compatible = "sirf,prima2-i2c"; | ||
| 263 | reg = <0xb00e0000 0x10000>; | ||
| 264 | interrupts = <24>; | ||
| 265 | }; | ||
| 266 | |||
| 267 | i2c1: i2c@b00f0000 { | ||
| 268 | cell-index = <1>; | ||
| 269 | compatible = "sirf,prima2-i2c"; | ||
| 270 | reg = <0xb00f0000 0x10000>; | ||
| 271 | interrupts = <25>; | ||
| 272 | }; | ||
| 273 | |||
| 274 | tsc@b0110000 { | ||
| 275 | compatible = "sirf,prima2-tsc"; | ||
| 276 | reg = <0xb0110000 0x10000>; | ||
| 277 | interrupts = <33>; | ||
| 278 | }; | ||
| 279 | |||
| 280 | gpio: pinctrl@b0120000 { | ||
| 281 | #gpio-cells = <2>; | ||
| 282 | #interrupt-cells = <2>; | ||
| 283 | compatible = "sirf,prima2-pinctrl"; | ||
| 284 | reg = <0xb0120000 0x10000>; | ||
| 285 | interrupts = <43 44 45 46 47>; | ||
| 286 | gpio-controller; | ||
| 287 | interrupt-controller; | ||
| 288 | |||
| 289 | lcd_16pins_a: lcd0@0 { | ||
| 290 | lcd { | ||
| 291 | sirf,pins = "lcd_16bitsgrp"; | ||
| 292 | sirf,function = "lcd_16bits"; | ||
| 293 | }; | ||
| 294 | }; | ||
| 295 | lcd_18pins_a: lcd0@1 { | ||
| 296 | lcd { | ||
| 297 | sirf,pins = "lcd_18bitsgrp"; | ||
| 298 | sirf,function = "lcd_18bits"; | ||
| 299 | }; | ||
| 300 | }; | ||
| 301 | lcd_24pins_a: lcd0@2 { | ||
| 302 | lcd { | ||
| 303 | sirf,pins = "lcd_24bitsgrp"; | ||
| 304 | sirf,function = "lcd_24bits"; | ||
| 305 | }; | ||
| 306 | }; | ||
| 307 | lcdrom_pins_a: lcdrom0@0 { | ||
| 308 | lcd { | ||
| 309 | sirf,pins = "lcdromgrp"; | ||
| 310 | sirf,function = "lcdrom"; | ||
| 311 | }; | ||
| 312 | }; | ||
| 313 | uart0_pins_a: uart0@0 { | ||
| 314 | uart { | ||
| 315 | sirf,pins = "uart0grp"; | ||
| 316 | sirf,function = "uart0"; | ||
| 317 | }; | ||
| 318 | }; | ||
| 319 | uart1_pins_a: uart1@0 { | ||
| 320 | uart { | ||
| 321 | sirf,pins = "uart1grp"; | ||
| 322 | sirf,function = "uart1"; | ||
| 323 | }; | ||
| 324 | }; | ||
| 325 | uart2_pins_a: uart2@0 { | ||
| 326 | uart { | ||
| 327 | sirf,pins = "uart2grp"; | ||
| 328 | sirf,function = "uart2"; | ||
| 329 | }; | ||
| 330 | }; | ||
| 331 | uart2_noflow_pins_a: uart2@1 { | ||
| 332 | uart { | ||
| 333 | sirf,pins = "uart2_nostreamctrlgrp"; | ||
| 334 | sirf,function = "uart2_nostreamctrl"; | ||
| 335 | }; | ||
| 336 | }; | ||
| 337 | spi0_pins_a: spi0@0 { | ||
| 338 | spi { | ||
| 339 | sirf,pins = "spi0grp"; | ||
| 340 | sirf,function = "spi0"; | ||
| 341 | }; | ||
| 342 | }; | ||
| 343 | spi1_pins_a: spi1@0 { | ||
| 344 | spi { | ||
| 345 | sirf,pins = "spi1grp"; | ||
| 346 | sirf,function = "spi1"; | ||
| 347 | }; | ||
| 348 | }; | ||
| 349 | i2c0_pins_a: i2c0@0 { | ||
| 350 | i2c { | ||
| 351 | sirf,pins = "i2c0grp"; | ||
| 352 | sirf,function = "i2c0"; | ||
| 353 | }; | ||
| 354 | }; | ||
| 355 | i2c1_pins_a: i2c1@0 { | ||
| 356 | i2c { | ||
| 357 | sirf,pins = "i2c1grp"; | ||
| 358 | sirf,function = "i2c1"; | ||
| 359 | }; | ||
| 360 | }; | ||
| 361 | pwm0_pins_a: pwm0@0 { | ||
| 362 | pwm { | ||
| 363 | sirf,pins = "pwm0grp"; | ||
| 364 | sirf,function = "pwm0"; | ||
| 365 | }; | ||
| 366 | }; | ||
| 367 | pwm1_pins_a: pwm1@0 { | ||
| 368 | pwm { | ||
| 369 | sirf,pins = "pwm1grp"; | ||
| 370 | sirf,function = "pwm1"; | ||
| 371 | }; | ||
| 372 | }; | ||
| 373 | pwm2_pins_a: pwm2@0 { | ||
| 374 | pwm { | ||
| 375 | sirf,pins = "pwm2grp"; | ||
| 376 | sirf,function = "pwm2"; | ||
| 377 | }; | ||
| 378 | }; | ||
| 379 | pwm3_pins_a: pwm3@0 { | ||
| 380 | pwm { | ||
| 381 | sirf,pins = "pwm3grp"; | ||
| 382 | sirf,function = "pwm3"; | ||
| 383 | }; | ||
| 384 | }; | ||
| 385 | gps_pins_a: gps@0 { | ||
| 386 | gps { | ||
| 387 | sirf,pins = "gpsgrp"; | ||
| 388 | sirf,function = "gps"; | ||
| 389 | }; | ||
| 390 | }; | ||
| 391 | vip_pins_a: vip@0 { | ||
| 392 | vip { | ||
| 393 | sirf,pins = "vipgrp"; | ||
| 394 | sirf,function = "vip"; | ||
| 395 | }; | ||
| 396 | }; | ||
| 397 | sdmmc0_pins_a: sdmmc0@0 { | ||
| 398 | sdmmc0 { | ||
| 399 | sirf,pins = "sdmmc0grp"; | ||
| 400 | sirf,function = "sdmmc0"; | ||
| 401 | }; | ||
| 402 | }; | ||
| 403 | sdmmc1_pins_a: sdmmc1@0 { | ||
| 404 | sdmmc1 { | ||
| 405 | sirf,pins = "sdmmc1grp"; | ||
| 406 | sirf,function = "sdmmc1"; | ||
| 407 | }; | ||
| 408 | }; | ||
| 409 | sdmmc2_pins_a: sdmmc2@0 { | ||
| 410 | sdmmc2 { | ||
| 411 | sirf,pins = "sdmmc2grp"; | ||
| 412 | sirf,function = "sdmmc2"; | ||
| 413 | }; | ||
| 414 | }; | ||
| 415 | sdmmc3_pins_a: sdmmc3@0 { | ||
| 416 | sdmmc3 { | ||
| 417 | sirf,pins = "sdmmc3grp"; | ||
| 418 | sirf,function = "sdmmc3"; | ||
| 419 | }; | ||
| 420 | }; | ||
| 421 | sdmmc4_pins_a: sdmmc4@0 { | ||
| 422 | sdmmc4 { | ||
| 423 | sirf,pins = "sdmmc4grp"; | ||
| 424 | sirf,function = "sdmmc4"; | ||
| 425 | }; | ||
| 426 | }; | ||
| 427 | sdmmc5_pins_a: sdmmc5@0 { | ||
| 428 | sdmmc5 { | ||
| 429 | sirf,pins = "sdmmc5grp"; | ||
| 430 | sirf,function = "sdmmc5"; | ||
| 431 | }; | ||
| 432 | }; | ||
| 433 | i2s_pins_a: i2s@0 { | ||
| 434 | i2s { | ||
| 435 | sirf,pins = "i2sgrp"; | ||
| 436 | sirf,function = "i2s"; | ||
| 437 | }; | ||
| 438 | }; | ||
| 439 | ac97_pins_a: ac97@0 { | ||
| 440 | ac97 { | ||
| 441 | sirf,pins = "ac97grp"; | ||
| 442 | sirf,function = "ac97"; | ||
| 443 | }; | ||
| 444 | }; | ||
| 445 | nand_pins_a: nand@0 { | ||
| 446 | nand { | ||
| 447 | sirf,pins = "nandgrp"; | ||
| 448 | sirf,function = "nand"; | ||
| 449 | }; | ||
| 450 | }; | ||
| 451 | usp0_pins_a: usp0@0 { | ||
| 452 | usp0 { | ||
| 453 | sirf,pins = "usp0grp"; | ||
| 454 | sirf,function = "usp0"; | ||
| 455 | }; | ||
| 456 | }; | ||
| 457 | usp1_pins_a: usp1@0 { | ||
| 458 | usp1 { | ||
| 459 | sirf,pins = "usp1grp"; | ||
| 460 | sirf,function = "usp1"; | ||
| 461 | }; | ||
| 462 | }; | ||
| 463 | usp2_pins_a: usp2@0 { | ||
| 464 | usp2 { | ||
| 465 | sirf,pins = "usp2grp"; | ||
| 466 | sirf,function = "usp2"; | ||
| 467 | }; | ||
| 468 | }; | ||
| 469 | usb0_utmi_drvbus_pins_a: usb0_utmi_drvbus@0 { | ||
| 470 | usb0_utmi_drvbus { | ||
| 471 | sirf,pins = "usb0_utmi_drvbusgrp"; | ||
| 472 | sirf,function = "usb0_utmi_drvbus"; | ||
| 473 | }; | ||
| 474 | }; | ||
| 475 | usb1_utmi_drvbus_pins_a: usb1_utmi_drvbus@0 { | ||
| 476 | usb1_utmi_drvbus { | ||
| 477 | sirf,pins = "usb1_utmi_drvbusgrp"; | ||
| 478 | sirf,function = "usb1_utmi_drvbus"; | ||
| 479 | }; | ||
| 480 | }; | ||
| 481 | warm_rst_pins_a: warm_rst@0 { | ||
| 482 | warm_rst { | ||
| 483 | sirf,pins = "warm_rstgrp"; | ||
| 484 | sirf,function = "warm_rst"; | ||
| 485 | }; | ||
| 486 | }; | ||
| 487 | pulse_count_pins_a: pulse_count@0 { | ||
| 488 | pulse_count { | ||
| 489 | sirf,pins = "pulse_countgrp"; | ||
| 490 | sirf,function = "pulse_count"; | ||
| 491 | }; | ||
| 492 | }; | ||
| 493 | cko0_rst_pins_a: cko0_rst@0 { | ||
| 494 | cko0_rst { | ||
| 495 | sirf,pins = "cko0_rstgrp"; | ||
| 496 | sirf,function = "cko0_rst"; | ||
| 497 | }; | ||
| 498 | }; | ||
| 499 | cko1_rst_pins_a: cko1_rst@0 { | ||
| 500 | cko1_rst { | ||
| 501 | sirf,pins = "cko1_rstgrp"; | ||
| 502 | sirf,function = "cko1_rst"; | ||
| 503 | }; | ||
| 504 | }; | ||
| 505 | }; | ||
| 506 | |||
| 507 | pwm@b0130000 { | ||
| 508 | compatible = "sirf,prima2-pwm"; | ||
| 509 | reg = <0xb0130000 0x10000>; | ||
| 510 | }; | ||
| 511 | |||
| 512 | efusesys@b0140000 { | ||
| 513 | compatible = "sirf,prima2-efuse"; | ||
| 514 | reg = <0xb0140000 0x10000>; | ||
| 515 | }; | ||
| 516 | |||
| 517 | pulsec@b0150000 { | ||
| 518 | compatible = "sirf,prima2-pulsec"; | ||
| 519 | reg = <0xb0150000 0x10000>; | ||
| 520 | interrupts = <48>; | ||
| 521 | }; | ||
| 522 | |||
| 523 | pci-iobg { | ||
| 524 | compatible = "sirf,prima2-pciiobg", "simple-bus"; | ||
| 525 | #address-cells = <1>; | ||
| 526 | #size-cells = <1>; | ||
| 527 | ranges = <0x56000000 0x56000000 0x1b00000>; | ||
| 528 | |||
| 529 | sd0: sdhci@56000000 { | ||
| 530 | cell-index = <0>; | ||
| 531 | compatible = "sirf,prima2-sdhc"; | ||
| 532 | reg = <0x56000000 0x100000>; | ||
| 533 | interrupts = <38>; | ||
| 534 | }; | ||
| 535 | |||
| 536 | sd1: sdhci@56100000 { | ||
| 537 | cell-index = <1>; | ||
| 538 | compatible = "sirf,prima2-sdhc"; | ||
| 539 | reg = <0x56100000 0x100000>; | ||
| 540 | interrupts = <38>; | ||
| 541 | }; | ||
| 542 | |||
| 543 | sd2: sdhci@56200000 { | ||
| 544 | cell-index = <2>; | ||
| 545 | compatible = "sirf,prima2-sdhc"; | ||
| 546 | reg = <0x56200000 0x100000>; | ||
| 547 | interrupts = <23>; | ||
| 548 | }; | ||
| 549 | |||
| 550 | sd3: sdhci@56300000 { | ||
| 551 | cell-index = <3>; | ||
| 552 | compatible = "sirf,prima2-sdhc"; | ||
| 553 | reg = <0x56300000 0x100000>; | ||
| 554 | interrupts = <23>; | ||
| 555 | }; | ||
| 556 | |||
| 557 | sd4: sdhci@56400000 { | ||
| 558 | cell-index = <4>; | ||
| 559 | compatible = "sirf,prima2-sdhc"; | ||
| 560 | reg = <0x56400000 0x100000>; | ||
| 561 | interrupts = <39>; | ||
| 562 | }; | ||
| 563 | |||
| 564 | sd5: sdhci@56500000 { | ||
| 565 | cell-index = <5>; | ||
| 566 | compatible = "sirf,prima2-sdhc"; | ||
| 567 | reg = <0x56500000 0x100000>; | ||
| 568 | interrupts = <39>; | ||
| 569 | }; | ||
| 570 | |||
| 571 | pci-copy@57900000 { | ||
| 572 | compatible = "sirf,prima2-pcicp"; | ||
| 573 | reg = <0x57900000 0x100000>; | ||
| 574 | interrupts = <40>; | ||
| 575 | }; | ||
| 576 | |||
| 577 | rom-interface@57a00000 { | ||
| 578 | compatible = "sirf,prima2-romif"; | ||
| 579 | reg = <0x57a00000 0x100000>; | ||
| 580 | }; | ||
| 581 | }; | ||
| 582 | }; | ||
| 583 | |||
| 584 | rtc-iobg { | ||
| 585 | compatible = "sirf,prima2-rtciobg", "sirf-prima2-rtciobg-bus"; | ||
| 586 | #address-cells = <1>; | ||
| 587 | #size-cells = <1>; | ||
| 588 | reg = <0x80030000 0x10000>; | ||
| 589 | |||
| 590 | gpsrtc@1000 { | ||
| 591 | compatible = "sirf,prima2-gpsrtc"; | ||
| 592 | reg = <0x1000 0x1000>; | ||
| 593 | interrupts = <55 56 57>; | ||
| 594 | }; | ||
| 595 | |||
| 596 | sysrtc@2000 { | ||
| 597 | compatible = "sirf,prima2-sysrtc"; | ||
| 598 | reg = <0x2000 0x1000>; | ||
| 599 | interrupts = <52 53 54>; | ||
| 600 | }; | ||
| 601 | |||
| 602 | pwrc@3000 { | ||
| 603 | compatible = "sirf,prima2-pwrc"; | ||
| 604 | reg = <0x3000 0x1000>; | ||
| 605 | interrupts = <32>; | ||
| 606 | }; | ||
| 607 | }; | ||
| 608 | |||
| 609 | uus-iobg { | ||
| 610 | compatible = "simple-bus"; | ||
| 611 | #address-cells = <1>; | ||
| 612 | #size-cells = <1>; | ||
| 613 | ranges = <0xb8000000 0xb8000000 0x40000>; | ||
| 614 | |||
| 615 | usb0: usb@b00e0000 { | ||
| 616 | compatible = "chipidea,ci13611a-prima2"; | ||
| 617 | reg = <0xb8000000 0x10000>; | ||
| 618 | interrupts = <10>; | ||
| 619 | }; | ||
| 620 | |||
| 621 | usb1: usb@b00f0000 { | ||
| 622 | compatible = "chipidea,ci13611a-prima2"; | ||
| 623 | reg = <0xb8010000 0x10000>; | ||
| 624 | interrupts = <11>; | ||
| 625 | }; | ||
| 626 | |||
| 627 | sata@b00f0000 { | ||
| 628 | compatible = "synopsys,dwc-ahsata"; | ||
| 629 | reg = <0xb8020000 0x10000>; | ||
| 630 | interrupts = <37>; | ||
| 631 | }; | ||
| 632 | |||
| 633 | security@b00f0000 { | ||
| 634 | compatible = "sirf,prima2-security"; | ||
| 635 | reg = <0xb8030000 0x10000>; | ||
| 636 | interrupts = <42>; | ||
| 637 | }; | ||
| 638 | }; | ||
| 639 | }; | ||
| 640 | }; | ||
diff --git a/arch/arm/boot/dts/pxa27x.dtsi b/arch/arm/boot/dts/pxa27x.dtsi new file mode 100644 index 000000000000..d7c5d721a5c7 --- /dev/null +++ b/arch/arm/boot/dts/pxa27x.dtsi | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | /* The pxa3xx skeleton simply augments the 2xx version */ | ||
| 2 | /include/ "pxa2xx.dtsi" | ||
| 3 | |||
| 4 | / { | ||
| 5 | model = "Marvell PXA27x familiy SoC"; | ||
| 6 | compatible = "marvell,pxa27x"; | ||
| 7 | |||
| 8 | pxabus { | ||
| 9 | pxairq: interrupt-controller@40d00000 { | ||
| 10 | marvell,intc-priority; | ||
| 11 | marvell,intc-nr-irqs = <34>; | ||
| 12 | }; | ||
| 13 | }; | ||
| 14 | }; | ||
diff --git a/arch/arm/boot/dts/pxa2xx.dtsi b/arch/arm/boot/dts/pxa2xx.dtsi new file mode 100644 index 000000000000..f18aad35e8b3 --- /dev/null +++ b/arch/arm/boot/dts/pxa2xx.dtsi | |||
| @@ -0,0 +1,132 @@ | |||
| 1 | /* | ||
| 2 | * pxa2xx.dtsi - Device Tree Include file for Marvell PXA2xx family SoC | ||
| 3 | * | ||
| 4 | * Copyright (C) 2011 Marek Vasut <marek.vasut@gmail.com> | ||
| 5 | * | ||
| 6 | * Licensed under GPLv2 or later. | ||
| 7 | */ | ||
| 8 | |||
| 9 | /include/ "skeleton.dtsi" | ||
| 10 | |||
| 11 | / { | ||
| 12 | model = "Marvell PXA2xx family SoC"; | ||
| 13 | compatible = "marvell,pxa2xx"; | ||
| 14 | interrupt-parent = <&pxairq>; | ||
| 15 | |||
| 16 | aliases { | ||
| 17 | serial0 = &ffuart; | ||
| 18 | serial1 = &btuart; | ||
| 19 | serial2 = &stuart; | ||
| 20 | serial3 = &hwuart; | ||
| 21 | i2c0 = &pwri2c; | ||
| 22 | i2c1 = &pxai2c1; | ||
| 23 | }; | ||
| 24 | |||
| 25 | cpus { | ||
| 26 | cpu@0 { | ||
| 27 | compatible = "arm,xscale"; | ||
| 28 | }; | ||
| 29 | }; | ||
| 30 | |||
| 31 | pxabus { | ||
| 32 | compatible = "simple-bus"; | ||
| 33 | #address-cells = <1>; | ||
| 34 | #size-cells = <1>; | ||
| 35 | ranges; | ||
| 36 | |||
| 37 | pxairq: interrupt-controller@40d00000 { | ||
| 38 | #interrupt-cells = <1>; | ||
| 39 | compatible = "marvell,pxa-intc"; | ||
| 40 | interrupt-controller; | ||
| 41 | interrupt-parent; | ||
| 42 | marvell,intc-nr-irqs = <32>; | ||
| 43 | reg = <0x40d00000 0xd0>; | ||
| 44 | }; | ||
| 45 | |||
| 46 | gpio: gpio@40e00000 { | ||
| 47 | compatible = "mrvl,pxa-gpio"; | ||
| 48 | #address-cells = <0x1>; | ||
| 49 | #size-cells = <0x1>; | ||
| 50 | reg = <0x40e00000 0x10000>; | ||
| 51 | gpio-controller; | ||
| 52 | #gpio-cells = <0x2>; | ||
| 53 | interrupts = <10>; | ||
| 54 | interrupt-names = "gpio_mux"; | ||
| 55 | interrupt-controller; | ||
| 56 | #interrupt-cells = <0x2>; | ||
| 57 | ranges; | ||
| 58 | |||
| 59 | gcb0: gpio@40e00000 { | ||
| 60 | reg = <0x40e00000 0x4>; | ||
| 61 | }; | ||
| 62 | |||
| 63 | gcb1: gpio@40e00004 { | ||
| 64 | reg = <0x40e00004 0x4>; | ||
| 65 | }; | ||
| 66 | |||
| 67 | gcb2: gpio@40e00008 { | ||
| 68 | reg = <0x40e00008 0x4>; | ||
| 69 | }; | ||
| 70 | gcb3: gpio@40e0000c { | ||
| 71 | reg = <0x40e0000c 0x4>; | ||
| 72 | }; | ||
| 73 | }; | ||
| 74 | |||
| 75 | ffuart: uart@40100000 { | ||
| 76 | compatible = "mrvl,pxa-uart"; | ||
| 77 | reg = <0x40100000 0x30>; | ||
| 78 | interrupts = <22>; | ||
| 79 | status = "disabled"; | ||
| 80 | }; | ||
| 81 | |||
| 82 | btuart: uart@40200000 { | ||
| 83 | compatible = "mrvl,pxa-uart"; | ||
| 84 | reg = <0x40200000 0x30>; | ||
| 85 | interrupts = <21>; | ||
| 86 | status = "disabled"; | ||
| 87 | }; | ||
| 88 | |||
| 89 | stuart: uart@40700000 { | ||
| 90 | compatible = "mrvl,pxa-uart"; | ||
| 91 | reg = <0x40700000 0x30>; | ||
| 92 | interrupts = <20>; | ||
| 93 | status = "disabled"; | ||
| 94 | }; | ||
| 95 | |||
| 96 | hwuart: uart@41100000 { | ||
| 97 | compatible = "mrvl,pxa-uart"; | ||
| 98 | reg = <0x41100000 0x30>; | ||
| 99 | interrupts = <7>; | ||
| 100 | status = "disabled"; | ||
| 101 | }; | ||
| 102 | |||
| 103 | pxai2c1: i2c@40301680 { | ||
| 104 | compatible = "mrvl,pxa-i2c"; | ||
| 105 | reg = <0x40301680 0x30>; | ||
| 106 | interrupts = <18>; | ||
| 107 | #address-cells = <0x1>; | ||
| 108 | #size-cells = <0>; | ||
| 109 | status = "disabled"; | ||
| 110 | }; | ||
| 111 | |||
| 112 | usb0: ohci@4c000000 { | ||
| 113 | compatible = "mrvl,pxa-ohci"; | ||
| 114 | reg = <0x4c000000 0x10000>; | ||
| 115 | interrupts = <3>; | ||
| 116 | status = "disabled"; | ||
| 117 | }; | ||
| 118 | |||
| 119 | mmc0: mmc@41100000 { | ||
| 120 | compatible = "mrvl,pxa-mmc"; | ||
| 121 | reg = <0x41100000 0x1000>; | ||
| 122 | interrupts = <23>; | ||
| 123 | status = "disabled"; | ||
| 124 | }; | ||
| 125 | |||
| 126 | rtc@40900000 { | ||
| 127 | compatible = "marvell,pxa-rtc"; | ||
| 128 | reg = <0x40900000 0x3c>; | ||
| 129 | interrupts = <30 31>; | ||
| 130 | }; | ||
| 131 | }; | ||
| 132 | }; | ||
diff --git a/arch/arm/boot/dts/pxa3xx.dtsi b/arch/arm/boot/dts/pxa3xx.dtsi new file mode 100644 index 000000000000..f9d92da86783 --- /dev/null +++ b/arch/arm/boot/dts/pxa3xx.dtsi | |||
| @@ -0,0 +1,32 @@ | |||
| 1 | /* The pxa3xx skeleton simply augments the 2xx version */ | ||
| 2 | /include/ "pxa2xx.dtsi" | ||
| 3 | |||
| 4 | / { | ||
| 5 | model = "Marvell PXA3xx familiy SoC"; | ||
| 6 | compatible = "marvell,pxa3xx"; | ||
| 7 | |||
| 8 | pxabus { | ||
| 9 | pwri2c: i2c@40f500c0 { | ||
| 10 | compatible = "mrvl,pwri2c"; | ||
| 11 | reg = <0x40f500c0 0x30>; | ||
| 12 | interrupts = <6>; | ||
| 13 | #address-cells = <0x1>; | ||
| 14 | #size-cells = <0>; | ||
| 15 | status = "disabled"; | ||
| 16 | }; | ||
| 17 | |||
| 18 | nand0: nand@43100000 { | ||
| 19 | compatible = "marvell,pxa3xx-nand"; | ||
| 20 | reg = <0x43100000 90>; | ||
| 21 | interrupts = <45>; | ||
| 22 | #address-cells = <1>; | ||
| 23 | #size-cells = <1>; | ||
| 24 | status = "disabled"; | ||
| 25 | }; | ||
| 26 | |||
| 27 | pxairq: interrupt-controller@40d00000 { | ||
| 28 | marvell,intc-priority; | ||
| 29 | marvell,intc-nr-irqs = <56>; | ||
| 30 | }; | ||
| 31 | }; | ||
| 32 | }; | ||
diff --git a/arch/arm/boot/dts/pxa910.dtsi b/arch/arm/boot/dts/pxa910.dtsi index aebf32de73b4..a3be44d86bcd 100644 --- a/arch/arm/boot/dts/pxa910.dtsi +++ b/arch/arm/boot/dts/pxa910.dtsi | |||
| @@ -25,6 +25,11 @@ | |||
| 25 | interrupt-parent = <&intc>; | 25 | interrupt-parent = <&intc>; |
| 26 | ranges; | 26 | ranges; |
| 27 | 27 | ||
| 28 | L2: l2-cache { | ||
| 29 | compatible = "marvell,tauros2-cache"; | ||
| 30 | marvell,tauros2-cache-features = <0x3>; | ||
| 31 | }; | ||
| 32 | |||
| 28 | axi@d4200000 { /* AXI */ | 33 | axi@d4200000 { /* AXI */ |
| 29 | compatible = "mrvl,axi-bus", "simple-bus"; | 34 | compatible = "mrvl,axi-bus", "simple-bus"; |
| 30 | #address-cells = <1>; | 35 | #address-cells = <1>; |
diff --git a/arch/arm/boot/dts/snowball.dts b/arch/arm/boot/dts/snowball.dts index 7e334d4cae21..702c0baa6004 100644 --- a/arch/arm/boot/dts/snowball.dts +++ b/arch/arm/boot/dts/snowball.dts | |||
| @@ -10,7 +10,7 @@ | |||
| 10 | */ | 10 | */ |
| 11 | 11 | ||
| 12 | /dts-v1/; | 12 | /dts-v1/; |
| 13 | /include/ "db8500.dtsi" | 13 | /include/ "dbx5x0.dtsi" |
| 14 | 14 | ||
| 15 | / { | 15 | / { |
| 16 | model = "Calao Systems Snowball platform with device tree"; | 16 | model = "Calao Systems Snowball platform with device tree"; |
| @@ -83,6 +83,22 @@ | |||
| 83 | }; | 83 | }; |
| 84 | 84 | ||
| 85 | soc-u9500 { | 85 | soc-u9500 { |
| 86 | |||
| 87 | sound { | ||
| 88 | compatible = "stericsson,snd-soc-mop500"; | ||
| 89 | |||
| 90 | stericsson,cpu-dai = <&msp1 &msp3>; | ||
| 91 | stericsson,audio-codec = <&codec>; | ||
| 92 | }; | ||
| 93 | |||
| 94 | msp1: msp@80124000 { | ||
| 95 | status = "okay"; | ||
| 96 | }; | ||
| 97 | |||
| 98 | msp3: msp@80125000 { | ||
| 99 | status = "okay"; | ||
| 100 | }; | ||
| 101 | |||
| 86 | external-bus@50000000 { | 102 | external-bus@50000000 { |
| 87 | status = "okay"; | 103 | status = "okay"; |
| 88 | 104 | ||
| @@ -111,7 +127,6 @@ | |||
| 111 | mmc-cap-mmc-highspeed; | 127 | mmc-cap-mmc-highspeed; |
| 112 | vmmc-supply = <&ab8500_ldo_aux3_reg>; | 128 | vmmc-supply = <&ab8500_ldo_aux3_reg>; |
| 113 | 129 | ||
| 114 | #gpio-cells = <1>; | ||
| 115 | cd-gpios = <&gpio6 26 0x4>; // 218 | 130 | cd-gpios = <&gpio6 26 0x4>; // 218 |
| 116 | cd-inverted; | 131 | cd-inverted; |
| 117 | 132 | ||
diff --git a/arch/arm/boot/dts/tegra20-medcom-wide.dts b/arch/arm/boot/dts/tegra20-medcom-wide.dts new file mode 100644 index 000000000000..a2d6d6541f83 --- /dev/null +++ b/arch/arm/boot/dts/tegra20-medcom-wide.dts | |||
| @@ -0,0 +1,58 @@ | |||
| 1 | /dts-v1/; | ||
| 2 | |||
| 3 | /include/ "tegra20-tamonten.dtsi" | ||
| 4 | |||
| 5 | / { | ||
| 6 | model = "Avionic Design Medcom-Wide board"; | ||
| 7 | compatible = "ad,medcom-wide", "ad,tamonten", "nvidia,tegra20"; | ||
| 8 | |||
| 9 | i2c@7000c000 { | ||
| 10 | wm8903: wm8903@1a { | ||
| 11 | compatible = "wlf,wm8903"; | ||
| 12 | reg = <0x1a>; | ||
| 13 | interrupt-parent = <&gpio>; | ||
| 14 | interrupts = <187 0x04>; | ||
| 15 | |||
| 16 | gpio-controller; | ||
| 17 | #gpio-cells = <2>; | ||
| 18 | |||
| 19 | micdet-cfg = <0>; | ||
| 20 | micdet-delay = <100>; | ||
| 21 | gpio-cfg = <0xffffffff | ||
| 22 | 0xffffffff | ||
| 23 | 0 | ||
| 24 | 0xffffffff | ||
| 25 | 0xffffffff>; | ||
| 26 | }; | ||
| 27 | }; | ||
| 28 | |||
| 29 | backlight { | ||
| 30 | compatible = "pwm-backlight"; | ||
| 31 | pwms = <&pwm 0 5000000>; | ||
| 32 | |||
| 33 | brightness-levels = <0 4 8 16 32 64 128 255>; | ||
| 34 | default-brightness-level = <6>; | ||
| 35 | }; | ||
| 36 | |||
| 37 | sound { | ||
| 38 | compatible = "ad,tegra-audio-wm8903-medcom-wide", | ||
| 39 | "nvidia,tegra-audio-wm8903"; | ||
| 40 | nvidia,model = "Avionic Design Medcom-Wide"; | ||
| 41 | |||
| 42 | nvidia,audio-routing = | ||
| 43 | "Headphone Jack", "HPOUTR", | ||
| 44 | "Headphone Jack", "HPOUTL", | ||
| 45 | "Int Spk", "ROP", | ||
| 46 | "Int Spk", "RON", | ||
| 47 | "Int Spk", "LOP", | ||
| 48 | "Int Spk", "LON", | ||
| 49 | "Mic Jack", "MICBIAS", | ||
| 50 | "IN1L", "Mic Jack"; | ||
| 51 | |||
| 52 | nvidia,i2s-controller = <&tegra_i2s1>; | ||
| 53 | nvidia,audio-codec = <&wm8903>; | ||
| 54 | |||
| 55 | nvidia,spkr-en-gpios = <&wm8903 2 0>; | ||
| 56 | nvidia,hp-det-gpios = <&gpio 178 0>; /* gpio PW2 */ | ||
| 57 | }; | ||
| 58 | }; | ||
diff --git a/arch/arm/boot/dts/tegra20-paz00.dts b/arch/arm/boot/dts/tegra20-paz00.dts index 684a9e1ff7e9..ddf287f52d49 100644 --- a/arch/arm/boot/dts/tegra20-paz00.dts +++ b/arch/arm/boot/dts/tegra20-paz00.dts | |||
| @@ -272,12 +272,170 @@ | |||
| 272 | status = "okay"; | 272 | status = "okay"; |
| 273 | clock-frequency = <400000>; | 273 | clock-frequency = <400000>; |
| 274 | 274 | ||
| 275 | pmic: tps6586x@34 { | ||
| 276 | compatible = "ti,tps6586x"; | ||
| 277 | reg = <0x34>; | ||
| 278 | interrupts = <0 86 0x4>; | ||
| 279 | |||
| 280 | #gpio-cells = <2>; | ||
| 281 | gpio-controller; | ||
| 282 | |||
| 283 | sys-supply = <&p5valw_reg>; | ||
| 284 | vin-sm0-supply = <&sys_reg>; | ||
| 285 | vin-sm1-supply = <&sys_reg>; | ||
| 286 | vin-sm2-supply = <&sys_reg>; | ||
| 287 | vinldo01-supply = <&sm2_reg>; | ||
| 288 | vinldo23-supply = <&sm2_reg>; | ||
| 289 | vinldo4-supply = <&sm2_reg>; | ||
| 290 | vinldo678-supply = <&sm2_reg>; | ||
| 291 | vinldo9-supply = <&sm2_reg>; | ||
| 292 | |||
| 293 | regulators { | ||
| 294 | #address-cells = <1>; | ||
| 295 | #size-cells = <0>; | ||
| 296 | |||
| 297 | sys_reg: regulator@0 { | ||
| 298 | reg = <0>; | ||
| 299 | regulator-compatible = "sys"; | ||
| 300 | regulator-name = "vdd_sys"; | ||
| 301 | regulator-always-on; | ||
| 302 | }; | ||
| 303 | |||
| 304 | regulator@1 { | ||
| 305 | reg = <1>; | ||
| 306 | regulator-compatible = "sm0"; | ||
| 307 | regulator-name = "+1.2vs_sm0,vdd_core"; | ||
| 308 | regulator-min-microvolt = <1200000>; | ||
| 309 | regulator-max-microvolt = <1200000>; | ||
| 310 | regulator-always-on; | ||
| 311 | }; | ||
| 312 | |||
| 313 | regulator@2 { | ||
| 314 | reg = <2>; | ||
| 315 | regulator-compatible = "sm1"; | ||
| 316 | regulator-name = "+1.0vs_sm1,vdd_cpu"; | ||
| 317 | regulator-min-microvolt = <1000000>; | ||
| 318 | regulator-max-microvolt = <1000000>; | ||
| 319 | regulator-always-on; | ||
| 320 | }; | ||
| 321 | |||
| 322 | sm2_reg: regulator@3 { | ||
| 323 | reg = <3>; | ||
| 324 | regulator-compatible = "sm2"; | ||
| 325 | regulator-name = "+3.7vs_sm2,vin_ldo*"; | ||
| 326 | regulator-min-microvolt = <3700000>; | ||
| 327 | regulator-max-microvolt = <3700000>; | ||
| 328 | regulator-always-on; | ||
| 329 | }; | ||
| 330 | |||
| 331 | /* LDO0 is not connected to anything */ | ||
| 332 | |||
| 333 | regulator@5 { | ||
| 334 | reg = <5>; | ||
| 335 | regulator-compatible = "ldo1"; | ||
| 336 | regulator-name = "+1.1vs_ldo1,avdd_pll*"; | ||
| 337 | regulator-min-microvolt = <1100000>; | ||
| 338 | regulator-max-microvolt = <1100000>; | ||
| 339 | regulator-always-on; | ||
| 340 | }; | ||
| 341 | |||
| 342 | regulator@6 { | ||
| 343 | reg = <6>; | ||
| 344 | regulator-compatible = "ldo2"; | ||
| 345 | regulator-name = "+1.2vs_ldo2,vdd_rtc"; | ||
| 346 | regulator-min-microvolt = <1200000>; | ||
| 347 | regulator-max-microvolt = <1200000>; | ||
| 348 | }; | ||
| 349 | |||
| 350 | regulator@7 { | ||
| 351 | reg = <7>; | ||
| 352 | regulator-compatible = "ldo3"; | ||
| 353 | regulator-name = "+3.3vs_ldo3,avdd_usb*"; | ||
| 354 | regulator-min-microvolt = <3300000>; | ||
| 355 | regulator-max-microvolt = <3300000>; | ||
| 356 | regulator-always-on; | ||
| 357 | }; | ||
| 358 | |||
| 359 | regulator@8 { | ||
| 360 | reg = <8>; | ||
| 361 | regulator-compatible = "ldo4"; | ||
| 362 | regulator-name = "+1.8vs_ldo4,avdd_osc,vddio_sys"; | ||
| 363 | regulator-min-microvolt = <1800000>; | ||
| 364 | regulator-max-microvolt = <1800000>; | ||
| 365 | regulator-always-on; | ||
| 366 | }; | ||
| 367 | |||
| 368 | regulator@9 { | ||
| 369 | reg = <9>; | ||
| 370 | regulator-compatible = "ldo5"; | ||
| 371 | regulator-name = "+2.85vs_ldo5,vcore_mmc"; | ||
| 372 | regulator-min-microvolt = <2850000>; | ||
| 373 | regulator-max-microvolt = <2850000>; | ||
| 374 | regulator-always-on; | ||
| 375 | }; | ||
| 376 | |||
| 377 | regulator@10 { | ||
| 378 | reg = <10>; | ||
| 379 | regulator-compatible = "ldo6"; | ||
| 380 | /* | ||
| 381 | * Research indicates this should be | ||
| 382 | * 1.8v; other boards that use this | ||
| 383 | * rail for the same purpose need it | ||
| 384 | * set to 1.8v. The schematic signal | ||
| 385 | * name is incorrect; perhaps copied | ||
| 386 | * from an incorrect NVIDIA reference. | ||
| 387 | */ | ||
| 388 | regulator-name = "+2.85vs_ldo6,avdd_vdac"; | ||
| 389 | regulator-min-microvolt = <1800000>; | ||
| 390 | regulator-max-microvolt = <1800000>; | ||
| 391 | }; | ||
| 392 | |||
| 393 | regulator@11 { | ||
| 394 | reg = <11>; | ||
| 395 | regulator-compatible = "ldo7"; | ||
| 396 | regulator-name = "+3.3vs_ldo7,avdd_hdmi"; | ||
| 397 | regulator-min-microvolt = <3300000>; | ||
| 398 | regulator-max-microvolt = <3300000>; | ||
| 399 | }; | ||
| 400 | |||
| 401 | regulator@12 { | ||
| 402 | reg = <12>; | ||
| 403 | regulator-compatible = "ldo8"; | ||
| 404 | regulator-name = "+1.8vs_ldo8,avdd_hdmi_pll"; | ||
| 405 | regulator-min-microvolt = <1800000>; | ||
| 406 | regulator-max-microvolt = <1800000>; | ||
| 407 | }; | ||
| 408 | |||
| 409 | regulator@13 { | ||
| 410 | reg = <13>; | ||
| 411 | regulator-compatible = "ldo9"; | ||
| 412 | regulator-name = "+2.85vs_ldo9,vdd_ddr_rx"; | ||
| 413 | regulator-min-microvolt = <2850000>; | ||
| 414 | regulator-max-microvolt = <2850000>; | ||
| 415 | regulator-always-on; | ||
| 416 | }; | ||
| 417 | |||
| 418 | regulator@14 { | ||
| 419 | reg = <14>; | ||
| 420 | regulator-compatible = "ldo_rtc"; | ||
| 421 | regulator-name = "+3.3vs_rtc"; | ||
| 422 | regulator-min-microvolt = <3300000>; | ||
| 423 | regulator-max-microvolt = <3300000>; | ||
| 424 | regulator-always-on; | ||
| 425 | }; | ||
| 426 | }; | ||
| 427 | }; | ||
| 428 | |||
| 275 | adt7461@4c { | 429 | adt7461@4c { |
| 276 | compatible = "adi,adt7461"; | 430 | compatible = "adi,adt7461"; |
| 277 | reg = <0x4c>; | 431 | reg = <0x4c>; |
| 278 | }; | 432 | }; |
| 279 | }; | 433 | }; |
| 280 | 434 | ||
| 435 | pmc { | ||
| 436 | nvidia,invert-interrupt; | ||
| 437 | }; | ||
| 438 | |||
| 281 | usb@c5000000 { | 439 | usb@c5000000 { |
| 282 | status = "okay"; | 440 | status = "okay"; |
| 283 | }; | 441 | }; |
| @@ -325,6 +483,21 @@ | |||
| 325 | }; | 483 | }; |
| 326 | }; | 484 | }; |
| 327 | 485 | ||
| 486 | regulators { | ||
| 487 | compatible = "simple-bus"; | ||
| 488 | #address-cells = <1>; | ||
| 489 | #size-cells = <0>; | ||
| 490 | |||
| 491 | p5valw_reg: regulator@0 { | ||
| 492 | compatible = "regulator-fixed"; | ||
| 493 | reg = <0>; | ||
| 494 | regulator-name = "+5valw"; | ||
| 495 | regulator-min-microvolt = <5000000>; | ||
| 496 | regulator-max-microvolt = <5000000>; | ||
| 497 | regulator-always-on; | ||
| 498 | }; | ||
| 499 | }; | ||
| 500 | |||
| 328 | sound { | 501 | sound { |
| 329 | compatible = "nvidia,tegra-audio-alc5632-paz00", | 502 | compatible = "nvidia,tegra-audio-alc5632-paz00", |
| 330 | "nvidia,tegra-audio-alc5632"; | 503 | "nvidia,tegra-audio-alc5632"; |
diff --git a/arch/arm/boot/dts/tegra20-plutux.dts b/arch/arm/boot/dts/tegra20-plutux.dts new file mode 100644 index 000000000000..331a3ef24d59 --- /dev/null +++ b/arch/arm/boot/dts/tegra20-plutux.dts | |||
| @@ -0,0 +1,50 @@ | |||
| 1 | /dts-v1/; | ||
| 2 | |||
| 3 | /include/ "tegra20-tamonten.dtsi" | ||
| 4 | |||
| 5 | / { | ||
| 6 | model = "Avionic Design Plutux board"; | ||
| 7 | compatible = "ad,plutux", "ad,tamonten", "nvidia,tegra20"; | ||
| 8 | |||
| 9 | i2c@7000c000 { | ||
| 10 | wm8903: wm8903@1a { | ||
| 11 | compatible = "wlf,wm8903"; | ||
| 12 | reg = <0x1a>; | ||
| 13 | interrupt-parent = <&gpio>; | ||
| 14 | interrupts = <187 0x04>; | ||
| 15 | |||
| 16 | gpio-controller; | ||
| 17 | #gpio-cells = <2>; | ||
| 18 | |||
| 19 | micdet-cfg = <0>; | ||
| 20 | micdet-delay = <100>; | ||
| 21 | gpio-cfg = <0xffffffff | ||
| 22 | 0xffffffff | ||
| 23 | 0 | ||
| 24 | 0xffffffff | ||
| 25 | 0xffffffff>; | ||
| 26 | }; | ||
| 27 | }; | ||
| 28 | |||
| 29 | sound { | ||
| 30 | compatible = "ad,tegra-audio-plutux", | ||
| 31 | "nvidia,tegra-audio-wm8903"; | ||
| 32 | nvidia,model = "Avionic Design Plutux"; | ||
| 33 | |||
| 34 | nvidia,audio-routing = | ||
| 35 | "Headphone Jack", "HPOUTR", | ||
| 36 | "Headphone Jack", "HPOUTL", | ||
| 37 | "Int Spk", "ROP", | ||
| 38 | "Int Spk", "RON", | ||
| 39 | "Int Spk", "LOP", | ||
| 40 | "Int Spk", "LON", | ||
| 41 | "Mic Jack", "MICBIAS", | ||
| 42 | "IN1L", "Mic Jack"; | ||
| 43 | |||
| 44 | nvidia,i2s-controller = <&tegra_i2s1>; | ||
| 45 | nvidia,audio-codec = <&wm8903>; | ||
| 46 | |||
| 47 | nvidia,spkr-en-gpios = <&wm8903 2 0>; | ||
| 48 | nvidia,hp-det-gpios = <&gpio 178 0>; /* gpio PW2 */ | ||
| 49 | }; | ||
| 50 | }; | ||
diff --git a/arch/arm/boot/dts/tegra20-seaboard.dts b/arch/arm/boot/dts/tegra20-seaboard.dts index 85e621ab2968..e60dc7124e92 100644 --- a/arch/arm/boot/dts/tegra20-seaboard.dts +++ b/arch/arm/boot/dts/tegra20-seaboard.dts | |||
| @@ -374,6 +374,154 @@ | |||
| 374 | status = "okay"; | 374 | status = "okay"; |
| 375 | clock-frequency = <400000>; | 375 | clock-frequency = <400000>; |
| 376 | 376 | ||
| 377 | pmic: tps6586x@34 { | ||
| 378 | compatible = "ti,tps6586x"; | ||
| 379 | reg = <0x34>; | ||
| 380 | interrupts = <0 86 0x4>; | ||
| 381 | |||
| 382 | ti,system-power-controller; | ||
| 383 | |||
| 384 | #gpio-cells = <2>; | ||
| 385 | gpio-controller; | ||
| 386 | |||
| 387 | sys-supply = <&vdd_5v0_reg>; | ||
| 388 | vin-sm0-supply = <&sys_reg>; | ||
| 389 | vin-sm1-supply = <&sys_reg>; | ||
| 390 | vin-sm2-supply = <&sys_reg>; | ||
| 391 | vinldo01-supply = <&sm2_reg>; | ||
| 392 | vinldo23-supply = <&sm2_reg>; | ||
| 393 | vinldo4-supply = <&sm2_reg>; | ||
| 394 | vinldo678-supply = <&sm2_reg>; | ||
| 395 | vinldo9-supply = <&sm2_reg>; | ||
| 396 | |||
| 397 | regulators { | ||
| 398 | #address-cells = <1>; | ||
| 399 | #size-cells = <0>; | ||
| 400 | |||
| 401 | sys_reg: regulator@0 { | ||
| 402 | reg = <0>; | ||
| 403 | regulator-compatible = "sys"; | ||
| 404 | regulator-name = "vdd_sys"; | ||
| 405 | regulator-always-on; | ||
| 406 | }; | ||
| 407 | |||
| 408 | regulator@1 { | ||
| 409 | reg = <1>; | ||
| 410 | regulator-compatible = "sm0"; | ||
| 411 | regulator-name = "vdd_sm0,vdd_core"; | ||
| 412 | regulator-min-microvolt = <1300000>; | ||
| 413 | regulator-max-microvolt = <1300000>; | ||
| 414 | regulator-always-on; | ||
| 415 | }; | ||
| 416 | |||
| 417 | regulator@2 { | ||
| 418 | reg = <2>; | ||
| 419 | regulator-compatible = "sm1"; | ||
| 420 | regulator-name = "vdd_sm1,vdd_cpu"; | ||
| 421 | regulator-min-microvolt = <1125000>; | ||
| 422 | regulator-max-microvolt = <1125000>; | ||
| 423 | regulator-always-on; | ||
| 424 | }; | ||
| 425 | |||
| 426 | sm2_reg: regulator@3 { | ||
| 427 | reg = <3>; | ||
| 428 | regulator-compatible = "sm2"; | ||
| 429 | regulator-name = "vdd_sm2,vin_ldo*"; | ||
| 430 | regulator-min-microvolt = <3700000>; | ||
| 431 | regulator-max-microvolt = <3700000>; | ||
| 432 | regulator-always-on; | ||
| 433 | }; | ||
| 434 | |||
| 435 | /* LDO0 is not connected to anything */ | ||
| 436 | |||
| 437 | regulator@5 { | ||
| 438 | reg = <5>; | ||
| 439 | regulator-compatible = "ldo1"; | ||
| 440 | regulator-name = "vdd_ldo1,avdd_pll*"; | ||
| 441 | regulator-min-microvolt = <1100000>; | ||
| 442 | regulator-max-microvolt = <1100000>; | ||
| 443 | regulator-always-on; | ||
| 444 | }; | ||
| 445 | |||
| 446 | regulator@6 { | ||
| 447 | reg = <6>; | ||
| 448 | regulator-compatible = "ldo2"; | ||
| 449 | regulator-name = "vdd_ldo2,vdd_rtc"; | ||
| 450 | regulator-min-microvolt = <1200000>; | ||
| 451 | regulator-max-microvolt = <1200000>; | ||
| 452 | }; | ||
| 453 | |||
| 454 | regulator@7 { | ||
| 455 | reg = <7>; | ||
| 456 | regulator-compatible = "ldo3"; | ||
| 457 | regulator-name = "vdd_ldo3,avdd_usb*"; | ||
| 458 | regulator-min-microvolt = <3300000>; | ||
| 459 | regulator-max-microvolt = <3300000>; | ||
| 460 | regulator-always-on; | ||
| 461 | }; | ||
| 462 | |||
| 463 | regulator@8 { | ||
| 464 | reg = <8>; | ||
| 465 | regulator-compatible = "ldo4"; | ||
| 466 | regulator-name = "vdd_ldo4,avdd_osc,vddio_sys"; | ||
| 467 | regulator-min-microvolt = <1800000>; | ||
| 468 | regulator-max-microvolt = <1800000>; | ||
| 469 | regulator-always-on; | ||
| 470 | }; | ||
| 471 | |||
| 472 | regulator@9 { | ||
| 473 | reg = <9>; | ||
| 474 | regulator-compatible = "ldo5"; | ||
| 475 | regulator-name = "vdd_ldo5,vcore_mmc"; | ||
| 476 | regulator-min-microvolt = <2850000>; | ||
| 477 | regulator-max-microvolt = <2850000>; | ||
| 478 | regulator-always-on; | ||
| 479 | }; | ||
| 480 | |||
| 481 | regulator@10 { | ||
| 482 | reg = <10>; | ||
| 483 | regulator-compatible = "ldo6"; | ||
| 484 | regulator-name = "vdd_ldo6,avdd_vdac,vddio_vi,vddio_cam"; | ||
| 485 | regulator-min-microvolt = <1800000>; | ||
| 486 | regulator-max-microvolt = <1800000>; | ||
| 487 | }; | ||
| 488 | |||
| 489 | regulator@11 { | ||
| 490 | reg = <11>; | ||
| 491 | regulator-compatible = "ldo7"; | ||
| 492 | regulator-name = "vdd_ldo7,avdd_hdmi,vdd_fuse"; | ||
| 493 | regulator-min-microvolt = <3300000>; | ||
| 494 | regulator-max-microvolt = <3300000>; | ||
| 495 | }; | ||
| 496 | |||
| 497 | regulator@12 { | ||
| 498 | reg = <12>; | ||
| 499 | regulator-compatible = "ldo8"; | ||
| 500 | regulator-name = "vdd_ldo8,avdd_hdmi_pll"; | ||
| 501 | regulator-min-microvolt = <1800000>; | ||
| 502 | regulator-max-microvolt = <1800000>; | ||
| 503 | }; | ||
| 504 | |||
| 505 | regulator@13 { | ||
| 506 | reg = <13>; | ||
| 507 | regulator-compatible = "ldo9"; | ||
| 508 | regulator-name = "vdd_ldo9,avdd_2v85,vdd_ddr_rx"; | ||
| 509 | regulator-min-microvolt = <2850000>; | ||
| 510 | regulator-max-microvolt = <2850000>; | ||
| 511 | regulator-always-on; | ||
| 512 | }; | ||
| 513 | |||
| 514 | regulator@14 { | ||
| 515 | reg = <14>; | ||
| 516 | regulator-compatible = "ldo_rtc"; | ||
| 517 | regulator-name = "vdd_rtc_out,vdd_cell"; | ||
| 518 | regulator-min-microvolt = <3300000>; | ||
| 519 | regulator-max-microvolt = <3300000>; | ||
| 520 | regulator-always-on; | ||
| 521 | }; | ||
| 522 | }; | ||
| 523 | }; | ||
| 524 | |||
| 377 | temperature-sensor@4c { | 525 | temperature-sensor@4c { |
| 378 | compatible = "nct1008"; | 526 | compatible = "nct1008"; |
| 379 | reg = <0x4c>; | 527 | reg = <0x4c>; |
| @@ -387,6 +535,10 @@ | |||
| 387 | }; | 535 | }; |
| 388 | }; | 536 | }; |
| 389 | 537 | ||
| 538 | pmc { | ||
| 539 | nvidia,invert-interrupt; | ||
| 540 | }; | ||
| 541 | |||
| 390 | memory-controller@0x7000f400 { | 542 | memory-controller@0x7000f400 { |
| 391 | emc-table@190000 { | 543 | emc-table@190000 { |
| 392 | reg = <190000>; | 544 | reg = <190000>; |
| @@ -473,6 +625,40 @@ | |||
| 473 | }; | 625 | }; |
| 474 | }; | 626 | }; |
| 475 | 627 | ||
| 628 | regulators { | ||
| 629 | compatible = "simple-bus"; | ||
| 630 | #address-cells = <1>; | ||
| 631 | #size-cells = <0>; | ||
| 632 | |||
| 633 | vdd_5v0_reg: regulator@0 { | ||
| 634 | compatible = "regulator-fixed"; | ||
| 635 | reg = <0>; | ||
| 636 | regulator-name = "vdd_5v0"; | ||
| 637 | regulator-min-microvolt = <5000000>; | ||
| 638 | regulator-max-microvolt = <5000000>; | ||
| 639 | regulator-always-on; | ||
| 640 | }; | ||
| 641 | |||
| 642 | regulator@1 { | ||
| 643 | compatible = "regulator-fixed"; | ||
| 644 | reg = <1>; | ||
| 645 | regulator-name = "vdd_1v5"; | ||
| 646 | regulator-min-microvolt = <1500000>; | ||
| 647 | regulator-max-microvolt = <1500000>; | ||
| 648 | gpio = <&pmic 0 0>; | ||
| 649 | }; | ||
| 650 | |||
| 651 | regulator@2 { | ||
| 652 | compatible = "regulator-fixed"; | ||
| 653 | reg = <2>; | ||
| 654 | regulator-name = "vdd_1v2"; | ||
| 655 | regulator-min-microvolt = <1200000>; | ||
| 656 | regulator-max-microvolt = <1200000>; | ||
| 657 | gpio = <&pmic 1 0>; | ||
| 658 | enable-active-high; | ||
| 659 | }; | ||
| 660 | }; | ||
| 661 | |||
| 476 | sound { | 662 | sound { |
| 477 | compatible = "nvidia,tegra-audio-wm8903-seaboard", | 663 | compatible = "nvidia,tegra-audio-wm8903-seaboard", |
| 478 | "nvidia,tegra-audio-wm8903"; | 664 | "nvidia,tegra-audio-wm8903"; |
diff --git a/arch/arm/boot/dts/tegra20-tamonten.dtsi b/arch/arm/boot/dts/tegra20-tamonten.dtsi new file mode 100644 index 000000000000..f18cec9f6a77 --- /dev/null +++ b/arch/arm/boot/dts/tegra20-tamonten.dtsi | |||
| @@ -0,0 +1,449 @@ | |||
| 1 | /include/ "tegra20.dtsi" | ||
| 2 | |||
| 3 | / { | ||
| 4 | model = "Avionic Design Tamonten SOM"; | ||
| 5 | compatible = "ad,tamonten", "nvidia,tegra20"; | ||
| 6 | |||
| 7 | memory { | ||
| 8 | reg = <0x00000000 0x20000000>; | ||
| 9 | }; | ||
| 10 | |||
| 11 | pinmux { | ||
| 12 | pinctrl-names = "default"; | ||
| 13 | pinctrl-0 = <&state_default>; | ||
| 14 | |||
| 15 | state_default: pinmux { | ||
| 16 | ata { | ||
| 17 | nvidia,pins = "ata"; | ||
| 18 | nvidia,function = "ide"; | ||
| 19 | }; | ||
| 20 | atb { | ||
| 21 | nvidia,pins = "atb", "gma", "gme"; | ||
| 22 | nvidia,function = "sdio4"; | ||
| 23 | }; | ||
| 24 | atc { | ||
| 25 | nvidia,pins = "atc"; | ||
| 26 | nvidia,function = "nand"; | ||
| 27 | }; | ||
| 28 | atd { | ||
| 29 | nvidia,pins = "atd", "ate", "gmb", "gmd", "gpu", | ||
| 30 | "spia", "spib", "spic"; | ||
| 31 | nvidia,function = "gmi"; | ||
| 32 | }; | ||
| 33 | cdev1 { | ||
| 34 | nvidia,pins = "cdev1"; | ||
| 35 | nvidia,function = "plla_out"; | ||
| 36 | }; | ||
| 37 | cdev2 { | ||
| 38 | nvidia,pins = "cdev2"; | ||
| 39 | nvidia,function = "pllp_out4"; | ||
| 40 | }; | ||
| 41 | crtp { | ||
| 42 | nvidia,pins = "crtp"; | ||
| 43 | nvidia,function = "crt"; | ||
| 44 | }; | ||
| 45 | csus { | ||
| 46 | nvidia,pins = "csus"; | ||
| 47 | nvidia,function = "vi_sensor_clk"; | ||
| 48 | }; | ||
| 49 | dap1 { | ||
| 50 | nvidia,pins = "dap1"; | ||
| 51 | nvidia,function = "dap1"; | ||
| 52 | }; | ||
| 53 | dap2 { | ||
| 54 | nvidia,pins = "dap2"; | ||
| 55 | nvidia,function = "dap2"; | ||
| 56 | }; | ||
| 57 | dap3 { | ||
| 58 | nvidia,pins = "dap3"; | ||
| 59 | nvidia,function = "dap3"; | ||
| 60 | }; | ||
| 61 | dap4 { | ||
| 62 | nvidia,pins = "dap4"; | ||
| 63 | nvidia,function = "dap4"; | ||
| 64 | }; | ||
| 65 | ddc { | ||
| 66 | nvidia,pins = "ddc"; | ||
| 67 | nvidia,function = "i2c2"; | ||
| 68 | }; | ||
| 69 | dta { | ||
| 70 | nvidia,pins = "dta", "dtd"; | ||
| 71 | nvidia,function = "sdio2"; | ||
| 72 | }; | ||
| 73 | dtb { | ||
| 74 | nvidia,pins = "dtb", "dtc", "dte"; | ||
| 75 | nvidia,function = "rsvd1"; | ||
| 76 | }; | ||
| 77 | dtf { | ||
| 78 | nvidia,pins = "dtf"; | ||
| 79 | nvidia,function = "i2c3"; | ||
| 80 | }; | ||
| 81 | gmc { | ||
| 82 | nvidia,pins = "gmc"; | ||
| 83 | nvidia,function = "uartd"; | ||
| 84 | }; | ||
| 85 | gpu7 { | ||
| 86 | nvidia,pins = "gpu7"; | ||
| 87 | nvidia,function = "rtck"; | ||
| 88 | }; | ||
| 89 | gpv { | ||
| 90 | nvidia,pins = "gpv", "slxa", "slxk"; | ||
| 91 | nvidia,function = "pcie"; | ||
| 92 | }; | ||
| 93 | hdint { | ||
| 94 | nvidia,pins = "hdint", "pta"; | ||
| 95 | nvidia,function = "hdmi"; | ||
| 96 | }; | ||
| 97 | i2cp { | ||
| 98 | nvidia,pins = "i2cp"; | ||
| 99 | nvidia,function = "i2cp"; | ||
| 100 | }; | ||
| 101 | irrx { | ||
| 102 | nvidia,pins = "irrx", "irtx"; | ||
| 103 | nvidia,function = "uarta"; | ||
| 104 | }; | ||
| 105 | kbca { | ||
| 106 | nvidia,pins = "kbca", "kbcb", "kbcc", "kbcd", | ||
| 107 | "kbce", "kbcf"; | ||
| 108 | nvidia,function = "kbc"; | ||
| 109 | }; | ||
| 110 | lcsn { | ||
| 111 | nvidia,pins = "lcsn", "ld0", "ld1", "ld2", | ||
| 112 | "ld3", "ld4", "ld5", "ld6", "ld7", | ||
| 113 | "ld8", "ld9", "ld10", "ld11", "ld12", | ||
| 114 | "ld13", "ld14", "ld15", "ld16", "ld17", | ||
| 115 | "ldc", "ldi", "lhp0", "lhp1", "lhp2", | ||
| 116 | "lhs", "lm0", "lm1", "lpp", "lpw0", | ||
| 117 | "lpw1", "lpw2", "lsc0", "lsc1", "lsck", | ||
| 118 | "lsda", "lsdi", "lspi", "lvp0", "lvp1", | ||
| 119 | "lvs"; | ||
| 120 | nvidia,function = "displaya"; | ||
| 121 | }; | ||
| 122 | owc { | ||
| 123 | nvidia,pins = "owc", "spdi", "spdo", "uac"; | ||
| 124 | nvidia,function = "rsvd2"; | ||
| 125 | }; | ||
| 126 | pmc { | ||
| 127 | nvidia,pins = "pmc"; | ||
| 128 | nvidia,function = "pwr_on"; | ||
| 129 | }; | ||
| 130 | rm { | ||
| 131 | nvidia,pins = "rm"; | ||
| 132 | nvidia,function = "i2c1"; | ||
| 133 | }; | ||
| 134 | sdb { | ||
| 135 | nvidia,pins = "sdb", "sdc", "sdd"; | ||
| 136 | nvidia,function = "pwm"; | ||
| 137 | }; | ||
| 138 | sdio1 { | ||
| 139 | nvidia,pins = "sdio1"; | ||
| 140 | nvidia,function = "sdio1"; | ||
| 141 | }; | ||
| 142 | slxc { | ||
| 143 | nvidia,pins = "slxc", "slxd"; | ||
| 144 | nvidia,function = "spdif"; | ||
| 145 | }; | ||
| 146 | spid { | ||
| 147 | nvidia,pins = "spid", "spie", "spif"; | ||
| 148 | nvidia,function = "spi1"; | ||
| 149 | }; | ||
| 150 | spig { | ||
| 151 | nvidia,pins = "spig", "spih"; | ||
| 152 | nvidia,function = "spi2_alt"; | ||
| 153 | }; | ||
| 154 | uaa { | ||
| 155 | nvidia,pins = "uaa", "uab", "uda"; | ||
| 156 | nvidia,function = "ulpi"; | ||
| 157 | }; | ||
| 158 | uad { | ||
| 159 | nvidia,pins = "uad"; | ||
| 160 | nvidia,function = "irda"; | ||
| 161 | }; | ||
| 162 | uca { | ||
| 163 | nvidia,pins = "uca", "ucb"; | ||
| 164 | nvidia,function = "uartc"; | ||
| 165 | }; | ||
| 166 | conf_ata { | ||
| 167 | nvidia,pins = "ata", "atb", "atc", "atd", "ate", | ||
| 168 | "cdev1", "cdev2", "dap1", "dtb", "gma", | ||
| 169 | "gmb", "gmc", "gmd", "gme", "gpu7", | ||
| 170 | "gpv", "i2cp", "pta", "rm", "slxa", | ||
| 171 | "slxk", "spia", "spib", "uac"; | ||
| 172 | nvidia,pull = <0>; | ||
| 173 | nvidia,tristate = <0>; | ||
| 174 | }; | ||
| 175 | conf_ck32 { | ||
| 176 | nvidia,pins = "ck32", "ddrc", "pmca", "pmcb", | ||
| 177 | "pmcc", "pmcd", "pmce", "xm2c", "xm2d"; | ||
| 178 | nvidia,pull = <0>; | ||
| 179 | }; | ||
| 180 | conf_csus { | ||
| 181 | nvidia,pins = "csus", "spid", "spif"; | ||
| 182 | nvidia,pull = <1>; | ||
| 183 | nvidia,tristate = <1>; | ||
| 184 | }; | ||
| 185 | conf_crtp { | ||
| 186 | nvidia,pins = "crtp", "dap2", "dap3", "dap4", | ||
| 187 | "dtc", "dte", "dtf", "gpu", "sdio1", | ||
| 188 | "slxc", "slxd", "spdi", "spdo", "spig", | ||
| 189 | "uda"; | ||
| 190 | nvidia,pull = <0>; | ||
| 191 | nvidia,tristate = <1>; | ||
| 192 | }; | ||
| 193 | conf_ddc { | ||
| 194 | nvidia,pins = "ddc", "dta", "dtd", "kbca", | ||
| 195 | "kbcb", "kbcc", "kbcd", "kbce", "kbcf", | ||
| 196 | "sdc"; | ||
| 197 | nvidia,pull = <2>; | ||
| 198 | nvidia,tristate = <0>; | ||
| 199 | }; | ||
| 200 | conf_hdint { | ||
| 201 | nvidia,pins = "hdint", "lcsn", "ldc", "lm1", | ||
| 202 | "lpw1", "lsc1", "lsck", "lsda", "lsdi", | ||
| 203 | "lvp0", "owc", "sdb"; | ||
| 204 | nvidia,tristate = <1>; | ||
| 205 | }; | ||
| 206 | conf_irrx { | ||
| 207 | nvidia,pins = "irrx", "irtx", "sdd", "spic", | ||
| 208 | "spie", "spih", "uaa", "uab", "uad", | ||
| 209 | "uca", "ucb"; | ||
| 210 | nvidia,pull = <2>; | ||
| 211 | nvidia,tristate = <1>; | ||
| 212 | }; | ||
| 213 | conf_lc { | ||
| 214 | nvidia,pins = "lc", "ls"; | ||
| 215 | nvidia,pull = <2>; | ||
| 216 | }; | ||
| 217 | conf_ld0 { | ||
| 218 | nvidia,pins = "ld0", "ld1", "ld2", "ld3", "ld4", | ||
| 219 | "ld5", "ld6", "ld7", "ld8", "ld9", | ||
| 220 | "ld10", "ld11", "ld12", "ld13", "ld14", | ||
| 221 | "ld15", "ld16", "ld17", "ldi", "lhp0", | ||
| 222 | "lhp1", "lhp2", "lhs", "lm0", "lpp", | ||
| 223 | "lpw0", "lpw2", "lsc0", "lspi", "lvp1", | ||
| 224 | "lvs", "pmc"; | ||
| 225 | nvidia,tristate = <0>; | ||
| 226 | }; | ||
| 227 | conf_ld17_0 { | ||
| 228 | nvidia,pins = "ld17_0", "ld19_18", "ld21_20", | ||
| 229 | "ld23_22"; | ||
| 230 | nvidia,pull = <1>; | ||
| 231 | }; | ||
| 232 | }; | ||
| 233 | }; | ||
| 234 | |||
| 235 | i2s@70002800 { | ||
| 236 | status = "okay"; | ||
| 237 | }; | ||
| 238 | |||
| 239 | serial@70006300 { | ||
| 240 | clock-frequency = <216000000>; | ||
| 241 | status = "okay"; | ||
| 242 | }; | ||
| 243 | |||
| 244 | i2c@7000c000 { | ||
| 245 | clock-frequency = <400000>; | ||
| 246 | status = "okay"; | ||
| 247 | }; | ||
| 248 | |||
| 249 | i2c@7000d000 { | ||
| 250 | clock-frequency = <400000>; | ||
| 251 | status = "okay"; | ||
| 252 | |||
| 253 | pmic: tps6586x@34 { | ||
| 254 | compatible = "ti,tps6586x"; | ||
| 255 | reg = <0x34>; | ||
| 256 | interrupts = <0 86 0x4>; | ||
| 257 | |||
| 258 | ti,system-power-controller; | ||
| 259 | |||
| 260 | #gpio-cells = <2>; | ||
| 261 | gpio-controller; | ||
| 262 | |||
| 263 | sys-supply = <&vdd_5v0_reg>; | ||
| 264 | vin-sm0-supply = <&sys_reg>; | ||
| 265 | vin-sm1-supply = <&sys_reg>; | ||
| 266 | vin-sm2-supply = <&sys_reg>; | ||
| 267 | vinldo01-supply = <&sm2_reg>; | ||
| 268 | vinldo23-supply = <&sm2_reg>; | ||
| 269 | vinldo4-supply = <&sm2_reg>; | ||
| 270 | vinldo678-supply = <&sm2_reg>; | ||
| 271 | vinldo9-supply = <&sm2_reg>; | ||
| 272 | |||
| 273 | regulators { | ||
| 274 | #address-cells = <1>; | ||
| 275 | #size-cells = <0>; | ||
| 276 | |||
| 277 | sys_reg: regulator@0 { | ||
| 278 | reg = <0>; | ||
| 279 | regulator-compatible = "sys"; | ||
| 280 | regulator-name = "vdd_sys"; | ||
| 281 | regulator-always-on; | ||
| 282 | }; | ||
| 283 | |||
| 284 | regulator@1 { | ||
| 285 | reg = <1>; | ||
| 286 | regulator-compatible = "sm0"; | ||
| 287 | regulator-name = "vdd_sys_sm0,vdd_core"; | ||
| 288 | regulator-min-microvolt = <1200000>; | ||
| 289 | regulator-max-microvolt = <1200000>; | ||
| 290 | regulator-always-on; | ||
| 291 | }; | ||
| 292 | |||
| 293 | regulator@2 { | ||
| 294 | reg = <2>; | ||
| 295 | regulator-compatible = "sm1"; | ||
| 296 | regulator-name = "vdd_sys_sm1,vdd_cpu"; | ||
| 297 | regulator-min-microvolt = <1000000>; | ||
| 298 | regulator-max-microvolt = <1000000>; | ||
| 299 | regulator-always-on; | ||
| 300 | }; | ||
| 301 | |||
| 302 | sm2_reg: regulator@3 { | ||
| 303 | reg = <3>; | ||
| 304 | regulator-compatible = "sm2"; | ||
| 305 | regulator-name = "vdd_sys_sm2,vin_ldo*"; | ||
| 306 | regulator-min-microvolt = <3700000>; | ||
| 307 | regulator-max-microvolt = <3700000>; | ||
| 308 | regulator-always-on; | ||
| 309 | }; | ||
| 310 | |||
| 311 | regulator@4 { | ||
| 312 | reg = <4>; | ||
| 313 | regulator-compatible = "ldo0"; | ||
| 314 | regulator-name = "vdd_ldo0,vddio_pex_clk"; | ||
| 315 | regulator-min-microvolt = <3300000>; | ||
| 316 | regulator-max-microvolt = <3300000>; | ||
| 317 | }; | ||
| 318 | |||
| 319 | regulator@5 { | ||
| 320 | reg = <5>; | ||
| 321 | regulator-compatible = "ldo1"; | ||
| 322 | regulator-name = "vdd_ldo1,avdd_pll*"; | ||
| 323 | regulator-min-microvolt = <1100000>; | ||
| 324 | regulator-max-microvolt = <1100000>; | ||
| 325 | regulator-always-on; | ||
| 326 | }; | ||
| 327 | |||
| 328 | regulator@6 { | ||
| 329 | reg = <6>; | ||
| 330 | regulator-compatible = "ldo2"; | ||
| 331 | regulator-name = "vdd_ldo2,vdd_rtc"; | ||
| 332 | regulator-min-microvolt = <1200000>; | ||
| 333 | regulator-max-microvolt = <1200000>; | ||
| 334 | }; | ||
| 335 | |||
| 336 | regulator@7 { | ||
| 337 | reg = <7>; | ||
| 338 | regulator-compatible = "ldo3"; | ||
| 339 | regulator-name = "vdd_ldo3,avdd_usb*"; | ||
| 340 | regulator-min-microvolt = <3300000>; | ||
| 341 | regulator-max-microvolt = <3300000>; | ||
| 342 | regulator-always-on; | ||
| 343 | }; | ||
| 344 | |||
| 345 | regulator@8 { | ||
| 346 | reg = <8>; | ||
| 347 | regulator-compatible = "ldo4"; | ||
| 348 | regulator-name = "vdd_ldo4,avdd_osc,vddio_sys"; | ||
| 349 | regulator-min-microvolt = <1800000>; | ||
| 350 | regulator-max-microvolt = <1800000>; | ||
| 351 | regulator-always-on; | ||
| 352 | }; | ||
| 353 | |||
| 354 | regulator@9 { | ||
| 355 | reg = <9>; | ||
| 356 | regulator-compatible = "ldo5"; | ||
| 357 | regulator-name = "vdd_ldo5,vcore_mmc"; | ||
| 358 | regulator-min-microvolt = <2850000>; | ||
| 359 | regulator-max-microvolt = <2850000>; | ||
| 360 | }; | ||
| 361 | |||
| 362 | regulator@10 { | ||
| 363 | reg = <10>; | ||
| 364 | regulator-compatible = "ldo6"; | ||
| 365 | regulator-name = "vdd_ldo6,avdd_vdac"; | ||
| 366 | /* | ||
| 367 | * According to the Tegra 2 Automotive | ||
| 368 | * DataSheet, a typical value for this | ||
| 369 | * would be 2.8V, but the PMIC only | ||
| 370 | * supports 2.85V. | ||
| 371 | */ | ||
| 372 | regulator-min-microvolt = <2850000>; | ||
| 373 | regulator-max-microvolt = <2850000>; | ||
| 374 | }; | ||
| 375 | |||
| 376 | regulator@11 { | ||
| 377 | reg = <11>; | ||
| 378 | regulator-compatible = "ldo7"; | ||
| 379 | regulator-name = "vdd_ldo7,avdd_hdmi"; | ||
| 380 | regulator-min-microvolt = <3300000>; | ||
| 381 | regulator-max-microvolt = <3300000>; | ||
| 382 | }; | ||
| 383 | |||
| 384 | regulator@12 { | ||
| 385 | reg = <12>; | ||
| 386 | regulator-compatible = "ldo8"; | ||
| 387 | regulator-name = "vdd_ldo8,avdd_hdmi_pll"; | ||
| 388 | regulator-min-microvolt = <1800000>; | ||
| 389 | regulator-max-microvolt = <1800000>; | ||
| 390 | }; | ||
| 391 | |||
| 392 | regulator@13 { | ||
| 393 | reg = <13>; | ||
| 394 | regulator-compatible = "ldo9"; | ||
| 395 | regulator-name = "vdd_ldo9,vdd_ddr_rx,avdd_cam"; | ||
| 396 | /* | ||
| 397 | * According to the Tegra 2 Automotive | ||
| 398 | * DataSheet, a typical value for this | ||
| 399 | * would be 2.8V, but the PMIC only | ||
| 400 | * supports 2.85V. | ||
| 401 | */ | ||
| 402 | regulator-min-microvolt = <2850000>; | ||
| 403 | regulator-max-microvolt = <2850000>; | ||
| 404 | regulator-always-on; | ||
| 405 | }; | ||
| 406 | |||
| 407 | regulator@14 { | ||
| 408 | reg = <14>; | ||
| 409 | regulator-compatible = "ldo_rtc"; | ||
| 410 | regulator-name = "vdd_rtc_out"; | ||
| 411 | regulator-min-microvolt = <3300000>; | ||
| 412 | regulator-max-microvolt = <3300000>; | ||
| 413 | regulator-always-on; | ||
| 414 | }; | ||
| 415 | }; | ||
| 416 | }; | ||
| 417 | }; | ||
| 418 | |||
| 419 | pmc { | ||
| 420 | nvidia,invert-interrupt; | ||
| 421 | }; | ||
| 422 | |||
| 423 | usb@c5008000 { | ||
| 424 | status = "okay"; | ||
| 425 | }; | ||
| 426 | |||
| 427 | sdhci@c8000600 { | ||
| 428 | cd-gpios = <&gpio 58 0>; /* gpio PH2 */ | ||
| 429 | wp-gpios = <&gpio 59 0>; /* gpio PH3 */ | ||
| 430 | bus-width = <4>; | ||
| 431 | status = "okay"; | ||
| 432 | }; | ||
| 433 | |||
| 434 | regulators { | ||
| 435 | compatible = "simple-bus"; | ||
| 436 | |||
| 437 | #address-cells = <1>; | ||
| 438 | #size-cells = <0>; | ||
| 439 | |||
| 440 | vdd_5v0_reg: regulator@0 { | ||
| 441 | compatible = "regulator-fixed"; | ||
| 442 | reg = <0>; | ||
| 443 | regulator-name = "vdd_5v0"; | ||
| 444 | regulator-min-microvolt = <5000000>; | ||
| 445 | regulator-max-microvolt = <5000000>; | ||
| 446 | regulator-always-on; | ||
| 447 | }; | ||
| 448 | }; | ||
| 449 | }; | ||
diff --git a/arch/arm/boot/dts/tegra20-tec.dts b/arch/arm/boot/dts/tegra20-tec.dts new file mode 100644 index 000000000000..9aff31b0fe4a --- /dev/null +++ b/arch/arm/boot/dts/tegra20-tec.dts | |||
| @@ -0,0 +1,53 @@ | |||
| 1 | /dts-v1/; | ||
| 2 | |||
| 3 | /include/ "tegra20-tamonten.dtsi" | ||
| 4 | |||
| 5 | / { | ||
| 6 | model = "Avionic Design Tamonten Evaluation Carrier"; | ||
| 7 | compatible = "ad,tec", "ad,tamonten", "nvidia,tegra20"; | ||
| 8 | |||
| 9 | i2c@7000c000 { | ||
| 10 | clock-frequency = <400000>; | ||
| 11 | status = "okay"; | ||
| 12 | |||
| 13 | wm8903: wm8903@1a { | ||
| 14 | compatible = "wlf,wm8903"; | ||
| 15 | reg = <0x1a>; | ||
| 16 | interrupt-parent = <&gpio>; | ||
| 17 | interrupts = <187 0x04>; | ||
| 18 | |||
| 19 | gpio-controller; | ||
| 20 | #gpio-cells = <2>; | ||
| 21 | |||
| 22 | micdet-cfg = <0>; | ||
| 23 | micdet-delay = <100>; | ||
| 24 | gpio-cfg = <0xffffffff | ||
| 25 | 0xffffffff | ||
| 26 | 0 | ||
| 27 | 0xffffffff | ||
| 28 | 0xffffffff>; | ||
| 29 | }; | ||
| 30 | }; | ||
| 31 | |||
| 32 | sound { | ||
| 33 | compatible = "ad,tegra-audio-wm8903-tec", | ||
| 34 | "nvidia,tegra-audio-wm8903"; | ||
| 35 | nvidia,model = "Avionic Design TEC"; | ||
| 36 | |||
| 37 | nvidia,audio-routing = | ||
| 38 | "Headphone Jack", "HPOUTR", | ||
| 39 | "Headphone Jack", "HPOUTL", | ||
| 40 | "Int Spk", "ROP", | ||
| 41 | "Int Spk", "RON", | ||
| 42 | "Int Spk", "LOP", | ||
| 43 | "Int Spk", "LON", | ||
| 44 | "Mic Jack", "MICBIAS", | ||
| 45 | "IN1L", "Mic Jack"; | ||
| 46 | |||
| 47 | nvidia,i2s-controller = <&tegra_i2s1>; | ||
| 48 | nvidia,audio-codec = <&wm8903>; | ||
| 49 | |||
| 50 | nvidia,spkr-en-gpios = <&wm8903 2 0>; | ||
| 51 | nvidia,hp-det-gpios = <&gpio 178 0>; /* gpio PW2 */ | ||
| 52 | }; | ||
| 53 | }; | ||
diff --git a/arch/arm/boot/dts/tegra20-ventana.dts b/arch/arm/boot/dts/tegra20-ventana.dts index be90544e6b59..3e5952fcfbc5 100644 --- a/arch/arm/boot/dts/tegra20-ventana.dts +++ b/arch/arm/boot/dts/tegra20-ventana.dts | |||
| @@ -289,6 +289,158 @@ | |||
| 289 | i2c@7000d000 { | 289 | i2c@7000d000 { |
| 290 | status = "okay"; | 290 | status = "okay"; |
| 291 | clock-frequency = <400000>; | 291 | clock-frequency = <400000>; |
| 292 | |||
| 293 | pmic: tps6586x@34 { | ||
| 294 | compatible = "ti,tps6586x"; | ||
| 295 | reg = <0x34>; | ||
| 296 | interrupts = <0 86 0x4>; | ||
| 297 | |||
| 298 | ti,system-power-controller; | ||
| 299 | |||
| 300 | #gpio-cells = <2>; | ||
| 301 | gpio-controller; | ||
| 302 | |||
| 303 | sys-supply = <&vdd_5v0_reg>; | ||
| 304 | vin-sm0-supply = <&sys_reg>; | ||
| 305 | vin-sm1-supply = <&sys_reg>; | ||
| 306 | vin-sm2-supply = <&sys_reg>; | ||
| 307 | vinldo01-supply = <&sm2_reg>; | ||
| 308 | vinldo23-supply = <&sm2_reg>; | ||
| 309 | vinldo4-supply = <&sm2_reg>; | ||
| 310 | vinldo678-supply = <&sm2_reg>; | ||
| 311 | vinldo9-supply = <&sm2_reg>; | ||
| 312 | |||
| 313 | regulators { | ||
| 314 | #address-cells = <1>; | ||
| 315 | #size-cells = <0>; | ||
| 316 | |||
| 317 | sys_reg: regulator@0 { | ||
| 318 | reg = <0>; | ||
| 319 | regulator-compatible = "sys"; | ||
| 320 | regulator-name = "vdd_sys"; | ||
| 321 | regulator-always-on; | ||
| 322 | }; | ||
| 323 | |||
| 324 | regulator@1 { | ||
| 325 | reg = <1>; | ||
| 326 | regulator-compatible = "sm0"; | ||
| 327 | regulator-name = "vdd_sm0,vdd_core"; | ||
| 328 | regulator-min-microvolt = <1200000>; | ||
| 329 | regulator-max-microvolt = <1200000>; | ||
| 330 | regulator-always-on; | ||
| 331 | }; | ||
| 332 | |||
| 333 | regulator@2 { | ||
| 334 | reg = <2>; | ||
| 335 | regulator-compatible = "sm1"; | ||
| 336 | regulator-name = "vdd_sm1,vdd_cpu"; | ||
| 337 | regulator-min-microvolt = <1000000>; | ||
| 338 | regulator-max-microvolt = <1000000>; | ||
| 339 | regulator-always-on; | ||
| 340 | }; | ||
| 341 | |||
| 342 | sm2_reg: regulator@3 { | ||
| 343 | reg = <3>; | ||
| 344 | regulator-compatible = "sm2"; | ||
| 345 | regulator-name = "vdd_sm2,vin_ldo*"; | ||
| 346 | regulator-min-microvolt = <3700000>; | ||
| 347 | regulator-max-microvolt = <3700000>; | ||
| 348 | regulator-always-on; | ||
| 349 | }; | ||
| 350 | |||
| 351 | /* LDO0 is not connected to anything */ | ||
| 352 | |||
| 353 | regulator@5 { | ||
| 354 | reg = <5>; | ||
| 355 | regulator-compatible = "ldo1"; | ||
| 356 | regulator-name = "vdd_ldo1,avdd_pll*"; | ||
| 357 | regulator-min-microvolt = <1100000>; | ||
| 358 | regulator-max-microvolt = <1100000>; | ||
| 359 | regulator-always-on; | ||
| 360 | }; | ||
| 361 | |||
| 362 | regulator@6 { | ||
| 363 | reg = <6>; | ||
| 364 | regulator-compatible = "ldo2"; | ||
| 365 | regulator-name = "vdd_ldo2,vdd_rtc"; | ||
| 366 | regulator-min-microvolt = <1200000>; | ||
| 367 | regulator-max-microvolt = <1200000>; | ||
| 368 | }; | ||
| 369 | |||
| 370 | regulator@7 { | ||
| 371 | reg = <7>; | ||
| 372 | regulator-compatible = "ldo3"; | ||
| 373 | regulator-name = "vdd_ldo3,avdd_usb*"; | ||
| 374 | regulator-min-microvolt = <3300000>; | ||
| 375 | regulator-max-microvolt = <3300000>; | ||
| 376 | regulator-always-on; | ||
| 377 | }; | ||
| 378 | |||
| 379 | regulator@8 { | ||
| 380 | reg = <8>; | ||
| 381 | regulator-compatible = "ldo4"; | ||
| 382 | regulator-name = "vdd_ldo4,avdd_osc,vddio_sys"; | ||
| 383 | regulator-min-microvolt = <1800000>; | ||
| 384 | regulator-max-microvolt = <1800000>; | ||
| 385 | regulator-always-on; | ||
| 386 | }; | ||
| 387 | |||
| 388 | regulator@9 { | ||
| 389 | reg = <9>; | ||
| 390 | regulator-compatible = "ldo5"; | ||
| 391 | regulator-name = "vdd_ldo5,vcore_mmc"; | ||
| 392 | regulator-min-microvolt = <2850000>; | ||
| 393 | regulator-max-microvolt = <2850000>; | ||
| 394 | regulator-always-on; | ||
| 395 | }; | ||
| 396 | |||
| 397 | regulator@10 { | ||
| 398 | reg = <10>; | ||
| 399 | regulator-compatible = "ldo6"; | ||
| 400 | regulator-name = "vdd_ldo6,avdd_vdac"; | ||
| 401 | regulator-min-microvolt = <1800000>; | ||
| 402 | regulator-max-microvolt = <1800000>; | ||
| 403 | }; | ||
| 404 | |||
| 405 | regulator@11 { | ||
| 406 | reg = <11>; | ||
| 407 | regulator-compatible = "ldo7"; | ||
| 408 | regulator-name = "vdd_ldo7,avdd_hdmi,vdd_fuse"; | ||
| 409 | regulator-min-microvolt = <3300000>; | ||
| 410 | regulator-max-microvolt = <3300000>; | ||
| 411 | }; | ||
| 412 | |||
| 413 | regulator@12 { | ||
| 414 | reg = <12>; | ||
| 415 | regulator-compatible = "ldo8"; | ||
| 416 | regulator-name = "vdd_ldo8,avdd_hdmi_pll"; | ||
| 417 | regulator-min-microvolt = <1800000>; | ||
| 418 | regulator-max-microvolt = <1800000>; | ||
| 419 | }; | ||
| 420 | |||
| 421 | regulator@13 { | ||
| 422 | reg = <13>; | ||
| 423 | regulator-compatible = "ldo9"; | ||
| 424 | regulator-name = "vdd_ldo9,avdd_2v85,vdd_ddr_rx"; | ||
| 425 | regulator-min-microvolt = <2850000>; | ||
| 426 | regulator-max-microvolt = <2850000>; | ||
| 427 | regulator-always-on; | ||
| 428 | }; | ||
| 429 | |||
| 430 | regulator@14 { | ||
| 431 | reg = <14>; | ||
| 432 | regulator-compatible = "ldo_rtc"; | ||
| 433 | regulator-name = "vdd_rtc_out,vdd_cell"; | ||
| 434 | regulator-min-microvolt = <3300000>; | ||
| 435 | regulator-max-microvolt = <3300000>; | ||
| 436 | regulator-always-on; | ||
| 437 | }; | ||
| 438 | }; | ||
| 439 | }; | ||
| 440 | }; | ||
| 441 | |||
| 442 | pmc { | ||
| 443 | nvidia,invert-interrupt; | ||
| 292 | }; | 444 | }; |
| 293 | 445 | ||
| 294 | usb@c5000000 { | 446 | usb@c5000000 { |
| @@ -317,6 +469,60 @@ | |||
| 317 | bus-width = <8>; | 469 | bus-width = <8>; |
| 318 | }; | 470 | }; |
| 319 | 471 | ||
| 472 | regulators { | ||
| 473 | compatible = "simple-bus"; | ||
| 474 | #address-cells = <1>; | ||
| 475 | #size-cells = <0>; | ||
| 476 | |||
| 477 | vdd_5v0_reg: regulator@0 { | ||
| 478 | compatible = "regulator-fixed"; | ||
| 479 | reg = <0>; | ||
| 480 | regulator-name = "vdd_5v0"; | ||
| 481 | regulator-min-microvolt = <5000000>; | ||
| 482 | regulator-max-microvolt = <5000000>; | ||
| 483 | regulator-always-on; | ||
| 484 | }; | ||
| 485 | |||
| 486 | regulator@1 { | ||
| 487 | compatible = "regulator-fixed"; | ||
| 488 | reg = <1>; | ||
| 489 | regulator-name = "vdd_1v5"; | ||
| 490 | regulator-min-microvolt = <1500000>; | ||
| 491 | regulator-max-microvolt = <1500000>; | ||
| 492 | gpio = <&pmic 0 0>; | ||
| 493 | }; | ||
| 494 | |||
| 495 | regulator@2 { | ||
| 496 | compatible = "regulator-fixed"; | ||
| 497 | reg = <2>; | ||
| 498 | regulator-name = "vdd_1v2"; | ||
| 499 | regulator-min-microvolt = <1200000>; | ||
| 500 | regulator-max-microvolt = <1200000>; | ||
| 501 | gpio = <&pmic 1 0>; | ||
| 502 | enable-active-high; | ||
| 503 | }; | ||
| 504 | |||
| 505 | regulator@3 { | ||
| 506 | compatible = "regulator-fixed"; | ||
| 507 | reg = <3>; | ||
| 508 | regulator-name = "vdd_pnl"; | ||
| 509 | regulator-min-microvolt = <2800000>; | ||
| 510 | regulator-max-microvolt = <2800000>; | ||
| 511 | gpio = <&gpio 22 0>; /* gpio PC6 */ | ||
| 512 | enable-active-high; | ||
| 513 | }; | ||
| 514 | |||
| 515 | regulator@4 { | ||
| 516 | compatible = "regulator-fixed"; | ||
| 517 | reg = <4>; | ||
| 518 | regulator-name = "vdd_bl"; | ||
| 519 | regulator-min-microvolt = <2800000>; | ||
| 520 | regulator-max-microvolt = <2800000>; | ||
| 521 | gpio = <&gpio 176 0>; /* gpio PW0 */ | ||
| 522 | enable-active-high; | ||
| 523 | }; | ||
| 524 | }; | ||
| 525 | |||
| 320 | sound { | 526 | sound { |
| 321 | compatible = "nvidia,tegra-audio-wm8903-ventana", | 527 | compatible = "nvidia,tegra-audio-wm8903-ventana", |
| 322 | "nvidia,tegra-audio-wm8903"; | 528 | "nvidia,tegra-audio-wm8903"; |
diff --git a/arch/arm/boot/dts/tegra20-whistler.dts b/arch/arm/boot/dts/tegra20-whistler.dts index 6916310bf58f..c636d002d6d8 100644 --- a/arch/arm/boot/dts/tegra20-whistler.dts +++ b/arch/arm/boot/dts/tegra20-whistler.dts | |||
| @@ -261,6 +261,286 @@ | |||
| 261 | gpio-controller; | 261 | gpio-controller; |
| 262 | #gpio-cells = <2>; | 262 | #gpio-cells = <2>; |
| 263 | }; | 263 | }; |
| 264 | |||
| 265 | max8907@3c { | ||
| 266 | compatible = "maxim,max8907"; | ||
| 267 | reg = <0x3c>; | ||
| 268 | interrupts = <0 86 0x4>; | ||
| 269 | |||
| 270 | maxim,system-power-controller; | ||
| 271 | |||
| 272 | mbatt-supply = <&usb0_vbus_reg>; | ||
| 273 | in-v1-supply = <&mbatt_reg>; | ||
| 274 | in-v2-supply = <&mbatt_reg>; | ||
| 275 | in-v3-supply = <&mbatt_reg>; | ||
| 276 | in1-supply = <&mbatt_reg>; | ||
| 277 | in2-supply = <&nvvdd_sv3_reg>; | ||
| 278 | in3-supply = <&mbatt_reg>; | ||
| 279 | in4-supply = <&mbatt_reg>; | ||
| 280 | in5-supply = <&mbatt_reg>; | ||
| 281 | in6-supply = <&mbatt_reg>; | ||
| 282 | in7-supply = <&mbatt_reg>; | ||
| 283 | in8-supply = <&mbatt_reg>; | ||
| 284 | in9-supply = <&mbatt_reg>; | ||
| 285 | in10-supply = <&mbatt_reg>; | ||
| 286 | in11-supply = <&mbatt_reg>; | ||
| 287 | in12-supply = <&mbatt_reg>; | ||
| 288 | in13-supply = <&mbatt_reg>; | ||
| 289 | in14-supply = <&mbatt_reg>; | ||
| 290 | in15-supply = <&mbatt_reg>; | ||
| 291 | in16-supply = <&mbatt_reg>; | ||
| 292 | in17-supply = <&nvvdd_sv3_reg>; | ||
| 293 | in18-supply = <&nvvdd_sv3_reg>; | ||
| 294 | in19-supply = <&mbatt_reg>; | ||
| 295 | in20-supply = <&mbatt_reg>; | ||
| 296 | |||
| 297 | regulators { | ||
| 298 | #address-cells = <1>; | ||
| 299 | #size-cells = <0>; | ||
| 300 | |||
| 301 | mbatt_reg: regulator@0 { | ||
| 302 | reg = <0>; | ||
| 303 | regulator-compatible = "mbatt"; | ||
| 304 | regulator-name = "vbat_pmu"; | ||
| 305 | regulator-always-on; | ||
| 306 | }; | ||
| 307 | |||
| 308 | regulator@1 { | ||
| 309 | reg = <1>; | ||
| 310 | regulator-compatible = "sd1"; | ||
| 311 | regulator-name = "nvvdd_sv1,vdd_cpu_pmu"; | ||
| 312 | regulator-min-microvolt = <1000000>; | ||
| 313 | regulator-max-microvolt = <1000000>; | ||
| 314 | regulator-always-on; | ||
| 315 | }; | ||
| 316 | |||
| 317 | regulator@2 { | ||
| 318 | reg = <2>; | ||
| 319 | regulator-compatible = "sd2"; | ||
| 320 | regulator-name = "nvvdd_sv2,vdd_core"; | ||
| 321 | regulator-min-microvolt = <1200000>; | ||
| 322 | regulator-max-microvolt = <1200000>; | ||
| 323 | regulator-always-on; | ||
| 324 | }; | ||
| 325 | |||
| 326 | nvvdd_sv3_reg: regulator@3 { | ||
| 327 | reg = <3>; | ||
| 328 | regulator-compatible = "sd3"; | ||
| 329 | regulator-name = "nvvdd_sv3"; | ||
| 330 | regulator-min-microvolt = <1800000>; | ||
| 331 | regulator-max-microvolt = <1800000>; | ||
| 332 | regulator-always-on; | ||
| 333 | }; | ||
| 334 | |||
| 335 | regulator@4 { | ||
| 336 | reg = <4>; | ||
| 337 | regulator-compatible = "ldo1"; | ||
| 338 | regulator-name = "nvvdd_ldo1,vddio_rx_ddr,vcore_acc"; | ||
| 339 | regulator-min-microvolt = <3300000>; | ||
| 340 | regulator-max-microvolt = <3300000>; | ||
| 341 | regulator-always-on; | ||
| 342 | }; | ||
| 343 | |||
| 344 | regulator@5 { | ||
| 345 | reg = <5>; | ||
| 346 | regulator-compatible = "ldo2"; | ||
| 347 | regulator-name = "nvvdd_ldo2,avdd_pll*"; | ||
| 348 | regulator-min-microvolt = <1100000>; | ||
| 349 | regulator-max-microvolt = <1100000>; | ||
| 350 | regulator-always-on; | ||
| 351 | }; | ||
| 352 | |||
| 353 | regulator@6 { | ||
| 354 | reg = <6>; | ||
| 355 | regulator-compatible = "ldo3"; | ||
| 356 | regulator-name = "nvvdd_ldo3,vcom_1v8b"; | ||
| 357 | regulator-min-microvolt = <1800000>; | ||
| 358 | regulator-max-microvolt = <1800000>; | ||
| 359 | regulator-always-on; | ||
| 360 | }; | ||
| 361 | |||
| 362 | regulator@7 { | ||
| 363 | reg = <7>; | ||
| 364 | regulator-compatible = "ldo4"; | ||
| 365 | regulator-name = "nvvdd_ldo4,avdd_usb*"; | ||
| 366 | regulator-min-microvolt = <3300000>; | ||
| 367 | regulator-max-microvolt = <3300000>; | ||
| 368 | regulator-always-on; | ||
| 369 | }; | ||
| 370 | |||
| 371 | regulator@8 { | ||
| 372 | reg = <8>; | ||
| 373 | regulator-compatible = "ldo5"; | ||
| 374 | regulator-name = "nvvdd_ldo5,vcore_mmc,avdd_lcd1,vddio_1wire"; | ||
| 375 | regulator-min-microvolt = <2800000>; | ||
| 376 | regulator-max-microvolt = <2800000>; | ||
| 377 | regulator-always-on; | ||
| 378 | }; | ||
| 379 | |||
| 380 | regulator@9 { | ||
| 381 | reg = <9>; | ||
| 382 | regulator-compatible = "ldo6"; | ||
| 383 | regulator-name = "nvvdd_ldo6,avdd_hdmi_pll"; | ||
| 384 | regulator-min-microvolt = <1800000>; | ||
| 385 | regulator-max-microvolt = <1800000>; | ||
| 386 | }; | ||
| 387 | |||
| 388 | regulator@10 { | ||
| 389 | reg = <10>; | ||
| 390 | regulator-compatible = "ldo7"; | ||
| 391 | regulator-name = "nvvdd_ldo7,avddio_audio"; | ||
| 392 | regulator-min-microvolt = <2800000>; | ||
| 393 | regulator-max-microvolt = <2800000>; | ||
| 394 | regulator-always-on; | ||
| 395 | }; | ||
| 396 | |||
| 397 | regulator@11 { | ||
| 398 | reg = <11>; | ||
| 399 | regulator-compatible = "ldo8"; | ||
| 400 | regulator-name = "nvvdd_ldo8,vcom_3v0,vcore_cmps"; | ||
| 401 | regulator-min-microvolt = <3000000>; | ||
| 402 | regulator-max-microvolt = <3000000>; | ||
| 403 | }; | ||
| 404 | |||
| 405 | regulator@12 { | ||
| 406 | reg = <12>; | ||
| 407 | regulator-compatible = "ldo9"; | ||
| 408 | regulator-name = "nvvdd_ldo9,avdd_cam*"; | ||
| 409 | regulator-min-microvolt = <2800000>; | ||
| 410 | regulator-max-microvolt = <2800000>; | ||
| 411 | }; | ||
| 412 | |||
| 413 | regulator@13 { | ||
| 414 | reg = <13>; | ||
| 415 | regulator-compatible = "ldo10"; | ||
| 416 | regulator-name = "nvvdd_ldo10,avdd_usb_ic_3v0"; | ||
| 417 | regulator-min-microvolt = <3000000>; | ||
| 418 | regulator-max-microvolt = <3000000>; | ||
| 419 | regulator-always-on; | ||
| 420 | }; | ||
| 421 | |||
| 422 | regulator@14 { | ||
| 423 | reg = <14>; | ||
| 424 | regulator-compatible = "ldo11"; | ||
| 425 | regulator-name = "nvvdd_ldo11,vddio_pex_clk,vcom_33,avdd_hdmi"; | ||
| 426 | regulator-min-microvolt = <3300000>; | ||
| 427 | regulator-max-microvolt = <3300000>; | ||
| 428 | }; | ||
| 429 | |||
| 430 | regulator@15 { | ||
| 431 | reg = <15>; | ||
| 432 | regulator-compatible = "ldo12"; | ||
| 433 | regulator-name = "nvvdd_ldo12,vddio_sdio"; | ||
| 434 | regulator-min-microvolt = <2800000>; | ||
| 435 | regulator-max-microvolt = <2800000>; | ||
| 436 | regulator-always-on; | ||
| 437 | }; | ||
| 438 | |||
| 439 | regulator@16 { | ||
| 440 | reg = <16>; | ||
| 441 | regulator-compatible = "ldo13"; | ||
| 442 | regulator-name = "nvvdd_ldo13,vcore_phtn,vdd_af"; | ||
| 443 | regulator-min-microvolt = <2800000>; | ||
| 444 | regulator-max-microvolt = <2800000>; | ||
| 445 | }; | ||
| 446 | |||
| 447 | regulator@17 { | ||
| 448 | reg = <17>; | ||
| 449 | regulator-compatible = "ldo14"; | ||
| 450 | regulator-name = "nvvdd_ldo14,avdd_vdac"; | ||
| 451 | regulator-min-microvolt = <2800000>; | ||
| 452 | regulator-max-microvolt = <2800000>; | ||
| 453 | }; | ||
| 454 | |||
| 455 | regulator@18 { | ||
| 456 | reg = <18>; | ||
| 457 | regulator-compatible = "ldo15"; | ||
| 458 | regulator-name = "nvvdd_ldo15,vcore_temp,vddio_hdcp"; | ||
| 459 | regulator-min-microvolt = <3300000>; | ||
| 460 | regulator-max-microvolt = <3300000>; | ||
| 461 | }; | ||
| 462 | |||
| 463 | regulator@19 { | ||
| 464 | reg = <19>; | ||
| 465 | regulator-compatible = "ldo16"; | ||
| 466 | regulator-name = "nvvdd_ldo16,vdd_dbrtr"; | ||
| 467 | regulator-min-microvolt = <1300000>; | ||
| 468 | regulator-max-microvolt = <1300000>; | ||
| 469 | }; | ||
| 470 | |||
| 471 | regulator@20 { | ||
| 472 | reg = <20>; | ||
| 473 | regulator-compatible = "ldo17"; | ||
| 474 | regulator-name = "nvvdd_ldo17,vddio_mipi"; | ||
| 475 | regulator-min-microvolt = <1200000>; | ||
| 476 | regulator-max-microvolt = <1200000>; | ||
| 477 | }; | ||
| 478 | |||
| 479 | regulator@21 { | ||
| 480 | reg = <21>; | ||
| 481 | regulator-compatible = "ldo18"; | ||
| 482 | regulator-name = "nvvdd_ldo18,vddio_vi,vcore_cam*"; | ||
| 483 | regulator-min-microvolt = <1800000>; | ||
| 484 | regulator-max-microvolt = <1800000>; | ||
| 485 | }; | ||
| 486 | |||
| 487 | regulator@22 { | ||
| 488 | reg = <22>; | ||
| 489 | regulator-compatible = "ldo19"; | ||
| 490 | regulator-name = "nvvdd_ldo19,avdd_lcd2,vddio_lx"; | ||
| 491 | regulator-min-microvolt = <2800000>; | ||
| 492 | regulator-max-microvolt = <2800000>; | ||
| 493 | }; | ||
| 494 | |||
| 495 | regulator@23 { | ||
| 496 | reg = <23>; | ||
| 497 | regulator-compatible = "ldo20"; | ||
| 498 | regulator-name = "nvvdd_ldo20,vddio_ddr_1v2,vddio_hsic,vcom_1v2"; | ||
| 499 | regulator-min-microvolt = <1200000>; | ||
| 500 | regulator-max-microvolt = <1200000>; | ||
| 501 | regulator-always-on; | ||
| 502 | }; | ||
| 503 | |||
| 504 | regulator@24 { | ||
| 505 | reg = <24>; | ||
| 506 | regulator-compatible = "out5v"; | ||
| 507 | regulator-name = "usb0_vbus_reg"; | ||
| 508 | }; | ||
| 509 | |||
| 510 | regulator@25 { | ||
| 511 | reg = <25>; | ||
| 512 | regulator-compatible = "out33v"; | ||
| 513 | regulator-name = "pmu_out3v3"; | ||
| 514 | }; | ||
| 515 | |||
| 516 | regulator@26 { | ||
| 517 | reg = <26>; | ||
| 518 | regulator-compatible = "bbat"; | ||
| 519 | regulator-name = "pmu_bbat"; | ||
| 520 | regulator-min-microvolt = <2400000>; | ||
| 521 | regulator-max-microvolt = <2400000>; | ||
| 522 | regulator-always-on; | ||
| 523 | }; | ||
| 524 | |||
| 525 | regulator@27 { | ||
| 526 | reg = <27>; | ||
| 527 | regulator-compatible = "sdby"; | ||
| 528 | regulator-name = "vdd_aon"; | ||
| 529 | regulator-always-on; | ||
| 530 | }; | ||
| 531 | |||
| 532 | regulator@28 { | ||
| 533 | reg = <28>; | ||
| 534 | regulator-compatible = "vrtc"; | ||
| 535 | regulator-name = "vrtc,pmu_vccadc"; | ||
| 536 | regulator-always-on; | ||
| 537 | }; | ||
| 538 | }; | ||
| 539 | }; | ||
| 540 | }; | ||
| 541 | |||
| 542 | pmc { | ||
| 543 | nvidia,invert-interrupt; | ||
| 264 | }; | 544 | }; |
| 265 | 545 | ||
| 266 | usb@c5000000 { | 546 | usb@c5000000 { |
| @@ -284,6 +564,21 @@ | |||
| 284 | bus-width = <8>; | 564 | bus-width = <8>; |
| 285 | }; | 565 | }; |
| 286 | 566 | ||
| 567 | regulators { | ||
| 568 | compatible = "simple-bus"; | ||
| 569 | #address-cells = <1>; | ||
| 570 | #size-cells = <0>; | ||
| 571 | |||
| 572 | usb0_vbus_reg: regulator { | ||
| 573 | compatible = "regulator-fixed"; | ||
| 574 | reg = <0>; | ||
| 575 | regulator-name = "usb0_vbus"; | ||
| 576 | regulator-min-microvolt = <5000000>; | ||
| 577 | regulator-max-microvolt = <5000000>; | ||
| 578 | regulator-always-on; | ||
| 579 | }; | ||
| 580 | }; | ||
| 581 | |||
| 287 | sound { | 582 | sound { |
| 288 | compatible = "nvidia,tegra-audio-wm8753-whistler", | 583 | compatible = "nvidia,tegra-audio-wm8753-whistler", |
| 289 | "nvidia,tegra-audio-wm8753"; | 584 | "nvidia,tegra-audio-wm8753"; |
diff --git a/arch/arm/boot/dts/tegra20.dtsi b/arch/arm/boot/dts/tegra20.dtsi index 405d1673904e..67a6cd910b96 100644 --- a/arch/arm/boot/dts/tegra20.dtsi +++ b/arch/arm/boot/dts/tegra20.dtsi | |||
| @@ -123,7 +123,7 @@ | |||
| 123 | status = "disabled"; | 123 | status = "disabled"; |
| 124 | }; | 124 | }; |
| 125 | 125 | ||
| 126 | pwm { | 126 | pwm: pwm { |
| 127 | compatible = "nvidia,tegra20-pwm"; | 127 | compatible = "nvidia,tegra20-pwm"; |
| 128 | reg = <0x7000a000 0x100>; | 128 | reg = <0x7000a000 0x100>; |
| 129 | #pwm-cells = <2>; | 129 | #pwm-cells = <2>; |
diff --git a/arch/arm/boot/dts/tegra30-cardhu-a02.dts b/arch/arm/boot/dts/tegra30-cardhu-a02.dts new file mode 100644 index 000000000000..dd4222f00eca --- /dev/null +++ b/arch/arm/boot/dts/tegra30-cardhu-a02.dts | |||
| @@ -0,0 +1,87 @@ | |||
| 1 | /dts-v1/; | ||
| 2 | |||
| 3 | /include/ "tegra30-cardhu.dtsi" | ||
| 4 | |||
| 5 | /* This dts file support the cardhu A02 version of board */ | ||
| 6 | |||
| 7 | / { | ||
| 8 | model = "NVIDIA Tegra30 Cardhu A02 evaluation board"; | ||
| 9 | compatible = "nvidia,cardhu-a02", "nvidia,cardhu", "nvidia,tegra30"; | ||
| 10 | |||
| 11 | regulators { | ||
| 12 | compatible = "simple-bus"; | ||
| 13 | #address-cells = <1>; | ||
| 14 | #size-cells = <0>; | ||
| 15 | |||
| 16 | ddr_reg: regulator@100 { | ||
| 17 | compatible = "regulator-fixed"; | ||
| 18 | reg = <100>; | ||
| 19 | regulator-name = "vdd_ddr"; | ||
| 20 | regulator-min-microvolt = <1500000>; | ||
| 21 | regulator-max-microvolt = <1500000>; | ||
| 22 | regulator-always-on; | ||
| 23 | regulator-boot-on; | ||
| 24 | enable-active-high; | ||
| 25 | gpio = <&pmic 6 0>; | ||
| 26 | }; | ||
| 27 | |||
| 28 | sys_3v3_reg: regulator@101 { | ||
| 29 | compatible = "regulator-fixed"; | ||
| 30 | reg = <101>; | ||
| 31 | regulator-name = "sys_3v3"; | ||
| 32 | regulator-min-microvolt = <3300000>; | ||
| 33 | regulator-max-microvolt = <3300000>; | ||
| 34 | regulator-always-on; | ||
| 35 | regulator-boot-on; | ||
| 36 | enable-active-high; | ||
| 37 | gpio = <&pmic 7 0>; | ||
| 38 | }; | ||
| 39 | |||
| 40 | usb1_vbus_reg: regulator@102 { | ||
| 41 | compatible = "regulator-fixed"; | ||
| 42 | reg = <102>; | ||
| 43 | regulator-name = "usb1_vbus"; | ||
| 44 | regulator-min-microvolt = <5000000>; | ||
| 45 | regulator-max-microvolt = <5000000>; | ||
| 46 | enable-active-high; | ||
| 47 | gpio = <&gpio 68 0>; /* GPIO PI4 */ | ||
| 48 | gpio-open-drain; | ||
| 49 | vin-supply = <&vdd_5v0_reg>; | ||
| 50 | }; | ||
| 51 | |||
| 52 | usb3_vbus_reg: regulator@103 { | ||
| 53 | compatible = "regulator-fixed"; | ||
| 54 | reg = <103>; | ||
| 55 | regulator-name = "usb3_vbus"; | ||
| 56 | regulator-min-microvolt = <5000000>; | ||
| 57 | regulator-max-microvolt = <5000000>; | ||
| 58 | enable-active-high; | ||
| 59 | gpio = <&gpio 63 0>; /* GPIO PH7 */ | ||
| 60 | gpio-open-drain; | ||
| 61 | vin-supply = <&vdd_5v0_reg>; | ||
| 62 | }; | ||
| 63 | |||
| 64 | vdd_5v0_reg: regulator@104 { | ||
| 65 | compatible = "regulator-fixed"; | ||
| 66 | reg = <104>; | ||
| 67 | regulator-name = "5v0"; | ||
| 68 | regulator-min-microvolt = <5000000>; | ||
| 69 | regulator-max-microvolt = <5000000>; | ||
| 70 | enable-active-high; | ||
| 71 | gpio = <&pmic 2 0>; | ||
| 72 | }; | ||
| 73 | |||
| 74 | vdd_bl_reg: regulator@105 { | ||
| 75 | compatible = "regulator-fixed"; | ||
| 76 | reg = <105>; | ||
| 77 | regulator-name = "vdd_bl"; | ||
| 78 | regulator-min-microvolt = <5000000>; | ||
| 79 | regulator-max-microvolt = <5000000>; | ||
| 80 | regulator-always-on; | ||
| 81 | regulator-boot-on; | ||
| 82 | enable-active-high; | ||
| 83 | gpio = <&gpio 83 0>; /* GPIO PK3 */ | ||
| 84 | }; | ||
| 85 | }; | ||
| 86 | }; | ||
| 87 | |||
diff --git a/arch/arm/boot/dts/tegra30-cardhu-a04.dts b/arch/arm/boot/dts/tegra30-cardhu-a04.dts new file mode 100644 index 000000000000..0828f097ca86 --- /dev/null +++ b/arch/arm/boot/dts/tegra30-cardhu-a04.dts | |||
| @@ -0,0 +1,98 @@ | |||
| 1 | /dts-v1/; | ||
| 2 | |||
| 3 | /include/ "tegra30-cardhu.dtsi" | ||
| 4 | |||
| 5 | /* This dts file support the cardhu A04 and later versions of board */ | ||
| 6 | |||
| 7 | / { | ||
| 8 | model = "NVIDIA Tegra30 Cardhu A04 (A05, A06, A07) evaluation board"; | ||
| 9 | compatible = "nvidia,cardhu-a04", "nvidia,cardhu", "nvidia,tegra30"; | ||
| 10 | |||
| 11 | regulators { | ||
| 12 | compatible = "simple-bus"; | ||
| 13 | #address-cells = <1>; | ||
| 14 | #size-cells = <0>; | ||
| 15 | |||
| 16 | ddr_reg: regulator@100 { | ||
| 17 | compatible = "regulator-fixed"; | ||
| 18 | regulator-name = "ddr"; | ||
| 19 | reg = <100>; | ||
| 20 | regulator-min-microvolt = <1500000>; | ||
| 21 | regulator-max-microvolt = <1500000>; | ||
| 22 | regulator-always-on; | ||
| 23 | regulator-boot-on; | ||
| 24 | enable-active-high; | ||
| 25 | gpio = <&pmic 7 0>; | ||
| 26 | }; | ||
| 27 | |||
| 28 | sys_3v3_reg: regulator@101 { | ||
| 29 | compatible = "regulator-fixed"; | ||
| 30 | reg = <101>; | ||
| 31 | regulator-name = "sys_3v3"; | ||
| 32 | regulator-min-microvolt = <3300000>; | ||
| 33 | regulator-max-microvolt = <3300000>; | ||
| 34 | regulator-always-on; | ||
| 35 | regulator-boot-on; | ||
| 36 | enable-active-high; | ||
| 37 | gpio = <&pmic 6 0>; | ||
| 38 | }; | ||
| 39 | |||
| 40 | usb1_vbus_reg: regulator@102 { | ||
| 41 | compatible = "regulator-fixed"; | ||
| 42 | reg = <102>; | ||
| 43 | regulator-name = "usb1_vbus"; | ||
| 44 | regulator-min-microvolt = <5000000>; | ||
| 45 | regulator-max-microvolt = <5000000>; | ||
| 46 | enable-active-high; | ||
| 47 | gpio = <&gpio 238 0>; /* GPIO PDD6 */ | ||
| 48 | gpio-open-drain; | ||
| 49 | vin-supply = <&vdd_5v0_reg>; | ||
| 50 | }; | ||
| 51 | |||
| 52 | usb3_vbus_reg: regulator@103 { | ||
| 53 | compatible = "regulator-fixed"; | ||
| 54 | reg = <103>; | ||
| 55 | regulator-name = "usb3_vbus"; | ||
| 56 | regulator-min-microvolt = <5000000>; | ||
| 57 | regulator-max-microvolt = <5000000>; | ||
| 58 | enable-active-high; | ||
| 59 | gpio = <&gpio 236 0>; /* GPIO PDD4 */ | ||
| 60 | gpio-open-drain; | ||
| 61 | vin-supply = <&vdd_5v0_reg>; | ||
| 62 | }; | ||
| 63 | |||
| 64 | vdd_5v0_reg: regulator@104 { | ||
| 65 | compatible = "regulator-fixed"; | ||
| 66 | reg = <104>; | ||
| 67 | regulator-name = "5v0"; | ||
| 68 | regulator-min-microvolt = <5000000>; | ||
| 69 | regulator-max-microvolt = <5000000>; | ||
| 70 | enable-active-high; | ||
| 71 | gpio = <&pmic 8 0>; | ||
| 72 | }; | ||
| 73 | |||
| 74 | vdd_bl_reg: regulator@105 { | ||
| 75 | compatible = "regulator-fixed"; | ||
| 76 | reg = <105>; | ||
| 77 | regulator-name = "vdd_bl"; | ||
| 78 | regulator-min-microvolt = <5000000>; | ||
| 79 | regulator-max-microvolt = <5000000>; | ||
| 80 | regulator-always-on; | ||
| 81 | regulator-boot-on; | ||
| 82 | enable-active-high; | ||
| 83 | gpio = <&gpio 234 0>; /* GPIO PDD2 */ | ||
| 84 | }; | ||
| 85 | |||
| 86 | vdd_bl2_reg: regulator@106 { | ||
| 87 | compatible = "regulator-fixed"; | ||
| 88 | reg = <106>; | ||
| 89 | regulator-name = "vdd_bl2"; | ||
| 90 | regulator-min-microvolt = <5000000>; | ||
| 91 | regulator-max-microvolt = <5000000>; | ||
| 92 | regulator-always-on; | ||
| 93 | regulator-boot-on; | ||
| 94 | enable-active-high; | ||
| 95 | gpio = <&gpio 232 0>; /* GPIO PDD0 */ | ||
| 96 | }; | ||
| 97 | }; | ||
| 98 | }; | ||
diff --git a/arch/arm/boot/dts/tegra30-cardhu.dts b/arch/arm/boot/dts/tegra30-cardhu.dts deleted file mode 100644 index c169bced131e..000000000000 --- a/arch/arm/boot/dts/tegra30-cardhu.dts +++ /dev/null | |||
| @@ -1,171 +0,0 @@ | |||
| 1 | /dts-v1/; | ||
| 2 | |||
| 3 | /include/ "tegra30.dtsi" | ||
| 4 | |||
| 5 | / { | ||
| 6 | model = "NVIDIA Tegra30 Cardhu evaluation board"; | ||
| 7 | compatible = "nvidia,cardhu", "nvidia,tegra30"; | ||
| 8 | |||
| 9 | memory { | ||
| 10 | reg = <0x80000000 0x40000000>; | ||
| 11 | }; | ||
| 12 | |||
| 13 | pinmux { | ||
| 14 | pinctrl-names = "default"; | ||
| 15 | pinctrl-0 = <&state_default>; | ||
| 16 | |||
| 17 | state_default: pinmux { | ||
| 18 | sdmmc1_clk_pz0 { | ||
| 19 | nvidia,pins = "sdmmc1_clk_pz0"; | ||
| 20 | nvidia,function = "sdmmc1"; | ||
| 21 | nvidia,pull = <0>; | ||
| 22 | nvidia,tristate = <0>; | ||
| 23 | }; | ||
| 24 | sdmmc1_cmd_pz1 { | ||
| 25 | nvidia,pins = "sdmmc1_cmd_pz1", | ||
| 26 | "sdmmc1_dat0_py7", | ||
| 27 | "sdmmc1_dat1_py6", | ||
| 28 | "sdmmc1_dat2_py5", | ||
| 29 | "sdmmc1_dat3_py4"; | ||
| 30 | nvidia,function = "sdmmc1"; | ||
| 31 | nvidia,pull = <2>; | ||
| 32 | nvidia,tristate = <0>; | ||
| 33 | }; | ||
| 34 | sdmmc4_clk_pcc4 { | ||
| 35 | nvidia,pins = "sdmmc4_clk_pcc4", | ||
| 36 | "sdmmc4_rst_n_pcc3"; | ||
| 37 | nvidia,function = "sdmmc4"; | ||
| 38 | nvidia,pull = <0>; | ||
| 39 | nvidia,tristate = <0>; | ||
| 40 | }; | ||
| 41 | sdmmc4_dat0_paa0 { | ||
| 42 | nvidia,pins = "sdmmc4_dat0_paa0", | ||
| 43 | "sdmmc4_dat1_paa1", | ||
| 44 | "sdmmc4_dat2_paa2", | ||
| 45 | "sdmmc4_dat3_paa3", | ||
| 46 | "sdmmc4_dat4_paa4", | ||
| 47 | "sdmmc4_dat5_paa5", | ||
| 48 | "sdmmc4_dat6_paa6", | ||
| 49 | "sdmmc4_dat7_paa7"; | ||
| 50 | nvidia,function = "sdmmc4"; | ||
| 51 | nvidia,pull = <2>; | ||
| 52 | nvidia,tristate = <0>; | ||
| 53 | }; | ||
| 54 | dap2_fs_pa2 { | ||
| 55 | nvidia,pins = "dap2_fs_pa2", | ||
| 56 | "dap2_sclk_pa3", | ||
| 57 | "dap2_din_pa4", | ||
| 58 | "dap2_dout_pa5"; | ||
| 59 | nvidia,function = "i2s1"; | ||
| 60 | nvidia,pull = <0>; | ||
| 61 | nvidia,tristate = <0>; | ||
| 62 | }; | ||
| 63 | }; | ||
| 64 | }; | ||
| 65 | |||
| 66 | serial@70006000 { | ||
| 67 | status = "okay"; | ||
| 68 | clock-frequency = <408000000>; | ||
| 69 | }; | ||
| 70 | |||
| 71 | i2c@7000c000 { | ||
| 72 | status = "okay"; | ||
| 73 | clock-frequency = <100000>; | ||
| 74 | }; | ||
| 75 | |||
| 76 | i2c@7000c400 { | ||
| 77 | status = "okay"; | ||
| 78 | clock-frequency = <100000>; | ||
| 79 | }; | ||
| 80 | |||
| 81 | i2c@7000c500 { | ||
| 82 | status = "okay"; | ||
| 83 | clock-frequency = <100000>; | ||
| 84 | |||
| 85 | /* ALS and Proximity sensor */ | ||
| 86 | isl29028@44 { | ||
| 87 | compatible = "isil,isl29028"; | ||
| 88 | reg = <0x44>; | ||
| 89 | interrupt-parent = <&gpio>; | ||
| 90 | interrupts = <88 0x04>; /*gpio PL0 */ | ||
| 91 | }; | ||
| 92 | }; | ||
| 93 | |||
| 94 | i2c@7000c700 { | ||
| 95 | status = "okay"; | ||
| 96 | clock-frequency = <100000>; | ||
| 97 | }; | ||
| 98 | |||
| 99 | i2c@7000d000 { | ||
| 100 | status = "okay"; | ||
| 101 | clock-frequency = <100000>; | ||
| 102 | |||
| 103 | wm8903: wm8903@1a { | ||
| 104 | compatible = "wlf,wm8903"; | ||
| 105 | reg = <0x1a>; | ||
| 106 | interrupt-parent = <&gpio>; | ||
| 107 | interrupts = <179 0x04>; /* gpio PW3 */ | ||
| 108 | |||
| 109 | gpio-controller; | ||
| 110 | #gpio-cells = <2>; | ||
| 111 | |||
| 112 | micdet-cfg = <0>; | ||
| 113 | micdet-delay = <100>; | ||
| 114 | gpio-cfg = <0xffffffff 0xffffffff 0 0xffffffff 0xffffffff>; | ||
| 115 | }; | ||
| 116 | |||
| 117 | tps62361 { | ||
| 118 | compatible = "ti,tps62361"; | ||
| 119 | reg = <0x60>; | ||
| 120 | |||
| 121 | regulator-name = "tps62361-vout"; | ||
| 122 | regulator-min-microvolt = <500000>; | ||
| 123 | regulator-max-microvolt = <1500000>; | ||
| 124 | regulator-boot-on; | ||
| 125 | regulator-always-on; | ||
| 126 | ti,vsel0-state-high; | ||
| 127 | ti,vsel1-state-high; | ||
| 128 | }; | ||
| 129 | }; | ||
| 130 | |||
| 131 | ahub { | ||
| 132 | i2s@70080400 { | ||
| 133 | status = "okay"; | ||
| 134 | }; | ||
| 135 | }; | ||
| 136 | |||
| 137 | sdhci@78000000 { | ||
| 138 | status = "okay"; | ||
| 139 | cd-gpios = <&gpio 69 0>; /* gpio PI5 */ | ||
| 140 | wp-gpios = <&gpio 155 0>; /* gpio PT3 */ | ||
| 141 | power-gpios = <&gpio 31 0>; /* gpio PD7 */ | ||
| 142 | bus-width = <4>; | ||
| 143 | }; | ||
| 144 | |||
| 145 | sdhci@78000600 { | ||
| 146 | status = "okay"; | ||
| 147 | bus-width = <8>; | ||
| 148 | }; | ||
| 149 | |||
| 150 | sound { | ||
| 151 | compatible = "nvidia,tegra-audio-wm8903-cardhu", | ||
| 152 | "nvidia,tegra-audio-wm8903"; | ||
| 153 | nvidia,model = "NVIDIA Tegra Cardhu"; | ||
| 154 | |||
| 155 | nvidia,audio-routing = | ||
| 156 | "Headphone Jack", "HPOUTR", | ||
| 157 | "Headphone Jack", "HPOUTL", | ||
| 158 | "Int Spk", "ROP", | ||
| 159 | "Int Spk", "RON", | ||
| 160 | "Int Spk", "LOP", | ||
| 161 | "Int Spk", "LON", | ||
| 162 | "Mic Jack", "MICBIAS", | ||
| 163 | "IN1L", "Mic Jack"; | ||
| 164 | |||
| 165 | nvidia,i2s-controller = <&tegra_i2s1>; | ||
| 166 | nvidia,audio-codec = <&wm8903>; | ||
| 167 | |||
| 168 | nvidia,spkr-en-gpios = <&wm8903 2 0>; | ||
| 169 | nvidia,hp-det-gpios = <&gpio 178 0>; /* gpio PW2 */ | ||
| 170 | }; | ||
| 171 | }; | ||
diff --git a/arch/arm/boot/dts/tegra30-cardhu.dtsi b/arch/arm/boot/dts/tegra30-cardhu.dtsi new file mode 100644 index 000000000000..d10c9c5a3606 --- /dev/null +++ b/arch/arm/boot/dts/tegra30-cardhu.dtsi | |||
| @@ -0,0 +1,475 @@ | |||
| 1 | /include/ "tegra30.dtsi" | ||
| 2 | |||
| 3 | /** | ||
| 4 | * This file contains common DT entry for all fab version of Cardhu. | ||
| 5 | * There is multiple fab version of Cardhu starting from A01 to A07. | ||
| 6 | * Cardhu fab version A01 and A03 are not supported. Cardhu fab version | ||
| 7 | * A02 will have different sets of GPIOs for fixed regulator compare to | ||
| 8 | * Cardhu fab version A04. The Cardhu fab version A05, A06, A07 are | ||
| 9 | * compatible with fab version A04. Based on Cardhu fab version, the | ||
| 10 | * related dts file need to be chosen like for Cardhu fab version A02, | ||
| 11 | * use tegra30-cardhu-a02.dts, Cardhu fab version A04 and later, use | ||
| 12 | * tegra30-cardhu-a04.dts. | ||
| 13 | * The identification of board is done in two ways, by looking the sticker | ||
| 14 | * on PCB and by reading board id eeprom. | ||
| 15 | * The stciker will have number like 600-81291-1000-002 C.3. In this 4th | ||
| 16 | * number is the fab version like here it is 002 and hence fab version A02. | ||
| 17 | * The (downstream internal) U-Boot of Cardhu display the board-id as | ||
| 18 | * follows: | ||
| 19 | * BoardID: 0C5B, SKU: 0A01, Fab: 02, Rev: 45.00 | ||
| 20 | * In this Fab version is 02 i.e. A02. | ||
| 21 | * The BoardID I2C eeprom is interfaced through i2c5 (pwr_i2c address 0x56). | ||
| 22 | * The location 0x8 of this eeprom contains the Fab version. It is 1 byte | ||
| 23 | * wide. | ||
| 24 | */ | ||
| 25 | |||
| 26 | / { | ||
| 27 | model = "NVIDIA Tegra30 Cardhu evaluation board"; | ||
| 28 | compatible = "nvidia,cardhu", "nvidia,tegra30"; | ||
| 29 | |||
| 30 | memory { | ||
| 31 | reg = <0x80000000 0x40000000>; | ||
| 32 | }; | ||
| 33 | |||
| 34 | pinmux { | ||
| 35 | pinctrl-names = "default"; | ||
| 36 | pinctrl-0 = <&state_default>; | ||
| 37 | |||
| 38 | state_default: pinmux { | ||
| 39 | sdmmc1_clk_pz0 { | ||
| 40 | nvidia,pins = "sdmmc1_clk_pz0"; | ||
| 41 | nvidia,function = "sdmmc1"; | ||
| 42 | nvidia,pull = <0>; | ||
| 43 | nvidia,tristate = <0>; | ||
| 44 | }; | ||
| 45 | sdmmc1_cmd_pz1 { | ||
| 46 | nvidia,pins = "sdmmc1_cmd_pz1", | ||
| 47 | "sdmmc1_dat0_py7", | ||
| 48 | "sdmmc1_dat1_py6", | ||
| 49 | "sdmmc1_dat2_py5", | ||
| 50 | "sdmmc1_dat3_py4"; | ||
| 51 | nvidia,function = "sdmmc1"; | ||
| 52 | nvidia,pull = <2>; | ||
| 53 | nvidia,tristate = <0>; | ||
| 54 | }; | ||
| 55 | sdmmc4_clk_pcc4 { | ||
| 56 | nvidia,pins = "sdmmc4_clk_pcc4", | ||
| 57 | "sdmmc4_rst_n_pcc3"; | ||
| 58 | nvidia,function = "sdmmc4"; | ||
| 59 | nvidia,pull = <0>; | ||
| 60 | nvidia,tristate = <0>; | ||
| 61 | }; | ||
| 62 | sdmmc4_dat0_paa0 { | ||
| 63 | nvidia,pins = "sdmmc4_dat0_paa0", | ||
| 64 | "sdmmc4_dat1_paa1", | ||
| 65 | "sdmmc4_dat2_paa2", | ||
| 66 | "sdmmc4_dat3_paa3", | ||
| 67 | "sdmmc4_dat4_paa4", | ||
| 68 | "sdmmc4_dat5_paa5", | ||
| 69 | "sdmmc4_dat6_paa6", | ||
| 70 | "sdmmc4_dat7_paa7"; | ||
| 71 | nvidia,function = "sdmmc4"; | ||
| 72 | nvidia,pull = <2>; | ||
| 73 | nvidia,tristate = <0>; | ||
| 74 | }; | ||
| 75 | dap2_fs_pa2 { | ||
| 76 | nvidia,pins = "dap2_fs_pa2", | ||
| 77 | "dap2_sclk_pa3", | ||
| 78 | "dap2_din_pa4", | ||
| 79 | "dap2_dout_pa5"; | ||
| 80 | nvidia,function = "i2s1"; | ||
| 81 | nvidia,pull = <0>; | ||
| 82 | nvidia,tristate = <0>; | ||
| 83 | }; | ||
| 84 | }; | ||
| 85 | }; | ||
| 86 | |||
| 87 | serial@70006000 { | ||
| 88 | status = "okay"; | ||
| 89 | clock-frequency = <408000000>; | ||
| 90 | }; | ||
| 91 | |||
| 92 | i2c@7000c000 { | ||
| 93 | status = "okay"; | ||
| 94 | clock-frequency = <100000>; | ||
| 95 | }; | ||
| 96 | |||
| 97 | i2c@7000c400 { | ||
| 98 | status = "okay"; | ||
| 99 | clock-frequency = <100000>; | ||
| 100 | }; | ||
| 101 | |||
| 102 | i2c@7000c500 { | ||
| 103 | status = "okay"; | ||
| 104 | clock-frequency = <100000>; | ||
| 105 | |||
| 106 | /* ALS and Proximity sensor */ | ||
| 107 | isl29028@44 { | ||
| 108 | compatible = "isil,isl29028"; | ||
| 109 | reg = <0x44>; | ||
| 110 | interrupt-parent = <&gpio>; | ||
| 111 | interrupts = <88 0x04>; /*gpio PL0 */ | ||
| 112 | }; | ||
| 113 | }; | ||
| 114 | |||
| 115 | i2c@7000c700 { | ||
| 116 | status = "okay"; | ||
| 117 | clock-frequency = <100000>; | ||
| 118 | }; | ||
| 119 | |||
| 120 | i2c@7000d000 { | ||
| 121 | status = "okay"; | ||
| 122 | clock-frequency = <100000>; | ||
| 123 | |||
| 124 | wm8903: wm8903@1a { | ||
| 125 | compatible = "wlf,wm8903"; | ||
| 126 | reg = <0x1a>; | ||
| 127 | interrupt-parent = <&gpio>; | ||
| 128 | interrupts = <179 0x04>; /* gpio PW3 */ | ||
| 129 | |||
| 130 | gpio-controller; | ||
| 131 | #gpio-cells = <2>; | ||
| 132 | |||
| 133 | micdet-cfg = <0>; | ||
| 134 | micdet-delay = <100>; | ||
| 135 | gpio-cfg = <0xffffffff 0xffffffff 0 0xffffffff 0xffffffff>; | ||
| 136 | }; | ||
| 137 | |||
| 138 | tps62361 { | ||
| 139 | compatible = "ti,tps62361"; | ||
| 140 | reg = <0x60>; | ||
| 141 | |||
| 142 | regulator-name = "tps62361-vout"; | ||
| 143 | regulator-min-microvolt = <500000>; | ||
| 144 | regulator-max-microvolt = <1500000>; | ||
| 145 | regulator-boot-on; | ||
| 146 | regulator-always-on; | ||
| 147 | ti,vsel0-state-high; | ||
| 148 | ti,vsel1-state-high; | ||
| 149 | }; | ||
| 150 | |||
| 151 | pmic: tps65911@2d { | ||
| 152 | compatible = "ti,tps65911"; | ||
| 153 | reg = <0x2d>; | ||
| 154 | |||
| 155 | interrupts = <0 86 0x4>; | ||
| 156 | #interrupt-cells = <2>; | ||
| 157 | interrupt-controller; | ||
| 158 | |||
| 159 | ti,system-power-controller; | ||
| 160 | |||
| 161 | #gpio-cells = <2>; | ||
| 162 | gpio-controller; | ||
| 163 | |||
| 164 | vcc1-supply = <&vdd_ac_bat_reg>; | ||
| 165 | vcc2-supply = <&vdd_ac_bat_reg>; | ||
| 166 | vcc3-supply = <&vio_reg>; | ||
| 167 | vcc4-supply = <&vdd_5v0_reg>; | ||
| 168 | vcc5-supply = <&vdd_ac_bat_reg>; | ||
| 169 | vcc6-supply = <&vdd2_reg>; | ||
| 170 | vcc7-supply = <&vdd_ac_bat_reg>; | ||
| 171 | vccio-supply = <&vdd_ac_bat_reg>; | ||
| 172 | |||
| 173 | regulators { | ||
| 174 | #address-cells = <1>; | ||
| 175 | #size-cells = <0>; | ||
| 176 | |||
| 177 | vdd1_reg: regulator@0 { | ||
| 178 | reg = <0>; | ||
| 179 | regulator-compatible = "vdd1"; | ||
| 180 | regulator-name = "vddio_ddr_1v2"; | ||
| 181 | regulator-min-microvolt = <1200000>; | ||
| 182 | regulator-max-microvolt = <1200000>; | ||
| 183 | regulator-always-on; | ||
| 184 | }; | ||
| 185 | |||
| 186 | vdd2_reg: regulator@1 { | ||
| 187 | reg = <1>; | ||
| 188 | regulator-compatible = "vdd2"; | ||
| 189 | regulator-name = "vdd_1v5_gen"; | ||
| 190 | regulator-min-microvolt = <1500000>; | ||
| 191 | regulator-max-microvolt = <1500000>; | ||
| 192 | regulator-always-on; | ||
| 193 | }; | ||
| 194 | |||
| 195 | vddctrl_reg: regulator@2 { | ||
| 196 | reg = <2>; | ||
| 197 | regulator-compatible = "vddctrl"; | ||
| 198 | regulator-name = "vdd_cpu,vdd_sys"; | ||
| 199 | regulator-min-microvolt = <1000000>; | ||
| 200 | regulator-max-microvolt = <1000000>; | ||
| 201 | regulator-always-on; | ||
| 202 | }; | ||
| 203 | |||
| 204 | vio_reg: regulator@3 { | ||
| 205 | reg = <3>; | ||
| 206 | regulator-compatible = "vio"; | ||
| 207 | regulator-name = "vdd_1v8_gen"; | ||
| 208 | regulator-min-microvolt = <1800000>; | ||
| 209 | regulator-max-microvolt = <1800000>; | ||
| 210 | regulator-always-on; | ||
| 211 | }; | ||
| 212 | |||
| 213 | ldo1_reg: regulator@4 { | ||
| 214 | reg = <4>; | ||
| 215 | regulator-compatible = "ldo1"; | ||
| 216 | regulator-name = "vdd_pexa,vdd_pexb"; | ||
| 217 | regulator-min-microvolt = <1050000>; | ||
| 218 | regulator-max-microvolt = <1050000>; | ||
| 219 | }; | ||
| 220 | |||
| 221 | ldo2_reg: regulator@5 { | ||
| 222 | reg = <5>; | ||
| 223 | regulator-compatible = "ldo2"; | ||
| 224 | regulator-name = "vdd_sata,avdd_plle"; | ||
| 225 | regulator-min-microvolt = <1050000>; | ||
| 226 | regulator-max-microvolt = <1050000>; | ||
| 227 | }; | ||
| 228 | |||
| 229 | /* LDO3 is not connected to anything */ | ||
| 230 | |||
| 231 | ldo4_reg: regulator@7 { | ||
| 232 | reg = <7>; | ||
| 233 | regulator-compatible = "ldo4"; | ||
| 234 | regulator-name = "vdd_rtc"; | ||
| 235 | regulator-min-microvolt = <1200000>; | ||
| 236 | regulator-max-microvolt = <1200000>; | ||
| 237 | regulator-always-on; | ||
| 238 | }; | ||
| 239 | |||
| 240 | ldo5_reg: regulator@8 { | ||
| 241 | reg = <8>; | ||
| 242 | regulator-compatible = "ldo5"; | ||
| 243 | regulator-name = "vddio_sdmmc,avdd_vdac"; | ||
| 244 | regulator-min-microvolt = <3300000>; | ||
| 245 | regulator-max-microvolt = <3300000>; | ||
| 246 | regulator-always-on; | ||
| 247 | }; | ||
| 248 | |||
| 249 | ldo6_reg: regulator@9 { | ||
| 250 | reg = <9>; | ||
| 251 | regulator-compatible = "ldo6"; | ||
| 252 | regulator-name = "avdd_dsi_csi,pwrdet_mipi"; | ||
| 253 | regulator-min-microvolt = <1200000>; | ||
| 254 | regulator-max-microvolt = <1200000>; | ||
| 255 | }; | ||
| 256 | |||
| 257 | ldo7_reg: regulator@10 { | ||
| 258 | reg = <10>; | ||
| 259 | regulator-compatible = "ldo7"; | ||
| 260 | regulator-name = "vdd_pllm,x,u,a_p_c_s"; | ||
| 261 | regulator-min-microvolt = <1200000>; | ||
| 262 | regulator-max-microvolt = <1200000>; | ||
| 263 | regulator-always-on; | ||
| 264 | }; | ||
| 265 | |||
| 266 | ldo8_reg: regulator@11 { | ||
| 267 | reg = <11>; | ||
| 268 | regulator-compatible = "ldo8"; | ||
| 269 | regulator-name = "vdd_ddr_hs"; | ||
| 270 | regulator-min-microvolt = <1000000>; | ||
| 271 | regulator-max-microvolt = <1000000>; | ||
| 272 | regulator-always-on; | ||
| 273 | }; | ||
| 274 | }; | ||
| 275 | }; | ||
| 276 | }; | ||
| 277 | |||
| 278 | ahub { | ||
| 279 | i2s@70080400 { | ||
| 280 | status = "okay"; | ||
| 281 | }; | ||
| 282 | }; | ||
| 283 | |||
| 284 | pmc { | ||
| 285 | status = "okay"; | ||
| 286 | nvidia,invert-interrupt; | ||
| 287 | }; | ||
| 288 | |||
| 289 | sdhci@78000000 { | ||
| 290 | status = "okay"; | ||
| 291 | cd-gpios = <&gpio 69 0>; /* gpio PI5 */ | ||
| 292 | wp-gpios = <&gpio 155 0>; /* gpio PT3 */ | ||
| 293 | power-gpios = <&gpio 31 0>; /* gpio PD7 */ | ||
| 294 | bus-width = <4>; | ||
| 295 | }; | ||
| 296 | |||
| 297 | sdhci@78000600 { | ||
| 298 | status = "okay"; | ||
| 299 | bus-width = <8>; | ||
| 300 | }; | ||
| 301 | |||
| 302 | regulators { | ||
| 303 | compatible = "simple-bus"; | ||
| 304 | #address-cells = <1>; | ||
| 305 | #size-cells = <0>; | ||
| 306 | |||
| 307 | vdd_ac_bat_reg: regulator@0 { | ||
| 308 | compatible = "regulator-fixed"; | ||
| 309 | reg = <0>; | ||
| 310 | regulator-name = "vdd_ac_bat"; | ||
| 311 | regulator-min-microvolt = <5000000>; | ||
| 312 | regulator-max-microvolt = <5000000>; | ||
| 313 | regulator-always-on; | ||
| 314 | }; | ||
| 315 | |||
| 316 | cam_1v8_reg: regulator@1 { | ||
| 317 | compatible = "regulator-fixed"; | ||
| 318 | reg = <1>; | ||
| 319 | regulator-name = "cam_1v8"; | ||
| 320 | regulator-min-microvolt = <1800000>; | ||
| 321 | regulator-max-microvolt = <1800000>; | ||
| 322 | enable-active-high; | ||
| 323 | gpio = <&gpio 220 0>; /* gpio PBB4 */ | ||
| 324 | vin-supply = <&vio_reg>; | ||
| 325 | }; | ||
| 326 | |||
| 327 | cp_5v_reg: regulator@2 { | ||
| 328 | compatible = "regulator-fixed"; | ||
| 329 | reg = <2>; | ||
| 330 | regulator-name = "cp_5v"; | ||
| 331 | regulator-min-microvolt = <5000000>; | ||
| 332 | regulator-max-microvolt = <5000000>; | ||
| 333 | regulator-boot-on; | ||
| 334 | regulator-always-on; | ||
| 335 | enable-active-high; | ||
| 336 | gpio = <&pmic 0 0>; /* PMIC TPS65911 GPIO0 */ | ||
| 337 | }; | ||
| 338 | |||
| 339 | emmc_3v3_reg: regulator@3 { | ||
| 340 | compatible = "regulator-fixed"; | ||
| 341 | reg = <3>; | ||
| 342 | regulator-name = "emmc_3v3"; | ||
| 343 | regulator-min-microvolt = <3300000>; | ||
| 344 | regulator-max-microvolt = <3300000>; | ||
| 345 | regulator-always-on; | ||
| 346 | regulator-boot-on; | ||
| 347 | enable-active-high; | ||
| 348 | gpio = <&gpio 25 0>; /* gpio PD1 */ | ||
| 349 | vin-supply = <&sys_3v3_reg>; | ||
| 350 | }; | ||
| 351 | |||
| 352 | modem_3v3_reg: regulator@4 { | ||
| 353 | compatible = "regulator-fixed"; | ||
| 354 | reg = <4>; | ||
| 355 | regulator-name = "modem_3v3"; | ||
| 356 | regulator-min-microvolt = <3300000>; | ||
| 357 | regulator-max-microvolt = <3300000>; | ||
| 358 | enable-active-high; | ||
| 359 | gpio = <&gpio 30 0>; /* gpio PD6 */ | ||
| 360 | }; | ||
| 361 | |||
| 362 | pex_hvdd_3v3_reg: regulator@5 { | ||
| 363 | compatible = "regulator-fixed"; | ||
| 364 | reg = <5>; | ||
| 365 | regulator-name = "pex_hvdd_3v3"; | ||
| 366 | regulator-min-microvolt = <3300000>; | ||
| 367 | regulator-max-microvolt = <3300000>; | ||
| 368 | enable-active-high; | ||
| 369 | gpio = <&gpio 95 0>; /* gpio PL7 */ | ||
| 370 | vin-supply = <&sys_3v3_reg>; | ||
| 371 | }; | ||
| 372 | |||
| 373 | vdd_cam1_ldo_reg: regulator@6 { | ||
| 374 | compatible = "regulator-fixed"; | ||
| 375 | reg = <6>; | ||
| 376 | regulator-name = "vdd_cam1_ldo"; | ||
| 377 | regulator-min-microvolt = <2800000>; | ||
| 378 | regulator-max-microvolt = <2800000>; | ||
| 379 | enable-active-high; | ||
| 380 | gpio = <&gpio 142 0>; /* gpio PR6 */ | ||
| 381 | vin-supply = <&sys_3v3_reg>; | ||
| 382 | }; | ||
| 383 | |||
| 384 | vdd_cam2_ldo_reg: regulator@7 { | ||
| 385 | compatible = "regulator-fixed"; | ||
| 386 | reg = <7>; | ||
| 387 | regulator-name = "vdd_cam2_ldo"; | ||
| 388 | regulator-min-microvolt = <2800000>; | ||
| 389 | regulator-max-microvolt = <2800000>; | ||
| 390 | enable-active-high; | ||
| 391 | gpio = <&gpio 143 0>; /* gpio PR7 */ | ||
| 392 | vin-supply = <&sys_3v3_reg>; | ||
| 393 | }; | ||
| 394 | |||
| 395 | vdd_cam3_ldo_reg: regulator@8 { | ||
| 396 | compatible = "regulator-fixed"; | ||
| 397 | reg = <8>; | ||
| 398 | regulator-name = "vdd_cam3_ldo"; | ||
| 399 | regulator-min-microvolt = <3300000>; | ||
| 400 | regulator-max-microvolt = <3300000>; | ||
| 401 | enable-active-high; | ||
| 402 | gpio = <&gpio 144 0>; /* gpio PS0 */ | ||
| 403 | vin-supply = <&sys_3v3_reg>; | ||
| 404 | }; | ||
| 405 | |||
| 406 | vdd_com_reg: regulator@9 { | ||
| 407 | compatible = "regulator-fixed"; | ||
| 408 | reg = <9>; | ||
| 409 | regulator-name = "vdd_com"; | ||
| 410 | regulator-min-microvolt = <3300000>; | ||
| 411 | regulator-max-microvolt = <3300000>; | ||
| 412 | enable-active-high; | ||
| 413 | gpio = <&gpio 24 0>; /* gpio PD0 */ | ||
| 414 | vin-supply = <&sys_3v3_reg>; | ||
| 415 | }; | ||
| 416 | |||
| 417 | vdd_fuse_3v3_reg: regulator@10 { | ||
| 418 | compatible = "regulator-fixed"; | ||
| 419 | reg = <10>; | ||
| 420 | regulator-name = "vdd_fuse_3v3"; | ||
| 421 | regulator-min-microvolt = <3300000>; | ||
| 422 | regulator-max-microvolt = <3300000>; | ||
| 423 | enable-active-high; | ||
| 424 | gpio = <&gpio 94 0>; /* gpio PL6 */ | ||
| 425 | vin-supply = <&sys_3v3_reg>; | ||
| 426 | }; | ||
| 427 | |||
| 428 | vdd_pnl1_reg: regulator@11 { | ||
| 429 | compatible = "regulator-fixed"; | ||
| 430 | reg = <11>; | ||
| 431 | regulator-name = "vdd_pnl1"; | ||
| 432 | regulator-min-microvolt = <3300000>; | ||
| 433 | regulator-max-microvolt = <3300000>; | ||
| 434 | regulator-always-on; | ||
| 435 | regulator-boot-on; | ||
| 436 | enable-active-high; | ||
| 437 | gpio = <&gpio 92 0>; /* gpio PL4 */ | ||
| 438 | vin-supply = <&sys_3v3_reg>; | ||
| 439 | }; | ||
| 440 | |||
| 441 | vdd_vid_reg: regulator@12 { | ||
| 442 | compatible = "regulator-fixed"; | ||
| 443 | reg = <12>; | ||
| 444 | regulator-name = "vddio_vid"; | ||
| 445 | regulator-min-microvolt = <5000000>; | ||
| 446 | regulator-max-microvolt = <5000000>; | ||
| 447 | enable-active-high; | ||
| 448 | gpio = <&gpio 152 0>; /* GPIO PT0 */ | ||
| 449 | gpio-open-drain; | ||
| 450 | vin-supply = <&vdd_5v0_reg>; | ||
| 451 | }; | ||
| 452 | }; | ||
| 453 | |||
| 454 | sound { | ||
| 455 | compatible = "nvidia,tegra-audio-wm8903-cardhu", | ||
| 456 | "nvidia,tegra-audio-wm8903"; | ||
| 457 | nvidia,model = "NVIDIA Tegra Cardhu"; | ||
| 458 | |||
| 459 | nvidia,audio-routing = | ||
| 460 | "Headphone Jack", "HPOUTR", | ||
| 461 | "Headphone Jack", "HPOUTL", | ||
| 462 | "Int Spk", "ROP", | ||
| 463 | "Int Spk", "RON", | ||
| 464 | "Int Spk", "LOP", | ||
| 465 | "Int Spk", "LON", | ||
| 466 | "Mic Jack", "MICBIAS", | ||
| 467 | "IN1L", "Mic Jack"; | ||
| 468 | |||
| 469 | nvidia,i2s-controller = <&tegra_i2s1>; | ||
| 470 | nvidia,audio-codec = <&wm8903>; | ||
| 471 | |||
| 472 | nvidia,spkr-en-gpios = <&wm8903 2 0>; | ||
| 473 | nvidia,hp-det-gpios = <&gpio 178 0>; /* gpio PW2 */ | ||
| 474 | }; | ||
| 475 | }; | ||
diff --git a/arch/arm/boot/dts/tegra30.dtsi b/arch/arm/boot/dts/tegra30.dtsi index 3e4334d14efb..b1497c7d7d68 100644 --- a/arch/arm/boot/dts/tegra30.dtsi +++ b/arch/arm/boot/dts/tegra30.dtsi | |||
| @@ -117,7 +117,7 @@ | |||
| 117 | status = "disabled"; | 117 | status = "disabled"; |
| 118 | }; | 118 | }; |
| 119 | 119 | ||
| 120 | pwm { | 120 | pwm: pwm { |
| 121 | compatible = "nvidia,tegra30-pwm", "nvidia,tegra20-pwm"; | 121 | compatible = "nvidia,tegra30-pwm", "nvidia,tegra20-pwm"; |
| 122 | reg = <0x7000a000 0x100>; | 122 | reg = <0x7000a000 0x100>; |
| 123 | #pwm-cells = <2>; | 123 | #pwm-cells = <2>; |
diff --git a/arch/arm/boot/dts/vt8500-bv07.dts b/arch/arm/boot/dts/vt8500-bv07.dts new file mode 100644 index 000000000000..567cf4e8ab84 --- /dev/null +++ b/arch/arm/boot/dts/vt8500-bv07.dts | |||
| @@ -0,0 +1,36 @@ | |||
| 1 | /* | ||
| 2 | * vt8500-bv07.dts - Device tree file for Benign BV07 Netbook | ||
| 3 | * | ||
| 4 | * Copyright (C) 2012 Tony Prisk <linux@prisktech.co.nz> | ||
| 5 | * | ||
| 6 | * Licensed under GPLv2 or later | ||
| 7 | */ | ||
| 8 | |||
| 9 | /dts-v1/; | ||
| 10 | /include/ "vt8500.dtsi" | ||
| 11 | |||
| 12 | / { | ||
| 13 | model = "Benign BV07 Netbook"; | ||
| 14 | |||
| 15 | /* | ||
| 16 | * Display node is based on Sascha Hauer's patch on dri-devel. | ||
| 17 | * Added a bpp property to calculate the size of the framebuffer | ||
| 18 | * until the binding is formalized. | ||
| 19 | */ | ||
| 20 | display: display@0 { | ||
| 21 | modes { | ||
| 22 | mode0: mode@0 { | ||
| 23 | hactive = <800>; | ||
| 24 | vactive = <480>; | ||
| 25 | hback-porch = <88>; | ||
| 26 | hfront-porch = <40>; | ||
| 27 | hsync-len = <0>; | ||
| 28 | vback-porch = <32>; | ||
| 29 | vfront-porch = <11>; | ||
| 30 | vsync-len = <1>; | ||
| 31 | clock = <0>; /* unused but required */ | ||
| 32 | bpp = <16>; /* non-standard but required */ | ||
| 33 | }; | ||
| 34 | }; | ||
| 35 | }; | ||
| 36 | }; | ||
diff --git a/arch/arm/boot/dts/vt8500.dtsi b/arch/arm/boot/dts/vt8500.dtsi new file mode 100644 index 000000000000..d8645e990b21 --- /dev/null +++ b/arch/arm/boot/dts/vt8500.dtsi | |||
| @@ -0,0 +1,116 @@ | |||
| 1 | /* | ||
| 2 | * vt8500.dtsi - Device tree file for VIA VT8500 SoC | ||
| 3 | * | ||
| 4 | * Copyright (C) 2012 Tony Prisk <linux@prisktech.co.nz> | ||
| 5 | * | ||
| 6 | * Licensed under GPLv2 or later | ||
| 7 | */ | ||
| 8 | |||
| 9 | /include/ "skeleton.dtsi" | ||
| 10 | |||
| 11 | / { | ||
| 12 | compatible = "via,vt8500"; | ||
| 13 | |||
| 14 | soc { | ||
| 15 | #address-cells = <1>; | ||
| 16 | #size-cells = <1>; | ||
| 17 | compatible = "simple-bus"; | ||
| 18 | ranges; | ||
| 19 | interrupt-parent = <&intc>; | ||
| 20 | |||
| 21 | intc: interrupt-controller@d8140000 { | ||
| 22 | compatible = "via,vt8500-intc"; | ||
| 23 | interrupt-controller; | ||
| 24 | reg = <0xd8140000 0x10000>; | ||
| 25 | #interrupt-cells = <1>; | ||
| 26 | }; | ||
| 27 | |||
| 28 | gpio: gpio-controller@d8110000 { | ||
| 29 | compatible = "via,vt8500-gpio"; | ||
| 30 | gpio-controller; | ||
| 31 | reg = <0xd8110000 0x10000>; | ||
| 32 | #gpio-cells = <3>; | ||
| 33 | }; | ||
| 34 | |||
| 35 | pmc@d8130000 { | ||
| 36 | compatible = "via,vt8500-pmc"; | ||
| 37 | reg = <0xd8130000 0x1000>; | ||
| 38 | |||
| 39 | clocks { | ||
| 40 | #address-cells = <1>; | ||
| 41 | #size-cells = <0>; | ||
| 42 | |||
| 43 | ref24: ref24M { | ||
| 44 | #clock-cells = <0>; | ||
| 45 | compatible = "fixed-clock"; | ||
| 46 | clock-frequency = <24000000>; | ||
| 47 | }; | ||
| 48 | }; | ||
| 49 | }; | ||
| 50 | |||
| 51 | timer@d8130100 { | ||
| 52 | compatible = "via,vt8500-timer"; | ||
| 53 | reg = <0xd8130100 0x28>; | ||
| 54 | interrupts = <36>; | ||
| 55 | }; | ||
| 56 | |||
| 57 | ehci@d8007900 { | ||
| 58 | compatible = "via,vt8500-ehci"; | ||
| 59 | reg = <0xd8007900 0x200>; | ||
| 60 | interrupts = <43>; | ||
| 61 | }; | ||
| 62 | |||
| 63 | uhci@d8007b00 { | ||
| 64 | compatible = "platform-uhci"; | ||
| 65 | reg = <0xd8007b00 0x200>; | ||
| 66 | interrupts = <43>; | ||
| 67 | }; | ||
| 68 | |||
| 69 | fb@d800e400 { | ||
| 70 | compatible = "via,vt8500-fb"; | ||
| 71 | reg = <0xd800e400 0x400>; | ||
| 72 | interrupts = <12>; | ||
| 73 | display = <&display>; | ||
| 74 | default-mode = <&mode0>; | ||
| 75 | }; | ||
| 76 | |||
| 77 | ge_rops@d8050400 { | ||
| 78 | compatible = "wm,prizm-ge-rops"; | ||
| 79 | reg = <0xd8050400 0x100>; | ||
| 80 | }; | ||
| 81 | |||
| 82 | uart@d8200000 { | ||
| 83 | compatible = "via,vt8500-uart"; | ||
| 84 | reg = <0xd8200000 0x1040>; | ||
| 85 | interrupts = <32>; | ||
| 86 | clocks = <&ref24>; | ||
| 87 | }; | ||
| 88 | |||
| 89 | uart@d82b0000 { | ||
| 90 | compatible = "via,vt8500-uart"; | ||
| 91 | reg = <0xd82b0000 0x1040>; | ||
| 92 | interrupts = <33>; | ||
| 93 | clocks = <&ref24>; | ||
| 94 | }; | ||
| 95 | |||
| 96 | uart@d8210000 { | ||
| 97 | compatible = "via,vt8500-uart"; | ||
| 98 | reg = <0xd8210000 0x1040>; | ||
| 99 | interrupts = <47>; | ||
| 100 | clocks = <&ref24>; | ||
| 101 | }; | ||
| 102 | |||
| 103 | uart@d82c0000 { | ||
| 104 | compatible = "via,vt8500-uart"; | ||
| 105 | reg = <0xd82c0000 0x1040>; | ||
| 106 | interrupts = <50>; | ||
| 107 | clocks = <&ref24>; | ||
| 108 | }; | ||
| 109 | |||
| 110 | rtc@d8100000 { | ||
| 111 | compatible = "via,vt8500-rtc"; | ||
| 112 | reg = <0xd8100000 0x10000>; | ||
| 113 | interrupts = <48>; | ||
| 114 | }; | ||
| 115 | }; | ||
| 116 | }; | ||
diff --git a/arch/arm/boot/dts/wm8505-ref.dts b/arch/arm/boot/dts/wm8505-ref.dts new file mode 100644 index 000000000000..fd4e248074c6 --- /dev/null +++ b/arch/arm/boot/dts/wm8505-ref.dts | |||
| @@ -0,0 +1,36 @@ | |||
| 1 | /* | ||
| 2 | * wm8505-ref.dts - Device tree file for Wondermedia WM8505 reference netbook | ||
| 3 | * | ||
| 4 | * Copyright (C) 2012 Tony Prisk <linux@prisktech.co.nz> | ||
| 5 | * | ||
| 6 | * Licensed under GPLv2 or later | ||
| 7 | */ | ||
| 8 | |||
| 9 | /dts-v1/; | ||
| 10 | /include/ "wm8505.dtsi" | ||
| 11 | |||
| 12 | / { | ||
| 13 | model = "Wondermedia WM8505 Netbook"; | ||
| 14 | |||
| 15 | /* | ||
| 16 | * Display node is based on Sascha Hauer's patch on dri-devel. | ||
| 17 | * Added a bpp property to calculate the size of the framebuffer | ||
| 18 | * until the binding is formalized. | ||
| 19 | */ | ||
| 20 | display: display@0 { | ||
| 21 | modes { | ||
| 22 | mode0: mode@0 { | ||
| 23 | hactive = <800>; | ||
| 24 | vactive = <480>; | ||
| 25 | hback-porch = <88>; | ||
| 26 | hfront-porch = <40>; | ||
| 27 | hsync-len = <0>; | ||
| 28 | vback-porch = <32>; | ||
| 29 | vfront-porch = <11>; | ||
| 30 | vsync-len = <1>; | ||
| 31 | clock = <0>; /* unused but required */ | ||
| 32 | bpp = <32>; /* non-standard but required */ | ||
| 33 | }; | ||
| 34 | }; | ||
| 35 | }; | ||
| 36 | }; | ||
diff --git a/arch/arm/boot/dts/wm8505.dtsi b/arch/arm/boot/dts/wm8505.dtsi new file mode 100644 index 000000000000..b459691655ab --- /dev/null +++ b/arch/arm/boot/dts/wm8505.dtsi | |||
| @@ -0,0 +1,143 @@ | |||
| 1 | /* | ||
| 2 | * wm8505.dtsi - Device tree file for Wondermedia WM8505 SoC | ||
| 3 | * | ||
| 4 | * Copyright (C) 2012 Tony Prisk <linux@prisktech.co.nz> | ||
| 5 | * | ||
| 6 | * Licensed under GPLv2 or later | ||
| 7 | */ | ||
| 8 | |||
| 9 | /include/ "skeleton.dtsi" | ||
| 10 | |||
| 11 | / { | ||
| 12 | compatible = "wm,wm8505"; | ||
| 13 | |||
| 14 | cpus { | ||
| 15 | cpu@0 { | ||
| 16 | compatible = "arm,arm926ejs"; | ||
| 17 | }; | ||
| 18 | }; | ||
| 19 | |||
| 20 | soc { | ||
| 21 | #address-cells = <1>; | ||
| 22 | #size-cells = <1>; | ||
| 23 | compatible = "simple-bus"; | ||
| 24 | ranges; | ||
| 25 | interrupt-parent = <&intc0>; | ||
| 26 | |||
| 27 | intc0: interrupt-controller@d8140000 { | ||
| 28 | compatible = "via,vt8500-intc"; | ||
| 29 | interrupt-controller; | ||
| 30 | reg = <0xd8140000 0x10000>; | ||
| 31 | #interrupt-cells = <1>; | ||
| 32 | }; | ||
| 33 | |||
| 34 | /* Secondary IC cascaded to intc0 */ | ||
| 35 | intc1: interrupt-controller@d8150000 { | ||
| 36 | compatible = "via,vt8500-intc"; | ||
| 37 | interrupt-controller; | ||
| 38 | #interrupt-cells = <1>; | ||
| 39 | reg = <0xD8150000 0x10000>; | ||
| 40 | interrupts = <56 57 58 59 60 61 62 63>; | ||
| 41 | }; | ||
| 42 | |||
| 43 | gpio: gpio-controller@d8110000 { | ||
| 44 | compatible = "wm,wm8505-gpio"; | ||
| 45 | gpio-controller; | ||
| 46 | reg = <0xd8110000 0x10000>; | ||
| 47 | #gpio-cells = <3>; | ||
| 48 | }; | ||
| 49 | |||
| 50 | pmc@d8130000 { | ||
| 51 | compatible = "via,vt8500-pmc"; | ||
| 52 | reg = <0xd8130000 0x1000>; | ||
| 53 | clocks { | ||
| 54 | #address-cells = <1>; | ||
| 55 | #size-cells = <0>; | ||
| 56 | |||
| 57 | ref24: ref24M { | ||
| 58 | #clock-cells = <0>; | ||
| 59 | compatible = "fixed-clock"; | ||
| 60 | clock-frequency = <24000000>; | ||
| 61 | }; | ||
| 62 | }; | ||
| 63 | }; | ||
| 64 | |||
| 65 | timer@d8130100 { | ||
| 66 | compatible = "via,vt8500-timer"; | ||
| 67 | reg = <0xd8130100 0x28>; | ||
| 68 | interrupts = <36>; | ||
| 69 | }; | ||
| 70 | |||
| 71 | ehci@d8007100 { | ||
| 72 | compatible = "via,vt8500-ehci"; | ||
| 73 | reg = <0xd8007100 0x200>; | ||
| 74 | interrupts = <43>; | ||
| 75 | }; | ||
| 76 | |||
| 77 | uhci@d8007300 { | ||
| 78 | compatible = "platform-uhci"; | ||
| 79 | reg = <0xd8007300 0x200>; | ||
| 80 | interrupts = <43>; | ||
| 81 | }; | ||
| 82 | |||
| 83 | fb@d8050800 { | ||
| 84 | compatible = "wm,wm8505-fb"; | ||
| 85 | reg = <0xd8050800 0x200>; | ||
| 86 | display = <&display>; | ||
| 87 | default-mode = <&mode0>; | ||
| 88 | }; | ||
| 89 | |||
| 90 | ge_rops@d8050400 { | ||
| 91 | compatible = "wm,prizm-ge-rops"; | ||
| 92 | reg = <0xd8050400 0x100>; | ||
| 93 | }; | ||
| 94 | |||
| 95 | uart@d8200000 { | ||
| 96 | compatible = "via,vt8500-uart"; | ||
| 97 | reg = <0xd8200000 0x1040>; | ||
| 98 | interrupts = <32>; | ||
| 99 | clocks = <&ref24>; | ||
| 100 | }; | ||
| 101 | |||
| 102 | uart@d82b0000 { | ||
| 103 | compatible = "via,vt8500-uart"; | ||
| 104 | reg = <0xd82b0000 0x1040>; | ||
| 105 | interrupts = <33>; | ||
| 106 | clocks = <&ref24>; | ||
| 107 | }; | ||
| 108 | |||
| 109 | uart@d8210000 { | ||
| 110 | compatible = "via,vt8500-uart"; | ||
| 111 | reg = <0xd8210000 0x1040>; | ||
| 112 | interrupts = <47>; | ||
| 113 | clocks = <&ref24>; | ||
| 114 | }; | ||
| 115 | |||
| 116 | uart@d82c0000 { | ||
| 117 | compatible = "via,vt8500-uart"; | ||
| 118 | reg = <0xd82c0000 0x1040>; | ||
| 119 | interrupts = <50>; | ||
| 120 | clocks = <&ref24>; | ||
| 121 | }; | ||
| 122 | |||
| 123 | uart@d8370000 { | ||
| 124 | compatible = "via,vt8500-uart"; | ||
| 125 | reg = <0xd8370000 0x1040>; | ||
| 126 | interrupts = <31>; | ||
| 127 | clocks = <&ref24>; | ||
| 128 | }; | ||
| 129 | |||
| 130 | uart@d8380000 { | ||
| 131 | compatible = "via,vt8500-uart"; | ||
| 132 | reg = <0xd8380000 0x1040>; | ||
| 133 | interrupts = <30>; | ||
| 134 | clocks = <&ref24>; | ||
| 135 | }; | ||
| 136 | |||
| 137 | rtc@d8100000 { | ||
| 138 | compatible = "via,vt8500-rtc"; | ||
| 139 | reg = <0xd8100000 0x10000>; | ||
| 140 | interrupts = <48>; | ||
| 141 | }; | ||
| 142 | }; | ||
| 143 | }; | ||
diff --git a/arch/arm/boot/dts/wm8650-mid.dts b/arch/arm/boot/dts/wm8650-mid.dts new file mode 100644 index 000000000000..cefd938f842f --- /dev/null +++ b/arch/arm/boot/dts/wm8650-mid.dts | |||
| @@ -0,0 +1,36 @@ | |||
| 1 | /* | ||
| 2 | * wm8650-mid.dts - Device tree file for Wondermedia WM8650-MID Tablet | ||
| 3 | * | ||
| 4 | * Copyright (C) 2012 Tony Prisk <linux@prisktech.co.nz> | ||
| 5 | * | ||
| 6 | * Licensed under GPLv2 or later | ||
| 7 | */ | ||
| 8 | |||
| 9 | /dts-v1/; | ||
| 10 | /include/ "wm8650.dtsi" | ||
| 11 | |||
| 12 | / { | ||
| 13 | model = "Wondermedia WM8650-MID Tablet"; | ||
| 14 | |||
| 15 | /* | ||
| 16 | * Display node is based on Sascha Hauer's patch on dri-devel. | ||
| 17 | * Added a bpp property to calculate the size of the framebuffer | ||
| 18 | * until the binding is formalized. | ||
| 19 | */ | ||
| 20 | display: display@0 { | ||
| 21 | modes { | ||
| 22 | mode0: mode@0 { | ||
| 23 | hactive = <800>; | ||
| 24 | vactive = <480>; | ||
| 25 | hback-porch = <88>; | ||
| 26 | hfront-porch = <40>; | ||
| 27 | hsync-len = <0>; | ||
| 28 | vback-porch = <32>; | ||
| 29 | vfront-porch = <11>; | ||
| 30 | vsync-len = <1>; | ||
| 31 | clock = <0>; /* unused but required */ | ||
| 32 | bpp = <16>; /* non-standard but required */ | ||
| 33 | }; | ||
| 34 | }; | ||
| 35 | }; | ||
| 36 | }; | ||
diff --git a/arch/arm/boot/dts/wm8650.dtsi b/arch/arm/boot/dts/wm8650.dtsi new file mode 100644 index 000000000000..83b9467559bb --- /dev/null +++ b/arch/arm/boot/dts/wm8650.dtsi | |||
| @@ -0,0 +1,147 @@ | |||
| 1 | /* | ||
| 2 | * wm8650.dtsi - Device tree file for Wondermedia WM8650 SoC | ||
| 3 | * | ||
| 4 | * Copyright (C) 2012 Tony Prisk <linux@prisktech.co.nz> | ||
| 5 | * | ||
| 6 | * Licensed under GPLv2 or later | ||
| 7 | */ | ||
| 8 | |||
| 9 | /include/ "skeleton.dtsi" | ||
| 10 | |||
| 11 | / { | ||
| 12 | compatible = "wm,wm8650"; | ||
| 13 | |||
| 14 | soc { | ||
| 15 | #address-cells = <1>; | ||
| 16 | #size-cells = <1>; | ||
| 17 | compatible = "simple-bus"; | ||
| 18 | ranges; | ||
| 19 | interrupt-parent = <&intc0>; | ||
| 20 | |||
| 21 | intc0: interrupt-controller@d8140000 { | ||
| 22 | compatible = "via,vt8500-intc"; | ||
| 23 | interrupt-controller; | ||
| 24 | reg = <0xd8140000 0x10000>; | ||
| 25 | #interrupt-cells = <1>; | ||
| 26 | }; | ||
| 27 | |||
| 28 | /* Secondary IC cascaded to intc0 */ | ||
| 29 | intc1: interrupt-controller@d8150000 { | ||
| 30 | compatible = "via,vt8500-intc"; | ||
| 31 | interrupt-controller; | ||
| 32 | #interrupt-cells = <1>; | ||
| 33 | reg = <0xD8150000 0x10000>; | ||
| 34 | interrupts = <56 57 58 59 60 61 62 63>; | ||
| 35 | }; | ||
| 36 | |||
| 37 | gpio: gpio-controller@d8110000 { | ||
| 38 | compatible = "wm,wm8650-gpio"; | ||
| 39 | gpio-controller; | ||
| 40 | reg = <0xd8110000 0x10000>; | ||
| 41 | #gpio-cells = <3>; | ||
| 42 | }; | ||
| 43 | |||
| 44 | pmc@d8130000 { | ||
| 45 | compatible = "via,vt8500-pmc"; | ||
| 46 | reg = <0xd8130000 0x1000>; | ||
| 47 | |||
| 48 | clocks { | ||
| 49 | #address-cells = <1>; | ||
| 50 | #size-cells = <0>; | ||
| 51 | |||
| 52 | ref25: ref25M { | ||
| 53 | #clock-cells = <0>; | ||
| 54 | compatible = "fixed-clock"; | ||
| 55 | clock-frequency = <25000000>; | ||
| 56 | }; | ||
| 57 | |||
| 58 | ref24: ref24M { | ||
| 59 | #clock-cells = <0>; | ||
| 60 | compatible = "fixed-clock"; | ||
| 61 | clock-frequency = <24000000>; | ||
| 62 | }; | ||
| 63 | |||
| 64 | plla: plla { | ||
| 65 | #clock-cells = <0>; | ||
| 66 | compatible = "wm,wm8650-pll-clock"; | ||
| 67 | clocks = <&ref25>; | ||
| 68 | reg = <0x200>; | ||
| 69 | }; | ||
| 70 | |||
| 71 | pllb: pllb { | ||
| 72 | #clock-cells = <0>; | ||
| 73 | compatible = "wm,wm8650-pll-clock"; | ||
| 74 | clocks = <&ref25>; | ||
| 75 | reg = <0x204>; | ||
| 76 | }; | ||
| 77 | |||
| 78 | arm: arm { | ||
| 79 | #clock-cells = <0>; | ||
| 80 | compatible = "via,vt8500-device-clock"; | ||
| 81 | clocks = <&plla>; | ||
| 82 | divisor-reg = <0x300>; | ||
| 83 | }; | ||
| 84 | |||
| 85 | sdhc: sdhc { | ||
| 86 | #clock-cells = <0>; | ||
| 87 | compatible = "via,vt8500-device-clock"; | ||
| 88 | clocks = <&pllb>; | ||
| 89 | divisor-reg = <0x328>; | ||
| 90 | divisor-mask = <0x3f>; | ||
| 91 | enable-reg = <0x254>; | ||
| 92 | enable-bit = <18>; | ||
| 93 | }; | ||
| 94 | }; | ||
| 95 | }; | ||
| 96 | |||
| 97 | timer@d8130100 { | ||
| 98 | compatible = "via,vt8500-timer"; | ||
| 99 | reg = <0xd8130100 0x28>; | ||
| 100 | interrupts = <36>; | ||
| 101 | }; | ||
| 102 | |||
| 103 | ehci@d8007900 { | ||
| 104 | compatible = "via,vt8500-ehci"; | ||
| 105 | reg = <0xd8007900 0x200>; | ||
| 106 | interrupts = <43>; | ||
| 107 | }; | ||
| 108 | |||
| 109 | uhci@d8007b00 { | ||
| 110 | compatible = "platform-uhci"; | ||
| 111 | reg = <0xd8007b00 0x200>; | ||
| 112 | interrupts = <43>; | ||
| 113 | }; | ||
| 114 | |||
| 115 | fb@d8050800 { | ||
| 116 | compatible = "wm,wm8505-fb"; | ||
| 117 | reg = <0xd8050800 0x200>; | ||
| 118 | display = <&display>; | ||
| 119 | default-mode = <&mode0>; | ||
| 120 | }; | ||
| 121 | |||
| 122 | ge_rops@d8050400 { | ||
| 123 | compatible = "wm,prizm-ge-rops"; | ||
| 124 | reg = <0xd8050400 0x100>; | ||
| 125 | }; | ||
| 126 | |||
| 127 | uart@d8200000 { | ||
| 128 | compatible = "via,vt8500-uart"; | ||
| 129 | reg = <0xd8200000 0x1040>; | ||
| 130 | interrupts = <32>; | ||
| 131 | clocks = <&ref24>; | ||
| 132 | }; | ||
| 133 | |||
| 134 | uart@d82b0000 { | ||
| 135 | compatible = "via,vt8500-uart"; | ||
| 136 | reg = <0xd82b0000 0x1040>; | ||
| 137 | interrupts = <33>; | ||
| 138 | clocks = <&ref24>; | ||
| 139 | }; | ||
| 140 | |||
| 141 | rtc@d8100000 { | ||
| 142 | compatible = "via,vt8500-rtc"; | ||
| 143 | reg = <0xd8100000 0x10000>; | ||
| 144 | interrupts = <48>; | ||
| 145 | }; | ||
| 146 | }; | ||
| 147 | }; | ||
diff --git a/arch/arm/configs/imx_v6_v7_defconfig b/arch/arm/configs/imx_v6_v7_defconfig index 3c9f32f9b6b4..565132d02105 100644 --- a/arch/arm/configs/imx_v6_v7_defconfig +++ b/arch/arm/configs/imx_v6_v7_defconfig | |||
| @@ -32,9 +32,7 @@ CONFIG_MACH_VPR200=y | |||
| 32 | CONFIG_MACH_IMX51_DT=y | 32 | CONFIG_MACH_IMX51_DT=y |
| 33 | CONFIG_MACH_MX51_3DS=y | 33 | CONFIG_MACH_MX51_3DS=y |
| 34 | CONFIG_MACH_EUKREA_CPUIMX51SD=y | 34 | CONFIG_MACH_EUKREA_CPUIMX51SD=y |
| 35 | CONFIG_MACH_MX51_EFIKAMX=y | 35 | CONFIG_SOC_IMX53=y |
| 36 | CONFIG_MACH_MX51_EFIKASB=y | ||
| 37 | CONFIG_MACH_IMX53_DT=y | ||
| 38 | CONFIG_SOC_IMX6Q=y | 36 | CONFIG_SOC_IMX6Q=y |
| 39 | CONFIG_MXC_PWM=y | 37 | CONFIG_MXC_PWM=y |
| 40 | CONFIG_SMP=y | 38 | CONFIG_SMP=y |
diff --git a/arch/arm/configs/mxs_defconfig b/arch/arm/configs/mxs_defconfig index 4edcfb4e4dee..36d60dda310c 100644 --- a/arch/arm/configs/mxs_defconfig +++ b/arch/arm/configs/mxs_defconfig | |||
| @@ -23,12 +23,6 @@ CONFIG_BLK_DEV_INTEGRITY=y | |||
| 23 | # CONFIG_IOSCHED_CFQ is not set | 23 | # CONFIG_IOSCHED_CFQ is not set |
| 24 | CONFIG_ARCH_MXS=y | 24 | CONFIG_ARCH_MXS=y |
| 25 | CONFIG_MACH_MXS_DT=y | 25 | CONFIG_MACH_MXS_DT=y |
| 26 | CONFIG_MACH_MX23EVK=y | ||
| 27 | CONFIG_MACH_MX28EVK=y | ||
| 28 | CONFIG_MACH_STMP378X_DEVB=y | ||
| 29 | CONFIG_MACH_TX28=y | ||
| 30 | CONFIG_MACH_M28EVK=y | ||
| 31 | CONFIG_MACH_APX4DEVKIT=y | ||
| 32 | # CONFIG_ARM_THUMB is not set | 26 | # CONFIG_ARM_THUMB is not set |
| 33 | CONFIG_NO_HZ=y | 27 | CONFIG_NO_HZ=y |
| 34 | CONFIG_HIGH_RES_TIMERS=y | 28 | CONFIG_HIGH_RES_TIMERS=y |
diff --git a/arch/arm/include/asm/hardware/cache-tauros2.h b/arch/arm/include/asm/hardware/cache-tauros2.h index 538f17ca905b..295e2e40151b 100644 --- a/arch/arm/include/asm/hardware/cache-tauros2.h +++ b/arch/arm/include/asm/hardware/cache-tauros2.h | |||
| @@ -8,4 +8,7 @@ | |||
| 8 | * warranty of any kind, whether express or implied. | 8 | * warranty of any kind, whether express or implied. |
| 9 | */ | 9 | */ |
| 10 | 10 | ||
| 11 | extern void __init tauros2_init(void); | 11 | #define CACHE_TAUROS2_PREFETCH_ON (1 << 0) |
| 12 | #define CACHE_TAUROS2_LINEFILL_BURST8 (1 << 1) | ||
| 13 | |||
| 14 | extern void __init tauros2_init(unsigned int features); | ||
diff --git a/arch/arm/mach-dove/common.c b/arch/arm/mach-dove/common.c index 6321567d8eaa..e5a97d97e38d 100644 --- a/arch/arm/mach-dove/common.c +++ b/arch/arm/mach-dove/common.c | |||
| @@ -289,7 +289,7 @@ void __init dove_init(void) | |||
| 289 | printk(KERN_INFO "TCLK = %dMHz\n", (get_tclk() + 499999) / 1000000); | 289 | printk(KERN_INFO "TCLK = %dMHz\n", (get_tclk() + 499999) / 1000000); |
| 290 | 290 | ||
| 291 | #ifdef CONFIG_CACHE_TAUROS2 | 291 | #ifdef CONFIG_CACHE_TAUROS2 |
| 292 | tauros2_init(); | 292 | tauros2_init(0); |
| 293 | #endif | 293 | #endif |
| 294 | dove_setup_cpu_mbus(); | 294 | dove_setup_cpu_mbus(); |
| 295 | 295 | ||
diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig index afd542ad6f97..7ca5fe45945f 100644 --- a/arch/arm/mach-imx/Kconfig +++ b/arch/arm/mach-imx/Kconfig | |||
| @@ -101,13 +101,8 @@ config SOC_IMX51 | |||
| 101 | select SOC_IMX5 | 101 | select SOC_IMX5 |
| 102 | select ARCH_MX5 | 102 | select ARCH_MX5 |
| 103 | select ARCH_MX51 | 103 | select ARCH_MX51 |
| 104 | 104 | select PINCTRL | |
| 105 | config SOC_IMX53 | 105 | select PINCTRL_IMX51 |
| 106 | bool | ||
| 107 | select SOC_IMX5 | ||
| 108 | select ARCH_MX5 | ||
| 109 | select ARCH_MX53 | ||
| 110 | select HAVE_CAN_FLEXCAN if CAN | ||
| 111 | 106 | ||
| 112 | if ARCH_IMX_V4_V5 | 107 | if ARCH_IMX_V4_V5 |
| 113 | 108 | ||
| @@ -561,7 +556,6 @@ config MACH_BUG | |||
| 561 | config MACH_IMX31_DT | 556 | config MACH_IMX31_DT |
| 562 | bool "Support i.MX31 platforms from device tree" | 557 | bool "Support i.MX31 platforms from device tree" |
| 563 | select SOC_IMX31 | 558 | select SOC_IMX31 |
| 564 | select USE_OF | ||
| 565 | help | 559 | help |
| 566 | Include support for Freescale i.MX31 based platforms | 560 | Include support for Freescale i.MX31 based platforms |
| 567 | using the device tree for discovery. | 561 | using the device tree for discovery. |
| @@ -737,95 +731,19 @@ config MACH_EUKREA_MBIMXSD51_BASEBOARD | |||
| 737 | 731 | ||
| 738 | endchoice | 732 | endchoice |
| 739 | 733 | ||
| 740 | config MX51_EFIKA_COMMON | 734 | comment "Device tree only" |
| 741 | bool | ||
| 742 | select SOC_IMX51 | ||
| 743 | select IMX_HAVE_PLATFORM_IMX_UART | ||
| 744 | select IMX_HAVE_PLATFORM_MXC_EHCI | ||
| 745 | select IMX_HAVE_PLATFORM_PATA_IMX | ||
| 746 | select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX | ||
| 747 | select IMX_HAVE_PLATFORM_SPI_IMX | ||
| 748 | select MXC_ULPI if USB_ULPI | ||
| 749 | |||
| 750 | config MACH_MX51_EFIKAMX | ||
| 751 | bool "Support MX51 Genesi Efika MX nettop" | ||
| 752 | select LEDS_GPIO_REGISTER | ||
| 753 | select MX51_EFIKA_COMMON | ||
| 754 | help | ||
| 755 | Include support for Genesi Efika MX nettop. This includes specific | ||
| 756 | configurations for the board and its peripherals. | ||
| 757 | |||
| 758 | config MACH_MX51_EFIKASB | ||
| 759 | bool "Support MX51 Genesi Efika Smartbook" | ||
| 760 | select LEDS_GPIO_REGISTER | ||
| 761 | select MX51_EFIKA_COMMON | ||
| 762 | help | ||
| 763 | Include support for Genesi Efika Smartbook. This includes specific | ||
| 764 | configurations for the board and its peripherals. | ||
| 765 | |||
| 766 | comment "i.MX53 machines:" | ||
| 767 | |||
| 768 | config MACH_IMX53_DT | ||
| 769 | bool "Support i.MX53 platforms from device tree" | ||
| 770 | select SOC_IMX53 | ||
| 771 | select MACH_MX53_ARD | ||
| 772 | select MACH_MX53_EVK | ||
| 773 | select MACH_MX53_LOCO | ||
| 774 | select MACH_MX53_SMD | ||
| 775 | help | ||
| 776 | Include support for Freescale i.MX53 based platforms | ||
| 777 | using the device tree for discovery | ||
| 778 | |||
| 779 | config MACH_MX53_EVK | ||
| 780 | bool "Support MX53 EVK platforms" | ||
| 781 | select SOC_IMX53 | ||
| 782 | select IMX_HAVE_PLATFORM_IMX2_WDT | ||
| 783 | select IMX_HAVE_PLATFORM_IMX_UART | ||
| 784 | select IMX_HAVE_PLATFORM_IMX_I2C | ||
| 785 | select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX | ||
| 786 | select IMX_HAVE_PLATFORM_SPI_IMX | ||
| 787 | select LEDS_GPIO_REGISTER | ||
| 788 | help | ||
| 789 | Include support for MX53 EVK platform. This includes specific | ||
| 790 | configurations for the board and its peripherals. | ||
| 791 | |||
| 792 | config MACH_MX53_SMD | ||
| 793 | bool "Support MX53 SMD platforms" | ||
| 794 | select SOC_IMX53 | ||
| 795 | select IMX_HAVE_PLATFORM_IMX2_WDT | ||
| 796 | select IMX_HAVE_PLATFORM_IMX_I2C | ||
| 797 | select IMX_HAVE_PLATFORM_IMX_UART | ||
| 798 | select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX | ||
| 799 | help | ||
| 800 | Include support for MX53 SMD platform. This includes specific | ||
| 801 | configurations for the board and its peripherals. | ||
| 802 | 735 | ||
| 803 | config MACH_MX53_LOCO | 736 | config SOC_IMX53 |
| 804 | bool "Support MX53 LOCO platforms" | 737 | bool "i.MX53 support" |
| 805 | select SOC_IMX53 | 738 | select SOC_IMX5 |
| 806 | select IMX_HAVE_PLATFORM_IMX2_WDT | 739 | select ARCH_MX5 |
| 807 | select IMX_HAVE_PLATFORM_IMX_I2C | 740 | select ARCH_MX53 |
| 808 | select IMX_HAVE_PLATFORM_IMX_UART | 741 | select HAVE_CAN_FLEXCAN if CAN |
| 809 | select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX | 742 | select PINCTRL |
| 810 | select IMX_HAVE_PLATFORM_GPIO_KEYS | 743 | select PINCTRL_IMX53 |
| 811 | select LEDS_GPIO_REGISTER | ||
| 812 | help | ||
| 813 | Include support for MX53 LOCO platform. This includes specific | ||
| 814 | configurations for the board and its peripherals. | ||
| 815 | 744 | ||
| 816 | config MACH_MX53_ARD | ||
| 817 | bool "Support MX53 ARD platforms" | ||
| 818 | select SOC_IMX53 | ||
| 819 | select IMX_HAVE_PLATFORM_IMX2_WDT | ||
| 820 | select IMX_HAVE_PLATFORM_IMX_I2C | ||
| 821 | select IMX_HAVE_PLATFORM_IMX_UART | ||
| 822 | select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX | ||
| 823 | select IMX_HAVE_PLATFORM_GPIO_KEYS | ||
| 824 | help | 745 | help |
| 825 | Include support for MX53 ARD platform. This includes specific | 746 | This enables support for Freescale i.MX53 processor. |
| 826 | configurations for the board and its peripherals. | ||
| 827 | |||
| 828 | comment "i.MX6 family:" | ||
| 829 | 747 | ||
| 830 | config SOC_IMX6Q | 748 | config SOC_IMX6Q |
| 831 | bool "i.MX6 Quad support" | 749 | bool "i.MX6 Quad support" |
diff --git a/arch/arm/mach-imx/Makefile b/arch/arm/mach-imx/Makefile index d004d37ad9d8..f4c0e757d805 100644 --- a/arch/arm/mach-imx/Makefile +++ b/arch/arm/mach-imx/Makefile | |||
| @@ -83,16 +83,9 @@ endif | |||
| 83 | # i.MX5 based machines | 83 | # i.MX5 based machines |
| 84 | obj-$(CONFIG_MACH_MX51_BABBAGE) += mach-mx51_babbage.o | 84 | obj-$(CONFIG_MACH_MX51_BABBAGE) += mach-mx51_babbage.o |
| 85 | obj-$(CONFIG_MACH_MX51_3DS) += mach-mx51_3ds.o | 85 | obj-$(CONFIG_MACH_MX51_3DS) += mach-mx51_3ds.o |
| 86 | obj-$(CONFIG_MACH_MX53_EVK) += mach-mx53_evk.o | ||
| 87 | obj-$(CONFIG_MACH_MX53_SMD) += mach-mx53_smd.o | ||
| 88 | obj-$(CONFIG_MACH_MX53_LOCO) += mach-mx53_loco.o | ||
| 89 | obj-$(CONFIG_MACH_MX53_ARD) += mach-mx53_ard.o | ||
| 90 | obj-$(CONFIG_MACH_EUKREA_CPUIMX51SD) += mach-cpuimx51sd.o | 86 | obj-$(CONFIG_MACH_EUKREA_CPUIMX51SD) += mach-cpuimx51sd.o |
| 91 | obj-$(CONFIG_MACH_EUKREA_MBIMXSD51_BASEBOARD) += eukrea_mbimxsd51-baseboard.o | 87 | obj-$(CONFIG_MACH_EUKREA_MBIMXSD51_BASEBOARD) += eukrea_mbimxsd51-baseboard.o |
| 92 | obj-$(CONFIG_MX51_EFIKA_COMMON) += mx51_efika.o | ||
| 93 | obj-$(CONFIG_MACH_MX51_EFIKAMX) += mach-mx51_efikamx.o | ||
| 94 | obj-$(CONFIG_MACH_MX51_EFIKASB) += mach-mx51_efikasb.o | ||
| 95 | obj-$(CONFIG_MACH_MX50_RDP) += mach-mx50_rdp.o | 88 | obj-$(CONFIG_MACH_MX50_RDP) += mach-mx50_rdp.o |
| 96 | 89 | ||
| 97 | obj-$(CONFIG_MACH_IMX51_DT) += imx51-dt.o | 90 | obj-$(CONFIG_MACH_IMX51_DT) += imx51-dt.o |
| 98 | obj-$(CONFIG_MACH_IMX53_DT) += imx53-dt.o | 91 | obj-$(CONFIG_SOC_IMX53) += mach-imx53.o |
diff --git a/arch/arm/mach-imx/Makefile.boot b/arch/arm/mach-imx/Makefile.boot index 05541cf4a878..c60967629e27 100644 --- a/arch/arm/mach-imx/Makefile.boot +++ b/arch/arm/mach-imx/Makefile.boot | |||
| @@ -39,8 +39,12 @@ params_phys-$(CONFIG_SOC_IMX6Q) := 0x10000100 | |||
| 39 | initrd_phys-$(CONFIG_SOC_IMX6Q) := 0x10800000 | 39 | initrd_phys-$(CONFIG_SOC_IMX6Q) := 0x10800000 |
| 40 | 40 | ||
| 41 | dtb-$(CONFIG_MACH_IMX51_DT) += imx51-babbage.dtb | 41 | dtb-$(CONFIG_MACH_IMX51_DT) += imx51-babbage.dtb |
| 42 | dtb-$(CONFIG_MACH_IMX53_DT) += imx53-ard.dtb imx53-evk.dtb \ | 42 | |
| 43 | imx53-qsb.dtb imx53-smd.dtb | 43 | dtb-$(CONFIG_SOC_IMX53) += imx53-ard.dtb \ |
| 44 | imx53-evk.dtb \ | ||
| 45 | imx53-qsb.dtb \ | ||
| 46 | imx53-smd.dtb \ | ||
| 47 | |||
| 44 | dtb-$(CONFIG_SOC_IMX6Q) += imx6q-arm2.dtb \ | 48 | dtb-$(CONFIG_SOC_IMX6Q) += imx6q-arm2.dtb \ |
| 45 | imx6q-sabrelite.dtb \ | 49 | imx6q-sabrelite.dtb \ |
| 46 | imx6q-sabresd.dtb \ | 50 | imx6q-sabresd.dtb \ |
diff --git a/arch/arm/mach-imx/clk-imx6q.c b/arch/arm/mach-imx/clk-imx6q.c index 4233d9e3531d..3ec242f3341e 100644 --- a/arch/arm/mach-imx/clk-imx6q.c +++ b/arch/arm/mach-imx/clk-imx6q.c | |||
| @@ -157,6 +157,7 @@ enum mx6q_clks { | |||
| 157 | }; | 157 | }; |
| 158 | 158 | ||
| 159 | static struct clk *clk[clk_max]; | 159 | static struct clk *clk[clk_max]; |
| 160 | static struct clk_onecell_data clk_data; | ||
| 160 | 161 | ||
| 161 | static enum mx6q_clks const clks_init_on[] __initconst = { | 162 | static enum mx6q_clks const clks_init_on[] __initconst = { |
| 162 | mmdc_ch0_axi, rom, | 163 | mmdc_ch0_axi, rom, |
| @@ -394,52 +395,24 @@ int __init mx6q_clocks_init(void) | |||
| 394 | pr_err("i.MX6q clk %d: register failed with %ld\n", | 395 | pr_err("i.MX6q clk %d: register failed with %ld\n", |
| 395 | i, PTR_ERR(clk[i])); | 396 | i, PTR_ERR(clk[i])); |
| 396 | 397 | ||
| 398 | clk_data.clks = clk; | ||
| 399 | clk_data.clk_num = ARRAY_SIZE(clk); | ||
| 400 | of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data); | ||
| 401 | |||
| 397 | clk_register_clkdev(clk[gpt_ipg], "ipg", "imx-gpt.0"); | 402 | clk_register_clkdev(clk[gpt_ipg], "ipg", "imx-gpt.0"); |
| 398 | clk_register_clkdev(clk[gpt_ipg_per], "per", "imx-gpt.0"); | 403 | clk_register_clkdev(clk[gpt_ipg_per], "per", "imx-gpt.0"); |
| 399 | clk_register_clkdev(clk[twd], NULL, "smp_twd"); | 404 | clk_register_clkdev(clk[twd], NULL, "smp_twd"); |
| 400 | clk_register_clkdev(clk[apbh_dma], NULL, "110000.dma-apbh"); | ||
| 401 | clk_register_clkdev(clk[per1_bch], "per1_bch", "112000.gpmi-nand"); | ||
| 402 | clk_register_clkdev(clk[gpmi_bch_apb], "gpmi_bch_apb", "112000.gpmi-nand"); | ||
| 403 | clk_register_clkdev(clk[gpmi_bch], "gpmi_bch", "112000.gpmi-nand"); | ||
| 404 | clk_register_clkdev(clk[gpmi_apb], "gpmi_apb", "112000.gpmi-nand"); | ||
| 405 | clk_register_clkdev(clk[gpmi_io], "gpmi_io", "112000.gpmi-nand"); | ||
| 406 | clk_register_clkdev(clk[usboh3], NULL, "2184000.usb"); | ||
| 407 | clk_register_clkdev(clk[usboh3], NULL, "2184200.usb"); | ||
| 408 | clk_register_clkdev(clk[usboh3], NULL, "2184400.usb"); | ||
| 409 | clk_register_clkdev(clk[usboh3], NULL, "2184600.usb"); | ||
| 410 | clk_register_clkdev(clk[usbphy1], NULL, "20c9000.usbphy"); | ||
| 411 | clk_register_clkdev(clk[usbphy2], NULL, "20ca000.usbphy"); | ||
| 412 | clk_register_clkdev(clk[uart_serial], "per", "2020000.serial"); | ||
| 413 | clk_register_clkdev(clk[uart_ipg], "ipg", "2020000.serial"); | ||
| 414 | clk_register_clkdev(clk[uart_serial], "per", "21e8000.serial"); | ||
| 415 | clk_register_clkdev(clk[uart_ipg], "ipg", "21e8000.serial"); | ||
| 416 | clk_register_clkdev(clk[uart_serial], "per", "21ec000.serial"); | ||
| 417 | clk_register_clkdev(clk[uart_ipg], "ipg", "21ec000.serial"); | ||
| 418 | clk_register_clkdev(clk[uart_serial], "per", "21f0000.serial"); | ||
| 419 | clk_register_clkdev(clk[uart_ipg], "ipg", "21f0000.serial"); | ||
| 420 | clk_register_clkdev(clk[uart_serial], "per", "21f4000.serial"); | ||
| 421 | clk_register_clkdev(clk[uart_ipg], "ipg", "21f4000.serial"); | ||
| 422 | clk_register_clkdev(clk[enet], NULL, "2188000.ethernet"); | ||
| 423 | clk_register_clkdev(clk[usdhc1], NULL, "2190000.usdhc"); | ||
| 424 | clk_register_clkdev(clk[usdhc2], NULL, "2194000.usdhc"); | ||
| 425 | clk_register_clkdev(clk[usdhc3], NULL, "2198000.usdhc"); | ||
| 426 | clk_register_clkdev(clk[usdhc4], NULL, "219c000.usdhc"); | ||
| 427 | clk_register_clkdev(clk[i2c1], NULL, "21a0000.i2c"); | ||
| 428 | clk_register_clkdev(clk[i2c2], NULL, "21a4000.i2c"); | ||
| 429 | clk_register_clkdev(clk[i2c3], NULL, "21a8000.i2c"); | ||
| 430 | clk_register_clkdev(clk[ecspi1], NULL, "2008000.ecspi"); | ||
| 431 | clk_register_clkdev(clk[ecspi2], NULL, "200c000.ecspi"); | ||
| 432 | clk_register_clkdev(clk[ecspi3], NULL, "2010000.ecspi"); | ||
| 433 | clk_register_clkdev(clk[ecspi4], NULL, "2014000.ecspi"); | ||
| 434 | clk_register_clkdev(clk[ecspi5], NULL, "2018000.ecspi"); | ||
| 435 | clk_register_clkdev(clk[sdma], NULL, "20ec000.sdma"); | ||
| 436 | clk_register_clkdev(clk[dummy], NULL, "20bc000.wdog"); | ||
| 437 | clk_register_clkdev(clk[dummy], NULL, "20c0000.wdog"); | ||
| 438 | clk_register_clkdev(clk[ssi1_ipg], NULL, "2028000.ssi"); | ||
| 439 | clk_register_clkdev(clk[cko1_sel], "cko1_sel", NULL); | 405 | clk_register_clkdev(clk[cko1_sel], "cko1_sel", NULL); |
| 440 | clk_register_clkdev(clk[ahb], "ahb", NULL); | 406 | clk_register_clkdev(clk[ahb], "ahb", NULL); |
| 441 | clk_register_clkdev(clk[cko1], "cko1", NULL); | 407 | clk_register_clkdev(clk[cko1], "cko1", NULL); |
| 442 | 408 | ||
| 409 | /* | ||
| 410 | * The gpmi needs 100MHz frequency in the EDO/Sync mode, | ||
| 411 | * We can not get the 100MHz from the pll2_pfd0_352m. | ||
| 412 | * So choose pll2_pfd2_396m as enfc_sel's parent. | ||
| 413 | */ | ||
| 414 | clk_set_parent(clk[enfc_sel], clk[pll2_pfd2_396m]); | ||
| 415 | |||
| 443 | for (i = 0; i < ARRAY_SIZE(clks_init_on); i++) | 416 | for (i = 0; i < ARRAY_SIZE(clks_init_on); i++) |
| 444 | clk_prepare_enable(clk[clks_init_on[i]]); | 417 | clk_prepare_enable(clk[clks_init_on[i]]); |
| 445 | 418 | ||
diff --git a/arch/arm/mach-imx/devices-imx53.h b/arch/arm/mach-imx/devices-imx53.h deleted file mode 100644 index 77e0db96c448..000000000000 --- a/arch/arm/mach-imx/devices-imx53.h +++ /dev/null | |||
| @@ -1,48 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2010 Yong Shen. <Yong.Shen@linaro.org> | ||
| 3 | * | ||
| 4 | * This program is free software; you can redistribute it and/or modify it under | ||
| 5 | * the terms of the GNU General Public License version 2 as published by the | ||
| 6 | * Free Software Foundation. | ||
| 7 | */ | ||
| 8 | #include <mach/mx53.h> | ||
| 9 | #include <mach/devices-common.h> | ||
| 10 | |||
| 11 | extern const struct imx_fec_data imx53_fec_data; | ||
| 12 | #define imx53_add_fec(pdata) \ | ||
| 13 | imx_add_fec(&imx53_fec_data, pdata) | ||
| 14 | |||
| 15 | extern const struct imx_imx_uart_1irq_data imx53_imx_uart_data[]; | ||
| 16 | #define imx53_add_imx_uart(id, pdata) \ | ||
| 17 | imx_add_imx_uart_1irq(&imx53_imx_uart_data[id], pdata) | ||
| 18 | |||
| 19 | |||
| 20 | extern const struct imx_imx_i2c_data imx53_imx_i2c_data[]; | ||
| 21 | #define imx53_add_imx_i2c(id, pdata) \ | ||
| 22 | imx_add_imx_i2c(&imx53_imx_i2c_data[id], pdata) | ||
| 23 | |||
| 24 | extern const struct imx_sdhci_esdhc_imx_data imx53_sdhci_esdhc_imx_data[]; | ||
| 25 | #define imx53_add_sdhci_esdhc_imx(id, pdata) \ | ||
| 26 | imx_add_sdhci_esdhc_imx(&imx53_sdhci_esdhc_imx_data[id], pdata) | ||
| 27 | |||
| 28 | extern const struct imx_spi_imx_data imx53_ecspi_data[]; | ||
| 29 | #define imx53_add_ecspi(id, pdata) \ | ||
| 30 | imx_add_spi_imx(&imx53_ecspi_data[id], pdata) | ||
| 31 | |||
| 32 | extern const struct imx_imx2_wdt_data imx53_imx2_wdt_data[]; | ||
| 33 | #define imx53_add_imx2_wdt(id) \ | ||
| 34 | imx_add_imx2_wdt(&imx53_imx2_wdt_data[id]) | ||
| 35 | |||
| 36 | extern const struct imx_imx_ssi_data imx53_imx_ssi_data[]; | ||
| 37 | #define imx53_add_imx_ssi(id, pdata) \ | ||
| 38 | imx_add_imx_ssi(&imx53_imx_ssi_data[id], pdata) | ||
| 39 | |||
| 40 | extern const struct imx_imx_keypad_data imx53_imx_keypad_data; | ||
| 41 | #define imx53_add_imx_keypad(pdata) \ | ||
| 42 | imx_add_imx_keypad(&imx53_imx_keypad_data, pdata) | ||
| 43 | |||
| 44 | extern const struct imx_pata_imx_data imx53_pata_imx_data; | ||
| 45 | #define imx53_add_pata_imx() \ | ||
| 46 | imx_add_pata_imx(&imx53_pata_imx_data) | ||
| 47 | |||
| 48 | extern struct platform_device *__init imx53_add_ahci_imx(void); | ||
diff --git a/arch/arm/mach-imx/efika.h b/arch/arm/mach-imx/efika.h deleted file mode 100644 index 014aa985faae..000000000000 --- a/arch/arm/mach-imx/efika.h +++ /dev/null | |||
| @@ -1,10 +0,0 @@ | |||
| 1 | #ifndef _EFIKA_H | ||
| 2 | #define _EFIKA_H | ||
| 3 | |||
| 4 | #define EFIKA_WLAN_EN IMX_GPIO_NR(2, 16) | ||
| 5 | #define EFIKA_WLAN_RESET IMX_GPIO_NR(2, 10) | ||
| 6 | #define EFIKA_USB_PHY_RESET IMX_GPIO_NR(2, 9) | ||
| 7 | |||
| 8 | void __init efika_board_common_init(void); | ||
| 9 | |||
| 10 | #endif | ||
diff --git a/arch/arm/mach-imx/imx51-dt.c b/arch/arm/mach-imx/imx51-dt.c index d4067fe36357..f233b4bb2342 100644 --- a/arch/arm/mach-imx/imx51-dt.c +++ b/arch/arm/mach-imx/imx51-dt.c | |||
| @@ -13,7 +13,6 @@ | |||
| 13 | #include <linux/irq.h> | 13 | #include <linux/irq.h> |
| 14 | #include <linux/of_irq.h> | 14 | #include <linux/of_irq.h> |
| 15 | #include <linux/of_platform.h> | 15 | #include <linux/of_platform.h> |
| 16 | #include <linux/pinctrl/machine.h> | ||
| 17 | #include <asm/mach/arch.h> | 16 | #include <asm/mach/arch.h> |
| 18 | #include <asm/mach/time.h> | 17 | #include <asm/mach/time.h> |
| 19 | #include <mach/common.h> | 18 | #include <mach/common.h> |
| @@ -44,27 +43,8 @@ static const struct of_dev_auxdata imx51_auxdata_lookup[] __initconst = { | |||
| 44 | { /* sentinel */ } | 43 | { /* sentinel */ } |
| 45 | }; | 44 | }; |
| 46 | 45 | ||
| 47 | static const struct of_device_id imx51_iomuxc_of_match[] __initconst = { | ||
| 48 | { .compatible = "fsl,imx51-iomuxc-babbage", .data = imx51_babbage_common_init, }, | ||
| 49 | { /* sentinel */ } | ||
| 50 | }; | ||
| 51 | |||
| 52 | static void __init imx51_dt_init(void) | 46 | static void __init imx51_dt_init(void) |
| 53 | { | 47 | { |
| 54 | struct device_node *node; | ||
| 55 | const struct of_device_id *of_id; | ||
| 56 | void (*func)(void); | ||
| 57 | |||
| 58 | pinctrl_provide_dummies(); | ||
| 59 | |||
| 60 | node = of_find_matching_node(NULL, imx51_iomuxc_of_match); | ||
| 61 | if (node) { | ||
| 62 | of_id = of_match_node(imx51_iomuxc_of_match, node); | ||
| 63 | func = of_id->data; | ||
| 64 | func(); | ||
| 65 | of_node_put(node); | ||
| 66 | } | ||
| 67 | |||
| 68 | of_platform_populate(NULL, of_default_bus_match_table, | 48 | of_platform_populate(NULL, of_default_bus_match_table, |
| 69 | imx51_auxdata_lookup, NULL); | 49 | imx51_auxdata_lookup, NULL); |
| 70 | } | 50 | } |
| @@ -79,7 +59,6 @@ static struct sys_timer imx51_timer = { | |||
| 79 | }; | 59 | }; |
| 80 | 60 | ||
| 81 | static const char *imx51_dt_board_compat[] __initdata = { | 61 | static const char *imx51_dt_board_compat[] __initdata = { |
| 82 | "fsl,imx51-babbage", | ||
| 83 | "fsl,imx51", | 62 | "fsl,imx51", |
| 84 | NULL | 63 | NULL |
| 85 | }; | 64 | }; |
diff --git a/arch/arm/mach-imx/imx53-dt.c b/arch/arm/mach-imx/mach-imx53.c index 1b7a2fc36591..29711e95579f 100644 --- a/arch/arm/mach-imx/imx53-dt.c +++ b/arch/arm/mach-imx/mach-imx53.c | |||
| @@ -17,7 +17,6 @@ | |||
| 17 | #include <linux/irq.h> | 17 | #include <linux/irq.h> |
| 18 | #include <linux/of_irq.h> | 18 | #include <linux/of_irq.h> |
| 19 | #include <linux/of_platform.h> | 19 | #include <linux/of_platform.h> |
| 20 | #include <linux/pinctrl/machine.h> | ||
| 21 | #include <asm/mach/arch.h> | 20 | #include <asm/mach/arch.h> |
| 22 | #include <asm/mach/time.h> | 21 | #include <asm/mach/time.h> |
| 23 | #include <mach/common.h> | 22 | #include <mach/common.h> |
| @@ -51,14 +50,6 @@ static const struct of_dev_auxdata imx53_auxdata_lookup[] __initconst = { | |||
| 51 | { /* sentinel */ } | 50 | { /* sentinel */ } |
| 52 | }; | 51 | }; |
| 53 | 52 | ||
| 54 | static const struct of_device_id imx53_iomuxc_of_match[] __initconst = { | ||
| 55 | { .compatible = "fsl,imx53-iomuxc-ard", .data = imx53_ard_common_init, }, | ||
| 56 | { .compatible = "fsl,imx53-iomuxc-evk", .data = imx53_evk_common_init, }, | ||
| 57 | { .compatible = "fsl,imx53-iomuxc-qsb", .data = imx53_qsb_common_init, }, | ||
| 58 | { .compatible = "fsl,imx53-iomuxc-smd", .data = imx53_smd_common_init, }, | ||
| 59 | { /* sentinel */ } | ||
| 60 | }; | ||
| 61 | |||
| 62 | static void __init imx53_qsb_init(void) | 53 | static void __init imx53_qsb_init(void) |
| 63 | { | 54 | { |
| 64 | struct clk *clk; | 55 | struct clk *clk; |
| @@ -74,20 +65,6 @@ static void __init imx53_qsb_init(void) | |||
| 74 | 65 | ||
| 75 | static void __init imx53_dt_init(void) | 66 | static void __init imx53_dt_init(void) |
| 76 | { | 67 | { |
| 77 | struct device_node *node; | ||
| 78 | const struct of_device_id *of_id; | ||
| 79 | void (*func)(void); | ||
| 80 | |||
| 81 | pinctrl_provide_dummies(); | ||
| 82 | |||
| 83 | node = of_find_matching_node(NULL, imx53_iomuxc_of_match); | ||
| 84 | if (node) { | ||
| 85 | of_id = of_match_node(imx53_iomuxc_of_match, node); | ||
| 86 | func = of_id->data; | ||
| 87 | func(); | ||
| 88 | of_node_put(node); | ||
| 89 | } | ||
| 90 | |||
| 91 | if (of_machine_is_compatible("fsl,imx53-qsb")) | 68 | if (of_machine_is_compatible("fsl,imx53-qsb")) |
| 92 | imx53_qsb_init(); | 69 | imx53_qsb_init(); |
| 93 | 70 | ||
| @@ -105,10 +82,6 @@ static struct sys_timer imx53_timer = { | |||
| 105 | }; | 82 | }; |
| 106 | 83 | ||
| 107 | static const char *imx53_dt_board_compat[] __initdata = { | 84 | static const char *imx53_dt_board_compat[] __initdata = { |
| 108 | "fsl,imx53-ard", | ||
| 109 | "fsl,imx53-evk", | ||
| 110 | "fsl,imx53-qsb", | ||
| 111 | "fsl,imx53-smd", | ||
| 112 | "fsl,imx53", | 85 | "fsl,imx53", |
| 113 | NULL | 86 | NULL |
| 114 | }; | 87 | }; |
diff --git a/arch/arm/mach-imx/mach-imx6q.c b/arch/arm/mach-imx/mach-imx6q.c index 045b3f6a387d..692b4b143bb1 100644 --- a/arch/arm/mach-imx/mach-imx6q.c +++ b/arch/arm/mach-imx/mach-imx6q.c | |||
| @@ -22,7 +22,6 @@ | |||
| 22 | #include <linux/of_address.h> | 22 | #include <linux/of_address.h> |
| 23 | #include <linux/of_irq.h> | 23 | #include <linux/of_irq.h> |
| 24 | #include <linux/of_platform.h> | 24 | #include <linux/of_platform.h> |
| 25 | #include <linux/pinctrl/machine.h> | ||
| 26 | #include <linux/phy.h> | 25 | #include <linux/phy.h> |
| 27 | #include <linux/micrel_phy.h> | 26 | #include <linux/micrel_phy.h> |
| 28 | #include <linux/mfd/anatop.h> | 27 | #include <linux/mfd/anatop.h> |
| @@ -100,7 +99,6 @@ static void __init imx6q_sabrelite_cko1_setup(void) | |||
| 100 | clk_set_parent(cko1_sel, ahb); | 99 | clk_set_parent(cko1_sel, ahb); |
| 101 | rate = clk_round_rate(cko1, 16000000); | 100 | rate = clk_round_rate(cko1, 16000000); |
| 102 | clk_set_rate(cko1, rate); | 101 | clk_set_rate(cko1, rate); |
| 103 | clk_register_clkdev(cko1, NULL, "0-000a"); | ||
| 104 | put_clk: | 102 | put_clk: |
| 105 | if (!IS_ERR(cko1_sel)) | 103 | if (!IS_ERR(cko1_sel)) |
| 106 | clk_put(cko1_sel); | 104 | clk_put(cko1_sel); |
| @@ -159,12 +157,6 @@ static void __init imx6q_usb_init(void) | |||
| 159 | 157 | ||
| 160 | static void __init imx6q_init_machine(void) | 158 | static void __init imx6q_init_machine(void) |
| 161 | { | 159 | { |
| 162 | /* | ||
| 163 | * This should be removed when all imx6q boards have pinctrl | ||
| 164 | * states for devices defined in device tree. | ||
| 165 | */ | ||
| 166 | pinctrl_provide_dummies(); | ||
| 167 | |||
| 168 | if (of_machine_is_compatible("fsl,imx6q-sabrelite")) | 160 | if (of_machine_is_compatible("fsl,imx6q-sabrelite")) |
| 169 | imx6q_sabrelite_init(); | 161 | imx6q_sabrelite_init(); |
| 170 | 162 | ||
| @@ -218,9 +210,6 @@ static struct sys_timer imx6q_timer = { | |||
| 218 | }; | 210 | }; |
| 219 | 211 | ||
| 220 | static const char *imx6q_dt_compat[] __initdata = { | 212 | static const char *imx6q_dt_compat[] __initdata = { |
| 221 | "fsl,imx6q-arm2", | ||
| 222 | "fsl,imx6q-sabrelite", | ||
| 223 | "fsl,imx6q-sabresd", | ||
| 224 | "fsl,imx6q", | 213 | "fsl,imx6q", |
| 225 | NULL, | 214 | NULL, |
| 226 | }; | 215 | }; |
diff --git a/arch/arm/mach-imx/mach-mx51_efikamx.c b/arch/arm/mach-imx/mach-mx51_efikamx.c deleted file mode 100644 index 8d09c0126cab..000000000000 --- a/arch/arm/mach-imx/mach-mx51_efikamx.c +++ /dev/null | |||
| @@ -1,300 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2010 Linaro Limited | ||
| 3 | * | ||
| 4 | * based on code from the following | ||
| 5 | * Copyright 2009-2010 Freescale Semiconductor, Inc. All Rights Reserved. | ||
| 6 | * Copyright 2009-2010 Pegatron Corporation. All Rights Reserved. | ||
| 7 | * Copyright 2009-2010 Genesi USA, Inc. All Rights Reserved. | ||
| 8 | * | ||
| 9 | * The code contained herein is licensed under the GNU General Public | ||
| 10 | * License. You may obtain a copy of the GNU General Public License | ||
| 11 | * Version 2 or later at the following locations: | ||
| 12 | * | ||
| 13 | * http://www.opensource.org/licenses/gpl-license.html | ||
| 14 | * http://www.gnu.org/copyleft/gpl.html | ||
| 15 | */ | ||
| 16 | |||
| 17 | #include <linux/init.h> | ||
| 18 | #include <linux/platform_device.h> | ||
| 19 | #include <linux/i2c.h> | ||
| 20 | #include <linux/gpio.h> | ||
| 21 | #include <linux/leds.h> | ||
| 22 | #include <linux/input.h> | ||
| 23 | #include <linux/delay.h> | ||
| 24 | #include <linux/io.h> | ||
| 25 | #include <linux/spi/flash.h> | ||
| 26 | #include <linux/spi/spi.h> | ||
| 27 | #include <linux/mfd/mc13892.h> | ||
| 28 | #include <linux/regulator/machine.h> | ||
| 29 | #include <linux/regulator/consumer.h> | ||
| 30 | |||
| 31 | #include <mach/common.h> | ||
| 32 | #include <mach/hardware.h> | ||
| 33 | #include <mach/iomux-mx51.h> | ||
| 34 | |||
| 35 | #include <asm/setup.h> | ||
| 36 | #include <asm/system_info.h> | ||
| 37 | #include <asm/mach-types.h> | ||
| 38 | #include <asm/mach/arch.h> | ||
| 39 | #include <asm/mach/time.h> | ||
| 40 | |||
| 41 | #include "devices-imx51.h" | ||
| 42 | #include "efika.h" | ||
| 43 | |||
| 44 | #define EFIKAMX_PCBID0 IMX_GPIO_NR(3, 16) | ||
| 45 | #define EFIKAMX_PCBID1 IMX_GPIO_NR(3, 17) | ||
| 46 | #define EFIKAMX_PCBID2 IMX_GPIO_NR(3, 11) | ||
| 47 | |||
| 48 | #define EFIKAMX_BLUE_LED IMX_GPIO_NR(3, 13) | ||
| 49 | #define EFIKAMX_GREEN_LED IMX_GPIO_NR(3, 14) | ||
| 50 | #define EFIKAMX_RED_LED IMX_GPIO_NR(3, 15) | ||
| 51 | |||
| 52 | #define EFIKAMX_POWER_KEY IMX_GPIO_NR(2, 31) | ||
| 53 | |||
| 54 | /* board 1.1 doesn't have same reset gpio */ | ||
| 55 | #define EFIKAMX_RESET1_1 IMX_GPIO_NR(3, 2) | ||
| 56 | #define EFIKAMX_RESET IMX_GPIO_NR(1, 4) | ||
| 57 | |||
| 58 | #define EFIKAMX_POWEROFF IMX_GPIO_NR(4, 13) | ||
| 59 | |||
| 60 | #define EFIKAMX_PMIC IMX_GPIO_NR(1, 6) | ||
| 61 | |||
| 62 | /* the pci ids pin have pull up. they're driven low according to board id */ | ||
| 63 | #define MX51_PAD_PCBID0 IOMUX_PAD(0x518, 0x130, 3, 0x0, 0, PAD_CTL_PUS_100K_UP) | ||
| 64 | #define MX51_PAD_PCBID1 IOMUX_PAD(0x51C, 0x134, 3, 0x0, 0, PAD_CTL_PUS_100K_UP) | ||
| 65 | #define MX51_PAD_PCBID2 IOMUX_PAD(0x504, 0x128, 3, 0x0, 0, PAD_CTL_PUS_100K_UP) | ||
| 66 | #define MX51_PAD_PWRKEY IOMUX_PAD(0x48c, 0x0f8, 1, 0x0, 0, PAD_CTL_PUS_100K_UP | PAD_CTL_PKE) | ||
| 67 | |||
| 68 | static iomux_v3_cfg_t mx51efikamx_pads[] = { | ||
| 69 | /* board id */ | ||
| 70 | MX51_PAD_PCBID0, | ||
| 71 | MX51_PAD_PCBID1, | ||
| 72 | MX51_PAD_PCBID2, | ||
| 73 | |||
| 74 | /* leds */ | ||
| 75 | MX51_PAD_CSI1_D9__GPIO3_13, | ||
| 76 | MX51_PAD_CSI1_VSYNC__GPIO3_14, | ||
| 77 | MX51_PAD_CSI1_HSYNC__GPIO3_15, | ||
| 78 | |||
| 79 | /* power key */ | ||
| 80 | MX51_PAD_PWRKEY, | ||
| 81 | |||
| 82 | /* reset */ | ||
| 83 | MX51_PAD_DI1_PIN13__GPIO3_2, | ||
| 84 | MX51_PAD_GPIO1_4__GPIO1_4, | ||
| 85 | |||
| 86 | /* power off */ | ||
| 87 | MX51_PAD_CSI2_VSYNC__GPIO4_13, | ||
| 88 | }; | ||
| 89 | |||
| 90 | /* PCBID2 PCBID1 PCBID0 STATE | ||
| 91 | 1 1 1 ER1:rev1.1 | ||
| 92 | 1 1 0 ER2:rev1.2 | ||
| 93 | 1 0 1 ER3:rev1.3 | ||
| 94 | 1 0 0 ER4:rev1.4 | ||
| 95 | */ | ||
| 96 | static void __init mx51_efikamx_board_id(void) | ||
| 97 | { | ||
| 98 | int id; | ||
| 99 | |||
| 100 | /* things are taking time to settle */ | ||
| 101 | msleep(150); | ||
| 102 | |||
| 103 | gpio_request(EFIKAMX_PCBID0, "pcbid0"); | ||
| 104 | gpio_direction_input(EFIKAMX_PCBID0); | ||
| 105 | gpio_request(EFIKAMX_PCBID1, "pcbid1"); | ||
| 106 | gpio_direction_input(EFIKAMX_PCBID1); | ||
| 107 | gpio_request(EFIKAMX_PCBID2, "pcbid2"); | ||
| 108 | gpio_direction_input(EFIKAMX_PCBID2); | ||
| 109 | |||
| 110 | id = gpio_get_value(EFIKAMX_PCBID0) ? 1 : 0; | ||
| 111 | id |= (gpio_get_value(EFIKAMX_PCBID1) ? 1 : 0) << 1; | ||
| 112 | id |= (gpio_get_value(EFIKAMX_PCBID2) ? 1 : 0) << 2; | ||
| 113 | |||
| 114 | switch (id) { | ||
| 115 | case 7: | ||
| 116 | system_rev = 0x11; | ||
| 117 | break; | ||
| 118 | case 6: | ||
| 119 | system_rev = 0x12; | ||
| 120 | break; | ||
| 121 | case 5: | ||
| 122 | system_rev = 0x13; | ||
| 123 | break; | ||
| 124 | case 4: | ||
| 125 | system_rev = 0x14; | ||
| 126 | break; | ||
| 127 | default: | ||
| 128 | system_rev = 0x10; | ||
| 129 | break; | ||
| 130 | } | ||
| 131 | |||
| 132 | if ((system_rev == 0x10) | ||
| 133 | || (system_rev == 0x12) | ||
| 134 | || (system_rev == 0x14)) { | ||
| 135 | printk(KERN_WARNING | ||
| 136 | "EfikaMX: Unsupported board revision 1.%u!\n", | ||
| 137 | system_rev & 0xf); | ||
| 138 | } | ||
| 139 | } | ||
| 140 | |||
| 141 | static struct gpio_led mx51_efikamx_leds[] __initdata = { | ||
| 142 | { | ||
| 143 | .name = "efikamx:green", | ||
| 144 | .default_trigger = "default-on", | ||
| 145 | .gpio = EFIKAMX_GREEN_LED, | ||
| 146 | }, | ||
| 147 | { | ||
| 148 | .name = "efikamx:red", | ||
| 149 | .default_trigger = "ide-disk", | ||
| 150 | .gpio = EFIKAMX_RED_LED, | ||
| 151 | }, | ||
| 152 | { | ||
| 153 | .name = "efikamx:blue", | ||
| 154 | .default_trigger = "mmc0", | ||
| 155 | .gpio = EFIKAMX_BLUE_LED, | ||
| 156 | }, | ||
| 157 | }; | ||
| 158 | |||
| 159 | static const struct gpio_led_platform_data | ||
| 160 | mx51_efikamx_leds_data __initconst = { | ||
| 161 | .leds = mx51_efikamx_leds, | ||
| 162 | .num_leds = ARRAY_SIZE(mx51_efikamx_leds), | ||
| 163 | }; | ||
| 164 | |||
| 165 | static struct esdhc_platform_data sd_pdata = { | ||
| 166 | .cd_type = ESDHC_CD_CONTROLLER, | ||
| 167 | .wp_type = ESDHC_WP_CONTROLLER, | ||
| 168 | }; | ||
| 169 | |||
| 170 | static struct gpio_keys_button mx51_efikamx_powerkey[] = { | ||
| 171 | { | ||
| 172 | .code = KEY_POWER, | ||
| 173 | .gpio = EFIKAMX_POWER_KEY, | ||
| 174 | .type = EV_PWR, | ||
| 175 | .desc = "Power Button (CM)", | ||
| 176 | .wakeup = 1, | ||
| 177 | .debounce_interval = 10, /* ms */ | ||
| 178 | }, | ||
| 179 | }; | ||
| 180 | |||
| 181 | static const struct gpio_keys_platform_data mx51_efikamx_powerkey_data __initconst = { | ||
| 182 | .buttons = mx51_efikamx_powerkey, | ||
| 183 | .nbuttons = ARRAY_SIZE(mx51_efikamx_powerkey), | ||
| 184 | }; | ||
| 185 | |||
| 186 | static void mx51_efikamx_restart(char mode, const char *cmd) | ||
| 187 | { | ||
| 188 | if (system_rev == 0x11) | ||
| 189 | gpio_direction_output(EFIKAMX_RESET1_1, 0); | ||
| 190 | else | ||
| 191 | gpio_direction_output(EFIKAMX_RESET, 0); | ||
| 192 | } | ||
| 193 | |||
| 194 | static struct regulator *pwgt1, *pwgt2, *coincell; | ||
| 195 | |||
| 196 | static void mx51_efikamx_power_off(void) | ||
| 197 | { | ||
| 198 | if (!IS_ERR(coincell)) | ||
| 199 | regulator_disable(coincell); | ||
| 200 | |||
| 201 | if (!IS_ERR(pwgt1) && !IS_ERR(pwgt2)) { | ||
| 202 | regulator_disable(pwgt2); | ||
| 203 | regulator_disable(pwgt1); | ||
| 204 | } | ||
| 205 | gpio_direction_output(EFIKAMX_POWEROFF, 1); | ||
| 206 | } | ||
| 207 | |||
| 208 | static int __init mx51_efikamx_power_init(void) | ||
| 209 | { | ||
| 210 | pwgt1 = regulator_get(NULL, "pwgt1"); | ||
| 211 | pwgt2 = regulator_get(NULL, "pwgt2"); | ||
| 212 | if (!IS_ERR(pwgt1) && !IS_ERR(pwgt2)) { | ||
| 213 | regulator_enable(pwgt1); | ||
| 214 | regulator_enable(pwgt2); | ||
| 215 | } | ||
| 216 | gpio_request(EFIKAMX_POWEROFF, "poweroff"); | ||
| 217 | pm_power_off = mx51_efikamx_power_off; | ||
| 218 | |||
| 219 | /* enable coincell charger. maybe need a small power driver ? */ | ||
| 220 | coincell = regulator_get(NULL, "coincell"); | ||
| 221 | if (!IS_ERR(coincell)) { | ||
| 222 | regulator_set_voltage(coincell, 3000000, 3000000); | ||
| 223 | regulator_enable(coincell); | ||
| 224 | } | ||
| 225 | |||
| 226 | regulator_has_full_constraints(); | ||
| 227 | |||
| 228 | return 0; | ||
| 229 | } | ||
| 230 | |||
| 231 | static void __init mx51_efikamx_init_late(void) | ||
| 232 | { | ||
| 233 | imx51_init_late(); | ||
| 234 | mx51_efikamx_power_init(); | ||
| 235 | } | ||
| 236 | |||
| 237 | static void __init mx51_efikamx_init(void) | ||
| 238 | { | ||
| 239 | imx51_soc_init(); | ||
| 240 | |||
| 241 | mxc_iomux_v3_setup_multiple_pads(mx51efikamx_pads, | ||
| 242 | ARRAY_SIZE(mx51efikamx_pads)); | ||
| 243 | efika_board_common_init(); | ||
| 244 | |||
| 245 | mx51_efikamx_board_id(); | ||
| 246 | |||
| 247 | /* on < 1.2 boards both SD controllers are used */ | ||
| 248 | if (system_rev < 0x12) { | ||
| 249 | imx51_add_sdhci_esdhc_imx(0, NULL); | ||
| 250 | imx51_add_sdhci_esdhc_imx(1, &sd_pdata); | ||
| 251 | mx51_efikamx_leds[2].default_trigger = "mmc1"; | ||
| 252 | } else | ||
| 253 | imx51_add_sdhci_esdhc_imx(0, &sd_pdata); | ||
| 254 | |||
| 255 | gpio_led_register_device(-1, &mx51_efikamx_leds_data); | ||
| 256 | imx_add_gpio_keys(&mx51_efikamx_powerkey_data); | ||
| 257 | |||
| 258 | if (system_rev == 0x11) { | ||
| 259 | gpio_request(EFIKAMX_RESET1_1, "reset"); | ||
| 260 | gpio_direction_output(EFIKAMX_RESET1_1, 1); | ||
| 261 | } else { | ||
| 262 | gpio_request(EFIKAMX_RESET, "reset"); | ||
| 263 | gpio_direction_output(EFIKAMX_RESET, 1); | ||
| 264 | } | ||
| 265 | |||
| 266 | /* | ||
| 267 | * enable wifi by default only on mx | ||
| 268 | * sb and mx have same wlan pin but the value to enable it are | ||
| 269 | * different :/ | ||
| 270 | */ | ||
| 271 | gpio_request(EFIKA_WLAN_EN, "wlan_en"); | ||
| 272 | gpio_direction_output(EFIKA_WLAN_EN, 0); | ||
| 273 | msleep(10); | ||
| 274 | |||
| 275 | gpio_request(EFIKA_WLAN_RESET, "wlan_rst"); | ||
| 276 | gpio_direction_output(EFIKA_WLAN_RESET, 0); | ||
| 277 | msleep(10); | ||
| 278 | gpio_set_value(EFIKA_WLAN_RESET, 1); | ||
| 279 | } | ||
| 280 | |||
| 281 | static void __init mx51_efikamx_timer_init(void) | ||
| 282 | { | ||
| 283 | mx51_clocks_init(32768, 24000000, 22579200, 24576000); | ||
| 284 | } | ||
| 285 | |||
| 286 | static struct sys_timer mx51_efikamx_timer = { | ||
| 287 | .init = mx51_efikamx_timer_init, | ||
| 288 | }; | ||
| 289 | |||
| 290 | MACHINE_START(MX51_EFIKAMX, "Genesi Efika MX (Smarttop)") | ||
| 291 | .atag_offset = 0x100, | ||
| 292 | .map_io = mx51_map_io, | ||
| 293 | .init_early = imx51_init_early, | ||
| 294 | .init_irq = mx51_init_irq, | ||
| 295 | .handle_irq = imx51_handle_irq, | ||
| 296 | .timer = &mx51_efikamx_timer, | ||
| 297 | .init_machine = mx51_efikamx_init, | ||
| 298 | .init_late = mx51_efikamx_init_late, | ||
| 299 | .restart = mx51_efikamx_restart, | ||
| 300 | MACHINE_END | ||
diff --git a/arch/arm/mach-imx/mach-mx51_efikasb.c b/arch/arm/mach-imx/mach-mx51_efikasb.c deleted file mode 100644 index fdbd181b97ef..000000000000 --- a/arch/arm/mach-imx/mach-mx51_efikasb.c +++ /dev/null | |||
| @@ -1,296 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) Arnaud Patard <arnaud.patard@rtp-net.org> | ||
| 3 | * | ||
| 4 | * based on code from the following | ||
| 5 | * Copyright 2009-2010 Freescale Semiconductor, Inc. All Rights Reserved. | ||
| 6 | * Copyright 2009-2010 Pegatron Corporation. All Rights Reserved. | ||
| 7 | * Copyright 2009-2010 Genesi USA, Inc. All Rights Reserved. | ||
| 8 | * | ||
| 9 | * The code contained herein is licensed under the GNU General Public | ||
| 10 | * License. You may obtain a copy of the GNU General Public License | ||
| 11 | * Version 2 or later at the following locations: | ||
| 12 | * | ||
| 13 | * http://www.opensource.org/licenses/gpl-license.html | ||
| 14 | * http://www.gnu.org/copyleft/gpl.html | ||
| 15 | */ | ||
| 16 | |||
| 17 | #include <linux/init.h> | ||
| 18 | #include <linux/platform_device.h> | ||
| 19 | #include <linux/i2c.h> | ||
| 20 | #include <linux/gpio.h> | ||
| 21 | #include <linux/leds.h> | ||
| 22 | #include <linux/input.h> | ||
| 23 | #include <linux/delay.h> | ||
| 24 | #include <linux/io.h> | ||
| 25 | #include <linux/spi/flash.h> | ||
| 26 | #include <linux/spi/spi.h> | ||
| 27 | #include <linux/mfd/mc13892.h> | ||
| 28 | #include <linux/regulator/machine.h> | ||
| 29 | #include <linux/regulator/consumer.h> | ||
| 30 | #include <linux/usb/otg.h> | ||
| 31 | #include <linux/usb/ulpi.h> | ||
| 32 | #include <mach/ulpi.h> | ||
| 33 | |||
| 34 | #include <mach/common.h> | ||
| 35 | #include <mach/hardware.h> | ||
| 36 | #include <mach/iomux-mx51.h> | ||
| 37 | |||
| 38 | #include <asm/setup.h> | ||
| 39 | #include <asm/system_info.h> | ||
| 40 | #include <asm/mach-types.h> | ||
| 41 | #include <asm/mach/arch.h> | ||
| 42 | #include <asm/mach/time.h> | ||
| 43 | |||
| 44 | #include "devices-imx51.h" | ||
| 45 | #include "efika.h" | ||
| 46 | |||
| 47 | #define EFIKASB_USBH2_STP IMX_GPIO_NR(2, 20) | ||
| 48 | #define EFIKASB_GREEN_LED IMX_GPIO_NR(1, 3) | ||
| 49 | #define EFIKASB_WHITE_LED IMX_GPIO_NR(2, 25) | ||
| 50 | #define EFIKASB_PCBID0 IMX_GPIO_NR(2, 28) | ||
| 51 | #define EFIKASB_PCBID1 IMX_GPIO_NR(2, 29) | ||
| 52 | #define EFIKASB_PWRKEY IMX_GPIO_NR(2, 31) | ||
| 53 | #define EFIKASB_LID IMX_GPIO_NR(3, 14) | ||
| 54 | #define EFIKASB_POWEROFF IMX_GPIO_NR(4, 13) | ||
| 55 | #define EFIKASB_RFKILL IMX_GPIO_NR(3, 1) | ||
| 56 | |||
| 57 | #define MX51_PAD_PWRKEY IOMUX_PAD(0x48c, 0x0f8, 1, 0x0, 0, PAD_CTL_PUS_100K_UP | PAD_CTL_PKE) | ||
| 58 | #define MX51_PAD_SD1_CD IOMUX_PAD(0x47c, 0x0e8, 1, __NA_, 0, MX51_ESDHC_PAD_CTRL) | ||
| 59 | |||
| 60 | static iomux_v3_cfg_t mx51efikasb_pads[] = { | ||
| 61 | /* USB HOST2 */ | ||
| 62 | MX51_PAD_EIM_D16__USBH2_DATA0, | ||
| 63 | MX51_PAD_EIM_D17__USBH2_DATA1, | ||
| 64 | MX51_PAD_EIM_D18__USBH2_DATA2, | ||
| 65 | MX51_PAD_EIM_D19__USBH2_DATA3, | ||
| 66 | MX51_PAD_EIM_D20__USBH2_DATA4, | ||
| 67 | MX51_PAD_EIM_D21__USBH2_DATA5, | ||
| 68 | MX51_PAD_EIM_D22__USBH2_DATA6, | ||
| 69 | MX51_PAD_EIM_D23__USBH2_DATA7, | ||
| 70 | MX51_PAD_EIM_A24__USBH2_CLK, | ||
| 71 | MX51_PAD_EIM_A25__USBH2_DIR, | ||
| 72 | MX51_PAD_EIM_A26__USBH2_STP, | ||
| 73 | MX51_PAD_EIM_A27__USBH2_NXT, | ||
| 74 | |||
| 75 | /* leds */ | ||
| 76 | MX51_PAD_EIM_CS0__GPIO2_25, | ||
| 77 | MX51_PAD_GPIO1_3__GPIO1_3, | ||
| 78 | |||
| 79 | /* pcb id */ | ||
| 80 | MX51_PAD_EIM_CS3__GPIO2_28, | ||
| 81 | MX51_PAD_EIM_CS4__GPIO2_29, | ||
| 82 | |||
| 83 | /* lid */ | ||
| 84 | MX51_PAD_CSI1_VSYNC__GPIO3_14, | ||
| 85 | |||
| 86 | /* power key*/ | ||
| 87 | MX51_PAD_PWRKEY, | ||
| 88 | |||
| 89 | /* wifi/bt button */ | ||
| 90 | MX51_PAD_DI1_PIN12__GPIO3_1, | ||
| 91 | |||
| 92 | /* power off */ | ||
| 93 | MX51_PAD_CSI2_VSYNC__GPIO4_13, | ||
| 94 | |||
| 95 | /* wdog reset */ | ||
| 96 | MX51_PAD_GPIO1_4__WDOG1_WDOG_B, | ||
| 97 | |||
| 98 | /* BT */ | ||
| 99 | MX51_PAD_EIM_A17__GPIO2_11, | ||
| 100 | |||
| 101 | MX51_PAD_SD1_CD, | ||
| 102 | }; | ||
| 103 | |||
| 104 | static int initialize_usbh2_port(struct platform_device *pdev) | ||
| 105 | { | ||
| 106 | iomux_v3_cfg_t usbh2stp = MX51_PAD_EIM_A26__USBH2_STP; | ||
| 107 | iomux_v3_cfg_t usbh2gpio = MX51_PAD_EIM_A26__GPIO2_20; | ||
| 108 | |||
| 109 | mxc_iomux_v3_setup_pad(usbh2gpio); | ||
| 110 | gpio_request(EFIKASB_USBH2_STP, "usbh2_stp"); | ||
| 111 | gpio_direction_output(EFIKASB_USBH2_STP, 0); | ||
| 112 | msleep(1); | ||
| 113 | gpio_set_value(EFIKASB_USBH2_STP, 1); | ||
| 114 | msleep(1); | ||
| 115 | |||
| 116 | gpio_free(EFIKASB_USBH2_STP); | ||
| 117 | mxc_iomux_v3_setup_pad(usbh2stp); | ||
| 118 | |||
| 119 | mdelay(10); | ||
| 120 | |||
| 121 | return mx51_initialize_usb_hw(pdev->id, MXC_EHCI_ITC_NO_THRESHOLD); | ||
| 122 | } | ||
| 123 | |||
| 124 | static struct mxc_usbh_platform_data usbh2_config __initdata = { | ||
| 125 | .init = initialize_usbh2_port, | ||
| 126 | .portsc = MXC_EHCI_MODE_ULPI, | ||
| 127 | }; | ||
| 128 | |||
| 129 | static void __init mx51_efikasb_usb(void) | ||
| 130 | { | ||
| 131 | usbh2_config.otg = imx_otg_ulpi_create(ULPI_OTG_DRVVBUS | | ||
| 132 | ULPI_OTG_DRVVBUS_EXT | ULPI_OTG_EXTVBUSIND); | ||
| 133 | if (usbh2_config.otg) | ||
| 134 | imx51_add_mxc_ehci_hs(2, &usbh2_config); | ||
| 135 | } | ||
| 136 | |||
| 137 | static const struct gpio_led mx51_efikasb_leds[] __initconst = { | ||
| 138 | { | ||
| 139 | .name = "efikasb:green", | ||
| 140 | .default_trigger = "default-on", | ||
| 141 | .gpio = EFIKASB_GREEN_LED, | ||
| 142 | .active_low = 1, | ||
| 143 | }, | ||
| 144 | { | ||
| 145 | .name = "efikasb:white", | ||
| 146 | .default_trigger = "caps", | ||
| 147 | .gpio = EFIKASB_WHITE_LED, | ||
| 148 | }, | ||
| 149 | }; | ||
| 150 | |||
| 151 | static const struct gpio_led_platform_data | ||
| 152 | mx51_efikasb_leds_data __initconst = { | ||
| 153 | .leds = mx51_efikasb_leds, | ||
| 154 | .num_leds = ARRAY_SIZE(mx51_efikasb_leds), | ||
| 155 | }; | ||
| 156 | |||
| 157 | static struct gpio_keys_button mx51_efikasb_keys[] = { | ||
| 158 | { | ||
| 159 | .code = KEY_POWER, | ||
| 160 | .gpio = EFIKASB_PWRKEY, | ||
| 161 | .type = EV_KEY, | ||
| 162 | .desc = "Power Button", | ||
| 163 | .wakeup = 1, | ||
| 164 | .active_low = 1, | ||
| 165 | }, | ||
| 166 | { | ||
| 167 | .code = SW_LID, | ||
| 168 | .gpio = EFIKASB_LID, | ||
| 169 | .type = EV_SW, | ||
| 170 | .desc = "Lid Switch", | ||
| 171 | .active_low = 1, | ||
| 172 | }, | ||
| 173 | { | ||
| 174 | .code = KEY_RFKILL, | ||
| 175 | .gpio = EFIKASB_RFKILL, | ||
| 176 | .type = EV_KEY, | ||
| 177 | .desc = "rfkill", | ||
| 178 | .active_low = 1, | ||
| 179 | }, | ||
| 180 | }; | ||
| 181 | |||
| 182 | static const struct gpio_keys_platform_data mx51_efikasb_keys_data __initconst = { | ||
| 183 | .buttons = mx51_efikasb_keys, | ||
| 184 | .nbuttons = ARRAY_SIZE(mx51_efikasb_keys), | ||
| 185 | }; | ||
| 186 | |||
| 187 | static struct esdhc_platform_data sd0_pdata = { | ||
| 188 | #define EFIKASB_SD1_CD IMX_GPIO_NR(2, 27) | ||
| 189 | .cd_gpio = EFIKASB_SD1_CD, | ||
| 190 | .cd_type = ESDHC_CD_GPIO, | ||
| 191 | .wp_type = ESDHC_WP_CONTROLLER, | ||
| 192 | }; | ||
| 193 | |||
| 194 | static struct esdhc_platform_data sd1_pdata = { | ||
| 195 | .cd_type = ESDHC_CD_CONTROLLER, | ||
| 196 | .wp_type = ESDHC_WP_CONTROLLER, | ||
| 197 | }; | ||
| 198 | |||
| 199 | static struct regulator *pwgt1, *pwgt2; | ||
| 200 | |||
| 201 | static void mx51_efikasb_power_off(void) | ||
| 202 | { | ||
| 203 | gpio_set_value(EFIKA_USB_PHY_RESET, 0); | ||
| 204 | |||
| 205 | if (!IS_ERR(pwgt1) && !IS_ERR(pwgt2)) { | ||
| 206 | regulator_disable(pwgt2); | ||
| 207 | regulator_disable(pwgt1); | ||
| 208 | } | ||
| 209 | gpio_direction_output(EFIKASB_POWEROFF, 1); | ||
| 210 | } | ||
| 211 | |||
| 212 | static int __init mx51_efikasb_power_init(void) | ||
| 213 | { | ||
| 214 | pwgt1 = regulator_get(NULL, "pwgt1"); | ||
| 215 | pwgt2 = regulator_get(NULL, "pwgt2"); | ||
| 216 | if (!IS_ERR(pwgt1) && !IS_ERR(pwgt2)) { | ||
| 217 | regulator_enable(pwgt1); | ||
| 218 | regulator_enable(pwgt2); | ||
| 219 | } | ||
| 220 | gpio_request(EFIKASB_POWEROFF, "poweroff"); | ||
| 221 | pm_power_off = mx51_efikasb_power_off; | ||
| 222 | |||
| 223 | regulator_has_full_constraints(); | ||
| 224 | |||
| 225 | return 0; | ||
| 226 | } | ||
| 227 | |||
| 228 | static void __init mx51_efikasb_init_late(void) | ||
| 229 | { | ||
| 230 | imx51_init_late(); | ||
| 231 | mx51_efikasb_power_init(); | ||
| 232 | } | ||
| 233 | |||
| 234 | /* 01 R1.3 board | ||
| 235 | 10 R2.0 board */ | ||
| 236 | static void __init mx51_efikasb_board_id(void) | ||
| 237 | { | ||
| 238 | int id; | ||
| 239 | |||
| 240 | gpio_request(EFIKASB_PCBID0, "pcb id0"); | ||
| 241 | gpio_direction_input(EFIKASB_PCBID0); | ||
| 242 | gpio_request(EFIKASB_PCBID1, "pcb id1"); | ||
| 243 | gpio_direction_input(EFIKASB_PCBID1); | ||
| 244 | |||
| 245 | id = gpio_get_value(EFIKASB_PCBID0) ? 1 : 0; | ||
| 246 | id |= (gpio_get_value(EFIKASB_PCBID1) ? 1 : 0) << 1; | ||
| 247 | |||
| 248 | switch (id) { | ||
| 249 | default: | ||
| 250 | break; | ||
| 251 | case 1: | ||
| 252 | system_rev = 0x13; | ||
| 253 | break; | ||
| 254 | case 2: | ||
| 255 | system_rev = 0x20; | ||
| 256 | break; | ||
| 257 | } | ||
| 258 | } | ||
| 259 | |||
| 260 | static void __init efikasb_board_init(void) | ||
| 261 | { | ||
| 262 | imx51_soc_init(); | ||
| 263 | |||
| 264 | mxc_iomux_v3_setup_multiple_pads(mx51efikasb_pads, | ||
| 265 | ARRAY_SIZE(mx51efikasb_pads)); | ||
| 266 | efika_board_common_init(); | ||
| 267 | |||
| 268 | mx51_efikasb_board_id(); | ||
| 269 | mx51_efikasb_usb(); | ||
| 270 | imx51_add_sdhci_esdhc_imx(0, &sd0_pdata); | ||
| 271 | imx51_add_sdhci_esdhc_imx(1, &sd1_pdata); | ||
| 272 | |||
| 273 | gpio_led_register_device(-1, &mx51_efikasb_leds_data); | ||
| 274 | imx_add_gpio_keys(&mx51_efikasb_keys_data); | ||
| 275 | } | ||
| 276 | |||
| 277 | static void __init mx51_efikasb_timer_init(void) | ||
| 278 | { | ||
| 279 | mx51_clocks_init(32768, 24000000, 22579200, 24576000); | ||
| 280 | } | ||
| 281 | |||
| 282 | static struct sys_timer mx51_efikasb_timer = { | ||
| 283 | .init = mx51_efikasb_timer_init, | ||
| 284 | }; | ||
| 285 | |||
| 286 | MACHINE_START(MX51_EFIKASB, "Genesi Efika MX (Smartbook)") | ||
| 287 | .atag_offset = 0x100, | ||
| 288 | .map_io = mx51_map_io, | ||
| 289 | .init_early = imx51_init_early, | ||
| 290 | .init_irq = mx51_init_irq, | ||
| 291 | .handle_irq = imx51_handle_irq, | ||
| 292 | .init_machine = efikasb_board_init, | ||
| 293 | .init_late = mx51_efikasb_init_late, | ||
| 294 | .timer = &mx51_efikasb_timer, | ||
| 295 | .restart = mxc_restart, | ||
| 296 | MACHINE_END | ||
diff --git a/arch/arm/mach-imx/mach-mx53_ard.c b/arch/arm/mach-imx/mach-mx53_ard.c deleted file mode 100644 index 6c28e65f424d..000000000000 --- a/arch/arm/mach-imx/mach-mx53_ard.c +++ /dev/null | |||
| @@ -1,272 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2011 Freescale Semiconductor, Inc. All Rights Reserved. | ||
| 3 | */ | ||
| 4 | |||
| 5 | /* | ||
| 6 | * This program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License as published by | ||
| 8 | * the Free Software Foundation; either version 2 of the License, or | ||
| 9 | * (at your option) any later version. | ||
| 10 | |||
| 11 | * This program is distributed in the hope that it will be useful, | ||
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | * GNU General Public License for more details. | ||
| 15 | |||
| 16 | * You should have received a copy of the GNU General Public License along | ||
| 17 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
| 18 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
| 19 | */ | ||
| 20 | |||
| 21 | #include <linux/init.h> | ||
| 22 | #include <linux/clk.h> | ||
| 23 | #include <linux/delay.h> | ||
| 24 | #include <linux/gpio.h> | ||
| 25 | #include <linux/smsc911x.h> | ||
| 26 | #include <linux/regulator/machine.h> | ||
| 27 | #include <linux/regulator/fixed.h> | ||
| 28 | |||
| 29 | #include <mach/common.h> | ||
| 30 | #include <mach/hardware.h> | ||
| 31 | #include <mach/iomux-mx53.h> | ||
| 32 | |||
| 33 | #include <asm/mach-types.h> | ||
| 34 | #include <asm/mach/arch.h> | ||
| 35 | #include <asm/mach/time.h> | ||
| 36 | |||
| 37 | #include "devices-imx53.h" | ||
| 38 | |||
| 39 | #define ARD_ETHERNET_INT_B IMX_GPIO_NR(2, 31) | ||
| 40 | #define ARD_SD1_CD IMX_GPIO_NR(1, 1) | ||
| 41 | #define ARD_SD1_WP IMX_GPIO_NR(1, 9) | ||
| 42 | #define ARD_I2CPORTEXP_B IMX_GPIO_NR(2, 3) | ||
| 43 | #define ARD_VOLUMEDOWN IMX_GPIO_NR(4, 0) | ||
| 44 | #define ARD_HOME IMX_GPIO_NR(5, 10) | ||
| 45 | #define ARD_BACK IMX_GPIO_NR(5, 11) | ||
| 46 | #define ARD_PROG IMX_GPIO_NR(5, 12) | ||
| 47 | #define ARD_VOLUMEUP IMX_GPIO_NR(5, 13) | ||
| 48 | |||
| 49 | static iomux_v3_cfg_t mx53_ard_pads[] = { | ||
| 50 | /* UART1 */ | ||
| 51 | MX53_PAD_PATA_DIOW__UART1_TXD_MUX, | ||
| 52 | MX53_PAD_PATA_DMACK__UART1_RXD_MUX, | ||
| 53 | /* WEIM for CS1 */ | ||
| 54 | MX53_PAD_EIM_EB3__GPIO2_31, /* ETHERNET_INT_B */ | ||
| 55 | MX53_PAD_EIM_D16__EMI_WEIM_D_16, | ||
| 56 | MX53_PAD_EIM_D17__EMI_WEIM_D_17, | ||
| 57 | MX53_PAD_EIM_D18__EMI_WEIM_D_18, | ||
| 58 | MX53_PAD_EIM_D19__EMI_WEIM_D_19, | ||
| 59 | MX53_PAD_EIM_D20__EMI_WEIM_D_20, | ||
| 60 | MX53_PAD_EIM_D21__EMI_WEIM_D_21, | ||
| 61 | MX53_PAD_EIM_D22__EMI_WEIM_D_22, | ||
| 62 | MX53_PAD_EIM_D23__EMI_WEIM_D_23, | ||
| 63 | MX53_PAD_EIM_D24__EMI_WEIM_D_24, | ||
| 64 | MX53_PAD_EIM_D25__EMI_WEIM_D_25, | ||
| 65 | MX53_PAD_EIM_D26__EMI_WEIM_D_26, | ||
| 66 | MX53_PAD_EIM_D27__EMI_WEIM_D_27, | ||
| 67 | MX53_PAD_EIM_D28__EMI_WEIM_D_28, | ||
| 68 | MX53_PAD_EIM_D29__EMI_WEIM_D_29, | ||
| 69 | MX53_PAD_EIM_D30__EMI_WEIM_D_30, | ||
| 70 | MX53_PAD_EIM_D31__EMI_WEIM_D_31, | ||
| 71 | MX53_PAD_EIM_DA0__EMI_NAND_WEIM_DA_0, | ||
| 72 | MX53_PAD_EIM_DA1__EMI_NAND_WEIM_DA_1, | ||
| 73 | MX53_PAD_EIM_DA2__EMI_NAND_WEIM_DA_2, | ||
| 74 | MX53_PAD_EIM_DA3__EMI_NAND_WEIM_DA_3, | ||
| 75 | MX53_PAD_EIM_DA4__EMI_NAND_WEIM_DA_4, | ||
| 76 | MX53_PAD_EIM_DA5__EMI_NAND_WEIM_DA_5, | ||
| 77 | MX53_PAD_EIM_DA6__EMI_NAND_WEIM_DA_6, | ||
| 78 | MX53_PAD_EIM_OE__EMI_WEIM_OE, | ||
| 79 | MX53_PAD_EIM_RW__EMI_WEIM_RW, | ||
| 80 | MX53_PAD_EIM_CS1__EMI_WEIM_CS_1, | ||
| 81 | /* SDHC1 */ | ||
| 82 | MX53_PAD_SD1_CMD__ESDHC1_CMD, | ||
| 83 | MX53_PAD_SD1_CLK__ESDHC1_CLK, | ||
| 84 | MX53_PAD_SD1_DATA0__ESDHC1_DAT0, | ||
| 85 | MX53_PAD_SD1_DATA1__ESDHC1_DAT1, | ||
| 86 | MX53_PAD_SD1_DATA2__ESDHC1_DAT2, | ||
| 87 | MX53_PAD_SD1_DATA3__ESDHC1_DAT3, | ||
| 88 | MX53_PAD_PATA_DATA8__ESDHC1_DAT4, | ||
| 89 | MX53_PAD_PATA_DATA9__ESDHC1_DAT5, | ||
| 90 | MX53_PAD_PATA_DATA10__ESDHC1_DAT6, | ||
| 91 | MX53_PAD_PATA_DATA11__ESDHC1_DAT7, | ||
| 92 | MX53_PAD_GPIO_1__GPIO1_1, | ||
| 93 | MX53_PAD_GPIO_9__GPIO1_9, | ||
| 94 | /* I2C2 */ | ||
| 95 | MX53_PAD_EIM_EB2__I2C2_SCL, | ||
| 96 | MX53_PAD_KEY_ROW3__I2C2_SDA, | ||
| 97 | /* I2C3 */ | ||
| 98 | MX53_PAD_GPIO_3__I2C3_SCL, | ||
| 99 | MX53_PAD_GPIO_16__I2C3_SDA, | ||
| 100 | /* GPIO */ | ||
| 101 | MX53_PAD_DISP0_DAT16__GPIO5_10, /* home */ | ||
| 102 | MX53_PAD_DISP0_DAT17__GPIO5_11, /* back */ | ||
| 103 | MX53_PAD_DISP0_DAT18__GPIO5_12, /* prog */ | ||
| 104 | MX53_PAD_DISP0_DAT19__GPIO5_13, /* vol up */ | ||
| 105 | MX53_PAD_GPIO_10__GPIO4_0, /* vol down */ | ||
| 106 | }; | ||
| 107 | |||
| 108 | #define GPIO_BUTTON(gpio_num, ev_code, act_low, descr, wake) \ | ||
| 109 | { \ | ||
| 110 | .gpio = gpio_num, \ | ||
| 111 | .type = EV_KEY, \ | ||
| 112 | .code = ev_code, \ | ||
| 113 | .active_low = act_low, \ | ||
| 114 | .desc = "btn " descr, \ | ||
| 115 | .wakeup = wake, \ | ||
| 116 | } | ||
| 117 | |||
| 118 | static struct gpio_keys_button ard_buttons[] = { | ||
| 119 | GPIO_BUTTON(ARD_HOME, KEY_HOME, 1, "home", 0), | ||
| 120 | GPIO_BUTTON(ARD_BACK, KEY_BACK, 1, "back", 0), | ||
| 121 | GPIO_BUTTON(ARD_PROG, KEY_PROGRAM, 1, "program", 0), | ||
| 122 | GPIO_BUTTON(ARD_VOLUMEUP, KEY_VOLUMEUP, 1, "volume-up", 0), | ||
| 123 | GPIO_BUTTON(ARD_VOLUMEDOWN, KEY_VOLUMEDOWN, 1, "volume-down", 0), | ||
| 124 | }; | ||
| 125 | |||
| 126 | static const struct gpio_keys_platform_data ard_button_data __initconst = { | ||
| 127 | .buttons = ard_buttons, | ||
| 128 | .nbuttons = ARRAY_SIZE(ard_buttons), | ||
| 129 | }; | ||
| 130 | |||
| 131 | static struct resource ard_smsc911x_resources[] = { | ||
| 132 | { | ||
| 133 | .start = MX53_CS1_64MB_BASE_ADDR, | ||
| 134 | .end = MX53_CS1_64MB_BASE_ADDR + SZ_32M - 1, | ||
| 135 | .flags = IORESOURCE_MEM, | ||
| 136 | }, | ||
| 137 | { | ||
| 138 | /* irq number is run-time assigned */ | ||
| 139 | .flags = IORESOURCE_IRQ, | ||
| 140 | }, | ||
| 141 | }; | ||
| 142 | |||
| 143 | struct smsc911x_platform_config ard_smsc911x_config = { | ||
| 144 | .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW, | ||
| 145 | .irq_type = SMSC911X_IRQ_TYPE_PUSH_PULL, | ||
| 146 | .flags = SMSC911X_USE_32BIT, | ||
| 147 | }; | ||
| 148 | |||
| 149 | static struct platform_device ard_smsc_lan9220_device = { | ||
| 150 | .name = "smsc911x", | ||
| 151 | .id = -1, | ||
| 152 | .num_resources = ARRAY_SIZE(ard_smsc911x_resources), | ||
| 153 | .resource = ard_smsc911x_resources, | ||
| 154 | .dev = { | ||
| 155 | .platform_data = &ard_smsc911x_config, | ||
| 156 | }, | ||
| 157 | }; | ||
| 158 | |||
| 159 | static const struct esdhc_platform_data mx53_ard_sd1_data __initconst = { | ||
| 160 | .cd_gpio = ARD_SD1_CD, | ||
| 161 | .wp_gpio = ARD_SD1_WP, | ||
| 162 | }; | ||
| 163 | |||
| 164 | static struct imxi2c_platform_data mx53_ard_i2c2_data = { | ||
| 165 | .bitrate = 50000, | ||
| 166 | }; | ||
| 167 | |||
| 168 | static struct imxi2c_platform_data mx53_ard_i2c3_data = { | ||
| 169 | .bitrate = 400000, | ||
| 170 | }; | ||
| 171 | |||
| 172 | static void __init mx53_ard_io_init(void) | ||
| 173 | { | ||
| 174 | gpio_request(ARD_ETHERNET_INT_B, "eth-int-b"); | ||
| 175 | gpio_direction_input(ARD_ETHERNET_INT_B); | ||
| 176 | |||
| 177 | gpio_request(ARD_I2CPORTEXP_B, "i2cptexp-rst"); | ||
| 178 | gpio_direction_output(ARD_I2CPORTEXP_B, 1); | ||
| 179 | } | ||
| 180 | |||
| 181 | /* Config CS1 settings for ethernet controller */ | ||
| 182 | static int weim_cs_config(void) | ||
| 183 | { | ||
| 184 | u32 reg; | ||
| 185 | void __iomem *weim_base, *iomuxc_base; | ||
| 186 | |||
| 187 | weim_base = ioremap(MX53_WEIM_BASE_ADDR, SZ_4K); | ||
| 188 | if (!weim_base) | ||
| 189 | return -ENOMEM; | ||
| 190 | |||
| 191 | iomuxc_base = ioremap(MX53_IOMUXC_BASE_ADDR, SZ_4K); | ||
| 192 | if (!iomuxc_base) { | ||
| 193 | iounmap(weim_base); | ||
| 194 | return -ENOMEM; | ||
| 195 | } | ||
| 196 | |||
| 197 | /* CS1 timings for LAN9220 */ | ||
| 198 | writel(0x20001, (weim_base + 0x18)); | ||
| 199 | writel(0x0, (weim_base + 0x1C)); | ||
| 200 | writel(0x16000202, (weim_base + 0x20)); | ||
| 201 | writel(0x00000002, (weim_base + 0x24)); | ||
| 202 | writel(0x16002082, (weim_base + 0x28)); | ||
| 203 | writel(0x00000000, (weim_base + 0x2C)); | ||
| 204 | writel(0x00000000, (weim_base + 0x90)); | ||
| 205 | |||
| 206 | /* specify 64 MB on CS1 and CS0 on GPR1 */ | ||
| 207 | reg = readl(iomuxc_base + 0x4); | ||
| 208 | reg &= ~0x3F; | ||
| 209 | reg |= 0x1B; | ||
| 210 | writel(reg, (iomuxc_base + 0x4)); | ||
| 211 | |||
| 212 | iounmap(iomuxc_base); | ||
| 213 | iounmap(weim_base); | ||
| 214 | |||
| 215 | return 0; | ||
| 216 | } | ||
| 217 | |||
| 218 | static struct regulator_consumer_supply dummy_supplies[] = { | ||
| 219 | REGULATOR_SUPPLY("vdd33a", "smsc911x"), | ||
| 220 | REGULATOR_SUPPLY("vddvario", "smsc911x"), | ||
| 221 | }; | ||
| 222 | |||
| 223 | void __init imx53_ard_common_init(void) | ||
| 224 | { | ||
| 225 | mxc_iomux_v3_setup_multiple_pads(mx53_ard_pads, | ||
| 226 | ARRAY_SIZE(mx53_ard_pads)); | ||
| 227 | weim_cs_config(); | ||
| 228 | } | ||
| 229 | |||
| 230 | static struct platform_device *devices[] __initdata = { | ||
| 231 | &ard_smsc_lan9220_device, | ||
| 232 | }; | ||
| 233 | |||
| 234 | static void __init mx53_ard_board_init(void) | ||
| 235 | { | ||
| 236 | imx53_soc_init(); | ||
| 237 | imx53_add_imx_uart(0, NULL); | ||
| 238 | |||
| 239 | imx53_ard_common_init(); | ||
| 240 | mx53_ard_io_init(); | ||
| 241 | regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies)); | ||
| 242 | ard_smsc911x_resources[1].start = gpio_to_irq(ARD_ETHERNET_INT_B); | ||
| 243 | ard_smsc911x_resources[1].end = gpio_to_irq(ARD_ETHERNET_INT_B); | ||
| 244 | platform_add_devices(devices, ARRAY_SIZE(devices)); | ||
| 245 | |||
| 246 | imx53_add_sdhci_esdhc_imx(0, &mx53_ard_sd1_data); | ||
| 247 | imx53_add_imx2_wdt(0); | ||
| 248 | imx53_add_imx_i2c(1, &mx53_ard_i2c2_data); | ||
| 249 | imx53_add_imx_i2c(2, &mx53_ard_i2c3_data); | ||
| 250 | imx_add_gpio_keys(&ard_button_data); | ||
| 251 | imx53_add_ahci_imx(); | ||
| 252 | } | ||
| 253 | |||
| 254 | static void __init mx53_ard_timer_init(void) | ||
| 255 | { | ||
| 256 | mx53_clocks_init(32768, 24000000, 22579200, 0); | ||
| 257 | } | ||
| 258 | |||
| 259 | static struct sys_timer mx53_ard_timer = { | ||
| 260 | .init = mx53_ard_timer_init, | ||
| 261 | }; | ||
| 262 | |||
| 263 | MACHINE_START(MX53_ARD, "Freescale MX53 ARD Board") | ||
| 264 | .map_io = mx53_map_io, | ||
| 265 | .init_early = imx53_init_early, | ||
| 266 | .init_irq = mx53_init_irq, | ||
| 267 | .handle_irq = imx53_handle_irq, | ||
| 268 | .timer = &mx53_ard_timer, | ||
| 269 | .init_machine = mx53_ard_board_init, | ||
| 270 | .init_late = imx53_init_late, | ||
| 271 | .restart = mxc_restart, | ||
| 272 | MACHINE_END | ||
diff --git a/arch/arm/mach-imx/mach-mx53_evk.c b/arch/arm/mach-imx/mach-mx53_evk.c deleted file mode 100644 index 09fe2197b491..000000000000 --- a/arch/arm/mach-imx/mach-mx53_evk.c +++ /dev/null | |||
| @@ -1,179 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2010-2011 Freescale Semiconductor, Inc. All Rights Reserved. | ||
| 3 | * Copyright (C) 2010 Yong Shen. <Yong.Shen@linaro.org> | ||
| 4 | */ | ||
| 5 | |||
| 6 | /* | ||
| 7 | * This program is free software; you can redistribute it and/or modify | ||
| 8 | * it under the terms of the GNU General Public License as published by | ||
| 9 | * the Free Software Foundation; either version 2 of the License, or | ||
| 10 | * (at your option) any later version. | ||
| 11 | |||
| 12 | * This program is distributed in the hope that it will be useful, | ||
| 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 15 | * GNU General Public License for more details. | ||
| 16 | |||
| 17 | * You should have received a copy of the GNU General Public License along | ||
| 18 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
| 19 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
| 20 | */ | ||
| 21 | |||
| 22 | #include <linux/init.h> | ||
| 23 | #include <linux/clk.h> | ||
| 24 | #include <linux/delay.h> | ||
| 25 | #include <linux/gpio.h> | ||
| 26 | #include <linux/spi/flash.h> | ||
| 27 | #include <linux/spi/spi.h> | ||
| 28 | #include <mach/common.h> | ||
| 29 | #include <mach/hardware.h> | ||
| 30 | #include <asm/mach-types.h> | ||
| 31 | #include <asm/mach/arch.h> | ||
| 32 | #include <asm/mach/time.h> | ||
| 33 | #include <mach/iomux-mx53.h> | ||
| 34 | |||
| 35 | #define MX53_EVK_FEC_PHY_RST IMX_GPIO_NR(7, 6) | ||
| 36 | #define EVK_ECSPI1_CS0 IMX_GPIO_NR(2, 30) | ||
| 37 | #define EVK_ECSPI1_CS1 IMX_GPIO_NR(3, 19) | ||
| 38 | #define MX53EVK_LED IMX_GPIO_NR(7, 7) | ||
| 39 | |||
| 40 | #include "devices-imx53.h" | ||
| 41 | |||
| 42 | static iomux_v3_cfg_t mx53_evk_pads[] = { | ||
| 43 | MX53_PAD_CSI0_DAT10__UART1_TXD_MUX, | ||
| 44 | MX53_PAD_CSI0_DAT11__UART1_RXD_MUX, | ||
| 45 | |||
| 46 | MX53_PAD_PATA_BUFFER_EN__UART2_RXD_MUX, | ||
| 47 | MX53_PAD_PATA_DMARQ__UART2_TXD_MUX, | ||
| 48 | MX53_PAD_PATA_DIOR__UART2_RTS, | ||
| 49 | MX53_PAD_PATA_INTRQ__UART2_CTS, | ||
| 50 | |||
| 51 | MX53_PAD_PATA_CS_0__UART3_TXD_MUX, | ||
| 52 | MX53_PAD_PATA_CS_1__UART3_RXD_MUX, | ||
| 53 | |||
| 54 | MX53_PAD_EIM_D16__ECSPI1_SCLK, | ||
| 55 | MX53_PAD_EIM_D17__ECSPI1_MISO, | ||
| 56 | MX53_PAD_EIM_D18__ECSPI1_MOSI, | ||
| 57 | |||
| 58 | /* ecspi chip select lines */ | ||
| 59 | MX53_PAD_EIM_EB2__GPIO2_30, | ||
| 60 | MX53_PAD_EIM_D19__GPIO3_19, | ||
| 61 | /* LED */ | ||
| 62 | MX53_PAD_PATA_DA_1__GPIO7_7, | ||
| 63 | }; | ||
| 64 | |||
| 65 | static const struct imxuart_platform_data mx53_evk_uart_pdata __initconst = { | ||
| 66 | .flags = IMXUART_HAVE_RTSCTS, | ||
| 67 | }; | ||
| 68 | |||
| 69 | static const struct gpio_led mx53evk_leds[] __initconst = { | ||
| 70 | { | ||
| 71 | .name = "green", | ||
| 72 | .default_trigger = "heartbeat", | ||
| 73 | .gpio = MX53EVK_LED, | ||
| 74 | }, | ||
| 75 | }; | ||
| 76 | |||
| 77 | static const struct gpio_led_platform_data mx53evk_leds_data __initconst = { | ||
| 78 | .leds = mx53evk_leds, | ||
| 79 | .num_leds = ARRAY_SIZE(mx53evk_leds), | ||
| 80 | }; | ||
| 81 | |||
| 82 | static inline void mx53_evk_init_uart(void) | ||
| 83 | { | ||
| 84 | imx53_add_imx_uart(0, NULL); | ||
| 85 | imx53_add_imx_uart(1, &mx53_evk_uart_pdata); | ||
| 86 | imx53_add_imx_uart(2, NULL); | ||
| 87 | } | ||
| 88 | |||
| 89 | static const struct imxi2c_platform_data mx53_evk_i2c_data __initconst = { | ||
| 90 | .bitrate = 100000, | ||
| 91 | }; | ||
| 92 | |||
| 93 | static inline void mx53_evk_fec_reset(void) | ||
| 94 | { | ||
| 95 | int ret; | ||
| 96 | |||
| 97 | /* reset FEC PHY */ | ||
| 98 | ret = gpio_request_one(MX53_EVK_FEC_PHY_RST, GPIOF_OUT_INIT_LOW, | ||
| 99 | "fec-phy-reset"); | ||
| 100 | if (ret) { | ||
| 101 | printk(KERN_ERR"failed to get GPIO_FEC_PHY_RESET: %d\n", ret); | ||
| 102 | return; | ||
| 103 | } | ||
| 104 | msleep(1); | ||
| 105 | gpio_set_value(MX53_EVK_FEC_PHY_RST, 1); | ||
| 106 | } | ||
| 107 | |||
| 108 | static const struct fec_platform_data mx53_evk_fec_pdata __initconst = { | ||
| 109 | .phy = PHY_INTERFACE_MODE_RMII, | ||
| 110 | }; | ||
| 111 | |||
| 112 | static struct spi_board_info mx53_evk_spi_board_info[] __initdata = { | ||
| 113 | { | ||
| 114 | .modalias = "mtd_dataflash", | ||
| 115 | .max_speed_hz = 25000000, | ||
| 116 | .bus_num = 0, | ||
| 117 | .chip_select = 1, | ||
| 118 | .mode = SPI_MODE_0, | ||
| 119 | .platform_data = NULL, | ||
| 120 | }, | ||
| 121 | }; | ||
| 122 | |||
| 123 | static int mx53_evk_spi_cs[] = { | ||
| 124 | EVK_ECSPI1_CS0, | ||
| 125 | EVK_ECSPI1_CS1, | ||
| 126 | }; | ||
| 127 | |||
| 128 | static const struct spi_imx_master mx53_evk_spi_data __initconst = { | ||
| 129 | .chipselect = mx53_evk_spi_cs, | ||
| 130 | .num_chipselect = ARRAY_SIZE(mx53_evk_spi_cs), | ||
| 131 | }; | ||
| 132 | |||
| 133 | void __init imx53_evk_common_init(void) | ||
| 134 | { | ||
| 135 | mxc_iomux_v3_setup_multiple_pads(mx53_evk_pads, | ||
| 136 | ARRAY_SIZE(mx53_evk_pads)); | ||
| 137 | } | ||
| 138 | |||
| 139 | static void __init mx53_evk_board_init(void) | ||
| 140 | { | ||
| 141 | imx53_soc_init(); | ||
| 142 | imx53_evk_common_init(); | ||
| 143 | |||
| 144 | mx53_evk_init_uart(); | ||
| 145 | mx53_evk_fec_reset(); | ||
| 146 | imx53_add_fec(&mx53_evk_fec_pdata); | ||
| 147 | |||
| 148 | imx53_add_imx_i2c(0, &mx53_evk_i2c_data); | ||
| 149 | imx53_add_imx_i2c(1, &mx53_evk_i2c_data); | ||
| 150 | |||
| 151 | imx53_add_sdhci_esdhc_imx(0, NULL); | ||
| 152 | imx53_add_sdhci_esdhc_imx(1, NULL); | ||
| 153 | |||
| 154 | spi_register_board_info(mx53_evk_spi_board_info, | ||
| 155 | ARRAY_SIZE(mx53_evk_spi_board_info)); | ||
| 156 | imx53_add_ecspi(0, &mx53_evk_spi_data); | ||
| 157 | imx53_add_imx2_wdt(0); | ||
| 158 | gpio_led_register_device(-1, &mx53evk_leds_data); | ||
| 159 | } | ||
| 160 | |||
| 161 | static void __init mx53_evk_timer_init(void) | ||
| 162 | { | ||
| 163 | mx53_clocks_init(32768, 24000000, 22579200, 0); | ||
| 164 | } | ||
| 165 | |||
| 166 | static struct sys_timer mx53_evk_timer = { | ||
| 167 | .init = mx53_evk_timer_init, | ||
| 168 | }; | ||
| 169 | |||
| 170 | MACHINE_START(MX53_EVK, "Freescale MX53 EVK Board") | ||
| 171 | .map_io = mx53_map_io, | ||
| 172 | .init_early = imx53_init_early, | ||
| 173 | .init_irq = mx53_init_irq, | ||
| 174 | .handle_irq = imx53_handle_irq, | ||
| 175 | .timer = &mx53_evk_timer, | ||
| 176 | .init_machine = mx53_evk_board_init, | ||
| 177 | .init_late = imx53_init_late, | ||
| 178 | .restart = mxc_restart, | ||
| 179 | MACHINE_END | ||
diff --git a/arch/arm/mach-imx/mach-mx53_loco.c b/arch/arm/mach-imx/mach-mx53_loco.c deleted file mode 100644 index 8abe23c1d3c8..000000000000 --- a/arch/arm/mach-imx/mach-mx53_loco.c +++ /dev/null | |||
| @@ -1,321 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2011 Freescale Semiconductor, Inc. All Rights Reserved. | ||
| 3 | */ | ||
| 4 | |||
| 5 | /* | ||
| 6 | * This program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License as published by | ||
| 8 | * the Free Software Foundation; either version 2 of the License, or | ||
| 9 | * (at your option) any later version. | ||
| 10 | |||
| 11 | * This program is distributed in the hope that it will be useful, | ||
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | * GNU General Public License for more details. | ||
| 15 | |||
| 16 | * You should have received a copy of the GNU General Public License along | ||
| 17 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
| 18 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
| 19 | */ | ||
| 20 | |||
| 21 | #include <linux/init.h> | ||
| 22 | #include <linux/clk.h> | ||
| 23 | #include <linux/delay.h> | ||
| 24 | #include <linux/gpio.h> | ||
| 25 | #include <linux/i2c.h> | ||
| 26 | |||
| 27 | #include <mach/common.h> | ||
| 28 | #include <mach/hardware.h> | ||
| 29 | #include <mach/iomux-mx53.h> | ||
| 30 | |||
| 31 | #include <asm/mach-types.h> | ||
| 32 | #include <asm/mach/arch.h> | ||
| 33 | #include <asm/mach/time.h> | ||
| 34 | |||
| 35 | #include "devices-imx53.h" | ||
| 36 | |||
| 37 | #define MX53_LOCO_POWER IMX_GPIO_NR(1, 8) | ||
| 38 | #define MX53_LOCO_UI1 IMX_GPIO_NR(2, 14) | ||
| 39 | #define MX53_LOCO_UI2 IMX_GPIO_NR(2, 15) | ||
| 40 | #define LOCO_FEC_PHY_RST IMX_GPIO_NR(7, 6) | ||
| 41 | #define LOCO_LED IMX_GPIO_NR(7, 7) | ||
| 42 | #define LOCO_SD3_CD IMX_GPIO_NR(3, 11) | ||
| 43 | #define LOCO_SD3_WP IMX_GPIO_NR(3, 12) | ||
| 44 | #define LOCO_SD1_CD IMX_GPIO_NR(3, 13) | ||
| 45 | #define LOCO_ACCEL_EN IMX_GPIO_NR(6, 14) | ||
| 46 | |||
| 47 | static iomux_v3_cfg_t mx53_loco_pads[] = { | ||
| 48 | /* FEC */ | ||
| 49 | MX53_PAD_FEC_MDC__FEC_MDC, | ||
| 50 | MX53_PAD_FEC_MDIO__FEC_MDIO, | ||
| 51 | MX53_PAD_FEC_REF_CLK__FEC_TX_CLK, | ||
| 52 | MX53_PAD_FEC_RX_ER__FEC_RX_ER, | ||
| 53 | MX53_PAD_FEC_CRS_DV__FEC_RX_DV, | ||
| 54 | MX53_PAD_FEC_RXD1__FEC_RDATA_1, | ||
| 55 | MX53_PAD_FEC_RXD0__FEC_RDATA_0, | ||
| 56 | MX53_PAD_FEC_TX_EN__FEC_TX_EN, | ||
| 57 | MX53_PAD_FEC_TXD1__FEC_TDATA_1, | ||
| 58 | MX53_PAD_FEC_TXD0__FEC_TDATA_0, | ||
| 59 | /* FEC_nRST */ | ||
| 60 | MX53_PAD_PATA_DA_0__GPIO7_6, | ||
| 61 | /* FEC_nINT */ | ||
| 62 | MX53_PAD_PATA_DATA4__GPIO2_4, | ||
| 63 | /* AUDMUX5 */ | ||
| 64 | MX53_PAD_KEY_COL0__AUDMUX_AUD5_TXC, | ||
| 65 | MX53_PAD_KEY_ROW0__AUDMUX_AUD5_TXD, | ||
| 66 | MX53_PAD_KEY_COL1__AUDMUX_AUD5_TXFS, | ||
| 67 | MX53_PAD_KEY_ROW1__AUDMUX_AUD5_RXD, | ||
| 68 | /* I2C1 */ | ||
| 69 | MX53_PAD_CSI0_DAT8__I2C1_SDA, | ||
| 70 | MX53_PAD_CSI0_DAT9__I2C1_SCL, | ||
| 71 | MX53_PAD_NANDF_CS1__GPIO6_14, /* Accelerometer Enable */ | ||
| 72 | /* I2C2 */ | ||
| 73 | MX53_PAD_KEY_COL3__I2C2_SCL, | ||
| 74 | MX53_PAD_KEY_ROW3__I2C2_SDA, | ||
| 75 | /* SD1 */ | ||
| 76 | MX53_PAD_SD1_CMD__ESDHC1_CMD, | ||
| 77 | MX53_PAD_SD1_CLK__ESDHC1_CLK, | ||
| 78 | MX53_PAD_SD1_DATA0__ESDHC1_DAT0, | ||
| 79 | MX53_PAD_SD1_DATA1__ESDHC1_DAT1, | ||
| 80 | MX53_PAD_SD1_DATA2__ESDHC1_DAT2, | ||
| 81 | MX53_PAD_SD1_DATA3__ESDHC1_DAT3, | ||
| 82 | /* SD1_CD */ | ||
| 83 | MX53_PAD_EIM_DA13__GPIO3_13, | ||
| 84 | /* SD3 */ | ||
| 85 | MX53_PAD_PATA_DATA8__ESDHC3_DAT0, | ||
| 86 | MX53_PAD_PATA_DATA9__ESDHC3_DAT1, | ||
| 87 | MX53_PAD_PATA_DATA10__ESDHC3_DAT2, | ||
| 88 | MX53_PAD_PATA_DATA11__ESDHC3_DAT3, | ||
| 89 | MX53_PAD_PATA_DATA0__ESDHC3_DAT4, | ||
| 90 | MX53_PAD_PATA_DATA1__ESDHC3_DAT5, | ||
| 91 | MX53_PAD_PATA_DATA2__ESDHC3_DAT6, | ||
| 92 | MX53_PAD_PATA_DATA3__ESDHC3_DAT7, | ||
| 93 | MX53_PAD_PATA_IORDY__ESDHC3_CLK, | ||
| 94 | MX53_PAD_PATA_RESET_B__ESDHC3_CMD, | ||
| 95 | /* SD3_CD */ | ||
| 96 | MX53_PAD_EIM_DA11__GPIO3_11, | ||
| 97 | /* SD3_WP */ | ||
| 98 | MX53_PAD_EIM_DA12__GPIO3_12, | ||
| 99 | /* VGA */ | ||
| 100 | MX53_PAD_EIM_OE__IPU_DI1_PIN7, | ||
| 101 | MX53_PAD_EIM_RW__IPU_DI1_PIN8, | ||
| 102 | /* DISPLB */ | ||
| 103 | MX53_PAD_EIM_D20__IPU_SER_DISP0_CS, | ||
| 104 | MX53_PAD_EIM_D21__IPU_DISPB0_SER_CLK, | ||
| 105 | MX53_PAD_EIM_D22__IPU_DISPB0_SER_DIN, | ||
| 106 | MX53_PAD_EIM_D23__IPU_DI0_D0_CS, | ||
| 107 | /* DISP0_POWER_EN */ | ||
| 108 | MX53_PAD_EIM_D24__GPIO3_24, | ||
| 109 | /* DISP0 DET INT */ | ||
| 110 | MX53_PAD_EIM_D31__GPIO3_31, | ||
| 111 | /* LVDS */ | ||
| 112 | MX53_PAD_LVDS0_TX3_P__LDB_LVDS0_TX3, | ||
| 113 | MX53_PAD_LVDS0_CLK_P__LDB_LVDS0_CLK, | ||
| 114 | MX53_PAD_LVDS0_TX2_P__LDB_LVDS0_TX2, | ||
| 115 | MX53_PAD_LVDS0_TX1_P__LDB_LVDS0_TX1, | ||
| 116 | MX53_PAD_LVDS0_TX0_P__LDB_LVDS0_TX0, | ||
| 117 | MX53_PAD_LVDS1_TX3_P__LDB_LVDS1_TX3, | ||
| 118 | MX53_PAD_LVDS1_TX2_P__LDB_LVDS1_TX2, | ||
| 119 | MX53_PAD_LVDS1_CLK_P__LDB_LVDS1_CLK, | ||
| 120 | MX53_PAD_LVDS1_TX1_P__LDB_LVDS1_TX1, | ||
| 121 | MX53_PAD_LVDS1_TX0_P__LDB_LVDS1_TX0, | ||
| 122 | /* I2C1 */ | ||
| 123 | MX53_PAD_CSI0_DAT8__I2C1_SDA, | ||
| 124 | MX53_PAD_CSI0_DAT9__I2C1_SCL, | ||
| 125 | /* UART1 */ | ||
| 126 | MX53_PAD_CSI0_DAT10__UART1_TXD_MUX, | ||
| 127 | MX53_PAD_CSI0_DAT11__UART1_RXD_MUX, | ||
| 128 | /* CSI0 */ | ||
| 129 | MX53_PAD_CSI0_DAT12__IPU_CSI0_D_12, | ||
| 130 | MX53_PAD_CSI0_DAT13__IPU_CSI0_D_13, | ||
| 131 | MX53_PAD_CSI0_DAT14__IPU_CSI0_D_14, | ||
| 132 | MX53_PAD_CSI0_DAT15__IPU_CSI0_D_15, | ||
| 133 | MX53_PAD_CSI0_DAT16__IPU_CSI0_D_16, | ||
| 134 | MX53_PAD_CSI0_DAT17__IPU_CSI0_D_17, | ||
| 135 | MX53_PAD_CSI0_DAT18__IPU_CSI0_D_18, | ||
| 136 | MX53_PAD_CSI0_DAT19__IPU_CSI0_D_19, | ||
| 137 | MX53_PAD_CSI0_VSYNC__IPU_CSI0_VSYNC, | ||
| 138 | MX53_PAD_CSI0_MCLK__IPU_CSI0_HSYNC, | ||
| 139 | MX53_PAD_CSI0_PIXCLK__IPU_CSI0_PIXCLK, | ||
| 140 | /* DISPLAY */ | ||
| 141 | MX53_PAD_DI0_DISP_CLK__IPU_DI0_DISP_CLK, | ||
| 142 | MX53_PAD_DI0_PIN15__IPU_DI0_PIN15, | ||
| 143 | MX53_PAD_DI0_PIN2__IPU_DI0_PIN2, | ||
| 144 | MX53_PAD_DI0_PIN3__IPU_DI0_PIN3, | ||
| 145 | MX53_PAD_DISP0_DAT0__IPU_DISP0_DAT_0, | ||
| 146 | MX53_PAD_DISP0_DAT1__IPU_DISP0_DAT_1, | ||
| 147 | MX53_PAD_DISP0_DAT2__IPU_DISP0_DAT_2, | ||
| 148 | MX53_PAD_DISP0_DAT3__IPU_DISP0_DAT_3, | ||
| 149 | MX53_PAD_DISP0_DAT4__IPU_DISP0_DAT_4, | ||
| 150 | MX53_PAD_DISP0_DAT5__IPU_DISP0_DAT_5, | ||
| 151 | MX53_PAD_DISP0_DAT6__IPU_DISP0_DAT_6, | ||
| 152 | MX53_PAD_DISP0_DAT7__IPU_DISP0_DAT_7, | ||
| 153 | MX53_PAD_DISP0_DAT8__IPU_DISP0_DAT_8, | ||
| 154 | MX53_PAD_DISP0_DAT9__IPU_DISP0_DAT_9, | ||
| 155 | MX53_PAD_DISP0_DAT10__IPU_DISP0_DAT_10, | ||
| 156 | MX53_PAD_DISP0_DAT11__IPU_DISP0_DAT_11, | ||
| 157 | MX53_PAD_DISP0_DAT12__IPU_DISP0_DAT_12, | ||
| 158 | MX53_PAD_DISP0_DAT13__IPU_DISP0_DAT_13, | ||
| 159 | MX53_PAD_DISP0_DAT14__IPU_DISP0_DAT_14, | ||
| 160 | MX53_PAD_DISP0_DAT15__IPU_DISP0_DAT_15, | ||
| 161 | MX53_PAD_DISP0_DAT16__IPU_DISP0_DAT_16, | ||
| 162 | MX53_PAD_DISP0_DAT17__IPU_DISP0_DAT_17, | ||
| 163 | MX53_PAD_DISP0_DAT18__IPU_DISP0_DAT_18, | ||
| 164 | MX53_PAD_DISP0_DAT19__IPU_DISP0_DAT_19, | ||
| 165 | MX53_PAD_DISP0_DAT20__IPU_DISP0_DAT_20, | ||
| 166 | MX53_PAD_DISP0_DAT21__IPU_DISP0_DAT_21, | ||
| 167 | MX53_PAD_DISP0_DAT22__IPU_DISP0_DAT_22, | ||
| 168 | MX53_PAD_DISP0_DAT23__IPU_DISP0_DAT_23, | ||
| 169 | /* Audio CLK*/ | ||
| 170 | MX53_PAD_GPIO_0__CCM_SSI_EXT1_CLK, | ||
| 171 | /* PWM */ | ||
| 172 | MX53_PAD_GPIO_1__PWM2_PWMO, | ||
| 173 | /* SPDIF */ | ||
| 174 | MX53_PAD_GPIO_7__SPDIF_PLOCK, | ||
| 175 | MX53_PAD_GPIO_17__SPDIF_OUT1, | ||
| 176 | /* GPIO */ | ||
| 177 | MX53_PAD_PATA_DA_1__GPIO7_7, /* LED */ | ||
| 178 | MX53_PAD_PATA_DA_2__GPIO7_8, | ||
| 179 | MX53_PAD_PATA_DATA5__GPIO2_5, | ||
| 180 | MX53_PAD_PATA_DATA6__GPIO2_6, | ||
| 181 | MX53_PAD_PATA_DATA14__GPIO2_14, | ||
| 182 | MX53_PAD_PATA_DATA15__GPIO2_15, | ||
| 183 | MX53_PAD_PATA_INTRQ__GPIO7_2, | ||
| 184 | MX53_PAD_EIM_WAIT__GPIO5_0, | ||
| 185 | MX53_PAD_NANDF_WP_B__GPIO6_9, | ||
| 186 | MX53_PAD_NANDF_RB0__GPIO6_10, | ||
| 187 | MX53_PAD_NANDF_CS1__GPIO6_14, | ||
| 188 | MX53_PAD_NANDF_CS2__GPIO6_15, | ||
| 189 | MX53_PAD_NANDF_CS3__GPIO6_16, | ||
| 190 | MX53_PAD_GPIO_5__GPIO1_5, | ||
| 191 | MX53_PAD_GPIO_16__GPIO7_11, | ||
| 192 | MX53_PAD_GPIO_8__GPIO1_8, | ||
| 193 | }; | ||
| 194 | |||
| 195 | #define GPIO_BUTTON(gpio_num, ev_code, act_low, descr, wake) \ | ||
| 196 | { \ | ||
| 197 | .gpio = gpio_num, \ | ||
| 198 | .type = EV_KEY, \ | ||
| 199 | .code = ev_code, \ | ||
| 200 | .active_low = act_low, \ | ||
| 201 | .desc = "btn " descr, \ | ||
| 202 | .wakeup = wake, \ | ||
| 203 | } | ||
| 204 | |||
| 205 | static struct gpio_keys_button loco_buttons[] = { | ||
| 206 | GPIO_BUTTON(MX53_LOCO_POWER, KEY_POWER, 1, "power", 0), | ||
| 207 | GPIO_BUTTON(MX53_LOCO_UI1, KEY_VOLUMEUP, 1, "volume-up", 0), | ||
| 208 | GPIO_BUTTON(MX53_LOCO_UI2, KEY_VOLUMEDOWN, 1, "volume-down", 0), | ||
| 209 | }; | ||
| 210 | |||
| 211 | static const struct gpio_keys_platform_data loco_button_data __initconst = { | ||
| 212 | .buttons = loco_buttons, | ||
| 213 | .nbuttons = ARRAY_SIZE(loco_buttons), | ||
| 214 | }; | ||
| 215 | |||
| 216 | static const struct esdhc_platform_data mx53_loco_sd1_data __initconst = { | ||
| 217 | .cd_gpio = LOCO_SD1_CD, | ||
| 218 | .cd_type = ESDHC_CD_GPIO, | ||
| 219 | .wp_type = ESDHC_WP_NONE, | ||
| 220 | }; | ||
| 221 | |||
| 222 | static const struct esdhc_platform_data mx53_loco_sd3_data __initconst = { | ||
| 223 | .cd_gpio = LOCO_SD3_CD, | ||
| 224 | .wp_gpio = LOCO_SD3_WP, | ||
| 225 | .cd_type = ESDHC_CD_GPIO, | ||
| 226 | .wp_type = ESDHC_WP_GPIO, | ||
| 227 | }; | ||
| 228 | |||
| 229 | static inline void mx53_loco_fec_reset(void) | ||
| 230 | { | ||
| 231 | int ret; | ||
| 232 | |||
| 233 | /* reset FEC PHY */ | ||
| 234 | ret = gpio_request(LOCO_FEC_PHY_RST, "fec-phy-reset"); | ||
| 235 | if (ret) { | ||
| 236 | printk(KERN_ERR"failed to get GPIO_FEC_PHY_RESET: %d\n", ret); | ||
| 237 | return; | ||
| 238 | } | ||
| 239 | gpio_direction_output(LOCO_FEC_PHY_RST, 0); | ||
| 240 | msleep(1); | ||
| 241 | gpio_set_value(LOCO_FEC_PHY_RST, 1); | ||
| 242 | } | ||
| 243 | |||
| 244 | static const struct fec_platform_data mx53_loco_fec_data __initconst = { | ||
| 245 | .phy = PHY_INTERFACE_MODE_RMII, | ||
| 246 | }; | ||
| 247 | |||
| 248 | static const struct imxi2c_platform_data mx53_loco_i2c_data __initconst = { | ||
| 249 | .bitrate = 100000, | ||
| 250 | }; | ||
| 251 | |||
| 252 | static const struct gpio_led mx53loco_leds[] __initconst = { | ||
| 253 | { | ||
| 254 | .name = "green", | ||
| 255 | .default_trigger = "heartbeat", | ||
| 256 | .gpio = LOCO_LED, | ||
| 257 | }, | ||
| 258 | }; | ||
| 259 | |||
| 260 | static const struct gpio_led_platform_data mx53loco_leds_data __initconst = { | ||
| 261 | .leds = mx53loco_leds, | ||
| 262 | .num_leds = ARRAY_SIZE(mx53loco_leds), | ||
| 263 | }; | ||
| 264 | |||
| 265 | void __init imx53_qsb_common_init(void) | ||
| 266 | { | ||
| 267 | mxc_iomux_v3_setup_multiple_pads(mx53_loco_pads, | ||
| 268 | ARRAY_SIZE(mx53_loco_pads)); | ||
| 269 | } | ||
| 270 | |||
| 271 | static struct i2c_board_info mx53loco_i2c_devices[] = { | ||
| 272 | { | ||
| 273 | I2C_BOARD_INFO("mma8450", 0x1C), | ||
| 274 | }, | ||
| 275 | }; | ||
| 276 | |||
| 277 | static void __init mx53_loco_board_init(void) | ||
| 278 | { | ||
| 279 | int ret; | ||
| 280 | imx53_soc_init(); | ||
| 281 | imx53_qsb_common_init(); | ||
| 282 | |||
| 283 | imx53_add_imx_uart(0, NULL); | ||
| 284 | mx53_loco_fec_reset(); | ||
| 285 | imx53_add_fec(&mx53_loco_fec_data); | ||
| 286 | imx53_add_imx2_wdt(0); | ||
| 287 | |||
| 288 | ret = gpio_request_one(LOCO_ACCEL_EN, GPIOF_OUT_INIT_HIGH, "accel_en"); | ||
| 289 | if (ret) | ||
| 290 | pr_err("Cannot request ACCEL_EN pin: %d\n", ret); | ||
| 291 | |||
| 292 | i2c_register_board_info(0, mx53loco_i2c_devices, | ||
| 293 | ARRAY_SIZE(mx53loco_i2c_devices)); | ||
| 294 | imx53_add_imx_i2c(0, &mx53_loco_i2c_data); | ||
| 295 | imx53_add_imx_i2c(1, &mx53_loco_i2c_data); | ||
| 296 | imx53_add_sdhci_esdhc_imx(0, &mx53_loco_sd1_data); | ||
| 297 | imx53_add_sdhci_esdhc_imx(2, &mx53_loco_sd3_data); | ||
| 298 | imx_add_gpio_keys(&loco_button_data); | ||
| 299 | gpio_led_register_device(-1, &mx53loco_leds_data); | ||
| 300 | imx53_add_ahci_imx(); | ||
| 301 | } | ||
| 302 | |||
| 303 | static void __init mx53_loco_timer_init(void) | ||
| 304 | { | ||
| 305 | mx53_clocks_init(32768, 24000000, 0, 0); | ||
| 306 | } | ||
| 307 | |||
| 308 | static struct sys_timer mx53_loco_timer = { | ||
| 309 | .init = mx53_loco_timer_init, | ||
| 310 | }; | ||
| 311 | |||
| 312 | MACHINE_START(MX53_LOCO, "Freescale MX53 LOCO Board") | ||
| 313 | .map_io = mx53_map_io, | ||
| 314 | .init_early = imx53_init_early, | ||
| 315 | .init_irq = mx53_init_irq, | ||
| 316 | .handle_irq = imx53_handle_irq, | ||
| 317 | .timer = &mx53_loco_timer, | ||
| 318 | .init_machine = mx53_loco_board_init, | ||
| 319 | .init_late = imx53_init_late, | ||
| 320 | .restart = mxc_restart, | ||
| 321 | MACHINE_END | ||
diff --git a/arch/arm/mach-imx/mach-mx53_smd.c b/arch/arm/mach-imx/mach-mx53_smd.c deleted file mode 100644 index b15d6a6d3b68..000000000000 --- a/arch/arm/mach-imx/mach-mx53_smd.c +++ /dev/null | |||
| @@ -1,168 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2011 Freescale Semiconductor, Inc. All Rights Reserved. | ||
| 3 | */ | ||
| 4 | |||
| 5 | /* | ||
| 6 | * This program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License as published by | ||
| 8 | * the Free Software Foundation; either version 2 of the License, or | ||
| 9 | * (at your option) any later version. | ||
| 10 | |||
| 11 | * This program is distributed in the hope that it will be useful, | ||
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | * GNU General Public License for more details. | ||
| 15 | |||
| 16 | * You should have received a copy of the GNU General Public License along | ||
| 17 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
| 18 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
| 19 | */ | ||
| 20 | |||
| 21 | #include <linux/init.h> | ||
| 22 | #include <linux/clk.h> | ||
| 23 | #include <linux/delay.h> | ||
| 24 | #include <linux/gpio.h> | ||
| 25 | |||
| 26 | #include <mach/common.h> | ||
| 27 | #include <mach/hardware.h> | ||
| 28 | #include <mach/iomux-mx53.h> | ||
| 29 | |||
| 30 | #include <asm/mach-types.h> | ||
| 31 | #include <asm/mach/arch.h> | ||
| 32 | #include <asm/mach/time.h> | ||
| 33 | |||
| 34 | #include "devices-imx53.h" | ||
| 35 | |||
| 36 | #define SMD_FEC_PHY_RST IMX_GPIO_NR(7, 6) | ||
| 37 | #define MX53_SMD_SATA_PWR_EN IMX_GPIO_NR(3, 3) | ||
| 38 | |||
| 39 | static iomux_v3_cfg_t mx53_smd_pads[] = { | ||
| 40 | MX53_PAD_CSI0_DAT10__UART1_TXD_MUX, | ||
| 41 | MX53_PAD_CSI0_DAT11__UART1_RXD_MUX, | ||
| 42 | |||
| 43 | MX53_PAD_PATA_BUFFER_EN__UART2_RXD_MUX, | ||
| 44 | MX53_PAD_PATA_DMARQ__UART2_TXD_MUX, | ||
| 45 | |||
| 46 | MX53_PAD_PATA_CS_0__UART3_TXD_MUX, | ||
| 47 | MX53_PAD_PATA_CS_1__UART3_RXD_MUX, | ||
| 48 | MX53_PAD_PATA_DA_1__UART3_CTS, | ||
| 49 | MX53_PAD_PATA_DA_2__UART3_RTS, | ||
| 50 | /* I2C1 */ | ||
| 51 | MX53_PAD_CSI0_DAT8__I2C1_SDA, | ||
| 52 | MX53_PAD_CSI0_DAT9__I2C1_SCL, | ||
| 53 | /* SD1 */ | ||
| 54 | MX53_PAD_SD1_CMD__ESDHC1_CMD, | ||
| 55 | MX53_PAD_SD1_CLK__ESDHC1_CLK, | ||
| 56 | MX53_PAD_SD1_DATA0__ESDHC1_DAT0, | ||
| 57 | MX53_PAD_SD1_DATA1__ESDHC1_DAT1, | ||
| 58 | MX53_PAD_SD1_DATA2__ESDHC1_DAT2, | ||
| 59 | MX53_PAD_SD1_DATA3__ESDHC1_DAT3, | ||
| 60 | /* SD2 */ | ||
| 61 | MX53_PAD_SD2_CMD__ESDHC2_CMD, | ||
| 62 | MX53_PAD_SD2_CLK__ESDHC2_CLK, | ||
| 63 | MX53_PAD_SD2_DATA0__ESDHC2_DAT0, | ||
| 64 | MX53_PAD_SD2_DATA1__ESDHC2_DAT1, | ||
| 65 | MX53_PAD_SD2_DATA2__ESDHC2_DAT2, | ||
| 66 | MX53_PAD_SD2_DATA3__ESDHC2_DAT3, | ||
| 67 | /* SD3 */ | ||
| 68 | MX53_PAD_PATA_DATA8__ESDHC3_DAT0, | ||
| 69 | MX53_PAD_PATA_DATA9__ESDHC3_DAT1, | ||
| 70 | MX53_PAD_PATA_DATA10__ESDHC3_DAT2, | ||
| 71 | MX53_PAD_PATA_DATA11__ESDHC3_DAT3, | ||
| 72 | MX53_PAD_PATA_DATA0__ESDHC3_DAT4, | ||
| 73 | MX53_PAD_PATA_DATA1__ESDHC3_DAT5, | ||
| 74 | MX53_PAD_PATA_DATA2__ESDHC3_DAT6, | ||
| 75 | MX53_PAD_PATA_DATA3__ESDHC3_DAT7, | ||
| 76 | MX53_PAD_PATA_IORDY__ESDHC3_CLK, | ||
| 77 | MX53_PAD_PATA_RESET_B__ESDHC3_CMD, | ||
| 78 | }; | ||
| 79 | |||
| 80 | static const struct imxuart_platform_data mx53_smd_uart_data __initconst = { | ||
| 81 | .flags = IMXUART_HAVE_RTSCTS, | ||
| 82 | }; | ||
| 83 | |||
| 84 | static inline void mx53_smd_init_uart(void) | ||
| 85 | { | ||
| 86 | imx53_add_imx_uart(0, NULL); | ||
| 87 | imx53_add_imx_uart(1, NULL); | ||
| 88 | imx53_add_imx_uart(2, &mx53_smd_uart_data); | ||
| 89 | } | ||
| 90 | |||
| 91 | static inline void mx53_smd_fec_reset(void) | ||
| 92 | { | ||
| 93 | int ret; | ||
| 94 | |||
| 95 | /* reset FEC PHY */ | ||
| 96 | ret = gpio_request(SMD_FEC_PHY_RST, "fec-phy-reset"); | ||
| 97 | if (ret) { | ||
| 98 | printk(KERN_ERR"failed to get GPIO_FEC_PHY_RESET: %d\n", ret); | ||
| 99 | return; | ||
| 100 | } | ||
| 101 | gpio_direction_output(SMD_FEC_PHY_RST, 0); | ||
| 102 | msleep(1); | ||
| 103 | gpio_set_value(SMD_FEC_PHY_RST, 1); | ||
| 104 | } | ||
| 105 | |||
| 106 | static const struct fec_platform_data mx53_smd_fec_data __initconst = { | ||
| 107 | .phy = PHY_INTERFACE_MODE_RMII, | ||
| 108 | }; | ||
| 109 | |||
| 110 | static const struct imxi2c_platform_data mx53_smd_i2c_data __initconst = { | ||
| 111 | .bitrate = 100000, | ||
| 112 | }; | ||
| 113 | |||
| 114 | static inline void mx53_smd_ahci_pwr_on(void) | ||
| 115 | { | ||
| 116 | int ret; | ||
| 117 | |||
| 118 | /* Enable SATA PWR */ | ||
| 119 | ret = gpio_request_one(MX53_SMD_SATA_PWR_EN, | ||
| 120 | GPIOF_DIR_OUT | GPIOF_INIT_HIGH, "ahci-sata-pwr"); | ||
| 121 | if (ret) { | ||
| 122 | pr_err("failed to enable SATA_PWR_EN: %d\n", ret); | ||
| 123 | return; | ||
| 124 | } | ||
| 125 | } | ||
| 126 | |||
| 127 | void __init imx53_smd_common_init(void) | ||
| 128 | { | ||
| 129 | mxc_iomux_v3_setup_multiple_pads(mx53_smd_pads, | ||
| 130 | ARRAY_SIZE(mx53_smd_pads)); | ||
| 131 | } | ||
| 132 | |||
| 133 | static void __init mx53_smd_board_init(void) | ||
| 134 | { | ||
| 135 | imx53_soc_init(); | ||
| 136 | imx53_smd_common_init(); | ||
| 137 | |||
| 138 | mx53_smd_init_uart(); | ||
| 139 | mx53_smd_fec_reset(); | ||
| 140 | imx53_add_fec(&mx53_smd_fec_data); | ||
| 141 | imx53_add_imx2_wdt(0); | ||
| 142 | imx53_add_imx_i2c(0, &mx53_smd_i2c_data); | ||
| 143 | imx53_add_sdhci_esdhc_imx(0, NULL); | ||
| 144 | imx53_add_sdhci_esdhc_imx(1, NULL); | ||
| 145 | imx53_add_sdhci_esdhc_imx(2, NULL); | ||
| 146 | mx53_smd_ahci_pwr_on(); | ||
| 147 | imx53_add_ahci_imx(); | ||
| 148 | } | ||
| 149 | |||
| 150 | static void __init mx53_smd_timer_init(void) | ||
| 151 | { | ||
| 152 | mx53_clocks_init(32768, 24000000, 22579200, 0); | ||
| 153 | } | ||
| 154 | |||
| 155 | static struct sys_timer mx53_smd_timer = { | ||
| 156 | .init = mx53_smd_timer_init, | ||
| 157 | }; | ||
| 158 | |||
| 159 | MACHINE_START(MX53_SMD, "Freescale MX53 SMD Board") | ||
| 160 | .map_io = mx53_map_io, | ||
| 161 | .init_early = imx53_init_early, | ||
| 162 | .init_irq = mx53_init_irq, | ||
| 163 | .handle_irq = imx53_handle_irq, | ||
| 164 | .timer = &mx53_smd_timer, | ||
| 165 | .init_machine = mx53_smd_board_init, | ||
| 166 | .init_late = imx53_init_late, | ||
| 167 | .restart = mxc_restart, | ||
| 168 | MACHINE_END | ||
diff --git a/arch/arm/mach-imx/mm-imx5.c b/arch/arm/mach-imx/mm-imx5.c index 52d8f534be10..acb0aadb4255 100644 --- a/arch/arm/mach-imx/mm-imx5.c +++ b/arch/arm/mach-imx/mm-imx5.c | |||
| @@ -128,25 +128,6 @@ static struct sdma_platform_data imx51_sdma_pdata __initdata = { | |||
| 128 | .script_addrs = &imx51_sdma_script, | 128 | .script_addrs = &imx51_sdma_script, |
| 129 | }; | 129 | }; |
| 130 | 130 | ||
| 131 | static struct sdma_script_start_addrs imx53_sdma_script __initdata = { | ||
| 132 | .ap_2_ap_addr = 642, | ||
| 133 | .app_2_mcu_addr = 683, | ||
| 134 | .mcu_2_app_addr = 747, | ||
| 135 | .uart_2_mcu_addr = 817, | ||
| 136 | .shp_2_mcu_addr = 891, | ||
| 137 | .mcu_2_shp_addr = 960, | ||
| 138 | .uartsh_2_mcu_addr = 1032, | ||
| 139 | .spdif_2_mcu_addr = 1100, | ||
| 140 | .mcu_2_spdif_addr = 1134, | ||
| 141 | .firi_2_mcu_addr = 1193, | ||
| 142 | .mcu_2_firi_addr = 1290, | ||
| 143 | }; | ||
| 144 | |||
| 145 | static struct sdma_platform_data imx53_sdma_pdata __initdata = { | ||
| 146 | .fw_name = "sdma-imx53.bin", | ||
| 147 | .script_addrs = &imx53_sdma_script, | ||
| 148 | }; | ||
| 149 | |||
| 150 | static const struct resource imx50_audmux_res[] __initconst = { | 131 | static const struct resource imx50_audmux_res[] __initconst = { |
| 151 | DEFINE_RES_MEM(MX50_AUDMUX_BASE_ADDR, SZ_16K), | 132 | DEFINE_RES_MEM(MX50_AUDMUX_BASE_ADDR, SZ_16K), |
| 152 | }; | 133 | }; |
| @@ -155,10 +136,6 @@ static const struct resource imx51_audmux_res[] __initconst = { | |||
| 155 | DEFINE_RES_MEM(MX51_AUDMUX_BASE_ADDR, SZ_16K), | 136 | DEFINE_RES_MEM(MX51_AUDMUX_BASE_ADDR, SZ_16K), |
| 156 | }; | 137 | }; |
| 157 | 138 | ||
| 158 | static const struct resource imx53_audmux_res[] __initconst = { | ||
| 159 | DEFINE_RES_MEM(MX53_AUDMUX_BASE_ADDR, SZ_16K), | ||
| 160 | }; | ||
| 161 | |||
| 162 | void __init imx50_soc_init(void) | 139 | void __init imx50_soc_init(void) |
| 163 | { | 140 | { |
| 164 | /* i.mx50 has the i.mx35 type gpio */ | 141 | /* i.mx50 has the i.mx35 type gpio */ |
| @@ -196,30 +173,6 @@ void __init imx51_soc_init(void) | |||
| 196 | ARRAY_SIZE(imx51_audmux_res)); | 173 | ARRAY_SIZE(imx51_audmux_res)); |
| 197 | } | 174 | } |
| 198 | 175 | ||
| 199 | void __init imx53_soc_init(void) | ||
| 200 | { | ||
| 201 | /* i.mx53 has the i.mx35 type gpio */ | ||
| 202 | mxc_register_gpio("imx35-gpio", 0, MX53_GPIO1_BASE_ADDR, SZ_16K, MX53_INT_GPIO1_LOW, MX53_INT_GPIO1_HIGH); | ||
| 203 | mxc_register_gpio("imx35-gpio", 1, MX53_GPIO2_BASE_ADDR, SZ_16K, MX53_INT_GPIO2_LOW, MX53_INT_GPIO2_HIGH); | ||
| 204 | mxc_register_gpio("imx35-gpio", 2, MX53_GPIO3_BASE_ADDR, SZ_16K, MX53_INT_GPIO3_LOW, MX53_INT_GPIO3_HIGH); | ||
| 205 | mxc_register_gpio("imx35-gpio", 3, MX53_GPIO4_BASE_ADDR, SZ_16K, MX53_INT_GPIO4_LOW, MX53_INT_GPIO4_HIGH); | ||
| 206 | mxc_register_gpio("imx35-gpio", 4, MX53_GPIO5_BASE_ADDR, SZ_16K, MX53_INT_GPIO5_LOW, MX53_INT_GPIO5_HIGH); | ||
| 207 | mxc_register_gpio("imx35-gpio", 5, MX53_GPIO6_BASE_ADDR, SZ_16K, MX53_INT_GPIO6_LOW, MX53_INT_GPIO6_HIGH); | ||
| 208 | mxc_register_gpio("imx35-gpio", 6, MX53_GPIO7_BASE_ADDR, SZ_16K, MX53_INT_GPIO7_LOW, MX53_INT_GPIO7_HIGH); | ||
| 209 | |||
| 210 | pinctrl_provide_dummies(); | ||
| 211 | /* i.mx53 has the i.mx35 type sdma */ | ||
| 212 | imx_add_imx_sdma("imx35-sdma", MX53_SDMA_BASE_ADDR, MX53_INT_SDMA, &imx53_sdma_pdata); | ||
| 213 | |||
| 214 | /* Setup AIPS registers */ | ||
| 215 | imx_set_aips(MX53_IO_ADDRESS(MX53_AIPS1_BASE_ADDR)); | ||
| 216 | imx_set_aips(MX53_IO_ADDRESS(MX53_AIPS2_BASE_ADDR)); | ||
| 217 | |||
| 218 | /* i.mx53 has the i.mx31 type audmux */ | ||
| 219 | platform_device_register_simple("imx31-audmux", 0, imx53_audmux_res, | ||
| 220 | ARRAY_SIZE(imx53_audmux_res)); | ||
| 221 | } | ||
| 222 | |||
| 223 | void __init imx51_init_late(void) | 176 | void __init imx51_init_late(void) |
| 224 | { | 177 | { |
| 225 | mx51_neon_fixup(); | 178 | mx51_neon_fixup(); |
diff --git a/arch/arm/mach-imx/mx51_efika.c b/arch/arm/mach-imx/mx51_efika.c deleted file mode 100644 index ee870c49bc63..000000000000 --- a/arch/arm/mach-imx/mx51_efika.c +++ /dev/null | |||
| @@ -1,633 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * based on code from the following | ||
| 3 | * Copyright 2009-2010 Freescale Semiconductor, Inc. All Rights Reserved. | ||
| 4 | * Copyright 2009-2010 Pegatron Corporation. All Rights Reserved. | ||
| 5 | * Copyright 2009-2010 Genesi USA, Inc. All Rights Reserved. | ||
| 6 | * | ||
| 7 | * The code contained herein is licensed under the GNU General Public | ||
| 8 | * License. You may obtain a copy of the GNU General Public License | ||
| 9 | * Version 2 or later at the following locations: | ||
| 10 | * | ||
| 11 | * http://www.opensource.org/licenses/gpl-license.html | ||
| 12 | * http://www.gnu.org/copyleft/gpl.html | ||
| 13 | */ | ||
| 14 | |||
| 15 | #include <linux/init.h> | ||
| 16 | #include <linux/platform_device.h> | ||
| 17 | #include <linux/i2c.h> | ||
| 18 | #include <linux/gpio.h> | ||
| 19 | #include <linux/leds.h> | ||
| 20 | #include <linux/input.h> | ||
| 21 | #include <linux/delay.h> | ||
| 22 | #include <linux/io.h> | ||
| 23 | #include <linux/spi/flash.h> | ||
| 24 | #include <linux/spi/spi.h> | ||
| 25 | #include <linux/mfd/mc13892.h> | ||
| 26 | #include <linux/regulator/machine.h> | ||
| 27 | #include <linux/regulator/consumer.h> | ||
| 28 | |||
| 29 | #include <mach/common.h> | ||
| 30 | #include <mach/hardware.h> | ||
| 31 | #include <mach/iomux-mx51.h> | ||
| 32 | |||
| 33 | #include <linux/usb/otg.h> | ||
| 34 | #include <linux/usb/ulpi.h> | ||
| 35 | #include <mach/ulpi.h> | ||
| 36 | |||
| 37 | #include <asm/setup.h> | ||
| 38 | #include <asm/mach-types.h> | ||
| 39 | #include <asm/mach/arch.h> | ||
| 40 | #include <asm/mach/time.h> | ||
| 41 | |||
| 42 | #include "devices-imx51.h" | ||
| 43 | #include "efika.h" | ||
| 44 | #include "cpu_op-mx51.h" | ||
| 45 | |||
| 46 | #define MX51_USB_CTRL_1_OFFSET 0x10 | ||
| 47 | #define MX51_USB_CTRL_UH1_EXT_CLK_EN (1 << 25) | ||
| 48 | #define MX51_USB_PLL_DIV_19_2_MHZ 0x01 | ||
| 49 | |||
| 50 | #define EFIKAMX_USB_HUB_RESET IMX_GPIO_NR(1, 5) | ||
| 51 | #define EFIKAMX_USBH1_STP IMX_GPIO_NR(1, 27) | ||
| 52 | |||
| 53 | #define EFIKAMX_SPI_CS0 IMX_GPIO_NR(4, 24) | ||
| 54 | #define EFIKAMX_SPI_CS1 IMX_GPIO_NR(4, 25) | ||
| 55 | |||
| 56 | #define EFIKAMX_PMIC IMX_GPIO_NR(1, 6) | ||
| 57 | |||
| 58 | static iomux_v3_cfg_t mx51efika_pads[] = { | ||
| 59 | /* UART1 */ | ||
| 60 | MX51_PAD_UART1_RXD__UART1_RXD, | ||
| 61 | MX51_PAD_UART1_TXD__UART1_TXD, | ||
| 62 | MX51_PAD_UART1_RTS__UART1_RTS, | ||
| 63 | MX51_PAD_UART1_CTS__UART1_CTS, | ||
| 64 | |||
| 65 | /* SD 1 */ | ||
| 66 | MX51_PAD_SD1_CMD__SD1_CMD, | ||
| 67 | MX51_PAD_SD1_CLK__SD1_CLK, | ||
| 68 | MX51_PAD_SD1_DATA0__SD1_DATA0, | ||
| 69 | MX51_PAD_SD1_DATA1__SD1_DATA1, | ||
| 70 | MX51_PAD_SD1_DATA2__SD1_DATA2, | ||
| 71 | MX51_PAD_SD1_DATA3__SD1_DATA3, | ||
| 72 | |||
| 73 | /* SD 2 */ | ||
| 74 | MX51_PAD_SD2_CMD__SD2_CMD, | ||
| 75 | MX51_PAD_SD2_CLK__SD2_CLK, | ||
| 76 | MX51_PAD_SD2_DATA0__SD2_DATA0, | ||
| 77 | MX51_PAD_SD2_DATA1__SD2_DATA1, | ||
| 78 | MX51_PAD_SD2_DATA2__SD2_DATA2, | ||
| 79 | MX51_PAD_SD2_DATA3__SD2_DATA3, | ||
| 80 | |||
| 81 | /* SD/MMC WP/CD */ | ||
| 82 | MX51_PAD_GPIO1_0__SD1_CD, | ||
| 83 | MX51_PAD_GPIO1_1__SD1_WP, | ||
| 84 | MX51_PAD_GPIO1_7__SD2_WP, | ||
| 85 | MX51_PAD_GPIO1_8__SD2_CD, | ||
| 86 | |||
| 87 | /* spi */ | ||
| 88 | MX51_PAD_CSPI1_MOSI__ECSPI1_MOSI, | ||
| 89 | MX51_PAD_CSPI1_MISO__ECSPI1_MISO, | ||
| 90 | MX51_PAD_CSPI1_SS0__GPIO4_24, | ||
| 91 | MX51_PAD_CSPI1_SS1__GPIO4_25, | ||
| 92 | MX51_PAD_CSPI1_RDY__ECSPI1_RDY, | ||
| 93 | MX51_PAD_CSPI1_SCLK__ECSPI1_SCLK, | ||
| 94 | MX51_PAD_GPIO1_6__GPIO1_6, | ||
| 95 | |||
| 96 | /* USB HOST1 */ | ||
| 97 | MX51_PAD_USBH1_CLK__USBH1_CLK, | ||
| 98 | MX51_PAD_USBH1_DIR__USBH1_DIR, | ||
| 99 | MX51_PAD_USBH1_NXT__USBH1_NXT, | ||
| 100 | MX51_PAD_USBH1_DATA0__USBH1_DATA0, | ||
| 101 | MX51_PAD_USBH1_DATA1__USBH1_DATA1, | ||
| 102 | MX51_PAD_USBH1_DATA2__USBH1_DATA2, | ||
| 103 | MX51_PAD_USBH1_DATA3__USBH1_DATA3, | ||
| 104 | MX51_PAD_USBH1_DATA4__USBH1_DATA4, | ||
| 105 | MX51_PAD_USBH1_DATA5__USBH1_DATA5, | ||
| 106 | MX51_PAD_USBH1_DATA6__USBH1_DATA6, | ||
| 107 | MX51_PAD_USBH1_DATA7__USBH1_DATA7, | ||
| 108 | |||
| 109 | /* USB HUB RESET */ | ||
| 110 | MX51_PAD_GPIO1_5__GPIO1_5, | ||
| 111 | |||
| 112 | /* WLAN */ | ||
| 113 | MX51_PAD_EIM_A22__GPIO2_16, | ||
| 114 | MX51_PAD_EIM_A16__GPIO2_10, | ||
| 115 | |||
| 116 | /* USB PHY RESET */ | ||
| 117 | MX51_PAD_EIM_D27__GPIO2_9, | ||
| 118 | }; | ||
| 119 | |||
| 120 | /* Serial ports */ | ||
| 121 | static const struct imxuart_platform_data uart_pdata = { | ||
| 122 | .flags = IMXUART_HAVE_RTSCTS, | ||
| 123 | }; | ||
| 124 | |||
| 125 | /* This function is board specific as the bit mask for the plldiv will also | ||
| 126 | * be different for other Freescale SoCs, thus a common bitmask is not | ||
| 127 | * possible and cannot get place in /plat-mxc/ehci.c. | ||
| 128 | */ | ||
| 129 | static int initialize_otg_port(struct platform_device *pdev) | ||
| 130 | { | ||
| 131 | u32 v; | ||
| 132 | void __iomem *usb_base; | ||
| 133 | void __iomem *usbother_base; | ||
| 134 | usb_base = ioremap(MX51_USB_OTG_BASE_ADDR, SZ_4K); | ||
| 135 | if (!usb_base) | ||
| 136 | return -ENOMEM; | ||
| 137 | usbother_base = (void __iomem *)(usb_base + MX5_USBOTHER_REGS_OFFSET); | ||
| 138 | |||
| 139 | /* Set the PHY clock to 19.2MHz */ | ||
| 140 | v = __raw_readl(usbother_base + MXC_USB_PHY_CTR_FUNC2_OFFSET); | ||
| 141 | v &= ~MX5_USB_UTMI_PHYCTRL1_PLLDIV_MASK; | ||
| 142 | v |= MX51_USB_PLL_DIV_19_2_MHZ; | ||
| 143 | __raw_writel(v, usbother_base + MXC_USB_PHY_CTR_FUNC2_OFFSET); | ||
| 144 | iounmap(usb_base); | ||
| 145 | |||
| 146 | mdelay(10); | ||
| 147 | |||
| 148 | return mx51_initialize_usb_hw(pdev->id, MXC_EHCI_INTERNAL_PHY); | ||
| 149 | } | ||
| 150 | |||
| 151 | static const struct mxc_usbh_platform_data dr_utmi_config __initconst = { | ||
| 152 | .init = initialize_otg_port, | ||
| 153 | .portsc = MXC_EHCI_UTMI_16BIT, | ||
| 154 | }; | ||
| 155 | |||
| 156 | static int initialize_usbh1_port(struct platform_device *pdev) | ||
| 157 | { | ||
| 158 | iomux_v3_cfg_t usbh1stp = MX51_PAD_USBH1_STP__USBH1_STP; | ||
| 159 | iomux_v3_cfg_t usbh1gpio = MX51_PAD_USBH1_STP__GPIO1_27; | ||
| 160 | u32 v; | ||
| 161 | void __iomem *usb_base; | ||
| 162 | void __iomem *socregs_base; | ||
| 163 | |||
| 164 | mxc_iomux_v3_setup_pad(usbh1gpio); | ||
| 165 | gpio_request(EFIKAMX_USBH1_STP, "usbh1_stp"); | ||
| 166 | gpio_direction_output(EFIKAMX_USBH1_STP, 0); | ||
| 167 | msleep(1); | ||
| 168 | gpio_set_value(EFIKAMX_USBH1_STP, 1); | ||
| 169 | msleep(1); | ||
| 170 | |||
| 171 | usb_base = ioremap(MX51_USB_OTG_BASE_ADDR, SZ_4K); | ||
| 172 | socregs_base = (void __iomem *)(usb_base + MX5_USBOTHER_REGS_OFFSET); | ||
| 173 | |||
| 174 | /* The clock for the USBH1 ULPI port will come externally */ | ||
| 175 | /* from the PHY. */ | ||
| 176 | v = __raw_readl(socregs_base + MX51_USB_CTRL_1_OFFSET); | ||
| 177 | __raw_writel(v | MX51_USB_CTRL_UH1_EXT_CLK_EN, | ||
| 178 | socregs_base + MX51_USB_CTRL_1_OFFSET); | ||
| 179 | |||
| 180 | iounmap(usb_base); | ||
| 181 | |||
| 182 | gpio_free(EFIKAMX_USBH1_STP); | ||
| 183 | mxc_iomux_v3_setup_pad(usbh1stp); | ||
| 184 | |||
| 185 | mdelay(10); | ||
| 186 | |||
| 187 | return mx51_initialize_usb_hw(pdev->id, MXC_EHCI_ITC_NO_THRESHOLD); | ||
| 188 | } | ||
| 189 | |||
| 190 | static struct mxc_usbh_platform_data usbh1_config __initdata = { | ||
| 191 | .init = initialize_usbh1_port, | ||
| 192 | .portsc = MXC_EHCI_MODE_ULPI, | ||
| 193 | }; | ||
| 194 | |||
| 195 | static void mx51_efika_hubreset(void) | ||
| 196 | { | ||
| 197 | gpio_request(EFIKAMX_USB_HUB_RESET, "usb_hub_rst"); | ||
| 198 | gpio_direction_output(EFIKAMX_USB_HUB_RESET, 1); | ||
| 199 | msleep(1); | ||
| 200 | gpio_set_value(EFIKAMX_USB_HUB_RESET, 0); | ||
| 201 | msleep(1); | ||
| 202 | gpio_set_value(EFIKAMX_USB_HUB_RESET, 1); | ||
| 203 | } | ||
| 204 | |||
| 205 | static void __init mx51_efika_usb(void) | ||
| 206 | { | ||
| 207 | mx51_efika_hubreset(); | ||
| 208 | |||
| 209 | /* pulling it low, means no USB at all... */ | ||
| 210 | gpio_request(EFIKA_USB_PHY_RESET, "usb_phy_reset"); | ||
| 211 | gpio_direction_output(EFIKA_USB_PHY_RESET, 0); | ||
| 212 | msleep(1); | ||
| 213 | gpio_set_value(EFIKA_USB_PHY_RESET, 1); | ||
| 214 | |||
| 215 | usbh1_config.otg = imx_otg_ulpi_create(ULPI_OTG_DRVVBUS | | ||
| 216 | ULPI_OTG_DRVVBUS_EXT | ULPI_OTG_EXTVBUSIND); | ||
| 217 | |||
| 218 | imx51_add_mxc_ehci_otg(&dr_utmi_config); | ||
| 219 | if (usbh1_config.otg) | ||
| 220 | imx51_add_mxc_ehci_hs(1, &usbh1_config); | ||
| 221 | } | ||
| 222 | |||
| 223 | static struct mtd_partition mx51_efika_spi_nor_partitions[] = { | ||
| 224 | { | ||
| 225 | .name = "u-boot", | ||
| 226 | .offset = 0, | ||
| 227 | .size = SZ_256K, | ||
| 228 | }, | ||
| 229 | { | ||
| 230 | .name = "config", | ||
| 231 | .offset = MTDPART_OFS_APPEND, | ||
| 232 | .size = SZ_64K, | ||
| 233 | }, | ||
| 234 | }; | ||
| 235 | |||
| 236 | static struct flash_platform_data mx51_efika_spi_flash_data = { | ||
| 237 | .name = "spi_flash", | ||
| 238 | .parts = mx51_efika_spi_nor_partitions, | ||
| 239 | .nr_parts = ARRAY_SIZE(mx51_efika_spi_nor_partitions), | ||
| 240 | .type = "sst25vf032b", | ||
| 241 | }; | ||
| 242 | |||
| 243 | static struct regulator_consumer_supply sw1_consumers[] = { | ||
| 244 | { | ||
| 245 | .supply = "cpu_vcc", | ||
| 246 | } | ||
| 247 | }; | ||
| 248 | |||
| 249 | static struct regulator_consumer_supply vdig_consumers[] = { | ||
| 250 | /* sgtl5000 */ | ||
| 251 | REGULATOR_SUPPLY("VDDA", "1-000a"), | ||
| 252 | REGULATOR_SUPPLY("VDDD", "1-000a"), | ||
| 253 | }; | ||
| 254 | |||
| 255 | static struct regulator_consumer_supply vvideo_consumers[] = { | ||
| 256 | /* sgtl5000 */ | ||
| 257 | REGULATOR_SUPPLY("VDDIO", "1-000a"), | ||
| 258 | }; | ||
| 259 | |||
| 260 | static struct regulator_consumer_supply vsd_consumers[] = { | ||
| 261 | REGULATOR_SUPPLY("vmmc", "sdhci-esdhc-imx51.0"), | ||
| 262 | REGULATOR_SUPPLY("vmmc", "sdhci-esdhc-imx51.1"), | ||
| 263 | }; | ||
| 264 | |||
| 265 | static struct regulator_consumer_supply pwgt1_consumer[] = { | ||
| 266 | { | ||
| 267 | .supply = "pwgt1", | ||
| 268 | } | ||
| 269 | }; | ||
| 270 | |||
| 271 | static struct regulator_consumer_supply pwgt2_consumer[] = { | ||
| 272 | { | ||
| 273 | .supply = "pwgt2", | ||
| 274 | } | ||
| 275 | }; | ||
| 276 | |||
| 277 | static struct regulator_consumer_supply coincell_consumer[] = { | ||
| 278 | { | ||
| 279 | .supply = "coincell", | ||
| 280 | } | ||
| 281 | }; | ||
| 282 | |||
| 283 | static struct regulator_init_data sw1_init = { | ||
| 284 | .constraints = { | ||
| 285 | .name = "SW1", | ||
| 286 | .min_uV = 600000, | ||
| 287 | .max_uV = 1375000, | ||
| 288 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE, | ||
| 289 | .valid_modes_mask = 0, | ||
| 290 | .always_on = 1, | ||
| 291 | .boot_on = 1, | ||
| 292 | .state_mem = { | ||
| 293 | .uV = 850000, | ||
| 294 | .mode = REGULATOR_MODE_NORMAL, | ||
| 295 | .enabled = 1, | ||
| 296 | }, | ||
| 297 | }, | ||
| 298 | .num_consumer_supplies = ARRAY_SIZE(sw1_consumers), | ||
| 299 | .consumer_supplies = sw1_consumers, | ||
| 300 | }; | ||
| 301 | |||
| 302 | static struct regulator_init_data sw2_init = { | ||
| 303 | .constraints = { | ||
| 304 | .name = "SW2", | ||
| 305 | .min_uV = 900000, | ||
| 306 | .max_uV = 1850000, | ||
| 307 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE, | ||
| 308 | .always_on = 1, | ||
| 309 | .boot_on = 1, | ||
| 310 | .state_mem = { | ||
| 311 | .uV = 950000, | ||
| 312 | .mode = REGULATOR_MODE_NORMAL, | ||
| 313 | .enabled = 1, | ||
| 314 | }, | ||
| 315 | } | ||
| 316 | }; | ||
| 317 | |||
| 318 | static struct regulator_init_data sw3_init = { | ||
| 319 | .constraints = { | ||
| 320 | .name = "SW3", | ||
| 321 | .min_uV = 1100000, | ||
| 322 | .max_uV = 1850000, | ||
| 323 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE, | ||
| 324 | .always_on = 1, | ||
| 325 | .boot_on = 1, | ||
| 326 | } | ||
| 327 | }; | ||
| 328 | |||
| 329 | static struct regulator_init_data sw4_init = { | ||
| 330 | .constraints = { | ||
| 331 | .name = "SW4", | ||
| 332 | .min_uV = 1100000, | ||
| 333 | .max_uV = 1850000, | ||
| 334 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE, | ||
| 335 | .always_on = 1, | ||
| 336 | .boot_on = 1, | ||
| 337 | } | ||
| 338 | }; | ||
| 339 | |||
| 340 | static struct regulator_init_data viohi_init = { | ||
| 341 | .constraints = { | ||
| 342 | .name = "VIOHI", | ||
| 343 | .boot_on = 1, | ||
| 344 | .always_on = 1, | ||
| 345 | } | ||
| 346 | }; | ||
| 347 | |||
| 348 | static struct regulator_init_data vusb_init = { | ||
| 349 | .constraints = { | ||
| 350 | .name = "VUSB", | ||
| 351 | .boot_on = 1, | ||
| 352 | .always_on = 1, | ||
| 353 | } | ||
| 354 | }; | ||
| 355 | |||
| 356 | static struct regulator_init_data swbst_init = { | ||
| 357 | .constraints = { | ||
| 358 | .name = "SWBST", | ||
| 359 | } | ||
| 360 | }; | ||
| 361 | |||
| 362 | static struct regulator_init_data vdig_init = { | ||
| 363 | .constraints = { | ||
| 364 | .name = "VDIG", | ||
| 365 | .min_uV = 1050000, | ||
| 366 | .max_uV = 1800000, | ||
| 367 | .valid_ops_mask = | ||
| 368 | REGULATOR_CHANGE_VOLTAGE | REGULATOR_CHANGE_STATUS, | ||
| 369 | .boot_on = 1, | ||
| 370 | .always_on = 1, | ||
| 371 | }, | ||
| 372 | .num_consumer_supplies = ARRAY_SIZE(vdig_consumers), | ||
| 373 | .consumer_supplies = vdig_consumers, | ||
| 374 | }; | ||
| 375 | |||
| 376 | static struct regulator_init_data vpll_init = { | ||
| 377 | .constraints = { | ||
| 378 | .name = "VPLL", | ||
| 379 | .min_uV = 1050000, | ||
| 380 | .max_uV = 1800000, | ||
| 381 | .valid_ops_mask = | ||
| 382 | REGULATOR_CHANGE_VOLTAGE | REGULATOR_CHANGE_STATUS, | ||
| 383 | .boot_on = 1, | ||
| 384 | .always_on = 1, | ||
| 385 | } | ||
| 386 | }; | ||
| 387 | |||
| 388 | static struct regulator_init_data vusb2_init = { | ||
| 389 | .constraints = { | ||
| 390 | .name = "VUSB2", | ||
| 391 | .min_uV = 2400000, | ||
| 392 | .max_uV = 2775000, | ||
| 393 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE, | ||
| 394 | .boot_on = 1, | ||
| 395 | .always_on = 1, | ||
| 396 | } | ||
| 397 | }; | ||
| 398 | |||
| 399 | static struct regulator_init_data vvideo_init = { | ||
| 400 | .constraints = { | ||
| 401 | .name = "VVIDEO", | ||
| 402 | .min_uV = 2775000, | ||
| 403 | .max_uV = 2775000, | ||
| 404 | .valid_ops_mask = | ||
| 405 | REGULATOR_CHANGE_VOLTAGE | REGULATOR_CHANGE_STATUS, | ||
| 406 | .boot_on = 1, | ||
| 407 | .apply_uV = 1, | ||
| 408 | }, | ||
| 409 | .num_consumer_supplies = ARRAY_SIZE(vvideo_consumers), | ||
| 410 | .consumer_supplies = vvideo_consumers, | ||
| 411 | }; | ||
| 412 | |||
| 413 | static struct regulator_init_data vaudio_init = { | ||
| 414 | .constraints = { | ||
| 415 | .name = "VAUDIO", | ||
| 416 | .min_uV = 2300000, | ||
| 417 | .max_uV = 3000000, | ||
| 418 | .valid_ops_mask = | ||
| 419 | REGULATOR_CHANGE_VOLTAGE | REGULATOR_CHANGE_STATUS, | ||
| 420 | .boot_on = 1, | ||
| 421 | } | ||
| 422 | }; | ||
| 423 | |||
| 424 | static struct regulator_init_data vsd_init = { | ||
| 425 | .constraints = { | ||
| 426 | .name = "VSD", | ||
| 427 | .min_uV = 1800000, | ||
| 428 | .max_uV = 3150000, | ||
| 429 | .valid_ops_mask = | ||
| 430 | REGULATOR_CHANGE_VOLTAGE, | ||
| 431 | .boot_on = 1, | ||
| 432 | }, | ||
| 433 | .num_consumer_supplies = ARRAY_SIZE(vsd_consumers), | ||
| 434 | .consumer_supplies = vsd_consumers, | ||
| 435 | }; | ||
| 436 | |||
| 437 | static struct regulator_init_data vcam_init = { | ||
| 438 | .constraints = { | ||
| 439 | .name = "VCAM", | ||
| 440 | .min_uV = 2500000, | ||
| 441 | .max_uV = 3000000, | ||
| 442 | .valid_ops_mask = | ||
| 443 | REGULATOR_CHANGE_VOLTAGE | | ||
| 444 | REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_STATUS, | ||
| 445 | .valid_modes_mask = REGULATOR_MODE_FAST | REGULATOR_MODE_NORMAL, | ||
| 446 | .boot_on = 1, | ||
| 447 | } | ||
| 448 | }; | ||
| 449 | |||
| 450 | static struct regulator_init_data vgen1_init = { | ||
| 451 | .constraints = { | ||
| 452 | .name = "VGEN1", | ||
| 453 | .min_uV = 1200000, | ||
| 454 | .max_uV = 3150000, | ||
| 455 | .valid_ops_mask = | ||
| 456 | REGULATOR_CHANGE_VOLTAGE | REGULATOR_CHANGE_STATUS, | ||
| 457 | .boot_on = 1, | ||
| 458 | .always_on = 1, | ||
| 459 | } | ||
| 460 | }; | ||
| 461 | |||
| 462 | static struct regulator_init_data vgen2_init = { | ||
| 463 | .constraints = { | ||
| 464 | .name = "VGEN2", | ||
| 465 | .min_uV = 1200000, | ||
| 466 | .max_uV = 3150000, | ||
| 467 | .valid_ops_mask = | ||
| 468 | REGULATOR_CHANGE_VOLTAGE | REGULATOR_CHANGE_STATUS, | ||
| 469 | .boot_on = 1, | ||
| 470 | .always_on = 1, | ||
| 471 | } | ||
| 472 | }; | ||
| 473 | |||
| 474 | static struct regulator_init_data vgen3_init = { | ||
| 475 | .constraints = { | ||
| 476 | .name = "VGEN3", | ||
| 477 | .min_uV = 1800000, | ||
| 478 | .max_uV = 2900000, | ||
| 479 | .valid_ops_mask = | ||
| 480 | REGULATOR_CHANGE_VOLTAGE | REGULATOR_CHANGE_STATUS, | ||
| 481 | .boot_on = 1, | ||
| 482 | .always_on = 1, | ||
| 483 | } | ||
| 484 | }; | ||
| 485 | |||
| 486 | static struct regulator_init_data gpo1_init = { | ||
| 487 | .constraints = { | ||
| 488 | .name = "GPO1", | ||
| 489 | } | ||
| 490 | }; | ||
| 491 | |||
| 492 | static struct regulator_init_data gpo2_init = { | ||
| 493 | .constraints = { | ||
| 494 | .name = "GPO2", | ||
| 495 | } | ||
| 496 | }; | ||
| 497 | |||
| 498 | static struct regulator_init_data gpo3_init = { | ||
| 499 | .constraints = { | ||
| 500 | .name = "GPO3", | ||
| 501 | } | ||
| 502 | }; | ||
| 503 | |||
| 504 | static struct regulator_init_data gpo4_init = { | ||
| 505 | .constraints = { | ||
| 506 | .name = "GPO4", | ||
| 507 | } | ||
| 508 | }; | ||
| 509 | |||
| 510 | static struct regulator_init_data pwgt1_init = { | ||
| 511 | .constraints = { | ||
| 512 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, | ||
| 513 | .boot_on = 1, | ||
| 514 | }, | ||
| 515 | .num_consumer_supplies = ARRAY_SIZE(pwgt1_consumer), | ||
| 516 | .consumer_supplies = pwgt1_consumer, | ||
| 517 | }; | ||
| 518 | |||
| 519 | static struct regulator_init_data pwgt2_init = { | ||
| 520 | .constraints = { | ||
| 521 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, | ||
| 522 | .boot_on = 1, | ||
| 523 | }, | ||
| 524 | .num_consumer_supplies = ARRAY_SIZE(pwgt2_consumer), | ||
| 525 | .consumer_supplies = pwgt2_consumer, | ||
| 526 | }; | ||
| 527 | |||
| 528 | static struct regulator_init_data vcoincell_init = { | ||
| 529 | .constraints = { | ||
| 530 | .name = "COINCELL", | ||
| 531 | .min_uV = 3000000, | ||
| 532 | .max_uV = 3000000, | ||
| 533 | .valid_ops_mask = | ||
| 534 | REGULATOR_CHANGE_VOLTAGE | REGULATOR_CHANGE_STATUS, | ||
| 535 | }, | ||
| 536 | .num_consumer_supplies = ARRAY_SIZE(coincell_consumer), | ||
| 537 | .consumer_supplies = coincell_consumer, | ||
| 538 | }; | ||
| 539 | |||
| 540 | static struct mc13xxx_regulator_init_data mx51_efika_regulators[] = { | ||
| 541 | { .id = MC13892_SW1, .init_data = &sw1_init }, | ||
| 542 | { .id = MC13892_SW2, .init_data = &sw2_init }, | ||
| 543 | { .id = MC13892_SW3, .init_data = &sw3_init }, | ||
| 544 | { .id = MC13892_SW4, .init_data = &sw4_init }, | ||
| 545 | { .id = MC13892_SWBST, .init_data = &swbst_init }, | ||
| 546 | { .id = MC13892_VIOHI, .init_data = &viohi_init }, | ||
| 547 | { .id = MC13892_VPLL, .init_data = &vpll_init }, | ||
| 548 | { .id = MC13892_VDIG, .init_data = &vdig_init }, | ||
| 549 | { .id = MC13892_VSD, .init_data = &vsd_init }, | ||
| 550 | { .id = MC13892_VUSB2, .init_data = &vusb2_init }, | ||
| 551 | { .id = MC13892_VVIDEO, .init_data = &vvideo_init }, | ||
| 552 | { .id = MC13892_VAUDIO, .init_data = &vaudio_init }, | ||
| 553 | { .id = MC13892_VCAM, .init_data = &vcam_init }, | ||
| 554 | { .id = MC13892_VGEN1, .init_data = &vgen1_init }, | ||
| 555 | { .id = MC13892_VGEN2, .init_data = &vgen2_init }, | ||
| 556 | { .id = MC13892_VGEN3, .init_data = &vgen3_init }, | ||
| 557 | { .id = MC13892_VUSB, .init_data = &vusb_init }, | ||
| 558 | { .id = MC13892_GPO1, .init_data = &gpo1_init }, | ||
| 559 | { .id = MC13892_GPO2, .init_data = &gpo2_init }, | ||
| 560 | { .id = MC13892_GPO3, .init_data = &gpo3_init }, | ||
| 561 | { .id = MC13892_GPO4, .init_data = &gpo4_init }, | ||
| 562 | { .id = MC13892_PWGT1SPI, .init_data = &pwgt1_init }, | ||
| 563 | { .id = MC13892_PWGT2SPI, .init_data = &pwgt2_init }, | ||
| 564 | { .id = MC13892_VCOINCELL, .init_data = &vcoincell_init }, | ||
| 565 | }; | ||
| 566 | |||
| 567 | static struct mc13xxx_platform_data mx51_efika_mc13892_data = { | ||
| 568 | .flags = MC13XXX_USE_RTC, | ||
| 569 | .regulators = { | ||
| 570 | .num_regulators = ARRAY_SIZE(mx51_efika_regulators), | ||
| 571 | .regulators = mx51_efika_regulators, | ||
| 572 | }, | ||
| 573 | }; | ||
| 574 | |||
| 575 | static struct spi_board_info mx51_efika_spi_board_info[] __initdata = { | ||
| 576 | { | ||
| 577 | .modalias = "m25p80", | ||
| 578 | .max_speed_hz = 25000000, | ||
| 579 | .bus_num = 0, | ||
| 580 | .chip_select = 1, | ||
| 581 | .platform_data = &mx51_efika_spi_flash_data, | ||
| 582 | .irq = -1, | ||
| 583 | }, | ||
| 584 | { | ||
| 585 | .modalias = "mc13892", | ||
| 586 | .max_speed_hz = 1000000, | ||
| 587 | .bus_num = 0, | ||
| 588 | .chip_select = 0, | ||
| 589 | .platform_data = &mx51_efika_mc13892_data, | ||
| 590 | /* irq number is run-time assigned */ | ||
| 591 | }, | ||
| 592 | }; | ||
| 593 | |||
| 594 | static int mx51_efika_spi_cs[] = { | ||
| 595 | EFIKAMX_SPI_CS0, | ||
| 596 | EFIKAMX_SPI_CS1, | ||
| 597 | }; | ||
| 598 | |||
| 599 | static const struct spi_imx_master mx51_efika_spi_pdata __initconst = { | ||
| 600 | .chipselect = mx51_efika_spi_cs, | ||
| 601 | .num_chipselect = ARRAY_SIZE(mx51_efika_spi_cs), | ||
| 602 | }; | ||
| 603 | |||
| 604 | void __init efika_board_common_init(void) | ||
| 605 | { | ||
| 606 | mxc_iomux_v3_setup_multiple_pads(mx51efika_pads, | ||
| 607 | ARRAY_SIZE(mx51efika_pads)); | ||
| 608 | imx51_add_imx_uart(0, &uart_pdata); | ||
| 609 | mx51_efika_usb(); | ||
| 610 | |||
| 611 | /* FIXME: comes from original code. check this. */ | ||
| 612 | if (mx51_revision() < IMX_CHIP_REVISION_2_0) | ||
| 613 | sw2_init.constraints.state_mem.uV = 1100000; | ||
| 614 | else if (mx51_revision() == IMX_CHIP_REVISION_2_0) { | ||
| 615 | sw2_init.constraints.state_mem.uV = 1250000; | ||
| 616 | sw1_init.constraints.state_mem.uV = 1000000; | ||
| 617 | } | ||
| 618 | if (machine_is_mx51_efikasb()) | ||
| 619 | vgen1_init.constraints.max_uV = 1200000; | ||
| 620 | |||
| 621 | gpio_request(EFIKAMX_PMIC, "pmic irq"); | ||
| 622 | gpio_direction_input(EFIKAMX_PMIC); | ||
| 623 | mx51_efika_spi_board_info[1].irq = gpio_to_irq(EFIKAMX_PMIC); | ||
| 624 | spi_register_board_info(mx51_efika_spi_board_info, | ||
| 625 | ARRAY_SIZE(mx51_efika_spi_board_info)); | ||
| 626 | imx51_add_ecspi(0, &mx51_efika_spi_pdata); | ||
| 627 | |||
| 628 | imx51_add_pata_imx(); | ||
| 629 | |||
| 630 | #if defined(CONFIG_CPU_FREQ_IMX) | ||
| 631 | get_cpu_op = mx51_get_cpu_op; | ||
| 632 | #endif | ||
| 633 | } | ||
diff --git a/arch/arm/mach-mmp/Kconfig b/arch/arm/mach-mmp/Kconfig index 7fddd01b85b9..d697d07a1bf0 100644 --- a/arch/arm/mach-mmp/Kconfig +++ b/arch/arm/mach-mmp/Kconfig | |||
| @@ -108,18 +108,21 @@ endmenu | |||
| 108 | config CPU_PXA168 | 108 | config CPU_PXA168 |
| 109 | bool | 109 | bool |
| 110 | select CPU_MOHAWK | 110 | select CPU_MOHAWK |
| 111 | select COMMON_CLK | ||
| 111 | help | 112 | help |
| 112 | Select code specific to PXA168 | 113 | Select code specific to PXA168 |
| 113 | 114 | ||
| 114 | config CPU_PXA910 | 115 | config CPU_PXA910 |
| 115 | bool | 116 | bool |
| 116 | select CPU_MOHAWK | 117 | select CPU_MOHAWK |
| 118 | select COMMON_CLK | ||
| 117 | help | 119 | help |
| 118 | Select code specific to PXA910 | 120 | Select code specific to PXA910 |
| 119 | 121 | ||
| 120 | config CPU_MMP2 | 122 | config CPU_MMP2 |
| 121 | bool | 123 | bool |
| 122 | select CPU_PJ4 | 124 | select CPU_PJ4 |
| 125 | select COMMON_CLK | ||
| 123 | help | 126 | help |
| 124 | Select code specific to MMP2. MMP2 is ARMv7 compatible. | 127 | Select code specific to MMP2. MMP2 is ARMv7 compatible. |
| 125 | 128 | ||
diff --git a/arch/arm/mach-mmp/mmp2.c b/arch/arm/mach-mmp/mmp2.c index c709a24a9d25..c2bb95cf1a82 100644 --- a/arch/arm/mach-mmp/mmp2.c +++ b/arch/arm/mach-mmp/mmp2.c | |||
| @@ -163,7 +163,7 @@ static int __init mmp2_init(void) | |||
| 163 | { | 163 | { |
| 164 | if (cpu_is_mmp2()) { | 164 | if (cpu_is_mmp2()) { |
| 165 | #ifdef CONFIG_CACHE_TAUROS2 | 165 | #ifdef CONFIG_CACHE_TAUROS2 |
| 166 | tauros2_init(); | 166 | tauros2_init(0); |
| 167 | #endif | 167 | #endif |
| 168 | mfp_init_base(MFPR_VIRT_BASE); | 168 | mfp_init_base(MFPR_VIRT_BASE); |
| 169 | mfp_init_addr(mmp2_addr_map); | 169 | mfp_init_addr(mmp2_addr_map); |
diff --git a/arch/arm/mach-mmp/pxa910.c b/arch/arm/mach-mmp/pxa910.c index 6da52e9f2bdc..51ac8d1898c1 100644 --- a/arch/arm/mach-mmp/pxa910.c +++ b/arch/arm/mach-mmp/pxa910.c | |||
| @@ -14,6 +14,7 @@ | |||
| 14 | #include <linux/io.h> | 14 | #include <linux/io.h> |
| 15 | #include <linux/platform_device.h> | 15 | #include <linux/platform_device.h> |
| 16 | 16 | ||
| 17 | #include <asm/hardware/cache-tauros2.h> | ||
| 17 | #include <asm/mach/time.h> | 18 | #include <asm/mach/time.h> |
| 18 | #include <mach/addr-map.h> | 19 | #include <mach/addr-map.h> |
| 19 | #include <mach/regs-apbc.h> | 20 | #include <mach/regs-apbc.h> |
| @@ -116,6 +117,9 @@ static struct clk_lookup pxa910_clkregs[] = { | |||
| 116 | static int __init pxa910_init(void) | 117 | static int __init pxa910_init(void) |
| 117 | { | 118 | { |
| 118 | if (cpu_is_pxa910()) { | 119 | if (cpu_is_pxa910()) { |
| 120 | #ifdef CONFIG_CACHE_TAUROS2 | ||
| 121 | tauros2_init(0); | ||
| 122 | #endif | ||
| 119 | mfp_init_base(MFPR_VIRT_BASE); | 123 | mfp_init_base(MFPR_VIRT_BASE); |
| 120 | mfp_init_addr(pxa910_mfp_addr_map); | 124 | mfp_init_addr(pxa910_mfp_addr_map); |
| 121 | pxa_init_dma(IRQ_PXA910_DMA_INT0, 32); | 125 | pxa_init_dma(IRQ_PXA910_DMA_INT0, 32); |
diff --git a/arch/arm/mach-msm/Kconfig b/arch/arm/mach-msm/Kconfig index 1cd40ad301d3..b2740c800e8c 100644 --- a/arch/arm/mach-msm/Kconfig +++ b/arch/arm/mach-msm/Kconfig | |||
| @@ -38,8 +38,6 @@ config ARCH_QSD8X50 | |||
| 38 | 38 | ||
| 39 | config ARCH_MSM8X60 | 39 | config ARCH_MSM8X60 |
| 40 | bool "MSM8X60" | 40 | bool "MSM8X60" |
| 41 | select MACH_MSM8X60_SURF if (!MACH_MSM8X60_RUMI3 && !MACH_MSM8X60_SIM \ | ||
| 42 | && !MACH_MSM8X60_FFA) | ||
| 43 | select ARCH_MSM_SCORPIONMP | 41 | select ARCH_MSM_SCORPIONMP |
| 44 | select ARM_GIC | 42 | select ARM_GIC |
| 45 | select CPU_V7 | 43 | select CPU_V7 |
| @@ -47,16 +45,17 @@ config ARCH_MSM8X60 | |||
| 47 | select GPIO_MSM_V2 | 45 | select GPIO_MSM_V2 |
| 48 | select MSM_GPIOMUX | 46 | select MSM_GPIOMUX |
| 49 | select MSM_SCM if SMP | 47 | select MSM_SCM if SMP |
| 48 | select USE_OF | ||
| 50 | 49 | ||
| 51 | config ARCH_MSM8960 | 50 | config ARCH_MSM8960 |
| 52 | bool "MSM8960" | 51 | bool "MSM8960" |
| 53 | select ARCH_MSM_SCORPIONMP | 52 | select ARCH_MSM_SCORPIONMP |
| 54 | select MACH_MSM8960_SIM if (!MACH_MSM8960_RUMI3) | ||
| 55 | select ARM_GIC | 53 | select ARM_GIC |
| 56 | select CPU_V7 | 54 | select CPU_V7 |
| 57 | select MSM_V2_TLMM | 55 | select MSM_V2_TLMM |
| 58 | select MSM_GPIOMUX | 56 | select MSM_GPIOMUX |
| 59 | select MSM_SCM if SMP | 57 | select MSM_SCM if SMP |
| 58 | select USE_OF | ||
| 60 | 59 | ||
| 61 | endchoice | 60 | endchoice |
| 62 | 61 | ||
| @@ -112,42 +111,6 @@ config MACH_QSD8X50A_ST1_5 | |||
| 112 | help | 111 | help |
| 113 | Support for the Qualcomm ST1.5. | 112 | Support for the Qualcomm ST1.5. |
| 114 | 113 | ||
| 115 | config MACH_MSM8X60_RUMI3 | ||
| 116 | depends on ARCH_MSM8X60 | ||
| 117 | bool "MSM8x60 RUMI3" | ||
| 118 | help | ||
| 119 | Support for the Qualcomm MSM8x60 RUMI3 emulator. | ||
| 120 | |||
| 121 | config MACH_MSM8X60_SURF | ||
| 122 | depends on ARCH_MSM8X60 | ||
| 123 | bool "MSM8x60 SURF" | ||
| 124 | help | ||
| 125 | Support for the Qualcomm MSM8x60 SURF eval board. | ||
| 126 | |||
| 127 | config MACH_MSM8X60_SIM | ||
| 128 | depends on ARCH_MSM8X60 | ||
| 129 | bool "MSM8x60 Simulator" | ||
| 130 | help | ||
| 131 | Support for the Qualcomm MSM8x60 simulator. | ||
| 132 | |||
| 133 | config MACH_MSM8X60_FFA | ||
| 134 | depends on ARCH_MSM8X60 | ||
| 135 | bool "MSM8x60 FFA" | ||
| 136 | help | ||
| 137 | Support for the Qualcomm MSM8x60 FFA eval board. | ||
| 138 | |||
| 139 | config MACH_MSM8960_SIM | ||
| 140 | depends on ARCH_MSM8960 | ||
| 141 | bool "MSM8960 Simulator" | ||
| 142 | help | ||
| 143 | Support for the Qualcomm MSM8960 simulator. | ||
| 144 | |||
| 145 | config MACH_MSM8960_RUMI3 | ||
| 146 | depends on ARCH_MSM8960 | ||
| 147 | bool "MSM8960 RUMI3" | ||
| 148 | help | ||
| 149 | Support for the Qualcomm MSM8960 RUMI3 emulator. | ||
| 150 | |||
| 151 | endmenu | 114 | endmenu |
| 152 | 115 | ||
| 153 | config MSM_SMD_PKG3 | 116 | config MSM_SMD_PKG3 |
diff --git a/arch/arm/mach-msm/Makefile b/arch/arm/mach-msm/Makefile index 4ad3969b9881..17519faf082f 100644 --- a/arch/arm/mach-msm/Makefile +++ b/arch/arm/mach-msm/Makefile | |||
| @@ -1,11 +1,11 @@ | |||
| 1 | obj-y += io.o idle.o timer.o | 1 | obj-y += io.o timer.o |
| 2 | obj-y += clock.o | 2 | obj-y += clock.o |
| 3 | obj-$(CONFIG_DEBUG_FS) += clock-debug.o | 3 | obj-$(CONFIG_DEBUG_FS) += clock-debug.o |
| 4 | 4 | ||
| 5 | obj-$(CONFIG_MSM_VIC) += irq-vic.o | 5 | obj-$(CONFIG_MSM_VIC) += irq-vic.o |
| 6 | obj-$(CONFIG_MSM_IOMMU) += devices-iommu.o | 6 | obj-$(CONFIG_MSM_IOMMU) += devices-iommu.o |
| 7 | 7 | ||
| 8 | obj-$(CONFIG_ARCH_MSM7X00A) += dma.o irq.o acpuclock-arm11.o | 8 | obj-$(CONFIG_ARCH_MSM7X00A) += dma.o irq.o |
| 9 | obj-$(CONFIG_ARCH_MSM7X30) += dma.o | 9 | obj-$(CONFIG_ARCH_MSM7X30) += dma.o |
| 10 | obj-$(CONFIG_ARCH_QSD8X50) += dma.o sirc.o | 10 | obj-$(CONFIG_ARCH_QSD8X50) += dma.o sirc.o |
| 11 | 11 | ||
| @@ -25,8 +25,8 @@ obj-$(CONFIG_MACH_TROUT) += board-trout.o board-trout-gpio.o board-trout-mmc.o b | |||
| 25 | obj-$(CONFIG_MACH_HALIBUT) += board-halibut.o devices-msm7x00.o | 25 | obj-$(CONFIG_MACH_HALIBUT) += board-halibut.o devices-msm7x00.o |
| 26 | obj-$(CONFIG_ARCH_MSM7X30) += board-msm7x30.o devices-msm7x30.o | 26 | obj-$(CONFIG_ARCH_MSM7X30) += board-msm7x30.o devices-msm7x30.o |
| 27 | obj-$(CONFIG_ARCH_QSD8X50) += board-qsd8x50.o devices-qsd8x50.o | 27 | obj-$(CONFIG_ARCH_QSD8X50) += board-qsd8x50.o devices-qsd8x50.o |
| 28 | obj-$(CONFIG_ARCH_MSM8X60) += board-msm8x60.o | 28 | obj-$(CONFIG_ARCH_MSM8X60) += board-dt-8660.o |
| 29 | obj-$(CONFIG_ARCH_MSM8960) += board-msm8960.o devices-msm8960.o | 29 | obj-$(CONFIG_ARCH_MSM8960) += board-dt-8960.o |
| 30 | 30 | ||
| 31 | obj-$(CONFIG_ARCH_MSM7X30) += gpiomux-v1.o gpiomux.o | 31 | obj-$(CONFIG_ARCH_MSM7X30) += gpiomux-v1.o gpiomux.o |
| 32 | obj-$(CONFIG_ARCH_QSD8X50) += gpiomux-8x50.o gpiomux-v1.o gpiomux.o | 32 | obj-$(CONFIG_ARCH_QSD8X50) += gpiomux-8x50.o gpiomux-v1.o gpiomux.o |
diff --git a/arch/arm/mach-msm/Makefile.boot b/arch/arm/mach-msm/Makefile.boot index 9b803a578b4d..f7d6ae9c3487 100644 --- a/arch/arm/mach-msm/Makefile.boot +++ b/arch/arm/mach-msm/Makefile.boot | |||
| @@ -1,3 +1,6 @@ | |||
| 1 | zreladdr-y += 0x10008000 | 1 | zreladdr-y += 0x10008000 |
| 2 | params_phys-y := 0x10000100 | 2 | params_phys-y := 0x10000100 |
| 3 | initrd_phys-y := 0x10800000 | 3 | initrd_phys-y := 0x10800000 |
| 4 | |||
| 5 | dtb-$(CONFIG_ARCH_MSM8X60) += msm8660-surf.dtb | ||
| 6 | dtb-$(CONFIG_ARCH_MSM8960) += msm8960-cdp.dtb | ||
diff --git a/arch/arm/mach-msm/acpuclock-arm11.c b/arch/arm/mach-msm/acpuclock-arm11.c deleted file mode 100644 index 805d4ee53f7e..000000000000 --- a/arch/arm/mach-msm/acpuclock-arm11.c +++ /dev/null | |||
| @@ -1,525 +0,0 @@ | |||
| 1 | /* arch/arm/mach-msm/acpuclock.c | ||
| 2 | * | ||
| 3 | * MSM architecture clock driver | ||
| 4 | * | ||
| 5 | * Copyright (C) 2007 Google, Inc. | ||
| 6 | * Copyright (c) 2007 QUALCOMM Incorporated | ||
| 7 | * Author: San Mehat <san@android.com> | ||
| 8 | * | ||
| 9 | * This software is licensed under the terms of the GNU General Public | ||
| 10 | * License version 2, as published by the Free Software Foundation, and | ||
| 11 | * may be copied, distributed, and modified under those terms. | ||
| 12 | * | ||
| 13 | * This program is distributed in the hope that it will be useful, | ||
| 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 16 | * GNU General Public License for more details. | ||
| 17 | * | ||
| 18 | */ | ||
| 19 | |||
| 20 | #include <linux/kernel.h> | ||
| 21 | #include <linux/init.h> | ||
| 22 | #include <linux/list.h> | ||
| 23 | #include <linux/errno.h> | ||
| 24 | #include <linux/string.h> | ||
| 25 | #include <linux/delay.h> | ||
| 26 | #include <linux/clk.h> | ||
| 27 | #include <linux/cpufreq.h> | ||
| 28 | #include <linux/mutex.h> | ||
| 29 | #include <linux/io.h> | ||
| 30 | #include <mach/board.h> | ||
| 31 | #include <mach/msm_iomap.h> | ||
| 32 | |||
| 33 | #include "proc_comm.h" | ||
| 34 | #include "acpuclock.h" | ||
| 35 | |||
| 36 | |||
| 37 | #define A11S_CLK_CNTL_ADDR (MSM_CSR_BASE + 0x100) | ||
| 38 | #define A11S_CLK_SEL_ADDR (MSM_CSR_BASE + 0x104) | ||
| 39 | #define A11S_VDD_SVS_PLEVEL_ADDR (MSM_CSR_BASE + 0x124) | ||
| 40 | |||
| 41 | /* | ||
| 42 | * ARM11 clock configuration for specific ACPU speeds | ||
| 43 | */ | ||
| 44 | |||
| 45 | #define ACPU_PLL_TCXO -1 | ||
| 46 | #define ACPU_PLL_0 0 | ||
| 47 | #define ACPU_PLL_1 1 | ||
| 48 | #define ACPU_PLL_2 2 | ||
| 49 | #define ACPU_PLL_3 3 | ||
| 50 | |||
| 51 | #define PERF_SWITCH_DEBUG 0 | ||
| 52 | #define PERF_SWITCH_STEP_DEBUG 0 | ||
| 53 | |||
| 54 | struct clock_state | ||
| 55 | { | ||
| 56 | struct clkctl_acpu_speed *current_speed; | ||
| 57 | struct mutex lock; | ||
| 58 | uint32_t acpu_switch_time_us; | ||
| 59 | uint32_t max_speed_delta_khz; | ||
| 60 | uint32_t vdd_switch_time_us; | ||
| 61 | unsigned long power_collapse_khz; | ||
| 62 | unsigned long wait_for_irq_khz; | ||
| 63 | }; | ||
| 64 | |||
| 65 | static struct clk *ebi1_clk; | ||
| 66 | static struct clock_state drv_state = { 0 }; | ||
| 67 | |||
| 68 | static void __init acpuclk_init(void); | ||
| 69 | |||
| 70 | /* MSM7201A Levels 3-6 all correspond to 1.2V, level 7 corresponds to 1.325V. */ | ||
| 71 | enum { | ||
| 72 | VDD_0 = 0, | ||
| 73 | VDD_1 = 1, | ||
| 74 | VDD_2 = 2, | ||
| 75 | VDD_3 = 3, | ||
| 76 | VDD_4 = 3, | ||
| 77 | VDD_5 = 3, | ||
| 78 | VDD_6 = 3, | ||
| 79 | VDD_7 = 7, | ||
| 80 | VDD_END | ||
| 81 | }; | ||
| 82 | |||
| 83 | struct clkctl_acpu_speed { | ||
| 84 | unsigned int a11clk_khz; | ||
| 85 | int pll; | ||
| 86 | unsigned int a11clk_src_sel; | ||
| 87 | unsigned int a11clk_src_div; | ||
| 88 | unsigned int ahbclk_khz; | ||
| 89 | unsigned int ahbclk_div; | ||
| 90 | int vdd; | ||
| 91 | unsigned int axiclk_khz; | ||
| 92 | unsigned long lpj; /* loops_per_jiffy */ | ||
| 93 | /* Index in acpu_freq_tbl[] for steppings. */ | ||
| 94 | short down; | ||
| 95 | short up; | ||
| 96 | }; | ||
| 97 | |||
| 98 | /* | ||
| 99 | * ACPU speed table. Complete table is shown but certain speeds are commented | ||
| 100 | * out to optimized speed switching. Initialize loops_per_jiffy to 0. | ||
| 101 | * | ||
| 102 | * Table stepping up/down is optimized for 256mhz jumps while staying on the | ||
| 103 | * same PLL. | ||
| 104 | */ | ||
| 105 | #if (0) | ||
| 106 | static struct clkctl_acpu_speed acpu_freq_tbl[] = { | ||
| 107 | { 19200, ACPU_PLL_TCXO, 0, 0, 19200, 0, VDD_0, 30720, 0, 0, 8 }, | ||
| 108 | { 61440, ACPU_PLL_0, 4, 3, 61440, 0, VDD_0, 30720, 0, 0, 8 }, | ||
| 109 | { 81920, ACPU_PLL_0, 4, 2, 40960, 1, VDD_0, 61440, 0, 0, 8 }, | ||
| 110 | { 96000, ACPU_PLL_1, 1, 7, 48000, 1, VDD_0, 61440, 0, 0, 9 }, | ||
| 111 | { 122880, ACPU_PLL_0, 4, 1, 61440, 1, VDD_3, 61440, 0, 0, 8 }, | ||
| 112 | { 128000, ACPU_PLL_1, 1, 5, 64000, 1, VDD_3, 61440, 0, 0, 12 }, | ||
| 113 | { 176000, ACPU_PLL_2, 2, 5, 88000, 1, VDD_3, 61440, 0, 0, 11 }, | ||
| 114 | { 192000, ACPU_PLL_1, 1, 3, 64000, 2, VDD_3, 61440, 0, 0, 12 }, | ||
| 115 | { 245760, ACPU_PLL_0, 4, 0, 81920, 2, VDD_4, 61440, 0, 0, 12 }, | ||
| 116 | { 256000, ACPU_PLL_1, 1, 2, 128000, 2, VDD_5, 128000, 0, 0, 12 }, | ||
| 117 | { 264000, ACPU_PLL_2, 2, 3, 88000, 2, VDD_5, 128000, 0, 6, 13 }, | ||
| 118 | { 352000, ACPU_PLL_2, 2, 2, 88000, 3, VDD_5, 128000, 0, 6, 13 }, | ||
| 119 | { 384000, ACPU_PLL_1, 1, 1, 128000, 2, VDD_6, 128000, 0, 5, -1 }, | ||
| 120 | { 528000, ACPU_PLL_2, 2, 1, 132000, 3, VDD_7, 128000, 0, 11, -1 }, | ||
| 121 | { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, | ||
| 122 | }; | ||
| 123 | #else /* Table of freq we currently use. */ | ||
| 124 | static struct clkctl_acpu_speed acpu_freq_tbl[] = { | ||
| 125 | { 19200, ACPU_PLL_TCXO, 0, 0, 19200, 0, VDD_0, 30720, 0, 0, 4 }, | ||
| 126 | { 122880, ACPU_PLL_0, 4, 1, 61440, 1, VDD_3, 61440, 0, 0, 4 }, | ||
| 127 | { 128000, ACPU_PLL_1, 1, 5, 64000, 1, VDD_3, 61440, 0, 0, 6 }, | ||
| 128 | { 176000, ACPU_PLL_2, 2, 5, 88000, 1, VDD_3, 61440, 0, 0, 5 }, | ||
| 129 | { 245760, ACPU_PLL_0, 4, 0, 81920, 2, VDD_4, 61440, 0, 0, 5 }, | ||
| 130 | { 352000, ACPU_PLL_2, 2, 2, 88000, 3, VDD_5, 128000, 0, 3, 7 }, | ||
| 131 | { 384000, ACPU_PLL_1, 1, 1, 128000, 2, VDD_6, 128000, 0, 2, -1 }, | ||
| 132 | { 528000, ACPU_PLL_2, 2, 1, 132000, 3, VDD_7, 128000, 0, 5, -1 }, | ||
| 133 | { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, | ||
| 134 | }; | ||
| 135 | #endif | ||
| 136 | |||
| 137 | |||
| 138 | #ifdef CONFIG_CPU_FREQ_TABLE | ||
| 139 | static struct cpufreq_frequency_table freq_table[] = { | ||
| 140 | { 0, 122880 }, | ||
| 141 | { 1, 128000 }, | ||
| 142 | { 2, 245760 }, | ||
| 143 | { 3, 384000 }, | ||
| 144 | { 4, 528000 }, | ||
| 145 | { 5, CPUFREQ_TABLE_END }, | ||
| 146 | }; | ||
| 147 | #endif | ||
| 148 | |||
| 149 | static int pc_pll_request(unsigned id, unsigned on) | ||
| 150 | { | ||
| 151 | int res; | ||
| 152 | on = !!on; | ||
| 153 | |||
| 154 | #if PERF_SWITCH_DEBUG | ||
| 155 | if (on) | ||
| 156 | printk(KERN_DEBUG "Enabling PLL %d\n", id); | ||
| 157 | else | ||
| 158 | printk(KERN_DEBUG "Disabling PLL %d\n", id); | ||
| 159 | #endif | ||
| 160 | |||
| 161 | res = msm_proc_comm(PCOM_CLKCTL_RPC_PLL_REQUEST, &id, &on); | ||
| 162 | if (res < 0) | ||
| 163 | return res; | ||
| 164 | |||
| 165 | #if PERF_SWITCH_DEBUG | ||
| 166 | if (on) | ||
| 167 | printk(KERN_DEBUG "PLL %d enabled\n", id); | ||
| 168 | else | ||
| 169 | printk(KERN_DEBUG "PLL %d disabled\n", id); | ||
| 170 | #endif | ||
| 171 | return res; | ||
| 172 | } | ||
| 173 | |||
| 174 | |||
| 175 | /*---------------------------------------------------------------------------- | ||
| 176 | * ARM11 'owned' clock control | ||
| 177 | *---------------------------------------------------------------------------*/ | ||
| 178 | |||
| 179 | unsigned long acpuclk_power_collapse(void) { | ||
| 180 | int ret = acpuclk_get_rate(); | ||
| 181 | ret *= 1000; | ||
| 182 | if (ret > drv_state.power_collapse_khz) | ||
| 183 | acpuclk_set_rate(drv_state.power_collapse_khz, 1); | ||
| 184 | return ret; | ||
| 185 | } | ||
| 186 | |||
| 187 | unsigned long acpuclk_get_wfi_rate(void) | ||
| 188 | { | ||
| 189 | return drv_state.wait_for_irq_khz; | ||
| 190 | } | ||
| 191 | |||
| 192 | unsigned long acpuclk_wait_for_irq(void) { | ||
| 193 | int ret = acpuclk_get_rate(); | ||
| 194 | ret *= 1000; | ||
| 195 | if (ret > drv_state.wait_for_irq_khz) | ||
| 196 | acpuclk_set_rate(drv_state.wait_for_irq_khz, 1); | ||
| 197 | return ret; | ||
| 198 | } | ||
| 199 | |||
| 200 | static int acpuclk_set_vdd_level(int vdd) | ||
| 201 | { | ||
| 202 | uint32_t current_vdd; | ||
| 203 | |||
| 204 | current_vdd = readl(A11S_VDD_SVS_PLEVEL_ADDR) & 0x07; | ||
| 205 | |||
| 206 | #if PERF_SWITCH_DEBUG | ||
| 207 | printk(KERN_DEBUG "acpuclock: Switching VDD from %u -> %d\n", | ||
| 208 | current_vdd, vdd); | ||
| 209 | #endif | ||
| 210 | writel((1 << 7) | (vdd << 3), A11S_VDD_SVS_PLEVEL_ADDR); | ||
| 211 | udelay(drv_state.vdd_switch_time_us); | ||
| 212 | if ((readl(A11S_VDD_SVS_PLEVEL_ADDR) & 0x7) != vdd) { | ||
| 213 | #if PERF_SWITCH_DEBUG | ||
| 214 | printk(KERN_ERR "acpuclock: VDD set failed\n"); | ||
| 215 | #endif | ||
| 216 | return -EIO; | ||
| 217 | } | ||
| 218 | |||
| 219 | #if PERF_SWITCH_DEBUG | ||
| 220 | printk(KERN_DEBUG "acpuclock: VDD switched\n"); | ||
| 221 | #endif | ||
| 222 | return 0; | ||
| 223 | } | ||
| 224 | |||
| 225 | /* Set proper dividers for the given clock speed. */ | ||
| 226 | static void acpuclk_set_div(const struct clkctl_acpu_speed *hunt_s) { | ||
| 227 | uint32_t reg_clkctl, reg_clksel, clk_div; | ||
| 228 | |||
| 229 | /* AHB_CLK_DIV */ | ||
| 230 | clk_div = (readl(A11S_CLK_SEL_ADDR) >> 1) & 0x03; | ||
| 231 | /* | ||
| 232 | * If the new clock divider is higher than the previous, then | ||
| 233 | * program the divider before switching the clock | ||
| 234 | */ | ||
| 235 | if (hunt_s->ahbclk_div > clk_div) { | ||
| 236 | reg_clksel = readl(A11S_CLK_SEL_ADDR); | ||
| 237 | reg_clksel &= ~(0x3 << 1); | ||
| 238 | reg_clksel |= (hunt_s->ahbclk_div << 1); | ||
| 239 | writel(reg_clksel, A11S_CLK_SEL_ADDR); | ||
| 240 | } | ||
| 241 | if ((readl(A11S_CLK_SEL_ADDR) & 0x01) == 0) { | ||
| 242 | /* SRC0 */ | ||
| 243 | |||
| 244 | /* Program clock source */ | ||
| 245 | reg_clkctl = readl(A11S_CLK_CNTL_ADDR); | ||
| 246 | reg_clkctl &= ~(0x07 << 4); | ||
| 247 | reg_clkctl |= (hunt_s->a11clk_src_sel << 4); | ||
| 248 | writel(reg_clkctl, A11S_CLK_CNTL_ADDR); | ||
| 249 | |||
| 250 | /* Program clock divider */ | ||
| 251 | reg_clkctl = readl(A11S_CLK_CNTL_ADDR); | ||
| 252 | reg_clkctl &= ~0xf; | ||
| 253 | reg_clkctl |= hunt_s->a11clk_src_div; | ||
| 254 | writel(reg_clkctl, A11S_CLK_CNTL_ADDR); | ||
| 255 | |||
| 256 | /* Program clock source selection */ | ||
| 257 | reg_clksel = readl(A11S_CLK_SEL_ADDR); | ||
| 258 | reg_clksel |= 1; /* CLK_SEL_SRC1NO == SRC1 */ | ||
| 259 | writel(reg_clksel, A11S_CLK_SEL_ADDR); | ||
| 260 | } else { | ||
| 261 | /* SRC1 */ | ||
| 262 | |||
| 263 | /* Program clock source */ | ||
| 264 | reg_clkctl = readl(A11S_CLK_CNTL_ADDR); | ||
| 265 | reg_clkctl &= ~(0x07 << 12); | ||
| 266 | reg_clkctl |= (hunt_s->a11clk_src_sel << 12); | ||
| 267 | writel(reg_clkctl, A11S_CLK_CNTL_ADDR); | ||
| 268 | |||
| 269 | /* Program clock divider */ | ||
| 270 | reg_clkctl = readl(A11S_CLK_CNTL_ADDR); | ||
| 271 | reg_clkctl &= ~(0xf << 8); | ||
| 272 | reg_clkctl |= (hunt_s->a11clk_src_div << 8); | ||
| 273 | writel(reg_clkctl, A11S_CLK_CNTL_ADDR); | ||
| 274 | |||
| 275 | /* Program clock source selection */ | ||
| 276 | reg_clksel = readl(A11S_CLK_SEL_ADDR); | ||
| 277 | reg_clksel &= ~1; /* CLK_SEL_SRC1NO == SRC0 */ | ||
| 278 | writel(reg_clksel, A11S_CLK_SEL_ADDR); | ||
| 279 | } | ||
| 280 | |||
| 281 | /* | ||
| 282 | * If the new clock divider is lower than the previous, then | ||
| 283 | * program the divider after switching the clock | ||
| 284 | */ | ||
| 285 | if (hunt_s->ahbclk_div < clk_div) { | ||
| 286 | reg_clksel = readl(A11S_CLK_SEL_ADDR); | ||
| 287 | reg_clksel &= ~(0x3 << 1); | ||
| 288 | reg_clksel |= (hunt_s->ahbclk_div << 1); | ||
| 289 | writel(reg_clksel, A11S_CLK_SEL_ADDR); | ||
| 290 | } | ||
| 291 | } | ||
| 292 | |||
| 293 | int acpuclk_set_rate(unsigned long rate, int for_power_collapse) | ||
| 294 | { | ||
| 295 | uint32_t reg_clkctl; | ||
| 296 | struct clkctl_acpu_speed *cur_s, *tgt_s, *strt_s; | ||
| 297 | int rc = 0; | ||
| 298 | unsigned int plls_enabled = 0, pll; | ||
| 299 | |||
| 300 | strt_s = cur_s = drv_state.current_speed; | ||
| 301 | |||
| 302 | WARN_ONCE(cur_s == NULL, "acpuclk_set_rate: not initialized\n"); | ||
| 303 | if (cur_s == NULL) | ||
| 304 | return -ENOENT; | ||
| 305 | |||
| 306 | if (rate == (cur_s->a11clk_khz * 1000)) | ||
| 307 | return 0; | ||
| 308 | |||
| 309 | for (tgt_s = acpu_freq_tbl; tgt_s->a11clk_khz != 0; tgt_s++) { | ||
| 310 | if (tgt_s->a11clk_khz == (rate / 1000)) | ||
| 311 | break; | ||
| 312 | } | ||
| 313 | |||
| 314 | if (tgt_s->a11clk_khz == 0) | ||
| 315 | return -EINVAL; | ||
| 316 | |||
| 317 | /* Choose the highest speed speed at or below 'rate' with same PLL. */ | ||
| 318 | if (for_power_collapse && tgt_s->a11clk_khz < cur_s->a11clk_khz) { | ||
| 319 | while (tgt_s->pll != ACPU_PLL_TCXO && tgt_s->pll != cur_s->pll) | ||
| 320 | tgt_s--; | ||
| 321 | } | ||
| 322 | |||
| 323 | if (strt_s->pll != ACPU_PLL_TCXO) | ||
| 324 | plls_enabled |= 1 << strt_s->pll; | ||
| 325 | |||
| 326 | if (!for_power_collapse) { | ||
| 327 | mutex_lock(&drv_state.lock); | ||
| 328 | if (strt_s->pll != tgt_s->pll && tgt_s->pll != ACPU_PLL_TCXO) { | ||
| 329 | rc = pc_pll_request(tgt_s->pll, 1); | ||
| 330 | if (rc < 0) { | ||
| 331 | pr_err("PLL%d enable failed (%d)\n", | ||
| 332 | tgt_s->pll, rc); | ||
| 333 | goto out; | ||
| 334 | } | ||
| 335 | plls_enabled |= 1 << tgt_s->pll; | ||
| 336 | } | ||
| 337 | /* Increase VDD if needed. */ | ||
| 338 | if (tgt_s->vdd > cur_s->vdd) { | ||
| 339 | if ((rc = acpuclk_set_vdd_level(tgt_s->vdd)) < 0) { | ||
| 340 | printk(KERN_ERR "Unable to switch ACPU vdd\n"); | ||
| 341 | goto out; | ||
| 342 | } | ||
| 343 | } | ||
| 344 | } | ||
| 345 | |||
| 346 | /* Set wait states for CPU between frequency changes */ | ||
| 347 | reg_clkctl = readl(A11S_CLK_CNTL_ADDR); | ||
| 348 | reg_clkctl |= (100 << 16); /* set WT_ST_CNT */ | ||
| 349 | writel(reg_clkctl, A11S_CLK_CNTL_ADDR); | ||
| 350 | |||
| 351 | #if PERF_SWITCH_DEBUG | ||
| 352 | printk(KERN_INFO "acpuclock: Switching from ACPU rate %u -> %u\n", | ||
| 353 | strt_s->a11clk_khz * 1000, tgt_s->a11clk_khz * 1000); | ||
| 354 | #endif | ||
| 355 | |||
| 356 | while (cur_s != tgt_s) { | ||
| 357 | /* | ||
| 358 | * Always jump to target freq if within 256mhz, regulardless of | ||
| 359 | * PLL. If differnece is greater, use the predefinied | ||
| 360 | * steppings in the table. | ||
| 361 | */ | ||
| 362 | int d = abs((int)(cur_s->a11clk_khz - tgt_s->a11clk_khz)); | ||
| 363 | if (d > drv_state.max_speed_delta_khz) { | ||
| 364 | /* Step up or down depending on target vs current. */ | ||
| 365 | int clk_index = tgt_s->a11clk_khz > cur_s->a11clk_khz ? | ||
| 366 | cur_s->up : cur_s->down; | ||
| 367 | if (clk_index < 0) { /* This should not happen. */ | ||
| 368 | printk(KERN_ERR "cur:%u target: %u\n", | ||
| 369 | cur_s->a11clk_khz, tgt_s->a11clk_khz); | ||
| 370 | rc = -EINVAL; | ||
| 371 | goto out; | ||
| 372 | } | ||
| 373 | cur_s = &acpu_freq_tbl[clk_index]; | ||
| 374 | } else { | ||
| 375 | cur_s = tgt_s; | ||
| 376 | } | ||
| 377 | #if PERF_SWITCH_STEP_DEBUG | ||
| 378 | printk(KERN_DEBUG "%s: STEP khz = %u, pll = %d\n", | ||
| 379 | __FUNCTION__, cur_s->a11clk_khz, cur_s->pll); | ||
| 380 | #endif | ||
| 381 | if (!for_power_collapse&& cur_s->pll != ACPU_PLL_TCXO | ||
| 382 | && !(plls_enabled & (1 << cur_s->pll))) { | ||
| 383 | rc = pc_pll_request(cur_s->pll, 1); | ||
| 384 | if (rc < 0) { | ||
| 385 | pr_err("PLL%d enable failed (%d)\n", | ||
| 386 | cur_s->pll, rc); | ||
| 387 | goto out; | ||
| 388 | } | ||
| 389 | plls_enabled |= 1 << cur_s->pll; | ||
| 390 | } | ||
| 391 | |||
| 392 | acpuclk_set_div(cur_s); | ||
| 393 | drv_state.current_speed = cur_s; | ||
| 394 | /* Re-adjust lpj for the new clock speed. */ | ||
| 395 | loops_per_jiffy = cur_s->lpj; | ||
| 396 | udelay(drv_state.acpu_switch_time_us); | ||
| 397 | } | ||
| 398 | |||
| 399 | /* Nothing else to do for power collapse. */ | ||
| 400 | if (for_power_collapse) | ||
| 401 | return 0; | ||
| 402 | |||
| 403 | /* Disable PLLs we are not using anymore. */ | ||
| 404 | plls_enabled &= ~(1 << tgt_s->pll); | ||
| 405 | for (pll = ACPU_PLL_0; pll <= ACPU_PLL_2; pll++) | ||
| 406 | if (plls_enabled & (1 << pll)) { | ||
| 407 | rc = pc_pll_request(pll, 0); | ||
| 408 | if (rc < 0) { | ||
| 409 | pr_err("PLL%d disable failed (%d)\n", pll, rc); | ||
| 410 | goto out; | ||
| 411 | } | ||
| 412 | } | ||
| 413 | |||
| 414 | /* Change the AXI bus frequency if we can. */ | ||
| 415 | if (strt_s->axiclk_khz != tgt_s->axiclk_khz) { | ||
| 416 | rc = clk_set_rate(ebi1_clk, tgt_s->axiclk_khz * 1000); | ||
| 417 | if (rc < 0) | ||
| 418 | pr_err("Setting AXI min rate failed!\n"); | ||
| 419 | } | ||
| 420 | |||
| 421 | /* Drop VDD level if we can. */ | ||
| 422 | if (tgt_s->vdd < strt_s->vdd) { | ||
| 423 | if (acpuclk_set_vdd_level(tgt_s->vdd) < 0) | ||
| 424 | printk(KERN_ERR "acpuclock: Unable to drop ACPU vdd\n"); | ||
| 425 | } | ||
| 426 | |||
| 427 | #if PERF_SWITCH_DEBUG | ||
| 428 | printk(KERN_DEBUG "%s: ACPU speed change complete\n", __FUNCTION__); | ||
| 429 | #endif | ||
| 430 | out: | ||
| 431 | if (!for_power_collapse) | ||
| 432 | mutex_unlock(&drv_state.lock); | ||
| 433 | return rc; | ||
| 434 | } | ||
| 435 | |||
| 436 | static void __init acpuclk_init(void) | ||
| 437 | { | ||
| 438 | struct clkctl_acpu_speed *speed; | ||
| 439 | uint32_t div, sel; | ||
| 440 | int rc; | ||
| 441 | |||
| 442 | /* | ||
| 443 | * Determine the rate of ACPU clock | ||
| 444 | */ | ||
| 445 | |||
| 446 | if (!(readl(A11S_CLK_SEL_ADDR) & 0x01)) { /* CLK_SEL_SRC1N0 */ | ||
| 447 | /* CLK_SRC0_SEL */ | ||
| 448 | sel = (readl(A11S_CLK_CNTL_ADDR) >> 12) & 0x7; | ||
| 449 | /* CLK_SRC0_DIV */ | ||
| 450 | div = (readl(A11S_CLK_CNTL_ADDR) >> 8) & 0x0f; | ||
| 451 | } else { | ||
| 452 | /* CLK_SRC1_SEL */ | ||
| 453 | sel = (readl(A11S_CLK_CNTL_ADDR) >> 4) & 0x07; | ||
| 454 | /* CLK_SRC1_DIV */ | ||
| 455 | div = readl(A11S_CLK_CNTL_ADDR) & 0x0f; | ||
| 456 | } | ||
| 457 | |||
| 458 | for (speed = acpu_freq_tbl; speed->a11clk_khz != 0; speed++) { | ||
| 459 | if (speed->a11clk_src_sel == sel | ||
| 460 | && (speed->a11clk_src_div == div)) | ||
| 461 | break; | ||
| 462 | } | ||
| 463 | if (speed->a11clk_khz == 0) { | ||
| 464 | printk(KERN_WARNING "Warning - ACPU clock reports invalid speed\n"); | ||
| 465 | return; | ||
| 466 | } | ||
| 467 | |||
| 468 | drv_state.current_speed = speed; | ||
| 469 | |||
| 470 | rc = clk_set_rate(ebi1_clk, speed->axiclk_khz * 1000); | ||
| 471 | if (rc < 0) | ||
| 472 | pr_err("Setting AXI min rate failed!\n"); | ||
| 473 | |||
| 474 | printk(KERN_INFO "ACPU running at %d KHz\n", speed->a11clk_khz); | ||
| 475 | } | ||
| 476 | |||
| 477 | unsigned long acpuclk_get_rate(void) | ||
| 478 | { | ||
| 479 | WARN_ONCE(drv_state.current_speed == NULL, | ||
| 480 | "acpuclk_get_rate: not initialized\n"); | ||
| 481 | if (drv_state.current_speed) | ||
| 482 | return drv_state.current_speed->a11clk_khz; | ||
| 483 | else | ||
| 484 | return 0; | ||
| 485 | } | ||
| 486 | |||
| 487 | uint32_t acpuclk_get_switch_time(void) | ||
| 488 | { | ||
| 489 | return drv_state.acpu_switch_time_us; | ||
| 490 | } | ||
| 491 | |||
| 492 | /*---------------------------------------------------------------------------- | ||
| 493 | * Clock driver initialization | ||
| 494 | *---------------------------------------------------------------------------*/ | ||
| 495 | |||
| 496 | /* Initialize the lpj field in the acpu_freq_tbl. */ | ||
| 497 | static void __init lpj_init(void) | ||
| 498 | { | ||
| 499 | int i; | ||
| 500 | const struct clkctl_acpu_speed *base_clk = drv_state.current_speed; | ||
| 501 | for (i = 0; acpu_freq_tbl[i].a11clk_khz; i++) { | ||
| 502 | acpu_freq_tbl[i].lpj = cpufreq_scale(loops_per_jiffy, | ||
| 503 | base_clk->a11clk_khz, | ||
| 504 | acpu_freq_tbl[i].a11clk_khz); | ||
| 505 | } | ||
| 506 | } | ||
| 507 | |||
| 508 | void __init msm_acpu_clock_init(struct msm_acpu_clock_platform_data *clkdata) | ||
| 509 | { | ||
| 510 | pr_info("acpu_clock_init()\n"); | ||
| 511 | |||
| 512 | ebi1_clk = clk_get(NULL, "ebi1_clk"); | ||
| 513 | |||
| 514 | mutex_init(&drv_state.lock); | ||
| 515 | drv_state.acpu_switch_time_us = clkdata->acpu_switch_time_us; | ||
| 516 | drv_state.max_speed_delta_khz = clkdata->max_speed_delta_khz; | ||
| 517 | drv_state.vdd_switch_time_us = clkdata->vdd_switch_time_us; | ||
| 518 | drv_state.power_collapse_khz = clkdata->power_collapse_khz; | ||
| 519 | drv_state.wait_for_irq_khz = clkdata->wait_for_irq_khz; | ||
| 520 | acpuclk_init(); | ||
| 521 | lpj_init(); | ||
| 522 | #ifdef CONFIG_CPU_FREQ_TABLE | ||
| 523 | cpufreq_frequency_table_get_attr(freq_table, smp_processor_id()); | ||
| 524 | #endif | ||
| 525 | } | ||
diff --git a/arch/arm/mach-msm/acpuclock.h b/arch/arm/mach-msm/acpuclock.h deleted file mode 100644 index 415de2eb9a5e..000000000000 --- a/arch/arm/mach-msm/acpuclock.h +++ /dev/null | |||
| @@ -1,32 +0,0 @@ | |||
| 1 | /* arch/arm/mach-msm/acpuclock.h | ||
| 2 | * | ||
| 3 | * MSM architecture clock driver header | ||
| 4 | * | ||
| 5 | * Copyright (C) 2007 Google, Inc. | ||
| 6 | * Copyright (c) 2007 QUALCOMM Incorporated | ||
| 7 | * Author: San Mehat <san@android.com> | ||
| 8 | * | ||
| 9 | * This software is licensed under the terms of the GNU General Public | ||
| 10 | * License version 2, as published by the Free Software Foundation, and | ||
| 11 | * may be copied, distributed, and modified under those terms. | ||
| 12 | * | ||
| 13 | * This program is distributed in the hope that it will be useful, | ||
| 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 16 | * GNU General Public License for more details. | ||
| 17 | * | ||
| 18 | */ | ||
| 19 | |||
| 20 | #ifndef __ARCH_ARM_MACH_MSM_ACPUCLOCK_H | ||
| 21 | #define __ARCH_ARM_MACH_MSM_ACPUCLOCK_H | ||
| 22 | |||
| 23 | int acpuclk_set_rate(unsigned long rate, int for_power_collapse); | ||
| 24 | unsigned long acpuclk_get_rate(void); | ||
| 25 | uint32_t acpuclk_get_switch_time(void); | ||
| 26 | unsigned long acpuclk_wait_for_irq(void); | ||
| 27 | unsigned long acpuclk_power_collapse(void); | ||
| 28 | unsigned long acpuclk_get_wfi_rate(void); | ||
| 29 | |||
| 30 | |||
| 31 | #endif | ||
| 32 | |||
diff --git a/arch/arm/mach-msm/board-dt-8660.c b/arch/arm/mach-msm/board-dt-8660.c new file mode 100644 index 000000000000..f77f57f39104 --- /dev/null +++ b/arch/arm/mach-msm/board-dt-8660.c | |||
| @@ -0,0 +1,63 @@ | |||
| 1 | /* Copyright (c) 2010-2012, The Linux Foundation. All rights reserved. | ||
| 2 | * | ||
| 3 | * This program is free software; you can redistribute it and/or modify | ||
| 4 | * it under the terms of the GNU General Public License version 2 and | ||
| 5 | * only version 2 as published by the Free Software Foundation. | ||
| 6 | * | ||
| 7 | * This program is distributed in the hope that it will be useful, | ||
| 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 10 | * GNU General Public License for more details. | ||
| 11 | */ | ||
| 12 | |||
| 13 | #include <linux/init.h> | ||
| 14 | #include <linux/of.h> | ||
| 15 | #include <linux/of_irq.h> | ||
| 16 | #include <linux/of_platform.h> | ||
| 17 | |||
| 18 | #include <asm/mach/arch.h> | ||
| 19 | #include <asm/hardware/gic.h> | ||
| 20 | |||
| 21 | #include <mach/board.h> | ||
| 22 | #include "common.h" | ||
| 23 | |||
| 24 | static const struct of_device_id msm_dt_gic_match[] __initconst = { | ||
| 25 | { .compatible = "qcom,msm-8660-qgic", .data = gic_of_init }, | ||
| 26 | {} | ||
| 27 | }; | ||
| 28 | |||
| 29 | static void __init msm8x60_init_irq(void) | ||
| 30 | { | ||
| 31 | of_irq_init(msm_dt_gic_match); | ||
| 32 | } | ||
| 33 | |||
| 34 | static void __init msm8x60_init_late(void) | ||
| 35 | { | ||
| 36 | smd_debugfs_init(); | ||
| 37 | } | ||
| 38 | |||
| 39 | static struct of_dev_auxdata msm_auxdata_lookup[] __initdata = { | ||
| 40 | {} | ||
| 41 | }; | ||
| 42 | |||
| 43 | static void __init msm8x60_dt_init(void) | ||
| 44 | { | ||
| 45 | of_platform_populate(NULL, of_default_bus_match_table, | ||
| 46 | msm_auxdata_lookup, NULL); | ||
| 47 | } | ||
| 48 | |||
| 49 | static const char *msm8x60_fluid_match[] __initdata = { | ||
| 50 | "qcom,msm8660-fluid", | ||
| 51 | "qcom,msm8660-surf", | ||
| 52 | NULL | ||
| 53 | }; | ||
| 54 | |||
| 55 | DT_MACHINE_START(MSM_DT, "Qualcomm MSM (Flattened Device Tree)") | ||
| 56 | .map_io = msm_map_msm8x60_io, | ||
| 57 | .init_irq = msm8x60_init_irq, | ||
| 58 | .handle_irq = gic_handle_irq, | ||
| 59 | .init_machine = msm8x60_dt_init, | ||
| 60 | .init_late = msm8x60_init_late, | ||
| 61 | .timer = &msm_dt_timer, | ||
| 62 | .dt_compat = msm8x60_fluid_match, | ||
| 63 | MACHINE_END | ||
diff --git a/arch/arm/mach-msm/board-dt-8960.c b/arch/arm/mach-msm/board-dt-8960.c new file mode 100644 index 000000000000..8df99b8f3c92 --- /dev/null +++ b/arch/arm/mach-msm/board-dt-8960.c | |||
| @@ -0,0 +1,49 @@ | |||
| 1 | /* Copyright (c) 2012, The Linux Foundation. All rights reserved. | ||
| 2 | * | ||
| 3 | * This program is free software; you can redistribute it and/or modify | ||
| 4 | * it under the terms of the GNU General Public License version 2 and | ||
| 5 | * only version 2 as published by the Free Software Foundation. | ||
| 6 | * | ||
| 7 | * This program is distributed in the hope that it will be useful, | ||
| 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 10 | * GNU General Public License for more details. | ||
| 11 | */ | ||
| 12 | |||
| 13 | #include <linux/init.h> | ||
| 14 | #include <linux/of_irq.h> | ||
| 15 | #include <linux/of_platform.h> | ||
| 16 | |||
| 17 | #include <asm/hardware/gic.h> | ||
| 18 | #include <asm/mach/arch.h> | ||
| 19 | |||
| 20 | #include "common.h" | ||
| 21 | |||
| 22 | static const struct of_device_id msm_dt_gic_match[] __initconst = { | ||
| 23 | { .compatible = "qcom,msm-qgic2", .data = gic_of_init }, | ||
| 24 | { } | ||
| 25 | }; | ||
| 26 | |||
| 27 | static void __init msm_dt_init_irq(void) | ||
| 28 | { | ||
| 29 | of_irq_init(msm_dt_gic_match); | ||
| 30 | } | ||
| 31 | |||
| 32 | static void __init msm_dt_init(void) | ||
| 33 | { | ||
| 34 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); | ||
| 35 | } | ||
| 36 | |||
| 37 | static const char * const msm8960_dt_match[] __initconst = { | ||
| 38 | "qcom,msm8960-cdp", | ||
| 39 | NULL | ||
| 40 | }; | ||
| 41 | |||
| 42 | DT_MACHINE_START(MSM8960_DT, "Qualcomm MSM (Flattened Device Tree)") | ||
| 43 | .map_io = msm_map_msm8960_io, | ||
| 44 | .init_irq = msm_dt_init_irq, | ||
| 45 | .timer = &msm_dt_timer, | ||
| 46 | .init_machine = msm_dt_init, | ||
| 47 | .dt_compat = msm8960_dt_match, | ||
| 48 | .handle_irq = gic_handle_irq, | ||
| 49 | MACHINE_END | ||
diff --git a/arch/arm/mach-msm/board-halibut.c b/arch/arm/mach-msm/board-halibut.c index 4fa3e99d9a62..6ce542e2e21c 100644 --- a/arch/arm/mach-msm/board-halibut.c +++ b/arch/arm/mach-msm/board-halibut.c | |||
| @@ -36,6 +36,7 @@ | |||
| 36 | #include <linux/mtd/partitions.h> | 36 | #include <linux/mtd/partitions.h> |
| 37 | 37 | ||
| 38 | #include "devices.h" | 38 | #include "devices.h" |
| 39 | #include "common.h" | ||
| 39 | 40 | ||
| 40 | static struct resource smc91x_resources[] = { | 41 | static struct resource smc91x_resources[] = { |
| 41 | [0] = { | 42 | [0] = { |
| @@ -66,8 +67,6 @@ static struct platform_device *devices[] __initdata = { | |||
| 66 | &smc91x_device, | 67 | &smc91x_device, |
| 67 | }; | 68 | }; |
| 68 | 69 | ||
| 69 | extern struct sys_timer msm_timer; | ||
| 70 | |||
| 71 | static void __init halibut_init_early(void) | 70 | static void __init halibut_init_early(void) |
| 72 | { | 71 | { |
| 73 | arch_ioremap_caller = __msm_ioremap_caller; | 72 | arch_ioremap_caller = __msm_ioremap_caller; |
| @@ -107,5 +106,5 @@ MACHINE_START(HALIBUT, "Halibut Board (QCT SURF7200A)") | |||
| 107 | .init_irq = halibut_init_irq, | 106 | .init_irq = halibut_init_irq, |
| 108 | .init_machine = halibut_init, | 107 | .init_machine = halibut_init, |
| 109 | .init_late = halibut_init_late, | 108 | .init_late = halibut_init_late, |
| 110 | .timer = &msm_timer, | 109 | .timer = &msm7x01_timer, |
| 111 | MACHINE_END | 110 | MACHINE_END |
diff --git a/arch/arm/mach-msm/board-mahimahi.c b/arch/arm/mach-msm/board-mahimahi.c index cf1f89a5dc62..df00bc03ce74 100644 --- a/arch/arm/mach-msm/board-mahimahi.c +++ b/arch/arm/mach-msm/board-mahimahi.c | |||
| @@ -30,7 +30,6 @@ | |||
| 30 | 30 | ||
| 31 | #include <mach/board.h> | 31 | #include <mach/board.h> |
| 32 | #include <mach/hardware.h> | 32 | #include <mach/hardware.h> |
| 33 | #include <mach/system.h> | ||
| 34 | 33 | ||
| 35 | #include "board-mahimahi.h" | 34 | #include "board-mahimahi.h" |
| 36 | #include "devices.h" | 35 | #include "devices.h" |
diff --git a/arch/arm/mach-msm/board-msm7x27.c b/arch/arm/mach-msm/board-msm7x27.c deleted file mode 100644 index 451ab1d43c92..000000000000 --- a/arch/arm/mach-msm/board-msm7x27.c +++ /dev/null | |||
| @@ -1,170 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2007 Google, Inc. | ||
| 3 | * Copyright (c) 2008-2009, Code Aurora Forum. All rights reserved. | ||
| 4 | * Author: Brian Swetland <swetland@google.com> | ||
| 5 | * | ||
| 6 | * This software is licensed under the terms of the GNU General Public | ||
| 7 | * License version 2, as published by the Free Software Foundation, and | ||
| 8 | * may be copied, distributed, and modified under those terms. | ||
| 9 | * | ||
| 10 | * This program is distributed in the hope that it will be useful, | ||
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 13 | * GNU General Public License for more details. | ||
| 14 | * | ||
| 15 | */ | ||
| 16 | #include <linux/gpio.h> | ||
| 17 | #include <linux/kernel.h> | ||
| 18 | #include <linux/init.h> | ||
| 19 | #include <linux/platform_device.h> | ||
| 20 | #include <linux/input.h> | ||
| 21 | #include <linux/io.h> | ||
| 22 | #include <linux/delay.h> | ||
| 23 | #include <linux/power_supply.h> | ||
| 24 | |||
| 25 | #include <mach/hardware.h> | ||
| 26 | #include <asm/mach-types.h> | ||
| 27 | #include <asm/mach/arch.h> | ||
| 28 | #include <asm/mach/map.h> | ||
| 29 | #include <asm/mach/flash.h> | ||
| 30 | #include <asm/setup.h> | ||
| 31 | #ifdef CONFIG_CACHE_L2X0 | ||
| 32 | #include <asm/hardware/cache-l2x0.h> | ||
| 33 | #endif | ||
| 34 | |||
| 35 | #include <mach/vreg.h> | ||
| 36 | #include <mach/mpp.h> | ||
| 37 | #include <mach/board.h> | ||
| 38 | #include <mach/msm_iomap.h> | ||
| 39 | |||
| 40 | #include <linux/mtd/nand.h> | ||
| 41 | #include <linux/mtd/partitions.h> | ||
| 42 | |||
| 43 | #include "devices.h" | ||
| 44 | #include "socinfo.h" | ||
| 45 | #include "clock.h" | ||
| 46 | |||
| 47 | static struct resource smc91x_resources[] = { | ||
| 48 | [0] = { | ||
| 49 | .start = 0x9C004300, | ||
| 50 | .end = 0x9C0043ff, | ||
| 51 | .flags = IORESOURCE_MEM, | ||
| 52 | }, | ||
| 53 | [1] = { | ||
| 54 | .start = MSM_GPIO_TO_INT(132), | ||
| 55 | .end = MSM_GPIO_TO_INT(132), | ||
| 56 | .flags = IORESOURCE_IRQ, | ||
| 57 | }, | ||
| 58 | }; | ||
| 59 | |||
| 60 | static struct platform_device smc91x_device = { | ||
| 61 | .name = "smc91x", | ||
| 62 | .id = 0, | ||
| 63 | .num_resources = ARRAY_SIZE(smc91x_resources), | ||
| 64 | .resource = smc91x_resources, | ||
| 65 | }; | ||
| 66 | |||
| 67 | static struct platform_device *devices[] __initdata = { | ||
| 68 | &msm_device_uart3, | ||
| 69 | &msm_device_smd, | ||
| 70 | &msm_device_dmov, | ||
| 71 | &msm_device_nand, | ||
| 72 | &smc91x_device, | ||
| 73 | }; | ||
| 74 | |||
| 75 | extern struct sys_timer msm_timer; | ||
| 76 | |||
| 77 | static void __init msm7x2x_init_irq(void) | ||
| 78 | { | ||
| 79 | msm_init_irq(); | ||
| 80 | } | ||
| 81 | |||
| 82 | static void __init msm7x2x_init(void) | ||
| 83 | { | ||
| 84 | if (socinfo_init() < 0) | ||
| 85 | BUG(); | ||
| 86 | |||
| 87 | if (machine_is_msm7x25_ffa() || machine_is_msm7x27_ffa()) { | ||
| 88 | smc91x_resources[0].start = 0x98000300; | ||
| 89 | smc91x_resources[0].end = 0x980003ff; | ||
| 90 | smc91x_resources[1].start = MSM_GPIO_TO_INT(85); | ||
| 91 | smc91x_resources[1].end = MSM_GPIO_TO_INT(85); | ||
| 92 | if (gpio_tlmm_config(GPIO_CFG(85, 0, | ||
| 93 | GPIO_INPUT, | ||
| 94 | GPIO_PULL_DOWN, | ||
| 95 | GPIO_2MA), | ||
| 96 | GPIO_ENABLE)) { | ||
| 97 | printk(KERN_ERR | ||
| 98 | "%s: Err: Config GPIO-85 INT\n", | ||
| 99 | __func__); | ||
| 100 | } | ||
| 101 | } | ||
| 102 | |||
| 103 | platform_add_devices(devices, ARRAY_SIZE(devices)); | ||
| 104 | } | ||
| 105 | |||
| 106 | static void __init msm7x2x_map_io(void) | ||
| 107 | { | ||
| 108 | msm_map_common_io(); | ||
| 109 | /* Technically dependent on the SoC but using machine_is | ||
| 110 | * macros since socinfo is not available this early and there | ||
| 111 | * are plans to restructure the code which will eliminate the | ||
| 112 | * need for socinfo. | ||
| 113 | */ | ||
| 114 | if (machine_is_msm7x27_surf() || machine_is_msm7x27_ffa()) | ||
| 115 | msm_clock_init(msm_clocks_7x27, msm_num_clocks_7x27); | ||
| 116 | |||
| 117 | if (machine_is_msm7x25_surf() || machine_is_msm7x25_ffa()) | ||
| 118 | msm_clock_init(msm_clocks_7x25, msm_num_clocks_7x25); | ||
| 119 | |||
| 120 | #ifdef CONFIG_CACHE_L2X0 | ||
| 121 | if (machine_is_msm7x27_surf() || machine_is_msm7x27_ffa()) { | ||
| 122 | /* 7x27 has 256KB L2 cache: | ||
| 123 | 64Kb/Way and 4-Way Associativity; | ||
| 124 | R/W latency: 3 cycles; | ||
| 125 | evmon/parity/share disabled. */ | ||
| 126 | l2x0_init(MSM_L2CC_BASE, 0x00068012, 0xfe000000); | ||
| 127 | } | ||
| 128 | #endif | ||
| 129 | } | ||
| 130 | |||
| 131 | static void __init msm7x2x_init_late(void) | ||
| 132 | { | ||
| 133 | smd_debugfs_init(); | ||
| 134 | } | ||
| 135 | |||
| 136 | MACHINE_START(MSM7X27_SURF, "QCT MSM7x27 SURF") | ||
| 137 | .atag_offset = 0x100, | ||
| 138 | .map_io = msm7x2x_map_io, | ||
| 139 | .init_irq = msm7x2x_init_irq, | ||
| 140 | .init_machine = msm7x2x_init, | ||
| 141 | .init_late = msm7x2x_init_late, | ||
| 142 | .timer = &msm_timer, | ||
| 143 | MACHINE_END | ||
| 144 | |||
| 145 | MACHINE_START(MSM7X27_FFA, "QCT MSM7x27 FFA") | ||
| 146 | .atag_offset = 0x100, | ||
| 147 | .map_io = msm7x2x_map_io, | ||
| 148 | .init_irq = msm7x2x_init_irq, | ||
| 149 | .init_machine = msm7x2x_init, | ||
| 150 | .init_late = msm7x2x_init_late, | ||
| 151 | .timer = &msm_timer, | ||
| 152 | MACHINE_END | ||
| 153 | |||
| 154 | MACHINE_START(MSM7X25_SURF, "QCT MSM7x25 SURF") | ||
| 155 | .atag_offset = 0x100, | ||
| 156 | .map_io = msm7x2x_map_io, | ||
| 157 | .init_irq = msm7x2x_init_irq, | ||
| 158 | .init_machine = msm7x2x_init, | ||
| 159 | .init_late = msm7x2x_init_late, | ||
| 160 | .timer = &msm_timer, | ||
| 161 | MACHINE_END | ||
| 162 | |||
| 163 | MACHINE_START(MSM7X25_FFA, "QCT MSM7x25 FFA") | ||
| 164 | .atag_offset = 0x100, | ||
| 165 | .map_io = msm7x2x_map_io, | ||
| 166 | .init_irq = msm7x2x_init_irq, | ||
| 167 | .init_machine = msm7x2x_init, | ||
| 168 | .init_late = msm7x2x_init_late, | ||
| 169 | .timer = &msm_timer, | ||
| 170 | MACHINE_END | ||
diff --git a/arch/arm/mach-msm/board-msm7x30.c b/arch/arm/mach-msm/board-msm7x30.c index a5001378135d..effa6f4336c7 100644 --- a/arch/arm/mach-msm/board-msm7x30.c +++ b/arch/arm/mach-msm/board-msm7x30.c | |||
| @@ -38,8 +38,7 @@ | |||
| 38 | #include "devices.h" | 38 | #include "devices.h" |
| 39 | #include "gpiomux.h" | 39 | #include "gpiomux.h" |
| 40 | #include "proc_comm.h" | 40 | #include "proc_comm.h" |
| 41 | 41 | #include "common.h" | |
| 42 | extern struct sys_timer msm_timer; | ||
| 43 | 42 | ||
| 44 | static void __init msm7x30_fixup(struct tag *tag, char **cmdline, | 43 | static void __init msm7x30_fixup(struct tag *tag, char **cmdline, |
| 45 | struct meminfo *mi) | 44 | struct meminfo *mi) |
| @@ -132,7 +131,7 @@ MACHINE_START(MSM7X30_SURF, "QCT MSM7X30 SURF") | |||
| 132 | .init_irq = msm7x30_init_irq, | 131 | .init_irq = msm7x30_init_irq, |
| 133 | .init_machine = msm7x30_init, | 132 | .init_machine = msm7x30_init, |
| 134 | .init_late = msm7x30_init_late, | 133 | .init_late = msm7x30_init_late, |
| 135 | .timer = &msm_timer, | 134 | .timer = &msm7x30_timer, |
| 136 | MACHINE_END | 135 | MACHINE_END |
| 137 | 136 | ||
| 138 | MACHINE_START(MSM7X30_FFA, "QCT MSM7X30 FFA") | 137 | MACHINE_START(MSM7X30_FFA, "QCT MSM7X30 FFA") |
| @@ -143,7 +142,7 @@ MACHINE_START(MSM7X30_FFA, "QCT MSM7X30 FFA") | |||
| 143 | .init_irq = msm7x30_init_irq, | 142 | .init_irq = msm7x30_init_irq, |
| 144 | .init_machine = msm7x30_init, | 143 | .init_machine = msm7x30_init, |
| 145 | .init_late = msm7x30_init_late, | 144 | .init_late = msm7x30_init_late, |
| 146 | .timer = &msm_timer, | 145 | .timer = &msm7x30_timer, |
| 147 | MACHINE_END | 146 | MACHINE_END |
| 148 | 147 | ||
| 149 | MACHINE_START(MSM7X30_FLUID, "QCT MSM7X30 FLUID") | 148 | MACHINE_START(MSM7X30_FLUID, "QCT MSM7X30 FLUID") |
| @@ -154,5 +153,5 @@ MACHINE_START(MSM7X30_FLUID, "QCT MSM7X30 FLUID") | |||
| 154 | .init_irq = msm7x30_init_irq, | 153 | .init_irq = msm7x30_init_irq, |
| 155 | .init_machine = msm7x30_init, | 154 | .init_machine = msm7x30_init, |
| 156 | .init_late = msm7x30_init_late, | 155 | .init_late = msm7x30_init_late, |
| 157 | .timer = &msm_timer, | 156 | .timer = &msm7x30_timer, |
| 158 | MACHINE_END | 157 | MACHINE_END |
diff --git a/arch/arm/mach-msm/board-msm8960.c b/arch/arm/mach-msm/board-msm8960.c deleted file mode 100644 index 65f4a1daa2e5..000000000000 --- a/arch/arm/mach-msm/board-msm8960.c +++ /dev/null | |||
| @@ -1,122 +0,0 @@ | |||
| 1 | /* Copyright (c) 2011, Code Aurora Forum. All rights reserved. | ||
| 2 | * | ||
| 3 | * This program is free software; you can redistribute it and/or modify | ||
| 4 | * it under the terms of the GNU General Public License version 2 and | ||
| 5 | * only version 2 as published by the Free Software Foundation. | ||
| 6 | * | ||
| 7 | * This program is distributed in the hope that it will be useful, | ||
| 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 10 | * GNU General Public License for more details. | ||
| 11 | * | ||
| 12 | * You should have received a copy of the GNU General Public License | ||
| 13 | * along with this program; if not, write to the Free Software | ||
| 14 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA | ||
| 15 | * 02110-1301, USA. | ||
| 16 | * | ||
| 17 | */ | ||
| 18 | #include <linux/kernel.h> | ||
| 19 | #include <linux/platform_device.h> | ||
| 20 | #include <linux/io.h> | ||
| 21 | #include <linux/irq.h> | ||
| 22 | #include <linux/clkdev.h> | ||
| 23 | #include <linux/memblock.h> | ||
| 24 | |||
| 25 | #include <asm/mach-types.h> | ||
| 26 | #include <asm/mach/arch.h> | ||
| 27 | #include <asm/hardware/gic.h> | ||
| 28 | #include <asm/setup.h> | ||
| 29 | |||
| 30 | #include <mach/board.h> | ||
| 31 | #include <mach/msm_iomap.h> | ||
| 32 | |||
| 33 | #include "devices.h" | ||
| 34 | |||
| 35 | static void __init msm8960_fixup(struct tag *tag, char **cmdline, | ||
| 36 | struct meminfo *mi) | ||
| 37 | { | ||
| 38 | for (; tag->hdr.size; tag = tag_next(tag)) | ||
| 39 | if (tag->hdr.tag == ATAG_MEM && | ||
| 40 | tag->u.mem.start == 0x40200000) { | ||
| 41 | tag->u.mem.start = 0x40000000; | ||
| 42 | tag->u.mem.size += SZ_2M; | ||
| 43 | } | ||
| 44 | } | ||
| 45 | |||
| 46 | static void __init msm8960_reserve(void) | ||
| 47 | { | ||
| 48 | memblock_remove(0x40000000, SZ_2M); | ||
| 49 | } | ||
| 50 | |||
| 51 | static void __init msm8960_map_io(void) | ||
| 52 | { | ||
| 53 | msm_map_msm8960_io(); | ||
| 54 | } | ||
| 55 | |||
| 56 | static void __init msm8960_init_irq(void) | ||
| 57 | { | ||
| 58 | unsigned int i; | ||
| 59 | gic_init(0, GIC_PPI_START, MSM_QGIC_DIST_BASE, | ||
| 60 | (void *)MSM_QGIC_CPU_BASE); | ||
| 61 | |||
| 62 | /* Edge trigger PPIs except AVS_SVICINT and AVS_SVICINTSWDONE */ | ||
| 63 | writel(0xFFFFD7FF, MSM_QGIC_DIST_BASE + GIC_DIST_CONFIG + 4); | ||
| 64 | |||
| 65 | if (machine_is_msm8960_rumi3()) | ||
| 66 | writel(0x0000FFFF, MSM_QGIC_DIST_BASE + GIC_DIST_ENABLE_SET); | ||
| 67 | |||
| 68 | /* FIXME: Not installing AVS_SVICINT and AVS_SVICINTSWDONE yet | ||
| 69 | * as they are configured as level, which does not play nice with | ||
| 70 | * handle_percpu_irq. | ||
| 71 | */ | ||
| 72 | for (i = GIC_PPI_START; i < GIC_SPI_START; i++) { | ||
| 73 | if (i != AVS_SVICINT && i != AVS_SVICINTSWDONE) | ||
| 74 | irq_set_handler(i, handle_percpu_irq); | ||
| 75 | } | ||
| 76 | } | ||
| 77 | |||
| 78 | static struct platform_device *sim_devices[] __initdata = { | ||
| 79 | &msm8960_device_uart_gsbi2, | ||
| 80 | }; | ||
| 81 | |||
| 82 | static struct platform_device *rumi3_devices[] __initdata = { | ||
| 83 | &msm8960_device_uart_gsbi5, | ||
| 84 | }; | ||
| 85 | |||
| 86 | static void __init msm8960_sim_init(void) | ||
| 87 | { | ||
| 88 | platform_add_devices(sim_devices, ARRAY_SIZE(sim_devices)); | ||
| 89 | } | ||
| 90 | |||
| 91 | static void __init msm8960_rumi3_init(void) | ||
| 92 | { | ||
| 93 | platform_add_devices(rumi3_devices, ARRAY_SIZE(rumi3_devices)); | ||
| 94 | } | ||
| 95 | |||
| 96 | static void __init msm8960_init_late(void) | ||
| 97 | { | ||
| 98 | smd_debugfs_init(); | ||
| 99 | } | ||
| 100 | |||
| 101 | MACHINE_START(MSM8960_SIM, "QCT MSM8960 SIMULATOR") | ||
| 102 | .fixup = msm8960_fixup, | ||
| 103 | .reserve = msm8960_reserve, | ||
| 104 | .map_io = msm8960_map_io, | ||
| 105 | .init_irq = msm8960_init_irq, | ||
| 106 | .timer = &msm_timer, | ||
| 107 | .handle_irq = gic_handle_irq, | ||
| 108 | .init_machine = msm8960_sim_init, | ||
| 109 | .init_late = msm8960_init_late, | ||
| 110 | MACHINE_END | ||
| 111 | |||
| 112 | MACHINE_START(MSM8960_RUMI3, "QCT MSM8960 RUMI3") | ||
| 113 | .fixup = msm8960_fixup, | ||
| 114 | .reserve = msm8960_reserve, | ||
| 115 | .map_io = msm8960_map_io, | ||
| 116 | .init_irq = msm8960_init_irq, | ||
| 117 | .timer = &msm_timer, | ||
| 118 | .handle_irq = gic_handle_irq, | ||
| 119 | .init_machine = msm8960_rumi3_init, | ||
| 120 | .init_late = msm8960_init_late, | ||
| 121 | MACHINE_END | ||
| 122 | |||
diff --git a/arch/arm/mach-msm/board-msm8x60.c b/arch/arm/mach-msm/board-msm8x60.c deleted file mode 100644 index e37a724cd1eb..000000000000 --- a/arch/arm/mach-msm/board-msm8x60.c +++ /dev/null | |||
| @@ -1,166 +0,0 @@ | |||
| 1 | /* Copyright (c) 2010, 2011, Code Aurora Forum. All rights reserved. | ||
| 2 | * | ||
| 3 | * This program is free software; you can redistribute it and/or modify | ||
| 4 | * it under the terms of the GNU General Public License version 2 and | ||
| 5 | * only version 2 as published by the Free Software Foundation. | ||
| 6 | * | ||
| 7 | * This program is distributed in the hope that it will be useful, | ||
| 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 10 | * GNU General Public License for more details. | ||
| 11 | */ | ||
| 12 | |||
| 13 | #include <linux/kernel.h> | ||
| 14 | #include <linux/platform_device.h> | ||
| 15 | #include <linux/io.h> | ||
| 16 | #include <linux/irq.h> | ||
| 17 | #include <linux/irqdomain.h> | ||
| 18 | #include <linux/of.h> | ||
| 19 | #include <linux/of_address.h> | ||
| 20 | #include <linux/of_irq.h> | ||
| 21 | #include <linux/of_platform.h> | ||
| 22 | #include <linux/memblock.h> | ||
| 23 | |||
| 24 | #include <asm/mach-types.h> | ||
| 25 | #include <asm/mach/arch.h> | ||
| 26 | #include <asm/hardware/gic.h> | ||
| 27 | #include <asm/setup.h> | ||
| 28 | |||
| 29 | #include <mach/board.h> | ||
| 30 | #include <mach/msm_iomap.h> | ||
| 31 | |||
| 32 | static void __init msm8x60_fixup(struct tag *tag, char **cmdline, | ||
| 33 | struct meminfo *mi) | ||
| 34 | { | ||
| 35 | for (; tag->hdr.size; tag = tag_next(tag)) | ||
| 36 | if (tag->hdr.tag == ATAG_MEM && | ||
| 37 | tag->u.mem.start == 0x40200000) { | ||
| 38 | tag->u.mem.start = 0x40000000; | ||
| 39 | tag->u.mem.size += SZ_2M; | ||
| 40 | } | ||
| 41 | } | ||
| 42 | |||
| 43 | static void __init msm8x60_reserve(void) | ||
| 44 | { | ||
| 45 | memblock_remove(0x40000000, SZ_2M); | ||
| 46 | } | ||
| 47 | |||
| 48 | static void __init msm8x60_map_io(void) | ||
| 49 | { | ||
| 50 | msm_map_msm8x60_io(); | ||
| 51 | } | ||
| 52 | |||
| 53 | #ifdef CONFIG_OF | ||
| 54 | static struct of_device_id msm_dt_gic_match[] __initdata = { | ||
| 55 | { .compatible = "qcom,msm-8660-qgic", .data = gic_of_init }, | ||
| 56 | {} | ||
| 57 | }; | ||
| 58 | #endif | ||
| 59 | |||
| 60 | static void __init msm8x60_init_irq(void) | ||
| 61 | { | ||
| 62 | if (!of_have_populated_dt()) | ||
| 63 | gic_init(0, GIC_PPI_START, MSM_QGIC_DIST_BASE, | ||
| 64 | (void *)MSM_QGIC_CPU_BASE); | ||
| 65 | #ifdef CONFIG_OF | ||
| 66 | else | ||
| 67 | of_irq_init(msm_dt_gic_match); | ||
| 68 | #endif | ||
| 69 | |||
| 70 | /* Edge trigger PPIs except AVS_SVICINT and AVS_SVICINTSWDONE */ | ||
| 71 | writel(0xFFFFD7FF, MSM_QGIC_DIST_BASE + GIC_DIST_CONFIG + 4); | ||
| 72 | |||
| 73 | /* RUMI does not adhere to GIC spec by enabling STIs by default. | ||
| 74 | * Enable/clear is supposed to be RO for STIs, but is RW on RUMI. | ||
| 75 | */ | ||
| 76 | if (!machine_is_msm8x60_sim()) | ||
| 77 | writel(0x0000FFFF, MSM_QGIC_DIST_BASE + GIC_DIST_ENABLE_SET); | ||
| 78 | } | ||
| 79 | |||
| 80 | static void __init msm8x60_init(void) | ||
| 81 | { | ||
| 82 | } | ||
| 83 | |||
| 84 | static void __init msm8x60_init_late(void) | ||
| 85 | { | ||
| 86 | smd_debugfs_init(); | ||
| 87 | } | ||
| 88 | |||
| 89 | #ifdef CONFIG_OF | ||
| 90 | static struct of_dev_auxdata msm_auxdata_lookup[] __initdata = { | ||
| 91 | {} | ||
| 92 | }; | ||
| 93 | |||
| 94 | static void __init msm8x60_dt_init(void) | ||
| 95 | { | ||
| 96 | if (of_machine_is_compatible("qcom,msm8660-surf")) { | ||
| 97 | printk(KERN_INFO "Init surf UART registers\n"); | ||
| 98 | msm8x60_init_uart12dm(); | ||
| 99 | } | ||
| 100 | |||
| 101 | of_platform_populate(NULL, of_default_bus_match_table, | ||
| 102 | msm_auxdata_lookup, NULL); | ||
| 103 | } | ||
| 104 | |||
| 105 | static const char *msm8x60_fluid_match[] __initdata = { | ||
| 106 | "qcom,msm8660-fluid", | ||
| 107 | "qcom,msm8660-surf", | ||
| 108 | NULL | ||
| 109 | }; | ||
| 110 | #endif /* CONFIG_OF */ | ||
| 111 | |||
| 112 | MACHINE_START(MSM8X60_RUMI3, "QCT MSM8X60 RUMI3") | ||
| 113 | .fixup = msm8x60_fixup, | ||
| 114 | .reserve = msm8x60_reserve, | ||
| 115 | .map_io = msm8x60_map_io, | ||
| 116 | .init_irq = msm8x60_init_irq, | ||
| 117 | .handle_irq = gic_handle_irq, | ||
| 118 | .init_machine = msm8x60_init, | ||
| 119 | .init_late = msm8x60_init_late, | ||
| 120 | .timer = &msm_timer, | ||
| 121 | MACHINE_END | ||
| 122 | |||
| 123 | MACHINE_START(MSM8X60_SURF, "QCT MSM8X60 SURF") | ||
| 124 | .fixup = msm8x60_fixup, | ||
| 125 | .reserve = msm8x60_reserve, | ||
| 126 | .map_io = msm8x60_map_io, | ||
| 127 | .init_irq = msm8x60_init_irq, | ||
| 128 | .handle_irq = gic_handle_irq, | ||
| 129 | .init_machine = msm8x60_init, | ||
| 130 | .init_late = msm8x60_init_late, | ||
| 131 | .timer = &msm_timer, | ||
| 132 | MACHINE_END | ||
| 133 | |||
| 134 | MACHINE_START(MSM8X60_SIM, "QCT MSM8X60 SIMULATOR") | ||
| 135 | .fixup = msm8x60_fixup, | ||
| 136 | .reserve = msm8x60_reserve, | ||
| 137 | .map_io = msm8x60_map_io, | ||
| 138 | .init_irq = msm8x60_init_irq, | ||
| 139 | .handle_irq = gic_handle_irq, | ||
| 140 | .init_machine = msm8x60_init, | ||
| 141 | .init_late = msm8x60_init_late, | ||
| 142 | .timer = &msm_timer, | ||
| 143 | MACHINE_END | ||
| 144 | |||
| 145 | MACHINE_START(MSM8X60_FFA, "QCT MSM8X60 FFA") | ||
| 146 | .fixup = msm8x60_fixup, | ||
| 147 | .reserve = msm8x60_reserve, | ||
| 148 | .map_io = msm8x60_map_io, | ||
| 149 | .init_irq = msm8x60_init_irq, | ||
| 150 | .handle_irq = gic_handle_irq, | ||
| 151 | .init_machine = msm8x60_init, | ||
| 152 | .init_late = msm8x60_init_late, | ||
| 153 | .timer = &msm_timer, | ||
| 154 | MACHINE_END | ||
| 155 | |||
| 156 | #ifdef CONFIG_OF | ||
| 157 | /* TODO: General device tree support for all MSM. */ | ||
| 158 | DT_MACHINE_START(MSM_DT, "Qualcomm MSM (Flattened Device Tree)") | ||
| 159 | .map_io = msm8x60_map_io, | ||
| 160 | .init_irq = msm8x60_init_irq, | ||
| 161 | .init_machine = msm8x60_dt_init, | ||
| 162 | .init_late = msm8x60_init_late, | ||
| 163 | .timer = &msm_timer, | ||
| 164 | .dt_compat = msm8x60_fluid_match, | ||
| 165 | MACHINE_END | ||
| 166 | #endif /* CONFIG_OF */ | ||
diff --git a/arch/arm/mach-msm/board-qsd8x50.c b/arch/arm/mach-msm/board-qsd8x50.c index c8fe0edb9761..b16b71abf5f6 100644 --- a/arch/arm/mach-msm/board-qsd8x50.c +++ b/arch/arm/mach-msm/board-qsd8x50.c | |||
| @@ -35,8 +35,7 @@ | |||
| 35 | #include <mach/mmc.h> | 35 | #include <mach/mmc.h> |
| 36 | 36 | ||
| 37 | #include "devices.h" | 37 | #include "devices.h" |
| 38 | 38 | #include "common.h" | |
| 39 | extern struct sys_timer msm_timer; | ||
| 40 | 39 | ||
| 41 | static const resource_size_t qsd8x50_surf_smc91x_base __initdata = 0x70000300; | 40 | static const resource_size_t qsd8x50_surf_smc91x_base __initdata = 0x70000300; |
| 42 | static const unsigned qsd8x50_surf_smc91x_gpio __initdata = 156; | 41 | static const unsigned qsd8x50_surf_smc91x_gpio __initdata = 156; |
| @@ -201,7 +200,7 @@ MACHINE_START(QSD8X50_SURF, "QCT QSD8X50 SURF") | |||
| 201 | .init_irq = qsd8x50_init_irq, | 200 | .init_irq = qsd8x50_init_irq, |
| 202 | .init_machine = qsd8x50_init, | 201 | .init_machine = qsd8x50_init, |
| 203 | .init_late = qsd8x50_init_late, | 202 | .init_late = qsd8x50_init_late, |
| 204 | .timer = &msm_timer, | 203 | .timer = &qsd8x50_timer, |
| 205 | MACHINE_END | 204 | MACHINE_END |
| 206 | 205 | ||
| 207 | MACHINE_START(QSD8X50A_ST1_5, "QCT QSD8X50A ST1.5") | 206 | MACHINE_START(QSD8X50A_ST1_5, "QCT QSD8X50A ST1.5") |
| @@ -210,5 +209,5 @@ MACHINE_START(QSD8X50A_ST1_5, "QCT QSD8X50A ST1.5") | |||
| 210 | .init_irq = qsd8x50_init_irq, | 209 | .init_irq = qsd8x50_init_irq, |
| 211 | .init_machine = qsd8x50_init, | 210 | .init_machine = qsd8x50_init, |
| 212 | .init_late = qsd8x50_init_late, | 211 | .init_late = qsd8x50_init_late, |
| 213 | .timer = &msm_timer, | 212 | .timer = &qsd8x50_timer, |
| 214 | MACHINE_END | 213 | MACHINE_END |
diff --git a/arch/arm/mach-msm/board-sapphire.c b/arch/arm/mach-msm/board-sapphire.c index 2e569ab10eef..b7b0fc7e3278 100644 --- a/arch/arm/mach-msm/board-sapphire.c +++ b/arch/arm/mach-msm/board-sapphire.c | |||
| @@ -27,7 +27,6 @@ | |||
| 27 | #include <asm/mach/arch.h> | 27 | #include <asm/mach/arch.h> |
| 28 | #include <asm/mach/map.h> | 28 | #include <asm/mach/map.h> |
| 29 | #include <asm/mach/flash.h> | 29 | #include <asm/mach/flash.h> |
| 30 | #include <mach/system.h> | ||
| 31 | #include <mach/vreg.h> | 30 | #include <mach/vreg.h> |
| 32 | #include <mach/board.h> | 31 | #include <mach/board.h> |
| 33 | 32 | ||
diff --git a/arch/arm/mach-msm/board-trout.c b/arch/arm/mach-msm/board-trout.c index bbe13f12fa01..4ba0800e243e 100644 --- a/arch/arm/mach-msm/board-trout.c +++ b/arch/arm/mach-msm/board-trout.c | |||
| @@ -31,6 +31,7 @@ | |||
| 31 | 31 | ||
| 32 | #include "devices.h" | 32 | #include "devices.h" |
| 33 | #include "board-trout.h" | 33 | #include "board-trout.h" |
| 34 | #include "common.h" | ||
| 34 | 35 | ||
| 35 | extern int trout_init_mmc(unsigned int); | 36 | extern int trout_init_mmc(unsigned int); |
| 36 | 37 | ||
| @@ -42,8 +43,6 @@ static struct platform_device *devices[] __initdata = { | |||
| 42 | &msm_device_i2c, | 43 | &msm_device_i2c, |
| 43 | }; | 44 | }; |
| 44 | 45 | ||
| 45 | extern struct sys_timer msm_timer; | ||
| 46 | |||
| 47 | static void __init trout_init_early(void) | 46 | static void __init trout_init_early(void) |
| 48 | { | 47 | { |
| 49 | arch_ioremap_caller = __msm_ioremap_caller; | 48 | arch_ioremap_caller = __msm_ioremap_caller; |
| @@ -111,5 +110,5 @@ MACHINE_START(TROUT, "HTC Dream") | |||
| 111 | .init_irq = trout_init_irq, | 110 | .init_irq = trout_init_irq, |
| 112 | .init_machine = trout_init, | 111 | .init_machine = trout_init, |
| 113 | .init_late = trout_init_late, | 112 | .init_late = trout_init_late, |
| 114 | .timer = &msm_timer, | 113 | .timer = &msm7x01_timer, |
| 115 | MACHINE_END | 114 | MACHINE_END |
diff --git a/arch/arm/mach-msm/clock-pcom.c b/arch/arm/mach-msm/clock-pcom.c index 63b711311086..a52c970df157 100644 --- a/arch/arm/mach-msm/clock-pcom.c +++ b/arch/arm/mach-msm/clock-pcom.c | |||
| @@ -25,7 +25,7 @@ | |||
| 25 | /* | 25 | /* |
| 26 | * glue for the proc_comm interface | 26 | * glue for the proc_comm interface |
| 27 | */ | 27 | */ |
| 28 | int pc_clk_enable(unsigned id) | 28 | static int pc_clk_enable(unsigned id) |
| 29 | { | 29 | { |
| 30 | int rc = msm_proc_comm(PCOM_CLKCTL_RPC_ENABLE, &id, NULL); | 30 | int rc = msm_proc_comm(PCOM_CLKCTL_RPC_ENABLE, &id, NULL); |
| 31 | if (rc < 0) | 31 | if (rc < 0) |
| @@ -34,7 +34,7 @@ int pc_clk_enable(unsigned id) | |||
| 34 | return (int)id < 0 ? -EINVAL : 0; | 34 | return (int)id < 0 ? -EINVAL : 0; |
| 35 | } | 35 | } |
| 36 | 36 | ||
| 37 | void pc_clk_disable(unsigned id) | 37 | static void pc_clk_disable(unsigned id) |
| 38 | { | 38 | { |
| 39 | msm_proc_comm(PCOM_CLKCTL_RPC_DISABLE, &id, NULL); | 39 | msm_proc_comm(PCOM_CLKCTL_RPC_DISABLE, &id, NULL); |
| 40 | } | 40 | } |
| @@ -54,7 +54,7 @@ int pc_clk_reset(unsigned id, enum clk_reset_action action) | |||
| 54 | return (int)id < 0 ? -EINVAL : 0; | 54 | return (int)id < 0 ? -EINVAL : 0; |
| 55 | } | 55 | } |
| 56 | 56 | ||
| 57 | int pc_clk_set_rate(unsigned id, unsigned rate) | 57 | static int pc_clk_set_rate(unsigned id, unsigned rate) |
| 58 | { | 58 | { |
| 59 | /* The rate _might_ be rounded off to the nearest KHz value by the | 59 | /* The rate _might_ be rounded off to the nearest KHz value by the |
| 60 | * remote function. So a return value of 0 doesn't necessarily mean | 60 | * remote function. So a return value of 0 doesn't necessarily mean |
| @@ -67,7 +67,7 @@ int pc_clk_set_rate(unsigned id, unsigned rate) | |||
| 67 | return (int)id < 0 ? -EINVAL : 0; | 67 | return (int)id < 0 ? -EINVAL : 0; |
| 68 | } | 68 | } |
| 69 | 69 | ||
| 70 | int pc_clk_set_min_rate(unsigned id, unsigned rate) | 70 | static int pc_clk_set_min_rate(unsigned id, unsigned rate) |
| 71 | { | 71 | { |
| 72 | int rc = msm_proc_comm(PCOM_CLKCTL_RPC_MIN_RATE, &id, &rate); | 72 | int rc = msm_proc_comm(PCOM_CLKCTL_RPC_MIN_RATE, &id, &rate); |
| 73 | if (rc < 0) | 73 | if (rc < 0) |
| @@ -76,7 +76,7 @@ int pc_clk_set_min_rate(unsigned id, unsigned rate) | |||
| 76 | return (int)id < 0 ? -EINVAL : 0; | 76 | return (int)id < 0 ? -EINVAL : 0; |
| 77 | } | 77 | } |
| 78 | 78 | ||
| 79 | int pc_clk_set_max_rate(unsigned id, unsigned rate) | 79 | static int pc_clk_set_max_rate(unsigned id, unsigned rate) |
| 80 | { | 80 | { |
| 81 | int rc = msm_proc_comm(PCOM_CLKCTL_RPC_MAX_RATE, &id, &rate); | 81 | int rc = msm_proc_comm(PCOM_CLKCTL_RPC_MAX_RATE, &id, &rate); |
| 82 | if (rc < 0) | 82 | if (rc < 0) |
| @@ -85,7 +85,7 @@ int pc_clk_set_max_rate(unsigned id, unsigned rate) | |||
| 85 | return (int)id < 0 ? -EINVAL : 0; | 85 | return (int)id < 0 ? -EINVAL : 0; |
| 86 | } | 86 | } |
| 87 | 87 | ||
| 88 | int pc_clk_set_flags(unsigned id, unsigned flags) | 88 | static int pc_clk_set_flags(unsigned id, unsigned flags) |
| 89 | { | 89 | { |
| 90 | int rc = msm_proc_comm(PCOM_CLKCTL_RPC_SET_FLAGS, &id, &flags); | 90 | int rc = msm_proc_comm(PCOM_CLKCTL_RPC_SET_FLAGS, &id, &flags); |
| 91 | if (rc < 0) | 91 | if (rc < 0) |
| @@ -94,7 +94,7 @@ int pc_clk_set_flags(unsigned id, unsigned flags) | |||
| 94 | return (int)id < 0 ? -EINVAL : 0; | 94 | return (int)id < 0 ? -EINVAL : 0; |
| 95 | } | 95 | } |
| 96 | 96 | ||
| 97 | unsigned pc_clk_get_rate(unsigned id) | 97 | static unsigned pc_clk_get_rate(unsigned id) |
| 98 | { | 98 | { |
| 99 | if (msm_proc_comm(PCOM_CLKCTL_RPC_RATE, &id, NULL)) | 99 | if (msm_proc_comm(PCOM_CLKCTL_RPC_RATE, &id, NULL)) |
| 100 | return 0; | 100 | return 0; |
| @@ -102,7 +102,7 @@ unsigned pc_clk_get_rate(unsigned id) | |||
| 102 | return id; | 102 | return id; |
| 103 | } | 103 | } |
| 104 | 104 | ||
| 105 | unsigned pc_clk_is_enabled(unsigned id) | 105 | static unsigned pc_clk_is_enabled(unsigned id) |
| 106 | { | 106 | { |
| 107 | if (msm_proc_comm(PCOM_CLKCTL_RPC_ENABLED, &id, NULL)) | 107 | if (msm_proc_comm(PCOM_CLKCTL_RPC_ENABLED, &id, NULL)) |
| 108 | return 0; | 108 | return 0; |
| @@ -110,7 +110,7 @@ unsigned pc_clk_is_enabled(unsigned id) | |||
| 110 | return id; | 110 | return id; |
| 111 | } | 111 | } |
| 112 | 112 | ||
| 113 | long pc_clk_round_rate(unsigned id, unsigned rate) | 113 | static long pc_clk_round_rate(unsigned id, unsigned rate) |
| 114 | { | 114 | { |
| 115 | 115 | ||
| 116 | /* Not really supported; pc_clk_set_rate() does rounding on it's own. */ | 116 | /* Not really supported; pc_clk_set_rate() does rounding on it's own. */ |
diff --git a/arch/arm/mach-msm/common.h b/arch/arm/mach-msm/common.h new file mode 100644 index 000000000000..d68e5d7854f5 --- /dev/null +++ b/arch/arm/mach-msm/common.h | |||
| @@ -0,0 +1,30 @@ | |||
| 1 | /* Copyright (c) 2012, The Linux Foundation. All rights reserved. | ||
| 2 | * | ||
| 3 | * This program is free software; you can redistribute it and/or modify | ||
| 4 | * it under the terms of the GNU General Public License version 2 and | ||
| 5 | * only version 2 as published by the Free Software Foundation. | ||
| 6 | * | ||
| 7 | * This program is distributed in the hope that it will be useful, | ||
| 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 10 | * GNU General Public License for more details. | ||
| 11 | */ | ||
| 12 | #ifndef __MACH_COMMON_H | ||
| 13 | #define __MACH_COMMON_H | ||
| 14 | |||
| 15 | extern struct sys_timer msm7x01_timer; | ||
| 16 | extern struct sys_timer msm7x30_timer; | ||
| 17 | extern struct sys_timer msm_dt_timer; | ||
| 18 | extern struct sys_timer qsd8x50_timer; | ||
| 19 | |||
| 20 | extern void msm_map_common_io(void); | ||
| 21 | extern void msm_map_msm7x30_io(void); | ||
| 22 | extern void msm_map_msm8x60_io(void); | ||
| 23 | extern void msm_map_msm8960_io(void); | ||
| 24 | extern void msm_map_qsd8x50_io(void); | ||
| 25 | |||
| 26 | extern void __iomem *__msm_ioremap_caller(unsigned long phys_addr, size_t size, | ||
| 27 | unsigned int mtype, void *caller); | ||
| 28 | |||
| 29 | |||
| 30 | #endif | ||
diff --git a/arch/arm/mach-msm/devices-msm8960.c b/arch/arm/mach-msm/devices-msm8960.c deleted file mode 100644 index d9e1f26475de..000000000000 --- a/arch/arm/mach-msm/devices-msm8960.c +++ /dev/null | |||
| @@ -1,85 +0,0 @@ | |||
| 1 | /* Copyright (c) 2011, Code Aurora Forum. All rights reserved. | ||
| 2 | * | ||
| 3 | * This program is free software; you can redistribute it and/or modify | ||
| 4 | * it under the terms of the GNU General Public License version 2 and | ||
| 5 | * only version 2 as published by the Free Software Foundation. | ||
| 6 | * | ||
| 7 | * This program is distributed in the hope that it will be useful, | ||
| 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 10 | * GNU General Public License for more details. | ||
| 11 | * | ||
| 12 | * You should have received a copy of the GNU General Public License | ||
| 13 | * along with this program; if not, write to the Free Software | ||
| 14 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA | ||
| 15 | * 02110-1301, USA. | ||
| 16 | */ | ||
| 17 | |||
| 18 | #include <linux/kernel.h> | ||
| 19 | #include <linux/platform_device.h> | ||
| 20 | |||
| 21 | #include <linux/dma-mapping.h> | ||
| 22 | #include <mach/irqs-8960.h> | ||
| 23 | #include <mach/board.h> | ||
| 24 | |||
| 25 | #include "devices.h" | ||
| 26 | |||
| 27 | #define MSM_GSBI2_PHYS 0x16100000 | ||
| 28 | #define MSM_UART2DM_PHYS (MSM_GSBI2_PHYS + 0x40000) | ||
| 29 | |||
| 30 | #define MSM_GSBI5_PHYS 0x16400000 | ||
| 31 | #define MSM_UART5DM_PHYS (MSM_GSBI5_PHYS + 0x40000) | ||
| 32 | |||
| 33 | static struct resource resources_uart_gsbi2[] = { | ||
| 34 | { | ||
| 35 | .start = GSBI2_UARTDM_IRQ, | ||
| 36 | .end = GSBI2_UARTDM_IRQ, | ||
| 37 | .flags = IORESOURCE_IRQ, | ||
| 38 | }, | ||
| 39 | { | ||
| 40 | .start = MSM_UART2DM_PHYS, | ||
| 41 | .end = MSM_UART2DM_PHYS + PAGE_SIZE - 1, | ||
| 42 | .name = "uart_resource", | ||
| 43 | .flags = IORESOURCE_MEM, | ||
| 44 | }, | ||
| 45 | { | ||
| 46 | .start = MSM_GSBI2_PHYS, | ||
| 47 | .end = MSM_GSBI2_PHYS + PAGE_SIZE - 1, | ||
| 48 | .name = "gsbi_resource", | ||
| 49 | .flags = IORESOURCE_MEM, | ||
| 50 | }, | ||
| 51 | }; | ||
| 52 | |||
| 53 | struct platform_device msm8960_device_uart_gsbi2 = { | ||
| 54 | .name = "msm_serial", | ||
| 55 | .id = 0, | ||
| 56 | .num_resources = ARRAY_SIZE(resources_uart_gsbi2), | ||
| 57 | .resource = resources_uart_gsbi2, | ||
| 58 | }; | ||
| 59 | |||
| 60 | static struct resource resources_uart_gsbi5[] = { | ||
| 61 | { | ||
| 62 | .start = GSBI5_UARTDM_IRQ, | ||
| 63 | .end = GSBI5_UARTDM_IRQ, | ||
| 64 | .flags = IORESOURCE_IRQ, | ||
| 65 | }, | ||
| 66 | { | ||
| 67 | .start = MSM_UART5DM_PHYS, | ||
| 68 | .end = MSM_UART5DM_PHYS + PAGE_SIZE - 1, | ||
| 69 | .name = "uart_resource", | ||
| 70 | .flags = IORESOURCE_MEM, | ||
| 71 | }, | ||
| 72 | { | ||
| 73 | .start = MSM_GSBI5_PHYS, | ||
| 74 | .end = MSM_GSBI5_PHYS + PAGE_SIZE - 1, | ||
| 75 | .name = "gsbi_resource", | ||
| 76 | .flags = IORESOURCE_MEM, | ||
| 77 | }, | ||
| 78 | }; | ||
| 79 | |||
| 80 | struct platform_device msm8960_device_uart_gsbi5 = { | ||
| 81 | .name = "msm_serial", | ||
| 82 | .id = 0, | ||
| 83 | .num_resources = ARRAY_SIZE(resources_uart_gsbi5), | ||
| 84 | .resource = resources_uart_gsbi5, | ||
| 85 | }; | ||
diff --git a/arch/arm/mach-msm/dma.c b/arch/arm/mach-msm/dma.c index 02cae5e2951c..354b91d4c3ac 100644 --- a/arch/arm/mach-msm/dma.c +++ b/arch/arm/mach-msm/dma.c | |||
| @@ -223,8 +223,7 @@ static irqreturn_t msm_datamover_irq_handler(int irq, void *dev_id) | |||
| 223 | PRINT_FLOW("msm_datamover_irq_handler id %d, status %x\n", id, ch_status); | 223 | PRINT_FLOW("msm_datamover_irq_handler id %d, status %x\n", id, ch_status); |
| 224 | if ((ch_status & DMOV_STATUS_CMD_PTR_RDY) && !list_empty(&ready_commands[id])) { | 224 | if ((ch_status & DMOV_STATUS_CMD_PTR_RDY) && !list_empty(&ready_commands[id])) { |
| 225 | cmd = list_entry(ready_commands[id].next, typeof(*cmd), list); | 225 | cmd = list_entry(ready_commands[id].next, typeof(*cmd), list); |
| 226 | list_del(&cmd->list); | 226 | list_move_tail(&cmd->list, &active_commands[id]); |
| 227 | list_add_tail(&cmd->list, &active_commands[id]); | ||
| 228 | if (cmd->execute_func) | 227 | if (cmd->execute_func) |
| 229 | cmd->execute_func(cmd); | 228 | cmd->execute_func(cmd); |
| 230 | PRINT_FLOW("msm_datamover_irq_handler id %d, start command\n", id); | 229 | PRINT_FLOW("msm_datamover_irq_handler id %d, start command\n", id); |
diff --git a/arch/arm/mach-msm/idle.c b/arch/arm/mach-msm/idle.c deleted file mode 100644 index 0c9e13c65743..000000000000 --- a/arch/arm/mach-msm/idle.c +++ /dev/null | |||
| @@ -1,49 +0,0 @@ | |||
| 1 | /* arch/arm/mach-msm/idle.c | ||
| 2 | * | ||
| 3 | * Idle processing for MSM7K - work around bugs with SWFI. | ||
| 4 | * | ||
| 5 | * Copyright (c) 2007 QUALCOMM Incorporated. | ||
| 6 | * Copyright (C) 2007 Google, Inc. | ||
| 7 | * | ||
| 8 | * This software is licensed under the terms of the GNU General Public | ||
| 9 | * License version 2, as published by the Free Software Foundation, and | ||
| 10 | * may be copied, distributed, and modified under those terms. | ||
| 11 | * | ||
| 12 | * This program is distributed in the hope that it will be useful, | ||
| 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 15 | * GNU General Public License for more details. | ||
| 16 | * | ||
| 17 | */ | ||
| 18 | |||
| 19 | #include <linux/init.h> | ||
| 20 | #include <asm/system.h> | ||
| 21 | |||
| 22 | static void msm_idle(void) | ||
| 23 | { | ||
| 24 | #ifdef CONFIG_MSM7X00A_IDLE | ||
| 25 | asm volatile ( | ||
| 26 | |||
| 27 | "mrc p15, 0, r1, c1, c0, 0 /* read current CR */ \n\t" | ||
| 28 | "bic r0, r1, #(1 << 2) /* clear dcache bit */ \n\t" | ||
| 29 | "bic r0, r0, #(1 << 12) /* clear icache bit */ \n\t" | ||
| 30 | "mcr p15, 0, r0, c1, c0, 0 /* disable d/i cache */ \n\t" | ||
| 31 | |||
| 32 | "mov r0, #0 /* prepare wfi value */ \n\t" | ||
| 33 | "mcr p15, 0, r0, c7, c10, 0 /* flush the cache */ \n\t" | ||
| 34 | "mcr p15, 0, r0, c7, c10, 4 /* memory barrier */ \n\t" | ||
| 35 | "mcr p15, 0, r0, c7, c0, 4 /* wait for interrupt */ \n\t" | ||
| 36 | |||
| 37 | "mcr p15, 0, r1, c1, c0, 0 /* restore d/i cache */ \n\t" | ||
| 38 | |||
| 39 | : : : "r0","r1" ); | ||
| 40 | #endif | ||
| 41 | } | ||
| 42 | |||
| 43 | static int __init msm_idle_init(void) | ||
| 44 | { | ||
| 45 | arm_pm_idle = msm_idle; | ||
| 46 | return 0; | ||
| 47 | } | ||
| 48 | |||
| 49 | arch_initcall(msm_idle_init); | ||
diff --git a/arch/arm/mach-msm/include/mach/board.h b/arch/arm/mach-msm/include/mach/board.h index 435f8edfafd1..0a0c393d8e31 100644 --- a/arch/arm/mach-msm/include/mach/board.h +++ b/arch/arm/mach-msm/include/mach/board.h | |||
| @@ -22,27 +22,14 @@ | |||
| 22 | 22 | ||
| 23 | /* platform device data structures */ | 23 | /* platform device data structures */ |
| 24 | 24 | ||
| 25 | struct msm_acpu_clock_platform_data | ||
| 26 | { | ||
| 27 | uint32_t acpu_switch_time_us; | ||
| 28 | uint32_t max_speed_delta_khz; | ||
| 29 | uint32_t vdd_switch_time_us; | ||
| 30 | unsigned long power_collapse_khz; | ||
| 31 | unsigned long wait_for_irq_khz; | ||
| 32 | }; | ||
| 33 | |||
| 34 | struct clk_lookup; | 25 | struct clk_lookup; |
| 35 | 26 | ||
| 36 | extern struct sys_timer msm_timer; | ||
| 37 | |||
| 38 | /* common init routines for use by arch/arm/mach-msm/board-*.c */ | 27 | /* common init routines for use by arch/arm/mach-msm/board-*.c */ |
| 39 | 28 | ||
| 40 | void __init msm_add_devices(void); | 29 | void __init msm_add_devices(void); |
| 41 | void __init msm_map_common_io(void); | ||
| 42 | void __init msm_init_irq(void); | 30 | void __init msm_init_irq(void); |
| 43 | void __init msm_init_gpio(void); | 31 | void __init msm_init_gpio(void); |
| 44 | void __init msm_clock_init(struct clk_lookup *clock_tbl, unsigned num_clocks); | 32 | void __init msm_clock_init(struct clk_lookup *clock_tbl, unsigned num_clocks); |
| 45 | void __init msm_acpu_clock_init(struct msm_acpu_clock_platform_data *); | ||
| 46 | int __init msm_add_sdcc(unsigned int controller, | 33 | int __init msm_add_sdcc(unsigned int controller, |
| 47 | struct msm_mmc_platform_data *plat, | 34 | struct msm_mmc_platform_data *plat, |
| 48 | unsigned int stat_irq, unsigned long stat_irq_flags); | 35 | unsigned int stat_irq, unsigned long stat_irq_flags); |
diff --git a/arch/arm/mach-msm/include/mach/msm_iomap-7x00.h b/arch/arm/mach-msm/include/mach/msm_iomap-7x00.h index 6c4046c21296..67dc0e98b958 100644 --- a/arch/arm/mach-msm/include/mach/msm_iomap-7x00.h +++ b/arch/arm/mach-msm/include/mach/msm_iomap-7x00.h | |||
| @@ -105,11 +105,4 @@ | |||
| 105 | #define MSM_AD5_PHYS 0xAC000000 | 105 | #define MSM_AD5_PHYS 0xAC000000 |
| 106 | #define MSM_AD5_SIZE (SZ_1M*13) | 106 | #define MSM_AD5_SIZE (SZ_1M*13) |
| 107 | 107 | ||
| 108 | #ifndef __ASSEMBLY__ | ||
| 109 | |||
| 110 | extern void __iomem *__msm_ioremap_caller(unsigned long phys_addr, size_t size, | ||
| 111 | unsigned int mtype, void *caller); | ||
| 112 | |||
| 113 | #endif | ||
| 114 | |||
| 115 | #endif | 108 | #endif |
diff --git a/arch/arm/mach-msm/include/mach/msm_iomap-7x30.h b/arch/arm/mach-msm/include/mach/msm_iomap-7x30.h index f944fe65a657..198202c267c8 100644 --- a/arch/arm/mach-msm/include/mach/msm_iomap-7x30.h +++ b/arch/arm/mach-msm/include/mach/msm_iomap-7x30.h | |||
| @@ -100,8 +100,4 @@ | |||
| 100 | #define MSM_HSUSB_PHYS 0xA3600000 | 100 | #define MSM_HSUSB_PHYS 0xA3600000 |
| 101 | #define MSM_HSUSB_SIZE SZ_1K | 101 | #define MSM_HSUSB_SIZE SZ_1K |
| 102 | 102 | ||
| 103 | #ifndef __ASSEMBLY__ | ||
| 104 | extern void msm_map_msm7x30_io(void); | ||
| 105 | #endif | ||
| 106 | |||
| 107 | #endif | 103 | #endif |
diff --git a/arch/arm/mach-msm/include/mach/msm_iomap-8960.h b/arch/arm/mach-msm/include/mach/msm_iomap-8960.h index a1752c0284fc..9819a556acae 100644 --- a/arch/arm/mach-msm/include/mach/msm_iomap-8960.h +++ b/arch/arm/mach-msm/include/mach/msm_iomap-8960.h | |||
| @@ -46,12 +46,8 @@ | |||
| 46 | #define MSM8960_TMR0_SIZE SZ_4K | 46 | #define MSM8960_TMR0_SIZE SZ_4K |
| 47 | 47 | ||
| 48 | #ifdef CONFIG_DEBUG_MSM8960_UART | 48 | #ifdef CONFIG_DEBUG_MSM8960_UART |
| 49 | #define MSM_DEBUG_UART_BASE 0xE1040000 | 49 | #define MSM_DEBUG_UART_BASE 0xF0040000 |
| 50 | #define MSM_DEBUG_UART_PHYS 0x16440000 | 50 | #define MSM_DEBUG_UART_PHYS 0x16440000 |
| 51 | #endif | 51 | #endif |
| 52 | 52 | ||
| 53 | #ifndef __ASSEMBLY__ | ||
| 54 | extern void msm_map_msm8960_io(void); | ||
| 55 | #endif | ||
| 56 | |||
| 57 | #endif | 53 | #endif |
diff --git a/arch/arm/mach-msm/include/mach/msm_iomap-8x50.h b/arch/arm/mach-msm/include/mach/msm_iomap-8x50.h index da77cc1d545d..0faa894729b7 100644 --- a/arch/arm/mach-msm/include/mach/msm_iomap-8x50.h +++ b/arch/arm/mach-msm/include/mach/msm_iomap-8x50.h | |||
| @@ -122,8 +122,4 @@ | |||
| 122 | #define MSM_SDC4_PHYS 0xA0600000 | 122 | #define MSM_SDC4_PHYS 0xA0600000 |
| 123 | #define MSM_SDC4_SIZE SZ_4K | 123 | #define MSM_SDC4_SIZE SZ_4K |
| 124 | 124 | ||
| 125 | #ifndef __ASSEMBLY__ | ||
| 126 | extern void msm_map_qsd8x50_io(void); | ||
| 127 | #endif | ||
| 128 | |||
| 129 | #endif | 125 | #endif |
diff --git a/arch/arm/mach-msm/include/mach/msm_iomap-8x60.h b/arch/arm/mach-msm/include/mach/msm_iomap-8x60.h index 5aed57dc808c..c6d38f1d0c98 100644 --- a/arch/arm/mach-msm/include/mach/msm_iomap-8x60.h +++ b/arch/arm/mach-msm/include/mach/msm_iomap-8x60.h | |||
| @@ -63,12 +63,8 @@ | |||
| 63 | #define MSM8X60_TMR0_SIZE SZ_4K | 63 | #define MSM8X60_TMR0_SIZE SZ_4K |
| 64 | 64 | ||
| 65 | #ifdef CONFIG_DEBUG_MSM8660_UART | 65 | #ifdef CONFIG_DEBUG_MSM8660_UART |
| 66 | #define MSM_DEBUG_UART_BASE 0xE1040000 | 66 | #define MSM_DEBUG_UART_BASE 0xF0040000 |
| 67 | #define MSM_DEBUG_UART_PHYS 0x19C40000 | 67 | #define MSM_DEBUG_UART_PHYS 0x19C40000 |
| 68 | #endif | 68 | #endif |
| 69 | 69 | ||
| 70 | #ifndef __ASSEMBLY__ | ||
| 71 | extern void msm_map_msm8x60_io(void); | ||
| 72 | #endif | ||
| 73 | |||
| 74 | #endif | 70 | #endif |
diff --git a/arch/arm/mach-msm/io.c b/arch/arm/mach-msm/io.c index a1e7b1168850..3854f6f20ce2 100644 --- a/arch/arm/mach-msm/io.c +++ b/arch/arm/mach-msm/io.c | |||
| @@ -29,30 +29,32 @@ | |||
| 29 | 29 | ||
| 30 | #include <mach/board.h> | 30 | #include <mach/board.h> |
| 31 | 31 | ||
| 32 | #define MSM_CHIP_DEVICE(name, chip) { \ | 32 | #include "common.h" |
| 33 | |||
| 34 | #define MSM_CHIP_DEVICE_TYPE(name, chip, mem_type) { \ | ||
| 33 | .virtual = (unsigned long) MSM_##name##_BASE, \ | 35 | .virtual = (unsigned long) MSM_##name##_BASE, \ |
| 34 | .pfn = __phys_to_pfn(chip##_##name##_PHYS), \ | 36 | .pfn = __phys_to_pfn(chip##_##name##_PHYS), \ |
| 35 | .length = chip##_##name##_SIZE, \ | 37 | .length = chip##_##name##_SIZE, \ |
| 36 | .type = MT_DEVICE_NONSHARED, \ | 38 | .type = mem_type, \ |
| 37 | } | 39 | } |
| 38 | 40 | ||
| 41 | #define MSM_DEVICE_TYPE(name, mem_type) \ | ||
| 42 | MSM_CHIP_DEVICE_TYPE(name, MSM, mem_type) | ||
| 43 | #define MSM_CHIP_DEVICE(name, chip) \ | ||
| 44 | MSM_CHIP_DEVICE_TYPE(name, chip, MT_DEVICE) | ||
| 39 | #define MSM_DEVICE(name) MSM_CHIP_DEVICE(name, MSM) | 45 | #define MSM_DEVICE(name) MSM_CHIP_DEVICE(name, MSM) |
| 40 | 46 | ||
| 41 | #if defined(CONFIG_ARCH_MSM7X00A) || defined(CONFIG_ARCH_MSM7X27) \ | 47 | #if defined(CONFIG_ARCH_MSM7X00A) |
| 42 | || defined(CONFIG_ARCH_MSM7X25) | ||
| 43 | static struct map_desc msm_io_desc[] __initdata = { | 48 | static struct map_desc msm_io_desc[] __initdata = { |
| 44 | MSM_DEVICE(VIC), | 49 | MSM_DEVICE_TYPE(VIC, MT_DEVICE_NONSHARED), |
| 45 | MSM_CHIP_DEVICE(CSR, MSM7X00), | 50 | MSM_CHIP_DEVICE_TYPE(CSR, MSM7X00, MT_DEVICE_NONSHARED), |
| 46 | MSM_DEVICE(DMOV), | 51 | MSM_DEVICE_TYPE(DMOV, MT_DEVICE_NONSHARED), |
| 47 | MSM_CHIP_DEVICE(GPIO1, MSM7X00), | 52 | MSM_CHIP_DEVICE_TYPE(GPIO1, MSM7X00, MT_DEVICE_NONSHARED), |
| 48 | MSM_CHIP_DEVICE(GPIO2, MSM7X00), | 53 | MSM_CHIP_DEVICE_TYPE(GPIO2, MSM7X00, MT_DEVICE_NONSHARED), |
| 49 | MSM_DEVICE(CLK_CTL), | 54 | MSM_DEVICE_TYPE(CLK_CTL, MT_DEVICE_NONSHARED), |
| 50 | #if defined(CONFIG_DEBUG_MSM_UART1) || defined(CONFIG_DEBUG_MSM_UART2) || \ | 55 | #if defined(CONFIG_DEBUG_MSM_UART1) || defined(CONFIG_DEBUG_MSM_UART2) || \ |
| 51 | defined(CONFIG_DEBUG_MSM_UART3) | 56 | defined(CONFIG_DEBUG_MSM_UART3) |
| 52 | MSM_DEVICE(DEBUG_UART), | 57 | MSM_DEVICE_TYPE(DEBUG_UART, MT_DEVICE_NONSHARED), |
| 53 | #endif | ||
| 54 | #ifdef CONFIG_ARCH_MSM7X30 | ||
| 55 | MSM_DEVICE(GCC), | ||
| 56 | #endif | 58 | #endif |
| 57 | { | 59 | { |
| 58 | .virtual = (unsigned long) MSM_SHARED_RAM_BASE, | 60 | .virtual = (unsigned long) MSM_SHARED_RAM_BASE, |
diff --git a/arch/arm/mach-msm/platsmp.c b/arch/arm/mach-msm/platsmp.c index e012dc8391cf..2d791e6b4ad1 100644 --- a/arch/arm/mach-msm/platsmp.c +++ b/arch/arm/mach-msm/platsmp.c | |||
| @@ -22,17 +22,12 @@ | |||
| 22 | #include <asm/mach-types.h> | 22 | #include <asm/mach-types.h> |
| 23 | #include <asm/smp_plat.h> | 23 | #include <asm/smp_plat.h> |
| 24 | 24 | ||
| 25 | #include <mach/msm_iomap.h> | ||
| 26 | |||
| 27 | #include "scm-boot.h" | 25 | #include "scm-boot.h" |
| 28 | 26 | ||
| 29 | #define VDD_SC1_ARRAY_CLAMP_GFS_CTL 0x15A0 | 27 | #define VDD_SC1_ARRAY_CLAMP_GFS_CTL 0x15A0 |
| 30 | #define SCSS_CPU1CORE_RESET 0xD80 | 28 | #define SCSS_CPU1CORE_RESET 0xD80 |
| 31 | #define SCSS_DBG_STATUS_CORE_PWRDUP 0xE64 | 29 | #define SCSS_DBG_STATUS_CORE_PWRDUP 0xE64 |
| 32 | 30 | ||
| 33 | /* Mask for edge trigger PPIs except AVS_SVICINT and AVS_SVICINTSWDONE */ | ||
| 34 | #define GIC_PPI_EDGE_MASK 0xFFFFD7FF | ||
| 35 | |||
| 36 | extern void msm_secondary_startup(void); | 31 | extern void msm_secondary_startup(void); |
| 37 | /* | 32 | /* |
| 38 | * control for which core is the next to come out of the secondary | 33 | * control for which core is the next to come out of the secondary |
| @@ -50,9 +45,6 @@ static inline int get_core_count(void) | |||
| 50 | 45 | ||
| 51 | void __cpuinit platform_secondary_init(unsigned int cpu) | 46 | void __cpuinit platform_secondary_init(unsigned int cpu) |
| 52 | { | 47 | { |
| 53 | /* Configure edge-triggered PPIs */ | ||
| 54 | writel(GIC_PPI_EDGE_MASK, MSM_QGIC_DIST_BASE + GIC_DIST_CONFIG + 4); | ||
| 55 | |||
| 56 | /* | 48 | /* |
| 57 | * if any interrupts are already enabled for the primary | 49 | * if any interrupts are already enabled for the primary |
| 58 | * core (e.g. timer irq), then they will not have been enabled | 50 | * core (e.g. timer irq), then they will not have been enabled |
diff --git a/arch/arm/mach-msm/proc_comm.c b/arch/arm/mach-msm/proc_comm.c index 9980dc736e7b..8f1eecd88186 100644 --- a/arch/arm/mach-msm/proc_comm.c +++ b/arch/arm/mach-msm/proc_comm.c | |||
| @@ -19,7 +19,6 @@ | |||
| 19 | #include <linux/io.h> | 19 | #include <linux/io.h> |
| 20 | #include <linux/spinlock.h> | 20 | #include <linux/spinlock.h> |
| 21 | #include <mach/msm_iomap.h> | 21 | #include <mach/msm_iomap.h> |
| 22 | #include <mach/system.h> | ||
| 23 | 22 | ||
| 24 | #include "proc_comm.h" | 23 | #include "proc_comm.h" |
| 25 | 24 | ||
diff --git a/arch/arm/mach-msm/smd.c b/arch/arm/mach-msm/smd.c index 657be73297db..84183ed2ef79 100644 --- a/arch/arm/mach-msm/smd.c +++ b/arch/arm/mach-msm/smd.c | |||
| @@ -30,7 +30,6 @@ | |||
| 30 | #include <linux/delay.h> | 30 | #include <linux/delay.h> |
| 31 | 31 | ||
| 32 | #include <mach/msm_smd.h> | 32 | #include <mach/msm_smd.h> |
| 33 | #include <mach/system.h> | ||
| 34 | 33 | ||
| 35 | #include "smd_private.h" | 34 | #include "smd_private.h" |
| 36 | #include "proc_comm.h" | 35 | #include "proc_comm.h" |
| @@ -39,8 +38,6 @@ | |||
| 39 | #define CONFIG_QDSP6 1 | 38 | #define CONFIG_QDSP6 1 |
| 40 | #endif | 39 | #endif |
| 41 | 40 | ||
| 42 | void (*msm_hw_reset_hook)(void); | ||
| 43 | |||
| 44 | #define MODULE_NAME "msm_smd" | 41 | #define MODULE_NAME "msm_smd" |
| 45 | 42 | ||
| 46 | enum { | 43 | enum { |
| @@ -101,10 +98,6 @@ static void handle_modem_crash(void) | |||
| 101 | pr_err("ARM9 has CRASHED\n"); | 98 | pr_err("ARM9 has CRASHED\n"); |
| 102 | smd_diag(); | 99 | smd_diag(); |
| 103 | 100 | ||
| 104 | /* hard reboot if possible */ | ||
| 105 | if (msm_hw_reset_hook) | ||
| 106 | msm_hw_reset_hook(); | ||
| 107 | |||
| 108 | /* in this case the modem or watchdog should reboot us */ | 101 | /* in this case the modem or watchdog should reboot us */ |
| 109 | for (;;) | 102 | for (;;) |
| 110 | ; | 103 | ; |
diff --git a/arch/arm/mach-msm/timer.c b/arch/arm/mach-msm/timer.c index 812808254936..476549a8a709 100644 --- a/arch/arm/mach-msm/timer.c +++ b/arch/arm/mach-msm/timer.c | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * | 2 | * |
| 3 | * Copyright (C) 2007 Google, Inc. | 3 | * Copyright (C) 2007 Google, Inc. |
| 4 | * Copyright (c) 2009-2011, Code Aurora Forum. All rights reserved. | 4 | * Copyright (c) 2009-2012, The Linux Foundation. All rights reserved. |
| 5 | * | 5 | * |
| 6 | * This software is licensed under the terms of the GNU General Public | 6 | * This software is licensed under the terms of the GNU General Public |
| 7 | * License version 2, as published by the Free Software Foundation, and | 7 | * License version 2, as published by the Free Software Foundation, and |
| @@ -20,15 +20,16 @@ | |||
| 20 | #include <linux/interrupt.h> | 20 | #include <linux/interrupt.h> |
| 21 | #include <linux/irq.h> | 21 | #include <linux/irq.h> |
| 22 | #include <linux/io.h> | 22 | #include <linux/io.h> |
| 23 | #include <linux/of.h> | ||
| 24 | #include <linux/of_address.h> | ||
| 25 | #include <linux/of_irq.h> | ||
| 23 | 26 | ||
| 24 | #include <asm/mach/time.h> | 27 | #include <asm/mach/time.h> |
| 25 | #include <asm/hardware/gic.h> | 28 | #include <asm/hardware/gic.h> |
| 26 | #include <asm/localtimer.h> | 29 | #include <asm/localtimer.h> |
| 27 | #include <asm/sched_clock.h> | 30 | #include <asm/sched_clock.h> |
| 28 | 31 | ||
| 29 | #include <mach/msm_iomap.h> | 32 | #include "common.h" |
| 30 | #include <mach/cpu.h> | ||
| 31 | #include <mach/board.h> | ||
| 32 | 33 | ||
| 33 | #define TIMER_MATCH_VAL 0x0000 | 34 | #define TIMER_MATCH_VAL 0x0000 |
| 34 | #define TIMER_COUNT_VAL 0x0004 | 35 | #define TIMER_COUNT_VAL 0x0004 |
| @@ -36,7 +37,6 @@ | |||
| 36 | #define TIMER_ENABLE_CLR_ON_MATCH_EN BIT(1) | 37 | #define TIMER_ENABLE_CLR_ON_MATCH_EN BIT(1) |
| 37 | #define TIMER_ENABLE_EN BIT(0) | 38 | #define TIMER_ENABLE_EN BIT(0) |
| 38 | #define TIMER_CLEAR 0x000C | 39 | #define TIMER_CLEAR 0x000C |
| 39 | #define DGT_CLK_CTL 0x0034 | ||
| 40 | #define DGT_CLK_CTL_DIV_4 0x3 | 40 | #define DGT_CLK_CTL_DIV_4 0x3 |
| 41 | 41 | ||
| 42 | #define GPT_HZ 32768 | 42 | #define GPT_HZ 32768 |
| @@ -101,7 +101,7 @@ static struct clock_event_device msm_clockevent = { | |||
| 101 | 101 | ||
| 102 | static union { | 102 | static union { |
| 103 | struct clock_event_device *evt; | 103 | struct clock_event_device *evt; |
| 104 | struct clock_event_device __percpu **percpu_evt; | 104 | struct clock_event_device * __percpu *percpu_evt; |
| 105 | } msm_evt; | 105 | } msm_evt; |
| 106 | 106 | ||
| 107 | static void __iomem *source_base; | 107 | static void __iomem *source_base; |
| @@ -151,7 +151,7 @@ static int __cpuinit msm_local_timer_setup(struct clock_event_device *evt) | |||
| 151 | 151 | ||
| 152 | *__this_cpu_ptr(msm_evt.percpu_evt) = evt; | 152 | *__this_cpu_ptr(msm_evt.percpu_evt) = evt; |
| 153 | clockevents_register_device(evt); | 153 | clockevents_register_device(evt); |
| 154 | enable_percpu_irq(evt->irq, 0); | 154 | enable_percpu_irq(evt->irq, IRQ_TYPE_EDGE_RISING); |
| 155 | return 0; | 155 | return 0; |
| 156 | } | 156 | } |
| 157 | 157 | ||
| @@ -172,44 +172,21 @@ static notrace u32 msm_sched_clock_read(void) | |||
| 172 | return msm_clocksource.read(&msm_clocksource); | 172 | return msm_clocksource.read(&msm_clocksource); |
| 173 | } | 173 | } |
| 174 | 174 | ||
| 175 | static void __init msm_timer_init(void) | 175 | static void __init msm_timer_init(u32 dgt_hz, int sched_bits, int irq, |
| 176 | bool percpu) | ||
| 176 | { | 177 | { |
| 177 | struct clock_event_device *ce = &msm_clockevent; | 178 | struct clock_event_device *ce = &msm_clockevent; |
| 178 | struct clocksource *cs = &msm_clocksource; | 179 | struct clocksource *cs = &msm_clocksource; |
| 179 | int res; | 180 | int res; |
| 180 | u32 dgt_hz; | ||
| 181 | |||
| 182 | if (cpu_is_msm7x01()) { | ||
| 183 | event_base = MSM_CSR_BASE; | ||
| 184 | source_base = MSM_CSR_BASE + 0x10; | ||
| 185 | dgt_hz = 19200000 >> MSM_DGT_SHIFT; /* 600 KHz */ | ||
| 186 | cs->read = msm_read_timer_count_shift; | ||
| 187 | cs->mask = CLOCKSOURCE_MASK((32 - MSM_DGT_SHIFT)); | ||
| 188 | } else if (cpu_is_msm7x30()) { | ||
| 189 | event_base = MSM_CSR_BASE + 0x04; | ||
| 190 | source_base = MSM_CSR_BASE + 0x24; | ||
| 191 | dgt_hz = 24576000 / 4; | ||
| 192 | } else if (cpu_is_qsd8x50()) { | ||
| 193 | event_base = MSM_CSR_BASE; | ||
| 194 | source_base = MSM_CSR_BASE + 0x10; | ||
| 195 | dgt_hz = 19200000 / 4; | ||
| 196 | } else if (cpu_is_msm8x60() || cpu_is_msm8960()) { | ||
| 197 | event_base = MSM_TMR_BASE + 0x04; | ||
| 198 | /* Use CPU0's timer as the global clock source. */ | ||
| 199 | source_base = MSM_TMR0_BASE + 0x24; | ||
| 200 | dgt_hz = 27000000 / 4; | ||
| 201 | writel_relaxed(DGT_CLK_CTL_DIV_4, MSM_TMR_BASE + DGT_CLK_CTL); | ||
| 202 | } else | ||
| 203 | BUG(); | ||
| 204 | 181 | ||
| 205 | writel_relaxed(0, event_base + TIMER_ENABLE); | 182 | writel_relaxed(0, event_base + TIMER_ENABLE); |
| 206 | writel_relaxed(0, event_base + TIMER_CLEAR); | 183 | writel_relaxed(0, event_base + TIMER_CLEAR); |
| 207 | writel_relaxed(~0, event_base + TIMER_MATCH_VAL); | 184 | writel_relaxed(~0, event_base + TIMER_MATCH_VAL); |
| 208 | ce->cpumask = cpumask_of(0); | 185 | ce->cpumask = cpumask_of(0); |
| 186 | ce->irq = irq; | ||
| 209 | 187 | ||
| 210 | ce->irq = INT_GP_TIMER_EXP; | ||
| 211 | clockevents_config_and_register(ce, GPT_HZ, 4, 0xffffffff); | 188 | clockevents_config_and_register(ce, GPT_HZ, 4, 0xffffffff); |
| 212 | if (cpu_is_msm8x60() || cpu_is_msm8960()) { | 189 | if (percpu) { |
| 213 | msm_evt.percpu_evt = alloc_percpu(struct clock_event_device *); | 190 | msm_evt.percpu_evt = alloc_percpu(struct clock_event_device *); |
| 214 | if (!msm_evt.percpu_evt) { | 191 | if (!msm_evt.percpu_evt) { |
| 215 | pr_err("memory allocation failed for %s\n", ce->name); | 192 | pr_err("memory allocation failed for %s\n", ce->name); |
| @@ -219,7 +196,7 @@ static void __init msm_timer_init(void) | |||
| 219 | res = request_percpu_irq(ce->irq, msm_timer_interrupt, | 196 | res = request_percpu_irq(ce->irq, msm_timer_interrupt, |
| 220 | ce->name, msm_evt.percpu_evt); | 197 | ce->name, msm_evt.percpu_evt); |
| 221 | if (!res) { | 198 | if (!res) { |
| 222 | enable_percpu_irq(ce->irq, 0); | 199 | enable_percpu_irq(ce->irq, IRQ_TYPE_EDGE_RISING); |
| 223 | #ifdef CONFIG_LOCAL_TIMERS | 200 | #ifdef CONFIG_LOCAL_TIMERS |
| 224 | local_timer_register(&msm_local_timer_ops); | 201 | local_timer_register(&msm_local_timer_ops); |
| 225 | #endif | 202 | #endif |
| @@ -238,10 +215,143 @@ err: | |||
| 238 | res = clocksource_register_hz(cs, dgt_hz); | 215 | res = clocksource_register_hz(cs, dgt_hz); |
| 239 | if (res) | 216 | if (res) |
| 240 | pr_err("clocksource_register failed\n"); | 217 | pr_err("clocksource_register failed\n"); |
| 241 | setup_sched_clock(msm_sched_clock_read, | 218 | setup_sched_clock(msm_sched_clock_read, sched_bits, dgt_hz); |
| 242 | cpu_is_msm7x01() ? 32 - MSM_DGT_SHIFT : 32, dgt_hz); | ||
| 243 | } | 219 | } |
| 244 | 220 | ||
| 245 | struct sys_timer msm_timer = { | 221 | #ifdef CONFIG_OF |
| 246 | .init = msm_timer_init | 222 | static const struct of_device_id msm_dgt_match[] __initconst = { |
| 223 | { .compatible = "qcom,msm-dgt" }, | ||
| 224 | { }, | ||
| 225 | }; | ||
| 226 | |||
| 227 | static const struct of_device_id msm_gpt_match[] __initconst = { | ||
| 228 | { .compatible = "qcom,msm-gpt" }, | ||
| 229 | { }, | ||
| 230 | }; | ||
| 231 | |||
| 232 | static void __init msm_dt_timer_init(void) | ||
| 233 | { | ||
| 234 | struct device_node *np; | ||
| 235 | u32 freq; | ||
| 236 | int irq; | ||
| 237 | struct resource res; | ||
| 238 | u32 percpu_offset; | ||
| 239 | void __iomem *dgt_clk_ctl; | ||
| 240 | |||
| 241 | np = of_find_matching_node(NULL, msm_gpt_match); | ||
| 242 | if (!np) { | ||
| 243 | pr_err("Can't find GPT DT node\n"); | ||
| 244 | return; | ||
| 245 | } | ||
| 246 | |||
| 247 | event_base = of_iomap(np, 0); | ||
| 248 | if (!event_base) { | ||
| 249 | pr_err("Failed to map event base\n"); | ||
| 250 | return; | ||
| 251 | } | ||
| 252 | |||
| 253 | irq = irq_of_parse_and_map(np, 0); | ||
| 254 | if (irq <= 0) { | ||
| 255 | pr_err("Can't get irq\n"); | ||
| 256 | return; | ||
| 257 | } | ||
| 258 | of_node_put(np); | ||
| 259 | |||
| 260 | np = of_find_matching_node(NULL, msm_dgt_match); | ||
| 261 | if (!np) { | ||
| 262 | pr_err("Can't find DGT DT node\n"); | ||
| 263 | return; | ||
| 264 | } | ||
| 265 | |||
| 266 | if (of_property_read_u32(np, "cpu-offset", &percpu_offset)) | ||
| 267 | percpu_offset = 0; | ||
| 268 | |||
| 269 | if (of_address_to_resource(np, 0, &res)) { | ||
| 270 | pr_err("Failed to parse DGT resource\n"); | ||
| 271 | return; | ||
| 272 | } | ||
| 273 | |||
| 274 | source_base = ioremap(res.start + percpu_offset, resource_size(&res)); | ||
| 275 | if (!source_base) { | ||
| 276 | pr_err("Failed to map source base\n"); | ||
| 277 | return; | ||
| 278 | } | ||
| 279 | |||
| 280 | if (!of_address_to_resource(np, 1, &res)) { | ||
| 281 | dgt_clk_ctl = ioremap(res.start + percpu_offset, | ||
| 282 | resource_size(&res)); | ||
| 283 | if (!dgt_clk_ctl) { | ||
| 284 | pr_err("Failed to map DGT control base\n"); | ||
| 285 | return; | ||
| 286 | } | ||
| 287 | writel_relaxed(DGT_CLK_CTL_DIV_4, dgt_clk_ctl); | ||
| 288 | iounmap(dgt_clk_ctl); | ||
| 289 | } | ||
| 290 | |||
| 291 | if (of_property_read_u32(np, "clock-frequency", &freq)) { | ||
| 292 | pr_err("Unknown frequency\n"); | ||
| 293 | return; | ||
| 294 | } | ||
| 295 | of_node_put(np); | ||
| 296 | |||
| 297 | msm_timer_init(freq, 32, irq, !!percpu_offset); | ||
| 298 | } | ||
| 299 | |||
| 300 | struct sys_timer msm_dt_timer = { | ||
| 301 | .init = msm_dt_timer_init | ||
| 302 | }; | ||
| 303 | #endif | ||
| 304 | |||
| 305 | static int __init msm_timer_map(phys_addr_t event, phys_addr_t source) | ||
| 306 | { | ||
| 307 | event_base = ioremap(event, SZ_64); | ||
| 308 | if (!event_base) { | ||
| 309 | pr_err("Failed to map event base\n"); | ||
| 310 | return 1; | ||
| 311 | } | ||
| 312 | source_base = ioremap(source, SZ_64); | ||
| 313 | if (!source_base) { | ||
| 314 | pr_err("Failed to map source base\n"); | ||
| 315 | return 1; | ||
| 316 | } | ||
| 317 | return 0; | ||
| 318 | } | ||
| 319 | |||
| 320 | static void __init msm7x01_timer_init(void) | ||
| 321 | { | ||
| 322 | struct clocksource *cs = &msm_clocksource; | ||
| 323 | |||
| 324 | if (msm_timer_map(0xc0100000, 0xc0100010)) | ||
| 325 | return; | ||
| 326 | cs->read = msm_read_timer_count_shift; | ||
| 327 | cs->mask = CLOCKSOURCE_MASK((32 - MSM_DGT_SHIFT)); | ||
| 328 | /* 600 KHz */ | ||
| 329 | msm_timer_init(19200000 >> MSM_DGT_SHIFT, 32 - MSM_DGT_SHIFT, 7, | ||
| 330 | false); | ||
| 331 | } | ||
| 332 | |||
| 333 | struct sys_timer msm7x01_timer = { | ||
| 334 | .init = msm7x01_timer_init | ||
| 335 | }; | ||
| 336 | |||
| 337 | static void __init msm7x30_timer_init(void) | ||
| 338 | { | ||
| 339 | if (msm_timer_map(0xc0100004, 0xc0100024)) | ||
| 340 | return; | ||
| 341 | msm_timer_init(24576000 / 4, 32, 1, false); | ||
| 342 | } | ||
| 343 | |||
| 344 | struct sys_timer msm7x30_timer = { | ||
| 345 | .init = msm7x30_timer_init | ||
| 346 | }; | ||
| 347 | |||
| 348 | static void __init qsd8x50_timer_init(void) | ||
| 349 | { | ||
| 350 | if (msm_timer_map(0xAC100000, 0xAC100010)) | ||
| 351 | return; | ||
| 352 | msm_timer_init(19200000 / 4, 32, 7, false); | ||
| 353 | } | ||
| 354 | |||
| 355 | struct sys_timer qsd8x50_timer = { | ||
| 356 | .init = qsd8x50_timer_init | ||
| 247 | }; | 357 | }; |
diff --git a/arch/arm/mach-mxs/Kconfig b/arch/arm/mach-mxs/Kconfig index 9a8bbda195b2..ecc431909d6f 100644 --- a/arch/arm/mach-mxs/Kconfig +++ b/arch/arm/mach-mxs/Kconfig | |||
| @@ -1,7 +1,5 @@ | |||
| 1 | if ARCH_MXS | 1 | if ARCH_MXS |
| 2 | 2 | ||
| 3 | source "arch/arm/mach-mxs/devices/Kconfig" | ||
| 4 | |||
| 5 | config SOC_IMX23 | 3 | config SOC_IMX23 |
| 6 | bool | 4 | bool |
| 7 | select ARM_AMBA | 5 | select ARM_AMBA |
| @@ -27,91 +25,4 @@ config MACH_MXS_DT | |||
| 27 | Include support for Freescale MXS platforms(i.MX23 and i.MX28) | 25 | Include support for Freescale MXS platforms(i.MX23 and i.MX28) |
| 28 | using the device tree for discovery | 26 | using the device tree for discovery |
| 29 | 27 | ||
| 30 | config MACH_STMP378X_DEVB | ||
| 31 | bool "Support STMP378x_devb Platform" | ||
| 32 | select SOC_IMX23 | ||
| 33 | select MXS_HAVE_AMBA_DUART | ||
| 34 | select MXS_HAVE_PLATFORM_AUART | ||
| 35 | select MXS_HAVE_PLATFORM_MXS_MMC | ||
| 36 | select MXS_HAVE_PLATFORM_RTC_STMP3XXX | ||
| 37 | help | ||
| 38 | Include support for STMP378x-devb platform. This includes specific | ||
| 39 | configurations for the board and its peripherals. | ||
| 40 | |||
| 41 | config MACH_MX23EVK | ||
| 42 | bool "Support MX23EVK Platform" | ||
| 43 | select SOC_IMX23 | ||
| 44 | select MXS_HAVE_AMBA_DUART | ||
| 45 | select MXS_HAVE_PLATFORM_AUART | ||
| 46 | select MXS_HAVE_PLATFORM_MXS_MMC | ||
| 47 | select MXS_HAVE_PLATFORM_MXSFB | ||
| 48 | select MXS_HAVE_PLATFORM_RTC_STMP3XXX | ||
| 49 | help | ||
| 50 | Include support for MX23EVK platform. This includes specific | ||
| 51 | configurations for the board and its peripherals. | ||
| 52 | |||
| 53 | config MACH_MX28EVK | ||
| 54 | bool "Support MX28EVK Platform" | ||
| 55 | select SOC_IMX28 | ||
| 56 | select LEDS_GPIO_REGISTER | ||
| 57 | select MXS_HAVE_AMBA_DUART | ||
| 58 | select MXS_HAVE_PLATFORM_AUART | ||
| 59 | select MXS_HAVE_PLATFORM_FEC | ||
| 60 | select MXS_HAVE_PLATFORM_FLEXCAN | ||
| 61 | select MXS_HAVE_PLATFORM_MXS_MMC | ||
| 62 | select MXS_HAVE_PLATFORM_MXSFB | ||
| 63 | select MXS_HAVE_PLATFORM_MXS_SAIF | ||
| 64 | select MXS_HAVE_PLATFORM_MXS_I2C | ||
| 65 | select MXS_HAVE_PLATFORM_RTC_STMP3XXX | ||
| 66 | help | ||
| 67 | Include support for MX28EVK platform. This includes specific | ||
| 68 | configurations for the board and its peripherals. | ||
| 69 | |||
| 70 | config MODULE_TX28 | ||
| 71 | bool | ||
| 72 | select SOC_IMX28 | ||
| 73 | select LEDS_GPIO_REGISTER | ||
| 74 | select MXS_HAVE_AMBA_DUART | ||
| 75 | select MXS_HAVE_PLATFORM_AUART | ||
| 76 | select MXS_HAVE_PLATFORM_FEC | ||
| 77 | select MXS_HAVE_PLATFORM_MXS_I2C | ||
| 78 | select MXS_HAVE_PLATFORM_MXS_MMC | ||
| 79 | select MXS_HAVE_PLATFORM_MXS_PWM | ||
| 80 | select MXS_HAVE_PLATFORM_RTC_STMP3XXX | ||
| 81 | |||
| 82 | config MODULE_M28 | ||
| 83 | bool | ||
| 84 | select SOC_IMX28 | ||
| 85 | select LEDS_GPIO_REGISTER | ||
| 86 | select MXS_HAVE_AMBA_DUART | ||
| 87 | select MXS_HAVE_PLATFORM_AUART | ||
| 88 | select MXS_HAVE_PLATFORM_FEC | ||
| 89 | select MXS_HAVE_PLATFORM_FLEXCAN | ||
| 90 | select MXS_HAVE_PLATFORM_MXS_I2C | ||
| 91 | select MXS_HAVE_PLATFORM_MXS_MMC | ||
| 92 | select MXS_HAVE_PLATFORM_MXSFB | ||
| 93 | |||
| 94 | config MODULE_APX4 | ||
| 95 | bool | ||
| 96 | select SOC_IMX28 | ||
| 97 | select LEDS_GPIO_REGISTER | ||
| 98 | select MXS_HAVE_AMBA_DUART | ||
| 99 | select MXS_HAVE_PLATFORM_AUART | ||
| 100 | select MXS_HAVE_PLATFORM_FEC | ||
| 101 | select MXS_HAVE_PLATFORM_MXS_I2C | ||
| 102 | select MXS_HAVE_PLATFORM_MXS_MMC | ||
| 103 | select MXS_HAVE_PLATFORM_MXS_SAIF | ||
| 104 | |||
| 105 | config MACH_TX28 | ||
| 106 | bool "Ka-Ro TX28 module" | ||
| 107 | select MODULE_TX28 | ||
| 108 | |||
| 109 | config MACH_M28EVK | ||
| 110 | bool "Support DENX M28EVK Platform" | ||
| 111 | select MODULE_M28 | ||
| 112 | |||
| 113 | config MACH_APX4DEVKIT | ||
| 114 | bool "Support Bluegiga APX4 Development Kit" | ||
| 115 | select MODULE_APX4 | ||
| 116 | |||
| 117 | endif | 28 | endif |
diff --git a/arch/arm/mach-mxs/Makefile b/arch/arm/mach-mxs/Makefile index fed3695a1339..3d3c8a973062 100644 --- a/arch/arm/mach-mxs/Makefile +++ b/arch/arm/mach-mxs/Makefile | |||
| @@ -1,15 +1,6 @@ | |||
| 1 | # Common support | 1 | # Common support |
| 2 | obj-y := devices.o icoll.o iomux.o ocotp.o system.o timer.o mm.o | 2 | obj-y := icoll.o ocotp.o system.o timer.o mm.o |
| 3 | 3 | ||
| 4 | obj-$(CONFIG_PM) += pm.o | 4 | obj-$(CONFIG_PM) += pm.o |
| 5 | 5 | ||
| 6 | obj-$(CONFIG_MACH_MXS_DT) += mach-mxs.o | 6 | obj-$(CONFIG_MACH_MXS_DT) += mach-mxs.o |
| 7 | obj-$(CONFIG_MACH_STMP378X_DEVB) += mach-stmp378x_devb.o | ||
| 8 | obj-$(CONFIG_MACH_MX23EVK) += mach-mx23evk.o | ||
| 9 | obj-$(CONFIG_MACH_MX28EVK) += mach-mx28evk.o | ||
| 10 | obj-$(CONFIG_MACH_M28EVK) += mach-m28evk.o | ||
| 11 | obj-$(CONFIG_MACH_APX4DEVKIT) += mach-apx4devkit.o | ||
| 12 | obj-$(CONFIG_MODULE_TX28) += module-tx28.o | ||
| 13 | obj-$(CONFIG_MACH_TX28) += mach-tx28.o | ||
| 14 | |||
| 15 | obj-y += devices/ | ||
diff --git a/arch/arm/mach-mxs/Makefile.boot b/arch/arm/mach-mxs/Makefile.boot index 4582999cf080..8bd23a8558db 100644 --- a/arch/arm/mach-mxs/Makefile.boot +++ b/arch/arm/mach-mxs/Makefile.boot | |||
| @@ -5,6 +5,7 @@ dtb-y += imx23-evk.dtb \ | |||
| 5 | imx23-stmp378x_devb.dtb \ | 5 | imx23-stmp378x_devb.dtb \ |
| 6 | imx28-apx4devkit.dtb \ | 6 | imx28-apx4devkit.dtb \ |
| 7 | imx28-cfa10036.dtb \ | 7 | imx28-cfa10036.dtb \ |
| 8 | imx28-cfa10049.dtb \ | ||
| 8 | imx28-evk.dtb \ | 9 | imx28-evk.dtb \ |
| 9 | imx28-m28evk.dtb \ | 10 | imx28-m28evk.dtb \ |
| 10 | imx28-tx28.dtb \ | 11 | imx28-tx28.dtb \ |
diff --git a/arch/arm/mach-mxs/devices-mx23.h b/arch/arm/mach-mxs/devices-mx23.h deleted file mode 100644 index 9ee5cede3d42..000000000000 --- a/arch/arm/mach-mxs/devices-mx23.h +++ /dev/null | |||
| @@ -1,43 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2010 Pengutronix | ||
| 3 | * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de> | ||
| 4 | * | ||
| 5 | * Copyright 2010 Freescale Semiconductor, Inc. All Rights Reserved. | ||
| 6 | * | ||
| 7 | * This program is free software; you can redistribute it and/or modify it under | ||
| 8 | * the terms of the GNU General Public License version 2 as published by the | ||
| 9 | * Free Software Foundation. | ||
| 10 | */ | ||
| 11 | #include <mach/mx23.h> | ||
| 12 | #include <mach/devices-common.h> | ||
| 13 | #include <linux/mxsfb.h> | ||
| 14 | #include <linux/amba/bus.h> | ||
| 15 | |||
| 16 | static inline int mx23_add_duart(void) | ||
| 17 | { | ||
| 18 | struct amba_device *d; | ||
| 19 | |||
| 20 | d = amba_ahb_device_add(NULL, "duart", MX23_DUART_BASE_ADDR, SZ_8K, | ||
| 21 | MX23_INT_DUART, 0, 0, 0); | ||
| 22 | return IS_ERR(d) ? PTR_ERR(d) : 0; | ||
| 23 | } | ||
| 24 | |||
| 25 | extern const struct mxs_auart_data mx23_auart_data[] __initconst; | ||
| 26 | #define mx23_add_auart(id) mxs_add_auart(&mx23_auart_data[id]) | ||
| 27 | #define mx23_add_auart0() mx23_add_auart(0) | ||
| 28 | #define mx23_add_auart1() mx23_add_auart(1) | ||
| 29 | |||
| 30 | extern const struct mxs_gpmi_nand_data mx23_gpmi_nand_data __initconst; | ||
| 31 | #define mx23_add_gpmi_nand(pdata) \ | ||
| 32 | mxs_add_gpmi_nand(pdata, &mx23_gpmi_nand_data) | ||
| 33 | |||
| 34 | extern const struct mxs_mxs_mmc_data mx23_mxs_mmc_data[] __initconst; | ||
| 35 | #define mx23_add_mxs_mmc(id, pdata) \ | ||
| 36 | mxs_add_mxs_mmc(&mx23_mxs_mmc_data[id], pdata) | ||
| 37 | |||
| 38 | #define mx23_add_mxs_pwm(id) mxs_add_mxs_pwm(MX23_PWM_BASE_ADDR, id) | ||
| 39 | |||
| 40 | struct platform_device *__init mx23_add_mxsfb( | ||
| 41 | const struct mxsfb_platform_data *pdata); | ||
| 42 | |||
| 43 | struct platform_device *__init mx23_add_rtc_stmp3xxx(void); | ||
diff --git a/arch/arm/mach-mxs/devices-mx28.h b/arch/arm/mach-mxs/devices-mx28.h deleted file mode 100644 index fcab431060f4..000000000000 --- a/arch/arm/mach-mxs/devices-mx28.h +++ /dev/null | |||
| @@ -1,63 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2010 Pengutronix | ||
| 3 | * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de> | ||
| 4 | * | ||
| 5 | * Copyright 2010 Freescale Semiconductor, Inc. All Rights Reserved. | ||
| 6 | * | ||
| 7 | * This program is free software; you can redistribute it and/or modify it under | ||
| 8 | * the terms of the GNU General Public License version 2 as published by the | ||
| 9 | * Free Software Foundation. | ||
| 10 | */ | ||
| 11 | #include <mach/mx28.h> | ||
| 12 | #include <mach/devices-common.h> | ||
| 13 | #include <linux/mxsfb.h> | ||
| 14 | #include <linux/amba/bus.h> | ||
| 15 | |||
| 16 | static inline int mx28_add_duart(void) | ||
| 17 | { | ||
| 18 | struct amba_device *d; | ||
| 19 | |||
| 20 | d = amba_ahb_device_add(NULL, "duart", MX28_DUART_BASE_ADDR, SZ_8K, | ||
| 21 | MX28_INT_DUART, 0, 0, 0); | ||
| 22 | return IS_ERR(d) ? PTR_ERR(d) : 0; | ||
| 23 | } | ||
| 24 | |||
| 25 | extern const struct mxs_auart_data mx28_auart_data[] __initconst; | ||
| 26 | #define mx28_add_auart(id) mxs_add_auart(&mx28_auart_data[id]) | ||
| 27 | #define mx28_add_auart0() mx28_add_auart(0) | ||
| 28 | #define mx28_add_auart1() mx28_add_auart(1) | ||
| 29 | #define mx28_add_auart2() mx28_add_auart(2) | ||
| 30 | #define mx28_add_auart3() mx28_add_auart(3) | ||
| 31 | #define mx28_add_auart4() mx28_add_auart(4) | ||
| 32 | |||
| 33 | extern const struct mxs_fec_data mx28_fec_data[] __initconst; | ||
| 34 | #define mx28_add_fec(id, pdata) \ | ||
| 35 | mxs_add_fec(&mx28_fec_data[id], pdata) | ||
| 36 | |||
| 37 | extern const struct mxs_flexcan_data mx28_flexcan_data[] __initconst; | ||
| 38 | #define mx28_add_flexcan(id, pdata) \ | ||
| 39 | mxs_add_flexcan(&mx28_flexcan_data[id], pdata) | ||
| 40 | #define mx28_add_flexcan0(pdata) mx28_add_flexcan(0, pdata) | ||
| 41 | #define mx28_add_flexcan1(pdata) mx28_add_flexcan(1, pdata) | ||
| 42 | |||
| 43 | extern const struct mxs_gpmi_nand_data mx28_gpmi_nand_data __initconst; | ||
| 44 | #define mx28_add_gpmi_nand(pdata) \ | ||
| 45 | mxs_add_gpmi_nand(pdata, &mx28_gpmi_nand_data) | ||
| 46 | |||
| 47 | extern const struct mxs_mxs_i2c_data mx28_mxs_i2c_data[] __initconst; | ||
| 48 | #define mx28_add_mxs_i2c(id) mxs_add_mxs_i2c(&mx28_mxs_i2c_data[id]) | ||
| 49 | |||
| 50 | extern const struct mxs_mxs_mmc_data mx28_mxs_mmc_data[] __initconst; | ||
| 51 | #define mx28_add_mxs_mmc(id, pdata) \ | ||
| 52 | mxs_add_mxs_mmc(&mx28_mxs_mmc_data[id], pdata) | ||
| 53 | |||
| 54 | #define mx28_add_mxs_pwm(id) mxs_add_mxs_pwm(MX28_PWM_BASE_ADDR, id) | ||
| 55 | |||
| 56 | struct platform_device *__init mx28_add_mxsfb( | ||
| 57 | const struct mxsfb_platform_data *pdata); | ||
| 58 | |||
| 59 | extern const struct mxs_saif_data mx28_saif_data[] __initconst; | ||
| 60 | #define mx28_add_saif(id, pdata) \ | ||
| 61 | mxs_add_saif(&mx28_saif_data[id], pdata) | ||
| 62 | |||
| 63 | struct platform_device *__init mx28_add_rtc_stmp3xxx(void); | ||
diff --git a/arch/arm/mach-mxs/devices.c b/arch/arm/mach-mxs/devices.c deleted file mode 100644 index cf50b5a66dda..000000000000 --- a/arch/arm/mach-mxs/devices.c +++ /dev/null | |||
| @@ -1,87 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Copyright 2008 Sascha Hauer, kernel@pengutronix.de | ||
| 3 | * | ||
| 4 | * This program is free software; you can redistribute it and/or | ||
| 5 | * modify it under the terms of the GNU General Public License | ||
| 6 | * as published by the Free Software Foundation; either version 2 | ||
| 7 | * of the License, or (at your option) any later version. | ||
| 8 | * This program is distributed in the hope that it will be useful, | ||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | * GNU General Public License for more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program; if not, write to the Free Software | ||
| 15 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, | ||
| 16 | * Boston, MA 02110-1301, USA. | ||
| 17 | */ | ||
| 18 | |||
| 19 | #include <linux/kernel.h> | ||
| 20 | #include <linux/slab.h> | ||
| 21 | #include <linux/init.h> | ||
| 22 | #include <linux/platform_device.h> | ||
| 23 | #include <linux/amba/bus.h> | ||
| 24 | |||
| 25 | struct platform_device *__init mxs_add_platform_device_dmamask( | ||
| 26 | const char *name, int id, | ||
| 27 | const struct resource *res, unsigned int num_resources, | ||
| 28 | const void *data, size_t size_data, u64 dmamask) | ||
| 29 | { | ||
| 30 | int ret = -ENOMEM; | ||
| 31 | struct platform_device *pdev; | ||
| 32 | |||
| 33 | pdev = platform_device_alloc(name, id); | ||
| 34 | if (!pdev) | ||
| 35 | goto err; | ||
| 36 | |||
| 37 | if (dmamask) { | ||
| 38 | /* | ||
| 39 | * This memory isn't freed when the device is put, | ||
| 40 | * I don't have a nice idea for that though. Conceptually | ||
| 41 | * dma_mask in struct device should not be a pointer. | ||
| 42 | * See http://thread.gmane.org/gmane.linux.kernel.pci/9081 | ||
| 43 | */ | ||
| 44 | pdev->dev.dma_mask = | ||
| 45 | kmalloc(sizeof(*pdev->dev.dma_mask), GFP_KERNEL); | ||
| 46 | if (!pdev->dev.dma_mask) | ||
| 47 | /* ret is still -ENOMEM; */ | ||
| 48 | goto err; | ||
| 49 | |||
| 50 | *pdev->dev.dma_mask = dmamask; | ||
| 51 | pdev->dev.coherent_dma_mask = dmamask; | ||
| 52 | } | ||
| 53 | |||
| 54 | if (res) { | ||
| 55 | ret = platform_device_add_resources(pdev, res, num_resources); | ||
| 56 | if (ret) | ||
| 57 | goto err; | ||
| 58 | } | ||
| 59 | |||
| 60 | if (data) { | ||
| 61 | ret = platform_device_add_data(pdev, data, size_data); | ||
| 62 | if (ret) | ||
| 63 | goto err; | ||
| 64 | } | ||
| 65 | |||
| 66 | ret = platform_device_add(pdev); | ||
| 67 | if (ret) { | ||
| 68 | err: | ||
| 69 | if (dmamask) | ||
| 70 | kfree(pdev->dev.dma_mask); | ||
| 71 | platform_device_put(pdev); | ||
| 72 | return ERR_PTR(ret); | ||
| 73 | } | ||
| 74 | |||
| 75 | return pdev; | ||
| 76 | } | ||
| 77 | |||
| 78 | struct device mxs_apbh_bus = { | ||
| 79 | .init_name = "mxs_apbh", | ||
| 80 | .parent = &platform_bus, | ||
| 81 | }; | ||
| 82 | |||
| 83 | static int __init mxs_device_init(void) | ||
| 84 | { | ||
| 85 | return device_register(&mxs_apbh_bus); | ||
| 86 | } | ||
| 87 | core_initcall(mxs_device_init); | ||
diff --git a/arch/arm/mach-mxs/devices/Kconfig b/arch/arm/mach-mxs/devices/Kconfig deleted file mode 100644 index 19659de1c4e8..000000000000 --- a/arch/arm/mach-mxs/devices/Kconfig +++ /dev/null | |||
| @@ -1,33 +0,0 @@ | |||
| 1 | config MXS_HAVE_AMBA_DUART | ||
| 2 | bool | ||
| 3 | |||
| 4 | config MXS_HAVE_PLATFORM_AUART | ||
| 5 | bool | ||
| 6 | |||
| 7 | config MXS_HAVE_PLATFORM_FEC | ||
| 8 | bool | ||
| 9 | |||
| 10 | config MXS_HAVE_PLATFORM_FLEXCAN | ||
| 11 | select HAVE_CAN_FLEXCAN if CAN | ||
| 12 | bool | ||
| 13 | |||
| 14 | config MXS_HAVE_PLATFORM_GPMI_NAND | ||
| 15 | bool | ||
| 16 | |||
| 17 | config MXS_HAVE_PLATFORM_MXS_I2C | ||
| 18 | bool | ||
| 19 | |||
| 20 | config MXS_HAVE_PLATFORM_MXS_MMC | ||
| 21 | bool | ||
| 22 | |||
| 23 | config MXS_HAVE_PLATFORM_MXS_PWM | ||
| 24 | bool | ||
| 25 | |||
| 26 | config MXS_HAVE_PLATFORM_MXSFB | ||
| 27 | bool | ||
| 28 | |||
| 29 | config MXS_HAVE_PLATFORM_MXS_SAIF | ||
| 30 | bool | ||
| 31 | |||
| 32 | config MXS_HAVE_PLATFORM_RTC_STMP3XXX | ||
| 33 | bool | ||
diff --git a/arch/arm/mach-mxs/devices/Makefile b/arch/arm/mach-mxs/devices/Makefile deleted file mode 100644 index 5f72d9787444..000000000000 --- a/arch/arm/mach-mxs/devices/Makefile +++ /dev/null | |||
| @@ -1,12 +0,0 @@ | |||
| 1 | obj-$(CONFIG_MXS_HAVE_PLATFORM_AUART) += platform-auart.o | ||
| 2 | obj-y += platform-dma.o | ||
| 3 | obj-$(CONFIG_MXS_HAVE_PLATFORM_FEC) += platform-fec.o | ||
| 4 | obj-$(CONFIG_MXS_HAVE_PLATFORM_FLEXCAN) += platform-flexcan.o | ||
| 5 | obj-$(CONFIG_MXS_HAVE_PLATFORM_GPMI_NAND) += platform-gpmi-nand.o | ||
| 6 | obj-$(CONFIG_MXS_HAVE_PLATFORM_MXS_I2C) += platform-mxs-i2c.o | ||
| 7 | obj-$(CONFIG_MXS_HAVE_PLATFORM_MXS_MMC) += platform-mxs-mmc.o | ||
| 8 | obj-$(CONFIG_MXS_HAVE_PLATFORM_MXS_PWM) += platform-mxs-pwm.o | ||
| 9 | obj-y += platform-gpio-mxs.o | ||
| 10 | obj-$(CONFIG_MXS_HAVE_PLATFORM_MXSFB) += platform-mxsfb.o | ||
| 11 | obj-$(CONFIG_MXS_HAVE_PLATFORM_MXS_SAIF) += platform-mxs-saif.o | ||
| 12 | obj-$(CONFIG_MXS_HAVE_PLATFORM_RTC_STMP3XXX) += platform-rtc-stmp3xxx.o | ||
diff --git a/arch/arm/mach-mxs/devices/platform-auart.c b/arch/arm/mach-mxs/devices/platform-auart.c deleted file mode 100644 index 27608f5d2ac8..000000000000 --- a/arch/arm/mach-mxs/devices/platform-auart.c +++ /dev/null | |||
| @@ -1,65 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2010 Pengutronix | ||
| 3 | * Sascha Hauer <s.hauer@pengutronix.de> | ||
| 4 | * | ||
| 5 | * This program is free software; you can redistribute it and/or modify it under | ||
| 6 | * the terms of the GNU General Public License version 2 as published by the | ||
| 7 | * Free Software Foundation. | ||
| 8 | */ | ||
| 9 | #include <linux/dma-mapping.h> | ||
| 10 | #include <asm/sizes.h> | ||
| 11 | #include <mach/mx23.h> | ||
| 12 | #include <mach/mx28.h> | ||
| 13 | #include <mach/devices-common.h> | ||
| 14 | |||
| 15 | #define mxs_auart_data_entry_single(soc, _id, hwid) \ | ||
| 16 | { \ | ||
| 17 | .id = _id, \ | ||
| 18 | .iobase = soc ## _AUART ## hwid ## _BASE_ADDR, \ | ||
| 19 | .irq = soc ## _INT_AUART ## hwid, \ | ||
| 20 | } | ||
| 21 | |||
| 22 | #define mxs_auart_data_entry(soc, _id, hwid) \ | ||
| 23 | [_id] = mxs_auart_data_entry_single(soc, _id, hwid) | ||
| 24 | |||
| 25 | #ifdef CONFIG_SOC_IMX23 | ||
| 26 | const struct mxs_auart_data mx23_auart_data[] __initconst = { | ||
| 27 | #define mx23_auart_data_entry(_id, hwid) \ | ||
| 28 | mxs_auart_data_entry(MX23, _id, hwid) | ||
| 29 | mx23_auart_data_entry(0, 1), | ||
| 30 | mx23_auart_data_entry(1, 2), | ||
| 31 | }; | ||
| 32 | #endif | ||
| 33 | |||
| 34 | #ifdef CONFIG_SOC_IMX28 | ||
| 35 | const struct mxs_auart_data mx28_auart_data[] __initconst = { | ||
| 36 | #define mx28_auart_data_entry(_id) \ | ||
| 37 | mxs_auart_data_entry(MX28, _id, _id) | ||
| 38 | mx28_auart_data_entry(0), | ||
| 39 | mx28_auart_data_entry(1), | ||
| 40 | mx28_auart_data_entry(2), | ||
| 41 | mx28_auart_data_entry(3), | ||
| 42 | mx28_auart_data_entry(4), | ||
| 43 | }; | ||
| 44 | #endif | ||
| 45 | |||
| 46 | struct platform_device *__init mxs_add_auart( | ||
| 47 | const struct mxs_auart_data *data) | ||
| 48 | { | ||
| 49 | struct resource res[] = { | ||
| 50 | { | ||
| 51 | .start = data->iobase, | ||
| 52 | .end = data->iobase + SZ_8K - 1, | ||
| 53 | .flags = IORESOURCE_MEM, | ||
| 54 | }, { | ||
| 55 | .start = data->irq, | ||
| 56 | .end = data->irq, | ||
| 57 | .flags = IORESOURCE_IRQ, | ||
| 58 | }, | ||
| 59 | }; | ||
| 60 | |||
| 61 | return mxs_add_platform_device_dmamask("mxs-auart", data->id, | ||
| 62 | res, ARRAY_SIZE(res), NULL, 0, | ||
| 63 | DMA_BIT_MASK(32)); | ||
| 64 | } | ||
| 65 | |||
diff --git a/arch/arm/mach-mxs/devices/platform-dma.c b/arch/arm/mach-mxs/devices/platform-dma.c deleted file mode 100644 index 46824501de00..000000000000 --- a/arch/arm/mach-mxs/devices/platform-dma.c +++ /dev/null | |||
| @@ -1,31 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Copyright 2011 Freescale Semiconductor, Inc. All Rights Reserved. | ||
| 3 | * | ||
| 4 | * This program is free software; you can redistribute it and/or modify it under | ||
| 5 | * the terms of the GNU General Public License version 2 as published by the | ||
| 6 | * Free Software Foundation. | ||
| 7 | */ | ||
| 8 | #include <linux/compiler.h> | ||
| 9 | #include <linux/dma-mapping.h> | ||
| 10 | #include <linux/err.h> | ||
| 11 | #include <linux/init.h> | ||
| 12 | |||
| 13 | #include <mach/mx23.h> | ||
| 14 | #include <mach/mx28.h> | ||
| 15 | #include <mach/devices-common.h> | ||
| 16 | |||
| 17 | struct platform_device *__init mxs_add_dma(const char *devid, | ||
| 18 | resource_size_t base) | ||
| 19 | { | ||
| 20 | struct resource res[] = { | ||
| 21 | { | ||
| 22 | .start = base, | ||
| 23 | .end = base + SZ_8K - 1, | ||
| 24 | .flags = IORESOURCE_MEM, | ||
| 25 | } | ||
| 26 | }; | ||
| 27 | |||
| 28 | return mxs_add_platform_device_dmamask(devid, -1, | ||
| 29 | res, ARRAY_SIZE(res), NULL, 0, | ||
| 30 | DMA_BIT_MASK(32)); | ||
| 31 | } | ||
diff --git a/arch/arm/mach-mxs/devices/platform-fec.c b/arch/arm/mach-mxs/devices/platform-fec.c deleted file mode 100644 index ae96a4fd8f14..000000000000 --- a/arch/arm/mach-mxs/devices/platform-fec.c +++ /dev/null | |||
| @@ -1,52 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2010 Pengutronix | ||
| 3 | * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de> | ||
| 4 | * | ||
| 5 | * This program is free software; you can redistribute it and/or modify it under | ||
| 6 | * the terms of the GNU General Public License version 2 as published by the | ||
| 7 | * Free Software Foundation. | ||
| 8 | */ | ||
| 9 | #include <linux/dma-mapping.h> | ||
| 10 | #include <asm/sizes.h> | ||
| 11 | #include <mach/mx28.h> | ||
| 12 | #include <mach/devices-common.h> | ||
| 13 | |||
| 14 | #define mxs_fec_data_entry_single(soc, _id) \ | ||
| 15 | { \ | ||
| 16 | .id = _id, \ | ||
| 17 | .iobase = soc ## _ENET_MAC ## _id ## _BASE_ADDR, \ | ||
| 18 | .irq = soc ## _INT_ENET_MAC ## _id, \ | ||
| 19 | } | ||
| 20 | |||
| 21 | #define mxs_fec_data_entry(soc, _id) \ | ||
| 22 | [_id] = mxs_fec_data_entry_single(soc, _id) | ||
| 23 | |||
| 24 | #ifdef CONFIG_SOC_IMX28 | ||
| 25 | const struct mxs_fec_data mx28_fec_data[] __initconst = { | ||
| 26 | #define mx28_fec_data_entry(_id) \ | ||
| 27 | mxs_fec_data_entry(MX28, _id) | ||
| 28 | mx28_fec_data_entry(0), | ||
| 29 | mx28_fec_data_entry(1), | ||
| 30 | }; | ||
| 31 | #endif | ||
| 32 | |||
| 33 | struct platform_device *__init mxs_add_fec( | ||
| 34 | const struct mxs_fec_data *data, | ||
| 35 | const struct fec_platform_data *pdata) | ||
| 36 | { | ||
| 37 | struct resource res[] = { | ||
| 38 | { | ||
| 39 | .start = data->iobase, | ||
| 40 | .end = data->iobase + SZ_16K - 1, | ||
| 41 | .flags = IORESOURCE_MEM, | ||
| 42 | }, { | ||
| 43 | .start = data->irq, | ||
| 44 | .end = data->irq, | ||
| 45 | .flags = IORESOURCE_IRQ, | ||
| 46 | }, | ||
| 47 | }; | ||
| 48 | |||
| 49 | return mxs_add_platform_device_dmamask("imx28-fec", data->id, | ||
| 50 | res, ARRAY_SIZE(res), pdata, sizeof(*pdata), | ||
| 51 | DMA_BIT_MASK(32)); | ||
| 52 | } | ||
diff --git a/arch/arm/mach-mxs/devices/platform-flexcan.c b/arch/arm/mach-mxs/devices/platform-flexcan.c deleted file mode 100644 index 43a6b4bae6fe..000000000000 --- a/arch/arm/mach-mxs/devices/platform-flexcan.c +++ /dev/null | |||
| @@ -1,51 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2010, 2011 Pengutronix, | ||
| 3 | * Marc Kleine-Budde <kernel@pengutronix.de> | ||
| 4 | * | ||
| 5 | * This program is free software; you can redistribute it and/or modify it under | ||
| 6 | * the terms of the GNU General Public License version 2 as published by the | ||
| 7 | * Free Software Foundation. | ||
| 8 | */ | ||
| 9 | #include <asm/sizes.h> | ||
| 10 | #include <mach/mx28.h> | ||
| 11 | #include <mach/devices-common.h> | ||
| 12 | |||
| 13 | #define mxs_flexcan_data_entry_single(soc, _id, _hwid, _size) \ | ||
| 14 | { \ | ||
| 15 | .id = _id, \ | ||
| 16 | .iobase = soc ## _CAN ## _hwid ## _BASE_ADDR, \ | ||
| 17 | .iosize = _size, \ | ||
| 18 | .irq = soc ## _INT_CAN ## _hwid, \ | ||
| 19 | } | ||
| 20 | |||
| 21 | #define mxs_flexcan_data_entry(soc, _id, _hwid, _size) \ | ||
| 22 | [_id] = mxs_flexcan_data_entry_single(soc, _id, _hwid, _size) | ||
| 23 | |||
| 24 | #ifdef CONFIG_SOC_IMX28 | ||
| 25 | const struct mxs_flexcan_data mx28_flexcan_data[] __initconst = { | ||
| 26 | #define mx28_flexcan_data_entry(_id, _hwid) \ | ||
| 27 | mxs_flexcan_data_entry_single(MX28, _id, _hwid, SZ_8K) | ||
| 28 | mx28_flexcan_data_entry(0, 0), | ||
| 29 | mx28_flexcan_data_entry(1, 1), | ||
| 30 | }; | ||
| 31 | #endif /* ifdef CONFIG_SOC_IMX28 */ | ||
| 32 | |||
| 33 | struct platform_device *__init mxs_add_flexcan( | ||
| 34 | const struct mxs_flexcan_data *data, | ||
| 35 | const struct flexcan_platform_data *pdata) | ||
| 36 | { | ||
| 37 | struct resource res[] = { | ||
| 38 | { | ||
| 39 | .start = data->iobase, | ||
| 40 | .end = data->iobase + data->iosize - 1, | ||
| 41 | .flags = IORESOURCE_MEM, | ||
| 42 | }, { | ||
| 43 | .start = data->irq, | ||
| 44 | .end = data->irq, | ||
| 45 | .flags = IORESOURCE_IRQ, | ||
| 46 | }, | ||
| 47 | }; | ||
| 48 | |||
| 49 | return mxs_add_platform_device("flexcan", data->id, | ||
| 50 | res, ARRAY_SIZE(res), pdata, sizeof(*pdata)); | ||
| 51 | } | ||
diff --git a/arch/arm/mach-mxs/devices/platform-gpio-mxs.c b/arch/arm/mach-mxs/devices/platform-gpio-mxs.c deleted file mode 100644 index cd99f19ec637..000000000000 --- a/arch/arm/mach-mxs/devices/platform-gpio-mxs.c +++ /dev/null | |||
| @@ -1,33 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Copyright 2011 Freescale Semiconductor, Inc. All Rights Reserved. | ||
| 3 | * | ||
| 4 | * This program is free software; you can redistribute it and/or modify it under | ||
| 5 | * the terms of the GNU General Public License version 2 as published by the | ||
| 6 | * Free Software Foundation. | ||
| 7 | */ | ||
| 8 | #include <linux/compiler.h> | ||
| 9 | #include <linux/err.h> | ||
| 10 | #include <linux/init.h> | ||
| 11 | |||
| 12 | #include <mach/mx23.h> | ||
| 13 | #include <mach/mx28.h> | ||
| 14 | #include <mach/devices-common.h> | ||
| 15 | |||
| 16 | struct platform_device *__init mxs_add_gpio( | ||
| 17 | char *name, int id, resource_size_t iobase, int irq) | ||
| 18 | { | ||
| 19 | struct resource res[] = { | ||
| 20 | { | ||
| 21 | .start = iobase, | ||
| 22 | .end = iobase + SZ_8K - 1, | ||
| 23 | .flags = IORESOURCE_MEM, | ||
| 24 | }, { | ||
| 25 | .start = irq, | ||
| 26 | .end = irq, | ||
| 27 | .flags = IORESOURCE_IRQ, | ||
| 28 | }, | ||
| 29 | }; | ||
| 30 | |||
| 31 | return platform_device_register_resndata(&mxs_apbh_bus, | ||
| 32 | name, id, res, ARRAY_SIZE(res), NULL, 0); | ||
| 33 | } | ||
diff --git a/arch/arm/mach-mxs/devices/platform-gpmi-nand.c b/arch/arm/mach-mxs/devices/platform-gpmi-nand.c deleted file mode 100644 index 3e22df5944a8..000000000000 --- a/arch/arm/mach-mxs/devices/platform-gpmi-nand.c +++ /dev/null | |||
| @@ -1,81 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2011 Freescale Semiconductor, Inc. All Rights Reserved. | ||
| 3 | * | ||
| 4 | * This program is free software; you can redistribute it and/or modify | ||
| 5 | * it under the terms of the GNU General Public License as published by | ||
| 6 | * the Free Software Foundation; either version 2 of the License, or | ||
| 7 | * (at your option) any later version. | ||
| 8 | * | ||
| 9 | * This program is distributed in the hope that it will be useful, | ||
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | * GNU General Public License for more details. | ||
| 13 | * | ||
| 14 | * You should have received a copy of the GNU General Public License along | ||
| 15 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
| 16 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
| 17 | */ | ||
| 18 | #include <asm/sizes.h> | ||
| 19 | #include <mach/mx23.h> | ||
| 20 | #include <mach/mx28.h> | ||
| 21 | #include <mach/devices-common.h> | ||
| 22 | #include <linux/dma-mapping.h> | ||
| 23 | |||
| 24 | #ifdef CONFIG_SOC_IMX23 | ||
| 25 | const struct mxs_gpmi_nand_data mx23_gpmi_nand_data __initconst = { | ||
| 26 | .devid = "imx23-gpmi-nand", | ||
| 27 | .res = { | ||
| 28 | /* GPMI */ | ||
| 29 | DEFINE_RES_MEM_NAMED(MX23_GPMI_BASE_ADDR, SZ_8K, | ||
| 30 | GPMI_NAND_GPMI_REGS_ADDR_RES_NAME), | ||
| 31 | DEFINE_RES_IRQ_NAMED(MX23_INT_GPMI_ATTENTION, | ||
| 32 | GPMI_NAND_GPMI_INTERRUPT_RES_NAME), | ||
| 33 | /* BCH */ | ||
| 34 | DEFINE_RES_MEM_NAMED(MX23_BCH_BASE_ADDR, SZ_8K, | ||
| 35 | GPMI_NAND_BCH_REGS_ADDR_RES_NAME), | ||
| 36 | DEFINE_RES_IRQ_NAMED(MX23_INT_BCH, | ||
| 37 | GPMI_NAND_BCH_INTERRUPT_RES_NAME), | ||
| 38 | /* DMA */ | ||
| 39 | DEFINE_RES_NAMED(MX23_DMA_GPMI0, | ||
| 40 | MX23_DMA_GPMI3 - MX23_DMA_GPMI0 + 1, | ||
| 41 | GPMI_NAND_DMA_CHANNELS_RES_NAME, | ||
| 42 | IORESOURCE_DMA), | ||
| 43 | DEFINE_RES_IRQ_NAMED(MX23_INT_GPMI_DMA, | ||
| 44 | GPMI_NAND_DMA_INTERRUPT_RES_NAME), | ||
| 45 | }, | ||
| 46 | }; | ||
| 47 | #endif | ||
| 48 | |||
| 49 | #ifdef CONFIG_SOC_IMX28 | ||
| 50 | const struct mxs_gpmi_nand_data mx28_gpmi_nand_data __initconst = { | ||
| 51 | .devid = "imx28-gpmi-nand", | ||
| 52 | .res = { | ||
| 53 | /* GPMI */ | ||
| 54 | DEFINE_RES_MEM_NAMED(MX28_GPMI_BASE_ADDR, SZ_8K, | ||
| 55 | GPMI_NAND_GPMI_REGS_ADDR_RES_NAME), | ||
| 56 | DEFINE_RES_IRQ_NAMED(MX28_INT_GPMI, | ||
| 57 | GPMI_NAND_GPMI_INTERRUPT_RES_NAME), | ||
| 58 | /* BCH */ | ||
| 59 | DEFINE_RES_MEM_NAMED(MX28_BCH_BASE_ADDR, SZ_8K, | ||
| 60 | GPMI_NAND_BCH_REGS_ADDR_RES_NAME), | ||
| 61 | DEFINE_RES_IRQ_NAMED(MX28_INT_BCH, | ||
| 62 | GPMI_NAND_BCH_INTERRUPT_RES_NAME), | ||
| 63 | /* DMA */ | ||
| 64 | DEFINE_RES_NAMED(MX28_DMA_GPMI0, | ||
| 65 | MX28_DMA_GPMI7 - MX28_DMA_GPMI0 + 1, | ||
| 66 | GPMI_NAND_DMA_CHANNELS_RES_NAME, | ||
| 67 | IORESOURCE_DMA), | ||
| 68 | DEFINE_RES_IRQ_NAMED(MX28_INT_GPMI_DMA, | ||
| 69 | GPMI_NAND_DMA_INTERRUPT_RES_NAME), | ||
| 70 | }, | ||
| 71 | }; | ||
| 72 | #endif | ||
| 73 | |||
| 74 | struct platform_device *__init | ||
| 75 | mxs_add_gpmi_nand(const struct gpmi_nand_platform_data *pdata, | ||
| 76 | const struct mxs_gpmi_nand_data *data) | ||
| 77 | { | ||
| 78 | return mxs_add_platform_device_dmamask(data->devid, -1, | ||
| 79 | data->res, GPMI_NAND_RES_SIZE, | ||
| 80 | pdata, sizeof(*pdata), DMA_BIT_MASK(32)); | ||
| 81 | } | ||
diff --git a/arch/arm/mach-mxs/devices/platform-mxs-i2c.c b/arch/arm/mach-mxs/devices/platform-mxs-i2c.c deleted file mode 100644 index 79222ec8ede1..000000000000 --- a/arch/arm/mach-mxs/devices/platform-mxs-i2c.c +++ /dev/null | |||
| @@ -1,52 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2011 Pengutronix | ||
| 3 | * Wolfram Sang <w.sang@pengutronix.de> | ||
| 4 | * | ||
| 5 | * This program is free software; you can redistribute it and/or modify it under | ||
| 6 | * the terms of the GNU General Public License version 2 as published by the | ||
| 7 | * Free Software Foundation. | ||
| 8 | */ | ||
| 9 | #include <asm/sizes.h> | ||
| 10 | #include <mach/mx28.h> | ||
| 11 | #include <mach/devices-common.h> | ||
| 12 | |||
| 13 | #define mxs_i2c_data_entry_single(soc, _id) \ | ||
| 14 | { \ | ||
| 15 | .id = _id, \ | ||
| 16 | .iobase = soc ## _I2C ## _id ## _BASE_ADDR, \ | ||
| 17 | .errirq = soc ## _INT_I2C ## _id ## _ERROR, \ | ||
| 18 | .dmairq = soc ## _INT_I2C ## _id ## _DMA, \ | ||
| 19 | } | ||
| 20 | |||
| 21 | #define mxs_i2c_data_entry(soc, _id) \ | ||
| 22 | [_id] = mxs_i2c_data_entry_single(soc, _id) | ||
| 23 | |||
| 24 | #ifdef CONFIG_SOC_IMX28 | ||
| 25 | const struct mxs_mxs_i2c_data mx28_mxs_i2c_data[] __initconst = { | ||
| 26 | mxs_i2c_data_entry(MX28, 0), | ||
| 27 | mxs_i2c_data_entry(MX28, 1), | ||
| 28 | }; | ||
| 29 | #endif | ||
| 30 | |||
| 31 | struct platform_device *__init mxs_add_mxs_i2c( | ||
| 32 | const struct mxs_mxs_i2c_data *data) | ||
| 33 | { | ||
| 34 | struct resource res[] = { | ||
| 35 | { | ||
| 36 | .start = data->iobase, | ||
| 37 | .end = data->iobase + SZ_8K - 1, | ||
| 38 | .flags = IORESOURCE_MEM, | ||
| 39 | }, { | ||
| 40 | .start = data->errirq, | ||
| 41 | .end = data->errirq, | ||
| 42 | .flags = IORESOURCE_IRQ, | ||
| 43 | }, { | ||
| 44 | .start = data->dmairq, | ||
| 45 | .end = data->dmairq, | ||
| 46 | .flags = IORESOURCE_IRQ, | ||
| 47 | }, | ||
| 48 | }; | ||
| 49 | |||
| 50 | return mxs_add_platform_device("mxs-i2c", data->id, res, | ||
| 51 | ARRAY_SIZE(res), NULL, 0); | ||
| 52 | } | ||
diff --git a/arch/arm/mach-mxs/devices/platform-mxs-mmc.c b/arch/arm/mach-mxs/devices/platform-mxs-mmc.c deleted file mode 100644 index b33c9d05c552..000000000000 --- a/arch/arm/mach-mxs/devices/platform-mxs-mmc.c +++ /dev/null | |||
| @@ -1,76 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2010 Pengutronix | ||
| 3 | * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de> | ||
| 4 | * | ||
| 5 | * Copyright 2011 Freescale Semiconductor, Inc. All Rights Reserved. | ||
| 6 | * | ||
| 7 | * This program is free software; you can redistribute it and/or modify it under | ||
| 8 | * the terms of the GNU General Public License version 2 as published by the | ||
| 9 | * Free Software Foundation. | ||
| 10 | */ | ||
| 11 | |||
| 12 | #include <linux/compiler.h> | ||
| 13 | #include <linux/err.h> | ||
| 14 | #include <linux/init.h> | ||
| 15 | |||
| 16 | #include <mach/mx23.h> | ||
| 17 | #include <mach/mx28.h> | ||
| 18 | #include <mach/devices-common.h> | ||
| 19 | |||
| 20 | #define mxs_mxs_mmc_data_entry_single(soc, _devid, _id, hwid) \ | ||
| 21 | { \ | ||
| 22 | .devid = _devid, \ | ||
| 23 | .id = _id, \ | ||
| 24 | .iobase = soc ## _SSP ## hwid ## _BASE_ADDR, \ | ||
| 25 | .dma = soc ## _DMA_SSP ## hwid, \ | ||
| 26 | .irq_err = soc ## _INT_SSP ## hwid ## _ERROR, \ | ||
| 27 | .irq_dma = soc ## _INT_SSP ## hwid ## _DMA, \ | ||
| 28 | } | ||
| 29 | |||
| 30 | #define mxs_mxs_mmc_data_entry(soc, _devid, _id, hwid) \ | ||
| 31 | [_id] = mxs_mxs_mmc_data_entry_single(soc, _devid, _id, hwid) | ||
| 32 | |||
| 33 | |||
| 34 | #ifdef CONFIG_SOC_IMX23 | ||
| 35 | const struct mxs_mxs_mmc_data mx23_mxs_mmc_data[] __initconst = { | ||
| 36 | mxs_mxs_mmc_data_entry(MX23, "imx23-mmc", 0, 1), | ||
| 37 | mxs_mxs_mmc_data_entry(MX23, "imx23-mmc", 1, 2), | ||
| 38 | }; | ||
| 39 | #endif | ||
| 40 | |||
| 41 | #ifdef CONFIG_SOC_IMX28 | ||
| 42 | const struct mxs_mxs_mmc_data mx28_mxs_mmc_data[] __initconst = { | ||
| 43 | mxs_mxs_mmc_data_entry(MX28, "imx28-mmc", 0, 0), | ||
| 44 | mxs_mxs_mmc_data_entry(MX28, "imx28-mmc", 1, 1), | ||
| 45 | mxs_mxs_mmc_data_entry(MX28, "imx28-mmc", 2, 2), | ||
| 46 | mxs_mxs_mmc_data_entry(MX28, "imx28-mmc", 3, 3), | ||
| 47 | }; | ||
| 48 | #endif | ||
| 49 | |||
| 50 | struct platform_device *__init mxs_add_mxs_mmc( | ||
| 51 | const struct mxs_mxs_mmc_data *data, | ||
| 52 | const struct mxs_mmc_platform_data *pdata) | ||
| 53 | { | ||
| 54 | struct resource res[] = { | ||
| 55 | { | ||
| 56 | .start = data->iobase, | ||
| 57 | .end = data->iobase + SZ_8K - 1, | ||
| 58 | .flags = IORESOURCE_MEM, | ||
| 59 | }, { | ||
| 60 | .start = data->dma, | ||
| 61 | .end = data->dma, | ||
| 62 | .flags = IORESOURCE_DMA, | ||
| 63 | }, { | ||
| 64 | .start = data->irq_err, | ||
| 65 | .end = data->irq_err, | ||
| 66 | .flags = IORESOURCE_IRQ, | ||
| 67 | }, { | ||
| 68 | .start = data->irq_dma, | ||
| 69 | .end = data->irq_dma, | ||
| 70 | .flags = IORESOURCE_IRQ, | ||
| 71 | }, | ||
| 72 | }; | ||
| 73 | |||
| 74 | return mxs_add_platform_device(data->devid, data->id, | ||
| 75 | res, ARRAY_SIZE(res), pdata, sizeof(*pdata)); | ||
| 76 | } | ||
diff --git a/arch/arm/mach-mxs/devices/platform-mxs-pwm.c b/arch/arm/mach-mxs/devices/platform-mxs-pwm.c deleted file mode 100644 index 680f5a902936..000000000000 --- a/arch/arm/mach-mxs/devices/platform-mxs-pwm.c +++ /dev/null | |||
| @@ -1,22 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2010 Pengutronix | ||
| 3 | * Sascha Hauer <s.hauer@pengutronix.de> | ||
| 4 | * | ||
| 5 | * This program is free software; you can redistribute it and/or modify it under | ||
| 6 | * the terms of the GNU General Public License version 2 as published by the | ||
| 7 | * Free Software Foundation. | ||
| 8 | */ | ||
| 9 | #include <asm/sizes.h> | ||
| 10 | #include <mach/devices-common.h> | ||
| 11 | |||
| 12 | struct platform_device *__init mxs_add_mxs_pwm(resource_size_t iobase, int id) | ||
| 13 | { | ||
| 14 | struct resource res = { | ||
| 15 | .flags = IORESOURCE_MEM, | ||
| 16 | }; | ||
| 17 | |||
| 18 | res.start = iobase + 0x10 + 0x20 * id; | ||
| 19 | res.end = res.start + 0x1f; | ||
| 20 | |||
| 21 | return mxs_add_platform_device("mxs-pwm", id, &res, 1, NULL, 0); | ||
| 22 | } | ||
diff --git a/arch/arm/mach-mxs/devices/platform-mxs-saif.c b/arch/arm/mach-mxs/devices/platform-mxs-saif.c deleted file mode 100644 index f6e3a60b4201..000000000000 --- a/arch/arm/mach-mxs/devices/platform-mxs-saif.c +++ /dev/null | |||
| @@ -1,61 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Copyright 2011 Freescale Semiconductor, Inc. All Rights Reserved. | ||
| 3 | * | ||
| 4 | * This program is free software; you can redistribute it and/or modify it under | ||
| 5 | * the terms of the GNU General Public License version 2 as published by the | ||
| 6 | * Free Software Foundation. | ||
| 7 | */ | ||
| 8 | #include <linux/compiler.h> | ||
| 9 | #include <linux/err.h> | ||
| 10 | #include <linux/init.h> | ||
| 11 | |||
| 12 | #include <mach/mx23.h> | ||
| 13 | #include <mach/mx28.h> | ||
| 14 | #include <mach/devices-common.h> | ||
| 15 | |||
| 16 | #define mxs_saif_data_entry_single(soc, _id) \ | ||
| 17 | { \ | ||
| 18 | .id = _id, \ | ||
| 19 | .iobase = soc ## _SAIF ## _id ## _BASE_ADDR, \ | ||
| 20 | .irq = soc ## _INT_SAIF ## _id, \ | ||
| 21 | .dma = soc ## _DMA_SAIF ## _id, \ | ||
| 22 | .dmairq = soc ## _INT_SAIF ## _id ##_DMA, \ | ||
| 23 | } | ||
| 24 | |||
| 25 | #define mxs_saif_data_entry(soc, _id) \ | ||
| 26 | [_id] = mxs_saif_data_entry_single(soc, _id) | ||
| 27 | |||
| 28 | #ifdef CONFIG_SOC_IMX28 | ||
| 29 | const struct mxs_saif_data mx28_saif_data[] __initconst = { | ||
| 30 | mxs_saif_data_entry(MX28, 0), | ||
| 31 | mxs_saif_data_entry(MX28, 1), | ||
| 32 | }; | ||
| 33 | #endif | ||
| 34 | |||
| 35 | struct platform_device *__init mxs_add_saif(const struct mxs_saif_data *data, | ||
| 36 | const struct mxs_saif_platform_data *pdata) | ||
| 37 | { | ||
| 38 | struct resource res[] = { | ||
| 39 | { | ||
| 40 | .start = data->iobase, | ||
| 41 | .end = data->iobase + SZ_4K - 1, | ||
| 42 | .flags = IORESOURCE_MEM, | ||
| 43 | }, { | ||
| 44 | .start = data->irq, | ||
| 45 | .end = data->irq, | ||
| 46 | .flags = IORESOURCE_IRQ, | ||
| 47 | }, { | ||
| 48 | .start = data->dma, | ||
| 49 | .end = data->dma, | ||
| 50 | .flags = IORESOURCE_DMA, | ||
| 51 | }, { | ||
| 52 | .start = data->dmairq, | ||
| 53 | .end = data->dmairq, | ||
| 54 | .flags = IORESOURCE_IRQ, | ||
| 55 | }, | ||
| 56 | |||
| 57 | }; | ||
| 58 | |||
| 59 | return mxs_add_platform_device("mxs-saif", data->id, res, | ||
| 60 | ARRAY_SIZE(res), pdata, sizeof(*pdata)); | ||
| 61 | } | ||
diff --git a/arch/arm/mach-mxs/devices/platform-mxsfb.c b/arch/arm/mach-mxs/devices/platform-mxsfb.c deleted file mode 100644 index 76b53f73418e..000000000000 --- a/arch/arm/mach-mxs/devices/platform-mxsfb.c +++ /dev/null | |||
| @@ -1,47 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2011 Pengutronix, Sascha Hauer <s.hauer@pengutronix.de> | ||
| 3 | * | ||
| 4 | * This program is free software; you can redistribute it and/or modify it under | ||
| 5 | * the terms of the GNU General Public License version 2 as published by the | ||
| 6 | * Free Software Foundation. | ||
| 7 | */ | ||
| 8 | #include <linux/dma-mapping.h> | ||
| 9 | #include <asm/sizes.h> | ||
| 10 | #include <mach/mx23.h> | ||
| 11 | #include <mach/mx28.h> | ||
| 12 | #include <mach/devices-common.h> | ||
| 13 | #include <linux/mxsfb.h> | ||
| 14 | |||
| 15 | #ifdef CONFIG_SOC_IMX23 | ||
| 16 | struct platform_device *__init mx23_add_mxsfb( | ||
| 17 | const struct mxsfb_platform_data *pdata) | ||
| 18 | { | ||
| 19 | struct resource res[] = { | ||
| 20 | { | ||
| 21 | .start = MX23_LCDIF_BASE_ADDR, | ||
| 22 | .end = MX23_LCDIF_BASE_ADDR + SZ_8K - 1, | ||
| 23 | .flags = IORESOURCE_MEM, | ||
| 24 | }, | ||
| 25 | }; | ||
| 26 | |||
| 27 | return mxs_add_platform_device_dmamask("imx23-fb", -1, | ||
| 28 | res, ARRAY_SIZE(res), pdata, sizeof(*pdata), DMA_BIT_MASK(32)); | ||
| 29 | } | ||
| 30 | #endif /* ifdef CONFIG_SOC_IMX23 */ | ||
| 31 | |||
| 32 | #ifdef CONFIG_SOC_IMX28 | ||
| 33 | struct platform_device *__init mx28_add_mxsfb( | ||
| 34 | const struct mxsfb_platform_data *pdata) | ||
| 35 | { | ||
| 36 | struct resource res[] = { | ||
| 37 | { | ||
| 38 | .start = MX28_LCDIF_BASE_ADDR, | ||
| 39 | .end = MX28_LCDIF_BASE_ADDR + SZ_8K - 1, | ||
| 40 | .flags = IORESOURCE_MEM, | ||
| 41 | }, | ||
| 42 | }; | ||
| 43 | |||
| 44 | return mxs_add_platform_device_dmamask("imx28-fb", -1, | ||
| 45 | res, ARRAY_SIZE(res), pdata, sizeof(*pdata), DMA_BIT_MASK(32)); | ||
| 46 | } | ||
| 47 | #endif /* ifdef CONFIG_SOC_IMX28 */ | ||
diff --git a/arch/arm/mach-mxs/devices/platform-rtc-stmp3xxx.c b/arch/arm/mach-mxs/devices/platform-rtc-stmp3xxx.c deleted file mode 100644 index 639eaee15553..000000000000 --- a/arch/arm/mach-mxs/devices/platform-rtc-stmp3xxx.c +++ /dev/null | |||
| @@ -1,51 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2011 Pengutronix, Wolfram Sang <w.sang@pengutronix.de> | ||
| 3 | * | ||
| 4 | * This program is free software; you can redistribute it and/or modify it under | ||
| 5 | * the terms of the GNU General Public License version 2 as published by the | ||
| 6 | * Free Software Foundation. | ||
| 7 | */ | ||
| 8 | #include <asm/sizes.h> | ||
| 9 | #include <mach/mx23.h> | ||
| 10 | #include <mach/mx28.h> | ||
| 11 | #include <mach/devices-common.h> | ||
| 12 | |||
| 13 | #ifdef CONFIG_SOC_IMX23 | ||
| 14 | struct platform_device *__init mx23_add_rtc_stmp3xxx(void) | ||
| 15 | { | ||
| 16 | struct resource res[] = { | ||
| 17 | { | ||
| 18 | .start = MX23_RTC_BASE_ADDR, | ||
| 19 | .end = MX23_RTC_BASE_ADDR + SZ_8K - 1, | ||
| 20 | .flags = IORESOURCE_MEM, | ||
| 21 | }, { | ||
| 22 | .start = MX23_INT_RTC_ALARM, | ||
| 23 | .end = MX23_INT_RTC_ALARM, | ||
| 24 | .flags = IORESOURCE_IRQ, | ||
| 25 | }, | ||
| 26 | }; | ||
| 27 | |||
| 28 | return mxs_add_platform_device("stmp3xxx-rtc", 0, res, ARRAY_SIZE(res), | ||
| 29 | NULL, 0); | ||
| 30 | } | ||
| 31 | #endif /* CONFIG_SOC_IMX23 */ | ||
| 32 | |||
| 33 | #ifdef CONFIG_SOC_IMX28 | ||
| 34 | struct platform_device *__init mx28_add_rtc_stmp3xxx(void) | ||
| 35 | { | ||
| 36 | struct resource res[] = { | ||
| 37 | { | ||
| 38 | .start = MX28_RTC_BASE_ADDR, | ||
| 39 | .end = MX28_RTC_BASE_ADDR + SZ_8K - 1, | ||
| 40 | .flags = IORESOURCE_MEM, | ||
| 41 | }, { | ||
| 42 | .start = MX28_INT_RTC_ALARM, | ||
| 43 | .end = MX28_INT_RTC_ALARM, | ||
| 44 | .flags = IORESOURCE_IRQ, | ||
| 45 | }, | ||
| 46 | }; | ||
| 47 | |||
| 48 | return mxs_add_platform_device("stmp3xxx-rtc", 0, res, ARRAY_SIZE(res), | ||
| 49 | NULL, 0); | ||
| 50 | } | ||
| 51 | #endif /* CONFIG_SOC_IMX28 */ | ||
diff --git a/arch/arm/mach-mxs/include/mach/common.h b/arch/arm/mach-mxs/include/mach/common.h index de6c7ba42544..4dec79563f19 100644 --- a/arch/arm/mach-mxs/include/mach/common.h +++ b/arch/arm/mach-mxs/include/mach/common.h | |||
| @@ -17,21 +17,12 @@ extern void mxs_timer_init(int); | |||
| 17 | extern void mxs_restart(char, const char *); | 17 | extern void mxs_restart(char, const char *); |
| 18 | extern int mxs_saif_clkmux_select(unsigned int clkmux); | 18 | extern int mxs_saif_clkmux_select(unsigned int clkmux); |
| 19 | 19 | ||
| 20 | extern void mx23_soc_init(void); | ||
| 21 | extern int mx23_clocks_init(void); | 20 | extern int mx23_clocks_init(void); |
| 22 | extern void mx23_map_io(void); | 21 | extern void mx23_map_io(void); |
| 23 | extern void mx23_init_irq(void); | ||
| 24 | 22 | ||
| 25 | extern void mx28_soc_init(void); | ||
| 26 | extern int mx28_clocks_init(void); | 23 | extern int mx28_clocks_init(void); |
| 27 | extern void mx28_map_io(void); | 24 | extern void mx28_map_io(void); |
| 28 | extern void mx28_init_irq(void); | ||
| 29 | 25 | ||
| 30 | extern void icoll_init_irq(void); | 26 | extern void icoll_init_irq(void); |
| 31 | 27 | ||
| 32 | extern struct platform_device *mxs_add_dma(const char *devid, | ||
| 33 | resource_size_t base); | ||
| 34 | extern struct platform_device *mxs_add_gpio(char *name, int id, | ||
| 35 | resource_size_t iobase, int irq); | ||
| 36 | |||
| 37 | #endif /* __MACH_MXS_COMMON_H__ */ | 28 | #endif /* __MACH_MXS_COMMON_H__ */ |
diff --git a/arch/arm/mach-mxs/include/mach/devices-common.h b/arch/arm/mach-mxs/include/mach/devices-common.h deleted file mode 100644 index e8b1d958240b..000000000000 --- a/arch/arm/mach-mxs/include/mach/devices-common.h +++ /dev/null | |||
| @@ -1,114 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2009-2010 Pengutronix | ||
| 3 | * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de> | ||
| 4 | * | ||
| 5 | * This program is free software; you can redistribute it and/or modify it under | ||
| 6 | * the terms of the GNU General Public License version 2 as published by the | ||
| 7 | * Free Software Foundation. | ||
| 8 | */ | ||
| 9 | #include <linux/kernel.h> | ||
| 10 | #include <linux/platform_device.h> | ||
| 11 | #include <linux/init.h> | ||
| 12 | #include <linux/amba/bus.h> | ||
| 13 | |||
| 14 | extern struct device mxs_apbh_bus; | ||
| 15 | |||
| 16 | struct platform_device *mxs_add_platform_device_dmamask( | ||
| 17 | const char *name, int id, | ||
| 18 | const struct resource *res, unsigned int num_resources, | ||
| 19 | const void *data, size_t size_data, u64 dmamask); | ||
| 20 | |||
| 21 | static inline struct platform_device *mxs_add_platform_device( | ||
| 22 | const char *name, int id, | ||
| 23 | const struct resource *res, unsigned int num_resources, | ||
| 24 | const void *data, size_t size_data) | ||
| 25 | { | ||
| 26 | return mxs_add_platform_device_dmamask( | ||
| 27 | name, id, res, num_resources, data, size_data, 0); | ||
| 28 | } | ||
| 29 | |||
| 30 | /* auart */ | ||
| 31 | struct mxs_auart_data { | ||
| 32 | int id; | ||
| 33 | resource_size_t iobase; | ||
| 34 | resource_size_t iosize; | ||
| 35 | resource_size_t irq; | ||
| 36 | }; | ||
| 37 | struct platform_device *__init mxs_add_auart( | ||
| 38 | const struct mxs_auart_data *data); | ||
| 39 | |||
| 40 | /* fec */ | ||
| 41 | #include <linux/fec.h> | ||
| 42 | struct mxs_fec_data { | ||
| 43 | int id; | ||
| 44 | resource_size_t iobase; | ||
| 45 | resource_size_t iosize; | ||
| 46 | resource_size_t irq; | ||
| 47 | }; | ||
| 48 | struct platform_device *__init mxs_add_fec( | ||
| 49 | const struct mxs_fec_data *data, | ||
| 50 | const struct fec_platform_data *pdata); | ||
| 51 | |||
| 52 | /* flexcan */ | ||
| 53 | #include <linux/can/platform/flexcan.h> | ||
| 54 | struct mxs_flexcan_data { | ||
| 55 | int id; | ||
| 56 | resource_size_t iobase; | ||
| 57 | resource_size_t iosize; | ||
| 58 | resource_size_t irq; | ||
| 59 | }; | ||
| 60 | struct platform_device *__init mxs_add_flexcan( | ||
| 61 | const struct mxs_flexcan_data *data, | ||
| 62 | const struct flexcan_platform_data *pdata); | ||
| 63 | |||
| 64 | /* gpmi-nand */ | ||
| 65 | #include <linux/mtd/gpmi-nand.h> | ||
| 66 | struct mxs_gpmi_nand_data { | ||
| 67 | const char *devid; | ||
| 68 | const struct resource res[GPMI_NAND_RES_SIZE]; | ||
| 69 | }; | ||
| 70 | struct platform_device *__init | ||
| 71 | mxs_add_gpmi_nand(const struct gpmi_nand_platform_data *pdata, | ||
| 72 | const struct mxs_gpmi_nand_data *data); | ||
| 73 | |||
| 74 | /* i2c */ | ||
| 75 | struct mxs_mxs_i2c_data { | ||
| 76 | int id; | ||
| 77 | resource_size_t iobase; | ||
| 78 | resource_size_t errirq; | ||
| 79 | resource_size_t dmairq; | ||
| 80 | }; | ||
| 81 | struct platform_device * __init mxs_add_mxs_i2c( | ||
| 82 | const struct mxs_mxs_i2c_data *data); | ||
| 83 | |||
| 84 | /* mmc */ | ||
| 85 | #include <linux/mmc/mxs-mmc.h> | ||
| 86 | struct mxs_mxs_mmc_data { | ||
| 87 | const char *devid; | ||
| 88 | int id; | ||
| 89 | resource_size_t iobase; | ||
| 90 | resource_size_t dma; | ||
| 91 | resource_size_t irq_err; | ||
| 92 | resource_size_t irq_dma; | ||
| 93 | }; | ||
| 94 | struct platform_device *__init mxs_add_mxs_mmc( | ||
| 95 | const struct mxs_mxs_mmc_data *data, | ||
| 96 | const struct mxs_mmc_platform_data *pdata); | ||
| 97 | |||
| 98 | /* pwm */ | ||
| 99 | struct platform_device *__init mxs_add_mxs_pwm( | ||
| 100 | resource_size_t iobase, int id); | ||
| 101 | |||
| 102 | /* saif */ | ||
| 103 | #include <sound/saif.h> | ||
| 104 | struct mxs_saif_data { | ||
| 105 | int id; | ||
| 106 | resource_size_t iobase; | ||
| 107 | resource_size_t irq; | ||
| 108 | resource_size_t dma; | ||
| 109 | resource_size_t dmairq; | ||
| 110 | }; | ||
| 111 | |||
| 112 | struct platform_device *__init mxs_add_saif( | ||
| 113 | const struct mxs_saif_data *data, | ||
| 114 | const struct mxs_saif_platform_data *pdata); | ||
diff --git a/arch/arm/mach-mxs/include/mach/iomux-mx23.h b/arch/arm/mach-mxs/include/mach/iomux-mx23.h deleted file mode 100644 index b0190a4822f2..000000000000 --- a/arch/arm/mach-mxs/include/mach/iomux-mx23.h +++ /dev/null | |||
| @@ -1,355 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2009-2010 Amit Kucheria <amit.kucheria@canonical.com> | ||
| 3 | * Copyright (C) 2010 Freescale Semiconductor, Inc. | ||
| 4 | * | ||
| 5 | * The code contained herein is licensed under the GNU General Public | ||
| 6 | * License. You may obtain a copy of the GNU General Public License | ||
| 7 | * Version 2 or later at the following locations: | ||
| 8 | * | ||
| 9 | * http://www.opensource.org/licenses/gpl-license.html | ||
| 10 | * http://www.gnu.org/copyleft/gpl.html | ||
| 11 | */ | ||
| 12 | |||
| 13 | #ifndef __MACH_IOMUX_MX23_H__ | ||
| 14 | #define __MACH_IOMUX_MX23_H__ | ||
| 15 | |||
| 16 | #include <mach/iomux.h> | ||
| 17 | |||
| 18 | /* | ||
| 19 | * The naming convention for the pad modes is MX23_PAD_<padname>__<padmode> | ||
| 20 | * If <padname> or <padmode> refers to a GPIO, it is named GPIO_<unit>_<num> | ||
| 21 | * See also iomux.h | ||
| 22 | * | ||
| 23 | * BANK PIN MUX | ||
| 24 | */ | ||
| 25 | /* MUXSEL_0 */ | ||
| 26 | #define MX23_PAD_GPMI_D00__GPMI_D00 MXS_IOMUX_PAD_NAKED(0, 0, PAD_MUXSEL_0) | ||
| 27 | #define MX23_PAD_GPMI_D01__GPMI_D01 MXS_IOMUX_PAD_NAKED(0, 1, PAD_MUXSEL_0) | ||
| 28 | #define MX23_PAD_GPMI_D02__GPMI_D02 MXS_IOMUX_PAD_NAKED(0, 2, PAD_MUXSEL_0) | ||
| 29 | #define MX23_PAD_GPMI_D03__GPMI_D03 MXS_IOMUX_PAD_NAKED(0, 3, PAD_MUXSEL_0) | ||
| 30 | #define MX23_PAD_GPMI_D04__GPMI_D04 MXS_IOMUX_PAD_NAKED(0, 4, PAD_MUXSEL_0) | ||
| 31 | #define MX23_PAD_GPMI_D05__GPMI_D05 MXS_IOMUX_PAD_NAKED(0, 5, PAD_MUXSEL_0) | ||
| 32 | #define MX23_PAD_GPMI_D06__GPMI_D06 MXS_IOMUX_PAD_NAKED(0, 6, PAD_MUXSEL_0) | ||
| 33 | #define MX23_PAD_GPMI_D07__GPMI_D07 MXS_IOMUX_PAD_NAKED(0, 7, PAD_MUXSEL_0) | ||
| 34 | #define MX23_PAD_GPMI_D08__GPMI_D08 MXS_IOMUX_PAD_NAKED(0, 8, PAD_MUXSEL_0) | ||
| 35 | #define MX23_PAD_GPMI_D09__GPMI_D09 MXS_IOMUX_PAD_NAKED(0, 9, PAD_MUXSEL_0) | ||
| 36 | #define MX23_PAD_GPMI_D10__GPMI_D10 MXS_IOMUX_PAD_NAKED(0, 10, PAD_MUXSEL_0) | ||
| 37 | #define MX23_PAD_GPMI_D11__GPMI_D11 MXS_IOMUX_PAD_NAKED(0, 11, PAD_MUXSEL_0) | ||
| 38 | #define MX23_PAD_GPMI_D12__GPMI_D12 MXS_IOMUX_PAD_NAKED(0, 12, PAD_MUXSEL_0) | ||
| 39 | #define MX23_PAD_GPMI_D13__GPMI_D13 MXS_IOMUX_PAD_NAKED(0, 13, PAD_MUXSEL_0) | ||
| 40 | #define MX23_PAD_GPMI_D14__GPMI_D14 MXS_IOMUX_PAD_NAKED(0, 14, PAD_MUXSEL_0) | ||
| 41 | #define MX23_PAD_GPMI_D15__GPMI_D15 MXS_IOMUX_PAD_NAKED(0, 15, PAD_MUXSEL_0) | ||
| 42 | #define MX23_PAD_GPMI_CLE__GPMI_CLE MXS_IOMUX_PAD_NAKED(0, 16, PAD_MUXSEL_0) | ||
| 43 | #define MX23_PAD_GPMI_ALE__GPMI_ALE MXS_IOMUX_PAD_NAKED(0, 17, PAD_MUXSEL_0) | ||
| 44 | #define MX23_PAD_GPMI_CE2N__GPMI_CE2N MXS_IOMUX_PAD_NAKED(0, 18, PAD_MUXSEL_0) | ||
| 45 | #define MX23_PAD_GPMI_RDY0__GPMI_RDY0 MXS_IOMUX_PAD_NAKED(0, 19, PAD_MUXSEL_0) | ||
| 46 | #define MX23_PAD_GPMI_RDY1__GPMI_RDY1 MXS_IOMUX_PAD_NAKED(0, 20, PAD_MUXSEL_0) | ||
| 47 | #define MX23_PAD_GPMI_RDY2__GPMI_RDY2 MXS_IOMUX_PAD_NAKED(0, 21, PAD_MUXSEL_0) | ||
| 48 | #define MX23_PAD_GPMI_RDY3__GPMI_RDY3 MXS_IOMUX_PAD_NAKED(0, 22, PAD_MUXSEL_0) | ||
| 49 | #define MX23_PAD_GPMI_WPN__GPMI_WPN MXS_IOMUX_PAD_NAKED(0, 23, PAD_MUXSEL_0) | ||
| 50 | #define MX23_PAD_GPMI_WRN__GPMI_WRN MXS_IOMUX_PAD_NAKED(0, 24, PAD_MUXSEL_0) | ||
| 51 | #define MX23_PAD_GPMI_RDN__GPMI_RDN MXS_IOMUX_PAD_NAKED(0, 25, PAD_MUXSEL_0) | ||
| 52 | #define MX23_PAD_AUART1_CTS__AUART1_CTS MXS_IOMUX_PAD_NAKED(0, 26, PAD_MUXSEL_0) | ||
| 53 | #define MX23_PAD_AUART1_RTS__AUART1_RTS MXS_IOMUX_PAD_NAKED(0, 27, PAD_MUXSEL_0) | ||
| 54 | #define MX23_PAD_AUART1_RX__AUART1_RX MXS_IOMUX_PAD_NAKED(0, 28, PAD_MUXSEL_0) | ||
| 55 | #define MX23_PAD_AUART1_TX__AUART1_TX MXS_IOMUX_PAD_NAKED(0, 29, PAD_MUXSEL_0) | ||
| 56 | #define MX23_PAD_I2C_SCL__I2C_SCL MXS_IOMUX_PAD_NAKED(0, 30, PAD_MUXSEL_0) | ||
| 57 | #define MX23_PAD_I2C_SDA__I2C_SDA MXS_IOMUX_PAD_NAKED(0, 31, PAD_MUXSEL_0) | ||
| 58 | |||
| 59 | #define MX23_PAD_LCD_D00__LCD_D00 MXS_IOMUX_PAD_NAKED(1, 0, PAD_MUXSEL_0) | ||
| 60 | #define MX23_PAD_LCD_D01__LCD_D01 MXS_IOMUX_PAD_NAKED(1, 1, PAD_MUXSEL_0) | ||
| 61 | #define MX23_PAD_LCD_D02__LCD_D02 MXS_IOMUX_PAD_NAKED(1, 2, PAD_MUXSEL_0) | ||
| 62 | #define MX23_PAD_LCD_D03__LCD_D03 MXS_IOMUX_PAD_NAKED(1, 3, PAD_MUXSEL_0) | ||
| 63 | #define MX23_PAD_LCD_D04__LCD_D04 MXS_IOMUX_PAD_NAKED(1, 4, PAD_MUXSEL_0) | ||
| 64 | #define MX23_PAD_LCD_D05__LCD_D05 MXS_IOMUX_PAD_NAKED(1, 5, PAD_MUXSEL_0) | ||
| 65 | #define MX23_PAD_LCD_D06__LCD_D06 MXS_IOMUX_PAD_NAKED(1, 6, PAD_MUXSEL_0) | ||
| 66 | #define MX23_PAD_LCD_D07__LCD_D07 MXS_IOMUX_PAD_NAKED(1, 7, PAD_MUXSEL_0) | ||
| 67 | #define MX23_PAD_LCD_D08__LCD_D08 MXS_IOMUX_PAD_NAKED(1, 8, PAD_MUXSEL_0) | ||
| 68 | #define MX23_PAD_LCD_D09__LCD_D09 MXS_IOMUX_PAD_NAKED(1, 9, PAD_MUXSEL_0) | ||
| 69 | #define MX23_PAD_LCD_D10__LCD_D10 MXS_IOMUX_PAD_NAKED(1, 10, PAD_MUXSEL_0) | ||
| 70 | #define MX23_PAD_LCD_D11__LCD_D11 MXS_IOMUX_PAD_NAKED(1, 11, PAD_MUXSEL_0) | ||
| 71 | #define MX23_PAD_LCD_D12__LCD_D12 MXS_IOMUX_PAD_NAKED(1, 12, PAD_MUXSEL_0) | ||
| 72 | #define MX23_PAD_LCD_D13__LCD_D13 MXS_IOMUX_PAD_NAKED(1, 13, PAD_MUXSEL_0) | ||
| 73 | #define MX23_PAD_LCD_D14__LCD_D14 MXS_IOMUX_PAD_NAKED(1, 14, PAD_MUXSEL_0) | ||
| 74 | #define MX23_PAD_LCD_D15__LCD_D15 MXS_IOMUX_PAD_NAKED(1, 15, PAD_MUXSEL_0) | ||
| 75 | #define MX23_PAD_LCD_D16__LCD_D16 MXS_IOMUX_PAD_NAKED(1, 16, PAD_MUXSEL_0) | ||
| 76 | #define MX23_PAD_LCD_D17__LCD_D17 MXS_IOMUX_PAD_NAKED(1, 17, PAD_MUXSEL_0) | ||
| 77 | #define MX23_PAD_LCD_RESET__LCD_RESET MXS_IOMUX_PAD_NAKED(1, 18, PAD_MUXSEL_0) | ||
| 78 | #define MX23_PAD_LCD_RS__LCD_RS MXS_IOMUX_PAD_NAKED(1, 19, PAD_MUXSEL_0) | ||
| 79 | #define MX23_PAD_LCD_WR__LCD_WR MXS_IOMUX_PAD_NAKED(1, 20, PAD_MUXSEL_0) | ||
| 80 | #define MX23_PAD_LCD_CS__LCD_CS MXS_IOMUX_PAD_NAKED(1, 21, PAD_MUXSEL_0) | ||
| 81 | #define MX23_PAD_LCD_DOTCK__LCD_DOTCK MXS_IOMUX_PAD_NAKED(1, 22, PAD_MUXSEL_0) | ||
| 82 | #define MX23_PAD_LCD_ENABLE__LCD_ENABLE MXS_IOMUX_PAD_NAKED(1, 23, PAD_MUXSEL_0) | ||
| 83 | #define MX23_PAD_LCD_HSYNC__LCD_HSYNC MXS_IOMUX_PAD_NAKED(1, 24, PAD_MUXSEL_0) | ||
| 84 | #define MX23_PAD_LCD_VSYNC__LCD_VSYNC MXS_IOMUX_PAD_NAKED(1, 25, PAD_MUXSEL_0) | ||
| 85 | #define MX23_PAD_PWM0__PWM0 MXS_IOMUX_PAD_NAKED(1, 26, PAD_MUXSEL_0) | ||
| 86 | #define MX23_PAD_PWM1__PWM1 MXS_IOMUX_PAD_NAKED(1, 27, PAD_MUXSEL_0) | ||
| 87 | #define MX23_PAD_PWM2__PWM2 MXS_IOMUX_PAD_NAKED(1, 28, PAD_MUXSEL_0) | ||
| 88 | #define MX23_PAD_PWM3__PWM3 MXS_IOMUX_PAD_NAKED(1, 29, PAD_MUXSEL_0) | ||
| 89 | #define MX23_PAD_PWM4__PWM4 MXS_IOMUX_PAD_NAKED(1, 30, PAD_MUXSEL_0) | ||
| 90 | |||
| 91 | #define MX23_PAD_SSP1_CMD__SSP1_CMD MXS_IOMUX_PAD_NAKED(2, 0, PAD_MUXSEL_0) | ||
| 92 | #define MX23_PAD_SSP1_DETECT__SSP1_DETECT MXS_IOMUX_PAD_NAKED(2, 1, PAD_MUXSEL_0) | ||
| 93 | #define MX23_PAD_SSP1_DATA0__SSP1_DATA0 MXS_IOMUX_PAD_NAKED(2, 2, PAD_MUXSEL_0) | ||
| 94 | #define MX23_PAD_SSP1_DATA1__SSP1_DATA1 MXS_IOMUX_PAD_NAKED(2, 3, PAD_MUXSEL_0) | ||
| 95 | #define MX23_PAD_SSP1_DATA2__SSP1_DATA2 MXS_IOMUX_PAD_NAKED(2, 4, PAD_MUXSEL_0) | ||
| 96 | #define MX23_PAD_SSP1_DATA3__SSP1_DATA3 MXS_IOMUX_PAD_NAKED(2, 5, PAD_MUXSEL_0) | ||
| 97 | #define MX23_PAD_SSP1_SCK__SSP1_SCK MXS_IOMUX_PAD_NAKED(2, 6, PAD_MUXSEL_0) | ||
| 98 | #define MX23_PAD_ROTARYA__ROTARYA MXS_IOMUX_PAD_NAKED(2, 7, PAD_MUXSEL_0) | ||
| 99 | #define MX23_PAD_ROTARYB__ROTARYB MXS_IOMUX_PAD_NAKED(2, 8, PAD_MUXSEL_0) | ||
| 100 | #define MX23_PAD_EMI_A00__EMI_A00 MXS_IOMUX_PAD_NAKED(2, 9, PAD_MUXSEL_0) | ||
| 101 | #define MX23_PAD_EMI_A01__EMI_A01 MXS_IOMUX_PAD_NAKED(2, 10, PAD_MUXSEL_0) | ||
| 102 | #define MX23_PAD_EMI_A02__EMI_A02 MXS_IOMUX_PAD_NAKED(2, 11, PAD_MUXSEL_0) | ||
| 103 | #define MX23_PAD_EMI_A03__EMI_A03 MXS_IOMUX_PAD_NAKED(2, 12, PAD_MUXSEL_0) | ||
| 104 | #define MX23_PAD_EMI_A04__EMI_A04 MXS_IOMUX_PAD_NAKED(2, 13, PAD_MUXSEL_0) | ||
| 105 | #define MX23_PAD_EMI_A05__EMI_A05 MXS_IOMUX_PAD_NAKED(2, 14, PAD_MUXSEL_0) | ||
| 106 | #define MX23_PAD_EMI_A06__EMI_A06 MXS_IOMUX_PAD_NAKED(2, 15, PAD_MUXSEL_0) | ||
| 107 | #define MX23_PAD_EMI_A07__EMI_A07 MXS_IOMUX_PAD_NAKED(2, 16, PAD_MUXSEL_0) | ||
| 108 | #define MX23_PAD_EMI_A08__EMI_A08 MXS_IOMUX_PAD_NAKED(2, 17, PAD_MUXSEL_0) | ||
| 109 | #define MX23_PAD_EMI_A09__EMI_A09 MXS_IOMUX_PAD_NAKED(2, 18, PAD_MUXSEL_0) | ||
| 110 | #define MX23_PAD_EMI_A10__EMI_A10 MXS_IOMUX_PAD_NAKED(2, 19, PAD_MUXSEL_0) | ||
| 111 | #define MX23_PAD_EMI_A11__EMI_A11 MXS_IOMUX_PAD_NAKED(2, 20, PAD_MUXSEL_0) | ||
| 112 | #define MX23_PAD_EMI_A12__EMI_A12 MXS_IOMUX_PAD_NAKED(2, 21, PAD_MUXSEL_0) | ||
| 113 | #define MX23_PAD_EMI_BA0__EMI_BA0 MXS_IOMUX_PAD_NAKED(2, 22, PAD_MUXSEL_0) | ||
| 114 | #define MX23_PAD_EMI_BA1__EMI_BA1 MXS_IOMUX_PAD_NAKED(2, 23, PAD_MUXSEL_0) | ||
| 115 | #define MX23_PAD_EMI_CASN__EMI_CASN MXS_IOMUX_PAD_NAKED(2, 24, PAD_MUXSEL_0) | ||
| 116 | #define MX23_PAD_EMI_CE0N__EMI_CE0N MXS_IOMUX_PAD_NAKED(2, 25, PAD_MUXSEL_0) | ||
| 117 | #define MX23_PAD_EMI_CE1N__EMI_CE1N MXS_IOMUX_PAD_NAKED(2, 26, PAD_MUXSEL_0) | ||
| 118 | #define MX23_PAD_GPMI_CE1N__GPMI_CE1N MXS_IOMUX_PAD_NAKED(2, 27, PAD_MUXSEL_0) | ||
| 119 | #define MX23_PAD_GPMI_CE0N__GPMI_CE0N MXS_IOMUX_PAD_NAKED(2, 28, PAD_MUXSEL_0) | ||
| 120 | #define MX23_PAD_EMI_CKE__EMI_CKE MXS_IOMUX_PAD_NAKED(2, 29, PAD_MUXSEL_0) | ||
| 121 | #define MX23_PAD_EMI_RASN__EMI_RASN MXS_IOMUX_PAD_NAKED(2, 30, PAD_MUXSEL_0) | ||
| 122 | #define MX23_PAD_EMI_WEN__EMI_WEN MXS_IOMUX_PAD_NAKED(2, 31, PAD_MUXSEL_0) | ||
| 123 | |||
| 124 | #define MX23_PAD_EMI_D00__EMI_D00 MXS_IOMUX_PAD_NAKED(3, 0, PAD_MUXSEL_0) | ||
| 125 | #define MX23_PAD_EMI_D01__EMI_D01 MXS_IOMUX_PAD_NAKED(3, 1, PAD_MUXSEL_0) | ||
| 126 | #define MX23_PAD_EMI_D02__EMI_D02 MXS_IOMUX_PAD_NAKED(3, 2, PAD_MUXSEL_0) | ||
| 127 | #define MX23_PAD_EMI_D03__EMI_D03 MXS_IOMUX_PAD_NAKED(3, 3, PAD_MUXSEL_0) | ||
| 128 | #define MX23_PAD_EMI_D04__EMI_D04 MXS_IOMUX_PAD_NAKED(3, 4, PAD_MUXSEL_0) | ||
| 129 | #define MX23_PAD_EMI_D05__EMI_D05 MXS_IOMUX_PAD_NAKED(3, 5, PAD_MUXSEL_0) | ||
| 130 | #define MX23_PAD_EMI_D06__EMI_D06 MXS_IOMUX_PAD_NAKED(3, 6, PAD_MUXSEL_0) | ||
| 131 | #define MX23_PAD_EMI_D07__EMI_D07 MXS_IOMUX_PAD_NAKED(3, 7, PAD_MUXSEL_0) | ||
| 132 | #define MX23_PAD_EMI_D08__EMI_D08 MXS_IOMUX_PAD_NAKED(3, 8, PAD_MUXSEL_0) | ||
| 133 | #define MX23_PAD_EMI_D09__EMI_D09 MXS_IOMUX_PAD_NAKED(3, 9, PAD_MUXSEL_0) | ||
| 134 | #define MX23_PAD_EMI_D10__EMI_D10 MXS_IOMUX_PAD_NAKED(3, 10, PAD_MUXSEL_0) | ||
| 135 | #define MX23_PAD_EMI_D11__EMI_D11 MXS_IOMUX_PAD_NAKED(3, 11, PAD_MUXSEL_0) | ||
| 136 | #define MX23_PAD_EMI_D12__EMI_D12 MXS_IOMUX_PAD_NAKED(3, 12, PAD_MUXSEL_0) | ||
| 137 | #define MX23_PAD_EMI_D13__EMI_D13 MXS_IOMUX_PAD_NAKED(3, 13, PAD_MUXSEL_0) | ||
| 138 | #define MX23_PAD_EMI_D14__EMI_D14 MXS_IOMUX_PAD_NAKED(3, 14, PAD_MUXSEL_0) | ||
| 139 | #define MX23_PAD_EMI_D15__EMI_D15 MXS_IOMUX_PAD_NAKED(3, 15, PAD_MUXSEL_0) | ||
| 140 | #define MX23_PAD_EMI_DQM0__EMI_DQM0 MXS_IOMUX_PAD_NAKED(3, 16, PAD_MUXSEL_0) | ||
| 141 | #define MX23_PAD_EMI_DQM1__EMI_DQM1 MXS_IOMUX_PAD_NAKED(3, 17, PAD_MUXSEL_0) | ||
| 142 | #define MX23_PAD_EMI_DQS0__EMI_DQS0 MXS_IOMUX_PAD_NAKED(3, 18, PAD_MUXSEL_0) | ||
| 143 | #define MX23_PAD_EMI_DQS1__EMI_DQS1 MXS_IOMUX_PAD_NAKED(3, 19, PAD_MUXSEL_0) | ||
| 144 | #define MX23_PAD_EMI_CLK__EMI_CLK MXS_IOMUX_PAD_NAKED(3, 20, PAD_MUXSEL_0) | ||
| 145 | #define MX23_PAD_EMI_CLKN__EMI_CLKN MXS_IOMUX_PAD_NAKED(3, 21, PAD_MUXSEL_0) | ||
| 146 | |||
| 147 | /* MUXSEL_1 */ | ||
| 148 | #define MX23_PAD_GPMI_D00__LCD_D8 MXS_IOMUX_PAD_NAKED(0, 0, PAD_MUXSEL_1) | ||
| 149 | #define MX23_PAD_GPMI_D01__LCD_D9 MXS_IOMUX_PAD_NAKED(0, 1, PAD_MUXSEL_1) | ||
| 150 | #define MX23_PAD_GPMI_D02__LCD_D10 MXS_IOMUX_PAD_NAKED(0, 2, PAD_MUXSEL_1) | ||
| 151 | #define MX23_PAD_GPMI_D03__LCD_D11 MXS_IOMUX_PAD_NAKED(0, 3, PAD_MUXSEL_1) | ||
| 152 | #define MX23_PAD_GPMI_D04__LCD_D12 MXS_IOMUX_PAD_NAKED(0, 4, PAD_MUXSEL_1) | ||
| 153 | #define MX23_PAD_GPMI_D05__LCD_D13 MXS_IOMUX_PAD_NAKED(0, 5, PAD_MUXSEL_1) | ||
| 154 | #define MX23_PAD_GPMI_D06__LCD_D14 MXS_IOMUX_PAD_NAKED(0, 6, PAD_MUXSEL_1) | ||
| 155 | #define MX23_PAD_GPMI_D07__LCD_D15 MXS_IOMUX_PAD_NAKED(0, 7, PAD_MUXSEL_1) | ||
| 156 | #define MX23_PAD_GPMI_D08__LCD_D18 MXS_IOMUX_PAD_NAKED(0, 8, PAD_MUXSEL_1) | ||
| 157 | #define MX23_PAD_GPMI_D09__LCD_D19 MXS_IOMUX_PAD_NAKED(0, 9, PAD_MUXSEL_1) | ||
| 158 | #define MX23_PAD_GPMI_D10__LCD_D20 MXS_IOMUX_PAD_NAKED(0, 10, PAD_MUXSEL_1) | ||
| 159 | #define MX23_PAD_GPMI_D11__LCD_D21 MXS_IOMUX_PAD_NAKED(0, 11, PAD_MUXSEL_1) | ||
| 160 | #define MX23_PAD_GPMI_D12__LCD_D22 MXS_IOMUX_PAD_NAKED(0, 12, PAD_MUXSEL_1) | ||
| 161 | #define MX23_PAD_GPMI_D13__LCD_D23 MXS_IOMUX_PAD_NAKED(0, 13, PAD_MUXSEL_1) | ||
| 162 | #define MX23_PAD_GPMI_D14__AUART2_RX MXS_IOMUX_PAD_NAKED(0, 14, PAD_MUXSEL_1) | ||
| 163 | #define MX23_PAD_GPMI_D15__AUART2_TX MXS_IOMUX_PAD_NAKED(0, 15, PAD_MUXSEL_1) | ||
| 164 | #define MX23_PAD_GPMI_CLE__LCD_D16 MXS_IOMUX_PAD_NAKED(0, 16, PAD_MUXSEL_1) | ||
| 165 | #define MX23_PAD_GPMI_ALE__LCD_D17 MXS_IOMUX_PAD_NAKED(0, 17, PAD_MUXSEL_1) | ||
| 166 | #define MX23_PAD_GPMI_CE2N__ATA_A2 MXS_IOMUX_PAD_NAKED(0, 18, PAD_MUXSEL_1) | ||
| 167 | #define MX23_PAD_AUART1_RTS__IR_CLK MXS_IOMUX_PAD_NAKED(0, 27, PAD_MUXSEL_1) | ||
| 168 | #define MX23_PAD_AUART1_RX__IR_RX MXS_IOMUX_PAD_NAKED(0, 28, PAD_MUXSEL_1) | ||
| 169 | #define MX23_PAD_AUART1_TX__IR_TX MXS_IOMUX_PAD_NAKED(0, 29, PAD_MUXSEL_1) | ||
| 170 | #define MX23_PAD_I2C_SCL__GPMI_RDY2 MXS_IOMUX_PAD_NAKED(0, 30, PAD_MUXSEL_1) | ||
| 171 | #define MX23_PAD_I2C_SDA__GPMI_CE2N MXS_IOMUX_PAD_NAKED(0, 31, PAD_MUXSEL_1) | ||
| 172 | |||
| 173 | #define MX23_PAD_LCD_D00__ETM_DA8 MXS_IOMUX_PAD_NAKED(1, 0, PAD_MUXSEL_1) | ||
| 174 | #define MX23_PAD_LCD_D01__ETM_DA9 MXS_IOMUX_PAD_NAKED(1, 1, PAD_MUXSEL_1) | ||
| 175 | #define MX23_PAD_LCD_D02__ETM_DA10 MXS_IOMUX_PAD_NAKED(1, 2, PAD_MUXSEL_1) | ||
| 176 | #define MX23_PAD_LCD_D03__ETM_DA11 MXS_IOMUX_PAD_NAKED(1, 3, PAD_MUXSEL_1) | ||
| 177 | #define MX23_PAD_LCD_D04__ETM_DA12 MXS_IOMUX_PAD_NAKED(1, 4, PAD_MUXSEL_1) | ||
| 178 | #define MX23_PAD_LCD_D05__ETM_DA13 MXS_IOMUX_PAD_NAKED(1, 5, PAD_MUXSEL_1) | ||
| 179 | #define MX23_PAD_LCD_D06__ETM_DA14 MXS_IOMUX_PAD_NAKED(1, 6, PAD_MUXSEL_1) | ||
| 180 | #define MX23_PAD_LCD_D07__ETM_DA15 MXS_IOMUX_PAD_NAKED(1, 7, PAD_MUXSEL_1) | ||
| 181 | #define MX23_PAD_LCD_D08__ETM_DA0 MXS_IOMUX_PAD_NAKED(1, 8, PAD_MUXSEL_1) | ||
| 182 | #define MX23_PAD_LCD_D09__ETM_DA1 MXS_IOMUX_PAD_NAKED(1, 9, PAD_MUXSEL_1) | ||
| 183 | #define MX23_PAD_LCD_D10__ETM_DA2 MXS_IOMUX_PAD_NAKED(1, 10, PAD_MUXSEL_1) | ||
| 184 | #define MX23_PAD_LCD_D11__ETM_DA3 MXS_IOMUX_PAD_NAKED(1, 11, PAD_MUXSEL_1) | ||
| 185 | #define MX23_PAD_LCD_D12__ETM_DA4 MXS_IOMUX_PAD_NAKED(1, 12, PAD_MUXSEL_1) | ||
| 186 | #define MX23_PAD_LCD_D13__ETM_DA5 MXS_IOMUX_PAD_NAKED(1, 13, PAD_MUXSEL_1) | ||
| 187 | #define MX23_PAD_LCD_D14__ETM_DA6 MXS_IOMUX_PAD_NAKED(1, 14, PAD_MUXSEL_1) | ||
| 188 | #define MX23_PAD_LCD_D15__ETM_DA7 MXS_IOMUX_PAD_NAKED(1, 15, PAD_MUXSEL_1) | ||
| 189 | #define MX23_PAD_LCD_RESET__ETM_TCTL MXS_IOMUX_PAD_NAKED(1, 18, PAD_MUXSEL_1) | ||
| 190 | #define MX23_PAD_LCD_RS__ETM_TCLK MXS_IOMUX_PAD_NAKED(1, 19, PAD_MUXSEL_1) | ||
| 191 | #define MX23_PAD_LCD_DOTCK__GPMI_RDY3 MXS_IOMUX_PAD_NAKED(1, 22, PAD_MUXSEL_1) | ||
| 192 | #define MX23_PAD_LCD_ENABLE__I2C_SCL MXS_IOMUX_PAD_NAKED(1, 23, PAD_MUXSEL_1) | ||
| 193 | #define MX23_PAD_LCD_HSYNC__I2C_SDA MXS_IOMUX_PAD_NAKED(1, 24, PAD_MUXSEL_1) | ||
| 194 | #define MX23_PAD_LCD_VSYNC__LCD_BUSY MXS_IOMUX_PAD_NAKED(1, 25, PAD_MUXSEL_1) | ||
| 195 | #define MX23_PAD_PWM0__ROTARYA MXS_IOMUX_PAD_NAKED(1, 26, PAD_MUXSEL_1) | ||
| 196 | #define MX23_PAD_PWM1__ROTARYB MXS_IOMUX_PAD_NAKED(1, 27, PAD_MUXSEL_1) | ||
| 197 | #define MX23_PAD_PWM2__GPMI_RDY3 MXS_IOMUX_PAD_NAKED(1, 28, PAD_MUXSEL_1) | ||
| 198 | #define MX23_PAD_PWM3__ETM_TCTL MXS_IOMUX_PAD_NAKED(1, 29, PAD_MUXSEL_1) | ||
| 199 | #define MX23_PAD_PWM4__ETM_TCLK MXS_IOMUX_PAD_NAKED(1, 30, PAD_MUXSEL_1) | ||
| 200 | |||
| 201 | #define MX23_PAD_SSP1_DETECT__GPMI_CE3N MXS_IOMUX_PAD_NAKED(2, 1, PAD_MUXSEL_1) | ||
| 202 | #define MX23_PAD_SSP1_DATA1__I2C_SCL MXS_IOMUX_PAD_NAKED(2, 3, PAD_MUXSEL_1) | ||
| 203 | #define MX23_PAD_SSP1_DATA2__I2C_SDA MXS_IOMUX_PAD_NAKED(2, 4, PAD_MUXSEL_1) | ||
| 204 | #define MX23_PAD_ROTARYA__AUART2_RTS MXS_IOMUX_PAD_NAKED(2, 7, PAD_MUXSEL_1) | ||
| 205 | #define MX23_PAD_ROTARYB__AUART2_CTS MXS_IOMUX_PAD_NAKED(2, 8, PAD_MUXSEL_1) | ||
| 206 | |||
| 207 | /* MUXSEL_2 */ | ||
| 208 | #define MX23_PAD_GPMI_D00__SSP2_DATA0 MXS_IOMUX_PAD_NAKED(0, 0, PAD_MUXSEL_2) | ||
| 209 | #define MX23_PAD_GPMI_D01__SSP2_DATA1 MXS_IOMUX_PAD_NAKED(0, 1, PAD_MUXSEL_2) | ||
| 210 | #define MX23_PAD_GPMI_D02__SSP2_DATA2 MXS_IOMUX_PAD_NAKED(0, 2, PAD_MUXSEL_2) | ||
| 211 | #define MX23_PAD_GPMI_D03__SSP2_DATA3 MXS_IOMUX_PAD_NAKED(0, 3, PAD_MUXSEL_2) | ||
| 212 | #define MX23_PAD_GPMI_D04__SSP2_DATA4 MXS_IOMUX_PAD_NAKED(0, 4, PAD_MUXSEL_2) | ||
| 213 | #define MX23_PAD_GPMI_D05__SSP2_DATA5 MXS_IOMUX_PAD_NAKED(0, 5, PAD_MUXSEL_2) | ||
| 214 | #define MX23_PAD_GPMI_D06__SSP2_DATA6 MXS_IOMUX_PAD_NAKED(0, 6, PAD_MUXSEL_2) | ||
| 215 | #define MX23_PAD_GPMI_D07__SSP2_DATA7 MXS_IOMUX_PAD_NAKED(0, 7, PAD_MUXSEL_2) | ||
| 216 | #define MX23_PAD_GPMI_D08__SSP1_DATA4 MXS_IOMUX_PAD_NAKED(0, 8, PAD_MUXSEL_2) | ||
| 217 | #define MX23_PAD_GPMI_D09__SSP1_DATA5 MXS_IOMUX_PAD_NAKED(0, 9, PAD_MUXSEL_2) | ||
| 218 | #define MX23_PAD_GPMI_D10__SSP1_DATA6 MXS_IOMUX_PAD_NAKED(0, 10, PAD_MUXSEL_2) | ||
| 219 | #define MX23_PAD_GPMI_D11__SSP1_DATA7 MXS_IOMUX_PAD_NAKED(0, 11, PAD_MUXSEL_2) | ||
| 220 | #define MX23_PAD_GPMI_D15__GPMI_CE3N MXS_IOMUX_PAD_NAKED(0, 15, PAD_MUXSEL_2) | ||
| 221 | #define MX23_PAD_GPMI_RDY0__SSP2_DETECT MXS_IOMUX_PAD_NAKED(0, 19, PAD_MUXSEL_2) | ||
| 222 | #define MX23_PAD_GPMI_RDY1__SSP2_CMD MXS_IOMUX_PAD_NAKED(0, 20, PAD_MUXSEL_2) | ||
| 223 | #define MX23_PAD_GPMI_WRN__SSP2_SCK MXS_IOMUX_PAD_NAKED(0, 24, PAD_MUXSEL_2) | ||
| 224 | #define MX23_PAD_AUART1_CTS__SSP1_DATA4 MXS_IOMUX_PAD_NAKED(0, 26, PAD_MUXSEL_2) | ||
| 225 | #define MX23_PAD_AUART1_RTS__SSP1_DATA5 MXS_IOMUX_PAD_NAKED(0, 27, PAD_MUXSEL_2) | ||
| 226 | #define MX23_PAD_AUART1_RX__SSP1_DATA6 MXS_IOMUX_PAD_NAKED(0, 28, PAD_MUXSEL_2) | ||
| 227 | #define MX23_PAD_AUART1_TX__SSP1_DATA7 MXS_IOMUX_PAD_NAKED(0, 29, PAD_MUXSEL_2) | ||
| 228 | #define MX23_PAD_I2C_SCL__AUART1_TX MXS_IOMUX_PAD_NAKED(0, 30, PAD_MUXSEL_2) | ||
| 229 | #define MX23_PAD_I2C_SDA__AUART1_RX MXS_IOMUX_PAD_NAKED(0, 31, PAD_MUXSEL_2) | ||
| 230 | |||
| 231 | #define MX23_PAD_LCD_D08__SAIF2_SDATA0 MXS_IOMUX_PAD_NAKED(1, 8, PAD_MUXSEL_2) | ||
| 232 | #define MX23_PAD_LCD_D09__SAIF1_SDATA0 MXS_IOMUX_PAD_NAKED(1, 9, PAD_MUXSEL_2) | ||
| 233 | #define MX23_PAD_LCD_D10__SAIF_MCLK_BITCLK MXS_IOMUX_PAD_NAKED(1, 10, PAD_MUXSEL_2) | ||
| 234 | #define MX23_PAD_LCD_D11__SAIF_LRCLK MXS_IOMUX_PAD_NAKED(1, 11, PAD_MUXSEL_2) | ||
| 235 | #define MX23_PAD_LCD_D12__SAIF2_SDATA1 MXS_IOMUX_PAD_NAKED(1, 12, PAD_MUXSEL_2) | ||
| 236 | #define MX23_PAD_LCD_D13__SAIF2_SDATA2 MXS_IOMUX_PAD_NAKED(1, 13, PAD_MUXSEL_2) | ||
| 237 | #define MX23_PAD_LCD_D14__SAIF1_SDATA2 MXS_IOMUX_PAD_NAKED(1, 14, PAD_MUXSEL_2) | ||
| 238 | #define MX23_PAD_LCD_D15__SAIF1_SDATA1 MXS_IOMUX_PAD_NAKED(1, 15, PAD_MUXSEL_2) | ||
| 239 | #define MX23_PAD_LCD_D16__SAIF_ALT_BITCLK MXS_IOMUX_PAD_NAKED(1, 16, PAD_MUXSEL_2) | ||
| 240 | #define MX23_PAD_LCD_RESET__GPMI_CE3N MXS_IOMUX_PAD_NAKED(1, 18, PAD_MUXSEL_2) | ||
| 241 | #define MX23_PAD_PWM0__DUART_RX MXS_IOMUX_PAD_NAKED(1, 26, PAD_MUXSEL_2) | ||
| 242 | #define MX23_PAD_PWM1__DUART_TX MXS_IOMUX_PAD_NAKED(1, 27, PAD_MUXSEL_2) | ||
| 243 | #define MX23_PAD_PWM3__AUART1_CTS MXS_IOMUX_PAD_NAKED(1, 29, PAD_MUXSEL_2) | ||
| 244 | #define MX23_PAD_PWM4__AUART1_RTS MXS_IOMUX_PAD_NAKED(1, 30, PAD_MUXSEL_2) | ||
| 245 | |||
| 246 | #define MX23_PAD_SSP1_CMD__JTAG_TDO MXS_IOMUX_PAD_NAKED(2, 0, PAD_MUXSEL_2) | ||
| 247 | #define MX23_PAD_SSP1_DETECT__USB_OTG_ID MXS_IOMUX_PAD_NAKED(2, 1, PAD_MUXSEL_2) | ||
| 248 | #define MX23_PAD_SSP1_DATA0__JTAG_TDI MXS_IOMUX_PAD_NAKED(2, 2, PAD_MUXSEL_2) | ||
| 249 | #define MX23_PAD_SSP1_DATA1__JTAG_TCLK MXS_IOMUX_PAD_NAKED(2, 3, PAD_MUXSEL_2) | ||
| 250 | #define MX23_PAD_SSP1_DATA2__JTAG_RTCK MXS_IOMUX_PAD_NAKED(2, 4, PAD_MUXSEL_2) | ||
| 251 | #define MX23_PAD_SSP1_DATA3__JTAG_TMS MXS_IOMUX_PAD_NAKED(2, 5, PAD_MUXSEL_2) | ||
| 252 | #define MX23_PAD_SSP1_SCK__JTAG_TRST MXS_IOMUX_PAD_NAKED(2, 6, PAD_MUXSEL_2) | ||
| 253 | #define MX23_PAD_ROTARYA__SPDIF MXS_IOMUX_PAD_NAKED(2, 7, PAD_MUXSEL_2) | ||
| 254 | #define MX23_PAD_ROTARYB__GPMI_CE3N MXS_IOMUX_PAD_NAKED(2, 8, PAD_MUXSEL_2) | ||
| 255 | |||
| 256 | /* MUXSEL_GPIO */ | ||
| 257 | #define MX23_PAD_GPMI_D00__GPIO_0_0 MXS_IOMUX_PAD_NAKED(0, 0, PAD_MUXSEL_GPIO) | ||
| 258 | #define MX23_PAD_GPMI_D01__GPIO_0_1 MXS_IOMUX_PAD_NAKED(0, 1, PAD_MUXSEL_GPIO) | ||
| 259 | #define MX23_PAD_GPMI_D02__GPIO_0_2 MXS_IOMUX_PAD_NAKED(0, 2, PAD_MUXSEL_GPIO) | ||
| 260 | #define MX23_PAD_GPMI_D03__GPIO_0_3 MXS_IOMUX_PAD_NAKED(0, 3, PAD_MUXSEL_GPIO) | ||
| 261 | #define MX23_PAD_GPMI_D04__GPIO_0_4 MXS_IOMUX_PAD_NAKED(0, 4, PAD_MUXSEL_GPIO) | ||
| 262 | #define MX23_PAD_GPMI_D05__GPIO_0_5 MXS_IOMUX_PAD_NAKED(0, 5, PAD_MUXSEL_GPIO) | ||
| 263 | #define MX23_PAD_GPMI_D06__GPIO_0_6 MXS_IOMUX_PAD_NAKED(0, 6, PAD_MUXSEL_GPIO) | ||
| 264 | #define MX23_PAD_GPMI_D07__GPIO_0_7 MXS_IOMUX_PAD_NAKED(0, 7, PAD_MUXSEL_GPIO) | ||
| 265 | #define MX23_PAD_GPMI_D08__GPIO_0_8 MXS_IOMUX_PAD_NAKED(0, 8, PAD_MUXSEL_GPIO) | ||
| 266 | #define MX23_PAD_GPMI_D09__GPIO_0_9 MXS_IOMUX_PAD_NAKED(0, 9, PAD_MUXSEL_GPIO) | ||
| 267 | #define MX23_PAD_GPMI_D10__GPIO_0_10 MXS_IOMUX_PAD_NAKED(0, 10, PAD_MUXSEL_GPIO) | ||
| 268 | #define MX23_PAD_GPMI_D11__GPIO_0_11 MXS_IOMUX_PAD_NAKED(0, 11, PAD_MUXSEL_GPIO) | ||
| 269 | #define MX23_PAD_GPMI_D12__GPIO_0_12 MXS_IOMUX_PAD_NAKED(0, 12, PAD_MUXSEL_GPIO) | ||
| 270 | #define MX23_PAD_GPMI_D13__GPIO_0_13 MXS_IOMUX_PAD_NAKED(0, 13, PAD_MUXSEL_GPIO) | ||
| 271 | #define MX23_PAD_GPMI_D14__GPIO_0_14 MXS_IOMUX_PAD_NAKED(0, 14, PAD_MUXSEL_GPIO) | ||
| 272 | #define MX23_PAD_GPMI_D15__GPIO_0_15 MXS_IOMUX_PAD_NAKED(0, 15, PAD_MUXSEL_GPIO) | ||
| 273 | #define MX23_PAD_GPMI_CLE__GPIO_0_16 MXS_IOMUX_PAD_NAKED(0, 16, PAD_MUXSEL_GPIO) | ||
| 274 | #define MX23_PAD_GPMI_ALE__GPIO_0_17 MXS_IOMUX_PAD_NAKED(0, 17, PAD_MUXSEL_GPIO) | ||
| 275 | #define MX23_PAD_GPMI_CE2N__GPIO_0_18 MXS_IOMUX_PAD_NAKED(0, 18, PAD_MUXSEL_GPIO) | ||
| 276 | #define MX23_PAD_GPMI_RDY0__GPIO_0_19 MXS_IOMUX_PAD_NAKED(0, 19, PAD_MUXSEL_GPIO) | ||
| 277 | #define MX23_PAD_GPMI_RDY1__GPIO_0_20 MXS_IOMUX_PAD_NAKED(0, 20, PAD_MUXSEL_GPIO) | ||
| 278 | #define MX23_PAD_GPMI_RDY2__GPIO_0_21 MXS_IOMUX_PAD_NAKED(0, 21, PAD_MUXSEL_GPIO) | ||
| 279 | #define MX23_PAD_GPMI_RDY3__GPIO_0_22 MXS_IOMUX_PAD_NAKED(0, 22, PAD_MUXSEL_GPIO) | ||
| 280 | #define MX23_PAD_GPMI_WPN__GPIO_0_23 MXS_IOMUX_PAD_NAKED(0, 23, PAD_MUXSEL_GPIO) | ||
| 281 | #define MX23_PAD_GPMI_WRN__GPIO_0_24 MXS_IOMUX_PAD_NAKED(0, 24, PAD_MUXSEL_GPIO) | ||
| 282 | #define MX23_PAD_GPMI_RDN__GPIO_0_25 MXS_IOMUX_PAD_NAKED(0, 25, PAD_MUXSEL_GPIO) | ||
| 283 | #define MX23_PAD_AUART1_CTS__GPIO_0_26 MXS_IOMUX_PAD_NAKED(0, 26, PAD_MUXSEL_GPIO) | ||
| 284 | #define MX23_PAD_AUART1_RTS__GPIO_0_27 MXS_IOMUX_PAD_NAKED(0, 27, PAD_MUXSEL_GPIO) | ||
| 285 | #define MX23_PAD_AUART1_RX__GPIO_0_28 MXS_IOMUX_PAD_NAKED(0, 28, PAD_MUXSEL_GPIO) | ||
| 286 | #define MX23_PAD_AUART1_TX__GPIO_0_29 MXS_IOMUX_PAD_NAKED(0, 29, PAD_MUXSEL_GPIO) | ||
| 287 | #define MX23_PAD_I2C_SCL__GPIO_0_30 MXS_IOMUX_PAD_NAKED(0, 30, PAD_MUXSEL_GPIO) | ||
| 288 | #define MX23_PAD_I2C_SDA__GPIO_0_31 MXS_IOMUX_PAD_NAKED(0, 31, PAD_MUXSEL_GPIO) | ||
| 289 | |||
| 290 | #define MX23_PAD_LCD_D00__GPIO_1_0 MXS_IOMUX_PAD_NAKED(1, 0, PAD_MUXSEL_GPIO) | ||
| 291 | #define MX23_PAD_LCD_D01__GPIO_1_1 MXS_IOMUX_PAD_NAKED(1, 1, PAD_MUXSEL_GPIO) | ||
| 292 | #define MX23_PAD_LCD_D02__GPIO_1_2 MXS_IOMUX_PAD_NAKED(1, 2, PAD_MUXSEL_GPIO) | ||
| 293 | #define MX23_PAD_LCD_D03__GPIO_1_3 MXS_IOMUX_PAD_NAKED(1, 3, PAD_MUXSEL_GPIO) | ||
| 294 | #define MX23_PAD_LCD_D04__GPIO_1_4 MXS_IOMUX_PAD_NAKED(1, 4, PAD_MUXSEL_GPIO) | ||
| 295 | #define MX23_PAD_LCD_D05__GPIO_1_5 MXS_IOMUX_PAD_NAKED(1, 5, PAD_MUXSEL_GPIO) | ||
| 296 | #define MX23_PAD_LCD_D06__GPIO_1_6 MXS_IOMUX_PAD_NAKED(1, 6, PAD_MUXSEL_GPIO) | ||
| 297 | #define MX23_PAD_LCD_D07__GPIO_1_7 MXS_IOMUX_PAD_NAKED(1, 7, PAD_MUXSEL_GPIO) | ||
| 298 | #define MX23_PAD_LCD_D08__GPIO_1_8 MXS_IOMUX_PAD_NAKED(1, 8, PAD_MUXSEL_GPIO) | ||
| 299 | #define MX23_PAD_LCD_D09__GPIO_1_9 MXS_IOMUX_PAD_NAKED(1, 9, PAD_MUXSEL_GPIO) | ||
| 300 | #define MX23_PAD_LCD_D10__GPIO_1_10 MXS_IOMUX_PAD_NAKED(1, 10, PAD_MUXSEL_GPIO) | ||
| 301 | #define MX23_PAD_LCD_D11__GPIO_1_11 MXS_IOMUX_PAD_NAKED(1, 11, PAD_MUXSEL_GPIO) | ||
| 302 | #define MX23_PAD_LCD_D12__GPIO_1_12 MXS_IOMUX_PAD_NAKED(1, 12, PAD_MUXSEL_GPIO) | ||
| 303 | #define MX23_PAD_LCD_D13__GPIO_1_13 MXS_IOMUX_PAD_NAKED(1, 13, PAD_MUXSEL_GPIO) | ||
| 304 | #define MX23_PAD_LCD_D14__GPIO_1_14 MXS_IOMUX_PAD_NAKED(1, 14, PAD_MUXSEL_GPIO) | ||
| 305 | #define MX23_PAD_LCD_D15__GPIO_1_15 MXS_IOMUX_PAD_NAKED(1, 15, PAD_MUXSEL_GPIO) | ||
| 306 | #define MX23_PAD_LCD_D16__GPIO_1_16 MXS_IOMUX_PAD_NAKED(1, 16, PAD_MUXSEL_GPIO) | ||
| 307 | #define MX23_PAD_LCD_D17__GPIO_1_17 MXS_IOMUX_PAD_NAKED(1, 17, PAD_MUXSEL_GPIO) | ||
| 308 | #define MX23_PAD_LCD_RESET__GPIO_1_18 MXS_IOMUX_PAD_NAKED(1, 18, PAD_MUXSEL_GPIO) | ||
| 309 | #define MX23_PAD_LCD_RS__GPIO_1_19 MXS_IOMUX_PAD_NAKED(1, 19, PAD_MUXSEL_GPIO) | ||
| 310 | #define MX23_PAD_LCD_WR__GPIO_1_20 MXS_IOMUX_PAD_NAKED(1, 20, PAD_MUXSEL_GPIO) | ||
| 311 | #define MX23_PAD_LCD_CS__GPIO_1_21 MXS_IOMUX_PAD_NAKED(1, 21, PAD_MUXSEL_GPIO) | ||
| 312 | #define MX23_PAD_LCD_DOTCK__GPIO_1_22 MXS_IOMUX_PAD_NAKED(1, 22, PAD_MUXSEL_GPIO) | ||
| 313 | #define MX23_PAD_LCD_ENABLE__GPIO_1_23 MXS_IOMUX_PAD_NAKED(1, 23, PAD_MUXSEL_GPIO) | ||
| 314 | #define MX23_PAD_LCD_HSYNC__GPIO_1_24 MXS_IOMUX_PAD_NAKED(1, 24, PAD_MUXSEL_GPIO) | ||
| 315 | #define MX23_PAD_LCD_VSYNC__GPIO_1_25 MXS_IOMUX_PAD_NAKED(1, 25, PAD_MUXSEL_GPIO) | ||
| 316 | #define MX23_PAD_PWM0__GPIO_1_26 MXS_IOMUX_PAD_NAKED(1, 26, PAD_MUXSEL_GPIO) | ||
| 317 | #define MX23_PAD_PWM1__GPIO_1_27 MXS_IOMUX_PAD_NAKED(1, 27, PAD_MUXSEL_GPIO) | ||
| 318 | #define MX23_PAD_PWM2__GPIO_1_28 MXS_IOMUX_PAD_NAKED(1, 28, PAD_MUXSEL_GPIO) | ||
| 319 | #define MX23_PAD_PWM3__GPIO_1_29 MXS_IOMUX_PAD_NAKED(1, 29, PAD_MUXSEL_GPIO) | ||
| 320 | #define MX23_PAD_PWM4__GPIO_1_30 MXS_IOMUX_PAD_NAKED(1, 30, PAD_MUXSEL_GPIO) | ||
| 321 | |||
| 322 | #define MX23_PAD_SSP1_CMD__GPIO_2_0 MXS_IOMUX_PAD_NAKED(2, 0, PAD_MUXSEL_GPIO) | ||
| 323 | #define MX23_PAD_SSP1_DETECT__GPIO_2_1 MXS_IOMUX_PAD_NAKED(2, 1, PAD_MUXSEL_GPIO) | ||
| 324 | #define MX23_PAD_SSP1_DATA0__GPIO_2_2 MXS_IOMUX_PAD_NAKED(2, 2, PAD_MUXSEL_GPIO) | ||
| 325 | #define MX23_PAD_SSP1_DATA1__GPIO_2_3 MXS_IOMUX_PAD_NAKED(2, 3, PAD_MUXSEL_GPIO) | ||
| 326 | #define MX23_PAD_SSP1_DATA2__GPIO_2_4 MXS_IOMUX_PAD_NAKED(2, 4, PAD_MUXSEL_GPIO) | ||
| 327 | #define MX23_PAD_SSP1_DATA3__GPIO_2_5 MXS_IOMUX_PAD_NAKED(2, 5, PAD_MUXSEL_GPIO) | ||
| 328 | #define MX23_PAD_SSP1_SCK__GPIO_2_6 MXS_IOMUX_PAD_NAKED(2, 6, PAD_MUXSEL_GPIO) | ||
| 329 | #define MX23_PAD_ROTARYA__GPIO_2_7 MXS_IOMUX_PAD_NAKED(2, 7, PAD_MUXSEL_GPIO) | ||
| 330 | #define MX23_PAD_ROTARYB__GPIO_2_8 MXS_IOMUX_PAD_NAKED(2, 8, PAD_MUXSEL_GPIO) | ||
| 331 | #define MX23_PAD_EMI_A00__GPIO_2_9 MXS_IOMUX_PAD_NAKED(2, 9, PAD_MUXSEL_GPIO) | ||
| 332 | #define MX23_PAD_EMI_A01__GPIO_2_10 MXS_IOMUX_PAD_NAKED(2, 10, PAD_MUXSEL_GPIO) | ||
| 333 | #define MX23_PAD_EMI_A02__GPIO_2_11 MXS_IOMUX_PAD_NAKED(2, 11, PAD_MUXSEL_GPIO) | ||
| 334 | #define MX23_PAD_EMI_A03__GPIO_2_12 MXS_IOMUX_PAD_NAKED(2, 12, PAD_MUXSEL_GPIO) | ||
| 335 | #define MX23_PAD_EMI_A04__GPIO_2_13 MXS_IOMUX_PAD_NAKED(2, 13, PAD_MUXSEL_GPIO) | ||
| 336 | #define MX23_PAD_EMI_A05__GPIO_2_14 MXS_IOMUX_PAD_NAKED(2, 14, PAD_MUXSEL_GPIO) | ||
| 337 | #define MX23_PAD_EMI_A06__GPIO_2_15 MXS_IOMUX_PAD_NAKED(2, 15, PAD_MUXSEL_GPIO) | ||
| 338 | #define MX23_PAD_EMI_A07__GPIO_2_16 MXS_IOMUX_PAD_NAKED(2, 16, PAD_MUXSEL_GPIO) | ||
| 339 | #define MX23_PAD_EMI_A08__GPIO_2_17 MXS_IOMUX_PAD_NAKED(2, 17, PAD_MUXSEL_GPIO) | ||
| 340 | #define MX23_PAD_EMI_A09__GPIO_2_18 MXS_IOMUX_PAD_NAKED(2, 18, PAD_MUXSEL_GPIO) | ||
| 341 | #define MX23_PAD_EMI_A10__GPIO_2_19 MXS_IOMUX_PAD_NAKED(2, 19, PAD_MUXSEL_GPIO) | ||
| 342 | #define MX23_PAD_EMI_A11__GPIO_2_20 MXS_IOMUX_PAD_NAKED(2, 20, PAD_MUXSEL_GPIO) | ||
| 343 | #define MX23_PAD_EMI_A12__GPIO_2_21 MXS_IOMUX_PAD_NAKED(2, 21, PAD_MUXSEL_GPIO) | ||
| 344 | #define MX23_PAD_EMI_BA0__GPIO_2_22 MXS_IOMUX_PAD_NAKED(2, 22, PAD_MUXSEL_GPIO) | ||
| 345 | #define MX23_PAD_EMI_BA1__GPIO_2_23 MXS_IOMUX_PAD_NAKED(2, 23, PAD_MUXSEL_GPIO) | ||
| 346 | #define MX23_PAD_EMI_CASN__GPIO_2_24 MXS_IOMUX_PAD_NAKED(2, 24, PAD_MUXSEL_GPIO) | ||
| 347 | #define MX23_PAD_EMI_CE0N__GPIO_2_25 MXS_IOMUX_PAD_NAKED(2, 25, PAD_MUXSEL_GPIO) | ||
| 348 | #define MX23_PAD_EMI_CE1N__GPIO_2_26 MXS_IOMUX_PAD_NAKED(2, 26, PAD_MUXSEL_GPIO) | ||
| 349 | #define MX23_PAD_GPMI_CE1N__GPIO_2_27 MXS_IOMUX_PAD_NAKED(2, 27, PAD_MUXSEL_GPIO) | ||
| 350 | #define MX23_PAD_GPMI_CE0N__GPIO_2_28 MXS_IOMUX_PAD_NAKED(2, 28, PAD_MUXSEL_GPIO) | ||
| 351 | #define MX23_PAD_EMI_CKE__GPIO_2_29 MXS_IOMUX_PAD_NAKED(2, 29, PAD_MUXSEL_GPIO) | ||
| 352 | #define MX23_PAD_EMI_RASN__GPIO_2_30 MXS_IOMUX_PAD_NAKED(2, 30, PAD_MUXSEL_GPIO) | ||
| 353 | #define MX23_PAD_EMI_WEN__GPIO_2_31 MXS_IOMUX_PAD_NAKED(2, 31, PAD_MUXSEL_GPIO) | ||
| 354 | |||
| 355 | #endif /* __MACH_IOMUX_MX23_H__ */ | ||
diff --git a/arch/arm/mach-mxs/include/mach/iomux-mx28.h b/arch/arm/mach-mxs/include/mach/iomux-mx28.h deleted file mode 100644 index f50fefd10520..000000000000 --- a/arch/arm/mach-mxs/include/mach/iomux-mx28.h +++ /dev/null | |||
| @@ -1,537 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2009-2010 Amit Kucheria <amit.kucheria@canonical.com> | ||
| 3 | * Copyright (C) 2010 Freescale Semiconductor, Inc. | ||
| 4 | * | ||
| 5 | * The code contained herein is licensed under the GNU General Public | ||
| 6 | * License. You may obtain a copy of the GNU General Public License | ||
| 7 | * Version 2 or later at the following locations: | ||
| 8 | * | ||
| 9 | * http://www.opensource.org/licenses/gpl-license.html | ||
| 10 | * http://www.gnu.org/copyleft/gpl.html | ||
| 11 | */ | ||
| 12 | |||
| 13 | #ifndef __MACH_IOMUX_MX28_H__ | ||
| 14 | #define __MACH_IOMUX_MX28_H__ | ||
| 15 | |||
| 16 | #include <mach/iomux.h> | ||
| 17 | |||
| 18 | /* | ||
| 19 | * The naming convention for the pad modes is MX28_PAD_<padname>__<padmode> | ||
| 20 | * If <padname> or <padmode> refers to a GPIO, it is named GPIO_<unit>_<num> | ||
| 21 | * See also iomux.h | ||
| 22 | * | ||
| 23 | * BANK PIN MUX | ||
| 24 | */ | ||
| 25 | /* MUXSEL_0 */ | ||
| 26 | #define MX28_PAD_GPMI_D00__GPMI_D0 MXS_IOMUX_PAD_NAKED(0, 0, PAD_MUXSEL_0) | ||
| 27 | #define MX28_PAD_GPMI_D01__GPMI_D1 MXS_IOMUX_PAD_NAKED(0, 1, PAD_MUXSEL_0) | ||
| 28 | #define MX28_PAD_GPMI_D02__GPMI_D2 MXS_IOMUX_PAD_NAKED(0, 2, PAD_MUXSEL_0) | ||
| 29 | #define MX28_PAD_GPMI_D03__GPMI_D3 MXS_IOMUX_PAD_NAKED(0, 3, PAD_MUXSEL_0) | ||
| 30 | #define MX28_PAD_GPMI_D04__GPMI_D4 MXS_IOMUX_PAD_NAKED(0, 4, PAD_MUXSEL_0) | ||
| 31 | #define MX28_PAD_GPMI_D05__GPMI_D5 MXS_IOMUX_PAD_NAKED(0, 5, PAD_MUXSEL_0) | ||
| 32 | #define MX28_PAD_GPMI_D06__GPMI_D6 MXS_IOMUX_PAD_NAKED(0, 6, PAD_MUXSEL_0) | ||
| 33 | #define MX28_PAD_GPMI_D07__GPMI_D7 MXS_IOMUX_PAD_NAKED(0, 7, PAD_MUXSEL_0) | ||
| 34 | #define MX28_PAD_GPMI_CE0N__GPMI_CE0N MXS_IOMUX_PAD_NAKED(0, 16, PAD_MUXSEL_0) | ||
| 35 | #define MX28_PAD_GPMI_CE1N__GPMI_CE1N MXS_IOMUX_PAD_NAKED(0, 17, PAD_MUXSEL_0) | ||
| 36 | #define MX28_PAD_GPMI_CE2N__GPMI_CE2N MXS_IOMUX_PAD_NAKED(0, 18, PAD_MUXSEL_0) | ||
| 37 | #define MX28_PAD_GPMI_CE3N__GPMI_CE3N MXS_IOMUX_PAD_NAKED(0, 19, PAD_MUXSEL_0) | ||
| 38 | #define MX28_PAD_GPMI_RDY0__GPMI_READY0 MXS_IOMUX_PAD_NAKED(0, 20, PAD_MUXSEL_0) | ||
| 39 | #define MX28_PAD_GPMI_RDY1__GPMI_READY1 MXS_IOMUX_PAD_NAKED(0, 21, PAD_MUXSEL_0) | ||
| 40 | #define MX28_PAD_GPMI_RDY2__GPMI_READY2 MXS_IOMUX_PAD_NAKED(0, 22, PAD_MUXSEL_0) | ||
| 41 | #define MX28_PAD_GPMI_RDY3__GPMI_READY3 MXS_IOMUX_PAD_NAKED(0, 23, PAD_MUXSEL_0) | ||
| 42 | #define MX28_PAD_GPMI_RDN__GPMI_RDN MXS_IOMUX_PAD_NAKED(0, 24, PAD_MUXSEL_0) | ||
| 43 | #define MX28_PAD_GPMI_WRN__GPMI_WRN MXS_IOMUX_PAD_NAKED(0, 25, PAD_MUXSEL_0) | ||
| 44 | #define MX28_PAD_GPMI_ALE__GPMI_ALE MXS_IOMUX_PAD_NAKED(0, 26, PAD_MUXSEL_0) | ||
| 45 | #define MX28_PAD_GPMI_CLE__GPMI_CLE MXS_IOMUX_PAD_NAKED(0, 27, PAD_MUXSEL_0) | ||
| 46 | #define MX28_PAD_GPMI_RESETN__GPMI_RESETN MXS_IOMUX_PAD_NAKED(0, 28, PAD_MUXSEL_0) | ||
| 47 | |||
| 48 | #define MX28_PAD_LCD_D00__LCD_D0 MXS_IOMUX_PAD_NAKED(1, 0, PAD_MUXSEL_0) | ||
| 49 | #define MX28_PAD_LCD_D01__LCD_D1 MXS_IOMUX_PAD_NAKED(1, 1, PAD_MUXSEL_0) | ||
| 50 | #define MX28_PAD_LCD_D02__LCD_D2 MXS_IOMUX_PAD_NAKED(1, 2, PAD_MUXSEL_0) | ||
| 51 | #define MX28_PAD_LCD_D03__LCD_D3 MXS_IOMUX_PAD_NAKED(1, 3, PAD_MUXSEL_0) | ||
| 52 | #define MX28_PAD_LCD_D04__LCD_D4 MXS_IOMUX_PAD_NAKED(1, 4, PAD_MUXSEL_0) | ||
| 53 | #define MX28_PAD_LCD_D05__LCD_D5 MXS_IOMUX_PAD_NAKED(1, 5, PAD_MUXSEL_0) | ||
| 54 | #define MX28_PAD_LCD_D06__LCD_D6 MXS_IOMUX_PAD_NAKED(1, 6, PAD_MUXSEL_0) | ||
| 55 | #define MX28_PAD_LCD_D07__LCD_D7 MXS_IOMUX_PAD_NAKED(1, 7, PAD_MUXSEL_0) | ||
| 56 | #define MX28_PAD_LCD_D08__LCD_D8 MXS_IOMUX_PAD_NAKED(1, 8, PAD_MUXSEL_0) | ||
| 57 | #define MX28_PAD_LCD_D09__LCD_D9 MXS_IOMUX_PAD_NAKED(1, 9, PAD_MUXSEL_0) | ||
| 58 | #define MX28_PAD_LCD_D10__LCD_D10 MXS_IOMUX_PAD_NAKED(1, 10, PAD_MUXSEL_0) | ||
| 59 | #define MX28_PAD_LCD_D11__LCD_D11 MXS_IOMUX_PAD_NAKED(1, 11, PAD_MUXSEL_0) | ||
| 60 | #define MX28_PAD_LCD_D12__LCD_D12 MXS_IOMUX_PAD_NAKED(1, 12, PAD_MUXSEL_0) | ||
| 61 | #define MX28_PAD_LCD_D13__LCD_D13 MXS_IOMUX_PAD_NAKED(1, 13, PAD_MUXSEL_0) | ||
| 62 | #define MX28_PAD_LCD_D14__LCD_D14 MXS_IOMUX_PAD_NAKED(1, 14, PAD_MUXSEL_0) | ||
| 63 | #define MX28_PAD_LCD_D15__LCD_D15 MXS_IOMUX_PAD_NAKED(1, 15, PAD_MUXSEL_0) | ||
| 64 | #define MX28_PAD_LCD_D16__LCD_D16 MXS_IOMUX_PAD_NAKED(1, 16, PAD_MUXSEL_0) | ||
| 65 | #define MX28_PAD_LCD_D17__LCD_D17 MXS_IOMUX_PAD_NAKED(1, 17, PAD_MUXSEL_0) | ||
| 66 | #define MX28_PAD_LCD_D18__LCD_D18 MXS_IOMUX_PAD_NAKED(1, 18, PAD_MUXSEL_0) | ||
| 67 | #define MX28_PAD_LCD_D19__LCD_D19 MXS_IOMUX_PAD_NAKED(1, 19, PAD_MUXSEL_0) | ||
| 68 | #define MX28_PAD_LCD_D20__LCD_D20 MXS_IOMUX_PAD_NAKED(1, 20, PAD_MUXSEL_0) | ||
| 69 | #define MX28_PAD_LCD_D21__LCD_D21 MXS_IOMUX_PAD_NAKED(1, 21, PAD_MUXSEL_0) | ||
| 70 | #define MX28_PAD_LCD_D22__LCD_D22 MXS_IOMUX_PAD_NAKED(1, 22, PAD_MUXSEL_0) | ||
| 71 | #define MX28_PAD_LCD_D23__LCD_D23 MXS_IOMUX_PAD_NAKED(1, 23, PAD_MUXSEL_0) | ||
| 72 | #define MX28_PAD_LCD_RD_E__LCD_RD_E MXS_IOMUX_PAD_NAKED(1, 24, PAD_MUXSEL_0) | ||
| 73 | #define MX28_PAD_LCD_WR_RWN__LCD_WR_RWN MXS_IOMUX_PAD_NAKED(1, 25, PAD_MUXSEL_0) | ||
| 74 | #define MX28_PAD_LCD_RS__LCD_RS MXS_IOMUX_PAD_NAKED(1, 26, PAD_MUXSEL_0) | ||
| 75 | #define MX28_PAD_LCD_CS__LCD_CS MXS_IOMUX_PAD_NAKED(1, 27, PAD_MUXSEL_0) | ||
| 76 | #define MX28_PAD_LCD_VSYNC__LCD_VSYNC MXS_IOMUX_PAD_NAKED(1, 28, PAD_MUXSEL_0) | ||
| 77 | #define MX28_PAD_LCD_HSYNC__LCD_HSYNC MXS_IOMUX_PAD_NAKED(1, 29, PAD_MUXSEL_0) | ||
| 78 | #define MX28_PAD_LCD_DOTCLK__LCD_DOTCLK MXS_IOMUX_PAD_NAKED(1, 30, PAD_MUXSEL_0) | ||
| 79 | #define MX28_PAD_LCD_ENABLE__LCD_ENABLE MXS_IOMUX_PAD_NAKED(1, 31, PAD_MUXSEL_0) | ||
| 80 | |||
| 81 | #define MX28_PAD_SSP0_DATA0__SSP0_D0 MXS_IOMUX_PAD_NAKED(2, 0, PAD_MUXSEL_0) | ||
| 82 | #define MX28_PAD_SSP0_DATA1__SSP0_D1 MXS_IOMUX_PAD_NAKED(2, 1, PAD_MUXSEL_0) | ||
| 83 | #define MX28_PAD_SSP0_DATA2__SSP0_D2 MXS_IOMUX_PAD_NAKED(2, 2, PAD_MUXSEL_0) | ||
| 84 | #define MX28_PAD_SSP0_DATA3__SSP0_D3 MXS_IOMUX_PAD_NAKED(2, 3, PAD_MUXSEL_0) | ||
| 85 | #define MX28_PAD_SSP0_DATA4__SSP0_D4 MXS_IOMUX_PAD_NAKED(2, 4, PAD_MUXSEL_0) | ||
| 86 | #define MX28_PAD_SSP0_DATA5__SSP0_D5 MXS_IOMUX_PAD_NAKED(2, 5, PAD_MUXSEL_0) | ||
| 87 | #define MX28_PAD_SSP0_DATA6__SSP0_D6 MXS_IOMUX_PAD_NAKED(2, 6, PAD_MUXSEL_0) | ||
| 88 | #define MX28_PAD_SSP0_DATA7__SSP0_D7 MXS_IOMUX_PAD_NAKED(2, 7, PAD_MUXSEL_0) | ||
| 89 | #define MX28_PAD_SSP0_CMD__SSP0_CMD MXS_IOMUX_PAD_NAKED(2, 8, PAD_MUXSEL_0) | ||
| 90 | #define MX28_PAD_SSP0_DETECT__SSP0_CARD_DETECT MXS_IOMUX_PAD_NAKED(2, 9, PAD_MUXSEL_0) | ||
| 91 | #define MX28_PAD_SSP0_SCK__SSP0_SCK MXS_IOMUX_PAD_NAKED(2, 10, PAD_MUXSEL_0) | ||
| 92 | #define MX28_PAD_SSP1_SCK__SSP1_SCK MXS_IOMUX_PAD_NAKED(2, 12, PAD_MUXSEL_0) | ||
| 93 | #define MX28_PAD_SSP1_CMD__SSP1_CMD MXS_IOMUX_PAD_NAKED(2, 13, PAD_MUXSEL_0) | ||
| 94 | #define MX28_PAD_SSP1_DATA0__SSP1_D0 MXS_IOMUX_PAD_NAKED(2, 14, PAD_MUXSEL_0) | ||
| 95 | #define MX28_PAD_SSP1_DATA3__SSP1_D3 MXS_IOMUX_PAD_NAKED(2, 15, PAD_MUXSEL_0) | ||
| 96 | #define MX28_PAD_SSP2_SCK__SSP2_SCK MXS_IOMUX_PAD_NAKED(2, 16, PAD_MUXSEL_0) | ||
| 97 | #define MX28_PAD_SSP2_MOSI__SSP2_CMD MXS_IOMUX_PAD_NAKED(2, 17, PAD_MUXSEL_0) | ||
| 98 | #define MX28_PAD_SSP2_MISO__SSP2_D0 MXS_IOMUX_PAD_NAKED(2, 18, PAD_MUXSEL_0) | ||
| 99 | #define MX28_PAD_SSP2_SS0__SSP2_D3 MXS_IOMUX_PAD_NAKED(2, 19, PAD_MUXSEL_0) | ||
| 100 | #define MX28_PAD_SSP2_SS1__SSP2_D4 MXS_IOMUX_PAD_NAKED(2, 20, PAD_MUXSEL_0) | ||
| 101 | #define MX28_PAD_SSP2_SS2__SSP2_D5 MXS_IOMUX_PAD_NAKED(2, 21, PAD_MUXSEL_0) | ||
| 102 | #define MX28_PAD_SSP3_SCK__SSP3_SCK MXS_IOMUX_PAD_NAKED(2, 24, PAD_MUXSEL_0) | ||
| 103 | #define MX28_PAD_SSP3_MOSI__SSP3_CMD MXS_IOMUX_PAD_NAKED(2, 25, PAD_MUXSEL_0) | ||
| 104 | #define MX28_PAD_SSP3_MISO__SSP3_D0 MXS_IOMUX_PAD_NAKED(2, 26, PAD_MUXSEL_0) | ||
| 105 | #define MX28_PAD_SSP3_SS0__SSP3_D3 MXS_IOMUX_PAD_NAKED(2, 27, PAD_MUXSEL_0) | ||
| 106 | |||
| 107 | #define MX28_PAD_AUART0_RX__AUART0_RX MXS_IOMUX_PAD_NAKED(3, 0, PAD_MUXSEL_0) | ||
| 108 | #define MX28_PAD_AUART0_TX__AUART0_TX MXS_IOMUX_PAD_NAKED(3, 1, PAD_MUXSEL_0) | ||
| 109 | #define MX28_PAD_AUART0_CTS__AUART0_CTS MXS_IOMUX_PAD_NAKED(3, 2, PAD_MUXSEL_0) | ||
| 110 | #define MX28_PAD_AUART0_RTS__AUART0_RTS MXS_IOMUX_PAD_NAKED(3, 3, PAD_MUXSEL_0) | ||
| 111 | #define MX28_PAD_AUART1_RX__AUART1_RX MXS_IOMUX_PAD_NAKED(3, 4, PAD_MUXSEL_0) | ||
| 112 | #define MX28_PAD_AUART1_TX__AUART1_TX MXS_IOMUX_PAD_NAKED(3, 5, PAD_MUXSEL_0) | ||
| 113 | #define MX28_PAD_AUART1_CTS__AUART1_CTS MXS_IOMUX_PAD_NAKED(3, 6, PAD_MUXSEL_0) | ||
| 114 | #define MX28_PAD_AUART1_RTS__AUART1_RTS MXS_IOMUX_PAD_NAKED(3, 7, PAD_MUXSEL_0) | ||
| 115 | #define MX28_PAD_AUART2_RX__AUART2_RX MXS_IOMUX_PAD_NAKED(3, 8, PAD_MUXSEL_0) | ||
| 116 | #define MX28_PAD_AUART2_TX__AUART2_TX MXS_IOMUX_PAD_NAKED(3, 9, PAD_MUXSEL_0) | ||
| 117 | #define MX28_PAD_AUART2_CTS__AUART2_CTS MXS_IOMUX_PAD_NAKED(3, 10, PAD_MUXSEL_0) | ||
| 118 | #define MX28_PAD_AUART2_RTS__AUART2_RTS MXS_IOMUX_PAD_NAKED(3, 11, PAD_MUXSEL_0) | ||
| 119 | #define MX28_PAD_AUART3_RX__AUART3_RX MXS_IOMUX_PAD_NAKED(3, 12, PAD_MUXSEL_0) | ||
| 120 | #define MX28_PAD_AUART3_TX__AUART3_TX MXS_IOMUX_PAD_NAKED(3, 13, PAD_MUXSEL_0) | ||
| 121 | #define MX28_PAD_AUART3_CTS__AUART3_CTS MXS_IOMUX_PAD_NAKED(3, 14, PAD_MUXSEL_0) | ||
| 122 | #define MX28_PAD_AUART3_RTS__AUART3_RTS MXS_IOMUX_PAD_NAKED(3, 15, PAD_MUXSEL_0) | ||
| 123 | #define MX28_PAD_PWM0__PWM_0 MXS_IOMUX_PAD_NAKED(3, 16, PAD_MUXSEL_0) | ||
| 124 | #define MX28_PAD_PWM1__PWM_1 MXS_IOMUX_PAD_NAKED(3, 17, PAD_MUXSEL_0) | ||
| 125 | #define MX28_PAD_PWM2__PWM_2 MXS_IOMUX_PAD_NAKED(3, 18, PAD_MUXSEL_0) | ||
| 126 | #define MX28_PAD_SAIF0_MCLK__SAIF0_MCLK MXS_IOMUX_PAD_NAKED(3, 20, PAD_MUXSEL_0) | ||
| 127 | #define MX28_PAD_SAIF0_LRCLK__SAIF0_LRCLK MXS_IOMUX_PAD_NAKED(3, 21, PAD_MUXSEL_0) | ||
| 128 | #define MX28_PAD_SAIF0_BITCLK__SAIF0_BITCLK MXS_IOMUX_PAD_NAKED(3, 22, PAD_MUXSEL_0) | ||
| 129 | #define MX28_PAD_SAIF0_SDATA0__SAIF0_SDATA0 MXS_IOMUX_PAD_NAKED(3, 23, PAD_MUXSEL_0) | ||
| 130 | #define MX28_PAD_I2C0_SCL__I2C0_SCL MXS_IOMUX_PAD_NAKED(3, 24, PAD_MUXSEL_0) | ||
| 131 | #define MX28_PAD_I2C0_SDA__I2C0_SDA MXS_IOMUX_PAD_NAKED(3, 25, PAD_MUXSEL_0) | ||
| 132 | #define MX28_PAD_SAIF1_SDATA0__SAIF1_SDATA0 MXS_IOMUX_PAD_NAKED(3, 26, PAD_MUXSEL_0) | ||
| 133 | #define MX28_PAD_SPDIF__SPDIF_TX MXS_IOMUX_PAD_NAKED(3, 27, PAD_MUXSEL_0) | ||
| 134 | #define MX28_PAD_PWM3__PWM_3 MXS_IOMUX_PAD_NAKED(3, 28, PAD_MUXSEL_0) | ||
| 135 | #define MX28_PAD_PWM4__PWM_4 MXS_IOMUX_PAD_NAKED(3, 29, PAD_MUXSEL_0) | ||
| 136 | #define MX28_PAD_LCD_RESET__LCD_RESET MXS_IOMUX_PAD_NAKED(3, 30, PAD_MUXSEL_0) | ||
| 137 | |||
| 138 | #define MX28_PAD_ENET0_MDC__ENET0_MDC MXS_IOMUX_PAD_NAKED(4, 0, PAD_MUXSEL_0) | ||
| 139 | #define MX28_PAD_ENET0_MDIO__ENET0_MDIO MXS_IOMUX_PAD_NAKED(4, 1, PAD_MUXSEL_0) | ||
| 140 | #define MX28_PAD_ENET0_RX_EN__ENET0_RX_EN MXS_IOMUX_PAD_NAKED(4, 2, PAD_MUXSEL_0) | ||
| 141 | #define MX28_PAD_ENET0_RXD0__ENET0_RXD0 MXS_IOMUX_PAD_NAKED(4, 3, PAD_MUXSEL_0) | ||
| 142 | #define MX28_PAD_ENET0_RXD1__ENET0_RXD1 MXS_IOMUX_PAD_NAKED(4, 4, PAD_MUXSEL_0) | ||
| 143 | #define MX28_PAD_ENET0_TX_CLK__ENET0_TX_CLK MXS_IOMUX_PAD_NAKED(4, 5, PAD_MUXSEL_0) | ||
| 144 | #define MX28_PAD_ENET0_TX_EN__ENET0_TX_EN MXS_IOMUX_PAD_NAKED(4, 6, PAD_MUXSEL_0) | ||
| 145 | #define MX28_PAD_ENET0_TXD0__ENET0_TXD0 MXS_IOMUX_PAD_NAKED(4, 7, PAD_MUXSEL_0) | ||
| 146 | #define MX28_PAD_ENET0_TXD1__ENET0_TXD1 MXS_IOMUX_PAD_NAKED(4, 8, PAD_MUXSEL_0) | ||
| 147 | #define MX28_PAD_ENET0_RXD2__ENET0_RXD2 MXS_IOMUX_PAD_NAKED(4, 9, PAD_MUXSEL_0) | ||
| 148 | #define MX28_PAD_ENET0_RXD3__ENET0_RXD3 MXS_IOMUX_PAD_NAKED(4, 10, PAD_MUXSEL_0) | ||
| 149 | #define MX28_PAD_ENET0_TXD2__ENET0_TXD2 MXS_IOMUX_PAD_NAKED(4, 11, PAD_MUXSEL_0) | ||
| 150 | #define MX28_PAD_ENET0_TXD3__ENET0_TXD3 MXS_IOMUX_PAD_NAKED(4, 12, PAD_MUXSEL_0) | ||
| 151 | #define MX28_PAD_ENET0_RX_CLK__ENET0_RX_CLK MXS_IOMUX_PAD_NAKED(4, 13, PAD_MUXSEL_0) | ||
| 152 | #define MX28_PAD_ENET0_COL__ENET0_COL MXS_IOMUX_PAD_NAKED(4, 14, PAD_MUXSEL_0) | ||
| 153 | #define MX28_PAD_ENET0_CRS__ENET0_CRS MXS_IOMUX_PAD_NAKED(4, 15, PAD_MUXSEL_0) | ||
| 154 | #define MX28_PAD_ENET_CLK__CLKCTRL_ENET MXS_IOMUX_PAD_NAKED(4, 16, PAD_MUXSEL_0) | ||
| 155 | #define MX28_PAD_JTAG_RTCK__JTAG_RTCK MXS_IOMUX_PAD_NAKED(4, 20, PAD_MUXSEL_0) | ||
| 156 | |||
| 157 | #define MX28_PAD_EMI_D00__EMI_DATA0 MXS_IOMUX_PAD_NAKED(5, 0, PAD_MUXSEL_0) | ||
| 158 | #define MX28_PAD_EMI_D01__EMI_DATA1 MXS_IOMUX_PAD_NAKED(5, 1, PAD_MUXSEL_0) | ||
| 159 | #define MX28_PAD_EMI_D02__EMI_DATA2 MXS_IOMUX_PAD_NAKED(5, 2, PAD_MUXSEL_0) | ||
| 160 | #define MX28_PAD_EMI_D03__EMI_DATA3 MXS_IOMUX_PAD_NAKED(5, 3, PAD_MUXSEL_0) | ||
| 161 | #define MX28_PAD_EMI_D04__EMI_DATA4 MXS_IOMUX_PAD_NAKED(5, 4, PAD_MUXSEL_0) | ||
| 162 | #define MX28_PAD_EMI_D05__EMI_DATA5 MXS_IOMUX_PAD_NAKED(5, 5, PAD_MUXSEL_0) | ||
| 163 | #define MX28_PAD_EMI_D06__EMI_DATA6 MXS_IOMUX_PAD_NAKED(5, 6, PAD_MUXSEL_0) | ||
| 164 | #define MX28_PAD_EMI_D07__EMI_DATA7 MXS_IOMUX_PAD_NAKED(5, 7, PAD_MUXSEL_0) | ||
| 165 | #define MX28_PAD_EMI_D08__EMI_DATA8 MXS_IOMUX_PAD_NAKED(5, 8, PAD_MUXSEL_0) | ||
| 166 | #define MX28_PAD_EMI_D09__EMI_DATA9 MXS_IOMUX_PAD_NAKED(5, 9, PAD_MUXSEL_0) | ||
| 167 | #define MX28_PAD_EMI_D10__EMI_DATA10 MXS_IOMUX_PAD_NAKED(5, 10, PAD_MUXSEL_0) | ||
| 168 | #define MX28_PAD_EMI_D11__EMI_DATA11 MXS_IOMUX_PAD_NAKED(5, 11, PAD_MUXSEL_0) | ||
| 169 | #define MX28_PAD_EMI_D12__EMI_DATA12 MXS_IOMUX_PAD_NAKED(5, 12, PAD_MUXSEL_0) | ||
| 170 | #define MX28_PAD_EMI_D13__EMI_DATA13 MXS_IOMUX_PAD_NAKED(5, 13, PAD_MUXSEL_0) | ||
| 171 | #define MX28_PAD_EMI_D14__EMI_DATA14 MXS_IOMUX_PAD_NAKED(5, 14, PAD_MUXSEL_0) | ||
| 172 | #define MX28_PAD_EMI_D15__EMI_DATA15 MXS_IOMUX_PAD_NAKED(5, 15, PAD_MUXSEL_0) | ||
| 173 | #define MX28_PAD_EMI_ODT0__EMI_ODT0 MXS_IOMUX_PAD_NAKED(5, 16, PAD_MUXSEL_0) | ||
| 174 | #define MX28_PAD_EMI_DQM0__EMI_DQM0 MXS_IOMUX_PAD_NAKED(5, 17, PAD_MUXSEL_0) | ||
| 175 | #define MX28_PAD_EMI_ODT1__EMI_ODT1 MXS_IOMUX_PAD_NAKED(5, 18, PAD_MUXSEL_0) | ||
| 176 | #define MX28_PAD_EMI_DQM1__EMI_DQM1 MXS_IOMUX_PAD_NAKED(5, 19, PAD_MUXSEL_0) | ||
| 177 | #define MX28_PAD_EMI_DDR_OPEN_FB__EMI_DDR_OPEN_FEEDBACK MXS_IOMUX_PAD_NAKED(5, 20, PAD_MUXSEL_0) | ||
| 178 | #define MX28_PAD_EMI_CLK__EMI_CLK MXS_IOMUX_PAD_NAKED(5, 21, PAD_MUXSEL_0) | ||
| 179 | #define MX28_PAD_EMI_DQS0__EMI_DQS0 MXS_IOMUX_PAD_NAKED(5, 22, PAD_MUXSEL_0) | ||
| 180 | #define MX28_PAD_EMI_DQS1__EMI_DQS1 MXS_IOMUX_PAD_NAKED(5, 23, PAD_MUXSEL_0) | ||
| 181 | #define MX28_PAD_EMI_DDR_OPEN__EMI_DDR_OPEN MXS_IOMUX_PAD_NAKED(5, 26, PAD_MUXSEL_0) | ||
| 182 | |||
| 183 | #define MX28_PAD_EMI_A00__EMI_ADDR0 MXS_IOMUX_PAD_NAKED(6, 0, PAD_MUXSEL_0) | ||
| 184 | #define MX28_PAD_EMI_A01__EMI_ADDR1 MXS_IOMUX_PAD_NAKED(6, 1, PAD_MUXSEL_0) | ||
| 185 | #define MX28_PAD_EMI_A02__EMI_ADDR2 MXS_IOMUX_PAD_NAKED(6, 2, PAD_MUXSEL_0) | ||
| 186 | #define MX28_PAD_EMI_A03__EMI_ADDR3 MXS_IOMUX_PAD_NAKED(6, 3, PAD_MUXSEL_0) | ||
| 187 | #define MX28_PAD_EMI_A04__EMI_ADDR4 MXS_IOMUX_PAD_NAKED(6, 4, PAD_MUXSEL_0) | ||
| 188 | #define MX28_PAD_EMI_A05__EMI_ADDR5 MXS_IOMUX_PAD_NAKED(6, 5, PAD_MUXSEL_0) | ||
| 189 | #define MX28_PAD_EMI_A06__EMI_ADDR6 MXS_IOMUX_PAD_NAKED(6, 6, PAD_MUXSEL_0) | ||
| 190 | #define MX28_PAD_EMI_A07__EMI_ADDR7 MXS_IOMUX_PAD_NAKED(6, 7, PAD_MUXSEL_0) | ||
| 191 | #define MX28_PAD_EMI_A08__EMI_ADDR8 MXS_IOMUX_PAD_NAKED(6, 8, PAD_MUXSEL_0) | ||
| 192 | #define MX28_PAD_EMI_A09__EMI_ADDR9 MXS_IOMUX_PAD_NAKED(6, 9, PAD_MUXSEL_0) | ||
| 193 | #define MX28_PAD_EMI_A10__EMI_ADDR10 MXS_IOMUX_PAD_NAKED(6, 10, PAD_MUXSEL_0) | ||
| 194 | #define MX28_PAD_EMI_A11__EMI_ADDR11 MXS_IOMUX_PAD_NAKED(6, 11, PAD_MUXSEL_0) | ||
| 195 | #define MX28_PAD_EMI_A12__EMI_ADDR12 MXS_IOMUX_PAD_NAKED(6, 12, PAD_MUXSEL_0) | ||
| 196 | #define MX28_PAD_EMI_A13__EMI_ADDR13 MXS_IOMUX_PAD_NAKED(6, 13, PAD_MUXSEL_0) | ||
| 197 | #define MX28_PAD_EMI_A14__EMI_ADDR14 MXS_IOMUX_PAD_NAKED(6, 14, PAD_MUXSEL_0) | ||
| 198 | #define MX28_PAD_EMI_BA0__EMI_BA0 MXS_IOMUX_PAD_NAKED(6, 16, PAD_MUXSEL_0) | ||
| 199 | #define MX28_PAD_EMI_BA1__EMI_BA1 MXS_IOMUX_PAD_NAKED(6, 17, PAD_MUXSEL_0) | ||
| 200 | #define MX28_PAD_EMI_BA2__EMI_BA2 MXS_IOMUX_PAD_NAKED(6, 18, PAD_MUXSEL_0) | ||
| 201 | #define MX28_PAD_EMI_CASN__EMI_CASN MXS_IOMUX_PAD_NAKED(6, 19, PAD_MUXSEL_0) | ||
| 202 | #define MX28_PAD_EMI_RASN__EMI_RASN MXS_IOMUX_PAD_NAKED(6, 20, PAD_MUXSEL_0) | ||
| 203 | #define MX28_PAD_EMI_WEN__EMI_WEN MXS_IOMUX_PAD_NAKED(6, 21, PAD_MUXSEL_0) | ||
| 204 | #define MX28_PAD_EMI_CE0N__EMI_CE0N MXS_IOMUX_PAD_NAKED(6, 22, PAD_MUXSEL_0) | ||
| 205 | #define MX28_PAD_EMI_CE1N__EMI_CE1N MXS_IOMUX_PAD_NAKED(6, 23, PAD_MUXSEL_0) | ||
| 206 | #define MX28_PAD_EMI_CKE__EMI_CKE MXS_IOMUX_PAD_NAKED(6, 24, PAD_MUXSEL_0) | ||
| 207 | |||
| 208 | /* MUXSEL_1 */ | ||
| 209 | #define MX28_PAD_GPMI_D00__SSP1_D0 MXS_IOMUX_PAD_NAKED(0, 0, PAD_MUXSEL_1) | ||
| 210 | #define MX28_PAD_GPMI_D01__SSP1_D1 MXS_IOMUX_PAD_NAKED(0, 1, PAD_MUXSEL_1) | ||
| 211 | #define MX28_PAD_GPMI_D02__SSP1_D2 MXS_IOMUX_PAD_NAKED(0, 2, PAD_MUXSEL_1) | ||
| 212 | #define MX28_PAD_GPMI_D03__SSP1_D3 MXS_IOMUX_PAD_NAKED(0, 3, PAD_MUXSEL_1) | ||
| 213 | #define MX28_PAD_GPMI_D04__SSP1_D4 MXS_IOMUX_PAD_NAKED(0, 4, PAD_MUXSEL_1) | ||
| 214 | #define MX28_PAD_GPMI_D05__SSP1_D5 MXS_IOMUX_PAD_NAKED(0, 5, PAD_MUXSEL_1) | ||
| 215 | #define MX28_PAD_GPMI_D06__SSP1_D6 MXS_IOMUX_PAD_NAKED(0, 6, PAD_MUXSEL_1) | ||
| 216 | #define MX28_PAD_GPMI_D07__SSP1_D7 MXS_IOMUX_PAD_NAKED(0, 7, PAD_MUXSEL_1) | ||
| 217 | #define MX28_PAD_GPMI_CE0N__SSP3_D0 MXS_IOMUX_PAD_NAKED(0, 16, PAD_MUXSEL_1) | ||
| 218 | #define MX28_PAD_GPMI_CE1N__SSP3_D3 MXS_IOMUX_PAD_NAKED(0, 17, PAD_MUXSEL_1) | ||
| 219 | #define MX28_PAD_GPMI_CE2N__CAN1_TX MXS_IOMUX_PAD_NAKED(0, 18, PAD_MUXSEL_1) | ||
| 220 | #define MX28_PAD_GPMI_CE3N__CAN1_RX MXS_IOMUX_PAD_NAKED(0, 19, PAD_MUXSEL_1) | ||
| 221 | #define MX28_PAD_GPMI_RDY0__SSP1_CARD_DETECT MXS_IOMUX_PAD_NAKED(0, 20, PAD_MUXSEL_1) | ||
| 222 | #define MX28_PAD_GPMI_RDY1__SSP1_CMD MXS_IOMUX_PAD_NAKED(0, 21, PAD_MUXSEL_1) | ||
| 223 | #define MX28_PAD_GPMI_RDY2__CAN0_TX MXS_IOMUX_PAD_NAKED(0, 22, PAD_MUXSEL_1) | ||
| 224 | #define MX28_PAD_GPMI_RDY3__CAN0_RX MXS_IOMUX_PAD_NAKED(0, 23, PAD_MUXSEL_1) | ||
| 225 | #define MX28_PAD_GPMI_RDN__SSP3_SCK MXS_IOMUX_PAD_NAKED(0, 24, PAD_MUXSEL_1) | ||
| 226 | #define MX28_PAD_GPMI_WRN__SSP1_SCK MXS_IOMUX_PAD_NAKED(0, 25, PAD_MUXSEL_1) | ||
| 227 | #define MX28_PAD_GPMI_ALE__SSP3_D1 MXS_IOMUX_PAD_NAKED(0, 26, PAD_MUXSEL_1) | ||
| 228 | #define MX28_PAD_GPMI_CLE__SSP3_D2 MXS_IOMUX_PAD_NAKED(0, 27, PAD_MUXSEL_1) | ||
| 229 | #define MX28_PAD_GPMI_RESETN__SSP3_CMD MXS_IOMUX_PAD_NAKED(0, 28, PAD_MUXSEL_1) | ||
| 230 | |||
| 231 | #define MX28_PAD_LCD_D03__ETM_DA8 MXS_IOMUX_PAD_NAKED(1, 3, PAD_MUXSEL_1) | ||
| 232 | #define MX28_PAD_LCD_D04__ETM_DA9 MXS_IOMUX_PAD_NAKED(1, 4, PAD_MUXSEL_1) | ||
| 233 | #define MX28_PAD_LCD_D08__ETM_DA3 MXS_IOMUX_PAD_NAKED(1, 8, PAD_MUXSEL_1) | ||
| 234 | #define MX28_PAD_LCD_D09__ETM_DA4 MXS_IOMUX_PAD_NAKED(1, 9, PAD_MUXSEL_1) | ||
| 235 | #define MX28_PAD_LCD_D20__ENET1_1588_EVENT2_OUT MXS_IOMUX_PAD_NAKED(1, 20, PAD_MUXSEL_1) | ||
| 236 | #define MX28_PAD_LCD_D21__ENET1_1588_EVENT2_IN MXS_IOMUX_PAD_NAKED(1, 21, PAD_MUXSEL_1) | ||
| 237 | #define MX28_PAD_LCD_D22__ENET1_1588_EVENT3_OUT MXS_IOMUX_PAD_NAKED(1, 22, PAD_MUXSEL_1) | ||
| 238 | #define MX28_PAD_LCD_D23__ENET1_1588_EVENT3_IN MXS_IOMUX_PAD_NAKED(1, 23, PAD_MUXSEL_1) | ||
| 239 | #define MX28_PAD_LCD_RD_E__LCD_VSYNC MXS_IOMUX_PAD_NAKED(1, 24, PAD_MUXSEL_1) | ||
| 240 | #define MX28_PAD_LCD_WR_RWN__LCD_HSYNC MXS_IOMUX_PAD_NAKED(1, 25, PAD_MUXSEL_1) | ||
| 241 | #define MX28_PAD_LCD_RS__LCD_DOTCLK MXS_IOMUX_PAD_NAKED(1, 26, PAD_MUXSEL_1) | ||
| 242 | #define MX28_PAD_LCD_CS__LCD_ENABLE MXS_IOMUX_PAD_NAKED(1, 27, PAD_MUXSEL_1) | ||
| 243 | #define MX28_PAD_LCD_VSYNC__SAIF1_SDATA0 MXS_IOMUX_PAD_NAKED(1, 28, PAD_MUXSEL_1) | ||
| 244 | #define MX28_PAD_LCD_HSYNC__SAIF1_SDATA1 MXS_IOMUX_PAD_NAKED(1, 29, PAD_MUXSEL_1) | ||
| 245 | #define MX28_PAD_LCD_DOTCLK__SAIF1_MCLK MXS_IOMUX_PAD_NAKED(1, 30, PAD_MUXSEL_1) | ||
| 246 | |||
| 247 | #define MX28_PAD_SSP0_DATA4__SSP2_D0 MXS_IOMUX_PAD_NAKED(2, 4, PAD_MUXSEL_1) | ||
| 248 | #define MX28_PAD_SSP0_DATA5__SSP2_D3 MXS_IOMUX_PAD_NAKED(2, 5, PAD_MUXSEL_1) | ||
| 249 | #define MX28_PAD_SSP0_DATA6__SSP2_CMD MXS_IOMUX_PAD_NAKED(2, 6, PAD_MUXSEL_1) | ||
| 250 | #define MX28_PAD_SSP0_DATA7__SSP2_SCK MXS_IOMUX_PAD_NAKED(2, 7, PAD_MUXSEL_1) | ||
| 251 | #define MX28_PAD_SSP1_SCK__SSP2_D1 MXS_IOMUX_PAD_NAKED(2, 12, PAD_MUXSEL_1) | ||
| 252 | #define MX28_PAD_SSP1_CMD__SSP2_D2 MXS_IOMUX_PAD_NAKED(2, 13, PAD_MUXSEL_1) | ||
| 253 | #define MX28_PAD_SSP1_DATA0__SSP2_D6 MXS_IOMUX_PAD_NAKED(2, 14, PAD_MUXSEL_1) | ||
| 254 | #define MX28_PAD_SSP1_DATA3__SSP2_D7 MXS_IOMUX_PAD_NAKED(2, 15, PAD_MUXSEL_1) | ||
| 255 | #define MX28_PAD_SSP2_SCK__AUART2_RX MXS_IOMUX_PAD_NAKED(2, 16, PAD_MUXSEL_1) | ||
| 256 | #define MX28_PAD_SSP2_MOSI__AUART2_TX MXS_IOMUX_PAD_NAKED(2, 17, PAD_MUXSEL_1) | ||
| 257 | #define MX28_PAD_SSP2_MISO__AUART3_RX MXS_IOMUX_PAD_NAKED(2, 18, PAD_MUXSEL_1) | ||
| 258 | #define MX28_PAD_SSP2_SS0__AUART3_TX MXS_IOMUX_PAD_NAKED(2, 19, PAD_MUXSEL_1) | ||
| 259 | #define MX28_PAD_SSP2_SS1__SSP2_D1 MXS_IOMUX_PAD_NAKED(2, 20, PAD_MUXSEL_1) | ||
| 260 | #define MX28_PAD_SSP2_SS2__SSP2_D2 MXS_IOMUX_PAD_NAKED(2, 21, PAD_MUXSEL_1) | ||
| 261 | #define MX28_PAD_SSP3_SCK__AUART4_TX MXS_IOMUX_PAD_NAKED(2, 24, PAD_MUXSEL_1) | ||
| 262 | #define MX28_PAD_SSP3_MOSI__AUART4_RX MXS_IOMUX_PAD_NAKED(2, 25, PAD_MUXSEL_1) | ||
| 263 | #define MX28_PAD_SSP3_MISO__AUART4_RTS MXS_IOMUX_PAD_NAKED(2, 26, PAD_MUXSEL_1) | ||
| 264 | #define MX28_PAD_SSP3_SS0__AUART4_CTS MXS_IOMUX_PAD_NAKED(2, 27, PAD_MUXSEL_1) | ||
| 265 | |||
| 266 | #define MX28_PAD_AUART0_RX__I2C0_SCL MXS_IOMUX_PAD_NAKED(3, 0, PAD_MUXSEL_1) | ||
| 267 | #define MX28_PAD_AUART0_TX__I2C0_SDA MXS_IOMUX_PAD_NAKED(3, 1, PAD_MUXSEL_1) | ||
| 268 | #define MX28_PAD_AUART0_CTS__AUART4_RX MXS_IOMUX_PAD_NAKED(3, 2, PAD_MUXSEL_1) | ||
| 269 | #define MX28_PAD_AUART0_RTS__AUART4_TX MXS_IOMUX_PAD_NAKED(3, 3, PAD_MUXSEL_1) | ||
| 270 | #define MX28_PAD_AUART1_RX__SSP2_CARD_DETECT MXS_IOMUX_PAD_NAKED(3, 4, PAD_MUXSEL_1) | ||
| 271 | #define MX28_PAD_AUART1_TX__SSP3_CARD_DETECT MXS_IOMUX_PAD_NAKED(3, 5, PAD_MUXSEL_1) | ||
| 272 | #define MX28_PAD_AUART1_CTS__USB0_OVERCURRENT MXS_IOMUX_PAD_NAKED(3, 6, PAD_MUXSEL_1) | ||
| 273 | #define MX28_PAD_AUART1_RTS__USB0_ID MXS_IOMUX_PAD_NAKED(3, 7, PAD_MUXSEL_1) | ||
| 274 | #define MX28_PAD_AUART2_RX__SSP3_D1 MXS_IOMUX_PAD_NAKED(3, 8, PAD_MUXSEL_1) | ||
| 275 | #define MX28_PAD_AUART2_TX__SSP3_D2 MXS_IOMUX_PAD_NAKED(3, 9, PAD_MUXSEL_1) | ||
| 276 | #define MX28_PAD_AUART2_CTS__I2C1_SCL MXS_IOMUX_PAD_NAKED(3, 10, PAD_MUXSEL_1) | ||
| 277 | #define MX28_PAD_AUART2_RTS__I2C1_SDA MXS_IOMUX_PAD_NAKED(3, 11, PAD_MUXSEL_1) | ||
| 278 | #define MX28_PAD_AUART3_RX__CAN0_TX MXS_IOMUX_PAD_NAKED(3, 12, PAD_MUXSEL_1) | ||
| 279 | #define MX28_PAD_AUART3_TX__CAN0_RX MXS_IOMUX_PAD_NAKED(3, 13, PAD_MUXSEL_1) | ||
| 280 | #define MX28_PAD_AUART3_CTS__CAN1_TX MXS_IOMUX_PAD_NAKED(3, 14, PAD_MUXSEL_1) | ||
| 281 | #define MX28_PAD_AUART3_RTS__CAN1_RX MXS_IOMUX_PAD_NAKED(3, 15, PAD_MUXSEL_1) | ||
| 282 | #define MX28_PAD_PWM0__I2C1_SCL MXS_IOMUX_PAD_NAKED(3, 16, PAD_MUXSEL_1) | ||
| 283 | #define MX28_PAD_PWM1__I2C1_SDA MXS_IOMUX_PAD_NAKED(3, 17, PAD_MUXSEL_1) | ||
| 284 | #define MX28_PAD_PWM2__USB0_ID MXS_IOMUX_PAD_NAKED(3, 18, PAD_MUXSEL_1) | ||
| 285 | #define MX28_PAD_SAIF0_MCLK__PWM_3 MXS_IOMUX_PAD_NAKED(3, 20, PAD_MUXSEL_1) | ||
| 286 | #define MX28_PAD_SAIF0_LRCLK__PWM_4 MXS_IOMUX_PAD_NAKED(3, 21, PAD_MUXSEL_1) | ||
| 287 | #define MX28_PAD_SAIF0_BITCLK__PWM_5 MXS_IOMUX_PAD_NAKED(3, 22, PAD_MUXSEL_1) | ||
| 288 | #define MX28_PAD_SAIF0_SDATA0__PWM_6 MXS_IOMUX_PAD_NAKED(3, 23, PAD_MUXSEL_1) | ||
| 289 | #define MX28_PAD_I2C0_SCL__TIMROT_ROTARYA MXS_IOMUX_PAD_NAKED(3, 24, PAD_MUXSEL_1) | ||
| 290 | #define MX28_PAD_I2C0_SDA__TIMROT_ROTARYB MXS_IOMUX_PAD_NAKED(3, 25, PAD_MUXSEL_1) | ||
| 291 | #define MX28_PAD_SAIF1_SDATA0__PWM_7 MXS_IOMUX_PAD_NAKED(3, 26, PAD_MUXSEL_1) | ||
| 292 | #define MX28_PAD_LCD_RESET__LCD_VSYNC MXS_IOMUX_PAD_NAKED(3, 30, PAD_MUXSEL_1) | ||
| 293 | |||
| 294 | #define MX28_PAD_ENET0_MDC__GPMI_CE4N MXS_IOMUX_PAD_NAKED(4, 0, PAD_MUXSEL_1) | ||
| 295 | #define MX28_PAD_ENET0_MDIO__GPMI_CE5N MXS_IOMUX_PAD_NAKED(4, 1, PAD_MUXSEL_1) | ||
| 296 | #define MX28_PAD_ENET0_RX_EN__GPMI_CE6N MXS_IOMUX_PAD_NAKED(4, 2, PAD_MUXSEL_1) | ||
| 297 | #define MX28_PAD_ENET0_RXD0__GPMI_CE7N MXS_IOMUX_PAD_NAKED(4, 3, PAD_MUXSEL_1) | ||
| 298 | #define MX28_PAD_ENET0_RXD1__GPMI_READY4 MXS_IOMUX_PAD_NAKED(4, 4, PAD_MUXSEL_1) | ||
| 299 | #define MX28_PAD_ENET0_TX_CLK__HSADC_TRIGGER MXS_IOMUX_PAD_NAKED(4, 5, PAD_MUXSEL_1) | ||
| 300 | #define MX28_PAD_ENET0_TX_EN__GPMI_READY5 MXS_IOMUX_PAD_NAKED(4, 6, PAD_MUXSEL_1) | ||
| 301 | #define MX28_PAD_ENET0_TXD0__GPMI_READY6 MXS_IOMUX_PAD_NAKED(4, 7, PAD_MUXSEL_1) | ||
| 302 | #define MX28_PAD_ENET0_TXD1__GPMI_READY7 MXS_IOMUX_PAD_NAKED(4, 8, PAD_MUXSEL_1) | ||
| 303 | #define MX28_PAD_ENET0_RXD2__ENET1_RXD0 MXS_IOMUX_PAD_NAKED(4, 9, PAD_MUXSEL_1) | ||
| 304 | #define MX28_PAD_ENET0_RXD3__ENET1_RXD1 MXS_IOMUX_PAD_NAKED(4, 10, PAD_MUXSEL_1) | ||
| 305 | #define MX28_PAD_ENET0_TXD2__ENET1_TXD0 MXS_IOMUX_PAD_NAKED(4, 11, PAD_MUXSEL_1) | ||
| 306 | #define MX28_PAD_ENET0_TXD3__ENET1_TXD1 MXS_IOMUX_PAD_NAKED(4, 12, PAD_MUXSEL_1) | ||
| 307 | #define MX28_PAD_ENET0_RX_CLK__ENET0_RX_ER MXS_IOMUX_PAD_NAKED(4, 13, PAD_MUXSEL_1) | ||
| 308 | #define MX28_PAD_ENET0_COL__ENET1_TX_EN MXS_IOMUX_PAD_NAKED(4, 14, PAD_MUXSEL_1) | ||
| 309 | #define MX28_PAD_ENET0_CRS__ENET1_RX_EN MXS_IOMUX_PAD_NAKED(4, 15, PAD_MUXSEL_1) | ||
| 310 | |||
| 311 | /* MUXSEL_2 */ | ||
| 312 | #define MX28_PAD_GPMI_CE2N__ENET0_RX_ER MXS_IOMUX_PAD_NAKED(0, 18, PAD_MUXSEL_2) | ||
| 313 | #define MX28_PAD_GPMI_CE3N__SAIF1_MCLK MXS_IOMUX_PAD_NAKED(0, 19, PAD_MUXSEL_2) | ||
| 314 | #define MX28_PAD_GPMI_RDY0__USB0_ID MXS_IOMUX_PAD_NAKED(0, 20, PAD_MUXSEL_2) | ||
| 315 | #define MX28_PAD_GPMI_RDY2__ENET0_TX_ER MXS_IOMUX_PAD_NAKED(0, 22, PAD_MUXSEL_2) | ||
| 316 | #define MX28_PAD_GPMI_RDY3__HSADC_TRIGGER MXS_IOMUX_PAD_NAKED(0, 23, PAD_MUXSEL_2) | ||
| 317 | #define MX28_PAD_GPMI_ALE__SSP3_D4 MXS_IOMUX_PAD_NAKED(0, 26, PAD_MUXSEL_2) | ||
| 318 | #define MX28_PAD_GPMI_CLE__SSP3_D5 MXS_IOMUX_PAD_NAKED(0, 27, PAD_MUXSEL_2) | ||
| 319 | |||
| 320 | #define MX28_PAD_LCD_D00__ETM_DA0 MXS_IOMUX_PAD_NAKED(1, 0, PAD_MUXSEL_2) | ||
| 321 | #define MX28_PAD_LCD_D01__ETM_DA1 MXS_IOMUX_PAD_NAKED(1, 1, PAD_MUXSEL_2) | ||
| 322 | #define MX28_PAD_LCD_D02__ETM_DA2 MXS_IOMUX_PAD_NAKED(1, 2, PAD_MUXSEL_2) | ||
| 323 | #define MX28_PAD_LCD_D03__ETM_DA3 MXS_IOMUX_PAD_NAKED(1, 3, PAD_MUXSEL_2) | ||
| 324 | #define MX28_PAD_LCD_D04__ETM_DA4 MXS_IOMUX_PAD_NAKED(1, 4, PAD_MUXSEL_2) | ||
| 325 | #define MX28_PAD_LCD_D05__ETM_DA5 MXS_IOMUX_PAD_NAKED(1, 5, PAD_MUXSEL_2) | ||
| 326 | #define MX28_PAD_LCD_D06__ETM_DA6 MXS_IOMUX_PAD_NAKED(1, 6, PAD_MUXSEL_2) | ||
| 327 | #define MX28_PAD_LCD_D07__ETM_DA7 MXS_IOMUX_PAD_NAKED(1, 7, PAD_MUXSEL_2) | ||
| 328 | #define MX28_PAD_LCD_D08__ETM_DA8 MXS_IOMUX_PAD_NAKED(1, 8, PAD_MUXSEL_2) | ||
| 329 | #define MX28_PAD_LCD_D09__ETM_DA9 MXS_IOMUX_PAD_NAKED(1, 9, PAD_MUXSEL_2) | ||
| 330 | #define MX28_PAD_LCD_D10__ETM_DA10 MXS_IOMUX_PAD_NAKED(1, 10, PAD_MUXSEL_2) | ||
| 331 | #define MX28_PAD_LCD_D11__ETM_DA11 MXS_IOMUX_PAD_NAKED(1, 11, PAD_MUXSEL_2) | ||
| 332 | #define MX28_PAD_LCD_D12__ETM_DA12 MXS_IOMUX_PAD_NAKED(1, 12, PAD_MUXSEL_2) | ||
| 333 | #define MX28_PAD_LCD_D13__ETM_DA13 MXS_IOMUX_PAD_NAKED(1, 13, PAD_MUXSEL_2) | ||
| 334 | #define MX28_PAD_LCD_D14__ETM_DA14 MXS_IOMUX_PAD_NAKED(1, 14, PAD_MUXSEL_2) | ||
| 335 | #define MX28_PAD_LCD_D15__ETM_DA15 MXS_IOMUX_PAD_NAKED(1, 15, PAD_MUXSEL_2) | ||
| 336 | #define MX28_PAD_LCD_D16__ETM_DA7 MXS_IOMUX_PAD_NAKED(1, 16, PAD_MUXSEL_2) | ||
| 337 | #define MX28_PAD_LCD_D17__ETM_DA6 MXS_IOMUX_PAD_NAKED(1, 17, PAD_MUXSEL_2) | ||
| 338 | #define MX28_PAD_LCD_D18__ETM_DA5 MXS_IOMUX_PAD_NAKED(1, 18, PAD_MUXSEL_2) | ||
| 339 | #define MX28_PAD_LCD_D19__ETM_DA4 MXS_IOMUX_PAD_NAKED(1, 19, PAD_MUXSEL_2) | ||
| 340 | #define MX28_PAD_LCD_D20__ETM_DA3 MXS_IOMUX_PAD_NAKED(1, 20, PAD_MUXSEL_2) | ||
| 341 | #define MX28_PAD_LCD_D21__ETM_DA2 MXS_IOMUX_PAD_NAKED(1, 21, PAD_MUXSEL_2) | ||
| 342 | #define MX28_PAD_LCD_D22__ETM_DA1 MXS_IOMUX_PAD_NAKED(1, 22, PAD_MUXSEL_2) | ||
| 343 | #define MX28_PAD_LCD_D23__ETM_DA0 MXS_IOMUX_PAD_NAKED(1, 23, PAD_MUXSEL_2) | ||
| 344 | #define MX28_PAD_LCD_RD_E__ETM_TCTL MXS_IOMUX_PAD_NAKED(1, 24, PAD_MUXSEL_2) | ||
| 345 | #define MX28_PAD_LCD_WR_RWN__ETM_TCLK MXS_IOMUX_PAD_NAKED(1, 25, PAD_MUXSEL_2) | ||
| 346 | #define MX28_PAD_LCD_HSYNC__ETM_TCTL MXS_IOMUX_PAD_NAKED(1, 29, PAD_MUXSEL_2) | ||
| 347 | #define MX28_PAD_LCD_DOTCLK__ETM_TCLK MXS_IOMUX_PAD_NAKED(1, 30, PAD_MUXSEL_2) | ||
| 348 | |||
| 349 | #define MX28_PAD_SSP1_SCK__ENET0_1588_EVENT2_OUT MXS_IOMUX_PAD_NAKED(2, 12, PAD_MUXSEL_2) | ||
| 350 | #define MX28_PAD_SSP1_CMD__ENET0_1588_EVENT2_IN MXS_IOMUX_PAD_NAKED(2, 13, PAD_MUXSEL_2) | ||
| 351 | #define MX28_PAD_SSP1_DATA0__ENET0_1588_EVENT3_OUT MXS_IOMUX_PAD_NAKED(2, 14, PAD_MUXSEL_2) | ||
| 352 | #define MX28_PAD_SSP1_DATA3__ENET0_1588_EVENT3_IN MXS_IOMUX_PAD_NAKED(2, 15, PAD_MUXSEL_2) | ||
| 353 | #define MX28_PAD_SSP2_SCK__SAIF0_SDATA1 MXS_IOMUX_PAD_NAKED(2, 16, PAD_MUXSEL_2) | ||
| 354 | #define MX28_PAD_SSP2_MOSI__SAIF0_SDATA2 MXS_IOMUX_PAD_NAKED(2, 17, PAD_MUXSEL_2) | ||
| 355 | #define MX28_PAD_SSP2_MISO__SAIF1_SDATA1 MXS_IOMUX_PAD_NAKED(2, 18, PAD_MUXSEL_2) | ||
| 356 | #define MX28_PAD_SSP2_SS0__SAIF1_SDATA2 MXS_IOMUX_PAD_NAKED(2, 19, PAD_MUXSEL_2) | ||
| 357 | #define MX28_PAD_SSP2_SS1__USB1_OVERCURRENT MXS_IOMUX_PAD_NAKED(2, 20, PAD_MUXSEL_2) | ||
| 358 | #define MX28_PAD_SSP2_SS2__USB0_OVERCURRENT MXS_IOMUX_PAD_NAKED(2, 21, PAD_MUXSEL_2) | ||
| 359 | #define MX28_PAD_SSP3_SCK__ENET1_1588_EVENT0_OUT MXS_IOMUX_PAD_NAKED(2, 24, PAD_MUXSEL_2) | ||
| 360 | #define MX28_PAD_SSP3_MOSI__ENET1_1588_EVENT0_IN MXS_IOMUX_PAD_NAKED(2, 25, PAD_MUXSEL_2) | ||
| 361 | #define MX28_PAD_SSP3_MISO__ENET1_1588_EVENT1_OUT MXS_IOMUX_PAD_NAKED(2, 26, PAD_MUXSEL_2) | ||
| 362 | #define MX28_PAD_SSP3_SS0__ENET1_1588_EVENT1_IN MXS_IOMUX_PAD_NAKED(2, 27, PAD_MUXSEL_2) | ||
| 363 | |||
| 364 | #define MX28_PAD_AUART0_RX__DUART_CTS MXS_IOMUX_PAD_NAKED(3, 0, PAD_MUXSEL_2) | ||
| 365 | #define MX28_PAD_AUART0_TX__DUART_RTS MXS_IOMUX_PAD_NAKED(3, 1, PAD_MUXSEL_2) | ||
| 366 | #define MX28_PAD_AUART0_CTS__DUART_RX MXS_IOMUX_PAD_NAKED(3, 2, PAD_MUXSEL_2) | ||
| 367 | #define MX28_PAD_AUART0_RTS__DUART_TX MXS_IOMUX_PAD_NAKED(3, 3, PAD_MUXSEL_2) | ||
| 368 | #define MX28_PAD_AUART1_RX__PWM_0 MXS_IOMUX_PAD_NAKED(3, 4, PAD_MUXSEL_2) | ||
| 369 | #define MX28_PAD_AUART1_TX__PWM_1 MXS_IOMUX_PAD_NAKED(3, 5, PAD_MUXSEL_2) | ||
| 370 | #define MX28_PAD_AUART1_CTS__TIMROT_ROTARYA MXS_IOMUX_PAD_NAKED(3, 6, PAD_MUXSEL_2) | ||
| 371 | #define MX28_PAD_AUART1_RTS__TIMROT_ROTARYB MXS_IOMUX_PAD_NAKED(3, 7, PAD_MUXSEL_2) | ||
| 372 | #define MX28_PAD_AUART2_RX__SSP3_D4 MXS_IOMUX_PAD_NAKED(3, 8, PAD_MUXSEL_2) | ||
| 373 | #define MX28_PAD_AUART2_TX__SSP3_D5 MXS_IOMUX_PAD_NAKED(3, 9, PAD_MUXSEL_2) | ||
| 374 | #define MX28_PAD_AUART2_CTS__SAIF1_BITCLK MXS_IOMUX_PAD_NAKED(3, 10, PAD_MUXSEL_2) | ||
| 375 | #define MX28_PAD_AUART2_RTS__SAIF1_LRCLK MXS_IOMUX_PAD_NAKED(3, 11, PAD_MUXSEL_2) | ||
| 376 | #define MX28_PAD_AUART3_RX__ENET0_1588_EVENT0_OUT MXS_IOMUX_PAD_NAKED(3, 12, PAD_MUXSEL_2) | ||
| 377 | #define MX28_PAD_AUART3_TX__ENET0_1588_EVENT0_IN MXS_IOMUX_PAD_NAKED(3, 13, PAD_MUXSEL_2) | ||
| 378 | #define MX28_PAD_AUART3_CTS__ENET0_1588_EVENT1_OUT MXS_IOMUX_PAD_NAKED(3, 14, PAD_MUXSEL_2) | ||
| 379 | #define MX28_PAD_AUART3_RTS__ENET0_1588_EVENT1_IN MXS_IOMUX_PAD_NAKED(3, 15, PAD_MUXSEL_2) | ||
| 380 | #define MX28_PAD_PWM0__DUART_RX MXS_IOMUX_PAD_NAKED(3, 16, PAD_MUXSEL_2) | ||
| 381 | #define MX28_PAD_PWM1__DUART_TX MXS_IOMUX_PAD_NAKED(3, 17, PAD_MUXSEL_2) | ||
| 382 | #define MX28_PAD_PWM2__USB1_OVERCURRENT MXS_IOMUX_PAD_NAKED(3, 18, PAD_MUXSEL_2) | ||
| 383 | #define MX28_PAD_SAIF0_MCLK__AUART4_CTS MXS_IOMUX_PAD_NAKED(3, 20, PAD_MUXSEL_2) | ||
| 384 | #define MX28_PAD_SAIF0_LRCLK__AUART4_RTS MXS_IOMUX_PAD_NAKED(3, 21, PAD_MUXSEL_2) | ||
| 385 | #define MX28_PAD_SAIF0_BITCLK__AUART4_RX MXS_IOMUX_PAD_NAKED(3, 22, PAD_MUXSEL_2) | ||
| 386 | #define MX28_PAD_SAIF0_SDATA0__AUART4_TX MXS_IOMUX_PAD_NAKED(3, 23, PAD_MUXSEL_2) | ||
| 387 | #define MX28_PAD_I2C0_SCL__DUART_RX MXS_IOMUX_PAD_NAKED(3, 24, PAD_MUXSEL_2) | ||
| 388 | #define MX28_PAD_I2C0_SDA__DUART_TX MXS_IOMUX_PAD_NAKED(3, 25, PAD_MUXSEL_2) | ||
| 389 | #define MX28_PAD_SAIF1_SDATA0__SAIF0_SDATA1 MXS_IOMUX_PAD_NAKED(3, 26, PAD_MUXSEL_2) | ||
| 390 | #define MX28_PAD_SPDIF__ENET1_RX_ER MXS_IOMUX_PAD_NAKED(3, 27, PAD_MUXSEL_2) | ||
| 391 | |||
| 392 | #define MX28_PAD_ENET0_MDC__SAIF0_SDATA1 MXS_IOMUX_PAD_NAKED(4, 0, PAD_MUXSEL_2) | ||
| 393 | #define MX28_PAD_ENET0_MDIO__SAIF0_SDATA2 MXS_IOMUX_PAD_NAKED(4, 1, PAD_MUXSEL_2) | ||
| 394 | #define MX28_PAD_ENET0_RX_EN__SAIF1_SDATA1 MXS_IOMUX_PAD_NAKED(4, 2, PAD_MUXSEL_2) | ||
| 395 | #define MX28_PAD_ENET0_RXD0__SAIF1_SDATA2 MXS_IOMUX_PAD_NAKED(4, 3, PAD_MUXSEL_2) | ||
| 396 | #define MX28_PAD_ENET0_TX_CLK__ENET0_1588_EVENT2_OUT MXS_IOMUX_PAD_NAKED(4, 5, PAD_MUXSEL_2) | ||
| 397 | #define MX28_PAD_ENET0_RXD2__ENET0_1588_EVENT0_OUT MXS_IOMUX_PAD_NAKED(4, 9, PAD_MUXSEL_2) | ||
| 398 | #define MX28_PAD_ENET0_RXD3__ENET0_1588_EVENT0_IN MXS_IOMUX_PAD_NAKED(4, 10, PAD_MUXSEL_2) | ||
| 399 | #define MX28_PAD_ENET0_TXD2__ENET0_1588_EVENT1_OUT MXS_IOMUX_PAD_NAKED(4, 11, PAD_MUXSEL_2) | ||
| 400 | #define MX28_PAD_ENET0_TXD3__ENET0_1588_EVENT1_IN MXS_IOMUX_PAD_NAKED(4, 12, PAD_MUXSEL_2) | ||
| 401 | #define MX28_PAD_ENET0_RX_CLK__ENET0_1588_EVENT2_IN MXS_IOMUX_PAD_NAKED(4, 13, PAD_MUXSEL_2) | ||
| 402 | #define MX28_PAD_ENET0_COL__ENET0_1588_EVENT3_OUT MXS_IOMUX_PAD_NAKED(4, 14, PAD_MUXSEL_2) | ||
| 403 | #define MX28_PAD_ENET0_CRS__ENET0_1588_EVENT3_IN MXS_IOMUX_PAD_NAKED(4, 15, PAD_MUXSEL_2) | ||
| 404 | |||
| 405 | /* MUXSEL_GPIO */ | ||
| 406 | #define MX28_PAD_GPMI_D00__GPIO_0_0 MXS_IOMUX_PAD_NAKED(0, 0, PAD_MUXSEL_GPIO) | ||
| 407 | #define MX28_PAD_GPMI_D01__GPIO_0_1 MXS_IOMUX_PAD_NAKED(0, 1, PAD_MUXSEL_GPIO) | ||
| 408 | #define MX28_PAD_GPMI_D02__GPIO_0_2 MXS_IOMUX_PAD_NAKED(0, 2, PAD_MUXSEL_GPIO) | ||
| 409 | #define MX28_PAD_GPMI_D03__GPIO_0_3 MXS_IOMUX_PAD_NAKED(0, 3, PAD_MUXSEL_GPIO) | ||
| 410 | #define MX28_PAD_GPMI_D04__GPIO_0_4 MXS_IOMUX_PAD_NAKED(0, 4, PAD_MUXSEL_GPIO) | ||
| 411 | #define MX28_PAD_GPMI_D05__GPIO_0_5 MXS_IOMUX_PAD_NAKED(0, 5, PAD_MUXSEL_GPIO) | ||
| 412 | #define MX28_PAD_GPMI_D06__GPIO_0_6 MXS_IOMUX_PAD_NAKED(0, 6, PAD_MUXSEL_GPIO) | ||
| 413 | #define MX28_PAD_GPMI_D07__GPIO_0_7 MXS_IOMUX_PAD_NAKED(0, 7, PAD_MUXSEL_GPIO) | ||
| 414 | #define MX28_PAD_GPMI_CE0N__GPIO_0_16 MXS_IOMUX_PAD_NAKED(0, 16, PAD_MUXSEL_GPIO) | ||
| 415 | #define MX28_PAD_GPMI_CE1N__GPIO_0_17 MXS_IOMUX_PAD_NAKED(0, 17, PAD_MUXSEL_GPIO) | ||
| 416 | #define MX28_PAD_GPMI_CE2N__GPIO_0_18 MXS_IOMUX_PAD_NAKED(0, 18, PAD_MUXSEL_GPIO) | ||
| 417 | #define MX28_PAD_GPMI_CE3N__GPIO_0_19 MXS_IOMUX_PAD_NAKED(0, 19, PAD_MUXSEL_GPIO) | ||
| 418 | #define MX28_PAD_GPMI_RDY0__GPIO_0_20 MXS_IOMUX_PAD_NAKED(0, 20, PAD_MUXSEL_GPIO) | ||
| 419 | #define MX28_PAD_GPMI_RDY1__GPIO_0_21 MXS_IOMUX_PAD_NAKED(0, 21, PAD_MUXSEL_GPIO) | ||
| 420 | #define MX28_PAD_GPMI_RDY2__GPIO_0_22 MXS_IOMUX_PAD_NAKED(0, 22, PAD_MUXSEL_GPIO) | ||
| 421 | #define MX28_PAD_GPMI_RDY3__GPIO_0_23 MXS_IOMUX_PAD_NAKED(0, 23, PAD_MUXSEL_GPIO) | ||
| 422 | #define MX28_PAD_GPMI_RDN__GPIO_0_24 MXS_IOMUX_PAD_NAKED(0, 24, PAD_MUXSEL_GPIO) | ||
| 423 | #define MX28_PAD_GPMI_WRN__GPIO_0_25 MXS_IOMUX_PAD_NAKED(0, 25, PAD_MUXSEL_GPIO) | ||
| 424 | #define MX28_PAD_GPMI_ALE__GPIO_0_26 MXS_IOMUX_PAD_NAKED(0, 26, PAD_MUXSEL_GPIO) | ||
| 425 | #define MX28_PAD_GPMI_CLE__GPIO_0_27 MXS_IOMUX_PAD_NAKED(0, 27, PAD_MUXSEL_GPIO) | ||
| 426 | #define MX28_PAD_GPMI_RESETN__GPIO_0_28 MXS_IOMUX_PAD_NAKED(0, 28, PAD_MUXSEL_GPIO) | ||
| 427 | |||
| 428 | #define MX28_PAD_LCD_D00__GPIO_1_0 MXS_IOMUX_PAD_NAKED(1, 0, PAD_MUXSEL_GPIO) | ||
| 429 | #define MX28_PAD_LCD_D01__GPIO_1_1 MXS_IOMUX_PAD_NAKED(1, 1, PAD_MUXSEL_GPIO) | ||
| 430 | #define MX28_PAD_LCD_D02__GPIO_1_2 MXS_IOMUX_PAD_NAKED(1, 2, PAD_MUXSEL_GPIO) | ||
| 431 | #define MX28_PAD_LCD_D03__GPIO_1_3 MXS_IOMUX_PAD_NAKED(1, 3, PAD_MUXSEL_GPIO) | ||
| 432 | #define MX28_PAD_LCD_D04__GPIO_1_4 MXS_IOMUX_PAD_NAKED(1, 4, PAD_MUXSEL_GPIO) | ||
| 433 | #define MX28_PAD_LCD_D05__GPIO_1_5 MXS_IOMUX_PAD_NAKED(1, 5, PAD_MUXSEL_GPIO) | ||
| 434 | #define MX28_PAD_LCD_D06__GPIO_1_6 MXS_IOMUX_PAD_NAKED(1, 6, PAD_MUXSEL_GPIO) | ||
| 435 | #define MX28_PAD_LCD_D07__GPIO_1_7 MXS_IOMUX_PAD_NAKED(1, 7, PAD_MUXSEL_GPIO) | ||
| 436 | #define MX28_PAD_LCD_D08__GPIO_1_8 MXS_IOMUX_PAD_NAKED(1, 8, PAD_MUXSEL_GPIO) | ||
| 437 | #define MX28_PAD_LCD_D09__GPIO_1_9 MXS_IOMUX_PAD_NAKED(1, 9, PAD_MUXSEL_GPIO) | ||
| 438 | #define MX28_PAD_LCD_D10__GPIO_1_10 MXS_IOMUX_PAD_NAKED(1, 10, PAD_MUXSEL_GPIO) | ||
| 439 | #define MX28_PAD_LCD_D11__GPIO_1_11 MXS_IOMUX_PAD_NAKED(1, 11, PAD_MUXSEL_GPIO) | ||
| 440 | #define MX28_PAD_LCD_D12__GPIO_1_12 MXS_IOMUX_PAD_NAKED(1, 12, PAD_MUXSEL_GPIO) | ||
| 441 | #define MX28_PAD_LCD_D13__GPIO_1_13 MXS_IOMUX_PAD_NAKED(1, 13, PAD_MUXSEL_GPIO) | ||
| 442 | #define MX28_PAD_LCD_D14__GPIO_1_14 MXS_IOMUX_PAD_NAKED(1, 14, PAD_MUXSEL_GPIO) | ||
| 443 | #define MX28_PAD_LCD_D15__GPIO_1_15 MXS_IOMUX_PAD_NAKED(1, 15, PAD_MUXSEL_GPIO) | ||
| 444 | #define MX28_PAD_LCD_D16__GPIO_1_16 MXS_IOMUX_PAD_NAKED(1, 16, PAD_MUXSEL_GPIO) | ||
| 445 | #define MX28_PAD_LCD_D17__GPIO_1_17 MXS_IOMUX_PAD_NAKED(1, 17, PAD_MUXSEL_GPIO) | ||
| 446 | #define MX28_PAD_LCD_D18__GPIO_1_18 MXS_IOMUX_PAD_NAKED(1, 18, PAD_MUXSEL_GPIO) | ||
| 447 | #define MX28_PAD_LCD_D19__GPIO_1_19 MXS_IOMUX_PAD_NAKED(1, 19, PAD_MUXSEL_GPIO) | ||
| 448 | #define MX28_PAD_LCD_D20__GPIO_1_20 MXS_IOMUX_PAD_NAKED(1, 20, PAD_MUXSEL_GPIO) | ||
| 449 | #define MX28_PAD_LCD_D21__GPIO_1_21 MXS_IOMUX_PAD_NAKED(1, 21, PAD_MUXSEL_GPIO) | ||
| 450 | #define MX28_PAD_LCD_D22__GPIO_1_22 MXS_IOMUX_PAD_NAKED(1, 22, PAD_MUXSEL_GPIO) | ||
| 451 | #define MX28_PAD_LCD_D23__GPIO_1_23 MXS_IOMUX_PAD_NAKED(1, 23, PAD_MUXSEL_GPIO) | ||
| 452 | #define MX28_PAD_LCD_RD_E__GPIO_1_24 MXS_IOMUX_PAD_NAKED(1, 24, PAD_MUXSEL_GPIO) | ||
| 453 | #define MX28_PAD_LCD_WR_RWN__GPIO_1_25 MXS_IOMUX_PAD_NAKED(1, 25, PAD_MUXSEL_GPIO) | ||
| 454 | #define MX28_PAD_LCD_RS__GPIO_1_26 MXS_IOMUX_PAD_NAKED(1, 26, PAD_MUXSEL_GPIO) | ||
| 455 | #define MX28_PAD_LCD_CS__GPIO_1_27 MXS_IOMUX_PAD_NAKED(1, 27, PAD_MUXSEL_GPIO) | ||
| 456 | #define MX28_PAD_LCD_VSYNC__GPIO_1_28 MXS_IOMUX_PAD_NAKED(1, 28, PAD_MUXSEL_GPIO) | ||
| 457 | #define MX28_PAD_LCD_HSYNC__GPIO_1_29 MXS_IOMUX_PAD_NAKED(1, 29, PAD_MUXSEL_GPIO) | ||
| 458 | #define MX28_PAD_LCD_DOTCLK__GPIO_1_30 MXS_IOMUX_PAD_NAKED(1, 30, PAD_MUXSEL_GPIO) | ||
| 459 | #define MX28_PAD_LCD_ENABLE__GPIO_1_31 MXS_IOMUX_PAD_NAKED(1, 31, PAD_MUXSEL_GPIO) | ||
| 460 | |||
| 461 | #define MX28_PAD_SSP0_DATA0__GPIO_2_0 MXS_IOMUX_PAD_NAKED(2, 0, PAD_MUXSEL_GPIO) | ||
| 462 | #define MX28_PAD_SSP0_DATA1__GPIO_2_1 MXS_IOMUX_PAD_NAKED(2, 1, PAD_MUXSEL_GPIO) | ||
| 463 | #define MX28_PAD_SSP0_DATA2__GPIO_2_2 MXS_IOMUX_PAD_NAKED(2, 2, PAD_MUXSEL_GPIO) | ||
| 464 | #define MX28_PAD_SSP0_DATA3__GPIO_2_3 MXS_IOMUX_PAD_NAKED(2, 3, PAD_MUXSEL_GPIO) | ||
| 465 | #define MX28_PAD_SSP0_DATA4__GPIO_2_4 MXS_IOMUX_PAD_NAKED(2, 4, PAD_MUXSEL_GPIO) | ||
| 466 | #define MX28_PAD_SSP0_DATA5__GPIO_2_5 MXS_IOMUX_PAD_NAKED(2, 5, PAD_MUXSEL_GPIO) | ||
| 467 | #define MX28_PAD_SSP0_DATA6__GPIO_2_6 MXS_IOMUX_PAD_NAKED(2, 6, PAD_MUXSEL_GPIO) | ||
| 468 | #define MX28_PAD_SSP0_DATA7__GPIO_2_7 MXS_IOMUX_PAD_NAKED(2, 7, PAD_MUXSEL_GPIO) | ||
| 469 | #define MX28_PAD_SSP0_CMD__GPIO_2_8 MXS_IOMUX_PAD_NAKED(2, 8, PAD_MUXSEL_GPIO) | ||
| 470 | #define MX28_PAD_SSP0_DETECT__GPIO_2_9 MXS_IOMUX_PAD_NAKED(2, 9, PAD_MUXSEL_GPIO) | ||
| 471 | #define MX28_PAD_SSP0_SCK__GPIO_2_10 MXS_IOMUX_PAD_NAKED(2, 10, PAD_MUXSEL_GPIO) | ||
| 472 | #define MX28_PAD_SSP1_SCK__GPIO_2_12 MXS_IOMUX_PAD_NAKED(2, 12, PAD_MUXSEL_GPIO) | ||
| 473 | #define MX28_PAD_SSP1_CMD__GPIO_2_13 MXS_IOMUX_PAD_NAKED(2, 13, PAD_MUXSEL_GPIO) | ||
| 474 | #define MX28_PAD_SSP1_DATA0__GPIO_2_14 MXS_IOMUX_PAD_NAKED(2, 14, PAD_MUXSEL_GPIO) | ||
| 475 | #define MX28_PAD_SSP1_DATA3__GPIO_2_15 MXS_IOMUX_PAD_NAKED(2, 15, PAD_MUXSEL_GPIO) | ||
| 476 | #define MX28_PAD_SSP2_SCK__GPIO_2_16 MXS_IOMUX_PAD_NAKED(2, 16, PAD_MUXSEL_GPIO) | ||
| 477 | #define MX28_PAD_SSP2_MOSI__GPIO_2_17 MXS_IOMUX_PAD_NAKED(2, 17, PAD_MUXSEL_GPIO) | ||
| 478 | #define MX28_PAD_SSP2_MISO__GPIO_2_18 MXS_IOMUX_PAD_NAKED(2, 18, PAD_MUXSEL_GPIO) | ||
| 479 | #define MX28_PAD_SSP2_SS0__GPIO_2_19 MXS_IOMUX_PAD_NAKED(2, 19, PAD_MUXSEL_GPIO) | ||
| 480 | #define MX28_PAD_SSP2_SS1__GPIO_2_20 MXS_IOMUX_PAD_NAKED(2, 20, PAD_MUXSEL_GPIO) | ||
| 481 | #define MX28_PAD_SSP2_SS2__GPIO_2_21 MXS_IOMUX_PAD_NAKED(2, 21, PAD_MUXSEL_GPIO) | ||
| 482 | #define MX28_PAD_SSP3_SCK__GPIO_2_24 MXS_IOMUX_PAD_NAKED(2, 24, PAD_MUXSEL_GPIO) | ||
| 483 | #define MX28_PAD_SSP3_MOSI__GPIO_2_25 MXS_IOMUX_PAD_NAKED(2, 25, PAD_MUXSEL_GPIO) | ||
| 484 | #define MX28_PAD_SSP3_MISO__GPIO_2_26 MXS_IOMUX_PAD_NAKED(2, 26, PAD_MUXSEL_GPIO) | ||
| 485 | #define MX28_PAD_SSP3_SS0__GPIO_2_27 MXS_IOMUX_PAD_NAKED(2, 27, PAD_MUXSEL_GPIO) | ||
| 486 | |||
| 487 | #define MX28_PAD_AUART0_RX__GPIO_3_0 MXS_IOMUX_PAD_NAKED(3, 0, PAD_MUXSEL_GPIO) | ||
| 488 | #define MX28_PAD_AUART0_TX__GPIO_3_1 MXS_IOMUX_PAD_NAKED(3, 1, PAD_MUXSEL_GPIO) | ||
| 489 | #define MX28_PAD_AUART0_CTS__GPIO_3_2 MXS_IOMUX_PAD_NAKED(3, 2, PAD_MUXSEL_GPIO) | ||
| 490 | #define MX28_PAD_AUART0_RTS__GPIO_3_3 MXS_IOMUX_PAD_NAKED(3, 3, PAD_MUXSEL_GPIO) | ||
| 491 | #define MX28_PAD_AUART1_RX__GPIO_3_4 MXS_IOMUX_PAD_NAKED(3, 4, PAD_MUXSEL_GPIO) | ||
| 492 | #define MX28_PAD_AUART1_TX__GPIO_3_5 MXS_IOMUX_PAD_NAKED(3, 5, PAD_MUXSEL_GPIO) | ||
| 493 | #define MX28_PAD_AUART1_CTS__GPIO_3_6 MXS_IOMUX_PAD_NAKED(3, 6, PAD_MUXSEL_GPIO) | ||
| 494 | #define MX28_PAD_AUART1_RTS__GPIO_3_7 MXS_IOMUX_PAD_NAKED(3, 7, PAD_MUXSEL_GPIO) | ||
| 495 | #define MX28_PAD_AUART2_RX__GPIO_3_8 MXS_IOMUX_PAD_NAKED(3, 8, PAD_MUXSEL_GPIO) | ||
| 496 | #define MX28_PAD_AUART2_TX__GPIO_3_9 MXS_IOMUX_PAD_NAKED(3, 9, PAD_MUXSEL_GPIO) | ||
| 497 | #define MX28_PAD_AUART2_CTS__GPIO_3_10 MXS_IOMUX_PAD_NAKED(3, 10, PAD_MUXSEL_GPIO) | ||
| 498 | #define MX28_PAD_AUART2_RTS__GPIO_3_11 MXS_IOMUX_PAD_NAKED(3, 11, PAD_MUXSEL_GPIO) | ||
| 499 | #define MX28_PAD_AUART3_RX__GPIO_3_12 MXS_IOMUX_PAD_NAKED(3, 12, PAD_MUXSEL_GPIO) | ||
| 500 | #define MX28_PAD_AUART3_TX__GPIO_3_13 MXS_IOMUX_PAD_NAKED(3, 13, PAD_MUXSEL_GPIO) | ||
| 501 | #define MX28_PAD_AUART3_CTS__GPIO_3_14 MXS_IOMUX_PAD_NAKED(3, 14, PAD_MUXSEL_GPIO) | ||
| 502 | #define MX28_PAD_AUART3_RTS__GPIO_3_15 MXS_IOMUX_PAD_NAKED(3, 15, PAD_MUXSEL_GPIO) | ||
| 503 | #define MX28_PAD_PWM0__GPIO_3_16 MXS_IOMUX_PAD_NAKED(3, 16, PAD_MUXSEL_GPIO) | ||
| 504 | #define MX28_PAD_PWM1__GPIO_3_17 MXS_IOMUX_PAD_NAKED(3, 17, PAD_MUXSEL_GPIO) | ||
| 505 | #define MX28_PAD_PWM2__GPIO_3_18 MXS_IOMUX_PAD_NAKED(3, 18, PAD_MUXSEL_GPIO) | ||
| 506 | #define MX28_PAD_SAIF0_MCLK__GPIO_3_20 MXS_IOMUX_PAD_NAKED(3, 20, PAD_MUXSEL_GPIO) | ||
| 507 | #define MX28_PAD_SAIF0_LRCLK__GPIO_3_21 MXS_IOMUX_PAD_NAKED(3, 21, PAD_MUXSEL_GPIO) | ||
| 508 | #define MX28_PAD_SAIF0_BITCLK__GPIO_3_22 MXS_IOMUX_PAD_NAKED(3, 22, PAD_MUXSEL_GPIO) | ||
| 509 | #define MX28_PAD_SAIF0_SDATA0__GPIO_3_23 MXS_IOMUX_PAD_NAKED(3, 23, PAD_MUXSEL_GPIO) | ||
| 510 | #define MX28_PAD_I2C0_SCL__GPIO_3_24 MXS_IOMUX_PAD_NAKED(3, 24, PAD_MUXSEL_GPIO) | ||
| 511 | #define MX28_PAD_I2C0_SDA__GPIO_3_25 MXS_IOMUX_PAD_NAKED(3, 25, PAD_MUXSEL_GPIO) | ||
| 512 | #define MX28_PAD_SAIF1_SDATA0__GPIO_3_26 MXS_IOMUX_PAD_NAKED(3, 26, PAD_MUXSEL_GPIO) | ||
| 513 | #define MX28_PAD_SPDIF__GPIO_3_27 MXS_IOMUX_PAD_NAKED(3, 27, PAD_MUXSEL_GPIO) | ||
| 514 | #define MX28_PAD_PWM3__GPIO_3_28 MXS_IOMUX_PAD_NAKED(3, 28, PAD_MUXSEL_GPIO) | ||
| 515 | #define MX28_PAD_PWM4__GPIO_3_29 MXS_IOMUX_PAD_NAKED(3, 29, PAD_MUXSEL_GPIO) | ||
| 516 | #define MX28_PAD_LCD_RESET__GPIO_3_30 MXS_IOMUX_PAD_NAKED(3, 30, PAD_MUXSEL_GPIO) | ||
| 517 | |||
| 518 | #define MX28_PAD_ENET0_MDC__GPIO_4_0 MXS_IOMUX_PAD_NAKED(4, 0, PAD_MUXSEL_GPIO) | ||
| 519 | #define MX28_PAD_ENET0_MDIO__GPIO_4_1 MXS_IOMUX_PAD_NAKED(4, 1, PAD_MUXSEL_GPIO) | ||
| 520 | #define MX28_PAD_ENET0_RX_EN__GPIO_4_2 MXS_IOMUX_PAD_NAKED(4, 2, PAD_MUXSEL_GPIO) | ||
| 521 | #define MX28_PAD_ENET0_RXD0__GPIO_4_3 MXS_IOMUX_PAD_NAKED(4, 3, PAD_MUXSEL_GPIO) | ||
| 522 | #define MX28_PAD_ENET0_RXD1__GPIO_4_4 MXS_IOMUX_PAD_NAKED(4, 4, PAD_MUXSEL_GPIO) | ||
| 523 | #define MX28_PAD_ENET0_TX_CLK__GPIO_4_5 MXS_IOMUX_PAD_NAKED(4, 5, PAD_MUXSEL_GPIO) | ||
| 524 | #define MX28_PAD_ENET0_TX_EN__GPIO_4_6 MXS_IOMUX_PAD_NAKED(4, 6, PAD_MUXSEL_GPIO) | ||
| 525 | #define MX28_PAD_ENET0_TXD0__GPIO_4_7 MXS_IOMUX_PAD_NAKED(4, 7, PAD_MUXSEL_GPIO) | ||
| 526 | #define MX28_PAD_ENET0_TXD1__GPIO_4_8 MXS_IOMUX_PAD_NAKED(4, 8, PAD_MUXSEL_GPIO) | ||
| 527 | #define MX28_PAD_ENET0_RXD2__GPIO_4_9 MXS_IOMUX_PAD_NAKED(4, 9, PAD_MUXSEL_GPIO) | ||
| 528 | #define MX28_PAD_ENET0_RXD3__GPIO_4_10 MXS_IOMUX_PAD_NAKED(4, 10, PAD_MUXSEL_GPIO) | ||
| 529 | #define MX28_PAD_ENET0_TXD2__GPIO_4_11 MXS_IOMUX_PAD_NAKED(4, 11, PAD_MUXSEL_GPIO) | ||
| 530 | #define MX28_PAD_ENET0_TXD3__GPIO_4_12 MXS_IOMUX_PAD_NAKED(4, 12, PAD_MUXSEL_GPIO) | ||
| 531 | #define MX28_PAD_ENET0_RX_CLK__GPIO_4_13 MXS_IOMUX_PAD_NAKED(4, 13, PAD_MUXSEL_GPIO) | ||
| 532 | #define MX28_PAD_ENET0_COL__GPIO_4_14 MXS_IOMUX_PAD_NAKED(4, 14, PAD_MUXSEL_GPIO) | ||
| 533 | #define MX28_PAD_ENET0_CRS__GPIO_4_15 MXS_IOMUX_PAD_NAKED(4, 15, PAD_MUXSEL_GPIO) | ||
| 534 | #define MX28_PAD_ENET_CLK__GPIO_4_16 MXS_IOMUX_PAD_NAKED(4, 16, PAD_MUXSEL_GPIO) | ||
| 535 | #define MX28_PAD_JTAG_RTCK__GPIO_4_20 MXS_IOMUX_PAD_NAKED(4, 20, PAD_MUXSEL_GPIO) | ||
| 536 | |||
| 537 | #endif /* __MACH_IOMUX_MX28_H__ */ | ||
diff --git a/arch/arm/mach-mxs/include/mach/iomux.h b/arch/arm/mach-mxs/include/mach/iomux.h deleted file mode 100644 index 7abdf58b8bb7..000000000000 --- a/arch/arm/mach-mxs/include/mach/iomux.h +++ /dev/null | |||
| @@ -1,168 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2009 by Jan Weitzel Phytec Messtechnik GmbH, | ||
| 3 | * <armlinux@phytec.de> | ||
| 4 | * Copyright (C) 2010 Freescale Semiconductor, Inc. All Rights Reserved. | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or | ||
| 7 | * modify it under the terms of the GNU General Public License | ||
| 8 | * as published by the Free Software Foundation; either version 2 | ||
| 9 | * of the License, or (at your option) any later version. | ||
| 10 | * This program is distributed in the hope that it will be useful, | ||
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 13 | * GNU General Public License for more details. | ||
| 14 | * | ||
| 15 | * You should have received a copy of the GNU General Public License | ||
| 16 | * along with this program; if not, write to the Free Software | ||
| 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | ||
| 18 | * MA 02110-1301, USA. | ||
| 19 | */ | ||
| 20 | |||
| 21 | #ifndef __MACH_MXS_IOMUX_H__ | ||
| 22 | #define __MACH_MXS_IOMUX_H__ | ||
| 23 | |||
| 24 | /* | ||
| 25 | * IOMUX/PAD Bit field definitions | ||
| 26 | * | ||
| 27 | * PAD_BANK: 0..2 (3) | ||
| 28 | * PAD_PIN: 3..7 (5) | ||
| 29 | * PAD_MUXSEL: 8..9 (2) | ||
| 30 | * PAD_MA: 10..11 (2) | ||
| 31 | * PAD_MA_VALID: 12 (1) | ||
| 32 | * PAD_VOL: 13 (1) | ||
| 33 | * PAD_VOL_VALID: 14 (1) | ||
| 34 | * PAD_PULL: 15 (1) | ||
| 35 | * PAD_PULL_VALID: 16 (1) | ||
| 36 | * RESERVED: 17..31 (15) | ||
| 37 | */ | ||
| 38 | typedef u32 iomux_cfg_t; | ||
| 39 | |||
| 40 | #define MXS_PAD_BANK_SHIFT 0 | ||
| 41 | #define MXS_PAD_BANK_MASK ((iomux_cfg_t)0x7 << MXS_PAD_BANK_SHIFT) | ||
| 42 | #define MXS_PAD_PIN_SHIFT 3 | ||
| 43 | #define MXS_PAD_PIN_MASK ((iomux_cfg_t)0x1f << MXS_PAD_PIN_SHIFT) | ||
| 44 | #define MXS_PAD_MUXSEL_SHIFT 8 | ||
| 45 | #define MXS_PAD_MUXSEL_MASK ((iomux_cfg_t)0x3 << MXS_PAD_MUXSEL_SHIFT) | ||
| 46 | #define MXS_PAD_MA_SHIFT 10 | ||
| 47 | #define MXS_PAD_MA_MASK ((iomux_cfg_t)0x3 << MXS_PAD_MA_SHIFT) | ||
| 48 | #define MXS_PAD_MA_VALID_SHIFT 12 | ||
| 49 | #define MXS_PAD_MA_VALID_MASK ((iomux_cfg_t)0x1 << MXS_PAD_MA_VALID_SHIFT) | ||
| 50 | #define MXS_PAD_VOL_SHIFT 13 | ||
| 51 | #define MXS_PAD_VOL_MASK ((iomux_cfg_t)0x1 << MXS_PAD_VOL_SHIFT) | ||
| 52 | #define MXS_PAD_VOL_VALID_SHIFT 14 | ||
| 53 | #define MXS_PAD_VOL_VALID_MASK ((iomux_cfg_t)0x1 << MXS_PAD_VOL_VALID_SHIFT) | ||
| 54 | #define MXS_PAD_PULL_SHIFT 15 | ||
| 55 | #define MXS_PAD_PULL_MASK ((iomux_cfg_t)0x1 << MXS_PAD_PULL_SHIFT) | ||
| 56 | #define MXS_PAD_PULL_VALID_SHIFT 16 | ||
| 57 | #define MXS_PAD_PULL_VALID_MASK ((iomux_cfg_t)0x1 << MXS_PAD_PULL_VALID_SHIFT) | ||
| 58 | |||
| 59 | #define PAD_MUXSEL_0 0 | ||
| 60 | #define PAD_MUXSEL_1 1 | ||
| 61 | #define PAD_MUXSEL_2 2 | ||
| 62 | #define PAD_MUXSEL_GPIO 3 | ||
| 63 | |||
| 64 | #define PAD_4MA 0 | ||
| 65 | #define PAD_8MA 1 | ||
| 66 | #define PAD_12MA 2 | ||
| 67 | #define PAD_16MA 3 | ||
| 68 | |||
| 69 | #define PAD_1V8 0 | ||
| 70 | #define PAD_3V3 1 | ||
| 71 | |||
| 72 | #define PAD_NOPULL 0 | ||
| 73 | #define PAD_PULLUP 1 | ||
| 74 | |||
| 75 | #define MXS_PAD_4MA ((PAD_4MA << MXS_PAD_MA_SHIFT) | \ | ||
| 76 | MXS_PAD_MA_VALID_MASK) | ||
| 77 | #define MXS_PAD_8MA ((PAD_8MA << MXS_PAD_MA_SHIFT) | \ | ||
| 78 | MXS_PAD_MA_VALID_MASK) | ||
| 79 | #define MXS_PAD_12MA ((PAD_12MA << MXS_PAD_MA_SHIFT) | \ | ||
| 80 | MXS_PAD_MA_VALID_MASK) | ||
| 81 | #define MXS_PAD_16MA ((PAD_16MA << MXS_PAD_MA_SHIFT) | \ | ||
| 82 | MXS_PAD_MA_VALID_MASK) | ||
| 83 | |||
| 84 | #define MXS_PAD_1V8 ((PAD_1V8 << MXS_PAD_VOL_SHIFT) | \ | ||
| 85 | MXS_PAD_VOL_VALID_MASK) | ||
| 86 | #define MXS_PAD_3V3 ((PAD_3V3 << MXS_PAD_VOL_SHIFT) | \ | ||
| 87 | MXS_PAD_VOL_VALID_MASK) | ||
| 88 | |||
| 89 | #define MXS_PAD_NOPULL ((PAD_NOPULL << MXS_PAD_PULL_SHIFT) | \ | ||
| 90 | MXS_PAD_PULL_VALID_MASK) | ||
| 91 | #define MXS_PAD_PULLUP ((PAD_PULLUP << MXS_PAD_PULL_SHIFT) | \ | ||
| 92 | MXS_PAD_PULL_VALID_MASK) | ||
| 93 | |||
| 94 | /* generic pad control used in most cases */ | ||
| 95 | #define MXS_PAD_CTRL (MXS_PAD_4MA | MXS_PAD_3V3 | MXS_PAD_NOPULL) | ||
| 96 | |||
| 97 | #define MXS_IOMUX_PAD(_bank, _pin, _muxsel, _ma, _vol, _pull) \ | ||
| 98 | (((iomux_cfg_t)(_bank) << MXS_PAD_BANK_SHIFT) | \ | ||
| 99 | ((iomux_cfg_t)(_pin) << MXS_PAD_PIN_SHIFT) | \ | ||
| 100 | ((iomux_cfg_t)(_muxsel) << MXS_PAD_MUXSEL_SHIFT) | \ | ||
| 101 | ((iomux_cfg_t)(_ma) << MXS_PAD_MA_SHIFT) | \ | ||
| 102 | ((iomux_cfg_t)(_vol) << MXS_PAD_VOL_SHIFT) | \ | ||
| 103 | ((iomux_cfg_t)(_pull) << MXS_PAD_PULL_SHIFT)) | ||
| 104 | |||
| 105 | /* | ||
| 106 | * A pad becomes naked, when none of mA, vol or pull | ||
| 107 | * validity bits is set. | ||
| 108 | */ | ||
| 109 | #define MXS_IOMUX_PAD_NAKED(_bank, _pin, _muxsel) \ | ||
| 110 | MXS_IOMUX_PAD(_bank, _pin, _muxsel, 0, 0, 0) | ||
| 111 | |||
| 112 | static inline unsigned int PAD_BANK(iomux_cfg_t pad) | ||
| 113 | { | ||
| 114 | return (pad & MXS_PAD_BANK_MASK) >> MXS_PAD_BANK_SHIFT; | ||
| 115 | } | ||
| 116 | |||
| 117 | static inline unsigned int PAD_PIN(iomux_cfg_t pad) | ||
| 118 | { | ||
| 119 | return (pad & MXS_PAD_PIN_MASK) >> MXS_PAD_PIN_SHIFT; | ||
| 120 | } | ||
| 121 | |||
| 122 | static inline unsigned int PAD_MUXSEL(iomux_cfg_t pad) | ||
| 123 | { | ||
| 124 | return (pad & MXS_PAD_MUXSEL_MASK) >> MXS_PAD_MUXSEL_SHIFT; | ||
| 125 | } | ||
| 126 | |||
| 127 | static inline unsigned int PAD_MA(iomux_cfg_t pad) | ||
| 128 | { | ||
| 129 | return (pad & MXS_PAD_MA_MASK) >> MXS_PAD_MA_SHIFT; | ||
| 130 | } | ||
| 131 | |||
| 132 | static inline unsigned int PAD_MA_VALID(iomux_cfg_t pad) | ||
| 133 | { | ||
| 134 | return (pad & MXS_PAD_MA_VALID_MASK) >> MXS_PAD_MA_VALID_SHIFT; | ||
| 135 | } | ||
| 136 | |||
| 137 | static inline unsigned int PAD_VOL(iomux_cfg_t pad) | ||
| 138 | { | ||
| 139 | return (pad & MXS_PAD_VOL_MASK) >> MXS_PAD_VOL_SHIFT; | ||
| 140 | } | ||
| 141 | |||
| 142 | static inline unsigned int PAD_VOL_VALID(iomux_cfg_t pad) | ||
| 143 | { | ||
| 144 | return (pad & MXS_PAD_VOL_VALID_MASK) >> MXS_PAD_VOL_VALID_SHIFT; | ||
| 145 | } | ||
| 146 | |||
| 147 | static inline unsigned int PAD_PULL(iomux_cfg_t pad) | ||
| 148 | { | ||
| 149 | return (pad & MXS_PAD_PULL_MASK) >> MXS_PAD_PULL_SHIFT; | ||
| 150 | } | ||
| 151 | |||
| 152 | static inline unsigned int PAD_PULL_VALID(iomux_cfg_t pad) | ||
| 153 | { | ||
| 154 | return (pad & MXS_PAD_PULL_VALID_MASK) >> MXS_PAD_PULL_VALID_SHIFT; | ||
| 155 | } | ||
| 156 | |||
| 157 | /* | ||
| 158 | * configures a single pad in the iomuxer | ||
| 159 | */ | ||
| 160 | int mxs_iomux_setup_pad(iomux_cfg_t pad); | ||
| 161 | |||
| 162 | /* | ||
| 163 | * configures multiple pads | ||
| 164 | * convenient way to call the above function with tables | ||
| 165 | */ | ||
| 166 | int mxs_iomux_setup_multiple_pads(const iomux_cfg_t *pad_list, unsigned count); | ||
| 167 | |||
| 168 | #endif /* __MACH_MXS_IOMUX_H__*/ | ||
diff --git a/arch/arm/mach-mxs/iomux.c b/arch/arm/mach-mxs/iomux.c deleted file mode 100644 index 0e804e2f11f4..000000000000 --- a/arch/arm/mach-mxs/iomux.c +++ /dev/null | |||
| @@ -1,101 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Copyright 2004-2006,2010 Freescale Semiconductor, Inc. All Rights Reserved. | ||
| 3 | * Copyright (C) 2008 by Sascha Hauer <kernel@pengutronix.de> | ||
| 4 | * Copyright (C) 2009 by Jan Weitzel Phytec Messtechnik GmbH, | ||
| 5 | * <armlinux@phytec.de> | ||
| 6 | * | ||
| 7 | * This program is free software; you can redistribute it and/or | ||
| 8 | * modify it under the terms of the GNU General Public License | ||
| 9 | * as published by the Free Software Foundation; either version 2 | ||
| 10 | * of the License, or (at your option) any later version. | ||
| 11 | * This program is distributed in the hope that it will be useful, | ||
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | * GNU General Public License for more details. | ||
| 15 | * | ||
| 16 | * You should have received a copy of the GNU General Public License | ||
| 17 | * along with this program; if not, write to the Free Software | ||
| 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | ||
| 19 | * MA 02110-1301, USA. | ||
| 20 | */ | ||
| 21 | |||
| 22 | #include <linux/errno.h> | ||
| 23 | #include <linux/init.h> | ||
| 24 | #include <linux/kernel.h> | ||
| 25 | #include <linux/module.h> | ||
| 26 | #include <linux/string.h> | ||
| 27 | #include <linux/gpio.h> | ||
| 28 | |||
| 29 | #include <asm/mach/map.h> | ||
| 30 | |||
| 31 | #include <mach/mxs.h> | ||
| 32 | #include <mach/iomux.h> | ||
| 33 | |||
| 34 | /* | ||
| 35 | * configures a single pad in the iomuxer | ||
| 36 | */ | ||
| 37 | int mxs_iomux_setup_pad(iomux_cfg_t pad) | ||
| 38 | { | ||
| 39 | u32 reg, ofs, bp, bm; | ||
| 40 | void __iomem *iomux_base = MXS_IO_ADDRESS(MXS_PINCTRL_BASE_ADDR); | ||
| 41 | |||
| 42 | /* muxsel */ | ||
| 43 | ofs = 0x100; | ||
| 44 | ofs += PAD_BANK(pad) * 0x20 + PAD_PIN(pad) / 16 * 0x10; | ||
| 45 | bp = PAD_PIN(pad) % 16 * 2; | ||
| 46 | bm = 0x3 << bp; | ||
| 47 | reg = __raw_readl(iomux_base + ofs); | ||
| 48 | reg &= ~bm; | ||
| 49 | reg |= PAD_MUXSEL(pad) << bp; | ||
| 50 | __raw_writel(reg, iomux_base + ofs); | ||
| 51 | |||
| 52 | /* drive */ | ||
| 53 | ofs = cpu_is_mx23() ? 0x200 : 0x300; | ||
| 54 | ofs += PAD_BANK(pad) * 0x40 + PAD_PIN(pad) / 8 * 0x10; | ||
| 55 | /* mA */ | ||
| 56 | if (PAD_MA_VALID(pad)) { | ||
| 57 | bp = PAD_PIN(pad) % 8 * 4; | ||
| 58 | bm = 0x3 << bp; | ||
| 59 | reg = __raw_readl(iomux_base + ofs); | ||
| 60 | reg &= ~bm; | ||
| 61 | reg |= PAD_MA(pad) << bp; | ||
| 62 | __raw_writel(reg, iomux_base + ofs); | ||
| 63 | } | ||
| 64 | /* vol */ | ||
| 65 | if (PAD_VOL_VALID(pad)) { | ||
| 66 | bp = PAD_PIN(pad) % 8 * 4 + 2; | ||
| 67 | if (PAD_VOL(pad)) | ||
| 68 | __mxs_setl(1 << bp, iomux_base + ofs); | ||
| 69 | else | ||
| 70 | __mxs_clrl(1 << bp, iomux_base + ofs); | ||
| 71 | } | ||
| 72 | |||
| 73 | /* pull */ | ||
| 74 | if (PAD_PULL_VALID(pad)) { | ||
| 75 | ofs = cpu_is_mx23() ? 0x400 : 0x600; | ||
| 76 | ofs += PAD_BANK(pad) * 0x10; | ||
| 77 | bp = PAD_PIN(pad); | ||
| 78 | if (PAD_PULL(pad)) | ||
| 79 | __mxs_setl(1 << bp, iomux_base + ofs); | ||
| 80 | else | ||
| 81 | __mxs_clrl(1 << bp, iomux_base + ofs); | ||
| 82 | } | ||
| 83 | |||
| 84 | return 0; | ||
| 85 | } | ||
| 86 | |||
| 87 | int mxs_iomux_setup_multiple_pads(const iomux_cfg_t *pad_list, unsigned count) | ||
| 88 | { | ||
| 89 | const iomux_cfg_t *p = pad_list; | ||
| 90 | int i; | ||
| 91 | int ret; | ||
| 92 | |||
| 93 | for (i = 0; i < count; i++) { | ||
| 94 | ret = mxs_iomux_setup_pad(*p); | ||
| 95 | if (ret) | ||
| 96 | return ret; | ||
| 97 | p++; | ||
| 98 | } | ||
| 99 | |||
| 100 | return 0; | ||
| 101 | } | ||
diff --git a/arch/arm/mach-mxs/mach-apx4devkit.c b/arch/arm/mach-mxs/mach-apx4devkit.c deleted file mode 100644 index f5f061757deb..000000000000 --- a/arch/arm/mach-mxs/mach-apx4devkit.c +++ /dev/null | |||
| @@ -1,273 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2011-2012 | ||
| 3 | * Lauri Hintsala, Bluegiga, <lauri.hintsala@bluegiga.com> | ||
| 4 | * Veli-Pekka Peltola, Bluegiga, <veli-pekka.peltola@bluegiga.com> | ||
| 5 | * | ||
| 6 | * based on: mach-mx28evk.c | ||
| 7 | * Copyright 2010 Freescale Semiconductor, Inc. All Rights Reserved. | ||
| 8 | * | ||
| 9 | * This program is free software; you can redistribute it and/or modify | ||
| 10 | * it under the terms of the GNU General Public License as published by | ||
| 11 | * the Free Software Foundation; either version 2 of the License, or | ||
| 12 | * (at your option) any later version. | ||
| 13 | * | ||
| 14 | * This program is distributed in the hope that it will be useful, | ||
| 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 17 | * GNU General Public License for more details. | ||
| 18 | */ | ||
| 19 | |||
| 20 | #include <linux/delay.h> | ||
| 21 | #include <linux/platform_device.h> | ||
| 22 | #include <linux/gpio.h> | ||
| 23 | #include <linux/leds.h> | ||
| 24 | #include <linux/clk.h> | ||
| 25 | #include <linux/i2c.h> | ||
| 26 | #include <linux/regulator/machine.h> | ||
| 27 | #include <linux/regulator/fixed.h> | ||
| 28 | #include <linux/micrel_phy.h> | ||
| 29 | |||
| 30 | #include <asm/mach-types.h> | ||
| 31 | #include <asm/mach/arch.h> | ||
| 32 | #include <asm/mach/time.h> | ||
| 33 | |||
| 34 | #include <mach/common.h> | ||
| 35 | #include <mach/digctl.h> | ||
| 36 | #include <mach/iomux-mx28.h> | ||
| 37 | |||
| 38 | #include "devices-mx28.h" | ||
| 39 | |||
| 40 | #define APX4DEVKIT_GPIO_USERLED MXS_GPIO_NR(3, 28) | ||
| 41 | |||
| 42 | static const iomux_cfg_t apx4devkit_pads[] __initconst = { | ||
| 43 | /* duart */ | ||
| 44 | MX28_PAD_PWM0__DUART_RX | MXS_PAD_CTRL, | ||
| 45 | MX28_PAD_PWM1__DUART_TX | MXS_PAD_CTRL, | ||
| 46 | |||
| 47 | /* auart0 */ | ||
| 48 | MX28_PAD_AUART0_RX__AUART0_RX | MXS_PAD_CTRL, | ||
| 49 | MX28_PAD_AUART0_TX__AUART0_TX | MXS_PAD_CTRL, | ||
| 50 | MX28_PAD_AUART0_CTS__AUART0_CTS | MXS_PAD_CTRL, | ||
| 51 | MX28_PAD_AUART0_RTS__AUART0_RTS | MXS_PAD_CTRL, | ||
| 52 | |||
| 53 | /* auart1 */ | ||
| 54 | MX28_PAD_AUART1_RX__AUART1_RX | MXS_PAD_CTRL, | ||
| 55 | MX28_PAD_AUART1_TX__AUART1_TX | MXS_PAD_CTRL, | ||
| 56 | |||
| 57 | /* auart2 */ | ||
| 58 | MX28_PAD_SSP2_SCK__AUART2_RX | MXS_PAD_CTRL, | ||
| 59 | MX28_PAD_SSP2_MOSI__AUART2_TX | MXS_PAD_CTRL, | ||
| 60 | |||
| 61 | /* auart3 */ | ||
| 62 | MX28_PAD_SSP2_MISO__AUART3_RX | MXS_PAD_CTRL, | ||
| 63 | MX28_PAD_SSP2_SS0__AUART3_TX | MXS_PAD_CTRL, | ||
| 64 | |||
| 65 | #define MXS_PAD_FEC (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP) | ||
| 66 | /* fec0 */ | ||
| 67 | MX28_PAD_ENET0_MDC__ENET0_MDC | MXS_PAD_FEC, | ||
| 68 | MX28_PAD_ENET0_MDIO__ENET0_MDIO | MXS_PAD_FEC, | ||
| 69 | MX28_PAD_ENET0_RX_EN__ENET0_RX_EN | MXS_PAD_FEC, | ||
| 70 | MX28_PAD_ENET0_RXD0__ENET0_RXD0 | MXS_PAD_FEC, | ||
| 71 | MX28_PAD_ENET0_RXD1__ENET0_RXD1 | MXS_PAD_FEC, | ||
| 72 | MX28_PAD_ENET0_TX_EN__ENET0_TX_EN | MXS_PAD_FEC, | ||
| 73 | MX28_PAD_ENET0_TXD0__ENET0_TXD0 | MXS_PAD_FEC, | ||
| 74 | MX28_PAD_ENET0_TXD1__ENET0_TXD1 | MXS_PAD_FEC, | ||
| 75 | MX28_PAD_ENET_CLK__CLKCTRL_ENET | MXS_PAD_FEC, | ||
| 76 | |||
| 77 | /* i2c */ | ||
| 78 | MX28_PAD_I2C0_SCL__I2C0_SCL, | ||
| 79 | MX28_PAD_I2C0_SDA__I2C0_SDA, | ||
| 80 | |||
| 81 | /* mmc0 */ | ||
| 82 | MX28_PAD_SSP0_DATA0__SSP0_D0 | | ||
| 83 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
| 84 | MX28_PAD_SSP0_DATA1__SSP0_D1 | | ||
| 85 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
| 86 | MX28_PAD_SSP0_DATA2__SSP0_D2 | | ||
| 87 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
| 88 | MX28_PAD_SSP0_DATA3__SSP0_D3 | | ||
| 89 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
| 90 | MX28_PAD_SSP0_DATA4__SSP0_D4 | | ||
| 91 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
| 92 | MX28_PAD_SSP0_DATA5__SSP0_D5 | | ||
| 93 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
| 94 | MX28_PAD_SSP0_DATA6__SSP0_D6 | | ||
| 95 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
| 96 | MX28_PAD_SSP0_DATA7__SSP0_D7 | | ||
| 97 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
| 98 | MX28_PAD_SSP0_CMD__SSP0_CMD | | ||
| 99 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
| 100 | MX28_PAD_SSP0_DETECT__SSP0_CARD_DETECT | | ||
| 101 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_NOPULL), | ||
| 102 | MX28_PAD_SSP0_SCK__SSP0_SCK | | ||
| 103 | (MXS_PAD_12MA | MXS_PAD_3V3 | MXS_PAD_NOPULL), | ||
| 104 | |||
| 105 | /* led */ | ||
| 106 | MX28_PAD_PWM3__GPIO_3_28 | MXS_PAD_CTRL, | ||
| 107 | |||
| 108 | /* saif0 & saif1 */ | ||
| 109 | MX28_PAD_SAIF0_MCLK__SAIF0_MCLK | | ||
| 110 | (MXS_PAD_12MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
| 111 | MX28_PAD_SAIF0_LRCLK__SAIF0_LRCLK | | ||
| 112 | (MXS_PAD_12MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
| 113 | MX28_PAD_SAIF0_BITCLK__SAIF0_BITCLK | | ||
| 114 | (MXS_PAD_12MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
| 115 | MX28_PAD_SAIF0_SDATA0__SAIF0_SDATA0 | | ||
| 116 | (MXS_PAD_12MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
| 117 | MX28_PAD_SAIF1_SDATA0__SAIF1_SDATA0 | | ||
| 118 | (MXS_PAD_12MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
| 119 | }; | ||
| 120 | |||
| 121 | /* led */ | ||
| 122 | static const struct gpio_led apx4devkit_leds[] __initconst = { | ||
| 123 | { | ||
| 124 | .name = "user-led", | ||
| 125 | .default_trigger = "heartbeat", | ||
| 126 | .gpio = APX4DEVKIT_GPIO_USERLED, | ||
| 127 | }, | ||
| 128 | }; | ||
| 129 | |||
| 130 | static const struct gpio_led_platform_data apx4devkit_led_data __initconst = { | ||
| 131 | .leds = apx4devkit_leds, | ||
| 132 | .num_leds = ARRAY_SIZE(apx4devkit_leds), | ||
| 133 | }; | ||
| 134 | |||
| 135 | static const struct fec_platform_data mx28_fec_pdata __initconst = { | ||
| 136 | .phy = PHY_INTERFACE_MODE_RMII, | ||
| 137 | }; | ||
| 138 | |||
| 139 | static const struct mxs_mmc_platform_data apx4devkit_mmc_pdata __initconst = { | ||
| 140 | .wp_gpio = -EINVAL, | ||
| 141 | .flags = SLOTF_4_BIT_CAPABLE, | ||
| 142 | }; | ||
| 143 | |||
| 144 | static const struct i2c_board_info apx4devkit_i2c_boardinfo[] __initconst = { | ||
| 145 | { I2C_BOARD_INFO("sgtl5000", 0x0a) }, /* ASoC */ | ||
| 146 | { I2C_BOARD_INFO("pcf8563", 0x51) }, /* RTC */ | ||
| 147 | }; | ||
| 148 | |||
| 149 | #if defined(CONFIG_REGULATOR_FIXED_VOLTAGE) || \ | ||
| 150 | defined(CONFIG_REGULATOR_FIXED_VOLTAGE_MODULE) | ||
| 151 | static struct regulator_consumer_supply apx4devkit_audio_consumer_supplies[] = { | ||
| 152 | REGULATOR_SUPPLY("VDDA", "0-000a"), | ||
| 153 | REGULATOR_SUPPLY("VDDIO", "0-000a"), | ||
| 154 | }; | ||
| 155 | |||
| 156 | static struct regulator_init_data apx4devkit_vdd_reg_init_data = { | ||
| 157 | .constraints = { | ||
| 158 | .name = "3V3", | ||
| 159 | .always_on = 1, | ||
| 160 | }, | ||
| 161 | .consumer_supplies = apx4devkit_audio_consumer_supplies, | ||
| 162 | .num_consumer_supplies = ARRAY_SIZE(apx4devkit_audio_consumer_supplies), | ||
| 163 | }; | ||
| 164 | |||
| 165 | static struct fixed_voltage_config apx4devkit_vdd_pdata = { | ||
| 166 | .supply_name = "board-3V3", | ||
| 167 | .microvolts = 3300000, | ||
| 168 | .gpio = -EINVAL, | ||
| 169 | .enabled_at_boot = 1, | ||
| 170 | .init_data = &apx4devkit_vdd_reg_init_data, | ||
| 171 | }; | ||
| 172 | |||
| 173 | static struct platform_device apx4devkit_voltage_regulator = { | ||
| 174 | .name = "reg-fixed-voltage", | ||
| 175 | .id = -1, | ||
| 176 | .num_resources = 0, | ||
| 177 | .dev = { | ||
| 178 | .platform_data = &apx4devkit_vdd_pdata, | ||
| 179 | }, | ||
| 180 | }; | ||
| 181 | |||
| 182 | static void __init apx4devkit_add_regulators(void) | ||
| 183 | { | ||
| 184 | platform_device_register(&apx4devkit_voltage_regulator); | ||
| 185 | } | ||
| 186 | #else | ||
| 187 | static void __init apx4devkit_add_regulators(void) {} | ||
| 188 | #endif | ||
| 189 | |||
| 190 | static const struct mxs_saif_platform_data | ||
| 191 | apx4devkit_mxs_saif_pdata[] __initconst = { | ||
| 192 | /* working on EXTMSTR0 mode (saif0 master, saif1 slave) */ | ||
| 193 | { | ||
| 194 | .master_mode = 1, | ||
| 195 | .master_id = 0, | ||
| 196 | }, { | ||
| 197 | .master_mode = 0, | ||
| 198 | .master_id = 0, | ||
| 199 | }, | ||
| 200 | }; | ||
| 201 | |||
| 202 | static int apx4devkit_phy_fixup(struct phy_device *phy) | ||
| 203 | { | ||
| 204 | phy->dev_flags |= MICREL_PHY_50MHZ_CLK; | ||
| 205 | return 0; | ||
| 206 | } | ||
| 207 | |||
| 208 | static void __init apx4devkit_fec_phy_clk_enable(void) | ||
| 209 | { | ||
| 210 | struct clk *clk; | ||
| 211 | |||
| 212 | /* Enable fec phy clock */ | ||
| 213 | clk = clk_get_sys("enet_out", NULL); | ||
| 214 | if (!IS_ERR(clk)) | ||
| 215 | clk_prepare_enable(clk); | ||
| 216 | } | ||
| 217 | |||
| 218 | static void __init apx4devkit_init(void) | ||
| 219 | { | ||
| 220 | mx28_soc_init(); | ||
| 221 | |||
| 222 | mxs_iomux_setup_multiple_pads(apx4devkit_pads, | ||
| 223 | ARRAY_SIZE(apx4devkit_pads)); | ||
| 224 | |||
| 225 | mx28_add_duart(); | ||
| 226 | mx28_add_auart0(); | ||
| 227 | mx28_add_auart1(); | ||
| 228 | mx28_add_auart2(); | ||
| 229 | mx28_add_auart3(); | ||
| 230 | |||
| 231 | /* | ||
| 232 | * Register fixup for the Micrel KS8031 PHY clock | ||
| 233 | * (shares same ID with KS8051) | ||
| 234 | */ | ||
| 235 | phy_register_fixup_for_uid(PHY_ID_KS8051, MICREL_PHY_ID_MASK, | ||
| 236 | apx4devkit_phy_fixup); | ||
| 237 | |||
| 238 | apx4devkit_fec_phy_clk_enable(); | ||
| 239 | mx28_add_fec(0, &mx28_fec_pdata); | ||
| 240 | |||
| 241 | mx28_add_mxs_mmc(0, &apx4devkit_mmc_pdata); | ||
| 242 | |||
| 243 | gpio_led_register_device(0, &apx4devkit_led_data); | ||
| 244 | |||
| 245 | mxs_saif_clkmux_select(MXS_DIGCTL_SAIF_CLKMUX_EXTMSTR0); | ||
| 246 | mx28_add_saif(0, &apx4devkit_mxs_saif_pdata[0]); | ||
| 247 | mx28_add_saif(1, &apx4devkit_mxs_saif_pdata[1]); | ||
| 248 | |||
| 249 | apx4devkit_add_regulators(); | ||
| 250 | |||
| 251 | mx28_add_mxs_i2c(0); | ||
| 252 | i2c_register_board_info(0, apx4devkit_i2c_boardinfo, | ||
| 253 | ARRAY_SIZE(apx4devkit_i2c_boardinfo)); | ||
| 254 | |||
| 255 | mxs_add_platform_device("mxs-sgtl5000", 0, NULL, 0, NULL, 0); | ||
| 256 | } | ||
| 257 | |||
| 258 | static void __init apx4devkit_timer_init(void) | ||
| 259 | { | ||
| 260 | mx28_clocks_init(); | ||
| 261 | } | ||
| 262 | |||
| 263 | static struct sys_timer apx4devkit_timer = { | ||
| 264 | .init = apx4devkit_timer_init, | ||
| 265 | }; | ||
| 266 | |||
| 267 | MACHINE_START(APX4DEVKIT, "Bluegiga APX4 Development Kit") | ||
| 268 | .map_io = mx28_map_io, | ||
| 269 | .init_irq = mx28_init_irq, | ||
| 270 | .timer = &apx4devkit_timer, | ||
| 271 | .init_machine = apx4devkit_init, | ||
| 272 | .restart = mxs_restart, | ||
| 273 | MACHINE_END | ||
diff --git a/arch/arm/mach-mxs/mach-m28evk.c b/arch/arm/mach-mxs/mach-m28evk.c deleted file mode 100644 index 4c00c879b893..000000000000 --- a/arch/arm/mach-mxs/mach-m28evk.c +++ /dev/null | |||
| @@ -1,366 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2011 | ||
| 3 | * Stefano Babic, DENX Software Engineering, <sbabic@denx.de> | ||
| 4 | * | ||
| 5 | * based on: mach-mx28_evk.c | ||
| 6 | * Copyright 2010 Freescale Semiconductor, Inc. All Rights Reserved. | ||
| 7 | * | ||
| 8 | * This program is free software; you can redistribute it and/or modify | ||
| 9 | * it under the terms of the GNU General Public License as published by | ||
| 10 | * the Free Software Foundation; either version 2 of the License, or | ||
| 11 | * (at your option) any later version. | ||
| 12 | * | ||
| 13 | * This program is distributed in the hope that it will be useful, | ||
| 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 16 | * GNU General Public License for more details. | ||
| 17 | */ | ||
| 18 | |||
| 19 | #include <linux/delay.h> | ||
| 20 | #include <linux/platform_device.h> | ||
| 21 | #include <linux/gpio.h> | ||
| 22 | #include <linux/leds.h> | ||
| 23 | #include <linux/irq.h> | ||
| 24 | #include <linux/clk.h> | ||
| 25 | #include <linux/i2c.h> | ||
| 26 | #include <linux/i2c/at24.h> | ||
| 27 | |||
| 28 | #include <asm/mach-types.h> | ||
| 29 | #include <asm/mach/arch.h> | ||
| 30 | #include <asm/mach/time.h> | ||
| 31 | |||
| 32 | #include <mach/common.h> | ||
| 33 | #include <mach/iomux-mx28.h> | ||
| 34 | |||
| 35 | #include "devices-mx28.h" | ||
| 36 | |||
| 37 | #define M28EVK_GPIO_USERLED1 MXS_GPIO_NR(3, 16) | ||
| 38 | #define M28EVK_GPIO_USERLED2 MXS_GPIO_NR(3, 17) | ||
| 39 | |||
| 40 | #define MX28EVK_BL_ENABLE MXS_GPIO_NR(3, 18) | ||
| 41 | #define M28EVK_LCD_ENABLE MXS_GPIO_NR(3, 28) | ||
| 42 | |||
| 43 | #define MX28EVK_MMC0_WRITE_PROTECT MXS_GPIO_NR(2, 12) | ||
| 44 | #define MX28EVK_MMC1_WRITE_PROTECT MXS_GPIO_NR(0, 28) | ||
| 45 | |||
| 46 | static const iomux_cfg_t m28evk_pads[] __initconst = { | ||
| 47 | /* duart */ | ||
| 48 | MX28_PAD_AUART0_CTS__DUART_RX | MXS_PAD_CTRL, | ||
| 49 | MX28_PAD_AUART0_RTS__DUART_TX | MXS_PAD_CTRL, | ||
| 50 | |||
| 51 | /* auart0 */ | ||
| 52 | MX28_PAD_AUART0_RX__AUART0_RX | MXS_PAD_CTRL, | ||
| 53 | MX28_PAD_AUART0_TX__AUART0_TX | MXS_PAD_CTRL, | ||
| 54 | |||
| 55 | /* auart3 */ | ||
| 56 | MX28_PAD_AUART3_RX__AUART3_RX | MXS_PAD_CTRL, | ||
| 57 | MX28_PAD_AUART3_TX__AUART3_TX | MXS_PAD_CTRL, | ||
| 58 | MX28_PAD_AUART3_CTS__AUART3_CTS | MXS_PAD_CTRL, | ||
| 59 | MX28_PAD_AUART3_RTS__AUART3_RTS | MXS_PAD_CTRL, | ||
| 60 | |||
| 61 | #define MXS_PAD_FEC (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP) | ||
| 62 | /* fec0 */ | ||
| 63 | MX28_PAD_ENET0_MDC__ENET0_MDC | MXS_PAD_FEC, | ||
| 64 | MX28_PAD_ENET0_MDIO__ENET0_MDIO | MXS_PAD_FEC, | ||
| 65 | MX28_PAD_ENET0_RX_EN__ENET0_RX_EN | MXS_PAD_FEC, | ||
| 66 | MX28_PAD_ENET0_RXD0__ENET0_RXD0 | MXS_PAD_FEC, | ||
| 67 | MX28_PAD_ENET0_RXD1__ENET0_RXD1 | MXS_PAD_FEC, | ||
| 68 | MX28_PAD_ENET0_TX_EN__ENET0_TX_EN | MXS_PAD_FEC, | ||
| 69 | MX28_PAD_ENET0_TXD0__ENET0_TXD0 | MXS_PAD_FEC, | ||
| 70 | MX28_PAD_ENET0_TXD1__ENET0_TXD1 | MXS_PAD_FEC, | ||
| 71 | MX28_PAD_ENET_CLK__CLKCTRL_ENET | MXS_PAD_FEC, | ||
| 72 | /* fec1 */ | ||
| 73 | MX28_PAD_ENET0_CRS__ENET1_RX_EN | MXS_PAD_FEC, | ||
| 74 | MX28_PAD_ENET0_RXD2__ENET1_RXD0 | MXS_PAD_FEC, | ||
| 75 | MX28_PAD_ENET0_RXD3__ENET1_RXD1 | MXS_PAD_FEC, | ||
| 76 | MX28_PAD_ENET0_COL__ENET1_TX_EN | MXS_PAD_FEC, | ||
| 77 | MX28_PAD_ENET0_TXD2__ENET1_TXD0 | MXS_PAD_FEC, | ||
| 78 | MX28_PAD_ENET0_TXD3__ENET1_TXD1 | MXS_PAD_FEC, | ||
| 79 | |||
| 80 | /* flexcan0 */ | ||
| 81 | MX28_PAD_GPMI_RDY2__CAN0_TX, | ||
| 82 | MX28_PAD_GPMI_RDY3__CAN0_RX, | ||
| 83 | |||
| 84 | /* flexcan1 */ | ||
| 85 | MX28_PAD_GPMI_CE2N__CAN1_TX, | ||
| 86 | MX28_PAD_GPMI_CE3N__CAN1_RX, | ||
| 87 | |||
| 88 | /* I2C */ | ||
| 89 | MX28_PAD_I2C0_SCL__I2C0_SCL, | ||
| 90 | MX28_PAD_I2C0_SDA__I2C0_SDA, | ||
| 91 | |||
| 92 | /* mxsfb (lcdif) */ | ||
| 93 | MX28_PAD_LCD_D00__LCD_D0 | MXS_PAD_CTRL, | ||
| 94 | MX28_PAD_LCD_D01__LCD_D1 | MXS_PAD_CTRL, | ||
| 95 | MX28_PAD_LCD_D02__LCD_D2 | MXS_PAD_CTRL, | ||
| 96 | MX28_PAD_LCD_D03__LCD_D3 | MXS_PAD_CTRL, | ||
| 97 | MX28_PAD_LCD_D04__LCD_D4 | MXS_PAD_CTRL, | ||
| 98 | MX28_PAD_LCD_D05__LCD_D5 | MXS_PAD_CTRL, | ||
| 99 | MX28_PAD_LCD_D06__LCD_D6 | MXS_PAD_CTRL, | ||
| 100 | MX28_PAD_LCD_D07__LCD_D7 | MXS_PAD_CTRL, | ||
| 101 | MX28_PAD_LCD_D08__LCD_D8 | MXS_PAD_CTRL, | ||
| 102 | MX28_PAD_LCD_D09__LCD_D9 | MXS_PAD_CTRL, | ||
| 103 | MX28_PAD_LCD_D10__LCD_D10 | MXS_PAD_CTRL, | ||
| 104 | MX28_PAD_LCD_D11__LCD_D11 | MXS_PAD_CTRL, | ||
| 105 | MX28_PAD_LCD_D12__LCD_D12 | MXS_PAD_CTRL, | ||
| 106 | MX28_PAD_LCD_D13__LCD_D13 | MXS_PAD_CTRL, | ||
| 107 | MX28_PAD_LCD_D14__LCD_D14 | MXS_PAD_CTRL, | ||
| 108 | MX28_PAD_LCD_D15__LCD_D15 | MXS_PAD_CTRL, | ||
| 109 | MX28_PAD_LCD_D16__LCD_D16 | MXS_PAD_CTRL, | ||
| 110 | MX28_PAD_LCD_D17__LCD_D17 | MXS_PAD_CTRL, | ||
| 111 | MX28_PAD_LCD_D18__LCD_D18 | MXS_PAD_CTRL, | ||
| 112 | MX28_PAD_LCD_D19__LCD_D19 | MXS_PAD_CTRL, | ||
| 113 | MX28_PAD_LCD_D20__LCD_D20 | MXS_PAD_CTRL, | ||
| 114 | MX28_PAD_LCD_D21__LCD_D21 | MXS_PAD_CTRL, | ||
| 115 | MX28_PAD_LCD_D22__LCD_D22 | MXS_PAD_CTRL, | ||
| 116 | MX28_PAD_LCD_D23__LCD_D23 | MXS_PAD_CTRL, | ||
| 117 | |||
| 118 | MX28_PAD_LCD_ENABLE__LCD_ENABLE | MXS_PAD_CTRL, | ||
| 119 | MX28_PAD_LCD_DOTCLK__LCD_DOTCLK | MXS_PAD_CTRL, | ||
| 120 | |||
| 121 | /* mmc0 */ | ||
| 122 | MX28_PAD_SSP0_DATA0__SSP0_D0 | | ||
| 123 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
| 124 | MX28_PAD_SSP0_DATA1__SSP0_D1 | | ||
| 125 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
| 126 | MX28_PAD_SSP0_DATA2__SSP0_D2 | | ||
| 127 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
| 128 | MX28_PAD_SSP0_DATA3__SSP0_D3 | | ||
| 129 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
| 130 | MX28_PAD_SSP0_DATA4__SSP0_D4 | | ||
| 131 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
| 132 | MX28_PAD_SSP0_DATA5__SSP0_D5 | | ||
| 133 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
| 134 | MX28_PAD_SSP0_DATA6__SSP0_D6 | | ||
| 135 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
| 136 | MX28_PAD_SSP0_DATA7__SSP0_D7 | | ||
| 137 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
| 138 | MX28_PAD_SSP0_CMD__SSP0_CMD | | ||
| 139 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
| 140 | MX28_PAD_SSP0_DETECT__SSP0_CARD_DETECT | | ||
| 141 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_NOPULL), | ||
| 142 | MX28_PAD_SSP0_SCK__SSP0_SCK | | ||
| 143 | (MXS_PAD_12MA | MXS_PAD_3V3 | MXS_PAD_NOPULL), | ||
| 144 | |||
| 145 | /* mmc1 */ | ||
| 146 | MX28_PAD_GPMI_D00__SSP1_D0 | | ||
| 147 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
| 148 | MX28_PAD_GPMI_D01__SSP1_D1 | | ||
| 149 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
| 150 | MX28_PAD_GPMI_D02__SSP1_D2 | | ||
| 151 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
| 152 | MX28_PAD_GPMI_D03__SSP1_D3 | | ||
| 153 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
| 154 | MX28_PAD_GPMI_D04__SSP1_D4 | | ||
| 155 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
| 156 | MX28_PAD_GPMI_D05__SSP1_D5 | | ||
| 157 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
| 158 | MX28_PAD_GPMI_D06__SSP1_D6 | | ||
| 159 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
| 160 | MX28_PAD_GPMI_D07__SSP1_D7 | | ||
| 161 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
| 162 | MX28_PAD_GPMI_RDY1__SSP1_CMD | | ||
| 163 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
| 164 | MX28_PAD_GPMI_RDY0__SSP1_CARD_DETECT | | ||
| 165 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_NOPULL), | ||
| 166 | MX28_PAD_GPMI_WRN__SSP1_SCK | | ||
| 167 | (MXS_PAD_12MA | MXS_PAD_3V3 | MXS_PAD_NOPULL), | ||
| 168 | /* write protect */ | ||
| 169 | MX28_PAD_GPMI_RESETN__GPIO_0_28 | | ||
| 170 | (MXS_PAD_4MA | MXS_PAD_3V3 | MXS_PAD_NOPULL), | ||
| 171 | /* slot power enable */ | ||
| 172 | MX28_PAD_PWM4__GPIO_3_29 | | ||
| 173 | (MXS_PAD_4MA | MXS_PAD_3V3 | MXS_PAD_NOPULL), | ||
| 174 | |||
| 175 | /* led */ | ||
| 176 | MX28_PAD_PWM0__GPIO_3_16 | MXS_PAD_CTRL, | ||
| 177 | MX28_PAD_PWM1__GPIO_3_17 | MXS_PAD_CTRL, | ||
| 178 | |||
| 179 | /* nand */ | ||
| 180 | MX28_PAD_GPMI_D00__GPMI_D0 | | ||
| 181 | (MXS_PAD_4MA | MXS_PAD_1V8 | MXS_PAD_NOPULL), | ||
| 182 | MX28_PAD_GPMI_D01__GPMI_D1 | | ||
| 183 | (MXS_PAD_4MA | MXS_PAD_1V8 | MXS_PAD_NOPULL), | ||
| 184 | MX28_PAD_GPMI_D02__GPMI_D2 | | ||
| 185 | (MXS_PAD_4MA | MXS_PAD_1V8 | MXS_PAD_NOPULL), | ||
| 186 | MX28_PAD_GPMI_D03__GPMI_D3 | | ||
| 187 | (MXS_PAD_4MA | MXS_PAD_1V8 | MXS_PAD_NOPULL), | ||
| 188 | MX28_PAD_GPMI_D04__GPMI_D4 | | ||
| 189 | (MXS_PAD_4MA | MXS_PAD_1V8 | MXS_PAD_NOPULL), | ||
| 190 | MX28_PAD_GPMI_D05__GPMI_D5 | | ||
| 191 | (MXS_PAD_4MA | MXS_PAD_1V8 | MXS_PAD_NOPULL), | ||
| 192 | MX28_PAD_GPMI_D06__GPMI_D6 | | ||
| 193 | (MXS_PAD_4MA | MXS_PAD_1V8 | MXS_PAD_NOPULL), | ||
| 194 | MX28_PAD_GPMI_D07__GPMI_D7 | | ||
| 195 | (MXS_PAD_4MA | MXS_PAD_1V8 | MXS_PAD_NOPULL), | ||
| 196 | MX28_PAD_GPMI_CE0N__GPMI_CE0N | | ||
| 197 | (MXS_PAD_4MA | MXS_PAD_1V8 | MXS_PAD_NOPULL), | ||
| 198 | MX28_PAD_GPMI_RDY0__GPMI_READY0 | | ||
| 199 | (MXS_PAD_4MA | MXS_PAD_1V8 | MXS_PAD_NOPULL), | ||
| 200 | MX28_PAD_GPMI_RDN__GPMI_RDN | | ||
| 201 | (MXS_PAD_12MA | MXS_PAD_1V8 | MXS_PAD_PULLUP), | ||
| 202 | MX28_PAD_GPMI_WRN__GPMI_WRN | | ||
| 203 | (MXS_PAD_12MA | MXS_PAD_1V8 | MXS_PAD_PULLUP), | ||
| 204 | MX28_PAD_GPMI_ALE__GPMI_ALE | | ||
| 205 | (MXS_PAD_4MA | MXS_PAD_1V8 | MXS_PAD_PULLUP), | ||
| 206 | MX28_PAD_GPMI_CLE__GPMI_CLE | | ||
| 207 | (MXS_PAD_4MA | MXS_PAD_1V8 | MXS_PAD_PULLUP), | ||
| 208 | MX28_PAD_GPMI_RESETN__GPMI_RESETN | | ||
| 209 | (MXS_PAD_12MA | MXS_PAD_1V8 | MXS_PAD_PULLUP), | ||
| 210 | |||
| 211 | /* Backlight */ | ||
| 212 | MX28_PAD_PWM3__GPIO_3_28 | MXS_PAD_CTRL, | ||
| 213 | }; | ||
| 214 | |||
| 215 | /* led */ | ||
| 216 | static const struct gpio_led m28evk_leds[] __initconst = { | ||
| 217 | { | ||
| 218 | .name = "user-led1", | ||
| 219 | .default_trigger = "heartbeat", | ||
| 220 | .gpio = M28EVK_GPIO_USERLED1, | ||
| 221 | }, | ||
| 222 | { | ||
| 223 | .name = "user-led2", | ||
| 224 | .default_trigger = "heartbeat", | ||
| 225 | .gpio = M28EVK_GPIO_USERLED2, | ||
| 226 | }, | ||
| 227 | }; | ||
| 228 | |||
| 229 | static const struct gpio_led_platform_data m28evk_led_data __initconst = { | ||
| 230 | .leds = m28evk_leds, | ||
| 231 | .num_leds = ARRAY_SIZE(m28evk_leds), | ||
| 232 | }; | ||
| 233 | |||
| 234 | static struct fec_platform_data mx28_fec_pdata[] __initdata = { | ||
| 235 | { | ||
| 236 | /* fec0 */ | ||
| 237 | .phy = PHY_INTERFACE_MODE_RMII, | ||
| 238 | }, { | ||
| 239 | /* fec1 */ | ||
| 240 | .phy = PHY_INTERFACE_MODE_RMII, | ||
| 241 | }, | ||
| 242 | }; | ||
| 243 | |||
| 244 | static int __init m28evk_fec_get_mac(void) | ||
| 245 | { | ||
| 246 | int i; | ||
| 247 | u32 val; | ||
| 248 | const u32 *ocotp = mxs_get_ocotp(); | ||
| 249 | |||
| 250 | if (!ocotp) | ||
| 251 | return -ETIMEDOUT; | ||
| 252 | |||
| 253 | /* | ||
| 254 | * OCOTP only stores the last 4 octets for each mac address, | ||
| 255 | * so hard-code DENX OUI (C0:E5:4E) here. | ||
| 256 | */ | ||
| 257 | for (i = 0; i < 2; i++) { | ||
| 258 | val = ocotp[i]; | ||
| 259 | mx28_fec_pdata[i].mac[0] = 0xC0; | ||
| 260 | mx28_fec_pdata[i].mac[1] = 0xE5; | ||
| 261 | mx28_fec_pdata[i].mac[2] = 0x4E; | ||
| 262 | mx28_fec_pdata[i].mac[3] = (val >> 16) & 0xff; | ||
| 263 | mx28_fec_pdata[i].mac[4] = (val >> 8) & 0xff; | ||
| 264 | mx28_fec_pdata[i].mac[5] = (val >> 0) & 0xff; | ||
| 265 | } | ||
| 266 | |||
| 267 | return 0; | ||
| 268 | } | ||
| 269 | |||
| 270 | /* mxsfb (lcdif) */ | ||
| 271 | static struct fb_videomode m28evk_video_modes[] = { | ||
| 272 | { | ||
| 273 | .name = "Ampire AM-800480R2TMQW-T01H", | ||
| 274 | .refresh = 60, | ||
| 275 | .xres = 800, | ||
| 276 | .yres = 480, | ||
| 277 | .pixclock = 30066, /* picosecond (33.26 MHz) */ | ||
| 278 | .left_margin = 0, | ||
| 279 | .right_margin = 256, | ||
| 280 | .upper_margin = 0, | ||
| 281 | .lower_margin = 45, | ||
| 282 | .hsync_len = 1, | ||
| 283 | .vsync_len = 1, | ||
| 284 | .sync = FB_SYNC_DATA_ENABLE_HIGH_ACT, | ||
| 285 | }, | ||
| 286 | }; | ||
| 287 | |||
| 288 | static const struct mxsfb_platform_data m28evk_mxsfb_pdata __initconst = { | ||
| 289 | .mode_list = m28evk_video_modes, | ||
| 290 | .mode_count = ARRAY_SIZE(m28evk_video_modes), | ||
| 291 | .default_bpp = 16, | ||
| 292 | .ld_intf_width = STMLCDIF_18BIT, | ||
| 293 | }; | ||
| 294 | |||
| 295 | static struct at24_platform_data m28evk_eeprom = { | ||
| 296 | .byte_len = 16384, | ||
| 297 | .page_size = 32, | ||
| 298 | .flags = AT24_FLAG_ADDR16, | ||
| 299 | }; | ||
| 300 | |||
| 301 | static struct i2c_board_info m28_stk5v3_i2c_boardinfo[] __initdata = { | ||
| 302 | { | ||
| 303 | I2C_BOARD_INFO("at24", 0x51), /* E0=1, E1=0, E2=0 */ | ||
| 304 | .platform_data = &m28evk_eeprom, | ||
| 305 | }, | ||
| 306 | }; | ||
| 307 | |||
| 308 | static struct mxs_mmc_platform_data m28evk_mmc_pdata[] __initdata = { | ||
| 309 | { | ||
| 310 | /* mmc0 */ | ||
| 311 | .wp_gpio = MX28EVK_MMC0_WRITE_PROTECT, | ||
| 312 | .flags = SLOTF_8_BIT_CAPABLE, | ||
| 313 | }, { | ||
| 314 | /* mmc1 */ | ||
| 315 | .wp_gpio = MX28EVK_MMC1_WRITE_PROTECT, | ||
| 316 | .flags = SLOTF_8_BIT_CAPABLE, | ||
| 317 | }, | ||
| 318 | }; | ||
| 319 | |||
| 320 | static void __init m28evk_init(void) | ||
| 321 | { | ||
| 322 | mx28_soc_init(); | ||
| 323 | |||
| 324 | mxs_iomux_setup_multiple_pads(m28evk_pads, ARRAY_SIZE(m28evk_pads)); | ||
| 325 | |||
| 326 | mx28_add_duart(); | ||
| 327 | mx28_add_auart0(); | ||
| 328 | mx28_add_auart3(); | ||
| 329 | |||
| 330 | if (!m28evk_fec_get_mac()) { | ||
| 331 | mx28_add_fec(0, &mx28_fec_pdata[0]); | ||
| 332 | mx28_add_fec(1, &mx28_fec_pdata[1]); | ||
| 333 | } | ||
| 334 | |||
| 335 | mx28_add_flexcan(0, NULL); | ||
| 336 | mx28_add_flexcan(1, NULL); | ||
| 337 | |||
| 338 | mx28_add_mxsfb(&m28evk_mxsfb_pdata); | ||
| 339 | |||
| 340 | mx28_add_mxs_mmc(0, &m28evk_mmc_pdata[0]); | ||
| 341 | mx28_add_mxs_mmc(1, &m28evk_mmc_pdata[1]); | ||
| 342 | |||
| 343 | gpio_led_register_device(0, &m28evk_led_data); | ||
| 344 | |||
| 345 | /* I2C */ | ||
| 346 | mx28_add_mxs_i2c(0); | ||
| 347 | i2c_register_board_info(0, m28_stk5v3_i2c_boardinfo, | ||
| 348 | ARRAY_SIZE(m28_stk5v3_i2c_boardinfo)); | ||
| 349 | } | ||
| 350 | |||
| 351 | static void __init m28evk_timer_init(void) | ||
| 352 | { | ||
| 353 | mx28_clocks_init(); | ||
| 354 | } | ||
| 355 | |||
| 356 | static struct sys_timer m28evk_timer = { | ||
| 357 | .init = m28evk_timer_init, | ||
| 358 | }; | ||
| 359 | |||
| 360 | MACHINE_START(M28EVK, "DENX M28 EVK") | ||
| 361 | .map_io = mx28_map_io, | ||
| 362 | .init_irq = mx28_init_irq, | ||
| 363 | .timer = &m28evk_timer, | ||
| 364 | .init_machine = m28evk_init, | ||
| 365 | .restart = mxs_restart, | ||
| 366 | MACHINE_END | ||
diff --git a/arch/arm/mach-mxs/mach-mx23evk.c b/arch/arm/mach-mxs/mach-mx23evk.c deleted file mode 100644 index e7272a41939d..000000000000 --- a/arch/arm/mach-mxs/mach-mx23evk.c +++ /dev/null | |||
| @@ -1,190 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Copyright 2010 Freescale Semiconductor, Inc. All Rights Reserved. | ||
| 3 | * | ||
| 4 | * This program is free software; you can redistribute it and/or modify | ||
| 5 | * it under the terms of the GNU General Public License as published by | ||
| 6 | * the Free Software Foundation; either version 2 of the License, or | ||
| 7 | * (at your option) any later version. | ||
| 8 | * | ||
| 9 | * This program is distributed in the hope that it will be useful, | ||
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | * GNU General Public License for more details. | ||
| 13 | */ | ||
| 14 | |||
| 15 | #include <linux/delay.h> | ||
| 16 | #include <linux/platform_device.h> | ||
| 17 | #include <linux/gpio.h> | ||
| 18 | |||
| 19 | #include <asm/mach-types.h> | ||
| 20 | #include <asm/mach/arch.h> | ||
| 21 | #include <asm/mach/time.h> | ||
| 22 | |||
| 23 | #include <mach/common.h> | ||
| 24 | #include <mach/iomux-mx23.h> | ||
| 25 | |||
| 26 | #include "devices-mx23.h" | ||
| 27 | |||
| 28 | #define MX23EVK_LCD_ENABLE MXS_GPIO_NR(1, 18) | ||
| 29 | #define MX23EVK_BL_ENABLE MXS_GPIO_NR(1, 28) | ||
| 30 | #define MX23EVK_MMC0_WRITE_PROTECT MXS_GPIO_NR(1, 30) | ||
| 31 | #define MX23EVK_MMC0_SLOT_POWER MXS_GPIO_NR(1, 29) | ||
| 32 | |||
| 33 | static const iomux_cfg_t mx23evk_pads[] __initconst = { | ||
| 34 | /* duart */ | ||
| 35 | MX23_PAD_PWM0__DUART_RX | MXS_PAD_CTRL, | ||
| 36 | MX23_PAD_PWM1__DUART_TX | MXS_PAD_CTRL, | ||
| 37 | |||
| 38 | /* auart */ | ||
| 39 | MX23_PAD_AUART1_RX__AUART1_RX | MXS_PAD_CTRL, | ||
| 40 | MX23_PAD_AUART1_TX__AUART1_TX | MXS_PAD_CTRL, | ||
| 41 | MX23_PAD_AUART1_CTS__AUART1_CTS | MXS_PAD_CTRL, | ||
| 42 | MX23_PAD_AUART1_RTS__AUART1_RTS | MXS_PAD_CTRL, | ||
| 43 | |||
| 44 | /* mxsfb (lcdif) */ | ||
| 45 | MX23_PAD_LCD_D00__LCD_D00 | MXS_PAD_CTRL, | ||
| 46 | MX23_PAD_LCD_D01__LCD_D01 | MXS_PAD_CTRL, | ||
| 47 | MX23_PAD_LCD_D02__LCD_D02 | MXS_PAD_CTRL, | ||
| 48 | MX23_PAD_LCD_D03__LCD_D03 | MXS_PAD_CTRL, | ||
| 49 | MX23_PAD_LCD_D04__LCD_D04 | MXS_PAD_CTRL, | ||
| 50 | MX23_PAD_LCD_D05__LCD_D05 | MXS_PAD_CTRL, | ||
| 51 | MX23_PAD_LCD_D06__LCD_D06 | MXS_PAD_CTRL, | ||
| 52 | MX23_PAD_LCD_D07__LCD_D07 | MXS_PAD_CTRL, | ||
| 53 | MX23_PAD_LCD_D08__LCD_D08 | MXS_PAD_CTRL, | ||
| 54 | MX23_PAD_LCD_D09__LCD_D09 | MXS_PAD_CTRL, | ||
| 55 | MX23_PAD_LCD_D10__LCD_D10 | MXS_PAD_CTRL, | ||
| 56 | MX23_PAD_LCD_D11__LCD_D11 | MXS_PAD_CTRL, | ||
| 57 | MX23_PAD_LCD_D12__LCD_D12 | MXS_PAD_CTRL, | ||
| 58 | MX23_PAD_LCD_D13__LCD_D13 | MXS_PAD_CTRL, | ||
| 59 | MX23_PAD_LCD_D14__LCD_D14 | MXS_PAD_CTRL, | ||
| 60 | MX23_PAD_LCD_D15__LCD_D15 | MXS_PAD_CTRL, | ||
| 61 | MX23_PAD_LCD_D16__LCD_D16 | MXS_PAD_CTRL, | ||
| 62 | MX23_PAD_LCD_D17__LCD_D17 | MXS_PAD_CTRL, | ||
| 63 | MX23_PAD_GPMI_D08__LCD_D18 | MXS_PAD_CTRL, | ||
| 64 | MX23_PAD_GPMI_D09__LCD_D19 | MXS_PAD_CTRL, | ||
| 65 | MX23_PAD_GPMI_D10__LCD_D20 | MXS_PAD_CTRL, | ||
| 66 | MX23_PAD_GPMI_D11__LCD_D21 | MXS_PAD_CTRL, | ||
| 67 | MX23_PAD_GPMI_D12__LCD_D22 | MXS_PAD_CTRL, | ||
| 68 | MX23_PAD_GPMI_D13__LCD_D23 | MXS_PAD_CTRL, | ||
| 69 | MX23_PAD_LCD_VSYNC__LCD_VSYNC | MXS_PAD_CTRL, | ||
| 70 | MX23_PAD_LCD_HSYNC__LCD_HSYNC | MXS_PAD_CTRL, | ||
| 71 | MX23_PAD_LCD_DOTCK__LCD_DOTCK | MXS_PAD_CTRL, | ||
| 72 | MX23_PAD_LCD_ENABLE__LCD_ENABLE | MXS_PAD_CTRL, | ||
| 73 | /* LCD panel enable */ | ||
| 74 | MX23_PAD_LCD_RESET__GPIO_1_18 | MXS_PAD_CTRL, | ||
| 75 | /* backlight control */ | ||
| 76 | MX23_PAD_PWM2__GPIO_1_28 | MXS_PAD_CTRL, | ||
| 77 | |||
| 78 | /* mmc */ | ||
| 79 | MX23_PAD_SSP1_DATA0__SSP1_DATA0 | | ||
| 80 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
| 81 | MX23_PAD_SSP1_DATA1__SSP1_DATA1 | | ||
| 82 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
| 83 | MX23_PAD_SSP1_DATA2__SSP1_DATA2 | | ||
| 84 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
| 85 | MX23_PAD_SSP1_DATA3__SSP1_DATA3 | | ||
| 86 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
| 87 | MX23_PAD_GPMI_D08__SSP1_DATA4 | | ||
| 88 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
| 89 | MX23_PAD_GPMI_D09__SSP1_DATA5 | | ||
| 90 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
| 91 | MX23_PAD_GPMI_D10__SSP1_DATA6 | | ||
| 92 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
| 93 | MX23_PAD_GPMI_D11__SSP1_DATA7 | | ||
| 94 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
| 95 | MX23_PAD_SSP1_CMD__SSP1_CMD | | ||
| 96 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
| 97 | MX23_PAD_SSP1_DETECT__SSP1_DETECT | | ||
| 98 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_NOPULL), | ||
| 99 | MX23_PAD_SSP1_SCK__SSP1_SCK | | ||
| 100 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_NOPULL), | ||
| 101 | /* write protect */ | ||
| 102 | MX23_PAD_PWM4__GPIO_1_30 | | ||
| 103 | (MXS_PAD_4MA | MXS_PAD_3V3 | MXS_PAD_NOPULL), | ||
| 104 | /* slot power enable */ | ||
| 105 | MX23_PAD_PWM3__GPIO_1_29 | | ||
| 106 | (MXS_PAD_4MA | MXS_PAD_3V3 | MXS_PAD_NOPULL), | ||
| 107 | }; | ||
| 108 | |||
| 109 | /* mxsfb (lcdif) */ | ||
| 110 | static struct fb_videomode mx23evk_video_modes[] = { | ||
| 111 | { | ||
| 112 | .name = "Samsung-LMS430HF02", | ||
| 113 | .refresh = 60, | ||
| 114 | .xres = 480, | ||
| 115 | .yres = 272, | ||
| 116 | .pixclock = 108096, /* picosecond (9.2 MHz) */ | ||
| 117 | .left_margin = 15, | ||
| 118 | .right_margin = 8, | ||
| 119 | .upper_margin = 12, | ||
| 120 | .lower_margin = 4, | ||
| 121 | .hsync_len = 1, | ||
| 122 | .vsync_len = 1, | ||
| 123 | .sync = FB_SYNC_DATA_ENABLE_HIGH_ACT | | ||
| 124 | FB_SYNC_DOTCLK_FAILING_ACT, | ||
| 125 | }, | ||
| 126 | }; | ||
| 127 | |||
| 128 | static const struct mxsfb_platform_data mx23evk_mxsfb_pdata __initconst = { | ||
| 129 | .mode_list = mx23evk_video_modes, | ||
| 130 | .mode_count = ARRAY_SIZE(mx23evk_video_modes), | ||
| 131 | .default_bpp = 32, | ||
| 132 | .ld_intf_width = STMLCDIF_24BIT, | ||
| 133 | }; | ||
| 134 | |||
| 135 | static struct mxs_mmc_platform_data mx23evk_mmc_pdata __initdata = { | ||
| 136 | .wp_gpio = MX23EVK_MMC0_WRITE_PROTECT, | ||
| 137 | .flags = SLOTF_8_BIT_CAPABLE, | ||
| 138 | }; | ||
| 139 | |||
| 140 | static void __init mx23evk_init(void) | ||
| 141 | { | ||
| 142 | int ret; | ||
| 143 | |||
| 144 | mx23_soc_init(); | ||
| 145 | |||
| 146 | mxs_iomux_setup_multiple_pads(mx23evk_pads, ARRAY_SIZE(mx23evk_pads)); | ||
| 147 | |||
| 148 | mx23_add_duart(); | ||
| 149 | mx23_add_auart0(); | ||
| 150 | |||
| 151 | /* power on mmc slot by writing 0 to the gpio */ | ||
| 152 | ret = gpio_request_one(MX23EVK_MMC0_SLOT_POWER, GPIOF_OUT_INIT_LOW, | ||
| 153 | "mmc0-slot-power"); | ||
| 154 | if (ret) | ||
| 155 | pr_warn("failed to request gpio mmc0-slot-power: %d\n", ret); | ||
| 156 | mx23_add_mxs_mmc(0, &mx23evk_mmc_pdata); | ||
| 157 | |||
| 158 | ret = gpio_request_one(MX23EVK_LCD_ENABLE, GPIOF_DIR_OUT, "lcd-enable"); | ||
| 159 | if (ret) | ||
| 160 | pr_warn("failed to request gpio lcd-enable: %d\n", ret); | ||
| 161 | else | ||
| 162 | gpio_set_value(MX23EVK_LCD_ENABLE, 1); | ||
| 163 | |||
| 164 | ret = gpio_request_one(MX23EVK_BL_ENABLE, GPIOF_DIR_OUT, "bl-enable"); | ||
| 165 | if (ret) | ||
| 166 | pr_warn("failed to request gpio bl-enable: %d\n", ret); | ||
| 167 | else | ||
| 168 | gpio_set_value(MX23EVK_BL_ENABLE, 1); | ||
| 169 | |||
| 170 | mx23_add_mxsfb(&mx23evk_mxsfb_pdata); | ||
| 171 | mx23_add_rtc_stmp3xxx(); | ||
| 172 | } | ||
| 173 | |||
| 174 | static void __init mx23evk_timer_init(void) | ||
| 175 | { | ||
| 176 | mx23_clocks_init(); | ||
| 177 | } | ||
| 178 | |||
| 179 | static struct sys_timer mx23evk_timer = { | ||
| 180 | .init = mx23evk_timer_init, | ||
| 181 | }; | ||
| 182 | |||
| 183 | MACHINE_START(MX23EVK, "Freescale MX23 EVK") | ||
| 184 | /* Maintainer: Freescale Semiconductor, Inc. */ | ||
| 185 | .map_io = mx23_map_io, | ||
| 186 | .init_irq = mx23_init_irq, | ||
| 187 | .timer = &mx23evk_timer, | ||
| 188 | .init_machine = mx23evk_init, | ||
| 189 | .restart = mxs_restart, | ||
| 190 | MACHINE_END | ||
diff --git a/arch/arm/mach-mxs/mach-mx28evk.c b/arch/arm/mach-mxs/mach-mx28evk.c deleted file mode 100644 index dafd48e86c8c..000000000000 --- a/arch/arm/mach-mxs/mach-mx28evk.c +++ /dev/null | |||
| @@ -1,477 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Copyright 2010 Freescale Semiconductor, Inc. All Rights Reserved. | ||
| 3 | * | ||
| 4 | * This program is free software; you can redistribute it and/or modify | ||
| 5 | * it under the terms of the GNU General Public License as published by | ||
| 6 | * the Free Software Foundation; either version 2 of the License, or | ||
| 7 | * (at your option) any later version. | ||
| 8 | * | ||
| 9 | * This program is distributed in the hope that it will be useful, | ||
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | * GNU General Public License for more details. | ||
| 13 | */ | ||
| 14 | |||
| 15 | #include <linux/delay.h> | ||
| 16 | #include <linux/platform_device.h> | ||
| 17 | #include <linux/gpio.h> | ||
| 18 | #include <linux/leds.h> | ||
| 19 | #include <linux/clk.h> | ||
| 20 | #include <linux/i2c.h> | ||
| 21 | #include <linux/regulator/machine.h> | ||
| 22 | #include <linux/regulator/fixed.h> | ||
| 23 | |||
| 24 | #include <asm/mach-types.h> | ||
| 25 | #include <asm/mach/arch.h> | ||
| 26 | #include <asm/mach/time.h> | ||
| 27 | |||
| 28 | #include <mach/common.h> | ||
| 29 | #include <mach/iomux-mx28.h> | ||
| 30 | #include <mach/digctl.h> | ||
| 31 | |||
| 32 | #include "devices-mx28.h" | ||
| 33 | |||
| 34 | #define MX28EVK_FLEXCAN_SWITCH MXS_GPIO_NR(2, 13) | ||
| 35 | #define MX28EVK_FEC_PHY_POWER MXS_GPIO_NR(2, 15) | ||
| 36 | #define MX28EVK_GPIO_LED MXS_GPIO_NR(3, 5) | ||
| 37 | #define MX28EVK_BL_ENABLE MXS_GPIO_NR(3, 18) | ||
| 38 | #define MX28EVK_LCD_ENABLE MXS_GPIO_NR(3, 30) | ||
| 39 | #define MX28EVK_FEC_PHY_RESET MXS_GPIO_NR(4, 13) | ||
| 40 | |||
| 41 | #define MX28EVK_MMC0_WRITE_PROTECT MXS_GPIO_NR(2, 12) | ||
| 42 | #define MX28EVK_MMC1_WRITE_PROTECT MXS_GPIO_NR(0, 28) | ||
| 43 | #define MX28EVK_MMC0_SLOT_POWER MXS_GPIO_NR(3, 28) | ||
| 44 | #define MX28EVK_MMC1_SLOT_POWER MXS_GPIO_NR(3, 29) | ||
| 45 | |||
| 46 | static const iomux_cfg_t mx28evk_pads[] __initconst = { | ||
| 47 | /* duart */ | ||
| 48 | MX28_PAD_PWM0__DUART_RX | MXS_PAD_CTRL, | ||
| 49 | MX28_PAD_PWM1__DUART_TX | MXS_PAD_CTRL, | ||
| 50 | |||
| 51 | /* auart0 */ | ||
| 52 | MX28_PAD_AUART0_RX__AUART0_RX | MXS_PAD_CTRL, | ||
| 53 | MX28_PAD_AUART0_TX__AUART0_TX | MXS_PAD_CTRL, | ||
| 54 | MX28_PAD_AUART0_CTS__AUART0_CTS | MXS_PAD_CTRL, | ||
| 55 | MX28_PAD_AUART0_RTS__AUART0_RTS | MXS_PAD_CTRL, | ||
| 56 | /* auart3 */ | ||
| 57 | MX28_PAD_AUART3_RX__AUART3_RX | MXS_PAD_CTRL, | ||
| 58 | MX28_PAD_AUART3_TX__AUART3_TX | MXS_PAD_CTRL, | ||
| 59 | MX28_PAD_AUART3_CTS__AUART3_CTS | MXS_PAD_CTRL, | ||
| 60 | MX28_PAD_AUART3_RTS__AUART3_RTS | MXS_PAD_CTRL, | ||
| 61 | |||
| 62 | #define MXS_PAD_FEC (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP) | ||
| 63 | /* fec0 */ | ||
| 64 | MX28_PAD_ENET0_MDC__ENET0_MDC | MXS_PAD_FEC, | ||
| 65 | MX28_PAD_ENET0_MDIO__ENET0_MDIO | MXS_PAD_FEC, | ||
| 66 | MX28_PAD_ENET0_RX_EN__ENET0_RX_EN | MXS_PAD_FEC, | ||
| 67 | MX28_PAD_ENET0_RXD0__ENET0_RXD0 | MXS_PAD_FEC, | ||
| 68 | MX28_PAD_ENET0_RXD1__ENET0_RXD1 | MXS_PAD_FEC, | ||
| 69 | MX28_PAD_ENET0_TX_EN__ENET0_TX_EN | MXS_PAD_FEC, | ||
| 70 | MX28_PAD_ENET0_TXD0__ENET0_TXD0 | MXS_PAD_FEC, | ||
| 71 | MX28_PAD_ENET0_TXD1__ENET0_TXD1 | MXS_PAD_FEC, | ||
| 72 | MX28_PAD_ENET_CLK__CLKCTRL_ENET | MXS_PAD_FEC, | ||
| 73 | /* fec1 */ | ||
| 74 | MX28_PAD_ENET0_CRS__ENET1_RX_EN | MXS_PAD_FEC, | ||
| 75 | MX28_PAD_ENET0_RXD2__ENET1_RXD0 | MXS_PAD_FEC, | ||
| 76 | MX28_PAD_ENET0_RXD3__ENET1_RXD1 | MXS_PAD_FEC, | ||
| 77 | MX28_PAD_ENET0_COL__ENET1_TX_EN | MXS_PAD_FEC, | ||
| 78 | MX28_PAD_ENET0_TXD2__ENET1_TXD0 | MXS_PAD_FEC, | ||
| 79 | MX28_PAD_ENET0_TXD3__ENET1_TXD1 | MXS_PAD_FEC, | ||
| 80 | /* phy power line */ | ||
| 81 | MX28_PAD_SSP1_DATA3__GPIO_2_15 | MXS_PAD_CTRL, | ||
| 82 | /* phy reset line */ | ||
| 83 | MX28_PAD_ENET0_RX_CLK__GPIO_4_13 | MXS_PAD_CTRL, | ||
| 84 | |||
| 85 | /* flexcan0 */ | ||
| 86 | MX28_PAD_GPMI_RDY2__CAN0_TX, | ||
| 87 | MX28_PAD_GPMI_RDY3__CAN0_RX, | ||
| 88 | /* flexcan1 */ | ||
| 89 | MX28_PAD_GPMI_CE2N__CAN1_TX, | ||
| 90 | MX28_PAD_GPMI_CE3N__CAN1_RX, | ||
| 91 | /* transceiver power control */ | ||
| 92 | MX28_PAD_SSP1_CMD__GPIO_2_13, | ||
| 93 | |||
| 94 | /* mxsfb (lcdif) */ | ||
| 95 | MX28_PAD_LCD_D00__LCD_D0 | MXS_PAD_CTRL, | ||
| 96 | MX28_PAD_LCD_D01__LCD_D1 | MXS_PAD_CTRL, | ||
| 97 | MX28_PAD_LCD_D02__LCD_D2 | MXS_PAD_CTRL, | ||
| 98 | MX28_PAD_LCD_D03__LCD_D3 | MXS_PAD_CTRL, | ||
| 99 | MX28_PAD_LCD_D04__LCD_D4 | MXS_PAD_CTRL, | ||
| 100 | MX28_PAD_LCD_D05__LCD_D5 | MXS_PAD_CTRL, | ||
| 101 | MX28_PAD_LCD_D06__LCD_D6 | MXS_PAD_CTRL, | ||
| 102 | MX28_PAD_LCD_D07__LCD_D7 | MXS_PAD_CTRL, | ||
| 103 | MX28_PAD_LCD_D08__LCD_D8 | MXS_PAD_CTRL, | ||
| 104 | MX28_PAD_LCD_D09__LCD_D9 | MXS_PAD_CTRL, | ||
| 105 | MX28_PAD_LCD_D10__LCD_D10 | MXS_PAD_CTRL, | ||
| 106 | MX28_PAD_LCD_D11__LCD_D11 | MXS_PAD_CTRL, | ||
| 107 | MX28_PAD_LCD_D12__LCD_D12 | MXS_PAD_CTRL, | ||
| 108 | MX28_PAD_LCD_D13__LCD_D13 | MXS_PAD_CTRL, | ||
| 109 | MX28_PAD_LCD_D14__LCD_D14 | MXS_PAD_CTRL, | ||
| 110 | MX28_PAD_LCD_D15__LCD_D15 | MXS_PAD_CTRL, | ||
| 111 | MX28_PAD_LCD_D16__LCD_D16 | MXS_PAD_CTRL, | ||
| 112 | MX28_PAD_LCD_D17__LCD_D17 | MXS_PAD_CTRL, | ||
| 113 | MX28_PAD_LCD_D18__LCD_D18 | MXS_PAD_CTRL, | ||
| 114 | MX28_PAD_LCD_D19__LCD_D19 | MXS_PAD_CTRL, | ||
| 115 | MX28_PAD_LCD_D20__LCD_D20 | MXS_PAD_CTRL, | ||
| 116 | MX28_PAD_LCD_D21__LCD_D21 | MXS_PAD_CTRL, | ||
| 117 | MX28_PAD_LCD_D22__LCD_D22 | MXS_PAD_CTRL, | ||
| 118 | MX28_PAD_LCD_D23__LCD_D23 | MXS_PAD_CTRL, | ||
| 119 | MX28_PAD_LCD_RD_E__LCD_VSYNC | MXS_PAD_CTRL, | ||
| 120 | MX28_PAD_LCD_WR_RWN__LCD_HSYNC | MXS_PAD_CTRL, | ||
| 121 | MX28_PAD_LCD_RS__LCD_DOTCLK | MXS_PAD_CTRL, | ||
| 122 | MX28_PAD_LCD_CS__LCD_ENABLE | MXS_PAD_CTRL, | ||
| 123 | /* LCD panel enable */ | ||
| 124 | MX28_PAD_LCD_RESET__GPIO_3_30 | MXS_PAD_CTRL, | ||
| 125 | /* backlight control */ | ||
| 126 | MX28_PAD_PWM2__GPIO_3_18 | MXS_PAD_CTRL, | ||
| 127 | /* mmc0 */ | ||
| 128 | MX28_PAD_SSP0_DATA0__SSP0_D0 | | ||
| 129 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
| 130 | MX28_PAD_SSP0_DATA1__SSP0_D1 | | ||
| 131 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
| 132 | MX28_PAD_SSP0_DATA2__SSP0_D2 | | ||
| 133 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
| 134 | MX28_PAD_SSP0_DATA3__SSP0_D3 | | ||
| 135 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
| 136 | MX28_PAD_SSP0_DATA4__SSP0_D4 | | ||
| 137 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
| 138 | MX28_PAD_SSP0_DATA5__SSP0_D5 | | ||
| 139 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
| 140 | MX28_PAD_SSP0_DATA6__SSP0_D6 | | ||
| 141 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
| 142 | MX28_PAD_SSP0_DATA7__SSP0_D7 | | ||
| 143 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
| 144 | MX28_PAD_SSP0_CMD__SSP0_CMD | | ||
| 145 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
| 146 | MX28_PAD_SSP0_DETECT__SSP0_CARD_DETECT | | ||
| 147 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_NOPULL), | ||
| 148 | MX28_PAD_SSP0_SCK__SSP0_SCK | | ||
| 149 | (MXS_PAD_12MA | MXS_PAD_3V3 | MXS_PAD_NOPULL), | ||
| 150 | /* write protect */ | ||
| 151 | MX28_PAD_SSP1_SCK__GPIO_2_12 | | ||
| 152 | (MXS_PAD_4MA | MXS_PAD_3V3 | MXS_PAD_NOPULL), | ||
| 153 | /* slot power enable */ | ||
| 154 | MX28_PAD_PWM3__GPIO_3_28 | | ||
| 155 | (MXS_PAD_4MA | MXS_PAD_3V3 | MXS_PAD_NOPULL), | ||
| 156 | |||
| 157 | /* mmc1 */ | ||
| 158 | MX28_PAD_GPMI_D00__SSP1_D0 | | ||
| 159 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
| 160 | MX28_PAD_GPMI_D01__SSP1_D1 | | ||
| 161 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
| 162 | MX28_PAD_GPMI_D02__SSP1_D2 | | ||
| 163 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
| 164 | MX28_PAD_GPMI_D03__SSP1_D3 | | ||
| 165 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
| 166 | MX28_PAD_GPMI_D04__SSP1_D4 | | ||
| 167 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
| 168 | MX28_PAD_GPMI_D05__SSP1_D5 | | ||
| 169 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
| 170 | MX28_PAD_GPMI_D06__SSP1_D6 | | ||
| 171 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
| 172 | MX28_PAD_GPMI_D07__SSP1_D7 | | ||
| 173 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
| 174 | MX28_PAD_GPMI_RDY1__SSP1_CMD | | ||
| 175 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
| 176 | MX28_PAD_GPMI_RDY0__SSP1_CARD_DETECT | | ||
| 177 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_NOPULL), | ||
| 178 | MX28_PAD_GPMI_WRN__SSP1_SCK | | ||
| 179 | (MXS_PAD_12MA | MXS_PAD_3V3 | MXS_PAD_NOPULL), | ||
| 180 | /* write protect */ | ||
| 181 | MX28_PAD_GPMI_RESETN__GPIO_0_28 | | ||
| 182 | (MXS_PAD_4MA | MXS_PAD_3V3 | MXS_PAD_NOPULL), | ||
| 183 | /* slot power enable */ | ||
| 184 | MX28_PAD_PWM4__GPIO_3_29 | | ||
| 185 | (MXS_PAD_4MA | MXS_PAD_3V3 | MXS_PAD_NOPULL), | ||
| 186 | |||
| 187 | /* led */ | ||
| 188 | MX28_PAD_AUART1_TX__GPIO_3_5 | MXS_PAD_CTRL, | ||
| 189 | |||
| 190 | /* I2C */ | ||
| 191 | MX28_PAD_I2C0_SCL__I2C0_SCL | | ||
| 192 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
| 193 | MX28_PAD_I2C0_SDA__I2C0_SDA | | ||
| 194 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
| 195 | |||
| 196 | /* saif0 & saif1 */ | ||
| 197 | MX28_PAD_SAIF0_MCLK__SAIF0_MCLK | | ||
| 198 | (MXS_PAD_12MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
| 199 | MX28_PAD_SAIF0_LRCLK__SAIF0_LRCLK | | ||
| 200 | (MXS_PAD_12MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
| 201 | MX28_PAD_SAIF0_BITCLK__SAIF0_BITCLK | | ||
| 202 | (MXS_PAD_12MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
| 203 | MX28_PAD_SAIF0_SDATA0__SAIF0_SDATA0 | | ||
| 204 | (MXS_PAD_12MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
| 205 | MX28_PAD_SAIF1_SDATA0__SAIF1_SDATA0 | | ||
| 206 | (MXS_PAD_12MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
| 207 | }; | ||
| 208 | |||
| 209 | /* led */ | ||
| 210 | static const struct gpio_led mx28evk_leds[] __initconst = { | ||
| 211 | { | ||
| 212 | .name = "GPIO-LED", | ||
| 213 | .default_trigger = "heartbeat", | ||
| 214 | .gpio = MX28EVK_GPIO_LED, | ||
| 215 | }, | ||
| 216 | }; | ||
| 217 | |||
| 218 | static const struct gpio_led_platform_data mx28evk_led_data __initconst = { | ||
| 219 | .leds = mx28evk_leds, | ||
| 220 | .num_leds = ARRAY_SIZE(mx28evk_leds), | ||
| 221 | }; | ||
| 222 | |||
| 223 | /* fec */ | ||
| 224 | static void __init mx28evk_fec_reset(void) | ||
| 225 | { | ||
| 226 | struct clk *clk; | ||
| 227 | |||
| 228 | /* Enable fec phy clock */ | ||
| 229 | clk = clk_get_sys("enet_out", NULL); | ||
| 230 | if (!IS_ERR(clk)) | ||
| 231 | clk_prepare_enable(clk); | ||
| 232 | |||
| 233 | gpio_set_value(MX28EVK_FEC_PHY_RESET, 0); | ||
| 234 | mdelay(1); | ||
| 235 | gpio_set_value(MX28EVK_FEC_PHY_RESET, 1); | ||
| 236 | } | ||
| 237 | |||
| 238 | static struct fec_platform_data mx28_fec_pdata[] __initdata = { | ||
| 239 | { | ||
| 240 | /* fec0 */ | ||
| 241 | .phy = PHY_INTERFACE_MODE_RMII, | ||
| 242 | }, { | ||
| 243 | /* fec1 */ | ||
| 244 | .phy = PHY_INTERFACE_MODE_RMII, | ||
| 245 | }, | ||
| 246 | }; | ||
| 247 | |||
| 248 | static int __init mx28evk_fec_get_mac(void) | ||
| 249 | { | ||
| 250 | int i; | ||
| 251 | u32 val; | ||
| 252 | const u32 *ocotp = mxs_get_ocotp(); | ||
| 253 | |||
| 254 | if (!ocotp) | ||
| 255 | return -ETIMEDOUT; | ||
| 256 | |||
| 257 | /* | ||
| 258 | * OCOTP only stores the last 4 octets for each mac address, | ||
| 259 | * so hard-code Freescale OUI (00:04:9f) here. | ||
| 260 | */ | ||
| 261 | for (i = 0; i < 2; i++) { | ||
| 262 | val = ocotp[i]; | ||
| 263 | mx28_fec_pdata[i].mac[0] = 0x00; | ||
| 264 | mx28_fec_pdata[i].mac[1] = 0x04; | ||
| 265 | mx28_fec_pdata[i].mac[2] = 0x9f; | ||
| 266 | mx28_fec_pdata[i].mac[3] = (val >> 16) & 0xff; | ||
| 267 | mx28_fec_pdata[i].mac[4] = (val >> 8) & 0xff; | ||
| 268 | mx28_fec_pdata[i].mac[5] = (val >> 0) & 0xff; | ||
| 269 | } | ||
| 270 | |||
| 271 | return 0; | ||
| 272 | } | ||
| 273 | |||
| 274 | /* | ||
| 275 | * MX28EVK_FLEXCAN_SWITCH is shared between both flexcan controllers | ||
| 276 | */ | ||
| 277 | static int flexcan0_en, flexcan1_en; | ||
| 278 | |||
| 279 | static void mx28evk_flexcan_switch(void) | ||
| 280 | { | ||
| 281 | if (flexcan0_en || flexcan1_en) | ||
| 282 | gpio_set_value(MX28EVK_FLEXCAN_SWITCH, 1); | ||
| 283 | else | ||
| 284 | gpio_set_value(MX28EVK_FLEXCAN_SWITCH, 0); | ||
| 285 | } | ||
| 286 | |||
| 287 | static void mx28evk_flexcan0_switch(int enable) | ||
| 288 | { | ||
| 289 | flexcan0_en = enable; | ||
| 290 | mx28evk_flexcan_switch(); | ||
| 291 | } | ||
| 292 | |||
| 293 | static void mx28evk_flexcan1_switch(int enable) | ||
| 294 | { | ||
| 295 | flexcan1_en = enable; | ||
| 296 | mx28evk_flexcan_switch(); | ||
| 297 | } | ||
| 298 | |||
| 299 | static const struct flexcan_platform_data | ||
| 300 | mx28evk_flexcan_pdata[] __initconst = { | ||
| 301 | { | ||
| 302 | .transceiver_switch = mx28evk_flexcan0_switch, | ||
| 303 | }, { | ||
| 304 | .transceiver_switch = mx28evk_flexcan1_switch, | ||
| 305 | } | ||
| 306 | }; | ||
| 307 | |||
| 308 | /* mxsfb (lcdif) */ | ||
| 309 | static struct fb_videomode mx28evk_video_modes[] = { | ||
| 310 | { | ||
| 311 | .name = "Seiko-43WVF1G", | ||
| 312 | .refresh = 60, | ||
| 313 | .xres = 800, | ||
| 314 | .yres = 480, | ||
| 315 | .pixclock = 29851, /* picosecond (33.5 MHz) */ | ||
| 316 | .left_margin = 89, | ||
| 317 | .right_margin = 164, | ||
| 318 | .upper_margin = 23, | ||
| 319 | .lower_margin = 10, | ||
| 320 | .hsync_len = 10, | ||
| 321 | .vsync_len = 10, | ||
| 322 | .sync = FB_SYNC_DATA_ENABLE_HIGH_ACT | | ||
| 323 | FB_SYNC_DOTCLK_FAILING_ACT, | ||
| 324 | }, | ||
| 325 | }; | ||
| 326 | |||
| 327 | static const struct mxsfb_platform_data mx28evk_mxsfb_pdata __initconst = { | ||
| 328 | .mode_list = mx28evk_video_modes, | ||
| 329 | .mode_count = ARRAY_SIZE(mx28evk_video_modes), | ||
| 330 | .default_bpp = 32, | ||
| 331 | .ld_intf_width = STMLCDIF_24BIT, | ||
| 332 | }; | ||
| 333 | |||
| 334 | static struct mxs_mmc_platform_data mx28evk_mmc_pdata[] __initdata = { | ||
| 335 | { | ||
| 336 | /* mmc0 */ | ||
| 337 | .wp_gpio = MX28EVK_MMC0_WRITE_PROTECT, | ||
| 338 | .flags = SLOTF_8_BIT_CAPABLE, | ||
| 339 | }, { | ||
| 340 | /* mmc1 */ | ||
| 341 | .wp_gpio = MX28EVK_MMC1_WRITE_PROTECT, | ||
| 342 | .flags = SLOTF_8_BIT_CAPABLE, | ||
| 343 | }, | ||
| 344 | }; | ||
| 345 | |||
| 346 | static struct i2c_board_info mxs_i2c0_board_info[] __initdata = { | ||
| 347 | { | ||
| 348 | I2C_BOARD_INFO("sgtl5000", 0x0a), | ||
| 349 | }, | ||
| 350 | }; | ||
| 351 | |||
| 352 | #if defined(CONFIG_REGULATOR_FIXED_VOLTAGE) || defined(CONFIG_REGULATOR_FIXED_VOLTAGE_MODULE) | ||
| 353 | static struct regulator_consumer_supply mx28evk_audio_consumer_supplies[] = { | ||
| 354 | REGULATOR_SUPPLY("VDDA", "0-000a"), | ||
| 355 | REGULATOR_SUPPLY("VDDIO", "0-000a"), | ||
| 356 | }; | ||
| 357 | |||
| 358 | static struct regulator_init_data mx28evk_vdd_reg_init_data = { | ||
| 359 | .constraints = { | ||
| 360 | .name = "3V3", | ||
| 361 | .always_on = 1, | ||
| 362 | }, | ||
| 363 | .consumer_supplies = mx28evk_audio_consumer_supplies, | ||
| 364 | .num_consumer_supplies = ARRAY_SIZE(mx28evk_audio_consumer_supplies), | ||
| 365 | }; | ||
| 366 | |||
| 367 | static struct fixed_voltage_config mx28evk_vdd_pdata = { | ||
| 368 | .supply_name = "board-3V3", | ||
| 369 | .microvolts = 3300000, | ||
| 370 | .gpio = -EINVAL, | ||
| 371 | .enabled_at_boot = 1, | ||
| 372 | .init_data = &mx28evk_vdd_reg_init_data, | ||
| 373 | }; | ||
| 374 | static struct platform_device mx28evk_voltage_regulator = { | ||
| 375 | .name = "reg-fixed-voltage", | ||
| 376 | .id = -1, | ||
| 377 | .num_resources = 0, | ||
| 378 | .dev = { | ||
| 379 | .platform_data = &mx28evk_vdd_pdata, | ||
| 380 | }, | ||
| 381 | }; | ||
| 382 | static void __init mx28evk_add_regulators(void) | ||
| 383 | { | ||
| 384 | platform_device_register(&mx28evk_voltage_regulator); | ||
| 385 | } | ||
| 386 | #else | ||
| 387 | static void __init mx28evk_add_regulators(void) {} | ||
| 388 | #endif | ||
| 389 | |||
| 390 | static const struct gpio mx28evk_gpios[] __initconst = { | ||
| 391 | { MX28EVK_LCD_ENABLE, GPIOF_OUT_INIT_HIGH, "lcd-enable" }, | ||
| 392 | { MX28EVK_BL_ENABLE, GPIOF_OUT_INIT_HIGH, "bl-enable" }, | ||
| 393 | { MX28EVK_FLEXCAN_SWITCH, GPIOF_DIR_OUT, "flexcan-switch" }, | ||
| 394 | { MX28EVK_MMC0_SLOT_POWER, GPIOF_OUT_INIT_LOW, "mmc0-slot-power" }, | ||
| 395 | { MX28EVK_MMC1_SLOT_POWER, GPIOF_OUT_INIT_LOW, "mmc1-slot-power" }, | ||
| 396 | { MX28EVK_FEC_PHY_POWER, GPIOF_OUT_INIT_LOW, "fec-phy-power" }, | ||
| 397 | { MX28EVK_FEC_PHY_RESET, GPIOF_DIR_OUT, "fec-phy-reset" }, | ||
| 398 | }; | ||
| 399 | |||
| 400 | static const struct mxs_saif_platform_data | ||
| 401 | mx28evk_mxs_saif_pdata[] __initconst = { | ||
| 402 | /* working on EXTMSTR0 mode (saif0 master, saif1 slave) */ | ||
| 403 | { | ||
| 404 | .master_mode = 1, | ||
| 405 | .master_id = 0, | ||
| 406 | }, { | ||
| 407 | .master_mode = 0, | ||
| 408 | .master_id = 0, | ||
| 409 | }, | ||
| 410 | }; | ||
| 411 | |||
| 412 | static void __init mx28evk_init(void) | ||
| 413 | { | ||
| 414 | int ret; | ||
| 415 | |||
| 416 | mx28_soc_init(); | ||
| 417 | |||
| 418 | mxs_iomux_setup_multiple_pads(mx28evk_pads, ARRAY_SIZE(mx28evk_pads)); | ||
| 419 | |||
| 420 | mx28_add_duart(); | ||
| 421 | mx28_add_auart0(); | ||
| 422 | mx28_add_auart3(); | ||
| 423 | |||
| 424 | if (mx28evk_fec_get_mac()) | ||
| 425 | pr_warn("%s: failed on fec mac setup\n", __func__); | ||
| 426 | |||
| 427 | ret = gpio_request_array(mx28evk_gpios, ARRAY_SIZE(mx28evk_gpios)); | ||
| 428 | if (ret) | ||
| 429 | pr_err("One or more GPIOs failed to be requested: %d\n", ret); | ||
| 430 | |||
| 431 | mx28evk_fec_reset(); | ||
| 432 | mx28_add_fec(0, &mx28_fec_pdata[0]); | ||
| 433 | mx28_add_fec(1, &mx28_fec_pdata[1]); | ||
| 434 | |||
| 435 | mx28_add_flexcan(0, &mx28evk_flexcan_pdata[0]); | ||
| 436 | mx28_add_flexcan(1, &mx28evk_flexcan_pdata[1]); | ||
| 437 | |||
| 438 | mx28_add_mxsfb(&mx28evk_mxsfb_pdata); | ||
| 439 | |||
| 440 | mxs_saif_clkmux_select(MXS_DIGCTL_SAIF_CLKMUX_EXTMSTR0); | ||
| 441 | mx28_add_saif(0, &mx28evk_mxs_saif_pdata[0]); | ||
| 442 | mx28_add_saif(1, &mx28evk_mxs_saif_pdata[1]); | ||
| 443 | |||
| 444 | mx28_add_mxs_i2c(0); | ||
| 445 | i2c_register_board_info(0, mxs_i2c0_board_info, | ||
| 446 | ARRAY_SIZE(mxs_i2c0_board_info)); | ||
| 447 | |||
| 448 | mx28evk_add_regulators(); | ||
| 449 | |||
| 450 | mxs_add_platform_device("mxs-sgtl5000", 0, NULL, 0, | ||
| 451 | NULL, 0); | ||
| 452 | |||
| 453 | mx28_add_mxs_mmc(0, &mx28evk_mmc_pdata[0]); | ||
| 454 | mx28_add_mxs_mmc(1, &mx28evk_mmc_pdata[1]); | ||
| 455 | |||
| 456 | mx28_add_rtc_stmp3xxx(); | ||
| 457 | |||
| 458 | gpio_led_register_device(0, &mx28evk_led_data); | ||
| 459 | } | ||
| 460 | |||
| 461 | static void __init mx28evk_timer_init(void) | ||
| 462 | { | ||
| 463 | mx28_clocks_init(); | ||
| 464 | } | ||
| 465 | |||
| 466 | static struct sys_timer mx28evk_timer = { | ||
| 467 | .init = mx28evk_timer_init, | ||
| 468 | }; | ||
| 469 | |||
| 470 | MACHINE_START(MX28EVK, "Freescale MX28 EVK") | ||
| 471 | /* Maintainer: Freescale Semiconductor, Inc. */ | ||
| 472 | .map_io = mx28_map_io, | ||
| 473 | .init_irq = mx28_init_irq, | ||
| 474 | .timer = &mx28evk_timer, | ||
| 475 | .init_machine = mx28evk_init, | ||
| 476 | .restart = mxs_restart, | ||
| 477 | MACHINE_END | ||
diff --git a/arch/arm/mach-mxs/mach-mxs.c b/arch/arm/mach-mxs/mach-mxs.c index 8dabfe81d07c..433af893ad8a 100644 --- a/arch/arm/mach-mxs/mach-mxs.c +++ b/arch/arm/mach-mxs/mach-mxs.c | |||
| @@ -12,8 +12,10 @@ | |||
| 12 | 12 | ||
| 13 | #include <linux/clk.h> | 13 | #include <linux/clk.h> |
| 14 | #include <linux/clkdev.h> | 14 | #include <linux/clkdev.h> |
| 15 | #include <linux/can/platform/flexcan.h> | ||
| 16 | #include <linux/delay.h> | ||
| 15 | #include <linux/err.h> | 17 | #include <linux/err.h> |
| 16 | #include <linux/init.h> | 18 | #include <linux/gpio.h> |
| 17 | #include <linux/init.h> | 19 | #include <linux/init.h> |
| 18 | #include <linux/irqdomain.h> | 20 | #include <linux/irqdomain.h> |
| 19 | #include <linux/micrel_phy.h> | 21 | #include <linux/micrel_phy.h> |
| @@ -21,9 +23,12 @@ | |||
| 21 | #include <linux/of_irq.h> | 23 | #include <linux/of_irq.h> |
| 22 | #include <linux/of_platform.h> | 24 | #include <linux/of_platform.h> |
| 23 | #include <linux/phy.h> | 25 | #include <linux/phy.h> |
| 26 | #include <linux/pinctrl/consumer.h> | ||
| 24 | #include <asm/mach/arch.h> | 27 | #include <asm/mach/arch.h> |
| 25 | #include <asm/mach/time.h> | 28 | #include <asm/mach/time.h> |
| 26 | #include <mach/common.h> | 29 | #include <mach/common.h> |
| 30 | #include <mach/digctl.h> | ||
| 31 | #include <mach/mxs.h> | ||
| 27 | 32 | ||
| 28 | static struct fb_videomode mx23evk_video_modes[] = { | 33 | static struct fb_videomode mx23evk_video_modes[] = { |
| 29 | { | 34 | { |
| @@ -99,9 +104,40 @@ static struct fb_videomode apx4devkit_video_modes[] = { | |||
| 99 | 104 | ||
| 100 | static struct mxsfb_platform_data mxsfb_pdata __initdata; | 105 | static struct mxsfb_platform_data mxsfb_pdata __initdata; |
| 101 | 106 | ||
| 107 | /* | ||
| 108 | * MX28EVK_FLEXCAN_SWITCH is shared between both flexcan controllers | ||
| 109 | */ | ||
| 110 | #define MX28EVK_FLEXCAN_SWITCH MXS_GPIO_NR(2, 13) | ||
| 111 | |||
| 112 | static int flexcan0_en, flexcan1_en; | ||
| 113 | |||
| 114 | static void mx28evk_flexcan_switch(void) | ||
| 115 | { | ||
| 116 | if (flexcan0_en || flexcan1_en) | ||
| 117 | gpio_set_value(MX28EVK_FLEXCAN_SWITCH, 1); | ||
| 118 | else | ||
| 119 | gpio_set_value(MX28EVK_FLEXCAN_SWITCH, 0); | ||
| 120 | } | ||
| 121 | |||
| 122 | static void mx28evk_flexcan0_switch(int enable) | ||
| 123 | { | ||
| 124 | flexcan0_en = enable; | ||
| 125 | mx28evk_flexcan_switch(); | ||
| 126 | } | ||
| 127 | |||
| 128 | static void mx28evk_flexcan1_switch(int enable) | ||
| 129 | { | ||
| 130 | flexcan1_en = enable; | ||
| 131 | mx28evk_flexcan_switch(); | ||
| 132 | } | ||
| 133 | |||
| 134 | static struct flexcan_platform_data flexcan_pdata[2]; | ||
| 135 | |||
| 102 | static struct of_dev_auxdata mxs_auxdata_lookup[] __initdata = { | 136 | static struct of_dev_auxdata mxs_auxdata_lookup[] __initdata = { |
| 103 | OF_DEV_AUXDATA("fsl,imx23-lcdif", 0x80030000, NULL, &mxsfb_pdata), | 137 | OF_DEV_AUXDATA("fsl,imx23-lcdif", 0x80030000, NULL, &mxsfb_pdata), |
| 104 | OF_DEV_AUXDATA("fsl,imx28-lcdif", 0x80030000, NULL, &mxsfb_pdata), | 138 | OF_DEV_AUXDATA("fsl,imx28-lcdif", 0x80030000, NULL, &mxsfb_pdata), |
| 139 | OF_DEV_AUXDATA("fsl,imx28-flexcan", 0x80032000, NULL, &flexcan_pdata[0]), | ||
| 140 | OF_DEV_AUXDATA("fsl,imx28-flexcan", 0x80034000, NULL, &flexcan_pdata[1]), | ||
| 105 | { /* sentinel */ } | 141 | { /* sentinel */ } |
| 106 | }; | 142 | }; |
| 107 | 143 | ||
| @@ -237,13 +273,21 @@ static void __init imx28_evk_init(void) | |||
| 237 | mxsfb_pdata.mode_count = ARRAY_SIZE(mx28evk_video_modes); | 273 | mxsfb_pdata.mode_count = ARRAY_SIZE(mx28evk_video_modes); |
| 238 | mxsfb_pdata.default_bpp = 32; | 274 | mxsfb_pdata.default_bpp = 32; |
| 239 | mxsfb_pdata.ld_intf_width = STMLCDIF_24BIT; | 275 | mxsfb_pdata.ld_intf_width = STMLCDIF_24BIT; |
| 276 | |||
| 277 | mxs_saif_clkmux_select(MXS_DIGCTL_SAIF_CLKMUX_EXTMSTR0); | ||
| 240 | } | 278 | } |
| 241 | 279 | ||
| 242 | static void __init m28evk_init(void) | 280 | static void __init imx28_evk_post_init(void) |
| 243 | { | 281 | { |
| 244 | enable_clk_enet_out(); | 282 | if (!gpio_request_one(MX28EVK_FLEXCAN_SWITCH, GPIOF_DIR_OUT, |
| 245 | update_fec_mac_prop(OUI_DENX); | 283 | "flexcan-switch")) { |
| 284 | flexcan_pdata[0].transceiver_switch = mx28evk_flexcan0_switch; | ||
| 285 | flexcan_pdata[1].transceiver_switch = mx28evk_flexcan1_switch; | ||
| 286 | } | ||
| 287 | } | ||
| 246 | 288 | ||
| 289 | static void __init m28evk_init(void) | ||
| 290 | { | ||
| 247 | mxsfb_pdata.mode_list = m28evk_video_modes; | 291 | mxsfb_pdata.mode_list = m28evk_video_modes; |
| 248 | mxsfb_pdata.mode_count = ARRAY_SIZE(m28evk_video_modes); | 292 | mxsfb_pdata.mode_count = ARRAY_SIZE(m28evk_video_modes); |
| 249 | mxsfb_pdata.default_bpp = 16; | 293 | mxsfb_pdata.default_bpp = 16; |
| @@ -270,6 +314,80 @@ static void __init apx4devkit_init(void) | |||
| 270 | mxsfb_pdata.ld_intf_width = STMLCDIF_24BIT; | 314 | mxsfb_pdata.ld_intf_width = STMLCDIF_24BIT; |
| 271 | } | 315 | } |
| 272 | 316 | ||
| 317 | #define ENET0_MDC__GPIO_4_0 MXS_GPIO_NR(4, 0) | ||
| 318 | #define ENET0_MDIO__GPIO_4_1 MXS_GPIO_NR(4, 1) | ||
| 319 | #define ENET0_RX_EN__GPIO_4_2 MXS_GPIO_NR(4, 2) | ||
| 320 | #define ENET0_RXD0__GPIO_4_3 MXS_GPIO_NR(4, 3) | ||
| 321 | #define ENET0_RXD1__GPIO_4_4 MXS_GPIO_NR(4, 4) | ||
| 322 | #define ENET0_TX_EN__GPIO_4_6 MXS_GPIO_NR(4, 6) | ||
| 323 | #define ENET0_TXD0__GPIO_4_7 MXS_GPIO_NR(4, 7) | ||
| 324 | #define ENET0_TXD1__GPIO_4_8 MXS_GPIO_NR(4, 8) | ||
| 325 | #define ENET_CLK__GPIO_4_16 MXS_GPIO_NR(4, 16) | ||
| 326 | |||
| 327 | #define TX28_FEC_PHY_POWER MXS_GPIO_NR(3, 29) | ||
| 328 | #define TX28_FEC_PHY_RESET MXS_GPIO_NR(4, 13) | ||
| 329 | #define TX28_FEC_nINT MXS_GPIO_NR(4, 5) | ||
| 330 | |||
| 331 | static const struct gpio tx28_gpios[] __initconst = { | ||
| 332 | { ENET0_MDC__GPIO_4_0, GPIOF_OUT_INIT_LOW, "GPIO_4_0" }, | ||
| 333 | { ENET0_MDIO__GPIO_4_1, GPIOF_OUT_INIT_LOW, "GPIO_4_1" }, | ||
| 334 | { ENET0_RX_EN__GPIO_4_2, GPIOF_OUT_INIT_LOW, "GPIO_4_2" }, | ||
| 335 | { ENET0_RXD0__GPIO_4_3, GPIOF_OUT_INIT_LOW, "GPIO_4_3" }, | ||
| 336 | { ENET0_RXD1__GPIO_4_4, GPIOF_OUT_INIT_LOW, "GPIO_4_4" }, | ||
| 337 | { ENET0_TX_EN__GPIO_4_6, GPIOF_OUT_INIT_LOW, "GPIO_4_6" }, | ||
| 338 | { ENET0_TXD0__GPIO_4_7, GPIOF_OUT_INIT_LOW, "GPIO_4_7" }, | ||
| 339 | { ENET0_TXD1__GPIO_4_8, GPIOF_OUT_INIT_LOW, "GPIO_4_8" }, | ||
| 340 | { ENET_CLK__GPIO_4_16, GPIOF_OUT_INIT_LOW, "GPIO_4_16" }, | ||
| 341 | { TX28_FEC_PHY_POWER, GPIOF_OUT_INIT_LOW, "fec-phy-power" }, | ||
| 342 | { TX28_FEC_PHY_RESET, GPIOF_OUT_INIT_LOW, "fec-phy-reset" }, | ||
| 343 | { TX28_FEC_nINT, GPIOF_DIR_IN, "fec-int" }, | ||
| 344 | }; | ||
| 345 | |||
| 346 | static void __init tx28_post_init(void) | ||
| 347 | { | ||
| 348 | struct device_node *np; | ||
| 349 | struct platform_device *pdev; | ||
| 350 | struct pinctrl *pctl; | ||
| 351 | int ret; | ||
| 352 | |||
| 353 | enable_clk_enet_out(); | ||
| 354 | |||
| 355 | np = of_find_compatible_node(NULL, NULL, "fsl,imx28-fec"); | ||
| 356 | pdev = of_find_device_by_node(np); | ||
| 357 | if (!pdev) { | ||
| 358 | pr_err("%s: failed to find fec device\n", __func__); | ||
| 359 | return; | ||
| 360 | } | ||
| 361 | |||
| 362 | pctl = pinctrl_get_select(&pdev->dev, "gpio_mode"); | ||
| 363 | if (IS_ERR(pctl)) { | ||
| 364 | pr_err("%s: failed to get pinctrl state\n", __func__); | ||
| 365 | return; | ||
| 366 | } | ||
| 367 | |||
| 368 | ret = gpio_request_array(tx28_gpios, ARRAY_SIZE(tx28_gpios)); | ||
| 369 | if (ret) { | ||
| 370 | pr_err("%s: failed to request gpios: %d\n", __func__, ret); | ||
| 371 | return; | ||
| 372 | } | ||
| 373 | |||
| 374 | /* Power up fec phy */ | ||
| 375 | gpio_set_value(TX28_FEC_PHY_POWER, 1); | ||
| 376 | msleep(26); /* 25ms according to data sheet */ | ||
| 377 | |||
| 378 | /* Mode strap pins */ | ||
| 379 | gpio_set_value(ENET0_RX_EN__GPIO_4_2, 1); | ||
| 380 | gpio_set_value(ENET0_RXD0__GPIO_4_3, 1); | ||
| 381 | gpio_set_value(ENET0_RXD1__GPIO_4_4, 1); | ||
| 382 | |||
| 383 | udelay(100); /* minimum assertion time for nRST */ | ||
| 384 | |||
| 385 | /* Deasserting FEC PHY RESET */ | ||
| 386 | gpio_set_value(TX28_FEC_PHY_RESET, 1); | ||
| 387 | |||
| 388 | pinctrl_put(pctl); | ||
| 389 | } | ||
| 390 | |||
| 273 | static void __init mxs_machine_init(void) | 391 | static void __init mxs_machine_init(void) |
| 274 | { | 392 | { |
| 275 | if (of_machine_is_compatible("fsl,imx28-evk")) | 393 | if (of_machine_is_compatible("fsl,imx28-evk")) |
| @@ -283,22 +401,20 @@ static void __init mxs_machine_init(void) | |||
| 283 | 401 | ||
| 284 | of_platform_populate(NULL, of_default_bus_match_table, | 402 | of_platform_populate(NULL, of_default_bus_match_table, |
| 285 | mxs_auxdata_lookup, NULL); | 403 | mxs_auxdata_lookup, NULL); |
| 404 | |||
| 405 | if (of_machine_is_compatible("karo,tx28")) | ||
| 406 | tx28_post_init(); | ||
| 407 | |||
| 408 | if (of_machine_is_compatible("fsl,imx28-evk")) | ||
| 409 | imx28_evk_post_init(); | ||
| 286 | } | 410 | } |
| 287 | 411 | ||
| 288 | static const char *imx23_dt_compat[] __initdata = { | 412 | static const char *imx23_dt_compat[] __initdata = { |
| 289 | "fsl,imx23-evk", | ||
| 290 | "fsl,stmp378x_devb" | ||
| 291 | "olimex,imx23-olinuxino", | ||
| 292 | "fsl,imx23", | 413 | "fsl,imx23", |
| 293 | NULL, | 414 | NULL, |
| 294 | }; | 415 | }; |
| 295 | 416 | ||
| 296 | static const char *imx28_dt_compat[] __initdata = { | 417 | static const char *imx28_dt_compat[] __initdata = { |
| 297 | "bluegiga,apx4devkit", | ||
| 298 | "crystalfontz,cfa10036", | ||
| 299 | "denx,m28evk", | ||
| 300 | "fsl,imx28-evk", | ||
| 301 | "karo,tx28", | ||
| 302 | "fsl,imx28", | 418 | "fsl,imx28", |
| 303 | NULL, | 419 | NULL, |
| 304 | }; | 420 | }; |
diff --git a/arch/arm/mach-mxs/mach-stmp378x_devb.c b/arch/arm/mach-mxs/mach-stmp378x_devb.c deleted file mode 100644 index 6548965e4a76..000000000000 --- a/arch/arm/mach-mxs/mach-stmp378x_devb.c +++ /dev/null | |||
| @@ -1,123 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * board setup for STMP378x-Development-Board | ||
| 3 | * | ||
| 4 | * based on mx23evk board setup and information gained form the original | ||
| 5 | * plat-stmp based board setup, now converted to mach-mxs. | ||
| 6 | * | ||
| 7 | * Copyright 2010 Freescale Semiconductor, Inc. All Rights Reserved. | ||
| 8 | * Copyright (C) 2011 Wolfram Sang, Pengutronix e.K. | ||
| 9 | * | ||
| 10 | * This program is free software; you can redistribute it and/or modify | ||
| 11 | * it under the terms of the GNU General Public License as published by | ||
| 12 | * the Free Software Foundation; version 2 of the License. | ||
| 13 | * | ||
| 14 | * This program is distributed in the hope that it will be useful, | ||
| 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 17 | * GNU General Public License for more details. | ||
| 18 | */ | ||
| 19 | |||
| 20 | #include <linux/platform_device.h> | ||
| 21 | #include <linux/gpio.h> | ||
| 22 | #include <linux/spi/spi.h> | ||
| 23 | |||
| 24 | #include <asm/mach-types.h> | ||
| 25 | #include <asm/mach/arch.h> | ||
| 26 | #include <asm/mach/time.h> | ||
| 27 | |||
| 28 | #include <mach/common.h> | ||
| 29 | #include <mach/iomux-mx23.h> | ||
| 30 | |||
| 31 | #include "devices-mx23.h" | ||
| 32 | |||
| 33 | #define STMP378X_DEVB_MMC0_WRITE_PROTECT MXS_GPIO_NR(1, 30) | ||
| 34 | #define STMP378X_DEVB_MMC0_SLOT_POWER MXS_GPIO_NR(1, 29) | ||
| 35 | |||
| 36 | #define STMP378X_DEVB_PAD_AUART (MXS_PAD_4MA | MXS_PAD_1V8 | MXS_PAD_NOPULL) | ||
| 37 | |||
| 38 | static const iomux_cfg_t stmp378x_dvb_pads[] __initconst = { | ||
| 39 | /* duart (extended setup missing in old boardcode, too */ | ||
| 40 | MX23_PAD_PWM0__DUART_RX, | ||
| 41 | MX23_PAD_PWM1__DUART_TX, | ||
| 42 | |||
| 43 | /* auart */ | ||
| 44 | MX23_PAD_AUART1_RX__AUART1_RX | STMP378X_DEVB_PAD_AUART, | ||
| 45 | MX23_PAD_AUART1_TX__AUART1_TX | STMP378X_DEVB_PAD_AUART, | ||
| 46 | MX23_PAD_AUART1_CTS__AUART1_CTS | STMP378X_DEVB_PAD_AUART, | ||
| 47 | MX23_PAD_AUART1_RTS__AUART1_RTS | STMP378X_DEVB_PAD_AUART, | ||
| 48 | |||
| 49 | /* mmc */ | ||
| 50 | MX23_PAD_SSP1_DATA0__SSP1_DATA0 | | ||
| 51 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
| 52 | MX23_PAD_SSP1_DATA1__SSP1_DATA1 | | ||
| 53 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
| 54 | MX23_PAD_SSP1_DATA2__SSP1_DATA2 | | ||
| 55 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
| 56 | MX23_PAD_SSP1_DATA3__SSP1_DATA3 | | ||
| 57 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
| 58 | MX23_PAD_SSP1_CMD__SSP1_CMD | | ||
| 59 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
| 60 | MX23_PAD_SSP1_DETECT__SSP1_DETECT | | ||
| 61 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_NOPULL), | ||
| 62 | MX23_PAD_SSP1_SCK__SSP1_SCK | | ||
| 63 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_NOPULL), | ||
| 64 | MX23_PAD_PWM4__GPIO_1_30 | MXS_PAD_CTRL, /* write protect */ | ||
| 65 | MX23_PAD_PWM3__GPIO_1_29 | MXS_PAD_CTRL, /* power enable */ | ||
| 66 | }; | ||
| 67 | |||
| 68 | static struct mxs_mmc_platform_data stmp378x_dvb_mmc_pdata __initdata = { | ||
| 69 | .wp_gpio = STMP378X_DEVB_MMC0_WRITE_PROTECT, | ||
| 70 | }; | ||
| 71 | |||
| 72 | static struct spi_board_info spi_board_info[] __initdata = { | ||
| 73 | #if defined(CONFIG_ENC28J60) || defined(CONFIG_ENC28J60_MODULE) | ||
| 74 | { | ||
| 75 | .modalias = "enc28j60", | ||
| 76 | .max_speed_hz = 6 * 1000 * 1000, | ||
| 77 | .bus_num = 1, | ||
| 78 | .chip_select = 0, | ||
| 79 | .platform_data = NULL, | ||
| 80 | }, | ||
| 81 | #endif | ||
| 82 | }; | ||
| 83 | |||
| 84 | static void __init stmp378x_dvb_init(void) | ||
| 85 | { | ||
| 86 | int ret; | ||
| 87 | |||
| 88 | mx23_soc_init(); | ||
| 89 | |||
| 90 | mxs_iomux_setup_multiple_pads(stmp378x_dvb_pads, | ||
| 91 | ARRAY_SIZE(stmp378x_dvb_pads)); | ||
| 92 | |||
| 93 | mx23_add_duart(); | ||
| 94 | mx23_add_auart0(); | ||
| 95 | mx23_add_rtc_stmp3xxx(); | ||
| 96 | |||
| 97 | /* power on mmc slot */ | ||
| 98 | ret = gpio_request_one(STMP378X_DEVB_MMC0_SLOT_POWER, | ||
| 99 | GPIOF_OUT_INIT_LOW, "mmc0-slot-power"); | ||
| 100 | if (ret) | ||
| 101 | pr_warn("could not power mmc (%d)\n", ret); | ||
| 102 | |||
| 103 | mx23_add_mxs_mmc(0, &stmp378x_dvb_mmc_pdata); | ||
| 104 | |||
| 105 | spi_register_board_info(spi_board_info, ARRAY_SIZE(spi_board_info)); | ||
| 106 | } | ||
| 107 | |||
| 108 | static void __init stmp378x_dvb_timer_init(void) | ||
| 109 | { | ||
| 110 | mx23_clocks_init(); | ||
| 111 | } | ||
| 112 | |||
| 113 | static struct sys_timer stmp378x_dvb_timer = { | ||
| 114 | .init = stmp378x_dvb_timer_init, | ||
| 115 | }; | ||
| 116 | |||
| 117 | MACHINE_START(STMP378X, "STMP378X") | ||
| 118 | .map_io = mx23_map_io, | ||
| 119 | .init_irq = mx23_init_irq, | ||
| 120 | .timer = &stmp378x_dvb_timer, | ||
| 121 | .init_machine = stmp378x_dvb_init, | ||
| 122 | .restart = mxs_restart, | ||
| 123 | MACHINE_END | ||
diff --git a/arch/arm/mach-mxs/mach-tx28.c b/arch/arm/mach-mxs/mach-tx28.c deleted file mode 100644 index 8837029de1a4..000000000000 --- a/arch/arm/mach-mxs/mach-tx28.c +++ /dev/null | |||
| @@ -1,184 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2010 <LW@KARO-electronics.de> | ||
| 3 | * | ||
| 4 | * based on: mach-mx28_evk.c | ||
| 5 | * Copyright 2010 Freescale Semiconductor, Inc. All Rights Reserved. | ||
| 6 | * | ||
| 7 | * This program is free software; you can redistribute it and/or | ||
| 8 | * modify it under the terms of the GNU General Public License | ||
| 9 | * version 2 as published by the Free Software Foundation | ||
| 10 | */ | ||
| 11 | #include <linux/kernel.h> | ||
| 12 | #include <linux/gpio.h> | ||
| 13 | #include <linux/leds.h> | ||
| 14 | #include <linux/platform_device.h> | ||
| 15 | #include <linux/spi/spi.h> | ||
| 16 | #include <linux/spi/spi_gpio.h> | ||
| 17 | #include <linux/i2c.h> | ||
| 18 | |||
| 19 | #include <asm/mach/arch.h> | ||
| 20 | #include <asm/mach/time.h> | ||
| 21 | |||
| 22 | #include <mach/common.h> | ||
| 23 | #include <mach/iomux-mx28.h> | ||
| 24 | |||
| 25 | #include "devices-mx28.h" | ||
| 26 | #include "module-tx28.h" | ||
| 27 | |||
| 28 | #define TX28_STK5_GPIO_LED MXS_GPIO_NR(4, 10) | ||
| 29 | |||
| 30 | static const iomux_cfg_t tx28_stk5v3_pads[] __initconst = { | ||
| 31 | /* LED */ | ||
| 32 | MX28_PAD_ENET0_RXD3__GPIO_4_10 | | ||
| 33 | MXS_PAD_3V3 | MXS_PAD_4MA | MXS_PAD_NOPULL, | ||
| 34 | |||
| 35 | /* framebuffer */ | ||
| 36 | #define LCD_MODE (MXS_PAD_3V3 | MXS_PAD_4MA) | ||
| 37 | MX28_PAD_LCD_D00__LCD_D0 | LCD_MODE, | ||
| 38 | MX28_PAD_LCD_D01__LCD_D1 | LCD_MODE, | ||
| 39 | MX28_PAD_LCD_D02__LCD_D2 | LCD_MODE, | ||
| 40 | MX28_PAD_LCD_D03__LCD_D3 | LCD_MODE, | ||
| 41 | MX28_PAD_LCD_D04__LCD_D4 | LCD_MODE, | ||
| 42 | MX28_PAD_LCD_D05__LCD_D5 | LCD_MODE, | ||
| 43 | MX28_PAD_LCD_D06__LCD_D6 | LCD_MODE, | ||
| 44 | MX28_PAD_LCD_D07__LCD_D7 | LCD_MODE, | ||
| 45 | MX28_PAD_LCD_D08__LCD_D8 | LCD_MODE, | ||
| 46 | MX28_PAD_LCD_D09__LCD_D9 | LCD_MODE, | ||
| 47 | MX28_PAD_LCD_D10__LCD_D10 | LCD_MODE, | ||
| 48 | MX28_PAD_LCD_D11__LCD_D11 | LCD_MODE, | ||
| 49 | MX28_PAD_LCD_D12__LCD_D12 | LCD_MODE, | ||
| 50 | MX28_PAD_LCD_D13__LCD_D13 | LCD_MODE, | ||
| 51 | MX28_PAD_LCD_D14__LCD_D14 | LCD_MODE, | ||
| 52 | MX28_PAD_LCD_D15__LCD_D15 | LCD_MODE, | ||
| 53 | MX28_PAD_LCD_D16__LCD_D16 | LCD_MODE, | ||
| 54 | MX28_PAD_LCD_D17__LCD_D17 | LCD_MODE, | ||
| 55 | MX28_PAD_LCD_D18__LCD_D18 | LCD_MODE, | ||
| 56 | MX28_PAD_LCD_D19__LCD_D19 | LCD_MODE, | ||
| 57 | MX28_PAD_LCD_D20__LCD_D20 | LCD_MODE, | ||
| 58 | MX28_PAD_LCD_D21__LCD_D21 | LCD_MODE, | ||
| 59 | MX28_PAD_LCD_D22__LCD_D22 | LCD_MODE, | ||
| 60 | MX28_PAD_LCD_D23__LCD_D23 | LCD_MODE, | ||
| 61 | MX28_PAD_LCD_RD_E__LCD_VSYNC | LCD_MODE, | ||
| 62 | MX28_PAD_LCD_WR_RWN__LCD_HSYNC | LCD_MODE, | ||
| 63 | MX28_PAD_LCD_RS__LCD_DOTCLK | LCD_MODE, | ||
| 64 | MX28_PAD_LCD_CS__LCD_CS | LCD_MODE, | ||
| 65 | MX28_PAD_LCD_VSYNC__LCD_VSYNC | LCD_MODE, | ||
| 66 | MX28_PAD_LCD_HSYNC__LCD_HSYNC | LCD_MODE, | ||
| 67 | MX28_PAD_LCD_DOTCLK__LCD_DOTCLK | LCD_MODE, | ||
| 68 | MX28_PAD_LCD_ENABLE__GPIO_1_31 | LCD_MODE, | ||
| 69 | MX28_PAD_LCD_RESET__GPIO_3_30 | LCD_MODE, | ||
| 70 | MX28_PAD_PWM0__PWM_0 | LCD_MODE, | ||
| 71 | |||
| 72 | /* UART1 */ | ||
| 73 | MX28_PAD_AUART0_CTS__DUART_RX, | ||
| 74 | MX28_PAD_AUART0_RTS__DUART_TX, | ||
| 75 | MX28_PAD_AUART0_TX__DUART_RTS, | ||
| 76 | MX28_PAD_AUART0_RX__DUART_CTS, | ||
| 77 | |||
| 78 | /* UART2 */ | ||
| 79 | MX28_PAD_AUART1_RX__AUART1_RX, | ||
| 80 | MX28_PAD_AUART1_TX__AUART1_TX, | ||
| 81 | MX28_PAD_AUART1_RTS__AUART1_RTS, | ||
| 82 | MX28_PAD_AUART1_CTS__AUART1_CTS, | ||
| 83 | |||
| 84 | /* CAN */ | ||
| 85 | MX28_PAD_GPMI_RDY2__CAN0_TX, | ||
| 86 | MX28_PAD_GPMI_RDY3__CAN0_RX, | ||
| 87 | |||
| 88 | /* I2C */ | ||
| 89 | MX28_PAD_I2C0_SCL__I2C0_SCL, | ||
| 90 | MX28_PAD_I2C0_SDA__I2C0_SDA, | ||
| 91 | |||
| 92 | /* TSC2007 */ | ||
| 93 | MX28_PAD_SAIF0_MCLK__GPIO_3_20 | MXS_PAD_3V3 | MXS_PAD_4MA | MXS_PAD_PULLUP, | ||
| 94 | |||
| 95 | /* MMC0 */ | ||
| 96 | MX28_PAD_SSP0_DATA0__SSP0_D0 | | ||
| 97 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
| 98 | MX28_PAD_SSP0_DATA1__SSP0_D1 | | ||
| 99 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
| 100 | MX28_PAD_SSP0_DATA2__SSP0_D2 | | ||
| 101 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
| 102 | MX28_PAD_SSP0_DATA3__SSP0_D3 | | ||
| 103 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
| 104 | MX28_PAD_SSP0_CMD__SSP0_CMD | | ||
| 105 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
| 106 | MX28_PAD_SSP0_DETECT__SSP0_CARD_DETECT | | ||
| 107 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_NOPULL), | ||
| 108 | MX28_PAD_SSP0_SCK__SSP0_SCK | | ||
| 109 | (MXS_PAD_12MA | MXS_PAD_3V3 | MXS_PAD_NOPULL), | ||
| 110 | }; | ||
| 111 | |||
| 112 | static const struct gpio_led tx28_stk5v3_leds[] __initconst = { | ||
| 113 | { | ||
| 114 | .name = "GPIO-LED", | ||
| 115 | .default_trigger = "heartbeat", | ||
| 116 | .gpio = TX28_STK5_GPIO_LED, | ||
| 117 | }, | ||
| 118 | }; | ||
| 119 | |||
| 120 | static const struct gpio_led_platform_data tx28_stk5v3_led_data __initconst = { | ||
| 121 | .leds = tx28_stk5v3_leds, | ||
| 122 | .num_leds = ARRAY_SIZE(tx28_stk5v3_leds), | ||
| 123 | }; | ||
| 124 | |||
| 125 | static struct spi_board_info tx28_spi_board_info[] = { | ||
| 126 | { | ||
| 127 | .modalias = "spidev", | ||
| 128 | .max_speed_hz = 20000000, | ||
| 129 | .bus_num = 0, | ||
| 130 | .chip_select = 1, | ||
| 131 | .controller_data = (void *)SPI_GPIO_NO_CHIPSELECT, | ||
| 132 | .mode = SPI_MODE_0, | ||
| 133 | }, | ||
| 134 | }; | ||
| 135 | |||
| 136 | static struct i2c_board_info tx28_stk5v3_i2c_boardinfo[] __initdata = { | ||
| 137 | { | ||
| 138 | I2C_BOARD_INFO("ds1339", 0x68), | ||
| 139 | }, | ||
| 140 | }; | ||
| 141 | |||
| 142 | static struct mxs_mmc_platform_data tx28_mmc0_pdata __initdata = { | ||
| 143 | .wp_gpio = -EINVAL, | ||
| 144 | .flags = SLOTF_4_BIT_CAPABLE, | ||
| 145 | }; | ||
| 146 | |||
| 147 | static void __init tx28_stk5v3_init(void) | ||
| 148 | { | ||
| 149 | mx28_soc_init(); | ||
| 150 | |||
| 151 | mxs_iomux_setup_multiple_pads(tx28_stk5v3_pads, | ||
| 152 | ARRAY_SIZE(tx28_stk5v3_pads)); | ||
| 153 | |||
| 154 | mx28_add_duart(); /* UART1 */ | ||
| 155 | mx28_add_auart(1); /* UART2 */ | ||
| 156 | |||
| 157 | tx28_add_fec0(); | ||
| 158 | /* spi via ssp will be added when available */ | ||
| 159 | spi_register_board_info(tx28_spi_board_info, | ||
| 160 | ARRAY_SIZE(tx28_spi_board_info)); | ||
| 161 | gpio_led_register_device(0, &tx28_stk5v3_led_data); | ||
| 162 | mx28_add_mxs_i2c(0); | ||
| 163 | i2c_register_board_info(0, tx28_stk5v3_i2c_boardinfo, | ||
| 164 | ARRAY_SIZE(tx28_stk5v3_i2c_boardinfo)); | ||
| 165 | mx28_add_mxs_mmc(0, &tx28_mmc0_pdata); | ||
| 166 | mx28_add_rtc_stmp3xxx(); | ||
| 167 | } | ||
| 168 | |||
| 169 | static void __init tx28_timer_init(void) | ||
| 170 | { | ||
| 171 | mx28_clocks_init(); | ||
| 172 | } | ||
| 173 | |||
| 174 | static struct sys_timer tx28_timer = { | ||
| 175 | .init = tx28_timer_init, | ||
| 176 | }; | ||
| 177 | |||
| 178 | MACHINE_START(TX28, "Ka-Ro electronics TX28 module") | ||
| 179 | .map_io = mx28_map_io, | ||
| 180 | .init_irq = mx28_init_irq, | ||
| 181 | .timer = &tx28_timer, | ||
| 182 | .init_machine = tx28_stk5v3_init, | ||
| 183 | .restart = mxs_restart, | ||
| 184 | MACHINE_END | ||
diff --git a/arch/arm/mach-mxs/mm.c b/arch/arm/mach-mxs/mm.c index dccb67a9e7c4..a4294aa9f301 100644 --- a/arch/arm/mach-mxs/mm.c +++ b/arch/arm/mach-mxs/mm.c | |||
| @@ -13,14 +13,11 @@ | |||
| 13 | 13 | ||
| 14 | #include <linux/mm.h> | 14 | #include <linux/mm.h> |
| 15 | #include <linux/init.h> | 15 | #include <linux/init.h> |
| 16 | #include <linux/pinctrl/machine.h> | ||
| 17 | 16 | ||
| 18 | #include <asm/mach/map.h> | 17 | #include <asm/mach/map.h> |
| 19 | 18 | ||
| 20 | #include <mach/mx23.h> | 19 | #include <mach/mx23.h> |
| 21 | #include <mach/mx28.h> | 20 | #include <mach/mx28.h> |
| 22 | #include <mach/common.h> | ||
| 23 | #include <mach/iomux.h> | ||
| 24 | 21 | ||
| 25 | /* | 22 | /* |
| 26 | * Define the MX23 memory map. | 23 | * Define the MX23 memory map. |
| @@ -48,43 +45,7 @@ void __init mx23_map_io(void) | |||
| 48 | iotable_init(mx23_io_desc, ARRAY_SIZE(mx23_io_desc)); | 45 | iotable_init(mx23_io_desc, ARRAY_SIZE(mx23_io_desc)); |
| 49 | } | 46 | } |
| 50 | 47 | ||
| 51 | void __init mx23_init_irq(void) | ||
| 52 | { | ||
| 53 | icoll_init_irq(); | ||
| 54 | } | ||
| 55 | |||
| 56 | void __init mx28_map_io(void) | 48 | void __init mx28_map_io(void) |
| 57 | { | 49 | { |
| 58 | iotable_init(mx28_io_desc, ARRAY_SIZE(mx28_io_desc)); | 50 | iotable_init(mx28_io_desc, ARRAY_SIZE(mx28_io_desc)); |
| 59 | } | 51 | } |
| 60 | |||
| 61 | void __init mx28_init_irq(void) | ||
| 62 | { | ||
| 63 | icoll_init_irq(); | ||
| 64 | } | ||
| 65 | |||
| 66 | void __init mx23_soc_init(void) | ||
| 67 | { | ||
| 68 | pinctrl_provide_dummies(); | ||
| 69 | |||
| 70 | mxs_add_dma("imx23-dma-apbh", MX23_APBH_DMA_BASE_ADDR); | ||
| 71 | mxs_add_dma("imx23-dma-apbx", MX23_APBX_DMA_BASE_ADDR); | ||
| 72 | |||
| 73 | mxs_add_gpio("imx23-gpio", 0, MX23_PINCTRL_BASE_ADDR, MX23_INT_GPIO0); | ||
| 74 | mxs_add_gpio("imx23-gpio", 1, MX23_PINCTRL_BASE_ADDR, MX23_INT_GPIO1); | ||
| 75 | mxs_add_gpio("imx23-gpio", 2, MX23_PINCTRL_BASE_ADDR, MX23_INT_GPIO2); | ||
| 76 | } | ||
| 77 | |||
| 78 | void __init mx28_soc_init(void) | ||
| 79 | { | ||
| 80 | pinctrl_provide_dummies(); | ||
| 81 | |||
| 82 | mxs_add_dma("imx28-dma-apbh", MX23_APBH_DMA_BASE_ADDR); | ||
| 83 | mxs_add_dma("imx28-dma-apbx", MX23_APBX_DMA_BASE_ADDR); | ||
| 84 | |||
| 85 | mxs_add_gpio("imx28-gpio", 0, MX28_PINCTRL_BASE_ADDR, MX28_INT_GPIO0); | ||
| 86 | mxs_add_gpio("imx28-gpio", 1, MX28_PINCTRL_BASE_ADDR, MX28_INT_GPIO1); | ||
| 87 | mxs_add_gpio("imx28-gpio", 2, MX28_PINCTRL_BASE_ADDR, MX28_INT_GPIO2); | ||
| 88 | mxs_add_gpio("imx28-gpio", 3, MX28_PINCTRL_BASE_ADDR, MX28_INT_GPIO3); | ||
| 89 | mxs_add_gpio("imx28-gpio", 4, MX28_PINCTRL_BASE_ADDR, MX28_INT_GPIO4); | ||
| 90 | } | ||
diff --git a/arch/arm/mach-mxs/module-tx28.c b/arch/arm/mach-mxs/module-tx28.c deleted file mode 100644 index 0f71f82101cc..000000000000 --- a/arch/arm/mach-mxs/module-tx28.c +++ /dev/null | |||
| @@ -1,160 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2010 <LW@KARO-electronics.de> | ||
| 3 | * | ||
| 4 | * This program is free software; you can redistribute it and/or modify it under | ||
| 5 | * the terms of the GNU General Public License version 2 as published by the | ||
| 6 | * Free Software Foundation. | ||
| 7 | */ | ||
| 8 | |||
| 9 | #include <linux/delay.h> | ||
| 10 | #include <linux/fec.h> | ||
| 11 | #include <linux/gpio.h> | ||
| 12 | |||
| 13 | #include <mach/iomux-mx28.h> | ||
| 14 | #include "devices-mx28.h" | ||
| 15 | |||
| 16 | #include "module-tx28.h" | ||
| 17 | |||
| 18 | #define TX28_FEC_PHY_POWER MXS_GPIO_NR(3, 29) | ||
| 19 | #define TX28_FEC_PHY_RESET MXS_GPIO_NR(4, 13) | ||
| 20 | |||
| 21 | static const iomux_cfg_t tx28_fec_gpio_pads[] __initconst = { | ||
| 22 | /* PHY POWER */ | ||
| 23 | MX28_PAD_PWM4__GPIO_3_29 | | ||
| 24 | MXS_PAD_4MA | MXS_PAD_NOPULL | MXS_PAD_3V3, | ||
| 25 | /* PHY RESET */ | ||
| 26 | MX28_PAD_ENET0_RX_CLK__GPIO_4_13 | | ||
| 27 | MXS_PAD_4MA | MXS_PAD_NOPULL | MXS_PAD_3V3, | ||
| 28 | /* Mode strap pins 0-2 */ | ||
| 29 | MX28_PAD_ENET0_RXD0__GPIO_4_3 | | ||
| 30 | MXS_PAD_8MA | MXS_PAD_PULLUP | MXS_PAD_3V3, | ||
| 31 | MX28_PAD_ENET0_RXD1__GPIO_4_4 | | ||
| 32 | MXS_PAD_8MA | MXS_PAD_PULLUP | MXS_PAD_3V3, | ||
| 33 | MX28_PAD_ENET0_RX_EN__GPIO_4_2 | | ||
| 34 | MXS_PAD_8MA | MXS_PAD_PULLUP | MXS_PAD_3V3, | ||
| 35 | /* nINT */ | ||
| 36 | MX28_PAD_ENET0_TX_CLK__GPIO_4_5 | | ||
| 37 | MXS_PAD_4MA | MXS_PAD_NOPULL | MXS_PAD_3V3, | ||
| 38 | |||
| 39 | MX28_PAD_ENET0_MDC__GPIO_4_0, | ||
| 40 | MX28_PAD_ENET0_MDIO__GPIO_4_1, | ||
| 41 | MX28_PAD_ENET0_TX_EN__GPIO_4_6, | ||
| 42 | MX28_PAD_ENET0_TXD0__GPIO_4_7, | ||
| 43 | MX28_PAD_ENET0_TXD1__GPIO_4_8, | ||
| 44 | MX28_PAD_ENET_CLK__GPIO_4_16, | ||
| 45 | }; | ||
| 46 | |||
| 47 | #define FEC_MODE (MXS_PAD_8MA | MXS_PAD_PULLUP | MXS_PAD_3V3) | ||
| 48 | static const iomux_cfg_t tx28_fec0_pads[] __initconst = { | ||
| 49 | MX28_PAD_ENET0_MDC__ENET0_MDC | FEC_MODE, | ||
| 50 | MX28_PAD_ENET0_MDIO__ENET0_MDIO | FEC_MODE, | ||
| 51 | MX28_PAD_ENET0_RX_EN__ENET0_RX_EN | FEC_MODE, | ||
| 52 | MX28_PAD_ENET0_RXD0__ENET0_RXD0 | FEC_MODE, | ||
| 53 | MX28_PAD_ENET0_RXD1__ENET0_RXD1 | FEC_MODE, | ||
| 54 | MX28_PAD_ENET0_TX_EN__ENET0_TX_EN | FEC_MODE, | ||
| 55 | MX28_PAD_ENET0_TXD0__ENET0_TXD0 | FEC_MODE, | ||
| 56 | MX28_PAD_ENET0_TXD1__ENET0_TXD1 | FEC_MODE, | ||
| 57 | MX28_PAD_ENET_CLK__CLKCTRL_ENET | FEC_MODE, | ||
| 58 | }; | ||
| 59 | |||
| 60 | static const iomux_cfg_t tx28_fec1_pads[] __initconst = { | ||
| 61 | MX28_PAD_ENET0_RXD2__ENET1_RXD0, | ||
| 62 | MX28_PAD_ENET0_RXD3__ENET1_RXD1, | ||
| 63 | MX28_PAD_ENET0_TXD2__ENET1_TXD0, | ||
| 64 | MX28_PAD_ENET0_TXD3__ENET1_TXD1, | ||
| 65 | MX28_PAD_ENET0_COL__ENET1_TX_EN, | ||
| 66 | MX28_PAD_ENET0_CRS__ENET1_RX_EN, | ||
| 67 | }; | ||
| 68 | |||
| 69 | static const struct fec_platform_data tx28_fec0_data __initconst = { | ||
| 70 | .phy = PHY_INTERFACE_MODE_RMII, | ||
| 71 | }; | ||
| 72 | |||
| 73 | static const struct fec_platform_data tx28_fec1_data __initconst = { | ||
| 74 | .phy = PHY_INTERFACE_MODE_RMII, | ||
| 75 | }; | ||
| 76 | |||
| 77 | int __init tx28_add_fec0(void) | ||
| 78 | { | ||
| 79 | int i, ret; | ||
| 80 | |||
| 81 | pr_debug("%s: Switching FEC PHY power off\n", __func__); | ||
| 82 | ret = mxs_iomux_setup_multiple_pads(tx28_fec_gpio_pads, | ||
| 83 | ARRAY_SIZE(tx28_fec_gpio_pads)); | ||
| 84 | for (i = 0; i < ARRAY_SIZE(tx28_fec_gpio_pads); i++) { | ||
| 85 | unsigned int gpio = MXS_GPIO_NR(PAD_BANK(tx28_fec_gpio_pads[i]), | ||
| 86 | PAD_PIN(tx28_fec_gpio_pads[i])); | ||
| 87 | |||
| 88 | ret = gpio_request(gpio, "FEC"); | ||
| 89 | if (ret) { | ||
| 90 | pr_err("Failed to request GPIO_%d_%d: %d\n", | ||
| 91 | PAD_BANK(tx28_fec_gpio_pads[i]), | ||
| 92 | PAD_PIN(tx28_fec_gpio_pads[i]), ret); | ||
| 93 | goto free_gpios; | ||
| 94 | } | ||
| 95 | ret = gpio_direction_output(gpio, 0); | ||
| 96 | if (ret) { | ||
| 97 | pr_err("Failed to set direction of GPIO_%d_%d to output: %d\n", | ||
| 98 | gpio / 32 + 1, gpio % 32, ret); | ||
| 99 | goto free_gpios; | ||
| 100 | } | ||
| 101 | } | ||
| 102 | |||
| 103 | /* Power up fec phy */ | ||
| 104 | pr_debug("%s: Switching FEC PHY power on\n", __func__); | ||
| 105 | ret = gpio_direction_output(TX28_FEC_PHY_POWER, 1); | ||
| 106 | if (ret) { | ||
| 107 | pr_err("Failed to power on PHY: %d\n", ret); | ||
| 108 | goto free_gpios; | ||
| 109 | } | ||
| 110 | mdelay(26); /* 25ms according to data sheet */ | ||
| 111 | |||
| 112 | /* nINT */ | ||
| 113 | gpio_direction_input(MXS_GPIO_NR(4, 5)); | ||
| 114 | /* Mode strap pins */ | ||
| 115 | gpio_direction_output(MXS_GPIO_NR(4, 2), 1); | ||
| 116 | gpio_direction_output(MXS_GPIO_NR(4, 3), 1); | ||
| 117 | gpio_direction_output(MXS_GPIO_NR(4, 4), 1); | ||
| 118 | |||
| 119 | udelay(100); /* minimum assertion time for nRST */ | ||
| 120 | |||
| 121 | pr_debug("%s: Deasserting FEC PHY RESET\n", __func__); | ||
| 122 | gpio_set_value(TX28_FEC_PHY_RESET, 1); | ||
| 123 | |||
| 124 | ret = mxs_iomux_setup_multiple_pads(tx28_fec0_pads, | ||
| 125 | ARRAY_SIZE(tx28_fec0_pads)); | ||
| 126 | if (ret) { | ||
| 127 | pr_debug("%s: mxs_iomux_setup_multiple_pads() failed with rc: %d\n", | ||
| 128 | __func__, ret); | ||
| 129 | goto free_gpios; | ||
| 130 | } | ||
| 131 | pr_debug("%s: Registering FEC0 device\n", __func__); | ||
| 132 | mx28_add_fec(0, &tx28_fec0_data); | ||
| 133 | return 0; | ||
| 134 | |||
| 135 | free_gpios: | ||
| 136 | while (--i >= 0) { | ||
| 137 | unsigned int gpio = MXS_GPIO_NR(PAD_BANK(tx28_fec_gpio_pads[i]), | ||
| 138 | PAD_PIN(tx28_fec_gpio_pads[i])); | ||
| 139 | |||
| 140 | gpio_free(gpio); | ||
| 141 | } | ||
| 142 | |||
| 143 | return ret; | ||
| 144 | } | ||
| 145 | |||
| 146 | int __init tx28_add_fec1(void) | ||
| 147 | { | ||
| 148 | int ret; | ||
| 149 | |||
| 150 | ret = mxs_iomux_setup_multiple_pads(tx28_fec1_pads, | ||
| 151 | ARRAY_SIZE(tx28_fec1_pads)); | ||
| 152 | if (ret) { | ||
| 153 | pr_debug("%s: mxs_iomux_setup_multiple_pads() failed with rc: %d\n", | ||
| 154 | __func__, ret); | ||
| 155 | return ret; | ||
| 156 | } | ||
| 157 | pr_debug("%s: Registering FEC1 device\n", __func__); | ||
| 158 | mx28_add_fec(1, &tx28_fec1_data); | ||
| 159 | return 0; | ||
| 160 | } | ||
diff --git a/arch/arm/mach-mxs/module-tx28.h b/arch/arm/mach-mxs/module-tx28.h deleted file mode 100644 index 8ed425457d30..000000000000 --- a/arch/arm/mach-mxs/module-tx28.h +++ /dev/null | |||
| @@ -1,10 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2010 Pengutronix | ||
| 3 | * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de> | ||
| 4 | * | ||
| 5 | * This program is free software; you can redistribute it and/or modify it under | ||
| 6 | * the terms of the GNU General Public License version 2 as published by the | ||
| 7 | * Free Software Foundation. | ||
| 8 | */ | ||
| 9 | int __init tx28_add_fec0(void); | ||
| 10 | int __init tx28_add_fec1(void); | ||
diff --git a/arch/arm/mach-prima2/Makefile b/arch/arm/mach-prima2/Makefile index 13dd1604d951..841847d56032 100644 --- a/arch/arm/mach-prima2/Makefile +++ b/arch/arm/mach-prima2/Makefile | |||
| @@ -1,6 +1,5 @@ | |||
| 1 | obj-y := timer.o | 1 | obj-y := timer.o |
| 2 | obj-y += irq.o | 2 | obj-y += irq.o |
| 3 | obj-y += clock.o | ||
| 4 | obj-y += rstc.o | 3 | obj-y += rstc.o |
| 5 | obj-y += prima2.o | 4 | obj-y += prima2.o |
| 6 | obj-y += rtciobrg.o | 5 | obj-y += rtciobrg.o |
diff --git a/arch/arm/mach-prima2/Makefile.boot b/arch/arm/mach-prima2/Makefile.boot index c77a4883a4ee..98167da874c9 100644 --- a/arch/arm/mach-prima2/Makefile.boot +++ b/arch/arm/mach-prima2/Makefile.boot | |||
| @@ -1,3 +1,5 @@ | |||
| 1 | zreladdr-y += 0x00008000 | 1 | zreladdr-y += 0x00008000 |
| 2 | params_phys-y := 0x00000100 | 2 | params_phys-y := 0x00000100 |
| 3 | initrd_phys-y := 0x00800000 | 3 | initrd_phys-y := 0x00800000 |
| 4 | |||
| 5 | dtb-$(CONFIG_ARCH_PRIMA2) += prima2-evb.dtb | ||
diff --git a/arch/arm/mach-prima2/clock.c b/arch/arm/mach-prima2/clock.c deleted file mode 100644 index aebad7e565cf..000000000000 --- a/arch/arm/mach-prima2/clock.c +++ /dev/null | |||
| @@ -1,510 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Clock tree for CSR SiRFprimaII | ||
| 3 | * | ||
| 4 | * Copyright (c) 2011 Cambridge Silicon Radio Limited, a CSR plc group company. | ||
| 5 | * | ||
| 6 | * Licensed under GPLv2 or later. | ||
| 7 | */ | ||
| 8 | |||
| 9 | #include <linux/module.h> | ||
| 10 | #include <linux/bitops.h> | ||
| 11 | #include <linux/err.h> | ||
| 12 | #include <linux/errno.h> | ||
| 13 | #include <linux/io.h> | ||
| 14 | #include <linux/clkdev.h> | ||
| 15 | #include <linux/clk.h> | ||
| 16 | #include <linux/spinlock.h> | ||
| 17 | #include <linux/of.h> | ||
| 18 | #include <linux/of_address.h> | ||
| 19 | #include <asm/mach/map.h> | ||
| 20 | #include <mach/map.h> | ||
| 21 | |||
| 22 | #define SIRFSOC_CLKC_CLK_EN0 0x0000 | ||
| 23 | #define SIRFSOC_CLKC_CLK_EN1 0x0004 | ||
| 24 | #define SIRFSOC_CLKC_REF_CFG 0x0014 | ||
| 25 | #define SIRFSOC_CLKC_CPU_CFG 0x0018 | ||
| 26 | #define SIRFSOC_CLKC_MEM_CFG 0x001c | ||
| 27 | #define SIRFSOC_CLKC_SYS_CFG 0x0020 | ||
| 28 | #define SIRFSOC_CLKC_IO_CFG 0x0024 | ||
| 29 | #define SIRFSOC_CLKC_DSP_CFG 0x0028 | ||
| 30 | #define SIRFSOC_CLKC_GFX_CFG 0x002c | ||
| 31 | #define SIRFSOC_CLKC_MM_CFG 0x0030 | ||
| 32 | #define SIRFSOC_LKC_LCD_CFG 0x0034 | ||
| 33 | #define SIRFSOC_CLKC_MMC_CFG 0x0038 | ||
| 34 | #define SIRFSOC_CLKC_PLL1_CFG0 0x0040 | ||
| 35 | #define SIRFSOC_CLKC_PLL2_CFG0 0x0044 | ||
| 36 | #define SIRFSOC_CLKC_PLL3_CFG0 0x0048 | ||
| 37 | #define SIRFSOC_CLKC_PLL1_CFG1 0x004c | ||
| 38 | #define SIRFSOC_CLKC_PLL2_CFG1 0x0050 | ||
| 39 | #define SIRFSOC_CLKC_PLL3_CFG1 0x0054 | ||
| 40 | #define SIRFSOC_CLKC_PLL1_CFG2 0x0058 | ||
| 41 | #define SIRFSOC_CLKC_PLL2_CFG2 0x005c | ||
| 42 | #define SIRFSOC_CLKC_PLL3_CFG2 0x0060 | ||
| 43 | |||
| 44 | #define SIRFSOC_CLOCK_VA_BASE SIRFSOC_VA(0x005000) | ||
| 45 | |||
| 46 | #define KHZ 1000 | ||
| 47 | #define MHZ (KHZ * KHZ) | ||
| 48 | |||
| 49 | struct clk_ops { | ||
| 50 | unsigned long (*get_rate)(struct clk *clk); | ||
| 51 | long (*round_rate)(struct clk *clk, unsigned long rate); | ||
| 52 | int (*set_rate)(struct clk *clk, unsigned long rate); | ||
| 53 | int (*enable)(struct clk *clk); | ||
| 54 | int (*disable)(struct clk *clk); | ||
| 55 | struct clk *(*get_parent)(struct clk *clk); | ||
| 56 | int (*set_parent)(struct clk *clk, struct clk *parent); | ||
| 57 | }; | ||
| 58 | |||
| 59 | struct clk { | ||
| 60 | struct clk *parent; /* parent clk */ | ||
| 61 | unsigned long rate; /* clock rate in Hz */ | ||
| 62 | signed char usage; /* clock enable count */ | ||
| 63 | signed char enable_bit; /* enable bit: 0 ~ 63 */ | ||
| 64 | unsigned short regofs; /* register offset */ | ||
| 65 | struct clk_ops *ops; /* clock operation */ | ||
| 66 | }; | ||
| 67 | |||
| 68 | static DEFINE_SPINLOCK(clocks_lock); | ||
| 69 | |||
| 70 | static inline unsigned long clkc_readl(unsigned reg) | ||
| 71 | { | ||
| 72 | return readl(SIRFSOC_CLOCK_VA_BASE + reg); | ||
| 73 | } | ||
| 74 | |||
| 75 | static inline void clkc_writel(u32 val, unsigned reg) | ||
| 76 | { | ||
| 77 | writel(val, SIRFSOC_CLOCK_VA_BASE + reg); | ||
| 78 | } | ||
| 79 | |||
| 80 | /* | ||
| 81 | * osc_rtc - real time oscillator - 32.768KHz | ||
| 82 | * osc_sys - high speed oscillator - 26MHz | ||
| 83 | */ | ||
| 84 | |||
| 85 | static struct clk clk_rtc = { | ||
| 86 | .rate = 32768, | ||
| 87 | }; | ||
| 88 | |||
| 89 | static struct clk clk_osc = { | ||
| 90 | .rate = 26 * MHZ, | ||
| 91 | }; | ||
| 92 | |||
| 93 | /* | ||
| 94 | * std pll | ||
| 95 | */ | ||
| 96 | static unsigned long std_pll_get_rate(struct clk *clk) | ||
| 97 | { | ||
| 98 | unsigned long fin = clk_get_rate(clk->parent); | ||
| 99 | u32 regcfg2 = clk->regofs + SIRFSOC_CLKC_PLL1_CFG2 - | ||
| 100 | SIRFSOC_CLKC_PLL1_CFG0; | ||
| 101 | |||
| 102 | if (clkc_readl(regcfg2) & BIT(2)) { | ||
| 103 | /* pll bypass mode */ | ||
| 104 | clk->rate = fin; | ||
| 105 | } else { | ||
| 106 | /* fout = fin * nf / nr / od */ | ||
| 107 | u32 cfg0 = clkc_readl(clk->regofs); | ||
| 108 | u32 nf = (cfg0 & (BIT(13) - 1)) + 1; | ||
| 109 | u32 nr = ((cfg0 >> 13) & (BIT(6) - 1)) + 1; | ||
| 110 | u32 od = ((cfg0 >> 19) & (BIT(4) - 1)) + 1; | ||
| 111 | WARN_ON(fin % MHZ); | ||
| 112 | clk->rate = fin / MHZ * nf / nr / od * MHZ; | ||
| 113 | } | ||
| 114 | |||
| 115 | return clk->rate; | ||
| 116 | } | ||
| 117 | |||
| 118 | static int std_pll_set_rate(struct clk *clk, unsigned long rate) | ||
| 119 | { | ||
| 120 | unsigned long fin, nf, nr, od, reg; | ||
| 121 | |||
| 122 | /* | ||
| 123 | * fout = fin * nf / (nr * od); | ||
| 124 | * set od = 1, nr = fin/MHz, so fout = nf * MHz | ||
| 125 | */ | ||
| 126 | |||
| 127 | nf = rate / MHZ; | ||
| 128 | if (unlikely((rate % MHZ) || nf > BIT(13) || nf < 1)) | ||
| 129 | return -EINVAL; | ||
| 130 | |||
| 131 | fin = clk_get_rate(clk->parent); | ||
| 132 | BUG_ON(fin < MHZ); | ||
| 133 | |||
| 134 | nr = fin / MHZ; | ||
| 135 | BUG_ON((fin % MHZ) || nr > BIT(6)); | ||
| 136 | |||
| 137 | od = 1; | ||
| 138 | |||
| 139 | reg = (nf - 1) | ((nr - 1) << 13) | ((od - 1) << 19); | ||
| 140 | clkc_writel(reg, clk->regofs); | ||
| 141 | |||
| 142 | reg = clk->regofs + SIRFSOC_CLKC_PLL1_CFG1 - SIRFSOC_CLKC_PLL1_CFG0; | ||
| 143 | clkc_writel((nf >> 1) - 1, reg); | ||
| 144 | |||
| 145 | reg = clk->regofs + SIRFSOC_CLKC_PLL1_CFG2 - SIRFSOC_CLKC_PLL1_CFG0; | ||
| 146 | while (!(clkc_readl(reg) & BIT(6))) | ||
| 147 | cpu_relax(); | ||
| 148 | |||
| 149 | clk->rate = 0; /* set to zero will force recalculation */ | ||
| 150 | return 0; | ||
| 151 | } | ||
| 152 | |||
| 153 | static struct clk_ops std_pll_ops = { | ||
| 154 | .get_rate = std_pll_get_rate, | ||
| 155 | .set_rate = std_pll_set_rate, | ||
| 156 | }; | ||
| 157 | |||
| 158 | static struct clk clk_pll1 = { | ||
| 159 | .parent = &clk_osc, | ||
| 160 | .regofs = SIRFSOC_CLKC_PLL1_CFG0, | ||
| 161 | .ops = &std_pll_ops, | ||
| 162 | }; | ||
| 163 | |||
| 164 | static struct clk clk_pll2 = { | ||
| 165 | .parent = &clk_osc, | ||
| 166 | .regofs = SIRFSOC_CLKC_PLL2_CFG0, | ||
| 167 | .ops = &std_pll_ops, | ||
| 168 | }; | ||
| 169 | |||
| 170 | static struct clk clk_pll3 = { | ||
| 171 | .parent = &clk_osc, | ||
| 172 | .regofs = SIRFSOC_CLKC_PLL3_CFG0, | ||
| 173 | .ops = &std_pll_ops, | ||
| 174 | }; | ||
| 175 | |||
| 176 | /* | ||
| 177 | * clock domains - cpu, mem, sys/io | ||
| 178 | */ | ||
| 179 | |||
| 180 | static struct clk clk_mem; | ||
| 181 | |||
| 182 | static struct clk *dmn_get_parent(struct clk *clk) | ||
| 183 | { | ||
| 184 | struct clk *clks[] = { | ||
| 185 | &clk_osc, &clk_rtc, &clk_pll1, &clk_pll2, &clk_pll3 | ||
| 186 | }; | ||
| 187 | u32 cfg = clkc_readl(clk->regofs); | ||
| 188 | WARN_ON((cfg & (BIT(3) - 1)) > 4); | ||
| 189 | return clks[cfg & (BIT(3) - 1)]; | ||
| 190 | } | ||
| 191 | |||
| 192 | static int dmn_set_parent(struct clk *clk, struct clk *parent) | ||
| 193 | { | ||
| 194 | const struct clk *clks[] = { | ||
| 195 | &clk_osc, &clk_rtc, &clk_pll1, &clk_pll2, &clk_pll3 | ||
| 196 | }; | ||
| 197 | u32 cfg = clkc_readl(clk->regofs); | ||
| 198 | int i; | ||
| 199 | for (i = 0; i < ARRAY_SIZE(clks); i++) { | ||
| 200 | if (clks[i] == parent) { | ||
| 201 | cfg &= ~(BIT(3) - 1); | ||
| 202 | clkc_writel(cfg | i, clk->regofs); | ||
| 203 | /* BIT(3) - switching status: 1 - busy, 0 - done */ | ||
| 204 | while (clkc_readl(clk->regofs) & BIT(3)) | ||
| 205 | cpu_relax(); | ||
| 206 | return 0; | ||
| 207 | } | ||
| 208 | } | ||
| 209 | return -EINVAL; | ||
| 210 | } | ||
| 211 | |||
| 212 | static unsigned long dmn_get_rate(struct clk *clk) | ||
| 213 | { | ||
| 214 | unsigned long fin = clk_get_rate(clk->parent); | ||
| 215 | u32 cfg = clkc_readl(clk->regofs); | ||
| 216 | if (cfg & BIT(24)) { | ||
| 217 | /* fcd bypass mode */ | ||
| 218 | clk->rate = fin; | ||
| 219 | } else { | ||
| 220 | /* | ||
| 221 | * wait count: bit[19:16], hold count: bit[23:20] | ||
| 222 | */ | ||
| 223 | u32 wait = (cfg >> 16) & (BIT(4) - 1); | ||
| 224 | u32 hold = (cfg >> 20) & (BIT(4) - 1); | ||
| 225 | |||
| 226 | clk->rate = fin / (wait + hold + 2); | ||
| 227 | } | ||
| 228 | |||
| 229 | return clk->rate; | ||
| 230 | } | ||
| 231 | |||
| 232 | static int dmn_set_rate(struct clk *clk, unsigned long rate) | ||
| 233 | { | ||
| 234 | unsigned long fin; | ||
| 235 | unsigned ratio, wait, hold, reg; | ||
| 236 | unsigned bits = (clk == &clk_mem) ? 3 : 4; | ||
| 237 | |||
| 238 | fin = clk_get_rate(clk->parent); | ||
| 239 | ratio = fin / rate; | ||
| 240 | |||
| 241 | if (unlikely(ratio < 2 || ratio > BIT(bits + 1))) | ||
| 242 | return -EINVAL; | ||
| 243 | |||
| 244 | WARN_ON(fin % rate); | ||
| 245 | |||
| 246 | wait = (ratio >> 1) - 1; | ||
| 247 | hold = ratio - wait - 2; | ||
| 248 | |||
| 249 | reg = clkc_readl(clk->regofs); | ||
| 250 | reg &= ~(((BIT(bits) - 1) << 16) | ((BIT(bits) - 1) << 20)); | ||
| 251 | reg |= (wait << 16) | (hold << 20) | BIT(25); | ||
| 252 | clkc_writel(reg, clk->regofs); | ||
| 253 | |||
| 254 | /* waiting FCD been effective */ | ||
| 255 | while (clkc_readl(clk->regofs) & BIT(25)) | ||
| 256 | cpu_relax(); | ||
| 257 | |||
| 258 | clk->rate = 0; /* set to zero will force recalculation */ | ||
| 259 | |||
| 260 | return 0; | ||
| 261 | } | ||
| 262 | |||
| 263 | /* | ||
| 264 | * cpu clock has no FCD register in Prima2, can only change pll | ||
| 265 | */ | ||
| 266 | static int cpu_set_rate(struct clk *clk, unsigned long rate) | ||
| 267 | { | ||
| 268 | int ret1, ret2; | ||
| 269 | struct clk *cur_parent, *tmp_parent; | ||
| 270 | |||
| 271 | cur_parent = dmn_get_parent(clk); | ||
| 272 | BUG_ON(cur_parent == NULL || cur_parent->usage > 1); | ||
| 273 | |||
| 274 | /* switch to tmp pll before setting parent clock's rate */ | ||
| 275 | tmp_parent = cur_parent == &clk_pll1 ? &clk_pll2 : &clk_pll1; | ||
| 276 | ret1 = dmn_set_parent(clk, tmp_parent); | ||
| 277 | BUG_ON(ret1); | ||
| 278 | |||
| 279 | ret2 = clk_set_rate(cur_parent, rate); | ||
| 280 | |||
| 281 | ret1 = dmn_set_parent(clk, cur_parent); | ||
| 282 | |||
| 283 | clk->rate = 0; /* set to zero will force recalculation */ | ||
| 284 | |||
| 285 | return ret2 ? ret2 : ret1; | ||
| 286 | } | ||
| 287 | |||
| 288 | static struct clk_ops cpu_ops = { | ||
| 289 | .get_parent = dmn_get_parent, | ||
| 290 | .set_parent = dmn_set_parent, | ||
| 291 | .set_rate = cpu_set_rate, | ||
| 292 | }; | ||
| 293 | |||
| 294 | static struct clk clk_cpu = { | ||
| 295 | .parent = &clk_pll1, | ||
| 296 | .regofs = SIRFSOC_CLKC_CPU_CFG, | ||
| 297 | .ops = &cpu_ops, | ||
| 298 | }; | ||
| 299 | |||
| 300 | |||
| 301 | static struct clk_ops msi_ops = { | ||
| 302 | .set_rate = dmn_set_rate, | ||
| 303 | .get_rate = dmn_get_rate, | ||
| 304 | .set_parent = dmn_set_parent, | ||
| 305 | .get_parent = dmn_get_parent, | ||
| 306 | }; | ||
| 307 | |||
| 308 | static struct clk clk_mem = { | ||
| 309 | .parent = &clk_pll2, | ||
| 310 | .regofs = SIRFSOC_CLKC_MEM_CFG, | ||
| 311 | .ops = &msi_ops, | ||
| 312 | }; | ||
| 313 | |||
| 314 | static struct clk clk_sys = { | ||
| 315 | .parent = &clk_pll3, | ||
| 316 | .regofs = SIRFSOC_CLKC_SYS_CFG, | ||
| 317 | .ops = &msi_ops, | ||
| 318 | }; | ||
| 319 | |||
| 320 | static struct clk clk_io = { | ||
| 321 | .parent = &clk_pll3, | ||
| 322 | .regofs = SIRFSOC_CLKC_IO_CFG, | ||
| 323 | .ops = &msi_ops, | ||
| 324 | }; | ||
| 325 | |||
| 326 | /* | ||
| 327 | * on-chip clock sets | ||
| 328 | */ | ||
| 329 | static struct clk_lookup onchip_clks[] = { | ||
| 330 | { | ||
| 331 | .dev_id = "rtc", | ||
| 332 | .clk = &clk_rtc, | ||
| 333 | }, { | ||
| 334 | .dev_id = "osc", | ||
| 335 | .clk = &clk_osc, | ||
| 336 | }, { | ||
| 337 | .dev_id = "pll1", | ||
| 338 | .clk = &clk_pll1, | ||
| 339 | }, { | ||
| 340 | .dev_id = "pll2", | ||
| 341 | .clk = &clk_pll2, | ||
| 342 | }, { | ||
| 343 | .dev_id = "pll3", | ||
| 344 | .clk = &clk_pll3, | ||
| 345 | }, { | ||
| 346 | .dev_id = "cpu", | ||
| 347 | .clk = &clk_cpu, | ||
| 348 | }, { | ||
| 349 | .dev_id = "mem", | ||
| 350 | .clk = &clk_mem, | ||
| 351 | }, { | ||
| 352 | .dev_id = "sys", | ||
| 353 | .clk = &clk_sys, | ||
| 354 | }, { | ||
| 355 | .dev_id = "io", | ||
| 356 | .clk = &clk_io, | ||
| 357 | }, | ||
| 358 | }; | ||
| 359 | |||
| 360 | int clk_enable(struct clk *clk) | ||
| 361 | { | ||
| 362 | unsigned long flags; | ||
| 363 | |||
| 364 | if (unlikely(IS_ERR_OR_NULL(clk))) | ||
| 365 | return -EINVAL; | ||
| 366 | |||
| 367 | if (clk->parent) | ||
| 368 | clk_enable(clk->parent); | ||
| 369 | |||
| 370 | spin_lock_irqsave(&clocks_lock, flags); | ||
| 371 | if (!clk->usage++ && clk->ops && clk->ops->enable) | ||
| 372 | clk->ops->enable(clk); | ||
| 373 | spin_unlock_irqrestore(&clocks_lock, flags); | ||
| 374 | return 0; | ||
| 375 | } | ||
| 376 | EXPORT_SYMBOL(clk_enable); | ||
| 377 | |||
| 378 | void clk_disable(struct clk *clk) | ||
| 379 | { | ||
| 380 | unsigned long flags; | ||
| 381 | |||
| 382 | if (unlikely(IS_ERR_OR_NULL(clk))) | ||
| 383 | return; | ||
| 384 | |||
| 385 | WARN_ON(!clk->usage); | ||
| 386 | |||
| 387 | spin_lock_irqsave(&clocks_lock, flags); | ||
| 388 | if (--clk->usage == 0 && clk->ops && clk->ops->disable) | ||
| 389 | clk->ops->disable(clk); | ||
| 390 | spin_unlock_irqrestore(&clocks_lock, flags); | ||
| 391 | |||
| 392 | if (clk->parent) | ||
| 393 | clk_disable(clk->parent); | ||
| 394 | } | ||
| 395 | EXPORT_SYMBOL(clk_disable); | ||
| 396 | |||
| 397 | unsigned long clk_get_rate(struct clk *clk) | ||
| 398 | { | ||
| 399 | if (unlikely(IS_ERR_OR_NULL(clk))) | ||
| 400 | return 0; | ||
| 401 | |||
| 402 | if (clk->rate) | ||
| 403 | return clk->rate; | ||
| 404 | |||
| 405 | if (clk->ops && clk->ops->get_rate) | ||
| 406 | return clk->ops->get_rate(clk); | ||
| 407 | |||
| 408 | return clk_get_rate(clk->parent); | ||
| 409 | } | ||
| 410 | EXPORT_SYMBOL(clk_get_rate); | ||
| 411 | |||
| 412 | long clk_round_rate(struct clk *clk, unsigned long rate) | ||
| 413 | { | ||
| 414 | if (unlikely(IS_ERR_OR_NULL(clk))) | ||
| 415 | return 0; | ||
| 416 | |||
| 417 | if (clk->ops && clk->ops->round_rate) | ||
| 418 | return clk->ops->round_rate(clk, rate); | ||
| 419 | |||
| 420 | return 0; | ||
| 421 | } | ||
| 422 | EXPORT_SYMBOL(clk_round_rate); | ||
| 423 | |||
| 424 | int clk_set_rate(struct clk *clk, unsigned long rate) | ||
| 425 | { | ||
| 426 | if (unlikely(IS_ERR_OR_NULL(clk))) | ||
| 427 | return -EINVAL; | ||
| 428 | |||
| 429 | if (!clk->ops || !clk->ops->set_rate) | ||
| 430 | return -EINVAL; | ||
| 431 | |||
| 432 | return clk->ops->set_rate(clk, rate); | ||
| 433 | } | ||
| 434 | EXPORT_SYMBOL(clk_set_rate); | ||
| 435 | |||
| 436 | int clk_set_parent(struct clk *clk, struct clk *parent) | ||
| 437 | { | ||
| 438 | int ret; | ||
| 439 | unsigned long flags; | ||
| 440 | |||
| 441 | if (unlikely(IS_ERR_OR_NULL(clk))) | ||
| 442 | return -EINVAL; | ||
| 443 | |||
| 444 | if (!clk->ops || !clk->ops->set_parent) | ||
| 445 | return -EINVAL; | ||
| 446 | |||
| 447 | spin_lock_irqsave(&clocks_lock, flags); | ||
| 448 | ret = clk->ops->set_parent(clk, parent); | ||
| 449 | if (!ret) { | ||
| 450 | parent->usage += clk->usage; | ||
| 451 | clk->parent->usage -= clk->usage; | ||
| 452 | BUG_ON(clk->parent->usage < 0); | ||
| 453 | clk->parent = parent; | ||
| 454 | } | ||
| 455 | spin_unlock_irqrestore(&clocks_lock, flags); | ||
| 456 | return ret; | ||
| 457 | } | ||
| 458 | EXPORT_SYMBOL(clk_set_parent); | ||
| 459 | |||
| 460 | struct clk *clk_get_parent(struct clk *clk) | ||
| 461 | { | ||
| 462 | unsigned long flags; | ||
| 463 | |||
| 464 | if (unlikely(IS_ERR_OR_NULL(clk))) | ||
| 465 | return NULL; | ||
| 466 | |||
| 467 | if (!clk->ops || !clk->ops->get_parent) | ||
| 468 | return clk->parent; | ||
| 469 | |||
| 470 | spin_lock_irqsave(&clocks_lock, flags); | ||
| 471 | clk->parent = clk->ops->get_parent(clk); | ||
| 472 | spin_unlock_irqrestore(&clocks_lock, flags); | ||
| 473 | return clk->parent; | ||
| 474 | } | ||
| 475 | EXPORT_SYMBOL(clk_get_parent); | ||
| 476 | |||
| 477 | static void __init sirfsoc_clk_init(void) | ||
| 478 | { | ||
| 479 | clkdev_add_table(onchip_clks, ARRAY_SIZE(onchip_clks)); | ||
| 480 | } | ||
| 481 | |||
| 482 | static struct of_device_id clkc_ids[] = { | ||
| 483 | { .compatible = "sirf,prima2-clkc" }, | ||
| 484 | {}, | ||
| 485 | }; | ||
| 486 | |||
| 487 | void __init sirfsoc_of_clk_init(void) | ||
| 488 | { | ||
| 489 | struct device_node *np; | ||
| 490 | struct resource res; | ||
| 491 | struct map_desc sirfsoc_clkc_iodesc = { | ||
| 492 | .virtual = SIRFSOC_CLOCK_VA_BASE, | ||
| 493 | .type = MT_DEVICE, | ||
| 494 | }; | ||
| 495 | |||
| 496 | np = of_find_matching_node(NULL, clkc_ids); | ||
| 497 | if (!np) | ||
| 498 | panic("unable to find compatible clkc node in dtb\n"); | ||
| 499 | |||
| 500 | if (of_address_to_resource(np, 0, &res)) | ||
| 501 | panic("unable to find clkc range in dtb"); | ||
| 502 | of_node_put(np); | ||
| 503 | |||
| 504 | sirfsoc_clkc_iodesc.pfn = __phys_to_pfn(res.start); | ||
| 505 | sirfsoc_clkc_iodesc.length = 1 + res.end - res.start; | ||
| 506 | |||
| 507 | iotable_init(&sirfsoc_clkc_iodesc, 1); | ||
| 508 | |||
| 509 | sirfsoc_clk_init(); | ||
| 510 | } | ||
diff --git a/arch/arm/mach-prima2/prima2.c b/arch/arm/mach-prima2/prima2.c index 8f0429d4b79f..e9a17aebe0d6 100644 --- a/arch/arm/mach-prima2/prima2.c +++ b/arch/arm/mach-prima2/prima2.c | |||
| @@ -38,7 +38,6 @@ static const char *prima2cb_dt_match[] __initdata = { | |||
| 38 | MACHINE_START(PRIMA2_EVB, "prima2cb") | 38 | MACHINE_START(PRIMA2_EVB, "prima2cb") |
| 39 | /* Maintainer: Barry Song <baohua.song@csr.com> */ | 39 | /* Maintainer: Barry Song <baohua.song@csr.com> */ |
| 40 | .atag_offset = 0x100, | 40 | .atag_offset = 0x100, |
| 41 | .init_early = sirfsoc_of_clk_init, | ||
| 42 | .map_io = sirfsoc_map_lluart, | 41 | .map_io = sirfsoc_map_lluart, |
| 43 | .init_irq = sirfsoc_of_irq_init, | 42 | .init_irq = sirfsoc_of_irq_init, |
| 44 | .timer = &sirfsoc_timer, | 43 | .timer = &sirfsoc_timer, |
diff --git a/arch/arm/mach-prima2/timer.c b/arch/arm/mach-prima2/timer.c index f224107de7bc..d95bf252f694 100644 --- a/arch/arm/mach-prima2/timer.c +++ b/arch/arm/mach-prima2/timer.c | |||
| @@ -21,6 +21,8 @@ | |||
| 21 | #include <asm/sched_clock.h> | 21 | #include <asm/sched_clock.h> |
| 22 | #include <asm/mach/time.h> | 22 | #include <asm/mach/time.h> |
| 23 | 23 | ||
| 24 | #include "common.h" | ||
| 25 | |||
| 24 | #define SIRFSOC_TIMER_COUNTER_LO 0x0000 | 26 | #define SIRFSOC_TIMER_COUNTER_LO 0x0000 |
| 25 | #define SIRFSOC_TIMER_COUNTER_HI 0x0004 | 27 | #define SIRFSOC_TIMER_COUNTER_HI 0x0004 |
| 26 | #define SIRFSOC_TIMER_MATCH_0 0x0008 | 28 | #define SIRFSOC_TIMER_MATCH_0 0x0008 |
| @@ -188,9 +190,13 @@ static void __init sirfsoc_clockevent_init(void) | |||
| 188 | static void __init sirfsoc_timer_init(void) | 190 | static void __init sirfsoc_timer_init(void) |
| 189 | { | 191 | { |
| 190 | unsigned long rate; | 192 | unsigned long rate; |
| 193 | struct clk *clk; | ||
| 194 | |||
| 195 | /* initialize clocking early, we want to set the OS timer */ | ||
| 196 | sirfsoc_of_clk_init(); | ||
| 191 | 197 | ||
| 192 | /* timer's input clock is io clock */ | 198 | /* timer's input clock is io clock */ |
| 193 | struct clk *clk = clk_get_sys("io", NULL); | 199 | clk = clk_get_sys("io", NULL); |
| 194 | 200 | ||
| 195 | BUG_ON(IS_ERR(clk)); | 201 | BUG_ON(IS_ERR(clk)); |
| 196 | 202 | ||
diff --git a/arch/arm/mach-pxa/Kconfig b/arch/arm/mach-pxa/Kconfig index fe2d1f80ef50..8e6288de69b9 100644 --- a/arch/arm/mach-pxa/Kconfig +++ b/arch/arm/mach-pxa/Kconfig | |||
| @@ -25,6 +25,18 @@ config PXA_V7_MACH_AUTO | |||
| 25 | if !ARCH_PXA_V7 | 25 | if !ARCH_PXA_V7 |
| 26 | comment "Intel/Marvell Dev Platforms (sorted by hardware release time)" | 26 | comment "Intel/Marvell Dev Platforms (sorted by hardware release time)" |
| 27 | 27 | ||
| 28 | config MACH_PXA3XX_DT | ||
| 29 | bool "Support PXA3xx platforms from device tree" | ||
| 30 | select PXA3xx | ||
| 31 | select CPU_PXA300 | ||
| 32 | select POWER_SUPPLY | ||
| 33 | select HAVE_PWM | ||
| 34 | select USE_OF | ||
| 35 | help | ||
| 36 | Include support for Marvell PXA3xx based platforms using | ||
| 37 | the device tree. Needn't select any other machine while | ||
| 38 | MACH_PXA3XX_DT is enabled. | ||
| 39 | |||
| 28 | config ARCH_LUBBOCK | 40 | config ARCH_LUBBOCK |
| 29 | bool "Intel DBPXA250 Development Platform (aka Lubbock)" | 41 | bool "Intel DBPXA250 Development Platform (aka Lubbock)" |
| 30 | select PXA25x | 42 | select PXA25x |
diff --git a/arch/arm/mach-pxa/Makefile b/arch/arm/mach-pxa/Makefile index be0f7df8685c..2bedc9ed076c 100644 --- a/arch/arm/mach-pxa/Makefile +++ b/arch/arm/mach-pxa/Makefile | |||
| @@ -26,6 +26,9 @@ obj-$(CONFIG_CPU_PXA930) += pxa930.o | |||
| 26 | 26 | ||
| 27 | # NOTE: keep the order of boards in accordance to their order in Kconfig | 27 | # NOTE: keep the order of boards in accordance to their order in Kconfig |
| 28 | 28 | ||
| 29 | # Device Tree support | ||
| 30 | obj-$(CONFIG_MACH_PXA3XX_DT) += pxa-dt.o | ||
| 31 | |||
| 29 | # Intel/Marvell Dev Platforms | 32 | # Intel/Marvell Dev Platforms |
| 30 | obj-$(CONFIG_ARCH_LUBBOCK) += lubbock.o | 33 | obj-$(CONFIG_ARCH_LUBBOCK) += lubbock.o |
| 31 | obj-$(CONFIG_MACH_MAINSTONE) += mainstone.o | 34 | obj-$(CONFIG_MACH_MAINSTONE) += mainstone.o |
diff --git a/arch/arm/mach-pxa/clock-pxa3xx.c b/arch/arm/mach-pxa/clock-pxa3xx.c index 2a37a9a8f621..d4e9499832dc 100644 --- a/arch/arm/mach-pxa/clock-pxa3xx.c +++ b/arch/arm/mach-pxa/clock-pxa3xx.c | |||
| @@ -127,8 +127,10 @@ void clk_pxa3xx_cken_enable(struct clk *clk) | |||
| 127 | 127 | ||
| 128 | if (clk->cken < 32) | 128 | if (clk->cken < 32) |
| 129 | CKENA |= mask; | 129 | CKENA |= mask; |
| 130 | else | 130 | else if (clk->cken < 64) |
| 131 | CKENB |= mask; | 131 | CKENB |= mask; |
| 132 | else | ||
| 133 | CKENC |= mask; | ||
| 132 | } | 134 | } |
| 133 | 135 | ||
| 134 | void clk_pxa3xx_cken_disable(struct clk *clk) | 136 | void clk_pxa3xx_cken_disable(struct clk *clk) |
| @@ -137,8 +139,10 @@ void clk_pxa3xx_cken_disable(struct clk *clk) | |||
| 137 | 139 | ||
| 138 | if (clk->cken < 32) | 140 | if (clk->cken < 32) |
| 139 | CKENA &= ~mask; | 141 | CKENA &= ~mask; |
| 140 | else | 142 | else if (clk->cken < 64) |
| 141 | CKENB &= ~mask; | 143 | CKENB &= ~mask; |
| 144 | else | ||
| 145 | CKENC &= ~mask; | ||
| 142 | } | 146 | } |
| 143 | 147 | ||
| 144 | const struct clkops clk_pxa3xx_cken_ops = { | 148 | const struct clkops clk_pxa3xx_cken_ops = { |
diff --git a/arch/arm/mach-pxa/include/mach/pxa3xx-regs.h b/arch/arm/mach-pxa/include/mach/pxa3xx-regs.h index 207ecb49a61b..f4d48d20754e 100644 --- a/arch/arm/mach-pxa/include/mach/pxa3xx-regs.h +++ b/arch/arm/mach-pxa/include/mach/pxa3xx-regs.h | |||
| @@ -131,6 +131,7 @@ | |||
| 131 | #define AICSR __REG(0x41340008) /* Application Subsystem Interrupt Control/Status Register */ | 131 | #define AICSR __REG(0x41340008) /* Application Subsystem Interrupt Control/Status Register */ |
| 132 | #define CKENA __REG(0x4134000C) /* A Clock Enable Register */ | 132 | #define CKENA __REG(0x4134000C) /* A Clock Enable Register */ |
| 133 | #define CKENB __REG(0x41340010) /* B Clock Enable Register */ | 133 | #define CKENB __REG(0x41340010) /* B Clock Enable Register */ |
| 134 | #define CKENC __REG(0x41340024) /* C Clock Enable Register */ | ||
| 134 | #define AC97_DIV __REG(0x41340014) /* AC97 clock divisor value register */ | 135 | #define AC97_DIV __REG(0x41340014) /* AC97 clock divisor value register */ |
| 135 | 136 | ||
| 136 | #define ACCR_XPDIS (1 << 31) /* Core PLL Output Disable */ | 137 | #define ACCR_XPDIS (1 << 31) /* Core PLL Output Disable */ |
diff --git a/arch/arm/mach-pxa/irq.c b/arch/arm/mach-pxa/irq.c index 5dae15ea6718..b6cc1816463e 100644 --- a/arch/arm/mach-pxa/irq.c +++ b/arch/arm/mach-pxa/irq.c | |||
| @@ -17,6 +17,8 @@ | |||
| 17 | #include <linux/syscore_ops.h> | 17 | #include <linux/syscore_ops.h> |
| 18 | #include <linux/io.h> | 18 | #include <linux/io.h> |
| 19 | #include <linux/irq.h> | 19 | #include <linux/irq.h> |
| 20 | #include <linux/of_address.h> | ||
| 21 | #include <linux/of_irq.h> | ||
| 20 | 22 | ||
| 21 | #include <asm/exception.h> | 23 | #include <asm/exception.h> |
| 22 | 24 | ||
| @@ -25,8 +27,6 @@ | |||
| 25 | 27 | ||
| 26 | #include "generic.h" | 28 | #include "generic.h" |
| 27 | 29 | ||
| 28 | #define IRQ_BASE io_p2v(0x40d00000) | ||
| 29 | |||
| 30 | #define ICIP (0x000) | 30 | #define ICIP (0x000) |
| 31 | #define ICMR (0x004) | 31 | #define ICMR (0x004) |
| 32 | #define ICLR (0x008) | 32 | #define ICLR (0x008) |
| @@ -48,22 +48,19 @@ | |||
| 48 | * This is for peripheral IRQs internal to the PXA chip. | 48 | * This is for peripheral IRQs internal to the PXA chip. |
| 49 | */ | 49 | */ |
| 50 | 50 | ||
| 51 | static void __iomem *pxa_irq_base; | ||
| 51 | static int pxa_internal_irq_nr; | 52 | static int pxa_internal_irq_nr; |
| 52 | 53 | static bool cpu_has_ipr; | |
| 53 | static inline int cpu_has_ipr(void) | ||
| 54 | { | ||
| 55 | return !cpu_is_pxa25x(); | ||
| 56 | } | ||
| 57 | 54 | ||
| 58 | static inline void __iomem *irq_base(int i) | 55 | static inline void __iomem *irq_base(int i) |
| 59 | { | 56 | { |
| 60 | static unsigned long phys_base[] = { | 57 | static unsigned long phys_base_offset[] = { |
| 61 | 0x40d00000, | 58 | 0x0, |
| 62 | 0x40d0009c, | 59 | 0x9c, |
| 63 | 0x40d00130, | 60 | 0x130, |
| 64 | }; | 61 | }; |
| 65 | 62 | ||
| 66 | return io_p2v(phys_base[i]); | 63 | return pxa_irq_base + phys_base_offset[i]; |
| 67 | } | 64 | } |
| 68 | 65 | ||
| 69 | void pxa_mask_irq(struct irq_data *d) | 66 | void pxa_mask_irq(struct irq_data *d) |
| @@ -96,8 +93,8 @@ asmlinkage void __exception_irq_entry icip_handle_irq(struct pt_regs *regs) | |||
| 96 | uint32_t icip, icmr, mask; | 93 | uint32_t icip, icmr, mask; |
| 97 | 94 | ||
| 98 | do { | 95 | do { |
| 99 | icip = __raw_readl(IRQ_BASE + ICIP); | 96 | icip = __raw_readl(pxa_irq_base + ICIP); |
| 100 | icmr = __raw_readl(IRQ_BASE + ICMR); | 97 | icmr = __raw_readl(pxa_irq_base + ICMR); |
| 101 | mask = icip & icmr; | 98 | mask = icip & icmr; |
| 102 | 99 | ||
| 103 | if (mask == 0) | 100 | if (mask == 0) |
| @@ -128,6 +125,8 @@ void __init pxa_init_irq(int irq_nr, int (*fn)(struct irq_data *, unsigned int)) | |||
| 128 | BUG_ON(irq_nr > MAX_INTERNAL_IRQS); | 125 | BUG_ON(irq_nr > MAX_INTERNAL_IRQS); |
| 129 | 126 | ||
| 130 | pxa_internal_irq_nr = irq_nr; | 127 | pxa_internal_irq_nr = irq_nr; |
| 128 | cpu_has_ipr = !cpu_is_pxa25x(); | ||
| 129 | pxa_irq_base = io_p2v(0x40d00000); | ||
| 131 | 130 | ||
| 132 | for (n = 0; n < irq_nr; n += 32) { | 131 | for (n = 0; n < irq_nr; n += 32) { |
| 133 | void __iomem *base = irq_base(n >> 5); | 132 | void __iomem *base = irq_base(n >> 5); |
| @@ -136,8 +135,8 @@ void __init pxa_init_irq(int irq_nr, int (*fn)(struct irq_data *, unsigned int)) | |||
| 136 | __raw_writel(0, base + ICLR); /* all IRQs are IRQ, not FIQ */ | 135 | __raw_writel(0, base + ICLR); /* all IRQs are IRQ, not FIQ */ |
| 137 | for (i = n; (i < (n + 32)) && (i < irq_nr); i++) { | 136 | for (i = n; (i < (n + 32)) && (i < irq_nr); i++) { |
| 138 | /* initialize interrupt priority */ | 137 | /* initialize interrupt priority */ |
| 139 | if (cpu_has_ipr()) | 138 | if (cpu_has_ipr) |
| 140 | __raw_writel(i | IPR_VALID, IRQ_BASE + IPR(i)); | 139 | __raw_writel(i | IPR_VALID, pxa_irq_base + IPR(i)); |
| 141 | 140 | ||
| 142 | irq = PXA_IRQ(i); | 141 | irq = PXA_IRQ(i); |
| 143 | irq_set_chip_and_handler(irq, &pxa_internal_irq_chip, | 142 | irq_set_chip_and_handler(irq, &pxa_internal_irq_chip, |
| @@ -168,9 +167,9 @@ static int pxa_irq_suspend(void) | |||
| 168 | __raw_writel(0, base + ICMR); | 167 | __raw_writel(0, base + ICMR); |
| 169 | } | 168 | } |
| 170 | 169 | ||
| 171 | if (cpu_has_ipr()) { | 170 | if (cpu_has_ipr) { |
| 172 | for (i = 0; i < pxa_internal_irq_nr; i++) | 171 | for (i = 0; i < pxa_internal_irq_nr; i++) |
| 173 | saved_ipr[i] = __raw_readl(IRQ_BASE + IPR(i)); | 172 | saved_ipr[i] = __raw_readl(pxa_irq_base + IPR(i)); |
| 174 | } | 173 | } |
| 175 | 174 | ||
| 176 | return 0; | 175 | return 0; |
| @@ -187,11 +186,11 @@ static void pxa_irq_resume(void) | |||
| 187 | __raw_writel(0, base + ICLR); | 186 | __raw_writel(0, base + ICLR); |
| 188 | } | 187 | } |
| 189 | 188 | ||
| 190 | if (cpu_has_ipr()) | 189 | if (cpu_has_ipr) |
| 191 | for (i = 0; i < pxa_internal_irq_nr; i++) | 190 | for (i = 0; i < pxa_internal_irq_nr; i++) |
| 192 | __raw_writel(saved_ipr[i], IRQ_BASE + IPR(i)); | 191 | __raw_writel(saved_ipr[i], pxa_irq_base + IPR(i)); |
| 193 | 192 | ||
| 194 | __raw_writel(1, IRQ_BASE + ICCR); | 193 | __raw_writel(1, pxa_irq_base + ICCR); |
| 195 | } | 194 | } |
| 196 | #else | 195 | #else |
| 197 | #define pxa_irq_suspend NULL | 196 | #define pxa_irq_suspend NULL |
| @@ -202,3 +201,93 @@ struct syscore_ops pxa_irq_syscore_ops = { | |||
| 202 | .suspend = pxa_irq_suspend, | 201 | .suspend = pxa_irq_suspend, |
| 203 | .resume = pxa_irq_resume, | 202 | .resume = pxa_irq_resume, |
| 204 | }; | 203 | }; |
| 204 | |||
| 205 | #ifdef CONFIG_OF | ||
| 206 | static struct irq_domain *pxa_irq_domain; | ||
| 207 | |||
| 208 | static int pxa_irq_map(struct irq_domain *h, unsigned int virq, | ||
| 209 | irq_hw_number_t hw) | ||
| 210 | { | ||
| 211 | void __iomem *base = irq_base(hw / 32); | ||
| 212 | |||
| 213 | /* initialize interrupt priority */ | ||
| 214 | if (cpu_has_ipr) | ||
| 215 | __raw_writel(hw | IPR_VALID, pxa_irq_base + IPR(hw)); | ||
| 216 | |||
| 217 | irq_set_chip_and_handler(hw, &pxa_internal_irq_chip, | ||
| 218 | handle_level_irq); | ||
| 219 | irq_set_chip_data(hw, base); | ||
| 220 | set_irq_flags(hw, IRQF_VALID); | ||
| 221 | |||
| 222 | return 0; | ||
| 223 | } | ||
| 224 | |||
| 225 | static struct irq_domain_ops pxa_irq_ops = { | ||
| 226 | .map = pxa_irq_map, | ||
| 227 | .xlate = irq_domain_xlate_onecell, | ||
| 228 | }; | ||
| 229 | |||
| 230 | static const struct of_device_id intc_ids[] __initconst = { | ||
| 231 | { .compatible = "marvell,pxa-intc", }, | ||
| 232 | {} | ||
| 233 | }; | ||
| 234 | |||
| 235 | void __init pxa_dt_irq_init(int (*fn)(struct irq_data *, unsigned int)) | ||
| 236 | { | ||
| 237 | struct device_node *node; | ||
| 238 | const struct of_device_id *of_id; | ||
| 239 | struct pxa_intc_conf *conf; | ||
| 240 | struct resource res; | ||
| 241 | int n, ret; | ||
| 242 | |||
| 243 | node = of_find_matching_node(NULL, intc_ids); | ||
| 244 | if (!node) { | ||
| 245 | pr_err("Failed to find interrupt controller in arch-pxa\n"); | ||
| 246 | return; | ||
| 247 | } | ||
| 248 | of_id = of_match_node(intc_ids, node); | ||
| 249 | conf = of_id->data; | ||
| 250 | |||
| 251 | ret = of_property_read_u32(node, "marvell,intc-nr-irqs", | ||
| 252 | &pxa_internal_irq_nr); | ||
| 253 | if (ret) { | ||
| 254 | pr_err("Not found marvell,intc-nr-irqs property\n"); | ||
| 255 | return; | ||
| 256 | } | ||
| 257 | |||
| 258 | ret = of_address_to_resource(node, 0, &res); | ||
| 259 | if (ret < 0) { | ||
| 260 | pr_err("No registers defined for node\n"); | ||
| 261 | return; | ||
| 262 | } | ||
| 263 | pxa_irq_base = io_p2v(res.start); | ||
| 264 | |||
| 265 | if (of_find_property(node, "marvell,intc-priority", NULL)) | ||
| 266 | cpu_has_ipr = 1; | ||
| 267 | |||
| 268 | ret = irq_alloc_descs(-1, 0, pxa_internal_irq_nr, 0); | ||
| 269 | if (ret < 0) { | ||
| 270 | pr_err("Failed to allocate IRQ numbers\n"); | ||
| 271 | return; | ||
| 272 | } | ||
| 273 | |||
| 274 | pxa_irq_domain = irq_domain_add_legacy(node, pxa_internal_irq_nr, 0, 0, | ||
| 275 | &pxa_irq_ops, NULL); | ||
| 276 | if (!pxa_irq_domain) | ||
| 277 | panic("Unable to add PXA IRQ domain\n"); | ||
| 278 | |||
| 279 | irq_set_default_host(pxa_irq_domain); | ||
| 280 | |||
| 281 | for (n = 0; n < pxa_internal_irq_nr; n += 32) { | ||
| 282 | void __iomem *base = irq_base(n >> 5); | ||
| 283 | |||
| 284 | __raw_writel(0, base + ICMR); /* disable all IRQs */ | ||
| 285 | __raw_writel(0, base + ICLR); /* all IRQs are IRQ, not FIQ */ | ||
| 286 | } | ||
| 287 | |||
| 288 | /* only unmasked interrupts kick us out of idle */ | ||
| 289 | __raw_writel(1, irq_base(0) + ICCR); | ||
| 290 | |||
| 291 | pxa_internal_irq_chip.irq_set_wake = fn; | ||
| 292 | } | ||
| 293 | #endif /* CONFIG_OF */ | ||
diff --git a/arch/arm/mach-pxa/pxa-dt.c b/arch/arm/mach-pxa/pxa-dt.c new file mode 100644 index 000000000000..c9192cea0033 --- /dev/null +++ b/arch/arm/mach-pxa/pxa-dt.c | |||
| @@ -0,0 +1,63 @@ | |||
| 1 | /* | ||
| 2 | * linux/arch/arm/mach-pxa/pxa-dt.c | ||
| 3 | * | ||
| 4 | * Copyright (C) 2012 Daniel Mack | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License version 2 as | ||
| 8 | * publishhed by the Free Software Foundation. | ||
| 9 | */ | ||
| 10 | |||
| 11 | #include <linux/irq.h> | ||
| 12 | #include <linux/irqdomain.h> | ||
| 13 | #include <linux/of_irq.h> | ||
| 14 | #include <linux/of_platform.h> | ||
| 15 | #include <asm/mach/arch.h> | ||
| 16 | #include <asm/mach/time.h> | ||
| 17 | #include <mach/irqs.h> | ||
| 18 | #include <mach/pxa3xx.h> | ||
| 19 | |||
| 20 | #include "generic.h" | ||
| 21 | |||
| 22 | #ifdef CONFIG_PXA3xx | ||
| 23 | extern void __init pxa3xx_dt_init_irq(void); | ||
| 24 | |||
| 25 | static const struct of_dev_auxdata pxa3xx_auxdata_lookup[] __initconst = { | ||
| 26 | OF_DEV_AUXDATA("mrvl,pxa-uart", 0x40100000, "pxa2xx-uart.0", NULL), | ||
| 27 | OF_DEV_AUXDATA("mrvl,pxa-uart", 0x40200000, "pxa2xx-uart.1", NULL), | ||
| 28 | OF_DEV_AUXDATA("mrvl,pxa-uart", 0x40700000, "pxa2xx-uart.2", NULL), | ||
| 29 | OF_DEV_AUXDATA("mrvl,pxa-uart", 0x41600000, "pxa2xx-uart.3", NULL), | ||
| 30 | OF_DEV_AUXDATA("marvell,pxa-mmc", 0x41100000, "pxa2xx-mci.0", NULL), | ||
| 31 | OF_DEV_AUXDATA("mrvl,pxa-gpio", 0x40e00000, "pxa-gpio", NULL), | ||
| 32 | OF_DEV_AUXDATA("marvell,pxa-ohci", 0x4c000000, "pxa27x-ohci", NULL), | ||
| 33 | OF_DEV_AUXDATA("mrvl,pxa-i2c", 0x40301680, "pxa2xx-i2c.0", NULL), | ||
| 34 | OF_DEV_AUXDATA("mrvl,pwri2c", 0x40f500c0, "pxa3xx-i2c.1", NULL), | ||
| 35 | OF_DEV_AUXDATA("marvell,pxa3xx-nand", 0x43100000, "pxa3xx-nand", NULL), | ||
| 36 | {} | ||
| 37 | }; | ||
| 38 | |||
| 39 | static void __init pxa3xx_dt_init(void) | ||
| 40 | { | ||
| 41 | of_platform_populate(NULL, of_default_bus_match_table, | ||
| 42 | pxa3xx_auxdata_lookup, NULL); | ||
| 43 | } | ||
| 44 | |||
| 45 | static const char *pxa3xx_dt_board_compat[] __initdata = { | ||
| 46 | "marvell,pxa300", | ||
| 47 | "marvell,pxa310", | ||
| 48 | "marvell,pxa320", | ||
| 49 | NULL, | ||
| 50 | }; | ||
| 51 | #endif | ||
| 52 | |||
| 53 | #ifdef CONFIG_PXA3xx | ||
| 54 | DT_MACHINE_START(PXA_DT, "Marvell PXA3xx (Device Tree Support)") | ||
| 55 | .map_io = pxa3xx_map_io, | ||
| 56 | .init_irq = pxa3xx_dt_init_irq, | ||
| 57 | .handle_irq = pxa3xx_handle_irq, | ||
| 58 | .timer = &pxa_timer, | ||
| 59 | .restart = pxa_restart, | ||
| 60 | .init_machine = pxa3xx_dt_init, | ||
| 61 | .dt_compat = pxa3xx_dt_board_compat, | ||
| 62 | MACHINE_END | ||
| 63 | #endif | ||
diff --git a/arch/arm/mach-pxa/pxa3xx.c b/arch/arm/mach-pxa/pxa3xx.c index dffb7e813d98..ff9c9574ec3e 100644 --- a/arch/arm/mach-pxa/pxa3xx.c +++ b/arch/arm/mach-pxa/pxa3xx.c | |||
| @@ -19,6 +19,7 @@ | |||
| 19 | #include <linux/platform_device.h> | 19 | #include <linux/platform_device.h> |
| 20 | #include <linux/irq.h> | 20 | #include <linux/irq.h> |
| 21 | #include <linux/io.h> | 21 | #include <linux/io.h> |
| 22 | #include <linux/of.h> | ||
| 22 | #include <linux/syscore_ops.h> | 23 | #include <linux/syscore_ops.h> |
| 23 | #include <linux/i2c/pxa-i2c.h> | 24 | #include <linux/i2c/pxa-i2c.h> |
| 24 | 25 | ||
| @@ -40,6 +41,8 @@ | |||
| 40 | #define PECR_IE(n) ((1 << ((n) * 2)) << 28) | 41 | #define PECR_IE(n) ((1 << ((n) * 2)) << 28) |
| 41 | #define PECR_IS(n) ((1 << ((n) * 2)) << 29) | 42 | #define PECR_IS(n) ((1 << ((n) * 2)) << 29) |
| 42 | 43 | ||
| 44 | extern void __init pxa_dt_irq_init(int (*fn)(struct irq_data *, unsigned int)); | ||
| 45 | |||
| 43 | static DEFINE_PXA3_CKEN(pxa3xx_ffuart, FFUART, 14857000, 1); | 46 | static DEFINE_PXA3_CKEN(pxa3xx_ffuart, FFUART, 14857000, 1); |
| 44 | static DEFINE_PXA3_CKEN(pxa3xx_btuart, BTUART, 14857000, 1); | 47 | static DEFINE_PXA3_CKEN(pxa3xx_btuart, BTUART, 14857000, 1); |
| 45 | static DEFINE_PXA3_CKEN(pxa3xx_stuart, STUART, 14857000, 1); | 48 | static DEFINE_PXA3_CKEN(pxa3xx_stuart, STUART, 14857000, 1); |
| @@ -382,7 +385,7 @@ static void __init pxa_init_ext_wakeup_irq(int (*fn)(struct irq_data *, | |||
| 382 | pxa_ext_wakeup_chip.irq_set_wake = fn; | 385 | pxa_ext_wakeup_chip.irq_set_wake = fn; |
| 383 | } | 386 | } |
| 384 | 387 | ||
| 385 | void __init pxa3xx_init_irq(void) | 388 | static void __init __pxa3xx_init_irq(void) |
| 386 | { | 389 | { |
| 387 | /* enable CP6 access */ | 390 | /* enable CP6 access */ |
| 388 | u32 value; | 391 | u32 value; |
| @@ -390,10 +393,23 @@ void __init pxa3xx_init_irq(void) | |||
| 390 | value |= (1 << 6); | 393 | value |= (1 << 6); |
| 391 | __asm__ __volatile__("mcr p15, 0, %0, c15, c1, 0\n": :"r"(value)); | 394 | __asm__ __volatile__("mcr p15, 0, %0, c15, c1, 0\n": :"r"(value)); |
| 392 | 395 | ||
| 393 | pxa_init_irq(56, pxa3xx_set_wake); | ||
| 394 | pxa_init_ext_wakeup_irq(pxa3xx_set_wake); | 396 | pxa_init_ext_wakeup_irq(pxa3xx_set_wake); |
| 395 | } | 397 | } |
| 396 | 398 | ||
| 399 | void __init pxa3xx_init_irq(void) | ||
| 400 | { | ||
| 401 | __pxa3xx_init_irq(); | ||
| 402 | pxa_init_irq(56, pxa3xx_set_wake); | ||
| 403 | } | ||
| 404 | |||
| 405 | #ifdef CONFIG_OF | ||
| 406 | void __init pxa3xx_dt_init_irq(void) | ||
| 407 | { | ||
| 408 | __pxa3xx_init_irq(); | ||
| 409 | pxa_dt_irq_init(pxa3xx_set_wake); | ||
| 410 | } | ||
| 411 | #endif /* CONFIG_OF */ | ||
| 412 | |||
| 397 | static struct map_desc pxa3xx_io_desc[] __initdata = { | 413 | static struct map_desc pxa3xx_io_desc[] __initdata = { |
| 398 | { /* Mem Ctl */ | 414 | { /* Mem Ctl */ |
| 399 | .virtual = (unsigned long)SMEMC_VIRT, | 415 | .virtual = (unsigned long)SMEMC_VIRT, |
| @@ -466,7 +482,8 @@ static int __init pxa3xx_init(void) | |||
| 466 | register_syscore_ops(&pxa3xx_mfp_syscore_ops); | 482 | register_syscore_ops(&pxa3xx_mfp_syscore_ops); |
| 467 | register_syscore_ops(&pxa3xx_clock_syscore_ops); | 483 | register_syscore_ops(&pxa3xx_clock_syscore_ops); |
| 468 | 484 | ||
| 469 | ret = platform_add_devices(devices, ARRAY_SIZE(devices)); | 485 | if (!of_have_populated_dt()) |
| 486 | ret = platform_add_devices(devices, ARRAY_SIZE(devices)); | ||
| 470 | } | 487 | } |
| 471 | 488 | ||
| 472 | return ret; | 489 | return ret; |
diff --git a/arch/arm/mach-realview/core.c b/arch/arm/mach-realview/core.c index 45868bb43cbd..ff007d15e0ec 100644 --- a/arch/arm/mach-realview/core.c +++ b/arch/arm/mach-realview/core.c | |||
| @@ -30,7 +30,6 @@ | |||
| 30 | #include <linux/ata_platform.h> | 30 | #include <linux/ata_platform.h> |
| 31 | #include <linux/amba/mmci.h> | 31 | #include <linux/amba/mmci.h> |
| 32 | #include <linux/gfp.h> | 32 | #include <linux/gfp.h> |
| 33 | #include <linux/clkdev.h> | ||
| 34 | #include <linux/mtd/physmap.h> | 33 | #include <linux/mtd/physmap.h> |
| 35 | 34 | ||
| 36 | #include <mach/hardware.h> | 35 | #include <mach/hardware.h> |
| @@ -226,115 +225,10 @@ struct mmci_platform_data realview_mmc1_plat_data = { | |||
| 226 | .cd_invert = true, | 225 | .cd_invert = true, |
| 227 | }; | 226 | }; |
| 228 | 227 | ||
| 229 | /* | ||
| 230 | * Clock handling | ||
| 231 | */ | ||
| 232 | static const struct icst_params realview_oscvco_params = { | ||
| 233 | .ref = 24000000, | ||
| 234 | .vco_max = ICST307_VCO_MAX, | ||
| 235 | .vco_min = ICST307_VCO_MIN, | ||
| 236 | .vd_min = 4 + 8, | ||
| 237 | .vd_max = 511 + 8, | ||
| 238 | .rd_min = 1 + 2, | ||
| 239 | .rd_max = 127 + 2, | ||
| 240 | .s2div = icst307_s2div, | ||
| 241 | .idx2s = icst307_idx2s, | ||
| 242 | }; | ||
| 243 | |||
| 244 | static void realview_oscvco_set(struct clk *clk, struct icst_vco vco) | ||
| 245 | { | ||
| 246 | void __iomem *sys_lock = __io_address(REALVIEW_SYS_BASE) + REALVIEW_SYS_LOCK_OFFSET; | ||
| 247 | u32 val; | ||
| 248 | |||
| 249 | val = readl(clk->vcoreg) & ~0x7ffff; | ||
| 250 | val |= vco.v | (vco.r << 9) | (vco.s << 16); | ||
| 251 | |||
| 252 | writel(0xa05f, sys_lock); | ||
| 253 | writel(val, clk->vcoreg); | ||
| 254 | writel(0, sys_lock); | ||
| 255 | } | ||
| 256 | |||
| 257 | static const struct clk_ops oscvco_clk_ops = { | ||
| 258 | .round = icst_clk_round, | ||
| 259 | .set = icst_clk_set, | ||
| 260 | .setvco = realview_oscvco_set, | ||
| 261 | }; | ||
| 262 | |||
| 263 | static struct clk oscvco_clk = { | ||
| 264 | .ops = &oscvco_clk_ops, | ||
| 265 | .params = &realview_oscvco_params, | ||
| 266 | }; | ||
| 267 | |||
| 268 | /* | ||
| 269 | * These are fixed clocks. | ||
| 270 | */ | ||
| 271 | static struct clk ref24_clk = { | ||
| 272 | .rate = 24000000, | ||
| 273 | }; | ||
| 274 | |||
| 275 | static struct clk sp804_clk = { | ||
| 276 | .rate = 1000000, | ||
| 277 | }; | ||
| 278 | |||
| 279 | static struct clk dummy_apb_pclk; | ||
| 280 | |||
| 281 | static struct clk_lookup lookups[] = { | ||
| 282 | { /* Bus clock */ | ||
| 283 | .con_id = "apb_pclk", | ||
| 284 | .clk = &dummy_apb_pclk, | ||
| 285 | }, { /* UART0 */ | ||
| 286 | .dev_id = "dev:uart0", | ||
| 287 | .clk = &ref24_clk, | ||
| 288 | }, { /* UART1 */ | ||
| 289 | .dev_id = "dev:uart1", | ||
| 290 | .clk = &ref24_clk, | ||
| 291 | }, { /* UART2 */ | ||
| 292 | .dev_id = "dev:uart2", | ||
| 293 | .clk = &ref24_clk, | ||
| 294 | }, { /* UART3 */ | ||
| 295 | .dev_id = "fpga:uart3", | ||
| 296 | .clk = &ref24_clk, | ||
| 297 | }, { /* UART3 is on the dev chip in PB1176 */ | ||
| 298 | .dev_id = "dev:uart3", | ||
| 299 | .clk = &ref24_clk, | ||
| 300 | }, { /* UART4 only exists in PB1176 */ | ||
| 301 | .dev_id = "fpga:uart4", | ||
| 302 | .clk = &ref24_clk, | ||
| 303 | }, { /* KMI0 */ | ||
| 304 | .dev_id = "fpga:kmi0", | ||
| 305 | .clk = &ref24_clk, | ||
| 306 | }, { /* KMI1 */ | ||
| 307 | .dev_id = "fpga:kmi1", | ||
| 308 | .clk = &ref24_clk, | ||
| 309 | }, { /* MMC0 */ | ||
| 310 | .dev_id = "fpga:mmc0", | ||
| 311 | .clk = &ref24_clk, | ||
| 312 | }, { /* CLCD is in the PB1176 and EB DevChip */ | ||
| 313 | .dev_id = "dev:clcd", | ||
| 314 | .clk = &oscvco_clk, | ||
| 315 | }, { /* PB:CLCD */ | ||
| 316 | .dev_id = "issp:clcd", | ||
| 317 | .clk = &oscvco_clk, | ||
| 318 | }, { /* SSP */ | ||
| 319 | .dev_id = "dev:ssp0", | ||
| 320 | .clk = &ref24_clk, | ||
| 321 | }, { /* SP804 timers */ | ||
| 322 | .dev_id = "sp804", | ||
| 323 | .clk = &sp804_clk, | ||
| 324 | }, | ||
| 325 | }; | ||
| 326 | |||
| 327 | void __init realview_init_early(void) | 228 | void __init realview_init_early(void) |
| 328 | { | 229 | { |
| 329 | void __iomem *sys = __io_address(REALVIEW_SYS_BASE); | 230 | void __iomem *sys = __io_address(REALVIEW_SYS_BASE); |
| 330 | 231 | ||
| 331 | if (machine_is_realview_pb1176()) | ||
| 332 | oscvco_clk.vcoreg = sys + REALVIEW_SYS_OSC0_OFFSET; | ||
| 333 | else | ||
| 334 | oscvco_clk.vcoreg = sys + REALVIEW_SYS_OSC4_OFFSET; | ||
| 335 | |||
| 336 | clkdev_add_table(lookups, ARRAY_SIZE(lookups)); | ||
| 337 | |||
| 338 | versatile_sched_clock_init(sys + REALVIEW_SYS_24MHz_OFFSET, 24000000); | 232 | versatile_sched_clock_init(sys + REALVIEW_SYS_24MHz_OFFSET, 24000000); |
| 339 | } | 233 | } |
| 340 | 234 | ||
diff --git a/arch/arm/mach-realview/include/mach/clkdev.h b/arch/arm/mach-realview/include/mach/clkdev.h deleted file mode 100644 index e58d0771b64e..000000000000 --- a/arch/arm/mach-realview/include/mach/clkdev.h +++ /dev/null | |||
| @@ -1,16 +0,0 @@ | |||
| 1 | #ifndef __ASM_MACH_CLKDEV_H | ||
| 2 | #define __ASM_MACH_CLKDEV_H | ||
| 3 | |||
| 4 | #include <plat/clock.h> | ||
| 5 | |||
| 6 | struct clk { | ||
| 7 | unsigned long rate; | ||
| 8 | const struct clk_ops *ops; | ||
| 9 | const struct icst_params *params; | ||
| 10 | void __iomem *vcoreg; | ||
| 11 | }; | ||
| 12 | |||
| 13 | #define __clk_get(clk) ({ 1; }) | ||
| 14 | #define __clk_put(clk) do { } while (0) | ||
| 15 | |||
| 16 | #endif | ||
diff --git a/arch/arm/mach-realview/realview_eb.c b/arch/arm/mach-realview/realview_eb.c index baf382c5e776..a33e33b76733 100644 --- a/arch/arm/mach-realview/realview_eb.c +++ b/arch/arm/mach-realview/realview_eb.c | |||
| @@ -27,6 +27,7 @@ | |||
| 27 | #include <linux/amba/mmci.h> | 27 | #include <linux/amba/mmci.h> |
| 28 | #include <linux/amba/pl022.h> | 28 | #include <linux/amba/pl022.h> |
| 29 | #include <linux/io.h> | 29 | #include <linux/io.h> |
| 30 | #include <linux/platform_data/clk-realview.h> | ||
| 30 | 31 | ||
| 31 | #include <mach/hardware.h> | 32 | #include <mach/hardware.h> |
| 32 | #include <asm/irq.h> | 33 | #include <asm/irq.h> |
| @@ -414,6 +415,7 @@ static void __init realview_eb_timer_init(void) | |||
| 414 | else | 415 | else |
| 415 | timer_irq = IRQ_EB_TIMER0_1; | 416 | timer_irq = IRQ_EB_TIMER0_1; |
| 416 | 417 | ||
| 418 | realview_clk_init(__io_address(REALVIEW_SYS_BASE), false); | ||
| 417 | realview_timer_init(timer_irq); | 419 | realview_timer_init(timer_irq); |
| 418 | realview_eb_twd_init(); | 420 | realview_eb_twd_init(); |
| 419 | } | 421 | } |
diff --git a/arch/arm/mach-realview/realview_pb1176.c b/arch/arm/mach-realview/realview_pb1176.c index b1d7cafa1a6d..f0298cbc203e 100644 --- a/arch/arm/mach-realview/realview_pb1176.c +++ b/arch/arm/mach-realview/realview_pb1176.c | |||
| @@ -29,6 +29,7 @@ | |||
| 29 | #include <linux/mtd/physmap.h> | 29 | #include <linux/mtd/physmap.h> |
| 30 | #include <linux/mtd/partitions.h> | 30 | #include <linux/mtd/partitions.h> |
| 31 | #include <linux/io.h> | 31 | #include <linux/io.h> |
| 32 | #include <linux/platform_data/clk-realview.h> | ||
| 32 | 33 | ||
| 33 | #include <mach/hardware.h> | 34 | #include <mach/hardware.h> |
| 34 | #include <asm/irq.h> | 35 | #include <asm/irq.h> |
| @@ -326,6 +327,7 @@ static void __init realview_pb1176_timer_init(void) | |||
| 326 | timer2_va_base = __io_address(REALVIEW_PB1176_TIMER2_3_BASE); | 327 | timer2_va_base = __io_address(REALVIEW_PB1176_TIMER2_3_BASE); |
| 327 | timer3_va_base = __io_address(REALVIEW_PB1176_TIMER2_3_BASE) + 0x20; | 328 | timer3_va_base = __io_address(REALVIEW_PB1176_TIMER2_3_BASE) + 0x20; |
| 328 | 329 | ||
| 330 | realview_clk_init(__io_address(REALVIEW_SYS_BASE), true); | ||
| 329 | realview_timer_init(IRQ_DC1176_TIMER0); | 331 | realview_timer_init(IRQ_DC1176_TIMER0); |
| 330 | } | 332 | } |
| 331 | 333 | ||
diff --git a/arch/arm/mach-realview/realview_pb11mp.c b/arch/arm/mach-realview/realview_pb11mp.c index a98c536e3327..1f019f76f7b5 100644 --- a/arch/arm/mach-realview/realview_pb11mp.c +++ b/arch/arm/mach-realview/realview_pb11mp.c | |||
| @@ -27,6 +27,7 @@ | |||
| 27 | #include <linux/amba/mmci.h> | 27 | #include <linux/amba/mmci.h> |
| 28 | #include <linux/amba/pl022.h> | 28 | #include <linux/amba/pl022.h> |
| 29 | #include <linux/io.h> | 29 | #include <linux/io.h> |
| 30 | #include <linux/platform_data/clk-realview.h> | ||
| 30 | 31 | ||
| 31 | #include <mach/hardware.h> | 32 | #include <mach/hardware.h> |
| 32 | #include <asm/irq.h> | 33 | #include <asm/irq.h> |
| @@ -312,6 +313,7 @@ static void __init realview_pb11mp_timer_init(void) | |||
| 312 | timer2_va_base = __io_address(REALVIEW_PB11MP_TIMER2_3_BASE); | 313 | timer2_va_base = __io_address(REALVIEW_PB11MP_TIMER2_3_BASE); |
| 313 | timer3_va_base = __io_address(REALVIEW_PB11MP_TIMER2_3_BASE) + 0x20; | 314 | timer3_va_base = __io_address(REALVIEW_PB11MP_TIMER2_3_BASE) + 0x20; |
| 314 | 315 | ||
| 316 | realview_clk_init(__io_address(REALVIEW_SYS_BASE), false); | ||
| 315 | realview_timer_init(IRQ_TC11MP_TIMER0_1); | 317 | realview_timer_init(IRQ_TC11MP_TIMER0_1); |
| 316 | realview_pb11mp_twd_init(); | 318 | realview_pb11mp_twd_init(); |
| 317 | } | 319 | } |
diff --git a/arch/arm/mach-realview/realview_pba8.c b/arch/arm/mach-realview/realview_pba8.c index 59650174e6ed..5032775dbfee 100644 --- a/arch/arm/mach-realview/realview_pba8.c +++ b/arch/arm/mach-realview/realview_pba8.c | |||
| @@ -27,6 +27,7 @@ | |||
| 27 | #include <linux/amba/mmci.h> | 27 | #include <linux/amba/mmci.h> |
| 28 | #include <linux/amba/pl022.h> | 28 | #include <linux/amba/pl022.h> |
| 29 | #include <linux/io.h> | 29 | #include <linux/io.h> |
| 30 | #include <linux/platform_data/clk-realview.h> | ||
| 30 | 31 | ||
| 31 | #include <asm/irq.h> | 32 | #include <asm/irq.h> |
| 32 | #include <asm/leds.h> | 33 | #include <asm/leds.h> |
| @@ -261,6 +262,7 @@ static void __init realview_pba8_timer_init(void) | |||
| 261 | timer2_va_base = __io_address(REALVIEW_PBA8_TIMER2_3_BASE); | 262 | timer2_va_base = __io_address(REALVIEW_PBA8_TIMER2_3_BASE); |
| 262 | timer3_va_base = __io_address(REALVIEW_PBA8_TIMER2_3_BASE) + 0x20; | 263 | timer3_va_base = __io_address(REALVIEW_PBA8_TIMER2_3_BASE) + 0x20; |
| 263 | 264 | ||
| 265 | realview_clk_init(__io_address(REALVIEW_SYS_BASE), false); | ||
| 264 | realview_timer_init(IRQ_PBA8_TIMER0_1); | 266 | realview_timer_init(IRQ_PBA8_TIMER0_1); |
| 265 | } | 267 | } |
| 266 | 268 | ||
diff --git a/arch/arm/mach-realview/realview_pbx.c b/arch/arm/mach-realview/realview_pbx.c index 3f2f605624e9..de64ba0ddb95 100644 --- a/arch/arm/mach-realview/realview_pbx.c +++ b/arch/arm/mach-realview/realview_pbx.c | |||
| @@ -26,6 +26,7 @@ | |||
| 26 | #include <linux/amba/mmci.h> | 26 | #include <linux/amba/mmci.h> |
| 27 | #include <linux/amba/pl022.h> | 27 | #include <linux/amba/pl022.h> |
| 28 | #include <linux/io.h> | 28 | #include <linux/io.h> |
| 29 | #include <linux/platform_data/clk-realview.h> | ||
| 29 | 30 | ||
| 30 | #include <asm/irq.h> | 31 | #include <asm/irq.h> |
| 31 | #include <asm/leds.h> | 32 | #include <asm/leds.h> |
| @@ -320,6 +321,7 @@ static void __init realview_pbx_timer_init(void) | |||
| 320 | timer2_va_base = __io_address(REALVIEW_PBX_TIMER2_3_BASE); | 321 | timer2_va_base = __io_address(REALVIEW_PBX_TIMER2_3_BASE); |
| 321 | timer3_va_base = __io_address(REALVIEW_PBX_TIMER2_3_BASE) + 0x20; | 322 | timer3_va_base = __io_address(REALVIEW_PBX_TIMER2_3_BASE) + 0x20; |
| 322 | 323 | ||
| 324 | realview_clk_init(__io_address(REALVIEW_SYS_BASE), false); | ||
| 323 | realview_timer_init(IRQ_PBX_TIMER0_1); | 325 | realview_timer_init(IRQ_PBX_TIMER0_1); |
| 324 | realview_pbx_twd_init(); | 326 | realview_pbx_twd_init(); |
| 325 | } | 327 | } |
diff --git a/arch/arm/mach-shmobile/Makefile.boot b/arch/arm/mach-shmobile/Makefile.boot index 498efd99338d..5e410192ffb8 100644 --- a/arch/arm/mach-shmobile/Makefile.boot +++ b/arch/arm/mach-shmobile/Makefile.boot | |||
| @@ -7,3 +7,7 @@ __ZRELADDR := $(shell /bin/bash -c 'printf "0x%08x" \ | |||
| 7 | # | 7 | # |
| 8 | #params_phys-y (Instead: Pass atags pointer in r2) | 8 | #params_phys-y (Instead: Pass atags pointer in r2) |
| 9 | #initrd_phys-y (Instead: Use compiled-in initramfs) | 9 | #initrd_phys-y (Instead: Use compiled-in initramfs) |
| 10 | |||
| 11 | dtb-$(CONFIG_MACH_KZM9G) += sh73a0-kzm9g.dtb | ||
| 12 | dtb-$(CONFIG_MACH_KZM9D) += emev2-kzm9d.dtb | ||
| 13 | dtb-$(CONFIG_MACH_ARMADILLO800EVA) += r8a7740-armadillo800eva.dtb | ||
diff --git a/arch/arm/mach-tegra/Makefile.boot b/arch/arm/mach-tegra/Makefile.boot index 7a1bb62ddcf0..54c16aade475 100644 --- a/arch/arm/mach-tegra/Makefile.boot +++ b/arch/arm/mach-tegra/Makefile.boot | |||
| @@ -3,9 +3,13 @@ params_phys-$(CONFIG_ARCH_TEGRA_2x_SOC) := 0x00000100 | |||
| 3 | initrd_phys-$(CONFIG_ARCH_TEGRA_2x_SOC) := 0x00800000 | 3 | initrd_phys-$(CONFIG_ARCH_TEGRA_2x_SOC) := 0x00800000 |
| 4 | 4 | ||
| 5 | dtb-$(CONFIG_ARCH_TEGRA_2x_SOC) += tegra20-harmony.dtb | 5 | dtb-$(CONFIG_ARCH_TEGRA_2x_SOC) += tegra20-harmony.dtb |
| 6 | dtb-$(CONFIG_ARCH_TEGRA_2x_SOC) += tegra20-medcom-wide.dtb | ||
| 6 | dtb-$(CONFIG_ARCH_TEGRA_2x_SOC) += tegra20-paz00.dtb | 7 | dtb-$(CONFIG_ARCH_TEGRA_2x_SOC) += tegra20-paz00.dtb |
| 8 | dtb-$(CONFIG_ARCH_TEGRA_2x_SOC) += tegra20-plutux.dtb | ||
| 7 | dtb-$(CONFIG_ARCH_TEGRA_2x_SOC) += tegra20-seaboard.dtb | 9 | dtb-$(CONFIG_ARCH_TEGRA_2x_SOC) += tegra20-seaboard.dtb |
| 10 | dtb-$(CONFIG_ARCH_TEGRA_2x_SOC) += tegra20-tec.dtb | ||
| 8 | dtb-$(CONFIG_ARCH_TEGRA_2x_SOC) += tegra20-trimslice.dtb | 11 | dtb-$(CONFIG_ARCH_TEGRA_2x_SOC) += tegra20-trimslice.dtb |
| 9 | dtb-$(CONFIG_ARCH_TEGRA_2x_SOC) += tegra20-ventana.dtb | 12 | dtb-$(CONFIG_ARCH_TEGRA_2x_SOC) += tegra20-ventana.dtb |
| 10 | dtb-$(CONFIG_ARCH_TEGRA_2x_SOC) += tegra20-whistler.dtb | 13 | dtb-$(CONFIG_ARCH_TEGRA_2x_SOC) += tegra20-whistler.dtb |
| 11 | dtb-$(CONFIG_ARCH_TEGRA_3x_SOC) += tegra30-cardhu.dtb | 14 | dtb-$(CONFIG_ARCH_TEGRA_3x_SOC) += tegra30-cardhu-a02.dtb |
| 15 | dtb-$(CONFIG_ARCH_TEGRA_3x_SOC) += tegra30-cardhu-a04.dtb | ||
diff --git a/arch/arm/mach-ux500/Kconfig b/arch/arm/mach-ux500/Kconfig index 53d3d46dec12..a258996d954b 100644 --- a/arch/arm/mach-ux500/Kconfig +++ b/arch/arm/mach-ux500/Kconfig | |||
| @@ -11,6 +11,7 @@ config UX500_SOC_COMMON | |||
| 11 | select CACHE_L2X0 | 11 | select CACHE_L2X0 |
| 12 | select PINCTRL | 12 | select PINCTRL |
| 13 | select PINCTRL_NOMADIK | 13 | select PINCTRL_NOMADIK |
| 14 | select COMMON_CLK | ||
| 14 | 15 | ||
| 15 | config UX500_SOC_DB8500 | 16 | config UX500_SOC_DB8500 |
| 16 | bool | 17 | bool |
diff --git a/arch/arm/mach-ux500/Makefile b/arch/arm/mach-ux500/Makefile index 026086ff9e6c..f24710dfc395 100644 --- a/arch/arm/mach-ux500/Makefile +++ b/arch/arm/mach-ux500/Makefile | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | # Makefile for the linux kernel, U8500 machine. | 2 | # Makefile for the linux kernel, U8500 machine. |
| 3 | # | 3 | # |
| 4 | 4 | ||
| 5 | obj-y := clock.o cpu.o devices.o devices-common.o \ | 5 | obj-y := cpu.o devices.o devices-common.o \ |
| 6 | id.o usb.o timer.o | 6 | id.o usb.o timer.o |
| 7 | obj-$(CONFIG_CPU_IDLE) += cpuidle.o | 7 | obj-$(CONFIG_CPU_IDLE) += cpuidle.o |
| 8 | obj-$(CONFIG_CACHE_L2X0) += cache-l2x0.o | 8 | obj-$(CONFIG_CACHE_L2X0) += cache-l2x0.o |
| @@ -12,6 +12,6 @@ obj-$(CONFIG_MACH_MOP500) += board-mop500.o board-mop500-sdi.o \ | |||
| 12 | board-mop500-uib.o board-mop500-stuib.o \ | 12 | board-mop500-uib.o board-mop500-stuib.o \ |
| 13 | board-mop500-u8500uib.o \ | 13 | board-mop500-u8500uib.o \ |
| 14 | board-mop500-pins.o \ | 14 | board-mop500-pins.o \ |
| 15 | board-mop500-msp.o | 15 | board-mop500-audio.o |
| 16 | obj-$(CONFIG_SMP) += platsmp.o headsmp.o | 16 | obj-$(CONFIG_SMP) += platsmp.o headsmp.o |
| 17 | obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o | 17 | obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o |
diff --git a/arch/arm/mach-ux500/board-mop500-msp.c b/arch/arm/mach-ux500/board-mop500-audio.c index df15646036aa..070629a95625 100644 --- a/arch/arm/mach-ux500/board-mop500-msp.c +++ b/arch/arm/mach-ux500/board-mop500-audio.c | |||
| @@ -7,7 +7,6 @@ | |||
| 7 | #include <linux/platform_device.h> | 7 | #include <linux/platform_device.h> |
| 8 | #include <linux/init.h> | 8 | #include <linux/init.h> |
| 9 | #include <linux/gpio.h> | 9 | #include <linux/gpio.h> |
| 10 | #include <linux/pinctrl/consumer.h> | ||
| 11 | 10 | ||
| 12 | #include <plat/gpio-nomadik.h> | 11 | #include <plat/gpio-nomadik.h> |
| 13 | #include <plat/pincfg.h> | 12 | #include <plat/pincfg.h> |
| @@ -23,53 +22,6 @@ | |||
| 23 | #include "devices-db8500.h" | 22 | #include "devices-db8500.h" |
| 24 | #include "pins-db8500.h" | 23 | #include "pins-db8500.h" |
| 25 | 24 | ||
| 26 | /* MSP1/3 Tx/Rx usage protection */ | ||
| 27 | static DEFINE_SPINLOCK(msp_rxtx_lock); | ||
| 28 | |||
| 29 | /* Reference Count */ | ||
| 30 | static int msp_rxtx_ref; | ||
| 31 | |||
| 32 | /* Pin modes */ | ||
| 33 | struct pinctrl *msp1_p; | ||
| 34 | struct pinctrl_state *msp1_def; | ||
| 35 | struct pinctrl_state *msp1_sleep; | ||
| 36 | |||
| 37 | int msp13_i2s_init(void) | ||
| 38 | { | ||
| 39 | int retval = 0; | ||
| 40 | unsigned long flags; | ||
| 41 | |||
| 42 | spin_lock_irqsave(&msp_rxtx_lock, flags); | ||
| 43 | if (msp_rxtx_ref == 0 && !(IS_ERR(msp1_p) || IS_ERR(msp1_def))) { | ||
| 44 | retval = pinctrl_select_state(msp1_p, msp1_def); | ||
| 45 | if (retval) | ||
| 46 | pr_err("could not set MSP1 defstate\n"); | ||
| 47 | } | ||
| 48 | if (!retval) | ||
| 49 | msp_rxtx_ref++; | ||
| 50 | spin_unlock_irqrestore(&msp_rxtx_lock, flags); | ||
| 51 | |||
| 52 | return retval; | ||
| 53 | } | ||
| 54 | |||
| 55 | int msp13_i2s_exit(void) | ||
| 56 | { | ||
| 57 | int retval = 0; | ||
| 58 | unsigned long flags; | ||
| 59 | |||
| 60 | spin_lock_irqsave(&msp_rxtx_lock, flags); | ||
| 61 | WARN_ON(!msp_rxtx_ref); | ||
| 62 | msp_rxtx_ref--; | ||
| 63 | if (msp_rxtx_ref == 0 && !(IS_ERR(msp1_p) || IS_ERR(msp1_sleep))) { | ||
| 64 | retval = pinctrl_select_state(msp1_p, msp1_sleep); | ||
| 65 | if (retval) | ||
| 66 | pr_err("could not set MSP1 sleepstate\n"); | ||
| 67 | } | ||
| 68 | spin_unlock_irqrestore(&msp_rxtx_lock, flags); | ||
| 69 | |||
| 70 | return retval; | ||
| 71 | } | ||
| 72 | |||
| 73 | static struct stedma40_chan_cfg msp0_dma_rx = { | 25 | static struct stedma40_chan_cfg msp0_dma_rx = { |
| 74 | .high_priority = true, | 26 | .high_priority = true, |
| 75 | .dir = STEDMA40_PERIPH_TO_MEM, | 27 | .dir = STEDMA40_PERIPH_TO_MEM, |
| @@ -96,7 +48,7 @@ static struct stedma40_chan_cfg msp0_dma_tx = { | |||
| 96 | /* data_width is set during configuration */ | 48 | /* data_width is set during configuration */ |
| 97 | }; | 49 | }; |
| 98 | 50 | ||
| 99 | static struct msp_i2s_platform_data msp0_platform_data = { | 51 | struct msp_i2s_platform_data msp0_platform_data = { |
| 100 | .id = MSP_I2S_0, | 52 | .id = MSP_I2S_0, |
| 101 | .msp_i2s_dma_rx = &msp0_dma_rx, | 53 | .msp_i2s_dma_rx = &msp0_dma_rx, |
| 102 | .msp_i2s_dma_tx = &msp0_dma_tx, | 54 | .msp_i2s_dma_tx = &msp0_dma_tx, |
| @@ -128,12 +80,10 @@ static struct stedma40_chan_cfg msp1_dma_tx = { | |||
| 128 | /* data_width is set during configuration */ | 80 | /* data_width is set during configuration */ |
| 129 | }; | 81 | }; |
| 130 | 82 | ||
| 131 | static struct msp_i2s_platform_data msp1_platform_data = { | 83 | struct msp_i2s_platform_data msp1_platform_data = { |
| 132 | .id = MSP_I2S_1, | 84 | .id = MSP_I2S_1, |
| 133 | .msp_i2s_dma_rx = NULL, | 85 | .msp_i2s_dma_rx = NULL, |
| 134 | .msp_i2s_dma_tx = &msp1_dma_tx, | 86 | .msp_i2s_dma_tx = &msp1_dma_tx, |
| 135 | .msp_i2s_init = msp13_i2s_init, | ||
| 136 | .msp_i2s_exit = msp13_i2s_exit, | ||
| 137 | }; | 87 | }; |
| 138 | 88 | ||
| 139 | static struct stedma40_chan_cfg msp2_dma_rx = { | 89 | static struct stedma40_chan_cfg msp2_dma_rx = { |
| @@ -193,11 +143,11 @@ static struct platform_device *db8500_add_msp_i2s(struct device *parent, | |||
| 193 | 143 | ||
| 194 | /* Platform device for ASoC MOP500 machine */ | 144 | /* Platform device for ASoC MOP500 machine */ |
| 195 | static struct platform_device snd_soc_mop500 = { | 145 | static struct platform_device snd_soc_mop500 = { |
| 196 | .name = "snd-soc-mop500", | 146 | .name = "snd-soc-mop500", |
| 197 | .id = 0, | 147 | .id = 0, |
| 198 | .dev = { | 148 | .dev = { |
| 199 | .platform_data = NULL, | 149 | .platform_data = NULL, |
| 200 | }, | 150 | }, |
| 201 | }; | 151 | }; |
| 202 | 152 | ||
| 203 | /* Platform device for Ux500-PCM */ | 153 | /* Platform device for Ux500-PCM */ |
| @@ -209,59 +159,37 @@ static struct platform_device ux500_pcm = { | |||
| 209 | }, | 159 | }, |
| 210 | }; | 160 | }; |
| 211 | 161 | ||
| 212 | static struct msp_i2s_platform_data msp2_platform_data = { | 162 | struct msp_i2s_platform_data msp2_platform_data = { |
| 213 | .id = MSP_I2S_2, | 163 | .id = MSP_I2S_2, |
| 214 | .msp_i2s_dma_rx = &msp2_dma_rx, | 164 | .msp_i2s_dma_rx = &msp2_dma_rx, |
| 215 | .msp_i2s_dma_tx = &msp2_dma_tx, | 165 | .msp_i2s_dma_tx = &msp2_dma_tx, |
| 216 | }; | 166 | }; |
| 217 | 167 | ||
| 218 | static struct msp_i2s_platform_data msp3_platform_data = { | 168 | struct msp_i2s_platform_data msp3_platform_data = { |
| 219 | .id = MSP_I2S_3, | 169 | .id = MSP_I2S_3, |
| 220 | .msp_i2s_dma_rx = &msp1_dma_rx, | 170 | .msp_i2s_dma_rx = &msp1_dma_rx, |
| 221 | .msp_i2s_dma_tx = NULL, | 171 | .msp_i2s_dma_tx = NULL, |
| 222 | .msp_i2s_init = msp13_i2s_init, | ||
| 223 | .msp_i2s_exit = msp13_i2s_exit, | ||
| 224 | }; | 172 | }; |
| 225 | 173 | ||
| 226 | int mop500_msp_init(struct device *parent) | 174 | void mop500_audio_init(struct device *parent) |
| 227 | { | 175 | { |
| 228 | struct platform_device *msp1; | ||
| 229 | |||
| 230 | pr_info("%s: Register platform-device 'snd-soc-mop500'.\n", __func__); | 176 | pr_info("%s: Register platform-device 'snd-soc-mop500'.\n", __func__); |
| 231 | platform_device_register(&snd_soc_mop500); | 177 | platform_device_register(&snd_soc_mop500); |
| 232 | 178 | ||
| 233 | pr_info("Initialize MSP I2S-devices.\n"); | 179 | pr_info("Initialize MSP I2S-devices.\n"); |
| 234 | db8500_add_msp_i2s(parent, 0, U8500_MSP0_BASE, IRQ_DB8500_MSP0, | 180 | db8500_add_msp_i2s(parent, 0, U8500_MSP0_BASE, IRQ_DB8500_MSP0, |
| 235 | &msp0_platform_data); | 181 | &msp0_platform_data); |
| 236 | msp1 = db8500_add_msp_i2s(parent, 1, U8500_MSP1_BASE, IRQ_DB8500_MSP1, | 182 | db8500_add_msp_i2s(parent, 1, U8500_MSP1_BASE, IRQ_DB8500_MSP1, |
| 237 | &msp1_platform_data); | 183 | &msp1_platform_data); |
| 238 | db8500_add_msp_i2s(parent, 2, U8500_MSP2_BASE, IRQ_DB8500_MSP2, | 184 | db8500_add_msp_i2s(parent, 2, U8500_MSP2_BASE, IRQ_DB8500_MSP2, |
| 239 | &msp2_platform_data); | 185 | &msp2_platform_data); |
| 240 | db8500_add_msp_i2s(parent, 3, U8500_MSP3_BASE, IRQ_DB8500_MSP1, | 186 | db8500_add_msp_i2s(parent, 3, U8500_MSP3_BASE, IRQ_DB8500_MSP1, |
| 241 | &msp3_platform_data); | 187 | &msp3_platform_data); |
| 188 | } | ||
| 242 | 189 | ||
| 243 | /* Get the pinctrl handle for MSP1 */ | 190 | /* Due for removal once the MSP driver has been fully DT:ed. */ |
| 244 | if (msp1) { | 191 | void mop500_of_audio_init(struct device *parent) |
| 245 | msp1_p = pinctrl_get(&msp1->dev); | 192 | { |
| 246 | if (IS_ERR(msp1_p)) | ||
| 247 | dev_err(&msp1->dev, "could not get MSP1 pinctrl\n"); | ||
| 248 | else { | ||
| 249 | msp1_def = pinctrl_lookup_state(msp1_p, | ||
| 250 | PINCTRL_STATE_DEFAULT); | ||
| 251 | if (IS_ERR(msp1_def)) { | ||
| 252 | dev_err(&msp1->dev, | ||
| 253 | "could not get MSP1 defstate\n"); | ||
| 254 | } | ||
| 255 | msp1_sleep = pinctrl_lookup_state(msp1_p, | ||
| 256 | PINCTRL_STATE_SLEEP); | ||
| 257 | if (IS_ERR(msp1_sleep)) | ||
| 258 | dev_err(&msp1->dev, | ||
| 259 | "could not get MSP1 idlestate\n"); | ||
| 260 | } | ||
| 261 | } | ||
| 262 | |||
| 263 | pr_info("%s: Register platform-device 'ux500-pcm'\n", __func__); | 193 | pr_info("%s: Register platform-device 'ux500-pcm'\n", __func__); |
| 264 | platform_device_register(&ux500_pcm); | 194 | platform_device_register(&ux500_pcm); |
| 265 | |||
| 266 | return 0; | ||
| 267 | } | 195 | } |
diff --git a/arch/arm/mach-ux500/board-mop500-msp.h b/arch/arm/mach-ux500/board-mop500-msp.h deleted file mode 100644 index 6fcfb5e2cc94..000000000000 --- a/arch/arm/mach-ux500/board-mop500-msp.h +++ /dev/null | |||
| @@ -1,14 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) ST-Ericsson SA 2012 | ||
| 3 | * | ||
| 4 | * Author: Ola Lilja <ola.o.lilja@stericsson.com>, | ||
| 5 | * for ST-Ericsson. | ||
| 6 | * | ||
| 7 | * License terms: | ||
| 8 | * | ||
| 9 | * This program is free software; you can redistribute it and/or modify | ||
| 10 | * it under the terms of the GNU General Public License version 2 as published | ||
| 11 | * by the Free Software Foundation. | ||
| 12 | */ | ||
| 13 | |||
| 14 | void mop500_msp_init(struct device *parent); | ||
diff --git a/arch/arm/mach-ux500/board-mop500-sdi.c b/arch/arm/mach-ux500/board-mop500-sdi.c index 18ff781cfbe4..9c8e4a9e83ee 100644 --- a/arch/arm/mach-ux500/board-mop500-sdi.c +++ b/arch/arm/mach-ux500/board-mop500-sdi.c | |||
| @@ -152,7 +152,7 @@ static struct stedma40_chan_cfg sdi1_dma_cfg_tx = { | |||
| 152 | }; | 152 | }; |
| 153 | #endif | 153 | #endif |
| 154 | 154 | ||
| 155 | static struct mmci_platform_data mop500_sdi1_data = { | 155 | struct mmci_platform_data mop500_sdi1_data = { |
| 156 | .ocr_mask = MMC_VDD_29_30, | 156 | .ocr_mask = MMC_VDD_29_30, |
| 157 | .f_max = 50000000, | 157 | .f_max = 50000000, |
| 158 | .capabilities = MMC_CAP_4_BIT_DATA, | 158 | .capabilities = MMC_CAP_4_BIT_DATA, |
| @@ -189,7 +189,7 @@ static struct stedma40_chan_cfg mop500_sdi2_dma_cfg_tx = { | |||
| 189 | }; | 189 | }; |
| 190 | #endif | 190 | #endif |
| 191 | 191 | ||
| 192 | static struct mmci_platform_data mop500_sdi2_data = { | 192 | struct mmci_platform_data mop500_sdi2_data = { |
| 193 | .ocr_mask = MMC_VDD_165_195, | 193 | .ocr_mask = MMC_VDD_165_195, |
| 194 | .f_max = 50000000, | 194 | .f_max = 50000000, |
| 195 | .capabilities = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA | | 195 | .capabilities = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA | |
diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c index 1d2e3c6f8b59..12ab21d5511f 100644 --- a/arch/arm/mach-ux500/board-mop500.c +++ b/arch/arm/mach-ux500/board-mop500.c | |||
| @@ -54,7 +54,6 @@ | |||
| 54 | #include "devices-db8500.h" | 54 | #include "devices-db8500.h" |
| 55 | #include "board-mop500.h" | 55 | #include "board-mop500.h" |
| 56 | #include "board-mop500-regulators.h" | 56 | #include "board-mop500-regulators.h" |
| 57 | #include "board-mop500-msp.h" | ||
| 58 | 57 | ||
| 59 | static struct gpio_led snowball_led_array[] = { | 58 | static struct gpio_led snowball_led_array[] = { |
| 60 | { | 59 | { |
| @@ -587,7 +586,7 @@ static void __init mop500_init_machine(void) | |||
| 587 | mop500_i2c_init(parent); | 586 | mop500_i2c_init(parent); |
| 588 | mop500_sdi_init(parent); | 587 | mop500_sdi_init(parent); |
| 589 | mop500_spi_init(parent); | 588 | mop500_spi_init(parent); |
| 590 | mop500_msp_init(parent); | 589 | mop500_audio_init(parent); |
| 591 | mop500_uart_init(parent); | 590 | mop500_uart_init(parent); |
| 592 | 591 | ||
| 593 | u8500_cryp1_hash1_init(parent); | 592 | u8500_cryp1_hash1_init(parent); |
| @@ -621,7 +620,7 @@ static void __init snowball_init_machine(void) | |||
| 621 | mop500_i2c_init(parent); | 620 | mop500_i2c_init(parent); |
| 622 | snowball_sdi_init(parent); | 621 | snowball_sdi_init(parent); |
| 623 | mop500_spi_init(parent); | 622 | mop500_spi_init(parent); |
| 624 | mop500_msp_init(parent); | 623 | mop500_audio_init(parent); |
| 625 | mop500_uart_init(parent); | 624 | mop500_uart_init(parent); |
| 626 | 625 | ||
| 627 | /* This board has full regulator constraints */ | 626 | /* This board has full regulator constraints */ |
| @@ -653,7 +652,7 @@ static void __init hrefv60_init_machine(void) | |||
| 653 | mop500_i2c_init(parent); | 652 | mop500_i2c_init(parent); |
| 654 | hrefv60_sdi_init(parent); | 653 | hrefv60_sdi_init(parent); |
| 655 | mop500_spi_init(parent); | 654 | mop500_spi_init(parent); |
| 656 | mop500_msp_init(parent); | 655 | mop500_audio_init(parent); |
| 657 | mop500_uart_init(parent); | 656 | mop500_uart_init(parent); |
| 658 | 657 | ||
| 659 | i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices); | 658 | i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices); |
| @@ -705,12 +704,9 @@ MACHINE_END | |||
| 705 | 704 | ||
| 706 | #ifdef CONFIG_MACH_UX500_DT | 705 | #ifdef CONFIG_MACH_UX500_DT |
| 707 | 706 | ||
| 708 | static struct platform_device *snowball_of_platform_devs[] __initdata = { | ||
| 709 | &snowball_led_dev, | ||
| 710 | &snowball_key_dev, | ||
| 711 | }; | ||
| 712 | |||
| 713 | struct of_dev_auxdata u8500_auxdata_lookup[] __initdata = { | 707 | struct of_dev_auxdata u8500_auxdata_lookup[] __initdata = { |
| 708 | /* Requires call-back bindings. */ | ||
| 709 | OF_DEV_AUXDATA("arm,cortex-a9-pmu", 0, "arm-pmu", &db8500_pmu_platdata), | ||
| 714 | /* Requires DMA and call-back bindings. */ | 710 | /* Requires DMA and call-back bindings. */ |
| 715 | OF_DEV_AUXDATA("arm,pl011", 0x80120000, "uart0", &uart0_plat), | 711 | OF_DEV_AUXDATA("arm,pl011", 0x80120000, "uart0", &uart0_plat), |
| 716 | OF_DEV_AUXDATA("arm,pl011", 0x80121000, "uart1", &uart1_plat), | 712 | OF_DEV_AUXDATA("arm,pl011", 0x80121000, "uart1", &uart1_plat), |
| @@ -718,6 +714,8 @@ struct of_dev_auxdata u8500_auxdata_lookup[] __initdata = { | |||
| 718 | /* Requires DMA bindings. */ | 714 | /* Requires DMA bindings. */ |
| 719 | OF_DEV_AUXDATA("arm,pl022", 0x80002000, "ssp0", &ssp0_plat), | 715 | OF_DEV_AUXDATA("arm,pl022", 0x80002000, "ssp0", &ssp0_plat), |
| 720 | OF_DEV_AUXDATA("arm,pl18x", 0x80126000, "sdi0", &mop500_sdi0_data), | 716 | OF_DEV_AUXDATA("arm,pl18x", 0x80126000, "sdi0", &mop500_sdi0_data), |
| 717 | OF_DEV_AUXDATA("arm,pl18x", 0x80118000, "sdi1", &mop500_sdi1_data), | ||
| 718 | OF_DEV_AUXDATA("arm,pl18x", 0x80005000, "sdi2", &mop500_sdi2_data), | ||
| 721 | OF_DEV_AUXDATA("arm,pl18x", 0x80114000, "sdi4", &mop500_sdi4_data), | 719 | OF_DEV_AUXDATA("arm,pl18x", 0x80114000, "sdi4", &mop500_sdi4_data), |
| 722 | /* Requires clock name bindings. */ | 720 | /* Requires clock name bindings. */ |
| 723 | OF_DEV_AUXDATA("st,nomadik-gpio", 0x8012e000, "gpio.0", NULL), | 721 | OF_DEV_AUXDATA("st,nomadik-gpio", 0x8012e000, "gpio.0", NULL), |
| @@ -736,6 +734,15 @@ struct of_dev_auxdata u8500_auxdata_lookup[] __initdata = { | |||
| 736 | OF_DEV_AUXDATA("st,nomadik-i2c", 0x8012a000, "nmk-i2c.4", NULL), | 734 | OF_DEV_AUXDATA("st,nomadik-i2c", 0x8012a000, "nmk-i2c.4", NULL), |
| 737 | /* Requires device name bindings. */ | 735 | /* Requires device name bindings. */ |
| 738 | OF_DEV_AUXDATA("stericsson,nmk_pinctrl", 0, "pinctrl-db8500", NULL), | 736 | OF_DEV_AUXDATA("stericsson,nmk_pinctrl", 0, "pinctrl-db8500", NULL), |
| 737 | /* Requires clock name and DMA bindings. */ | ||
| 738 | OF_DEV_AUXDATA("stericsson,ux500-msp-i2s", 0x80123000, | ||
| 739 | "ux500-msp-i2s.0", &msp0_platform_data), | ||
| 740 | OF_DEV_AUXDATA("stericsson,ux500-msp-i2s", 0x80124000, | ||
| 741 | "ux500-msp-i2s.1", &msp1_platform_data), | ||
| 742 | OF_DEV_AUXDATA("stericsson,ux500-msp-i2s", 0x80117000, | ||
| 743 | "ux500-msp-i2s.2", &msp2_platform_data), | ||
| 744 | OF_DEV_AUXDATA("stericsson,ux500-msp-i2s", 0x80125000, | ||
| 745 | "ux500-msp-i2s.3", &msp3_platform_data), | ||
| 739 | {}, | 746 | {}, |
| 740 | }; | 747 | }; |
| 741 | 748 | ||
| @@ -776,7 +783,7 @@ static void __init u8500_init_machine(void) | |||
| 776 | ARRAY_SIZE(mop500_platform_devs)); | 783 | ARRAY_SIZE(mop500_platform_devs)); |
| 777 | 784 | ||
| 778 | mop500_sdi_init(parent); | 785 | mop500_sdi_init(parent); |
| 779 | mop500_msp_init(parent); | 786 | mop500_audio_init(parent); |
| 780 | i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices); | 787 | i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices); |
| 781 | i2c_register_board_info(0, mop500_i2c0_devices, i2c0_devs); | 788 | i2c_register_board_info(0, mop500_i2c0_devices, i2c0_devs); |
| 782 | i2c_register_board_info(2, mop500_i2c2_devices, | 789 | i2c_register_board_info(2, mop500_i2c2_devices, |
| @@ -785,7 +792,7 @@ static void __init u8500_init_machine(void) | |||
| 785 | mop500_uib_init(); | 792 | mop500_uib_init(); |
| 786 | 793 | ||
| 787 | } else if (of_machine_is_compatible("calaosystems,snowball-a9500")) { | 794 | } else if (of_machine_is_compatible("calaosystems,snowball-a9500")) { |
| 788 | mop500_msp_init(parent); | 795 | mop500_of_audio_init(parent); |
| 789 | } else if (of_machine_is_compatible("st-ericsson,hrefv60+")) { | 796 | } else if (of_machine_is_compatible("st-ericsson,hrefv60+")) { |
| 790 | /* | 797 | /* |
| 791 | * The HREFv60 board removed a GPIO expander and routed | 798 | * The HREFv60 board removed a GPIO expander and routed |
| @@ -796,16 +803,6 @@ static void __init u8500_init_machine(void) | |||
| 796 | platform_add_devices(mop500_platform_devs, | 803 | platform_add_devices(mop500_platform_devs, |
| 797 | ARRAY_SIZE(mop500_platform_devs)); | 804 | ARRAY_SIZE(mop500_platform_devs)); |
| 798 | 805 | ||
| 799 | hrefv60_sdi_init(parent); | ||
| 800 | mop500_msp_init(parent); | ||
| 801 | |||
| 802 | i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices); | ||
| 803 | i2c0_devs -= NUM_PRE_V60_I2C0_DEVICES; | ||
| 804 | |||
| 805 | i2c_register_board_info(0, mop500_i2c0_devices, i2c0_devs); | ||
| 806 | i2c_register_board_info(2, mop500_i2c2_devices, | ||
| 807 | ARRAY_SIZE(mop500_i2c2_devices)); | ||
| 808 | |||
| 809 | mop500_uib_init(); | 806 | mop500_uib_init(); |
| 810 | } | 807 | } |
| 811 | 808 | ||
diff --git a/arch/arm/mach-ux500/board-mop500.h b/arch/arm/mach-ux500/board-mop500.h index b5bfc1a78b1a..aca39a68712a 100644 --- a/arch/arm/mach-ux500/board-mop500.h +++ b/arch/arm/mach-ux500/board-mop500.h | |||
| @@ -9,6 +9,7 @@ | |||
| 9 | 9 | ||
| 10 | /* For NOMADIK_NR_GPIO */ | 10 | /* For NOMADIK_NR_GPIO */ |
| 11 | #include <mach/irqs.h> | 11 | #include <mach/irqs.h> |
| 12 | #include <mach/msp.h> | ||
| 12 | #include <linux/amba/mmci.h> | 13 | #include <linux/amba/mmci.h> |
| 13 | 14 | ||
| 14 | /* Snowball specific GPIO assignments, this board has no GPIO expander */ | 15 | /* Snowball specific GPIO assignments, this board has no GPIO expander */ |
| @@ -80,7 +81,14 @@ | |||
| 80 | struct device; | 81 | struct device; |
| 81 | struct i2c_board_info; | 82 | struct i2c_board_info; |
| 82 | extern struct mmci_platform_data mop500_sdi0_data; | 83 | extern struct mmci_platform_data mop500_sdi0_data; |
| 84 | extern struct mmci_platform_data mop500_sdi1_data; | ||
| 85 | extern struct mmci_platform_data mop500_sdi2_data; | ||
| 83 | extern struct mmci_platform_data mop500_sdi4_data; | 86 | extern struct mmci_platform_data mop500_sdi4_data; |
| 87 | extern struct msp_i2s_platform_data msp0_platform_data; | ||
| 88 | extern struct msp_i2s_platform_data msp1_platform_data; | ||
| 89 | extern struct msp_i2s_platform_data msp2_platform_data; | ||
| 90 | extern struct msp_i2s_platform_data msp3_platform_data; | ||
| 91 | extern struct arm_pmu_platdata db8500_pmu_platdata; | ||
| 84 | 92 | ||
| 85 | extern void mop500_sdi_init(struct device *parent); | 93 | extern void mop500_sdi_init(struct device *parent); |
| 86 | extern void snowball_sdi_init(struct device *parent); | 94 | extern void snowball_sdi_init(struct device *parent); |
| @@ -91,6 +99,9 @@ void __init mop500_stuib_init(void); | |||
| 91 | void __init mop500_pinmaps_init(void); | 99 | void __init mop500_pinmaps_init(void); |
| 92 | void __init snowball_pinmaps_init(void); | 100 | void __init snowball_pinmaps_init(void); |
| 93 | void __init hrefv60_pinmaps_init(void); | 101 | void __init hrefv60_pinmaps_init(void); |
| 102 | void mop500_audio_init(struct device *parent); | ||
| 103 | /* Due for removal once the MSP driver has been fully DT:ed. */ | ||
| 104 | void mop500_of_audio_init(struct device *parent); | ||
| 94 | 105 | ||
| 95 | int __init mop500_uib_init(void); | 106 | int __init mop500_uib_init(void); |
| 96 | void mop500_uib_i2c_add(int busnum, struct i2c_board_info *info, | 107 | void mop500_uib_i2c_add(int busnum, struct i2c_board_info *info, |
diff --git a/arch/arm/mach-ux500/clock.c b/arch/arm/mach-ux500/clock.c deleted file mode 100644 index 8d73b066a18d..000000000000 --- a/arch/arm/mach-ux500/clock.c +++ /dev/null | |||
| @@ -1,715 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2009 ST-Ericsson | ||
| 3 | * Copyright (C) 2009 STMicroelectronics | ||
| 4 | * | ||
| 5 | * This program is free software; you can redistribute it and/or modify | ||
| 6 | * it under the terms of the GNU General Public License version 2 as | ||
| 7 | * published by the Free Software Foundation. | ||
| 8 | */ | ||
| 9 | #include <linux/module.h> | ||
| 10 | #include <linux/kernel.h> | ||
| 11 | #include <linux/list.h> | ||
| 12 | #include <linux/errno.h> | ||
| 13 | #include <linux/err.h> | ||
| 14 | #include <linux/clk.h> | ||
| 15 | #include <linux/io.h> | ||
| 16 | #include <linux/clkdev.h> | ||
| 17 | #include <linux/cpufreq.h> | ||
| 18 | |||
| 19 | #include <plat/mtu.h> | ||
| 20 | #include <mach/hardware.h> | ||
| 21 | #include "clock.h" | ||
| 22 | |||
| 23 | #ifdef CONFIG_DEBUG_FS | ||
| 24 | #include <linux/debugfs.h> | ||
| 25 | #include <linux/uaccess.h> /* for copy_from_user */ | ||
| 26 | static LIST_HEAD(clk_list); | ||
| 27 | #endif | ||
| 28 | |||
| 29 | #define PRCC_PCKEN 0x00 | ||
| 30 | #define PRCC_PCKDIS 0x04 | ||
| 31 | #define PRCC_KCKEN 0x08 | ||
| 32 | #define PRCC_KCKDIS 0x0C | ||
| 33 | |||
| 34 | #define PRCM_YYCLKEN0_MGT_SET 0x510 | ||
| 35 | #define PRCM_YYCLKEN1_MGT_SET 0x514 | ||
| 36 | #define PRCM_YYCLKEN0_MGT_CLR 0x518 | ||
| 37 | #define PRCM_YYCLKEN1_MGT_CLR 0x51C | ||
| 38 | #define PRCM_YYCLKEN0_MGT_VAL 0x520 | ||
| 39 | #define PRCM_YYCLKEN1_MGT_VAL 0x524 | ||
| 40 | |||
| 41 | #define PRCM_SVAMMDSPCLK_MGT 0x008 | ||
| 42 | #define PRCM_SIAMMDSPCLK_MGT 0x00C | ||
| 43 | #define PRCM_SGACLK_MGT 0x014 | ||
| 44 | #define PRCM_UARTCLK_MGT 0x018 | ||
| 45 | #define PRCM_MSP02CLK_MGT 0x01C | ||
| 46 | #define PRCM_MSP1CLK_MGT 0x288 | ||
| 47 | #define PRCM_I2CCLK_MGT 0x020 | ||
| 48 | #define PRCM_SDMMCCLK_MGT 0x024 | ||
| 49 | #define PRCM_SLIMCLK_MGT 0x028 | ||
| 50 | #define PRCM_PER1CLK_MGT 0x02C | ||
| 51 | #define PRCM_PER2CLK_MGT 0x030 | ||
| 52 | #define PRCM_PER3CLK_MGT 0x034 | ||
| 53 | #define PRCM_PER5CLK_MGT 0x038 | ||
| 54 | #define PRCM_PER6CLK_MGT 0x03C | ||
| 55 | #define PRCM_PER7CLK_MGT 0x040 | ||
| 56 | #define PRCM_LCDCLK_MGT 0x044 | ||
| 57 | #define PRCM_BMLCLK_MGT 0x04C | ||
| 58 | #define PRCM_HSITXCLK_MGT 0x050 | ||
| 59 | #define PRCM_HSIRXCLK_MGT 0x054 | ||
| 60 | #define PRCM_HDMICLK_MGT 0x058 | ||
| 61 | #define PRCM_APEATCLK_MGT 0x05C | ||
| 62 | #define PRCM_APETRACECLK_MGT 0x060 | ||
| 63 | #define PRCM_MCDECLK_MGT 0x064 | ||
| 64 | #define PRCM_IPI2CCLK_MGT 0x068 | ||
| 65 | #define PRCM_DSIALTCLK_MGT 0x06C | ||
| 66 | #define PRCM_DMACLK_MGT 0x074 | ||
| 67 | #define PRCM_B2R2CLK_MGT 0x078 | ||
| 68 | #define PRCM_TVCLK_MGT 0x07C | ||
| 69 | #define PRCM_TCR 0x1C8 | ||
| 70 | #define PRCM_TCR_STOPPED (1 << 16) | ||
| 71 | #define PRCM_TCR_DOZE_MODE (1 << 17) | ||
| 72 | #define PRCM_UNIPROCLK_MGT 0x278 | ||
| 73 | #define PRCM_SSPCLK_MGT 0x280 | ||
| 74 | #define PRCM_RNGCLK_MGT 0x284 | ||
| 75 | #define PRCM_UICCCLK_MGT 0x27C | ||
| 76 | |||
| 77 | #define PRCM_MGT_ENABLE (1 << 8) | ||
| 78 | |||
| 79 | static DEFINE_SPINLOCK(clocks_lock); | ||
| 80 | |||
| 81 | static void __clk_enable(struct clk *clk) | ||
| 82 | { | ||
| 83 | if (clk->enabled++ == 0) { | ||
| 84 | if (clk->parent_cluster) | ||
| 85 | __clk_enable(clk->parent_cluster); | ||
| 86 | |||
| 87 | if (clk->parent_periph) | ||
| 88 | __clk_enable(clk->parent_periph); | ||
| 89 | |||
| 90 | if (clk->ops && clk->ops->enable) | ||
| 91 | clk->ops->enable(clk); | ||
| 92 | } | ||
| 93 | } | ||
| 94 | |||
| 95 | int clk_enable(struct clk *clk) | ||
| 96 | { | ||
| 97 | unsigned long flags; | ||
| 98 | |||
| 99 | spin_lock_irqsave(&clocks_lock, flags); | ||
| 100 | __clk_enable(clk); | ||
| 101 | spin_unlock_irqrestore(&clocks_lock, flags); | ||
| 102 | |||
| 103 | return 0; | ||
| 104 | } | ||
| 105 | EXPORT_SYMBOL(clk_enable); | ||
| 106 | |||
| 107 | static void __clk_disable(struct clk *clk) | ||
| 108 | { | ||
| 109 | if (--clk->enabled == 0) { | ||
| 110 | if (clk->ops && clk->ops->disable) | ||
| 111 | clk->ops->disable(clk); | ||
| 112 | |||
| 113 | if (clk->parent_periph) | ||
| 114 | __clk_disable(clk->parent_periph); | ||
| 115 | |||
| 116 | if (clk->parent_cluster) | ||
| 117 | __clk_disable(clk->parent_cluster); | ||
| 118 | } | ||
| 119 | } | ||
| 120 | |||
| 121 | void clk_disable(struct clk *clk) | ||
| 122 | { | ||
| 123 | unsigned long flags; | ||
| 124 | |||
| 125 | WARN_ON(!clk->enabled); | ||
| 126 | |||
| 127 | spin_lock_irqsave(&clocks_lock, flags); | ||
| 128 | __clk_disable(clk); | ||
| 129 | spin_unlock_irqrestore(&clocks_lock, flags); | ||
| 130 | } | ||
| 131 | EXPORT_SYMBOL(clk_disable); | ||
| 132 | |||
| 133 | /* | ||
| 134 | * The MTU has a separate, rather complex muxing setup | ||
| 135 | * with alternative parents (peripheral cluster or | ||
| 136 | * ULP or fixed 32768 Hz) depending on settings | ||
| 137 | */ | ||
| 138 | static unsigned long clk_mtu_get_rate(struct clk *clk) | ||
| 139 | { | ||
| 140 | void __iomem *addr; | ||
| 141 | u32 tcr; | ||
| 142 | int mtu = (int) clk->data; | ||
| 143 | /* | ||
| 144 | * One of these is selected eventually | ||
| 145 | * TODO: Replace the constant with a reference | ||
| 146 | * to the ULP source once this is modeled. | ||
| 147 | */ | ||
| 148 | unsigned long clk32k = 32768; | ||
| 149 | unsigned long mturate; | ||
| 150 | unsigned long retclk; | ||
| 151 | |||
| 152 | if (cpu_is_u8500_family()) | ||
| 153 | addr = __io_address(U8500_PRCMU_BASE); | ||
| 154 | else | ||
| 155 | ux500_unknown_soc(); | ||
| 156 | |||
| 157 | /* | ||
| 158 | * On a startup, always conifgure the TCR to the doze mode; | ||
| 159 | * bootloaders do it for us. Do this in the kernel too. | ||
| 160 | */ | ||
| 161 | writel(PRCM_TCR_DOZE_MODE, addr + PRCM_TCR); | ||
| 162 | |||
| 163 | tcr = readl(addr + PRCM_TCR); | ||
| 164 | |||
| 165 | /* Get the rate from the parent as a default */ | ||
| 166 | if (clk->parent_periph) | ||
| 167 | mturate = clk_get_rate(clk->parent_periph); | ||
| 168 | else if (clk->parent_cluster) | ||
| 169 | mturate = clk_get_rate(clk->parent_cluster); | ||
| 170 | else | ||
| 171 | /* We need to be connected SOMEWHERE */ | ||
| 172 | BUG(); | ||
| 173 | |||
| 174 | /* Return the clock selected for this MTU */ | ||
| 175 | if (tcr & (1 << mtu)) | ||
| 176 | retclk = clk32k; | ||
| 177 | else | ||
| 178 | retclk = mturate; | ||
| 179 | |||
| 180 | pr_info("MTU%d clock rate: %lu Hz\n", mtu, retclk); | ||
| 181 | return retclk; | ||
| 182 | } | ||
| 183 | |||
| 184 | unsigned long clk_get_rate(struct clk *clk) | ||
| 185 | { | ||
| 186 | unsigned long rate; | ||
| 187 | |||
| 188 | /* | ||
| 189 | * If there is a custom getrate callback for this clock, | ||
| 190 | * it will take precedence. | ||
| 191 | */ | ||
| 192 | if (clk->get_rate) | ||
| 193 | return clk->get_rate(clk); | ||
| 194 | |||
| 195 | if (clk->ops && clk->ops->get_rate) | ||
| 196 | return clk->ops->get_rate(clk); | ||
| 197 | |||
| 198 | rate = clk->rate; | ||
| 199 | if (!rate) { | ||
| 200 | if (clk->parent_periph) | ||
| 201 | rate = clk_get_rate(clk->parent_periph); | ||
| 202 | else if (clk->parent_cluster) | ||
| 203 | rate = clk_get_rate(clk->parent_cluster); | ||
| 204 | } | ||
| 205 | |||
| 206 | return rate; | ||
| 207 | } | ||
| 208 | EXPORT_SYMBOL(clk_get_rate); | ||
| 209 | |||
| 210 | long clk_round_rate(struct clk *clk, unsigned long rate) | ||
| 211 | { | ||
| 212 | /*TODO*/ | ||
| 213 | return rate; | ||
| 214 | } | ||
| 215 | EXPORT_SYMBOL(clk_round_rate); | ||
| 216 | |||
| 217 | int clk_set_rate(struct clk *clk, unsigned long rate) | ||
| 218 | { | ||
| 219 | clk->rate = rate; | ||
| 220 | return 0; | ||
| 221 | } | ||
| 222 | EXPORT_SYMBOL(clk_set_rate); | ||
| 223 | |||
| 224 | int clk_set_parent(struct clk *clk, struct clk *parent) | ||
| 225 | { | ||
| 226 | /*TODO*/ | ||
| 227 | return -ENOSYS; | ||
| 228 | } | ||
| 229 | EXPORT_SYMBOL(clk_set_parent); | ||
| 230 | |||
| 231 | static void clk_prcmu_enable(struct clk *clk) | ||
| 232 | { | ||
| 233 | void __iomem *cg_set_reg = __io_address(U8500_PRCMU_BASE) | ||
| 234 | + PRCM_YYCLKEN0_MGT_SET + clk->prcmu_cg_off; | ||
| 235 | |||
| 236 | writel(1 << clk->prcmu_cg_bit, cg_set_reg); | ||
| 237 | } | ||
| 238 | |||
| 239 | static void clk_prcmu_disable(struct clk *clk) | ||
| 240 | { | ||
| 241 | void __iomem *cg_clr_reg = __io_address(U8500_PRCMU_BASE) | ||
| 242 | + PRCM_YYCLKEN0_MGT_CLR + clk->prcmu_cg_off; | ||
| 243 | |||
| 244 | writel(1 << clk->prcmu_cg_bit, cg_clr_reg); | ||
| 245 | } | ||
| 246 | |||
| 247 | static struct clkops clk_prcmu_ops = { | ||
| 248 | .enable = clk_prcmu_enable, | ||
| 249 | .disable = clk_prcmu_disable, | ||
| 250 | }; | ||
| 251 | |||
| 252 | static unsigned int clkrst_base[] = { | ||
| 253 | [1] = U8500_CLKRST1_BASE, | ||
| 254 | [2] = U8500_CLKRST2_BASE, | ||
| 255 | [3] = U8500_CLKRST3_BASE, | ||
| 256 | [5] = U8500_CLKRST5_BASE, | ||
| 257 | [6] = U8500_CLKRST6_BASE, | ||
| 258 | }; | ||
| 259 | |||
| 260 | static void clk_prcc_enable(struct clk *clk) | ||
| 261 | { | ||
| 262 | void __iomem *addr = __io_address(clkrst_base[clk->cluster]); | ||
| 263 | |||
| 264 | if (clk->prcc_kernel != -1) | ||
| 265 | writel(1 << clk->prcc_kernel, addr + PRCC_KCKEN); | ||
| 266 | |||
| 267 | if (clk->prcc_bus != -1) | ||
| 268 | writel(1 << clk->prcc_bus, addr + PRCC_PCKEN); | ||
| 269 | } | ||
| 270 | |||
| 271 | static void clk_prcc_disable(struct clk *clk) | ||
| 272 | { | ||
| 273 | void __iomem *addr = __io_address(clkrst_base[clk->cluster]); | ||
| 274 | |||
| 275 | if (clk->prcc_bus != -1) | ||
| 276 | writel(1 << clk->prcc_bus, addr + PRCC_PCKDIS); | ||
| 277 | |||
| 278 | if (clk->prcc_kernel != -1) | ||
| 279 | writel(1 << clk->prcc_kernel, addr + PRCC_KCKDIS); | ||
| 280 | } | ||
| 281 | |||
| 282 | static struct clkops clk_prcc_ops = { | ||
| 283 | .enable = clk_prcc_enable, | ||
| 284 | .disable = clk_prcc_disable, | ||
| 285 | }; | ||
| 286 | |||
| 287 | static struct clk clk_32khz = { | ||
| 288 | .name = "clk_32khz", | ||
| 289 | .rate = 32000, | ||
| 290 | }; | ||
| 291 | |||
| 292 | /* | ||
| 293 | * PRCMU level clock gating | ||
| 294 | */ | ||
| 295 | |||
| 296 | /* Bank 0 */ | ||
| 297 | static DEFINE_PRCMU_CLK(svaclk, 0x0, 2, SVAMMDSPCLK); | ||
| 298 | static DEFINE_PRCMU_CLK(siaclk, 0x0, 3, SIAMMDSPCLK); | ||
| 299 | static DEFINE_PRCMU_CLK(sgaclk, 0x0, 4, SGACLK); | ||
| 300 | static DEFINE_PRCMU_CLK_RATE(uartclk, 0x0, 5, UARTCLK, 38400000); | ||
| 301 | static DEFINE_PRCMU_CLK(msp02clk, 0x0, 6, MSP02CLK); | ||
| 302 | static DEFINE_PRCMU_CLK(msp1clk, 0x0, 7, MSP1CLK); /* v1 */ | ||
| 303 | static DEFINE_PRCMU_CLK_RATE(i2cclk, 0x0, 8, I2CCLK, 48000000); | ||
| 304 | static DEFINE_PRCMU_CLK_RATE(sdmmcclk, 0x0, 9, SDMMCCLK, 100000000); | ||
| 305 | static DEFINE_PRCMU_CLK(slimclk, 0x0, 10, SLIMCLK); | ||
| 306 | static DEFINE_PRCMU_CLK(per1clk, 0x0, 11, PER1CLK); | ||
| 307 | static DEFINE_PRCMU_CLK(per2clk, 0x0, 12, PER2CLK); | ||
| 308 | static DEFINE_PRCMU_CLK(per3clk, 0x0, 13, PER3CLK); | ||
| 309 | static DEFINE_PRCMU_CLK(per5clk, 0x0, 14, PER5CLK); | ||
| 310 | static DEFINE_PRCMU_CLK_RATE(per6clk, 0x0, 15, PER6CLK, 133330000); | ||
| 311 | static DEFINE_PRCMU_CLK(lcdclk, 0x0, 17, LCDCLK); | ||
| 312 | static DEFINE_PRCMU_CLK(bmlclk, 0x0, 18, BMLCLK); | ||
| 313 | static DEFINE_PRCMU_CLK(hsitxclk, 0x0, 19, HSITXCLK); | ||
| 314 | static DEFINE_PRCMU_CLK(hsirxclk, 0x0, 20, HSIRXCLK); | ||
| 315 | static DEFINE_PRCMU_CLK(hdmiclk, 0x0, 21, HDMICLK); | ||
| 316 | static DEFINE_PRCMU_CLK(apeatclk, 0x0, 22, APEATCLK); | ||
| 317 | static DEFINE_PRCMU_CLK(apetraceclk, 0x0, 23, APETRACECLK); | ||
| 318 | static DEFINE_PRCMU_CLK(mcdeclk, 0x0, 24, MCDECLK); | ||
| 319 | static DEFINE_PRCMU_CLK(ipi2clk, 0x0, 25, IPI2CCLK); | ||
| 320 | static DEFINE_PRCMU_CLK(dsialtclk, 0x0, 26, DSIALTCLK); /* v1 */ | ||
| 321 | static DEFINE_PRCMU_CLK(dmaclk, 0x0, 27, DMACLK); | ||
| 322 | static DEFINE_PRCMU_CLK(b2r2clk, 0x0, 28, B2R2CLK); | ||
| 323 | static DEFINE_PRCMU_CLK(tvclk, 0x0, 29, TVCLK); | ||
| 324 | static DEFINE_PRCMU_CLK(uniproclk, 0x0, 30, UNIPROCLK); /* v1 */ | ||
| 325 | static DEFINE_PRCMU_CLK_RATE(sspclk, 0x0, 31, SSPCLK, 48000000); /* v1 */ | ||
| 326 | |||
| 327 | /* Bank 1 */ | ||
| 328 | static DEFINE_PRCMU_CLK(rngclk, 0x4, 0, RNGCLK); /* v1 */ | ||
| 329 | static DEFINE_PRCMU_CLK(uiccclk, 0x4, 1, UICCCLK); /* v1 */ | ||
| 330 | |||
| 331 | /* | ||
| 332 | * PRCC level clock gating | ||
| 333 | * Format: per#, clk, PCKEN bit, KCKEN bit, parent | ||
| 334 | */ | ||
| 335 | |||
| 336 | /* Peripheral Cluster #1 */ | ||
| 337 | static DEFINE_PRCC_CLK(1, msp3, 11, 10, &clk_msp1clk); | ||
| 338 | static DEFINE_PRCC_CLK(1, i2c4, 10, 9, &clk_i2cclk); | ||
| 339 | static DEFINE_PRCC_CLK(1, gpio0, 9, -1, NULL); | ||
| 340 | static DEFINE_PRCC_CLK(1, slimbus0, 8, 8, &clk_slimclk); | ||
| 341 | static DEFINE_PRCC_CLK(1, spi3, 7, -1, NULL); | ||
| 342 | static DEFINE_PRCC_CLK(1, i2c2, 6, 6, &clk_i2cclk); | ||
| 343 | static DEFINE_PRCC_CLK(1, sdi0, 5, 5, &clk_sdmmcclk); | ||
| 344 | static DEFINE_PRCC_CLK(1, msp1, 4, 4, &clk_msp1clk); | ||
| 345 | static DEFINE_PRCC_CLK(1, msp0, 3, 3, &clk_msp02clk); | ||
| 346 | static DEFINE_PRCC_CLK(1, i2c1, 2, 2, &clk_i2cclk); | ||
| 347 | static DEFINE_PRCC_CLK(1, uart1, 1, 1, &clk_uartclk); | ||
| 348 | static DEFINE_PRCC_CLK(1, uart0, 0, 0, &clk_uartclk); | ||
| 349 | |||
| 350 | /* Peripheral Cluster #2 */ | ||
| 351 | static DEFINE_PRCC_CLK(2, gpio1, 11, -1, NULL); | ||
| 352 | static DEFINE_PRCC_CLK(2, ssitx, 10, 7, NULL); | ||
| 353 | static DEFINE_PRCC_CLK(2, ssirx, 9, 6, NULL); | ||
| 354 | static DEFINE_PRCC_CLK(2, spi0, 8, -1, NULL); | ||
| 355 | static DEFINE_PRCC_CLK(2, sdi3, 7, 5, &clk_sdmmcclk); | ||
| 356 | static DEFINE_PRCC_CLK(2, sdi1, 6, 4, &clk_sdmmcclk); | ||
| 357 | static DEFINE_PRCC_CLK(2, msp2, 5, 3, &clk_msp02clk); | ||
| 358 | static DEFINE_PRCC_CLK(2, sdi4, 4, 2, &clk_sdmmcclk); | ||
| 359 | static DEFINE_PRCC_CLK(2, pwl, 3, 1, NULL); | ||
| 360 | static DEFINE_PRCC_CLK(2, spi1, 2, -1, NULL); | ||
| 361 | static DEFINE_PRCC_CLK(2, spi2, 1, -1, NULL); | ||
| 362 | static DEFINE_PRCC_CLK(2, i2c3, 0, 0, &clk_i2cclk); | ||
| 363 | |||
| 364 | /* Peripheral Cluster #3 */ | ||
| 365 | static DEFINE_PRCC_CLK(3, gpio2, 8, -1, NULL); | ||
| 366 | static DEFINE_PRCC_CLK(3, sdi5, 7, 7, &clk_sdmmcclk); | ||
| 367 | static DEFINE_PRCC_CLK(3, uart2, 6, 6, &clk_uartclk); | ||
| 368 | static DEFINE_PRCC_CLK(3, ske, 5, 5, &clk_32khz); | ||
| 369 | static DEFINE_PRCC_CLK(3, sdi2, 4, 4, &clk_sdmmcclk); | ||
| 370 | static DEFINE_PRCC_CLK(3, i2c0, 3, 3, &clk_i2cclk); | ||
| 371 | static DEFINE_PRCC_CLK(3, ssp1, 2, 2, &clk_sspclk); | ||
| 372 | static DEFINE_PRCC_CLK(3, ssp0, 1, 1, &clk_sspclk); | ||
| 373 | static DEFINE_PRCC_CLK(3, fsmc, 0, -1, NULL); | ||
| 374 | |||
| 375 | /* Peripheral Cluster #4 is in the always on domain */ | ||
| 376 | |||
| 377 | /* Peripheral Cluster #5 */ | ||
| 378 | static DEFINE_PRCC_CLK(5, gpio3, 1, -1, NULL); | ||
| 379 | static DEFINE_PRCC_CLK(5, usb, 0, 0, NULL); | ||
| 380 | |||
| 381 | /* Peripheral Cluster #6 */ | ||
| 382 | |||
| 383 | /* MTU ID in data */ | ||
| 384 | static DEFINE_PRCC_CLK_CUSTOM(6, mtu1, 9, -1, NULL, clk_mtu_get_rate, 1); | ||
| 385 | static DEFINE_PRCC_CLK_CUSTOM(6, mtu0, 8, -1, NULL, clk_mtu_get_rate, 0); | ||
| 386 | static DEFINE_PRCC_CLK(6, cfgreg, 7, 7, NULL); | ||
| 387 | static DEFINE_PRCC_CLK(6, hash1, 6, -1, NULL); | ||
| 388 | static DEFINE_PRCC_CLK(6, unipro, 5, 1, &clk_uniproclk); | ||
| 389 | static DEFINE_PRCC_CLK(6, pka, 4, -1, NULL); | ||
| 390 | static DEFINE_PRCC_CLK(6, hash0, 3, -1, NULL); | ||
| 391 | static DEFINE_PRCC_CLK(6, cryp0, 2, -1, NULL); | ||
| 392 | static DEFINE_PRCC_CLK(6, cryp1, 1, -1, NULL); | ||
| 393 | static DEFINE_PRCC_CLK(6, rng, 0, 0, &clk_rngclk); | ||
| 394 | |||
| 395 | static struct clk clk_dummy_apb_pclk = { | ||
| 396 | .name = "apb_pclk", | ||
| 397 | }; | ||
| 398 | |||
| 399 | static struct clk_lookup u8500_clks[] = { | ||
| 400 | CLK(dummy_apb_pclk, NULL, "apb_pclk"), | ||
| 401 | |||
| 402 | /* Peripheral Cluster #1 */ | ||
| 403 | CLK(gpio0, "gpio.0", NULL), | ||
| 404 | CLK(gpio0, "gpio.1", NULL), | ||
| 405 | CLK(slimbus0, "slimbus0", NULL), | ||
| 406 | CLK(i2c2, "nmk-i2c.2", NULL), | ||
| 407 | CLK(sdi0, "sdi0", NULL), | ||
| 408 | CLK(msp0, "ux500-msp-i2s.0", NULL), | ||
| 409 | CLK(i2c1, "nmk-i2c.1", NULL), | ||
| 410 | CLK(uart1, "uart1", NULL), | ||
| 411 | CLK(uart0, "uart0", NULL), | ||
| 412 | |||
| 413 | /* Peripheral Cluster #3 */ | ||
| 414 | CLK(gpio2, "gpio.2", NULL), | ||
| 415 | CLK(gpio2, "gpio.3", NULL), | ||
| 416 | CLK(gpio2, "gpio.4", NULL), | ||
| 417 | CLK(gpio2, "gpio.5", NULL), | ||
| 418 | CLK(sdi5, "sdi5", NULL), | ||
| 419 | CLK(uart2, "uart2", NULL), | ||
| 420 | CLK(ske, "ske", NULL), | ||
| 421 | CLK(ske, "nmk-ske-keypad", NULL), | ||
| 422 | CLK(sdi2, "sdi2", NULL), | ||
| 423 | CLK(i2c0, "nmk-i2c.0", NULL), | ||
| 424 | CLK(fsmc, "fsmc", NULL), | ||
| 425 | |||
| 426 | /* Peripheral Cluster #5 */ | ||
| 427 | CLK(gpio3, "gpio.8", NULL), | ||
| 428 | |||
| 429 | /* Peripheral Cluster #6 */ | ||
| 430 | CLK(hash1, "hash1", NULL), | ||
| 431 | CLK(pka, "pka", NULL), | ||
| 432 | CLK(hash0, "hash0", NULL), | ||
| 433 | CLK(cryp0, "cryp0", NULL), | ||
| 434 | CLK(cryp1, "cryp1", NULL), | ||
| 435 | |||
| 436 | /* PRCMU level clock gating */ | ||
| 437 | |||
| 438 | /* Bank 0 */ | ||
| 439 | CLK(svaclk, "sva", NULL), | ||
| 440 | CLK(siaclk, "sia", NULL), | ||
| 441 | CLK(sgaclk, "sga", NULL), | ||
| 442 | CLK(slimclk, "slim", NULL), | ||
| 443 | CLK(lcdclk, "lcd", NULL), | ||
| 444 | CLK(bmlclk, "bml", NULL), | ||
| 445 | CLK(hsitxclk, "stm-hsi.0", NULL), | ||
| 446 | CLK(hsirxclk, "stm-hsi.1", NULL), | ||
| 447 | CLK(hdmiclk, "hdmi", NULL), | ||
| 448 | CLK(apeatclk, "apeat", NULL), | ||
| 449 | CLK(apetraceclk, "apetrace", NULL), | ||
| 450 | CLK(mcdeclk, "mcde", NULL), | ||
| 451 | CLK(ipi2clk, "ipi2", NULL), | ||
| 452 | CLK(dmaclk, "dma40.0", NULL), | ||
| 453 | CLK(b2r2clk, "b2r2", NULL), | ||
| 454 | CLK(tvclk, "tv", NULL), | ||
| 455 | |||
| 456 | /* Peripheral Cluster #1 */ | ||
| 457 | CLK(i2c4, "nmk-i2c.4", NULL), | ||
| 458 | CLK(spi3, "spi3", NULL), | ||
| 459 | CLK(msp1, "ux500-msp-i2s.1", NULL), | ||
| 460 | CLK(msp3, "ux500-msp-i2s.3", NULL), | ||
| 461 | |||
| 462 | /* Peripheral Cluster #2 */ | ||
| 463 | CLK(gpio1, "gpio.6", NULL), | ||
| 464 | CLK(gpio1, "gpio.7", NULL), | ||
| 465 | CLK(ssitx, "ssitx", NULL), | ||
| 466 | CLK(ssirx, "ssirx", NULL), | ||
| 467 | CLK(spi0, "spi0", NULL), | ||
| 468 | CLK(sdi3, "sdi3", NULL), | ||
| 469 | CLK(sdi1, "sdi1", NULL), | ||
| 470 | CLK(msp2, "ux500-msp-i2s.2", NULL), | ||
| 471 | CLK(sdi4, "sdi4", NULL), | ||
| 472 | CLK(pwl, "pwl", NULL), | ||
| 473 | CLK(spi1, "spi1", NULL), | ||
| 474 | CLK(spi2, "spi2", NULL), | ||
| 475 | CLK(i2c3, "nmk-i2c.3", NULL), | ||
| 476 | |||
| 477 | /* Peripheral Cluster #3 */ | ||
| 478 | CLK(ssp1, "ssp1", NULL), | ||
| 479 | CLK(ssp0, "ssp0", NULL), | ||
| 480 | |||
| 481 | /* Peripheral Cluster #5 */ | ||
| 482 | CLK(usb, "musb-ux500.0", "usb"), | ||
| 483 | |||
| 484 | /* Peripheral Cluster #6 */ | ||
| 485 | CLK(mtu1, "mtu1", NULL), | ||
| 486 | CLK(mtu0, "mtu0", NULL), | ||
| 487 | CLK(cfgreg, "cfgreg", NULL), | ||
| 488 | CLK(hash1, "hash1", NULL), | ||
| 489 | CLK(unipro, "unipro", NULL), | ||
| 490 | CLK(rng, "rng", NULL), | ||
| 491 | |||
| 492 | /* PRCMU level clock gating */ | ||
| 493 | |||
| 494 | /* Bank 0 */ | ||
| 495 | CLK(uniproclk, "uniproclk", NULL), | ||
| 496 | CLK(dsialtclk, "dsialt", NULL), | ||
| 497 | |||
| 498 | /* Bank 1 */ | ||
| 499 | CLK(rngclk, "rng", NULL), | ||
| 500 | CLK(uiccclk, "uicc", NULL), | ||
| 501 | }; | ||
| 502 | |||
| 503 | #ifdef CONFIG_DEBUG_FS | ||
| 504 | /* | ||
| 505 | * debugfs support to trace clock tree hierarchy and attributes with | ||
| 506 | * powerdebug | ||
| 507 | */ | ||
| 508 | static struct dentry *clk_debugfs_root; | ||
| 509 | |||
| 510 | void __init clk_debugfs_add_table(struct clk_lookup *cl, size_t num) | ||
| 511 | { | ||
| 512 | while (num--) { | ||
| 513 | /* Check that the clock has not been already registered */ | ||
| 514 | if (!(cl->clk->list.prev != cl->clk->list.next)) | ||
| 515 | list_add_tail(&cl->clk->list, &clk_list); | ||
| 516 | |||
| 517 | cl++; | ||
| 518 | } | ||
| 519 | } | ||
| 520 | |||
| 521 | static ssize_t usecount_dbg_read(struct file *file, char __user *buf, | ||
| 522 | size_t size, loff_t *off) | ||
| 523 | { | ||
| 524 | struct clk *clk = file->f_dentry->d_inode->i_private; | ||
| 525 | char cusecount[128]; | ||
| 526 | unsigned int len; | ||
| 527 | |||
| 528 | len = sprintf(cusecount, "%u\n", clk->enabled); | ||
| 529 | return simple_read_from_buffer(buf, size, off, cusecount, len); | ||
| 530 | } | ||
| 531 | |||
| 532 | static ssize_t rate_dbg_read(struct file *file, char __user *buf, | ||
| 533 | size_t size, loff_t *off) | ||
| 534 | { | ||
| 535 | struct clk *clk = file->f_dentry->d_inode->i_private; | ||
| 536 | char crate[128]; | ||
| 537 | unsigned int rate; | ||
| 538 | unsigned int len; | ||
| 539 | |||
| 540 | rate = clk_get_rate(clk); | ||
| 541 | len = sprintf(crate, "%u\n", rate); | ||
| 542 | return simple_read_from_buffer(buf, size, off, crate, len); | ||
| 543 | } | ||
| 544 | |||
| 545 | static const struct file_operations usecount_fops = { | ||
| 546 | .read = usecount_dbg_read, | ||
| 547 | }; | ||
| 548 | |||
| 549 | static const struct file_operations set_rate_fops = { | ||
| 550 | .read = rate_dbg_read, | ||
| 551 | }; | ||
| 552 | |||
| 553 | static struct dentry *clk_debugfs_register_dir(struct clk *c, | ||
| 554 | struct dentry *p_dentry) | ||
| 555 | { | ||
| 556 | struct dentry *d, *clk_d; | ||
| 557 | const char *p = c->name; | ||
| 558 | |||
| 559 | if (!p) | ||
| 560 | p = "BUG"; | ||
| 561 | |||
| 562 | clk_d = debugfs_create_dir(p, p_dentry); | ||
| 563 | if (!clk_d) | ||
| 564 | return NULL; | ||
| 565 | |||
| 566 | d = debugfs_create_file("usecount", S_IRUGO, | ||
| 567 | clk_d, c, &usecount_fops); | ||
| 568 | if (!d) | ||
| 569 | goto err_out; | ||
| 570 | d = debugfs_create_file("rate", S_IRUGO, | ||
| 571 | clk_d, c, &set_rate_fops); | ||
| 572 | if (!d) | ||
| 573 | goto err_out; | ||
| 574 | /* | ||
| 575 | * TODO : not currently available in ux500 | ||
| 576 | * d = debugfs_create_x32("flags", S_IRUGO, clk_d, (u32 *)&c->flags); | ||
| 577 | * if (!d) | ||
| 578 | * goto err_out; | ||
| 579 | */ | ||
| 580 | |||
| 581 | return clk_d; | ||
| 582 | |||
| 583 | err_out: | ||
| 584 | debugfs_remove_recursive(clk_d); | ||
| 585 | return NULL; | ||
| 586 | } | ||
| 587 | |||
| 588 | static int clk_debugfs_register_one(struct clk *c) | ||
| 589 | { | ||
| 590 | struct clk *pa = c->parent_periph; | ||
| 591 | struct clk *bpa = c->parent_cluster; | ||
| 592 | |||
| 593 | if (!(bpa && !pa)) { | ||
| 594 | c->dent = clk_debugfs_register_dir(c, | ||
| 595 | pa ? pa->dent : clk_debugfs_root); | ||
| 596 | if (!c->dent) | ||
| 597 | return -ENOMEM; | ||
| 598 | } | ||
| 599 | |||
| 600 | if (bpa) { | ||
| 601 | c->dent_bus = clk_debugfs_register_dir(c, | ||
| 602 | bpa->dent_bus ? bpa->dent_bus : bpa->dent); | ||
| 603 | if ((!c->dent_bus) && (c->dent)) { | ||
| 604 | debugfs_remove_recursive(c->dent); | ||
| 605 | c->dent = NULL; | ||
| 606 | return -ENOMEM; | ||
| 607 | } | ||
| 608 | } | ||
| 609 | return 0; | ||
| 610 | } | ||
| 611 | |||
| 612 | static int clk_debugfs_register(struct clk *c) | ||
| 613 | { | ||
| 614 | int err; | ||
| 615 | struct clk *pa = c->parent_periph; | ||
| 616 | struct clk *bpa = c->parent_cluster; | ||
| 617 | |||
| 618 | if (pa && (!pa->dent && !pa->dent_bus)) { | ||
| 619 | err = clk_debugfs_register(pa); | ||
| 620 | if (err) | ||
| 621 | return err; | ||
| 622 | } | ||
| 623 | |||
| 624 | if (bpa && (!bpa->dent && !bpa->dent_bus)) { | ||
| 625 | err = clk_debugfs_register(bpa); | ||
| 626 | if (err) | ||
| 627 | return err; | ||
| 628 | } | ||
| 629 | |||
| 630 | if ((!c->dent) && (!c->dent_bus)) { | ||
| 631 | err = clk_debugfs_register_one(c); | ||
| 632 | if (err) | ||
| 633 | return err; | ||
| 634 | } | ||
| 635 | return 0; | ||
| 636 | } | ||
| 637 | |||
| 638 | int __init clk_debugfs_init(void) | ||
| 639 | { | ||
| 640 | struct clk *c; | ||
| 641 | struct dentry *d; | ||
| 642 | int err; | ||
| 643 | |||
| 644 | d = debugfs_create_dir("clock", NULL); | ||
| 645 | if (!d) | ||
| 646 | return -ENOMEM; | ||
| 647 | clk_debugfs_root = d; | ||
| 648 | |||
| 649 | list_for_each_entry(c, &clk_list, list) { | ||
| 650 | err = clk_debugfs_register(c); | ||
| 651 | if (err) | ||
| 652 | goto err_out; | ||
| 653 | } | ||
| 654 | return 0; | ||
| 655 | err_out: | ||
| 656 | debugfs_remove_recursive(clk_debugfs_root); | ||
| 657 | return err; | ||
| 658 | } | ||
| 659 | |||
| 660 | #endif /* defined(CONFIG_DEBUG_FS) */ | ||
| 661 | |||
| 662 | unsigned long clk_smp_twd_rate = 500000000; | ||
| 663 | |||
| 664 | unsigned long clk_smp_twd_get_rate(struct clk *clk) | ||
| 665 | { | ||
| 666 | return clk_smp_twd_rate; | ||
| 667 | } | ||
| 668 | |||
| 669 | static struct clk clk_smp_twd = { | ||
| 670 | .get_rate = clk_smp_twd_get_rate, | ||
| 671 | .name = "smp_twd", | ||
| 672 | }; | ||
| 673 | |||
| 674 | static struct clk_lookup clk_smp_twd_lookup = { | ||
| 675 | .dev_id = "smp_twd", | ||
| 676 | .clk = &clk_smp_twd, | ||
| 677 | }; | ||
| 678 | |||
| 679 | #ifdef CONFIG_CPU_FREQ | ||
| 680 | |||
| 681 | static int clk_twd_cpufreq_transition(struct notifier_block *nb, | ||
| 682 | unsigned long state, void *data) | ||
| 683 | { | ||
| 684 | struct cpufreq_freqs *f = data; | ||
| 685 | |||
| 686 | if (state == CPUFREQ_PRECHANGE) { | ||
| 687 | /* Save frequency in simple Hz */ | ||
| 688 | clk_smp_twd_rate = (f->new * 1000) / 2; | ||
| 689 | } | ||
| 690 | |||
| 691 | return NOTIFY_OK; | ||
| 692 | } | ||
| 693 | |||
| 694 | static struct notifier_block clk_twd_cpufreq_nb = { | ||
| 695 | .notifier_call = clk_twd_cpufreq_transition, | ||
| 696 | }; | ||
| 697 | |||
| 698 | int clk_init_smp_twd_cpufreq(void) | ||
| 699 | { | ||
| 700 | return cpufreq_register_notifier(&clk_twd_cpufreq_nb, | ||
| 701 | CPUFREQ_TRANSITION_NOTIFIER); | ||
| 702 | } | ||
| 703 | |||
| 704 | #endif | ||
| 705 | |||
| 706 | int __init clk_init(void) | ||
| 707 | { | ||
| 708 | clkdev_add_table(u8500_clks, ARRAY_SIZE(u8500_clks)); | ||
| 709 | clkdev_add(&clk_smp_twd_lookup); | ||
| 710 | |||
| 711 | #ifdef CONFIG_DEBUG_FS | ||
| 712 | clk_debugfs_add_table(u8500_clks, ARRAY_SIZE(u8500_clks)); | ||
| 713 | #endif | ||
| 714 | return 0; | ||
| 715 | } | ||
diff --git a/arch/arm/mach-ux500/clock.h b/arch/arm/mach-ux500/clock.h deleted file mode 100644 index 65d27a13f46d..000000000000 --- a/arch/arm/mach-ux500/clock.h +++ /dev/null | |||
| @@ -1,164 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2010 ST-Ericsson | ||
| 3 | * Copyright (C) 2009 STMicroelectronics | ||
| 4 | * | ||
| 5 | * This program is free software; you can redistribute it and/or modify | ||
| 6 | * it under the terms of the GNU General Public License version 2 as | ||
| 7 | * published by the Free Software Foundation. | ||
| 8 | */ | ||
| 9 | |||
| 10 | /** | ||
| 11 | * struct clkops - ux500 clock operations | ||
| 12 | * @enable: function to enable the clock | ||
| 13 | * @disable: function to disable the clock | ||
| 14 | * @get_rate: function to get the current clock rate | ||
| 15 | * | ||
| 16 | * This structure contains function pointers to functions that will be used to | ||
| 17 | * control the clock. All of these functions are optional. If get_rate is | ||
| 18 | * NULL, the rate in the struct clk will be used. | ||
| 19 | */ | ||
| 20 | struct clkops { | ||
| 21 | void (*enable) (struct clk *); | ||
| 22 | void (*disable) (struct clk *); | ||
| 23 | unsigned long (*get_rate) (struct clk *); | ||
| 24 | int (*set_parent)(struct clk *, struct clk *); | ||
| 25 | }; | ||
| 26 | |||
| 27 | /** | ||
| 28 | * struct clk - ux500 clock structure | ||
| 29 | * @ops: pointer to clkops struct used to control this clock | ||
| 30 | * @name: name, for debugging | ||
| 31 | * @enabled: refcount. positive if enabled, zero if disabled | ||
| 32 | * @get_rate: custom callback for getting the clock rate | ||
| 33 | * @data: custom per-clock data for example for the get_rate | ||
| 34 | * callback | ||
| 35 | * @rate: fixed rate for clocks which don't implement | ||
| 36 | * ops->getrate | ||
| 37 | * @prcmu_cg_off: address offset of the combined enable/disable register | ||
| 38 | * (used on u8500v1) | ||
| 39 | * @prcmu_cg_bit: bit in the combined enable/disable register (used on | ||
| 40 | * u8500v1) | ||
| 41 | * @prcmu_cg_mgt: address of the enable/disable register (used on | ||
| 42 | * u8500ed) | ||
| 43 | * @cluster: peripheral cluster number | ||
| 44 | * @prcc_bus: bit for the bus clock in the peripheral's CLKRST | ||
| 45 | * @prcc_kernel: bit for the kernel clock in the peripheral's CLKRST. | ||
| 46 | * -1 if no kernel clock exists. | ||
| 47 | * @parent_cluster: pointer to parent's cluster clk struct | ||
| 48 | * @parent_periph: pointer to parent's peripheral clk struct | ||
| 49 | * | ||
| 50 | * Peripherals are organised into clusters, and each cluster has an associated | ||
| 51 | * bus clock. Some peripherals also have a parent peripheral clock. | ||
| 52 | * | ||
| 53 | * In order to enable a clock for a peripheral, we need to enable: | ||
| 54 | * (1) the parent cluster (bus) clock at the PRCMU level | ||
| 55 | * (2) the parent peripheral clock (if any) at the PRCMU level | ||
| 56 | * (3) the peripheral's bus & kernel clock at the PRCC level | ||
| 57 | * | ||
| 58 | * (1) and (2) are handled by defining clk structs (DEFINE_PRCMU_CLK) for each | ||
| 59 | * of the cluster and peripheral clocks, and hooking these as the parents of | ||
| 60 | * the individual peripheral clocks. | ||
| 61 | * | ||
| 62 | * (3) is handled by specifying the bits in the PRCC control registers required | ||
| 63 | * to enable these clocks and modifying them in the ->enable and | ||
| 64 | * ->disable callbacks of the peripheral clocks (DEFINE_PRCC_CLK). | ||
| 65 | * | ||
| 66 | * This structure describes both the PRCMU-level clocks and PRCC-level clocks. | ||
| 67 | * The prcmu_* fields are only used for the PRCMU clocks, and the cluster, | ||
| 68 | * prcc, and parent pointers are only used for the PRCC-level clocks. | ||
| 69 | */ | ||
| 70 | struct clk { | ||
| 71 | const struct clkops *ops; | ||
| 72 | const char *name; | ||
| 73 | unsigned int enabled; | ||
| 74 | unsigned long (*get_rate)(struct clk *); | ||
| 75 | void *data; | ||
| 76 | |||
| 77 | unsigned long rate; | ||
| 78 | struct list_head list; | ||
| 79 | |||
| 80 | /* These three are only for PRCMU clks */ | ||
| 81 | |||
| 82 | unsigned int prcmu_cg_off; | ||
| 83 | unsigned int prcmu_cg_bit; | ||
| 84 | unsigned int prcmu_cg_mgt; | ||
| 85 | |||
| 86 | /* The rest are only for PRCC clks */ | ||
| 87 | |||
| 88 | int cluster; | ||
| 89 | unsigned int prcc_bus; | ||
| 90 | unsigned int prcc_kernel; | ||
| 91 | |||
| 92 | struct clk *parent_cluster; | ||
| 93 | struct clk *parent_periph; | ||
| 94 | #if defined(CONFIG_DEBUG_FS) | ||
| 95 | struct dentry *dent; /* For visible tree hierarchy */ | ||
| 96 | struct dentry *dent_bus; /* For visible tree hierarchy */ | ||
| 97 | #endif | ||
| 98 | }; | ||
| 99 | |||
| 100 | #define DEFINE_PRCMU_CLK(_name, _cg_off, _cg_bit, _reg) \ | ||
| 101 | struct clk clk_##_name = { \ | ||
| 102 | .name = #_name, \ | ||
| 103 | .ops = &clk_prcmu_ops, \ | ||
| 104 | .prcmu_cg_off = _cg_off, \ | ||
| 105 | .prcmu_cg_bit = _cg_bit, \ | ||
| 106 | .prcmu_cg_mgt = PRCM_##_reg##_MGT \ | ||
| 107 | } | ||
| 108 | |||
| 109 | #define DEFINE_PRCMU_CLK_RATE(_name, _cg_off, _cg_bit, _reg, _rate) \ | ||
| 110 | struct clk clk_##_name = { \ | ||
| 111 | .name = #_name, \ | ||
| 112 | .ops = &clk_prcmu_ops, \ | ||
| 113 | .prcmu_cg_off = _cg_off, \ | ||
| 114 | .prcmu_cg_bit = _cg_bit, \ | ||
| 115 | .rate = _rate, \ | ||
| 116 | .prcmu_cg_mgt = PRCM_##_reg##_MGT \ | ||
| 117 | } | ||
| 118 | |||
| 119 | #define DEFINE_PRCC_CLK(_pclust, _name, _bus_en, _kernel_en, _kernclk) \ | ||
| 120 | struct clk clk_##_name = { \ | ||
| 121 | .name = #_name, \ | ||
| 122 | .ops = &clk_prcc_ops, \ | ||
| 123 | .cluster = _pclust, \ | ||
| 124 | .prcc_bus = _bus_en, \ | ||
| 125 | .prcc_kernel = _kernel_en, \ | ||
| 126 | .parent_cluster = &clk_per##_pclust##clk, \ | ||
| 127 | .parent_periph = _kernclk \ | ||
| 128 | } | ||
| 129 | |||
| 130 | #define DEFINE_PRCC_CLK_CUSTOM(_pclust, _name, _bus_en, _kernel_en, _kernclk, _callback, _data) \ | ||
| 131 | struct clk clk_##_name = { \ | ||
| 132 | .name = #_name, \ | ||
| 133 | .ops = &clk_prcc_ops, \ | ||
| 134 | .cluster = _pclust, \ | ||
| 135 | .prcc_bus = _bus_en, \ | ||
| 136 | .prcc_kernel = _kernel_en, \ | ||
| 137 | .parent_cluster = &clk_per##_pclust##clk, \ | ||
| 138 | .parent_periph = _kernclk, \ | ||
| 139 | .get_rate = _callback, \ | ||
| 140 | .data = (void *) _data \ | ||
| 141 | } | ||
| 142 | |||
| 143 | |||
| 144 | #define CLK(_clk, _devname, _conname) \ | ||
| 145 | { \ | ||
| 146 | .clk = &clk_##_clk, \ | ||
| 147 | .dev_id = _devname, \ | ||
| 148 | .con_id = _conname, \ | ||
| 149 | } | ||
| 150 | |||
| 151 | int __init clk_db8500_ed_fixup(void); | ||
| 152 | int __init clk_init(void); | ||
| 153 | |||
| 154 | #ifdef CONFIG_DEBUG_FS | ||
| 155 | int clk_debugfs_init(void); | ||
| 156 | #else | ||
| 157 | static inline int clk_debugfs_init(void) { return 0; } | ||
| 158 | #endif | ||
| 159 | |||
| 160 | #ifdef CONFIG_CPU_FREQ | ||
| 161 | int clk_init_smp_twd_cpufreq(void); | ||
| 162 | #else | ||
| 163 | static inline int clk_init_smp_twd_cpufreq(void) { return 0; } | ||
| 164 | #endif | ||
diff --git a/arch/arm/mach-ux500/cpu-db8500.c b/arch/arm/mach-ux500/cpu-db8500.c index db3c52d56ca4..38b7f9c4788b 100644 --- a/arch/arm/mach-ux500/cpu-db8500.c +++ b/arch/arm/mach-ux500/cpu-db8500.c | |||
| @@ -138,10 +138,6 @@ static struct platform_device *platform_devs[] __initdata = { | |||
| 138 | &db8500_prcmu_device, | 138 | &db8500_prcmu_device, |
| 139 | }; | 139 | }; |
| 140 | 140 | ||
| 141 | static struct platform_device *of_platform_devs[] __initdata = { | ||
| 142 | &u8500_dma40_device, | ||
| 143 | }; | ||
| 144 | |||
| 145 | static resource_size_t __initdata db8500_gpio_base[] = { | 141 | static resource_size_t __initdata db8500_gpio_base[] = { |
| 146 | U8500_GPIOBANK0_BASE, | 142 | U8500_GPIOBANK0_BASE, |
| 147 | U8500_GPIOBANK1_BASE, | 143 | U8500_GPIOBANK1_BASE, |
| @@ -235,7 +231,6 @@ struct device * __init u8500_init_devices(struct ab8500_platform_data *ab8500) | |||
| 235 | struct device * __init u8500_of_init_devices(void) | 231 | struct device * __init u8500_of_init_devices(void) |
| 236 | { | 232 | { |
| 237 | struct device *parent; | 233 | struct device *parent; |
| 238 | int i; | ||
| 239 | 234 | ||
| 240 | parent = db8500_soc_device_init(); | 235 | parent = db8500_soc_device_init(); |
| 241 | 236 | ||
| @@ -244,8 +239,7 @@ struct device * __init u8500_of_init_devices(void) | |||
| 244 | platform_device_register_data(parent, | 239 | platform_device_register_data(parent, |
| 245 | "cpufreq-u8500", -1, NULL, 0); | 240 | "cpufreq-u8500", -1, NULL, 0); |
| 246 | 241 | ||
| 247 | for (i = 0; i < ARRAY_SIZE(of_platform_devs); i++) | 242 | u8500_dma40_device.dev.parent = parent; |
| 248 | of_platform_devs[i]->dev.parent = parent; | ||
| 249 | 243 | ||
| 250 | /* | 244 | /* |
| 251 | * Devices to be DT:ed: | 245 | * Devices to be DT:ed: |
| @@ -253,7 +247,7 @@ struct device * __init u8500_of_init_devices(void) | |||
| 253 | * db8500_pmu_device = done | 247 | * db8500_pmu_device = done |
| 254 | * db8500_prcmu_device = done | 248 | * db8500_prcmu_device = done |
| 255 | */ | 249 | */ |
| 256 | platform_add_devices(of_platform_devs, ARRAY_SIZE(of_platform_devs)); | 250 | platform_device_register(&u8500_dma40_device); |
| 257 | 251 | ||
| 258 | return parent; | 252 | return parent; |
| 259 | } | 253 | } |
diff --git a/arch/arm/mach-ux500/cpu.c b/arch/arm/mach-ux500/cpu.c index e2360e7c770d..17a78ec516ff 100644 --- a/arch/arm/mach-ux500/cpu.c +++ b/arch/arm/mach-ux500/cpu.c | |||
| @@ -8,7 +8,6 @@ | |||
| 8 | 8 | ||
| 9 | #include <linux/platform_device.h> | 9 | #include <linux/platform_device.h> |
| 10 | #include <linux/io.h> | 10 | #include <linux/io.h> |
| 11 | #include <linux/clk.h> | ||
| 12 | #include <linux/mfd/db8500-prcmu.h> | 11 | #include <linux/mfd/db8500-prcmu.h> |
| 13 | #include <linux/clksrc-dbx500-prcmu.h> | 12 | #include <linux/clksrc-dbx500-prcmu.h> |
| 14 | #include <linux/sys_soc.h> | 13 | #include <linux/sys_soc.h> |
| @@ -17,6 +16,7 @@ | |||
| 17 | #include <linux/stat.h> | 16 | #include <linux/stat.h> |
| 18 | #include <linux/of.h> | 17 | #include <linux/of.h> |
| 19 | #include <linux/of_irq.h> | 18 | #include <linux/of_irq.h> |
| 19 | #include <linux/platform_data/clk-ux500.h> | ||
| 20 | 20 | ||
| 21 | #include <asm/hardware/gic.h> | 21 | #include <asm/hardware/gic.h> |
| 22 | #include <asm/mach/map.h> | 22 | #include <asm/mach/map.h> |
| @@ -25,8 +25,6 @@ | |||
| 25 | #include <mach/setup.h> | 25 | #include <mach/setup.h> |
| 26 | #include <mach/devices.h> | 26 | #include <mach/devices.h> |
| 27 | 27 | ||
| 28 | #include "clock.h" | ||
| 29 | |||
| 30 | void __iomem *_PRCMU_BASE; | 28 | void __iomem *_PRCMU_BASE; |
| 31 | 29 | ||
| 32 | /* | 30 | /* |
| @@ -70,13 +68,17 @@ void __init ux500_init_irq(void) | |||
| 70 | */ | 68 | */ |
| 71 | if (cpu_is_u8500_family()) | 69 | if (cpu_is_u8500_family()) |
| 72 | db8500_prcmu_early_init(); | 70 | db8500_prcmu_early_init(); |
| 73 | clk_init(); | 71 | |
| 72 | if (cpu_is_u8500_family()) | ||
| 73 | u8500_clk_init(); | ||
| 74 | else if (cpu_is_u9540()) | ||
| 75 | u9540_clk_init(); | ||
| 76 | else if (cpu_is_u8540()) | ||
| 77 | u8540_clk_init(); | ||
| 74 | } | 78 | } |
| 75 | 79 | ||
| 76 | void __init ux500_init_late(void) | 80 | void __init ux500_init_late(void) |
| 77 | { | 81 | { |
| 78 | clk_debugfs_init(); | ||
| 79 | clk_init_smp_twd_cpufreq(); | ||
| 80 | } | 82 | } |
| 81 | 83 | ||
| 82 | static const char * __init ux500_get_machine(void) | 84 | static const char * __init ux500_get_machine(void) |
diff --git a/arch/arm/mach-ux500/include/mach/msp.h b/arch/arm/mach-ux500/include/mach/msp.h index 798be19129ef..3cc7142eee02 100644 --- a/arch/arm/mach-ux500/include/mach/msp.h +++ b/arch/arm/mach-ux500/include/mach/msp.h | |||
| @@ -22,8 +22,6 @@ struct msp_i2s_platform_data { | |||
| 22 | enum msp_i2s_id id; | 22 | enum msp_i2s_id id; |
| 23 | struct stedma40_chan_cfg *msp_i2s_dma_rx; | 23 | struct stedma40_chan_cfg *msp_i2s_dma_rx; |
| 24 | struct stedma40_chan_cfg *msp_i2s_dma_tx; | 24 | struct stedma40_chan_cfg *msp_i2s_dma_tx; |
| 25 | int (*msp_i2s_init) (void); | ||
| 26 | int (*msp_i2s_exit) (void); | ||
| 27 | }; | 25 | }; |
| 28 | 26 | ||
| 29 | #endif | 27 | #endif |
diff --git a/arch/arm/mach-vt8500/Kconfig b/arch/arm/mach-vt8500/Kconfig deleted file mode 100644 index 2c20a341c11a..000000000000 --- a/arch/arm/mach-vt8500/Kconfig +++ /dev/null | |||
| @@ -1,73 +0,0 @@ | |||
| 1 | if ARCH_VT8500 | ||
| 2 | |||
| 3 | config VTWM_VERSION_VT8500 | ||
| 4 | bool | ||
| 5 | |||
| 6 | config VTWM_VERSION_WM8505 | ||
| 7 | bool | ||
| 8 | |||
| 9 | config MACH_BV07 | ||
| 10 | bool "Benign BV07-8500 Mini Netbook" | ||
| 11 | depends on ARCH_VT8500 | ||
| 12 | select VTWM_VERSION_VT8500 | ||
| 13 | help | ||
| 14 | Add support for the inexpensive 7-inch netbooks sold by many | ||
| 15 | Chinese distributors under various names. Note that there are | ||
| 16 | many hardware implementations in identical exterior, make sure | ||
| 17 | that yours is indeed based on a VIA VT8500 chip. | ||
| 18 | |||
| 19 | config MACH_WM8505_7IN_NETBOOK | ||
| 20 | bool "WM8505 7-inch generic netbook" | ||
| 21 | depends on ARCH_VT8500 | ||
| 22 | select VTWM_VERSION_WM8505 | ||
| 23 | help | ||
| 24 | Add support for the inexpensive 7-inch netbooks sold by many | ||
| 25 | Chinese distributors under various names. Note that there are | ||
| 26 | many hardware implementations in identical exterior, make sure | ||
| 27 | that yours is indeed based on a WonderMedia WM8505 chip. | ||
| 28 | |||
| 29 | comment "LCD panel size" | ||
| 30 | |||
| 31 | config WMT_PANEL_800X480 | ||
| 32 | bool "7-inch with 800x480 resolution" | ||
| 33 | depends on (FB_VT8500 || FB_WM8505) | ||
| 34 | default y | ||
| 35 | help | ||
| 36 | These are found in most of the netbooks in generic cases, as | ||
| 37 | well as in Eken M001 tablets and possibly elsewhere. | ||
| 38 | |||
| 39 | To select this panel at runtime, say y here and append | ||
| 40 | 'panel=800x480' to your kernel command line. Otherwise, the | ||
| 41 | largest one available will be used. | ||
| 42 | |||
| 43 | config WMT_PANEL_800X600 | ||
| 44 | bool "8-inch with 800x600 resolution" | ||
| 45 | depends on (FB_VT8500 || FB_WM8505) | ||
| 46 | help | ||
| 47 | These are found in Eken M003 tablets and possibly elsewhere. | ||
| 48 | |||
| 49 | To select this panel at runtime, say y here and append | ||
| 50 | 'panel=800x600' to your kernel command line. Otherwise, the | ||
| 51 | largest one available will be used. | ||
| 52 | |||
| 53 | config WMT_PANEL_1024X576 | ||
| 54 | bool "10-inch with 1024x576 resolution" | ||
| 55 | depends on (FB_VT8500 || FB_WM8505) | ||
| 56 | help | ||
| 57 | These are found in CherryPal netbooks and possibly elsewhere. | ||
| 58 | |||
| 59 | To select this panel at runtime, say y here and append | ||
| 60 | 'panel=1024x576' to your kernel command line. Otherwise, the | ||
| 61 | largest one available will be used. | ||
| 62 | |||
| 63 | config WMT_PANEL_1024X600 | ||
| 64 | bool "10-inch with 1024x600 resolution" | ||
| 65 | depends on (FB_VT8500 || FB_WM8505) | ||
| 66 | help | ||
| 67 | These are found in Eken M006 tablets and possibly elsewhere. | ||
| 68 | |||
| 69 | To select this panel at runtime, say y here and append | ||
| 70 | 'panel=1024x600' to your kernel command line. Otherwise, the | ||
| 71 | largest one available will be used. | ||
| 72 | |||
| 73 | endif | ||
diff --git a/arch/arm/mach-vt8500/Makefile b/arch/arm/mach-vt8500/Makefile index 7ce51767c99c..e035251cda48 100644 --- a/arch/arm/mach-vt8500/Makefile +++ b/arch/arm/mach-vt8500/Makefile | |||
| @@ -1,7 +1 @@ | |||
| 1 | obj-y += devices.o gpio.o irq.o timer.o restart.o | obj-$(CONFIG_ARCH_VT8500) += irq.o timer.o vt8500.o | |
| 2 | |||
| 3 | obj-$(CONFIG_VTWM_VERSION_VT8500) += devices-vt8500.o | ||
| 4 | obj-$(CONFIG_VTWM_VERSION_WM8505) += devices-wm8505.o | ||
| 5 | |||
| 6 | obj-$(CONFIG_MACH_BV07) += bv07.o | ||
| 7 | obj-$(CONFIG_MACH_WM8505_7IN_NETBOOK) += wm8505_7in.o | ||
diff --git a/arch/arm/mach-vt8500/bv07.c b/arch/arm/mach-vt8500/bv07.c deleted file mode 100644 index f9fbeb2d10e9..000000000000 --- a/arch/arm/mach-vt8500/bv07.c +++ /dev/null | |||
| @@ -1,80 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * arch/arm/mach-vt8500/bv07.c | ||
| 3 | * | ||
| 4 | * Copyright (C) 2010 Alexey Charkov <alchark@gmail.com> | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License as published by | ||
| 8 | * the Free Software Foundation; either version 2 of the License, or | ||
| 9 | * (at your option) any later version. | ||
| 10 | * | ||
| 11 | * This program is distributed in the hope that it will be useful, | ||
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | * GNU General Public License for more details. | ||
| 15 | * | ||
| 16 | * You should have received a copy of the GNU General Public License | ||
| 17 | * along with this program; if not, write to the Free Software | ||
| 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
| 19 | */ | ||
| 20 | |||
| 21 | #include <linux/io.h> | ||
| 22 | #include <linux/pm.h> | ||
| 23 | |||
| 24 | #include <asm/mach-types.h> | ||
| 25 | #include <asm/mach/arch.h> | ||
| 26 | #include <mach/restart.h> | ||
| 27 | |||
| 28 | #include "devices.h" | ||
| 29 | |||
| 30 | static void __iomem *pmc_hiber; | ||
| 31 | |||
| 32 | static struct platform_device *devices[] __initdata = { | ||
| 33 | &vt8500_device_uart0, | ||
| 34 | &vt8500_device_lcdc, | ||
| 35 | &vt8500_device_ehci, | ||
| 36 | &vt8500_device_ge_rops, | ||
| 37 | &vt8500_device_pwm, | ||
| 38 | &vt8500_device_pwmbl, | ||
| 39 | &vt8500_device_rtc, | ||
| 40 | }; | ||
| 41 | |||
| 42 | static void vt8500_power_off(void) | ||
| 43 | { | ||
| 44 | local_irq_disable(); | ||
| 45 | writew(5, pmc_hiber); | ||
| 46 | asm("mcr%? p15, 0, %0, c7, c0, 4" : : "r" (0)); | ||
| 47 | } | ||
| 48 | |||
| 49 | void __init bv07_init(void) | ||
| 50 | { | ||
| 51 | #ifdef CONFIG_FB_VT8500 | ||
| 52 | void __iomem *gpio_mux_reg = ioremap(wmt_gpio_base + 0x200, 4); | ||
| 53 | if (gpio_mux_reg) { | ||
| 54 | writel(readl(gpio_mux_reg) | 1, gpio_mux_reg); | ||
| 55 | iounmap(gpio_mux_reg); | ||
| 56 | } else { | ||
| 57 | printk(KERN_ERR "Could not remap the GPIO mux register, display may not work properly!\n"); | ||
| 58 | } | ||
| 59 | #endif | ||
| 60 | pmc_hiber = ioremap(wmt_pmc_base + 0x12, 2); | ||
| 61 | if (pmc_hiber) | ||
| 62 | pm_power_off = &vt8500_power_off; | ||
| 63 | else | ||
| 64 | printk(KERN_ERR "PMC Hibernation register could not be remapped, not enabling power off!\n"); | ||
| 65 | |||
| 66 | wmt_setup_restart(); | ||
| 67 | vt8500_set_resources(); | ||
| 68 | platform_add_devices(devices, ARRAY_SIZE(devices)); | ||
| 69 | vt8500_gpio_init(); | ||
| 70 | } | ||
| 71 | |||
| 72 | MACHINE_START(BV07, "Benign BV07 Mini Netbook") | ||
| 73 | .atag_offset = 0x100, | ||
| 74 | .restart = wmt_restart, | ||
| 75 | .reserve = vt8500_reserve_mem, | ||
| 76 | .map_io = vt8500_map_io, | ||
| 77 | .init_irq = vt8500_init_irq, | ||
| 78 | .timer = &vt8500_timer, | ||
| 79 | .init_machine = bv07_init, | ||
| 80 | MACHINE_END | ||
diff --git a/arch/arm/mach-msm/include/mach/system.h b/arch/arm/mach-vt8500/common.h index f5fb2ec87ffe..2b2419646e95 100644 --- a/arch/arm/mach-msm/include/mach/system.h +++ b/arch/arm/mach-vt8500/common.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* arch/arm/mach-msm/include/mach/system.h | 1 | /* linux/arch/arm/mach-vt8500/dt_common.h |
| 2 | * | 2 | * |
| 3 | * Copyright (C) 2007 Google, Inc. | 3 | * Copyright (C) 2012 Tony Prisk <linux@prisktech.co.nz> |
| 4 | * | 4 | * |
| 5 | * This software is licensed under the terms of the GNU General Public | 5 | * This software is licensed under the terms of the GNU General Public |
| 6 | * License version 2, as published by the Free Software Foundation, and | 6 | * License version 2, as published by the Free Software Foundation, and |
| @@ -13,7 +13,16 @@ | |||
| 13 | * | 13 | * |
| 14 | */ | 14 | */ |
| 15 | 15 | ||
| 16 | /* low level hardware reset hook -- for example, hitting the | 16 | #ifndef __ARCH_ARM_MACH_VT8500_DT_COMMON_H |
| 17 | * PSHOLD line on the PMIC to hard reset the system | 17 | #define __ARCH_ARM_MACH_VT8500_DT_COMMON_H |
| 18 | */ | 18 | |
| 19 | extern void (*msm_hw_reset_hook)(void); | 19 | #include <linux/of.h> |
| 20 | |||
| 21 | void __init vt8500_timer_init(void); | ||
| 22 | int __init vt8500_irq_init(struct device_node *node, | ||
| 23 | struct device_node *parent); | ||
| 24 | |||
| 25 | /* defined in drivers/clk/clk-vt8500.c */ | ||
| 26 | void __init vtwm_clk_init(void __iomem *pmc_base); | ||
| 27 | |||
| 28 | #endif | ||
diff --git a/arch/arm/mach-vt8500/devices-vt8500.c b/arch/arm/mach-vt8500/devices-vt8500.c deleted file mode 100644 index 19519aeecf37..000000000000 --- a/arch/arm/mach-vt8500/devices-vt8500.c +++ /dev/null | |||
| @@ -1,91 +0,0 @@ | |||
| 1 | /* linux/arch/arm/mach-vt8500/devices-vt8500.c | ||
| 2 | * | ||
| 3 | * Copyright (C) 2010 Alexey Charkov <alchark@gmail.com> | ||
| 4 | * | ||
| 5 | * This software is licensed under the terms of the GNU General Public | ||
| 6 | * License version 2, as published by the Free Software Foundation, and | ||
| 7 | * may be copied, distributed, and modified under those terms. | ||
| 8 | * | ||
| 9 | * This program is distributed in the hope that it will be useful, | ||
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | * GNU General Public License for more details. | ||
| 13 | * | ||
| 14 | */ | ||
| 15 | |||
| 16 | #include <linux/platform_device.h> | ||
| 17 | |||
| 18 | #include <mach/vt8500_regs.h> | ||
| 19 | #include <mach/vt8500_irqs.h> | ||
| 20 | #include <mach/i8042.h> | ||
| 21 | #include "devices.h" | ||
| 22 | |||
| 23 | void __init vt8500_set_resources(void) | ||
| 24 | { | ||
| 25 | struct resource tmp[3]; | ||
| 26 | |||
| 27 | tmp[0] = wmt_mmio_res(VT8500_LCDC_BASE, SZ_1K); | ||
| 28 | tmp[1] = wmt_irq_res(IRQ_LCDC); | ||
| 29 | wmt_res_add(&vt8500_device_lcdc, tmp, 2); | ||
| 30 | |||
| 31 | tmp[0] = wmt_mmio_res(VT8500_UART0_BASE, 0x1040); | ||
| 32 | tmp[1] = wmt_irq_res(IRQ_UART0); | ||
| 33 | wmt_res_add(&vt8500_device_uart0, tmp, 2); | ||
| 34 | |||
| 35 | tmp[0] = wmt_mmio_res(VT8500_UART1_BASE, 0x1040); | ||
| 36 | tmp[1] = wmt_irq_res(IRQ_UART1); | ||
| 37 | wmt_res_add(&vt8500_device_uart1, tmp, 2); | ||
| 38 | |||
| 39 | tmp[0] = wmt_mmio_res(VT8500_UART2_BASE, 0x1040); | ||
| 40 | tmp[1] = wmt_irq_res(IRQ_UART2); | ||
| 41 | wmt_res_add(&vt8500_device_uart2, tmp, 2); | ||
| 42 | |||
| 43 | tmp[0] = wmt_mmio_res(VT8500_UART3_BASE, 0x1040); | ||
| 44 | tmp[1] = wmt_irq_res(IRQ_UART3); | ||
| 45 | wmt_res_add(&vt8500_device_uart3, tmp, 2); | ||
| 46 | |||
| 47 | tmp[0] = wmt_mmio_res(VT8500_EHCI_BASE, SZ_512); | ||
| 48 | tmp[1] = wmt_irq_res(IRQ_EHCI); | ||
| 49 | wmt_res_add(&vt8500_device_ehci, tmp, 2); | ||
| 50 | |||
| 51 | tmp[0] = wmt_mmio_res(VT8500_GEGEA_BASE, SZ_256); | ||
| 52 | wmt_res_add(&vt8500_device_ge_rops, tmp, 1); | ||
| 53 | |||
| 54 | tmp[0] = wmt_mmio_res(VT8500_PWM_BASE, 0x44); | ||
| 55 | wmt_res_add(&vt8500_device_pwm, tmp, 1); | ||
| 56 | |||
| 57 | tmp[0] = wmt_mmio_res(VT8500_RTC_BASE, 0x2c); | ||
| 58 | tmp[1] = wmt_irq_res(IRQ_RTC); | ||
| 59 | tmp[2] = wmt_irq_res(IRQ_RTCSM); | ||
| 60 | wmt_res_add(&vt8500_device_rtc, tmp, 3); | ||
| 61 | } | ||
| 62 | |||
| 63 | static void __init vt8500_set_externs(void) | ||
| 64 | { | ||
| 65 | /* Non-resource-aware stuff */ | ||
| 66 | wmt_ic_base = VT8500_IC_BASE; | ||
| 67 | wmt_gpio_base = VT8500_GPIO_BASE; | ||
| 68 | wmt_pmc_base = VT8500_PMC_BASE; | ||
| 69 | wmt_i8042_base = VT8500_PS2_BASE; | ||
| 70 | |||
| 71 | wmt_nr_irqs = VT8500_NR_IRQS; | ||
| 72 | wmt_timer_irq = IRQ_PMCOS0; | ||
| 73 | wmt_gpio_ext_irq[0] = IRQ_EXT0; | ||
| 74 | wmt_gpio_ext_irq[1] = IRQ_EXT1; | ||
| 75 | wmt_gpio_ext_irq[2] = IRQ_EXT2; | ||
| 76 | wmt_gpio_ext_irq[3] = IRQ_EXT3; | ||
| 77 | wmt_gpio_ext_irq[4] = IRQ_EXT4; | ||
| 78 | wmt_gpio_ext_irq[5] = IRQ_EXT5; | ||
| 79 | wmt_gpio_ext_irq[6] = IRQ_EXT6; | ||
| 80 | wmt_gpio_ext_irq[7] = IRQ_EXT7; | ||
| 81 | wmt_i8042_kbd_irq = IRQ_PS2KBD; | ||
| 82 | wmt_i8042_aux_irq = IRQ_PS2MOUSE; | ||
| 83 | } | ||
| 84 | |||
| 85 | void __init vt8500_map_io(void) | ||
| 86 | { | ||
| 87 | iotable_init(wmt_io_desc, ARRAY_SIZE(wmt_io_desc)); | ||
| 88 | |||
| 89 | /* Should be done before interrupts and timers are initialized */ | ||
| 90 | vt8500_set_externs(); | ||
| 91 | } | ||
diff --git a/arch/arm/mach-vt8500/devices-wm8505.c b/arch/arm/mach-vt8500/devices-wm8505.c deleted file mode 100644 index db4594e029f4..000000000000 --- a/arch/arm/mach-vt8500/devices-wm8505.c +++ /dev/null | |||
| @@ -1,99 +0,0 @@ | |||
| 1 | /* linux/arch/arm/mach-vt8500/devices-wm8505.c | ||
| 2 | * | ||
| 3 | * Copyright (C) 2010 Alexey Charkov <alchark@gmail.com> | ||
| 4 | * | ||
| 5 | * This software is licensed under the terms of the GNU General Public | ||
| 6 | * License version 2, as published by the Free Software Foundation, and | ||
| 7 | * may be copied, distributed, and modified under those terms. | ||
| 8 | * | ||
| 9 | * This program is distributed in the hope that it will be useful, | ||
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | * GNU General Public License for more details. | ||
| 13 | * | ||
| 14 | */ | ||
| 15 | |||
| 16 | #include <linux/platform_device.h> | ||
| 17 | |||
| 18 | #include <mach/wm8505_regs.h> | ||
| 19 | #include <mach/wm8505_irqs.h> | ||
| 20 | #include <mach/i8042.h> | ||
| 21 | #include "devices.h" | ||
| 22 | |||
| 23 | void __init wm8505_set_resources(void) | ||
| 24 | { | ||
| 25 | struct resource tmp[3]; | ||
| 26 | |||
| 27 | tmp[0] = wmt_mmio_res(WM8505_GOVR_BASE, SZ_512); | ||
| 28 | wmt_res_add(&vt8500_device_wm8505_fb, tmp, 1); | ||
| 29 | |||
| 30 | tmp[0] = wmt_mmio_res(WM8505_UART0_BASE, 0x1040); | ||
| 31 | tmp[1] = wmt_irq_res(IRQ_UART0); | ||
| 32 | wmt_res_add(&vt8500_device_uart0, tmp, 2); | ||
| 33 | |||
| 34 | tmp[0] = wmt_mmio_res(WM8505_UART1_BASE, 0x1040); | ||
| 35 | tmp[1] = wmt_irq_res(IRQ_UART1); | ||
| 36 | wmt_res_add(&vt8500_device_uart1, tmp, 2); | ||
| 37 | |||
| 38 | tmp[0] = wmt_mmio_res(WM8505_UART2_BASE, 0x1040); | ||
| 39 | tmp[1] = wmt_irq_res(IRQ_UART2); | ||
| 40 | wmt_res_add(&vt8500_device_uart2, tmp, 2); | ||
| 41 | |||
| 42 | tmp[0] = wmt_mmio_res(WM8505_UART3_BASE, 0x1040); | ||
| 43 | tmp[1] = wmt_irq_res(IRQ_UART3); | ||
| 44 | wmt_res_add(&vt8500_device_uart3, tmp, 2); | ||
| 45 | |||
| 46 | tmp[0] = wmt_mmio_res(WM8505_UART4_BASE, 0x1040); | ||
| 47 | tmp[1] = wmt_irq_res(IRQ_UART4); | ||
| 48 | wmt_res_add(&vt8500_device_uart4, tmp, 2); | ||
| 49 | |||
| 50 | tmp[0] = wmt_mmio_res(WM8505_UART5_BASE, 0x1040); | ||
| 51 | tmp[1] = wmt_irq_res(IRQ_UART5); | ||
| 52 | wmt_res_add(&vt8500_device_uart5, tmp, 2); | ||
| 53 | |||
| 54 | tmp[0] = wmt_mmio_res(WM8505_EHCI_BASE, SZ_512); | ||
| 55 | tmp[1] = wmt_irq_res(IRQ_EHCI); | ||
| 56 | wmt_res_add(&vt8500_device_ehci, tmp, 2); | ||
| 57 | |||
| 58 | tmp[0] = wmt_mmio_res(WM8505_GEGEA_BASE, SZ_256); | ||
| 59 | wmt_res_add(&vt8500_device_ge_rops, tmp, 1); | ||
| 60 | |||
| 61 | tmp[0] = wmt_mmio_res(WM8505_PWM_BASE, 0x44); | ||
| 62 | wmt_res_add(&vt8500_device_pwm, tmp, 1); | ||
| 63 | |||
| 64 | tmp[0] = wmt_mmio_res(WM8505_RTC_BASE, 0x2c); | ||
| 65 | tmp[1] = wmt_irq_res(IRQ_RTC); | ||
| 66 | tmp[2] = wmt_irq_res(IRQ_RTCSM); | ||
| 67 | wmt_res_add(&vt8500_device_rtc, tmp, 3); | ||
| 68 | } | ||
| 69 | |||
| 70 | static void __init wm8505_set_externs(void) | ||
| 71 | { | ||
| 72 | /* Non-resource-aware stuff */ | ||
| 73 | wmt_ic_base = WM8505_IC_BASE; | ||
| 74 | wmt_sic_base = WM8505_SIC_BASE; | ||
| 75 | wmt_gpio_base = WM8505_GPIO_BASE; | ||
| 76 | wmt_pmc_base = WM8505_PMC_BASE; | ||
| 77 | wmt_i8042_base = WM8505_PS2_BASE; | ||
| 78 | |||
| 79 | wmt_nr_irqs = WM8505_NR_IRQS; | ||
| 80 | wmt_timer_irq = IRQ_PMCOS0; | ||
| 81 | wmt_gpio_ext_irq[0] = IRQ_EXT0; | ||
| 82 | wmt_gpio_ext_irq[1] = IRQ_EXT1; | ||
| 83 | wmt_gpio_ext_irq[2] = IRQ_EXT2; | ||
| 84 | wmt_gpio_ext_irq[3] = IRQ_EXT3; | ||
| 85 | wmt_gpio_ext_irq[4] = IRQ_EXT4; | ||
| 86 | wmt_gpio_ext_irq[5] = IRQ_EXT5; | ||
| 87 | wmt_gpio_ext_irq[6] = IRQ_EXT6; | ||
| 88 | wmt_gpio_ext_irq[7] = IRQ_EXT7; | ||
| 89 | wmt_i8042_kbd_irq = IRQ_PS2KBD; | ||
| 90 | wmt_i8042_aux_irq = IRQ_PS2MOUSE; | ||
| 91 | } | ||
| 92 | |||
| 93 | void __init wm8505_map_io(void) | ||
| 94 | { | ||
| 95 | iotable_init(wmt_io_desc, ARRAY_SIZE(wmt_io_desc)); | ||
| 96 | |||
| 97 | /* Should be done before interrupts and timers are initialized */ | ||
| 98 | wm8505_set_externs(); | ||
| 99 | } | ||
diff --git a/arch/arm/mach-vt8500/devices.c b/arch/arm/mach-vt8500/devices.c deleted file mode 100644 index 1fcdc36b358d..000000000000 --- a/arch/arm/mach-vt8500/devices.c +++ /dev/null | |||
| @@ -1,270 +0,0 @@ | |||
| 1 | /* linux/arch/arm/mach-vt8500/devices.c | ||
| 2 | * | ||
| 3 | * Copyright (C) 2010 Alexey Charkov <alchark@gmail.com> | ||
| 4 | * | ||
| 5 | * This software is licensed under the terms of the GNU General Public | ||
| 6 | * License version 2, as published by the Free Software Foundation, and | ||
| 7 | * may be copied, distributed, and modified under those terms. | ||
| 8 | * | ||
| 9 | * This program is distributed in the hope that it will be useful, | ||
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | * GNU General Public License for more details. | ||
| 13 | * | ||
| 14 | */ | ||
| 15 | |||
| 16 | #include <linux/kernel.h> | ||
| 17 | #include <linux/io.h> | ||
| 18 | #include <linux/device.h> | ||
| 19 | #include <linux/dma-mapping.h> | ||
| 20 | #include <linux/platform_device.h> | ||
| 21 | #include <linux/pwm_backlight.h> | ||
| 22 | #include <linux/memblock.h> | ||
| 23 | |||
| 24 | #include <asm/mach/arch.h> | ||
| 25 | |||
| 26 | #include <mach/vt8500fb.h> | ||
| 27 | #include <mach/i8042.h> | ||
| 28 | #include "devices.h" | ||
| 29 | |||
| 30 | /* These can't use resources currently */ | ||
| 31 | unsigned long wmt_ic_base __initdata; | ||
| 32 | unsigned long wmt_sic_base __initdata; | ||
| 33 | unsigned long wmt_gpio_base __initdata; | ||
| 34 | unsigned long wmt_pmc_base __initdata; | ||
| 35 | unsigned long wmt_i8042_base __initdata; | ||
| 36 | |||
| 37 | int wmt_nr_irqs __initdata; | ||
| 38 | int wmt_timer_irq __initdata; | ||
| 39 | int wmt_gpio_ext_irq[8] __initdata; | ||
| 40 | |||
| 41 | /* Should remain accessible after init. | ||
| 42 | * i8042 driver desperately calls for attention... | ||
| 43 | */ | ||
| 44 | int wmt_i8042_kbd_irq; | ||
| 45 | int wmt_i8042_aux_irq; | ||
| 46 | |||
| 47 | static u64 fb_dma_mask = DMA_BIT_MASK(32); | ||
| 48 | |||
| 49 | struct platform_device vt8500_device_lcdc = { | ||
| 50 | .name = "vt8500-lcd", | ||
| 51 | .id = 0, | ||
| 52 | .dev = { | ||
| 53 | .dma_mask = &fb_dma_mask, | ||
| 54 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
| 55 | }, | ||
| 56 | }; | ||
| 57 | |||
| 58 | struct platform_device vt8500_device_wm8505_fb = { | ||
| 59 | .name = "wm8505-fb", | ||
| 60 | .id = 0, | ||
| 61 | }; | ||
| 62 | |||
| 63 | /* Smallest to largest */ | ||
| 64 | static struct vt8500fb_platform_data panels[] = { | ||
| 65 | #ifdef CONFIG_WMT_PANEL_800X480 | ||
| 66 | { | ||
| 67 | .xres_virtual = 800, | ||
| 68 | .yres_virtual = 480 * 2, | ||
| 69 | .mode = { | ||
| 70 | .name = "800x480", | ||
| 71 | .xres = 800, | ||
| 72 | .yres = 480, | ||
| 73 | .left_margin = 88, | ||
| 74 | .right_margin = 40, | ||
| 75 | .upper_margin = 32, | ||
| 76 | .lower_margin = 11, | ||
| 77 | .hsync_len = 0, | ||
| 78 | .vsync_len = 1, | ||
| 79 | .vmode = FB_VMODE_NONINTERLACED, | ||
| 80 | }, | ||
| 81 | }, | ||
| 82 | #endif | ||
| 83 | #ifdef CONFIG_WMT_PANEL_800X600 | ||
| 84 | { | ||
| 85 | .xres_virtual = 800, | ||
| 86 | .yres_virtual = 600 * 2, | ||
| 87 | .mode = { | ||
| 88 | .name = "800x600", | ||
| 89 | .xres = 800, | ||
| 90 | .yres = 600, | ||
| 91 | .left_margin = 88, | ||
| 92 | .right_margin = 40, | ||
| 93 | .upper_margin = 32, | ||
| 94 | .lower_margin = 11, | ||
| 95 | .hsync_len = 0, | ||
| 96 | .vsync_len = 1, | ||
| 97 | .vmode = FB_VMODE_NONINTERLACED, | ||
| 98 | }, | ||
| 99 | }, | ||
| 100 | #endif | ||
| 101 | #ifdef CONFIG_WMT_PANEL_1024X576 | ||
| 102 | { | ||
| 103 | .xres_virtual = 1024, | ||
| 104 | .yres_virtual = 576 * 2, | ||
| 105 | .mode = { | ||
| 106 | .name = "1024x576", | ||
| 107 | .xres = 1024, | ||
| 108 | .yres = 576, | ||
| 109 | .left_margin = 40, | ||
| 110 | .right_margin = 24, | ||
| 111 | .upper_margin = 32, | ||
| 112 | .lower_margin = 11, | ||
| 113 | .hsync_len = 96, | ||
| 114 | .vsync_len = 2, | ||
| 115 | .vmode = FB_VMODE_NONINTERLACED, | ||
| 116 | }, | ||
| 117 | }, | ||
| 118 | #endif | ||
| 119 | #ifdef CONFIG_WMT_PANEL_1024X600 | ||
| 120 | { | ||
| 121 | .xres_virtual = 1024, | ||
| 122 | .yres_virtual = 600 * 2, | ||
| 123 | .mode = { | ||
| 124 | .name = "1024x600", | ||
| 125 | .xres = 1024, | ||
| 126 | .yres = 600, | ||
| 127 | .left_margin = 66, | ||
| 128 | .right_margin = 2, | ||
| 129 | .upper_margin = 19, | ||
| 130 | .lower_margin = 1, | ||
| 131 | .hsync_len = 23, | ||
| 132 | .vsync_len = 8, | ||
| 133 | .vmode = FB_VMODE_NONINTERLACED, | ||
| 134 | }, | ||
| 135 | }, | ||
| 136 | #endif | ||
| 137 | }; | ||
| 138 | |||
| 139 | static int current_panel_idx __initdata = ARRAY_SIZE(panels) - 1; | ||
| 140 | |||
| 141 | static int __init panel_setup(char *str) | ||
| 142 | { | ||
| 143 | int i; | ||
| 144 | |||
| 145 | for (i = 0; i < ARRAY_SIZE(panels); i++) { | ||
| 146 | if (strcmp(panels[i].mode.name, str) == 0) { | ||
| 147 | current_panel_idx = i; | ||
| 148 | break; | ||
| 149 | } | ||
| 150 | } | ||
| 151 | return 0; | ||
| 152 | } | ||
| 153 | |||
| 154 | early_param("panel", panel_setup); | ||
| 155 | |||
| 156 | static inline void preallocate_fb(struct vt8500fb_platform_data *p, | ||
| 157 | unsigned long align) { | ||
| 158 | p->video_mem_len = (p->xres_virtual * p->yres_virtual * 4) >> | ||
| 159 | (p->bpp > 16 ? 0 : (p->bpp > 8 ? 1 : | ||
| 160 | (8 / p->bpp) + 1)); | ||
| 161 | p->video_mem_phys = (unsigned long)memblock_alloc(p->video_mem_len, | ||
| 162 | align); | ||
| 163 | p->video_mem_virt = phys_to_virt(p->video_mem_phys); | ||
| 164 | } | ||
| 165 | |||
| 166 | struct platform_device vt8500_device_uart0 = { | ||
| 167 | .name = "vt8500_serial", | ||
| 168 | .id = 0, | ||
| 169 | }; | ||
| 170 | |||
| 171 | struct platform_device vt8500_device_uart1 = { | ||
| 172 | .name = "vt8500_serial", | ||
| 173 | .id = 1, | ||
| 174 | }; | ||
| 175 | |||
| 176 | struct platform_device vt8500_device_uart2 = { | ||
| 177 | .name = "vt8500_serial", | ||
| 178 | .id = 2, | ||
| 179 | }; | ||
| 180 | |||
| 181 | struct platform_device vt8500_device_uart3 = { | ||
| 182 | .name = "vt8500_serial", | ||
| 183 | .id = 3, | ||
| 184 | }; | ||
| 185 | |||
| 186 | struct platform_device vt8500_device_uart4 = { | ||
| 187 | .name = "vt8500_serial", | ||
| 188 | .id = 4, | ||
| 189 | }; | ||
| 190 | |||
| 191 | struct platform_device vt8500_device_uart5 = { | ||
| 192 | .name = "vt8500_serial", | ||
| 193 | .id = 5, | ||
| 194 | }; | ||
| 195 | |||
| 196 | static u64 ehci_dma_mask = DMA_BIT_MASK(32); | ||
| 197 | |||
| 198 | struct platform_device vt8500_device_ehci = { | ||
| 199 | .name = "vt8500-ehci", | ||
| 200 | .id = 0, | ||
| 201 | .dev = { | ||
| 202 | .dma_mask = &ehci_dma_mask, | ||
| 203 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
| 204 | }, | ||
| 205 | }; | ||
| 206 | |||
| 207 | struct platform_device vt8500_device_ge_rops = { | ||
| 208 | .name = "wmt_ge_rops", | ||
| 209 | .id = -1, | ||
| 210 | }; | ||
| 211 | |||
| 212 | struct platform_device vt8500_device_pwm = { | ||
| 213 | .name = "vt8500-pwm", | ||
| 214 | .id = 0, | ||
| 215 | }; | ||
| 216 | |||
| 217 | static struct platform_pwm_backlight_data vt8500_pwmbl_data = { | ||
| 218 | .pwm_id = 0, | ||
| 219 | .max_brightness = 128, | ||
| 220 | .dft_brightness = 70, | ||
| 221 | .pwm_period_ns = 250000, /* revisit when clocks are implemented */ | ||
| 222 | }; | ||
| 223 | |||
| 224 | struct platform_device vt8500_device_pwmbl = { | ||
| 225 | .name = "pwm-backlight", | ||
| 226 | .id = 0, | ||
| 227 | .dev = { | ||
| 228 | .platform_data = &vt8500_pwmbl_data, | ||
| 229 | }, | ||
| 230 | }; | ||
| 231 | |||
| 232 | struct platform_device vt8500_device_rtc = { | ||
| 233 | .name = "vt8500-rtc", | ||
| 234 | .id = 0, | ||
| 235 | }; | ||
| 236 | |||
| 237 | struct map_desc wmt_io_desc[] __initdata = { | ||
| 238 | /* SoC MMIO registers */ | ||
| 239 | [0] = { | ||
| 240 | .virtual = 0xf8000000, | ||
| 241 | .pfn = __phys_to_pfn(0xd8000000), | ||
| 242 | .length = 0x00390000, /* max of all chip variants */ | ||
| 243 | .type = MT_DEVICE | ||
| 244 | }, | ||
| 245 | /* PCI I/O space, numbers tied to those in <mach/io.h> */ | ||
| 246 | [1] = { | ||
| 247 | .virtual = 0xf0000000, | ||
| 248 | .pfn = __phys_to_pfn(0xc0000000), | ||
| 249 | .length = SZ_64K, | ||
| 250 | .type = MT_DEVICE | ||
| 251 | }, | ||
| 252 | }; | ||
| 253 | |||
| 254 | void __init vt8500_reserve_mem(void) | ||
| 255 | { | ||
| 256 | #ifdef CONFIG_FB_VT8500 | ||
| 257 | panels[current_panel_idx].bpp = 16; /* Always use RGB565 */ | ||
| 258 | preallocate_fb(&panels[current_panel_idx], SZ_4M); | ||
| 259 | vt8500_device_lcdc.dev.platform_data = &panels[current_panel_idx]; | ||
| 260 | #endif | ||
| 261 | } | ||
| 262 | |||
| 263 | void __init wm8505_reserve_mem(void) | ||
| 264 | { | ||
| 265 | #if defined CONFIG_FB_WM8505 | ||
| 266 | panels[current_panel_idx].bpp = 32; /* Always use RGB888 */ | ||
| 267 | preallocate_fb(&panels[current_panel_idx], 32); | ||
| 268 | vt8500_device_wm8505_fb.dev.platform_data = &panels[current_panel_idx]; | ||
| 269 | #endif | ||
| 270 | } | ||
diff --git a/arch/arm/mach-vt8500/devices.h b/arch/arm/mach-vt8500/devices.h deleted file mode 100644 index 188d4e17f35c..000000000000 --- a/arch/arm/mach-vt8500/devices.h +++ /dev/null | |||
| @@ -1,88 +0,0 @@ | |||
| 1 | /* linux/arch/arm/mach-vt8500/devices.h | ||
| 2 | * | ||
| 3 | * Copyright (C) 2010 Alexey Charkov <alchark@gmail.com> | ||
| 4 | * | ||
| 5 | * This software is licensed under the terms of the GNU General Public | ||
| 6 | * License version 2, as published by the Free Software Foundation, and | ||
| 7 | * may be copied, distributed, and modified under those terms. | ||
| 8 | * | ||
| 9 | * This program is distributed in the hope that it will be useful, | ||
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | * GNU General Public License for more details. | ||
| 13 | * | ||
| 14 | */ | ||
| 15 | |||
| 16 | #ifndef __ARCH_ARM_MACH_VT8500_DEVICES_H | ||
| 17 | #define __ARCH_ARM_MACH_VT8500_DEVICES_H | ||
| 18 | |||
| 19 | #include <linux/platform_device.h> | ||
| 20 | #include <asm/mach/map.h> | ||
| 21 | |||
| 22 | void __init vt8500_init_irq(void); | ||
| 23 | void __init wm8505_init_irq(void); | ||
| 24 | void __init vt8500_map_io(void); | ||
| 25 | void __init wm8505_map_io(void); | ||
| 26 | void __init vt8500_reserve_mem(void); | ||
| 27 | void __init wm8505_reserve_mem(void); | ||
| 28 | void __init vt8500_gpio_init(void); | ||
| 29 | void __init vt8500_set_resources(void); | ||
| 30 | void __init wm8505_set_resources(void); | ||
| 31 | |||
| 32 | extern unsigned long wmt_ic_base __initdata; | ||
| 33 | extern unsigned long wmt_sic_base __initdata; | ||
| 34 | extern unsigned long wmt_gpio_base __initdata; | ||
| 35 | extern unsigned long wmt_pmc_base __initdata; | ||
| 36 | |||
| 37 | extern int wmt_nr_irqs __initdata; | ||
| 38 | extern int wmt_timer_irq __initdata; | ||
| 39 | extern int wmt_gpio_ext_irq[8] __initdata; | ||
| 40 | |||
| 41 | extern struct map_desc wmt_io_desc[2] __initdata; | ||
| 42 | |||
| 43 | static inline struct resource wmt_mmio_res(u32 start, u32 size) | ||
| 44 | { | ||
| 45 | struct resource tmp = { | ||
| 46 | .flags = IORESOURCE_MEM, | ||
| 47 | .start = start, | ||
| 48 | .end = start + size - 1, | ||
| 49 | }; | ||
| 50 | |||
| 51 | return tmp; | ||
| 52 | } | ||
| 53 | |||
| 54 | static inline struct resource wmt_irq_res(int irq) | ||
| 55 | { | ||
| 56 | struct resource tmp = { | ||
| 57 | .flags = IORESOURCE_IRQ, | ||
| 58 | .start = irq, | ||
| 59 | .end = irq, | ||
| 60 | }; | ||
| 61 | |||
| 62 | return tmp; | ||
| 63 | } | ||
| 64 | |||
| 65 | static inline void wmt_res_add(struct platform_device *pdev, | ||
| 66 | const struct resource *res, unsigned int num) | ||
| 67 | { | ||
| 68 | if (unlikely(platform_device_add_resources(pdev, res, num))) | ||
| 69 | pr_err("Failed to assign resources\n"); | ||
| 70 | } | ||
| 71 | |||
| 72 | extern struct sys_timer vt8500_timer; | ||
| 73 | |||
| 74 | extern struct platform_device vt8500_device_uart0; | ||
| 75 | extern struct platform_device vt8500_device_uart1; | ||
| 76 | extern struct platform_device vt8500_device_uart2; | ||
| 77 | extern struct platform_device vt8500_device_uart3; | ||
| 78 | extern struct platform_device vt8500_device_uart4; | ||
| 79 | extern struct platform_device vt8500_device_uart5; | ||
| 80 | |||
| 81 | extern struct platform_device vt8500_device_lcdc; | ||
| 82 | extern struct platform_device vt8500_device_wm8505_fb; | ||
| 83 | extern struct platform_device vt8500_device_ehci; | ||
| 84 | extern struct platform_device vt8500_device_ge_rops; | ||
| 85 | extern struct platform_device vt8500_device_pwm; | ||
| 86 | extern struct platform_device vt8500_device_pwmbl; | ||
| 87 | extern struct platform_device vt8500_device_rtc; | ||
| 88 | #endif | ||
diff --git a/arch/arm/mach-vt8500/gpio.c b/arch/arm/mach-vt8500/gpio.c deleted file mode 100644 index 2bcc0ec783df..000000000000 --- a/arch/arm/mach-vt8500/gpio.c +++ /dev/null | |||
| @@ -1,240 +0,0 @@ | |||
| 1 | /* linux/arch/arm/mach-vt8500/gpio.c | ||
| 2 | * | ||
| 3 | * Copyright (C) 2010 Alexey Charkov <alchark@gmail.com> | ||
| 4 | * | ||
| 5 | * This software is licensed under the terms of the GNU General Public | ||
| 6 | * License version 2, as published by the Free Software Foundation, and | ||
| 7 | * may be copied, distributed, and modified under those terms. | ||
| 8 | * | ||
| 9 | * This program is distributed in the hope that it will be useful, | ||
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | * GNU General Public License for more details. | ||
| 13 | * | ||
| 14 | */ | ||
| 15 | |||
| 16 | #include <linux/gpio.h> | ||
| 17 | #include <linux/init.h> | ||
| 18 | #include <linux/irq.h> | ||
| 19 | #include <linux/io.h> | ||
| 20 | |||
| 21 | #include "devices.h" | ||
| 22 | |||
| 23 | #define to_vt8500(__chip) container_of(__chip, struct vt8500_gpio_chip, chip) | ||
| 24 | |||
| 25 | #define ENABLE_REGS 0x0 | ||
| 26 | #define DIRECTION_REGS 0x20 | ||
| 27 | #define OUTVALUE_REGS 0x40 | ||
| 28 | #define INVALUE_REGS 0x60 | ||
| 29 | |||
| 30 | #define EXT_REGOFF 0x1c | ||
| 31 | |||
| 32 | static void __iomem *regbase; | ||
| 33 | |||
| 34 | struct vt8500_gpio_chip { | ||
| 35 | struct gpio_chip chip; | ||
| 36 | unsigned int shift; | ||
| 37 | unsigned int regoff; | ||
| 38 | }; | ||
| 39 | |||
| 40 | static int gpio_to_irq_map[8]; | ||
| 41 | |||
| 42 | static int vt8500_muxed_gpio_request(struct gpio_chip *chip, | ||
| 43 | unsigned offset) | ||
| 44 | { | ||
| 45 | struct vt8500_gpio_chip *vt8500_chip = to_vt8500(chip); | ||
| 46 | unsigned val = readl(regbase + ENABLE_REGS + vt8500_chip->regoff); | ||
| 47 | |||
| 48 | val |= (1 << vt8500_chip->shift << offset); | ||
| 49 | writel(val, regbase + ENABLE_REGS + vt8500_chip->regoff); | ||
| 50 | |||
| 51 | return 0; | ||
| 52 | } | ||
| 53 | |||
| 54 | static void vt8500_muxed_gpio_free(struct gpio_chip *chip, | ||
| 55 | unsigned offset) | ||
| 56 | { | ||
| 57 | struct vt8500_gpio_chip *vt8500_chip = to_vt8500(chip); | ||
| 58 | unsigned val = readl(regbase + ENABLE_REGS + vt8500_chip->regoff); | ||
| 59 | |||
| 60 | val &= ~(1 << vt8500_chip->shift << offset); | ||
| 61 | writel(val, regbase + ENABLE_REGS + vt8500_chip->regoff); | ||
| 62 | } | ||
| 63 | |||
| 64 | static int vt8500_muxed_gpio_direction_input(struct gpio_chip *chip, | ||
| 65 | unsigned offset) | ||
| 66 | { | ||
| 67 | struct vt8500_gpio_chip *vt8500_chip = to_vt8500(chip); | ||
| 68 | unsigned val = readl(regbase + DIRECTION_REGS + vt8500_chip->regoff); | ||
| 69 | |||
| 70 | val &= ~(1 << vt8500_chip->shift << offset); | ||
| 71 | writel(val, regbase + DIRECTION_REGS + vt8500_chip->regoff); | ||
| 72 | |||
| 73 | return 0; | ||
| 74 | } | ||
| 75 | |||
| 76 | static int vt8500_muxed_gpio_direction_output(struct gpio_chip *chip, | ||
| 77 | unsigned offset, int value) | ||
| 78 | { | ||
| 79 | struct vt8500_gpio_chip *vt8500_chip = to_vt8500(chip); | ||
| 80 | unsigned val = readl(regbase + DIRECTION_REGS + vt8500_chip->regoff); | ||
| 81 | |||
| 82 | val |= (1 << vt8500_chip->shift << offset); | ||
| 83 | writel(val, regbase + DIRECTION_REGS + vt8500_chip->regoff); | ||
| 84 | |||
| 85 | if (value) { | ||
| 86 | val = readl(regbase + OUTVALUE_REGS + vt8500_chip->regoff); | ||
| 87 | val |= (1 << vt8500_chip->shift << offset); | ||
| 88 | writel(val, regbase + OUTVALUE_REGS + vt8500_chip->regoff); | ||
| 89 | } | ||
| 90 | return 0; | ||
| 91 | } | ||
| 92 | |||
| 93 | static int vt8500_muxed_gpio_get_value(struct gpio_chip *chip, | ||
| 94 | unsigned offset) | ||
| 95 | { | ||
| 96 | struct vt8500_gpio_chip *vt8500_chip = to_vt8500(chip); | ||
| 97 | |||
| 98 | return (readl(regbase + INVALUE_REGS + vt8500_chip->regoff) | ||
| 99 | >> vt8500_chip->shift >> offset) & 1; | ||
| 100 | } | ||
| 101 | |||
| 102 | static void vt8500_muxed_gpio_set_value(struct gpio_chip *chip, | ||
| 103 | unsigned offset, int value) | ||
| 104 | { | ||
| 105 | struct vt8500_gpio_chip *vt8500_chip = to_vt8500(chip); | ||
| 106 | unsigned val = readl(regbase + INVALUE_REGS + vt8500_chip->regoff); | ||
| 107 | |||
| 108 | if (value) | ||
| 109 | val |= (1 << vt8500_chip->shift << offset); | ||
| 110 | else | ||
| 111 | val &= ~(1 << vt8500_chip->shift << offset); | ||
| 112 | |||
| 113 | writel(val, regbase + INVALUE_REGS + vt8500_chip->regoff); | ||
| 114 | } | ||
| 115 | |||
| 116 | #define VT8500_GPIO_BANK(__name, __shift, __off, __base, __num) \ | ||
| 117 | { \ | ||
| 118 | .chip = { \ | ||
| 119 | .label = __name, \ | ||
| 120 | .request = vt8500_muxed_gpio_request, \ | ||
| 121 | .free = vt8500_muxed_gpio_free, \ | ||
| 122 | .direction_input = vt8500_muxed_gpio_direction_input, \ | ||
| 123 | .direction_output = vt8500_muxed_gpio_direction_output, \ | ||
| 124 | .get = vt8500_muxed_gpio_get_value, \ | ||
| 125 | .set = vt8500_muxed_gpio_set_value, \ | ||
| 126 | .can_sleep = 0, \ | ||
| 127 | .base = __base, \ | ||
| 128 | .ngpio = __num, \ | ||
| 129 | }, \ | ||
| 130 | .shift = __shift, \ | ||
| 131 | .regoff = __off, \ | ||
| 132 | } | ||
| 133 | |||
| 134 | static struct vt8500_gpio_chip vt8500_muxed_gpios[] = { | ||
| 135 | VT8500_GPIO_BANK("uart0", 0, 0x0, 8, 4), | ||
| 136 | VT8500_GPIO_BANK("uart1", 4, 0x0, 12, 4), | ||
| 137 | VT8500_GPIO_BANK("spi0", 8, 0x0, 16, 4), | ||
| 138 | VT8500_GPIO_BANK("spi1", 12, 0x0, 20, 4), | ||
| 139 | VT8500_GPIO_BANK("spi2", 16, 0x0, 24, 4), | ||
| 140 | VT8500_GPIO_BANK("pwmout", 24, 0x0, 28, 2), | ||
| 141 | |||
| 142 | VT8500_GPIO_BANK("sdmmc", 0, 0x4, 30, 11), | ||
| 143 | VT8500_GPIO_BANK("ms", 16, 0x4, 41, 7), | ||
| 144 | VT8500_GPIO_BANK("i2c0", 24, 0x4, 48, 2), | ||
| 145 | VT8500_GPIO_BANK("i2c1", 26, 0x4, 50, 2), | ||
| 146 | |||
| 147 | VT8500_GPIO_BANK("mii", 0, 0x8, 52, 20), | ||
| 148 | VT8500_GPIO_BANK("see", 20, 0x8, 72, 4), | ||
| 149 | VT8500_GPIO_BANK("ide", 24, 0x8, 76, 7), | ||
| 150 | |||
| 151 | VT8500_GPIO_BANK("ccir", 0, 0xc, 83, 19), | ||
| 152 | |||
| 153 | VT8500_GPIO_BANK("ts", 8, 0x10, 102, 11), | ||
| 154 | |||
| 155 | VT8500_GPIO_BANK("lcd", 0, 0x14, 113, 23), | ||
| 156 | }; | ||
| 157 | |||
| 158 | static int vt8500_gpio_direction_input(struct gpio_chip *chip, | ||
| 159 | unsigned offset) | ||
| 160 | { | ||
| 161 | unsigned val = readl(regbase + DIRECTION_REGS + EXT_REGOFF); | ||
| 162 | |||
| 163 | val &= ~(1 << offset); | ||
| 164 | writel(val, regbase + DIRECTION_REGS + EXT_REGOFF); | ||
| 165 | return 0; | ||
| 166 | } | ||
| 167 | |||
| 168 | static int vt8500_gpio_direction_output(struct gpio_chip *chip, | ||
| 169 | unsigned offset, int value) | ||
| 170 | { | ||
| 171 | unsigned val = readl(regbase + DIRECTION_REGS + EXT_REGOFF); | ||
| 172 | |||
| 173 | val |= (1 << offset); | ||
| 174 | writel(val, regbase + DIRECTION_REGS + EXT_REGOFF); | ||
| 175 | |||
| 176 | if (value) { | ||
| 177 | val = readl(regbase + OUTVALUE_REGS + EXT_REGOFF); | ||
| 178 | val |= (1 << offset); | ||
| 179 | writel(val, regbase + OUTVALUE_REGS + EXT_REGOFF); | ||
| 180 | } | ||
| 181 | return 0; | ||
| 182 | } | ||
| 183 | |||
| 184 | static int vt8500_gpio_get_value(struct gpio_chip *chip, | ||
| 185 | unsigned offset) | ||
| 186 | { | ||
| 187 | return (readl(regbase + INVALUE_REGS + EXT_REGOFF) >> offset) & 1; | ||
| 188 | } | ||
| 189 | |||
| 190 | static void vt8500_gpio_set_value(struct gpio_chip *chip, | ||
| 191 | unsigned offset, int value) | ||
| 192 | { | ||
| 193 | unsigned val = readl(regbase + OUTVALUE_REGS + EXT_REGOFF); | ||
| 194 | |||
| 195 | if (value) | ||
| 196 | val |= (1 << offset); | ||
| 197 | else | ||
| 198 | val &= ~(1 << offset); | ||
| 199 | |||
| 200 | writel(val, regbase + OUTVALUE_REGS + EXT_REGOFF); | ||
| 201 | } | ||
| 202 | |||
| 203 | static int vt8500_gpio_to_irq(struct gpio_chip *chip, unsigned offset) | ||
| 204 | { | ||
| 205 | if (offset > 7) | ||
| 206 | return -EINVAL; | ||
| 207 | |||
| 208 | return gpio_to_irq_map[offset]; | ||
| 209 | } | ||
| 210 | |||
| 211 | static struct gpio_chip vt8500_external_gpios = { | ||
| 212 | .label = "extgpio", | ||
| 213 | .direction_input = vt8500_gpio_direction_input, | ||
| 214 | .direction_output = vt8500_gpio_direction_output, | ||
| 215 | .get = vt8500_gpio_get_value, | ||
| 216 | .set = vt8500_gpio_set_value, | ||
| 217 | .to_irq = vt8500_gpio_to_irq, | ||
| 218 | .can_sleep = 0, | ||
| 219 | .base = 0, | ||
| 220 | .ngpio = 8, | ||
| 221 | }; | ||
| 222 | |||
| 223 | void __init vt8500_gpio_init(void) | ||
| 224 | { | ||
| 225 | int i; | ||
| 226 | |||
| 227 | for (i = 0; i < 8; i++) | ||
| 228 | gpio_to_irq_map[i] = wmt_gpio_ext_irq[i]; | ||
| 229 | |||
| 230 | regbase = ioremap(wmt_gpio_base, SZ_64K); | ||
| 231 | if (!regbase) { | ||
| 232 | printk(KERN_ERR "Failed to map MMIO registers for GPIO\n"); | ||
| 233 | return; | ||
| 234 | } | ||
| 235 | |||
| 236 | gpiochip_add(&vt8500_external_gpios); | ||
| 237 | |||
| 238 | for (i = 0; i < ARRAY_SIZE(vt8500_muxed_gpios); i++) | ||
| 239 | gpiochip_add(&vt8500_muxed_gpios[i].chip); | ||
| 240 | } | ||
diff --git a/arch/arm/mach-vt8500/include/mach/restart.h b/arch/arm/mach-vt8500/include/mach/restart.h index 89f9b787d2a0..738979518acb 100644 --- a/arch/arm/mach-vt8500/include/mach/restart.h +++ b/arch/arm/mach-vt8500/include/mach/restart.h | |||
| @@ -13,5 +13,5 @@ | |||
| 13 | * | 13 | * |
| 14 | */ | 14 | */ |
| 15 | 15 | ||
| 16 | void wmt_setup_restart(void); | 16 | void vt8500_setup_restart(void); |
| 17 | void wmt_restart(char mode, const char *cmd); | 17 | void vt8500_restart(char mode, const char *cmd); |
diff --git a/arch/arm/mach-vt8500/include/mach/vt8500_irqs.h b/arch/arm/mach-vt8500/include/mach/vt8500_irqs.h deleted file mode 100644 index ecfee9124711..000000000000 --- a/arch/arm/mach-vt8500/include/mach/vt8500_irqs.h +++ /dev/null | |||
| @@ -1,88 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * arch/arm/mach-vt8500/include/mach/vt8500_irqs.h | ||
| 3 | * | ||
| 4 | * Copyright (C) 2010 Alexey Charkov <alchark@gmail.com> | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License as published by | ||
| 8 | * the Free Software Foundation; either version 2 of the License, or | ||
| 9 | * (at your option) any later version. | ||
| 10 | * | ||
| 11 | * This program is distributed in the hope that it will be useful, | ||
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | * GNU General Public License for more details. | ||
| 15 | * | ||
| 16 | * You should have received a copy of the GNU General Public License | ||
| 17 | * along with this program; if not, write to the Free Software | ||
| 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
| 19 | */ | ||
| 20 | |||
| 21 | /* VT8500 Interrupt Sources */ | ||
| 22 | |||
| 23 | #define IRQ_JPEGENC 0 /* JPEG Encoder */ | ||
| 24 | #define IRQ_JPEGDEC 1 /* JPEG Decoder */ | ||
| 25 | /* Reserved */ | ||
| 26 | #define IRQ_PATA 3 /* PATA Controller */ | ||
| 27 | /* Reserved */ | ||
| 28 | #define IRQ_DMA 5 /* DMA Controller */ | ||
| 29 | #define IRQ_EXT0 6 /* External Interrupt 0 */ | ||
| 30 | #define IRQ_EXT1 7 /* External Interrupt 1 */ | ||
| 31 | #define IRQ_GE 8 /* Graphic Engine */ | ||
| 32 | #define IRQ_GOV 9 /* Graphic Overlay Engine */ | ||
| 33 | #define IRQ_ETHER 10 /* Ethernet MAC */ | ||
| 34 | #define IRQ_MPEGTS 11 /* Transport Stream Interface */ | ||
| 35 | #define IRQ_LCDC 12 /* LCD Controller */ | ||
| 36 | #define IRQ_EXT2 13 /* External Interrupt 2 */ | ||
| 37 | #define IRQ_EXT3 14 /* External Interrupt 3 */ | ||
| 38 | #define IRQ_EXT4 15 /* External Interrupt 4 */ | ||
| 39 | #define IRQ_CIPHER 16 /* Cipher */ | ||
| 40 | #define IRQ_VPP 17 /* Video Post-Processor */ | ||
| 41 | #define IRQ_I2C1 18 /* I2C 1 */ | ||
| 42 | #define IRQ_I2C0 19 /* I2C 0 */ | ||
| 43 | #define IRQ_SDMMC 20 /* SD/MMC Controller */ | ||
| 44 | #define IRQ_SDMMC_DMA 21 /* SD/MMC Controller DMA */ | ||
| 45 | #define IRQ_PMC_WU 22 /* Power Management Controller Wakeup */ | ||
| 46 | /* Reserved */ | ||
| 47 | #define IRQ_SPI0 24 /* SPI 0 */ | ||
| 48 | #define IRQ_SPI1 25 /* SPI 1 */ | ||
| 49 | #define IRQ_SPI2 26 /* SPI 2 */ | ||
| 50 | #define IRQ_LCDDF 27 /* LCD Data Formatter */ | ||
| 51 | #define IRQ_NAND 28 /* NAND Flash Controller */ | ||
| 52 | #define IRQ_NAND_DMA 29 /* NAND Flash Controller DMA */ | ||
| 53 | #define IRQ_MS 30 /* MemoryStick Controller */ | ||
| 54 | #define IRQ_MS_DMA 31 /* MemoryStick Controller DMA */ | ||
| 55 | #define IRQ_UART0 32 /* UART 0 */ | ||
| 56 | #define IRQ_UART1 33 /* UART 1 */ | ||
| 57 | #define IRQ_I2S 34 /* I2S */ | ||
| 58 | #define IRQ_PCM 35 /* PCM */ | ||
| 59 | #define IRQ_PMCOS0 36 /* PMC OS Timer 0 */ | ||
| 60 | #define IRQ_PMCOS1 37 /* PMC OS Timer 1 */ | ||
| 61 | #define IRQ_PMCOS2 38 /* PMC OS Timer 2 */ | ||
| 62 | #define IRQ_PMCOS3 39 /* PMC OS Timer 3 */ | ||
| 63 | #define IRQ_VPU 40 /* Video Processing Unit */ | ||
| 64 | #define IRQ_VID 41 /* Video Digital Input Interface */ | ||
| 65 | #define IRQ_AC97 42 /* AC97 Interface */ | ||
| 66 | #define IRQ_EHCI 43 /* USB */ | ||
| 67 | #define IRQ_NOR 44 /* NOR Flash Controller */ | ||
| 68 | #define IRQ_PS2MOUSE 45 /* PS/2 Mouse */ | ||
| 69 | #define IRQ_PS2KBD 46 /* PS/2 Keyboard */ | ||
| 70 | #define IRQ_UART2 47 /* UART 2 */ | ||
| 71 | #define IRQ_RTC 48 /* RTC Interrupt */ | ||
| 72 | #define IRQ_RTCSM 49 /* RTC Second/Minute Update Interrupt */ | ||
| 73 | #define IRQ_UART3 50 /* UART 3 */ | ||
| 74 | #define IRQ_ADC 51 /* ADC */ | ||
| 75 | #define IRQ_EXT5 52 /* External Interrupt 5 */ | ||
| 76 | #define IRQ_EXT6 53 /* External Interrupt 6 */ | ||
| 77 | #define IRQ_EXT7 54 /* External Interrupt 7 */ | ||
| 78 | #define IRQ_CIR 55 /* CIR */ | ||
| 79 | #define IRQ_DMA0 56 /* DMA Channel 0 */ | ||
| 80 | #define IRQ_DMA1 57 /* DMA Channel 1 */ | ||
| 81 | #define IRQ_DMA2 58 /* DMA Channel 2 */ | ||
| 82 | #define IRQ_DMA3 59 /* DMA Channel 3 */ | ||
| 83 | #define IRQ_DMA4 60 /* DMA Channel 4 */ | ||
| 84 | #define IRQ_DMA5 61 /* DMA Channel 5 */ | ||
| 85 | #define IRQ_DMA6 62 /* DMA Channel 6 */ | ||
| 86 | #define IRQ_DMA7 63 /* DMA Channel 7 */ | ||
| 87 | |||
| 88 | #define VT8500_NR_IRQS 64 | ||
diff --git a/arch/arm/mach-vt8500/include/mach/vt8500_regs.h b/arch/arm/mach-vt8500/include/mach/vt8500_regs.h deleted file mode 100644 index 29c63ecb2383..000000000000 --- a/arch/arm/mach-vt8500/include/mach/vt8500_regs.h +++ /dev/null | |||
| @@ -1,79 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * arch/arm/mach-vt8500/include/mach/vt8500_regs.h | ||
| 3 | * | ||
| 4 | * Copyright (C) 2010 Alexey Charkov <alchark@gmail.com> | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License as published by | ||
| 8 | * the Free Software Foundation; either version 2 of the License, or | ||
| 9 | * (at your option) any later version. | ||
| 10 | * | ||
| 11 | * This program is distributed in the hope that it will be useful, | ||
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | * GNU General Public License for more details. | ||
| 15 | * | ||
| 16 | * You should have received a copy of the GNU General Public License | ||
| 17 | * along with this program; if not, write to the Free Software | ||
| 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
| 19 | */ | ||
| 20 | #ifndef __ASM_ARM_ARCH_VT8500_REGS_H | ||
| 21 | #define __ASM_ARM_ARCH_VT8500_REGS_H | ||
| 22 | |||
| 23 | /* VT8500 Registers Map */ | ||
| 24 | |||
| 25 | #define VT8500_REGS_START_PHYS 0xd8000000 /* Start of MMIO registers */ | ||
| 26 | #define VT8500_REGS_START_VIRT 0xf8000000 /* Virtual mapping start */ | ||
| 27 | |||
| 28 | #define VT8500_DDR_BASE 0xd8000000 /* 1k DDR/DDR2 Memory | ||
| 29 | Controller */ | ||
| 30 | #define VT8500_DMA_BASE 0xd8001000 /* 1k DMA Controller */ | ||
| 31 | #define VT8500_SFLASH_BASE 0xd8002000 /* 1k Serial Flash Memory | ||
| 32 | Controller */ | ||
| 33 | #define VT8500_ETHER_BASE 0xd8004000 /* 1k Ethernet MAC 0 */ | ||
| 34 | #define VT8500_CIPHER_BASE 0xd8006000 /* 4k Cipher */ | ||
| 35 | #define VT8500_USB_BASE 0xd8007800 /* 2k USB OTG */ | ||
| 36 | # define VT8500_EHCI_BASE 0xd8007900 /* EHCI */ | ||
| 37 | # define VT8500_UHCI_BASE 0xd8007b01 /* UHCI */ | ||
| 38 | #define VT8500_PATA_BASE 0xd8008000 /* 512 PATA */ | ||
| 39 | #define VT8500_PS2_BASE 0xd8008800 /* 1k PS/2 */ | ||
| 40 | #define VT8500_NAND_BASE 0xd8009000 /* 1k NAND Controller */ | ||
| 41 | #define VT8500_NOR_BASE 0xd8009400 /* 1k NOR Controller */ | ||
| 42 | #define VT8500_SDMMC_BASE 0xd800a000 /* 1k SD/MMC Controller */ | ||
| 43 | #define VT8500_MS_BASE 0xd800b000 /* 1k MS/MSPRO Controller */ | ||
| 44 | #define VT8500_LCDC_BASE 0xd800e400 /* 1k LCD Controller */ | ||
| 45 | #define VT8500_VPU_BASE 0xd8050000 /* 256 VPU */ | ||
| 46 | #define VT8500_GOV_BASE 0xd8050300 /* 256 GOV */ | ||
| 47 | #define VT8500_GEGEA_BASE 0xd8050400 /* 768 GE/GE Alpha Mixing */ | ||
| 48 | #define VT8500_LCDF_BASE 0xd8050900 /* 256 LCD Formatter */ | ||
| 49 | #define VT8500_VID_BASE 0xd8050a00 /* 256 VID */ | ||
| 50 | #define VT8500_VPP_BASE 0xd8050b00 /* 256 VPP */ | ||
| 51 | #define VT8500_TSBK_BASE 0xd80f4000 /* 4k TSBK */ | ||
| 52 | #define VT8500_JPEGDEC_BASE 0xd80fe000 /* 4k JPEG Decoder */ | ||
| 53 | #define VT8500_JPEGENC_BASE 0xd80ff000 /* 4k JPEG Encoder */ | ||
| 54 | #define VT8500_RTC_BASE 0xd8100000 /* 64k RTC */ | ||
| 55 | #define VT8500_GPIO_BASE 0xd8110000 /* 64k GPIO Configuration */ | ||
| 56 | #define VT8500_SCC_BASE 0xd8120000 /* 64k System Configuration*/ | ||
| 57 | #define VT8500_PMC_BASE 0xd8130000 /* 64k PMC Configuration */ | ||
| 58 | #define VT8500_IC_BASE 0xd8140000 /* 64k Interrupt Controller*/ | ||
| 59 | #define VT8500_UART0_BASE 0xd8200000 /* 64k UART 0 */ | ||
| 60 | #define VT8500_UART2_BASE 0xd8210000 /* 64k UART 2 */ | ||
| 61 | #define VT8500_PWM_BASE 0xd8220000 /* 64k PWM Configuration */ | ||
| 62 | #define VT8500_SPI0_BASE 0xd8240000 /* 64k SPI 0 */ | ||
| 63 | #define VT8500_SPI1_BASE 0xd8250000 /* 64k SPI 1 */ | ||
| 64 | #define VT8500_CIR_BASE 0xd8270000 /* 64k CIR */ | ||
| 65 | #define VT8500_I2C0_BASE 0xd8280000 /* 64k I2C 0 */ | ||
| 66 | #define VT8500_AC97_BASE 0xd8290000 /* 64k AC97 */ | ||
| 67 | #define VT8500_SPI2_BASE 0xd82a0000 /* 64k SPI 2 */ | ||
| 68 | #define VT8500_UART1_BASE 0xd82b0000 /* 64k UART 1 */ | ||
| 69 | #define VT8500_UART3_BASE 0xd82c0000 /* 64k UART 3 */ | ||
| 70 | #define VT8500_PCM_BASE 0xd82d0000 /* 64k PCM */ | ||
| 71 | #define VT8500_I2C1_BASE 0xd8320000 /* 64k I2C 1 */ | ||
| 72 | #define VT8500_I2S_BASE 0xd8330000 /* 64k I2S */ | ||
| 73 | #define VT8500_ADC_BASE 0xd8340000 /* 64k ADC */ | ||
| 74 | |||
| 75 | #define VT8500_REGS_END_PHYS 0xd834ffff /* End of MMIO registers */ | ||
| 76 | #define VT8500_REGS_LENGTH (VT8500_REGS_END_PHYS \ | ||
| 77 | - VT8500_REGS_START_PHYS + 1) | ||
| 78 | |||
| 79 | #endif | ||
diff --git a/arch/arm/mach-vt8500/include/mach/wm8505_irqs.h b/arch/arm/mach-vt8500/include/mach/wm8505_irqs.h deleted file mode 100644 index 6128627ac753..000000000000 --- a/arch/arm/mach-vt8500/include/mach/wm8505_irqs.h +++ /dev/null | |||
| @@ -1,115 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * arch/arm/mach-vt8500/include/mach/wm8505_irqs.h | ||
| 3 | * | ||
| 4 | * Copyright (C) 2010 Alexey Charkov <alchark@gmail.com> | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License as published by | ||
| 8 | * the Free Software Foundation; either version 2 of the License, or | ||
| 9 | * (at your option) any later version. | ||
| 10 | * | ||
| 11 | * This program is distributed in the hope that it will be useful, | ||
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | * GNU General Public License for more details. | ||
| 15 | * | ||
| 16 | * You should have received a copy of the GNU General Public License | ||
| 17 | * along with this program; if not, write to the Free Software | ||
| 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
| 19 | */ | ||
| 20 | |||
| 21 | /* WM8505 Interrupt Sources */ | ||
| 22 | |||
| 23 | #define IRQ_UHCI 0 /* UHC FS (UHCI?) */ | ||
| 24 | #define IRQ_EHCI 1 /* UHC HS */ | ||
| 25 | #define IRQ_UDCDMA 2 /* UDC DMA */ | ||
| 26 | /* Reserved */ | ||
| 27 | #define IRQ_PS2MOUSE 4 /* PS/2 Mouse */ | ||
| 28 | #define IRQ_UDC 5 /* UDC */ | ||
| 29 | #define IRQ_EXT0 6 /* External Interrupt 0 */ | ||
| 30 | #define IRQ_EXT1 7 /* External Interrupt 1 */ | ||
| 31 | #define IRQ_KEYPAD 8 /* Keypad */ | ||
| 32 | #define IRQ_DMA 9 /* DMA Controller */ | ||
| 33 | #define IRQ_ETHER 10 /* Ethernet MAC */ | ||
| 34 | /* Reserved */ | ||
| 35 | /* Reserved */ | ||
| 36 | #define IRQ_EXT2 13 /* External Interrupt 2 */ | ||
| 37 | #define IRQ_EXT3 14 /* External Interrupt 3 */ | ||
| 38 | #define IRQ_EXT4 15 /* External Interrupt 4 */ | ||
| 39 | #define IRQ_APB 16 /* APB Bridge */ | ||
| 40 | #define IRQ_DMA0 17 /* DMA Channel 0 */ | ||
| 41 | #define IRQ_I2C1 18 /* I2C 1 */ | ||
| 42 | #define IRQ_I2C0 19 /* I2C 0 */ | ||
| 43 | #define IRQ_SDMMC 20 /* SD/MMC Controller */ | ||
| 44 | #define IRQ_SDMMC_DMA 21 /* SD/MMC Controller DMA */ | ||
| 45 | #define IRQ_PMC_WU 22 /* Power Management Controller Wakeup */ | ||
| 46 | #define IRQ_PS2KBD 23 /* PS/2 Keyboard */ | ||
| 47 | #define IRQ_SPI0 24 /* SPI 0 */ | ||
| 48 | #define IRQ_SPI1 25 /* SPI 1 */ | ||
| 49 | #define IRQ_SPI2 26 /* SPI 2 */ | ||
| 50 | #define IRQ_DMA1 27 /* DMA Channel 1 */ | ||
| 51 | #define IRQ_NAND 28 /* NAND Flash Controller */ | ||
| 52 | #define IRQ_NAND_DMA 29 /* NAND Flash Controller DMA */ | ||
| 53 | #define IRQ_UART5 30 /* UART 5 */ | ||
| 54 | #define IRQ_UART4 31 /* UART 4 */ | ||
| 55 | #define IRQ_UART0 32 /* UART 0 */ | ||
| 56 | #define IRQ_UART1 33 /* UART 1 */ | ||
| 57 | #define IRQ_DMA2 34 /* DMA Channel 2 */ | ||
| 58 | #define IRQ_I2S 35 /* I2S */ | ||
| 59 | #define IRQ_PMCOS0 36 /* PMC OS Timer 0 */ | ||
| 60 | #define IRQ_PMCOS1 37 /* PMC OS Timer 1 */ | ||
| 61 | #define IRQ_PMCOS2 38 /* PMC OS Timer 2 */ | ||
| 62 | #define IRQ_PMCOS3 39 /* PMC OS Timer 3 */ | ||
| 63 | #define IRQ_DMA3 40 /* DMA Channel 3 */ | ||
| 64 | #define IRQ_DMA4 41 /* DMA Channel 4 */ | ||
| 65 | #define IRQ_AC97 42 /* AC97 Interface */ | ||
| 66 | /* Reserved */ | ||
| 67 | #define IRQ_NOR 44 /* NOR Flash Controller */ | ||
| 68 | #define IRQ_DMA5 45 /* DMA Channel 5 */ | ||
| 69 | #define IRQ_DMA6 46 /* DMA Channel 6 */ | ||
| 70 | #define IRQ_UART2 47 /* UART 2 */ | ||
| 71 | #define IRQ_RTC 48 /* RTC Interrupt */ | ||
| 72 | #define IRQ_RTCSM 49 /* RTC Second/Minute Update Interrupt */ | ||
| 73 | #define IRQ_UART3 50 /* UART 3 */ | ||
| 74 | #define IRQ_DMA7 51 /* DMA Channel 7 */ | ||
| 75 | #define IRQ_EXT5 52 /* External Interrupt 5 */ | ||
| 76 | #define IRQ_EXT6 53 /* External Interrupt 6 */ | ||
| 77 | #define IRQ_EXT7 54 /* External Interrupt 7 */ | ||
| 78 | #define IRQ_CIR 55 /* CIR */ | ||
| 79 | #define IRQ_SIC0 56 /* SIC IRQ0 */ | ||
| 80 | #define IRQ_SIC1 57 /* SIC IRQ1 */ | ||
| 81 | #define IRQ_SIC2 58 /* SIC IRQ2 */ | ||
| 82 | #define IRQ_SIC3 59 /* SIC IRQ3 */ | ||
| 83 | #define IRQ_SIC4 60 /* SIC IRQ4 */ | ||
| 84 | #define IRQ_SIC5 61 /* SIC IRQ5 */ | ||
| 85 | #define IRQ_SIC6 62 /* SIC IRQ6 */ | ||
| 86 | #define IRQ_SIC7 63 /* SIC IRQ7 */ | ||
| 87 | /* Reserved */ | ||
| 88 | #define IRQ_JPEGDEC 65 /* JPEG Decoder */ | ||
| 89 | #define IRQ_SAE 66 /* SAE (?) */ | ||
| 90 | /* Reserved */ | ||
| 91 | #define IRQ_VPU 79 /* Video Processing Unit */ | ||
| 92 | #define IRQ_VPP 80 /* Video Post-Processor */ | ||
| 93 | #define IRQ_VID 81 /* Video Digital Input Interface */ | ||
| 94 | #define IRQ_SPU 82 /* SPU (?) */ | ||
| 95 | #define IRQ_PIP 83 /* PIP Error */ | ||
| 96 | #define IRQ_GE 84 /* Graphic Engine */ | ||
| 97 | #define IRQ_GOV 85 /* Graphic Overlay Engine */ | ||
| 98 | #define IRQ_DVO 86 /* Digital Video Output */ | ||
| 99 | /* Reserved */ | ||
| 100 | #define IRQ_DMA8 92 /* DMA Channel 8 */ | ||
| 101 | #define IRQ_DMA9 93 /* DMA Channel 9 */ | ||
| 102 | #define IRQ_DMA10 94 /* DMA Channel 10 */ | ||
| 103 | #define IRQ_DMA11 95 /* DMA Channel 11 */ | ||
| 104 | #define IRQ_DMA12 96 /* DMA Channel 12 */ | ||
| 105 | #define IRQ_DMA13 97 /* DMA Channel 13 */ | ||
| 106 | #define IRQ_DMA14 98 /* DMA Channel 14 */ | ||
| 107 | #define IRQ_DMA15 99 /* DMA Channel 15 */ | ||
| 108 | /* Reserved */ | ||
| 109 | #define IRQ_GOVW 111 /* GOVW (?) */ | ||
| 110 | #define IRQ_GOVRSDSCD 112 /* GOVR SDSCD (?) */ | ||
| 111 | #define IRQ_GOVRSDMIF 113 /* GOVR SDMIF (?) */ | ||
| 112 | #define IRQ_GOVRHDSCD 114 /* GOVR HDSCD (?) */ | ||
| 113 | #define IRQ_GOVRHDMIF 115 /* GOVR HDMIF (?) */ | ||
| 114 | |||
| 115 | #define WM8505_NR_IRQS 116 | ||
diff --git a/arch/arm/mach-vt8500/include/mach/wm8505_regs.h b/arch/arm/mach-vt8500/include/mach/wm8505_regs.h deleted file mode 100644 index df1550941efb..000000000000 --- a/arch/arm/mach-vt8500/include/mach/wm8505_regs.h +++ /dev/null | |||
| @@ -1,78 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * arch/arm/mach-vt8500/include/mach/wm8505_regs.h | ||
| 3 | * | ||
| 4 | * Copyright (C) 2010 Alexey Charkov <alchark@gmail.com> | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License as published by | ||
| 8 | * the Free Software Foundation; either version 2 of the License, or | ||
| 9 | * (at your option) any later version. | ||
| 10 | * | ||
| 11 | * This program is distributed in the hope that it will be useful, | ||
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | * GNU General Public License for more details. | ||
| 15 | * | ||
| 16 | * You should have received a copy of the GNU General Public License | ||
| 17 | * along with this program; if not, write to the Free Software | ||
| 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
| 19 | */ | ||
| 20 | #ifndef __ASM_ARM_ARCH_WM8505_REGS_H | ||
| 21 | #define __ASM_ARM_ARCH_WM8505_REGS_H | ||
| 22 | |||
| 23 | /* WM8505 Registers Map */ | ||
| 24 | |||
| 25 | #define WM8505_REGS_START_PHYS 0xd8000000 /* Start of MMIO registers */ | ||
| 26 | #define WM8505_REGS_START_VIRT 0xf8000000 /* Virtual mapping start */ | ||
| 27 | |||
| 28 | #define WM8505_DDR_BASE 0xd8000400 /* 1k DDR/DDR2 Memory | ||
| 29 | Controller */ | ||
| 30 | #define WM8505_DMA_BASE 0xd8001800 /* 1k DMA Controller */ | ||
| 31 | #define WM8505_VDMA_BASE 0xd8001c00 /* 1k VDMA */ | ||
| 32 | #define WM8505_SFLASH_BASE 0xd8002000 /* 1k Serial Flash Memory | ||
| 33 | Controller */ | ||
| 34 | #define WM8505_ETHER_BASE 0xd8004000 /* 1k Ethernet MAC 0 */ | ||
| 35 | #define WM8505_CIPHER_BASE 0xd8006000 /* 4k Cipher */ | ||
| 36 | #define WM8505_USB_BASE 0xd8007000 /* 2k USB 2.0 Host */ | ||
| 37 | # define WM8505_EHCI_BASE 0xd8007100 /* EHCI */ | ||
| 38 | # define WM8505_UHCI_BASE 0xd8007301 /* UHCI */ | ||
| 39 | #define WM8505_PS2_BASE 0xd8008800 /* 1k PS/2 */ | ||
| 40 | #define WM8505_NAND_BASE 0xd8009000 /* 1k NAND Controller */ | ||
| 41 | #define WM8505_NOR_BASE 0xd8009400 /* 1k NOR Controller */ | ||
| 42 | #define WM8505_SDMMC_BASE 0xd800a000 /* 1k SD/MMC Controller */ | ||
| 43 | #define WM8505_VPU_BASE 0xd8050000 /* 256 VPU */ | ||
| 44 | #define WM8505_GOV_BASE 0xd8050300 /* 256 GOV */ | ||
| 45 | #define WM8505_GEGEA_BASE 0xd8050400 /* 768 GE/GE Alpha Mixing */ | ||
| 46 | #define WM8505_GOVR_BASE 0xd8050800 /* 512 GOVR (frambuffer) */ | ||
| 47 | #define WM8505_VID_BASE 0xd8050a00 /* 256 VID */ | ||
| 48 | #define WM8505_SCL_BASE 0xd8050d00 /* 256 SCL */ | ||
| 49 | #define WM8505_VPP_BASE 0xd8050f00 /* 256 VPP */ | ||
| 50 | #define WM8505_JPEGDEC_BASE 0xd80fe000 /* 4k JPEG Decoder */ | ||
| 51 | #define WM8505_RTC_BASE 0xd8100000 /* 64k RTC */ | ||
| 52 | #define WM8505_GPIO_BASE 0xd8110000 /* 64k GPIO Configuration */ | ||
| 53 | #define WM8505_SCC_BASE 0xd8120000 /* 64k System Configuration*/ | ||
| 54 | #define WM8505_PMC_BASE 0xd8130000 /* 64k PMC Configuration */ | ||
| 55 | #define WM8505_IC_BASE 0xd8140000 /* 64k Interrupt Controller*/ | ||
| 56 | #define WM8505_SIC_BASE 0xd8150000 /* 64k Secondary IC */ | ||
| 57 | #define WM8505_UART0_BASE 0xd8200000 /* 64k UART 0 */ | ||
| 58 | #define WM8505_UART2_BASE 0xd8210000 /* 64k UART 2 */ | ||
| 59 | #define WM8505_PWM_BASE 0xd8220000 /* 64k PWM Configuration */ | ||
| 60 | #define WM8505_SPI0_BASE 0xd8240000 /* 64k SPI 0 */ | ||
| 61 | #define WM8505_SPI1_BASE 0xd8250000 /* 64k SPI 1 */ | ||
| 62 | #define WM8505_KEYPAD_BASE 0xd8260000 /* 64k Keypad control */ | ||
| 63 | #define WM8505_CIR_BASE 0xd8270000 /* 64k CIR */ | ||
| 64 | #define WM8505_I2C0_BASE 0xd8280000 /* 64k I2C 0 */ | ||
| 65 | #define WM8505_AC97_BASE 0xd8290000 /* 64k AC97 */ | ||
| 66 | #define WM8505_SPI2_BASE 0xd82a0000 /* 64k SPI 2 */ | ||
| 67 | #define WM8505_UART1_BASE 0xd82b0000 /* 64k UART 1 */ | ||
| 68 | #define WM8505_UART3_BASE 0xd82c0000 /* 64k UART 3 */ | ||
| 69 | #define WM8505_I2C1_BASE 0xd8320000 /* 64k I2C 1 */ | ||
| 70 | #define WM8505_I2S_BASE 0xd8330000 /* 64k I2S */ | ||
| 71 | #define WM8505_UART4_BASE 0xd8370000 /* 64k UART 4 */ | ||
| 72 | #define WM8505_UART5_BASE 0xd8380000 /* 64k UART 5 */ | ||
| 73 | |||
| 74 | #define WM8505_REGS_END_PHYS 0xd838ffff /* End of MMIO registers */ | ||
| 75 | #define WM8505_REGS_LENGTH (WM8505_REGS_END_PHYS \ | ||
| 76 | - WM8505_REGS_START_PHYS + 1) | ||
| 77 | |||
| 78 | #endif | ||
diff --git a/arch/arm/mach-vt8500/irq.c b/arch/arm/mach-vt8500/irq.c index 642de0408f25..f8f9ab9bc56e 100644 --- a/arch/arm/mach-vt8500/irq.c +++ b/arch/arm/mach-vt8500/irq.c | |||
| @@ -1,6 +1,7 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * arch/arm/mach-vt8500/irq.c | 2 | * arch/arm/mach-vt8500/irq.c |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2012 Tony Prisk <linux@prisktech.co.nz> | ||
| 4 | * Copyright (C) 2010 Alexey Charkov <alchark@gmail.com> | 5 | * Copyright (C) 2010 Alexey Charkov <alchark@gmail.com> |
| 5 | * | 6 | * |
| 6 | * This program is free software; you can redistribute it and/or modify | 7 | * This program is free software; you can redistribute it and/or modify |
| @@ -18,81 +19,102 @@ | |||
| 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 19 | */ | 20 | */ |
| 20 | 21 | ||
| 22 | /* | ||
| 23 | * This file is copied and modified from the original irq.c provided by | ||
| 24 | * Alexey Charkov. Minor changes have been made for Device Tree Support. | ||
| 25 | */ | ||
| 26 | |||
| 27 | #include <linux/slab.h> | ||
| 21 | #include <linux/io.h> | 28 | #include <linux/io.h> |
| 22 | #include <linux/irq.h> | 29 | #include <linux/irq.h> |
| 30 | #include <linux/irqdomain.h> | ||
| 23 | #include <linux/interrupt.h> | 31 | #include <linux/interrupt.h> |
| 32 | #include <linux/bitops.h> | ||
| 33 | |||
| 34 | #include <linux/of.h> | ||
| 35 | #include <linux/of_irq.h> | ||
| 36 | #include <linux/of_address.h> | ||
| 24 | 37 | ||
| 25 | #include <asm/irq.h> | 38 | #include <asm/irq.h> |
| 26 | 39 | ||
| 27 | #include "devices.h" | ||
| 28 | 40 | ||
| 29 | #define VT8500_IC_DCTR 0x40 /* Destination control | 41 | #define VT8500_ICPC_IRQ 0x20 |
| 30 | register, 64*u8 */ | 42 | #define VT8500_ICPC_FIQ 0x24 |
| 31 | #define VT8500_INT_ENABLE (1 << 3) | 43 | #define VT8500_ICDC 0x40 /* Destination Control 64*u32 */ |
| 32 | #define VT8500_TRIGGER_HIGH (0 << 4) | 44 | #define VT8500_ICIS 0x80 /* Interrupt status, 16*u32 */ |
| 33 | #define VT8500_TRIGGER_RISING (1 << 4) | 45 | |
| 34 | #define VT8500_TRIGGER_FALLING (2 << 4) | 46 | /* ICPC */ |
| 47 | #define ICPC_MASK 0x3F | ||
| 48 | #define ICPC_ROTATE BIT(6) | ||
| 49 | |||
| 50 | /* IC_DCTR */ | ||
| 51 | #define ICDC_IRQ 0x00 | ||
| 52 | #define ICDC_FIQ 0x01 | ||
| 53 | #define ICDC_DSS0 0x02 | ||
| 54 | #define ICDC_DSS1 0x03 | ||
| 55 | #define ICDC_DSS2 0x04 | ||
| 56 | #define ICDC_DSS3 0x05 | ||
| 57 | #define ICDC_DSS4 0x06 | ||
| 58 | #define ICDC_DSS5 0x07 | ||
| 59 | |||
| 60 | #define VT8500_INT_DISABLE 0 | ||
| 61 | #define VT8500_INT_ENABLE BIT(3) | ||
| 62 | |||
| 63 | #define VT8500_TRIGGER_HIGH 0 | ||
| 64 | #define VT8500_TRIGGER_RISING BIT(5) | ||
| 65 | #define VT8500_TRIGGER_FALLING BIT(6) | ||
| 35 | #define VT8500_EDGE ( VT8500_TRIGGER_RISING \ | 66 | #define VT8500_EDGE ( VT8500_TRIGGER_RISING \ |
| 36 | | VT8500_TRIGGER_FALLING) | 67 | | VT8500_TRIGGER_FALLING) |
| 37 | #define VT8500_IC_STATUS 0x80 /* Interrupt status, 2*u32 */ | ||
| 38 | 68 | ||
| 39 | static void __iomem *ic_regbase; | 69 | static int irq_cnt; |
| 40 | static void __iomem *sic_regbase; | 70 | |
| 71 | struct vt8500_irq_priv { | ||
| 72 | void __iomem *base; | ||
| 73 | }; | ||
| 41 | 74 | ||
| 42 | static void vt8500_irq_mask(struct irq_data *d) | 75 | static void vt8500_irq_mask(struct irq_data *d) |
| 43 | { | 76 | { |
| 44 | void __iomem *base = ic_regbase; | 77 | struct vt8500_irq_priv *priv = |
| 45 | unsigned irq = d->irq; | 78 | (struct vt8500_irq_priv *)(d->domain->host_data); |
| 79 | void __iomem *base = priv->base; | ||
| 46 | u8 edge; | 80 | u8 edge; |
| 47 | 81 | ||
| 48 | if (irq >= 64) { | 82 | edge = readb(base + VT8500_ICDC + d->hwirq) & VT8500_EDGE; |
| 49 | base = sic_regbase; | ||
| 50 | irq -= 64; | ||
| 51 | } | ||
| 52 | edge = readb(base + VT8500_IC_DCTR + irq) & VT8500_EDGE; | ||
| 53 | if (edge) { | 83 | if (edge) { |
| 54 | void __iomem *stat_reg = base + VT8500_IC_STATUS | 84 | void __iomem *stat_reg = base + VT8500_ICIS |
| 55 | + (irq < 32 ? 0 : 4); | 85 | + (d->hwirq < 32 ? 0 : 4); |
| 56 | unsigned status = readl(stat_reg); | 86 | unsigned status = readl(stat_reg); |
| 57 | 87 | ||
| 58 | status |= (1 << (irq & 0x1f)); | 88 | status |= (1 << (d->hwirq & 0x1f)); |
| 59 | writel(status, stat_reg); | 89 | writel(status, stat_reg); |
| 60 | } else { | 90 | } else { |
| 61 | u8 dctr = readb(base + VT8500_IC_DCTR + irq); | 91 | u8 dctr = readb(base + VT8500_ICDC + d->hwirq); |
| 62 | 92 | ||
| 63 | dctr &= ~VT8500_INT_ENABLE; | 93 | dctr &= ~VT8500_INT_ENABLE; |
| 64 | writeb(dctr, base + VT8500_IC_DCTR + irq); | 94 | writeb(dctr, base + VT8500_ICDC + d->hwirq); |
| 65 | } | 95 | } |
| 66 | } | 96 | } |
| 67 | 97 | ||
| 68 | static void vt8500_irq_unmask(struct irq_data *d) | 98 | static void vt8500_irq_unmask(struct irq_data *d) |
| 69 | { | 99 | { |
| 70 | void __iomem *base = ic_regbase; | 100 | struct vt8500_irq_priv *priv = |
| 71 | unsigned irq = d->irq; | 101 | (struct vt8500_irq_priv *)(d->domain->host_data); |
| 102 | void __iomem *base = priv->base; | ||
| 72 | u8 dctr; | 103 | u8 dctr; |
| 73 | 104 | ||
| 74 | if (irq >= 64) { | 105 | dctr = readb(base + VT8500_ICDC + d->hwirq); |
| 75 | base = sic_regbase; | ||
| 76 | irq -= 64; | ||
| 77 | } | ||
| 78 | dctr = readb(base + VT8500_IC_DCTR + irq); | ||
| 79 | dctr |= VT8500_INT_ENABLE; | 106 | dctr |= VT8500_INT_ENABLE; |
| 80 | writeb(dctr, base + VT8500_IC_DCTR + irq); | 107 | writeb(dctr, base + VT8500_ICDC + d->hwirq); |
| 81 | } | 108 | } |
| 82 | 109 | ||
| 83 | static int vt8500_irq_set_type(struct irq_data *d, unsigned int flow_type) | 110 | static int vt8500_irq_set_type(struct irq_data *d, unsigned int flow_type) |
| 84 | { | 111 | { |
| 85 | void __iomem *base = ic_regbase; | 112 | struct vt8500_irq_priv *priv = |
| 86 | unsigned irq = d->irq; | 113 | (struct vt8500_irq_priv *)(d->domain->host_data); |
| 87 | unsigned orig_irq = irq; | 114 | void __iomem *base = priv->base; |
| 88 | u8 dctr; | 115 | u8 dctr; |
| 89 | 116 | ||
| 90 | if (irq >= 64) { | 117 | dctr = readb(base + VT8500_ICDC + d->hwirq); |
| 91 | base = sic_regbase; | ||
| 92 | irq -= 64; | ||
| 93 | } | ||
| 94 | |||
| 95 | dctr = readb(base + VT8500_IC_DCTR + irq); | ||
| 96 | dctr &= ~VT8500_EDGE; | 118 | dctr &= ~VT8500_EDGE; |
| 97 | 119 | ||
| 98 | switch (flow_type) { | 120 | switch (flow_type) { |
| @@ -100,18 +122,18 @@ static int vt8500_irq_set_type(struct irq_data *d, unsigned int flow_type) | |||
| 100 | return -EINVAL; | 122 | return -EINVAL; |
| 101 | case IRQF_TRIGGER_HIGH: | 123 | case IRQF_TRIGGER_HIGH: |
| 102 | dctr |= VT8500_TRIGGER_HIGH; | 124 | dctr |= VT8500_TRIGGER_HIGH; |
| 103 | __irq_set_handler_locked(orig_irq, handle_level_irq); | 125 | __irq_set_handler_locked(d->irq, handle_level_irq); |
| 104 | break; | 126 | break; |
| 105 | case IRQF_TRIGGER_FALLING: | 127 | case IRQF_TRIGGER_FALLING: |
| 106 | dctr |= VT8500_TRIGGER_FALLING; | 128 | dctr |= VT8500_TRIGGER_FALLING; |
| 107 | __irq_set_handler_locked(orig_irq, handle_edge_irq); | 129 | __irq_set_handler_locked(d->irq, handle_edge_irq); |
| 108 | break; | 130 | break; |
| 109 | case IRQF_TRIGGER_RISING: | 131 | case IRQF_TRIGGER_RISING: |
| 110 | dctr |= VT8500_TRIGGER_RISING; | 132 | dctr |= VT8500_TRIGGER_RISING; |
| 111 | __irq_set_handler_locked(orig_irq, handle_edge_irq); | 133 | __irq_set_handler_locked(d->irq, handle_edge_irq); |
| 112 | break; | 134 | break; |
| 113 | } | 135 | } |
| 114 | writeb(dctr, base + VT8500_IC_DCTR + irq); | 136 | writeb(dctr, base + VT8500_ICDC + d->hwirq); |
| 115 | 137 | ||
| 116 | return 0; | 138 | return 0; |
| 117 | } | 139 | } |
| @@ -124,57 +146,76 @@ static struct irq_chip vt8500_irq_chip = { | |||
| 124 | .irq_set_type = vt8500_irq_set_type, | 146 | .irq_set_type = vt8500_irq_set_type, |
| 125 | }; | 147 | }; |
| 126 | 148 | ||
| 127 | void __init vt8500_init_irq(void) | 149 | static void __init vt8500_init_irq_hw(void __iomem *base) |
| 128 | { | 150 | { |
| 129 | unsigned int i; | 151 | unsigned int i; |
| 130 | 152 | ||
| 131 | ic_regbase = ioremap(wmt_ic_base, SZ_64K); | 153 | /* Enable rotating priority for IRQ */ |
| 154 | writel(ICPC_ROTATE, base + VT8500_ICPC_IRQ); | ||
| 155 | writel(0x00, base + VT8500_ICPC_FIQ); | ||
| 132 | 156 | ||
| 133 | if (ic_regbase) { | 157 | for (i = 0; i < 64; i++) { |
| 134 | /* Enable rotating priority for IRQ */ | 158 | /* Disable all interrupts and route them to IRQ */ |
| 135 | writel((1 << 6), ic_regbase + 0x20); | 159 | writeb(VT8500_INT_DISABLE | ICDC_IRQ, |
| 136 | writel(0, ic_regbase + 0x24); | 160 | base + VT8500_ICDC + i); |
| 161 | } | ||
| 162 | } | ||
| 137 | 163 | ||
| 138 | for (i = 0; i < wmt_nr_irqs; i++) { | 164 | static int vt8500_irq_map(struct irq_domain *h, unsigned int virq, |
| 139 | /* Disable all interrupts and route them to IRQ */ | 165 | irq_hw_number_t hw) |
| 140 | writeb(0x00, ic_regbase + VT8500_IC_DCTR + i); | 166 | { |
| 167 | irq_set_chip_and_handler(virq, &vt8500_irq_chip, handle_level_irq); | ||
| 168 | set_irq_flags(virq, IRQF_VALID); | ||
| 141 | 169 | ||
| 142 | irq_set_chip_and_handler(i, &vt8500_irq_chip, | 170 | return 0; |
| 143 | handle_level_irq); | ||
| 144 | set_irq_flags(i, IRQF_VALID); | ||
| 145 | } | ||
| 146 | } else { | ||
| 147 | printk(KERN_ERR "Unable to remap the Interrupt Controller registers, not enabling IRQs!\n"); | ||
| 148 | } | ||
| 149 | } | 171 | } |
| 150 | 172 | ||
| 151 | void __init wm8505_init_irq(void) | 173 | static struct irq_domain_ops vt8500_irq_domain_ops = { |
| 174 | .map = vt8500_irq_map, | ||
| 175 | .xlate = irq_domain_xlate_onecell, | ||
| 176 | }; | ||
| 177 | |||
| 178 | int __init vt8500_irq_init(struct device_node *node, struct device_node *parent) | ||
| 152 | { | 179 | { |
| 153 | unsigned int i; | 180 | struct irq_domain *vt8500_irq_domain; |
| 181 | struct vt8500_irq_priv *priv; | ||
| 182 | int irq, i; | ||
| 183 | struct device_node *np = node; | ||
| 184 | |||
| 185 | priv = kzalloc(sizeof(struct vt8500_irq_priv), GFP_KERNEL); | ||
| 186 | priv->base = of_iomap(np, 0); | ||
| 187 | |||
| 188 | vt8500_irq_domain = irq_domain_add_legacy(node, 64, irq_cnt, 0, | ||
| 189 | &vt8500_irq_domain_ops, priv); | ||
| 190 | if (!vt8500_irq_domain) | ||
| 191 | pr_err("%s: Unable to add wmt irq domain!\n", __func__); | ||
| 192 | |||
| 193 | irq_set_default_host(vt8500_irq_domain); | ||
| 194 | |||
| 195 | vt8500_init_irq_hw(priv->base); | ||
| 154 | 196 | ||
| 155 | ic_regbase = ioremap(wmt_ic_base, SZ_64K); | 197 | pr_info("Added IRQ Controller @ %x [virq_base = %d]\n", |
| 156 | sic_regbase = ioremap(wmt_sic_base, SZ_64K); | 198 | (u32)(priv->base), irq_cnt); |
| 157 | 199 | ||
| 158 | if (ic_regbase && sic_regbase) { | 200 | /* check if this is a slaved controller */ |
| 159 | /* Enable rotating priority for IRQ */ | 201 | if (of_irq_count(np) != 0) { |
| 160 | writel((1 << 6), ic_regbase + 0x20); | 202 | /* check that we have the correct number of interrupts */ |
| 161 | writel(0, ic_regbase + 0x24); | 203 | if (of_irq_count(np) != 8) { |
| 162 | writel((1 << 6), sic_regbase + 0x20); | 204 | pr_err("%s: Incorrect IRQ map for slave controller\n", |
| 163 | writel(0, sic_regbase + 0x24); | 205 | __func__); |
| 164 | 206 | return -EINVAL; | |
| 165 | for (i = 0; i < wmt_nr_irqs; i++) { | ||
| 166 | /* Disable all interrupts and route them to IRQ */ | ||
| 167 | if (i < 64) | ||
| 168 | writeb(0x00, ic_regbase + VT8500_IC_DCTR + i); | ||
| 169 | else | ||
| 170 | writeb(0x00, sic_regbase + VT8500_IC_DCTR | ||
| 171 | + i - 64); | ||
| 172 | |||
| 173 | irq_set_chip_and_handler(i, &vt8500_irq_chip, | ||
| 174 | handle_level_irq); | ||
| 175 | set_irq_flags(i, IRQF_VALID); | ||
| 176 | } | 207 | } |
| 177 | } else { | 208 | |
| 178 | printk(KERN_ERR "Unable to remap the Interrupt Controller registers, not enabling IRQs!\n"); | 209 | for (i = 0; i < 8; i++) { |
| 210 | irq = irq_of_parse_and_map(np, i); | ||
| 211 | enable_irq(irq); | ||
| 212 | } | ||
| 213 | |||
| 214 | pr_info("vt8500-irq: Enabled slave->parent interrupts\n"); | ||
| 179 | } | 215 | } |
| 216 | |||
| 217 | irq_cnt += 64; | ||
| 218 | |||
| 219 | return 0; | ||
| 180 | } | 220 | } |
| 221 | |||
diff --git a/arch/arm/mach-vt8500/restart.c b/arch/arm/mach-vt8500/restart.c deleted file mode 100644 index 497e89a5e130..000000000000 --- a/arch/arm/mach-vt8500/restart.c +++ /dev/null | |||
| @@ -1,54 +0,0 @@ | |||
| 1 | /* linux/arch/arm/mach-vt8500/restart.c | ||
| 2 | * | ||
| 3 | * Copyright (C) 2012 Tony Prisk <linux@prisktech.co.nz> | ||
| 4 | * | ||
| 5 | * This software is licensed under the terms of the GNU General Public | ||
| 6 | * License version 2, as published by the Free Software Foundation, and | ||
| 7 | * may be copied, distributed, and modified under those terms. | ||
| 8 | * | ||
| 9 | * This program is distributed in the hope that it will be useful, | ||
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | * GNU General Public License for more details. | ||
| 13 | * | ||
| 14 | */ | ||
| 15 | #include <asm/io.h> | ||
| 16 | #include <linux/of.h> | ||
| 17 | #include <linux/of_address.h> | ||
| 18 | |||
| 19 | #define LEGACY_PMC_BASE 0xD8130000 | ||
| 20 | #define WMT_PRIZM_PMSR_REG 0x60 | ||
| 21 | |||
| 22 | static void __iomem *pmc_base; | ||
| 23 | |||
| 24 | void wmt_setup_restart(void) | ||
| 25 | { | ||
| 26 | struct device_node *np; | ||
| 27 | |||
| 28 | /* | ||
| 29 | * Check if Power Mgmt Controller node is present in device tree. If no | ||
| 30 | * device tree node, use the legacy PMSR value (valid for all current | ||
| 31 | * SoCs). | ||
| 32 | */ | ||
| 33 | np = of_find_compatible_node(NULL, NULL, "wmt,prizm-pmc"); | ||
| 34 | if (np) { | ||
| 35 | pmc_base = of_iomap(np, 0); | ||
| 36 | |||
| 37 | if (!pmc_base) | ||
| 38 | pr_err("%s:of_iomap(pmc) failed\n", __func__); | ||
| 39 | |||
| 40 | of_node_put(np); | ||
| 41 | } else { | ||
| 42 | pmc_base = ioremap(LEGACY_PMC_BASE, 0x1000); | ||
| 43 | if (!pmc_base) { | ||
| 44 | pr_err("%s:ioremap(rstc) failed\n", __func__); | ||
| 45 | return; | ||
| 46 | } | ||
| 47 | } | ||
| 48 | } | ||
| 49 | |||
| 50 | void wmt_restart(char mode, const char *cmd) | ||
| 51 | { | ||
| 52 | if (pmc_base) | ||
| 53 | writel(1, pmc_base + WMT_PRIZM_PMSR_REG); | ||
| 54 | } | ||
diff --git a/arch/arm/mach-vt8500/timer.c b/arch/arm/mach-vt8500/timer.c index d5376c592ab6..050e1833f2d0 100644 --- a/arch/arm/mach-vt8500/timer.c +++ b/arch/arm/mach-vt8500/timer.c | |||
| @@ -1,6 +1,7 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * arch/arm/mach-vt8500/timer.c | 2 | * arch/arm/mach-vt8500/timer_dt.c |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2012 Tony Prisk <linux@prisktech.co.nz> | ||
| 4 | * Copyright (C) 2010 Alexey Charkov <alchark@gmail.com> | 5 | * Copyright (C) 2010 Alexey Charkov <alchark@gmail.com> |
| 5 | * | 6 | * |
| 6 | * This program is free software; you can redistribute it and/or modify | 7 | * This program is free software; you can redistribute it and/or modify |
| @@ -18,18 +19,25 @@ | |||
| 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 19 | */ | 20 | */ |
| 20 | 21 | ||
| 22 | /* | ||
| 23 | * This file is copied and modified from the original timer.c provided by | ||
| 24 | * Alexey Charkov. Minor changes have been made for Device Tree Support. | ||
| 25 | */ | ||
| 26 | |||
| 21 | #include <linux/io.h> | 27 | #include <linux/io.h> |
| 22 | #include <linux/irq.h> | 28 | #include <linux/irq.h> |
| 23 | #include <linux/interrupt.h> | 29 | #include <linux/interrupt.h> |
| 24 | #include <linux/clocksource.h> | 30 | #include <linux/clocksource.h> |
| 25 | #include <linux/clockchips.h> | 31 | #include <linux/clockchips.h> |
| 26 | #include <linux/delay.h> | 32 | #include <linux/delay.h> |
| 27 | |||
| 28 | #include <asm/mach/time.h> | 33 | #include <asm/mach/time.h> |
| 29 | 34 | ||
| 30 | #include "devices.h" | 35 | #include <linux/of.h> |
| 36 | #include <linux/of_address.h> | ||
| 37 | #include <linux/of_irq.h> | ||
| 31 | 38 | ||
| 32 | #define VT8500_TIMER_OFFSET 0x0100 | 39 | #define VT8500_TIMER_OFFSET 0x0100 |
| 40 | #define VT8500_TIMER_HZ 3000000 | ||
| 33 | #define TIMER_MATCH_VAL 0x0000 | 41 | #define TIMER_MATCH_VAL 0x0000 |
| 34 | #define TIMER_COUNT_VAL 0x0010 | 42 | #define TIMER_COUNT_VAL 0x0010 |
| 35 | #define TIMER_STATUS_VAL 0x0014 | 43 | #define TIMER_STATUS_VAL 0x0014 |
| @@ -39,7 +47,6 @@ | |||
| 39 | #define TIMER_COUNT_R_ACTIVE (1 << 5) /* not ready for read */ | 47 | #define TIMER_COUNT_R_ACTIVE (1 << 5) /* not ready for read */ |
| 40 | #define TIMER_COUNT_W_ACTIVE (1 << 4) /* not ready for write */ | 48 | #define TIMER_COUNT_W_ACTIVE (1 << 4) /* not ready for write */ |
| 41 | #define TIMER_MATCH_W_ACTIVE (1 << 0) /* not ready for write */ | 49 | #define TIMER_MATCH_W_ACTIVE (1 << 0) /* not ready for write */ |
| 42 | #define VT8500_TIMER_HZ 3000000 | ||
| 43 | 50 | ||
| 44 | #define msecs_to_loops(t) (loops_per_jiffy / 1000 * HZ * t) | 51 | #define msecs_to_loops(t) (loops_per_jiffy / 1000 * HZ * t) |
| 45 | 52 | ||
| @@ -55,7 +62,7 @@ static cycle_t vt8500_timer_read(struct clocksource *cs) | |||
| 55 | return readl(regbase + TIMER_COUNT_VAL); | 62 | return readl(regbase + TIMER_COUNT_VAL); |
| 56 | } | 63 | } |
| 57 | 64 | ||
| 58 | struct clocksource clocksource = { | 65 | static struct clocksource clocksource = { |
| 59 | .name = "vt8500_timer", | 66 | .name = "vt8500_timer", |
| 60 | .rating = 200, | 67 | .rating = 200, |
| 61 | .read = vt8500_timer_read, | 68 | .read = vt8500_timer_read, |
| @@ -98,7 +105,7 @@ static void vt8500_timer_set_mode(enum clock_event_mode mode, | |||
| 98 | } | 105 | } |
| 99 | } | 106 | } |
| 100 | 107 | ||
| 101 | struct clock_event_device clockevent = { | 108 | static struct clock_event_device clockevent = { |
| 102 | .name = "vt8500_timer", | 109 | .name = "vt8500_timer", |
| 103 | .features = CLOCK_EVT_FEAT_ONESHOT, | 110 | .features = CLOCK_EVT_FEAT_ONESHOT, |
| 104 | .rating = 200, | 111 | .rating = 200, |
| @@ -115,26 +122,51 @@ static irqreturn_t vt8500_timer_interrupt(int irq, void *dev_id) | |||
| 115 | return IRQ_HANDLED; | 122 | return IRQ_HANDLED; |
| 116 | } | 123 | } |
| 117 | 124 | ||
| 118 | struct irqaction irq = { | 125 | static struct irqaction irq = { |
| 119 | .name = "vt8500_timer", | 126 | .name = "vt8500_timer", |
| 120 | .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL, | 127 | .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL, |
| 121 | .handler = vt8500_timer_interrupt, | 128 | .handler = vt8500_timer_interrupt, |
| 122 | .dev_id = &clockevent, | 129 | .dev_id = &clockevent, |
| 123 | }; | 130 | }; |
| 124 | 131 | ||
| 125 | static void __init vt8500_timer_init(void) | 132 | static struct of_device_id vt8500_timer_ids[] = { |
| 133 | { .compatible = "via,vt8500-timer" }, | ||
| 134 | { } | ||
| 135 | }; | ||
| 136 | |||
| 137 | void __init vt8500_timer_init(void) | ||
| 126 | { | 138 | { |
| 127 | regbase = ioremap(wmt_pmc_base + VT8500_TIMER_OFFSET, 0x28); | 139 | struct device_node *np; |
| 128 | if (!regbase) | 140 | int timer_irq; |
| 129 | printk(KERN_ERR "vt8500_timer_init: failed to map MMIO registers\n"); | 141 | |
| 142 | np = of_find_matching_node(NULL, vt8500_timer_ids); | ||
| 143 | if (!np) { | ||
| 144 | pr_err("%s: Timer description missing from Device Tree\n", | ||
| 145 | __func__); | ||
| 146 | return; | ||
| 147 | } | ||
| 148 | regbase = of_iomap(np, 0); | ||
| 149 | if (!regbase) { | ||
| 150 | pr_err("%s: Missing iobase description in Device Tree\n", | ||
| 151 | __func__); | ||
| 152 | of_node_put(np); | ||
| 153 | return; | ||
| 154 | } | ||
| 155 | timer_irq = irq_of_parse_and_map(np, 0); | ||
| 156 | if (!timer_irq) { | ||
| 157 | pr_err("%s: Missing irq description in Device Tree\n", | ||
| 158 | __func__); | ||
| 159 | of_node_put(np); | ||
| 160 | return; | ||
| 161 | } | ||
| 130 | 162 | ||
| 131 | writel(1, regbase + TIMER_CTRL_VAL); | 163 | writel(1, regbase + TIMER_CTRL_VAL); |
| 132 | writel(0xf, regbase + TIMER_STATUS_VAL); | 164 | writel(0xf, regbase + TIMER_STATUS_VAL); |
| 133 | writel(~0, regbase + TIMER_MATCH_VAL); | 165 | writel(~0, regbase + TIMER_MATCH_VAL); |
| 134 | 166 | ||
| 135 | if (clocksource_register_hz(&clocksource, VT8500_TIMER_HZ)) | 167 | if (clocksource_register_hz(&clocksource, VT8500_TIMER_HZ)) |
| 136 | printk(KERN_ERR "vt8500_timer_init: clocksource_register failed for %s\n", | 168 | pr_err("%s: vt8500_timer_init: clocksource_register failed for %s\n", |
| 137 | clocksource.name); | 169 | __func__, clocksource.name); |
| 138 | 170 | ||
| 139 | clockevents_calc_mult_shift(&clockevent, VT8500_TIMER_HZ, 4); | 171 | clockevents_calc_mult_shift(&clockevent, VT8500_TIMER_HZ, 4); |
| 140 | 172 | ||
| @@ -144,12 +176,9 @@ static void __init vt8500_timer_init(void) | |||
| 144 | clockevent.min_delta_ns = clockevent_delta2ns(4, &clockevent); | 176 | clockevent.min_delta_ns = clockevent_delta2ns(4, &clockevent); |
| 145 | clockevent.cpumask = cpumask_of(0); | 177 | clockevent.cpumask = cpumask_of(0); |
| 146 | 178 | ||
| 147 | if (setup_irq(wmt_timer_irq, &irq)) | 179 | if (setup_irq(timer_irq, &irq)) |
| 148 | printk(KERN_ERR "vt8500_timer_init: setup_irq failed for %s\n", | 180 | pr_err("%s: setup_irq failed for %s\n", __func__, |
| 149 | clockevent.name); | 181 | clockevent.name); |
| 150 | clockevents_register_device(&clockevent); | 182 | clockevents_register_device(&clockevent); |
| 151 | } | 183 | } |
| 152 | 184 | ||
| 153 | struct sys_timer vt8500_timer = { | ||
| 154 | .init = vt8500_timer_init | ||
| 155 | }; | ||
diff --git a/arch/arm/mach-vt8500/vt8500.c b/arch/arm/mach-vt8500/vt8500.c new file mode 100644 index 000000000000..449499354449 --- /dev/null +++ b/arch/arm/mach-vt8500/vt8500.c | |||
| @@ -0,0 +1,196 @@ | |||
| 1 | /* | ||
| 2 | * arch/arm/mach-vt8500/vt8500.c | ||
| 3 | * | ||
| 4 | * Copyright (C) 2012 Tony Prisk <linux@prisktech.co.nz> | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License as published by | ||
| 8 | * the Free Software Foundation; either version 2 of the License, or | ||
| 9 | * (at your option) any later version. | ||
| 10 | * | ||
| 11 | * This program is distributed in the hope that it will be useful, | ||
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | * GNU General Public License for more details. | ||
| 15 | * | ||
| 16 | * You should have received a copy of the GNU General Public License | ||
| 17 | * along with this program; if not, write to the Free Software | ||
| 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
| 19 | */ | ||
| 20 | |||
| 21 | #include <linux/io.h> | ||
| 22 | #include <linux/pm.h> | ||
| 23 | |||
| 24 | #include <asm/mach-types.h> | ||
| 25 | #include <asm/mach/arch.h> | ||
| 26 | #include <asm/mach/time.h> | ||
| 27 | #include <asm/mach/map.h> | ||
| 28 | |||
| 29 | #include <linux/of.h> | ||
| 30 | #include <linux/of_address.h> | ||
| 31 | #include <linux/of_irq.h> | ||
| 32 | #include <linux/of_platform.h> | ||
| 33 | |||
| 34 | #include <mach/restart.h> | ||
| 35 | #include <mach/gpio.h> | ||
| 36 | |||
| 37 | #include "common.h" | ||
| 38 | |||
| 39 | #define LEGACY_GPIO_BASE 0xD8110000 | ||
| 40 | #define LEGACY_PMC_BASE 0xD8130000 | ||
| 41 | |||
| 42 | /* Registers in GPIO Controller */ | ||
| 43 | #define VT8500_GPIO_MUX_REG 0x200 | ||
| 44 | |||
| 45 | /* Registers in Power Management Controller */ | ||
| 46 | #define VT8500_HCR_REG 0x12 | ||
| 47 | #define VT8500_PMSR_REG 0x60 | ||
| 48 | |||
| 49 | static void __iomem *pmc_base; | ||
| 50 | |||
| 51 | void vt8500_restart(char mode, const char *cmd) | ||
| 52 | { | ||
| 53 | if (pmc_base) | ||
| 54 | writel(1, pmc_base + VT8500_PMSR_REG); | ||
| 55 | } | ||
| 56 | |||
| 57 | static struct map_desc vt8500_io_desc[] __initdata = { | ||
| 58 | /* SoC MMIO registers */ | ||
| 59 | [0] = { | ||
| 60 | .virtual = 0xf8000000, | ||
| 61 | .pfn = __phys_to_pfn(0xd8000000), | ||
| 62 | .length = 0x00390000, /* max of all chip variants */ | ||
| 63 | .type = MT_DEVICE | ||
| 64 | }, | ||
| 65 | }; | ||
| 66 | |||
| 67 | void __init vt8500_map_io(void) | ||
| 68 | { | ||
| 69 | iotable_init(vt8500_io_desc, ARRAY_SIZE(vt8500_io_desc)); | ||
| 70 | } | ||
| 71 | |||
| 72 | static void vt8500_power_off(void) | ||
| 73 | { | ||
| 74 | local_irq_disable(); | ||
| 75 | writew(5, pmc_base + VT8500_HCR_REG); | ||
| 76 | asm("mcr%? p15, 0, %0, c7, c0, 4" : : "r" (0)); | ||
| 77 | } | ||
| 78 | |||
| 79 | void __init vt8500_init(void) | ||
| 80 | { | ||
| 81 | struct device_node *np, *fb; | ||
| 82 | void __iomem *gpio_base; | ||
| 83 | |||
| 84 | #ifdef CONFIG_FB_VT8500 | ||
| 85 | fb = of_find_compatible_node(NULL, NULL, "via,vt8500-fb"); | ||
| 86 | if (fb) { | ||
| 87 | np = of_find_compatible_node(NULL, NULL, "via,vt8500-gpio"); | ||
| 88 | if (np) { | ||
| 89 | gpio_base = of_iomap(np, 0); | ||
| 90 | |||
| 91 | if (!gpio_base) | ||
| 92 | pr_err("%s: of_iomap(gpio_mux) failed\n", | ||
| 93 | __func__); | ||
| 94 | |||
| 95 | of_node_put(np); | ||
| 96 | } else { | ||
| 97 | gpio_base = ioremap(LEGACY_GPIO_BASE, 0x1000); | ||
| 98 | if (!gpio_base) | ||
| 99 | pr_err("%s: ioremap(legacy_gpio_mux) failed\n", | ||
| 100 | __func__); | ||
| 101 | } | ||
| 102 | if (gpio_base) { | ||
| 103 | writel(readl(gpio_base + VT8500_GPIO_MUX_REG) | 1, | ||
| 104 | gpio_base + VT8500_GPIO_MUX_REG); | ||
| 105 | iounmap(gpio_base); | ||
| 106 | } else | ||
| 107 | pr_err("%s: Could not remap GPIO mux\n", __func__); | ||
| 108 | |||
| 109 | of_node_put(fb); | ||
| 110 | } | ||
| 111 | #endif | ||
| 112 | |||
| 113 | #ifdef CONFIG_FB_WM8505 | ||
| 114 | fb = of_find_compatible_node(NULL, NULL, "wm,wm8505-fb"); | ||
| 115 | if (fb) { | ||
| 116 | np = of_find_compatible_node(NULL, NULL, "wm,wm8505-gpio"); | ||
| 117 | if (!np) | ||
| 118 | np = of_find_compatible_node(NULL, NULL, | ||
| 119 | "wm,wm8650-gpio"); | ||
| 120 | if (np) { | ||
| 121 | gpio_base = of_iomap(np, 0); | ||
| 122 | |||
| 123 | if (!gpio_base) | ||
| 124 | pr_err("%s: of_iomap(gpio_mux) failed\n", | ||
| 125 | __func__); | ||
| 126 | |||
| 127 | of_node_put(np); | ||
| 128 | } else { | ||
| 129 | gpio_base = ioremap(LEGACY_GPIO_BASE, 0x1000); | ||
| 130 | if (!gpio_base) | ||
| 131 | pr_err("%s: ioremap(legacy_gpio_mux) failed\n", | ||
| 132 | __func__); | ||
| 133 | } | ||
| 134 | if (gpio_base) { | ||
| 135 | writel(readl(gpio_base + VT8500_GPIO_MUX_REG) | | ||
| 136 | 0x80000000, gpio_base + VT8500_GPIO_MUX_REG); | ||
| 137 | iounmap(gpio_base); | ||
| 138 | } else | ||
| 139 | pr_err("%s: Could not remap GPIO mux\n", __func__); | ||
| 140 | |||
| 141 | of_node_put(fb); | ||
| 142 | } | ||
| 143 | #endif | ||
| 144 | |||
| 145 | np = of_find_compatible_node(NULL, NULL, "via,vt8500-pmc"); | ||
| 146 | if (np) { | ||
| 147 | pmc_base = of_iomap(np, 0); | ||
| 148 | |||
| 149 | if (!pmc_base) | ||
| 150 | pr_err("%s:of_iomap(pmc) failed\n", __func__); | ||
| 151 | |||
| 152 | of_node_put(np); | ||
| 153 | } else { | ||
| 154 | pmc_base = ioremap(LEGACY_PMC_BASE, 0x1000); | ||
| 155 | if (!pmc_base) | ||
| 156 | pr_err("%s:ioremap(power_off) failed\n", __func__); | ||
| 157 | } | ||
| 158 | if (pmc_base) | ||
| 159 | pm_power_off = &vt8500_power_off; | ||
| 160 | else | ||
| 161 | pr_err("%s: PMC Hibernation register could not be remapped, not enabling power off!\n", __func__); | ||
| 162 | |||
| 163 | vtwm_clk_init(pmc_base); | ||
| 164 | |||
| 165 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); | ||
| 166 | } | ||
| 167 | |||
| 168 | static const struct of_device_id vt8500_irq_match[] __initconst = { | ||
| 169 | { .compatible = "via,vt8500-intc", .data = vt8500_irq_init, }, | ||
| 170 | { /* sentinel */ }, | ||
| 171 | }; | ||
| 172 | |||
| 173 | static void __init vt8500_init_irq(void) | ||
| 174 | { | ||
| 175 | of_irq_init(vt8500_irq_match); | ||
| 176 | }; | ||
| 177 | |||
| 178 | static struct sys_timer vt8500_timer = { | ||
| 179 | .init = vt8500_timer_init, | ||
| 180 | }; | ||
| 181 | |||
| 182 | static const char * const vt8500_dt_compat[] = { | ||
| 183 | "via,vt8500", | ||
| 184 | "wm,wm8650", | ||
| 185 | "wm,wm8505", | ||
| 186 | }; | ||
| 187 | |||
| 188 | DT_MACHINE_START(WMT_DT, "VIA/Wondermedia SoC (Device Tree Support)") | ||
| 189 | .dt_compat = vt8500_dt_compat, | ||
| 190 | .map_io = vt8500_map_io, | ||
| 191 | .init_irq = vt8500_init_irq, | ||
| 192 | .timer = &vt8500_timer, | ||
| 193 | .init_machine = vt8500_init, | ||
| 194 | .restart = vt8500_restart, | ||
| 195 | MACHINE_END | ||
| 196 | |||
diff --git a/arch/arm/mach-vt8500/wm8505_7in.c b/arch/arm/mach-vt8500/wm8505_7in.c deleted file mode 100644 index db19886caf7c..000000000000 --- a/arch/arm/mach-vt8500/wm8505_7in.c +++ /dev/null | |||
| @@ -1,79 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * arch/arm/mach-vt8500/wm8505_7in.c | ||
| 3 | * | ||
| 4 | * Copyright (C) 2010 Alexey Charkov <alchark@gmail.com> | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License as published by | ||
| 8 | * the Free Software Foundation; either version 2 of the License, or | ||
| 9 | * (at your option) any later version. | ||
| 10 | * | ||
| 11 | * This program is distributed in the hope that it will be useful, | ||
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | * GNU General Public License for more details. | ||
| 15 | * | ||
| 16 | * You should have received a copy of the GNU General Public License | ||
| 17 | * along with this program; if not, write to the Free Software | ||
| 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
| 19 | */ | ||
| 20 | |||
| 21 | #include <linux/io.h> | ||
| 22 | #include <linux/pm.h> | ||
| 23 | |||
| 24 | #include <asm/mach-types.h> | ||
| 25 | #include <asm/mach/arch.h> | ||
| 26 | #include <mach/restart.h> | ||
| 27 | |||
| 28 | #include "devices.h" | ||
| 29 | |||
| 30 | static void __iomem *pmc_hiber; | ||
| 31 | |||
| 32 | static struct platform_device *devices[] __initdata = { | ||
| 33 | &vt8500_device_uart0, | ||
| 34 | &vt8500_device_ehci, | ||
| 35 | &vt8500_device_wm8505_fb, | ||
| 36 | &vt8500_device_ge_rops, | ||
| 37 | &vt8500_device_pwm, | ||
| 38 | &vt8500_device_pwmbl, | ||
| 39 | &vt8500_device_rtc, | ||
| 40 | }; | ||
| 41 | |||
| 42 | static void vt8500_power_off(void) | ||
| 43 | { | ||
| 44 | local_irq_disable(); | ||
| 45 | writew(5, pmc_hiber); | ||
| 46 | asm("mcr%? p15, 0, %0, c7, c0, 4" : : "r" (0)); | ||
| 47 | } | ||
| 48 | |||
| 49 | void __init wm8505_7in_init(void) | ||
| 50 | { | ||
| 51 | #ifdef CONFIG_FB_WM8505 | ||
| 52 | void __iomem *gpio_mux_reg = ioremap(wmt_gpio_base + 0x200, 4); | ||
| 53 | if (gpio_mux_reg) { | ||
| 54 | writel(readl(gpio_mux_reg) | 0x80000000, gpio_mux_reg); | ||
| 55 | iounmap(gpio_mux_reg); | ||
| 56 | } else { | ||
| 57 | printk(KERN_ERR "Could not remap the GPIO mux register, display may not work properly!\n"); | ||
| 58 | } | ||
| 59 | #endif | ||
| 60 | pmc_hiber = ioremap(wmt_pmc_base + 0x12, 2); | ||
| 61 | if (pmc_hiber) | ||
| 62 | pm_power_off = &vt8500_power_off; | ||
| 63 | else | ||
| 64 | printk(KERN_ERR "PMC Hibernation register could not be remapped, not enabling power off!\n"); | ||
| 65 | wmt_setup_restart(); | ||
| 66 | wm8505_set_resources(); | ||
| 67 | platform_add_devices(devices, ARRAY_SIZE(devices)); | ||
| 68 | vt8500_gpio_init(); | ||
| 69 | } | ||
| 70 | |||
| 71 | MACHINE_START(WM8505_7IN_NETBOOK, "WM8505 7-inch generic netbook") | ||
| 72 | .atag_offset = 0x100, | ||
| 73 | .restart = wmt_restart, | ||
| 74 | .reserve = wm8505_reserve_mem, | ||
| 75 | .map_io = wm8505_map_io, | ||
| 76 | .init_irq = wm8505_init_irq, | ||
| 77 | .timer = &vt8500_timer, | ||
| 78 | .init_machine = wm8505_7in_init, | ||
| 79 | MACHINE_END | ||
diff --git a/arch/arm/mm/cache-tauros2.c b/arch/arm/mm/cache-tauros2.c index 23a7643e9a87..1be0f4e5e6eb 100644 --- a/arch/arm/mm/cache-tauros2.c +++ b/arch/arm/mm/cache-tauros2.c | |||
| @@ -15,8 +15,11 @@ | |||
| 15 | */ | 15 | */ |
| 16 | 16 | ||
| 17 | #include <linux/init.h> | 17 | #include <linux/init.h> |
| 18 | #include <linux/of.h> | ||
| 19 | #include <linux/of_address.h> | ||
| 18 | #include <asm/cacheflush.h> | 20 | #include <asm/cacheflush.h> |
| 19 | #include <asm/cp15.h> | 21 | #include <asm/cp15.h> |
| 22 | #include <asm/cputype.h> | ||
| 20 | #include <asm/hardware/cache-tauros2.h> | 23 | #include <asm/hardware/cache-tauros2.h> |
| 21 | 24 | ||
| 22 | 25 | ||
| @@ -144,25 +147,8 @@ static inline void __init write_extra_features(u32 u) | |||
| 144 | __asm__("mcr p15, 1, %0, c15, c1, 0" : : "r" (u)); | 147 | __asm__("mcr p15, 1, %0, c15, c1, 0" : : "r" (u)); |
| 145 | } | 148 | } |
| 146 | 149 | ||
| 147 | static void __init disable_l2_prefetch(void) | ||
| 148 | { | ||
| 149 | u32 u; | ||
| 150 | |||
| 151 | /* | ||
| 152 | * Read the CPU Extra Features register and verify that the | ||
| 153 | * Disable L2 Prefetch bit is set. | ||
| 154 | */ | ||
| 155 | u = read_extra_features(); | ||
| 156 | if (!(u & 0x01000000)) { | ||
| 157 | printk(KERN_INFO "Tauros2: Disabling L2 prefetch.\n"); | ||
| 158 | write_extra_features(u | 0x01000000); | ||
| 159 | } | ||
| 160 | } | ||
| 161 | |||
| 162 | static inline int __init cpuid_scheme(void) | 150 | static inline int __init cpuid_scheme(void) |
| 163 | { | 151 | { |
| 164 | extern int processor_id; | ||
| 165 | |||
| 166 | return !!((processor_id & 0x000f0000) == 0x000f0000); | 152 | return !!((processor_id & 0x000f0000) == 0x000f0000); |
| 167 | } | 153 | } |
| 168 | 154 | ||
| @@ -189,12 +175,36 @@ static inline void __init write_actlr(u32 actlr) | |||
| 189 | __asm__("mcr p15, 0, %0, c1, c0, 1\n" : : "r" (actlr)); | 175 | __asm__("mcr p15, 0, %0, c1, c0, 1\n" : : "r" (actlr)); |
| 190 | } | 176 | } |
| 191 | 177 | ||
| 192 | void __init tauros2_init(void) | 178 | static void enable_extra_feature(unsigned int features) |
| 179 | { | ||
| 180 | u32 u; | ||
| 181 | |||
| 182 | u = read_extra_features(); | ||
| 183 | |||
| 184 | if (features & CACHE_TAUROS2_PREFETCH_ON) | ||
| 185 | u &= ~0x01000000; | ||
| 186 | else | ||
| 187 | u |= 0x01000000; | ||
| 188 | printk(KERN_INFO "Tauros2: %s L2 prefetch.\n", | ||
| 189 | (features & CACHE_TAUROS2_PREFETCH_ON) | ||
| 190 | ? "Enabling" : "Disabling"); | ||
| 191 | |||
| 192 | if (features & CACHE_TAUROS2_LINEFILL_BURST8) | ||
| 193 | u |= 0x00100000; | ||
| 194 | else | ||
| 195 | u &= ~0x00100000; | ||
| 196 | printk(KERN_INFO "Tauros2: %s line fill burt8.\n", | ||
| 197 | (features & CACHE_TAUROS2_LINEFILL_BURST8) | ||
| 198 | ? "Enabling" : "Disabling"); | ||
| 199 | |||
| 200 | write_extra_features(u); | ||
| 201 | } | ||
| 202 | |||
| 203 | static void __init tauros2_internal_init(unsigned int features) | ||
| 193 | { | 204 | { |
| 194 | extern int processor_id; | 205 | char *mode = NULL; |
| 195 | char *mode; | ||
| 196 | 206 | ||
| 197 | disable_l2_prefetch(); | 207 | enable_extra_feature(features); |
| 198 | 208 | ||
| 199 | #ifdef CONFIG_CPU_32v5 | 209 | #ifdef CONFIG_CPU_32v5 |
| 200 | if ((processor_id & 0xff0f0000) == 0x56050000) { | 210 | if ((processor_id & 0xff0f0000) == 0x56050000) { |
| @@ -286,3 +296,34 @@ void __init tauros2_init(void) | |||
| 286 | printk(KERN_INFO "Tauros2: L2 cache support initialised " | 296 | printk(KERN_INFO "Tauros2: L2 cache support initialised " |
| 287 | "in %s mode.\n", mode); | 297 | "in %s mode.\n", mode); |
| 288 | } | 298 | } |
| 299 | |||
| 300 | #ifdef CONFIG_OF | ||
| 301 | static const struct of_device_id tauros2_ids[] __initconst = { | ||
| 302 | { .compatible = "marvell,tauros2-cache"}, | ||
| 303 | {} | ||
| 304 | }; | ||
| 305 | #endif | ||
| 306 | |||
| 307 | void __init tauros2_init(unsigned int features) | ||
| 308 | { | ||
| 309 | #ifdef CONFIG_OF | ||
| 310 | struct device_node *node; | ||
| 311 | int ret; | ||
| 312 | unsigned int f; | ||
| 313 | |||
| 314 | node = of_find_matching_node(NULL, tauros2_ids); | ||
| 315 | if (!node) { | ||
| 316 | pr_info("Not found marvell,tauros2-cache, disable it\n"); | ||
| 317 | return; | ||
| 318 | } | ||
| 319 | |||
| 320 | ret = of_property_read_u32(node, "marvell,tauros2-cache-features", &f); | ||
| 321 | if (ret) { | ||
| 322 | pr_info("Not found marvell,tauros-cache-features property, " | ||
| 323 | "disable extra features\n"); | ||
| 324 | features = 0; | ||
| 325 | } else | ||
| 326 | features = f; | ||
| 327 | #endif | ||
| 328 | tauros2_internal_init(features); | ||
| 329 | } | ||
diff --git a/arch/arm/plat-mxc/include/mach/common.h b/arch/arm/plat-mxc/include/mach/common.h index 7128e9710417..28ba09f4ebb9 100644 --- a/arch/arm/plat-mxc/include/mach/common.h +++ b/arch/arm/plat-mxc/include/mach/common.h | |||
| @@ -52,7 +52,6 @@ extern void imx31_soc_init(void); | |||
| 52 | extern void imx35_soc_init(void); | 52 | extern void imx35_soc_init(void); |
| 53 | extern void imx50_soc_init(void); | 53 | extern void imx50_soc_init(void); |
| 54 | extern void imx51_soc_init(void); | 54 | extern void imx51_soc_init(void); |
| 55 | extern void imx53_soc_init(void); | ||
| 56 | extern void imx51_init_late(void); | 55 | extern void imx51_init_late(void); |
| 57 | extern void imx53_init_late(void); | 56 | extern void imx53_init_late(void); |
| 58 | extern void epit_timer_init(void __iomem *base, int irq); | 57 | extern void epit_timer_init(void __iomem *base, int irq); |
| @@ -137,11 +136,6 @@ extern void imx_src_prepare_restart(void); | |||
| 137 | extern void imx_gpc_init(void); | 136 | extern void imx_gpc_init(void); |
| 138 | extern void imx_gpc_pre_suspend(void); | 137 | extern void imx_gpc_pre_suspend(void); |
| 139 | extern void imx_gpc_post_resume(void); | 138 | extern void imx_gpc_post_resume(void); |
| 140 | extern void imx51_babbage_common_init(void); | ||
| 141 | extern void imx53_ard_common_init(void); | ||
| 142 | extern void imx53_evk_common_init(void); | ||
| 143 | extern void imx53_qsb_common_init(void); | ||
| 144 | extern void imx53_smd_common_init(void); | ||
| 145 | extern int imx6q_set_lpm(enum mxc_cpu_pwr_mode mode); | 139 | extern int imx6q_set_lpm(enum mxc_cpu_pwr_mode mode); |
| 146 | extern void imx6q_clock_map_io(void); | 140 | extern void imx6q_clock_map_io(void); |
| 147 | 141 | ||
diff --git a/arch/arm/plat-mxc/include/mach/iomux-mx53.h b/arch/arm/plat-mxc/include/mach/iomux-mx53.h deleted file mode 100644 index 9761e003bde2..000000000000 --- a/arch/arm/plat-mxc/include/mach/iomux-mx53.h +++ /dev/null | |||
| @@ -1,1219 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2010-2011 Freescale Semiconductor, Inc. All Rights Reserved. | ||
| 3 | * | ||
| 4 | * This program is free software; you can redistribute it and/or modify | ||
| 5 | * it under the terms of the GNU General Public License as published by | ||
| 6 | * the Free Software Foundation; either version 2 of the License, or | ||
| 7 | * (at your option) any later version. | ||
| 8 | * | ||
| 9 | * This program is distributed in the hope that it will be useful, | ||
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | * GNU General Public License for more details. | ||
| 13 | * | ||
| 14 | * You should have received a copy of the GNU General Public License along | ||
| 15 | * with this program; if not, write to the Free Software Foundation, Inc.. | ||
| 16 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
| 17 | */ | ||
| 18 | |||
| 19 | #ifndef __MACH_IOMUX_MX53_H__ | ||
| 20 | #define __MACH_IOMUX_MX53_H__ | ||
| 21 | |||
| 22 | #include <mach/iomux-v3.h> | ||
| 23 | |||
| 24 | /* These 2 defines are for pins that may not have a mux register, but could | ||
| 25 | * have a pad setting register, and vice-versa. */ | ||
| 26 | #define __NA_ 0x00 | ||
| 27 | |||
| 28 | #define MX53_UART_PAD_CTRL (PAD_CTL_PKE | PAD_CTL_PUE | \ | ||
| 29 | PAD_CTL_DSE_HIGH | PAD_CTL_SRE_FAST | PAD_CTL_HYS) | ||
| 30 | #define MX53_SDHC_PAD_CTRL (PAD_CTL_HYS | PAD_CTL_PKE | PAD_CTL_PUE | \ | ||
| 31 | PAD_CTL_PUS_47K_UP | PAD_CTL_DSE_HIGH | \ | ||
| 32 | PAD_CTL_SRE_FAST) | ||
| 33 | |||
| 34 | |||
| 35 | #define MX53_PAD_GPIO_19__KPP_COL_5 IOMUX_PAD(0x348, 0x020, 0, 0x840, 0, NO_PAD_CTRL) | ||
| 36 | #define MX53_PAD_GPIO_19__GPIO4_5 IOMUX_PAD(0x348, 0x020, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 37 | #define MX53_PAD_GPIO_19__CCM_CLKO IOMUX_PAD(0x348, 0x020, 2, __NA_, 0, NO_PAD_CTRL) | ||
| 38 | #define MX53_PAD_GPIO_19__SPDIF_OUT1 IOMUX_PAD(0x348, 0x020, 3, __NA_, 0, NO_PAD_CTRL) | ||
| 39 | #define MX53_PAD_GPIO_19__RTC_CE_RTC_EXT_TRIG2 IOMUX_PAD(0x348, 0x020, 4, __NA_, 0, NO_PAD_CTRL) | ||
| 40 | #define MX53_PAD_GPIO_19__ECSPI1_RDY IOMUX_PAD(0x348, 0x020, 5, __NA_, 0, NO_PAD_CTRL) | ||
| 41 | #define MX53_PAD_GPIO_19__FEC_TDATA_3 IOMUX_PAD(0x348, 0x020, 6, __NA_, 0, NO_PAD_CTRL) | ||
| 42 | #define MX53_PAD_GPIO_19__SRC_INT_BOOT IOMUX_PAD(0x348, 0x020, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 43 | #define MX53_PAD_KEY_COL0__KPP_COL_0 IOMUX_PAD(0x34C, 0x024, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 44 | #define MX53_PAD_KEY_COL0__GPIO4_6 IOMUX_PAD(0x34C, 0x024, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 45 | #define MX53_PAD_KEY_COL0__AUDMUX_AUD5_TXC IOMUX_PAD(0x34C, 0x024, 2, 0x758, 0, NO_PAD_CTRL) | ||
| 46 | #define MX53_PAD_KEY_COL0__UART4_TXD_MUX IOMUX_PAD(0x34C, 0x024, 4, __NA_, 0, MX53_UART_PAD_CTRL) | ||
| 47 | #define MX53_PAD_KEY_COL0__ECSPI1_SCLK IOMUX_PAD(0x34C, 0x024, 5, 0x79C, 0, NO_PAD_CTRL) | ||
| 48 | #define MX53_PAD_KEY_COL0__FEC_RDATA_3 IOMUX_PAD(0x34C, 0x024, 6, __NA_, 0, NO_PAD_CTRL) | ||
| 49 | #define MX53_PAD_KEY_COL0__SRC_ANY_PU_RST IOMUX_PAD(0x34C, 0x024, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 50 | #define MX53_PAD_KEY_ROW0__KPP_ROW_0 IOMUX_PAD(0x350, 0x028, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 51 | #define MX53_PAD_KEY_ROW0__GPIO4_7 IOMUX_PAD(0x350, 0x028, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 52 | #define MX53_PAD_KEY_ROW0__AUDMUX_AUD5_TXD IOMUX_PAD(0x350, 0x028, 2, 0x74C, 0, NO_PAD_CTRL) | ||
| 53 | #define MX53_PAD_KEY_ROW0__UART4_RXD_MUX IOMUX_PAD(0x350, 0x028, 4, 0x890, 1, MX53_UART_PAD_CTRL) | ||
| 54 | #define MX53_PAD_KEY_ROW0__ECSPI1_MOSI IOMUX_PAD(0x350, 0x028, 5, 0x7A4, 0, NO_PAD_CTRL) | ||
| 55 | #define MX53_PAD_KEY_ROW0__FEC_TX_ER IOMUX_PAD(0x350, 0x028, 6, __NA_, 0, NO_PAD_CTRL) | ||
| 56 | #define MX53_PAD_KEY_COL1__KPP_COL_1 IOMUX_PAD(0x354, 0x02C, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 57 | #define MX53_PAD_KEY_COL1__GPIO4_8 IOMUX_PAD(0x354, 0x02C, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 58 | #define MX53_PAD_KEY_COL1__AUDMUX_AUD5_TXFS IOMUX_PAD(0x354, 0x02C, 2, 0x75C, 0, NO_PAD_CTRL) | ||
| 59 | #define MX53_PAD_KEY_COL1__UART5_TXD_MUX IOMUX_PAD(0x354, 0x02C, 4, __NA_, 0, MX53_UART_PAD_CTRL) | ||
| 60 | #define MX53_PAD_KEY_COL1__ECSPI1_MISO IOMUX_PAD(0x354, 0x02C, 5, 0x7A0, 0, NO_PAD_CTRL) | ||
| 61 | #define MX53_PAD_KEY_COL1__FEC_RX_CLK IOMUX_PAD(0x354, 0x02C, 6, 0x808, 0, NO_PAD_CTRL) | ||
| 62 | #define MX53_PAD_KEY_COL1__USBPHY1_TXREADY IOMUX_PAD(0x354, 0x02C, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 63 | #define MX53_PAD_KEY_ROW1__KPP_ROW_1 IOMUX_PAD(0x358, 0x030, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 64 | #define MX53_PAD_KEY_ROW1__GPIO4_9 IOMUX_PAD(0x358, 0x030, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 65 | #define MX53_PAD_KEY_ROW1__AUDMUX_AUD5_RXD IOMUX_PAD(0x358, 0x030, 2, 0x748, 0, NO_PAD_CTRL) | ||
| 66 | #define MX53_PAD_KEY_ROW1__UART5_RXD_MUX IOMUX_PAD(0x358, 0x030, 4, 0x898, 1, MX53_UART_PAD_CTRL) | ||
| 67 | #define MX53_PAD_KEY_ROW1__ECSPI1_SS0 IOMUX_PAD(0x358, 0x030, 5, 0x7A8, 0, NO_PAD_CTRL) | ||
| 68 | #define MX53_PAD_KEY_ROW1__FEC_COL IOMUX_PAD(0x358, 0x030, 6, 0x800, 0, NO_PAD_CTRL) | ||
| 69 | #define MX53_PAD_KEY_ROW1__USBPHY1_RXVALID IOMUX_PAD(0x358, 0x030, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 70 | #define MX53_PAD_KEY_COL2__KPP_COL_2 IOMUX_PAD(0x35C, 0x034, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 71 | #define MX53_PAD_KEY_COL2__GPIO4_10 IOMUX_PAD(0x35C, 0x034, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 72 | #define MX53_PAD_KEY_COL2__CAN1_TXCAN IOMUX_PAD(0x35C, 0x034, 2, __NA_, 0, NO_PAD_CTRL) | ||
| 73 | #define MX53_PAD_KEY_COL2__FEC_MDIO IOMUX_PAD(0x35C, 0x034, 4, 0x804, 0, NO_PAD_CTRL) | ||
| 74 | #define MX53_PAD_KEY_COL2__ECSPI1_SS1 IOMUX_PAD(0x35C, 0x034, 5, 0x7AC, 0, NO_PAD_CTRL) | ||
| 75 | #define MX53_PAD_KEY_COL2__FEC_RDATA_2 IOMUX_PAD(0x35C, 0x034, 6, __NA_, 0, NO_PAD_CTRL) | ||
| 76 | #define MX53_PAD_KEY_COL2__USBPHY1_RXACTIVE IOMUX_PAD(0x35C, 0x034, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 77 | #define MX53_PAD_KEY_ROW2__KPP_ROW_2 IOMUX_PAD(0x360, 0x038, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 78 | #define MX53_PAD_KEY_ROW2__GPIO4_11 IOMUX_PAD(0x360, 0x038, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 79 | #define MX53_PAD_KEY_ROW2__CAN1_RXCAN IOMUX_PAD(0x360, 0x038, 2, 0x760, 0, NO_PAD_CTRL) | ||
| 80 | #define MX53_PAD_KEY_ROW2__FEC_MDC IOMUX_PAD(0x360, 0x038, 4, __NA_, 0, NO_PAD_CTRL) | ||
| 81 | #define MX53_PAD_KEY_ROW2__ECSPI1_SS2 IOMUX_PAD(0x360, 0x038, 5, 0x7B0, 0, NO_PAD_CTRL) | ||
| 82 | #define MX53_PAD_KEY_ROW2__FEC_TDATA_2 IOMUX_PAD(0x360, 0x038, 6, __NA_, 0, NO_PAD_CTRL) | ||
| 83 | #define MX53_PAD_KEY_ROW2__USBPHY1_RXERROR IOMUX_PAD(0x360, 0x038, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 84 | #define MX53_PAD_KEY_COL3__KPP_COL_3 IOMUX_PAD(0x364, 0x03C, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 85 | #define MX53_PAD_KEY_COL3__GPIO4_12 IOMUX_PAD(0x364, 0x03C, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 86 | #define MX53_PAD_KEY_COL3__USBOH3_H2_DP IOMUX_PAD(0x364, 0x03C, 2, __NA_, 0, NO_PAD_CTRL) | ||
| 87 | #define MX53_PAD_KEY_COL3__SPDIF_IN1 IOMUX_PAD(0x364, 0x03C, 3, 0x870, 0, NO_PAD_CTRL) | ||
| 88 | #define MX53_PAD_KEY_COL3__I2C2_SCL IOMUX_PAD(0x364, 0x03C, 4 | IOMUX_CONFIG_SION, 0x81C, 0, NO_PAD_CTRL) | ||
| 89 | #define MX53_PAD_KEY_COL3__ECSPI1_SS3 IOMUX_PAD(0x364, 0x03C, 5, 0x7B4, 0, NO_PAD_CTRL) | ||
| 90 | #define MX53_PAD_KEY_COL3__FEC_CRS IOMUX_PAD(0x364, 0x03C, 6, __NA_, 0, NO_PAD_CTRL) | ||
| 91 | #define MX53_PAD_KEY_COL3__USBPHY1_SIECLOCK IOMUX_PAD(0x364, 0x03C, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 92 | #define MX53_PAD_KEY_ROW3__KPP_ROW_3 IOMUX_PAD(0x368, 0x040, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 93 | #define MX53_PAD_KEY_ROW3__GPIO4_13 IOMUX_PAD(0x368, 0x040, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 94 | #define MX53_PAD_KEY_ROW3__USBOH3_H2_DM IOMUX_PAD(0x368, 0x040, 2, __NA_, 0, NO_PAD_CTRL) | ||
| 95 | #define MX53_PAD_KEY_ROW3__CCM_ASRC_EXT_CLK IOMUX_PAD(0x368, 0x040, 3, 0x768, 0, NO_PAD_CTRL) | ||
| 96 | #define MX53_PAD_KEY_ROW3__I2C2_SDA IOMUX_PAD(0x368, 0x040, 4 | IOMUX_CONFIG_SION, 0x820, 0, NO_PAD_CTRL) | ||
| 97 | #define MX53_PAD_KEY_ROW3__OSC32K_32K_OUT IOMUX_PAD(0x368, 0x040, 5, __NA_, 0, NO_PAD_CTRL) | ||
| 98 | #define MX53_PAD_KEY_ROW3__CCM_PLL4_BYP IOMUX_PAD(0x368, 0x040, 6, 0x77C, 0, NO_PAD_CTRL) | ||
| 99 | #define MX53_PAD_KEY_ROW3__USBPHY1_LINESTATE_0 IOMUX_PAD(0x368, 0x040, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 100 | #define MX53_PAD_KEY_COL4__KPP_COL_4 IOMUX_PAD(0x36C, 0x044, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 101 | #define MX53_PAD_KEY_COL4__GPIO4_14 IOMUX_PAD(0x36C, 0x044, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 102 | #define MX53_PAD_KEY_COL4__CAN2_TXCAN IOMUX_PAD(0x36C, 0x044, 2, __NA_, 0, NO_PAD_CTRL) | ||
| 103 | #define MX53_PAD_KEY_COL4__IPU_SISG_4 IOMUX_PAD(0x36C, 0x044, 3, __NA_, 0, NO_PAD_CTRL) | ||
| 104 | #define MX53_PAD_KEY_COL4__UART5_RTS IOMUX_PAD(0x36C, 0x044, 4, 0x894, 0, MX53_UART_PAD_CTRL) | ||
| 105 | #define MX53_PAD_KEY_COL4__USBOH3_USBOTG_OC IOMUX_PAD(0x36C, 0x044, 5, 0x89C, 0, NO_PAD_CTRL) | ||
| 106 | #define MX53_PAD_KEY_COL4__USBPHY1_LINESTATE_1 IOMUX_PAD(0x36C, 0x044, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 107 | #define MX53_PAD_KEY_ROW4__KPP_ROW_4 IOMUX_PAD(0x370, 0x048, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 108 | #define MX53_PAD_KEY_ROW4__GPIO4_15 IOMUX_PAD(0x370, 0x048, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 109 | #define MX53_PAD_KEY_ROW4__CAN2_RXCAN IOMUX_PAD(0x370, 0x048, 2, 0x764, 0, NO_PAD_CTRL) | ||
| 110 | #define MX53_PAD_KEY_ROW4__IPU_SISG_5 IOMUX_PAD(0x370, 0x048, 3, __NA_, 0, NO_PAD_CTRL) | ||
| 111 | #define MX53_PAD_KEY_ROW4__UART5_CTS IOMUX_PAD(0x370, 0x048, 4, __NA_, 0, MX53_UART_PAD_CTRL) | ||
| 112 | #define MX53_PAD_KEY_ROW4__USBOH3_USBOTG_PWR IOMUX_PAD(0x370, 0x048, 5, __NA_, 0, NO_PAD_CTRL) | ||
| 113 | #define MX53_PAD_KEY_ROW4__USBPHY1_VBUSVALID IOMUX_PAD(0x370, 0x048, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 114 | #define MX53_PAD_DI0_DISP_CLK__IPU_DI0_DISP_CLK IOMUX_PAD(0x378, 0x04C, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 115 | #define MX53_PAD_DI0_DISP_CLK__GPIO4_16 IOMUX_PAD(0x378, 0x04C, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 116 | #define MX53_PAD_DI0_DISP_CLK__USBOH3_USBH2_DIR IOMUX_PAD(0x378, 0x04C, 2, __NA_, 0, NO_PAD_CTRL) | ||
| 117 | #define MX53_PAD_DI0_DISP_CLK__SDMA_DEBUG_CORE_STATE_0 IOMUX_PAD(0x378, 0x04C, 5, __NA_, 0, NO_PAD_CTRL) | ||
| 118 | #define MX53_PAD_DI0_DISP_CLK__EMI_EMI_DEBUG_0 IOMUX_PAD(0x378, 0x04C, 6, __NA_, 0, NO_PAD_CTRL) | ||
| 119 | #define MX53_PAD_DI0_DISP_CLK__USBPHY1_AVALID IOMUX_PAD(0x378, 0x04C, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 120 | #define MX53_PAD_DI0_PIN15__IPU_DI0_PIN15 IOMUX_PAD(0x37C, 0x050, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 121 | #define MX53_PAD_DI0_PIN15__GPIO4_17 IOMUX_PAD(0x37C, 0x050, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 122 | #define MX53_PAD_DI0_PIN15__AUDMUX_AUD6_TXC IOMUX_PAD(0x37C, 0x050, 2, __NA_, 0, NO_PAD_CTRL) | ||
| 123 | #define MX53_PAD_DI0_PIN15__SDMA_DEBUG_CORE_STATE_1 IOMUX_PAD(0x37C, 0x050, 5, __NA_, 0, NO_PAD_CTRL) | ||
| 124 | #define MX53_PAD_DI0_PIN15__EMI_EMI_DEBUG_1 IOMUX_PAD(0x37C, 0x050, 6, __NA_, 0, NO_PAD_CTRL) | ||
| 125 | #define MX53_PAD_DI0_PIN15__USBPHY1_BVALID IOMUX_PAD(0x37C, 0x050, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 126 | #define MX53_PAD_DI0_PIN2__IPU_DI0_PIN2 IOMUX_PAD(0x380, 0x054, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 127 | #define MX53_PAD_DI0_PIN2__GPIO4_18 IOMUX_PAD(0x380, 0x054, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 128 | #define MX53_PAD_DI0_PIN2__AUDMUX_AUD6_TXD IOMUX_PAD(0x380, 0x054, 2, __NA_, 0, NO_PAD_CTRL) | ||
| 129 | #define MX53_PAD_DI0_PIN2__SDMA_DEBUG_CORE_STATE_2 IOMUX_PAD(0x380, 0x054, 5, __NA_, 0, NO_PAD_CTRL) | ||
| 130 | #define MX53_PAD_DI0_PIN2__EMI_EMI_DEBUG_2 IOMUX_PAD(0x380, 0x054, 6, __NA_, 0, NO_PAD_CTRL) | ||
| 131 | #define MX53_PAD_DI0_PIN2__USBPHY1_ENDSESSION IOMUX_PAD(0x380, 0x054, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 132 | #define MX53_PAD_DI0_PIN3__IPU_DI0_PIN3 IOMUX_PAD(0x384, 0x058, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 133 | #define MX53_PAD_DI0_PIN3__GPIO4_19 IOMUX_PAD(0x384, 0x058, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 134 | #define MX53_PAD_DI0_PIN3__AUDMUX_AUD6_TXFS IOMUX_PAD(0x384, 0x058, 2, __NA_, 0, NO_PAD_CTRL) | ||
| 135 | #define MX53_PAD_DI0_PIN3__SDMA_DEBUG_CORE_STATE_3 IOMUX_PAD(0x384, 0x058, 5, __NA_, 0, NO_PAD_CTRL) | ||
| 136 | #define MX53_PAD_DI0_PIN3__EMI_EMI_DEBUG_3 IOMUX_PAD(0x384, 0x058, 6, __NA_, 0, NO_PAD_CTRL) | ||
| 137 | #define MX53_PAD_DI0_PIN3__USBPHY1_IDDIG IOMUX_PAD(0x384, 0x058, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 138 | #define MX53_PAD_DI0_PIN4__IPU_DI0_PIN4 IOMUX_PAD(0x388, 0x05C, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 139 | #define MX53_PAD_DI0_PIN4__GPIO4_20 IOMUX_PAD(0x388, 0x05C, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 140 | #define MX53_PAD_DI0_PIN4__AUDMUX_AUD6_RXD IOMUX_PAD(0x388, 0x05C, 2, __NA_, 0, NO_PAD_CTRL) | ||
| 141 | #define MX53_PAD_DI0_PIN4__ESDHC1_WP IOMUX_PAD(0x388, 0x05C, 3, 0x7FC, 0, NO_PAD_CTRL) | ||
| 142 | #define MX53_PAD_DI0_PIN4__SDMA_DEBUG_YIELD IOMUX_PAD(0x388, 0x05C, 5, __NA_, 0, NO_PAD_CTRL) | ||
| 143 | #define MX53_PAD_DI0_PIN4__EMI_EMI_DEBUG_4 IOMUX_PAD(0x388, 0x05C, 6, __NA_, 0, NO_PAD_CTRL) | ||
| 144 | #define MX53_PAD_DI0_PIN4__USBPHY1_HOSTDISCONNECT IOMUX_PAD(0x388, 0x05C, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 145 | #define MX53_PAD_DISP0_DAT0__IPU_DISP0_DAT_0 IOMUX_PAD(0x38C, 0x060, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 146 | #define MX53_PAD_DISP0_DAT0__GPIO4_21 IOMUX_PAD(0x38C, 0x060, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 147 | #define MX53_PAD_DISP0_DAT0__CSPI_SCLK IOMUX_PAD(0x38C, 0x060, 2, 0x780, 0, NO_PAD_CTRL) | ||
| 148 | #define MX53_PAD_DISP0_DAT0__USBOH3_USBH2_DATA_0 IOMUX_PAD(0x38C, 0x060, 3, __NA_, 0, NO_PAD_CTRL) | ||
| 149 | #define MX53_PAD_DISP0_DAT0__SDMA_DEBUG_CORE_RUN IOMUX_PAD(0x38C, 0x060, 5, __NA_, 0, NO_PAD_CTRL) | ||
| 150 | #define MX53_PAD_DISP0_DAT0__EMI_EMI_DEBUG_5 IOMUX_PAD(0x38C, 0x060, 6, __NA_, 0, NO_PAD_CTRL) | ||
| 151 | #define MX53_PAD_DISP0_DAT0__USBPHY2_TXREADY IOMUX_PAD(0x38C, 0x060, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 152 | #define MX53_PAD_DISP0_DAT1__IPU_DISP0_DAT_1 IOMUX_PAD(0x390, 0x064, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 153 | #define MX53_PAD_DISP0_DAT1__GPIO4_22 IOMUX_PAD(0x390, 0x064, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 154 | #define MX53_PAD_DISP0_DAT1__CSPI_MOSI IOMUX_PAD(0x390, 0x064, 2, 0x788, 0, NO_PAD_CTRL) | ||
| 155 | #define MX53_PAD_DISP0_DAT1__USBOH3_USBH2_DATA_1 IOMUX_PAD(0x390, 0x064, 3, __NA_, 0, NO_PAD_CTRL) | ||
| 156 | #define MX53_PAD_DISP0_DAT1__SDMA_DEBUG_EVENT_CHANNEL_SEL \ | ||
| 157 | IOMUX_PAD(0x390, 0x064, 5, __NA_, 0, NO_PAD_CTRL) | ||
| 158 | #define MX53_PAD_DISP0_DAT1__EMI_EMI_DEBUG_6 IOMUX_PAD(0x390, 0x064, 6, __NA_, 0, NO_PAD_CTRL) | ||
| 159 | #define MX53_PAD_DISP0_DAT1__USBPHY2_RXVALID IOMUX_PAD(0x390, 0x064, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 160 | #define MX53_PAD_DISP0_DAT2__IPU_DISP0_DAT_2 IOMUX_PAD(0x394, 0x068, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 161 | #define MX53_PAD_DISP0_DAT2__GPIO4_23 IOMUX_PAD(0x394, 0x068, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 162 | #define MX53_PAD_DISP0_DAT2__CSPI_MISO IOMUX_PAD(0x394, 0x068, 2, 0x784, 0, NO_PAD_CTRL) | ||
| 163 | #define MX53_PAD_DISP0_DAT2__USBOH3_USBH2_DATA_2 IOMUX_PAD(0x394, 0x068, 3, __NA_, 0, NO_PAD_CTRL) | ||
| 164 | #define MX53_PAD_DISP0_DAT2__SDMA_DEBUG_MODE IOMUX_PAD(0x394, 0x068, 5, __NA_, 0, NO_PAD_CTRL) | ||
| 165 | #define MX53_PAD_DISP0_DAT2__EMI_EMI_DEBUG_7 IOMUX_PAD(0x394, 0x068, 6, __NA_, 0, NO_PAD_CTRL) | ||
| 166 | #define MX53_PAD_DISP0_DAT2__USBPHY2_RXACTIVE IOMUX_PAD(0x394, 0x068, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 167 | #define MX53_PAD_DISP0_DAT3__IPU_DISP0_DAT_3 IOMUX_PAD(0x398, 0x06C, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 168 | #define MX53_PAD_DISP0_DAT3__GPIO4_24 IOMUX_PAD(0x398, 0x06C, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 169 | #define MX53_PAD_DISP0_DAT3__CSPI_SS0 IOMUX_PAD(0x398, 0x06C, 2, 0x78C, 0, NO_PAD_CTRL) | ||
| 170 | #define MX53_PAD_DISP0_DAT3__USBOH3_USBH2_DATA_3 IOMUX_PAD(0x398, 0x06C, 3, __NA_, 0, NO_PAD_CTRL) | ||
| 171 | #define MX53_PAD_DISP0_DAT3__SDMA_DEBUG_BUS_ERROR IOMUX_PAD(0x398, 0x06C, 5, __NA_, 0, NO_PAD_CTRL) | ||
| 172 | #define MX53_PAD_DISP0_DAT3__EMI_EMI_DEBUG_8 IOMUX_PAD(0x398, 0x06C, 6, __NA_, 0, NO_PAD_CTRL) | ||
| 173 | #define MX53_PAD_DISP0_DAT3__USBPHY2_RXERROR IOMUX_PAD(0x398, 0x06C, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 174 | #define MX53_PAD_DISP0_DAT4__IPU_DISP0_DAT_4 IOMUX_PAD(0x39C, 0x070, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 175 | #define MX53_PAD_DISP0_DAT4__GPIO4_25 IOMUX_PAD(0x39C, 0x070, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 176 | #define MX53_PAD_DISP0_DAT4__CSPI_SS1 IOMUX_PAD(0x39C, 0x070, 2, 0x790, 0, NO_PAD_CTRL) | ||
| 177 | #define MX53_PAD_DISP0_DAT4__USBOH3_USBH2_DATA_4 IOMUX_PAD(0x39C, 0x070, 3, __NA_, 0, NO_PAD_CTRL) | ||
| 178 | #define MX53_PAD_DISP0_DAT4__SDMA_DEBUG_BUS_RWB IOMUX_PAD(0x39C, 0x070, 5, __NA_, 0, NO_PAD_CTRL) | ||
| 179 | #define MX53_PAD_DISP0_DAT4__EMI_EMI_DEBUG_9 IOMUX_PAD(0x39C, 0x070, 6, __NA_, 0, NO_PAD_CTRL) | ||
| 180 | #define MX53_PAD_DISP0_DAT4__USBPHY2_SIECLOCK IOMUX_PAD(0x39C, 0x070, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 181 | #define MX53_PAD_DISP0_DAT5__IPU_DISP0_DAT_5 IOMUX_PAD(0x3A0, 0x074, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 182 | #define MX53_PAD_DISP0_DAT5__GPIO4_26 IOMUX_PAD(0x3A0, 0x074, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 183 | #define MX53_PAD_DISP0_DAT5__CSPI_SS2 IOMUX_PAD(0x3A0, 0x074, 2, 0x794, 0, NO_PAD_CTRL) | ||
| 184 | #define MX53_PAD_DISP0_DAT5__USBOH3_USBH2_DATA_5 IOMUX_PAD(0x3A0, 0x074, 3, __NA_, 0, NO_PAD_CTRL) | ||
| 185 | #define MX53_PAD_DISP0_DAT5__SDMA_DEBUG_MATCHED_DMBUS IOMUX_PAD(0x3A0, 0x074, 5, __NA_, 0, NO_PAD_CTRL) | ||
| 186 | #define MX53_PAD_DISP0_DAT5__EMI_EMI_DEBUG_10 IOMUX_PAD(0x3A0, 0x074, 6, __NA_, 0, NO_PAD_CTRL) | ||
| 187 | #define MX53_PAD_DISP0_DAT5__USBPHY2_LINESTATE_0 IOMUX_PAD(0x3A0, 0x074, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 188 | #define MX53_PAD_DISP0_DAT6__IPU_DISP0_DAT_6 IOMUX_PAD(0x3A4, 0x078, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 189 | #define MX53_PAD_DISP0_DAT6__GPIO4_27 IOMUX_PAD(0x3A4, 0x078, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 190 | #define MX53_PAD_DISP0_DAT6__CSPI_SS3 IOMUX_PAD(0x3A4, 0x078, 2, 0x798, 0, NO_PAD_CTRL) | ||
| 191 | #define MX53_PAD_DISP0_DAT6__USBOH3_USBH2_DATA_6 IOMUX_PAD(0x3A4, 0x078, 3, __NA_, 0, NO_PAD_CTRL) | ||
| 192 | #define MX53_PAD_DISP0_DAT6__SDMA_DEBUG_RTBUFFER_WRITE IOMUX_PAD(0x3A4, 0x078, 5, __NA_, 0, NO_PAD_CTRL) | ||
| 193 | #define MX53_PAD_DISP0_DAT6__EMI_EMI_DEBUG_11 IOMUX_PAD(0x3A4, 0x078, 6, __NA_, 0, NO_PAD_CTRL) | ||
| 194 | #define MX53_PAD_DISP0_DAT6__USBPHY2_LINESTATE_1 IOMUX_PAD(0x3A4, 0x078, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 195 | #define MX53_PAD_DISP0_DAT7__IPU_DISP0_DAT_7 IOMUX_PAD(0x3A8, 0x07C, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 196 | #define MX53_PAD_DISP0_DAT7__GPIO4_28 IOMUX_PAD(0x3A8, 0x07C, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 197 | #define MX53_PAD_DISP0_DAT7__CSPI_RDY IOMUX_PAD(0x3A8, 0x07C, 2, __NA_, 0, NO_PAD_CTRL) | ||
| 198 | #define MX53_PAD_DISP0_DAT7__USBOH3_USBH2_DATA_7 IOMUX_PAD(0x3A8, 0x07C, 3, __NA_, 0, NO_PAD_CTRL) | ||
| 199 | #define MX53_PAD_DISP0_DAT7__SDMA_DEBUG_EVENT_CHANNEL_0 IOMUX_PAD(0x3A8, 0x07C, 5, __NA_, 0, NO_PAD_CTRL) | ||
| 200 | #define MX53_PAD_DISP0_DAT7__EMI_EMI_DEBUG_12 IOMUX_PAD(0x3A8, 0x07C, 6, __NA_, 0, NO_PAD_CTRL) | ||
| 201 | #define MX53_PAD_DISP0_DAT7__USBPHY2_VBUSVALID IOMUX_PAD(0x3A8, 0x07C, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 202 | #define MX53_PAD_DISP0_DAT8__IPU_DISP0_DAT_8 IOMUX_PAD(0x3AC, 0x080, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 203 | #define MX53_PAD_DISP0_DAT8__GPIO4_29 IOMUX_PAD(0x3AC, 0x080, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 204 | #define MX53_PAD_DISP0_DAT8__PWM1_PWMO IOMUX_PAD(0x3AC, 0x080, 2, __NA_, 0, NO_PAD_CTRL) | ||
| 205 | #define MX53_PAD_DISP0_DAT8__WDOG1_WDOG_B IOMUX_PAD(0x3AC, 0x080, 3, __NA_, 0, NO_PAD_CTRL) | ||
| 206 | #define MX53_PAD_DISP0_DAT8__SDMA_DEBUG_EVENT_CHANNEL_1 IOMUX_PAD(0x3AC, 0x080, 5, __NA_, 0, NO_PAD_CTRL) | ||
| 207 | #define MX53_PAD_DISP0_DAT8__EMI_EMI_DEBUG_13 IOMUX_PAD(0x3AC, 0x080, 6, __NA_, 0, NO_PAD_CTRL) | ||
| 208 | #define MX53_PAD_DISP0_DAT8__USBPHY2_AVALID IOMUX_PAD(0x3AC, 0x080, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 209 | #define MX53_PAD_DISP0_DAT9__IPU_DISP0_DAT_9 IOMUX_PAD(0x3B0, 0x084, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 210 | #define MX53_PAD_DISP0_DAT9__GPIO4_30 IOMUX_PAD(0x3B0, 0x084, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 211 | #define MX53_PAD_DISP0_DAT9__PWM2_PWMO IOMUX_PAD(0x3B0, 0x084, 2, __NA_, 0, NO_PAD_CTRL) | ||
| 212 | #define MX53_PAD_DISP0_DAT9__WDOG2_WDOG_B IOMUX_PAD(0x3B0, 0x084, 3, __NA_, 0, NO_PAD_CTRL) | ||
| 213 | #define MX53_PAD_DISP0_DAT9__SDMA_DEBUG_EVENT_CHANNEL_2 IOMUX_PAD(0x3B0, 0x084, 5, __NA_, 0, NO_PAD_CTRL) | ||
| 214 | #define MX53_PAD_DISP0_DAT9__EMI_EMI_DEBUG_14 IOMUX_PAD(0x3B0, 0x084, 6, __NA_, 0, NO_PAD_CTRL) | ||
| 215 | #define MX53_PAD_DISP0_DAT9__USBPHY2_VSTATUS_0 IOMUX_PAD(0x3B0, 0x084, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 216 | #define MX53_PAD_DISP0_DAT10__IPU_DISP0_DAT_10 IOMUX_PAD(0x3B4, 0x088, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 217 | #define MX53_PAD_DISP0_DAT10__GPIO4_31 IOMUX_PAD(0x3B4, 0x088, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 218 | #define MX53_PAD_DISP0_DAT10__USBOH3_USBH2_STP IOMUX_PAD(0x3B4, 0x088, 2, __NA_, 0, NO_PAD_CTRL) | ||
| 219 | #define MX53_PAD_DISP0_DAT10__SDMA_DEBUG_EVENT_CHANNEL_3 \ | ||
| 220 | IOMUX_PAD(0x3B4, 0x088, 5, __NA_, 0, NO_PAD_CTRL) | ||
| 221 | #define MX53_PAD_DISP0_DAT10__EMI_EMI_DEBUG_15 IOMUX_PAD(0x3B4, 0x088, 6, __NA_, 0, NO_PAD_CTRL) | ||
| 222 | #define MX53_PAD_DISP0_DAT10__USBPHY2_VSTATUS_1 IOMUX_PAD(0x3B4, 0x088, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 223 | #define MX53_PAD_DISP0_DAT11__IPU_DISP0_DAT_11 IOMUX_PAD(0x3B8, 0x08C, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 224 | #define MX53_PAD_DISP0_DAT11__GPIO5_5 IOMUX_PAD(0x3B8, 0x08C, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 225 | #define MX53_PAD_DISP0_DAT11__USBOH3_USBH2_NXT IOMUX_PAD(0x3B8, 0x08C, 2, __NA_, 0, NO_PAD_CTRL) | ||
| 226 | #define MX53_PAD_DISP0_DAT11__SDMA_DEBUG_EVENT_CHANNEL_4 \ | ||
| 227 | IOMUX_PAD(0x3B8, 0x08C, 5, __NA_, 0, NO_PAD_CTRL) | ||
| 228 | #define MX53_PAD_DISP0_DAT11__EMI_EMI_DEBUG_16 IOMUX_PAD(0x3B8, 0x08C, 6, __NA_, 0, NO_PAD_CTRL) | ||
| 229 | #define MX53_PAD_DISP0_DAT11__USBPHY2_VSTATUS_2 IOMUX_PAD(0x3B8, 0x08C, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 230 | #define MX53_PAD_DISP0_DAT12__IPU_DISP0_DAT_12 IOMUX_PAD(0x3BC, 0x090, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 231 | #define MX53_PAD_DISP0_DAT12__GPIO5_6 IOMUX_PAD(0x3BC, 0x090, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 232 | #define MX53_PAD_DISP0_DAT12__USBOH3_USBH2_CLK IOMUX_PAD(0x3BC, 0x090, 2, __NA_, 0, NO_PAD_CTRL) | ||
| 233 | #define MX53_PAD_DISP0_DAT12__SDMA_DEBUG_EVENT_CHANNEL_5 \ | ||
| 234 | IOMUX_PAD(0x3BC, 0x090, 5, __NA_, 0, NO_PAD_CTRL) | ||
| 235 | #define MX53_PAD_DISP0_DAT12__EMI_EMI_DEBUG_17 IOMUX_PAD(0x3BC, 0x090, 6, __NA_, 0, NO_PAD_CTRL) | ||
| 236 | #define MX53_PAD_DISP0_DAT12__USBPHY2_VSTATUS_3 IOMUX_PAD(0x3BC, 0x090, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 237 | #define MX53_PAD_DISP0_DAT13__IPU_DISP0_DAT_13 IOMUX_PAD(0x3C0, 0x094, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 238 | #define MX53_PAD_DISP0_DAT13__GPIO5_7 IOMUX_PAD(0x3C0, 0x094, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 239 | #define MX53_PAD_DISP0_DAT13__AUDMUX_AUD5_RXFS IOMUX_PAD(0x3C0, 0x094, 3, 0x754, 0, NO_PAD_CTRL) | ||
| 240 | #define MX53_PAD_DISP0_DAT13__SDMA_DEBUG_EVT_CHN_LINES_0 \ | ||
| 241 | IOMUX_PAD(0x3C0, 0x094, 5, __NA_, 0, NO_PAD_CTRL) | ||
| 242 | #define MX53_PAD_DISP0_DAT13__EMI_EMI_DEBUG_18 IOMUX_PAD(0x3C0, 0x094, 6, __NA_, 0, NO_PAD_CTRL) | ||
| 243 | #define MX53_PAD_DISP0_DAT13__USBPHY2_VSTATUS_4 IOMUX_PAD(0x3C0, 0x094, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 244 | #define MX53_PAD_DISP0_DAT14__IPU_DISP0_DAT_14 IOMUX_PAD(0x3C4, 0x098, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 245 | #define MX53_PAD_DISP0_DAT14__GPIO5_8 IOMUX_PAD(0x3C4, 0x098, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 246 | #define MX53_PAD_DISP0_DAT14__AUDMUX_AUD5_RXC IOMUX_PAD(0x3C4, 0x098, 3, 0x750, 0, NO_PAD_CTRL) | ||
| 247 | #define MX53_PAD_DISP0_DAT14__SDMA_DEBUG_EVT_CHN_LINES_1 \ | ||
| 248 | IOMUX_PAD(0x3C4, 0x098, 5, __NA_, 0, NO_PAD_CTRL) | ||
| 249 | #define MX53_PAD_DISP0_DAT14__EMI_EMI_DEBUG_19 IOMUX_PAD(0x3C4, 0x098, 6, __NA_, 0, NO_PAD_CTRL) | ||
| 250 | #define MX53_PAD_DISP0_DAT14__USBPHY2_VSTATUS_5 IOMUX_PAD(0x3C4, 0x098, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 251 | #define MX53_PAD_DISP0_DAT15__IPU_DISP0_DAT_15 IOMUX_PAD(0x3C8, 0x09C, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 252 | #define MX53_PAD_DISP0_DAT15__GPIO5_9 IOMUX_PAD(0x3C8, 0x09C, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 253 | #define MX53_PAD_DISP0_DAT15__ECSPI1_SS1 IOMUX_PAD(0x3C8, 0x09C, 2, 0x7AC, 1, NO_PAD_CTRL) | ||
| 254 | #define MX53_PAD_DISP0_DAT15__ECSPI2_SS1 IOMUX_PAD(0x3C8, 0x09C, 3, 0x7C8, 0, NO_PAD_CTRL) | ||
| 255 | #define MX53_PAD_DISP0_DAT15__SDMA_DEBUG_EVT_CHN_LINES_2 \ | ||
| 256 | IOMUX_PAD(0x3C8, 0x09C, 5, __NA_, 0, NO_PAD_CTRL) | ||
| 257 | #define MX53_PAD_DISP0_DAT15__EMI_EMI_DEBUG_20 IOMUX_PAD(0x3C8, 0x09C, 6, __NA_, 0, NO_PAD_CTRL) | ||
| 258 | #define MX53_PAD_DISP0_DAT15__USBPHY2_VSTATUS_6 IOMUX_PAD(0x3C8, 0x09C, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 259 | #define MX53_PAD_DISP0_DAT16__IPU_DISP0_DAT_16 IOMUX_PAD(0x3CC, 0x0A0, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 260 | #define MX53_PAD_DISP0_DAT16__GPIO5_10 IOMUX_PAD(0x3CC, 0x0A0, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 261 | #define MX53_PAD_DISP0_DAT16__ECSPI2_MOSI IOMUX_PAD(0x3CC, 0x0A0, 2, 0x7C0, 0, NO_PAD_CTRL) | ||
| 262 | #define MX53_PAD_DISP0_DAT16__AUDMUX_AUD5_TXC IOMUX_PAD(0x3CC, 0x0A0, 3, 0x758, 1, NO_PAD_CTRL) | ||
| 263 | #define MX53_PAD_DISP0_DAT16__SDMA_EXT_EVENT_0 IOMUX_PAD(0x3CC, 0x0A0, 4, 0x868, 0, NO_PAD_CTRL) | ||
| 264 | #define MX53_PAD_DISP0_DAT16__SDMA_DEBUG_EVT_CHN_LINES_3 \ | ||
| 265 | IOMUX_PAD(0x3CC, 0x0A0, 5, __NA_, 0, NO_PAD_CTRL) | ||
| 266 | #define MX53_PAD_DISP0_DAT16__EMI_EMI_DEBUG_21 IOMUX_PAD(0x3CC, 0x0A0, 6, __NA_, 0, NO_PAD_CTRL) | ||
| 267 | #define MX53_PAD_DISP0_DAT16__USBPHY2_VSTATUS_7 IOMUX_PAD(0x3CC, 0x0A0, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 268 | #define MX53_PAD_DISP0_DAT17__IPU_DISP0_DAT_17 IOMUX_PAD(0x3D0, 0x0A4, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 269 | #define MX53_PAD_DISP0_DAT17__GPIO5_11 IOMUX_PAD(0x3D0, 0x0A4, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 270 | #define MX53_PAD_DISP0_DAT17__ECSPI2_MISO IOMUX_PAD(0x3D0, 0x0A4, 2, 0x7BC, 0, NO_PAD_CTRL) | ||
| 271 | #define MX53_PAD_DISP0_DAT17__AUDMUX_AUD5_TXD IOMUX_PAD(0x3D0, 0x0A4, 3, 0x74C, 1, NO_PAD_CTRL) | ||
| 272 | #define MX53_PAD_DISP0_DAT17__SDMA_EXT_EVENT_1 IOMUX_PAD(0x3D0, 0x0A4, 4, 0x86C, 0, NO_PAD_CTRL) | ||
| 273 | #define MX53_PAD_DISP0_DAT17__SDMA_DEBUG_EVT_CHN_LINES_4 \ | ||
| 274 | IOMUX_PAD(0x3D0, 0x0A4, 5, __NA_, 0, NO_PAD_CTRL) | ||
| 275 | #define MX53_PAD_DISP0_DAT17__EMI_EMI_DEBUG_22 IOMUX_PAD(0x3D0, 0x0A4, 6, __NA_, 0, NO_PAD_CTRL) | ||
| 276 | #define MX53_PAD_DISP0_DAT18__IPU_DISP0_DAT_18 IOMUX_PAD(0x3D4, 0x0A8, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 277 | #define MX53_PAD_DISP0_DAT18__GPIO5_12 IOMUX_PAD(0x3D4, 0x0A8, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 278 | #define MX53_PAD_DISP0_DAT18__ECSPI2_SS0 IOMUX_PAD(0x3D4, 0x0A8, 2, 0x7C4, 0, NO_PAD_CTRL) | ||
| 279 | #define MX53_PAD_DISP0_DAT18__AUDMUX_AUD5_TXFS IOMUX_PAD(0x3D4, 0x0A8, 3, 0x75C, 1, NO_PAD_CTRL) | ||
| 280 | #define MX53_PAD_DISP0_DAT18__AUDMUX_AUD4_RXFS IOMUX_PAD(0x3D4, 0x0A8, 4, 0x73C, 0, NO_PAD_CTRL) | ||
| 281 | #define MX53_PAD_DISP0_DAT18__SDMA_DEBUG_EVT_CHN_LINES_5 \ | ||
| 282 | IOMUX_PAD(0x3D4, 0x0A8, 5, __NA_, 0, NO_PAD_CTRL) | ||
| 283 | #define MX53_PAD_DISP0_DAT18__EMI_EMI_DEBUG_23 IOMUX_PAD(0x3D4, 0x0A8, 6, __NA_, 0, NO_PAD_CTRL) | ||
| 284 | #define MX53_PAD_DISP0_DAT18__EMI_WEIM_CS_2 IOMUX_PAD(0x3D4, 0x0A8, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 285 | #define MX53_PAD_DISP0_DAT19__IPU_DISP0_DAT_19 IOMUX_PAD(0x3D8, 0x0AC, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 286 | #define MX53_PAD_DISP0_DAT19__GPIO5_13 IOMUX_PAD(0x3D8, 0x0AC, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 287 | #define MX53_PAD_DISP0_DAT19__ECSPI2_SCLK IOMUX_PAD(0x3D8, 0x0AC, 2, 0x7B8, 0, NO_PAD_CTRL) | ||
| 288 | #define MX53_PAD_DISP0_DAT19__AUDMUX_AUD5_RXD IOMUX_PAD(0x3D8, 0x0AC, 3, 0x748, 1, NO_PAD_CTRL) | ||
| 289 | #define MX53_PAD_DISP0_DAT19__AUDMUX_AUD4_RXC IOMUX_PAD(0x3D8, 0x0AC, 4, 0x738, 0, NO_PAD_CTRL) | ||
| 290 | #define MX53_PAD_DISP0_DAT19__SDMA_DEBUG_EVT_CHN_LINES_6 \ | ||
| 291 | IOMUX_PAD(0x3D8, 0x0AC, 5, __NA_, 0, NO_PAD_CTRL) | ||
| 292 | #define MX53_PAD_DISP0_DAT19__EMI_EMI_DEBUG_24 IOMUX_PAD(0x3D8, 0x0AC, 6, __NA_, 0, NO_PAD_CTRL) | ||
| 293 | #define MX53_PAD_DISP0_DAT19__EMI_WEIM_CS_3 IOMUX_PAD(0x3D8, 0x0AC, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 294 | #define MX53_PAD_DISP0_DAT20__IPU_DISP0_DAT_20 IOMUX_PAD(0x3DC, 0x0B0, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 295 | #define MX53_PAD_DISP0_DAT20__GPIO5_14 IOMUX_PAD(0x3DC, 0x0B0, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 296 | #define MX53_PAD_DISP0_DAT20__ECSPI1_SCLK IOMUX_PAD(0x3DC, 0x0B0, 2, 0x79C, 1, NO_PAD_CTRL) | ||
| 297 | #define MX53_PAD_DISP0_DAT20__AUDMUX_AUD4_TXC IOMUX_PAD(0x3DC, 0x0B0, 3, 0x740, 0, NO_PAD_CTRL) | ||
| 298 | #define MX53_PAD_DISP0_DAT20__SDMA_DEBUG_EVT_CHN_LINES_7 \ | ||
| 299 | IOMUX_PAD(0x3DC, 0x0B0, 5, __NA_, 0, NO_PAD_CTRL) | ||
| 300 | #define MX53_PAD_DISP0_DAT20__EMI_EMI_DEBUG_25 IOMUX_PAD(0x3DC, 0x0B0, 6, __NA_, 0, NO_PAD_CTRL) | ||
| 301 | #define MX53_PAD_DISP0_DAT20__SATA_PHY_TDI IOMUX_PAD(0x3DC, 0x0B0, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 302 | #define MX53_PAD_DISP0_DAT21__IPU_DISP0_DAT_21 IOMUX_PAD(0x3E0, 0x0B4, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 303 | #define MX53_PAD_DISP0_DAT21__GPIO5_15 IOMUX_PAD(0x3E0, 0x0B4, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 304 | #define MX53_PAD_DISP0_DAT21__ECSPI1_MOSI IOMUX_PAD(0x3E0, 0x0B4, 2, 0x7A4, 1, NO_PAD_CTRL) | ||
| 305 | #define MX53_PAD_DISP0_DAT21__AUDMUX_AUD4_TXD IOMUX_PAD(0x3E0, 0x0B4, 3, 0x734, 0, NO_PAD_CTRL) | ||
| 306 | #define MX53_PAD_DISP0_DAT21__SDMA_DEBUG_BUS_DEVICE_0 IOMUX_PAD(0x3E0, 0x0B4, 5, __NA_, 0, NO_PAD_CTRL) | ||
| 307 | #define MX53_PAD_DISP0_DAT21__EMI_EMI_DEBUG_26 IOMUX_PAD(0x3E0, 0x0B4, 6, __NA_, 0, NO_PAD_CTRL) | ||
| 308 | #define MX53_PAD_DISP0_DAT21__SATA_PHY_TDO IOMUX_PAD(0x3E0, 0x0B4, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 309 | #define MX53_PAD_DISP0_DAT22__IPU_DISP0_DAT_22 IOMUX_PAD(0x3E4, 0x0B8, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 310 | #define MX53_PAD_DISP0_DAT22__GPIO5_16 IOMUX_PAD(0x3E4, 0x0B8, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 311 | #define MX53_PAD_DISP0_DAT22__ECSPI1_MISO IOMUX_PAD(0x3E4, 0x0B8, 2, 0x7A0, 1, NO_PAD_CTRL) | ||
| 312 | #define MX53_PAD_DISP0_DAT22__AUDMUX_AUD4_TXFS IOMUX_PAD(0x3E4, 0x0B8, 3, 0x744, 0, NO_PAD_CTRL) | ||
| 313 | #define MX53_PAD_DISP0_DAT22__SDMA_DEBUG_BUS_DEVICE_1 IOMUX_PAD(0x3E4, 0x0B8, 5, __NA_, 0, NO_PAD_CTRL) | ||
| 314 | #define MX53_PAD_DISP0_DAT22__EMI_EMI_DEBUG_27 IOMUX_PAD(0x3E4, 0x0B8, 6, __NA_, 0, NO_PAD_CTRL) | ||
| 315 | #define MX53_PAD_DISP0_DAT22__SATA_PHY_TCK IOMUX_PAD(0x3E4, 0x0B8, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 316 | #define MX53_PAD_DISP0_DAT23__IPU_DISP0_DAT_23 IOMUX_PAD(0x3E8, 0x0BC, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 317 | #define MX53_PAD_DISP0_DAT23__GPIO5_17 IOMUX_PAD(0x3E8, 0x0BC, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 318 | #define MX53_PAD_DISP0_DAT23__ECSPI1_SS0 IOMUX_PAD(0x3E8, 0x0BC, 2, 0x7A8, 1, NO_PAD_CTRL) | ||
| 319 | #define MX53_PAD_DISP0_DAT23__AUDMUX_AUD4_RXD IOMUX_PAD(0x3E8, 0x0BC, 3, 0x730, 0, NO_PAD_CTRL) | ||
| 320 | #define MX53_PAD_DISP0_DAT23__SDMA_DEBUG_BUS_DEVICE_2 IOMUX_PAD(0x3E8, 0x0BC, 5, __NA_, 0, NO_PAD_CTRL) | ||
| 321 | #define MX53_PAD_DISP0_DAT23__EMI_EMI_DEBUG_28 IOMUX_PAD(0x3E8, 0x0BC, 6, __NA_, 0, NO_PAD_CTRL) | ||
| 322 | #define MX53_PAD_DISP0_DAT23__SATA_PHY_TMS IOMUX_PAD(0x3E8, 0x0BC, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 323 | #define MX53_PAD_CSI0_PIXCLK__IPU_CSI0_PIXCLK IOMUX_PAD(0x3EC, 0x0C0, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 324 | #define MX53_PAD_CSI0_PIXCLK__GPIO5_18 IOMUX_PAD(0x3EC, 0x0C0, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 325 | #define MX53_PAD_CSI0_PIXCLK__SDMA_DEBUG_PC_0 IOMUX_PAD(0x3EC, 0x0C0, 5, __NA_, 0, NO_PAD_CTRL) | ||
| 326 | #define MX53_PAD_CSI0_PIXCLK__EMI_EMI_DEBUG_29 IOMUX_PAD(0x3EC, 0x0C0, 6, __NA_, 0, NO_PAD_CTRL) | ||
| 327 | #define MX53_PAD_CSI0_MCLK__IPU_CSI0_HSYNC IOMUX_PAD(0x3F0, 0x0C4, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 328 | #define MX53_PAD_CSI0_MCLK__GPIO5_19 IOMUX_PAD(0x3F0, 0x0C4, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 329 | #define MX53_PAD_CSI0_MCLK__CCM_CSI0_MCLK IOMUX_PAD(0x3F0, 0x0C4, 2, __NA_, 0, NO_PAD_CTRL) | ||
| 330 | #define MX53_PAD_CSI0_MCLK__SDMA_DEBUG_PC_1 IOMUX_PAD(0x3F0, 0x0C4, 5, __NA_, 0, NO_PAD_CTRL) | ||
| 331 | #define MX53_PAD_CSI0_MCLK__EMI_EMI_DEBUG_30 IOMUX_PAD(0x3F0, 0x0C4, 6, __NA_, 0, NO_PAD_CTRL) | ||
| 332 | #define MX53_PAD_CSI0_MCLK__TPIU_TRCTL IOMUX_PAD(0x3F0, 0x0C4, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 333 | #define MX53_PAD_CSI0_DATA_EN__IPU_CSI0_DATA_EN IOMUX_PAD(0x3F4, 0x0C8, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 334 | #define MX53_PAD_CSI0_DATA_EN__GPIO5_20 IOMUX_PAD(0x3F4, 0x0C8, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 335 | #define MX53_PAD_CSI0_DATA_EN__SDMA_DEBUG_PC_2 IOMUX_PAD(0x3F4, 0x0C8, 5, __NA_, 0, NO_PAD_CTRL) | ||
| 336 | #define MX53_PAD_CSI0_DATA_EN__EMI_EMI_DEBUG_31 IOMUX_PAD(0x3F4, 0x0C8, 6, __NA_, 0, NO_PAD_CTRL) | ||
| 337 | #define MX53_PAD_CSI0_DATA_EN__TPIU_TRCLK IOMUX_PAD(0x3F4, 0x0C8, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 338 | #define MX53_PAD_CSI0_VSYNC__IPU_CSI0_VSYNC IOMUX_PAD(0x3F8, 0x0CC, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 339 | #define MX53_PAD_CSI0_VSYNC__GPIO5_21 IOMUX_PAD(0x3F8, 0x0CC, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 340 | #define MX53_PAD_CSI0_VSYNC__SDMA_DEBUG_PC_3 IOMUX_PAD(0x3F8, 0x0CC, 5, __NA_, 0, NO_PAD_CTRL) | ||
| 341 | #define MX53_PAD_CSI0_VSYNC__EMI_EMI_DEBUG_32 IOMUX_PAD(0x3F8, 0x0CC, 6, __NA_, 0, NO_PAD_CTRL) | ||
| 342 | #define MX53_PAD_CSI0_VSYNC__TPIU_TRACE_0 IOMUX_PAD(0x3F8, 0x0CC, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 343 | #define MX53_PAD_CSI0_DAT4__IPU_CSI0_D_4 IOMUX_PAD(0x3FC, 0x0D0, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 344 | #define MX53_PAD_CSI0_DAT4__GPIO5_22 IOMUX_PAD(0x3FC, 0x0D0, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 345 | #define MX53_PAD_CSI0_DAT4__KPP_COL_5 IOMUX_PAD(0x3FC, 0x0D0, 2, 0x840, 1, NO_PAD_CTRL) | ||
| 346 | #define MX53_PAD_CSI0_DAT4__ECSPI1_SCLK IOMUX_PAD(0x3FC, 0x0D0, 3, 0x79C, 2, NO_PAD_CTRL) | ||
| 347 | #define MX53_PAD_CSI0_DAT4__USBOH3_USBH3_STP IOMUX_PAD(0x3FC, 0x0D0, 4, __NA_, 0, NO_PAD_CTRL) | ||
| 348 | #define MX53_PAD_CSI0_DAT4__AUDMUX_AUD3_TXC IOMUX_PAD(0x3FC, 0x0D0, 5, __NA_, 0, NO_PAD_CTRL) | ||
| 349 | #define MX53_PAD_CSI0_DAT4__EMI_EMI_DEBUG_33 IOMUX_PAD(0x3FC, 0x0D0, 6, __NA_, 0, NO_PAD_CTRL) | ||
| 350 | #define MX53_PAD_CSI0_DAT4__TPIU_TRACE_1 IOMUX_PAD(0x3FC, 0x0D0, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 351 | #define MX53_PAD_CSI0_DAT5__IPU_CSI0_D_5 IOMUX_PAD(0x400, 0x0D4, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 352 | #define MX53_PAD_CSI0_DAT5__GPIO5_23 IOMUX_PAD(0x400, 0x0D4, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 353 | #define MX53_PAD_CSI0_DAT5__KPP_ROW_5 IOMUX_PAD(0x400, 0x0D4, 2, 0x84C, 0, NO_PAD_CTRL) | ||
| 354 | #define MX53_PAD_CSI0_DAT5__ECSPI1_MOSI IOMUX_PAD(0x400, 0x0D4, 3, 0x7A4, 2, NO_PAD_CTRL) | ||
| 355 | #define MX53_PAD_CSI0_DAT5__USBOH3_USBH3_NXT IOMUX_PAD(0x400, 0x0D4, 4, __NA_, 0, NO_PAD_CTRL) | ||
| 356 | #define MX53_PAD_CSI0_DAT5__AUDMUX_AUD3_TXD IOMUX_PAD(0x400, 0x0D4, 5, __NA_, 0, NO_PAD_CTRL) | ||
| 357 | #define MX53_PAD_CSI0_DAT5__EMI_EMI_DEBUG_34 IOMUX_PAD(0x400, 0x0D4, 6, __NA_, 0, NO_PAD_CTRL) | ||
| 358 | #define MX53_PAD_CSI0_DAT5__TPIU_TRACE_2 IOMUX_PAD(0x400, 0x0D4, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 359 | #define MX53_PAD_CSI0_DAT6__IPU_CSI0_D_6 IOMUX_PAD(0x404, 0x0D8, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 360 | #define MX53_PAD_CSI0_DAT6__GPIO5_24 IOMUX_PAD(0x404, 0x0D8, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 361 | #define MX53_PAD_CSI0_DAT6__KPP_COL_6 IOMUX_PAD(0x404, 0x0D8, 2, 0x844, 0, NO_PAD_CTRL) | ||
| 362 | #define MX53_PAD_CSI0_DAT6__ECSPI1_MISO IOMUX_PAD(0x404, 0x0D8, 3, 0x7A0, 2, NO_PAD_CTRL) | ||
| 363 | #define MX53_PAD_CSI0_DAT6__USBOH3_USBH3_CLK IOMUX_PAD(0x404, 0x0D8, 4, __NA_, 0, NO_PAD_CTRL) | ||
| 364 | #define MX53_PAD_CSI0_DAT6__AUDMUX_AUD3_TXFS IOMUX_PAD(0x404, 0x0D8, 5, __NA_, 0, NO_PAD_CTRL) | ||
| 365 | #define MX53_PAD_CSI0_DAT6__EMI_EMI_DEBUG_35 IOMUX_PAD(0x404, 0x0D8, 6, __NA_, 0, NO_PAD_CTRL) | ||
| 366 | #define MX53_PAD_CSI0_DAT6__TPIU_TRACE_3 IOMUX_PAD(0x404, 0x0D8, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 367 | #define MX53_PAD_CSI0_DAT7__IPU_CSI0_D_7 IOMUX_PAD(0x408, 0x0DC, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 368 | #define MX53_PAD_CSI0_DAT7__GPIO5_25 IOMUX_PAD(0x408, 0x0DC, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 369 | #define MX53_PAD_CSI0_DAT7__KPP_ROW_6 IOMUX_PAD(0x408, 0x0DC, 2, 0x850, 0, NO_PAD_CTRL) | ||
| 370 | #define MX53_PAD_CSI0_DAT7__ECSPI1_SS0 IOMUX_PAD(0x408, 0x0DC, 3, 0x7A8, 2, NO_PAD_CTRL) | ||
| 371 | #define MX53_PAD_CSI0_DAT7__USBOH3_USBH3_DIR IOMUX_PAD(0x408, 0x0DC, 4, __NA_, 0, NO_PAD_CTRL) | ||
| 372 | #define MX53_PAD_CSI0_DAT7__AUDMUX_AUD3_RXD IOMUX_PAD(0x408, 0x0DC, 5, __NA_, 0, NO_PAD_CTRL) | ||
| 373 | #define MX53_PAD_CSI0_DAT7__EMI_EMI_DEBUG_36 IOMUX_PAD(0x408, 0x0DC, 6, __NA_, 0, NO_PAD_CTRL) | ||
| 374 | #define MX53_PAD_CSI0_DAT7__TPIU_TRACE_4 IOMUX_PAD(0x408, 0x0DC, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 375 | #define MX53_PAD_CSI0_DAT8__IPU_CSI0_D_8 IOMUX_PAD(0x40C, 0x0E0, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 376 | #define MX53_PAD_CSI0_DAT8__GPIO5_26 IOMUX_PAD(0x40C, 0x0E0, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 377 | #define MX53_PAD_CSI0_DAT8__KPP_COL_7 IOMUX_PAD(0x40C, 0x0E0, 2, 0x848, 0, NO_PAD_CTRL) | ||
| 378 | #define MX53_PAD_CSI0_DAT8__ECSPI2_SCLK IOMUX_PAD(0x40C, 0x0E0, 3, 0x7B8, 1, NO_PAD_CTRL) | ||
| 379 | #define MX53_PAD_CSI0_DAT8__USBOH3_USBH3_OC IOMUX_PAD(0x40C, 0x0E0, 4, __NA_, 0, NO_PAD_CTRL) | ||
| 380 | #define MX53_PAD_CSI0_DAT8__I2C1_SDA IOMUX_PAD(0x40C, 0x0E0, 5 | IOMUX_CONFIG_SION, 0x818, 0, NO_PAD_CTRL) | ||
| 381 | #define MX53_PAD_CSI0_DAT8__EMI_EMI_DEBUG_37 IOMUX_PAD(0x40C, 0x0E0, 6, __NA_, 0, NO_PAD_CTRL) | ||
| 382 | #define MX53_PAD_CSI0_DAT8__TPIU_TRACE_5 IOMUX_PAD(0x40C, 0x0E0, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 383 | #define MX53_PAD_CSI0_DAT9__IPU_CSI0_D_9 IOMUX_PAD(0x410, 0x0E4, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 384 | #define MX53_PAD_CSI0_DAT9__GPIO5_27 IOMUX_PAD(0x410, 0x0E4, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 385 | #define MX53_PAD_CSI0_DAT9__KPP_ROW_7 IOMUX_PAD(0x410, 0x0E4, 2, 0x854, 0, NO_PAD_CTRL) | ||
| 386 | #define MX53_PAD_CSI0_DAT9__ECSPI2_MOSI IOMUX_PAD(0x410, 0x0E4, 3, 0x7C0, 1, NO_PAD_CTRL) | ||
| 387 | #define MX53_PAD_CSI0_DAT9__USBOH3_USBH3_PWR IOMUX_PAD(0x410, 0x0E4, 4, __NA_, 0, NO_PAD_CTRL) | ||
| 388 | #define MX53_PAD_CSI0_DAT9__I2C1_SCL IOMUX_PAD(0x410, 0x0E4, 5 | IOMUX_CONFIG_SION, 0x814, 0, NO_PAD_CTRL) | ||
| 389 | #define MX53_PAD_CSI0_DAT9__EMI_EMI_DEBUG_38 IOMUX_PAD(0x410, 0x0E4, 6, __NA_, 0, NO_PAD_CTRL) | ||
| 390 | #define MX53_PAD_CSI0_DAT9__TPIU_TRACE_6 IOMUX_PAD(0x410, 0x0E4, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 391 | #define MX53_PAD_CSI0_DAT10__IPU_CSI0_D_10 IOMUX_PAD(0x414, 0x0E8, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 392 | #define MX53_PAD_CSI0_DAT10__GPIO5_28 IOMUX_PAD(0x414, 0x0E8, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 393 | #define MX53_PAD_CSI0_DAT10__UART1_TXD_MUX IOMUX_PAD(0x414, 0x0E8, 2, __NA_, 0, MX53_UART_PAD_CTRL) | ||
| 394 | #define MX53_PAD_CSI0_DAT10__ECSPI2_MISO IOMUX_PAD(0x414, 0x0E8, 3, 0x7BC, 1, NO_PAD_CTRL) | ||
| 395 | #define MX53_PAD_CSI0_DAT10__AUDMUX_AUD3_RXC IOMUX_PAD(0x414, 0x0E8, 4, __NA_, 0, NO_PAD_CTRL) | ||
| 396 | #define MX53_PAD_CSI0_DAT10__SDMA_DEBUG_PC_4 IOMUX_PAD(0x414, 0x0E8, 5, __NA_, 0, NO_PAD_CTRL) | ||
| 397 | #define MX53_PAD_CSI0_DAT10__EMI_EMI_DEBUG_39 IOMUX_PAD(0x414, 0x0E8, 6, __NA_, 0, NO_PAD_CTRL) | ||
| 398 | #define MX53_PAD_CSI0_DAT10__TPIU_TRACE_7 IOMUX_PAD(0x414, 0x0E8, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 399 | #define MX53_PAD_CSI0_DAT11__IPU_CSI0_D_11 IOMUX_PAD(0x418, 0x0EC, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 400 | #define MX53_PAD_CSI0_DAT11__GPIO5_29 IOMUX_PAD(0x418, 0x0EC, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 401 | #define MX53_PAD_CSI0_DAT11__UART1_RXD_MUX IOMUX_PAD(0x418, 0x0EC, 2, 0x878, 1, MX53_UART_PAD_CTRL) | ||
| 402 | #define MX53_PAD_CSI0_DAT11__ECSPI2_SS0 IOMUX_PAD(0x418, 0x0EC, 3, 0x7C4, 1, NO_PAD_CTRL) | ||
| 403 | #define MX53_PAD_CSI0_DAT11__AUDMUX_AUD3_RXFS IOMUX_PAD(0x418, 0x0EC, 4, __NA_, 0, NO_PAD_CTRL) | ||
| 404 | #define MX53_PAD_CSI0_DAT11__SDMA_DEBUG_PC_5 IOMUX_PAD(0x418, 0x0EC, 5, __NA_, 0, NO_PAD_CTRL) | ||
| 405 | #define MX53_PAD_CSI0_DAT11__EMI_EMI_DEBUG_40 IOMUX_PAD(0x418, 0x0EC, 6, __NA_, 0, NO_PAD_CTRL) | ||
| 406 | #define MX53_PAD_CSI0_DAT11__TPIU_TRACE_8 IOMUX_PAD(0x418, 0x0EC, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 407 | #define MX53_PAD_CSI0_DAT12__IPU_CSI0_D_12 IOMUX_PAD(0x41C, 0x0F0, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 408 | #define MX53_PAD_CSI0_DAT12__GPIO5_30 IOMUX_PAD(0x41C, 0x0F0, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 409 | #define MX53_PAD_CSI0_DAT12__UART4_TXD_MUX IOMUX_PAD(0x41C, 0x0F0, 2, __NA_, 0, MX53_UART_PAD_CTRL) | ||
| 410 | #define MX53_PAD_CSI0_DAT12__USBOH3_USBH3_DATA_0 IOMUX_PAD(0x41C, 0x0F0, 4, __NA_, 0, NO_PAD_CTRL) | ||
| 411 | #define MX53_PAD_CSI0_DAT12__SDMA_DEBUG_PC_6 IOMUX_PAD(0x41C, 0x0F0, 5, __NA_, 0, NO_PAD_CTRL) | ||
| 412 | #define MX53_PAD_CSI0_DAT12__EMI_EMI_DEBUG_41 IOMUX_PAD(0x41C, 0x0F0, 6, __NA_, 0, NO_PAD_CTRL) | ||
| 413 | #define MX53_PAD_CSI0_DAT12__TPIU_TRACE_9 IOMUX_PAD(0x41C, 0x0F0, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 414 | #define MX53_PAD_CSI0_DAT13__IPU_CSI0_D_13 IOMUX_PAD(0x420, 0x0F4, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 415 | #define MX53_PAD_CSI0_DAT13__GPIO5_31 IOMUX_PAD(0x420, 0x0F4, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 416 | #define MX53_PAD_CSI0_DAT13__UART4_RXD_MUX IOMUX_PAD(0x420, 0x0F4, 2, 0x890, 3, MX53_UART_PAD_CTRL) | ||
| 417 | #define MX53_PAD_CSI0_DAT13__USBOH3_USBH3_DATA_1 IOMUX_PAD(0x420, 0x0F4, 4, __NA_, 0, NO_PAD_CTRL) | ||
| 418 | #define MX53_PAD_CSI0_DAT13__SDMA_DEBUG_PC_7 IOMUX_PAD(0x420, 0x0F4, 5, __NA_, 0, NO_PAD_CTRL) | ||
| 419 | #define MX53_PAD_CSI0_DAT13__EMI_EMI_DEBUG_42 IOMUX_PAD(0x420, 0x0F4, 6, __NA_, 0, NO_PAD_CTRL) | ||
| 420 | #define MX53_PAD_CSI0_DAT13__TPIU_TRACE_10 IOMUX_PAD(0x420, 0x0F4, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 421 | #define MX53_PAD_CSI0_DAT14__IPU_CSI0_D_14 IOMUX_PAD(0x424, 0x0F8, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 422 | #define MX53_PAD_CSI0_DAT14__GPIO6_0 IOMUX_PAD(0x424, 0x0F8, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 423 | #define MX53_PAD_CSI0_DAT14__UART5_TXD_MUX IOMUX_PAD(0x424, 0x0F8, 2, __NA_, 0, MX53_UART_PAD_CTRL) | ||
| 424 | #define MX53_PAD_CSI0_DAT14__USBOH3_USBH3_DATA_2 IOMUX_PAD(0x424, 0x0F8, 4, __NA_, 0, NO_PAD_CTRL) | ||
| 425 | #define MX53_PAD_CSI0_DAT14__SDMA_DEBUG_PC_8 IOMUX_PAD(0x424, 0x0F8, 5, __NA_, 0, NO_PAD_CTRL) | ||
| 426 | #define MX53_PAD_CSI0_DAT14__EMI_EMI_DEBUG_43 IOMUX_PAD(0x424, 0x0F8, 6, __NA_, 0, NO_PAD_CTRL) | ||
| 427 | #define MX53_PAD_CSI0_DAT14__TPIU_TRACE_11 IOMUX_PAD(0x424, 0x0F8, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 428 | #define MX53_PAD_CSI0_DAT15__IPU_CSI0_D_15 IOMUX_PAD(0x428, 0x0FC, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 429 | #define MX53_PAD_CSI0_DAT15__GPIO6_1 IOMUX_PAD(0x428, 0x0FC, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 430 | #define MX53_PAD_CSI0_DAT15__UART5_RXD_MUX IOMUX_PAD(0x428, 0x0FC, 2, 0x898, 3, MX53_UART_PAD_CTRL) | ||
| 431 | #define MX53_PAD_CSI0_DAT15__USBOH3_USBH3_DATA_3 IOMUX_PAD(0x428, 0x0FC, 4, __NA_, 0, NO_PAD_CTRL) | ||
| 432 | #define MX53_PAD_CSI0_DAT15__SDMA_DEBUG_PC_9 IOMUX_PAD(0x428, 0x0FC, 5, __NA_, 0, NO_PAD_CTRL) | ||
| 433 | #define MX53_PAD_CSI0_DAT15__EMI_EMI_DEBUG_44 IOMUX_PAD(0x428, 0x0FC, 6, __NA_, 0, NO_PAD_CTRL) | ||
| 434 | #define MX53_PAD_CSI0_DAT15__TPIU_TRACE_12 IOMUX_PAD(0x428, 0x0FC, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 435 | #define MX53_PAD_CSI0_DAT16__IPU_CSI0_D_16 IOMUX_PAD(0x42C, 0x100, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 436 | #define MX53_PAD_CSI0_DAT16__GPIO6_2 IOMUX_PAD(0x42C, 0x100, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 437 | #define MX53_PAD_CSI0_DAT16__UART4_RTS IOMUX_PAD(0x42C, 0x100, 2, 0x88C, 0, MX53_UART_PAD_CTRL) | ||
| 438 | #define MX53_PAD_CSI0_DAT16__USBOH3_USBH3_DATA_4 IOMUX_PAD(0x42C, 0x100, 4, __NA_, 0, NO_PAD_CTRL) | ||
| 439 | #define MX53_PAD_CSI0_DAT16__SDMA_DEBUG_PC_10 IOMUX_PAD(0x42C, 0x100, 5, __NA_, 0, NO_PAD_CTRL) | ||
| 440 | #define MX53_PAD_CSI0_DAT16__EMI_EMI_DEBUG_45 IOMUX_PAD(0x42C, 0x100, 6, __NA_, 0, NO_PAD_CTRL) | ||
| 441 | #define MX53_PAD_CSI0_DAT16__TPIU_TRACE_13 IOMUX_PAD(0x42C, 0x100, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 442 | #define MX53_PAD_CSI0_DAT17__IPU_CSI0_D_17 IOMUX_PAD(0x430, 0x104, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 443 | #define MX53_PAD_CSI0_DAT17__GPIO6_3 IOMUX_PAD(0x430, 0x104, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 444 | #define MX53_PAD_CSI0_DAT17__UART4_CTS IOMUX_PAD(0x430, 0x104, 2, __NA_, 0, MX53_UART_PAD_CTRL) | ||
| 445 | #define MX53_PAD_CSI0_DAT17__USBOH3_USBH3_DATA_5 IOMUX_PAD(0x430, 0x104, 4, __NA_, 0, NO_PAD_CTRL) | ||
| 446 | #define MX53_PAD_CSI0_DAT17__SDMA_DEBUG_PC_11 IOMUX_PAD(0x430, 0x104, 5, __NA_, 0, NO_PAD_CTRL) | ||
| 447 | #define MX53_PAD_CSI0_DAT17__EMI_EMI_DEBUG_46 IOMUX_PAD(0x430, 0x104, 6, __NA_, 0, NO_PAD_CTRL) | ||
| 448 | #define MX53_PAD_CSI0_DAT17__TPIU_TRACE_14 IOMUX_PAD(0x430, 0x104, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 449 | #define MX53_PAD_CSI0_DAT18__IPU_CSI0_D_18 IOMUX_PAD(0x434, 0x108, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 450 | #define MX53_PAD_CSI0_DAT18__GPIO6_4 IOMUX_PAD(0x434, 0x108, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 451 | #define MX53_PAD_CSI0_DAT18__UART5_RTS IOMUX_PAD(0x434, 0x108, 2, 0x894, 2, MX53_UART_PAD_CTRL) | ||
| 452 | #define MX53_PAD_CSI0_DAT18__USBOH3_USBH3_DATA_6 IOMUX_PAD(0x434, 0x108, 4, __NA_, 0, NO_PAD_CTRL) | ||
| 453 | #define MX53_PAD_CSI0_DAT18__SDMA_DEBUG_PC_12 IOMUX_PAD(0x434, 0x108, 5, __NA_, 0, NO_PAD_CTRL) | ||
| 454 | #define MX53_PAD_CSI0_DAT18__EMI_EMI_DEBUG_47 IOMUX_PAD(0x434, 0x108, 6, __NA_, 0, NO_PAD_CTRL) | ||
| 455 | #define MX53_PAD_CSI0_DAT18__TPIU_TRACE_15 IOMUX_PAD(0x434, 0x108, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 456 | #define MX53_PAD_CSI0_DAT19__IPU_CSI0_D_19 IOMUX_PAD(0x438, 0x10C, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 457 | #define MX53_PAD_CSI0_DAT19__GPIO6_5 IOMUX_PAD(0x438, 0x10C, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 458 | #define MX53_PAD_CSI0_DAT19__UART5_CTS IOMUX_PAD(0x438, 0x10C, 2, __NA_, 0, MX53_UART_PAD_CTRL) | ||
| 459 | #define MX53_PAD_CSI0_DAT19__USBOH3_USBH3_DATA_7 IOMUX_PAD(0x438, 0x10C, 4, __NA_, 0, NO_PAD_CTRL) | ||
| 460 | #define MX53_PAD_CSI0_DAT19__SDMA_DEBUG_PC_13 IOMUX_PAD(0x438, 0x10C, 5, __NA_, 0, NO_PAD_CTRL) | ||
| 461 | #define MX53_PAD_CSI0_DAT19__EMI_EMI_DEBUG_48 IOMUX_PAD(0x438, 0x10C, 6, __NA_, 0, NO_PAD_CTRL) | ||
| 462 | #define MX53_PAD_CSI0_DAT19__USBPHY2_BISTOK IOMUX_PAD(0x438, 0x10C, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 463 | #define MX53_PAD_EIM_A25__EMI_WEIM_A_25 IOMUX_PAD(0x458, 0x110, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 464 | #define MX53_PAD_EIM_A25__GPIO5_2 IOMUX_PAD(0x458, 0x110, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 465 | #define MX53_PAD_EIM_A25__ECSPI2_RDY IOMUX_PAD(0x458, 0x110, 2, __NA_, 0, NO_PAD_CTRL) | ||
| 466 | #define MX53_PAD_EIM_A25__IPU_DI1_PIN12 IOMUX_PAD(0x458, 0x110, 3, __NA_, 0, NO_PAD_CTRL) | ||
| 467 | #define MX53_PAD_EIM_A25__CSPI_SS1 IOMUX_PAD(0x458, 0x110, 4, 0x790, 1, NO_PAD_CTRL) | ||
| 468 | #define MX53_PAD_EIM_A25__IPU_DI0_D1_CS IOMUX_PAD(0x458, 0x110, 6, __NA_, 0, NO_PAD_CTRL) | ||
| 469 | #define MX53_PAD_EIM_A25__USBPHY1_BISTOK IOMUX_PAD(0x458, 0x110, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 470 | #define MX53_PAD_EIM_EB2__EMI_WEIM_EB_2 IOMUX_PAD(0x45C, 0x114, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 471 | #define MX53_PAD_EIM_EB2__GPIO2_30 IOMUX_PAD(0x45C, 0x114, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 472 | #define MX53_PAD_EIM_EB2__CCM_DI1_EXT_CLK IOMUX_PAD(0x45C, 0x114, 2, 0x76C, 0, NO_PAD_CTRL) | ||
| 473 | #define MX53_PAD_EIM_EB2__IPU_SER_DISP1_CS IOMUX_PAD(0x45C, 0x114, 3, __NA_, 0, NO_PAD_CTRL) | ||
| 474 | #define MX53_PAD_EIM_EB2__ECSPI1_SS0 IOMUX_PAD(0x45C, 0x114, 4, 0x7A8, 3, NO_PAD_CTRL) | ||
| 475 | #define MX53_PAD_EIM_EB2__I2C2_SCL IOMUX_PAD(0x45C, 0x114, 5 | IOMUX_CONFIG_SION, 0x81C, 1, NO_PAD_CTRL) | ||
| 476 | #define MX53_PAD_EIM_D16__EMI_WEIM_D_16 IOMUX_PAD(0x460, 0x118, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 477 | #define MX53_PAD_EIM_D16__GPIO3_16 IOMUX_PAD(0x460, 0x118, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 478 | #define MX53_PAD_EIM_D16__IPU_DI0_PIN5 IOMUX_PAD(0x460, 0x118, 2, __NA_, 0, NO_PAD_CTRL) | ||
| 479 | #define MX53_PAD_EIM_D16__IPU_DISPB1_SER_CLK IOMUX_PAD(0x460, 0x118, 3, __NA_, 0, NO_PAD_CTRL) | ||
| 480 | #define MX53_PAD_EIM_D16__ECSPI1_SCLK IOMUX_PAD(0x460, 0x118, 4, 0x79C, 3, NO_PAD_CTRL) | ||
| 481 | #define MX53_PAD_EIM_D16__I2C2_SDA IOMUX_PAD(0x460, 0x118, 5 | IOMUX_CONFIG_SION, 0x820, 1, NO_PAD_CTRL) | ||
| 482 | #define MX53_PAD_EIM_D17__EMI_WEIM_D_17 IOMUX_PAD(0x464, 0x11C, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 483 | #define MX53_PAD_EIM_D17__GPIO3_17 IOMUX_PAD(0x464, 0x11C, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 484 | #define MX53_PAD_EIM_D17__IPU_DI0_PIN6 IOMUX_PAD(0x464, 0x11C, 2, __NA_, 0, NO_PAD_CTRL) | ||
| 485 | #define MX53_PAD_EIM_D17__IPU_DISPB1_SER_DIN IOMUX_PAD(0x464, 0x11C, 3, 0x830, 0, NO_PAD_CTRL) | ||
| 486 | #define MX53_PAD_EIM_D17__ECSPI1_MISO IOMUX_PAD(0x464, 0x11C, 4, 0x7A0, 3, NO_PAD_CTRL) | ||
| 487 | #define MX53_PAD_EIM_D17__I2C3_SCL IOMUX_PAD(0x464, 0x11C, 5 | IOMUX_CONFIG_SION, 0x824, 0, NO_PAD_CTRL) | ||
| 488 | #define MX53_PAD_EIM_D18__EMI_WEIM_D_18 IOMUX_PAD(0x468, 0x120, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 489 | #define MX53_PAD_EIM_D18__GPIO3_18 IOMUX_PAD(0x468, 0x120, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 490 | #define MX53_PAD_EIM_D18__IPU_DI0_PIN7 IOMUX_PAD(0x468, 0x120, 2, __NA_, 0, NO_PAD_CTRL) | ||
| 491 | #define MX53_PAD_EIM_D18__IPU_DISPB1_SER_DIO IOMUX_PAD(0x468, 0x120, 3, 0x830, 1, NO_PAD_CTRL) | ||
| 492 | #define MX53_PAD_EIM_D18__ECSPI1_MOSI IOMUX_PAD(0x468, 0x120, 4, 0x7A4, 3, NO_PAD_CTRL) | ||
| 493 | #define MX53_PAD_EIM_D18__I2C3_SDA IOMUX_PAD(0x468, 0x120, 5 | IOMUX_CONFIG_SION, 0x828, 0, NO_PAD_CTRL) | ||
| 494 | #define MX53_PAD_EIM_D18__IPU_DI1_D0_CS IOMUX_PAD(0x468, 0x120, 6, __NA_, 0, NO_PAD_CTRL) | ||
| 495 | #define MX53_PAD_EIM_D19__EMI_WEIM_D_19 IOMUX_PAD(0x46C, 0x124, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 496 | #define MX53_PAD_EIM_D19__GPIO3_19 IOMUX_PAD(0x46C, 0x124, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 497 | #define MX53_PAD_EIM_D19__IPU_DI0_PIN8 IOMUX_PAD(0x46C, 0x124, 2, __NA_, 0, NO_PAD_CTRL) | ||
| 498 | #define MX53_PAD_EIM_D19__IPU_DISPB1_SER_RS IOMUX_PAD(0x46C, 0x124, 3, __NA_, 0, NO_PAD_CTRL) | ||
| 499 | #define MX53_PAD_EIM_D19__ECSPI1_SS1 IOMUX_PAD(0x46C, 0x124, 4, 0x7AC, 2, NO_PAD_CTRL) | ||
| 500 | #define MX53_PAD_EIM_D19__EPIT1_EPITO IOMUX_PAD(0x46C, 0x124, 5, __NA_, 0, NO_PAD_CTRL) | ||
| 501 | #define MX53_PAD_EIM_D19__UART1_CTS IOMUX_PAD(0x46C, 0x124, 6, __NA_, 0, MX53_UART_PAD_CTRL) | ||
| 502 | #define MX53_PAD_EIM_D19__USBOH3_USBH2_OC IOMUX_PAD(0x46C, 0x124, 7, 0x8A4, 0, NO_PAD_CTRL) | ||
| 503 | #define MX53_PAD_EIM_D20__EMI_WEIM_D_20 IOMUX_PAD(0x470, 0x128, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 504 | #define MX53_PAD_EIM_D20__GPIO3_20 IOMUX_PAD(0x470, 0x128, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 505 | #define MX53_PAD_EIM_D20__IPU_DI0_PIN16 IOMUX_PAD(0x470, 0x128, 2, __NA_, 0, NO_PAD_CTRL) | ||
| 506 | #define MX53_PAD_EIM_D20__IPU_SER_DISP0_CS IOMUX_PAD(0x470, 0x128, 3, __NA_, 0, NO_PAD_CTRL) | ||
| 507 | #define MX53_PAD_EIM_D20__CSPI_SS0 IOMUX_PAD(0x470, 0x128, 4, 0x78C, 1, NO_PAD_CTRL) | ||
| 508 | #define MX53_PAD_EIM_D20__EPIT2_EPITO IOMUX_PAD(0x470, 0x128, 5, __NA_, 0, NO_PAD_CTRL) | ||
| 509 | #define MX53_PAD_EIM_D20__UART1_RTS IOMUX_PAD(0x470, 0x128, 6, 0x874, 1, MX53_UART_PAD_CTRL) | ||
| 510 | #define MX53_PAD_EIM_D20__USBOH3_USBH2_PWR IOMUX_PAD(0x470, 0x128, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 511 | #define MX53_PAD_EIM_D21__EMI_WEIM_D_21 IOMUX_PAD(0x474, 0x12C, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 512 | #define MX53_PAD_EIM_D21__GPIO3_21 IOMUX_PAD(0x474, 0x12C, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 513 | #define MX53_PAD_EIM_D21__IPU_DI0_PIN17 IOMUX_PAD(0x474, 0x12C, 2, __NA_, 0, NO_PAD_CTRL) | ||
| 514 | #define MX53_PAD_EIM_D21__IPU_DISPB0_SER_CLK IOMUX_PAD(0x474, 0x12C, 3, __NA_, 0, NO_PAD_CTRL) | ||
| 515 | #define MX53_PAD_EIM_D21__CSPI_SCLK IOMUX_PAD(0x474, 0x12C, 4, 0x780, 1, NO_PAD_CTRL) | ||
| 516 | #define MX53_PAD_EIM_D21__I2C1_SCL IOMUX_PAD(0x474, 0x12C, 5 | IOMUX_CONFIG_SION, 0x814, 1, NO_PAD_CTRL) | ||
| 517 | #define MX53_PAD_EIM_D21__USBOH3_USBOTG_OC IOMUX_PAD(0x474, 0x12C, 6, 0x89C, 1, NO_PAD_CTRL) | ||
| 518 | #define MX53_PAD_EIM_D22__EMI_WEIM_D_22 IOMUX_PAD(0x478, 0x130, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 519 | #define MX53_PAD_EIM_D22__GPIO3_22 IOMUX_PAD(0x478, 0x130, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 520 | #define MX53_PAD_EIM_D22__IPU_DI0_PIN1 IOMUX_PAD(0x478, 0x130, 2, __NA_, 0, NO_PAD_CTRL) | ||
| 521 | #define MX53_PAD_EIM_D22__IPU_DISPB0_SER_DIN IOMUX_PAD(0x478, 0x130, 3, 0x82C, 0, NO_PAD_CTRL) | ||
| 522 | #define MX53_PAD_EIM_D22__CSPI_MISO IOMUX_PAD(0x478, 0x130, 4, 0x784, 1, NO_PAD_CTRL) | ||
| 523 | #define MX53_PAD_EIM_D22__USBOH3_USBOTG_PWR IOMUX_PAD(0x478, 0x130, 6, __NA_, 0, NO_PAD_CTRL) | ||
| 524 | #define MX53_PAD_EIM_D23__EMI_WEIM_D_23 IOMUX_PAD(0x47C, 0x134, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 525 | #define MX53_PAD_EIM_D23__GPIO3_23 IOMUX_PAD(0x47C, 0x134, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 526 | #define MX53_PAD_EIM_D23__UART3_CTS IOMUX_PAD(0x47C, 0x134, 2, __NA_, 0, MX53_UART_PAD_CTRL) | ||
| 527 | #define MX53_PAD_EIM_D23__UART1_DCD IOMUX_PAD(0x47C, 0x134, 3, __NA_, 0, NO_PAD_CTRL) | ||
| 528 | #define MX53_PAD_EIM_D23__IPU_DI0_D0_CS IOMUX_PAD(0x47C, 0x134, 4, __NA_, 0, NO_PAD_CTRL) | ||
| 529 | #define MX53_PAD_EIM_D23__IPU_DI1_PIN2 IOMUX_PAD(0x47C, 0x134, 5, __NA_, 0, NO_PAD_CTRL) | ||
| 530 | #define MX53_PAD_EIM_D23__IPU_CSI1_DATA_EN IOMUX_PAD(0x47C, 0x134, 6, 0x834, 0, NO_PAD_CTRL) | ||
| 531 | #define MX53_PAD_EIM_D23__IPU_DI1_PIN14 IOMUX_PAD(0x47C, 0x134, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 532 | #define MX53_PAD_EIM_EB3__EMI_WEIM_EB_3 IOMUX_PAD(0x480, 0x138, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 533 | #define MX53_PAD_EIM_EB3__GPIO2_31 IOMUX_PAD(0x480, 0x138, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 534 | #define MX53_PAD_EIM_EB3__UART3_RTS IOMUX_PAD(0x480, 0x138, 2, 0x884, 1, MX53_UART_PAD_CTRL) | ||
| 535 | #define MX53_PAD_EIM_EB3__UART1_RI IOMUX_PAD(0x480, 0x138, 3, __NA_, 0, NO_PAD_CTRL) | ||
| 536 | #define MX53_PAD_EIM_EB3__IPU_DI1_PIN3 IOMUX_PAD(0x480, 0x138, 5, __NA_, 0, NO_PAD_CTRL) | ||
| 537 | #define MX53_PAD_EIM_EB3__IPU_CSI1_HSYNC IOMUX_PAD(0x480, 0x138, 6, 0x838, 0, NO_PAD_CTRL) | ||
| 538 | #define MX53_PAD_EIM_EB3__IPU_DI1_PIN16 IOMUX_PAD(0x480, 0x138, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 539 | #define MX53_PAD_EIM_D24__EMI_WEIM_D_24 IOMUX_PAD(0x484, 0x13C, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 540 | #define MX53_PAD_EIM_D24__GPIO3_24 IOMUX_PAD(0x484, 0x13C, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 541 | #define MX53_PAD_EIM_D24__UART3_TXD_MUX IOMUX_PAD(0x484, 0x13C, 2, __NA_, 0, MX53_UART_PAD_CTRL) | ||
| 542 | #define MX53_PAD_EIM_D24__ECSPI1_SS2 IOMUX_PAD(0x484, 0x13C, 3, 0x7B0, 1, NO_PAD_CTRL) | ||
| 543 | #define MX53_PAD_EIM_D24__CSPI_SS2 IOMUX_PAD(0x484, 0x13C, 4, 0x794, 1, NO_PAD_CTRL) | ||
| 544 | #define MX53_PAD_EIM_D24__AUDMUX_AUD5_RXFS IOMUX_PAD(0x484, 0x13C, 5, 0x754, 1, NO_PAD_CTRL) | ||
| 545 | #define MX53_PAD_EIM_D24__ECSPI2_SS2 IOMUX_PAD(0x484, 0x13C, 6, __NA_, 0, NO_PAD_CTRL) | ||
| 546 | #define MX53_PAD_EIM_D24__UART1_DTR IOMUX_PAD(0x484, 0x13C, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 547 | #define MX53_PAD_EIM_D25__EMI_WEIM_D_25 IOMUX_PAD(0x488, 0x140, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 548 | #define MX53_PAD_EIM_D25__GPIO3_25 IOMUX_PAD(0x488, 0x140, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 549 | #define MX53_PAD_EIM_D25__UART3_RXD_MUX IOMUX_PAD(0x488, 0x140, 2, 0x888, 1, MX53_UART_PAD_CTRL) | ||
| 550 | #define MX53_PAD_EIM_D25__ECSPI1_SS3 IOMUX_PAD(0x488, 0x140, 3, 0x7B4, 1, NO_PAD_CTRL) | ||
| 551 | #define MX53_PAD_EIM_D25__CSPI_SS3 IOMUX_PAD(0x488, 0x140, 4, 0x798, 1, NO_PAD_CTRL) | ||
| 552 | #define MX53_PAD_EIM_D25__AUDMUX_AUD5_RXC IOMUX_PAD(0x488, 0x140, 5, 0x750, 1, NO_PAD_CTRL) | ||
| 553 | #define MX53_PAD_EIM_D25__ECSPI2_SS3 IOMUX_PAD(0x488, 0x140, 6, __NA_, 0, NO_PAD_CTRL) | ||
| 554 | #define MX53_PAD_EIM_D25__UART1_DSR IOMUX_PAD(0x488, 0x140, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 555 | #define MX53_PAD_EIM_D26__EMI_WEIM_D_26 IOMUX_PAD(0x48C, 0x144, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 556 | #define MX53_PAD_EIM_D26__GPIO3_26 IOMUX_PAD(0x48C, 0x144, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 557 | #define MX53_PAD_EIM_D26__UART2_TXD_MUX IOMUX_PAD(0x48C, 0x144, 2, __NA_, 0, MX53_UART_PAD_CTRL) | ||
| 558 | #define MX53_PAD_EIM_D26__FIRI_RXD IOMUX_PAD(0x48C, 0x144, 3, 0x80C, 0, NO_PAD_CTRL) | ||
| 559 | #define MX53_PAD_EIM_D26__IPU_CSI0_D_1 IOMUX_PAD(0x48C, 0x144, 4, __NA_, 0, NO_PAD_CTRL) | ||
| 560 | #define MX53_PAD_EIM_D26__IPU_DI1_PIN11 IOMUX_PAD(0x48C, 0x144, 5, __NA_, 0, NO_PAD_CTRL) | ||
| 561 | #define MX53_PAD_EIM_D26__IPU_SISG_2 IOMUX_PAD(0x48C, 0x144, 6, __NA_, 0, NO_PAD_CTRL) | ||
| 562 | #define MX53_PAD_EIM_D26__IPU_DISP1_DAT_22 IOMUX_PAD(0x48C, 0x144, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 563 | #define MX53_PAD_EIM_D27__EMI_WEIM_D_27 IOMUX_PAD(0x490, 0x148, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 564 | #define MX53_PAD_EIM_D27__GPIO3_27 IOMUX_PAD(0x490, 0x148, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 565 | #define MX53_PAD_EIM_D27__UART2_RXD_MUX IOMUX_PAD(0x490, 0x148, 2, 0x880, 1, MX53_UART_PAD_CTRL) | ||
| 566 | #define MX53_PAD_EIM_D27__FIRI_TXD IOMUX_PAD(0x490, 0x148, 3, __NA_, 0, NO_PAD_CTRL) | ||
| 567 | #define MX53_PAD_EIM_D27__IPU_CSI0_D_0 IOMUX_PAD(0x490, 0x148, 4, __NA_, 0, NO_PAD_CTRL) | ||
| 568 | #define MX53_PAD_EIM_D27__IPU_DI1_PIN13 IOMUX_PAD(0x490, 0x148, 5, __NA_, 0, NO_PAD_CTRL) | ||
| 569 | #define MX53_PAD_EIM_D27__IPU_SISG_3 IOMUX_PAD(0x490, 0x148, 6, __NA_, 0, NO_PAD_CTRL) | ||
| 570 | #define MX53_PAD_EIM_D27__IPU_DISP1_DAT_23 IOMUX_PAD(0x490, 0x148, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 571 | #define MX53_PAD_EIM_D28__EMI_WEIM_D_28 IOMUX_PAD(0x494, 0x14C, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 572 | #define MX53_PAD_EIM_D28__GPIO3_28 IOMUX_PAD(0x494, 0x14C, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 573 | #define MX53_PAD_EIM_D28__UART2_CTS IOMUX_PAD(0x494, 0x14C, 2, __NA_, 0, MX53_UART_PAD_CTRL) | ||
| 574 | #define MX53_PAD_EIM_D28__IPU_DISPB0_SER_DIO IOMUX_PAD(0x494, 0x14C, 3, 0x82C, 1, NO_PAD_CTRL) | ||
| 575 | #define MX53_PAD_EIM_D28__CSPI_MOSI IOMUX_PAD(0x494, 0x14C, 4, 0x788, 1, NO_PAD_CTRL) | ||
| 576 | #define MX53_PAD_EIM_D28__I2C1_SDA IOMUX_PAD(0x494, 0x14C, 5 | IOMUX_CONFIG_SION, 0x818, 1, NO_PAD_CTRL) | ||
| 577 | #define MX53_PAD_EIM_D28__IPU_EXT_TRIG IOMUX_PAD(0x494, 0x14C, 6, __NA_, 0, NO_PAD_CTRL) | ||
| 578 | #define MX53_PAD_EIM_D28__IPU_DI0_PIN13 IOMUX_PAD(0x494, 0x14C, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 579 | #define MX53_PAD_EIM_D29__EMI_WEIM_D_29 IOMUX_PAD(0x498, 0x150, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 580 | #define MX53_PAD_EIM_D29__GPIO3_29 IOMUX_PAD(0x498, 0x150, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 581 | #define MX53_PAD_EIM_D29__UART2_RTS IOMUX_PAD(0x498, 0x150, 2, 0x87C, 1, MX53_UART_PAD_CTRL) | ||
| 582 | #define MX53_PAD_EIM_D29__IPU_DISPB0_SER_RS IOMUX_PAD(0x498, 0x150, 3, __NA_, 0, NO_PAD_CTRL) | ||
| 583 | #define MX53_PAD_EIM_D29__CSPI_SS0 IOMUX_PAD(0x498, 0x150, 4, 0x78C, 2, NO_PAD_CTRL) | ||
| 584 | #define MX53_PAD_EIM_D29__IPU_DI1_PIN15 IOMUX_PAD(0x498, 0x150, 5, __NA_, 0, NO_PAD_CTRL) | ||
| 585 | #define MX53_PAD_EIM_D29__IPU_CSI1_VSYNC IOMUX_PAD(0x498, 0x150, 6, 0x83C, 0, NO_PAD_CTRL) | ||
| 586 | #define MX53_PAD_EIM_D29__IPU_DI0_PIN14 IOMUX_PAD(0x498, 0x150, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 587 | #define MX53_PAD_EIM_D30__EMI_WEIM_D_30 IOMUX_PAD(0x49C, 0x154, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 588 | #define MX53_PAD_EIM_D30__GPIO3_30 IOMUX_PAD(0x49C, 0x154, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 589 | #define MX53_PAD_EIM_D30__UART3_CTS IOMUX_PAD(0x49C, 0x154, 2, __NA_, 0, MX53_UART_PAD_CTRL) | ||
| 590 | #define MX53_PAD_EIM_D30__IPU_CSI0_D_3 IOMUX_PAD(0x49C, 0x154, 3, __NA_, 0, NO_PAD_CTRL) | ||
| 591 | #define MX53_PAD_EIM_D30__IPU_DI0_PIN11 IOMUX_PAD(0x49C, 0x154, 4, __NA_, 0, NO_PAD_CTRL) | ||
| 592 | #define MX53_PAD_EIM_D30__IPU_DISP1_DAT_21 IOMUX_PAD(0x49C, 0x154, 5, __NA_, 0, NO_PAD_CTRL) | ||
| 593 | #define MX53_PAD_EIM_D30__USBOH3_USBH1_OC IOMUX_PAD(0x49C, 0x154, 6, 0x8A0, 0, NO_PAD_CTRL) | ||
| 594 | #define MX53_PAD_EIM_D30__USBOH3_USBH2_OC IOMUX_PAD(0x49C, 0x154, 7, 0x8A4, 1, NO_PAD_CTRL) | ||
| 595 | #define MX53_PAD_EIM_D31__EMI_WEIM_D_31 IOMUX_PAD(0x4A0, 0x158, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 596 | #define MX53_PAD_EIM_D31__GPIO3_31 IOMUX_PAD(0x4A0, 0x158, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 597 | #define MX53_PAD_EIM_D31__UART3_RTS IOMUX_PAD(0x4A0, 0x158, 2, 0x884, 3, MX53_UART_PAD_CTRL) | ||
| 598 | #define MX53_PAD_EIM_D31__IPU_CSI0_D_2 IOMUX_PAD(0x4A0, 0x158, 3, __NA_, 0, NO_PAD_CTRL) | ||
| 599 | #define MX53_PAD_EIM_D31__IPU_DI0_PIN12 IOMUX_PAD(0x4A0, 0x158, 4, __NA_, 0, NO_PAD_CTRL) | ||
| 600 | #define MX53_PAD_EIM_D31__IPU_DISP1_DAT_20 IOMUX_PAD(0x4A0, 0x158, 5, __NA_, 0, NO_PAD_CTRL) | ||
| 601 | #define MX53_PAD_EIM_D31__USBOH3_USBH1_PWR IOMUX_PAD(0x4A0, 0x158, 6, __NA_, 0, NO_PAD_CTRL) | ||
| 602 | #define MX53_PAD_EIM_D31__USBOH3_USBH2_PWR IOMUX_PAD(0x4A0, 0x158, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 603 | #define MX53_PAD_EIM_A24__EMI_WEIM_A_24 IOMUX_PAD(0x4A8, 0x15C, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 604 | #define MX53_PAD_EIM_A24__GPIO5_4 IOMUX_PAD(0x4A8, 0x15C, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 605 | #define MX53_PAD_EIM_A24__IPU_DISP1_DAT_19 IOMUX_PAD(0x4A8, 0x15C, 2, __NA_, 0, NO_PAD_CTRL) | ||
| 606 | #define MX53_PAD_EIM_A24__IPU_CSI1_D_19 IOMUX_PAD(0x4A8, 0x15C, 3, __NA_, 0, NO_PAD_CTRL) | ||
| 607 | #define MX53_PAD_EIM_A24__IPU_SISG_2 IOMUX_PAD(0x4A8, 0x15C, 6, __NA_, 0, NO_PAD_CTRL) | ||
| 608 | #define MX53_PAD_EIM_A24__USBPHY2_BVALID IOMUX_PAD(0x4A8, 0x15C, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 609 | #define MX53_PAD_EIM_A23__EMI_WEIM_A_23 IOMUX_PAD(0x4AC, 0x160, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 610 | #define MX53_PAD_EIM_A23__GPIO6_6 IOMUX_PAD(0x4AC, 0x160, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 611 | #define MX53_PAD_EIM_A23__IPU_DISP1_DAT_18 IOMUX_PAD(0x4AC, 0x160, 2, __NA_, 0, NO_PAD_CTRL) | ||
| 612 | #define MX53_PAD_EIM_A23__IPU_CSI1_D_18 IOMUX_PAD(0x4AC, 0x160, 3, __NA_, 0, NO_PAD_CTRL) | ||
| 613 | #define MX53_PAD_EIM_A23__IPU_SISG_3 IOMUX_PAD(0x4AC, 0x160, 6, __NA_, 0, NO_PAD_CTRL) | ||
| 614 | #define MX53_PAD_EIM_A23__USBPHY2_ENDSESSION IOMUX_PAD(0x4AC, 0x160, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 615 | #define MX53_PAD_EIM_A22__EMI_WEIM_A_22 IOMUX_PAD(0x4B0, 0x164, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 616 | #define MX53_PAD_EIM_A22__GPIO2_16 IOMUX_PAD(0x4B0, 0x164, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 617 | #define MX53_PAD_EIM_A22__IPU_DISP1_DAT_17 IOMUX_PAD(0x4B0, 0x164, 2, __NA_, 0, NO_PAD_CTRL) | ||
| 618 | #define MX53_PAD_EIM_A22__IPU_CSI1_D_17 IOMUX_PAD(0x4B0, 0x164, 3, __NA_, 0, NO_PAD_CTRL) | ||
| 619 | #define MX53_PAD_EIM_A22__SRC_BT_CFG1_7 IOMUX_PAD(0x4B0, 0x164, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 620 | #define MX53_PAD_EIM_A21__EMI_WEIM_A_21 IOMUX_PAD(0x4B4, 0x168, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 621 | #define MX53_PAD_EIM_A21__GPIO2_17 IOMUX_PAD(0x4B4, 0x168, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 622 | #define MX53_PAD_EIM_A21__IPU_DISP1_DAT_16 IOMUX_PAD(0x4B4, 0x168, 2, __NA_, 0, NO_PAD_CTRL) | ||
| 623 | #define MX53_PAD_EIM_A21__IPU_CSI1_D_16 IOMUX_PAD(0x4B4, 0x168, 3, __NA_, 0, NO_PAD_CTRL) | ||
| 624 | #define MX53_PAD_EIM_A21__SRC_BT_CFG1_6 IOMUX_PAD(0x4B4, 0x168, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 625 | #define MX53_PAD_EIM_A20__EMI_WEIM_A_20 IOMUX_PAD(0x4B8, 0x16C, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 626 | #define MX53_PAD_EIM_A20__GPIO2_18 IOMUX_PAD(0x4B8, 0x16C, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 627 | #define MX53_PAD_EIM_A20__IPU_DISP1_DAT_15 IOMUX_PAD(0x4B8, 0x16C, 2, __NA_, 0, NO_PAD_CTRL) | ||
| 628 | #define MX53_PAD_EIM_A20__IPU_CSI1_D_15 IOMUX_PAD(0x4B8, 0x16C, 3, __NA_, 0, NO_PAD_CTRL) | ||
| 629 | #define MX53_PAD_EIM_A20__SRC_BT_CFG1_5 IOMUX_PAD(0x4B8, 0x16C, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 630 | #define MX53_PAD_EIM_A19__EMI_WEIM_A_19 IOMUX_PAD(0x4BC, 0x170, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 631 | #define MX53_PAD_EIM_A19__GPIO2_19 IOMUX_PAD(0x4BC, 0x170, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 632 | #define MX53_PAD_EIM_A19__IPU_DISP1_DAT_14 IOMUX_PAD(0x4BC, 0x170, 2, __NA_, 0, NO_PAD_CTRL) | ||
| 633 | #define MX53_PAD_EIM_A19__IPU_CSI1_D_14 IOMUX_PAD(0x4BC, 0x170, 3, __NA_, 0, NO_PAD_CTRL) | ||
| 634 | #define MX53_PAD_EIM_A19__SRC_BT_CFG1_4 IOMUX_PAD(0x4BC, 0x170, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 635 | #define MX53_PAD_EIM_A18__EMI_WEIM_A_18 IOMUX_PAD(0x4C0, 0x174, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 636 | #define MX53_PAD_EIM_A18__GPIO2_20 IOMUX_PAD(0x4C0, 0x174, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 637 | #define MX53_PAD_EIM_A18__IPU_DISP1_DAT_13 IOMUX_PAD(0x4C0, 0x174, 2, __NA_, 0, NO_PAD_CTRL) | ||
| 638 | #define MX53_PAD_EIM_A18__IPU_CSI1_D_13 IOMUX_PAD(0x4C0, 0x174, 3, __NA_, 0, NO_PAD_CTRL) | ||
| 639 | #define MX53_PAD_EIM_A18__SRC_BT_CFG1_3 IOMUX_PAD(0x4C0, 0x174, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 640 | #define MX53_PAD_EIM_A17__EMI_WEIM_A_17 IOMUX_PAD(0x4C4, 0x178, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 641 | #define MX53_PAD_EIM_A17__GPIO2_21 IOMUX_PAD(0x4C4, 0x178, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 642 | #define MX53_PAD_EIM_A17__IPU_DISP1_DAT_12 IOMUX_PAD(0x4C4, 0x178, 2, __NA_, 0, NO_PAD_CTRL) | ||
| 643 | #define MX53_PAD_EIM_A17__IPU_CSI1_D_12 IOMUX_PAD(0x4C4, 0x178, 3, __NA_, 0, NO_PAD_CTRL) | ||
| 644 | #define MX53_PAD_EIM_A17__SRC_BT_CFG1_2 IOMUX_PAD(0x4C4, 0x178, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 645 | #define MX53_PAD_EIM_A16__EMI_WEIM_A_16 IOMUX_PAD(0x4C8, 0x17C, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 646 | #define MX53_PAD_EIM_A16__GPIO2_22 IOMUX_PAD(0x4C8, 0x17C, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 647 | #define MX53_PAD_EIM_A16__IPU_DI1_DISP_CLK IOMUX_PAD(0x4C8, 0x17C, 2, __NA_, 0, NO_PAD_CTRL) | ||
| 648 | #define MX53_PAD_EIM_A16__IPU_CSI1_PIXCLK IOMUX_PAD(0x4C8, 0x17C, 3, __NA_, 0, NO_PAD_CTRL) | ||
| 649 | #define MX53_PAD_EIM_A16__SRC_BT_CFG1_1 IOMUX_PAD(0x4C8, 0x17C, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 650 | #define MX53_PAD_EIM_CS0__EMI_WEIM_CS_0 IOMUX_PAD(0x4CC, 0x180, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 651 | #define MX53_PAD_EIM_CS0__GPIO2_23 IOMUX_PAD(0x4CC, 0x180, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 652 | #define MX53_PAD_EIM_CS0__ECSPI2_SCLK IOMUX_PAD(0x4CC, 0x180, 2, 0x7B8, 2, NO_PAD_CTRL) | ||
| 653 | #define MX53_PAD_EIM_CS0__IPU_DI1_PIN5 IOMUX_PAD(0x4CC, 0x180, 3, __NA_, 0, NO_PAD_CTRL) | ||
| 654 | #define MX53_PAD_EIM_CS1__EMI_WEIM_CS_1 IOMUX_PAD(0x4D0, 0x184, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 655 | #define MX53_PAD_EIM_CS1__GPIO2_24 IOMUX_PAD(0x4D0, 0x184, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 656 | #define MX53_PAD_EIM_CS1__ECSPI2_MOSI IOMUX_PAD(0x4D0, 0x184, 2, 0x7C0, 2, NO_PAD_CTRL) | ||
| 657 | #define MX53_PAD_EIM_CS1__IPU_DI1_PIN6 IOMUX_PAD(0x4D0, 0x184, 3, __NA_, 0, NO_PAD_CTRL) | ||
| 658 | #define MX53_PAD_EIM_OE__EMI_WEIM_OE IOMUX_PAD(0x4D4, 0x188, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 659 | #define MX53_PAD_EIM_OE__GPIO2_25 IOMUX_PAD(0x4D4, 0x188, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 660 | #define MX53_PAD_EIM_OE__ECSPI2_MISO IOMUX_PAD(0x4D4, 0x188, 2, 0x7BC, 2, NO_PAD_CTRL) | ||
| 661 | #define MX53_PAD_EIM_OE__IPU_DI1_PIN7 IOMUX_PAD(0x4D4, 0x188, 3, __NA_, 0, NO_PAD_CTRL) | ||
| 662 | #define MX53_PAD_EIM_OE__USBPHY2_IDDIG IOMUX_PAD(0x4D4, 0x188, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 663 | #define MX53_PAD_EIM_RW__EMI_WEIM_RW IOMUX_PAD(0x4D8, 0x18C, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 664 | #define MX53_PAD_EIM_RW__GPIO2_26 IOMUX_PAD(0x4D8, 0x18C, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 665 | #define MX53_PAD_EIM_RW__ECSPI2_SS0 IOMUX_PAD(0x4D8, 0x18C, 2, 0x7C4, 2, NO_PAD_CTRL) | ||
| 666 | #define MX53_PAD_EIM_RW__IPU_DI1_PIN8 IOMUX_PAD(0x4D8, 0x18C, 3, __NA_, 0, NO_PAD_CTRL) | ||
| 667 | #define MX53_PAD_EIM_RW__USBPHY2_HOSTDISCONNECT IOMUX_PAD(0x4D8, 0x18C, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 668 | #define MX53_PAD_EIM_LBA__EMI_WEIM_LBA IOMUX_PAD(0x4DC, 0x190, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 669 | #define MX53_PAD_EIM_LBA__GPIO2_27 IOMUX_PAD(0x4DC, 0x190, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 670 | #define MX53_PAD_EIM_LBA__ECSPI2_SS1 IOMUX_PAD(0x4DC, 0x190, 2, 0x7C8, 1, NO_PAD_CTRL) | ||
| 671 | #define MX53_PAD_EIM_LBA__IPU_DI1_PIN17 IOMUX_PAD(0x4DC, 0x190, 3, __NA_, 0, NO_PAD_CTRL) | ||
| 672 | #define MX53_PAD_EIM_LBA__SRC_BT_CFG1_0 IOMUX_PAD(0x4DC, 0x190, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 673 | #define MX53_PAD_EIM_EB0__EMI_WEIM_EB_0 IOMUX_PAD(0x4E4, 0x194, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 674 | #define MX53_PAD_EIM_EB0__GPIO2_28 IOMUX_PAD(0x4E4, 0x194, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 675 | #define MX53_PAD_EIM_EB0__IPU_DISP1_DAT_11 IOMUX_PAD(0x4E4, 0x194, 3, __NA_, 0, NO_PAD_CTRL) | ||
| 676 | #define MX53_PAD_EIM_EB0__IPU_CSI1_D_11 IOMUX_PAD(0x4E4, 0x194, 4, __NA_, 0, NO_PAD_CTRL) | ||
| 677 | #define MX53_PAD_EIM_EB0__GPC_PMIC_RDY IOMUX_PAD(0x4E4, 0x194, 5, 0x810, 0, NO_PAD_CTRL) | ||
| 678 | #define MX53_PAD_EIM_EB0__SRC_BT_CFG2_7 IOMUX_PAD(0x4E4, 0x194, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 679 | #define MX53_PAD_EIM_EB1__EMI_WEIM_EB_1 IOMUX_PAD(0x4E8, 0x198, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 680 | #define MX53_PAD_EIM_EB1__GPIO2_29 IOMUX_PAD(0x4E8, 0x198, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 681 | #define MX53_PAD_EIM_EB1__IPU_DISP1_DAT_10 IOMUX_PAD(0x4E8, 0x198, 3, __NA_, 0, NO_PAD_CTRL) | ||
| 682 | #define MX53_PAD_EIM_EB1__IPU_CSI1_D_10 IOMUX_PAD(0x4E8, 0x198, 4, __NA_, 0, NO_PAD_CTRL) | ||
| 683 | #define MX53_PAD_EIM_EB1__SRC_BT_CFG2_6 IOMUX_PAD(0x4E8, 0x198, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 684 | #define MX53_PAD_EIM_DA0__EMI_NAND_WEIM_DA_0 IOMUX_PAD(0x4EC, 0x19C, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 685 | #define MX53_PAD_EIM_DA0__GPIO3_0 IOMUX_PAD(0x4EC, 0x19C, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 686 | #define MX53_PAD_EIM_DA0__IPU_DISP1_DAT_9 IOMUX_PAD(0x4EC, 0x19C, 3, __NA_, 0, NO_PAD_CTRL) | ||
| 687 | #define MX53_PAD_EIM_DA0__IPU_CSI1_D_9 IOMUX_PAD(0x4EC, 0x19C, 4, __NA_, 0, NO_PAD_CTRL) | ||
| 688 | #define MX53_PAD_EIM_DA0__SRC_BT_CFG2_5 IOMUX_PAD(0x4EC, 0x19C, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 689 | #define MX53_PAD_EIM_DA1__EMI_NAND_WEIM_DA_1 IOMUX_PAD(0x4F0, 0x1A0, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 690 | #define MX53_PAD_EIM_DA1__GPIO3_1 IOMUX_PAD(0x4F0, 0x1A0, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 691 | #define MX53_PAD_EIM_DA1__IPU_DISP1_DAT_8 IOMUX_PAD(0x4F0, 0x1A0, 3, __NA_, 0, NO_PAD_CTRL) | ||
| 692 | #define MX53_PAD_EIM_DA1__IPU_CSI1_D_8 IOMUX_PAD(0x4F0, 0x1A0, 4, __NA_, 0, NO_PAD_CTRL) | ||
| 693 | #define MX53_PAD_EIM_DA1__SRC_BT_CFG2_4 IOMUX_PAD(0x4F0, 0x1A0, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 694 | #define MX53_PAD_EIM_DA2__EMI_NAND_WEIM_DA_2 IOMUX_PAD(0x4F4, 0x1A4, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 695 | #define MX53_PAD_EIM_DA2__GPIO3_2 IOMUX_PAD(0x4F4, 0x1A4, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 696 | #define MX53_PAD_EIM_DA2__IPU_DISP1_DAT_7 IOMUX_PAD(0x4F4, 0x1A4, 3, __NA_, 0, NO_PAD_CTRL) | ||
| 697 | #define MX53_PAD_EIM_DA2__IPU_CSI1_D_7 IOMUX_PAD(0x4F4, 0x1A4, 4, __NA_, 0, NO_PAD_CTRL) | ||
| 698 | #define MX53_PAD_EIM_DA2__SRC_BT_CFG2_3 IOMUX_PAD(0x4F4, 0x1A4, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 699 | #define MX53_PAD_EIM_DA3__EMI_NAND_WEIM_DA_3 IOMUX_PAD(0x4F8, 0x1A8, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 700 | #define MX53_PAD_EIM_DA3__GPIO3_3 IOMUX_PAD(0x4F8, 0x1A8, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 701 | #define MX53_PAD_EIM_DA3__IPU_DISP1_DAT_6 IOMUX_PAD(0x4F8, 0x1A8, 3, __NA_, 0, NO_PAD_CTRL) | ||
| 702 | #define MX53_PAD_EIM_DA3__IPU_CSI1_D_6 IOMUX_PAD(0x4F8, 0x1A8, 4, __NA_, 0, NO_PAD_CTRL) | ||
| 703 | #define MX53_PAD_EIM_DA3__SRC_BT_CFG2_2 IOMUX_PAD(0x4F8, 0x1A8, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 704 | #define MX53_PAD_EIM_DA4__EMI_NAND_WEIM_DA_4 IOMUX_PAD(0x4FC, 0x1AC, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 705 | #define MX53_PAD_EIM_DA4__GPIO3_4 IOMUX_PAD(0x4FC, 0x1AC, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 706 | #define MX53_PAD_EIM_DA4__IPU_DISP1_DAT_5 IOMUX_PAD(0x4FC, 0x1AC, 3, __NA_, 0, NO_PAD_CTRL) | ||
| 707 | #define MX53_PAD_EIM_DA4__IPU_CSI1_D_5 IOMUX_PAD(0x4FC, 0x1AC, 4, __NA_, 0, NO_PAD_CTRL) | ||
| 708 | #define MX53_PAD_EIM_DA4__SRC_BT_CFG3_7 IOMUX_PAD(0x4FC, 0x1AC, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 709 | #define MX53_PAD_EIM_DA5__EMI_NAND_WEIM_DA_5 IOMUX_PAD(0x500, 0x1B0, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 710 | #define MX53_PAD_EIM_DA5__GPIO3_5 IOMUX_PAD(0x500, 0x1B0, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 711 | #define MX53_PAD_EIM_DA5__IPU_DISP1_DAT_4 IOMUX_PAD(0x500, 0x1B0, 3, __NA_, 0, NO_PAD_CTRL) | ||
| 712 | #define MX53_PAD_EIM_DA5__IPU_CSI1_D_4 IOMUX_PAD(0x500, 0x1B0, 4, __NA_, 0, NO_PAD_CTRL) | ||
| 713 | #define MX53_PAD_EIM_DA5__SRC_BT_CFG3_6 IOMUX_PAD(0x500, 0x1B0, 7 | IOMUX_CONFIG_SION, __NA_, 0, NO_PAD_CTRL) | ||
| 714 | #define MX53_PAD_EIM_DA6__EMI_NAND_WEIM_DA_6 IOMUX_PAD(0x504, 0x1B4, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 715 | #define MX53_PAD_EIM_DA6__GPIO3_6 IOMUX_PAD(0x504, 0x1B4, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 716 | #define MX53_PAD_EIM_DA6__IPU_DISP1_DAT_3 IOMUX_PAD(0x504, 0x1B4, 3, __NA_, 0, NO_PAD_CTRL) | ||
| 717 | #define MX53_PAD_EIM_DA6__IPU_CSI1_D_3 IOMUX_PAD(0x504, 0x1B4, 4, __NA_, 0, NO_PAD_CTRL) | ||
| 718 | #define MX53_PAD_EIM_DA6__SRC_BT_CFG3_5 IOMUX_PAD(0x504, 0x1B4, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 719 | #define MX53_PAD_EIM_DA7__EMI_NAND_WEIM_DA_7 IOMUX_PAD(0x508, 0x1B8, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 720 | #define MX53_PAD_EIM_DA7__GPIO3_7 IOMUX_PAD(0x508, 0x1B8, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 721 | #define MX53_PAD_EIM_DA7__IPU_DISP1_DAT_2 IOMUX_PAD(0x508, 0x1B8, 3, __NA_, 0, NO_PAD_CTRL) | ||
| 722 | #define MX53_PAD_EIM_DA7__IPU_CSI1_D_2 IOMUX_PAD(0x508, 0x1B8, 4, __NA_, 0, NO_PAD_CTRL) | ||
| 723 | #define MX53_PAD_EIM_DA7__SRC_BT_CFG3_4 IOMUX_PAD(0x508, 0x1B8, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 724 | #define MX53_PAD_EIM_DA8__EMI_NAND_WEIM_DA_8 IOMUX_PAD(0x50C, 0x1BC, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 725 | #define MX53_PAD_EIM_DA8__GPIO3_8 IOMUX_PAD(0x50C, 0x1BC, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 726 | #define MX53_PAD_EIM_DA8__IPU_DISP1_DAT_1 IOMUX_PAD(0x50C, 0x1BC, 3, __NA_, 0, NO_PAD_CTRL) | ||
| 727 | #define MX53_PAD_EIM_DA8__IPU_CSI1_D_1 IOMUX_PAD(0x50C, 0x1BC, 4, __NA_, 0, NO_PAD_CTRL) | ||
| 728 | #define MX53_PAD_EIM_DA8__SRC_BT_CFG3_3 IOMUX_PAD(0x50C, 0x1BC, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 729 | #define MX53_PAD_EIM_DA9__EMI_NAND_WEIM_DA_9 IOMUX_PAD(0x510, 0x1C0, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 730 | #define MX53_PAD_EIM_DA9__GPIO3_9 IOMUX_PAD(0x510, 0x1C0, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 731 | #define MX53_PAD_EIM_DA9__IPU_DISP1_DAT_0 IOMUX_PAD(0x510, 0x1C0, 3, __NA_, 0, NO_PAD_CTRL) | ||
| 732 | #define MX53_PAD_EIM_DA9__IPU_CSI1_D_0 IOMUX_PAD(0x510, 0x1C0, 4, __NA_, 0, NO_PAD_CTRL) | ||
| 733 | #define MX53_PAD_EIM_DA9__SRC_BT_CFG3_2 IOMUX_PAD(0x510, 0x1C0, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 734 | #define MX53_PAD_EIM_DA10__EMI_NAND_WEIM_DA_10 IOMUX_PAD(0x514, 0x1C4, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 735 | #define MX53_PAD_EIM_DA10__GPIO3_10 IOMUX_PAD(0x514, 0x1C4, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 736 | #define MX53_PAD_EIM_DA10__IPU_DI1_PIN15 IOMUX_PAD(0x514, 0x1C4, 3, __NA_, 0, NO_PAD_CTRL) | ||
| 737 | #define MX53_PAD_EIM_DA10__IPU_CSI1_DATA_EN IOMUX_PAD(0x514, 0x1C4, 4, 0x834, 1, NO_PAD_CTRL) | ||
| 738 | #define MX53_PAD_EIM_DA10__SRC_BT_CFG3_1 IOMUX_PAD(0x514, 0x1C4, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 739 | #define MX53_PAD_EIM_DA11__EMI_NAND_WEIM_DA_11 IOMUX_PAD(0x518, 0x1C8, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 740 | #define MX53_PAD_EIM_DA11__GPIO3_11 IOMUX_PAD(0x518, 0x1C8, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 741 | #define MX53_PAD_EIM_DA11__IPU_DI1_PIN2 IOMUX_PAD(0x518, 0x1C8, 3, __NA_, 0, NO_PAD_CTRL) | ||
| 742 | #define MX53_PAD_EIM_DA11__IPU_CSI1_HSYNC IOMUX_PAD(0x518, 0x1C8, 4, 0x838, 1, NO_PAD_CTRL) | ||
| 743 | #define MX53_PAD_EIM_DA12__EMI_NAND_WEIM_DA_12 IOMUX_PAD(0x51C, 0x1CC, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 744 | #define MX53_PAD_EIM_DA12__GPIO3_12 IOMUX_PAD(0x51C, 0x1CC, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 745 | #define MX53_PAD_EIM_DA12__IPU_DI1_PIN3 IOMUX_PAD(0x51C, 0x1CC, 3, __NA_, 0, NO_PAD_CTRL) | ||
| 746 | #define MX53_PAD_EIM_DA12__IPU_CSI1_VSYNC IOMUX_PAD(0x51C, 0x1CC, 4, 0x83C, 1, NO_PAD_CTRL) | ||
| 747 | #define MX53_PAD_EIM_DA13__EMI_NAND_WEIM_DA_13 IOMUX_PAD(0x520, 0x1D0, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 748 | #define MX53_PAD_EIM_DA13__GPIO3_13 IOMUX_PAD(0x520, 0x1D0, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 749 | #define MX53_PAD_EIM_DA13__IPU_DI1_D0_CS IOMUX_PAD(0x520, 0x1D0, 3, __NA_, 0, NO_PAD_CTRL) | ||
| 750 | #define MX53_PAD_EIM_DA13__CCM_DI1_EXT_CLK IOMUX_PAD(0x520, 0x1D0, 4, 0x76C, 1, NO_PAD_CTRL) | ||
| 751 | #define MX53_PAD_EIM_DA14__EMI_NAND_WEIM_DA_14 IOMUX_PAD(0x524, 0x1D4, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 752 | #define MX53_PAD_EIM_DA14__GPIO3_14 IOMUX_PAD(0x524, 0x1D4, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 753 | #define MX53_PAD_EIM_DA14__IPU_DI1_D1_CS IOMUX_PAD(0x524, 0x1D4, 3, __NA_, 0, NO_PAD_CTRL) | ||
| 754 | #define MX53_PAD_EIM_DA14__CCM_DI0_EXT_CLK IOMUX_PAD(0x524, 0x1D4, 4, __NA_, 0, NO_PAD_CTRL) | ||
| 755 | #define MX53_PAD_EIM_DA15__EMI_NAND_WEIM_DA_15 IOMUX_PAD(0x528, 0x1D8, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 756 | #define MX53_PAD_EIM_DA15__GPIO3_15 IOMUX_PAD(0x528, 0x1D8, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 757 | #define MX53_PAD_EIM_DA15__IPU_DI1_PIN1 IOMUX_PAD(0x528, 0x1D8, 3, __NA_, 0, NO_PAD_CTRL) | ||
| 758 | #define MX53_PAD_EIM_DA15__IPU_DI1_PIN4 IOMUX_PAD(0x528, 0x1D8, 4, __NA_, 0, NO_PAD_CTRL) | ||
| 759 | #define MX53_PAD_NANDF_WE_B__EMI_NANDF_WE_B IOMUX_PAD(0x52C, 0x1DC, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 760 | #define MX53_PAD_NANDF_WE_B__GPIO6_12 IOMUX_PAD(0x52C, 0x1DC, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 761 | #define MX53_PAD_NANDF_RE_B__EMI_NANDF_RE_B IOMUX_PAD(0x530, 0x1E0, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 762 | #define MX53_PAD_NANDF_RE_B__GPIO6_13 IOMUX_PAD(0x530, 0x1E0, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 763 | #define MX53_PAD_EIM_WAIT__EMI_WEIM_WAIT IOMUX_PAD(0x534, 0x1E4, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 764 | #define MX53_PAD_EIM_WAIT__GPIO5_0 IOMUX_PAD(0x534, 0x1E4, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 765 | #define MX53_PAD_EIM_WAIT__EMI_WEIM_DTACK_B IOMUX_PAD(0x534, 0x1E4, 2, __NA_, 0, NO_PAD_CTRL) | ||
| 766 | #define MX53_PAD_LVDS1_TX3_P__GPIO6_22 IOMUX_PAD(__NA_, 0x1EC, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 767 | #define MX53_PAD_LVDS1_TX3_P__LDB_LVDS1_TX3 IOMUX_PAD(__NA_, 0x1EC, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 768 | #define MX53_PAD_LVDS1_TX2_P__GPIO6_24 IOMUX_PAD(__NA_, 0x1F0, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 769 | #define MX53_PAD_LVDS1_TX2_P__LDB_LVDS1_TX2 IOMUX_PAD(__NA_, 0x1F0, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 770 | #define MX53_PAD_LVDS1_CLK_P__GPIO6_26 IOMUX_PAD(__NA_, 0x1F4, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 771 | #define MX53_PAD_LVDS1_CLK_P__LDB_LVDS1_CLK IOMUX_PAD(__NA_, 0x1F4, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 772 | #define MX53_PAD_LVDS1_TX1_P__GPIO6_28 IOMUX_PAD(__NA_, 0x1F8, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 773 | #define MX53_PAD_LVDS1_TX1_P__LDB_LVDS1_TX1 IOMUX_PAD(__NA_, 0x1F8, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 774 | #define MX53_PAD_LVDS1_TX0_P__GPIO6_30 IOMUX_PAD(__NA_, 0x1FC, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 775 | #define MX53_PAD_LVDS1_TX0_P__LDB_LVDS1_TX0 IOMUX_PAD(__NA_, 0x1FC, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 776 | #define MX53_PAD_LVDS0_TX3_P__GPIO7_22 IOMUX_PAD(__NA_, 0x200, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 777 | #define MX53_PAD_LVDS0_TX3_P__LDB_LVDS0_TX3 IOMUX_PAD(__NA_, 0x200, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 778 | #define MX53_PAD_LVDS0_CLK_P__GPIO7_24 IOMUX_PAD(__NA_, 0x204, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 779 | #define MX53_PAD_LVDS0_CLK_P__LDB_LVDS0_CLK IOMUX_PAD(__NA_, 0x204, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 780 | #define MX53_PAD_LVDS0_TX2_P__GPIO7_26 IOMUX_PAD(__NA_, 0x208, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 781 | #define MX53_PAD_LVDS0_TX2_P__LDB_LVDS0_TX2 IOMUX_PAD(__NA_, 0x208, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 782 | #define MX53_PAD_LVDS0_TX1_P__GPIO7_28 IOMUX_PAD(__NA_, 0x20C, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 783 | #define MX53_PAD_LVDS0_TX1_P__LDB_LVDS0_TX1 IOMUX_PAD(__NA_, 0x20C, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 784 | #define MX53_PAD_LVDS0_TX0_P__GPIO7_30 IOMUX_PAD(__NA_, 0x210, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 785 | #define MX53_PAD_LVDS0_TX0_P__LDB_LVDS0_TX0 IOMUX_PAD(__NA_, 0x210, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 786 | #define MX53_PAD_GPIO_10__GPIO4_0 IOMUX_PAD(0x540, 0x214, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 787 | #define MX53_PAD_GPIO_10__OSC32k_32K_OUT IOMUX_PAD(0x540, 0x214, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 788 | #define MX53_PAD_GPIO_11__GPIO4_1 IOMUX_PAD(0x544, 0x218, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 789 | #define MX53_PAD_GPIO_12__GPIO4_2 IOMUX_PAD(0x548, 0x21C, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 790 | #define MX53_PAD_GPIO_13__GPIO4_3 IOMUX_PAD(0x54C, 0x220, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 791 | #define MX53_PAD_GPIO_14__GPIO4_4 IOMUX_PAD(0x550, 0x224, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 792 | #define MX53_PAD_NANDF_CLE__EMI_NANDF_CLE IOMUX_PAD(0x5A0, 0x228, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 793 | #define MX53_PAD_NANDF_CLE__GPIO6_7 IOMUX_PAD(0x5A0, 0x228, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 794 | #define MX53_PAD_NANDF_CLE__USBPHY1_VSTATUS_0 IOMUX_PAD(0x5A0, 0x228, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 795 | #define MX53_PAD_NANDF_ALE__EMI_NANDF_ALE IOMUX_PAD(0x5A4, 0x22C, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 796 | #define MX53_PAD_NANDF_ALE__GPIO6_8 IOMUX_PAD(0x5A4, 0x22C, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 797 | #define MX53_PAD_NANDF_ALE__USBPHY1_VSTATUS_1 IOMUX_PAD(0x5A4, 0x22C, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 798 | #define MX53_PAD_NANDF_WP_B__EMI_NANDF_WP_B IOMUX_PAD(0x5A8, 0x230, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 799 | #define MX53_PAD_NANDF_WP_B__GPIO6_9 IOMUX_PAD(0x5A8, 0x230, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 800 | #define MX53_PAD_NANDF_WP_B__USBPHY1_VSTATUS_2 IOMUX_PAD(0x5A8, 0x230, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 801 | #define MX53_PAD_NANDF_RB0__EMI_NANDF_RB_0 IOMUX_PAD(0x5AC, 0x234, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 802 | #define MX53_PAD_NANDF_RB0__GPIO6_10 IOMUX_PAD(0x5AC, 0x234, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 803 | #define MX53_PAD_NANDF_RB0__USBPHY1_VSTATUS_3 IOMUX_PAD(0x5AC, 0x234, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 804 | #define MX53_PAD_NANDF_CS0__EMI_NANDF_CS_0 IOMUX_PAD(0x5B0, 0x238, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 805 | #define MX53_PAD_NANDF_CS0__GPIO6_11 IOMUX_PAD(0x5B0, 0x238, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 806 | #define MX53_PAD_NANDF_CS0__USBPHY1_VSTATUS_4 IOMUX_PAD(0x5B0, 0x238, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 807 | #define MX53_PAD_NANDF_CS1__EMI_NANDF_CS_1 IOMUX_PAD(0x5B4, 0x23C, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 808 | #define MX53_PAD_NANDF_CS1__GPIO6_14 IOMUX_PAD(0x5B4, 0x23C, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 809 | #define MX53_PAD_NANDF_CS1__MLB_MLBCLK IOMUX_PAD(0x5B4, 0x23C, 6, 0x858, 0, NO_PAD_CTRL) | ||
| 810 | #define MX53_PAD_NANDF_CS1__USBPHY1_VSTATUS_5 IOMUX_PAD(0x5B4, 0x23C, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 811 | #define MX53_PAD_NANDF_CS2__EMI_NANDF_CS_2 IOMUX_PAD(0x5B8, 0x240, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 812 | #define MX53_PAD_NANDF_CS2__GPIO6_15 IOMUX_PAD(0x5B8, 0x240, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 813 | #define MX53_PAD_NANDF_CS2__IPU_SISG_0 IOMUX_PAD(0x5B8, 0x240, 2, __NA_, 0, NO_PAD_CTRL) | ||
| 814 | #define MX53_PAD_NANDF_CS2__ESAI1_TX0 IOMUX_PAD(0x5B8, 0x240, 3, 0x7E4, 0, NO_PAD_CTRL) | ||
| 815 | #define MX53_PAD_NANDF_CS2__EMI_WEIM_CRE IOMUX_PAD(0x5B8, 0x240, 4, __NA_, 0, NO_PAD_CTRL) | ||
| 816 | #define MX53_PAD_NANDF_CS2__CCM_CSI0_MCLK IOMUX_PAD(0x5B8, 0x240, 5, __NA_, 0, NO_PAD_CTRL) | ||
| 817 | #define MX53_PAD_NANDF_CS2__MLB_MLBSIG IOMUX_PAD(0x5B8, 0x240, 6, 0x860, 0, NO_PAD_CTRL) | ||
| 818 | #define MX53_PAD_NANDF_CS2__USBPHY1_VSTATUS_6 IOMUX_PAD(0x5B8, 0x240, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 819 | #define MX53_PAD_NANDF_CS3__EMI_NANDF_CS_3 IOMUX_PAD(0x5BC, 0x244, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 820 | #define MX53_PAD_NANDF_CS3__GPIO6_16 IOMUX_PAD(0x5BC, 0x244, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 821 | #define MX53_PAD_NANDF_CS3__IPU_SISG_1 IOMUX_PAD(0x5BC, 0x244, 2, __NA_, 0, NO_PAD_CTRL) | ||
| 822 | #define MX53_PAD_NANDF_CS3__ESAI1_TX1 IOMUX_PAD(0x5BC, 0x244, 3, 0x7E8, 0, NO_PAD_CTRL) | ||
| 823 | #define MX53_PAD_NANDF_CS3__EMI_WEIM_A_26 IOMUX_PAD(0x5BC, 0x244, 4, __NA_, 0, NO_PAD_CTRL) | ||
| 824 | #define MX53_PAD_NANDF_CS3__MLB_MLBDAT IOMUX_PAD(0x5BC, 0x244, 6, 0x85C, 0, NO_PAD_CTRL) | ||
| 825 | #define MX53_PAD_NANDF_CS3__USBPHY1_VSTATUS_7 IOMUX_PAD(0x5BC, 0x244, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 826 | #define MX53_PAD_FEC_MDIO__FEC_MDIO IOMUX_PAD(0x5C4, 0x248, 0, 0x804, 1, NO_PAD_CTRL) | ||
| 827 | #define MX53_PAD_FEC_MDIO__GPIO1_22 IOMUX_PAD(0x5C4, 0x248, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 828 | #define MX53_PAD_FEC_MDIO__ESAI1_SCKR IOMUX_PAD(0x5C4, 0x248, 2, 0x7DC, 0, NO_PAD_CTRL) | ||
| 829 | #define MX53_PAD_FEC_MDIO__FEC_COL IOMUX_PAD(0x5C4, 0x248, 3, 0x800, 1, NO_PAD_CTRL) | ||
| 830 | #define MX53_PAD_FEC_MDIO__RTC_CE_RTC_PS2 IOMUX_PAD(0x5C4, 0x248, 4, __NA_, 0, NO_PAD_CTRL) | ||
| 831 | #define MX53_PAD_FEC_MDIO__SDMA_DEBUG_BUS_DEVICE_3 IOMUX_PAD(0x5C4, 0x248, 5, __NA_, 0, NO_PAD_CTRL) | ||
| 832 | #define MX53_PAD_FEC_MDIO__EMI_EMI_DEBUG_49 IOMUX_PAD(0x5C4, 0x248, 6, __NA_, 0, NO_PAD_CTRL) | ||
| 833 | #define MX53_PAD_FEC_REF_CLK__FEC_TX_CLK IOMUX_PAD(0x5C8, 0x24C, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 834 | #define MX53_PAD_FEC_REF_CLK__GPIO1_23 IOMUX_PAD(0x5C8, 0x24C, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 835 | #define MX53_PAD_FEC_REF_CLK__ESAI1_FSR IOMUX_PAD(0x5C8, 0x24C, 2, 0x7CC, 0, NO_PAD_CTRL) | ||
| 836 | #define MX53_PAD_FEC_REF_CLK__SDMA_DEBUG_BUS_DEVICE_4 IOMUX_PAD(0x5C8, 0x24C, 5, __NA_, 0, NO_PAD_CTRL) | ||
| 837 | #define MX53_PAD_FEC_REF_CLK__EMI_EMI_DEBUG_50 IOMUX_PAD(0x5C8, 0x24C, 6, __NA_, 0, NO_PAD_CTRL) | ||
| 838 | #define MX53_PAD_FEC_RX_ER__FEC_RX_ER IOMUX_PAD(0x5CC, 0x250, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 839 | #define MX53_PAD_FEC_RX_ER__GPIO1_24 IOMUX_PAD(0x5CC, 0x250, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 840 | #define MX53_PAD_FEC_RX_ER__ESAI1_HCKR IOMUX_PAD(0x5CC, 0x250, 2, 0x7D4, 0, NO_PAD_CTRL) | ||
| 841 | #define MX53_PAD_FEC_RX_ER__FEC_RX_CLK IOMUX_PAD(0x5CC, 0x250, 3, 0x808, 1, NO_PAD_CTRL) | ||
| 842 | #define MX53_PAD_FEC_RX_ER__RTC_CE_RTC_PS3 IOMUX_PAD(0x5CC, 0x250, 4, __NA_, 0, NO_PAD_CTRL) | ||
| 843 | #define MX53_PAD_FEC_CRS_DV__FEC_RX_DV IOMUX_PAD(0x5D0, 0x254, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 844 | #define MX53_PAD_FEC_CRS_DV__GPIO1_25 IOMUX_PAD(0x5D0, 0x254, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 845 | #define MX53_PAD_FEC_CRS_DV__ESAI1_SCKT IOMUX_PAD(0x5D0, 0x254, 2, 0x7E0, 0, NO_PAD_CTRL) | ||
| 846 | #define MX53_PAD_FEC_RXD1__FEC_RDATA_1 IOMUX_PAD(0x5D4, 0x258, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 847 | #define MX53_PAD_FEC_RXD1__GPIO1_26 IOMUX_PAD(0x5D4, 0x258, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 848 | #define MX53_PAD_FEC_RXD1__ESAI1_FST IOMUX_PAD(0x5D4, 0x258, 2, 0x7D0, 0, NO_PAD_CTRL) | ||
| 849 | #define MX53_PAD_FEC_RXD1__MLB_MLBSIG IOMUX_PAD(0x5D4, 0x258, 3, 0x860, 1, NO_PAD_CTRL) | ||
| 850 | #define MX53_PAD_FEC_RXD1__RTC_CE_RTC_PS1 IOMUX_PAD(0x5D4, 0x258, 4, __NA_, 0, NO_PAD_CTRL) | ||
| 851 | #define MX53_PAD_FEC_RXD0__FEC_RDATA_0 IOMUX_PAD(0x5D8, 0x25C, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 852 | #define MX53_PAD_FEC_RXD0__GPIO1_27 IOMUX_PAD(0x5D8, 0x25C, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 853 | #define MX53_PAD_FEC_RXD0__ESAI1_HCKT IOMUX_PAD(0x5D8, 0x25C, 2, 0x7D8, 0, NO_PAD_CTRL) | ||
| 854 | #define MX53_PAD_FEC_RXD0__OSC32k_32K_OUT IOMUX_PAD(0x5D8, 0x25C, 3, __NA_, 0, NO_PAD_CTRL) | ||
| 855 | #define MX53_PAD_FEC_TX_EN__FEC_TX_EN IOMUX_PAD(0x5DC, 0x260, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 856 | #define MX53_PAD_FEC_TX_EN__GPIO1_28 IOMUX_PAD(0x5DC, 0x260, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 857 | #define MX53_PAD_FEC_TX_EN__ESAI1_TX3_RX2 IOMUX_PAD(0x5DC, 0x260, 2, 0x7F0, 0, NO_PAD_CTRL) | ||
| 858 | #define MX53_PAD_FEC_TXD1__FEC_TDATA_1 IOMUX_PAD(0x5E0, 0x264, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 859 | #define MX53_PAD_FEC_TXD1__GPIO1_29 IOMUX_PAD(0x5E0, 0x264, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 860 | #define MX53_PAD_FEC_TXD1__ESAI1_TX2_RX3 IOMUX_PAD(0x5E0, 0x264, 2, 0x7EC, 0, NO_PAD_CTRL) | ||
| 861 | #define MX53_PAD_FEC_TXD1__MLB_MLBCLK IOMUX_PAD(0x5E0, 0x264, 3, 0x858, 1, NO_PAD_CTRL) | ||
| 862 | #define MX53_PAD_FEC_TXD1__RTC_CE_RTC_PRSC_CLK IOMUX_PAD(0x5E0, 0x264, 4, __NA_, 0, NO_PAD_CTRL) | ||
| 863 | #define MX53_PAD_FEC_TXD0__FEC_TDATA_0 IOMUX_PAD(0x5E4, 0x268, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 864 | #define MX53_PAD_FEC_TXD0__GPIO1_30 IOMUX_PAD(0x5E4, 0x268, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 865 | #define MX53_PAD_FEC_TXD0__ESAI1_TX4_RX1 IOMUX_PAD(0x5E4, 0x268, 2, 0x7F4, 0, NO_PAD_CTRL) | ||
| 866 | #define MX53_PAD_FEC_TXD0__USBPHY2_DATAOUT_0 IOMUX_PAD(0x5E4, 0x268, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 867 | #define MX53_PAD_FEC_MDC__FEC_MDC IOMUX_PAD(0x5E8, 0x26C, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 868 | #define MX53_PAD_FEC_MDC__GPIO1_31 IOMUX_PAD(0x5E8, 0x26C, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 869 | #define MX53_PAD_FEC_MDC__ESAI1_TX5_RX0 IOMUX_PAD(0x5E8, 0x26C, 2, 0x7F8, 0, NO_PAD_CTRL) | ||
| 870 | #define MX53_PAD_FEC_MDC__MLB_MLBDAT IOMUX_PAD(0x5E8, 0x26C, 3, 0x85C, 1, NO_PAD_CTRL) | ||
| 871 | #define MX53_PAD_FEC_MDC__RTC_CE_RTC_ALARM1_TRIG IOMUX_PAD(0x5E8, 0x26C, 4, __NA_, 0, NO_PAD_CTRL) | ||
| 872 | #define MX53_PAD_FEC_MDC__USBPHY2_DATAOUT_1 IOMUX_PAD(0x5E8, 0x26C, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 873 | #define MX53_PAD_PATA_DIOW__PATA_DIOW IOMUX_PAD(0x5F0, 0x270, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 874 | #define MX53_PAD_PATA_DIOW__GPIO6_17 IOMUX_PAD(0x5F0, 0x270, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 875 | #define MX53_PAD_PATA_DIOW__UART1_TXD_MUX IOMUX_PAD(0x5F0, 0x270, 3, __NA_, 0, MX53_UART_PAD_CTRL) | ||
| 876 | #define MX53_PAD_PATA_DIOW__USBPHY2_DATAOUT_2 IOMUX_PAD(0x5F0, 0x270, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 877 | #define MX53_PAD_PATA_DMACK__PATA_DMACK IOMUX_PAD(0x5F4, 0x274, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 878 | #define MX53_PAD_PATA_DMACK__GPIO6_18 IOMUX_PAD(0x5F4, 0x274, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 879 | #define MX53_PAD_PATA_DMACK__UART1_RXD_MUX IOMUX_PAD(0x5F4, 0x274, 3, 0x878, 3, MX53_UART_PAD_CTRL) | ||
| 880 | #define MX53_PAD_PATA_DMACK__USBPHY2_DATAOUT_3 IOMUX_PAD(0x5F4, 0x274, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 881 | #define MX53_PAD_PATA_DMARQ__PATA_DMARQ IOMUX_PAD(0x5F8, 0x278, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 882 | #define MX53_PAD_PATA_DMARQ__GPIO7_0 IOMUX_PAD(0x5F8, 0x278, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 883 | #define MX53_PAD_PATA_DMARQ__UART2_TXD_MUX IOMUX_PAD(0x5F8, 0x278, 3, __NA_, 0, MX53_UART_PAD_CTRL) | ||
| 884 | #define MX53_PAD_PATA_DMARQ__CCM_CCM_OUT_0 IOMUX_PAD(0x5F8, 0x278, 5, __NA_, 0, NO_PAD_CTRL) | ||
| 885 | #define MX53_PAD_PATA_DMARQ__USBPHY2_DATAOUT_4 IOMUX_PAD(0x5F8, 0x278, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 886 | #define MX53_PAD_PATA_BUFFER_EN__PATA_BUFFER_EN IOMUX_PAD(0x5FC, 0x27C, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 887 | #define MX53_PAD_PATA_BUFFER_EN__GPIO7_1 IOMUX_PAD(0x5FC, 0x27C, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 888 | #define MX53_PAD_PATA_BUFFER_EN__UART2_RXD_MUX IOMUX_PAD(0x5FC, 0x27C, 3, 0x880, 3, MX53_UART_PAD_CTRL) | ||
| 889 | #define MX53_PAD_PATA_BUFFER_EN__CCM_CCM_OUT_1 IOMUX_PAD(0x5FC, 0x27C, 5, __NA_, 0, NO_PAD_CTRL) | ||
| 890 | #define MX53_PAD_PATA_BUFFER_EN__USBPHY2_DATAOUT_5 IOMUX_PAD(0x5FC, 0x27C, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 891 | #define MX53_PAD_PATA_INTRQ__PATA_INTRQ IOMUX_PAD(0x600, 0x280, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 892 | #define MX53_PAD_PATA_INTRQ__GPIO7_2 IOMUX_PAD(0x600, 0x280, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 893 | #define MX53_PAD_PATA_INTRQ__UART2_CTS IOMUX_PAD(0x600, 0x280, 3, __NA_, 0, MX53_UART_PAD_CTRL) | ||
| 894 | #define MX53_PAD_PATA_INTRQ__CAN1_TXCAN IOMUX_PAD(0x600, 0x280, 4, __NA_, 0, NO_PAD_CTRL) | ||
| 895 | #define MX53_PAD_PATA_INTRQ__CCM_CCM_OUT_2 IOMUX_PAD(0x600, 0x280, 5, __NA_, 0, NO_PAD_CTRL) | ||
| 896 | #define MX53_PAD_PATA_INTRQ__USBPHY2_DATAOUT_6 IOMUX_PAD(0x600, 0x280, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 897 | #define MX53_PAD_PATA_DIOR__PATA_DIOR IOMUX_PAD(0x604, 0x284, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 898 | #define MX53_PAD_PATA_DIOR__GPIO7_3 IOMUX_PAD(0x604, 0x284, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 899 | #define MX53_PAD_PATA_DIOR__UART2_RTS IOMUX_PAD(0x604, 0x284, 3, 0x87C, 3, MX53_UART_PAD_CTRL) | ||
| 900 | #define MX53_PAD_PATA_DIOR__CAN1_RXCAN IOMUX_PAD(0x604, 0x284, 4, 0x760, 1, NO_PAD_CTRL) | ||
| 901 | #define MX53_PAD_PATA_DIOR__USBPHY2_DATAOUT_7 IOMUX_PAD(0x604, 0x284, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 902 | #define MX53_PAD_PATA_RESET_B__PATA_PATA_RESET_B IOMUX_PAD(0x608, 0x288, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 903 | #define MX53_PAD_PATA_RESET_B__GPIO7_4 IOMUX_PAD(0x608, 0x288, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 904 | #define MX53_PAD_PATA_RESET_B__ESDHC3_CMD IOMUX_PAD(0x608, 0x288, 2, __NA_, 0, MX53_SDHC_PAD_CTRL) | ||
| 905 | #define MX53_PAD_PATA_RESET_B__UART1_CTS IOMUX_PAD(0x608, 0x288, 3, __NA_, 0, MX53_UART_PAD_CTRL) | ||
| 906 | #define MX53_PAD_PATA_RESET_B__CAN2_TXCAN IOMUX_PAD(0x608, 0x288, 4, __NA_, 0, NO_PAD_CTRL) | ||
| 907 | #define MX53_PAD_PATA_RESET_B__USBPHY1_DATAOUT_0 IOMUX_PAD(0x608, 0x288, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 908 | #define MX53_PAD_PATA_IORDY__PATA_IORDY IOMUX_PAD(0x60C, 0x28C, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 909 | #define MX53_PAD_PATA_IORDY__GPIO7_5 IOMUX_PAD(0x60C, 0x28C, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 910 | #define MX53_PAD_PATA_IORDY__ESDHC3_CLK IOMUX_PAD(0x60C, 0x28C, 2, __NA_, 0, MX53_SDHC_PAD_CTRL) | ||
| 911 | #define MX53_PAD_PATA_IORDY__UART1_RTS IOMUX_PAD(0x60C, 0x28C, 3, 0x874, 3, MX53_UART_PAD_CTRL) | ||
| 912 | #define MX53_PAD_PATA_IORDY__CAN2_RXCAN IOMUX_PAD(0x60C, 0x28C, 4, 0x764, 1, NO_PAD_CTRL) | ||
| 913 | #define MX53_PAD_PATA_IORDY__USBPHY1_DATAOUT_1 IOMUX_PAD(0x60C, 0x28C, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 914 | #define MX53_PAD_PATA_DA_0__PATA_DA_0 IOMUX_PAD(0x610, 0x290, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 915 | #define MX53_PAD_PATA_DA_0__GPIO7_6 IOMUX_PAD(0x610, 0x290, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 916 | #define MX53_PAD_PATA_DA_0__ESDHC3_RST IOMUX_PAD(0x610, 0x290, 2, __NA_, 0, NO_PAD_CTRL) | ||
| 917 | #define MX53_PAD_PATA_DA_0__OWIRE_LINE IOMUX_PAD(0x610, 0x290, 4, 0x864, 0, NO_PAD_CTRL) | ||
| 918 | #define MX53_PAD_PATA_DA_0__USBPHY1_DATAOUT_2 IOMUX_PAD(0x610, 0x290, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 919 | #define MX53_PAD_PATA_DA_1__PATA_DA_1 IOMUX_PAD(0x614, 0x294, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 920 | #define MX53_PAD_PATA_DA_1__GPIO7_7 IOMUX_PAD(0x614, 0x294, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 921 | #define MX53_PAD_PATA_DA_1__ESDHC4_CMD IOMUX_PAD(0x614, 0x294, 2, __NA_, 0, MX53_SDHC_PAD_CTRL) | ||
| 922 | #define MX53_PAD_PATA_DA_1__UART3_CTS IOMUX_PAD(0x614, 0x294, 4, __NA_, 0, MX53_UART_PAD_CTRL) | ||
| 923 | #define MX53_PAD_PATA_DA_1__USBPHY1_DATAOUT_3 IOMUX_PAD(0x614, 0x294, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 924 | #define MX53_PAD_PATA_DA_2__PATA_DA_2 IOMUX_PAD(0x618, 0x298, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 925 | #define MX53_PAD_PATA_DA_2__GPIO7_8 IOMUX_PAD(0x618, 0x298, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 926 | #define MX53_PAD_PATA_DA_2__ESDHC4_CLK IOMUX_PAD(0x618, 0x298, 2, __NA_, 0, MX53_SDHC_PAD_CTRL) | ||
| 927 | #define MX53_PAD_PATA_DA_2__UART3_RTS IOMUX_PAD(0x618, 0x298, 4, 0x884, 5, MX53_UART_PAD_CTRL) | ||
| 928 | #define MX53_PAD_PATA_DA_2__USBPHY1_DATAOUT_4 IOMUX_PAD(0x618, 0x298, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 929 | #define MX53_PAD_PATA_CS_0__PATA_CS_0 IOMUX_PAD(0x61C, 0x29C, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 930 | #define MX53_PAD_PATA_CS_0__GPIO7_9 IOMUX_PAD(0x61C, 0x29C, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 931 | #define MX53_PAD_PATA_CS_0__UART3_TXD_MUX IOMUX_PAD(0x61C, 0x29C, 4, __NA_, 0, MX53_UART_PAD_CTRL) | ||
| 932 | #define MX53_PAD_PATA_CS_0__USBPHY1_DATAOUT_5 IOMUX_PAD(0x61C, 0x29C, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 933 | #define MX53_PAD_PATA_CS_1__PATA_CS_1 IOMUX_PAD(0x620, 0x2A0, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 934 | #define MX53_PAD_PATA_CS_1__GPIO7_10 IOMUX_PAD(0x620, 0x2A0, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 935 | #define MX53_PAD_PATA_CS_1__UART3_RXD_MUX IOMUX_PAD(0x620, 0x2A0, 4, 0x888, 3, MX53_UART_PAD_CTRL) | ||
| 936 | #define MX53_PAD_PATA_CS_1__USBPHY1_DATAOUT_6 IOMUX_PAD(0x620, 0x2A0, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 937 | #define MX53_PAD_PATA_DATA0__PATA_DATA_0 IOMUX_PAD(0x628, 0x2A4, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 938 | #define MX53_PAD_PATA_DATA0__GPIO2_0 IOMUX_PAD(0x628, 0x2A4, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 939 | #define MX53_PAD_PATA_DATA0__EMI_NANDF_D_0 IOMUX_PAD(0x628, 0x2A4, 3, __NA_, 0, NO_PAD_CTRL) | ||
| 940 | #define MX53_PAD_PATA_DATA0__ESDHC3_DAT4 IOMUX_PAD(0x628, 0x2A4, 4, __NA_, 0, MX53_SDHC_PAD_CTRL) | ||
| 941 | #define MX53_PAD_PATA_DATA0__GPU3d_GPU_DEBUG_OUT_0 IOMUX_PAD(0x628, 0x2A4, 5, __NA_, 0, NO_PAD_CTRL) | ||
| 942 | #define MX53_PAD_PATA_DATA0__IPU_DIAG_BUS_0 IOMUX_PAD(0x628, 0x2A4, 6, __NA_, 0, NO_PAD_CTRL) | ||
| 943 | #define MX53_PAD_PATA_DATA0__USBPHY1_DATAOUT_7 IOMUX_PAD(0x628, 0x2A4, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 944 | #define MX53_PAD_PATA_DATA1__PATA_DATA_1 IOMUX_PAD(0x62C, 0x2A8, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 945 | #define MX53_PAD_PATA_DATA1__GPIO2_1 IOMUX_PAD(0x62C, 0x2A8, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 946 | #define MX53_PAD_PATA_DATA1__EMI_NANDF_D_1 IOMUX_PAD(0x62C, 0x2A8, 3, __NA_, 0, NO_PAD_CTRL) | ||
| 947 | #define MX53_PAD_PATA_DATA1__ESDHC3_DAT5 IOMUX_PAD(0x62C, 0x2A8, 4, __NA_, 0, MX53_SDHC_PAD_CTRL) | ||
| 948 | #define MX53_PAD_PATA_DATA1__GPU3d_GPU_DEBUG_OUT_1 IOMUX_PAD(0x62C, 0x2A8, 5, __NA_, 0, NO_PAD_CTRL) | ||
| 949 | #define MX53_PAD_PATA_DATA1__IPU_DIAG_BUS_1 IOMUX_PAD(0x62C, 0x2A8, 6, __NA_, 0, NO_PAD_CTRL) | ||
| 950 | #define MX53_PAD_PATA_DATA2__PATA_DATA_2 IOMUX_PAD(0x630, 0x2AC, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 951 | #define MX53_PAD_PATA_DATA2__GPIO2_2 IOMUX_PAD(0x630, 0x2AC, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 952 | #define MX53_PAD_PATA_DATA2__EMI_NANDF_D_2 IOMUX_PAD(0x630, 0x2AC, 3, __NA_, 0, NO_PAD_CTRL) | ||
| 953 | #define MX53_PAD_PATA_DATA2__ESDHC3_DAT6 IOMUX_PAD(0x630, 0x2AC, 4, __NA_, 0, MX53_SDHC_PAD_CTRL) | ||
| 954 | #define MX53_PAD_PATA_DATA2__GPU3d_GPU_DEBUG_OUT_2 IOMUX_PAD(0x630, 0x2AC, 5, __NA_, 0, NO_PAD_CTRL) | ||
| 955 | #define MX53_PAD_PATA_DATA2__IPU_DIAG_BUS_2 IOMUX_PAD(0x630, 0x2AC, 6, __NA_, 0, NO_PAD_CTRL) | ||
| 956 | #define MX53_PAD_PATA_DATA3__PATA_DATA_3 IOMUX_PAD(0x634, 0x2B0, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 957 | #define MX53_PAD_PATA_DATA3__GPIO2_3 IOMUX_PAD(0x634, 0x2B0, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 958 | #define MX53_PAD_PATA_DATA3__EMI_NANDF_D_3 IOMUX_PAD(0x634, 0x2B0, 3, __NA_, 0, NO_PAD_CTRL) | ||
| 959 | #define MX53_PAD_PATA_DATA3__ESDHC3_DAT7 IOMUX_PAD(0x634, 0x2B0, 4, __NA_, 0, MX53_SDHC_PAD_CTRL) | ||
| 960 | #define MX53_PAD_PATA_DATA3__GPU3d_GPU_DEBUG_OUT_3 IOMUX_PAD(0x634, 0x2B0, 5, __NA_, 0, NO_PAD_CTRL) | ||
| 961 | #define MX53_PAD_PATA_DATA3__IPU_DIAG_BUS_3 IOMUX_PAD(0x634, 0x2B0, 6, __NA_, 0, NO_PAD_CTRL) | ||
| 962 | #define MX53_PAD_PATA_DATA4__PATA_DATA_4 IOMUX_PAD(0x638, 0x2B4, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 963 | #define MX53_PAD_PATA_DATA4__GPIO2_4 IOMUX_PAD(0x638, 0x2B4, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 964 | #define MX53_PAD_PATA_DATA4__EMI_NANDF_D_4 IOMUX_PAD(0x638, 0x2B4, 3, __NA_, 0, NO_PAD_CTRL) | ||
| 965 | #define MX53_PAD_PATA_DATA4__ESDHC4_DAT4 IOMUX_PAD(0x638, 0x2B4, 4, __NA_, 0, MX53_SDHC_PAD_CTRL) | ||
| 966 | #define MX53_PAD_PATA_DATA4__GPU3d_GPU_DEBUG_OUT_4 IOMUX_PAD(0x638, 0x2B4, 5, __NA_, 0, NO_PAD_CTRL) | ||
| 967 | #define MX53_PAD_PATA_DATA4__IPU_DIAG_BUS_4 IOMUX_PAD(0x638, 0x2B4, 6, __NA_, 0, NO_PAD_CTRL) | ||
| 968 | #define MX53_PAD_PATA_DATA5__PATA_DATA_5 IOMUX_PAD(0x63C, 0x2B8, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 969 | #define MX53_PAD_PATA_DATA5__GPIO2_5 IOMUX_PAD(0x63C, 0x2B8, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 970 | #define MX53_PAD_PATA_DATA5__EMI_NANDF_D_5 IOMUX_PAD(0x63C, 0x2B8, 3, __NA_, 0, NO_PAD_CTRL) | ||
| 971 | #define MX53_PAD_PATA_DATA5__ESDHC4_DAT5 IOMUX_PAD(0x63C, 0x2B8, 4, __NA_, 0, MX53_SDHC_PAD_CTRL) | ||
| 972 | #define MX53_PAD_PATA_DATA5__GPU3d_GPU_DEBUG_OUT_5 IOMUX_PAD(0x63C, 0x2B8, 5, __NA_, 0, NO_PAD_CTRL) | ||
| 973 | #define MX53_PAD_PATA_DATA5__IPU_DIAG_BUS_5 IOMUX_PAD(0x63C, 0x2B8, 6, __NA_, 0, NO_PAD_CTRL) | ||
| 974 | #define MX53_PAD_PATA_DATA6__PATA_DATA_6 IOMUX_PAD(0x640, 0x2BC, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 975 | #define MX53_PAD_PATA_DATA6__GPIO2_6 IOMUX_PAD(0x640, 0x2BC, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 976 | #define MX53_PAD_PATA_DATA6__EMI_NANDF_D_6 IOMUX_PAD(0x640, 0x2BC, 3, __NA_, 0, NO_PAD_CTRL) | ||
| 977 | #define MX53_PAD_PATA_DATA6__ESDHC4_DAT6 IOMUX_PAD(0x640, 0x2BC, 4, __NA_, 0, MX53_SDHC_PAD_CTRL) | ||
| 978 | #define MX53_PAD_PATA_DATA6__GPU3d_GPU_DEBUG_OUT_6 IOMUX_PAD(0x640, 0x2BC, 5, __NA_, 0, NO_PAD_CTRL) | ||
| 979 | #define MX53_PAD_PATA_DATA6__IPU_DIAG_BUS_6 IOMUX_PAD(0x640, 0x2BC, 6, __NA_, 0, NO_PAD_CTRL) | ||
| 980 | #define MX53_PAD_PATA_DATA7__PATA_DATA_7 IOMUX_PAD(0x644, 0x2C0, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 981 | #define MX53_PAD_PATA_DATA7__GPIO2_7 IOMUX_PAD(0x644, 0x2C0, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 982 | #define MX53_PAD_PATA_DATA7__EMI_NANDF_D_7 IOMUX_PAD(0x644, 0x2C0, 3, __NA_, 0, NO_PAD_CTRL) | ||
| 983 | #define MX53_PAD_PATA_DATA7__ESDHC4_DAT7 IOMUX_PAD(0x644, 0x2C0, 4, __NA_, 0, MX53_SDHC_PAD_CTRL) | ||
| 984 | #define MX53_PAD_PATA_DATA7__GPU3d_GPU_DEBUG_OUT_7 IOMUX_PAD(0x644, 0x2C0, 5, __NA_, 0, NO_PAD_CTRL) | ||
| 985 | #define MX53_PAD_PATA_DATA7__IPU_DIAG_BUS_7 IOMUX_PAD(0x644, 0x2C0, 6, __NA_, 0, NO_PAD_CTRL) | ||
| 986 | #define MX53_PAD_PATA_DATA8__PATA_DATA_8 IOMUX_PAD(0x648, 0x2C4, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 987 | #define MX53_PAD_PATA_DATA8__GPIO2_8 IOMUX_PAD(0x648, 0x2C4, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 988 | #define MX53_PAD_PATA_DATA8__ESDHC1_DAT4 IOMUX_PAD(0x648, 0x2C4, 2, __NA_, 0, MX53_SDHC_PAD_CTRL) | ||
| 989 | #define MX53_PAD_PATA_DATA8__EMI_NANDF_D_8 IOMUX_PAD(0x648, 0x2C4, 3, __NA_, 0, NO_PAD_CTRL) | ||
| 990 | #define MX53_PAD_PATA_DATA8__ESDHC3_DAT0 IOMUX_PAD(0x648, 0x2C4, 4, __NA_, 0, MX53_SDHC_PAD_CTRL) | ||
| 991 | #define MX53_PAD_PATA_DATA8__GPU3d_GPU_DEBUG_OUT_8 IOMUX_PAD(0x648, 0x2C4, 5, __NA_, 0, NO_PAD_CTRL) | ||
| 992 | #define MX53_PAD_PATA_DATA8__IPU_DIAG_BUS_8 IOMUX_PAD(0x648, 0x2C4, 6, __NA_, 0, NO_PAD_CTRL) | ||
| 993 | #define MX53_PAD_PATA_DATA9__PATA_DATA_9 IOMUX_PAD(0x64C, 0x2C8, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 994 | #define MX53_PAD_PATA_DATA9__GPIO2_9 IOMUX_PAD(0x64C, 0x2C8, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 995 | #define MX53_PAD_PATA_DATA9__ESDHC1_DAT5 IOMUX_PAD(0x64C, 0x2C8, 2, __NA_, 0, MX53_SDHC_PAD_CTRL) | ||
| 996 | #define MX53_PAD_PATA_DATA9__EMI_NANDF_D_9 IOMUX_PAD(0x64C, 0x2C8, 3, __NA_, 0, NO_PAD_CTRL) | ||
| 997 | #define MX53_PAD_PATA_DATA9__ESDHC3_DAT1 IOMUX_PAD(0x64C, 0x2C8, 4, __NA_, 0, MX53_SDHC_PAD_CTRL) | ||
| 998 | #define MX53_PAD_PATA_DATA9__GPU3d_GPU_DEBUG_OUT_9 IOMUX_PAD(0x64C, 0x2C8, 5, __NA_, 0, NO_PAD_CTRL) | ||
| 999 | #define MX53_PAD_PATA_DATA9__IPU_DIAG_BUS_9 IOMUX_PAD(0x64C, 0x2C8, 6, __NA_, 0, NO_PAD_CTRL) | ||
| 1000 | #define MX53_PAD_PATA_DATA10__PATA_DATA_10 IOMUX_PAD(0x650, 0x2CC, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 1001 | #define MX53_PAD_PATA_DATA10__GPIO2_10 IOMUX_PAD(0x650, 0x2CC, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 1002 | #define MX53_PAD_PATA_DATA10__ESDHC1_DAT6 IOMUX_PAD(0x650, 0x2CC, 2, __NA_, 0, MX53_SDHC_PAD_CTRL) | ||
| 1003 | #define MX53_PAD_PATA_DATA10__EMI_NANDF_D_10 IOMUX_PAD(0x650, 0x2CC, 3, __NA_, 0, NO_PAD_CTRL) | ||
| 1004 | #define MX53_PAD_PATA_DATA10__ESDHC3_DAT2 IOMUX_PAD(0x650, 0x2CC, 4, __NA_, 0, MX53_SDHC_PAD_CTRL) | ||
| 1005 | #define MX53_PAD_PATA_DATA10__GPU3d_GPU_DEBUG_OUT_10 IOMUX_PAD(0x650, 0x2CC, 5, __NA_, 0, NO_PAD_CTRL) | ||
| 1006 | #define MX53_PAD_PATA_DATA10__IPU_DIAG_BUS_10 IOMUX_PAD(0x650, 0x2CC, 6, __NA_, 0, NO_PAD_CTRL) | ||
| 1007 | #define MX53_PAD_PATA_DATA11__PATA_DATA_11 IOMUX_PAD(0x654, 0x2D0, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 1008 | #define MX53_PAD_PATA_DATA11__GPIO2_11 IOMUX_PAD(0x654, 0x2D0, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 1009 | #define MX53_PAD_PATA_DATA11__ESDHC1_DAT7 IOMUX_PAD(0x654, 0x2D0, 2, __NA_, 0, MX53_SDHC_PAD_CTRL) | ||
| 1010 | #define MX53_PAD_PATA_DATA11__EMI_NANDF_D_11 IOMUX_PAD(0x654, 0x2D0, 3, __NA_, 0, NO_PAD_CTRL) | ||
| 1011 | #define MX53_PAD_PATA_DATA11__ESDHC3_DAT3 IOMUX_PAD(0x654, 0x2D0, 4, __NA_, 0, MX53_SDHC_PAD_CTRL) | ||
| 1012 | #define MX53_PAD_PATA_DATA11__GPU3d_GPU_DEBUG_OUT_11 IOMUX_PAD(0x654, 0x2D0, 5, __NA_, 0, NO_PAD_CTRL) | ||
| 1013 | #define MX53_PAD_PATA_DATA11__IPU_DIAG_BUS_11 IOMUX_PAD(0x654, 0x2D0, 6, __NA_, 0, NO_PAD_CTRL) | ||
| 1014 | #define MX53_PAD_PATA_DATA12__PATA_DATA_12 IOMUX_PAD(0x658, 0x2D4, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 1015 | #define MX53_PAD_PATA_DATA12__GPIO2_12 IOMUX_PAD(0x658, 0x2D4, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 1016 | #define MX53_PAD_PATA_DATA12__ESDHC2_DAT4 IOMUX_PAD(0x658, 0x2D4, 2, __NA_, 0, MX53_SDHC_PAD_CTRL) | ||
| 1017 | #define MX53_PAD_PATA_DATA12__EMI_NANDF_D_12 IOMUX_PAD(0x658, 0x2D4, 3, __NA_, 0, NO_PAD_CTRL) | ||
| 1018 | #define MX53_PAD_PATA_DATA12__ESDHC4_DAT0 IOMUX_PAD(0x658, 0x2D4, 4, __NA_, 0, MX53_SDHC_PAD_CTRL) | ||
| 1019 | #define MX53_PAD_PATA_DATA12__GPU3d_GPU_DEBUG_OUT_12 IOMUX_PAD(0x658, 0x2D4, 5, __NA_, 0, NO_PAD_CTRL) | ||
| 1020 | #define MX53_PAD_PATA_DATA12__IPU_DIAG_BUS_12 IOMUX_PAD(0x658, 0x2D4, 6, __NA_, 0, NO_PAD_CTRL) | ||
| 1021 | #define MX53_PAD_PATA_DATA13__PATA_DATA_13 IOMUX_PAD(0x65C, 0x2D8, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 1022 | #define MX53_PAD_PATA_DATA13__GPIO2_13 IOMUX_PAD(0x65C, 0x2D8, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 1023 | #define MX53_PAD_PATA_DATA13__ESDHC2_DAT5 IOMUX_PAD(0x65C, 0x2D8, 2, __NA_, 0, MX53_SDHC_PAD_CTRL) | ||
| 1024 | #define MX53_PAD_PATA_DATA13__EMI_NANDF_D_13 IOMUX_PAD(0x65C, 0x2D8, 3, __NA_, 0, NO_PAD_CTRL) | ||
| 1025 | #define MX53_PAD_PATA_DATA13__ESDHC4_DAT1 IOMUX_PAD(0x65C, 0x2D8, 4, __NA_, 0, MX53_SDHC_PAD_CTRL) | ||
| 1026 | #define MX53_PAD_PATA_DATA13__GPU3d_GPU_DEBUG_OUT_13 IOMUX_PAD(0x65C, 0x2D8, 5, __NA_, 0, NO_PAD_CTRL) | ||
| 1027 | #define MX53_PAD_PATA_DATA13__IPU_DIAG_BUS_13 IOMUX_PAD(0x65C, 0x2D8, 6, __NA_, 0, NO_PAD_CTRL) | ||
| 1028 | #define MX53_PAD_PATA_DATA14__PATA_DATA_14 IOMUX_PAD(0x660, 0x2DC, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 1029 | #define MX53_PAD_PATA_DATA14__GPIO2_14 IOMUX_PAD(0x660, 0x2DC, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 1030 | #define MX53_PAD_PATA_DATA14__ESDHC2_DAT6 IOMUX_PAD(0x660, 0x2DC, 2, __NA_, 0, MX53_SDHC_PAD_CTRL) | ||
| 1031 | #define MX53_PAD_PATA_DATA14__EMI_NANDF_D_14 IOMUX_PAD(0x660, 0x2DC, 3, __NA_, 0, NO_PAD_CTRL) | ||
| 1032 | #define MX53_PAD_PATA_DATA14__ESDHC4_DAT2 IOMUX_PAD(0x660, 0x2DC, 4, __NA_, 0, MX53_SDHC_PAD_CTRL) | ||
| 1033 | #define MX53_PAD_PATA_DATA14__GPU3d_GPU_DEBUG_OUT_14 IOMUX_PAD(0x660, 0x2DC, 5, __NA_, 0, NO_PAD_CTRL) | ||
| 1034 | #define MX53_PAD_PATA_DATA14__IPU_DIAG_BUS_14 IOMUX_PAD(0x660, 0x2DC, 6, __NA_, 0, NO_PAD_CTRL) | ||
| 1035 | #define MX53_PAD_PATA_DATA15__PATA_DATA_15 IOMUX_PAD(0x664, 0x2E0, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 1036 | #define MX53_PAD_PATA_DATA15__GPIO2_15 IOMUX_PAD(0x664, 0x2E0, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 1037 | #define MX53_PAD_PATA_DATA15__ESDHC2_DAT7 IOMUX_PAD(0x664, 0x2E0, 2, __NA_, 0, MX53_SDHC_PAD_CTRL) | ||
| 1038 | #define MX53_PAD_PATA_DATA15__EMI_NANDF_D_15 IOMUX_PAD(0x664, 0x2E0, 3, __NA_, 0, NO_PAD_CTRL) | ||
| 1039 | #define MX53_PAD_PATA_DATA15__ESDHC4_DAT3 IOMUX_PAD(0x664, 0x2E0, 4, __NA_, 0, MX53_SDHC_PAD_CTRL) | ||
| 1040 | #define MX53_PAD_PATA_DATA15__GPU3d_GPU_DEBUG_OUT_15 IOMUX_PAD(0x664, 0x2E0, 5, __NA_, 0, NO_PAD_CTRL) | ||
| 1041 | #define MX53_PAD_PATA_DATA15__IPU_DIAG_BUS_15 IOMUX_PAD(0x664, 0x2E0, 6, __NA_, 0, NO_PAD_CTRL) | ||
| 1042 | #define MX53_PAD_SD1_DATA0__ESDHC1_DAT0 IOMUX_PAD(0x66C, 0x2E4, 0, __NA_, 0, MX53_SDHC_PAD_CTRL) | ||
| 1043 | #define MX53_PAD_SD1_DATA0__GPIO1_16 IOMUX_PAD(0x66C, 0x2E4, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 1044 | #define MX53_PAD_SD1_DATA0__GPT_CAPIN1 IOMUX_PAD(0x66C, 0x2E4, 3, __NA_, 0, NO_PAD_CTRL) | ||
| 1045 | #define MX53_PAD_SD1_DATA0__CSPI_MISO IOMUX_PAD(0x66C, 0x2E4, 5, 0x784, 2, NO_PAD_CTRL) | ||
| 1046 | #define MX53_PAD_SD1_DATA0__CCM_PLL3_BYP IOMUX_PAD(0x66C, 0x2E4, 7, 0x778, 0, NO_PAD_CTRL) | ||
| 1047 | #define MX53_PAD_SD1_DATA1__ESDHC1_DAT1 IOMUX_PAD(0x670, 0x2E8, 0, __NA_, 0, MX53_SDHC_PAD_CTRL) | ||
| 1048 | #define MX53_PAD_SD1_DATA1__GPIO1_17 IOMUX_PAD(0x670, 0x2E8, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 1049 | #define MX53_PAD_SD1_DATA1__GPT_CAPIN2 IOMUX_PAD(0x670, 0x2E8, 3, __NA_, 0, NO_PAD_CTRL) | ||
| 1050 | #define MX53_PAD_SD1_DATA1__CSPI_SS0 IOMUX_PAD(0x670, 0x2E8, 5, 0x78C, 3, NO_PAD_CTRL) | ||
| 1051 | #define MX53_PAD_SD1_DATA1__CCM_PLL4_BYP IOMUX_PAD(0x670, 0x2E8, 7, 0x77C, 1, NO_PAD_CTRL) | ||
| 1052 | #define MX53_PAD_SD1_CMD__ESDHC1_CMD IOMUX_PAD(0x674, 0x2EC, 0 | IOMUX_CONFIG_SION, __NA_, 0, MX53_SDHC_PAD_CTRL) | ||
| 1053 | #define MX53_PAD_SD1_CMD__GPIO1_18 IOMUX_PAD(0x674, 0x2EC, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 1054 | #define MX53_PAD_SD1_CMD__GPT_CMPOUT1 IOMUX_PAD(0x674, 0x2EC, 3, __NA_, 0, NO_PAD_CTRL) | ||
| 1055 | #define MX53_PAD_SD1_CMD__CSPI_MOSI IOMUX_PAD(0x674, 0x2EC, 5, 0x788, 2, NO_PAD_CTRL) | ||
| 1056 | #define MX53_PAD_SD1_CMD__CCM_PLL1_BYP IOMUX_PAD(0x674, 0x2EC, 7, 0x770, 0, NO_PAD_CTRL) | ||
| 1057 | #define MX53_PAD_SD1_DATA2__ESDHC1_DAT2 IOMUX_PAD(0x678, 0x2F0, 0, __NA_, 0, MX53_SDHC_PAD_CTRL) | ||
| 1058 | #define MX53_PAD_SD1_DATA2__GPIO1_19 IOMUX_PAD(0x678, 0x2F0, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 1059 | #define MX53_PAD_SD1_DATA2__GPT_CMPOUT2 IOMUX_PAD(0x678, 0x2F0, 2, __NA_, 0, NO_PAD_CTRL) | ||
| 1060 | #define MX53_PAD_SD1_DATA2__PWM2_PWMO IOMUX_PAD(0x678, 0x2F0, 3, __NA_, 0, NO_PAD_CTRL) | ||
| 1061 | #define MX53_PAD_SD1_DATA2__WDOG1_WDOG_B IOMUX_PAD(0x678, 0x2F0, 4, __NA_, 0, NO_PAD_CTRL) | ||
| 1062 | #define MX53_PAD_SD1_DATA2__CSPI_SS1 IOMUX_PAD(0x678, 0x2F0, 5, 0x790, 2, NO_PAD_CTRL) | ||
| 1063 | #define MX53_PAD_SD1_DATA2__WDOG1_WDOG_RST_B_DEB IOMUX_PAD(0x678, 0x2F0, 6, __NA_, 0, NO_PAD_CTRL) | ||
| 1064 | #define MX53_PAD_SD1_DATA2__CCM_PLL2_BYP IOMUX_PAD(0x678, 0x2F0, 7, 0x774, 0, NO_PAD_CTRL) | ||
| 1065 | #define MX53_PAD_SD1_CLK__ESDHC1_CLK IOMUX_PAD(0x67C, 0x2F4, 0, __NA_, 0, MX53_SDHC_PAD_CTRL) | ||
| 1066 | #define MX53_PAD_SD1_CLK__GPIO1_20 IOMUX_PAD(0x67C, 0x2F4, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 1067 | #define MX53_PAD_SD1_CLK__OSC32k_32K_OUT IOMUX_PAD(0x67C, 0x2F4, 2, __NA_, 0, NO_PAD_CTRL) | ||
| 1068 | #define MX53_PAD_SD1_CLK__GPT_CLKIN IOMUX_PAD(0x67C, 0x2F4, 3, __NA_, 0, NO_PAD_CTRL) | ||
| 1069 | #define MX53_PAD_SD1_CLK__CSPI_SCLK IOMUX_PAD(0x67C, 0x2F4, 5, 0x780, 2, NO_PAD_CTRL) | ||
| 1070 | #define MX53_PAD_SD1_CLK__SATA_PHY_DTB_0 IOMUX_PAD(0x67C, 0x2F4, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 1071 | #define MX53_PAD_SD1_DATA3__ESDHC1_DAT3 IOMUX_PAD(0x680, 0x2F8, 0, __NA_, 0, MX53_SDHC_PAD_CTRL) | ||
| 1072 | #define MX53_PAD_SD1_DATA3__GPIO1_21 IOMUX_PAD(0x680, 0x2F8, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 1073 | #define MX53_PAD_SD1_DATA3__GPT_CMPOUT3 IOMUX_PAD(0x680, 0x2F8, 2, __NA_, 0, NO_PAD_CTRL) | ||
| 1074 | #define MX53_PAD_SD1_DATA3__PWM1_PWMO IOMUX_PAD(0x680, 0x2F8, 3, __NA_, 0, NO_PAD_CTRL) | ||
| 1075 | #define MX53_PAD_SD1_DATA3__WDOG2_WDOG_B IOMUX_PAD(0x680, 0x2F8, 4, __NA_, 0, NO_PAD_CTRL) | ||
| 1076 | #define MX53_PAD_SD1_DATA3__CSPI_SS2 IOMUX_PAD(0x680, 0x2F8, 5, 0x794, 2, NO_PAD_CTRL) | ||
| 1077 | #define MX53_PAD_SD1_DATA3__WDOG2_WDOG_RST_B_DEB IOMUX_PAD(0x680, 0x2F8, 6, __NA_, 0, NO_PAD_CTRL) | ||
| 1078 | #define MX53_PAD_SD1_DATA3__SATA_PHY_DTB_1 IOMUX_PAD(0x680, 0x2F8, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 1079 | #define MX53_PAD_SD2_CLK__ESDHC2_CLK IOMUX_PAD(0x688, 0x2FC, 0, __NA_, 0, MX53_SDHC_PAD_CTRL) | ||
| 1080 | #define MX53_PAD_SD2_CLK__GPIO1_10 IOMUX_PAD(0x688, 0x2FC, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 1081 | #define MX53_PAD_SD2_CLK__KPP_COL_5 IOMUX_PAD(0x688, 0x2FC, 2, 0x840, 2, NO_PAD_CTRL) | ||
| 1082 | #define MX53_PAD_SD2_CLK__AUDMUX_AUD4_RXFS IOMUX_PAD(0x688, 0x2FC, 3, 0x73C, 1, NO_PAD_CTRL) | ||
| 1083 | #define MX53_PAD_SD2_CLK__CSPI_SCLK IOMUX_PAD(0x688, 0x2FC, 5, 0x780, 3, NO_PAD_CTRL) | ||
| 1084 | #define MX53_PAD_SD2_CLK__SCC_RANDOM_V IOMUX_PAD(0x688, 0x2FC, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 1085 | #define MX53_PAD_SD2_CMD__ESDHC2_CMD IOMUX_PAD(0x68C, 0x300, 0, __NA_, 0, MX53_SDHC_PAD_CTRL) | ||
| 1086 | #define MX53_PAD_SD2_CMD__GPIO1_11 IOMUX_PAD(0x68C, 0x300, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 1087 | #define MX53_PAD_SD2_CMD__KPP_ROW_5 IOMUX_PAD(0x68C, 0x300, 2, 0x84C, 1, NO_PAD_CTRL) | ||
| 1088 | #define MX53_PAD_SD2_CMD__AUDMUX_AUD4_RXC IOMUX_PAD(0x68C, 0x300, 3, 0x738, 1, NO_PAD_CTRL) | ||
| 1089 | #define MX53_PAD_SD2_CMD__CSPI_MOSI IOMUX_PAD(0x68C, 0x300, 5, 0x788, 3, NO_PAD_CTRL) | ||
| 1090 | #define MX53_PAD_SD2_CMD__SCC_RANDOM IOMUX_PAD(0x68C, 0x300, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 1091 | #define MX53_PAD_SD2_DATA3__ESDHC2_DAT3 IOMUX_PAD(0x690, 0x304, 0, __NA_, 0, MX53_SDHC_PAD_CTRL) | ||
| 1092 | #define MX53_PAD_SD2_DATA3__GPIO1_12 IOMUX_PAD(0x690, 0x304, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 1093 | #define MX53_PAD_SD2_DATA3__KPP_COL_6 IOMUX_PAD(0x690, 0x304, 2, 0x844, 1, NO_PAD_CTRL) | ||
| 1094 | #define MX53_PAD_SD2_DATA3__AUDMUX_AUD4_TXC IOMUX_PAD(0x690, 0x304, 3, 0x740, 1, NO_PAD_CTRL) | ||
| 1095 | #define MX53_PAD_SD2_DATA3__CSPI_SS2 IOMUX_PAD(0x690, 0x304, 5, 0x794, 3, NO_PAD_CTRL) | ||
| 1096 | #define MX53_PAD_SD2_DATA3__SJC_DONE IOMUX_PAD(0x690, 0x304, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 1097 | #define MX53_PAD_SD2_DATA2__ESDHC2_DAT2 IOMUX_PAD(0x694, 0x308, 0, __NA_, 0, MX53_SDHC_PAD_CTRL) | ||
| 1098 | #define MX53_PAD_SD2_DATA2__GPIO1_13 IOMUX_PAD(0x694, 0x308, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 1099 | #define MX53_PAD_SD2_DATA2__KPP_ROW_6 IOMUX_PAD(0x694, 0x308, 2, 0x850, 1, NO_PAD_CTRL) | ||
| 1100 | #define MX53_PAD_SD2_DATA2__AUDMUX_AUD4_TXD IOMUX_PAD(0x694, 0x308, 3, 0x734, 1, NO_PAD_CTRL) | ||
| 1101 | #define MX53_PAD_SD2_DATA2__CSPI_SS1 IOMUX_PAD(0x694, 0x308, 5, 0x790, 3, NO_PAD_CTRL) | ||
| 1102 | #define MX53_PAD_SD2_DATA2__SJC_FAIL IOMUX_PAD(0x694, 0x308, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 1103 | #define MX53_PAD_SD2_DATA1__ESDHC2_DAT1 IOMUX_PAD(0x698, 0x30C, 0, __NA_, 0, MX53_SDHC_PAD_CTRL) | ||
| 1104 | #define MX53_PAD_SD2_DATA1__GPIO1_14 IOMUX_PAD(0x698, 0x30C, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 1105 | #define MX53_PAD_SD2_DATA1__KPP_COL_7 IOMUX_PAD(0x698, 0x30C, 2, 0x848, 1, NO_PAD_CTRL) | ||
| 1106 | #define MX53_PAD_SD2_DATA1__AUDMUX_AUD4_TXFS IOMUX_PAD(0x698, 0x30C, 3, 0x744, 0, NO_PAD_CTRL) | ||
| 1107 | #define MX53_PAD_SD2_DATA1__CSPI_SS0 IOMUX_PAD(0x698, 0x30C, 5, 0x78C, 4, NO_PAD_CTRL) | ||
| 1108 | #define MX53_PAD_SD2_DATA1__RTIC_SEC_VIO IOMUX_PAD(0x698, 0x30C, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 1109 | #define MX53_PAD_SD2_DATA0__ESDHC2_DAT0 IOMUX_PAD(0x69C, 0x310, 0, __NA_, 0, MX53_SDHC_PAD_CTRL) | ||
| 1110 | #define MX53_PAD_SD2_DATA0__GPIO1_15 IOMUX_PAD(0x69C, 0x310, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 1111 | #define MX53_PAD_SD2_DATA0__KPP_ROW_7 IOMUX_PAD(0x69C, 0x310, 2, 0x854, 1, NO_PAD_CTRL) | ||
| 1112 | #define MX53_PAD_SD2_DATA0__AUDMUX_AUD4_RXD IOMUX_PAD(0x69C, 0x310, 3, 0x730, 1, NO_PAD_CTRL) | ||
| 1113 | #define MX53_PAD_SD2_DATA0__CSPI_MISO IOMUX_PAD(0x69C, 0x310, 5, 0x784, 3, NO_PAD_CTRL) | ||
| 1114 | #define MX53_PAD_SD2_DATA0__RTIC_DONE_INT IOMUX_PAD(0x69C, 0x310, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 1115 | #define MX53_PAD_GPIO_0__CCM_CLKO IOMUX_PAD(0x6A4, 0x314, 0, __NA_, 0, NO_PAD_CTRL) | ||
| 1116 | #define MX53_PAD_GPIO_0__GPIO1_0 IOMUX_PAD(0x6A4, 0x314, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 1117 | #define MX53_PAD_GPIO_0__KPP_COL_5 IOMUX_PAD(0x6A4, 0x314, 2, 0x840, 3, NO_PAD_CTRL) | ||
| 1118 | #define MX53_PAD_GPIO_0__CCM_SSI_EXT1_CLK IOMUX_PAD(0x6A4, 0x314, 3, __NA_, 0, NO_PAD_CTRL) | ||
| 1119 | #define MX53_PAD_GPIO_0__EPIT1_EPITO IOMUX_PAD(0x6A4, 0x314, 4, __NA_, 0, NO_PAD_CTRL) | ||
| 1120 | #define MX53_PAD_GPIO_0__SRTC_ALARM_DEB IOMUX_PAD(0x6A4, 0x314, 5, __NA_, 0, NO_PAD_CTRL) | ||
| 1121 | #define MX53_PAD_GPIO_0__USBOH3_USBH1_PWR IOMUX_PAD(0x6A4, 0x314, 6, __NA_, 0, NO_PAD_CTRL) | ||
| 1122 | #define MX53_PAD_GPIO_0__CSU_TD IOMUX_PAD(0x6A4, 0x314, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 1123 | #define MX53_PAD_GPIO_1__ESAI1_SCKR IOMUX_PAD(0x6A8, 0x318, 0, 0x7DC, 1, NO_PAD_CTRL) | ||
| 1124 | #define MX53_PAD_GPIO_1__GPIO1_1 IOMUX_PAD(0x6A8, 0x318, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 1125 | #define MX53_PAD_GPIO_1__KPP_ROW_5 IOMUX_PAD(0x6A8, 0x318, 2, 0x84C, 2, NO_PAD_CTRL) | ||
| 1126 | #define MX53_PAD_GPIO_1__CCM_SSI_EXT2_CLK IOMUX_PAD(0x6A8, 0x318, 3, __NA_, 0, NO_PAD_CTRL) | ||
| 1127 | #define MX53_PAD_GPIO_1__PWM2_PWMO IOMUX_PAD(0x6A8, 0x318, 4, __NA_, 0, NO_PAD_CTRL) | ||
| 1128 | #define MX53_PAD_GPIO_1__WDOG2_WDOG_B IOMUX_PAD(0x6A8, 0x318, 5, __NA_, 0, NO_PAD_CTRL) | ||
| 1129 | #define MX53_PAD_GPIO_1__ESDHC1_CD IOMUX_PAD(0x6A8, 0x318, 6, __NA_, 0, NO_PAD_CTRL) | ||
| 1130 | #define MX53_PAD_GPIO_1__SRC_TESTER_ACK IOMUX_PAD(0x6A8, 0x318, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 1131 | #define MX53_PAD_GPIO_9__ESAI1_FSR IOMUX_PAD(0x6AC, 0x31C, 0, 0x7CC, 1, NO_PAD_CTRL) | ||
| 1132 | #define MX53_PAD_GPIO_9__GPIO1_9 IOMUX_PAD(0x6AC, 0x31C, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 1133 | #define MX53_PAD_GPIO_9__KPP_COL_6 IOMUX_PAD(0x6AC, 0x31C, 2, 0x844, 2, NO_PAD_CTRL) | ||
| 1134 | #define MX53_PAD_GPIO_9__CCM_REF_EN_B IOMUX_PAD(0x6AC, 0x31C, 3, __NA_, 0, NO_PAD_CTRL) | ||
| 1135 | #define MX53_PAD_GPIO_9__PWM1_PWMO IOMUX_PAD(0x6AC, 0x31C, 4, __NA_, 0, NO_PAD_CTRL) | ||
| 1136 | #define MX53_PAD_GPIO_9__WDOG1_WDOG_B IOMUX_PAD(0x6AC, 0x31C, 5, __NA_, 0, NO_PAD_CTRL) | ||
| 1137 | #define MX53_PAD_GPIO_9__ESDHC1_WP IOMUX_PAD(0x6AC, 0x31C, 6, 0x7FC, 1, NO_PAD_CTRL) | ||
| 1138 | #define MX53_PAD_GPIO_9__SCC_FAIL_STATE IOMUX_PAD(0x6AC, 0x31C, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 1139 | #define MX53_PAD_GPIO_3__ESAI1_HCKR IOMUX_PAD(0x6B0, 0x320, 0, 0x7D4, 1, NO_PAD_CTRL) | ||
| 1140 | #define MX53_PAD_GPIO_3__GPIO1_3 IOMUX_PAD(0x6B0, 0x320, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 1141 | #define MX53_PAD_GPIO_3__I2C3_SCL IOMUX_PAD(0x6B0, 0x320, 2 | IOMUX_CONFIG_SION, 0x824, 1, NO_PAD_CTRL) | ||
| 1142 | #define MX53_PAD_GPIO_3__DPLLIP1_TOG_EN IOMUX_PAD(0x6B0, 0x320, 3, __NA_, 0, NO_PAD_CTRL) | ||
| 1143 | #define MX53_PAD_GPIO_3__CCM_CLKO2 IOMUX_PAD(0x6B0, 0x320, 4, __NA_, 0, NO_PAD_CTRL) | ||
| 1144 | #define MX53_PAD_GPIO_3__OBSERVE_MUX_OBSRV_INT_OUT0 IOMUX_PAD(0x6B0, 0x320, 5, __NA_, 0, NO_PAD_CTRL) | ||
| 1145 | #define MX53_PAD_GPIO_3__USBOH3_USBH1_OC IOMUX_PAD(0x6B0, 0x320, 6, 0x8A0, 1, NO_PAD_CTRL) | ||
| 1146 | #define MX53_PAD_GPIO_3__MLB_MLBCLK IOMUX_PAD(0x6B0, 0x320, 7, 0x858, 2, NO_PAD_CTRL) | ||
| 1147 | #define MX53_PAD_GPIO_6__ESAI1_SCKT IOMUX_PAD(0x6B4, 0x324, 0, 0x7E0, 1, NO_PAD_CTRL) | ||
| 1148 | #define MX53_PAD_GPIO_6__GPIO1_6 IOMUX_PAD(0x6B4, 0x324, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 1149 | #define MX53_PAD_GPIO_6__I2C3_SDA IOMUX_PAD(0x6B4, 0x324, 2 | IOMUX_CONFIG_SION, 0x828, 1, NO_PAD_CTRL) | ||
| 1150 | #define MX53_PAD_GPIO_6__CCM_CCM_OUT_0 IOMUX_PAD(0x6B4, 0x324, 3, __NA_, 0, NO_PAD_CTRL) | ||
| 1151 | #define MX53_PAD_GPIO_6__CSU_CSU_INT_DEB IOMUX_PAD(0x6B4, 0x324, 4, __NA_, 0, NO_PAD_CTRL) | ||
| 1152 | #define MX53_PAD_GPIO_6__OBSERVE_MUX_OBSRV_INT_OUT1 IOMUX_PAD(0x6B4, 0x324, 5, __NA_, 0, NO_PAD_CTRL) | ||
| 1153 | #define MX53_PAD_GPIO_6__ESDHC2_LCTL IOMUX_PAD(0x6B4, 0x324, 6, __NA_, 0, NO_PAD_CTRL) | ||
| 1154 | #define MX53_PAD_GPIO_6__MLB_MLBSIG IOMUX_PAD(0x6B4, 0x324, 7, 0x860, 2, NO_PAD_CTRL) | ||
| 1155 | #define MX53_PAD_GPIO_2__ESAI1_FST IOMUX_PAD(0x6B8, 0x328, 0, 0x7D0, 1, NO_PAD_CTRL) | ||
| 1156 | #define MX53_PAD_GPIO_2__GPIO1_2 IOMUX_PAD(0x6B8, 0x328, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 1157 | #define MX53_PAD_GPIO_2__KPP_ROW_6 IOMUX_PAD(0x6B8, 0x328, 2, 0x850, 2, NO_PAD_CTRL) | ||
| 1158 | #define MX53_PAD_GPIO_2__CCM_CCM_OUT_1 IOMUX_PAD(0x6B8, 0x328, 3, __NA_, 0, NO_PAD_CTRL) | ||
| 1159 | #define MX53_PAD_GPIO_2__CSU_CSU_ALARM_AUT_0 IOMUX_PAD(0x6B8, 0x328, 4, __NA_, 0, NO_PAD_CTRL) | ||
| 1160 | #define MX53_PAD_GPIO_2__OBSERVE_MUX_OBSRV_INT_OUT2 IOMUX_PAD(0x6B8, 0x328, 5, __NA_, 0, NO_PAD_CTRL) | ||
| 1161 | #define MX53_PAD_GPIO_2__ESDHC2_WP IOMUX_PAD(0x6B8, 0x328, 6, __NA_, 0, NO_PAD_CTRL) | ||
| 1162 | #define MX53_PAD_GPIO_2__MLB_MLBDAT IOMUX_PAD(0x6B8, 0x328, 7, 0x85C, 2, NO_PAD_CTRL) | ||
| 1163 | #define MX53_PAD_GPIO_4__ESAI1_HCKT IOMUX_PAD(0x6BC, 0x32C, 0, 0x7D8, 1, NO_PAD_CTRL) | ||
| 1164 | #define MX53_PAD_GPIO_4__GPIO1_4 IOMUX_PAD(0x6BC, 0x32C, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 1165 | #define MX53_PAD_GPIO_4__KPP_COL_7 IOMUX_PAD(0x6BC, 0x32C, 2, 0x848, 2, NO_PAD_CTRL) | ||
| 1166 | #define MX53_PAD_GPIO_4__CCM_CCM_OUT_2 IOMUX_PAD(0x6BC, 0x32C, 3, __NA_, 0, NO_PAD_CTRL) | ||
| 1167 | #define MX53_PAD_GPIO_4__CSU_CSU_ALARM_AUT_1 IOMUX_PAD(0x6BC, 0x32C, 4, __NA_, 0, NO_PAD_CTRL) | ||
| 1168 | #define MX53_PAD_GPIO_4__OBSERVE_MUX_OBSRV_INT_OUT3 IOMUX_PAD(0x6BC, 0x32C, 5, __NA_, 0, NO_PAD_CTRL) | ||
| 1169 | #define MX53_PAD_GPIO_4__ESDHC2_CD IOMUX_PAD(0x6BC, 0x32C, 6, __NA_, 0, NO_PAD_CTRL) | ||
| 1170 | #define MX53_PAD_GPIO_4__SCC_SEC_STATE IOMUX_PAD(0x6BC, 0x32C, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 1171 | #define MX53_PAD_GPIO_5__ESAI1_TX2_RX3 IOMUX_PAD(0x6C0, 0x330, 0, 0x7EC, 1, NO_PAD_CTRL) | ||
| 1172 | #define MX53_PAD_GPIO_5__GPIO1_5 IOMUX_PAD(0x6C0, 0x330, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 1173 | #define MX53_PAD_GPIO_5__KPP_ROW_7 IOMUX_PAD(0x6C0, 0x330, 2, 0x854, 2, NO_PAD_CTRL) | ||
| 1174 | #define MX53_PAD_GPIO_5__CCM_CLKO IOMUX_PAD(0x6C0, 0x330, 3, __NA_, 0, NO_PAD_CTRL) | ||
| 1175 | #define MX53_PAD_GPIO_5__CSU_CSU_ALARM_AUT_2 IOMUX_PAD(0x6C0, 0x330, 4, __NA_, 0, NO_PAD_CTRL) | ||
| 1176 | #define MX53_PAD_GPIO_5__OBSERVE_MUX_OBSRV_INT_OUT4 IOMUX_PAD(0x6C0, 0x330, 5, __NA_, 0, NO_PAD_CTRL) | ||
| 1177 | #define MX53_PAD_GPIO_5__I2C3_SCL IOMUX_PAD(0x6C0, 0x330, 6 | IOMUX_CONFIG_SION, 0x824, 2, NO_PAD_CTRL) | ||
| 1178 | #define MX53_PAD_GPIO_5__CCM_PLL1_BYP IOMUX_PAD(0x6C0, 0x330, 7, 0x770, 1, NO_PAD_CTRL) | ||
| 1179 | #define MX53_PAD_GPIO_7__ESAI1_TX4_RX1 IOMUX_PAD(0x6C4, 0x334, 0, 0x7F4, 1, NO_PAD_CTRL) | ||
| 1180 | #define MX53_PAD_GPIO_7__GPIO1_7 IOMUX_PAD(0x6C4, 0x334, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 1181 | #define MX53_PAD_GPIO_7__EPIT1_EPITO IOMUX_PAD(0x6C4, 0x334, 2, __NA_, 0, NO_PAD_CTRL) | ||
| 1182 | #define MX53_PAD_GPIO_7__CAN1_TXCAN IOMUX_PAD(0x6C4, 0x334, 3, __NA_, 0, NO_PAD_CTRL) | ||
| 1183 | #define MX53_PAD_GPIO_7__UART2_TXD_MUX IOMUX_PAD(0x6C4, 0x334, 4, __NA_, 0, MX53_UART_PAD_CTRL) | ||
| 1184 | #define MX53_PAD_GPIO_7__FIRI_RXD IOMUX_PAD(0x6C4, 0x334, 5, 0x80C, 1, NO_PAD_CTRL) | ||
| 1185 | #define MX53_PAD_GPIO_7__SPDIF_PLOCK IOMUX_PAD(0x6C4, 0x334, 6, __NA_, 0, NO_PAD_CTRL) | ||
| 1186 | #define MX53_PAD_GPIO_7__CCM_PLL2_BYP IOMUX_PAD(0x6C4, 0x334, 7, 0x774, 1, NO_PAD_CTRL) | ||
| 1187 | #define MX53_PAD_GPIO_8__ESAI1_TX5_RX0 IOMUX_PAD(0x6C8, 0x338, 0, 0x7F8, 1, NO_PAD_CTRL) | ||
| 1188 | #define MX53_PAD_GPIO_8__GPIO1_8 IOMUX_PAD(0x6C8, 0x338, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 1189 | #define MX53_PAD_GPIO_8__EPIT2_EPITO IOMUX_PAD(0x6C8, 0x338, 2, __NA_, 0, NO_PAD_CTRL) | ||
| 1190 | #define MX53_PAD_GPIO_8__CAN1_RXCAN IOMUX_PAD(0x6C8, 0x338, 3, 0x760, 2, NO_PAD_CTRL) | ||
| 1191 | #define MX53_PAD_GPIO_8__UART2_RXD_MUX IOMUX_PAD(0x6C8, 0x338, 4, 0x880, 5, MX53_UART_PAD_CTRL) | ||
| 1192 | #define MX53_PAD_GPIO_8__FIRI_TXD IOMUX_PAD(0x6C8, 0x338, 5, __NA_, 0, NO_PAD_CTRL) | ||
| 1193 | #define MX53_PAD_GPIO_8__SPDIF_SRCLK IOMUX_PAD(0x6C8, 0x338, 6, __NA_, 0, NO_PAD_CTRL) | ||
| 1194 | #define MX53_PAD_GPIO_8__CCM_PLL3_BYP IOMUX_PAD(0x6C8, 0x338, 7, 0x778, 1, NO_PAD_CTRL) | ||
| 1195 | #define MX53_PAD_GPIO_16__ESAI1_TX3_RX2 IOMUX_PAD(0x6CC, 0x33C, 0, 0x7F0, 1, NO_PAD_CTRL) | ||
| 1196 | #define MX53_PAD_GPIO_16__GPIO7_11 IOMUX_PAD(0x6CC, 0x33C, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 1197 | #define MX53_PAD_GPIO_16__TZIC_PWRFAIL_INT IOMUX_PAD(0x6CC, 0x33C, 2, __NA_, 0, NO_PAD_CTRL) | ||
| 1198 | #define MX53_PAD_GPIO_16__RTC_CE_RTC_EXT_TRIG1 IOMUX_PAD(0x6CC, 0x33C, 4, __NA_, 0, NO_PAD_CTRL) | ||
| 1199 | #define MX53_PAD_GPIO_16__SPDIF_IN1 IOMUX_PAD(0x6CC, 0x33C, 5, 0x870, 1, NO_PAD_CTRL) | ||
| 1200 | #define MX53_PAD_GPIO_16__I2C3_SDA IOMUX_PAD(0x6CC, 0x33C, 6 | IOMUX_CONFIG_SION, 0x828, 2, NO_PAD_CTRL) | ||
| 1201 | #define MX53_PAD_GPIO_16__SJC_DE_B IOMUX_PAD(0x6CC, 0x33C, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 1202 | #define MX53_PAD_GPIO_17__ESAI1_TX0 IOMUX_PAD(0x6D0, 0x340, 0, 0x7E4, 1, NO_PAD_CTRL) | ||
| 1203 | #define MX53_PAD_GPIO_17__GPIO7_12 IOMUX_PAD(0x6D0, 0x340, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 1204 | #define MX53_PAD_GPIO_17__SDMA_EXT_EVENT_0 IOMUX_PAD(0x6D0, 0x340, 2, 0x868, 1, NO_PAD_CTRL) | ||
| 1205 | #define MX53_PAD_GPIO_17__GPC_PMIC_RDY IOMUX_PAD(0x6D0, 0x340, 3, 0x810, 1, NO_PAD_CTRL) | ||
| 1206 | #define MX53_PAD_GPIO_17__RTC_CE_RTC_FSV_TRIG IOMUX_PAD(0x6D0, 0x340, 4, __NA_, 0, NO_PAD_CTRL) | ||
| 1207 | #define MX53_PAD_GPIO_17__SPDIF_OUT1 IOMUX_PAD(0x6D0, 0x340, 5, __NA_, 0, NO_PAD_CTRL) | ||
| 1208 | #define MX53_PAD_GPIO_17__IPU_SNOOP2 IOMUX_PAD(0x6D0, 0x340, 6, __NA_, 0, NO_PAD_CTRL) | ||
| 1209 | #define MX53_PAD_GPIO_17__SJC_JTAG_ACT IOMUX_PAD(0x6D0, 0x340, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 1210 | #define MX53_PAD_GPIO_18__ESAI1_TX1 IOMUX_PAD(0x6D4, 0x344, 0, 0x7E8, 1, NO_PAD_CTRL) | ||
| 1211 | #define MX53_PAD_GPIO_18__GPIO7_13 IOMUX_PAD(0x6D4, 0x344, 1, __NA_, 0, NO_PAD_CTRL) | ||
| 1212 | #define MX53_PAD_GPIO_18__SDMA_EXT_EVENT_1 IOMUX_PAD(0x6D4, 0x344, 2, 0x86C, 1, NO_PAD_CTRL) | ||
| 1213 | #define MX53_PAD_GPIO_18__OWIRE_LINE IOMUX_PAD(0x6D4, 0x344, 3, 0x864, 1, NO_PAD_CTRL) | ||
| 1214 | #define MX53_PAD_GPIO_18__RTC_CE_RTC_ALARM2_TRIG IOMUX_PAD(0x6D4, 0x344, 4, __NA_, 0, NO_PAD_CTRL) | ||
| 1215 | #define MX53_PAD_GPIO_18__CCM_ASRC_EXT_CLK IOMUX_PAD(0x6D4, 0x344, 5, 0x768, 1, NO_PAD_CTRL) | ||
| 1216 | #define MX53_PAD_GPIO_18__ESDHC1_LCTL IOMUX_PAD(0x6D4, 0x344, 6, __NA_, 0, NO_PAD_CTRL) | ||
| 1217 | #define MX53_PAD_GPIO_18__SRC_SYSTEM_RST IOMUX_PAD(0x6D4, 0x344, 7, __NA_, 0, NO_PAD_CTRL) | ||
| 1218 | |||
| 1219 | #endif /* __MACH_IOMUX_MX53_H__ */ | ||
diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig index 7f0b5ca78516..bace9e98f75d 100644 --- a/drivers/clk/Kconfig +++ b/drivers/clk/Kconfig | |||
| @@ -40,4 +40,17 @@ config COMMON_CLK_WM831X | |||
| 40 | Supports the clocking subsystem of the WM831x/2x series of | 40 | Supports the clocking subsystem of the WM831x/2x series of |
| 41 | PMICs from Wolfson Microlectronics. | 41 | PMICs from Wolfson Microlectronics. |
| 42 | 42 | ||
| 43 | config COMMON_CLK_VERSATILE | ||
| 44 | bool "Clock driver for ARM Reference designs" | ||
| 45 | depends on ARCH_INTEGRATOR || ARCH_REALVIEW | ||
| 46 | ---help--- | ||
| 47 | Supports clocking on ARM Reference designs Integrator/AP, | ||
| 48 | Integrator/CP, RealView PB1176, EB, PB11MP and PBX. | ||
| 49 | |||
| 50 | config COMMON_CLK_MAX77686 | ||
| 51 | tristate "Clock driver for Maxim 77686 MFD" | ||
| 52 | depends on MFD_MAX77686 | ||
| 53 | ---help--- | ||
| 54 | This driver supports Maxim 77686 crystal oscillator clock. | ||
| 55 | |||
| 43 | endmenu | 56 | endmenu |
diff --git a/drivers/clk/Makefile b/drivers/clk/Makefile index 5869ea387054..e48e0da5a884 100644 --- a/drivers/clk/Makefile +++ b/drivers/clk/Makefile | |||
| @@ -9,7 +9,15 @@ obj-$(CONFIG_ARCH_MXS) += mxs/ | |||
| 9 | obj-$(CONFIG_ARCH_SOCFPGA) += socfpga/ | 9 | obj-$(CONFIG_ARCH_SOCFPGA) += socfpga/ |
| 10 | obj-$(CONFIG_PLAT_SPEAR) += spear/ | 10 | obj-$(CONFIG_PLAT_SPEAR) += spear/ |
| 11 | obj-$(CONFIG_ARCH_U300) += clk-u300.o | 11 | obj-$(CONFIG_ARCH_U300) += clk-u300.o |
| 12 | obj-$(CONFIG_ARCH_INTEGRATOR) += versatile/ | 12 | obj-$(CONFIG_COMMON_CLK_VERSATILE) += versatile/ |
| 13 | obj-$(CONFIG_ARCH_PRIMA2) += clk-prima2.o | ||
| 14 | ifeq ($(CONFIG_COMMON_CLK), y) | ||
| 15 | obj-$(CONFIG_ARCH_MMP) += mmp/ | ||
| 16 | endif | ||
| 17 | obj-$(CONFIG_MACH_LOONGSON1) += clk-ls1x.o | ||
| 18 | obj-$(CONFIG_ARCH_U8500) += ux500/ | ||
| 19 | obj-$(CONFIG_ARCH_VT8500) += clk-vt8500.o | ||
| 13 | 20 | ||
| 14 | # Chip specific | 21 | # Chip specific |
| 15 | obj-$(CONFIG_COMMON_CLK_WM831X) += clk-wm831x.o | 22 | obj-$(CONFIG_COMMON_CLK_WM831X) += clk-wm831x.o |
| 23 | obj-$(CONFIG_COMMON_CLK_MAX77686) += clk-max77686.o | ||
diff --git a/drivers/clk/clk-ls1x.c b/drivers/clk/clk-ls1x.c new file mode 100644 index 000000000000..f20b750235f6 --- /dev/null +++ b/drivers/clk/clk-ls1x.c | |||
| @@ -0,0 +1,111 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (c) 2012 Zhang, Keguang <keguang.zhang@gmail.com> | ||
| 3 | * | ||
| 4 | * This program is free software; you can redistribute it and/or modify it | ||
| 5 | * under the terms of the GNU General Public License as published by the | ||
| 6 | * Free Software Foundation; either version 2 of the License, or (at your | ||
| 7 | * option) any later version. | ||
| 8 | */ | ||
| 9 | |||
| 10 | #include <linux/clkdev.h> | ||
| 11 | #include <linux/clk-provider.h> | ||
| 12 | #include <linux/io.h> | ||
| 13 | #include <linux/slab.h> | ||
| 14 | #include <linux/err.h> | ||
| 15 | |||
| 16 | #include <loongson1.h> | ||
| 17 | |||
| 18 | #define OSC 33 | ||
| 19 | |||
| 20 | static DEFINE_SPINLOCK(_lock); | ||
| 21 | |||
| 22 | static int ls1x_pll_clk_enable(struct clk_hw *hw) | ||
| 23 | { | ||
| 24 | return 0; | ||
| 25 | } | ||
| 26 | |||
| 27 | static void ls1x_pll_clk_disable(struct clk_hw *hw) | ||
| 28 | { | ||
| 29 | } | ||
| 30 | |||
| 31 | static unsigned long ls1x_pll_recalc_rate(struct clk_hw *hw, | ||
| 32 | unsigned long parent_rate) | ||
| 33 | { | ||
| 34 | u32 pll, rate; | ||
| 35 | |||
| 36 | pll = __raw_readl(LS1X_CLK_PLL_FREQ); | ||
| 37 | rate = ((12 + (pll & 0x3f)) * 1000000) + | ||
| 38 | ((((pll >> 8) & 0x3ff) * 1000000) >> 10); | ||
| 39 | rate *= OSC; | ||
| 40 | rate >>= 1; | ||
| 41 | |||
| 42 | return rate; | ||
| 43 | } | ||
| 44 | |||
| 45 | static const struct clk_ops ls1x_pll_clk_ops = { | ||
| 46 | .enable = ls1x_pll_clk_enable, | ||
| 47 | .disable = ls1x_pll_clk_disable, | ||
| 48 | .recalc_rate = ls1x_pll_recalc_rate, | ||
| 49 | }; | ||
| 50 | |||
| 51 | static struct clk * __init clk_register_pll(struct device *dev, | ||
| 52 | const char *name, const char *parent_name, unsigned long flags) | ||
| 53 | { | ||
| 54 | struct clk_hw *hw; | ||
| 55 | struct clk *clk; | ||
| 56 | struct clk_init_data init; | ||
| 57 | |||
| 58 | /* allocate the divider */ | ||
| 59 | hw = kzalloc(sizeof(struct clk_hw), GFP_KERNEL); | ||
| 60 | if (!hw) { | ||
| 61 | pr_err("%s: could not allocate clk_hw\n", __func__); | ||
| 62 | return ERR_PTR(-ENOMEM); | ||
| 63 | } | ||
| 64 | |||
| 65 | init.name = name; | ||
| 66 | init.ops = &ls1x_pll_clk_ops; | ||
| 67 | init.flags = flags | CLK_IS_BASIC; | ||
| 68 | init.parent_names = (parent_name ? &parent_name : NULL); | ||
| 69 | init.num_parents = (parent_name ? 1 : 0); | ||
| 70 | hw->init = &init; | ||
| 71 | |||
| 72 | /* register the clock */ | ||
| 73 | clk = clk_register(dev, hw); | ||
| 74 | |||
| 75 | if (IS_ERR(clk)) | ||
| 76 | kfree(hw); | ||
| 77 | |||
| 78 | return clk; | ||
| 79 | } | ||
| 80 | |||
| 81 | void __init ls1x_clk_init(void) | ||
| 82 | { | ||
| 83 | struct clk *clk; | ||
| 84 | |||
| 85 | clk = clk_register_pll(NULL, "pll_clk", NULL, CLK_IS_ROOT); | ||
| 86 | clk_prepare_enable(clk); | ||
| 87 | |||
| 88 | clk = clk_register_divider(NULL, "cpu_clk", "pll_clk", | ||
| 89 | CLK_SET_RATE_PARENT, LS1X_CLK_PLL_DIV, DIV_CPU_SHIFT, | ||
| 90 | DIV_CPU_WIDTH, CLK_DIVIDER_ONE_BASED, &_lock); | ||
| 91 | clk_prepare_enable(clk); | ||
| 92 | clk_register_clkdev(clk, "cpu", NULL); | ||
| 93 | |||
| 94 | clk = clk_register_divider(NULL, "dc_clk", "pll_clk", | ||
| 95 | CLK_SET_RATE_PARENT, LS1X_CLK_PLL_DIV, DIV_DC_SHIFT, | ||
| 96 | DIV_DC_WIDTH, CLK_DIVIDER_ONE_BASED, &_lock); | ||
| 97 | clk_prepare_enable(clk); | ||
| 98 | clk_register_clkdev(clk, "dc", NULL); | ||
| 99 | |||
| 100 | clk = clk_register_divider(NULL, "ahb_clk", "pll_clk", | ||
| 101 | CLK_SET_RATE_PARENT, LS1X_CLK_PLL_DIV, DIV_DDR_SHIFT, | ||
| 102 | DIV_DDR_WIDTH, CLK_DIVIDER_ONE_BASED, &_lock); | ||
| 103 | clk_prepare_enable(clk); | ||
| 104 | clk_register_clkdev(clk, "ahb", NULL); | ||
| 105 | clk_register_clkdev(clk, "stmmaceth", NULL); | ||
| 106 | |||
| 107 | clk = clk_register_fixed_factor(NULL, "apb_clk", "ahb_clk", 0, 1, 2); | ||
| 108 | clk_prepare_enable(clk); | ||
| 109 | clk_register_clkdev(clk, "apb", NULL); | ||
| 110 | clk_register_clkdev(clk, "serial8250", NULL); | ||
| 111 | } | ||
diff --git a/drivers/clk/clk-max77686.c b/drivers/clk/clk-max77686.c new file mode 100644 index 000000000000..ac5f5434cb9a --- /dev/null +++ b/drivers/clk/clk-max77686.c | |||
| @@ -0,0 +1,244 @@ | |||
| 1 | /* | ||
| 2 | * clk-max77686.c - Clock driver for Maxim 77686 | ||
| 3 | * | ||
| 4 | * Copyright (C) 2012 Samsung Electornics | ||
| 5 | * Jonghwa Lee <jonghwa3.lee@samsung.com> | ||
| 6 | * | ||
| 7 | * This program is free software; you can redistribute it and/or modify it | ||
| 8 | * under the terms of the GNU General Public License as published by the | ||
| 9 | * Free Software Foundation; either version 2 of the License, or (at your | ||
| 10 | * option) any later version. | ||
| 11 | * | ||
| 12 | * This program is distributed in the hope that it will be useful, | ||
| 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 15 | * GNU General Public License for more details. | ||
| 16 | * | ||
| 17 | * You should have received a copy of the GNU General Public License | ||
| 18 | * along with this program; if not, write to the Free Software | ||
| 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
| 20 | * | ||
| 21 | */ | ||
| 22 | |||
| 23 | #include <linux/kernel.h> | ||
| 24 | #include <linux/slab.h> | ||
| 25 | #include <linux/err.h> | ||
| 26 | #include <linux/platform_device.h> | ||
| 27 | #include <linux/mfd/max77686.h> | ||
| 28 | #include <linux/mfd/max77686-private.h> | ||
| 29 | #include <linux/clk-provider.h> | ||
| 30 | #include <linux/mutex.h> | ||
| 31 | #include <linux/clkdev.h> | ||
| 32 | |||
| 33 | enum { | ||
| 34 | MAX77686_CLK_AP = 0, | ||
| 35 | MAX77686_CLK_CP, | ||
| 36 | MAX77686_CLK_PMIC, | ||
| 37 | MAX77686_CLKS_NUM, | ||
| 38 | }; | ||
| 39 | |||
| 40 | struct max77686_clk { | ||
| 41 | struct max77686_dev *iodev; | ||
| 42 | u32 mask; | ||
| 43 | struct clk_hw hw; | ||
| 44 | struct clk_lookup *lookup; | ||
| 45 | }; | ||
| 46 | |||
| 47 | static struct max77686_clk *get_max77686_clk(struct clk_hw *hw) | ||
| 48 | { | ||
| 49 | return container_of(hw, struct max77686_clk, hw); | ||
| 50 | } | ||
| 51 | |||
| 52 | static int max77686_clk_prepare(struct clk_hw *hw) | ||
| 53 | { | ||
| 54 | struct max77686_clk *max77686; | ||
| 55 | int ret; | ||
| 56 | |||
| 57 | max77686 = get_max77686_clk(hw); | ||
| 58 | if (!max77686) | ||
| 59 | return -ENOMEM; | ||
| 60 | |||
| 61 | ret = regmap_update_bits(max77686->iodev->regmap, | ||
| 62 | MAX77686_REG_32KHZ, max77686->mask, max77686->mask); | ||
| 63 | |||
| 64 | return ret; | ||
| 65 | } | ||
| 66 | |||
| 67 | static void max77686_clk_unprepare(struct clk_hw *hw) | ||
| 68 | { | ||
| 69 | struct max77686_clk *max77686; | ||
| 70 | |||
| 71 | max77686 = get_max77686_clk(hw); | ||
| 72 | if (!max77686) | ||
| 73 | return; | ||
| 74 | |||
| 75 | regmap_update_bits(max77686->iodev->regmap, | ||
| 76 | MAX77686_REG_32KHZ, max77686->mask, ~max77686->mask); | ||
| 77 | } | ||
| 78 | |||
| 79 | static int max77686_clk_is_enabled(struct clk_hw *hw) | ||
| 80 | { | ||
| 81 | struct max77686_clk *max77686; | ||
| 82 | int ret; | ||
| 83 | u32 val; | ||
| 84 | |||
| 85 | max77686 = get_max77686_clk(hw); | ||
| 86 | if (!max77686) | ||
| 87 | return -ENOMEM; | ||
| 88 | |||
| 89 | ret = regmap_read(max77686->iodev->regmap, | ||
| 90 | MAX77686_REG_32KHZ, &val); | ||
| 91 | |||
| 92 | if (ret < 0) | ||
| 93 | return -EINVAL; | ||
| 94 | |||
| 95 | return val & max77686->mask; | ||
| 96 | } | ||
| 97 | |||
| 98 | static struct clk_ops max77686_clk_ops = { | ||
| 99 | .prepare = max77686_clk_prepare, | ||
| 100 | .unprepare = max77686_clk_unprepare, | ||
| 101 | .is_enabled = max77686_clk_is_enabled, | ||
| 102 | }; | ||
| 103 | |||
| 104 | static struct clk_init_data max77686_clks_init[MAX77686_CLKS_NUM] = { | ||
| 105 | [MAX77686_CLK_AP] = { | ||
| 106 | .name = "32khz_ap", | ||
| 107 | .ops = &max77686_clk_ops, | ||
| 108 | .flags = CLK_IS_ROOT, | ||
| 109 | }, | ||
| 110 | [MAX77686_CLK_CP] = { | ||
| 111 | .name = "32khz_cp", | ||
| 112 | .ops = &max77686_clk_ops, | ||
| 113 | .flags = CLK_IS_ROOT, | ||
| 114 | }, | ||
| 115 | [MAX77686_CLK_PMIC] = { | ||
| 116 | .name = "32khz_pmic", | ||
| 117 | .ops = &max77686_clk_ops, | ||
| 118 | .flags = CLK_IS_ROOT, | ||
| 119 | }, | ||
| 120 | }; | ||
| 121 | |||
| 122 | static int max77686_clk_register(struct device *dev, | ||
| 123 | struct max77686_clk *max77686) | ||
| 124 | { | ||
| 125 | struct clk *clk; | ||
| 126 | struct clk_hw *hw = &max77686->hw; | ||
| 127 | |||
| 128 | clk = clk_register(dev, hw); | ||
| 129 | |||
| 130 | if (IS_ERR(clk)) | ||
| 131 | return -ENOMEM; | ||
| 132 | |||
| 133 | max77686->lookup = devm_kzalloc(dev, sizeof(struct clk_lookup), | ||
| 134 | GFP_KERNEL); | ||
| 135 | if (IS_ERR(max77686->lookup)) | ||
| 136 | return -ENOMEM; | ||
| 137 | |||
| 138 | max77686->lookup->con_id = hw->init->name; | ||
| 139 | max77686->lookup->clk = clk; | ||
| 140 | |||
| 141 | clkdev_add(max77686->lookup); | ||
| 142 | |||
| 143 | return 0; | ||
| 144 | } | ||
| 145 | |||
| 146 | static __devinit int max77686_clk_probe(struct platform_device *pdev) | ||
| 147 | { | ||
| 148 | struct max77686_dev *iodev = dev_get_drvdata(pdev->dev.parent); | ||
| 149 | struct max77686_clk **max77686_clks; | ||
| 150 | int i, ret; | ||
| 151 | |||
| 152 | max77686_clks = devm_kzalloc(&pdev->dev, sizeof(struct max77686_clk *) | ||
| 153 | * MAX77686_CLKS_NUM, GFP_KERNEL); | ||
| 154 | if (IS_ERR(max77686_clks)) | ||
| 155 | return -ENOMEM; | ||
| 156 | |||
| 157 | for (i = 0; i < MAX77686_CLKS_NUM; i++) { | ||
| 158 | max77686_clks[i] = devm_kzalloc(&pdev->dev, | ||
| 159 | sizeof(struct max77686_clk), GFP_KERNEL); | ||
| 160 | if (IS_ERR(max77686_clks[i])) | ||
| 161 | return -ENOMEM; | ||
| 162 | } | ||
| 163 | |||
| 164 | for (i = 0; i < MAX77686_CLKS_NUM; i++) { | ||
| 165 | max77686_clks[i]->iodev = iodev; | ||
| 166 | max77686_clks[i]->mask = 1 << i; | ||
| 167 | max77686_clks[i]->hw.init = &max77686_clks_init[i]; | ||
| 168 | |||
| 169 | ret = max77686_clk_register(&pdev->dev, max77686_clks[i]); | ||
| 170 | if (ret) { | ||
| 171 | switch (i) { | ||
| 172 | case MAX77686_CLK_AP: | ||
| 173 | dev_err(&pdev->dev, "Fail to register CLK_AP\n"); | ||
| 174 | goto err_clk_ap; | ||
| 175 | break; | ||
| 176 | case MAX77686_CLK_CP: | ||
| 177 | dev_err(&pdev->dev, "Fail to register CLK_CP\n"); | ||
| 178 | goto err_clk_cp; | ||
| 179 | break; | ||
| 180 | case MAX77686_CLK_PMIC: | ||
| 181 | dev_err(&pdev->dev, "Fail to register CLK_PMIC\n"); | ||
| 182 | goto err_clk_pmic; | ||
| 183 | } | ||
| 184 | } | ||
| 185 | } | ||
| 186 | |||
| 187 | platform_set_drvdata(pdev, max77686_clks); | ||
| 188 | |||
| 189 | goto out; | ||
| 190 | |||
| 191 | err_clk_pmic: | ||
| 192 | clkdev_drop(max77686_clks[MAX77686_CLK_CP]->lookup); | ||
| 193 | kfree(max77686_clks[MAX77686_CLK_CP]->hw.clk); | ||
| 194 | err_clk_cp: | ||
| 195 | clkdev_drop(max77686_clks[MAX77686_CLK_AP]->lookup); | ||
| 196 | kfree(max77686_clks[MAX77686_CLK_AP]->hw.clk); | ||
| 197 | err_clk_ap: | ||
| 198 | out: | ||
| 199 | return ret; | ||
| 200 | } | ||
| 201 | |||
| 202 | static int __devexit max77686_clk_remove(struct platform_device *pdev) | ||
| 203 | { | ||
| 204 | struct max77686_clk **max77686_clks = platform_get_drvdata(pdev); | ||
| 205 | int i; | ||
| 206 | |||
| 207 | for (i = 0; i < MAX77686_CLKS_NUM; i++) { | ||
| 208 | clkdev_drop(max77686_clks[i]->lookup); | ||
| 209 | kfree(max77686_clks[i]->hw.clk); | ||
| 210 | } | ||
| 211 | return 0; | ||
| 212 | } | ||
| 213 | |||
| 214 | static const struct platform_device_id max77686_clk_id[] = { | ||
| 215 | { "max77686-clk", 0}, | ||
| 216 | { }, | ||
| 217 | }; | ||
| 218 | MODULE_DEVICE_TABLE(platform, max77686_clk_id); | ||
| 219 | |||
| 220 | static struct platform_driver max77686_clk_driver = { | ||
| 221 | .driver = { | ||
| 222 | .name = "max77686-clk", | ||
| 223 | .owner = THIS_MODULE, | ||
| 224 | }, | ||
| 225 | .probe = max77686_clk_probe, | ||
| 226 | .remove = __devexit_p(max77686_clk_remove), | ||
| 227 | .id_table = max77686_clk_id, | ||
| 228 | }; | ||
| 229 | |||
| 230 | static int __init max77686_clk_init(void) | ||
| 231 | { | ||
| 232 | return platform_driver_register(&max77686_clk_driver); | ||
| 233 | } | ||
| 234 | subsys_initcall(max77686_clk_init); | ||
| 235 | |||
| 236 | static void __init max77686_clk_cleanup(void) | ||
| 237 | { | ||
| 238 | platform_driver_unregister(&max77686_clk_driver); | ||
| 239 | } | ||
| 240 | module_exit(max77686_clk_cleanup); | ||
| 241 | |||
| 242 | MODULE_DESCRIPTION("MAXIM 77686 Clock Driver"); | ||
| 243 | MODULE_AUTHOR("Jonghwa Lee <jonghwa3.lee@samsung.com>"); | ||
| 244 | MODULE_LICENSE("GPL"); | ||
diff --git a/drivers/clk/clk-prima2.c b/drivers/clk/clk-prima2.c new file mode 100644 index 000000000000..517874fa6858 --- /dev/null +++ b/drivers/clk/clk-prima2.c | |||
| @@ -0,0 +1,1171 @@ | |||
| 1 | /* | ||
| 2 | * Clock tree for CSR SiRFprimaII | ||
| 3 | * | ||
| 4 | * Copyright (c) 2011 Cambridge Silicon Radio Limited, a CSR plc group company. | ||
| 5 | * | ||
| 6 | * Licensed under GPLv2 or later. | ||
| 7 | */ | ||
| 8 | |||
| 9 | #include <linux/module.h> | ||
| 10 | #include <linux/bitops.h> | ||
| 11 | #include <linux/io.h> | ||
| 12 | #include <linux/clk.h> | ||
| 13 | #include <linux/clkdev.h> | ||
| 14 | #include <linux/clk-provider.h> | ||
| 15 | #include <linux/of_address.h> | ||
| 16 | #include <linux/syscore_ops.h> | ||
| 17 | |||
| 18 | #define SIRFSOC_CLKC_CLK_EN0 0x0000 | ||
| 19 | #define SIRFSOC_CLKC_CLK_EN1 0x0004 | ||
| 20 | #define SIRFSOC_CLKC_REF_CFG 0x0014 | ||
| 21 | #define SIRFSOC_CLKC_CPU_CFG 0x0018 | ||
| 22 | #define SIRFSOC_CLKC_MEM_CFG 0x001c | ||
| 23 | #define SIRFSOC_CLKC_SYS_CFG 0x0020 | ||
| 24 | #define SIRFSOC_CLKC_IO_CFG 0x0024 | ||
| 25 | #define SIRFSOC_CLKC_DSP_CFG 0x0028 | ||
| 26 | #define SIRFSOC_CLKC_GFX_CFG 0x002c | ||
| 27 | #define SIRFSOC_CLKC_MM_CFG 0x0030 | ||
| 28 | #define SIRFSOC_CLKC_LCD_CFG 0x0034 | ||
| 29 | #define SIRFSOC_CLKC_MMC_CFG 0x0038 | ||
| 30 | #define SIRFSOC_CLKC_PLL1_CFG0 0x0040 | ||
| 31 | #define SIRFSOC_CLKC_PLL2_CFG0 0x0044 | ||
| 32 | #define SIRFSOC_CLKC_PLL3_CFG0 0x0048 | ||
| 33 | #define SIRFSOC_CLKC_PLL1_CFG1 0x004c | ||
| 34 | #define SIRFSOC_CLKC_PLL2_CFG1 0x0050 | ||
| 35 | #define SIRFSOC_CLKC_PLL3_CFG1 0x0054 | ||
| 36 | #define SIRFSOC_CLKC_PLL1_CFG2 0x0058 | ||
| 37 | #define SIRFSOC_CLKC_PLL2_CFG2 0x005c | ||
| 38 | #define SIRFSOC_CLKC_PLL3_CFG2 0x0060 | ||
| 39 | #define SIRFSOC_USBPHY_PLL_CTRL 0x0008 | ||
| 40 | #define SIRFSOC_USBPHY_PLL_POWERDOWN BIT(1) | ||
| 41 | #define SIRFSOC_USBPHY_PLL_BYPASS BIT(2) | ||
| 42 | #define SIRFSOC_USBPHY_PLL_LOCK BIT(3) | ||
| 43 | |||
| 44 | static void *sirfsoc_clk_vbase, *sirfsoc_rsc_vbase; | ||
| 45 | |||
| 46 | #define KHZ 1000 | ||
| 47 | #define MHZ (KHZ * KHZ) | ||
| 48 | |||
| 49 | /* | ||
| 50 | * SiRFprimaII clock controller | ||
| 51 | * - 2 oscillators: osc-26MHz, rtc-32.768KHz | ||
| 52 | * - 3 standard configurable plls: pll1, pll2 & pll3 | ||
| 53 | * - 2 exclusive plls: usb phy pll and sata phy pll | ||
| 54 | * - 8 clock domains: cpu/cpudiv, mem/memdiv, sys/io, dsp, graphic, multimedia, | ||
| 55 | * display and sdphy. | ||
| 56 | * Each clock domain can select its own clock source from five clock sources, | ||
| 57 | * X_XIN, X_XINW, PLL1, PLL2 and PLL3. The domain clock is used as the source | ||
| 58 | * clock of the group clock. | ||
| 59 | * - dsp domain: gps, mf | ||
| 60 | * - io domain: dmac, nand, audio, uart, i2c, spi, usp, pwm, pulse | ||
| 61 | * - sys domain: security | ||
| 62 | */ | ||
| 63 | |||
| 64 | struct clk_pll { | ||
| 65 | struct clk_hw hw; | ||
| 66 | unsigned short regofs; /* register offset */ | ||
| 67 | }; | ||
| 68 | |||
| 69 | #define to_pllclk(_hw) container_of(_hw, struct clk_pll, hw) | ||
| 70 | |||
| 71 | struct clk_dmn { | ||
| 72 | struct clk_hw hw; | ||
| 73 | signed char enable_bit; /* enable bit: 0 ~ 63 */ | ||
| 74 | unsigned short regofs; /* register offset */ | ||
| 75 | }; | ||
| 76 | |||
| 77 | #define to_dmnclk(_hw) container_of(_hw, struct clk_dmn, hw) | ||
| 78 | |||
| 79 | struct clk_std { | ||
| 80 | struct clk_hw hw; | ||
| 81 | signed char enable_bit; /* enable bit: 0 ~ 63 */ | ||
| 82 | }; | ||
| 83 | |||
| 84 | #define to_stdclk(_hw) container_of(_hw, struct clk_std, hw) | ||
| 85 | |||
| 86 | static int std_clk_is_enabled(struct clk_hw *hw); | ||
| 87 | static int std_clk_enable(struct clk_hw *hw); | ||
| 88 | static void std_clk_disable(struct clk_hw *hw); | ||
| 89 | |||
| 90 | static inline unsigned long clkc_readl(unsigned reg) | ||
| 91 | { | ||
| 92 | return readl(sirfsoc_clk_vbase + reg); | ||
| 93 | } | ||
| 94 | |||
| 95 | static inline void clkc_writel(u32 val, unsigned reg) | ||
| 96 | { | ||
| 97 | writel(val, sirfsoc_clk_vbase + reg); | ||
| 98 | } | ||
| 99 | |||
| 100 | /* | ||
| 101 | * std pll | ||
| 102 | */ | ||
| 103 | |||
| 104 | static unsigned long pll_clk_recalc_rate(struct clk_hw *hw, | ||
| 105 | unsigned long parent_rate) | ||
| 106 | { | ||
| 107 | unsigned long fin = parent_rate; | ||
| 108 | struct clk_pll *clk = to_pllclk(hw); | ||
| 109 | u32 regcfg2 = clk->regofs + SIRFSOC_CLKC_PLL1_CFG2 - | ||
| 110 | SIRFSOC_CLKC_PLL1_CFG0; | ||
| 111 | |||
| 112 | if (clkc_readl(regcfg2) & BIT(2)) { | ||
| 113 | /* pll bypass mode */ | ||
| 114 | return fin; | ||
| 115 | } else { | ||
| 116 | /* fout = fin * nf / nr / od */ | ||
| 117 | u32 cfg0 = clkc_readl(clk->regofs); | ||
| 118 | u32 nf = (cfg0 & (BIT(13) - 1)) + 1; | ||
| 119 | u32 nr = ((cfg0 >> 13) & (BIT(6) - 1)) + 1; | ||
| 120 | u32 od = ((cfg0 >> 19) & (BIT(4) - 1)) + 1; | ||
| 121 | WARN_ON(fin % MHZ); | ||
| 122 | return fin / MHZ * nf / nr / od * MHZ; | ||
| 123 | } | ||
| 124 | } | ||
| 125 | |||
| 126 | static long pll_clk_round_rate(struct clk_hw *hw, unsigned long rate, | ||
| 127 | unsigned long *parent_rate) | ||
| 128 | { | ||
| 129 | unsigned long fin, nf, nr, od; | ||
| 130 | |||
| 131 | /* | ||
| 132 | * fout = fin * nf / (nr * od); | ||
| 133 | * set od = 1, nr = fin/MHz, so fout = nf * MHz | ||
| 134 | */ | ||
| 135 | rate = rate - rate % MHZ; | ||
| 136 | |||
| 137 | nf = rate / MHZ; | ||
| 138 | if (nf > BIT(13)) | ||
| 139 | nf = BIT(13); | ||
| 140 | if (nf < 1) | ||
| 141 | nf = 1; | ||
| 142 | |||
| 143 | fin = *parent_rate; | ||
| 144 | |||
| 145 | nr = fin / MHZ; | ||
| 146 | if (nr > BIT(6)) | ||
| 147 | nr = BIT(6); | ||
| 148 | od = 1; | ||
| 149 | |||
| 150 | return fin * nf / (nr * od); | ||
| 151 | } | ||
| 152 | |||
| 153 | static int pll_clk_set_rate(struct clk_hw *hw, unsigned long rate, | ||
| 154 | unsigned long parent_rate) | ||
| 155 | { | ||
| 156 | struct clk_pll *clk = to_pllclk(hw); | ||
| 157 | unsigned long fin, nf, nr, od, reg; | ||
| 158 | |||
| 159 | /* | ||
| 160 | * fout = fin * nf / (nr * od); | ||
| 161 | * set od = 1, nr = fin/MHz, so fout = nf * MHz | ||
| 162 | */ | ||
| 163 | |||
| 164 | nf = rate / MHZ; | ||
| 165 | if (unlikely((rate % MHZ) || nf > BIT(13) || nf < 1)) | ||
| 166 | return -EINVAL; | ||
| 167 | |||
| 168 | fin = parent_rate; | ||
| 169 | BUG_ON(fin < MHZ); | ||
| 170 | |||
| 171 | nr = fin / MHZ; | ||
| 172 | BUG_ON((fin % MHZ) || nr > BIT(6)); | ||
| 173 | |||
| 174 | od = 1; | ||
| 175 | |||
| 176 | reg = (nf - 1) | ((nr - 1) << 13) | ((od - 1) << 19); | ||
| 177 | clkc_writel(reg, clk->regofs); | ||
| 178 | |||
| 179 | reg = clk->regofs + SIRFSOC_CLKC_PLL1_CFG1 - SIRFSOC_CLKC_PLL1_CFG0; | ||
| 180 | clkc_writel((nf >> 1) - 1, reg); | ||
| 181 | |||
| 182 | reg = clk->regofs + SIRFSOC_CLKC_PLL1_CFG2 - SIRFSOC_CLKC_PLL1_CFG0; | ||
| 183 | while (!(clkc_readl(reg) & BIT(6))) | ||
| 184 | cpu_relax(); | ||
| 185 | |||
| 186 | return 0; | ||
| 187 | } | ||
| 188 | |||
| 189 | static struct clk_ops std_pll_ops = { | ||
| 190 | .recalc_rate = pll_clk_recalc_rate, | ||
| 191 | .round_rate = pll_clk_round_rate, | ||
| 192 | .set_rate = pll_clk_set_rate, | ||
| 193 | }; | ||
| 194 | |||
| 195 | static const char *pll_clk_parents[] = { | ||
| 196 | "osc", | ||
| 197 | }; | ||
| 198 | |||
| 199 | static struct clk_init_data clk_pll1_init = { | ||
| 200 | .name = "pll1", | ||
| 201 | .ops = &std_pll_ops, | ||
| 202 | .parent_names = pll_clk_parents, | ||
| 203 | .num_parents = ARRAY_SIZE(pll_clk_parents), | ||
| 204 | }; | ||
| 205 | |||
| 206 | static struct clk_init_data clk_pll2_init = { | ||
| 207 | .name = "pll2", | ||
| 208 | .ops = &std_pll_ops, | ||
| 209 | .parent_names = pll_clk_parents, | ||
| 210 | .num_parents = ARRAY_SIZE(pll_clk_parents), | ||
| 211 | }; | ||
| 212 | |||
| 213 | static struct clk_init_data clk_pll3_init = { | ||
| 214 | .name = "pll3", | ||
| 215 | .ops = &std_pll_ops, | ||
| 216 | .parent_names = pll_clk_parents, | ||
| 217 | .num_parents = ARRAY_SIZE(pll_clk_parents), | ||
| 218 | }; | ||
| 219 | |||
| 220 | static struct clk_pll clk_pll1 = { | ||
| 221 | .regofs = SIRFSOC_CLKC_PLL1_CFG0, | ||
| 222 | .hw = { | ||
| 223 | .init = &clk_pll1_init, | ||
| 224 | }, | ||
| 225 | }; | ||
| 226 | |||
| 227 | static struct clk_pll clk_pll2 = { | ||
| 228 | .regofs = SIRFSOC_CLKC_PLL2_CFG0, | ||
| 229 | .hw = { | ||
| 230 | .init = &clk_pll2_init, | ||
| 231 | }, | ||
| 232 | }; | ||
| 233 | |||
| 234 | static struct clk_pll clk_pll3 = { | ||
| 235 | .regofs = SIRFSOC_CLKC_PLL3_CFG0, | ||
| 236 | .hw = { | ||
| 237 | .init = &clk_pll3_init, | ||
| 238 | }, | ||
| 239 | }; | ||
| 240 | |||
| 241 | /* | ||
| 242 | * usb uses specified pll | ||
| 243 | */ | ||
| 244 | |||
| 245 | static int usb_pll_clk_enable(struct clk_hw *hw) | ||
| 246 | { | ||
| 247 | u32 reg = readl(sirfsoc_rsc_vbase + SIRFSOC_USBPHY_PLL_CTRL); | ||
| 248 | reg &= ~(SIRFSOC_USBPHY_PLL_POWERDOWN | SIRFSOC_USBPHY_PLL_BYPASS); | ||
| 249 | writel(reg, sirfsoc_rsc_vbase + SIRFSOC_USBPHY_PLL_CTRL); | ||
| 250 | while (!(readl(sirfsoc_rsc_vbase + SIRFSOC_USBPHY_PLL_CTRL) & | ||
| 251 | SIRFSOC_USBPHY_PLL_LOCK)) | ||
| 252 | cpu_relax(); | ||
| 253 | |||
| 254 | return 0; | ||
| 255 | } | ||
| 256 | |||
| 257 | static void usb_pll_clk_disable(struct clk_hw *clk) | ||
| 258 | { | ||
| 259 | u32 reg = readl(sirfsoc_rsc_vbase + SIRFSOC_USBPHY_PLL_CTRL); | ||
| 260 | reg |= (SIRFSOC_USBPHY_PLL_POWERDOWN | SIRFSOC_USBPHY_PLL_BYPASS); | ||
| 261 | writel(reg, sirfsoc_rsc_vbase + SIRFSOC_USBPHY_PLL_CTRL); | ||
| 262 | } | ||
| 263 | |||
| 264 | static unsigned long usb_pll_clk_recalc_rate(struct clk_hw *hw, unsigned long parent_rate) | ||
| 265 | { | ||
| 266 | u32 reg = readl(sirfsoc_rsc_vbase + SIRFSOC_USBPHY_PLL_CTRL); | ||
| 267 | return (reg & SIRFSOC_USBPHY_PLL_BYPASS) ? parent_rate : 48*MHZ; | ||
| 268 | } | ||
| 269 | |||
| 270 | static struct clk_ops usb_pll_ops = { | ||
| 271 | .enable = usb_pll_clk_enable, | ||
| 272 | .disable = usb_pll_clk_disable, | ||
| 273 | .recalc_rate = usb_pll_clk_recalc_rate, | ||
| 274 | }; | ||
| 275 | |||
| 276 | static struct clk_init_data clk_usb_pll_init = { | ||
| 277 | .name = "usb_pll", | ||
| 278 | .ops = &usb_pll_ops, | ||
| 279 | .parent_names = pll_clk_parents, | ||
| 280 | .num_parents = ARRAY_SIZE(pll_clk_parents), | ||
| 281 | }; | ||
| 282 | |||
| 283 | static struct clk_hw usb_pll_clk_hw = { | ||
| 284 | .init = &clk_usb_pll_init, | ||
| 285 | }; | ||
| 286 | |||
| 287 | /* | ||
| 288 | * clock domains - cpu, mem, sys/io, dsp, gfx | ||
| 289 | */ | ||
| 290 | |||
| 291 | static const char *dmn_clk_parents[] = { | ||
| 292 | "rtc", | ||
| 293 | "osc", | ||
| 294 | "pll1", | ||
| 295 | "pll2", | ||
| 296 | "pll3", | ||
| 297 | }; | ||
| 298 | |||
| 299 | static u8 dmn_clk_get_parent(struct clk_hw *hw) | ||
| 300 | { | ||
| 301 | struct clk_dmn *clk = to_dmnclk(hw); | ||
| 302 | u32 cfg = clkc_readl(clk->regofs); | ||
| 303 | |||
| 304 | /* parent of io domain can only be pll3 */ | ||
| 305 | if (strcmp(hw->init->name, "io") == 0) | ||
| 306 | return 4; | ||
| 307 | |||
| 308 | WARN_ON((cfg & (BIT(3) - 1)) > 4); | ||
| 309 | |||
| 310 | return cfg & (BIT(3) - 1); | ||
| 311 | } | ||
| 312 | |||
| 313 | static int dmn_clk_set_parent(struct clk_hw *hw, u8 parent) | ||
| 314 | { | ||
| 315 | struct clk_dmn *clk = to_dmnclk(hw); | ||
| 316 | u32 cfg = clkc_readl(clk->regofs); | ||
| 317 | |||
| 318 | /* parent of io domain can only be pll3 */ | ||
| 319 | if (strcmp(hw->init->name, "io") == 0) | ||
| 320 | return -EINVAL; | ||
| 321 | |||
| 322 | cfg &= ~(BIT(3) - 1); | ||
| 323 | clkc_writel(cfg | parent, clk->regofs); | ||
| 324 | /* BIT(3) - switching status: 1 - busy, 0 - done */ | ||
| 325 | while (clkc_readl(clk->regofs) & BIT(3)) | ||
| 326 | cpu_relax(); | ||
| 327 | |||
| 328 | return 0; | ||
| 329 | } | ||
| 330 | |||
| 331 | static unsigned long dmn_clk_recalc_rate(struct clk_hw *hw, | ||
| 332 | unsigned long parent_rate) | ||
| 333 | |||
| 334 | { | ||
| 335 | unsigned long fin = parent_rate; | ||
| 336 | struct clk_dmn *clk = to_dmnclk(hw); | ||
| 337 | |||
| 338 | u32 cfg = clkc_readl(clk->regofs); | ||
| 339 | |||
| 340 | if (cfg & BIT(24)) { | ||
| 341 | /* fcd bypass mode */ | ||
| 342 | return fin; | ||
| 343 | } else { | ||
| 344 | /* | ||
| 345 | * wait count: bit[19:16], hold count: bit[23:20] | ||
| 346 | */ | ||
| 347 | u32 wait = (cfg >> 16) & (BIT(4) - 1); | ||
| 348 | u32 hold = (cfg >> 20) & (BIT(4) - 1); | ||
| 349 | |||
| 350 | return fin / (wait + hold + 2); | ||
| 351 | } | ||
| 352 | } | ||
| 353 | |||
| 354 | static long dmn_clk_round_rate(struct clk_hw *hw, unsigned long rate, | ||
| 355 | unsigned long *parent_rate) | ||
| 356 | { | ||
| 357 | unsigned long fin; | ||
| 358 | unsigned ratio, wait, hold; | ||
| 359 | unsigned bits = (strcmp(hw->init->name, "mem") == 0) ? 3 : 4; | ||
| 360 | |||
| 361 | fin = *parent_rate; | ||
| 362 | ratio = fin / rate; | ||
| 363 | |||
| 364 | if (ratio < 2) | ||
| 365 | ratio = 2; | ||
| 366 | if (ratio > BIT(bits + 1)) | ||
| 367 | ratio = BIT(bits + 1); | ||
| 368 | |||
| 369 | wait = (ratio >> 1) - 1; | ||
| 370 | hold = ratio - wait - 2; | ||
| 371 | |||
| 372 | return fin / (wait + hold + 2); | ||
| 373 | } | ||
| 374 | |||
| 375 | static int dmn_clk_set_rate(struct clk_hw *hw, unsigned long rate, | ||
| 376 | unsigned long parent_rate) | ||
| 377 | { | ||
| 378 | struct clk_dmn *clk = to_dmnclk(hw); | ||
| 379 | unsigned long fin; | ||
| 380 | unsigned ratio, wait, hold, reg; | ||
| 381 | unsigned bits = (strcmp(hw->init->name, "mem") == 0) ? 3 : 4; | ||
| 382 | |||
| 383 | fin = parent_rate; | ||
| 384 | ratio = fin / rate; | ||
| 385 | |||
| 386 | if (unlikely(ratio < 2 || ratio > BIT(bits + 1))) | ||
| 387 | return -EINVAL; | ||
| 388 | |||
| 389 | WARN_ON(fin % rate); | ||
| 390 | |||
| 391 | wait = (ratio >> 1) - 1; | ||
| 392 | hold = ratio - wait - 2; | ||
| 393 | |||
| 394 | reg = clkc_readl(clk->regofs); | ||
| 395 | reg &= ~(((BIT(bits) - 1) << 16) | ((BIT(bits) - 1) << 20)); | ||
| 396 | reg |= (wait << 16) | (hold << 20) | BIT(25); | ||
| 397 | clkc_writel(reg, clk->regofs); | ||
| 398 | |||
| 399 | /* waiting FCD been effective */ | ||
| 400 | while (clkc_readl(clk->regofs) & BIT(25)) | ||
| 401 | cpu_relax(); | ||
| 402 | |||
| 403 | return 0; | ||
| 404 | } | ||
| 405 | |||
| 406 | static struct clk_ops msi_ops = { | ||
| 407 | .set_rate = dmn_clk_set_rate, | ||
| 408 | .round_rate = dmn_clk_round_rate, | ||
| 409 | .recalc_rate = dmn_clk_recalc_rate, | ||
| 410 | .set_parent = dmn_clk_set_parent, | ||
| 411 | .get_parent = dmn_clk_get_parent, | ||
| 412 | }; | ||
| 413 | |||
| 414 | static struct clk_init_data clk_mem_init = { | ||
| 415 | .name = "mem", | ||
| 416 | .ops = &msi_ops, | ||
| 417 | .parent_names = dmn_clk_parents, | ||
| 418 | .num_parents = ARRAY_SIZE(dmn_clk_parents), | ||
| 419 | }; | ||
| 420 | |||
| 421 | static struct clk_dmn clk_mem = { | ||
| 422 | .regofs = SIRFSOC_CLKC_MEM_CFG, | ||
| 423 | .hw = { | ||
| 424 | .init = &clk_mem_init, | ||
| 425 | }, | ||
| 426 | }; | ||
| 427 | |||
| 428 | static struct clk_init_data clk_sys_init = { | ||
| 429 | .name = "sys", | ||
| 430 | .ops = &msi_ops, | ||
| 431 | .parent_names = dmn_clk_parents, | ||
| 432 | .num_parents = ARRAY_SIZE(dmn_clk_parents), | ||
| 433 | .flags = CLK_SET_RATE_GATE, | ||
| 434 | }; | ||
| 435 | |||
| 436 | static struct clk_dmn clk_sys = { | ||
| 437 | .regofs = SIRFSOC_CLKC_SYS_CFG, | ||
| 438 | .hw = { | ||
| 439 | .init = &clk_sys_init, | ||
| 440 | }, | ||
| 441 | }; | ||
| 442 | |||
| 443 | static struct clk_init_data clk_io_init = { | ||
| 444 | .name = "io", | ||
| 445 | .ops = &msi_ops, | ||
| 446 | .parent_names = dmn_clk_parents, | ||
| 447 | .num_parents = ARRAY_SIZE(dmn_clk_parents), | ||
| 448 | }; | ||
| 449 | |||
| 450 | static struct clk_dmn clk_io = { | ||
| 451 | .regofs = SIRFSOC_CLKC_IO_CFG, | ||
| 452 | .hw = { | ||
| 453 | .init = &clk_io_init, | ||
| 454 | }, | ||
| 455 | }; | ||
| 456 | |||
| 457 | static struct clk_ops cpu_ops = { | ||
| 458 | .set_parent = dmn_clk_set_parent, | ||
| 459 | .get_parent = dmn_clk_get_parent, | ||
| 460 | }; | ||
| 461 | |||
| 462 | static struct clk_init_data clk_cpu_init = { | ||
| 463 | .name = "cpu", | ||
| 464 | .ops = &cpu_ops, | ||
| 465 | .parent_names = dmn_clk_parents, | ||
| 466 | .num_parents = ARRAY_SIZE(dmn_clk_parents), | ||
| 467 | .flags = CLK_SET_RATE_PARENT, | ||
| 468 | }; | ||
| 469 | |||
| 470 | static struct clk_dmn clk_cpu = { | ||
| 471 | .regofs = SIRFSOC_CLKC_CPU_CFG, | ||
| 472 | .hw = { | ||
| 473 | .init = &clk_cpu_init, | ||
| 474 | }, | ||
| 475 | }; | ||
| 476 | |||
| 477 | static struct clk_ops dmn_ops = { | ||
| 478 | .is_enabled = std_clk_is_enabled, | ||
| 479 | .enable = std_clk_enable, | ||
| 480 | .disable = std_clk_disable, | ||
| 481 | .set_rate = dmn_clk_set_rate, | ||
| 482 | .round_rate = dmn_clk_round_rate, | ||
| 483 | .recalc_rate = dmn_clk_recalc_rate, | ||
| 484 | .set_parent = dmn_clk_set_parent, | ||
| 485 | .get_parent = dmn_clk_get_parent, | ||
| 486 | }; | ||
| 487 | |||
| 488 | /* dsp, gfx, mm, lcd and vpp domain */ | ||
| 489 | |||
| 490 | static struct clk_init_data clk_dsp_init = { | ||
| 491 | .name = "dsp", | ||
| 492 | .ops = &dmn_ops, | ||
| 493 | .parent_names = dmn_clk_parents, | ||
| 494 | .num_parents = ARRAY_SIZE(dmn_clk_parents), | ||
| 495 | }; | ||
| 496 | |||
| 497 | static struct clk_dmn clk_dsp = { | ||
| 498 | .regofs = SIRFSOC_CLKC_DSP_CFG, | ||
| 499 | .enable_bit = 0, | ||
| 500 | .hw = { | ||
| 501 | .init = &clk_dsp_init, | ||
| 502 | }, | ||
| 503 | }; | ||
| 504 | |||
| 505 | static struct clk_init_data clk_gfx_init = { | ||
| 506 | .name = "gfx", | ||
| 507 | .ops = &dmn_ops, | ||
| 508 | .parent_names = dmn_clk_parents, | ||
| 509 | .num_parents = ARRAY_SIZE(dmn_clk_parents), | ||
| 510 | }; | ||
| 511 | |||
| 512 | static struct clk_dmn clk_gfx = { | ||
| 513 | .regofs = SIRFSOC_CLKC_GFX_CFG, | ||
| 514 | .enable_bit = 8, | ||
| 515 | .hw = { | ||
| 516 | .init = &clk_gfx_init, | ||
| 517 | }, | ||
| 518 | }; | ||
| 519 | |||
| 520 | static struct clk_init_data clk_mm_init = { | ||
| 521 | .name = "mm", | ||
| 522 | .ops = &dmn_ops, | ||
| 523 | .parent_names = dmn_clk_parents, | ||
| 524 | .num_parents = ARRAY_SIZE(dmn_clk_parents), | ||
| 525 | }; | ||
| 526 | |||
| 527 | static struct clk_dmn clk_mm = { | ||
| 528 | .regofs = SIRFSOC_CLKC_MM_CFG, | ||
| 529 | .enable_bit = 9, | ||
| 530 | .hw = { | ||
| 531 | .init = &clk_mm_init, | ||
| 532 | }, | ||
| 533 | }; | ||
| 534 | |||
| 535 | static struct clk_init_data clk_lcd_init = { | ||
| 536 | .name = "lcd", | ||
| 537 | .ops = &dmn_ops, | ||
| 538 | .parent_names = dmn_clk_parents, | ||
| 539 | .num_parents = ARRAY_SIZE(dmn_clk_parents), | ||
| 540 | }; | ||
| 541 | |||
| 542 | static struct clk_dmn clk_lcd = { | ||
| 543 | .regofs = SIRFSOC_CLKC_LCD_CFG, | ||
| 544 | .enable_bit = 10, | ||
| 545 | .hw = { | ||
| 546 | .init = &clk_lcd_init, | ||
| 547 | }, | ||
| 548 | }; | ||
| 549 | |||
| 550 | static struct clk_init_data clk_vpp_init = { | ||
| 551 | .name = "vpp", | ||
| 552 | .ops = &dmn_ops, | ||
| 553 | .parent_names = dmn_clk_parents, | ||
| 554 | .num_parents = ARRAY_SIZE(dmn_clk_parents), | ||
| 555 | }; | ||
| 556 | |||
| 557 | static struct clk_dmn clk_vpp = { | ||
| 558 | .regofs = SIRFSOC_CLKC_LCD_CFG, | ||
| 559 | .enable_bit = 11, | ||
| 560 | .hw = { | ||
| 561 | .init = &clk_vpp_init, | ||
| 562 | }, | ||
| 563 | }; | ||
| 564 | |||
| 565 | static struct clk_init_data clk_mmc01_init = { | ||
| 566 | .name = "mmc01", | ||
| 567 | .ops = &dmn_ops, | ||
| 568 | .parent_names = dmn_clk_parents, | ||
| 569 | .num_parents = ARRAY_SIZE(dmn_clk_parents), | ||
| 570 | }; | ||
| 571 | |||
| 572 | static struct clk_dmn clk_mmc01 = { | ||
| 573 | .regofs = SIRFSOC_CLKC_MMC_CFG, | ||
| 574 | .enable_bit = 59, | ||
| 575 | .hw = { | ||
| 576 | .init = &clk_mmc01_init, | ||
| 577 | }, | ||
| 578 | }; | ||
| 579 | |||
| 580 | static struct clk_init_data clk_mmc23_init = { | ||
| 581 | .name = "mmc23", | ||
| 582 | .ops = &dmn_ops, | ||
| 583 | .parent_names = dmn_clk_parents, | ||
| 584 | .num_parents = ARRAY_SIZE(dmn_clk_parents), | ||
| 585 | }; | ||
| 586 | |||
| 587 | static struct clk_dmn clk_mmc23 = { | ||
| 588 | .regofs = SIRFSOC_CLKC_MMC_CFG, | ||
| 589 | .enable_bit = 60, | ||
| 590 | .hw = { | ||
| 591 | .init = &clk_mmc23_init, | ||
| 592 | }, | ||
| 593 | }; | ||
| 594 | |||
| 595 | static struct clk_init_data clk_mmc45_init = { | ||
| 596 | .name = "mmc45", | ||
| 597 | .ops = &dmn_ops, | ||
| 598 | .parent_names = dmn_clk_parents, | ||
| 599 | .num_parents = ARRAY_SIZE(dmn_clk_parents), | ||
| 600 | }; | ||
| 601 | |||
| 602 | static struct clk_dmn clk_mmc45 = { | ||
| 603 | .regofs = SIRFSOC_CLKC_MMC_CFG, | ||
| 604 | .enable_bit = 61, | ||
| 605 | .hw = { | ||
| 606 | .init = &clk_mmc45_init, | ||
| 607 | }, | ||
| 608 | }; | ||
| 609 | |||
| 610 | /* | ||
| 611 | * peripheral controllers in io domain | ||
| 612 | */ | ||
| 613 | |||
| 614 | static int std_clk_is_enabled(struct clk_hw *hw) | ||
| 615 | { | ||
| 616 | u32 reg; | ||
| 617 | int bit; | ||
| 618 | struct clk_std *clk = to_stdclk(hw); | ||
| 619 | |||
| 620 | bit = clk->enable_bit % 32; | ||
| 621 | reg = clk->enable_bit / 32; | ||
| 622 | reg = SIRFSOC_CLKC_CLK_EN0 + reg * sizeof(reg); | ||
| 623 | |||
| 624 | return !!(clkc_readl(reg) & BIT(bit)); | ||
| 625 | } | ||
| 626 | |||
| 627 | static int std_clk_enable(struct clk_hw *hw) | ||
| 628 | { | ||
| 629 | u32 val, reg; | ||
| 630 | int bit; | ||
| 631 | struct clk_std *clk = to_stdclk(hw); | ||
| 632 | |||
| 633 | BUG_ON(clk->enable_bit < 0 || clk->enable_bit > 63); | ||
| 634 | |||
| 635 | bit = clk->enable_bit % 32; | ||
| 636 | reg = clk->enable_bit / 32; | ||
| 637 | reg = SIRFSOC_CLKC_CLK_EN0 + reg * sizeof(reg); | ||
| 638 | |||
| 639 | val = clkc_readl(reg) | BIT(bit); | ||
| 640 | clkc_writel(val, reg); | ||
| 641 | return 0; | ||
| 642 | } | ||
| 643 | |||
| 644 | static void std_clk_disable(struct clk_hw *hw) | ||
| 645 | { | ||
| 646 | u32 val, reg; | ||
| 647 | int bit; | ||
| 648 | struct clk_std *clk = to_stdclk(hw); | ||
| 649 | |||
| 650 | BUG_ON(clk->enable_bit < 0 || clk->enable_bit > 63); | ||
| 651 | |||
| 652 | bit = clk->enable_bit % 32; | ||
| 653 | reg = clk->enable_bit / 32; | ||
| 654 | reg = SIRFSOC_CLKC_CLK_EN0 + reg * sizeof(reg); | ||
| 655 | |||
| 656 | val = clkc_readl(reg) & ~BIT(bit); | ||
| 657 | clkc_writel(val, reg); | ||
| 658 | } | ||
| 659 | |||
| 660 | static const char *std_clk_io_parents[] = { | ||
| 661 | "io", | ||
| 662 | }; | ||
| 663 | |||
| 664 | static struct clk_ops ios_ops = { | ||
| 665 | .is_enabled = std_clk_is_enabled, | ||
| 666 | .enable = std_clk_enable, | ||
| 667 | .disable = std_clk_disable, | ||
| 668 | }; | ||
| 669 | |||
| 670 | static struct clk_init_data clk_dmac0_init = { | ||
| 671 | .name = "dmac0", | ||
| 672 | .ops = &ios_ops, | ||
| 673 | .parent_names = std_clk_io_parents, | ||
| 674 | .num_parents = ARRAY_SIZE(std_clk_io_parents), | ||
| 675 | }; | ||
| 676 | |||
| 677 | static struct clk_std clk_dmac0 = { | ||
| 678 | .enable_bit = 32, | ||
| 679 | .hw = { | ||
| 680 | .init = &clk_dmac0_init, | ||
| 681 | }, | ||
| 682 | }; | ||
| 683 | |||
| 684 | static struct clk_init_data clk_dmac1_init = { | ||
| 685 | .name = "dmac1", | ||
| 686 | .ops = &ios_ops, | ||
| 687 | .parent_names = std_clk_io_parents, | ||
| 688 | .num_parents = ARRAY_SIZE(std_clk_io_parents), | ||
| 689 | }; | ||
| 690 | |||
| 691 | static struct clk_std clk_dmac1 = { | ||
| 692 | .enable_bit = 33, | ||
| 693 | .hw = { | ||
| 694 | .init = &clk_dmac1_init, | ||
| 695 | }, | ||
| 696 | }; | ||
| 697 | |||
| 698 | static struct clk_init_data clk_nand_init = { | ||
| 699 | .name = "nand", | ||
| 700 | .ops = &ios_ops, | ||
| 701 | .parent_names = std_clk_io_parents, | ||
| 702 | .num_parents = ARRAY_SIZE(std_clk_io_parents), | ||
| 703 | }; | ||
| 704 | |||
| 705 | static struct clk_std clk_nand = { | ||
| 706 | .enable_bit = 34, | ||
| 707 | .hw = { | ||
| 708 | .init = &clk_nand_init, | ||
| 709 | }, | ||
| 710 | }; | ||
| 711 | |||
| 712 | static struct clk_init_data clk_audio_init = { | ||
| 713 | .name = "audio", | ||
| 714 | .ops = &ios_ops, | ||
| 715 | .parent_names = std_clk_io_parents, | ||
| 716 | .num_parents = ARRAY_SIZE(std_clk_io_parents), | ||
| 717 | }; | ||
| 718 | |||
| 719 | static struct clk_std clk_audio = { | ||
| 720 | .enable_bit = 35, | ||
| 721 | .hw = { | ||
| 722 | .init = &clk_audio_init, | ||
| 723 | }, | ||
| 724 | }; | ||
| 725 | |||
| 726 | static struct clk_init_data clk_uart0_init = { | ||
| 727 | .name = "uart0", | ||
| 728 | .ops = &ios_ops, | ||
| 729 | .parent_names = std_clk_io_parents, | ||
| 730 | .num_parents = ARRAY_SIZE(std_clk_io_parents), | ||
| 731 | }; | ||
| 732 | |||
| 733 | static struct clk_std clk_uart0 = { | ||
| 734 | .enable_bit = 36, | ||
| 735 | .hw = { | ||
| 736 | .init = &clk_uart0_init, | ||
| 737 | }, | ||
| 738 | }; | ||
| 739 | |||
| 740 | static struct clk_init_data clk_uart1_init = { | ||
| 741 | .name = "uart1", | ||
| 742 | .ops = &ios_ops, | ||
| 743 | .parent_names = std_clk_io_parents, | ||
| 744 | .num_parents = ARRAY_SIZE(std_clk_io_parents), | ||
| 745 | }; | ||
| 746 | |||
| 747 | static struct clk_std clk_uart1 = { | ||
| 748 | .enable_bit = 37, | ||
| 749 | .hw = { | ||
| 750 | .init = &clk_uart1_init, | ||
| 751 | }, | ||
| 752 | }; | ||
| 753 | |||
| 754 | static struct clk_init_data clk_uart2_init = { | ||
| 755 | .name = "uart2", | ||
| 756 | .ops = &ios_ops, | ||
| 757 | .parent_names = std_clk_io_parents, | ||
| 758 | .num_parents = ARRAY_SIZE(std_clk_io_parents), | ||
| 759 | }; | ||
| 760 | |||
| 761 | static struct clk_std clk_uart2 = { | ||
| 762 | .enable_bit = 38, | ||
| 763 | .hw = { | ||
| 764 | .init = &clk_uart2_init, | ||
| 765 | }, | ||
| 766 | }; | ||
| 767 | |||
| 768 | static struct clk_init_data clk_usp0_init = { | ||
| 769 | .name = "usp0", | ||
| 770 | .ops = &ios_ops, | ||
| 771 | .parent_names = std_clk_io_parents, | ||
| 772 | .num_parents = ARRAY_SIZE(std_clk_io_parents), | ||
| 773 | }; | ||
| 774 | |||
| 775 | static struct clk_std clk_usp0 = { | ||
| 776 | .enable_bit = 39, | ||
| 777 | .hw = { | ||
| 778 | .init = &clk_usp0_init, | ||
| 779 | }, | ||
| 780 | }; | ||
| 781 | |||
| 782 | static struct clk_init_data clk_usp1_init = { | ||
| 783 | .name = "usp1", | ||
| 784 | .ops = &ios_ops, | ||
| 785 | .parent_names = std_clk_io_parents, | ||
| 786 | .num_parents = ARRAY_SIZE(std_clk_io_parents), | ||
| 787 | }; | ||
| 788 | |||
| 789 | static struct clk_std clk_usp1 = { | ||
| 790 | .enable_bit = 40, | ||
| 791 | .hw = { | ||
| 792 | .init = &clk_usp1_init, | ||
| 793 | }, | ||
| 794 | }; | ||
| 795 | |||
| 796 | static struct clk_init_data clk_usp2_init = { | ||
| 797 | .name = "usp2", | ||
| 798 | .ops = &ios_ops, | ||
| 799 | .parent_names = std_clk_io_parents, | ||
| 800 | .num_parents = ARRAY_SIZE(std_clk_io_parents), | ||
| 801 | }; | ||
| 802 | |||
| 803 | static struct clk_std clk_usp2 = { | ||
| 804 | .enable_bit = 41, | ||
| 805 | .hw = { | ||
| 806 | .init = &clk_usp2_init, | ||
| 807 | }, | ||
| 808 | }; | ||
| 809 | |||
| 810 | static struct clk_init_data clk_vip_init = { | ||
| 811 | .name = "vip", | ||
| 812 | .ops = &ios_ops, | ||
| 813 | .parent_names = std_clk_io_parents, | ||
| 814 | .num_parents = ARRAY_SIZE(std_clk_io_parents), | ||
| 815 | }; | ||
| 816 | |||
| 817 | static struct clk_std clk_vip = { | ||
| 818 | .enable_bit = 42, | ||
| 819 | .hw = { | ||
| 820 | .init = &clk_vip_init, | ||
| 821 | }, | ||
| 822 | }; | ||
| 823 | |||
| 824 | static struct clk_init_data clk_spi0_init = { | ||
| 825 | .name = "spi0", | ||
| 826 | .ops = &ios_ops, | ||
| 827 | .parent_names = std_clk_io_parents, | ||
| 828 | .num_parents = ARRAY_SIZE(std_clk_io_parents), | ||
| 829 | }; | ||
| 830 | |||
| 831 | static struct clk_std clk_spi0 = { | ||
| 832 | .enable_bit = 43, | ||
| 833 | .hw = { | ||
| 834 | .init = &clk_spi0_init, | ||
| 835 | }, | ||
| 836 | }; | ||
| 837 | |||
| 838 | static struct clk_init_data clk_spi1_init = { | ||
| 839 | .name = "spi1", | ||
| 840 | .ops = &ios_ops, | ||
| 841 | .parent_names = std_clk_io_parents, | ||
| 842 | .num_parents = ARRAY_SIZE(std_clk_io_parents), | ||
| 843 | }; | ||
| 844 | |||
| 845 | static struct clk_std clk_spi1 = { | ||
| 846 | .enable_bit = 44, | ||
| 847 | .hw = { | ||
| 848 | .init = &clk_spi1_init, | ||
| 849 | }, | ||
| 850 | }; | ||
| 851 | |||
| 852 | static struct clk_init_data clk_tsc_init = { | ||
| 853 | .name = "tsc", | ||
| 854 | .ops = &ios_ops, | ||
| 855 | .parent_names = std_clk_io_parents, | ||
| 856 | .num_parents = ARRAY_SIZE(std_clk_io_parents), | ||
| 857 | }; | ||
| 858 | |||
| 859 | static struct clk_std clk_tsc = { | ||
| 860 | .enable_bit = 45, | ||
| 861 | .hw = { | ||
| 862 | .init = &clk_tsc_init, | ||
| 863 | }, | ||
| 864 | }; | ||
| 865 | |||
| 866 | static struct clk_init_data clk_i2c0_init = { | ||
| 867 | .name = "i2c0", | ||
| 868 | .ops = &ios_ops, | ||
| 869 | .parent_names = std_clk_io_parents, | ||
| 870 | .num_parents = ARRAY_SIZE(std_clk_io_parents), | ||
| 871 | }; | ||
| 872 | |||
| 873 | static struct clk_std clk_i2c0 = { | ||
| 874 | .enable_bit = 46, | ||
| 875 | .hw = { | ||
| 876 | .init = &clk_i2c0_init, | ||
| 877 | }, | ||
| 878 | }; | ||
| 879 | |||
| 880 | static struct clk_init_data clk_i2c1_init = { | ||
| 881 | .name = "i2c1", | ||
| 882 | .ops = &ios_ops, | ||
| 883 | .parent_names = std_clk_io_parents, | ||
| 884 | .num_parents = ARRAY_SIZE(std_clk_io_parents), | ||
| 885 | }; | ||
| 886 | |||
| 887 | static struct clk_std clk_i2c1 = { | ||
| 888 | .enable_bit = 47, | ||
| 889 | .hw = { | ||
| 890 | .init = &clk_i2c1_init, | ||
| 891 | }, | ||
| 892 | }; | ||
| 893 | |||
| 894 | static struct clk_init_data clk_pwmc_init = { | ||
| 895 | .name = "pwmc", | ||
| 896 | .ops = &ios_ops, | ||
| 897 | .parent_names = std_clk_io_parents, | ||
| 898 | .num_parents = ARRAY_SIZE(std_clk_io_parents), | ||
| 899 | }; | ||
| 900 | |||
| 901 | static struct clk_std clk_pwmc = { | ||
| 902 | .enable_bit = 48, | ||
| 903 | .hw = { | ||
| 904 | .init = &clk_pwmc_init, | ||
| 905 | }, | ||
| 906 | }; | ||
| 907 | |||
| 908 | static struct clk_init_data clk_efuse_init = { | ||
| 909 | .name = "efuse", | ||
| 910 | .ops = &ios_ops, | ||
| 911 | .parent_names = std_clk_io_parents, | ||
| 912 | .num_parents = ARRAY_SIZE(std_clk_io_parents), | ||
| 913 | }; | ||
| 914 | |||
| 915 | static struct clk_std clk_efuse = { | ||
| 916 | .enable_bit = 49, | ||
| 917 | .hw = { | ||
| 918 | .init = &clk_efuse_init, | ||
| 919 | }, | ||
| 920 | }; | ||
| 921 | |||
| 922 | static struct clk_init_data clk_pulse_init = { | ||
| 923 | .name = "pulse", | ||
| 924 | .ops = &ios_ops, | ||
| 925 | .parent_names = std_clk_io_parents, | ||
| 926 | .num_parents = ARRAY_SIZE(std_clk_io_parents), | ||
| 927 | }; | ||
| 928 | |||
| 929 | static struct clk_std clk_pulse = { | ||
| 930 | .enable_bit = 50, | ||
| 931 | .hw = { | ||
| 932 | .init = &clk_pulse_init, | ||
| 933 | }, | ||
| 934 | }; | ||
| 935 | |||
| 936 | static const char *std_clk_dsp_parents[] = { | ||
| 937 | "dsp", | ||
| 938 | }; | ||
| 939 | |||
| 940 | static struct clk_init_data clk_gps_init = { | ||
| 941 | .name = "gps", | ||
| 942 | .ops = &ios_ops, | ||
| 943 | .parent_names = std_clk_dsp_parents, | ||
| 944 | .num_parents = ARRAY_SIZE(std_clk_dsp_parents), | ||
| 945 | }; | ||
| 946 | |||
| 947 | static struct clk_std clk_gps = { | ||
| 948 | .enable_bit = 1, | ||
| 949 | .hw = { | ||
| 950 | .init = &clk_gps_init, | ||
| 951 | }, | ||
| 952 | }; | ||
| 953 | |||
| 954 | static struct clk_init_data clk_mf_init = { | ||
| 955 | .name = "mf", | ||
| 956 | .ops = &ios_ops, | ||
| 957 | .parent_names = std_clk_io_parents, | ||
| 958 | .num_parents = ARRAY_SIZE(std_clk_io_parents), | ||
| 959 | }; | ||
| 960 | |||
| 961 | static struct clk_std clk_mf = { | ||
| 962 | .enable_bit = 2, | ||
| 963 | .hw = { | ||
| 964 | .init = &clk_mf_init, | ||
| 965 | }, | ||
| 966 | }; | ||
| 967 | |||
| 968 | static const char *std_clk_sys_parents[] = { | ||
| 969 | "sys", | ||
| 970 | }; | ||
| 971 | |||
| 972 | static struct clk_init_data clk_security_init = { | ||
| 973 | .name = "mf", | ||
| 974 | .ops = &ios_ops, | ||
| 975 | .parent_names = std_clk_sys_parents, | ||
| 976 | .num_parents = ARRAY_SIZE(std_clk_sys_parents), | ||
| 977 | }; | ||
| 978 | |||
| 979 | static struct clk_std clk_security = { | ||
| 980 | .enable_bit = 19, | ||
| 981 | .hw = { | ||
| 982 | .init = &clk_security_init, | ||
| 983 | }, | ||
| 984 | }; | ||
| 985 | |||
| 986 | static const char *std_clk_usb_parents[] = { | ||
| 987 | "usb_pll", | ||
| 988 | }; | ||
| 989 | |||
| 990 | static struct clk_init_data clk_usb0_init = { | ||
| 991 | .name = "usb0", | ||
| 992 | .ops = &ios_ops, | ||
| 993 | .parent_names = std_clk_usb_parents, | ||
| 994 | .num_parents = ARRAY_SIZE(std_clk_usb_parents), | ||
| 995 | }; | ||
| 996 | |||
| 997 | static struct clk_std clk_usb0 = { | ||
| 998 | .enable_bit = 16, | ||
| 999 | .hw = { | ||
| 1000 | .init = &clk_usb0_init, | ||
| 1001 | }, | ||
| 1002 | }; | ||
| 1003 | |||
| 1004 | static struct clk_init_data clk_usb1_init = { | ||
| 1005 | .name = "usb1", | ||
| 1006 | .ops = &ios_ops, | ||
| 1007 | .parent_names = std_clk_usb_parents, | ||
| 1008 | .num_parents = ARRAY_SIZE(std_clk_usb_parents), | ||
| 1009 | }; | ||
| 1010 | |||
| 1011 | static struct clk_std clk_usb1 = { | ||
| 1012 | .enable_bit = 17, | ||
| 1013 | .hw = { | ||
| 1014 | .init = &clk_usb1_init, | ||
| 1015 | }, | ||
| 1016 | }; | ||
| 1017 | |||
| 1018 | static struct of_device_id clkc_ids[] = { | ||
| 1019 | { .compatible = "sirf,prima2-clkc" }, | ||
| 1020 | {}, | ||
| 1021 | }; | ||
| 1022 | |||
| 1023 | static struct of_device_id rsc_ids[] = { | ||
| 1024 | { .compatible = "sirf,prima2-rsc" }, | ||
| 1025 | {}, | ||
| 1026 | }; | ||
| 1027 | |||
| 1028 | void __init sirfsoc_of_clk_init(void) | ||
| 1029 | { | ||
| 1030 | struct clk *clk; | ||
| 1031 | struct device_node *np; | ||
| 1032 | |||
| 1033 | np = of_find_matching_node(NULL, clkc_ids); | ||
| 1034 | if (!np) | ||
| 1035 | panic("unable to find compatible clkc node in dtb\n"); | ||
| 1036 | |||
| 1037 | sirfsoc_clk_vbase = of_iomap(np, 0); | ||
| 1038 | if (!sirfsoc_clk_vbase) | ||
| 1039 | panic("unable to map clkc registers\n"); | ||
| 1040 | |||
| 1041 | of_node_put(np); | ||
| 1042 | |||
| 1043 | np = of_find_matching_node(NULL, rsc_ids); | ||
| 1044 | if (!np) | ||
| 1045 | panic("unable to find compatible rsc node in dtb\n"); | ||
| 1046 | |||
| 1047 | sirfsoc_rsc_vbase = of_iomap(np, 0); | ||
| 1048 | if (!sirfsoc_rsc_vbase) | ||
| 1049 | panic("unable to map rsc registers\n"); | ||
| 1050 | |||
| 1051 | of_node_put(np); | ||
| 1052 | |||
| 1053 | |||
| 1054 | /* These are always available (RTC and 26MHz OSC)*/ | ||
| 1055 | clk = clk_register_fixed_rate(NULL, "rtc", NULL, | ||
| 1056 | CLK_IS_ROOT, 32768); | ||
| 1057 | BUG_ON(!clk); | ||
| 1058 | clk = clk_register_fixed_rate(NULL, "osc", NULL, | ||
| 1059 | CLK_IS_ROOT, 26000000); | ||
| 1060 | BUG_ON(!clk); | ||
| 1061 | |||
| 1062 | clk = clk_register(NULL, &clk_pll1.hw); | ||
| 1063 | BUG_ON(!clk); | ||
| 1064 | clk = clk_register(NULL, &clk_pll2.hw); | ||
| 1065 | BUG_ON(!clk); | ||
| 1066 | clk = clk_register(NULL, &clk_pll3.hw); | ||
| 1067 | BUG_ON(!clk); | ||
| 1068 | clk = clk_register(NULL, &clk_mem.hw); | ||
| 1069 | BUG_ON(!clk); | ||
| 1070 | clk = clk_register(NULL, &clk_sys.hw); | ||
| 1071 | BUG_ON(!clk); | ||
| 1072 | clk = clk_register(NULL, &clk_security.hw); | ||
| 1073 | BUG_ON(!clk); | ||
| 1074 | clk_register_clkdev(clk, NULL, "b8030000.security"); | ||
| 1075 | clk = clk_register(NULL, &clk_dsp.hw); | ||
| 1076 | BUG_ON(!clk); | ||
| 1077 | clk = clk_register(NULL, &clk_gps.hw); | ||
| 1078 | BUG_ON(!clk); | ||
| 1079 | clk_register_clkdev(clk, NULL, "a8010000.gps"); | ||
| 1080 | clk = clk_register(NULL, &clk_mf.hw); | ||
| 1081 | BUG_ON(!clk); | ||
| 1082 | clk = clk_register(NULL, &clk_io.hw); | ||
| 1083 | BUG_ON(!clk); | ||
| 1084 | clk_register_clkdev(clk, NULL, "io"); | ||
| 1085 | clk = clk_register(NULL, &clk_cpu.hw); | ||
| 1086 | BUG_ON(!clk); | ||
| 1087 | clk_register_clkdev(clk, NULL, "cpu"); | ||
| 1088 | clk = clk_register(NULL, &clk_uart0.hw); | ||
| 1089 | BUG_ON(!clk); | ||
| 1090 | clk_register_clkdev(clk, NULL, "b0050000.uart"); | ||
| 1091 | clk = clk_register(NULL, &clk_uart1.hw); | ||
| 1092 | BUG_ON(!clk); | ||
| 1093 | clk_register_clkdev(clk, NULL, "b0060000.uart"); | ||
| 1094 | clk = clk_register(NULL, &clk_uart2.hw); | ||
| 1095 | BUG_ON(!clk); | ||
| 1096 | clk_register_clkdev(clk, NULL, "b0070000.uart"); | ||
| 1097 | clk = clk_register(NULL, &clk_tsc.hw); | ||
| 1098 | BUG_ON(!clk); | ||
| 1099 | clk_register_clkdev(clk, NULL, "b0110000.tsc"); | ||
| 1100 | clk = clk_register(NULL, &clk_i2c0.hw); | ||
| 1101 | BUG_ON(!clk); | ||
| 1102 | clk_register_clkdev(clk, NULL, "b00e0000.i2c"); | ||
| 1103 | clk = clk_register(NULL, &clk_i2c1.hw); | ||
| 1104 | BUG_ON(!clk); | ||
| 1105 | clk_register_clkdev(clk, NULL, "b00f0000.i2c"); | ||
| 1106 | clk = clk_register(NULL, &clk_spi0.hw); | ||
| 1107 | BUG_ON(!clk); | ||
| 1108 | clk_register_clkdev(clk, NULL, "b00d0000.spi"); | ||
| 1109 | clk = clk_register(NULL, &clk_spi1.hw); | ||
| 1110 | BUG_ON(!clk); | ||
| 1111 | clk_register_clkdev(clk, NULL, "b0170000.spi"); | ||
| 1112 | clk = clk_register(NULL, &clk_pwmc.hw); | ||
| 1113 | BUG_ON(!clk); | ||
| 1114 | clk_register_clkdev(clk, NULL, "b0130000.pwm"); | ||
| 1115 | clk = clk_register(NULL, &clk_efuse.hw); | ||
| 1116 | BUG_ON(!clk); | ||
| 1117 | clk_register_clkdev(clk, NULL, "b0140000.efusesys"); | ||
| 1118 | clk = clk_register(NULL, &clk_pulse.hw); | ||
| 1119 | BUG_ON(!clk); | ||
| 1120 | clk_register_clkdev(clk, NULL, "b0150000.pulsec"); | ||
| 1121 | clk = clk_register(NULL, &clk_dmac0.hw); | ||
| 1122 | BUG_ON(!clk); | ||
| 1123 | clk_register_clkdev(clk, NULL, "b00b0000.dma-controller"); | ||
| 1124 | clk = clk_register(NULL, &clk_dmac1.hw); | ||
| 1125 | BUG_ON(!clk); | ||
| 1126 | clk_register_clkdev(clk, NULL, "b0160000.dma-controller"); | ||
| 1127 | clk = clk_register(NULL, &clk_nand.hw); | ||
| 1128 | BUG_ON(!clk); | ||
| 1129 | clk_register_clkdev(clk, NULL, "b0030000.nand"); | ||
| 1130 | clk = clk_register(NULL, &clk_audio.hw); | ||
| 1131 | BUG_ON(!clk); | ||
| 1132 | clk_register_clkdev(clk, NULL, "b0040000.audio"); | ||
| 1133 | clk = clk_register(NULL, &clk_usp0.hw); | ||
| 1134 | BUG_ON(!clk); | ||
| 1135 | clk_register_clkdev(clk, NULL, "b0080000.usp"); | ||
| 1136 | clk = clk_register(NULL, &clk_usp1.hw); | ||
| 1137 | BUG_ON(!clk); | ||
| 1138 | clk_register_clkdev(clk, NULL, "b0090000.usp"); | ||
| 1139 | clk = clk_register(NULL, &clk_usp2.hw); | ||
| 1140 | BUG_ON(!clk); | ||
| 1141 | clk_register_clkdev(clk, NULL, "b00a0000.usp"); | ||
| 1142 | clk = clk_register(NULL, &clk_vip.hw); | ||
| 1143 | BUG_ON(!clk); | ||
| 1144 | clk_register_clkdev(clk, NULL, "b00c0000.vip"); | ||
| 1145 | clk = clk_register(NULL, &clk_gfx.hw); | ||
| 1146 | BUG_ON(!clk); | ||
| 1147 | clk_register_clkdev(clk, NULL, "98000000.graphics"); | ||
| 1148 | clk = clk_register(NULL, &clk_mm.hw); | ||
| 1149 | BUG_ON(!clk); | ||
| 1150 | clk_register_clkdev(clk, NULL, "a0000000.multimedia"); | ||
| 1151 | clk = clk_register(NULL, &clk_lcd.hw); | ||
| 1152 | BUG_ON(!clk); | ||
| 1153 | clk_register_clkdev(clk, NULL, "90010000.display"); | ||
| 1154 | clk = clk_register(NULL, &clk_vpp.hw); | ||
| 1155 | BUG_ON(!clk); | ||
| 1156 | clk_register_clkdev(clk, NULL, "90020000.vpp"); | ||
| 1157 | clk = clk_register(NULL, &clk_mmc01.hw); | ||
| 1158 | BUG_ON(!clk); | ||
| 1159 | clk = clk_register(NULL, &clk_mmc23.hw); | ||
| 1160 | BUG_ON(!clk); | ||
| 1161 | clk = clk_register(NULL, &clk_mmc45.hw); | ||
| 1162 | BUG_ON(!clk); | ||
| 1163 | clk = clk_register(NULL, &usb_pll_clk_hw); | ||
| 1164 | BUG_ON(!clk); | ||
| 1165 | clk = clk_register(NULL, &clk_usb0.hw); | ||
| 1166 | BUG_ON(!clk); | ||
| 1167 | clk_register_clkdev(clk, NULL, "b00e0000.usb"); | ||
| 1168 | clk = clk_register(NULL, &clk_usb1.hw); | ||
| 1169 | BUG_ON(!clk); | ||
| 1170 | clk_register_clkdev(clk, NULL, "b00f0000.usb"); | ||
| 1171 | } | ||
diff --git a/drivers/clk/clk-vt8500.c b/drivers/clk/clk-vt8500.c new file mode 100644 index 000000000000..a885600f5270 --- /dev/null +++ b/drivers/clk/clk-vt8500.c | |||
| @@ -0,0 +1,510 @@ | |||
| 1 | /* | ||
| 2 | * Clock implementation for VIA/Wondermedia SoC's | ||
| 3 | * Copyright (C) 2012 Tony Prisk <linux@prisktech.co.nz> | ||
| 4 | * | ||
| 5 | * This software is licensed under the terms of the GNU General Public | ||
| 6 | * License version 2, as published by the Free Software Foundation, and | ||
| 7 | * may be copied, distributed, and modified under those terms. | ||
| 8 | * | ||
| 9 | * This program is distributed in the hope that it will be useful, | ||
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | * GNU General Public License for more details. | ||
| 13 | * | ||
| 14 | */ | ||
| 15 | |||
| 16 | #include <linux/io.h> | ||
| 17 | #include <linux/of.h> | ||
| 18 | #include <linux/slab.h> | ||
| 19 | #include <linux/bitops.h> | ||
| 20 | #include <linux/clkdev.h> | ||
| 21 | #include <linux/clk-provider.h> | ||
| 22 | |||
| 23 | /* All clocks share the same lock as none can be changed concurrently */ | ||
| 24 | static DEFINE_SPINLOCK(_lock); | ||
| 25 | |||
| 26 | struct clk_device { | ||
| 27 | struct clk_hw hw; | ||
| 28 | void __iomem *div_reg; | ||
| 29 | unsigned int div_mask; | ||
| 30 | void __iomem *en_reg; | ||
| 31 | int en_bit; | ||
| 32 | spinlock_t *lock; | ||
| 33 | }; | ||
| 34 | |||
| 35 | /* | ||
| 36 | * Add new PLL_TYPE_x definitions here as required. Use the first known model | ||
| 37 | * to support the new type as the name. | ||
| 38 | * Add case statements to vtwm_pll_recalc_rate(), vtwm_pll_round_round() and | ||
| 39 | * vtwm_pll_set_rate() to handle the new PLL_TYPE_x | ||
| 40 | */ | ||
| 41 | |||
| 42 | #define PLL_TYPE_VT8500 0 | ||
| 43 | #define PLL_TYPE_WM8650 1 | ||
| 44 | |||
| 45 | struct clk_pll { | ||
| 46 | struct clk_hw hw; | ||
| 47 | void __iomem *reg; | ||
| 48 | spinlock_t *lock; | ||
| 49 | int type; | ||
| 50 | }; | ||
| 51 | |||
| 52 | static void __iomem *pmc_base; | ||
| 53 | |||
| 54 | #define to_clk_device(_hw) container_of(_hw, struct clk_device, hw) | ||
| 55 | |||
| 56 | #define VT8500_PMC_BUSY_MASK 0x18 | ||
| 57 | |||
| 58 | static void vt8500_pmc_wait_busy(void) | ||
| 59 | { | ||
| 60 | while (readl(pmc_base) & VT8500_PMC_BUSY_MASK) | ||
| 61 | cpu_relax(); | ||
| 62 | } | ||
| 63 | |||
| 64 | static int vt8500_dclk_enable(struct clk_hw *hw) | ||
| 65 | { | ||
| 66 | struct clk_device *cdev = to_clk_device(hw); | ||
| 67 | u32 en_val; | ||
| 68 | unsigned long flags = 0; | ||
| 69 | |||
| 70 | spin_lock_irqsave(cdev->lock, flags); | ||
| 71 | |||
| 72 | en_val = readl(cdev->en_reg); | ||
| 73 | en_val |= BIT(cdev->en_bit); | ||
| 74 | writel(en_val, cdev->en_reg); | ||
| 75 | |||
| 76 | spin_unlock_irqrestore(cdev->lock, flags); | ||
| 77 | return 0; | ||
| 78 | } | ||
| 79 | |||
| 80 | static void vt8500_dclk_disable(struct clk_hw *hw) | ||
| 81 | { | ||
| 82 | struct clk_device *cdev = to_clk_device(hw); | ||
| 83 | u32 en_val; | ||
| 84 | unsigned long flags = 0; | ||
| 85 | |||
| 86 | spin_lock_irqsave(cdev->lock, flags); | ||
| 87 | |||
| 88 | en_val = readl(cdev->en_reg); | ||
| 89 | en_val &= ~BIT(cdev->en_bit); | ||
| 90 | writel(en_val, cdev->en_reg); | ||
| 91 | |||
| 92 | spin_unlock_irqrestore(cdev->lock, flags); | ||
| 93 | } | ||
| 94 | |||
| 95 | static int vt8500_dclk_is_enabled(struct clk_hw *hw) | ||
| 96 | { | ||
| 97 | struct clk_device *cdev = to_clk_device(hw); | ||
| 98 | u32 en_val = (readl(cdev->en_reg) & BIT(cdev->en_bit)); | ||
| 99 | |||
| 100 | return en_val ? 1 : 0; | ||
| 101 | } | ||
| 102 | |||
| 103 | static unsigned long vt8500_dclk_recalc_rate(struct clk_hw *hw, | ||
| 104 | unsigned long parent_rate) | ||
| 105 | { | ||
| 106 | struct clk_device *cdev = to_clk_device(hw); | ||
| 107 | u32 div = readl(cdev->div_reg) & cdev->div_mask; | ||
| 108 | |||
| 109 | /* Special case for SDMMC devices */ | ||
| 110 | if ((cdev->div_mask == 0x3F) && (div & BIT(5))) | ||
| 111 | div = 64 * (div & 0x1f); | ||
| 112 | |||
| 113 | /* div == 0 is actually the highest divisor */ | ||
| 114 | if (div == 0) | ||
| 115 | div = (cdev->div_mask + 1); | ||
| 116 | |||
| 117 | return parent_rate / div; | ||
| 118 | } | ||
| 119 | |||
| 120 | static long vt8500_dclk_round_rate(struct clk_hw *hw, unsigned long rate, | ||
| 121 | unsigned long *prate) | ||
| 122 | { | ||
| 123 | u32 divisor = *prate / rate; | ||
| 124 | |||
| 125 | return *prate / divisor; | ||
| 126 | } | ||
| 127 | |||
| 128 | static int vt8500_dclk_set_rate(struct clk_hw *hw, unsigned long rate, | ||
| 129 | unsigned long parent_rate) | ||
| 130 | { | ||
| 131 | struct clk_device *cdev = to_clk_device(hw); | ||
| 132 | u32 divisor = parent_rate / rate; | ||
| 133 | unsigned long flags = 0; | ||
| 134 | |||
| 135 | if (divisor == cdev->div_mask + 1) | ||
| 136 | divisor = 0; | ||
| 137 | |||
| 138 | if (divisor > cdev->div_mask) { | ||
| 139 | pr_err("%s: invalid divisor for clock\n", __func__); | ||
| 140 | return -EINVAL; | ||
| 141 | } | ||
| 142 | |||
| 143 | spin_lock_irqsave(cdev->lock, flags); | ||
| 144 | |||
| 145 | vt8500_pmc_wait_busy(); | ||
| 146 | writel(divisor, cdev->div_reg); | ||
| 147 | vt8500_pmc_wait_busy(); | ||
| 148 | |||
| 149 | spin_lock_irqsave(cdev->lock, flags); | ||
| 150 | |||
| 151 | return 0; | ||
| 152 | } | ||
| 153 | |||
| 154 | |||
| 155 | static const struct clk_ops vt8500_gated_clk_ops = { | ||
| 156 | .enable = vt8500_dclk_enable, | ||
| 157 | .disable = vt8500_dclk_disable, | ||
| 158 | .is_enabled = vt8500_dclk_is_enabled, | ||
| 159 | }; | ||
| 160 | |||
| 161 | static const struct clk_ops vt8500_divisor_clk_ops = { | ||
| 162 | .round_rate = vt8500_dclk_round_rate, | ||
| 163 | .set_rate = vt8500_dclk_set_rate, | ||
| 164 | .recalc_rate = vt8500_dclk_recalc_rate, | ||
| 165 | }; | ||
| 166 | |||
| 167 | static const struct clk_ops vt8500_gated_divisor_clk_ops = { | ||
| 168 | .enable = vt8500_dclk_enable, | ||
| 169 | .disable = vt8500_dclk_disable, | ||
| 170 | .is_enabled = vt8500_dclk_is_enabled, | ||
| 171 | .round_rate = vt8500_dclk_round_rate, | ||
| 172 | .set_rate = vt8500_dclk_set_rate, | ||
| 173 | .recalc_rate = vt8500_dclk_recalc_rate, | ||
| 174 | }; | ||
| 175 | |||
| 176 | #define CLK_INIT_GATED BIT(0) | ||
| 177 | #define CLK_INIT_DIVISOR BIT(1) | ||
| 178 | #define CLK_INIT_GATED_DIVISOR (CLK_INIT_DIVISOR | CLK_INIT_GATED) | ||
| 179 | |||
| 180 | static __init void vtwm_device_clk_init(struct device_node *node) | ||
| 181 | { | ||
| 182 | u32 en_reg, div_reg; | ||
| 183 | struct clk *clk; | ||
| 184 | struct clk_device *dev_clk; | ||
| 185 | const char *clk_name = node->name; | ||
| 186 | const char *parent_name; | ||
| 187 | struct clk_init_data init; | ||
| 188 | int rc; | ||
| 189 | int clk_init_flags = 0; | ||
| 190 | |||
| 191 | dev_clk = kzalloc(sizeof(*dev_clk), GFP_KERNEL); | ||
| 192 | if (WARN_ON(!dev_clk)) | ||
| 193 | return; | ||
| 194 | |||
| 195 | dev_clk->lock = &_lock; | ||
| 196 | |||
| 197 | rc = of_property_read_u32(node, "enable-reg", &en_reg); | ||
| 198 | if (!rc) { | ||
| 199 | dev_clk->en_reg = pmc_base + en_reg; | ||
| 200 | rc = of_property_read_u32(node, "enable-bit", &dev_clk->en_bit); | ||
| 201 | if (rc) { | ||
| 202 | pr_err("%s: enable-bit property required for gated clock\n", | ||
| 203 | __func__); | ||
| 204 | return; | ||
| 205 | } | ||
| 206 | clk_init_flags |= CLK_INIT_GATED; | ||
| 207 | } | ||
| 208 | |||
| 209 | rc = of_property_read_u32(node, "divisor-reg", &div_reg); | ||
| 210 | if (!rc) { | ||
| 211 | dev_clk->div_reg = pmc_base + div_reg; | ||
| 212 | /* | ||
| 213 | * use 0x1f as the default mask since it covers | ||
| 214 | * almost all the clocks and reduces dts properties | ||
| 215 | */ | ||
| 216 | dev_clk->div_mask = 0x1f; | ||
| 217 | |||
| 218 | of_property_read_u32(node, "divisor-mask", &dev_clk->div_mask); | ||
| 219 | clk_init_flags |= CLK_INIT_DIVISOR; | ||
| 220 | } | ||
| 221 | |||
| 222 | of_property_read_string(node, "clock-output-names", &clk_name); | ||
| 223 | |||
| 224 | switch (clk_init_flags) { | ||
| 225 | case CLK_INIT_GATED: | ||
| 226 | init.ops = &vt8500_gated_clk_ops; | ||
| 227 | break; | ||
| 228 | case CLK_INIT_DIVISOR: | ||
| 229 | init.ops = &vt8500_divisor_clk_ops; | ||
| 230 | break; | ||
| 231 | case CLK_INIT_GATED_DIVISOR: | ||
| 232 | init.ops = &vt8500_gated_divisor_clk_ops; | ||
| 233 | break; | ||
| 234 | default: | ||
| 235 | pr_err("%s: Invalid clock description in device tree\n", | ||
| 236 | __func__); | ||
| 237 | kfree(dev_clk); | ||
| 238 | return; | ||
| 239 | } | ||
| 240 | |||
| 241 | init.name = clk_name; | ||
| 242 | init.flags = 0; | ||
| 243 | parent_name = of_clk_get_parent_name(node, 0); | ||
| 244 | init.parent_names = &parent_name; | ||
| 245 | init.num_parents = 1; | ||
| 246 | |||
| 247 | dev_clk->hw.init = &init; | ||
| 248 | |||
| 249 | clk = clk_register(NULL, &dev_clk->hw); | ||
| 250 | if (WARN_ON(IS_ERR(clk))) { | ||
| 251 | kfree(dev_clk); | ||
| 252 | return; | ||
| 253 | } | ||
| 254 | rc = of_clk_add_provider(node, of_clk_src_simple_get, clk); | ||
| 255 | clk_register_clkdev(clk, clk_name, NULL); | ||
| 256 | } | ||
| 257 | |||
| 258 | |||
| 259 | /* PLL clock related functions */ | ||
| 260 | |||
| 261 | #define to_clk_pll(_hw) container_of(_hw, struct clk_pll, hw) | ||
| 262 | |||
| 263 | /* Helper macros for PLL_VT8500 */ | ||
| 264 | #define VT8500_PLL_MUL(x) ((x & 0x1F) << 1) | ||
| 265 | #define VT8500_PLL_DIV(x) ((x & 0x100) ? 1 : 2) | ||
| 266 | |||
| 267 | #define VT8500_BITS_TO_FREQ(r, m, d) \ | ||
| 268 | ((r / d) * m) | ||
| 269 | |||
| 270 | #define VT8500_BITS_TO_VAL(m, d) \ | ||
| 271 | ((d == 2 ? 0 : 0x100) | ((m >> 1) & 0x1F)) | ||
| 272 | |||
| 273 | /* Helper macros for PLL_WM8650 */ | ||
| 274 | #define WM8650_PLL_MUL(x) (x & 0x3FF) | ||
| 275 | #define WM8650_PLL_DIV(x) (((x >> 10) & 7) * (1 << ((x >> 13) & 3))) | ||
| 276 | |||
| 277 | #define WM8650_BITS_TO_FREQ(r, m, d1, d2) \ | ||
| 278 | (r * m / (d1 * (1 << d2))) | ||
| 279 | |||
| 280 | #define WM8650_BITS_TO_VAL(m, d1, d2) \ | ||
| 281 | ((d2 << 13) | (d1 << 10) | (m & 0x3FF)) | ||
| 282 | |||
| 283 | |||
| 284 | static void vt8500_find_pll_bits(unsigned long rate, unsigned long parent_rate, | ||
| 285 | u32 *multiplier, u32 *prediv) | ||
| 286 | { | ||
| 287 | unsigned long tclk; | ||
| 288 | |||
| 289 | /* sanity check */ | ||
| 290 | if ((rate < parent_rate * 4) || (rate > parent_rate * 62)) { | ||
| 291 | pr_err("%s: requested rate out of range\n", __func__); | ||
| 292 | *multiplier = 0; | ||
| 293 | *prediv = 1; | ||
| 294 | return; | ||
| 295 | } | ||
| 296 | if (rate <= parent_rate * 31) | ||
| 297 | /* use the prediv to double the resolution */ | ||
| 298 | *prediv = 2; | ||
| 299 | else | ||
| 300 | *prediv = 1; | ||
| 301 | |||
| 302 | *multiplier = rate / (parent_rate / *prediv); | ||
| 303 | tclk = (parent_rate / *prediv) * *multiplier; | ||
| 304 | |||
| 305 | if (tclk != rate) | ||
| 306 | pr_warn("%s: requested rate %lu, found rate %lu\n", __func__, | ||
| 307 | rate, tclk); | ||
| 308 | } | ||
| 309 | |||
| 310 | static void wm8650_find_pll_bits(unsigned long rate, unsigned long parent_rate, | ||
| 311 | u32 *multiplier, u32 *divisor1, u32 *divisor2) | ||
| 312 | { | ||
| 313 | u32 mul, div1, div2; | ||
| 314 | u32 best_mul, best_div1, best_div2; | ||
| 315 | unsigned long tclk, rate_err, best_err; | ||
| 316 | |||
| 317 | best_err = (unsigned long)-1; | ||
| 318 | |||
| 319 | /* Find the closest match (lower or equal to requested) */ | ||
| 320 | for (div1 = 5; div1 >= 3; div1--) | ||
| 321 | for (div2 = 3; div2 >= 0; div2--) | ||
| 322 | for (mul = 3; mul <= 1023; mul++) { | ||
| 323 | tclk = parent_rate * mul / (div1 * (1 << div2)); | ||
| 324 | if (tclk > rate) | ||
| 325 | continue; | ||
| 326 | /* error will always be +ve */ | ||
| 327 | rate_err = rate - tclk; | ||
| 328 | if (rate_err == 0) { | ||
| 329 | *multiplier = mul; | ||
| 330 | *divisor1 = div1; | ||
| 331 | *divisor2 = div2; | ||
| 332 | return; | ||
| 333 | } | ||
| 334 | |||
| 335 | if (rate_err < best_err) { | ||
| 336 | best_err = rate_err; | ||
| 337 | best_mul = mul; | ||
| 338 | best_div1 = div1; | ||
| 339 | best_div2 = div2; | ||
| 340 | } | ||
| 341 | } | ||
| 342 | |||
| 343 | /* if we got here, it wasn't an exact match */ | ||
| 344 | pr_warn("%s: requested rate %lu, found rate %lu\n", __func__, rate, | ||
| 345 | rate - best_err); | ||
| 346 | *multiplier = mul; | ||
| 347 | *divisor1 = div1; | ||
| 348 | *divisor2 = div2; | ||
| 349 | } | ||
| 350 | |||
| 351 | static int vtwm_pll_set_rate(struct clk_hw *hw, unsigned long rate, | ||
| 352 | unsigned long parent_rate) | ||
| 353 | { | ||
| 354 | struct clk_pll *pll = to_clk_pll(hw); | ||
| 355 | u32 mul, div1, div2; | ||
| 356 | u32 pll_val; | ||
| 357 | unsigned long flags = 0; | ||
| 358 | |||
| 359 | /* sanity check */ | ||
| 360 | |||
| 361 | switch (pll->type) { | ||
| 362 | case PLL_TYPE_VT8500: | ||
| 363 | vt8500_find_pll_bits(rate, parent_rate, &mul, &div1); | ||
| 364 | pll_val = VT8500_BITS_TO_VAL(mul, div1); | ||
| 365 | break; | ||
| 366 | case PLL_TYPE_WM8650: | ||
| 367 | wm8650_find_pll_bits(rate, parent_rate, &mul, &div1, &div2); | ||
| 368 | pll_val = WM8650_BITS_TO_VAL(mul, div1, div2); | ||
| 369 | break; | ||
| 370 | default: | ||
| 371 | pr_err("%s: invalid pll type\n", __func__); | ||
| 372 | return 0; | ||
| 373 | } | ||
| 374 | |||
| 375 | spin_lock_irqsave(pll->lock, flags); | ||
| 376 | |||
| 377 | vt8500_pmc_wait_busy(); | ||
| 378 | writel(pll_val, pll->reg); | ||
| 379 | vt8500_pmc_wait_busy(); | ||
| 380 | |||
| 381 | spin_unlock_irqrestore(pll->lock, flags); | ||
| 382 | |||
| 383 | return 0; | ||
| 384 | } | ||
| 385 | |||
| 386 | static long vtwm_pll_round_rate(struct clk_hw *hw, unsigned long rate, | ||
| 387 | unsigned long *prate) | ||
| 388 | { | ||
| 389 | struct clk_pll *pll = to_clk_pll(hw); | ||
| 390 | u32 mul, div1, div2; | ||
| 391 | long round_rate; | ||
| 392 | |||
| 393 | switch (pll->type) { | ||
| 394 | case PLL_TYPE_VT8500: | ||
| 395 | vt8500_find_pll_bits(rate, *prate, &mul, &div1); | ||
| 396 | round_rate = VT8500_BITS_TO_FREQ(*prate, mul, div1); | ||
| 397 | break; | ||
| 398 | case PLL_TYPE_WM8650: | ||
| 399 | wm8650_find_pll_bits(rate, *prate, &mul, &div1, &div2); | ||
| 400 | round_rate = WM8650_BITS_TO_FREQ(*prate, mul, div1, div2); | ||
| 401 | break; | ||
| 402 | default: | ||
| 403 | round_rate = 0; | ||
| 404 | } | ||
| 405 | |||
| 406 | return round_rate; | ||
| 407 | } | ||
| 408 | |||
| 409 | static unsigned long vtwm_pll_recalc_rate(struct clk_hw *hw, | ||
| 410 | unsigned long parent_rate) | ||
| 411 | { | ||
| 412 | struct clk_pll *pll = to_clk_pll(hw); | ||
| 413 | u32 pll_val = readl(pll->reg); | ||
| 414 | unsigned long pll_freq; | ||
| 415 | |||
| 416 | switch (pll->type) { | ||
| 417 | case PLL_TYPE_VT8500: | ||
| 418 | pll_freq = parent_rate * VT8500_PLL_MUL(pll_val); | ||
| 419 | pll_freq /= VT8500_PLL_DIV(pll_val); | ||
| 420 | break; | ||
| 421 | case PLL_TYPE_WM8650: | ||
| 422 | pll_freq = parent_rate * WM8650_PLL_MUL(pll_val); | ||
| 423 | pll_freq /= WM8650_PLL_DIV(pll_val); | ||
| 424 | break; | ||
| 425 | default: | ||
| 426 | pll_freq = 0; | ||
| 427 | } | ||
| 428 | |||
| 429 | return pll_freq; | ||
| 430 | } | ||
| 431 | |||
| 432 | const struct clk_ops vtwm_pll_ops = { | ||
| 433 | .round_rate = vtwm_pll_round_rate, | ||
| 434 | .set_rate = vtwm_pll_set_rate, | ||
| 435 | .recalc_rate = vtwm_pll_recalc_rate, | ||
| 436 | }; | ||
| 437 | |||
| 438 | static __init void vtwm_pll_clk_init(struct device_node *node, int pll_type) | ||
| 439 | { | ||
| 440 | u32 reg; | ||
| 441 | struct clk *clk; | ||
| 442 | struct clk_pll *pll_clk; | ||
| 443 | const char *clk_name = node->name; | ||
| 444 | const char *parent_name; | ||
| 445 | struct clk_init_data init; | ||
| 446 | int rc; | ||
| 447 | |||
| 448 | rc = of_property_read_u32(node, "reg", ®); | ||
| 449 | if (WARN_ON(rc)) | ||
| 450 | return; | ||
| 451 | |||
| 452 | pll_clk = kzalloc(sizeof(*pll_clk), GFP_KERNEL); | ||
| 453 | if (WARN_ON(!pll_clk)) | ||
| 454 | return; | ||
| 455 | |||
| 456 | pll_clk->reg = pmc_base + reg; | ||
| 457 | pll_clk->lock = &_lock; | ||
| 458 | pll_clk->type = pll_type; | ||
| 459 | |||
| 460 | of_property_read_string(node, "clock-output-names", &clk_name); | ||
| 461 | |||
| 462 | init.name = clk_name; | ||
| 463 | init.ops = &vtwm_pll_ops; | ||
| 464 | init.flags = 0; | ||
| 465 | parent_name = of_clk_get_parent_name(node, 0); | ||
| 466 | init.parent_names = &parent_name; | ||
| 467 | init.num_parents = 1; | ||
| 468 | |||
| 469 | pll_clk->hw.init = &init; | ||
| 470 | |||
| 471 | clk = clk_register(NULL, &pll_clk->hw); | ||
| 472 | if (WARN_ON(IS_ERR(clk))) { | ||
| 473 | kfree(pll_clk); | ||
| 474 | return; | ||
| 475 | } | ||
| 476 | rc = of_clk_add_provider(node, of_clk_src_simple_get, clk); | ||
| 477 | clk_register_clkdev(clk, clk_name, NULL); | ||
| 478 | } | ||
| 479 | |||
| 480 | |||
| 481 | /* Wrappers for initialization functions */ | ||
| 482 | |||
| 483 | static void __init vt8500_pll_init(struct device_node *node) | ||
| 484 | { | ||
| 485 | vtwm_pll_clk_init(node, PLL_TYPE_VT8500); | ||
| 486 | } | ||
| 487 | |||
| 488 | static void __init wm8650_pll_init(struct device_node *node) | ||
| 489 | { | ||
| 490 | vtwm_pll_clk_init(node, PLL_TYPE_WM8650); | ||
| 491 | } | ||
| 492 | |||
| 493 | static const __initconst struct of_device_id clk_match[] = { | ||
| 494 | { .compatible = "fixed-clock", .data = of_fixed_clk_setup, }, | ||
| 495 | { .compatible = "via,vt8500-pll-clock", .data = vt8500_pll_init, }, | ||
| 496 | { .compatible = "wm,wm8650-pll-clock", .data = wm8650_pll_init, }, | ||
| 497 | { .compatible = "via,vt8500-device-clock", | ||
| 498 | .data = vtwm_device_clk_init, }, | ||
| 499 | { /* sentinel */ } | ||
| 500 | }; | ||
| 501 | |||
| 502 | void __init vtwm_clk_init(void __iomem *base) | ||
| 503 | { | ||
| 504 | if (!base) | ||
| 505 | return; | ||
| 506 | |||
| 507 | pmc_base = base; | ||
| 508 | |||
| 509 | of_clk_init(clk_match); | ||
| 510 | } | ||
diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c index efdfd009c270..56e4495ebeb1 100644 --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c | |||
| @@ -558,25 +558,6 @@ int clk_enable(struct clk *clk) | |||
| 558 | EXPORT_SYMBOL_GPL(clk_enable); | 558 | EXPORT_SYMBOL_GPL(clk_enable); |
| 559 | 559 | ||
| 560 | /** | 560 | /** |
| 561 | * clk_get_rate - return the rate of clk | ||
| 562 | * @clk: the clk whose rate is being returned | ||
| 563 | * | ||
| 564 | * Simply returns the cached rate of the clk. Does not query the hardware. If | ||
| 565 | * clk is NULL then returns 0. | ||
| 566 | */ | ||
| 567 | unsigned long clk_get_rate(struct clk *clk) | ||
| 568 | { | ||
| 569 | unsigned long rate; | ||
| 570 | |||
| 571 | mutex_lock(&prepare_lock); | ||
| 572 | rate = __clk_get_rate(clk); | ||
| 573 | mutex_unlock(&prepare_lock); | ||
| 574 | |||
| 575 | return rate; | ||
| 576 | } | ||
| 577 | EXPORT_SYMBOL_GPL(clk_get_rate); | ||
| 578 | |||
| 579 | /** | ||
| 580 | * __clk_round_rate - round the given rate for a clk | 561 | * __clk_round_rate - round the given rate for a clk |
| 581 | * @clk: round the rate of this clock | 562 | * @clk: round the rate of this clock |
| 582 | * | 563 | * |
| @@ -702,6 +683,30 @@ static void __clk_recalc_rates(struct clk *clk, unsigned long msg) | |||
| 702 | } | 683 | } |
| 703 | 684 | ||
| 704 | /** | 685 | /** |
| 686 | * clk_get_rate - return the rate of clk | ||
| 687 | * @clk: the clk whose rate is being returned | ||
| 688 | * | ||
| 689 | * Simply returns the cached rate of the clk, unless CLK_GET_RATE_NOCACHE flag | ||
| 690 | * is set, which means a recalc_rate will be issued. | ||
| 691 | * If clk is NULL then returns 0. | ||
| 692 | */ | ||
| 693 | unsigned long clk_get_rate(struct clk *clk) | ||
| 694 | { | ||
| 695 | unsigned long rate; | ||
| 696 | |||
| 697 | mutex_lock(&prepare_lock); | ||
| 698 | |||
| 699 | if (clk && (clk->flags & CLK_GET_RATE_NOCACHE)) | ||
| 700 | __clk_recalc_rates(clk, 0); | ||
| 701 | |||
| 702 | rate = __clk_get_rate(clk); | ||
| 703 | mutex_unlock(&prepare_lock); | ||
| 704 | |||
| 705 | return rate; | ||
| 706 | } | ||
| 707 | EXPORT_SYMBOL_GPL(clk_get_rate); | ||
| 708 | |||
| 709 | /** | ||
| 705 | * __clk_speculate_rates | 710 | * __clk_speculate_rates |
| 706 | * @clk: first clk in the subtree | 711 | * @clk: first clk in the subtree |
| 707 | * @parent_rate: the "future" rate of clk's parent | 712 | * @parent_rate: the "future" rate of clk's parent |
| @@ -1582,6 +1587,20 @@ struct clk *of_clk_src_simple_get(struct of_phandle_args *clkspec, | |||
| 1582 | } | 1587 | } |
| 1583 | EXPORT_SYMBOL_GPL(of_clk_src_simple_get); | 1588 | EXPORT_SYMBOL_GPL(of_clk_src_simple_get); |
| 1584 | 1589 | ||
| 1590 | struct clk *of_clk_src_onecell_get(struct of_phandle_args *clkspec, void *data) | ||
| 1591 | { | ||
| 1592 | struct clk_onecell_data *clk_data = data; | ||
| 1593 | unsigned int idx = clkspec->args[0]; | ||
| 1594 | |||
| 1595 | if (idx >= clk_data->clk_num) { | ||
| 1596 | pr_err("%s: invalid clock index %d\n", __func__, idx); | ||
| 1597 | return ERR_PTR(-EINVAL); | ||
| 1598 | } | ||
| 1599 | |||
| 1600 | return clk_data->clks[idx]; | ||
| 1601 | } | ||
| 1602 | EXPORT_SYMBOL_GPL(of_clk_src_onecell_get); | ||
| 1603 | |||
| 1585 | /** | 1604 | /** |
| 1586 | * of_clk_add_provider() - Register a clock provider for a node | 1605 | * of_clk_add_provider() - Register a clock provider for a node |
| 1587 | * @np: Device node pointer associated with clock provider | 1606 | * @np: Device node pointer associated with clock provider |
diff --git a/drivers/clk/mmp/Makefile b/drivers/clk/mmp/Makefile new file mode 100644 index 000000000000..392d78044ce3 --- /dev/null +++ b/drivers/clk/mmp/Makefile | |||
| @@ -0,0 +1,9 @@ | |||
| 1 | # | ||
| 2 | # Makefile for mmp specific clk | ||
| 3 | # | ||
| 4 | |||
| 5 | obj-y += clk-apbc.o clk-apmu.o clk-frac.o | ||
| 6 | |||
| 7 | obj-$(CONFIG_CPU_PXA168) += clk-pxa168.o | ||
| 8 | obj-$(CONFIG_CPU_PXA910) += clk-pxa910.o | ||
| 9 | obj-$(CONFIG_CPU_MMP2) += clk-mmp2.o | ||
diff --git a/drivers/clk/mmp/clk-apbc.c b/drivers/clk/mmp/clk-apbc.c new file mode 100644 index 000000000000..d14120eaa71f --- /dev/null +++ b/drivers/clk/mmp/clk-apbc.c | |||
| @@ -0,0 +1,152 @@ | |||
| 1 | /* | ||
| 2 | * mmp APB clock operation source file | ||
| 3 | * | ||
| 4 | * Copyright (C) 2012 Marvell | ||
| 5 | * Chao Xie <xiechao.mail@gmail.com> | ||
| 6 | * | ||
| 7 | * This file is licensed under the terms of the GNU General Public | ||
| 8 | * License version 2. This program is licensed "as is" without any | ||
| 9 | * warranty of any kind, whether express or implied. | ||
| 10 | */ | ||
| 11 | |||
| 12 | #include <linux/kernel.h> | ||
| 13 | #include <linux/clk.h> | ||
| 14 | #include <linux/io.h> | ||
| 15 | #include <linux/err.h> | ||
| 16 | #include <linux/delay.h> | ||
| 17 | #include <linux/slab.h> | ||
| 18 | |||
| 19 | #include "clk.h" | ||
| 20 | |||
| 21 | /* Common APB clock register bit definitions */ | ||
| 22 | #define APBC_APBCLK (1 << 0) /* APB Bus Clock Enable */ | ||
| 23 | #define APBC_FNCLK (1 << 1) /* Functional Clock Enable */ | ||
| 24 | #define APBC_RST (1 << 2) /* Reset Generation */ | ||
| 25 | #define APBC_POWER (1 << 7) /* Reset Generation */ | ||
| 26 | |||
| 27 | #define to_clk_apbc(hw) container_of(hw, struct clk_apbc, hw) | ||
| 28 | struct clk_apbc { | ||
| 29 | struct clk_hw hw; | ||
| 30 | void __iomem *base; | ||
| 31 | unsigned int delay; | ||
| 32 | unsigned int flags; | ||
| 33 | spinlock_t *lock; | ||
| 34 | }; | ||
| 35 | |||
| 36 | static int clk_apbc_prepare(struct clk_hw *hw) | ||
| 37 | { | ||
| 38 | struct clk_apbc *apbc = to_clk_apbc(hw); | ||
| 39 | unsigned int data; | ||
| 40 | unsigned long flags = 0; | ||
| 41 | |||
| 42 | /* | ||
| 43 | * It may share same register as MUX clock, | ||
| 44 | * and it will impact FNCLK enable. Spinlock is needed | ||
| 45 | */ | ||
| 46 | if (apbc->lock) | ||
| 47 | spin_lock_irqsave(apbc->lock, flags); | ||
| 48 | |||
| 49 | data = readl_relaxed(apbc->base); | ||
| 50 | if (apbc->flags & APBC_POWER_CTRL) | ||
| 51 | data |= APBC_POWER; | ||
| 52 | data |= APBC_FNCLK; | ||
| 53 | writel_relaxed(data, apbc->base); | ||
| 54 | |||
| 55 | if (apbc->lock) | ||
| 56 | spin_unlock_irqrestore(apbc->lock, flags); | ||
| 57 | |||
| 58 | udelay(apbc->delay); | ||
| 59 | |||
| 60 | if (apbc->lock) | ||
| 61 | spin_lock_irqsave(apbc->lock, flags); | ||
| 62 | |||
| 63 | data = readl_relaxed(apbc->base); | ||
| 64 | data |= APBC_APBCLK; | ||
| 65 | writel_relaxed(data, apbc->base); | ||
| 66 | |||
| 67 | if (apbc->lock) | ||
| 68 | spin_unlock_irqrestore(apbc->lock, flags); | ||
| 69 | |||
| 70 | udelay(apbc->delay); | ||
| 71 | |||
| 72 | if (!(apbc->flags & APBC_NO_BUS_CTRL)) { | ||
| 73 | if (apbc->lock) | ||
| 74 | spin_lock_irqsave(apbc->lock, flags); | ||
| 75 | |||
| 76 | data = readl_relaxed(apbc->base); | ||
| 77 | data &= ~APBC_RST; | ||
| 78 | writel_relaxed(data, apbc->base); | ||
| 79 | |||
| 80 | if (apbc->lock) | ||
| 81 | spin_unlock_irqrestore(apbc->lock, flags); | ||
| 82 | } | ||
| 83 | |||
| 84 | return 0; | ||
| 85 | } | ||
| 86 | |||
| 87 | static void clk_apbc_unprepare(struct clk_hw *hw) | ||
| 88 | { | ||
| 89 | struct clk_apbc *apbc = to_clk_apbc(hw); | ||
| 90 | unsigned long data; | ||
| 91 | unsigned long flags = 0; | ||
| 92 | |||
| 93 | if (apbc->lock) | ||
| 94 | spin_lock_irqsave(apbc->lock, flags); | ||
| 95 | |||
| 96 | data = readl_relaxed(apbc->base); | ||
| 97 | if (apbc->flags & APBC_POWER_CTRL) | ||
| 98 | data &= ~APBC_POWER; | ||
| 99 | data &= ~APBC_FNCLK; | ||
| 100 | writel_relaxed(data, apbc->base); | ||
| 101 | |||
| 102 | if (apbc->lock) | ||
| 103 | spin_unlock_irqrestore(apbc->lock, flags); | ||
| 104 | |||
| 105 | udelay(10); | ||
| 106 | |||
| 107 | if (apbc->lock) | ||
| 108 | spin_lock_irqsave(apbc->lock, flags); | ||
| 109 | |||
| 110 | data = readl_relaxed(apbc->base); | ||
| 111 | data &= ~APBC_APBCLK; | ||
| 112 | writel_relaxed(data, apbc->base); | ||
| 113 | |||
| 114 | if (apbc->lock) | ||
| 115 | spin_unlock_irqrestore(apbc->lock, flags); | ||
| 116 | } | ||
| 117 | |||
| 118 | struct clk_ops clk_apbc_ops = { | ||
| 119 | .prepare = clk_apbc_prepare, | ||
| 120 | .unprepare = clk_apbc_unprepare, | ||
| 121 | }; | ||
| 122 | |||
| 123 | struct clk *mmp_clk_register_apbc(const char *name, const char *parent_name, | ||
| 124 | void __iomem *base, unsigned int delay, | ||
| 125 | unsigned int apbc_flags, spinlock_t *lock) | ||
| 126 | { | ||
| 127 | struct clk_apbc *apbc; | ||
| 128 | struct clk *clk; | ||
| 129 | struct clk_init_data init; | ||
| 130 | |||
| 131 | apbc = kzalloc(sizeof(*apbc), GFP_KERNEL); | ||
| 132 | if (!apbc) | ||
| 133 | return NULL; | ||
| 134 | |||
| 135 | init.name = name; | ||
| 136 | init.ops = &clk_apbc_ops; | ||
| 137 | init.flags = CLK_SET_RATE_PARENT; | ||
| 138 | init.parent_names = (parent_name ? &parent_name : NULL); | ||
| 139 | init.num_parents = (parent_name ? 1 : 0); | ||
| 140 | |||
| 141 | apbc->base = base; | ||
| 142 | apbc->delay = delay; | ||
| 143 | apbc->flags = apbc_flags; | ||
| 144 | apbc->lock = lock; | ||
| 145 | apbc->hw.init = &init; | ||
| 146 | |||
| 147 | clk = clk_register(NULL, &apbc->hw); | ||
| 148 | if (IS_ERR(clk)) | ||
| 149 | kfree(apbc); | ||
| 150 | |||
| 151 | return clk; | ||
| 152 | } | ||
diff --git a/drivers/clk/mmp/clk-apmu.c b/drivers/clk/mmp/clk-apmu.c new file mode 100644 index 000000000000..abe182b2377f --- /dev/null +++ b/drivers/clk/mmp/clk-apmu.c | |||
| @@ -0,0 +1,97 @@ | |||
| 1 | /* | ||
| 2 | * mmp AXI peripharal clock operation source file | ||
| 3 | * | ||
| 4 | * Copyright (C) 2012 Marvell | ||
| 5 | * Chao Xie <xiechao.mail@gmail.com> | ||
| 6 | * | ||
| 7 | * This file is licensed under the terms of the GNU General Public | ||
| 8 | * License version 2. This program is licensed "as is" without any | ||
| 9 | * warranty of any kind, whether express or implied. | ||
| 10 | */ | ||
| 11 | |||
| 12 | #include <linux/kernel.h> | ||
| 13 | #include <linux/clk.h> | ||
| 14 | #include <linux/io.h> | ||
| 15 | #include <linux/err.h> | ||
| 16 | #include <linux/delay.h> | ||
| 17 | #include <linux/slab.h> | ||
| 18 | |||
| 19 | #include "clk.h" | ||
| 20 | |||
| 21 | #define to_clk_apmu(clk) (container_of(clk, struct clk_apmu, clk)) | ||
| 22 | struct clk_apmu { | ||
| 23 | struct clk_hw hw; | ||
| 24 | void __iomem *base; | ||
| 25 | u32 rst_mask; | ||
| 26 | u32 enable_mask; | ||
| 27 | spinlock_t *lock; | ||
| 28 | }; | ||
| 29 | |||
| 30 | static int clk_apmu_enable(struct clk_hw *hw) | ||
| 31 | { | ||
| 32 | struct clk_apmu *apmu = to_clk_apmu(hw); | ||
| 33 | unsigned long data; | ||
| 34 | unsigned long flags = 0; | ||
| 35 | |||
| 36 | if (apmu->lock) | ||
| 37 | spin_lock_irqsave(apmu->lock, flags); | ||
| 38 | |||
| 39 | data = readl_relaxed(apmu->base) | apmu->enable_mask; | ||
| 40 | writel_relaxed(data, apmu->base); | ||
| 41 | |||
| 42 | if (apmu->lock) | ||
| 43 | spin_unlock_irqrestore(apmu->lock, flags); | ||
| 44 | |||
| 45 | return 0; | ||
| 46 | } | ||
| 47 | |||
| 48 | static void clk_apmu_disable(struct clk_hw *hw) | ||
| 49 | { | ||
| 50 | struct clk_apmu *apmu = to_clk_apmu(hw); | ||
| 51 | unsigned long data; | ||
| 52 | unsigned long flags = 0; | ||
| 53 | |||
| 54 | if (apmu->lock) | ||
| 55 | spin_lock_irqsave(apmu->lock, flags); | ||
| 56 | |||
| 57 | data = readl_relaxed(apmu->base) & ~apmu->enable_mask; | ||
| 58 | writel_relaxed(data, apmu->base); | ||
| 59 | |||
| 60 | if (apmu->lock) | ||
| 61 | spin_unlock_irqrestore(apmu->lock, flags); | ||
| 62 | } | ||
| 63 | |||
| 64 | struct clk_ops clk_apmu_ops = { | ||
| 65 | .enable = clk_apmu_enable, | ||
| 66 | .disable = clk_apmu_disable, | ||
| 67 | }; | ||
| 68 | |||
| 69 | struct clk *mmp_clk_register_apmu(const char *name, const char *parent_name, | ||
| 70 | void __iomem *base, u32 enable_mask, spinlock_t *lock) | ||
| 71 | { | ||
| 72 | struct clk_apmu *apmu; | ||
| 73 | struct clk *clk; | ||
| 74 | struct clk_init_data init; | ||
| 75 | |||
| 76 | apmu = kzalloc(sizeof(*apmu), GFP_KERNEL); | ||
| 77 | if (!apmu) | ||
| 78 | return NULL; | ||
| 79 | |||
| 80 | init.name = name; | ||
| 81 | init.ops = &clk_apmu_ops; | ||
| 82 | init.flags = CLK_SET_RATE_PARENT; | ||
| 83 | init.parent_names = (parent_name ? &parent_name : NULL); | ||
| 84 | init.num_parents = (parent_name ? 1 : 0); | ||
| 85 | |||
| 86 | apmu->base = base; | ||
| 87 | apmu->enable_mask = enable_mask; | ||
| 88 | apmu->lock = lock; | ||
| 89 | apmu->hw.init = &init; | ||
| 90 | |||
| 91 | clk = clk_register(NULL, &apmu->hw); | ||
| 92 | |||
| 93 | if (IS_ERR(clk)) | ||
| 94 | kfree(apmu); | ||
| 95 | |||
| 96 | return clk; | ||
| 97 | } | ||
diff --git a/drivers/clk/mmp/clk-frac.c b/drivers/clk/mmp/clk-frac.c new file mode 100644 index 000000000000..80c1dd15d15c --- /dev/null +++ b/drivers/clk/mmp/clk-frac.c | |||
| @@ -0,0 +1,153 @@ | |||
| 1 | /* | ||
| 2 | * mmp factor clock operation source file | ||
| 3 | * | ||
| 4 | * Copyright (C) 2012 Marvell | ||
| 5 | * Chao Xie <xiechao.mail@gmail.com> | ||
| 6 | * | ||
| 7 | * This file is licensed under the terms of the GNU General Public | ||
| 8 | * License version 2. This program is licensed "as is" without any | ||
| 9 | * warranty of any kind, whether express or implied. | ||
| 10 | */ | ||
| 11 | |||
| 12 | #include <linux/clk-provider.h> | ||
| 13 | #include <linux/slab.h> | ||
| 14 | #include <linux/io.h> | ||
| 15 | #include <linux/err.h> | ||
| 16 | |||
| 17 | #include "clk.h" | ||
| 18 | /* | ||
| 19 | * It is M/N clock | ||
| 20 | * | ||
| 21 | * Fout from synthesizer can be given from two equations: | ||
| 22 | * numerator/denominator = Fin / (Fout * factor) | ||
| 23 | */ | ||
| 24 | |||
| 25 | #define to_clk_factor(hw) container_of(hw, struct clk_factor, hw) | ||
| 26 | struct clk_factor { | ||
| 27 | struct clk_hw hw; | ||
| 28 | void __iomem *base; | ||
| 29 | struct clk_factor_masks *masks; | ||
| 30 | struct clk_factor_tbl *ftbl; | ||
| 31 | unsigned int ftbl_cnt; | ||
| 32 | }; | ||
| 33 | |||
| 34 | static long clk_factor_round_rate(struct clk_hw *hw, unsigned long drate, | ||
| 35 | unsigned long *prate) | ||
| 36 | { | ||
| 37 | struct clk_factor *factor = to_clk_factor(hw); | ||
| 38 | unsigned long rate = 0, prev_rate; | ||
| 39 | int i; | ||
| 40 | |||
| 41 | for (i = 0; i < factor->ftbl_cnt; i++) { | ||
| 42 | prev_rate = rate; | ||
| 43 | rate = (((*prate / 10000) * factor->ftbl[i].num) / | ||
| 44 | (factor->ftbl[i].den * factor->masks->factor)) * 10000; | ||
| 45 | if (rate > drate) | ||
| 46 | break; | ||
| 47 | } | ||
| 48 | if (i == 0) | ||
| 49 | return rate; | ||
| 50 | else | ||
| 51 | return prev_rate; | ||
| 52 | } | ||
| 53 | |||
| 54 | static unsigned long clk_factor_recalc_rate(struct clk_hw *hw, | ||
| 55 | unsigned long parent_rate) | ||
| 56 | { | ||
| 57 | struct clk_factor *factor = to_clk_factor(hw); | ||
| 58 | struct clk_factor_masks *masks = factor->masks; | ||
| 59 | unsigned int val, num, den; | ||
| 60 | |||
| 61 | val = readl_relaxed(factor->base); | ||
| 62 | |||
| 63 | /* calculate numerator */ | ||
| 64 | num = (val >> masks->num_shift) & masks->num_mask; | ||
| 65 | |||
| 66 | /* calculate denominator */ | ||
| 67 | den = (val >> masks->den_shift) & masks->num_mask; | ||
| 68 | |||
| 69 | if (!den) | ||
| 70 | return 0; | ||
| 71 | |||
| 72 | return (((parent_rate / 10000) * den) / | ||
| 73 | (num * factor->masks->factor)) * 10000; | ||
| 74 | } | ||
| 75 | |||
| 76 | /* Configures new clock rate*/ | ||
| 77 | static int clk_factor_set_rate(struct clk_hw *hw, unsigned long drate, | ||
| 78 | unsigned long prate) | ||
| 79 | { | ||
| 80 | struct clk_factor *factor = to_clk_factor(hw); | ||
| 81 | struct clk_factor_masks *masks = factor->masks; | ||
| 82 | int i; | ||
| 83 | unsigned long val; | ||
| 84 | unsigned long prev_rate, rate = 0; | ||
| 85 | |||
| 86 | for (i = 0; i < factor->ftbl_cnt; i++) { | ||
| 87 | prev_rate = rate; | ||
| 88 | rate = (((prate / 10000) * factor->ftbl[i].num) / | ||
| 89 | (factor->ftbl[i].den * factor->masks->factor)) * 10000; | ||
| 90 | if (rate > drate) | ||
| 91 | break; | ||
| 92 | } | ||
| 93 | if (i > 0) | ||
| 94 | i--; | ||
| 95 | |||
| 96 | val = readl_relaxed(factor->base); | ||
| 97 | |||
| 98 | val &= ~(masks->num_mask << masks->num_shift); | ||
| 99 | val |= (factor->ftbl[i].num & masks->num_mask) << masks->num_shift; | ||
| 100 | |||
| 101 | val &= ~(masks->den_mask << masks->den_shift); | ||
| 102 | val |= (factor->ftbl[i].den & masks->den_mask) << masks->den_shift; | ||
| 103 | |||
| 104 | writel_relaxed(val, factor->base); | ||
| 105 | |||
| 106 | return 0; | ||
| 107 | } | ||
| 108 | |||
| 109 | static struct clk_ops clk_factor_ops = { | ||
| 110 | .recalc_rate = clk_factor_recalc_rate, | ||
| 111 | .round_rate = clk_factor_round_rate, | ||
| 112 | .set_rate = clk_factor_set_rate, | ||
| 113 | }; | ||
| 114 | |||
| 115 | struct clk *mmp_clk_register_factor(const char *name, const char *parent_name, | ||
| 116 | unsigned long flags, void __iomem *base, | ||
| 117 | struct clk_factor_masks *masks, struct clk_factor_tbl *ftbl, | ||
| 118 | unsigned int ftbl_cnt) | ||
| 119 | { | ||
| 120 | struct clk_factor *factor; | ||
| 121 | struct clk_init_data init; | ||
| 122 | struct clk *clk; | ||
| 123 | |||
| 124 | if (!masks) { | ||
| 125 | pr_err("%s: must pass a clk_factor_mask\n", __func__); | ||
| 126 | return ERR_PTR(-EINVAL); | ||
| 127 | } | ||
| 128 | |||
| 129 | factor = kzalloc(sizeof(*factor), GFP_KERNEL); | ||
| 130 | if (!factor) { | ||
| 131 | pr_err("%s: could not allocate factor clk\n", __func__); | ||
| 132 | return ERR_PTR(-ENOMEM); | ||
| 133 | } | ||
| 134 | |||
| 135 | /* struct clk_aux assignments */ | ||
| 136 | factor->base = base; | ||
| 137 | factor->masks = masks; | ||
| 138 | factor->ftbl = ftbl; | ||
| 139 | factor->ftbl_cnt = ftbl_cnt; | ||
| 140 | factor->hw.init = &init; | ||
| 141 | |||
| 142 | init.name = name; | ||
| 143 | init.ops = &clk_factor_ops; | ||
| 144 | init.flags = flags; | ||
| 145 | init.parent_names = &parent_name; | ||
| 146 | init.num_parents = 1; | ||
| 147 | |||
| 148 | clk = clk_register(NULL, &factor->hw); | ||
| 149 | if (IS_ERR_OR_NULL(clk)) | ||
| 150 | kfree(factor); | ||
| 151 | |||
| 152 | return clk; | ||
| 153 | } | ||
diff --git a/drivers/clk/mmp/clk-mmp2.c b/drivers/clk/mmp/clk-mmp2.c new file mode 100644 index 000000000000..ade435820c7e --- /dev/null +++ b/drivers/clk/mmp/clk-mmp2.c | |||
| @@ -0,0 +1,449 @@ | |||
| 1 | /* | ||
| 2 | * mmp2 clock framework source file | ||
| 3 | * | ||
| 4 | * Copyright (C) 2012 Marvell | ||
| 5 | * Chao Xie <xiechao.mail@gmail.com> | ||
| 6 | * | ||
| 7 | * This file is licensed under the terms of the GNU General Public | ||
| 8 | * License version 2. This program is licensed "as is" without any | ||
| 9 | * warranty of any kind, whether express or implied. | ||
| 10 | */ | ||
| 11 | |||
| 12 | #include <linux/module.h> | ||
| 13 | #include <linux/kernel.h> | ||
| 14 | #include <linux/spinlock.h> | ||
| 15 | #include <linux/io.h> | ||
| 16 | #include <linux/delay.h> | ||
| 17 | #include <linux/err.h> | ||
| 18 | |||
| 19 | #include <mach/addr-map.h> | ||
| 20 | |||
| 21 | #include "clk.h" | ||
| 22 | |||
| 23 | #define APBC_RTC 0x0 | ||
| 24 | #define APBC_TWSI0 0x4 | ||
| 25 | #define APBC_TWSI1 0x8 | ||
| 26 | #define APBC_TWSI2 0xc | ||
| 27 | #define APBC_TWSI3 0x10 | ||
| 28 | #define APBC_TWSI4 0x7c | ||
| 29 | #define APBC_TWSI5 0x80 | ||
| 30 | #define APBC_KPC 0x18 | ||
| 31 | #define APBC_UART0 0x2c | ||
| 32 | #define APBC_UART1 0x30 | ||
| 33 | #define APBC_UART2 0x34 | ||
| 34 | #define APBC_UART3 0x88 | ||
| 35 | #define APBC_GPIO 0x38 | ||
| 36 | #define APBC_PWM0 0x3c | ||
| 37 | #define APBC_PWM1 0x40 | ||
| 38 | #define APBC_PWM2 0x44 | ||
| 39 | #define APBC_PWM3 0x48 | ||
| 40 | #define APBC_SSP0 0x50 | ||
| 41 | #define APBC_SSP1 0x54 | ||
| 42 | #define APBC_SSP2 0x58 | ||
| 43 | #define APBC_SSP3 0x5c | ||
| 44 | #define APMU_SDH0 0x54 | ||
| 45 | #define APMU_SDH1 0x58 | ||
| 46 | #define APMU_SDH2 0xe8 | ||
| 47 | #define APMU_SDH3 0xec | ||
| 48 | #define APMU_USB 0x5c | ||
| 49 | #define APMU_DISP0 0x4c | ||
| 50 | #define APMU_DISP1 0x110 | ||
| 51 | #define APMU_CCIC0 0x50 | ||
| 52 | #define APMU_CCIC1 0xf4 | ||
| 53 | #define MPMU_UART_PLL 0x14 | ||
| 54 | |||
| 55 | static DEFINE_SPINLOCK(clk_lock); | ||
| 56 | |||
| 57 | static struct clk_factor_masks uart_factor_masks = { | ||
| 58 | .factor = 2, | ||
| 59 | .num_mask = 0x1fff, | ||
| 60 | .den_mask = 0x1fff, | ||
| 61 | .num_shift = 16, | ||
| 62 | .den_shift = 0, | ||
| 63 | }; | ||
| 64 | |||
| 65 | static struct clk_factor_tbl uart_factor_tbl[] = { | ||
| 66 | {.num = 14634, .den = 2165}, /*14.745MHZ */ | ||
| 67 | {.num = 3521, .den = 689}, /*19.23MHZ */ | ||
| 68 | {.num = 9679, .den = 5728}, /*58.9824MHZ */ | ||
| 69 | {.num = 15850, .den = 9451}, /*59.429MHZ */ | ||
| 70 | }; | ||
| 71 | |||
| 72 | static const char *uart_parent[] = {"uart_pll", "vctcxo"}; | ||
| 73 | static const char *ssp_parent[] = {"vctcxo_4", "vctcxo_2", "vctcxo", "pll1_16"}; | ||
| 74 | static const char *sdh_parent[] = {"pll1_4", "pll2", "usb_pll", "pll1"}; | ||
| 75 | static const char *disp_parent[] = {"pll1", "pll1_16", "pll2", "vctcxo"}; | ||
| 76 | static const char *ccic_parent[] = {"pll1_2", "pll1_16", "vctcxo"}; | ||
| 77 | |||
| 78 | void __init mmp2_clk_init(void) | ||
| 79 | { | ||
| 80 | struct clk *clk; | ||
| 81 | struct clk *vctcxo; | ||
| 82 | void __iomem *mpmu_base; | ||
| 83 | void __iomem *apmu_base; | ||
| 84 | void __iomem *apbc_base; | ||
| 85 | |||
| 86 | mpmu_base = ioremap(APB_PHYS_BASE + 0x50000, SZ_4K); | ||
| 87 | if (mpmu_base == NULL) { | ||
| 88 | pr_err("error to ioremap MPMU base\n"); | ||
| 89 | return; | ||
| 90 | } | ||
| 91 | |||
| 92 | apmu_base = ioremap(AXI_PHYS_BASE + 0x82800, SZ_4K); | ||
| 93 | if (apmu_base == NULL) { | ||
| 94 | pr_err("error to ioremap APMU base\n"); | ||
| 95 | return; | ||
| 96 | } | ||
| 97 | |||
| 98 | apbc_base = ioremap(APB_PHYS_BASE + 0x15000, SZ_4K); | ||
| 99 | if (apbc_base == NULL) { | ||
| 100 | pr_err("error to ioremap APBC base\n"); | ||
| 101 | return; | ||
| 102 | } | ||
| 103 | |||
| 104 | clk = clk_register_fixed_rate(NULL, "clk32", NULL, CLK_IS_ROOT, 3200); | ||
| 105 | clk_register_clkdev(clk, "clk32", NULL); | ||
| 106 | |||
| 107 | vctcxo = clk_register_fixed_rate(NULL, "vctcxo", NULL, CLK_IS_ROOT, | ||
| 108 | 26000000); | ||
| 109 | clk_register_clkdev(vctcxo, "vctcxo", NULL); | ||
| 110 | |||
| 111 | clk = clk_register_fixed_rate(NULL, "pll1", NULL, CLK_IS_ROOT, | ||
| 112 | 800000000); | ||
| 113 | clk_register_clkdev(clk, "pll1", NULL); | ||
| 114 | |||
| 115 | clk = clk_register_fixed_rate(NULL, "usb_pll", NULL, CLK_IS_ROOT, | ||
| 116 | 480000000); | ||
| 117 | clk_register_clkdev(clk, "usb_pll", NULL); | ||
| 118 | |||
| 119 | clk = clk_register_fixed_rate(NULL, "pll2", NULL, CLK_IS_ROOT, | ||
| 120 | 960000000); | ||
| 121 | clk_register_clkdev(clk, "pll2", NULL); | ||
| 122 | |||
| 123 | clk = clk_register_fixed_factor(NULL, "pll1_2", "pll1", | ||
| 124 | CLK_SET_RATE_PARENT, 1, 2); | ||
| 125 | clk_register_clkdev(clk, "pll1_2", NULL); | ||
| 126 | |||
| 127 | clk = clk_register_fixed_factor(NULL, "pll1_4", "pll1_2", | ||
| 128 | CLK_SET_RATE_PARENT, 1, 2); | ||
| 129 | clk_register_clkdev(clk, "pll1_4", NULL); | ||
| 130 | |||
| 131 | clk = clk_register_fixed_factor(NULL, "pll1_8", "pll1_4", | ||
| 132 | CLK_SET_RATE_PARENT, 1, 2); | ||
| 133 | clk_register_clkdev(clk, "pll1_8", NULL); | ||
| 134 | |||
| 135 | clk = clk_register_fixed_factor(NULL, "pll1_16", "pll1_8", | ||
| 136 | CLK_SET_RATE_PARENT, 1, 2); | ||
| 137 | clk_register_clkdev(clk, "pll1_16", NULL); | ||
| 138 | |||
| 139 | clk = clk_register_fixed_factor(NULL, "pll1_20", "pll1_4", | ||
| 140 | CLK_SET_RATE_PARENT, 1, 5); | ||
| 141 | clk_register_clkdev(clk, "pll1_20", NULL); | ||
| 142 | |||
| 143 | clk = clk_register_fixed_factor(NULL, "pll1_3", "pll1", | ||
| 144 | CLK_SET_RATE_PARENT, 1, 3); | ||
| 145 | clk_register_clkdev(clk, "pll1_3", NULL); | ||
| 146 | |||
| 147 | clk = clk_register_fixed_factor(NULL, "pll1_6", "pll1_3", | ||
| 148 | CLK_SET_RATE_PARENT, 1, 2); | ||
| 149 | clk_register_clkdev(clk, "pll1_6", NULL); | ||
| 150 | |||
| 151 | clk = clk_register_fixed_factor(NULL, "pll1_12", "pll1_6", | ||
| 152 | CLK_SET_RATE_PARENT, 1, 2); | ||
| 153 | clk_register_clkdev(clk, "pll1_12", NULL); | ||
| 154 | |||
| 155 | clk = clk_register_fixed_factor(NULL, "pll2_2", "pll2", | ||
| 156 | CLK_SET_RATE_PARENT, 1, 2); | ||
| 157 | clk_register_clkdev(clk, "pll2_2", NULL); | ||
| 158 | |||
| 159 | clk = clk_register_fixed_factor(NULL, "pll2_4", "pll2_2", | ||
| 160 | CLK_SET_RATE_PARENT, 1, 2); | ||
| 161 | clk_register_clkdev(clk, "pll2_4", NULL); | ||
| 162 | |||
| 163 | clk = clk_register_fixed_factor(NULL, "pll2_8", "pll2_4", | ||
| 164 | CLK_SET_RATE_PARENT, 1, 2); | ||
| 165 | clk_register_clkdev(clk, "pll2_8", NULL); | ||
| 166 | |||
| 167 | clk = clk_register_fixed_factor(NULL, "pll2_16", "pll2_8", | ||
| 168 | CLK_SET_RATE_PARENT, 1, 2); | ||
| 169 | clk_register_clkdev(clk, "pll2_16", NULL); | ||
| 170 | |||
| 171 | clk = clk_register_fixed_factor(NULL, "pll2_3", "pll2", | ||
| 172 | CLK_SET_RATE_PARENT, 1, 3); | ||
| 173 | clk_register_clkdev(clk, "pll2_3", NULL); | ||
| 174 | |||
| 175 | clk = clk_register_fixed_factor(NULL, "pll2_6", "pll2_3", | ||
| 176 | CLK_SET_RATE_PARENT, 1, 2); | ||
| 177 | clk_register_clkdev(clk, "pll2_6", NULL); | ||
| 178 | |||
| 179 | clk = clk_register_fixed_factor(NULL, "pll2_12", "pll2_6", | ||
| 180 | CLK_SET_RATE_PARENT, 1, 2); | ||
| 181 | clk_register_clkdev(clk, "pll2_12", NULL); | ||
| 182 | |||
| 183 | clk = clk_register_fixed_factor(NULL, "vctcxo_2", "vctcxo", | ||
| 184 | CLK_SET_RATE_PARENT, 1, 2); | ||
| 185 | clk_register_clkdev(clk, "vctcxo_2", NULL); | ||
| 186 | |||
| 187 | clk = clk_register_fixed_factor(NULL, "vctcxo_4", "vctcxo_2", | ||
| 188 | CLK_SET_RATE_PARENT, 1, 2); | ||
| 189 | clk_register_clkdev(clk, "vctcxo_4", NULL); | ||
| 190 | |||
| 191 | clk = mmp_clk_register_factor("uart_pll", "pll1_4", 0, | ||
| 192 | mpmu_base + MPMU_UART_PLL, | ||
| 193 | &uart_factor_masks, uart_factor_tbl, | ||
| 194 | ARRAY_SIZE(uart_factor_tbl)); | ||
| 195 | clk_set_rate(clk, 14745600); | ||
| 196 | clk_register_clkdev(clk, "uart_pll", NULL); | ||
| 197 | |||
| 198 | clk = mmp_clk_register_apbc("twsi0", "vctcxo", | ||
| 199 | apbc_base + APBC_TWSI0, 10, 0, &clk_lock); | ||
| 200 | clk_register_clkdev(clk, NULL, "pxa2xx-i2c.0"); | ||
| 201 | |||
| 202 | clk = mmp_clk_register_apbc("twsi1", "vctcxo", | ||
| 203 | apbc_base + APBC_TWSI1, 10, 0, &clk_lock); | ||
| 204 | clk_register_clkdev(clk, NULL, "pxa2xx-i2c.1"); | ||
| 205 | |||
| 206 | clk = mmp_clk_register_apbc("twsi2", "vctcxo", | ||
| 207 | apbc_base + APBC_TWSI2, 10, 0, &clk_lock); | ||
| 208 | clk_register_clkdev(clk, NULL, "pxa2xx-i2c.2"); | ||
| 209 | |||
| 210 | clk = mmp_clk_register_apbc("twsi3", "vctcxo", | ||
| 211 | apbc_base + APBC_TWSI3, 10, 0, &clk_lock); | ||
| 212 | clk_register_clkdev(clk, NULL, "pxa2xx-i2c.3"); | ||
| 213 | |||
| 214 | clk = mmp_clk_register_apbc("twsi4", "vctcxo", | ||
| 215 | apbc_base + APBC_TWSI4, 10, 0, &clk_lock); | ||
| 216 | clk_register_clkdev(clk, NULL, "pxa2xx-i2c.4"); | ||
| 217 | |||
| 218 | clk = mmp_clk_register_apbc("twsi5", "vctcxo", | ||
| 219 | apbc_base + APBC_TWSI5, 10, 0, &clk_lock); | ||
| 220 | clk_register_clkdev(clk, NULL, "pxa2xx-i2c.5"); | ||
| 221 | |||
| 222 | clk = mmp_clk_register_apbc("gpio", "vctcxo", | ||
| 223 | apbc_base + APBC_GPIO, 10, 0, &clk_lock); | ||
| 224 | clk_register_clkdev(clk, NULL, "pxa-gpio"); | ||
| 225 | |||
| 226 | clk = mmp_clk_register_apbc("kpc", "clk32", | ||
| 227 | apbc_base + APBC_KPC, 10, 0, &clk_lock); | ||
| 228 | clk_register_clkdev(clk, NULL, "pxa27x-keypad"); | ||
| 229 | |||
| 230 | clk = mmp_clk_register_apbc("rtc", "clk32", | ||
| 231 | apbc_base + APBC_RTC, 10, 0, &clk_lock); | ||
| 232 | clk_register_clkdev(clk, NULL, "mmp-rtc"); | ||
| 233 | |||
| 234 | clk = mmp_clk_register_apbc("pwm0", "vctcxo", | ||
| 235 | apbc_base + APBC_PWM0, 10, 0, &clk_lock); | ||
| 236 | clk_register_clkdev(clk, NULL, "mmp2-pwm.0"); | ||
| 237 | |||
| 238 | clk = mmp_clk_register_apbc("pwm1", "vctcxo", | ||
| 239 | apbc_base + APBC_PWM1, 10, 0, &clk_lock); | ||
| 240 | clk_register_clkdev(clk, NULL, "mmp2-pwm.1"); | ||
| 241 | |||
| 242 | clk = mmp_clk_register_apbc("pwm2", "vctcxo", | ||
| 243 | apbc_base + APBC_PWM2, 10, 0, &clk_lock); | ||
| 244 | clk_register_clkdev(clk, NULL, "mmp2-pwm.2"); | ||
| 245 | |||
| 246 | clk = mmp_clk_register_apbc("pwm3", "vctcxo", | ||
| 247 | apbc_base + APBC_PWM3, 10, 0, &clk_lock); | ||
| 248 | clk_register_clkdev(clk, NULL, "mmp2-pwm.3"); | ||
| 249 | |||
| 250 | clk = clk_register_mux(NULL, "uart0_mux", uart_parent, | ||
| 251 | ARRAY_SIZE(uart_parent), CLK_SET_RATE_PARENT, | ||
| 252 | apbc_base + APBC_UART0, 4, 3, 0, &clk_lock); | ||
| 253 | clk_set_parent(clk, vctcxo); | ||
| 254 | clk_register_clkdev(clk, "uart_mux.0", NULL); | ||
| 255 | |||
| 256 | clk = mmp_clk_register_apbc("uart0", "uart0_mux", | ||
| 257 | apbc_base + APBC_UART0, 10, 0, &clk_lock); | ||
| 258 | clk_register_clkdev(clk, NULL, "pxa2xx-uart.0"); | ||
| 259 | |||
| 260 | clk = clk_register_mux(NULL, "uart1_mux", uart_parent, | ||
| 261 | ARRAY_SIZE(uart_parent), CLK_SET_RATE_PARENT, | ||
| 262 | apbc_base + APBC_UART1, 4, 3, 0, &clk_lock); | ||
| 263 | clk_set_parent(clk, vctcxo); | ||
| 264 | clk_register_clkdev(clk, "uart_mux.1", NULL); | ||
| 265 | |||
| 266 | clk = mmp_clk_register_apbc("uart1", "uart1_mux", | ||
| 267 | apbc_base + APBC_UART1, 10, 0, &clk_lock); | ||
| 268 | clk_register_clkdev(clk, NULL, "pxa2xx-uart.1"); | ||
| 269 | |||
| 270 | clk = clk_register_mux(NULL, "uart2_mux", uart_parent, | ||
| 271 | ARRAY_SIZE(uart_parent), CLK_SET_RATE_PARENT, | ||
| 272 | apbc_base + APBC_UART2, 4, 3, 0, &clk_lock); | ||
| 273 | clk_set_parent(clk, vctcxo); | ||
| 274 | clk_register_clkdev(clk, "uart_mux.2", NULL); | ||
| 275 | |||
| 276 | clk = mmp_clk_register_apbc("uart2", "uart2_mux", | ||
| 277 | apbc_base + APBC_UART2, 10, 0, &clk_lock); | ||
| 278 | clk_register_clkdev(clk, NULL, "pxa2xx-uart.2"); | ||
| 279 | |||
| 280 | clk = clk_register_mux(NULL, "uart3_mux", uart_parent, | ||
| 281 | ARRAY_SIZE(uart_parent), CLK_SET_RATE_PARENT, | ||
| 282 | apbc_base + APBC_UART3, 4, 3, 0, &clk_lock); | ||
| 283 | clk_set_parent(clk, vctcxo); | ||
| 284 | clk_register_clkdev(clk, "uart_mux.3", NULL); | ||
| 285 | |||
| 286 | clk = mmp_clk_register_apbc("uart3", "uart3_mux", | ||
| 287 | apbc_base + APBC_UART3, 10, 0, &clk_lock); | ||
| 288 | clk_register_clkdev(clk, NULL, "pxa2xx-uart.3"); | ||
| 289 | |||
| 290 | clk = clk_register_mux(NULL, "ssp0_mux", ssp_parent, | ||
| 291 | ARRAY_SIZE(ssp_parent), CLK_SET_RATE_PARENT, | ||
| 292 | apbc_base + APBC_SSP0, 4, 3, 0, &clk_lock); | ||
| 293 | clk_register_clkdev(clk, "uart_mux.0", NULL); | ||
| 294 | |||
| 295 | clk = mmp_clk_register_apbc("ssp0", "ssp0_mux", | ||
| 296 | apbc_base + APBC_SSP0, 10, 0, &clk_lock); | ||
| 297 | clk_register_clkdev(clk, NULL, "mmp-ssp.0"); | ||
| 298 | |||
| 299 | clk = clk_register_mux(NULL, "ssp1_mux", ssp_parent, | ||
| 300 | ARRAY_SIZE(ssp_parent), CLK_SET_RATE_PARENT, | ||
| 301 | apbc_base + APBC_SSP1, 4, 3, 0, &clk_lock); | ||
| 302 | clk_register_clkdev(clk, "ssp_mux.1", NULL); | ||
| 303 | |||
| 304 | clk = mmp_clk_register_apbc("ssp1", "ssp1_mux", | ||
| 305 | apbc_base + APBC_SSP1, 10, 0, &clk_lock); | ||
| 306 | clk_register_clkdev(clk, NULL, "mmp-ssp.1"); | ||
| 307 | |||
| 308 | clk = clk_register_mux(NULL, "ssp2_mux", ssp_parent, | ||
| 309 | ARRAY_SIZE(ssp_parent), CLK_SET_RATE_PARENT, | ||
| 310 | apbc_base + APBC_SSP2, 4, 3, 0, &clk_lock); | ||
| 311 | clk_register_clkdev(clk, "ssp_mux.2", NULL); | ||
| 312 | |||
| 313 | clk = mmp_clk_register_apbc("ssp2", "ssp2_mux", | ||
| 314 | apbc_base + APBC_SSP2, 10, 0, &clk_lock); | ||
| 315 | clk_register_clkdev(clk, NULL, "mmp-ssp.2"); | ||
| 316 | |||
| 317 | clk = clk_register_mux(NULL, "ssp3_mux", ssp_parent, | ||
| 318 | ARRAY_SIZE(ssp_parent), CLK_SET_RATE_PARENT, | ||
| 319 | apbc_base + APBC_SSP3, 4, 3, 0, &clk_lock); | ||
| 320 | clk_register_clkdev(clk, "ssp_mux.3", NULL); | ||
| 321 | |||
| 322 | clk = mmp_clk_register_apbc("ssp3", "ssp3_mux", | ||
| 323 | apbc_base + APBC_SSP3, 10, 0, &clk_lock); | ||
| 324 | clk_register_clkdev(clk, NULL, "mmp-ssp.3"); | ||
| 325 | |||
| 326 | clk = clk_register_mux(NULL, "sdh_mux", sdh_parent, | ||
| 327 | ARRAY_SIZE(sdh_parent), CLK_SET_RATE_PARENT, | ||
| 328 | apmu_base + APMU_SDH0, 8, 2, 0, &clk_lock); | ||
| 329 | clk_register_clkdev(clk, "sdh_mux", NULL); | ||
| 330 | |||
| 331 | clk = clk_register_divider(NULL, "sdh_div", "sdh_mux", | ||
| 332 | CLK_SET_RATE_PARENT, apmu_base + APMU_SDH0, | ||
| 333 | 10, 4, CLK_DIVIDER_ONE_BASED, &clk_lock); | ||
| 334 | clk_register_clkdev(clk, "sdh_div", NULL); | ||
| 335 | |||
| 336 | clk = mmp_clk_register_apmu("sdh0", "sdh_div", apmu_base + APMU_SDH0, | ||
| 337 | 0x1b, &clk_lock); | ||
| 338 | clk_register_clkdev(clk, NULL, "sdhci-pxav3.0"); | ||
| 339 | |||
| 340 | clk = mmp_clk_register_apmu("sdh1", "sdh_div", apmu_base + APMU_SDH1, | ||
| 341 | 0x1b, &clk_lock); | ||
| 342 | clk_register_clkdev(clk, NULL, "sdhci-pxav3.1"); | ||
| 343 | |||
| 344 | clk = mmp_clk_register_apmu("sdh2", "sdh_div", apmu_base + APMU_SDH2, | ||
| 345 | 0x1b, &clk_lock); | ||
| 346 | clk_register_clkdev(clk, NULL, "sdhci-pxav3.2"); | ||
| 347 | |||
| 348 | clk = mmp_clk_register_apmu("sdh3", "sdh_div", apmu_base + APMU_SDH3, | ||
| 349 | 0x1b, &clk_lock); | ||
| 350 | clk_register_clkdev(clk, NULL, "sdhci-pxav3.3"); | ||
| 351 | |||
| 352 | clk = mmp_clk_register_apmu("usb", "usb_pll", apmu_base + APMU_USB, | ||
| 353 | 0x9, &clk_lock); | ||
| 354 | clk_register_clkdev(clk, "usb_clk", NULL); | ||
| 355 | |||
| 356 | clk = clk_register_mux(NULL, "disp0_mux", disp_parent, | ||
| 357 | ARRAY_SIZE(disp_parent), CLK_SET_RATE_PARENT, | ||
| 358 | apmu_base + APMU_DISP0, 6, 2, 0, &clk_lock); | ||
| 359 | clk_register_clkdev(clk, "disp_mux.0", NULL); | ||
| 360 | |||
| 361 | clk = clk_register_divider(NULL, "disp0_div", "disp0_mux", | ||
| 362 | CLK_SET_RATE_PARENT, apmu_base + APMU_DISP0, | ||
| 363 | 8, 4, CLK_DIVIDER_ONE_BASED, &clk_lock); | ||
| 364 | clk_register_clkdev(clk, "disp_div.0", NULL); | ||
| 365 | |||
| 366 | clk = mmp_clk_register_apmu("disp0", "disp0_div", | ||
| 367 | apmu_base + APMU_DISP0, 0x1b, &clk_lock); | ||
| 368 | clk_register_clkdev(clk, NULL, "mmp-disp.0"); | ||
| 369 | |||
| 370 | clk = clk_register_divider(NULL, "disp0_sphy_div", "disp0_mux", 0, | ||
| 371 | apmu_base + APMU_DISP0, 15, 5, 0, &clk_lock); | ||
| 372 | clk_register_clkdev(clk, "disp_sphy_div.0", NULL); | ||
| 373 | |||
| 374 | clk = mmp_clk_register_apmu("disp0_sphy", "disp0_sphy_div", | ||
| 375 | apmu_base + APMU_DISP0, 0x1024, &clk_lock); | ||
| 376 | clk_register_clkdev(clk, "disp_sphy.0", NULL); | ||
| 377 | |||
| 378 | clk = clk_register_mux(NULL, "disp1_mux", disp_parent, | ||
| 379 | ARRAY_SIZE(disp_parent), CLK_SET_RATE_PARENT, | ||
| 380 | apmu_base + APMU_DISP1, 6, 2, 0, &clk_lock); | ||
| 381 | clk_register_clkdev(clk, "disp_mux.1", NULL); | ||
| 382 | |||
| 383 | clk = clk_register_divider(NULL, "disp1_div", "disp1_mux", | ||
| 384 | CLK_SET_RATE_PARENT, apmu_base + APMU_DISP1, | ||
| 385 | 8, 4, CLK_DIVIDER_ONE_BASED, &clk_lock); | ||
| 386 | clk_register_clkdev(clk, "disp_div.1", NULL); | ||
| 387 | |||
| 388 | clk = mmp_clk_register_apmu("disp1", "disp1_div", | ||
| 389 | apmu_base + APMU_DISP1, 0x1b, &clk_lock); | ||
| 390 | clk_register_clkdev(clk, NULL, "mmp-disp.1"); | ||
| 391 | |||
| 392 | clk = mmp_clk_register_apmu("ccic_arbiter", "vctcxo", | ||
| 393 | apmu_base + APMU_CCIC0, 0x1800, &clk_lock); | ||
| 394 | clk_register_clkdev(clk, "ccic_arbiter", NULL); | ||
| 395 | |||
| 396 | clk = clk_register_mux(NULL, "ccic0_mux", ccic_parent, | ||
| 397 | ARRAY_SIZE(ccic_parent), CLK_SET_RATE_PARENT, | ||
| 398 | apmu_base + APMU_CCIC0, 6, 2, 0, &clk_lock); | ||
| 399 | clk_register_clkdev(clk, "ccic_mux.0", NULL); | ||
| 400 | |||
| 401 | clk = clk_register_divider(NULL, "ccic0_div", "ccic0_mux", | ||
| 402 | CLK_SET_RATE_PARENT, apmu_base + APMU_CCIC0, | ||
| 403 | 17, 4, CLK_DIVIDER_ONE_BASED, &clk_lock); | ||
| 404 | clk_register_clkdev(clk, "ccic_div.0", NULL); | ||
| 405 | |||
| 406 | clk = mmp_clk_register_apmu("ccic0", "ccic0_div", | ||
| 407 | apmu_base + APMU_CCIC0, 0x1b, &clk_lock); | ||
| 408 | clk_register_clkdev(clk, "fnclk", "mmp-ccic.0"); | ||
| 409 | |||
| 410 | clk = mmp_clk_register_apmu("ccic0_phy", "ccic0_div", | ||
| 411 | apmu_base + APMU_CCIC0, 0x24, &clk_lock); | ||
| 412 | clk_register_clkdev(clk, "phyclk", "mmp-ccic.0"); | ||
| 413 | |||
| 414 | clk = clk_register_divider(NULL, "ccic0_sphy_div", "ccic0_div", | ||
| 415 | CLK_SET_RATE_PARENT, apmu_base + APMU_CCIC0, | ||
| 416 | 10, 5, 0, &clk_lock); | ||
| 417 | clk_register_clkdev(clk, "sphyclk_div", "mmp-ccic.0"); | ||
| 418 | |||
| 419 | clk = mmp_clk_register_apmu("ccic0_sphy", "ccic0_sphy_div", | ||
| 420 | apmu_base + APMU_CCIC0, 0x300, &clk_lock); | ||
| 421 | clk_register_clkdev(clk, "sphyclk", "mmp-ccic.0"); | ||
| 422 | |||
| 423 | clk = clk_register_mux(NULL, "ccic1_mux", ccic_parent, | ||
| 424 | ARRAY_SIZE(ccic_parent), CLK_SET_RATE_PARENT, | ||
| 425 | apmu_base + APMU_CCIC1, 6, 2, 0, &clk_lock); | ||
| 426 | clk_register_clkdev(clk, "ccic_mux.1", NULL); | ||
| 427 | |||
| 428 | clk = clk_register_divider(NULL, "ccic1_div", "ccic1_mux", | ||
| 429 | CLK_SET_RATE_PARENT, apmu_base + APMU_CCIC1, | ||
| 430 | 16, 4, CLK_DIVIDER_ONE_BASED, &clk_lock); | ||
| 431 | clk_register_clkdev(clk, "ccic_div.1", NULL); | ||
| 432 | |||
| 433 | clk = mmp_clk_register_apmu("ccic1", "ccic1_div", | ||
| 434 | apmu_base + APMU_CCIC1, 0x1b, &clk_lock); | ||
| 435 | clk_register_clkdev(clk, "fnclk", "mmp-ccic.1"); | ||
| 436 | |||
| 437 | clk = mmp_clk_register_apmu("ccic1_phy", "ccic1_div", | ||
| 438 | apmu_base + APMU_CCIC1, 0x24, &clk_lock); | ||
| 439 | clk_register_clkdev(clk, "phyclk", "mmp-ccic.1"); | ||
| 440 | |||
| 441 | clk = clk_register_divider(NULL, "ccic1_sphy_div", "ccic1_div", | ||
| 442 | CLK_SET_RATE_PARENT, apmu_base + APMU_CCIC1, | ||
| 443 | 10, 5, 0, &clk_lock); | ||
| 444 | clk_register_clkdev(clk, "sphyclk_div", "mmp-ccic.1"); | ||
| 445 | |||
| 446 | clk = mmp_clk_register_apmu("ccic1_sphy", "ccic1_sphy_div", | ||
| 447 | apmu_base + APMU_CCIC1, 0x300, &clk_lock); | ||
| 448 | clk_register_clkdev(clk, "sphyclk", "mmp-ccic.1"); | ||
| 449 | } | ||
diff --git a/drivers/clk/mmp/clk-pxa168.c b/drivers/clk/mmp/clk-pxa168.c new file mode 100644 index 000000000000..e8d036c12cbf --- /dev/null +++ b/drivers/clk/mmp/clk-pxa168.c | |||
| @@ -0,0 +1,346 @@ | |||
| 1 | /* | ||
| 2 | * pxa168 clock framework source file | ||
| 3 | * | ||
| 4 | * Copyright (C) 2012 Marvell | ||
| 5 | * Chao Xie <xiechao.mail@gmail.com> | ||
| 6 | * | ||
| 7 | * This file is licensed under the terms of the GNU General Public | ||
| 8 | * License version 2. This program is licensed "as is" without any | ||
| 9 | * warranty of any kind, whether express or implied. | ||
| 10 | */ | ||
| 11 | |||
| 12 | #include <linux/module.h> | ||
| 13 | #include <linux/kernel.h> | ||
| 14 | #include <linux/spinlock.h> | ||
| 15 | #include <linux/io.h> | ||
| 16 | #include <linux/delay.h> | ||
| 17 | #include <linux/err.h> | ||
| 18 | |||
| 19 | #include <mach/addr-map.h> | ||
| 20 | |||
| 21 | #include "clk.h" | ||
| 22 | |||
| 23 | #define APBC_RTC 0x28 | ||
| 24 | #define APBC_TWSI0 0x2c | ||
| 25 | #define APBC_KPC 0x30 | ||
| 26 | #define APBC_UART0 0x0 | ||
| 27 | #define APBC_UART1 0x4 | ||
| 28 | #define APBC_GPIO 0x8 | ||
| 29 | #define APBC_PWM0 0xc | ||
| 30 | #define APBC_PWM1 0x10 | ||
| 31 | #define APBC_PWM2 0x14 | ||
| 32 | #define APBC_PWM3 0x18 | ||
| 33 | #define APBC_SSP0 0x81c | ||
| 34 | #define APBC_SSP1 0x820 | ||
| 35 | #define APBC_SSP2 0x84c | ||
| 36 | #define APBC_SSP3 0x858 | ||
| 37 | #define APBC_SSP4 0x85c | ||
| 38 | #define APBC_TWSI1 0x6c | ||
| 39 | #define APBC_UART2 0x70 | ||
| 40 | #define APMU_SDH0 0x54 | ||
| 41 | #define APMU_SDH1 0x58 | ||
| 42 | #define APMU_USB 0x5c | ||
| 43 | #define APMU_DISP0 0x4c | ||
| 44 | #define APMU_CCIC0 0x50 | ||
| 45 | #define APMU_DFC 0x60 | ||
| 46 | #define MPMU_UART_PLL 0x14 | ||
| 47 | |||
| 48 | static DEFINE_SPINLOCK(clk_lock); | ||
| 49 | |||
| 50 | static struct clk_factor_masks uart_factor_masks = { | ||
| 51 | .factor = 2, | ||
| 52 | .num_mask = 0x1fff, | ||
| 53 | .den_mask = 0x1fff, | ||
| 54 | .num_shift = 16, | ||
| 55 | .den_shift = 0, | ||
| 56 | }; | ||
| 57 | |||
| 58 | static struct clk_factor_tbl uart_factor_tbl[] = { | ||
| 59 | {.num = 8125, .den = 1536}, /*14.745MHZ */ | ||
| 60 | }; | ||
| 61 | |||
| 62 | static const char *uart_parent[] = {"pll1_3_16", "uart_pll"}; | ||
| 63 | static const char *ssp_parent[] = {"pll1_96", "pll1_48", "pll1_24", "pll1_12"}; | ||
| 64 | static const char *sdh_parent[] = {"pll1_12", "pll1_13"}; | ||
| 65 | static const char *disp_parent[] = {"pll1_2", "pll1_12"}; | ||
| 66 | static const char *ccic_parent[] = {"pll1_2", "pll1_12"}; | ||
| 67 | static const char *ccic_phy_parent[] = {"pll1_6", "pll1_12"}; | ||
| 68 | |||
| 69 | void __init pxa168_clk_init(void) | ||
| 70 | { | ||
| 71 | struct clk *clk; | ||
| 72 | struct clk *uart_pll; | ||
| 73 | void __iomem *mpmu_base; | ||
| 74 | void __iomem *apmu_base; | ||
| 75 | void __iomem *apbc_base; | ||
| 76 | |||
| 77 | mpmu_base = ioremap(APB_PHYS_BASE + 0x50000, SZ_4K); | ||
| 78 | if (mpmu_base == NULL) { | ||
| 79 | pr_err("error to ioremap MPMU base\n"); | ||
| 80 | return; | ||
| 81 | } | ||
| 82 | |||
| 83 | apmu_base = ioremap(AXI_PHYS_BASE + 0x82800, SZ_4K); | ||
| 84 | if (apmu_base == NULL) { | ||
| 85 | pr_err("error to ioremap APMU base\n"); | ||
| 86 | return; | ||
| 87 | } | ||
| 88 | |||
| 89 | apbc_base = ioremap(APB_PHYS_BASE + 0x15000, SZ_4K); | ||
| 90 | if (apbc_base == NULL) { | ||
| 91 | pr_err("error to ioremap APBC base\n"); | ||
| 92 | return; | ||
| 93 | } | ||
| 94 | |||
| 95 | clk = clk_register_fixed_rate(NULL, "clk32", NULL, CLK_IS_ROOT, 3200); | ||
| 96 | clk_register_clkdev(clk, "clk32", NULL); | ||
| 97 | |||
| 98 | clk = clk_register_fixed_rate(NULL, "vctcxo", NULL, CLK_IS_ROOT, | ||
| 99 | 26000000); | ||
| 100 | clk_register_clkdev(clk, "vctcxo", NULL); | ||
| 101 | |||
| 102 | clk = clk_register_fixed_rate(NULL, "pll1", NULL, CLK_IS_ROOT, | ||
| 103 | 624000000); | ||
| 104 | clk_register_clkdev(clk, "pll1", NULL); | ||
| 105 | |||
| 106 | clk = clk_register_fixed_factor(NULL, "pll1_2", "pll1", | ||
| 107 | CLK_SET_RATE_PARENT, 1, 2); | ||
| 108 | clk_register_clkdev(clk, "pll1_2", NULL); | ||
| 109 | |||
| 110 | clk = clk_register_fixed_factor(NULL, "pll1_4", "pll1_2", | ||
| 111 | CLK_SET_RATE_PARENT, 1, 2); | ||
| 112 | clk_register_clkdev(clk, "pll1_4", NULL); | ||
| 113 | |||
| 114 | clk = clk_register_fixed_factor(NULL, "pll1_8", "pll1_4", | ||
| 115 | CLK_SET_RATE_PARENT, 1, 2); | ||
| 116 | clk_register_clkdev(clk, "pll1_8", NULL); | ||
| 117 | |||
| 118 | clk = clk_register_fixed_factor(NULL, "pll1_16", "pll1_8", | ||
| 119 | CLK_SET_RATE_PARENT, 1, 2); | ||
| 120 | clk_register_clkdev(clk, "pll1_16", NULL); | ||
| 121 | |||
| 122 | clk = clk_register_fixed_factor(NULL, "pll1_6", "pll1_2", | ||
| 123 | CLK_SET_RATE_PARENT, 1, 3); | ||
| 124 | clk_register_clkdev(clk, "pll1_6", NULL); | ||
| 125 | |||
| 126 | clk = clk_register_fixed_factor(NULL, "pll1_12", "pll1_6", | ||
| 127 | CLK_SET_RATE_PARENT, 1, 2); | ||
| 128 | clk_register_clkdev(clk, "pll1_12", NULL); | ||
| 129 | |||
| 130 | clk = clk_register_fixed_factor(NULL, "pll1_24", "pll1_12", | ||
| 131 | CLK_SET_RATE_PARENT, 1, 2); | ||
| 132 | clk_register_clkdev(clk, "pll1_24", NULL); | ||
| 133 | |||
| 134 | clk = clk_register_fixed_factor(NULL, "pll1_48", "pll1_24", | ||
| 135 | CLK_SET_RATE_PARENT, 1, 2); | ||
| 136 | clk_register_clkdev(clk, "pll1_48", NULL); | ||
| 137 | |||
| 138 | clk = clk_register_fixed_factor(NULL, "pll1_96", "pll1_48", | ||
| 139 | CLK_SET_RATE_PARENT, 1, 2); | ||
| 140 | clk_register_clkdev(clk, "pll1_96", NULL); | ||
| 141 | |||
| 142 | clk = clk_register_fixed_factor(NULL, "pll1_13", "pll1", | ||
| 143 | CLK_SET_RATE_PARENT, 1, 13); | ||
| 144 | clk_register_clkdev(clk, "pll1_13", NULL); | ||
| 145 | |||
| 146 | clk = clk_register_fixed_factor(NULL, "pll1_13_1_5", "pll1", | ||
| 147 | CLK_SET_RATE_PARENT, 2, 3); | ||
| 148 | clk_register_clkdev(clk, "pll1_13_1_5", NULL); | ||
| 149 | |||
| 150 | clk = clk_register_fixed_factor(NULL, "pll1_2_1_5", "pll1", | ||
| 151 | CLK_SET_RATE_PARENT, 2, 3); | ||
| 152 | clk_register_clkdev(clk, "pll1_2_1_5", NULL); | ||
| 153 | |||
| 154 | clk = clk_register_fixed_factor(NULL, "pll1_3_16", "pll1", | ||
| 155 | CLK_SET_RATE_PARENT, 3, 16); | ||
| 156 | clk_register_clkdev(clk, "pll1_3_16", NULL); | ||
| 157 | |||
| 158 | uart_pll = mmp_clk_register_factor("uart_pll", "pll1_4", 0, | ||
| 159 | mpmu_base + MPMU_UART_PLL, | ||
| 160 | &uart_factor_masks, uart_factor_tbl, | ||
| 161 | ARRAY_SIZE(uart_factor_tbl)); | ||
| 162 | clk_set_rate(uart_pll, 14745600); | ||
| 163 | clk_register_clkdev(uart_pll, "uart_pll", NULL); | ||
| 164 | |||
| 165 | clk = mmp_clk_register_apbc("twsi0", "pll1_13_1_5", | ||
| 166 | apbc_base + APBC_TWSI0, 10, 0, &clk_lock); | ||
| 167 | clk_register_clkdev(clk, NULL, "pxa2xx-i2c.0"); | ||
| 168 | |||
| 169 | clk = mmp_clk_register_apbc("twsi1", "pll1_13_1_5", | ||
| 170 | apbc_base + APBC_TWSI1, 10, 0, &clk_lock); | ||
| 171 | clk_register_clkdev(clk, NULL, "pxa2xx-i2c.1"); | ||
| 172 | |||
| 173 | clk = mmp_clk_register_apbc("gpio", "vctcxo", | ||
| 174 | apbc_base + APBC_GPIO, 10, 0, &clk_lock); | ||
| 175 | clk_register_clkdev(clk, NULL, "pxa-gpio"); | ||
| 176 | |||
| 177 | clk = mmp_clk_register_apbc("kpc", "clk32", | ||
| 178 | apbc_base + APBC_KPC, 10, 0, &clk_lock); | ||
| 179 | clk_register_clkdev(clk, NULL, "pxa27x-keypad"); | ||
| 180 | |||
| 181 | clk = mmp_clk_register_apbc("rtc", "clk32", | ||
| 182 | apbc_base + APBC_RTC, 10, 0, &clk_lock); | ||
| 183 | clk_register_clkdev(clk, NULL, "sa1100-rtc"); | ||
| 184 | |||
| 185 | clk = mmp_clk_register_apbc("pwm0", "pll1_48", | ||
| 186 | apbc_base + APBC_PWM0, 10, 0, &clk_lock); | ||
| 187 | clk_register_clkdev(clk, NULL, "pxa168-pwm.0"); | ||
| 188 | |||
| 189 | clk = mmp_clk_register_apbc("pwm1", "pll1_48", | ||
| 190 | apbc_base + APBC_PWM1, 10, 0, &clk_lock); | ||
| 191 | clk_register_clkdev(clk, NULL, "pxa168-pwm.1"); | ||
| 192 | |||
| 193 | clk = mmp_clk_register_apbc("pwm2", "pll1_48", | ||
| 194 | apbc_base + APBC_PWM2, 10, 0, &clk_lock); | ||
| 195 | clk_register_clkdev(clk, NULL, "pxa168-pwm.2"); | ||
| 196 | |||
| 197 | clk = mmp_clk_register_apbc("pwm3", "pll1_48", | ||
| 198 | apbc_base + APBC_PWM3, 10, 0, &clk_lock); | ||
| 199 | clk_register_clkdev(clk, NULL, "pxa168-pwm.3"); | ||
| 200 | |||
| 201 | clk = clk_register_mux(NULL, "uart0_mux", uart_parent, | ||
| 202 | ARRAY_SIZE(uart_parent), CLK_SET_RATE_PARENT, | ||
| 203 | apbc_base + APBC_UART0, 4, 3, 0, &clk_lock); | ||
| 204 | clk_set_parent(clk, uart_pll); | ||
| 205 | clk_register_clkdev(clk, "uart_mux.0", NULL); | ||
| 206 | |||
| 207 | clk = mmp_clk_register_apbc("uart0", "uart0_mux", | ||
| 208 | apbc_base + APBC_UART0, 10, 0, &clk_lock); | ||
| 209 | clk_register_clkdev(clk, NULL, "pxa2xx-uart.0"); | ||
| 210 | |||
| 211 | clk = clk_register_mux(NULL, "uart1_mux", uart_parent, | ||
| 212 | ARRAY_SIZE(uart_parent), CLK_SET_RATE_PARENT, | ||
| 213 | apbc_base + APBC_UART1, 4, 3, 0, &clk_lock); | ||
| 214 | clk_set_parent(clk, uart_pll); | ||
| 215 | clk_register_clkdev(clk, "uart_mux.1", NULL); | ||
| 216 | |||
| 217 | clk = mmp_clk_register_apbc("uart1", "uart1_mux", | ||
| 218 | apbc_base + APBC_UART1, 10, 0, &clk_lock); | ||
| 219 | clk_register_clkdev(clk, NULL, "pxa2xx-uart.1"); | ||
| 220 | |||
| 221 | clk = clk_register_mux(NULL, "uart2_mux", uart_parent, | ||
| 222 | ARRAY_SIZE(uart_parent), CLK_SET_RATE_PARENT, | ||
| 223 | apbc_base + APBC_UART2, 4, 3, 0, &clk_lock); | ||
| 224 | clk_set_parent(clk, uart_pll); | ||
| 225 | clk_register_clkdev(clk, "uart_mux.2", NULL); | ||
| 226 | |||
| 227 | clk = mmp_clk_register_apbc("uart2", "uart2_mux", | ||
| 228 | apbc_base + APBC_UART2, 10, 0, &clk_lock); | ||
| 229 | clk_register_clkdev(clk, NULL, "pxa2xx-uart.2"); | ||
| 230 | |||
| 231 | clk = clk_register_mux(NULL, "ssp0_mux", ssp_parent, | ||
| 232 | ARRAY_SIZE(ssp_parent), CLK_SET_RATE_PARENT, | ||
| 233 | apbc_base + APBC_SSP0, 4, 3, 0, &clk_lock); | ||
| 234 | clk_register_clkdev(clk, "uart_mux.0", NULL); | ||
| 235 | |||
| 236 | clk = mmp_clk_register_apbc("ssp0", "ssp0_mux", apbc_base + APBC_SSP0, | ||
| 237 | 10, 0, &clk_lock); | ||
| 238 | clk_register_clkdev(clk, NULL, "mmp-ssp.0"); | ||
| 239 | |||
| 240 | clk = clk_register_mux(NULL, "ssp1_mux", ssp_parent, | ||
| 241 | ARRAY_SIZE(ssp_parent), CLK_SET_RATE_PARENT, | ||
| 242 | apbc_base + APBC_SSP1, 4, 3, 0, &clk_lock); | ||
| 243 | clk_register_clkdev(clk, "ssp_mux.1", NULL); | ||
| 244 | |||
| 245 | clk = mmp_clk_register_apbc("ssp1", "ssp1_mux", apbc_base + APBC_SSP1, | ||
| 246 | 10, 0, &clk_lock); | ||
| 247 | clk_register_clkdev(clk, NULL, "mmp-ssp.1"); | ||
| 248 | |||
| 249 | clk = clk_register_mux(NULL, "ssp2_mux", ssp_parent, | ||
| 250 | ARRAY_SIZE(ssp_parent), CLK_SET_RATE_PARENT, | ||
| 251 | apbc_base + APBC_SSP2, 4, 3, 0, &clk_lock); | ||
| 252 | clk_register_clkdev(clk, "ssp_mux.2", NULL); | ||
| 253 | |||
| 254 | clk = mmp_clk_register_apbc("ssp2", "ssp1_mux", apbc_base + APBC_SSP2, | ||
| 255 | 10, 0, &clk_lock); | ||
| 256 | clk_register_clkdev(clk, NULL, "mmp-ssp.2"); | ||
| 257 | |||
| 258 | clk = clk_register_mux(NULL, "ssp3_mux", ssp_parent, | ||
| 259 | ARRAY_SIZE(ssp_parent), CLK_SET_RATE_PARENT, | ||
| 260 | apbc_base + APBC_SSP3, 4, 3, 0, &clk_lock); | ||
| 261 | clk_register_clkdev(clk, "ssp_mux.3", NULL); | ||
| 262 | |||
| 263 | clk = mmp_clk_register_apbc("ssp3", "ssp1_mux", apbc_base + APBC_SSP3, | ||
| 264 | 10, 0, &clk_lock); | ||
| 265 | clk_register_clkdev(clk, NULL, "mmp-ssp.3"); | ||
| 266 | |||
| 267 | clk = clk_register_mux(NULL, "ssp4_mux", ssp_parent, | ||
| 268 | ARRAY_SIZE(ssp_parent), CLK_SET_RATE_PARENT, | ||
| 269 | apbc_base + APBC_SSP4, 4, 3, 0, &clk_lock); | ||
| 270 | clk_register_clkdev(clk, "ssp_mux.4", NULL); | ||
| 271 | |||
| 272 | clk = mmp_clk_register_apbc("ssp4", "ssp1_mux", apbc_base + APBC_SSP4, | ||
| 273 | 10, 0, &clk_lock); | ||
| 274 | clk_register_clkdev(clk, NULL, "mmp-ssp.4"); | ||
| 275 | |||
| 276 | clk = mmp_clk_register_apmu("dfc", "pll1_4", apmu_base + APMU_DFC, | ||
| 277 | 0x19b, &clk_lock); | ||
| 278 | clk_register_clkdev(clk, NULL, "pxa3xx-nand.0"); | ||
| 279 | |||
| 280 | clk = clk_register_mux(NULL, "sdh0_mux", sdh_parent, | ||
| 281 | ARRAY_SIZE(sdh_parent), CLK_SET_RATE_PARENT, | ||
| 282 | apmu_base + APMU_SDH0, 6, 1, 0, &clk_lock); | ||
| 283 | clk_register_clkdev(clk, "sdh0_mux", NULL); | ||
| 284 | |||
| 285 | clk = mmp_clk_register_apmu("sdh0", "sdh_mux", apmu_base + APMU_SDH0, | ||
| 286 | 0x1b, &clk_lock); | ||
| 287 | clk_register_clkdev(clk, NULL, "sdhci-pxa.0"); | ||
| 288 | |||
| 289 | clk = clk_register_mux(NULL, "sdh1_mux", sdh_parent, | ||
| 290 | ARRAY_SIZE(sdh_parent), CLK_SET_RATE_PARENT, | ||
| 291 | apmu_base + APMU_SDH1, 6, 1, 0, &clk_lock); | ||
| 292 | clk_register_clkdev(clk, "sdh1_mux", NULL); | ||
| 293 | |||
| 294 | clk = mmp_clk_register_apmu("sdh1", "sdh1_mux", apmu_base + APMU_SDH1, | ||
| 295 | 0x1b, &clk_lock); | ||
| 296 | clk_register_clkdev(clk, NULL, "sdhci-pxa.1"); | ||
| 297 | |||
| 298 | clk = mmp_clk_register_apmu("usb", "usb_pll", apmu_base + APMU_USB, | ||
| 299 | 0x9, &clk_lock); | ||
| 300 | clk_register_clkdev(clk, "usb_clk", NULL); | ||
| 301 | |||
| 302 | clk = mmp_clk_register_apmu("sph", "usb_pll", apmu_base + APMU_USB, | ||
| 303 | 0x12, &clk_lock); | ||
| 304 | clk_register_clkdev(clk, "sph_clk", NULL); | ||
| 305 | |||
| 306 | clk = clk_register_mux(NULL, "disp0_mux", disp_parent, | ||
| 307 | ARRAY_SIZE(disp_parent), CLK_SET_RATE_PARENT, | ||
| 308 | apmu_base + APMU_DISP0, 6, 1, 0, &clk_lock); | ||
| 309 | clk_register_clkdev(clk, "disp_mux.0", NULL); | ||
| 310 | |||
| 311 | clk = mmp_clk_register_apmu("disp0", "disp0_mux", | ||
| 312 | apmu_base + APMU_DISP0, 0x1b, &clk_lock); | ||
| 313 | clk_register_clkdev(clk, "fnclk", "mmp-disp.0"); | ||
| 314 | |||
| 315 | clk = mmp_clk_register_apmu("disp0_hclk", "disp0_mux", | ||
| 316 | apmu_base + APMU_DISP0, 0x24, &clk_lock); | ||
| 317 | clk_register_clkdev(clk, "hclk", "mmp-disp.0"); | ||
| 318 | |||
| 319 | clk = clk_register_mux(NULL, "ccic0_mux", ccic_parent, | ||
| 320 | ARRAY_SIZE(ccic_parent), CLK_SET_RATE_PARENT, | ||
| 321 | apmu_base + APMU_CCIC0, 6, 1, 0, &clk_lock); | ||
| 322 | clk_register_clkdev(clk, "ccic_mux.0", NULL); | ||
| 323 | |||
| 324 | clk = mmp_clk_register_apmu("ccic0", "ccic0_mux", | ||
| 325 | apmu_base + APMU_CCIC0, 0x1b, &clk_lock); | ||
| 326 | clk_register_clkdev(clk, "fnclk", "mmp-ccic.0"); | ||
| 327 | |||
| 328 | clk = clk_register_mux(NULL, "ccic0_phy_mux", ccic_phy_parent, | ||
| 329 | ARRAY_SIZE(ccic_phy_parent), | ||
| 330 | CLK_SET_RATE_PARENT, apmu_base + APMU_CCIC0, | ||
| 331 | 7, 1, 0, &clk_lock); | ||
| 332 | clk_register_clkdev(clk, "ccic_phy_mux.0", NULL); | ||
| 333 | |||
| 334 | clk = mmp_clk_register_apmu("ccic0_phy", "ccic0_phy_mux", | ||
| 335 | apmu_base + APMU_CCIC0, 0x24, &clk_lock); | ||
| 336 | clk_register_clkdev(clk, "phyclk", "mmp-ccic.0"); | ||
| 337 | |||
| 338 | clk = clk_register_divider(NULL, "ccic0_sphy_div", "ccic0_mux", | ||
| 339 | CLK_SET_RATE_PARENT, apmu_base + APMU_CCIC0, | ||
| 340 | 10, 5, 0, &clk_lock); | ||
| 341 | clk_register_clkdev(clk, "sphyclk_div", NULL); | ||
| 342 | |||
| 343 | clk = mmp_clk_register_apmu("ccic0_sphy", "ccic0_sphy_div", | ||
| 344 | apmu_base + APMU_CCIC0, 0x300, &clk_lock); | ||
| 345 | clk_register_clkdev(clk, "sphyclk", "mmp-ccic.0"); | ||
| 346 | } | ||
diff --git a/drivers/clk/mmp/clk-pxa910.c b/drivers/clk/mmp/clk-pxa910.c new file mode 100644 index 000000000000..7048c31d6e7e --- /dev/null +++ b/drivers/clk/mmp/clk-pxa910.c | |||
| @@ -0,0 +1,320 @@ | |||
| 1 | /* | ||
| 2 | * pxa910 clock framework source file | ||
| 3 | * | ||
| 4 | * Copyright (C) 2012 Marvell | ||
| 5 | * Chao Xie <xiechao.mail@gmail.com> | ||
| 6 | * | ||
| 7 | * This file is licensed under the terms of the GNU General Public | ||
| 8 | * License version 2. This program is licensed "as is" without any | ||
| 9 | * warranty of any kind, whether express or implied. | ||
| 10 | */ | ||
| 11 | |||
| 12 | #include <linux/module.h> | ||
| 13 | #include <linux/kernel.h> | ||
| 14 | #include <linux/spinlock.h> | ||
| 15 | #include <linux/io.h> | ||
| 16 | #include <linux/delay.h> | ||
| 17 | #include <linux/err.h> | ||
| 18 | |||
| 19 | #include <mach/addr-map.h> | ||
| 20 | |||
| 21 | #include "clk.h" | ||
| 22 | |||
| 23 | #define APBC_RTC 0x28 | ||
| 24 | #define APBC_TWSI0 0x2c | ||
| 25 | #define APBC_KPC 0x18 | ||
| 26 | #define APBC_UART0 0x0 | ||
| 27 | #define APBC_UART1 0x4 | ||
| 28 | #define APBC_GPIO 0x8 | ||
| 29 | #define APBC_PWM0 0xc | ||
| 30 | #define APBC_PWM1 0x10 | ||
| 31 | #define APBC_PWM2 0x14 | ||
| 32 | #define APBC_PWM3 0x18 | ||
| 33 | #define APBC_SSP0 0x1c | ||
| 34 | #define APBC_SSP1 0x20 | ||
| 35 | #define APBC_SSP2 0x4c | ||
| 36 | #define APBCP_TWSI1 0x28 | ||
| 37 | #define APBCP_UART2 0x1c | ||
| 38 | #define APMU_SDH0 0x54 | ||
| 39 | #define APMU_SDH1 0x58 | ||
| 40 | #define APMU_USB 0x5c | ||
| 41 | #define APMU_DISP0 0x4c | ||
| 42 | #define APMU_CCIC0 0x50 | ||
| 43 | #define APMU_DFC 0x60 | ||
| 44 | #define MPMU_UART_PLL 0x14 | ||
| 45 | |||
| 46 | static DEFINE_SPINLOCK(clk_lock); | ||
| 47 | |||
| 48 | static struct clk_factor_masks uart_factor_masks = { | ||
| 49 | .factor = 2, | ||
| 50 | .num_mask = 0x1fff, | ||
| 51 | .den_mask = 0x1fff, | ||
| 52 | .num_shift = 16, | ||
| 53 | .den_shift = 0, | ||
| 54 | }; | ||
| 55 | |||
| 56 | static struct clk_factor_tbl uart_factor_tbl[] = { | ||
| 57 | {.num = 8125, .den = 1536}, /*14.745MHZ */ | ||
| 58 | }; | ||
| 59 | |||
| 60 | static const char *uart_parent[] = {"pll1_3_16", "uart_pll"}; | ||
| 61 | static const char *ssp_parent[] = {"pll1_96", "pll1_48", "pll1_24", "pll1_12"}; | ||
| 62 | static const char *sdh_parent[] = {"pll1_12", "pll1_13"}; | ||
| 63 | static const char *disp_parent[] = {"pll1_2", "pll1_12"}; | ||
| 64 | static const char *ccic_parent[] = {"pll1_2", "pll1_12"}; | ||
| 65 | static const char *ccic_phy_parent[] = {"pll1_6", "pll1_12"}; | ||
| 66 | |||
| 67 | void __init pxa910_clk_init(void) | ||
| 68 | { | ||
| 69 | struct clk *clk; | ||
| 70 | struct clk *uart_pll; | ||
| 71 | void __iomem *mpmu_base; | ||
| 72 | void __iomem *apmu_base; | ||
| 73 | void __iomem *apbcp_base; | ||
| 74 | void __iomem *apbc_base; | ||
| 75 | |||
| 76 | mpmu_base = ioremap(APB_PHYS_BASE + 0x50000, SZ_4K); | ||
| 77 | if (mpmu_base == NULL) { | ||
| 78 | pr_err("error to ioremap MPMU base\n"); | ||
| 79 | return; | ||
| 80 | } | ||
| 81 | |||
| 82 | apmu_base = ioremap(AXI_PHYS_BASE + 0x82800, SZ_4K); | ||
| 83 | if (apmu_base == NULL) { | ||
| 84 | pr_err("error to ioremap APMU base\n"); | ||
| 85 | return; | ||
| 86 | } | ||
| 87 | |||
| 88 | apbcp_base = ioremap(APB_PHYS_BASE + 0x3b000, SZ_4K); | ||
| 89 | if (apbcp_base == NULL) { | ||
| 90 | pr_err("error to ioremap APBC extension base\n"); | ||
| 91 | return; | ||
| 92 | } | ||
| 93 | |||
| 94 | apbc_base = ioremap(APB_PHYS_BASE + 0x15000, SZ_4K); | ||
| 95 | if (apbc_base == NULL) { | ||
| 96 | pr_err("error to ioremap APBC base\n"); | ||
| 97 | return; | ||
| 98 | } | ||
| 99 | |||
| 100 | clk = clk_register_fixed_rate(NULL, "clk32", NULL, CLK_IS_ROOT, 3200); | ||
| 101 | clk_register_clkdev(clk, "clk32", NULL); | ||
| 102 | |||
| 103 | clk = clk_register_fixed_rate(NULL, "vctcxo", NULL, CLK_IS_ROOT, | ||
| 104 | 26000000); | ||
| 105 | clk_register_clkdev(clk, "vctcxo", NULL); | ||
| 106 | |||
| 107 | clk = clk_register_fixed_rate(NULL, "pll1", NULL, CLK_IS_ROOT, | ||
| 108 | 624000000); | ||
| 109 | clk_register_clkdev(clk, "pll1", NULL); | ||
| 110 | |||
| 111 | clk = clk_register_fixed_factor(NULL, "pll1_2", "pll1", | ||
| 112 | CLK_SET_RATE_PARENT, 1, 2); | ||
| 113 | clk_register_clkdev(clk, "pll1_2", NULL); | ||
| 114 | |||
| 115 | clk = clk_register_fixed_factor(NULL, "pll1_4", "pll1_2", | ||
| 116 | CLK_SET_RATE_PARENT, 1, 2); | ||
| 117 | clk_register_clkdev(clk, "pll1_4", NULL); | ||
| 118 | |||
| 119 | clk = clk_register_fixed_factor(NULL, "pll1_8", "pll1_4", | ||
| 120 | CLK_SET_RATE_PARENT, 1, 2); | ||
| 121 | clk_register_clkdev(clk, "pll1_8", NULL); | ||
| 122 | |||
| 123 | clk = clk_register_fixed_factor(NULL, "pll1_16", "pll1_8", | ||
| 124 | CLK_SET_RATE_PARENT, 1, 2); | ||
| 125 | clk_register_clkdev(clk, "pll1_16", NULL); | ||
| 126 | |||
| 127 | clk = clk_register_fixed_factor(NULL, "pll1_6", "pll1_2", | ||
| 128 | CLK_SET_RATE_PARENT, 1, 3); | ||
| 129 | clk_register_clkdev(clk, "pll1_6", NULL); | ||
| 130 | |||
| 131 | clk = clk_register_fixed_factor(NULL, "pll1_12", "pll1_6", | ||
| 132 | CLK_SET_RATE_PARENT, 1, 2); | ||
| 133 | clk_register_clkdev(clk, "pll1_12", NULL); | ||
| 134 | |||
| 135 | clk = clk_register_fixed_factor(NULL, "pll1_24", "pll1_12", | ||
| 136 | CLK_SET_RATE_PARENT, 1, 2); | ||
| 137 | clk_register_clkdev(clk, "pll1_24", NULL); | ||
| 138 | |||
| 139 | clk = clk_register_fixed_factor(NULL, "pll1_48", "pll1_24", | ||
| 140 | CLK_SET_RATE_PARENT, 1, 2); | ||
| 141 | clk_register_clkdev(clk, "pll1_48", NULL); | ||
| 142 | |||
| 143 | clk = clk_register_fixed_factor(NULL, "pll1_96", "pll1_48", | ||
| 144 | CLK_SET_RATE_PARENT, 1, 2); | ||
| 145 | clk_register_clkdev(clk, "pll1_96", NULL); | ||
| 146 | |||
| 147 | clk = clk_register_fixed_factor(NULL, "pll1_13", "pll1", | ||
| 148 | CLK_SET_RATE_PARENT, 1, 13); | ||
| 149 | clk_register_clkdev(clk, "pll1_13", NULL); | ||
| 150 | |||
| 151 | clk = clk_register_fixed_factor(NULL, "pll1_13_1_5", "pll1", | ||
| 152 | CLK_SET_RATE_PARENT, 2, 3); | ||
| 153 | clk_register_clkdev(clk, "pll1_13_1_5", NULL); | ||
| 154 | |||
| 155 | clk = clk_register_fixed_factor(NULL, "pll1_2_1_5", "pll1", | ||
| 156 | CLK_SET_RATE_PARENT, 2, 3); | ||
| 157 | clk_register_clkdev(clk, "pll1_2_1_5", NULL); | ||
| 158 | |||
| 159 | clk = clk_register_fixed_factor(NULL, "pll1_3_16", "pll1", | ||
| 160 | CLK_SET_RATE_PARENT, 3, 16); | ||
| 161 | clk_register_clkdev(clk, "pll1_3_16", NULL); | ||
| 162 | |||
| 163 | uart_pll = mmp_clk_register_factor("uart_pll", "pll1_4", 0, | ||
| 164 | mpmu_base + MPMU_UART_PLL, | ||
| 165 | &uart_factor_masks, uart_factor_tbl, | ||
| 166 | ARRAY_SIZE(uart_factor_tbl)); | ||
| 167 | clk_set_rate(uart_pll, 14745600); | ||
| 168 | clk_register_clkdev(uart_pll, "uart_pll", NULL); | ||
| 169 | |||
| 170 | clk = mmp_clk_register_apbc("twsi0", "pll1_13_1_5", | ||
| 171 | apbc_base + APBC_TWSI0, 10, 0, &clk_lock); | ||
| 172 | clk_register_clkdev(clk, NULL, "pxa2xx-i2c.0"); | ||
| 173 | |||
| 174 | clk = mmp_clk_register_apbc("twsi1", "pll1_13_1_5", | ||
| 175 | apbcp_base + APBCP_TWSI1, 10, 0, &clk_lock); | ||
| 176 | clk_register_clkdev(clk, NULL, "pxa2xx-i2c.1"); | ||
| 177 | |||
| 178 | clk = mmp_clk_register_apbc("gpio", "vctcxo", | ||
| 179 | apbc_base + APBC_GPIO, 10, 0, &clk_lock); | ||
| 180 | clk_register_clkdev(clk, NULL, "pxa-gpio"); | ||
| 181 | |||
| 182 | clk = mmp_clk_register_apbc("kpc", "clk32", | ||
| 183 | apbc_base + APBC_KPC, 10, 0, &clk_lock); | ||
| 184 | clk_register_clkdev(clk, NULL, "pxa27x-keypad"); | ||
| 185 | |||
| 186 | clk = mmp_clk_register_apbc("rtc", "clk32", | ||
| 187 | apbc_base + APBC_RTC, 10, 0, &clk_lock); | ||
| 188 | clk_register_clkdev(clk, NULL, "sa1100-rtc"); | ||
| 189 | |||
| 190 | clk = mmp_clk_register_apbc("pwm0", "pll1_48", | ||
| 191 | apbc_base + APBC_PWM0, 10, 0, &clk_lock); | ||
| 192 | clk_register_clkdev(clk, NULL, "pxa910-pwm.0"); | ||
| 193 | |||
| 194 | clk = mmp_clk_register_apbc("pwm1", "pll1_48", | ||
| 195 | apbc_base + APBC_PWM1, 10, 0, &clk_lock); | ||
| 196 | clk_register_clkdev(clk, NULL, "pxa910-pwm.1"); | ||
| 197 | |||
| 198 | clk = mmp_clk_register_apbc("pwm2", "pll1_48", | ||
| 199 | apbc_base + APBC_PWM2, 10, 0, &clk_lock); | ||
| 200 | clk_register_clkdev(clk, NULL, "pxa910-pwm.2"); | ||
| 201 | |||
| 202 | clk = mmp_clk_register_apbc("pwm3", "pll1_48", | ||
| 203 | apbc_base + APBC_PWM3, 10, 0, &clk_lock); | ||
| 204 | clk_register_clkdev(clk, NULL, "pxa910-pwm.3"); | ||
| 205 | |||
| 206 | clk = clk_register_mux(NULL, "uart0_mux", uart_parent, | ||
| 207 | ARRAY_SIZE(uart_parent), CLK_SET_RATE_PARENT, | ||
| 208 | apbc_base + APBC_UART0, 4, 3, 0, &clk_lock); | ||
| 209 | clk_set_parent(clk, uart_pll); | ||
| 210 | clk_register_clkdev(clk, "uart_mux.0", NULL); | ||
| 211 | |||
| 212 | clk = mmp_clk_register_apbc("uart0", "uart0_mux", | ||
| 213 | apbc_base + APBC_UART0, 10, 0, &clk_lock); | ||
| 214 | clk_register_clkdev(clk, NULL, "pxa2xx-uart.0"); | ||
| 215 | |||
| 216 | clk = clk_register_mux(NULL, "uart1_mux", uart_parent, | ||
| 217 | ARRAY_SIZE(uart_parent), CLK_SET_RATE_PARENT, | ||
| 218 | apbc_base + APBC_UART1, 4, 3, 0, &clk_lock); | ||
| 219 | clk_set_parent(clk, uart_pll); | ||
| 220 | clk_register_clkdev(clk, "uart_mux.1", NULL); | ||
| 221 | |||
| 222 | clk = mmp_clk_register_apbc("uart1", "uart1_mux", | ||
| 223 | apbc_base + APBC_UART1, 10, 0, &clk_lock); | ||
| 224 | clk_register_clkdev(clk, NULL, "pxa2xx-uart.1"); | ||
| 225 | |||
| 226 | clk = clk_register_mux(NULL, "uart2_mux", uart_parent, | ||
| 227 | ARRAY_SIZE(uart_parent), CLK_SET_RATE_PARENT, | ||
| 228 | apbcp_base + APBCP_UART2, 4, 3, 0, &clk_lock); | ||
| 229 | clk_set_parent(clk, uart_pll); | ||
| 230 | clk_register_clkdev(clk, "uart_mux.2", NULL); | ||
| 231 | |||
| 232 | clk = mmp_clk_register_apbc("uart2", "uart2_mux", | ||
| 233 | apbcp_base + APBCP_UART2, 10, 0, &clk_lock); | ||
| 234 | clk_register_clkdev(clk, NULL, "pxa2xx-uart.2"); | ||
| 235 | |||
| 236 | clk = clk_register_mux(NULL, "ssp0_mux", ssp_parent, | ||
| 237 | ARRAY_SIZE(ssp_parent), CLK_SET_RATE_PARENT, | ||
| 238 | apbc_base + APBC_SSP0, 4, 3, 0, &clk_lock); | ||
| 239 | clk_register_clkdev(clk, "uart_mux.0", NULL); | ||
| 240 | |||
| 241 | clk = mmp_clk_register_apbc("ssp0", "ssp0_mux", | ||
| 242 | apbc_base + APBC_SSP0, 10, 0, &clk_lock); | ||
| 243 | clk_register_clkdev(clk, NULL, "mmp-ssp.0"); | ||
| 244 | |||
| 245 | clk = clk_register_mux(NULL, "ssp1_mux", ssp_parent, | ||
| 246 | ARRAY_SIZE(ssp_parent), CLK_SET_RATE_PARENT, | ||
| 247 | apbc_base + APBC_SSP1, 4, 3, 0, &clk_lock); | ||
| 248 | clk_register_clkdev(clk, "ssp_mux.1", NULL); | ||
| 249 | |||
| 250 | clk = mmp_clk_register_apbc("ssp1", "ssp1_mux", | ||
| 251 | apbc_base + APBC_SSP1, 10, 0, &clk_lock); | ||
| 252 | clk_register_clkdev(clk, NULL, "mmp-ssp.1"); | ||
| 253 | |||
| 254 | clk = mmp_clk_register_apmu("dfc", "pll1_4", | ||
| 255 | apmu_base + APMU_DFC, 0x19b, &clk_lock); | ||
| 256 | clk_register_clkdev(clk, NULL, "pxa3xx-nand.0"); | ||
| 257 | |||
| 258 | clk = clk_register_mux(NULL, "sdh0_mux", sdh_parent, | ||
| 259 | ARRAY_SIZE(sdh_parent), CLK_SET_RATE_PARENT, | ||
| 260 | apmu_base + APMU_SDH0, 6, 1, 0, &clk_lock); | ||
| 261 | clk_register_clkdev(clk, "sdh0_mux", NULL); | ||
| 262 | |||
| 263 | clk = mmp_clk_register_apmu("sdh0", "sdh_mux", | ||
| 264 | apmu_base + APMU_SDH0, 0x1b, &clk_lock); | ||
| 265 | clk_register_clkdev(clk, NULL, "sdhci-pxa.0"); | ||
| 266 | |||
| 267 | clk = clk_register_mux(NULL, "sdh1_mux", sdh_parent, | ||
| 268 | ARRAY_SIZE(sdh_parent), CLK_SET_RATE_PARENT, | ||
| 269 | apmu_base + APMU_SDH1, 6, 1, 0, &clk_lock); | ||
| 270 | clk_register_clkdev(clk, "sdh1_mux", NULL); | ||
| 271 | |||
| 272 | clk = mmp_clk_register_apmu("sdh1", "sdh1_mux", | ||
| 273 | apmu_base + APMU_SDH1, 0x1b, &clk_lock); | ||
| 274 | clk_register_clkdev(clk, NULL, "sdhci-pxa.1"); | ||
| 275 | |||
| 276 | clk = mmp_clk_register_apmu("usb", "usb_pll", | ||
| 277 | apmu_base + APMU_USB, 0x9, &clk_lock); | ||
| 278 | clk_register_clkdev(clk, "usb_clk", NULL); | ||
| 279 | |||
| 280 | clk = mmp_clk_register_apmu("sph", "usb_pll", | ||
| 281 | apmu_base + APMU_USB, 0x12, &clk_lock); | ||
| 282 | clk_register_clkdev(clk, "sph_clk", NULL); | ||
| 283 | |||
| 284 | clk = clk_register_mux(NULL, "disp0_mux", disp_parent, | ||
| 285 | ARRAY_SIZE(disp_parent), CLK_SET_RATE_PARENT, | ||
| 286 | apmu_base + APMU_DISP0, 6, 1, 0, &clk_lock); | ||
| 287 | clk_register_clkdev(clk, "disp_mux.0", NULL); | ||
| 288 | |||
| 289 | clk = mmp_clk_register_apmu("disp0", "disp0_mux", | ||
| 290 | apmu_base + APMU_DISP0, 0x1b, &clk_lock); | ||
| 291 | clk_register_clkdev(clk, NULL, "mmp-disp.0"); | ||
| 292 | |||
| 293 | clk = clk_register_mux(NULL, "ccic0_mux", ccic_parent, | ||
| 294 | ARRAY_SIZE(ccic_parent), CLK_SET_RATE_PARENT, | ||
| 295 | apmu_base + APMU_CCIC0, 6, 1, 0, &clk_lock); | ||
| 296 | clk_register_clkdev(clk, "ccic_mux.0", NULL); | ||
| 297 | |||
| 298 | clk = mmp_clk_register_apmu("ccic0", "ccic0_mux", | ||
| 299 | apmu_base + APMU_CCIC0, 0x1b, &clk_lock); | ||
| 300 | clk_register_clkdev(clk, "fnclk", "mmp-ccic.0"); | ||
| 301 | |||
| 302 | clk = clk_register_mux(NULL, "ccic0_phy_mux", ccic_phy_parent, | ||
| 303 | ARRAY_SIZE(ccic_phy_parent), | ||
| 304 | CLK_SET_RATE_PARENT, apmu_base + APMU_CCIC0, | ||
| 305 | 7, 1, 0, &clk_lock); | ||
| 306 | clk_register_clkdev(clk, "ccic_phy_mux.0", NULL); | ||
| 307 | |||
| 308 | clk = mmp_clk_register_apmu("ccic0_phy", "ccic0_phy_mux", | ||
| 309 | apmu_base + APMU_CCIC0, 0x24, &clk_lock); | ||
| 310 | clk_register_clkdev(clk, "phyclk", "mmp-ccic.0"); | ||
| 311 | |||
| 312 | clk = clk_register_divider(NULL, "ccic0_sphy_div", "ccic0_mux", | ||
| 313 | CLK_SET_RATE_PARENT, apmu_base + APMU_CCIC0, | ||
| 314 | 10, 5, 0, &clk_lock); | ||
| 315 | clk_register_clkdev(clk, "sphyclk_div", NULL); | ||
| 316 | |||
| 317 | clk = mmp_clk_register_apmu("ccic0_sphy", "ccic0_sphy_div", | ||
| 318 | apmu_base + APMU_CCIC0, 0x300, &clk_lock); | ||
| 319 | clk_register_clkdev(clk, "sphyclk", "mmp-ccic.0"); | ||
| 320 | } | ||
diff --git a/drivers/clk/mmp/clk.h b/drivers/clk/mmp/clk.h new file mode 100644 index 000000000000..ab86dd4a416a --- /dev/null +++ b/drivers/clk/mmp/clk.h | |||
| @@ -0,0 +1,35 @@ | |||
| 1 | #ifndef __MACH_MMP_CLK_H | ||
| 2 | #define __MACH_MMP_CLK_H | ||
| 3 | |||
| 4 | #include <linux/clk-provider.h> | ||
| 5 | #include <linux/clkdev.h> | ||
| 6 | |||
| 7 | #define APBC_NO_BUS_CTRL BIT(0) | ||
| 8 | #define APBC_POWER_CTRL BIT(1) | ||
| 9 | |||
| 10 | struct clk_factor_masks { | ||
| 11 | unsigned int factor; | ||
| 12 | unsigned int num_mask; | ||
| 13 | unsigned int den_mask; | ||
| 14 | unsigned int num_shift; | ||
| 15 | unsigned int den_shift; | ||
| 16 | }; | ||
| 17 | |||
| 18 | struct clk_factor_tbl { | ||
| 19 | unsigned int num; | ||
| 20 | unsigned int den; | ||
| 21 | }; | ||
| 22 | |||
| 23 | extern struct clk *mmp_clk_register_pll2(const char *name, | ||
| 24 | const char *parent_name, unsigned long flags); | ||
| 25 | extern struct clk *mmp_clk_register_apbc(const char *name, | ||
| 26 | const char *parent_name, void __iomem *base, | ||
| 27 | unsigned int delay, unsigned int apbc_flags, spinlock_t *lock); | ||
| 28 | extern struct clk *mmp_clk_register_apmu(const char *name, | ||
| 29 | const char *parent_name, void __iomem *base, u32 enable_mask, | ||
| 30 | spinlock_t *lock); | ||
| 31 | extern struct clk *mmp_clk_register_factor(const char *name, | ||
| 32 | const char *parent_name, unsigned long flags, | ||
| 33 | void __iomem *base, struct clk_factor_masks *masks, | ||
| 34 | struct clk_factor_tbl *ftbl, unsigned int ftbl_cnt); | ||
| 35 | #endif | ||
diff --git a/drivers/clk/mxs/clk-imx23.c b/drivers/clk/mxs/clk-imx23.c index 844043ad0fe4..9f6d15546cbe 100644 --- a/drivers/clk/mxs/clk-imx23.c +++ b/drivers/clk/mxs/clk-imx23.c | |||
| @@ -14,6 +14,7 @@ | |||
| 14 | #include <linux/err.h> | 14 | #include <linux/err.h> |
| 15 | #include <linux/init.h> | 15 | #include <linux/init.h> |
| 16 | #include <linux/io.h> | 16 | #include <linux/io.h> |
| 17 | #include <linux/of.h> | ||
| 17 | #include <mach/common.h> | 18 | #include <mach/common.h> |
| 18 | #include <mach/mx23.h> | 19 | #include <mach/mx23.h> |
| 19 | #include "clk.h" | 20 | #include "clk.h" |
| @@ -71,44 +72,6 @@ static void __init clk_misc_init(void) | |||
| 71 | __mxs_setl(30 << BP_FRAC_IOFRAC, FRAC); | 72 | __mxs_setl(30 << BP_FRAC_IOFRAC, FRAC); |
| 72 | } | 73 | } |
| 73 | 74 | ||
| 74 | static struct clk_lookup uart_lookups[] = { | ||
| 75 | { .dev_id = "duart", }, | ||
| 76 | { .dev_id = "mxs-auart.0", }, | ||
| 77 | { .dev_id = "mxs-auart.1", }, | ||
| 78 | { .dev_id = "8006c000.serial", }, | ||
| 79 | { .dev_id = "8006e000.serial", }, | ||
| 80 | { .dev_id = "80070000.serial", }, | ||
| 81 | }; | ||
| 82 | |||
| 83 | static struct clk_lookup hbus_lookups[] = { | ||
| 84 | { .dev_id = "imx23-dma-apbh", }, | ||
| 85 | { .dev_id = "80004000.dma-apbh", }, | ||
| 86 | }; | ||
| 87 | |||
| 88 | static struct clk_lookup xbus_lookups[] = { | ||
| 89 | { .dev_id = "duart", .con_id = "apb_pclk"}, | ||
| 90 | { .dev_id = "80070000.serial", .con_id = "apb_pclk"}, | ||
| 91 | { .dev_id = "imx23-dma-apbx", }, | ||
| 92 | { .dev_id = "80024000.dma-apbx", }, | ||
| 93 | }; | ||
| 94 | |||
| 95 | static struct clk_lookup ssp_lookups[] = { | ||
| 96 | { .dev_id = "imx23-mmc.0", }, | ||
| 97 | { .dev_id = "imx23-mmc.1", }, | ||
| 98 | { .dev_id = "80010000.ssp", }, | ||
| 99 | { .dev_id = "80034000.ssp", }, | ||
| 100 | }; | ||
| 101 | |||
| 102 | static struct clk_lookup lcdif_lookups[] = { | ||
| 103 | { .dev_id = "imx23-fb", }, | ||
| 104 | { .dev_id = "80030000.lcdif", }, | ||
| 105 | }; | ||
| 106 | |||
| 107 | static struct clk_lookup gpmi_lookups[] = { | ||
| 108 | { .dev_id = "imx23-gpmi-nand", }, | ||
| 109 | { .dev_id = "8000c000.gpmi-nand", }, | ||
| 110 | }; | ||
| 111 | |||
| 112 | static const char *sel_pll[] __initconst = { "pll", "ref_xtal", }; | 75 | static const char *sel_pll[] __initconst = { "pll", "ref_xtal", }; |
| 113 | static const char *sel_cpu[] __initconst = { "ref_cpu", "ref_xtal", }; | 76 | static const char *sel_cpu[] __initconst = { "ref_cpu", "ref_xtal", }; |
| 114 | static const char *sel_pix[] __initconst = { "ref_pix", "ref_xtal", }; | 77 | static const char *sel_pix[] __initconst = { "ref_pix", "ref_xtal", }; |
| @@ -127,6 +90,7 @@ enum imx23_clk { | |||
| 127 | }; | 90 | }; |
| 128 | 91 | ||
| 129 | static struct clk *clks[clk_max]; | 92 | static struct clk *clks[clk_max]; |
| 93 | static struct clk_onecell_data clk_data; | ||
| 130 | 94 | ||
| 131 | static enum imx23_clk clks_init_on[] __initdata = { | 95 | static enum imx23_clk clks_init_on[] __initdata = { |
| 132 | cpu, hbus, xbus, emi, uart, | 96 | cpu, hbus, xbus, emi, uart, |
| @@ -134,6 +98,7 @@ static enum imx23_clk clks_init_on[] __initdata = { | |||
| 134 | 98 | ||
| 135 | int __init mx23_clocks_init(void) | 99 | int __init mx23_clocks_init(void) |
| 136 | { | 100 | { |
| 101 | struct device_node *np; | ||
| 137 | int i; | 102 | int i; |
| 138 | 103 | ||
| 139 | clk_misc_init(); | 104 | clk_misc_init(); |
| @@ -188,14 +153,14 @@ int __init mx23_clocks_init(void) | |||
| 188 | return PTR_ERR(clks[i]); | 153 | return PTR_ERR(clks[i]); |
| 189 | } | 154 | } |
| 190 | 155 | ||
| 156 | np = of_find_compatible_node(NULL, NULL, "fsl,imx23-clkctrl"); | ||
| 157 | if (np) { | ||
| 158 | clk_data.clks = clks; | ||
| 159 | clk_data.clk_num = ARRAY_SIZE(clks); | ||
| 160 | of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data); | ||
| 161 | } | ||
| 162 | |||
| 191 | clk_register_clkdev(clks[clk32k], NULL, "timrot"); | 163 | clk_register_clkdev(clks[clk32k], NULL, "timrot"); |
| 192 | clk_register_clkdev(clks[pwm], NULL, "80064000.pwm"); | ||
| 193 | clk_register_clkdevs(clks[hbus], hbus_lookups, ARRAY_SIZE(hbus_lookups)); | ||
| 194 | clk_register_clkdevs(clks[xbus], xbus_lookups, ARRAY_SIZE(xbus_lookups)); | ||
| 195 | clk_register_clkdevs(clks[uart], uart_lookups, ARRAY_SIZE(uart_lookups)); | ||
| 196 | clk_register_clkdevs(clks[ssp], ssp_lookups, ARRAY_SIZE(ssp_lookups)); | ||
| 197 | clk_register_clkdevs(clks[gpmi], gpmi_lookups, ARRAY_SIZE(gpmi_lookups)); | ||
| 198 | clk_register_clkdevs(clks[lcdif], lcdif_lookups, ARRAY_SIZE(lcdif_lookups)); | ||
| 199 | 164 | ||
| 200 | for (i = 0; i < ARRAY_SIZE(clks_init_on); i++) | 165 | for (i = 0; i < ARRAY_SIZE(clks_init_on); i++) |
| 201 | clk_prepare_enable(clks[clks_init_on[i]]); | 166 | clk_prepare_enable(clks[clks_init_on[i]]); |
diff --git a/drivers/clk/mxs/clk-imx28.c b/drivers/clk/mxs/clk-imx28.c index e3aab67b3eb7..613e76f3758e 100644 --- a/drivers/clk/mxs/clk-imx28.c +++ b/drivers/clk/mxs/clk-imx28.c | |||
| @@ -14,6 +14,7 @@ | |||
| 14 | #include <linux/err.h> | 14 | #include <linux/err.h> |
| 15 | #include <linux/init.h> | 15 | #include <linux/init.h> |
| 16 | #include <linux/io.h> | 16 | #include <linux/io.h> |
| 17 | #include <linux/of.h> | ||
| 17 | #include <mach/common.h> | 18 | #include <mach/common.h> |
| 18 | #include <mach/mx28.h> | 19 | #include <mach/mx28.h> |
| 19 | #include "clk.h" | 20 | #include "clk.h" |
| @@ -120,90 +121,6 @@ static void __init clk_misc_init(void) | |||
| 120 | writel_relaxed(val, FRAC0); | 121 | writel_relaxed(val, FRAC0); |
| 121 | } | 122 | } |
| 122 | 123 | ||
| 123 | static struct clk_lookup uart_lookups[] = { | ||
| 124 | { .dev_id = "duart", }, | ||
| 125 | { .dev_id = "mxs-auart.0", }, | ||
| 126 | { .dev_id = "mxs-auart.1", }, | ||
| 127 | { .dev_id = "mxs-auart.2", }, | ||
| 128 | { .dev_id = "mxs-auart.3", }, | ||
| 129 | { .dev_id = "mxs-auart.4", }, | ||
| 130 | { .dev_id = "8006a000.serial", }, | ||
| 131 | { .dev_id = "8006c000.serial", }, | ||
| 132 | { .dev_id = "8006e000.serial", }, | ||
| 133 | { .dev_id = "80070000.serial", }, | ||
| 134 | { .dev_id = "80072000.serial", }, | ||
| 135 | { .dev_id = "80074000.serial", }, | ||
| 136 | }; | ||
| 137 | |||
| 138 | static struct clk_lookup hbus_lookups[] = { | ||
| 139 | { .dev_id = "imx28-dma-apbh", }, | ||
| 140 | { .dev_id = "80004000.dma-apbh", }, | ||
| 141 | }; | ||
| 142 | |||
| 143 | static struct clk_lookup xbus_lookups[] = { | ||
| 144 | { .dev_id = "duart", .con_id = "apb_pclk"}, | ||
| 145 | { .dev_id = "80074000.serial", .con_id = "apb_pclk"}, | ||
| 146 | { .dev_id = "imx28-dma-apbx", }, | ||
| 147 | { .dev_id = "80024000.dma-apbx", }, | ||
| 148 | }; | ||
| 149 | |||
| 150 | static struct clk_lookup ssp0_lookups[] = { | ||
| 151 | { .dev_id = "imx28-mmc.0", }, | ||
| 152 | { .dev_id = "80010000.ssp", }, | ||
| 153 | }; | ||
| 154 | |||
| 155 | static struct clk_lookup ssp1_lookups[] = { | ||
| 156 | { .dev_id = "imx28-mmc.1", }, | ||
| 157 | { .dev_id = "80012000.ssp", }, | ||
| 158 | }; | ||
| 159 | |||
| 160 | static struct clk_lookup ssp2_lookups[] = { | ||
| 161 | { .dev_id = "imx28-mmc.2", }, | ||
| 162 | { .dev_id = "80014000.ssp", }, | ||
| 163 | }; | ||
| 164 | |||
| 165 | static struct clk_lookup ssp3_lookups[] = { | ||
| 166 | { .dev_id = "imx28-mmc.3", }, | ||
| 167 | { .dev_id = "80016000.ssp", }, | ||
| 168 | }; | ||
| 169 | |||
| 170 | static struct clk_lookup lcdif_lookups[] = { | ||
| 171 | { .dev_id = "imx28-fb", }, | ||
| 172 | { .dev_id = "80030000.lcdif", }, | ||
| 173 | }; | ||
| 174 | |||
| 175 | static struct clk_lookup gpmi_lookups[] = { | ||
| 176 | { .dev_id = "imx28-gpmi-nand", }, | ||
| 177 | { .dev_id = "8000c000.gpmi-nand", }, | ||
| 178 | }; | ||
| 179 | |||
| 180 | static struct clk_lookup fec_lookups[] = { | ||
| 181 | { .dev_id = "imx28-fec.0", }, | ||
| 182 | { .dev_id = "imx28-fec.1", }, | ||
| 183 | { .dev_id = "800f0000.ethernet", }, | ||
| 184 | { .dev_id = "800f4000.ethernet", }, | ||
| 185 | }; | ||
| 186 | |||
| 187 | static struct clk_lookup can0_lookups[] = { | ||
| 188 | { .dev_id = "flexcan.0", }, | ||
| 189 | { .dev_id = "80032000.can", }, | ||
| 190 | }; | ||
| 191 | |||
| 192 | static struct clk_lookup can1_lookups[] = { | ||
| 193 | { .dev_id = "flexcan.1", }, | ||
| 194 | { .dev_id = "80034000.can", }, | ||
| 195 | }; | ||
| 196 | |||
| 197 | static struct clk_lookup saif0_lookups[] = { | ||
| 198 | { .dev_id = "mxs-saif.0", }, | ||
| 199 | { .dev_id = "80042000.saif", }, | ||
| 200 | }; | ||
| 201 | |||
| 202 | static struct clk_lookup saif1_lookups[] = { | ||
| 203 | { .dev_id = "mxs-saif.1", }, | ||
| 204 | { .dev_id = "80046000.saif", }, | ||
| 205 | }; | ||
| 206 | |||
| 207 | static const char *sel_cpu[] __initconst = { "ref_cpu", "ref_xtal", }; | 124 | static const char *sel_cpu[] __initconst = { "ref_cpu", "ref_xtal", }; |
| 208 | static const char *sel_io0[] __initconst = { "ref_io0", "ref_xtal", }; | 125 | static const char *sel_io0[] __initconst = { "ref_io0", "ref_xtal", }; |
| 209 | static const char *sel_io1[] __initconst = { "ref_io1", "ref_xtal", }; | 126 | static const char *sel_io1[] __initconst = { "ref_io1", "ref_xtal", }; |
| @@ -228,6 +145,7 @@ enum imx28_clk { | |||
| 228 | }; | 145 | }; |
| 229 | 146 | ||
| 230 | static struct clk *clks[clk_max]; | 147 | static struct clk *clks[clk_max]; |
| 148 | static struct clk_onecell_data clk_data; | ||
| 231 | 149 | ||
| 232 | static enum imx28_clk clks_init_on[] __initdata = { | 150 | static enum imx28_clk clks_init_on[] __initdata = { |
| 233 | cpu, hbus, xbus, emi, uart, | 151 | cpu, hbus, xbus, emi, uart, |
| @@ -235,6 +153,7 @@ static enum imx28_clk clks_init_on[] __initdata = { | |||
| 235 | 153 | ||
| 236 | int __init mx28_clocks_init(void) | 154 | int __init mx28_clocks_init(void) |
| 237 | { | 155 | { |
| 156 | struct device_node *np; | ||
| 238 | int i; | 157 | int i; |
| 239 | 158 | ||
| 240 | clk_misc_init(); | 159 | clk_misc_init(); |
| @@ -312,27 +231,15 @@ int __init mx28_clocks_init(void) | |||
| 312 | return PTR_ERR(clks[i]); | 231 | return PTR_ERR(clks[i]); |
| 313 | } | 232 | } |
| 314 | 233 | ||
| 234 | np = of_find_compatible_node(NULL, NULL, "fsl,imx28-clkctrl"); | ||
| 235 | if (np) { | ||
| 236 | clk_data.clks = clks; | ||
| 237 | clk_data.clk_num = ARRAY_SIZE(clks); | ||
| 238 | of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data); | ||
| 239 | } | ||
| 240 | |||
| 315 | clk_register_clkdev(clks[clk32k], NULL, "timrot"); | 241 | clk_register_clkdev(clks[clk32k], NULL, "timrot"); |
| 316 | clk_register_clkdev(clks[enet_out], NULL, "enet_out"); | 242 | clk_register_clkdev(clks[enet_out], NULL, "enet_out"); |
| 317 | clk_register_clkdev(clks[pwm], NULL, "80064000.pwm"); | ||
| 318 | clk_register_clkdevs(clks[hbus], hbus_lookups, ARRAY_SIZE(hbus_lookups)); | ||
| 319 | clk_register_clkdevs(clks[xbus], xbus_lookups, ARRAY_SIZE(xbus_lookups)); | ||
| 320 | clk_register_clkdevs(clks[uart], uart_lookups, ARRAY_SIZE(uart_lookups)); | ||
| 321 | clk_register_clkdevs(clks[ssp0], ssp0_lookups, ARRAY_SIZE(ssp0_lookups)); | ||
| 322 | clk_register_clkdevs(clks[ssp1], ssp1_lookups, ARRAY_SIZE(ssp1_lookups)); | ||
| 323 | clk_register_clkdevs(clks[ssp2], ssp2_lookups, ARRAY_SIZE(ssp2_lookups)); | ||
| 324 | clk_register_clkdevs(clks[ssp3], ssp3_lookups, ARRAY_SIZE(ssp3_lookups)); | ||
| 325 | clk_register_clkdevs(clks[gpmi], gpmi_lookups, ARRAY_SIZE(gpmi_lookups)); | ||
| 326 | clk_register_clkdevs(clks[saif0], saif0_lookups, ARRAY_SIZE(saif0_lookups)); | ||
| 327 | clk_register_clkdevs(clks[saif1], saif1_lookups, ARRAY_SIZE(saif1_lookups)); | ||
| 328 | clk_register_clkdevs(clks[lcdif], lcdif_lookups, ARRAY_SIZE(lcdif_lookups)); | ||
| 329 | clk_register_clkdevs(clks[fec], fec_lookups, ARRAY_SIZE(fec_lookups)); | ||
| 330 | clk_register_clkdevs(clks[can0], can0_lookups, ARRAY_SIZE(can0_lookups)); | ||
| 331 | clk_register_clkdevs(clks[can1], can1_lookups, ARRAY_SIZE(can1_lookups)); | ||
| 332 | clk_register_clkdev(clks[usb0_pwr], NULL, "8007c000.usbphy"); | ||
| 333 | clk_register_clkdev(clks[usb1_pwr], NULL, "8007e000.usbphy"); | ||
| 334 | clk_register_clkdev(clks[usb0], NULL, "80080000.usb"); | ||
| 335 | clk_register_clkdev(clks[usb1], NULL, "80090000.usb"); | ||
| 336 | 243 | ||
| 337 | for (i = 0; i < ARRAY_SIZE(clks_init_on); i++) | 244 | for (i = 0; i < ARRAY_SIZE(clks_init_on); i++) |
| 338 | clk_prepare_enable(clks[clks_init_on[i]]); | 245 | clk_prepare_enable(clks[clks_init_on[i]]); |
diff --git a/drivers/clk/ux500/Makefile b/drivers/clk/ux500/Makefile new file mode 100644 index 000000000000..858fbfe66281 --- /dev/null +++ b/drivers/clk/ux500/Makefile | |||
| @@ -0,0 +1,12 @@ | |||
| 1 | # | ||
| 2 | # Makefile for ux500 clocks | ||
| 3 | # | ||
| 4 | |||
| 5 | # Clock types | ||
| 6 | obj-y += clk-prcc.o | ||
| 7 | obj-y += clk-prcmu.o | ||
| 8 | |||
| 9 | # Clock definitions | ||
| 10 | obj-y += u8500_clk.o | ||
| 11 | obj-y += u9540_clk.o | ||
| 12 | obj-y += u8540_clk.o | ||
diff --git a/drivers/clk/ux500/clk-prcc.c b/drivers/clk/ux500/clk-prcc.c new file mode 100644 index 000000000000..7eee7f768355 --- /dev/null +++ b/drivers/clk/ux500/clk-prcc.c | |||
| @@ -0,0 +1,164 @@ | |||
| 1 | /* | ||
| 2 | * PRCC clock implementation for ux500 platform. | ||
| 3 | * | ||
| 4 | * Copyright (C) 2012 ST-Ericsson SA | ||
| 5 | * Author: Ulf Hansson <ulf.hansson@linaro.org> | ||
| 6 | * | ||
| 7 | * License terms: GNU General Public License (GPL) version 2 | ||
| 8 | */ | ||
| 9 | |||
| 10 | #include <linux/clk-provider.h> | ||
| 11 | #include <linux/clk-private.h> | ||
| 12 | #include <linux/slab.h> | ||
| 13 | #include <linux/io.h> | ||
| 14 | #include <linux/err.h> | ||
| 15 | #include <linux/types.h> | ||
| 16 | #include <mach/hardware.h> | ||
| 17 | |||
| 18 | #include "clk.h" | ||
| 19 | |||
| 20 | #define PRCC_PCKEN 0x000 | ||
| 21 | #define PRCC_PCKDIS 0x004 | ||
| 22 | #define PRCC_KCKEN 0x008 | ||
| 23 | #define PRCC_KCKDIS 0x00C | ||
| 24 | #define PRCC_PCKSR 0x010 | ||
| 25 | #define PRCC_KCKSR 0x014 | ||
| 26 | |||
| 27 | #define to_clk_prcc(_hw) container_of(_hw, struct clk_prcc, hw) | ||
| 28 | |||
| 29 | struct clk_prcc { | ||
| 30 | struct clk_hw hw; | ||
| 31 | void __iomem *base; | ||
| 32 | u32 cg_sel; | ||
| 33 | int is_enabled; | ||
| 34 | }; | ||
| 35 | |||
| 36 | /* PRCC clock operations. */ | ||
| 37 | |||
| 38 | static int clk_prcc_pclk_enable(struct clk_hw *hw) | ||
| 39 | { | ||
| 40 | struct clk_prcc *clk = to_clk_prcc(hw); | ||
| 41 | |||
| 42 | writel(clk->cg_sel, (clk->base + PRCC_PCKEN)); | ||
| 43 | while (!(readl(clk->base + PRCC_PCKSR) & clk->cg_sel)) | ||
| 44 | cpu_relax(); | ||
| 45 | |||
| 46 | clk->is_enabled = 1; | ||
| 47 | return 0; | ||
| 48 | } | ||
| 49 | |||
| 50 | static void clk_prcc_pclk_disable(struct clk_hw *hw) | ||
| 51 | { | ||
| 52 | struct clk_prcc *clk = to_clk_prcc(hw); | ||
| 53 | |||
| 54 | writel(clk->cg_sel, (clk->base + PRCC_PCKDIS)); | ||
| 55 | clk->is_enabled = 0; | ||
| 56 | } | ||
| 57 | |||
| 58 | static int clk_prcc_kclk_enable(struct clk_hw *hw) | ||
| 59 | { | ||
| 60 | struct clk_prcc *clk = to_clk_prcc(hw); | ||
| 61 | |||
| 62 | writel(clk->cg_sel, (clk->base + PRCC_KCKEN)); | ||
| 63 | while (!(readl(clk->base + PRCC_KCKSR) & clk->cg_sel)) | ||
| 64 | cpu_relax(); | ||
| 65 | |||
| 66 | clk->is_enabled = 1; | ||
| 67 | return 0; | ||
| 68 | } | ||
| 69 | |||
| 70 | static void clk_prcc_kclk_disable(struct clk_hw *hw) | ||
| 71 | { | ||
| 72 | struct clk_prcc *clk = to_clk_prcc(hw); | ||
| 73 | |||
| 74 | writel(clk->cg_sel, (clk->base + PRCC_KCKDIS)); | ||
| 75 | clk->is_enabled = 0; | ||
| 76 | } | ||
| 77 | |||
| 78 | static int clk_prcc_is_enabled(struct clk_hw *hw) | ||
| 79 | { | ||
| 80 | struct clk_prcc *clk = to_clk_prcc(hw); | ||
| 81 | return clk->is_enabled; | ||
| 82 | } | ||
| 83 | |||
| 84 | static struct clk_ops clk_prcc_pclk_ops = { | ||
| 85 | .enable = clk_prcc_pclk_enable, | ||
| 86 | .disable = clk_prcc_pclk_disable, | ||
| 87 | .is_enabled = clk_prcc_is_enabled, | ||
| 88 | }; | ||
| 89 | |||
| 90 | static struct clk_ops clk_prcc_kclk_ops = { | ||
| 91 | .enable = clk_prcc_kclk_enable, | ||
| 92 | .disable = clk_prcc_kclk_disable, | ||
| 93 | .is_enabled = clk_prcc_is_enabled, | ||
| 94 | }; | ||
| 95 | |||
| 96 | static struct clk *clk_reg_prcc(const char *name, | ||
| 97 | const char *parent_name, | ||
| 98 | resource_size_t phy_base, | ||
| 99 | u32 cg_sel, | ||
| 100 | unsigned long flags, | ||
| 101 | struct clk_ops *clk_prcc_ops) | ||
| 102 | { | ||
| 103 | struct clk_prcc *clk; | ||
| 104 | struct clk_init_data clk_prcc_init; | ||
| 105 | struct clk *clk_reg; | ||
| 106 | |||
| 107 | if (!name) { | ||
| 108 | pr_err("clk_prcc: %s invalid arguments passed\n", __func__); | ||
| 109 | return ERR_PTR(-EINVAL); | ||
| 110 | } | ||
| 111 | |||
| 112 | clk = kzalloc(sizeof(struct clk_prcc), GFP_KERNEL); | ||
| 113 | if (!clk) { | ||
| 114 | pr_err("clk_prcc: %s could not allocate clk\n", __func__); | ||
| 115 | return ERR_PTR(-ENOMEM); | ||
| 116 | } | ||
| 117 | |||
| 118 | clk->base = ioremap(phy_base, SZ_4K); | ||
| 119 | if (!clk->base) | ||
| 120 | goto free_clk; | ||
| 121 | |||
| 122 | clk->cg_sel = cg_sel; | ||
| 123 | clk->is_enabled = 1; | ||
| 124 | |||
| 125 | clk_prcc_init.name = name; | ||
| 126 | clk_prcc_init.ops = clk_prcc_ops; | ||
| 127 | clk_prcc_init.flags = flags; | ||
| 128 | clk_prcc_init.parent_names = (parent_name ? &parent_name : NULL); | ||
| 129 | clk_prcc_init.num_parents = (parent_name ? 1 : 0); | ||
| 130 | clk->hw.init = &clk_prcc_init; | ||
| 131 | |||
| 132 | clk_reg = clk_register(NULL, &clk->hw); | ||
| 133 | if (IS_ERR_OR_NULL(clk_reg)) | ||
| 134 | goto unmap_clk; | ||
| 135 | |||
| 136 | return clk_reg; | ||
| 137 | |||
| 138 | unmap_clk: | ||
| 139 | iounmap(clk->base); | ||
| 140 | free_clk: | ||
| 141 | kfree(clk); | ||
| 142 | pr_err("clk_prcc: %s failed to register clk\n", __func__); | ||
| 143 | return ERR_PTR(-ENOMEM); | ||
| 144 | } | ||
| 145 | |||
| 146 | struct clk *clk_reg_prcc_pclk(const char *name, | ||
| 147 | const char *parent_name, | ||
| 148 | resource_size_t phy_base, | ||
| 149 | u32 cg_sel, | ||
| 150 | unsigned long flags) | ||
| 151 | { | ||
| 152 | return clk_reg_prcc(name, parent_name, phy_base, cg_sel, flags, | ||
| 153 | &clk_prcc_pclk_ops); | ||
| 154 | } | ||
| 155 | |||
| 156 | struct clk *clk_reg_prcc_kclk(const char *name, | ||
| 157 | const char *parent_name, | ||
| 158 | resource_size_t phy_base, | ||
| 159 | u32 cg_sel, | ||
| 160 | unsigned long flags) | ||
| 161 | { | ||
| 162 | return clk_reg_prcc(name, parent_name, phy_base, cg_sel, flags, | ||
| 163 | &clk_prcc_kclk_ops); | ||
| 164 | } | ||
diff --git a/drivers/clk/ux500/clk-prcmu.c b/drivers/clk/ux500/clk-prcmu.c new file mode 100644 index 000000000000..930cdfeb47ab --- /dev/null +++ b/drivers/clk/ux500/clk-prcmu.c | |||
| @@ -0,0 +1,252 @@ | |||
| 1 | /* | ||
| 2 | * PRCMU clock implementation for ux500 platform. | ||
| 3 | * | ||
| 4 | * Copyright (C) 2012 ST-Ericsson SA | ||
| 5 | * Author: Ulf Hansson <ulf.hansson@linaro.org> | ||
| 6 | * | ||
| 7 | * License terms: GNU General Public License (GPL) version 2 | ||
| 8 | */ | ||
| 9 | |||
| 10 | #include <linux/clk-provider.h> | ||
| 11 | #include <linux/clk-private.h> | ||
| 12 | #include <linux/mfd/dbx500-prcmu.h> | ||
| 13 | #include <linux/slab.h> | ||
| 14 | #include <linux/io.h> | ||
| 15 | #include <linux/err.h> | ||
| 16 | #include "clk.h" | ||
| 17 | |||
| 18 | #define to_clk_prcmu(_hw) container_of(_hw, struct clk_prcmu, hw) | ||
| 19 | |||
| 20 | struct clk_prcmu { | ||
| 21 | struct clk_hw hw; | ||
| 22 | u8 cg_sel; | ||
| 23 | int is_enabled; | ||
| 24 | }; | ||
| 25 | |||
| 26 | /* PRCMU clock operations. */ | ||
| 27 | |||
| 28 | static int clk_prcmu_prepare(struct clk_hw *hw) | ||
| 29 | { | ||
| 30 | struct clk_prcmu *clk = to_clk_prcmu(hw); | ||
| 31 | return prcmu_request_clock(clk->cg_sel, true); | ||
| 32 | } | ||
| 33 | |||
| 34 | static void clk_prcmu_unprepare(struct clk_hw *hw) | ||
| 35 | { | ||
| 36 | struct clk_prcmu *clk = to_clk_prcmu(hw); | ||
| 37 | if (prcmu_request_clock(clk->cg_sel, false)) | ||
| 38 | pr_err("clk_prcmu: %s failed to disable %s.\n", __func__, | ||
| 39 | hw->init->name); | ||
| 40 | } | ||
| 41 | |||
| 42 | static int clk_prcmu_enable(struct clk_hw *hw) | ||
| 43 | { | ||
| 44 | struct clk_prcmu *clk = to_clk_prcmu(hw); | ||
| 45 | clk->is_enabled = 1; | ||
| 46 | return 0; | ||
| 47 | } | ||
| 48 | |||
| 49 | static void clk_prcmu_disable(struct clk_hw *hw) | ||
| 50 | { | ||
| 51 | struct clk_prcmu *clk = to_clk_prcmu(hw); | ||
| 52 | clk->is_enabled = 0; | ||
| 53 | } | ||
| 54 | |||
| 55 | static int clk_prcmu_is_enabled(struct clk_hw *hw) | ||
| 56 | { | ||
| 57 | struct clk_prcmu *clk = to_clk_prcmu(hw); | ||
| 58 | return clk->is_enabled; | ||
| 59 | } | ||
| 60 | |||
| 61 | static unsigned long clk_prcmu_recalc_rate(struct clk_hw *hw, | ||
| 62 | unsigned long parent_rate) | ||
| 63 | { | ||
| 64 | struct clk_prcmu *clk = to_clk_prcmu(hw); | ||
| 65 | return prcmu_clock_rate(clk->cg_sel); | ||
| 66 | } | ||
| 67 | |||
| 68 | static long clk_prcmu_round_rate(struct clk_hw *hw, unsigned long rate, | ||
| 69 | unsigned long *parent_rate) | ||
| 70 | { | ||
| 71 | struct clk_prcmu *clk = to_clk_prcmu(hw); | ||
| 72 | return prcmu_round_clock_rate(clk->cg_sel, rate); | ||
| 73 | } | ||
| 74 | |||
| 75 | static int clk_prcmu_set_rate(struct clk_hw *hw, unsigned long rate, | ||
| 76 | unsigned long parent_rate) | ||
| 77 | { | ||
| 78 | struct clk_prcmu *clk = to_clk_prcmu(hw); | ||
| 79 | return prcmu_set_clock_rate(clk->cg_sel, rate); | ||
| 80 | } | ||
| 81 | |||
| 82 | static int request_ape_opp100(bool enable) | ||
| 83 | { | ||
| 84 | static int reqs; | ||
| 85 | int err = 0; | ||
| 86 | |||
| 87 | if (enable) { | ||
| 88 | if (!reqs) | ||
| 89 | err = prcmu_qos_add_requirement(PRCMU_QOS_APE_OPP, | ||
| 90 | "clock", 100); | ||
| 91 | if (!err) | ||
| 92 | reqs++; | ||
| 93 | } else { | ||
| 94 | reqs--; | ||
| 95 | if (!reqs) | ||
| 96 | prcmu_qos_remove_requirement(PRCMU_QOS_APE_OPP, | ||
| 97 | "clock"); | ||
| 98 | } | ||
| 99 | return err; | ||
| 100 | } | ||
| 101 | |||
| 102 | static int clk_prcmu_opp_prepare(struct clk_hw *hw) | ||
| 103 | { | ||
| 104 | int err; | ||
| 105 | struct clk_prcmu *clk = to_clk_prcmu(hw); | ||
| 106 | |||
| 107 | err = request_ape_opp100(true); | ||
| 108 | if (err) { | ||
| 109 | pr_err("clk_prcmu: %s failed to request APE OPP100 for %s.\n", | ||
| 110 | __func__, hw->init->name); | ||
| 111 | return err; | ||
| 112 | } | ||
| 113 | |||
| 114 | err = prcmu_request_clock(clk->cg_sel, true); | ||
| 115 | if (err) | ||
| 116 | request_ape_opp100(false); | ||
| 117 | |||
| 118 | return err; | ||
| 119 | } | ||
| 120 | |||
| 121 | static void clk_prcmu_opp_unprepare(struct clk_hw *hw) | ||
| 122 | { | ||
| 123 | struct clk_prcmu *clk = to_clk_prcmu(hw); | ||
| 124 | |||
| 125 | if (prcmu_request_clock(clk->cg_sel, false)) | ||
| 126 | goto out_error; | ||
| 127 | if (request_ape_opp100(false)) | ||
| 128 | goto out_error; | ||
| 129 | return; | ||
| 130 | |||
| 131 | out_error: | ||
| 132 | pr_err("clk_prcmu: %s failed to disable %s.\n", __func__, | ||
| 133 | hw->init->name); | ||
| 134 | } | ||
| 135 | |||
| 136 | static struct clk_ops clk_prcmu_scalable_ops = { | ||
| 137 | .prepare = clk_prcmu_prepare, | ||
| 138 | .unprepare = clk_prcmu_unprepare, | ||
| 139 | .enable = clk_prcmu_enable, | ||
| 140 | .disable = clk_prcmu_disable, | ||
| 141 | .is_enabled = clk_prcmu_is_enabled, | ||
| 142 | .recalc_rate = clk_prcmu_recalc_rate, | ||
| 143 | .round_rate = clk_prcmu_round_rate, | ||
| 144 | .set_rate = clk_prcmu_set_rate, | ||
| 145 | }; | ||
| 146 | |||
| 147 | static struct clk_ops clk_prcmu_gate_ops = { | ||
| 148 | .prepare = clk_prcmu_prepare, | ||
| 149 | .unprepare = clk_prcmu_unprepare, | ||
| 150 | .enable = clk_prcmu_enable, | ||
| 151 | .disable = clk_prcmu_disable, | ||
| 152 | .is_enabled = clk_prcmu_is_enabled, | ||
| 153 | .recalc_rate = clk_prcmu_recalc_rate, | ||
| 154 | }; | ||
| 155 | |||
| 156 | static struct clk_ops clk_prcmu_rate_ops = { | ||
| 157 | .is_enabled = clk_prcmu_is_enabled, | ||
| 158 | .recalc_rate = clk_prcmu_recalc_rate, | ||
| 159 | }; | ||
| 160 | |||
| 161 | static struct clk_ops clk_prcmu_opp_gate_ops = { | ||
| 162 | .prepare = clk_prcmu_opp_prepare, | ||
| 163 | .unprepare = clk_prcmu_opp_unprepare, | ||
| 164 | .enable = clk_prcmu_enable, | ||
| 165 | .disable = clk_prcmu_disable, | ||
| 166 | .is_enabled = clk_prcmu_is_enabled, | ||
| 167 | .recalc_rate = clk_prcmu_recalc_rate, | ||
| 168 | }; | ||
| 169 | |||
| 170 | static struct clk *clk_reg_prcmu(const char *name, | ||
| 171 | const char *parent_name, | ||
| 172 | u8 cg_sel, | ||
| 173 | unsigned long rate, | ||
| 174 | unsigned long flags, | ||
| 175 | struct clk_ops *clk_prcmu_ops) | ||
| 176 | { | ||
| 177 | struct clk_prcmu *clk; | ||
| 178 | struct clk_init_data clk_prcmu_init; | ||
| 179 | struct clk *clk_reg; | ||
| 180 | |||
| 181 | if (!name) { | ||
| 182 | pr_err("clk_prcmu: %s invalid arguments passed\n", __func__); | ||
| 183 | return ERR_PTR(-EINVAL); | ||
| 184 | } | ||
| 185 | |||
| 186 | clk = kzalloc(sizeof(struct clk_prcmu), GFP_KERNEL); | ||
| 187 | if (!clk) { | ||
| 188 | pr_err("clk_prcmu: %s could not allocate clk\n", __func__); | ||
| 189 | return ERR_PTR(-ENOMEM); | ||
| 190 | } | ||
| 191 | |||
| 192 | clk->cg_sel = cg_sel; | ||
| 193 | clk->is_enabled = 1; | ||
| 194 | /* "rate" can be used for changing the initial frequency */ | ||
| 195 | if (rate) | ||
| 196 | prcmu_set_clock_rate(cg_sel, rate); | ||
| 197 | |||
| 198 | clk_prcmu_init.name = name; | ||
| 199 | clk_prcmu_init.ops = clk_prcmu_ops; | ||
| 200 | clk_prcmu_init.flags = flags; | ||
| 201 | clk_prcmu_init.parent_names = (parent_name ? &parent_name : NULL); | ||
| 202 | clk_prcmu_init.num_parents = (parent_name ? 1 : 0); | ||
| 203 | clk->hw.init = &clk_prcmu_init; | ||
| 204 | |||
| 205 | clk_reg = clk_register(NULL, &clk->hw); | ||
| 206 | if (IS_ERR_OR_NULL(clk_reg)) | ||
| 207 | goto free_clk; | ||
| 208 | |||
| 209 | return clk_reg; | ||
| 210 | |||
| 211 | free_clk: | ||
| 212 | kfree(clk); | ||
| 213 | pr_err("clk_prcmu: %s failed to register clk\n", __func__); | ||
| 214 | return ERR_PTR(-ENOMEM); | ||
| 215 | } | ||
| 216 | |||
| 217 | struct clk *clk_reg_prcmu_scalable(const char *name, | ||
| 218 | const char *parent_name, | ||
| 219 | u8 cg_sel, | ||
| 220 | unsigned long rate, | ||
| 221 | unsigned long flags) | ||
| 222 | { | ||
| 223 | return clk_reg_prcmu(name, parent_name, cg_sel, rate, flags, | ||
| 224 | &clk_prcmu_scalable_ops); | ||
| 225 | } | ||
| 226 | |||
| 227 | struct clk *clk_reg_prcmu_gate(const char *name, | ||
| 228 | const char *parent_name, | ||
| 229 | u8 cg_sel, | ||
| 230 | unsigned long flags) | ||
| 231 | { | ||
| 232 | return clk_reg_prcmu(name, parent_name, cg_sel, 0, flags, | ||
| 233 | &clk_prcmu_gate_ops); | ||
| 234 | } | ||
| 235 | |||
| 236 | struct clk *clk_reg_prcmu_rate(const char *name, | ||
| 237 | const char *parent_name, | ||
| 238 | u8 cg_sel, | ||
| 239 | unsigned long flags) | ||
| 240 | { | ||
| 241 | return clk_reg_prcmu(name, parent_name, cg_sel, 0, flags, | ||
| 242 | &clk_prcmu_rate_ops); | ||
| 243 | } | ||
| 244 | |||
| 245 | struct clk *clk_reg_prcmu_opp_gate(const char *name, | ||
| 246 | const char *parent_name, | ||
| 247 | u8 cg_sel, | ||
| 248 | unsigned long flags) | ||
| 249 | { | ||
| 250 | return clk_reg_prcmu(name, parent_name, cg_sel, 0, flags, | ||
| 251 | &clk_prcmu_opp_gate_ops); | ||
| 252 | } | ||
diff --git a/drivers/clk/ux500/clk.h b/drivers/clk/ux500/clk.h new file mode 100644 index 000000000000..836d7d16751e --- /dev/null +++ b/drivers/clk/ux500/clk.h | |||
| @@ -0,0 +1,48 @@ | |||
| 1 | /* | ||
| 2 | * Clocks for ux500 platforms | ||
| 3 | * | ||
| 4 | * Copyright (C) 2012 ST-Ericsson SA | ||
| 5 | * Author: Ulf Hansson <ulf.hansson@linaro.org> | ||
| 6 | * | ||
| 7 | * License terms: GNU General Public License (GPL) version 2 | ||
| 8 | */ | ||
| 9 | |||
| 10 | #ifndef __UX500_CLK_H | ||
| 11 | #define __UX500_CLK_H | ||
| 12 | |||
| 13 | #include <linux/clk.h> | ||
| 14 | |||
| 15 | struct clk *clk_reg_prcc_pclk(const char *name, | ||
| 16 | const char *parent_name, | ||
| 17 | unsigned int phy_base, | ||
| 18 | u32 cg_sel, | ||
| 19 | unsigned long flags); | ||
| 20 | |||
| 21 | struct clk *clk_reg_prcc_kclk(const char *name, | ||
| 22 | const char *parent_name, | ||
| 23 | unsigned int phy_base, | ||
| 24 | u32 cg_sel, | ||
| 25 | unsigned long flags); | ||
| 26 | |||
| 27 | struct clk *clk_reg_prcmu_scalable(const char *name, | ||
| 28 | const char *parent_name, | ||
| 29 | u8 cg_sel, | ||
| 30 | unsigned long rate, | ||
| 31 | unsigned long flags); | ||
| 32 | |||
| 33 | struct clk *clk_reg_prcmu_gate(const char *name, | ||
| 34 | const char *parent_name, | ||
| 35 | u8 cg_sel, | ||
| 36 | unsigned long flags); | ||
| 37 | |||
| 38 | struct clk *clk_reg_prcmu_rate(const char *name, | ||
| 39 | const char *parent_name, | ||
| 40 | u8 cg_sel, | ||
| 41 | unsigned long flags); | ||
| 42 | |||
| 43 | struct clk *clk_reg_prcmu_opp_gate(const char *name, | ||
| 44 | const char *parent_name, | ||
| 45 | u8 cg_sel, | ||
| 46 | unsigned long flags); | ||
| 47 | |||
| 48 | #endif /* __UX500_CLK_H */ | ||
diff --git a/drivers/clk/ux500/u8500_clk.c b/drivers/clk/ux500/u8500_clk.c new file mode 100644 index 000000000000..ca4a25ed844c --- /dev/null +++ b/drivers/clk/ux500/u8500_clk.c | |||
| @@ -0,0 +1,477 @@ | |||
| 1 | /* | ||
| 2 | * Clock definitions for u8500 platform. | ||
| 3 | * | ||
| 4 | * Copyright (C) 2012 ST-Ericsson SA | ||
| 5 | * Author: Ulf Hansson <ulf.hansson@linaro.org> | ||
| 6 | * | ||
| 7 | * License terms: GNU General Public License (GPL) version 2 | ||
| 8 | */ | ||
| 9 | |||
| 10 | #include <linux/clk.h> | ||
| 11 | #include <linux/clkdev.h> | ||
| 12 | #include <linux/clk-provider.h> | ||
| 13 | #include <linux/mfd/dbx500-prcmu.h> | ||
| 14 | #include <linux/platform_data/clk-ux500.h> | ||
| 15 | |||
| 16 | #include "clk.h" | ||
| 17 | |||
| 18 | void u8500_clk_init(void) | ||
| 19 | { | ||
| 20 | struct prcmu_fw_version *fw_version; | ||
| 21 | const char *sgaclk_parent = NULL; | ||
| 22 | struct clk *clk; | ||
| 23 | |||
| 24 | /* Clock sources */ | ||
| 25 | clk = clk_reg_prcmu_gate("soc0_pll", NULL, PRCMU_PLLSOC0, | ||
| 26 | CLK_IS_ROOT|CLK_IGNORE_UNUSED); | ||
| 27 | clk_register_clkdev(clk, "soc0_pll", NULL); | ||
| 28 | |||
| 29 | clk = clk_reg_prcmu_gate("soc1_pll", NULL, PRCMU_PLLSOC1, | ||
| 30 | CLK_IS_ROOT|CLK_IGNORE_UNUSED); | ||
| 31 | clk_register_clkdev(clk, "soc1_pll", NULL); | ||
| 32 | |||
| 33 | clk = clk_reg_prcmu_gate("ddr_pll", NULL, PRCMU_PLLDDR, | ||
| 34 | CLK_IS_ROOT|CLK_IGNORE_UNUSED); | ||
| 35 | clk_register_clkdev(clk, "ddr_pll", NULL); | ||
| 36 | |||
| 37 | /* FIXME: Add sys, ulp and int clocks here. */ | ||
| 38 | |||
| 39 | clk = clk_register_fixed_rate(NULL, "rtc32k", "NULL", | ||
| 40 | CLK_IS_ROOT|CLK_IGNORE_UNUSED, | ||
| 41 | 32768); | ||
| 42 | clk_register_clkdev(clk, "clk32k", NULL); | ||
| 43 | clk_register_clkdev(clk, NULL, "rtc-pl031"); | ||
| 44 | |||
| 45 | /* PRCMU clocks */ | ||
| 46 | fw_version = prcmu_get_fw_version(); | ||
| 47 | if (fw_version != NULL) { | ||
| 48 | switch (fw_version->project) { | ||
| 49 | case PRCMU_FW_PROJECT_U8500_C2: | ||
| 50 | case PRCMU_FW_PROJECT_U8520: | ||
| 51 | case PRCMU_FW_PROJECT_U8420: | ||
| 52 | sgaclk_parent = "soc0_pll"; | ||
| 53 | break; | ||
| 54 | default: | ||
| 55 | break; | ||
| 56 | } | ||
| 57 | } | ||
| 58 | |||
| 59 | if (sgaclk_parent) | ||
| 60 | clk = clk_reg_prcmu_gate("sgclk", sgaclk_parent, | ||
| 61 | PRCMU_SGACLK, 0); | ||
| 62 | else | ||
| 63 | clk = clk_reg_prcmu_gate("sgclk", NULL, | ||
| 64 | PRCMU_SGACLK, CLK_IS_ROOT); | ||
| 65 | clk_register_clkdev(clk, NULL, "mali"); | ||
| 66 | |||
| 67 | clk = clk_reg_prcmu_gate("uartclk", NULL, PRCMU_UARTCLK, CLK_IS_ROOT); | ||
| 68 | clk_register_clkdev(clk, NULL, "UART"); | ||
| 69 | |||
| 70 | clk = clk_reg_prcmu_gate("msp02clk", NULL, PRCMU_MSP02CLK, CLK_IS_ROOT); | ||
| 71 | clk_register_clkdev(clk, NULL, "MSP02"); | ||
| 72 | |||
| 73 | clk = clk_reg_prcmu_gate("msp1clk", NULL, PRCMU_MSP1CLK, CLK_IS_ROOT); | ||
| 74 | clk_register_clkdev(clk, NULL, "MSP1"); | ||
| 75 | |||
| 76 | clk = clk_reg_prcmu_gate("i2cclk", NULL, PRCMU_I2CCLK, CLK_IS_ROOT); | ||
| 77 | clk_register_clkdev(clk, NULL, "I2C"); | ||
| 78 | |||
| 79 | clk = clk_reg_prcmu_gate("slimclk", NULL, PRCMU_SLIMCLK, CLK_IS_ROOT); | ||
| 80 | clk_register_clkdev(clk, NULL, "slim"); | ||
| 81 | |||
| 82 | clk = clk_reg_prcmu_gate("per1clk", NULL, PRCMU_PER1CLK, CLK_IS_ROOT); | ||
| 83 | clk_register_clkdev(clk, NULL, "PERIPH1"); | ||
| 84 | |||
| 85 | clk = clk_reg_prcmu_gate("per2clk", NULL, PRCMU_PER2CLK, CLK_IS_ROOT); | ||
| 86 | clk_register_clkdev(clk, NULL, "PERIPH2"); | ||
| 87 | |||
| 88 | clk = clk_reg_prcmu_gate("per3clk", NULL, PRCMU_PER3CLK, CLK_IS_ROOT); | ||
| 89 | clk_register_clkdev(clk, NULL, "PERIPH3"); | ||
| 90 | |||
| 91 | clk = clk_reg_prcmu_gate("per5clk", NULL, PRCMU_PER5CLK, CLK_IS_ROOT); | ||
| 92 | clk_register_clkdev(clk, NULL, "PERIPH5"); | ||
| 93 | |||
| 94 | clk = clk_reg_prcmu_gate("per6clk", NULL, PRCMU_PER6CLK, CLK_IS_ROOT); | ||
| 95 | clk_register_clkdev(clk, NULL, "PERIPH6"); | ||
| 96 | |||
| 97 | clk = clk_reg_prcmu_gate("per7clk", NULL, PRCMU_PER7CLK, CLK_IS_ROOT); | ||
| 98 | clk_register_clkdev(clk, NULL, "PERIPH7"); | ||
| 99 | |||
| 100 | clk = clk_reg_prcmu_scalable("lcdclk", NULL, PRCMU_LCDCLK, 0, | ||
| 101 | CLK_IS_ROOT|CLK_SET_RATE_GATE); | ||
| 102 | clk_register_clkdev(clk, NULL, "lcd"); | ||
| 103 | clk_register_clkdev(clk, "lcd", "mcde"); | ||
| 104 | |||
| 105 | clk = clk_reg_prcmu_opp_gate("bmlclk", NULL, PRCMU_BMLCLK, CLK_IS_ROOT); | ||
| 106 | clk_register_clkdev(clk, NULL, "bml"); | ||
| 107 | |||
| 108 | clk = clk_reg_prcmu_scalable("hsitxclk", NULL, PRCMU_HSITXCLK, 0, | ||
| 109 | CLK_IS_ROOT|CLK_SET_RATE_GATE); | ||
| 110 | |||
| 111 | clk = clk_reg_prcmu_scalable("hsirxclk", NULL, PRCMU_HSIRXCLK, 0, | ||
| 112 | CLK_IS_ROOT|CLK_SET_RATE_GATE); | ||
| 113 | |||
| 114 | clk = clk_reg_prcmu_scalable("hdmiclk", NULL, PRCMU_HDMICLK, 0, | ||
| 115 | CLK_IS_ROOT|CLK_SET_RATE_GATE); | ||
| 116 | clk_register_clkdev(clk, NULL, "hdmi"); | ||
| 117 | clk_register_clkdev(clk, "hdmi", "mcde"); | ||
| 118 | |||
| 119 | clk = clk_reg_prcmu_gate("apeatclk", NULL, PRCMU_APEATCLK, CLK_IS_ROOT); | ||
| 120 | clk_register_clkdev(clk, NULL, "apeat"); | ||
| 121 | |||
| 122 | clk = clk_reg_prcmu_gate("apetraceclk", NULL, PRCMU_APETRACECLK, | ||
| 123 | CLK_IS_ROOT); | ||
| 124 | clk_register_clkdev(clk, NULL, "apetrace"); | ||
| 125 | |||
| 126 | clk = clk_reg_prcmu_gate("mcdeclk", NULL, PRCMU_MCDECLK, CLK_IS_ROOT); | ||
| 127 | clk_register_clkdev(clk, NULL, "mcde"); | ||
| 128 | clk_register_clkdev(clk, "mcde", "mcde"); | ||
| 129 | clk_register_clkdev(clk, "dsisys", "dsilink.0"); | ||
| 130 | clk_register_clkdev(clk, "dsisys", "dsilink.1"); | ||
| 131 | clk_register_clkdev(clk, "dsisys", "dsilink.2"); | ||
| 132 | |||
| 133 | clk = clk_reg_prcmu_opp_gate("ipi2cclk", NULL, PRCMU_IPI2CCLK, | ||
| 134 | CLK_IS_ROOT); | ||
| 135 | clk_register_clkdev(clk, NULL, "ipi2"); | ||
| 136 | |||
| 137 | clk = clk_reg_prcmu_gate("dsialtclk", NULL, PRCMU_DSIALTCLK, | ||
| 138 | CLK_IS_ROOT); | ||
| 139 | clk_register_clkdev(clk, NULL, "dsialt"); | ||
| 140 | |||
| 141 | clk = clk_reg_prcmu_gate("dmaclk", NULL, PRCMU_DMACLK, CLK_IS_ROOT); | ||
| 142 | clk_register_clkdev(clk, NULL, "dma40.0"); | ||
| 143 | |||
| 144 | clk = clk_reg_prcmu_gate("b2r2clk", NULL, PRCMU_B2R2CLK, CLK_IS_ROOT); | ||
| 145 | clk_register_clkdev(clk, NULL, "b2r2"); | ||
| 146 | clk_register_clkdev(clk, NULL, "b2r2_core"); | ||
| 147 | clk_register_clkdev(clk, NULL, "U8500-B2R2.0"); | ||
| 148 | |||
| 149 | clk = clk_reg_prcmu_scalable("tvclk", NULL, PRCMU_TVCLK, 0, | ||
| 150 | CLK_IS_ROOT|CLK_SET_RATE_GATE); | ||
| 151 | clk_register_clkdev(clk, NULL, "tv"); | ||
| 152 | clk_register_clkdev(clk, "tv", "mcde"); | ||
| 153 | |||
| 154 | clk = clk_reg_prcmu_gate("sspclk", NULL, PRCMU_SSPCLK, CLK_IS_ROOT); | ||
| 155 | clk_register_clkdev(clk, NULL, "SSP"); | ||
| 156 | |||
| 157 | clk = clk_reg_prcmu_gate("rngclk", NULL, PRCMU_RNGCLK, CLK_IS_ROOT); | ||
| 158 | clk_register_clkdev(clk, NULL, "rngclk"); | ||
| 159 | |||
| 160 | clk = clk_reg_prcmu_gate("uiccclk", NULL, PRCMU_UICCCLK, CLK_IS_ROOT); | ||
| 161 | clk_register_clkdev(clk, NULL, "uicc"); | ||
| 162 | |||
| 163 | /* | ||
| 164 | * FIXME: The MTU clocks might need some kind of "parent muxed join" | ||
| 165 | * and these have no K-clocks. For now, we ignore the missing | ||
| 166 | * connection to the corresponding P-clocks, p6_mtu0_clk and | ||
| 167 | * p6_mtu1_clk. Instead timclk is used which is the valid parent. | ||
| 168 | */ | ||
| 169 | clk = clk_reg_prcmu_gate("timclk", NULL, PRCMU_TIMCLK, CLK_IS_ROOT); | ||
| 170 | clk_register_clkdev(clk, NULL, "mtu0"); | ||
| 171 | clk_register_clkdev(clk, NULL, "mtu1"); | ||
| 172 | |||
| 173 | clk = clk_reg_prcmu_gate("sdmmcclk", NULL, PRCMU_SDMMCCLK, CLK_IS_ROOT); | ||
| 174 | clk_register_clkdev(clk, NULL, "sdmmc"); | ||
| 175 | |||
| 176 | |||
| 177 | clk = clk_reg_prcmu_scalable("dsi_pll", "hdmiclk", | ||
| 178 | PRCMU_PLLDSI, 0, CLK_SET_RATE_GATE); | ||
| 179 | clk_register_clkdev(clk, "dsihs2", "mcde"); | ||
| 180 | clk_register_clkdev(clk, "dsihs2", "dsilink.2"); | ||
| 181 | |||
| 182 | |||
| 183 | clk = clk_reg_prcmu_scalable("dsi0clk", "dsi_pll", | ||
| 184 | PRCMU_DSI0CLK, 0, CLK_SET_RATE_GATE); | ||
| 185 | clk_register_clkdev(clk, "dsihs0", "mcde"); | ||
| 186 | clk_register_clkdev(clk, "dsihs0", "dsilink.0"); | ||
| 187 | |||
| 188 | clk = clk_reg_prcmu_scalable("dsi1clk", "dsi_pll", | ||
| 189 | PRCMU_DSI1CLK, 0, CLK_SET_RATE_GATE); | ||
| 190 | clk_register_clkdev(clk, "dsihs1", "mcde"); | ||
| 191 | clk_register_clkdev(clk, "dsihs1", "dsilink.1"); | ||
| 192 | |||
| 193 | clk = clk_reg_prcmu_scalable("dsi0escclk", "tvclk", | ||
| 194 | PRCMU_DSI0ESCCLK, 0, CLK_SET_RATE_GATE); | ||
| 195 | clk_register_clkdev(clk, "dsilp0", "dsilink.0"); | ||
| 196 | clk_register_clkdev(clk, "dsilp0", "mcde"); | ||
| 197 | |||
| 198 | clk = clk_reg_prcmu_scalable("dsi1escclk", "tvclk", | ||
| 199 | PRCMU_DSI1ESCCLK, 0, CLK_SET_RATE_GATE); | ||
| 200 | clk_register_clkdev(clk, "dsilp1", "dsilink.1"); | ||
| 201 | clk_register_clkdev(clk, "dsilp1", "mcde"); | ||
| 202 | |||
| 203 | clk = clk_reg_prcmu_scalable("dsi2escclk", "tvclk", | ||
| 204 | PRCMU_DSI2ESCCLK, 0, CLK_SET_RATE_GATE); | ||
| 205 | clk_register_clkdev(clk, "dsilp2", "dsilink.2"); | ||
| 206 | clk_register_clkdev(clk, "dsilp2", "mcde"); | ||
| 207 | |||
| 208 | clk = clk_reg_prcmu_rate("smp_twd", NULL, PRCMU_ARMSS, | ||
| 209 | CLK_IS_ROOT|CLK_GET_RATE_NOCACHE| | ||
| 210 | CLK_IGNORE_UNUSED); | ||
| 211 | clk_register_clkdev(clk, NULL, "smp_twd"); | ||
| 212 | |||
| 213 | /* | ||
| 214 | * FIXME: Add special handled PRCMU clocks here: | ||
| 215 | * 1. clk_arm, use PRCMU_ARMCLK. | ||
| 216 | * 2. clkout0yuv, use PRCMU as parent + need regulator + pinctrl. | ||
| 217 | * 3. ab9540_clkout1yuv, see clkout0yuv | ||
| 218 | */ | ||
| 219 | |||
| 220 | /* PRCC P-clocks */ | ||
| 221 | clk = clk_reg_prcc_pclk("p1_pclk0", "per1clk", U8500_CLKRST1_BASE, | ||
| 222 | BIT(0), 0); | ||
| 223 | clk_register_clkdev(clk, "apb_pclk", "uart0"); | ||
| 224 | |||
| 225 | clk = clk_reg_prcc_pclk("p1_pclk1", "per1clk", U8500_CLKRST1_BASE, | ||
| 226 | BIT(1), 0); | ||
| 227 | clk_register_clkdev(clk, "apb_pclk", "uart1"); | ||
| 228 | |||
| 229 | clk = clk_reg_prcc_pclk("p1_pclk2", "per1clk", U8500_CLKRST1_BASE, | ||
| 230 | BIT(2), 0); | ||
| 231 | clk = clk_reg_prcc_pclk("p1_pclk3", "per1clk", U8500_CLKRST1_BASE, | ||
| 232 | BIT(3), 0); | ||
| 233 | clk = clk_reg_prcc_pclk("p1_pclk4", "per1clk", U8500_CLKRST1_BASE, | ||
| 234 | BIT(4), 0); | ||
| 235 | |||
| 236 | clk = clk_reg_prcc_pclk("p1_pclk5", "per1clk", U8500_CLKRST1_BASE, | ||
| 237 | BIT(5), 0); | ||
| 238 | clk_register_clkdev(clk, "apb_pclk", "sdi0"); | ||
| 239 | |||
| 240 | clk = clk_reg_prcc_pclk("p1_pclk6", "per1clk", U8500_CLKRST1_BASE, | ||
| 241 | BIT(6), 0); | ||
| 242 | |||
| 243 | clk = clk_reg_prcc_pclk("p1_pclk7", "per1clk", U8500_CLKRST1_BASE, | ||
| 244 | BIT(7), 0); | ||
| 245 | clk_register_clkdev(clk, NULL, "spi3"); | ||
| 246 | |||
| 247 | clk = clk_reg_prcc_pclk("p1_pclk8", "per1clk", U8500_CLKRST1_BASE, | ||
| 248 | BIT(8), 0); | ||
| 249 | |||
| 250 | clk = clk_reg_prcc_pclk("p1_pclk9", "per1clk", U8500_CLKRST1_BASE, | ||
| 251 | BIT(9), 0); | ||
| 252 | clk_register_clkdev(clk, NULL, "gpio.0"); | ||
| 253 | clk_register_clkdev(clk, NULL, "gpio.1"); | ||
| 254 | clk_register_clkdev(clk, NULL, "gpioblock0"); | ||
| 255 | |||
| 256 | clk = clk_reg_prcc_pclk("p1_pclk10", "per1clk", U8500_CLKRST1_BASE, | ||
| 257 | BIT(10), 0); | ||
| 258 | clk = clk_reg_prcc_pclk("p1_pclk11", "per1clk", U8500_CLKRST1_BASE, | ||
| 259 | BIT(11), 0); | ||
| 260 | |||
| 261 | clk = clk_reg_prcc_pclk("p2_pclk0", "per2clk", U8500_CLKRST2_BASE, | ||
| 262 | BIT(0), 0); | ||
| 263 | |||
| 264 | clk = clk_reg_prcc_pclk("p2_pclk1", "per2clk", U8500_CLKRST2_BASE, | ||
| 265 | BIT(1), 0); | ||
| 266 | clk_register_clkdev(clk, NULL, "spi2"); | ||
| 267 | |||
| 268 | clk = clk_reg_prcc_pclk("p2_pclk2", "per2clk", U8500_CLKRST2_BASE, | ||
| 269 | BIT(2), 0); | ||
| 270 | clk_register_clkdev(clk, NULL, "spi1"); | ||
| 271 | |||
| 272 | clk = clk_reg_prcc_pclk("p2_pclk3", "per2clk", U8500_CLKRST2_BASE, | ||
| 273 | BIT(3), 0); | ||
| 274 | clk_register_clkdev(clk, NULL, "pwl"); | ||
| 275 | |||
| 276 | clk = clk_reg_prcc_pclk("p2_pclk4", "per2clk", U8500_CLKRST2_BASE, | ||
| 277 | BIT(4), 0); | ||
| 278 | clk_register_clkdev(clk, "apb_pclk", "sdi4"); | ||
| 279 | |||
| 280 | clk = clk_reg_prcc_pclk("p2_pclk5", "per2clk", U8500_CLKRST2_BASE, | ||
| 281 | BIT(5), 0); | ||
| 282 | |||
| 283 | clk = clk_reg_prcc_pclk("p2_pclk6", "per2clk", U8500_CLKRST2_BASE, | ||
| 284 | BIT(6), 0); | ||
| 285 | clk_register_clkdev(clk, "apb_pclk", "sdi1"); | ||
| 286 | |||
| 287 | |||
| 288 | clk = clk_reg_prcc_pclk("p2_pclk7", "per2clk", U8500_CLKRST2_BASE, | ||
| 289 | BIT(7), 0); | ||
| 290 | clk_register_clkdev(clk, "apb_pclk", "sdi3"); | ||
| 291 | |||
| 292 | clk = clk_reg_prcc_pclk("p2_pclk8", "per2clk", U8500_CLKRST2_BASE, | ||
| 293 | BIT(8), 0); | ||
| 294 | clk_register_clkdev(clk, NULL, "spi0"); | ||
| 295 | |||
| 296 | clk = clk_reg_prcc_pclk("p2_pclk9", "per2clk", U8500_CLKRST2_BASE, | ||
| 297 | BIT(9), 0); | ||
| 298 | clk_register_clkdev(clk, "hsir_hclk", "ste_hsi.0"); | ||
| 299 | |||
| 300 | clk = clk_reg_prcc_pclk("p2_pclk10", "per2clk", U8500_CLKRST2_BASE, | ||
| 301 | BIT(10), 0); | ||
| 302 | clk_register_clkdev(clk, "hsit_hclk", "ste_hsi.0"); | ||
| 303 | |||
| 304 | clk = clk_reg_prcc_pclk("p2_pclk11", "per2clk", U8500_CLKRST2_BASE, | ||
| 305 | BIT(11), 0); | ||
| 306 | clk_register_clkdev(clk, NULL, "gpio.6"); | ||
| 307 | clk_register_clkdev(clk, NULL, "gpio.7"); | ||
| 308 | clk_register_clkdev(clk, NULL, "gpioblock1"); | ||
| 309 | |||
| 310 | clk = clk_reg_prcc_pclk("p2_pclk12", "per2clk", U8500_CLKRST2_BASE, | ||
| 311 | BIT(11), 0); | ||
| 312 | |||
| 313 | clk = clk_reg_prcc_pclk("p3_pclk0", "per3clk", U8500_CLKRST3_BASE, | ||
| 314 | BIT(0), 0); | ||
| 315 | clk_register_clkdev(clk, NULL, "fsmc"); | ||
| 316 | |||
| 317 | clk = clk_reg_prcc_pclk("p3_pclk1", "per3clk", U8500_CLKRST3_BASE, | ||
| 318 | BIT(1), 0); | ||
| 319 | clk = clk_reg_prcc_pclk("p3_pclk2", "per3clk", U8500_CLKRST3_BASE, | ||
| 320 | BIT(2), 0); | ||
| 321 | clk = clk_reg_prcc_pclk("p3_pclk3", "per3clk", U8500_CLKRST3_BASE, | ||
| 322 | BIT(3), 0); | ||
| 323 | |||
| 324 | clk = clk_reg_prcc_pclk("p3_pclk4", "per3clk", U8500_CLKRST3_BASE, | ||
| 325 | BIT(4), 0); | ||
| 326 | clk_register_clkdev(clk, "apb_pclk", "sdi2"); | ||
| 327 | |||
| 328 | clk = clk_reg_prcc_pclk("p3_pclk5", "per3clk", U8500_CLKRST3_BASE, | ||
| 329 | BIT(5), 0); | ||
| 330 | |||
| 331 | clk = clk_reg_prcc_pclk("p3_pclk6", "per3clk", U8500_CLKRST3_BASE, | ||
| 332 | BIT(6), 0); | ||
| 333 | clk_register_clkdev(clk, "apb_pclk", "uart2"); | ||
| 334 | |||
| 335 | clk = clk_reg_prcc_pclk("p3_pclk7", "per3clk", U8500_CLKRST3_BASE, | ||
| 336 | BIT(7), 0); | ||
| 337 | clk_register_clkdev(clk, "apb_pclk", "sdi5"); | ||
| 338 | |||
| 339 | clk = clk_reg_prcc_pclk("p3_pclk8", "per3clk", U8500_CLKRST3_BASE, | ||
| 340 | BIT(8), 0); | ||
| 341 | clk_register_clkdev(clk, NULL, "gpio.2"); | ||
| 342 | clk_register_clkdev(clk, NULL, "gpio.3"); | ||
| 343 | clk_register_clkdev(clk, NULL, "gpio.4"); | ||
| 344 | clk_register_clkdev(clk, NULL, "gpio.5"); | ||
| 345 | clk_register_clkdev(clk, NULL, "gpioblock2"); | ||
| 346 | |||
| 347 | clk = clk_reg_prcc_pclk("p5_pclk0", "per5clk", U8500_CLKRST5_BASE, | ||
| 348 | BIT(0), 0); | ||
| 349 | clk_register_clkdev(clk, "usb", "musb-ux500.0"); | ||
| 350 | |||
| 351 | clk = clk_reg_prcc_pclk("p5_pclk1", "per5clk", U8500_CLKRST5_BASE, | ||
| 352 | BIT(1), 0); | ||
| 353 | clk_register_clkdev(clk, NULL, "gpio.8"); | ||
| 354 | clk_register_clkdev(clk, NULL, "gpioblock3"); | ||
| 355 | |||
| 356 | clk = clk_reg_prcc_pclk("p6_pclk0", "per6clk", U8500_CLKRST6_BASE, | ||
| 357 | BIT(0), 0); | ||
| 358 | |||
| 359 | clk = clk_reg_prcc_pclk("p6_pclk1", "per6clk", U8500_CLKRST6_BASE, | ||
| 360 | BIT(1), 0); | ||
| 361 | clk_register_clkdev(clk, NULL, "cryp0"); | ||
| 362 | clk_register_clkdev(clk, NULL, "cryp1"); | ||
| 363 | |||
| 364 | clk = clk_reg_prcc_pclk("p6_pclk2", "per6clk", U8500_CLKRST6_BASE, | ||
| 365 | BIT(2), 0); | ||
| 366 | clk_register_clkdev(clk, NULL, "hash0"); | ||
| 367 | |||
| 368 | clk = clk_reg_prcc_pclk("p6_pclk3", "per6clk", U8500_CLKRST6_BASE, | ||
| 369 | BIT(3), 0); | ||
| 370 | clk_register_clkdev(clk, NULL, "pka"); | ||
| 371 | |||
| 372 | clk = clk_reg_prcc_pclk("p6_pclk4", "per6clk", U8500_CLKRST6_BASE, | ||
| 373 | BIT(4), 0); | ||
| 374 | clk_register_clkdev(clk, NULL, "hash1"); | ||
| 375 | |||
| 376 | clk = clk_reg_prcc_pclk("p6_pclk5", "per6clk", U8500_CLKRST6_BASE, | ||
| 377 | BIT(5), 0); | ||
| 378 | clk_register_clkdev(clk, NULL, "cfgreg"); | ||
| 379 | |||
| 380 | clk = clk_reg_prcc_pclk("p6_pclk6", "per6clk", U8500_CLKRST6_BASE, | ||
| 381 | BIT(6), 0); | ||
| 382 | clk = clk_reg_prcc_pclk("p6_pclk7", "per6clk", U8500_CLKRST6_BASE, | ||
| 383 | BIT(7), 0); | ||
| 384 | |||
| 385 | /* PRCC K-clocks | ||
| 386 | * | ||
| 387 | * FIXME: Some drivers requires PERPIH[n| to be automatically enabled | ||
| 388 | * by enabling just the K-clock, even if it is not a valid parent to | ||
| 389 | * the K-clock. Until drivers get fixed we might need some kind of | ||
| 390 | * "parent muxed join". | ||
| 391 | */ | ||
| 392 | |||
| 393 | /* Periph1 */ | ||
| 394 | clk = clk_reg_prcc_kclk("p1_uart0_kclk", "uartclk", | ||
| 395 | U8500_CLKRST1_BASE, BIT(0), CLK_SET_RATE_GATE); | ||
| 396 | clk_register_clkdev(clk, NULL, "uart0"); | ||
| 397 | |||
| 398 | clk = clk_reg_prcc_kclk("p1_uart1_kclk", "uartclk", | ||
| 399 | U8500_CLKRST1_BASE, BIT(1), CLK_SET_RATE_GATE); | ||
| 400 | clk_register_clkdev(clk, NULL, "uart1"); | ||
| 401 | |||
| 402 | clk = clk_reg_prcc_kclk("p1_i2c1_kclk", "i2cclk", | ||
| 403 | U8500_CLKRST1_BASE, BIT(2), CLK_SET_RATE_GATE); | ||
| 404 | clk = clk_reg_prcc_kclk("p1_msp0_kclk", "msp02clk", | ||
| 405 | U8500_CLKRST1_BASE, BIT(3), CLK_SET_RATE_GATE); | ||
| 406 | clk = clk_reg_prcc_kclk("p1_msp1_kclk", "msp1clk", | ||
| 407 | U8500_CLKRST1_BASE, BIT(4), CLK_SET_RATE_GATE); | ||
| 408 | |||
| 409 | clk = clk_reg_prcc_kclk("p1_sdi0_kclk", "sdmmcclk", | ||
| 410 | U8500_CLKRST1_BASE, BIT(5), CLK_SET_RATE_GATE); | ||
| 411 | clk_register_clkdev(clk, NULL, "sdi0"); | ||
| 412 | |||
| 413 | clk = clk_reg_prcc_kclk("p1_i2c2_kclk", "i2cclk", | ||
| 414 | U8500_CLKRST1_BASE, BIT(6), CLK_SET_RATE_GATE); | ||
| 415 | clk = clk_reg_prcc_kclk("p1_slimbus0_kclk", "slimclk", | ||
| 416 | U8500_CLKRST1_BASE, BIT(3), CLK_SET_RATE_GATE); | ||
| 417 | /* FIXME: Redefinition of BIT(3). */ | ||
| 418 | clk = clk_reg_prcc_kclk("p1_i2c4_kclk", "i2cclk", | ||
| 419 | U8500_CLKRST1_BASE, BIT(9), CLK_SET_RATE_GATE); | ||
| 420 | clk = clk_reg_prcc_kclk("p1_msp3_kclk", "msp1clk", | ||
| 421 | U8500_CLKRST1_BASE, BIT(10), CLK_SET_RATE_GATE); | ||
| 422 | |||
| 423 | /* Periph2 */ | ||
| 424 | clk = clk_reg_prcc_kclk("p2_i2c3_kclk", "i2cclk", | ||
| 425 | U8500_CLKRST2_BASE, BIT(0), CLK_SET_RATE_GATE); | ||
| 426 | |||
| 427 | clk = clk_reg_prcc_kclk("p2_sdi4_kclk", "sdmmcclk", | ||
| 428 | U8500_CLKRST2_BASE, BIT(2), CLK_SET_RATE_GATE); | ||
| 429 | clk_register_clkdev(clk, NULL, "sdi4"); | ||
| 430 | |||
| 431 | clk = clk_reg_prcc_kclk("p2_msp2_kclk", "msp02clk", | ||
| 432 | U8500_CLKRST2_BASE, BIT(3), CLK_SET_RATE_GATE); | ||
| 433 | |||
| 434 | clk = clk_reg_prcc_kclk("p2_sdi1_kclk", "sdmmcclk", | ||
| 435 | U8500_CLKRST2_BASE, BIT(4), CLK_SET_RATE_GATE); | ||
| 436 | clk_register_clkdev(clk, NULL, "sdi1"); | ||
| 437 | |||
| 438 | clk = clk_reg_prcc_kclk("p2_sdi3_kclk", "sdmmcclk", | ||
| 439 | U8500_CLKRST2_BASE, BIT(5), CLK_SET_RATE_GATE); | ||
| 440 | clk_register_clkdev(clk, NULL, "sdi3"); | ||
| 441 | |||
| 442 | /* Note that rate is received from parent. */ | ||
| 443 | clk = clk_reg_prcc_kclk("p2_ssirx_kclk", "hsirxclk", | ||
| 444 | U8500_CLKRST2_BASE, BIT(6), | ||
| 445 | CLK_SET_RATE_GATE|CLK_SET_RATE_PARENT); | ||
| 446 | clk = clk_reg_prcc_kclk("p2_ssitx_kclk", "hsitxclk", | ||
| 447 | U8500_CLKRST2_BASE, BIT(7), | ||
| 448 | CLK_SET_RATE_GATE|CLK_SET_RATE_PARENT); | ||
| 449 | |||
| 450 | /* Periph3 */ | ||
| 451 | clk = clk_reg_prcc_kclk("p3_ssp0_kclk", "sspclk", | ||
| 452 | U8500_CLKRST3_BASE, BIT(1), CLK_SET_RATE_GATE); | ||
| 453 | clk = clk_reg_prcc_kclk("p3_ssp1_kclk", "sspclk", | ||
| 454 | U8500_CLKRST3_BASE, BIT(2), CLK_SET_RATE_GATE); | ||
| 455 | clk = clk_reg_prcc_kclk("p3_i2c0_kclk", "i2cclk", | ||
| 456 | U8500_CLKRST3_BASE, BIT(3), CLK_SET_RATE_GATE); | ||
| 457 | |||
| 458 | clk = clk_reg_prcc_kclk("p3_sdi2_kclk", "sdmmcclk", | ||
| 459 | U8500_CLKRST3_BASE, BIT(4), CLK_SET_RATE_GATE); | ||
| 460 | clk_register_clkdev(clk, NULL, "sdi2"); | ||
| 461 | |||
| 462 | clk = clk_reg_prcc_kclk("p3_ske_kclk", "rtc32k", | ||
| 463 | U8500_CLKRST3_BASE, BIT(5), CLK_SET_RATE_GATE); | ||
| 464 | |||
| 465 | clk = clk_reg_prcc_kclk("p3_uart2_kclk", "uartclk", | ||
| 466 | U8500_CLKRST3_BASE, BIT(6), CLK_SET_RATE_GATE); | ||
| 467 | clk_register_clkdev(clk, NULL, "uart2"); | ||
| 468 | |||
| 469 | clk = clk_reg_prcc_kclk("p3_sdi5_kclk", "sdmmcclk", | ||
| 470 | U8500_CLKRST3_BASE, BIT(7), CLK_SET_RATE_GATE); | ||
| 471 | clk_register_clkdev(clk, NULL, "sdi5"); | ||
| 472 | |||
| 473 | /* Periph6 */ | ||
| 474 | clk = clk_reg_prcc_kclk("p3_rng_kclk", "rngclk", | ||
| 475 | U8500_CLKRST6_BASE, BIT(0), CLK_SET_RATE_GATE); | ||
| 476 | |||
| 477 | } | ||
diff --git a/drivers/clk/ux500/u8540_clk.c b/drivers/clk/ux500/u8540_clk.c new file mode 100644 index 000000000000..10adfd2ead21 --- /dev/null +++ b/drivers/clk/ux500/u8540_clk.c | |||
| @@ -0,0 +1,21 @@ | |||
| 1 | /* | ||
| 2 | * Clock definitions for u8540 platform. | ||
| 3 | * | ||
| 4 | * Copyright (C) 2012 ST-Ericsson SA | ||
| 5 | * Author: Ulf Hansson <ulf.hansson@linaro.org> | ||
| 6 | * | ||
| 7 | * License terms: GNU General Public License (GPL) version 2 | ||
| 8 | */ | ||
| 9 | |||
| 10 | #include <linux/clk.h> | ||
| 11 | #include <linux/clkdev.h> | ||
| 12 | #include <linux/clk-provider.h> | ||
| 13 | #include <linux/mfd/dbx500-prcmu.h> | ||
| 14 | #include <linux/platform_data/clk-ux500.h> | ||
| 15 | |||
| 16 | #include "clk.h" | ||
| 17 | |||
| 18 | void u8540_clk_init(void) | ||
| 19 | { | ||
| 20 | /* register clocks here */ | ||
| 21 | } | ||
diff --git a/drivers/clk/ux500/u9540_clk.c b/drivers/clk/ux500/u9540_clk.c new file mode 100644 index 000000000000..dbc0191e16c8 --- /dev/null +++ b/drivers/clk/ux500/u9540_clk.c | |||
| @@ -0,0 +1,21 @@ | |||
| 1 | /* | ||
| 2 | * Clock definitions for u9540 platform. | ||
| 3 | * | ||
| 4 | * Copyright (C) 2012 ST-Ericsson SA | ||
| 5 | * Author: Ulf Hansson <ulf.hansson@linaro.org> | ||
| 6 | * | ||
| 7 | * License terms: GNU General Public License (GPL) version 2 | ||
| 8 | */ | ||
| 9 | |||
| 10 | #include <linux/clk.h> | ||
| 11 | #include <linux/clkdev.h> | ||
| 12 | #include <linux/clk-provider.h> | ||
| 13 | #include <linux/mfd/dbx500-prcmu.h> | ||
| 14 | #include <linux/platform_data/clk-ux500.h> | ||
| 15 | |||
| 16 | #include "clk.h" | ||
| 17 | |||
| 18 | void u9540_clk_init(void) | ||
| 19 | { | ||
| 20 | /* register clocks here */ | ||
| 21 | } | ||
diff --git a/drivers/clk/versatile/Makefile b/drivers/clk/versatile/Makefile index 50cf6a2ee693..c0a0f6478798 100644 --- a/drivers/clk/versatile/Makefile +++ b/drivers/clk/versatile/Makefile | |||
| @@ -1,3 +1,4 @@ | |||
| 1 | # Makefile for Versatile-specific clocks | 1 | # Makefile for Versatile-specific clocks |
| 2 | obj-$(CONFIG_ICST) += clk-icst.o | 2 | obj-$(CONFIG_ICST) += clk-icst.o |
| 3 | obj-$(CONFIG_ARCH_INTEGRATOR) += clk-integrator.o | 3 | obj-$(CONFIG_ARCH_INTEGRATOR) += clk-integrator.o |
| 4 | obj-$(CONFIG_ARCH_REALVIEW) += clk-realview.o | ||
diff --git a/drivers/clk/versatile/clk-realview.c b/drivers/clk/versatile/clk-realview.c new file mode 100644 index 000000000000..e21a99cef378 --- /dev/null +++ b/drivers/clk/versatile/clk-realview.c | |||
| @@ -0,0 +1,114 @@ | |||
| 1 | #include <linux/clk.h> | ||
| 2 | #include <linux/clkdev.h> | ||
| 3 | #include <linux/err.h> | ||
| 4 | #include <linux/io.h> | ||
| 5 | #include <linux/clk-provider.h> | ||
| 6 | |||
| 7 | #include <mach/hardware.h> | ||
| 8 | #include <mach/platform.h> | ||
| 9 | |||
| 10 | #include "clk-icst.h" | ||
| 11 | |||
| 12 | /* | ||
| 13 | * Implementation of the ARM RealView clock trees. | ||
| 14 | */ | ||
| 15 | |||
| 16 | static void __iomem *sys_lock; | ||
| 17 | static void __iomem *sys_vcoreg; | ||
| 18 | |||
| 19 | /** | ||
| 20 | * realview_oscvco_get() - get ICST OSC settings for the RealView | ||
| 21 | */ | ||
| 22 | static struct icst_vco realview_oscvco_get(void) | ||
| 23 | { | ||
| 24 | u32 val; | ||
| 25 | struct icst_vco vco; | ||
| 26 | |||
| 27 | val = readl(sys_vcoreg); | ||
| 28 | vco.v = val & 0x1ff; | ||
| 29 | vco.r = (val >> 9) & 0x7f; | ||
| 30 | vco.s = (val >> 16) & 03; | ||
| 31 | return vco; | ||
| 32 | } | ||
| 33 | |||
| 34 | static void realview_oscvco_set(struct icst_vco vco) | ||
| 35 | { | ||
| 36 | u32 val; | ||
| 37 | |||
| 38 | val = readl(sys_vcoreg) & ~0x7ffff; | ||
| 39 | val |= vco.v | (vco.r << 9) | (vco.s << 16); | ||
| 40 | |||
| 41 | /* This magic unlocks the CM VCO so it can be controlled */ | ||
| 42 | writel(0xa05f, sys_lock); | ||
| 43 | writel(val, sys_vcoreg); | ||
| 44 | /* This locks the CM again */ | ||
| 45 | writel(0, sys_lock); | ||
| 46 | } | ||
| 47 | |||
| 48 | static const struct icst_params realview_oscvco_params = { | ||
| 49 | .ref = 24000000, | ||
| 50 | .vco_max = ICST307_VCO_MAX, | ||
| 51 | .vco_min = ICST307_VCO_MIN, | ||
| 52 | .vd_min = 4 + 8, | ||
| 53 | .vd_max = 511 + 8, | ||
| 54 | .rd_min = 1 + 2, | ||
| 55 | .rd_max = 127 + 2, | ||
| 56 | .s2div = icst307_s2div, | ||
| 57 | .idx2s = icst307_idx2s, | ||
| 58 | }; | ||
| 59 | |||
| 60 | static const struct clk_icst_desc __initdata realview_icst_desc = { | ||
| 61 | .params = &realview_oscvco_params, | ||
| 62 | .getvco = realview_oscvco_get, | ||
| 63 | .setvco = realview_oscvco_set, | ||
| 64 | }; | ||
| 65 | |||
| 66 | /* | ||
| 67 | * realview_clk_init() - set up the RealView clock tree | ||
| 68 | */ | ||
| 69 | void __init realview_clk_init(void __iomem *sysbase, bool is_pb1176) | ||
| 70 | { | ||
| 71 | struct clk *clk; | ||
| 72 | |||
| 73 | sys_lock = sysbase + REALVIEW_SYS_LOCK_OFFSET; | ||
| 74 | if (is_pb1176) | ||
| 75 | sys_vcoreg = sysbase + REALVIEW_SYS_OSC0_OFFSET; | ||
| 76 | else | ||
| 77 | sys_vcoreg = sysbase + REALVIEW_SYS_OSC4_OFFSET; | ||
| 78 | |||
| 79 | |||
| 80 | /* APB clock dummy */ | ||
| 81 | clk = clk_register_fixed_rate(NULL, "apb_pclk", NULL, CLK_IS_ROOT, 0); | ||
| 82 | clk_register_clkdev(clk, "apb_pclk", NULL); | ||
| 83 | |||
| 84 | /* 24 MHz clock */ | ||
| 85 | clk = clk_register_fixed_rate(NULL, "clk24mhz", NULL, CLK_IS_ROOT, | ||
| 86 | 24000000); | ||
| 87 | clk_register_clkdev(clk, NULL, "dev:uart0"); | ||
| 88 | clk_register_clkdev(clk, NULL, "dev:uart1"); | ||
| 89 | clk_register_clkdev(clk, NULL, "dev:uart2"); | ||
| 90 | clk_register_clkdev(clk, NULL, "fpga:kmi0"); | ||
| 91 | clk_register_clkdev(clk, NULL, "fpga:kmi1"); | ||
| 92 | clk_register_clkdev(clk, NULL, "fpga:mmc0"); | ||
| 93 | clk_register_clkdev(clk, NULL, "dev:ssp0"); | ||
| 94 | if (is_pb1176) { | ||
| 95 | /* | ||
| 96 | * UART3 is on the dev chip in PB1176 | ||
| 97 | * UART4 only exists in PB1176 | ||
| 98 | */ | ||
| 99 | clk_register_clkdev(clk, NULL, "dev:uart3"); | ||
| 100 | clk_register_clkdev(clk, NULL, "dev:uart4"); | ||
| 101 | } else | ||
| 102 | clk_register_clkdev(clk, NULL, "fpga:uart3"); | ||
| 103 | |||
| 104 | |||
| 105 | /* 1 MHz clock */ | ||
| 106 | clk = clk_register_fixed_rate(NULL, "clk1mhz", NULL, CLK_IS_ROOT, | ||
| 107 | 1000000); | ||
| 108 | clk_register_clkdev(clk, NULL, "sp804"); | ||
| 109 | |||
| 110 | /* ICST VCO clock */ | ||
| 111 | clk = icst_clk_register(NULL, &realview_icst_desc); | ||
| 112 | clk_register_clkdev(clk, NULL, "dev:clcd"); | ||
| 113 | clk_register_clkdev(clk, NULL, "issp:clcd"); | ||
| 114 | } | ||
diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig index ba7926f5c099..a00b828b1643 100644 --- a/drivers/gpio/Kconfig +++ b/drivers/gpio/Kconfig | |||
| @@ -183,6 +183,12 @@ config GPIO_STA2X11 | |||
| 183 | Say yes here to support the STA2x11/ConneXt GPIO device. | 183 | Say yes here to support the STA2x11/ConneXt GPIO device. |
| 184 | The GPIO module has 128 GPIO pins with alternate functions. | 184 | The GPIO module has 128 GPIO pins with alternate functions. |
| 185 | 185 | ||
| 186 | config GPIO_VT8500 | ||
| 187 | bool "VIA/Wondermedia SoC GPIO Support" | ||
| 188 | depends on ARCH_VT8500 | ||
| 189 | help | ||
| 190 | Say yes here to support the VT8500/WM8505/WM8650 GPIO controller. | ||
| 191 | |||
| 186 | config GPIO_XILINX | 192 | config GPIO_XILINX |
| 187 | bool "Xilinx GPIO support" | 193 | bool "Xilinx GPIO support" |
| 188 | depends on PPC_OF || MICROBLAZE | 194 | depends on PPC_OF || MICROBLAZE |
diff --git a/drivers/gpio/Makefile b/drivers/gpio/Makefile index 153caceeb053..a288142ad998 100644 --- a/drivers/gpio/Makefile +++ b/drivers/gpio/Makefile | |||
| @@ -69,6 +69,7 @@ obj-$(CONFIG_GPIO_TPS65912) += gpio-tps65912.o | |||
| 69 | obj-$(CONFIG_GPIO_TWL4030) += gpio-twl4030.o | 69 | obj-$(CONFIG_GPIO_TWL4030) += gpio-twl4030.o |
| 70 | obj-$(CONFIG_GPIO_UCB1400) += gpio-ucb1400.o | 70 | obj-$(CONFIG_GPIO_UCB1400) += gpio-ucb1400.o |
| 71 | obj-$(CONFIG_GPIO_VR41XX) += gpio-vr41xx.o | 71 | obj-$(CONFIG_GPIO_VR41XX) += gpio-vr41xx.o |
| 72 | obj-$(CONFIG_GPIO_VT8500) += gpio-vt8500.o | ||
| 72 | obj-$(CONFIG_GPIO_VX855) += gpio-vx855.o | 73 | obj-$(CONFIG_GPIO_VX855) += gpio-vx855.o |
| 73 | obj-$(CONFIG_GPIO_WM831X) += gpio-wm831x.o | 74 | obj-$(CONFIG_GPIO_WM831X) += gpio-wm831x.o |
| 74 | obj-$(CONFIG_GPIO_WM8350) += gpio-wm8350.o | 75 | obj-$(CONFIG_GPIO_WM8350) += gpio-wm8350.o |
diff --git a/drivers/gpio/gpio-pxa.c b/drivers/gpio/gpio-pxa.c index 9cac88a65f78..9528779ca463 100644 --- a/drivers/gpio/gpio-pxa.c +++ b/drivers/gpio/gpio-pxa.c | |||
| @@ -26,6 +26,8 @@ | |||
| 26 | #include <linux/syscore_ops.h> | 26 | #include <linux/syscore_ops.h> |
| 27 | #include <linux/slab.h> | 27 | #include <linux/slab.h> |
| 28 | 28 | ||
| 29 | #include <asm/mach/irq.h> | ||
| 30 | |||
| 29 | #include <mach/irqs.h> | 31 | #include <mach/irqs.h> |
| 30 | 32 | ||
| 31 | /* | 33 | /* |
| @@ -59,6 +61,7 @@ | |||
| 59 | #define BANK_OFF(n) (((n) < 3) ? (n) << 2 : 0x100 + (((n) - 3) << 2)) | 61 | #define BANK_OFF(n) (((n) < 3) ? (n) << 2 : 0x100 + (((n) - 3) << 2)) |
| 60 | 62 | ||
| 61 | int pxa_last_gpio; | 63 | int pxa_last_gpio; |
| 64 | static int irq_base; | ||
| 62 | 65 | ||
| 63 | #ifdef CONFIG_OF | 66 | #ifdef CONFIG_OF |
| 64 | static struct irq_domain *domain; | 67 | static struct irq_domain *domain; |
| @@ -167,63 +170,14 @@ static inline int __gpio_is_occupied(unsigned gpio) | |||
| 167 | return ret; | 170 | return ret; |
| 168 | } | 171 | } |
| 169 | 172 | ||
| 170 | #ifdef CONFIG_ARCH_PXA | ||
| 171 | static inline int __pxa_gpio_to_irq(int gpio) | ||
| 172 | { | ||
| 173 | if (gpio_is_pxa_type(gpio_type)) | ||
| 174 | return PXA_GPIO_TO_IRQ(gpio); | ||
| 175 | return -1; | ||
| 176 | } | ||
| 177 | |||
| 178 | static inline int __pxa_irq_to_gpio(int irq) | ||
| 179 | { | ||
| 180 | if (gpio_is_pxa_type(gpio_type)) | ||
| 181 | return irq - PXA_GPIO_TO_IRQ(0); | ||
| 182 | return -1; | ||
| 183 | } | ||
| 184 | #else | ||
| 185 | static inline int __pxa_gpio_to_irq(int gpio) { return -1; } | ||
| 186 | static inline int __pxa_irq_to_gpio(int irq) { return -1; } | ||
| 187 | #endif | ||
| 188 | |||
| 189 | #ifdef CONFIG_ARCH_MMP | ||
| 190 | static inline int __mmp_gpio_to_irq(int gpio) | ||
| 191 | { | ||
| 192 | if (gpio_is_mmp_type(gpio_type)) | ||
| 193 | return MMP_GPIO_TO_IRQ(gpio); | ||
| 194 | return -1; | ||
| 195 | } | ||
| 196 | |||
| 197 | static inline int __mmp_irq_to_gpio(int irq) | ||
| 198 | { | ||
| 199 | if (gpio_is_mmp_type(gpio_type)) | ||
| 200 | return irq - MMP_GPIO_TO_IRQ(0); | ||
| 201 | return -1; | ||
| 202 | } | ||
| 203 | #else | ||
| 204 | static inline int __mmp_gpio_to_irq(int gpio) { return -1; } | ||
| 205 | static inline int __mmp_irq_to_gpio(int irq) { return -1; } | ||
| 206 | #endif | ||
| 207 | |||
| 208 | static int pxa_gpio_to_irq(struct gpio_chip *chip, unsigned offset) | 173 | static int pxa_gpio_to_irq(struct gpio_chip *chip, unsigned offset) |
| 209 | { | 174 | { |
| 210 | int gpio, ret; | 175 | return chip->base + offset + irq_base; |
| 211 | |||
| 212 | gpio = chip->base + offset; | ||
| 213 | ret = __pxa_gpio_to_irq(gpio); | ||
| 214 | if (ret >= 0) | ||
| 215 | return ret; | ||
| 216 | return __mmp_gpio_to_irq(gpio); | ||
| 217 | } | 176 | } |
| 218 | 177 | ||
| 219 | int pxa_irq_to_gpio(int irq) | 178 | int pxa_irq_to_gpio(int irq) |
| 220 | { | 179 | { |
| 221 | int ret; | 180 | return irq - irq_base; |
| 222 | |||
| 223 | ret = __pxa_irq_to_gpio(irq); | ||
| 224 | if (ret >= 0) | ||
| 225 | return ret; | ||
| 226 | return __mmp_irq_to_gpio(irq); | ||
| 227 | } | 181 | } |
| 228 | 182 | ||
| 229 | static int pxa_gpio_direction_input(struct gpio_chip *chip, unsigned offset) | 183 | static int pxa_gpio_direction_input(struct gpio_chip *chip, unsigned offset) |
| @@ -403,6 +357,9 @@ static void pxa_gpio_demux_handler(unsigned int irq, struct irq_desc *desc) | |||
| 403 | struct pxa_gpio_chip *c; | 357 | struct pxa_gpio_chip *c; |
| 404 | int loop, gpio, gpio_base, n; | 358 | int loop, gpio, gpio_base, n; |
| 405 | unsigned long gedr; | 359 | unsigned long gedr; |
| 360 | struct irq_chip *chip = irq_desc_get_chip(desc); | ||
| 361 | |||
| 362 | chained_irq_enter(chip, desc); | ||
| 406 | 363 | ||
| 407 | do { | 364 | do { |
| 408 | loop = 0; | 365 | loop = 0; |
| @@ -422,6 +379,8 @@ static void pxa_gpio_demux_handler(unsigned int irq, struct irq_desc *desc) | |||
| 422 | } | 379 | } |
| 423 | } | 380 | } |
| 424 | } while (loop); | 381 | } while (loop); |
| 382 | |||
| 383 | chained_irq_exit(chip, desc); | ||
| 425 | } | 384 | } |
| 426 | 385 | ||
| 427 | static void pxa_ack_muxed_gpio(struct irq_data *d) | 386 | static void pxa_ack_muxed_gpio(struct irq_data *d) |
| @@ -535,7 +494,7 @@ const struct irq_domain_ops pxa_irq_domain_ops = { | |||
| 535 | 494 | ||
| 536 | static int __devinit pxa_gpio_probe_dt(struct platform_device *pdev) | 495 | static int __devinit pxa_gpio_probe_dt(struct platform_device *pdev) |
| 537 | { | 496 | { |
| 538 | int ret, nr_banks, nr_gpios, irq_base; | 497 | int ret, nr_banks, nr_gpios; |
| 539 | struct device_node *prev, *next, *np = pdev->dev.of_node; | 498 | struct device_node *prev, *next, *np = pdev->dev.of_node; |
| 540 | const struct of_device_id *of_id = | 499 | const struct of_device_id *of_id = |
| 541 | of_match_device(pxa_gpio_dt_ids, &pdev->dev); | 500 | of_match_device(pxa_gpio_dt_ids, &pdev->dev); |
| @@ -590,10 +549,20 @@ static int __devinit pxa_gpio_probe(struct platform_device *pdev) | |||
| 590 | int irq0 = 0, irq1 = 0, irq_mux, gpio_offset = 0; | 549 | int irq0 = 0, irq1 = 0, irq_mux, gpio_offset = 0; |
| 591 | 550 | ||
| 592 | ret = pxa_gpio_probe_dt(pdev); | 551 | ret = pxa_gpio_probe_dt(pdev); |
| 593 | if (ret < 0) | 552 | if (ret < 0) { |
| 594 | pxa_last_gpio = pxa_gpio_nums(); | 553 | pxa_last_gpio = pxa_gpio_nums(); |
| 595 | else | 554 | #ifdef CONFIG_ARCH_PXA |
| 555 | if (gpio_is_pxa_type(gpio_type)) | ||
| 556 | irq_base = PXA_GPIO_TO_IRQ(0); | ||
| 557 | #endif | ||
| 558 | #ifdef CONFIG_ARCH_MMP | ||
| 559 | if (gpio_is_mmp_type(gpio_type)) | ||
| 560 | irq_base = MMP_GPIO_TO_IRQ(0); | ||
| 561 | #endif | ||
| 562 | } else { | ||
| 596 | use_of = 1; | 563 | use_of = 1; |
| 564 | } | ||
| 565 | |||
| 597 | if (!pxa_last_gpio) | 566 | if (!pxa_last_gpio) |
| 598 | return -EINVAL; | 567 | return -EINVAL; |
| 599 | 568 | ||
diff --git a/drivers/gpio/gpio-samsung.c b/drivers/gpio/gpio-samsung.c index ba126cc04073..f4814a889a5b 100644 --- a/drivers/gpio/gpio-samsung.c +++ b/drivers/gpio/gpio-samsung.c | |||
| @@ -938,6 +938,67 @@ static void __init samsung_gpiolib_add(struct samsung_gpio_chip *chip) | |||
| 938 | s3c_gpiolib_track(chip); | 938 | s3c_gpiolib_track(chip); |
| 939 | } | 939 | } |
| 940 | 940 | ||
| 941 | #if defined(CONFIG_PLAT_S3C24XX) && defined(CONFIG_OF) | ||
| 942 | static int s3c24xx_gpio_xlate(struct gpio_chip *gc, | ||
| 943 | const struct of_phandle_args *gpiospec, u32 *flags) | ||
| 944 | { | ||
| 945 | unsigned int pin; | ||
| 946 | |||
| 947 | if (WARN_ON(gc->of_gpio_n_cells < 3)) | ||
| 948 | return -EINVAL; | ||
| 949 | |||
| 950 | if (WARN_ON(gpiospec->args_count < gc->of_gpio_n_cells)) | ||
| 951 | return -EINVAL; | ||
| 952 | |||
| 953 | if (gpiospec->args[0] > gc->ngpio) | ||
| 954 | return -EINVAL; | ||
| 955 | |||
| 956 | pin = gc->base + gpiospec->args[0]; | ||
| 957 | |||
| 958 | if (s3c_gpio_cfgpin(pin, S3C_GPIO_SFN(gpiospec->args[1]))) | ||
| 959 | pr_warn("gpio_xlate: failed to set pin function\n"); | ||
| 960 | if (s3c_gpio_setpull(pin, gpiospec->args[2] & 0xffff)) | ||
| 961 | pr_warn("gpio_xlate: failed to set pin pull up/down\n"); | ||
| 962 | |||
| 963 | if (flags) | ||
| 964 | *flags = gpiospec->args[2] >> 16; | ||
| 965 | |||
| 966 | return gpiospec->args[0]; | ||
| 967 | } | ||
| 968 | |||
| 969 | static const struct of_device_id s3c24xx_gpio_dt_match[] __initdata = { | ||
| 970 | { .compatible = "samsung,s3c24xx-gpio", }, | ||
| 971 | {} | ||
| 972 | }; | ||
| 973 | |||
| 974 | static __init void s3c24xx_gpiolib_attach_ofnode(struct samsung_gpio_chip *chip, | ||
| 975 | u64 base, u64 offset) | ||
| 976 | { | ||
| 977 | struct gpio_chip *gc = &chip->chip; | ||
| 978 | u64 address; | ||
| 979 | |||
| 980 | if (!of_have_populated_dt()) | ||
| 981 | return; | ||
| 982 | |||
| 983 | address = chip->base ? base + ((u32)chip->base & 0xfff) : base + offset; | ||
| 984 | gc->of_node = of_find_matching_node_by_address(NULL, | ||
| 985 | s3c24xx_gpio_dt_match, address); | ||
| 986 | if (!gc->of_node) { | ||
| 987 | pr_info("gpio: device tree node not found for gpio controller" | ||
| 988 | " with base address %08llx\n", address); | ||
| 989 | return; | ||
| 990 | } | ||
| 991 | gc->of_gpio_n_cells = 3; | ||
| 992 | gc->of_xlate = s3c24xx_gpio_xlate; | ||
| 993 | } | ||
| 994 | #else | ||
| 995 | static __init void s3c24xx_gpiolib_attach_ofnode(struct samsung_gpio_chip *chip, | ||
| 996 | u64 base, u64 offset) | ||
| 997 | { | ||
| 998 | return; | ||
| 999 | } | ||
| 1000 | #endif /* defined(CONFIG_PLAT_S3C24XX) && defined(CONFIG_OF) */ | ||
| 1001 | |||
| 941 | static void __init s3c24xx_gpiolib_add_chips(struct samsung_gpio_chip *chip, | 1002 | static void __init s3c24xx_gpiolib_add_chips(struct samsung_gpio_chip *chip, |
| 942 | int nr_chips, void __iomem *base) | 1003 | int nr_chips, void __iomem *base) |
| 943 | { | 1004 | { |
| @@ -962,6 +1023,8 @@ static void __init s3c24xx_gpiolib_add_chips(struct samsung_gpio_chip *chip, | |||
| 962 | gc->direction_output = samsung_gpiolib_2bit_output; | 1023 | gc->direction_output = samsung_gpiolib_2bit_output; |
| 963 | 1024 | ||
| 964 | samsung_gpiolib_add(chip); | 1025 | samsung_gpiolib_add(chip); |
| 1026 | |||
| 1027 | s3c24xx_gpiolib_attach_ofnode(chip, S3C24XX_PA_GPIO, i * 0x10); | ||
| 965 | } | 1028 | } |
| 966 | } | 1029 | } |
| 967 | 1030 | ||
diff --git a/drivers/gpio/gpio-vt8500.c b/drivers/gpio/gpio-vt8500.c new file mode 100644 index 000000000000..bcd8e4aa7c7d --- /dev/null +++ b/drivers/gpio/gpio-vt8500.c | |||
| @@ -0,0 +1,316 @@ | |||
| 1 | /* drivers/gpio/gpio-vt8500.c | ||
| 2 | * | ||
| 3 | * Copyright (C) 2012 Tony Prisk <linux@prisktech.co.nz> | ||
| 4 | * Based on arch/arm/mach-vt8500/gpio.c: | ||
| 5 | * - Copyright (C) 2010 Alexey Charkov <alchark@gmail.com> | ||
| 6 | * | ||
| 7 | * This software is licensed under the terms of the GNU General Public | ||
| 8 | * License version 2, as published by the Free Software Foundation, and | ||
| 9 | * may be copied, distributed, and modified under those terms. | ||
| 10 | * | ||
| 11 | * This program is distributed in the hope that it will be useful, | ||
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | * GNU General Public License for more details. | ||
| 15 | * | ||
| 16 | */ | ||
| 17 | |||
| 18 | #include <linux/module.h> | ||
| 19 | #include <linux/err.h> | ||
| 20 | #include <linux/io.h> | ||
| 21 | #include <linux/gpio.h> | ||
| 22 | #include <linux/platform_device.h> | ||
| 23 | #include <linux/bitops.h> | ||
| 24 | #include <linux/of.h> | ||
| 25 | #include <linux/of_address.h> | ||
| 26 | #include <linux/of_irq.h> | ||
| 27 | #include <linux/of_device.h> | ||
| 28 | |||
| 29 | /* | ||
| 30 | We handle GPIOs by bank, each bank containing up to 32 GPIOs covered | ||
| 31 | by one set of registers (although not all may be valid). | ||
| 32 | |||
| 33 | Because different SoC's have different register offsets, we pass the | ||
| 34 | register offsets as data in vt8500_gpio_dt_ids[]. | ||
| 35 | |||
| 36 | A value of NO_REG is used to indicate that this register is not | ||
| 37 | supported. Only used for ->en at the moment. | ||
| 38 | */ | ||
| 39 | |||
| 40 | #define NO_REG 0xFFFF | ||
| 41 | |||
| 42 | /* | ||
| 43 | * struct vt8500_gpio_bank_regoffsets | ||
| 44 | * @en: offset to enable register of the bank | ||
| 45 | * @dir: offset to direction register of the bank | ||
| 46 | * @data_out: offset to the data out register of the bank | ||
| 47 | * @data_in: offset to the data in register of the bank | ||
| 48 | * @ngpio: highest valid pin in this bank | ||
| 49 | */ | ||
| 50 | |||
| 51 | struct vt8500_gpio_bank_regoffsets { | ||
| 52 | unsigned int en; | ||
| 53 | unsigned int dir; | ||
| 54 | unsigned int data_out; | ||
| 55 | unsigned int data_in; | ||
| 56 | unsigned char ngpio; | ||
| 57 | }; | ||
| 58 | |||
| 59 | struct vt8500_gpio_data { | ||
| 60 | unsigned int num_banks; | ||
| 61 | struct vt8500_gpio_bank_regoffsets banks[]; | ||
| 62 | }; | ||
| 63 | |||
| 64 | #define VT8500_BANK(__en, __dir, __out, __in, __ngpio) \ | ||
| 65 | { \ | ||
| 66 | .en = __en, \ | ||
| 67 | .dir = __dir, \ | ||
| 68 | .data_out = __out, \ | ||
| 69 | .data_in = __in, \ | ||
| 70 | .ngpio = __ngpio, \ | ||
| 71 | } | ||
| 72 | |||
| 73 | static struct vt8500_gpio_data vt8500_data = { | ||
| 74 | .num_banks = 7, | ||
| 75 | .banks = { | ||
| 76 | VT8500_BANK(0x00, 0x20, 0x40, 0x60, 26), | ||
| 77 | VT8500_BANK(0x04, 0x24, 0x44, 0x64, 28), | ||
| 78 | VT8500_BANK(0x08, 0x28, 0x48, 0x68, 31), | ||
| 79 | VT8500_BANK(0x0C, 0x2C, 0x4C, 0x6C, 19), | ||
| 80 | VT8500_BANK(0x10, 0x30, 0x50, 0x70, 19), | ||
| 81 | VT8500_BANK(0x14, 0x34, 0x54, 0x74, 23), | ||
| 82 | VT8500_BANK(NO_REG, 0x3C, 0x5C, 0x7C, 9), | ||
| 83 | }, | ||
| 84 | }; | ||
| 85 | |||
| 86 | static struct vt8500_gpio_data wm8505_data = { | ||
| 87 | .num_banks = 10, | ||
| 88 | .banks = { | ||
| 89 | VT8500_BANK(0x40, 0x68, 0x90, 0xB8, 8), | ||
| 90 | VT8500_BANK(0x44, 0x6C, 0x94, 0xBC, 32), | ||
| 91 | VT8500_BANK(0x48, 0x70, 0x98, 0xC0, 6), | ||
| 92 | VT8500_BANK(0x4C, 0x74, 0x9C, 0xC4, 16), | ||
| 93 | VT8500_BANK(0x50, 0x78, 0xA0, 0xC8, 25), | ||
| 94 | VT8500_BANK(0x54, 0x7C, 0xA4, 0xCC, 5), | ||
| 95 | VT8500_BANK(0x58, 0x80, 0xA8, 0xD0, 5), | ||
| 96 | VT8500_BANK(0x5C, 0x84, 0xAC, 0xD4, 12), | ||
| 97 | VT8500_BANK(0x60, 0x88, 0xB0, 0xD8, 16), | ||
| 98 | VT8500_BANK(0x64, 0x8C, 0xB4, 0xDC, 22), | ||
| 99 | }, | ||
| 100 | }; | ||
| 101 | |||
| 102 | /* | ||
| 103 | * No information about which bits are valid so we just make | ||
| 104 | * them all available until its figured out. | ||
| 105 | */ | ||
| 106 | static struct vt8500_gpio_data wm8650_data = { | ||
| 107 | .num_banks = 9, | ||
| 108 | .banks = { | ||
| 109 | VT8500_BANK(0x40, 0x80, 0xC0, 0x00, 32), | ||
| 110 | VT8500_BANK(0x44, 0x84, 0xC4, 0x04, 32), | ||
| 111 | VT8500_BANK(0x48, 0x88, 0xC8, 0x08, 32), | ||
| 112 | VT8500_BANK(0x4C, 0x8C, 0xCC, 0x0C, 32), | ||
| 113 | VT8500_BANK(0x50, 0x90, 0xD0, 0x10, 32), | ||
| 114 | VT8500_BANK(0x54, 0x94, 0xD4, 0x14, 32), | ||
| 115 | VT8500_BANK(0x58, 0x98, 0xD8, 0x18, 32), | ||
| 116 | VT8500_BANK(0x5C, 0x9C, 0xDC, 0x1C, 32), | ||
| 117 | VT8500_BANK(0x7C, 0xBC, 0xFC, 0x3C, 32), | ||
| 118 | }, | ||
| 119 | }; | ||
| 120 | |||
| 121 | struct vt8500_gpio_chip { | ||
| 122 | struct gpio_chip chip; | ||
| 123 | |||
| 124 | const struct vt8500_gpio_bank_regoffsets *regs; | ||
| 125 | void __iomem *base; | ||
| 126 | }; | ||
| 127 | |||
| 128 | |||
| 129 | #define to_vt8500(__chip) container_of(__chip, struct vt8500_gpio_chip, chip) | ||
| 130 | |||
| 131 | static int vt8500_gpio_request(struct gpio_chip *chip, unsigned offset) | ||
| 132 | { | ||
| 133 | u32 val; | ||
| 134 | struct vt8500_gpio_chip *vt8500_chip = to_vt8500(chip); | ||
| 135 | |||
| 136 | if (vt8500_chip->regs->en == NO_REG) | ||
| 137 | return 0; | ||
| 138 | |||
| 139 | val = readl_relaxed(vt8500_chip->base + vt8500_chip->regs->en); | ||
| 140 | val |= BIT(offset); | ||
| 141 | writel_relaxed(val, vt8500_chip->base + vt8500_chip->regs->en); | ||
| 142 | |||
| 143 | return 0; | ||
| 144 | } | ||
| 145 | |||
| 146 | static void vt8500_gpio_free(struct gpio_chip *chip, unsigned offset) | ||
| 147 | { | ||
| 148 | struct vt8500_gpio_chip *vt8500_chip = to_vt8500(chip); | ||
| 149 | u32 val; | ||
| 150 | |||
| 151 | if (vt8500_chip->regs->en == NO_REG) | ||
| 152 | return; | ||
| 153 | |||
| 154 | val = readl_relaxed(vt8500_chip->base + vt8500_chip->regs->en); | ||
| 155 | val &= ~BIT(offset); | ||
| 156 | writel_relaxed(val, vt8500_chip->base + vt8500_chip->regs->en); | ||
| 157 | } | ||
| 158 | |||
| 159 | static int vt8500_gpio_direction_input(struct gpio_chip *chip, unsigned offset) | ||
| 160 | { | ||
| 161 | struct vt8500_gpio_chip *vt8500_chip = to_vt8500(chip); | ||
| 162 | |||
| 163 | u32 val = readl_relaxed(vt8500_chip->base + vt8500_chip->regs->dir); | ||
| 164 | val &= ~BIT(offset); | ||
| 165 | writel_relaxed(val, vt8500_chip->base + vt8500_chip->regs->dir); | ||
| 166 | |||
| 167 | return 0; | ||
| 168 | } | ||
| 169 | |||
| 170 | static int vt8500_gpio_direction_output(struct gpio_chip *chip, unsigned offset, | ||
| 171 | int value) | ||
| 172 | { | ||
| 173 | struct vt8500_gpio_chip *vt8500_chip = to_vt8500(chip); | ||
| 174 | |||
| 175 | u32 val = readl_relaxed(vt8500_chip->base + vt8500_chip->regs->dir); | ||
| 176 | val |= BIT(offset); | ||
| 177 | writel_relaxed(val, vt8500_chip->base + vt8500_chip->regs->dir); | ||
| 178 | |||
| 179 | if (value) { | ||
| 180 | val = readl_relaxed(vt8500_chip->base + | ||
| 181 | vt8500_chip->regs->data_out); | ||
| 182 | val |= BIT(offset); | ||
| 183 | writel_relaxed(val, vt8500_chip->base + | ||
| 184 | vt8500_chip->regs->data_out); | ||
| 185 | } | ||
| 186 | return 0; | ||
| 187 | } | ||
| 188 | |||
| 189 | static int vt8500_gpio_get_value(struct gpio_chip *chip, unsigned offset) | ||
| 190 | { | ||
| 191 | struct vt8500_gpio_chip *vt8500_chip = to_vt8500(chip); | ||
| 192 | |||
| 193 | return (readl_relaxed(vt8500_chip->base + vt8500_chip->regs->data_in) >> | ||
| 194 | offset) & 1; | ||
| 195 | } | ||
| 196 | |||
| 197 | static void vt8500_gpio_set_value(struct gpio_chip *chip, unsigned offset, | ||
| 198 | int value) | ||
| 199 | { | ||
| 200 | struct vt8500_gpio_chip *vt8500_chip = to_vt8500(chip); | ||
| 201 | |||
| 202 | u32 val = readl_relaxed(vt8500_chip->base + | ||
| 203 | vt8500_chip->regs->data_out); | ||
| 204 | if (value) | ||
| 205 | val |= BIT(offset); | ||
| 206 | else | ||
| 207 | val &= ~BIT(offset); | ||
| 208 | |||
| 209 | writel_relaxed(val, vt8500_chip->base + vt8500_chip->regs->data_out); | ||
| 210 | } | ||
| 211 | |||
| 212 | static int vt8500_of_xlate(struct gpio_chip *gc, | ||
| 213 | const struct of_phandle_args *gpiospec, u32 *flags) | ||
| 214 | { | ||
| 215 | /* bank if specificed in gpiospec->args[0] */ | ||
| 216 | if (flags) | ||
| 217 | *flags = gpiospec->args[2]; | ||
| 218 | |||
| 219 | return gpiospec->args[1]; | ||
| 220 | } | ||
| 221 | |||
| 222 | static int vt8500_add_chips(struct platform_device *pdev, void __iomem *base, | ||
| 223 | const struct vt8500_gpio_data *data) | ||
| 224 | { | ||
| 225 | struct vt8500_gpio_chip *vtchip; | ||
| 226 | struct gpio_chip *chip; | ||
| 227 | int i; | ||
| 228 | int pin_cnt = 0; | ||
| 229 | |||
| 230 | vtchip = devm_kzalloc(&pdev->dev, | ||
| 231 | sizeof(struct vt8500_gpio_chip) * data->num_banks, | ||
| 232 | GFP_KERNEL); | ||
| 233 | if (!vtchip) { | ||
| 234 | pr_err("%s: failed to allocate chip memory\n", __func__); | ||
| 235 | return -ENOMEM; | ||
| 236 | } | ||
| 237 | |||
| 238 | for (i = 0; i < data->num_banks; i++) { | ||
| 239 | vtchip[i].base = base; | ||
| 240 | vtchip[i].regs = &data->banks[i]; | ||
| 241 | |||
| 242 | chip = &vtchip[i].chip; | ||
| 243 | |||
| 244 | chip->of_xlate = vt8500_of_xlate; | ||
| 245 | chip->of_gpio_n_cells = 3; | ||
| 246 | chip->of_node = pdev->dev.of_node; | ||
| 247 | |||
| 248 | chip->request = vt8500_gpio_request; | ||
| 249 | chip->free = vt8500_gpio_free; | ||
| 250 | chip->direction_input = vt8500_gpio_direction_input; | ||
| 251 | chip->direction_output = vt8500_gpio_direction_output; | ||
| 252 | chip->get = vt8500_gpio_get_value; | ||
| 253 | chip->set = vt8500_gpio_set_value; | ||
| 254 | chip->can_sleep = 0; | ||
| 255 | chip->base = pin_cnt; | ||
| 256 | chip->ngpio = data->banks[i].ngpio; | ||
| 257 | |||
| 258 | pin_cnt += data->banks[i].ngpio; | ||
| 259 | |||
| 260 | gpiochip_add(chip); | ||
| 261 | } | ||
| 262 | return 0; | ||
| 263 | } | ||
| 264 | |||
| 265 | static struct of_device_id vt8500_gpio_dt_ids[] = { | ||
| 266 | { .compatible = "via,vt8500-gpio", .data = &vt8500_data, }, | ||
| 267 | { .compatible = "wm,wm8505-gpio", .data = &wm8505_data, }, | ||
| 268 | { .compatible = "wm,wm8650-gpio", .data = &wm8650_data, }, | ||
| 269 | { /* Sentinel */ }, | ||
| 270 | }; | ||
| 271 | |||
| 272 | static int __devinit vt8500_gpio_probe(struct platform_device *pdev) | ||
| 273 | { | ||
| 274 | void __iomem *gpio_base; | ||
| 275 | struct device_node *np; | ||
| 276 | const struct of_device_id *of_id = | ||
| 277 | of_match_device(vt8500_gpio_dt_ids, &pdev->dev); | ||
| 278 | |||
| 279 | if (!of_id) { | ||
| 280 | dev_err(&pdev->dev, "Failed to find gpio controller\n"); | ||
| 281 | return -ENODEV; | ||
| 282 | } | ||
| 283 | |||
| 284 | np = pdev->dev.of_node; | ||
| 285 | if (!np) { | ||
| 286 | dev_err(&pdev->dev, "Missing GPIO description in devicetree\n"); | ||
| 287 | return -EFAULT; | ||
| 288 | } | ||
| 289 | |||
| 290 | gpio_base = of_iomap(np, 0); | ||
| 291 | if (!gpio_base) { | ||
| 292 | dev_err(&pdev->dev, "Unable to map GPIO registers\n"); | ||
| 293 | of_node_put(np); | ||
| 294 | return -ENOMEM; | ||
| 295 | } | ||
| 296 | |||
| 297 | vt8500_add_chips(pdev, gpio_base, of_id->data); | ||
| 298 | |||
| 299 | return 0; | ||
| 300 | } | ||
| 301 | |||
| 302 | static struct platform_driver vt8500_gpio_driver = { | ||
| 303 | .probe = vt8500_gpio_probe, | ||
| 304 | .driver = { | ||
| 305 | .name = "vt8500-gpio", | ||
| 306 | .owner = THIS_MODULE, | ||
| 307 | .of_match_table = vt8500_gpio_dt_ids, | ||
| 308 | }, | ||
| 309 | }; | ||
| 310 | |||
| 311 | module_platform_driver(vt8500_gpio_driver); | ||
| 312 | |||
| 313 | MODULE_DESCRIPTION("VT8500 GPIO Driver"); | ||
| 314 | MODULE_AUTHOR("Tony Prisk <linux@prisktech.co.nz>"); | ||
| 315 | MODULE_LICENSE("GPL v2"); | ||
| 316 | MODULE_DEVICE_TABLE(of, vt8500_gpio_dt_ids); | ||
diff --git a/drivers/input/misc/ab8500-ponkey.c b/drivers/input/misc/ab8500-ponkey.c index f06231b7cab1..84ec691c05aa 100644 --- a/drivers/input/misc/ab8500-ponkey.c +++ b/drivers/input/misc/ab8500-ponkey.c | |||
| @@ -74,8 +74,8 @@ static int __devinit ab8500_ponkey_probe(struct platform_device *pdev) | |||
| 74 | 74 | ||
| 75 | ponkey->idev = input; | 75 | ponkey->idev = input; |
| 76 | ponkey->ab8500 = ab8500; | 76 | ponkey->ab8500 = ab8500; |
| 77 | ponkey->irq_dbf = ab8500_irq_get_virq(ab8500, irq_dbf); | 77 | ponkey->irq_dbf = irq_dbf; |
| 78 | ponkey->irq_dbr = ab8500_irq_get_virq(ab8500, irq_dbr); | 78 | ponkey->irq_dbr = irq_dbr; |
| 79 | 79 | ||
| 80 | input->name = "AB8500 POn(PowerOn) Key"; | 80 | input->name = "AB8500 POn(PowerOn) Key"; |
| 81 | input->dev.parent = &pdev->dev; | 81 | input->dev.parent = &pdev->dev; |
diff --git a/drivers/mfd/db8500-prcmu.c b/drivers/mfd/db8500-prcmu.c index 0e63cdd9b52a..6b67edbdbd01 100644 --- a/drivers/mfd/db8500-prcmu.c +++ b/drivers/mfd/db8500-prcmu.c | |||
| @@ -418,6 +418,9 @@ static struct { | |||
| 418 | 418 | ||
| 419 | static atomic_t ac_wake_req_state = ATOMIC_INIT(0); | 419 | static atomic_t ac_wake_req_state = ATOMIC_INIT(0); |
| 420 | 420 | ||
| 421 | /* Functions definition */ | ||
| 422 | static void compute_armss_rate(void); | ||
| 423 | |||
| 421 | /* Spinlocks */ | 424 | /* Spinlocks */ |
| 422 | static DEFINE_SPINLOCK(prcmu_lock); | 425 | static DEFINE_SPINLOCK(prcmu_lock); |
| 423 | static DEFINE_SPINLOCK(clkout_lock); | 426 | static DEFINE_SPINLOCK(clkout_lock); |
| @@ -517,6 +520,7 @@ static struct dsiescclk dsiescclk[3] = { | |||
| 517 | } | 520 | } |
| 518 | }; | 521 | }; |
| 519 | 522 | ||
| 523 | |||
| 520 | /* | 524 | /* |
| 521 | * Used by MCDE to setup all necessary PRCMU registers | 525 | * Used by MCDE to setup all necessary PRCMU registers |
| 522 | */ | 526 | */ |
| @@ -1013,6 +1017,7 @@ int db8500_prcmu_set_arm_opp(u8 opp) | |||
| 1013 | (mb1_transfer.ack.arm_opp != opp)) | 1017 | (mb1_transfer.ack.arm_opp != opp)) |
| 1014 | r = -EIO; | 1018 | r = -EIO; |
| 1015 | 1019 | ||
| 1020 | compute_armss_rate(); | ||
| 1016 | mutex_unlock(&mb1_transfer.lock); | 1021 | mutex_unlock(&mb1_transfer.lock); |
| 1017 | 1022 | ||
| 1018 | return r; | 1023 | return r; |
| @@ -1612,6 +1617,7 @@ static unsigned long pll_rate(void __iomem *reg, unsigned long src_rate, | |||
| 1612 | if ((branch == PLL_FIX) || ((branch == PLL_DIV) && | 1617 | if ((branch == PLL_FIX) || ((branch == PLL_DIV) && |
| 1613 | (val & PRCM_PLL_FREQ_DIV2EN) && | 1618 | (val & PRCM_PLL_FREQ_DIV2EN) && |
| 1614 | ((reg == PRCM_PLLSOC0_FREQ) || | 1619 | ((reg == PRCM_PLLSOC0_FREQ) || |
| 1620 | (reg == PRCM_PLLARM_FREQ) || | ||
| 1615 | (reg == PRCM_PLLDDR_FREQ)))) | 1621 | (reg == PRCM_PLLDDR_FREQ)))) |
| 1616 | div *= 2; | 1622 | div *= 2; |
| 1617 | 1623 | ||
| @@ -1661,6 +1667,39 @@ static unsigned long clock_rate(u8 clock) | |||
| 1661 | else | 1667 | else |
| 1662 | return 0; | 1668 | return 0; |
| 1663 | } | 1669 | } |
| 1670 | static unsigned long latest_armss_rate; | ||
| 1671 | static unsigned long armss_rate(void) | ||
| 1672 | { | ||
| 1673 | return latest_armss_rate; | ||
| 1674 | } | ||
| 1675 | |||
| 1676 | static void compute_armss_rate(void) | ||
| 1677 | { | ||
| 1678 | u32 r; | ||
| 1679 | unsigned long rate; | ||
| 1680 | |||
| 1681 | r = readl(PRCM_ARM_CHGCLKREQ); | ||
| 1682 | |||
| 1683 | if (r & PRCM_ARM_CHGCLKREQ_PRCM_ARM_CHGCLKREQ) { | ||
| 1684 | /* External ARMCLKFIX clock */ | ||
| 1685 | |||
| 1686 | rate = pll_rate(PRCM_PLLDDR_FREQ, ROOT_CLOCK_RATE, PLL_FIX); | ||
| 1687 | |||
| 1688 | /* Check PRCM_ARM_CHGCLKREQ divider */ | ||
| 1689 | if (!(r & PRCM_ARM_CHGCLKREQ_PRCM_ARM_DIVSEL)) | ||
| 1690 | rate /= 2; | ||
| 1691 | |||
| 1692 | /* Check PRCM_ARMCLKFIX_MGT divider */ | ||
| 1693 | r = readl(PRCM_ARMCLKFIX_MGT); | ||
| 1694 | r &= PRCM_CLK_MGT_CLKPLLDIV_MASK; | ||
| 1695 | rate /= r; | ||
| 1696 | |||
| 1697 | } else {/* ARM PLL */ | ||
| 1698 | rate = pll_rate(PRCM_PLLARM_FREQ, ROOT_CLOCK_RATE, PLL_DIV); | ||
| 1699 | } | ||
| 1700 | |||
| 1701 | latest_armss_rate = rate; | ||
| 1702 | } | ||
| 1664 | 1703 | ||
| 1665 | static unsigned long dsiclk_rate(u8 n) | 1704 | static unsigned long dsiclk_rate(u8 n) |
| 1666 | { | 1705 | { |
| @@ -1707,6 +1746,8 @@ unsigned long prcmu_clock_rate(u8 clock) | |||
| 1707 | return pll_rate(PRCM_PLLSOC0_FREQ, ROOT_CLOCK_RATE, PLL_RAW); | 1746 | return pll_rate(PRCM_PLLSOC0_FREQ, ROOT_CLOCK_RATE, PLL_RAW); |
| 1708 | else if (clock == PRCMU_PLLSOC1) | 1747 | else if (clock == PRCMU_PLLSOC1) |
| 1709 | return pll_rate(PRCM_PLLSOC1_FREQ, ROOT_CLOCK_RATE, PLL_RAW); | 1748 | return pll_rate(PRCM_PLLSOC1_FREQ, ROOT_CLOCK_RATE, PLL_RAW); |
| 1749 | else if (clock == PRCMU_ARMSS) | ||
| 1750 | return armss_rate(); | ||
| 1710 | else if (clock == PRCMU_PLLDDR) | 1751 | else if (clock == PRCMU_PLLDDR) |
| 1711 | return pll_rate(PRCM_PLLDDR_FREQ, ROOT_CLOCK_RATE, PLL_RAW); | 1752 | return pll_rate(PRCM_PLLDDR_FREQ, ROOT_CLOCK_RATE, PLL_RAW); |
| 1712 | else if (clock == PRCMU_PLLDSI) | 1753 | else if (clock == PRCMU_PLLDSI) |
| @@ -2693,6 +2734,7 @@ void __init db8500_prcmu_early_init(void) | |||
| 2693 | handle_simple_irq); | 2734 | handle_simple_irq); |
| 2694 | set_irq_flags(irq, IRQF_VALID); | 2735 | set_irq_flags(irq, IRQF_VALID); |
| 2695 | } | 2736 | } |
| 2737 | compute_armss_rate(); | ||
| 2696 | } | 2738 | } |
| 2697 | 2739 | ||
| 2698 | static void __init init_prcm_registers(void) | 2740 | static void __init init_prcm_registers(void) |
diff --git a/drivers/mfd/dbx500-prcmu-regs.h b/drivers/mfd/dbx500-prcmu-regs.h index 23108a6e3167..79c76ebdba52 100644 --- a/drivers/mfd/dbx500-prcmu-regs.h +++ b/drivers/mfd/dbx500-prcmu-regs.h | |||
| @@ -61,7 +61,8 @@ | |||
| 61 | #define PRCM_PLLARM_LOCKP_PRCM_PLLARM_LOCKP3 0x2 | 61 | #define PRCM_PLLARM_LOCKP_PRCM_PLLARM_LOCKP3 0x2 |
| 62 | 62 | ||
| 63 | #define PRCM_ARM_CHGCLKREQ (_PRCMU_BASE + 0x114) | 63 | #define PRCM_ARM_CHGCLKREQ (_PRCMU_BASE + 0x114) |
| 64 | #define PRCM_ARM_CHGCLKREQ_PRCM_ARM_CHGCLKREQ 0x1 | 64 | #define PRCM_ARM_CHGCLKREQ_PRCM_ARM_CHGCLKREQ BIT(0) |
| 65 | #define PRCM_ARM_CHGCLKREQ_PRCM_ARM_DIVSEL BIT(16) | ||
| 65 | 66 | ||
| 66 | #define PRCM_PLLARM_ENABLE (_PRCMU_BASE + 0x98) | 67 | #define PRCM_PLLARM_ENABLE (_PRCMU_BASE + 0x98) |
| 67 | #define PRCM_PLLARM_ENABLE_PRCM_PLLARM_ENABLE 0x1 | 68 | #define PRCM_PLLARM_ENABLE_PRCM_PLLARM_ENABLE 0x1 |
| @@ -140,6 +141,7 @@ | |||
| 140 | /* PRCMU clock/PLL/reset registers */ | 141 | /* PRCMU clock/PLL/reset registers */ |
| 141 | #define PRCM_PLLSOC0_FREQ (_PRCMU_BASE + 0x080) | 142 | #define PRCM_PLLSOC0_FREQ (_PRCMU_BASE + 0x080) |
| 142 | #define PRCM_PLLSOC1_FREQ (_PRCMU_BASE + 0x084) | 143 | #define PRCM_PLLSOC1_FREQ (_PRCMU_BASE + 0x084) |
| 144 | #define PRCM_PLLARM_FREQ (_PRCMU_BASE + 0x088) | ||
| 143 | #define PRCM_PLLDDR_FREQ (_PRCMU_BASE + 0x08C) | 145 | #define PRCM_PLLDDR_FREQ (_PRCMU_BASE + 0x08C) |
| 144 | #define PRCM_PLL_FREQ_D_SHIFT 0 | 146 | #define PRCM_PLL_FREQ_D_SHIFT 0 |
| 145 | #define PRCM_PLL_FREQ_D_MASK BITS(0, 7) | 147 | #define PRCM_PLL_FREQ_D_MASK BITS(0, 7) |
diff --git a/drivers/mtd/nand/pxa3xx_nand.c b/drivers/mtd/nand/pxa3xx_nand.c index 252aaefcacfa..d944d6ef7da8 100644 --- a/drivers/mtd/nand/pxa3xx_nand.c +++ b/drivers/mtd/nand/pxa3xx_nand.c | |||
| @@ -22,6 +22,8 @@ | |||
| 22 | #include <linux/io.h> | 22 | #include <linux/io.h> |
| 23 | #include <linux/irq.h> | 23 | #include <linux/irq.h> |
| 24 | #include <linux/slab.h> | 24 | #include <linux/slab.h> |
| 25 | #include <linux/of.h> | ||
| 26 | #include <linux/of_device.h> | ||
| 25 | 27 | ||
| 26 | #include <mach/dma.h> | 28 | #include <mach/dma.h> |
| 27 | #include <plat/pxa3xx_nand.h> | 29 | #include <plat/pxa3xx_nand.h> |
| @@ -1032,7 +1034,7 @@ static int alloc_nand_resource(struct platform_device *pdev) | |||
| 1032 | struct pxa3xx_nand_platform_data *pdata; | 1034 | struct pxa3xx_nand_platform_data *pdata; |
| 1033 | struct pxa3xx_nand_info *info; | 1035 | struct pxa3xx_nand_info *info; |
| 1034 | struct pxa3xx_nand_host *host; | 1036 | struct pxa3xx_nand_host *host; |
| 1035 | struct nand_chip *chip; | 1037 | struct nand_chip *chip = NULL; |
| 1036 | struct mtd_info *mtd; | 1038 | struct mtd_info *mtd; |
| 1037 | struct resource *r; | 1039 | struct resource *r; |
| 1038 | int ret, irq, cs; | 1040 | int ret, irq, cs; |
| @@ -1081,21 +1083,31 @@ static int alloc_nand_resource(struct platform_device *pdev) | |||
| 1081 | } | 1083 | } |
| 1082 | clk_enable(info->clk); | 1084 | clk_enable(info->clk); |
| 1083 | 1085 | ||
| 1084 | r = platform_get_resource(pdev, IORESOURCE_DMA, 0); | 1086 | /* |
| 1085 | if (r == NULL) { | 1087 | * This is a dirty hack to make this driver work from devicetree |
| 1086 | dev_err(&pdev->dev, "no resource defined for data DMA\n"); | 1088 | * bindings. It can be removed once we have a prober DMA controller |
| 1087 | ret = -ENXIO; | 1089 | * framework for DT. |
| 1088 | goto fail_put_clk; | 1090 | */ |
| 1089 | } | 1091 | if (pdev->dev.of_node && cpu_is_pxa3xx()) { |
| 1090 | info->drcmr_dat = r->start; | 1092 | info->drcmr_dat = 97; |
| 1093 | info->drcmr_cmd = 99; | ||
| 1094 | } else { | ||
| 1095 | r = platform_get_resource(pdev, IORESOURCE_DMA, 0); | ||
| 1096 | if (r == NULL) { | ||
| 1097 | dev_err(&pdev->dev, "no resource defined for data DMA\n"); | ||
| 1098 | ret = -ENXIO; | ||
| 1099 | goto fail_put_clk; | ||
| 1100 | } | ||
| 1101 | info->drcmr_dat = r->start; | ||
| 1091 | 1102 | ||
| 1092 | r = platform_get_resource(pdev, IORESOURCE_DMA, 1); | 1103 | r = platform_get_resource(pdev, IORESOURCE_DMA, 1); |
| 1093 | if (r == NULL) { | 1104 | if (r == NULL) { |
| 1094 | dev_err(&pdev->dev, "no resource defined for command DMA\n"); | 1105 | dev_err(&pdev->dev, "no resource defined for command DMA\n"); |
| 1095 | ret = -ENXIO; | 1106 | ret = -ENXIO; |
| 1096 | goto fail_put_clk; | 1107 | goto fail_put_clk; |
| 1108 | } | ||
| 1109 | info->drcmr_cmd = r->start; | ||
| 1097 | } | 1110 | } |
| 1098 | info->drcmr_cmd = r->start; | ||
| 1099 | 1111 | ||
| 1100 | irq = platform_get_irq(pdev, 0); | 1112 | irq = platform_get_irq(pdev, 0); |
| 1101 | if (irq < 0) { | 1113 | if (irq < 0) { |
| @@ -1200,12 +1212,55 @@ static int pxa3xx_nand_remove(struct platform_device *pdev) | |||
| 1200 | return 0; | 1212 | return 0; |
| 1201 | } | 1213 | } |
| 1202 | 1214 | ||
| 1215 | #ifdef CONFIG_OF | ||
| 1216 | static struct of_device_id pxa3xx_nand_dt_ids[] = { | ||
| 1217 | { .compatible = "marvell,pxa3xx-nand" }, | ||
| 1218 | {} | ||
| 1219 | }; | ||
| 1220 | MODULE_DEVICE_TABLE(of, i2c_pxa_dt_ids); | ||
| 1221 | |||
| 1222 | static int pxa3xx_nand_probe_dt(struct platform_device *pdev) | ||
| 1223 | { | ||
| 1224 | struct pxa3xx_nand_platform_data *pdata; | ||
| 1225 | struct device_node *np = pdev->dev.of_node; | ||
| 1226 | const struct of_device_id *of_id = | ||
| 1227 | of_match_device(pxa3xx_nand_dt_ids, &pdev->dev); | ||
| 1228 | |||
| 1229 | if (!of_id) | ||
| 1230 | return 0; | ||
| 1231 | |||
| 1232 | pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL); | ||
| 1233 | if (!pdata) | ||
| 1234 | return -ENOMEM; | ||
| 1235 | |||
| 1236 | if (of_get_property(np, "marvell,nand-enable-arbiter", NULL)) | ||
| 1237 | pdata->enable_arbiter = 1; | ||
| 1238 | if (of_get_property(np, "marvell,nand-keep-config", NULL)) | ||
| 1239 | pdata->keep_config = 1; | ||
| 1240 | of_property_read_u32(np, "num-cs", &pdata->num_cs); | ||
| 1241 | |||
| 1242 | pdev->dev.platform_data = pdata; | ||
| 1243 | |||
| 1244 | return 0; | ||
| 1245 | } | ||
| 1246 | #else | ||
| 1247 | static inline int pxa3xx_nand_probe_dt(struct platform_device *pdev) | ||
| 1248 | { | ||
| 1249 | return 0; | ||
| 1250 | } | ||
| 1251 | #endif | ||
| 1252 | |||
| 1203 | static int pxa3xx_nand_probe(struct platform_device *pdev) | 1253 | static int pxa3xx_nand_probe(struct platform_device *pdev) |
| 1204 | { | 1254 | { |
| 1205 | struct pxa3xx_nand_platform_data *pdata; | 1255 | struct pxa3xx_nand_platform_data *pdata; |
| 1256 | struct mtd_part_parser_data ppdata = {}; | ||
| 1206 | struct pxa3xx_nand_info *info; | 1257 | struct pxa3xx_nand_info *info; |
| 1207 | int ret, cs, probe_success; | 1258 | int ret, cs, probe_success; |
| 1208 | 1259 | ||
| 1260 | ret = pxa3xx_nand_probe_dt(pdev); | ||
| 1261 | if (ret) | ||
| 1262 | return ret; | ||
| 1263 | |||
| 1209 | pdata = pdev->dev.platform_data; | 1264 | pdata = pdev->dev.platform_data; |
| 1210 | if (!pdata) { | 1265 | if (!pdata) { |
| 1211 | dev_err(&pdev->dev, "no platform data defined\n"); | 1266 | dev_err(&pdev->dev, "no platform data defined\n"); |
| @@ -1229,8 +1284,9 @@ static int pxa3xx_nand_probe(struct platform_device *pdev) | |||
| 1229 | continue; | 1284 | continue; |
| 1230 | } | 1285 | } |
| 1231 | 1286 | ||
| 1287 | ppdata.of_node = pdev->dev.of_node; | ||
| 1232 | ret = mtd_device_parse_register(info->host[cs]->mtd, NULL, | 1288 | ret = mtd_device_parse_register(info->host[cs]->mtd, NULL, |
| 1233 | NULL, pdata->parts[cs], | 1289 | &ppdata, pdata->parts[cs], |
| 1234 | pdata->nr_parts[cs]); | 1290 | pdata->nr_parts[cs]); |
| 1235 | if (!ret) | 1291 | if (!ret) |
| 1236 | probe_success = 1; | 1292 | probe_success = 1; |
| @@ -1306,6 +1362,7 @@ static int pxa3xx_nand_resume(struct platform_device *pdev) | |||
| 1306 | static struct platform_driver pxa3xx_nand_driver = { | 1362 | static struct platform_driver pxa3xx_nand_driver = { |
| 1307 | .driver = { | 1363 | .driver = { |
| 1308 | .name = "pxa3xx-nand", | 1364 | .name = "pxa3xx-nand", |
| 1365 | .of_match_table = of_match_ptr(pxa3xx_nand_dt_ids), | ||
| 1309 | }, | 1366 | }, |
| 1310 | .probe = pxa3xx_nand_probe, | 1367 | .probe = pxa3xx_nand_probe, |
| 1311 | .remove = pxa3xx_nand_remove, | 1368 | .remove = pxa3xx_nand_remove, |
diff --git a/drivers/pinctrl/pinctrl-sirf.c b/drivers/pinctrl/pinctrl-sirf.c index 7fca6ce5952b..304360cd213e 100644 --- a/drivers/pinctrl/pinctrl-sirf.c +++ b/drivers/pinctrl/pinctrl-sirf.c | |||
| @@ -17,6 +17,7 @@ | |||
| 17 | #include <linux/pinctrl/pinctrl.h> | 17 | #include <linux/pinctrl/pinctrl.h> |
| 18 | #include <linux/pinctrl/pinmux.h> | 18 | #include <linux/pinctrl/pinmux.h> |
| 19 | #include <linux/pinctrl/consumer.h> | 19 | #include <linux/pinctrl/consumer.h> |
| 20 | #include <linux/pinctrl/machine.h> | ||
| 20 | #include <linux/of.h> | 21 | #include <linux/of.h> |
| 21 | #include <linux/of_address.h> | 22 | #include <linux/of_address.h> |
| 22 | #include <linux/of_device.h> | 23 | #include <linux/of_device.h> |
| @@ -916,11 +917,66 @@ static void sirfsoc_pin_dbg_show(struct pinctrl_dev *pctldev, struct seq_file *s | |||
| 916 | seq_printf(s, " " DRIVER_NAME); | 917 | seq_printf(s, " " DRIVER_NAME); |
| 917 | } | 918 | } |
| 918 | 919 | ||
| 920 | static int sirfsoc_dt_node_to_map(struct pinctrl_dev *pctldev, | ||
| 921 | struct device_node *np_config, | ||
| 922 | struct pinctrl_map **map, unsigned *num_maps) | ||
| 923 | { | ||
| 924 | struct sirfsoc_pmx *spmx = pinctrl_dev_get_drvdata(pctldev); | ||
| 925 | struct device_node *np; | ||
| 926 | struct property *prop; | ||
| 927 | const char *function, *group; | ||
| 928 | int ret, index = 0, count = 0; | ||
| 929 | |||
| 930 | /* calculate number of maps required */ | ||
| 931 | for_each_child_of_node(np_config, np) { | ||
| 932 | ret = of_property_read_string(np, "sirf,function", &function); | ||
| 933 | if (ret < 0) | ||
| 934 | return ret; | ||
| 935 | |||
| 936 | ret = of_property_count_strings(np, "sirf,pins"); | ||
| 937 | if (ret < 0) | ||
| 938 | return ret; | ||
| 939 | |||
| 940 | count += ret; | ||
| 941 | } | ||
| 942 | |||
| 943 | if (!count) { | ||
| 944 | dev_err(spmx->dev, "No child nodes passed via DT\n"); | ||
| 945 | return -ENODEV; | ||
| 946 | } | ||
| 947 | |||
| 948 | *map = kzalloc(sizeof(**map) * count, GFP_KERNEL); | ||
| 949 | if (!*map) | ||
| 950 | return -ENOMEM; | ||
| 951 | |||
| 952 | for_each_child_of_node(np_config, np) { | ||
| 953 | of_property_read_string(np, "sirf,function", &function); | ||
| 954 | of_property_for_each_string(np, "sirf,pins", prop, group) { | ||
| 955 | (*map)[index].type = PIN_MAP_TYPE_MUX_GROUP; | ||
| 956 | (*map)[index].data.mux.group = group; | ||
| 957 | (*map)[index].data.mux.function = function; | ||
| 958 | index++; | ||
| 959 | } | ||
| 960 | } | ||
| 961 | |||
| 962 | *num_maps = count; | ||
| 963 | |||
| 964 | return 0; | ||
| 965 | } | ||
| 966 | |||
| 967 | static void sirfsoc_dt_free_map(struct pinctrl_dev *pctldev, | ||
| 968 | struct pinctrl_map *map, unsigned num_maps) | ||
| 969 | { | ||
| 970 | kfree(map); | ||
| 971 | } | ||
| 972 | |||
| 919 | static struct pinctrl_ops sirfsoc_pctrl_ops = { | 973 | static struct pinctrl_ops sirfsoc_pctrl_ops = { |
| 920 | .get_groups_count = sirfsoc_get_groups_count, | 974 | .get_groups_count = sirfsoc_get_groups_count, |
| 921 | .get_group_name = sirfsoc_get_group_name, | 975 | .get_group_name = sirfsoc_get_group_name, |
| 922 | .get_group_pins = sirfsoc_get_group_pins, | 976 | .get_group_pins = sirfsoc_get_group_pins, |
| 923 | .pin_dbg_show = sirfsoc_pin_dbg_show, | 977 | .pin_dbg_show = sirfsoc_pin_dbg_show, |
| 978 | .dt_node_to_map = sirfsoc_dt_node_to_map, | ||
| 979 | .dt_free_map = sirfsoc_dt_free_map, | ||
| 924 | }; | 980 | }; |
| 925 | 981 | ||
| 926 | struct sirfsoc_pmx_func { | 982 | struct sirfsoc_pmx_func { |
| @@ -1221,7 +1277,7 @@ out_no_gpio_remap: | |||
| 1221 | } | 1277 | } |
| 1222 | 1278 | ||
| 1223 | static const struct of_device_id pinmux_ids[] __devinitconst = { | 1279 | static const struct of_device_id pinmux_ids[] __devinitconst = { |
| 1224 | { .compatible = "sirf,prima2-gpio-pinmux" }, | 1280 | { .compatible = "sirf,prima2-pinctrl" }, |
| 1225 | {} | 1281 | {} |
| 1226 | }; | 1282 | }; |
| 1227 | 1283 | ||
diff --git a/drivers/rtc/rtc-ab8500.c b/drivers/rtc/rtc-ab8500.c index bf3c2f669c3c..2e5970fe9eeb 100644 --- a/drivers/rtc/rtc-ab8500.c +++ b/drivers/rtc/rtc-ab8500.c | |||
| @@ -462,16 +462,10 @@ static int __devexit ab8500_rtc_remove(struct platform_device *pdev) | |||
| 462 | return 0; | 462 | return 0; |
| 463 | } | 463 | } |
| 464 | 464 | ||
| 465 | static const struct of_device_id ab8500_rtc_match[] = { | ||
| 466 | { .compatible = "stericsson,ab8500-rtc", }, | ||
| 467 | {} | ||
| 468 | }; | ||
| 469 | |||
| 470 | static struct platform_driver ab8500_rtc_driver = { | 465 | static struct platform_driver ab8500_rtc_driver = { |
| 471 | .driver = { | 466 | .driver = { |
| 472 | .name = "ab8500-rtc", | 467 | .name = "ab8500-rtc", |
| 473 | .owner = THIS_MODULE, | 468 | .owner = THIS_MODULE, |
| 474 | .of_match_table = ab8500_rtc_match, | ||
| 475 | }, | 469 | }, |
| 476 | .probe = ab8500_rtc_probe, | 470 | .probe = ab8500_rtc_probe, |
| 477 | .remove = __devexit_p(ab8500_rtc_remove), | 471 | .remove = __devexit_p(ab8500_rtc_remove), |
diff --git a/drivers/rtc/rtc-pxa.c b/drivers/rtc/rtc-pxa.c index 0075c8fd93d8..f771b2ee4b18 100644 --- a/drivers/rtc/rtc-pxa.c +++ b/drivers/rtc/rtc-pxa.c | |||
| @@ -27,6 +27,8 @@ | |||
| 27 | #include <linux/interrupt.h> | 27 | #include <linux/interrupt.h> |
| 28 | #include <linux/io.h> | 28 | #include <linux/io.h> |
| 29 | #include <linux/slab.h> | 29 | #include <linux/slab.h> |
| 30 | #include <linux/of.h> | ||
| 31 | #include <linux/of_device.h> | ||
| 30 | 32 | ||
| 31 | #include <mach/hardware.h> | 33 | #include <mach/hardware.h> |
| 32 | 34 | ||
| @@ -396,6 +398,14 @@ static int __exit pxa_rtc_remove(struct platform_device *pdev) | |||
| 396 | return 0; | 398 | return 0; |
| 397 | } | 399 | } |
| 398 | 400 | ||
| 401 | #ifdef CONFIG_OF | ||
| 402 | static struct of_device_id pxa_rtc_dt_ids[] = { | ||
| 403 | { .compatible = "marvell,pxa-rtc" }, | ||
| 404 | {} | ||
| 405 | }; | ||
| 406 | MODULE_DEVICE_TABLE(of, pxa_rtc_dt_ids); | ||
| 407 | #endif | ||
| 408 | |||
| 399 | #ifdef CONFIG_PM | 409 | #ifdef CONFIG_PM |
| 400 | static int pxa_rtc_suspend(struct device *dev) | 410 | static int pxa_rtc_suspend(struct device *dev) |
| 401 | { | 411 | { |
| @@ -425,6 +435,7 @@ static struct platform_driver pxa_rtc_driver = { | |||
| 425 | .remove = __exit_p(pxa_rtc_remove), | 435 | .remove = __exit_p(pxa_rtc_remove), |
| 426 | .driver = { | 436 | .driver = { |
| 427 | .name = "pxa-rtc", | 437 | .name = "pxa-rtc", |
| 438 | .of_match_table = of_match_ptr(pxa_rtc_dt_ids), | ||
| 428 | #ifdef CONFIG_PM | 439 | #ifdef CONFIG_PM |
| 429 | .pm = &pxa_rtc_pm_ops, | 440 | .pm = &pxa_rtc_pm_ops, |
| 430 | #endif | 441 | #endif |
diff --git a/drivers/rtc/rtc-vt8500.c b/drivers/rtc/rtc-vt8500.c index 9e94fb147c26..07bf19364a74 100644 --- a/drivers/rtc/rtc-vt8500.c +++ b/drivers/rtc/rtc-vt8500.c | |||
| @@ -23,6 +23,7 @@ | |||
| 23 | #include <linux/bcd.h> | 23 | #include <linux/bcd.h> |
| 24 | #include <linux/platform_device.h> | 24 | #include <linux/platform_device.h> |
| 25 | #include <linux/slab.h> | 25 | #include <linux/slab.h> |
| 26 | #include <linux/of.h> | ||
| 26 | 27 | ||
| 27 | /* | 28 | /* |
| 28 | * Register definitions | 29 | * Register definitions |
| @@ -302,12 +303,18 @@ static int __devexit vt8500_rtc_remove(struct platform_device *pdev) | |||
| 302 | return 0; | 303 | return 0; |
| 303 | } | 304 | } |
| 304 | 305 | ||
| 306 | static const struct of_device_id wmt_dt_ids[] = { | ||
| 307 | { .compatible = "via,vt8500-rtc", }, | ||
| 308 | {} | ||
| 309 | }; | ||
| 310 | |||
| 305 | static struct platform_driver vt8500_rtc_driver = { | 311 | static struct platform_driver vt8500_rtc_driver = { |
| 306 | .probe = vt8500_rtc_probe, | 312 | .probe = vt8500_rtc_probe, |
| 307 | .remove = __devexit_p(vt8500_rtc_remove), | 313 | .remove = __devexit_p(vt8500_rtc_remove), |
| 308 | .driver = { | 314 | .driver = { |
| 309 | .name = "vt8500-rtc", | 315 | .name = "vt8500-rtc", |
| 310 | .owner = THIS_MODULE, | 316 | .owner = THIS_MODULE, |
| 317 | .of_match_table = of_match_ptr(wmt_dt_ids), | ||
| 311 | }, | 318 | }, |
| 312 | }; | 319 | }; |
| 313 | 320 | ||
| @@ -315,5 +322,5 @@ module_platform_driver(vt8500_rtc_driver); | |||
| 315 | 322 | ||
| 316 | MODULE_AUTHOR("Alexey Charkov <alchark@gmail.com>"); | 323 | MODULE_AUTHOR("Alexey Charkov <alchark@gmail.com>"); |
| 317 | MODULE_DESCRIPTION("VIA VT8500 SoC Realtime Clock Driver (RTC)"); | 324 | MODULE_DESCRIPTION("VIA VT8500 SoC Realtime Clock Driver (RTC)"); |
| 318 | MODULE_LICENSE("GPL"); | 325 | MODULE_LICENSE("GPL v2"); |
| 319 | MODULE_ALIAS("platform:vt8500-rtc"); | 326 | MODULE_ALIAS("platform:vt8500-rtc"); |
diff --git a/drivers/tty/serial/vt8500_serial.c b/drivers/tty/serial/vt8500_serial.c index 2be006fb3da0..205d4cf4a063 100644 --- a/drivers/tty/serial/vt8500_serial.c +++ b/drivers/tty/serial/vt8500_serial.c | |||
| @@ -34,6 +34,7 @@ | |||
| 34 | #include <linux/slab.h> | 34 | #include <linux/slab.h> |
| 35 | #include <linux/clk.h> | 35 | #include <linux/clk.h> |
| 36 | #include <linux/platform_device.h> | 36 | #include <linux/platform_device.h> |
| 37 | #include <linux/of.h> | ||
| 37 | 38 | ||
| 38 | /* | 39 | /* |
| 39 | * UART Register offsets | 40 | * UART Register offsets |
| @@ -76,6 +77,8 @@ | |||
| 76 | #define RX_FIFO_INTS (RXFAF | RXFF | RXOVER | PER | FER | RXTOUT) | 77 | #define RX_FIFO_INTS (RXFAF | RXFF | RXOVER | PER | FER | RXTOUT) |
| 77 | #define TX_FIFO_INTS (TXFAE | TXFE | TXUDR) | 78 | #define TX_FIFO_INTS (TXFAE | TXFE | TXUDR) |
| 78 | 79 | ||
| 80 | #define VT8500_MAX_PORTS 6 | ||
| 81 | |||
| 79 | struct vt8500_port { | 82 | struct vt8500_port { |
| 80 | struct uart_port uart; | 83 | struct uart_port uart; |
| 81 | char name[16]; | 84 | char name[16]; |
| @@ -83,6 +86,13 @@ struct vt8500_port { | |||
| 83 | unsigned int ier; | 86 | unsigned int ier; |
| 84 | }; | 87 | }; |
| 85 | 88 | ||
| 89 | /* | ||
| 90 | * we use this variable to keep track of which ports | ||
| 91 | * have been allocated as we can't use pdev->id in | ||
| 92 | * devicetree | ||
| 93 | */ | ||
| 94 | static unsigned long vt8500_ports_in_use; | ||
| 95 | |||
| 86 | static inline void vt8500_write(struct uart_port *port, unsigned int val, | 96 | static inline void vt8500_write(struct uart_port *port, unsigned int val, |
| 87 | unsigned int off) | 97 | unsigned int off) |
| 88 | { | 98 | { |
| @@ -431,7 +441,7 @@ static int vt8500_verify_port(struct uart_port *port, | |||
| 431 | return 0; | 441 | return 0; |
| 432 | } | 442 | } |
| 433 | 443 | ||
| 434 | static struct vt8500_port *vt8500_uart_ports[4]; | 444 | static struct vt8500_port *vt8500_uart_ports[VT8500_MAX_PORTS]; |
| 435 | static struct uart_driver vt8500_uart_driver; | 445 | static struct uart_driver vt8500_uart_driver; |
| 436 | 446 | ||
| 437 | #ifdef CONFIG_SERIAL_VT8500_CONSOLE | 447 | #ifdef CONFIG_SERIAL_VT8500_CONSOLE |
| @@ -548,7 +558,9 @@ static int __devinit vt8500_serial_probe(struct platform_device *pdev) | |||
| 548 | { | 558 | { |
| 549 | struct vt8500_port *vt8500_port; | 559 | struct vt8500_port *vt8500_port; |
| 550 | struct resource *mmres, *irqres; | 560 | struct resource *mmres, *irqres; |
| 561 | struct device_node *np = pdev->dev.of_node; | ||
| 551 | int ret; | 562 | int ret; |
| 563 | int port; | ||
| 552 | 564 | ||
| 553 | mmres = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 565 | mmres = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
| 554 | irqres = platform_get_resource(pdev, IORESOURCE_IRQ, 0); | 566 | irqres = platform_get_resource(pdev, IORESOURCE_IRQ, 0); |
| @@ -559,16 +571,46 @@ static int __devinit vt8500_serial_probe(struct platform_device *pdev) | |||
| 559 | if (!vt8500_port) | 571 | if (!vt8500_port) |
| 560 | return -ENOMEM; | 572 | return -ENOMEM; |
| 561 | 573 | ||
| 574 | if (np) | ||
| 575 | port = of_alias_get_id(np, "serial"); | ||
| 576 | if (port > VT8500_MAX_PORTS) | ||
| 577 | port = -1; | ||
| 578 | else | ||
| 579 | port = -1; | ||
| 580 | |||
| 581 | if (port < 0) { | ||
| 582 | /* calculate the port id */ | ||
| 583 | port = find_first_zero_bit(&vt8500_ports_in_use, | ||
| 584 | sizeof(vt8500_ports_in_use)); | ||
| 585 | } | ||
| 586 | |||
| 587 | if (port > VT8500_MAX_PORTS) | ||
| 588 | return -ENODEV; | ||
| 589 | |||
| 590 | /* reserve the port id */ | ||
| 591 | if (test_and_set_bit(port, &vt8500_ports_in_use)) { | ||
| 592 | /* port already in use - shouldn't really happen */ | ||
| 593 | return -EBUSY; | ||
| 594 | } | ||
| 595 | |||
| 562 | vt8500_port->uart.type = PORT_VT8500; | 596 | vt8500_port->uart.type = PORT_VT8500; |
| 563 | vt8500_port->uart.iotype = UPIO_MEM; | 597 | vt8500_port->uart.iotype = UPIO_MEM; |
| 564 | vt8500_port->uart.mapbase = mmres->start; | 598 | vt8500_port->uart.mapbase = mmres->start; |
| 565 | vt8500_port->uart.irq = irqres->start; | 599 | vt8500_port->uart.irq = irqres->start; |
| 566 | vt8500_port->uart.fifosize = 16; | 600 | vt8500_port->uart.fifosize = 16; |
| 567 | vt8500_port->uart.ops = &vt8500_uart_pops; | 601 | vt8500_port->uart.ops = &vt8500_uart_pops; |
| 568 | vt8500_port->uart.line = pdev->id; | 602 | vt8500_port->uart.line = port; |
| 569 | vt8500_port->uart.dev = &pdev->dev; | 603 | vt8500_port->uart.dev = &pdev->dev; |
| 570 | vt8500_port->uart.flags = UPF_IOREMAP | UPF_BOOT_AUTOCONF; | 604 | vt8500_port->uart.flags = UPF_IOREMAP | UPF_BOOT_AUTOCONF; |
| 571 | vt8500_port->uart.uartclk = 24000000; | 605 | |
| 606 | vt8500_port->clk = of_clk_get(pdev->dev.of_node, 0); | ||
| 607 | if (vt8500_port->clk) { | ||
| 608 | vt8500_port->uart.uartclk = clk_get_rate(vt8500_port->clk); | ||
| 609 | } else { | ||
| 610 | /* use the default of 24Mhz if not specified and warn */ | ||
| 611 | pr_warn("%s: serial clock source not specified\n", __func__); | ||
| 612 | vt8500_port->uart.uartclk = 24000000; | ||
| 613 | } | ||
| 572 | 614 | ||
| 573 | snprintf(vt8500_port->name, sizeof(vt8500_port->name), | 615 | snprintf(vt8500_port->name, sizeof(vt8500_port->name), |
| 574 | "VT8500 UART%d", pdev->id); | 616 | "VT8500 UART%d", pdev->id); |
| @@ -579,7 +621,7 @@ static int __devinit vt8500_serial_probe(struct platform_device *pdev) | |||
| 579 | goto err; | 621 | goto err; |
| 580 | } | 622 | } |
| 581 | 623 | ||
| 582 | vt8500_uart_ports[pdev->id] = vt8500_port; | 624 | vt8500_uart_ports[port] = vt8500_port; |
| 583 | 625 | ||
| 584 | uart_add_one_port(&vt8500_uart_driver, &vt8500_port->uart); | 626 | uart_add_one_port(&vt8500_uart_driver, &vt8500_port->uart); |
| 585 | 627 | ||
| @@ -603,12 +645,18 @@ static int __devexit vt8500_serial_remove(struct platform_device *pdev) | |||
| 603 | return 0; | 645 | return 0; |
| 604 | } | 646 | } |
| 605 | 647 | ||
| 648 | static const struct of_device_id wmt_dt_ids[] = { | ||
| 649 | { .compatible = "via,vt8500-uart", }, | ||
| 650 | {} | ||
| 651 | }; | ||
| 652 | |||
| 606 | static struct platform_driver vt8500_platform_driver = { | 653 | static struct platform_driver vt8500_platform_driver = { |
| 607 | .probe = vt8500_serial_probe, | 654 | .probe = vt8500_serial_probe, |
| 608 | .remove = __devexit_p(vt8500_serial_remove), | 655 | .remove = __devexit_p(vt8500_serial_remove), |
| 609 | .driver = { | 656 | .driver = { |
| 610 | .name = "vt8500_serial", | 657 | .name = "vt8500_serial", |
| 611 | .owner = THIS_MODULE, | 658 | .owner = THIS_MODULE, |
| 659 | .of_match_table = of_match_ptr(wmt_dt_ids), | ||
| 612 | }, | 660 | }, |
| 613 | }; | 661 | }; |
| 614 | 662 | ||
| @@ -642,4 +690,4 @@ module_exit(vt8500_serial_exit); | |||
| 642 | 690 | ||
| 643 | MODULE_AUTHOR("Alexey Charkov <alchark@gmail.com>"); | 691 | MODULE_AUTHOR("Alexey Charkov <alchark@gmail.com>"); |
| 644 | MODULE_DESCRIPTION("Driver for vt8500 serial device"); | 692 | MODULE_DESCRIPTION("Driver for vt8500 serial device"); |
| 645 | MODULE_LICENSE("GPL"); | 693 | MODULE_LICENSE("GPL v2"); |
diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig index 0217f7415ef5..b66d951b8e32 100644 --- a/drivers/video/Kconfig +++ b/drivers/video/Kconfig | |||
| @@ -1788,7 +1788,7 @@ config FB_AU1200 | |||
| 1788 | 1788 | ||
| 1789 | config FB_VT8500 | 1789 | config FB_VT8500 |
| 1790 | bool "VT8500 LCD Driver" | 1790 | bool "VT8500 LCD Driver" |
| 1791 | depends on (FB = y) && ARM && ARCH_VT8500 && VTWM_VERSION_VT8500 | 1791 | depends on (FB = y) && ARM && ARCH_VT8500 |
| 1792 | select FB_WMT_GE_ROPS | 1792 | select FB_WMT_GE_ROPS |
| 1793 | select FB_SYS_IMAGEBLIT | 1793 | select FB_SYS_IMAGEBLIT |
| 1794 | help | 1794 | help |
| @@ -1797,11 +1797,11 @@ config FB_VT8500 | |||
| 1797 | 1797 | ||
| 1798 | config FB_WM8505 | 1798 | config FB_WM8505 |
| 1799 | bool "WM8505 frame buffer support" | 1799 | bool "WM8505 frame buffer support" |
| 1800 | depends on (FB = y) && ARM && ARCH_VT8500 && VTWM_VERSION_WM8505 | 1800 | depends on (FB = y) && ARM && ARCH_VT8500 |
| 1801 | select FB_WMT_GE_ROPS | 1801 | select FB_WMT_GE_ROPS |
| 1802 | select FB_SYS_IMAGEBLIT | 1802 | select FB_SYS_IMAGEBLIT |
| 1803 | help | 1803 | help |
| 1804 | This is the framebuffer driver for WonderMedia WM8505 | 1804 | This is the framebuffer driver for WonderMedia WM8505/WM8650 |
| 1805 | integrated LCD controller. | 1805 | integrated LCD controller. |
| 1806 | 1806 | ||
| 1807 | source "drivers/video/geode/Kconfig" | 1807 | source "drivers/video/geode/Kconfig" |
diff --git a/drivers/video/vt8500lcdfb.c b/drivers/video/vt8500lcdfb.c index 2a5fe6ede845..d24595cd0c9b 100644 --- a/drivers/video/vt8500lcdfb.c +++ b/drivers/video/vt8500lcdfb.c | |||
| @@ -35,6 +35,13 @@ | |||
| 35 | #include "vt8500lcdfb.h" | 35 | #include "vt8500lcdfb.h" |
| 36 | #include "wmt_ge_rops.h" | 36 | #include "wmt_ge_rops.h" |
| 37 | 37 | ||
| 38 | #ifdef CONFIG_OF | ||
| 39 | #include <linux/of.h> | ||
| 40 | #include <linux/of_fdt.h> | ||
| 41 | #include <linux/memblock.h> | ||
| 42 | #endif | ||
| 43 | |||
| 44 | |||
| 38 | #define to_vt8500lcd_info(__info) container_of(__info, \ | 45 | #define to_vt8500lcd_info(__info) container_of(__info, \ |
| 39 | struct vt8500lcd_info, fb) | 46 | struct vt8500lcd_info, fb) |
| 40 | 47 | ||
| @@ -270,15 +277,21 @@ static int __devinit vt8500lcd_probe(struct platform_device *pdev) | |||
| 270 | { | 277 | { |
| 271 | struct vt8500lcd_info *fbi; | 278 | struct vt8500lcd_info *fbi; |
| 272 | struct resource *res; | 279 | struct resource *res; |
| 273 | struct vt8500fb_platform_data *pdata = pdev->dev.platform_data; | ||
| 274 | void *addr; | 280 | void *addr; |
| 275 | int irq, ret; | 281 | int irq, ret; |
| 276 | 282 | ||
| 283 | struct fb_videomode of_mode; | ||
| 284 | struct device_node *np; | ||
| 285 | u32 bpp; | ||
| 286 | dma_addr_t fb_mem_phys; | ||
| 287 | unsigned long fb_mem_len; | ||
| 288 | void *fb_mem_virt; | ||
| 289 | |||
| 277 | ret = -ENOMEM; | 290 | ret = -ENOMEM; |
| 278 | fbi = NULL; | 291 | fbi = NULL; |
| 279 | 292 | ||
| 280 | fbi = kzalloc(sizeof(struct vt8500lcd_info) + sizeof(u32) * 16, | 293 | fbi = devm_kzalloc(&pdev->dev, sizeof(struct vt8500lcd_info) |
| 281 | GFP_KERNEL); | 294 | + sizeof(u32) * 16, GFP_KERNEL); |
| 282 | if (!fbi) { | 295 | if (!fbi) { |
| 283 | dev_err(&pdev->dev, "Failed to initialize framebuffer device\n"); | 296 | dev_err(&pdev->dev, "Failed to initialize framebuffer device\n"); |
| 284 | ret = -ENOMEM; | 297 | ret = -ENOMEM; |
| @@ -333,9 +346,45 @@ static int __devinit vt8500lcd_probe(struct platform_device *pdev) | |||
| 333 | goto failed_free_res; | 346 | goto failed_free_res; |
| 334 | } | 347 | } |
| 335 | 348 | ||
| 336 | fbi->fb.fix.smem_start = pdata->video_mem_phys; | 349 | np = of_parse_phandle(pdev->dev.of_node, "default-mode", 0); |
| 337 | fbi->fb.fix.smem_len = pdata->video_mem_len; | 350 | if (!np) { |
| 338 | fbi->fb.screen_base = pdata->video_mem_virt; | 351 | pr_err("%s: No display description in Device Tree\n", __func__); |
| 352 | ret = -EINVAL; | ||
| 353 | goto failed_free_res; | ||
| 354 | } | ||
| 355 | |||
| 356 | /* | ||
| 357 | * This code is copied from Sascha Hauer's of_videomode helper | ||
| 358 | * and can be replaced with a call to the helper once mainlined | ||
| 359 | */ | ||
| 360 | ret = 0; | ||
| 361 | ret |= of_property_read_u32(np, "hactive", &of_mode.xres); | ||
| 362 | ret |= of_property_read_u32(np, "vactive", &of_mode.yres); | ||
| 363 | ret |= of_property_read_u32(np, "hback-porch", &of_mode.left_margin); | ||
| 364 | ret |= of_property_read_u32(np, "hfront-porch", &of_mode.right_margin); | ||
| 365 | ret |= of_property_read_u32(np, "hsync-len", &of_mode.hsync_len); | ||
| 366 | ret |= of_property_read_u32(np, "vback-porch", &of_mode.upper_margin); | ||
| 367 | ret |= of_property_read_u32(np, "vfront-porch", &of_mode.lower_margin); | ||
| 368 | ret |= of_property_read_u32(np, "vsync-len", &of_mode.vsync_len); | ||
| 369 | ret |= of_property_read_u32(np, "bpp", &bpp); | ||
| 370 | if (ret) { | ||
| 371 | pr_err("%s: Unable to read display properties\n", __func__); | ||
| 372 | goto failed_free_res; | ||
| 373 | } | ||
| 374 | of_mode.vmode = FB_VMODE_NONINTERLACED; | ||
| 375 | |||
| 376 | /* try allocating the framebuffer */ | ||
| 377 | fb_mem_len = of_mode.xres * of_mode.yres * 2 * (bpp / 8); | ||
| 378 | fb_mem_virt = dma_alloc_coherent(&pdev->dev, fb_mem_len, &fb_mem_phys, | ||
| 379 | GFP_KERNEL); | ||
| 380 | if (!fb_mem_virt) { | ||
| 381 | pr_err("%s: Failed to allocate framebuffer\n", __func__); | ||
| 382 | return -ENOMEM; | ||
| 383 | }; | ||
| 384 | |||
| 385 | fbi->fb.fix.smem_start = fb_mem_phys; | ||
| 386 | fbi->fb.fix.smem_len = fb_mem_len; | ||
| 387 | fbi->fb.screen_base = fb_mem_virt; | ||
| 339 | 388 | ||
| 340 | fbi->palette_size = PAGE_ALIGN(512); | 389 | fbi->palette_size = PAGE_ALIGN(512); |
| 341 | fbi->palette_cpu = dma_alloc_coherent(&pdev->dev, | 390 | fbi->palette_cpu = dma_alloc_coherent(&pdev->dev, |
| @@ -370,10 +419,11 @@ static int __devinit vt8500lcd_probe(struct platform_device *pdev) | |||
| 370 | goto failed_free_irq; | 419 | goto failed_free_irq; |
| 371 | } | 420 | } |
| 372 | 421 | ||
| 373 | fb_videomode_to_var(&fbi->fb.var, &pdata->mode); | 422 | fb_videomode_to_var(&fbi->fb.var, &of_mode); |
| 374 | fbi->fb.var.bits_per_pixel = pdata->bpp; | 423 | |
| 375 | fbi->fb.var.xres_virtual = pdata->xres_virtual; | 424 | fbi->fb.var.xres_virtual = of_mode.xres; |
| 376 | fbi->fb.var.yres_virtual = pdata->yres_virtual; | 425 | fbi->fb.var.yres_virtual = of_mode.yres * 2; |
| 426 | fbi->fb.var.bits_per_pixel = bpp; | ||
| 377 | 427 | ||
| 378 | ret = vt8500lcd_set_par(&fbi->fb); | 428 | ret = vt8500lcd_set_par(&fbi->fb); |
| 379 | if (ret) { | 429 | if (ret) { |
| @@ -448,12 +498,18 @@ static int __devexit vt8500lcd_remove(struct platform_device *pdev) | |||
| 448 | return 0; | 498 | return 0; |
| 449 | } | 499 | } |
| 450 | 500 | ||
| 501 | static const struct of_device_id via_dt_ids[] = { | ||
| 502 | { .compatible = "via,vt8500-fb", }, | ||
| 503 | {} | ||
| 504 | }; | ||
| 505 | |||
| 451 | static struct platform_driver vt8500lcd_driver = { | 506 | static struct platform_driver vt8500lcd_driver = { |
| 452 | .probe = vt8500lcd_probe, | 507 | .probe = vt8500lcd_probe, |
| 453 | .remove = __devexit_p(vt8500lcd_remove), | 508 | .remove = __devexit_p(vt8500lcd_remove), |
| 454 | .driver = { | 509 | .driver = { |
| 455 | .owner = THIS_MODULE, | 510 | .owner = THIS_MODULE, |
| 456 | .name = "vt8500-lcd", | 511 | .name = "vt8500-lcd", |
| 512 | .of_match_table = of_match_ptr(via_dt_ids), | ||
| 457 | }, | 513 | }, |
| 458 | }; | 514 | }; |
| 459 | 515 | ||
| @@ -461,4 +517,5 @@ module_platform_driver(vt8500lcd_driver); | |||
| 461 | 517 | ||
| 462 | MODULE_AUTHOR("Alexey Charkov <alchark@gmail.com>"); | 518 | MODULE_AUTHOR("Alexey Charkov <alchark@gmail.com>"); |
| 463 | MODULE_DESCRIPTION("LCD controller driver for VIA VT8500"); | 519 | MODULE_DESCRIPTION("LCD controller driver for VIA VT8500"); |
| 464 | MODULE_LICENSE("GPL"); | 520 | MODULE_LICENSE("GPL v2"); |
| 521 | MODULE_DEVICE_TABLE(of, via_dt_ids); | ||
diff --git a/drivers/video/wm8505fb.c b/drivers/video/wm8505fb.c index c8703bd61b74..ec4742442103 100644 --- a/drivers/video/wm8505fb.c +++ b/drivers/video/wm8505fb.c | |||
| @@ -28,6 +28,9 @@ | |||
| 28 | #include <linux/dma-mapping.h> | 28 | #include <linux/dma-mapping.h> |
| 29 | #include <linux/platform_device.h> | 29 | #include <linux/platform_device.h> |
| 30 | #include <linux/wait.h> | 30 | #include <linux/wait.h> |
| 31 | #include <linux/of.h> | ||
| 32 | #include <linux/of_fdt.h> | ||
| 33 | #include <linux/memblock.h> | ||
| 31 | 34 | ||
| 32 | #include <mach/vt8500fb.h> | 35 | #include <mach/vt8500fb.h> |
| 33 | 36 | ||
| @@ -59,8 +62,12 @@ static int wm8505fb_init_hw(struct fb_info *info) | |||
| 59 | writel(fbi->fb.fix.smem_start, fbi->regbase + WMT_GOVR_FBADDR); | 62 | writel(fbi->fb.fix.smem_start, fbi->regbase + WMT_GOVR_FBADDR); |
| 60 | writel(fbi->fb.fix.smem_start, fbi->regbase + WMT_GOVR_FBADDR1); | 63 | writel(fbi->fb.fix.smem_start, fbi->regbase + WMT_GOVR_FBADDR1); |
| 61 | 64 | ||
| 62 | /* Set in-memory picture format to RGB 32bpp */ | 65 | /* |
| 63 | writel(0x1c, fbi->regbase + WMT_GOVR_COLORSPACE); | 66 | * Set in-memory picture format to RGB |
| 67 | * 0x31C sets the correct color mode (RGB565) for WM8650 | ||
| 68 | * Bit 8+9 (0x300) are ignored on WM8505 as reserved | ||
| 69 | */ | ||
| 70 | writel(0x31c, fbi->regbase + WMT_GOVR_COLORSPACE); | ||
| 64 | writel(1, fbi->regbase + WMT_GOVR_COLORSPACE1); | 71 | writel(1, fbi->regbase + WMT_GOVR_COLORSPACE1); |
| 65 | 72 | ||
| 66 | /* Virtual buffer size */ | 73 | /* Virtual buffer size */ |
| @@ -127,6 +134,18 @@ static int wm8505fb_set_par(struct fb_info *info) | |||
| 127 | info->var.blue.msb_right = 0; | 134 | info->var.blue.msb_right = 0; |
| 128 | info->fix.visual = FB_VISUAL_TRUECOLOR; | 135 | info->fix.visual = FB_VISUAL_TRUECOLOR; |
| 129 | info->fix.line_length = info->var.xres_virtual << 2; | 136 | info->fix.line_length = info->var.xres_virtual << 2; |
| 137 | } else if (info->var.bits_per_pixel == 16) { | ||
| 138 | info->var.red.offset = 11; | ||
| 139 | info->var.red.length = 5; | ||
| 140 | info->var.red.msb_right = 0; | ||
| 141 | info->var.green.offset = 5; | ||
| 142 | info->var.green.length = 6; | ||
| 143 | info->var.green.msb_right = 0; | ||
| 144 | info->var.blue.offset = 0; | ||
| 145 | info->var.blue.length = 5; | ||
| 146 | info->var.blue.msb_right = 0; | ||
| 147 | info->fix.visual = FB_VISUAL_TRUECOLOR; | ||
| 148 | info->fix.line_length = info->var.xres_virtual << 1; | ||
| 130 | } | 149 | } |
| 131 | 150 | ||
| 132 | wm8505fb_set_timing(info); | 151 | wm8505fb_set_timing(info); |
| @@ -246,16 +265,20 @@ static int __devinit wm8505fb_probe(struct platform_device *pdev) | |||
| 246 | struct wm8505fb_info *fbi; | 265 | struct wm8505fb_info *fbi; |
| 247 | struct resource *res; | 266 | struct resource *res; |
| 248 | void *addr; | 267 | void *addr; |
| 249 | struct vt8500fb_platform_data *pdata; | ||
| 250 | int ret; | 268 | int ret; |
| 251 | 269 | ||
| 252 | pdata = pdev->dev.platform_data; | 270 | struct fb_videomode of_mode; |
| 271 | struct device_node *np; | ||
| 272 | u32 bpp; | ||
| 273 | dma_addr_t fb_mem_phys; | ||
| 274 | unsigned long fb_mem_len; | ||
| 275 | void *fb_mem_virt; | ||
| 253 | 276 | ||
| 254 | ret = -ENOMEM; | 277 | ret = -ENOMEM; |
| 255 | fbi = NULL; | 278 | fbi = NULL; |
| 256 | 279 | ||
| 257 | fbi = kzalloc(sizeof(struct wm8505fb_info) + sizeof(u32) * 16, | 280 | fbi = devm_kzalloc(&pdev->dev, sizeof(struct wm8505fb_info) + |
| 258 | GFP_KERNEL); | 281 | sizeof(u32) * 16, GFP_KERNEL); |
| 259 | if (!fbi) { | 282 | if (!fbi) { |
| 260 | dev_err(&pdev->dev, "Failed to initialize framebuffer device\n"); | 283 | dev_err(&pdev->dev, "Failed to initialize framebuffer device\n"); |
| 261 | ret = -ENOMEM; | 284 | ret = -ENOMEM; |
| @@ -305,21 +328,58 @@ static int __devinit wm8505fb_probe(struct platform_device *pdev) | |||
| 305 | goto failed_free_res; | 328 | goto failed_free_res; |
| 306 | } | 329 | } |
| 307 | 330 | ||
| 308 | fb_videomode_to_var(&fbi->fb.var, &pdata->mode); | 331 | np = of_parse_phandle(pdev->dev.of_node, "default-mode", 0); |
| 332 | if (!np) { | ||
| 333 | pr_err("%s: No display description in Device Tree\n", __func__); | ||
| 334 | ret = -EINVAL; | ||
| 335 | goto failed_free_res; | ||
| 336 | } | ||
| 337 | |||
| 338 | /* | ||
| 339 | * This code is copied from Sascha Hauer's of_videomode helper | ||
| 340 | * and can be replaced with a call to the helper once mainlined | ||
| 341 | */ | ||
| 342 | ret = 0; | ||
| 343 | ret |= of_property_read_u32(np, "hactive", &of_mode.xres); | ||
| 344 | ret |= of_property_read_u32(np, "vactive", &of_mode.yres); | ||
| 345 | ret |= of_property_read_u32(np, "hback-porch", &of_mode.left_margin); | ||
| 346 | ret |= of_property_read_u32(np, "hfront-porch", &of_mode.right_margin); | ||
| 347 | ret |= of_property_read_u32(np, "hsync-len", &of_mode.hsync_len); | ||
| 348 | ret |= of_property_read_u32(np, "vback-porch", &of_mode.upper_margin); | ||
| 349 | ret |= of_property_read_u32(np, "vfront-porch", &of_mode.lower_margin); | ||
| 350 | ret |= of_property_read_u32(np, "vsync-len", &of_mode.vsync_len); | ||
| 351 | ret |= of_property_read_u32(np, "bpp", &bpp); | ||
| 352 | if (ret) { | ||
| 353 | pr_err("%s: Unable to read display properties\n", __func__); | ||
| 354 | goto failed_free_res; | ||
| 355 | } | ||
| 356 | |||
| 357 | of_mode.vmode = FB_VMODE_NONINTERLACED; | ||
| 358 | fb_videomode_to_var(&fbi->fb.var, &of_mode); | ||
| 309 | 359 | ||
| 310 | fbi->fb.var.nonstd = 0; | 360 | fbi->fb.var.nonstd = 0; |
| 311 | fbi->fb.var.activate = FB_ACTIVATE_NOW; | 361 | fbi->fb.var.activate = FB_ACTIVATE_NOW; |
| 312 | 362 | ||
| 313 | fbi->fb.var.height = -1; | 363 | fbi->fb.var.height = -1; |
| 314 | fbi->fb.var.width = -1; | 364 | fbi->fb.var.width = -1; |
| 315 | fbi->fb.var.xres_virtual = pdata->xres_virtual; | ||
| 316 | fbi->fb.var.yres_virtual = pdata->yres_virtual; | ||
| 317 | fbi->fb.var.bits_per_pixel = pdata->bpp; | ||
| 318 | 365 | ||
| 319 | fbi->fb.fix.smem_start = pdata->video_mem_phys; | 366 | /* try allocating the framebuffer */ |
| 320 | fbi->fb.fix.smem_len = pdata->video_mem_len; | 367 | fb_mem_len = of_mode.xres * of_mode.yres * 2 * (bpp / 8); |
| 321 | fbi->fb.screen_base = pdata->video_mem_virt; | 368 | fb_mem_virt = dma_alloc_coherent(&pdev->dev, fb_mem_len, &fb_mem_phys, |
| 322 | fbi->fb.screen_size = pdata->video_mem_len; | 369 | GFP_KERNEL); |
| 370 | if (!fb_mem_virt) { | ||
| 371 | pr_err("%s: Failed to allocate framebuffer\n", __func__); | ||
| 372 | return -ENOMEM; | ||
| 373 | }; | ||
| 374 | |||
| 375 | fbi->fb.var.xres_virtual = of_mode.xres; | ||
| 376 | fbi->fb.var.yres_virtual = of_mode.yres * 2; | ||
| 377 | fbi->fb.var.bits_per_pixel = bpp; | ||
| 378 | |||
| 379 | fbi->fb.fix.smem_start = fb_mem_phys; | ||
| 380 | fbi->fb.fix.smem_len = fb_mem_len; | ||
| 381 | fbi->fb.screen_base = fb_mem_virt; | ||
| 382 | fbi->fb.screen_size = fb_mem_len; | ||
| 323 | 383 | ||
| 324 | if (fb_alloc_cmap(&fbi->fb.cmap, 256, 0) < 0) { | 384 | if (fb_alloc_cmap(&fbi->fb.cmap, 256, 0) < 0) { |
| 325 | dev_err(&pdev->dev, "Failed to allocate color map\n"); | 385 | dev_err(&pdev->dev, "Failed to allocate color map\n"); |
| @@ -395,12 +455,18 @@ static int __devexit wm8505fb_remove(struct platform_device *pdev) | |||
| 395 | return 0; | 455 | return 0; |
| 396 | } | 456 | } |
| 397 | 457 | ||
| 458 | static const struct of_device_id wmt_dt_ids[] = { | ||
| 459 | { .compatible = "wm,wm8505-fb", }, | ||
| 460 | {} | ||
| 461 | }; | ||
| 462 | |||
| 398 | static struct platform_driver wm8505fb_driver = { | 463 | static struct platform_driver wm8505fb_driver = { |
| 399 | .probe = wm8505fb_probe, | 464 | .probe = wm8505fb_probe, |
| 400 | .remove = __devexit_p(wm8505fb_remove), | 465 | .remove = __devexit_p(wm8505fb_remove), |
| 401 | .driver = { | 466 | .driver = { |
| 402 | .owner = THIS_MODULE, | 467 | .owner = THIS_MODULE, |
| 403 | .name = DRIVER_NAME, | 468 | .name = DRIVER_NAME, |
| 469 | .of_match_table = of_match_ptr(wmt_dt_ids), | ||
| 404 | }, | 470 | }, |
| 405 | }; | 471 | }; |
| 406 | 472 | ||
| @@ -408,4 +474,5 @@ module_platform_driver(wm8505fb_driver); | |||
| 408 | 474 | ||
| 409 | MODULE_AUTHOR("Ed Spiridonov <edo.rus@gmail.com>"); | 475 | MODULE_AUTHOR("Ed Spiridonov <edo.rus@gmail.com>"); |
| 410 | MODULE_DESCRIPTION("Framebuffer driver for WMT WM8505"); | 476 | MODULE_DESCRIPTION("Framebuffer driver for WMT WM8505"); |
| 411 | MODULE_LICENSE("GPL"); | 477 | MODULE_LICENSE("GPL v2"); |
| 478 | MODULE_DEVICE_TABLE(of, wmt_dt_ids); | ||
diff --git a/drivers/video/wmt_ge_rops.c b/drivers/video/wmt_ge_rops.c index 55be3865015b..ba025b4c7d09 100644 --- a/drivers/video/wmt_ge_rops.c +++ b/drivers/video/wmt_ge_rops.c | |||
| @@ -158,12 +158,18 @@ static int __devexit wmt_ge_rops_remove(struct platform_device *pdev) | |||
| 158 | return 0; | 158 | return 0; |
| 159 | } | 159 | } |
| 160 | 160 | ||
| 161 | static const struct of_device_id wmt_dt_ids[] = { | ||
| 162 | { .compatible = "wm,prizm-ge-rops", }, | ||
| 163 | { /* sentinel */ } | ||
| 164 | }; | ||
| 165 | |||
| 161 | static struct platform_driver wmt_ge_rops_driver = { | 166 | static struct platform_driver wmt_ge_rops_driver = { |
| 162 | .probe = wmt_ge_rops_probe, | 167 | .probe = wmt_ge_rops_probe, |
| 163 | .remove = __devexit_p(wmt_ge_rops_remove), | 168 | .remove = __devexit_p(wmt_ge_rops_remove), |
| 164 | .driver = { | 169 | .driver = { |
| 165 | .owner = THIS_MODULE, | 170 | .owner = THIS_MODULE, |
| 166 | .name = "wmt_ge_rops", | 171 | .name = "wmt_ge_rops", |
| 172 | .of_match_table = of_match_ptr(wmt_dt_ids), | ||
| 167 | }, | 173 | }, |
| 168 | }; | 174 | }; |
| 169 | 175 | ||
| @@ -172,4 +178,5 @@ module_platform_driver(wmt_ge_rops_driver); | |||
| 172 | MODULE_AUTHOR("Alexey Charkov <alchark@gmail.com"); | 178 | MODULE_AUTHOR("Alexey Charkov <alchark@gmail.com"); |
| 173 | MODULE_DESCRIPTION("Accelerators for raster operations using " | 179 | MODULE_DESCRIPTION("Accelerators for raster operations using " |
| 174 | "WonderMedia Graphics Engine"); | 180 | "WonderMedia Graphics Engine"); |
| 175 | MODULE_LICENSE("GPL"); | 181 | MODULE_LICENSE("GPL v2"); |
| 182 | MODULE_DEVICE_TABLE(of, wmt_dt_ids); | ||
diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h index 77335fac943e..c12731582920 100644 --- a/include/linux/clk-provider.h +++ b/include/linux/clk-provider.h | |||
| @@ -26,6 +26,7 @@ | |||
| 26 | #define CLK_IGNORE_UNUSED BIT(3) /* do not gate even if unused */ | 26 | #define CLK_IGNORE_UNUSED BIT(3) /* do not gate even if unused */ |
| 27 | #define CLK_IS_ROOT BIT(4) /* root clk, has no parent */ | 27 | #define CLK_IS_ROOT BIT(4) /* root clk, has no parent */ |
| 28 | #define CLK_IS_BASIC BIT(5) /* Basic clk, can't do a to_clk_foo() */ | 28 | #define CLK_IS_BASIC BIT(5) /* Basic clk, can't do a to_clk_foo() */ |
| 29 | #define CLK_GET_RATE_NOCACHE BIT(6) /* do not use the cached clk rate */ | ||
| 29 | 30 | ||
| 30 | struct clk_hw; | 31 | struct clk_hw; |
| 31 | 32 | ||
| @@ -360,6 +361,11 @@ int of_clk_add_provider(struct device_node *np, | |||
| 360 | void of_clk_del_provider(struct device_node *np); | 361 | void of_clk_del_provider(struct device_node *np); |
| 361 | struct clk *of_clk_src_simple_get(struct of_phandle_args *clkspec, | 362 | struct clk *of_clk_src_simple_get(struct of_phandle_args *clkspec, |
| 362 | void *data); | 363 | void *data); |
| 364 | struct clk_onecell_data { | ||
| 365 | struct clk **clks; | ||
| 366 | unsigned int clk_num; | ||
| 367 | }; | ||
| 368 | struct clk *of_clk_src_onecell_get(struct of_phandle_args *clkspec, void *data); | ||
| 363 | const char *of_clk_get_parent_name(struct device_node *np, int index); | 369 | const char *of_clk_get_parent_name(struct device_node *np, int index); |
| 364 | void of_clk_init(const struct of_device_id *matches); | 370 | void of_clk_init(const struct of_device_id *matches); |
| 365 | 371 | ||
diff --git a/include/linux/mfd/abx500/ab8500-codec.h b/include/linux/mfd/abx500/ab8500-codec.h index dc6529202cdd..d7079413def0 100644 --- a/include/linux/mfd/abx500/ab8500-codec.h +++ b/include/linux/mfd/abx500/ab8500-codec.h | |||
| @@ -23,7 +23,8 @@ enum amic_type { | |||
| 23 | /* Mic-biases */ | 23 | /* Mic-biases */ |
| 24 | enum amic_micbias { | 24 | enum amic_micbias { |
| 25 | AMIC_MICBIAS_VAMIC1, | 25 | AMIC_MICBIAS_VAMIC1, |
| 26 | AMIC_MICBIAS_VAMIC2 | 26 | AMIC_MICBIAS_VAMIC2, |
| 27 | AMIC_MICBIAS_UNKNOWN | ||
| 27 | }; | 28 | }; |
| 28 | 29 | ||
| 29 | /* Bias-voltage */ | 30 | /* Bias-voltage */ |
| @@ -31,7 +32,8 @@ enum ear_cm_voltage { | |||
| 31 | EAR_CMV_0_95V, | 32 | EAR_CMV_0_95V, |
| 32 | EAR_CMV_1_10V, | 33 | EAR_CMV_1_10V, |
| 33 | EAR_CMV_1_27V, | 34 | EAR_CMV_1_27V, |
| 34 | EAR_CMV_1_58V | 35 | EAR_CMV_1_58V, |
| 36 | EAR_CMV_UNKNOWN | ||
| 35 | }; | 37 | }; |
| 36 | 38 | ||
| 37 | /* Analog microphone settings */ | 39 | /* Analog microphone settings */ |
diff --git a/include/linux/mfd/dbx500-prcmu.h b/include/linux/mfd/dbx500-prcmu.h index 5b90e94399e1..c410d99bd667 100644 --- a/include/linux/mfd/dbx500-prcmu.h +++ b/include/linux/mfd/dbx500-prcmu.h | |||
| @@ -136,6 +136,7 @@ enum prcmu_clock { | |||
| 136 | PRCMU_TIMCLK, | 136 | PRCMU_TIMCLK, |
| 137 | PRCMU_PLLSOC0, | 137 | PRCMU_PLLSOC0, |
| 138 | PRCMU_PLLSOC1, | 138 | PRCMU_PLLSOC1, |
| 139 | PRCMU_ARMSS, | ||
| 139 | PRCMU_PLLDDR, | 140 | PRCMU_PLLDDR, |
| 140 | PRCMU_PLLDSI, | 141 | PRCMU_PLLDSI, |
| 141 | PRCMU_DSI0CLK, | 142 | PRCMU_DSI0CLK, |
diff --git a/include/linux/of_irq.h b/include/linux/of_irq.h index 1717cd935e1c..b8e241125201 100644 --- a/include/linux/of_irq.h +++ b/include/linux/of_irq.h | |||
| @@ -83,6 +83,11 @@ static inline unsigned int irq_of_parse_and_map(struct device_node *dev, | |||
| 83 | { | 83 | { |
| 84 | return 0; | 84 | return 0; |
| 85 | } | 85 | } |
| 86 | |||
| 87 | static inline void *of_irq_find_parent(struct device_node *child) | ||
| 88 | { | ||
| 89 | return NULL; | ||
| 90 | } | ||
| 86 | #endif /* !CONFIG_OF */ | 91 | #endif /* !CONFIG_OF */ |
| 87 | 92 | ||
| 88 | #endif /* __OF_IRQ_H */ | 93 | #endif /* __OF_IRQ_H */ |
diff --git a/include/linux/platform_data/clk-realview.h b/include/linux/platform_data/clk-realview.h new file mode 100644 index 000000000000..2e426a7dbc51 --- /dev/null +++ b/include/linux/platform_data/clk-realview.h | |||
| @@ -0,0 +1 @@ | |||
| void realview_clk_init(void __iomem *sysbase, bool is_pb1176); | |||
diff --git a/include/linux/platform_data/clk-ux500.h b/include/linux/platform_data/clk-ux500.h new file mode 100644 index 000000000000..3af0da1f3be5 --- /dev/null +++ b/include/linux/platform_data/clk-ux500.h | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | /* | ||
| 2 | * Clock definitions for ux500 platforms | ||
| 3 | * | ||
| 4 | * Copyright (C) 2012 ST-Ericsson SA | ||
| 5 | * Author: Ulf Hansson <ulf.hansson@linaro.org> | ||
| 6 | * | ||
| 7 | * License terms: GNU General Public License (GPL) version 2 | ||
| 8 | */ | ||
| 9 | |||
| 10 | #ifndef __CLK_UX500_H | ||
| 11 | #define __CLK_UX500_H | ||
| 12 | |||
| 13 | void u8500_clk_init(void); | ||
| 14 | void u9540_clk_init(void); | ||
| 15 | void u8540_clk_init(void); | ||
| 16 | |||
| 17 | #endif /* __CLK_UX500_H */ | ||
diff --git a/sound/soc/codecs/ab8500-codec.c b/sound/soc/codecs/ab8500-codec.c index 23b40186f9b8..07abd09e0b1d 100644 --- a/sound/soc/codecs/ab8500-codec.c +++ b/sound/soc/codecs/ab8500-codec.c | |||
| @@ -34,6 +34,7 @@ | |||
| 34 | #include <linux/mfd/abx500/ab8500-sysctrl.h> | 34 | #include <linux/mfd/abx500/ab8500-sysctrl.h> |
| 35 | #include <linux/mfd/abx500/ab8500-codec.h> | 35 | #include <linux/mfd/abx500/ab8500-codec.h> |
| 36 | #include <linux/regulator/consumer.h> | 36 | #include <linux/regulator/consumer.h> |
| 37 | #include <linux/of.h> | ||
| 37 | 38 | ||
| 38 | #include <sound/core.h> | 39 | #include <sound/core.h> |
| 39 | #include <sound/pcm.h> | 40 | #include <sound/pcm.h> |
| @@ -2394,9 +2395,65 @@ struct snd_soc_dai_driver ab8500_codec_dai[] = { | |||
| 2394 | } | 2395 | } |
| 2395 | }; | 2396 | }; |
| 2396 | 2397 | ||
| 2398 | static void ab8500_codec_of_probe(struct device *dev, struct device_node *np, | ||
| 2399 | struct ab8500_codec_platform_data *codec) | ||
| 2400 | { | ||
| 2401 | u32 value; | ||
| 2402 | |||
| 2403 | if (of_get_property(np, "stericsson,amic1-type-single-ended", NULL)) | ||
| 2404 | codec->amics.mic1_type = AMIC_TYPE_SINGLE_ENDED; | ||
| 2405 | else | ||
| 2406 | codec->amics.mic1_type = AMIC_TYPE_DIFFERENTIAL; | ||
| 2407 | |||
| 2408 | if (of_get_property(np, "stericsson,amic2-type-single-ended", NULL)) | ||
| 2409 | codec->amics.mic2_type = AMIC_TYPE_SINGLE_ENDED; | ||
| 2410 | else | ||
| 2411 | codec->amics.mic2_type = AMIC_TYPE_DIFFERENTIAL; | ||
| 2412 | |||
| 2413 | /* Has a non-standard Vamic been requested? */ | ||
| 2414 | if (of_get_property(np, "stericsson,amic1a-bias-vamic2", NULL)) | ||
| 2415 | codec->amics.mic1a_micbias = AMIC_MICBIAS_VAMIC2; | ||
| 2416 | else | ||
| 2417 | codec->amics.mic1a_micbias = AMIC_MICBIAS_VAMIC1; | ||
| 2418 | |||
| 2419 | if (of_get_property(np, "stericsson,amic1b-bias-vamic2", NULL)) | ||
| 2420 | codec->amics.mic1b_micbias = AMIC_MICBIAS_VAMIC2; | ||
| 2421 | else | ||
| 2422 | codec->amics.mic1b_micbias = AMIC_MICBIAS_VAMIC1; | ||
| 2423 | |||
| 2424 | if (of_get_property(np, "stericsson,amic2-bias-vamic1", NULL)) | ||
| 2425 | codec->amics.mic2_micbias = AMIC_MICBIAS_VAMIC1; | ||
| 2426 | else | ||
| 2427 | codec->amics.mic2_micbias = AMIC_MICBIAS_VAMIC2; | ||
| 2428 | |||
| 2429 | if (!of_property_read_u32(np, "stericsson,earpeice-cmv", &value)) { | ||
| 2430 | switch (value) { | ||
| 2431 | case 950 : | ||
| 2432 | codec->ear_cmv = EAR_CMV_0_95V; | ||
| 2433 | break; | ||
| 2434 | case 1100 : | ||
| 2435 | codec->ear_cmv = EAR_CMV_1_10V; | ||
| 2436 | break; | ||
| 2437 | case 1270 : | ||
| 2438 | codec->ear_cmv = EAR_CMV_1_27V; | ||
| 2439 | break; | ||
| 2440 | case 1580 : | ||
| 2441 | codec->ear_cmv = EAR_CMV_1_58V; | ||
| 2442 | break; | ||
| 2443 | default : | ||
| 2444 | codec->ear_cmv = EAR_CMV_UNKNOWN; | ||
| 2445 | dev_err(dev, "Unsuitable earpiece voltage found in DT\n"); | ||
| 2446 | } | ||
| 2447 | } else { | ||
| 2448 | dev_warn(dev, "No earpiece voltage found in DT - using default\n"); | ||
| 2449 | codec->ear_cmv = EAR_CMV_0_95V; | ||
| 2450 | } | ||
| 2451 | } | ||
| 2452 | |||
| 2397 | static int ab8500_codec_probe(struct snd_soc_codec *codec) | 2453 | static int ab8500_codec_probe(struct snd_soc_codec *codec) |
| 2398 | { | 2454 | { |
| 2399 | struct device *dev = codec->dev; | 2455 | struct device *dev = codec->dev; |
| 2456 | struct device_node *np = dev->of_node; | ||
| 2400 | struct ab8500_codec_drvdata *drvdata = dev_get_drvdata(dev); | 2457 | struct ab8500_codec_drvdata *drvdata = dev_get_drvdata(dev); |
| 2401 | struct ab8500_platform_data *pdata; | 2458 | struct ab8500_platform_data *pdata; |
| 2402 | struct filter_control *fc; | 2459 | struct filter_control *fc; |
| @@ -2410,6 +2467,30 @@ static int ab8500_codec_probe(struct snd_soc_codec *codec) | |||
| 2410 | /* Inform SoC Core that we have our own I/O arrangements. */ | 2467 | /* Inform SoC Core that we have our own I/O arrangements. */ |
| 2411 | codec->control_data = (void *)true; | 2468 | codec->control_data = (void *)true; |
| 2412 | 2469 | ||
| 2470 | if (np) { | ||
| 2471 | if (!pdata) | ||
| 2472 | pdata = devm_kzalloc(dev, | ||
| 2473 | sizeof(struct ab8500_platform_data), | ||
| 2474 | GFP_KERNEL); | ||
| 2475 | |||
| 2476 | if (pdata && !pdata->codec) | ||
| 2477 | pdata->codec | ||
| 2478 | = devm_kzalloc(dev, | ||
| 2479 | sizeof(struct ab8500_codec_platform_data), | ||
| 2480 | GFP_KERNEL); | ||
| 2481 | |||
| 2482 | if (!(pdata && pdata->codec)) | ||
| 2483 | return -ENOMEM; | ||
| 2484 | |||
| 2485 | ab8500_codec_of_probe(dev, np, pdata->codec); | ||
| 2486 | |||
| 2487 | } else { | ||
| 2488 | if (!(pdata && pdata->codec)) { | ||
| 2489 | dev_err(dev, "No codec platform data or DT found\n"); | ||
| 2490 | return -EINVAL; | ||
| 2491 | } | ||
| 2492 | } | ||
| 2493 | |||
| 2413 | status = ab8500_audio_setup_mics(codec, &pdata->codec->amics); | 2494 | status = ab8500_audio_setup_mics(codec, &pdata->codec->amics); |
| 2414 | if (status < 0) { | 2495 | if (status < 0) { |
| 2415 | pr_err("%s: Failed to setup mics (%d)!\n", __func__, status); | 2496 | pr_err("%s: Failed to setup mics (%d)!\n", __func__, status); |
diff --git a/sound/soc/ux500/mop500.c b/sound/soc/ux500/mop500.c index 31c4d26d0359..356611d9654d 100644 --- a/sound/soc/ux500/mop500.c +++ b/sound/soc/ux500/mop500.c | |||
| @@ -16,6 +16,7 @@ | |||
| 16 | #include <linux/module.h> | 16 | #include <linux/module.h> |
| 17 | #include <linux/io.h> | 17 | #include <linux/io.h> |
| 18 | #include <linux/spi/spi.h> | 18 | #include <linux/spi/spi.h> |
| 19 | #include <linux/of.h> | ||
| 19 | 20 | ||
| 20 | #include <sound/soc.h> | 21 | #include <sound/soc.h> |
| 21 | #include <sound/initval.h> | 22 | #include <sound/initval.h> |
| @@ -56,16 +57,47 @@ static struct snd_soc_card mop500_card = { | |||
| 56 | .num_links = ARRAY_SIZE(mop500_dai_links), | 57 | .num_links = ARRAY_SIZE(mop500_dai_links), |
| 57 | }; | 58 | }; |
| 58 | 59 | ||
| 60 | static int __devinit mop500_of_probe(struct platform_device *pdev, | ||
| 61 | struct device_node *np) | ||
| 62 | { | ||
| 63 | struct device_node *codec_np, *msp_np[2]; | ||
| 64 | int i; | ||
| 65 | |||
| 66 | msp_np[0] = of_parse_phandle(np, "stericsson,cpu-dai", 0); | ||
| 67 | msp_np[1] = of_parse_phandle(np, "stericsson,cpu-dai", 1); | ||
| 68 | codec_np = of_parse_phandle(np, "stericsson,audio-codec", 0); | ||
| 69 | |||
| 70 | if (!(msp_np[0] && msp_np[1] && codec_np)) { | ||
| 71 | dev_err(&pdev->dev, "Phandle missing or invalid\n"); | ||
| 72 | return -EINVAL; | ||
| 73 | } | ||
| 74 | |||
| 75 | for (i = 0; i < 2; i++) { | ||
| 76 | mop500_dai_links[i].cpu_of_node = msp_np[i]; | ||
| 77 | mop500_dai_links[i].cpu_dai_name = NULL; | ||
| 78 | mop500_dai_links[i].codec_of_node = codec_np; | ||
| 79 | mop500_dai_links[i].codec_name = NULL; | ||
| 80 | } | ||
| 81 | |||
| 82 | snd_soc_of_parse_card_name(&mop500_card, "stericsson,card-name"); | ||
| 83 | |||
| 84 | return 0; | ||
| 85 | } | ||
| 59 | static int __devinit mop500_probe(struct platform_device *pdev) | 86 | static int __devinit mop500_probe(struct platform_device *pdev) |
| 60 | { | 87 | { |
| 88 | struct device_node *np = pdev->dev.of_node; | ||
| 61 | int ret; | 89 | int ret; |
| 62 | 90 | ||
| 63 | pr_debug("%s: Enter.\n", __func__); | ||
| 64 | |||
| 65 | dev_dbg(&pdev->dev, "%s: Enter.\n", __func__); | 91 | dev_dbg(&pdev->dev, "%s: Enter.\n", __func__); |
| 66 | 92 | ||
| 67 | mop500_card.dev = &pdev->dev; | 93 | mop500_card.dev = &pdev->dev; |
| 68 | 94 | ||
| 95 | if (np) { | ||
| 96 | ret = mop500_of_probe(pdev, np); | ||
| 97 | if (ret) | ||
| 98 | return ret; | ||
| 99 | } | ||
| 100 | |||
| 69 | dev_dbg(&pdev->dev, "%s: Card %s: Set platform drvdata.\n", | 101 | dev_dbg(&pdev->dev, "%s: Card %s: Set platform drvdata.\n", |
| 70 | __func__, mop500_card.name); | 102 | __func__, mop500_card.name); |
| 71 | platform_set_drvdata(pdev, &mop500_card); | 103 | platform_set_drvdata(pdev, &mop500_card); |
| @@ -83,8 +115,7 @@ static int __devinit mop500_probe(struct platform_device *pdev) | |||
| 83 | ret = snd_soc_register_card(&mop500_card); | 115 | ret = snd_soc_register_card(&mop500_card); |
| 84 | if (ret) | 116 | if (ret) |
| 85 | dev_err(&pdev->dev, | 117 | dev_err(&pdev->dev, |
| 86 | "Error: snd_soc_register_card failed (%d)!\n", | 118 | "Error: snd_soc_register_card failed (%d)!\n", ret); |
| 87 | ret); | ||
| 88 | 119 | ||
| 89 | return ret; | 120 | return ret; |
| 90 | } | 121 | } |
| @@ -97,14 +128,20 @@ static int __devexit mop500_remove(struct platform_device *pdev) | |||
| 97 | 128 | ||
| 98 | snd_soc_unregister_card(mop500_card); | 129 | snd_soc_unregister_card(mop500_card); |
| 99 | mop500_ab8500_remove(mop500_card); | 130 | mop500_ab8500_remove(mop500_card); |
| 100 | 131 | ||
| 101 | return 0; | 132 | return 0; |
| 102 | } | 133 | } |
| 103 | 134 | ||
| 135 | static const struct of_device_id snd_soc_mop500_match[] = { | ||
| 136 | { .compatible = "stericsson,snd-soc-mop500", }, | ||
| 137 | {}, | ||
| 138 | }; | ||
| 139 | |||
| 104 | static struct platform_driver snd_soc_mop500_driver = { | 140 | static struct platform_driver snd_soc_mop500_driver = { |
| 105 | .driver = { | 141 | .driver = { |
| 106 | .owner = THIS_MODULE, | 142 | .owner = THIS_MODULE, |
| 107 | .name = "snd-soc-mop500", | 143 | .name = "snd-soc-mop500", |
| 144 | .of_match_table = snd_soc_mop500_match, | ||
| 108 | }, | 145 | }, |
| 109 | .probe = mop500_probe, | 146 | .probe = mop500_probe, |
| 110 | .remove = __devexit_p(mop500_remove), | 147 | .remove = __devexit_p(mop500_remove), |
diff --git a/sound/soc/ux500/ux500_msp_dai.c b/sound/soc/ux500/ux500_msp_dai.c index 057e28ef770e..45e43b4057b0 100644 --- a/sound/soc/ux500/ux500_msp_dai.c +++ b/sound/soc/ux500/ux500_msp_dai.c | |||
| @@ -830,10 +830,16 @@ static int __devexit ux500_msp_drv_remove(struct platform_device *pdev) | |||
| 830 | return 0; | 830 | return 0; |
| 831 | } | 831 | } |
| 832 | 832 | ||
| 833 | static const struct of_device_id ux500_msp_i2s_match[] = { | ||
| 834 | { .compatible = "stericsson,ux500-msp-i2s", }, | ||
| 835 | {}, | ||
| 836 | }; | ||
| 837 | |||
| 833 | static struct platform_driver msp_i2s_driver = { | 838 | static struct platform_driver msp_i2s_driver = { |
| 834 | .driver = { | 839 | .driver = { |
| 835 | .name = "ux500-msp-i2s", | 840 | .name = "ux500-msp-i2s", |
| 836 | .owner = THIS_MODULE, | 841 | .owner = THIS_MODULE, |
| 842 | .of_match_table = ux500_msp_i2s_match, | ||
| 837 | }, | 843 | }, |
| 838 | .probe = ux500_msp_drv_probe, | 844 | .probe = ux500_msp_drv_probe, |
| 839 | .remove = ux500_msp_drv_remove, | 845 | .remove = ux500_msp_drv_remove, |
diff --git a/sound/soc/ux500/ux500_msp_i2s.c b/sound/soc/ux500/ux500_msp_i2s.c index eb85113d472a..e5c79ca42518 100644 --- a/sound/soc/ux500/ux500_msp_i2s.c +++ b/sound/soc/ux500/ux500_msp_i2s.c | |||
| @@ -15,8 +15,10 @@ | |||
| 15 | 15 | ||
| 16 | #include <linux/module.h> | 16 | #include <linux/module.h> |
| 17 | #include <linux/platform_device.h> | 17 | #include <linux/platform_device.h> |
| 18 | #include <linux/pinctrl/consumer.h> | ||
| 18 | #include <linux/delay.h> | 19 | #include <linux/delay.h> |
| 19 | #include <linux/slab.h> | 20 | #include <linux/slab.h> |
| 21 | #include <linux/of.h> | ||
| 20 | 22 | ||
| 21 | #include <mach/hardware.h> | 23 | #include <mach/hardware.h> |
| 22 | #include <mach/msp.h> | 24 | #include <mach/msp.h> |
| @@ -25,6 +27,9 @@ | |||
| 25 | 27 | ||
| 26 | #include "ux500_msp_i2s.h" | 28 | #include "ux500_msp_i2s.h" |
| 27 | 29 | ||
| 30 | /* MSP1/3 Tx/Rx usage protection */ | ||
| 31 | static DEFINE_SPINLOCK(msp_rxtx_lock); | ||
| 32 | |||
| 28 | /* Protocol desciptors */ | 33 | /* Protocol desciptors */ |
| 29 | static const struct msp_protdesc prot_descs[] = { | 34 | static const struct msp_protdesc prot_descs[] = { |
| 30 | { /* I2S */ | 35 | { /* I2S */ |
| @@ -352,17 +357,23 @@ static int configure_multichannel(struct ux500_msp *msp, | |||
| 352 | 357 | ||
| 353 | static int enable_msp(struct ux500_msp *msp, struct ux500_msp_config *config) | 358 | static int enable_msp(struct ux500_msp *msp, struct ux500_msp_config *config) |
| 354 | { | 359 | { |
| 355 | int status = 0; | 360 | int status = 0, retval = 0; |
| 356 | u32 reg_val_DMACR, reg_val_GCR; | 361 | u32 reg_val_DMACR, reg_val_GCR; |
| 362 | unsigned long flags; | ||
| 357 | 363 | ||
| 358 | /* Check msp state whether in RUN or CONFIGURED Mode */ | 364 | /* Check msp state whether in RUN or CONFIGURED Mode */ |
| 359 | if ((msp->msp_state == MSP_STATE_IDLE) && (msp->plat_init)) { | 365 | if (msp->msp_state == MSP_STATE_IDLE) { |
| 360 | status = msp->plat_init(); | 366 | spin_lock_irqsave(&msp_rxtx_lock, flags); |
| 361 | if (status) { | 367 | if (msp->pinctrl_rxtx_ref == 0 && |
| 362 | dev_err(msp->dev, "%s: ERROR: Failed to init MSP (%d)!\n", | 368 | !(IS_ERR(msp->pinctrl_p) || IS_ERR(msp->pinctrl_def))) { |
| 363 | __func__, status); | 369 | retval = pinctrl_select_state(msp->pinctrl_p, |
| 364 | return status; | 370 | msp->pinctrl_def); |
| 371 | if (retval) | ||
| 372 | pr_err("could not set MSP defstate\n"); | ||
| 365 | } | 373 | } |
| 374 | if (!retval) | ||
| 375 | msp->pinctrl_rxtx_ref++; | ||
| 376 | spin_unlock_irqrestore(&msp_rxtx_lock, flags); | ||
| 366 | } | 377 | } |
| 367 | 378 | ||
| 368 | /* Configure msp with protocol dependent settings */ | 379 | /* Configure msp with protocol dependent settings */ |
| @@ -620,7 +631,8 @@ int ux500_msp_i2s_trigger(struct ux500_msp *msp, int cmd, int direction) | |||
| 620 | 631 | ||
| 621 | int ux500_msp_i2s_close(struct ux500_msp *msp, unsigned int dir) | 632 | int ux500_msp_i2s_close(struct ux500_msp *msp, unsigned int dir) |
| 622 | { | 633 | { |
| 623 | int status = 0; | 634 | int status = 0, retval = 0; |
| 635 | unsigned long flags; | ||
| 624 | 636 | ||
| 625 | dev_dbg(msp->dev, "%s: Enter (dir = 0x%01x).\n", __func__, dir); | 637 | dev_dbg(msp->dev, "%s: Enter (dir = 0x%01x).\n", __func__, dir); |
| 626 | 638 | ||
| @@ -631,12 +643,19 @@ int ux500_msp_i2s_close(struct ux500_msp *msp, unsigned int dir) | |||
| 631 | writel((readl(msp->registers + MSP_GCR) & | 643 | writel((readl(msp->registers + MSP_GCR) & |
| 632 | (~(FRAME_GEN_ENABLE | SRG_ENABLE))), | 644 | (~(FRAME_GEN_ENABLE | SRG_ENABLE))), |
| 633 | msp->registers + MSP_GCR); | 645 | msp->registers + MSP_GCR); |
| 634 | if (msp->plat_exit) | 646 | |
| 635 | status = msp->plat_exit(); | 647 | spin_lock_irqsave(&msp_rxtx_lock, flags); |
| 636 | if (status) | 648 | WARN_ON(!msp->pinctrl_rxtx_ref); |
| 637 | dev_warn(msp->dev, | 649 | msp->pinctrl_rxtx_ref--; |
| 638 | "%s: WARN: ux500_msp_i2s_exit failed (%d)!\n", | 650 | if (msp->pinctrl_rxtx_ref == 0 && |
| 639 | __func__, status); | 651 | !(IS_ERR(msp->pinctrl_p) || IS_ERR(msp->pinctrl_sleep))) { |
| 652 | retval = pinctrl_select_state(msp->pinctrl_p, | ||
| 653 | msp->pinctrl_sleep); | ||
| 654 | if (retval) | ||
| 655 | pr_err("could not set MSP sleepstate\n"); | ||
| 656 | } | ||
| 657 | spin_unlock_irqrestore(&msp_rxtx_lock, flags); | ||
| 658 | |||
| 640 | writel(0, msp->registers + MSP_GCR); | 659 | writel(0, msp->registers + MSP_GCR); |
| 641 | writel(0, msp->registers + MSP_TCF); | 660 | writel(0, msp->registers + MSP_TCF); |
| 642 | writel(0, msp->registers + MSP_RCF); | 661 | writel(0, msp->registers + MSP_RCF); |
| @@ -665,18 +684,31 @@ int ux500_msp_i2s_init_msp(struct platform_device *pdev, | |||
| 665 | { | 684 | { |
| 666 | struct resource *res = NULL; | 685 | struct resource *res = NULL; |
| 667 | struct i2s_controller *i2s_cont; | 686 | struct i2s_controller *i2s_cont; |
| 687 | struct device_node *np = pdev->dev.of_node; | ||
| 668 | struct ux500_msp *msp; | 688 | struct ux500_msp *msp; |
| 669 | 689 | ||
| 670 | dev_dbg(&pdev->dev, "%s: Enter (name: %s, id: %d).\n", __func__, | ||
| 671 | pdev->name, platform_data->id); | ||
| 672 | |||
| 673 | *msp_p = devm_kzalloc(&pdev->dev, sizeof(struct ux500_msp), GFP_KERNEL); | 690 | *msp_p = devm_kzalloc(&pdev->dev, sizeof(struct ux500_msp), GFP_KERNEL); |
| 674 | msp = *msp_p; | 691 | msp = *msp_p; |
| 675 | 692 | ||
| 693 | if (np) { | ||
| 694 | if (!platform_data) { | ||
| 695 | platform_data = devm_kzalloc(&pdev->dev, | ||
| 696 | sizeof(struct msp_i2s_platform_data), GFP_KERNEL); | ||
| 697 | if (!platform_data) | ||
| 698 | ret = -ENOMEM; | ||
| 699 | } | ||
| 700 | } else | ||
| 701 | if (!platform_data) | ||
| 702 | ret = -EINVAL; | ||
| 703 | |||
| 704 | if (ret) | ||
| 705 | goto err_res; | ||
| 706 | |||
| 707 | dev_dbg(&pdev->dev, "%s: Enter (name: %s, id: %d).\n", __func__, | ||
| 708 | pdev->name, platform_data->id); | ||
| 709 | |||
| 676 | msp->id = platform_data->id; | 710 | msp->id = platform_data->id; |
| 677 | msp->dev = &pdev->dev; | 711 | msp->dev = &pdev->dev; |
| 678 | msp->plat_init = platform_data->msp_i2s_init; | ||
| 679 | msp->plat_exit = platform_data->msp_i2s_exit; | ||
| 680 | msp->dma_cfg_rx = platform_data->msp_i2s_dma_rx; | 712 | msp->dma_cfg_rx = platform_data->msp_i2s_dma_rx; |
| 681 | msp->dma_cfg_tx = platform_data->msp_i2s_dma_tx; | 713 | msp->dma_cfg_tx = platform_data->msp_i2s_dma_tx; |
| 682 | 714 | ||
| @@ -713,6 +745,25 @@ int ux500_msp_i2s_init_msp(struct platform_device *pdev, | |||
| 713 | dev_dbg(&pdev->dev, "I2S device-name: '%s'\n", i2s_cont->name); | 745 | dev_dbg(&pdev->dev, "I2S device-name: '%s'\n", i2s_cont->name); |
| 714 | msp->i2s_cont = i2s_cont; | 746 | msp->i2s_cont = i2s_cont; |
| 715 | 747 | ||
| 748 | msp->pinctrl_p = pinctrl_get(msp->dev); | ||
| 749 | if (IS_ERR(msp->pinctrl_p)) | ||
| 750 | dev_err(&pdev->dev, "could not get MSP pinctrl\n"); | ||
| 751 | else { | ||
| 752 | msp->pinctrl_def = pinctrl_lookup_state(msp->pinctrl_p, | ||
| 753 | PINCTRL_STATE_DEFAULT); | ||
| 754 | if (IS_ERR(msp->pinctrl_def)) { | ||
| 755 | dev_err(&pdev->dev, | ||
| 756 | "could not get MSP defstate (%li)\n", | ||
| 757 | PTR_ERR(msp->pinctrl_def)); | ||
| 758 | } | ||
| 759 | msp->pinctrl_sleep = pinctrl_lookup_state(msp->pinctrl_p, | ||
| 760 | PINCTRL_STATE_SLEEP); | ||
| 761 | if (IS_ERR(msp->pinctrl_sleep)) | ||
| 762 | dev_err(&pdev->dev, | ||
| 763 | "could not get MSP idlestate (%li)\n", | ||
| 764 | PTR_ERR(msp->pinctrl_def)); | ||
| 765 | } | ||
| 766 | |||
| 716 | return 0; | 767 | return 0; |
| 717 | } | 768 | } |
| 718 | 769 | ||
diff --git a/sound/soc/ux500/ux500_msp_i2s.h b/sound/soc/ux500/ux500_msp_i2s.h index 2d9136da9865..1311c0df7628 100644 --- a/sound/soc/ux500/ux500_msp_i2s.h +++ b/sound/soc/ux500/ux500_msp_i2s.h | |||
| @@ -524,14 +524,18 @@ struct ux500_msp { | |||
| 524 | struct dma_chan *rx_pipeid; | 524 | struct dma_chan *rx_pipeid; |
| 525 | enum msp_state msp_state; | 525 | enum msp_state msp_state; |
| 526 | int (*transfer) (struct ux500_msp *msp, struct i2s_message *message); | 526 | int (*transfer) (struct ux500_msp *msp, struct i2s_message *message); |
| 527 | int (*plat_init) (void); | ||
| 528 | int (*plat_exit) (void); | ||
| 529 | struct timer_list notify_timer; | 527 | struct timer_list notify_timer; |
| 530 | int def_elem_len; | 528 | int def_elem_len; |
| 531 | unsigned int dir_busy; | 529 | unsigned int dir_busy; |
| 532 | int loopback_enable; | 530 | int loopback_enable; |
| 533 | u32 backup_regs[MAX_MSP_BACKUP_REGS]; | 531 | u32 backup_regs[MAX_MSP_BACKUP_REGS]; |
| 534 | unsigned int f_bitclk; | 532 | unsigned int f_bitclk; |
| 533 | /* Pin modes */ | ||
| 534 | struct pinctrl *pinctrl_p; | ||
| 535 | struct pinctrl_state *pinctrl_def; | ||
| 536 | struct pinctrl_state *pinctrl_sleep; | ||
| 537 | /* Reference Count */ | ||
| 538 | int pinctrl_rxtx_ref; | ||
| 535 | }; | 539 | }; |
| 536 | 540 | ||
| 537 | struct ux500_msp_dma_params { | 541 | struct ux500_msp_dma_params { |
