From 259a2e5819c78226fbd9e7d985984fffc128a178 Mon Sep 17 00:00:00 2001 From: Merlin Friesen Date: Sun, 8 Dec 2019 19:33:00 -0800 Subject: [PATCH] Add files via upload --- README.adoc | 46 ++ conf/layer.conf | 15 + recipes-desktop/cl-deploy/cl-deploy.bbappend | 3 + recipes-desktop/cl-uboot/cl-uboot.bbappend | 2 + ...d-cl-som-imx7-fix-uart1-parent-clock.patch | 83 +++ ...d-cl-som-imx7-fix-i2c2-configuration.patch | 49 ++ ...-imx7d-cl-som-imx7-add-fec-phy-reset.patch | 70 ++ ...ts-imx7d-cl-som-imx7-add-RTC-support.patch | 31 + ...cl-som-imx7-add-support-for-gpio-led.patch | 52 ++ ...-som-imx7-add-support-for-touchscree.patch | 115 +++ ...l-som-imx7-add-support-for-SPI-flash.patch | 71 ++ ...cl-som-imx7-add-support-for-USB-host.patch | 31 + ...-cl-som-imx7-add-support-for-USB-hub.patch | 61 ++ ...cl-som-imx7-add-support-for-watchdog.patch | 42 ++ ...-som-imx7-add-support-for-NAND-flash.patch | 92 +++ ...cl-som-imx7-add-WiLink8-WLAN-support.patch | 107 +++ ...pace-consumer-add-MODULE_ALIAS-macro.patch | 26 + ...dd-userspace-consumer-wrapper-driver.patch | 154 ++++ ...-som-imx7-add-WiLink-Bluetooth-suppo.patch | 52 ++ ...-imx7-Bluetooth-control-with-regulat.patch | 52 ++ ...log-audio-support-switch-for-imx-boa.patch | 37 + ...cl-som-imx7-add-analog-audio-support.patch | 133 ++++ ...s-imx7d-sbc-imx7-update-model-string.patch | 29 + ...c-imx7-add-support-for-pwm-backlight.patch | 53 ++ ...d-sbc-imx7-add-gpio-extender-support.patch | 54 ++ ...c-imx7-add-support-for-baseboard-eep.patch | 33 + ...M-dts-imx7d-sbc-imx7-add-LCD-support.patch | 130 ++++ ...M-dts-imx7d-sbc-imx7-add-DVI-support.patch | 69 ++ ...s-imx7d-sbc-imx7-add-CAN-bus-support.patch | 59 ++ ...add-support-for-phy-refclk-source-co.patch | 73 ++ ...7-ARM-dts-imx7d-sbc-imx7-enable-PCIe.patch | 41 ++ ...sbc-iot-imx7-add-basic-board-support.patch | 306 ++++++++ ...sbc-iot-imx7-add-support-for-CAN-bus.patch | 82 +++ ...rial-imx-allow-passing-rs485-options.patch | 54 ++ ...lect-uart7-clock-parent-and-set-rate.patch | 26 + ...c-iot-imx7-add-support-for-RS485-in-.patch | 70 ++ ...ts-imx7d-sbc-imx7-add-support-for-m4.patch | 69 ++ ...o-mipi_dsi_samsung-add-MIPI-host-sid.patch | 271 +++++++ ...-ti-sn65dsi83-add-MIPI-LVDS-bridge-d.patch | 637 +++++++++++++++++ ...x7d-cl-som-imx7-dts-add-LVDS-support.patch | 110 +++ ...defconfig-for-compulab-imx7-based-de.patch | 661 ++++++++++++++++++ .../cl-som-imx7/compulab_imx7_defconfig | 635 +++++++++++++++++ .../linux-compulab_cl-som-imx7.inc | 41 ++ .../linux/linux-compulab_4.14.98.bb | 25 + recipes-xfce/images/compulab-image-xfce.bb | 44 ++ tools/setup-compulab-env | 117 ++++ tools/setup-env | 12 + tools/setup-user-env | 64 ++ 48 files changed, 5089 insertions(+) create mode 100644 README.adoc create mode 100644 conf/layer.conf create mode 100644 recipes-desktop/cl-deploy/cl-deploy.bbappend create mode 100644 recipes-desktop/cl-uboot/cl-uboot.bbappend create mode 100644 recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0001-ARM-dts-imx7d-cl-som-imx7-fix-uart1-parent-clock.patch create mode 100644 recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0002-ARM-dts-imx7d-cl-som-imx7-fix-i2c2-configuration.patch create mode 100644 recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0003-ARM-dts-imx7d-cl-som-imx7-add-fec-phy-reset.patch create mode 100644 recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0004-ARM-dts-imx7d-cl-som-imx7-add-RTC-support.patch create mode 100644 recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0005-ARM-dts-imx7d-cl-som-imx7-add-support-for-gpio-led.patch create mode 100644 recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0006-ARM-dts-imx7d-cl-som-imx7-add-support-for-touchscree.patch create mode 100644 recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0007-ARM-dts-imx7d-cl-som-imx7-add-support-for-SPI-flash.patch create mode 100644 recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0008-ARM-dts-imx7d-cl-som-imx7-add-support-for-USB-host.patch create mode 100644 recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0009-ARM-dts-imx7d-cl-som-imx7-add-support-for-USB-hub.patch create mode 100644 recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0010-ARM-dts-imx7d-cl-som-imx7-add-support-for-watchdog.patch create mode 100644 recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0011-ARM-dts-imx7d-cl-som-imx7-add-support-for-NAND-flash.patch create mode 100644 recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0012-ARM-dts-imx7d-cl-som-imx7-add-WiLink8-WLAN-support.patch create mode 100644 recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0013-regulator-userspace-consumer-add-MODULE_ALIAS-macro.patch create mode 100644 recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0014-regulator-add-userspace-consumer-wrapper-driver.patch create mode 100644 recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0015-ARM-dts-imx7d-cl-som-imx7-add-WiLink-Bluetooth-suppo.patch create mode 100644 recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0016-ARM-imx7d-cl-som-imx7-Bluetooth-control-with-regulat.patch create mode 100644 recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0017-ASoC-fsl-add-analog-audio-support-switch-for-imx-boa.patch create mode 100644 recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0018-ARM-dts-imx7d-cl-som-imx7-add-analog-audio-support.patch create mode 100644 recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0019-ARM-dts-imx7d-sbc-imx7-update-model-string.patch create mode 100644 recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0020-ARM-dts-imx7d-sbc-imx7-add-support-for-pwm-backlight.patch create mode 100644 recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0021-ARM-dts-imx7d-sbc-imx7-add-gpio-extender-support.patch create mode 100644 recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0022-ARM-dts-imx7d-sbc-imx7-add-support-for-baseboard-eep.patch create mode 100644 recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0023-ARM-dts-imx7d-sbc-imx7-add-LCD-support.patch create mode 100644 recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0024-ARM-dts-imx7d-sbc-imx7-add-DVI-support.patch create mode 100644 recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0025-ARM-dts-imx7d-sbc-imx7-add-CAN-bus-support.patch create mode 100644 recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0026-PCIe-imx6-imx7d-add-support-for-phy-refclk-source-co.patch create mode 100644 recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0027-ARM-dts-imx7d-sbc-imx7-enable-PCIe.patch create mode 100644 recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0028-ARM-dts-imx7d-sbc-iot-imx7-add-basic-board-support.patch create mode 100644 recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0029-ARM-dts-imx7d-sbc-iot-imx7-add-support-for-CAN-bus.patch create mode 100644 recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0030-serial-imx-allow-passing-rs485-options.patch create mode 100644 recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0031-ARM-imx7d-clk-select-uart7-clock-parent-and-set-rate.patch create mode 100644 recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0032-ARM-dts-imx7d-sbc-iot-imx7-add-support-for-RS485-in-.patch create mode 100644 recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0033-ARM-dts-imx7d-sbc-imx7-add-support-for-m4.patch create mode 100644 recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0034-MLK-11395-9-video-mipi_dsi_samsung-add-MIPI-host-sid.patch create mode 100644 recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0035-video-mipi-panel-ti-sn65dsi83-add-MIPI-LVDS-bridge-d.patch create mode 100644 recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0036-ARM-imx7d-cl-som-imx7-dts-add-LVDS-support.patch create mode 100644 recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0037-ARM-configs-add-defconfig-for-compulab-imx7-based-de.patch create mode 100644 recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/compulab_imx7_defconfig create mode 100644 recipes-kernel/linux/linux-compulab-4.14.98/linux-compulab_cl-som-imx7.inc create mode 100644 recipes-kernel/linux/linux-compulab_4.14.98.bb create mode 100644 recipes-xfce/images/compulab-image-xfce.bb create mode 100644 tools/setup-compulab-env create mode 100644 tools/setup-env create mode 100644 tools/setup-user-env diff --git a/README.adoc b/README.adoc new file mode 100644 index 0000000..0d442a3 --- /dev/null +++ b/README.adoc @@ -0,0 +1,46 @@ +# Quick Start Guide + +## Supported CompuLab Machines + +* `cl-som-imx7` + +# Prepare NXP BSP +[source,console] +repo init -u git://source.codeaurora.org/external/imx/imx-manifest.git -b imx-linux-sumo -m imx-4.14.98-2.0.0_ga.xml +repo sync + +# Download CompuLab meta layer +[source,console] +git clone -b master https://github.com/compulab-yokneam/meta-bsp-imx7.git sources/meta-bsp-imx7/ + +# Set a desire machine +* `cl-som-imx7` +[source,console] +COMPULAB_MACHINE=cl-som-imx7 + +# Build Images +Refer to the http://source.codeaurora.org/external/imx/meta-fsl-bsp-release/tree/imx/README?h=sumo-4.14.98-2.0.0_ga[`NXP Readme`] for details about how to select a correct `backend` & `distro`. + +## imx7 +This example shows how to build NXP supported images for the `${COMPULAB_MACHINE}` + +* Weston GUI Image +[source,console] +MACHINE=${COMPULAB_MACHINE} DISTRO=fsl-imx-xwayland source sources/meta-bsp-imx7/tools/setup-env -b build-xwayland-imx7 +bitbake -k fsl-image-qt5-validation-imx + +* XFCE GUI Image +[source,console] +MACHINE=${COMPULAB_MACHINE} DISTRO=fsl-imx-x11 source sources/meta-bsp-imx7/tools/setup-env -b build-x11-imx7 +bitbake -k compulab-image-xfce + +## Device Trees and available features +### sbc-imx7 +* imx7d-sbc-imx7.dtb -- U-Boot default +* imx7d-sbc-imx7-lvds.dtb -- LVDS on +* imx7d-sbc-imx7-m4.dtb -- M4 tests ready + +### sbc-iot-imx7 +* imx7d-sbc-iot-imx7.dtb +* imx7d-sbc-iot-imx7-can.dtb -- CAN on +* imx7d-sbc-iot-imx7-rs485-hdx.dtb - rs485 on diff --git a/conf/layer.conf b/conf/layer.conf new file mode 100644 index 0000000..13295a9 --- /dev/null +++ b/conf/layer.conf @@ -0,0 +1,15 @@ +# We have a conf and classes directory, append to BBPATH +BBPATH .= ":${LAYERDIR}" + +# We have a recipes directory containing .bb and .bbappend files, add to BBFILES +BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ + ${LAYERDIR}/recipes-*/*/*.bbappend" + +BBFILE_COLLECTIONS += "compulab-bsp-imx7" +BBFILE_PATTERN_compulab-bsp-imx7 := "^${LAYERDIR}/" +BBFILE_PRIORITY_compulab-bsp-imx7 = "9" + +BBMASK += "meta-compulab/recipes-xfce" +BBMASK += "meta-compulab/recipes-browser" + +LAYERSERIES_COMPAT_compulab-bsp-imx7 = "sumo" diff --git a/recipes-desktop/cl-deploy/cl-deploy.bbappend b/recipes-desktop/cl-deploy/cl-deploy.bbappend new file mode 100644 index 0000000..f3f4951 --- /dev/null +++ b/recipes-desktop/cl-deploy/cl-deploy.bbappend @@ -0,0 +1,3 @@ +PACKAGE_ARCH = "${MACHINE_ARCH}" +RDEPENDS_${PN}_remove = "u-boot-fw-utils" +COMPATIBLE_MACHINE = "cl-som-imx7" diff --git a/recipes-desktop/cl-uboot/cl-uboot.bbappend b/recipes-desktop/cl-uboot/cl-uboot.bbappend new file mode 100644 index 0000000..391e8d1 --- /dev/null +++ b/recipes-desktop/cl-uboot/cl-uboot.bbappend @@ -0,0 +1,2 @@ +PACKAGE_ARCH = "${MACHINE_ARCH}" +COMPATIBLE_MACHINE = "cl-som-imx7" diff --git a/recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0001-ARM-dts-imx7d-cl-som-imx7-fix-uart1-parent-clock.patch b/recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0001-ARM-dts-imx7d-cl-som-imx7-fix-uart1-parent-clock.patch new file mode 100644 index 0000000..afe9501 --- /dev/null +++ b/recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0001-ARM-dts-imx7d-cl-som-imx7-fix-uart1-parent-clock.patch @@ -0,0 +1,83 @@ +From ed4d051180211dc436c02a2161006be8a4d8e50f Mon Sep 17 00:00:00 2001 +From: Ilya Ledvich +Date: Sun, 12 Nov 2017 17:18:17 +0200 +Subject: [PATCH 01/37] ARM: dts: imx7d: cl-som-imx7: fix uart1 parent clock + +Signed-off-by: Ilya Ledvich +--- + arch/arm/boot/dts/imx7d-cl-som-imx7.dts | 34 ++++++++++++------------- + 1 file changed, 17 insertions(+), 17 deletions(-) + +diff --git a/arch/arm/boot/dts/imx7d-cl-som-imx7.dts b/arch/arm/boot/dts/imx7d-cl-som-imx7.dts +index 3cc1fb9ce441..dfd378ad5fc2 100644 +--- a/arch/arm/boot/dts/imx7d-cl-som-imx7.dts ++++ b/arch/arm/boot/dts/imx7d-cl-som-imx7.dts +@@ -188,7 +188,7 @@ + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_uart1>; + assigned-clocks = <&clks IMX7D_UART1_ROOT_SRC>; +- assigned-clock-parents = <&clks IMX7D_PLL_SYS_MAIN_240M_CLK>; ++ assigned-clock-parents = <&clks IMX7D_OSC_24M_CLK>; + status = "okay"; + }; + +@@ -249,31 +249,31 @@ + + pinctrl_i2c2: i2c2grp { + fsl,pins = < +- MX7D_PAD_I2C2_SDA__I2C2_SDA 0x4000007f +- MX7D_PAD_I2C2_SCL__I2C2_SCL 0x4000007f ++ MX7D_PAD_I2C2_SDA__I2C2_SDA 0x4000007f ++ MX7D_PAD_I2C2_SCL__I2C2_SCL 0x4000007f + >; + }; + + pinctrl_uart1: uart1grp { + fsl,pins = < +- MX7D_PAD_UART1_TX_DATA__UART1_DCE_TX 0x79 +- MX7D_PAD_UART1_RX_DATA__UART1_DCE_RX 0x79 ++ MX7D_PAD_UART1_TX_DATA__UART1_DCE_TX 0x79 ++ MX7D_PAD_UART1_RX_DATA__UART1_DCE_RX 0x79 + >; + }; + + pinctrl_usdhc3: usdhc3grp { + fsl,pins = < +- MX7D_PAD_SD3_CMD__SD3_CMD 0x59 +- MX7D_PAD_SD3_CLK__SD3_CLK 0x19 +- MX7D_PAD_SD3_DATA0__SD3_DATA0 0x59 +- MX7D_PAD_SD3_DATA1__SD3_DATA1 0x59 +- MX7D_PAD_SD3_DATA2__SD3_DATA2 0x59 +- MX7D_PAD_SD3_DATA3__SD3_DATA3 0x59 +- MX7D_PAD_SD3_DATA4__SD3_DATA4 0x59 +- MX7D_PAD_SD3_DATA5__SD3_DATA5 0x59 +- MX7D_PAD_SD3_DATA6__SD3_DATA6 0x59 +- MX7D_PAD_SD3_DATA7__SD3_DATA7 0x59 +- MX7D_PAD_SD3_STROBE__SD3_STROBE 0x19 ++ MX7D_PAD_SD3_CMD__SD3_CMD 0x59 ++ MX7D_PAD_SD3_CLK__SD3_CLK 0x19 ++ MX7D_PAD_SD3_DATA0__SD3_DATA0 0x59 ++ MX7D_PAD_SD3_DATA1__SD3_DATA1 0x59 ++ MX7D_PAD_SD3_DATA2__SD3_DATA2 0x59 ++ MX7D_PAD_SD3_DATA3__SD3_DATA3 0x59 ++ MX7D_PAD_SD3_DATA4__SD3_DATA4 0x59 ++ MX7D_PAD_SD3_DATA5__SD3_DATA5 0x59 ++ MX7D_PAD_SD3_DATA6__SD3_DATA6 0x59 ++ MX7D_PAD_SD3_DATA7__SD3_DATA7 0x59 ++ MX7D_PAD_SD3_STROBE__SD3_STROBE 0x19 + >; + }; + }; +@@ -281,7 +281,7 @@ + &iomuxc_lpsr { + pinctrl_usbotg1: usbotg1grp { + fsl,pins = < +- MX7D_PAD_LPSR_GPIO1_IO05__GPIO1_IO5 0x14 /* OTG PWREN */ ++ MX7D_PAD_LPSR_GPIO1_IO05__GPIO1_IO5 0x14 /* OTG PWREN */ + >; + }; + }; +\ No newline at end of file +-- +2.20.1 + diff --git a/recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0002-ARM-dts-imx7d-cl-som-imx7-fix-i2c2-configuration.patch b/recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0002-ARM-dts-imx7d-cl-som-imx7-fix-i2c2-configuration.patch new file mode 100644 index 0000000..c217795 --- /dev/null +++ b/recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0002-ARM-dts-imx7d-cl-som-imx7-fix-i2c2-configuration.patch @@ -0,0 +1,49 @@ +From 4dbe4c3badac43f11632d5ac1436724630f584bf Mon Sep 17 00:00:00 2001 +From: Ilya Ledvich +Date: Wed, 10 Jul 2019 09:12:33 +0300 +Subject: [PATCH 02/37] ARM: dts: imx7d: cl-som-imx7: fix i2c2 configuration + +Fix I2C2 pinmux configuration: change pins and move to the +iomuxc_lpsr node. + +Signed-off-by: Ilya Ledvich +--- + arch/arm/boot/dts/imx7d-cl-som-imx7.dts | 15 ++++++++------- + 1 file changed, 8 insertions(+), 7 deletions(-) + +diff --git a/arch/arm/boot/dts/imx7d-cl-som-imx7.dts b/arch/arm/boot/dts/imx7d-cl-som-imx7.dts +index dfd378ad5fc2..8a2c2b6d54f3 100644 +--- a/arch/arm/boot/dts/imx7d-cl-som-imx7.dts ++++ b/arch/arm/boot/dts/imx7d-cl-som-imx7.dts +@@ -247,13 +247,6 @@ + >; + }; + +- pinctrl_i2c2: i2c2grp { +- fsl,pins = < +- MX7D_PAD_I2C2_SDA__I2C2_SDA 0x4000007f +- MX7D_PAD_I2C2_SCL__I2C2_SCL 0x4000007f +- >; +- }; +- + pinctrl_uart1: uart1grp { + fsl,pins = < + MX7D_PAD_UART1_TX_DATA__UART1_DCE_TX 0x79 +@@ -279,6 +272,14 @@ + }; + + &iomuxc_lpsr { ++ pinctrl_i2c2: i2c2grp { ++ fsl,pins = < ++ MX7D_PAD_LPSR_GPIO1_IO07__I2C2_SDA 0x4000007f ++ MX7D_PAD_LPSR_GPIO1_IO06__I2C2_SCL 0x4000007f ++ >; ++ }; ++ ++ + pinctrl_usbotg1: usbotg1grp { + fsl,pins = < + MX7D_PAD_LPSR_GPIO1_IO05__GPIO1_IO5 0x14 /* OTG PWREN */ +-- +2.20.1 + diff --git a/recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0003-ARM-dts-imx7d-cl-som-imx7-add-fec-phy-reset.patch b/recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0003-ARM-dts-imx7d-cl-som-imx7-add-fec-phy-reset.patch new file mode 100644 index 0000000..fdccfee --- /dev/null +++ b/recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0003-ARM-dts-imx7d-cl-som-imx7-add-fec-phy-reset.patch @@ -0,0 +1,70 @@ +From 5b8b52ded35612e84a2b4c3f5e5be7dbfb771fe8 Mon Sep 17 00:00:00 2001 +From: Ilya Ledvich +Date: Thu, 11 Jul 2019 09:16:01 +0300 +Subject: [PATCH 03/37] ARM: dts: imx7d: cl-som-imx7: add fec phy reset + +Signed-off-by: Ilya Ledvich +--- + arch/arm/boot/dts/imx7d-cl-som-imx7.dts | 22 ++++++++++++++++++++-- + 1 file changed, 20 insertions(+), 2 deletions(-) + +diff --git a/arch/arm/boot/dts/imx7d-cl-som-imx7.dts b/arch/arm/boot/dts/imx7d-cl-som-imx7.dts +index 8a2c2b6d54f3..f482f5792ab5 100644 +--- a/arch/arm/boot/dts/imx7d-cl-som-imx7.dts ++++ b/arch/arm/boot/dts/imx7d-cl-som-imx7.dts +@@ -46,6 +46,7 @@ + phy-mode = "rgmii"; + phy-handle = <ðphy0>; + fsl,magic-packet; ++ phy-reset-gpios = <&pca9555 4 GPIO_ACTIVE_LOW>; /* FEC2 Phy nReset */ + status = "okay"; + + mdio { +@@ -75,6 +76,15 @@ + status = "okay"; + }; + ++&gpio1 { ++ gpio_phy1_nreset { ++ gpio-hog; ++ gpios = <4 GPIO_ACTIVE_HIGH>; ++ output-high; ++ line-name = "fec1_phy_nreset"; ++ }; ++}; ++ + &i2c2 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_i2c2>; +@@ -272,6 +282,15 @@ + }; + + &iomuxc_lpsr { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_hog_lpsr>; ++ ++ pinctrl_hog_lpsr: hoggrp_lpsr { ++ fsl,pins = < ++ MX7D_PAD_LPSR_GPIO1_IO04__GPIO1_IO4 0x34 /* FEC1 Phy nReset */ ++ >; ++ }; ++ + pinctrl_i2c2: i2c2grp { + fsl,pins = < + MX7D_PAD_LPSR_GPIO1_IO07__I2C2_SDA 0x4000007f +@@ -279,10 +298,9 @@ + >; + }; + +- + pinctrl_usbotg1: usbotg1grp { + fsl,pins = < + MX7D_PAD_LPSR_GPIO1_IO05__GPIO1_IO5 0x14 /* OTG PWREN */ + >; + }; +-}; +\ No newline at end of file ++}; +-- +2.20.1 + diff --git a/recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0004-ARM-dts-imx7d-cl-som-imx7-add-RTC-support.patch b/recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0004-ARM-dts-imx7d-cl-som-imx7-add-RTC-support.patch new file mode 100644 index 0000000..4d15ed8 --- /dev/null +++ b/recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0004-ARM-dts-imx7d-cl-som-imx7-add-RTC-support.patch @@ -0,0 +1,31 @@ +From b296c917b7881680253f6050da3214669f75f945 Mon Sep 17 00:00:00 2001 +From: Ilya Ledvich +Date: Mon, 13 Nov 2017 12:49:04 +0200 +Subject: [PATCH 04/37] ARM: dts: imx7d: cl-som-imx7: add RTC support + +Add support for EM3027 Real Time Clock over I2C2 bus. + +Signed-off-by: Ilya Ledvich +--- + arch/arm/boot/dts/imx7d-cl-som-imx7.dts | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/arch/arm/boot/dts/imx7d-cl-som-imx7.dts b/arch/arm/boot/dts/imx7d-cl-som-imx7.dts +index f482f5792ab5..8ea3c09e4f09 100644 +--- a/arch/arm/boot/dts/imx7d-cl-som-imx7.dts ++++ b/arch/arm/boot/dts/imx7d-cl-som-imx7.dts +@@ -192,6 +192,11 @@ + reg = <0x50>; + pagesize = <16>; + }; ++ ++ rtc@56 { ++ compatible = "emmicro,em3027"; ++ reg = <0x56>; ++ }; + }; + + &uart1 { +-- +2.20.1 + diff --git a/recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0005-ARM-dts-imx7d-cl-som-imx7-add-support-for-gpio-led.patch b/recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0005-ARM-dts-imx7d-cl-som-imx7-add-support-for-gpio-led.patch new file mode 100644 index 0000000..6790207 --- /dev/null +++ b/recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0005-ARM-dts-imx7d-cl-som-imx7-add-support-for-gpio-led.patch @@ -0,0 +1,52 @@ +From 2ab1b5b8babb34e85d29b0d31759d983705da4b8 Mon Sep 17 00:00:00 2001 +From: Ilya Ledvich +Date: Thu, 14 Jan 2016 13:35:58 +0200 +Subject: [PATCH 05/37] ARM: dts: imx7d: cl-som-imx7: add support for gpio led + +Add support for onboard LED driven by GPIO6_14 in heartbeat mode. + +Signed-off-by: Ilya Ledvich +--- + arch/arm/boot/dts/imx7d-cl-som-imx7.dts | 19 +++++++++++++++++++ + 1 file changed, 19 insertions(+) + +diff --git a/arch/arm/boot/dts/imx7d-cl-som-imx7.dts b/arch/arm/boot/dts/imx7d-cl-som-imx7.dts +index 8ea3c09e4f09..abd9efa6bb4c 100644 +--- a/arch/arm/boot/dts/imx7d-cl-som-imx7.dts ++++ b/arch/arm/boot/dts/imx7d-cl-som-imx7.dts +@@ -30,6 +30,16 @@ + gpio = <&gpio1 5 GPIO_ACTIVE_HIGH>; + enable-active-high; + }; ++ ++ leds { ++ compatible = "gpio-leds"; ++ ++ onboard-led { ++ label = "Heartbeat"; ++ gpios = <&gpio6 14 GPIO_ACTIVE_HIGH>; ++ linux,default-trigger = "heartbeat"; ++ }; ++ }; + }; + + &cpu0 { +@@ -226,6 +236,15 @@ + }; + + &iomuxc { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_hog>; ++ ++ pinctrl_hog: hoggrp { ++ fsl,pins = < ++ MX7D_PAD_SAI1_TX_SYNC__GPIO6_IO14 0x34 /* Onboard LED */ ++ >; ++ }; ++ + pinctrl_enet1: enet1grp { + fsl,pins = < + MX7D_PAD_SD2_CD_B__ENET1_MDIO 0x30 +-- +2.20.1 + diff --git a/recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0006-ARM-dts-imx7d-cl-som-imx7-add-support-for-touchscree.patch b/recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0006-ARM-dts-imx7d-cl-som-imx7-add-support-for-touchscree.patch new file mode 100644 index 0000000..e98d114 --- /dev/null +++ b/recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0006-ARM-dts-imx7d-cl-som-imx7-add-support-for-touchscree.patch @@ -0,0 +1,115 @@ +From efb99a75f70d0accffbddde40e0719eb326314cd Mon Sep 17 00:00:00 2001 +From: Ilya Ledvich +Date: Tue, 9 Feb 2016 09:54:37 +0200 +Subject: [PATCH 06/37] ARM: dts: imx7d: cl-som-imx7: add support for + touchscreen + +Add support for ADS7846 touchscreen controller over SPI1 bus. + +Signed-off-by: Ilya Ledvich +--- + arch/arm/boot/dts/imx7d-cl-som-imx7.dts | 67 +++++++++++++++++++++++++ + 1 file changed, 67 insertions(+) + +diff --git a/arch/arm/boot/dts/imx7d-cl-som-imx7.dts b/arch/arm/boot/dts/imx7d-cl-som-imx7.dts +index abd9efa6bb4c..1fe2d6077bfa 100644 +--- a/arch/arm/boot/dts/imx7d-cl-som-imx7.dts ++++ b/arch/arm/boot/dts/imx7d-cl-som-imx7.dts +@@ -31,6 +31,14 @@ + enable-active-high; + }; + ++ tsc2046reg: regulator-tsc { ++ compatible = "regulator-fixed"; ++ regulator-name = "tsc2046-reg"; ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ regulator-always-on; ++ }; ++ + leds { + compatible = "gpio-leds"; + +@@ -46,6 +54,44 @@ + arm-supply = <&sw1a_reg>; + }; + ++&ecspi1 { ++ fsl,spi-num-chipselects = <1>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_ecspi1 &pinctrl_ecspi1_cs>; ++ cs-gpios = <&gpio4 2 0>; ++ status = "okay"; ++ ++ /* touch controller */ ++ touch: tsc2046@0 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_tsc2046>; ++ ++ compatible = "ti,tsc2046"; ++ vcc-supply = <&tsc2046reg>; ++ ++ reg = <0>; ++ spi-max-frequency = <1500000>; ++ ++ interrupt-parent = <&gpio1>; ++ interrupts = <14 0>; ++ pendown-gpio = <&gpio1 14 0>; ++ ++ ti,x-min = /bits/ 16 <0x0>; ++ ti,x-max = /bits/ 16 <0x0fff>; ++ ti,y-min = /bits/ 16 <0x0>; ++ ti,y-max = /bits/ 16 <0x0fff>; ++ ++ ti,x-plate-ohms = /bits/ 16 <180>; ++ ti,pressure-max = /bits/ 16 <255>; ++ ++ ti,debounce-max = /bits/ 16 <30>; ++ ti,debounce-tol = /bits/ 16 <10>; ++ ti,debounce-rep = /bits/ 16 <1>; ++ ++ linux,wakeup; ++ }; ++}; ++ + &fec1 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_enet1>; +@@ -245,6 +291,21 @@ + >; + }; + ++ pinctrl_ecspi1: ecspi1grp { ++ fsl,pins = < ++ MX7D_PAD_ECSPI1_MOSI__ECSPI1_MOSI 0xf ++ MX7D_PAD_ECSPI1_MISO__ECSPI1_MISO 0xf ++ MX7D_PAD_ECSPI1_SCLK__ECSPI1_SCLK 0xf ++ >; ++ }; ++ ++ pinctrl_ecspi1_cs: ecspi1_cs_grp { ++ fsl,pins = < ++ /* Touchscreen chipselect */ ++ MX7D_PAD_UART2_RX_DATA__GPIO4_IO2 0x34 ++ >; ++ }; ++ + pinctrl_enet1: enet1grp { + fsl,pins = < + MX7D_PAD_SD2_CD_B__ENET1_MDIO 0x30 +@@ -281,6 +342,12 @@ + >; + }; + ++ pinctrl_tsc2046: tsc2046grp { ++ fsl,pins = < ++ MX7D_PAD_GPIO1_IO14__GPIO1_IO14 0x34 /* PENDOWN */ ++ >; ++ }; ++ + pinctrl_uart1: uart1grp { + fsl,pins = < + MX7D_PAD_UART1_TX_DATA__UART1_DCE_TX 0x79 +-- +2.20.1 + diff --git a/recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0007-ARM-dts-imx7d-cl-som-imx7-add-support-for-SPI-flash.patch b/recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0007-ARM-dts-imx7d-cl-som-imx7-add-support-for-SPI-flash.patch new file mode 100644 index 0000000..cf9a003 --- /dev/null +++ b/recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0007-ARM-dts-imx7d-cl-som-imx7-add-support-for-SPI-flash.patch @@ -0,0 +1,71 @@ +From 14c806d2bb9d10f929dd0561157d18039f93c4a9 Mon Sep 17 00:00:00 2001 +From: Ilya Ledvich +Date: Tue, 9 Feb 2016 10:11:09 +0200 +Subject: [PATCH 07/37] ARM: dts: imx7d: cl-som-imx7: add support for SPI flash + +Add support for SPI flash over SPI1 bus. + +Signed-off-by: Ilya Ledvich +--- + arch/arm/boot/dts/imx7d-cl-som-imx7.dts | 29 +++++++++++++++++++++++-- + 1 file changed, 27 insertions(+), 2 deletions(-) + +diff --git a/arch/arm/boot/dts/imx7d-cl-som-imx7.dts b/arch/arm/boot/dts/imx7d-cl-som-imx7.dts +index 1fe2d6077bfa..1d11429e8753 100644 +--- a/arch/arm/boot/dts/imx7d-cl-som-imx7.dts ++++ b/arch/arm/boot/dts/imx7d-cl-som-imx7.dts +@@ -55,10 +55,10 @@ + }; + + &ecspi1 { +- fsl,spi-num-chipselects = <1>; ++ fsl,spi-num-chipselects = <2>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_ecspi1 &pinctrl_ecspi1_cs>; +- cs-gpios = <&gpio4 2 0>; ++ cs-gpios = <&gpio4 2 0>, <&gpio4 19 0>; + status = "okay"; + + /* touch controller */ +@@ -90,6 +90,29 @@ + + linux,wakeup; + }; ++ ++ m25px16@0 { ++ #address-cells = <1>; ++ #size-cells = <1>; ++ compatible = "m25p16-nonjedec"; ++ spi-max-frequency = <20000000>; ++ reg = <1>; ++ ++ partition@0 { ++ label = "uboot"; ++ reg = <0x0 0xc0000>; ++ }; ++ ++ partition@c0000 { ++ label = "uboot environment"; ++ reg = <0xc0000 0x40000>; ++ }; ++ ++ partition@100000 { ++ label = "splash"; ++ reg = <0x100000 0x100000>; ++ }; ++ }; + }; + + &fec1 { +@@ -303,6 +326,8 @@ + fsl,pins = < + /* Touchscreen chipselect */ + MX7D_PAD_UART2_RX_DATA__GPIO4_IO2 0x34 ++ /* SPI flash chipselect */ ++ MX7D_PAD_ECSPI1_SS0__GPIO4_IO19 0x34 + >; + }; + +-- +2.20.1 + diff --git a/recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0008-ARM-dts-imx7d-cl-som-imx7-add-support-for-USB-host.patch b/recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0008-ARM-dts-imx7d-cl-som-imx7-add-support-for-USB-host.patch new file mode 100644 index 0000000..b89c2f5 --- /dev/null +++ b/recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0008-ARM-dts-imx7d-cl-som-imx7-add-support-for-USB-host.patch @@ -0,0 +1,31 @@ +From ea1ea562a39cd33f489d31bc7d87ac4482111ce3 Mon Sep 17 00:00:00 2001 +From: Ilya Ledvich +Date: Wed, 10 Feb 2016 10:34:11 +0200 +Subject: [PATCH 08/37] ARM: dts: imx7d: cl-som-imx7: add support for USB host + +Enable USB OTG2 port in host mode. + +Signed-off-by: Ilya Ledvich +--- + arch/arm/boot/dts/imx7d-cl-som-imx7.dts | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/arch/arm/boot/dts/imx7d-cl-som-imx7.dts b/arch/arm/boot/dts/imx7d-cl-som-imx7.dts +index 1d11429e8753..0b6c69ea97e9 100644 +--- a/arch/arm/boot/dts/imx7d-cl-som-imx7.dts ++++ b/arch/arm/boot/dts/imx7d-cl-som-imx7.dts +@@ -293,6 +293,11 @@ + status = "okay"; + }; + ++&usbotg2 { ++ dr_mode = "host"; ++ status = "okay"; ++}; ++ + &usdhc3 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_usdhc3>; +-- +2.20.1 + diff --git a/recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0009-ARM-dts-imx7d-cl-som-imx7-add-support-for-USB-hub.patch b/recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0009-ARM-dts-imx7d-cl-som-imx7-add-support-for-USB-hub.patch new file mode 100644 index 0000000..b44fb1f --- /dev/null +++ b/recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0009-ARM-dts-imx7d-cl-som-imx7-add-support-for-USB-hub.patch @@ -0,0 +1,61 @@ +From 6d1f6aa03687302b248c85a456f5fffd9b6ae054 Mon Sep 17 00:00:00 2001 +From: Ilya Ledvich +Date: Tue, 24 May 2016 16:53:34 +0300 +Subject: [PATCH 09/37] ARM: dts: imx7d: cl-som-imx7: add support for USB hub + +Add support for onboard USB hub over USB HSIC controller. + +Signed-off-by: Ilya Ledvich +--- + arch/arm/boot/dts/imx7d-cl-som-imx7.dts | 14 ++++++++++++++ + 1 file changed, 14 insertions(+) + +diff --git a/arch/arm/boot/dts/imx7d-cl-som-imx7.dts b/arch/arm/boot/dts/imx7d-cl-som-imx7.dts +index 0b6c69ea97e9..b45f691e3fa7 100644 +--- a/arch/arm/boot/dts/imx7d-cl-som-imx7.dts ++++ b/arch/arm/boot/dts/imx7d-cl-som-imx7.dts +@@ -22,6 +22,7 @@ + reg = <0x80000000 0x10000000>; /* 256 MB - minimal configuration */ + }; + ++ /* Regulators */ + reg_usb_otg1_vbus: regulator-vbus { + compatible = "regulator-fixed"; + regulator-name = "usb_otg1_vbus"; +@@ -38,6 +39,7 @@ + regulator-max-microvolt = <3300000>; + regulator-always-on; + }; ++ /* Regulators - end */ + + leds { + compatible = "gpio-leds"; +@@ -264,6 +266,14 @@ + gpio-controller; + #gpio-cells = <2>; + reg = <0x20>; ++ ++ /* USB Hub nRST */ ++ usb_hub_nreset { ++ gpio-hog; ++ gpios = <6 GPIO_ACTIVE_HIGH>; ++ output-high; ++ line-name = "usb_hub_nreset"; ++ }; + }; + + eeprom@50 { +@@ -298,6 +308,10 @@ + status = "okay"; + }; + ++&usbh { ++ status = "okay"; ++}; ++ + &usdhc3 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_usdhc3>; +-- +2.20.1 + diff --git a/recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0010-ARM-dts-imx7d-cl-som-imx7-add-support-for-watchdog.patch b/recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0010-ARM-dts-imx7d-cl-som-imx7-add-support-for-watchdog.patch new file mode 100644 index 0000000..3e0726b --- /dev/null +++ b/recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0010-ARM-dts-imx7d-cl-som-imx7-add-support-for-watchdog.patch @@ -0,0 +1,42 @@ +From 32cb6f2f9ca233c1a211cf72cf563d110140f892 Mon Sep 17 00:00:00 2001 +From: Ilya Ledvich +Date: Sun, 5 Mar 2017 15:21:53 +0200 +Subject: [PATCH 10/37] ARM: dts: imx7d: cl-som-imx7: add support for watchdog + +Add support for watchdog WDOG1 for board reset. + +Signed-off-by: Ilya Ledvich +--- + arch/arm/boot/dts/imx7d-cl-som-imx7.dts | 11 +++++++++++ + 1 file changed, 11 insertions(+) + +diff --git a/arch/arm/boot/dts/imx7d-cl-som-imx7.dts b/arch/arm/boot/dts/imx7d-cl-som-imx7.dts +index b45f691e3fa7..6236f2e62ffd 100644 +--- a/arch/arm/boot/dts/imx7d-cl-som-imx7.dts ++++ b/arch/arm/boot/dts/imx7d-cl-som-imx7.dts +@@ -323,6 +323,12 @@ + status = "okay"; + }; + ++&wdog1 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_wdog>; ++ fsl,ext-reset-output; ++}; ++ + &iomuxc { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_hog>; +@@ -438,4 +444,9 @@ + MX7D_PAD_LPSR_GPIO1_IO05__GPIO1_IO5 0x14 /* OTG PWREN */ + >; + }; ++ pinctrl_wdog: wdoggrp { ++ fsl,pins = < ++ MX7D_PAD_LPSR_GPIO1_IO00__WDOG1_WDOG_B 0x74 ++ >; ++ }; + }; +-- +2.20.1 + diff --git a/recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0011-ARM-dts-imx7d-cl-som-imx7-add-support-for-NAND-flash.patch b/recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0011-ARM-dts-imx7d-cl-som-imx7-add-support-for-NAND-flash.patch new file mode 100644 index 0000000..c42b856 --- /dev/null +++ b/recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0011-ARM-dts-imx7d-cl-som-imx7-add-support-for-NAND-flash.patch @@ -0,0 +1,92 @@ +From a5915b45bb5d4899ede1b6d512f2836738e77e77 Mon Sep 17 00:00:00 2001 +From: Ilya Ledvich +Date: Thu, 11 Feb 2016 13:02:36 +0200 +Subject: [PATCH 11/37] ARM: dts: imx7d: cl-som-imx7: add support for NAND + flash + +Add support for NAND flash on GPMI interface. +The NAND option is mutually exlusive with eMMC option, +connected to USBHC3 (SD3) interface. This because GPMI +and USDHC3 share same pins. +The GPMI interface is disabled by default. +It supposed to be enabled via fdt command line utility +in the u-boot. + +Signed-off-by: Ilya Ledvich +--- + arch/arm/boot/dts/imx7d-cl-som-imx7.dts | 45 +++++++++++++++++++++++++ + 1 file changed, 45 insertions(+) + +diff --git a/arch/arm/boot/dts/imx7d-cl-som-imx7.dts b/arch/arm/boot/dts/imx7d-cl-som-imx7.dts +index 6236f2e62ffd..d0f5e3d74b68 100644 +--- a/arch/arm/boot/dts/imx7d-cl-som-imx7.dts ++++ b/arch/arm/boot/dts/imx7d-cl-som-imx7.dts +@@ -18,6 +18,10 @@ + model = "CompuLab CL-SOM-iMX7"; + compatible = "compulab,cl-som-imx7", "fsl,imx7d"; + ++ aliases { ++ gpmi = &gpmi; ++ }; ++ + memory { + reg = <0x80000000 0x10000000>; /* 256 MB - minimal configuration */ + }; +@@ -166,6 +170,27 @@ + }; + }; + ++&gpmi { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_gpmi_nand>; ++ status = "disabled"; ++ nand-on-flash-bbt; ++ ++ /* MTD partition table */ ++ partition@0 { ++ label = "kernel"; ++ reg = <0x00000000 0x00980000>; ++ }; ++ partition@980000 { ++ label = "dtb"; ++ reg = <0x00980000 0x00080000>; ++ }; ++ partition@a00000 { ++ label = "rootfs"; ++ reg = <0x00a00000 0x0>; ++ }; ++}; ++ + &i2c2 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_i2c2>; +@@ -392,6 +417,26 @@ + >; + }; + ++ pinctrl_gpmi_nand: gpmi-nand { ++ fsl,pins = < ++ MX7D_PAD_SD3_CLK__NAND_CLE 0x71 ++ MX7D_PAD_SD3_CMD__NAND_ALE 0x71 ++ MX7D_PAD_SD3_DATA0__NAND_DATA00 0x71 ++ MX7D_PAD_SD3_DATA1__NAND_DATA01 0x71 ++ MX7D_PAD_SD3_DATA2__NAND_DATA02 0x71 ++ MX7D_PAD_SD3_DATA3__NAND_DATA03 0x71 ++ MX7D_PAD_SD3_DATA4__NAND_DATA04 0x71 ++ MX7D_PAD_SD3_DATA5__NAND_DATA05 0x71 ++ MX7D_PAD_SD3_DATA6__NAND_DATA06 0x71 ++ MX7D_PAD_SD3_DATA7__NAND_DATA07 0x71 ++ MX7D_PAD_SD3_STROBE__NAND_RE_B 0x71 ++ MX7D_PAD_SD3_RESET_B__NAND_WE_B 0x71 ++ MX7D_PAD_SAI1_TX_BCLK__NAND_CE0_B 0x71 ++ MX7D_PAD_SAI1_TX_DATA__NAND_READY_B 0x74 ++ MX7D_PAD_SAI1_MCLK__NAND_WP_B 0x71 ++ >; ++ }; ++ + pinctrl_tsc2046: tsc2046grp { + fsl,pins = < + MX7D_PAD_GPIO1_IO14__GPIO1_IO14 0x34 /* PENDOWN */ +-- +2.20.1 + diff --git a/recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0012-ARM-dts-imx7d-cl-som-imx7-add-WiLink8-WLAN-support.patch b/recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0012-ARM-dts-imx7d-cl-som-imx7-add-WiLink8-WLAN-support.patch new file mode 100644 index 0000000..30058f8 --- /dev/null +++ b/recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0012-ARM-dts-imx7d-cl-som-imx7-add-WiLink8-WLAN-support.patch @@ -0,0 +1,107 @@ +From b5e49350e0cd6b9dd548489c7efc12d3d6e17300 Mon Sep 17 00:00:00 2001 +From: Ilya Ledvich +Date: Fri, 8 Apr 2016 09:16:19 +0300 +Subject: [PATCH 12/37] ARM: dts: imx7d: cl-som-imx7: add WiLink8 WLAN support + +Add support for TI's WiLink8 WLAN module on SD2 bus. + +Signed-off-by: Ilya Ledvich +--- + arch/arm/boot/dts/imx7d-cl-som-imx7.dts | 53 +++++++++++++++++++++++++ + 1 file changed, 53 insertions(+) + +diff --git a/arch/arm/boot/dts/imx7d-cl-som-imx7.dts b/arch/arm/boot/dts/imx7d-cl-som-imx7.dts +index d0f5e3d74b68..4d098b68f94e 100644 +--- a/arch/arm/boot/dts/imx7d-cl-som-imx7.dts ++++ b/arch/arm/boot/dts/imx7d-cl-som-imx7.dts +@@ -43,6 +43,17 @@ + regulator-max-microvolt = <3300000>; + regulator-always-on; + }; ++ ++ wlan_en_reg: regulator-wlan-en { ++ compatible = "regulator-fixed"; ++ regulator-name = "wlan-en-regulator"; ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ gpio = <&pca9555 0 GPIO_ACTIVE_HIGH>; ++ /* WLAN card specific delay */ ++ startup-delay-us = <70000>; ++ enable-active-high; ++ }; + /* Regulators - end */ + + leds { +@@ -299,6 +310,14 @@ + output-high; + line-name = "usb_hub_nreset"; + }; ++ ++ /* WLAN RF Power enable GPIO */ ++ rf_pwr_en_reg { ++ gpio-hog; ++ gpios = <9 GPIO_ACTIVE_HIGH>; ++ output-high; ++ line-name = "rf-pwr-enable"; ++ }; + }; + + eeprom@50 { +@@ -337,6 +356,28 @@ + status = "okay"; + }; + ++&usdhc2 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_usdhc2>; ++ cd-gpios = <>; ++ wp-gpios = <>; ++ no-1-8-v; ++ keep-power-in-suspend; ++ enable-sdio-wakeup; ++ vmmc-supply = <&wlan_en_reg>; ++ non-removable; ++ cap-power-off-card; ++ status = "okay"; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ wlcore: wlcore@0 { ++ compatible = "ti,wl1835"; ++ reg = <2>; ++ interrupt-parent = <&gpio1>; ++ interrupts = <15 IRQ_TYPE_LEVEL_HIGH>; ++ }; ++}; ++ + &usdhc3 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_usdhc3>; +@@ -360,6 +401,7 @@ + + pinctrl_hog: hoggrp { + fsl,pins = < ++ MX7D_PAD_GPIO1_IO15__GPIO1_IO15 0x34 /* WLAN IRQ */ + MX7D_PAD_SAI1_TX_SYNC__GPIO6_IO14 0x34 /* Onboard LED */ + >; + }; +@@ -450,6 +492,17 @@ + >; + }; + ++ pinctrl_usdhc2: usdhc2grp { ++ fsl,pins = < ++ MX7D_PAD_SD2_CMD__SD2_CMD 0x59 ++ MX7D_PAD_SD2_CLK__SD2_CLK 0x19 ++ MX7D_PAD_SD2_DATA0__SD2_DATA0 0x59 ++ MX7D_PAD_SD2_DATA1__SD2_DATA1 0x59 ++ MX7D_PAD_SD2_DATA2__SD2_DATA2 0x59 ++ MX7D_PAD_SD2_DATA3__SD2_DATA3 0x59 ++ >; ++ }; ++ + pinctrl_usdhc3: usdhc3grp { + fsl,pins = < + MX7D_PAD_SD3_CMD__SD3_CMD 0x59 +-- +2.20.1 + diff --git a/recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0013-regulator-userspace-consumer-add-MODULE_ALIAS-macro.patch b/recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0013-regulator-userspace-consumer-add-MODULE_ALIAS-macro.patch new file mode 100644 index 0000000..d2ddad2 --- /dev/null +++ b/recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0013-regulator-userspace-consumer-add-MODULE_ALIAS-macro.patch @@ -0,0 +1,26 @@ +From 35a7b66eb738526e0119466d3a2338a10e3336be Mon Sep 17 00:00:00 2001 +From: Uri Mashiach +Date: Mon, 19 Sep 2016 09:16:09 +0300 +Subject: [PATCH 13/37] regulator: userspace-consumer: add MODULE_ALIAS macro + +Enable userspace-consumer module initiation. +Without the macro the module can only be initiated by the +modprobe/insmod commands. + +Signed-off-by: Uri Mashiach +--- + drivers/regulator/userspace-consumer.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/drivers/regulator/userspace-consumer.c b/drivers/regulator/userspace-consumer.c +index 9d6c07976fa5..54949c508957 100644 +--- a/drivers/regulator/userspace-consumer.c ++++ b/drivers/regulator/userspace-consumer.c +@@ -237,3 +237,4 @@ module_platform_driver(regulator_userspace_consumer_driver); + MODULE_AUTHOR("Mike Rapoport "); + MODULE_DESCRIPTION("Userspace consumer for voltage and current regulators"); + MODULE_LICENSE("GPL"); ++MODULE_ALIAS("platform:reg-userspace-consumer"); +-- +2.20.1 + diff --git a/recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0014-regulator-add-userspace-consumer-wrapper-driver.patch b/recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0014-regulator-add-userspace-consumer-wrapper-driver.patch new file mode 100644 index 0000000..346e3c6 --- /dev/null +++ b/recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0014-regulator-add-userspace-consumer-wrapper-driver.patch @@ -0,0 +1,154 @@ +From 2b2c13cb0f8d5332cfdc0429af6dc869bd146f12 Mon Sep 17 00:00:00 2001 +From: Uri Mashiach +Date: Tue, 7 Aug 2018 09:18:10 +0300 +Subject: [PATCH 14/37] regulator: add userspace-consumer-wrapper driver + +Add the ability to control the userspace-consumer driver from device +tree. + +Signed-off-by: Uri Mashiach +--- + drivers/regulator/Kconfig | 9 ++ + drivers/regulator/Makefile | 1 + + .../regulator/userspace-consumer-wrapper.c | 97 +++++++++++++++++++ + 3 files changed, 107 insertions(+) + create mode 100644 drivers/regulator/userspace-consumer-wrapper.c + +diff --git a/drivers/regulator/Kconfig b/drivers/regulator/Kconfig +index 5361947ea726..610a99a87287 100644 +--- a/drivers/regulator/Kconfig ++++ b/drivers/regulator/Kconfig +@@ -54,6 +54,15 @@ config REGULATOR_USERSPACE_CONSUMER + + If unsure, say no. + ++config REGULATOR_USERSPACE_CONSUMER_WRAPPER ++ tristate "Userspace consumer device tree wrapper" ++ depends on REGULATOR_USERSPACE_CONSUMER ++ help ++ Add the ability to control the userspace consumer driver from device ++ tree. ++ ++ If unsure, say no. ++ + config REGULATOR_88PM800 + tristate "Marvell 88PM800 Power regulators" + depends on MFD_88PM800 +diff --git a/drivers/regulator/Makefile b/drivers/regulator/Makefile +index 1bddbefbc8e7..1aaab64e6a8f 100644 +--- a/drivers/regulator/Makefile ++++ b/drivers/regulator/Makefile +@@ -9,6 +9,7 @@ obj-$(CONFIG_OF) += of_regulator.o + obj-$(CONFIG_REGULATOR_FIXED_VOLTAGE) += fixed.o + obj-$(CONFIG_REGULATOR_VIRTUAL_CONSUMER) += virtual.o + obj-$(CONFIG_REGULATOR_USERSPACE_CONSUMER) += userspace-consumer.o ++obj-$(CONFIG_REGULATOR_USERSPACE_CONSUMER_WRAPPER) += userspace-consumer-wrapper.o + + obj-$(CONFIG_REGULATOR_88PM800) += 88pm800.o + obj-$(CONFIG_REGULATOR_88PM8607) += 88pm8607.o +diff --git a/drivers/regulator/userspace-consumer-wrapper.c b/drivers/regulator/userspace-consumer-wrapper.c +new file mode 100644 +index 000000000000..2b4730a89480 +--- /dev/null ++++ b/drivers/regulator/userspace-consumer-wrapper.c +@@ -0,0 +1,97 @@ ++/* ++ * userspace-consumer-wrapper.c -- Userspace Consumer Device Tree Wrapper ++ * ++ * Copyright 2016 CompuLab, Ltd. ++ * ++ * Author: Uri Mashiach ++ * ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License as published by the ++ * Free Software Foundation; either version 2 of the License, or (at your ++ * option) any later version. ++ * ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++ ++static struct regulator_bulk_data reg_consumer_supply = { ++ .supply = NULL ++}; ++ ++static struct regulator_userspace_consumer_data reg_consumer_data = { ++ .name = NULL, ++ .num_supplies = 1, ++ .supplies = ®_consumer_supply, ++ .init_on = 0, ++}; ++ ++static struct platform_device_info pdevinfo = { ++ .name = "reg-userspace-consumer", ++ .id = 0, ++ .data = ®_consumer_data, ++ .size_data = sizeof(reg_consumer_data), ++}; ++ ++static int usc_wrapper_probe(struct platform_device *pdev) ++{ ++ struct platform_device *reg_pdev; ++ struct device *dev = &pdev->dev; ++ struct device_node *np = dev->of_node; ++ int ret; ++ ++ reg_consumer_data.name = of_get_property(np, "regulator-name", NULL); ++ if (reg_consumer_data.name == NULL) { ++ dev_err(dev, "Failed reading regulator-name\n"); ++ return -ENOENT; ++ } ++ reg_consumer_supply.supply = reg_consumer_data.name; ++ ret = of_property_read_s32(np, "us-folder-num", &pdevinfo.id); ++ if (ret) { ++ dev_err(dev, "Failed reading us-folder-num\n"); ++ return -ENOENT; ++ } ++ reg_pdev = platform_device_register_full(&pdevinfo); ++ if (IS_ERR(reg_pdev)) { ++ dev_err(dev, "Failed to register user space regulator for bt_en"); ++ return 1; ++ } ++ platform_set_drvdata(pdev, reg_pdev); ++ return 0; ++} ++ ++static int usc_wrapper_remove(struct platform_device *pdev) ++{ ++ struct platform_device *reg_pdev = platform_get_drvdata(pdev); ++ ++ platform_device_unregister(reg_pdev); ++ return 0; ++} ++ ++static const struct of_device_id userspace_consumer_wrapper_of_match[] = { ++ { .compatible = "userspace-consumer-wrapper", }, ++ {}, ++}; ++ ++MODULE_DEVICE_TABLE(of, userspace_consumer_wrapper_of_match); ++ ++static struct platform_driver userspace_consumer_wrapper_driver = { ++ .driver = { ++ .name = "userspace-consumer-wrapper", ++ .of_match_table = userspace_consumer_wrapper_of_match, ++ .owner = THIS_MODULE, ++ }, ++ .probe = usc_wrapper_probe, ++ .remove = usc_wrapper_remove, ++}; ++ ++ ++module_platform_driver(userspace_consumer_wrapper_driver); ++ ++MODULE_AUTHOR("Uri Mashiach "); ++MODULE_DESCRIPTION("Userspace consumer device tree wrapper"); ++MODULE_LICENSE("GPL v2"); +-- +2.20.1 + diff --git a/recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0015-ARM-dts-imx7d-cl-som-imx7-add-WiLink-Bluetooth-suppo.patch b/recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0015-ARM-dts-imx7d-cl-som-imx7-add-WiLink-Bluetooth-suppo.patch new file mode 100644 index 0000000..af53c66 --- /dev/null +++ b/recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0015-ARM-dts-imx7d-cl-som-imx7-add-WiLink-Bluetooth-suppo.patch @@ -0,0 +1,52 @@ +From b6e6907b03d829a4d0f0447b4b8e3a9e89f67799 Mon Sep 17 00:00:00 2001 +From: Ilya Ledvich +Date: Sun, 29 May 2016 17:14:53 +0300 +Subject: [PATCH 15/37] ARM: dts: imx7d: cl-som-imx7: add WiLink Bluetooth + support + +Add support for TI's WiLink8 Bluetooth module on UART3. + +Signed-off-by: Ilya Ledvich +--- + arch/arm/boot/dts/imx7d-cl-som-imx7.dts | 18 ++++++++++++++++++ + 1 file changed, 18 insertions(+) + +diff --git a/arch/arm/boot/dts/imx7d-cl-som-imx7.dts b/arch/arm/boot/dts/imx7d-cl-som-imx7.dts +index 4d098b68f94e..0a40ed51b6bb 100644 +--- a/arch/arm/boot/dts/imx7d-cl-som-imx7.dts ++++ b/arch/arm/boot/dts/imx7d-cl-som-imx7.dts +@@ -340,6 +340,15 @@ + status = "okay"; + }; + ++&uart3 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_uart3>; ++ assigned-clocks = <&clks IMX7D_UART3_ROOT_SRC>; ++ assigned-clock-parents = <&clks IMX7D_PLL_SYS_MAIN_240M_CLK>; ++ status = "okay"; ++ fsl,uart-has-rtscts; ++}; ++ + &usbotg1 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_usbotg1>; +@@ -492,6 +501,15 @@ + >; + }; + ++ pinctrl_uart3: uart3grp { ++ fsl,pins = < ++ MX7D_PAD_UART3_TX_DATA__UART3_DCE_TX 0x79 ++ MX7D_PAD_UART3_RX_DATA__UART3_DCE_RX 0x79 ++ MX7D_PAD_UART3_CTS_B__UART3_DCE_CTS 0x79 ++ MX7D_PAD_UART3_RTS_B__UART3_DCE_RTS 0x79 ++ >; ++ }; ++ + pinctrl_usdhc2: usdhc2grp { + fsl,pins = < + MX7D_PAD_SD2_CMD__SD2_CMD 0x59 +-- +2.20.1 + diff --git a/recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0016-ARM-imx7d-cl-som-imx7-Bluetooth-control-with-regulat.patch b/recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0016-ARM-imx7d-cl-som-imx7-Bluetooth-control-with-regulat.patch new file mode 100644 index 0000000..257bdc8 --- /dev/null +++ b/recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0016-ARM-imx7d-cl-som-imx7-Bluetooth-control-with-regulat.patch @@ -0,0 +1,52 @@ +From e849dfcc170d410386519007a8546668b40563ab Mon Sep 17 00:00:00 2001 +From: Uri Mashiach +Date: Tue, 7 Aug 2018 10:33:09 +0300 +Subject: [PATCH 16/37] ARM: imx7d: cl-som-imx7: Bluetooth control with + regulator + +Use the user space regulator to enable/disable the Bluetooth. + +Signed-off-by: Uri Mashiach +--- + arch/arm/boot/dts/imx7d-cl-som-imx7.dts | 18 ++++++++++++++++++ + 1 file changed, 18 insertions(+) + +diff --git a/arch/arm/boot/dts/imx7d-cl-som-imx7.dts b/arch/arm/boot/dts/imx7d-cl-som-imx7.dts +index 0a40ed51b6bb..a0a6f394983f 100644 +--- a/arch/arm/boot/dts/imx7d-cl-som-imx7.dts ++++ b/arch/arm/boot/dts/imx7d-cl-som-imx7.dts +@@ -54,6 +54,16 @@ + startup-delay-us = <70000>; + enable-active-high; + }; ++ ++ bt_en_reg: fixedregulator-bt_en { ++ compatible = "regulator-fixed"; ++ regulator-name = "bt_en_fixed"; ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ gpio = <&pca9555 1 GPIO_ACTIVE_HIGH>; ++ startup-delay-us = <1000>; ++ enable-active-high; ++ }; + /* Regulators - end */ + + leds { +@@ -65,6 +75,14 @@ + linux,default-trigger = "heartbeat"; + }; + }; ++ ++ bt_enable: bt_enable@0 { ++ compatible = "userspace-consumer-wrapper"; ++ comment = "Enable/disbale bluetooth regulator bt_en_reg"; ++ ++ regulator-name = "bt_en_fixed"; ++ us-folder-num = <0>; ++ }; + }; + + &cpu0 { +-- +2.20.1 + diff --git a/recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0017-ASoC-fsl-add-analog-audio-support-switch-for-imx-boa.patch b/recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0017-ASoC-fsl-add-analog-audio-support-switch-for-imx-boa.patch new file mode 100644 index 0000000..f55c54c --- /dev/null +++ b/recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0017-ASoC-fsl-add-analog-audio-support-switch-for-imx-boa.patch @@ -0,0 +1,37 @@ +From c48c39fec98d12f8cc382a96683184b1f22d6aa4 Mon Sep 17 00:00:00 2001 +From: Valentin Raevsky +Date: Thu, 9 Jun 2016 14:12:32 +0300 +Subject: [PATCH 17/37] ASoC: fsl: add analog audio support switch for imx + boards with wm8731 + +Signed-off-by: Valentin Raevsky +--- + sound/soc/fsl/Kconfig | 12 ++++++++++++ + 1 file changed, 12 insertions(+) + +diff --git a/sound/soc/fsl/Kconfig b/sound/soc/fsl/Kconfig +index 1dfad9187644..892f66aef2fd 100644 +--- a/sound/soc/fsl/Kconfig ++++ b/sound/soc/fsl/Kconfig +@@ -388,6 +388,18 @@ config SND_SOC_IMX_CS42888 + Say Y if you want to add support for SoC audio on an i.MX board with + a cs42888 codec. + ++config SND_SOC_IMX_WM8731 ++ tristate "SoC Audio support for i.MX boards with wm8731" ++ depends on OF && I2C ++ select SND_SIMPLE_CARD ++ select SND_SOC_WM8731 ++ select SND_SOC_IMX_PCM_DMA ++ select SND_SOC_FSL_SAI ++ select SND_SOC_FSL_UTILS ++ help ++ Say Y if you want to add support for SoC audio on an i.MX board with ++ a wm8731 codec. ++ + config SND_SOC_IMX_WM8962 + tristate "SoC Audio support for i.MX boards with wm8962" + depends on OF && I2C && INPUT +-- +2.20.1 + diff --git a/recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0018-ARM-dts-imx7d-cl-som-imx7-add-analog-audio-support.patch b/recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0018-ARM-dts-imx7d-cl-som-imx7-add-analog-audio-support.patch new file mode 100644 index 0000000..38725a6 --- /dev/null +++ b/recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0018-ARM-dts-imx7d-cl-som-imx7-add-analog-audio-support.patch @@ -0,0 +1,133 @@ +From 13d4fd69518d0cdcdd71ff6eecf5221a701ee707 Mon Sep 17 00:00:00 2001 +From: Ilya Ledvich +Date: Thu, 9 Jun 2016 15:35:07 +0300 +Subject: [PATCH 18/37] ARM: dts: imx7d: cl-som-imx7: add analog audio support + +Add analog audio support by means of the simple-audio-card. +This instance provides a simple glue interface between cpu:sai and codec:wm8731. +Use a 12.288MHz audio master clock (MCLK) as clock source for an nalog audio +codec wm8731. The MCLK is generated by SAI1 interface and sourced to the +codec from GPIO1_IO01 pin muxed in SAI1_MCLK mode. + +Signed-off-by: Ilya Ledvich +--- + arch/arm/boot/dts/imx7d-cl-som-imx7.dts | 75 +++++++++++++++++++++++++ + 1 file changed, 75 insertions(+) + +diff --git a/arch/arm/boot/dts/imx7d-cl-som-imx7.dts b/arch/arm/boot/dts/imx7d-cl-som-imx7.dts +index a0a6f394983f..6fe355ec3939 100644 +--- a/arch/arm/boot/dts/imx7d-cl-som-imx7.dts ++++ b/arch/arm/boot/dts/imx7d-cl-som-imx7.dts +@@ -83,6 +83,46 @@ + regulator-name = "bt_en_fixed"; + us-folder-num = <0>; + }; ++ ++ sound { ++ compatible = "simple-audio-card"; ++ simple-audio-card,name = "cl-som-imx7"; ++ simple-audio-card,widgets = ++ "Headphone", "Headphone Jack", ++ "Line", "Line Out", ++ "Microphone", "Mic Jack", ++ "Line", "Line In"; ++ simple-audio-card,routing = ++ "Headphone Jack", "RHPOUT", ++ "Headphone Jack", "LHPOUT", ++ "LLINEIN", "Line Jack", ++ "RLINEIN", "Line Jack", ++ "MICIN", "Mic Bias", ++ "Mic Bias", "Mic Jack"; ++ simple-audio-card,format = "i2s"; ++ simple-audio-card,bitclock-master = <&sound_master>; ++ simple-audio-card,frame-master = <&sound_master>; ++ ++ assigned-clocks = <&clks IMX7D_AUDIO_MCLK_ROOT_SRC>, ++ <&clks IMX7D_AUDIO_MCLK_ROOT_CLK>; ++ assigned-clock-parents = <&clks IMX7D_PLL_AUDIO_POST_DIV>; ++ assigned-clock-rates = <0>, <12288000>; ++ ++ sound_master: simple-audio-card,cpu { ++ sound-dai = <&sai1 0>; ++ system-clock-direction-out; ++ }; ++ ++ simple-audio-card,codec { ++ sound-dai = <&wm8731>; ++ system-clock-frequency = <12288000>; ++ }; ++ }; ++}; ++ ++&clks { ++ assigned-clocks = <&clks IMX7D_PLL_AUDIO_POST_DIV>; ++ assigned-clock-rates = <884736000>; + }; + + &cpu0 { +@@ -315,6 +355,15 @@ + }; + }; + ++ wm8731: wm8731@1a { ++ #sound-dai-cells = <0>; ++ compatible = "wlf,wm8731"; ++ reg = <0x1a>; ++ clocks = <&clks IMX7D_AUDIO_MCLK_ROOT_CLK>; ++ clock-names = "mclk"; ++ status = "okay"; ++ }; ++ + pca9555: pca9555@20 { + compatible = "nxp,pca9555"; + gpio-controller; +@@ -350,6 +399,17 @@ + }; + }; + ++&sai1 { ++ #sound-dai-cells = <1>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_sai1 &pinctrl_sai1_lpsr>; ++ assigned-clocks = <&clks IMX7D_SAI1_ROOT_SRC>, ++ <&clks IMX7D_SAI1_ROOT_CLK>; ++ assigned-clock-parents = <&clks IMX7D_PLL_AUDIO_POST_DIV>; ++ assigned-clock-rates = <0>, <36864000>; ++ status = "okay"; ++}; ++ + &uart1 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_uart1>; +@@ -506,6 +566,15 @@ + >; + }; + ++ pinctrl_sai1: sai1grp { ++ fsl,pins = < ++ MX7D_PAD_ENET1_RX_CLK__SAI1_TX_BCLK 0x1f ++ MX7D_PAD_ENET1_CRS__SAI1_TX_SYNC 0x1f ++ MX7D_PAD_ENET1_COL__SAI1_TX_DATA0 0x30 ++ MX7D_PAD_ENET1_TX_CLK__SAI1_RX_DATA0 0x1f ++ >; ++ }; ++ + pinctrl_tsc2046: tsc2046grp { + fsl,pins = < + MX7D_PAD_GPIO1_IO14__GPIO1_IO14 0x34 /* PENDOWN */ +@@ -573,6 +642,12 @@ + >; + }; + ++ pinctrl_sai1_lpsr: sai1grp_lpsr { ++ fsl,pins = < ++ MX7D_PAD_LPSR_GPIO1_IO01__SAI1_MCLK 0x14 ++ >; ++ }; ++ + pinctrl_usbotg1: usbotg1grp { + fsl,pins = < + MX7D_PAD_LPSR_GPIO1_IO05__GPIO1_IO5 0x14 /* OTG PWREN */ +-- +2.20.1 + diff --git a/recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0019-ARM-dts-imx7d-sbc-imx7-update-model-string.patch b/recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0019-ARM-dts-imx7d-sbc-imx7-update-model-string.patch new file mode 100644 index 0000000..af512c6 --- /dev/null +++ b/recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0019-ARM-dts-imx7d-sbc-imx7-update-model-string.patch @@ -0,0 +1,29 @@ +From 5707535a635a66b11ff39634969494ccc97f3b72 Mon Sep 17 00:00:00 2001 +From: Ilya Ledvich +Date: Mon, 13 Nov 2017 14:18:59 +0200 +Subject: [PATCH 19/37] ARM: dts: imx7d: sbc-imx7: update model string + +Update sbc-imx7 model string in order to meet +the CompuLab ATP machine name requirements. + +Signed-off-by: Ilya Ledvich +--- + arch/arm/boot/dts/imx7d-sbc-imx7.dts | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/arch/arm/boot/dts/imx7d-sbc-imx7.dts b/arch/arm/boot/dts/imx7d-sbc-imx7.dts +index f8a868552707..8a549362a7a6 100644 +--- a/arch/arm/boot/dts/imx7d-sbc-imx7.dts ++++ b/arch/arm/boot/dts/imx7d-sbc-imx7.dts +@@ -13,7 +13,7 @@ + #include "imx7d-cl-som-imx7.dts" + + / { +- model = "CompuLab SBC-iMX7"; ++ model = "CompuLab CL-SOM-iMX7 on SB-SOM"; + compatible = "compulab,sbc-imx7", "compulab,cl-som-imx7", "fsl,imx7d"; + }; + +-- +2.20.1 + diff --git a/recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0020-ARM-dts-imx7d-sbc-imx7-add-support-for-pwm-backlight.patch b/recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0020-ARM-dts-imx7d-sbc-imx7-add-support-for-pwm-backlight.patch new file mode 100644 index 0000000..5a0e015 --- /dev/null +++ b/recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0020-ARM-dts-imx7d-sbc-imx7-add-support-for-pwm-backlight.patch @@ -0,0 +1,53 @@ +From 2c9ae7215c096a47675e19dbaa1d3ad5fff57951 Mon Sep 17 00:00:00 2001 +From: Ilya Ledvich +Date: Fri, 5 Feb 2016 10:44:30 +0200 +Subject: [PATCH 20/37] ARM: dts: imx7d: sbc-imx7: add support for pwm + backlight + +Add support for PWM2 based backlight used for LCD display. + +Signed-off-by: Ilya Ledvich +--- + arch/arm/boot/dts/imx7d-sbc-imx7.dts | 22 ++++++++++++++++++++++ + 1 file changed, 22 insertions(+) + +diff --git a/arch/arm/boot/dts/imx7d-sbc-imx7.dts b/arch/arm/boot/dts/imx7d-sbc-imx7.dts +index 8a549362a7a6..63b7f84723fd 100644 +--- a/arch/arm/boot/dts/imx7d-sbc-imx7.dts ++++ b/arch/arm/boot/dts/imx7d-sbc-imx7.dts +@@ -15,6 +15,20 @@ + / { + model = "CompuLab CL-SOM-iMX7 on SB-SOM"; + compatible = "compulab,sbc-imx7", "compulab,cl-som-imx7", "fsl,imx7d"; ++ ++ backlight { ++ compatible = "pwm-backlight"; ++ pwms = <&pwm2 0 5000000 0>; ++ brightness-levels = <0 4 8 16 32 64 128 255>; ++ default-brightness-level = <6>; ++ status = "okay"; ++ }; ++}; ++ ++&pwm2 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_pwm2>; ++ status = "okay"; + }; + + &usdhc1 { +@@ -40,3 +54,11 @@ + >; + }; + }; ++ ++&iomuxc_lpsr { ++ pinctrl_pwm2: pwm2grp { ++ fsl,pins = < ++ MX7D_PAD_LPSR_GPIO1_IO02__PWM2_OUT 0x110b0 ++ >; ++ }; ++}; +-- +2.20.1 + diff --git a/recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0021-ARM-dts-imx7d-sbc-imx7-add-gpio-extender-support.patch b/recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0021-ARM-dts-imx7d-sbc-imx7-add-gpio-extender-support.patch new file mode 100644 index 0000000..94519c7 --- /dev/null +++ b/recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0021-ARM-dts-imx7d-sbc-imx7-add-gpio-extender-support.patch @@ -0,0 +1,54 @@ +From 4c8dee10e28c2b7f543b134fa9b39b82edad82bc Mon Sep 17 00:00:00 2001 +From: Ilya Ledvich +Date: Fri, 5 Feb 2016 10:58:52 +0200 +Subject: [PATCH 21/37] ARM: dts: imx7d: sbc-imx7: add gpio extender support + +Add support for PCA9555 GPIO extender over I2C4 bus. + +Signed-off-by: Ilya Ledvich +--- + arch/arm/boot/dts/imx7d-sbc-imx7.dts | 21 +++++++++++++++++++++ + 1 file changed, 21 insertions(+) + +diff --git a/arch/arm/boot/dts/imx7d-sbc-imx7.dts b/arch/arm/boot/dts/imx7d-sbc-imx7.dts +index 63b7f84723fd..a655ba0f4739 100644 +--- a/arch/arm/boot/dts/imx7d-sbc-imx7.dts ++++ b/arch/arm/boot/dts/imx7d-sbc-imx7.dts +@@ -25,6 +25,20 @@ + }; + }; + ++&i2c4 { ++ clock-frequency = <100000>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_i2c4>; ++ status = "okay"; ++ ++ pca9555_sb: pca9555_sb@20 { ++ compatible = "nxp,pca9555"; ++ gpio-controller; ++ #gpio-cells = <2>; ++ reg = <0x20>; ++ }; ++}; ++ + &pwm2 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_pwm2>; +@@ -41,6 +55,13 @@ + }; + + &iomuxc { ++ pinctrl_i2c4: i2c4grp { ++ fsl,pins = < ++ MX7D_PAD_GPIO1_IO11__I2C4_SDA 0x4000000f ++ MX7D_PAD_GPIO1_IO10__I2C4_SCL 0x4000000f ++ >; ++ }; ++ + pinctrl_usdhc1: usdhc1grp { + fsl,pins = < + MX7D_PAD_SD1_CMD__SD1_CMD 0x59 +-- +2.20.1 + diff --git a/recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0022-ARM-dts-imx7d-sbc-imx7-add-support-for-baseboard-eep.patch b/recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0022-ARM-dts-imx7d-sbc-imx7-add-support-for-baseboard-eep.patch new file mode 100644 index 0000000..66cd1a1 --- /dev/null +++ b/recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0022-ARM-dts-imx7d-sbc-imx7-add-support-for-baseboard-eep.patch @@ -0,0 +1,33 @@ +From 7d6d3669f07c592b9200f59965c1c069c5b9dbea Mon Sep 17 00:00:00 2001 +From: Ilya Ledvich +Date: Thu, 7 Dec 2017 10:42:54 +0200 +Subject: [PATCH 22/37] ARM: dts: imx7d: sbc-imx7: add support for baseboard + eeprom + +Add support for SB-SOM-iMX7 baseboard EEPROM over I2C4 bus. + +Signed-off-by: Ilya Ledvich +--- + arch/arm/boot/dts/imx7d-sbc-imx7.dts | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/arch/arm/boot/dts/imx7d-sbc-imx7.dts b/arch/arm/boot/dts/imx7d-sbc-imx7.dts +index a655ba0f4739..834bdc8a592f 100644 +--- a/arch/arm/boot/dts/imx7d-sbc-imx7.dts ++++ b/arch/arm/boot/dts/imx7d-sbc-imx7.dts +@@ -37,6 +37,12 @@ + #gpio-cells = <2>; + reg = <0x20>; + }; ++ ++ eeprom_sb@54 { ++ compatible = "atmel,24c08"; ++ reg = <0x54>; ++ pagesize = <16>; ++ }; + }; + + &pwm2 { +-- +2.20.1 + diff --git a/recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0023-ARM-dts-imx7d-sbc-imx7-add-LCD-support.patch b/recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0023-ARM-dts-imx7d-sbc-imx7-add-LCD-support.patch new file mode 100644 index 0000000..b5481fc --- /dev/null +++ b/recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0023-ARM-dts-imx7d-sbc-imx7-add-LCD-support.patch @@ -0,0 +1,130 @@ +From f9c7d5ce7296e64d2347503f3a340a69bf69fc83 Mon Sep 17 00:00:00 2001 +From: Ilya Ledvich +Date: Fri, 5 Feb 2016 11:04:53 +0200 +Subject: [PATCH 23/37] ARM: dts: imx7d: sbc-imx7: add LCD support + +Add support for Startek KD050C LCD display over lcdif interface. + +Signed-off-by: Ilya Ledvich +--- + arch/arm/boot/dts/imx7d-sbc-imx7.dts | 83 ++++++++++++++++++++++++++++ + 1 file changed, 83 insertions(+) + +diff --git a/arch/arm/boot/dts/imx7d-sbc-imx7.dts b/arch/arm/boot/dts/imx7d-sbc-imx7.dts +index 834bdc8a592f..e1714c28ff37 100644 +--- a/arch/arm/boot/dts/imx7d-sbc-imx7.dts ++++ b/arch/arm/boot/dts/imx7d-sbc-imx7.dts +@@ -16,6 +16,10 @@ + model = "CompuLab CL-SOM-iMX7 on SB-SOM"; + compatible = "compulab,sbc-imx7", "compulab,cl-som-imx7", "fsl,imx7d"; + ++ aliases { ++ lcdif = &lcdif; ++ }; ++ + backlight { + compatible = "pwm-backlight"; + pwms = <&pwm2 0 5000000 0>; +@@ -36,6 +40,14 @@ + gpio-controller; + #gpio-cells = <2>; + reg = <0x20>; ++ ++ /* LCD nSTANDBY GPIO */ ++ lcd_nstby_3v3 { ++ gpio-hog; ++ gpios = <14 GPIO_ACTIVE_HIGH>; ++ output-high; ++ line-name = "lcd_nstby_3v3"; ++ }; + }; + + eeprom_sb@54 { +@@ -45,6 +57,39 @@ + }; + }; + ++&lcdif { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_lcdif_dat ++ &pinctrl_lcdif_ctrl>; ++ display = <&display0>; ++ status = "okay"; ++ ++ display0: display { ++ bits-per-pixel = <24>; ++ bus-width = <24>; ++ ++ display-timings { ++ native-mode = <&timing0>; ++ timing0: lcd { ++ clock-frequency = <29580000>; ++ hactive = <800>; ++ vactive = <480>; ++ hfront-porch = <16>; ++ hback-porch = <1>; ++ hsync-len = <80>; ++ vback-porch = <13>; ++ vfront-porch = <16>; ++ vsync-len = <16>; ++ ++ hsync-active = <0>; ++ vsync-active = <0>; ++ de-active = <1>; ++ pixelclk-active = <0>; ++ }; ++ }; ++ }; ++}; ++ + &pwm2 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_pwm2>; +@@ -68,6 +113,44 @@ + >; + }; + ++ pinctrl_lcdif_dat: lcdifdatgrp { ++ fsl,pins = < ++ MX7D_PAD_LCD_DATA00__LCD_DATA0 0x79 ++ MX7D_PAD_LCD_DATA01__LCD_DATA1 0x79 ++ MX7D_PAD_LCD_DATA02__LCD_DATA2 0x79 ++ MX7D_PAD_LCD_DATA03__LCD_DATA3 0x79 ++ MX7D_PAD_EPDC_DATA04__LCD_DATA4 0x79 ++ MX7D_PAD_EPDC_DATA05__LCD_DATA5 0x79 ++ MX7D_PAD_EPDC_DATA06__LCD_DATA6 0x79 ++ MX7D_PAD_EPDC_DATA07__LCD_DATA7 0x79 ++ MX7D_PAD_EPDC_DATA08__LCD_DATA8 0x79 ++ MX7D_PAD_EPDC_DATA09__LCD_DATA9 0x79 ++ MX7D_PAD_EPDC_DATA10__LCD_DATA10 0x79 ++ MX7D_PAD_EPDC_DATA11__LCD_DATA11 0x79 ++ MX7D_PAD_EPDC_DATA12__LCD_DATA12 0x79 ++ MX7D_PAD_EPDC_DATA13__LCD_DATA13 0x79 ++ MX7D_PAD_EPDC_DATA14__LCD_DATA14 0x79 ++ MX7D_PAD_EPDC_DATA15__LCD_DATA15 0x79 ++ MX7D_PAD_LCD_DATA16__LCD_DATA16 0x79 ++ MX7D_PAD_LCD_DATA17__LCD_DATA17 0x79 ++ MX7D_PAD_LCD_DATA18__LCD_DATA18 0x79 ++ MX7D_PAD_LCD_DATA19__LCD_DATA19 0x79 ++ MX7D_PAD_LCD_DATA20__LCD_DATA20 0x79 ++ MX7D_PAD_LCD_DATA21__LCD_DATA21 0x79 ++ MX7D_PAD_LCD_DATA22__LCD_DATA22 0x79 ++ MX7D_PAD_LCD_DATA23__LCD_DATA23 0x79 ++ >; ++ }; ++ ++ pinctrl_lcdif_ctrl: lcdifctrlgrp { ++ fsl,pins = < ++ MX7D_PAD_EPDC_DATA00__LCD_CLK 0x79 ++ MX7D_PAD_EPDC_DATA01__LCD_ENABLE 0x79 ++ MX7D_PAD_EPDC_DATA02__LCD_VSYNC 0x79 ++ MX7D_PAD_EPDC_DATA03__LCD_HSYNC 0x79 ++ >; ++ }; ++ + pinctrl_usdhc1: usdhc1grp { + fsl,pins = < + MX7D_PAD_SD1_CMD__SD1_CMD 0x59 +-- +2.20.1 + diff --git a/recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0024-ARM-dts-imx7d-sbc-imx7-add-DVI-support.patch b/recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0024-ARM-dts-imx7d-sbc-imx7-add-DVI-support.patch new file mode 100644 index 0000000..e6d8b9a --- /dev/null +++ b/recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0024-ARM-dts-imx7d-sbc-imx7-add-DVI-support.patch @@ -0,0 +1,69 @@ +From edf59240fcf2dde2849bbee1d968ed2ac9832549 Mon Sep 17 00:00:00 2001 +From: Ilya Ledvich +Date: Sun, 17 Apr 2016 14:26:48 +0300 +Subject: [PATCH 24/37] ARM: dts: imx7d: sbc-imx7: add DVI support + +Signed-off-by: Ilya Ledvich +--- + arch/arm/boot/dts/imx7d-sbc-imx7.dts | 31 ++++++++++++++++++++++++++++ + 1 file changed, 31 insertions(+) + +diff --git a/arch/arm/boot/dts/imx7d-sbc-imx7.dts b/arch/arm/boot/dts/imx7d-sbc-imx7.dts +index e1714c28ff37..453a18d865da 100644 +--- a/arch/arm/boot/dts/imx7d-sbc-imx7.dts ++++ b/arch/arm/boot/dts/imx7d-sbc-imx7.dts +@@ -41,6 +41,13 @@ + #gpio-cells = <2>; + reg = <0x20>; + ++ /* DVI ENABLE GPIO */ ++ dvi_en_3v3 { ++ gpio-hog; ++ gpios = <13 GPIO_ACTIVE_HIGH>; ++ output-high; ++ line-name = "dvi_en_3v3"; ++ }; + /* LCD nSTANDBY GPIO */ + lcd_nstby_3v3 { + gpio-hog; +@@ -55,6 +62,12 @@ + reg = <0x54>; + pagesize = <16>; + }; ++ ++ dvicape@39 { ++ compatible = "sil164"; ++ reg = <0x39>; ++ }; ++ + }; + + &lcdif { +@@ -86,6 +99,24 @@ + de-active = <1>; + pixelclk-active = <0>; + }; ++ ++ timing1: dvi { ++ /* 1024x768p60 */ ++ clock-frequency = <65000000>; ++ hactive = <1024>; ++ vactive = <768>; ++ hback-porch = <220>; ++ hfront-porch = <40>; ++ vback-porch = <21>; ++ vfront-porch = <7>; ++ hsync-len = <60>; ++ vsync-len = <10>; ++ ++ hsync-active = <0>; ++ vsync-active = <0>; ++ de-active = <1>; ++ pixelclk-active = <0>; ++ }; + }; + }; + }; +-- +2.20.1 + diff --git a/recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0025-ARM-dts-imx7d-sbc-imx7-add-CAN-bus-support.patch b/recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0025-ARM-dts-imx7d-sbc-imx7-add-CAN-bus-support.patch new file mode 100644 index 0000000..2e385e8 --- /dev/null +++ b/recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0025-ARM-dts-imx7d-sbc-imx7-add-CAN-bus-support.patch @@ -0,0 +1,59 @@ +From b490d83d842d22741f37a5ab94e979af7c8230cd Mon Sep 17 00:00:00 2001 +From: Ilya Ledvich +Date: Tue, 14 Jun 2016 11:43:03 +0300 +Subject: [PATCH 25/37] ARM: dts: imx7d: sbc-imx7: add CAN bus support + +Enable CAN bus support over FLEXCAN1 and FLEXCAN2 interfaces. + +Signed-off-by: Ilya Ledvich +--- + arch/arm/boot/dts/imx7d-sbc-imx7.dts | 26 ++++++++++++++++++++++++++ + 1 file changed, 26 insertions(+) + +diff --git a/arch/arm/boot/dts/imx7d-sbc-imx7.dts b/arch/arm/boot/dts/imx7d-sbc-imx7.dts +index 453a18d865da..ba5ca7cc396a 100644 +--- a/arch/arm/boot/dts/imx7d-sbc-imx7.dts ++++ b/arch/arm/boot/dts/imx7d-sbc-imx7.dts +@@ -29,6 +29,18 @@ + }; + }; + ++&flexcan1 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_flexcan1>; ++ status = "okay"; ++}; ++ ++&flexcan2 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_flexcan2>; ++ status = "okay"; ++}; ++ + &i2c4 { + clock-frequency = <100000>; + pinctrl-names = "default"; +@@ -137,6 +149,20 @@ + }; + + &iomuxc { ++ pinctrl_flexcan1: flexcan1grp { ++ fsl,pins = < ++ MX7D_PAD_I2C1_SCL__FLEXCAN1_RX 0x59 ++ MX7D_PAD_I2C1_SDA__FLEXCAN1_TX 0x59 ++ >; ++ }; ++ ++ pinctrl_flexcan2: flexcan2grp { ++ fsl,pins = < ++ MX7D_PAD_I2C3_SCL__FLEXCAN2_RX 0x59 ++ MX7D_PAD_I2C3_SDA__FLEXCAN2_TX 0x59 ++ >; ++ }; ++ + pinctrl_i2c4: i2c4grp { + fsl,pins = < + MX7D_PAD_GPIO1_IO11__I2C4_SDA 0x4000000f +-- +2.20.1 + diff --git a/recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0026-PCIe-imx6-imx7d-add-support-for-phy-refclk-source-co.patch b/recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0026-PCIe-imx6-imx7d-add-support-for-phy-refclk-source-co.patch new file mode 100644 index 0000000..5123de6 --- /dev/null +++ b/recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0026-PCIe-imx6-imx7d-add-support-for-phy-refclk-source-co.patch @@ -0,0 +1,73 @@ +From adde001830a72c3776b2e59e7a5642bf75c4a242 Mon Sep 17 00:00:00 2001 +From: Ilya Ledvich +Date: Sun, 24 Apr 2016 17:20:18 +0300 +Subject: [PATCH 26/37] PCIe: imx6: imx7d: add support for phy refclk source + configuration + +i.MX7D variant of the IP can use either Crystal Oscillator input +or internal clock input as a Reference Clock input for PCIe PHY. +Add support for an optional property 'fsl,pcie-phy-refclk-internal'. +If present then an internal clock input is used as PCIe PHY +reference clock source. By default an external ocsillator input +is still used. + +Verified on Compulab SBC-iMX7 Single Board Computer. + +Signed-off-by: Ilya Ledvich +--- + Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.txt | 5 +++++ + drivers/pci/dwc/pci-imx6.c | 8 +++++++- + 2 files changed, 12 insertions(+), 1 deletion(-) + +diff --git a/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.txt b/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.txt +index 45deda18524e..fb17dbaf6e29 100644 +--- a/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.txt ++++ b/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.txt +@@ -56,6 +56,11 @@ Additional required properties for imx7d-pcie: + - "pciephy" + - "apps" + ++Additional optional properties for imx7d-pcie: ++- fsl,pcie-phy-refclk-internal: If present then an internal PLL input is used ++ as PCIe PHY reference clock source. By default an external ocsillator input ++ is used. ++ + Additional required properties for imx8 pcie: + - hsio : should be <&hsio>. + The phandle points to the hsio region containing the hsio +diff --git a/drivers/pci/dwc/pci-imx6.c b/drivers/pci/dwc/pci-imx6.c +index 54459b52f526..abc39ecd1e2e 100644 +--- a/drivers/pci/dwc/pci-imx6.c ++++ b/drivers/pci/dwc/pci-imx6.c +@@ -98,6 +98,7 @@ struct imx_pcie { + struct regulator *pcie_phy_regulator; + struct regulator *pcie_bus_regulator; + struct regulator *epdev_on; ++ bool pcie_phy_refclk_sel; + }; + + /* Parameters for the waiting for PCIe PHY PLL to lock on i.MX7 */ +@@ -1304,7 +1305,8 @@ static void imx_pcie_init_phy(struct imx_pcie *imx_pcie) + + /* pcie phy ref clock select; 1? internal pll : external osc */ + regmap_update_bits(imx_pcie->iomuxc_gpr, IOMUXC_GPR12, +- IMX7D_GPR12_PCIE_PHY_REFCLK_SEL, 0); ++ IMX7D_GPR12_PCIE_PHY_REFCLK_SEL, ++ imx_pcie->pcie_phy_refclk_sel ? IMX7D_GPR12_PCIE_PHY_REFCLK_SEL : 0); + } else if (imx_pcie->variant == IMX6SX) { + /* Force PCIe PHY reset */ + regmap_update_bits(imx_pcie->iomuxc_gpr, IOMUXC_GPR5, +@@ -2554,6 +2556,10 @@ static int imx_pcie_probe(struct platform_device *pdev) + if (ret) + imx_pcie->link_gen = 1; + ++ /* PCI PHY reference clock source select */ ++ imx_pcie->pcie_phy_refclk_sel = ++ of_property_read_bool(node, "fsl,pcie-phy-refclk-internal"); ++ + imx_pcie->vpcie = devm_regulator_get_optional(&pdev->dev, "vpcie"); + if (IS_ERR(imx_pcie->vpcie)) { + if (PTR_ERR(imx_pcie->vpcie) == -EPROBE_DEFER) +-- +2.20.1 + diff --git a/recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0027-ARM-dts-imx7d-sbc-imx7-enable-PCIe.patch b/recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0027-ARM-dts-imx7d-sbc-imx7-enable-PCIe.patch new file mode 100644 index 0000000..d578350 --- /dev/null +++ b/recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0027-ARM-dts-imx7d-sbc-imx7-enable-PCIe.patch @@ -0,0 +1,41 @@ +From 28d899a830ca60991ab1f4497d8a85f5b58bd122 Mon Sep 17 00:00:00 2001 +From: Ilya Ledvich +Date: Sun, 14 Jan 2018 13:36:51 +0200 +Subject: [PATCH 27/37] ARM: dts: imx7d: sbc-imx7: enable PCIe + +Enable PCIe peripheral. Use the internal clock input as +a Reference clock for the PCIe PHY. + +Signed-off-by: Ilya Ledvich +--- + arch/arm/boot/dts/imx7d-sbc-imx7.dts | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/arch/arm/boot/dts/imx7d-sbc-imx7.dts b/arch/arm/boot/dts/imx7d-sbc-imx7.dts +index ba5ca7cc396a..d66a597f1b9e 100644 +--- a/arch/arm/boot/dts/imx7d-sbc-imx7.dts ++++ b/arch/arm/boot/dts/imx7d-sbc-imx7.dts +@@ -18,6 +18,7 @@ + + aliases { + lcdif = &lcdif; ++ pcie = &pcie; + }; + + backlight { +@@ -133,6 +134,12 @@ + }; + }; + ++&pcie { ++ reset-gpio = <&pca9555_sb 1 GPIO_ACTIVE_LOW>; ++ fsl,pcie-phy-refclk-internal; ++ status = "okay"; ++}; ++ + &pwm2 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_pwm2>; +-- +2.20.1 + diff --git a/recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0028-ARM-dts-imx7d-sbc-iot-imx7-add-basic-board-support.patch b/recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0028-ARM-dts-imx7d-sbc-iot-imx7-add-basic-board-support.patch new file mode 100644 index 0000000..f2cc340 --- /dev/null +++ b/recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0028-ARM-dts-imx7d-sbc-iot-imx7-add-basic-board-support.patch @@ -0,0 +1,306 @@ +From 1c0c576b77b4e599204d6a5907977ae7f23388a8 Mon Sep 17 00:00:00 2001 +From: Ilya Ledvich +Date: Thu, 8 Feb 2018 11:17:48 +0200 +Subject: [PATCH 28/37] ARM: dts: imx7d: sbc-iot-imx7: add basic board support + +The SB-IOT-iMX7 base board together with CL-SOM-iMX7 SoM form +SBC-IOT-iMX7 single board computer. +SBC-IOT-iMX7 is a single board computer optimized for industrial +control and monitoring, extensive wireless and wired connectivity, +ideal solution for cost-sensitive systems. It is based on the +Freescale i.MX7 system-on-chip. SBC-IOT-iMX7 is implemented with +the CL-SOM-iMX7 System-on-Module providing most of the functions, +and SB-IOT-iMX7 carrier board providing additional peripheral +functions and connectors. + +http://www.compulab.com/products/sbcs/sbc-iot-imx7-nxp-i-mx-7-internet-of-things-single-board-computer/ + +http://www.compulab.co.il/products/computer-on-modules/cl-som-imx7-freescale-i-mx-7-system-on-module/ + +Add basic board support, including SD card as a secondary boot and +storage device. + +Signed-off-by: Ilya Ledvich +--- + arch/arm/boot/dts/Makefile | 1 + + arch/arm/boot/dts/imx7d-sbc-iot-imx7.dts | 256 +++++++++++++++++++++++ + 2 files changed, 257 insertions(+) + create mode 100644 arch/arm/boot/dts/imx7d-sbc-iot-imx7.dts + +diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile +index 76780229f9d6..5474c3b365b7 100644 +--- a/arch/arm/boot/dts/Makefile ++++ b/arch/arm/boot/dts/Makefile +@@ -614,6 +614,7 @@ dtb-$(CONFIG_SOC_IMX7D) += \ + imx7d-nitrogen7.dtb \ + imx7d-pico.dtb \ + imx7d-sbc-imx7.dtb \ ++ imx7d-sbc-iot-imx7.dtb \ + imx7d-sdb.dtb \ + imx7d-sdb-epdc.dtb \ + imx7d-sdb-gpmi-weim.dtb \ +diff --git a/arch/arm/boot/dts/imx7d-sbc-iot-imx7.dts b/arch/arm/boot/dts/imx7d-sbc-iot-imx7.dts +new file mode 100644 +index 000000000000..cbbbce82b96a +--- /dev/null ++++ b/arch/arm/boot/dts/imx7d-sbc-iot-imx7.dts +@@ -0,0 +1,256 @@ ++/* ++ * Support for CompuLab SBC-IOT-iMX7 Single Board Computer ++ * ++ * Copyright (C) 2017 CompuLab Ltd. - http://www.compulab.co.il/ ++ * Author: Ilya Ledvich ++ * ++ * 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. ++ */ ++ ++#include "imx7d-cl-som-imx7.dts" ++ ++/ { ++ model = "CompuLab CL-SOM-iMX7 on SB-IOT"; ++ compatible = "compulab,sbc-iot-imx7", "compulab,cl-som-imx7", "fsl,imx7d"; ++ ++ aliases { ++ lcdif = &lcdif; ++ pcie = &pcie; ++ }; ++}; ++ ++&ecspi3 { ++ fsl,spi-num-chipselects = <1>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_ecspi3 &pinctrl_ecspi3_cs>; ++ cs-gpios = <&gpio4 11 0>; ++ status = "okay"; ++}; ++ ++&i2c3 { ++ clock-frequency = <100000>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_i2c3>; ++ status = "okay"; ++}; ++ ++&i2c4 { ++ clock-frequency = <100000>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_i2c4>; ++ status = "okay"; ++ ++ eeprom_iot@54 { ++ compatible = "atmel,24c08"; ++ reg = <0x54>; ++ pagesize = <16>; ++ }; ++ ++ dvicape@39 { ++ compatible = "sil164"; ++ reg = <0x39>; ++ }; ++}; ++ ++&lcdif { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_lcdif_dat ++ &pinctrl_lcdif_ctrl>; ++ display = <&display0>; ++ status = "okay"; ++ ++ display0: display { ++ bits-per-pixel = <24>; ++ bus-width = <24>; ++ ++ display-timings { ++ native-mode = <&timing0>; ++ timing0: dvi { ++ /* 1024x768p60 */ ++ clock-frequency = <65000000>; ++ hactive = <1024>; ++ vactive = <768>; ++ hback-porch = <220>; ++ hfront-porch = <40>; ++ vback-porch = <21>; ++ vfront-porch = <7>; ++ hsync-len = <60>; ++ vsync-len = <10>; ++ ++ hsync-active = <0>; ++ vsync-active = <0>; ++ de-active = <1>; ++ pixelclk-active = <0>; ++ }; ++ }; ++ }; ++}; ++ ++&pcie { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_pcie>; ++ reset-gpio = <&gpio2 29 GPIO_ACTIVE_LOW>; ++ fsl,pcie-phy-refclk-internal; ++ status = "okay"; ++}; ++ ++&uart2 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_uart2>; ++ assigned-clocks = <&clks IMX7D_UART2_ROOT_SRC>; ++ assigned-clock-parents = <&clks IMX7D_OSC_24M_CLK>; ++ fsl,uart-has-rtscts; ++ status = "okay"; ++}; ++ ++&uart5 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_uart5>; ++ assigned-clocks = <&clks IMX7D_UART5_ROOT_SRC>; ++ assigned-clock-parents = <&clks IMX7D_PLL_SYS_MAIN_240M_CLK>; ++ fsl,uart-has-rtscts; ++ status = "okay"; ++}; ++ ++&uart7 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_uart7>; ++ assigned-clocks = <&clks IMX7D_UART7_ROOT_SRC>; ++ assigned-clock-parents = <&clks IMX7D_PLL_SYS_MAIN_240M_CLK>; ++ fsl,uart-has-rtscts; ++ status = "okay"; ++}; ++ ++&usdhc1 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_usdhc1>; ++ cd-gpios = <&gpio5 0 GPIO_ACTIVE_LOW>; ++ wakeup-source; ++ status = "okay"; ++}; ++ ++&iomuxc { ++ pinctrl-1 = <&pinctrl_xpen>; ++ ++ /* SB-IOT-iMX7 Xpension Header P7 */ ++ pinctrl_xpen: xpengrp { ++ fsl,pins = < ++ MX7D_PAD_LCD_DATA13__GPIO3_IO18 0x34 /* P7-4 - gpio82 */ ++ MX7D_PAD_LCD_DATA12__GPIO3_IO17 0x34 /* P7-5 - gpio81 */ ++ >; ++ }; ++ ++ pinctrl_ecspi3: ecspi3grp { ++ fsl,pins = < ++ MX7D_PAD_I2C1_SDA__ECSPI3_MOSI 0xf /* P7-7 */ ++ MX7D_PAD_I2C1_SCL__ECSPI3_MISO 0xf /* P7-8 */ ++ MX7D_PAD_I2C2_SCL__ECSPI3_SCLK 0xf /* P7-6 */ ++ >; ++ }; ++ ++ pinctrl_ecspi3_cs: ecspi3_cs_grp { ++ fsl,pins = < ++ MX7D_PAD_I2C2_SDA__GPIO4_IO11 0x34 /* P7-9 */ ++ >; ++ }; ++ ++ pinctrl_i2c3: i2c3grp { ++ fsl,pins = < ++ MX7D_PAD_GPIO1_IO09__I2C3_SDA 0x4000000f /* P7-3 */ ++ MX7D_PAD_GPIO1_IO08__I2C3_SCL 0x4000000f /* P7-2 */ ++ >; ++ }; ++ ++ pinctrl_i2c4: i2c4grp { ++ fsl,pins = < ++ MX7D_PAD_GPIO1_IO11__I2C4_SDA 0x4000000f ++ MX7D_PAD_GPIO1_IO10__I2C4_SCL 0x4000000f ++ >; ++ }; ++ ++ pinctrl_lcdif_dat: lcdifdatgrp { ++ fsl,pins = < ++ MX7D_PAD_LCD_DATA00__LCD_DATA0 0x79 ++ MX7D_PAD_LCD_DATA01__LCD_DATA1 0x79 ++ MX7D_PAD_LCD_DATA02__LCD_DATA2 0x79 ++ MX7D_PAD_LCD_DATA03__LCD_DATA3 0x79 ++ MX7D_PAD_EPDC_DATA04__LCD_DATA4 0x79 ++ MX7D_PAD_EPDC_DATA05__LCD_DATA5 0x79 ++ MX7D_PAD_EPDC_DATA06__LCD_DATA6 0x79 ++ MX7D_PAD_EPDC_DATA07__LCD_DATA7 0x79 ++ MX7D_PAD_EPDC_DATA08__LCD_DATA8 0x79 ++ MX7D_PAD_EPDC_DATA09__LCD_DATA9 0x79 ++ MX7D_PAD_EPDC_DATA10__LCD_DATA10 0x79 ++ MX7D_PAD_EPDC_DATA11__LCD_DATA11 0x79 ++ MX7D_PAD_EPDC_DATA12__LCD_DATA12 0x79 ++ MX7D_PAD_EPDC_DATA13__LCD_DATA13 0x79 ++ MX7D_PAD_EPDC_DATA14__LCD_DATA14 0x79 ++ MX7D_PAD_EPDC_DATA15__LCD_DATA15 0x79 ++ MX7D_PAD_LCD_DATA16__LCD_DATA16 0x79 ++ MX7D_PAD_LCD_DATA17__LCD_DATA17 0x79 ++ MX7D_PAD_LCD_DATA18__LCD_DATA18 0x79 ++ MX7D_PAD_LCD_DATA19__LCD_DATA19 0x79 ++ MX7D_PAD_LCD_DATA20__LCD_DATA20 0x79 ++ MX7D_PAD_LCD_DATA21__LCD_DATA21 0x79 ++ MX7D_PAD_LCD_DATA22__LCD_DATA22 0x79 ++ MX7D_PAD_LCD_DATA23__LCD_DATA23 0x79 ++ >; ++ }; ++ ++ pinctrl_lcdif_ctrl: lcdifctrlgrp { ++ fsl,pins = < ++ MX7D_PAD_EPDC_DATA00__LCD_CLK 0x79 ++ MX7D_PAD_EPDC_DATA01__LCD_ENABLE 0x79 ++ MX7D_PAD_EPDC_DATA02__LCD_VSYNC 0x79 ++ MX7D_PAD_EPDC_DATA03__LCD_HSYNC 0x79 ++ >; ++ }; ++ ++ pinctrl_pcie: pciegrp { ++ fsl,pins = < ++ MX7D_PAD_EPDC_BDR1__GPIO2_IO29 0x34 /* PCIe RST */ ++ >; ++ }; ++ ++ pinctrl_uart2: uart2grp { ++ fsl,pins = < ++ MX7D_PAD_LCD_ENABLE__UART2_DCE_TX 0x79 /* P7-12 */ ++ MX7D_PAD_LCD_CLK__UART2_DCE_RX 0x79 /* P7-13 */ ++ MX7D_PAD_LCD_VSYNC__UART2_DCE_CTS 0x79 /* P7-11 */ ++ MX7D_PAD_LCD_HSYNC__UART2_DCE_RTS 0x79 /* P7-10 */ ++ >; ++ }; ++ ++ pinctrl_uart5: uart5grp { ++ fsl,pins = < ++ MX7D_PAD_I2C4_SDA__UART5_DCE_TX 0x79 /* RS232-TX */ ++ MX7D_PAD_I2C4_SCL__UART5_DCE_RX 0x79 /* RS232-RX */ ++ MX7D_PAD_I2C3_SDA__UART5_DCE_RTS 0x79 /* RS232-RTS */ ++ MX7D_PAD_I2C3_SCL__UART5_DCE_CTS 0x79 /* RS232-CTS */ ++ >; ++ }; ++ ++ pinctrl_uart7: uart7grp { ++ fsl,pins = < ++ MX7D_PAD_ECSPI2_MOSI__UART7_DCE_TX 0x79 /* R485-TX */ ++ MX7D_PAD_ECSPI2_SCLK__UART7_DCE_RX 0x79 /* R485-RX */ ++ MX7D_PAD_ECSPI2_SS0__UART7_DCE_CTS 0x79 /* R485-CTS */ ++ MX7D_PAD_ECSPI2_MISO__UART7_DCE_RTS 0x79 /* R485-TTS */ ++ >; ++ }; ++ ++ pinctrl_usdhc1: usdhc1grp { ++ fsl,pins = < ++ MX7D_PAD_SD1_CMD__SD1_CMD 0x59 ++ MX7D_PAD_SD1_CLK__SD1_CLK 0x19 ++ MX7D_PAD_SD1_DATA0__SD1_DATA0 0x59 ++ MX7D_PAD_SD1_DATA1__SD1_DATA1 0x59 ++ MX7D_PAD_SD1_DATA2__SD1_DATA2 0x59 ++ MX7D_PAD_SD1_DATA3__SD1_DATA3 0x59 ++ MX7D_PAD_SD1_CD_B__GPIO5_IO0 0x59 /* CD */ ++ >; ++ }; ++}; +-- +2.20.1 + diff --git a/recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0029-ARM-dts-imx7d-sbc-iot-imx7-add-support-for-CAN-bus.patch b/recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0029-ARM-dts-imx7d-sbc-iot-imx7-add-support-for-CAN-bus.patch new file mode 100644 index 0000000..7bb9d21 --- /dev/null +++ b/recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0029-ARM-dts-imx7d-sbc-iot-imx7-add-support-for-CAN-bus.patch @@ -0,0 +1,82 @@ +From 19f3286f6912585438a9f45b669a7c1f82812aa9 Mon Sep 17 00:00:00 2001 +From: Ilya Ledvich +Date: Thu, 28 Dec 2017 09:48:38 +0200 +Subject: [PATCH 29/37] ARM: dts: imx7d: sbc-iot-imx7: add support for CAN bus + +Enable CAN bus support over FLEXCAN2 interface. + +Signed-off-by: Ilya Ledvich +--- + arch/arm/boot/dts/Makefile | 1 + + arch/arm/boot/dts/imx7d-sbc-iot-imx7-can.dts | 47 ++++++++++++++++++++ + 2 files changed, 48 insertions(+) + create mode 100644 arch/arm/boot/dts/imx7d-sbc-iot-imx7-can.dts + +diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile +index 5474c3b365b7..4fbff9b7b05e 100644 +--- a/arch/arm/boot/dts/Makefile ++++ b/arch/arm/boot/dts/Makefile +@@ -615,6 +615,7 @@ dtb-$(CONFIG_SOC_IMX7D) += \ + imx7d-pico.dtb \ + imx7d-sbc-imx7.dtb \ + imx7d-sbc-iot-imx7.dtb \ ++ imx7d-sbc-iot-imx7-can.dtb \ + imx7d-sdb.dtb \ + imx7d-sdb-epdc.dtb \ + imx7d-sdb-gpmi-weim.dtb \ +diff --git a/arch/arm/boot/dts/imx7d-sbc-iot-imx7-can.dts b/arch/arm/boot/dts/imx7d-sbc-iot-imx7-can.dts +new file mode 100644 +index 000000000000..3eb77538eeee +--- /dev/null ++++ b/arch/arm/boot/dts/imx7d-sbc-iot-imx7-can.dts +@@ -0,0 +1,47 @@ ++/* ++ * Support for CompuLab SBC-IOT-iMX7 Single Board Computer with CAN bus support ++ * ++ * Copyright (C) 2017 CompuLab Ltd. - http://www.compulab.co.il/ ++ * Author: Ilya Ledvich ++ * ++ * 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. ++ */ ++ ++#include "imx7d-sbc-iot-imx7.dts" ++ ++&flexcan2 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_flexcan2>; ++ status = "okay"; ++}; ++ ++&iomuxc { ++ pinctrl_flexcan2: flexcan2grp { ++ fsl,pins = < ++ MX7D_PAD_I2C3_SCL__FLEXCAN2_RX 0x59 ++ MX7D_PAD_I2C3_SDA__FLEXCAN2_TX 0x59 ++ >; ++ }; ++ ++ pinctrl_uart5: uart5grp { ++ fsl,pins = < ++ MX7D_PAD_I2C4_SDA__UART5_DCE_TX 0x79 /* RS232-TX */ ++ MX7D_PAD_I2C4_SCL__UART5_DCE_RX 0x79 /* RS232-RX */ ++ >; ++ }; ++}; ++ ++&uart5 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_uart5>; ++ assigned-clocks = <&clks IMX7D_UART5_ROOT_SRC>; ++ assigned-clock-parents = <&clks IMX7D_PLL_SYS_MAIN_240M_CLK>; ++ status = "okay"; ++}; ++ ++&uart7 { ++ status = "disabled"; ++}; +-- +2.20.1 + diff --git a/recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0030-serial-imx-allow-passing-rs485-options.patch b/recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0030-serial-imx-allow-passing-rs485-options.patch new file mode 100644 index 0000000..48d4530 --- /dev/null +++ b/recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0030-serial-imx-allow-passing-rs485-options.patch @@ -0,0 +1,54 @@ +From b16fd9d78b8889f5a4b6f5b1a0d858e05c520f51 Mon Sep 17 00:00:00 2001 +From: Ilya Ledvich +Date: Mon, 18 Sep 2017 11:17:36 +0300 +Subject: [PATCH 30/37] serial: imx: allow passing rs485 options + +According to Documentation/devicetree/bindings/serial/rs485.txt the +"linux,rs485-enabled-at-boot-time" and "rs485-rx-during-tx" can be +passed by device tree to a serial driver. +Add support for handling these option in the driver. +Additionally, add "rs485-rts-active-high" proiperty to specify +a logical level for RTS pin when sending. + +Signed-off-by: Ilya Ledvich +--- + drivers/tty/serial/imx.c | 16 ++++++++++++++-- + 1 file changed, 14 insertions(+), 2 deletions(-) + +diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c +index a2aca5503315..d2c5c1e0d382 100644 +--- a/drivers/tty/serial/imx.c ++++ b/drivers/tty/serial/imx.c +@@ -2113,6 +2113,17 @@ static int serial_imx_probe_dt(struct imx_port *sport, + if (of_get_property(np, "rts-gpios", NULL)) + sport->have_rtsgpio = 1; + ++ if (of_property_read_bool(np, "linux,rs485-enabled-at-boot-time")) ++ sport->port.rs485.flags |= SER_RS485_ENABLED; ++ ++ if (of_property_read_bool(np, "rs485-rx-during-tx")) ++ sport->port.rs485.flags |= SER_RS485_RX_DURING_TX; ++ ++ if (of_property_read_bool(np, "rs485-rts-active-high")) ++ sport->port.rs485.flags |= SER_RS485_RTS_ON_SEND; ++ else ++ sport->port.rs485.flags |= SER_RS485_RTS_AFTER_SEND; ++ + return 0; + } + #else +@@ -2180,8 +2191,9 @@ static int serial_imx_probe(struct platform_device *pdev) + sport->port.fifosize = 32; + sport->port.ops = &imx_pops; + sport->port.rs485_config = imx_rs485_config; +- sport->port.rs485.flags = +- SER_RS485_RTS_ON_SEND | SER_RS485_RX_DURING_TX; ++ if (!sport->port.rs485.flags) ++ sport->port.rs485.flags = ++ SER_RS485_RTS_ON_SEND | SER_RS485_RX_DURING_TX; + sport->port.flags = UPF_BOOT_AUTOCONF; + init_timer(&sport->timer); + sport->timer.function = imx_timeout; +-- +2.20.1 + diff --git a/recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0031-ARM-imx7d-clk-select-uart7-clock-parent-and-set-rate.patch b/recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0031-ARM-imx7d-clk-select-uart7-clock-parent-and-set-rate.patch new file mode 100644 index 0000000..41b7183 --- /dev/null +++ b/recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0031-ARM-imx7d-clk-select-uart7-clock-parent-and-set-rate.patch @@ -0,0 +1,26 @@ +From 48d89a453419b52f9766385a08bf79589acbd11b Mon Sep 17 00:00:00 2001 +From: Ilya Ledvich +Date: Sun, 11 Feb 2018 14:39:37 +0200 +Subject: [PATCH 31/37] ARM: imx7d: clk: select uart7 clock parent and set rate + +Signed-off-by: Ilya Ledvich +--- + drivers/clk/imx/clk-imx7d.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/drivers/clk/imx/clk-imx7d.c b/drivers/clk/imx/clk-imx7d.c +index de71c4a02a91..c10ea2e63b2a 100644 +--- a/drivers/clk/imx/clk-imx7d.c ++++ b/drivers/clk/imx/clk-imx7d.c +@@ -926,6 +926,8 @@ static void __init imx7d_clocks_init(struct device_node *ccm_node) + imx_clk_set_rate(clks[IMX7D_UART5_ROOT_DIV], 80000000); + imx_clk_set_parent(clks[IMX7D_UART6_ROOT_SRC], clks[IMX7D_PLL_SYS_MAIN_240M_CLK]); + imx_clk_set_rate(clks[IMX7D_UART6_ROOT_DIV], 80000000); ++ imx_clk_set_parent(clks[IMX7D_UART7_ROOT_SRC], clks[IMX7D_PLL_SYS_MAIN_240M_CLK]); ++ imx_clk_set_rate(clks[IMX7D_UART7_ROOT_DIV], 80000000); + + imx_register_uart_clocks(uart_clks); + } +-- +2.20.1 + diff --git a/recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0032-ARM-dts-imx7d-sbc-iot-imx7-add-support-for-RS485-in-.patch b/recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0032-ARM-dts-imx7d-sbc-iot-imx7-add-support-for-RS485-in-.patch new file mode 100644 index 0000000..be41dd7 --- /dev/null +++ b/recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0032-ARM-dts-imx7d-sbc-iot-imx7-add-support-for-RS485-in-.patch @@ -0,0 +1,70 @@ +From 0966ffd4efe34e950eef352f234ea8a527a9413b Mon Sep 17 00:00:00 2001 +From: Ilya Ledvich +Date: Thu, 8 Feb 2018 15:36:46 +0200 +Subject: [PATCH 32/37] ARM: dts: imx7d: sbc-iot-imx7: add support for RS485 in + half duplex mode + +Signed-off-by: Ilya Ledvich +--- + arch/arm/boot/dts/Makefile | 1 + + .../boot/dts/imx7d-sbc-iot-imx7-rs485-hdx.dts | 36 +++++++++++++++++++ + 2 files changed, 37 insertions(+) + create mode 100644 arch/arm/boot/dts/imx7d-sbc-iot-imx7-rs485-hdx.dts + +diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile +index 4fbff9b7b05e..860061c4b356 100644 +--- a/arch/arm/boot/dts/Makefile ++++ b/arch/arm/boot/dts/Makefile +@@ -616,6 +616,7 @@ dtb-$(CONFIG_SOC_IMX7D) += \ + imx7d-sbc-imx7.dtb \ + imx7d-sbc-iot-imx7.dtb \ + imx7d-sbc-iot-imx7-can.dtb \ ++ imx7d-sbc-iot-imx7-rs485-hdx.dtb \ + imx7d-sdb.dtb \ + imx7d-sdb-epdc.dtb \ + imx7d-sdb-gpmi-weim.dtb \ +diff --git a/arch/arm/boot/dts/imx7d-sbc-iot-imx7-rs485-hdx.dts b/arch/arm/boot/dts/imx7d-sbc-iot-imx7-rs485-hdx.dts +new file mode 100644 +index 000000000000..74b575761666 +--- /dev/null ++++ b/arch/arm/boot/dts/imx7d-sbc-iot-imx7-rs485-hdx.dts +@@ -0,0 +1,36 @@ ++/* ++ * Support for CompuLab SBC-IOT-iMX7 Single Board Computer with RS485 in Half Duplex mode ++ * ++ * Copyright (C) 2017 CompuLab Ltd. - http://www.compulab.co.il/ ++ * Author: Ilya Ledvich ++ * ++ * 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. ++ */ ++ ++#include "imx7d-sbc-iot-imx7.dts" ++ ++&iomuxc { ++ pinctrl-1 = <&pinctrl_xpen>; ++ ++ pinctrl_uart7_rs485_hdx: uart7rs485hdxgrp { ++ fsl,pins = < ++ MX7D_PAD_ECSPI2_MOSI__UART7_DCE_TX 0x79 /* R485-TX */ ++ MX7D_PAD_ECSPI2_SCLK__UART7_DCE_RX 0x79 /* R485-RX */ ++ MX7D_PAD_ECSPI2_SS0__GPIO4_IO23 0x34 /* RTS GPIO */ ++ >; ++ }; ++}; ++ ++&uart7 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_uart7_rs485_hdx>; ++ assigned-clocks = <&clks IMX7D_UART7_ROOT_SRC>; ++ assigned-clock-parents = <&clks IMX7D_PLL_SYS_MAIN_240M_CLK>; ++ linux,rs485-enabled-at-boot-time; ++ rs485-rts-active-high; ++ rts-gpios = <&gpio4 23 GPIO_ACTIVE_HIGH>; ++ status = "okay"; ++}; +-- +2.20.1 + diff --git a/recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0033-ARM-dts-imx7d-sbc-imx7-add-support-for-m4.patch b/recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0033-ARM-dts-imx7d-sbc-imx7-add-support-for-m4.patch new file mode 100644 index 0000000..41d57f8 --- /dev/null +++ b/recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0033-ARM-dts-imx7d-sbc-imx7-add-support-for-m4.patch @@ -0,0 +1,69 @@ +From b38658f1654fbd867948dcb0cdabbb55eaca7f17 Mon Sep 17 00:00:00 2001 +From: Nikita Kiryanov +Date: Wed, 28 Feb 2018 20:10:00 +0200 +Subject: [PATCH 33/37] ARM: dts: imx7d: sbc-imx7: add support for m4 + +Add device tree settings for sbc-imx7 to support operating FreeRTOS on +the M4 core alongside Linux. + +The rpmsg buffer is placed at the last 64K of 256MB DRAM to be +compatible with all configurations of sbc-imx7. + +Signed-off-by: Nikita Kiryanov +--- + arch/arm/boot/dts/Makefile | 1 + + arch/arm/boot/dts/imx7d-sbc-imx7-m4.dts | 30 +++++++++++++++++++++++++ + 2 files changed, 31 insertions(+) + create mode 100644 arch/arm/boot/dts/imx7d-sbc-imx7-m4.dts + +diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile +index 860061c4b356..27743c0ee4a6 100644 +--- a/arch/arm/boot/dts/Makefile ++++ b/arch/arm/boot/dts/Makefile +@@ -614,6 +614,7 @@ dtb-$(CONFIG_SOC_IMX7D) += \ + imx7d-nitrogen7.dtb \ + imx7d-pico.dtb \ + imx7d-sbc-imx7.dtb \ ++ imx7d-sbc-imx7-m4.dtb \ + imx7d-sbc-iot-imx7.dtb \ + imx7d-sbc-iot-imx7-can.dtb \ + imx7d-sbc-iot-imx7-rs485-hdx.dtb \ +diff --git a/arch/arm/boot/dts/imx7d-sbc-imx7-m4.dts b/arch/arm/boot/dts/imx7d-sbc-imx7-m4.dts +new file mode 100644 +index 000000000000..2a27491a7301 +--- /dev/null ++++ b/arch/arm/boot/dts/imx7d-sbc-imx7-m4.dts +@@ -0,0 +1,30 @@ ++#include "imx7d-sbc-imx7.dts" ++ ++/ { ++ m4_tcm: tcml@007f8000 { ++ compatible = "fsl, m4_tcml"; ++ reg = <0x007f8000 0x8000>; ++ }; ++}; ++ ++&adc1 { ++ status = "disabled"; ++}; ++ ++&adc2 { ++ status = "disabled"; ++}; ++ ++&rpmsg { ++ status = "okay"; ++ vdev-nums = <1>; ++ reg = <0xafff0000 0x10000>; ++}; ++ ++&uart2 { ++ status = "disabled"; ++}; ++ ++&ocram { ++ reg = <0x00901000 0xf000>; ++}; +-- +2.20.1 + diff --git a/recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0034-MLK-11395-9-video-mipi_dsi_samsung-add-MIPI-host-sid.patch b/recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0034-MLK-11395-9-video-mipi_dsi_samsung-add-MIPI-host-sid.patch new file mode 100644 index 0000000..a8076a3 --- /dev/null +++ b/recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0034-MLK-11395-9-video-mipi_dsi_samsung-add-MIPI-host-sid.patch @@ -0,0 +1,271 @@ +From e85424a3ed38cafc62d039d24180271917133c49 Mon Sep 17 00:00:00 2001 +From: Valentin Raevsky +Date: Mon, 3 Sep 2018 17:31:40 +0300 +Subject: [PATCH 34/37] MLK-11395-9 video: mipi_dsi_samsung: add MIPI host side + congiguration for ti,sn65dsi83x + +* Move the MIPI DSI host timing configuration values to the configuration +table (mipi_dsi_lcd_db). +* Add LCD panel operation callback functions: mipi_lcd_start, + mipi_lcd_stop. + +Signed-off-by: Valentin Raevsky +--- + drivers/video/fbdev/mxc/mipi_dsi.h | 26 +++- + drivers/video/fbdev/mxc/mipi_dsi_samsung.c | 132 +++++++++++++++------ + 2 files changed, 118 insertions(+), 40 deletions(-) + +diff --git a/drivers/video/fbdev/mxc/mipi_dsi.h b/drivers/video/fbdev/mxc/mipi_dsi.h +index ae9b0428ca1e..6cb106cadcd3 100644 +--- a/drivers/video/fbdev/mxc/mipi_dsi.h ++++ b/drivers/video/fbdev/mxc/mipi_dsi.h +@@ -57,12 +57,21 @@ struct mipi_dsi_lcd_callback { + void (*get_mipi_lcd_videomode)(struct fb_videomode **, int *, + struct mipi_lcd_config **); + int (*mipi_lcd_setup)(struct mipi_dsi_info *); ++ int (*mipi_lcd_start)(struct mipi_dsi_info *); ++ int (*mipi_lcd_stop)(struct mipi_dsi_info *); ++}; + ++struct mipi_dsi_host_timing { ++ u32 mipi_dsi_pllctrl_pms; ++ u32 mipi_dsi_phytiming; ++ u32 mipi_dsi_phytiming1; ++ u32 mipi_dsi_phytiming2; + }; + + struct mipi_dsi_match_lcd { + char *lcd_panel; + struct mipi_dsi_lcd_callback lcd_callback; ++ struct mipi_dsi_host_timing host_timing; + }; + + struct mipi_dsi_bus_mux { +@@ -109,6 +118,8 @@ struct mipi_dsi_info { + struct backlight_device *bl; + /* callback for lcd panel operation */ + struct mipi_dsi_lcd_callback *lcd_callback; ++ /* mipi front end timings */ ++ struct mipi_dsi_host_timing *host_timing; + + int (*mipi_dsi_pkt_read)(struct mipi_dsi_info *mipi, + u8 data_type, u32 *buf, int len); +@@ -144,7 +155,20 @@ void mipid_rm68191_get_lcd_videomode(struct fb_videomode **mode, int *size, + int mipid_rm68191_lcd_setup(struct mipi_dsi_info *mipi_dsi); + #endif + +-#ifndef CONFIG_FB_MXC_TRULY_WVGA_SYNC_PANEL ++#ifdef CONFIG_FB_MXC_SN65DSI8X ++void sn65dsi83_get_lcd_videomode(struct fb_videomode **mode, int *size, ++ struct mipi_lcd_config **data); ++int sn65dsi83_lcd_setup(struct mipi_dsi_info *mipi_dsi); ++int sn65dsi83_lcd_start(struct mipi_dsi_info *mipi_dsi); ++int sn65dsi83_lcd_stop(struct mipi_dsi_info *mipi_dsi); ++#endif /* CONFIG_FB_MXC_SN65DSI8X */ ++ ++#if !defined(CONFIG_FB_MXC_TRULY_WVGA_SYNC_PANEL) && \ ++ !defined(CONFIG_FB_MXC_TRULY_PANEL_TFT3P5079E) && \ ++ !defined(CONFIG_FB_MXC_TRULY_PANEL_TFT3P5581E) && \ ++ !defined(CONFIG_FB_MXC_RK_PANEL_RK055AHD042) && \ ++ !defined(CONFIG_FB_MXC_RK_PANEL_RK055IQH042) && \ ++ !defined(CONFIG_FB_MXC_SN65DSI8X) + #error "Please configure MIPI LCD panel, we cannot find one!" + #endif + +diff --git a/drivers/video/fbdev/mxc/mipi_dsi_samsung.c b/drivers/video/fbdev/mxc/mipi_dsi_samsung.c +index d6bcf2a3de9f..bff8b90e6e8d 100644 +--- a/drivers/video/fbdev/mxc/mipi_dsi_samsung.c ++++ b/drivers/video/fbdev/mxc/mipi_dsi_samsung.c +@@ -53,20 +53,85 @@ + static struct mipi_dsi_match_lcd mipi_dsi_lcd_db[] = { + #ifdef CONFIG_FB_MXC_TRULY_WVGA_SYNC_PANEL + { +- "TRULY-WVGA", +- {mipid_hx8369_get_lcd_videomode, mipid_hx8369_lcd_setup} ++ "TRULY-WVGA", ++ { ++ mipid_hx8369_get_lcd_videomode, ++ mipid_hx8369_lcd_setup, ++ NULL, NULL ++ }, ++ { ++ MIPI_DSI_PMS(0x4190), ++ (MIPI_DSI_M_TLPXCTL(11) | MIPI_DSI_M_THSEXITCTL(18)), ++ (MIPI_DSI_M_TCLKPRPRCTL(13) | ++ MIPI_DSI_M_TCLKZEROCTL(65) | ++ MIPI_DSI_M_TCLKPOSTCTL(17) | ++ MIPI_DSI_M_TCLKTRAILCTL(13)), ++ (MIPI_DSI_M_THSPRPRCTL(16) | MIPI_DSI_M_THSZEROCTL(24) | ++ MIPI_DSI_M_THSTRAILCTL(16)) ++ } + }, + #endif + #ifdef CONFIG_FB_MXC_TRULY_PANEL_TFT3P5079E + { +- "TRULY-WVGA-TFT3P5079E", +- {mipid_otm8018b_get_lcd_videomode, mipid_otm8018b_lcd_setup} ++ "TRULY-WVGA-TFT3P5079E", ++ { ++ mipid_otm8018b_get_lcd_videomode, ++ mipid_otm8018b_lcd_setup, ++ NULL, NULL ++ ++ }, ++ { ++ MIPI_DSI_PMS(0x4190), ++ (MIPI_DSI_M_TLPXCTL(11) | MIPI_DSI_M_THSEXITCTL(18)), ++ (MIPI_DSI_M_TCLKPRPRCTL(13) | ++ MIPI_DSI_M_TCLKZEROCTL(65) | ++ MIPI_DSI_M_TCLKPOSTCTL(17) | ++ MIPI_DSI_M_TCLKTRAILCTL(13)), ++ (MIPI_DSI_M_THSPRPRCTL(16) | MIPI_DSI_M_THSZEROCTL(24) | ++ MIPI_DSI_M_THSTRAILCTL(16)) ++ } + }, + #endif + #ifdef CONFIG_FB_MXC_TRULY_PANEL_TFT3P5581E + { +- "TRULY-WVGA-TFT3P5581E", +- {mipid_hx8363_get_lcd_videomode, mipid_hx8363_lcd_setup} ++ "TRULY-WVGA-TFT3P5581E", ++ { ++ mipid_hx8363_get_lcd_videomode, ++ mipid_hx8363_lcd_setup, ++ NULL, NULL ++ }, ++ { ++ MIPI_DSI_PMS(0x3141), ++ (MIPI_DSI_M_TLPXCTL(2) | MIPI_DSI_M_THSEXITCTL(4)), ++ (MIPI_DSI_M_TCLKPRPRCTL(5) | ++ MIPI_DSI_M_TCLKZEROCTL(14) | ++ MIPI_DSI_M_TCLKPOSTCTL(8) | ++ MIPI_DSI_M_TCLKTRAILCTL(3)), ++ (MIPI_DSI_M_THSPRPRCTL(3) | MIPI_DSI_M_THSZEROCTL(3) | ++ MIPI_DSI_M_THSTRAILCTL(3)) ++ } ++ }, ++#endif ++#ifdef CONFIG_FB_MXC_SN65DSI8X ++ { ++ "SN65DSI_default", ++ { ++ sn65dsi83_get_lcd_videomode, ++ sn65dsi83_lcd_setup, ++ sn65dsi83_lcd_start, ++ sn65dsi83_lcd_stop ++ }, ++ { ++ MIPI_DSI_PMS(0x4268), ++ (MIPI_DSI_M_TLPXCTL(3) | MIPI_DSI_M_THSEXITCTL(5)), ++ (MIPI_DSI_M_TCLKPRPRCTL(3) | ++ MIPI_DSI_M_TCLKZEROCTL(20) | ++ MIPI_DSI_M_TCLKPOSTCTL(9) | ++ MIPI_DSI_M_TCLKTRAILCTL(4)), ++ (MIPI_DSI_M_THSPRPRCTL(5) | ++ MIPI_DSI_M_THSZEROCTL(6) | ++ MIPI_DSI_M_THSTRAILCTL(7)) ++ } + }, + #endif + { +@@ -105,6 +170,8 @@ static int mipi_dsi_lcd_init(struct mipi_dsi_info *mipi_dsi, + mipi_dsi_lcd_db[i].lcd_panel)) { + mipi_dsi->lcd_callback = + &mipi_dsi_lcd_db[i].lcd_callback; ++ mipi_dsi->host_timing = ++ &mipi_dsi_lcd_db[i].host_timing; + break; + } + } +@@ -397,12 +464,8 @@ static int mipi_dsi_master_init(struct mipi_dsi_info *mipi_dsi, + MIPI_DSI_PLL_BYPASS(0) | + MIPI_DSI_BYTE_CLK_SRC(0), + mipi_dsi->mmio_base + MIPI_DSI_CLKCTRL); +- if (!strcmp(mipi_dsi->lcd_panel, "TRULY-WVGA-TFT3P5581E")) +- writel(MIPI_DSI_PLL_EN(1) | MIPI_DSI_PMS(0x3141), +- mipi_dsi->mmio_base + MIPI_DSI_PLLCTRL); +- else +- writel(MIPI_DSI_PLL_EN(1) | MIPI_DSI_PMS(0x4190), +- mipi_dsi->mmio_base + MIPI_DSI_PLLCTRL); ++ writel(MIPI_DSI_PLL_EN(1) | mipi_dsi->host_timing->mipi_dsi_pllctrl_pms, ++ mipi_dsi->mmio_base + MIPI_DSI_PLLCTRL); + + /* set PLLTMR: stable time */ + writel(33024, mipi_dsi->mmio_base + MIPI_DSI_PLLTMR); +@@ -458,31 +521,12 @@ static int mipi_dsi_master_init(struct mipi_dsi_info *mipi_dsi, + mipi_dsi->mmio_base + MIPI_DSI_MSYNC); + + /* configure d-phy timings */ +- if (!strcmp(mipi_dsi->lcd_panel, "TRULY-WVGA-TFT3P5581E")) { +- writel(MIPI_DSI_M_TLPXCTL(2) | MIPI_DSI_M_THSEXITCTL(4), +- mipi_dsi->mmio_base + MIPI_DSI_PHYTIMING); +- writel(MIPI_DSI_M_TCLKPRPRCTL(5) | +- MIPI_DSI_M_TCLKZEROCTL(14) | +- MIPI_DSI_M_TCLKPOSTCTL(8) | +- MIPI_DSI_M_TCLKTRAILCTL(3), +- mipi_dsi->mmio_base + MIPI_DSI_PHYTIMING1); +- writel(MIPI_DSI_M_THSPRPRCTL(3) | +- MIPI_DSI_M_THSZEROCTL(3) | +- MIPI_DSI_M_THSTRAILCTL(3), +- mipi_dsi->mmio_base + MIPI_DSI_PHYTIMING2); +- } else { +- writel(MIPI_DSI_M_TLPXCTL(11) | MIPI_DSI_M_THSEXITCTL(18), +- mipi_dsi->mmio_base + MIPI_DSI_PHYTIMING); +- writel(MIPI_DSI_M_TCLKPRPRCTL(13) | +- MIPI_DSI_M_TCLKZEROCTL(65) | +- MIPI_DSI_M_TCLKPOSTCTL(17) | +- MIPI_DSI_M_TCLKTRAILCTL(13), +- mipi_dsi->mmio_base + MIPI_DSI_PHYTIMING1); +- writel(MIPI_DSI_M_THSPRPRCTL(16) | +- MIPI_DSI_M_THSZEROCTL(24) | +- MIPI_DSI_M_THSTRAILCTL(16), +- mipi_dsi->mmio_base + MIPI_DSI_PHYTIMING2); +- } ++ writel(mipi_dsi->host_timing->mipi_dsi_phytiming, ++ mipi_dsi->mmio_base + MIPI_DSI_PHYTIMING); ++ writel(mipi_dsi->host_timing->mipi_dsi_phytiming1, ++ mipi_dsi->mmio_base + MIPI_DSI_PHYTIMING1); ++ writel(mipi_dsi->host_timing->mipi_dsi_phytiming2, ++ mipi_dsi->mmio_base + MIPI_DSI_PHYTIMING2); + + writel(0xf000f, mipi_dsi->mmio_base + MIPI_DSI_TIMEOUT); + +@@ -635,6 +679,11 @@ static int mipi_dsi_enable(struct mxc_dispdrv_handle *disp, + + mipi_dsi_set_main_standby(mipi_dsi, 1); + ++ if (mipi_dsi->lcd_callback->mipi_lcd_start) { ++ msleep(120); ++ mipi_dsi->lcd_callback->mipi_lcd_start(mipi_dsi); ++ } ++ + return 0; + } + +@@ -654,9 +703,12 @@ static void mipi_dsi_disable(struct mxc_dispdrv_handle *disp, + + if (mipi_dsi->disp_power_on) + regulator_disable(mipi_dsi->disp_power_on); +- +- mipi_dsi->lcd_inited = 0; + } ++ ++ if (mipi_dsi->lcd_callback->mipi_lcd_stop) ++ mipi_dsi->lcd_callback->mipi_lcd_stop(mipi_dsi); ++ ++ mipi_dsi->lcd_inited = 0; + } + + static int mipi_dsi_setup(struct mxc_dispdrv_handle *disp, +@@ -840,6 +892,8 @@ static int mipi_dsi_probe(struct platform_device *pdev) + dev_set_drvdata(&pdev->dev, mipi_dsi); + + dev_info(&pdev->dev, "i.MX MIPI DSI driver probed\n"); ++ ret = 0; ++ + return ret; + + dispdrv_reg_fail: +-- +2.20.1 + diff --git a/recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0035-video-mipi-panel-ti-sn65dsi83-add-MIPI-LVDS-bridge-d.patch b/recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0035-video-mipi-panel-ti-sn65dsi83-add-MIPI-LVDS-bridge-d.patch new file mode 100644 index 0000000..1d05017 --- /dev/null +++ b/recipes-kernel/linux/linux-compulab-4.14.98/cl-som-imx7/0035-video-mipi-panel-ti-sn65dsi83-add-MIPI-LVDS-bridge-d.patch @@ -0,0 +1,637 @@ +From f08c699c8a54a2e775f2512471e170787cefeb59 Mon Sep 17 00:00:00 2001 +From: Valentin Raevsky +Date: Mon, 3 Sep 2018 18:06:25 +0300 +Subject: [PATCH 35/37] video: mipi-panel: ti,sn65dsi83: add MIPI LVDS bridge + driver + +Signed-off-by: Valentin Raevsky +[uri.mashiach@compulab.co.il: add device tree support] +Signed-off-by: Uri Mashiach +--- + drivers/video/fbdev/mxc/Kconfig | 6 + + drivers/video/fbdev/mxc/Makefile | 1 + + drivers/video/fbdev/mxc/mxcfb_sn65dsi83.c | 583 ++++++++++++++++++++++ + 3 files changed, 590 insertions(+) + create mode 100644 drivers/video/fbdev/mxc/mxcfb_sn65dsi83.c + +diff --git a/drivers/video/fbdev/mxc/Kconfig b/drivers/video/fbdev/mxc/Kconfig +index fe2a566fc280..cd02fa3d59dc 100644 +--- a/drivers/video/fbdev/mxc/Kconfig ++++ b/drivers/video/fbdev/mxc/Kconfig +@@ -51,6 +51,12 @@ config FB_MXC_MIPI_DSI_NORTHWEST + depends on FB_MXC_DISP_FRAMEWORK || FB_MXC_SYNC_PANEL + depends on FB_MXS + ++config FB_MXC_SN65DSI8X ++ tristate "MXC SN65DSI8x support" ++ depends on FB_MXC_SYNC_PANEL ++ depends on FB_MXC_MIPI_DSI_SAMSUNG ++ depends on I2C ++ + config FB_MXC_TRULY_WVGA_SYNC_PANEL + tristate "TRULY WVGA Panel" + depends on FB_MXC_DISP_FRAMEWORK || FB_MXC_SYNC_PANEL +diff --git a/drivers/video/fbdev/mxc/Makefile b/drivers/video/fbdev/mxc/Makefile +index 5b619152673f..435794559f5d 100644 +--- a/drivers/video/fbdev/mxc/Makefile ++++ b/drivers/video/fbdev/mxc/Makefile +@@ -10,6 +10,7 @@ obj-$(CONFIG_FB_MXC_LDB) += ldb.o + obj-$(CONFIG_FB_MXC_HDMI) += mxc_hdmi.o + obj-$(CONFIG_FB_MXC_EDID) += mxc_edid.o + obj-$(CONFIG_FB_MXC_ADV7535) += adv7535.o ++obj-$(CONFIG_FB_MXC_SN65DSI8X) += mxcfb_sn65dsi83.o + obj-$(CONFIG_FB_MXC_DISP_FRAMEWORK) += mxc_dispdrv.o + obj-$(CONFIG_FB_MXC_SYNC_PANEL) += mxc_lcdif.o mxc_ipuv3_fb.o + obj-$(CONFIG_FB_MXC_EINK_PANEL) += mxc_epdc_fb.o +diff --git a/drivers/video/fbdev/mxc/mxcfb_sn65dsi83.c b/drivers/video/fbdev/mxc/mxcfb_sn65dsi83.c +new file mode 100644 +index 000000000000..099f965740be +--- /dev/null ++++ b/drivers/video/fbdev/mxc/mxcfb_sn65dsi83.c +@@ -0,0 +1,583 @@ ++/* ++ * SN65DSI83 DSI-to-LVDS bridge IC driver ++ * ++ * Copyright (C) 2017 CompuLab Ltd. ++ * Author: Valentin Raevsky ++ * ++ * This program 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. ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include "mipi_dsi.h" ++#include