diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2018-11-09 10:54:54 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2018-11-09 10:54:54 +0100 |
commit | 5576a028d0b722a1c3b125d3ac0322debc7e724b (patch) | |
tree | 2f1145c4ffee70a891a474942ca098747ea3e458 /arch | |
parent | e61cca2117eb7dfe45cac376544ffade1d94b643 (diff) | |
parent | 9984960ac43b85faa36269d905c56c01e7549bde (diff) | |
download | barebox-5576a028d0b722a1c3b125d3ac0322debc7e724b.tar.gz barebox-5576a028d0b722a1c3b125d3ac0322debc7e724b.tar.xz |
Merge branch 'for-next/gpio'
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/boards/zii-imx6q-rdu2/board.c | 38 | ||||
-rw-r--r-- | arch/arm/boards/zii-vf610-dev/board.c | 5 | ||||
-rw-r--r-- | arch/arm/dts/imx51-zii-rdu1.dts | 13 | ||||
-rw-r--r-- | arch/arm/dts/imx6qdl-zii-rdu2.dtsi | 42 | ||||
-rw-r--r-- | arch/arm/dts/imx7d-zii-rpu2.dts | 9 | ||||
-rw-r--r-- | arch/arm/dts/vf610-zii-cfu1.dts | 11 | ||||
-rw-r--r-- | arch/arm/dts/vf610-zii-dev-rev-c.dts | 12 | ||||
-rw-r--r-- | arch/arm/dts/vf610-zii-ssmb-spu3.dts | 11 |
8 files changed, 98 insertions, 43 deletions
diff --git a/arch/arm/boards/zii-imx6q-rdu2/board.c b/arch/arm/boards/zii-imx6q-rdu2/board.c index c99f993f02..e174032c96 100644 --- a/arch/arm/boards/zii-imx6q-rdu2/board.c +++ b/arch/arm/boards/zii-imx6q-rdu2/board.c @@ -97,44 +97,6 @@ static int rdu2_reset_audio_touchscreen_nfc(void) */ late_initcall(rdu2_reset_audio_touchscreen_nfc); -static const struct gpio rdu2_front_panel_usb_gpios[] = { - { - .gpio = IMX_GPIO_NR(3, 19), - .flags = GPIOF_OUT_INIT_LOW, - .label = "usb-emulation", - }, - { - .gpio = IMX_GPIO_NR(3, 20), - .flags = GPIOF_OUT_INIT_HIGH, - .label = "usb-mode1", - }, - { - .gpio = IMX_GPIO_NR(3, 23), - .flags = GPIOF_OUT_INIT_HIGH, - .label = "usb-mode2", - }, -}; - -static int rdu2_enable_front_panel_usb(void) -{ - int ret; - - if (!of_machine_is_compatible("zii,imx6q-zii-rdu2") && - !of_machine_is_compatible("zii,imx6qp-zii-rdu2")) - return 0; - - ret = gpio_request_array(rdu2_front_panel_usb_gpios, - ARRAY_SIZE(rdu2_front_panel_usb_gpios)); - if (ret) { - pr_err("Failed to request RDU2 front panel USB gpios: %s\n", - strerror(-ret)); - - } - - return ret; -} -late_initcall(rdu2_enable_front_panel_usb); - static int rdu2_devices_init(void) { if (!of_machine_is_compatible("zii,imx6q-zii-rdu2") && diff --git a/arch/arm/boards/zii-vf610-dev/board.c b/arch/arm/boards/zii-vf610-dev/board.c index 275d0a432c..a8fa1ef61f 100644 --- a/arch/arm/boards/zii-vf610-dev/board.c +++ b/arch/arm/boards/zii-vf610-dev/board.c @@ -64,11 +64,6 @@ static int zii_vf610_cfu1_spu3_expose_signals(void) { static const struct gpio signals[] = { { - .gpio = 107, - .flags = GPIOF_OUT_INIT_HIGH, - .label = "soc_sw_rstn", - }, - { .gpio = 98, .flags = GPIOF_IN, .label = "e6352_intn", diff --git a/arch/arm/dts/imx51-zii-rdu1.dts b/arch/arm/dts/imx51-zii-rdu1.dts index 93bb344f51..c649db45c9 100644 --- a/arch/arm/dts/imx51-zii-rdu1.dts +++ b/arch/arm/dts/imx51-zii-rdu1.dts @@ -24,6 +24,15 @@ device-path = &spinor, "partname:barebox-environment"; }; }; + + aliases { + /* + * NVMEM device corresponding to EEPROM attached to + * the switch shared DT node with it, so we use that + * fact to create a desirable naming + */ + switch-eeprom = &switch; + }; }; &ecspi1 { @@ -51,6 +60,10 @@ }; }; +&mdio_gpio { + switch: switch@0 {}; +}; + &uart3 { rave-sp { watchdog { diff --git a/arch/arm/dts/imx6qdl-zii-rdu2.dtsi b/arch/arm/dts/imx6qdl-zii-rdu2.dtsi index f63b5d2ed7..a3f6dbd151 100644 --- a/arch/arm/dts/imx6qdl-zii-rdu2.dtsi +++ b/arch/arm/dts/imx6qdl-zii-rdu2.dtsi @@ -52,6 +52,12 @@ aliases { ethernet0 = &fec; ethernet1 = &i210; + /* + * NVMEM device corresponding to EEPROM attached to + * the switch shared DT node with it, so we use that + * fact to create a desirable naming + */ + switch-eeprom = &switch; }; }; @@ -124,3 +130,39 @@ }; }; }; + +&gpio3 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_gpio3_hog>; + + usb-emulation { + gpio-hog; + gpios = <19 GPIO_ACTIVE_HIGH>; + output-low; + line-name = "usb-emulation"; + }; + + usb-mode1 { + gpio-hog; + gpios = <20 GPIO_ACTIVE_HIGH>; + output-high; + line-name = "usb-mode1"; + }; + + usb-mode2 { + gpio-hog; + gpios = <23 GPIO_ACTIVE_HIGH>; + output-high; + line-name = "usb-mode2"; + }; +}; + +&iomuxc { + pinctrl_gpio3_hog: gpio3hoggrp { + fsl,pins = < + MX6QDL_PAD_EIM_D19__GPIO3_IO19 0x40000038 + MX6QDL_PAD_EIM_D20__GPIO3_IO20 0x40000038 + MX6QDL_PAD_EIM_D23__GPIO3_IO23 0x40000038 + >; + }; +}; diff --git a/arch/arm/dts/imx7d-zii-rpu2.dts b/arch/arm/dts/imx7d-zii-rpu2.dts index 6fba73f437..24a6d40f77 100644 --- a/arch/arm/dts/imx7d-zii-rpu2.dts +++ b/arch/arm/dts/imx7d-zii-rpu2.dts @@ -19,6 +19,15 @@ stdout-path = &uart2; }; + aliases { + /* + * NVMEM device corresponding to EEPROM attached to + * the switch shared DT node with it, so we use that + * fact to create a desirable naming + */ + switch-eeprom = &switch0; + }; + gpio-leds { compatible = "gpio-leds"; pinctrl-0 = <&pinctrl_leds_debug>; diff --git a/arch/arm/dts/vf610-zii-cfu1.dts b/arch/arm/dts/vf610-zii-cfu1.dts index 80d3f54f78..1493335963 100644 --- a/arch/arm/dts/vf610-zii-cfu1.dts +++ b/arch/arm/dts/vf610-zii-cfu1.dts @@ -8,3 +8,14 @@ #include "vf610-zii-dev.dtsi" +/ { + aliases { + /* + * NVMEM device corresponding to EEPROM attached to + * the switch shared DT node with it, so we use that + * fact to create a desirable naming + */ + switch-eeprom = &switch0; + }; +}; + diff --git a/arch/arm/dts/vf610-zii-dev-rev-c.dts b/arch/arm/dts/vf610-zii-dev-rev-c.dts index 797b31bef9..c6341a0279 100644 --- a/arch/arm/dts/vf610-zii-dev-rev-c.dts +++ b/arch/arm/dts/vf610-zii-dev-rev-c.dts @@ -46,6 +46,18 @@ #include "vf610-zii-dev.dtsi" +/ { + aliases { + /* + * NVMEM device corresponding to EEPROM attached to + * the switch shared DT node with it, so we use that + * fact to create a desirable naming + */ + switch0-eeprom = &switch0; + switch1-eeprom = &switch1; + }; +}; + &dspi0 { m25p128@0 { partition@0 { diff --git a/arch/arm/dts/vf610-zii-ssmb-spu3.dts b/arch/arm/dts/vf610-zii-ssmb-spu3.dts index e030109ce2..5b2460cafa 100644 --- a/arch/arm/dts/vf610-zii-ssmb-spu3.dts +++ b/arch/arm/dts/vf610-zii-ssmb-spu3.dts @@ -3,3 +3,14 @@ #include <arm/vf610-zii-ssmb-spu3.dts> #include "vf610-zii-dev.dtsi" + +/ { + aliases { + /* + * NVMEM device corresponding to EEPROM attached to + * the switch shared DT node with it, so we use that + * fact to create a desirable naming + */ + switch-eeprom = &switch0; + }; +}; |