diff options
author | Gabriel Fernandez <gabriel.fernandez@st.com> | 2013-06-12 16:35:34 +0200 |
---|---|---|
committer | Linus Walleij <linus.walleij@stericsson.com> | 2013-08-06 23:48:50 +0200 |
commit | 3d0899e8dab638dd00a7a36b8620ec80bb812fea (patch) | |
tree | 32174552af34debe9099d59dc24f58e1fb251a6e /arch | |
parent | ARM: ux500: Stop passing MMC's platform data for Device Tree boots (diff) | |
download | linux-3d0899e8dab638dd00a7a36b8620ec80bb812fea.tar.xz linux-3d0899e8dab638dd00a7a36b8620ec80bb812fea.zip |
ARM: u8540: Add Pinctrl Device Tree settings for uart0, uart2
This patch adds pinctrl device tree settings for uart0 and uart2
for ccu8540 board.
Signed-off-by: Gabriel Fernandez <gabriel.fernandez@st.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/boot/dts/ccu8540-pinctrl.dtsi | 81 | ||||
-rw-r--r-- | arch/arm/boot/dts/ccu8540.dts | 11 | ||||
-rw-r--r-- | arch/arm/boot/dts/ste-nomadik-pinctrl.dtsi | 95 |
3 files changed, 187 insertions, 0 deletions
diff --git a/arch/arm/boot/dts/ccu8540-pinctrl.dtsi b/arch/arm/boot/dts/ccu8540-pinctrl.dtsi new file mode 100644 index 000000000000..644b189f8f72 --- /dev/null +++ b/arch/arm/boot/dts/ccu8540-pinctrl.dtsi @@ -0,0 +1,81 @@ +/* + * Copyright 2012 ST-Ericsson + * + * The code contained herein is licensed under the GNU General Public + * License. You may obtain a copy of the GNU General Public License + * Version 2 or later at the following locations: + * + * http://www.opensource.org/licenses/gpl-license.html + * http://www.gnu.org/copyleft/gpl.html + */ +#include "ste-nomadik-pinctrl.dtsi" + +/ { + soc { + pinctrl { + uart0 { + uart0_default_mux: uart0_mux { + default_mux { + ste,function = "u0"; + ste,pins = "u0_a_1"; + }; + }; + + uart0_default_mode: uart0_default { + default_cfg1 { + ste,pins = "GPIO0", "GPIO2"; + ste,config = <&in_pu>; + }; + + default_cfg2 { + ste,pins = "GPIO1", "GPIO3"; + ste,config = <&out_hi>; + }; + }; + + uart0_sleep_mode: uart0_sleep { + sleep_cfg1 { + ste,pins = "GPIO0", "GPIO2"; + ste,config = <&slpm_in_pu>; + }; + + sleep_cfg2 { + ste,pins = "GPIO1", "GPIO3"; + ste,config = <&slpm_out_hi>; + }; + }; + }; + + uart2 { + uart2_default_mode: uart2_default { + default_mux { + ste,function = "u2"; + ste,pins = "u2txrx_a_1"; + }; + + default_cfg1 { + ste,pins = "GPIO120"; + ste,config = <&in_pu>; + }; + + default_cfg2 { + ste,pins = "GPIO121"; + ste,config = <&out_hi>; + }; + }; + + uart2_sleep_mode: uart2_sleep { + sleep_cfg1 { + ste,pins = "GPIO120"; + ste,config = <&slpm_in_pu>; + }; + + sleep_cfg2 { + ste,pins = "GPIO121"; + ste,config = <&slpm_out_hi>; + }; + }; + }; + }; + }; +}; diff --git a/arch/arm/boot/dts/ccu8540.dts b/arch/arm/boot/dts/ccu8540.dts index 48ff03441f5a..3065fe4f60e5 100644 --- a/arch/arm/boot/dts/ccu8540.dts +++ b/arch/arm/boot/dts/ccu8540.dts @@ -11,6 +11,7 @@ /dts-v1/; #include "dbx5x0.dtsi" +#include "ccu8540-pinctrl.dtsi" / { model = "ST-Ericsson U8540 platform with Device Tree"; @@ -21,12 +22,19 @@ }; soc { + pinctrl { + compatible = "stericsson,db8540-pinctrl"; + }; + prcmu@80157000 { reg = <0x80157000 0x2000>, <0x801b0000 0x8000>, <0x801b8000 0x3000>; reg-names = "prcmu", "prcmu-tcpm", "prcmu-tcdm"; }; uart@80120000 { + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&uart0_default_mux>, <&uart0_default_mode>; + pinctrl-1 = <&uart0_sleep_mode>; status = "okay"; }; @@ -35,6 +43,9 @@ }; uart@80007000 { + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&uart2_default_mode>; + pinctrl-1 = <&uart2_sleep_mode>; status = "okay"; }; }; diff --git a/arch/arm/boot/dts/ste-nomadik-pinctrl.dtsi b/arch/arm/boot/dts/ste-nomadik-pinctrl.dtsi new file mode 100644 index 000000000000..efddee9403c4 --- /dev/null +++ b/arch/arm/boot/dts/ste-nomadik-pinctrl.dtsi @@ -0,0 +1,95 @@ +/* + * Copyright 2012 ST-Ericsson + * + * The code contained herein is licensed under the GNU General Public + * License. You may obtain a copy of the GNU General Public License + * Version 2 or later at the following locations: + * + * http://www.opensource.org/licenses/gpl-license.html + * http://www.gnu.org/copyleft/gpl.html + */ +#include <dt-bindings/pinctrl/nomadik.h> + +/ { + in_nopull: in_nopull { + ste,input = <INPUT_NOPULL>; + }; + + in_pu: input_pull_up { + ste,input = <INPUT_PULLUP>; + }; + + in_pd: input_pull_down { + ste,input = <INPUT_PULLDOWN>; + }; + + out_hi: output_high { + ste,output = <OUTPUT_HIGH>; + }; + + out_lo: output_low { + ste,output = <OUTPUT_LOW>; + }; + + gpio_out_lo: gpio_output_low { + ste,gpio = <GPIOMODE_ENABLED>; + ste,output = <OUTPUT_LOW>; + }; + + slpm_in_pu: slpm_in_pu { + ste,sleep = <SLPM_ENABLED>; + ste,sleep-input = <SLPM_INPUT_PULLUP>; + ste,sleep-wakeup = <SLPM_WAKEUP_ENABLE>; + }; + + slpm_in_wkup_pdis: slpm_in_wkup_pdis { + ste,sleep = <SLPM_ENABLED>; + ste,sleep-input = <SLPM_DIR_INPUT>; + ste,sleep-wakeup = <SLPM_WAKEUP_ENABLE>; + ste,sleep-pull-disable = <SLPM_PDIS_DISABLED>; + }; + + slpm_out_lo: slpm_out_lo { + ste,sleep = <SLPM_ENABLED>; + ste,sleep-output = <SLPM_OUTPUT_LOW>; + ste,sleep-wakeup = <SLPM_WAKEUP_ENABLE>; + }; + + slpm_out_hi: slpm_out_hi { + ste,sleep = <SLPM_ENABLED>; + ste,sleep-output = <SLPM_OUTPUT_HIGH>; + ste,sleep-wakeup = <SLPM_WAKEUP_ENABLE>; + }; + + slpm_out_hi_wkup_pdis: slpm_out_hi_wkup_pdis { + ste,sleep = <SLPM_ENABLED>; + ste,sleep-output = <SLPM_OUTPUT_HIGH>; + ste,sleep-wakeup = <SLPM_WAKEUP_ENABLE>; + ste,sleep-pull-disable = <SLPM_PDIS_DISABLED>; + }; + + slpm_out_wkup_pdis: slpm_out_wkup_pdis { + ste,sleep = <SLPM_ENABLED>; + ste,sleep-output = <SLPM_DIR_OUTPUT>; + ste,sleep-wakeup = <SLPM_WAKEUP_ENABLE>; + ste,sleep-pull-disable = <SLPM_PDIS_DISABLED>; + }; + + in_wkup_pdis: in_wkup_pdis { + ste,sleep-input = <SLPM_DIR_INPUT>; + ste,sleep-wakeup = <SLPM_WAKEUP_ENABLE>; + ste,sleep-pull-disable = <SLPM_PDIS_DISABLED>; + }; + + out_hi_wkup_pdis: out_hi_wkup_pdis { + ste,sleep-output = <SLPM_OUTPUT_HIGH>; + ste,sleep-wakeup = <SLPM_WAKEUP_ENABLE>; + ste,sleep-pull-disable = <SLPM_PDIS_DISABLED>; + }; + + out_wkup_pdis: out_wkup_pdis { + ste,sleep-output = <SLPM_DIR_OUTPUT>; + ste,sleep-wakeup = <SLPM_WAKEUP_ENABLE>; + ste,sleep-pull-disable = <SLPM_PDIS_DISABLED>; + }; +}; |