ARM: dts: imx6q: extend support for the cm-fx6
Subsystems (3)
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH v2 2/4 ARM: dts: imx6q: extend support for the cm-fx6
From: Christopher Spinrath <[email protected]>
The cm-fx6 module has an on-board spi-flash chip for its firmware, an eeprom (containing e.g. the mac address of the on-board Ethernet), a sata port, a pcie controller, an USB hub, and an USB otg port. Enable support for them. In addition, enable syscon poweroff support.
---
Changes since v1:
- remove regulator pseudo-bus
- remove partition layout from spi flash node
- remove unneeded label of the spi flash node
- convert downstream power-on-gpio property of pcie node to a proper regulator
- sort usb* related nodes alphabetically
- make use of GPIO_ACTIVE_{LOW,HIGH} defines
- replace 0x80000000 iomuxc configs by proper defaults obtained from u-boot
arch/arm/boot/dts/imx6q-cm-fx6.dts | 125 +++++++++++++++++++++++++++++++++++++ 1 file changed, 125 insertions(+)
arch/arm/boot/dts/imx6q-cm-fx6.dts +125 -0
@@ -12,6 +12,7 @@ */ /dts-v1/; +#include <dt-bindings/gpio/gpio.h> #include "imx6q.dtsi" / {
@@ -31,6 +32,49 @@ linux,default-trigger = "heartbeat"; }; }; + + reg_pcie_power_on_gpio: regulator-pcie-power-on-gpio { + compatible = "regulator-fixed"; + regulator-name = "regulator-pcie-power-on-gpio"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + gpio = <&gpio2 24 GPIO_ACTIVE_HIGH>; + enable-active-high; + }; + + reg_usb_h1_vbus: usb_h1_vbus { + compatible = "regulator-fixed"; + regulator-name = "usb_h1_vbus"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + gpio = <&gpio7 8 GPIO_ACTIVE_HIGH>; + enable-active-high; + }; + + reg_usb_otg_vbus: usb_otg_vbus { + compatible = "regulator-fixed"; + regulator-name = "usb_otg_vbus"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + gpio = <&gpio3 22 GPIO_ACTIVE_HIGH>; + enable-active-high; + }; +}; + +&ecspi1 { + fsl,spi-num-chipselects = <2>; + cs-gpios = <&gpio2 30 GPIO_ACTIVE_HIGH>, <&gpio3 19 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_ecspi1>; + status = "okay"; + + m25p80 at 0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "st,m25p", "jedec,spi-nor"; + spi-max-frequency = <20000000>; + reg = <0>; + }; }; &fec {
@@ -46,7 +90,30 @@ status = "okay"; }; +&i2c3 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_i2c3>; + status = "okay"; + clock-frequency = <100000>; + + eeprom at 50 { + compatible = "at24,24c02"; + reg = <0x50>; + pagesize = <16>; + }; +}; + &iomuxc { + pinctrl_ecspi1: ecspi1grp { + fsl,pins = < + MX6QDL_PAD_EIM_D16__ECSPI1_SCLK 0x100b1 + MX6QDL_PAD_EIM_D17__ECSPI1_MISO 0x100b1 + MX6QDL_PAD_EIM_D18__ECSPI1_MOSI 0x100b1 + MX6QDL_PAD_EIM_EB2__GPIO2_IO30 0x100b1 + MX6QDL_PAD_EIM_D19__GPIO3_IO19 0x100b1 + >; + }; + pinctrl_enet: enetgrp { fsl,pins = < MX6QDL_PAD_RGMII_RXC__RGMII_RXC 0x1b0b0
@@ -90,12 +157,55 @@ >; }; + pinctrl_i2c3: i2c3grp { + fsl,pins = < + MX6QDL_PAD_GPIO_3__I2C3_SCL 0x4001b8b1 + MX6QDL_PAD_GPIO_6__I2C3_SDA 0x4001b8b1 + >; + }; + + pinctrl_pcie: pciegrp { + fsl,pins = < + MX6QDL_PAD_ENET_RXD1__GPIO1_IO26 0x1b0b1 + MX6QDL_PAD_EIM_CS1__GPIO2_IO24 0x1b0b1 + >; + }; + pinctrl_uart4: uart4grp { fsl,pins = < MX6QDL_PAD_KEY_COL0__UART4_TX_DATA 0x1b0b1 MX6QDL_PAD_KEY_ROW0__UART4_RX_DATA 0x1b0b1 >; }; + + pinctrl_usbh1: usbh1grp { + fsl,pins = < + MX6QDL_PAD_SD3_RST__GPIO7_IO08 0x1b0b1 + >; + }; + + pinctrl_usbotg: usbotggrp { + fsl,pins = < + MX6QDL_PAD_ENET_RX_ER__USB_OTG_ID 0x17059 + MX6QDL_PAD_EIM_D22__GPIO3_IO22 0x130b0 + >; + }; +}; + +&pcie { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_pcie>; + reset-gpio = <&gpio1 26 GPIO_ACTIVE_HIGH>; + vdd-supply = <®_pcie_power_on_gpio>; + status = "okay"; +}; + +&sata { + status = "okay"; +}; + +&snvs_poweroff { + status = "okay"; }; &uart4 {
@@ -103,3 +213,18 @@ pinctrl-0 = <&pinctrl_uart4>; status = "okay"; }; + +&usbh1 { + vbus-supply = <®_usb_h1_vbus>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_usbh1>; + status = "okay"; +}; + +&usbotg { + vbus-supply = <®_usb_otg_vbus>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_usbotg>; + dr_mode = "otg"; + status = "okay"; +};
Signature · 1 line
2.8.3
Fabio Estevam
reviewerPATCH v2 2/4 ARM: dts: imx6q: extend support for the cm-fx6
arch/arm/boot/dts/imx6q-cm-fx6.dts line 198
Quoted 4 lines · On Sun, Jun 5, 2016 at 3:26 PM, <[email protected]> wrote:
+&pcie {
arch/arm/boot/dts/imx6q-cm-fx6.dts +3
-0+ pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_pcie>; + reset-gpio = <&gpio1 26 GPIO_ACTIVE_HIGH>;
I suppose this should be active low, right?
With this fixed:
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH v2 2/4 ARM: dts: imx6q: extend support for the cm-fx6
Hi Fabio,
Thanks for your review!
Quoted 9 lines · Fabio Estevam
arch/arm/boot/dts/imx6q-cm-fx6.dts line 198
Quoted 4 lines · On Sun, Jun 5, 2016 at 3:26 PM, <[email protected]> wrote:
+&pcie {
arch/arm/boot/dts/imx6q-cm-fx6.dts +3
-0+ pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_pcie>; + reset-gpio = <&gpio1 26 GPIO_ACTIVE_HIGH>;I suppose this should be active low, right?
hmm, the vendor devicetree uses active high but does not set reset-gpio-active-high. In a quick test it turned out that setting this property keeps the pci bus in reset.
In fact, the linux driver ignores the polarity and falls back to active low. This explains why specifying active high "worked" here...
So you are right and it should be active low. I'll fix that.
Quoted 4 lines
With this fixed:
Reviewed-by Fabio Estevam <[email protected]>
Thanks,
Christopher
PATCH v2 3/4 ARM: dts: imx6q: add support for the Utilite Pro
In reply to a message not in the archiveFrom: Christopher Spinrath <[email protected]>
The CompuLab Utilite Pro is a miniature fanless desktop pc based on the i.MX6 Quad powered cm-fx6 module. It features two serial ports, USB OTG, 4x USB, analog audio and S/PDIF, 2x Gb Ethernet, HDMI and DVI ports, an on-board 32GB SSD, a mmc slot, and on-board wifi/bt.
Add initial support for it including USB, Ethernet (both ports), sata and HDMI support.
---
Changes since v1:
- use GPL/X11 dual license (in agreement with CompuLab)
- use GPIO_ACTIVE_{LOW,HIGH} defines to specify gpios
- use KEY_POWER define for the power key
- replace 0x80000000 iomuxc configs by proper defaults obtained from u-boot
- remove iomuxc container node
- iomuxc: remove hog group and move the gpio-key pins to a proper gpio_keys group
- clean up uart2 node (remove dma properties already present in imx6qdl.dtsi and replace deprecated fsl,uart-has-rtscts by the generic one)
arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/imx6q-utilite-pro.dts | 153 ++++++++++++++++++++++++++++++++ 2 files changed, 154 insertions(+) create mode 100644 arch/arm/boot/dts/imx6q-utilite-pro.dts
arch/arm/boot/dts/Makefile +1 -0
@@ -369,6 +369,7 @@ dtb-$(CONFIG_SOC_IMX6Q) += \ imx6q-tx6q-1110.dtb \ imx6q-tx6q-11x0-mb7.dtb \ imx6q-udoo.dtb \ + imx6q-utilite-pro.dtb \ imx6q-wandboard.dtb \ imx6q-wandboard-revb1.dtb \ imx6qp-nitrogen6_max.dtb \
arch/arm/boot/dts/imx6q-utilite-pro.dts new file +153 -0
153 lines not on this page · raw message
Signature · 1 line
2.8.3
PATCH v2 3/4 ARM: dts: imx6q: add support for the Utilite Pro
Quoted 7 lines · christopher.spinrath at rwth-aachen.de
From: Christopher Spinrath <[email protected]>
The CompuLab Utilite Pro is a miniature fanless desktop pc based on the i.MX6 Quad powered cm-fx6 module. It features two serial ports, USB OTG, 4x USB, analog audio and S/PDIF, 2x Gb Ethernet, HDMI and DVI ports, an on-board 32GB SSD, a mmc slot, and on-board wifi/bt.
Quoted 5 lines
Add initial support for it including USB, Ethernet (both ports), sata and HDMI support.
Signed-off-by Christopher Spinrath <[email protected]>Cc Igor Grinberg <[email protected]>
Signature · 2 lines
Regards, Igor.
PATCH v2 4/4 ARM: dts: imx6q-cm-fx6: Relicense under GPLv2/X11
In reply to a message not in the archiveFrom: Christopher Spinrath <[email protected]>
GPLv2-only devicetrees make reuse difficult for software components licensed under a different license. In particular, the Utilite Pro devicetree file (which includes on imx6q-cm-fx5.dts) is already dual licensed under GPLv2/X11.
Hence, relicense imx6q-cm-fx6.dts under GPLv2/X11 dual license.
---
Changes since v1:
- new patch in v2; without it the dual licensed of the imx6q-utilite-pro.dts is not really useful because it includes imx6q-cm-fx6.dts.
arch/arm/boot/dts/imx6q-cm-fx6.dts | 40 +++++++++++++++++++++++++++++++++----- 1 file changed, 35 insertions(+), 5 deletions(-)
arch/arm/boot/dts/imx6q-cm-fx6.dts +35 -5
@@ -3,12 +3,42 @@ * * Author: Valentin Raevsky <[email protected]> * - * 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: + * This file is dual-licensed: you can use it either under the terms + * of the GPL or the X11 license, at your option. Note that this dual + * licensing only applies to this file, and not this project as a + * whole. * - * http://www.opensource.org/licenses/gpl-license.html - * http://www.gnu.org/copyleft/gpl.html + * a) This file is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 as published by the Free Software Foundation. + * + * This file is distributed in the hope that it will be useful + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * Or, alternatively + * + * b) Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use + * copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED , WITHOUT WARRANTY OF ANY KIND + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. */ /dts-v1/;
Signature · 1 line
2.8.3
PATCH v2 4/4 ARM: dts: imx6q-cm-fx6: Relicense under GPLv2/X11
Hi Christopher,
Quoted 5 lines · christopher.spinrath at rwth-aachen.de
From: Christopher Spinrath <[email protected]>
GPLv2-only devicetrees make reuse difficult for software components licensed under a different license. In particular, the Utilite Pro devicetree file (which includes on
imx6q-cm-fx5.dts) is already dual
^^^
That's a downgrade ;-)
With the above fixed, please add my ack below.
Quoted 3 lines
licensed under GPLv2/X11.
Hence, relicense
imx6q-cm-fx6.dtsunder GPLv2/X11 dual license.
Off topic of this patch, I think SPDX works much better than having this huge license "hat" in each file.
Quoted 3 lines
Signed-off-by Christopher Spinrath <[email protected]>Cc Igor Grinberg <[email protected]>
Quoted 62 lines
---
Changes since v1:
- new patch in v2; without it the dual licensed of theimx6q-utilite-pro.dtsis not really useful because it includesimx6q-cm-fx6.dts.arch/arm/boot/dts/imx6q-cm-fx6.dts | 40 +++++++++++++++++++++++++++++++++----- 1 file changed, 35 insertions(+), 5 deletions(-)arch/arm/boot/dts/imx6q-cm-fx6.dts +35
-5@@ -3,12 +3,42 @@ * * Author: Valentin Raevsky <[email protected]> * - * 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: + * This file is dual-licensed: you can use it either under the terms + * of the GPL or the X11 license, at your option. Note that this dual + * licensing only applies to this file, and not this project as a + * whole. * - * http://www.opensource.org/licenses/gpl-license.html - * http://www.gnu.org/copyleft/gpl.html + * a) This file is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 as published by the Free Software Foundation. + * + * This file is distributed in the hope that it will be useful + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * Or, alternatively + * + * b) Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use + * copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED , WITHOUT WARRANTY OF ANY KIND + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. */ /dts-v1/;
Signature · 2 lines
Regards, Igor.
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH v2 4/4 ARM: dts: imx6q-cm-fx6: Relicense under GPLv2/X11
Hi Igor,
Quoted 12 lines · Igor Grinberg
Hi Christopher,
Quoted 5 lines · christopher.spinrath at rwth-aachen.de
From: Christopher Spinrath <[email protected]>
GPLv2-only devicetrees make reuse difficult for software components licensed under a different license. In particular, the Utilite Pro devicetree file (which includes on
imx6q-cm-fx5.dts) is already dual^^^That's a downgrade ;-)
With the above fixed, please add my ack below.
uups, I will fix it.
Thanks,
Christopher
Quoted 13 lines
Quoted 3 lines
licensed under GPLv2/X11.
Hence, relicense
imx6q-cm-fx6.dtsunder GPLv2/X11 dual license.Off topic of this patch, I think SPDX works much better than having this huge license "hat" in each file.
Quoted 3 lines
Signed-off-by Christopher Spinrath <[email protected]>Cc Igor Grinberg <[email protected]>Acked-by Igor Grinberg <[email protected]>
[...]